@mickey-kras/hindsight-memory-router-coding-agents 0.8.2 → 0.8.7

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 (64) hide show
  1. package/DEVIATIONS.md +148 -31
  2. package/README.md +40 -14
  3. package/UPSTREAM.json +10 -10
  4. package/dist/antigravity-hook.js +13 -8
  5. package/dist/antigravity-statusline.js +1 -1
  6. package/dist/antigravity-stop-hook.js +13 -8
  7. package/dist/claude-hook.js +13 -8
  8. package/dist/claude-sessionstart-hook.js +13 -8
  9. package/dist/claude-stop-hook.js +13 -8
  10. package/dist/cline.js +51 -2
  11. package/dist/codebuddy-hook.js +13 -8
  12. package/dist/codebuddy-sessionstart-hook.js +13 -8
  13. package/dist/codebuddy-stop-hook.js +13 -8
  14. package/dist/codex-hook.js +13 -8
  15. package/dist/codex-sessionstart-hook.js +13 -8
  16. package/dist/codex-stop-hook.js +13 -8
  17. package/dist/copilot-hook.js +13 -8
  18. package/dist/copilot-sessionstart-hook.js +13 -8
  19. package/dist/copilot-stop-hook.js +13 -8
  20. package/dist/cursor-hook.js +13 -8
  21. package/dist/cursor-sessionstart-hook.js +13 -8
  22. package/dist/cursor-stop-hook.js +13 -8
  23. package/dist/dcode-hook.js +13 -8
  24. package/dist/dcode-sessionstart-hook.js +13 -8
  25. package/dist/dcode-stop-hook.js +13 -8
  26. package/dist/deepen.js +7 -3
  27. package/dist/devin-hook.js +13 -8
  28. package/dist/devin-sessionstart-hook.js +13 -8
  29. package/dist/devin-stop-hook.js +13 -8
  30. package/dist/droid-hook.js +13 -8
  31. package/dist/droid-sessionstart-hook.js +13 -8
  32. package/dist/droid-stop-hook.js +13 -8
  33. package/dist/dsh.js +51 -2
  34. package/dist/grok-hook.js +13 -8
  35. package/dist/grok-sessionstart-hook.js +13 -8
  36. package/dist/grok-stop-hook.js +13 -8
  37. package/dist/hindsight-seed.js +1 -1
  38. package/dist/index.js +51 -2
  39. package/dist/installer.js +13 -8
  40. package/dist/kilo.js +51 -2
  41. package/dist/kimi-hook.js +13 -8
  42. package/dist/kimi-sessionstart-hook.js +13 -8
  43. package/dist/kimi-stop-hook.js +13 -8
  44. package/dist/mcp-server.js +51 -2
  45. package/dist/opencode2.js +51 -2
  46. package/dist/pi.js +51 -2
  47. package/dist/prime-agent.js +51 -2
  48. package/dist/qwen-hook.js +13 -8
  49. package/dist/qwen-sessionstart-hook.js +13 -8
  50. package/dist/qwen-stop-hook.js +13 -8
  51. package/dist/status.js +1 -1
  52. package/dist/traecode-hook.js +13 -8
  53. package/dist/traecode-sessionstart-hook.js +13 -8
  54. package/dist/traecode-stop-hook.js +13 -8
  55. package/dist/workbuddy-hook.js +13 -8
  56. package/dist/workbuddy-sessionstart-hook.js +13 -8
  57. package/dist/workbuddy-stop-hook.js +13 -8
  58. package/dist/zcode-hook.js +13 -8
  59. package/dist/zcode-sessionstart-hook.js +13 -8
  60. package/dist/zcode-stop-hook.js +13 -8
  61. package/npm-shrinkwrap.json +730 -328
  62. package/package.json +10 -9
  63. package/plugin.json +1 -1
  64. package/skill/SKILL.md +113 -106
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mickey-kras/hindsight-memory-router-coding-agents",
3
- "version": "0.8.2",
3
+ "version": "0.8.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/mickey-kras/hindsight-memory-router-integrations.git",
@@ -99,16 +99,16 @@
99
99
  "@napi-rs/keyring": "2.1.1",
100
100
  "jsonc-parser": "^3.3.1",
101
101
  "smol-toml": "^1.9.1",
102
- "zod": "^4.6.5"
102
+ "zod": "^4.6.7"
103
103
  },
104
104
  "devDependencies": {
105
- "@opencode-ai/plugin": "^1.18.35",
105
+ "@opencode-ai/plugin": "^1.19.0",
106
106
  "@opencode-ai/sdk": "^1.18.9",
107
- "@opencode/plugin": "^2.0.26",
107
+ "@opencode/plugin": "^2.0.29",
108
108
  "@types/node": "22.20.5",
109
- "tsup": "^8.3.0",
109
+ "tsup": "^9.0.0",
110
110
  "typescript": "^5.6.0",
111
- "vitest": "^5.0.3"
111
+ "vitest": "^5.0.4"
112
112
  },
113
113
  "overrides": {
114
114
  "@opencode/plugin": {
@@ -116,10 +116,11 @@
116
116
  },
117
117
  "esbuild": ">=0.25.0 <1.0.0",
118
118
  "fast-uri": ">=3.1.6 <4.0.0",
119
- "hono": ">=4.13.7 <5.0.0",
119
+ "hono": ">=4.13.11 <5.0.0",
120
120
  "http-cache-semantics": "4.3.0",
121
- "ip-address": ">=10.5.1 <11.0.0",
121
+ "ip-address": ">=10.7.4 <11.0.0",
122
122
  "postcss": ">=8.5.23 <9.0.0",
123
- "vite": ">=6.4.3 <7.0.0"
123
+ "vite": ">=6.4.3 <7.0.0",
124
+ "toml": ">=5.0.1 <6.0.0"
124
125
  }
125
126
  }
package/plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hindsight-coding-agents",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Long-term project memory for coding agents",
5
5
  "skills": "./skill",
6
6
  "hooks": "./hooks/hooks.json",
package/skill/SKILL.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: hindsight-coding-agent
3
- description: How this machine's Hindsight coding-agent memory works — the plugin behind the 🧠 banner. Use when the user says "store/remember this in hindsight", asks what the memory/knowledge pages are, needs managed project memory setup or troubleshooting, or something memory-related looks broken.
3
+ description: Use this skill for the managed Hindsight coding-agent memory behind the 🧠 banner. Use it to store memories, explain knowledge pages, configure project memory, or investigate memory failures.
4
4
  ---
5
5
 
6
6
  <!-- GENERATED from skill-src/preamble.md + skill-src/managed-router.md.
@@ -8,78 +8,81 @@ description: How this machine's Hindsight coding-agent memory works — the plug
8
8
 
9
9
  # Hindsight Coding-Agent Memory
10
10
 
11
- This machine runs the managed Memory Router coding-agent integration. All memory requests go
12
- through the operator-provisioned HTTPS router and its per-principal bank grants. The router
13
- applies scanning, quarantine and quotas. A client setting cannot grant access.
11
+ This machine uses the managed Memory Router coding-agent integration.
12
+ All memory requests use the operator-provisioned HTTPS router and its per-principal bank grants.
13
+ The router applies scanning, quarantine and quotas. A client setting cannot grant access.
14
14
 
15
15
  ## Automatic lifecycle
16
16
 
17
- - The operator maps this project and harness to an explicit bank. Worktrees use their configured
18
- project mapping; no bank is created or selected from a repository name.
19
- - For writable principals, session-start hooks can seed and update memory from recent commits
20
- and a read-only codebase survey, and refresh coding knowledge pages. There is no manual ingest
21
- command needed for this background work. The operator provisions bank configuration and the
22
- coding missions/strategies before ingestion.
23
- - Session-start and prompt hooks inject memory according to `autoInject`: `reflect`, `pages`,
24
- `recall`, or `none`. Follow the injected retrieval guide when no memory is injected.
25
- - Writable sessions retain their transcripts automatically at session end; persistent harnesses
26
- also retain during the session. Read-only principals skip ingestion and write-back, and their
27
- write tools are unavailable. Respect `disabled` and `retainSessions` settings.
28
- - Use the tool names exposed by this harness. Examples below show the default `hindsight_`
29
- namespace; the installed skill and guidance use the operator's configured namespace.
30
-
31
- ## Storing things deliberately
32
-
33
- When the user says "store this in hindsight" / "remember this":
34
-
35
- - With writable access and session retention enabled, the **current conversation** is captured
36
- automatically at session end — say so; no tool needed.
37
- - An **external document, notes, or durable findings** → `hindsight_ingest_document(title, content)`.
38
- - A **new feature/initiative being started** → `hindsight_capture_initiative(title, summary)`,
39
- right after the plan is agreed and before code is written.
40
- - A **plan that materially changed** (goal, scope, or rationale — including mid-implementation) →
41
- call `hindsight_capture_initiative` again with `relates_to_page_id` set to that initiative's page
42
- id, summarising the _current_ intent. Same page, updated plan — never a second page. Trivial
43
- course-corrections don't count.
44
-
45
- ## Retrieving
46
-
47
- - `hindsight_search_knowledge_pages(query)` — FIRST STOP for project questions (components,
48
- conventions, past decisions, initiatives). Server-side hybrid search, fast.
49
- - `hindsight_read_knowledge_page(page_id)` / `hindsight_list_knowledge_pages` — read pages fully.
50
- - `hindsight_reflect(query)` — deep reasoning over the whole memory for WHY questions and exact
51
- decided values; slower (seconds), use deliberately.
52
- - Credit visibly whenever memory informs an answer: start that part with
53
- `🧠 From Hindsight memory (<page>): …` — and never credit memory that didn't contribute.
54
-
55
- ## Correcting wrong or stale memory
56
-
57
- If you verify that something Hindsight served is wrong or outdated (the code, git, or an external
58
- source contradicts it), FIX THE RECORD — don't just ignore it. Call
59
- `hindsight_ingest_document` with:
60
-
61
- - **title**: `Correction: <topic>` (e.g. `Correction: retry policy 4xx set`)
62
- - **content**: (1) what memory claimed, (2) what is verifiably true now, (3) the evidence you
63
- checked (file/commit/output). Quote exact values verbatim.
64
-
65
- Include the evidence in the correction so future retrieval can resolve the conflict. With read-only
66
- access, report the verified correction for an authorized writer; do not attempt a write or change
67
- credentials.
17
+ - The operator maps this project and harness to an explicit bank.
18
+ Worktrees use their configured project mapping. The integration does not create or select a bank from a repository name.
19
+ - For writable principals, session-start hooks can seed and update memory from recent commits and a read-only codebase survey.
20
+ These hooks can also refresh coding knowledge pages. This background work does not need a manual ingest command.
21
+ The operator configures banks and coding missions and strategies before ingestion.
22
+ - Session-start and prompt hooks inject memory according to `autoInject`: `reflect`, `pages`, `recall`, or `none`.
23
+ If hooks inject no memory, follow the injected retrieval guide.
24
+ - Writable sessions retain their transcripts automatically at session end.
25
+ Persistent harnesses also retain transcripts during the session.
26
+ Read-only principals skip ingestion and write-back. Their write tools are unavailable.
27
+ Obey the `disabled` and `retainSessions` settings.
28
+ - Use the tool names that this harness exposes.
29
+ The examples below use the default `hindsight_` namespace.
30
+ The installed skill and guidance use the operator's configured namespace.
31
+
32
+ ## Store information
33
+
34
+ When the user says "store this in hindsight" or "remember this", use these rules:
35
+
36
+ - With writable access and session retention, the integration captures the current conversation automatically at session end.
37
+ Tell the user. No tool call is necessary.
38
+ - For external documents, notes, or durable findings, use `hindsight_ingest_document(title, content)`.
39
+ - For a new feature or initiative, use `hindsight_capture_initiative(title, summary)` after agreement on the plan and before code changes.
40
+ - If the goal, scope, or rationale changes materially, call `hindsight_capture_initiative` again.
41
+ This includes changes during implementation.
42
+ Set `relates_to_page_id` to the initiative's page ID. Describe the current intent.
43
+ Update the same page. Do not create a second page for the changed plan.
44
+ Small corrections do not need this update.
45
+
46
+ ## Retrieve information
47
+
48
+ - For project questions, first use `hindsight_search_knowledge_pages(query)`.
49
+ Questions can concern components, conventions, past decisions, or initiatives.
50
+ This tool uses fast hybrid search on the server.
51
+ - To read complete pages, use `hindsight_read_knowledge_page(page_id)` or `hindsight_list_knowledge_pages`.
52
+ - For reasons and exact agreed values, use `hindsight_reflect(query)`.
53
+ This tool reasons over the complete memory. It is slower and takes seconds. Use it when necessary.
54
+ - If memory contributes to an answer, start that part with `🧠 From Hindsight memory (<page>): …`.
55
+ Do not credit memory that did not contribute.
56
+
57
+ ## Correct incorrect or stale memory
58
+
59
+ If code, git, or an external source disproves retrieved memory or shows that it needs an update, correct the record.
60
+ Do not only ignore it. Call `hindsight_ingest_document` with these fields:
61
+
62
+ - **title**: `Correction: <topic>` (for example, `Correction: retry policy 4xx set`).
63
+ - **content**: State the memory's claim, the verified current fact, and the evidence from a file, commit, or output.
64
+ Quote exact values without changes.
65
+
66
+ Include the evidence so that future retrieval can resolve the conflict.
67
+ With read-only access, report the verified correction to an authorized writer.
68
+ Do not try to write or change credentials.
68
69
 
69
70
  ## Managed setup and updates
70
71
 
71
- Use the existing operator-provisioned `HINDSIGHT_ROUTER_CONFIG` absolute path and named credential
72
- environment variables. The operator supplies the HTTPS router URL, principal grants, project bank
73
- mapping and optional tool namespace. `HINDSIGHT_MCP_HARNESS` selects the trusted harness identity
74
- when needed. Launch the harness in the same provisioned environment from a mapped project.
72
+ Use the existing operator-provisioned `HINDSIGHT_ROUTER_CONFIG` absolute path and named credential environment variables.
73
+ The operator supplies the HTTPS router URL, principal grants, project bank mapping and optional tool namespace.
74
+ When necessary, `HINDSIGHT_MCP_HARNESS` selects the trusted harness identity.
75
+ Start the harness in the same configured environment from a mapped project.
75
76
 
76
- Do not ask the user to paste JSON or credentials, edit the managed JSON, copy tokens into harness
77
- settings, or start a memory server. Missing provisioning or ambiguous identity requires the
78
- operator to repair the deployment. Unmapped projects and missing credentials fail closed.
77
+ Do not ask the user to paste JSON or credentials.
78
+ Do not edit the managed JSON, copy tokens into harness settings, or start a memory server.
79
+ If configuration is missing or identity is ambiguous, the operator must repair the deployment.
80
+ Unmapped projects and missing credentials stop access.
79
81
 
80
- Install or update only using the integration's pinned release tarball. Select the release and
81
- package version from the same published release, verify the artifact against that release's
82
- `PACKAGE_SHA256`, and run:
82
+ Use only the integration's pinned release tarball to install or update the integration.
83
+ Select the release and package version from the same published release.
84
+ Check the artifact against that release's `PACKAGE_SHA256`.
85
+ Run this command:
83
86
 
84
87
  ```sh
85
88
  npm exec --yes --package=/absolute/path/verified-coding-agents.tgz -- hindsight-coding-agents install
@@ -87,48 +90,52 @@ npm exec --yes --package=/absolute/path/verified-coding-agents.tgz -- hindsight-
87
90
 
88
91
  The release download path is:
89
92
  `https://github.com/mickey-kras/hindsight-memory-router-integrations/releases/download/v<release>/mickey-kras-hindsight-memory-router-coding-agents-<package-version>.tgz`.
90
- Do not leave version placeholders unresolved. Explicit `install codex`, another supported harness,
91
- or `install all` is available when the existing managed configuration supports it. The installer
92
- checks the selected principals, credentials, project mapping and adapter prerequisites before
93
- changing the host. For Codex, export `HINDSIGHT_ROUTER_CONFIG` before installation so the installer
94
- can allowlist the required environment variable names without embedding their values.
95
-
96
- After changing the operator's credential environment variable name or tool namespace, reinstall
97
- from the verified artifact. Namespace changes require reinstalling the companion skill and tool
98
- registration together. The managed tool prefix controls tool definitions and guidance; ordinary
99
- per-bank settings cannot override it.
100
-
101
- ## Checking the integration
102
-
103
- Check the session banner and available memory tools first. Use `hindsight_sync_status` for ingestion
104
- progress and `hindsight_diagnose` for sanitized diagnostic information when these tools are available.
105
- If memory seems stale, inspect progress before repeating ingestion or inventing another bank.
106
- Use the diagnostics to confirm the current project bank. Ask the operator to verify assigned bank
107
- grants and project mappings in the managed configuration when access or bank selection is unclear.
108
-
109
- Missing hooks or tools usually require reinstalling the selected harness from the verified artifact
110
- with its managed environment. Review the harness's plugin/hook registration and sanitized logs;
111
- never print credential values. A 401/403 stops requests for that credential. Ask the operator to
112
- resolve authorization and restart with the provisioned credential; do not try another principal,
113
- URL or bank. Rate limits and quarantine decisions are enforced by the router and are not bypassed
114
- by local settings. Continue coding without memory when the harness fails open, and state any
115
- material lack of memory evidence.
116
-
117
- Operational coding-agent settings such as `autoInject`, `retainSessions`, `disabled`, git survey
118
- limits and logging may be configured by the operator in the supported coding-agent settings.
119
- The managed routing boundary owns bank access and transport; do not create banks, rewrite bank
120
- configuration, provision servers or substitute a provider client. Background ingestion and hooks
121
- use the same router boundary as interactive tools.
93
+ Replace all version placeholders.
94
+ If the existing managed configuration supports it, use explicit `install codex`, another supported harness, or `install all`.
95
+ Before host changes, the installer checks the selected principals, credentials, project mapping and adapter prerequisites.
96
+
97
+ For Codex, export `HINDSIGHT_ROUTER_CONFIG` before installation.
98
+ The installer can then allow the required environment variable names without storing their values.
99
+
100
+ If the operator's credential environment variable name or tool namespace changes, reinstall from the verified artifact.
101
+ Namespace changes need reinstallation of the companion skill and tool registration together.
102
+ The managed tool prefix controls tool definitions and guidance. Ordinary per-bank settings cannot override it.
103
+
104
+ ## Check the integration
105
+
106
+ First, check the session banner and available memory tools.
107
+ If available, use `hindsight_sync_status` for ingestion progress.
108
+ If available, use `hindsight_diagnose` for diagnostics with sensitive data removed.
109
+ If memory seems stale, inspect progress before another ingestion try or selection of another bank.
110
+
111
+ Use the diagnostics to confirm the current project bank.
112
+ If access or bank selection is unclear, ask the operator to check assigned bank grants and managed project mappings.
113
+
114
+ Missing hooks or tools usually need reinstallation of the selected harness from the verified artifact with its managed environment.
115
+ Review the harness's registration of plugins and hooks and logs with sensitive data removed. Never print credential values.
116
+ A 401/403 response stops requests for that credential.
117
+
118
+ Ask the operator to resolve authorization and restart with the configured credential.
119
+ Do not try another principal, URL or bank.
120
+ The router enforces rate limits and quarantine decisions. Local settings cannot bypass them.
121
+
122
+ If the harness permits work without memory, continue coding. State any material lack of memory evidence.
123
+
124
+ The operator can configure supported coding-agent settings such as `autoInject`, `retainSessions`, `disabled`, git survey limits and logging.
125
+ Through managed routing, the integration controls transport and access to banks.
126
+ Do not create banks, change bank configuration, configure servers, or substitute a provider client.
127
+ Background ingestion and hooks use the same router boundary as interactive tools.
122
128
 
123
129
  ### Optional branding
124
130
 
125
- The operator may set `toolPrefix` in the same managed router JSON. The default `hindsight_`
126
- keeps the upstream names. Tool, skill, registration and display names derive from that one
127
- value. Package
128
- names, `HINDSIGHT_*` environment variables, configuration paths, principals and bank grants
129
- remain unchanged. Use the names registered in the current session; do not guess aliases.
131
+ The operator can set `toolPrefix` in the same managed router JSON.
132
+ The default `hindsight_` keeps the upstream names.
133
+ Tool, skill, registration and display names derive from that one value.
134
+ Package names, `HINDSIGHT_*` environment variables, configuration paths, principals and bank grants do not change.
135
+
136
+ Use the names registered in the current session. Do not guess aliases.
130
137
 
131
- A branding change requires the pinned installer (`install` or `update`) and a fresh session.
132
- The installer migrates only managed entries and refuses unrelated name collisions. A stale
133
- managed skill namespace fails closed until reinstall; never repair this by changing bank
134
- assignments, credentials or the operational memory workflow above.
138
+ A branding change requires the pinned installer (`install` or `update`) and a new session.
139
+ The installer migrates only managed entries and rejects unrelated name collisions.
140
+ A stale managed skill namespace stops access until reinstallation.
141
+ Do not repair this condition through changes to bank assignments, credentials or the operational memory workflow above.