@jbarket/loomai 0.5.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 (176) hide show
  1. package/CHANGELOG.md +475 -0
  2. package/LICENSE +661 -0
  3. package/README.md +702 -0
  4. package/assets/demo.cast +396 -0
  5. package/assets/skill/SKILL.md +192 -0
  6. package/dist/backends/embedding-runtime.d.ts +39 -0
  7. package/dist/backends/embedding-runtime.js +265 -0
  8. package/dist/backends/episodes.d.ts +36 -0
  9. package/dist/backends/episodes.js +126 -0
  10. package/dist/backends/fastembed.d.ts +18 -0
  11. package/dist/backends/fastembed.js +95 -0
  12. package/dist/backends/glob.d.ts +10 -0
  13. package/dist/backends/glob.js +16 -0
  14. package/dist/backends/index.d.ts +6 -0
  15. package/dist/backends/index.js +78 -0
  16. package/dist/backends/migrations.d.ts +38 -0
  17. package/dist/backends/migrations.js +157 -0
  18. package/dist/backends/mmr.d.ts +45 -0
  19. package/dist/backends/mmr.js +82 -0
  20. package/dist/backends/proposals.d.ts +65 -0
  21. package/dist/backends/proposals.js +182 -0
  22. package/dist/backends/recall-log.d.ts +42 -0
  23. package/dist/backends/recall-log.js +143 -0
  24. package/dist/backends/retry.d.ts +29 -0
  25. package/dist/backends/retry.js +60 -0
  26. package/dist/backends/salience.d.ts +57 -0
  27. package/dist/backends/salience.js +186 -0
  28. package/dist/backends/sqlite-knowledge.d.ts +37 -0
  29. package/dist/backends/sqlite-knowledge.js +788 -0
  30. package/dist/backends/sqlite-vec.d.ts +64 -0
  31. package/dist/backends/sqlite-vec.js +737 -0
  32. package/dist/backends/ttl.d.ts +24 -0
  33. package/dist/backends/ttl.js +50 -0
  34. package/dist/backends/types.d.ts +562 -0
  35. package/dist/backends/types.js +8 -0
  36. package/dist/blocks/harness.d.ts +45 -0
  37. package/dist/blocks/harness.js +142 -0
  38. package/dist/blocks/model.d.ts +4 -0
  39. package/dist/blocks/model.js +56 -0
  40. package/dist/blocks/types.d.ts +40 -0
  41. package/dist/blocks/types.js +34 -0
  42. package/dist/categories.d.ts +16 -0
  43. package/dist/categories.js +29 -0
  44. package/dist/cli/args.d.ts +21 -0
  45. package/dist/cli/args.js +47 -0
  46. package/dist/cli/bootstrap.d.ts +2 -0
  47. package/dist/cli/bootstrap.js +214 -0
  48. package/dist/cli/doctor.d.ts +2 -0
  49. package/dist/cli/doctor.js +206 -0
  50. package/dist/cli/forget.d.ts +2 -0
  51. package/dist/cli/forget.js +97 -0
  52. package/dist/cli/harness.d.ts +2 -0
  53. package/dist/cli/harness.js +91 -0
  54. package/dist/cli/index.d.ts +2 -0
  55. package/dist/cli/index.js +127 -0
  56. package/dist/cli/inject.d.ts +2 -0
  57. package/dist/cli/inject.js +298 -0
  58. package/dist/cli/install.d.ts +2 -0
  59. package/dist/cli/install.js +137 -0
  60. package/dist/cli/io.d.ts +14 -0
  61. package/dist/cli/io.js +63 -0
  62. package/dist/cli/knowledge.d.ts +2 -0
  63. package/dist/cli/knowledge.js +216 -0
  64. package/dist/cli/memory.d.ts +2 -0
  65. package/dist/cli/memory.js +608 -0
  66. package/dist/cli/migrate.d.ts +2 -0
  67. package/dist/cli/migrate.js +116 -0
  68. package/dist/cli/recall.d.ts +2 -0
  69. package/dist/cli/recall.js +91 -0
  70. package/dist/cli/remember.d.ts +2 -0
  71. package/dist/cli/remember.js +111 -0
  72. package/dist/cli/serve.d.ts +2 -0
  73. package/dist/cli/serve.js +71 -0
  74. package/dist/cli/subcommands.d.ts +7 -0
  75. package/dist/cli/subcommands.js +11 -0
  76. package/dist/cli/tui/multi-select.d.ts +53 -0
  77. package/dist/cli/tui/multi-select.js +116 -0
  78. package/dist/cli/update-identity.d.ts +2 -0
  79. package/dist/cli/update-identity.js +90 -0
  80. package/dist/cli/update.d.ts +2 -0
  81. package/dist/cli/update.js +87 -0
  82. package/dist/cli/wake.d.ts +2 -0
  83. package/dist/cli/wake.js +53 -0
  84. package/dist/clients.d.ts +8 -0
  85. package/dist/clients.js +63 -0
  86. package/dist/config.d.ts +59 -0
  87. package/dist/config.js +160 -0
  88. package/dist/index.d.ts +15 -0
  89. package/dist/index.js +75 -0
  90. package/dist/injection/harnesses.d.ts +17 -0
  91. package/dist/injection/harnesses.js +51 -0
  92. package/dist/injection/render.d.ts +17 -0
  93. package/dist/injection/render.js +50 -0
  94. package/dist/injection/writer.d.ts +25 -0
  95. package/dist/injection/writer.js +118 -0
  96. package/dist/install/harnesses.d.ts +26 -0
  97. package/dist/install/harnesses.js +90 -0
  98. package/dist/install/names.d.ts +16 -0
  99. package/dist/install/names.js +36 -0
  100. package/dist/install/render.d.ts +18 -0
  101. package/dist/install/render.js +42 -0
  102. package/dist/install/skill-source.d.ts +1 -0
  103. package/dist/install/skill-source.js +11 -0
  104. package/dist/path-safety.d.ts +19 -0
  105. package/dist/path-safety.js +62 -0
  106. package/dist/server.d.ts +8 -0
  107. package/dist/server.js +571 -0
  108. package/dist/tools/append-maintenance-log.d.ts +52 -0
  109. package/dist/tools/append-maintenance-log.js +103 -0
  110. package/dist/tools/archive.d.ts +2 -0
  111. package/dist/tools/archive.js +21 -0
  112. package/dist/tools/bootstrap.d.ts +11 -0
  113. package/dist/tools/bootstrap.js +161 -0
  114. package/dist/tools/dossier.d.ts +1 -0
  115. package/dist/tools/dossier.js +102 -0
  116. package/dist/tools/eurorack-import.d.ts +47 -0
  117. package/dist/tools/eurorack-import.js +199 -0
  118. package/dist/tools/find-similar.d.ts +3 -0
  119. package/dist/tools/find-similar.js +26 -0
  120. package/dist/tools/forget.d.ts +6 -0
  121. package/dist/tools/forget.js +70 -0
  122. package/dist/tools/harness.d.ts +18 -0
  123. package/dist/tools/harness.js +54 -0
  124. package/dist/tools/identity-scaffold.d.ts +22 -0
  125. package/dist/tools/identity-scaffold.js +142 -0
  126. package/dist/tools/identity.d.ts +4 -0
  127. package/dist/tools/identity.js +226 -0
  128. package/dist/tools/knowledge-archive.d.ts +5 -0
  129. package/dist/tools/knowledge-archive.js +24 -0
  130. package/dist/tools/knowledge-history.d.ts +6 -0
  131. package/dist/tools/knowledge-history.js +55 -0
  132. package/dist/tools/knowledge-maintain.d.ts +9 -0
  133. package/dist/tools/knowledge-maintain.js +113 -0
  134. package/dist/tools/knowledge-merge.d.ts +8 -0
  135. package/dist/tools/knowledge-merge.js +40 -0
  136. package/dist/tools/knowledge-move.d.ts +10 -0
  137. package/dist/tools/knowledge-move.js +48 -0
  138. package/dist/tools/knowledge-purge.d.ts +5 -0
  139. package/dist/tools/knowledge-purge.js +20 -0
  140. package/dist/tools/knowledge-recall.d.ts +20 -0
  141. package/dist/tools/knowledge-recall.js +142 -0
  142. package/dist/tools/knowledge-restore.d.ts +4 -0
  143. package/dist/tools/knowledge-restore.js +24 -0
  144. package/dist/tools/knowledge-supersede.d.ts +6 -0
  145. package/dist/tools/knowledge-supersede.js +36 -0
  146. package/dist/tools/knowledge-verify.d.ts +8 -0
  147. package/dist/tools/knowledge-verify.js +39 -0
  148. package/dist/tools/knowledge-write.d.ts +25 -0
  149. package/dist/tools/knowledge-write.js +87 -0
  150. package/dist/tools/memory-audit.d.ts +3 -0
  151. package/dist/tools/memory-audit.js +47 -0
  152. package/dist/tools/memory-list.d.ts +4 -0
  153. package/dist/tools/memory-list.js +23 -0
  154. package/dist/tools/prune.d.ts +4 -0
  155. package/dist/tools/prune.js +28 -0
  156. package/dist/tools/recall.d.ts +4 -0
  157. package/dist/tools/recall.js +24 -0
  158. package/dist/tools/remember.d.ts +10 -0
  159. package/dist/tools/remember.js +43 -0
  160. package/dist/tools/restore.d.ts +2 -0
  161. package/dist/tools/restore.js +20 -0
  162. package/dist/tools/update-identity.d.ts +34 -0
  163. package/dist/tools/update-identity.js +194 -0
  164. package/dist/tools/update.d.ts +2 -0
  165. package/dist/tools/update.js +16 -0
  166. package/dist/transport/guards.d.ts +35 -0
  167. package/dist/transport/guards.js +107 -0
  168. package/dist/transport/http-server.d.ts +17 -0
  169. package/dist/transport/http-server.js +198 -0
  170. package/dist/transport/mcp-app-hello.d.ts +3 -0
  171. package/dist/transport/mcp-app-hello.js +66 -0
  172. package/dist/widgets/display-modes.html +131 -0
  173. package/dist/widgets/hello.html +138 -0
  174. package/dist/widgets/proposals.html +131 -0
  175. package/dist/widgets/top-of-mind.html +131 -0
  176. package/package.json +73 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,475 @@
1
+ # Changelog
2
+
3
+ All notable changes to loom are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/).
7
+
8
+ > **Publish status:** `@jbarket/loomai@0.5.0` is the first version published to
9
+ > npm. `0.4.1` and everything before it exists only as a git tag — those versions
10
+ > were never on the registry, so the four months of work between `0.4.1`
11
+ > (2026-04-23) and this release ship together as `0.5.0`.
12
+
13
+ ## [Unreleased]
14
+
15
+ ## [0.5.0] - 2026-09-04
16
+
17
+ ### Changed
18
+
19
+ - **npm package renamed `loomai` → `@jbarket/loomai`.** The registry refused the
20
+ unscoped name on publish: `403 Forbidden — Package name too similar to existing
21
+ package loom-ai`. `loom-ai` is an unrelated, apparently abandoned package
22
+ (0.1.1, 2026-06-03), and npm's similarity check is mechanical and applies only
23
+ to unscoped names — so there is no appeal and no unscoped name in this family
24
+ that is safe from it. Scoping settles it permanently. Nothing else moves: the
25
+ brand is still `loom`, the CLI is still `loom`, the MCP server is still `loom`,
26
+ the repo is still `sleepunit-agents/loom`. Only the install word changes:
27
+ `npx loomai install` → `npx @jbarket/loomai install`. No version has ever been
28
+ published under either name, so no installed tree anywhere needs migrating.
29
+
30
+ ### Security
31
+
32
+ - **The `fastembed` dependency is gone; its ONNX runtime is vendored.** Six
33
+ open Dependabot alerts (one critical, `GHSA-23hp-3jrh-7fpw`) all came from a
34
+ single path: `fastembed@2.1.0` pins `tar: ^6.2.0`, and the 6.x line carries
35
+ twelve unpatched advisories. `Anush008/fastembed-js` was archived on GitHub
36
+ on 2025-12-15, so no upstream fix is coming, and an `overrides` bump to
37
+ tar 7 does not work — fastembed does `import tar from "tar"`, which tar 7
38
+ (no default export) turns into a `SyntaxError` at import, killing loom
39
+ before it starts. The ~200 lines loom actually used now live in
40
+ `src/backends/embedding-runtime.ts`, depending directly on
41
+ `onnxruntime-node`, `@anush008/tokenizers` and `tar@^7.5.22`. `npm audit`
42
+ is clean and the dependency tree loses `progress` and `@huggingface/hub`
43
+ (both only reachable from the unused sparse-embedding path).
44
+
45
+ Embedding output is **bit-for-bit identical** to `fastembed@2.1.0` — vectors
46
+ already stored in a `memories.db` stay comparable to new ones. Two upstream
47
+ quirks are preserved deliberately and marked in the source: vectors stay
48
+ `Float32Array` through normalisation (so rounding matches), and `queryEmbed`
49
+ keeps its E5-style `query: ` prefix even though BGE does not use one.
50
+ `src/backends/embedding-runtime.parity.test.ts` asserts this against golden
51
+ vectors captured from the upstream package before it was removed.
52
+
53
+ ### Fixed
54
+
55
+ - **A failed model download poisoned the cache directory permanently.** The
56
+ vendored downloader checks the HTTP status and deletes the partial file on
57
+ failure. Previously a 403 or 404 from the model bucket was written into
58
+ `<model>.tar.gz` as if it were the archive; the next run saw the file
59
+ existed, skipped the download, and failed in `tar` — forever, until someone
60
+ cleared the cache by hand. The error now names the URL, the status, and the
61
+ new `LOOM_MODEL_BASE_URL` override.
62
+
63
+ - **The test suite was counting three abandoned worktrees.** `vitest` collected
64
+ `.claude/worktrees/**`, so stale copies of the repo ran against current
65
+ `node_modules` and inflated the reported total from 950 tests to ~2600.
66
+ Excluded in `vitest.config.ts`.
67
+
68
+ - **The npm release path could never have worked, and the docs said it had.**
69
+ Three separate blockers, none of which had ever been exercised because no
70
+ `v*` tag has ever been pushed and `release.yml` has zero runs:
71
+ 1. `package.json` still declared `repository.url`, `homepage` and `bugs` as
72
+ `jbarket/loom`, but the repo moved to `sleepunit-agents/loom`. With
73
+ `publishConfig.provenance: true`, npm validates the manifest repository
74
+ against the building repository and refuses to publish on a mismatch —
75
+ so the very first tagged release would have failed at the publish step
76
+ after a full build and test run.
77
+ 2. There were no publish credentials of any kind — no `NPM_TOKEN` repository
78
+ or organization secret — so `npm publish` would have failed with
79
+ `ENEEDAUTH`. Rather than add a 90-day token to rotate forever,
80
+ `release.yml` now publishes with **npm trusted publishing** (OIDC): the
81
+ workflow authenticates as `sleepunit-agents/loom` + `release.yml`, there
82
+ is no secret to store or expire, and provenance is attested from the run
83
+ itself. This requires npm >= 11.5.1, which Node 22.x does not ship, so
84
+ the workflow upgrades npm before installing. See `docs/releasing.md` —
85
+ trusted publishing cannot perform a package's *first* publish
86
+ ([npm/cli#8544](https://github.com/npm/cli/issues/8544)), so the first
87
+ release has to go up by hand once.
88
+ 3. The README advertised **Node.js ≥ 20 ("tested on 20 and 22")** while
89
+ `engines` requires `>= 22` and CI only tests 22 and 24. A reader on
90
+ Node 20 following the README would have hit `EBADENGINE`.
91
+ - Stale `jbarket/loom` links across `README.md`, `CHANGELOG.md` and
92
+ `docs/privacy.md` now point at `sleepunit-agents/loom`, including the
93
+ `gh attestation verify --owner` example (which named the wrong owner and
94
+ a version that was never published).
95
+ - The README install section now states plainly that `loomai` is not on npm
96
+ and gives the working `npx github:sleepunit-agents/loom` form. Remove that
97
+ note in the commit that cuts the first real tag.
98
+
99
+ - **Every packaged install of loom was a silent no-op.** The entry-point guard
100
+ in `src/index.ts` compared `process.argv[1]` against `import.meta.url` as raw
101
+ strings. `npm i -g`, `npm link` and `npx` all install the bin as a *symlink*
102
+ into a bin directory, so `argv[1]` was the symlink path while
103
+ `import.meta.url` resolved to the real file — never equal, so `main()` never
104
+ ran. `loom --version` exited 0 printing nothing, and `loom serve` started no
105
+ server. Only `node dist/index.js` worked, which is exactly what every test
106
+ and every dev checkout does, so nothing caught it. Both sides are now
107
+ resolved with `realpathSync` before comparing, and
108
+ `src/entry.integration.test.ts` invokes the built bin through a symlink so
109
+ the packaged shape is exercised in CI.
110
+
111
+ ### Added
112
+
113
+ - **The onboarding interview is four questions, and `bootstrap` writes a real
114
+ identity.** The interview now asks for the *user's* name as well as the
115
+ agent's name, purpose line and voice line — and nothing else. In exchange,
116
+ `bootstrap` no longer emits a six-line IDENTITY.md: it writes the full
117
+ scaffold underneath the four answers (what a persistent agent is and where
118
+ its continuity lives, the three memory tiers, the reflection loop, honesty
119
+ about what it knows, delegation, and a "Working with <user>" floor).
120
+ `preferences.md` is seeded with the user's name. New optional `user` param
121
+ on the `bootstrap` tool and `loom bootstrap --user`; the loom-setup skill
122
+ shows an example answer *before* each question. Rationale: the structural
123
+ half of an identity is the same for every loom agent, so asking for it wastes
124
+ the interview — handing over the architecture is a hypothesis the agent can
125
+ falsify, handing over a personality would be a verdict. (Art, 2026-09-04)
126
+
127
+ - **MMR diversity re-ranking on `recall`** — after the vector search, the
128
+ candidate pool (`max(limit*3, 12)`) is re-ranked with Maximal Marginal
129
+ Relevance (`λ·relevance − (1−λ)·max cosine sim to already-picked`,
130
+ λ = 0.7) so near-duplicate memories on a well-covered topic stop crowding
131
+ out different ones. The top result is unchanged; with ≤ `limit`
132
+ candidates nothing moves. New optional `diversity` (0..1, default 0.3 =
133
+ 1−λ) on the `recall` tool and `loom recall --diversity`; `0` reproduces
134
+ the old ranking exactly. Idea from xai-org/grok-build's memory search
135
+ (Apache-2.0; idea only, no code). (Art, 2026-08-28)
136
+
137
+ - **Recall observation log** — every `recall` appends one JSON line to
138
+ `<context>/telemetry/recall.jsonl` (query ≤120 chars, filters, pool
139
+ size, returned, topScore, MMR drops, latency, hit). Local-only, never
140
+ throws, `LOOM_RECALL_LOG=0` disables. `loom memory recall-stats
141
+ [--since 7d] [--json]` reads it back: counts, hit rate, median latency
142
+ and topScore, the 10 most recent misses. (Art, 2026-08-28)
143
+
144
+ - **Episode tier** — `episode` memory category (48h TTL by default), the
145
+ `episodes` MCP tool and `loom memory tape [--hours N]` CLI, and a
146
+ "Last 24h across bodies" block in `identity` (after preferences, before
147
+ Top of Mind). Short-term cross-body memory: what other sleeves did in the
148
+ last day, time-ordered and unconditional. Episodes are excluded from the
149
+ salience digest (they would always be hottest). (Art t-142, 2026-08-25)
150
+
151
+ - **Soft-archive tier** (`memory_archive` / `memory_restore` MCP tools;
152
+ `loom memory archive` / `loom memory restore` CLI subcommands). Memories
153
+ can now be soft-retired with a tombstone (note + `archived_at` timestamp)
154
+ instead of hard-deleted. Archived memories are excluded from `recall`,
155
+ `memory_list`, `memory_prune`, `find_similar`, and `memory_audit` but
156
+ remain fully recoverable. The original body is preserved in the row;
157
+ `memory_restore` returns a memory to the active set and wipes the tombstone.
158
+ Existing databases are migrated automatically on first open (`ALTER TABLE`
159
+ guards against re-running on already-migrated schemas).
160
+
161
+ ## [0.4.1] - 2026-04-23
162
+
163
+ Stabilization release consolidating v0.4.0-alpha.1 through alpha.7.
164
+ This is the first externally-promoted release: `npx loomai install` is
165
+ the canonical Quick Start path.
166
+
167
+ ### Added
168
+
169
+ - **`loom install`** — writes the bundled `loom-setup` skill into a
170
+ target harness's skills directory. Flag-driven (`--harness <key>`) or
171
+ interactive single-select TUI. Targets: `claude-code`, `codex`,
172
+ `gemini-cli`, `opencode`, `other`.
173
+ - **`loom doctor`** — read-only probe reporting node version, stack
174
+ version compatibility, context dir resolution, and per-agent git
175
+ fields.
176
+ - **`loom inject`** — writes a marker-bounded managed section into
177
+ harness dotfiles (`~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md`,
178
+ `~/.gemini/GEMINI.md`) telling the agent to load identity via loom.
179
+ Idempotent; re-running is safe.
180
+ - **`loom procedures list|show|adopt`** — CLI for procedural-identity
181
+ seed templates (stack spec v1 §4.9). Ships 6 seed templates:
182
+ `verify-before-completion`, `cold-testing`,
183
+ `reflection-at-end-of-unit`, `handoff-to-unpushable-repo`,
184
+ `confidence-calibration`, `RLHF-resistance`.
185
+ - **`loom harness init <name>`** — scaffolds a harness manifest from
186
+ the template (stack spec v1 §4.7).
187
+ - **Full CLI surface** — every MCP tool has a `loom <subcommand>` shell
188
+ equivalent: `wake`, `recall`, `remember`, `update`, `forget`,
189
+ `memory list`, `memory prune`, `pursuits`, `update-identity`,
190
+ `bootstrap`, `serve`. Write commands take body via stdin or
191
+ `$VISUAL`/`$EDITOR`. `--json` on any command emits structured output.
192
+ - **MCP tools** for procedures and harness init:
193
+ `mcp__loom__procedure_list`, `procedure_show`, `procedure_adopt`,
194
+ `harness_init`.
195
+ - **Harness manifest block** (`harnesses/<client>.md`) and **model
196
+ manifest block** (`models/<model>.md`) — loaded by `identity()` when
197
+ `LOOM_CLIENT` / `LOOM_MODEL` resolve. Missing-manifest nudges emitted
198
+ when set but absent.
199
+ - **Procedures block** (`procedures/*.md`) with seed nudge — emitted by
200
+ `identity()` whenever `procedures/` is missing or empty.
201
+ - `LOOM_STACK_VERSION` file auto-stamped on server boot; startup
202
+ refuses stacks ahead of what this loom understands.
203
+ - `LOOM_MODEL` env var + optional `model` param on the `identity` tool.
204
+ - Reusable `src/cli/tui/multi-select.ts` keyboard-nav checkbox
205
+ primitive with `single: boolean` option.
206
+ - `src/install/names.ts` — canonical agent-name validation and
207
+ reserved-names list.
208
+ - `assets/skill/SKILL.md` — bundled first-run setup skill.
209
+ - `.github/workflows/release.yml` — tag-triggered publish pipeline.
210
+ Push a `v*` tag → `npm ci`, `npm test`, `npm run build`,
211
+ `npm publish --provenance`, GitHub release with auto-generated notes.
212
+ Pre-release tags flagged as prereleases. Requires `NPM_TOKEN` secret.
213
+ - `docs/privacy.md` — trust doc covering data locality (everything
214
+ local, only outbound call is the first-run fastembed model
215
+ download), the no-opt-out-telemetry policy, and a walkthrough for
216
+ verifying release provenance via `npm audit signatures` and
217
+ `gh attestation verify`. Linked from README and CONTRIBUTING.
218
+ - Stack spec §11 (Injection), §13 (Multi-agent layout), §14
219
+ (Git-backed agent dirs).
220
+
221
+ ### Changed
222
+
223
+ - **npm package renamed `loom` → `loomai`.** Brand (`loom`), CLI
224
+ binary (`loom`), MCP server key (`loom`), and tool prefix
225
+ (`mcp__loom__*`) are unchanged — only the `npx` install surface
226
+ moves: `npx loom install` → `npx loomai install`.
227
+ - **License: MIT → AGPL-3.0-or-later.** Forks that modify loom and
228
+ expose it over a network must offer source. Pre-alpha-1 releases
229
+ remain MIT.
230
+ - `package.json` adds `publishConfig: { access: public, provenance: true }`
231
+ and a `files` array so `assets/` ships in the published tarball.
232
+ - `loom bootstrap --name` validates against canonical name rules.
233
+ - `assertStackVersionCompatible()` called at MCP startup and every CLI
234
+ command.
235
+ - README Quick Start rewritten around `npx loomai install` +
236
+ `/loom-setup`.
237
+ - **`release.yml` switches to npm Trusted Publishing (OIDC).** Removes
238
+ `NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}` from the publish step.
239
+ Auth is handled by the OIDC token exchange between GitHub Actions and
240
+ npm — no long-lived secret required. Requires a one-time bootstrap
241
+ publish and Trusted Publisher configuration on npmjs.com.
242
+
243
+ ## [0.4.0-alpha.7] - 2026-04-22
244
+
245
+ ### Changed
246
+
247
+ - **npm package renamed `loom` → `loomai`.** The unscoped `loom`
248
+ name is taken by an unrelated package. Brand (`loom`), CLI binary
249
+ (`loom`), MCP server key (`loom`), and tool prefix
250
+ (`mcp__loom__*`) are unchanged — only the `npx` install surface
251
+ moves: `npx loom install` → `npx loomai install`. alpha.6 was
252
+ never published to npm; alpha.7 is the first release tag.
253
+ - `package.json` adds `publishConfig: { access: public, provenance:
254
+ true }` so tagged releases publish with Sigstore provenance.
255
+ - README Quick Start + CLI examples updated to `npx loomai`.
256
+
257
+ ### Added
258
+
259
+ - `.github/workflows/release.yml` — tag-triggered publish pipeline.
260
+ Push a `v*` tag → runs `npm ci`, `npm test`, `npm run build`,
261
+ `npm publish --provenance`, then creates a GitHub release with
262
+ auto-generated notes. Pre-release tags (`-alpha`, `-beta`, `-rc`)
263
+ are flagged as prereleases on GitHub. Requires `NPM_TOKEN`
264
+ repository secret.
265
+
266
+ ## [0.4.0-alpha.6] - 2026-04-21
267
+
268
+ ### Added
269
+
270
+ - `loom install` — CLI that writes the bundled `loom-setup` skill
271
+ into a target harness's skills directory. Flag-driven
272
+ (`--harness <key>`) or single-select TUI on a TTY. Targets:
273
+ `claude-code`, `codex`, `gemini-cli`, `opencode`, `other`. `--to`
274
+ overrides destination; `--force` overwrites; `--dry-run` /
275
+ `--json` for scripting. The "other" target writes
276
+ `./loom-setup-skill.md` in the current directory.
277
+ - `loom doctor` — read-only CLI probe reporting node version, stack
278
+ version compatibility, context dir resolution, and enumerating
279
+ existing agents under `~/.config/loom/*` with forward-looking
280
+ `git: { initialized, hasRemote, dirty, gitignorePresent }` fields
281
+ per agent. `--json` for scripting.
282
+ - `assets/skill/SKILL.md` — bundled skill that drives first-run
283
+ setup inside the target harness: probe → interview → bootstrap →
284
+ procedures adopt → harness init → MCP config edit
285
+ (verify-before-write) → inject → wake verify. Never clobbers
286
+ existing agent dirs; never proposes `--force`.
287
+ - `src/install/names.ts` — canonical agent-name validation plus
288
+ reserved-names list (`current`, `default`, `config`, `backups`,
289
+ `cache`, `tmp`, `shared`).
290
+ - Stack spec §13 (Multi-agent layout) and §14 (Git-backed agent
291
+ dirs).
292
+
293
+ ### Changed
294
+
295
+ - `loom bootstrap --name` now validates against the canonical name
296
+ rules. Invalid or reserved names exit with code 2 and a specific
297
+ error.
298
+ - `src/cli/tui/multi-select.ts` gains a `single: boolean` option
299
+ (reducer + TTY adapter). Existing multi-select consumers are
300
+ unchanged — the option defaults to `false`.
301
+ - `package.json` adds a `files` array so `assets/` ships in the
302
+ published tarball alongside `dist/`.
303
+ - README Quick Start rewritten around `npx loom install` +
304
+ `/loom-setup`. Per-command reference sections unchanged.
305
+
306
+ ## [0.4.0-alpha.5] - 2026-04-21
307
+
308
+ ### Added
309
+
310
+ - `loom procedures list|show|adopt` — CLI for procedural-identity seed
311
+ templates (stack spec v1 §4.9). `adopt` supports positional keys,
312
+ `--all`, `--force` overwrite, and an interactive multi-select picker
313
+ (reuses the `src/cli/tui/multi-select.ts` primitive from alpha.4) on
314
+ TTY. Idempotent by default.
315
+ - `loom harness init <name>` — CLI that scaffolds a harness manifest
316
+ (stack spec v1 §4.7) from the template. Falls back to `--client` /
317
+ `$LOOM_CLIENT` when no name is given. `--force` overwrites.
318
+ - `mcp__loom__procedure_list`, `procedure_show`, `procedure_adopt`,
319
+ `harness_init` — MCP tools mirroring the CLI. Thin wrappers over the
320
+ same shared core; first-class way for an agent to respond to the
321
+ procedures seed nudge or a missing-manifest warning in the identity
322
+ payload without needing harness-native filesystem tools.
323
+ - Stack spec §11 lists Procedures + Manifests as a new adapter.
324
+
325
+ ### Changed
326
+
327
+ - `src/blocks/procedures.ts` gains `adoptProcedures`, `listProcedures`,
328
+ `showProcedure`, and `UnknownProcedureError` (additive — existing
329
+ exports untouched).
330
+ - `src/blocks/harness.ts` gains `initHarness` (additive).
331
+
332
+ ## [0.4.0-alpha.4] - 2026-04-20
333
+
334
+ ### Added
335
+
336
+ - `loom inject` — CLI command that writes a marker-bounded managed
337
+ section into harness dotfiles (`~/.claude/CLAUDE.md`,
338
+ `~/.codex/AGENTS.md`, `~/.gemini/GEMINI.md`). The managed section
339
+ tells the agent how to load identity via loom — prefer MCP
340
+ (`mcp__loom__identity`), fall back to the CLI (`loom wake`).
341
+ Content outside the `<!-- loom:start / loom:end -->` markers is
342
+ preserved; re-running is idempotent.
343
+ - `--all`, `--harness <keys>`, `--to <path>`, `--dry-run`, `--json`
344
+ flags for non-interactive use. Interactive keyboard-nav wizard
345
+ when stdin is a TTY and no harness flags are given.
346
+ - Reusable `src/cli/tui/multi-select.ts` — stdlib keyboard-nav
347
+ checkbox primitive with a pure reducer. Future consumers: bootstrap
348
+ procedure adoption, harness-manifest selection.
349
+ - Stack spec §11 lists Injection as a new adapter.
350
+
351
+ ### Changed
352
+
353
+ - No existing MCP tool surfaces or CLI commands altered. `loom inject`
354
+ is purely additive.
355
+
356
+ ## [0.4.0-alpha.3] - 2026-04-20
357
+
358
+ ### Added
359
+
360
+ - Full CLI surface — every MCP tool has a `loom <subcommand>` shell
361
+ equivalent: `wake`, `recall`, `remember`, `update`, `forget`,
362
+ `memory list`, `memory prune`, `pursuits`, `update-identity`,
363
+ `bootstrap`, plus an explicit `serve` alias. Write commands take
364
+ body text via stdin (when piped) or `$VISUAL`/`$EDITOR` (when
365
+ interactive). `--json` on any command emits the tool's structured
366
+ return value for scripting.
367
+ - `assertStackVersionCompatible()` helper consolidates the
368
+ stack-version gate; both MCP startup and every CLI command call it.
369
+
370
+ ### Changed
371
+
372
+ - `node dist/index.js` with no subcommand still launches MCP (backward
373
+ compatible with every existing `.mcp.json`). A known-subcommand
374
+ argv[2] routes to the CLI instead.
375
+
376
+ ## [0.4.0-alpha.2] - 2026-04-20
377
+
378
+ ### Added
379
+
380
+ - Procedures seed content — 6 recommended seed templates (stack spec
381
+ v1 §4.9) exposed as `SEED_PROCEDURES` in `src/blocks/procedures.ts`:
382
+ `verify-before-completion`, `cold-testing`,
383
+ `reflection-at-end-of-unit`, `handoff-to-unpushable-repo`,
384
+ `confidence-calibration`, `RLHF-resistance`. Each template ships a
385
+ prescriptive Rule sentence plus agent-authored slots for Why and
386
+ How to apply, fenced by a ⚠ ownership-ritual notice the agent
387
+ deletes on adoption.
388
+ - `seedNudge()` — renders an empty-directory onboarding message
389
+ containing all 6 templates. Emitted by `identity()` whenever
390
+ `procedures/` is missing or empty; suppressed as soon as any
391
+ procedure file exists.
392
+
393
+ ### Changed
394
+
395
+ - Documentation reshuffle: v0.4 arc docs moved out of the repo. The
396
+ roadmap now lives in the
397
+ [v0.4 discussion](https://github.com/sleepunit-agents/loom/discussions/10) and
398
+ the [project board](https://github.com/users/jbarket/projects/1/views/1).
399
+ Per-feature specs and plans moved from `docs/superpowers/{specs,plans}/`
400
+ to `docs/{specs,plans}/` — tool-neutral paths, same content.
401
+
402
+ ## [0.4.0-alpha.1] - 2026-04-19
403
+
404
+ ### Added
405
+
406
+ - Harness manifest block (`harnesses/<client>.md`) — per-harness
407
+ descriptor (tool prefixes, delegation primitive, scheduling,
408
+ session search, gotchas). Loaded by `identity()` when
409
+ `LOOM_CLIENT` resolves. Matches stack spec v1 §4.7.
410
+ - Model manifest block (`models/<model>.md`) — per-model-family
411
+ descriptor (capability notes, workarounds, when-to-use /
412
+ when-not-to-use). Loaded by `identity()` when `LOOM_MODEL`
413
+ resolves. Matches stack spec v1 §4.8.
414
+ - Procedures block (`procedures/*.md`) — procedural-identity docs
415
+ with a hard cap of ~10 files. Reader ships; populated content
416
+ lands in a later alpha. Matches stack spec v1 §4.9.
417
+ - `LOOM_MODEL` environment variable + optional `model` param on the
418
+ `identity` tool.
419
+ - `LOOM_STACK_VERSION` file at the context-dir root, auto-stamped
420
+ with `1` on server boot. `createLoomServer` refuses to start
421
+ against a stack version ahead of what this loom understands.
422
+ - Missing-manifest nudges: when `LOOM_CLIENT` or `LOOM_MODEL` is set
423
+ but no corresponding manifest exists, `identity()` emits a
424
+ template-filled section telling the agent exactly what to write.
425
+
426
+ ### Changed
427
+
428
+ - License: MIT → **AGPL-3.0-or-later**. Forks that modify loom and
429
+ expose it over a network must offer source to their users. Bundling
430
+ loom into a larger product is still fine; closing the loom-derived
431
+ code and reselling it is not. Pre-alpha-1 releases remain available
432
+ under MIT.
433
+
434
+ ## [0.3.1] - 2026-04-19
435
+
436
+ Initial public release.
437
+
438
+ ### Added
439
+
440
+ - `SqliteVecBackend` — single-file memory store using
441
+ [`better-sqlite3`](https://github.com/WiseLibs/better-sqlite3) plus
442
+ the [`sqlite-vec`](https://github.com/asg017/sqlite-vec) vec0 virtual
443
+ table. One `memories.db` per agent. Real cosine similarity.
444
+ - `FastEmbedProvider` — embeddings via
445
+ [`fastembed`](https://github.com/Anush008/fastembed-js) with
446
+ BGE-small-en-v1.5 (384-dim, ~33MB ONNX, CPU-only). First run
447
+ downloads the model to `~/.cache/loom/fastembed/`. No GPU, no
448
+ Docker, no daemon.
449
+ - Stack specification — [`docs/archive/loom-stack-v1.md`](docs/archive/loom-stack-v1.md)
450
+ defines the directory layout, block types, memory schema, wake
451
+ sequence, and adapter contract that v0.4 work builds on.
452
+
453
+ ### Changed
454
+
455
+ - Memory backend is now a single opinionated stack (sqlite-vec +
456
+ fastembed). The env-driven backend selector is gone.
457
+
458
+ ### Removed
459
+
460
+ - Qdrant backend, Ollama embedding provider, OpenAI embedding
461
+ provider, filesystem backend. None were load-bearing for the new
462
+ stack and all added external-service dependencies or operational
463
+ overhead.
464
+
465
+ [Unreleased]: https://github.com/sleepunit-agents/loom/compare/v0.5.0...HEAD
466
+ [0.5.0]: https://github.com/sleepunit-agents/loom/compare/v0.4.1...v0.5.0
467
+ [0.4.1]: https://github.com/sleepunit-agents/loom/compare/v0.3.1...v0.4.1
468
+ [0.4.0-alpha.7]: https://github.com/sleepunit-agents/loom/compare/v0.4.0-alpha.6...v0.4.0-alpha.7
469
+ [0.4.0-alpha.6]: https://github.com/sleepunit-agents/loom/compare/v0.4.0-alpha.5...v0.4.0-alpha.6
470
+ [0.4.0-alpha.5]: https://github.com/sleepunit-agents/loom/compare/v0.4.0-alpha.4...v0.4.0-alpha.5
471
+ [0.4.0-alpha.4]: https://github.com/sleepunit-agents/loom/compare/v0.4.0-alpha.3...v0.4.0-alpha.4
472
+ [0.4.0-alpha.3]: https://github.com/sleepunit-agents/loom/compare/v0.4.0-alpha.2...v0.4.0-alpha.3
473
+ [0.4.0-alpha.2]: https://github.com/sleepunit-agents/loom/compare/v0.4.0-alpha.1...v0.4.0-alpha.2
474
+ [0.4.0-alpha.1]: https://github.com/sleepunit-agents/loom/compare/v0.3.1...v0.4.0-alpha.1
475
+ [0.3.1]: https://github.com/sleepunit-agents/loom/releases/tag/v0.3.1