@kurrent/kcap 0.8.18 → 0.9.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/kcap/.codex-mcp.json
CHANGED
package/kcap/.mcp.json
CHANGED
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
"args": ["mcp", "flows"],
|
|
16
16
|
"cwd": "${CLAUDE_PROJECT_DIR}",
|
|
17
17
|
"description": "Structured AI review flows — start_review_flow, submit_review_round, get_review_flow_status, close_review_flow. Launches a SEPARATE hosted reviewer agent through your daemon and iterates to sign-off; requires `kcap login` and a running daemon with this repo checked out (the tools are inert otherwise). Use only when the user explicitly asks for a review flow / to submit for review — for an ordinary 'review my PR' or 'code review' request, review directly and do not call these tools."
|
|
18
|
+
},
|
|
19
|
+
"kcap-memory": {
|
|
20
|
+
"command": "kcap",
|
|
21
|
+
"args": ["mcp", "memory"],
|
|
22
|
+
"cwd": "${CLAUDE_PROJECT_DIR}",
|
|
23
|
+
"description": "Team memory — search, read, and save durable learnings scoped to you, your team, or the org."
|
|
18
24
|
}
|
|
19
25
|
}
|
|
20
26
|
}
|
package/kcap/README.md
CHANGED
|
@@ -31,6 +31,21 @@ PR review context tools. Each PR-scoped tool accepts an optional `pr` argument (
|
|
|
31
31
|
| `list_sessions` | Sessions that contributed to the PR | optional |
|
|
32
32
|
| `get_transcript` | Full transcript of a specific session | n/a (keys off `session_id`) |
|
|
33
33
|
|
|
34
|
+
### `kcap-memory`
|
|
35
|
+
|
|
36
|
+
Search, save, and update durable team memories — preferences, feedback, project facts, and references scoped to you, your team, or the org.
|
|
37
|
+
|
|
38
|
+
| Tool | Description |
|
|
39
|
+
|------|-------------|
|
|
40
|
+
| `search_memories` | Hybrid semantic + keyword search over memories visible to you |
|
|
41
|
+
| `get_memory` | Fetch a memory's full content by id or slug |
|
|
42
|
+
| `save_memory` | Save a new memory (`audience`, `slug`, `description`, `content`, `kind`); scoped to the cwd repo unless `global: true` |
|
|
43
|
+
| `update_memory` | Update an existing memory's description/content/kind |
|
|
44
|
+
| `rescope_memory` | Change a memory's audience (e.g. promote user → team/org) |
|
|
45
|
+
| `archive_memory` | Soft-delete a memory |
|
|
46
|
+
|
|
47
|
+
Repo- and machine-aware: it resolves the cwd to a repo hash and the local persisted machine id at startup to scope saves and bias search results.
|
|
48
|
+
|
|
34
49
|
`kcap mcp judge` is intentionally not auto-registered. Add it with `claude mcp add kcap-judge -- kcap mcp judge` if you want it.
|
|
35
50
|
|
|
36
51
|
**Hooks** — Automatically captures session activity and forwards it to the Kurrent Capacitor server:
|
|
@@ -15,7 +15,7 @@ description: >-
|
|
|
15
15
|
kcap-sessions MCP tools.
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
> **For agents:** When the `kcap-sessions` MCP server is available, prefer its tools (`search_sessions`, `get_session_summary`, `get_session_transcript`) for retrieving past sessions. This CLI-wrapped skill remains a fallback for shell use and when MCP isn't installed.
|
|
18
|
+
> **For agents:** When the `kcap-sessions` MCP server is available, prefer its tools (`search_sessions`, `get_session_summary`, `list_turns`, `get_turn`, `get_session_transcript`) for retrieving past sessions. This CLI-wrapped skill remains a fallback for shell use and when MCP isn't installed.
|
|
19
19
|
|
|
20
20
|
# Session Recap
|
|
21
21
|
|
|
@@ -26,7 +26,7 @@ Retrieve session history recorded by Kurrent Capacitor. Supports single-session
|
|
|
26
26
|
**IMPORTANT:** Always use the `kcap recap` CLI command. Do NOT call the HTTP API directly via `curl`, `WebFetch`, or `HttpClient` — the CLI handles formatting, error handling, and server URL resolution.
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
# Current session summary
|
|
29
|
+
# Current session summary + per-turn outline (default)
|
|
30
30
|
kcap recap
|
|
31
31
|
|
|
32
32
|
# Full transcript (all prompts, responses, file changes)
|
|
@@ -41,10 +41,17 @@ kcap recap --chain --full
|
|
|
41
41
|
# Recent session summaries for the current repository
|
|
42
42
|
kcap recap --repo
|
|
43
43
|
|
|
44
|
+
# Compact per-turn metadata index (no prose)
|
|
45
|
+
kcap recap --per-turn
|
|
46
|
+
|
|
47
|
+
# One turn's full transcript, drilling down from the outline
|
|
48
|
+
kcap recap --get-turn <N>
|
|
49
|
+
|
|
44
50
|
# Explicit session ID (overrides env var)
|
|
45
51
|
kcap recap <sessionId>
|
|
46
52
|
kcap recap --full <sessionId>
|
|
47
53
|
kcap recap --chain <sessionId>
|
|
54
|
+
kcap recap --get-turn <N> <sessionId>
|
|
48
55
|
```
|
|
49
56
|
|
|
50
57
|
`kcap recap` resolves the current session id from the environment when the host agent CLI exposes one. If no session id is available, pass it explicitly: `kcap recap <sessionId>`.
|
|
@@ -61,14 +68,35 @@ Returns AI-generated summaries from the most recent ended sessions in the curren
|
|
|
61
68
|
|
|
62
69
|
**Progressive disclosure:** Start with `--repo` for the overview. If a specific session's summary is relevant, drill into it with `kcap recap --full <sessionId>` to get the complete transcript. This avoids loading full transcripts for all sessions into context.
|
|
63
70
|
|
|
64
|
-
## Default Output
|
|
71
|
+
## Default Output
|
|
72
|
+
|
|
73
|
+
`kcap recap` (no flags) prints, in order:
|
|
74
|
+
|
|
75
|
+
1. **`## Plan`** — the plan captured for the session, if any.
|
|
76
|
+
2. **`## Summary`** — an AI-generated narrative covering:
|
|
77
|
+
- **Context** — why the work was done
|
|
78
|
+
- **Key decisions** — trade-offs and design choices that matter for future work
|
|
79
|
+
- **Unfinished/Risks** — anything deferred or left incomplete
|
|
80
|
+
3. **`## Turns`** — an outline with one line per turn:
|
|
81
|
+
- If the turn has a prose summary, that summary (1-3 sentences).
|
|
82
|
+
- Otherwise, a truncated user-prompt excerpt plus tool/file metadata (tool names, file count).
|
|
83
|
+
4. A closing pointer: `→ kcap recap --get-turn <N> [sessionId]` for one turn's full detail.
|
|
84
|
+
|
|
85
|
+
A session that has turns but no summary yet (generation hasn't run, or an ended session has no `whats_done`/`plan` entry) still shows the `## Turns` outline — only the plan/summary blocks are skipped. If there's neither a summary nor any turns (e.g. an active session with no recorded turns), recap prints a hint to use `--full` instead.
|
|
86
|
+
|
|
87
|
+
With `--chain`, this same summary + outline is rendered per session under a `# Session <id>` header, oldest first.
|
|
88
|
+
|
|
89
|
+
## Turn-by-turn drill-down
|
|
90
|
+
|
|
91
|
+
Once you've read the `## Turns` outline, fetch one turn's complete transcript (user prompt, tool calls + results, assistant text):
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
kcap recap --get-turn <N> [sessionId]
|
|
95
|
+
```
|
|
65
96
|
|
|
66
|
-
|
|
67
|
-
- **Context** — why the work was done
|
|
68
|
-
- **Key decisions** — trade-offs and design choices that matter for future work
|
|
69
|
-
- **Unfinished/Risks** — anything deferred or left incomplete
|
|
97
|
+
For a plain metadata index instead of the outline (turn #, prompt excerpt, tool names, file count, token count, time range — no prose), use `kcap recap --per-turn [sessionId]`.
|
|
70
98
|
|
|
71
|
-
|
|
99
|
+
**MCP agents:** call `list_turns` to get a session's full turn map (`turn_index`, `prose`, `user_prompt`, `tools`, `files`, token counts), then `get_turn(session_id, turn_index)` for one turn's full transcript. Use `get_session_summary` for the whole-session narrative instead of drilling into individual turns.
|
|
72
100
|
|
|
73
101
|
## Full Output (`--full`)
|
|
74
102
|
|
|
@@ -85,8 +113,10 @@ When using `--chain`, sessions are separated by `# Session <id>` headers, and ag
|
|
|
85
113
|
## When to Use Each Flag
|
|
86
114
|
|
|
87
115
|
- **`--repo`** (`kcap recap --repo`) — recent session summaries across the repo (start here for "what did we do recently?")
|
|
88
|
-
- **No flags** (`kcap recap`) —
|
|
89
|
-
- **`--
|
|
116
|
+
- **No flags** (`kcap recap`) — summary + per-turn outline for the current session
|
|
117
|
+
- **`--per-turn`** (`kcap recap --per-turn`) — compact metadata index per turn (prompt excerpt, tools, files, tokens, time), no prose
|
|
118
|
+
- **`--get-turn <N>`** (`kcap recap --get-turn <N>`) — one turn's full transcript, drilling down from the outline or the per-turn index
|
|
119
|
+
- **`--full`** (`kcap recap --full`) — whole transcript: exact prompts, responses, and file contents for a specific session
|
|
90
120
|
- **`--chain`** (`kcap recap --chain`) — understanding the full history of a task that spanned multiple sessions
|
|
91
121
|
- **`--chain --full`** — complete transcript across all continuations
|
|
92
122
|
|
|
@@ -97,7 +127,7 @@ The `KCAP_URL` environment variable overrides the default server URL (`http://lo
|
|
|
97
127
|
## Tips
|
|
98
128
|
|
|
99
129
|
- **For "what have we been working on?"** — use `--repo` first, then drill into specific sessions.
|
|
100
|
-
- Start with the default summary.
|
|
130
|
+
- Start with the default summary + turn outline. Drill into a specific turn with `--get-turn <N>` before reaching for `--full`.
|
|
101
131
|
- When continuing work from a previous session, use `--chain` to get summaries across continuations.
|
|
102
132
|
- Summarize key decisions and changes for the user rather than echoing the full recap output verbatim.
|
|
103
133
|
- The `kcap` CLI must be available on PATH (typically installed at `~/.local/bin/kcap`).
|
|
@@ -68,7 +68,7 @@ if FINDINGS:
|
|
|
68
68
|
|
|
69
69
|
| Tool | Required args | Optional args | When to call |
|
|
70
70
|
|---|---|---|---|
|
|
71
|
-
| `start_review_flow` | `kind` (`spec-review`\|`code-review`), `target_kind` (what is being reviewed: `spec`, `code`, `pr`, `branch`, `file`, etc.), `target_ref` (a path, branch name, or PR URL/number that identifies the target), `target_title` (short human-readable title, e.g. spec name or PR title), `context` (background context: what to focus on, constraints, definition of done) | `instructions`, `mode` (`context-only` —
|
|
71
|
+
| `start_review_flow` | `kind` (`spec-review`\|`code-review`), `target_kind` (what is being reviewed: `spec`, `code`, `pr`, `branch`, `file`, etc.), `target_ref` (a path, branch name, or PR URL/number that identifies the target), `target_title` (short human-readable title, e.g. spec name or PR title), `context` (background context: what to focus on, constraints, definition of done) | `instructions`, `mode` (`context-only` — optional; by default, on the same machine, the reviewer's worktree is mirrored from your working tree including uncommitted changes, so it reads the actual source. Pass `context-only` to opt out and treat the submitted context as authoritative) | Once, at the start of a review task. |
|
|
72
72
|
| `submit_review_round` | `flow_run_id`, `context` | `instructions` | After addressing findings. Pass the same `flow_run_id` and the updated context. |
|
|
73
73
|
| `get_review_flow_status` | `flow_run_id` | — | Poll or check the current status of a flow (running, waiting, completed, failed). |
|
|
74
74
|
| `close_review_flow` | `flow_run_id` | — | Only after the reviewer returns `NO FINDINGS`. |
|
|
@@ -76,14 +76,14 @@ if FINDINGS:
|
|
|
76
76
|
## Example (code review)
|
|
77
77
|
|
|
78
78
|
```
|
|
79
|
-
# Step 1 — start (all five required args must be provided;
|
|
79
|
+
# Step 1 — start (all five required args must be provided; on the same machine the reviewer sees
|
|
80
|
+
# your working tree, uncommitted changes included — pass mode="context-only" to opt out)
|
|
80
81
|
start_review_flow(
|
|
81
82
|
kind="code-review",
|
|
82
83
|
target_kind="branch",
|
|
83
84
|
target_ref="feature/add-null-check",
|
|
84
85
|
target_title="Add null check on user input",
|
|
85
|
-
context="Review the diff on this branch for correctness and adherence to project conventions."
|
|
86
|
-
mode="context-only"
|
|
86
|
+
context="Review the diff on this branch for correctness and adherence to project conventions."
|
|
87
87
|
)
|
|
88
88
|
# → returns flow_run_id, e.g. "flow_abc123"
|
|
89
89
|
# → reviewer returns FINDINGS: missing null check on line 42
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kurrent/kcap",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "CLI companion for Kurrent Capacitor — records and visualizes Claude Code sessions",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"repository": {
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"postinstall": "node bin/postinstall.js"
|
|
15
15
|
},
|
|
16
16
|
"optionalDependencies": {
|
|
17
|
-
"@kurrent/kcap-darwin-arm64": "0.
|
|
18
|
-
"@kurrent/kcap-linux-x64": "0.
|
|
19
|
-
"@kurrent/kcap-linux-arm64": "0.
|
|
20
|
-
"@kurrent/kcap-linux-musl-x64": "0.
|
|
21
|
-
"@kurrent/kcap-linux-musl-arm64": "0.
|
|
22
|
-
"@kurrent/kcap-win-x64": "0.
|
|
17
|
+
"@kurrent/kcap-darwin-arm64": "0.9.0",
|
|
18
|
+
"@kurrent/kcap-linux-x64": "0.9.0",
|
|
19
|
+
"@kurrent/kcap-linux-arm64": "0.9.0",
|
|
20
|
+
"@kurrent/kcap-linux-musl-x64": "0.9.0",
|
|
21
|
+
"@kurrent/kcap-linux-musl-arm64": "0.9.0",
|
|
22
|
+
"@kurrent/kcap-win-x64": "0.9.0"
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"bin/",
|