claude-recall 0.30.0 → 0.30.1
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 +6 -2
- package/dist/hooks/kiro-classifier.js +9 -0
- package/docs/kiro-llm-capture.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -123,7 +123,11 @@ tail -5 ~/.claude-recall/hook-logs/hook-dispatcher.log
|
|
|
123
123
|
|
|
124
124
|
The log should show a `scope [...] → project=your-project` line; `claude-recall kiro doctor` gives a fuller health report.
|
|
125
125
|
|
|
126
|
-
> **Capture uses Kiro's own LLM — no API key needed.** To decide what's worth remembering, the capture hook classifies each prompt
|
|
126
|
+
> **Capture uses Kiro's own LLM — no API key needed.** To decide what's worth remembering, the capture hook classifies each prompt via a headless `kiro-cli chat --no-interactive --model …` call (through a bundled bare `claude-recall-classifier` agent). So natural statements like "my favourite color is green" are captured without any `ANTHROPIC_API_KEY` and without the `store_memory` MCP tool — which matters under enterprise governance that blocks the MCP server. It runs in a detached background worker, so your turn is never blocked; it spends ~0.06 Kiro credits per prompt.
|
|
127
|
+
>
|
|
128
|
+
> **The classifier uses a dedicated, fixed model — not your chat model.** It always runs the model in `CLAUDE_RECALL_KIRO_MODEL` (default `claude-haiku-4.5`, chosen because classification is cheap and high-volume), **independent of your interactive Kiro chat model** (e.g. `auto`). This keeps classification cost predictable no matter what your chat is set to. Set `CLAUDE_RECALL_KIRO_MODEL` to any model from `kiro-cli chat --list-models` to change it. Every successful classification is logged to `~/.claude-recall/hook-logs/kiro-classifier.log` as `classified via kiro-cli (model=…, Kiro credits, no API key)`, so you can always see which model ran.
|
|
129
|
+
>
|
|
130
|
+
> **Under Kiro the included LLM is used first even if you happen to have `ANTHROPIC_API_KEY` set** — so a key exported for other tools won't quietly spend your Anthropic credits. Order: Kiro's LLM → `ANTHROPIC_API_KEY` (if present) → regex; set `CLAUDE_RECALL_PREFER_API_KEY=1` to force your key first (e.g. for a stronger model you pay for). Details in [docs/kiro-llm-capture.md](docs/kiro-llm-capture.md).
|
|
127
131
|
|
|
128
132
|
**Option B — MCP tools only (no hooks, works in Kiro's default agent).**
|
|
129
133
|
|
|
@@ -563,7 +567,7 @@ Runtime behavior can be tuned via environment variables. Defaults are chosen so
|
|
|
563
567
|
| ---------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------- |
|
|
564
568
|
| `CLAUDE_RECALL_DB_PATH` | `~/.claude-recall/` | Database directory. |
|
|
565
569
|
| `ANTHROPIC_API_KEY` | _(unset)_ | LLM classification via Haiku. Not required — Claude Code provides it to its hooks, and under Kiro the included LLM is used instead (and is preferred even if this is set). Regex is the final fallback. |
|
|
566
|
-
| `CLAUDE_RECALL_KIRO_MODEL` | `claude-haiku-4.5` |
|
|
570
|
+
| `CLAUDE_RECALL_KIRO_MODEL` | `claude-haiku-4.5` | Dedicated model for Kiro-LLM capture classification — **independent of your interactive Kiro chat model**. Raise to `claude-sonnet-4.6` for steadier judgement at more credits. See [docs/kiro-llm-capture.md](docs/kiro-llm-capture.md). |
|
|
567
571
|
| `CLAUDE_RECALL_PREFER_API_KEY` | _(unset)_ | Under Kiro, force `ANTHROPIC_API_KEY`-based classification ahead of Kiro's included LLM (uses your Anthropic credits — e.g. for a stronger model). No effect under Claude Code. |
|
|
568
572
|
| `CLAUDE_RECALL_KIRO_LLM_TIMEOUT_MS` | `30000` | Hard cap on the headless `kiro-cli` classify call before the capture worker gives up and falls back to regex. |
|
|
569
573
|
| `CLAUDE_RECALL_LOAD_BUDGET_TOKENS` | `2000` | Token budget for the `load_rules` payload. Rules are emitted in priority order (corrections → preferences by citation → devops by citation → failures) and dropped rules surface via `search_memory`. |
|
|
@@ -154,6 +154,15 @@ function classifyWithKiro(text) {
|
|
|
154
154
|
if (!result) {
|
|
155
155
|
(0, shared_1.hookLog)('kiro-classifier', 'no parseable classification in kiro-cli output');
|
|
156
156
|
}
|
|
157
|
+
else {
|
|
158
|
+
// Log success too, not just failures — otherwise a successful Kiro
|
|
159
|
+
// classification is silent and indistinguishable from "never ran",
|
|
160
|
+
// which makes "did the Kiro LLM handle this?" impossible to answer
|
|
161
|
+
// from the log. Spell out that this ran on Kiro credits (not the
|
|
162
|
+
// ANTHROPIC_API_KEY) using a dedicated classifier model — the `model`
|
|
163
|
+
// is CLAUDE_RECALL_KIRO_MODEL, independent of the interactive chat model.
|
|
164
|
+
(0, shared_1.hookLog)('kiro-classifier', `classified via kiro-cli (model=${model}, Kiro credits, no API key): ${result.type} — ${result.extract.slice(0, 60)}`);
|
|
165
|
+
}
|
|
157
166
|
done(result);
|
|
158
167
|
});
|
|
159
168
|
});
|
package/docs/kiro-llm-capture.md
CHANGED
|
@@ -114,7 +114,7 @@ returns `null`, degrading to regex — a hook must never throw.
|
|
|
114
114
|
| Variable | Default | Effect |
|
|
115
115
|
| --- | --- | --- |
|
|
116
116
|
| `CLAUDE_RECALL_KIRO_CLASSIFIER` | *(set by the worker)* | Enables the Kiro-LLM path in `classifyContent`. Set automatically by `kiro-capture-worker`; never needed by hand. |
|
|
117
|
-
| `CLAUDE_RECALL_KIRO_MODEL` | `claude-haiku-4.5` | Model for the classify call. Raise to `claude-sonnet-4.6` for steadier judgement at ~3× the credits. |
|
|
117
|
+
| `CLAUDE_RECALL_KIRO_MODEL` | `claude-haiku-4.5` | Model for the classify call, passed explicitly as `--model`. This is a **dedicated classifier model, independent of the user's interactive Kiro chat model** (e.g. `auto`) — the headless call always uses this value. Raise to `claude-sonnet-4.6` for steadier judgement at ~3× the credits. |
|
|
118
118
|
| `CLAUDE_RECALL_KIRO_LLM_TIMEOUT_MS` | `30000` | Hard cap on the headless call before the worker gives up and falls back to regex. |
|
|
119
119
|
| `CLAUDE_RECALL_PREFER_API_KEY` | *(unset)* | Force `ANTHROPIC_API_KEY`-based classification ahead of Kiro's included LLM (opt-in; uses your Anthropic credits). |
|
|
120
120
|
|
package/package.json
CHANGED