@wowok/agent-mcp 3.3.1 → 3.3.3
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/fund-flow.js +1 -1
- package/dist/chain-semantics/guard-verbs.js +1 -1
- package/dist/chain-semantics/object-graph.js +1 -1
- package/dist/composition/audit.d.ts +5 -0
- package/dist/composition/audit.js +1 -1
- package/dist/composition/blueprint-view.d.ts +0 -1
- package/dist/composition/blueprint-view.js +1 -1
- package/dist/composition/compile.d.ts +5 -3
- package/dist/composition/compile.js +1 -1
- package/dist/composition/inflight.d.ts +32 -4
- package/dist/composition/inflight.js +1 -1
- package/dist/config/judgment.d.ts +111 -1
- package/dist/config/judgment.js +1 -1
- package/dist/customer/industry-risks.js +1 -1
- package/dist/customer/user-preferences.js +1 -1
- package/dist/evaluation/arbitration-game.d.ts +4 -0
- package/dist/evaluation/arbitration-game.js +1 -1
- package/dist/evaluation/builtins/graph-service.js +1 -1
- package/dist/evaluation/builtins/graph-service.spec.js +1 -1
- package/dist/evaluation/game-strategy.d.ts +6 -0
- package/dist/evaluation/game-strategy.js +1 -1
- package/dist/evaluation/node-game.d.ts +4 -0
- package/dist/evaluation/node-game.js +1 -1
- package/dist/evaluation/value-risk.d.ts +8 -0
- package/dist/evaluation/value-risk.js +1 -0
- package/dist/experience/realtime-feedback.js +1 -1
- package/dist/extensions/business-modules.d.ts +7 -2
- package/dist/extensions/business-modules.js +1 -1
- package/dist/extensions/industry-audit.spec.js +1 -1
- package/dist/extensions/industry-pack.d.ts +3 -2
- package/dist/extensions/industry-pack.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/expand.js +1 -1
- package/dist/graph/onchain/exposure.js +1 -1
- package/dist/graph/onchain/facet-projection.js +1 -1
- package/dist/graph/onchain/facet-projection.spec.js +1 -1
- package/dist/graph/onchain/facts.d.ts +20 -0
- package/dist/graph/onchain/facts.js +1 -1
- package/dist/graph/onchain/facts.spec.js +1 -1
- package/dist/graph/onchain/object-held-receipts.d.ts +20 -0
- package/dist/graph/onchain/object-held-receipts.js +1 -0
- package/dist/graph/onchain/object-held-receipts.spec.d.ts +1 -0
- package/dist/graph/onchain/object-held-receipts.spec.js +1 -0
- package/dist/graph/onchain/project-relationship.js +1 -1
- package/dist/graph/onchain/sdk-batch.d.ts +1 -0
- package/dist/graph/onchain/sdk-batch.js +1 -1
- package/dist/harness/index.d.ts +1 -0
- package/dist/harness/recover.d.ts +2 -1
- package/dist/harness/recover.js +1 -1
- package/dist/knowledge/acquisition-flywheel.js +1 -1
- package/dist/knowledge/allocation-ledger.d.ts +3 -1
- package/dist/knowledge/allocation-ledger.js +1 -1
- package/dist/knowledge/allocation-puzzle.d.ts +1 -0
- package/dist/knowledge/allocation-puzzle.js +1 -1
- package/dist/knowledge/allocation-risk.d.ts +1 -1
- package/dist/knowledge/allocation-risk.js +1 -1
- package/dist/knowledge/arb-fund-facts.d.ts +12 -0
- package/dist/knowledge/arb-fund-facts.js +1 -1
- package/dist/knowledge/audit-rules.d.ts +4 -3
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/baselines/judgment-baselines.json +502 -81
- package/dist/knowledge/baselines/rules/allocation.json +0 -14
- package/dist/knowledge/baselines/rules/graph.json +4 -4
- package/dist/knowledge/baselines/rules/plan.json +81 -5
- package/dist/knowledge/baselines/rules/reward.json +1 -1
- package/dist/knowledge/builtin-templates.d.ts +9 -1
- 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/game-scenarios.d.ts +21 -0
- package/dist/knowledge/game-scenarios.js +1 -0
- package/dist/knowledge/getting-started.js +1 -1
- package/dist/knowledge/guard-bindings.js +1 -1
- package/dist/knowledge/guard-design-patterns.d.ts +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-field-cognition.js +1 -1
- package/dist/knowledge/guard-leg-map.d.ts +5 -0
- package/dist/knowledge/guard-leg-map.js +1 -0
- package/dist/knowledge/guard-lint.js +1 -1
- package/dist/knowledge/guard-puzzle.js +1 -1
- package/dist/knowledge/guard-render.js +1 -1
- package/dist/knowledge/guard-risk.js +1 -1
- package/dist/knowledge/guard-submission-brief.d.ts +5 -0
- package/dist/knowledge/guard-submission-brief.js +1 -1
- package/dist/knowledge/guard-submission-prompt.d.ts +2 -1
- package/dist/knowledge/guard-submission-prompt.js +1 -1
- package/dist/knowledge/guard-templates.d.ts +1 -1
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/guard-translation.js +1 -1
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-generalizer.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/industry-strategy.js +1 -1
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/onchain-constants.d.ts +4 -2
- package/dist/knowledge/onchain-constants.js +1 -1
- package/dist/knowledge/order-ledger.d.ts +1 -1
- package/dist/knowledge/order-ledger.js +1 -1
- package/dist/knowledge/order-puzzle.d.ts +3 -0
- package/dist/knowledge/order-risk.d.ts +1 -1
- package/dist/knowledge/passport-ledger.d.ts +12 -0
- package/dist/knowledge/passport-ledger.js +1 -1
- package/dist/knowledge/payment-tracker.js +1 -1
- package/dist/knowledge/protocol-facts.d.ts +1 -0
- package/dist/knowledge/protocol-facts.js +1 -1
- package/dist/knowledge/repository-write-semantics.d.ts +1 -1
- package/dist/knowledge/repository-write-semantics.js +1 -1
- package/dist/knowledge/reward-ledger.js +1 -1
- package/dist/knowledge/reward-puzzle.d.ts +1 -1
- package/dist/knowledge/reward-risk.d.ts +1 -1
- package/dist/knowledge/scenario-modes.d.ts +2 -2
- package/dist/knowledge/scenario-modes.js +1 -1
- package/dist/knowledge/scenario-topology.js +1 -1
- package/dist/knowledge/service-ledger.d.ts +14 -0
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/strategy-manuals.js +1 -1
- package/dist/knowledge/template-index.d.ts +19 -0
- package/dist/knowledge/template-index.js +1 -0
- package/dist/knowledge/template-loader.d.ts +36 -0
- package/dist/knowledge/template-loader.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.d.ts +11 -0
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/tool-constraints.js +1 -1
- package/dist/knowledge/workflow-guidance.d.ts +2 -0
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/participation/allocation-advice.d.ts +8 -1
- package/dist/participation/allocation-advice.js +1 -1
- package/dist/participation/game-context.d.ts +25 -0
- package/dist/participation/game-context.js +1 -0
- package/dist/participation/node-action-advisor.d.ts +64 -0
- package/dist/participation/node-action-advisor.js +1 -0
- package/dist/participation/radar-core.d.ts +1 -0
- package/dist/participation/radar-core.js +1 -1
- package/dist/persona/defaults.js +1 -1
- package/dist/persona/topology-focus.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/game-theory.d.ts +4 -1
- package/dist/playbooks/service-build/game-theory.js +1 -1
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.d.ts +26 -1
- package/dist/playbooks/service-build/merchant-guide.js +1 -1
- package/dist/playbooks/service-build/migration-planner.d.ts +2 -2
- package/dist/playbooks/service-build/migration-planner.js +1 -1
- package/dist/playbooks/service-build/object-panorama.d.ts +13 -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 +4 -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/service-panorama.d.ts +12 -0
- 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 -1
- package/dist/review/index.js +1 -1
- package/dist/review/repository.js +1 -1
- package/dist/role/intent.d.ts +23 -0
- package/dist/role/intent.js +1 -0
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/benchmark-migration/index.d.ts +39 -0
- package/dist/schema/benchmark-migration/index.js +1 -1
- package/dist/schema/call/allocation.d.ts +49 -3
- package/dist/schema/call/allocation.js +1 -1
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +52 -0
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +3 -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.js +1 -1
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/machine.d.ts +10 -0
- package/dist/schema/call/machine.js +1 -1
- package/dist/schema/call/order.d.ts +2 -0
- package/dist/schema/call/order.js +1 -1
- package/dist/schema/call/progress.d.ts +6 -3
- package/dist/schema/call/progress.js +1 -1
- package/dist/schema/call/repository.d.ts +4 -0
- package/dist/schema/call/repository.js +1 -1
- package/dist/schema/call/reward.d.ts +2 -2
- package/dist/schema/call/reward.js +1 -1
- package/dist/schema/call/semantic.d.ts +6 -0
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +42 -4
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/goal/index.d.ts +54 -0
- package/dist/schema/goal/planning.d.ts +86 -0
- package/dist/schema/goal/planning.js +1 -1
- package/dist/schema/keeper/index.d.ts +2 -0
- package/dist/schema/local/index.d.ts +72 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +2 -0
- package/dist/schema/operations.d.ts +46 -5
- package/dist/schema/operations.js +1 -1
- package/dist/schema/persona/index.d.ts +484 -0
- package/dist/schema/query/bi.d.ts +4 -0
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +84 -60
- 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-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +41 -10
- package/dist/schemas/account_operation.schema.json +1 -1
- package/dist/schemas/benchmark_migration_operation.output.json +8 -5
- package/dist/schemas/benchmark_migration_operation.schema.json +91 -3
- package/dist/schemas/bridge_operation.output.json +13 -7
- package/dist/schemas/goal_operation.schema.json +94 -0
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/keeper_operation.output.json +12 -7
- package/dist/schemas/local_cache_operation.output.json +34 -7
- package/dist/schemas/local_cache_operation.schema.json +16 -1
- package/dist/schemas/local_history_operation.output.json +13 -7
- package/dist/schemas/local_info_operation.output.json +13 -7
- package/dist/schemas/local_info_operation.schema.json +5 -1
- package/dist/schemas/local_mark_operation.output.json +13 -7
- package/dist/schemas/messenger_operation.output.json +12 -7
- package/dist/schemas/monitor_events.output.json +12 -7
- package/dist/schemas/monitor_subscription.output.json +12 -7
- package/dist/schemas/onchain_events.output.json +67 -18
- package/dist/schemas/onchain_events.schema.json +4 -0
- package/dist/schemas/onchain_operations.output.json +81 -24
- package/dist/schemas/onchain_operations.schema.json +531 -126
- package/dist/schemas/onchain_operations_allocation.schema.json +294 -6
- package/dist/schemas/onchain_operations_arbitration.schema.json +3 -3
- package/dist/schemas/onchain_operations_contact.schema.json +2 -2
- package/dist/schemas/onchain_operations_demand.schema.json +3 -3
- package/dist/schemas/onchain_operations_gen_passport.schema.json +1 -1
- package/dist/schemas/onchain_operations_guard.schema.json +99 -63
- package/dist/schemas/onchain_operations_machine.schema.json +10 -1
- package/dist/schemas/onchain_operations_order.schema.json +8 -4
- package/dist/schemas/onchain_operations_progress.schema.json +8 -4
- package/dist/schemas/onchain_operations_proof.schema.json +1 -1
- package/dist/schemas/onchain_operations_repository.schema.json +6 -2
- package/dist/schemas/onchain_operations_reward.schema.json +8 -8
- package/dist/schemas/onchain_operations_service.schema.json +81 -21
- package/dist/schemas/onchain_operations_treasury.schema.json +7 -7
- package/dist/schemas/onchain_table_data.output.json +16 -7
- package/dist/schemas/persona_operation.output.json +1387 -0
- package/dist/schemas/persona_operation.schema.json +219 -0
- package/dist/schemas/query_toolkit.output.json +115 -64
- package/dist/schemas/query_toolkit.schema.json +8 -0
- package/dist/schemas/workflow_operation.schema.json +1 -1
- package/dist/tools/handlers/benchmark-migration.js +1 -1
- package/dist/tools/handlers/bridge.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/dispatch-expectations.js +1 -1
- package/dist/tools/handlers/file-export.js +1 -1
- package/dist/tools/handlers/industry-pack.d.ts +1 -0
- package/dist/tools/handlers/industry-pack.js +1 -1
- package/dist/tools/handlers/local.js +1 -1
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/onchain-name-registration.d.ts +11 -0
- package/dist/tools/handlers/onchain-name-registration.js +1 -1
- package/dist/tools/handlers/onchain.d.ts +28 -0
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/handlers/review-chain.d.ts +1 -1
- package/dist/tools/handlers/review-chain.js +1 -1
- package/dist/tools/handlers/schema-query.js +1 -1
- package/dist/tools/handlers/workflow.js +1 -1
- package/dist/tools/move-fn-index.gen.js +1 -1
- package/dist/tools/registry/agent.js +1 -1
- package/dist/tools/registry/local.js +1 -1
- package/dist/tools/registry/onchain.js +1 -1
- package/dist/tools/registry/query.js +1 -1
- package/dist/tools/wip-deploy-assist.js +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +3 -3
|
@@ -318,20 +318,6 @@
|
|
|
318
318
|
"dimension": "semantic",
|
|
319
319
|
"trigger": "GuardIdentifier recipients combined with payment_info.for_object anchor state (Some = enforced, None = absent)",
|
|
320
320
|
"cases": [
|
|
321
|
-
{
|
|
322
|
-
"when": { "all": [
|
|
323
|
-
{ "field": "for_object_anchor_known", "op": "eq", "value": true },
|
|
324
|
-
{ "field": "guard_identifier_recipient_present", "op": "eq", "value": true },
|
|
325
|
-
{ "field": "for_object_anchor_set", "op": "eq", "value": true }
|
|
326
|
-
] },
|
|
327
|
-
"level": "medium",
|
|
328
|
-
"title": "payment_info.for_object anchor is ENFORCED at allocation execution",
|
|
329
|
-
"description": "payment_info.for_object is set to ${for_object_anchor}. At allocation execution, every Recipient::GuardIdentifier submission must equal this address or the whole tx aborts with ERECIPIENT_NOT_FOR_OBJECT (15) — a wrong anchor or a guard whose passport submits a different address makes the allocation permanently fail (payment_info is immutable after create). Verify the anchor matches the intended recipient flow.",
|
|
330
|
-
"scenario": "Allocation created with a declared for_object binding and GuardIdentifier recipients",
|
|
331
|
-
"mitigation": "Before create: confirm for_object is the object the GuardIdentifier submissions will resolve to (the guard's passport must submit exactly this address for the recipient identifier). Entity/Signer sharing lines are unaffected by the anchor.",
|
|
332
|
-
"evidence": "for_object=${for_object_anchor}",
|
|
333
|
-
"stakeholders": ["owner", "recipient"]
|
|
334
|
-
},
|
|
335
321
|
{
|
|
336
322
|
"when": { "all": [
|
|
337
323
|
{ "field": "for_object_anchor_known", "op": "eq", "value": true },
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"kernel_fired": "Always true when the kernel analyzer reaches the emission site (the emission itself is the trigger)",
|
|
5
5
|
"eoa": "The controller EOA address of the current finding",
|
|
6
6
|
"only": "Identifier of the sole operator on the flagged Forward",
|
|
7
|
-
"r2_level": "high when the compensation fund is below the windowed order
|
|
7
|
+
"r2_level": "high when the compensation fund is below the largest single windowed order amount; medium when merely below the 3x-per-largest-order ceiling",
|
|
8
8
|
"r3_level": "medium when the EOA controls 5+ business-critical objects; low otherwise",
|
|
9
9
|
"r7_slot_viability": "Aggregate reward claim-slot viability: viable when any entry is viable; blocked when every entry is provably bound; unverifiable otherwise",
|
|
10
10
|
"r7_slot_audit": "Per-entry claim slot audit text (#index viability — reason)",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
{
|
|
43
43
|
"rule_id": "R2",
|
|
44
44
|
"dimension": "structural",
|
|
45
|
-
"trigger": "Compensation fund below the 3x ceiling of windowed order
|
|
45
|
+
"trigger": "Compensation fund below the 3x-per-order ceiling of the largest windowed order",
|
|
46
46
|
"cases": [
|
|
47
47
|
{
|
|
48
48
|
"when": { "field": "kernel_fired", "op": "truthy" },
|
|
49
49
|
"level": "fact:r2_level",
|
|
50
|
-
"title": "Payout exposure: compensation fund
|
|
51
|
-
"description": "
|
|
50
|
+
"title": "Payout exposure: compensation fund cannot cover a maximum-multiple award on the largest windowed order",
|
|
51
|
+
"description": "A ruling at the statutory per-order cap exceeds the funded balance; the awarded indemnity claim aborts on-chain.",
|
|
52
52
|
"exposure": {
|
|
53
53
|
"loss_parties": [
|
|
54
54
|
{ "role": "buyer", "basis": "A favorable ruling pays from compensation_fund; when the fund is below the awarded indemnity the payout claim aborts on-chain and the buyer carries the uncovered portion — no other balance backs it." }
|
|
@@ -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. 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.",
|
|
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, upwc-cat-261017 CAT-A1): zero allocator rows passing silently, an unsellable sales-less catalog, 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",
|
|
@@ -27,6 +27,13 @@
|
|
|
27
27
|
"has_return_rail": "The machine declares a return rail node (name matches /return/i) — the structural refund promise (PROMISE-ARB, L-01')",
|
|
28
28
|
"return_rail_node": "First return-rail node name",
|
|
29
29
|
"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)",
|
|
30
|
+
"prose_window_promise_count": "Window-context duration declarations found in the service/sales prose (PROMISE-TIME judgment gate — absent when the prose carries none)",
|
|
31
|
+
"first_prose_time_mismatch": "First prose window promise that no guard duration constant in the plan backs (PROMISE-TIME critical, upwk-mn-261017 F-55)",
|
|
32
|
+
"prose_time_mismatch_count": "Total prose window promises with no matching enforced guard duration",
|
|
33
|
+
"prose_time_mismatch_display": "Semicolon-joined list of ALL mismatched prose window promises",
|
|
34
|
+
"enforced_window_ms_display": "Comma-joined enforced window durations parsed from the plan's guard tables (plausible ms U64 constants)",
|
|
35
|
+
"first_unanchored_window_promise": "First restart/renew-style window promise, which needs an entry-anchored (1280 next_node) window guard to be true (PROMISE-TIME medium tier, F-55)",
|
|
36
|
+
"unanchored_window_promise_count": "Total restart/renew-style window promises in the prose",
|
|
30
37
|
"fund_topup_present": "The plan carries a compensation_fund_add step",
|
|
31
38
|
"fund_topup_amount": "Sum of parseable (integer smallest-unit) top-up balances; absent when unparseable",
|
|
32
39
|
"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)",
|
|
@@ -35,9 +42,25 @@
|
|
|
35
42
|
"repo_policy_keys_display": "Comma-joined policy names declared by the plan's repository create steps (present only when at least one policy exists — the REPO-GATE-KEY-01 judgment gate)",
|
|
36
43
|
"repo_gate_key_unbacked_count": "Composite where-query scans over a plan-local repository whose static key no declared policy uses (REPO-GATE-KEY-01, ZR-32)",
|
|
37
44
|
"first_repo_gate_key_unbacked": "First unbacked gate key, rendered as 'key' in guard 'step-id'",
|
|
38
|
-
"repo_gate_key_unbacked_display": "Comma-joined list of ALL unbacked gate keys"
|
|
45
|
+
"repo_gate_key_unbacked_display": "Comma-joined list of ALL unbacked gate keys",
|
|
46
|
+
"sales_step_present": "The plan materializes at least one sellable SKU (a service create with a non-empty sales list, or a configure step with method 'sales') — the order entry's existence predicate (PLAN-SALES-01)"
|
|
39
47
|
},
|
|
40
48
|
"rules": [
|
|
49
|
+
{
|
|
50
|
+
"rule_id": "PLAN-SALES-01",
|
|
51
|
+
"dimension": "composition",
|
|
52
|
+
"trigger": "A service plan materializes zero sellable SKUs. The compile kernel emits the service_sales configure step ONLY when inputs.sales is non-empty, so a plan that reaches publish without one ships a Service frozen with sales: [] and EVERY order_new aborts on the empty catalog (upwc-cat-261017 CAT-A1: the published shop was unsellable until SKUs were hand-added, and hand-added steps bypass the plan audit entirely).",
|
|
53
|
+
"cases": [
|
|
54
|
+
{
|
|
55
|
+
"when": { "all": [ { "field": "has_service", "op": "truthy" }, { "field": "sales_step_present", "op": "falsy" } ] },
|
|
56
|
+
"level": "high",
|
|
57
|
+
"title": "Service plan carries no sellable SKU (sales stays empty)",
|
|
58
|
+
"description": "The plan creates a Service but no step adds a sales entry, so the published object freezes with sales: []. Every order_new aborts on the empty catalog — the shop cannot take a single order, and patching the catalog by hand after publish bypasses this audit (the hand-built replica class that silently drops steps).",
|
|
59
|
+
"mitigation": "Pass a non-empty inputs.sales catalog so the compile kernel emits the service_sales configure step, keeping the catalog inside the audited plan before publish.",
|
|
60
|
+
"stakeholders": ["merchant", "customer"]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
41
64
|
{
|
|
42
65
|
"rule_id": "PLAN-ALLOC-01",
|
|
43
66
|
"dimension": "fund_flow",
|
|
@@ -114,6 +137,29 @@
|
|
|
114
137
|
}
|
|
115
138
|
]
|
|
116
139
|
},
|
|
140
|
+
{
|
|
141
|
+
"rule_id": "PROMISE-TIME",
|
|
142
|
+
"dimension": "time_anchor",
|
|
143
|
+
"trigger": "The listing prose (service description / sales item text) promises a review/acceptance/cancel/refund/return/claim WINDOW that no guard-table duration in the plan enforces (upwk-mn-261017 F-55: the WIP listing promised window durations no guard carried). Both sides freeze at publish — guards are immutable and the prose ships as-is — so a mismatched promise is the declared-but-not-enforced class and is unrepairable post-publish. Shipping/delivery SLAs are deliberately OUT of scope: they are off-chain fulfillment promises no time guard is expected to enforce.",
|
|
144
|
+
"cases": [
|
|
145
|
+
{
|
|
146
|
+
"when": { "field": "first_prose_time_mismatch", "op": "present" },
|
|
147
|
+
"level": "critical",
|
|
148
|
+
"title": "Listing promises '${first_prose_time_mismatch}' but no guard enforces it",
|
|
149
|
+
"description": "Window promises found in the listing prose: ${prose_window_promise_count}; mismatched: ${prose_time_mismatch_display}. Windows the plan's guards actually enforce: ${enforced_window_ms_display}. The unenforced promise is a buyer-side remedy that dies on contact with the chain: the buyer relies on it, no guard carries it, and both the guard tables and the machine freeze at publish. Blocking.",
|
|
150
|
+
"mitigation": "Align the two sides BEFORE publish: reword the listing to match an enforced window, or add/retime a window guard (pattern.deadline_window for act-until windows, pattern.time_lock_progress for act-after windows) so a guard constant carries exactly the promised duration (fee-param-derived, e.g. review_window_days / escrow_release_days).",
|
|
151
|
+
"stakeholders": ["merchant", "customer"]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"when": { "field": "first_unanchored_window_promise", "op": "present" },
|
|
155
|
+
"level": "medium",
|
|
156
|
+
"title": "Window-restart promise ('${first_unanchored_window_promise}') needs an entry-anchored guard",
|
|
157
|
+
"description": "${unanchored_window_promise_count} restart/renew-style window promise(s) in the prose. A window can only restart when its guard anchors on the progress.history.time (id 1280) ENTRY timestamp of the re-open event (next_node form) — a fresh entry appends and the window re-measures. A one-shot anchor (order.time, or the current_time that is rewritten at every migration) never restarts, so the promise would be false the first time the triggering event repeats. Disclosure: confirm the anchor form before publish.",
|
|
158
|
+
"mitigation": "Anchor the window guard on progress.history.time (id 1280, next_node='<the restarting event>', find=last) so each re-entry resets the window, or reword the prose. See the time_anchors table of the archetype in use for the canonical anchor wording.",
|
|
159
|
+
"stakeholders": ["merchant", "customer"]
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
},
|
|
117
163
|
{
|
|
118
164
|
"rule_id": "PLAN-K2",
|
|
119
165
|
"dimension": "fund_flow",
|
|
@@ -208,14 +254,14 @@
|
|
|
208
254
|
{
|
|
209
255
|
"rule_id": "TASKBIND-02",
|
|
210
256
|
"dimension": "fund_flow",
|
|
211
|
-
"trigger": "An allocator {GuardIdentifier:N} leg names a slot the guard table never declares as a b_submission Address — allocation
|
|
257
|
+
"trigger": "An allocator {GuardIdentifier:N} leg names a slot the guard table never declares as a b_submission Address — allocation aborts before paying (N-K21, amz-7f3a2c91). A properly DECLARED slot is fine: on an order-anchored allocation the submission equals payment_info.for_object (the paying Order), which is the deliberate two-step refund shape (the CoinWrapper lands on the Order and order::owner_receive extracts it to order.owner).",
|
|
212
258
|
"cases": [
|
|
213
259
|
{
|
|
214
260
|
"when": { "field": "first_alloc_slot_missing", "op": "present" },
|
|
215
261
|
"level": "critical",
|
|
216
262
|
"title": "Allocator leg ${first_alloc_slot_missing} is undeclared",
|
|
217
|
-
"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).",
|
|
218
|
-
"mitigation": "Declare
|
|
263
|
+
"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). The fix is to declare the slot, not to abandon the leg: a declared slot on an order-anchored allocation is payable and is how order refunds work.",
|
|
264
|
+
"mitigation": "Declare {identifier: N, b_submission: true, value_type: 'Address'} in the bound guard's table so the passport can carry the submitted address. For an order refund leg, identifier 0 carries the paying Order address; the guard should pin that submission to the context (order.owner or an agent may trigger) and the payout is extracted by order::owner_receive.",
|
|
219
265
|
"stakeholders": ["merchant", "customer"]
|
|
220
266
|
}
|
|
221
267
|
]
|
|
@@ -257,6 +303,36 @@
|
|
|
257
303
|
"stakeholders": ["merchant", "customer"]
|
|
258
304
|
}
|
|
259
305
|
]
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"rule_id": "REPO-WRITE-ONCE-01",
|
|
309
|
+
"dimension": "composition",
|
|
310
|
+
"trigger": "A repository WRITE guard (bound via a repository policy write_guard ref) negates a 'repository.data has' probe in its root — the RETRACTED write-once idiom (bk15 K3b; ofn-mn-261012 F-02, mainnet A/B verified). The write guard is verified inside the same PTB as the write, BEFORE the row exists, so the negated probe evaluates against the pre-write state and always fails the write. The chain now has a native per-policy write-once (PolicyRule write_once, K3(a)): the WRITE PATH itself rejects overwriting an existing record — but it is declared on the policy, never expressible as a guard leg.",
|
|
311
|
+
"cases": [
|
|
312
|
+
{
|
|
313
|
+
"when": { "field": "first_repo_write_once_guard", "op": "present" },
|
|
314
|
+
"level": "high",
|
|
315
|
+
"title": "Repository write guard '${first_repo_write_once_guard}' carries an INEFFECTIVE write-once leg",
|
|
316
|
+
"description": "${repo_write_once_guard_count} write-bound guard(s) negate a 'repository.data has' probe. The leg can never do what it claims: at verification time the row does not exist yet (same-PTB pre-write evaluation), so the negation always aborts the write with E_VERIFY_FAILED — the evidence row it gates can never be written. Mainnet A/B: the identical guard minus the leg succeeded, and the author then overwrote their own review. A defence that cannot be enforced is worse than none.",
|
|
317
|
+
"mitigation": "Remove the negated has-leg from the write guard and declare write-once on the policy instead (policy write_once: true — the write path rejects overwriting an existing record with E_POLICY_WRITE_ONCE_CONFLICT). For order-bound rails use the task-binding slot (254) plus the order anchor instead; for one-write-per-guard-pool semantics use the ONCE slot (255, b_submission=true) — per guard-pool, not per order. Do NOT re-teach the negated probe: it is a guaranteed runtime abort on the write path.",
|
|
318
|
+
"stakeholders": ["merchant", "customer"]
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"rule_id": "BUY-INFO-UNENFORCED-01",
|
|
324
|
+
"dimension": "composition",
|
|
325
|
+
"trigger": "A service declares customer_required but mounts no buy_guard (bk15 K11). The buy family on-chain never reads customer_required — the field alone enforces nothing at buy time. The chain has a buy-time enforcement primitive: buy_guard is evaluated inside the passport buy path, and non-passport buys reject outright when one is mounted.",
|
|
326
|
+
"cases": [
|
|
327
|
+
{
|
|
328
|
+
"when": { "field": "first_customer_required_unbacked", "op": "present" },
|
|
329
|
+
"level": "medium",
|
|
330
|
+
"title": "Service '${first_customer_required_unbacked}' declares customer_required with no buy_guard mounted",
|
|
331
|
+
"description": "${customer_required_unbacked_count} service(s) declare required customer information that nothing enforces at buy time: the on-chain buy entry points never read customer_required. Buyers who skip the info still complete the purchase, and fulfillment stalls later (post-buy collection, manual follow-up, or dispute).",
|
|
332
|
+
"mitigation": "Pick one deliberately: (a) mount a buy-spec guard (host service, key buy) whose submission legs carry the declared info, so the passport buy path enforces collection and non-passport buys reject; or (b) keep post-buy collection and disclose it honestly in the service description. Do not leave the declaration silently unenforced.",
|
|
333
|
+
"stakeholders": ["merchant", "customer"]
|
|
334
|
+
}
|
|
335
|
+
]
|
|
260
336
|
}
|
|
261
337
|
]
|
|
262
338
|
}
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
"title": "claim on Reward with zero balance",
|
|
298
298
|
"description": "Reward balance is 0. Any claim will abort with E_INSUFFICIENT_BALANCE (6). Owner must coin_add (153) or receive (154) to replenish.",
|
|
299
299
|
"scenario": "Marketing campaign budget exhausted but guards remain active",
|
|
300
|
-
"mitigation": "1) Owner: coin_add to replenish. 2) Owner:
|
|
300
|
+
"mitigation": "1) Owner: coin_add to replenish. 2) Owner: guard_remove ('expired' sweep or the guard ID) + lock guard additions via the time-lock to deactivate. 3) Claimer: wait for replenishment.",
|
|
301
301
|
"evidence": "balance=0",
|
|
302
302
|
"stakeholders": ["claimer", "owner"]
|
|
303
303
|
}
|
|
@@ -19,6 +19,8 @@ export interface ArchetypeTemplate {
|
|
|
19
19
|
differences: string[];
|
|
20
20
|
user_inputs: string[];
|
|
21
21
|
key_risk: string;
|
|
22
|
+
compensation_fund_policy?: "allowed" | "forbidden";
|
|
23
|
+
reentry_kind?: "none" | "review-loop" | "paid-cycle";
|
|
22
24
|
build_notes: string[];
|
|
23
25
|
evidence_refs?: string[];
|
|
24
26
|
payment_model?: "milestone" | "subscription" | "escrow";
|
|
@@ -37,10 +39,16 @@ export interface ArchetypeTemplate {
|
|
|
37
39
|
max_total_per_recipient?: string;
|
|
38
40
|
};
|
|
39
41
|
review_mode?: "none" | "review" | "review_reward";
|
|
42
|
+
after_sales_mode?: "none" | "return" | "exchange" | "warranty";
|
|
43
|
+
acceptance_mode?: "none" | "milestone" | "contest" | "bounty" | "agent";
|
|
44
|
+
installment_mode?: "none" | "deposit_balance" | "milestone_n";
|
|
45
|
+
affiliate_mode?: "none" | "commission";
|
|
46
|
+
crowdfunding_mode?: "none" | "threshold" | "flexible";
|
|
40
47
|
}
|
|
41
|
-
export declare const BUILTIN_TEMPLATES_VERSION =
|
|
48
|
+
export declare const BUILTIN_TEMPLATES_VERSION = 102;
|
|
42
49
|
export declare const BUILTIN_TEMPLATES: ArchetypeTemplate[];
|
|
43
50
|
export declare const TEMPLATE_KEYWORDS: Record<string, string[]>;
|
|
51
|
+
export declare const TEMPLATE_TAGS: Record<string, string[]>;
|
|
44
52
|
export declare function getBuiltinTemplate(id: string): ArchetypeTemplate | undefined;
|
|
45
53
|
export declare function listBuiltinTemplates(): ArchetypeTemplate[];
|
|
46
54
|
export declare function validateBuiltinTemplateCatalog(entries?: ArchetypeTemplate[]): void;
|