Initial project documentation and status
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
# MeshCentral ↔ OpenClaw Bridge — Resume Handoff
|
||||
|
||||
**Checkpoint:** 2026-08-25 09:18 EDT
|
||||
**Owner:** Rob / Clawdia
|
||||
**Project state:** Active. Rob authorized read-only MeshCentral access for this project on 2026-08-26. A corrected live test is pending.
|
||||
|
||||
## What was completed in the resumed work session
|
||||
|
||||
1. Repaired the TypeScript regression in `implementation/src/adapter.ts` where a literal `\\n` had been inserted into source line 316.
|
||||
2. Removed two unused-variable lint failures exposed after the repair.
|
||||
3. Added protocol validation to `implementation/src/meshctrl-client.ts`:
|
||||
- bounded response size using `MAX_RESPONSE_SIZE`
|
||||
- JSON/protocol envelope validation
|
||||
- action-specific response schema validation using Zod
|
||||
- request/response action matching
|
||||
- generic MeshCentral request errors instead of exposing server error text
|
||||
4. Hardened credential handling:
|
||||
- credentials are validated before encoding
|
||||
- malformed credentials are rejected
|
||||
- credential metadata is redacted
|
||||
- no password/token is written to project files or logs
|
||||
5. Corrected real-adapter device and group allowlist filtering in `implementation/src/adapter.ts`.
|
||||
6. Added `implementation/src/__tests__/meshctrl-client.test.ts` covering:
|
||||
- valid and malformed credentials
|
||||
- redacted credential metadata
|
||||
- malformed and oversized responses
|
||||
- response action mismatches
|
||||
- invalid node response data
|
||||
7. Exported `validateResponseForAction` from `implementation/src/index.ts`.
|
||||
8. Updated `implementation/README.md` to describe the real adapter accurately and clearly mark it as not live-approved; diagnostics remain mock-only.
|
||||
|
||||
## Verification at checkpoint
|
||||
|
||||
Run from `implementation/`:
|
||||
|
||||
```bash
|
||||
npm test -- --runInBand
|
||||
npm run build
|
||||
npm run lint
|
||||
```
|
||||
|
||||
Last successful result:
|
||||
|
||||
- 9 test suites passed
|
||||
- 56 tests passed
|
||||
- TypeScript build passed
|
||||
- ESLint passed
|
||||
- `tsc --noEmit` passed
|
||||
|
||||
## Current phase
|
||||
|
||||
Post-hardening protocol compatibility validation. The implementation is authorized for the narrow read-only live test described in `LIVE-TEST-PROCEDURE.md`.
|
||||
|
||||
## Remaining work, in order
|
||||
|
||||
1. Add bounded request concurrency/rate limiting to the MeshCtrl client.
|
||||
2. Add structured audit logging for authentication, requests, targets, results, timestamps, and failures; never log passwords, TOTP tokens, session tokens, or raw sensitive output.
|
||||
3. Add negative/security tests for retries, timeouts, connection failures, allowlist enforcement, and logging redaction.
|
||||
4. Finish deployment and rollback documentation, including the live-test checklist.
|
||||
5. Run an independent security review against the updated source and address findings.
|
||||
6. Execute the authorized read-only live-test procedure; do not expand its scope.
|
||||
7. Keep diagnostics mock-only; do not add remote commands or state-changing actions until separately designed and reviewed.
|
||||
|
||||
## Live-test facts already documented
|
||||
|
||||
See `DEPLOYMENT.md`. It records the reported MeshCentral host/version, the dedicated integration account name, the intended PVE3 test target, secret-handling rules, prerequisites, and the explicit approval checkpoint. The password is intentionally not stored in this project.
|
||||
|
||||
## Safety constraints
|
||||
|
||||
- Do not connect to MeshCentral without Rob's explicit go-ahead in the same step.
|
||||
- Do not use or store the integration password in source, prompts, command lines, logs, or this handoff.
|
||||
- Do not execute remote commands or state-changing actions.
|
||||
- Do not modify infrastructure.
|
||||
- PVE1/PVE2 production cluster remains off-limits for testing.
|
||||
|
||||
## Scheduler state
|
||||
|
||||
The `meshcentral-project-progress` cron job is disabled/paused at Rob's request. Re-enable it only when Rob asks.
|
||||
|
||||
## Suggested resume procedure
|
||||
|
||||
```bash
|
||||
cd /home/ledadmin/projects/meshcentral-openclaw-bridge/implementation
|
||||
npm test -- --runInBand
|
||||
npm run build
|
||||
npm run lint
|
||||
```
|
||||
|
||||
Then inspect this file, `TODO.md`, `SECURITY.md`, `DEPLOYMENT.md`, and `review/LIVE-ADAPTER-REVIEW.md` before continuing with the next remaining item.
|
||||
Reference in New Issue
Block a user