first commit

This commit is contained in:
npc0-hue
2026-07-11 14:56:10 +08:00
commit 7e05d0a4e7
660 changed files with 78119 additions and 0 deletions
@@ -0,0 +1,34 @@
## 1. Control Contracts
- [x] 1.1 Add typed run control protocol payloads in `run/protocol` for hello, heartbeat, capability report, and capacity report.
- [x] 1.2 Add matching platform DTO/domain contracts and conversion helpers for run control hello and heartbeat.
## 2. Platform Control Registration
- [x] 2.1 Extend platform service behavior to register run endpoints, issue session tokens, validate heartbeat tokens, and request capability refresh on fingerprint drift.
- [x] 2.2 Implement platform control HTTP routes for hello and heartbeat using named DTOs and service methods.
- [x] 2.3 Add platform service/API tests for new registration, re-registration, heartbeat success, invalid tokens, validation failures, and capability refresh.
## 3. Run Control Client
- [x] 3.1 Extend `run/api.PlatformClient` with typed hello and heartbeat methods.
- [x] 3.2 Add run client tests for request paths, JSON payloads, response decoding, and platform error handling.
- [x] 3.3 Add an integration-style test that performs platform hello then heartbeat through the run client.
## 4. Documentation
- [x] 4.1 Update run and platform protocol/route documentation to mark hello/heartbeat implemented and heavier channels deferred.
## 5. Verification
- [x] 5.1 Run `go test ./...` from `platform/` and record evidence.
- [x] 5.2 Run `go test ./...` from `run/` and record evidence.
- [x] 5.3 Run `scripts/check-structure.sh` and record evidence.
- [x] 5.4 Run `openspec validate implement-run-control-registration --strict` and record evidence.
## Evidence
- 2026-07-03: `go test ./...` from `platform/` passed.
- 2026-07-03: `go test ./...` from `run/` passed.
- 2026-07-03: `scripts/check-structure.sh` passed with `structure check passed`.
- 2026-07-03: `openspec validate implement-run-control-registration --strict` passed with `Change 'implement-run-control-registration' is valid`.