@sharedcontext/sdk 0.0.0-stage → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +21 -0
- package/NOTICE +8 -0
- package/README.md +94 -2
- package/dist/canonical.d.ts +47 -0
- package/dist/canonical.js +257 -0
- package/dist/client.d.ts +96 -0
- package/dist/client.js +205 -0
- package/dist/constants.d.ts +19 -0
- package/dist/constants.js +21 -0
- package/dist/event.d.ts +104 -0
- package/dist/event.js +173 -0
- package/dist/generated/content.d.ts +588 -0
- package/dist/generated/content.js +3 -0
- package/dist/generated/schemas.d.ts +10 -0
- package/dist/generated/schemas.js +22 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/reasons.d.ts +14 -0
- package/dist/reasons.js +142 -0
- package/dist/schema.d.ts +45 -0
- package/dist/schema.js +285 -0
- package/dist/types.d.ts +230 -0
- package/dist/types.js +3 -0
- package/package.json +46 -4
- package/schemas/sharedcontext-1/changes.schema.json +128 -0
- package/schemas/sharedcontext-1/content.schema.json +2076 -0
- package/schemas/sharedcontext-1/context.schema.json +218 -0
- package/schemas/sharedcontext-1/event.schema.json +55 -0
- package/schemas/sharedcontext-1/execution.schema.json +342 -0
- package/schemas/sharedcontext-1/history/content-1.0.schema.json +1915 -0
- package/schemas/sharedcontext-1/lineage.schema.json +753 -0
- package/schemas/sharedcontext-1/mcp-tools.schema.json +1357 -0
- package/schemas/sharedcontext-1/stored-event.schema.json +14 -0
- package/schemas/sharedcontext-directory-1/members.schema.json +52 -0
- package/schemas/sharedcontext-directory-1/memberships.schema.json +32 -0
|
@@ -0,0 +1,1357 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "sharedcontext/1 MCP tools",
|
|
4
|
+
"description": "The work items contract's MCP tools, with their argument and result shapes: \"#/$defs/tool.<name>\" names the tool's arguments and result; \"#/$defs/<Shape>\" are the shapes themselves. Write tools take a pre-signed event and return Appended; a refused call returns a structured error result shaped as Refusal (close: {unmet}). The tools are served by ticket-mcp over stdio and by the store-backed service at /mcp. changes (the change feed, changes@1) is served only where the deployment turns it on (feed.changes, off by default). emit and advance_time are test and demo tools, outside the contract.",
|
|
5
|
+
"$comment": "Source: crates/sharedcontext/src/mcp/mod.rs (#[tool] functions, the argument structs, fn shape, Service::describe and the result json! literals). Tools (25): next, ready, claim_next, draft, claim, release, renew, context, split, merge, note, pin, link, move, gate_clear, close, goal_create, goal_measures, goal_close, subscribe, submit, state, stats, emit, advance_time; and changes (26), the change feed (struct ChangesArgs, fn changes, fn changes_page), its page in changes.schema.json. Arguments are not strict: the structs do not deny unknown fields; the one exception is ChangesArgs, which the contract closes (changes@1; its own $comment). No recorded MCP transcript yet: contract-check.mjs runs cases/changes-args.cases.jsonl against this file and compares it with the tools and argument structs it reads statically from the source; the tools' results are not checked against a transcript (open point).",
|
|
6
|
+
"$defs": {
|
|
7
|
+
"WriteArgs": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"event": {
|
|
11
|
+
"$comment": "a complete, signed NIP-01 event (object or JSON string) of this tool's type, as drafted by draft: sharedcontext/1 event.schema.json",
|
|
12
|
+
"anyOf": [
|
|
13
|
+
{
|
|
14
|
+
"type": "object"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "string"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"actor": {
|
|
22
|
+
"type": [
|
|
23
|
+
"string",
|
|
24
|
+
"null"
|
|
25
|
+
],
|
|
26
|
+
"$comment": "INSECURE-SPIKE ONLY: the pubkey the server stamps as signer; never the contract"
|
|
27
|
+
},
|
|
28
|
+
"node": {
|
|
29
|
+
"type": [
|
|
30
|
+
"string",
|
|
31
|
+
"null"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"intent": {
|
|
35
|
+
"type": [
|
|
36
|
+
"string",
|
|
37
|
+
"null"
|
|
38
|
+
],
|
|
39
|
+
"$comment": "claim: fix · triage · review · verify (claim_next: default fix)"
|
|
40
|
+
},
|
|
41
|
+
"pubkey": {
|
|
42
|
+
"type": [
|
|
43
|
+
"string",
|
|
44
|
+
"null"
|
|
45
|
+
],
|
|
46
|
+
"$comment": "claim_next / claim without a node: the claimant's x-only pubkey"
|
|
47
|
+
},
|
|
48
|
+
"kinds": {
|
|
49
|
+
"type": [
|
|
50
|
+
"array",
|
|
51
|
+
"null"
|
|
52
|
+
],
|
|
53
|
+
"items": {
|
|
54
|
+
"type": "string"
|
|
55
|
+
},
|
|
56
|
+
"$comment": "claim_next filter: node kinds"
|
|
57
|
+
},
|
|
58
|
+
"labels": {
|
|
59
|
+
"type": [
|
|
60
|
+
"array",
|
|
61
|
+
"null"
|
|
62
|
+
],
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"$comment": "claim_next filter: labels the node must all carry"
|
|
67
|
+
},
|
|
68
|
+
"goal": {
|
|
69
|
+
"type": [
|
|
70
|
+
"string",
|
|
71
|
+
"null"
|
|
72
|
+
],
|
|
73
|
+
"$comment": "claim_next filter: a goal the node must serve"
|
|
74
|
+
},
|
|
75
|
+
"session": {
|
|
76
|
+
"$comment": "optional agent session reference {agent_cli?, session_id}"
|
|
77
|
+
},
|
|
78
|
+
"lease_s": {
|
|
79
|
+
"type": [
|
|
80
|
+
"integer",
|
|
81
|
+
"null"
|
|
82
|
+
],
|
|
83
|
+
"minimum": 0
|
|
84
|
+
},
|
|
85
|
+
"on_sha": {
|
|
86
|
+
"type": [
|
|
87
|
+
"string",
|
|
88
|
+
"null"
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"reason": {
|
|
92
|
+
"type": [
|
|
93
|
+
"string",
|
|
94
|
+
"null"
|
|
95
|
+
],
|
|
96
|
+
"$comment": "release: done · blocked · handoff · abandoned · needs_input; also move, gate_clear, goal_measures, goal_close"
|
|
97
|
+
},
|
|
98
|
+
"to": {
|
|
99
|
+
"type": [
|
|
100
|
+
"string",
|
|
101
|
+
"null"
|
|
102
|
+
],
|
|
103
|
+
"$comment": "release{handoff}: target pubkey; link: target node; gate_clear: the gate ref"
|
|
104
|
+
},
|
|
105
|
+
"progress": {
|
|
106
|
+
"type": [
|
|
107
|
+
"string",
|
|
108
|
+
"null"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"layer": {
|
|
112
|
+
"type": [
|
|
113
|
+
"string",
|
|
114
|
+
"null"
|
|
115
|
+
],
|
|
116
|
+
"$comment": "note: pinned · working · summary"
|
|
117
|
+
},
|
|
118
|
+
"text": {
|
|
119
|
+
"type": [
|
|
120
|
+
"string",
|
|
121
|
+
"null"
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
"supersedes": {
|
|
125
|
+
"type": [
|
|
126
|
+
"string",
|
|
127
|
+
"null"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"edge": {
|
|
131
|
+
"type": [
|
|
132
|
+
"string",
|
|
133
|
+
"null"
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
"from": {
|
|
137
|
+
"type": [
|
|
138
|
+
"string",
|
|
139
|
+
"null"
|
|
140
|
+
],
|
|
141
|
+
"$comment": "move: the current state"
|
|
142
|
+
},
|
|
143
|
+
"to_state": {
|
|
144
|
+
"type": [
|
|
145
|
+
"string",
|
|
146
|
+
"null"
|
|
147
|
+
],
|
|
148
|
+
"$comment": "move: the target state"
|
|
149
|
+
},
|
|
150
|
+
"gate": {
|
|
151
|
+
"$comment": "move{to_state: blocked}: {kind, ref}"
|
|
152
|
+
},
|
|
153
|
+
"parts": {
|
|
154
|
+
"type": [
|
|
155
|
+
"array",
|
|
156
|
+
"null"
|
|
157
|
+
],
|
|
158
|
+
"$comment": "split: [{title, covers[], severity?}]"
|
|
159
|
+
},
|
|
160
|
+
"into": {
|
|
161
|
+
"type": [
|
|
162
|
+
"string",
|
|
163
|
+
"null"
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
"title": {
|
|
167
|
+
"type": [
|
|
168
|
+
"string",
|
|
169
|
+
"null"
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"body": {
|
|
173
|
+
"type": [
|
|
174
|
+
"string",
|
|
175
|
+
"null"
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"owner": {
|
|
179
|
+
"type": [
|
|
180
|
+
"string",
|
|
181
|
+
"null"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"horizon": {
|
|
185
|
+
"$comment": "goal_create: {from, to} unix seconds"
|
|
186
|
+
},
|
|
187
|
+
"weight": {
|
|
188
|
+
"type": [
|
|
189
|
+
"integer",
|
|
190
|
+
"null"
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"measures": {
|
|
194
|
+
"type": [
|
|
195
|
+
"array",
|
|
196
|
+
"null"
|
|
197
|
+
],
|
|
198
|
+
"$comment": "[{name, target, unit, source, direction?}]"
|
|
199
|
+
},
|
|
200
|
+
"outcome": {
|
|
201
|
+
"type": [
|
|
202
|
+
"string",
|
|
203
|
+
"null"
|
|
204
|
+
],
|
|
205
|
+
"$comment": "goal_close: done · cancelled"
|
|
206
|
+
},
|
|
207
|
+
"client_id": {
|
|
208
|
+
"type": [
|
|
209
|
+
"string",
|
|
210
|
+
"null"
|
|
211
|
+
],
|
|
212
|
+
"$comment": "idempotency id (c tag); generated when absent"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs struct WriteArgs: every write tool takes a pre-signed event (the contract); the other fields are the insecure-spike form and draft's args"
|
|
216
|
+
},
|
|
217
|
+
"NextArgs": {
|
|
218
|
+
"type": "object",
|
|
219
|
+
"properties": {
|
|
220
|
+
"kind": {
|
|
221
|
+
"type": [
|
|
222
|
+
"string",
|
|
223
|
+
"null"
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
"limit": {
|
|
227
|
+
"type": [
|
|
228
|
+
"integer",
|
|
229
|
+
"null"
|
|
230
|
+
],
|
|
231
|
+
"minimum": 0,
|
|
232
|
+
"$comment": "default 10"
|
|
233
|
+
},
|
|
234
|
+
"viewer": {
|
|
235
|
+
"type": [
|
|
236
|
+
"string",
|
|
237
|
+
"null"
|
|
238
|
+
],
|
|
239
|
+
"$comment": "the caller's pubkey"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs struct NextArgs"
|
|
243
|
+
},
|
|
244
|
+
"DraftArgs": {
|
|
245
|
+
"type": "object",
|
|
246
|
+
"properties": {
|
|
247
|
+
"tool": {
|
|
248
|
+
"type": "string",
|
|
249
|
+
"$comment": "claim · release · renew · split · merge · note · pin · link · move · gate_clear · goal_create · goal_measures · goal_close"
|
|
250
|
+
},
|
|
251
|
+
"pubkey": {
|
|
252
|
+
"type": "string"
|
|
253
|
+
},
|
|
254
|
+
"args": {
|
|
255
|
+
"type": "object",
|
|
256
|
+
"$comment": "the write tool's arguments (WriteArgs names)"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"required": [
|
|
260
|
+
"tool",
|
|
261
|
+
"pubkey",
|
|
262
|
+
"args"
|
|
263
|
+
],
|
|
264
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs struct DraftArgs"
|
|
265
|
+
},
|
|
266
|
+
"NodeArg": {
|
|
267
|
+
"type": "object",
|
|
268
|
+
"properties": {
|
|
269
|
+
"node": {
|
|
270
|
+
"type": "string"
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"required": [
|
|
274
|
+
"node"
|
|
275
|
+
],
|
|
276
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs struct NodeArg"
|
|
277
|
+
},
|
|
278
|
+
"CloseArgs": {
|
|
279
|
+
"type": "object",
|
|
280
|
+
"properties": {
|
|
281
|
+
"node": {
|
|
282
|
+
"type": "string"
|
|
283
|
+
},
|
|
284
|
+
"run_id": {
|
|
285
|
+
"type": [
|
|
286
|
+
"string",
|
|
287
|
+
"null"
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"required": [
|
|
292
|
+
"node"
|
|
293
|
+
],
|
|
294
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs struct CloseArgs"
|
|
295
|
+
},
|
|
296
|
+
"SubscribeArgs": {
|
|
297
|
+
"type": "object",
|
|
298
|
+
"properties": {
|
|
299
|
+
"after_seq": {
|
|
300
|
+
"type": "integer",
|
|
301
|
+
"minimum": 0
|
|
302
|
+
},
|
|
303
|
+
"node": {
|
|
304
|
+
"type": [
|
|
305
|
+
"string",
|
|
306
|
+
"null"
|
|
307
|
+
]
|
|
308
|
+
},
|
|
309
|
+
"limit": {
|
|
310
|
+
"type": [
|
|
311
|
+
"integer",
|
|
312
|
+
"null"
|
|
313
|
+
],
|
|
314
|
+
"minimum": 0,
|
|
315
|
+
"$comment": "default 100"
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"required": [
|
|
319
|
+
"after_seq"
|
|
320
|
+
],
|
|
321
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs struct SubscribeArgs"
|
|
322
|
+
},
|
|
323
|
+
"ChangesArgs": {
|
|
324
|
+
"type": "object",
|
|
325
|
+
"additionalProperties": false,
|
|
326
|
+
"properties": {
|
|
327
|
+
"after": {
|
|
328
|
+
"anyOf": [
|
|
329
|
+
{
|
|
330
|
+
"$ref": "changes.schema.json#/$defs/Cursor"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"type": "null"
|
|
334
|
+
}
|
|
335
|
+
],
|
|
336
|
+
"$comment": "absent or null: from the start of the store's retained history"
|
|
337
|
+
},
|
|
338
|
+
"limit": {
|
|
339
|
+
"type": [
|
|
340
|
+
"integer",
|
|
341
|
+
"null"
|
|
342
|
+
],
|
|
343
|
+
"minimum": 1,
|
|
344
|
+
"maximum": 1000,
|
|
345
|
+
"$comment": "Default 100, at most 1000 (as subscribe)"
|
|
346
|
+
},
|
|
347
|
+
"kinds": {
|
|
348
|
+
"type": [
|
|
349
|
+
"array",
|
|
350
|
+
"null"
|
|
351
|
+
],
|
|
352
|
+
"items": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"minLength": 1,
|
|
355
|
+
"maxLength": 64
|
|
356
|
+
},
|
|
357
|
+
"maxItems": 32,
|
|
358
|
+
"$comment": "only these kinds; the cursor still moves past the others, so a filtered follower never re-reads them"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs struct ChangesArgs. Closed by the contract (changes@1): a caller sends only these. As built the struct, like the others here, does not deny unknown fields, and limit outside 1–1000 is clamped rather than refused"
|
|
362
|
+
},
|
|
363
|
+
"SubmitArgs": {
|
|
364
|
+
"type": "object",
|
|
365
|
+
"properties": {
|
|
366
|
+
"event": {
|
|
367
|
+
"anyOf": [
|
|
368
|
+
{
|
|
369
|
+
"type": "object"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"type": "string"
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
"$comment": "a complete, signed NIP-01 event"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
"required": [
|
|
379
|
+
"event"
|
|
380
|
+
],
|
|
381
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs struct SubmitArgs"
|
|
382
|
+
},
|
|
383
|
+
"EmitArgs": {
|
|
384
|
+
"type": "object",
|
|
385
|
+
"properties": {
|
|
386
|
+
"actor": {
|
|
387
|
+
"type": "string"
|
|
388
|
+
},
|
|
389
|
+
"type": {
|
|
390
|
+
"type": "string"
|
|
391
|
+
},
|
|
392
|
+
"node": {
|
|
393
|
+
"type": [
|
|
394
|
+
"string",
|
|
395
|
+
"null"
|
|
396
|
+
]
|
|
397
|
+
},
|
|
398
|
+
"content": {
|
|
399
|
+
"$comment": "any JSON value"
|
|
400
|
+
},
|
|
401
|
+
"tags": {
|
|
402
|
+
"type": [
|
|
403
|
+
"array",
|
|
404
|
+
"null"
|
|
405
|
+
],
|
|
406
|
+
"items": {
|
|
407
|
+
"type": "array",
|
|
408
|
+
"items": {
|
|
409
|
+
"type": "string"
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"client_id": {
|
|
414
|
+
"type": [
|
|
415
|
+
"string",
|
|
416
|
+
"null"
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"required": [
|
|
421
|
+
"actor",
|
|
422
|
+
"type",
|
|
423
|
+
"content"
|
|
424
|
+
],
|
|
425
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs struct EmitArgs (INSECURE-SPIKE ONLY)"
|
|
426
|
+
},
|
|
427
|
+
"AdvanceArgs": {
|
|
428
|
+
"type": "object",
|
|
429
|
+
"properties": {
|
|
430
|
+
"seconds": {
|
|
431
|
+
"type": "integer",
|
|
432
|
+
"minimum": 0
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
"required": [
|
|
436
|
+
"seconds"
|
|
437
|
+
],
|
|
438
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs struct AdvanceArgs"
|
|
439
|
+
},
|
|
440
|
+
"NoArgs": {
|
|
441
|
+
"type": "object",
|
|
442
|
+
"properties": {},
|
|
443
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs stats takes no arguments"
|
|
444
|
+
},
|
|
445
|
+
"Appended": {
|
|
446
|
+
"type": "object",
|
|
447
|
+
"properties": {
|
|
448
|
+
"seq": {
|
|
449
|
+
"type": "integer",
|
|
450
|
+
"minimum": 0
|
|
451
|
+
},
|
|
452
|
+
"id": {
|
|
453
|
+
"type": "string"
|
|
454
|
+
},
|
|
455
|
+
"duplicate": {
|
|
456
|
+
"type": "boolean"
|
|
457
|
+
},
|
|
458
|
+
"reactions": {
|
|
459
|
+
"type": "array",
|
|
460
|
+
"items": {
|
|
461
|
+
"type": "object",
|
|
462
|
+
"properties": {
|
|
463
|
+
"seq": {
|
|
464
|
+
"type": "integer",
|
|
465
|
+
"minimum": 0
|
|
466
|
+
},
|
|
467
|
+
"w": {
|
|
468
|
+
"type": [
|
|
469
|
+
"string",
|
|
470
|
+
"null"
|
|
471
|
+
]
|
|
472
|
+
},
|
|
473
|
+
"node": {
|
|
474
|
+
"type": [
|
|
475
|
+
"string",
|
|
476
|
+
"null"
|
|
477
|
+
]
|
|
478
|
+
},
|
|
479
|
+
"id": {
|
|
480
|
+
"type": "string"
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
"$comment": "service reactions appended with it (new events only)"
|
|
485
|
+
},
|
|
486
|
+
"node": {
|
|
487
|
+
"type": "object",
|
|
488
|
+
"properties": {
|
|
489
|
+
"id": {
|
|
490
|
+
"type": "string"
|
|
491
|
+
},
|
|
492
|
+
"state": {
|
|
493
|
+
"type": "string"
|
|
494
|
+
},
|
|
495
|
+
"claim": {
|
|
496
|
+
"$comment": "the live claim or null"
|
|
497
|
+
},
|
|
498
|
+
"closed": {
|
|
499
|
+
"$comment": "the close record or null"
|
|
500
|
+
},
|
|
501
|
+
"covers": {
|
|
502
|
+
"type": "array"
|
|
503
|
+
},
|
|
504
|
+
"gate": {
|
|
505
|
+
"$comment": "{kind, ref} or null"
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
"required": [
|
|
511
|
+
"seq",
|
|
512
|
+
"id",
|
|
513
|
+
"duplicate"
|
|
514
|
+
],
|
|
515
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs Service::describe"
|
|
516
|
+
},
|
|
517
|
+
"Refusal": {
|
|
518
|
+
"type": "object",
|
|
519
|
+
"properties": {
|
|
520
|
+
"reason": {
|
|
521
|
+
"type": "string",
|
|
522
|
+
"$comment": "snake_case RejectReason of the log, or a tool-level reason: wrong_tool_for_type, unsigned_write, missing_argument, unknown_tool, bad_arguments, project_not_created, node_not_found"
|
|
523
|
+
},
|
|
524
|
+
"detail": {
|
|
525
|
+
"$comment": "any JSON value"
|
|
526
|
+
},
|
|
527
|
+
"hint": {
|
|
528
|
+
"type": "string"
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
"required": [
|
|
532
|
+
"reason"
|
|
533
|
+
],
|
|
534
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs Service::append (log refusals {reason, detail}) and the tool-level errors; sent as a structured error result"
|
|
535
|
+
},
|
|
536
|
+
"Unsigned": {
|
|
537
|
+
"type": "object",
|
|
538
|
+
"properties": {
|
|
539
|
+
"pubkey": {
|
|
540
|
+
"type": "string"
|
|
541
|
+
},
|
|
542
|
+
"created_at": {
|
|
543
|
+
"type": "integer",
|
|
544
|
+
"minimum": 0
|
|
545
|
+
},
|
|
546
|
+
"kind": {
|
|
547
|
+
"const": 7411
|
|
548
|
+
},
|
|
549
|
+
"tags": {
|
|
550
|
+
"type": "array",
|
|
551
|
+
"items": {
|
|
552
|
+
"type": "array",
|
|
553
|
+
"items": {
|
|
554
|
+
"type": "string"
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
"content": {
|
|
559
|
+
"type": "string"
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
"required": [
|
|
563
|
+
"pubkey",
|
|
564
|
+
"created_at",
|
|
565
|
+
"kind",
|
|
566
|
+
"tags",
|
|
567
|
+
"content"
|
|
568
|
+
],
|
|
569
|
+
"$comment": "crates/sharedcontext/src/signed/event.rs UnsignedEvent, as Service::draft returns it"
|
|
570
|
+
},
|
|
571
|
+
"Reservation": {
|
|
572
|
+
"type": "object",
|
|
573
|
+
"properties": {
|
|
574
|
+
"node": {
|
|
575
|
+
"type": "string"
|
|
576
|
+
},
|
|
577
|
+
"pubkey": {
|
|
578
|
+
"type": "string"
|
|
579
|
+
},
|
|
580
|
+
"until_ms": {
|
|
581
|
+
"type": "integer",
|
|
582
|
+
"minimum": 0
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
"required": [
|
|
586
|
+
"node",
|
|
587
|
+
"pubkey",
|
|
588
|
+
"until_ms"
|
|
589
|
+
],
|
|
590
|
+
"$comment": "crates/sharedcontext/src/work/claim_next.rs Reservation"
|
|
591
|
+
},
|
|
592
|
+
"NextResult": {
|
|
593
|
+
"type": "object",
|
|
594
|
+
"properties": {
|
|
595
|
+
"now": {
|
|
596
|
+
"type": "integer",
|
|
597
|
+
"minimum": 0
|
|
598
|
+
},
|
|
599
|
+
"swept": {
|
|
600
|
+
"type": "array",
|
|
601
|
+
"items": {
|
|
602
|
+
"type": "object",
|
|
603
|
+
"properties": {
|
|
604
|
+
"seq": {
|
|
605
|
+
"type": "integer",
|
|
606
|
+
"minimum": 0
|
|
607
|
+
},
|
|
608
|
+
"w": {
|
|
609
|
+
"type": [
|
|
610
|
+
"string",
|
|
611
|
+
"null"
|
|
612
|
+
]
|
|
613
|
+
},
|
|
614
|
+
"node": {
|
|
615
|
+
"type": [
|
|
616
|
+
"string",
|
|
617
|
+
"null"
|
|
618
|
+
]
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
"next": {
|
|
624
|
+
"type": "array",
|
|
625
|
+
"items": {
|
|
626
|
+
"type": "object",
|
|
627
|
+
"properties": {
|
|
628
|
+
"node": {
|
|
629
|
+
"type": "string"
|
|
630
|
+
},
|
|
631
|
+
"kind": {
|
|
632
|
+
"type": "string"
|
|
633
|
+
},
|
|
634
|
+
"title": {
|
|
635
|
+
"type": [
|
|
636
|
+
"string",
|
|
637
|
+
"null"
|
|
638
|
+
]
|
|
639
|
+
},
|
|
640
|
+
"severity": {
|
|
641
|
+
"type": [
|
|
642
|
+
"string",
|
|
643
|
+
"null"
|
|
644
|
+
]
|
|
645
|
+
},
|
|
646
|
+
"state": {
|
|
647
|
+
"type": "string"
|
|
648
|
+
},
|
|
649
|
+
"covers": {
|
|
650
|
+
"type": "integer",
|
|
651
|
+
"minimum": 0
|
|
652
|
+
},
|
|
653
|
+
"handoff": {},
|
|
654
|
+
"blocks": {
|
|
655
|
+
"type": "array",
|
|
656
|
+
"items": {
|
|
657
|
+
"type": "string"
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
"goal_weight": {},
|
|
661
|
+
"unblock_count": {},
|
|
662
|
+
"goals": {
|
|
663
|
+
"type": "array"
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
"$comment": "crates/sharedcontext/src/work/log.rs Log::next entries"
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
"alias_of": {
|
|
670
|
+
"const": "next"
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"required": [
|
|
674
|
+
"now",
|
|
675
|
+
"swept",
|
|
676
|
+
"next"
|
|
677
|
+
],
|
|
678
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs next_view"
|
|
679
|
+
},
|
|
680
|
+
"ClaimNextResult": {
|
|
681
|
+
"anyOf": [
|
|
682
|
+
{
|
|
683
|
+
"allOf": [
|
|
684
|
+
{
|
|
685
|
+
"$ref": "#/$defs/Appended"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"type": "object",
|
|
689
|
+
"properties": {
|
|
690
|
+
"claimed": {
|
|
691
|
+
"type": "string"
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
"required": [
|
|
695
|
+
"claimed"
|
|
696
|
+
]
|
|
697
|
+
}
|
|
698
|
+
],
|
|
699
|
+
"$comment": "one call: this server holds the caller's key"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"type": "object",
|
|
703
|
+
"properties": {
|
|
704
|
+
"claimed": {
|
|
705
|
+
"type": "null"
|
|
706
|
+
},
|
|
707
|
+
"hint": {
|
|
708
|
+
"type": "string"
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
"required": [
|
|
712
|
+
"claimed"
|
|
713
|
+
],
|
|
714
|
+
"$comment": "nothing claimable"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"type": "object",
|
|
718
|
+
"properties": {
|
|
719
|
+
"reserved": {
|
|
720
|
+
"$ref": "#/$defs/Reservation"
|
|
721
|
+
},
|
|
722
|
+
"unsigned": {
|
|
723
|
+
"$ref": "#/$defs/Unsigned"
|
|
724
|
+
},
|
|
725
|
+
"hint": {
|
|
726
|
+
"type": "string"
|
|
727
|
+
}
|
|
728
|
+
},
|
|
729
|
+
"required": [
|
|
730
|
+
"reserved",
|
|
731
|
+
"unsigned"
|
|
732
|
+
],
|
|
733
|
+
"$comment": "two-phase: sign unsigned and send it to claim before until_ms"
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"type": "object",
|
|
737
|
+
"properties": {
|
|
738
|
+
"reserved": {
|
|
739
|
+
"type": "null"
|
|
740
|
+
},
|
|
741
|
+
"hint": {
|
|
742
|
+
"type": "string"
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
"required": [
|
|
746
|
+
"reserved"
|
|
747
|
+
],
|
|
748
|
+
"$comment": "nothing claimable"
|
|
749
|
+
}
|
|
750
|
+
],
|
|
751
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs fn claim_next; claim without event and node adds alias_of: claim_next"
|
|
752
|
+
},
|
|
753
|
+
"DraftResult": {
|
|
754
|
+
"type": "object",
|
|
755
|
+
"properties": {
|
|
756
|
+
"tool": {
|
|
757
|
+
"type": "string"
|
|
758
|
+
},
|
|
759
|
+
"unsigned": {
|
|
760
|
+
"$ref": "#/$defs/Unsigned"
|
|
761
|
+
},
|
|
762
|
+
"hint": {
|
|
763
|
+
"type": "string"
|
|
764
|
+
}
|
|
765
|
+
},
|
|
766
|
+
"required": [
|
|
767
|
+
"tool",
|
|
768
|
+
"unsigned"
|
|
769
|
+
],
|
|
770
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs tool draft"
|
|
771
|
+
},
|
|
772
|
+
"CloseResult": {
|
|
773
|
+
"type": "object",
|
|
774
|
+
"properties": {
|
|
775
|
+
"evidence": {
|
|
776
|
+
"$comment": "any JSON value"
|
|
777
|
+
},
|
|
778
|
+
"appended": {
|
|
779
|
+
"$ref": "#/$defs/Appended"
|
|
780
|
+
}
|
|
781
|
+
},
|
|
782
|
+
"required": [
|
|
783
|
+
"evidence",
|
|
784
|
+
"appended"
|
|
785
|
+
],
|
|
786
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs tool close: when the rule does not hold the result is a structured error {unmet}"
|
|
787
|
+
},
|
|
788
|
+
"SubscribeResult": {
|
|
789
|
+
"type": "object",
|
|
790
|
+
"properties": {
|
|
791
|
+
"after_seq": {
|
|
792
|
+
"type": "integer",
|
|
793
|
+
"minimum": 0
|
|
794
|
+
},
|
|
795
|
+
"head_seq": {
|
|
796
|
+
"type": "integer",
|
|
797
|
+
"minimum": 0
|
|
798
|
+
},
|
|
799
|
+
"events": {
|
|
800
|
+
"type": "array",
|
|
801
|
+
"items": {
|
|
802
|
+
"type": "object",
|
|
803
|
+
"properties": {
|
|
804
|
+
"seq": {
|
|
805
|
+
"type": "integer",
|
|
806
|
+
"minimum": 0
|
|
807
|
+
},
|
|
808
|
+
"received_at": {
|
|
809
|
+
"type": "integer",
|
|
810
|
+
"minimum": 0
|
|
811
|
+
},
|
|
812
|
+
"w": {
|
|
813
|
+
"type": [
|
|
814
|
+
"string",
|
|
815
|
+
"null"
|
|
816
|
+
]
|
|
817
|
+
},
|
|
818
|
+
"node": {
|
|
819
|
+
"type": [
|
|
820
|
+
"string",
|
|
821
|
+
"null"
|
|
822
|
+
]
|
|
823
|
+
},
|
|
824
|
+
"id": {
|
|
825
|
+
"type": "string"
|
|
826
|
+
},
|
|
827
|
+
"pubkey": {
|
|
828
|
+
"type": "string"
|
|
829
|
+
},
|
|
830
|
+
"content": {
|
|
831
|
+
"$comment": "the content parsed as JSON (sharedcontext/1 content.schema.json by w), or null"
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
"required": [
|
|
835
|
+
"seq",
|
|
836
|
+
"received_at",
|
|
837
|
+
"w",
|
|
838
|
+
"node",
|
|
839
|
+
"id",
|
|
840
|
+
"pubkey",
|
|
841
|
+
"content"
|
|
842
|
+
]
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
"required": [
|
|
847
|
+
"after_seq",
|
|
848
|
+
"head_seq",
|
|
849
|
+
"events"
|
|
850
|
+
],
|
|
851
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs tool subscribe"
|
|
852
|
+
},
|
|
853
|
+
"FoldedView": {
|
|
854
|
+
"type": "object",
|
|
855
|
+
"$comment": "the folded node view with derived fields, or the context bundle (crates/sharedcontext/src/work/log.rs context_at, node_view_at); its node fields follow the canonical snapshot form in crates/sharedcontext/fixtures/README.md. Not pinned field by field in sharedcontext/1 (open point)"
|
|
856
|
+
},
|
|
857
|
+
"StatsResult": {
|
|
858
|
+
"type": "object",
|
|
859
|
+
"properties": {
|
|
860
|
+
"events": {
|
|
861
|
+
"type": "integer",
|
|
862
|
+
"minimum": 0
|
|
863
|
+
},
|
|
864
|
+
"nodes": {
|
|
865
|
+
"type": "integer",
|
|
866
|
+
"minimum": 0
|
|
867
|
+
},
|
|
868
|
+
"rejects": {
|
|
869
|
+
"type": "integer",
|
|
870
|
+
"minimum": 0
|
|
871
|
+
},
|
|
872
|
+
"skipped": {
|
|
873
|
+
"type": "integer",
|
|
874
|
+
"minimum": 0
|
|
875
|
+
},
|
|
876
|
+
"registry_versions": {
|
|
877
|
+
"type": "integer",
|
|
878
|
+
"minimum": 0
|
|
879
|
+
},
|
|
880
|
+
"now": {
|
|
881
|
+
"type": "integer",
|
|
882
|
+
"minimum": 0
|
|
883
|
+
},
|
|
884
|
+
"project": {
|
|
885
|
+
"type": [
|
|
886
|
+
"string",
|
|
887
|
+
"null"
|
|
888
|
+
]
|
|
889
|
+
},
|
|
890
|
+
"insecure_spike": {
|
|
891
|
+
"type": "boolean"
|
|
892
|
+
},
|
|
893
|
+
"reject_tail": {
|
|
894
|
+
"type": "array",
|
|
895
|
+
"items": {
|
|
896
|
+
"type": "object",
|
|
897
|
+
"properties": {
|
|
898
|
+
"reason": {
|
|
899
|
+
"type": "string"
|
|
900
|
+
},
|
|
901
|
+
"detail": {
|
|
902
|
+
"$comment": "any JSON value"
|
|
903
|
+
},
|
|
904
|
+
"w": {
|
|
905
|
+
"$comment": "any JSON value"
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
},
|
|
911
|
+
"required": [
|
|
912
|
+
"events",
|
|
913
|
+
"nodes",
|
|
914
|
+
"rejects",
|
|
915
|
+
"skipped",
|
|
916
|
+
"registry_versions",
|
|
917
|
+
"now",
|
|
918
|
+
"project",
|
|
919
|
+
"insecure_spike",
|
|
920
|
+
"reject_tail"
|
|
921
|
+
],
|
|
922
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs tool stats"
|
|
923
|
+
},
|
|
924
|
+
"AdvanceResult": {
|
|
925
|
+
"type": "object",
|
|
926
|
+
"properties": {
|
|
927
|
+
"now": {
|
|
928
|
+
"type": "integer",
|
|
929
|
+
"minimum": 0
|
|
930
|
+
},
|
|
931
|
+
"virtual": {
|
|
932
|
+
"type": "boolean"
|
|
933
|
+
},
|
|
934
|
+
"swept": {
|
|
935
|
+
"type": "array",
|
|
936
|
+
"items": {
|
|
937
|
+
"type": "object",
|
|
938
|
+
"properties": {
|
|
939
|
+
"seq": {
|
|
940
|
+
"type": "integer",
|
|
941
|
+
"minimum": 0
|
|
942
|
+
},
|
|
943
|
+
"w": {
|
|
944
|
+
"type": [
|
|
945
|
+
"string",
|
|
946
|
+
"null"
|
|
947
|
+
]
|
|
948
|
+
},
|
|
949
|
+
"node": {
|
|
950
|
+
"type": [
|
|
951
|
+
"string",
|
|
952
|
+
"null"
|
|
953
|
+
]
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
"required": [
|
|
960
|
+
"now",
|
|
961
|
+
"virtual",
|
|
962
|
+
"swept"
|
|
963
|
+
],
|
|
964
|
+
"$comment": "crates/sharedcontext/src/mcp/mod.rs tool advance_time"
|
|
965
|
+
},
|
|
966
|
+
"tool.next": {
|
|
967
|
+
"type": "object",
|
|
968
|
+
"$comment": "claimable nodes for viewer in next() order; read only",
|
|
969
|
+
"properties": {
|
|
970
|
+
"name": {
|
|
971
|
+
"const": "next"
|
|
972
|
+
},
|
|
973
|
+
"arguments": {
|
|
974
|
+
"$ref": "#/$defs/NextArgs"
|
|
975
|
+
},
|
|
976
|
+
"result": {
|
|
977
|
+
"$ref": "#/$defs/NextResult"
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
},
|
|
981
|
+
"tool.ready": {
|
|
982
|
+
"type": "object",
|
|
983
|
+
"$comment": "alias of next",
|
|
984
|
+
"properties": {
|
|
985
|
+
"name": {
|
|
986
|
+
"const": "ready"
|
|
987
|
+
},
|
|
988
|
+
"arguments": {
|
|
989
|
+
"$ref": "#/$defs/NextArgs"
|
|
990
|
+
},
|
|
991
|
+
"result": {
|
|
992
|
+
"$ref": "#/$defs/NextResult"
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
},
|
|
996
|
+
"tool.claim_next": {
|
|
997
|
+
"type": "object",
|
|
998
|
+
"$comment": "atomic best ready node: one call with the caller's key, else a 5 s reservation and the draft",
|
|
999
|
+
"properties": {
|
|
1000
|
+
"name": {
|
|
1001
|
+
"const": "claim_next"
|
|
1002
|
+
},
|
|
1003
|
+
"arguments": {
|
|
1004
|
+
"$ref": "#/$defs/WriteArgs"
|
|
1005
|
+
},
|
|
1006
|
+
"result": {
|
|
1007
|
+
"$ref": "#/$defs/ClaimNextResult"
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
},
|
|
1011
|
+
"tool.draft": {
|
|
1012
|
+
"type": "object",
|
|
1013
|
+
"$comment": "the unsigned body for a write tool; read only",
|
|
1014
|
+
"properties": {
|
|
1015
|
+
"name": {
|
|
1016
|
+
"const": "draft"
|
|
1017
|
+
},
|
|
1018
|
+
"arguments": {
|
|
1019
|
+
"$ref": "#/$defs/DraftArgs"
|
|
1020
|
+
},
|
|
1021
|
+
"result": {
|
|
1022
|
+
"$ref": "#/$defs/DraftResult"
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
"tool.claim": {
|
|
1027
|
+
"type": "object",
|
|
1028
|
+
"$comment": "claim.taken; without event and node it is claim_next",
|
|
1029
|
+
"properties": {
|
|
1030
|
+
"name": {
|
|
1031
|
+
"const": "claim"
|
|
1032
|
+
},
|
|
1033
|
+
"arguments": {
|
|
1034
|
+
"$ref": "#/$defs/WriteArgs"
|
|
1035
|
+
},
|
|
1036
|
+
"result": {
|
|
1037
|
+
"$ref": "#/$defs/Appended"
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
},
|
|
1041
|
+
"tool.release": {
|
|
1042
|
+
"type": "object",
|
|
1043
|
+
"$comment": "claim.released",
|
|
1044
|
+
"properties": {
|
|
1045
|
+
"name": {
|
|
1046
|
+
"const": "release"
|
|
1047
|
+
},
|
|
1048
|
+
"arguments": {
|
|
1049
|
+
"$ref": "#/$defs/WriteArgs"
|
|
1050
|
+
},
|
|
1051
|
+
"result": {
|
|
1052
|
+
"$ref": "#/$defs/Appended"
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
"tool.renew": {
|
|
1057
|
+
"type": "object",
|
|
1058
|
+
"$comment": "claim.renewed (e tag → the claim)",
|
|
1059
|
+
"properties": {
|
|
1060
|
+
"name": {
|
|
1061
|
+
"const": "renew"
|
|
1062
|
+
},
|
|
1063
|
+
"arguments": {
|
|
1064
|
+
"$ref": "#/$defs/WriteArgs"
|
|
1065
|
+
},
|
|
1066
|
+
"result": {
|
|
1067
|
+
"$ref": "#/$defs/Appended"
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
},
|
|
1071
|
+
"tool.context": {
|
|
1072
|
+
"type": "object",
|
|
1073
|
+
"$comment": "the context bundle; read only",
|
|
1074
|
+
"properties": {
|
|
1075
|
+
"name": {
|
|
1076
|
+
"const": "context"
|
|
1077
|
+
},
|
|
1078
|
+
"arguments": {
|
|
1079
|
+
"$ref": "#/$defs/NodeArg"
|
|
1080
|
+
},
|
|
1081
|
+
"result": {
|
|
1082
|
+
"$ref": "#/$defs/FoldedView"
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
"tool.split": {
|
|
1087
|
+
"type": "object",
|
|
1088
|
+
"$comment": "node.split",
|
|
1089
|
+
"properties": {
|
|
1090
|
+
"name": {
|
|
1091
|
+
"const": "split"
|
|
1092
|
+
},
|
|
1093
|
+
"arguments": {
|
|
1094
|
+
"$ref": "#/$defs/WriteArgs"
|
|
1095
|
+
},
|
|
1096
|
+
"result": {
|
|
1097
|
+
"$ref": "#/$defs/Appended"
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
},
|
|
1101
|
+
"tool.merge": {
|
|
1102
|
+
"type": "object",
|
|
1103
|
+
"$comment": "node.merged",
|
|
1104
|
+
"properties": {
|
|
1105
|
+
"name": {
|
|
1106
|
+
"const": "merge"
|
|
1107
|
+
},
|
|
1108
|
+
"arguments": {
|
|
1109
|
+
"$ref": "#/$defs/WriteArgs"
|
|
1110
|
+
},
|
|
1111
|
+
"result": {
|
|
1112
|
+
"$ref": "#/$defs/Appended"
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
},
|
|
1116
|
+
"tool.note": {
|
|
1117
|
+
"type": "object",
|
|
1118
|
+
"$comment": "note.added",
|
|
1119
|
+
"properties": {
|
|
1120
|
+
"name": {
|
|
1121
|
+
"const": "note"
|
|
1122
|
+
},
|
|
1123
|
+
"arguments": {
|
|
1124
|
+
"$ref": "#/$defs/WriteArgs"
|
|
1125
|
+
},
|
|
1126
|
+
"result": {
|
|
1127
|
+
"$ref": "#/$defs/Appended"
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
},
|
|
1131
|
+
"tool.pin": {
|
|
1132
|
+
"type": "object",
|
|
1133
|
+
"$comment": "context.pinned",
|
|
1134
|
+
"properties": {
|
|
1135
|
+
"name": {
|
|
1136
|
+
"const": "pin"
|
|
1137
|
+
},
|
|
1138
|
+
"arguments": {
|
|
1139
|
+
"$ref": "#/$defs/WriteArgs"
|
|
1140
|
+
},
|
|
1141
|
+
"result": {
|
|
1142
|
+
"$ref": "#/$defs/Appended"
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
},
|
|
1146
|
+
"tool.link": {
|
|
1147
|
+
"type": "object",
|
|
1148
|
+
"$comment": "node.linked",
|
|
1149
|
+
"properties": {
|
|
1150
|
+
"name": {
|
|
1151
|
+
"const": "link"
|
|
1152
|
+
},
|
|
1153
|
+
"arguments": {
|
|
1154
|
+
"$ref": "#/$defs/WriteArgs"
|
|
1155
|
+
},
|
|
1156
|
+
"result": {
|
|
1157
|
+
"$ref": "#/$defs/Appended"
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
},
|
|
1161
|
+
"tool.move": {
|
|
1162
|
+
"type": "object",
|
|
1163
|
+
"$comment": "state.transitioned",
|
|
1164
|
+
"properties": {
|
|
1165
|
+
"name": {
|
|
1166
|
+
"const": "move"
|
|
1167
|
+
},
|
|
1168
|
+
"arguments": {
|
|
1169
|
+
"$ref": "#/$defs/WriteArgs"
|
|
1170
|
+
},
|
|
1171
|
+
"result": {
|
|
1172
|
+
"$ref": "#/$defs/Appended"
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
},
|
|
1176
|
+
"tool.gate_clear": {
|
|
1177
|
+
"type": "object",
|
|
1178
|
+
"$comment": "gate.cleared",
|
|
1179
|
+
"properties": {
|
|
1180
|
+
"name": {
|
|
1181
|
+
"const": "gate_clear"
|
|
1182
|
+
},
|
|
1183
|
+
"arguments": {
|
|
1184
|
+
"$ref": "#/$defs/WriteArgs"
|
|
1185
|
+
},
|
|
1186
|
+
"result": {
|
|
1187
|
+
"$ref": "#/$defs/Appended"
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1191
|
+
"tool.close": {
|
|
1192
|
+
"type": "object",
|
|
1193
|
+
"$comment": "evaluate the close policy now",
|
|
1194
|
+
"properties": {
|
|
1195
|
+
"name": {
|
|
1196
|
+
"const": "close"
|
|
1197
|
+
},
|
|
1198
|
+
"arguments": {
|
|
1199
|
+
"$ref": "#/$defs/CloseArgs"
|
|
1200
|
+
},
|
|
1201
|
+
"result": {
|
|
1202
|
+
"$ref": "#/$defs/CloseResult"
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
},
|
|
1206
|
+
"tool.goal_create": {
|
|
1207
|
+
"type": "object",
|
|
1208
|
+
"$comment": "node.created{kind: goal}",
|
|
1209
|
+
"properties": {
|
|
1210
|
+
"name": {
|
|
1211
|
+
"const": "goal_create"
|
|
1212
|
+
},
|
|
1213
|
+
"arguments": {
|
|
1214
|
+
"$ref": "#/$defs/WriteArgs"
|
|
1215
|
+
},
|
|
1216
|
+
"result": {
|
|
1217
|
+
"$ref": "#/$defs/Appended"
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1221
|
+
"tool.goal_measures": {
|
|
1222
|
+
"type": "object",
|
|
1223
|
+
"$comment": "goal.measures_set",
|
|
1224
|
+
"properties": {
|
|
1225
|
+
"name": {
|
|
1226
|
+
"const": "goal_measures"
|
|
1227
|
+
},
|
|
1228
|
+
"arguments": {
|
|
1229
|
+
"$ref": "#/$defs/WriteArgs"
|
|
1230
|
+
},
|
|
1231
|
+
"result": {
|
|
1232
|
+
"$ref": "#/$defs/Appended"
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
},
|
|
1236
|
+
"tool.goal_close": {
|
|
1237
|
+
"type": "object",
|
|
1238
|
+
"$comment": "node.closed on a goal",
|
|
1239
|
+
"properties": {
|
|
1240
|
+
"name": {
|
|
1241
|
+
"const": "goal_close"
|
|
1242
|
+
},
|
|
1243
|
+
"arguments": {
|
|
1244
|
+
"$ref": "#/$defs/WriteArgs"
|
|
1245
|
+
},
|
|
1246
|
+
"result": {
|
|
1247
|
+
"$ref": "#/$defs/Appended"
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
"tool.subscribe": {
|
|
1252
|
+
"type": "object",
|
|
1253
|
+
"$comment": "events after a seq (a page; poll to follow); read only",
|
|
1254
|
+
"properties": {
|
|
1255
|
+
"name": {
|
|
1256
|
+
"const": "subscribe"
|
|
1257
|
+
},
|
|
1258
|
+
"arguments": {
|
|
1259
|
+
"$ref": "#/$defs/SubscribeArgs"
|
|
1260
|
+
},
|
|
1261
|
+
"result": {
|
|
1262
|
+
"$ref": "#/$defs/SubscribeResult"
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
},
|
|
1266
|
+
"tool.changes": {
|
|
1267
|
+
"type": "object",
|
|
1268
|
+
"$comment": "the change feed, changes@1: what changed after a cursor, without the body; read only, the same read scope as subscribe. Served only with feed.changes on (off by default): off, the tool is not listed and a call is an unknown tool. A refused call returns a ChangesRefusal (cursor_invalid, cursor_ahead) as a structured error result",
|
|
1269
|
+
"properties": {
|
|
1270
|
+
"name": {
|
|
1271
|
+
"const": "changes"
|
|
1272
|
+
},
|
|
1273
|
+
"arguments": {
|
|
1274
|
+
"$ref": "#/$defs/ChangesArgs"
|
|
1275
|
+
},
|
|
1276
|
+
"result": {
|
|
1277
|
+
"$ref": "changes.schema.json#/$defs/ChangesPage"
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
},
|
|
1281
|
+
"tool.submit": {
|
|
1282
|
+
"type": "object",
|
|
1283
|
+
"$comment": "append any pre-signed event (the generic write path)",
|
|
1284
|
+
"properties": {
|
|
1285
|
+
"name": {
|
|
1286
|
+
"const": "submit"
|
|
1287
|
+
},
|
|
1288
|
+
"arguments": {
|
|
1289
|
+
"$ref": "#/$defs/SubmitArgs"
|
|
1290
|
+
},
|
|
1291
|
+
"result": {
|
|
1292
|
+
"$ref": "#/$defs/Appended"
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
},
|
|
1296
|
+
"tool.state": {
|
|
1297
|
+
"type": "object",
|
|
1298
|
+
"$comment": "folded view of one node; read only",
|
|
1299
|
+
"properties": {
|
|
1300
|
+
"name": {
|
|
1301
|
+
"const": "state"
|
|
1302
|
+
},
|
|
1303
|
+
"arguments": {
|
|
1304
|
+
"$ref": "#/$defs/NodeArg"
|
|
1305
|
+
},
|
|
1306
|
+
"result": {
|
|
1307
|
+
"$ref": "#/$defs/FoldedView"
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
"tool.stats": {
|
|
1312
|
+
"type": "object",
|
|
1313
|
+
"$comment": "log statistics and the reject journal tail; read only",
|
|
1314
|
+
"properties": {
|
|
1315
|
+
"name": {
|
|
1316
|
+
"const": "stats"
|
|
1317
|
+
},
|
|
1318
|
+
"arguments": {
|
|
1319
|
+
"$ref": "#/$defs/NoArgs"
|
|
1320
|
+
},
|
|
1321
|
+
"result": {
|
|
1322
|
+
"$ref": "#/$defs/StatsResult"
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
},
|
|
1326
|
+
"tool.emit": {
|
|
1327
|
+
"type": "object",
|
|
1328
|
+
"$comment": "INSECURE-SPIKE ONLY, not part of the contract",
|
|
1329
|
+
"properties": {
|
|
1330
|
+
"name": {
|
|
1331
|
+
"const": "emit"
|
|
1332
|
+
},
|
|
1333
|
+
"arguments": {
|
|
1334
|
+
"$ref": "#/$defs/EmitArgs"
|
|
1335
|
+
},
|
|
1336
|
+
"result": {
|
|
1337
|
+
"$ref": "#/$defs/Appended"
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
},
|
|
1341
|
+
"tool.advance_time": {
|
|
1342
|
+
"type": "object",
|
|
1343
|
+
"$comment": "virtual clock only; test and demo",
|
|
1344
|
+
"properties": {
|
|
1345
|
+
"name": {
|
|
1346
|
+
"const": "advance_time"
|
|
1347
|
+
},
|
|
1348
|
+
"arguments": {
|
|
1349
|
+
"$ref": "#/$defs/AdvanceArgs"
|
|
1350
|
+
},
|
|
1351
|
+
"result": {
|
|
1352
|
+
"$ref": "#/$defs/AdvanceResult"
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
}
|