@wowok/agent-mcp 3.2.6 → 3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chain-semantics/field-capability.js +1 -1
- package/dist/chain-semantics/freeze-map.js +1 -1
- package/dist/chain-semantics/object-graph.js +1 -1
- package/dist/communication/wts-attestation.js +1 -1
- package/dist/composition/audit.js +1 -1
- package/dist/composition/compile.d.ts +3 -2
- package/dist/composition/compile.js +1 -1
- package/dist/composition/inflight.d.ts +17 -0
- package/dist/composition/inflight.js +1 -0
- package/dist/config/config-audit.spec.js +1 -1
- package/dist/customer/account-events.js +1 -1
- package/dist/customer/order-monitor.js +1 -1
- package/dist/evaluation/builtins/graph-service.spec.js +1 -1
- package/dist/evaluation/engine.js +1 -1
- package/dist/experience/realtime-feedback.js +1 -1
- package/dist/extensions/constraint-registry.d.ts +6 -1
- package/dist/extensions/constraint-registry.js +1 -1
- package/dist/extensions/index.d.ts +1 -1
- package/dist/extensions/index.js +1 -1
- package/dist/extensions/industry-pack.d.ts +5 -0
- package/dist/extensions/industry-pack.js +1 -1
- package/dist/extensions/mode-evaluator.d.ts +3 -2
- package/dist/extensions/mode-evaluator.js +1 -1
- package/dist/extensions/modes.js +1 -1
- package/dist/graph/onchain/analyze.js +1 -1
- package/dist/graph/onchain/analyze.spec.js +1 -1
- package/dist/graph/onchain/anti-cheat.d.ts +32 -2
- package/dist/graph/onchain/anti-cheat.js +1 -1
- package/dist/graph/onchain/anti-cheat.spec.js +1 -1
- package/dist/graph/onchain/expand.js +1 -1
- package/dist/graph/onchain/exposure.js +1 -1
- package/dist/graph/onchain/extract.js +1 -1
- package/dist/graph/onchain/graph-policy.spec.js +1 -1
- package/dist/graph/onchain/index.d.ts +2 -2
- package/dist/graph/onchain/index.js +1 -1
- package/dist/graph/onchain/project-relationship.js +1 -1
- package/dist/graph/onchain/table-ledger.spec.js +1 -1
- package/dist/graph/onchain/types.d.ts +3 -0
- package/dist/harness/recover.js +1 -1
- package/dist/index.js +1 -1
- package/dist/knowledge/arbitration-venue-order.d.ts +25 -0
- package/dist/knowledge/arbitration-venue-order.js +1 -0
- package/dist/knowledge/audit-rules.d.ts +10 -0
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/baselines/risk-baselines.spec.js +1 -1
- package/dist/knowledge/baselines/rules/graph.json +81 -0
- package/dist/knowledge/baselines/rules/machine.json +3 -3
- package/dist/knowledge/baselines/rules/plan.json +80 -2
- package/dist/knowledge/builtin-templates.d.ts +17 -2
- package/dist/knowledge/builtin-templates.js +1 -1
- package/dist/knowledge/discount-threshold.js +1 -1
- package/dist/knowledge/event-semantics.js +1 -1
- package/dist/knowledge/getting-started.js +1 -1
- package/dist/knowledge/guard-bindings.js +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-field-cognition.js +1 -1
- package/dist/knowledge/guard-ledger.js +1 -1
- package/dist/knowledge/guard-lint.d.ts +1 -0
- package/dist/knowledge/guard-lint.js +1 -1
- package/dist/knowledge/guard-node-gates.d.ts +4 -0
- package/dist/knowledge/guard-node-gates.js +1 -0
- package/dist/knowledge/guard-puzzle.js +1 -1
- package/dist/knowledge/guard-risk.js +1 -1
- package/dist/knowledge/guard-submission-prompt.d.ts +1 -0
- package/dist/knowledge/guard-submission-prompt.js +1 -1
- package/dist/knowledge/guard-templates.d.ts +2 -1
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/guard-translation.js +1 -1
- package/dist/knowledge/index.d.ts +2 -2
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/machine-topology.d.ts +6 -0
- package/dist/knowledge/machine-topology.js +1 -1
- package/dist/knowledge/reputation-rules.d.ts +3 -9
- package/dist/knowledge/reputation-rules.js +1 -1
- package/dist/knowledge/safety-rules.d.ts +10 -1
- package/dist/knowledge/safety-rules.js +1 -1
- package/dist/knowledge/scenario-modes.js +1 -1
- package/dist/knowledge/settlement-semantics.d.ts +1 -0
- package/dist/knowledge/settlement-semantics.js +1 -0
- package/dist/knowledge/template-loader.d.ts +22 -0
- package/dist/knowledge/template-loader.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.d.ts +14 -0
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/knowledge/workflow-guidance.d.ts +1 -0
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/participation/allocation-advice.js +1 -1
- package/dist/participation/customer-interest.js +1 -1
- package/dist/participation/radar-core.d.ts +6 -1
- package/dist/participation/radar-core.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.d.ts +38 -15
- package/dist/playbooks/service-build/merchant-guide.js +1 -1
- package/dist/playbooks/service-build/migration-planner.d.ts +7 -0
- package/dist/playbooks/service-build/migration-planner.js +1 -1
- package/dist/playbooks/service-build/object-panorama.js +1 -1
- package/dist/playbooks/service-build/participation-radar.js +1 -1
- package/dist/playbooks/service-build/pipeline-actions.d.ts +1 -1
- package/dist/playbooks/service-build/pipeline-actions.js +1 -1
- package/dist/playbooks/service-build/relationship-profile.js +1 -1
- package/dist/playbooks/service-build/risk-aggregator.d.ts +1 -1
- package/dist/playbooks/service-build/risk-aggregator.js +1 -1
- package/dist/playbooks/service-build/service-panorama.js +1 -1
- package/dist/playbooks/service-build/service-quote.js +1 -1
- package/dist/playbooks/service-build/service-quote.spec.js +1 -1
- package/dist/relationship/derivation.d.ts +1 -0
- package/dist/review/index.js +1 -1
- package/dist/runtime/instance-registry.d.ts +8 -0
- package/dist/runtime/instance-registry.js +1 -0
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/benchmark-migration/index.d.ts +14 -0
- package/dist/schema/benchmark-migration/index.js +1 -1
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +109 -0
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +14 -0
- package/dist/schema/call/contact.js +1 -1
- package/dist/schema/call/error-codes.d.ts +1 -1
- package/dist/schema/call/error-codes.js +1 -1
- package/dist/schema/call/guard.d.ts +7 -0
- package/dist/schema/call/guard.js +1 -1
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/machine.d.ts +7 -0
- package/dist/schema/call/machine.js +1 -1
- package/dist/schema/call/payment.js +1 -1
- package/dist/schema/call/permission-handler.js +1 -1
- package/dist/schema/call/progress.d.ts +46 -0
- package/dist/schema/call/progress.js +1 -1
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +8 -8
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/goal/index.d.ts +11 -0
- package/dist/schema/goal/planning.d.ts +32 -1
- package/dist/schema/goal/planning.js +1 -1
- package/dist/schema/industry-pack/index.d.ts +40 -0
- package/dist/schema/industry-pack/index.js +1 -1
- package/dist/schema/keeper/index.d.ts +13 -0
- package/dist/schema/local/index.d.ts +75 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +17 -0
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +39 -2
- package/dist/schema/operations.js +1 -1
- package/dist/schema/query/bi.d.ts +64 -0
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +94 -0
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.d.ts +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/utils/permission-machine-check.js +1 -1
- package/dist/schema/workspace/index.d.ts +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +45 -0
- package/dist/schemas/benchmark_migration_operation.output.json +24 -4
- package/dist/schemas/benchmark_migration_operation.schema.json +70 -0
- package/dist/schemas/bridge_operation.output.json +45 -0
- package/dist/schemas/goal_operation.schema.json +78 -0
- package/dist/schemas/guard2file.output.json +6 -1
- package/dist/schemas/guard2file.schema.json +9 -0
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/industry_pack_operation.output.json +91 -0
- package/dist/schemas/industry_pack_operation.schema.json +19 -1
- package/dist/schemas/keeper_operation.output.json +44 -0
- package/dist/schemas/local_cache_operation.output.json +45 -0
- package/dist/schemas/local_history_operation.output.json +45 -0
- package/dist/schemas/local_info_operation.output.json +45 -0
- package/dist/schemas/local_mark_operation.output.json +45 -0
- package/dist/schemas/machineNode2file.output.json +6 -1
- package/dist/schemas/machineNode2file.schema.json +9 -0
- package/dist/schemas/messenger_operation.output.json +52 -0
- package/dist/schemas/monitor_events.output.json +44 -0
- package/dist/schemas/monitor_subscription.output.json +44 -0
- package/dist/schemas/onchain_events.output.json +44 -0
- package/dist/schemas/onchain_operations.output.json +133 -0
- package/dist/schemas/onchain_operations.schema.json +73 -16
- package/dist/schemas/onchain_operations_arbitration.schema.json +2 -1
- package/dist/schemas/onchain_operations_contact.schema.json +2 -2
- package/dist/schemas/onchain_operations_guard.schema.json +2 -2
- package/dist/schemas/onchain_operations_machine.schema.json +2 -2
- package/dist/schemas/onchain_operations_payment.schema.json +1 -1
- package/dist/schemas/onchain_operations_progress.schema.json +57 -0
- package/dist/schemas/onchain_operations_service.schema.json +7 -8
- package/dist/schemas/onchain_table_data.output.json +81 -13
- package/dist/schemas/onchain_table_data.schema.json +21 -21
- package/dist/schemas/query_toolkit.output.json +218 -9
- package/dist/schemas/query_toolkit.schema.json +50 -26
- package/dist/schemas/wowok_buildin_info.output.json +80 -1
- package/dist/schemas/wowok_buildin_info.schema.json +1 -1
- package/dist/tools/handlers/benchmark-migration.d.ts +1 -0
- package/dist/tools/handlers/benchmark-migration.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/file-export.js +1 -1
- package/dist/tools/handlers/industry-pack.js +1 -1
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/review-chain.d.ts +22 -0
- package/dist/tools/handlers/review-chain.js +1 -0
- package/dist/tools/registry/agent.js +1 -1
- package/dist/tools/registry/business.js +1 -1
- package/dist/tools/registry/config.js +1 -1
- package/dist/tools/registry/evaluation.js +1 -1
- package/dist/tools/registry/files.js +1 -1
- package/dist/tools/registry/identity.js +1 -1
- package/dist/tools/registry/local.js +1 -1
- package/dist/tools/registry/messenger.js +1 -1
- package/dist/tools/registry/monitor.js +1 -1
- package/dist/tools/registry/onchain.js +1 -1
- package/dist/tools/registry/query.js +1 -1
- package/dist/tools/rules-hook.js +1 -1
- package/dist/tools/runtime-health.d.ts +10 -0
- package/dist/tools/runtime-health.js +1 -0
- package/dist/tools/upgrade-check.d.ts +10 -1
- package/dist/tools/upgrade-check.js +1 -1
- package/dist/tools/wrap.d.ts +3 -0
- package/dist/tools/wrap.js +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"comment": "Plan-domain rules (L1 composition kernel). Facts are produced by composition/audit.ts planFacts() from a Plan AST.
|
|
2
|
+
"comment": "Plan-domain rules (L1 composition kernel). Facts are produced by composition/audit.ts planFacts() from a Plan AST. Each rule names a verified failure class (TRAILHAVEN wiki/test/10, booking-85981 + amz-7f3a2c91 audits): zero allocator rows passing silently, prose guard logic, dual-rail double-pay, path-dependent settlement windows, write-only enforcement, dropped guard/repository hosts, missing task-binding slot declarations and GuardIdentifier slot mismatches that strand escrow permanently.",
|
|
3
3
|
"facts": {
|
|
4
4
|
"has_service": "Plan creates a service object",
|
|
5
5
|
"has_machine": "Plan creates a machine object",
|
|
@@ -15,9 +15,19 @@
|
|
|
15
15
|
"first_write_only_unenforced_field": "First write-only param set with no guard query covering it (WRITE-ONLY-01, A-1/A-10)",
|
|
16
16
|
"first_orphan_guard": "First guard step id never referenced by any host binding (HOST-GRAPH-01, B-2)",
|
|
17
17
|
"first_repo_query_without_repository": "First guard step id querying repository.* while the plan creates no repository (HOST-GRAPH-01, B-2)",
|
|
18
|
+
"first_edge_guard_missing_254": "First guard step id bound on a machine forward whose table declares no {identifier: 254, b_submission: true} row (TASKBIND-01, N-K20: progress::assert_task_binding aborts code 11)",
|
|
19
|
+
"first_alloc_slot_missing": "First allocator {GuardIdentifier:N} leg whose bound guard table lacks slot N as a declared Address submission row (TASKBIND-02, N-K21: alloc abort with funds stranded)",
|
|
18
20
|
"pending_allocator_guard_count": "Unresolved guard designs bound to allocator rows (compile-time judgment surface; >0 downgrades FUND-EXIT-01 from critical to medium)",
|
|
19
21
|
"first_pending_fund_guard": "First unresolved guard design bound to an allocator row or machine edge (UNRESOLVED-GUARD-01) — publishing now ships that path UNGUARDED",
|
|
20
|
-
"first_pending_buy_guard": "First unresolved guard design bound to the service buy path (UNRESOLVED-GUARD-01 warning tier)"
|
|
22
|
+
"first_pending_buy_guard": "First unresolved guard design bound to the service buy path (UNRESOLVED-GUARD-01 warning tier)",
|
|
23
|
+
"has_return_rail": "The machine declares a return rail node (name matches /return/i) — the structural refund promise (PROMISE-ARB, L-01')",
|
|
24
|
+
"return_rail_node": "First return-rail node name",
|
|
25
|
+
"has_arbitration_binding": "The plan wires an arbitration venue into the Service (configure method 'arbitrations' with a non-empty object list, or the service create carries non-empty arbitrations)",
|
|
26
|
+
"fund_topup_present": "The plan carries a compensation_fund_add step",
|
|
27
|
+
"fund_topup_amount": "Sum of parseable (integer smallest-unit) top-up balances; absent when unparseable",
|
|
28
|
+
"fund_ceiling_breach": "The top-up is below the award ceiling (MAX_INDEMNITY_MULTIPLE x highest SKU price) — judged ONLY when both sides parse (PLAN-K2)",
|
|
29
|
+
"fund_ceiling_basis": "Human-readable basis used for the ceiling judgment",
|
|
30
|
+
"fund_ceiling_unverifiable": "A fund top-up exists but the ceiling could not be judged here (price or amount unparseable) — the publish-patch KL-K2 rule re-checks at the 3x largest-order basis (PLAN-K2 fallback, stated explicitly)"
|
|
21
31
|
},
|
|
22
32
|
"rules": [
|
|
23
33
|
{
|
|
@@ -81,6 +91,44 @@
|
|
|
81
91
|
}
|
|
82
92
|
]
|
|
83
93
|
},
|
|
94
|
+
{
|
|
95
|
+
"rule_id": "PROMISE-ARB",
|
|
96
|
+
"dimension": "fund_flow",
|
|
97
|
+
"trigger": "The machine declares a return rail — that IS the refund promise — but the plan binds no Arbitration into the Service. After settlement the in-escrow refund track is dead topology, so the only on-chain remedy for a post-settlement return is an independent Arbitration ruling paid from the compensation fund (etsy-ln L-01: a live shop promised returns with no venue bound).",
|
|
98
|
+
"cases": [
|
|
99
|
+
{
|
|
100
|
+
"when": { "all": [ { "field": "has_return_rail", "op": "truthy" }, { "field": "has_arbitration_binding", "op": "falsy" } ] },
|
|
101
|
+
"level": "critical",
|
|
102
|
+
"title": "Return-promising shop wires no Arbitration venue",
|
|
103
|
+
"description": "The machine's return rail ('${return_rail_node}') is a promise the chain cannot keep alone: once the settlement allocator drains the escrow, a post-settlement return can only be paid by an independent Arbitration ruling against the compensation fund. This plan binds no venue, so the promise is DECLARED but UNENFORCEABLE — the declared-but-not-enforced class. Blocking: the machine and guard freeze at publish; do not hand-build the wiring outside the plan (hand-built replicas silently drop the arbitration/fund steps).",
|
|
104
|
+
"mitigation": "Keep the arbitration create + service arbitration-binding steps in the plan (standard emission for arbitration_mode third_party). A shop that deliberately settles every dispute off-chain must remove the return rail instead of the venue — an unbacked promise is the one configuration the protocol cannot repair post-publish.",
|
|
105
|
+
"stakeholders": ["merchant", "customer"]
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"rule_id": "PLAN-K2",
|
|
111
|
+
"dimension": "fund_flow",
|
|
112
|
+
"trigger": "Publish-front compensation-fund adequacy (KL-K2 family): an award is hard-capped at 3x the order amount at ruling time, so a fund below the ceiling turns a WON award into an unpayable one (the claim aborts and is NOT consumed). Preferred basis: 3x the highest SKU price on the plan's catalog; when no price is parseable the judgment is explicitly deferred to the publish-patch check (3x largest single order) instead of silently skipped.",
|
|
113
|
+
"cases": [
|
|
114
|
+
{
|
|
115
|
+
"when": { "field": "fund_ceiling_breach", "op": "truthy" },
|
|
116
|
+
"level": "critical",
|
|
117
|
+
"title": "Compensation fund tops up below the award ceiling (${fund_ceiling_basis})",
|
|
118
|
+
"description": "The plan tops the fund up to ${fund_topup_amount} (smallest units), but a ruling at the ceiling would abort the buyer's claim (E_COMPENSATION_NOT_MATCH) and the abort does NOT consume the claim — the buyer holds an unpayable win until a manual top-up, and the shop holds the reputational damage.",
|
|
119
|
+
"mitigation": "Raise the compensation_fund input to at least the ceiling (${fund_ceiling_basis}). Above the ceiling is optional (tolerance for CONCURRENT claims against the one per-Service pool); below it, a valid ruling cannot pay.",
|
|
120
|
+
"stakeholders": ["merchant", "customer"]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"when": { "field": "fund_ceiling_unverifiable", "op": "truthy" },
|
|
124
|
+
"level": "medium",
|
|
125
|
+
"title": "Compensation-fund adequacy cannot be judged from the plan",
|
|
126
|
+
"description": "The plan carries a fund top-up, but the catalog price or the top-up amount is not machine-parseable here (display forms need token decimals the plan layer does not have), so the ceiling check is DEFERRED, not skipped: the publish patch re-runs it on the 3x largest-single-order basis and blocks publish when under.",
|
|
127
|
+
"mitigation": "Provide numeric smallest-unit sales prices and a numeric fund amount so the plan layer can verify the ceiling before materialization; otherwise expect the publish-patch check to judge it.",
|
|
128
|
+
"stakeholders": ["merchant"]
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
},
|
|
84
132
|
{
|
|
85
133
|
"rule_id": "DUAL-RAIL-01",
|
|
86
134
|
"dimension": "fund_flow",
|
|
@@ -134,6 +182,36 @@
|
|
|
134
182
|
}
|
|
135
183
|
]
|
|
136
184
|
},
|
|
185
|
+
{
|
|
186
|
+
"rule_id": "TASKBIND-01",
|
|
187
|
+
"dimension": "fund_flow",
|
|
188
|
+
"trigger": "A guard bound on a machine forward declares no {identifier: 254, b_submission: true} row — progress::assert_task_binding aborts code 11 on every guarded forward of an order-driven Progress, and Guard tables are frozen at creation (N-K20, booking-85981 + amz-7f3a2c91).",
|
|
189
|
+
"cases": [
|
|
190
|
+
{
|
|
191
|
+
"when": { "field": "first_edge_guard_missing_254", "op": "present" },
|
|
192
|
+
"level": "critical",
|
|
193
|
+
"title": "Forward guard '${first_edge_guard_missing_254}' lacks the protocol task-binding slot (254)",
|
|
194
|
+
"description": "Every guarded forward of a machine running on an order Progress requires the passport to carry a slot-254 (task binding) submission; the guard table declares none, so the forward aborts with code 11 on first traversal. Guard tables and machines freeze at publish — shipping now strands the path permanently, and no builder can patch the table afterwards.",
|
|
195
|
+
"mitigation": "Declare {identifier: 254, b_submission: true, value_type: 'Address'} in guard '${first_edge_guard_missing_254}' (protocol slot 254; the order address is written by order creation). The compile kernel auto-injects this row when the guard is edge-bound — a finding here means the guard is bound in a way the kernel could not see.",
|
|
196
|
+
"stakeholders": ["merchant", "customer"]
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"rule_id": "TASKBIND-02",
|
|
202
|
+
"dimension": "fund_flow",
|
|
203
|
+
"trigger": "An allocator {GuardIdentifier:N} leg names a slot the guard table never declares as a b_submission Address — allocation asserts the passport submission == payment_info.for_object and aborts (code 15) with funds already escrowed (N-K21, amz-7f3a2c91: 0.98991 WOW stranded).",
|
|
204
|
+
"cases": [
|
|
205
|
+
{
|
|
206
|
+
"when": { "field": "first_alloc_slot_missing", "op": "present" },
|
|
207
|
+
"level": "critical",
|
|
208
|
+
"title": "Allocator leg ${first_alloc_slot_missing} is undeclared",
|
|
209
|
+
"description": "The allocator row pays a recipient keyed by this guard slot, but the guard table has no b_submission Address declaration for it. At allocation time the passport lacks the slot, the assert fails, and the distribution aborts — escrowed funds stay stranded because the guard froze at publish and cannot gain the declaration later. A static Address slot in the same position passes the declaration window but fails the same assertion (N-11).",
|
|
210
|
+
"mitigation": "Declare slot N in the guard table as {identifier: N, b_submission: true, value_type: 'Address', object_type: 'Order'} so the passing order address is captured; the allocator then pays against payment_info.for_object.",
|
|
211
|
+
"stakeholders": ["merchant", "customer"]
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
},
|
|
137
215
|
{
|
|
138
216
|
"rule_id": "HOST-GRAPH-01",
|
|
139
217
|
"dimension": "composition",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Industry } from "../customer/index.js";
|
|
2
2
|
import type { ModeMachineNode, ModeGuardRef, ModeAllocatorStrategy } from "./scenario-modes.js";
|
|
3
|
+
export type TemplateArbitrationMode = "none" | "merchant_pick" | "mutual_pick" | "third_party";
|
|
3
4
|
export interface ArchetypeTemplate {
|
|
4
5
|
id: string;
|
|
5
6
|
industry: Industry;
|
|
@@ -19,11 +20,25 @@ export interface ArchetypeTemplate {
|
|
|
19
20
|
user_inputs: string[];
|
|
20
21
|
key_risk: string;
|
|
21
22
|
build_notes: string[];
|
|
23
|
+
evidence_refs?: string[];
|
|
22
24
|
payment_model?: "milestone" | "subscription" | "escrow";
|
|
23
|
-
arbitration_mode?:
|
|
25
|
+
arbitration_mode?: TemplateArbitrationMode;
|
|
24
26
|
time_anchors?: Record<string, string>;
|
|
27
|
+
conditional_guards?: Array<{
|
|
28
|
+
guard_key: string;
|
|
29
|
+
param: string;
|
|
30
|
+
values: string[];
|
|
31
|
+
emit_value: string;
|
|
32
|
+
question: string;
|
|
33
|
+
}>;
|
|
34
|
+
reward_claim_policy?: {
|
|
35
|
+
kind: "once" | "periodic" | "capped";
|
|
36
|
+
min_claim_interval_ms?: number;
|
|
37
|
+
max_total_per_recipient?: string;
|
|
38
|
+
};
|
|
39
|
+
review_mode?: "none" | "review" | "review_reward";
|
|
25
40
|
}
|
|
26
|
-
export declare const BUILTIN_TEMPLATES_VERSION =
|
|
41
|
+
export declare const BUILTIN_TEMPLATES_VERSION = 51;
|
|
27
42
|
export declare const BUILTIN_TEMPLATES: ArchetypeTemplate[];
|
|
28
43
|
export declare const TEMPLATE_KEYWORDS: Record<string, string[]>;
|
|
29
44
|
export declare function getBuiltinTemplate(id: string): ArchetypeTemplate | undefined;
|