@gmickel/gno 2.5.1 → 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 +60 -5
- package/assets/skill/README.md +5 -1
- package/assets/skill/SKILL.md +75 -1
- package/assets/skill/cli-reference.md +123 -0
- package/assets/skill/examples.md +30 -0
- package/assets/skill/mcp-reference.md +52 -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.5.1.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 +347 -24
- package/spec/mcp.md +198 -2
- package/spec/output-schemas/capture-receipt.schema.json +3 -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/cli/commands/ask.ts +14 -2
- package/src/cli/commands/capture.ts +55 -96
- 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/program.ts +388 -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/memory-remember.ts +233 -122
- package/src/core/memory-types.ts +11 -0
- package/src/core/network-boundary-inventory.ts +8 -0
- package/src/core/request-receipts.ts +671 -0
- package/src/index.ts +9 -0
- package/src/mcp/context.ts +8 -0
- package/src/mcp/http-egress.ts +4 -0
- package/src/mcp/http-transport.ts +2 -0
- package/src/mcp/tools/capture.ts +87 -83
- package/src/mcp/tools/index.ts +66 -0
- package/src/mcp/tools/memory-remember.ts +7 -0
- package/src/mcp/tools/memory-shared.ts +7 -1
- package/src/mcp/tools/request-status.ts +73 -0
- package/src/mcp/tools/sessions.ts +208 -0
- package/src/sdk/client.ts +180 -84
- package/src/sdk/index.ts +6 -0
- package/src/sdk/types.ts +54 -2
- package/src/serve/capture-service.ts +98 -32
- package/src/serve/config-sync.ts +3 -2
- package/src/serve/public/app.tsx +4 -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 +2 -0
- package/src/serve/public/pages/Dashboard.tsx +10 -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 +205 -1
- package/src/serve/session-automation.ts +146 -0
- 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 +54 -15
- package/src/store/sqlite/scoped-index.ts +9 -0
- package/browser-extension/artifacts/gno-browser-clipper-v2.5.1.zip.sha256 +0 -1
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).
|
|
1697
1724
|
|
|
1698
1725
|
---
|
|
1699
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`.
|
|
1790
|
+
|
|
1791
|
+
---
|
|
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
|
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
"properties": {
|
|
13
13
|
"outcome": { "const": "existing" },
|
|
14
14
|
"record": { "$ref": "#/$defs/fact" },
|
|
15
|
-
"matching": { "$ref": "#/$defs/matching" }
|
|
15
|
+
"matching": { "$ref": "#/$defs/matching" },
|
|
16
|
+
"request": {
|
|
17
|
+
"$ref": "gno://schemas/request-status@1.0#/$defs/requestReceipt"
|
|
18
|
+
}
|
|
16
19
|
}
|
|
17
20
|
},
|
|
18
21
|
{
|
|
@@ -40,7 +43,10 @@
|
|
|
40
43
|
"description": "Absolute path of the fact file that was written."
|
|
41
44
|
},
|
|
42
45
|
"sync": { "$ref": "#/$defs/sync" },
|
|
43
|
-
"matching": { "$ref": "#/$defs/matching" }
|
|
46
|
+
"matching": { "$ref": "#/$defs/matching" },
|
|
47
|
+
"request": {
|
|
48
|
+
"$ref": "gno://schemas/request-status@1.0#/$defs/requestReceipt"
|
|
49
|
+
}
|
|
44
50
|
}
|
|
45
51
|
}
|
|
46
52
|
],
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/request-status@1.0",
|
|
4
|
+
"title": "GNO Request Status",
|
|
5
|
+
"description": "Content-free lookup of a write request ID (CLI `gno request-status --json`, MCP gno_request_status, REST GET /api/requests/:requestId, SDK client.requestStatus()). Lookups are confined to the caller's namespace; another namespace's request reads as not_found.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"oneOf": [
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"required": [
|
|
12
|
+
"requestId",
|
|
13
|
+
"status",
|
|
14
|
+
"operation",
|
|
15
|
+
"createdAt",
|
|
16
|
+
"updatedAt",
|
|
17
|
+
"result"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"requestId": { "$ref": "#/$defs/requestId" },
|
|
21
|
+
"status": { "const": "committed" },
|
|
22
|
+
"operation": { "$ref": "#/$defs/operation" },
|
|
23
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
24
|
+
"updatedAt": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"format": "date-time",
|
|
27
|
+
"description": "When the request committed."
|
|
28
|
+
},
|
|
29
|
+
"result": { "$ref": "#/$defs/result" }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": [
|
|
36
|
+
"requestId",
|
|
37
|
+
"status",
|
|
38
|
+
"operation",
|
|
39
|
+
"createdAt",
|
|
40
|
+
"updatedAt"
|
|
41
|
+
],
|
|
42
|
+
"properties": {
|
|
43
|
+
"requestId": { "$ref": "#/$defs/requestId" },
|
|
44
|
+
"status": {
|
|
45
|
+
"enum": ["pending", "expired"],
|
|
46
|
+
"description": "pending: accepted but not finished; retry the same call with the same ID. expired: already ran; its outcome was compacted; it will not run again."
|
|
47
|
+
},
|
|
48
|
+
"operation": { "$ref": "#/$defs/operation" },
|
|
49
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
50
|
+
"updatedAt": { "type": "string", "format": "date-time" }
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["requestId", "status"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"requestId": { "$ref": "#/$defs/requestId" },
|
|
59
|
+
"status": {
|
|
60
|
+
"const": "not_found",
|
|
61
|
+
"description": "Nothing was accepted under this ID in the caller's namespace (or it was rejected before any write)."
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"$defs": {
|
|
67
|
+
"requestReceipt": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"description": "The `request` field a write result carries when the caller sent a requestId (capture, remember, document update). replayed is true when an identical retry returned the recorded outcome without executing again. Shared by capture-receipt, mcp-capture-result, and memory-remember.",
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"required": ["requestId", "status", "replayed", "committedAt"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"requestId": { "$ref": "#/$defs/requestId" },
|
|
74
|
+
"status": { "const": "committed" },
|
|
75
|
+
"replayed": { "type": "boolean" },
|
|
76
|
+
"committedAt": { "type": "string", "format": "date-time" }
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"requestId": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"minLength": 1,
|
|
82
|
+
"maxLength": 128,
|
|
83
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
|
|
84
|
+
},
|
|
85
|
+
"operation": {
|
|
86
|
+
"enum": ["capture", "remember", "document.update"]
|
|
87
|
+
},
|
|
88
|
+
"sha256": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
91
|
+
},
|
|
92
|
+
"result": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"description": "Pointer to what the committed request produced. Never note or fact content.",
|
|
96
|
+
"properties": {
|
|
97
|
+
"uri": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"pattern": "^gno://[^/]+/.+"
|
|
100
|
+
},
|
|
101
|
+
"docid": { "type": "string" },
|
|
102
|
+
"contentHash": {
|
|
103
|
+
"$ref": "#/$defs/sha256",
|
|
104
|
+
"description": "Capture and remember: content hash of the note or fact."
|
|
105
|
+
},
|
|
106
|
+
"sourceHash": {
|
|
107
|
+
"$ref": "#/$defs/sha256",
|
|
108
|
+
"description": "Document update: source hash after the save."
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/sessions-automation-run@1.0",
|
|
4
|
+
"title": "GNO Session Automation Run Result",
|
|
5
|
+
"description": "Result of running one automation profile (CLI `gno sessions automation run --json`, MCP gno_sessions_automation_run, REST POST /api/sessions/automation/run, SDK client.runSessionsAutomation()). Derived from SessionAutomationRunResult in src/sessions/types.ts. Contains no host paths or session content.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schemaVersion",
|
|
10
|
+
"profileId",
|
|
11
|
+
"ran",
|
|
12
|
+
"outcome",
|
|
13
|
+
"reason",
|
|
14
|
+
"pending",
|
|
15
|
+
"receipts"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"schemaVersion": {
|
|
19
|
+
"const": "1"
|
|
20
|
+
},
|
|
21
|
+
"profileId": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1
|
|
24
|
+
},
|
|
25
|
+
"ran": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"description": "False when nothing could start (busy, backoff, nothing pending, trigger disabled)."
|
|
28
|
+
},
|
|
29
|
+
"outcome": {
|
|
30
|
+
"enum": ["complete", "up_to_date", "partial", "failed", "not_started"]
|
|
31
|
+
},
|
|
32
|
+
"reason": {
|
|
33
|
+
"type": ["string", "null"]
|
|
34
|
+
},
|
|
35
|
+
"pending": {
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"description": "Admitted work is still waiting (deferred units, failure, busy)."
|
|
38
|
+
},
|
|
39
|
+
"receipts": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"$ref": "gno://schemas/sessions-import-receipt@1.0"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/sessions-discovery@1.0",
|
|
4
|
+
"title": "GNO Session Source Discovery",
|
|
5
|
+
"description": "Preview of supported local session sources (CLI `gno sessions discover --json`, REST GET /api/sessions/discover for same-host browsers only, SDK client.discoverSessions()). Discovery never imports. It carries host paths and is therefore never exposed over MCP or to non-local HTTP clients.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "candidates", "warnings"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": { "const": "1" },
|
|
11
|
+
"candidates": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"required": [
|
|
17
|
+
"harness",
|
|
18
|
+
"path",
|
|
19
|
+
"units",
|
|
20
|
+
"bytes",
|
|
21
|
+
"truncated",
|
|
22
|
+
"formatVersions",
|
|
23
|
+
"registeredAs"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"harness": { "enum": ["codex", "claude-code", "openclaw", "hermes"] },
|
|
27
|
+
"path": { "type": "string", "minLength": 1 },
|
|
28
|
+
"units": { "type": "integer", "minimum": 0 },
|
|
29
|
+
"bytes": { "type": "integer", "minimum": 0 },
|
|
30
|
+
"truncated": { "type": "boolean" },
|
|
31
|
+
"formatVersions": { "type": "array", "items": { "type": "string" } },
|
|
32
|
+
"registeredAs": { "type": ["string", "null"] }
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"warnings": { "type": "array", "items": { "type": "string" } }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/sessions-import-receipt@1.0",
|
|
4
|
+
"title": "GNO Session Import Receipt",
|
|
5
|
+
"description": "Shared receipt of a manual session import on every surface (CLI `gno sessions import --json`, MCP gno_sessions_import, REST POST /api/sessions/import, SDK client.importSessions()). Derived from SessionImportReceipt in src/sessions/types.ts. Receipts never contain host paths or session content.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schemaVersion",
|
|
10
|
+
"dryRun",
|
|
11
|
+
"index",
|
|
12
|
+
"sourceIds",
|
|
13
|
+
"status",
|
|
14
|
+
"counts",
|
|
15
|
+
"turns",
|
|
16
|
+
"units",
|
|
17
|
+
"unitsTruncated",
|
|
18
|
+
"deferredUnits",
|
|
19
|
+
"lexical",
|
|
20
|
+
"embedding",
|
|
21
|
+
"warnings"
|
|
22
|
+
],
|
|
23
|
+
"properties": {
|
|
24
|
+
"schemaVersion": { "const": "1" },
|
|
25
|
+
"dryRun": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"description": "True when nothing was written to the archive, checkpoint state or index."
|
|
28
|
+
},
|
|
29
|
+
"index": { "type": "string", "minLength": 1 },
|
|
30
|
+
"sourceIds": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": { "type": "string", "minLength": 1 }
|
|
33
|
+
},
|
|
34
|
+
"status": {
|
|
35
|
+
"enum": ["complete", "partial", "failed", "nothing_to_do"],
|
|
36
|
+
"description": "partial whenever any unit is incomplete, failed, unsupported or deferred, or lexical sync failed; failed when nothing was archived or unchanged and nothing is incomplete; a partial import is never reported complete."
|
|
37
|
+
},
|
|
38
|
+
"counts": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": [
|
|
42
|
+
"imported",
|
|
43
|
+
"updated",
|
|
44
|
+
"unchanged",
|
|
45
|
+
"skippedPolicy",
|
|
46
|
+
"unsupported",
|
|
47
|
+
"incomplete",
|
|
48
|
+
"failed"
|
|
49
|
+
],
|
|
50
|
+
"properties": {
|
|
51
|
+
"imported": { "type": "integer", "minimum": 0 },
|
|
52
|
+
"updated": { "type": "integer", "minimum": 0 },
|
|
53
|
+
"unchanged": { "type": "integer", "minimum": 0 },
|
|
54
|
+
"skippedPolicy": { "type": "integer", "minimum": 0 },
|
|
55
|
+
"unsupported": { "type": "integer", "minimum": 0 },
|
|
56
|
+
"incomplete": { "type": "integer", "minimum": 0 },
|
|
57
|
+
"failed": { "type": "integer", "minimum": 0 }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"turns": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": [
|
|
64
|
+
"human",
|
|
65
|
+
"assistant",
|
|
66
|
+
"redactions",
|
|
67
|
+
"injectedSkipped",
|
|
68
|
+
"copiedHistorySkipped",
|
|
69
|
+
"overLimit"
|
|
70
|
+
],
|
|
71
|
+
"properties": {
|
|
72
|
+
"human": { "type": "integer", "minimum": 0 },
|
|
73
|
+
"assistant": { "type": "integer", "minimum": 0 },
|
|
74
|
+
"redactions": { "type": "integer", "minimum": 0 },
|
|
75
|
+
"injectedSkipped": { "type": "integer", "minimum": 0 },
|
|
76
|
+
"copiedHistorySkipped": { "type": "integer", "minimum": 0 },
|
|
77
|
+
"overLimit": { "type": "integer", "minimum": 0 }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"units": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"maxItems": 200,
|
|
83
|
+
"items": { "$ref": "#/$defs/unit" }
|
|
84
|
+
},
|
|
85
|
+
"unitsTruncated": { "type": "boolean" },
|
|
86
|
+
"deferredUnits": { "type": "integer", "minimum": 0 },
|
|
87
|
+
"lexical": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"required": ["status", "collections"],
|
|
91
|
+
"properties": {
|
|
92
|
+
"status": { "enum": ["ready", "failed", "skipped"] },
|
|
93
|
+
"collections": { "type": "array", "items": { "type": "string" } },
|
|
94
|
+
"error": { "type": "string" }
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"embedding": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"required": ["backlog"],
|
|
101
|
+
"properties": {
|
|
102
|
+
"backlog": {
|
|
103
|
+
"type": ["integer", "null"],
|
|
104
|
+
"minimum": 0,
|
|
105
|
+
"description": "Chunks awaiting embeddings in the archive index; null on dry runs."
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"warnings": { "type": "array", "items": { "type": "string" } }
|
|
110
|
+
},
|
|
111
|
+
"$defs": {
|
|
112
|
+
"unit": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"additionalProperties": false,
|
|
115
|
+
"required": [
|
|
116
|
+
"sourceId",
|
|
117
|
+
"harness",
|
|
118
|
+
"locator",
|
|
119
|
+
"outcome",
|
|
120
|
+
"threads",
|
|
121
|
+
"turns",
|
|
122
|
+
"collections"
|
|
123
|
+
],
|
|
124
|
+
"properties": {
|
|
125
|
+
"sourceId": { "type": "string" },
|
|
126
|
+
"harness": {
|
|
127
|
+
"enum": ["codex", "claude-code", "openclaw", "hermes", null]
|
|
128
|
+
},
|
|
129
|
+
"locator": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"description": "Safe locator inside the source root (file name or database path), never a host path."
|
|
132
|
+
},
|
|
133
|
+
"outcome": {
|
|
134
|
+
"enum": [
|
|
135
|
+
"imported",
|
|
136
|
+
"updated",
|
|
137
|
+
"unchanged",
|
|
138
|
+
"skipped_policy",
|
|
139
|
+
"unsupported",
|
|
140
|
+
"incomplete",
|
|
141
|
+
"failed"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"reason": { "type": "string" },
|
|
145
|
+
"threads": { "type": "integer", "minimum": 0 },
|
|
146
|
+
"turns": { "type": "integer", "minimum": 0 },
|
|
147
|
+
"collections": { "type": "array", "items": { "type": "string" } },
|
|
148
|
+
"unknownKinds": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"additionalProperties": { "type": "integer", "minimum": 1 }
|
|
151
|
+
},
|
|
152
|
+
"warnings": { "type": "array", "items": { "type": "string" } }
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|