@ucsandman/legcli 0.8.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 (110) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/NOTICE +8 -0
  3. package/README.md +601 -560
  4. package/bin/fake-agent.mjs +4 -4
  5. package/bin/leg.mjs +21 -12
  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/board-guide.md +13 -0
  12. package/docs/cli-contracts.md +22 -1
  13. package/docs/concepts.md +42 -3
  14. package/docs/configuration.md +22 -1
  15. package/docs/faq.md +19 -0
  16. package/docs/getting-started.md +272 -251
  17. package/docs/harness.md +319 -0
  18. package/fixtures/verified.json +1 -1
  19. package/package.json +7 -3
  20. package/scripts/build-docs-site.mjs +11 -4
  21. package/scripts/check-branding.mjs +118 -0
  22. package/scripts/check-claims.mjs +1 -1
  23. package/scripts/license-sign.mjs +1 -1
  24. package/scripts/limits-table.mjs +1 -1
  25. package/scripts/live-limits.mjs +1 -1
  26. package/scripts/npm-publish-gate.mjs +114 -0
  27. package/scripts/probe.mjs +4 -3
  28. package/scripts/seed-fake-cards.mjs +4 -3
  29. package/scripts/seed-floor-board.mjs +5 -4
  30. package/scripts/seed-wes-board.mjs +5 -4
  31. package/scripts/stripe-setup.mjs +1 -1
  32. package/scripts/sync-harness-engine.mjs +159 -0
  33. package/scripts/sync-leg-agents.mjs +127 -0
  34. package/src/accounts.mjs +1 -2
  35. package/src/adapters/codex.mjs +1 -1
  36. package/src/attach.mjs +75 -19
  37. package/src/auth.mjs +2 -2
  38. package/src/board/board.js +3 -3
  39. package/src/board/sessions.js +77 -3
  40. package/src/bundle.mjs +54 -8
  41. package/src/chain.mjs +1 -1
  42. package/src/contract.mjs +4 -3
  43. package/src/fsx.mjs +5 -2
  44. package/src/handoff.mjs +6 -6
  45. package/src/harness/cli.mjs +281 -0
  46. package/src/harness/fingerprint.mjs +68 -0
  47. package/src/harness/index.mjs +407 -0
  48. package/src/harness/registry.mjs +124 -0
  49. package/src/harness/vendor/agnostic-ai/LICENSE +21 -0
  50. package/src/harness/vendor/agnostic-ai/UPSTREAM.json +30 -0
  51. package/src/harness/vendor/agnostic-ai/core/safety/guards.json +96 -0
  52. package/src/harness/vendor/agnostic-ai/core/templates/targets.json +252 -0
  53. package/src/harness/vendor/agnostic-ai/engine/harness/README.md +199 -0
  54. package/src/harness/vendor/agnostic-ai/engine/harness/apply.cjs +247 -0
  55. package/src/harness/vendor/agnostic-ai/engine/harness/bundle.cjs +243 -0
  56. package/src/harness/vendor/agnostic-ai/engine/harness/capture.cjs +119 -0
  57. package/src/harness/vendor/agnostic-ai/engine/harness/common.cjs +375 -0
  58. package/src/harness/vendor/agnostic-ai/engine/harness/index.cjs +55 -0
  59. package/src/harness/vendor/agnostic-ai/engine/harness/sources/claude.cjs +330 -0
  60. package/src/harness/vendor/agnostic-ai/engine/harness/sources/codex.cjs +314 -0
  61. package/src/harness/vendor/agnostic-ai/engine/harness/status.cjs +171 -0
  62. package/src/harness/vendor/agnostic-ai/engine/harness/targets/agy.cjs +113 -0
  63. package/src/harness/vendor/agnostic-ai/engine/harness/targets/claude.cjs +158 -0
  64. package/src/harness/vendor/agnostic-ai/engine/harness/targets/codex.cjs +832 -0
  65. package/src/harness/vendor/agnostic-ai/engine/harness/targets/cursor.cjs +87 -0
  66. package/src/harness/vendor/agnostic-ai/engine/harness/targets/gemini.cjs +128 -0
  67. package/src/harness/vendor/agnostic-ai/engine/harness/targets/generic.cjs +424 -0
  68. package/src/harness/vendor/agnostic-ai/engine/harness/toml.cjs +149 -0
  69. package/src/harness/vendor/agnostic-ai/engine/hooks/shim.cjs +431 -0
  70. package/src/hook.mjs +49 -49
  71. package/src/land.mjs +7 -35
  72. package/src/launcher.mjs +38 -26
  73. package/src/ledger.mjs +6 -6
  74. package/src/license.mjs +10 -9
  75. package/src/live-capture.mjs +1 -1
  76. package/src/mergequeue.mjs +5 -5
  77. package/src/orchestrator.mjs +28 -4
  78. package/src/preferences.mjs +37 -3
  79. package/src/redact.mjs +1 -1
  80. package/src/resume.mjs +17 -15
  81. package/src/runner.mjs +2 -2
  82. package/src/scheduler.mjs +1 -1
  83. package/src/server.mjs +38 -10
  84. package/src/session-detail.mjs +15 -1
  85. package/src/sessions.mjs +6 -3
  86. package/src/share.mjs +2 -2
  87. package/src/stations/agent.mjs +1 -1
  88. package/src/sync/dashclaw.mjs +4 -4
  89. package/src/synthesis.mjs +165 -0
  90. package/src/taps/agy.mjs +2 -2
  91. package/src/taps/claude-usage.mjs +1 -1
  92. package/src/taps/claude.mjs +170 -170
  93. package/src/taps/codex.mjs +286 -286
  94. package/src/taps/grok.mjs +2 -2
  95. package/src/trust.mjs +205 -36
  96. package/src/usage.mjs +5 -1
  97. package/src/worktree.mjs +5 -4
  98. package/fixtures/live/agy/attempt-1-scratch-workspace.out.log +0 -1
  99. package/fixtures/live/agy/err.log +0 -0
  100. package/fixtures/live/agy/out.log +0 -1
  101. package/fixtures/live/agy/supervisor.log +0 -2
  102. package/fixtures/live/claude/err.log +0 -0
  103. package/fixtures/live/claude/out.log +0 -1
  104. package/fixtures/live/claude/supervisor.log +0 -2
  105. package/fixtures/live/codex/err.log +0 -1
  106. package/fixtures/live/codex/out.log +0 -8
  107. package/fixtures/live/codex/supervisor.log +0 -2
  108. package/fixtures/live/grok/err.log +0 -32
  109. package/fixtures/live/grok/out.log +0 -7
  110. package/fixtures/live/grok/supervisor.log +0 -2
package/CHANGELOG.md CHANGED
@@ -1,7 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.0 (2026-09-16)
4
+
5
+ - **The portable harness (`leg harness`), off by default.** A hand-off can now
6
+ carry the working environment with the task: the source agent's global rules
7
+ (imports inlined), identity, hooks, skills, subagents, slash commands, MCP
8
+ servers and permissions, rendered into the destination client's own files as
9
+ far as it can represent them, with every dropped item explained.
10
+ `leg harness enable` detects clients, captures, shows the plan and writes
11
+ only after consent; `status`, `inspect`, `check`, `explain`, `diff`,
12
+ `history` and `doctor` are read-only; `sync`, `capture`, `source`, `policy`
13
+ and `disable` are the writes. Policies `warn`, `sync` and `strict` decide
14
+ what an unattended hand-off may do; strict refuses a destination it cannot
15
+ make safe and tries the next option. Every written file carries
16
+ `GENERATED by Leg harness`, lives in a marked region or owned key inside
17
+ files you also own, is backed up before an overwrite and skipped when
18
+ hand-edited. Credentials never move (`${NAME}` references). The session
19
+ record, its timeline (`harness`, `harness_blocked`), the card ledger and the
20
+ board (a chip on the row, a **Harness** section in the drawer) show what
21
+ transferred. Source changes are fingerprinted so an unchanged environment
22
+ costs a few stat calls at a hand-off. Docs: `docs/harness.md`.
23
+ - **Engine.** The capture, bundle and apply engine is the Agnostic AI port
24
+ engine (MIT), vendored byte for byte under `src/harness/vendor/agnostic-ai/`
25
+ with its upstream commit and per-file hashes pinned; `npm test` refuses a
26
+ local edit. Attribution in `NOTICE`.
27
+ - **Existing installs are unchanged.** No client file is touched until
28
+ `leg harness enable`; `preferences.json` gains a `harness` key that reads as
29
+ off when absent.
30
+
31
+ ## 0.8.1 (2026-09-16)
32
+
33
+ - **Antigravity CLI (`agy`) workspace trust in worktrees and repos.** Leg writes
34
+ the folder trust record to `~/.gemini/antigravity-cli/settings.json`'s
35
+ `trustedWorkspaces` for both the repo root and the worktree directory, with
36
+ exact Windows drive and separator normalization matching Go's `runtime.memequal`
37
+ check so `leg agy` runs completely unattended without interactive trust prompts.
38
+ - **Board server resolution in worktrees.** Fixed board asset resolution when
39
+ Leg is executed from within a git worktree.
40
+
3
41
  ## 0.8.0 (2026-09-16)
4
42
 
43
+ - **The product is called Leg.** Website, CLI help, board logs and onboarding
44
+ copy say **Leg**; the command is `leg`; `legcli.com` is the domain, not the
45
+ product name. `leg up` prefixes lines with `[leg]`. Historical changelog
46
+ entries keep the previous name.
5
47
  - **Grok is a supervised and handoff agent.** `leg grok` starts Grok the same
6
48
  way `leg claude`, `leg codex` and `leg agy` start those agents: board
7
49
  alongside, usage tracking, and a live context handoff bundle. At the limit
@@ -11,6 +53,9 @@
11
53
  and agy, `--ask-for-approval never` for Codex, `--always-approve` for Grok).
12
54
  Opt out with `--no-auto-approve`, `LEG_AUTO_APPROVE=0` /
13
55
  `LEG_NO_AUTO_APPROVE=1`, or `"auto_approve": false` in `preferences.json`.
56
+ - **`leg-agents` is the unscoped alias installer.** It pins the same version of
57
+ `@ucsandman/legcli` and exposes the same `leg` binary. CI publishes both
58
+ packages together; `npm test` fails if their versions drift.
14
59
 
15
60
  ## 0.7.0 (2026-09-15)
16
61
 
package/NOTICE CHANGED
@@ -2,3 +2,11 @@ Portions of this software (src/runner.mjs, src/ledger.mjs, src/git-snapshot.mjs
2
2
  and their tests) were ported on 2026-09-10 from a private ucsandman repository
3
3
  (team tooling) under the MIT license; that code is included here under the Leg License Agreement (see LICENSE), which its author also holds. Telegram delivery, chat identifiers,
4
4
  and machine-specific paths were removed in the port.
5
+
6
+ The portable-harness engine under src/harness/vendor/agnostic-ai/ is the
7
+ Agnostic AI port engine (https://github.com/ucsandman/Agnostic-AI), copyright
8
+ (c) 2026 Wes Sander, included byte for byte under the MIT License, whose full
9
+ text is in src/harness/vendor/agnostic-ai/LICENSE. That copy is not
10
+ relicensed: it stays MIT, and its upstream commit and per-file hashes are
11
+ recorded in src/harness/vendor/agnostic-ai/UPSTREAM.json. Leg's own
12
+ harness code (src/harness/*.mjs) is under the Leg License Agreement.