@vectorize-io/hindsight-coding-agents 0.5.1 → 0.5.3
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.
- package/README.md +84 -9
- package/dist/antigravity-hook.js +424 -81
- package/dist/antigravity-statusline.js +56 -11
- package/dist/antigravity-stop-hook.js +515 -134
- package/dist/claude-hook.js +424 -81
- package/dist/claude-sessionstart-hook.js +392 -98
- package/dist/claude-stop-hook.js +515 -134
- package/dist/cline.js +218 -73
- package/dist/codex-hook.js +424 -81
- package/dist/codex-sessionstart-hook.js +392 -98
- package/dist/codex-stop-hook.js +515 -134
- package/dist/copilot-hook.js +424 -81
- package/dist/copilot-sessionstart-hook.js +392 -98
- package/dist/copilot-stop-hook.js +515 -134
- package/dist/cursor-hook.js +424 -81
- package/dist/cursor-sessionstart-hook.js +392 -98
- package/dist/cursor-stop-hook.js +515 -134
- package/dist/daemon-start.js +50 -9
- package/dist/dcode-hook.js +424 -81
- package/dist/dcode-sessionstart-hook.js +392 -98
- package/dist/dcode-stop-hook.js +515 -134
- package/dist/deepen.js +164 -27
- package/dist/devin-hook.js +424 -81
- package/dist/devin-sessionstart-hook.js +392 -98
- package/dist/devin-stop-hook.js +515 -134
- package/dist/droid-hook.js +2920 -0
- package/dist/droid-sessionstart-hook.js +3487 -0
- package/dist/droid-stop-hook.js +3188 -0
- package/dist/dsh.js +260 -109
- package/dist/grok-hook.js +424 -81
- package/dist/grok-sessionstart-hook.js +392 -98
- package/dist/grok-stop-hook.js +515 -134
- package/dist/hindsight-seed.js +56 -11
- package/dist/index.js +257 -110
- package/dist/installer.js +530 -223
- package/dist/kilo.js +257 -110
- package/dist/mcp-server.js +537 -146
- package/dist/opencode2.js +257 -110
- package/dist/pi.js +256 -109
- package/dist/prime-agent.js +256 -109
- package/dist/qwen-hook.js +424 -81
- package/dist/qwen-sessionstart-hook.js +392 -98
- package/dist/qwen-stop-hook.js +515 -134
- package/dist/status.js +128 -20
- package/dist/zcode-hook.js +2920 -0
- package/dist/zcode-sessionstart-hook.js +3487 -0
- package/dist/zcode-stop-hook.js +3188 -0
- package/package.json +11 -5
- package/plugin.json +1 -1
- package/skill/SKILL.md +42 -8
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
|
-
(**opencode**, **opencode 2**, **Kilo CLI**, **
|
|
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
|
|
|
@@ -12,6 +12,8 @@ tie-break policy. Those decisions live in git history and past conversations. Th
|
|
|
12
12
|
in front of the agent at the moment it starts working, and keeps a curated set of **knowledge pages**
|
|
13
13
|
(architecture, conventions, in-flight initiatives) that future sessions start from.
|
|
14
14
|
|
|
15
|
+
[View Changelog →](https://hindsight.vectorize.io/changelog/integrations/coding-agents)
|
|
16
|
+
|
|
15
17
|
## Install
|
|
16
18
|
|
|
17
19
|
<!-- skill:begin title="Install / update" -->
|
|
@@ -152,6 +154,45 @@ Native hooks in `~/.qwen/settings.json`, plus MCP and the companion skill.
|
|
|
152
154
|
> continuations, so interactive sessions recall once per prompt while headless (`qwen -p`),
|
|
153
155
|
> `serve`, SDK and ACP sessions seed and retain but do not recall.
|
|
154
156
|
|
|
157
|
+
#### <img src="https://hindsight.vectorize.io/img/harness/factory-droid.svg" alt="" width="20" height="20" /> Factory Droid
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
npx @vectorize-io/hindsight-coding-agents install factory-droid
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
4 hook registrations in `~/.factory/hooks.json` (user scope), including a cancellation-safe
|
|
164
|
+
`Notification` write-back, plus a stdio MCP registration under
|
|
165
|
+
`mcpServers.hindsight` in `~/.factory/mcp.json`, and the companion skill in `~/.factory/skills`.
|
|
166
|
+
The installer touches only JSON files - no Droid CLI round-trip - and refuses to overwrite a
|
|
167
|
+
user-managed MCP server already named `hindsight`. Droid's hook protocol matches Claude Code's
|
|
168
|
+
(`session_id`/`transcript_path`/`cwd` in, `hookSpecificOutput.additionalContext` out). Recall and
|
|
169
|
+
injection use the same protocol; write-back also handles Droid's cancellation notification because
|
|
170
|
+
Droid does not emit `Stop` after a cancelled turn.
|
|
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
|
+
|
|
155
196
|
#### <img src="https://hindsight.vectorize.io/img/harness/antigravity-cli.png" alt="" width="20" height="20" /> Antigravity CLI
|
|
156
197
|
|
|
157
198
|
```bash
|
|
@@ -486,15 +527,15 @@ hook by Codex...), so one shared config serves several agents side by side:
|
|
|
486
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 |
|
|
487
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 |
|
|
488
529
|
| `pageRefreshEveryTurns` | `10` | refetch the knowledge pages and re-inject the page roster + tool guide every N user turns |
|
|
489
|
-
| `pageTriggerType` | `"
|
|
490
|
-
| `pageTriggerCron` |
|
|
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 |
|
|
491
532
|
| `autoSeed` | `true` | SessionStart: auto-seed a cold repo's bank from git history |
|
|
492
533
|
| `seedLimit` | `300` | auto-seed: most-recent-N-commits cap |
|
|
493
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 |
|
|
494
535
|
| `surveyModel` | `haiku` | model for the survey — Claude recipe only (`claude -p --model`); other agents use their configured default |
|
|
495
536
|
| `surveyBudgetUsd` | `2` | survey spend cap — Claude recipe only (`claude -p --max-budget-usd`); other agents rely on their read-only sandbox |
|
|
496
537
|
| `surveyRefreshCommits` | `20` | re-run the survey at SessionStart once this many commits have accrued since the last one, so the structural pages track an architecture that keeps moving (`0` = survey a cold repo only, never again) |
|
|
497
|
-
| `retainSessions` | `true` | session write-back, honored by every harness: hook harnesses write the transcript on Stop, plugin harnesses (opencode, opencode 2, Kilo) upsert it every turn plus an idle flush that captures the reply the per-turn pass can't see. Set `false`
|
|
538
|
+
| `retainSessions` | `true` | session write-back, honored by every harness: hook harnesses write the transcript on Stop, Factory Droid also writes on its cancellation notification, and plugin harnesses (opencode, opencode 2, Kilo) upsert it every turn plus an idle flush that captures the reply the per-turn pass can't see. Set `false` - globally, per harness, or per bank - to stop writing transcripts (the background history import stops with it) while recall, git ingest and the memory tools keep working |
|
|
498
539
|
| `maxParallelRetains` | `10` | cap on concurrent retain-related requests: drain()'s per-op polls plus deepen's chat/git retain pools. The API rate-limits bursts, not single requests — if you see 429s, lower this rather than raising it |
|
|
499
540
|
| `logLevel` | `"info"` | plugin-log verbosity (`"debug"` \| `"info"` \| `"warn"` \| `"error"`); `HINDSIGHT_LOG_LEVEL` env overrides |
|
|
500
541
|
| `autoUpdate` | `true` | keep the installed runtime current by itself: once a day a session start asks npm for the published version and, when it is newer, re-stages `~/.hindsight/coding-agents` in the background. It rewires no host config, so a release adding a **new** hook entry point still needs a manual `install`. Set `false` to pin the installed version; `disabled` stops it too, since an inert plugin should stay inert. Only ever replaces a runtime installed the documented way, via `npx` — a copy installed with `npm i -g`, vendored as a project dependency, or built from a checkout is left to whoever manages it (update those the way you installed them), and it needs `npx` on `PATH` |
|
|
@@ -502,16 +543,50 @@ hook by Codex...), so one shared config serves several agents side by side:
|
|
|
502
543
|
| `harnesses.<name>` | — | per-harness override of any field above |
|
|
503
544
|
| `harness` | `opencode` | **deepen engine only**: which session format `--conversations` is read as |
|
|
504
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
|
+
|
|
505
552
|
`pageTriggerType`/`pageTriggerCron` decide only **when** a page refreshes. **How** it refreshes
|
|
506
553
|
belongs to the server: Hindsight creates a knowledge page with a delta refresh (each pass edits the
|
|
507
554
|
page instead of rebuilding it) that doesn't reflect over sibling pages, and these settings merge
|
|
508
555
|
over those defaults rather than replacing them.
|
|
509
556
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
`
|
|
513
|
-
|
|
514
|
-
|
|
557
|
+
### Spreading refreshes with `H`
|
|
558
|
+
|
|
559
|
+
One `pageTriggerCron` is shared by every page in every repo you point this plugin at. So a literal
|
|
560
|
+
`"0 3 * * *"` does not schedule _a_ refresh at 03:00 — it schedules **all** of them at 03:00, five
|
|
561
|
+
pages per bank, on the same worker pool that serves retain. A session ingesting at 03:0x queues
|
|
562
|
+
behind the pile, and moving the hour just moves the pile.
|
|
563
|
+
|
|
564
|
+
Write a field as `H` and it is replaced, per page, by a value hashed from the bank id and the page
|
|
565
|
+
name. Each page gets its own slot, the same slot on every run:
|
|
566
|
+
|
|
567
|
+
| `pageTriggerCron` | what each page gets |
|
|
568
|
+
| ------------------ | ------------------------------------------------------ |
|
|
569
|
+
| `"H H * * *"` | once a day, at its own minute and hour |
|
|
570
|
+
| `"H * * * *"` | once an hour, at its own minute |
|
|
571
|
+
| `"H 3 * * *"` | daily at 03:MM — spread inside the hour you chose |
|
|
572
|
+
| `"H H(0-5) * * *"` | daily, spread across 00:00–05:59 only |
|
|
573
|
+
| `"0 3 * * *"` | no `H`, no hashing — exactly what it says, all at once |
|
|
574
|
+
|
|
575
|
+
`H` is [Jenkins' syntax](https://www.jenkins.io/doc/book/pipeline/syntax/#cron-syntax) for the same
|
|
576
|
+
problem. It never reaches the API: the plugin resolves it to an ordinary cron expression
|
|
577
|
+
(`"41 17 * * *"`) when it creates the page, so the schedule you see in the control plane is a plain
|
|
578
|
+
one you can edit. Hashing spreads pages out, it does not partition them — two pages can still land
|
|
579
|
+
on the same minute, just not all of them.
|
|
580
|
+
|
|
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.
|
|
515
590
|
|
|
516
591
|
### A bank you shape yourself — `manageBankConfig`
|
|
517
592
|
|