@gmickel/gno 2.5.1 → 2.7.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 (160) hide show
  1. package/README.md +60 -5
  2. package/assets/skill/README.md +5 -1
  3. package/assets/skill/SKILL.md +80 -4
  4. package/assets/skill/cli-reference.md +132 -2
  5. package/assets/skill/examples.md +30 -0
  6. package/assets/skill/mcp-reference.md +54 -1
  7. package/assets/skill/recipes/capture-and-file.md +6 -0
  8. package/assets/skill/recipes/memory-file-decision.md +6 -0
  9. package/assets/skill/recipes/memory-supersede-fact.md +5 -0
  10. package/assets/skill/recipes/session-evidence-lookup.md +98 -0
  11. package/assets/spa-production.json.gz +0 -0
  12. package/browser-extension/artifacts/{gno-browser-clipper-v2.5.1.zip → gno-browser-clipper-v2.7.0.zip} +0 -0
  13. package/browser-extension/artifacts/gno-browser-clipper-v2.7.0.zip.sha256 +1 -0
  14. package/browser-extension/dist/manifest.json +1 -1
  15. package/package.json +2 -1
  16. package/spec/cli.md +449 -35
  17. package/spec/mcp.md +234 -4
  18. package/spec/output-schemas/ask.schema.json +1 -1
  19. package/spec/output-schemas/capture-receipt.schema.json +4 -1
  20. package/spec/output-schemas/doctor.schema.json +88 -0
  21. package/spec/output-schemas/error.schema.json +11 -2
  22. package/spec/output-schemas/get.schema.json +1 -1
  23. package/spec/output-schemas/mcp-capture-result.schema.json +4 -2
  24. package/spec/output-schemas/memory-remember.schema.json +10 -4
  25. package/spec/output-schemas/multi-get.schema.json +4 -1
  26. package/spec/output-schemas/peek.schema.json +2 -9
  27. package/spec/output-schemas/request-status.schema.json +113 -0
  28. package/spec/output-schemas/resident-status.schema.json +22 -0
  29. package/spec/output-schemas/search-result.schema.json +1 -1
  30. package/spec/output-schemas/search-results.schema.json +1 -1
  31. package/spec/output-schemas/sessions-automation-run.schema.json +46 -0
  32. package/spec/output-schemas/sessions-discovery.schema.json +38 -0
  33. package/spec/output-schemas/sessions-import-receipt.schema.json +156 -0
  34. package/spec/output-schemas/sessions-status.schema.json +432 -0
  35. package/spec/output-schemas/status.schema.json +98 -0
  36. package/src/cli/commands/ask.ts +14 -2
  37. package/src/cli/commands/capture.ts +55 -96
  38. package/src/cli/commands/daemon.ts +41 -0
  39. package/src/cli/commands/doctor.ts +54 -20
  40. package/src/cli/commands/embed.ts +41 -3
  41. package/src/cli/commands/ls.ts +3 -0
  42. package/src/cli/commands/memory.ts +12 -3
  43. package/src/cli/commands/query.ts +5 -0
  44. package/src/cli/commands/request-status.ts +59 -0
  45. package/src/cli/commands/reset.ts +39 -5
  46. package/src/cli/commands/sessions.ts +713 -0
  47. package/src/cli/commands/shared.ts +14 -1
  48. package/src/cli/commands/status.ts +63 -5
  49. package/src/cli/commands/vec.ts +54 -0
  50. package/src/cli/detach.ts +29 -1
  51. package/src/cli/errors.ts +13 -9
  52. package/src/cli/program.ts +441 -2
  53. package/src/cli/session-binding.ts +49 -0
  54. package/src/config/types.ts +8 -0
  55. package/src/core/capture-publish.ts +239 -0
  56. package/src/core/capture-sync.ts +12 -2
  57. package/src/core/host-paths.ts +31 -0
  58. package/src/core/memory-remember.ts +234 -122
  59. package/src/core/memory-types.ts +11 -0
  60. package/src/core/network-boundary-inventory.ts +8 -0
  61. package/src/core/request-receipts.ts +671 -0
  62. package/src/core/shutdown-budget.ts +6 -0
  63. package/src/core/vector-partition-status.ts +52 -0
  64. package/src/embed/backlog.ts +124 -18
  65. package/src/embed/fingerprint.ts +6 -3
  66. package/src/embed/retry.ts +66 -27
  67. package/src/embed/variant-backlog.ts +15 -10
  68. package/src/embed/variant-retry.ts +31 -22
  69. package/src/index.ts +30 -2
  70. package/src/llm/native-worker/dispatcher.ts +2 -0
  71. package/src/llm/native-worker/embedding-identity.ts +42 -0
  72. package/src/llm/native-worker/protocol.ts +1 -0
  73. package/src/llm/types.ts +3 -0
  74. package/src/mcp/context.ts +17 -0
  75. package/src/mcp/http-egress.ts +4 -0
  76. package/src/mcp/http-transport.ts +2 -0
  77. package/src/mcp/resources/index.ts +6 -5
  78. package/src/mcp/tool-descriptions-core.ts +1 -1
  79. package/src/mcp/tools/capture.ts +87 -85
  80. package/src/mcp/tools/index.ts +77 -4
  81. package/src/mcp/tools/memory-remember.ts +8 -1
  82. package/src/mcp/tools/memory-shared.ts +7 -1
  83. package/src/mcp/tools/request-status.ts +73 -0
  84. package/src/mcp/tools/sessions.ts +208 -0
  85. package/src/mcp/tools/status.ts +4 -0
  86. package/src/pipeline/hybrid.ts +37 -7
  87. package/src/pipeline/vsearch.ts +14 -2
  88. package/src/sdk/client.ts +180 -84
  89. package/src/sdk/index.ts +6 -0
  90. package/src/sdk/types.ts +54 -2
  91. package/src/serve/capture-service.ts +98 -32
  92. package/src/serve/config-sync.ts +3 -2
  93. package/src/serve/embed-scheduler.ts +133 -19
  94. package/src/serve/host-path-redaction.ts +79 -0
  95. package/src/serve/public/app.tsx +4 -1
  96. package/src/serve/public/components/CaptureModal.tsx +26 -8
  97. package/src/serve/public/components/sessions/AutomationPanel.tsx +800 -0
  98. package/src/serve/public/components/sessions/ImportReceipt.tsx +238 -0
  99. package/src/serve/public/components/sessions/SessionSearch.tsx +286 -0
  100. package/src/serve/public/components/sessions/SourcesPanel.tsx +541 -0
  101. package/src/serve/public/components/sessions/api.ts +40 -0
  102. package/src/serve/public/globals.built.css +1 -1
  103. package/src/serve/public/hooks/use-api.ts +26 -3
  104. package/src/serve/public/lib/request-intent.ts +77 -0
  105. package/src/serve/public/lib/snippet.tsx +52 -0
  106. package/src/serve/public/lib/workspace-actions.ts +12 -1
  107. package/src/serve/public/lib/workspace-tabs.ts +2 -0
  108. package/src/serve/public/pages/Dashboard.tsx +22 -9
  109. package/src/serve/public/pages/DocView.tsx +25 -6
  110. package/src/serve/public/pages/DocumentEditor.tsx +224 -104
  111. package/src/serve/public/pages/Search.tsx +1 -41
  112. package/src/serve/public/pages/Sessions.tsx +350 -0
  113. package/src/serve/resident-runtime.ts +69 -4
  114. package/src/serve/resident-status.ts +13 -1
  115. package/src/serve/routes/api.ts +476 -147
  116. package/src/serve/routes/sessions.ts +766 -0
  117. package/src/serve/security.ts +9 -0
  118. package/src/serve/server.ts +215 -10
  119. package/src/serve/session-automation.ts +146 -0
  120. package/src/serve/status-model.ts +16 -0
  121. package/src/serve/status.ts +2 -0
  122. package/src/serve/watch-reconciliation-shared.ts +3 -0
  123. package/src/serve/watch-service-events.ts +3 -2
  124. package/src/serve/watch-service-run-flush.ts +35 -2
  125. package/src/serve/watch-service.ts +5 -0
  126. package/src/sessions/archive.ts +348 -0
  127. package/src/sessions/automation-state.ts +444 -0
  128. package/src/sessions/automation-status.ts +239 -0
  129. package/src/sessions/automation.ts +1169 -0
  130. package/src/sessions/binding.ts +105 -0
  131. package/src/sessions/claude-hook.ts +240 -0
  132. package/src/sessions/config.ts +176 -0
  133. package/src/sessions/format.ts +191 -0
  134. package/src/sessions/import-child-env.ts +8 -0
  135. package/src/sessions/import-child.ts +152 -0
  136. package/src/sessions/parsers/claude-code.ts +259 -0
  137. package/src/sessions/parsers/codex.ts +303 -0
  138. package/src/sessions/parsers/hermes.ts +248 -0
  139. package/src/sessions/parsers/openclaw.ts +496 -0
  140. package/src/sessions/parsers/shared.ts +184 -0
  141. package/src/sessions/sanitize.ts +222 -0
  142. package/src/sessions/service.ts +1533 -0
  143. package/src/sessions/setup.ts +477 -0
  144. package/src/sessions/sources.ts +518 -0
  145. package/src/sessions/state.ts +118 -0
  146. package/src/sessions/types.ts +457 -0
  147. package/src/store/migrations/031-runtime-independent-vectors.ts +29 -0
  148. package/src/store/migrations/032-vector-runtime-callers.ts +17 -0
  149. package/src/store/migrations/index.ts +4 -0
  150. package/src/store/sqlite/adapter.ts +76 -16
  151. package/src/store/sqlite/scoped-index.ts +9 -0
  152. package/src/store/types.ts +11 -1
  153. package/src/store/vector/lazy.ts +46 -43
  154. package/src/store/vector/runtime-compat.ts +651 -0
  155. package/src/store/vector/sqlite-vec.ts +20 -2
  156. package/src/store/vector/status.ts +276 -35
  157. package/src/store/vector/types.ts +2 -0
  158. package/src/store/vector/variant-search.ts +71 -23
  159. package/src/store/vector/variants.ts +49 -14
  160. package/browser-extension/artifacts/gno-browser-clipper-v2.5.1.zip.sha256 +0 -1
@@ -0,0 +1,98 @@
1
+ # Sessions: Find What Was Said or Decided
2
+
3
+ Use this recipe when the user asks what was discussed, proposed, or decided
4
+ in earlier coding-agent sessions (Codex, Claude Code, OpenClaw, Hermes), or
5
+ wants those sessions made searchable. Session turns are evidence of what was
6
+ said, not facts.
7
+
8
+ ## Inputs
9
+
10
+ - The archive pair: one archive config file and its named index, for example
11
+ `~/gno-sessions/archive.yml` with `--index sessions`. Ask the user for it
12
+ when unknown; `sessions status` on the pair confirms it.
13
+ - What to find, in the words the conversation likely used.
14
+ - Scope: harness, project, role, or archive collection, when the user gives
15
+ one.
16
+
17
+ Every archive command passes both flags explicitly, as below. Substitute the
18
+ user's own config path and index name.
19
+
20
+ ## Workflow
21
+
22
+ 1. Check the archive exists and is current.
23
+
24
+ ```bash
25
+ gno --config ~/gno-sessions/archive.yml --index sessions sessions status --json
26
+ ```
27
+
28
+ Broad search on the user's normal index does not include sessions. If there
29
+ is no archive yet, stop and offer the setup steps (step 5); never import on
30
+ your own initiative.
31
+
32
+ 2. Search the archive, narrowest scope first.
33
+
34
+ ```bash
35
+ gno --config ~/gno-sessions/archive.yml --index sessions search "<decision words>" --author human --tags-all project/<name> --json
36
+ gno --config ~/gno-sessions/archive.yml --index sessions query "<question>" --category harness/codex -n 10 --json
37
+ gno --config ~/gno-sessions/archive.yml --index sessions search "<words>" -c <archive-collection> --tags-all role/assistant --json
38
+ ```
39
+
40
+ Tags: `harness/<codex|claude-code|openclaw|hermes>`, `role/<human|assistant>`,
41
+ `project/<basename>`, `project-id/<hash>`, `session-kind/<main|subagent|fork|continuation>`.
42
+ `--since`/`--until` filter on import time, not on when the turn was said.
43
+ Import does not embed: run `embed` on the same pair before relying on
44
+ `query`/`vsearch`.
45
+
46
+ 3. Read the full turn.
47
+
48
+ ```bash
49
+ gno --config ~/gno-sessions/archive.yml --index sessions get "<uri from the result, including ?index=sessions>"
50
+ ```
51
+
52
+ The body starts with `Human:` or `Assistant:` and ends with one `Provenance:`
53
+ line (assistant marker, `recorded unknown` when the time is missing, source,
54
+ native locator, turn). The recorded time is the result's document date. Keep
55
+ the `?index=` query string on every URI.
56
+
57
+ 4. Answer with attribution.
58
+ - A human turn is what the person said or decided.
59
+ - An assistant turn is a proposal ("the agent suggested ..."), never the
60
+ user's decision.
61
+ - Cite each turn by its `gno://` URI. State the recorded time from the
62
+ document date; say "time unknown" when the provenance line says
63
+ `recorded unknown`.
64
+
65
+ 5. Setup or refresh, only when the user asks.
66
+
67
+ ```bash
68
+ gno sessions discover # preview; imports nothing
69
+ gno --config ~/gno-sessions/archive.yml --index sessions sessions init --archive ~/gno-sessions/archive --collection sessions-work
70
+ gno --config ~/gno-sessions/archive.yml --index sessions sessions source add codex --harness codex --path ~/.codex/sessions --collection sessions-work
71
+ gno --config ~/gno-sessions/archive.yml --index sessions sessions import --source codex --dry-run # show the receipt first
72
+ gno --config ~/gno-sessions/archive.yml --index sessions sessions import --source codex --json
73
+ ```
74
+
75
+ Keep the archive outside the curated vault and use one collection per
76
+ privacy boundary (`--project <prefix>=<collection>` for per-project
77
+ routing). Reruns are incremental; a `partial` receipt with `truncated_tail`
78
+ or `format_drift` units is retried by the next import. `SESSIONS_BUSY`: wait
79
+ for the running import. `--limit <n>` bounds a large first import.
80
+
81
+ ## Guardrails
82
+
83
+ - Never pass the archive config without its `--index`, or the archive index
84
+ with another config: both fail with `SESSIONS_BINDING_MISMATCH`.
85
+ - Do not store a session turn as a fact automatically. If the user wants a
86
+ decision remembered, use `recipes/memory-file-decision.md` with the human
87
+ turn's URI as `--source`.
88
+ - Redaction is best effort. Do not paste archive text into external channels
89
+ without the user's approval; respect collection egress policy.
90
+ - Mixed retrieval (archive folder registered in the curated config) is the
91
+ user's explicit choice; do not set it up unasked.
92
+
93
+ ## Done
94
+
95
+ - Evidence cited by `gno://` URI with speaker and time, or an explicit "not
96
+ found in the session archive".
97
+ - Assistant proposals distinguished from human decisions.
98
+ - No import, registration, or memory write without the user's request.
Binary file
@@ -0,0 +1 @@
1
+ 2116eeada49b4479ac5967ec1bb79d1288b70529aba691b2b4ddaf33d131bc2e gno-browser-clipper-v2.7.0.zip
@@ -21,5 +21,5 @@
21
21
  "content_security_policy": {
22
22
  "extension_pages": "script-src 'self'; object-src 'none'; connect-src http://127.0.0.1:*"
23
23
  },
24
- "version": "2.5.1"
24
+ "version": "2.7.0"
25
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmickel/gno",
3
- "version": "2.5.1",
3
+ "version": "2.7.0",
4
4
  "description": "Local semantic search for your documents. Index Markdown, PDF, and Office files with hybrid BM25 + vector search.",
5
5
  "keywords": [
6
6
  "embeddings",
@@ -82,6 +82,7 @@
82
82
  "eval:hybrid": "bun --bun evalite evals/hybrid.eval.ts",
83
83
  "eval:memory": "bun --bun evalite evals/memory.eval.ts --threshold 100",
84
84
  "eval:memory:fixtures": "bun scripts/memory-eval-fixtures.ts",
85
+ "eval:sessions": "bun --bun evalite evals/sessions.eval.ts --threshold 100",
85
86
  "eval:hybrid:baseline": "bun scripts/hybrid-benchmark.ts --write",
86
87
  "eval:hybrid:delta": "bun scripts/hybrid-benchmark.ts --delta",
87
88
  "bench:ast-chunking": "bun scripts/ast-chunking-benchmark.ts",