loadout-ai 0.8.0 → 0.9.1

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 (98) hide show
  1. package/CHANGELOG.md +136 -0
  2. package/README.md +149 -309
  3. package/SECURITY.md +21 -1
  4. package/catalog/discovered.json +29122 -25325
  5. package/catalog/packages.json +4 -4
  6. package/dist/src/cli.js +12 -4
  7. package/dist/src/commands/agents.js +3 -1
  8. package/dist/src/commands/catalog-candidate.js +150 -0
  9. package/dist/src/commands/catalog-workflows.js +365 -0
  10. package/dist/src/commands/catalog.js +9 -354
  11. package/dist/src/commands/coordinate.js +730 -0
  12. package/dist/src/commands/coordination-discussions.js +218 -0
  13. package/dist/src/commands/coordination-sessions.js +197 -0
  14. package/dist/src/commands/inventory.js +4 -2
  15. package/dist/src/core/{routing → agents}/model-config.js +7 -2
  16. package/dist/src/core/catalog/catalog.js +1 -0
  17. package/dist/src/core/catalog/registry.js +5 -19
  18. package/dist/src/core/coordination/adapters/claude-code.js +154 -0
  19. package/dist/src/core/coordination/adapters/codex.js +160 -0
  20. package/dist/src/core/coordination/adapters/types.js +64 -0
  21. package/dist/src/core/coordination/auth.js +59 -0
  22. package/dist/src/core/coordination/auto-contract.js +457 -0
  23. package/dist/src/core/coordination/bridge-lease.js +79 -0
  24. package/dist/src/core/coordination/conflict-preview.js +167 -0
  25. package/dist/src/core/coordination/contract-diff.js +106 -0
  26. package/dist/src/core/coordination/coordinator.js +552 -0
  27. package/dist/src/core/coordination/crash-recovery.js +169 -0
  28. package/dist/src/core/coordination/daemon.js +670 -0
  29. package/dist/src/core/coordination/discussion-pipeline.js +313 -0
  30. package/dist/src/core/coordination/discussion.js +340 -0
  31. package/dist/src/core/coordination/events.js +161 -0
  32. package/dist/src/core/coordination/git-ownership.js +217 -0
  33. package/dist/src/core/coordination/http-api.js +118 -0
  34. package/dist/src/core/coordination/interrupt-policy.js +89 -0
  35. package/dist/src/core/coordination/lock.js +140 -0
  36. package/dist/src/core/coordination/mcp-server.js +424 -0
  37. package/dist/src/core/coordination/quick-start.js +200 -0
  38. package/dist/src/core/coordination/redaction.js +85 -0
  39. package/dist/src/core/coordination/replay.js +188 -0
  40. package/dist/src/core/coordination/retention.js +180 -0
  41. package/dist/src/core/coordination/runtime.js +21 -0
  42. package/dist/src/core/coordination/session-manager.js +366 -0
  43. package/dist/src/core/coordination/watcher.js +128 -0
  44. package/dist/src/core/{routing → delegation}/first-party-skills.js +25 -13
  45. package/dist/src/core/delegation/handoff-bundle.js +253 -0
  46. package/dist/src/core/delegation/handoff-templates.js +222 -0
  47. package/dist/src/core/delegation/handoff-verification.js +117 -0
  48. package/dist/src/core/delegation/handoff.js +537 -0
  49. package/dist/src/core/discovery/candidate-intelligence-evidence.js +108 -0
  50. package/dist/src/core/discovery/candidate-intelligence-types.js +1 -0
  51. package/dist/src/core/discovery/candidate-intelligence-validation.js +108 -0
  52. package/dist/src/core/discovery/candidate-intelligence.js +3 -214
  53. package/dist/src/core/discovery/community.js +12 -4
  54. package/dist/src/core/discovery/github-discovery.js +6 -2
  55. package/dist/src/core/discovery/private-discovery.js +6 -2
  56. package/dist/src/core/install/reconcile.js +1 -1
  57. package/dist/src/core/install/snapshot.js +24 -5
  58. package/dist/src/core/install/uninstall.js +39 -3
  59. package/dist/src/core/reporting/cli-guide.js +9 -5
  60. package/dist/src/core/reporting/completion.js +43 -38
  61. package/dist/src/core/reporting/doctor.js +1 -1
  62. package/dist/src/core/runtime/bounded-json.js +65 -0
  63. package/dist/src/core/runtime/github.js +30 -16
  64. package/dist/src/core/runtime/mcp-recipes.js +1 -1
  65. package/dist/src/core/workspace/active-policy.js +1 -1
  66. package/docs/DEMO_SCRIPT.md +19 -23
  67. package/docs/DISCOVERED.md +250 -251
  68. package/docs/FEATURE_TEST_MATRIX.md +30 -15
  69. package/docs/LIVE_COLLABORATION.md +283 -0
  70. package/docs/REFERENCE.md +263 -0
  71. package/docs/RELEASE_REVIEW.md +1 -1
  72. package/docs/TESTING.md +17 -1
  73. package/docs/USER_TEST_GUIDE.md +211 -3
  74. package/docs/assets/loadout-discover-activate.webp +0 -0
  75. package/docs/assets/loadout-handoff-coordinate.webp +0 -0
  76. package/docs/assets/loadout-social-preview.png +0 -0
  77. package/docs/decisions/001-coordination-jsonl-locking.md +35 -0
  78. package/docs/decisions/002-local-daemon-authentication.md +32 -0
  79. package/docs/decisions/003-bounded-agent-discussions.md +91 -0
  80. package/docs/evidence/coordination-provider-check-2026-09-05.md +33 -0
  81. package/docs/specs/BOUNDED_AGENT_DISCUSSIONS.md +169 -0
  82. package/docs/specs/HANDOFF_CONTEXT_BUNDLES.md +139 -0
  83. package/docs/specs/HANDOFF_VERIFICATION.md +83 -0
  84. package/docs/superpowers/plans/2026-09-03-coordination-hardening.md +231 -0
  85. package/docs/superpowers/plans/2026-09-03-release-readiness.md +232 -0
  86. package/docs/superpowers/plans/2026-09-04-bounded-agent-discussions.md +121 -0
  87. package/docs/superpowers/plans/2026-09-04-handoff-context-bundles.md +109 -0
  88. package/docs/superpowers/plans/2026-09-04-handoff-verification.md +56 -0
  89. package/docs/superpowers/plans/2026-09-05-pre-release-hardening.md +175 -0
  90. package/docs/superpowers/plans/2026-09-05-public-readiness.md +20 -0
  91. package/package.json +15 -5
  92. package/skills/loadout-handoff/SKILL.md +291 -0
  93. package/dist/src/core/routing/handoff.js +0 -314
  94. package/dist/src/core/routing/policy.js +0 -147
  95. package/dist/src/core/routing/route.js +0 -411
  96. package/docs/assets/loadout-workflow.png +0 -0
  97. package/skills/loadout-router/SKILL.md +0 -85
  98. /package/dist/src/core/{routing → agents}/credentials.js +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,142 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ### Added
6
+
7
+ - Snapshot capture and restore preserve Unix file permission modes, with
8
+ validation that rejects out-of-range values and tolerance for legacy
9
+ snapshots missing the `mode` field.
10
+ - Provider cancellation via `AbortSignal` on adapter `start()` and
11
+ `submitTurn()` methods. Cancelled turns release the busy flag so new
12
+ turns can proceed.
13
+ - Opt-in `loadout handoff ... --bundle <paths...>` context snapshots give the
14
+ receiving agent exact source context, with versioned references and visible
15
+ truncation metadata, while preserving all existing handoff messages.
16
+ - Evidence-backed handoff completion with human criteria, optional shell-free
17
+ executable/JSON argv checks, bounded pass/fail evidence, and failed checks
18
+ that remain pending instead of being reported done.
19
+ - Reusable built-in and project-local handoff templates with positional
20
+ placeholder expansion, bounded context bundles, and verification defaults.
21
+ - Preview-first coordination setup, exact cross-boundary contract detection,
22
+ Git-author ownership mappings, and idempotent discussion-to-implementation
23
+ plans linked to their generated handoff tasks.
24
+
25
+ ### Changed
26
+
27
+ - Log compaction preserves ownership, contract, and decision state by
28
+ extracting the latest checkpoint for each state key before removing events.
29
+ Double compaction is stable.
30
+ - Auto-detected contracts handle mixed `import { A, type B }` syntax and
31
+ reject incomplete multi-line `const` declarations as unpublishable instead
32
+ of emitting truncated contract bodies.
33
+ - Auto-detected contracts preserve exact supported declarations, expose a
34
+ source hash, distinguish current from stale revisions, and require both
35
+ `--publish` and `--yes`. Unsupported declarations require manual completion.
36
+ - Git ownership confidence includes every author touching a directory and maps
37
+ agent identities explicitly with `agent=Git Author`.
38
+ - Verification processes run outside the handoff log lock, so other agents can
39
+ continue sending tasks while a long check runs; completion remains atomic.
40
+
41
+ ### Fixed
42
+
43
+ - Coordination lock recovery uses atomic rename so concurrent recoverers
44
+ cannot both delete and recreate the lock file. Post-acquisition token
45
+ verification ensures the winner still holds the lock after write.
46
+ - Normalized contract-scanner paths across Windows and POSIX platforms and made
47
+ the verification cwd test independent of Windows short-path spelling.
48
+ - Removed generated directories and redundant parent/child claims from
49
+ one-command coordination setup.
50
+
51
+ ### Security
52
+
53
+ - Handoff bundles are limited to 20 project-relative text files, 32 KiB per
54
+ file and 50 KiB total. Creation and reading reject symlinks, traversal,
55
+ binary files, and internal `.git/` or `.handoff/` sources; common secrets are
56
+ redacted before owner-only atomic persistence.
57
+ - Handoff text and completion output are redacted at the canonical write
58
+ boundary. Verification output is capped at 8 KiB per stream and command
59
+ execution requires `--run-verification`, is timeout-bounded, project-scoped,
60
+ and shell-free.
61
+ - Template names are validated before every read or delete so traversal cannot
62
+ escape `.handoff/templates/`.
63
+
64
+ ## 0.9.0 - 2026-09-03
65
+
66
+ ### Removed
67
+
68
+ - Model routing (`loadout route`, policy files, model-config routing). The
69
+ feature was too subjective and prices rotted within weeks. Handoff and the
70
+ factual coordination protocol replace model-selection advice.
71
+
72
+ ### Changed
73
+
74
+ - Moved handoff code from `src/core/routing/` to `src/core/delegation/`, and
75
+ model/credential configuration to `src/core/agents/`. API-access parsing
76
+ remains in `src/core/routing/access.ts` because it still governs setup choices.
77
+ - Renamed the `loadout-router` first-party skill to `loadout-handoff`, stripped
78
+ model advice, and focused it on delegation and factual project coordination.
79
+ - All JSON HTTP responses are now streamed through a bounded reader with
80
+ per-endpoint byte caps and timeouts. Oversized or timed-out responses
81
+ are rejected before parsing.
82
+ - Release workflow runs `verify:full` (includes coverage) instead of `verify`.
83
+ - npm description and keywords aligned with the project's actual scope.
84
+
85
+ ### Fixed
86
+
87
+ - Validated every handoff log entry against a strict Zod schema at parse time.
88
+ Schema-invalid lines are reported as corrupt without hiding valid neighbors.
89
+ - Tracking an existing provider session no longer submits an implicit snapshot
90
+ turn when automatic delivery is disabled. Provider quota is now spent only by
91
+ an explicit start/send operation or the opt-in bridge.
92
+ - Coordination tests now exercise Windows with platform-appropriate permission
93
+ assertions and launch the MCP test process through Node rather than a POSIX
94
+ package shim.
95
+
96
+ ### Added
97
+
98
+ - Bounded Claude Code ↔ Codex design rooms via `loadout coord discuss`. The two
99
+ providers alternate proposal and critique turns on one technical question,
100
+ then record a linked public transcript, final decision, alternatives, and
101
+ unresolved disagreement. Fresh and explicit existing sessions are supported.
102
+ - Discussion safety controls: exact preflight turn accounting, 1-8 rounds, a
103
+ hard paid-turn budget, a bounded per-turn timeout, sequential reply IDs,
104
+ no-edit/no-tool prompts, singleton bridge ownership, kill-switch checks, and
105
+ visible failure without silent provider retries.
106
+
107
+ - Live coordination module (`loadout coordinate`) with typed events for
108
+ contracts, file ownership, decisions, progress updates, and acknowledgements.
109
+ Events use monotonic sequence numbers and cursor-based reads so reconnecting
110
+ agents never miss a message.
111
+ - `loadout serve` starts an MCP server exposing the same coordination tools
112
+ so both Claude Code and Codex can connect to a shared project coordinator.
113
+ The MCP runtime is packaged and smoke-tested as a normal dependency.
114
+ - Provider-session bridge commands backed by Claude Code's print-mode CLI and
115
+ the official Codex SDK. The bridge resumes explicit session IDs and delivers
116
+ relevant events as follow-up turns at safe boundaries; it does not claim
117
+ mid-turn injection or shared private context.
118
+ - Bridge safeguards: one process per project, concurrent cross-provider
119
+ delivery, passive updates, an automatic-turn cap, untrusted-data framing,
120
+ owner-only session state, and provider responses that are displayed but not
121
+ persisted.
122
+ - `loadout daemon start` runs a local HTTP coordination server with REST API,
123
+ SSE push subscriptions, and a live web dashboard showing contracts, file
124
+ ownership, agent activity, and real-time event feed.
125
+ - Automatic secret redaction — API keys, tokens, passwords, JWTs, and other
126
+ credentials are stripped from coordination events at the canonical storage
127
+ boundary before CLI, MCP, or HTTP writes are persisted.
128
+ - Log retention and compaction (`loadout coord compact`) — configurable max
129
+ events and max age, atomic log rewrite with archived backup.
130
+ - Live file watcher (`loadout coord watch`) detects new coordination events
131
+ via `fs.watch` with sub-second latency, no daemon required.
132
+ - `loadout coord status` shows a colored terminal overview of ownership,
133
+ contracts, and acknowledgement state.
134
+ - Conflict preview (`loadout coord conflicts`) — before an agent writes, shows
135
+ what the other agent changed in the same files with git diffs.
136
+ - Contract diffing (`loadout coord diff`) — auto-generates a structured delta
137
+ when a contract revision bumps, showing exactly what changed.
138
+ - Coordination replay (`loadout coord replay`) — plays back the full
139
+ coordination timeline as a formatted narrative story.
140
+
5
141
  ## 0.8.0 - 2026-09-02
6
142
 
7
143
  ### Security