@wowok/agent-mcp 3.3.6 → 3.3.8
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/eval-order.js +1 -1
- package/dist/chain-semantics/field-capability.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/communication/message-cursors.d.ts +35 -0
- package/dist/communication/message-cursors.js +1 -0
- package/dist/communication/wts-attestation.d.ts +5 -0
- 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 +7 -0
- package/dist/composition/inflight.js +1 -1
- package/dist/composition/materialize.d.ts +4 -1
- package/dist/composition/materialize.js +1 -1
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +1 -1
- package/dist/config/store-policy.d.ts +14 -0
- package/dist/config/store-policy.js +1 -0
- package/dist/config/store-policy.spec.d.ts +1 -0
- package/dist/config/store-policy.spec.js +1 -0
- package/dist/customer/industry-risks.js +1 -1
- package/dist/customer/user-preferences.js +1 -1
- package/dist/data/projection/facets.spec.js +1 -1
- package/dist/evaluation/builtins/graph-service.spec.js +1 -1
- package/dist/evaluation/engine.js +1 -1
- package/dist/evaluation/match-policy.d.ts +30 -6
- package/dist/evaluation/match-policy.js +1 -1
- package/dist/evaluation/match-policy.spec.js +1 -1
- package/dist/experience/realtime-feedback.js +1 -1
- package/dist/extensions/business-modules.d.ts +1 -1
- package/dist/extensions/business-modules.js +1 -1
- 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/expand.js +1 -1
- package/dist/graph/onchain/exposure.js +1 -1
- package/dist/graph/onchain/facts.d.ts +1 -0
- package/dist/graph/onchain/facts.js +1 -1
- package/dist/graph/onchain/facts.spec.js +1 -1
- package/dist/harness/recover.js +1 -1
- package/dist/intent/types.d.ts +1 -1
- package/dist/intent/types.js +1 -1
- package/dist/keeper/detectors.d.ts +3 -0
- package/dist/keeper/detectors.js +1 -1
- package/dist/keeper/keeper.spec.js +1 -1
- package/dist/knowledge/acquisition-flywheel.js +1 -1
- package/dist/knowledge/allocation-ledger.d.ts +1 -0
- package/dist/knowledge/allocation-ledger.js +1 -1
- package/dist/knowledge/allocator-rail-verifier.d.ts +6 -2
- package/dist/knowledge/allocator-rail-verifier.js +1 -1
- package/dist/knowledge/arbitration-ledger.js +1 -1
- package/dist/knowledge/audit-rules.d.ts +37 -0
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/baselines/rules/plan.json +128 -3
- package/dist/knowledge/builtin-templates.d.ts +18 -1
- package/dist/knowledge/builtin-templates.js +1 -1
- package/dist/knowledge/commission-landing.d.ts +26 -0
- package/dist/knowledge/commission-landing.js +1 -0
- package/dist/knowledge/discount-threshold.js +1 -1
- package/dist/knowledge/event-semantics.js +1 -1
- package/dist/knowledge/fund-layer.d.ts +7 -0
- package/dist/knowledge/fund-layer.js +1 -1
- package/dist/knowledge/getting-started.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-puzzle.js +1 -1
- package/dist/knowledge/guard-render.d.ts +7 -0
- package/dist/knowledge/guard-render.js +1 -1
- package/dist/knowledge/guard-risk.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.d.ts +4 -0
- package/dist/knowledge/industry-generalizer.js +1 -1
- package/dist/knowledge/industry-registry.d.ts +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/machine-fork-watch.d.ts +9 -0
- package/dist/knowledge/machine-fork-watch.js +1 -0
- package/dist/knowledge/migration-preflight.js +1 -1
- package/dist/knowledge/projection.spec.js +1 -1
- package/dist/knowledge/scenario-modes.d.ts +8 -2
- package/dist/knowledge/scenario-modes.js +1 -1
- package/dist/knowledge/semantic-ir.d.ts +132 -0
- package/dist/knowledge/semantic-ir.js +1 -0
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/strategy-manuals.js +1 -1
- package/dist/knowledge/template-index.js +1 -1
- package/dist/knowledge/template-loader.d.ts +45 -0
- package/dist/knowledge/template-loader.js +1 -1
- package/dist/knowledge/template-prose.d.ts +50 -0
- package/dist/knowledge/template-prose.js +1 -0
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.d.ts +5 -3
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/template-validation.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/monitor/normalize.d.ts +1 -1
- package/dist/monitor/normalize.js +1 -1
- package/dist/monitor/types.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 +16 -6
- package/dist/playbooks/service-build/merchant-guide.js +1 -1
- package/dist/playbooks/service-build/migration-planner.d.ts +11 -2
- package/dist/playbooks/service-build/migration-planner.js +1 -1
- package/dist/playbooks/service-build/mode-actions.d.ts +8 -0
- package/dist/playbooks/service-build/mode-actions.js +1 -1
- package/dist/playbooks/service-build/object-panorama.d.ts +22 -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/relationship-profile.js +1 -1
- package/dist/playbooks/service-build/reverse-mapping-nk4.spec.js +1 -1
- package/dist/playbooks/service-build/reverse-mapping.d.ts +1 -0
- package/dist/playbooks/service-build/reverse-mapping.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/review/index.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/benchmark-migration/index.d.ts +135 -10
- package/dist/schema/benchmark-migration/index.js +1 -1
- package/dist/schema/call/allocation.d.ts +3 -0
- package/dist/schema/call/allocation.js +1 -1
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +32 -0
- package/dist/schema/call/bridge.d.ts +8 -0
- package/dist/schema/call/error-codes.d.ts +1 -1
- package/dist/schema/call/error-codes.js +1 -1
- package/dist/schema/call/order.js +1 -1
- package/dist/schema/call/reward.d.ts +10 -0
- package/dist/schema/call/reward.js +1 -1
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/config/index.d.ts +24 -0
- package/dist/schema/config/index.js +1 -1
- package/dist/schema/evaluation/index.d.ts +152 -0
- package/dist/schema/evaluation/index.js +1 -1
- package/dist/schema/goal/index.d.ts +16 -0
- package/dist/schema/goal/planning.d.ts +29 -0
- package/dist/schema/goal/planning.js +1 -1
- package/dist/schema/industry-pack/index.d.ts +70 -0
- package/dist/schema/industry-pack/modes.d.ts +70 -0
- package/dist/schema/industry-pack/modes.js +1 -1
- package/dist/schema/intent-radar/index.d.ts +3 -0
- package/dist/schema/intent-radar/index.js +1 -1
- package/dist/schema/local/index.d.ts +80 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +278 -1
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +6 -0
- package/dist/schema/query/bi.d.ts +38 -0
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +148 -47
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/service-clone/index.d.ts +17 -0
- package/dist/schema/service-clone/index.js +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +8 -0
- package/dist/schemas/benchmark_migration_operation.output.json +296 -2
- package/dist/schemas/benchmark_migration_operation.schema.json +292 -7
- package/dist/schemas/bridge_operation.output.json +8 -0
- package/dist/schemas/config_operation.output.json +95 -0
- package/dist/schemas/config_operation.schema.json +16 -1
- package/dist/schemas/evaluation_operation.output.json +240 -0
- package/dist/schemas/evaluation_operation.schema.json +397 -1
- package/dist/schemas/goal_operation.schema.json +40 -10
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/industry_pack_operation.output.json +90 -2
- package/dist/schemas/industry_pack_operation.schema.json +236 -0
- package/dist/schemas/intent_radar.output.json +2 -0
- package/dist/schemas/intent_radar.schema.json +1 -0
- package/dist/schemas/local_cache_operation.output.json +8 -0
- package/dist/schemas/local_history_operation.output.json +8 -0
- package/dist/schemas/local_info_operation.output.json +8 -0
- package/dist/schemas/local_mark_operation.output.json +8 -0
- package/dist/schemas/messenger_operation.output.json +609 -1
- package/dist/schemas/messenger_operation.schema.json +96 -1
- package/dist/schemas/onchain_events.output.json +281 -11
- package/dist/schemas/onchain_events.schema.json +5 -1
- package/dist/schemas/onchain_operations.output.json +8 -0
- package/dist/schemas/onchain_operations.schema.json +371 -10
- package/dist/schemas/onchain_operations_allocation.schema.json +10 -1
- package/dist/schemas/onchain_operations_arbitration.schema.json +1 -1
- package/dist/schemas/onchain_operations_guard.schema.json +318 -0
- package/dist/schemas/onchain_operations_order.schema.json +1 -1
- package/dist/schemas/onchain_operations_reward.schema.json +35 -1
- package/dist/schemas/onchain_operations_service.schema.json +6 -6
- package/dist/schemas/query_toolkit.output.json +305 -8
- package/dist/schemas/service_clone_operation.output.json +79 -0
- package/dist/tools/handlers/benchmark-migration.d.ts +15 -0
- package/dist/tools/handlers/benchmark-migration.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/evaluation.js +1 -1
- package/dist/tools/handlers/evaluation.spec.js +1 -1
- package/dist/tools/handlers/intent-radar.js +1 -1
- package/dist/tools/handlers/messenger.d.ts +1 -0
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/onchain.d.ts +20 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/query.d.ts +1 -0
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/handlers/service-clone.d.ts +18 -0
- package/dist/tools/handlers/service-clone.js +1 -1
- package/dist/tools/handlers/wip.js +1 -1
- package/dist/tools/registry/agent.js +1 -1
- package/dist/tools/registry/business.js +1 -1
- package/dist/tools/registry/query.js +1 -1
- package/dist/tools/wip-verify-ledger.d.ts +14 -0
- package/dist/tools/wip-verify-ledger.js +1 -0
- package/dist/tools/wrap.d.ts +4 -0
- package/dist/tools/wrap.js +1 -1
- package/package.json +2 -2
|
@@ -4,6 +4,7 @@ export declare const BenchmarkMigrationSchema: z.ZodObject<{
|
|
|
4
4
|
template_list: "template_list";
|
|
5
5
|
template_get: "template_get";
|
|
6
6
|
template_generate: "template_generate";
|
|
7
|
+
plan_execute: "plan_execute";
|
|
7
8
|
template_scan: "template_scan";
|
|
8
9
|
migration_import: "migration_import";
|
|
9
10
|
migration_review: "migration_review";
|
|
@@ -12,6 +13,55 @@ export declare const BenchmarkMigrationSchema: z.ZodObject<{
|
|
|
12
13
|
template_id: z.ZodOptional<z.ZodString>;
|
|
13
14
|
industry: z.ZodOptional<z.ZodString>;
|
|
14
15
|
description: z.ZodOptional<z.ZodString>;
|
|
16
|
+
semantic_ir: z.ZodOptional<z.ZodObject<{
|
|
17
|
+
schema_version: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
18
|
+
locale: z.ZodString;
|
|
19
|
+
traits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
20
|
+
trait: z.ZodString;
|
|
21
|
+
value: z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>;
|
|
22
|
+
confidence: z.ZodNumber;
|
|
23
|
+
span: z.ZodOptional<z.ZodObject<{
|
|
24
|
+
start: z.ZodNumber;
|
|
25
|
+
end: z.ZodNumber;
|
|
26
|
+
}, z.core.$strict>>;
|
|
27
|
+
quote: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$strict>>>;
|
|
29
|
+
domains: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
30
|
+
domain: z.ZodString;
|
|
31
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
span: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
start: z.ZodNumber;
|
|
34
|
+
end: z.ZodNumber;
|
|
35
|
+
}, z.core.$strict>>;
|
|
36
|
+
quote: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strict>>>;
|
|
38
|
+
claims: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39
|
+
key: z.ZodString;
|
|
40
|
+
value: z.ZodNumber;
|
|
41
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
span: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
start: z.ZodNumber;
|
|
44
|
+
end: z.ZodNumber;
|
|
45
|
+
}, z.core.$strict>>;
|
|
46
|
+
quote: z.ZodOptional<z.ZodString>;
|
|
47
|
+
}, z.core.$strict>>>;
|
|
48
|
+
discovery: z.ZodOptional<z.ZodObject<{
|
|
49
|
+
industry: z.ZodOptional<z.ZodString>;
|
|
50
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
+
product_ref: z.ZodOptional<z.ZodString>;
|
|
52
|
+
english_summary: z.ZodOptional<z.ZodString>;
|
|
53
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
}, z.core.$strict>>;
|
|
55
|
+
provenance: z.ZodObject<{
|
|
56
|
+
source: z.ZodEnum<{
|
|
57
|
+
human: "human";
|
|
58
|
+
caller_llm: "caller_llm";
|
|
59
|
+
}>;
|
|
60
|
+
model: z.ZodOptional<z.ZodString>;
|
|
61
|
+
prompt_version: z.ZodOptional<z.ZodString>;
|
|
62
|
+
generated_at: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
}, z.core.$strict>;
|
|
64
|
+
}, z.core.$strict>>;
|
|
15
65
|
url: z.ZodOptional<z.ZodString>;
|
|
16
66
|
fee_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
17
67
|
guard_resolutions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -34,6 +84,7 @@ export declare const BenchmarkMigrationSchema: z.ZodObject<{
|
|
|
34
84
|
review_reward: "review_reward";
|
|
35
85
|
}>>;
|
|
36
86
|
reward_funding: z.ZodOptional<z.ZodString>;
|
|
87
|
+
reward_claim_amount: z.ZodOptional<z.ZodString>;
|
|
37
88
|
after_sales_mode: z.ZodOptional<z.ZodEnum<{
|
|
38
89
|
none: "none";
|
|
39
90
|
return: "return";
|
|
@@ -61,6 +112,13 @@ export declare const BenchmarkMigrationSchema: z.ZodObject<{
|
|
|
61
112
|
none: "none";
|
|
62
113
|
flexible: "flexible";
|
|
63
114
|
}>>;
|
|
115
|
+
logistics_mode: z.ZodOptional<z.ZodEnum<{
|
|
116
|
+
none: "none";
|
|
117
|
+
courier: "courier";
|
|
118
|
+
carrier: "carrier";
|
|
119
|
+
merchant_managed: "merchant_managed";
|
|
120
|
+
pickup_point: "pickup_point";
|
|
121
|
+
}>>;
|
|
64
122
|
sales: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
65
123
|
incentive: z.ZodOptional<z.ZodObject<{
|
|
66
124
|
amount: z.ZodString;
|
|
@@ -75,6 +133,10 @@ export declare const BenchmarkMigrationSchema: z.ZodObject<{
|
|
|
75
133
|
mainnet: "mainnet";
|
|
76
134
|
localnet: "localnet";
|
|
77
135
|
}>>;
|
|
136
|
+
plan: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
137
|
+
completed_steps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
138
|
+
previous_outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
139
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
78
140
|
}, z.core.$strict>;
|
|
79
141
|
export type BenchmarkMigrationInput = z.infer<typeof BenchmarkMigrationSchema>;
|
|
80
142
|
export declare const BenchmarkMigrationOutputSchema: z.ZodObject<{
|
|
@@ -98,14 +160,18 @@ export declare const BenchmarkMigrationOutputSchema: z.ZodObject<{
|
|
|
98
160
|
supplier: "supplier";
|
|
99
161
|
both: "both";
|
|
100
162
|
}>;
|
|
163
|
+
tags: z.ZodArray<z.ZodString>;
|
|
101
164
|
}, z.core.$strip>>;
|
|
165
|
+
discovery_vocabulary: z.ZodObject<{
|
|
166
|
+
industries: z.ZodArray<z.ZodString>;
|
|
167
|
+
tags: z.ZodArray<z.ZodString>;
|
|
168
|
+
product_refs: z.ZodArray<z.ZodString>;
|
|
169
|
+
}, z.core.$strip>;
|
|
102
170
|
load_errors: z.ZodArray<z.ZodString>;
|
|
103
171
|
}, z.core.$strip>, z.ZodObject<{
|
|
104
172
|
action: z.ZodLiteral<"template_get">;
|
|
105
173
|
template: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
106
174
|
}, z.core.$strip>, z.ZodObject<{
|
|
107
|
-
action: z.ZodLiteral<"template_generate">;
|
|
108
|
-
template_id: z.ZodString;
|
|
109
175
|
scan: z.ZodObject<{
|
|
110
176
|
risk_level: z.ZodEnum<{
|
|
111
177
|
low: "low";
|
|
@@ -131,11 +197,21 @@ export declare const BenchmarkMigrationOutputSchema: z.ZodObject<{
|
|
|
131
197
|
red_flags: z.ZodArray<z.ZodString>;
|
|
132
198
|
}, z.core.$strip>;
|
|
133
199
|
plan: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
200
|
+
stale_build: z.ZodObject<{
|
|
201
|
+
stale: z.ZodBoolean;
|
|
202
|
+
known: z.ZodBoolean;
|
|
203
|
+
lag_minutes: z.ZodNullable<z.ZodNumber>;
|
|
204
|
+
detail: z.ZodString;
|
|
205
|
+
}, z.core.$strip>;
|
|
134
206
|
verdict: z.ZodObject<{
|
|
135
207
|
buildable: z.ZodBoolean;
|
|
136
208
|
blockers: z.ZodArray<z.ZodString>;
|
|
137
209
|
}, z.core.$strip>;
|
|
138
210
|
next_action: z.ZodString;
|
|
211
|
+
semantic_ir_digest: z.ZodOptional<z.ZodString>;
|
|
212
|
+
semantic_ir_issues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
213
|
+
action: z.ZodLiteral<"template_generate">;
|
|
214
|
+
template_id: z.ZodString;
|
|
139
215
|
}, z.core.$strip>, z.ZodObject<{
|
|
140
216
|
action: z.ZodLiteral<"template_scan">;
|
|
141
217
|
scan: z.ZodObject<{
|
|
@@ -161,7 +237,16 @@ export declare const BenchmarkMigrationOutputSchema: z.ZodObject<{
|
|
|
161
237
|
}, z.core.$strip>>;
|
|
162
238
|
red_flags: z.ZodArray<z.ZodString>;
|
|
163
239
|
}, z.core.$strip>;
|
|
240
|
+
stale_build: z.ZodObject<{
|
|
241
|
+
stale: z.ZodBoolean;
|
|
242
|
+
known: z.ZodBoolean;
|
|
243
|
+
lag_minutes: z.ZodNullable<z.ZodNumber>;
|
|
244
|
+
detail: z.ZodString;
|
|
245
|
+
}, z.core.$strip>;
|
|
164
246
|
}, z.core.$strip>, z.ZodObject<{
|
|
247
|
+
next_action: z.ZodString;
|
|
248
|
+
semantic_ir_digest: z.ZodOptional<z.ZodString>;
|
|
249
|
+
semantic_ir_issues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
165
250
|
action: z.ZodLiteral<"migration_import">;
|
|
166
251
|
log: z.ZodObject<{
|
|
167
252
|
source: z.ZodObject<{
|
|
@@ -170,6 +255,19 @@ export declare const BenchmarkMigrationOutputSchema: z.ZodObject<{
|
|
|
170
255
|
detected_industry: z.ZodString;
|
|
171
256
|
matched_template: z.ZodString;
|
|
172
257
|
}, z.core.$strip>;
|
|
258
|
+
template_match: z.ZodObject<{
|
|
259
|
+
source: z.ZodEnum<{
|
|
260
|
+
keywords: "keywords";
|
|
261
|
+
product_ref: "product_ref";
|
|
262
|
+
explicit: "explicit";
|
|
263
|
+
discovery_product_ref: "discovery_product_ref";
|
|
264
|
+
discovery_tags: "discovery_tags";
|
|
265
|
+
ir_industry_fallback: "ir_industry_fallback";
|
|
266
|
+
industry_leader: "industry_leader";
|
|
267
|
+
}>;
|
|
268
|
+
confidence: z.ZodNumber;
|
|
269
|
+
matched_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
270
|
+
}, z.core.$strip>;
|
|
173
271
|
mapped: z.ZodArray<z.ZodObject<{
|
|
174
272
|
source_element: z.ZodString;
|
|
175
273
|
target_object: z.ZodOptional<z.ZodString>;
|
|
@@ -205,7 +303,11 @@ export declare const BenchmarkMigrationOutputSchema: z.ZodObject<{
|
|
|
205
303
|
localnet: "localnet";
|
|
206
304
|
}>;
|
|
207
305
|
}, z.core.$strip>;
|
|
208
|
-
|
|
306
|
+
inference_source: z.ZodOptional<z.ZodEnum<{
|
|
307
|
+
keywords: "keywords";
|
|
308
|
+
semantic_ir: "semantic_ir";
|
|
309
|
+
"semantic_ir+keywords": "semantic_ir+keywords";
|
|
310
|
+
}>>;
|
|
209
311
|
}, z.core.$strip>, z.ZodObject<{
|
|
210
312
|
action: z.ZodLiteral<"migration_review">;
|
|
211
313
|
log: z.ZodObject<{
|
|
@@ -215,6 +317,19 @@ export declare const BenchmarkMigrationOutputSchema: z.ZodObject<{
|
|
|
215
317
|
detected_industry: z.ZodString;
|
|
216
318
|
matched_template: z.ZodString;
|
|
217
319
|
}, z.core.$strip>;
|
|
320
|
+
template_match: z.ZodObject<{
|
|
321
|
+
source: z.ZodEnum<{
|
|
322
|
+
keywords: "keywords";
|
|
323
|
+
product_ref: "product_ref";
|
|
324
|
+
explicit: "explicit";
|
|
325
|
+
discovery_product_ref: "discovery_product_ref";
|
|
326
|
+
discovery_tags: "discovery_tags";
|
|
327
|
+
ir_industry_fallback: "ir_industry_fallback";
|
|
328
|
+
industry_leader: "industry_leader";
|
|
329
|
+
}>;
|
|
330
|
+
confidence: z.ZodNumber;
|
|
331
|
+
matched_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
332
|
+
}, z.core.$strip>;
|
|
218
333
|
mapped: z.ZodArray<z.ZodObject<{
|
|
219
334
|
source_element: z.ZodString;
|
|
220
335
|
target_object: z.ZodOptional<z.ZodString>;
|
|
@@ -258,13 +373,6 @@ export declare const BenchmarkMigrationOutputSchema: z.ZodObject<{
|
|
|
258
373
|
}, z.core.$strip>;
|
|
259
374
|
next_action: z.ZodString;
|
|
260
375
|
}, z.core.$strip>, z.ZodObject<{
|
|
261
|
-
action: z.ZodLiteral<"migration_apply">;
|
|
262
|
-
template_id: z.ZodString;
|
|
263
|
-
network: z.ZodEnum<{
|
|
264
|
-
testnet: "testnet";
|
|
265
|
-
mainnet: "mainnet";
|
|
266
|
-
localnet: "localnet";
|
|
267
|
-
}>;
|
|
268
376
|
scan: z.ZodObject<{
|
|
269
377
|
risk_level: z.ZodEnum<{
|
|
270
378
|
low: "low";
|
|
@@ -295,6 +403,23 @@ export declare const BenchmarkMigrationOutputSchema: z.ZodObject<{
|
|
|
295
403
|
blockers: z.ZodArray<z.ZodString>;
|
|
296
404
|
}, z.core.$strip>;
|
|
297
405
|
next_action: z.ZodString;
|
|
406
|
+
semantic_ir_digest: z.ZodOptional<z.ZodString>;
|
|
407
|
+
semantic_ir_issues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
408
|
+
action: z.ZodLiteral<"migration_apply">;
|
|
409
|
+
template_id: z.ZodString;
|
|
410
|
+
network: z.ZodEnum<{
|
|
411
|
+
testnet: "testnet";
|
|
412
|
+
mainnet: "mainnet";
|
|
413
|
+
localnet: "localnet";
|
|
414
|
+
}>;
|
|
415
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
416
|
+
action: z.ZodLiteral<"plan_execute">;
|
|
417
|
+
completed: z.ZodBoolean;
|
|
418
|
+
steps: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
419
|
+
outputs: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
420
|
+
preflight: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
421
|
+
readback: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
422
|
+
next_action: z.ZodString;
|
|
298
423
|
}, z.core.$strip>], "action">;
|
|
299
424
|
}, z.core.$strict>;
|
|
300
425
|
export type BenchmarkMigrationOutput = z.infer<typeof BenchmarkMigrationOutputSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{GuardResolutionInputSchema}from'../goal/planning.js';const TemplateSummarySchema=z['object']({'id':z['string']()['describe']('Template\x20id\x20\x27<industry>/<variant>\x27,\x20e.g.\x20\x27retail/scale-marketplace\x27.'),'industry':z['string']()['describe']('Industry\x20vertical.'),'variant':z['string']()['describe']('Business-model\x20variant\x20slug.'),'product_ref':z['string']()['optional']()['describe']('Benchmark\x20product\x20slug\x20this\x20archetype\x20models\x20(e.g.\x20\x27amazon\x27).\x20The\x20only\x20sanctioned\x20company\x20name;\x20users\x20can\x20pick\x20a\x20template\x20by\x20naming\x20the\x20incumbent\x20product.'),'archetype':z['enum'](['leader','challenger']),'key_risk':z['string']()['describe']('Primary\x20risk\x20this\x20template\x20mitigates.'),'node_count':z['number']()['describe']('Machine\x20node\x20count.'),'guard_count':z['number']()['describe']('Guard\x20template\x20count.'),'recommended_role':z['enum'](['merchant','supplier','both'])})['describe']('Compact\x20template\x20listing\x20row.'),TemplateScanFindingSchema=z['object']({'rule_id':z['string']()['optional']()['describe']('Rule\x20id\x20when\x20known\x20(e.g.\x20\x27R-M3-01\x27,\x20\x27R1\x27).'),'severity':z['enum'](['low','medium','high','critical']),'title':z['string'](),'detail':z['string'](),'suggestion':z['string']()})['describe']('One\x20pre-deploy\x20risk\x20finding.'),MigrationEntrySchema=z['object']({'source_element':z['string']()['describe']('Competitor-side\x20element.'),'target_object':z['string']()['optional']()['describe']('WoWok\x20object/mechanism\x20it\x20maps\x20to.'),'mapping_note':z['string']()['describe']('One-line\x20mapping\x20explanation.'),'reason':z['string']()['optional']()['describe']('Why\x20it\x20cannot\x20be\x20migrated,\x20or\x20why\x20it\x20needs\x20a\x20decision.')})['describe']('One\x20competitor\x20element\x20and\x20its\x20WoWok\x20mapping\x20outcome.'),MigrationLogSchema=z['object']({'source':z['object']({'url':z['string']()['optional'](),'description':z['string'](),'detected_industry':z['string'](),'matched_template':z['string']()['describe']('Matched\x20template\x20id\x20\x27<industry>/<variant>\x27.')})['describe']('Migration\x20source\x20provenance.'),'mapped':z['array'](MigrationEntrySchema)['describe']('Elements\x20that\x20map\x20cleanly\x20to\x20WoWok\x20objects.'),'unmapped':z['array'](MigrationEntrySchema)['describe']('Elements\x20that\x20cannot\x20be\x20migrated,\x20with\x20reasons.'),'manual_review':z['array'](MigrationEntrySchema)['describe']('Elements\x20requiring\x20an\x20explicit\x20user\x20decision.'),'wowok_advantages':z['array'](z['string']())['describe']('WoWok\x20platform\x20advantages\x20surfaced\x20during\x20migration.'),'customizable_modules':z['array'](z['string']())['describe']('Business-module\x20ids\x20the\x20user\x20can\x20customize.'),'role_assessment':z['object']({'recommended':z['string'](),'rationale':z['string'](),'alternatives':z['array'](z['string']())})['describe']('Merchant\x20vs\x20supplier\x20role\x20assessment.'),'risk_check':z['object']({'passed':z['boolean'](),'findings':z['array'](z['string']())})['describe']('Dry-run\x20risk\x20check\x20against\x20the\x20matched\x20template.'),'network':z['enum'](['testnet','mainnet','localnet'])['describe']('Target\x20network\x20(default\x20testnet).\x20\x27localnet\x27\x20labels\x20plans\x20validated\x20against\x20a\x20local\x20net\x20—\x20the\x20migration\x20pipeline\x20is\x20network-agnostic,\x20this\x20is\x20provenance\x20metadata,\x20not\x20an\x20execution\x20target.')})['describe']('Structured\x20competitor-migration\x20log.'),SaleItemIncentiveSchema=z['object']({'amount':z['string']()['describe']('Incentive\x20amount\x20as\x20a\x20buyer-readable\x20string\x20(e.g.\x20\x225\x20USDC\x22\x20or\x20\x221000000000\x20WOW\x20smallest\x20units\x22).\x20Quote-time\x20disclosure\x20only\x20—\x20fund\x20the\x20actual\x20rail\x20separately\x20(e.g.\x20the\x20template\x27s\x20review_reward_pool).'),'conditions':z['string']()['describe']('What\x20the\x20buyer\x20must\x20do\x20to\x20earn\x20it\x20(e.g.\x20\x22leave\x20a\x20written\x20+\x20rated\x20review\x20of\x20the\x20delivered\x20work\x22).\x20Must\x20be\x20perceptible\x20BEFORE\x20the\x20order\x20is\x20placed.'),'basis':z['string']()['describe']('Accrual\x20scope:\x20\x22per-order\x22\x20/\x20\x22once-per-buyer\x22\x20/\x20\x22once-per-buyer-per-order\x22.\x20Matches\x20the\x20claim\x20guard\x27s\x20replay\x20semantics\x20—\x20a\x20recipient-only\x20gate\x20is\x20once-per-buyer-for-life,\x20an\x20order-scoped\x20stamp\x20is\x20per-order\x20(SV-2).'),'claim_window':z['string']()['describe']('How\x20long\x20the\x20buyer\x20has\x20to\x20claim\x20(e.g.\x20\x2214\x20days\x20from\x20the\x20review\x22).\x20Mirror\x20the\x20reward\x20claim\x20guard\x27s\x20window\x20fee_param\x20so\x20the\x20quote\x20never\x20promises\x20more\x20than\x20the\x20rail\x20pays.')})['strict']()['describe']('Optional\x20structured\x20incentive\x20for\x20one\x20sale\x20item\x20(G-07):\x20buyer-perceivable\x20reward\x20terms\x20carried\x20to\x20the\x20compiled\x20plan\x20for\x20quote-time\x20disclosure.\x20DECLARATION\x20ONLY\x20—\x20the\x20chain\x20SaleItem\x20has\x20no\x20such\x20field;\x20the\x20actual\x20payout\x20rail\x20is\x20configured\x20separately.'),SaleItemPlanSchema=z['object']({'incentive':SaleItemIncentiveSchema['optional']()})['passthrough']()['describe']('One\x20sellable\x20SKU\x20in\x20the\x20plan\x20catalog:\x20the\x20chain\x20SaleItem\x20fields\x20plus\x20the\x20optional\x20structured\x20`incentive`\x20declaration\x20(G-07).\x20Unknown\x20keys\x20pass\x20through\x20so\x20chain-side\x20fields\x20can\x20evolve\x20without\x20schema\x20changes.');export const BenchmarkMigrationSchema=z['object']({'action':z['enum'](['template_list','template_get','template_generate','template_scan','migration_import','migration_review','migration_apply'])['describe']('Action:\x20\x27template_list\x27\x20=\x20list\x20the\x20loaded\x20MD\x20industry\x20templates\x20(optional\x20industry\x20filter);\x20'+'\x27template_get\x27\x20=\x20fetch\x20one\x20template\x20by\x20id\x20(template_id\x20required);\x20'+'\x27template_generate\x27\x20=\x20generate\x20a\x20creation\x20plan\x20from\x20a\x20template\x20via\x20the\x20merchant-guide\x20'+'pipeline\x20(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20never\x20executes\x20on-chain);\x20'+'\x27template_scan\x27\x20=\x20pre-deploy\x20risk\x20scan\x20of\x20one\x20template\x20(template_id\x20required;\x20returns\x20'+'risk_level/findings/red_flags\x20plus\x20a\x20drift\x20face\x20—\x20disk-vs-catalog\x20provenance\x20of\x20the\x20'+'scanned\x20body;\x20CRITICAL\x20blocks\x20generation/apply);\x20'+'\x27migration_import\x27\x20=\x20competitor\x20URL/description\x20→\x20migration\x20plan\x20+\x20MigrationLog\x20'+'(description\x20required);\x20'+'\x27migration_review\x27\x20=\x20surface\x20the\x20MigrationLog\x20for\x20user\x20confirmation\x20(log\x20required);\x20'+'\x27migration_apply\x27\x20=\x20run\x20the\x20approved\x20template\x20through\x20the\x20merchant-guide\x20pipeline\x20'+'(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20default\x20network\x20testnet).'),'template_id':z['string']()['optional']()['describe']('Template\x20id\x20\x27<industry>/<variant>\x27\x20(required\x20for\x20template_get\x20/\x20template_generate\x20/\x20template_scan\x20/\x20migration_apply),\x20e.g.\x20\x27retail/scale-marketplace\x27.'),'industry':z['string']()['optional']()['describe']('Industry\x20filter\x20for\x20template_list;\x20industry\x20hint\x20for\x20migration_import.\x20'+'Any\x20registered\x20industry\x20is\x20accepted\x20(builtin:\x20freelance,\x20rental,\x20education,\x20'+'travel,\x20subscription,\x20retail;\x20plus\x20custom\x20industries\x20registered\x20via\x20industry\x20packs).\x20'+'Aliases\x20are\x20resolved\x20(e.g.\x20\x27ecommerce\x27\x20→\x20\x27retail\x27).'),'description':z['string']()['optional']()['describe']('Natural-language\x20business/competitor\x20description\x20(required\x20for\x20migration_import;\x20used\x20by\x20template_generate\x20as\x20the\x20intent\x20text).'),'url':z['string']()['optional']()['describe']('Competitor\x20store/profile\x20URL\x20for\x20migration_import\x20(recorded\x20as\x20provenance\x20only).'),'fee_overrides':z['record'](z['string'](),z['union']([z['number'](),z['string']()]))['optional']()['describe']('Template\x20fee-parameter\x20overrides\x20for\x20template_generate\x20(e.g.\x20commission_rate_bps).'),'guard_resolutions':z['record'](z['string'](),GuardResolutionInputSchema)['optional']()['describe']('Judgment-layer\x20resolutions\x20for\x20pending\x20guard\x20designs\x20(C6-DEEP),\x20keyed\x20by\x20plan.pending_guard_designs[].key.\x20'+'A\x20blocked\x20migration_apply/template_generate\x20lists\x20every\x20unresolved\x20design\x20—\x20resolve\x20each\x20here\x20'+'(kind\x20\x27inline\x27\x20with\x20the\x20Guard\x20table+root,\x20or\x20kind\x20\x27template\x27\x20with\x20a\x20tpl_*\x20id)\x20and\x20re-run\x20the\x20action.\x20'+'Advisory\x20designs\x20that\x20do\x20not\x20apply\x20to\x20this\x20shop\x20may\x20be\x20resolved\x20with\x20{kind:\x27omit\x27}\x20instead\x20'+'(run75747\x20F-38:\x20honored\x20only\x20for\x20designs\x20with\x20no\x20inbound\x20binding;\x20an\x20omit\x20of\x20a\x20bound\x20design\x20'+'is\x20refused\x20with\x20GUARD_OMIT_UNSUPPORTED).\x20'+'The\x20audit\x20freeze\x20gate\x20still\x20decides:\x20resolutions\x20only\x20unblock\x20a\x20plan\x20whose\x20closed\x20audit\x20is\x20clean.'),'review_mode':z['enum'](['review','review_reward','none'])['optional']()['describe']('Per-build\x20review-rail\x20mode\x20(v53\x20templates).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20review_mode\x20applies.'),'reward_funding':z['string']()['optional']()['describe']('Review\x20reward\x20pool\x20funding,\x20smallest-unit\x20string.\x20HARD-REQUIRED\x20when\x20the\x20effective\x20review\x20mode\x20is\x20review_reward\x20(INV-4):\x20template_generate\x20refuses\x20the\x20build\x20up-front\x20with\x20error_code\x20\x27reward_funding_required\x27\x20rather\x20than\x20promising\x20an\x20unfunded\x20incentive\x20—\x20pass\x20this,\x20or\x20drop\x20the\x20mode\x20explicitly\x20(review_mode\x20\x27review\x27\x20keeps\x20the\x20rail\x20without\x20the\x20bounty;\x20\x27none\x27\x20removes\x20the\x20rail).\x20The\x20compile\x20kernel\x20also\x20blocks\x20with\x20REVIEW_REWARD_UNFUNDED\x20—\x20this\x20input\x20gate\x20just\x20fails\x20before\x20the\x20pipeline\x20runs.'),'after_sales_mode':z['enum'](['return','exchange','warranty','none'])['optional']()['describe']('Per-build\x20after-sales\x20mode\x20(D12\x20重构\x204).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20after_sales_mode\x20applies.\x20Declaring\x20a\x20mode\x20with\x20no\x20backing\x20rail\x20in\x20machine_shape\x20is\x20a\x20compile\x20blocker\x20(AFTER_SALES_RAIL_MISSING).'),'acceptance_mode':z['enum'](['milestone','contest','bounty','agent','none'])['optional']()['describe']('Per-build\x20acceptance/judging\x20mode\x20(D12\x20重构\x202).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20acceptance_mode\x20applies.\x20A\x20judge-decided\x20mode\x20(contest/bounty/agent)\x20without\x20arbitration_mode\x20\x27third_party\x27\x20is\x20a\x20compile\x20blocker\x20(ACCEPTANCE_JUDGE_NOT_INDEPENDENT);\x20a\x20finite\x20revision_rounds_max\x20with\x20no\x20counter\x20Repository\x20guard\x20is\x20a\x20compile\x20blocker\x20(ACCEPTANCE_REVISION_UNBOUNDED).'),'installment_mode':z['enum'](['deposit_balance','milestone_n','none'])['optional']()['describe']('Per-build\x20installment/deposit\x20mode\x20(D12\x20重构\x203).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20installment_mode\x20applies.\x20A\x20capture\x20forward\x20with\x20no\x20fund-gate\x20Guard\x20is\x20a\x20compile\x20blocker\x20(INSTALLMENT_FUNDING_UNGATED);\x20a\x20deposit-held\x20state\x20with\x20no\x20exit\x20rail\x20is\x20a\x20compile\x20blocker\x20(INSTALLMENT_DEPOSIT_STRANDED).'),'affiliate_mode':z['enum'](['commission','none'])['optional']()['describe']('Per-build\x20affiliate\x20commission\x20overlay\x20(D12\x20批\x205).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20affiliate_mode\x20applies.\x20A\x20declared\x20commission\x20overlay\x20with\x20no\x20commission\x20rail\x20is\x20a\x20compile\x20blocker\x20(AFFILIATE_RAIL_MISSING);\x20a\x20commission\x20with\x20no\x20post-lock\x20no-clawback\x20disclosure\x20build_note\x20is\x20a\x20compile\x20blocker\x20(AFFILIATE_CLAWBACK_UNDISCLOSED).'),'crowdfunding_mode':z['enum'](['threshold','flexible','none'])['optional']()['describe']('Per-build\x20crowdfunding\x20campaign\x20overlay\x20(D12\x20批\x207).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20crowdfunding_mode\x20applies.\x20A\x20declared\x20threshold/flexible\x20overlay\x20with\x20no\x20two-leg\x20escrow-exit\x20gate\x20(release\x20XOR\x20refund,\x20D-BUG-2)\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_THRESHOLD_GATE_MISSING);\x20a\x20threshold\x20gate\x20whose\x20aggregate\x20is\x20NOT\x20a\x20writer-bound\x20sum-where\x20(id_from\x20signer)\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_AGGREGATE_UNBOUND);\x20a\x20missing\x20L-04/L-01/L-05\x20disclosure\x20build_note\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_DISCLOSURE_MISSING).'),'sales':z['array'](SaleItemPlanSchema)['optional']()['describe']('The\x20sellable\x20SKU\x20catalog\x20(upwc-cat-261017\x20CAT-A1\x20/\x20PLAN-SALES-01).\x20REQUIRED\x20for\x20template_generate\x20(A-2,\x20amz9-ln-261023):\x20an\x20empty/absent\x20catalog\x20is\x20refused\x20up-front\x20with\x20error_code\x20\x27sales_required\x27\x20—\x20the\x20published\x20Service\x20would\x20freeze\x20with\x20sales:\x20[]\x20and\x20every\x20order_new\x20aborts;\x20PLAN-SALES-01\x20is\x20now\x20an\x20INPUT\x20error\x20on\x20this\x20action,\x20not\x20a\x20post-hoc\x20audit\x20finding.\x20migration_apply\x20keeps\x20the\x20audit-finding\x20posture\x20(it\x20confirms\x20an\x20already-reviewed\x20import).\x20Item\x20shape\x20follows\x20the\x20chain\x27s\x20SaleItem:\x20{\x20name,\x20price,\x20quantity?,\x20wip_hash?\x20}\x20with\x20price\x20in\x20smallest\x20units.\x20OPTIONAL\x20per\x20item:\x20a\x20structured\x20`incentive`\x20object\x20(G-07:\x20{\x20amount,\x20conditions,\x20basis,\x20claim_window\x20},\x20all\x20strings)\x20declaring\x20the\x20buyer-perceivable\x20reward\x20terms\x20—\x20carried\x20verbatim\x20into\x20the\x20compiled\x20plan\x27s\x20service_sales\x20step\x20for\x20quote-time\x20disclosure;\x20it\x20is\x20plan\x20metadata\x20only\x20and\x20never\x20an\x20on-chain\x20SaleItem\x20field.'),'log':z['record'](z['string'](),z['unknown']())['optional']()['describe']('A\x20prior\x20MigrationLog\x20(required\x20for\x20migration_review).'),'network':z['enum'](['testnet','mainnet','localnet'])['optional']()['describe']('Target\x20network\x20for\x20migration_import\x20/\x20migration_apply\x20(default\x20testnet;\x20mainnet\x20requires\x20explicit\x20user\x20confirmation;\x20\x27localnet\x27\x20is\x20a\x20provenance\x20label\x20for\x20locally\x20validated\x20plans\x20—\x20the\x20pipeline\x20never\x20executes\x20on-chain).')})['strict']();const ScanSummarySchema=z['object']({'risk_level':z['enum'](['low','medium','high','critical']),'passed':z['boolean'](),'finding_count':z['number'](),'findings_by_severity':z['record'](z['string'](),z['number']())['describe']('Finding\x20count\x20keyed\x20by\x20severity.'),'findings':z['array'](TemplateScanFindingSchema)['describe']('Every\x20finding\x20with\x20its\x20rule\x20id,\x20detail\x20and\x20suggestion.'),'red_flags':z['array'](z['string']())})['describe']('Pre-deploy\x20scan\x20summary\x20(generation/apply\x20only\x20runs\x20when\x20passed).');export const BenchmarkMigrationOutputSchema=z['object']({'result':z['discriminatedUnion']('action',[z['object']({'action':z['literal']('template_list'),'count':z['number']()['describe']('Number\x20of\x20templates\x20returned.'),'templates':z['array'](TemplateSummarySchema)['describe']('Template\x20listing\x20rows.'),'load_errors':z['array'](z['string']())['describe']('Template\x20files\x20that\x20failed\x20to\x20load/validate\x20(never\x20silently\x20dropped).')}),z['object']({'action':z['literal']('template_get'),'template':z['record'](z['string'](),z['unknown']())['describe']('Full\x20template\x20object\x20(machine_shape/guards/allocator/fee_params/body/...).')}),z['object']({'action':z['literal']('template_generate'),'template_id':z['string'](),'scan':ScanSummarySchema,'plan':z['record'](z['string'](),z['unknown']())['describe']('Creation\x20plan\x20from\x20the\x20merchant-guide\x20pipeline\x20(never\x20executed\x20on-chain).'),'verdict':z['object']({'buildable':z['boolean'](),'blockers':z['array'](z['string']())})['describe']('Single\x20aggregate\x20ruling\x20over\x20the\x20three\x20signal\x20faces\x20(scan.passed\x20/\x20plan.graph_validation.valid\x20/\x20plan.audit.blocking)\x20—\x20the\x20authoritative\x20go/no-go\x20(bkmn-261012\x20F-M62);\x20the\x20individual\x20faces\x20stay\x20advisory.'),'next_action':z['string']()['describe']('Top-level\x20forwarding\x20of\x20the\x20materialization\x20contract\x20(C6):\x20the\x20guide\x27s\x20\x27Plan\x20ready.\x20Materialize:\x20...\x27\x20text\x20verbatim\x20when\x20the\x20audit\x20is\x20clean;\x20a\x20BLOCKED\x20reroute\x20back\x20to\x20this\x20action\x20otherwise.')}),z['object']({'action':z['literal']('template_scan'),'scan':z['object']({'template_id':z['string'](),'risk_level':z['enum'](['low','medium','high','critical']),'passed':z['boolean'](),'findings':z['array'](TemplateScanFindingSchema),'red_flags':z['array'](z['string']())})['describe']('Full\x20pre-deploy\x20scan\x20result.')}),z['object']({'action':z['literal']('migration_import'),'log':MigrationLogSchema['describe']('The\x20structured\x20migration\x20log.'),'next_action':z['string']()['describe']('Next\x20chain\x20step:\x20run\x20migration_review\x20with\x20this\x20log\x20(C6\x20—\x20the\x20chain\x20is\x20self-describing,\x20no\x20agent\x20re-exploration).')}),z['object']({'action':z['literal']('migration_review'),'log':MigrationLogSchema['describe']('The\x20migration\x20log\x20under\x20review.'),'review_summary':z['object']({'mapped_count':z['number'](),'unmapped_count':z['number'](),'manual_review_count':z['number'](),'risk_passed':z['boolean']()})['describe']('Counts\x20+\x20risk\x20status\x20for\x20the\x20confirmation\x20screen.'),'next_action':z['string']()['describe']('Next\x20chain\x20step:\x20migration_apply\x20with\x20the\x20matched\x20template\x20when\x20the\x20review\x20is\x20clean;\x20surface\x20the\x20unmapped/manual_review\x20items\x20for\x20a\x20user\x20decision\x20otherwise.')}),z['object']({'action':z['literal']('migration_apply'),'template_id':z['string'](),'network':z['enum'](['testnet','mainnet','localnet']),'scan':ScanSummarySchema,'plan':z['record'](z['string'](),z['unknown']())['describe']('Creation\x20plan\x20from\x20the\x20merchant-guide\x20pipeline\x20(never\x20executed\x20on-chain).'),'verdict':z['object']({'buildable':z['boolean'](),'blockers':z['array'](z['string']())})['describe']('Single\x20aggregate\x20ruling\x20over\x20the\x20three\x20signal\x20faces\x20(scan.passed\x20/\x20plan.graph_validation.valid\x20/\x20plan.audit.blocking)\x20—\x20the\x20authoritative\x20go/no-go\x20(bkmn-261012\x20F-M62);\x20the\x20individual\x20faces\x20stay\x20advisory.'),'next_action':z['string']()['describe']('Top-level\x20forwarding\x20of\x20the\x20materialization\x20contract\x20(C6):\x20the\x20guide\x27s\x20\x27Plan\x20ready.\x20Materialize:\x20...\x27\x20text\x20verbatim\x20when\x20the\x20audit\x20is\x20clean;\x20a\x20BLOCKED\x20reroute\x20back\x20to\x20this\x20action\x20otherwise.')})])})['strict']();
|
|
1
|
+
import{z}from'zod';import{GuardResolutionInputSchema}from'../goal/planning.js';import{SemanticIRInputSchema}from'../../knowledge/semantic-ir.js';const TemplateSummarySchema=z['object']({'id':z['string']()['describe']('Template\x20id\x20\x27<industry>/<variant>\x27,\x20e.g.\x20\x27retail/scale-marketplace\x27.'),'industry':z['string']()['describe']('Industry\x20vertical.'),'variant':z['string']()['describe']('Business-model\x20variant\x20slug.'),'product_ref':z['string']()['optional']()['describe']('Benchmark\x20product\x20slug\x20this\x20archetype\x20models\x20(e.g.\x20\x27amazon\x27).\x20The\x20only\x20sanctioned\x20company\x20name;\x20users\x20can\x20pick\x20a\x20template\x20by\x20naming\x20the\x20incumbent\x20product.'),'archetype':z['enum'](['leader','challenger']),'key_risk':z['string']()['describe']('Primary\x20risk\x20this\x20template\x20mitigates.'),'node_count':z['number']()['describe']('Machine\x20node\x20count.'),'guard_count':z['number']()['describe']('Guard\x20template\x20count.'),'recommended_role':z['enum'](['merchant','supplier','both']),'tags':z['array'](z['string']())['describe']('Canonical\x20discovery\x20tags\x20this\x20template\x20answers\x20to\x20(curated\x20business-model\x20tags\x20+\x20its\x20variant\x20slug).\x20These\x20are\x20the\x20tokens\x20a\x20Semantic\x20IR\x20`discovery.tags`\x20entry\x20may\x20use.')})['describe']('Compact\x20template\x20listing\x20row.'),TemplateScanFindingSchema=z['object']({'rule_id':z['string']()['optional']()['describe']('Rule\x20id\x20when\x20known\x20(e.g.\x20\x27R-M3-01\x27,\x20\x27R1\x27).'),'severity':z['enum'](['low','medium','high','critical']),'title':z['string'](),'detail':z['string'](),'suggestion':z['string']()})['describe']('One\x20pre-deploy\x20risk\x20finding.'),StaleBuildDisclosureSchema=z['object']({'stale':z['boolean']()['describe']('4R-01\x20residual:\x20true\x20only\x20when\x20the\x20shared\x20src-vs-dist\x20mtime\x20detector\x20RESOLVED\x20and\x20found\x20the\x20running\x20dist\x20OLDER\x20than\x20the\x20workspace\x20src\x20—\x20the\x20scan/plan\x20verdicts\x20may\x20describe\x20superseded\x20template\x20knowledge.'),'known':z['boolean']()['describe']('False\x20when\x20the\x20detector\x20could\x20not\x20resolve\x20(installed\x20dist-only\x20package,\x20build\x20in\x20progress,\x20stat\x20error).\x20stale\x20is\x20then\x20NOT\x20evidence\x20of\x20freshness\x20—\x20treat\x20verdicts\x20as\x20unconfirmed.\x20Fail-open:\x20never\x20an\x20error.'),'lag_minutes':z['number']()['nullable']()['describe']('Whole\x20minutes\x20the\x20newest\x20compiled\x20artifact\x20lags\x20the\x20newest\x20source\x20file\x20(null\x20when\x20unknown).'),'detail':z['string']()['describe']('Human-readable\x20freshness\x20statement\x20(src/dist\x20mtime\x20lag)\x20with\x20the\x20rebuild\x20remediation\x20when\x20stale.')})['describe']('Always-present\x20stale-build\x20disclosure\x20on\x20template_scan\x20/\x20template_generate\x20(reuses\x20computeSrcDistStaleness;\x20no\x20parallel\x20detector).'),MigrationEntrySchema=z['object']({'source_element':z['string']()['describe']('Competitor-side\x20element.'),'target_object':z['string']()['optional']()['describe']('WoWok\x20object/mechanism\x20it\x20maps\x20to.'),'mapping_note':z['string']()['describe']('One-line\x20mapping\x20explanation.'),'reason':z['string']()['optional']()['describe']('Why\x20it\x20cannot\x20be\x20migrated,\x20or\x20why\x20it\x20needs\x20a\x20decision.')})['describe']('One\x20competitor\x20element\x20and\x20its\x20WoWok\x20mapping\x20outcome.'),MigrationLogSchema=z['object']({'source':z['object']({'url':z['string']()['optional'](),'description':z['string'](),'detected_industry':z['string'](),'matched_template':z['string']()['describe']('Matched\x20template\x20id\x20\x27<industry>/<variant>\x27.')})['describe']('Migration\x20source\x20provenance.'),'template_match':z['object']({'source':z['enum'](['explicit','product_ref','discovery_product_ref','discovery_tags','keywords','ir_industry_fallback','industry_leader'])['describe']('Which\x20deterministic\x20pass\x20chose\x20the\x20template:\x20\x27explicit\x27\x20=\x20caller\x27s\x20template_id;\x20'+'\x27product_ref\x27\x20=\x20a\x20benchmark\x20product\x20named\x20in\x20the\x20text;\x20\x27discovery_product_ref\x27\x20=\x20the\x20'+'Semantic\x20IR\x20resolved\x20the\x20benchmark\x20product;\x20\x27discovery_tags\x27\x20=\x20the\x20IR\x27s\x20canonical\x20tags\x20'+'scored\x20the\x20variant;\x20\x27keywords\x27\x20=\x20English\x20keyword\x20scoring;\x20\x27ir_industry_fallback\x27\x20=\x20the\x20'+'IR\x20proved\x20the\x20industry\x20only;\x20\x27industry_leader\x27\x20=\x20an\x20explicit\x20industry\x20hint\x20with\x20no\x20match.'),'confidence':z['number']()['describe']('Match\x20confidence\x200-1\x20(only\x20an\x20exact\x20benchmark-product\x20hit\x20is\x201.0).'),'matched_tags':z['array'](z['string']())['optional']()['describe']('IR\x20tags\x20that\x20hit\x20this\x20template\x20(discovery_tags\x20only).')})['describe']('Template-match\x20provenance\x20—\x20why\x20this\x20template,\x20without\x20re-running\x20the\x20matcher.'),'mapped':z['array'](MigrationEntrySchema)['describe']('Elements\x20that\x20map\x20cleanly\x20to\x20WoWok\x20objects.'),'unmapped':z['array'](MigrationEntrySchema)['describe']('Elements\x20that\x20cannot\x20be\x20migrated,\x20with\x20reasons.'),'manual_review':z['array'](MigrationEntrySchema)['describe']('Elements\x20requiring\x20an\x20explicit\x20user\x20decision.'),'wowok_advantages':z['array'](z['string']())['describe']('WoWok\x20platform\x20advantages\x20surfaced\x20during\x20migration.'),'customizable_modules':z['array'](z['string']())['describe']('Business-module\x20ids\x20the\x20user\x20can\x20customize.'),'role_assessment':z['object']({'recommended':z['string'](),'rationale':z['string'](),'alternatives':z['array'](z['string']())})['describe']('Merchant\x20vs\x20supplier\x20role\x20assessment.'),'risk_check':z['object']({'passed':z['boolean'](),'findings':z['array'](z['string']())})['describe']('Dry-run\x20risk\x20check\x20against\x20the\x20matched\x20template.'),'network':z['enum'](['testnet','mainnet','localnet'])['describe']('Target\x20network\x20(default\x20testnet).\x20\x27localnet\x27\x20labels\x20plans\x20validated\x20against\x20a\x20local\x20net\x20—\x20the\x20migration\x20pipeline\x20is\x20network-agnostic,\x20this\x20is\x20provenance\x20metadata,\x20not\x20an\x20execution\x20target.')})['describe']('Structured\x20competitor-migration\x20log.'),SaleItemIncentiveSchema=z['object']({'amount':z['string']()['describe']('Incentive\x20amount\x20as\x20a\x20buyer-readable\x20string\x20(e.g.\x20\x225\x20USDC\x22\x20or\x20\x221000000000\x20WOW\x20smallest\x20units\x22).\x20Quote-time\x20disclosure\x20only\x20—\x20fund\x20the\x20actual\x20rail\x20separately\x20(e.g.\x20the\x20template\x27s\x20review_reward_pool).'),'conditions':z['string']()['describe']('What\x20the\x20buyer\x20must\x20do\x20to\x20earn\x20it\x20(e.g.\x20\x22leave\x20a\x20written\x20+\x20rated\x20review\x20of\x20the\x20delivered\x20work\x22).\x20Must\x20be\x20perceptible\x20BEFORE\x20the\x20order\x20is\x20placed.'),'basis':z['string']()['describe']('Accrual\x20scope:\x20\x22per-order\x22\x20/\x20\x22once-per-buyer\x22\x20/\x20\x22once-per-buyer-per-order\x22.\x20Matches\x20the\x20claim\x20guard\x27s\x20replay\x20semantics\x20—\x20a\x20recipient-only\x20gate\x20is\x20once-per-buyer-for-life,\x20an\x20order-scoped\x20stamp\x20is\x20per-order\x20(SV-2).'),'claim_window':z['string']()['describe']('How\x20long\x20the\x20buyer\x20has\x20to\x20claim\x20(e.g.\x20\x2214\x20days\x20from\x20the\x20review\x22).\x20Mirror\x20the\x20reward\x20claim\x20guard\x27s\x20window\x20fee_param\x20so\x20the\x20quote\x20never\x20promises\x20more\x20than\x20the\x20rail\x20pays.')})['strict']()['describe']('Optional\x20structured\x20incentive\x20for\x20one\x20sale\x20item\x20(G-07):\x20buyer-perceivable\x20reward\x20terms\x20carried\x20to\x20the\x20compiled\x20plan\x20for\x20quote-time\x20disclosure.\x20DECLARATION\x20ONLY\x20—\x20the\x20chain\x20SaleItem\x20has\x20no\x20such\x20field;\x20the\x20actual\x20payout\x20rail\x20is\x20configured\x20separately.'),SaleItemPlanSchema=z['object']({'incentive':SaleItemIncentiveSchema['optional']()})['passthrough']()['describe']('One\x20sellable\x20SKU\x20in\x20the\x20plan\x20catalog:\x20the\x20chain\x20SaleItem\x20fields\x20plus\x20the\x20optional\x20structured\x20`incentive`\x20declaration\x20(G-07).\x20Unknown\x20keys\x20pass\x20through\x20so\x20chain-side\x20fields\x20can\x20evolve\x20without\x20schema\x20changes.');export const BenchmarkMigrationSchema=z['object']({'action':z['enum'](['template_list','template_get','template_generate','template_scan','migration_import','migration_review','migration_apply','plan_execute'])['describe']('Action:\x20\x27template_list\x27\x20=\x20list\x20the\x20loaded\x20MD\x20industry\x20templates\x20(optional\x20industry\x20filter);\x20'+'\x27template_get\x27\x20=\x20fetch\x20one\x20template\x20by\x20id\x20(template_id\x20required);\x20'+'\x27template_generate\x27\x20=\x20generate\x20a\x20creation\x20plan\x20from\x20a\x20template\x20via\x20the\x20merchant-guide\x20'+'pipeline\x20(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20never\x20executes\x20on-chain);\x20'+'\x27template_scan\x27\x20=\x20pre-deploy\x20risk\x20scan\x20of\x20one\x20template\x20(template_id\x20required;\x20returns\x20'+'risk_level/findings/red_flags\x20plus\x20a\x20drift\x20face\x20—\x20disk-vs-catalog\x20provenance\x20of\x20the\x20'+'scanned\x20body;\x20CRITICAL\x20blocks\x20generation/apply);\x20'+'\x27migration_import\x27\x20=\x20competitor\x20URL/description\x20→\x20migration\x20plan\x20+\x20MigrationLog\x20'+'(description\x20required);\x20'+'\x27migration_review\x27\x20=\x20surface\x20the\x20MigrationLog\x20for\x20user\x20confirmation\x20(log\x20required);\x20'+'\x27migration_apply\x27\x20=\x20run\x20the\x20approved\x20template\x20through\x20the\x20merchant-guide\x20pipeline\x20'+'(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20default\x20network\x20testnet);\x20'+'\x27plan_execute\x27\x20=\x20ONE-CLICK\x20DEPLOYMENT\x20(AR-5,\x20bsn7\x20T-06/R-01):\x20materialize\x20the\x20plan\x20returned\x20by\x20'+'template_generate\x20on-chain\x20—\x20preflight\x20freeze\x20gate,\x20topological\x20create/publish/configure,\x20readback.\x20'+'Resumable:\x20on\x20a\x20mid-run\x20failure,\x20re-send\x20with\x20completed_steps\x20+\x20previous_outputs\x20from\x20the\x20failed\x20'+'response\x20instead\x20of\x20re-running\x20from\x20scratch\x20(duplicate\x20objects).'),'template_id':z['string']()['optional']()['describe']('Template\x20id\x20\x27<industry>/<variant>\x27\x20(required\x20for\x20template_get\x20/\x20template_generate\x20/\x20template_scan\x20/\x20migration_apply),\x20e.g.\x20\x27retail/scale-marketplace\x27.'),'industry':z['string']()['optional']()['describe']('Industry\x20filter\x20for\x20template_list;\x20industry\x20hint\x20for\x20migration_import.\x20'+'Any\x20registered\x20industry\x20is\x20accepted\x20(builtin:\x20freelance,\x20rental,\x20education,\x20'+'travel,\x20subscription,\x20retail;\x20plus\x20custom\x20industries\x20registered\x20via\x20industry\x20packs).\x20'+'Aliases\x20are\x20resolved\x20(e.g.\x20\x27ecommerce\x27\x20→\x20\x27retail\x27).'),'description':z['string']()['optional']()['describe']('Natural-language\x20business/competitor\x20description\x20(required\x20for\x20migration_import;\x20used\x20by\x20template_generate\x20as\x20the\x20intent\x20text).'),'semantic_ir':SemanticIRInputSchema['optional']()['describe']('Canonical\x20Semantic\x20IR\x20produced\x20by\x20the\x20CALLING\x20agent\x20for\x20a\x20NON-ENGLISH\x20(or\x20lexicon-outside)\x20description\x20—\x20this\x20server\x20runs\x20no\x20LLM.\x20'+'The\x20server\x20validates\x20it,\x20then\x20reuses\x20it\x20on\x20the\x20same\x20deterministic\x20surfaces\x20as\x20recommend_industry:\x20'+'(a)\x20migration_import\x20narrows\x20template\x20matching\x20to\x20the\x20IR-resolved\x20industry\x20and,\x20when\x20discovery.tags\x20are\x20supplied,\x20'+'selects\x20the\x20business-model\x20VARIANT\x20by\x20canonical\x20tag\x20coverage\x20(an\x20explicit\x20product_ref\x20or\x20\x27industry\x27\x20hint\x20still\x20wins);\x20'+'(b)\x20template_generate\x20/\x20migration_apply\x20read\x20the\x20numeric\x20claim\x20\x27reward_pool_amount\x27\x20as\x20the\x20review-reward\x20pool\x20prefill\x20—\x20'+'explicit\x20fee_overrides\x20>\x20IR\x20claim\x20>\x20the\x20English\x20regex\x20fallback.\x20'+'Shape:\x20{schema_version:\x202\x20(1\x20still\x20accepted),\x20locale:\x20\x27<BCP-47>\x27,\x20traits?,\x20domains?,\x20claims?:\x20[{key,\x20value,\x20confidence?}],\x20'+'discovery?:\x20{industry?,\x20tags?:\x20string[],\x20product_ref?,\x20english_summary?,\x20confidence?},\x20provenance:\x20{source:\x20\x27caller_llm\x27}}.\x20'+'discovery.tags\x20use\x20the\x20CLOSED\x20language-neutral\x20vocabulary\x20returned\x20by\x20template_list.discovery_vocabulary\x20'+'(canonical\x20English\x20business-model\x20tokens;\x20never\x20locale\x20words\x20—\x20translate\x20in\x20the\x20caller).\x20'+'discovery.product_ref\x20is\x20a\x20benchmark-product\x20slug,\x20discovery.industry\x20a\x20registered\x20industry,\x20and\x20discovery.english_summary\x20'+'is\x20a\x20canonical\x20English\x20restatement\x20used\x20only\x20for\x20keyword\x20fallback.\x20'+'Unknown\x20traits/domains/claims/tags/industries/product_refs\x20are\x20dropped\x20and\x20reported\x20in\x20semantic_ir_issues;\x20spans\x20and\x20quotes\x20'+'must\x20be\x20copied\x20verbatim\x20from\x20the\x20description\x20(unlocatable\x20evidence\x20is\x20dropped).'),'url':z['string']()['optional']()['describe']('Competitor\x20store/profile\x20URL\x20for\x20migration_import\x20(recorded\x20as\x20provenance\x20only).'),'fee_overrides':z['record'](z['string'](),z['union']([z['number'](),z['string']()]))['optional']()['describe']('Template\x20fee-parameter\x20overrides\x20for\x20template_generate\x20(e.g.\x20commission_rate_bps).'),'guard_resolutions':z['record'](z['string'](),GuardResolutionInputSchema)['optional']()['describe']('Judgment-layer\x20resolutions\x20for\x20pending\x20guard\x20designs\x20(C6-DEEP),\x20keyed\x20by\x20plan.pending_guard_designs[].key.\x20'+'A\x20blocked\x20migration_apply/template_generate\x20lists\x20every\x20unresolved\x20design\x20—\x20resolve\x20each\x20here\x20'+'(kind\x20\x27inline\x27\x20with\x20the\x20Guard\x20table+root,\x20or\x20kind\x20\x27template\x27\x20with\x20a\x20tpl_*\x20id)\x20and\x20re-run\x20the\x20action.\x20'+'Advisory\x20designs\x20that\x20do\x20not\x20apply\x20to\x20this\x20shop\x20may\x20be\x20resolved\x20with\x20{kind:\x27omit\x27}\x20instead\x20'+'(run75747\x20F-38:\x20honored\x20only\x20for\x20designs\x20with\x20no\x20inbound\x20binding;\x20an\x20omit\x20of\x20a\x20bound\x20design\x20'+'is\x20refused\x20with\x20GUARD_OMIT_UNSUPPORTED).\x20'+'The\x20audit\x20freeze\x20gate\x20still\x20decides:\x20resolutions\x20only\x20unblock\x20a\x20plan\x20whose\x20closed\x20audit\x20is\x20clean.'),'review_mode':z['enum'](['review','review_reward','none'])['optional']()['describe']('Per-build\x20review-rail\x20mode\x20(v53\x20templates).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20review_mode\x20applies.'),'reward_funding':z['string']()['optional']()['describe']('Review\x20reward\x20pool\x20funding,\x20smallest-unit\x20string.\x20HARD-REQUIRED\x20when\x20the\x20effective\x20review\x20mode\x20is\x20review_reward\x20(INV-4):\x20template_generate\x20refuses\x20the\x20build\x20up-front\x20with\x20error_code\x20\x27reward_funding_required\x27\x20rather\x20than\x20promising\x20an\x20unfunded\x20incentive\x20—\x20pass\x20this,\x20or\x20drop\x20the\x20mode\x20explicitly\x20(review_mode\x20\x27review\x27\x20keeps\x20the\x20rail\x20without\x20the\x20bounty;\x20\x27none\x27\x20removes\x20the\x20rail).\x20The\x20compile\x20kernel\x20also\x20blocks\x20with\x20REVIEW_REWARD_UNFUNDED\x20—\x20this\x20input\x20gate\x20just\x20fails\x20before\x20the\x20pipeline\x20runs.'),'reward_claim_amount':z['string']()['optional']()['describe']('Per-claim\x20reward\x20bounty\x20mounted\x20on\x20the\x20claim\x20guard_add,\x20smallest-unit\x20string.\x20Schema-required\x20on\x20the\x20mount\x20(BK15-F09):\x20compile\x20blocks\x20with\x20REVIEW_REWARD_AMOUNT_MISSING\x20when\x20absent\x20—\x20the\x20kernel\x20never\x20fabricates\x20a\x20real-money\x20parameter.'),'after_sales_mode':z['enum'](['return','exchange','warranty','none'])['optional']()['describe']('Per-build\x20after-sales\x20mode\x20(D12\x20refactor\x204).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20after_sales_mode\x20applies.\x20Declaring\x20a\x20mode\x20with\x20no\x20backing\x20rail\x20in\x20machine_shape\x20is\x20a\x20compile\x20blocker\x20(AFTER_SALES_RAIL_MISSING).'),'acceptance_mode':z['enum'](['milestone','contest','bounty','agent','none'])['optional']()['describe']('Per-build\x20acceptance/judging\x20mode\x20(D12\x20refactor\x202).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20acceptance_mode\x20applies.\x20A\x20judge-decided\x20mode\x20(contest/bounty/agent)\x20without\x20arbitration_mode\x20\x27third_party\x27\x20is\x20a\x20compile\x20blocker\x20(ACCEPTANCE_JUDGE_NOT_INDEPENDENT);\x20a\x20finite\x20revision_rounds_max\x20with\x20no\x20counter\x20Repository\x20guard\x20is\x20a\x20compile\x20blocker\x20(ACCEPTANCE_REVISION_UNBOUNDED).'),'installment_mode':z['enum'](['deposit_balance','milestone_n','none'])['optional']()['describe']('Per-build\x20installment/deposit\x20mode\x20(D12\x20refactor\x203).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20installment_mode\x20applies.\x20A\x20capture\x20forward\x20with\x20no\x20fund-gate\x20Guard\x20is\x20a\x20compile\x20blocker\x20(INSTALLMENT_FUNDING_UNGATED);\x20a\x20deposit-held\x20state\x20with\x20no\x20exit\x20rail\x20is\x20a\x20compile\x20blocker\x20(INSTALLMENT_DEPOSIT_STRANDED).'),'affiliate_mode':z['enum'](['commission','none'])['optional']()['describe']('Per-build\x20affiliate\x20commission\x20overlay\x20(D12\x20batch\x205).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20affiliate_mode\x20applies.\x20A\x20declared\x20commission\x20overlay\x20with\x20no\x20commission\x20rail\x20is\x20a\x20compile\x20blocker\x20(AFFILIATE_RAIL_MISSING);\x20a\x20commission\x20with\x20no\x20post-lock\x20no-clawback\x20disclosure\x20build_note\x20is\x20a\x20compile\x20blocker\x20(AFFILIATE_CLAWBACK_UNDISCLOSED).'),'crowdfunding_mode':z['enum'](['threshold','flexible','none'])['optional']()['describe']('Per-build\x20crowdfunding\x20campaign\x20overlay\x20(D12\x20batch\x207).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20crowdfunding_mode\x20applies.\x20A\x20declared\x20threshold/flexible\x20overlay\x20with\x20no\x20two-leg\x20escrow-exit\x20gate\x20(release\x20XOR\x20refund,\x20D-BUG-2)\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_THRESHOLD_GATE_MISSING);\x20a\x20threshold\x20gate\x20whose\x20aggregate\x20is\x20NOT\x20a\x20writer-bound\x20sum-where\x20(id_from\x20signer)\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_AGGREGATE_UNBOUND);\x20a\x20missing\x20L-04/L-01/L-05\x20disclosure\x20build_note\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_DISCLOSURE_MISSING).'),'logistics_mode':z['enum'](['none','carrier','merchant_managed','courier','pickup_point'])['optional']()['describe']('Per-build\x20fulfillment\x20topology\x20(K3\x20batch\x20C,\x20K-2).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20logistics_mode\x20applies.\x20A\x20declared\x20topology\x20the\x20machine_shape\x20cannot\x20honor\x20is\x20a\x20compile\x20blocker:\x20courier\x20with\x20no\x20named_operator\x20handover\x20rail\x20(LOGISTICS_COURIER_RAIL_MISSING)\x20or\x20a\x20pooled\x20delivery\x20fee\x20(LOGISTICS_COURIER_FEE_POOLED);\x20pickup_point\x20without\x20the\x20absolute\x20batch\x20cutoff\x20or\x20the\x20unclaimed-goods\x20exit\x20window\x20(LOGISTICS_PICKUP_CUTOFF_MISSING);\x20carrier\x20without\x20tracking\x20evidence\x20(LOGISTICS_CARRIER_EVIDENCE_MISSING);\x20any\x20physical\x20mode\x20without\x20a\x20transit-loss\x20story\x20(LOGISTICS_TRANSIT_LOSS_UNCOVERED);\x20courier/pickup_point\x20without\x20the\x20two\x20dispatch\x20disclosures\x20(LOGISTICS_DISPATCH_UNDISCLOSED).'),'sales':z['array'](SaleItemPlanSchema)['optional']()['describe']('The\x20sellable\x20SKU\x20catalog\x20(upwc-cat-261017\x20CAT-A1\x20/\x20PLAN-SALES-01).\x20REQUIRED\x20for\x20template_generate\x20(A-2,\x20amz9-ln-261023):\x20an\x20empty/absent\x20catalog\x20is\x20refused\x20up-front\x20with\x20error_code\x20\x27sales_required\x27\x20—\x20the\x20published\x20Service\x20would\x20freeze\x20with\x20sales:\x20[]\x20and\x20every\x20order_new\x20aborts;\x20PLAN-SALES-01\x20is\x20now\x20an\x20INPUT\x20error\x20on\x20this\x20action,\x20not\x20a\x20post-hoc\x20audit\x20finding.\x20migration_apply\x20keeps\x20the\x20audit-finding\x20posture\x20(it\x20confirms\x20an\x20already-reviewed\x20import).\x20Item\x20shape\x20follows\x20the\x20chain\x27s\x20SaleItem:\x20{\x20name,\x20price,\x20quantity?,\x20wip_hash?\x20}\x20with\x20price\x20in\x20smallest\x20units.\x20OPTIONAL\x20per\x20item:\x20a\x20structured\x20`incentive`\x20object\x20(G-07:\x20{\x20amount,\x20conditions,\x20basis,\x20claim_window\x20},\x20all\x20strings)\x20declaring\x20the\x20buyer-perceivable\x20reward\x20terms\x20—\x20carried\x20verbatim\x20into\x20the\x20compiled\x20plan\x27s\x20service_sales\x20step\x20for\x20quote-time\x20disclosure;\x20it\x20is\x20plan\x20metadata\x20only\x20and\x20never\x20an\x20on-chain\x20SaleItem\x20field.'),'log':z['record'](z['string'](),z['unknown']())['optional']()['describe']('A\x20prior\x20MigrationLog\x20(required\x20for\x20migration_review).'),'network':z['enum'](['testnet','mainnet','localnet'])['optional']()['describe']('Target\x20network\x20for\x20migration_import\x20/\x20migration_apply\x20(default\x20testnet;\x20mainnet\x20requires\x20explicit\x20user\x20confirmation;\x20\x27localnet\x27\x20is\x20a\x20provenance\x20label\x20for\x20locally\x20validated\x20plans\x20—\x20the\x20pipeline\x20never\x20executes\x20on-chain).'),'plan':z['record'](z['string'](),z['unknown']())['optional']()['describe']('The\x20creation\x20plan\x20to\x20execute\x20(required\x20for\x20plan_execute):\x20pass\x20the\x20object\x20returned\x20under\x20\x27plan\x27\x20by\x20template_generate\x20VERBATIM\x20—\x20mutating\x20steps\x20by\x20hand\x20is\x20what\x20the\x2032-manual-write\x20era\x20did.\x20Executing\x20requires\x20verdict.buildable=true;\x20a\x20blocked\x20plan\x20is\x20refused\x20at\x20the\x20freeze\x20gate.'),'completed_steps':z['array'](z['string']())['optional']()['describe']('plan_execute\x20resume\x20(AR-5):\x20step\x20ids\x20already\x20EXECUTED\x20in\x20a\x20prior\x20run\x20(from\x20the\x20failed\x20response\x27s\x20steps[].stepId\x20where\x20status=\x27executed\x27).\x20Those\x20steps\x20are\x20adopted,\x20not\x20re-executed.'),'previous_outputs':z['record'](z['string'](),z['string']())['optional']()['describe']('plan_execute\x20resume\x20(AR-5):\x20step\x20id\x20->\x20created\x20on-chain\x20address\x20map\x20from\x20the\x20prior\x20run\x27s\x20outputs\x20field,\x20so\x20$ref\x20bindings\x20resolve\x20against\x20the\x20objects\x20that\x20ALREADY\x20exist.'),'env':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Environment\x20for\x20on-chain\x20execution\x20(plan_execute):\x20forwarded\x20to\x20the\x20executor\x20(e.g.\x20{\x20network:\x20\x27testnet\x27\x20}).')})['strict']();const ScanSummarySchema=z['object']({'risk_level':z['enum'](['low','medium','high','critical']),'passed':z['boolean'](),'finding_count':z['number'](),'findings_by_severity':z['record'](z['string'](),z['number']())['describe']('Finding\x20count\x20keyed\x20by\x20severity.'),'findings':z['array'](TemplateScanFindingSchema)['describe']('Every\x20finding\x20with\x20its\x20rule\x20id,\x20detail\x20and\x20suggestion.'),'red_flags':z['array'](z['string']())})['describe']('Pre-deploy\x20scan\x20summary\x20(generation/apply\x20only\x20runs\x20when\x20passed).'),SemanticIrEcho={'semantic_ir_digest':z['string']()['optional']()['describe']('sha256\x20of\x20the\x20frozen\x20Semantic\x20IR\x20artifact\x20(present\x20only\x20when\x20semantic_ir\x20was\x20supplied).'),'semantic_ir_issues':z['array'](z['string']())['optional']()['describe']('IR\x20claims\x20dropped/clamped/conflicting\x20during\x20validation\x20(unknown\x20vocabulary,\x20inverted\x20span,\x20sub-threshold\x20confidence).')};export const BenchmarkMigrationOutputSchema=z['object']({'result':z['discriminatedUnion']('action',[z['object']({'action':z['literal']('template_list'),'count':z['number']()['describe']('Number\x20of\x20templates\x20returned.'),'templates':z['array'](TemplateSummarySchema)['describe']('Template\x20listing\x20rows.'),'discovery_vocabulary':z['object']({'industries':z['array'](z['string']())['describe']('Registered\x20industry\x20names\x20a\x20Semantic\x20IR\x20discovery.industry\x20may\x20use.'),'tags':z['array'](z['string']())['describe']('The\x20CLOSED\x20canonical\x20discovery-tag\x20vocabulary\x20a\x20Semantic\x20IR\x20discovery.tags\x20entry\x20may\x20use.'),'product_refs':z['array'](z['string']())['describe']('Benchmark-product\x20slugs\x20a\x20Semantic\x20IR\x20discovery.product_ref\x20may\x20use.')})['describe']('The\x20closed,\x20language-neutral\x20vocabulary\x20for\x20Semantic\x20IR\x20discovery\x20evidence\x20—\x20callers\x20translate\x20into\x20these\x20tokens;\x20the\x20server\x20drops\x20anything\x20else\x20and\x20reports\x20it.'),'load_errors':z['array'](z['string']())['describe']('Template\x20files\x20that\x20failed\x20to\x20load/validate\x20(never\x20silently\x20dropped).')}),z['object']({'action':z['literal']('template_get'),'template':z['record'](z['string'](),z['unknown']())['describe']('Full\x20template\x20object\x20(machine_shape/guards/allocator/fee_params/body/...).')}),z['object']({'action':z['literal']('template_generate'),'template_id':z['string'](),...SemanticIrEcho,'scan':ScanSummarySchema,'plan':z['record'](z['string'](),z['unknown']())['describe']('Creation\x20plan\x20from\x20the\x20merchant-guide\x20pipeline\x20(never\x20executed\x20on-chain).'),'stale_build':StaleBuildDisclosureSchema,'verdict':z['object']({'buildable':z['boolean'](),'blockers':z['array'](z['string']())})['describe']('Single\x20aggregate\x20ruling\x20over\x20the\x20three\x20signal\x20faces\x20(scan.passed\x20/\x20plan.graph_validation.valid\x20/\x20plan.audit.blocking)\x20—\x20the\x20authoritative\x20go/no-go\x20(bkmn-261012\x20F-M62);\x20the\x20individual\x20faces\x20stay\x20advisory.'),'next_action':z['string']()['describe']('Top-level\x20forwarding\x20of\x20the\x20materialization\x20contract\x20(C6):\x20the\x20guide\x27s\x20\x27Plan\x20ready.\x20Materialize:\x20...\x27\x20text\x20verbatim\x20when\x20the\x20audit\x20is\x20clean;\x20a\x20BLOCKED\x20reroute\x20back\x20to\x20this\x20action\x20otherwise.')}),z['object']({'action':z['literal']('template_scan'),'scan':z['object']({'template_id':z['string'](),'risk_level':z['enum'](['low','medium','high','critical']),'passed':z['boolean'](),'findings':z['array'](TemplateScanFindingSchema),'red_flags':z['array'](z['string']())})['describe']('Full\x20pre-deploy\x20scan\x20result.'),'stale_build':StaleBuildDisclosureSchema}),z['object']({'action':z['literal']('migration_import'),'log':MigrationLogSchema['describe']('The\x20structured\x20migration\x20log.'),'inference_source':z['enum'](['keywords','semantic_ir','semantic_ir+keywords'])['optional']()['describe']('Which\x20layer\x20resolved\x20the\x20industry:\x20\x27keywords\x27\x20=\x20English\x20lexical\x20match\x20only;\x20\x27semantic_ir\x27\x20=\x20'+'the\x20caller\x27s\x20IR\x20decided;\x20\x27semantic_ir+keywords\x27\x20=\x20both\x20contributed.\x20Present\x20only\x20when\x20semantic_ir\x20was\x20supplied.'),...SemanticIrEcho,'next_action':z['string']()['describe']('Next\x20chain\x20step:\x20run\x20migration_review\x20with\x20this\x20log\x20(C6\x20—\x20the\x20chain\x20is\x20self-describing,\x20no\x20agent\x20re-exploration).')}),z['object']({'action':z['literal']('migration_review'),'log':MigrationLogSchema['describe']('The\x20migration\x20log\x20under\x20review.'),'review_summary':z['object']({'mapped_count':z['number'](),'unmapped_count':z['number'](),'manual_review_count':z['number'](),'risk_passed':z['boolean']()})['describe']('Counts\x20+\x20risk\x20status\x20for\x20the\x20confirmation\x20screen.'),'next_action':z['string']()['describe']('Next\x20chain\x20step:\x20migration_apply\x20with\x20the\x20matched\x20template\x20when\x20the\x20review\x20is\x20clean;\x20surface\x20the\x20unmapped/manual_review\x20items\x20for\x20a\x20user\x20decision\x20otherwise.')}),z['object']({'action':z['literal']('migration_apply'),'template_id':z['string'](),'network':z['enum'](['testnet','mainnet','localnet']),...SemanticIrEcho,'scan':ScanSummarySchema,'plan':z['record'](z['string'](),z['unknown']())['describe']('Creation\x20plan\x20from\x20the\x20merchant-guide\x20pipeline\x20(never\x20executed\x20on-chain).'),'verdict':z['object']({'buildable':z['boolean'](),'blockers':z['array'](z['string']())})['describe']('Single\x20aggregate\x20ruling\x20over\x20the\x20three\x20signal\x20faces\x20(scan.passed\x20/\x20plan.graph_validation.valid\x20/\x20plan.audit.blocking)\x20—\x20the\x20authoritative\x20go/no-go\x20(bkmn-261012\x20F-M62);\x20the\x20individual\x20faces\x20stay\x20advisory.'),'next_action':z['string']()['describe']('Top-level\x20forwarding\x20of\x20the\x20materialization\x20contract\x20(C6):\x20the\x20guide\x27s\x20\x27Plan\x20ready.\x20Materialize:\x20...\x27\x20text\x20verbatim\x20when\x20the\x20audit\x20is\x20clean;\x20a\x20BLOCKED\x20reroute\x20back\x20to\x20this\x20action\x20otherwise.')}),z['object']({'action':z['literal']('plan_execute'),'completed':z['boolean']()['describe']('True\x20when\x20EVERY\x20step\x20executed\x20(store\x20fully\x20deployed).'),'steps':z['array'](z['record'](z['string'](),z['unknown']()))['describe']('Per-step\x20results:\x20{\x20stepId,\x20status:\x20executed|failed|blocked,\x20digest?,\x20address?,\x20error?\x20}.'),'outputs':z['record'](z['string'](),z['string']())['describe']('step\x20id\x20->\x20created\x20on-chain\x20address\x20(create\x20steps).\x20Feed\x20back\x20as\x20previous_outputs\x20when\x20resuming.'),'preflight':z['record'](z['string'](),z['unknown']())['describe']('Freeze-gate\x20audit\x20the\x20run\x20was\x20gated\x20on\x20(issues\x20+\x20findings).'),'readback':z['record'](z['string'](),z['unknown']())['describe']('Post-execution\x20conservation/readback\x20checks.'),'next_action':z['string']()['describe']('One-click\x20forwarding:\x20deploy-complete\x20guidance,\x20or\x20the\x20resume\x20recipe\x20(completed_steps\x20+\x20previous_outputs)\x20after\x20a\x20mid-run\x20failure.')})])})['strict']();
|
|
@@ -71,6 +71,7 @@ export declare const CallAllocation_OperateSchema: z.ZodObject<{
|
|
|
71
71
|
}, z.core.$strict>>;
|
|
72
72
|
}, z.core.$strict>, z.ZodLiteral<"recently">]>>;
|
|
73
73
|
alloc_by_guard: z.ZodOptional<z.ZodString>;
|
|
74
|
+
alloc_batch: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
74
75
|
acknowledge_dual_payout: z.ZodOptional<z.ZodBoolean>;
|
|
75
76
|
formula_spec_set: z.ZodOptional<z.ZodObject<{
|
|
76
77
|
allocator_index: z.ZodNumber;
|
|
@@ -148,6 +149,7 @@ export declare const CallAllocation_DataSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
148
149
|
}, z.core.$strict>>;
|
|
149
150
|
}, z.core.$strict>, z.ZodLiteral<"recently">]>>;
|
|
150
151
|
alloc_by_guard: z.ZodOptional<z.ZodString>;
|
|
152
|
+
alloc_batch: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
151
153
|
acknowledge_dual_payout: z.ZodOptional<z.ZodBoolean>;
|
|
152
154
|
formula_spec_set: z.ZodOptional<z.ZodObject<{
|
|
153
155
|
allocator_index: z.ZodNumber;
|
|
@@ -226,6 +228,7 @@ export declare const CallAllocation_InputSchema: z.ZodObject<{
|
|
|
226
228
|
}, z.core.$strict>>;
|
|
227
229
|
}, z.core.$strict>, z.ZodLiteral<"recently">]>>;
|
|
228
230
|
alloc_by_guard: z.ZodOptional<z.ZodString>;
|
|
231
|
+
alloc_batch: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
229
232
|
acknowledge_dual_payout: z.ZodOptional<z.ZodBoolean>;
|
|
230
233
|
formula_spec_set: z.ZodOptional<z.ZodObject<{
|
|
231
234
|
allocator_index: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{CoinParamSchema,CallEnvSchema,SubmissionCallSchema,TypeNamedObjectSchema}from'./base.js';import{AllocatorsSchema,PaymentInfoSchema,RepositoryDataWhereSchema}from'../query/index.js';import{NameOrAddressSchema,ReceivedBalanceOrRecentlySchema,RECEIVE_FORMAT_BLOCK_BALANCE}from'../common/index.js';export const CallAllocation_CreateSchema=z['object']({'object':TypeNamedObjectSchema['describe']('REQUIRED\x20for\x20creating\x20new\x20object.\x20Provide\x20{name:\x20\x27yourName\x27,\x20type:\x20\x27Allocation\x27}\x20to\x20create\x20and\x20name\x20the\x20new\x20Allocation\x20object.'),'allocators':AllocatorsSchema,'coin':CoinParamSchema,'payment_info':PaymentInfoSchema,'allow_unanchored':z['boolean']()['optional']()['describe']('docs#11\x20escape\x20hatch:\x20explicitly\x20allow\x20creating\x20an\x20Allocation\x20whose\x20payment_info\x20has\x20NO\x20for_object\x20anchor\x20while\x20any\x20sharing\x20row\x20uses\x20a\x20GuardIdentifier\x20recipient.\x20'+'Unanchored\x20+\x20GuardIdentifier\x20lets\x20any\x20guard-passing\x20caller\x20redirect\x20the\x20submitted\x20payout\x20address\x20to\x20an\x20arbitrary\x20address\x20—\x20'+'anchor\x20it\x20with\x20payment_info.for_object\x20instead.\x20Set\x20true\x20ONLY\x20after\x20the\x20user\x20explicitly\x20accepts\x20that\x20risk.\x20Default:\x20blocked.')})['strict']()['describe']('Create\x20a\x20new\x20Allocation\x20object.\x20Set\x20\x27object\x27\x20field\x20with\x20{name:\x20\x27yourName\x27,\x20type:\x20\x27Allocation\x27}\x20to\x20name\x20the\x20new\x20object.\x20Notice:\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.');export const FormulaSpecSchema=z['object']({'repo':NameOrAddressSchema['describe']('Repository\x20object\x20(ID\x20or\x20LocalMark\x20name)\x20whose\x20policy-key\x20data\x20table\x20is\x20scanned\x20at\x20alloc()\x20time\x20to\x20produce\x20the\x20scalar.\x20'+'Resolved\x20to\x20an\x20address\x20before\x20the\x20call.'),'key':z['string']()['describe']('Policy\x20key\x20(String)\x20inside\x20that\x20Repository\x20whose\x20data\x20rows\x20are\x20the\x20candidate\x20set.\x20Max\x2064\x20bytes.'),'selector':z['union']([z['literal'](0x0),z['literal'](0x1)])['describe']('Which\x20aggregate\x20produces\x20the\x20scalar:\x200\x20=\x20RECORD\x20COUNT\x20(u64\x20—\x20how\x20many\x20candidate\x20rows\x20match\x20the\x20predicate),\x20'+'1\x20=\x20VALUE\x20SUM\x20(u256\x20—\x20sum\x20of\x20the\x20matching\x20rows\x27\x20numeric\x20payloads,\x20overflow-safe).\x20Any\x20other\x20value\x20is\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'predicate':RepositoryDataWhereSchema['describe']('Predicate\x20filter\x20applied\x20to\x20each\x20candidate\x27s\x20stored\x20value\x20—\x20SAME\x20wire\x20format\x20as\x20the\x20repository\x20count/sum-where\x20guard\x20queries\x20(1173/1174).\x20'+'kind\x20must\x20match\x20the\x20policy\x20value\x20type;\x20mismatching\x20entries\x20are\x20skipped\x20honestly\x20(never\x20an\x20error).'),'ids':z['array'](z['string']())['describe']('EXPLICIT\x20candidate\x20object\x20IDs\x20(vector<address>)\x20to\x20scan.\x20Duplicates\x20are\x20deduped;\x20max\x20100\x20candidates;\x20'+'an\x20EMPTY\x20list\x20matches\x20no\x20records\x20(scalar\x200)\x20—\x20there\x20is\x20no\x20\x27all\x20objects\x27\x20wildcard.')})['strict']()['describe']('Runtime\x20pricing\x20spec\x20for\x20one\x20Formula\x20sharing\x20slot\x20(FormulaSpec).\x20Payout\x20for\x20that\x20leg\x20=\x20clamp(sharing_coefficient_bps\x20×\x20scalar\x20/\x2010000,\x200,\x20headroom),\x20'+'where\x20scalar\x20=\x20the\x20selected\x20aggregate\x20over\x20the\x20Repository\x20rows.\x20Binding\x20REPLACES\x20any\x20previous\x20spec\x20for\x20the\x20slot;\x20the\x20plan\x20shape\x20itself\x20'+'(which\x20slots\x20are\x20Formula,\x20coefficients)\x20is\x20immutable\x20and\x20was\x20fixed\x20when\x20the\x20allocator\x20was\x20declared.');export const CallAllocation_OperateSchema=z['object']({'object':NameOrAddressSchema['describe']('REQUIRED\x20for\x20operating\x20existing\x20object.\x20Provide\x20the\x20Allocation\x20object\x20ID\x20or\x20existing\x20name\x20to\x20reference\x20the\x20target\x20object.'),'received_coins':ReceivedBalanceOrRecentlySchema['optional']()['describe']('Unwrap\x20the\x20CoinWrapper\x20objects\x20received\x20by\x20the\x20Allocation\x20object\x20and\x20deposit\x20them\x20into\x20the\x20pending\x20allocation\x20balance.'+RECEIVE_FORMAT_BLOCK_BALANCE),'alloc_by_guard':NameOrAddressSchema['optional']()['describe']('Verify\x20the\x20specified\x20Guard\x20and\x20execute\x20the\x20corresponding\x20fund\x20distribution.\x20'+'GENERIC\x20SEMANTICS:\x20an\x20Allocation\x20distributes\x20whatever\x20balance\x20it\x20holds\x20—\x20order\x20funds,\x20payroll,\x20dividends,\x20bounties.\x20'+'It\x20defines\x20no\x20scenario-specific\x20rule:\x20eligibility\x20(including\x20issuer\x20identity\x20for\x20standalone\x20use,\x20e.g.\x20an\x20org\x20admin)\x20'+'and\x20differentiation\x20inputs\x20are\x20expressed\x20as\x20Guard\x20constraints,\x20all\x20public\x20and\x20auditable.\x20'+'RECIPIENT\x20RESOLUTION\x20(Recipient\x20enum):\x20'+'Entity\x20→\x20fixed\x20address;\x20Signer\x20→\x20transaction\x20sender;\x20GuardIdentifier\x20n\x20→\x20the\x20address\x20submitted\x20for\x20identifier\x20n\x20(resolved\x20from\x20the\x20passport\x27s\x20submission\x20record).\x20'+'ORDER\x20PATTERN\x20(canonical):\x20the\x20Guard\x20table\x20needs\x20ONE\x20submitted\x20Order,\x20constrained\x20by\x20the\x20Guard\x20(e.g.\x20order.service\x20==\x20host\x20service,\x20'+'progress\x20at\x20a\x20qualifying\x20node,\x20signer\x20==\x20order.owner);\x20that\x20order\x20submission\x20IS\x20the\x20recipient\x20slot.\x20Whoever\x20triggers\x20the\x20distribution,\x20funds\x20necessarily\x20'+'land\x20at\x20an\x20Order\x20OBJECT;\x20delivered\x20CoinWrappers\x20are\x20owned\x20by\x20the\x20order\x20and\x20can\x20be\x20extracted\x20only\x20by\x20the\x20Order\x20object\x20itself\x20'+'(Wow\x20ownership)\x20—\x20the\x20coins\x20then\x20go\x20to\x20the\x20order\x27s\x20current\x20owner.\x20Object\x20receipt\x20=\x20owner\x20receipt.\x20'+'POST-DISTRIBUTION\x20CLAIM\x20(required\x20step):\x20each\x20recipient\x20gets\x20a\x20CoinWrapper\x20(not\x20spendable\x20coins)\x20—\x20EOA\x20wallet\x20→\x20operation_type=\x27payment\x27\x20RECEIVE\x20mode\x20'+'{object:\x27<coinwrapper_id>\x27,\x20receive:true};\x20Order\x20object\x20→\x20operation_type=\x27order\x27\x20{object:\x27<order_id>\x27,\x20receive:\x27recently\x27};\x20Treasury\x20object\x20→\x20treasury\x20receive.\x20'+'Find\x20pending\x20CoinWrappers\x20via\x20query_toolkit\x20query_type=\x27onchain_received\x27;\x20verify\x20via\x20the\x20immutable\x20Payment\x20object\x20(allocation.payment\x20array).\x20'+'RISK:\x20safety\x20follows\x20from\x20the\x20sufficiency\x20of\x20the\x20Guard\x20constraints,\x20not\x20the\x20recipient\x20form\x20—\x20analyze\x20the\x20recipient\x20constraint\x20audit\x20before\x20publish;\x20'+'structural\x20residuals\x20(unavoidable):\x20permissionless\x20alloc\x20allows\x20forced\x20settlement\x20timing,\x20the\x20submitted\x20order\x20is\x20not\x20bound\x20to\x20the\x20settled\x20allocation,\x20'+'and\x20allocators/guards\x20are\x20immutable\x20after\x20publish.'),'acknowledge_dual_payout':z['boolean']()['optional']()['describe']('A-1\x20(amz9-ln-261023)\x20explicit\x20opt-in\x20for\x20a\x20KNOWN\x20double\x20payout:\x20when\x20a\x20submitted\x20order\x20already\x20received\x20'+'arbitration\x20compensation\x20(order.claimed_by\x20set)\x20and\x20this\x20call\x20would\x20ALSO\x20release\x20its\x20escrow\x20(refund\x20track),\x20'+'the\x20call\x20is\x20REFUSED\x20unless\x20this\x20flag\x20is\x20true.\x20The\x20two\x20payout\x20tracks\x20are\x20independent\x20by\x20design\x20—\x20the\x20chain\x20'+'will\x20not\x20net\x20or\x20stop\x20the\x20second\x20payout\x20(the\x20escrow\x20receive\x20path\x20has\x20no\x20claimed_by\x20gate),\x20BUT\x20a\x20rail\x20paired\x20'+'on\x20order.claimed_by\x20(refund\x20none\x20/\x20recover\x20some)\x20may\x20guard-reject\x20the\x20second\x20payout\x20on-chain;\x20that\x20rejection\x20'+'is\x20the\x20designed\x20mutual\x20exclusion,\x20and\x20the\x20escrow\x20exits\x20via\x20the\x20paired\x20rail.\x20Buyer\x20NET\x20view:\x20total\x20received\x20=\x20'+'compensation\x20+\x20escrow\x20refund.\x20Leave\x20unset\x20for\x20normal\x20refunds\x20of\x20un-awarded\x20orders.'),'formula_spec_set':z['object']({'allocator_index':z['number']()['int']()['min'](0x0)['describe']('Index\x20of\x20the\x20allocator\x20within\x20allocators.allocators\x20(0-based).\x20Must\x20address\x20an\x20EXISTING\x20allocator,\x20else\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'slot_index':z['number']()['int']()['min'](0x0)['describe']('Index\x20of\x20the\x20sharing\x20row\x20within\x20that\x20allocator\x27s\x20sharing[]\x20(0-based).\x20Must\x20address\x20a\x20slot\x20whose\x20mode\x20is\x20Formula,\x20else\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'spec':FormulaSpecSchema})['strict']()['optional']()['describe']('Bind\x20(or\x20replace)\x20the\x20runtime\x20pricing\x20spec\x20of\x20ONE\x20Formula\x20sharing\x20slot\x20of\x20this\x20Allocation\x20—\x20no\x20re-declaration\x20of\x20the\x20allocator\x20plan,\x20'+'no\x20fund\x20movement.\x20Only\x20the\x20DATA\x20SOURCE\x20(which\x20repository\x20aggregate\x20prices\x20the\x20slot)\x20is\x20set\x20here;\x20the\x20slot\x20itself\x20must\x20already\x20be\x20declared\x20as\x20a\x20'+'Formula\x20leg\x20(mode\x204).\x20An\x20unbound\x20Formula\x20slot\x20prices\x20its\x20scalar\x20as\x200.')})['strict']()['describe']('Operate\x20on\x20an\x20existing\x20Allocation\x20object.\x20Set\x20\x27object\x27\x20field\x20with\x20the\x20object\x20ID\x20or\x20existing\x20name\x20to\x20specify\x20the\x20target.');export const CallAllocation_DataSchema=z['union']([CallAllocation_CreateSchema,CallAllocation_OperateSchema])['describe']('On-chain\x20Allocation\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Use\x20CallAllocation_CreateSchema\x20by\x20setting\x20\x27object\x27\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20...}.\x20(2)\x20OPERATE\x20EXISTING:\x20Use\x20CallAllocation_OperateSchema\x20by\x20setting\x20\x27object\x27\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20');export const CallAllocation_InputSchema=z['object']({'data':CallAllocation_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
1
|
+
import{z}from'zod';import{CoinParamSchema,CallEnvSchema,SubmissionCallSchema,TypeNamedObjectSchema}from'./base.js';import{AllocatorsSchema,PaymentInfoSchema,RepositoryDataWhereSchema}from'../query/index.js';import{NameOrAddressSchema,ReceivedBalanceOrRecentlySchema,RECEIVE_FORMAT_BLOCK_BALANCE}from'../common/index.js';export const CallAllocation_CreateSchema=z['object']({'object':TypeNamedObjectSchema['describe']('REQUIRED\x20for\x20creating\x20new\x20object.\x20Provide\x20{name:\x20\x27yourName\x27,\x20type:\x20\x27Allocation\x27}\x20to\x20create\x20and\x20name\x20the\x20new\x20Allocation\x20object.'),'allocators':AllocatorsSchema,'coin':CoinParamSchema,'payment_info':PaymentInfoSchema,'allow_unanchored':z['boolean']()['optional']()['describe']('docs#11\x20escape\x20hatch:\x20explicitly\x20allow\x20creating\x20an\x20Allocation\x20whose\x20payment_info\x20has\x20NO\x20for_object\x20anchor\x20while\x20any\x20sharing\x20row\x20uses\x20a\x20GuardIdentifier\x20recipient.\x20'+'Unanchored\x20+\x20GuardIdentifier\x20lets\x20any\x20guard-passing\x20caller\x20redirect\x20the\x20submitted\x20payout\x20address\x20to\x20an\x20arbitrary\x20address\x20—\x20'+'anchor\x20it\x20with\x20payment_info.for_object\x20instead.\x20Set\x20true\x20ONLY\x20after\x20the\x20user\x20explicitly\x20accepts\x20that\x20risk.\x20Default:\x20blocked.')})['strict']()['describe']('Create\x20a\x20new\x20Allocation\x20object.\x20Set\x20\x27object\x27\x20field\x20with\x20{name:\x20\x27yourName\x27,\x20type:\x20\x27Allocation\x27}\x20to\x20name\x20the\x20new\x20object.\x20Notice:\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.');export const FormulaSpecSchema=z['object']({'repo':NameOrAddressSchema['describe']('Repository\x20object\x20(ID\x20or\x20LocalMark\x20name)\x20whose\x20policy-key\x20data\x20table\x20is\x20scanned\x20at\x20alloc()\x20time\x20to\x20produce\x20the\x20scalar.\x20'+'Resolved\x20to\x20an\x20address\x20before\x20the\x20call.'),'key':z['string']()['describe']('Policy\x20key\x20(String)\x20inside\x20that\x20Repository\x20whose\x20data\x20rows\x20are\x20the\x20candidate\x20set.\x20Max\x2064\x20bytes.'),'selector':z['union']([z['literal'](0x0),z['literal'](0x1)])['describe']('Which\x20aggregate\x20produces\x20the\x20scalar:\x200\x20=\x20RECORD\x20COUNT\x20(u64\x20—\x20how\x20many\x20candidate\x20rows\x20match\x20the\x20predicate),\x20'+'1\x20=\x20VALUE\x20SUM\x20(u256\x20—\x20sum\x20of\x20the\x20matching\x20rows\x27\x20numeric\x20payloads,\x20overflow-safe).\x20Any\x20other\x20value\x20is\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'predicate':RepositoryDataWhereSchema['describe']('Predicate\x20filter\x20applied\x20to\x20each\x20candidate\x27s\x20stored\x20value\x20—\x20SAME\x20wire\x20format\x20as\x20the\x20repository\x20count/sum-where\x20guard\x20queries\x20(1173/1174).\x20'+'kind\x20must\x20match\x20the\x20policy\x20value\x20type;\x20mismatching\x20entries\x20are\x20skipped\x20honestly\x20(never\x20an\x20error).'),'ids':z['array'](z['string']())['describe']('EXPLICIT\x20candidate\x20object\x20IDs\x20(vector<address>)\x20to\x20scan.\x20Duplicates\x20are\x20deduped;\x20max\x20100\x20candidates;\x20'+'an\x20EMPTY\x20list\x20matches\x20no\x20records\x20(scalar\x200)\x20—\x20there\x20is\x20no\x20\x27all\x20objects\x27\x20wildcard.')})['strict']()['describe']('Runtime\x20pricing\x20spec\x20for\x20one\x20Formula\x20sharing\x20slot\x20(FormulaSpec).\x20Payout\x20for\x20that\x20leg\x20=\x20clamp(sharing_coefficient_bps\x20×\x20scalar\x20/\x2010000,\x200,\x20headroom),\x20'+'where\x20scalar\x20=\x20the\x20selected\x20aggregate\x20over\x20the\x20Repository\x20rows.\x20Binding\x20REPLACES\x20any\x20previous\x20spec\x20for\x20the\x20slot;\x20the\x20plan\x20shape\x20itself\x20'+'(which\x20slots\x20are\x20Formula,\x20coefficients)\x20is\x20immutable\x20and\x20was\x20fixed\x20when\x20the\x20allocator\x20was\x20declared.');export const CallAllocation_OperateSchema=z['object']({'object':NameOrAddressSchema['describe']('REQUIRED\x20for\x20operating\x20existing\x20object.\x20Provide\x20the\x20Allocation\x20object\x20ID\x20or\x20existing\x20name\x20to\x20reference\x20the\x20target\x20object.'),'received_coins':ReceivedBalanceOrRecentlySchema['optional']()['describe']('Unwrap\x20the\x20CoinWrapper\x20objects\x20received\x20by\x20the\x20Allocation\x20object\x20and\x20deposit\x20them\x20into\x20the\x20pending\x20allocation\x20balance.'+RECEIVE_FORMAT_BLOCK_BALANCE),'alloc_by_guard':NameOrAddressSchema['optional']()['describe']('Verify\x20the\x20specified\x20Guard\x20and\x20execute\x20the\x20corresponding\x20fund\x20distribution.\x20'+'GENERIC\x20SEMANTICS:\x20an\x20Allocation\x20distributes\x20whatever\x20balance\x20it\x20holds\x20—\x20order\x20funds,\x20payroll,\x20dividends,\x20bounties.\x20'+'It\x20defines\x20no\x20scenario-specific\x20rule:\x20eligibility\x20(including\x20issuer\x20identity\x20for\x20standalone\x20use,\x20e.g.\x20an\x20org\x20admin)\x20'+'and\x20differentiation\x20inputs\x20are\x20expressed\x20as\x20Guard\x20constraints,\x20all\x20public\x20and\x20auditable.\x20'+'RECIPIENT\x20RESOLUTION\x20(Recipient\x20enum):\x20'+'Entity\x20→\x20fixed\x20address;\x20Signer\x20→\x20transaction\x20sender;\x20GuardIdentifier\x20n\x20→\x20the\x20address\x20submitted\x20for\x20identifier\x20n\x20(resolved\x20from\x20the\x20passport\x27s\x20submission\x20record).\x20'+'ORDER\x20PATTERN\x20(canonical):\x20the\x20Guard\x20table\x20needs\x20ONE\x20submitted\x20Order,\x20constrained\x20by\x20the\x20Guard\x20(e.g.\x20order.service\x20==\x20host\x20service,\x20'+'progress\x20at\x20a\x20qualifying\x20node,\x20signer\x20==\x20order.owner);\x20that\x20order\x20submission\x20IS\x20the\x20recipient\x20slot.\x20Whoever\x20triggers\x20the\x20distribution,\x20funds\x20necessarily\x20'+'land\x20at\x20an\x20Order\x20OBJECT;\x20delivered\x20CoinWrappers\x20are\x20owned\x20by\x20the\x20order\x20and\x20can\x20be\x20extracted\x20only\x20by\x20the\x20Order\x20object\x20itself\x20'+'(Wow\x20ownership)\x20—\x20the\x20coins\x20then\x20go\x20to\x20the\x20order\x27s\x20current\x20owner.\x20Object\x20receipt\x20=\x20owner\x20receipt.\x20'+'POST-DISTRIBUTION\x20CLAIM\x20(required\x20step):\x20each\x20recipient\x20gets\x20a\x20CoinWrapper\x20(not\x20spendable\x20coins)\x20—\x20EOA\x20wallet\x20→\x20operation_type=\x27payment\x27\x20RECEIVE\x20mode\x20'+'{object:\x27<coinwrapper_id>\x27,\x20receive:true};\x20Order\x20object\x20→\x20operation_type=\x27order\x27\x20{object:\x27<order_id>\x27,\x20receive:\x27recently\x27};\x20Treasury\x20object\x20→\x20treasury\x20receive.\x20'+'Find\x20pending\x20CoinWrappers\x20via\x20query_toolkit\x20query_type=\x27onchain_received\x27;\x20verify\x20via\x20the\x20immutable\x20Payment\x20object\x20(allocation.payment\x20array).\x20'+'RISK:\x20safety\x20follows\x20from\x20the\x20sufficiency\x20of\x20the\x20Guard\x20constraints,\x20not\x20the\x20recipient\x20form\x20—\x20analyze\x20the\x20recipient\x20constraint\x20audit\x20before\x20publish;\x20'+'structural\x20residuals\x20(unavoidable):\x20permissionless\x20alloc\x20allows\x20forced\x20settlement\x20timing,\x20the\x20submitted\x20order\x20is\x20not\x20bound\x20to\x20the\x20settled\x20allocation,\x20'+'and\x20allocators/guards\x20are\x20immutable\x20after\x20publish.'),'alloc_batch':NameOrAddressSchema['array']()['min'](0x1)['optional']()['describe']('Q8-F01\x20AGGREGATE\x20RELEASE\x20—\x20sweep\x20SEVERAL\x20pools\x20in\x20ONE\x20transaction\x20(allocation::alloc_batch).\x20'+'Provide\x20the\x20COMPLETE\x20pool\x20list\x20INCLUDING\x20\x27object\x27:\x20the\x20anchor\x20Allocation\x20addressed\x20by\x20this\x20operation\x20must\x20'+'appear\x20in\x20the\x20list,\x20and\x20the\x20SDK\x20refuses\x20a\x20list\x20that\x20omits\x20it.\x20REQUIRES\x20alloc_by_guard\x20—\x20that\x20one\x20Guard\x20'+'defines\x20the\x20release\x20and\x20is\x20applied\x20to\x20every\x20pool.\x20'+'WHY\x20THIS\x20EXISTS:\x20a\x20crowdfunding\x20settlement\x20holds\x20each\x20backer\x27s\x20escrow\x20in\x20its\x20own\x20Allocation\x20under\x20the\x20SAME\x20'+'release/refund\x20Guard;\x20with\x20single-pool\x20calls\x20a\x20keeper\x20needs\x20N\x20ordered\x20transactions,\x20and\x20any\x20keeper\x20that\x20stops\x20'+'at\x20the\x20first\x20failure\x20strands\x20the\x20remaining\x20pools\x20while\x20the\x20release\x20reports\x20done.\x20'+'ALL-OR-NOTHING:\x20one\x20pool\x20aborting\x20reverts\x20the\x20whole\x20batch.\x20'+'PRE-FILTER\x20drained\x20pools\x20before\x20building\x20the\x20call\x20—\x20a\x20zero-balance\x20pool\x20aborts\x20the\x20ENTIRE\x20batch\x20with\x20'+'EZERO_DISTRIBUTION\x20(14)\x20and\x20nothing\x20is\x20released;\x20an\x20empty\x20candidate\x20set\x20means\x20there\x20is\x20genuinely\x20nothing\x20to\x20'+'release\x20(an\x20empty\x20list\x20is\x20refused\x20with\x20EEMPTY_POOL_BATCH\x2026\x20instead\x20of\x20a\x20fake\x20success).\x20'+'EVERY\x20pool\x20must\x20carry\x20an\x20allocator\x20BOUND\x20to\x20alloc_by_guard:\x20an\x20unbound\x20pool\x20completes\x20the\x20sweep\x20having\x20'+'distributed\x20NOTHING,\x20so\x20the\x20SDK\x20verifies\x20membership\x20pool-by-pool\x20and\x20REFUSES\x20the\x20call\x20before\x20any\x20gas\x20is\x20spent.\x20'+'Each\x20recipient\x20still\x20receives\x20a\x20CoinWrapper\x20and\x20claims\x20it\x20through\x20the\x20normal\x20POST-DISTRIBUTION\x20CLAIM\x20step\x20—\x20'+'batching\x20changes\x20the\x20release\x20atomicity,\x20not\x20the\x20claim\x20path.'),'acknowledge_dual_payout':z['boolean']()['optional']()['describe']('A-1\x20(amz9-ln-261023;\x20keeper\x20posture\x20拍板⑧\x20dm-mtw-261027)\x20explicit\x20opt-in\x20for\x20a\x20KNOWN\x20double\x20payout:\x20when\x20a\x20submitted\x20order\x20already\x20received\x20'+'arbitration\x20compensation\x20(order.claimed_by\x20set)\x20and\x20this\x20call\x20would\x20ALSO\x20release\x20its\x20escrow\x20(refund\x20track),\x20'+'the\x20call\x20is\x20REFUSED\x20unless\x20this\x20flag\x20is\x20true.\x20The\x20two\x20payout\x20tracks\x20are\x20independent\x20by\x20design\x20—\x20the\x20chain\x20'+'will\x20not\x20net\x20or\x20stop\x20the\x20second\x20payout\x20(the\x20escrow\x20receive\x20path\x20has\x20no\x20claimed_by\x20gate),\x20BUT\x20a\x20rail\x20paired\x20'+'on\x20order.claimed_by\x20(refund\x20none\x20/\x20recover\x20some)\x20may\x20guard-reject\x20the\x20second\x20payout\x20on-chain;\x20that\x20rejection\x20'+'is\x20the\x20designed\x20mutual\x20exclusion,\x20and\x20the\x20escrow\x20exits\x20via\x20the\x20paired\x20rail.\x20Buyer\x20NET\x20view:\x20total\x20received\x20=\x20'+'compensation\x20+\x20escrow\x20refund.\x20Leave\x20unset\x20for\x20normal\x20refunds\x20of\x20un-awarded\x20orders.\x20AUTOMATION\x20RULE:\x20this\x20flag\x20'+'is\x20the\x20HUMAN\x20operator\x27s\x20netting\x20decision\x20—\x20an\x20automated\x20keeper\x20that\x20receives\x20dual_payout_unconfirmed\x20must\x20STOP\x20'+'retrying\x20and\x20escalate\x20(never\x20set\x20the\x20flag\x20itself);\x20a\x20retry\x20loop\x20wastes\x20gas\x20and\x20a\x20silent\x20stop\x20strands\x20the\x20payout.\x20D-1\x20(ksr\x205R-08):\x20the\x20flag\x20is\x20additionally\x20honored\x20ONLY\x20when\x20the\x20'+'executing\x20store\x20carries\x20a\x20human-recorded\x20preauthorization\x20(config_operation\x20store_dual_payout_set\x20{account,\x20'+'confirm:true},\x20then\x20store_dual_payout_get\x20shows\x20preauthorized=true);\x20without\x20it\x20the\x20gate\x20answers\x20'+'dual_payout_preauthorization_required\x20—\x20record\x20the\x20standing\x20decision\x20first,\x20then\x20re-send.'),'formula_spec_set':z['object']({'allocator_index':z['number']()['int']()['min'](0x0)['describe']('Index\x20of\x20the\x20allocator\x20within\x20allocators.allocators\x20(0-based).\x20Must\x20address\x20an\x20EXISTING\x20allocator,\x20else\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'slot_index':z['number']()['int']()['min'](0x0)['describe']('Index\x20of\x20the\x20sharing\x20row\x20within\x20that\x20allocator\x27s\x20sharing[]\x20(0-based).\x20Must\x20address\x20a\x20slot\x20whose\x20mode\x20is\x20Formula,\x20else\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'spec':FormulaSpecSchema})['strict']()['optional']()['describe']('Bind\x20(or\x20replace)\x20the\x20runtime\x20pricing\x20spec\x20of\x20ONE\x20Formula\x20sharing\x20slot\x20of\x20this\x20Allocation\x20—\x20no\x20re-declaration\x20of\x20the\x20allocator\x20plan,\x20'+'no\x20fund\x20movement.\x20Only\x20the\x20DATA\x20SOURCE\x20(which\x20repository\x20aggregate\x20prices\x20the\x20slot)\x20is\x20set\x20here;\x20the\x20slot\x20itself\x20must\x20already\x20be\x20declared\x20as\x20a\x20'+'Formula\x20leg\x20(mode\x204).\x20An\x20unbound\x20Formula\x20slot\x20prices\x20its\x20scalar\x20as\x200.')})['strict']()['describe']('Operate\x20on\x20an\x20existing\x20Allocation\x20object.\x20Set\x20\x27object\x27\x20field\x20with\x20the\x20object\x20ID\x20or\x20existing\x20name\x20to\x20specify\x20the\x20target.');export const CallAllocation_DataSchema=z['union']([CallAllocation_CreateSchema,CallAllocation_OperateSchema])['describe']('On-chain\x20Allocation\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Use\x20CallAllocation_CreateSchema\x20by\x20setting\x20\x27object\x27\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20...}.\x20(2)\x20OPERATE\x20EXISTING:\x20Use\x20CallAllocation_OperateSchema\x20by\x20setting\x20\x27object\x27\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20');export const CallAllocation_InputSchema=z['object']({'data':CallAllocation_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{TypedPermissionObjectSchema,CoinParamSchema,NamedObjectSchema,CallEnvSchema,SubmissionCallSchema}from'./base.js';import{VotingGuardSchema}from'../query/index.js';import{BalanceTypeSchema,DescriptionSchema,LongNameSchema,NameOrAddressSchema,NameSchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS}from'../common/index.js';const ARB_CASE_FIELD=NameOrAddressSchema['describe']('Arb\x20CASE\x20object\x20—\x20the\x20single\x20dispute\x20case\x20created\x20by\x20`dispute`\x20(the\x20object\x20you\x20may\x20have\x20named\x20via\x20`namedArb`).\x20'+'NOT\x20the\x20arbitrator\x20registration\x20object:\x20that\x20one\x20goes\x20in\x20the\x20ROOT\x20`object`\x20field,\x20while\x20every\x20case-scoped\x20'+'operation\x20(confirm\x20/\x20voting_deadline_change\x20/\x20vote\x20/\x20feedback\x20/\x20arbitration\x20/\x20reset\x20/\x20arb_withdraw)\x20addresses\x20'+'the\x20case\x20through\x20THIS\x20field.\x20Accepts\x20the\x20Arb\x27s\x200x\x20address\x20or\x20its\x20LocalMark\x20name.');export const DisputeSchema=z['object']({'order':NameOrAddressSchema['describe']('Order\x20ID\x20or\x20name.'),'description':DescriptionSchema['describe']('Dispute\x20description.\x20REQUIRED\x20and\x20NON-EMPTY\x20on-chain\x20(the\x20dispute\x20call\x20aborts\x20when\x20it\x20is\x20empty;\x20max\x204000\x20bytes).\x20State\x20what\x20the\x20dispute\x20is\x20about\x20—\x20it\x20is\x20permanent\x20on-chain\x20case\x20context.'),'proposition':z['array'](LongNameSchema)['describe']('List\x20of\x20dispute\x20propositions.'),'fee':CoinParamSchema['describe']('Dispute\x20processing\x20fee.\x20FORMAT:\x20{balance:\x20<amount_in_smallest_unit>}\x20—\x20field\x20name\x20is\x20\x27balance\x27\x20(NOT\x20\x27amount\x27).\x20'+'The\x20token\x20type\x20and\x20precision\x20are\x20determined\x20by\x20the\x20Arbitration\x20object\x27s\x20type_parameter\x20(the\x20generic\x20type\x20set\x20when\x20the\x20Arbitration\x20was\x20created).\x20'+'For\x20WOW\x20(9\x20decimals):\x20{balance:\x2050000000}\x20=\x200.05\x20WOW.\x20'+'For\x20tokens\x20with\x20different\x20decimals,\x20adjust\x20accordingly\x20(e.g.\x20USDC\x20has\x206\x20decimals,\x20so\x20{balance:\x2050000}\x20=\x200.05\x20USDC).\x20'+'docs#45:\x20the\x20fee\x20does\x20NOT\x20return\x20to\x20the\x20filer\x20on\x20a\x20win\x20—\x20it\x20stays\x20in\x20the\x20Arbitration\x20object\x20and\x20is\x20withdrawable\x20by\x20the\x20arbitrator.'),'namedArb':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20newly\x20created\x20Arb\x20(arbitration\x20case)\x20object.\x20'+'Without\x20this,\x20the\x20Arb\x20is\x20only\x20referenceable\x20by\x20its\x20on-chain\x20address.\x20'+'Example:\x20{name:\x20\x27my_dispute_v1\x27}\x20allows\x20subsequent\x20vote/feedback\x20operations\x20to\x20use\x20\x27my_dispute_v1\x27.')})['strict']();export const ConfirmSchema=z['object']({'arb':ARB_CASE_FIELD,'voting_deadline':z['union']([z['number']()['int']()['min'](0x0),z['null']()])['default'](null)['describe']('Voting\x20deadline\x20as\x20Unix\x20timestamp\x20in\x20MILLISECONDS\x20(ms).\x20SEMANTICS\x20OF\x20SPECIAL\x20VALUES:\x20'+'null\x20(DEFAULT\x20when\x20omitted)\x20=\x20open-ended\x20voting,\x20no\x20deadline;\x20parties\x20may\x20vote\x20at\x20any\x20time\x20and\x20the\x20arbitrator\x20may\x20deliver\x20the\x20verdict\x20after\x20casting\x20at\x20least\x20one\x20ballot\x20(arb.move\x20skips\x20the\x20deadline\x20assert\x20when\x20the\x20Option\x20is\x20none)\x20—\x20this\x20is\x20the\x20SAFE\x20default;\x20'+'a\x20future\x20timestamp\x20=\x20normal\x20bounded\x20voting\x20window\x20(recommended:\x20now\x20+\x20at\x20least\x2086400000\x20ms\x20=\x2024\x20hours);\x20'+'0\x20=\x20deadline\x20already\x20passed\x20→\x20the\x20case\x20PERMANENTLY\x20DEADLOCKS\x20(kl-real-261016\x20F-01,\x20chain-verified):\x20every\x20vote\x20aborts\x20E_VOTING_DEADLINE_PASSED,\x20so\x20no\x20ballot\x20can\x20ever\x20exist,\x20the\x20verdict\x20then\x20aborts\x20E_NO_VOTE_CAST\x20(a\x20verdict\x20requires\x20>=\x201\x20cast\x20ballot),\x20and\x20reset\x20aborts\x20as\x20well.\x20NEVER\x20pass\x200.\x20Direct\x20verdict\x20=\x20null\x20+\x20cast\x20one\x20ballot\x20first,\x20then\x20deliver\x20the\x20verdict.\x20'+'COMMON\x20MISTAKE:\x20using\x20seconds\x20instead\x20of\x20milliseconds\x20(multiply\x20by\x201000).\x20'+'Example:\x20Date.now()\x20+\x20259200000\x20for\x203\x20days\x20from\x20now.')})['strict']();export const VotingDeadlineChangeSchema=z['object']({'arb':ARB_CASE_FIELD,'voting_deadline':z['union']([z['number'](),z['null']()])['describe']('New\x20voting\x20deadline\x20as\x20Unix\x20timestamp\x20in\x20MILLISECONDS\x20(ms).\x20SEMANTICS\x20OF\x20SPECIAL\x20VALUES:\x20'+'0\x20=\x20deadline\x20already\x20passed\x20→\x20the\x20case\x20PERMANENTLY\x20DEADLOCKS\x20(votes\x20abort\x20E_VOTING_DEADLINE_PASSED,\x20no\x20ballot\x20can\x20ever\x20exist,\x20verdict\x20aborts\x20E_NO_VOTE_CAST,\x20reset\x20aborts).\x20NEVER\x20pass\x200;\x20'+'null\x20=\x20open-ended\x20voting\x20with\x20no\x20deadline\x20(verdict\x20allowed\x20after\x20casting\x20at\x20least\x20one\x20ballot\x20—\x20use\x20this\x20for\x20the\x20immediate-verdict\x20flow:\x20cast\x20one\x20ballot,\x20then\x20deliver);\x20'+'a\x20future\x20timestamp\x20=\x20normal\x20voting\x20window\x20(recommended:\x20now\x20+\x20at\x20least\x2086400000\x20ms\x20=\x2024\x20hours).\x20'+'COMMON\x20MISTAKE:\x20using\x20seconds\x20instead\x20of\x20milliseconds\x20(multiply\x20by\x201000).\x20'+'Example:\x20Date.now()\x20+\x20259200000\x20for\x203\x20days\x20from\x20now.')})['strict']();export const VoteSchema=z['object']({'arb':ARB_CASE_FIELD,'votes':z['array'](z['number']()['int']()['min'](0x0)['max'](0xff))['describe']('Proposition\x20INDICES\x20(0-based,\x20u8)\x20the\x20voter\x20agrees\x20with\x20—\x20e.g.\x20[0]\x20votes\x20for\x20the\x20first\x20proposition.\x20'+'Re-voting\x20REPLACES\x20the\x20voter\x27s\x20previous\x20vote\x20(old\x20weight\x20removed,\x20new\x20applied).\x20'+'Out-of-range\x20index\x20aborts\x20with\x20E_PROPOSITION_NOT_FOUND.'),'voting_guard':NameOrAddressSchema['optional']()['describe']('Voting\x20Guard\x20for\x20WEIGHTED\x20voting.\x20DECISION\x20RULE\x20(contract-enforced):\x0a'+'(A)\x20Arbitration\x20HAS\x20a\x20non-empty\x20voting_guard\x20list\x20→\x20plain\x20vote\x20is\x20REJECTED\x20on-chain\x20with\x20E_VOTING_GUARD_USED\x20(abort\x202).\x20'+'You\x20MUST\x20provide\x20this\x20field\x20set\x20to\x20ONE\x20guard\x20from\x20the\x20Arbitration\x27s\x20voting_guard\x20list,\x20and\x20fill\x20its\x20submission:\x20'+'when\x20the\x20guard\x27s\x20vote_weight\x20is\x20{GuardIdentifier:\x20pos},\x20the\x20number\x20you\x20submit\x20at\x20that\x20table\x20position\x20IS\x20the\x20vote\x20weight;\x20'+'when\x20it\x20is\x20{FixedValue:\x20v},\x20no\x20submission\x20is\x20needed\x20(weight\x20is\x20fixed).\x20The\x20SDK\x20then\x20routes\x20the\x20call\x20through\x20the\x20Guard-weighted\x20vote\x20path\x20via\x20a\x20Passport.\x20'+'Omitting\x20this\x20field\x20on\x20such\x20an\x20Arbitration\x20now\x20fails\x20fast\x20pre-call\x20with\x20the\x20list\x20of\x20valid\x20guards.\x0a'+'(B)\x20Arbitration\x20has\x20NO\x20voting_guard\x20→\x20omit\x20this\x20field;\x20the\x20SDK\x20uses\x20plain\x20vote\x20(weight\x201,\x20permission-gated),\x20or\x20the\x20passport-gated\x20vote\x20path\x20when\x20other\x20guards\x20require\x20it.\x0a'+'BOTH\x20(B)\x20paths\x20still\x20assert\x20ARBITRATION_VOTE=358\x20on-chain\x20(the\x20SDK\x20now\x20pre-checks\x20358\x20and\x20fails\x20fast\x20with\x20\x27Missing\x20permissions\x20358\x27).\x20'+'An\x20empty\x20voting_guard\x20means\x20EQUAL\x20WEIGHT\x20(1\x20person\x201\x20vote),\x20NOT\x20permissionless\x20—\x20there\x20is\x20no\x20permission-free\x20vote\x20entry.\x20'+'For\x20genuinely\x20open\x20voting,\x20configure\x20a\x20public\x20voting_guard\x20(op=\x22set\x22)\x20and\x20vote\x20via\x20path\x20(A):\x20the\x20weighted\x20passport\x20path\x20authorizes\x20by\x20the\x20guard\x20and\x20does\x20NOT\x20require\x20358.\x0a'+'The\x20Guard\x20(when\x20provided)\x20MUST\x20be\x20in\x20the\x20Arbitration\x27s\x20voting_guard\x20list\x20—\x20an\x20unlisted\x20guard\x20aborts\x20with\x20E_VOTING_GUARD_NOT_FOUND.\x20'+'WEIGHTED\x20REVOTE\x20RESIDUE\x20(az3-mn-261013,\x20arb.move:315-320\x20source\x20comment):\x20under\x20weighted\x20voting\x20a\x20re-vote\x20is\x20NOT\x20clean\x20—\x20'+'re-voting\x20with\x20a\x20LARGER\x20weight\x20than\x20the\x20previous\x20one\x20aborts\x20on\x20underflow\x20(re-vote\x20DoS\x20surface);\x20'+'re-voting\x20with\x20a\x20SMALLER\x20weight\x20succeeds\x20but\x20leaves\x20phantom\x20votes\x20behind.\x20Treat\x20the\x20first\x20weighted\x20vote\x20as\x20final\x20when\x20possible.')})['strict']();export const FeedbackSchema=z['object']({'arb':ARB_CASE_FIELD,'feedback':DescriptionSchema['describe']('Arbitration\x20feedback.')})['strict']();export const ArbitrationActionSchema=z['object']({'arb':ARB_CASE_FIELD,'feedback':DescriptionSchema['describe']('Arbitration\x20feedback.'),'indemnity':z['number']()['int']()['min'](0x0)['describe']('Awarded\x20compensation\x20in\x20integer\x20smallest\x20units\x20(0\x20=\x20a\x20denial\x20ruling\x20that\x20pays\x20nothing).\x20'+'Hard-capped\x20at\x203x\x20the\x20disputed\x20order\x20amount\x20on\x20chain.\x20Funded\x20from\x20the\x20Service\x27s\x20merchant-prepaid\x20'+'compensation\x20fund\x20—\x20an\x20award\x20larger\x20than\x20the\x20fund\x20balance\x20aborts\x20the\x20later\x20payout\x20until\x20the\x20'+'merchant\x20tops\x20up.\x20A\x20non-zero\x20award\x20consumes\x20the\x20order\x27s\x20one-shot\x20compensation\x20latch:\x20refund\x20rails\x20'+'gated\x20on\x20\x27no\x20award\x20paid\x27\x20can\x20never\x20fire\x20afterwards,\x20so\x20pair\x20them\x20with\x20a\x20merchant-recovery\x20rail\x20at\x20build\x20time.')})['strict']();export const ResetSchema=z['object']({'arb':ARB_CASE_FIELD,'feedback':DescriptionSchema['describe']('Arbitration\x20feedback.')})['strict']();export const ArbWithdrawSchema=z['object']({'arb':ARB_CASE_FIELD})['strict']();export const FeesTransferToSchema=z['union']([z['object']({'allocation':NameOrAddressSchema['describe']('Allocation\x20object\x20ID\x20or\x20name.')})['strict'](),z['object']({'treasury':NameOrAddressSchema['describe']('Treasury\x20object\x20ID\x20or\x20name.\x20NOTE:\x20the\x20transferred\x20funds\x20arrive\x20as\x20a\x20CoinWrapper\x20owned\x20by\x20the\x20Treasury\x20and\x20only\x20count\x20'+'after\x20the\x20Treasury\x20intakes\x20them\x20—\x20call\x20treasury\x20receive:\x20\x22recently\x22\x20(requires\x20permission\x20253\x20TREASURY_RECEIVE\x20on\x20the\x20Treasury).')})['strict']()]);export const FeesTransferSchema=z['object']({'to':FeesTransferToSchema['describe']('Transfer\x20arbitration\x20fees\x20to\x20the\x20specified\x20Allocation\x20object\x20or\x20Treasury\x20object.'),'payment_remark':NameSchema['describe']('Payment\x20remark.'),'payment_index':z['number']()['int']()['min'](0x0)['describe']('0-based\x20index\x20of\x20the\x20fee\x20payment\x20inside\x20the\x20Arb\x20case\x27s\x20fees\x20table\x20(query\x20the\x20Arb\x20case\x20with\x20onchain_operations\x20type\x20\x27q\x27\x20/\x20onchain_table_data\x20to\x20list\x20its\x20fees\x20and\x20their\x20indices).\x20REQUIRED\x20—\x20without\x20it\x20the\x20transfer\x20cannot\x20name\x20which\x20fee\x20record\x20to\x20move.'),'newPayment':NamedObjectSchema['optional']()['describe']('Name\x20for\x20the\x20newly\x20created\x20payment\x20object.')})['strict']();export const VotingGuardActionSchema=z['discriminatedUnion']('op',[z['object']({'op':z['enum'](['add','set']),'guards':z['array'](VotingGuardSchema)})['strict'](),z['object']({'op':z['literal']('remove'),'guards':z['array'](NameOrAddressSchema)})['strict'](),z['object']({'op':z['literal']('clear')})['strict']()]);export const CallArbitration_DataSchema=z['object']({'object':TypedPermissionObjectSchema,'dispute':DisputeSchema['optional']()['describe']('Create\x20a\x20new\x20Arb\x20object\x20for\x20the\x20order;\x20the\x20case\x20lands\x20directly\x20in\x20state\x201\x20(Arbitrator_confirming)\x20—\x20the\x20customer\x20does\x20not\x20confirm\x20at\x20filing\x20time.\x20FILING\x20IS\x20SERVICE-BOUND:\x20the\x20SDK\x20resolves\x20the\x20order\x27s\x20Service\x20and\x20files\x20through\x20its\x20Service-side\x20dispute\x20entry\x20points,\x20which\x20enforce\x20the\x20merchant\x27s\x20arbitrator\x20allowlist,\x20the\x20service-arbitration\x20neutrality\x20rule\x20and\x20the\x20order\x20binding\x20before\x20the\x20case\x20is\x20minted\x20(venues\x20gated\x20by\x20a\x20usage_guard\x20require\x20the\x20passport\x20path,\x20verified\x20in\x20the\x20same\x20transaction).\x20The\x20arbitration-side\x20filing\x20entries\x20are\x20package-internal\x20and\x20cannot\x20be\x20called\x20directly'),'description':DescriptionSchema['optional']()['describe']('Introduction\x20of\x20the\x20Arbitration\x20object.'),'location':LongNameSchema['optional']()['describe']('Arbitration\x20location.'),'fee':BalanceTypeSchema['optional']()['describe']('Arbitration\x20filing\x20fee.\x20FORMAT:\x20a\x20direct\x20amount\x20value\x20—\x20NOT\x20wrapped\x20in\x20'+'{balance:\x20...}\x20(that\x20CoinParam\x20shape\x20is\x20only\x20for\x20dispute.fee,\x20which\x20pays\x20a\x20coin\x20object).\x20'+'Accepted:\x20smallest-unit\x20number\x20or\x20string\x20(e.g.\x2050000000\x20=\x200.05\x20WOW\x20at\x209\x20decimals),\x20or\x20'+'display\x20format\x20with\x20the\x20token\x20symbol\x20(e.g.\x20\x220.05WOW\x22)\x20—\x20the\x20Fund\x20Processing\x20Layer\x20'+'converts\x20it\x20using\x20the\x20Arbitration\x20object\x27s\x20own\x20token\x20decimals.\x20'+'Default\x200\x20on\x20creation:\x20disputes\x20are\x20then\x20free\x20(the\x20filer\x27s\x20coin\x20is\x20fully\x20refunded\x20on\x20'+'filing)\x20and\x20the\x20arbitrator\x20earns\x20no\x20per-case\x20fee.'),'pause':z['boolean']()['optional']()['describe']('Whether\x20to\x20pause\x20arbitration.'),'confirm':ConfirmSchema['optional']()['describe']('ARBITRATOR-side\x20material\x20confirmation\x20(from\x20state\x201):\x20moves\x20the\x20case\x20to\x20state\x202\x20(Voting).\x20'+'Customers\x20cannot\x20call\x20this\x20—\x20the\x20customer-side\x20step\x20is\x20order.arb_confirm\x20(state\x200\x20to\x201).'),'voting_deadline_change':VotingDeadlineChangeSchema['optional']()['describe']('Change\x20the\x20voting\x20deadline.'),'vote':VoteSchema['optional']()['describe']('Vote\x20on\x20user\x20propositions.'),'feedback':FeedbackSchema['optional']()['describe']('Arbitration\x20feedback\x20for\x20the\x20Arb\x20object.'),'arbitration':ArbitrationActionSchema['optional']()['describe']('Provide\x20a\x20definitive\x20arbitration\x20result.'),'reset':ResetSchema['optional']()['describe']('ARBITRATOR-side\x20reset\x20(arbitration\x20permission\x20holder;\x20valid\x20from\x20state\x204\x20Objectionable\x20or\x20state\x201):\x20voids\x20the\x20ruling,\x20'+'clears\x20the\x20indemnity\x20and\x20returns\x20the\x20case\x20to\x20state\x200\x20(Principal_confirming).\x20After\x20a\x20reset\x20ONLY\x20the\x20customer\x20can\x20advance\x20the\x20case\x20'+'again\x20via\x20order.arb_confirm\x20—\x20state\x200\x20has\x20no\x20timeout\x20and\x20the\x20fee\x20stays\x20locked\x20until\x20the\x20customer\x20re-confirms.'),'arb_withdraw':ArbWithdrawSchema['optional']()['describe']('Withdraw\x20arbitration\x20fees\x20from\x20the\x20Arb\x20object\x20(arbitrator).\x20Immediately\x20from\x20state\x205\x20(Finished);\x20from\x20state\x203\x20only\x20after\x2030\x20days\x20'+'from\x20the\x20ruling\x20time\x20(no\x20objection\x20filed\x20—\x20silence\x20=\x20acceptance);\x20rejected\x20in\x20states\x200/1/2.\x20'+'State\x204\x20(Objectionable)\x20can\x20NEVER\x20withdraw\x20(protocol\x20141):\x20a\x20contested\x20case\x20keeps\x20its\x20fee\x20escrowed\x20until\x20the\x20customer\x20'+'closes\x20the\x20objection\x20cycle\x20—\x20reset\x20→\x20order.arb_confirm\x20→\x20new\x20ruling\x20→\x20unchallenged\x20(or\x20accepted\x20via\x20finish).\x20'+'⚠️\x20TWO-STAGE\x20FEE\x20CASH-OUT\x20(verified\x20on\x20testnet):\x20this\x20call\x20does\x20NOT\x20pay\x20the\x20arbitrator\x27s\x20wallet\x20—\x20it\x20moves\x20the\x20case\x20fee\x20'+'into\x20the\x20Arbitration\x20(Registration)\x20object\x27s\x20own\x20balance\x20pool.\x20To\x20actually\x20receive\x20the\x20money:\x20'+'fees_transfer\x20(to\x20a\x20treasury\x20or\x20allocation)\x20→\x20treasury\x20receive:\x20\x22recently\x22\x20(permission\x20253)\x20→\x20treasury\x20withdraw\x20→\x20'+'recipient\x20payment\x20receive.\x20A\x20successful\x20arb_withdraw\x20with\x20no\x20wallet\x20balance\x20change\x20is\x20EXPECTED,\x20not\x20a\x20failure.'),'fees_transfer':FeesTransferSchema['optional']()['describe']('Distribute\x20the\x20withdrawn\x20arbitration\x20fees.\x20Moves\x20the\x20Arbitration\x27s\x20ENTIRE\x20balance\x20in\x20ONE\x20call\x20—\x20there\x20is\x20NO\x20amount\x20parameter.\x20'+'The\x20balance\x20leaves\x20as\x20a\x20CoinWrapper\x20owned\x20by\x20the\x20target\x20(allocation\x20or\x20treasury);\x20for\x20a\x20treasury\x20target,\x20intake\x20it\x20with\x20'+'treasury\x20receive:\x20\x22recently\x22\x20(permission\x20253)\x20—\x20see\x20the\x20\x27to\x27\x20field\x20description.'),'usage_guard':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Set\x20Guard\x20for\x20verification\x20when\x20users\x20apply\x20for\x20arbitration;\x20if\x20Guard\x20verification\x20fails,\x20users\x20will\x20not\x20be\x20able\x20to\x20apply\x20for\x20arbitration.'),'voting_guard':VotingGuardActionSchema['optional']()['describe']('Set\x20Guard\x20for\x20verification\x20during\x20arbitration\x20voting;\x20if\x20Guard\x20verification\x20fails,\x20arbitration\x20voting\x20will\x20fail.'),'owner_receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20and\x20other\x20objects\x20received\x20by\x20this\x20Arbitration\x20object\x20and\x20send\x20them\x20to\x20the\x20owner\x20of\x20its\x20Permission\x20object.'+RECEIVE_FORMAT_BLOCK_OBJECTS),'um':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Contact\x20object\x20ID\x20or\x20name.')})['strict']()['describe']('On-chain\x20Arbitration\x20operations.\x20TWO\x20OBJECT\x20KINDS\x20—\x20do\x20not\x20confuse\x20them\x20(§5.9):\x20the\x20ROOT\x20\x27object\x27\x20field\x20is\x20the\x20Arbitration\x20(arbitrator\x20REGISTRATION)\x20object;\x20the\x20Arb\x20(single\x20CASE)\x20created\x20by\x20\x27dispute\x27\x20is\x20addressed\x20via\x20each\x20case\x20operation\x27s\x20\x27arb\x27\x20field.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Set\x20\x27object\x27\x20field\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20permission,\x20...}\x20to\x20create\x20an\x20Arbitration.\x20NOTE:\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.\x20\x27permission\x27\x20can\x20be\x20a\x20new\x20Permission\x20object\x20or\x20reference\x20an\x20existing\x20one\x20-\x20check\x20\x27object\x27\x20field\x20description\x20for\x20details.\x20⚠️\x20PERMISSION\x20RULE\x20(contract-enforced):\x20the\x20Arbitration\x27s\x20permission\x20MUST\x20be\x20DIFFERENT\x20from\x20the\x20permission\x20of\x20any\x20Service\x20it\x20will\x20be\x20bound\x20to\x20—\x20binding\x20an\x20Arbitration\x20that\x20SHARES\x20the\x20Service\x27s\x20Permission\x20aborts\x20with\x20E_ARBITRATION_PERMISSION_CONFLICT\x20(error\x2033).\x20Always\x20create\x20a\x20DEDICATED\x20Permission\x20object\x20for\x20each\x20Arbitration.\x20(2)\x20OPERATE\x20EXISTING:\x20Set\x20\x27object\x27\x20field\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20STRING\x20for\x20existing,\x20OBJECT\x20for\x20new\x20creation.');export const CallArbitration_InputSchema=z['object']({'data':CallArbitration_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
1
|
+
import{z}from'zod';import{TypedPermissionObjectSchema,CoinParamSchema,NamedObjectSchema,CallEnvSchema,SubmissionCallSchema}from'./base.js';import{VotingGuardSchema}from'../query/index.js';import{BalanceTypeSchema,DescriptionSchema,LongNameSchema,NameOrAddressSchema,NameSchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS}from'../common/index.js';const ARB_CASE_FIELD=NameOrAddressSchema['describe']('Arb\x20CASE\x20object\x20—\x20the\x20single\x20dispute\x20case\x20created\x20by\x20`dispute`\x20(the\x20object\x20you\x20may\x20have\x20named\x20via\x20`namedArb`).\x20'+'NOT\x20the\x20arbitrator\x20registration\x20object:\x20that\x20one\x20goes\x20in\x20the\x20ROOT\x20`object`\x20field,\x20while\x20every\x20case-scoped\x20'+'operation\x20(confirm\x20/\x20voting_deadline_change\x20/\x20vote\x20/\x20feedback\x20/\x20arbitration\x20/\x20reset\x20/\x20arb_withdraw)\x20addresses\x20'+'the\x20case\x20through\x20THIS\x20field.\x20Accepts\x20the\x20Arb\x27s\x200x\x20address\x20or\x20its\x20LocalMark\x20name.');export const DisputeSchema=z['object']({'order':NameOrAddressSchema['describe']('Order\x20ID\x20or\x20name.'),'description':DescriptionSchema['describe']('Dispute\x20description.\x20REQUIRED\x20and\x20NON-EMPTY\x20on-chain\x20(the\x20dispute\x20call\x20aborts\x20when\x20it\x20is\x20empty;\x20max\x204000\x20bytes).\x20State\x20what\x20the\x20dispute\x20is\x20about\x20—\x20it\x20is\x20permanent\x20on-chain\x20case\x20context.'),'proposition':z['array'](LongNameSchema)['describe']('List\x20of\x20dispute\x20propositions.'),'fee':CoinParamSchema['describe']('Dispute\x20processing\x20fee.\x20FORMAT:\x20{balance:\x20<amount_in_smallest_unit>}\x20—\x20field\x20name\x20is\x20\x27balance\x27\x20(NOT\x20\x27amount\x27).\x20'+'The\x20token\x20type\x20and\x20precision\x20are\x20determined\x20by\x20the\x20Arbitration\x20object\x27s\x20type_parameter\x20(the\x20generic\x20type\x20set\x20when\x20the\x20Arbitration\x20was\x20created).\x20'+'For\x20WOW\x20(9\x20decimals):\x20{balance:\x2050000000}\x20=\x200.05\x20WOW.\x20'+'For\x20tokens\x20with\x20different\x20decimals,\x20adjust\x20accordingly\x20(e.g.\x20USDC\x20has\x206\x20decimals,\x20so\x20{balance:\x2050000}\x20=\x200.05\x20USDC).\x20'+'docs#45:\x20the\x20fee\x20does\x20NOT\x20return\x20to\x20the\x20filer\x20on\x20a\x20win\x20—\x20it\x20stays\x20in\x20the\x20Arbitration\x20object\x20and\x20is\x20withdrawable\x20by\x20the\x20arbitrator.'),'namedArb':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20newly\x20created\x20Arb\x20(arbitration\x20case)\x20object.\x20'+'Without\x20this,\x20the\x20Arb\x20is\x20only\x20referenceable\x20by\x20its\x20on-chain\x20address.\x20'+'Example:\x20{name:\x20\x27my_dispute_v1\x27}\x20allows\x20subsequent\x20vote/feedback\x20operations\x20to\x20use\x20\x27my_dispute_v1\x27.')})['strict']();export const ConfirmSchema=z['object']({'arb':ARB_CASE_FIELD,'voting_deadline':z['union']([z['number']()['int']()['min'](0x0),z['null']()])['default'](null)['describe']('Voting\x20deadline\x20as\x20Unix\x20timestamp\x20in\x20MILLISECONDS\x20(ms).\x20SEMANTICS\x20OF\x20SPECIAL\x20VALUES:\x20'+'null\x20(DEFAULT\x20when\x20omitted)\x20=\x20open-ended\x20voting,\x20no\x20deadline;\x20parties\x20may\x20vote\x20at\x20any\x20time\x20and\x20the\x20arbitrator\x20may\x20deliver\x20the\x20verdict\x20after\x20casting\x20at\x20least\x20one\x20ballot\x20(arb.move\x20skips\x20the\x20deadline\x20assert\x20when\x20the\x20Option\x20is\x20none)\x20—\x20this\x20is\x20the\x20SAFE\x20default;\x20'+'a\x20future\x20timestamp\x20=\x20normal\x20bounded\x20voting\x20window\x20(recommended:\x20now\x20+\x20at\x20least\x2086400000\x20ms\x20=\x2024\x20hours);\x20'+'0\x20=\x20deadline\x20already\x20passed\x20→\x20the\x20case\x20PERMANENTLY\x20DEADLOCKS\x20(kl-real-261016\x20F-01,\x20chain-verified):\x20every\x20vote\x20aborts\x20E_VOTING_DEADLINE_PASSED,\x20so\x20no\x20ballot\x20can\x20ever\x20exist,\x20the\x20verdict\x20then\x20aborts\x20E_NO_VOTE_CAST\x20(a\x20verdict\x20requires\x20>=\x201\x20cast\x20ballot),\x20and\x20reset\x20aborts\x20as\x20well.\x20NEVER\x20pass\x200.\x20Direct\x20verdict\x20=\x20null\x20+\x20cast\x20one\x20ballot\x20first,\x20then\x20deliver\x20the\x20verdict.\x20'+'COMMON\x20MISTAKE:\x20using\x20seconds\x20instead\x20of\x20milliseconds\x20(multiply\x20by\x201000).\x20'+'Example:\x20Date.now()\x20+\x20259200000\x20for\x203\x20days\x20from\x20now.')})['strict']();export const VotingDeadlineChangeSchema=z['object']({'arb':ARB_CASE_FIELD,'voting_deadline':z['union']([z['number'](),z['null']()])['describe']('New\x20voting\x20deadline\x20as\x20Unix\x20timestamp\x20in\x20MILLISECONDS\x20(ms).\x20SEMANTICS\x20OF\x20SPECIAL\x20VALUES:\x20'+'0\x20=\x20deadline\x20already\x20passed\x20→\x20the\x20case\x20PERMANENTLY\x20DEADLOCKS\x20(votes\x20abort\x20E_VOTING_DEADLINE_PASSED,\x20no\x20ballot\x20can\x20ever\x20exist,\x20verdict\x20aborts\x20E_NO_VOTE_CAST,\x20reset\x20aborts).\x20NEVER\x20pass\x200;\x20'+'null\x20=\x20open-ended\x20voting\x20with\x20no\x20deadline\x20(verdict\x20allowed\x20after\x20casting\x20at\x20least\x20one\x20ballot\x20—\x20use\x20this\x20for\x20the\x20immediate-verdict\x20flow:\x20cast\x20one\x20ballot,\x20then\x20deliver);\x20'+'a\x20future\x20timestamp\x20=\x20normal\x20voting\x20window\x20(recommended:\x20now\x20+\x20at\x20least\x2086400000\x20ms\x20=\x2024\x20hours).\x20'+'COMMON\x20MISTAKE:\x20using\x20seconds\x20instead\x20of\x20milliseconds\x20(multiply\x20by\x201000).\x20'+'Example:\x20Date.now()\x20+\x20259200000\x20for\x203\x20days\x20from\x20now.')})['strict']();export const VoteSchema=z['object']({'arb':ARB_CASE_FIELD,'votes':z['array'](z['number']()['int']()['min'](0x0)['max'](0xff))['describe']('Proposition\x20INDICES\x20(0-based,\x20u8)\x20the\x20voter\x20agrees\x20with\x20—\x20e.g.\x20[0]\x20votes\x20for\x20the\x20first\x20proposition.\x20'+'Re-voting\x20REPLACES\x20the\x20voter\x27s\x20previous\x20vote\x20(old\x20weight\x20removed,\x20new\x20applied).\x20'+'Out-of-range\x20index\x20aborts\x20with\x20E_PROPOSITION_NOT_FOUND.'),'voting_guard':NameOrAddressSchema['optional']()['describe']('Voting\x20Guard\x20for\x20WEIGHTED\x20voting.\x20DECISION\x20RULE\x20(contract-enforced):\x0a'+'(A)\x20Arbitration\x20HAS\x20a\x20non-empty\x20voting_guard\x20list\x20→\x20plain\x20vote\x20is\x20REJECTED\x20on-chain\x20with\x20E_VOTING_GUARD_USED\x20(abort\x202).\x20'+'You\x20MUST\x20provide\x20this\x20field\x20set\x20to\x20ONE\x20guard\x20from\x20the\x20Arbitration\x27s\x20voting_guard\x20list,\x20and\x20fill\x20its\x20submission:\x20'+'when\x20the\x20guard\x27s\x20vote_weight\x20is\x20{GuardIdentifier:\x20pos},\x20the\x20number\x20you\x20submit\x20at\x20that\x20table\x20position\x20IS\x20the\x20vote\x20weight;\x20'+'when\x20it\x20is\x20{FixedValue:\x20v},\x20no\x20submission\x20is\x20needed\x20(weight\x20is\x20fixed).\x20The\x20SDK\x20then\x20routes\x20the\x20call\x20through\x20the\x20Guard-weighted\x20vote\x20path\x20via\x20a\x20Passport.\x20'+'Omitting\x20this\x20field\x20on\x20such\x20an\x20Arbitration\x20now\x20fails\x20fast\x20pre-call\x20with\x20the\x20list\x20of\x20valid\x20guards.\x0a'+'(B)\x20Arbitration\x20has\x20NO\x20voting_guard\x20→\x20omit\x20this\x20field;\x20the\x20SDK\x20uses\x20plain\x20vote\x20(weight\x201,\x20permission-gated),\x20or\x20the\x20passport-gated\x20vote\x20path\x20when\x20other\x20guards\x20require\x20it.\x0a'+'BOTH\x20(B)\x20paths\x20still\x20assert\x20ARBITRATION_VOTE=358\x20on-chain\x20(the\x20SDK\x20now\x20pre-checks\x20358\x20and\x20fails\x20fast\x20with\x20\x27Missing\x20permissions\x20358\x27).\x20'+'An\x20empty\x20voting_guard\x20means\x20EQUAL\x20WEIGHT\x20(1\x20person\x201\x20vote),\x20NOT\x20permissionless\x20—\x20there\x20is\x20no\x20permission-free\x20vote\x20entry.\x20'+'For\x20genuinely\x20open\x20voting,\x20configure\x20a\x20public\x20voting_guard\x20(op=\x22set\x22)\x20and\x20vote\x20via\x20path\x20(A):\x20the\x20weighted\x20passport\x20path\x20authorizes\x20by\x20the\x20guard\x20and\x20does\x20NOT\x20require\x20358.\x0a'+'The\x20Guard\x20(when\x20provided)\x20MUST\x20be\x20in\x20the\x20Arbitration\x27s\x20voting_guard\x20list\x20—\x20an\x20unlisted\x20guard\x20aborts\x20with\x20E_VOTING_GUARD_NOT_FOUND.\x20'+'WEIGHTED\x20REVOTE\x20RESIDUE\x20(az3-mn-261013,\x20arb.move:315-320\x20source\x20comment):\x20under\x20weighted\x20voting\x20a\x20re-vote\x20is\x20NOT\x20clean\x20—\x20'+'re-voting\x20with\x20a\x20LARGER\x20weight\x20than\x20the\x20previous\x20one\x20aborts\x20on\x20underflow\x20(re-vote\x20DoS\x20surface);\x20'+'re-voting\x20with\x20a\x20SMALLER\x20weight\x20succeeds\x20but\x20leaves\x20phantom\x20votes\x20behind.\x20Treat\x20the\x20first\x20weighted\x20vote\x20as\x20final\x20when\x20possible.')})['strict']();export const FeedbackSchema=z['object']({'arb':ARB_CASE_FIELD,'feedback':DescriptionSchema['describe']('Arbitration\x20feedback.')})['strict']();export const ArbitrationActionSchema=z['object']({'arb':ARB_CASE_FIELD,'feedback':DescriptionSchema['describe']('Arbitration\x20feedback.'),'indemnity':z['number']()['int']()['min'](0x0)['describe']('Awarded\x20compensation\x20in\x20integer\x20smallest\x20units\x20(0\x20=\x20a\x20denial\x20ruling\x20that\x20pays\x20nothing).\x20'+'Hard-capped\x20at\x203x\x20the\x20disputed\x20order\x20amount\x20on\x20chain.\x20Funded\x20from\x20the\x20Service\x27s\x20merchant-prepaid\x20'+'compensation\x20fund\x20—\x20an\x20award\x20larger\x20than\x20the\x20fund\x20balance\x20aborts\x20the\x20later\x20payout\x20until\x20the\x20'+'merchant\x20tops\x20up.\x20A\x20non-zero\x20award\x20consumes\x20the\x20order\x27s\x20one-shot\x20compensation\x20latch:\x20refund\x20rails\x20'+'gated\x20on\x20\x27no\x20award\x20paid\x27\x20can\x20never\x20fire\x20afterwards,\x20so\x20pair\x20them\x20with\x20a\x20merchant-recovery\x20rail\x20at\x20build\x20time.')})['strict']();export const ResetSchema=z['object']({'arb':ARB_CASE_FIELD,'feedback':DescriptionSchema['describe']('Arbitration\x20feedback.')})['strict']();export const ArbWithdrawSchema=z['object']({'arb':ARB_CASE_FIELD})['strict']();export const FeesTransferToSchema=z['union']([z['object']({'allocation':NameOrAddressSchema['describe']('Allocation\x20object\x20ID\x20or\x20name.')})['strict'](),z['object']({'treasury':NameOrAddressSchema['describe']('Treasury\x20object\x20ID\x20or\x20name.\x20NOTE:\x20the\x20transferred\x20funds\x20arrive\x20as\x20a\x20CoinWrapper\x20owned\x20by\x20the\x20Treasury\x20and\x20only\x20count\x20'+'after\x20the\x20Treasury\x20intakes\x20them\x20—\x20call\x20treasury\x20receive:\x20\x22recently\x22\x20(requires\x20permission\x20253\x20TREASURY_RECEIVE\x20on\x20the\x20Treasury).')})['strict']()]);export const FeesTransferSchema=z['object']({'to':FeesTransferToSchema['describe']('Transfer\x20arbitration\x20fees\x20to\x20the\x20specified\x20Allocation\x20object\x20or\x20Treasury\x20object.'),'payment_remark':NameSchema['describe']('Payment\x20remark.'),'payment_index':z['number']()['int']()['min'](0x0)['describe']('0-based\x20index\x20of\x20the\x20fee\x20payment\x20inside\x20the\x20Arb\x20case\x27s\x20fees\x20table\x20(query\x20the\x20Arb\x20case\x20with\x20onchain_operations\x20type\x20\x27q\x27\x20/\x20onchain_table_data\x20to\x20list\x20its\x20fees\x20and\x20their\x20indices).\x20REQUIRED\x20—\x20without\x20it\x20the\x20transfer\x20cannot\x20name\x20which\x20fee\x20record\x20to\x20move.'),'newPayment':NamedObjectSchema['optional']()['describe']('Name\x20for\x20the\x20newly\x20created\x20payment\x20object.')})['strict']();export const VotingGuardActionSchema=z['discriminatedUnion']('op',[z['object']({'op':z['enum'](['add','set']),'guards':z['array'](VotingGuardSchema)})['strict'](),z['object']({'op':z['literal']('remove'),'guards':z['array'](NameOrAddressSchema)})['strict'](),z['object']({'op':z['literal']('clear')})['strict']()]);export const CallArbitration_DataSchema=z['object']({'object':TypedPermissionObjectSchema,'dispute':DisputeSchema['optional']()['describe']('Create\x20a\x20new\x20Arb\x20object\x20for\x20the\x20order;\x20the\x20case\x20lands\x20directly\x20in\x20state\x201\x20(Arbitrator_confirming)\x20—\x20the\x20customer\x20does\x20not\x20confirm\x20at\x20filing\x20time.\x20FILING\x20IS\x20SERVICE-BOUND:\x20the\x20SDK\x20resolves\x20the\x20order\x27s\x20Service\x20and\x20files\x20through\x20its\x20Service-side\x20dispute\x20entry\x20points,\x20which\x20enforce\x20the\x20merchant\x27s\x20arbitrator\x20allowlist,\x20the\x20service-arbitration\x20neutrality\x20rule\x20and\x20the\x20order\x20binding\x20before\x20the\x20case\x20is\x20minted\x20(venues\x20gated\x20by\x20a\x20usage_guard\x20require\x20the\x20passport\x20path,\x20verified\x20in\x20the\x20same\x20transaction).\x20The\x20arbitration-side\x20filing\x20entries\x20are\x20package-internal\x20and\x20cannot\x20be\x20called\x20directly'),'description':DescriptionSchema['optional']()['describe']('Introduction\x20of\x20the\x20Arbitration\x20object.'),'location':LongNameSchema['optional']()['describe']('Arbitration\x20location.'),'fee':BalanceTypeSchema['optional']()['describe']('Arbitration\x20filing\x20fee.\x20FORMAT:\x20a\x20direct\x20amount\x20value\x20—\x20NOT\x20wrapped\x20in\x20'+'{balance:\x20...}\x20(that\x20CoinParam\x20shape\x20is\x20only\x20for\x20dispute.fee,\x20which\x20pays\x20a\x20coin\x20object).\x20'+'Accepted:\x20smallest-unit\x20number\x20or\x20string\x20(e.g.\x2050000000\x20=\x200.05\x20WOW\x20at\x209\x20decimals),\x20or\x20'+'display\x20format\x20with\x20the\x20token\x20symbol\x20(e.g.\x20\x220.05WOW\x22)\x20—\x20the\x20Fund\x20Processing\x20Layer\x20'+'converts\x20it\x20using\x20the\x20Arbitration\x20object\x27s\x20own\x20token\x20decimals.\x20'+'Default\x200\x20on\x20creation:\x20disputes\x20are\x20then\x20free\x20(the\x20filer\x27s\x20coin\x20is\x20fully\x20refunded\x20on\x20'+'filing)\x20and\x20the\x20arbitrator\x20earns\x20no\x20per-case\x20fee.'),'pause':z['boolean']()['optional']()['describe']('Whether\x20to\x20pause\x20arbitration.'),'confirm':ConfirmSchema['optional']()['describe']('ARBITRATOR-side\x20material\x20confirmation\x20(from\x20state\x201):\x20moves\x20the\x20case\x20to\x20state\x202\x20(Voting).\x20'+'Customers\x20cannot\x20call\x20this\x20—\x20the\x20customer-side\x20step\x20is\x20order.arb_confirm\x20(state\x200\x20to\x201).'),'voting_deadline_change':VotingDeadlineChangeSchema['optional']()['describe']('Change\x20the\x20voting\x20deadline.'),'vote':VoteSchema['optional']()['describe']('Vote\x20on\x20user\x20propositions.'),'feedback':FeedbackSchema['optional']()['describe']('Arbitration\x20feedback\x20for\x20the\x20Arb\x20object.'),'arbitration':ArbitrationActionSchema['optional']()['describe']('Provide\x20a\x20definitive\x20arbitration\x20result.'),'reset':ResetSchema['optional']()['describe']('ARBITRATOR-side\x20reset\x20(arbitration\x20permission\x20holder;\x20valid\x20from\x20state\x204\x20Objectionable\x20or\x20state\x201):\x20voids\x20the\x20ruling,\x20'+'clears\x20the\x20indemnity\x20and\x20returns\x20the\x20case\x20to\x20state\x200\x20(Principal_confirming).\x20After\x20a\x20reset\x20ONLY\x20the\x20customer\x20can\x20advance\x20the\x20case\x20'+'again\x20via\x20order.arb_confirm\x20—\x20state\x200\x20has\x20no\x20timeout\x20and\x20the\x20fee\x20stays\x20locked\x20until\x20the\x20customer\x20re-confirms.'),'arb_withdraw':ArbWithdrawSchema['optional']()['describe']('Withdraw\x20arbitration\x20fees\x20from\x20the\x20Arb\x20object\x20(arbitrator).\x20Immediately\x20from\x20state\x205\x20(Finished);\x20from\x20state\x203\x20only\x20after\x2030\x20days\x20'+'from\x20the\x20ruling\x20time\x20(no\x20objection\x20filed\x20—\x20silence\x20=\x20acceptance);\x20rejected\x20in\x20states\x200/1/2.\x20'+'State\x204\x20(Objectionable)\x20can\x20NEVER\x20withdraw\x20(protocol\x20141):\x20a\x20contested\x20case\x20keeps\x20its\x20fee\x20escrowed\x20until\x20the\x20customer\x20'+'closes\x20the\x20objection\x20cycle\x20—\x20reset\x20→\x20order.arb_confirm\x20→\x20new\x20ruling\x20→\x20unchallenged\x20(or\x20accepted\x20via\x20finish).\x20'+'⚠️\x20TWO-STAGE\x20FEE\x20CASH-OUT\x20(verified\x20on\x20testnet):\x20this\x20call\x20does\x20NOT\x20pay\x20the\x20arbitrator\x27s\x20wallet\x20—\x20it\x20moves\x20the\x20case\x20fee\x20'+'into\x20the\x20Arbitration\x20(Registration)\x20object\x27s\x20own\x20balance\x20pool.\x20To\x20actually\x20receive\x20the\x20money:\x20'+'fees_transfer\x20(to\x20a\x20treasury\x20or\x20allocation)\x20→\x20treasury\x20receive:\x20\x22recently\x22\x20(permission\x20253)\x20→\x20treasury\x20withdraw\x20→\x20'+'recipient\x20payment\x20receive.\x20A\x20successful\x20arb_withdraw\x20with\x20no\x20wallet\x20balance\x20change\x20is\x20EXPECTED,\x20not\x20a\x20failure.'),'fees_transfer':FeesTransferSchema['optional']()['describe']('Distribute\x20the\x20withdrawn\x20arbitration\x20fees.\x20SHAPE\x20(exact\x20—\x20a\x20malformed\x20shape\x20aborts\x20on-chain\x20with\x20'+'CommandArgumentError\x20TypeMismatch,\x20observed\x20on\x20testnet):\x20\x27to\x27\x20is\x20a\x20SINGLE-KEY\x20object\x20with\x20EXACTLY\x20ONE\x20of\x20'+'{allocation:\x20\x27<Allocation\x20object\x20ID\x20or\x20registered\x20name>\x27}\x20or\x20{treasury:\x20\x27<Treasury\x20object\x20ID\x20or\x20registered\x20name>\x27}.\x20'+'The\x20value\x20must\x20reference\x20an\x20actual\x20Allocation\x20/\x20Treasury\x20OBJECT\x20(its\x20on-chain\x20address\x20or\x20LocalMark\x20name)\x20—\x20'+'a\x20plain\x20wallet\x20address,\x20the\x20Arb\x20case,\x20or\x20the\x20Arbitration\x20registration\x20object\x20is\x20NOT\x20a\x20valid\x20target.\x20'+'payment_index\x20is\x20REQUIRED\x20and\x20must\x20name\x20an\x20existing\x20fee\x20payment\x20record\x20in\x20the\x20Arb\x20case\x27s\x20fees\x20table\x20'+'(list\x20the\x20fees\x20and\x20their\x20indices\x20via\x20onchain_operations\x20type\x20\x27q\x27\x20/\x20onchain_table_data\x20on\x20the\x20Arb\x20case).\x20'+'Moves\x20the\x20Arbitration\x27s\x20ENTIRE\x20balance\x20pool\x20in\x20ONE\x20call\x20—\x20there\x20is\x20NO\x20amount\x20parameter;\x20the\x20pool\x20must\x20be\x20'+'funded\x20first\x20with\x20arb_withdraw.\x20The\x20balance\x20leaves\x20as\x20a\x20CoinWrapper\x20owned\x20by\x20the\x20target;\x20for\x20a\x20treasury\x20'+'target,\x20intake\x20it\x20with\x20treasury\x20receive:\x20\x22recently\x22\x20(permission\x20253)\x20—\x20see\x20the\x20\x27to\x27\x20field\x20description.'),'usage_guard':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Set\x20Guard\x20for\x20verification\x20when\x20users\x20apply\x20for\x20arbitration;\x20if\x20Guard\x20verification\x20fails,\x20users\x20will\x20not\x20be\x20able\x20to\x20apply\x20for\x20arbitration.'),'voting_guard':VotingGuardActionSchema['optional']()['describe']('Set\x20Guard\x20for\x20verification\x20during\x20arbitration\x20voting;\x20if\x20Guard\x20verification\x20fails,\x20arbitration\x20voting\x20will\x20fail.'),'owner_receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20and\x20other\x20objects\x20received\x20by\x20this\x20Arbitration\x20object\x20and\x20send\x20them\x20to\x20the\x20owner\x20of\x20its\x20Permission\x20object.'+RECEIVE_FORMAT_BLOCK_OBJECTS),'um':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Contact\x20object\x20ID\x20or\x20name.')})['strict']()['describe']('On-chain\x20Arbitration\x20operations.\x20TWO\x20OBJECT\x20KINDS\x20—\x20do\x20not\x20confuse\x20them\x20(§5.9):\x20the\x20ROOT\x20\x27object\x27\x20field\x20is\x20the\x20Arbitration\x20(arbitrator\x20REGISTRATION)\x20object;\x20the\x20Arb\x20(single\x20CASE)\x20created\x20by\x20\x27dispute\x27\x20is\x20addressed\x20via\x20each\x20case\x20operation\x27s\x20\x27arb\x27\x20field.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Set\x20\x27object\x27\x20field\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20permission,\x20...}\x20to\x20create\x20an\x20Arbitration.\x20NOTE:\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.\x20\x27permission\x27\x20can\x20be\x20a\x20new\x20Permission\x20object\x20or\x20reference\x20an\x20existing\x20one\x20-\x20check\x20\x27object\x27\x20field\x20description\x20for\x20details.\x20⚠️\x20PERMISSION\x20RULE\x20(contract-enforced):\x20the\x20Arbitration\x27s\x20permission\x20MUST\x20be\x20DIFFERENT\x20from\x20the\x20permission\x20of\x20any\x20Service\x20it\x20will\x20be\x20bound\x20to\x20—\x20binding\x20an\x20Arbitration\x20that\x20SHARES\x20the\x20Service\x27s\x20Permission\x20aborts\x20with\x20E_ARBITRATION_PERMISSION_CONFLICT\x20(error\x2033).\x20Always\x20create\x20a\x20DEDICATED\x20Permission\x20object\x20for\x20each\x20Arbitration.\x20(2)\x20OPERATE\x20EXISTING:\x20Set\x20\x27object\x27\x20field\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20STRING\x20for\x20existing,\x20OBJECT\x20for\x20new\x20creation.');export const CallArbitration_InputSchema=z['object']({'data':CallArbitration_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|