@fingerskier/augment 0.1.10 → 0.2.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.
- package/README.md +20 -2
- package/dist/cli.d.ts +6 -0
- package/dist/cli.js +43 -2
- package/dist/cli.js.map +1 -1
- package/dist/constants.d.ts +3 -0
- package/dist/constants.js +19 -3
- package/dist/constants.js.map +1 -1
- package/dist/daemon/client.d.ts +5 -0
- package/dist/daemon/client.js +15 -6
- package/dist/daemon/client.js.map +1 -1
- package/dist/daemon/http.d.ts +1 -1
- package/dist/daemon/http.js +159 -53
- package/dist/daemon/http.js.map +1 -1
- package/dist/daemon/main.js +15 -1
- package/dist/daemon/main.js.map +1 -1
- package/dist/daemon/scheduler.d.ts +17 -0
- package/dist/daemon/scheduler.js +77 -0
- package/dist/daemon/scheduler.js.map +1 -0
- package/dist/daemon/single-instance.d.ts +32 -0
- package/dist/daemon/single-instance.js +131 -0
- package/dist/daemon/single-instance.js.map +1 -0
- package/dist/db.d.ts +13 -1
- package/dist/db.js +166 -105
- package/dist/db.js.map +1 -1
- package/dist/hooks.js +28 -3
- package/dist/hooks.js.map +1 -1
- package/dist/install.d.ts +2 -0
- package/dist/install.js +41 -7
- package/dist/install.js.map +1 -1
- package/dist/mcp/server.js +30 -4
- package/dist/mcp/server.js.map +1 -1
- package/dist/recall.d.ts +2 -0
- package/dist/recall.js +1 -0
- package/dist/recall.js.map +1 -1
- package/dist/service.d.ts +64 -1
- package/dist/service.js +269 -35
- package/dist/service.js.map +1 -1
- package/dist/sleep.d.ts +43 -0
- package/dist/sleep.js +129 -0
- package/dist/sleep.js.map +1 -0
- package/dist/tally.d.ts +46 -0
- package/dist/tally.js +94 -0
- package/dist/tally.js.map +1 -0
- package/dist/types.d.ts +6 -0
- package/dist/util/text.d.ts +3 -0
- package/dist/util/text.js +26 -2
- package/dist/util/text.js.map +1 -1
- package/docs/FEATURES.md +155 -50
- package/docs/verify-memory-flow.md +28 -9
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ relying on the agent to remember to call the MCP tools:
|
|
|
7
7
|
| ------------------ | ---------------------------------- | ------ |
|
|
8
8
|
| `SessionStart` | `augment hook session-start` | Warms the daemon and registers the project. |
|
|
9
9
|
| `UserPromptSubmit` | `augment hook user-prompt-submit` | Recalls relevant memory and injects it as `additionalContext` **before** the model sees the prompt. |
|
|
10
|
-
| `PreToolUse` | `augment hook pre-tool-use` | Recalls **additional** memory keyed to the matched tool action (the edited file / the Bash command) and injects it as `additionalContext`. Matcher-scoped to `Edit\|Write\|Bash` to bound the hot path; injection-only (never blocks, gates, or rewrites a tool call). |
|
|
10
|
+
| `PreToolUse` | `augment hook pre-tool-use` | Recalls **additional** memory keyed to the matched tool action (the edited file / the Bash command) and injects it as `additionalContext`. Matcher-scoped to `Edit\|Write\|Bash` to bound the hot path; injection-only (never blocks, gates, or rewrites a tool call). Uses a raised relevance floor (`min_score` 0.45 — above the 0.4 search default, calibrated on the real model because tool queries are command/path-shaped, not prose) and injects each distinct query at most once per session. |
|
|
11
11
|
| `Stop` | `augment hook stop` | Blocks the turn **once** with a directive to upsert a memory, then allows the stop (loop-guarded per turn). |
|
|
12
12
|
|
|
13
13
|
`PreToolUse` fires before **every matched** tool call, so it is the only hook with a tool-name
|
|
@@ -33,7 +33,8 @@ npm test
|
|
|
33
33
|
Covers:
|
|
34
34
|
- `test/hooks.test.ts` — the stdin→stdout contract of every hook event
|
|
35
35
|
(UserPromptSubmit envelope, PreToolUse tool-query derivation + injection-only
|
|
36
|
-
envelope, Stop block-once loop guard,
|
|
36
|
+
envelope + 0.45 floor + per-session dedupe, Stop block-once loop guard,
|
|
37
|
+
fail-open paths).
|
|
37
38
|
- `test/recall.test.ts` — recall degrades to `""` on any failure (a hook must
|
|
38
39
|
never break the agent).
|
|
39
40
|
- `test/cli.test.ts` — the `recall` and `hook` CLI commands.
|
|
@@ -76,6 +77,17 @@ a cold machine, downloads the bge-small model — so the very first run is slow.
|
|
|
76
77
|
This is real-model retrieval; ranking quality (not just wiring) is what you're
|
|
77
78
|
eyeballing here.
|
|
78
79
|
|
|
80
|
+
Two footnotes on the examples: they omit `session_id`, which deliberately skips
|
|
81
|
+
the PreToolUse once-per-session dedupe — include one to demo it. And the Stop
|
|
82
|
+
loop-guard marker persists in the OS tmpdir, so re-running the stop example
|
|
83
|
+
later with the same `session_id`/`prompt_id` yields empty on the *first* call
|
|
84
|
+
too — use fresh ids per run.
|
|
85
|
+
|
|
86
|
+
For a binding version of the ranking-quality check, `npm run test:model` runs
|
|
87
|
+
the pinned real-bge abstention/recall tripwires
|
|
88
|
+
(`test/real-model-abstention.model.ts`) — what this layer can otherwise only
|
|
89
|
+
eyeball.
|
|
90
|
+
|
|
79
91
|
## 3. Real project (host-level hook firing)
|
|
80
92
|
|
|
81
93
|
1. Install into a repo (or user scope):
|
|
@@ -100,13 +112,20 @@ eyeballing here.
|
|
|
100
112
|
|
|
101
113
|
## Known caveats (logged, not blockers)
|
|
102
114
|
|
|
103
|
-
- **
|
|
104
|
-
|
|
105
|
-
|
|
115
|
+
- **Hook startup cost (resolved).** Hooks now invoke the install-time-provisioned
|
|
116
|
+
runtime directly (`node <prefix>/node_modules/@fingerskier/augment/dist/bin/augment.js
|
|
117
|
+
hook <event>`, tens of milliseconds) — the old `npm exec --yes` form paid a
|
|
118
|
+
multi-second npm bootstrap per event. Residual caveat: provisioning is
|
|
119
|
+
best-effort. If npm was missing at install time the installer prints a manual
|
|
120
|
+
`npm install --prefix <prefix> @fingerskier/augment` command and hooks fail
|
|
121
|
+
open (silent no-ops) until it is run. The MCP server itself still launches via
|
|
122
|
+
`npm exec`; only the hook hot path changed.
|
|
106
123
|
- **Claude hook activation depends on plugin install.** The MCP server is also
|
|
107
124
|
direct-registered (so the tools always exist), but the hooks live in the plugin;
|
|
108
125
|
if the plugin isn't installed, the loop degrades to the CLAUDE.md prose guidance.
|
|
109
|
-
- **Retrieval floor calibration.**
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
126
|
+
- **Retrieval floor calibration (resolved).** The `(cos+1)/2` mis-normalization
|
|
127
|
+
is fixed by an empirically-anchored cosine rescale (`SEMANTIC_COSINE_BASELINE`
|
|
128
|
+
0.33), and abstention is now proven on the real model by `npm run test:model`.
|
|
129
|
+
Remaining retrieval-quality follow-ups (Phase 2 dogfood tally, credential-warn,
|
|
130
|
+
HF revision pin) are tracked in `.council/memory/retrieval-quality-roadmap.md`
|
|
131
|
+
and [ROADMAP.md](../ROADMAP.md).
|