@wowok/agent-mcp 2.5.4 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +33 -26
  2. package/dist/config/runtime.js +3 -6
  3. package/dist/harness/checkpoint.js +2 -2
  4. package/dist/knowledge/flywheel-loop.js +2 -5
  5. package/dist/knowledge/overrides-loader.js +2 -4
  6. package/dist/knowledge/progress-ledger.js +3 -0
  7. package/dist/knowledge/progress-translation.js +5 -1
  8. package/dist/knowledge/reward-confirm.d.ts +3 -0
  9. package/dist/knowledge/reward-confirm.js +30 -0
  10. package/dist/knowledge/reward-puzzle.d.ts +1 -0
  11. package/dist/knowledge/reward-puzzle.js +12 -0
  12. package/dist/knowledge/reward-risk.d.ts +4 -1
  13. package/dist/knowledge/reward-risk.js +85 -3
  14. package/dist/knowledge/tools-reference.js +5 -4
  15. package/dist/loop-engineering/improve.js +2 -4
  16. package/dist/project/deployment-bridge.d.ts +5 -0
  17. package/dist/project/deployment-bridge.js +96 -0
  18. package/dist/project/evaluation.d.ts +53 -0
  19. package/dist/project/evaluation.js +860 -0
  20. package/dist/project/graph-builder.d.ts +43 -0
  21. package/dist/project/graph-builder.js +585 -0
  22. package/dist/project/handlers.d.ts +154 -0
  23. package/dist/project/handlers.js +567 -0
  24. package/dist/project/index.d.ts +1 -0
  25. package/dist/project/index.js +26 -7
  26. package/dist/project/project-store.js +2 -5
  27. package/dist/project/query.d.ts +1 -0
  28. package/dist/project/query.js +2 -0
  29. package/dist/project/semantic-assembler.d.ts +93 -0
  30. package/dist/project/semantic-assembler.js +345 -0
  31. package/dist/schema/call/base.js +1 -1
  32. package/dist/schema/config/index.d.ts +12 -12
  33. package/dist/schema/local/index.d.ts +108 -108
  34. package/dist/schema/local/index.js +21 -18
  35. package/dist/schema/messenger/index.d.ts +16 -16
  36. package/dist/schema/messenger/index.js +2 -2
  37. package/dist/schema/operations.d.ts +0 -6
  38. package/dist/schema/project/index.d.ts +1840 -3903
  39. package/dist/schema/project/index.js +403 -955
  40. package/dist/schema/query/index.d.ts +10 -5
  41. package/dist/schema/trust/index.d.ts +6 -6
  42. package/dist/schemas/account_operation.output.json +7 -21
  43. package/dist/schemas/account_operation.schema.json +9 -23
  44. package/dist/schemas/bridge_operation.schema.json +1 -1
  45. package/dist/schemas/guard2file.schema.json +1 -1
  46. package/dist/schemas/index.json +2 -2
  47. package/dist/schemas/machineNode2file.schema.json +1 -1
  48. package/dist/schemas/messenger_operation.schema.json +6 -6
  49. package/dist/schemas/onchain_operations.schema.json +5 -5
  50. package/dist/schemas/onchain_operations_allocation.schema.json +1 -1
  51. package/dist/schemas/onchain_operations_arbitration.schema.json +1 -1
  52. package/dist/schemas/onchain_operations_contact.schema.json +1 -1
  53. package/dist/schemas/onchain_operations_demand.schema.json +1 -1
  54. package/dist/schemas/onchain_operations_gen_passport.schema.json +2 -2
  55. package/dist/schemas/onchain_operations_gen_proof.schema.json +2 -2
  56. package/dist/schemas/onchain_operations_guard.schema.json +1 -1
  57. package/dist/schemas/onchain_operations_machine.schema.json +1 -1
  58. package/dist/schemas/onchain_operations_order.schema.json +1 -1
  59. package/dist/schemas/onchain_operations_payment.schema.json +1 -1
  60. package/dist/schemas/onchain_operations_permission.schema.json +1 -1
  61. package/dist/schemas/onchain_operations_personal.schema.json +1 -1
  62. package/dist/schemas/onchain_operations_progress.schema.json +1 -1
  63. package/dist/schemas/onchain_operations_proof.schema.json +1 -1
  64. package/dist/schemas/onchain_operations_repository.schema.json +1 -1
  65. package/dist/schemas/onchain_operations_reward.schema.json +1 -1
  66. package/dist/schemas/onchain_operations_service.schema.json +1 -1
  67. package/dist/schemas/onchain_operations_treasury.schema.json +1 -1
  68. package/dist/schemas/project_operation.output.json +1178 -2494
  69. package/dist/schemas/project_operation.schema.json +216 -530
  70. package/dist/schemas/query_toolkit.output.json +7 -6
  71. package/dist/schemas/query_toolkit.schema.json +0 -4
  72. package/dist/telemetry/storage.js +2 -2
  73. package/dist/tools/handlers/onchain.js +110 -19
  74. package/dist/tools/handlers/project.js +56 -1046
  75. package/dist/tools/index.js +85 -56
  76. package/package.json +2 -2
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://wowok.net/schemas/project_operation.json",
4
- "title": "Project - Namespace & Object Graph",
5
- "description": "Manage and query the local object dependency graph (DAG) built on top of local_mark tags. Actions: list_projects, list_objects, shareable, dependencies, referenced_by, pre_publish_check, cross_project_refs, graph_stats, save_graph, load_graph.",
4
+ "title": "Project - Entity Management & Evaluation",
5
+ "description": "Project management service — manage projects as first-class entities with SQLite persistence, rigid project-object relationships, three-pathway graph construction, and a dual rule-based + LLM-assisted evaluation engine. Actions: list_projects, create_project, create_project_from_onchain, update_project, get_project_detail, add_object, remove_object, create_version, build_graph, get_graph, evaluate_project, save_evaluation, compare_projects, refresh_objects, get_object_diff, assemble_context.",
6
6
  "$ref": "#/definitions/project_operation",
7
7
  "definitions": {
8
8
  "project_operation": {
@@ -12,68 +12,94 @@
12
12
  "type": "string",
13
13
  "enum": [
14
14
  "list_projects",
15
- "list_objects",
16
- "shareable",
17
- "dependencies",
18
- "referenced_by",
19
- "pre_publish_check",
20
- "cross_project_refs",
21
- "graph_stats",
22
- "save_graph",
23
- "load_graph",
24
- "analyze_intent",
25
- "aggregate_risks",
26
- "generate_deployment_doc",
27
- "trace_substeps",
28
- "get_project_status",
29
- "load_project",
30
- "fork_project",
31
- "export_project",
32
- "get_project_files",
33
- "validate_stage_unit",
34
- "get_stage_assessment",
35
- "get_stage_risk_policy",
36
- "get_doc_relations",
37
- "update_deployment_doc",
38
- "validate_validation_chain",
39
- "apply_improvement",
40
- "get_improvement_queue",
41
- "get_flywheel_config",
42
- "rollback_stage",
43
- "get_reversibility",
44
- "assemble_context"
15
+ "create_project",
16
+ "create_project_from_onchain",
17
+ "update_project",
18
+ "get_project_detail",
19
+ "add_object",
20
+ "remove_object",
21
+ "update_object",
22
+ "create_version",
23
+ "build_graph",
24
+ "get_graph",
25
+ "evaluate_project",
26
+ "save_evaluation",
27
+ "compare_projects",
28
+ "refresh_objects",
29
+ "get_object_diff",
30
+ "delete_project",
31
+ "assemble_context",
32
+ "generate_deployment_doc"
45
33
  ],
46
- "description": "Action to perform. Six categories:\n1. Graph Query (10): list_projects, list_objects, shareable, dependencies, referenced_by, pre_publish_check, cross_project_refs, graph_stats, save_graph, load_graph.\n2. Project-Based Deployment 5-Stage (4): Call IN ORDER — analyze_intent (Stage 2) → aggregate_risks (Stage 3) → generate_deployment_doc (Stage 4) → trace_substeps (Stage 5). Each action's output includes `next_action` telling you which action to call next. Stage 1 (Project Naming) uses the `project` + `version` params.\n3. Project Memory Layer (5): load_project, fork_project, export_project, get_project_files, get_project_status.\n4. Nested-Autonomy Stage Unit (6): validate_stage_unit, get_stage_assessment, get_stage_risk_policy, get_doc_relations, update_deployment_doc, validate_validation_chain.\n5. Distillation Reflow (3): apply_improvement (review + apply a proposal — config_override writes overrides/, source_patch writes patches/), get_improvement_queue (list pending/approved proposals), get_flywheel_config (query reflow loop status).\n6. Rollback & Reversibility (2): rollback_stage (evaluate + execute stage rollback with file cleanup — blocked if has_published_object), get_reversibility (query object lifecycle reversibility matrix for risk reminders).\n7. Context Assembly (1): assemble_context (query on-chain object states + extract embedded history + optional events, and assemble a structured semantic context for LLM consumption — bridges raw facts to business-understandable context). Required input: context_objects (array of object IDs/names). Optional: include_events (query recent state-transition events)."
34
+ "description": "Action to perform. Two categories:\n1. Project Entity + Evaluation (15, GLM6): list_projects, create_project, create_project_from_onchain, update_project, get_project_detail, add_object, remove_object, create_version, build_graph, get_graph, evaluate_project, save_evaluation, compare_projects, refresh_objects, get_object_diff. Projects are first-class entities with SQLite persistence, rigid project-object relationships, three-pathway graph construction, and a dual rule-based + LLM-assisted evaluation engine.\n2. Context Assembly (1): assemble_context (query on-chain object states + extract embedded history + optional events, and assemble a structured semantic context for LLM consumption). Required input: context_objects (array of object IDs/names). Optional: include_events (query recent state-transition events)."
47
35
  },
48
36
  "project": {
49
37
  "type": "string",
50
- "description": "Project prefix (for list_objects and C1-C4 actions)"
38
+ "description": "Project prefix (human-readable unique identifier). Used by create_version, build_graph, evaluate_project, etc. Takes precedence resolution: project_id > project (prefix)."
51
39
  },
52
40
  "version": {
53
41
  "type": "string",
54
42
  "pattern": "^v\\d+$",
55
- "description": "Project version (e.g. 'v1'). Required for C1-C4 actions."
43
+ "description": "Project version (e.g. 'v1'). Used by create_version."
56
44
  },
57
- "object": {
45
+ "context_objects": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "string"
49
+ },
50
+ "description": "Object IDs (0x...) or LocalMark names to assemble context for. Required when action='assemble_context'. The current on-chain state of each object will be queried and enriched with semantic annotations."
51
+ },
52
+ "include_events": {
53
+ "type": "boolean",
54
+ "description": "When true, assemble_context also queries recent state-transition events (NewOrderEvent, ProgressEvent, ArbEvent, etc.). Events are the real-time transition log — convergent and bounded. Defaults to false. Note: object-embedded history (ProgressSession.forwards, Order.disputes) is ALWAYS extracted automatically — no flag needed."
55
+ },
56
+ "context_network": {
57
+ "type": "string",
58
+ "enum": [
59
+ "testnet",
60
+ "mainnet"
61
+ ],
62
+ "description": "Network for assemble_context queries. Defaults to 'testnet' if omitted."
63
+ },
64
+ "filter_status": {
58
65
  "type": "string",
59
- "description": "Object name or address (for dependencies / referenced_by / pre_publish_check)"
66
+ "enum": [
67
+ "draft",
68
+ "active",
69
+ "inactive",
70
+ "archived"
71
+ ],
72
+ "description": "Filter list_projects by project status."
60
73
  },
61
- "fork_to_version": {
74
+ "filter_perspective": {
62
75
  "type": "string",
63
- "pattern": "^v\\d+$",
64
- "description": "Target version for fork_project (e.g. 'v2'). Must differ from source 'version'."
76
+ "enum": [
77
+ "producer",
78
+ "consumer",
79
+ "both"
80
+ ],
81
+ "description": "Filter list_projects by project perspective."
65
82
  },
66
- "fork_to_prefix": {
83
+ "filter_network": {
67
84
  "type": "string",
68
- "description": "Target prefix for fork_project. Defaults to source 'project' prefix when omitted."
85
+ "enum": [
86
+ "testnet",
87
+ "mainnet"
88
+ ],
89
+ "description": "Filter list_projects by network."
69
90
  },
70
- "user_intent": {
91
+ "project_name": {
71
92
  "type": "string",
72
93
  "minLength": 1,
94
+ "maxLength": 200,
95
+ "description": "Display name for create_project / create_project_from_onchain / update_project. Required when action='create_project'."
96
+ },
97
+ "project_description": {
98
+ "type": "string",
73
99
  "maxLength": 2000,
74
- "description": "Natural-language business intent for analyze_intent (stage 2). Required when action='analyze_intent'."
100
+ "description": "Project description for create_project / update_project."
75
101
  },
76
- "industry": {
102
+ "project_industry": {
77
103
  "type": "string",
78
104
  "enum": [
79
105
  "general",
@@ -86,553 +112,213 @@
86
112
  "subscription",
87
113
  "custom"
88
114
  ],
89
- "description": "Industry hint — drives template defaults. Used by analyze_intent and aggregate_risks."
115
+ "description": "Industry tag for create_project. Drives template defaults."
90
116
  },
91
- "target_objects": {
92
- "type": "array",
93
- "items": {
94
- "type": "string"
95
- },
96
- "description": "Optional explicit target objects (entry_ids or object_type names) for analyze_intent."
97
- },
98
- "puzzles": {
99
- "type": "object",
100
- "additionalProperties": {
101
- "type": "object",
102
- "properties": {
103
- "puzzle": {
104
- "type": "object",
105
- "additionalProperties": {},
106
- "description": "Per-object puzzle snapshot. Shape varies per object_type — see knowledge/<obj>-puzzle.ts."
107
- },
108
- "completeness": {
109
- "type": "object",
110
- "additionalProperties": {},
111
- "description": "Completeness assessment from checkPuzzleCompleteness(). Shape varies per object."
112
- },
113
- "missing_dimensions": {
114
- "type": "array",
115
- "items": {
116
- "type": "string"
117
- },
118
- "description": "Dimensions still missing for this object (e.g. ['A','B'])."
119
- }
120
- },
121
- "required": [
122
- "puzzle",
123
- "completeness",
124
- "missing_dimensions"
125
- ],
126
- "additionalProperties": false
127
- },
128
- "description": "Per-object puzzle snapshots keyed by object_type. Required for aggregate_risks and generate_deployment_doc."
129
- },
130
- "severity_threshold": {
117
+ "project_perspective": {
131
118
  "type": "string",
132
119
  "enum": [
133
- "CRITICAL",
134
- "HIGH",
135
- "MEDIUM",
136
- "LOW",
137
- "INFO"
120
+ "producer",
121
+ "consumer",
122
+ "both"
138
123
  ],
139
- "description": "Severity threshold for aggregate_risks. Risks at or above this level are flagged."
124
+ "description": "Project perspective for create_project. 'producer' = build/operate services, 'consumer' = evaluate/buy services, 'both' = dual role. Defaults to 'producer'."
140
125
  },
141
- "user_confirmed_high_risks": {
126
+ "project_labels": {
142
127
  "type": "array",
143
128
  "items": {
144
129
  "type": "string"
145
130
  },
146
- "description": "IDs of HIGH risks the user has already confirmed (suppressed in subsequent aggregate_risks)."
131
+ "description": "Free-form labels for create_project / update_project (e.g. ['travel','london','priority'])."
147
132
  },
148
- "business_intent": {
133
+ "service_address": {
149
134
  "type": "string",
150
- "minLength": 1,
151
- "maxLength": 500,
152
- "description": "One-line business intent description for the deployment doc. Required when action='generate_deployment_doc'."
135
+ "description": "On-chain Service object address. Required for create_project_from_onchain. Optional for create_project (links the project to its core Service)."
153
136
  },
154
- "author": {
137
+ "project_network": {
155
138
  "type": "string",
156
- "description": "Optional author name for the deployment doc meta section."
157
- },
158
- "objects": {
159
- "type": "array",
160
- "items": {
161
- "type": "object",
162
- "properties": {
163
- "entry_id": {
164
- "type": "string",
165
- "description": "Stable id '<object_type>:<name>'"
166
- },
167
- "object_type": {
168
- "type": "string",
169
- "enum": [
170
- "service",
171
- "machine",
172
- "guard",
173
- "permission",
174
- "reward",
175
- "arb",
176
- "progress",
177
- "treasury",
178
- "demand",
179
- "repository",
180
- "contact",
181
- "order",
182
- "allocation",
183
- "personal",
184
- "payment",
185
- "proof"
186
- ]
187
- },
188
- "name": {
189
- "type": "string"
190
- },
191
- "reused_from": {
192
- "type": "string",
193
- "description": "Existing on-chain address or local name if reused"
194
- },
195
- "publish_required": {
196
- "type": "boolean",
197
- "description": "Whether publish is required (only Service/Machine)"
198
- },
199
- "description": {
200
- "type": "string"
201
- }
202
- },
203
- "required": [
204
- "entry_id",
205
- "object_type",
206
- "name",
207
- "publish_required"
208
- ],
209
- "additionalProperties": false
210
- },
211
- "description": "Deployment objects for generate_deployment_doc."
212
- },
213
- "edges": {
214
- "type": "array",
215
- "items": {
216
- "type": "object",
217
- "properties": {
218
- "from": {
219
- "type": "string"
220
- },
221
- "to": {
222
- "type": "string"
223
- },
224
- "edge_kind": {
225
- "type": "string",
226
- "enum": [
227
- "machine",
228
- "order_allocators",
229
- "arbitrations",
230
- "compensation_fund",
231
- "rewards",
232
- "buy_guard",
233
- "permission",
234
- "guard",
235
- "prev",
236
- "next",
237
- "forward",
238
- "parent",
239
- "service",
240
- "progress",
241
- "arbitration",
242
- "sub_order",
243
- "references"
244
- ]
245
- },
246
- "field_path": {
247
- "type": "string"
248
- },
249
- "required_at_publish": {
250
- "type": "boolean"
251
- }
252
- },
253
- "required": [
254
- "from",
255
- "to",
256
- "edge_kind",
257
- "field_path",
258
- "required_at_publish"
259
- ],
260
- "additionalProperties": false
261
- },
262
- "description": "Dependency graph edges for generate_deployment_doc."
263
- },
264
- "steps": {
265
- "type": "array",
266
- "items": {
267
- "type": "object",
268
- "properties": {
269
- "step": {
270
- "type": "integer",
271
- "exclusiveMinimum": 0
272
- },
273
- "object_type": {
274
- "$ref": "#/definitions/project_operation/properties/objects/items/properties/object_type"
275
- },
276
- "operation": {
277
- "type": "string"
278
- },
279
- "substep_count": {
280
- "type": "integer",
281
- "minimum": 0
282
- },
283
- "depends_on": {
284
- "type": "array",
285
- "items": {
286
- "type": "integer"
287
- }
288
- },
289
- "entry_id": {
290
- "type": "string"
291
- },
292
- "network_phase": {
293
- "type": "string",
294
- "enum": [
295
- "testnet",
296
- "mainnet",
297
- "both"
298
- ]
299
- }
300
- },
301
- "required": [
302
- "step",
303
- "object_type",
304
- "operation",
305
- "substep_count",
306
- "depends_on",
307
- "entry_id",
308
- "network_phase"
309
- ],
310
- "additionalProperties": false
311
- },
312
- "description": "Topological execution plan for generate_deployment_doc."
139
+ "enum": [
140
+ "testnet",
141
+ "mainnet"
142
+ ],
143
+ "description": "Network the project is bound to. A Service deployed to different networks are different projects. Defaults to 'testnet'."
313
144
  },
314
- "scenarios": {
315
- "type": "array",
316
- "items": {
317
- "type": "object",
318
- "properties": {
319
- "scenario_id": {
320
- "type": "string"
321
- },
322
- "description": {
323
- "type": "string"
324
- },
325
- "primary_object": {
326
- "type": "string"
327
- },
328
- "supporting_objects": {
329
- "type": "array",
330
- "items": {
331
- "type": "string"
332
- }
333
- },
334
- "test_step_refs": {
335
- "type": "array",
336
- "items": {
337
- "type": "string"
338
- }
339
- }
340
- },
341
- "required": [
342
- "scenario_id",
343
- "description",
344
- "primary_object",
345
- "supporting_objects"
346
- ],
347
- "additionalProperties": false
348
- },
349
- "description": "Business scenarios for generate_deployment_doc §7."
145
+ "project_id": {
146
+ "type": "string",
147
+ "description": "Project UUID for update_project / get_project_detail / add_object / remove_object / create_version / build_graph / evaluate_project / refresh_objects. Takes precedence over 'project' (prefix) when both are given."
350
148
  },
351
- "risk_status": {
149
+ "project_status": {
352
150
  "type": "string",
353
151
  "enum": [
354
- "RISK_PASSED",
355
- "RISK_BLOCKED",
356
- "RISK_PENDING_CONFIRM",
357
- "RISK_CANCELLED"
152
+ "draft",
153
+ "active",
154
+ "inactive",
155
+ "archived"
358
156
  ],
359
- "description": "Risk status from aggregate_risks (for D-16 check)."
157
+ "description": "New status for update_project. 'active' projects are live, 'archived' are read-only."
360
158
  },
361
- "risk_critical_count": {
362
- "type": "integer",
363
- "minimum": 0,
364
- "description": "CRITICAL risk count from aggregate_risks."
365
- },
366
- "risk_high_count": {
367
- "type": "integer",
368
- "minimum": 0,
369
- "description": "HIGH risk count from aggregate_risks."
159
+ "object_address": {
160
+ "type": "string",
161
+ "description": "On-chain object address (0x...) for add_object / remove_object. For add_object, alternatively use object_name to resolve via LocalMark."
370
162
  },
371
- "run_scanner": {
372
- "type": "boolean",
373
- "description": "Whether to run deployment-scanner validation after generating the doc. Defaults to true."
163
+ "object_name_add": {
164
+ "type": "string",
165
+ "description": "LocalMark name for add_object (alternative to object_address)."
374
166
  },
375
- "gas_budget": {
376
- "type": "object",
377
- "properties": {
378
- "network": {
379
- "type": "string",
380
- "enum": [
381
- "testnet",
382
- "mainnet"
383
- ]
384
- },
385
- "already_spent_gas": {
386
- "type": "integer",
387
- "minimum": 0,
388
- "description": "Gas already spent on-chain in MIST (from telemetry). Defaults to 0."
389
- },
390
- "estimated_rerun_gas": {
391
- "type": "integer",
392
- "minimum": 0,
393
- "description": "Estimated gas to re-run remaining ops in MIST. Auto-computed from estimateDeploymentGas when omitted."
394
- },
395
- "warning": {
396
- "type": "string",
397
- "description": "Custom warning text. Defaults to a computed cost summary."
398
- }
399
- },
400
- "required": [
401
- "network"
167
+ "object_type_add": {
168
+ "type": "string",
169
+ "enum": [
170
+ "Service",
171
+ "Machine",
172
+ "Guard",
173
+ "Permission",
174
+ "Reward",
175
+ "Arbitration",
176
+ "Progress",
177
+ "Treasury",
178
+ "Demand",
179
+ "Repository",
180
+ "Contact",
181
+ "Order",
182
+ "Allocation",
183
+ "Personal",
184
+ "Payment",
185
+ "Proof"
402
186
  ],
403
- "additionalProperties": false,
404
- "description": "Gas budget input for stage 4/5 gate (§3.5). Non-blocking; only surfaces a WARN on mainnet."
187
+ "description": "Object type for add_object."
405
188
  },
406
- "network": {
189
+ "object_role": {
407
190
  "type": "string",
408
191
  "enum": [
409
- "testnet",
410
- "mainnet"
192
+ "core",
193
+ "dependency",
194
+ "reference"
411
195
  ],
412
- "description": "Target network for trace_substeps."
196
+ "description": "Object role in project for add_object. 'core' = the Service (only one per project), 'dependency' = required binding, 'reference' = optional/auxiliary. Defaults to 'reference'."
413
197
  },
414
- "substeps": {
198
+ "object_tags_add": {
415
199
  "type": "array",
416
200
  "items": {
417
- "type": "object",
418
- "properties": {
419
- "step_id": {
420
- "type": "string",
421
- "pattern": "^T\\d+\\.\\d+$"
422
- },
423
- "parent_step": {
424
- "type": "string",
425
- "pattern": "^T\\d+$"
426
- },
427
- "object_type": {
428
- "$ref": "#/definitions/project_operation/properties/objects/items/properties/object_type"
429
- },
430
- "entry_id": {
431
- "type": "string"
432
- },
433
- "operation_type": {
434
- "type": "string"
435
- },
436
- "network": {
437
- "type": "string",
438
- "enum": [
439
- "testnet",
440
- "mainnet"
441
- ]
442
- },
443
- "input": {
444
- "type": "object",
445
- "properties": {
446
- "data": {
447
- "type": "object",
448
- "additionalProperties": {}
449
- },
450
- "input_refs": {
451
- "type": "array",
452
- "items": {
453
- "type": "string"
454
- }
455
- }
456
- },
457
- "required": [
458
- "data",
459
- "input_refs"
460
- ],
461
- "additionalProperties": false
462
- },
463
- "output": {
464
- "type": "object",
465
- "properties": {
466
- "object_id": {
467
- "type": "string"
468
- },
469
- "tx_digest": {
470
- "type": "string"
471
- }
472
- },
473
- "additionalProperties": false
474
- },
475
- "timestamp": {
476
- "type": "integer"
477
- },
478
- "status": {
479
- "type": "string",
480
- "enum": [
481
- "PENDING",
482
- "SUCCESS",
483
- "FAILED",
484
- "SKIPPED"
485
- ]
486
- },
487
- "failure_reason": {
488
- "type": "string"
489
- },
490
- "dependencies": {
491
- "type": "object",
492
- "properties": {
493
- "input_refs": {
494
- "type": "array",
495
- "items": {
496
- "type": "string"
497
- }
498
- },
499
- "output_refs": {
500
- "type": "array",
501
- "items": {
502
- "type": "object",
503
- "properties": {
504
- "substep_id": {
505
- "type": "string"
506
- },
507
- "field_path": {
508
- "type": "string"
509
- }
510
- },
511
- "required": [
512
- "substep_id",
513
- "field_path"
514
- ],
515
- "additionalProperties": false
516
- }
517
- }
518
- },
519
- "required": [
520
- "input_refs",
521
- "output_refs"
522
- ],
523
- "additionalProperties": false
524
- },
525
- "retry_info": {
526
- "type": "object",
527
- "properties": {
528
- "original_step_id": {
529
- "type": "string"
530
- },
531
- "retry_count": {
532
- "type": "integer",
533
- "minimum": 0
534
- },
535
- "retry_reason": {
536
- "type": "string"
537
- }
538
- },
539
- "required": [
540
- "original_step_id",
541
- "retry_count",
542
- "retry_reason"
543
- ],
544
- "additionalProperties": false
545
- }
546
- },
547
- "required": [
548
- "step_id",
549
- "parent_step",
550
- "object_type",
551
- "entry_id",
552
- "operation_type",
553
- "network",
554
- "input",
555
- "timestamp",
556
- "status",
557
- "dependencies"
558
- ],
559
- "additionalProperties": false
201
+ "type": "string"
560
202
  },
561
- "description": "Substep records for trace_substeps."
203
+ "description": "Tags for add_object."
562
204
  },
563
- "target_stage": {
564
- "type": "integer",
565
- "minimum": 1,
566
- "maximum": 5,
567
- "description": "Stage number (1-5) for validate_stage_unit, get_stage_assessment, get_stage_risk_policy, and rollback_stage (the stage to rollback to). Required by these 4 actions."
205
+ "object_id_remove": {
206
+ "type": "string",
207
+ "description": "ProjectObject UUID for remove_object (the project_objects.id, NOT the on-chain address)."
568
208
  },
569
- "proposal_id": {
209
+ "object_id_update": {
570
210
  "type": "string",
571
- "description": "Improvement proposal ID (for apply_improvement). Required by apply_improvement."
211
+ "description": "ProjectObject UUID for update_object (the project_objects.id)."
572
212
  },
573
- "review_status": {
213
+ "object_name_update": {
574
214
  "type": "string",
575
- "enum": [
576
- "approved",
577
- "rejected",
578
- "applied"
579
- ],
580
- "description": "New review status to set (for apply_improvement). 'approved' triggers application (config_override or source_patch); 'rejected' marks as rejected; 'applied' marks as already applied."
215
+ "description": "New name for update_object."
581
216
  },
582
- "queue_filter_status": {
217
+ "object_type_update": {
218
+ "type": "string",
219
+ "description": "New type for update_object."
220
+ },
221
+ "object_role_update": {
583
222
  "type": "string",
584
223
  "enum": [
585
- "pending",
586
- "approved",
587
- "rejected",
588
- "applied"
224
+ "core",
225
+ "dependency",
226
+ "reference"
589
227
  ],
590
- "description": "Filter the improvement queue by review_status (for get_improvement_queue)."
228
+ "description": "New role for update_object."
591
229
  },
592
- "queue_filter_type": {
230
+ "object_tags_update": {
231
+ "type": "array",
232
+ "items": {
233
+ "type": "string"
234
+ },
235
+ "description": "New tags for update_object."
236
+ },
237
+ "version_description": {
593
238
  "type": "string",
594
- "description": "Filter the improvement queue by proposal type (for get_improvement_queue)."
239
+ "maxLength": 500,
240
+ "description": "Description for create_version."
595
241
  },
596
- "queue_filter_priority": {
242
+ "fork_from_version": {
597
243
  "type": "string",
598
- "description": "Filter the improvement queue by priority P0/P1/P2/P3 (for get_improvement_queue)."
244
+ "description": "Source version for create_version (fork objects + graph from this version)."
599
245
  },
600
- "dry_run": {
246
+ "max_depth": {
247
+ "type": "integer",
248
+ "minimum": 1,
249
+ "maximum": 5,
250
+ "description": "Max recursion depth for Pathway 1 (internal reference derivation) in build_graph. Default 3."
251
+ },
252
+ "enable_registrar": {
601
253
  "type": "boolean",
602
- "description": "When true, rollback_stage only evaluates the policy and returns the cleanup plan WITHOUT executing the rollback. Defaults to false (execute)."
254
+ "description": "Enable Pathway 2 (Registrar inbound query) in build_graph. Default true."
603
255
  },
604
- "query_object_type": {
605
- "type": "string",
606
- "description": "Object type for get_reversibility query (e.g. 'service', 'machine', 'guard'). When omitted, returns the full matrix."
256
+ "enable_potential": {
257
+ "type": "boolean",
258
+ "description": "Enable Pathway 3 (potential relationship detection) in build_graph. Default false."
607
259
  },
608
- "query_lifecycle_state": {
260
+ "evaluation_type": {
609
261
  "type": "string",
610
262
  "enum": [
611
- "created",
612
- "referenced",
613
- "published",
614
- "bound"
263
+ "risk",
264
+ "trust",
265
+ "completeness",
266
+ "value",
267
+ "worth_buying"
615
268
  ],
616
- "description": "Object lifecycle state for get_reversibility query. When omitted, returns all lifecycle states for the given object_type."
269
+ "description": "Evaluation type for evaluate_project. risk/trust/completeness are rule-based (computed locally). worth_buying/value require LLM assistance (returns a prompt for the caller to process)."
617
270
  },
618
- "context_objects": {
271
+ "refresh_before_eval": {
272
+ "type": "boolean",
273
+ "description": "When true, evaluate_project refreshes object cache from chain before evaluating. Default false."
274
+ },
275
+ "eval_score": {
276
+ "type": "number",
277
+ "minimum": 0,
278
+ "maximum": 100,
279
+ "description": "Overall evaluation score (0-100) for save_evaluation."
280
+ },
281
+ "eval_summary": {
282
+ "type": "string",
283
+ "maxLength": 1000,
284
+ "description": "Evaluation summary for save_evaluation."
285
+ },
286
+ "eval_details": {
287
+ "type": "object",
288
+ "additionalProperties": {},
289
+ "description": "Structured evaluation details for save_evaluation (criterion_scores, findings, etc.)."
290
+ },
291
+ "compare_project_ids": {
619
292
  "type": "array",
620
293
  "items": {
621
294
  "type": "string"
622
295
  },
623
- "description": "Object IDs (0x...) or LocalMark names to assemble context for. Required when action='assemble_context'. The current on-chain state of each object will be queried and enriched with semantic annotations."
296
+ "minItems": 2,
297
+ "description": "Array of project IDs to compare (for compare_projects). Minimum 2."
624
298
  },
625
- "include_events": {
626
- "type": "boolean",
627
- "description": "When true, assemble_context also queries recent state-transition events (NewOrderEvent, ProgressEvent, ArbEvent, etc.). Events are the real-time transition log — convergent and bounded. Defaults to false. Note: object-embedded history (ProgressSession.forwards, Order.disputes) is ALWAYS extracted automatically — no flag needed."
299
+ "diff_address": {
300
+ "type": "string",
301
+ "description": "Object address for get_object_diff."
628
302
  },
629
- "context_network": {
303
+ "diff_from_time": {
304
+ "type": "integer",
305
+ "description": "Start timestamp (ms) for get_object_diff."
306
+ },
307
+ "diff_to_time": {
308
+ "type": "integer",
309
+ "description": "End timestamp (ms) for get_object_diff."
310
+ },
311
+ "network": {
630
312
  "type": "string",
631
313
  "enum": [
632
314
  "testnet",
633
315
  "mainnet"
634
316
  ],
635
- "description": "Network for assemble_context queries. Defaults to 'testnet' if omitted."
317
+ "description": "Target network for generate_deployment_doc. Required when action='generate_deployment_doc'."
318
+ },
319
+ "save": {
320
+ "type": "boolean",
321
+ "description": "When true (default), persist the generated MD to SQLite project_documents table for generate_deployment_doc."
636
322
  }
637
323
  },
638
324
  "required": [