@wowok/agent-mcp 2.5.5 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/README.md +5 -3
  2. package/dist/config/runtime.js +3 -6
  3. package/dist/extensions/capability-manifest.d.ts +125 -0
  4. package/dist/extensions/capability-manifest.js +594 -0
  5. package/dist/extensions/constraint-registry.d.ts +24 -0
  6. package/dist/extensions/constraint-registry.js +196 -0
  7. package/dist/extensions/index.d.ts +12 -0
  8. package/dist/extensions/index.js +6 -0
  9. package/dist/extensions/metric-registry.d.ts +26 -0
  10. package/dist/extensions/metric-registry.js +257 -0
  11. package/dist/extensions/mode-evaluator.d.ts +15 -0
  12. package/dist/extensions/mode-evaluator.js +170 -0
  13. package/dist/extensions/modes.d.ts +2 -0
  14. package/dist/extensions/modes.js +407 -0
  15. package/dist/extensions/registry.d.ts +48 -0
  16. package/dist/extensions/registry.js +629 -0
  17. package/dist/extensions/types.d.ts +218 -0
  18. package/dist/extensions/types.js +1 -0
  19. package/dist/harness/checkpoint.js +2 -2
  20. package/dist/knowledge/deployment-scanner.d.ts +3 -0
  21. package/dist/knowledge/deployment-scanner.js +64 -3
  22. package/dist/knowledge/flywheel-loop.js +2 -5
  23. package/dist/knowledge/guard-risk.d.ts +13 -0
  24. package/dist/knowledge/guard-risk.js +57 -0
  25. package/dist/knowledge/guard-templates.js +278 -0
  26. package/dist/knowledge/machine-templates.js +20 -1
  27. package/dist/knowledge/overrides-loader.js +2 -4
  28. package/dist/knowledge/progress-ledger.js +3 -0
  29. package/dist/knowledge/progress-translation.js +5 -1
  30. package/dist/knowledge/service-confirm.d.ts +14 -5
  31. package/dist/knowledge/service-confirm.js +116 -8
  32. package/dist/knowledge/tool-constraints.js +6 -2
  33. package/dist/loop-engineering/improve.js +2 -4
  34. package/dist/project/deployment-bridge.d.ts +5 -0
  35. package/dist/project/deployment-bridge.js +119 -0
  36. package/dist/project/deployment-doc.d.ts +3 -0
  37. package/dist/project/deployment-doc.js +72 -10
  38. package/dist/project/evaluation.d.ts +2 -0
  39. package/dist/project/evaluation.js +578 -86
  40. package/dist/project/graph-builder.d.ts +4 -1
  41. package/dist/project/graph-builder.js +141 -63
  42. package/dist/project/graph.d.ts +1 -0
  43. package/dist/project/handlers.d.ts +221 -5
  44. package/dist/project/handlers.js +933 -14
  45. package/dist/project/index.js +2 -6
  46. package/dist/project/project-store.js +2 -5
  47. package/dist/project/stage-gate.d.ts +4 -0
  48. package/dist/project/stage-gate.js +64 -5
  49. package/dist/project/task-tracker.d.ts +26 -0
  50. package/dist/project/task-tracker.js +78 -0
  51. package/dist/safety/preview.js +16 -0
  52. package/dist/schema/call/allocation.d.ts +16 -16
  53. package/dist/schema/call/base.d.ts +21 -13
  54. package/dist/schema/call/base.js +27 -6
  55. package/dist/schema/call/bridge.d.ts +5 -5
  56. package/dist/schema/call/bridge.js +3 -1
  57. package/dist/schema/call/demand.d.ts +23 -31
  58. package/dist/schema/call/guard.js +1 -1
  59. package/dist/schema/call/machine.d.ts +402 -376
  60. package/dist/schema/call/order.d.ts +149 -228
  61. package/dist/schema/call/order.js +7 -3
  62. package/dist/schema/call/payment.d.ts +183 -3
  63. package/dist/schema/call/payment.js +21 -3
  64. package/dist/schema/call/personal.d.ts +241 -52
  65. package/dist/schema/call/progress.d.ts +53 -61
  66. package/dist/schema/call/progress.js +18 -4
  67. package/dist/schema/call/repository.d.ts +23 -31
  68. package/dist/schema/call/semantic.d.ts +1 -1
  69. package/dist/schema/call/semantic.js +30 -1
  70. package/dist/schema/call/service.d.ts +95 -119
  71. package/dist/schema/call/service.js +22 -1
  72. package/dist/schema/common/index.d.ts +11 -2
  73. package/dist/schema/common/index.js +43 -14
  74. package/dist/schema/config/index.d.ts +12 -12
  75. package/dist/schema/local/index.d.ts +140 -143
  76. package/dist/schema/local/index.js +44 -23
  77. package/dist/schema/messenger/index.d.ts +290 -62
  78. package/dist/schema/messenger/index.js +2 -2
  79. package/dist/schema/operations.d.ts +680 -545
  80. package/dist/schema/operations.js +22 -0
  81. package/dist/schema/project/index.d.ts +2064 -84
  82. package/dist/schema/project/index.js +354 -12
  83. package/dist/schema/query/index.d.ts +715 -354
  84. package/dist/schema/query/index.js +164 -31
  85. package/dist/schema/schema-query/index.d.ts +15 -3
  86. package/dist/schema/schema-query/index.js +23 -5
  87. package/dist/schema/trust/index.d.ts +8 -8
  88. package/dist/schema/utils/node-parser.js +7 -4
  89. package/dist/schema-query/index.d.ts +7 -1
  90. package/dist/schema-query/index.js +204 -4
  91. package/dist/schemas/account_operation.output.json +14 -22
  92. package/dist/schemas/account_operation.schema.json +11 -25
  93. package/dist/schemas/bridge_operation.output.json +6 -0
  94. package/dist/schemas/bridge_operation.schema.json +1 -1
  95. package/dist/schemas/guard-templates.json +379 -0
  96. package/dist/schemas/guard2file.schema.json +1 -1
  97. package/dist/schemas/index.json +1 -1
  98. package/dist/schemas/local_info_operation.output.json +6 -0
  99. package/dist/schemas/local_mark_operation.output.json +7 -1
  100. package/dist/schemas/local_mark_operation.schema.json +1 -1
  101. package/dist/schemas/machineNode2file.schema.json +1 -1
  102. package/dist/schemas/messenger_operation.schema.json +10 -10
  103. package/dist/schemas/onchain_events.output.json +1 -1
  104. package/dist/schemas/onchain_operations.schema.json +348 -296
  105. package/dist/schemas/onchain_operations_allocation.schema.json +34 -25
  106. package/dist/schemas/onchain_operations_arbitration.schema.json +8 -8
  107. package/dist/schemas/onchain_operations_contact.schema.json +8 -8
  108. package/dist/schemas/onchain_operations_demand.schema.json +8 -8
  109. package/dist/schemas/onchain_operations_gen_passport.schema.json +14 -14
  110. package/dist/schemas/onchain_operations_gen_proof.schema.json +2 -2
  111. package/dist/schemas/onchain_operations_guard.schema.json +1 -1
  112. package/dist/schemas/onchain_operations_machine.schema.json +41 -33
  113. package/dist/schemas/onchain_operations_order.schema.json +71 -77
  114. package/dist/schemas/onchain_operations_payment.schema.json +141 -111
  115. package/dist/schemas/onchain_operations_permission.schema.json +2 -2
  116. package/dist/schemas/onchain_operations_personal.schema.json +7 -7
  117. package/dist/schemas/onchain_operations_progress.schema.json +8 -8
  118. package/dist/schemas/onchain_operations_proof.schema.json +7 -7
  119. package/dist/schemas/onchain_operations_repository.schema.json +8 -8
  120. package/dist/schemas/onchain_operations_reward.schema.json +10 -10
  121. package/dist/schemas/onchain_operations_service.schema.json +46 -35
  122. package/dist/schemas/onchain_operations_treasury.schema.json +8 -8
  123. package/dist/schemas/onchain_table_data.output.json +33 -25
  124. package/dist/schemas/onchain_table_data.schema.json +12 -12
  125. package/dist/schemas/project_operation.output.json +1352 -20
  126. package/dist/schemas/project_operation.schema.json +53 -4
  127. package/dist/schemas/query_toolkit.output.json +111 -82
  128. package/dist/schemas/query_toolkit.schema.json +9 -13
  129. package/dist/schemas/schema_query.output.json +7 -3
  130. package/dist/schemas/schema_query.schema.json +17 -3
  131. package/dist/telemetry/storage.js +2 -2
  132. package/dist/tools/handlers/local.js +20 -5
  133. package/dist/tools/handlers/onchain.js +36 -0
  134. package/dist/tools/handlers/project.js +72 -1
  135. package/dist/tools/handlers/query.js +27 -0
  136. package/dist/tools/handlers/schema-query.js +19 -0
  137. package/dist/tools/handlers/task-status.d.ts +170 -0
  138. package/dist/tools/handlers/task-status.js +55 -0
  139. package/dist/tools/handlers/wip.js +47 -1
  140. package/dist/tools/index.js +212 -8
  141. package/dist/tools/retry.d.ts +8 -0
  142. package/dist/tools/retry.js +85 -0
  143. package/dist/tools/wip-deploy-assist.d.ts +28 -0
  144. package/dist/tools/wip-deploy-assist.js +278 -0
  145. package/package.json +2 -2
  146. package/dist/schemas/guard-node-examples.md +0 -199
@@ -73,7 +73,7 @@ export declare const BuySchema: z.ZodObject<{
73
73
  }>;
74
74
  export declare const DiscountSchema: z.ZodObject<{
75
75
  name: z.ZodString;
76
- discount_type: z.ZodUnion<[z.ZodLiteral<import("@wowok/wowok").DiscountType.RATES>, z.ZodLiteral<import("@wowok/wowok").DiscountType.FIXED>]>;
76
+ discount_type: z.ZodUnion<[z.ZodEnum<["RATES", "FIXED"]>, z.ZodEffects<z.ZodNumber, "FIXED" | "RATES", number>]>;
77
77
  discount_value: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
78
78
  benchmark: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
79
79
  time_ms_start: z.ZodOptional<z.ZodNumber>;
@@ -115,7 +115,7 @@ export declare const DiscountSchema: z.ZodObject<{
115
115
  check_all_founded?: boolean | undefined;
116
116
  };
117
117
  count: number;
118
- discount_type: import("@wowok/wowok").DiscountType;
118
+ discount_type: "FIXED" | "RATES";
119
119
  transferable: boolean;
120
120
  discount_value: string | number;
121
121
  time_ms_end: number;
@@ -131,7 +131,7 @@ export declare const DiscountSchema: z.ZodObject<{
131
131
  check_all_founded?: boolean | undefined;
132
132
  };
133
133
  count: number;
134
- discount_type: import("@wowok/wowok").DiscountType;
134
+ discount_type: number | "FIXED" | "RATES";
135
135
  transferable: boolean;
136
136
  discount_value: string | number;
137
137
  time_ms_end: number;
@@ -878,7 +878,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
878
878
  }, {
879
879
  op: "clear";
880
880
  }>]>>;
881
- repositories: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
881
+ repositories: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
882
882
  op: z.ZodUnion<[z.ZodLiteral<"add">, z.ZodLiteral<"set">]>;
883
883
  objects: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
884
884
  }, "strict", z.ZodTypeAny, {
@@ -902,8 +902,16 @@ export declare const CallService_DataSchema: z.ZodObject<{
902
902
  op: "clear";
903
903
  }, {
904
904
  op: "clear";
905
- }>]>>;
906
- rewards: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
905
+ }>]>, {
906
+ op: "set" | "add";
907
+ objects: string[];
908
+ } | {
909
+ op: "remove";
910
+ objects: string[];
911
+ } | {
912
+ op: "clear";
913
+ }, unknown>>;
914
+ rewards: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
907
915
  op: z.ZodUnion<[z.ZodLiteral<"add">, z.ZodLiteral<"set">]>;
908
916
  objects: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
909
917
  }, "strict", z.ZodTypeAny, {
@@ -927,8 +935,16 @@ export declare const CallService_DataSchema: z.ZodObject<{
927
935
  op: "clear";
928
936
  }, {
929
937
  op: "clear";
930
- }>]>>;
931
- arbitrations: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
938
+ }>]>, {
939
+ op: "set" | "add";
940
+ objects: string[];
941
+ } | {
942
+ op: "remove";
943
+ objects: string[];
944
+ } | {
945
+ op: "clear";
946
+ }, unknown>>;
947
+ arbitrations: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
932
948
  op: z.ZodUnion<[z.ZodLiteral<"add">, z.ZodLiteral<"set">]>;
933
949
  objects: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
934
950
  }, "strict", z.ZodTypeAny, {
@@ -952,11 +968,19 @@ export declare const CallService_DataSchema: z.ZodObject<{
952
968
  op: "clear";
953
969
  }, {
954
970
  op: "clear";
955
- }>]>>;
971
+ }>]>, {
972
+ op: "set" | "add";
973
+ objects: string[];
974
+ } | {
975
+ op: "remove";
976
+ objects: string[];
977
+ } | {
978
+ op: "clear";
979
+ }, unknown>>;
956
980
  machine: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodNull]>>;
957
981
  discount: z.ZodOptional<z.ZodObject<{
958
982
  name: z.ZodString;
959
- discount_type: z.ZodUnion<[z.ZodLiteral<import("@wowok/wowok").DiscountType.RATES>, z.ZodLiteral<import("@wowok/wowok").DiscountType.FIXED>]>;
983
+ discount_type: z.ZodUnion<[z.ZodEnum<["RATES", "FIXED"]>, z.ZodEffects<z.ZodNumber, "FIXED" | "RATES", number>]>;
960
984
  discount_value: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
961
985
  benchmark: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
962
986
  time_ms_start: z.ZodOptional<z.ZodNumber>;
@@ -998,7 +1022,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
998
1022
  check_all_founded?: boolean | undefined;
999
1023
  };
1000
1024
  count: number;
1001
- discount_type: import("@wowok/wowok").DiscountType;
1025
+ discount_type: "FIXED" | "RATES";
1002
1026
  transferable: boolean;
1003
1027
  discount_value: string | number;
1004
1028
  time_ms_end: number;
@@ -1014,7 +1038,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
1014
1038
  check_all_founded?: boolean | undefined;
1015
1039
  };
1016
1040
  count: number;
1017
- discount_type: import("@wowok/wowok").DiscountType;
1041
+ discount_type: number | "FIXED" | "RATES";
1018
1042
  transferable: boolean;
1019
1043
  discount_value: string | number;
1020
1044
  time_ms_end: number;
@@ -1064,7 +1088,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
1064
1088
  Signer: "signer";
1065
1089
  }>]>;
1066
1090
  sharing: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
1067
- mode: z.ZodEnum<["Amount", "Rate", "Surplus"]>;
1091
+ mode: z.ZodUnion<[z.ZodEnum<["Amount", "Rate", "Surplus"]>, z.ZodEffects<z.ZodNumber, "Amount" | "Rate" | "Surplus", number>]>;
1068
1092
  }, "strip", z.ZodTypeAny, {
1069
1093
  mode: "Amount" | "Rate" | "Surplus";
1070
1094
  sharing: string | number;
@@ -1079,7 +1103,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
1079
1103
  Signer: "signer";
1080
1104
  };
1081
1105
  }, {
1082
- mode: "Amount" | "Rate" | "Surplus";
1106
+ mode: number | "Amount" | "Rate" | "Surplus";
1083
1107
  sharing: string | number;
1084
1108
  who: {
1085
1109
  GuardIdentifier: number;
@@ -1115,7 +1139,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
1115
1139
  }, {
1116
1140
  guard: string;
1117
1141
  sharing: {
1118
- mode: "Amount" | "Rate" | "Surplus";
1142
+ mode: number | "Amount" | "Rate" | "Surplus";
1119
1143
  sharing: string | number;
1120
1144
  who: {
1121
1145
  GuardIdentifier: number;
@@ -1158,7 +1182,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
1158
1182
  allocators: {
1159
1183
  guard: string;
1160
1184
  sharing: {
1161
- mode: "Amount" | "Rate" | "Surplus";
1185
+ mode: number | "Amount" | "Rate" | "Surplus";
1162
1186
  sharing: string | number;
1163
1187
  who: {
1164
1188
  GuardIdentifier: number;
@@ -1350,7 +1374,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
1350
1374
  check_all_founded?: boolean | undefined;
1351
1375
  };
1352
1376
  count: number;
1353
- discount_type: import("@wowok/wowok").DiscountType;
1377
+ discount_type: "FIXED" | "RATES";
1354
1378
  transferable: boolean;
1355
1379
  discount_value: string | number;
1356
1380
  time_ms_end: number;
@@ -1488,7 +1512,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
1488
1512
  allocators: {
1489
1513
  guard: string;
1490
1514
  sharing: {
1491
- mode: "Amount" | "Rate" | "Surplus";
1515
+ mode: number | "Amount" | "Rate" | "Surplus";
1492
1516
  sharing: string | number;
1493
1517
  who: {
1494
1518
  GuardIdentifier: number;
@@ -1542,31 +1566,15 @@ export declare const CallService_DataSchema: z.ZodObject<{
1542
1566
  check_all_founded?: boolean | undefined;
1543
1567
  };
1544
1568
  count: number;
1545
- discount_type: import("@wowok/wowok").DiscountType;
1569
+ discount_type: number | "FIXED" | "RATES";
1546
1570
  transferable: boolean;
1547
1571
  discount_value: string | number;
1548
1572
  time_ms_end: number;
1549
1573
  benchmark?: string | number | undefined;
1550
1574
  time_ms_start?: number | undefined;
1551
1575
  } | undefined;
1552
- rewards?: {
1553
- op: "set" | "add";
1554
- objects: string[];
1555
- } | {
1556
- op: "remove";
1557
- objects: string[];
1558
- } | {
1559
- op: "clear";
1560
- } | undefined;
1561
- arbitrations?: {
1562
- op: "set" | "add";
1563
- objects: string[];
1564
- } | {
1565
- op: "remove";
1566
- objects: string[];
1567
- } | {
1568
- op: "clear";
1569
- } | undefined;
1576
+ rewards?: unknown;
1577
+ arbitrations?: unknown;
1570
1578
  pause?: boolean | undefined;
1571
1579
  um?: string | null | undefined;
1572
1580
  owner_receive?: {
@@ -1582,15 +1590,7 @@ export declare const CallService_DataSchema: z.ZodObject<{
1582
1590
  id: string;
1583
1591
  content_raw?: any;
1584
1592
  }[] | undefined;
1585
- repositories?: {
1586
- op: "set" | "add";
1587
- objects: string[];
1588
- } | {
1589
- op: "remove";
1590
- objects: string[];
1591
- } | {
1592
- op: "clear";
1593
- } | undefined;
1593
+ repositories?: unknown;
1594
1594
  customer_required?: string[] | undefined;
1595
1595
  location?: string | undefined;
1596
1596
  compensation_fund_add?: {
@@ -2057,7 +2057,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2057
2057
  }, {
2058
2058
  op: "clear";
2059
2059
  }>]>>;
2060
- repositories: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
2060
+ repositories: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
2061
2061
  op: z.ZodUnion<[z.ZodLiteral<"add">, z.ZodLiteral<"set">]>;
2062
2062
  objects: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
2063
2063
  }, "strict", z.ZodTypeAny, {
@@ -2081,8 +2081,16 @@ export declare const CallService_InputSchema: z.ZodObject<{
2081
2081
  op: "clear";
2082
2082
  }, {
2083
2083
  op: "clear";
2084
- }>]>>;
2085
- rewards: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
2084
+ }>]>, {
2085
+ op: "set" | "add";
2086
+ objects: string[];
2087
+ } | {
2088
+ op: "remove";
2089
+ objects: string[];
2090
+ } | {
2091
+ op: "clear";
2092
+ }, unknown>>;
2093
+ rewards: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
2086
2094
  op: z.ZodUnion<[z.ZodLiteral<"add">, z.ZodLiteral<"set">]>;
2087
2095
  objects: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
2088
2096
  }, "strict", z.ZodTypeAny, {
@@ -2106,8 +2114,16 @@ export declare const CallService_InputSchema: z.ZodObject<{
2106
2114
  op: "clear";
2107
2115
  }, {
2108
2116
  op: "clear";
2109
- }>]>>;
2110
- arbitrations: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
2117
+ }>]>, {
2118
+ op: "set" | "add";
2119
+ objects: string[];
2120
+ } | {
2121
+ op: "remove";
2122
+ objects: string[];
2123
+ } | {
2124
+ op: "clear";
2125
+ }, unknown>>;
2126
+ arbitrations: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
2111
2127
  op: z.ZodUnion<[z.ZodLiteral<"add">, z.ZodLiteral<"set">]>;
2112
2128
  objects: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
2113
2129
  }, "strict", z.ZodTypeAny, {
@@ -2131,11 +2147,19 @@ export declare const CallService_InputSchema: z.ZodObject<{
2131
2147
  op: "clear";
2132
2148
  }, {
2133
2149
  op: "clear";
2134
- }>]>>;
2150
+ }>]>, {
2151
+ op: "set" | "add";
2152
+ objects: string[];
2153
+ } | {
2154
+ op: "remove";
2155
+ objects: string[];
2156
+ } | {
2157
+ op: "clear";
2158
+ }, unknown>>;
2135
2159
  machine: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodNull]>>;
2136
2160
  discount: z.ZodOptional<z.ZodObject<{
2137
2161
  name: z.ZodString;
2138
- discount_type: z.ZodUnion<[z.ZodLiteral<import("@wowok/wowok").DiscountType.RATES>, z.ZodLiteral<import("@wowok/wowok").DiscountType.FIXED>]>;
2162
+ discount_type: z.ZodUnion<[z.ZodEnum<["RATES", "FIXED"]>, z.ZodEffects<z.ZodNumber, "FIXED" | "RATES", number>]>;
2139
2163
  discount_value: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2140
2164
  benchmark: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
2141
2165
  time_ms_start: z.ZodOptional<z.ZodNumber>;
@@ -2177,7 +2201,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2177
2201
  check_all_founded?: boolean | undefined;
2178
2202
  };
2179
2203
  count: number;
2180
- discount_type: import("@wowok/wowok").DiscountType;
2204
+ discount_type: "FIXED" | "RATES";
2181
2205
  transferable: boolean;
2182
2206
  discount_value: string | number;
2183
2207
  time_ms_end: number;
@@ -2193,7 +2217,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2193
2217
  check_all_founded?: boolean | undefined;
2194
2218
  };
2195
2219
  count: number;
2196
- discount_type: import("@wowok/wowok").DiscountType;
2220
+ discount_type: number | "FIXED" | "RATES";
2197
2221
  transferable: boolean;
2198
2222
  discount_value: string | number;
2199
2223
  time_ms_end: number;
@@ -2243,7 +2267,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2243
2267
  Signer: "signer";
2244
2268
  }>]>;
2245
2269
  sharing: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2246
- mode: z.ZodEnum<["Amount", "Rate", "Surplus"]>;
2270
+ mode: z.ZodUnion<[z.ZodEnum<["Amount", "Rate", "Surplus"]>, z.ZodEffects<z.ZodNumber, "Amount" | "Rate" | "Surplus", number>]>;
2247
2271
  }, "strip", z.ZodTypeAny, {
2248
2272
  mode: "Amount" | "Rate" | "Surplus";
2249
2273
  sharing: string | number;
@@ -2258,7 +2282,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2258
2282
  Signer: "signer";
2259
2283
  };
2260
2284
  }, {
2261
- mode: "Amount" | "Rate" | "Surplus";
2285
+ mode: number | "Amount" | "Rate" | "Surplus";
2262
2286
  sharing: string | number;
2263
2287
  who: {
2264
2288
  GuardIdentifier: number;
@@ -2294,7 +2318,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2294
2318
  }, {
2295
2319
  guard: string;
2296
2320
  sharing: {
2297
- mode: "Amount" | "Rate" | "Surplus";
2321
+ mode: number | "Amount" | "Rate" | "Surplus";
2298
2322
  sharing: string | number;
2299
2323
  who: {
2300
2324
  GuardIdentifier: number;
@@ -2337,7 +2361,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2337
2361
  allocators: {
2338
2362
  guard: string;
2339
2363
  sharing: {
2340
- mode: "Amount" | "Rate" | "Surplus";
2364
+ mode: number | "Amount" | "Rate" | "Surplus";
2341
2365
  sharing: string | number;
2342
2366
  who: {
2343
2367
  GuardIdentifier: number;
@@ -2529,7 +2553,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2529
2553
  check_all_founded?: boolean | undefined;
2530
2554
  };
2531
2555
  count: number;
2532
- discount_type: import("@wowok/wowok").DiscountType;
2556
+ discount_type: "FIXED" | "RATES";
2533
2557
  transferable: boolean;
2534
2558
  discount_value: string | number;
2535
2559
  time_ms_end: number;
@@ -2667,7 +2691,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2667
2691
  allocators: {
2668
2692
  guard: string;
2669
2693
  sharing: {
2670
- mode: "Amount" | "Rate" | "Surplus";
2694
+ mode: number | "Amount" | "Rate" | "Surplus";
2671
2695
  sharing: string | number;
2672
2696
  who: {
2673
2697
  GuardIdentifier: number;
@@ -2721,31 +2745,15 @@ export declare const CallService_InputSchema: z.ZodObject<{
2721
2745
  check_all_founded?: boolean | undefined;
2722
2746
  };
2723
2747
  count: number;
2724
- discount_type: import("@wowok/wowok").DiscountType;
2748
+ discount_type: number | "FIXED" | "RATES";
2725
2749
  transferable: boolean;
2726
2750
  discount_value: string | number;
2727
2751
  time_ms_end: number;
2728
2752
  benchmark?: string | number | undefined;
2729
2753
  time_ms_start?: number | undefined;
2730
2754
  } | undefined;
2731
- rewards?: {
2732
- op: "set" | "add";
2733
- objects: string[];
2734
- } | {
2735
- op: "remove";
2736
- objects: string[];
2737
- } | {
2738
- op: "clear";
2739
- } | undefined;
2740
- arbitrations?: {
2741
- op: "set" | "add";
2742
- objects: string[];
2743
- } | {
2744
- op: "remove";
2745
- objects: string[];
2746
- } | {
2747
- op: "clear";
2748
- } | undefined;
2755
+ rewards?: unknown;
2756
+ arbitrations?: unknown;
2749
2757
  pause?: boolean | undefined;
2750
2758
  um?: string | null | undefined;
2751
2759
  owner_receive?: {
@@ -2761,15 +2769,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
2761
2769
  id: string;
2762
2770
  content_raw?: any;
2763
2771
  }[] | undefined;
2764
- repositories?: {
2765
- op: "set" | "add";
2766
- objects: string[];
2767
- } | {
2768
- op: "remove";
2769
- objects: string[];
2770
- } | {
2771
- op: "clear";
2772
- } | undefined;
2772
+ repositories?: unknown;
2773
2773
  customer_required?: string[] | undefined;
2774
2774
  location?: string | undefined;
2775
2775
  compensation_fund_add?: {
@@ -3132,7 +3132,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
3132
3132
  check_all_founded?: boolean | undefined;
3133
3133
  };
3134
3134
  count: number;
3135
- discount_type: import("@wowok/wowok").DiscountType;
3135
+ discount_type: "FIXED" | "RATES";
3136
3136
  transferable: boolean;
3137
3137
  discount_value: string | number;
3138
3138
  time_ms_end: number;
@@ -3312,7 +3312,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
3312
3312
  allocators: {
3313
3313
  guard: string;
3314
3314
  sharing: {
3315
- mode: "Amount" | "Rate" | "Surplus";
3315
+ mode: number | "Amount" | "Rate" | "Surplus";
3316
3316
  sharing: string | number;
3317
3317
  who: {
3318
3318
  GuardIdentifier: number;
@@ -3366,31 +3366,15 @@ export declare const CallService_InputSchema: z.ZodObject<{
3366
3366
  check_all_founded?: boolean | undefined;
3367
3367
  };
3368
3368
  count: number;
3369
- discount_type: import("@wowok/wowok").DiscountType;
3369
+ discount_type: number | "FIXED" | "RATES";
3370
3370
  transferable: boolean;
3371
3371
  discount_value: string | number;
3372
3372
  time_ms_end: number;
3373
3373
  benchmark?: string | number | undefined;
3374
3374
  time_ms_start?: number | undefined;
3375
3375
  } | undefined;
3376
- rewards?: {
3377
- op: "set" | "add";
3378
- objects: string[];
3379
- } | {
3380
- op: "remove";
3381
- objects: string[];
3382
- } | {
3383
- op: "clear";
3384
- } | undefined;
3385
- arbitrations?: {
3386
- op: "set" | "add";
3387
- objects: string[];
3388
- } | {
3389
- op: "remove";
3390
- objects: string[];
3391
- } | {
3392
- op: "clear";
3393
- } | undefined;
3376
+ rewards?: unknown;
3377
+ arbitrations?: unknown;
3394
3378
  pause?: boolean | undefined;
3395
3379
  um?: string | null | undefined;
3396
3380
  owner_receive?: {
@@ -3406,15 +3390,7 @@ export declare const CallService_InputSchema: z.ZodObject<{
3406
3390
  id: string;
3407
3391
  content_raw?: any;
3408
3392
  }[] | undefined;
3409
- repositories?: {
3410
- op: "set" | "add";
3411
- objects: string[];
3412
- } | {
3413
- op: "remove";
3414
- objects: string[];
3415
- } | {
3416
- op: "clear";
3417
- } | undefined;
3393
+ repositories?: unknown;
3418
3394
  customer_required?: string[] | undefined;
3419
3395
  location?: string | undefined;
3420
3396
  compensation_fund_add?: {
@@ -73,7 +73,28 @@ export const CallService_DataSchema = z.object({
73
73
  owner_receive: ReceivedObjectsOrRecentlySchema.optional().describe("Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object."),
74
74
  um: z.union([NameOrAddressSchema, z.null()]).optional().describe("Contact object ID or name."),
75
75
  pause: z.boolean().optional().describe("Whether to pause accepting new orders."),
76
- publish: z.boolean().optional().describe("Whether to publish the Service. After publishing, customers can place orders; at the same time, service commitments such as machine, order_allocators, arbitrations, etc. will be immutable."),
76
+ publish: z.boolean().optional().describe("Whether to publish the Service. After publishing, customers can place orders. " +
77
+ "BUG-04 fix (v2.2 — verified against Move source service.move + SDK service.ts):\n" +
78
+ " SDK-LOCKED after publish (checkNotPublished — cannot modify, must clone new Service):\n" +
79
+ " • machine (permanently locked — workflow template)\n" +
80
+ " • order_allocators (permanently locked — fund distribution rules)\n" +
81
+ " • arbitrations (permanently locked at SDK level — dispute resolution objects)\n" +
82
+ " TIME-LOCKED after publish (modifiable only after pause + setting_lock_duration elapsed):\n" +
83
+ " • rewards remove/clear (assert_not_published — time-based lock)\n" +
84
+ " REMAIN MUTABLE after publish (no SDK check, no Move check):\n" +
85
+ " • buy_guard (CAN be modified after publish — purchase eligibility guard)\n" +
86
+ " • setting_locked_time_add (CAN be extended — only increases, never decreases)\n" +
87
+ " • sales, discount, description, location, pause, repositories,\n" +
88
+ " • compensation_fund_add, customer_required, um (Contact), rewards add\n" +
89
+ "These 3 SDK-LOCKED fields (machine/order_allocators/arbitrations) MUST be set BEFORE publish=true.\n" +
90
+ "\n" +
91
+ "SCHEMA-03 / P0-01 fix — DEPLOYMENT WORKFLOW (two-phase, avoids circular dependency):\n" +
92
+ " Phase 1 — CREATE (no publish): object={name:'my-service', type_parameter, permission} + machine + order_allocators + arbitrations.\n" +
93
+ " NOTE: buy_guard can use a LocalMark NAME (not address) to break the Guard→Service circular dependency.\n" +
94
+ " The name is resolved to an address at transaction build time.\n" +
95
+ " Phase 2 — PUBLISH: object='my-service' (string ref) + publish=true.\n" +
96
+ " All SDK-LOCKED fields must be set in Phase 1; Phase 2 only flips the publish flag.\n" +
97
+ " Post-publish updates: buy_guard, sales, description, repositories (add), rewards (add), etc."),
77
98
  }).strict().describe("On-chain Service operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, type_parameter, permission, ...} to create a Service. NOTE: 'name' goes INSIDE 'object', NOT at the data root level. 'permission' can be a new Permission object or reference an existing one - check 'object' field description for details. (2) OPERATE EXISTING: Set 'object' field with STRING format (object ID or name). The 'object' field is CRITICAL and REQUIRED in both cases. STRING for existing, OBJECT for new creation.");
78
99
  export const CallService_InputSchema = z.object({
79
100
  data: CallService_DataSchema,
@@ -43,7 +43,10 @@ export declare const ManyAccountOrMark_AddressSchema: z.ZodObject<{
43
43
  }[];
44
44
  check_all_founded?: boolean | undefined;
45
45
  }>;
46
- export declare const AccountOrMark_AddressAISchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
46
+ export declare const AccountOrMark_AddressAISchema: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, {
47
+ name_or_address: string;
48
+ local_mark_first: boolean;
49
+ }, string>, z.ZodObject<{
47
50
  name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
48
51
  local_mark_first: z.ZodOptional<z.ZodBoolean>;
49
52
  }, "strict", z.ZodTypeAny, {
@@ -53,7 +56,13 @@ export declare const AccountOrMark_AddressAISchema: z.ZodUnion<[z.ZodString, z.Z
53
56
  name_or_address?: string | undefined;
54
57
  local_mark_first?: boolean | undefined;
55
58
  }>]>;
56
- export declare const ManyAccountOrMark_AddressAISchema: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
59
+ export declare const ManyAccountOrMark_AddressAISchema: z.ZodUnion<[z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, {
60
+ entities: {
61
+ name_or_address: string;
62
+ local_mark_first: boolean;
63
+ }[];
64
+ check_all_founded: boolean;
65
+ }, string[]>, z.ZodObject<{
57
66
  entities: z.ZodArray<z.ZodObject<{
58
67
  name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
59
68
  local_mark_first: z.ZodOptional<z.ZodBoolean>;
@@ -83,19 +83,26 @@ export const ManyAccountOrMark_AddressSchema = z.object({
83
83
  check_all_founded: z.boolean().optional().describe("Whether to check all entities are found, if true, all entities must be found (abort and throw exception if any ID not found); if false, only return found IDs"),
84
84
  }).strict().describe("Used to batch find account or object IDs by name");
85
85
  export const AccountOrMark_AddressAISchema = z.union([
86
- z.string().describe("Account name, address (0x...), or mark name. " +
86
+ NameOrAddressSchema.transform(s => ({ name_or_address: s, local_mark_first: true })).describe("Account name, address (0x...), or mark name. " +
87
87
  "When using string format, local marks are searched first. " +
88
88
  "EXAMPLE: 'alice' - searches local marks first, then global; " +
89
- "EXAMPLE: '0x1234...' - uses address directly"),
89
+ "EXAMPLE: '0x2...' (64 hex chars) - uses address directly; " +
90
+ "EXAMPLE: '' - uses the default local account"),
90
91
  AccountOrMark_AddressSchema
91
92
  ]).describe("Account or address lookup. Can be a simple string (recommended for AI) " +
92
- "or full object with explicit local_mark_first control");
93
+ "or full object with explicit local_mark_first control. " +
94
+ "String form auto-converts to { name_or_address: <string>, local_mark_first: true }.");
93
95
  export const ManyAccountOrMark_AddressAISchema = z.union([
94
- z.array(z.string()).describe("Array of account names, addresses, or mark names. " +
95
- "Local marks are searched first for each entry"),
96
+ z.array(NameOrAddressSchema).transform(arr => ({
97
+ entities: arr.map(s => ({ name_or_address: s, local_mark_first: true })),
98
+ check_all_founded: true,
99
+ })).describe("Array of account names, addresses, or mark names. " +
100
+ "Local marks are searched first for each entry. " +
101
+ "EXAMPLE: ['alice', '0x2...', 'bob']"),
96
102
  ManyAccountOrMark_AddressSchema
97
103
  ]).describe("Batch account or address lookup. Can be an array of strings (recommended for AI) " +
98
- "or full object with explicit control");
104
+ "or full object with explicit control. " +
105
+ "Array form auto-converts to { entities: [...], check_all_founded: true }.");
99
106
  export const ObjectOwnerSchema = z.union([
100
107
  z.object({
101
108
  AddressOwner: z.string().describe("Address owner"),
@@ -215,7 +222,16 @@ export const ObjectTypeSchema = z.enum([
215
222
  WowObjectType.TableItem_AddressMark,
216
223
  WowObjectType.TableItem_EntityRegistrar,
217
224
  ]).describe("Wowok object type");
218
- export const BalanceTypeSchema = z.union([z.number(), z.string()]).describe("Balance type");
225
+ export const BalanceTypeSchema = z.union([z.number(), z.string()]).describe("A coin/balance amount in the smallest on-chain unit (u64). " +
226
+ "Accepts a JS number OR a numeric string. " +
227
+ "PRECISION RULE: for values exceeding 2^53 (e.g. token amounts with 18 decimals), " +
228
+ "ALWAYS pass a numeric STRING (e.g. \"1000000000000000000\") to preserve precision — " +
229
+ "JS numbers lose precision above 2^53. " +
230
+ "UNIT: this is the smallest unit, NOT the display unit. " +
231
+ "For SUI: 1 SUI = 10^9 MIST, so 10 SUI = 10000000000. " +
232
+ "For custom tokens: use the token's native smallest unit (decimals from coin metadata). " +
233
+ "Examples: 10000000000 (10 SUI), \"1000000000000000000\" (1 token with 18 decimals), 500 (500 units of a token with 0 decimals). " +
234
+ "Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities.");
219
235
  export const QueryIdSchema = z.number().int().min(0).describe("Query ID");
220
236
  export const CacheExpireTypeSchema = z.union([z.number(), z.literal("INFINITE")]).describe("Cache expiration time type");
221
237
  export const ValueContainerSchema = z.lazy(() => z.object({
@@ -238,18 +254,31 @@ export const GuardIdentifierSchema = z.number().int().min(0).max(255).describe("
238
254
  export const GuardTableItemBaseSchema = z.object({
239
255
  identifier: GuardIdentifierSchema,
240
256
  b_submission: z.boolean().describe("Whether user submission is required for this data"),
241
- value_type: ValueTypeUserSchema.describe("Type of the value"),
242
- value: SupportedValueUserSchema.optional().describe("The actual value data"),
243
- name: z.string().default("").describe("Name or description of this data"),
244
- }).strict().describe("Guard table item");
257
+ value_type: ValueTypeUserSchema.describe("Type of the value stored in `value`. One of: Bool(0), Address(1), String(2), U8(3), U16(4), U32(5), U64(6), U128(7), U256(8), VecBool(9), VecAddress(10), VecString(11), VecU8(12), VecU16(13), VecU32(14), VecU64(15), VecU128(16), VecU256(17), VecVecU8(18). " +
258
+ "When value_type=Address (1), the `value` field accepts a hex address string, a LocalMark name, or an AccountOrMark_Address object — see `value` field description for details."),
259
+ value: SupportedValueUserSchema.optional().describe("The actual value data. Format depends on `value_type`:\n" +
260
+ "• Bool: true/false (boolean)\n" +
261
+ "• Address (CRITICAL — string 'Address' is NOT a placeholder): a hex address (e.g. '0x1234...'), a LocalMark name (e.g. 'my-service' — resolved to address at evaluation time), an AccountOrMark_Address object (e.g. {name_or_address:'my-service'}), or system shorthand ('0xaaa' = EntityLinker, '0xaab' = EntityRegistrar). The literal string 'Address' itself is INVALID — it would be treated as a non-existent LocalMark name and fail. Example: value='0x2::wow::WOW<address>' or value='my-permission'.\n" +
262
+ "• String: any string\n" +
263
+ "• U8/U16/U32/U64/U128/U256: number or numeric string (e.g. 42 or '42')\n" +
264
+ "• Vec* types: arrays of the corresponding element type\n" +
265
+ "REQUIRED when b_submission=false. OPTIONAL when b_submission=true (value is supplied at evaluation time by user submission)."),
266
+ name: z.string().default("").describe("Data name identifier. MAX 64 BCS characters (Chinese chars count as 3-4 BCS bytes each). " +
267
+ "Use short identifiers like 'order_id', 'delivery_node'. " +
268
+ "Put longer descriptions in the Guard's 'description' field, NOT here."),
269
+ }).strict().describe("Guard table item (INPUT/CREATION form). DO NOT include `object_type` field — it is query-output only and will be rejected here.");
245
270
  export const GuardTableItemSchema = GuardTableItemBaseSchema.extend({
246
- object_type: ObjectTypeSchema.optional().describe("Object type when value_type is Address and represents a specific object"),
247
- }).strict().describe("Guard table item");
271
+ object_type: ObjectTypeSchema.optional().describe("OUTPUT-ONLY (query side): Object type when value_type is Address and represents a specific object. Auto-derived by the system — DO NOT set this field at Guard creation."),
272
+ }).strict().describe("Guard table item (QUERY/OUTPUT form — includes auto-derived object_type field)");
248
273
  export const EntrypointSchema = z.enum([
249
274
  ENTRYPOINT.Localnet,
250
275
  ENTRYPOINT.Testnet,
251
276
  ENTRYPOINT.Mainnet,
252
- ]).describe("Network entrypoint: Specifies which network the operation occurs on");
277
+ ]).describe("Network entrypoint: Specifies which network the operation occurs on. " +
278
+ "FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). " +
279
+ "When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names " +
280
+ "to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the " +
281
+ "project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy.");
253
282
  export const FaucetNetworkSchema = z.enum([
254
283
  ENTRYPOINT.Localnet,
255
284
  ENTRYPOINT.Testnet,