@pcircle/footprint 1.3.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.
- package/LICENSE +1 -1
- package/README.md +215 -137
- package/SKILL.md +77 -33
- package/bin/footprint.js +16 -0
- package/dist/src/adapters/claude.d.ts +2 -0
- package/dist/src/adapters/claude.d.ts.map +1 -0
- package/dist/src/adapters/claude.js +7 -0
- package/dist/src/adapters/claude.js.map +1 -0
- package/dist/src/adapters/codex.d.ts +2 -0
- package/dist/src/adapters/codex.d.ts.map +1 -0
- package/dist/src/adapters/codex.js +7 -0
- package/dist/src/adapters/codex.js.map +1 -0
- package/dist/src/adapters/gemini.d.ts +2 -0
- package/dist/src/adapters/gemini.d.ts.map +1 -0
- package/dist/src/adapters/gemini.js +7 -0
- package/dist/src/adapters/gemini.js.map +1 -0
- package/dist/src/adapters/index.d.ts +5 -0
- package/dist/src/adapters/index.d.ts.map +1 -0
- package/dist/src/adapters/index.js +12 -0
- package/dist/src/adapters/index.js.map +1 -0
- package/dist/src/adapters/structured-prefix.d.ts +10 -0
- package/dist/src/adapters/structured-prefix.d.ts.map +1 -0
- package/dist/src/adapters/structured-prefix.js +59 -0
- package/dist/src/adapters/structured-prefix.js.map +1 -0
- package/dist/src/adapters/types.d.ts +32 -0
- package/dist/src/adapters/types.d.ts.map +1 -0
- package/dist/src/adapters/types.js +2 -0
- package/dist/src/adapters/types.js.map +1 -0
- package/dist/src/analyzers/content-analyzer.d.ts.map +1 -1
- package/dist/src/analyzers/content-analyzer.js +20 -4
- package/dist/src/analyzers/content-analyzer.js.map +1 -1
- package/dist/src/cli/context-flow.d.ts +92 -0
- package/dist/src/cli/context-flow.d.ts.map +1 -0
- package/dist/src/cli/context-flow.js +724 -0
- package/dist/src/cli/context-flow.js.map +1 -0
- package/dist/src/cli/history-display.d.ts +27 -0
- package/dist/src/cli/history-display.d.ts.map +1 -0
- package/dist/src/cli/history-display.js +167 -0
- package/dist/src/cli/history-display.js.map +1 -0
- package/dist/src/cli/index.js +924 -0
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/cli/launch-spec.d.ts +31 -0
- package/dist/src/cli/launch-spec.d.ts.map +1 -0
- package/dist/src/cli/launch-spec.js +182 -0
- package/dist/src/cli/launch-spec.js.map +1 -0
- package/dist/src/cli/live-demo.d.ts +34 -0
- package/dist/src/cli/live-demo.d.ts.map +1 -0
- package/dist/src/cli/live-demo.js +254 -0
- package/dist/src/cli/live-demo.js.map +1 -0
- package/dist/src/cli/pty-transcript.d.ts +34 -0
- package/dist/src/cli/pty-transcript.d.ts.map +1 -0
- package/dist/src/cli/pty-transcript.js +174 -0
- package/dist/src/cli/pty-transcript.js.map +1 -0
- package/dist/src/cli/session-display.d.ts +74 -0
- package/dist/src/cli/session-display.d.ts.map +1 -0
- package/dist/src/cli/session-display.js +922 -0
- package/dist/src/cli/session-display.js.map +1 -0
- package/dist/src/cli/session-execution.d.ts +55 -0
- package/dist/src/cli/session-execution.d.ts.map +1 -0
- package/dist/src/cli/session-execution.js +817 -0
- package/dist/src/cli/session-execution.js.map +1 -0
- package/dist/src/cli/session-runtime.d.ts +5 -0
- package/dist/src/cli/session-runtime.d.ts.map +1 -0
- package/dist/src/cli/session-runtime.js +11 -0
- package/dist/src/cli/session-runtime.js.map +1 -0
- package/dist/src/cli/setup.d.ts.map +1 -1
- package/dist/src/cli/setup.js +36 -12
- package/dist/src/cli/setup.js.map +1 -1
- package/dist/src/cli/utils/env.d.ts +7 -2
- package/dist/src/cli/utils/env.d.ts.map +1 -1
- package/dist/src/cli/utils/env.js +37 -6
- package/dist/src/cli/utils/env.js.map +1 -1
- package/dist/src/index.d.ts +4 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +187 -33
- package/dist/src/index.js.map +1 -1
- package/dist/src/ingestion/deterministic.d.ts +3 -0
- package/dist/src/ingestion/deterministic.d.ts.map +1 -0
- package/dist/src/ingestion/deterministic.js +862 -0
- package/dist/src/ingestion/deterministic.js.map +1 -0
- package/dist/src/ingestion/index.d.ts +5 -0
- package/dist/src/ingestion/index.d.ts.map +1 -0
- package/dist/src/ingestion/index.js +27 -0
- package/dist/src/ingestion/index.js.map +1 -0
- package/dist/src/ingestion/semantic.d.ts +6 -0
- package/dist/src/ingestion/semantic.d.ts.map +1 -0
- package/dist/src/ingestion/semantic.js +627 -0
- package/dist/src/ingestion/semantic.js.map +1 -0
- package/dist/src/ingestion/types.d.ts +10 -0
- package/dist/src/ingestion/types.d.ts.map +1 -0
- package/dist/src/ingestion/types.js +2 -0
- package/dist/src/ingestion/types.js.map +1 -0
- package/dist/src/lib/context-memory.d.ts +140 -0
- package/dist/src/lib/context-memory.d.ts.map +1 -0
- package/dist/src/lib/context-memory.js +974 -0
- package/dist/src/lib/context-memory.js.map +1 -0
- package/dist/src/lib/crypto/decrypt.d.ts.map +1 -1
- package/dist/src/lib/crypto/decrypt.js +12 -8
- package/dist/src/lib/crypto/decrypt.js.map +1 -1
- package/dist/src/lib/crypto/encrypt.d.ts.map +1 -1
- package/dist/src/lib/crypto/encrypt.js +6 -3
- package/dist/src/lib/crypto/encrypt.js.map +1 -1
- package/dist/src/lib/crypto/key-derivation.d.ts +1 -1
- package/dist/src/lib/crypto/key-derivation.d.ts.map +1 -1
- package/dist/src/lib/crypto/key-derivation.js +11 -11
- package/dist/src/lib/crypto/key-derivation.js.map +1 -1
- package/dist/src/lib/history-handoff.d.ts +43 -0
- package/dist/src/lib/history-handoff.d.ts.map +1 -0
- package/dist/src/lib/history-handoff.js +179 -0
- package/dist/src/lib/history-handoff.js.map +1 -0
- package/dist/src/lib/observability.d.ts +3 -0
- package/dist/src/lib/observability.d.ts.map +1 -0
- package/dist/src/lib/observability.js +63 -0
- package/dist/src/lib/observability.js.map +1 -0
- package/dist/src/lib/session-artifacts.d.ts +51 -0
- package/dist/src/lib/session-artifacts.d.ts.map +1 -0
- package/dist/src/lib/session-artifacts.js +132 -0
- package/dist/src/lib/session-artifacts.js.map +1 -0
- package/dist/src/lib/session-filters.d.ts +11 -0
- package/dist/src/lib/session-filters.d.ts.map +1 -0
- package/dist/src/lib/session-filters.js +16 -0
- package/dist/src/lib/session-filters.js.map +1 -0
- package/dist/src/lib/session-history.d.ts +50 -0
- package/dist/src/lib/session-history.d.ts.map +1 -0
- package/dist/src/lib/session-history.js +73 -0
- package/dist/src/lib/session-history.js.map +1 -0
- package/dist/src/lib/session-trends.d.ts +129 -0
- package/dist/src/lib/session-trends.d.ts.map +1 -0
- package/dist/src/lib/session-trends.js +361 -0
- package/dist/src/lib/session-trends.js.map +1 -0
- package/dist/src/lib/storage/database.d.ts +257 -3
- package/dist/src/lib/storage/database.d.ts.map +1 -1
- package/dist/src/lib/storage/database.js +1836 -161
- package/dist/src/lib/storage/database.js.map +1 -1
- package/dist/src/lib/storage/export-sessions.d.ts +33 -0
- package/dist/src/lib/storage/export-sessions.d.ts.map +1 -0
- package/dist/src/lib/storage/export-sessions.js +525 -0
- package/dist/src/lib/storage/export-sessions.js.map +1 -0
- package/dist/src/lib/storage/export.d.ts +1 -2
- package/dist/src/lib/storage/export.d.ts.map +1 -1
- package/dist/src/lib/storage/export.js +46 -33
- package/dist/src/lib/storage/export.js.map +1 -1
- package/dist/src/lib/storage/index.d.ts +7 -6
- package/dist/src/lib/storage/index.d.ts.map +1 -1
- package/dist/src/lib/storage/index.js +6 -5
- package/dist/src/lib/storage/index.js.map +1 -1
- package/dist/src/lib/storage/salt-storage.d.ts +1 -1
- package/dist/src/lib/storage/salt-storage.d.ts.map +1 -1
- package/dist/src/lib/storage/salt-storage.js +26 -18
- package/dist/src/lib/storage/salt-storage.js.map +1 -1
- package/dist/src/lib/storage/schema.d.ts +7 -2
- package/dist/src/lib/storage/schema.d.ts.map +1 -1
- package/dist/src/lib/storage/schema.js +357 -40
- package/dist/src/lib/storage/schema.js.map +1 -1
- package/dist/src/lib/storage/types.d.ts +122 -0
- package/dist/src/lib/storage/types.d.ts.map +1 -1
- package/dist/src/lib/tool-wrapper.d.ts.map +1 -1
- package/dist/src/lib/tool-wrapper.js +2 -2
- package/dist/src/lib/tool-wrapper.js.map +1 -1
- package/dist/src/prompts/skill-prompt.d.ts +6 -0
- package/dist/src/prompts/skill-prompt.d.ts.map +1 -0
- package/dist/src/prompts/skill-prompt.js +138 -0
- package/dist/src/prompts/skill-prompt.js.map +1 -0
- package/dist/src/tools/capture-footprint.d.ts +2 -2
- package/dist/src/tools/capture-footprint.d.ts.map +1 -1
- package/dist/src/tools/capture-footprint.js +52 -11
- package/dist/src/tools/capture-footprint.js.map +1 -1
- package/dist/src/tools/confirm-context-link.d.ts +62 -0
- package/dist/src/tools/confirm-context-link.d.ts.map +1 -0
- package/dist/src/tools/confirm-context-link.js +36 -0
- package/dist/src/tools/confirm-context-link.js.map +1 -0
- package/dist/src/tools/context-schemas.d.ts +694 -0
- package/dist/src/tools/context-schemas.d.ts.map +1 -0
- package/dist/src/tools/context-schemas.js +171 -0
- package/dist/src/tools/context-schemas.js.map +1 -0
- package/dist/src/tools/delete-footprints.d.ts +18 -1
- package/dist/src/tools/delete-footprints.d.ts.map +1 -1
- package/dist/src/tools/delete-footprints.js +53 -5
- package/dist/src/tools/delete-footprints.js.map +1 -1
- package/dist/src/tools/export-footprints.d.ts +11 -3
- package/dist/src/tools/export-footprints.d.ts.map +1 -1
- package/dist/src/tools/export-footprints.js +48 -9
- package/dist/src/tools/export-footprints.js.map +1 -1
- package/dist/src/tools/export-sessions.d.ts +111 -0
- package/dist/src/tools/export-sessions.d.ts.map +1 -0
- package/dist/src/tools/export-sessions.js +136 -0
- package/dist/src/tools/export-sessions.js.map +1 -0
- package/dist/src/tools/get-context.d.ts +208 -0
- package/dist/src/tools/get-context.d.ts.map +1 -0
- package/dist/src/tools/get-context.js +27 -0
- package/dist/src/tools/get-context.js.map +1 -0
- package/dist/src/tools/get-footprint.d.ts +1 -7
- package/dist/src/tools/get-footprint.d.ts.map +1 -1
- package/dist/src/tools/get-footprint.js +7 -3
- package/dist/src/tools/get-footprint.js.map +1 -1
- package/dist/src/tools/get-history-handoff.d.ts +109 -0
- package/dist/src/tools/get-history-handoff.d.ts.map +1 -0
- package/dist/src/tools/get-history-handoff.js +85 -0
- package/dist/src/tools/get-history-handoff.js.map +1 -0
- package/dist/src/tools/get-history-trends.d.ts +155 -0
- package/dist/src/tools/get-history-trends.d.ts.map +1 -0
- package/dist/src/tools/get-history-trends.js +123 -0
- package/dist/src/tools/get-history-trends.js.map +1 -0
- package/dist/src/tools/get-session-artifacts.d.ts +151 -0
- package/dist/src/tools/get-session-artifacts.d.ts.map +1 -0
- package/dist/src/tools/get-session-artifacts.js +184 -0
- package/dist/src/tools/get-session-artifacts.js.map +1 -0
- package/dist/src/tools/get-session-decisions.d.ts +69 -0
- package/dist/src/tools/get-session-decisions.d.ts.map +1 -0
- package/dist/src/tools/get-session-decisions.js +99 -0
- package/dist/src/tools/get-session-decisions.js.map +1 -0
- package/dist/src/tools/get-session-messages.d.ts +55 -0
- package/dist/src/tools/get-session-messages.d.ts.map +1 -0
- package/dist/src/tools/get-session-messages.js +89 -0
- package/dist/src/tools/get-session-messages.js.map +1 -0
- package/dist/src/tools/get-session-narrative.d.ts +72 -0
- package/dist/src/tools/get-session-narrative.d.ts.map +1 -0
- package/dist/src/tools/get-session-narrative.js +106 -0
- package/dist/src/tools/get-session-narrative.js.map +1 -0
- package/dist/src/tools/get-session-timeline.d.ts +55 -0
- package/dist/src/tools/get-session-timeline.d.ts.map +1 -0
- package/dist/src/tools/get-session-timeline.js +93 -0
- package/dist/src/tools/get-session-timeline.js.map +1 -0
- package/dist/src/tools/get-session-trends.d.ts +108 -0
- package/dist/src/tools/get-session-trends.d.ts.map +1 -0
- package/dist/src/tools/get-session-trends.js +130 -0
- package/dist/src/tools/get-session-trends.js.map +1 -0
- package/dist/src/tools/get-session.d.ts +251 -0
- package/dist/src/tools/get-session.d.ts.map +1 -0
- package/dist/src/tools/get-session.js +290 -0
- package/dist/src/tools/get-session.js.map +1 -0
- package/dist/src/tools/index.d.ts +23 -3
- package/dist/src/tools/index.d.ts.map +1 -1
- package/dist/src/tools/index.js +23 -3
- package/dist/src/tools/index.js.map +1 -1
- package/dist/src/tools/list-contexts.d.ts +50 -0
- package/dist/src/tools/list-contexts.d.ts.map +1 -0
- package/dist/src/tools/list-contexts.js +28 -0
- package/dist/src/tools/list-contexts.js.map +1 -0
- package/dist/src/tools/list-footprints.d.ts +1 -15
- package/dist/src/tools/list-footprints.d.ts.map +1 -1
- package/dist/src/tools/list-footprints.js +17 -6
- package/dist/src/tools/list-footprints.js.map +1 -1
- package/dist/src/tools/list-sessions.d.ts +86 -0
- package/dist/src/tools/list-sessions.d.ts.map +1 -0
- package/dist/src/tools/list-sessions.js +97 -0
- package/dist/src/tools/list-sessions.js.map +1 -0
- package/dist/src/tools/manage-tags.d.ts +47 -0
- package/dist/src/tools/manage-tags.d.ts.map +1 -0
- package/dist/src/tools/manage-tags.js +109 -0
- package/dist/src/tools/manage-tags.js.map +1 -0
- package/dist/src/tools/merge-contexts.d.ts +58 -0
- package/dist/src/tools/merge-contexts.d.ts.map +1 -0
- package/dist/src/tools/merge-contexts.js +27 -0
- package/dist/src/tools/merge-contexts.js.map +1 -0
- package/dist/src/tools/move-session-context.d.ts +62 -0
- package/dist/src/tools/move-session-context.d.ts.map +1 -0
- package/dist/src/tools/move-session-context.js +33 -0
- package/dist/src/tools/move-session-context.js.map +1 -0
- package/dist/src/tools/reingest-session.d.ts +31 -0
- package/dist/src/tools/reingest-session.d.ts.map +1 -0
- package/dist/src/tools/reingest-session.js +43 -0
- package/dist/src/tools/reingest-session.js.map +1 -0
- package/dist/src/tools/reject-context-link.d.ts +58 -0
- package/dist/src/tools/reject-context-link.d.ts.map +1 -0
- package/dist/src/tools/reject-context-link.js +26 -0
- package/dist/src/tools/reject-context-link.js.map +1 -0
- package/dist/src/tools/resolve-context.d.ts +287 -0
- package/dist/src/tools/resolve-context.d.ts.map +1 -0
- package/dist/src/tools/resolve-context.js +35 -0
- package/dist/src/tools/resolve-context.js.map +1 -0
- package/dist/src/tools/search-footprints.d.ts +2 -16
- package/dist/src/tools/search-footprints.d.ts.map +1 -1
- package/dist/src/tools/search-footprints.js +23 -7
- package/dist/src/tools/search-footprints.js.map +1 -1
- package/dist/src/tools/search-history.d.ts +86 -0
- package/dist/src/tools/search-history.d.ts.map +1 -0
- package/dist/src/tools/search-history.js +103 -0
- package/dist/src/tools/search-history.js.map +1 -0
- package/dist/src/tools/session-ui-metadata.d.ts +15 -0
- package/dist/src/tools/session-ui-metadata.d.ts.map +1 -0
- package/dist/src/tools/session-ui-metadata.js +15 -0
- package/dist/src/tools/session-ui-metadata.js.map +1 -0
- package/dist/src/tools/set-active-context.d.ts +58 -0
- package/dist/src/tools/set-active-context.d.ts.map +1 -0
- package/dist/src/tools/set-active-context.js +26 -0
- package/dist/src/tools/set-active-context.js.map +1 -0
- package/dist/src/tools/split-context.d.ts +62 -0
- package/dist/src/tools/split-context.d.ts.map +1 -0
- package/dist/src/tools/split-context.js +36 -0
- package/dist/src/tools/split-context.js.map +1 -0
- package/dist/src/tools/suggest-capture.d.ts +1 -1
- package/dist/src/tools/suggest-capture.d.ts.map +1 -1
- package/dist/src/tools/suggest-capture.js +6 -2
- package/dist/src/tools/suggest-capture.js.map +1 -1
- package/dist/src/tools/verify-footprint.d.ts +7 -54
- package/dist/src/tools/verify-footprint.d.ts.map +1 -1
- package/dist/src/tools/verify-footprint.js +11 -8
- package/dist/src/tools/verify-footprint.js.map +1 -1
- package/dist/src/types.d.ts +6 -4
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/ui/register.d.ts +6 -1
- package/dist/src/ui/register.d.ts.map +1 -1
- package/dist/src/ui/register.js +60 -16
- package/dist/src/ui/register.js.map +1 -1
- package/dist/ui/dashboard.html +259 -875
- package/dist/ui/detail.html +124 -252
- package/dist/ui/export.html +133 -303
- package/dist/ui/session-dashboard-live.html +264 -0
- package/dist/ui/session-dashboard.html +329 -0
- package/dist/ui/session-detail-live.html +336 -0
- package/dist/ui/session-detail.html +355 -0
- package/package.json +61 -16
- package/dist/src/lib/errors/base-error.d.ts +0 -15
- package/dist/src/lib/errors/base-error.d.ts.map +0 -1
- package/dist/src/lib/errors/base-error.js +0 -34
- package/dist/src/lib/errors/base-error.js.map +0 -1
- package/dist/src/lib/errors/crypto-error.d.ts +0 -29
- package/dist/src/lib/errors/crypto-error.d.ts.map +0 -1
- package/dist/src/lib/errors/crypto-error.js +0 -43
- package/dist/src/lib/errors/crypto-error.js.map +0 -1
- package/dist/src/lib/errors/index.d.ts +0 -26
- package/dist/src/lib/errors/index.d.ts.map +0 -1
- package/dist/src/lib/errors/index.js +0 -26
- package/dist/src/lib/errors/index.js.map +0 -1
- package/dist/src/lib/errors/storage-error.d.ts +0 -25
- package/dist/src/lib/errors/storage-error.d.ts.map +0 -1
- package/dist/src/lib/errors/storage-error.js +0 -38
- package/dist/src/lib/errors/storage-error.js.map +0 -1
- package/dist/src/lib/errors/validation-error.d.ts +0 -21
- package/dist/src/lib/errors/validation-error.d.ts.map +0 -1
- package/dist/src/lib/errors/validation-error.js +0 -29
- package/dist/src/lib/errors/validation-error.js.map +0 -1
- package/dist/src/test-helpers.d.ts +0 -33
- package/dist/src/test-helpers.d.ts.map +0 -1
- package/dist/src/test-helpers.js +0 -108
- package/dist/src/test-helpers.js.map +0 -1
- package/dist/src/tools/get-tag-stats.d.ts +0 -30
- package/dist/src/tools/get-tag-stats.d.ts.map +0 -1
- package/dist/src/tools/get-tag-stats.js +0 -33
- package/dist/src/tools/get-tag-stats.js.map +0 -1
- package/dist/src/tools/remove-tag.d.ts +0 -22
- package/dist/src/tools/remove-tag.d.ts.map +0 -1
- package/dist/src/tools/remove-tag.js +0 -30
- package/dist/src/tools/remove-tag.js.map +0 -1
- package/dist/src/tools/rename-tag.d.ts +0 -24
- package/dist/src/tools/rename-tag.d.ts.map +0 -1
- package/dist/src/tools/rename-tag.js +0 -34
- package/dist/src/tools/rename-tag.js.map +0 -1
package/SKILL.md
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
# Footprint Agent Skill
|
|
2
2
|
|
|
3
|
-
> MCP server for
|
|
3
|
+
> MCP server for AI work history, context memory, and encrypted evidence capture.
|
|
4
4
|
|
|
5
5
|
**Package:** `@pcircle/footprint` (v1.1.1)
|
|
6
6
|
**Protocol:** Model Context Protocol (MCP)
|
|
7
7
|
**License:** MIT
|
|
8
8
|
|
|
9
|
+
This skill is specifically about the encrypted evidence workflow. Footprint also has separate session-history and context-memory surfaces for ongoing work continuity.
|
|
10
|
+
|
|
9
11
|
## Decision Tree: Should I Capture This?
|
|
10
12
|
|
|
11
13
|
```
|
|
12
14
|
Should I capture this conversation?
|
|
13
15
|
├─ User explicitly asked → YES
|
|
14
16
|
│ ├─ "save this conversation"
|
|
15
|
-
│ ├─ "record this for evidence"
|
|
17
|
+
│ ├─ "record this for evidence"
|
|
16
18
|
│ ├─ "capture this as evidence"
|
|
17
19
|
│ └─ "I need this for legal/audit purposes"
|
|
18
20
|
├─ High-value content mentioned → SUGGEST to user
|
|
@@ -32,19 +34,22 @@ Should I capture this conversation?
|
|
|
32
34
|
## Specific Trigger Patterns
|
|
33
35
|
|
|
34
36
|
**Immediate capture (don't ask, just do it):**
|
|
37
|
+
|
|
35
38
|
- "save this conversation"
|
|
36
|
-
- "record this for evidence"
|
|
39
|
+
- "record this for evidence"
|
|
37
40
|
- "capture this as evidence"
|
|
38
41
|
- "I need this documented"
|
|
39
42
|
- "save this for legal purposes"
|
|
40
43
|
|
|
41
44
|
**Suggest capture (ask user first):**
|
|
45
|
+
|
|
42
46
|
- After discussing: patents, contracts, algorithms, research hypotheses, business decisions
|
|
43
47
|
- When mentioned: "IP", "copyright", "legal", "audit", "proof", "compliance"
|
|
44
48
|
- Milestone completions: "finished", "completed", "approved", "signed off"
|
|
45
49
|
- Key decisions: "we decided", "the plan is", "going with option"
|
|
46
50
|
|
|
47
51
|
**Never capture without explicit request:**
|
|
52
|
+
|
|
48
53
|
- Casual conversations, personal chat, jokes
|
|
49
54
|
- Debugging sessions, draft work, brainstorming
|
|
50
55
|
- Test conversations, API experiments
|
|
@@ -53,13 +58,15 @@ Should I capture this conversation?
|
|
|
53
58
|
## Available Tools
|
|
54
59
|
|
|
55
60
|
### 1. `capture-footprint`
|
|
61
|
+
|
|
56
62
|
Save a conversation as encrypted evidence.
|
|
57
63
|
|
|
58
64
|
**Input Parameters:**
|
|
65
|
+
|
|
59
66
|
```json
|
|
60
67
|
{
|
|
61
68
|
"conversationId": "api-auth-decision-2026-01-28",
|
|
62
|
-
"llmProvider": "Claude Sonnet 4.5",
|
|
69
|
+
"llmProvider": "Claude Sonnet 4.5",
|
|
63
70
|
"content": "Human: We need to decide on the OAuth implementation...\nAssistant: I recommend using PKCE flow...\nHuman: Approved, let's go with that approach.",
|
|
64
71
|
"messageCount": 15,
|
|
65
72
|
"tags": "api,oauth,security,decision,approved"
|
|
@@ -67,11 +74,12 @@ Save a conversation as encrypted evidence.
|
|
|
67
74
|
```
|
|
68
75
|
|
|
69
76
|
**Expected Output (text):**
|
|
77
|
+
|
|
70
78
|
```
|
|
71
79
|
✅ Evidence captured successfully
|
|
72
80
|
- Evidence ID: `550e8400-e29b-41d4-a716-446655440000`
|
|
73
81
|
- Conversation ID: `api-auth-decision-2026-01-28`
|
|
74
|
-
- Messages: 15
|
|
82
|
+
- Messages: 15
|
|
75
83
|
- Tags: api,oauth,security,decision,approved
|
|
76
84
|
- Git hash: `a1b2c3d4e5f6789...`
|
|
77
85
|
- Created: 2026-01-28T14:30:45Z
|
|
@@ -80,11 +88,12 @@ Keep this Evidence ID safe for future reference.
|
|
|
80
88
|
```
|
|
81
89
|
|
|
82
90
|
**Expected Output (structuredContent):**
|
|
91
|
+
|
|
83
92
|
```json
|
|
84
93
|
{
|
|
85
94
|
"type": "evidence_created",
|
|
86
95
|
"evidenceId": "550e8400-e29b-41d4-a716-446655440000",
|
|
87
|
-
"conversationId": "api-auth-decision-2026-01-28",
|
|
96
|
+
"conversationId": "api-auth-decision-2026-01-28",
|
|
88
97
|
"messageCount": 15,
|
|
89
98
|
"tags": ["api", "oauth", "security", "decision", "approved"],
|
|
90
99
|
"gitHash": "a1b2c3d4e5f6789...",
|
|
@@ -94,9 +103,11 @@ Keep this Evidence ID safe for future reference.
|
|
|
94
103
|
```
|
|
95
104
|
|
|
96
105
|
### 2. `list-footprints`
|
|
106
|
+
|
|
97
107
|
List all captured evidence (metadata only).
|
|
98
108
|
|
|
99
109
|
**Input Parameters:**
|
|
110
|
+
|
|
100
111
|
```json
|
|
101
112
|
{
|
|
102
113
|
"limit": 10,
|
|
@@ -105,15 +116,17 @@ List all captured evidence (metadata only).
|
|
|
105
116
|
```
|
|
106
117
|
|
|
107
118
|
**Expected Output (text):**
|
|
119
|
+
|
|
108
120
|
```
|
|
109
121
|
📋 Evidence Archive (10 most recent)
|
|
110
122
|
1. api-auth-decision-2026-01-28 | 15 msgs | api,oauth,security
|
|
111
|
-
2. patent-algorithm-2026-01-27 | 32 msgs | ip,patent,algorithm
|
|
123
|
+
2. patent-algorithm-2026-01-27 | 32 msgs | ip,patent,algorithm
|
|
112
124
|
3. contract-review-2026-01-26 | 8 msgs | legal,contract
|
|
113
125
|
...
|
|
114
126
|
```
|
|
115
127
|
|
|
116
128
|
**Expected Output (structuredContent):**
|
|
129
|
+
|
|
117
130
|
```json
|
|
118
131
|
{
|
|
119
132
|
"type": "evidence_list",
|
|
@@ -131,9 +144,11 @@ List all captured evidence (metadata only).
|
|
|
131
144
|
```
|
|
132
145
|
|
|
133
146
|
### 3. `get-footprint`
|
|
147
|
+
|
|
134
148
|
Retrieve and decrypt specific evidence.
|
|
135
149
|
|
|
136
150
|
**Input Parameters:**
|
|
151
|
+
|
|
137
152
|
```json
|
|
138
153
|
{
|
|
139
154
|
"id": "550e8400-e29b-41d4-a716-446655440000"
|
|
@@ -141,6 +156,7 @@ Retrieve and decrypt specific evidence.
|
|
|
141
156
|
```
|
|
142
157
|
|
|
143
158
|
**Expected Output (text):**
|
|
159
|
+
|
|
144
160
|
```
|
|
145
161
|
📄 Evidence Retrieved
|
|
146
162
|
- ID: 550e8400-e29b-41d4-a716-446655440000
|
|
@@ -154,9 +170,11 @@ Assistant: I recommend using PKCE flow...
|
|
|
154
170
|
```
|
|
155
171
|
|
|
156
172
|
### 4. `search-footprints`
|
|
173
|
+
|
|
157
174
|
Find evidence by content or tags.
|
|
158
175
|
|
|
159
176
|
**Input Parameters:**
|
|
177
|
+
|
|
160
178
|
```json
|
|
161
179
|
{
|
|
162
180
|
"query": "OAuth OR PKCE OR authentication",
|
|
@@ -166,9 +184,11 @@ Find evidence by content or tags.
|
|
|
166
184
|
```
|
|
167
185
|
|
|
168
186
|
### 5. `export-footprints`
|
|
187
|
+
|
|
169
188
|
Export evidence as encrypted archive.
|
|
170
189
|
|
|
171
190
|
**Input Parameters:**
|
|
191
|
+
|
|
172
192
|
```json
|
|
173
193
|
{
|
|
174
194
|
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
@@ -177,6 +197,7 @@ Export evidence as encrypted archive.
|
|
|
177
197
|
```
|
|
178
198
|
|
|
179
199
|
**Expected Output (structuredContent):**
|
|
200
|
+
|
|
180
201
|
```json
|
|
181
202
|
{
|
|
182
203
|
"type": "evidence_export",
|
|
@@ -188,9 +209,11 @@ Export evidence as encrypted archive.
|
|
|
188
209
|
```
|
|
189
210
|
|
|
190
211
|
### 6. `verify-footprint`
|
|
212
|
+
|
|
191
213
|
Verify evidence integrity (checksum + Git timestamp).
|
|
192
214
|
|
|
193
215
|
**Input Parameters:**
|
|
216
|
+
|
|
194
217
|
```json
|
|
195
218
|
{
|
|
196
219
|
"id": "550e8400-e29b-41d4-a716-446655440000"
|
|
@@ -198,6 +221,7 @@ Verify evidence integrity (checksum + Git timestamp).
|
|
|
198
221
|
```
|
|
199
222
|
|
|
200
223
|
**Expected Output (text):**
|
|
224
|
+
|
|
201
225
|
```
|
|
202
226
|
🔐 Evidence Verification Report
|
|
203
227
|
- ID: 550e8400-e29b-41d4-a716-446655440000
|
|
@@ -208,6 +232,7 @@ Verify evidence integrity (checksum + Git timestamp).
|
|
|
208
232
|
```
|
|
209
233
|
|
|
210
234
|
**Expected Output (structuredContent):**
|
|
235
|
+
|
|
211
236
|
```json
|
|
212
237
|
{
|
|
213
238
|
"type": "verification_result",
|
|
@@ -223,21 +248,26 @@ Verify evidence integrity (checksum + Git timestamp).
|
|
|
223
248
|
## Best Practices
|
|
224
249
|
|
|
225
250
|
### Naming conversationId
|
|
251
|
+
|
|
226
252
|
**Format:** `{topic-type}-{descriptive-name}-{YYYY-MM-DD}`
|
|
227
253
|
|
|
228
254
|
**Good examples:**
|
|
255
|
+
|
|
229
256
|
- `api-auth-decision-2026-01-28`
|
|
230
257
|
- `patent-ml-algorithm-2026-01-27`
|
|
231
258
|
- `contract-vendor-negotiation-2026-01-26`
|
|
232
259
|
- `milestone-mvp-completion-2026-01-25`
|
|
233
260
|
|
|
234
261
|
**Avoid:**
|
|
262
|
+
|
|
235
263
|
- `conversation-1` (not descriptive)
|
|
236
|
-
- `important-chat` (too vague)
|
|
264
|
+
- `important-chat` (too vague)
|
|
237
265
|
- `chat-2026-01-28` (missing context)
|
|
238
266
|
|
|
239
267
|
### Choosing Tags
|
|
268
|
+
|
|
240
269
|
**Common patterns:**
|
|
270
|
+
|
|
241
271
|
- **Type**: `decision`, `milestone`, `research`, `review`, `approval`
|
|
242
272
|
- **Domain**: `api`, `ui`, `database`, `security`, `legal`, `business`
|
|
243
273
|
- **Status**: `draft`, `finalized`, `approved`, `rejected`
|
|
@@ -245,12 +275,14 @@ Verify evidence integrity (checksum + Git timestamp).
|
|
|
245
275
|
- **Legal**: `contract`, `agreement`, `compliance`, `audit`
|
|
246
276
|
|
|
247
277
|
**Tag Guidelines:**
|
|
278
|
+
|
|
248
279
|
- Use 3-6 tags maximum
|
|
249
280
|
- Prefer specific over general (`oauth` not just `auth`)
|
|
250
281
|
- Include project/product names if relevant
|
|
251
282
|
- Always include content type (`decision`, `research`, etc.)
|
|
252
283
|
|
|
253
284
|
### When to Use Each Tool
|
|
285
|
+
|
|
254
286
|
- **capture-footprint**: Primary tool for saving conversations
|
|
255
287
|
- **list-footprints**: Browse/overview existing evidence
|
|
256
288
|
- **search-footprints**: Find specific content across evidence
|
|
@@ -261,23 +293,27 @@ Verify evidence integrity (checksum + Git timestamp).
|
|
|
261
293
|
## Token-Efficient Agent Responses
|
|
262
294
|
|
|
263
295
|
**After capturing evidence (keep it brief):**
|
|
296
|
+
|
|
264
297
|
```
|
|
265
|
-
✅ Evidence saved as `{conversationId}`
|
|
298
|
+
✅ Evidence saved as `{conversationId}`
|
|
266
299
|
ID: `{first-8-chars-of-id}`...
|
|
267
300
|
Tags: {tags}
|
|
268
301
|
```
|
|
269
302
|
|
|
270
303
|
**When suggesting capture:**
|
|
304
|
+
|
|
271
305
|
```
|
|
272
306
|
💡 This looks like valuable evidence (contains {trigger}). Save it?
|
|
273
307
|
```
|
|
274
308
|
|
|
275
309
|
**When declining to capture:**
|
|
310
|
+
|
|
276
311
|
```
|
|
277
312
|
ℹ️ Skipping evidence capture (casual conversation)
|
|
278
313
|
```
|
|
279
314
|
|
|
280
315
|
**For retrieval:**
|
|
316
|
+
|
|
281
317
|
```
|
|
282
318
|
📄 Found: {conversationId} ({messageCount} messages)
|
|
283
319
|
[Show relevant excerpt or summary]
|
|
@@ -285,25 +321,27 @@ Tags: {tags}
|
|
|
285
321
|
|
|
286
322
|
## Error Handling with Recovery Actions
|
|
287
323
|
|
|
288
|
-
| Error
|
|
289
|
-
|
|
290
|
-
| "Password required"
|
|
291
|
-
| "Evidence not found"
|
|
292
|
-
| "Decryption failed"
|
|
293
|
-
| "Database error"
|
|
294
|
-
| "Git repository error" | Git not initialized
|
|
295
|
-
| "Capture timeout"
|
|
324
|
+
| Error | Likely Cause | Recovery Action |
|
|
325
|
+
| ---------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
326
|
+
| "Password required" | FOOTPRINT_PASSPHRASE not set | 1. Check env config<br>2. Restart MCP server<br>3. Verify passphrase in env |
|
|
327
|
+
| "Evidence not found" | Invalid/wrong ID | 1. Use `list-footprints` to find correct ID<br>2. Search by conversationId<br>3. Check if user meant different evidence |
|
|
328
|
+
| "Decryption failed" | Password changed/wrong | 1. Verify current password matches<br>2. Check if evidence pre-dates password change<br>3. Try with backup password if available |
|
|
329
|
+
| "Database error" | DB path/permissions issues | 1. Check FOOTPRINT_DATA_DIR exists<br>2. Verify file permissions<br>3. Create directory if missing |
|
|
330
|
+
| "Git repository error" | Git not initialized | 1. Initialize git in evidence directory<br>2. Set git user.name/user.email<br>3. Make initial commit |
|
|
331
|
+
| "Capture timeout" | Large conversation size | 1. Split into smaller chunks<br>2. Reduce messageCount<br>3. Compress content before capture |
|
|
296
332
|
|
|
297
333
|
**Agent Recovery Protocol:**
|
|
334
|
+
|
|
298
335
|
1. **Detect error** from tool response
|
|
299
336
|
2. **Identify cause** from error message
|
|
300
|
-
3. **Apply recovery action** from table above
|
|
337
|
+
3. **Apply recovery action** from table above
|
|
301
338
|
4. **Retry operation** if recovery successful
|
|
302
339
|
5. **Escalate to user** only if recovery fails
|
|
303
340
|
|
|
304
341
|
## Workflow Examples
|
|
305
342
|
|
|
306
343
|
### 1. User Explicit Request
|
|
344
|
+
|
|
307
345
|
```
|
|
308
346
|
User: "Save this conversation about the API design"
|
|
309
347
|
|
|
@@ -314,7 +352,8 @@ Agent:
|
|
|
314
352
|
4. Report success with Evidence ID
|
|
315
353
|
```
|
|
316
354
|
|
|
317
|
-
### 2. High-Value Content Detection
|
|
355
|
+
### 2. High-Value Content Detection
|
|
356
|
+
|
|
318
357
|
```
|
|
319
358
|
User: "We've decided to patent this algorithm approach."
|
|
320
359
|
|
|
@@ -325,6 +364,7 @@ Agent:
|
|
|
325
364
|
```
|
|
326
365
|
|
|
327
366
|
### 3. Evidence Retrieval
|
|
367
|
+
|
|
328
368
|
```
|
|
329
369
|
User: "Find the conversation about OAuth implementation"
|
|
330
370
|
|
|
@@ -335,10 +375,11 @@ Agent:
|
|
|
335
375
|
```
|
|
336
376
|
|
|
337
377
|
### 4. Legal Export
|
|
378
|
+
|
|
338
379
|
```
|
|
339
380
|
User: "Export the patent evidence for filing"
|
|
340
381
|
|
|
341
|
-
Agent:
|
|
382
|
+
Agent:
|
|
342
383
|
1. 🔍 Help identify relevant evidence (search by "patent" tag)
|
|
343
384
|
2. 📦 Export each evidence as encrypted ZIP
|
|
344
385
|
3. ✅ Provide files with verification instructions
|
|
@@ -347,15 +388,16 @@ Agent:
|
|
|
347
388
|
|
|
348
389
|
## Security & Verification
|
|
349
390
|
|
|
350
|
-
- **Password**: Set via `
|
|
351
|
-
- **Encryption**: XChaCha20-Poly1305 (256-bit) with Argon2id key derivation
|
|
391
|
+
- **Password**: Set via `FOOTPRINT_PASSPHRASE` env var (never ask user in chat)
|
|
392
|
+
- **Encryption**: XChaCha20-Poly1305 (256-bit) with Argon2id key derivation
|
|
352
393
|
- **Git Timestamps**: Cryptographic proof of creation time
|
|
353
394
|
- **SHA-256 Checksums**: Detect any content tampering
|
|
354
395
|
- **Evidence Chain**: Each capture creates immutable Git commit
|
|
355
396
|
- **Storage**: Local SQLite with encrypted BLOBs (no cloud, no tracking)
|
|
356
397
|
|
|
357
398
|
**For legal proceedings:**
|
|
358
|
-
|
|
399
|
+
|
|
400
|
+
1. Export evidence with `export-evidence`
|
|
359
401
|
2. Verify Git hash against repository
|
|
360
402
|
3. Check SHA-256 checksum matches
|
|
361
403
|
4. Git log shows creation timestamp
|
|
@@ -375,13 +417,14 @@ npx @pcircle/footprint
|
|
|
375
417
|
|
|
376
418
|
**Claude Desktop config location:**
|
|
377
419
|
|
|
378
|
-
| Platform | Config Path
|
|
379
|
-
|
|
380
|
-
| macOS
|
|
381
|
-
| Linux
|
|
382
|
-
| Windows
|
|
420
|
+
| Platform | Config Path |
|
|
421
|
+
| -------- | ----------------------------------------------------------------- |
|
|
422
|
+
| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
423
|
+
| Linux | `~/.config/Claude/claude_desktop_config.json` |
|
|
424
|
+
| Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
383
425
|
|
|
384
426
|
**Config content:**
|
|
427
|
+
|
|
385
428
|
```json
|
|
386
429
|
{
|
|
387
430
|
"mcpServers": {
|
|
@@ -389,8 +432,8 @@ npx @pcircle/footprint
|
|
|
389
432
|
"command": "npx",
|
|
390
433
|
"args": ["@pcircle/footprint"],
|
|
391
434
|
"env": {
|
|
392
|
-
"
|
|
393
|
-
"
|
|
435
|
+
"FOOTPRINT_DATA_DIR": "/path/to/data",
|
|
436
|
+
"FOOTPRINT_PASSPHRASE": "your-secure-password-here"
|
|
394
437
|
}
|
|
395
438
|
}
|
|
396
439
|
}
|
|
@@ -398,8 +441,9 @@ npx @pcircle/footprint
|
|
|
398
441
|
```
|
|
399
442
|
|
|
400
443
|
**Environment Variables:**
|
|
401
|
-
|
|
402
|
-
- `
|
|
444
|
+
|
|
445
|
+
- `FOOTPRINT_PASSPHRASE` (required): Encryption passphrase
|
|
446
|
+
- `FOOTPRINT_DATA_DIR` (optional): Directory for data storage (default: `~/.footprint`)
|
|
403
447
|
|
|
404
448
|
## Performance Notes
|
|
405
449
|
|
|
@@ -409,4 +453,4 @@ npx @pcircle/footprint
|
|
|
409
453
|
- **Search speed**: Sub-second for <1000 evidence records
|
|
410
454
|
- **Export time**: ~5-15 seconds depending on content size
|
|
411
455
|
|
|
412
|
-
Large conversations (>100 messages) may take longer to encrypt and commit.
|
|
456
|
+
Large conversations (>100 messages) may take longer to encrypt and commit.
|
package/bin/footprint.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
|
+
|
|
6
|
+
const currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const distEntry = path.resolve(currentDir, "../dist/src/cli/index.js");
|
|
8
|
+
|
|
9
|
+
if (!existsSync(distEntry)) {
|
|
10
|
+
process.stderr.write(
|
|
11
|
+
'Footprint CLI is not built yet. Run "pnpm --dir packages/mcp-server build" first.\n',
|
|
12
|
+
);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
await import(pathToFileURL(distEntry).href);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../src/adapters/claude.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,kCAIxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../../src/adapters/claude.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAEvE,MAAM,CAAC,MAAM,aAAa,GAAG,6BAA6B,CAAC;IACzD,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,yBAAyB;CAClC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../../src/adapters/codex.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,kCAIvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../src/adapters/codex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAEvE,MAAM,CAAC,MAAM,YAAY,GAAG,6BAA6B,CAAC;IACxD,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,wBAAwB;CACjC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini.d.ts","sourceRoot":"","sources":["../../../src/adapters/gemini.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,kCAIxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../../src/adapters/gemini.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAEvE,MAAM,CAAC,MAAM,aAAa,GAAG,6BAA6B,CAAC;IACzD,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,yBAAyB;CAClC,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HostAdapter } from "./types.js";
|
|
2
|
+
import type { SessionHost } from "../lib/storage/index.js";
|
|
3
|
+
export type { AdapterContext, AdapterEventEnvelope, AdapterParseResult, HostAdapter, } from "./types.js";
|
|
4
|
+
export declare function getHostAdapter(host: SessionHost): HostAdapter | null;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAQ3D,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,WAAW,GACZ,MAAM,YAAY,CAAC;AAEpB,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAEpE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { claudeAdapter } from "./claude.js";
|
|
2
|
+
import { codexAdapter } from "./codex.js";
|
|
3
|
+
import { geminiAdapter } from "./gemini.js";
|
|
4
|
+
const adapters = new Map([
|
|
5
|
+
["claude", claudeAdapter],
|
|
6
|
+
["gemini", geminiAdapter],
|
|
7
|
+
["codex", codexAdapter],
|
|
8
|
+
]);
|
|
9
|
+
export function getHostAdapter(host) {
|
|
10
|
+
return adapters.get(host) ?? null;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAI5C,MAAM,QAAQ,GAAG,IAAI,GAAG,CAA2B;IACjD,CAAC,QAAQ,EAAE,aAAa,CAAC;IACzB,CAAC,QAAQ,EAAE,aAAa,CAAC;IACzB,CAAC,OAAO,EAAE,YAAY,CAAC;CACxB,CAAC,CAAC;AASH,MAAM,UAAU,cAAc,CAAC,IAAiB;IAC9C,OAAO,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HostAdapter } from "./types.js";
|
|
2
|
+
import type { SessionHost } from "../lib/storage/index.js";
|
|
3
|
+
interface StructuredPrefixAdapterConfig {
|
|
4
|
+
host: SessionHost;
|
|
5
|
+
name: string;
|
|
6
|
+
prefix: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function createStructuredPrefixAdapter(config: StructuredPrefixAdapterConfig): HostAdapter;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=structured-prefix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structured-prefix.d.ts","sourceRoot":"","sources":["../../../src/adapters/structured-prefix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,WAAW,EACZ,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,UAAU,6BAA6B;IACrC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAuBD,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,6BAA6B,GACpC,WAAW,CA2Cb"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
function parseEnvelope(line, prefix) {
|
|
2
|
+
if (!line.startsWith(prefix)) {
|
|
3
|
+
return null;
|
|
4
|
+
}
|
|
5
|
+
const json = line.slice(prefix.length).trim();
|
|
6
|
+
if (!json) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
const parsed = JSON.parse(json);
|
|
10
|
+
if (!parsed.eventType) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return parsed;
|
|
14
|
+
}
|
|
15
|
+
export function createStructuredPrefixAdapter(config) {
|
|
16
|
+
return {
|
|
17
|
+
host: config.host,
|
|
18
|
+
name: config.name,
|
|
19
|
+
parseLine(line, stream, _context) {
|
|
20
|
+
try {
|
|
21
|
+
const envelope = parseEnvelope(line, config.prefix);
|
|
22
|
+
if (!envelope) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
handled: true,
|
|
27
|
+
suppressTranscript: true,
|
|
28
|
+
events: [
|
|
29
|
+
{
|
|
30
|
+
...envelope,
|
|
31
|
+
payload: {
|
|
32
|
+
...(envelope.payload ?? {}),
|
|
33
|
+
stream,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return {
|
|
41
|
+
handled: true,
|
|
42
|
+
suppressTranscript: false,
|
|
43
|
+
events: [
|
|
44
|
+
{
|
|
45
|
+
eventType: "error.observed",
|
|
46
|
+
summary: `${config.name} failed to parse host event`,
|
|
47
|
+
payload: {
|
|
48
|
+
line,
|
|
49
|
+
stream,
|
|
50
|
+
},
|
|
51
|
+
status: "parse-error",
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=structured-prefix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structured-prefix.js","sourceRoot":"","sources":["../../../src/adapters/structured-prefix.ts"],"names":[],"mappings":"AAaA,SAAS,aAAa,CACpB,IAAY,EACZ,MAAc;IAEd,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAyB,CAAC;IACxD,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,MAAqC;IAErC,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ;YAC9B,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;gBACpD,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACd,OAAO,IAAI,CAAC;gBACd,CAAC;gBAED,OAAO;oBACL,OAAO,EAAE,IAAI;oBACb,kBAAkB,EAAE,IAAI;oBACxB,MAAM,EAAE;wBACN;4BACE,GAAG,QAAQ;4BACX,OAAO,EAAE;gCACP,GAAG,CAAC,QAAQ,CAAC,OAAO,IAAI,EAAE,CAAC;gCAC3B,MAAM;6BACP;yBACF;qBACF;iBACF,CAAC;YACJ,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO;oBACL,OAAO,EAAE,IAAI;oBACb,kBAAkB,EAAE,KAAK;oBACzB,MAAM,EAAE;wBACN;4BACE,SAAS,EAAE,gBAAgB;4BAC3B,OAAO,EAAE,GAAG,MAAM,CAAC,IAAI,6BAA6B;4BACpD,OAAO,EAAE;gCACP,IAAI;gCACJ,MAAM;6BACP;4BACD,MAAM,EAAE,aAAa;yBACtB;qBACF;iBACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SessionHost, SessionStatus } from "../lib/storage/index.js";
|
|
2
|
+
export interface AdapterContext {
|
|
3
|
+
host: SessionHost;
|
|
4
|
+
cwd: string;
|
|
5
|
+
args: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface AdapterEventEnvelope {
|
|
8
|
+
eventType: string;
|
|
9
|
+
eventSubType?: string | null;
|
|
10
|
+
summary?: string | null;
|
|
11
|
+
payload?: Record<string, unknown> | null;
|
|
12
|
+
status?: string | null;
|
|
13
|
+
startedAt?: string | null;
|
|
14
|
+
endedAt?: string | null;
|
|
15
|
+
relatedMessageRole?: "user" | "assistant" | "system" | null;
|
|
16
|
+
}
|
|
17
|
+
export interface AdapterParseResult {
|
|
18
|
+
handled: boolean;
|
|
19
|
+
suppressTranscript?: boolean;
|
|
20
|
+
events?: AdapterEventEnvelope[];
|
|
21
|
+
}
|
|
22
|
+
export interface HostAdapter {
|
|
23
|
+
host: SessionHost;
|
|
24
|
+
name: string;
|
|
25
|
+
parseLine(line: string, stream: "stdout" | "stderr", context: AdapterContext): AdapterParseResult | null;
|
|
26
|
+
onSessionStart?(context: AdapterContext): AdapterEventEnvelope[];
|
|
27
|
+
onSessionEnd?(context: AdapterContext, result: {
|
|
28
|
+
exitCode: number;
|
|
29
|
+
status: SessionStatus;
|
|
30
|
+
}): AdapterEventEnvelope[];
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/adapters/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE1E,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,IAAI,CAAC;CAC7D;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,MAAM,CAAC,EAAE,oBAAoB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CACP,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,QAAQ,GAAG,QAAQ,EAC3B,OAAO,EAAE,cAAc,GACtB,kBAAkB,GAAG,IAAI,CAAC;IAC7B,cAAc,CAAC,CAAC,OAAO,EAAE,cAAc,GAAG,oBAAoB,EAAE,CAAC;IACjE,YAAY,CAAC,CACX,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAE,GAClD,oBAAoB,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/adapters/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-analyzer.d.ts","sourceRoot":"","sources":["../../../src/analyzers/content-analyzer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;
|
|
1
|
+
{"version":3,"file":"content-analyzer.d.ts","sourceRoot":"","sources":["../../../src/analyzers/content-analyzer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAsMD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAwB9D"}
|