@pcircle/footprint 1.5.0 → 1.6.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.
Files changed (250) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +225 -123
  3. package/SKILL.md +72 -28
  4. package/bin/footprint.js +16 -0
  5. package/dist/src/adapters/claude.d.ts +2 -0
  6. package/dist/src/adapters/claude.d.ts.map +1 -0
  7. package/dist/src/adapters/claude.js +7 -0
  8. package/dist/src/adapters/claude.js.map +1 -0
  9. package/dist/src/adapters/codex.d.ts +2 -0
  10. package/dist/src/adapters/codex.d.ts.map +1 -0
  11. package/dist/src/adapters/codex.js +7 -0
  12. package/dist/src/adapters/codex.js.map +1 -0
  13. package/dist/src/adapters/gemini.d.ts +2 -0
  14. package/dist/src/adapters/gemini.d.ts.map +1 -0
  15. package/dist/src/adapters/gemini.js +7 -0
  16. package/dist/src/adapters/gemini.js.map +1 -0
  17. package/dist/src/adapters/index.d.ts +5 -0
  18. package/dist/src/adapters/index.d.ts.map +1 -0
  19. package/dist/src/adapters/index.js +12 -0
  20. package/dist/src/adapters/index.js.map +1 -0
  21. package/dist/src/adapters/structured-prefix.d.ts +10 -0
  22. package/dist/src/adapters/structured-prefix.d.ts.map +1 -0
  23. package/dist/src/adapters/structured-prefix.js +59 -0
  24. package/dist/src/adapters/structured-prefix.js.map +1 -0
  25. package/dist/src/adapters/types.d.ts +32 -0
  26. package/dist/src/adapters/types.d.ts.map +1 -0
  27. package/dist/src/adapters/types.js +2 -0
  28. package/dist/src/adapters/types.js.map +1 -0
  29. package/dist/src/cli/context-flow.d.ts +92 -0
  30. package/dist/src/cli/context-flow.d.ts.map +1 -0
  31. package/dist/src/cli/context-flow.js +724 -0
  32. package/dist/src/cli/context-flow.js.map +1 -0
  33. package/dist/src/cli/history-display.d.ts +27 -0
  34. package/dist/src/cli/history-display.d.ts.map +1 -0
  35. package/dist/src/cli/history-display.js +167 -0
  36. package/dist/src/cli/history-display.js.map +1 -0
  37. package/dist/src/cli/index.js +924 -0
  38. package/dist/src/cli/index.js.map +1 -1
  39. package/dist/src/cli/launch-spec.d.ts +31 -0
  40. package/dist/src/cli/launch-spec.d.ts.map +1 -0
  41. package/dist/src/cli/launch-spec.js +182 -0
  42. package/dist/src/cli/launch-spec.js.map +1 -0
  43. package/dist/src/cli/live-demo.d.ts +34 -0
  44. package/dist/src/cli/live-demo.d.ts.map +1 -0
  45. package/dist/src/cli/live-demo.js +254 -0
  46. package/dist/src/cli/live-demo.js.map +1 -0
  47. package/dist/src/cli/pty-transcript.d.ts +34 -0
  48. package/dist/src/cli/pty-transcript.d.ts.map +1 -0
  49. package/dist/src/cli/pty-transcript.js +174 -0
  50. package/dist/src/cli/pty-transcript.js.map +1 -0
  51. package/dist/src/cli/session-display.d.ts +74 -0
  52. package/dist/src/cli/session-display.d.ts.map +1 -0
  53. package/dist/src/cli/session-display.js +922 -0
  54. package/dist/src/cli/session-display.js.map +1 -0
  55. package/dist/src/cli/session-execution.d.ts +55 -0
  56. package/dist/src/cli/session-execution.d.ts.map +1 -0
  57. package/dist/src/cli/session-execution.js +817 -0
  58. package/dist/src/cli/session-execution.js.map +1 -0
  59. package/dist/src/cli/session-runtime.d.ts +5 -0
  60. package/dist/src/cli/session-runtime.d.ts.map +1 -0
  61. package/dist/src/cli/session-runtime.js +11 -0
  62. package/dist/src/cli/session-runtime.js.map +1 -0
  63. package/dist/src/cli/setup.d.ts.map +1 -1
  64. package/dist/src/cli/setup.js +2 -0
  65. package/dist/src/cli/setup.js.map +1 -1
  66. package/dist/src/index.d.ts +4 -0
  67. package/dist/src/index.d.ts.map +1 -1
  68. package/dist/src/index.js +148 -7
  69. package/dist/src/index.js.map +1 -1
  70. package/dist/src/ingestion/deterministic.d.ts +3 -0
  71. package/dist/src/ingestion/deterministic.d.ts.map +1 -0
  72. package/dist/src/ingestion/deterministic.js +862 -0
  73. package/dist/src/ingestion/deterministic.js.map +1 -0
  74. package/dist/src/ingestion/index.d.ts +5 -0
  75. package/dist/src/ingestion/index.d.ts.map +1 -0
  76. package/dist/src/ingestion/index.js +27 -0
  77. package/dist/src/ingestion/index.js.map +1 -0
  78. package/dist/src/ingestion/semantic.d.ts +6 -0
  79. package/dist/src/ingestion/semantic.d.ts.map +1 -0
  80. package/dist/src/ingestion/semantic.js +627 -0
  81. package/dist/src/ingestion/semantic.js.map +1 -0
  82. package/dist/src/ingestion/types.d.ts +10 -0
  83. package/dist/src/ingestion/types.d.ts.map +1 -0
  84. package/dist/src/ingestion/types.js +2 -0
  85. package/dist/src/ingestion/types.js.map +1 -0
  86. package/dist/src/lib/context-memory.d.ts +140 -0
  87. package/dist/src/lib/context-memory.d.ts.map +1 -0
  88. package/dist/src/lib/context-memory.js +974 -0
  89. package/dist/src/lib/context-memory.js.map +1 -0
  90. package/dist/src/lib/history-handoff.d.ts +43 -0
  91. package/dist/src/lib/history-handoff.d.ts.map +1 -0
  92. package/dist/src/lib/history-handoff.js +179 -0
  93. package/dist/src/lib/history-handoff.js.map +1 -0
  94. package/dist/src/lib/observability.d.ts +3 -0
  95. package/dist/src/lib/observability.d.ts.map +1 -0
  96. package/dist/src/lib/observability.js +63 -0
  97. package/dist/src/lib/observability.js.map +1 -0
  98. package/dist/src/lib/session-artifacts.d.ts +51 -0
  99. package/dist/src/lib/session-artifacts.d.ts.map +1 -0
  100. package/dist/src/lib/session-artifacts.js +132 -0
  101. package/dist/src/lib/session-artifacts.js.map +1 -0
  102. package/dist/src/lib/session-filters.d.ts +11 -0
  103. package/dist/src/lib/session-filters.d.ts.map +1 -0
  104. package/dist/src/lib/session-filters.js +16 -0
  105. package/dist/src/lib/session-filters.js.map +1 -0
  106. package/dist/src/lib/session-history.d.ts +50 -0
  107. package/dist/src/lib/session-history.d.ts.map +1 -0
  108. package/dist/src/lib/session-history.js +73 -0
  109. package/dist/src/lib/session-history.js.map +1 -0
  110. package/dist/src/lib/session-trends.d.ts +129 -0
  111. package/dist/src/lib/session-trends.d.ts.map +1 -0
  112. package/dist/src/lib/session-trends.js +361 -0
  113. package/dist/src/lib/session-trends.js.map +1 -0
  114. package/dist/src/lib/storage/database.d.ts +212 -1
  115. package/dist/src/lib/storage/database.d.ts.map +1 -1
  116. package/dist/src/lib/storage/database.js +1694 -114
  117. package/dist/src/lib/storage/database.js.map +1 -1
  118. package/dist/src/lib/storage/export-sessions.d.ts +33 -0
  119. package/dist/src/lib/storage/export-sessions.d.ts.map +1 -0
  120. package/dist/src/lib/storage/export-sessions.js +525 -0
  121. package/dist/src/lib/storage/export-sessions.js.map +1 -0
  122. package/dist/src/lib/storage/index.d.ts +7 -6
  123. package/dist/src/lib/storage/index.d.ts.map +1 -1
  124. package/dist/src/lib/storage/index.js +6 -5
  125. package/dist/src/lib/storage/index.js.map +1 -1
  126. package/dist/src/lib/storage/schema.d.ts +6 -1
  127. package/dist/src/lib/storage/schema.d.ts.map +1 -1
  128. package/dist/src/lib/storage/schema.js +337 -2
  129. package/dist/src/lib/storage/schema.js.map +1 -1
  130. package/dist/src/lib/storage/types.d.ts +122 -0
  131. package/dist/src/lib/storage/types.d.ts.map +1 -1
  132. package/dist/src/prompts/skill-prompt.d.ts.map +1 -1
  133. package/dist/src/prompts/skill-prompt.js +13 -0
  134. package/dist/src/prompts/skill-prompt.js.map +1 -1
  135. package/dist/src/tools/confirm-context-link.d.ts +62 -0
  136. package/dist/src/tools/confirm-context-link.d.ts.map +1 -0
  137. package/dist/src/tools/confirm-context-link.js +36 -0
  138. package/dist/src/tools/confirm-context-link.js.map +1 -0
  139. package/dist/src/tools/context-schemas.d.ts +694 -0
  140. package/dist/src/tools/context-schemas.d.ts.map +1 -0
  141. package/dist/src/tools/context-schemas.js +171 -0
  142. package/dist/src/tools/context-schemas.js.map +1 -0
  143. package/dist/src/tools/export-sessions.d.ts +111 -0
  144. package/dist/src/tools/export-sessions.d.ts.map +1 -0
  145. package/dist/src/tools/export-sessions.js +136 -0
  146. package/dist/src/tools/export-sessions.js.map +1 -0
  147. package/dist/src/tools/get-context.d.ts +208 -0
  148. package/dist/src/tools/get-context.d.ts.map +1 -0
  149. package/dist/src/tools/get-context.js +27 -0
  150. package/dist/src/tools/get-context.js.map +1 -0
  151. package/dist/src/tools/get-history-handoff.d.ts +109 -0
  152. package/dist/src/tools/get-history-handoff.d.ts.map +1 -0
  153. package/dist/src/tools/get-history-handoff.js +85 -0
  154. package/dist/src/tools/get-history-handoff.js.map +1 -0
  155. package/dist/src/tools/get-history-trends.d.ts +155 -0
  156. package/dist/src/tools/get-history-trends.d.ts.map +1 -0
  157. package/dist/src/tools/get-history-trends.js +123 -0
  158. package/dist/src/tools/get-history-trends.js.map +1 -0
  159. package/dist/src/tools/get-session-artifacts.d.ts +151 -0
  160. package/dist/src/tools/get-session-artifacts.d.ts.map +1 -0
  161. package/dist/src/tools/get-session-artifacts.js +184 -0
  162. package/dist/src/tools/get-session-artifacts.js.map +1 -0
  163. package/dist/src/tools/get-session-decisions.d.ts +69 -0
  164. package/dist/src/tools/get-session-decisions.d.ts.map +1 -0
  165. package/dist/src/tools/get-session-decisions.js +99 -0
  166. package/dist/src/tools/get-session-decisions.js.map +1 -0
  167. package/dist/src/tools/get-session-messages.d.ts +55 -0
  168. package/dist/src/tools/get-session-messages.d.ts.map +1 -0
  169. package/dist/src/tools/get-session-messages.js +89 -0
  170. package/dist/src/tools/get-session-messages.js.map +1 -0
  171. package/dist/src/tools/get-session-narrative.d.ts +72 -0
  172. package/dist/src/tools/get-session-narrative.d.ts.map +1 -0
  173. package/dist/src/tools/get-session-narrative.js +106 -0
  174. package/dist/src/tools/get-session-narrative.js.map +1 -0
  175. package/dist/src/tools/get-session-timeline.d.ts +55 -0
  176. package/dist/src/tools/get-session-timeline.d.ts.map +1 -0
  177. package/dist/src/tools/get-session-timeline.js +93 -0
  178. package/dist/src/tools/get-session-timeline.js.map +1 -0
  179. package/dist/src/tools/get-session-trends.d.ts +108 -0
  180. package/dist/src/tools/get-session-trends.d.ts.map +1 -0
  181. package/dist/src/tools/get-session-trends.js +130 -0
  182. package/dist/src/tools/get-session-trends.js.map +1 -0
  183. package/dist/src/tools/get-session.d.ts +251 -0
  184. package/dist/src/tools/get-session.d.ts.map +1 -0
  185. package/dist/src/tools/get-session.js +290 -0
  186. package/dist/src/tools/get-session.js.map +1 -0
  187. package/dist/src/tools/index.d.ts +22 -0
  188. package/dist/src/tools/index.d.ts.map +1 -1
  189. package/dist/src/tools/index.js +22 -0
  190. package/dist/src/tools/index.js.map +1 -1
  191. package/dist/src/tools/list-contexts.d.ts +50 -0
  192. package/dist/src/tools/list-contexts.d.ts.map +1 -0
  193. package/dist/src/tools/list-contexts.js +28 -0
  194. package/dist/src/tools/list-contexts.js.map +1 -0
  195. package/dist/src/tools/list-sessions.d.ts +86 -0
  196. package/dist/src/tools/list-sessions.d.ts.map +1 -0
  197. package/dist/src/tools/list-sessions.js +97 -0
  198. package/dist/src/tools/list-sessions.js.map +1 -0
  199. package/dist/src/tools/merge-contexts.d.ts +58 -0
  200. package/dist/src/tools/merge-contexts.d.ts.map +1 -0
  201. package/dist/src/tools/merge-contexts.js +27 -0
  202. package/dist/src/tools/merge-contexts.js.map +1 -0
  203. package/dist/src/tools/move-session-context.d.ts +62 -0
  204. package/dist/src/tools/move-session-context.d.ts.map +1 -0
  205. package/dist/src/tools/move-session-context.js +33 -0
  206. package/dist/src/tools/move-session-context.js.map +1 -0
  207. package/dist/src/tools/reingest-session.d.ts +31 -0
  208. package/dist/src/tools/reingest-session.d.ts.map +1 -0
  209. package/dist/src/tools/reingest-session.js +43 -0
  210. package/dist/src/tools/reingest-session.js.map +1 -0
  211. package/dist/src/tools/reject-context-link.d.ts +58 -0
  212. package/dist/src/tools/reject-context-link.d.ts.map +1 -0
  213. package/dist/src/tools/reject-context-link.js +26 -0
  214. package/dist/src/tools/reject-context-link.js.map +1 -0
  215. package/dist/src/tools/resolve-context.d.ts +287 -0
  216. package/dist/src/tools/resolve-context.d.ts.map +1 -0
  217. package/dist/src/tools/resolve-context.js +35 -0
  218. package/dist/src/tools/resolve-context.js.map +1 -0
  219. package/dist/src/tools/search-history.d.ts +86 -0
  220. package/dist/src/tools/search-history.d.ts.map +1 -0
  221. package/dist/src/tools/search-history.js +103 -0
  222. package/dist/src/tools/search-history.js.map +1 -0
  223. package/dist/src/tools/session-ui-metadata.d.ts +15 -0
  224. package/dist/src/tools/session-ui-metadata.d.ts.map +1 -0
  225. package/dist/src/tools/session-ui-metadata.js +15 -0
  226. package/dist/src/tools/session-ui-metadata.js.map +1 -0
  227. package/dist/src/tools/set-active-context.d.ts +58 -0
  228. package/dist/src/tools/set-active-context.d.ts.map +1 -0
  229. package/dist/src/tools/set-active-context.js +26 -0
  230. package/dist/src/tools/set-active-context.js.map +1 -0
  231. package/dist/src/tools/split-context.d.ts +62 -0
  232. package/dist/src/tools/split-context.d.ts.map +1 -0
  233. package/dist/src/tools/split-context.js +36 -0
  234. package/dist/src/tools/split-context.js.map +1 -0
  235. package/dist/src/tools/verify-footprint.js +1 -1
  236. package/dist/src/tools/verify-footprint.js.map +1 -1
  237. package/dist/src/types.d.ts +2 -0
  238. package/dist/src/types.d.ts.map +1 -1
  239. package/dist/src/ui/register.d.ts +6 -1
  240. package/dist/src/ui/register.d.ts.map +1 -1
  241. package/dist/src/ui/register.js +60 -16
  242. package/dist/src/ui/register.js.map +1 -1
  243. package/dist/ui/dashboard.html +236 -865
  244. package/dist/ui/detail.html +107 -248
  245. package/dist/ui/export.html +115 -298
  246. package/dist/ui/session-dashboard-live.html +264 -0
  247. package/dist/ui/session-dashboard.html +329 -0
  248. package/dist/ui/session-detail-live.html +336 -0
  249. package/dist/ui/session-detail.html +355 -0
  250. package/package.json +49 -9
package/LICENSE CHANGED
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
package/README.md CHANGED
@@ -3,168 +3,243 @@
3
3
  [![npm version](https://img.shields.io/npm/v/@pcircle/footprint)](https://www.npmjs.com/package/@pcircle/footprint)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
5
5
 
6
- MCP server that automatically captures and encrypts AI conversations as verifiable records with Git timestamps and end-to-end encryption.
6
+ Project site: [footprint.memesh.ai](https://footprint.memesh.ai/)
7
7
 
8
- ## Why Footprint?
8
+ `@pcircle/footprint` is a local-first MCP server for AI-assisted work continuity. It gives you one place to:
9
9
 
10
- - **Prove IP Ownership** Timestamped evidence of AI-assisted work
11
- - **Zero Effort** Automatic capture via MCP protocol
12
- - **Privacy First** — End-to-end encrypted, locally stored
13
- - **Legally Valid** Git timestamps + SHA-256 checksums
10
+ - keep a usable history of ongoing AI-assisted work, including context memory and handoff-friendly summaries
11
+ - preserve specific conversations as encrypted evidence when they need verification and export
12
+
13
+ It is open source. No seats, no usage pricing, and no hosted-memory lock-in.
14
+
15
+ The session recorder preserves raw transcript and timeline data first, then derives artifacts, narratives, decisions, and user-correctable context threads from that source history.
16
+
17
+ Interactive sessions use `script`-backed PTY transport on BSD/macOS and Linux. BSD/macOS replays native `script -r` transcripts, while Linux replays util-linux advanced timing logs so transcript attribution stays consistent across platforms.
18
+
19
+ ## Start Here
20
+
21
+ If you are new to Footprint, use this order:
22
+
23
+ 1. [Open the project site](https://footprint.memesh.ai/) and look at the product screenshots first.
24
+ 2. Run `npx @pcircle/footprint setup` to try it quickly, or install the CLI with `npm install -g @pcircle/footprint`.
25
+ 3. If you are still using the quick `npx` path, open the local product with `npx @pcircle/footprint demo --open`. If you installed the CLI, use `footprint demo --open`.
26
+ 4. Start recording real work with `footprint run ...`.
14
27
 
15
28
  ## Quick Start
16
29
 
30
+ If you only want to see the product locally first:
31
+
17
32
  ```bash
18
33
  npx @pcircle/footprint setup
34
+ npx @pcircle/footprint demo --open
19
35
  ```
20
36
 
21
- The interactive wizard auto-detects your system, validates your encryption password, and configures Claude Desktop automatically.
37
+ If you want the CLI installed for repeated use:
22
38
 
23
- ### Manual Configuration
39
+ ```bash
40
+ npm install -g @pcircle/footprint
41
+ footprint setup
42
+ ```
24
43
 
25
- Add to Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
44
+ If you want to start recording live CLI work immediately:
26
45
 
27
- ```json
28
- {
29
- "mcpServers": {
30
- "footprint": {
31
- "command": "npx",
32
- "args": ["@pcircle/footprint"],
33
- "env": {
34
- "FOOTPRINT_DATA_DIR": "/path/to/footprint-data",
35
- "FOOTPRINT_PASSPHRASE": "your-secure-passphrase"
36
- }
37
- }
38
- }
39
- }
46
+ ```bash
47
+ footprint run claude -- <args...>
48
+ footprint run gemini -- <args...>
49
+ footprint run codex -- <args...>
50
+ ```
51
+
52
+ If you want Footprint to suggest the right context before a run begins:
53
+
54
+ ```bash
55
+ footprint run codex --prepare-context -- <args...>
56
+ ```
57
+
58
+ ### Install And Configure
59
+
60
+ ```bash
61
+ npx @pcircle/footprint setup
62
+ ```
63
+
64
+ Persistent install:
65
+
66
+ ```bash
67
+ npm install -g @pcircle/footprint
68
+ footprint setup
69
+ ```
70
+
71
+ The setup wizard:
72
+
73
+ - creates the local data directory
74
+ - validates the passphrase
75
+ - configures Claude Desktop when available
76
+ - optionally appends environment variables to the active shell rc file
77
+
78
+ Node.js `>=22` is required.
79
+
80
+ If you stay on the quick `npx` path, use `npx @pcircle/footprint ...` for later commands too. The bare `footprint` command is only available after a global install.
81
+
82
+ ### Open The Local Live Product
83
+
84
+ ```bash
85
+ npx @pcircle/footprint demo
40
86
  ```
41
87
 
42
- For Claude Code, add to `~/.claude/mcp_settings.json` with the same structure.
88
+ If you installed the CLI globally, use `footprint demo` or `footprint demo --open`.
43
89
 
44
- ## MCP Tools (9 tools)
90
+ This starts a local browser-facing surface for the current Footprint database and prints a localhost URL for:
45
91
 
46
- ### capture-footprint
92
+ - the session dashboard
93
+ - deep-linked session detail pages
94
+ - context review and correction flows
95
+ - export and handoff interactions
47
96
 
48
- Capture and encrypt an LLM conversation. Use when: user explicitly asks to save, or high-value content (IP, legal, business, research, compliance).
97
+ Optional flags:
49
98
 
50
- | Parameter | Required | Description |
51
- | ---------------- | -------- | ------------------------------------------------------------------ |
52
- | `conversationId` | Yes | Unique ID, format: `{topic}-{descriptor}-{YYYY-MM-DD}` |
53
- | `content` | Yes | Full conversation text including both human and assistant messages |
54
- | `tags` | No | Comma-separated tags |
55
- | `llmProvider` | No | Provider name (default: `"unknown"`) |
56
- | `messageCount` | No | Number of messages (auto-calculated from content if omitted) |
99
+ ```bash
100
+ footprint demo --host 127.0.0.1 --port 4310
101
+ footprint demo --open
102
+ ```
57
103
 
58
- ### list-footprints
104
+ Recorder inspection commands:
59
105
 
60
- List all captured evidence with pagination.
106
+ ```bash
107
+ footprint sessions list [--query "<text>"] [--issue-key "<issue-key>"] [--host <claude|gemini|codex>] [--status <running|completed|failed|interrupted>]
108
+ footprint session show <session-id> [--message-limit <n>] [--message-offset <n>] [--trend-limit <n>] [--trend-offset <n>] [--timeline-limit <n>] [--timeline-offset <n>] [--artifact-limit <n>] [--artifact-offset <n>] [--narrative-limit <n>] [--narrative-offset <n>] [--decision-limit <n>] [--decision-offset <n>]
109
+ footprint session ingest <session-id>
110
+ footprint session export <session-id> [--group-by <issue|family>]
111
+ footprint session messages <session-id> [--limit <n>] [--offset <n>]
112
+ footprint session trends <session-id> [--limit <n>] [--offset <n>]
113
+ footprint session timeline <session-id> [--limit <n>] [--offset <n>]
114
+ footprint session artifacts <session-id> [--limit <n>] [--offset <n>]
115
+ footprint session narratives <session-id> [--kind <journal|project-summary|handoff>] [--limit <n>] [--offset <n>]
116
+ footprint session decisions <session-id> [--limit <n>] [--offset <n>]
117
+ footprint history search "<query>" [--host <claude|gemini|codex>] [--status <running|completed|failed|interrupted>]
118
+ footprint history trends [--query "<text>"] [--issue-key "<issue-key>"] [--host <claude|gemini|codex>] [--status <running|completed|failed|interrupted>] [--group-by <issue|family>]
119
+ footprint history handoff [--query "<text>"] [--issue-key "<issue-key>"] [--host <claude|gemini|codex>] [--status <running|completed|failed|interrupted>] [--group-by <issue|family>]
120
+ ```
61
121
 
62
- | Parameter | Required | Description |
63
- | --------- | -------- | ------------------------------ |
64
- | `limit` | No | Results per page (default: 10) |
65
- | `offset` | No | Pagination offset |
66
- | `tags` | No | Filter by tags |
122
+ Context memory commands:
67
123
 
68
- ### get-footprint
124
+ ```bash
125
+ footprint contexts list
126
+ footprint context resolve [--session <session-id>] [--cwd <path>] [--title "<text>"] [--host <claude|gemini|codex>]
127
+ footprint context prepare [--session <session-id>] [--cwd <path>] [--title "<text>"] [--host <claude|gemini|codex>] [--interactive] [--json]
128
+ footprint context show <context-id>
129
+ footprint context confirm <session-id> [<session-id> ...] [--context <context-id>] [--label "<label>"] [--set-preferred]
130
+ footprint context reject <session-id> --context <context-id>
131
+ footprint context move <session-id> [--context <context-id>] [--label "<label>"] [--set-preferred]
132
+ footprint context merge <source-context-id> <target-context-id>
133
+ footprint context split <context-id> --sessions <session-id,session-id,...> [--label "<label>"] [--set-preferred]
134
+ footprint context activate <context-id> [--cwd <path>]
135
+ footprint demo [--host <address>] [--port <number>] [--open]
136
+ ```
69
137
 
70
- Retrieve and decrypt specific evidence by ID.
138
+ Add `--json` to the query commands above when you want scriptable output.
71
139
 
72
- | Parameter | Required | Description |
73
- | --------- | -------- | ----------- |
74
- | `id` | Yes | Evidence ID |
140
+ ### Run As An MCP Server
75
141
 
76
- ### search-footprints
142
+ When invoked without a CLI subcommand, Footprint starts the MCP server on stdio.
77
143
 
78
- Search conversations by query, tags, and date range. Query matches conversationId and tags (LIKE). Tags filter uses AND logic.
144
+ ### Manual MCP Configuration
79
145
 
80
- | Parameter | Required | Description |
81
- | ---------- | -------- | ------------------------------ |
82
- | `query` | No | Search text |
83
- | `tags` | No | Array of tags (AND logic) |
84
- | `dateFrom` | No | Start date (ISO 8601) |
85
- | `dateTo` | No | End date (ISO 8601) |
86
- | `limit` | No | Results per page (default: 10) |
87
- | `offset` | No | Pagination offset |
146
+ Claude Desktop example:
88
147
 
89
- ### export-footprints
148
+ ```json
149
+ {
150
+ "mcpServers": {
151
+ "footprint": {
152
+ "command": "npx",
153
+ "args": ["@pcircle/footprint"],
154
+ "env": {
155
+ "FOOTPRINT_DATA_DIR": "/path/to/footprint-data",
156
+ "FOOTPRINT_PASSPHRASE": "your-secure-passphrase"
157
+ }
158
+ }
159
+ }
160
+ }
161
+ ```
90
162
 
91
- Export evidence to encrypted ZIP archive.
163
+ For Claude Code, use the same server definition in `~/.claude/mcp_settings.json`.
92
164
 
93
- | Parameter | Required | Description |
94
- | ------------- | -------- | ----------------------------------------------------- |
95
- | `evidenceIds` | No | Specific IDs to export (all if omitted) |
96
- | `outputMode` | No | `"file"`, `"base64"`, or `"both"` (default: `"both"`) |
165
+ ## Product Surfaces
97
166
 
98
- ### verify-footprint
167
+ ### Session History And Context Memory
99
168
 
100
- Verify evidence integrity using stored checksums and Git timestamps.
169
+ Use the recorder when you care about staying in the right line of work, seeing what happened, and handing it off cleanly:
101
170
 
102
- | Parameter | Required | Description |
103
- | --------- | -------- | ----------- |
104
- | `id` | Yes | Evidence ID |
171
+ - ordered user and assistant transcript
172
+ - wrapper and adapter timeline events
173
+ - command and test activity with richer command intent classification
174
+ - file and git changes
175
+ - conservative context-thread suggestions for new or resumed sessions
176
+ - canonical context briefings with current truth, blockers, open questions, active decisions, and superseded decisions
177
+ - correction operations so users can confirm, reject, move, merge, split, and prefer contexts instead of accepting black-box auto-linking
178
+ - cross-session issue trends built from execution-backed retries and failures, with optional broader failure-family grouping
179
+ - derived narratives and decisions, including retry-aware handoff summaries and clustered issue rollups
180
+ - downloadable ZIP handoff bundles with raw and derived session state
105
181
 
106
- Returns: `integrityVerified`, `checksumValid`, `gitTimestamp`
182
+ Primary MCP tools:
107
183
 
108
- ### delete-footprints
184
+ - `list-sessions`
185
+ - `list-contexts`
186
+ - `get-context`
187
+ - `resolve-context`
188
+ - `confirm-context-link`
189
+ - `reject-context-link`
190
+ - `move-session-context`
191
+ - `merge-contexts`
192
+ - `split-context`
193
+ - `set-active-context`
194
+ - `get-session`
195
+ - `export-sessions`
196
+ - `get-session-messages`
197
+ - `get-session-trends`
198
+ - `get-session-timeline`
199
+ - `get-session-artifacts`
200
+ - `get-session-narrative`
201
+ - `get-session-decisions`
202
+ - `search-history`
203
+ - `get-history-trends`
204
+ - `get-history-handoff`
205
+ - `reingest-session`
109
206
 
110
- Permanently delete evidence records. Uses two-step confirmation.
207
+ Primary UI resources:
111
208
 
112
- | Parameter | Required | Description |
113
- | --------------- | -------- | ---------------------------------------------------- |
114
- | `evidenceIds` | Yes | Array of evidence IDs |
115
- | `confirmDelete` | No | Set `true` to confirm (default: `false` for preview) |
209
+ - `ui://footprint/session-dashboard.html`
210
+ - `ui://footprint/session-detail.html`
116
211
 
117
- ### suggest-capture
212
+ ### Encrypted Evidence
118
213
 
119
- AI-powered capture suggestion based on keyword analysis.
214
+ Use the evidence flow when you need a discrete preserved record of a conversation.
120
215
 
121
- | Parameter | Required | Description |
122
- | --------- | -------- | ------------------------------- |
123
- | `content` | Yes | Conversation content to analyze |
216
+ Primary MCP tools:
124
217
 
125
- ### manage-tags
218
+ - `capture-footprint`
219
+ - `list-footprints`
220
+ - `get-footprint`
221
+ - `search-footprints`
222
+ - `export-footprints`
223
+ - `verify-footprint`
224
+ - `delete-footprints`
225
+ - `manage-tags`
226
+ - `suggest-capture`
126
227
 
127
- Unified tag management with three actions: `stats`, `rename`, `remove`.
228
+ Primary UI resources:
128
229
 
129
- | Parameter | Required | Description |
130
- | --------- | ---------- | ------------------------------------- |
131
- | `action` | Yes | `"stats"` \| `"rename"` \| `"remove"` |
132
- | `tag` | For remove | Tag to remove |
133
- | `oldTag` | For rename | Current tag name |
134
- | `newTag` | For rename | New tag name |
230
+ - `ui://footprint/dashboard.html`
231
+ - `ui://footprint/detail.html`
232
+ - `ui://footprint/export.html`
135
233
 
136
- ## MCP Prompts (3 prompts)
234
+ ## Storage Model
137
235
 
138
- - **`footprint-skill`** Full agent behavior guide (decision tree, triggers, workflows, error recovery)
139
- - **`footprint-quick-ref`** — Condensed quick reference for tool selection and tag conventions
140
- - **`footprint-should-capture`** — Semantic decision framework for evaluating capture worthiness (takes `conversationSummary` argument)
236
+ Footprint uses one local SQLite database with three logical models:
141
237
 
142
- ## Architecture
238
+ - evidence tables for encrypted conversation capture
239
+ - session-history tables for recorder transcript, events, artifacts, narratives, and decisions
240
+ - context tables for canonical context threads, explicit corrections, and workspace preferences
143
241
 
144
- ```
145
- packages/mcp-server/
146
- ├── src/
147
- │ ├── index.ts # Main MCP server
148
- │ ├── prompts/ # MCP prompt handlers
149
- │ │ └── skill-prompt.ts
150
- │ ├── tools/ # MCP tool handlers (9 tools)
151
- │ │ ├── capture-footprint.ts
152
- │ │ ├── list-footprints.ts
153
- │ │ ├── get-footprint.ts
154
- │ │ ├── search-footprints.ts
155
- │ │ ├── export-footprints.ts
156
- │ │ ├── verify-footprint.ts
157
- │ │ ├── delete-footprints.ts
158
- │ │ ├── suggest-capture.ts
159
- │ │ └── manage-tags.ts
160
- │ ├── analyzers/ # Content analysis
161
- │ ├── cli/ # Setup wizard
162
- │ ├── lib/
163
- │ │ ├── crypto/ # XChaCha20-Poly1305 + Argon2id
164
- │ │ └── storage/ # SQLite + Git timestamps
165
- │ └── ui/ # Interactive dashboards
166
- └── tests/
167
- ```
242
+ Evidence content is encrypted at rest. Session history is preserved as raw transcript plus raw timeline, derived views can be regenerated through `reingest-session`, and session exports package both raw and derived views into a portable ZIP archive. Context threading is suggestion-first and correction-driven: unresolved sessions stay isolated until the user confirms a canonical link. Cross-session filtering is backed by cached session-history text and exact issue-key rows inside SQLite so search and list surfaces stay incremental as histories grow.
168
243
 
169
244
  ## Security
170
245
 
@@ -175,22 +250,49 @@ packages/mcp-server/
175
250
 
176
251
  > **Store your password securely** — loss means permanent data loss.
177
252
 
253
+ ## Architecture
254
+
255
+ Key runtime components:
256
+
257
+ - MCP server registration in `src/index.ts`
258
+ - CLI setup and recorder runtime in `src/cli/`
259
+ - host adapters in `src/adapters/`
260
+ - deterministic and semantic ingestion in `src/ingestion/`
261
+ - SQLite schema and persistence in `src/lib/storage/`
262
+ - MCP app resource registration in `src/ui/register.ts`
263
+
264
+ See [ARCHITECTURE.md](./ARCHITECTURE.md) for further reading.
265
+
266
+ ## Prompts
267
+
268
+ Footprint registers three prompts for MCP clients:
269
+
270
+ - `footprint-skill`
271
+ - `footprint-quick-ref`
272
+ - `footprint-should-capture`
273
+
178
274
  ## Development
179
275
 
180
276
  ```bash
181
- git clone https://github.com/PCIRCLE-AI/footprint.git
182
- cd footprint
277
+ git clone https://github.com/PCIRCLE-AI/footprint-mcp.git
278
+ cd footprint-mcp
183
279
  pnpm install
184
280
  pnpm build
185
- pnpm test
281
+ pnpm test:run
186
282
  ```
187
283
 
188
- ## Support
284
+ Repository CI runs Ubuntu and macOS jobs: Ubuntu covers install, lint, tarball install smoke, the default Vitest suite, the Linux PTY smoke path, browser-mode session UI tests, and the package publish gate; macOS covers recorder-focused PTY tests plus a real BSD `script -r` smoke path.
285
+
286
+ `pnpm test:publish-gate` is the package-level release check. It runs audit, build, the package Vitest suite, and the tarball install smoke so `prepublishOnly` blocks releases that are not installable from the packed artifact.
287
+
288
+ Set `FOOTPRINT_DEBUG_PERF=1` when you want lightweight timing traces for reingest, history query, and export paths while debugging large session sets.
289
+
290
+ ## Links
189
291
 
190
- - [GitHub](https://github.com/PCIRCLE-AI/footprint)
191
- - [Issues](https://github.com/PCIRCLE-AI/footprint/issues)
192
- - [npm](https://www.npmjs.com/package/@pcircle/footprint)
193
- - [Website](https://footprint.memesh.ai)
292
+ - Repository: <https://github.com/PCIRCLE-AI/footprint-mcp>
293
+ - Package: <https://www.npmjs.com/package/@pcircle/footprint>
294
+ - Project site: <https://footprint.memesh.ai/>
295
+ - Issues: <https://github.com/PCIRCLE-AI/footprint-mcp/issues>
194
296
 
195
297
  ## License
196
298