@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,142 @@
|
|
|
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
|
+
"rendererVersion": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "1"
|
|
12
|
+
},
|
|
13
|
+
"capsuleId": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
16
|
+
},
|
|
17
|
+
"markdown": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"digest": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
23
|
+
},
|
|
24
|
+
"verificationDigest": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
27
|
+
},
|
|
28
|
+
"lineageDigest": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
31
|
+
},
|
|
32
|
+
"budget": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"properties": {
|
|
35
|
+
"requestedTokens": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"exclusiveMinimum": 0,
|
|
38
|
+
"maximum": 1000000
|
|
39
|
+
},
|
|
40
|
+
"requestedBytes": {
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"exclusiveMinimum": 0,
|
|
43
|
+
"maximum": 4194304
|
|
44
|
+
},
|
|
45
|
+
"usedTokens": {
|
|
46
|
+
"type": "integer",
|
|
47
|
+
"minimum": 0,
|
|
48
|
+
"maximum": 9007199254740991
|
|
49
|
+
},
|
|
50
|
+
"usedBytes": {
|
|
51
|
+
"type": "integer",
|
|
52
|
+
"minimum": 0,
|
|
53
|
+
"maximum": 9007199254740991
|
|
54
|
+
},
|
|
55
|
+
"estimator": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"enum": ["unicode_conservative", "active_tokenizer"]
|
|
58
|
+
},
|
|
59
|
+
"tokenizerFingerprint": {
|
|
60
|
+
"anyOf": [
|
|
61
|
+
{
|
|
62
|
+
"type": "string",
|
|
63
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "null"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"required": [
|
|
72
|
+
"requestedTokens",
|
|
73
|
+
"requestedBytes",
|
|
74
|
+
"usedTokens",
|
|
75
|
+
"usedBytes",
|
|
76
|
+
"estimator",
|
|
77
|
+
"tokenizerFingerprint"
|
|
78
|
+
],
|
|
79
|
+
"additionalProperties": false
|
|
80
|
+
},
|
|
81
|
+
"coverage": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"properties": {
|
|
84
|
+
"complete": {
|
|
85
|
+
"type": "boolean"
|
|
86
|
+
},
|
|
87
|
+
"coveredFacets": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": {
|
|
90
|
+
"type": "string"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"unresolvedFacets": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": {
|
|
96
|
+
"type": "string"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"required": ["complete", "coveredFacets", "unresolvedFacets"],
|
|
101
|
+
"additionalProperties": false
|
|
102
|
+
},
|
|
103
|
+
"evidenceIds": {
|
|
104
|
+
"type": "array",
|
|
105
|
+
"items": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"omissions": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"properties": {
|
|
115
|
+
"evidenceId": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
118
|
+
},
|
|
119
|
+
"reason": {
|
|
120
|
+
"type": "string"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"required": ["evidenceId", "reason"],
|
|
124
|
+
"additionalProperties": false
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": [
|
|
129
|
+
"schemaVersion",
|
|
130
|
+
"rendererVersion",
|
|
131
|
+
"capsuleId",
|
|
132
|
+
"markdown",
|
|
133
|
+
"digest",
|
|
134
|
+
"verificationDigest",
|
|
135
|
+
"lineageDigest",
|
|
136
|
+
"budget",
|
|
137
|
+
"coverage",
|
|
138
|
+
"evidenceIds",
|
|
139
|
+
"omissions"
|
|
140
|
+
],
|
|
141
|
+
"additionalProperties": false
|
|
142
|
+
}
|
|
@@ -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
|
+
}
|