rig-constellation 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/LICENSE +201 -0
  2. package/LICENSE-CODEGRAPH.txt +27 -0
  3. package/NOTICE +15 -0
  4. package/README.md +121 -0
  5. package/dist/chunk-8sqjbsgt.js +42 -0
  6. package/dist/chunk-9754b9t6.js +70 -0
  7. package/dist/chunk-arpj39jd.js +10 -0
  8. package/dist/chunk-bnz0drs2.js +10 -0
  9. package/dist/chunk-hk4h7yej.js +71 -0
  10. package/dist/rig.js +11708 -0
  11. package/generated/.manifest +57 -0
  12. package/generated/core/anchors-registry.ts +70 -0
  13. package/generated/core/migrations.ts +79 -0
  14. package/generated/core/schema.sql +241 -0
  15. package/generated/installer/claude.instructions.md +345 -0
  16. package/generated/installer/claude.permissions.json +44 -0
  17. package/generated/installer/codex.instructions.md +345 -0
  18. package/generated/installer/codex.permissions.json +44 -0
  19. package/generated/installer/cursor.instructions.md +345 -0
  20. package/generated/installer/cursor.permissions.json +44 -0
  21. package/generated/installer/opencode.instructions.md +345 -0
  22. package/generated/installer/opencode.permissions.json +44 -0
  23. package/generated/installer/openrouter.instructions.md +345 -0
  24. package/generated/installer/openrouter.permissions.json +44 -0
  25. package/generated/mcp/handlers/rig_add_alias.handler.ts +34 -0
  26. package/generated/mcp/handlers/rig_add_node.handler.ts +34 -0
  27. package/generated/mcp/handlers/rig_aliases.handler.ts +25 -0
  28. package/generated/mcp/handlers/rig_annotate.handler.ts +34 -0
  29. package/generated/mcp/handlers/rig_callees.handler.ts +25 -0
  30. package/generated/mcp/handlers/rig_callers.handler.ts +25 -0
  31. package/generated/mcp/handlers/rig_chain.handler.ts +25 -0
  32. package/generated/mcp/handlers/rig_cluster.handler.ts +34 -0
  33. package/generated/mcp/handlers/rig_cold.handler.ts +25 -0
  34. package/generated/mcp/handlers/rig_context.handler.ts +29 -0
  35. package/generated/mcp/handlers/rig_critical_path.handler.ts +25 -0
  36. package/generated/mcp/handlers/rig_dep_conflicts.handler.ts +25 -0
  37. package/generated/mcp/handlers/rig_deps.handler.ts +25 -0
  38. package/generated/mcp/handlers/rig_drill.handler.ts +25 -0
  39. package/generated/mcp/handlers/rig_drop_waypoint.handler.ts +34 -0
  40. package/generated/mcp/handlers/rig_explore.handler.ts +29 -0
  41. package/generated/mcp/handlers/rig_files.handler.ts +25 -0
  42. package/generated/mcp/handlers/rig_focus.handler.ts +29 -0
  43. package/generated/mcp/handlers/rig_hotspots.handler.ts +25 -0
  44. package/generated/mcp/handlers/rig_hub_of.handler.ts +25 -0
  45. package/generated/mcp/handlers/rig_hubs.handler.ts +25 -0
  46. package/generated/mcp/handlers/rig_impact.handler.ts +25 -0
  47. package/generated/mcp/handlers/rig_neighbors.handler.ts +25 -0
  48. package/generated/mcp/handlers/rig_node.handler.ts +25 -0
  49. package/generated/mcp/handlers/rig_phantom_imports.handler.ts +25 -0
  50. package/generated/mcp/handlers/rig_promote.handler.ts +34 -0
  51. package/generated/mcp/handlers/rig_propose_edge.handler.ts +34 -0
  52. package/generated/mcp/handlers/rig_pull.handler.ts +25 -0
  53. package/generated/mcp/handlers/rig_relevant_skills.handler.ts +25 -0
  54. package/generated/mcp/handlers/rig_search.handler.ts +25 -0
  55. package/generated/mcp/handlers/rig_session_token.handler.ts +25 -0
  56. package/generated/mcp/handlers/rig_status.handler.ts +25 -0
  57. package/generated/mcp/handlers/rig_subscribe.handler.ts +25 -0
  58. package/generated/mcp/handlers/rig_undo.handler.ts +29 -0
  59. package/generated/mcp/handlers/rig_unused_deps.handler.ts +25 -0
  60. package/generated/mcp/handlers/rig_waypoints.handler.ts +25 -0
  61. package/generated/mcp/handlers-index.ts +40 -0
  62. package/generated/mcp/tools-manifest.json +2958 -0
  63. package/generated/web/ws-events.ts +237 -0
  64. package/package.json +77 -0
  65. package/packages/web/dist/assets/index-VRO-sxc2.js +54 -0
  66. package/packages/web/dist/index.html +35 -0
@@ -0,0 +1,2958 @@
1
+ {
2
+ "version": 1,
3
+ "tools": [
4
+ {
5
+ "name": "rig_add_alias",
6
+ "description": "Register an alias that resolves to a canonical anchor",
7
+ "tier": "write",
8
+ "stability": "experimental",
9
+ "inputSchema": {
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string"
14
+ },
15
+ "alias": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "maxLength": 120
19
+ },
20
+ "rationale": {
21
+ "type": "string",
22
+ "minLength": 10
23
+ }
24
+ },
25
+ "required": [
26
+ "id",
27
+ "alias",
28
+ "rationale"
29
+ ],
30
+ "additionalProperties": false,
31
+ "$schema": "http://json-schema.org/draft-07/schema#"
32
+ },
33
+ "outputSchema": {
34
+ "type": "object",
35
+ "properties": {
36
+ "added": {
37
+ "type": "boolean"
38
+ },
39
+ "elapsed_ms": {
40
+ "type": "number"
41
+ }
42
+ },
43
+ "required": [
44
+ "added",
45
+ "elapsed_ms"
46
+ ],
47
+ "additionalProperties": false,
48
+ "$schema": "http://json-schema.org/draft-07/schema#"
49
+ },
50
+ "errors": [
51
+ "NOT_INITIALIZED",
52
+ "NODE_NOT_FOUND",
53
+ "PROVENANCE_REQUIRED",
54
+ "RATIONALE_REQUIRED"
55
+ ]
56
+ },
57
+ {
58
+ "name": "rig_add_node",
59
+ "description": "Add a new anchor extracted from conversation",
60
+ "tier": "write",
61
+ "stability": "experimental",
62
+ "inputSchema": {
63
+ "type": "object",
64
+ "properties": {
65
+ "type": {
66
+ "type": "string",
67
+ "minLength": 1
68
+ },
69
+ "name": {
70
+ "type": "string",
71
+ "minLength": 1
72
+ },
73
+ "data": {
74
+ "type": "object",
75
+ "additionalProperties": {},
76
+ "default": {}
77
+ },
78
+ "rationale": {
79
+ "type": "string",
80
+ "minLength": 10
81
+ }
82
+ },
83
+ "required": [
84
+ "type",
85
+ "name",
86
+ "rationale"
87
+ ],
88
+ "additionalProperties": false,
89
+ "$schema": "http://json-schema.org/draft-07/schema#"
90
+ },
91
+ "outputSchema": {
92
+ "type": "object",
93
+ "properties": {
94
+ "id": {
95
+ "type": "string"
96
+ },
97
+ "elapsed_ms": {
98
+ "type": "number"
99
+ }
100
+ },
101
+ "required": [
102
+ "id",
103
+ "elapsed_ms"
104
+ ],
105
+ "additionalProperties": false,
106
+ "$schema": "http://json-schema.org/draft-07/schema#"
107
+ },
108
+ "errors": [
109
+ "NOT_INITIALIZED",
110
+ "PROVENANCE_REQUIRED",
111
+ "RATIONALE_REQUIRED"
112
+ ]
113
+ },
114
+ {
115
+ "name": "rig_aliases",
116
+ "description": "List the aliases registered for an anchor",
117
+ "tier": "light",
118
+ "stability": "stable",
119
+ "since": "1.0",
120
+ "inputSchema": {
121
+ "type": "object",
122
+ "properties": {
123
+ "id": {
124
+ "type": "string"
125
+ }
126
+ },
127
+ "required": [
128
+ "id"
129
+ ],
130
+ "additionalProperties": false,
131
+ "$schema": "http://json-schema.org/draft-07/schema#"
132
+ },
133
+ "outputSchema": {
134
+ "type": "object",
135
+ "properties": {
136
+ "aliases": {
137
+ "type": "array",
138
+ "items": {
139
+ "type": "object",
140
+ "properties": {
141
+ "alias": {
142
+ "type": "string"
143
+ },
144
+ "provenance": {
145
+ "type": "string"
146
+ },
147
+ "rationale": {
148
+ "type": [
149
+ "string",
150
+ "null"
151
+ ]
152
+ },
153
+ "created_at": {
154
+ "type": "integer"
155
+ }
156
+ },
157
+ "required": [
158
+ "alias",
159
+ "provenance",
160
+ "rationale",
161
+ "created_at"
162
+ ],
163
+ "additionalProperties": false
164
+ }
165
+ },
166
+ "elapsed_ms": {
167
+ "type": "number"
168
+ }
169
+ },
170
+ "required": [
171
+ "aliases",
172
+ "elapsed_ms"
173
+ ],
174
+ "additionalProperties": false,
175
+ "$schema": "http://json-schema.org/draft-07/schema#"
176
+ },
177
+ "errors": [
178
+ "NOT_INITIALIZED",
179
+ "NODE_NOT_FOUND"
180
+ ]
181
+ },
182
+ {
183
+ "name": "rig_annotate",
184
+ "description": "Append a note to an anchor",
185
+ "tier": "write",
186
+ "stability": "experimental",
187
+ "inputSchema": {
188
+ "type": "object",
189
+ "properties": {
190
+ "node_id": {
191
+ "type": "string"
192
+ },
193
+ "note": {
194
+ "type": "string",
195
+ "minLength": 1
196
+ },
197
+ "rationale": {
198
+ "type": "string",
199
+ "minLength": 10
200
+ }
201
+ },
202
+ "required": [
203
+ "node_id",
204
+ "note",
205
+ "rationale"
206
+ ],
207
+ "additionalProperties": false,
208
+ "$schema": "http://json-schema.org/draft-07/schema#"
209
+ },
210
+ "outputSchema": {
211
+ "type": "object",
212
+ "properties": {
213
+ "ok": {
214
+ "type": "boolean"
215
+ },
216
+ "elapsed_ms": {
217
+ "type": "number"
218
+ }
219
+ },
220
+ "required": [
221
+ "ok",
222
+ "elapsed_ms"
223
+ ],
224
+ "additionalProperties": false,
225
+ "$schema": "http://json-schema.org/draft-07/schema#"
226
+ },
227
+ "errors": [
228
+ "NOT_INITIALIZED",
229
+ "NODE_NOT_FOUND",
230
+ "PROVENANCE_REQUIRED",
231
+ "RATIONALE_REQUIRED"
232
+ ]
233
+ },
234
+ {
235
+ "name": "rig_callees",
236
+ "description": "List direct callees of an anchor",
237
+ "tier": "light",
238
+ "stability": "stable",
239
+ "since": "1.0",
240
+ "inputSchema": {
241
+ "type": "object",
242
+ "properties": {
243
+ "id": {
244
+ "type": "string",
245
+ "description": "Caller anchor id"
246
+ }
247
+ },
248
+ "required": [
249
+ "id"
250
+ ],
251
+ "additionalProperties": false,
252
+ "$schema": "http://json-schema.org/draft-07/schema#"
253
+ },
254
+ "outputSchema": {
255
+ "type": "object",
256
+ "properties": {
257
+ "nodes": {
258
+ "type": "array",
259
+ "items": {
260
+ "type": "object",
261
+ "properties": {
262
+ "id": {
263
+ "type": "string"
264
+ },
265
+ "name": {
266
+ "type": "string"
267
+ },
268
+ "kind": {
269
+ "type": "string"
270
+ },
271
+ "file_path": {
272
+ "type": "string"
273
+ }
274
+ },
275
+ "required": [
276
+ "id",
277
+ "name",
278
+ "kind"
279
+ ],
280
+ "additionalProperties": false
281
+ }
282
+ },
283
+ "elapsed_ms": {
284
+ "type": "number"
285
+ }
286
+ },
287
+ "required": [
288
+ "nodes",
289
+ "elapsed_ms"
290
+ ],
291
+ "additionalProperties": false,
292
+ "$schema": "http://json-schema.org/draft-07/schema#"
293
+ },
294
+ "errors": [
295
+ "NOT_INITIALIZED",
296
+ "NODE_NOT_FOUND"
297
+ ]
298
+ },
299
+ {
300
+ "name": "rig_callers",
301
+ "description": "List direct callers of an anchor",
302
+ "tier": "light",
303
+ "stability": "stable",
304
+ "since": "1.0",
305
+ "inputSchema": {
306
+ "type": "object",
307
+ "properties": {
308
+ "id": {
309
+ "type": "string",
310
+ "description": "Callee anchor id"
311
+ }
312
+ },
313
+ "required": [
314
+ "id"
315
+ ],
316
+ "additionalProperties": false,
317
+ "$schema": "http://json-schema.org/draft-07/schema#"
318
+ },
319
+ "outputSchema": {
320
+ "type": "object",
321
+ "properties": {
322
+ "nodes": {
323
+ "type": "array",
324
+ "items": {
325
+ "type": "object",
326
+ "properties": {
327
+ "id": {
328
+ "type": "string"
329
+ },
330
+ "name": {
331
+ "type": "string"
332
+ },
333
+ "kind": {
334
+ "type": "string"
335
+ },
336
+ "file_path": {
337
+ "type": "string"
338
+ }
339
+ },
340
+ "required": [
341
+ "id",
342
+ "name",
343
+ "kind"
344
+ ],
345
+ "additionalProperties": false
346
+ }
347
+ },
348
+ "elapsed_ms": {
349
+ "type": "number"
350
+ }
351
+ },
352
+ "required": [
353
+ "nodes",
354
+ "elapsed_ms"
355
+ ],
356
+ "additionalProperties": false,
357
+ "$schema": "http://json-schema.org/draft-07/schema#"
358
+ },
359
+ "errors": [
360
+ "NOT_INITIALIZED",
361
+ "NODE_NOT_FOUND"
362
+ ]
363
+ },
364
+ {
365
+ "name": "rig_chain",
366
+ "description": "Walk the predecessor chain of a waypoint",
367
+ "tier": "light",
368
+ "stability": "experimental",
369
+ "inputSchema": {
370
+ "type": "object",
371
+ "properties": {
372
+ "id": {
373
+ "type": "string",
374
+ "description": "Waypoint id to start the chain at"
375
+ },
376
+ "max_depth": {
377
+ "type": "integer",
378
+ "minimum": 1,
379
+ "maximum": 50,
380
+ "default": 10
381
+ }
382
+ },
383
+ "required": [
384
+ "id"
385
+ ],
386
+ "additionalProperties": false,
387
+ "$schema": "http://json-schema.org/draft-07/schema#"
388
+ },
389
+ "outputSchema": {
390
+ "type": "object",
391
+ "properties": {
392
+ "chain": {
393
+ "type": "array",
394
+ "items": {
395
+ "type": "object",
396
+ "properties": {
397
+ "id": {
398
+ "type": "string"
399
+ },
400
+ "ts": {
401
+ "type": "integer"
402
+ },
403
+ "session_id": {
404
+ "type": "string"
405
+ },
406
+ "kind": {
407
+ "type": "string",
408
+ "enum": [
409
+ "decision",
410
+ "observation",
411
+ "constraint",
412
+ "open-question",
413
+ "principle"
414
+ ]
415
+ },
416
+ "title": {
417
+ "type": "string"
418
+ },
419
+ "summary": {
420
+ "type": "string"
421
+ },
422
+ "analogy": {
423
+ "type": [
424
+ "string",
425
+ "null"
426
+ ]
427
+ },
428
+ "constellation_refs": {
429
+ "type": "array",
430
+ "items": {
431
+ "type": "string"
432
+ }
433
+ },
434
+ "predecessors": {
435
+ "type": "array",
436
+ "items": {
437
+ "type": "string"
438
+ }
439
+ },
440
+ "key_terms": {
441
+ "type": "array",
442
+ "items": {
443
+ "type": "string"
444
+ }
445
+ },
446
+ "compactable": {
447
+ "type": "boolean"
448
+ },
449
+ "payloads": {
450
+ "type": "array",
451
+ "items": {
452
+ "anyOf": [
453
+ {
454
+ "type": "object",
455
+ "properties": {
456
+ "type": {
457
+ "type": "string",
458
+ "const": "text-summary"
459
+ },
460
+ "content": {
461
+ "type": "string"
462
+ }
463
+ },
464
+ "required": [
465
+ "type",
466
+ "content"
467
+ ],
468
+ "additionalProperties": false
469
+ },
470
+ {
471
+ "type": "object",
472
+ "properties": {
473
+ "type": {
474
+ "type": "string",
475
+ "const": "mermaid-diagram"
476
+ },
477
+ "content": {
478
+ "type": "string"
479
+ }
480
+ },
481
+ "required": [
482
+ "type",
483
+ "content"
484
+ ],
485
+ "additionalProperties": false
486
+ },
487
+ {
488
+ "type": "object",
489
+ "properties": {
490
+ "type": {
491
+ "type": "string",
492
+ "const": "code-snippet"
493
+ },
494
+ "lang": {
495
+ "type": "string"
496
+ },
497
+ "content": {
498
+ "type": "string"
499
+ }
500
+ },
501
+ "required": [
502
+ "type",
503
+ "lang",
504
+ "content"
505
+ ],
506
+ "additionalProperties": false
507
+ },
508
+ {
509
+ "type": "object",
510
+ "properties": {
511
+ "type": {
512
+ "type": "string",
513
+ "const": "doc-fragment"
514
+ },
515
+ "content": {
516
+ "type": "string"
517
+ }
518
+ },
519
+ "required": [
520
+ "type",
521
+ "content"
522
+ ],
523
+ "additionalProperties": false
524
+ },
525
+ {
526
+ "type": "object",
527
+ "properties": {
528
+ "type": {
529
+ "type": "string",
530
+ "const": "image-ref"
531
+ },
532
+ "path": {
533
+ "type": "string"
534
+ },
535
+ "alt": {
536
+ "type": "string"
537
+ }
538
+ },
539
+ "required": [
540
+ "type",
541
+ "path"
542
+ ],
543
+ "additionalProperties": false
544
+ },
545
+ {
546
+ "type": "object",
547
+ "properties": {
548
+ "type": {
549
+ "type": "string",
550
+ "const": "dataset-pointer"
551
+ },
552
+ "query": {
553
+ "type": "string"
554
+ }
555
+ },
556
+ "required": [
557
+ "type",
558
+ "query"
559
+ ],
560
+ "additionalProperties": false
561
+ }
562
+ ]
563
+ }
564
+ }
565
+ },
566
+ "required": [
567
+ "id",
568
+ "ts",
569
+ "session_id",
570
+ "kind",
571
+ "title",
572
+ "summary",
573
+ "analogy",
574
+ "constellation_refs",
575
+ "predecessors",
576
+ "key_terms",
577
+ "compactable",
578
+ "payloads"
579
+ ],
580
+ "additionalProperties": false
581
+ }
582
+ },
583
+ "elapsed_ms": {
584
+ "type": "number"
585
+ }
586
+ },
587
+ "required": [
588
+ "chain",
589
+ "elapsed_ms"
590
+ ],
591
+ "additionalProperties": false,
592
+ "$schema": "http://json-schema.org/draft-07/schema#"
593
+ },
594
+ "errors": [
595
+ "NOT_INITIALIZED",
596
+ "NODE_NOT_FOUND"
597
+ ]
598
+ },
599
+ {
600
+ "name": "rig_cluster",
601
+ "description": "Create a cluster meta-anchor over existing anchors",
602
+ "tier": "write",
603
+ "stability": "experimental",
604
+ "inputSchema": {
605
+ "type": "object",
606
+ "properties": {
607
+ "node_ids": {
608
+ "type": "array",
609
+ "items": {
610
+ "type": "string",
611
+ "minLength": 1
612
+ },
613
+ "minItems": 2
614
+ },
615
+ "label": {
616
+ "type": "string",
617
+ "minLength": 1
618
+ },
619
+ "rationale": {
620
+ "type": "string",
621
+ "minLength": 10
622
+ }
623
+ },
624
+ "required": [
625
+ "node_ids",
626
+ "label",
627
+ "rationale"
628
+ ],
629
+ "additionalProperties": false,
630
+ "$schema": "http://json-schema.org/draft-07/schema#"
631
+ },
632
+ "outputSchema": {
633
+ "type": "object",
634
+ "properties": {
635
+ "cluster_id": {
636
+ "type": "string"
637
+ },
638
+ "elapsed_ms": {
639
+ "type": "number"
640
+ }
641
+ },
642
+ "required": [
643
+ "cluster_id",
644
+ "elapsed_ms"
645
+ ],
646
+ "additionalProperties": false,
647
+ "$schema": "http://json-schema.org/draft-07/schema#"
648
+ },
649
+ "errors": [
650
+ "NOT_INITIALIZED",
651
+ "NODE_NOT_FOUND",
652
+ "PROVENANCE_REQUIRED",
653
+ "RATIONALE_REQUIRED"
654
+ ]
655
+ },
656
+ {
657
+ "name": "rig_cold",
658
+ "description": "Nodes not touched in a long time (or ever)",
659
+ "tier": "light",
660
+ "stability": "experimental",
661
+ "inputSchema": {
662
+ "type": "object",
663
+ "properties": {
664
+ "stale_after_ms": {
665
+ "type": "integer",
666
+ "exclusiveMinimum": 0,
667
+ "description": "A node is \"cold\" if its most recent touch is older than this. Default 90 days."
668
+ },
669
+ "limit": {
670
+ "type": "integer",
671
+ "minimum": 1,
672
+ "maximum": 100,
673
+ "default": 20
674
+ }
675
+ },
676
+ "additionalProperties": false,
677
+ "$schema": "http://json-schema.org/draft-07/schema#"
678
+ },
679
+ "outputSchema": {
680
+ "type": "object",
681
+ "properties": {
682
+ "cold": {
683
+ "type": "array",
684
+ "items": {
685
+ "type": "object",
686
+ "properties": {
687
+ "id": {
688
+ "type": "string"
689
+ },
690
+ "name": {
691
+ "type": "string"
692
+ },
693
+ "kind": {
694
+ "type": "string"
695
+ },
696
+ "last_ts": {
697
+ "anyOf": [
698
+ {
699
+ "type": "integer"
700
+ },
701
+ {
702
+ "type": "null"
703
+ }
704
+ ]
705
+ }
706
+ },
707
+ "required": [
708
+ "id",
709
+ "name",
710
+ "kind",
711
+ "last_ts"
712
+ ],
713
+ "additionalProperties": false
714
+ }
715
+ },
716
+ "elapsed_ms": {
717
+ "type": "number"
718
+ }
719
+ },
720
+ "required": [
721
+ "cold",
722
+ "elapsed_ms"
723
+ ],
724
+ "additionalProperties": false,
725
+ "$schema": "http://json-schema.org/draft-07/schema#"
726
+ },
727
+ "errors": [
728
+ "NOT_INITIALIZED"
729
+ ]
730
+ },
731
+ {
732
+ "name": "rig_context",
733
+ "description": "Build a context bundle for a task",
734
+ "tier": "heavy",
735
+ "stability": "stable",
736
+ "since": "1.0",
737
+ "inputSchema": {
738
+ "type": "object",
739
+ "properties": {
740
+ "task": {
741
+ "type": "string",
742
+ "minLength": 1,
743
+ "description": "What the agent is trying to do"
744
+ },
745
+ "max_nodes": {
746
+ "type": "integer",
747
+ "minimum": 1,
748
+ "maximum": 50,
749
+ "default": 10
750
+ },
751
+ "format": {
752
+ "type": "string",
753
+ "enum": [
754
+ "markdown",
755
+ "json"
756
+ ],
757
+ "default": "markdown"
758
+ }
759
+ },
760
+ "required": [
761
+ "task"
762
+ ],
763
+ "additionalProperties": false,
764
+ "$schema": "http://json-schema.org/draft-07/schema#"
765
+ },
766
+ "outputSchema": {
767
+ "type": "object",
768
+ "properties": {
769
+ "context": {
770
+ "type": "string"
771
+ },
772
+ "anchor_count": {
773
+ "type": "integer"
774
+ },
775
+ "elapsed_ms": {
776
+ "type": "number"
777
+ }
778
+ },
779
+ "required": [
780
+ "context",
781
+ "anchor_count",
782
+ "elapsed_ms"
783
+ ],
784
+ "additionalProperties": false,
785
+ "$schema": "http://json-schema.org/draft-07/schema#"
786
+ },
787
+ "errors": [
788
+ "NOT_INITIALIZED",
789
+ "MAIN_SESSION_FORBIDDEN"
790
+ ]
791
+ },
792
+ {
793
+ "name": "rig_critical_path",
794
+ "description": "Walk the architecture's spine from a root anchor",
795
+ "tier": "light",
796
+ "stability": "stable",
797
+ "since": "1.0",
798
+ "inputSchema": {
799
+ "type": "object",
800
+ "properties": {
801
+ "id": {
802
+ "type": "string"
803
+ },
804
+ "max_steps": {
805
+ "type": "integer",
806
+ "minimum": 2,
807
+ "maximum": 32,
808
+ "default": 12
809
+ }
810
+ },
811
+ "required": [
812
+ "id"
813
+ ],
814
+ "additionalProperties": false,
815
+ "$schema": "http://json-schema.org/draft-07/schema#"
816
+ },
817
+ "outputSchema": {
818
+ "type": "object",
819
+ "properties": {
820
+ "path": {
821
+ "type": "array",
822
+ "items": {
823
+ "type": "object",
824
+ "properties": {
825
+ "id": {
826
+ "type": "string"
827
+ },
828
+ "name": {
829
+ "type": "string"
830
+ },
831
+ "kind": {
832
+ "type": "string"
833
+ },
834
+ "hubness": {
835
+ "type": "number"
836
+ },
837
+ "activation_count": {
838
+ "type": "integer"
839
+ },
840
+ "step_weight": {
841
+ "type": "number"
842
+ }
843
+ },
844
+ "required": [
845
+ "id",
846
+ "name",
847
+ "kind",
848
+ "hubness",
849
+ "activation_count",
850
+ "step_weight"
851
+ ],
852
+ "additionalProperties": false
853
+ }
854
+ },
855
+ "elapsed_ms": {
856
+ "type": "number"
857
+ }
858
+ },
859
+ "required": [
860
+ "path",
861
+ "elapsed_ms"
862
+ ],
863
+ "additionalProperties": false,
864
+ "$schema": "http://json-schema.org/draft-07/schema#"
865
+ },
866
+ "errors": [
867
+ "NOT_INITIALIZED",
868
+ "NODE_NOT_FOUND"
869
+ ]
870
+ },
871
+ {
872
+ "name": "rig_dep_conflicts",
873
+ "description": "Packages declared with different versions across manifests",
874
+ "tier": "light",
875
+ "stability": "stable",
876
+ "since": "1.0",
877
+ "inputSchema": {
878
+ "type": "object",
879
+ "properties": {},
880
+ "additionalProperties": false,
881
+ "$schema": "http://json-schema.org/draft-07/schema#"
882
+ },
883
+ "outputSchema": {
884
+ "type": "object",
885
+ "properties": {
886
+ "conflicts": {
887
+ "type": "array",
888
+ "items": {
889
+ "type": "object",
890
+ "properties": {
891
+ "name": {
892
+ "type": "string"
893
+ },
894
+ "source": {
895
+ "type": "string"
896
+ },
897
+ "manifests": {
898
+ "type": "array",
899
+ "items": {
900
+ "type": "object",
901
+ "properties": {
902
+ "manifest_path": {
903
+ "type": "string"
904
+ },
905
+ "spec": {
906
+ "type": "string"
907
+ },
908
+ "is_dev": {
909
+ "type": "boolean"
910
+ }
911
+ },
912
+ "required": [
913
+ "manifest_path",
914
+ "spec",
915
+ "is_dev"
916
+ ],
917
+ "additionalProperties": false
918
+ }
919
+ }
920
+ },
921
+ "required": [
922
+ "name",
923
+ "source",
924
+ "manifests"
925
+ ],
926
+ "additionalProperties": false
927
+ }
928
+ },
929
+ "elapsed_ms": {
930
+ "type": "number"
931
+ }
932
+ },
933
+ "required": [
934
+ "conflicts",
935
+ "elapsed_ms"
936
+ ],
937
+ "additionalProperties": false,
938
+ "$schema": "http://json-schema.org/draft-07/schema#"
939
+ },
940
+ "errors": [
941
+ "NOT_INITIALIZED"
942
+ ]
943
+ },
944
+ {
945
+ "name": "rig_deps",
946
+ "description": "List declared dependencies from package manifests",
947
+ "tier": "light",
948
+ "stability": "stable",
949
+ "since": "1.0",
950
+ "inputSchema": {
951
+ "type": "object",
952
+ "properties": {
953
+ "manifest_path": {
954
+ "type": "string",
955
+ "description": "Restrict to deps declared in this manifest path (relative)"
956
+ }
957
+ },
958
+ "additionalProperties": false,
959
+ "$schema": "http://json-schema.org/draft-07/schema#"
960
+ },
961
+ "outputSchema": {
962
+ "type": "object",
963
+ "properties": {
964
+ "deps": {
965
+ "type": "array",
966
+ "items": {
967
+ "type": "object",
968
+ "properties": {
969
+ "id": {
970
+ "type": "string"
971
+ },
972
+ "name": {
973
+ "type": "string"
974
+ },
975
+ "spec": {
976
+ "type": "string"
977
+ },
978
+ "source": {
979
+ "type": "string"
980
+ },
981
+ "manifest_path": {
982
+ "type": "string"
983
+ },
984
+ "is_dev": {
985
+ "type": "boolean"
986
+ },
987
+ "is_optional": {
988
+ "type": "boolean"
989
+ },
990
+ "is_peer": {
991
+ "type": "boolean"
992
+ },
993
+ "resolved_version": {
994
+ "type": [
995
+ "string",
996
+ "null"
997
+ ]
998
+ }
999
+ },
1000
+ "required": [
1001
+ "id",
1002
+ "name",
1003
+ "spec",
1004
+ "source",
1005
+ "manifest_path",
1006
+ "is_dev",
1007
+ "is_optional",
1008
+ "is_peer",
1009
+ "resolved_version"
1010
+ ],
1011
+ "additionalProperties": false
1012
+ }
1013
+ },
1014
+ "elapsed_ms": {
1015
+ "type": "number"
1016
+ }
1017
+ },
1018
+ "required": [
1019
+ "deps",
1020
+ "elapsed_ms"
1021
+ ],
1022
+ "additionalProperties": false,
1023
+ "$schema": "http://json-schema.org/draft-07/schema#"
1024
+ },
1025
+ "errors": [
1026
+ "NOT_INITIALIZED"
1027
+ ]
1028
+ },
1029
+ {
1030
+ "name": "rig_drill",
1031
+ "description": "Explore a hub's sub-tree, ranked by magnetic pull",
1032
+ "tier": "light",
1033
+ "stability": "stable",
1034
+ "since": "1.0",
1035
+ "inputSchema": {
1036
+ "type": "object",
1037
+ "properties": {
1038
+ "hub_id": {
1039
+ "type": "string"
1040
+ },
1041
+ "query": {
1042
+ "type": "string"
1043
+ },
1044
+ "max_depth": {
1045
+ "type": "integer",
1046
+ "minimum": 1,
1047
+ "maximum": 6,
1048
+ "default": 3
1049
+ },
1050
+ "limit": {
1051
+ "type": "integer",
1052
+ "minimum": 1,
1053
+ "maximum": 100,
1054
+ "default": 50
1055
+ }
1056
+ },
1057
+ "required": [
1058
+ "hub_id"
1059
+ ],
1060
+ "additionalProperties": false,
1061
+ "$schema": "http://json-schema.org/draft-07/schema#"
1062
+ },
1063
+ "outputSchema": {
1064
+ "type": "object",
1065
+ "properties": {
1066
+ "results": {
1067
+ "type": "array",
1068
+ "items": {
1069
+ "type": "object",
1070
+ "properties": {
1071
+ "id": {
1072
+ "type": "string"
1073
+ },
1074
+ "name": {
1075
+ "type": "string"
1076
+ },
1077
+ "kind": {
1078
+ "type": "string"
1079
+ },
1080
+ "depth": {
1081
+ "type": "integer"
1082
+ },
1083
+ "pull_score": {
1084
+ "type": "number"
1085
+ }
1086
+ },
1087
+ "required": [
1088
+ "id",
1089
+ "name",
1090
+ "kind",
1091
+ "depth",
1092
+ "pull_score"
1093
+ ],
1094
+ "additionalProperties": false
1095
+ }
1096
+ },
1097
+ "elapsed_ms": {
1098
+ "type": "number"
1099
+ }
1100
+ },
1101
+ "required": [
1102
+ "results",
1103
+ "elapsed_ms"
1104
+ ],
1105
+ "additionalProperties": false,
1106
+ "$schema": "http://json-schema.org/draft-07/schema#"
1107
+ },
1108
+ "errors": [
1109
+ "NOT_INITIALIZED",
1110
+ "NODE_NOT_FOUND"
1111
+ ]
1112
+ },
1113
+ {
1114
+ "name": "rig_drop_waypoint",
1115
+ "description": "Drop a conversation waypoint at a decision point",
1116
+ "tier": "write",
1117
+ "stability": "experimental",
1118
+ "inputSchema": {
1119
+ "type": "object",
1120
+ "properties": {
1121
+ "kind": {
1122
+ "type": "string",
1123
+ "enum": [
1124
+ "decision",
1125
+ "observation",
1126
+ "constraint",
1127
+ "open-question",
1128
+ "principle"
1129
+ ]
1130
+ },
1131
+ "title": {
1132
+ "type": "string",
1133
+ "minLength": 3,
1134
+ "maxLength": 120
1135
+ },
1136
+ "summary": {
1137
+ "type": "string",
1138
+ "minLength": 10,
1139
+ "maxLength": 2000
1140
+ },
1141
+ "analogy": {
1142
+ "type": "string"
1143
+ },
1144
+ "constellation_refs": {
1145
+ "type": "array",
1146
+ "items": {
1147
+ "type": "string"
1148
+ },
1149
+ "default": []
1150
+ },
1151
+ "predecessors": {
1152
+ "type": "array",
1153
+ "items": {
1154
+ "type": "string"
1155
+ },
1156
+ "default": []
1157
+ },
1158
+ "key_terms": {
1159
+ "type": "array",
1160
+ "items": {
1161
+ "type": "string"
1162
+ },
1163
+ "default": []
1164
+ },
1165
+ "compactable": {
1166
+ "type": "boolean",
1167
+ "default": false
1168
+ },
1169
+ "payloads": {
1170
+ "type": "array",
1171
+ "items": {
1172
+ "anyOf": [
1173
+ {
1174
+ "type": "object",
1175
+ "properties": {
1176
+ "type": {
1177
+ "type": "string",
1178
+ "const": "text-summary"
1179
+ },
1180
+ "content": {
1181
+ "type": "string",
1182
+ "minLength": 1
1183
+ }
1184
+ },
1185
+ "required": [
1186
+ "type",
1187
+ "content"
1188
+ ],
1189
+ "additionalProperties": false
1190
+ },
1191
+ {
1192
+ "type": "object",
1193
+ "properties": {
1194
+ "type": {
1195
+ "type": "string",
1196
+ "const": "mermaid-diagram"
1197
+ },
1198
+ "content": {
1199
+ "type": "string",
1200
+ "minLength": 1
1201
+ }
1202
+ },
1203
+ "required": [
1204
+ "type",
1205
+ "content"
1206
+ ],
1207
+ "additionalProperties": false
1208
+ },
1209
+ {
1210
+ "type": "object",
1211
+ "properties": {
1212
+ "type": {
1213
+ "type": "string",
1214
+ "const": "code-snippet"
1215
+ },
1216
+ "lang": {
1217
+ "type": "string",
1218
+ "minLength": 1
1219
+ },
1220
+ "content": {
1221
+ "type": "string",
1222
+ "minLength": 1
1223
+ }
1224
+ },
1225
+ "required": [
1226
+ "type",
1227
+ "lang",
1228
+ "content"
1229
+ ],
1230
+ "additionalProperties": false
1231
+ },
1232
+ {
1233
+ "type": "object",
1234
+ "properties": {
1235
+ "type": {
1236
+ "type": "string",
1237
+ "const": "doc-fragment"
1238
+ },
1239
+ "content": {
1240
+ "type": "string",
1241
+ "minLength": 1
1242
+ }
1243
+ },
1244
+ "required": [
1245
+ "type",
1246
+ "content"
1247
+ ],
1248
+ "additionalProperties": false
1249
+ },
1250
+ {
1251
+ "type": "object",
1252
+ "properties": {
1253
+ "type": {
1254
+ "type": "string",
1255
+ "const": "image-ref"
1256
+ },
1257
+ "path": {
1258
+ "type": "string",
1259
+ "minLength": 1
1260
+ },
1261
+ "alt": {
1262
+ "type": "string"
1263
+ }
1264
+ },
1265
+ "required": [
1266
+ "type",
1267
+ "path"
1268
+ ],
1269
+ "additionalProperties": false
1270
+ },
1271
+ {
1272
+ "type": "object",
1273
+ "properties": {
1274
+ "type": {
1275
+ "type": "string",
1276
+ "const": "dataset-pointer"
1277
+ },
1278
+ "query": {
1279
+ "type": "string",
1280
+ "minLength": 1
1281
+ }
1282
+ },
1283
+ "required": [
1284
+ "type",
1285
+ "query"
1286
+ ],
1287
+ "additionalProperties": false
1288
+ }
1289
+ ]
1290
+ },
1291
+ "default": []
1292
+ },
1293
+ "rationale": {
1294
+ "type": "string",
1295
+ "minLength": 10
1296
+ }
1297
+ },
1298
+ "required": [
1299
+ "kind",
1300
+ "title",
1301
+ "summary",
1302
+ "rationale"
1303
+ ],
1304
+ "additionalProperties": false,
1305
+ "$schema": "http://json-schema.org/draft-07/schema#"
1306
+ },
1307
+ "outputSchema": {
1308
+ "type": "object",
1309
+ "properties": {
1310
+ "id": {
1311
+ "type": "string"
1312
+ },
1313
+ "elapsed_ms": {
1314
+ "type": "number"
1315
+ }
1316
+ },
1317
+ "required": [
1318
+ "id",
1319
+ "elapsed_ms"
1320
+ ],
1321
+ "additionalProperties": false,
1322
+ "$schema": "http://json-schema.org/draft-07/schema#"
1323
+ },
1324
+ "errors": [
1325
+ "NOT_INITIALIZED",
1326
+ "PROVENANCE_REQUIRED",
1327
+ "RATIONALE_REQUIRED"
1328
+ ]
1329
+ },
1330
+ {
1331
+ "name": "rig_explore",
1332
+ "description": "Full neighborhoods + source for a question",
1333
+ "tier": "heavy",
1334
+ "stability": "stable",
1335
+ "since": "1.0",
1336
+ "inputSchema": {
1337
+ "type": "object",
1338
+ "properties": {
1339
+ "question": {
1340
+ "type": "string",
1341
+ "minLength": 1,
1342
+ "description": "Free-text question or topic"
1343
+ },
1344
+ "max_anchors": {
1345
+ "type": "integer",
1346
+ "minimum": 1,
1347
+ "maximum": 20,
1348
+ "default": 5
1349
+ }
1350
+ },
1351
+ "required": [
1352
+ "question"
1353
+ ],
1354
+ "additionalProperties": false,
1355
+ "$schema": "http://json-schema.org/draft-07/schema#"
1356
+ },
1357
+ "outputSchema": {
1358
+ "type": "object",
1359
+ "properties": {
1360
+ "anchors": {
1361
+ "type": "array",
1362
+ "items": {
1363
+ "type": "object",
1364
+ "properties": {
1365
+ "id": {
1366
+ "type": "string"
1367
+ },
1368
+ "name": {
1369
+ "type": "string"
1370
+ },
1371
+ "kind": {
1372
+ "type": "string"
1373
+ },
1374
+ "file_path": {
1375
+ "type": "string"
1376
+ },
1377
+ "start_line": {
1378
+ "type": "integer"
1379
+ },
1380
+ "end_line": {
1381
+ "type": "integer"
1382
+ },
1383
+ "source": {
1384
+ "type": "string"
1385
+ },
1386
+ "related": {
1387
+ "type": "array",
1388
+ "items": {
1389
+ "type": "object",
1390
+ "properties": {
1391
+ "id": {
1392
+ "type": "string"
1393
+ },
1394
+ "name": {
1395
+ "type": "string"
1396
+ },
1397
+ "kind": {
1398
+ "type": "string"
1399
+ }
1400
+ },
1401
+ "required": [
1402
+ "id",
1403
+ "name",
1404
+ "kind"
1405
+ ],
1406
+ "additionalProperties": false
1407
+ }
1408
+ }
1409
+ },
1410
+ "required": [
1411
+ "id",
1412
+ "name",
1413
+ "kind",
1414
+ "file_path",
1415
+ "start_line",
1416
+ "end_line",
1417
+ "source",
1418
+ "related"
1419
+ ],
1420
+ "additionalProperties": false
1421
+ }
1422
+ },
1423
+ "elapsed_ms": {
1424
+ "type": "number"
1425
+ }
1426
+ },
1427
+ "required": [
1428
+ "anchors",
1429
+ "elapsed_ms"
1430
+ ],
1431
+ "additionalProperties": false,
1432
+ "$schema": "http://json-schema.org/draft-07/schema#"
1433
+ },
1434
+ "errors": [
1435
+ "NOT_INITIALIZED",
1436
+ "MAIN_SESSION_FORBIDDEN"
1437
+ ]
1438
+ },
1439
+ {
1440
+ "name": "rig_files",
1441
+ "description": "List indexed files",
1442
+ "tier": "light",
1443
+ "stability": "stable",
1444
+ "since": "1.0",
1445
+ "inputSchema": {
1446
+ "type": "object",
1447
+ "properties": {
1448
+ "filter": {
1449
+ "type": "string",
1450
+ "description": "Substring filter on file path"
1451
+ }
1452
+ },
1453
+ "additionalProperties": false,
1454
+ "$schema": "http://json-schema.org/draft-07/schema#"
1455
+ },
1456
+ "outputSchema": {
1457
+ "type": "object",
1458
+ "properties": {
1459
+ "files": {
1460
+ "type": "array",
1461
+ "items": {
1462
+ "type": "object",
1463
+ "properties": {
1464
+ "path": {
1465
+ "type": "string"
1466
+ },
1467
+ "language": {
1468
+ "type": "string"
1469
+ },
1470
+ "node_count": {
1471
+ "type": "integer"
1472
+ },
1473
+ "last_indexed_ts": {
1474
+ "type": "integer"
1475
+ }
1476
+ },
1477
+ "required": [
1478
+ "path",
1479
+ "node_count"
1480
+ ],
1481
+ "additionalProperties": false
1482
+ }
1483
+ },
1484
+ "elapsed_ms": {
1485
+ "type": "number"
1486
+ }
1487
+ },
1488
+ "required": [
1489
+ "files",
1490
+ "elapsed_ms"
1491
+ ],
1492
+ "additionalProperties": false,
1493
+ "$schema": "http://json-schema.org/draft-07/schema#"
1494
+ },
1495
+ "errors": [
1496
+ "NOT_INITIALIZED"
1497
+ ]
1498
+ },
1499
+ {
1500
+ "name": "rig_focus",
1501
+ "description": "Ask the UI to focus on a set of anchors",
1502
+ "tier": "write",
1503
+ "stability": "experimental",
1504
+ "inputSchema": {
1505
+ "type": "object",
1506
+ "properties": {
1507
+ "node_ids": {
1508
+ "type": "array",
1509
+ "items": {
1510
+ "type": "string",
1511
+ "minLength": 1
1512
+ },
1513
+ "minItems": 1,
1514
+ "maxItems": 20
1515
+ }
1516
+ },
1517
+ "required": [
1518
+ "node_ids"
1519
+ ],
1520
+ "additionalProperties": false,
1521
+ "$schema": "http://json-schema.org/draft-07/schema#"
1522
+ },
1523
+ "outputSchema": {
1524
+ "type": "object",
1525
+ "properties": {
1526
+ "ok": {
1527
+ "type": "boolean"
1528
+ },
1529
+ "elapsed_ms": {
1530
+ "type": "number"
1531
+ }
1532
+ },
1533
+ "required": [
1534
+ "ok",
1535
+ "elapsed_ms"
1536
+ ],
1537
+ "additionalProperties": false,
1538
+ "$schema": "http://json-schema.org/draft-07/schema#"
1539
+ },
1540
+ "errors": [
1541
+ "NOT_INITIALIZED",
1542
+ "PROVENANCE_REQUIRED"
1543
+ ]
1544
+ },
1545
+ {
1546
+ "name": "rig_hotspots",
1547
+ "description": "Top nodes by recent activation count",
1548
+ "tier": "light",
1549
+ "stability": "experimental",
1550
+ "inputSchema": {
1551
+ "type": "object",
1552
+ "properties": {
1553
+ "window_ms": {
1554
+ "type": "integer",
1555
+ "exclusiveMinimum": 0,
1556
+ "description": "Lookback window in milliseconds. Default 7 days."
1557
+ },
1558
+ "limit": {
1559
+ "type": "integer",
1560
+ "minimum": 1,
1561
+ "maximum": 100,
1562
+ "default": 20
1563
+ }
1564
+ },
1565
+ "additionalProperties": false,
1566
+ "$schema": "http://json-schema.org/draft-07/schema#"
1567
+ },
1568
+ "outputSchema": {
1569
+ "type": "object",
1570
+ "properties": {
1571
+ "hotspots": {
1572
+ "type": "array",
1573
+ "items": {
1574
+ "type": "object",
1575
+ "properties": {
1576
+ "id": {
1577
+ "type": "string"
1578
+ },
1579
+ "name": {
1580
+ "type": "string"
1581
+ },
1582
+ "kind": {
1583
+ "type": "string"
1584
+ },
1585
+ "touches": {
1586
+ "type": "integer"
1587
+ },
1588
+ "unique_sessions": {
1589
+ "type": "integer"
1590
+ },
1591
+ "last_ts": {
1592
+ "type": "integer"
1593
+ }
1594
+ },
1595
+ "required": [
1596
+ "id",
1597
+ "name",
1598
+ "kind",
1599
+ "touches",
1600
+ "unique_sessions",
1601
+ "last_ts"
1602
+ ],
1603
+ "additionalProperties": false
1604
+ }
1605
+ },
1606
+ "elapsed_ms": {
1607
+ "type": "number"
1608
+ }
1609
+ },
1610
+ "required": [
1611
+ "hotspots",
1612
+ "elapsed_ms"
1613
+ ],
1614
+ "additionalProperties": false,
1615
+ "$schema": "http://json-schema.org/draft-07/schema#"
1616
+ },
1617
+ "errors": [
1618
+ "NOT_INITIALIZED"
1619
+ ]
1620
+ },
1621
+ {
1622
+ "name": "rig_hub_of",
1623
+ "description": "Find the nearest hub(s) for a given anchor",
1624
+ "tier": "light",
1625
+ "stability": "stable",
1626
+ "since": "1.0",
1627
+ "inputSchema": {
1628
+ "type": "object",
1629
+ "properties": {
1630
+ "id": {
1631
+ "type": "string"
1632
+ },
1633
+ "max_depth": {
1634
+ "type": "integer",
1635
+ "minimum": 1,
1636
+ "maximum": 6,
1637
+ "default": 3
1638
+ }
1639
+ },
1640
+ "required": [
1641
+ "id"
1642
+ ],
1643
+ "additionalProperties": false,
1644
+ "$schema": "http://json-schema.org/draft-07/schema#"
1645
+ },
1646
+ "outputSchema": {
1647
+ "type": "object",
1648
+ "properties": {
1649
+ "hubs": {
1650
+ "type": "array",
1651
+ "items": {
1652
+ "type": "object",
1653
+ "properties": {
1654
+ "id": {
1655
+ "type": "string"
1656
+ },
1657
+ "name": {
1658
+ "type": "string"
1659
+ },
1660
+ "kind": {
1661
+ "type": "string"
1662
+ },
1663
+ "hubness": {
1664
+ "type": "number"
1665
+ },
1666
+ "explicit": {
1667
+ "type": "boolean"
1668
+ }
1669
+ },
1670
+ "required": [
1671
+ "id",
1672
+ "name",
1673
+ "kind",
1674
+ "hubness",
1675
+ "explicit"
1676
+ ],
1677
+ "additionalProperties": false
1678
+ }
1679
+ },
1680
+ "elapsed_ms": {
1681
+ "type": "number"
1682
+ }
1683
+ },
1684
+ "required": [
1685
+ "hubs",
1686
+ "elapsed_ms"
1687
+ ],
1688
+ "additionalProperties": false,
1689
+ "$schema": "http://json-schema.org/draft-07/schema#"
1690
+ },
1691
+ "errors": [
1692
+ "NOT_INITIALIZED",
1693
+ "NODE_NOT_FOUND"
1694
+ ]
1695
+ },
1696
+ {
1697
+ "name": "rig_hubs",
1698
+ "description": "List top hubs by hubness score",
1699
+ "tier": "light",
1700
+ "stability": "stable",
1701
+ "since": "1.0",
1702
+ "inputSchema": {
1703
+ "type": "object",
1704
+ "properties": {
1705
+ "scope": {
1706
+ "type": "string",
1707
+ "description": "Filter by anchor kind (e.g. file, module)"
1708
+ },
1709
+ "limit": {
1710
+ "type": "integer",
1711
+ "minimum": 1,
1712
+ "maximum": 100,
1713
+ "default": 20
1714
+ }
1715
+ },
1716
+ "additionalProperties": false,
1717
+ "$schema": "http://json-schema.org/draft-07/schema#"
1718
+ },
1719
+ "outputSchema": {
1720
+ "type": "object",
1721
+ "properties": {
1722
+ "hubs": {
1723
+ "type": "array",
1724
+ "items": {
1725
+ "type": "object",
1726
+ "properties": {
1727
+ "id": {
1728
+ "type": "string"
1729
+ },
1730
+ "name": {
1731
+ "type": "string"
1732
+ },
1733
+ "kind": {
1734
+ "type": "string"
1735
+ },
1736
+ "hubness": {
1737
+ "type": "number"
1738
+ },
1739
+ "explicit": {
1740
+ "type": "boolean"
1741
+ }
1742
+ },
1743
+ "required": [
1744
+ "id",
1745
+ "name",
1746
+ "kind",
1747
+ "hubness",
1748
+ "explicit"
1749
+ ],
1750
+ "additionalProperties": false
1751
+ }
1752
+ },
1753
+ "elapsed_ms": {
1754
+ "type": "number"
1755
+ }
1756
+ },
1757
+ "required": [
1758
+ "hubs",
1759
+ "elapsed_ms"
1760
+ ],
1761
+ "additionalProperties": false,
1762
+ "$schema": "http://json-schema.org/draft-07/schema#"
1763
+ },
1764
+ "errors": [
1765
+ "NOT_INITIALIZED"
1766
+ ]
1767
+ },
1768
+ {
1769
+ "name": "rig_impact",
1770
+ "description": "Transitive impact radius of an anchor",
1771
+ "tier": "light",
1772
+ "stability": "stable",
1773
+ "since": "1.0",
1774
+ "inputSchema": {
1775
+ "type": "object",
1776
+ "properties": {
1777
+ "id": {
1778
+ "type": "string",
1779
+ "description": "Anchor id to compute impact from"
1780
+ },
1781
+ "depth": {
1782
+ "type": "integer",
1783
+ "minimum": 1,
1784
+ "maximum": 6,
1785
+ "default": 3
1786
+ }
1787
+ },
1788
+ "required": [
1789
+ "id"
1790
+ ],
1791
+ "additionalProperties": false,
1792
+ "$schema": "http://json-schema.org/draft-07/schema#"
1793
+ },
1794
+ "outputSchema": {
1795
+ "type": "object",
1796
+ "properties": {
1797
+ "nodes": {
1798
+ "type": "array",
1799
+ "items": {
1800
+ "type": "object",
1801
+ "properties": {
1802
+ "id": {
1803
+ "type": "string"
1804
+ },
1805
+ "name": {
1806
+ "type": "string"
1807
+ },
1808
+ "kind": {
1809
+ "type": "string"
1810
+ },
1811
+ "file_path": {
1812
+ "type": "string"
1813
+ }
1814
+ },
1815
+ "required": [
1816
+ "id",
1817
+ "name",
1818
+ "kind"
1819
+ ],
1820
+ "additionalProperties": false
1821
+ }
1822
+ },
1823
+ "elapsed_ms": {
1824
+ "type": "number"
1825
+ }
1826
+ },
1827
+ "required": [
1828
+ "nodes",
1829
+ "elapsed_ms"
1830
+ ],
1831
+ "additionalProperties": false,
1832
+ "$schema": "http://json-schema.org/draft-07/schema#"
1833
+ },
1834
+ "errors": [
1835
+ "NOT_INITIALIZED",
1836
+ "NODE_NOT_FOUND",
1837
+ "DEPTH_OUT_OF_RANGE"
1838
+ ]
1839
+ },
1840
+ {
1841
+ "name": "rig_neighbors",
1842
+ "description": "List edges touching a node",
1843
+ "tier": "light",
1844
+ "stability": "stable",
1845
+ "since": "1.0",
1846
+ "inputSchema": {
1847
+ "type": "object",
1848
+ "properties": {
1849
+ "id": {
1850
+ "type": "string",
1851
+ "description": "Anchor id"
1852
+ },
1853
+ "kind": {
1854
+ "type": "string",
1855
+ "description": "Filter edges by kind (e.g. calls, imports)"
1856
+ },
1857
+ "limit": {
1858
+ "type": "integer",
1859
+ "minimum": 1,
1860
+ "maximum": 500,
1861
+ "default": 100
1862
+ }
1863
+ },
1864
+ "required": [
1865
+ "id"
1866
+ ],
1867
+ "additionalProperties": false,
1868
+ "$schema": "http://json-schema.org/draft-07/schema#"
1869
+ },
1870
+ "outputSchema": {
1871
+ "type": "object",
1872
+ "properties": {
1873
+ "edges": {
1874
+ "type": "array",
1875
+ "items": {
1876
+ "type": "object",
1877
+ "properties": {
1878
+ "src": {
1879
+ "type": "string"
1880
+ },
1881
+ "dst": {
1882
+ "type": "string"
1883
+ },
1884
+ "kind": {
1885
+ "type": "string"
1886
+ },
1887
+ "weight": {
1888
+ "type": "number"
1889
+ },
1890
+ "table": {
1891
+ "type": "string",
1892
+ "enum": [
1893
+ "structural",
1894
+ "semantic"
1895
+ ]
1896
+ }
1897
+ },
1898
+ "required": [
1899
+ "src",
1900
+ "dst",
1901
+ "kind",
1902
+ "table"
1903
+ ],
1904
+ "additionalProperties": false
1905
+ }
1906
+ },
1907
+ "elapsed_ms": {
1908
+ "type": "number"
1909
+ }
1910
+ },
1911
+ "required": [
1912
+ "edges",
1913
+ "elapsed_ms"
1914
+ ],
1915
+ "additionalProperties": false,
1916
+ "$schema": "http://json-schema.org/draft-07/schema#"
1917
+ },
1918
+ "errors": [
1919
+ "NOT_INITIALIZED",
1920
+ "NODE_NOT_FOUND"
1921
+ ]
1922
+ },
1923
+ {
1924
+ "name": "rig_node",
1925
+ "description": "Fetch anchor metadata by id",
1926
+ "tier": "light",
1927
+ "stability": "stable",
1928
+ "since": "1.0",
1929
+ "inputSchema": {
1930
+ "type": "object",
1931
+ "properties": {
1932
+ "id": {
1933
+ "type": "string",
1934
+ "description": "Anchor id"
1935
+ }
1936
+ },
1937
+ "required": [
1938
+ "id"
1939
+ ],
1940
+ "additionalProperties": false,
1941
+ "$schema": "http://json-schema.org/draft-07/schema#"
1942
+ },
1943
+ "outputSchema": {
1944
+ "type": "object",
1945
+ "properties": {
1946
+ "id": {
1947
+ "type": "string"
1948
+ },
1949
+ "name": {
1950
+ "type": "string"
1951
+ },
1952
+ "kind": {
1953
+ "type": "string"
1954
+ },
1955
+ "file_path": {
1956
+ "type": "string"
1957
+ },
1958
+ "qualified_name": {
1959
+ "type": "string"
1960
+ },
1961
+ "signature": {
1962
+ "type": "string"
1963
+ },
1964
+ "docstring": {
1965
+ "type": "string"
1966
+ },
1967
+ "neighbor_counts": {
1968
+ "type": "object",
1969
+ "additionalProperties": {
1970
+ "type": "integer"
1971
+ }
1972
+ },
1973
+ "elapsed_ms": {
1974
+ "type": "number"
1975
+ }
1976
+ },
1977
+ "required": [
1978
+ "id",
1979
+ "name",
1980
+ "kind",
1981
+ "neighbor_counts",
1982
+ "elapsed_ms"
1983
+ ],
1984
+ "additionalProperties": false,
1985
+ "$schema": "http://json-schema.org/draft-07/schema#"
1986
+ },
1987
+ "errors": [
1988
+ "NOT_INITIALIZED",
1989
+ "NODE_NOT_FOUND"
1990
+ ]
1991
+ },
1992
+ {
1993
+ "name": "rig_phantom_imports",
1994
+ "description": "Bare imports with no matching declared dependency",
1995
+ "tier": "light",
1996
+ "stability": "stable",
1997
+ "since": "1.0",
1998
+ "inputSchema": {
1999
+ "type": "object",
2000
+ "properties": {},
2001
+ "additionalProperties": false,
2002
+ "$schema": "http://json-schema.org/draft-07/schema#"
2003
+ },
2004
+ "outputSchema": {
2005
+ "type": "object",
2006
+ "properties": {
2007
+ "phantoms": {
2008
+ "type": "array",
2009
+ "items": {
2010
+ "type": "object",
2011
+ "properties": {
2012
+ "target_name": {
2013
+ "type": "string"
2014
+ },
2015
+ "occurrences": {
2016
+ "type": "integer"
2017
+ },
2018
+ "sample_file": {
2019
+ "type": "string"
2020
+ },
2021
+ "sample_line": {
2022
+ "type": "integer"
2023
+ }
2024
+ },
2025
+ "required": [
2026
+ "target_name",
2027
+ "occurrences",
2028
+ "sample_file",
2029
+ "sample_line"
2030
+ ],
2031
+ "additionalProperties": false
2032
+ }
2033
+ },
2034
+ "elapsed_ms": {
2035
+ "type": "number"
2036
+ }
2037
+ },
2038
+ "required": [
2039
+ "phantoms",
2040
+ "elapsed_ms"
2041
+ ],
2042
+ "additionalProperties": false,
2043
+ "$schema": "http://json-schema.org/draft-07/schema#"
2044
+ },
2045
+ "errors": [
2046
+ "NOT_INITIALIZED"
2047
+ ]
2048
+ },
2049
+ {
2050
+ "name": "rig_promote",
2051
+ "description": "Explicitly mark a node as a hub",
2052
+ "tier": "write",
2053
+ "stability": "experimental",
2054
+ "inputSchema": {
2055
+ "type": "object",
2056
+ "properties": {
2057
+ "id": {
2058
+ "type": "string"
2059
+ },
2060
+ "rationale": {
2061
+ "type": "string",
2062
+ "minLength": 10
2063
+ }
2064
+ },
2065
+ "required": [
2066
+ "id",
2067
+ "rationale"
2068
+ ],
2069
+ "additionalProperties": false,
2070
+ "$schema": "http://json-schema.org/draft-07/schema#"
2071
+ },
2072
+ "outputSchema": {
2073
+ "type": "object",
2074
+ "properties": {
2075
+ "promoted": {
2076
+ "type": "boolean"
2077
+ },
2078
+ "elapsed_ms": {
2079
+ "type": "number"
2080
+ }
2081
+ },
2082
+ "required": [
2083
+ "promoted",
2084
+ "elapsed_ms"
2085
+ ],
2086
+ "additionalProperties": false,
2087
+ "$schema": "http://json-schema.org/draft-07/schema#"
2088
+ },
2089
+ "errors": [
2090
+ "NOT_INITIALIZED",
2091
+ "NODE_NOT_FOUND",
2092
+ "PROVENANCE_REQUIRED",
2093
+ "RATIONALE_REQUIRED"
2094
+ ]
2095
+ },
2096
+ {
2097
+ "name": "rig_propose_edge",
2098
+ "description": "Propose a semantic edge between two anchors",
2099
+ "tier": "write",
2100
+ "stability": "experimental",
2101
+ "inputSchema": {
2102
+ "type": "object",
2103
+ "properties": {
2104
+ "src": {
2105
+ "type": "string"
2106
+ },
2107
+ "dst": {
2108
+ "type": "string"
2109
+ },
2110
+ "kind": {
2111
+ "type": "string",
2112
+ "default": "related"
2113
+ },
2114
+ "weight": {
2115
+ "type": "number",
2116
+ "minimum": 0,
2117
+ "maximum": 1,
2118
+ "default": 0.5
2119
+ },
2120
+ "rationale": {
2121
+ "type": "string",
2122
+ "minLength": 10
2123
+ },
2124
+ "source_urls": {
2125
+ "type": "array",
2126
+ "items": {
2127
+ "type": "string",
2128
+ "format": "uri"
2129
+ },
2130
+ "maxItems": 10,
2131
+ "default": []
2132
+ }
2133
+ },
2134
+ "required": [
2135
+ "src",
2136
+ "dst",
2137
+ "rationale"
2138
+ ],
2139
+ "additionalProperties": false,
2140
+ "$schema": "http://json-schema.org/draft-07/schema#"
2141
+ },
2142
+ "outputSchema": {
2143
+ "type": "object",
2144
+ "properties": {
2145
+ "pending_id": {
2146
+ "type": "integer"
2147
+ },
2148
+ "elapsed_ms": {
2149
+ "type": "number"
2150
+ }
2151
+ },
2152
+ "required": [
2153
+ "pending_id",
2154
+ "elapsed_ms"
2155
+ ],
2156
+ "additionalProperties": false,
2157
+ "$schema": "http://json-schema.org/draft-07/schema#"
2158
+ },
2159
+ "errors": [
2160
+ "NOT_INITIALIZED",
2161
+ "NODE_NOT_FOUND",
2162
+ "PROVENANCE_REQUIRED",
2163
+ "RATIONALE_REQUIRED"
2164
+ ]
2165
+ },
2166
+ {
2167
+ "name": "rig_pull",
2168
+ "description": "Magnetic-pull ranking around an anchor",
2169
+ "tier": "light",
2170
+ "stability": "stable",
2171
+ "since": "1.0",
2172
+ "inputSchema": {
2173
+ "type": "object",
2174
+ "properties": {
2175
+ "id": {
2176
+ "type": "string",
2177
+ "description": "Anchor id to pull around"
2178
+ },
2179
+ "k": {
2180
+ "type": "integer",
2181
+ "minimum": 1,
2182
+ "maximum": 100,
2183
+ "default": 10
2184
+ },
2185
+ "hub_bias": {
2186
+ "type": "number",
2187
+ "minimum": 0,
2188
+ "maximum": 1,
2189
+ "description": "Additive boost for hub candidates (default 0.3). Pass 0 to disable."
2190
+ }
2191
+ },
2192
+ "required": [
2193
+ "id"
2194
+ ],
2195
+ "additionalProperties": false,
2196
+ "$schema": "http://json-schema.org/draft-07/schema#"
2197
+ },
2198
+ "outputSchema": {
2199
+ "type": "object",
2200
+ "properties": {
2201
+ "results": {
2202
+ "type": "array",
2203
+ "items": {
2204
+ "type": "object",
2205
+ "properties": {
2206
+ "nodeId": {
2207
+ "type": "string"
2208
+ },
2209
+ "score": {
2210
+ "type": "number"
2211
+ },
2212
+ "components": {
2213
+ "type": "object",
2214
+ "properties": {
2215
+ "structural": {
2216
+ "type": "number"
2217
+ },
2218
+ "semantic": {
2219
+ "type": "number"
2220
+ },
2221
+ "recency": {
2222
+ "type": "number"
2223
+ },
2224
+ "hub": {
2225
+ "type": "number"
2226
+ }
2227
+ },
2228
+ "required": [
2229
+ "structural",
2230
+ "semantic",
2231
+ "recency",
2232
+ "hub"
2233
+ ],
2234
+ "additionalProperties": false
2235
+ }
2236
+ },
2237
+ "required": [
2238
+ "nodeId",
2239
+ "score",
2240
+ "components"
2241
+ ],
2242
+ "additionalProperties": false
2243
+ }
2244
+ },
2245
+ "elapsed_ms": {
2246
+ "type": "number"
2247
+ }
2248
+ },
2249
+ "required": [
2250
+ "results",
2251
+ "elapsed_ms"
2252
+ ],
2253
+ "additionalProperties": false,
2254
+ "$schema": "http://json-schema.org/draft-07/schema#"
2255
+ },
2256
+ "errors": [
2257
+ "NOT_INITIALIZED",
2258
+ "NODE_NOT_FOUND"
2259
+ ]
2260
+ },
2261
+ {
2262
+ "name": "rig_relevant_skills",
2263
+ "description": "Top-k AI tools most relevant to a query",
2264
+ "tier": "light",
2265
+ "stability": "experimental",
2266
+ "inputSchema": {
2267
+ "type": "object",
2268
+ "properties": {
2269
+ "query": {
2270
+ "type": "string",
2271
+ "minLength": 1
2272
+ },
2273
+ "k": {
2274
+ "type": "integer",
2275
+ "minimum": 1,
2276
+ "maximum": 20,
2277
+ "default": 5
2278
+ }
2279
+ },
2280
+ "required": [
2281
+ "query"
2282
+ ],
2283
+ "additionalProperties": false,
2284
+ "$schema": "http://json-schema.org/draft-07/schema#"
2285
+ },
2286
+ "outputSchema": {
2287
+ "type": "object",
2288
+ "properties": {
2289
+ "skills": {
2290
+ "type": "array",
2291
+ "items": {
2292
+ "type": "object",
2293
+ "properties": {
2294
+ "id": {
2295
+ "type": "string"
2296
+ },
2297
+ "name": {
2298
+ "type": "string"
2299
+ },
2300
+ "tier": {
2301
+ "type": "string"
2302
+ },
2303
+ "summary": {
2304
+ "type": [
2305
+ "string",
2306
+ "null"
2307
+ ]
2308
+ },
2309
+ "description": {
2310
+ "type": "string"
2311
+ }
2312
+ },
2313
+ "required": [
2314
+ "id",
2315
+ "name",
2316
+ "tier",
2317
+ "summary",
2318
+ "description"
2319
+ ],
2320
+ "additionalProperties": false
2321
+ }
2322
+ },
2323
+ "elapsed_ms": {
2324
+ "type": "number"
2325
+ }
2326
+ },
2327
+ "required": [
2328
+ "skills",
2329
+ "elapsed_ms"
2330
+ ],
2331
+ "additionalProperties": false,
2332
+ "$schema": "http://json-schema.org/draft-07/schema#"
2333
+ },
2334
+ "errors": [
2335
+ "NOT_INITIALIZED"
2336
+ ]
2337
+ },
2338
+ {
2339
+ "name": "rig_search",
2340
+ "description": "FTS5 search over anchor names",
2341
+ "tier": "light",
2342
+ "stability": "stable",
2343
+ "since": "1.0",
2344
+ "inputSchema": {
2345
+ "type": "object",
2346
+ "properties": {
2347
+ "query": {
2348
+ "type": "string",
2349
+ "minLength": 1,
2350
+ "description": "FTS5 query string"
2351
+ },
2352
+ "kind": {
2353
+ "type": "string",
2354
+ "description": "Filter by anchor kind (e.g. function, class)"
2355
+ },
2356
+ "limit": {
2357
+ "type": "integer",
2358
+ "minimum": 1,
2359
+ "maximum": 100,
2360
+ "default": 20
2361
+ }
2362
+ },
2363
+ "required": [
2364
+ "query"
2365
+ ],
2366
+ "additionalProperties": false,
2367
+ "$schema": "http://json-schema.org/draft-07/schema#"
2368
+ },
2369
+ "outputSchema": {
2370
+ "type": "object",
2371
+ "properties": {
2372
+ "nodes": {
2373
+ "type": "array",
2374
+ "items": {
2375
+ "type": "object",
2376
+ "properties": {
2377
+ "id": {
2378
+ "type": "string"
2379
+ },
2380
+ "name": {
2381
+ "type": "string"
2382
+ },
2383
+ "kind": {
2384
+ "type": "string"
2385
+ },
2386
+ "file_path": {
2387
+ "type": "string"
2388
+ }
2389
+ },
2390
+ "required": [
2391
+ "id",
2392
+ "name",
2393
+ "kind"
2394
+ ],
2395
+ "additionalProperties": false
2396
+ }
2397
+ },
2398
+ "elapsed_ms": {
2399
+ "type": "number"
2400
+ }
2401
+ },
2402
+ "required": [
2403
+ "nodes",
2404
+ "elapsed_ms"
2405
+ ],
2406
+ "additionalProperties": false,
2407
+ "$schema": "http://json-schema.org/draft-07/schema#"
2408
+ },
2409
+ "errors": [
2410
+ "NOT_INITIALIZED",
2411
+ "QUERY_INVALID"
2412
+ ]
2413
+ },
2414
+ {
2415
+ "name": "rig_session_token",
2416
+ "description": "Hand the user a one-click login URL for the local map",
2417
+ "tier": "light",
2418
+ "stability": "experimental",
2419
+ "inputSchema": {
2420
+ "type": "object",
2421
+ "properties": {
2422
+ "host": {
2423
+ "type": "string",
2424
+ "default": "127.0.0.1"
2425
+ },
2426
+ "port": {
2427
+ "type": "integer",
2428
+ "minimum": 1,
2429
+ "maximum": 65535,
2430
+ "default": 7474
2431
+ }
2432
+ },
2433
+ "additionalProperties": false,
2434
+ "$schema": "http://json-schema.org/draft-07/schema#"
2435
+ },
2436
+ "outputSchema": {
2437
+ "type": "object",
2438
+ "properties": {
2439
+ "token": {
2440
+ "type": "string"
2441
+ },
2442
+ "login_url": {
2443
+ "type": "string"
2444
+ },
2445
+ "elapsed_ms": {
2446
+ "type": "number"
2447
+ }
2448
+ },
2449
+ "required": [
2450
+ "token",
2451
+ "login_url",
2452
+ "elapsed_ms"
2453
+ ],
2454
+ "additionalProperties": false,
2455
+ "$schema": "http://json-schema.org/draft-07/schema#"
2456
+ },
2457
+ "errors": [
2458
+ "NOT_INITIALIZED",
2459
+ "NO_RUNTIME_TOKEN"
2460
+ ]
2461
+ },
2462
+ {
2463
+ "name": "rig_status",
2464
+ "description": "Report rig index health",
2465
+ "tier": "light",
2466
+ "stability": "stable",
2467
+ "since": "1.0",
2468
+ "inputSchema": {
2469
+ "type": "object",
2470
+ "properties": {},
2471
+ "additionalProperties": false,
2472
+ "$schema": "http://json-schema.org/draft-07/schema#"
2473
+ },
2474
+ "outputSchema": {
2475
+ "type": "object",
2476
+ "properties": {
2477
+ "initialized": {
2478
+ "type": "boolean"
2479
+ },
2480
+ "nodes": {
2481
+ "type": "integer"
2482
+ },
2483
+ "edges_structural": {
2484
+ "type": "integer"
2485
+ },
2486
+ "edges_semantic": {
2487
+ "type": "integer"
2488
+ },
2489
+ "files": {
2490
+ "type": "integer"
2491
+ },
2492
+ "last_sync_ts": {
2493
+ "anyOf": [
2494
+ {
2495
+ "type": "integer"
2496
+ },
2497
+ {
2498
+ "type": "null"
2499
+ }
2500
+ ]
2501
+ },
2502
+ "elapsed_ms": {
2503
+ "type": "number"
2504
+ }
2505
+ },
2506
+ "required": [
2507
+ "initialized",
2508
+ "nodes",
2509
+ "edges_structural",
2510
+ "edges_semantic",
2511
+ "files",
2512
+ "last_sync_ts",
2513
+ "elapsed_ms"
2514
+ ],
2515
+ "additionalProperties": false,
2516
+ "$schema": "http://json-schema.org/draft-07/schema#"
2517
+ },
2518
+ "errors": [
2519
+ "NOT_INITIALIZED"
2520
+ ]
2521
+ },
2522
+ {
2523
+ "name": "rig_subscribe",
2524
+ "description": "Pull mutation events since a cursor",
2525
+ "tier": "live",
2526
+ "stability": "experimental",
2527
+ "inputSchema": {
2528
+ "type": "object",
2529
+ "properties": {
2530
+ "since_ts": {
2531
+ "type": "integer",
2532
+ "default": 0
2533
+ },
2534
+ "session_id": {
2535
+ "type": "string"
2536
+ }
2537
+ },
2538
+ "additionalProperties": false,
2539
+ "$schema": "http://json-schema.org/draft-07/schema#"
2540
+ },
2541
+ "outputSchema": {
2542
+ "type": "object",
2543
+ "properties": {
2544
+ "events": {
2545
+ "type": "array",
2546
+ "items": {
2547
+ "type": "object",
2548
+ "properties": {
2549
+ "id": {
2550
+ "type": "integer"
2551
+ },
2552
+ "ts": {
2553
+ "type": "integer"
2554
+ },
2555
+ "session_id": {
2556
+ "type": "string"
2557
+ },
2558
+ "kind": {
2559
+ "type": "string"
2560
+ },
2561
+ "payload": {},
2562
+ "actor": {
2563
+ "type": "string"
2564
+ }
2565
+ },
2566
+ "required": [
2567
+ "id",
2568
+ "ts",
2569
+ "session_id",
2570
+ "kind",
2571
+ "actor"
2572
+ ],
2573
+ "additionalProperties": false
2574
+ }
2575
+ },
2576
+ "next_cursor": {
2577
+ "type": "integer"
2578
+ },
2579
+ "elapsed_ms": {
2580
+ "type": "number"
2581
+ }
2582
+ },
2583
+ "required": [
2584
+ "events",
2585
+ "next_cursor",
2586
+ "elapsed_ms"
2587
+ ],
2588
+ "additionalProperties": false,
2589
+ "$schema": "http://json-schema.org/draft-07/schema#"
2590
+ },
2591
+ "errors": [
2592
+ "NOT_INITIALIZED"
2593
+ ]
2594
+ },
2595
+ {
2596
+ "name": "rig_undo",
2597
+ "description": "Reverse the last mutation in this session",
2598
+ "tier": "write",
2599
+ "stability": "experimental",
2600
+ "inputSchema": {
2601
+ "type": "object",
2602
+ "properties": {},
2603
+ "additionalProperties": false,
2604
+ "$schema": "http://json-schema.org/draft-07/schema#"
2605
+ },
2606
+ "outputSchema": {
2607
+ "type": "object",
2608
+ "properties": {
2609
+ "undone": {
2610
+ "anyOf": [
2611
+ {
2612
+ "type": "object",
2613
+ "properties": {
2614
+ "id": {
2615
+ "type": "integer"
2616
+ },
2617
+ "kind": {
2618
+ "type": "string"
2619
+ },
2620
+ "ts": {
2621
+ "type": "integer"
2622
+ }
2623
+ },
2624
+ "required": [
2625
+ "id",
2626
+ "kind",
2627
+ "ts"
2628
+ ],
2629
+ "additionalProperties": false
2630
+ },
2631
+ {
2632
+ "type": "null"
2633
+ }
2634
+ ]
2635
+ },
2636
+ "elapsed_ms": {
2637
+ "type": "number"
2638
+ }
2639
+ },
2640
+ "required": [
2641
+ "undone",
2642
+ "elapsed_ms"
2643
+ ],
2644
+ "additionalProperties": false,
2645
+ "$schema": "http://json-schema.org/draft-07/schema#"
2646
+ },
2647
+ "errors": [
2648
+ "NOT_INITIALIZED",
2649
+ "PROVENANCE_REQUIRED"
2650
+ ]
2651
+ },
2652
+ {
2653
+ "name": "rig_unused_deps",
2654
+ "description": "Declared dependencies with no matching imports in source",
2655
+ "tier": "light",
2656
+ "stability": "stable",
2657
+ "since": "1.0",
2658
+ "inputSchema": {
2659
+ "type": "object",
2660
+ "properties": {},
2661
+ "additionalProperties": false,
2662
+ "$schema": "http://json-schema.org/draft-07/schema#"
2663
+ },
2664
+ "outputSchema": {
2665
+ "type": "object",
2666
+ "properties": {
2667
+ "unused": {
2668
+ "type": "array",
2669
+ "items": {
2670
+ "type": "object",
2671
+ "properties": {
2672
+ "id": {
2673
+ "type": "string"
2674
+ },
2675
+ "name": {
2676
+ "type": "string"
2677
+ },
2678
+ "spec": {
2679
+ "type": "string"
2680
+ },
2681
+ "source": {
2682
+ "type": "string"
2683
+ },
2684
+ "manifest_path": {
2685
+ "type": "string"
2686
+ },
2687
+ "is_dev": {
2688
+ "type": "boolean"
2689
+ }
2690
+ },
2691
+ "required": [
2692
+ "id",
2693
+ "name",
2694
+ "spec",
2695
+ "source",
2696
+ "manifest_path",
2697
+ "is_dev"
2698
+ ],
2699
+ "additionalProperties": false
2700
+ }
2701
+ },
2702
+ "elapsed_ms": {
2703
+ "type": "number"
2704
+ }
2705
+ },
2706
+ "required": [
2707
+ "unused",
2708
+ "elapsed_ms"
2709
+ ],
2710
+ "additionalProperties": false,
2711
+ "$schema": "http://json-schema.org/draft-07/schema#"
2712
+ },
2713
+ "errors": [
2714
+ "NOT_INITIALIZED"
2715
+ ]
2716
+ },
2717
+ {
2718
+ "name": "rig_waypoints",
2719
+ "description": "List conversation waypoints by session or kind",
2720
+ "tier": "light",
2721
+ "stability": "experimental",
2722
+ "inputSchema": {
2723
+ "type": "object",
2724
+ "properties": {
2725
+ "session_id": {
2726
+ "type": "string"
2727
+ },
2728
+ "kind": {
2729
+ "type": "string",
2730
+ "enum": [
2731
+ "decision",
2732
+ "observation",
2733
+ "constraint",
2734
+ "open-question",
2735
+ "principle"
2736
+ ]
2737
+ },
2738
+ "limit": {
2739
+ "type": "integer",
2740
+ "minimum": 1,
2741
+ "maximum": 200,
2742
+ "default": 50
2743
+ }
2744
+ },
2745
+ "additionalProperties": false,
2746
+ "$schema": "http://json-schema.org/draft-07/schema#"
2747
+ },
2748
+ "outputSchema": {
2749
+ "type": "object",
2750
+ "properties": {
2751
+ "waypoints": {
2752
+ "type": "array",
2753
+ "items": {
2754
+ "type": "object",
2755
+ "properties": {
2756
+ "id": {
2757
+ "type": "string"
2758
+ },
2759
+ "ts": {
2760
+ "type": "integer"
2761
+ },
2762
+ "session_id": {
2763
+ "type": "string"
2764
+ },
2765
+ "kind": {
2766
+ "type": "string",
2767
+ "enum": [
2768
+ "decision",
2769
+ "observation",
2770
+ "constraint",
2771
+ "open-question",
2772
+ "principle"
2773
+ ]
2774
+ },
2775
+ "title": {
2776
+ "type": "string"
2777
+ },
2778
+ "summary": {
2779
+ "type": "string"
2780
+ },
2781
+ "analogy": {
2782
+ "type": [
2783
+ "string",
2784
+ "null"
2785
+ ]
2786
+ },
2787
+ "constellation_refs": {
2788
+ "type": "array",
2789
+ "items": {
2790
+ "type": "string"
2791
+ }
2792
+ },
2793
+ "predecessors": {
2794
+ "type": "array",
2795
+ "items": {
2796
+ "type": "string"
2797
+ }
2798
+ },
2799
+ "key_terms": {
2800
+ "type": "array",
2801
+ "items": {
2802
+ "type": "string"
2803
+ }
2804
+ },
2805
+ "compactable": {
2806
+ "type": "boolean"
2807
+ },
2808
+ "payloads": {
2809
+ "type": "array",
2810
+ "items": {
2811
+ "anyOf": [
2812
+ {
2813
+ "type": "object",
2814
+ "properties": {
2815
+ "type": {
2816
+ "type": "string",
2817
+ "const": "text-summary"
2818
+ },
2819
+ "content": {
2820
+ "type": "string"
2821
+ }
2822
+ },
2823
+ "required": [
2824
+ "type",
2825
+ "content"
2826
+ ],
2827
+ "additionalProperties": false
2828
+ },
2829
+ {
2830
+ "type": "object",
2831
+ "properties": {
2832
+ "type": {
2833
+ "type": "string",
2834
+ "const": "mermaid-diagram"
2835
+ },
2836
+ "content": {
2837
+ "type": "string"
2838
+ }
2839
+ },
2840
+ "required": [
2841
+ "type",
2842
+ "content"
2843
+ ],
2844
+ "additionalProperties": false
2845
+ },
2846
+ {
2847
+ "type": "object",
2848
+ "properties": {
2849
+ "type": {
2850
+ "type": "string",
2851
+ "const": "code-snippet"
2852
+ },
2853
+ "lang": {
2854
+ "type": "string"
2855
+ },
2856
+ "content": {
2857
+ "type": "string"
2858
+ }
2859
+ },
2860
+ "required": [
2861
+ "type",
2862
+ "lang",
2863
+ "content"
2864
+ ],
2865
+ "additionalProperties": false
2866
+ },
2867
+ {
2868
+ "type": "object",
2869
+ "properties": {
2870
+ "type": {
2871
+ "type": "string",
2872
+ "const": "doc-fragment"
2873
+ },
2874
+ "content": {
2875
+ "type": "string"
2876
+ }
2877
+ },
2878
+ "required": [
2879
+ "type",
2880
+ "content"
2881
+ ],
2882
+ "additionalProperties": false
2883
+ },
2884
+ {
2885
+ "type": "object",
2886
+ "properties": {
2887
+ "type": {
2888
+ "type": "string",
2889
+ "const": "image-ref"
2890
+ },
2891
+ "path": {
2892
+ "type": "string"
2893
+ },
2894
+ "alt": {
2895
+ "type": "string"
2896
+ }
2897
+ },
2898
+ "required": [
2899
+ "type",
2900
+ "path"
2901
+ ],
2902
+ "additionalProperties": false
2903
+ },
2904
+ {
2905
+ "type": "object",
2906
+ "properties": {
2907
+ "type": {
2908
+ "type": "string",
2909
+ "const": "dataset-pointer"
2910
+ },
2911
+ "query": {
2912
+ "type": "string"
2913
+ }
2914
+ },
2915
+ "required": [
2916
+ "type",
2917
+ "query"
2918
+ ],
2919
+ "additionalProperties": false
2920
+ }
2921
+ ]
2922
+ }
2923
+ }
2924
+ },
2925
+ "required": [
2926
+ "id",
2927
+ "ts",
2928
+ "session_id",
2929
+ "kind",
2930
+ "title",
2931
+ "summary",
2932
+ "analogy",
2933
+ "constellation_refs",
2934
+ "predecessors",
2935
+ "key_terms",
2936
+ "compactable",
2937
+ "payloads"
2938
+ ],
2939
+ "additionalProperties": false
2940
+ }
2941
+ },
2942
+ "elapsed_ms": {
2943
+ "type": "number"
2944
+ }
2945
+ },
2946
+ "required": [
2947
+ "waypoints",
2948
+ "elapsed_ms"
2949
+ ],
2950
+ "additionalProperties": false,
2951
+ "$schema": "http://json-schema.org/draft-07/schema#"
2952
+ },
2953
+ "errors": [
2954
+ "NOT_INITIALIZED"
2955
+ ]
2956
+ }
2957
+ ]
2958
+ }