@wowok/agent-mcp 3.2.2 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chain-semantics/field-capability.d.ts +11 -0
- package/dist/chain-semantics/field-capability.js +1 -0
- package/dist/chain-semantics/freeze-map.d.ts +11 -0
- package/dist/chain-semantics/freeze-map.js +1 -0
- package/dist/chain-semantics/fund-flow.d.ts +10 -0
- package/dist/chain-semantics/fund-flow.js +1 -0
- package/dist/chain-semantics/guard-verbs.d.ts +22 -0
- package/dist/chain-semantics/guard-verbs.js +1 -0
- package/dist/chain-semantics/index.d.ts +10 -0
- package/dist/chain-semantics/index.js +1 -0
- package/dist/chain-semantics/object-graph.d.ts +18 -0
- package/dist/chain-semantics/object-graph.js +1 -0
- package/dist/communication/proof-reuse.d.ts +9 -0
- package/dist/communication/proof-reuse.js +1 -0
- package/dist/composition/audit.d.ts +10 -0
- package/dist/composition/audit.js +1 -0
- package/dist/composition/compile.d.ts +38 -0
- package/dist/composition/compile.js +1 -0
- package/dist/composition/materialize.d.ts +64 -0
- package/dist/composition/materialize.js +1 -0
- package/dist/composition/plan.d.ts +92 -0
- package/dist/composition/plan.js +1 -0
- package/dist/composition/reflux.d.ts +28 -0
- package/dist/composition/reflux.js +1 -0
- package/dist/evaluation/builtins/graph-service.spec.js +1 -1
- package/dist/evaluation/engine.js +1 -1
- package/dist/experience/realtime-feedback.js +1 -1
- package/dist/extensions/business-modules.js +1 -1
- package/dist/extensions/industry-pack.js +1 -1
- package/dist/extensions/modes.js +1 -1
- package/dist/graph/onchain/expand.js +1 -1
- package/dist/graph/onchain/exposure.js +1 -1
- package/dist/graph/onchain/facts.js +1 -1
- package/dist/harness/recover.js +1 -1
- package/dist/keeper/detectors.d.ts +7 -0
- package/dist/keeper/detectors.js +1 -1
- package/dist/keeper/types.d.ts +1 -1
- package/dist/keeper/types.js +1 -1
- package/dist/knowledge/allocation-ledger.js +1 -1
- package/dist/knowledge/allocation-puzzle.js +1 -1
- package/dist/knowledge/allocation-risk.js +1 -1
- package/dist/knowledge/allocation-templates.js +1 -1
- package/dist/knowledge/arb-fund-facts.d.ts +31 -0
- package/dist/knowledge/arb-fund-facts.js +1 -0
- package/dist/knowledge/baselines/rules/allocation.json +44 -15
- package/dist/knowledge/baselines/rules/guard.json +27 -8
- package/dist/knowledge/baselines/rules/plan.json +161 -0
- package/dist/knowledge/baselines/semantic-facts.d.ts +12 -0
- package/dist/knowledge/baselines/semantic-facts.js +1 -0
- package/dist/knowledge/builtin-templates.d.ts +1 -1
- package/dist/knowledge/builtin-templates.js +1 -1
- package/dist/knowledge/getting-started.js +1 -1
- package/dist/knowledge/guard-bindings.js +1 -1
- package/dist/knowledge/guard-design-patterns.d.ts +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-ledger.js +1 -1
- package/dist/knowledge/guard-risk.js +1 -1
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/machine-ledger.js +1 -1
- package/dist/knowledge/machine-templates.js +1 -1
- package/dist/knowledge/onchain-constants.d.ts +2 -2
- package/dist/knowledge/onchain-constants.js +1 -1
- package/dist/knowledge/progress-ledger.js +1 -1
- package/dist/knowledge/scenario-modes.d.ts +13 -0
- package/dist/knowledge/service-allocation-semantics.js +1 -1
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/service-templates.js +1 -1
- package/dist/knowledge/strategy-manuals.js +1 -1
- package/dist/knowledge/template-loader.d.ts +17 -1
- package/dist/knowledge/template-loader.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/participation/radar-core.d.ts +6 -0
- package/dist/participation/radar-core.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.js +1 -1
- package/dist/playbooks/service-build/migration-planner.js +1 -1
- package/dist/playbooks/service-build/object-panorama.js +1 -1
- package/dist/playbooks/service-build/participation-radar.js +1 -1
- package/dist/playbooks/service-build/relationship-profile.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.d.ts +1 -0
- package/dist/playbooks/service-build/service-quote.spec.js +1 -0
- package/dist/review/index.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +4 -0
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +1 -0
- package/dist/schema/call/error-codes.d.ts +1 -1
- package/dist/schema/call/error-codes.js +1 -1
- package/dist/schema/call/machine.js +1 -1
- package/dist/schema/call/order.d.ts +60 -0
- package/dist/schema/call/order.js +1 -1
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +56 -0
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +1 -1
- package/dist/schema/industry-pack/index.d.ts +2 -0
- package/dist/schema/industry-pack/index.js +1 -1
- package/dist/schema/interaction/index.d.ts +1 -1
- package/dist/schema/local/index.d.ts +10 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/operations.d.ts +48 -0
- package/dist/schema/query/bi.d.ts +26 -0
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/service-clone/index.d.ts +46 -0
- package/dist/schema/service-clone/index.js +1 -0
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +1 -0
- package/dist/schemas/bridge_operation.output.json +1 -0
- package/dist/schemas/index.json +7 -1
- package/dist/schemas/industry_pack_operation.output.json +4 -0
- package/dist/schemas/industry_pack_operation.schema.json +4 -0
- package/dist/schemas/local_cache_operation.output.json +1 -0
- package/dist/schemas/local_history_operation.output.json +1 -0
- package/dist/schemas/local_info_operation.output.json +1 -0
- package/dist/schemas/local_mark_operation.output.json +1 -0
- package/dist/schemas/onchain_operations.output.json +2 -1
- package/dist/schemas/onchain_operations.schema.json +408 -97
- package/dist/schemas/onchain_operations_allocation.schema.json +5 -5
- package/dist/schemas/onchain_operations_arbitration.schema.json +3 -3
- package/dist/schemas/onchain_operations_contact.schema.json +1 -1
- package/dist/schemas/onchain_operations_demand.schema.json +3 -3
- package/dist/schemas/onchain_operations_gen_passport.schema.json +1 -1
- package/dist/schemas/onchain_operations_guard.schema.json +59 -59
- package/dist/schemas/onchain_operations_machine.schema.json +2 -2
- package/dist/schemas/onchain_operations_order.schema.json +133 -1
- package/dist/schemas/onchain_operations_progress.schema.json +1 -1
- package/dist/schemas/onchain_operations_proof.schema.json +1 -1
- package/dist/schemas/onchain_operations_repository.schema.json +1 -1
- package/dist/schemas/onchain_operations_reward.schema.json +4 -4
- package/dist/schemas/onchain_operations_service.schema.json +187 -8
- package/dist/schemas/onchain_operations_treasury.schema.json +7 -7
- package/dist/schemas/query_toolkit.output.json +136 -52
- package/dist/schemas/service_clone_operation.output.json +168 -0
- package/dist/schemas/service_clone_operation.schema.json +49 -0
- package/dist/schemas/workflow_operation.schema.json +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/industry-pack.js +1 -1
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/handlers/service-clone.d.ts +2 -0
- package/dist/tools/handlers/service-clone.js +1 -0
- package/dist/tools/index.js +1 -1
- package/dist/tools/move-fn-index.gen.js +1 -1
- package/dist/tools/registry/business.js +1 -1
- package/dist/tools/wrap.d.ts +6 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +2 -2
|
@@ -320,6 +320,34 @@ export declare const CallService_DataSchema: z.ZodObject<{
|
|
|
320
320
|
max: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodNull]>>;
|
|
321
321
|
}, z.core.$strip>>;
|
|
322
322
|
}, z.core.$strip>, z.ZodNull]>>;
|
|
323
|
+
order_allocators_append: z.ZodOptional<z.ZodObject<{
|
|
324
|
+
description: z.ZodString;
|
|
325
|
+
threshold: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
326
|
+
allocators: z.ZodArray<z.ZodObject<{
|
|
327
|
+
guard: z.ZodString;
|
|
328
|
+
sharing: z.ZodArray<z.ZodObject<{
|
|
329
|
+
who: z.ZodUnion<readonly [z.ZodObject<{
|
|
330
|
+
GuardIdentifier: z.ZodNumber;
|
|
331
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
332
|
+
Entity: z.ZodObject<{
|
|
333
|
+
name_or_address: z.ZodOptional<z.ZodString>;
|
|
334
|
+
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
335
|
+
}, z.core.$strict>;
|
|
336
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
337
|
+
Signer: z.ZodLiteral<"signer">;
|
|
338
|
+
}, z.core.$strip>]>;
|
|
339
|
+
sharing: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
340
|
+
mode: z.ZodUnion<readonly [z.ZodEnum<{
|
|
341
|
+
Surplus: "Surplus";
|
|
342
|
+
Rate: "Rate";
|
|
343
|
+
RateGross: "RateGross";
|
|
344
|
+
Amount: "Amount";
|
|
345
|
+
}>, z.ZodPipe<z.ZodNumber, z.ZodTransform<"Surplus" | "Rate" | "RateGross" | "Amount", number>>]>;
|
|
346
|
+
}, z.core.$strip>>;
|
|
347
|
+
fix: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
348
|
+
max: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodNull]>>;
|
|
349
|
+
}, z.core.$strip>>;
|
|
350
|
+
}, z.core.$strip>>;
|
|
323
351
|
buy_guard: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
324
352
|
compensation_fund_add: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
325
353
|
balance: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
@@ -567,6 +595,34 @@ export declare const CallService_InputSchema: z.ZodObject<{
|
|
|
567
595
|
max: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodNull]>>;
|
|
568
596
|
}, z.core.$strip>>;
|
|
569
597
|
}, z.core.$strip>, z.ZodNull]>>;
|
|
598
|
+
order_allocators_append: z.ZodOptional<z.ZodObject<{
|
|
599
|
+
description: z.ZodString;
|
|
600
|
+
threshold: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
601
|
+
allocators: z.ZodArray<z.ZodObject<{
|
|
602
|
+
guard: z.ZodString;
|
|
603
|
+
sharing: z.ZodArray<z.ZodObject<{
|
|
604
|
+
who: z.ZodUnion<readonly [z.ZodObject<{
|
|
605
|
+
GuardIdentifier: z.ZodNumber;
|
|
606
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
607
|
+
Entity: z.ZodObject<{
|
|
608
|
+
name_or_address: z.ZodOptional<z.ZodString>;
|
|
609
|
+
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
610
|
+
}, z.core.$strict>;
|
|
611
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
612
|
+
Signer: z.ZodLiteral<"signer">;
|
|
613
|
+
}, z.core.$strip>]>;
|
|
614
|
+
sharing: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
615
|
+
mode: z.ZodUnion<readonly [z.ZodEnum<{
|
|
616
|
+
Surplus: "Surplus";
|
|
617
|
+
Rate: "Rate";
|
|
618
|
+
RateGross: "RateGross";
|
|
619
|
+
Amount: "Amount";
|
|
620
|
+
}>, z.ZodPipe<z.ZodNumber, z.ZodTransform<"Surplus" | "Rate" | "RateGross" | "Amount", number>>]>;
|
|
621
|
+
}, z.core.$strip>>;
|
|
622
|
+
fix: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
623
|
+
max: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodNull]>>;
|
|
624
|
+
}, z.core.$strip>>;
|
|
625
|
+
}, z.core.$strip>>;
|
|
570
626
|
buy_guard: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
571
627
|
compensation_fund_add: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
572
628
|
balance: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{TypedPermissionObjectSchema,CoinParamSchema,NamedObjectSchema,ObjectsSchema,CallEnvSchema,SubmissionCallSchema}from'./base.js';import{AllocatorsSchema,DiscountTypeSchema,ServiceSaleSchema,PaymentInfoSchema}from'../query/index.js';import{AccountOrMark_AddressSchema,DescriptionSchema,LongNameSchema,ManyAccountOrMark_AddressSchema,NameOrAddressSchema,NotEmptyNameSchema,ReceivedBalanceOrRecentlySchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS,RECEIVE_FORMAT_BLOCK_BALANCE}from'../common/index.js';import{BalanceTypeSchema}from'../common/index.js';export const ServiceBuyItemSchema=z['preprocess'](a=>{if(a&&typeof a==='object'&&'stock'in a&&!('quantity'in a)){const {stock:b,...c}=a;return{...c,'quantity':b};}return a;},z['object']({'name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20or\x20service\x20to\x20purchase'),'quantity':BalanceTypeSchema['describe']('⚠️\x20PURCHASE\x20QUANTITY,\x20NOT\x20inventory.\x20This\x20is\x20the\x20number\x20of\x20units\x20you\x20are\x20'+'buying;\x20the\x20on-chain\x20order\x20total\x20=\x20sale.price\x20x\x20this\x20value.\x20Do\x20NOT\x20put\x20the\x20'+'product\x27s\x20available\x20stock\x20here\x20—\x20inventory\x20is\x20the\x20separate\x20`stock`\x20field\x20on\x20'+'the\x20Service\x27s\x20sales\x20list.\x20To\x20buy\x20one\x20unit,\x20set\x20quantity:\x201.\x20'+'(Legacy\x20callers\x20may\x20still\x20send\x20this\x20as\x20`stock`;\x20it\x20is\x20accepted\x20and\x20treated\x20'+'identically\x20as\x20the\x20purchase\x20quantity.)'),'wip_hash':z['string']()['default']('')['describe']('WIP\x20file\x20hash\x20of\x20the\x20item.\x20OMIT\x20this\x20field\x20(or\x20pass\x20empty\x20string\x20\x22\x22)\x20to\x20AUTO-FILL\x20it\x20from\x20the\x20'+'bound\x20Service\x20sale\x27s\x20wip_hash\x20—\x20the\x20on-chain\x20quote\x20then\x20verifies\x20the\x20WIP\x20file\x20matches\x20that\x20hash\x20'+'(E_WIP_HASH_NOT_MATCH\x20on\x20mismatch),\x20so\x20buyers\x20do\x20NOT\x20need\x20to\x20copy\x20any\x20hash\x20value.\x20Only\x20pass\x20an\x20'+'explicit\x20hash\x20when\x20pinning\x20a\x20value\x20seen\x20earlier:\x20that\x20protects\x20against\x20a\x20legitimate\x20merchant\x20WIP\x20'+'update\x20between\x20viewing\x20the\x20product\x20and\x20placing\x20the\x20order.')})['strict']());export const BuySchema=z['object']({'items':z['array'](ServiceBuyItemSchema)['describe']('List\x20of\x20products\x20or\x20services\x20to\x20purchase'),'total_pay':CoinParamSchema['describe']('Actual\x20payment\x20amount.\x20FORMAT:\x20{balance:\x20<amount_in_smallest_unit>}\x20or\x20{coin:\x20<coin_object_id>}.\x20'+'The\x20token\x20type\x20and\x20precision\x20are\x20determined\x20by\x20the\x20Service\x20object\x27s\x20type_parameter\x20(the\x20generic\x20type\x20set\x20when\x20the\x20Service\x20was\x20created).\x20'+'For\x20WOW\x20(9\x20decimals):\x20{balance:\x201000000000}\x20=\x201\x20WOW.\x20'),'discount':z['string']()['optional']()['describe']('Discount\x20object\x20ID\x20or\x20name'),'payment_remark':z['string']()['optional']()['describe']('Payment\x20remark'),'payment_index':z['number']()['optional']()['describe']('Payment\x20index')})['strict']();export const DiscountSchema=z['object']({'name':z['string']()['describe']('Discount\x20name'),'discount_type':DiscountTypeSchema,'discount_value':BalanceTypeSchema['describe']('Discount\x20magnitude,\x20meaning\x20depends\x20on\x20discount_type.\x20'+'RATES\x20(0):\x20per-10000\x20off\x20rate\x20—\x2010\x20=\x200.1%\x20off,\x201000\x20=\x2010%\x20off,\x2010000\x20=\x20100%\x20off;\x20values\x20above\x2010000\x20are\x20rejected.\x20'+'FIXED\x20(1):\x20fixed\x20deduction\x20from\x20the\x20order\x20total\x20in\x20the\x20Service\x20token\x27s\x20smallest\x20units\x20(e.g.\x201000000000\x20=\x201\x20WOW\x20at\x209\x20decimals).'),'benchmark':z['union']([z['number'](),z['string']()])['optional']()['describe']('Minimum\x20order\x20total\x20(in\x20the\x20Service\x20token\x27s\x20smallest\x20units)\x20for\x20the\x20discount\x20to\x20apply\x20—\x20'+'when\x20set,\x20the\x20discount\x20is\x20applied\x20only\x20if\x20the\x20PRE-discount\x20order\x20total\x20is\x20GREATER\x20THAN\x20OR\x20EQUAL\x20TO\x20this\x20value.\x20'+'✅\x20OMITTING\x20this\x20field\x20(or\x20passing\x20null,\x20or\x200)\x20means\x20NO\x20threshold\x20—\x20the\x20discount\x20applies\x20UNCONDITIONALLY,\x20and\x20that\x20is\x20the\x20common,\x20correct\x20case.\x20'+'This\x20is\x20the\x20on-chain\x20behaviour:\x20benchmark_met\x20=\x20if\x20(option::is_some(&discount.benchmark))\x20'+'{\x20total\x20>=\x20benchmark\x20}\x20else\x20{\x20true\x20}\x20(wow-framework\x20sources/w/service.move:274-278,\x20inside\x20the\x20discount-application\x20step).\x20'+'⚠️\x20SHARP\x20EDGE\x20when\x20you\x20DO\x20set\x20a\x20threshold:\x20a\x20below-threshold\x20order\x20is\x20NOT\x20rejected\x20—\x20it\x20completes\x20at\x20FULL\x20price\x20'+'and\x20the\x20one-time\x20coupon\x20is\x20still\x20consumed\x20and\x20destroyed,\x20so\x20the\x20buyer\x20pays\x20full\x20price\x20AND\x20loses\x20the\x20coupon.\x20'+'Keep\x20thresholds\x20low\x20enough\x20that\x20your\x20typical\x20basket\x20clears\x20them.\x20'+'If\x20the\x20order\x20total\x20is\x20below\x20the\x20discounted\x20price\x20the\x20payment\x20aborts\x20—\x20pay\x20the\x20list\x20price;\x20the\x20excess\x20is\x20returned\x20as\x20a\x20new\x20Coin.'),'time_ms_start':z['number']()['optional']()['describe']('Discount\x20start\x20time\x20(milliseconds)'),'time_ms_end':z['number']()['describe']('Discount\x20end\x20time\x20(milliseconds)'),'count':z['number']()['describe']('Number\x20of\x20SEPARATE\x20Discount\x20(coupon)\x20objects\x20minted\x20—\x20total\x20delivered\x20=\x20count\x20×\x20number\x20of\x20recipients.\x20'+'Each\x20coupon\x20object\x20is\x20SINGLE-USE\x20(consumed\x20on\x20first\x20use).\x20This\x20is\x20NOT\x20a\x20per-coupon\x20reuse\x20count:\x20'+'count:2\x20creates\x202\x20independent\x20one-time\x20coupons,\x20not\x201\x20coupon\x20usable\x20twice.'),'recipient':ManyAccountOrMark_AddressSchema['describe']('Discount\x20recipient'),'transferable':z['boolean']()['describe']('Whether\x20the\x20discount\x20object\x20recipient\x20can\x20transfer\x20the\x20discount\x20object')})['strict']();export const OrderNewSchema=z['object']({'buy':BuySchema,'agents':ManyAccountOrMark_AddressSchema['optional']()['describe']('Order\x20agents.\x20Agents\x20can\x20operate\x20the\x20order,\x20such\x20as\x20canceling\x20the\x20order,\x20modifying\x20the\x20order\x20status,\x20etc.;\x20but\x20cannot\x20receive\x20the\x20funds\x20received\x20by\x20the\x20order.'),'order_required_info':z['string']()['optional']()['describe']('Contact\x20object\x20ID\x20or\x20WTS\x20Proof\x20object,\x20recorded\x20on\x20the\x20Order\x20as\x20proof\x20that\x20the\x20order\x20holder\x20'+'delivered\x20the\x20required\x20private\x20information\x20(service.customer_required)\x20to\x20the\x20merchant.\x20'+'FLOW:\x20when\x20a\x20Service\x20declares\x20customer_required\x20(e.g.\x20phone/email/shipping_address),\x20the\x20order\x20holder\x20'+'MUST\x20send\x20that\x20private\x20information\x20to\x20the\x20Service\x27s\x20Contact\x20(um)\x20via\x20end-to-end\x20encrypted\x20Messenger,\x20'+'then\x20pass\x20the\x20Contact\x20object\x20ID\x20or\x20the\x20generated\x20WTS\x20Proof\x20here\x20so\x20the\x20delivery\x20is\x20verifiable\x20on-chain.'),'transfer':AccountOrMark_AddressSchema['optional']()['describe']('Set\x20the\x20new\x20owner\x20of\x20the\x20order.\x20Requires\x20order\x20owner\x20permission\x20to\x20set.'),'namedNewOrder':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20newly\x20created\x20Order\x20object.\x20'+'Without\x20this,\x20the\x20Order\x20is\x20only\x20referenceable\x20by\x20its\x20on-chain\x20address.\x20'+'Example:\x20{name:\x20\x27my_order_v1\x27}\x20allows\x20subsequent\x20operations\x20to\x20use\x20\x27my_order_v1\x27\x20instead\x20of\x20the\x20address.\x20'+'PLACEMENT:\x20this\x20field\x20MUST\x20be\x20inside\x20data.order_new\x20(it\x20is\x20an\x20OrderNew\x20field)\x20—\x20putting\x20namedNewOrder\x20at\x20'+'the\x20data\x20root\x20fails\x20schema\x20validation\x20with\x20\x27Unrecognized\x20key\x27.\x20'+'MIGRATION\x20TIP:\x20for\x20batch/migration\x20order\x20creation,\x20always\x20auto-generate\x20readable\x20names\x20'+'(e.g.\x20\x27<source>_<service>_<seq>\x27\x20like\x20\x27my_shop_svc_v1_0001\x27)\x20—\x20unnamed\x20orders\x20(head.name\x20=\x20null)\x20are\x20'+'only\x20address-referenceable,\x20which\x20breaks\x20downstream\x20queries,\x20displays\x20and\x20audits\x20(E-8).'),'namedNewAllocation':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20order\x27s\x20Allocation\x20object.\x20'+'Without\x20this,\x20the\x20Allocation\x20is\x20only\x20referenceable\x20by\x20its\x20address.\x20'+'Example:\x20{name:\x20\x27my_allocation_v1\x27}\x20allows\x20alloc_by_guard\x20to\x20reference\x20\x27my_allocation_v1\x27.'),'namedNewProgress':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20order\x27s\x20Progress\x20object.\x20'+'Without\x20this,\x20the\x20Progress\x20is\x20only\x20referenceable\x20by\x20its\x20address.\x20'+'Example:\x20{name:\x20\x27my_progress_v1\x27}\x20allows\x20progress\x20operations\x20to\x20use\x20\x27my_progress_v1\x27.')})['strict']();export const SalesSchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('add'),'sales':z['array'](ServiceSaleSchema)})['strict']()['describe']('Add\x20new\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('set'),'sales':z['array'](ServiceSaleSchema)})['strict']()['describe']('Replaces\x20the\x20ENTIRE\x20sales\x20list:\x20every\x20product\x20NOT\x20included\x20is\x20REMOVED\x20from\x20the\x20Service\x20'+'(its\x20stock\x20and\x20wip\x20binding\x20go\x20with\x20it).\x20To\x20change\x20ONE\x20product,\x20prefer\x20the\x20per-item\x20ops\x20'+'(price_add\x20/\x20price_reduce\x20/\x20stock_add\x20/\x20stock_reduce\x20/\x20sale_suspension)\x20over\x20re-sending\x20'+'the\x20full\x20list;\x20with\x20op:set\x20you\x20MUST\x20resend\x20ALL\x20unchanged\x20products\x20too.\x20'+'Removal\x20is\x20immediate\x20and\x20cannot\x20be\x20undone.'),z['object']({'op':z['literal']('remove'),'sales_name':z['array'](LongNameSchema['describe']('Sales\x20name'))})['strict']()['describe']('Remove\x20existing\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('clear')})['strict']()['describe']('Clear\x20all\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('price_add'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Price\x20INCREASE\x20delta\x20in\x20the\x20Service\x20token\x27s\x20smallest\x20units\x20(e.g.\x20100000000\x20=\x20+0.1\x20WOW).\x20'+'Added\x20to\x20the\x20current\x20price\x20(on-chain\x20saturating\x20add).\x20NOT\x20the\x20new\x20absolute\x20price.')})['strict']()['describe']('Raise\x20one\x20product\x27s\x20price\x20by\x20a\x20delta.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20is\x20silently\x20ignored\x20on-chain\x20(verify\x20with\x20query_toolkit\x20afterwards).'),z['object']({'op':z['literal']('price_reduce'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Price\x20DECREASE\x20delta\x20in\x20the\x20Service\x20token\x27s\x20smallest\x20units\x20(e.g.\x20100000000\x20=\x20-0.1\x20WOW).\x20'+'If\x20the\x20delta\x20exceeds\x20the\x20current\x20price,\x20the\x20price\x20clamps\x20to\x200.\x20NOT\x20the\x20new\x20absolute\x20price.')})['strict']()['describe']('Lower\x20one\x20product\x27s\x20price\x20by\x20a\x20delta.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20is\x20silently\x20ignored\x20on-chain\x20(verify\x20with\x20query_toolkit\x20afterwards).'),z['object']({'op':z['literal']('stock_add'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Stock\x20INCREASE\x20delta\x20(a\x20unit\x20COUNT,\x20not\x20money),\x20e.g.\x2050\x20=\x20+50\x20units.')})['strict']()['describe']('Restock\x20one\x20product\x20by\x20a\x20delta.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20is\x20silently\x20ignored\x20on-chain\x20(verify\x20with\x20query_toolkit\x20afterwards).'),z['object']({'op':z['literal']('stock_reduce'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Stock\x20DECREASE\x20delta\x20(a\x20unit\x20COUNT,\x20not\x20money),\x20e.g.\x2010\x20=\x20-10\x20units.\x20'+'If\x20the\x20delta\x20exceeds\x20current\x20stock,\x20the\x20stock\x20clamps\x20to\x200\x20(product\x20becomes\x20unsellable).')})['strict']()['describe']('Reduce\x20one\x20product\x27s\x20stock\x20by\x20a\x20delta\x20(e.g.\x20write-off\x20damaged\x20units).\x20'+'Only\x20the\x20named\x20product\x20is\x20touched;\x20an\x20unknown\x20sale_name\x20is\x20silently\x20ignored\x20on-chain.'),z['object']({'op':z['literal']('sale_suspension'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20suspend\x20or\x20resume'),'suspension':z['boolean']()['describe']('true\x20=\x20suspend\x20the\x20product\x20(buy/quote\x20abort\x20with\x20E_SALE_SUSPENDED);\x20false\x20=\x20resume\x20selling.')})['strict']()['describe']('Suspend\x20or\x20resume\x20ONE\x20product\x20without\x20removing\x20it\x20(keeps\x20price/stock/WIP\x20binding).\x20'+'The\x20retail-style\x20\x27out\x20of\x20stock\x20/\x20listing\x20inactive\x27\x20state.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20is\x20silently\x20ignored\x20on-chain\x20(verify\x20with\x20query_toolkit\x20afterwards).')]);export const CallService_DataSchema=z['object']({'object':TypedPermissionObjectSchema,'order_new':OrderNewSchema['optional']()['describe']('Create\x20new\x20order.'),'description':DescriptionSchema['optional'](),'location':LongNameSchema['optional']()['describe']('The\x20service\x20area\x20and\x20scope\x20as\x20stated\x20by\x20the\x20merchant.\x20'+'IMPORTANT:\x20If\x20the\x20service\x20has\x20a\x20geographic\x20scope,\x20ALWAYS\x20specify\x20this\x20field.\x20'+'Use\x20a\x20complete\x20hierarchical\x20address\x20'+'(e.g.\x20\x27US\x20→\x20California\x20→\x20Los\x20Angeles\x20→\x20Koreatown\x27).\x20'+'If\x20only\x20a\x20partial\x20location\x20is\x20known,\x20EXPAND\x20it\x20to\x20the\x20full\x20standardized\x20form\x20'+'(country\x20→\x20province/state\x20→\x20city\x20→\x20district,\x20worldwide)\x20—\x20when\x20ambiguous,\x20offer\x202-4\x20candidate\x20completions\x20and\x20let\x20the\x20user\x20pick.'),'sales':SalesSchema['optional']()['describe']('Service\x20sales\x20products\x20or\x20services\x20list.\x20'+'⚠️\x20WIP\x20NETWORK-DEPLOYMENT\x20RULE:\x20a\x20non-empty\x20sale.wip\x20MUST\x20be\x20a\x20publicly\x20reachable\x20URL\x20'+'(GitHub\x20Pages\x20/\x20IPFS\x20/\x20your\x20own\x20website).\x20The\x20URL\x20is\x20stored\x20ON-CHAIN\x20and\x20every\x20customer\x20'+'fetches\x20it\x20at\x20order\x20time\x20—\x20a\x20local\x20file\x20path,\x20localhost/loopback\x20URL,\x20or\x20LAN\x20private-IP\x20URL\x20'+'is\x20unreachable\x20by\x20customers\x20on\x20other\x20machines\x20and\x20aborts\x20order_new\x20100%.\x20Local-network\x20URLs\x20'+'are\x20INTERNAL\x20TEST\x20USE\x20ONLY\x20(env.network\x20=\x20localnet).\x20Leave\x20sale.wip\x20empty\x20(\x22\x22)\x20to\x20skip\x20'+'WIP\x20verification\x20(TESTING\x20ONLY).'),'repositories':ObjectsSchema['optional']()['describe']('Service\x20Repository\x20object\x20list.'),'rewards':ObjectsSchema['optional']()['describe']('Service\x20Reward\x20object\x20list.\x20'+'May\x20share\x20the\x20Service\x27s\x20Permission\x20(no\x20conflict\x20check\x20—\x20intentional:\x20rewards\x20are\x20the\x20provider\x27s\x20own\x20'+'incentive\x20tool;\x20only\x20Arbitration\x20requires\x20a\x20different\x20Permission\x20for\x20neutrality).'),'arbitrations':ObjectsSchema['optional']()['describe']('Service\x20Arbitration\x20object\x20list.\x20'+'FORMAT:\x20same\x20as\x20repositories\x20—\x20use\x20the\x20`objects`\x20field\x20name\x20inside\x20the\x20operation\x20data.\x20'+'Example:\x20{arbitrations:\x20[{name:\x20\x27my_arb_1\x27},\x20{name:\x20\x27my_arb_2\x27}]}.\x20'+'Each\x20item\x20is\x20a\x20NameOrAddress\x20(object\x20ID\x20or\x20local\x20mark\x20name).\x20'+'⚠️\x20PERMISSION\x20RULE\x20(contract-enforced):\x20every\x20Arbitration\x20bound\x20here\x20'+'MUST\x20use\x20a\x20Permission\x20object\x20DIFFERENT\x20from\x20THIS\x20Service\x27s\x20permission\x20—\x20binding\x20an\x20Arbitration\x20that\x20shares\x20'+'the\x20Service\x27s\x20Permission\x20aborts\x20with\x20E_ARBITRATION_PERMISSION_CONFLICT\x20(error\x2033).\x20'+'Create\x20a\x20dedicated\x20Permission\x20for\x20each\x20Arbitration\x20BEFORE\x20binding.\x20'+'DESIGN\x20RATIONALE\x20(confirmed\x20intentional):\x20dispute\x20resolution\x20requires\x20NEUTRALITY\x20—\x20an\x20Arbitration\x20controlled\x20'+'by\x20the\x20same\x20Permission\x20admins\x20as\x20the\x20Service\x20it\x20judges\x20would\x20be\x20a\x20conflict\x20of\x20interest.\x20ONLY\x20Arbitration\x20has\x20'+'this\x20check:\x20Reward\x20and\x20Treasury\x20objects\x20MAY\x20share\x20the\x20Service\x27s\x20Permission\x20(they\x20are\x20the\x20provider\x27s\x20own\x20tools).'),'machine':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Service\x20Machine\x20object\x20ID\x20or\x20name.\x20The\x20Machine\x20object\x20must\x20be\x20in\x20published\x20state.'),'discount':DiscountSchema['optional']()['describe']('Issue\x20discount.'),'discount_destroy':z['array'](NameOrAddressSchema)['optional']()['describe']('Destroy\x20existing\x20discount\x20object\x20ID\x20list.'),'customer_required':z['array'](NotEmptyNameSchema)['optional']()['describe']('Customer\x20required\x20information\x20labels.\x20Such\x20as\x20phone,\x20email,\x20shipping_address,\x20etc.\x20'+'⚠️\x20HARD\x20LINKAGE\x20(SDK-enforced):\x20if\x20customer_required\x20is\x20set\x20(non-empty),\x20the\x20Service\x20MUST\x20also\x20bind\x20a\x20'+'Contact\x20via\x20`um`\x20—\x20otherwise\x20the\x20customer\x27s\x20private\x20information\x20cannot\x20be\x20delivered\x20through\x20end-to-end\x20'+'encrypted\x20Messenger\x20(which\x20routes\x20to\x20the\x20Contact\x20bound\x20as\x20um).\x20Set\x20`um`\x20together\x20with\x20customer_required.'),'order_allocators':z['union']([AllocatorsSchema,z['null']()])['optional']()['describe']('Order\x20fund\x20allocator.\x20Max\x20100\x20allocators\x20(MAX_ALLOCATOR_COUNT).\x20'+'✅\x20EACH\x20allocator\x20has\x20a\x20guard,\x20and\x20EVERY\x20allocator\x20whose\x20guard\x20address\x20matches\x20the\x20supplied\x20guard\x20RUNS\x20—\x20'+'they\x20are\x20NOT\x20mutually\x20exclusive\x20and\x20NOT\x20first-match-wins.\x20'+'One\x20guard\x20may\x20legitimately\x20authorize\x20several\x20distribution\x20rules\x20(different\x20fix\x20/\x20rate\x20/\x20cap);\x20each\x20contributes\x20'+'its\x20own\x20Payment\x20and\x20consumes\x20its\x20own\x20once-slot\x20(keyed\x20by\x20the\x20allocator\x20index).\x20Allocators\x20are\x20evaluated\x20in\x20vector\x20'+'order\x20against\x20the\x20SHRINKING\x20pool,\x20so\x20a\x20later\x20allocator\x20only\x20sees\x20the\x20balance\x20left\x20by\x20the\x20earlier\x20ones\x20—\x20which\x20is\x20'+'exactly\x20how\x20a\x20waterfall\x20(e.g.\x20Amount\x20fee\x20+\x20net\x20Rate\x20split)\x20is\x20built.\x20'+'On-chain\x20truth:\x20wow::allocation\x20(allocation.move:366-368,\x20`while`\x20loop\x20over\x20all\x20allocators,\x20`if\x20(guard\x20address\x20==\x20alloc.guard)`).\x20'+'⚠️\x20If\x20you\x20WANT\x20mutual\x20exclusion\x20you\x20must\x20express\x20it\x20inside\x20the\x20Guard\x20itself\x20(make\x20the\x20conditions\x20logically\x20exclusive).\x20'+'Set\x20to\x20null\x20to\x20clear.\x20'+'⚠️\x20PERMANENTLY\x20IMMUTABLE\x20after\x20publish:\x20order_allocators\x20can\x20ONLY\x20be\x20set\x20BEFORE\x20publish=true\x20'+'(on-chain\x20check\x20rejects\x20after\x20publish\x20—\x20E_ALREADY_PUBLISHED).\x20'+'After\x20publish,\x20the\x20ONLY\x20way\x20to\x20change\x20allocation\x20rules\x20is\x20to\x20create\x20a\x20NEW\x20Service\x20object.\x20'+'There\x20is\x20NO\x20pause+lock\x20exception\x20for\x20order_allocators\x20(unlike\x20arbitrations/rewards\x20which\x20have\x20time-lock\x20removal).\x20'+'PRE-PUBLISH\x20CHECKLIST:\x20verify\x20all\x20guard\x20names\x20resolve,\x20all\x20sharing\x20amounts\x20are\x20correct,\x20'+'threshold\x20is\x20set,\x20and\x20recipient\x20types\x20(Entity/Signer/GuardIdentifier)\x20are\x20intended\x20before\x20calling\x20publish=true.\x20'+'GuardIdentifier\x20sharing\x20mode:\x20{who:\x20{GuardIdentifier:\x20<u8>},\x20sharing:\x20<rate>,\x20mode:\x20\x27Rate\x27}\x20—\x20'+'resolves\x20recipient\x20from\x20the\x20Guard\x20table\x20submission\x20at\x20allocation\x20time.\x20BINDING\x20SEMANTICS\x20(contract-enforced,\x20abort\x20code\x2015):\x20'+'in\x20a\x20Service-created\x20Allocation\x20EVERY\x20GuardIdentifier\x20submission\x20must\x20equal\x20the\x20PAYING\x20order\x20—\x20it\x20is\x20always\x20\x27the\x20order\x27,\x20'+'never\x20a\x20third\x20party\x20whose\x20address\x20is\x20supplied\x20at\x20trigger\x20time;\x20use\x20{who:{Entity:...}}\x20for\x20named\x20parties.\x20'+'Canonical\x20order\x20pattern:\x20the\x20recipient\x20slot\x20is\x20the\x20single\x20'+'submitted\x20Order\x20(constrained\x20by\x20the\x20Guard\x20—\x20service\x20binding,\x20qualifying\x20node,\x20signer==order.owner);\x20funds\x20land\x20at\x20that\x20order\x20object\x20and\x20'+'are\x20receivable\x20only\x20by\x20its\x20owner\x20(object\x20receipt\x20=\x20owner\x20receipt).\x20Safety\x20is\x20determined\x20by\x20constraint\x20sufficiency\x20—\x20run\x20the\x20recipient\x20'+'constraint\x20audit\x20before\x20publish.\x20Fixed\x20recipients\x20should\x20use\x20{who:{Entity:...}};\x20unbound\x20Signer\x20recipients\x20are\x20a\x20CRITICAL\x20theft\x20risk.\x20'+'MULTI-CALL\x20ALLOCATION:\x20an\x20allocation\x20can\x20be\x20executed\x20MULTIPLE\x20times\x20(no\x20consumed\x20flag\x20in\x20contract).\x20'+'Use\x20Amount\x20mode\x20(not\x20Surplus)\x20for\x20recurring\x20allocations\x20—\x20Surplus\x20calls\x20balance::withdraw_all\x20which\x20drains\x20the\x20balance.\x20'+'For\x20monthly\x20payment\x20scenarios,\x20create\x20multiple\x20Allocators\x20with\x20time-based\x20Guards\x20+\x20Amount\x20mode\x20sharing\x20items.'),'buy_guard':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Buy\x20guard\x20object\x20ID\x20or\x20name.'),'compensation_fund_add':CoinParamSchema['optional']()['describe']('Deposit\x20funds\x20into\x20the\x20Service\x20compensation_fund.\x20Used\x20to\x20pay\x20indemnity\x20when\x20arbitration\x20resolves\x20in\x20customer\x27s\x20favor.\x20'+'FORMAT:\x20{balance:\x20<amount_in_smallest_unit>}\x20—\x20the\x20field\x20name\x20is\x20\x27balance\x27\x20(NOT\x20\x27amount\x27).\x20'+'The\x20token\x20type\x20and\x20precision\x20are\x20determined\x20by\x20the\x20Service\x20object\x27s\x20type_parameter\x20(the\x20generic\x20type\x20set\x20when\x20the\x20Service\x20was\x20created).\x20'+'For\x20WOW\x20(9\x20decimals):\x20{balance:\x201000000000}\x20=\x201\x20WOW.\x20'+'For\x20tokens\x20with\x20different\x20decimals,\x20adjust\x20accordingly\x20(e.g.\x20USDC\x20has\x206\x20decimals,\x20so\x20{balance:\x201000000}\x20=\x201\x20USDC).\x20'+'REQUIRES:\x20Permission\x20index\x20315\x20(SERVICE_COMPENSATION_FUND_DEPOSIT)\x20must\x20be\x20granted\x20to\x20the\x20calling\x20account\x20first.\x20'+'COMMON\x20MISTAKE:\x20using\x20{amount:\x20...}\x20or\x20{amount:\x20...,\x20type:\x20\x27WOW\x27}\x20—\x20these\x20will\x20fail.\x20The\x20correct\x20field\x20is\x20\x27balance\x27.'),'compensation_fund_withdraw':z['object']({'receipt':AccountOrMark_AddressSchema['describe']('Receipt\x20address\x20that\x20will\x20receive\x20the\x20withdrawn\x20funds\x20(as\x20a\x20new\x20Payment\x20object)'),'payment_info':PaymentInfoSchema['describe']('Payment\x20info\x20for\x20the\x20new\x20Payment\x20object\x20created\x20to\x20hold\x20the\x20withdrawn\x20funds')})['strict']()['optional']()['describe']('Withdraw\x20ALL\x20funds\x20from\x20the\x20compensation_fund\x20to\x20a\x20new\x20Payment\x20object\x20owned\x20by\x20`receipt`.\x20'+'REQUIRES:\x20Service\x20must\x20be\x20paused\x20AND\x20setting_lock_duration\x20must\x20have\x20elapsed\x20since\x20pause\x20(the\x20unpublished-state\x20check).\x20'+'Withdraws\x20the\x20ENTIRE\x20compensation_fund\x20balance\x20via\x20balance::withdraw_all.\x20'+'DIFFERENT\x20from\x20the\x20order-side\x20compensation\x20claim\x20(for\x20arbitration-winning\x20users,\x20no\x20pause+lock\x20required).'),'setting_lock_duration_add':z['number']()['optional']()['describe']('Additional\x20lock\x20duration\x20to\x20ADD\x20to\x20\x27setting_lock_duration\x27\x20(Move\x20field\x20name).\x20'+'UNIT:\x20milliseconds\x20(ms).\x20Example:\x202592000000\x20=\x2030\x20days,\x207776000000\x20=\x2090\x20days,\x2086400000\x20=\x201\x20day.\x20'+'DEFAULT:\x202592000000\x20(30\x20days,\x20DEFAULT_LOCK_DURATION).\x20This\x20is\x20the\x20initial\x20value\x20when\x20a\x20Service\x20is\x20created.\x20'+'Behavior:\x20additive\x20(safe_add)\x20—\x20only\x20increases,\x20never\x20decreases.\x20'+'Can\x20be\x20called\x20BEFORE\x20or\x20AFTER\x20publish\x20(no\x20publish\x20check).\x20'+'Affects\x20the\x20waiting\x20time\x20required\x20by:\x20compensation_fund_withdraw,\x20arbitrations\x20remove/clear,\x20rewards\x20remove/clear\x20'+'(all\x20require\x20pause\x20+\x20setting_lock_duration\x20elapsed\x20since\x20pause).'),'compensation_fund_receive':ReceivedBalanceOrRecentlySchema['optional']()['describe']('Receive\x20order\x20compensation\x20funds\x20from\x20this\x20Service\x20object.'+RECEIVE_FORMAT_BLOCK_BALANCE),'owner_receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20and\x20other\x20objects\x20received\x20by\x20this\x20Service\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\x20—\x20the\x20Service\x27s\x20customer-service\x20channel.\x20'+'This\x20is\x20the\x20object\x20that\x20Messenger\x20routes\x20encrypted\x20messages\x20to\x20for\x20pre-order\x20negotiation,\x20'+'private-info\x20delivery\x20(see\x20customer_required),\x20and\x20post-sale\x20support.\x20'+'⚠️\x20REQUIRED\x20whenever\x20customer_required\x20is\x20set:\x20without\x20um,\x20the\x20customer\x27s\x20private\x20information\x20'+'has\x20no\x20channel\x20to\x20reach\x20the\x20merchant.'),'arb_statement':z['object']({'arb':NameOrAddressSchema['describe']('Arb\x20object\x20(case)\x20to\x20attach\x20the\x20statement\x20to.'),'order':NameOrAddressSchema['describe']('The\x20order\x20the\x20case\x20was\x20opened\x20against\x20—\x20must\x20belong\x20to\x20this\x20Service.'),'statement':z['string']()['max'](0xfa0)['describe']('Seller\x27s\x20text\x20statement\x20appended\x20to\x20the\x20case\x20record\x20(ArbStatementEvent).\x20'+'Event-only:\x20nothing\x20on\x20the\x20Arb\x20object\x20is\x20mutated;\x20the\x20record\x20cannot\x20be\x20rewritten\x20or\x20deleted.\x20'+'Use\x20to\x20declare\x20facts\x20or\x20report\x20the\x20customer\x27s\x20behavior\x20(e.g.\x20absence,\x20non-cooperation).\x20'+'PRIMARY\x20evidence\x20channel\x20is\x20Messenger\x20(encrypted\x20WTS\x20records\x20with\x20the\x20customer);\x20'+'this\x20is\x20the\x20SECONDARY\x20on-chain\x20declare/report\x20channel.')})['optional']()['describe']('Service\x20(defendant-side)\x20statement\x20on\x20an\x20arbitration\x20case\x20—\x20permission\x20index\x20321.\x20'+'Lets\x20the\x20Service\x20permission\x20holder\x20put\x20a\x20bounded\x20text\x20on\x20the\x20record\x20for\x20any\x20case\x20against\x20'+'an\x20order\x20of\x20this\x20service\x20WITHOUT\x20holding\x20the\x20order.\x20Callable\x20in\x20ANY\x20case\x20status.\x20'+'The\x20Arb\x27s\x20coin\x20type\x20is\x20derived\x20automatically\x20from\x20the\x20arb\x20object\x20on-chain.'),'pause':z['boolean']()['optional']()['describe']('Whether\x20to\x20pause\x20accepting\x20new\x20orders.'),'publish':z['boolean']()['optional']()['describe']('Whether\x20to\x20publish\x20the\x20Service.\x20After\x20publishing,\x20customers\x20can\x20place\x20orders.\x20'+'⚠️\x20PRE-PUBLISH\x20EVALUATION\x20(mandatory,\x20stop-node\x20fund-exit\x20coverage):\x20service.allocators\x20MUST\x20cover\x20EVERY\x20stop\x20node\x20of\x20the\x20bound\x20Machine\x20—\x20every\x20node\x20where\x20an\x20order\x20can\x20rest\x20(terminal\x20nodes\x20AND\x20waiting\x20states:\x20review\x20windows,\x20handovers,\x20open\x20disputes)\x20needs\x20BOTH\x20a\x20withdrawal\x20(release)\x20AND\x20a\x20refund\x20allocation\x20rule,\x20and\x20each\x20mapping\x20guard\x20must\x20be\x20satisfiable\x20in\x20BOTH\x20directions.\x20An\x20uncovered\x20stop\x20node\x20strands\x20escrowed\x20funds\x20permanently\x20(order_allocators\x20is\x20L1-immutable).\x20Review-gated\x20release\x20is\x20a\x20TIME\x20VARIANT\x20inside\x20ONE\x20exit\x20guard\x20(\x27reviewed\x20OR\x20unreviewed\x20after\x20T\x27),\x20never\x20parallel\x20outgoing\x20edges\x20(race\x20deadlock).\x20See\x20pattern.fund_flow_stop_node_coverage\x20+\x20rules\x20R-M5-03\x20/\x20R-M5-09.\x20'+'VERIFIED\x20against\x20Move\x20source\x20+\x20SDK\x20(4-level\x20immutability\x20matrix):\x0a'+'\x20\x20L1\x20—\x20PERMANENTLY\x20LOCKED\x20after\x20publish\x20(assert!(!bPublished),\x20no\x20pause+lock\x20exception):\x0a'+'\x20\x20\x20\x20•\x20machine\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(workflow\x20template)\x0a'+'\x20\x20\x20\x20•\x20order_allocators\x20(fund\x20distribution\x20rules)\x0a'+'\x20\x20L2\x20—\x20TIME-LOCKED\x20after\x20publish\x20(unpublished-state\x20check\x20—\x20requires\x20pause\x20+\x20setting_lock_duration\x20elapsed):\x0a'+'\x20\x20\x20\x20•\x20arbitrations\x20remove/clear\x20(dispute\x20resolution\x20objects)\x0a'+'\x20\x20\x20\x20•\x20rewards\x20remove/clear\x20\x20\x20\x20\x20\x20\x20(reward\x20objects)\x0a'+'\x20\x20\x20\x20•\x20compensation_fund_withdraw\x20(withdraw\x20ALL\x20funds)\x0a'+'\x20\x20L3\x20—\x20REMAIN\x20MUTABLE\x20after\x20publish\x20(no\x20SDK\x20check,\x20no\x20Move\x20check):\x0a'+'\x20\x20\x20\x20•\x20arbitrations\x20add,\x20rewards\x20add\x20(no\x20assert\x20—\x20can\x20add\x20after\x20publish)\x0a'+'\x20\x20\x20\x20•\x20buy_guard,\x20sales,\x20discount,\x20description,\x20location,\x20pause,\x20repositories,\x0a'+'\x20\x20\x20\x20•\x20compensation_fund_add,\x20setting_lock_duration_add,\x20customer_required,\x20um\x20(Contact)\x0a'+'These\x202\x20L1-LOCKED\x20fields\x20(machine/order_allocators)\x20MUST\x20be\x20set\x20BEFORE\x20publish=true.\x0a'+'arbitrations/rewards\x20can\x20be\x20ADDED\x20after\x20publish\x20but\x20remove/clear\x20requires\x20pause+lock.\x0a'+'\x0a'+'⚠️\x20COMPENSATION_FUND\x20+\x20ARBITRATION\x20LINKAGE:\x0a'+'\x20\x20At\x20publish\x20time,\x20if\x20compensation_fund\x20>\x200,\x20Arbitration\x20MUST\x20be\x20bound:\x0a'+'\x20\x20\x20\x20if\x20(balance::value(&self.compensation_fund)\x20>\x200)\x20{\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20assert!(arbitration_count\x20>\x200,\x20E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND);\x0a'+'\x20\x20\x20\x20}\x0a'+'\x20\x20The\x20MCP\x20handler\x20enforces\x20this\x20as\x20a\x20HARD\x20PRE-CHECK:\x20if\x20publish=true\x20AND\x20compensation_fund_add\x20'+'\x20\x20is\x20set\x20in\x20the\x20same\x20call\x20AND\x20arbitrations\x20is\x20empty,\x20the\x20call\x20is\x20REJECTED\x20before\x20submission.\x20'+'\x20\x20If\x20compensation_fund\x20was\x20deposited\x20in\x20a\x20prior\x20call,\x20a\x20SOFT\x20WARNING\x20is\x20issued.\x0a'+'\x0a'+'SCHEMA-03\x20/\x20P0-01\x20fix\x20—\x20DEPLOYMENT\x20WORKFLOW\x20(two-phase,\x20avoids\x20circular\x20dependency):\x0a'+'\x20\x20Phase\x201\x20—\x20CREATE\x20(no\x20publish):\x20object={name:\x27my-service\x27,\x20type_parameter,\x20permission}\x20+\x20machine\x20+\x20order_allocators\x20+\x20arbitrations.\x0a'+'\x20\x20\x20\x20NOTE:\x20buy_guard\x20can\x20use\x20a\x20LocalMark\x20NAME\x20(not\x20address)\x20to\x20break\x20the\x20Guard→Service\x20circular\x20dependency.\x0a'+'\x20\x20\x20\x20The\x20name\x20is\x20resolved\x20to\x20an\x20address\x20at\x20transaction\x20build\x20time.\x0a'+'\x20\x20Phase\x202\x20—\x20PUBLISH:\x20object=\x27my-service\x27\x20(string\x20ref)\x20+\x20publish=true.\x0a'+'\x20\x20\x20\x20All\x20L1-LOCKED\x20fields\x20must\x20be\x20set\x20in\x20Phase\x201;\x20Phase\x202\x20only\x20flips\x20the\x20publish\x20flag.\x0a'+'\x20\x20Post-publish\x20updates:\x20buy_guard,\x20sales,\x20description,\x20repositories\x20(add),\x20rewards\x20(add),\x20arbitrations\x20(add),\x20etc.')})['strict']()['describe']('On-chain\x20Service\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Set\x20\x27object\x27\x20field\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20permission,\x20...}\x20to\x20create\x20a\x20Service.\x20NOTE:\x20\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(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 CallService_InputSchema=z['object']({'data':CallService_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
1
|
+
import{z}from'zod';import{TypedPermissionObjectSchema,CoinParamSchema,NamedObjectSchema,ObjectsSchema,CallEnvSchema,SubmissionCallSchema}from'./base.js';import{AllocatorsSchema,DiscountTypeSchema,ServiceSaleSchema,PaymentInfoSchema}from'../query/index.js';import{AccountOrMark_AddressSchema,DescriptionSchema,LongNameSchema,ManyAccountOrMark_AddressSchema,NameOrAddressSchema,NotEmptyNameSchema,ReceivedBalanceOrRecentlySchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS,RECEIVE_FORMAT_BLOCK_BALANCE}from'../common/index.js';import{BalanceTypeSchema}from'../common/index.js';export const ServiceBuyItemSchema=z['preprocess'](a=>{if(a&&typeof a==='object'&&'stock'in a&&!('quantity'in a)){const {stock:b,...c}=a;return{...c,'quantity':b};}return a;},z['object']({'name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20or\x20service\x20to\x20purchase'),'quantity':BalanceTypeSchema['describe']('⚠️\x20PURCHASE\x20QUANTITY,\x20NOT\x20inventory.\x20This\x20is\x20the\x20number\x20of\x20units\x20you\x20are\x20'+'buying;\x20the\x20on-chain\x20order\x20total\x20=\x20sale.price\x20x\x20this\x20value.\x20Do\x20NOT\x20put\x20the\x20'+'product\x27s\x20available\x20stock\x20here\x20—\x20inventory\x20is\x20the\x20separate\x20`stock`\x20field\x20on\x20'+'the\x20Service\x27s\x20sales\x20list.\x20To\x20buy\x20one\x20unit,\x20set\x20quantity:\x201.\x20'+'(Legacy\x20callers\x20may\x20still\x20send\x20this\x20as\x20`stock`;\x20it\x20is\x20accepted\x20and\x20treated\x20'+'identically\x20as\x20the\x20purchase\x20quantity.)'),'wip_hash':z['string']()['default']('')['describe']('WIP\x20file\x20hash\x20of\x20the\x20item.\x20OMIT\x20this\x20field\x20(or\x20pass\x20empty\x20string\x20\x22\x22)\x20to\x20AUTO-FILL\x20it\x20from\x20the\x20'+'bound\x20Service\x20sale\x27s\x20wip_hash\x20—\x20the\x20on-chain\x20quote\x20then\x20verifies\x20the\x20WIP\x20file\x20matches\x20that\x20hash\x20'+'(E_WIP_HASH_NOT_MATCH\x20on\x20mismatch),\x20so\x20buyers\x20do\x20NOT\x20need\x20to\x20copy\x20any\x20hash\x20value.\x20Only\x20pass\x20an\x20'+'explicit\x20hash\x20when\x20pinning\x20a\x20value\x20seen\x20earlier:\x20that\x20protects\x20against\x20a\x20legitimate\x20merchant\x20WIP\x20'+'update\x20between\x20viewing\x20the\x20product\x20and\x20placing\x20the\x20order.')})['strict']());export const BuySchema=z['object']({'items':z['array'](ServiceBuyItemSchema)['describe']('List\x20of\x20products\x20or\x20services\x20to\x20purchase'),'total_pay':CoinParamSchema['describe']('Actual\x20payment\x20amount.\x20FORMAT:\x20{balance:\x20<amount_in_smallest_unit>}\x20or\x20{coin:\x20<coin_object_id>}.\x20'+'The\x20token\x20type\x20and\x20precision\x20are\x20determined\x20by\x20the\x20Service\x20object\x27s\x20type_parameter\x20(the\x20generic\x20type\x20set\x20when\x20the\x20Service\x20was\x20created).\x20'+'For\x20WOW\x20(9\x20decimals):\x20{balance:\x201000000000}\x20=\x201\x20WOW.\x20'),'discount':z['string']()['optional']()['describe']('Discount\x20object\x20ID\x20or\x20name'),'payment_remark':z['string']()['optional']()['describe']('Payment\x20remark'),'payment_index':z['number']()['optional']()['describe']('Payment\x20index')})['strict']();export const DiscountSchema=z['object']({'name':z['string']()['describe']('Discount\x20name'),'discount_type':DiscountTypeSchema,'discount_value':BalanceTypeSchema['describe']('Discount\x20magnitude,\x20meaning\x20depends\x20on\x20discount_type.\x20'+'RATES\x20(0):\x20per-10000\x20off\x20rate\x20—\x2010\x20=\x200.1%\x20off,\x201000\x20=\x2010%\x20off,\x2010000\x20=\x20100%\x20off;\x20values\x20above\x2010000\x20are\x20rejected.\x20'+'FIXED\x20(1):\x20fixed\x20deduction\x20from\x20the\x20order\x20total\x20in\x20the\x20Service\x20token\x27s\x20smallest\x20units\x20(e.g.\x201000000000\x20=\x201\x20WOW\x20at\x209\x20decimals).'),'benchmark':z['union']([z['number'](),z['string']()])['optional']()['describe']('Minimum\x20order\x20total\x20(in\x20the\x20Service\x20token\x27s\x20smallest\x20units)\x20for\x20the\x20discount\x20to\x20apply\x20—\x20'+'when\x20set,\x20the\x20discount\x20is\x20applied\x20only\x20if\x20the\x20PRE-discount\x20order\x20total\x20is\x20GREATER\x20THAN\x20OR\x20EQUAL\x20TO\x20this\x20value.\x20'+'✅\x20OMITTING\x20this\x20field\x20(or\x20passing\x20null,\x20or\x200)\x20means\x20NO\x20threshold\x20—\x20the\x20discount\x20applies\x20UNCONDITIONALLY,\x20and\x20that\x20is\x20the\x20common,\x20correct\x20case.\x20'+'This\x20is\x20the\x20on-chain\x20behaviour:\x20benchmark_met\x20=\x20if\x20(option::is_some(&discount.benchmark))\x20'+'{\x20total\x20>=\x20benchmark\x20}\x20else\x20{\x20true\x20}\x20(wow-framework\x20sources/w/service.move:274-278,\x20inside\x20the\x20discount-application\x20step).\x20'+'⚠️\x20SHARP\x20EDGE\x20when\x20you\x20DO\x20set\x20a\x20threshold:\x20a\x20below-threshold\x20order\x20is\x20NOT\x20rejected\x20—\x20it\x20completes\x20at\x20FULL\x20price\x20'+'and\x20the\x20one-time\x20coupon\x20is\x20still\x20consumed\x20and\x20destroyed,\x20so\x20the\x20buyer\x20pays\x20full\x20price\x20AND\x20loses\x20the\x20coupon.\x20'+'Keep\x20thresholds\x20low\x20enough\x20that\x20your\x20typical\x20basket\x20clears\x20them.\x20'+'If\x20the\x20order\x20total\x20is\x20below\x20the\x20discounted\x20price\x20the\x20payment\x20aborts\x20—\x20pay\x20the\x20list\x20price;\x20the\x20excess\x20is\x20returned\x20as\x20a\x20new\x20Coin.'),'time_ms_start':z['number']()['optional']()['describe']('Discount\x20start\x20time\x20(milliseconds)'),'time_ms_end':z['number']()['describe']('Discount\x20end\x20time\x20(milliseconds)'),'count':z['number']()['describe']('Number\x20of\x20SEPARATE\x20Discount\x20(coupon)\x20objects\x20minted\x20—\x20total\x20delivered\x20=\x20count\x20×\x20number\x20of\x20recipients.\x20'+'Each\x20coupon\x20object\x20is\x20SINGLE-USE\x20(consumed\x20on\x20first\x20use).\x20This\x20is\x20NOT\x20a\x20per-coupon\x20reuse\x20count:\x20'+'count:2\x20creates\x202\x20independent\x20one-time\x20coupons,\x20not\x201\x20coupon\x20usable\x20twice.'),'recipient':ManyAccountOrMark_AddressSchema['describe']('Discount\x20recipient'),'transferable':z['boolean']()['describe']('Whether\x20the\x20discount\x20object\x20recipient\x20can\x20transfer\x20the\x20discount\x20object')})['strict']();export const OrderNewSchema=z['object']({'buy':BuySchema,'agents':ManyAccountOrMark_AddressSchema['optional']()['describe']('Order\x20agents.\x20Agents\x20can\x20operate\x20the\x20order,\x20such\x20as\x20canceling\x20the\x20order,\x20modifying\x20the\x20order\x20status,\x20etc.;\x20but\x20cannot\x20receive\x20the\x20funds\x20received\x20by\x20the\x20order.'),'order_required_info':z['string']()['optional']()['describe']('Contact\x20object\x20ID\x20or\x20WTS\x20Proof\x20object,\x20RECORDED\x20on\x20the\x20Order\x20as\x20evidence\x20that\x20the\x20order\x20holder\x20'+'delivered\x20the\x20private\x20information\x20the\x20Service\x20declares\x20in\x20customer_required\x20(e.g.\x20phone/email/shipping_address).\x20'+'RECORD-ONLY,\x20NOT\x20ENFORCED:\x20nothing\x20on-chain\x20reads\x20this\x20field\x20—\x20the\x20purchase\x20entry\x20never\x20requires\x20it,\x20and\x20an\x20order\x20'+'supplying\x20none\x20of\x20the\x20declared\x20fields\x20is\x20still\x20created.\x20FLOW:\x20the\x20order\x20holder\x20sends\x20the\x20information\x20to\x20the\x20'+'Service\x27s\x20Contact\x20(um)\x20via\x20end-to-end\x20encrypted\x20Messenger,\x20then\x20passes\x20the\x20Contact\x20object\x20ID\x20or\x20the\x20generated\x20'+'WTS\x20Proof\x20here.\x20To\x20ENFORCE\x20delivery\x20on-chain,\x20mount\x20the\x20pattern.required_info_evidence_gate\x20Guard\x20on\x20the\x20forward\x20'+'that\x20hands\x20over\x20goods\x20or\x20funds,\x20asserting\x20order.required_info\x20is\x20some\x20(presence-only\x20—\x20the\x20recorded\x20address\x20value\x20'+'is\x20never\x20a\x20guard\x20condition;\x20accepting\x20the\x20delivered\x20information\x20is\x20the\x20merchant\x27s\x20confirming\x20forward).'),'transfer':AccountOrMark_AddressSchema['optional']()['describe']('Set\x20the\x20new\x20owner\x20of\x20the\x20order.\x20Requires\x20order\x20owner\x20permission\x20to\x20set.'),'namedNewOrder':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20newly\x20created\x20Order\x20object.\x20'+'Without\x20this,\x20the\x20Order\x20is\x20only\x20referenceable\x20by\x20its\x20on-chain\x20address.\x20'+'Example:\x20{name:\x20\x27my_order_v1\x27}\x20allows\x20subsequent\x20operations\x20to\x20use\x20\x27my_order_v1\x27\x20instead\x20of\x20the\x20address.\x20'+'PLACEMENT:\x20this\x20field\x20MUST\x20be\x20inside\x20data.order_new\x20(it\x20is\x20an\x20OrderNew\x20field)\x20—\x20putting\x20namedNewOrder\x20at\x20'+'the\x20data\x20root\x20fails\x20schema\x20validation\x20with\x20\x27Unrecognized\x20key\x27.\x20'+'MIGRATION\x20TIP:\x20for\x20batch/migration\x20order\x20creation,\x20always\x20auto-generate\x20readable\x20names\x20'+'(e.g.\x20\x27<source>_<service>_<seq>\x27\x20like\x20\x27my_shop_svc_v1_0001\x27)\x20—\x20unnamed\x20orders\x20(head.name\x20=\x20null)\x20are\x20'+'only\x20address-referenceable,\x20which\x20breaks\x20downstream\x20queries,\x20displays\x20and\x20audits\x20(E-8).'),'namedNewAllocation':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20order\x27s\x20Allocation\x20object.\x20'+'Without\x20this,\x20the\x20Allocation\x20is\x20only\x20referenceable\x20by\x20its\x20address.\x20'+'Example:\x20{name:\x20\x27my_allocation_v1\x27}\x20allows\x20alloc_by_guard\x20to\x20reference\x20\x27my_allocation_v1\x27.'),'namedNewProgress':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20order\x27s\x20Progress\x20object.\x20'+'Without\x20this,\x20the\x20Progress\x20is\x20only\x20referenceable\x20by\x20its\x20address.\x20'+'Example:\x20{name:\x20\x27my_progress_v1\x27}\x20allows\x20progress\x20operations\x20to\x20use\x20\x27my_progress_v1\x27.')})['strict']();export const SalesSchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('add'),'sales':z['array'](ServiceSaleSchema)})['strict']()['describe']('Add\x20new\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('set'),'sales':z['array'](ServiceSaleSchema)})['strict']()['describe']('Replaces\x20the\x20ENTIRE\x20sales\x20list:\x20every\x20product\x20NOT\x20included\x20is\x20REMOVED\x20from\x20the\x20Service\x20'+'(its\x20stock\x20and\x20wip\x20binding\x20go\x20with\x20it).\x20To\x20change\x20ONE\x20product,\x20prefer\x20the\x20per-item\x20ops\x20'+'(price_add\x20/\x20price_reduce\x20/\x20stock_add\x20/\x20stock_reduce\x20/\x20sale_suspension)\x20over\x20re-sending\x20'+'the\x20full\x20list;\x20with\x20op:set\x20you\x20MUST\x20resend\x20ALL\x20unchanged\x20products\x20too.\x20'+'Removal\x20is\x20immediate\x20and\x20cannot\x20be\x20undone.'),z['object']({'op':z['literal']('remove'),'sales_name':z['array'](LongNameSchema['describe']('Sales\x20name'))})['strict']()['describe']('Remove\x20existing\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('clear')})['strict']()['describe']('Clear\x20all\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('price_add'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Price\x20INCREASE\x20delta\x20in\x20the\x20Service\x20token\x27s\x20smallest\x20units\x20(e.g.\x20100000000\x20=\x20+0.1\x20WOW).\x20'+'Added\x20to\x20the\x20current\x20price\x20(on-chain\x20saturating\x20add).\x20NOT\x20the\x20new\x20absolute\x20price.')})['strict']()['describe']('Raise\x20one\x20product\x27s\x20price\x20by\x20a\x20delta.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20is\x20silently\x20ignored\x20on-chain\x20(verify\x20with\x20query_toolkit\x20afterwards).'),z['object']({'op':z['literal']('price_reduce'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Price\x20DECREASE\x20delta\x20in\x20the\x20Service\x20token\x27s\x20smallest\x20units\x20(e.g.\x20100000000\x20=\x20-0.1\x20WOW).\x20'+'If\x20the\x20delta\x20exceeds\x20the\x20current\x20price,\x20the\x20price\x20clamps\x20to\x200.\x20NOT\x20the\x20new\x20absolute\x20price.')})['strict']()['describe']('Lower\x20one\x20product\x27s\x20price\x20by\x20a\x20delta.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20is\x20silently\x20ignored\x20on-chain\x20(verify\x20with\x20query_toolkit\x20afterwards).'),z['object']({'op':z['literal']('stock_add'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Stock\x20INCREASE\x20delta\x20(a\x20unit\x20COUNT,\x20not\x20money),\x20e.g.\x2050\x20=\x20+50\x20units.')})['strict']()['describe']('Restock\x20one\x20product\x20by\x20a\x20delta.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20is\x20silently\x20ignored\x20on-chain\x20(verify\x20with\x20query_toolkit\x20afterwards).'),z['object']({'op':z['literal']('stock_reduce'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Stock\x20DECREASE\x20delta\x20(a\x20unit\x20COUNT,\x20not\x20money),\x20e.g.\x2010\x20=\x20-10\x20units.\x20'+'If\x20the\x20delta\x20exceeds\x20current\x20stock,\x20the\x20stock\x20clamps\x20to\x200\x20(product\x20becomes\x20unsellable).')})['strict']()['describe']('Reduce\x20one\x20product\x27s\x20stock\x20by\x20a\x20delta\x20(e.g.\x20write-off\x20damaged\x20units).\x20'+'Only\x20the\x20named\x20product\x20is\x20touched;\x20an\x20unknown\x20sale_name\x20is\x20silently\x20ignored\x20on-chain.'),z['object']({'op':z['literal']('sale_suspension'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20suspend\x20or\x20resume'),'suspension':z['boolean']()['describe']('true\x20=\x20suspend\x20the\x20product\x20(buy/quote\x20abort\x20with\x20E_SALE_SUSPENDED);\x20false\x20=\x20resume\x20selling.')})['strict']()['describe']('Suspend\x20or\x20resume\x20ONE\x20product\x20without\x20removing\x20it\x20(keeps\x20price/stock/WIP\x20binding).\x20'+'The\x20retail-style\x20\x27out\x20of\x20stock\x20/\x20listing\x20inactive\x27\x20state.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20is\x20silently\x20ignored\x20on-chain\x20(verify\x20with\x20query_toolkit\x20afterwards).')]);export const CallService_DataSchema=z['object']({'object':TypedPermissionObjectSchema,'order_new':OrderNewSchema['optional']()['describe']('Create\x20new\x20order.'),'description':DescriptionSchema['optional'](),'location':LongNameSchema['optional']()['describe']('The\x20service\x20area\x20and\x20scope\x20as\x20stated\x20by\x20the\x20merchant.\x20'+'IMPORTANT:\x20If\x20the\x20service\x20has\x20a\x20geographic\x20scope,\x20ALWAYS\x20specify\x20this\x20field.\x20'+'Use\x20a\x20complete\x20hierarchical\x20address\x20'+'(e.g.\x20\x27US\x20→\x20California\x20→\x20Los\x20Angeles\x20→\x20Koreatown\x27).\x20'+'If\x20only\x20a\x20partial\x20location\x20is\x20known,\x20EXPAND\x20it\x20to\x20the\x20full\x20standardized\x20form\x20'+'(country\x20→\x20province/state\x20→\x20city\x20→\x20district,\x20worldwide)\x20—\x20when\x20ambiguous,\x20offer\x202-4\x20candidate\x20completions\x20and\x20let\x20the\x20user\x20pick.'),'sales':SalesSchema['optional']()['describe']('Service\x20sales\x20products\x20or\x20services\x20list.\x20'+'⚠️\x20WIP\x20NETWORK-DEPLOYMENT\x20RULE:\x20a\x20non-empty\x20sale.wip\x20MUST\x20be\x20a\x20publicly\x20reachable\x20URL\x20'+'(GitHub\x20Pages\x20/\x20IPFS\x20/\x20your\x20own\x20website).\x20The\x20URL\x20is\x20stored\x20ON-CHAIN\x20and\x20every\x20customer\x20'+'fetches\x20it\x20at\x20order\x20time\x20—\x20a\x20local\x20file\x20path,\x20localhost/loopback\x20URL,\x20or\x20LAN\x20private-IP\x20URL\x20'+'is\x20unreachable\x20by\x20customers\x20on\x20other\x20machines\x20and\x20aborts\x20order_new\x20100%.\x20Local-network\x20URLs\x20'+'are\x20INTERNAL\x20TEST\x20USE\x20ONLY\x20(env.network\x20=\x20localnet).\x20Leave\x20sale.wip\x20empty\x20(\x22\x22)\x20to\x20skip\x20'+'WIP\x20verification\x20(TESTING\x20ONLY).'),'repositories':ObjectsSchema['optional']()['describe']('Service\x20Repository\x20object\x20list.'),'rewards':ObjectsSchema['optional']()['describe']('Service\x20Reward\x20object\x20list.\x20'+'May\x20share\x20the\x20Service\x27s\x20Permission\x20(no\x20conflict\x20check\x20—\x20intentional:\x20rewards\x20are\x20the\x20provider\x27s\x20own\x20'+'incentive\x20tool;\x20only\x20Arbitration\x20requires\x20a\x20different\x20Permission\x20for\x20neutrality).'),'arbitrations':ObjectsSchema['optional']()['describe']('Service\x20Arbitration\x20object\x20list.\x20'+'FORMAT:\x20same\x20as\x20repositories\x20—\x20use\x20the\x20`objects`\x20field\x20name\x20inside\x20the\x20operation\x20data.\x20'+'Example:\x20{arbitrations:\x20[{name:\x20\x27my_arb_1\x27},\x20{name:\x20\x27my_arb_2\x27}]}.\x20'+'Each\x20item\x20is\x20a\x20NameOrAddress\x20(object\x20ID\x20or\x20local\x20mark\x20name).\x20'+'⚠️\x20PERMISSION\x20RULE\x20(contract-enforced):\x20every\x20Arbitration\x20bound\x20here\x20'+'MUST\x20use\x20a\x20Permission\x20object\x20DIFFERENT\x20from\x20THIS\x20Service\x27s\x20permission\x20—\x20binding\x20an\x20Arbitration\x20that\x20shares\x20'+'the\x20Service\x27s\x20Permission\x20aborts\x20with\x20E_ARBITRATION_PERMISSION_CONFLICT\x20(error\x2033).\x20'+'Create\x20a\x20dedicated\x20Permission\x20for\x20each\x20Arbitration\x20BEFORE\x20binding.\x20'+'DESIGN\x20RATIONALE\x20(confirmed\x20intentional):\x20dispute\x20resolution\x20requires\x20NEUTRALITY\x20—\x20an\x20Arbitration\x20controlled\x20'+'by\x20the\x20same\x20Permission\x20admins\x20as\x20the\x20Service\x20it\x20judges\x20would\x20be\x20a\x20conflict\x20of\x20interest.\x20ONLY\x20Arbitration\x20has\x20'+'this\x20check:\x20Reward\x20and\x20Treasury\x20objects\x20MAY\x20share\x20the\x20Service\x27s\x20Permission\x20(they\x20are\x20the\x20provider\x27s\x20own\x20tools).'),'machine':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Service\x20Machine\x20object\x20ID\x20or\x20name.\x20The\x20Machine\x20object\x20must\x20be\x20in\x20published\x20state.'),'discount':DiscountSchema['optional']()['describe']('Issue\x20discount.'),'discount_destroy':z['array'](NameOrAddressSchema)['optional']()['describe']('Destroy\x20existing\x20discount\x20object\x20ID\x20list.'),'customer_required':z['array'](NotEmptyNameSchema)['optional']()['describe']('Customer\x20required\x20information\x20labels.\x20Such\x20as\x20phone,\x20email,\x20shipping_address,\x20etc.\x20'+'⚠️\x20HARD\x20LINKAGE\x20(SDK-enforced):\x20if\x20customer_required\x20is\x20set\x20(non-empty),\x20the\x20Service\x20MUST\x20also\x20bind\x20a\x20'+'Contact\x20via\x20`um`\x20—\x20otherwise\x20the\x20customer\x27s\x20private\x20information\x20cannot\x20be\x20delivered\x20through\x20end-to-end\x20'+'encrypted\x20Messenger\x20(which\x20routes\x20to\x20the\x20Contact\x20bound\x20as\x20um).\x20Set\x20`um`\x20together\x20with\x20customer_required.'),'order_allocators':z['union']([AllocatorsSchema,z['null']()])['optional']()['describe']('Order\x20fund\x20allocator.\x20Max\x20100\x20allocators\x20(MAX_ALLOCATOR_COUNT).\x20'+'✅\x20EACH\x20allocator\x20has\x20a\x20guard,\x20and\x20EVERY\x20allocator\x20whose\x20guard\x20address\x20matches\x20the\x20supplied\x20guard\x20RUNS\x20—\x20'+'they\x20are\x20NOT\x20mutually\x20exclusive\x20and\x20NOT\x20first-match-wins.\x20'+'One\x20guard\x20may\x20legitimately\x20authorize\x20several\x20distribution\x20rules\x20(different\x20fix\x20/\x20rate\x20/\x20cap);\x20each\x20contributes\x20'+'its\x20own\x20Payment\x20and\x20consumes\x20its\x20own\x20once-slot\x20(keyed\x20by\x20the\x20allocator\x20index).\x20Allocators\x20are\x20evaluated\x20in\x20vector\x20'+'order\x20against\x20the\x20SHRINKING\x20pool,\x20so\x20a\x20later\x20allocator\x20only\x20sees\x20the\x20balance\x20left\x20by\x20the\x20earlier\x20ones\x20—\x20which\x20is\x20'+'exactly\x20how\x20a\x20waterfall\x20(e.g.\x20Amount\x20fee\x20+\x20net\x20Rate\x20split)\x20is\x20built.\x20'+'On-chain\x20truth:\x20wow::allocation\x20(allocation.move:429-431,\x20`while`\x20loop\x20over\x20all\x20allocators,\x20`if\x20(guard\x20address\x20==\x20alloc.guard)`).\x20'+'⚠️\x20If\x20you\x20WANT\x20mutual\x20exclusion\x20you\x20must\x20express\x20it\x20inside\x20the\x20Guard\x20itself\x20(make\x20the\x20conditions\x20logically\x20exclusive).\x20'+'Set\x20to\x20null\x20to\x20clear.\x20'+'⚠️\x20IMMUTABLE\x20after\x20publish\x20except\x20APPEND:\x20order_allocators\x20full\x20replacement\x20can\x20ONLY\x20be\x20done\x20BEFORE\x20publish=true\x20'+'(on-chain\x20check\x20rejects\x20after\x20publish\x20—\x20E_ALREADY_PUBLISHED).\x20'+'After\x20publish,\x20the\x20ONLY\x20mutation\x20is\x20order_allocators_append\x20(prefix-frozen\x20extension\x20—\x20see\x20that\x20field).\x20'+'There\x20is\x20NO\x20pause+lock\x20exception\x20for\x20order_allocators\x20(unlike\x20arbitrations/rewards\x20which\x20have\x20time-lock\x20removal).\x20'+'PRE-PUBLISH\x20CHECKLIST:\x20verify\x20all\x20guard\x20names\x20resolve,\x20all\x20sharing\x20amounts\x20are\x20correct,\x20'+'threshold\x20is\x20set,\x20and\x20recipient\x20types\x20(Entity/Signer/GuardIdentifier)\x20are\x20intended\x20before\x20calling\x20publish=true.\x20'+'GuardIdentifier\x20sharing\x20mode:\x20{who:\x20{GuardIdentifier:\x20<u8>},\x20sharing:\x20<rate>,\x20mode:\x20\x27Rate\x27}\x20—\x20'+'resolves\x20recipient\x20from\x20the\x20Guard\x20table\x20submission\x20at\x20allocation\x20time.\x20BINDING\x20SEMANTICS\x20(contract-enforced,\x20abort\x20code\x2015):\x20'+'in\x20a\x20Service-created\x20Allocation\x20EVERY\x20GuardIdentifier\x20submission\x20must\x20equal\x20the\x20PAYING\x20order\x20—\x20it\x20is\x20always\x20\x27the\x20order\x27,\x20'+'never\x20a\x20third\x20party\x20whose\x20address\x20is\x20supplied\x20at\x20trigger\x20time;\x20use\x20{who:{Entity:...}}\x20for\x20named\x20parties.\x20'+'Canonical\x20order\x20pattern:\x20the\x20recipient\x20slot\x20is\x20the\x20single\x20'+'submitted\x20Order\x20(constrained\x20by\x20the\x20Guard\x20—\x20service\x20binding,\x20qualifying\x20node,\x20signer==order.owner);\x20funds\x20land\x20at\x20that\x20order\x20object\x20and\x20'+'are\x20receivable\x20only\x20by\x20its\x20owner\x20(object\x20receipt\x20=\x20owner\x20receipt).\x20Safety\x20is\x20determined\x20by\x20constraint\x20sufficiency\x20—\x20run\x20the\x20recipient\x20'+'constraint\x20audit\x20before\x20publish.\x20Fixed\x20recipients\x20should\x20use\x20{who:{Entity:...}};\x20unbound\x20Signer\x20recipients\x20are\x20a\x20CRITICAL\x20theft\x20risk.\x20'+'MULTI-CALL\x20ALLOCATION:\x20an\x20allocation\x20can\x20be\x20executed\x20MULTIPLE\x20times\x20(no\x20consumed\x20flag\x20in\x20contract).\x20'+'Use\x20Amount\x20mode\x20(not\x20Surplus)\x20for\x20recurring\x20allocations\x20—\x20an\x20uncapped\x20Surplus\x20sweeps\x20the\x20entire\x20remaining\x20balance\x20on\x20first\x20run.\x20'+'For\x20monthly\x20payment\x20scenarios,\x20create\x20multiple\x20Allocators\x20with\x20time-based\x20Guards\x20+\x20Amount\x20mode\x20sharing\x20items.'),'order_allocators_append':AllocatorsSchema['optional']()['describe']('Append-only\x20correction\x20window\x20for\x20order_allocators\x20—\x20the\x20ONLY\x20allocator\x20mutation\x20allowed\x20AFTER\x20publish\x20(J1).\x20'+'REQUIREMENTS\x20(chain-enforced,\x20allocation\x20abort\x20code\x2020\x20EALLOCATORS_NOT_EXTENSION):\x20the\x20supplied\x20Allocators\x20must\x20be\x20a\x20pure\x20'+'EXTENSION\x20of\x20the\x20current\x20on-chain\x20plan\x20—\x20every\x20existing\x20allocator\x20appears\x20VERBATIM\x20as\x20a\x20prefix\x20(same\x20guard,\x20same\x20sharing,\x20'+'same\x20fix/max),\x20threshold\x20must\x20be\x20UNCHANGED;\x20only\x20description\x20may\x20change\x20freely.\x20New\x20allocators\x20are\x20appended\x20after\x20the\x20prefix.\x20'+'WHY:\x20rewriting\x20an\x20existing\x20allocator\x20or\x20changing\x20the\x20threshold\x20would\x20retroactively\x20alter\x20payout\x20rules\x20for\x20orders\x20already\x20'+'escrowed\x20against\x20the\x20old\x20plan.\x20Clearing\x20the\x20plan\x20(null)\x20is\x20NOT\x20possible\x20here\x20—\x20that\x20would\x20strand\x20in-flight\x20orders.\x20'+'Permission:\x20same\x20index\x20313\x20as\x20order_allocators.\x20'+'USE\x20CASE:\x20you\x20forgot\x20one\x20allocator\x20guard\x20(e.g.\x20the\x20refund\x20exit\x20for\x20a\x20review\x20node)\x20and\x20the\x20Service\x20is\x20already\x20published\x20—\x20'+'instead\x20of\x20abandoning\x20the\x20Service,\x20append\x20the\x20missing\x20allocator.\x20'+'⚠️\x20Appended\x20allocators\x20are\x20evaluated\x20AFTER\x20the\x20existing\x20ones\x20against\x20the\x20shrinking\x20pool\x20(vector\x20order),\x20so\x20they\x20see\x20the\x20'+'balance\x20left\x20by\x20earlier\x20allocators\x20—\x20design\x20appended\x20waterfall\x20tails\x20accordingly.\x20'+'⚠️\x20Once\x20appended,\x20an\x20allocator\x20can\x20NEVER\x20be\x20edited\x20or\x20removed\x20—\x20same\x20permanence\x20as\x20the\x20original\x20plan.'),'buy_guard':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Buy\x20guard\x20object\x20ID\x20or\x20name.'),'compensation_fund_add':CoinParamSchema['optional']()['describe']('Deposit\x20funds\x20into\x20the\x20Service\x20compensation_fund.\x20Used\x20to\x20pay\x20indemnity\x20when\x20arbitration\x20resolves\x20in\x20customer\x27s\x20favor.\x20'+'FORMAT:\x20{balance:\x20<amount_in_smallest_unit>}\x20—\x20the\x20field\x20name\x20is\x20\x27balance\x27\x20(NOT\x20\x27amount\x27).\x20'+'The\x20token\x20type\x20and\x20precision\x20are\x20determined\x20by\x20the\x20Service\x20object\x27s\x20type_parameter\x20(the\x20generic\x20type\x20set\x20when\x20the\x20Service\x20was\x20created).\x20'+'For\x20WOW\x20(9\x20decimals):\x20{balance:\x201000000000}\x20=\x201\x20WOW.\x20'+'For\x20tokens\x20with\x20different\x20decimals,\x20adjust\x20accordingly\x20(e.g.\x20USDC\x20has\x206\x20decimals,\x20so\x20{balance:\x201000000}\x20=\x201\x20USDC).\x20'+'REQUIRES:\x20Permission\x20index\x20315\x20(SERVICE_COMPENSATION_FUND_DEPOSIT)\x20must\x20be\x20granted\x20to\x20the\x20calling\x20account\x20first.\x20'+'COMMON\x20MISTAKE:\x20using\x20{amount:\x20...}\x20or\x20{amount:\x20...,\x20type:\x20\x27WOW\x27}\x20—\x20these\x20will\x20fail.\x20The\x20correct\x20field\x20is\x20\x27balance\x27.'),'compensation_fund_withdraw':z['object']({'receipt':AccountOrMark_AddressSchema['describe']('Receipt\x20address\x20that\x20will\x20receive\x20the\x20withdrawn\x20funds\x20(as\x20a\x20new\x20Payment\x20object)'),'payment_info':PaymentInfoSchema['describe']('Payment\x20info\x20for\x20the\x20new\x20Payment\x20object\x20created\x20to\x20hold\x20the\x20withdrawn\x20funds')})['strict']()['optional']()['describe']('Withdraw\x20ALL\x20funds\x20from\x20the\x20compensation_fund\x20to\x20a\x20new\x20Payment\x20object\x20owned\x20by\x20`receipt`.\x20'+'REQUIRES:\x20Service\x20must\x20be\x20paused\x20AND\x20setting_lock_duration\x20must\x20have\x20elapsed\x20since\x20pause\x20(the\x20unpublished-state\x20check).\x20'+'Withdraws\x20the\x20ENTIRE\x20compensation_fund\x20balance\x20via\x20balance::withdraw_all.\x20'+'DIFFERENT\x20from\x20the\x20order-side\x20compensation\x20claim\x20(for\x20arbitration-winning\x20users,\x20no\x20pause+lock\x20required).'),'setting_lock_duration_add':z['number']()['optional']()['describe']('Additional\x20lock\x20duration\x20to\x20ADD\x20to\x20\x27setting_lock_duration\x27\x20(Move\x20field\x20name).\x20'+'UNIT:\x20milliseconds\x20(ms).\x20Example:\x202592000000\x20=\x2030\x20days,\x207776000000\x20=\x2090\x20days,\x2086400000\x20=\x201\x20day.\x20'+'DEFAULT:\x202592000000\x20(30\x20days,\x20DEFAULT_LOCK_DURATION).\x20This\x20is\x20the\x20initial\x20value\x20when\x20a\x20Service\x20is\x20created.\x20'+'Behavior:\x20additive\x20(safe_add)\x20—\x20only\x20increases,\x20never\x20decreases.\x20'+'Can\x20be\x20called\x20BEFORE\x20or\x20AFTER\x20publish\x20(no\x20publish\x20check).\x20'+'Affects\x20the\x20waiting\x20time\x20required\x20by:\x20compensation_fund_withdraw,\x20arbitrations\x20remove/clear,\x20rewards\x20remove/clear\x20'+'(all\x20require\x20pause\x20+\x20setting_lock_duration\x20elapsed\x20since\x20pause).'),'compensation_fund_receive':ReceivedBalanceOrRecentlySchema['optional']()['describe']('Receive\x20order\x20compensation\x20funds\x20from\x20this\x20Service\x20object.'+RECEIVE_FORMAT_BLOCK_BALANCE),'owner_receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20and\x20other\x20objects\x20received\x20by\x20this\x20Service\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\x20—\x20the\x20Service\x27s\x20customer-service\x20channel.\x20'+'This\x20is\x20the\x20object\x20that\x20Messenger\x20routes\x20encrypted\x20messages\x20to\x20for\x20pre-order\x20negotiation,\x20'+'private-info\x20delivery\x20(see\x20customer_required),\x20and\x20post-sale\x20support.\x20'+'⚠️\x20REQUIRED\x20whenever\x20customer_required\x20is\x20set:\x20without\x20um,\x20the\x20customer\x27s\x20private\x20information\x20'+'has\x20no\x20channel\x20to\x20reach\x20the\x20merchant.'),'arb_statement':z['object']({'arb':NameOrAddressSchema['describe']('Arb\x20object\x20(case)\x20to\x20attach\x20the\x20statement\x20to.'),'order':NameOrAddressSchema['describe']('The\x20order\x20the\x20case\x20was\x20opened\x20against\x20—\x20must\x20belong\x20to\x20this\x20Service.'),'statement':z['string']()['max'](0xfa0)['describe']('Seller\x27s\x20text\x20statement\x20appended\x20to\x20the\x20case\x20record\x20(ArbStatementEvent).\x20'+'Event-only:\x20nothing\x20on\x20the\x20Arb\x20object\x20is\x20mutated;\x20the\x20record\x20cannot\x20be\x20rewritten\x20or\x20deleted.\x20'+'Use\x20to\x20declare\x20facts\x20or\x20report\x20the\x20customer\x27s\x20behavior\x20(e.g.\x20absence,\x20non-cooperation).\x20'+'PRIMARY\x20evidence\x20channel\x20is\x20Messenger\x20(encrypted\x20WTS\x20records\x20with\x20the\x20customer);\x20'+'this\x20is\x20the\x20SECONDARY\x20on-chain\x20declare/report\x20channel.')})['optional']()['describe']('Service\x20(defendant-side)\x20statement\x20on\x20an\x20arbitration\x20case\x20—\x20permission\x20index\x20321.\x20'+'Lets\x20the\x20Service\x20permission\x20holder\x20put\x20a\x20bounded\x20text\x20on\x20the\x20record\x20for\x20any\x20case\x20against\x20'+'an\x20order\x20of\x20this\x20service\x20WITHOUT\x20holding\x20the\x20order.\x20Callable\x20in\x20ANY\x20case\x20status.\x20'+'The\x20Arb\x27s\x20coin\x20type\x20is\x20derived\x20automatically\x20from\x20the\x20arb\x20object\x20on-chain.'),'pause':z['boolean']()['optional']()['describe']('Whether\x20to\x20pause\x20accepting\x20new\x20orders.'),'publish':z['boolean']()['optional']()['describe']('Whether\x20to\x20publish\x20the\x20Service.\x20After\x20publishing,\x20customers\x20can\x20place\x20orders.\x20'+'⚠️\x20PRE-PUBLISH\x20EVALUATION\x20(mandatory,\x20stop-node\x20fund-exit\x20coverage):\x20service.allocators\x20MUST\x20cover\x20EVERY\x20stop\x20node\x20of\x20the\x20bound\x20Machine\x20—\x20every\x20node\x20where\x20an\x20order\x20can\x20rest\x20(terminal\x20nodes\x20AND\x20waiting\x20states:\x20review\x20windows,\x20handovers,\x20open\x20disputes)\x20needs\x20BOTH\x20a\x20withdrawal\x20(release)\x20AND\x20a\x20refund\x20allocation\x20rule,\x20and\x20each\x20mapping\x20guard\x20must\x20be\x20satisfiable\x20in\x20BOTH\x20directions.\x20An\x20uncovered\x20stop\x20node\x20strands\x20escrowed\x20funds\x20permanently\x20(order_allocators\x20is\x20L1-immutable).\x20Review-gated\x20release\x20is\x20a\x20TIME\x20VARIANT\x20inside\x20ONE\x20exit\x20guard\x20(\x27reviewed\x20OR\x20unreviewed\x20after\x20T\x27),\x20never\x20parallel\x20outgoing\x20edges\x20(race\x20deadlock).\x20See\x20pattern.fund_flow_stop_node_coverage\x20+\x20rules\x20R-M5-03\x20/\x20R-M5-09.\x20'+'VERIFIED\x20against\x20Move\x20source\x20+\x20SDK\x20(4-level\x20immutability\x20matrix):\x0a'+'\x20\x20L1\x20—\x20PERMANENTLY\x20LOCKED\x20after\x20publish\x20(assert!(!bPublished),\x20no\x20pause+lock\x20exception):\x0a'+'\x20\x20\x20\x20•\x20machine\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(workflow\x20template)\x0a'+'\x20\x20\x20\x20•\x20order_allocators\x20(fund\x20distribution\x20rules\x20—\x20full\x20replacement\x20locked;\x20APPEND-ONLY\x20additions\x20'+'remain\x20possible\x20via\x20order_allocators_append,\x20prefix/threshold\x20frozen)\x0a'+'\x20\x20L2\x20—\x20TIME-LOCKED\x20after\x20publish\x20(unpublished-state\x20check\x20—\x20requires\x20pause\x20+\x20setting_lock_duration\x20elapsed):\x0a'+'\x20\x20\x20\x20•\x20arbitrations\x20remove/clear\x20(dispute\x20resolution\x20objects)\x0a'+'\x20\x20\x20\x20•\x20rewards\x20remove/clear\x20\x20\x20\x20\x20\x20\x20(reward\x20objects)\x0a'+'\x20\x20\x20\x20•\x20compensation_fund_withdraw\x20(withdraw\x20ALL\x20funds)\x0a'+'\x20\x20L3\x20—\x20REMAIN\x20MUTABLE\x20after\x20publish\x20(no\x20SDK\x20check,\x20no\x20Move\x20check):\x0a'+'\x20\x20\x20\x20•\x20arbitrations\x20add,\x20rewards\x20add\x20(no\x20assert\x20—\x20can\x20add\x20after\x20publish)\x0a'+'\x20\x20\x20\x20•\x20buy_guard,\x20sales,\x20discount,\x20description,\x20location,\x20pause,\x20repositories,\x0a'+'\x20\x20\x20\x20•\x20compensation_fund_add,\x20setting_lock_duration_add,\x20customer_required,\x20um\x20(Contact)\x0a'+'These\x202\x20L1-LOCKED\x20fields\x20(machine/order_allocators)\x20MUST\x20be\x20set\x20BEFORE\x20publish=true.\x0a'+'arbitrations/rewards\x20can\x20be\x20ADDED\x20after\x20publish\x20but\x20remove/clear\x20requires\x20pause+lock.\x0a'+'\x0a'+'⚠️\x20COMPENSATION_FUND\x20+\x20ARBITRATION\x20LINKAGE:\x0a'+'\x20\x20At\x20publish\x20time,\x20if\x20compensation_fund\x20>\x200,\x20Arbitration\x20MUST\x20be\x20bound:\x0a'+'\x20\x20\x20\x20if\x20(balance::value(&self.compensation_fund)\x20>\x200)\x20{\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20assert!(arbitration_count\x20>\x200,\x20E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND);\x0a'+'\x20\x20\x20\x20}\x0a'+'\x20\x20The\x20MCP\x20handler\x20enforces\x20this\x20as\x20a\x20HARD\x20PRE-CHECK:\x20if\x20publish=true\x20AND\x20compensation_fund_add\x20'+'\x20\x20is\x20set\x20in\x20the\x20same\x20call\x20AND\x20arbitrations\x20is\x20empty,\x20the\x20call\x20is\x20REJECTED\x20before\x20submission.\x20'+'\x20\x20If\x20compensation_fund\x20was\x20deposited\x20in\x20a\x20prior\x20call,\x20a\x20SOFT\x20WARNING\x20is\x20issued.\x0a'+'\x0a'+'SCHEMA-03\x20/\x20P0-01\x20fix\x20—\x20DEPLOYMENT\x20WORKFLOW\x20(two-phase,\x20avoids\x20circular\x20dependency):\x0a'+'\x20\x20Phase\x201\x20—\x20CREATE\x20(no\x20publish):\x20object={name:\x27my-service\x27,\x20type_parameter,\x20permission}\x20+\x20machine\x20+\x20order_allocators\x20+\x20arbitrations.\x0a'+'\x20\x20\x20\x20NOTE:\x20buy_guard\x20can\x20use\x20a\x20LocalMark\x20NAME\x20(not\x20address)\x20to\x20break\x20the\x20Guard→Service\x20circular\x20dependency.\x0a'+'\x20\x20\x20\x20The\x20name\x20is\x20resolved\x20to\x20an\x20address\x20at\x20transaction\x20build\x20time.\x0a'+'\x20\x20Phase\x202\x20—\x20PUBLISH:\x20object=\x27my-service\x27\x20(string\x20ref)\x20+\x20publish=true.\x0a'+'\x20\x20\x20\x20All\x20L1-LOCKED\x20fields\x20must\x20be\x20set\x20in\x20Phase\x201;\x20Phase\x202\x20only\x20flips\x20the\x20publish\x20flag.\x0a'+'\x20\x20Post-publish\x20updates:\x20buy_guard,\x20sales,\x20description,\x20repositories\x20(add),\x20rewards\x20(add),\x20arbitrations\x20(add),\x20etc.')})['strict']()['describe']('On-chain\x20Service\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Set\x20\x27object\x27\x20field\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20permission,\x20...}\x20to\x20create\x20a\x20Service.\x20NOTE:\x20\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(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 CallService_InputSchema=z['object']({'data':CallService_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{isValidAddress,ValueType as a376a,ObjectType as a376b,ENTRYPOINT,isValidWowAddress,isValidName,isValidDescription,MAX_DESCRIPTION_LENGTH,isValidLongName,MAX_LONG_NAME_LENGTH,MAX_NAME_LENGTH}from'@wowok/wowok';const isValidMoveIdentifier=a=>{if(a['length']===0x0)return![];const b=a[0x0];if(b==='_')return a['length']>0x1&&/^[a-zA-Z0-9_]+$/['test'](a['slice'](0x1));if(/^[a-zA-Z]$/['test'](b))return/^[a-zA-Z0-9_]*$/['test'](a['slice'](0x1));return![];};export const DescriptionSchema=z['string']()['trim']()['refine'](isValidDescription,{'message':'Description\x20string\x20(max\x20'+MAX_DESCRIPTION_LENGTH+'\x20bcs\x20characters)'})['describe']('Description\x20string\x20(max\x20'+MAX_DESCRIPTION_LENGTH+'\x20bcs\x20characters)');export const LongNameSchema=z['string']()['refine'](isValidLongName,{'message':'max\x20'+MAX_LONG_NAME_LENGTH+'\x20bcs\x20characters'});export const WowAddressSchema=z['string']()['refine'](isValidAddress,{'message':'Invalid\x20ID\x20format:\x20must\x20be\x20\x270x\x27\x20prefix\x20followed\x20by\x2064\x20hex\x20characters'})['describe']('Valid\x20ID:\x200x\x20prefix\x20+\x2064\x20hex\x20characters,\x20or\x20builtin\x20ID\x20(0x5-0x9,\x200xa,\x200xc,\x200xd,\x200x403,\x200xaaa,\x200xaab,\x200xacc)');const WOW_TOKEN_TYPE='0x2::wow::WOW',isValidTokenTypeAddress=a=>{if(!/^0x[0-9a-fA-F]{1,64}$/['test'](a))return![];return isValidWowAddress('0x'+a['slice'](0x2)['toLowerCase']()['padStart'](0x40,'0'));};export const TokenTypeSchema=z['string']()['refine'](a=>{const b=a['split']('::');if(b['length']!==0x3)return![];const [c,d,e]=b;if(!isValidTokenTypeAddress(c))return![];if(!isValidMoveIdentifier(d))return![];if(!isValidMoveIdentifier(e))return![];return!![];},{'message':'Invalid\x20token\x20type\x20format.\x20Expected:\x20{address}::{module}::{struct}\x20where\x20address\x20is\x20a\x20hex\x20ID\x20(short\x20builtin\x20like\x200x2/0xaaa\x20or\x20full\x200x+64hex),\x20module/struct\x20are\x20valid\x20Move\x20identifiers.\x20e.g.\x20\x270x2::wow::WOW\x27'})['describe']('Token\x20type\x20in\x20format:\x20{address}::{module}::{struct}.\x20e.g.\x20\x270x2::wow::WOW\x27\x20(WOW),\x20\x270x...::usdt::USDT\x27\x20(USDT),\x20\x270x...::eth::ETH\x27\x20(ETH).\x20To\x20discover\x20all\x20available\x20tokens\x20and\x20their\x20type\x20tags,\x20query\x20\x27mainnet\x20bridge\x20tokens\x27\x20via\x20wowok_buildin_info\x20and\x20use\x20the\x20returned\x20`wowTypeTag`\x20here.\x20NOTE:\x20testnet\x20has\x20ONLY\x20WOW\x20(no\x20stablecoins\x20are\x20bridged)\x20—\x20non-WOW\x20tokens\x20are\x20a\x20mainnet\x20capability;\x20the\x20token\x20is\x20fixed\x20at\x20object\x20creation\x20and\x20prices/orders\x20settle\x20in\x20it.');export const TokenTypeWithDefaultSchema=TokenTypeSchema['default'](WOW_TOKEN_TYPE)['describe']('Token\x20type\x20in\x20format:\x20{address}::{module}::{struct}.\x20Default:\x20\x270x2::wow::WOW\x27.\x20Other\x20examples:\x20\x270x...::usdt::USDT\x27\x20(USDT),\x20\x270x...::eth::ETH\x27\x20(ETH).\x20To\x20discover\x20all\x20available\x20tokens\x20and\x20their\x20type\x20tags,\x20query\x20\x27mainnet\x20bridge\x20tokens\x27\x20via\x20wowok_buildin_info\x20and\x20use\x20the\x20returned\x20`wowTypeTag`\x20here.\x20NOTE:\x20testnet\x20has\x20ONLY\x20WOW\x20(no\x20stablecoins\x20are\x20bridged)\x20—\x20non-WOW\x20tokens\x20are\x20a\x20mainnet\x20capability;\x20the\x20token\x20is\x20fixed\x20at\x20object\x20creation\x20and\x20prices/orders\x20settle\x20in\x20it.');export const NameSchema=z['string']()['refine'](isValidName,'Name\x20string\x20(max\x2064\x20bcs\x20characters,\x20must\x20not\x20start\x20with\x20\x270x\x27)');export const NotEmptyNameSchema=z['string']()['nonempty']()['refine'](isValidName,'Name\x20string\x20(at\x20least\x201\x20character,\x20max\x20length\x2064\x20bcs\x20characters)');export const NameOrAddressSchema=z['string']()['refine'](a=>{if(isValidAddress(a))return!![];if(isValidName(a))return!![];return![];},{'message':'Invalid\x20ID\x20format:\x20must\x20be\x20\x270x\x27\x20prefix,\x20or\x20a\x20builtin\x20ID\x20(0x5-0x9,\x200xa,\x200xc,\x200xd,\x200x403,\x200xaaa,\x200xaab,\x200xacc)'})['describe']('Account/Object\x20name\x20or\x20ID.\x20If\x20specifying\x20an\x20account,\x20use\x20empty\x20string\x20\x27\x27\x20for\x20the\x20default\x20account.\x20'+'If\x20it\x20starts\x20with\x20\x270x\x27,\x20it\x20will\x20be\x20treated\x20as\x20an\x20ID.\x20'+'Otherwise,\x20it\x20will\x20be\x20treated\x20as\x20a\x20name\x20(max\x2064\x20bcs\x20characters).');export const AccountOrMark_AddressSchema=z['object']({'name_or_address':NameOrAddressSchema['optional'](),'local_mark_first':z['boolean']()['optional']()['describe']('Whether\x20to\x20prioritize\x20local\x20marks,\x20if\x20true,\x20prioritize\x20local\x20marks,\x20otherwise\x20prioritize\x20global\x20marks')})['strict']()['describe']('Account\x20or\x20address\x20lookup\x20object.\x20Use\x20this\x20to\x20specify\x20which\x20account\x20to\x20use\x20for\x20an\x20operation.\x20'+'EXAMPLE:\x20{\x20name_or_address:\x20\x27testor2\x27\x20}\x20-\x20looks\x20up\x20account\x20by\x20name;\x20'+'EXAMPLE:\x20{\x20name_or_address:\x20\x270x1234...\x27\x20}\x20-\x20uses\x20address\x20directly;\x20'+'If\x20name_or_address\x20is\x20empty\x20string\x20\x27\x27,\x20uses\x20the\x20default\x20local\x20account.');export const ManyAccountOrMark_AddressSchema=z['object']({'entities':z['array'](AccountOrMark_AddressSchema),'check_all_founded':z['boolean']()['default'](!![])['describe']('Whether\x20to\x20check\x20all\x20entities\x20are\x20found.\x20Defaults\x20to\x20true:\x20abort\x20and\x20throw\x20if\x20ANY\x20entity\x20cannot\x20be\x20resolved.\x20Set\x20false\x20only\x20when\x20partial\x20resolution\x20is\x20explicitly\x20intended\x20(only\x20found\x20IDs\x20are\x20returned)')})['strict']()['describe']('Used\x20to\x20batch\x20find\x20account\x20or\x20object\x20IDs\x20by\x20name');export const AccountOrMark_AddressAISchema=z['union']([NameOrAddressSchema['transform'](a=>({'name_or_address':a,'local_mark_first':!![]}))['describe']('Account\x20name,\x20address\x20(0x...),\x20or\x20mark\x20name.\x20'+'When\x20using\x20string\x20format,\x20local\x20marks\x20are\x20searched\x20first.\x20'+'EXAMPLE:\x20\x27alice\x27\x20-\x20searches\x20local\x20marks\x20first,\x20then\x20global;\x20'+'EXAMPLE:\x20\x270x2...\x27\x20(64\x20hex\x20chars)\x20-\x20uses\x20address\x20directly;\x20'+'EXAMPLE:\x20\x27\x27\x20-\x20uses\x20the\x20default\x20local\x20account'),AccountOrMark_AddressSchema])['describe']('Account\x20or\x20address\x20lookup.\x20Can\x20be\x20a\x20simple\x20string\x20(recommended\x20for\x20AI)\x20'+'or\x20full\x20object\x20with\x20explicit\x20local_mark_first\x20control.\x20'+'String\x20form\x20auto-converts\x20to\x20{\x20name_or_address:\x20<string>,\x20local_mark_first:\x20true\x20}.');export const ManyAccountOrMark_AddressAISchema=z['union']([z['array'](NameOrAddressSchema)['transform'](a=>({'entities':a['map'](b=>({'name_or_address':b,'local_mark_first':!![]})),'check_all_founded':!![]}))['describe']('Array\x20of\x20account\x20names,\x20addresses,\x20or\x20mark\x20names.\x20'+'Local\x20marks\x20are\x20searched\x20first\x20for\x20each\x20entry.\x20'+'EXAMPLE:\x20[\x27alice\x27,\x20\x270x2...\x27,\x20\x27bob\x27]'),ManyAccountOrMark_AddressSchema])['describe']('Batch\x20account\x20or\x20address\x20lookup.\x20Can\x20be\x20an\x20array\x20of\x20strings\x20(recommended\x20for\x20AI)\x20'+'or\x20full\x20object\x20with\x20explicit\x20control.\x20'+'Array\x20form\x20auto-converts\x20to\x20{\x20entities:\x20[...],\x20check_all_founded:\x20true\x20}.');export const ObjectOwnerSchema=z['union']([z['object']({'AddressOwner':z['string']()['describe']('Address\x20owner')})['strict'](),z['object']({'ObjectOwner':z['string']()['describe']('Object\x20owner')})['strict'](),z['object']({'Shared':z['object']({'initial_shared_version':z['union']([z['string'](),z['number']()])['describe']('Version\x20when\x20object\x20became\x20shared')})['strict']()['describe']('Shared\x20object')})['strict'](),z['literal']('Immutable'),z['object']({'ConsensusAddressOwner':z['object']({'owner':z['string']()['describe']('Consensus\x20ID\x20owner'),'start_version':z['union']([z['string'](),z['number']()])['describe']('Version\x20when\x20object\x20recently\x20became\x20consensus\x20object')})['strict']()['describe']('Consensus\x20ID\x20owner')})['strict']()])['describe']('Object\x20owner');export const ValueTypeUserSchema=z['union']([z['literal'](a376a['Bool'])['describe']('Bool\x20(0)'),z['literal'](a376a['Address'])['describe']('Address\x20(1)'),z['literal'](a376a['String'])['describe']('String\x20(2)'),z['literal'](a376a['U8'])['describe']('U8\x20(3)'),z['literal'](a376a['U16'])['describe']('U16\x20(4)'),z['literal'](a376a['U32'])['describe']('U32\x20(5)'),z['literal'](a376a['U64'])['describe']('U64\x20(6)'),z['literal'](a376a['U128'])['describe']('U128\x20(7)'),z['literal'](a376a['U256'])['describe']('U256\x20(8)'),z['literal'](a376a['VecBool'])['describe']('VecBool\x20(9)'),z['literal'](a376a['VecAddress'])['describe']('VecAddress\x20(10)'),z['literal'](a376a['VecString'])['describe']('VecString\x20(11)'),z['literal'](a376a['VecU8'])['describe']('VecU8\x20(12)'),z['literal'](a376a['VecU16'])['describe']('VecU16\x20(13)'),z['literal'](a376a['VecU32'])['describe']('VecU32\x20(14)'),z['literal'](a376a['VecU64'])['describe']('VecU64\x20(15)'),z['literal'](a376a['VecU128'])['describe']('VecU128\x20(16)'),z['literal'](a376a['VecU256'])['describe']('VecU256\x20(17)'),z['literal'](a376a['VecVecU8'])['describe']('VecVecU8\x20(18)'),z['literal']('Bool')['describe']('Bool'),z['literal']('Address')['describe']('Address'),z['literal']('String')['describe']('String'),z['literal']('U8')['describe']('U8'),z['literal']('U16')['describe']('U16'),z['literal']('U32')['describe']('U32'),z['literal']('U64')['describe']('U64'),z['literal']('U128')['describe']('U128'),z['literal']('U256')['describe']('U256'),z['literal']('VecBool')['describe']('VecBool'),z['literal']('VecAddress')['describe']('VecAddress'),z['literal']('VecString')['describe']('VecString'),z['literal']('VecU8')['describe']('VecU8'),z['literal']('VecU16')['describe']('VecU16'),z['literal']('VecU32')['describe']('VecU32'),z['literal']('VecU64')['describe']('VecU64'),z['literal']('VecU128')['describe']('VecU128'),z['literal']('VecU256')['describe']('VecU256'),z['literal']('VecVecU8')['describe']('VecVecU8'),z['literal']('bool')['describe']('bool'),z['literal']('address')['describe']('address'),z['literal']('string')['describe']('string'),z['literal']('u8')['describe']('u8'),z['literal']('u16')['describe']('u16'),z['literal']('u32')['describe']('u32'),z['literal']('u64')['describe']('u64'),z['literal']('u128')['describe']('u128'),z['literal']('u256')['describe']('u256'),z['literal']('vecbool')['describe']('vecbool'),z['literal']('vecaddress')['describe']('vecaddress'),z['literal']('vecstring')['describe']('vecstring'),z['literal']('vecu8')['describe']('vecu8'),z['literal']('vecu16')['describe']('vecu16'),z['literal']('vecu32')['describe']('vecu32'),z['literal']('vecu64')['describe']('vecu64'),z['literal']('vecu128')['describe']('vecu128'),z['literal']('vecu256')['describe']('vecu256'),z['literal']('vecvecu8')['describe']('vecvecu8')])['describe']('User\x20available\x20value\x20type\x20(number\x20or\x20string,\x20e.g.,\x206\x20or\x20\x27U64\x27\x20or\x20\x27u64\x27)');export const ValueTypeSchema=ValueTypeUserSchema['or'](z['literal'](a376a['Value'])['describe']('Value\x20(19)'))['or'](z['literal']('Value')['describe']('Value'))['describe']('Value\x20type\x20(number\x20or\x20string,\x20e.g.,\x206\x20or\x20\x27U64\x27)');export const ObjectTypeSchema=z['enum']([a376b['Permission'],a376b['Repository'],a376b['Arb'],a376b['Arbitration'],a376b['Service'],a376b['Machine'],a376b['Order'],a376b['Progress'],a376b['Payment'],a376b['Treasury'],a376b['Guard'],a376b['Demand'],a376b['Passport'],a376b['Allocation'],a376b['Resource'],a376b['Reward'],a376b['Discount'],a376b['EntityRegistrar'],a376b['EntityLinker'],a376b['Proof'],a376b['WReceivedObject'],a376b['Contact'],a376b['TableItem_ProgressHistory'],a376b['TableItem_PermissionPerm'],a376b['TableItem_DemandPresenter'],a376b['TableItem_MachineNode'],a376b['TableItem_TreasuryHistory'],a376b['TableItem_RepositoryData'],a376b['TableItem_RewardRecord'],a376b['TableItem_EntityLinker'],a376b['TableItem_AddressMark'],a376b['TableItem_EntityRegistrar']])['describe']('Wowok\x20object\x20type');export const BalanceTypeSchema=z['union']([z['number'](),z['string']()])['refine'](a=>{if(typeof a==='number')return Number['isSafeInteger'](a)&&a>=0x0;const b=a['trim']();if(/^\d+$/['test'](b))return!![];return/^(\d+(?:\.\d+)?)\s*([A-Za-z][A-Za-z0-9]*)$/['test'](b);},'Invalid\x20amount:\x20bare\x20decimal\x20values\x20without\x20a\x20token\x20symbol\x20(e.g.\x20\x222.5\x22,\x20\x220.1\x22)\x20are\x20rejected.\x20'+'Use\x20a\x20smallest-unit\x20non-negative\x20integer\x20string\x20(e.g.\x20\x222500000000\x22),\x20a\x20non-negative\x20safe-integer\x20number,\x20'+'or\x20a\x20display\x20string\x20with\x20the\x20token\x20symbol\x20(e.g.\x20\x222.5WOW\x22)\x20so\x20the\x20Fund\x20Processing\x20Layer\x20can\x20convert\x20it.')['describe']('A\x20coin/balance\x20amount.\x20Accepts\x20three\x20formats:\x20'+'(1)\x20DISPLAY\x20FORMAT\x20with\x20token\x20symbol:\x20\x222.5WOW\x22,\x20\x2210USDC\x22,\x20\x220.05WOW\x22\x20—\x20'+'auto-converted\x20to\x20smallest\x20units\x20via\x20the\x20Fund\x20Processing\x20Layer\x20(token\x20precision\x20resolved\x20'+'from\x20official\x20registry\x20→\x20cache\x20→\x20on-chain).\x20The\x20symbol\x20MUST\x20match\x20the\x20token\x27s\x20type_parameter.\x20'+'(2)\x20SMALLEST\x20UNIT\x20(numeric\x20string):\x20\x2210000000000\x22\x20—\x20used\x20as-is,\x20no\x20conversion.\x20'+'(3)\x20SMALLEST\x20UNIT\x20(number):\x2010000000000\x20—\x20used\x20as-is\x20only\x20within\x20the\x20safe\x20integer\x20range\x20(±2^53);\x20numbers\x20outside\x20it\x20are\x20REJECTED,\x20use\x20a\x20numeric\x20string\x20instead.\x20'+'PRECISION\x20RULE:\x20for\x20values\x20exceeding\x202^53\x20(9007199254740991),\x20ALWAYS\x20use\x20format\x20(1)\x20or\x20(2)\x20—\x20JS\x20numbers\x20lose\x20integer\x20precision\x20silently\x20and\x20such\x20inputs\x20are\x20blocked.\x20'+'Raw\x20amounts\x20must\x20be\x20plain\x20non-negative\x20integers;\x20a\x20decimal\x20value\x20without\x20a\x20token\x20symbol\x20(e.g.\x20\x222.5\x22)\x20is\x20rejected\x20—\x20append\x20the\x20symbol\x20(\x222.5WOW\x22)\x20so\x20the\x20Fund\x20Processing\x20Layer\x20converts\x20it.\x20'+'WARNING\x20—\x20BARE\x20INTEGER\x20MEANS\x20SMALLEST\x20UNIT,\x20NOT\x20TOKENS:\x20formats\x20(2)/(3)\x20are\x20NEVER\x20interpreted\x20as\x20display\x20tokens.\x20'+'For\x20example\x20amount=\x225\x22\x20or\x205\x20means\x205\x20raw\x20units\x20=\x200.000000005\x20WOW\x20(9\x20decimals)\x20—\x20NOT\x205\x20WOW.\x20'+'When\x20the\x20user\x20asks\x20for\x20a\x20token\x20amount,\x20you\x20MUST\x20use\x20display\x20format\x20(\x225WOW\x22,\x20\x222USDC\x22);\x20a\x20bare\x20integer\x20is\x20only\x20correct\x20for\x20unitless\x20counts\x20(e.g.\x20stock\x20quantity)\x20or\x20when\x20you\x20computed\x20exact\x20raw\x20units\x20yourself.\x20'+'Default\x20token:\x20WOW\x20(9\x20decimals,\x201\x20WOW\x20=\x2010^9\x20MIST).\x20'+'For\x20custom\x20tokens:\x20use\x20display\x20format\x20with\x20the\x20token\x27s\x20symbol,\x20or\x20pass\x20smallest\x20units\x20directly.\x20'+'MONEY\x20CONFIRMATION:\x20all\x20monetary\x20fields\x20trigger\x20user\x20confirmation\x20via\x20the\x20Fund\x20Processing\x20Layer,\x20where\x20the\x20token\x27s\x20FULL\x20type,\x20decimals\x20and\x20raw\x20amount\x20are\x20always\x20visible.\x20'+'MULTIPLE\x20ISSUERS:\x20several\x20on-chain\x20tokens\x20may\x20legally\x20share\x20the\x20same\x20symbol\x20(e.g.\x20multiple\x20\x22USDT\x22\x20coins).\x20When\x20a\x20bare\x20symbol\x20matches\x20more\x20than\x20one\x20token,\x20the\x20operation\x20is\x20BLOCKED\x20and\x20every\x20candidate\x20is\x20listed\x20with\x20full\x20details\x20(type,\x20name,\x20decimals,\x20verified\x20tag)\x20—\x20present\x20the\x20list\x20to\x20the\x20USER\x20and\x20let\x20them\x20choose\x20(they\x20may\x20answer\x20by\x20number),\x20then\x20re-issue\x20with\x20the\x20chosen\x20token\x27s\x20FULL\x20type\x20string\x20in\x20type_parameter;\x20never\x20guess\x20an\x20issuer\x20from\x20the\x20bare\x20symbol.\x20'+'MISSING\x20TOKEN\x20INFO:\x20when\x20a\x20token\x27s\x20precision\x20cannot\x20be\x20resolved,\x20the\x20operation\x20is\x20REFUSED\x20(raw\x20u64\x20included\x20—\x20amount\x20magnitude\x20could\x20not\x20be\x20verified).\x20Recovery:\x20provide\x20the\x20token\x27s\x20FULL\x20type\x20in\x20package::module::Name\x20form\x20in\x20type_parameter\x20(a\x20bare\x20symbol\x20like\x20\x22USDT\x22\x20cannot\x20be\x20resolved),\x20and\x20verify\x20the\x20WOW\x20network\x20is\x20correct.\x20'+'Examples:\x20\x222.5WOW\x22\x20(display\x20→\x202500000000),\x2010000000000\x20(number,\x20smallest\x20unit),\x20\x2250000000000\x22\x20(string,\x20smallest\x20unit).\x20'+'Used\x20for:\x20service\x20sale\x20prices,\x20compensation\x20fund\x20balances,\x20Treasury\x20deposits,\x20arbitration\x20fees,\x20reward\x20amounts,\x20stock\x20quantities.');export const QueryIdSchema=z['number']()['int']()['min'](0x0)['describe']('Query\x20ID');export const CacheExpireTypeSchema=z['union']([z['number'](),z['literal']('INFINITE')])['describe']('Cache\x20expiration\x20time\x20type');export const ValueContainerSchema=z['lazy'](()=>z['object']({'valueType':ValueTypeSchema['describe']('Value\x20type'),'value':SupportedValueSchema['describe']('Value')})['strict']()['describe']('Value\x20container\x20with\x20type\x20and\x20value'));export const SupportedValueUserSchema=z['union']([z['boolean'](),z['union']([AccountOrMark_AddressSchema,z['string']()]),z['string'](),z['number'](),z['array'](z['boolean']()),z['union']([ManyAccountOrMark_AddressSchema,z['array'](z['string']())]),z['array'](z['string']()),z['array'](z['number']()),z['array'](z['array'](z['number']()))])['describe']('User\x20available\x20supported\x20value\x20type');export const SupportedValueSchema=SupportedValueUserSchema['or'](ValueContainerSchema)['describe']('Supported\x20value\x20type');export const GuardIdentifierSchema=z['number']()['int']()['min'](0x0)['max'](0xff)['describe']('Identifier\x20(0-255)\x20for\x20data\x20lookup\x20in\x20Guard\x20table.');export const GuardTableItemBaseSchema=z['object']({'identifier':GuardIdentifierSchema,'b_submission':z['boolean']()['describe']('Whether\x20this\x20table\x20item\x27s\x20value\x20is\x20submitted\x20dynamically\x20at\x20Guard\x20trigger\x20time\x20(alloc_by_guard\x20call).\x20'+'\x0a\x0a'+'true\x20=\x20value\x20is\x20submitted\x20by\x20the\x20caller\x20when\x20triggering\x20the\x20Guard.\x20'+'Use\x20for\x20runtime-context-dependent\x20values\x20like\x20order\x20address,\x20user\x20address.\x20'+'The\x20\x27value\x27\x20field\x20is\x20ignored\x20when\x20b_submission=true;\x20the\x20caller\x20must\x20provide\x20it\x20via\x20submissions[].\x20'+'\x0a\x0a'+'false\x20=\x20value\x20is\x20static,\x20set\x20at\x20Guard\x20creation\x20time.\x20'+'Use\x20for\x20values\x20known\x20when\x20the\x20Guard\x20is\x20created:\x20expected\x20node\x20names,\x20expected\x20merchant\x20address,\x20expected\x20service\x20address.\x20'+'The\x20\x27value\x27\x20field\x20must\x20be\x20populated\x20and\x20will\x20be\x20stored\x20on-chain\x20permanently.\x20'+'\x0a\x0a'+'Rule\x20of\x20thumb:\x20if\x20the\x20value\x20is\x20the\x20SAME\x20for\x20all\x20future\x20Guard\x20triggers,\x20use\x20false.\x20'+'If\x20the\x20value\x20DIFFERS\x20per\x20trigger\x20(e.g.,\x20which\x20order\x20to\x20release\x20funds\x20for),\x20use\x20true.'),'value_type':ValueTypeUserSchema['describe']('Type\x20of\x20the\x20value\x20stored\x20in\x20`value`.\x20One\x20of:\x20Bool(0),\x20Address(1),\x20String(2),\x20U8(3),\x20U16(4),\x20U32(5),\x20U64(6),\x20U128(7),\x20U256(8),\x20VecBool(9),\x20VecAddress(10),\x20VecString(11),\x20VecU8(12),\x20VecU16(13),\x20VecU32(14),\x20VecU64(15),\x20VecU128(16),\x20VecU256(17),\x20VecVecU8(18).\x20'+'When\x20value_type=Address\x20(1),\x20the\x20`value`\x20field\x20accepts\x20a\x20hex\x20address\x20string,\x20a\x20LocalMark\x20name,\x20or\x20an\x20AccountOrMark_Address\x20object\x20—\x20see\x20`value`\x20field\x20description\x20for\x20details.'),'value':SupportedValueUserSchema['optional']()['describe']('The\x20actual\x20value\x20data.\x20Format\x20depends\x20on\x20`value_type`:\x0a'+'•\x20Bool:\x20true/false\x20(boolean)\x0a'+'•\x20Address\x20(CRITICAL\x20—\x20string\x20\x27Address\x27\x20is\x20NOT\x20a\x20placeholder):\x20a\x20hex\x20address\x20(e.g.\x20\x270x1234...\x27),\x20a\x20LocalMark\x20name\x20(e.g.\x20\x27my-service\x27\x20—\x20resolved\x20to\x20address\x20at\x20evaluation\x20time),\x20an\x20AccountOrMark_Address\x20object\x20(e.g.\x20{name_or_address:\x27my-service\x27}),\x20or\x20system\x20shorthand\x20(\x270xaaa\x27\x20=\x20EntityLinker,\x20\x270xaab\x27\x20=\x20EntityRegistrar).\x20The\x20literal\x20string\x20\x27Address\x27\x20itself\x20is\x20INVALID\x20—\x20it\x20would\x20be\x20treated\x20as\x20a\x20non-existent\x20LocalMark\x20name\x20and\x20fail.\x20Example:\x20value=\x270x2::wow::WOW<address>\x27\x20or\x20value=\x27my-permission\x27.\x0a'+'•\x20String:\x20any\x20string\x0a'+'•\x20U8/U16/U32/U64/U128/U256:\x20number\x20or\x20numeric\x20string\x20(e.g.\x2042\x20or\x20\x2742\x27)\x0a'+'•\x20Vec*\x20types:\x20arrays\x20of\x20the\x20corresponding\x20element\x20type\x0a'+'REQUIRED\x20when\x20b_submission=false.\x20OPTIONAL\x20when\x20b_submission=true\x20(value\x20is\x20supplied\x20at\x20evaluation\x20time\x20by\x20user\x20submission).'),'name':z['string']()['default']('')['refine'](a=>{if(a['length']===0x0)return!![];if(new TextEncoder()['encode'](a)['length']>MAX_NAME_LENGTH)return![];return!a['toLowerCase']()['startsWith']('0x');},{'message':'Name\x20must\x20be\x20at\x20most\x20'+MAX_NAME_LENGTH+'\x20BCS\x20characters\x20(UTF-8\x20bytes)\x20and\x20must\x20not\x20start\x20with\x20\x270x\x27.\x20Use\x20a\x20short\x20identifier\x20(e.g.\x20\x27order_id\x27,\x20\x27delivery_node\x27);\x20put\x20longer\x20explanations\x20in\x20the\x20Guard\x27s\x20\x27description\x27\x20field'})['describe']('Data\x20name\x20identifier.\x20MAX\x2064\x20BCS\x20characters\x20(Chinese\x20chars\x20count\x20as\x203-4\x20BCS\x20bytes\x20each).\x20'+'Use\x20short\x20identifiers\x20like\x20\x27order_id\x27,\x20\x27delivery_node\x27.\x20'+'Put\x20longer\x20descriptions\x20in\x20the\x20Guard\x27s\x20\x27description\x27\x20field,\x20NOT\x20here.')})['strict']()['describe']('Guard\x20table\x20item\x20(INPUT/CREATION\x20form).\x20DO\x20NOT\x20include\x20`object_type`\x20field\x20—\x20it\x20is\x20query-output\x20only\x20and\x20will\x20be\x20rejected\x20here.');export const GuardTableItemSchema=GuardTableItemBaseSchema['extend']({'object_type':ObjectTypeSchema['optional']()['describe']('OUTPUT-ONLY\x20(query\x20side):\x20Object\x20type\x20when\x20value_type\x20is\x20Address\x20and\x20represents\x20a\x20specific\x20object.\x20Auto-derived\x20by\x20the\x20system\x20—\x20DO\x20NOT\x20set\x20this\x20field\x20at\x20Guard\x20creation.')})['strict']()['describe']('Guard\x20table\x20item\x20(QUERY/OUTPUT\x20form\x20—\x20includes\x20auto-derived\x20object_type\x20field)');export const EntrypointSchema=z['enum']([ENTRYPOINT['Localnet'],ENTRYPOINT['Testnet'],ENTRYPOINT['Mainnet']])['describe']('Network\x20entrypoint:\x20Specifies\x20which\x20network\x20the\x20operation\x20occurs\x20on.\x20'+'FIX-010\x20cross-network\x20note:\x20LocalMark\x20names\x20are\x20scoped\x20per\x20network\x20(testnet\x20marks\x20are\x20invisible\x20on\x20mainnet\x20and\x20vice\x20versa).\x20'+'When\x20migrating\x20from\x20testnet\x20to\x20mainnet,\x20recreate\x20all\x20objects\x20on\x20mainnet\x20and\x20re-register\x20LocalMark\x20names\x20with\x20the\x20SAME\x20names\x20'+'to\x20keep\x20name-based\x20references\x20working\x20across\x20networks.\x20Recreate\x20all\x20objects\x20on\x20the\x20target\x20network\x20'+'via\x20onchain_operations\x20with\x20env.network=target_network,\x20then\x20re-register\x20the\x20LocalMark\x20names.');export const FaucetNetworkSchema=z['enum']([ENTRYPOINT['Localnet'],ENTRYPOINT['Testnet']])['describe']('Network\x20entrypoint\x20for\x20Faucet:\x20Specifies\x20which\x20network\x20the\x20operation\x20occurs\x20on');export const ObjectBaseSchema=z['object']({'object':z['string']()['describe']('Object\x20ID'),'type':ObjectTypeSchema['optional']()['describe']('Object\x20type'),'type_raw':z['string']()['optional']()['describe']('Raw\x20object\x20type'),'owner':z['union']([ObjectOwnerSchema,z['null']()])['optional']()['describe']('Object\x20owner'),'version':z['union']([z['string'](),z['number']()])['optional']()['describe']('Object\x20version'),'previousTransaction':z['string']()['optional']()['describe']('Previous\x20transaction\x20ID'),'cache_expire':CacheExpireTypeSchema['optional']()['describe']('Cache\x20expiration\x20time'),'query_name':z['string']()['optional']()['describe']('Original\x20query\x20name\x20or\x20address\x20used\x20to\x20retrieve\x20this\x20object'),'content_raw':z['any']()['optional']()['describe']('Raw\x20content\x20data\x20for\x20unknown\x20object\x20types'),'_guard_node_comments':z['array'](z['object']({'type':z['string'](),'description':z['string']()}))['optional']()['describe']('Additional\x20comments\x20for\x20Guard\x20node\x20instructions')})['passthrough']()['describe']('Object\x20base\x20information');export const QueryEnvSchema=z['object']({'no_cache':z['boolean']()['optional']()['describe']('Whether\x20to\x20disable\x20cache'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20environment\x20parameters');export const ReceivedBalanceObjectSchema=z['object']({'id':z['string']()['describe']('Received\x20CoinWrapper\x20object\x20ID'),'balance':BalanceTypeSchema,'payment':z['string']()['describe']('Payment\x20object\x20ID'),'type':z['string']()['optional']()['describe']('Type\x20of\x20the\x20received\x20object\x20(or\x20inner\x20coin\x20type);\x20used\x20for\x20token_type\x20detection'),'version':z['string']()['optional']()['describe']('Object\x20version,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive'),'digest':z['string']()['optional']()['describe']('Object\x20digest,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive')})['strict']()['describe']('Received\x20CoinWrapper\x20object\x20record');export const CoinWrapperTokenTypeSchema=z['string']()['refine'](a=>{const b=a['match'](/^CoinWrapper<(.+)>$/),c=b?b[0x1]:a,d=c['split']('::');if(d['length']!==0x3)return![];const [e,f,g]=d;if(!isValidTokenTypeAddress(e))return![];if(!isValidMoveIdentifier(f))return![];if(!isValidMoveIdentifier(g))return![];return!![];},{'message':'Invalid\x20token\x20type\x20format.\x20Expected:\x20CoinWrapper<{address}::{module}::{struct}>\x20or\x20{address}::{module}::{struct}.\x20Example:\x20CoinWrapper<0x2::wow::WOW>\x20or\x200x2::wow::WOW'})['describe']('Token\x20type\x20in\x20format:\x20CoinWrapper<{address}::{module}::{struct}>\x20or\x20{address}::{module}::{struct}.\x20Example:\x20CoinWrapper<0x2::wow::WOW>');export const ReceivedBalanceSchema=z['object']({'balance':BalanceTypeSchema,'token_type':CoinWrapperTokenTypeSchema['describe']('Asset\x20type\x20of\x20Coin\x20objects.\x20Supports\x20CoinWrapper<...>\x20format\x20for\x20order\x20receive\x20operations.'),'received':z['array'](ReceivedBalanceObjectSchema)['describe']('Received\x20records\x20of\x20Coin\x20objects')})['strict']()['describe']('Received\x20record\x20of\x20Coin\x20objects');export const ReceivedBalanceOrRecentlySchema=z['union']([ReceivedBalanceSchema,z['literal']('recently')])['describe']('Specified\x20received\x20balance\x20record\x20or\x20all\x20recently\x20received\x20balance\x20record');export const ReceivedNormalSchema=z['object']({'id':z['string']()['nonempty']()['describe']('Received\x20object\x20ID'),'type':z['string']()['nonempty']()['describe']('Object\x20type'),'content_raw':z['any']()['optional']()['describe']('Raw\x20content\x20data'),'version':z['string']()['optional']()['describe']('Object\x20version,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive'),'digest':z['string']()['optional']()['describe']('Object\x20digest,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive')})['strict']()['describe']('Received\x20normal\x20object\x20record');export const ReceivedObjectsOrRecentlySchema=z['union']([z['array'](ReceivedNormalSchema),ReceivedBalanceSchema,z['literal']('recently')])['describe']('Specified\x20received\x20object\x20records\x20or\x20all\x20recently\x20received\x20object\x20records');export const RECEIVE_FORMAT_BLOCK_OBJECTS='\x0a\x0aACCEPTED\x20FORMATS\x20(F-06\x20unified\x20receive\x20operation\x20block):\x0a'+'•\x20\x27recently\x27\x20(string\x20literal)\x20—\x20auto-query\x20and\x20receive\x20ALL\x20recently\x20received\x20objects.\x0a'+'\x20\x20Use\x20this\x20for\x20the\x20common\x20case:\x20\x22withdraw\x20everything\x20the\x20object\x20has\x20received.\x22\x0a'+'\x20\x20Example:\x20receive:\x20\x27recently\x27\x0a'+'•\x20ReceivedNormal[]\x20(array)\x20—\x20explicit\x20list\x20of\x20received\x20objects\x20to\x20unwrap.\x0a'+'\x20\x20Use\x20this\x20when\x20you\x20want\x20to\x20receive\x20specific\x20objects\x20only\x20(not\x20all).\x0a'+'\x20\x20Example:\x20receive:\x20[{id:\x20\x270xobj1\x27,\x20type:\x20\x270x2::coin::Coin<0x2::wow::WOW>\x27}]\x0a'+'•\x20ReceivedBalance\x20({token_type,\x20balance,\x20received:\x20[{id,\x20balance,\x20payment}]})\x20—\x0a'+'\x20\x20receive\x20a\x20balance\x20record\x20from\x20a\x20specific\x20Payment/payer.\x0a'+'\x20\x20Use\x20this\x20for\x20precise\x20balance\x20targeting\x20(advanced\x20—\x20usually\x20after\x20querying\x0a'+'\x20\x20the\x20object\x27s\x20received\x20history\x20via\x20query_received).\x0a'+'\x20\x20Example:\x20receive:\x20{token_type:\x20\x270x2::wow::WOW\x27,\x20balance:\x201000000,\x20received:\x20[{id:\x20\x270xrec1\x27,\x20balance:\x201000000,\x20payment:\x20\x270xpay1\x27}]}\x0a'+'ANTI-PATTERN:\x20do\x20NOT\x20wrap\x20in\x20{result:\x20...}\x20—\x20pass\x20the\x20value\x20directly.';export const RECEIVE_FORMAT_BLOCK_BALANCE='\x0a\x0aACCEPTED\x20FORMATS\x20(F-06\x20unified\x20receive\x20operation\x20block):\x0a'+'•\x20\x27recently\x27\x20(string\x20literal)\x20—\x20auto-query\x20and\x20receive\x20ALL\x20recently\x20received\x20balance.\x0a'+'\x20\x20Use\x20this\x20for\x20the\x20common\x20case:\x20\x22deposit\x20all\x20recently\x20received\x20coins\x20into\x20pending\x20balance.\x22\x0a'+'\x20\x20Example:\x20receive:\x20\x27recently\x27\x0a'+'•\x20ReceivedBalance\x20({token_type,\x20balance,\x20received:\x20[{id,\x20balance,\x20payment}]})\x20—\x0a'+'\x20\x20receive\x20a\x20specific\x20balance\x20record\x20from\x20a\x20Payment/payer.\x0a'+'\x20\x20Use\x20this\x20when\x20targeting\x20a\x20specific\x20received\x20balance\x20(advanced).\x0a'+'\x20\x20Example:\x20receive:\x20{token_type:\x20\x270x2::wow::WOW\x27,\x20balance:\x201000000,\x20received:\x20[{id:\x20\x270xrec1\x27,\x20balance:\x201000000,\x20payment:\x20\x270xpay1\x27}]}\x0a'+'ANTI-PATTERN:\x20do\x20NOT\x20wrap\x20in\x20{result:\x20...}\x20—\x20pass\x20the\x20value\x20directly.';export const QueryReceivedResultSchema=z['object']({'result':z['union']([ReceivedBalanceSchema,z['array'](ReceivedNormalSchema)])['describe']('Received\x20CoinWrapper\x20object\x20record\x20or\x20received\x20other\x20objects\x20array')})['strict']()['describe']('Query\x20received\x20result');
|
|
1
|
+
import{z}from'zod';import{isValidAddress,ValueType as a391a,ObjectType as a391b,ENTRYPOINT,isValidWowAddress,isValidName,isValidDescription,MAX_DESCRIPTION_LENGTH,isValidLongName,MAX_LONG_NAME_LENGTH,MAX_NAME_LENGTH,MAX_USER_IDENTIFIER}from'@wowok/wowok';const isValidMoveIdentifier=a=>{if(a['length']===0x0)return![];const b=a[0x0];if(b==='_')return a['length']>0x1&&/^[a-zA-Z0-9_]+$/['test'](a['slice'](0x1));if(/^[a-zA-Z]$/['test'](b))return/^[a-zA-Z0-9_]*$/['test'](a['slice'](0x1));return![];};export const DescriptionSchema=z['string']()['trim']()['refine'](isValidDescription,{'message':'Description\x20string\x20(max\x20'+MAX_DESCRIPTION_LENGTH+'\x20bcs\x20characters)'})['describe']('Description\x20string\x20(max\x20'+MAX_DESCRIPTION_LENGTH+'\x20bcs\x20characters)');export const LongNameSchema=z['string']()['refine'](isValidLongName,{'message':'max\x20'+MAX_LONG_NAME_LENGTH+'\x20bcs\x20characters'});export const WowAddressSchema=z['string']()['refine'](isValidAddress,{'message':'Invalid\x20ID\x20format:\x20must\x20be\x20\x270x\x27\x20prefix\x20followed\x20by\x2064\x20hex\x20characters'})['describe']('Valid\x20ID:\x200x\x20prefix\x20+\x2064\x20hex\x20characters,\x20or\x20builtin\x20ID\x20(0x5-0x9,\x200xa,\x200xc,\x200xd,\x200x403,\x200xaaa,\x200xaab,\x200xacc)');const WOW_TOKEN_TYPE='0x2::wow::WOW',isValidTokenTypeAddress=a=>{if(!/^0x[0-9a-fA-F]{1,64}$/['test'](a))return![];return isValidWowAddress('0x'+a['slice'](0x2)['toLowerCase']()['padStart'](0x40,'0'));};export const TokenTypeSchema=z['string']()['refine'](a=>{const b=a['split']('::');if(b['length']!==0x3)return![];const [c,d,e]=b;if(!isValidTokenTypeAddress(c))return![];if(!isValidMoveIdentifier(d))return![];if(!isValidMoveIdentifier(e))return![];return!![];},{'message':'Invalid\x20token\x20type\x20format.\x20Expected:\x20{address}::{module}::{struct}\x20where\x20address\x20is\x20a\x20hex\x20ID\x20(short\x20builtin\x20like\x200x2/0xaaa\x20or\x20full\x200x+64hex),\x20module/struct\x20are\x20valid\x20Move\x20identifiers.\x20e.g.\x20\x270x2::wow::WOW\x27'})['describe']('Token\x20type\x20in\x20format:\x20{address}::{module}::{struct}.\x20e.g.\x20\x270x2::wow::WOW\x27\x20(WOW),\x20\x270x...::usdt::USDT\x27\x20(USDT),\x20\x270x...::eth::ETH\x27\x20(ETH).\x20To\x20discover\x20all\x20available\x20tokens\x20and\x20their\x20type\x20tags,\x20query\x20\x27mainnet\x20bridge\x20tokens\x27\x20via\x20wowok_buildin_info\x20and\x20use\x20the\x20returned\x20`wowTypeTag`\x20here.\x20NOTE:\x20testnet\x20has\x20ONLY\x20WOW\x20(no\x20stablecoins\x20are\x20bridged)\x20—\x20non-WOW\x20tokens\x20are\x20a\x20mainnet\x20capability;\x20the\x20token\x20is\x20fixed\x20at\x20object\x20creation\x20and\x20prices/orders\x20settle\x20in\x20it.');export const TokenTypeWithDefaultSchema=TokenTypeSchema['default'](WOW_TOKEN_TYPE)['describe']('Token\x20type\x20in\x20format:\x20{address}::{module}::{struct}.\x20Default:\x20\x270x2::wow::WOW\x27.\x20Other\x20examples:\x20\x270x...::usdt::USDT\x27\x20(USDT),\x20\x270x...::eth::ETH\x27\x20(ETH).\x20To\x20discover\x20all\x20available\x20tokens\x20and\x20their\x20type\x20tags,\x20query\x20\x27mainnet\x20bridge\x20tokens\x27\x20via\x20wowok_buildin_info\x20and\x20use\x20the\x20returned\x20`wowTypeTag`\x20here.\x20NOTE:\x20testnet\x20has\x20ONLY\x20WOW\x20(no\x20stablecoins\x20are\x20bridged)\x20—\x20non-WOW\x20tokens\x20are\x20a\x20mainnet\x20capability;\x20the\x20token\x20is\x20fixed\x20at\x20object\x20creation\x20and\x20prices/orders\x20settle\x20in\x20it.');export const NameSchema=z['string']()['refine'](isValidName,'Name\x20string\x20(max\x2064\x20bcs\x20characters,\x20must\x20not\x20start\x20with\x20\x270x\x27)');export const NotEmptyNameSchema=z['string']()['nonempty']()['refine'](isValidName,'Name\x20string\x20(at\x20least\x201\x20character,\x20max\x20length\x2064\x20bcs\x20characters)');export const NameOrAddressSchema=z['string']()['refine'](a=>{if(isValidAddress(a))return!![];if(isValidName(a))return!![];return![];},{'message':'Invalid\x20ID\x20format:\x20must\x20be\x20\x270x\x27\x20prefix,\x20or\x20a\x20builtin\x20ID\x20(0x5-0x9,\x200xa,\x200xc,\x200xd,\x200x403,\x200xaaa,\x200xaab,\x200xacc)'})['describe']('Account/Object\x20name\x20or\x20ID.\x20If\x20specifying\x20an\x20account,\x20use\x20empty\x20string\x20\x27\x27\x20for\x20the\x20default\x20account.\x20'+'If\x20it\x20starts\x20with\x20\x270x\x27,\x20it\x20will\x20be\x20treated\x20as\x20an\x20ID.\x20'+'Otherwise,\x20it\x20will\x20be\x20treated\x20as\x20a\x20name\x20(max\x2064\x20bcs\x20characters).');export const AccountOrMark_AddressSchema=z['object']({'name_or_address':NameOrAddressSchema['optional'](),'local_mark_first':z['boolean']()['optional']()['describe']('Whether\x20to\x20prioritize\x20local\x20marks,\x20if\x20true,\x20prioritize\x20local\x20marks,\x20otherwise\x20prioritize\x20global\x20marks')})['strict']()['describe']('Account\x20or\x20address\x20lookup\x20object.\x20Use\x20this\x20to\x20specify\x20which\x20account\x20to\x20use\x20for\x20an\x20operation.\x20'+'EXAMPLE:\x20{\x20name_or_address:\x20\x27testor2\x27\x20}\x20-\x20looks\x20up\x20account\x20by\x20name;\x20'+'EXAMPLE:\x20{\x20name_or_address:\x20\x270x1234...\x27\x20}\x20-\x20uses\x20address\x20directly;\x20'+'If\x20name_or_address\x20is\x20empty\x20string\x20\x27\x27,\x20uses\x20the\x20default\x20local\x20account.');export const ManyAccountOrMark_AddressSchema=z['object']({'entities':z['array'](AccountOrMark_AddressSchema),'check_all_founded':z['boolean']()['default'](!![])['describe']('Whether\x20to\x20check\x20all\x20entities\x20are\x20found.\x20Defaults\x20to\x20true:\x20abort\x20and\x20throw\x20if\x20ANY\x20entity\x20cannot\x20be\x20resolved.\x20Set\x20false\x20only\x20when\x20partial\x20resolution\x20is\x20explicitly\x20intended\x20(only\x20found\x20IDs\x20are\x20returned)')})['strict']()['describe']('Used\x20to\x20batch\x20find\x20account\x20or\x20object\x20IDs\x20by\x20name');export const AccountOrMark_AddressAISchema=z['union']([NameOrAddressSchema['transform'](a=>({'name_or_address':a,'local_mark_first':!![]}))['describe']('Account\x20name,\x20address\x20(0x...),\x20or\x20mark\x20name.\x20'+'When\x20using\x20string\x20format,\x20local\x20marks\x20are\x20searched\x20first.\x20'+'EXAMPLE:\x20\x27alice\x27\x20-\x20searches\x20local\x20marks\x20first,\x20then\x20global;\x20'+'EXAMPLE:\x20\x270x2...\x27\x20(64\x20hex\x20chars)\x20-\x20uses\x20address\x20directly;\x20'+'EXAMPLE:\x20\x27\x27\x20-\x20uses\x20the\x20default\x20local\x20account'),AccountOrMark_AddressSchema])['describe']('Account\x20or\x20address\x20lookup.\x20Can\x20be\x20a\x20simple\x20string\x20(recommended\x20for\x20AI)\x20'+'or\x20full\x20object\x20with\x20explicit\x20local_mark_first\x20control.\x20'+'String\x20form\x20auto-converts\x20to\x20{\x20name_or_address:\x20<string>,\x20local_mark_first:\x20true\x20}.');export const ManyAccountOrMark_AddressAISchema=z['union']([z['array'](NameOrAddressSchema)['transform'](a=>({'entities':a['map'](b=>({'name_or_address':b,'local_mark_first':!![]})),'check_all_founded':!![]}))['describe']('Array\x20of\x20account\x20names,\x20addresses,\x20or\x20mark\x20names.\x20'+'Local\x20marks\x20are\x20searched\x20first\x20for\x20each\x20entry.\x20'+'EXAMPLE:\x20[\x27alice\x27,\x20\x270x2...\x27,\x20\x27bob\x27]'),ManyAccountOrMark_AddressSchema])['describe']('Batch\x20account\x20or\x20address\x20lookup.\x20Can\x20be\x20an\x20array\x20of\x20strings\x20(recommended\x20for\x20AI)\x20'+'or\x20full\x20object\x20with\x20explicit\x20control.\x20'+'Array\x20form\x20auto-converts\x20to\x20{\x20entities:\x20[...],\x20check_all_founded:\x20true\x20}.');export const ObjectOwnerSchema=z['union']([z['object']({'AddressOwner':z['string']()['describe']('Address\x20owner')})['strict'](),z['object']({'ObjectOwner':z['string']()['describe']('Object\x20owner')})['strict'](),z['object']({'Shared':z['object']({'initial_shared_version':z['union']([z['string'](),z['number']()])['describe']('Version\x20when\x20object\x20became\x20shared')})['strict']()['describe']('Shared\x20object')})['strict'](),z['literal']('Immutable'),z['object']({'ConsensusAddressOwner':z['object']({'owner':z['string']()['describe']('Consensus\x20ID\x20owner'),'start_version':z['union']([z['string'](),z['number']()])['describe']('Version\x20when\x20object\x20recently\x20became\x20consensus\x20object')})['strict']()['describe']('Consensus\x20ID\x20owner')})['strict']()])['describe']('Object\x20owner');export const ValueTypeUserSchema=z['union']([z['literal'](a391a['Bool'])['describe']('Bool\x20(0)'),z['literal'](a391a['Address'])['describe']('Address\x20(1)'),z['literal'](a391a['String'])['describe']('String\x20(2)'),z['literal'](a391a['U8'])['describe']('U8\x20(3)'),z['literal'](a391a['U16'])['describe']('U16\x20(4)'),z['literal'](a391a['U32'])['describe']('U32\x20(5)'),z['literal'](a391a['U64'])['describe']('U64\x20(6)'),z['literal'](a391a['U128'])['describe']('U128\x20(7)'),z['literal'](a391a['U256'])['describe']('U256\x20(8)'),z['literal'](a391a['VecBool'])['describe']('VecBool\x20(9)'),z['literal'](a391a['VecAddress'])['describe']('VecAddress\x20(10)'),z['literal'](a391a['VecString'])['describe']('VecString\x20(11)'),z['literal'](a391a['VecU8'])['describe']('VecU8\x20(12)'),z['literal'](a391a['VecU16'])['describe']('VecU16\x20(13)'),z['literal'](a391a['VecU32'])['describe']('VecU32\x20(14)'),z['literal'](a391a['VecU64'])['describe']('VecU64\x20(15)'),z['literal'](a391a['VecU128'])['describe']('VecU128\x20(16)'),z['literal'](a391a['VecU256'])['describe']('VecU256\x20(17)'),z['literal'](a391a['VecVecU8'])['describe']('VecVecU8\x20(18)'),z['literal']('Bool')['describe']('Bool'),z['literal']('Address')['describe']('Address'),z['literal']('String')['describe']('String'),z['literal']('U8')['describe']('U8'),z['literal']('U16')['describe']('U16'),z['literal']('U32')['describe']('U32'),z['literal']('U64')['describe']('U64'),z['literal']('U128')['describe']('U128'),z['literal']('U256')['describe']('U256'),z['literal']('VecBool')['describe']('VecBool'),z['literal']('VecAddress')['describe']('VecAddress'),z['literal']('VecString')['describe']('VecString'),z['literal']('VecU8')['describe']('VecU8'),z['literal']('VecU16')['describe']('VecU16'),z['literal']('VecU32')['describe']('VecU32'),z['literal']('VecU64')['describe']('VecU64'),z['literal']('VecU128')['describe']('VecU128'),z['literal']('VecU256')['describe']('VecU256'),z['literal']('VecVecU8')['describe']('VecVecU8'),z['literal']('bool')['describe']('bool'),z['literal']('address')['describe']('address'),z['literal']('string')['describe']('string'),z['literal']('u8')['describe']('u8'),z['literal']('u16')['describe']('u16'),z['literal']('u32')['describe']('u32'),z['literal']('u64')['describe']('u64'),z['literal']('u128')['describe']('u128'),z['literal']('u256')['describe']('u256'),z['literal']('vecbool')['describe']('vecbool'),z['literal']('vecaddress')['describe']('vecaddress'),z['literal']('vecstring')['describe']('vecstring'),z['literal']('vecu8')['describe']('vecu8'),z['literal']('vecu16')['describe']('vecu16'),z['literal']('vecu32')['describe']('vecu32'),z['literal']('vecu64')['describe']('vecu64'),z['literal']('vecu128')['describe']('vecu128'),z['literal']('vecu256')['describe']('vecu256'),z['literal']('vecvecu8')['describe']('vecvecu8')])['describe']('User\x20available\x20value\x20type\x20(number\x20or\x20string,\x20e.g.,\x206\x20or\x20\x27U64\x27\x20or\x20\x27u64\x27)');export const ValueTypeSchema=ValueTypeUserSchema['or'](z['literal'](a391a['Value'])['describe']('Value\x20(19)'))['or'](z['literal']('Value')['describe']('Value'))['describe']('Value\x20type\x20(number\x20or\x20string,\x20e.g.,\x206\x20or\x20\x27U64\x27)');export const ObjectTypeSchema=z['enum']([a391b['Permission'],a391b['Repository'],a391b['Arb'],a391b['Arbitration'],a391b['Service'],a391b['Machine'],a391b['Order'],a391b['Progress'],a391b['Payment'],a391b['Treasury'],a391b['Guard'],a391b['Demand'],a391b['Passport'],a391b['Allocation'],a391b['Resource'],a391b['Reward'],a391b['Discount'],a391b['EntityRegistrar'],a391b['EntityLinker'],a391b['Proof'],a391b['WReceivedObject'],a391b['Contact'],a391b['TableItem_ProgressHistory'],a391b['TableItem_PermissionPerm'],a391b['TableItem_DemandPresenter'],a391b['TableItem_MachineNode'],a391b['TableItem_TreasuryHistory'],a391b['TableItem_RepositoryData'],a391b['TableItem_RewardRecord'],a391b['TableItem_EntityLinker'],a391b['TableItem_AddressMark'],a391b['TableItem_EntityRegistrar']])['describe']('Wowok\x20object\x20type');export const BalanceTypeSchema=z['union']([z['number'](),z['string']()])['refine'](a=>{if(typeof a==='number')return Number['isSafeInteger'](a)&&a>=0x0;const b=a['trim']();if(/^\d+$/['test'](b))return!![];return/^(\d+(?:\.\d+)?)\s*([A-Za-z][A-Za-z0-9]*)$/['test'](b);},'Invalid\x20amount:\x20bare\x20decimal\x20values\x20without\x20a\x20token\x20symbol\x20(e.g.\x20\x222.5\x22,\x20\x220.1\x22)\x20are\x20rejected.\x20'+'Use\x20a\x20smallest-unit\x20non-negative\x20integer\x20string\x20(e.g.\x20\x222500000000\x22),\x20a\x20non-negative\x20safe-integer\x20number,\x20'+'or\x20a\x20display\x20string\x20with\x20the\x20token\x20symbol\x20(e.g.\x20\x222.5WOW\x22)\x20so\x20the\x20Fund\x20Processing\x20Layer\x20can\x20convert\x20it.')['describe']('A\x20coin/balance\x20amount.\x20Accepts\x20three\x20formats:\x20'+'(1)\x20DISPLAY\x20FORMAT\x20with\x20token\x20symbol:\x20\x222.5WOW\x22,\x20\x2210USDC\x22,\x20\x220.05WOW\x22\x20—\x20'+'auto-converted\x20to\x20smallest\x20units\x20via\x20the\x20Fund\x20Processing\x20Layer\x20(token\x20precision\x20resolved\x20'+'from\x20official\x20registry\x20→\x20cache\x20→\x20on-chain).\x20The\x20symbol\x20MUST\x20match\x20the\x20token\x27s\x20type_parameter.\x20'+'(2)\x20SMALLEST\x20UNIT\x20(numeric\x20string):\x20\x2210000000000\x22\x20—\x20used\x20as-is,\x20no\x20conversion.\x20'+'(3)\x20SMALLEST\x20UNIT\x20(number):\x2010000000000\x20—\x20used\x20as-is\x20only\x20within\x20the\x20safe\x20integer\x20range\x20(±2^53);\x20numbers\x20outside\x20it\x20are\x20REJECTED,\x20use\x20a\x20numeric\x20string\x20instead.\x20'+'PRECISION\x20RULE:\x20for\x20values\x20exceeding\x202^53\x20(9007199254740991),\x20ALWAYS\x20use\x20format\x20(1)\x20or\x20(2)\x20—\x20JS\x20numbers\x20lose\x20integer\x20precision\x20silently\x20and\x20such\x20inputs\x20are\x20blocked.\x20'+'Raw\x20amounts\x20must\x20be\x20plain\x20non-negative\x20integers;\x20a\x20decimal\x20value\x20without\x20a\x20token\x20symbol\x20(e.g.\x20\x222.5\x22)\x20is\x20rejected\x20—\x20append\x20the\x20symbol\x20(\x222.5WOW\x22)\x20so\x20the\x20Fund\x20Processing\x20Layer\x20converts\x20it.\x20'+'WARNING\x20—\x20BARE\x20INTEGER\x20MEANS\x20SMALLEST\x20UNIT,\x20NOT\x20TOKENS:\x20formats\x20(2)/(3)\x20are\x20NEVER\x20interpreted\x20as\x20display\x20tokens.\x20'+'For\x20example\x20amount=\x225\x22\x20or\x205\x20means\x205\x20raw\x20units\x20=\x200.000000005\x20WOW\x20(9\x20decimals)\x20—\x20NOT\x205\x20WOW.\x20'+'When\x20the\x20user\x20asks\x20for\x20a\x20token\x20amount,\x20you\x20MUST\x20use\x20display\x20format\x20(\x225WOW\x22,\x20\x222USDC\x22);\x20a\x20bare\x20integer\x20is\x20only\x20correct\x20for\x20unitless\x20counts\x20(e.g.\x20stock\x20quantity)\x20or\x20when\x20you\x20computed\x20exact\x20raw\x20units\x20yourself.\x20'+'Default\x20token:\x20WOW\x20(9\x20decimals,\x201\x20WOW\x20=\x2010^9\x20MIST).\x20'+'For\x20custom\x20tokens:\x20use\x20display\x20format\x20with\x20the\x20token\x27s\x20symbol,\x20or\x20pass\x20smallest\x20units\x20directly.\x20'+'MONEY\x20CONFIRMATION:\x20all\x20monetary\x20fields\x20trigger\x20user\x20confirmation\x20via\x20the\x20Fund\x20Processing\x20Layer,\x20where\x20the\x20token\x27s\x20FULL\x20type,\x20decimals\x20and\x20raw\x20amount\x20are\x20always\x20visible.\x20'+'MULTIPLE\x20ISSUERS:\x20several\x20on-chain\x20tokens\x20may\x20legally\x20share\x20the\x20same\x20symbol\x20(e.g.\x20multiple\x20\x22USDT\x22\x20coins).\x20When\x20a\x20bare\x20symbol\x20matches\x20more\x20than\x20one\x20token,\x20the\x20operation\x20is\x20BLOCKED\x20and\x20every\x20candidate\x20is\x20listed\x20with\x20full\x20details\x20(type,\x20name,\x20decimals,\x20verified\x20tag)\x20—\x20present\x20the\x20list\x20to\x20the\x20USER\x20and\x20let\x20them\x20choose\x20(they\x20may\x20answer\x20by\x20number),\x20then\x20re-issue\x20with\x20the\x20chosen\x20token\x27s\x20FULL\x20type\x20string\x20in\x20type_parameter;\x20never\x20guess\x20an\x20issuer\x20from\x20the\x20bare\x20symbol.\x20'+'MISSING\x20TOKEN\x20INFO:\x20when\x20a\x20token\x27s\x20precision\x20cannot\x20be\x20resolved,\x20the\x20operation\x20is\x20REFUSED\x20(raw\x20u64\x20included\x20—\x20amount\x20magnitude\x20could\x20not\x20be\x20verified).\x20Recovery:\x20provide\x20the\x20token\x27s\x20FULL\x20type\x20in\x20package::module::Name\x20form\x20in\x20type_parameter\x20(a\x20bare\x20symbol\x20like\x20\x22USDT\x22\x20cannot\x20be\x20resolved),\x20and\x20verify\x20the\x20WOW\x20network\x20is\x20correct.\x20'+'Examples:\x20\x222.5WOW\x22\x20(display\x20→\x202500000000),\x2010000000000\x20(number,\x20smallest\x20unit),\x20\x2250000000000\x22\x20(string,\x20smallest\x20unit).\x20'+'Used\x20for:\x20service\x20sale\x20prices,\x20compensation\x20fund\x20balances,\x20Treasury\x20deposits,\x20arbitration\x20fees,\x20reward\x20amounts,\x20stock\x20quantities.');export const QueryIdSchema=z['number']()['int']()['min'](0x0)['describe']('Query\x20ID');export const CacheExpireTypeSchema=z['union']([z['number'](),z['literal']('INFINITE')])['describe']('Cache\x20expiration\x20time\x20type');export const ValueContainerSchema=z['lazy'](()=>z['object']({'valueType':ValueTypeSchema['describe']('Value\x20type'),'value':SupportedValueSchema['describe']('Value')})['strict']()['describe']('Value\x20container\x20with\x20type\x20and\x20value'));export const SupportedValueUserSchema=z['union']([z['boolean'](),z['union']([AccountOrMark_AddressSchema,z['string']()]),z['string'](),z['number'](),z['array'](z['boolean']()),z['union']([ManyAccountOrMark_AddressSchema,z['array'](z['string']())]),z['array'](z['string']()),z['array'](z['number']()),z['array'](z['array'](z['number']()))])['describe']('User\x20available\x20supported\x20value\x20type');export const SupportedValueSchema=SupportedValueUserSchema['or'](ValueContainerSchema)['describe']('Supported\x20value\x20type');export const GuardIdentifierSchema=z['number']()['int']()['min'](0x0)['max'](0xff)['describe']('Identifier\x20(0-255)\x20for\x20data\x20lookup\x20in\x20Guard\x20table.\x20Slot\x20consensus\x20(enforced\x20on-chain\x20at\x20guard\x20table\x20construction):\x20'+('0-'+MAX_USER_IDENTIFIER+'\x20=\x20user\x20slots\x20(free\x20for\x20business\x20guards);\x20')+'221-253\x20=\x20PROTOCOL-RESERVED\x20(rejected\x20on-chain\x20—\x20reserved\x20so\x20future\x20protocol\x20features\x20get\x20fixed\x20slots\x20without\x20colliding\x20with\x20published\x20guards);\x20'+'255\x20=\x20ONCE\x20replay-protection\x20slot\x20on\x20Allocation\x20(byte-keyed,\x20the\x20submitted\x20bytes\x20are\x20the\x20once-key\x20—\x20use\x20for\x20per-period\x20keys\x20like\x20period-<N>);\x20'+'254\x20=\x20ONCE-FOR-OBJECT\x20slot\x20on\x20Allocation\x20(chain-derived\x20key\x20=\x20bcs(the\x20Allocation\x27s\x20payment_info.for_object);\x20the\x20submitted\x20bytes\x20are\x20ignored\x20and\x20the\x20submission\x20only\x20arms\x20the\x20slot\x20—\x20use\x20for\x20one-shot\x20per-order\x20rails\x20such\x20as\x20full\x20refunds).');export const GuardTableItemBaseSchema=z['object']({'identifier':GuardIdentifierSchema['refine'](a=>a<=MAX_USER_IDENTIFIER||a>=0xfe,{'message':'Identifier\x20is\x20in\x20the\x20protocol-reserved\x20range\x20221-253\x20—\x20business\x20guard\x20tables\x20may\x20only\x20use\x200-'+MAX_USER_IDENTIFIER+';\x20'+'254/255\x20are\x20the\x20protocol-owned\x20once\x20slots\x20consumed\x20by\x20allocation\x20replay\x20protection.\x20'+'The\x20chain\x20rejects\x20reserved\x20identifiers\x20at\x20guard\x20table\x20construction\x20(E_IDENTIFIER_RESERVED).'}),'b_submission':z['boolean']()['describe']('Whether\x20this\x20table\x20item\x27s\x20value\x20is\x20submitted\x20dynamically\x20at\x20Guard\x20trigger\x20time\x20(alloc_by_guard\x20call).\x20'+'\x0a\x0a'+'true\x20=\x20value\x20is\x20submitted\x20by\x20the\x20caller\x20when\x20triggering\x20the\x20Guard.\x20'+'Use\x20for\x20runtime-context-dependent\x20values\x20like\x20order\x20address,\x20user\x20address.\x20'+'The\x20\x27value\x27\x20field\x20is\x20ignored\x20when\x20b_submission=true;\x20the\x20caller\x20must\x20provide\x20it\x20via\x20submissions[].\x20'+'\x0a\x0a'+'false\x20=\x20value\x20is\x20static,\x20set\x20at\x20Guard\x20creation\x20time.\x20'+'Use\x20for\x20values\x20known\x20when\x20the\x20Guard\x20is\x20created:\x20expected\x20node\x20names,\x20expected\x20merchant\x20address,\x20expected\x20service\x20address.\x20'+'The\x20\x27value\x27\x20field\x20must\x20be\x20populated\x20and\x20will\x20be\x20stored\x20on-chain\x20permanently.\x20'+'\x0a\x0a'+'Rule\x20of\x20thumb:\x20if\x20the\x20value\x20is\x20the\x20SAME\x20for\x20all\x20future\x20Guard\x20triggers,\x20use\x20false.\x20'+'If\x20the\x20value\x20DIFFERS\x20per\x20trigger\x20(e.g.,\x20which\x20order\x20to\x20release\x20funds\x20for),\x20use\x20true.'),'value_type':ValueTypeUserSchema['describe']('Type\x20of\x20the\x20value\x20stored\x20in\x20`value`.\x20One\x20of:\x20Bool(0),\x20Address(1),\x20String(2),\x20U8(3),\x20U16(4),\x20U32(5),\x20U64(6),\x20U128(7),\x20U256(8),\x20VecBool(9),\x20VecAddress(10),\x20VecString(11),\x20VecU8(12),\x20VecU16(13),\x20VecU32(14),\x20VecU64(15),\x20VecU128(16),\x20VecU256(17),\x20VecVecU8(18).\x20'+'When\x20value_type=Address\x20(1),\x20the\x20`value`\x20field\x20accepts\x20a\x20hex\x20address\x20string,\x20a\x20LocalMark\x20name,\x20or\x20an\x20AccountOrMark_Address\x20object\x20—\x20see\x20`value`\x20field\x20description\x20for\x20details.'),'value':SupportedValueUserSchema['optional']()['describe']('The\x20actual\x20value\x20data.\x20Format\x20depends\x20on\x20`value_type`:\x0a'+'•\x20Bool:\x20true/false\x20(boolean)\x0a'+'•\x20Address\x20(CRITICAL\x20—\x20string\x20\x27Address\x27\x20is\x20NOT\x20a\x20placeholder):\x20a\x20hex\x20address\x20(e.g.\x20\x270x1234...\x27),\x20a\x20LocalMark\x20name\x20(e.g.\x20\x27my-service\x27\x20—\x20resolved\x20to\x20address\x20at\x20evaluation\x20time),\x20an\x20AccountOrMark_Address\x20object\x20(e.g.\x20{name_or_address:\x27my-service\x27}),\x20or\x20system\x20shorthand\x20(\x270xaaa\x27\x20=\x20EntityLinker,\x20\x270xaab\x27\x20=\x20EntityRegistrar).\x20The\x20literal\x20string\x20\x27Address\x27\x20itself\x20is\x20INVALID\x20—\x20it\x20would\x20be\x20treated\x20as\x20a\x20non-existent\x20LocalMark\x20name\x20and\x20fail.\x20Example:\x20value=\x270x2::wow::WOW<address>\x27\x20or\x20value=\x27my-permission\x27.\x0a'+'•\x20String:\x20any\x20string\x0a'+'•\x20U8/U16/U32/U64/U128/U256:\x20number\x20or\x20numeric\x20string\x20(e.g.\x2042\x20or\x20\x2742\x27)\x0a'+'•\x20Vec*\x20types:\x20arrays\x20of\x20the\x20corresponding\x20element\x20type\x0a'+'REQUIRED\x20when\x20b_submission=false.\x20OPTIONAL\x20when\x20b_submission=true\x20(value\x20is\x20supplied\x20at\x20evaluation\x20time\x20by\x20user\x20submission).'),'name':z['string']()['default']('')['refine'](a=>{if(a['length']===0x0)return!![];if(new TextEncoder()['encode'](a)['length']>MAX_NAME_LENGTH)return![];return!a['toLowerCase']()['startsWith']('0x');},{'message':'Name\x20must\x20be\x20at\x20most\x20'+MAX_NAME_LENGTH+'\x20BCS\x20characters\x20(UTF-8\x20bytes)\x20and\x20must\x20not\x20start\x20with\x20\x270x\x27.\x20Use\x20a\x20short\x20identifier\x20(e.g.\x20\x27order_id\x27,\x20\x27delivery_node\x27);\x20put\x20longer\x20explanations\x20in\x20the\x20Guard\x27s\x20\x27description\x27\x20field'})['describe']('Data\x20name\x20identifier.\x20MAX\x2064\x20BCS\x20characters\x20(Chinese\x20chars\x20count\x20as\x203-4\x20BCS\x20bytes\x20each).\x20'+'Use\x20short\x20identifiers\x20like\x20\x27order_id\x27,\x20\x27delivery_node\x27.\x20'+'Put\x20longer\x20descriptions\x20in\x20the\x20Guard\x27s\x20\x27description\x27\x20field,\x20NOT\x20here.')})['strict']()['describe']('Guard\x20table\x20item\x20(INPUT/CREATION\x20form).\x20DO\x20NOT\x20include\x20`object_type`\x20field\x20—\x20it\x20is\x20query-output\x20only\x20and\x20will\x20be\x20rejected\x20here.');export const GuardTableItemSchema=GuardTableItemBaseSchema['extend']({'object_type':ObjectTypeSchema['optional']()['describe']('OUTPUT-ONLY\x20(query\x20side):\x20Object\x20type\x20when\x20value_type\x20is\x20Address\x20and\x20represents\x20a\x20specific\x20object.\x20Auto-derived\x20by\x20the\x20system\x20—\x20DO\x20NOT\x20set\x20this\x20field\x20at\x20Guard\x20creation.')})['strict']()['describe']('Guard\x20table\x20item\x20(QUERY/OUTPUT\x20form\x20—\x20includes\x20auto-derived\x20object_type\x20field)');export const EntrypointSchema=z['enum']([ENTRYPOINT['Localnet'],ENTRYPOINT['Testnet'],ENTRYPOINT['Mainnet']])['describe']('Network\x20entrypoint:\x20Specifies\x20which\x20network\x20the\x20operation\x20occurs\x20on.\x20'+'FIX-010\x20cross-network\x20note:\x20LocalMark\x20names\x20are\x20scoped\x20per\x20network\x20(testnet\x20marks\x20are\x20invisible\x20on\x20mainnet\x20and\x20vice\x20versa).\x20'+'When\x20migrating\x20from\x20testnet\x20to\x20mainnet,\x20recreate\x20all\x20objects\x20on\x20mainnet\x20and\x20re-register\x20LocalMark\x20names\x20with\x20the\x20SAME\x20names\x20'+'to\x20keep\x20name-based\x20references\x20working\x20across\x20networks.\x20Recreate\x20all\x20objects\x20on\x20the\x20target\x20network\x20'+'via\x20onchain_operations\x20with\x20env.network=target_network,\x20then\x20re-register\x20the\x20LocalMark\x20names.');export const FaucetNetworkSchema=z['enum']([ENTRYPOINT['Localnet'],ENTRYPOINT['Testnet']])['describe']('Network\x20entrypoint\x20for\x20Faucet:\x20Specifies\x20which\x20network\x20the\x20operation\x20occurs\x20on');export const ObjectBaseSchema=z['object']({'object':z['string']()['describe']('Object\x20ID'),'type':ObjectTypeSchema['optional']()['describe']('Object\x20type'),'type_raw':z['string']()['optional']()['describe']('Raw\x20object\x20type'),'owner':z['union']([ObjectOwnerSchema,z['null']()])['optional']()['describe']('Object\x20owner'),'version':z['union']([z['string'](),z['number']()])['optional']()['describe']('Object\x20version'),'previousTransaction':z['string']()['optional']()['describe']('Previous\x20transaction\x20ID'),'cache_expire':CacheExpireTypeSchema['optional']()['describe']('Cache\x20expiration\x20time'),'query_name':z['string']()['optional']()['describe']('Original\x20query\x20name\x20or\x20address\x20used\x20to\x20retrieve\x20this\x20object'),'content_raw':z['any']()['optional']()['describe']('Raw\x20content\x20data\x20for\x20unknown\x20object\x20types'),'_guard_node_comments':z['array'](z['object']({'type':z['string'](),'description':z['string']()}))['optional']()['describe']('Additional\x20comments\x20for\x20Guard\x20node\x20instructions')})['passthrough']()['describe']('Object\x20base\x20information');export const QueryEnvSchema=z['object']({'no_cache':z['boolean']()['optional']()['describe']('Whether\x20to\x20disable\x20cache'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20environment\x20parameters');export const ReceivedBalanceObjectSchema=z['object']({'id':z['string']()['describe']('Received\x20CoinWrapper\x20object\x20ID'),'balance':BalanceTypeSchema,'payment':z['string']()['describe']('Payment\x20object\x20ID'),'type':z['string']()['optional']()['describe']('Type\x20of\x20the\x20received\x20object\x20(or\x20inner\x20coin\x20type);\x20used\x20for\x20token_type\x20detection'),'version':z['string']()['optional']()['describe']('Object\x20version,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive'),'digest':z['string']()['optional']()['describe']('Object\x20digest,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive')})['strict']()['describe']('Received\x20CoinWrapper\x20object\x20record');export const CoinWrapperTokenTypeSchema=z['string']()['refine'](a=>{const b=a['match'](/^CoinWrapper<(.+)>$/),c=b?b[0x1]:a,d=c['split']('::');if(d['length']!==0x3)return![];const [e,f,g]=d;if(!isValidTokenTypeAddress(e))return![];if(!isValidMoveIdentifier(f))return![];if(!isValidMoveIdentifier(g))return![];return!![];},{'message':'Invalid\x20token\x20type\x20format.\x20Expected:\x20CoinWrapper<{address}::{module}::{struct}>\x20or\x20{address}::{module}::{struct}.\x20Example:\x20CoinWrapper<0x2::wow::WOW>\x20or\x200x2::wow::WOW'})['describe']('Token\x20type\x20in\x20format:\x20CoinWrapper<{address}::{module}::{struct}>\x20or\x20{address}::{module}::{struct}.\x20Example:\x20CoinWrapper<0x2::wow::WOW>');export const ReceivedBalanceSchema=z['object']({'balance':BalanceTypeSchema,'token_type':CoinWrapperTokenTypeSchema['describe']('Asset\x20type\x20of\x20Coin\x20objects.\x20Supports\x20CoinWrapper<...>\x20format\x20for\x20order\x20receive\x20operations.'),'received':z['array'](ReceivedBalanceObjectSchema)['describe']('Received\x20records\x20of\x20Coin\x20objects')})['strict']()['describe']('Received\x20record\x20of\x20Coin\x20objects');export const ReceivedBalanceOrRecentlySchema=z['union']([ReceivedBalanceSchema,z['literal']('recently')])['describe']('Specified\x20received\x20balance\x20record\x20or\x20all\x20recently\x20received\x20balance\x20record');export const ReceivedNormalSchema=z['object']({'id':z['string']()['nonempty']()['describe']('Received\x20object\x20ID'),'type':z['string']()['nonempty']()['describe']('Object\x20type'),'content_raw':z['any']()['optional']()['describe']('Raw\x20content\x20data'),'version':z['string']()['optional']()['describe']('Object\x20version,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive'),'digest':z['string']()['optional']()['describe']('Object\x20digest,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive')})['strict']()['describe']('Received\x20normal\x20object\x20record');export const ReceivedObjectsOrRecentlySchema=z['union']([z['array'](ReceivedNormalSchema),ReceivedBalanceSchema,z['literal']('recently')])['describe']('Specified\x20received\x20object\x20records\x20or\x20all\x20recently\x20received\x20object\x20records');export const RECEIVE_FORMAT_BLOCK_OBJECTS='\x0a\x0aACCEPTED\x20FORMATS\x20(F-06\x20unified\x20receive\x20operation\x20block):\x0a'+'•\x20\x27recently\x27\x20(string\x20literal)\x20—\x20auto-query\x20and\x20receive\x20ALL\x20recently\x20received\x20objects.\x0a'+'\x20\x20Use\x20this\x20for\x20the\x20common\x20case:\x20\x22withdraw\x20everything\x20the\x20object\x20has\x20received.\x22\x0a'+'\x20\x20Example:\x20receive:\x20\x27recently\x27\x0a'+'•\x20ReceivedNormal[]\x20(array)\x20—\x20explicit\x20list\x20of\x20received\x20objects\x20to\x20unwrap.\x0a'+'\x20\x20Use\x20this\x20when\x20you\x20want\x20to\x20receive\x20specific\x20objects\x20only\x20(not\x20all).\x0a'+'\x20\x20Example:\x20receive:\x20[{id:\x20\x270xobj1\x27,\x20type:\x20\x270x2::coin::Coin<0x2::wow::WOW>\x27}]\x0a'+'•\x20ReceivedBalance\x20({token_type,\x20balance,\x20received:\x20[{id,\x20balance,\x20payment}]})\x20—\x0a'+'\x20\x20receive\x20a\x20balance\x20record\x20from\x20a\x20specific\x20Payment/payer.\x0a'+'\x20\x20Use\x20this\x20for\x20precise\x20balance\x20targeting\x20(advanced\x20—\x20usually\x20after\x20querying\x0a'+'\x20\x20the\x20object\x27s\x20received\x20history\x20via\x20query_received).\x0a'+'\x20\x20Example:\x20receive:\x20{token_type:\x20\x270x2::wow::WOW\x27,\x20balance:\x201000000,\x20received:\x20[{id:\x20\x270xrec1\x27,\x20balance:\x201000000,\x20payment:\x20\x270xpay1\x27}]}\x0a'+'ANTI-PATTERN:\x20do\x20NOT\x20wrap\x20in\x20{result:\x20...}\x20—\x20pass\x20the\x20value\x20directly.';export const RECEIVE_FORMAT_BLOCK_BALANCE='\x0a\x0aACCEPTED\x20FORMATS\x20(F-06\x20unified\x20receive\x20operation\x20block):\x0a'+'•\x20\x27recently\x27\x20(string\x20literal)\x20—\x20auto-query\x20and\x20receive\x20ALL\x20recently\x20received\x20balance.\x0a'+'\x20\x20Use\x20this\x20for\x20the\x20common\x20case:\x20\x22deposit\x20all\x20recently\x20received\x20coins\x20into\x20pending\x20balance.\x22\x0a'+'\x20\x20Example:\x20receive:\x20\x27recently\x27\x0a'+'•\x20ReceivedBalance\x20({token_type,\x20balance,\x20received:\x20[{id,\x20balance,\x20payment}]})\x20—\x0a'+'\x20\x20receive\x20a\x20specific\x20balance\x20record\x20from\x20a\x20Payment/payer.\x0a'+'\x20\x20Use\x20this\x20when\x20targeting\x20a\x20specific\x20received\x20balance\x20(advanced).\x0a'+'\x20\x20Example:\x20receive:\x20{token_type:\x20\x270x2::wow::WOW\x27,\x20balance:\x201000000,\x20received:\x20[{id:\x20\x270xrec1\x27,\x20balance:\x201000000,\x20payment:\x20\x270xpay1\x27}]}\x0a'+'ANTI-PATTERN:\x20do\x20NOT\x20wrap\x20in\x20{result:\x20...}\x20—\x20pass\x20the\x20value\x20directly.';export const QueryReceivedResultSchema=z['object']({'result':z['union']([ReceivedBalanceSchema,z['array'](ReceivedNormalSchema)])['describe']('Received\x20CoinWrapper\x20object\x20record\x20or\x20received\x20other\x20objects\x20array')})['strict']()['describe']('Query\x20received\x20result');
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -22,5 +22,6 @@ export * from './workflow/index.js';
|
|
|
22
22
|
export * from './benchmark-migration/index.js';
|
|
23
23
|
export * from './permission/index.js';
|
|
24
24
|
export * from './keeper/index.js';
|
|
25
|
+
export * from './service-clone/index.js';
|
|
25
26
|
export { MCP_SCHEMA_VERSION, getSchemaVersions, checkClientSchemaCompatibility, attachSchemaWarning, } from './schema-version.js';
|
|
26
27
|
export type { SchemaVersions, SchemaCompatibilityMode, SchemaCheckOptions, SchemaCheckResult, } from './schema-version.js';
|
package/dist/schema/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from'./call/index.js';export*from'./query/index.js';export*from'./local/index.js';export*from'./messenger/index.js';export*from'./common/index.js';export*from'./operations.js';export*from'./utils/guard-parser.js';export*from'./utils/node-parser.js';export*from'./config/index.js';export*from'./evaluation/index.js';export*from'./watch/index.js';export*from'./persona/index.js';export*from'./intent-radar/index.js';export*from'./goal/index.js';export*from'./employee/index.js';export*from'./interaction/index.js';export*from'./schema-query/index.js';export*from'./industry-pack/index.js';export*from'./strategy-review/index.js';export*from'./workspace/index.js';export*from'./workflow/index.js';export*from'./benchmark-migration/index.js';export*from'./permission/index.js';export*from'./keeper/index.js';export{MCP_SCHEMA_VERSION,getSchemaVersions,checkClientSchemaCompatibility,attachSchemaWarning}from'./schema-version.js';
|
|
1
|
+
export*from'./call/index.js';export*from'./query/index.js';export*from'./local/index.js';export*from'./messenger/index.js';export*from'./common/index.js';export*from'./operations.js';export*from'./utils/guard-parser.js';export*from'./utils/node-parser.js';export*from'./config/index.js';export*from'./evaluation/index.js';export*from'./watch/index.js';export*from'./persona/index.js';export*from'./intent-radar/index.js';export*from'./goal/index.js';export*from'./employee/index.js';export*from'./interaction/index.js';export*from'./schema-query/index.js';export*from'./industry-pack/index.js';export*from'./strategy-review/index.js';export*from'./workspace/index.js';export*from'./workflow/index.js';export*from'./benchmark-migration/index.js';export*from'./permission/index.js';export*from'./keeper/index.js';export*from'./service-clone/index.js';export{MCP_SCHEMA_VERSION,getSchemaVersions,checkClientSchemaCompatibility,attachSchemaWarning}from'./schema-version.js';
|
|
@@ -93,6 +93,7 @@ export declare const IndustryPackOperationInputSchema: z.ZodObject<{
|
|
|
93
93
|
content: z.ZodOptional<z.ZodString>;
|
|
94
94
|
from: z.ZodOptional<z.ZodString>;
|
|
95
95
|
to: z.ZodOptional<z.ZodString>;
|
|
96
|
+
authorize: z.ZodOptional<z.ZodBoolean>;
|
|
96
97
|
}, z.core.$strict>;
|
|
97
98
|
export declare const IndustryPackOperationOutputSchema: z.ZodObject<{
|
|
98
99
|
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -120,6 +121,7 @@ export declare const IndustryPackOperationOutputSchema: z.ZodObject<{
|
|
|
120
121
|
action: z.ZodLiteral<"repair_builtin_templates">;
|
|
121
122
|
dir: z.ZodString;
|
|
122
123
|
reseeded_count: z.ZodNumber;
|
|
124
|
+
requires_authorization: z.ZodOptional<z.ZodBoolean>;
|
|
123
125
|
results: z.ZodArray<z.ZodObject<{
|
|
124
126
|
template: z.ZodString;
|
|
125
127
|
status: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{MODE_REGISTRY_ACTIONS,ModeRegistryFields,RecommendIndustryResultSchema,ListModesResultSchema,DeriveUserModeResultSchema,EvolveUserModeResultSchema,RegisterUserModeResultSchema,UnregisterUserModeResultSchema,RegisterCustomMetricResultSchema,UnregisterCustomMetricResultSchema,RegisterCustomConstraintResultSchema,UnregisterCustomConstraintResultSchema,ListMetricsConstraintsResultSchema}from'./modes.js';export const IndustryPackOperationInputSchema=z['object']({'action':z['enum'](['scaffold','list','scan','repair_builtin_templates','template_drift','resolve','list_files','read_file','write_file','get','diff','reset','delete_file','create_file','create_dir','copy','move','rename',...MODE_REGISTRY_ACTIONS])['describe']('Action:\x20\x27scaffold\x27\x20=\x20generate\x20a\x20pack\x20template\x20skeleton\x20(requires\x20name);\x20'+'\x27list\x27\x20=\x20list\x20registered\x20packs;\x20\x27scan\x27\x20=\x20scan\x20+\x20register\x20packs\x20under\x20the\x20default\x20directory;\x20'+'\x27template_drift\x27\x20=\x20REPORT\x20builtin\x20template\x20files\x20whose\x20on-disk\x20body\x20differs\x20from\x20the\x20in-code\x20catalog\x20'+'(classifies\x20no_sentinel_legacy\x20/\x20stale_release\x20/\x20user_modified);\x20run\x20it\x20FIRST\x20when\x20a\x20template\x20change\x20'+'\x27seems\x20to\x20have\x20no\x20effect.\x20'+'\x27repair_builtin_templates\x27\x20=\x20RESEED\x20those\x20legacy\x20files\x20from\x20the\x20in-code\x20catalog\x20'+'(identity-gated\x20on\x20a\x20known\x20builtin\x20id,\x20previous\x20body\x20kept\x20as\x20<file>.bak;\x20custom\x20templates\x20never\x20touched)'+'\x27resolve\x27\x20=\x20return\x20the\x20industry\x20root\x20directory;\x20\x27list_files\x27\x20=\x20list\x20files\x20under\x20the\x20industry\x20directory;\x20'+'\x27read_file\x27\x20=\x20read\x20a\x20file\x20under\x20the\x20industry\x20directory\x20(path\x20required);\x20'+'\x27write_file\x27\x20=\x20write\x20content\x20to\x20a\x20file\x20under\x20the\x20industry\x20directory\x20(path\x20+\x20content\x20required);\x20'+'\x27get\x27\x20=\x20return\x20registered\x20layer\x20data\x20for\x20an\x20industry\x20(name\x20required;\x20dispute/compliance/supply/rules/playbook);\x20'+'\x27diff\x27\x20=\x20compare\x20registered\x20vs\x20on-disk\x20manifest\x20version/layers\x20(name\x20required);\x20'+'\x27reset\x27\x20=\x20restore\x20a\x20file\x20or\x20entire\x20pack\x20folder\x20to\x20its\x20pristine\x20annotated\x20template\x20(path\x20required).\x20'+'\x27delete_file\x27\x20=\x20delete\x20a\x20file\x20or\x20directory\x20(path\x20required).\x20'+'\x27create_file\x27\x20=\x20create\x20an\x20empty\x20file\x20(path\x20required;\x20content\x20optional).\x20'+'\x27create_dir\x27\x20=\x20create\x20a\x20directory\x20recursively\x20(path\x20required).\x20'+'\x27copy\x27\x20=\x20copy\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x20'+'\x27move\x27\x20/\x20\x27rename\x27\x20=\x20move\x20or\x20rename\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x20'+'Mode\x20registry\x20(industry/scenario\x20configuration):\x20\x27recommend_industry\x27\x20=\x20business\x20intent\x20→\x20top-3\x20'+'similar\x20industries\x20+\x20reference\x20examples;\x20\x27list_modes\x27\x20=\x20builtin\x20+\x20custom\x20modes;\x20\x27derive_user_mode\x27\x20=\x20'+'derive\x20a\x20custom\x20mode\x20from\x20a\x20builtin;\x20\x27evolve_user_mode\x27\x20=\x20iterate\x20an\x20existing\x20custom\x20mode;\x20'+'\x27register_user_mode\x27\x20=\x20register\x20a\x20fully\x20custom\x20mode;\x20\x27unregister_user_mode\x27\x20=\x20delete\x20a\x20custom\x20mode;\x20'+'\x27register_custom_metric\x27\x20/\x20\x27register_custom_constraint\x27\x20=\x20register\x20global\x20evaluation\x20metric/constraint;\x20'+'\x27list_metrics_constraints\x27\x20=\x20list\x20metrics\x20+\x20constraints\x20(filterable).'),'name':z['string']()['optional']()['describe']('Industry\x20name\x20(lowercase\x20snake_case,\x20e.g.\x20\x27life_service\x27);\x20required\x20for\x20scaffold\x20and\x20get.'),'path':z['string']()['optional']()['describe']('Path\x20relative\x20to\x20the\x20industry\x20root\x20(required\x20for\x20read_file,\x20write_file,\x20reset,\x20create_file,\x20create_dir).'),'content':z['string']()['optional']()['describe']('Text\x20content\x20to\x20write\x20(required\x20for\x20write_file;\x20optional\x20for\x20create_file).'),'from':z['string']()['optional']()['describe']('Source\x20path\x20relative\x20to\x20the\x20industry\x20root\x20(required\x20for\x20copy/move/rename).'),'to':z['string']()['optional']()['describe']('Destination\x20path\x20relative\x20to\x20the\x20industry\x20root\x20(required\x20for\x20copy/move/rename).'),...ModeRegistryFields})['strict']();export const IndustryPackOperationOutputSchema=z['object']({'result':z['discriminatedUnion']('action',[z['object']({'action':z['literal']('scaffold'),'ok':z['boolean']()['describe']('Whether\x20the\x20skeleton\x20was\x20created.'),'dir':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20created\x20pack\x20directory.'),'files':z['array'](z['string']())['describe']('Created\x20file\x20paths\x20(relative\x20to\x20dir).'),'errors':z['array'](z['string']())['describe']('Validation/creation\x20errors\x20(empty\x20=\x20ok).')}),z['object']({'action':z['literal']('list'),'packs':z['array'](z['object']({'name':z['string'](),'version':z['string'](),'layers':z['array'](z['string']()),'registered_at':z['number']()}))['describe']('Currently\x20registered\x20packs.')}),z['object']({'action':z['literal']('scan'),'results':z['array'](z['object']({'ok':z['boolean'](),'errors':z['array'](z['string']()),'registered':z['array'](z['string']())}))['describe']('One\x20registration\x20result\x20per\x20scanned\x20pack\x20directory.')}),z['object']({'action':z['literal']('repair_builtin_templates'),'dir':z['string'](),'reseeded_count':z['number']()['int']()['nonnegative'](),'results':z['array'](z['object']({'template':z['string'](),'status':z['string'](),'path':z['string'](),'detail':z['string']()['optional']()})),'note':z['string']()}),z['object']({'action':z['literal']('template_drift'),'dir':z['string'](),'drift_count':z['number']()['int']()['nonnegative'](),'drift':z['array'](z['object']({'template':z['string'](),'path':z['string'](),'state':z['string'](),'detail':z['string']()})),'note':z['string']()}),z['object']({'action':z['literal']('resolve'),'dir':z['string']()['describe']('Absolute\x20industry\x20root\x20directory.')}),z['object']({'action':z['literal']('list_files'),'dir':z['string']()['describe']('Absolute\x20industry\x20root\x20directory.'),'files':z['array'](z['object']({'path':z['string']()['describe']('Path\x20relative\x20to\x20the\x20industry\x20root.'),'is_dir':z['boolean'](),'size':z['number']()['describe']('File\x20size\x20in\x20bytes\x20(0\x20for\x20directories).'),'mtime':z['number']()['describe']('Last-modified\x20time\x20(epoch\x20ms).')}))['describe']('Files\x20under\x20the\x20industry\x20root.')}),z['object']({'action':z['literal']('read_file'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20read\x20file.'),'content':z['string']()['describe']('File\x20content\x20(text).')}),z['object']({'action':z['literal']('write_file'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20written\x20file.'),'ok':z['boolean']()['describe']('Whether\x20the\x20file\x20was\x20written.')}),z['object']({'action':z['literal']('get'),'category':z['string']()['describe']('Industry\x20name.'),'mode':z['object']({'name':z['string']()['describe']('Mode\x20name.'),'display_name':z['string']()['describe']('Mode\x20display\x20name.'),'key_risk':z['string']()['describe']('The\x20industry\x27s\x20dominant\x20risk.'),'needs':z['array'](z['string']())['describe']('Industry\x20need\x20descriptions\x20(satisfaction\x20requires\x20the\x20evaluation\x20puzzle).'),'analyze_questions':z['array'](z['string']())['optional']()['describe']('Industry-embedded\x20Analyze\x20key\x20questions\x20(max\x202)\x20—\x20the\x20fallback\x20'+'follow-ups\x20when\x20the\x20user\x27s\x20persona\x20has\x20none\x20embedded.')})['optional']()['describe']('Registered\x20industry\x20MODE\x20data\x20(key_risk/needs/analyze\x20defaults),\x20if\x20any.'),'dispute':z['unknown']()['optional']()['describe']('Registered\x20dispute\x20rules\x20(if\x20any).'),'compliance':z['unknown']()['optional']()['describe']('Registered\x20compliance\x20rules\x20(if\x20any).'),'supply':z['unknown']()['optional']()['describe']('Registered\x20supply\x20rules\x20(if\x20any).'),'rules':z['unknown']()['optional']()['describe']('Registered\x20declarative\x20industry\x20rules\x20(if\x20any).'),'playbook':z['unknown']()['optional']()['describe']('Registered\x20playbook\x20(if\x20any).')}),z['object']({'action':z['literal']('diff'),'name':z['string']()['describe']('Industry\x20name.'),'registered':z['object']({'version':z['string'](),'layers':z['array'](z['string']()),'registered_at':z['number']()})['nullable']()['describe']('Currently\x20registered\x20metadata.'),'disk':z['object']({'version':z['string'](),'layers':z['array'](z['string']())})['nullable']()['describe']('On-disk\x20manifest\x20metadata.'),'upgradable':z['boolean']()['describe']('Whether\x20the\x20on-disk\x20version\x20differs\x20from\x20registered.'),'layer_diff':z['object']({'added':z['array'](z['string']()),'removed':z['array'](z['string']())})['describe']('Layer\x20difference\x20(disk\x20vs\x20registered).')}),z['object']({'action':z['literal']('reset'),'ok':z['boolean']()['describe']('Whether\x20reset\x20succeeded.'),'layout':z['enum'](['merged','legacy'])['describe']('Layout\x20format\x20that\x20was\x20restored:\x20\x27merged\x27\x20(single\x20pack.json\x20+\x20playbook.md)\x20or\x20\x27legacy\x27\x20(split\x20files).'),'target':z['string']()['describe']('Normalised\x20reset\x20target\x20path\x20(pack\x20name\x20or\x20file).'),'restored_files':z['array'](z['string']())['describe']('Files\x20that\x20were\x20restored\x20to\x20pristine\x20annotated\x20templates.'),'errors':z['array'](z['string']())['describe']('Errors\x20encountered\x20during\x20reset.')}),z['object']({'action':z['literal']('delete_file'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20deleted\x20file\x20or\x20directory.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('create_file'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20created\x20file.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('create_dir'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20created\x20directory.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('copy'),'from':z['string']()['describe']('Absolute\x20source\x20path.'),'to':z['string']()['describe']('Absolute\x20destination\x20path.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('move'),'from':z['string']()['describe']('Absolute\x20source\x20path.'),'to':z['string']()['describe']('Absolute\x20destination\x20path.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('rename'),'from':z['string']()['describe']('Absolute\x20old\x20path.'),'to':z['string']()['describe']('Absolute\x20new\x20path.'),'ok':z['boolean']()}),...[RecommendIndustryResultSchema,ListModesResultSchema,DeriveUserModeResultSchema,EvolveUserModeResultSchema,RegisterUserModeResultSchema,UnregisterUserModeResultSchema,RegisterCustomMetricResultSchema,UnregisterCustomMetricResultSchema,RegisterCustomConstraintResultSchema,UnregisterCustomConstraintResultSchema,ListMetricsConstraintsResultSchema]])})['strict']();
|
|
1
|
+
import{z}from'zod';import{MODE_REGISTRY_ACTIONS,ModeRegistryFields,RecommendIndustryResultSchema,ListModesResultSchema,DeriveUserModeResultSchema,EvolveUserModeResultSchema,RegisterUserModeResultSchema,UnregisterUserModeResultSchema,RegisterCustomMetricResultSchema,UnregisterCustomMetricResultSchema,RegisterCustomConstraintResultSchema,UnregisterCustomConstraintResultSchema,ListMetricsConstraintsResultSchema}from'./modes.js';export const IndustryPackOperationInputSchema=z['object']({'action':z['enum'](['scaffold','list','scan','repair_builtin_templates','template_drift','resolve','list_files','read_file','write_file','get','diff','reset','delete_file','create_file','create_dir','copy','move','rename',...MODE_REGISTRY_ACTIONS])['describe']('Action:\x20\x27scaffold\x27\x20=\x20generate\x20a\x20pack\x20template\x20skeleton\x20(requires\x20name);\x20'+'\x27list\x27\x20=\x20list\x20registered\x20packs;\x20\x27scan\x27\x20=\x20scan\x20+\x20register\x20packs\x20under\x20the\x20default\x20directory;\x20'+'\x27template_drift\x27\x20=\x20REPORT\x20builtin\x20template\x20files\x20whose\x20on-disk\x20body\x20differs\x20from\x20the\x20in-code\x20catalog\x20'+'(classifies\x20no_sentinel_legacy\x20/\x20stale_release\x20/\x20user_modified);\x20run\x20it\x20FIRST\x20when\x20a\x20template\x20change\x20'+'\x27seems\x20to\x20have\x20no\x20effect.\x20'+'\x27repair_builtin_templates\x27\x20=\x20RESEED\x20those\x20legacy\x20files\x20from\x20the\x20in-code\x20catalog\x20'+'(identity-gated\x20on\x20a\x20known\x20builtin\x20id,\x20previous\x20body\x20kept\x20as\x20<file>.bak;\x20custom\x20templates\x20never\x20touched)'+'\x27resolve\x27\x20=\x20return\x20the\x20industry\x20root\x20directory;\x20\x27list_files\x27\x20=\x20list\x20files\x20under\x20the\x20industry\x20directory;\x20'+'\x27read_file\x27\x20=\x20read\x20a\x20file\x20under\x20the\x20industry\x20directory\x20(path\x20required);\x20'+'\x27write_file\x27\x20=\x20write\x20content\x20to\x20a\x20file\x20under\x20the\x20industry\x20directory\x20(path\x20+\x20content\x20required);\x20'+'\x27get\x27\x20=\x20return\x20registered\x20layer\x20data\x20for\x20an\x20industry\x20(name\x20required;\x20dispute/compliance/supply/rules/playbook);\x20'+'\x27diff\x27\x20=\x20compare\x20registered\x20vs\x20on-disk\x20manifest\x20version/layers\x20(name\x20required);\x20'+'\x27reset\x27\x20=\x20restore\x20a\x20file\x20or\x20entire\x20pack\x20folder\x20to\x20its\x20pristine\x20annotated\x20template\x20(path\x20required).\x20'+'\x27delete_file\x27\x20=\x20delete\x20a\x20file\x20or\x20directory\x20(path\x20required).\x20'+'\x27create_file\x27\x20=\x20create\x20an\x20empty\x20file\x20(path\x20required;\x20content\x20optional).\x20'+'\x27create_dir\x27\x20=\x20create\x20a\x20directory\x20recursively\x20(path\x20required).\x20'+'\x27copy\x27\x20=\x20copy\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x20'+'\x27move\x27\x20/\x20\x27rename\x27\x20=\x20move\x20or\x20rename\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x20'+'Mode\x20registry\x20(industry/scenario\x20configuration):\x20\x27recommend_industry\x27\x20=\x20business\x20intent\x20→\x20top-3\x20'+'similar\x20industries\x20+\x20reference\x20examples;\x20\x27list_modes\x27\x20=\x20builtin\x20+\x20custom\x20modes;\x20\x27derive_user_mode\x27\x20=\x20'+'derive\x20a\x20custom\x20mode\x20from\x20a\x20builtin;\x20\x27evolve_user_mode\x27\x20=\x20iterate\x20an\x20existing\x20custom\x20mode;\x20'+'\x27register_user_mode\x27\x20=\x20register\x20a\x20fully\x20custom\x20mode;\x20\x27unregister_user_mode\x27\x20=\x20delete\x20a\x20custom\x20mode;\x20'+'\x27register_custom_metric\x27\x20/\x20\x27register_custom_constraint\x27\x20=\x20register\x20global\x20evaluation\x20metric/constraint;\x20'+'\x27list_metrics_constraints\x27\x20=\x20list\x20metrics\x20+\x20constraints\x20(filterable).'),'name':z['string']()['optional']()['describe']('Industry\x20name\x20(lowercase\x20snake_case,\x20e.g.\x20\x27life_service\x27);\x20required\x20for\x20scaffold\x20and\x20get.'),'path':z['string']()['optional']()['describe']('Path\x20relative\x20to\x20the\x20industry\x20root\x20(required\x20for\x20read_file,\x20write_file,\x20reset,\x20create_file,\x20create_dir).'),'content':z['string']()['optional']()['describe']('Text\x20content\x20to\x20write\x20(required\x20for\x20write_file;\x20optional\x20for\x20create_file).'),'from':z['string']()['optional']()['describe']('Source\x20path\x20relative\x20to\x20the\x20industry\x20root\x20(required\x20for\x20copy/move/rename).'),'to':z['string']()['optional']()['describe']('Destination\x20path\x20relative\x20to\x20the\x20industry\x20root\x20(required\x20for\x20copy/move/rename).'),'authorize':z['boolean']()['optional']()['describe']('EXPLICIT\x20USER\x20AUTHORIZATION\x20(C5)\x20required\x20before\x20any\x20action\x20that\x20MODIFIES\x20a\x20user-editable\x20'+'template\x20file\x20(any\x20path\x20under\x20\x27<industry>/templates/\x27)\x20—\x20write_file\x20/\x20delete_file\x20/\x20reset\x20/\x20'+'move\x20/\x20rename\x20on\x20such\x20a\x20path,\x20copy\x20ONTO\x20an\x20existing\x20such\x20file,\x20and\x20every\x20'+'repair_builtin_templates\x20execution.\x20WITHOUT\x20this\x20flag\x20'+'the\x20action\x20refuses\x20(or\x20returns\x20a\x20plan-only\x20preview\x20for\x20repair_builtin_templates).\x20Set\x20it\x20ONLY\x20'+'after\x20the\x20user\x20has\x20explicitly\x20confirmed\x20the\x20specific\x20change\x20in\x20the\x20conversation.'),...ModeRegistryFields})['strict']();export const IndustryPackOperationOutputSchema=z['object']({'result':z['discriminatedUnion']('action',[z['object']({'action':z['literal']('scaffold'),'ok':z['boolean']()['describe']('Whether\x20the\x20skeleton\x20was\x20created.'),'dir':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20created\x20pack\x20directory.'),'files':z['array'](z['string']())['describe']('Created\x20file\x20paths\x20(relative\x20to\x20dir).'),'errors':z['array'](z['string']())['describe']('Validation/creation\x20errors\x20(empty\x20=\x20ok).')}),z['object']({'action':z['literal']('list'),'packs':z['array'](z['object']({'name':z['string'](),'version':z['string'](),'layers':z['array'](z['string']()),'registered_at':z['number']()}))['describe']('Currently\x20registered\x20packs.')}),z['object']({'action':z['literal']('scan'),'results':z['array'](z['object']({'ok':z['boolean'](),'errors':z['array'](z['string']()),'registered':z['array'](z['string']())}))['describe']('One\x20registration\x20result\x20per\x20scanned\x20pack\x20directory.')}),z['object']({'action':z['literal']('repair_builtin_templates'),'dir':z['string'](),'reseeded_count':z['number']()['int']()['nonnegative'](),'requires_authorization':z['boolean']()['optional']()['describe']('true\x20when\x20the\x20call\x20was\x20a\x20plan-only\x20PREVIEW\x20(no\x20writes).\x20Re-call\x20with\x20authorize=true\x20'+'after\x20the\x20user\x20explicitly\x20confirms\x20to\x20execute\x20the\x20reseed.'),'results':z['array'](z['object']({'template':z['string'](),'status':z['string'](),'path':z['string'](),'detail':z['string']()['optional']()})),'note':z['string']()}),z['object']({'action':z['literal']('template_drift'),'dir':z['string'](),'drift_count':z['number']()['int']()['nonnegative'](),'drift':z['array'](z['object']({'template':z['string'](),'path':z['string'](),'state':z['string'](),'detail':z['string']()})),'note':z['string']()}),z['object']({'action':z['literal']('resolve'),'dir':z['string']()['describe']('Absolute\x20industry\x20root\x20directory.')}),z['object']({'action':z['literal']('list_files'),'dir':z['string']()['describe']('Absolute\x20industry\x20root\x20directory.'),'files':z['array'](z['object']({'path':z['string']()['describe']('Path\x20relative\x20to\x20the\x20industry\x20root.'),'is_dir':z['boolean'](),'size':z['number']()['describe']('File\x20size\x20in\x20bytes\x20(0\x20for\x20directories).'),'mtime':z['number']()['describe']('Last-modified\x20time\x20(epoch\x20ms).')}))['describe']('Files\x20under\x20the\x20industry\x20root.')}),z['object']({'action':z['literal']('read_file'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20read\x20file.'),'content':z['string']()['describe']('File\x20content\x20(text).')}),z['object']({'action':z['literal']('write_file'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20written\x20file.'),'ok':z['boolean']()['describe']('Whether\x20the\x20file\x20was\x20written.')}),z['object']({'action':z['literal']('get'),'category':z['string']()['describe']('Industry\x20name.'),'mode':z['object']({'name':z['string']()['describe']('Mode\x20name.'),'display_name':z['string']()['describe']('Mode\x20display\x20name.'),'key_risk':z['string']()['describe']('The\x20industry\x27s\x20dominant\x20risk.'),'needs':z['array'](z['string']())['describe']('Industry\x20need\x20descriptions\x20(satisfaction\x20requires\x20the\x20evaluation\x20puzzle).'),'analyze_questions':z['array'](z['string']())['optional']()['describe']('Industry-embedded\x20Analyze\x20key\x20questions\x20(max\x202)\x20—\x20the\x20fallback\x20'+'follow-ups\x20when\x20the\x20user\x27s\x20persona\x20has\x20none\x20embedded.')})['optional']()['describe']('Registered\x20industry\x20MODE\x20data\x20(key_risk/needs/analyze\x20defaults),\x20if\x20any.'),'dispute':z['unknown']()['optional']()['describe']('Registered\x20dispute\x20rules\x20(if\x20any).'),'compliance':z['unknown']()['optional']()['describe']('Registered\x20compliance\x20rules\x20(if\x20any).'),'supply':z['unknown']()['optional']()['describe']('Registered\x20supply\x20rules\x20(if\x20any).'),'rules':z['unknown']()['optional']()['describe']('Registered\x20declarative\x20industry\x20rules\x20(if\x20any).'),'playbook':z['unknown']()['optional']()['describe']('Registered\x20playbook\x20(if\x20any).')}),z['object']({'action':z['literal']('diff'),'name':z['string']()['describe']('Industry\x20name.'),'registered':z['object']({'version':z['string'](),'layers':z['array'](z['string']()),'registered_at':z['number']()})['nullable']()['describe']('Currently\x20registered\x20metadata.'),'disk':z['object']({'version':z['string'](),'layers':z['array'](z['string']())})['nullable']()['describe']('On-disk\x20manifest\x20metadata.'),'upgradable':z['boolean']()['describe']('Whether\x20the\x20on-disk\x20version\x20differs\x20from\x20registered.'),'layer_diff':z['object']({'added':z['array'](z['string']()),'removed':z['array'](z['string']())})['describe']('Layer\x20difference\x20(disk\x20vs\x20registered).')}),z['object']({'action':z['literal']('reset'),'ok':z['boolean']()['describe']('Whether\x20reset\x20succeeded.'),'layout':z['enum'](['merged','legacy'])['describe']('Layout\x20format\x20that\x20was\x20restored:\x20\x27merged\x27\x20(single\x20pack.json\x20+\x20playbook.md)\x20or\x20\x27legacy\x27\x20(split\x20files).'),'target':z['string']()['describe']('Normalised\x20reset\x20target\x20path\x20(pack\x20name\x20or\x20file).'),'restored_files':z['array'](z['string']())['describe']('Files\x20that\x20were\x20restored\x20to\x20pristine\x20annotated\x20templates.'),'errors':z['array'](z['string']())['describe']('Errors\x20encountered\x20during\x20reset.')}),z['object']({'action':z['literal']('delete_file'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20deleted\x20file\x20or\x20directory.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('create_file'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20created\x20file.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('create_dir'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20created\x20directory.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('copy'),'from':z['string']()['describe']('Absolute\x20source\x20path.'),'to':z['string']()['describe']('Absolute\x20destination\x20path.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('move'),'from':z['string']()['describe']('Absolute\x20source\x20path.'),'to':z['string']()['describe']('Absolute\x20destination\x20path.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('rename'),'from':z['string']()['describe']('Absolute\x20old\x20path.'),'to':z['string']()['describe']('Absolute\x20new\x20path.'),'ok':z['boolean']()}),...[RecommendIndustryResultSchema,ListModesResultSchema,DeriveUserModeResultSchema,EvolveUserModeResultSchema,RegisterUserModeResultSchema,UnregisterUserModeResultSchema,RegisterCustomMetricResultSchema,UnregisterCustomMetricResultSchema,RegisterCustomConstraintResultSchema,UnregisterCustomConstraintResultSchema,ListMetricsConstraintsResultSchema]])})['strict']();
|
|
@@ -23,8 +23,8 @@ export declare const AskUserResultSchema: z.ZodObject<{
|
|
|
23
23
|
status: z.ZodLiteral<"success">;
|
|
24
24
|
action: z.ZodEnum<{
|
|
25
25
|
accept: "accept";
|
|
26
|
-
decline: "decline";
|
|
27
26
|
cancel: "cancel";
|
|
27
|
+
decline: "decline";
|
|
28
28
|
}>;
|
|
29
29
|
question: z.ZodString;
|
|
30
30
|
selected_ids: z.ZodArray<z.ZodString>;
|