Feat/task chain v1 merge - #15
Merged
Merged
Conversation
Programmable Work Orders — Scout→Worker→Verifier→Archivist chain. - Define 8 TaskChain types (TaskChainInput, TaskChainResult, TaskChainError, etc.) - Add TaskChainRunner orchestrator (calls hireClaw, verifyReceipt, writeMemory) - Add POST /api/task-chain/run route with input validation + Bearer auth - Discriminated TaskChainOutcome: 200=TaskChainResult, 422=TaskChainError - Verification failure when required now correctly produces error + 422 - Receipt uses runtime shape (opaque Record), not stale Receipt type - storageBackend derived from indelibleEnabled config - OpenAPI: path + 8 schemas + 401/400/422/500 responses + securityScheme - 12 unit tests covering all 4 steps, failure modes, template mapping - 3 frozen v1 templates: verified_research, check_and_archive, monitor_and_escalate Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add task-chain.html — one-page work-order UI with: - Template picker (3 templates), task input, budget + toggles - Four role cards (Scout/Worker/Verifier/Archivist) with live state transitions - Outcome panel: result text, total sats, verification, receipt, memory ref - Error banner with step-specific failure display - Duplicate-click protection, no protocol jargon in UI copy - GET /task-chain route to serve the page Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reads API token from input field, sends Authorization header on fetch, persists token to localStorage for cross-session convenience. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
20 route-level tests covering auth, input validation, response shape, and error code specificity. Test plan updated with sections 1.13-1.14 and test count bumped to 154. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Route and tests now use the same validateTaskChainInput() from TaskChainRunner.ts. Removes duplicated validation logic that could drift between production and test code. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CAPABILITY_PARAM_KEY maps each template's capability to the correct handler param name (bsv_mentor→question, hash_commit→payload, peer_health_check→endpoint) so hireClaw sends the right field. - CLAWSATS_ALLOW_LOCALHOST=1 env var bypasses SSRF localhost block in isValidPeerEndpoint, enabling local multi-Claw testing. Validated end-to-end: two local Claws, Task Chain Scout→Worker→Verifier→Archivist all complete successfully via free trial path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Boots an actual Express server on an ephemeral port and exercises POST /api/task-chain/run through real HTTP: 401 auth rejection, 400 validation errors, 200 successful run with full response shape, and Content-Type verification. Addresses Codex review gap. 15 suites, 159 tests passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Task Chain V1 — 4-step orchestration (Scout→Worker→Verifier→Archivist) composing existing primitives (hireClaw, verifyReceipt, writeMemory). - 3 templates: verified_research, check_and_archive, monitor_and_escalate - Single front door: POST /api/task-chain/run - Shared validateTaskChainInput used by route and tests (no drift) - Capability param mapping (bsv_mentor→question, hash_commit→payload, etc.) - Single-page UI at /task-chain with 4-role card animation - OpenAPI spec for the endpoint - 159 tests across 15 suites (unit + HTTP integration) - CLAWSATS_ALLOW_LOCALHOST env var for local multi-Claw testing - Live-tested end-to-end with 2 local Claws via free trial path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.