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,28 @@
## Why
The platform can model run endpoints, but the run executor still has no real control-channel registration or heartbeat path. This change establishes the lightweight run-platform control loop so later job, log, and artifact channels can attach to known run sessions without exposing host paths or credentials.
## What Changes
- Add typed run control payloads for hello registration, heartbeat, capability reporting, capacity reporting, session tokens, and polling hints.
- Add platform API routes for run hello and heartbeat that create/update run endpoint metadata through `service.Core`.
- Add service-level control registration behavior that validates endpoint identity, capabilities, capacity, and session token continuity.
- Extend the run-side platform client with hello and heartbeat calls using the typed control protocol.
- Add focused platform API/service tests and run client tests, including an integration-style registration/heartbeat flow.
## Capabilities
### New Capabilities
- `run-control-registration`: Platform/run control-channel registration, heartbeat, session token, capability, and capacity metadata workflow.
### Modified Capabilities
- None.
## Impact
- Affects `platform/` and `run/` only.
- Adds Go protocol/DTO/domain/service/API code and tests for control registration.
- Updates run control documentation and platform route catalog.
- Does not implement job claim/ack/result, log ingest, artifact transfer, plugin bridge behavior, frontend pages, billing, cloud host sales, or direct plugin/run access.