@vectorize-io/hindsight-coding-agents 0.5.2 → 0.5.4

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 (51) hide show
  1. package/README.md +42 -8
  2. package/dist/antigravity-hook.js +335 -91
  3. package/dist/antigravity-statusline.js +17 -10
  4. package/dist/antigravity-stop-hook.js +340 -92
  5. package/dist/claude-hook.js +335 -91
  6. package/dist/claude-sessionstart-hook.js +459 -132
  7. package/dist/claude-stop-hook.js +340 -92
  8. package/dist/cline.js +283 -64
  9. package/dist/codex-hook.js +335 -91
  10. package/dist/codex-sessionstart-hook.js +459 -132
  11. package/dist/codex-stop-hook.js +340 -92
  12. package/dist/copilot-hook.js +335 -91
  13. package/dist/copilot-sessionstart-hook.js +459 -132
  14. package/dist/copilot-stop-hook.js +340 -92
  15. package/dist/cursor-hook.js +335 -91
  16. package/dist/cursor-sessionstart-hook.js +459 -132
  17. package/dist/cursor-stop-hook.js +340 -92
  18. package/dist/daemon-start.js +17 -10
  19. package/dist/dcode-hook.js +335 -91
  20. package/dist/dcode-sessionstart-hook.js +459 -132
  21. package/dist/dcode-stop-hook.js +340 -92
  22. package/dist/deepen.js +113 -32
  23. package/dist/devin-hook.js +335 -91
  24. package/dist/devin-sessionstart-hook.js +459 -132
  25. package/dist/devin-stop-hook.js +340 -92
  26. package/dist/droid-hook.js +335 -91
  27. package/dist/droid-sessionstart-hook.js +459 -132
  28. package/dist/droid-stop-hook.js +340 -92
  29. package/dist/dsh.js +322 -101
  30. package/dist/grok-hook.js +335 -91
  31. package/dist/grok-sessionstart-hook.js +459 -132
  32. package/dist/grok-stop-hook.js +340 -92
  33. package/dist/hindsight-seed.js +17 -10
  34. package/dist/index.js +322 -101
  35. package/dist/installer.js +1252 -325
  36. package/dist/kilo.js +322 -101
  37. package/dist/mcp-server.js +100 -23
  38. package/dist/opencode2.js +322 -101
  39. package/dist/pi.js +321 -100
  40. package/dist/prime-agent.js +321 -100
  41. package/dist/qwen-hook.js +335 -91
  42. package/dist/qwen-sessionstart-hook.js +459 -132
  43. package/dist/qwen-stop-hook.js +340 -92
  44. package/dist/status.js +98 -21
  45. package/dist/survey-supervisor.js +81 -0
  46. package/dist/zcode-hook.js +2954 -0
  47. package/dist/zcode-sessionstart-hook.js +3655 -0
  48. package/dist/zcode-stop-hook.js +3218 -0
  49. package/package.json +7 -3
  50. package/plugin.json +1 -1
  51. package/skill/SKILL.md +17 -7
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Long-term project memory for **coding agents**, backed by [Hindsight](https://vectorize.io/hindsight).
4
4
  One package, several agents: a shared reflect-and-inject core with a thin entry point per agent
5
- (**Claude Code**, **Codex CLI**, **DeepAgents Dcode**, **opencode**, **opencode 2**, **Kilo CLI**, **Cursor CLI**, **GitHub Copilot CLI**, **Grok Build**, **Qwen Code**, **Factory Droid**, **Antigravity CLI**, **Devin CLI**, **Cline CLI**, **pi**, **Prime Agent**, **DeepSeek Harness**). Ingestion is fully
5
+ (**Claude Code**, **Codex CLI**, **DeepAgents Dcode**, **opencode**, **opencode 2**, **Kilo CLI**, **Cursor CLI**, **GitHub Copilot CLI**, **Grok Build**, **Qwen Code**, **Factory Droid**, **ZCode**, **Antigravity CLI**, **Devin CLI**, **Cline CLI**, **pi**, **Prime Agent**, **DeepSeek Harness**). Ingestion is fully
6
6
  automatic — there is no setup command: a repo's git history and conversations flow into its memory
7
7
  bank in the background as you work.
8
8
 
@@ -169,6 +169,30 @@ user-managed MCP server already named `hindsight`. Droid's hook protocol matches
169
169
  injection use the same protocol; write-back also handles Droid's cancellation notification because
170
170
  Droid does not emit `Stop` after a cancelled turn.
171
171
 
172
+ #### <img src="https://hindsight.vectorize.io/img/harness/zcode.svg" alt="" width="20" height="20" /> ZCode
173
+
174
+ ```bash
175
+ npx @vectorize-io/hindsight-coding-agents install zcode
176
+ ```
177
+
178
+ Three hook registrations plus a stdio MCP server under `mcp.servers.hindsight`, both in ZCode's own
179
+ CLI config `~/.zcode/cli/config.json` - never your real Claude Code settings, even though ZCode
180
+ embeds the Claude Code agent runtime and speaks its hook protocol. The companion skill goes to
181
+ `~/.zcode/skills`. Config hooks ship **disabled**, so the installer also sets `hooks.enabled` to
182
+ `true`; `uninstall` removes the whole block again when nothing else is registered there, and
183
+ refuses to touch an MCP server named `hindsight` that it did not write.
184
+
185
+ > ZCode's hook `timeoutMs` is in **milliseconds** (installed values `30000/30000/60000`), and
186
+ > `hooks.maxOutputBytes` caps what a hook may print - anything larger is dropped, injection and
187
+ > all. The installer seeds it at `32768` only when your config does not already set one.
188
+ >
189
+ > ZCode keeps no durable session transcript: `Stop` carries the reply plus a temp, assistant-only
190
+ > file it deletes as soon as the hook returns, and no user prompt at all. So this is the one agent
191
+ > whose conversation the plugin journals itself - the prompt hook records what you asked, the
192
+ > `Stop` hook records the reply - and the write-back then behaves like every other agent's,
193
+ > appending each new turn to the same session document. `--import-conversations` is therefore not
194
+ > available for ZCode: there is no past history on disk to backfill from.
195
+
172
196
  #### <img src="https://hindsight.vectorize.io/img/harness/antigravity-cli.png" alt="" width="20" height="20" /> Antigravity CLI
173
197
 
174
198
  ```bash
@@ -503,8 +527,8 @@ hook by Codex...), so one shared config serves several agents side by side:
503
527
  | `reflectBudget` | `"high"` | reflect budget for the `hindsight_reflect` tool: `"low"`, `"mid"` or `"high"`. Drop it on a large bank where high-budget synthesis exceeds the server's wall timeout. The automatic session-start reflect always uses `"low"` to fit its hook window and is unaffected |
504
528
  | `autoReflect` | `true` | inject a one-time reflect synthesis on the session's **first prompt**. `false` = tool-only reflect: nothing is injected; the agent searches knowledge pages first and reflects only when they are too shallow |
505
529
  | `pageRefreshEveryTurns` | `10` | refetch the knowledge pages and re-inject the page roster + tool guide every N user turns |
506
- | `pageTriggerType` | `"auto-refresh"` | when NEW knowledge pages refresh, i.e. what keeping them current costs — `"auto-refresh"` after every consolidation that produced new material, `"cron"` on `pageTriggerCron` only, `"manual"` never on their own. Auto-refresh is the most current and the most expensive: one synthesis per page per consolidation. Maps to the page's `trigger.refresh_after_consolidation` in the Hindsight API (`true` for auto-refresh, `false` for manual) |
507
- | `pageTriggerCron` | — | schedule for `pageTriggerType: "cron"` — UTC, standard 5-field cron, e.g. `"0 3 * * *"`. Sets the page's `trigger.refresh_cron`, which the API treats as mutually exclusive with `refresh_after_consolidation`; a scheduled refresh is skipped when nothing changed. Write a field as `H` to give each page its own value there — see **Spreading refreshes with `H`** below |
530
+ | `pageTriggerType` | `"cron"` | when NEW knowledge pages refresh, i.e. what keeping them current costs — `"cron"` (default) on `pageTriggerCron` only and only when actually stale, `"auto-refresh"` after every consolidation that produced new material, `"manual"` never on their own. Auto-refresh is the most current and by far the most expensive: one synthesis per page per consolidation. Maps to the page's `trigger.refresh_cron`, or `trigger.refresh_after_consolidation` in the Hindsight API (`true` for auto-refresh, `false` for manual) |
531
+ | `pageTriggerCron` | `"H * * * *"` | schedule for `pageTriggerType: "cron"` — UTC, standard 5-field cron, e.g. `"0 3 * * *"`. The default is hourly, each page on its own hashed minute. Sets the page's `trigger.refresh_cron`, which the API treats as mutually exclusive with `refresh_after_consolidation`; a scheduled refresh is skipped when nothing changed. Write a field as `H` to give each page its own value there — see **Spreading refreshes with `H`** below |
508
532
  | `autoSeed` | `true` | SessionStart: auto-seed a cold repo's bank from git history |
509
533
  | `seedLimit` | `300` | auto-seed: most-recent-N-commits cap |
510
534
  | `codebaseSurvey` | `true` | SessionStart: headless survey of a cold repo's structure, run under the current harness's own CLI (claude/codex/antigravity/opencode), falling back to any available agent |
@@ -519,6 +543,12 @@ hook by Codex...), so one shared config serves several agents side by side:
519
543
  | `harnesses.<name>` | — | per-harness override of any field above |
520
544
  | `harness` | `opencode` | **deepen engine only**: which session format `--conversations` is read as |
521
545
 
546
+ By default a page refreshes **hourly, staggered**: `pageTriggerCron` is `"H * * * *"`, so every
547
+ page gets its own minute of the hour (see below) and a tick with nothing new to fold in is skipped
548
+ server-side. That keeps pages within an hour of the repo without paying auto-refresh's price — one
549
+ LLM synthesis per page per consolidation, on a repo that consolidates all day. Set
550
+ `pageTriggerType: "auto-refresh"` to go back to refreshing on every consolidation.
551
+
522
552
  `pageTriggerType`/`pageTriggerCron` decide only **when** a page refreshes. **How** it refreshes
523
553
  belongs to the server: Hindsight creates a knowledge page with a delta refresh (each pass edits the
524
554
  page instead of rebuilding it) that doesn't reflect over sibling pages, and these settings merge
@@ -548,11 +578,15 @@ problem. It never reaches the API: the plugin resolves it to an ordinary cron ex
548
578
  one you can edit. Hashing spreads pages out, it does not partition them — two pages can still land
549
579
  on the same minute, just not all of them.
550
580
 
551
- **These settings apply to pages created from here on.** Changing them does not migrate the pages a
552
- repo already has: a page keeps the trigger it was created with, so a bank seeded before you set
553
- `"manual"` keeps refreshing on every consolidation. To move an existing page, change its trigger
554
- through the API (`PATCH /knowledge-base/nodes/{id}`), an SDK, or the control plane — or delete it
555
- and let the next session seed it again.
581
+ **These settings apply to the pages a repo already has, too.** Every session compares each page
582
+ this plugin created — the seeded taxonomy and every captured initiative — against the config and
583
+ re-syncs the ones that differ, so a bank seeded before this default changed moves onto the hourly
584
+ schedule by itself, and a page you retriggered by hand in the control plane is put back on the
585
+ configured policy the next time an agent runs. The config
586
+ file is the source of truth for these pages: to give one a different schedule, change
587
+ `pageTriggerType`/`pageTriggerCron` (per bank, if it is only that repo) rather than editing the
588
+ page. Only the fields this plugin states are touched — a page's `mode`, its excluded siblings and
589
+ its minimum refresh interval are left exactly as they are.
556
590
 
557
591
  ### A bank you shape yourself — `manageBankConfig`
558
592