@ucsandman/legcli 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/NOTICE +8 -0
  3. package/README.md +601 -558
  4. package/bin/fake-agent.mjs +4 -4
  5. package/bin/leg.mjs +64 -34
  6. package/docs/DECISIONS.md +20 -2
  7. package/docs/ERRORS.md +71 -0
  8. package/docs/README.md +2 -0
  9. package/docs/REUSE.md +1 -1
  10. package/docs/VOCABULARY.md +21 -0
  11. package/docs/adapters.md +17 -3
  12. package/docs/board-guide.md +13 -0
  13. package/docs/cli-contracts.md +57 -3
  14. package/docs/concepts.md +42 -3
  15. package/docs/configuration.md +42 -2
  16. package/docs/faq.md +19 -0
  17. package/docs/getting-started.md +272 -251
  18. package/docs/harness.md +319 -0
  19. package/fixtures/limits/grok/grok-rate-limit.json +11 -0
  20. package/fixtures/live/agy/limit-agy-resource-exhausted.json +11 -0
  21. package/fixtures/verified.json +1 -1
  22. package/package.json +8 -4
  23. package/scripts/build-docs-site.mjs +15 -7
  24. package/scripts/check-branding.mjs +118 -0
  25. package/scripts/check-claims.mjs +1 -1
  26. package/scripts/license-sign.mjs +1 -1
  27. package/scripts/limits-table.mjs +1 -1
  28. package/scripts/live-limits.mjs +1 -1
  29. package/scripts/npm-publish-gate.mjs +114 -0
  30. package/scripts/probe.mjs +4 -3
  31. package/scripts/seed-fake-cards.mjs +4 -3
  32. package/scripts/seed-floor-board.mjs +5 -4
  33. package/scripts/seed-wes-board.mjs +5 -4
  34. package/scripts/stripe-setup.mjs +1 -1
  35. package/scripts/sync-harness-engine.mjs +159 -0
  36. package/scripts/sync-leg-agents.mjs +127 -0
  37. package/src/accounts.mjs +10 -2
  38. package/src/adapters/codex.mjs +1 -1
  39. package/src/adapters/grok.mjs +4 -7
  40. package/src/attach.mjs +162 -37
  41. package/src/auth.mjs +2 -2
  42. package/src/board/board.css +45 -17
  43. package/src/board/board.js +4 -4
  44. package/src/board/floor.js +2 -2
  45. package/src/board/sessions.js +181 -38
  46. package/src/bundle.mjs +54 -8
  47. package/src/chain.mjs +1 -1
  48. package/src/contract.mjs +4 -3
  49. package/src/fsx.mjs +5 -2
  50. package/src/handoff.mjs +6 -6
  51. package/src/harness/cli.mjs +281 -0
  52. package/src/harness/fingerprint.mjs +68 -0
  53. package/src/harness/index.mjs +407 -0
  54. package/src/harness/registry.mjs +124 -0
  55. package/src/harness/vendor/agnostic-ai/LICENSE +21 -0
  56. package/src/harness/vendor/agnostic-ai/UPSTREAM.json +30 -0
  57. package/src/harness/vendor/agnostic-ai/core/safety/guards.json +96 -0
  58. package/src/harness/vendor/agnostic-ai/core/templates/targets.json +252 -0
  59. package/src/harness/vendor/agnostic-ai/engine/harness/README.md +199 -0
  60. package/src/harness/vendor/agnostic-ai/engine/harness/apply.cjs +247 -0
  61. package/src/harness/vendor/agnostic-ai/engine/harness/bundle.cjs +243 -0
  62. package/src/harness/vendor/agnostic-ai/engine/harness/capture.cjs +119 -0
  63. package/src/harness/vendor/agnostic-ai/engine/harness/common.cjs +375 -0
  64. package/src/harness/vendor/agnostic-ai/engine/harness/index.cjs +55 -0
  65. package/src/harness/vendor/agnostic-ai/engine/harness/sources/claude.cjs +330 -0
  66. package/src/harness/vendor/agnostic-ai/engine/harness/sources/codex.cjs +314 -0
  67. package/src/harness/vendor/agnostic-ai/engine/harness/status.cjs +171 -0
  68. package/src/harness/vendor/agnostic-ai/engine/harness/targets/agy.cjs +113 -0
  69. package/src/harness/vendor/agnostic-ai/engine/harness/targets/claude.cjs +158 -0
  70. package/src/harness/vendor/agnostic-ai/engine/harness/targets/codex.cjs +832 -0
  71. package/src/harness/vendor/agnostic-ai/engine/harness/targets/cursor.cjs +87 -0
  72. package/src/harness/vendor/agnostic-ai/engine/harness/targets/gemini.cjs +128 -0
  73. package/src/harness/vendor/agnostic-ai/engine/harness/targets/generic.cjs +424 -0
  74. package/src/harness/vendor/agnostic-ai/engine/harness/toml.cjs +149 -0
  75. package/src/harness/vendor/agnostic-ai/engine/hooks/shim.cjs +431 -0
  76. package/src/hook.mjs +49 -49
  77. package/src/land.mjs +660 -47
  78. package/src/launcher.mjs +40 -27
  79. package/src/ledger.mjs +6 -6
  80. package/src/license.mjs +10 -9
  81. package/src/live-capture.mjs +1 -1
  82. package/src/mergequeue.mjs +6 -6
  83. package/src/orchestrator.mjs +28 -4
  84. package/src/preferences.mjs +63 -9
  85. package/src/redact.mjs +1 -1
  86. package/src/resume.mjs +17 -15
  87. package/src/runner.mjs +3 -3
  88. package/src/scheduler.mjs +1 -1
  89. package/src/server.mjs +69 -20
  90. package/src/session-detail.mjs +15 -1
  91. package/src/sessions.mjs +9 -5
  92. package/src/share.mjs +2 -2
  93. package/src/stations/agent.mjs +1 -1
  94. package/src/sync/dashclaw.mjs +4 -4
  95. package/src/synthesis.mjs +165 -0
  96. package/src/taps/agy.mjs +2 -2
  97. package/src/taps/claude-usage.mjs +1 -1
  98. package/src/taps/claude.mjs +170 -170
  99. package/src/taps/codex.mjs +286 -286
  100. package/src/taps/grok.mjs +251 -0
  101. package/src/trust.mjs +205 -36
  102. package/src/usage.mjs +5 -1
  103. package/src/worktree.mjs +5 -4
  104. package/fixtures/live/agy/attempt-1-scratch-workspace.out.log +0 -1
  105. package/fixtures/live/agy/err.log +0 -0
  106. package/fixtures/live/agy/out.log +0 -1
  107. package/fixtures/live/agy/supervisor.log +0 -2
  108. package/fixtures/live/claude/err.log +0 -0
  109. package/fixtures/live/claude/out.log +0 -1
  110. package/fixtures/live/claude/supervisor.log +0 -2
  111. package/fixtures/live/codex/err.log +0 -1
  112. package/fixtures/live/codex/out.log +0 -8
  113. package/fixtures/live/codex/supervisor.log +0 -2
  114. package/fixtures/live/grok/err.log +0 -32
  115. package/fixtures/live/grok/out.log +0 -7
  116. package/fixtures/live/grok/supervisor.log +0 -2
@@ -1 +0,0 @@
1
- {"duration_api_ms":7804,"stop_reason":"end_turn","session_id":"d9e19d78-1502-4f88-8ded-81c5bbbda8c2","total_cost_usd":1.0015022500000001,"usage":{"input_tokens":34,"cache_creation_input_tokens":48486,"cache_read_input_tokens":47217,"output_tokens":372,"output_tokens_details":{"thinking_tokens":0},"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":48486,"ephemeral_5m_input_tokens":0},"inference_geo":"not_available","iterations":[{"input_tokens":32,"output_tokens":45,"cache_read_input_tokens":47217,"cache_creation_input_tokens":1269,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":1269},"type":"message"}],"speed":"standard"},"modelUsage":{"claude-haiku-4-5-20251001":{"inputTokens":948,"outputTokens":18,"cacheReadInputTokens":0,"cacheCreationInputTokens":0,"webSearchRequests":0,"costUSD":0.0010379999999999999,"contextWindow":200000,"maxOutputTokens":32000,"thinkingTokens":0,"canonicalModel":"claude-haiku-4-5","provider":"firstParty","costBasis":"list"},"claude-fable-5-1":{"inputTokens":34,"outputTokens":372,"cacheReadInputTokens":47217,"cacheCreationInputTokens":48486,"webSearchRequests":0,"costUSD":1.00046425,"contextWindow":1000000,"maxOutputTokens":64000,"thinkingTokens":0,"canonicalModel":"claude-fable-5-1","provider":"firstParty","costBasis":"list"}},"permission_denials":[],"terminal_reason":"completed","fast_mode_state":"off","fast_mode_disabled_reason":"sdk_opt_in_required","subagent_stats":{"spawned":0,"requested":{"background":0,"foreground":0,"unset":0},"started_in_background":0,"max_depth":0,"spawned_by_subagents":0,"completed":0,"failed":0,"killed":{"parent":0,"user":0,"system":0},"refused":{"depth_limit":0,"concurrency_limit":0,"budget":0},"by_type":{}},"is_error":false,"num_turns":3,"subtype":"success","api_error_status":null,"result":"Done. Both files exist:\n\n- `hello-claude.txt` contains `hi`\n- `.baton/DONE` contains `done`","ttft_ms":2791,"type":"result","duration_ms":11899,"uuid":"d70f3d4c-5a7f-4675-a734-d05edf37b1ed","ttft_stream_ms":1846,"time_to_request_ms":338,"first_content_frame_ms":1846,"queued_turn_count":0,"result_index":0}
@@ -1,2 +0,0 @@
1
- 2026-09-11T00:33:13.404Z spawning leg: adapter=claude run=1 mode=acceptEdits cwd=~\AppData\Local\Temp\claude\C--Projects\49952fac-5ff4-486c-8395-9973cebdfdcb\scratchpad\toy-probe
2
- 2026-09-11T00:33:33.400Z leg exited code 0, session d9e19d78-1502-4f88-8ded-81c5bbbda8c2
@@ -1 +0,0 @@
1
- Reading additional input from stdin...
@@ -1,8 +0,0 @@
1
- {"type":"thread.started","thread_id":"01a08de2-7611-7ff1-b0da-1e6e2cb7ca90"}
2
- {"type":"turn.started"}
3
- {"type":"item.completed","item":{"id":"item_0","type":"error","message":"Skill descriptions were shortened to fit the skills context budget. Codex can still see every skill, but some descriptions are shorter. Disable unused skills or plugins to leave more room for the rest."}}
4
- {"type":"item.completed","item":{"id":"item_1","type":"agent_message","text":"`New-Item -ItemType File -Path hello-codex.txt -Value hi -Force` and `Set-Content` via `New-Item` in `.baton` (creating it only if missing), then writing `.baton/DONE` as `done`; I’m applying it now."}}
5
- {"type":"item.started","item":{"id":"item_2","type":"command_execution","command":"\"~\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps\\\\pwsh.exe\" -Command '$ErrorActionPreference = '\"'Stop'; Set-Content -Path .\\\\hello-codex.txt -NoNewline -Value 'hi'; if (-not (Test-Path .\\\\.baton)) { New-Item -ItemType Directory -Path .\\\\.baton | Out-Null }; Set-Content -Path .\\\\.baton\\\\DONE -NoNewline -Value 'done'\"","aggregated_output":"","exit_code":null,"status":"in_progress"}}
6
- {"type":"item.completed","item":{"id":"item_2","type":"command_execution","command":"\"~\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps\\\\pwsh.exe\" -Command '$ErrorActionPreference = '\"'Stop'; Set-Content -Path .\\\\hello-codex.txt -NoNewline -Value 'hi'; if (-not (Test-Path .\\\\.baton)) { New-Item -ItemType Directory -Path .\\\\.baton | Out-Null }; Set-Content -Path .\\\\.baton\\\\DONE -NoNewline -Value 'done'\"","aggregated_output":"","exit_code":0,"status":"completed"}}
7
- {"type":"item.completed","item":{"id":"item_3","type":"agent_message","text":"Done. \n`hello-codex.txt` now contains exactly `hi`, and `.baton/DONE` contains exactly `done`."}}
8
- {"type":"turn.completed","usage":{"input_tokens":58585,"cached_input_tokens":10880,"cache_write_input_tokens":0,"output_tokens":853,"reasoning_output_tokens":650}}
@@ -1,2 +0,0 @@
1
- 2026-09-11T00:33:42.787Z spawning leg: adapter=codex run=1 mode=workspace-write cwd=~\AppData\Local\Temp\claude\C--Projects\49952fac-5ff4-486c-8395-9973cebdfdcb\scratchpad\toy-probe
2
- 2026-09-11T00:34:10.757Z leg exited code 0, session 01a08de2-7611-7ff1-b0da-1e6e2cb7ca90
@@ -1,32 +0,0 @@
1
-
2
- To sign in, open this URL in your browser:
3
-
4
- https://accounts.x.ai/oauth2/device?user_code=S3S6-5YEF
5
-
6
- Confirm this code in your browser:
7
-
8
- S3S6-5YEF
9
-
10
- Only continue with a code you requested. Don't share it with anyone.
11
-
12
- Waiting for authorization...
13
- 2026-09-11T00:37:22.879885Z ERROR Skipping MCP tool with invalid name tool_name=mole__mole.aggregate server=mole reason=tool name 'mole__mole.aggregate' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
14
- 2026-09-11T00:37:22.879980Z ERROR Skipping MCP tool with invalid name tool_name=mole__mole.citations server=mole reason=tool name 'mole__mole.citations' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
15
- 2026-09-11T00:37:22.880166Z ERROR Skipping MCP tool with invalid name tool_name=mole__mole.claim_add server=mole reason=tool name 'mole__mole.claim_add' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
16
- 2026-09-11T00:37:22.880194Z ERROR Skipping MCP tool with invalid name tool_name=mole__mole.claims_list server=mole reason=tool name 'mole__mole.claims_list' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
17
- 2026-09-11T00:37:22.880215Z ERROR Skipping MCP tool with invalid name tool_name=mole__mole.connect_list server=mole reason=tool name 'mole__mole.connect_list' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
18
- 2026-09-11T00:37:22.880237Z ERROR Skipping MCP tool with invalid name tool_name=mole__mole.dataset server=mole reason=tool name 'mole__mole.dataset' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
19
- 2026-09-11T00:37:22.880264Z ERROR Skipping MCP tool with invalid name tool_name=mole__mole.edge_add server=mole reason=tool name 'mole__mole.edge_add' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
20
- 2026-09-11T00:37:22.880280Z ERROR Skipping MCP tool with invalid name tool_name=mole__mole.fetch server=mole reason=tool name 'mole__mole.fetch' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
21
- 2026-09-11T00:37:22.880298Z ERROR Skipping MCP tool with invalid name tool_name=mole__mole.pairs_candidates server=mole reason=tool name 'mole__mole.pairs_candidates' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
22
- 2026-09-11T00:37:22.880319Z ERROR Skipping MCP tool with invalid name tool_name=mole__mole.rows_add server=mole reason=tool name 'mole__mole.rows_add' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
23
- 2026-09-11T00:37:22.880339Z ERROR Skipping MCP tool with invalid name tool_name=mole__mole.search server=mole reason=tool name 'mole__mole.search' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
24
- 2026-09-11T00:37:22.880354Z ERROR Skipping MCP tool with invalid name tool_name=mole__mole.session_close server=mole reason=tool name 'mole__mole.session_close' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
25
- 2026-09-11T00:37:22.880412Z ERROR Skipping MCP tool with invalid name tool_name=mole__mole.session_open server=mole reason=tool name 'mole__mole.session_open' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
26
- 2026-09-11T00:37:22.880437Z ERROR Skipping MCP tool with invalid name tool_name=mole__mole.verify_quote server=mole reason=tool name 'mole__mole.verify_quote' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
27
- 2026-09-11T00:37:22.880460Z ERROR Skipping MCP tool with invalid name tool_name=mole__research.ask server=mole reason=tool name 'mole__research.ask' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
28
- 2026-09-11T00:37:22.880482Z ERROR Skipping MCP tool with invalid name tool_name=mole__research.cancel server=mole reason=tool name 'mole__research.cancel' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
29
- 2026-09-11T00:37:22.880502Z ERROR Skipping MCP tool with invalid name tool_name=mole__research.report server=mole reason=tool name 'mole__research.report' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
30
- 2026-09-11T00:37:22.880519Z ERROR Skipping MCP tool with invalid name tool_name=mole__research.result server=mole reason=tool name 'mole__research.result' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
31
- 2026-09-11T00:37:22.880541Z ERROR Skipping MCP tool with invalid name tool_name=mole__research.sessions.list server=mole reason=tool name 'mole__research.sessions.list' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
32
- 2026-09-11T00:37:22.880557Z ERROR Skipping MCP tool with invalid name tool_name=mole__research.status server=mole reason=tool name 'mole__research.status' is invalid — must match ^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$ (start with letter/underscore, max 64 chars)
@@ -1,7 +0,0 @@
1
- {
2
- "text": "Creating `hello-grok.txt` and `.baton/DONE`.",
3
- "stopReason": "Cancelled",
4
- "sessionId": "01a08de5-c64c-7a31-ac58-1c11c2dd7332",
5
- "requestId": "fb815c5a-2e96-47c4-8bcc-30669f38e844",
6
- "thought": "The user wants me to:\n\n1. Create a file named hello-grok.txt in the current directory containing exactly the word hi"
7
- }
@@ -1,2 +0,0 @@
1
- 2026-09-11T00:36:48.222Z spawning leg: adapter=grok run=1 mode=acceptEdits cwd=~\AppData\Local\Temp\claude\C--Projects\49952fac-5ff4-486c-8395-9973cebdfdcb\scratchpad\toy-probe
2
- 2026-09-11T00:37:45.845Z leg exited code 0, session 01a08de5-c64c-7a31-ac58-1c11c2dd7332