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
Run endpoints can register and heartbeat, but they still cannot receive bounded platform jobs or report lifecycle state. This change adds the job channel needed for server lifecycle and plugin-triggered work while keeping it independent from control, log ingest, artifact transfer, and game client bridge traffic.
## What Changes
- Add typed run job protocol payloads for claim, ack, progress, result, cancel, and reconcile workflows.
- Add platform API routes that let registered run endpoints claim queued jobs, acknowledge acceptance, report progress, submit terminal results, fetch cancel requests, and reconcile active work after restart.
- Extend platform service behavior for job leasing, idempotent claims/acks/results, lifecycle validation, and cancellation metadata using the existing in-memory repository.
- Extend the run-side platform client with typed job-channel methods.
- Add focused platform service/API tests and run client tests, including job lifecycle and idempotency/reconciliation coverage.
## Capabilities
### New Capabilities
- `run-job-channel`: Platform/run job-channel lifecycle, lease, acknowledgement, progress, result, cancel, reconcile, and idempotency workflow.
### Modified Capabilities
- None.
## Impact
- Affects `platform/` and `run/` only.
- Adds Go protocol/DTO/domain/service/API code and tests for the job channel.
- Updates run/platform protocol and route documentation.
- Does not implement durable log ingest, artifact chunk transfer, game client bridge behavior, frontend pages, billing, cloud host sales, or direct plugin-to-run/plugin-to-platform bypasses.