supervisor-go: add ledger package with Append/Read APIs, tests; refactor CLI to use package; update README
This commit is contained in:
@@ -3,14 +3,30 @@
|
||||
Runnable stub demonstrating CognitiveOS control-plane concepts without
|
||||
an actual LLM.
|
||||
|
||||
## Run
|
||||
This directory now contains a small ledger package (ledger/) with Append
|
||||
and Read APIs and unit tests, plus a tiny CLI demo (main.go) that
|
||||
appends route/session/output events to a JSONL ledger.
|
||||
|
||||
go run . -ledger ./ledger.jsonl
|
||||
## Run (demo)
|
||||
|
||||
Then type requests and observe: - deterministic route decision -
|
||||
session_spawn + child_output_received - final_output_emitted
|
||||
Build or run the CLI:
|
||||
|
||||
go run . -ledger ./ledger.jsonl
|
||||
|
||||
Then type requests and observe the deterministic route decision,
|
||||
spawn/output events, and final output. The ledger file will be created
|
||||
as JSONL at the path you provide.
|
||||
|
||||
## Tests
|
||||
|
||||
Run the unit tests for the ledger package:
|
||||
|
||||
go test ./ledger
|
||||
|
||||
The tests create a temporary ledger file, append events, and validate
|
||||
read-back and hash chaining.
|
||||
|
||||
## Notes
|
||||
|
||||
- This is intentionally minimal and deterministic.
|
||||
- Replace `childWorkerStub` with real model calls later.
|
||||
- This is intentionally minimal and deterministic.
|
||||
- Replace `childWorkerStub` with real model calls later.
|
||||
|
||||
Reference in New Issue
Block a user