@gmickel/gno 2.4.0 → 2.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/README.md +69 -6
- package/assets/skill/README.md +5 -1
- package/assets/skill/SKILL.md +98 -1
- package/assets/skill/cli-reference.md +140 -0
- package/assets/skill/examples.md +45 -0
- package/assets/skill/mcp-reference.md +62 -0
- package/assets/skill/recipes/capture-and-file.md +6 -0
- package/assets/skill/recipes/memory-file-decision.md +6 -0
- package/assets/skill/recipes/memory-supersede-fact.md +5 -0
- package/assets/skill/recipes/session-evidence-lookup.md +98 -0
- package/assets/spa-production.json.gz +0 -0
- package/browser-extension/artifacts/{gno-browser-clipper-v2.4.0.zip → gno-browser-clipper-v2.6.0.zip} +0 -0
- package/browser-extension/artifacts/gno-browser-clipper-v2.6.0.zip.sha256 +1 -0
- package/browser-extension/dist/manifest.json +1 -1
- package/package.json +2 -1
- package/spec/cli.md +358 -24
- package/spec/compiled-context.md +68 -0
- package/spec/mcp.md +223 -2
- package/spec/output-schemas/capture-receipt.schema.json +3 -0
- package/spec/output-schemas/compiled-context-check.schema.json +44 -0
- package/spec/output-schemas/compiled-context-file.schema.json +165 -0
- package/spec/output-schemas/compiled-context-preview.schema.json +142 -0
- package/spec/output-schemas/mcp-capture-result.schema.json +3 -0
- package/spec/output-schemas/memory-remember.schema.json +8 -2
- package/spec/output-schemas/request-status.schema.json +113 -0
- package/spec/output-schemas/sessions-automation-run.schema.json +46 -0
- package/spec/output-schemas/sessions-discovery.schema.json +38 -0
- package/spec/output-schemas/sessions-import-receipt.schema.json +156 -0
- package/spec/output-schemas/sessions-status.schema.json +432 -0
- package/src/app/compiled-context-files.ts +361 -0
- package/src/app/compiled-context.ts +240 -0
- package/src/app/context-surface.ts +7 -2
- package/src/cli/commands/ask.ts +14 -2
- package/src/cli/commands/audit.ts +4 -0
- package/src/cli/commands/capture.ts +55 -96
- package/src/cli/commands/context-compiled.ts +136 -0
- package/src/cli/commands/daemon.ts +41 -0
- package/src/cli/commands/ls.ts +3 -0
- package/src/cli/commands/memory.ts +12 -3
- package/src/cli/commands/request-status.ts +59 -0
- package/src/cli/commands/reset.ts +39 -5
- package/src/cli/commands/sessions.ts +713 -0
- package/src/cli/commands/shared.ts +14 -1
- package/src/cli/errors.ts +10 -3
- package/src/cli/program.ts +458 -1
- package/src/cli/session-binding.ts +49 -0
- package/src/config/types.ts +8 -0
- package/src/core/capture-publish.ts +239 -0
- package/src/core/capture-sync.ts +3 -0
- package/src/core/compiled-context.ts +254 -0
- package/src/core/context-budget.ts +2 -10
- package/src/core/file-lock.ts +22 -5
- package/src/core/folder-setup-planning.ts +2 -1
- package/src/core/memory-remember.ts +233 -122
- package/src/core/memory-types.ts +11 -0
- package/src/core/network-boundary-inventory.ts +16 -0
- package/src/core/request-receipts.ts +671 -0
- package/src/core/setup-receipt.ts +27 -20
- package/src/core/typed-metadata.ts +4 -0
- package/src/core/validation.ts +9 -2
- package/src/core/windows-private-path.ts +96 -0
- package/src/index.ts +11 -2
- package/src/ingestion/compiled-context.ts +15 -0
- package/src/ingestion/sync.ts +40 -8
- package/src/ingestion/walker.ts +5 -4
- package/src/llm/nodeLlamaCpp/simulator-install.ts +6 -2
- package/src/mcp/context.ts +8 -0
- package/src/mcp/http-egress.ts +15 -3
- package/src/mcp/http-transport.ts +2 -0
- package/src/mcp/retrieval-warnings.ts +24 -0
- package/src/mcp/tools/ask.ts +14 -1
- package/src/mcp/tools/capture.ts +87 -83
- package/src/mcp/tools/context.ts +46 -2
- package/src/mcp/tools/index.ts +119 -7
- package/src/mcp/tools/memory-remember.ts +7 -0
- package/src/mcp/tools/memory-shared.ts +7 -1
- package/src/mcp/tools/query.ts +3 -1
- package/src/mcp/tools/request-status.ts +73 -0
- package/src/mcp/tools/search.ts +3 -1
- package/src/mcp/tools/sessions.ts +208 -0
- package/src/mcp/tools/vsearch.ts +3 -1
- package/src/sdk/client.ts +252 -89
- package/src/sdk/index.ts +13 -0
- package/src/sdk/types.ts +82 -3
- package/src/serve/capture-service.ts +98 -32
- package/src/serve/compiled-context.ts +84 -0
- package/src/serve/config-sync.ts +3 -2
- package/src/serve/public/app.tsx +15 -1
- package/src/serve/public/components/CaptureModal.tsx +26 -8
- package/src/serve/public/components/sessions/AutomationPanel.tsx +800 -0
- package/src/serve/public/components/sessions/ImportReceipt.tsx +238 -0
- package/src/serve/public/components/sessions/SessionSearch.tsx +286 -0
- package/src/serve/public/components/sessions/SourcesPanel.tsx +541 -0
- package/src/serve/public/components/sessions/api.ts +40 -0
- package/src/serve/public/components/sessions/snippet.tsx +53 -0
- package/src/serve/public/globals.built.css +1 -1
- package/src/serve/public/hooks/use-api.ts +10 -2
- package/src/serve/public/lib/request-intent.ts +69 -0
- package/src/serve/public/lib/workspace-actions.ts +12 -1
- package/src/serve/public/lib/workspace-tabs.ts +4 -0
- package/src/serve/public/pages/CompiledContext.tsx +364 -0
- package/src/serve/public/pages/Dashboard.tsx +17 -0
- package/src/serve/public/pages/DocView.tsx +15 -1
- package/src/serve/public/pages/DocumentEditor.tsx +139 -96
- package/src/serve/public/pages/Sessions.tsx +350 -0
- package/src/serve/resident-runtime.ts +43 -3
- package/src/serve/routes/api.ts +476 -147
- package/src/serve/routes/sessions.ts +766 -0
- package/src/serve/security.ts +9 -0
- package/src/serve/server.ts +248 -3
- package/src/serve/session-automation.ts +146 -0
- package/src/serve/spa-production-build.ts +6 -5
- package/src/sessions/archive.ts +348 -0
- package/src/sessions/automation-state.ts +444 -0
- package/src/sessions/automation-status.ts +239 -0
- package/src/sessions/automation.ts +1169 -0
- package/src/sessions/binding.ts +105 -0
- package/src/sessions/claude-hook.ts +240 -0
- package/src/sessions/config.ts +176 -0
- package/src/sessions/format.ts +191 -0
- package/src/sessions/import-child-env.ts +8 -0
- package/src/sessions/import-child.ts +152 -0
- package/src/sessions/parsers/claude-code.ts +259 -0
- package/src/sessions/parsers/codex.ts +303 -0
- package/src/sessions/parsers/hermes.ts +248 -0
- package/src/sessions/parsers/openclaw.ts +496 -0
- package/src/sessions/parsers/shared.ts +184 -0
- package/src/sessions/sanitize.ts +222 -0
- package/src/sessions/service.ts +1533 -0
- package/src/sessions/setup.ts +477 -0
- package/src/sessions/sources.ts +518 -0
- package/src/sessions/state.ts +118 -0
- package/src/sessions/types.ts +457 -0
- package/src/store/sqlite/adapter.ts +68 -16
- package/src/store/sqlite/scoped-index.ts +9 -0
- package/browser-extension/artifacts/gno-browser-clipper-v2.4.0.zip.sha256 +0 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Compiled project context
|
|
2
|
+
|
|
3
|
+
Compiled context is a deterministic, extractive Markdown artifact derived from
|
|
4
|
+
a verified Capsule. Source text remains fenced untrusted evidence. It does not
|
|
5
|
+
install or overwrite agent instructions.
|
|
6
|
+
|
|
7
|
+
## Shared contract
|
|
8
|
+
|
|
9
|
+
- Preview input: {capsule: object, budgetTokens: positive integer, budgetBytes?: positive integer}.
|
|
10
|
+
- Check input: {capsule: object, markdown: string}. The artifact's own bounded
|
|
11
|
+
metadata records rendering settings; no filesystem paths are accepted remotely.
|
|
12
|
+
- Preview result: {schemaVersion:"1.0", rendererVersion:"1", capsuleId,
|
|
13
|
+
markdown, digest, verificationDigest, lineageDigest, budget:
|
|
14
|
+
{requestedTokens,requestedBytes,usedTokens,usedBytes,estimator,tokenizerFingerprint},
|
|
15
|
+
coverage:{complete,coveredFacets,unresolvedFacets}, evidenceIds,
|
|
16
|
+
omissions:[{evidenceId,reason}]}.
|
|
17
|
+
- Check result: {schemaVersion:"1.0",status:"current"|"stale"|"conflict"|"unverifiable",
|
|
18
|
+
reasons:string[],digest:string|null,capsuleId:string|null}. It never returns
|
|
19
|
+
artifact/evidence bytes on drift or authorization failure.
|
|
20
|
+
- Whole output (metadata, framing, citations and evidence) fits both budgets.
|
|
21
|
+
Bounds: 4 MiB input artifact/Capsule, 1,000,000 tokens, 4 MiB output bytes.
|
|
22
|
+
- Use the Capsule's recorded estimator. A matching active-tokenizer authority
|
|
23
|
+
is mandatory when recorded; there is no silent estimator fallback.
|
|
24
|
+
- Capsules1.1/1.2 contain required normalized retrieval/egress provenance.
|
|
25
|
+
Older Capsules must be rebuilt for compilation.
|
|
26
|
+
- Markdown begins with an owned gno:compiled-context metadata comment, recording
|
|
27
|
+
format/renderer versions, Capsule/verification/lineage identities, payload
|
|
28
|
+
digest and settings. The response digest hashes all output bytes.
|
|
29
|
+
- Compile/preview reject stale or unauthorized evidence. Check is read-only.
|
|
30
|
+
Current scope/config/model/index/tokenizer/policy identity must remain valid.
|
|
31
|
+
- Check and preview enforce current configured collections and egress for every
|
|
32
|
+
scope/evidence/lineage source, including same-index inline requests.
|
|
33
|
+
- Missing/invalid inputs are errors, never empty successful context.
|
|
34
|
+
|
|
35
|
+
## Local files
|
|
36
|
+
|
|
37
|
+
CLI: gno context compiled preview --capsule FILE --budget N [--bytes N]
|
|
38
|
+
CLI: gno context compiled compile --capsule FILE --budget N --output NAME.gno-context.md
|
|
39
|
+
CLI: gno context compiled check NAME.gno-context.md [--capsule FILE]
|
|
40
|
+
CLI: gno context compiled refresh NAME.gno-context.md --capsule-output FILE.gno-context.capsule.json
|
|
41
|
+
|
|
42
|
+
Compile requires a new output. The private adjacent sidecar records the explicit
|
|
43
|
+
Capsule path, output digest, renderer settings and format. Refresh checks the
|
|
44
|
+
owned output digest, rebuilds via the existing Capsule request, then rechecks
|
|
45
|
+
source/policy before atomic replacement. Unexpected manual edits conflict.
|
|
46
|
+
A no-change refresh is a verified no-op. Missing companions are unverifiable.
|
|
47
|
+
File output forbids symlink traversal and refuses unowned destinations.
|
|
48
|
+
Refresh must preflight the explicitly selected Capsule destination before
|
|
49
|
+
publishing; failure preserves the prior complete artifact bytes.
|
|
50
|
+
|
|
51
|
+
Check exit codes: 0 current, 3 stale, 4 conflict, 2 unverifiable.
|
|
52
|
+
Other invalid command input uses existing validation exit1.
|
|
53
|
+
Existing gno context check retains its unrelated configuration contract.
|
|
54
|
+
|
|
55
|
+
## Remote and browser
|
|
56
|
+
|
|
57
|
+
MCP: gno_context_compiled_preview and gno_context_compiled_check, read-only,
|
|
58
|
+
inline inputs only. REST: POST /api/context/compiled/preview and
|
|
59
|
+
POST /api/context/compiled/check with the same inputs. No remote file writes.
|
|
60
|
+
Local SDK exposes preview/check plus compile/check-file/refresh-file helpers.
|
|
61
|
+
|
|
62
|
+
Web UI previews verified bytes, exact cost, citations and omitted facets,
|
|
63
|
+
checks supplied artifact bytes, and downloads the server-produced Markdown.
|
|
64
|
+
Local file refresh is a CLI recipe, never a server path submission.
|
|
65
|
+
|
|
66
|
+
Generated _.gno-context._ paths and recognized compiled artifact/sidecar content
|
|
67
|
+
are excluded from ingestion, including renamed copies. Intentional indexing of
|
|
68
|
+
compiled context is not supported in this version.
|
package/spec/mcp.md
CHANGED
|
@@ -153,7 +153,7 @@ the resident gateway applies one profile to every connected client.
|
|
|
153
153
|
|
|
154
154
|
| Profile | Without `--enable-write` | With `--enable-write` |
|
|
155
155
|
| ---------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
|
|
156
|
-
| `full` (default) | Every read tool below (
|
|
156
|
+
| `full` (default) | Every read tool below (37) | Every read tool plus every write tool (59) |
|
|
157
157
|
| `core` | `gno_query`, `gno_search`, `gno_get`, `gno_multi_get`, `gno_context`, `gno_changes`, `gno_recall` (7) | The 7 read tools plus `gno_capture`, `gno_remember` (9) |
|
|
158
158
|
|
|
159
159
|
Both lists are exact: `core` advertises nothing else, and `full` is byte-for-byte
|
|
@@ -232,6 +232,10 @@ the core memory service acquires the same `.mcp-write.lock` lease for every
|
|
|
232
232
|
memory write, so an MCP remember and a CLI writer serialise on one lease. A
|
|
233
233
|
lease that stays busy past the wait window returns `MEMORY_WRITE_LEASE_BUSY`.
|
|
234
234
|
|
|
235
|
+
With a `requestId`, `gno_capture` and `gno_remember` admit the request under
|
|
236
|
+
this same lease; there is no second lock. A request whose earlier attempt
|
|
237
|
+
still holds the lease past the wait window returns `REQUEST_PENDING`.
|
|
238
|
+
|
|
235
239
|
### Resident Streamable HTTP boundary
|
|
236
240
|
|
|
237
241
|
`gno serve` and `gno daemon` mount the same stateful MCP surface at `/mcp`.
|
|
@@ -1531,6 +1535,10 @@ Create a new document in a collection (write-enabled).
|
|
|
1531
1535
|
"capturedAt": { "type": "string", "format": "date-time" },
|
|
1532
1536
|
"externalId": { "type": "string" }
|
|
1533
1537
|
}
|
|
1538
|
+
},
|
|
1539
|
+
"requestId": {
|
|
1540
|
+
"type": "string",
|
|
1541
|
+
"description": "Optional caller request ID (1-128 of A-Z a-z 0-9 . _ : -). Reuse the same ID when retrying the same write after a lost response; a new intent needs a new ID"
|
|
1534
1542
|
}
|
|
1535
1543
|
},
|
|
1536
1544
|
"required": ["collection"]
|
|
@@ -1585,6 +1593,13 @@ Create a new document in a collection (write-enabled).
|
|
|
1585
1593
|
writing
|
|
1586
1594
|
- Writes run under the MCP write lock and are only registered when the server
|
|
1587
1595
|
starts with `--enable-write` or `GNO_MCP_ENABLE_WRITE=1`
|
|
1596
|
+
- `requestId` (optional) makes a retry of the same call safe; look it up with
|
|
1597
|
+
[`gno_request_status`](#gno_request_status). Semantics:
|
|
1598
|
+
`docs/guides/retries-and-request-ids.md`
|
|
1599
|
+
- With a `requestId`, the result adds
|
|
1600
|
+
`request: { requestId, status: "committed", replayed, committedAt }` and the
|
|
1601
|
+
text output adds `Request: <id> committed` (`(replayed)` on a replay). The
|
|
1602
|
+
field is absent when no `requestId` was sent
|
|
1588
1603
|
|
|
1589
1604
|
**Output Schema:** `gno://schemas/mcp-capture-result@1.0`, compatible with the
|
|
1590
1605
|
shared `gno://schemas/capture-receipt@1.0` contract.
|
|
@@ -1651,6 +1666,10 @@ file edits update existing notes, `gno_remember` upserts a fact.
|
|
|
1651
1666
|
"source": {
|
|
1652
1667
|
"type": "string",
|
|
1653
1668
|
"description": "Free-text evidence for the fact"
|
|
1669
|
+
},
|
|
1670
|
+
"requestId": {
|
|
1671
|
+
"type": "string",
|
|
1672
|
+
"description": "Optional caller request ID (1-128 of A-Z a-z 0-9 . _ : -). Reuse the same ID when retrying the same write after a lost response; a new intent needs a new ID"
|
|
1654
1673
|
}
|
|
1655
1674
|
},
|
|
1656
1675
|
"required": ["text", "collection", "scopes"]
|
|
@@ -1668,6 +1687,9 @@ file edits update existing notes, `gno_remember` upserts a fact.
|
|
|
1668
1687
|
searchable)
|
|
1669
1688
|
- `matching` — `mode` (`semantic` | `lexical`), `threshold`, and
|
|
1670
1689
|
`semanticUnavailable` when lexical matching was used
|
|
1690
|
+
- `request` — present on `existing`, `added`, and `superseded` results when a
|
|
1691
|
+
`requestId` was sent: `{ requestId, status: "committed", replayed,
|
|
1692
|
+
committedAt }`
|
|
1671
1693
|
|
|
1672
1694
|
**Notes:**
|
|
1673
1695
|
|
|
@@ -1682,6 +1704,10 @@ file edits update existing notes, `gno_remember` upserts a fact.
|
|
|
1682
1704
|
- The core service holds the shared write lease for the write and lexical
|
|
1683
1705
|
sync; the MCP adapter takes no lock of its own
|
|
1684
1706
|
- Identity mapping is the same as `gno_recall`
|
|
1707
|
+
- `requestId` requires `decision` (`add` or `supersede`); a candidates-only
|
|
1708
|
+
call with a `requestId` returns `REQUEST_ID_INVALID`. `caller`, `session`,
|
|
1709
|
+
and the MCP session are not part of the request identity. Semantics:
|
|
1710
|
+
`docs/guides/retries-and-request-ids.md`
|
|
1685
1711
|
- Annotations: `readOnlyHint: false`, `destructiveHint: false`,
|
|
1686
1712
|
`idempotentHint: false`
|
|
1687
1713
|
|
|
@@ -1693,10 +1719,178 @@ file edits update existing notes, `gno_remember` upserts a fact.
|
|
|
1693
1719
|
`MEMORY_PREDECESSOR_NOT_FOUND`, `MEMORY_PREDECESSOR_HASH_MISMATCH`,
|
|
1694
1720
|
`MEMORY_SUPERSEDE_CONFLICT`, `MEMORY_FENCED_REPLAY`, `MEMORY_FENCED_DERIVED`,
|
|
1695
1721
|
`MEMORY_WRITE_LEASE_BUSY`, `MEMORY_SYNC_FAILED`,
|
|
1696
|
-
`MEMORY_SUPERSEDE_PROJECTION_FAILED`, `MEMORY_QUERY_FAILED
|
|
1722
|
+
`MEMORY_SUPERSEDE_PROJECTION_FAILED`, `MEMORY_QUERY_FAILED`, and the
|
|
1723
|
+
`REQUEST_*` codes listed under [`gno_request_status`](#gno_request_status).
|
|
1724
|
+
|
|
1725
|
+
---
|
|
1726
|
+
|
|
1727
|
+
### gno_request_status
|
|
1728
|
+
|
|
1729
|
+
Look up a `requestId` sent with `gno_capture` or `gno_remember` before retrying
|
|
1730
|
+
the write (write-enabled server).
|
|
1731
|
+
|
|
1732
|
+
The tool is read-only but registered only when the server starts with
|
|
1733
|
+
`--enable-write` (or `GNO_MCP_ENABLE_WRITE=1`), and only on the `full` tool
|
|
1734
|
+
profile; `core` does not advertise it.
|
|
1735
|
+
|
|
1736
|
+
**Input Schema:**
|
|
1737
|
+
|
|
1738
|
+
```json
|
|
1739
|
+
{
|
|
1740
|
+
"type": "object",
|
|
1741
|
+
"properties": {
|
|
1742
|
+
"requestId": {
|
|
1743
|
+
"type": "string",
|
|
1744
|
+
"description": "Request ID previously sent with gno_capture or gno_remember"
|
|
1745
|
+
}
|
|
1746
|
+
},
|
|
1747
|
+
"required": ["requestId"]
|
|
1748
|
+
}
|
|
1749
|
+
```
|
|
1750
|
+
|
|
1751
|
+
**Response (`structuredContent`):** `gno://schemas/request-status@1.0`
|
|
1752
|
+
|
|
1753
|
+
```json
|
|
1754
|
+
{
|
|
1755
|
+
"requestId": "0f8e5c1a-3c1e-4d0b-9a57-2f4f3b8f2c11",
|
|
1756
|
+
"status": "committed",
|
|
1757
|
+
"operation": "capture",
|
|
1758
|
+
"createdAt": "2026-09-24T08:00:00.000Z",
|
|
1759
|
+
"updatedAt": "2026-09-24T08:00:00.120Z",
|
|
1760
|
+
"result": {
|
|
1761
|
+
"uri": "gno://notes/inbox/2026-09-24/capture-3f9c.md",
|
|
1762
|
+
"docid": "#a1b2c3",
|
|
1763
|
+
"contentHash": "<sha256>"
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
```
|
|
1767
|
+
|
|
1768
|
+
- `status`: `pending` | `committed` | `expired` | `not_found`.
|
|
1769
|
+
- `operation`: `capture` | `remember` | `document.update`. `result` appears
|
|
1770
|
+
only for `committed` and carries `uri`, `docid`, and `contentHash` (or
|
|
1771
|
+
`sourceHash` for a document update). Never note or fact content. A
|
|
1772
|
+
`not_found` result has only `requestId` and `status`.
|
|
1773
|
+
- Text output: `Request:`, `Status:`, and, when present, `Operation:`,
|
|
1774
|
+
`Updated:`, `URI:` lines.
|
|
1775
|
+
|
|
1776
|
+
**Namespaces:** stdio uses the local-owner namespace shared with the CLI, SDK,
|
|
1777
|
+
and `gno serve` REST; resident Streamable HTTP uses the authorized identity
|
|
1778
|
+
(loopback, or the configured bearer token), not the MCP session. Visibility
|
|
1779
|
+
and token-rotation rules: `docs/guides/retries-and-request-ids.md`.
|
|
1780
|
+
|
|
1781
|
+
**Annotations:** `readOnlyHint: true`, `destructiveHint: false`,
|
|
1782
|
+
`idempotentHint: true`, `openWorldHint: false`.
|
|
1783
|
+
|
|
1784
|
+
**Request error codes** (on `gno_capture`, `gno_remember`, and this tool; tool
|
|
1785
|
+
error text `CODE: message`, `structuredContent.error` = `CODE`):
|
|
1786
|
+
`REQUEST_ID_INVALID`, `REQUEST_ID_CONFLICT`, `REQUEST_EXPIRED`,
|
|
1787
|
+
`REQUEST_PENDING`, `REQUEST_RECOVERY_CONFLICT`, `REQUEST_CAPACITY_EXHAUSTED`,
|
|
1788
|
+
`REQUEST_LEDGER_UNAVAILABLE`. Meanings:
|
|
1789
|
+
`docs/guides/retries-and-request-ids.md#errors`.
|
|
1697
1790
|
|
|
1698
1791
|
---
|
|
1699
1792
|
|
|
1793
|
+
### gno_sessions_status
|
|
1794
|
+
|
|
1795
|
+
Read-only status of a session-archive server (a server started with the
|
|
1796
|
+
dedicated archive `--config` and `--index`). Registered with the `full`
|
|
1797
|
+
profile only; not part of `core`.
|
|
1798
|
+
|
|
1799
|
+
**Input Schema:** `{}` (no arguments).
|
|
1800
|
+
|
|
1801
|
+
**Output:** the shared `sessions-status` schema
|
|
1802
|
+
(`spec/output-schemas/sessions-status.schema.json`): archive collections with
|
|
1803
|
+
thread counts and, per owner-registered source, its ID, harness, destination
|
|
1804
|
+
collection, availability, unit counts (complete, incomplete, failed,
|
|
1805
|
+
pending), `sourceUnavailable`, `staleParser` and last import time, and the
|
|
1806
|
+
`automation` block (daemon state, per-profile state, hook and schedule
|
|
1807
|
+
switches, pending and running work, last run, last success, next due time,
|
|
1808
|
+
recovery action). The result contains no host paths.
|
|
1809
|
+
|
|
1810
|
+
**Errors:** `SESSIONS_NOT_CONFIGURED` when the server's config has no
|
|
1811
|
+
`sessions` block.
|
|
1812
|
+
|
|
1813
|
+
### gno_sessions_import
|
|
1814
|
+
|
|
1815
|
+
Manually import one owner-registered session source into the archive and sync
|
|
1816
|
+
the changed archive files (write-enabled; `full` profile only). There is no
|
|
1817
|
+
MCP discovery tool: remote clients never learn host directories.
|
|
1818
|
+
|
|
1819
|
+
**Input Schema:**
|
|
1820
|
+
|
|
1821
|
+
```json
|
|
1822
|
+
{
|
|
1823
|
+
"type": "object",
|
|
1824
|
+
"additionalProperties": false,
|
|
1825
|
+
"required": ["sourceId"],
|
|
1826
|
+
"properties": {
|
|
1827
|
+
"sourceId": {
|
|
1828
|
+
"type": "string",
|
|
1829
|
+
"description": "ID of an owner-registered session source (see gno_sessions_status)"
|
|
1830
|
+
},
|
|
1831
|
+
"dryRun": {
|
|
1832
|
+
"type": "boolean",
|
|
1833
|
+
"description": "Parse and report without writing archive or index state"
|
|
1834
|
+
},
|
|
1835
|
+
"limit": {
|
|
1836
|
+
"type": "integer",
|
|
1837
|
+
"minimum": 1,
|
|
1838
|
+
"maximum": 100000,
|
|
1839
|
+
"description": "Maximum changed units processed this call; the rest are deferred"
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
```
|
|
1844
|
+
|
|
1845
|
+
Unknown keys (for example `paths`) are rejected: MCP imports name a
|
|
1846
|
+
registered source ID only.
|
|
1847
|
+
|
|
1848
|
+
**Output:** the shared `sessions-import-receipt` schema. Partial imports
|
|
1849
|
+
(`status: "partial"`) stay visible and are retried by the next call; the
|
|
1850
|
+
receipt carries no host paths or session content.
|
|
1851
|
+
|
|
1852
|
+
Registered only with `--enable-write` (like `gno_capture` and
|
|
1853
|
+
`gno_remember`); without it the tool is not advertised. A dispatch while
|
|
1854
|
+
writes are disabled returns `WRITE_DISABLED`.
|
|
1855
|
+
|
|
1856
|
+
### gno_sessions_automation_run
|
|
1857
|
+
|
|
1858
|
+
Run one owner-configured automation profile now through the manual importer
|
|
1859
|
+
and record the outcome in automation status (write-enabled; `full` profile
|
|
1860
|
+
only). It cannot enable hooks or schedules, add sources, or change
|
|
1861
|
+
destinations; those stay local-owner operations.
|
|
1862
|
+
|
|
1863
|
+
**Input Schema:**
|
|
1864
|
+
|
|
1865
|
+
```json
|
|
1866
|
+
{
|
|
1867
|
+
"type": "object",
|
|
1868
|
+
"additionalProperties": false,
|
|
1869
|
+
"required": ["profileId"],
|
|
1870
|
+
"properties": {
|
|
1871
|
+
"profileId": {
|
|
1872
|
+
"type": "string",
|
|
1873
|
+
"description": "ID of an owner-configured automation profile (see gno_sessions_status)"
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
```
|
|
1878
|
+
|
|
1879
|
+
**Output:** the shared `sessions-automation-run` schema
|
|
1880
|
+
(`spec/output-schemas/sessions-automation-run.schema.json`): `ran`,
|
|
1881
|
+
`outcome` (`complete`, `up_to_date`, `partial`, `failed`, or `not_started`),
|
|
1882
|
+
`reason`, `pending`, and one `sessions-import-receipt` per source. No host
|
|
1883
|
+
paths or session content.
|
|
1884
|
+
|
|
1885
|
+
**Errors:** `SESSIONS_UNKNOWN_PROFILE`, `SESSIONS_NOT_CONFIGURED`,
|
|
1886
|
+
`WRITE_DISABLED`; unknown keys are rejected.
|
|
1887
|
+
|
|
1888
|
+
**Errors:** `SESSIONS_UNKNOWN_SOURCE`, `SESSIONS_SOURCE_UNAVAILABLE`,
|
|
1889
|
+
`SESSIONS_UNKNOWN_COLLECTION`, `SESSIONS_INVALID_INPUT`,
|
|
1890
|
+
`SESSIONS_NOT_CONFIGURED`; `SESSIONS_BUSY` when another import holds the
|
|
1891
|
+
archive lock; `SESSIONS_RUNTIME_FAILURE` (fixed, path-free message) for filesystem or
|
|
1892
|
+
index failures.
|
|
1893
|
+
|
|
1700
1894
|
### gno_list_tags
|
|
1701
1895
|
|
|
1702
1896
|
List all tags with document counts.
|
|
@@ -2793,6 +2987,8 @@ Resource errors use standard MCP error responses.
|
|
|
2793
2987
|
- `MEMORY_*` — Memory contract errors from `gno_recall` / `gno_remember`;
|
|
2794
2988
|
the stable code set is `MemoryErrorCode` in `src/core/memory.ts` and each
|
|
2795
2989
|
tool section above lists the codes it returns
|
|
2990
|
+
- `REQUEST_*` — Request ID errors from `gno_capture`, `gno_remember`, and
|
|
2991
|
+
`gno_request_status`; see [`gno_request_status`](#gno_request_status)
|
|
2796
2992
|
|
|
2797
2993
|
---
|
|
2798
2994
|
|
|
@@ -3066,3 +3262,28 @@ intersect caller scope before candidate limits and never expand authority.
|
|
|
3066
3262
|
[metadata-predicate.schema.json](output-schemas/metadata-predicate.schema.json).
|
|
3067
3263
|
See [Typed metadata filters](../docs/TYPED-METADATA.md) for exact membership,
|
|
3068
3264
|
missing-field, invalid-document, and bounded-input semantics.
|
|
3265
|
+
|
|
3266
|
+
### Retrieval coverage in text responses
|
|
3267
|
+
|
|
3268
|
+
Search, vector search and query retain retrieval warnings in both text content
|
|
3269
|
+
and structured metadata, including zero-result responses. Incomplete or unknown
|
|
3270
|
+
metadata coverage does not establish absence. Preserve requested filters and
|
|
3271
|
+
scope; diagnose with the same filter when an expected target is known. Otherwise
|
|
3272
|
+
inspect the scoped coverage warning before claiming completeness.
|
|
3273
|
+
|
|
3274
|
+
All typed-filter input descriptions carry this guidance. Verified Ask text
|
|
3275
|
+
also exposes the Capsule's metadata coverage warning. The compact agent
|
|
3276
|
+
protocol block and retrieval ladder remain unchanged.
|
|
3277
|
+
|
|
3278
|
+
Coverage counts describe the scoped corpus, not the existence or metadata state of a particular matching document. With no known target, report the coverage limit instead of inventing a target or broadening the requested search.
|
|
3279
|
+
|
|
3280
|
+
### Compiled context tools
|
|
3281
|
+
|
|
3282
|
+
`gno_context_compiled_preview` accepts an inline Capsule, `budgetTokens` and
|
|
3283
|
+
optional `budgetBytes`; returns verified Markdown, digest, whole-output cost,
|
|
3284
|
+
coverage and omissions. `gno_context_compiled_check` accepts an inline Capsule
|
|
3285
|
+
and `markdown`; returns current/stale/conflict/unverifiable with bounded reasons.
|
|
3286
|
+
Both are read-only full-profile tools. Inputs are strict: no host paths, output
|
|
3287
|
+
destinations, or caller authorization fields. Current runtime scope and transport
|
|
3288
|
+
egress policy apply even to caller-supplied Capsules. See
|
|
3289
|
+
[compiled context](compiled-context.md) for exact shared schemas and bounds.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"schemaVersion": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "1.0"
|
|
8
|
+
},
|
|
9
|
+
"status": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"enum": ["current", "stale", "conflict", "unverifiable"]
|
|
12
|
+
},
|
|
13
|
+
"reasons": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"digest": {
|
|
20
|
+
"anyOf": [
|
|
21
|
+
{
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "null"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"capsuleId": {
|
|
31
|
+
"anyOf": [
|
|
32
|
+
{
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "null"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": ["schemaVersion", "status", "reasons", "digest", "capsuleId"],
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"status": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"enum": ["written", "unchanged"]
|
|
8
|
+
},
|
|
9
|
+
"outputPath": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1
|
|
12
|
+
},
|
|
13
|
+
"capsulePath": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1
|
|
16
|
+
},
|
|
17
|
+
"sidecarPath": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1
|
|
20
|
+
},
|
|
21
|
+
"preview": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"schemaVersion": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"const": "1.0"
|
|
27
|
+
},
|
|
28
|
+
"rendererVersion": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"const": "1"
|
|
31
|
+
},
|
|
32
|
+
"capsuleId": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
35
|
+
},
|
|
36
|
+
"markdown": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"digest": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
42
|
+
},
|
|
43
|
+
"verificationDigest": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
46
|
+
},
|
|
47
|
+
"lineageDigest": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
50
|
+
},
|
|
51
|
+
"budget": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"requestedTokens": {
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"exclusiveMinimum": 0,
|
|
57
|
+
"maximum": 1000000
|
|
58
|
+
},
|
|
59
|
+
"requestedBytes": {
|
|
60
|
+
"type": "integer",
|
|
61
|
+
"exclusiveMinimum": 0,
|
|
62
|
+
"maximum": 4194304
|
|
63
|
+
},
|
|
64
|
+
"usedTokens": {
|
|
65
|
+
"type": "integer",
|
|
66
|
+
"minimum": 0,
|
|
67
|
+
"maximum": 9007199254740991
|
|
68
|
+
},
|
|
69
|
+
"usedBytes": {
|
|
70
|
+
"type": "integer",
|
|
71
|
+
"minimum": 0,
|
|
72
|
+
"maximum": 9007199254740991
|
|
73
|
+
},
|
|
74
|
+
"estimator": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": ["unicode_conservative", "active_tokenizer"]
|
|
77
|
+
},
|
|
78
|
+
"tokenizerFingerprint": {
|
|
79
|
+
"anyOf": [
|
|
80
|
+
{
|
|
81
|
+
"type": "string",
|
|
82
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"type": "null"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": [
|
|
91
|
+
"requestedTokens",
|
|
92
|
+
"requestedBytes",
|
|
93
|
+
"usedTokens",
|
|
94
|
+
"usedBytes",
|
|
95
|
+
"estimator",
|
|
96
|
+
"tokenizerFingerprint"
|
|
97
|
+
],
|
|
98
|
+
"additionalProperties": false
|
|
99
|
+
},
|
|
100
|
+
"coverage": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"complete": {
|
|
104
|
+
"type": "boolean"
|
|
105
|
+
},
|
|
106
|
+
"coveredFacets": {
|
|
107
|
+
"type": "array",
|
|
108
|
+
"items": {
|
|
109
|
+
"type": "string"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"unresolvedFacets": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"items": {
|
|
115
|
+
"type": "string"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"required": ["complete", "coveredFacets", "unresolvedFacets"],
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
},
|
|
122
|
+
"evidenceIds": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"items": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"omissions": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"items": {
|
|
132
|
+
"type": "object",
|
|
133
|
+
"properties": {
|
|
134
|
+
"evidenceId": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
137
|
+
},
|
|
138
|
+
"reason": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"required": ["evidenceId", "reason"],
|
|
143
|
+
"additionalProperties": false
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"required": [
|
|
148
|
+
"schemaVersion",
|
|
149
|
+
"rendererVersion",
|
|
150
|
+
"capsuleId",
|
|
151
|
+
"markdown",
|
|
152
|
+
"digest",
|
|
153
|
+
"verificationDigest",
|
|
154
|
+
"lineageDigest",
|
|
155
|
+
"budget",
|
|
156
|
+
"coverage",
|
|
157
|
+
"evidenceIds",
|
|
158
|
+
"omissions"
|
|
159
|
+
],
|
|
160
|
+
"additionalProperties": false
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"required": ["status", "outputPath", "capsulePath", "sidecarPath", "preview"],
|
|
164
|
+
"additionalProperties": false
|
|
165
|
+
}
|