@wowok/agent-mcp 2.6.9 → 2.7.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 (139) hide show
  1. package/README.md +0 -2
  2. package/dist/customer/risk-assessment.d.ts +5 -1
  3. package/dist/customer/risk-assessment.js +4 -4
  4. package/dist/evaluation/arbitration-game.d.ts +16 -0
  5. package/dist/evaluation/arbitration-game.js +48 -0
  6. package/dist/evaluation/builtins/demand-match.d.ts +15 -0
  7. package/dist/evaluation/builtins/demand-match.js +153 -0
  8. package/dist/evaluation/builtins/index.d.ts +3 -0
  9. package/dist/evaluation/builtins/index.js +10 -0
  10. package/dist/evaluation/builtins/service-risk.d.ts +6 -0
  11. package/dist/evaluation/builtins/service-risk.js +55 -0
  12. package/dist/evaluation/capability.d.ts +50 -0
  13. package/dist/evaluation/capability.js +13 -0
  14. package/dist/evaluation/composer.d.ts +13 -0
  15. package/dist/evaluation/composer.js +40 -0
  16. package/dist/evaluation/engine.d.ts +18 -0
  17. package/dist/evaluation/engine.js +175 -0
  18. package/dist/evaluation/extract.d.ts +30 -0
  19. package/dist/evaluation/extract.js +115 -0
  20. package/dist/evaluation/gap.d.ts +2 -0
  21. package/dist/evaluation/gap.js +100 -0
  22. package/dist/evaluation/index.d.ts +11 -0
  23. package/dist/evaluation/index.js +11 -0
  24. package/dist/evaluation/node-game.d.ts +34 -0
  25. package/dist/evaluation/node-game.js +57 -0
  26. package/dist/evaluation/region.d.ts +10 -0
  27. package/dist/evaluation/region.js +36 -0
  28. package/dist/evaluation/types.d.ts +76 -0
  29. package/dist/evaluation/types.js +1 -0
  30. package/dist/evaluation/user-injection.d.ts +6 -0
  31. package/dist/evaluation/user-injection.js +27 -0
  32. package/dist/examples/education-contact-create.json +40 -0
  33. package/dist/examples/freelance-contact-create.json +40 -0
  34. package/dist/examples/insurance-machine-create.json +1 -1
  35. package/dist/examples/insurance-service-allocators.json +1 -1
  36. package/dist/examples/machine-publish.json +1 -1
  37. package/dist/examples/rental-ziroom-service-create.json +1 -1
  38. package/dist/examples/retail-adv-guard-messenger-proof-create.json +1 -1
  39. package/dist/examples/retail-myshop-service-create.json +1 -1
  40. package/dist/examples/retail-myshop-service-customer-required.json +1 -1
  41. package/dist/examples/subscription-contact-create.json +40 -0
  42. package/dist/examples/threebody-machine-create.json +1 -1
  43. package/dist/examples/travel-machine-create.json +1 -1
  44. package/dist/examples/travel-service-create.json +1 -1
  45. package/dist/harness/plan.js +42 -3
  46. package/dist/intent/enrich.d.ts +1 -0
  47. package/dist/intent/enrich.js +67 -0
  48. package/dist/intent/index.d.ts +23 -0
  49. package/dist/intent/index.js +60 -0
  50. package/dist/intent/matcher.d.ts +2 -0
  51. package/dist/intent/matcher.js +81 -0
  52. package/dist/intent/store.d.ts +19 -0
  53. package/dist/intent/store.js +55 -0
  54. package/dist/intent/types.d.ts +33 -0
  55. package/dist/intent/types.js +10 -0
  56. package/dist/knowledge/arbitration-risk.js +1 -11
  57. package/dist/knowledge/contact-templates.d.ts +27 -0
  58. package/dist/knowledge/contact-templates.js +60 -0
  59. package/dist/knowledge/examples-scanner.js +21 -3
  60. package/dist/knowledge/fund-layer.js +8 -4
  61. package/dist/knowledge/industry-generalizer.js +21 -21
  62. package/dist/knowledge/machine-risk.js +0 -1
  63. package/dist/knowledge/mcp-schema-audit.d.ts +1 -1
  64. package/dist/knowledge/mcp-schema-audit.js +8 -4
  65. package/dist/knowledge/service-risk.js +38 -2
  66. package/dist/knowledge/service-templates.js +1 -1
  67. package/dist/knowledge/service-translation.js +2 -2
  68. package/dist/knowledge/template-registry.d.ts +1 -1
  69. package/dist/knowledge/template-registry.js +13 -1
  70. package/dist/knowledge/tools-reference.js +23 -0
  71. package/dist/persona/analyzer.d.ts +16 -0
  72. package/dist/persona/analyzer.js +66 -0
  73. package/dist/persona/bridge.d.ts +5 -0
  74. package/dist/persona/bridge.js +86 -0
  75. package/dist/persona/defaults.d.ts +4 -0
  76. package/dist/persona/defaults.js +195 -0
  77. package/dist/persona/experience-bridge.d.ts +3 -0
  78. package/dist/persona/experience-bridge.js +23 -0
  79. package/dist/persona/index.d.ts +18 -0
  80. package/dist/persona/index.js +71 -0
  81. package/dist/persona/model.d.ts +7 -0
  82. package/dist/persona/model.js +111 -0
  83. package/dist/persona/store.d.ts +19 -0
  84. package/dist/persona/store.js +62 -0
  85. package/dist/persona/types.d.ts +43 -0
  86. package/dist/persona/types.js +5 -0
  87. package/dist/project/handlers.d.ts +5 -0
  88. package/dist/project/handlers.js +23 -1
  89. package/dist/project/semantic-graph.js +47 -0
  90. package/dist/rules.d.ts +2 -0
  91. package/dist/rules.js +43 -0
  92. package/dist/schema/call/semantic.js +23 -1
  93. package/dist/schema/call/service.js +7 -1
  94. package/dist/schema/evaluation/index.d.ts +4239 -0
  95. package/dist/schema/evaluation/index.js +356 -0
  96. package/dist/schema/index.d.ts +4 -0
  97. package/dist/schema/index.js +4 -0
  98. package/dist/schema/intent-radar/index.d.ts +284 -0
  99. package/dist/schema/intent-radar/index.js +89 -0
  100. package/dist/schema/messenger/index.d.ts +171 -0
  101. package/dist/schema/messenger/index.js +5 -0
  102. package/dist/schema/operations.js +1 -1
  103. package/dist/schema/persona/index.d.ts +1985 -0
  104. package/dist/schema/persona/index.js +148 -0
  105. package/dist/schema/project/index.d.ts +2 -2
  106. package/dist/schema/query/index.js +6 -0
  107. package/dist/schema/sync-layer4.d.ts +1 -1
  108. package/dist/schema/sync-layer4.js +9 -5
  109. package/dist/schema/task-status.d.ts +168 -0
  110. package/dist/schema/task-status.js +36 -0
  111. package/dist/schema/trust/index.js +1 -1
  112. package/dist/schemas/evaluation_operation.output.json +677 -0
  113. package/dist/schemas/evaluation_operation.schema.json +903 -0
  114. package/dist/schemas/index.json +25 -1
  115. package/dist/schemas/intent_radar.output.json +229 -0
  116. package/dist/schemas/intent_radar.schema.json +135 -0
  117. package/dist/schemas/messenger_operation.output.json +14 -0
  118. package/dist/schemas/messenger_operation.schema.json +18 -0
  119. package/dist/schemas/onchain_operations.schema.json +2 -2
  120. package/dist/schemas/onchain_operations_service.schema.json +2 -2
  121. package/dist/schemas/persona_operation.output.json +389 -0
  122. package/dist/schemas/persona_operation.schema.json +247 -0
  123. package/dist/schemas/query_task_status.output.json +115 -0
  124. package/dist/schemas/query_task_status.schema.json +24 -0
  125. package/dist/schemas/query_toolkit.output.json +1 -1
  126. package/dist/schemas/trust_score.schema.json +1 -1
  127. package/dist/tools/handlers/evaluation.d.ts +2 -0
  128. package/dist/tools/handlers/evaluation.js +123 -0
  129. package/dist/tools/handlers/intent-radar.d.ts +2 -0
  130. package/dist/tools/handlers/intent-radar.js +76 -0
  131. package/dist/tools/handlers/onchain.js +98 -0
  132. package/dist/tools/handlers/persona.d.ts +4 -0
  133. package/dist/tools/handlers/persona.js +89 -0
  134. package/dist/tools/handlers/task-status.d.ts +0 -168
  135. package/dist/tools/handlers/task-status.js +0 -29
  136. package/dist/tools/index.js +83 -7
  137. package/dist/tools/wip-deploy-assist.d.ts +1 -1
  138. package/dist/tools/wip-deploy-assist.js +33 -5
  139. package/package.json +2 -2
@@ -0,0 +1,1985 @@
1
+ import { z } from "zod";
2
+ export declare const PersonaOperationInputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
3
+ action: z.ZodLiteral<"get">;
4
+ account: z.ZodOptional<z.ZodString>;
5
+ industry: z.ZodOptional<z.ZodEnum<["freelance", "rental", "education", "travel", "subscription", "retail"]>>;
6
+ role: z.ZodOptional<z.ZodEnum<["merchant", "user", "arbitrator"]>>;
7
+ }, "strict", z.ZodTypeAny, {
8
+ action: "get";
9
+ account?: string | undefined;
10
+ role?: "user" | "merchant" | "arbitrator" | undefined;
11
+ industry?: "freelance" | "rental" | "education" | "travel" | "subscription" | "retail" | undefined;
12
+ }, {
13
+ action: "get";
14
+ account?: string | undefined;
15
+ role?: "user" | "merchant" | "arbitrator" | undefined;
16
+ industry?: "freelance" | "rental" | "education" | "travel" | "subscription" | "retail" | undefined;
17
+ }>, z.ZodObject<{
18
+ action: z.ZodLiteral<"list">;
19
+ }, "strict", z.ZodTypeAny, {
20
+ action: "list";
21
+ }, {
22
+ action: "list";
23
+ }>, z.ZodObject<{
24
+ action: z.ZodLiteral<"set">;
25
+ scope: z.ZodEnum<["system", "account"]>;
26
+ account: z.ZodOptional<z.ZodString>;
27
+ role: z.ZodEnum<["merchant", "user", "arbitrator"]>;
28
+ industries: z.ZodDefault<z.ZodArray<z.ZodEnum<["freelance", "rental", "education", "travel", "subscription", "retail"]>, "many">>;
29
+ long_term: z.ZodOptional<z.ZodObject<{
30
+ identity: z.ZodOptional<z.ZodObject<{
31
+ region: z.ZodOptional<z.ZodString>;
32
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
33
+ self_description: z.ZodOptional<z.ZodString>;
34
+ }, "strict", z.ZodTypeAny, {
35
+ region?: string | undefined;
36
+ languages?: string[] | undefined;
37
+ self_description?: string | undefined;
38
+ }, {
39
+ region?: string | undefined;
40
+ languages?: string[] | undefined;
41
+ self_description?: string | undefined;
42
+ }>>;
43
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
44
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
45
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
46
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
47
+ spec: z.ZodOptional<z.ZodString>;
48
+ }, "strict", z.ZodTypeAny, {
49
+ strategy?: string[] | undefined;
50
+ identity?: {
51
+ region?: string | undefined;
52
+ languages?: string[] | undefined;
53
+ self_description?: string | undefined;
54
+ } | undefined;
55
+ rules?: string[] | undefined;
56
+ preferences?: Record<string, unknown> | undefined;
57
+ requirements?: string[] | undefined;
58
+ spec?: string | undefined;
59
+ }, {
60
+ strategy?: string[] | undefined;
61
+ identity?: {
62
+ region?: string | undefined;
63
+ languages?: string[] | undefined;
64
+ self_description?: string | undefined;
65
+ } | undefined;
66
+ rules?: string[] | undefined;
67
+ preferences?: Record<string, unknown> | undefined;
68
+ requirements?: string[] | undefined;
69
+ spec?: string | undefined;
70
+ }>>;
71
+ current: z.ZodOptional<z.ZodObject<{
72
+ identity: z.ZodOptional<z.ZodObject<{
73
+ region: z.ZodOptional<z.ZodString>;
74
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
75
+ self_description: z.ZodOptional<z.ZodString>;
76
+ }, "strict", z.ZodTypeAny, {
77
+ region?: string | undefined;
78
+ languages?: string[] | undefined;
79
+ self_description?: string | undefined;
80
+ }, {
81
+ region?: string | undefined;
82
+ languages?: string[] | undefined;
83
+ self_description?: string | undefined;
84
+ }>>;
85
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
86
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
87
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
88
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
89
+ spec: z.ZodOptional<z.ZodString>;
90
+ }, "strict", z.ZodTypeAny, {
91
+ strategy?: string[] | undefined;
92
+ identity?: {
93
+ region?: string | undefined;
94
+ languages?: string[] | undefined;
95
+ self_description?: string | undefined;
96
+ } | undefined;
97
+ rules?: string[] | undefined;
98
+ preferences?: Record<string, unknown> | undefined;
99
+ requirements?: string[] | undefined;
100
+ spec?: string | undefined;
101
+ }, {
102
+ strategy?: string[] | undefined;
103
+ identity?: {
104
+ region?: string | undefined;
105
+ languages?: string[] | undefined;
106
+ self_description?: string | undefined;
107
+ } | undefined;
108
+ rules?: string[] | undefined;
109
+ preferences?: Record<string, unknown> | undefined;
110
+ requirements?: string[] | undefined;
111
+ spec?: string | undefined;
112
+ }>>;
113
+ }, "strict", z.ZodTypeAny, {
114
+ role: "user" | "merchant" | "arbitrator";
115
+ action: "set";
116
+ scope: "account" | "system";
117
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
118
+ account?: string | undefined;
119
+ current?: {
120
+ strategy?: string[] | undefined;
121
+ identity?: {
122
+ region?: string | undefined;
123
+ languages?: string[] | undefined;
124
+ self_description?: string | undefined;
125
+ } | undefined;
126
+ rules?: string[] | undefined;
127
+ preferences?: Record<string, unknown> | undefined;
128
+ requirements?: string[] | undefined;
129
+ spec?: string | undefined;
130
+ } | undefined;
131
+ long_term?: {
132
+ strategy?: string[] | undefined;
133
+ identity?: {
134
+ region?: string | undefined;
135
+ languages?: string[] | undefined;
136
+ self_description?: string | undefined;
137
+ } | undefined;
138
+ rules?: string[] | undefined;
139
+ preferences?: Record<string, unknown> | undefined;
140
+ requirements?: string[] | undefined;
141
+ spec?: string | undefined;
142
+ } | undefined;
143
+ }, {
144
+ role: "user" | "merchant" | "arbitrator";
145
+ action: "set";
146
+ scope: "account" | "system";
147
+ account?: string | undefined;
148
+ current?: {
149
+ strategy?: string[] | undefined;
150
+ identity?: {
151
+ region?: string | undefined;
152
+ languages?: string[] | undefined;
153
+ self_description?: string | undefined;
154
+ } | undefined;
155
+ rules?: string[] | undefined;
156
+ preferences?: Record<string, unknown> | undefined;
157
+ requirements?: string[] | undefined;
158
+ spec?: string | undefined;
159
+ } | undefined;
160
+ industries?: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[] | undefined;
161
+ long_term?: {
162
+ strategy?: string[] | undefined;
163
+ identity?: {
164
+ region?: string | undefined;
165
+ languages?: string[] | undefined;
166
+ self_description?: string | undefined;
167
+ } | undefined;
168
+ rules?: string[] | undefined;
169
+ preferences?: Record<string, unknown> | undefined;
170
+ requirements?: string[] | undefined;
171
+ spec?: string | undefined;
172
+ } | undefined;
173
+ }>, z.ZodObject<{
174
+ action: z.ZodLiteral<"analyze">;
175
+ context: z.ZodString;
176
+ }, "strict", z.ZodTypeAny, {
177
+ action: "analyze";
178
+ context: string;
179
+ }, {
180
+ action: "analyze";
181
+ context: string;
182
+ }>, z.ZodObject<{
183
+ action: z.ZodLiteral<"apply">;
184
+ context: z.ZodString;
185
+ scope: z.ZodEnum<["system", "account"]>;
186
+ account: z.ZodOptional<z.ZodString>;
187
+ role: z.ZodOptional<z.ZodEnum<["merchant", "user", "arbitrator"]>>;
188
+ industries: z.ZodOptional<z.ZodArray<z.ZodEnum<["freelance", "rental", "education", "travel", "subscription", "retail"]>, "many">>;
189
+ mode: z.ZodOptional<z.ZodEnum<["merge", "replace"]>>;
190
+ }, "strict", z.ZodTypeAny, {
191
+ action: "apply";
192
+ context: string;
193
+ scope: "account" | "system";
194
+ account?: string | undefined;
195
+ role?: "user" | "merchant" | "arbitrator" | undefined;
196
+ mode?: "replace" | "merge" | undefined;
197
+ industries?: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[] | undefined;
198
+ }, {
199
+ action: "apply";
200
+ context: string;
201
+ scope: "account" | "system";
202
+ account?: string | undefined;
203
+ role?: "user" | "merchant" | "arbitrator" | undefined;
204
+ mode?: "replace" | "merge" | undefined;
205
+ industries?: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[] | undefined;
206
+ }>, z.ZodObject<{
207
+ action: z.ZodLiteral<"sync">;
208
+ account: z.ZodOptional<z.ZodString>;
209
+ }, "strict", z.ZodTypeAny, {
210
+ action: "sync";
211
+ account?: string | undefined;
212
+ }, {
213
+ action: "sync";
214
+ account?: string | undefined;
215
+ }>, z.ZodObject<{
216
+ action: z.ZodLiteral<"remove">;
217
+ scope: z.ZodEnum<["system", "account"]>;
218
+ account: z.ZodOptional<z.ZodString>;
219
+ }, "strict", z.ZodTypeAny, {
220
+ action: "remove";
221
+ scope: "account" | "system";
222
+ account?: string | undefined;
223
+ }, {
224
+ action: "remove";
225
+ scope: "account" | "system";
226
+ account?: string | undefined;
227
+ }>]>;
228
+ export declare const PersonaOperationOutputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
229
+ action: z.ZodLiteral<"get">;
230
+ effective: z.ZodObject<{
231
+ scope: z.ZodEnum<["system", "account"]>;
232
+ account: z.ZodOptional<z.ZodString>;
233
+ role: z.ZodEnum<["merchant", "user", "arbitrator"]>;
234
+ industries: z.ZodArray<z.ZodEnum<["freelance", "rental", "education", "travel", "subscription", "retail"]>, "many">;
235
+ layer: z.ZodObject<{
236
+ identity: z.ZodOptional<z.ZodObject<{
237
+ region: z.ZodOptional<z.ZodString>;
238
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
239
+ self_description: z.ZodOptional<z.ZodString>;
240
+ }, "strict", z.ZodTypeAny, {
241
+ region?: string | undefined;
242
+ languages?: string[] | undefined;
243
+ self_description?: string | undefined;
244
+ }, {
245
+ region?: string | undefined;
246
+ languages?: string[] | undefined;
247
+ self_description?: string | undefined;
248
+ }>>;
249
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
250
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
251
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
252
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
253
+ spec: z.ZodOptional<z.ZodString>;
254
+ }, "strict", z.ZodTypeAny, {
255
+ strategy?: string[] | undefined;
256
+ identity?: {
257
+ region?: string | undefined;
258
+ languages?: string[] | undefined;
259
+ self_description?: string | undefined;
260
+ } | undefined;
261
+ rules?: string[] | undefined;
262
+ preferences?: Record<string, unknown> | undefined;
263
+ requirements?: string[] | undefined;
264
+ spec?: string | undefined;
265
+ }, {
266
+ strategy?: string[] | undefined;
267
+ identity?: {
268
+ region?: string | undefined;
269
+ languages?: string[] | undefined;
270
+ self_description?: string | undefined;
271
+ } | undefined;
272
+ rules?: string[] | undefined;
273
+ preferences?: Record<string, unknown> | undefined;
274
+ requirements?: string[] | undefined;
275
+ spec?: string | undefined;
276
+ }>;
277
+ sources: z.ZodArray<z.ZodObject<{
278
+ scope: z.ZodEnum<["system", "account"]>;
279
+ account: z.ZodOptional<z.ZodString>;
280
+ part: z.ZodEnum<["long_term", "current"]>;
281
+ }, "strict", z.ZodTypeAny, {
282
+ scope: "account" | "system";
283
+ part: "current" | "long_term";
284
+ account?: string | undefined;
285
+ }, {
286
+ scope: "account" | "system";
287
+ part: "current" | "long_term";
288
+ account?: string | undefined;
289
+ }>, "many">;
290
+ }, "strict", z.ZodTypeAny, {
291
+ role: "user" | "merchant" | "arbitrator";
292
+ scope: "account" | "system";
293
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
294
+ layer: {
295
+ strategy?: string[] | undefined;
296
+ identity?: {
297
+ region?: string | undefined;
298
+ languages?: string[] | undefined;
299
+ self_description?: string | undefined;
300
+ } | undefined;
301
+ rules?: string[] | undefined;
302
+ preferences?: Record<string, unknown> | undefined;
303
+ requirements?: string[] | undefined;
304
+ spec?: string | undefined;
305
+ };
306
+ sources: {
307
+ scope: "account" | "system";
308
+ part: "current" | "long_term";
309
+ account?: string | undefined;
310
+ }[];
311
+ account?: string | undefined;
312
+ }, {
313
+ role: "user" | "merchant" | "arbitrator";
314
+ scope: "account" | "system";
315
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
316
+ layer: {
317
+ strategy?: string[] | undefined;
318
+ identity?: {
319
+ region?: string | undefined;
320
+ languages?: string[] | undefined;
321
+ self_description?: string | undefined;
322
+ } | undefined;
323
+ rules?: string[] | undefined;
324
+ preferences?: Record<string, unknown> | undefined;
325
+ requirements?: string[] | undefined;
326
+ spec?: string | undefined;
327
+ };
328
+ sources: {
329
+ scope: "account" | "system";
330
+ part: "current" | "long_term";
331
+ account?: string | undefined;
332
+ }[];
333
+ account?: string | undefined;
334
+ }>;
335
+ context_text: z.ZodString;
336
+ injection: z.ZodRecord<z.ZodString, z.ZodUnknown>;
337
+ }, "strict", z.ZodTypeAny, {
338
+ action: "get";
339
+ injection: Record<string, unknown>;
340
+ effective: {
341
+ role: "user" | "merchant" | "arbitrator";
342
+ scope: "account" | "system";
343
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
344
+ layer: {
345
+ strategy?: string[] | undefined;
346
+ identity?: {
347
+ region?: string | undefined;
348
+ languages?: string[] | undefined;
349
+ self_description?: string | undefined;
350
+ } | undefined;
351
+ rules?: string[] | undefined;
352
+ preferences?: Record<string, unknown> | undefined;
353
+ requirements?: string[] | undefined;
354
+ spec?: string | undefined;
355
+ };
356
+ sources: {
357
+ scope: "account" | "system";
358
+ part: "current" | "long_term";
359
+ account?: string | undefined;
360
+ }[];
361
+ account?: string | undefined;
362
+ };
363
+ context_text: string;
364
+ }, {
365
+ action: "get";
366
+ injection: Record<string, unknown>;
367
+ effective: {
368
+ role: "user" | "merchant" | "arbitrator";
369
+ scope: "account" | "system";
370
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
371
+ layer: {
372
+ strategy?: string[] | undefined;
373
+ identity?: {
374
+ region?: string | undefined;
375
+ languages?: string[] | undefined;
376
+ self_description?: string | undefined;
377
+ } | undefined;
378
+ rules?: string[] | undefined;
379
+ preferences?: Record<string, unknown> | undefined;
380
+ requirements?: string[] | undefined;
381
+ spec?: string | undefined;
382
+ };
383
+ sources: {
384
+ scope: "account" | "system";
385
+ part: "current" | "long_term";
386
+ account?: string | undefined;
387
+ }[];
388
+ account?: string | undefined;
389
+ };
390
+ context_text: string;
391
+ }>, z.ZodObject<{
392
+ action: z.ZodLiteral<"list">;
393
+ personas: z.ZodArray<z.ZodObject<{
394
+ version: z.ZodNumber;
395
+ scope: z.ZodEnum<["system", "account"]>;
396
+ account: z.ZodOptional<z.ZodString>;
397
+ role: z.ZodEnum<["merchant", "user", "arbitrator"]>;
398
+ industries: z.ZodArray<z.ZodEnum<["freelance", "rental", "education", "travel", "subscription", "retail"]>, "many">;
399
+ long_term: z.ZodObject<{
400
+ identity: z.ZodOptional<z.ZodObject<{
401
+ region: z.ZodOptional<z.ZodString>;
402
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
403
+ self_description: z.ZodOptional<z.ZodString>;
404
+ }, "strict", z.ZodTypeAny, {
405
+ region?: string | undefined;
406
+ languages?: string[] | undefined;
407
+ self_description?: string | undefined;
408
+ }, {
409
+ region?: string | undefined;
410
+ languages?: string[] | undefined;
411
+ self_description?: string | undefined;
412
+ }>>;
413
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
414
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
415
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
416
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
417
+ spec: z.ZodOptional<z.ZodString>;
418
+ }, "strict", z.ZodTypeAny, {
419
+ strategy?: string[] | undefined;
420
+ identity?: {
421
+ region?: string | undefined;
422
+ languages?: string[] | undefined;
423
+ self_description?: string | undefined;
424
+ } | undefined;
425
+ rules?: string[] | undefined;
426
+ preferences?: Record<string, unknown> | undefined;
427
+ requirements?: string[] | undefined;
428
+ spec?: string | undefined;
429
+ }, {
430
+ strategy?: string[] | undefined;
431
+ identity?: {
432
+ region?: string | undefined;
433
+ languages?: string[] | undefined;
434
+ self_description?: string | undefined;
435
+ } | undefined;
436
+ rules?: string[] | undefined;
437
+ preferences?: Record<string, unknown> | undefined;
438
+ requirements?: string[] | undefined;
439
+ spec?: string | undefined;
440
+ }>;
441
+ current: z.ZodObject<{
442
+ identity: z.ZodOptional<z.ZodObject<{
443
+ region: z.ZodOptional<z.ZodString>;
444
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
445
+ self_description: z.ZodOptional<z.ZodString>;
446
+ }, "strict", z.ZodTypeAny, {
447
+ region?: string | undefined;
448
+ languages?: string[] | undefined;
449
+ self_description?: string | undefined;
450
+ }, {
451
+ region?: string | undefined;
452
+ languages?: string[] | undefined;
453
+ self_description?: string | undefined;
454
+ }>>;
455
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
456
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
457
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
458
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
459
+ spec: z.ZodOptional<z.ZodString>;
460
+ }, "strict", z.ZodTypeAny, {
461
+ strategy?: string[] | undefined;
462
+ identity?: {
463
+ region?: string | undefined;
464
+ languages?: string[] | undefined;
465
+ self_description?: string | undefined;
466
+ } | undefined;
467
+ rules?: string[] | undefined;
468
+ preferences?: Record<string, unknown> | undefined;
469
+ requirements?: string[] | undefined;
470
+ spec?: string | undefined;
471
+ }, {
472
+ strategy?: string[] | undefined;
473
+ identity?: {
474
+ region?: string | undefined;
475
+ languages?: string[] | undefined;
476
+ self_description?: string | undefined;
477
+ } | undefined;
478
+ rules?: string[] | undefined;
479
+ preferences?: Record<string, unknown> | undefined;
480
+ requirements?: string[] | undefined;
481
+ spec?: string | undefined;
482
+ }>;
483
+ updated_at: z.ZodNumber;
484
+ }, "strict", z.ZodTypeAny, {
485
+ version: number;
486
+ role: "user" | "merchant" | "arbitrator";
487
+ current: {
488
+ strategy?: string[] | undefined;
489
+ identity?: {
490
+ region?: string | undefined;
491
+ languages?: string[] | undefined;
492
+ self_description?: string | undefined;
493
+ } | undefined;
494
+ rules?: string[] | undefined;
495
+ preferences?: Record<string, unknown> | undefined;
496
+ requirements?: string[] | undefined;
497
+ spec?: string | undefined;
498
+ };
499
+ scope: "account" | "system";
500
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
501
+ long_term: {
502
+ strategy?: string[] | undefined;
503
+ identity?: {
504
+ region?: string | undefined;
505
+ languages?: string[] | undefined;
506
+ self_description?: string | undefined;
507
+ } | undefined;
508
+ rules?: string[] | undefined;
509
+ preferences?: Record<string, unknown> | undefined;
510
+ requirements?: string[] | undefined;
511
+ spec?: string | undefined;
512
+ };
513
+ updated_at: number;
514
+ account?: string | undefined;
515
+ }, {
516
+ version: number;
517
+ role: "user" | "merchant" | "arbitrator";
518
+ current: {
519
+ strategy?: string[] | undefined;
520
+ identity?: {
521
+ region?: string | undefined;
522
+ languages?: string[] | undefined;
523
+ self_description?: string | undefined;
524
+ } | undefined;
525
+ rules?: string[] | undefined;
526
+ preferences?: Record<string, unknown> | undefined;
527
+ requirements?: string[] | undefined;
528
+ spec?: string | undefined;
529
+ };
530
+ scope: "account" | "system";
531
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
532
+ long_term: {
533
+ strategy?: string[] | undefined;
534
+ identity?: {
535
+ region?: string | undefined;
536
+ languages?: string[] | undefined;
537
+ self_description?: string | undefined;
538
+ } | undefined;
539
+ rules?: string[] | undefined;
540
+ preferences?: Record<string, unknown> | undefined;
541
+ requirements?: string[] | undefined;
542
+ spec?: string | undefined;
543
+ };
544
+ updated_at: number;
545
+ account?: string | undefined;
546
+ }>, "many">;
547
+ defaults: z.ZodArray<z.ZodObject<{
548
+ version: z.ZodNumber;
549
+ scope: z.ZodEnum<["system", "account"]>;
550
+ account: z.ZodOptional<z.ZodString>;
551
+ role: z.ZodEnum<["merchant", "user", "arbitrator"]>;
552
+ industries: z.ZodArray<z.ZodEnum<["freelance", "rental", "education", "travel", "subscription", "retail"]>, "many">;
553
+ long_term: z.ZodObject<{
554
+ identity: z.ZodOptional<z.ZodObject<{
555
+ region: z.ZodOptional<z.ZodString>;
556
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
557
+ self_description: z.ZodOptional<z.ZodString>;
558
+ }, "strict", z.ZodTypeAny, {
559
+ region?: string | undefined;
560
+ languages?: string[] | undefined;
561
+ self_description?: string | undefined;
562
+ }, {
563
+ region?: string | undefined;
564
+ languages?: string[] | undefined;
565
+ self_description?: string | undefined;
566
+ }>>;
567
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
568
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
569
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
570
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
571
+ spec: z.ZodOptional<z.ZodString>;
572
+ }, "strict", z.ZodTypeAny, {
573
+ strategy?: string[] | undefined;
574
+ identity?: {
575
+ region?: string | undefined;
576
+ languages?: string[] | undefined;
577
+ self_description?: string | undefined;
578
+ } | undefined;
579
+ rules?: string[] | undefined;
580
+ preferences?: Record<string, unknown> | undefined;
581
+ requirements?: string[] | undefined;
582
+ spec?: string | undefined;
583
+ }, {
584
+ strategy?: string[] | undefined;
585
+ identity?: {
586
+ region?: string | undefined;
587
+ languages?: string[] | undefined;
588
+ self_description?: string | undefined;
589
+ } | undefined;
590
+ rules?: string[] | undefined;
591
+ preferences?: Record<string, unknown> | undefined;
592
+ requirements?: string[] | undefined;
593
+ spec?: string | undefined;
594
+ }>;
595
+ current: z.ZodObject<{
596
+ identity: z.ZodOptional<z.ZodObject<{
597
+ region: z.ZodOptional<z.ZodString>;
598
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
599
+ self_description: z.ZodOptional<z.ZodString>;
600
+ }, "strict", z.ZodTypeAny, {
601
+ region?: string | undefined;
602
+ languages?: string[] | undefined;
603
+ self_description?: string | undefined;
604
+ }, {
605
+ region?: string | undefined;
606
+ languages?: string[] | undefined;
607
+ self_description?: string | undefined;
608
+ }>>;
609
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
610
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
611
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
612
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
613
+ spec: z.ZodOptional<z.ZodString>;
614
+ }, "strict", z.ZodTypeAny, {
615
+ strategy?: string[] | undefined;
616
+ identity?: {
617
+ region?: string | undefined;
618
+ languages?: string[] | undefined;
619
+ self_description?: string | undefined;
620
+ } | undefined;
621
+ rules?: string[] | undefined;
622
+ preferences?: Record<string, unknown> | undefined;
623
+ requirements?: string[] | undefined;
624
+ spec?: string | undefined;
625
+ }, {
626
+ strategy?: string[] | undefined;
627
+ identity?: {
628
+ region?: string | undefined;
629
+ languages?: string[] | undefined;
630
+ self_description?: string | undefined;
631
+ } | undefined;
632
+ rules?: string[] | undefined;
633
+ preferences?: Record<string, unknown> | undefined;
634
+ requirements?: string[] | undefined;
635
+ spec?: string | undefined;
636
+ }>;
637
+ updated_at: z.ZodNumber;
638
+ }, "strict", z.ZodTypeAny, {
639
+ version: number;
640
+ role: "user" | "merchant" | "arbitrator";
641
+ current: {
642
+ strategy?: string[] | undefined;
643
+ identity?: {
644
+ region?: string | undefined;
645
+ languages?: string[] | undefined;
646
+ self_description?: string | undefined;
647
+ } | undefined;
648
+ rules?: string[] | undefined;
649
+ preferences?: Record<string, unknown> | undefined;
650
+ requirements?: string[] | undefined;
651
+ spec?: string | undefined;
652
+ };
653
+ scope: "account" | "system";
654
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
655
+ long_term: {
656
+ strategy?: string[] | undefined;
657
+ identity?: {
658
+ region?: string | undefined;
659
+ languages?: string[] | undefined;
660
+ self_description?: string | undefined;
661
+ } | undefined;
662
+ rules?: string[] | undefined;
663
+ preferences?: Record<string, unknown> | undefined;
664
+ requirements?: string[] | undefined;
665
+ spec?: string | undefined;
666
+ };
667
+ updated_at: number;
668
+ account?: string | undefined;
669
+ }, {
670
+ version: number;
671
+ role: "user" | "merchant" | "arbitrator";
672
+ current: {
673
+ strategy?: string[] | undefined;
674
+ identity?: {
675
+ region?: string | undefined;
676
+ languages?: string[] | undefined;
677
+ self_description?: string | undefined;
678
+ } | undefined;
679
+ rules?: string[] | undefined;
680
+ preferences?: Record<string, unknown> | undefined;
681
+ requirements?: string[] | undefined;
682
+ spec?: string | undefined;
683
+ };
684
+ scope: "account" | "system";
685
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
686
+ long_term: {
687
+ strategy?: string[] | undefined;
688
+ identity?: {
689
+ region?: string | undefined;
690
+ languages?: string[] | undefined;
691
+ self_description?: string | undefined;
692
+ } | undefined;
693
+ rules?: string[] | undefined;
694
+ preferences?: Record<string, unknown> | undefined;
695
+ requirements?: string[] | undefined;
696
+ spec?: string | undefined;
697
+ };
698
+ updated_at: number;
699
+ account?: string | undefined;
700
+ }>, "many">;
701
+ }, "strict", z.ZodTypeAny, {
702
+ action: "list";
703
+ personas: {
704
+ version: number;
705
+ role: "user" | "merchant" | "arbitrator";
706
+ current: {
707
+ strategy?: string[] | undefined;
708
+ identity?: {
709
+ region?: string | undefined;
710
+ languages?: string[] | undefined;
711
+ self_description?: string | undefined;
712
+ } | undefined;
713
+ rules?: string[] | undefined;
714
+ preferences?: Record<string, unknown> | undefined;
715
+ requirements?: string[] | undefined;
716
+ spec?: string | undefined;
717
+ };
718
+ scope: "account" | "system";
719
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
720
+ long_term: {
721
+ strategy?: string[] | undefined;
722
+ identity?: {
723
+ region?: string | undefined;
724
+ languages?: string[] | undefined;
725
+ self_description?: string | undefined;
726
+ } | undefined;
727
+ rules?: string[] | undefined;
728
+ preferences?: Record<string, unknown> | undefined;
729
+ requirements?: string[] | undefined;
730
+ spec?: string | undefined;
731
+ };
732
+ updated_at: number;
733
+ account?: string | undefined;
734
+ }[];
735
+ defaults: {
736
+ version: number;
737
+ role: "user" | "merchant" | "arbitrator";
738
+ current: {
739
+ strategy?: string[] | undefined;
740
+ identity?: {
741
+ region?: string | undefined;
742
+ languages?: string[] | undefined;
743
+ self_description?: string | undefined;
744
+ } | undefined;
745
+ rules?: string[] | undefined;
746
+ preferences?: Record<string, unknown> | undefined;
747
+ requirements?: string[] | undefined;
748
+ spec?: string | undefined;
749
+ };
750
+ scope: "account" | "system";
751
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
752
+ long_term: {
753
+ strategy?: string[] | undefined;
754
+ identity?: {
755
+ region?: string | undefined;
756
+ languages?: string[] | undefined;
757
+ self_description?: string | undefined;
758
+ } | undefined;
759
+ rules?: string[] | undefined;
760
+ preferences?: Record<string, unknown> | undefined;
761
+ requirements?: string[] | undefined;
762
+ spec?: string | undefined;
763
+ };
764
+ updated_at: number;
765
+ account?: string | undefined;
766
+ }[];
767
+ }, {
768
+ action: "list";
769
+ personas: {
770
+ version: number;
771
+ role: "user" | "merchant" | "arbitrator";
772
+ current: {
773
+ strategy?: string[] | undefined;
774
+ identity?: {
775
+ region?: string | undefined;
776
+ languages?: string[] | undefined;
777
+ self_description?: string | undefined;
778
+ } | undefined;
779
+ rules?: string[] | undefined;
780
+ preferences?: Record<string, unknown> | undefined;
781
+ requirements?: string[] | undefined;
782
+ spec?: string | undefined;
783
+ };
784
+ scope: "account" | "system";
785
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
786
+ long_term: {
787
+ strategy?: string[] | undefined;
788
+ identity?: {
789
+ region?: string | undefined;
790
+ languages?: string[] | undefined;
791
+ self_description?: string | undefined;
792
+ } | undefined;
793
+ rules?: string[] | undefined;
794
+ preferences?: Record<string, unknown> | undefined;
795
+ requirements?: string[] | undefined;
796
+ spec?: string | undefined;
797
+ };
798
+ updated_at: number;
799
+ account?: string | undefined;
800
+ }[];
801
+ defaults: {
802
+ version: number;
803
+ role: "user" | "merchant" | "arbitrator";
804
+ current: {
805
+ strategy?: string[] | undefined;
806
+ identity?: {
807
+ region?: string | undefined;
808
+ languages?: string[] | undefined;
809
+ self_description?: string | undefined;
810
+ } | undefined;
811
+ rules?: string[] | undefined;
812
+ preferences?: Record<string, unknown> | undefined;
813
+ requirements?: string[] | undefined;
814
+ spec?: string | undefined;
815
+ };
816
+ scope: "account" | "system";
817
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
818
+ long_term: {
819
+ strategy?: string[] | undefined;
820
+ identity?: {
821
+ region?: string | undefined;
822
+ languages?: string[] | undefined;
823
+ self_description?: string | undefined;
824
+ } | undefined;
825
+ rules?: string[] | undefined;
826
+ preferences?: Record<string, unknown> | undefined;
827
+ requirements?: string[] | undefined;
828
+ spec?: string | undefined;
829
+ };
830
+ updated_at: number;
831
+ account?: string | undefined;
832
+ }[];
833
+ }>, z.ZodObject<{
834
+ action: z.ZodLiteral<"set">;
835
+ persona: z.ZodObject<{
836
+ version: z.ZodNumber;
837
+ scope: z.ZodEnum<["system", "account"]>;
838
+ account: z.ZodOptional<z.ZodString>;
839
+ role: z.ZodEnum<["merchant", "user", "arbitrator"]>;
840
+ industries: z.ZodArray<z.ZodEnum<["freelance", "rental", "education", "travel", "subscription", "retail"]>, "many">;
841
+ long_term: z.ZodObject<{
842
+ identity: z.ZodOptional<z.ZodObject<{
843
+ region: z.ZodOptional<z.ZodString>;
844
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
845
+ self_description: z.ZodOptional<z.ZodString>;
846
+ }, "strict", z.ZodTypeAny, {
847
+ region?: string | undefined;
848
+ languages?: string[] | undefined;
849
+ self_description?: string | undefined;
850
+ }, {
851
+ region?: string | undefined;
852
+ languages?: string[] | undefined;
853
+ self_description?: string | undefined;
854
+ }>>;
855
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
856
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
857
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
858
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
859
+ spec: z.ZodOptional<z.ZodString>;
860
+ }, "strict", z.ZodTypeAny, {
861
+ strategy?: string[] | undefined;
862
+ identity?: {
863
+ region?: string | undefined;
864
+ languages?: string[] | undefined;
865
+ self_description?: string | undefined;
866
+ } | undefined;
867
+ rules?: string[] | undefined;
868
+ preferences?: Record<string, unknown> | undefined;
869
+ requirements?: string[] | undefined;
870
+ spec?: string | undefined;
871
+ }, {
872
+ strategy?: string[] | undefined;
873
+ identity?: {
874
+ region?: string | undefined;
875
+ languages?: string[] | undefined;
876
+ self_description?: string | undefined;
877
+ } | undefined;
878
+ rules?: string[] | undefined;
879
+ preferences?: Record<string, unknown> | undefined;
880
+ requirements?: string[] | undefined;
881
+ spec?: string | undefined;
882
+ }>;
883
+ current: z.ZodObject<{
884
+ identity: z.ZodOptional<z.ZodObject<{
885
+ region: z.ZodOptional<z.ZodString>;
886
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
887
+ self_description: z.ZodOptional<z.ZodString>;
888
+ }, "strict", z.ZodTypeAny, {
889
+ region?: string | undefined;
890
+ languages?: string[] | undefined;
891
+ self_description?: string | undefined;
892
+ }, {
893
+ region?: string | undefined;
894
+ languages?: string[] | undefined;
895
+ self_description?: string | undefined;
896
+ }>>;
897
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
898
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
899
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
900
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
901
+ spec: z.ZodOptional<z.ZodString>;
902
+ }, "strict", z.ZodTypeAny, {
903
+ strategy?: string[] | undefined;
904
+ identity?: {
905
+ region?: string | undefined;
906
+ languages?: string[] | undefined;
907
+ self_description?: string | undefined;
908
+ } | undefined;
909
+ rules?: string[] | undefined;
910
+ preferences?: Record<string, unknown> | undefined;
911
+ requirements?: string[] | undefined;
912
+ spec?: string | undefined;
913
+ }, {
914
+ strategy?: string[] | undefined;
915
+ identity?: {
916
+ region?: string | undefined;
917
+ languages?: string[] | undefined;
918
+ self_description?: string | undefined;
919
+ } | undefined;
920
+ rules?: string[] | undefined;
921
+ preferences?: Record<string, unknown> | undefined;
922
+ requirements?: string[] | undefined;
923
+ spec?: string | undefined;
924
+ }>;
925
+ updated_at: z.ZodNumber;
926
+ }, "strict", z.ZodTypeAny, {
927
+ version: number;
928
+ role: "user" | "merchant" | "arbitrator";
929
+ current: {
930
+ strategy?: string[] | undefined;
931
+ identity?: {
932
+ region?: string | undefined;
933
+ languages?: string[] | undefined;
934
+ self_description?: string | undefined;
935
+ } | undefined;
936
+ rules?: string[] | undefined;
937
+ preferences?: Record<string, unknown> | undefined;
938
+ requirements?: string[] | undefined;
939
+ spec?: string | undefined;
940
+ };
941
+ scope: "account" | "system";
942
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
943
+ long_term: {
944
+ strategy?: string[] | undefined;
945
+ identity?: {
946
+ region?: string | undefined;
947
+ languages?: string[] | undefined;
948
+ self_description?: string | undefined;
949
+ } | undefined;
950
+ rules?: string[] | undefined;
951
+ preferences?: Record<string, unknown> | undefined;
952
+ requirements?: string[] | undefined;
953
+ spec?: string | undefined;
954
+ };
955
+ updated_at: number;
956
+ account?: string | undefined;
957
+ }, {
958
+ version: number;
959
+ role: "user" | "merchant" | "arbitrator";
960
+ current: {
961
+ strategy?: string[] | undefined;
962
+ identity?: {
963
+ region?: string | undefined;
964
+ languages?: string[] | undefined;
965
+ self_description?: string | undefined;
966
+ } | undefined;
967
+ rules?: string[] | undefined;
968
+ preferences?: Record<string, unknown> | undefined;
969
+ requirements?: string[] | undefined;
970
+ spec?: string | undefined;
971
+ };
972
+ scope: "account" | "system";
973
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
974
+ long_term: {
975
+ strategy?: string[] | undefined;
976
+ identity?: {
977
+ region?: string | undefined;
978
+ languages?: string[] | undefined;
979
+ self_description?: string | undefined;
980
+ } | undefined;
981
+ rules?: string[] | undefined;
982
+ preferences?: Record<string, unknown> | undefined;
983
+ requirements?: string[] | undefined;
984
+ spec?: string | undefined;
985
+ };
986
+ updated_at: number;
987
+ account?: string | undefined;
988
+ }>;
989
+ line_count: z.ZodNumber;
990
+ }, "strict", z.ZodTypeAny, {
991
+ action: "set";
992
+ persona: {
993
+ version: number;
994
+ role: "user" | "merchant" | "arbitrator";
995
+ current: {
996
+ strategy?: string[] | undefined;
997
+ identity?: {
998
+ region?: string | undefined;
999
+ languages?: string[] | undefined;
1000
+ self_description?: string | undefined;
1001
+ } | undefined;
1002
+ rules?: string[] | undefined;
1003
+ preferences?: Record<string, unknown> | undefined;
1004
+ requirements?: string[] | undefined;
1005
+ spec?: string | undefined;
1006
+ };
1007
+ scope: "account" | "system";
1008
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1009
+ long_term: {
1010
+ strategy?: string[] | undefined;
1011
+ identity?: {
1012
+ region?: string | undefined;
1013
+ languages?: string[] | undefined;
1014
+ self_description?: string | undefined;
1015
+ } | undefined;
1016
+ rules?: string[] | undefined;
1017
+ preferences?: Record<string, unknown> | undefined;
1018
+ requirements?: string[] | undefined;
1019
+ spec?: string | undefined;
1020
+ };
1021
+ updated_at: number;
1022
+ account?: string | undefined;
1023
+ };
1024
+ line_count: number;
1025
+ }, {
1026
+ action: "set";
1027
+ persona: {
1028
+ version: number;
1029
+ role: "user" | "merchant" | "arbitrator";
1030
+ current: {
1031
+ strategy?: string[] | undefined;
1032
+ identity?: {
1033
+ region?: string | undefined;
1034
+ languages?: string[] | undefined;
1035
+ self_description?: string | undefined;
1036
+ } | undefined;
1037
+ rules?: string[] | undefined;
1038
+ preferences?: Record<string, unknown> | undefined;
1039
+ requirements?: string[] | undefined;
1040
+ spec?: string | undefined;
1041
+ };
1042
+ scope: "account" | "system";
1043
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1044
+ long_term: {
1045
+ strategy?: string[] | undefined;
1046
+ identity?: {
1047
+ region?: string | undefined;
1048
+ languages?: string[] | undefined;
1049
+ self_description?: string | undefined;
1050
+ } | undefined;
1051
+ rules?: string[] | undefined;
1052
+ preferences?: Record<string, unknown> | undefined;
1053
+ requirements?: string[] | undefined;
1054
+ spec?: string | undefined;
1055
+ };
1056
+ updated_at: number;
1057
+ account?: string | undefined;
1058
+ };
1059
+ line_count: number;
1060
+ }>, z.ZodObject<{
1061
+ action: z.ZodLiteral<"analyze">;
1062
+ analysis: z.ZodObject<{
1063
+ role: z.ZodOptional<z.ZodEnum<["merchant", "user", "arbitrator"]>>;
1064
+ industries: z.ZodArray<z.ZodEnum<["freelance", "rental", "education", "travel", "subscription", "retail"]>, "many">;
1065
+ preferences: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1066
+ requirements: z.ZodArray<z.ZodString, "many">;
1067
+ rules: z.ZodArray<z.ZodString, "many">;
1068
+ suggestions: z.ZodArray<z.ZodObject<{
1069
+ field: z.ZodString;
1070
+ value: z.ZodUnknown;
1071
+ reason: z.ZodString;
1072
+ }, "strict", z.ZodTypeAny, {
1073
+ reason: string;
1074
+ field: string;
1075
+ value?: unknown;
1076
+ }, {
1077
+ reason: string;
1078
+ field: string;
1079
+ value?: unknown;
1080
+ }>, "many">;
1081
+ confidence: z.ZodNumber;
1082
+ }, "strict", z.ZodTypeAny, {
1083
+ confidence: number;
1084
+ rules: string[];
1085
+ suggestions: {
1086
+ reason: string;
1087
+ field: string;
1088
+ value?: unknown;
1089
+ }[];
1090
+ preferences: Record<string, unknown>;
1091
+ requirements: string[];
1092
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1093
+ role?: "user" | "merchant" | "arbitrator" | undefined;
1094
+ }, {
1095
+ confidence: number;
1096
+ rules: string[];
1097
+ suggestions: {
1098
+ reason: string;
1099
+ field: string;
1100
+ value?: unknown;
1101
+ }[];
1102
+ preferences: Record<string, unknown>;
1103
+ requirements: string[];
1104
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1105
+ role?: "user" | "merchant" | "arbitrator" | undefined;
1106
+ }>;
1107
+ }, "strict", z.ZodTypeAny, {
1108
+ action: "analyze";
1109
+ analysis: {
1110
+ confidence: number;
1111
+ rules: string[];
1112
+ suggestions: {
1113
+ reason: string;
1114
+ field: string;
1115
+ value?: unknown;
1116
+ }[];
1117
+ preferences: Record<string, unknown>;
1118
+ requirements: string[];
1119
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1120
+ role?: "user" | "merchant" | "arbitrator" | undefined;
1121
+ };
1122
+ }, {
1123
+ action: "analyze";
1124
+ analysis: {
1125
+ confidence: number;
1126
+ rules: string[];
1127
+ suggestions: {
1128
+ reason: string;
1129
+ field: string;
1130
+ value?: unknown;
1131
+ }[];
1132
+ preferences: Record<string, unknown>;
1133
+ requirements: string[];
1134
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1135
+ role?: "user" | "merchant" | "arbitrator" | undefined;
1136
+ };
1137
+ }>, z.ZodObject<{
1138
+ action: z.ZodLiteral<"apply">;
1139
+ persona: z.ZodObject<{
1140
+ version: z.ZodNumber;
1141
+ scope: z.ZodEnum<["system", "account"]>;
1142
+ account: z.ZodOptional<z.ZodString>;
1143
+ role: z.ZodEnum<["merchant", "user", "arbitrator"]>;
1144
+ industries: z.ZodArray<z.ZodEnum<["freelance", "rental", "education", "travel", "subscription", "retail"]>, "many">;
1145
+ long_term: z.ZodObject<{
1146
+ identity: z.ZodOptional<z.ZodObject<{
1147
+ region: z.ZodOptional<z.ZodString>;
1148
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1149
+ self_description: z.ZodOptional<z.ZodString>;
1150
+ }, "strict", z.ZodTypeAny, {
1151
+ region?: string | undefined;
1152
+ languages?: string[] | undefined;
1153
+ self_description?: string | undefined;
1154
+ }, {
1155
+ region?: string | undefined;
1156
+ languages?: string[] | undefined;
1157
+ self_description?: string | undefined;
1158
+ }>>;
1159
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1160
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1161
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1162
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1163
+ spec: z.ZodOptional<z.ZodString>;
1164
+ }, "strict", z.ZodTypeAny, {
1165
+ strategy?: string[] | undefined;
1166
+ identity?: {
1167
+ region?: string | undefined;
1168
+ languages?: string[] | undefined;
1169
+ self_description?: string | undefined;
1170
+ } | undefined;
1171
+ rules?: string[] | undefined;
1172
+ preferences?: Record<string, unknown> | undefined;
1173
+ requirements?: string[] | undefined;
1174
+ spec?: string | undefined;
1175
+ }, {
1176
+ strategy?: string[] | undefined;
1177
+ identity?: {
1178
+ region?: string | undefined;
1179
+ languages?: string[] | undefined;
1180
+ self_description?: string | undefined;
1181
+ } | undefined;
1182
+ rules?: string[] | undefined;
1183
+ preferences?: Record<string, unknown> | undefined;
1184
+ requirements?: string[] | undefined;
1185
+ spec?: string | undefined;
1186
+ }>;
1187
+ current: z.ZodObject<{
1188
+ identity: z.ZodOptional<z.ZodObject<{
1189
+ region: z.ZodOptional<z.ZodString>;
1190
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1191
+ self_description: z.ZodOptional<z.ZodString>;
1192
+ }, "strict", z.ZodTypeAny, {
1193
+ region?: string | undefined;
1194
+ languages?: string[] | undefined;
1195
+ self_description?: string | undefined;
1196
+ }, {
1197
+ region?: string | undefined;
1198
+ languages?: string[] | undefined;
1199
+ self_description?: string | undefined;
1200
+ }>>;
1201
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1202
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1203
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1204
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1205
+ spec: z.ZodOptional<z.ZodString>;
1206
+ }, "strict", z.ZodTypeAny, {
1207
+ strategy?: string[] | undefined;
1208
+ identity?: {
1209
+ region?: string | undefined;
1210
+ languages?: string[] | undefined;
1211
+ self_description?: string | undefined;
1212
+ } | undefined;
1213
+ rules?: string[] | undefined;
1214
+ preferences?: Record<string, unknown> | undefined;
1215
+ requirements?: string[] | undefined;
1216
+ spec?: string | undefined;
1217
+ }, {
1218
+ strategy?: string[] | undefined;
1219
+ identity?: {
1220
+ region?: string | undefined;
1221
+ languages?: string[] | undefined;
1222
+ self_description?: string | undefined;
1223
+ } | undefined;
1224
+ rules?: string[] | undefined;
1225
+ preferences?: Record<string, unknown> | undefined;
1226
+ requirements?: string[] | undefined;
1227
+ spec?: string | undefined;
1228
+ }>;
1229
+ updated_at: z.ZodNumber;
1230
+ }, "strict", z.ZodTypeAny, {
1231
+ version: number;
1232
+ role: "user" | "merchant" | "arbitrator";
1233
+ current: {
1234
+ strategy?: string[] | undefined;
1235
+ identity?: {
1236
+ region?: string | undefined;
1237
+ languages?: string[] | undefined;
1238
+ self_description?: string | undefined;
1239
+ } | undefined;
1240
+ rules?: string[] | undefined;
1241
+ preferences?: Record<string, unknown> | undefined;
1242
+ requirements?: string[] | undefined;
1243
+ spec?: string | undefined;
1244
+ };
1245
+ scope: "account" | "system";
1246
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1247
+ long_term: {
1248
+ strategy?: string[] | undefined;
1249
+ identity?: {
1250
+ region?: string | undefined;
1251
+ languages?: string[] | undefined;
1252
+ self_description?: string | undefined;
1253
+ } | undefined;
1254
+ rules?: string[] | undefined;
1255
+ preferences?: Record<string, unknown> | undefined;
1256
+ requirements?: string[] | undefined;
1257
+ spec?: string | undefined;
1258
+ };
1259
+ updated_at: number;
1260
+ account?: string | undefined;
1261
+ }, {
1262
+ version: number;
1263
+ role: "user" | "merchant" | "arbitrator";
1264
+ current: {
1265
+ strategy?: string[] | undefined;
1266
+ identity?: {
1267
+ region?: string | undefined;
1268
+ languages?: string[] | undefined;
1269
+ self_description?: string | undefined;
1270
+ } | undefined;
1271
+ rules?: string[] | undefined;
1272
+ preferences?: Record<string, unknown> | undefined;
1273
+ requirements?: string[] | undefined;
1274
+ spec?: string | undefined;
1275
+ };
1276
+ scope: "account" | "system";
1277
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1278
+ long_term: {
1279
+ strategy?: string[] | undefined;
1280
+ identity?: {
1281
+ region?: string | undefined;
1282
+ languages?: string[] | undefined;
1283
+ self_description?: string | undefined;
1284
+ } | undefined;
1285
+ rules?: string[] | undefined;
1286
+ preferences?: Record<string, unknown> | undefined;
1287
+ requirements?: string[] | undefined;
1288
+ spec?: string | undefined;
1289
+ };
1290
+ updated_at: number;
1291
+ account?: string | undefined;
1292
+ }>;
1293
+ effective: z.ZodObject<{
1294
+ scope: z.ZodEnum<["system", "account"]>;
1295
+ account: z.ZodOptional<z.ZodString>;
1296
+ role: z.ZodEnum<["merchant", "user", "arbitrator"]>;
1297
+ industries: z.ZodArray<z.ZodEnum<["freelance", "rental", "education", "travel", "subscription", "retail"]>, "many">;
1298
+ layer: z.ZodObject<{
1299
+ identity: z.ZodOptional<z.ZodObject<{
1300
+ region: z.ZodOptional<z.ZodString>;
1301
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1302
+ self_description: z.ZodOptional<z.ZodString>;
1303
+ }, "strict", z.ZodTypeAny, {
1304
+ region?: string | undefined;
1305
+ languages?: string[] | undefined;
1306
+ self_description?: string | undefined;
1307
+ }, {
1308
+ region?: string | undefined;
1309
+ languages?: string[] | undefined;
1310
+ self_description?: string | undefined;
1311
+ }>>;
1312
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1313
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1314
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1315
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1316
+ spec: z.ZodOptional<z.ZodString>;
1317
+ }, "strict", z.ZodTypeAny, {
1318
+ strategy?: string[] | undefined;
1319
+ identity?: {
1320
+ region?: string | undefined;
1321
+ languages?: string[] | undefined;
1322
+ self_description?: string | undefined;
1323
+ } | undefined;
1324
+ rules?: string[] | undefined;
1325
+ preferences?: Record<string, unknown> | undefined;
1326
+ requirements?: string[] | undefined;
1327
+ spec?: string | undefined;
1328
+ }, {
1329
+ strategy?: string[] | undefined;
1330
+ identity?: {
1331
+ region?: string | undefined;
1332
+ languages?: string[] | undefined;
1333
+ self_description?: string | undefined;
1334
+ } | undefined;
1335
+ rules?: string[] | undefined;
1336
+ preferences?: Record<string, unknown> | undefined;
1337
+ requirements?: string[] | undefined;
1338
+ spec?: string | undefined;
1339
+ }>;
1340
+ sources: z.ZodArray<z.ZodObject<{
1341
+ scope: z.ZodEnum<["system", "account"]>;
1342
+ account: z.ZodOptional<z.ZodString>;
1343
+ part: z.ZodEnum<["long_term", "current"]>;
1344
+ }, "strict", z.ZodTypeAny, {
1345
+ scope: "account" | "system";
1346
+ part: "current" | "long_term";
1347
+ account?: string | undefined;
1348
+ }, {
1349
+ scope: "account" | "system";
1350
+ part: "current" | "long_term";
1351
+ account?: string | undefined;
1352
+ }>, "many">;
1353
+ }, "strict", z.ZodTypeAny, {
1354
+ role: "user" | "merchant" | "arbitrator";
1355
+ scope: "account" | "system";
1356
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1357
+ layer: {
1358
+ strategy?: string[] | undefined;
1359
+ identity?: {
1360
+ region?: string | undefined;
1361
+ languages?: string[] | undefined;
1362
+ self_description?: string | undefined;
1363
+ } | undefined;
1364
+ rules?: string[] | undefined;
1365
+ preferences?: Record<string, unknown> | undefined;
1366
+ requirements?: string[] | undefined;
1367
+ spec?: string | undefined;
1368
+ };
1369
+ sources: {
1370
+ scope: "account" | "system";
1371
+ part: "current" | "long_term";
1372
+ account?: string | undefined;
1373
+ }[];
1374
+ account?: string | undefined;
1375
+ }, {
1376
+ role: "user" | "merchant" | "arbitrator";
1377
+ scope: "account" | "system";
1378
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1379
+ layer: {
1380
+ strategy?: string[] | undefined;
1381
+ identity?: {
1382
+ region?: string | undefined;
1383
+ languages?: string[] | undefined;
1384
+ self_description?: string | undefined;
1385
+ } | undefined;
1386
+ rules?: string[] | undefined;
1387
+ preferences?: Record<string, unknown> | undefined;
1388
+ requirements?: string[] | undefined;
1389
+ spec?: string | undefined;
1390
+ };
1391
+ sources: {
1392
+ scope: "account" | "system";
1393
+ part: "current" | "long_term";
1394
+ account?: string | undefined;
1395
+ }[];
1396
+ account?: string | undefined;
1397
+ }>;
1398
+ applied: z.ZodArray<z.ZodObject<{
1399
+ field: z.ZodString;
1400
+ value: z.ZodUnknown;
1401
+ reason: z.ZodString;
1402
+ }, "strict", z.ZodTypeAny, {
1403
+ reason: string;
1404
+ field: string;
1405
+ value?: unknown;
1406
+ }, {
1407
+ reason: string;
1408
+ field: string;
1409
+ value?: unknown;
1410
+ }>, "many">;
1411
+ }, "strict", z.ZodTypeAny, {
1412
+ action: "apply";
1413
+ applied: {
1414
+ reason: string;
1415
+ field: string;
1416
+ value?: unknown;
1417
+ }[];
1418
+ effective: {
1419
+ role: "user" | "merchant" | "arbitrator";
1420
+ scope: "account" | "system";
1421
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1422
+ layer: {
1423
+ strategy?: string[] | undefined;
1424
+ identity?: {
1425
+ region?: string | undefined;
1426
+ languages?: string[] | undefined;
1427
+ self_description?: string | undefined;
1428
+ } | undefined;
1429
+ rules?: string[] | undefined;
1430
+ preferences?: Record<string, unknown> | undefined;
1431
+ requirements?: string[] | undefined;
1432
+ spec?: string | undefined;
1433
+ };
1434
+ sources: {
1435
+ scope: "account" | "system";
1436
+ part: "current" | "long_term";
1437
+ account?: string | undefined;
1438
+ }[];
1439
+ account?: string | undefined;
1440
+ };
1441
+ persona: {
1442
+ version: number;
1443
+ role: "user" | "merchant" | "arbitrator";
1444
+ current: {
1445
+ strategy?: string[] | undefined;
1446
+ identity?: {
1447
+ region?: string | undefined;
1448
+ languages?: string[] | undefined;
1449
+ self_description?: string | undefined;
1450
+ } | undefined;
1451
+ rules?: string[] | undefined;
1452
+ preferences?: Record<string, unknown> | undefined;
1453
+ requirements?: string[] | undefined;
1454
+ spec?: string | undefined;
1455
+ };
1456
+ scope: "account" | "system";
1457
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1458
+ long_term: {
1459
+ strategy?: string[] | undefined;
1460
+ identity?: {
1461
+ region?: string | undefined;
1462
+ languages?: string[] | undefined;
1463
+ self_description?: string | undefined;
1464
+ } | undefined;
1465
+ rules?: string[] | undefined;
1466
+ preferences?: Record<string, unknown> | undefined;
1467
+ requirements?: string[] | undefined;
1468
+ spec?: string | undefined;
1469
+ };
1470
+ updated_at: number;
1471
+ account?: string | undefined;
1472
+ };
1473
+ }, {
1474
+ action: "apply";
1475
+ applied: {
1476
+ reason: string;
1477
+ field: string;
1478
+ value?: unknown;
1479
+ }[];
1480
+ effective: {
1481
+ role: "user" | "merchant" | "arbitrator";
1482
+ scope: "account" | "system";
1483
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1484
+ layer: {
1485
+ strategy?: string[] | undefined;
1486
+ identity?: {
1487
+ region?: string | undefined;
1488
+ languages?: string[] | undefined;
1489
+ self_description?: string | undefined;
1490
+ } | undefined;
1491
+ rules?: string[] | undefined;
1492
+ preferences?: Record<string, unknown> | undefined;
1493
+ requirements?: string[] | undefined;
1494
+ spec?: string | undefined;
1495
+ };
1496
+ sources: {
1497
+ scope: "account" | "system";
1498
+ part: "current" | "long_term";
1499
+ account?: string | undefined;
1500
+ }[];
1501
+ account?: string | undefined;
1502
+ };
1503
+ persona: {
1504
+ version: number;
1505
+ role: "user" | "merchant" | "arbitrator";
1506
+ current: {
1507
+ strategy?: string[] | undefined;
1508
+ identity?: {
1509
+ region?: string | undefined;
1510
+ languages?: string[] | undefined;
1511
+ self_description?: string | undefined;
1512
+ } | undefined;
1513
+ rules?: string[] | undefined;
1514
+ preferences?: Record<string, unknown> | undefined;
1515
+ requirements?: string[] | undefined;
1516
+ spec?: string | undefined;
1517
+ };
1518
+ scope: "account" | "system";
1519
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1520
+ long_term: {
1521
+ strategy?: string[] | undefined;
1522
+ identity?: {
1523
+ region?: string | undefined;
1524
+ languages?: string[] | undefined;
1525
+ self_description?: string | undefined;
1526
+ } | undefined;
1527
+ rules?: string[] | undefined;
1528
+ preferences?: Record<string, unknown> | undefined;
1529
+ requirements?: string[] | undefined;
1530
+ spec?: string | undefined;
1531
+ };
1532
+ updated_at: number;
1533
+ account?: string | undefined;
1534
+ };
1535
+ }>, z.ZodObject<{
1536
+ action: z.ZodLiteral<"sync">;
1537
+ persona: z.ZodObject<{
1538
+ version: z.ZodNumber;
1539
+ scope: z.ZodEnum<["system", "account"]>;
1540
+ account: z.ZodOptional<z.ZodString>;
1541
+ role: z.ZodEnum<["merchant", "user", "arbitrator"]>;
1542
+ industries: z.ZodArray<z.ZodEnum<["freelance", "rental", "education", "travel", "subscription", "retail"]>, "many">;
1543
+ long_term: z.ZodObject<{
1544
+ identity: z.ZodOptional<z.ZodObject<{
1545
+ region: z.ZodOptional<z.ZodString>;
1546
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1547
+ self_description: z.ZodOptional<z.ZodString>;
1548
+ }, "strict", z.ZodTypeAny, {
1549
+ region?: string | undefined;
1550
+ languages?: string[] | undefined;
1551
+ self_description?: string | undefined;
1552
+ }, {
1553
+ region?: string | undefined;
1554
+ languages?: string[] | undefined;
1555
+ self_description?: string | undefined;
1556
+ }>>;
1557
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1558
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1559
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1560
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1561
+ spec: z.ZodOptional<z.ZodString>;
1562
+ }, "strict", z.ZodTypeAny, {
1563
+ strategy?: string[] | undefined;
1564
+ identity?: {
1565
+ region?: string | undefined;
1566
+ languages?: string[] | undefined;
1567
+ self_description?: string | undefined;
1568
+ } | undefined;
1569
+ rules?: string[] | undefined;
1570
+ preferences?: Record<string, unknown> | undefined;
1571
+ requirements?: string[] | undefined;
1572
+ spec?: string | undefined;
1573
+ }, {
1574
+ strategy?: string[] | undefined;
1575
+ identity?: {
1576
+ region?: string | undefined;
1577
+ languages?: string[] | undefined;
1578
+ self_description?: string | undefined;
1579
+ } | undefined;
1580
+ rules?: string[] | undefined;
1581
+ preferences?: Record<string, unknown> | undefined;
1582
+ requirements?: string[] | undefined;
1583
+ spec?: string | undefined;
1584
+ }>;
1585
+ current: z.ZodObject<{
1586
+ identity: z.ZodOptional<z.ZodObject<{
1587
+ region: z.ZodOptional<z.ZodString>;
1588
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1589
+ self_description: z.ZodOptional<z.ZodString>;
1590
+ }, "strict", z.ZodTypeAny, {
1591
+ region?: string | undefined;
1592
+ languages?: string[] | undefined;
1593
+ self_description?: string | undefined;
1594
+ }, {
1595
+ region?: string | undefined;
1596
+ languages?: string[] | undefined;
1597
+ self_description?: string | undefined;
1598
+ }>>;
1599
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1600
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1601
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1602
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1603
+ spec: z.ZodOptional<z.ZodString>;
1604
+ }, "strict", z.ZodTypeAny, {
1605
+ strategy?: string[] | undefined;
1606
+ identity?: {
1607
+ region?: string | undefined;
1608
+ languages?: string[] | undefined;
1609
+ self_description?: string | undefined;
1610
+ } | undefined;
1611
+ rules?: string[] | undefined;
1612
+ preferences?: Record<string, unknown> | undefined;
1613
+ requirements?: string[] | undefined;
1614
+ spec?: string | undefined;
1615
+ }, {
1616
+ strategy?: string[] | undefined;
1617
+ identity?: {
1618
+ region?: string | undefined;
1619
+ languages?: string[] | undefined;
1620
+ self_description?: string | undefined;
1621
+ } | undefined;
1622
+ rules?: string[] | undefined;
1623
+ preferences?: Record<string, unknown> | undefined;
1624
+ requirements?: string[] | undefined;
1625
+ spec?: string | undefined;
1626
+ }>;
1627
+ updated_at: z.ZodNumber;
1628
+ }, "strict", z.ZodTypeAny, {
1629
+ version: number;
1630
+ role: "user" | "merchant" | "arbitrator";
1631
+ current: {
1632
+ strategy?: string[] | undefined;
1633
+ identity?: {
1634
+ region?: string | undefined;
1635
+ languages?: string[] | undefined;
1636
+ self_description?: string | undefined;
1637
+ } | undefined;
1638
+ rules?: string[] | undefined;
1639
+ preferences?: Record<string, unknown> | undefined;
1640
+ requirements?: string[] | undefined;
1641
+ spec?: string | undefined;
1642
+ };
1643
+ scope: "account" | "system";
1644
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1645
+ long_term: {
1646
+ strategy?: string[] | undefined;
1647
+ identity?: {
1648
+ region?: string | undefined;
1649
+ languages?: string[] | undefined;
1650
+ self_description?: string | undefined;
1651
+ } | undefined;
1652
+ rules?: string[] | undefined;
1653
+ preferences?: Record<string, unknown> | undefined;
1654
+ requirements?: string[] | undefined;
1655
+ spec?: string | undefined;
1656
+ };
1657
+ updated_at: number;
1658
+ account?: string | undefined;
1659
+ }, {
1660
+ version: number;
1661
+ role: "user" | "merchant" | "arbitrator";
1662
+ current: {
1663
+ strategy?: string[] | undefined;
1664
+ identity?: {
1665
+ region?: string | undefined;
1666
+ languages?: string[] | undefined;
1667
+ self_description?: string | undefined;
1668
+ } | undefined;
1669
+ rules?: string[] | undefined;
1670
+ preferences?: Record<string, unknown> | undefined;
1671
+ requirements?: string[] | undefined;
1672
+ spec?: string | undefined;
1673
+ };
1674
+ scope: "account" | "system";
1675
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1676
+ long_term: {
1677
+ strategy?: string[] | undefined;
1678
+ identity?: {
1679
+ region?: string | undefined;
1680
+ languages?: string[] | undefined;
1681
+ self_description?: string | undefined;
1682
+ } | undefined;
1683
+ rules?: string[] | undefined;
1684
+ preferences?: Record<string, unknown> | undefined;
1685
+ requirements?: string[] | undefined;
1686
+ spec?: string | undefined;
1687
+ };
1688
+ updated_at: number;
1689
+ account?: string | undefined;
1690
+ }>;
1691
+ applied: z.ZodObject<{
1692
+ identity: z.ZodOptional<z.ZodObject<{
1693
+ region: z.ZodOptional<z.ZodString>;
1694
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1695
+ self_description: z.ZodOptional<z.ZodString>;
1696
+ }, "strict", z.ZodTypeAny, {
1697
+ region?: string | undefined;
1698
+ languages?: string[] | undefined;
1699
+ self_description?: string | undefined;
1700
+ }, {
1701
+ region?: string | undefined;
1702
+ languages?: string[] | undefined;
1703
+ self_description?: string | undefined;
1704
+ }>>;
1705
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1706
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1707
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1708
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1709
+ spec: z.ZodOptional<z.ZodString>;
1710
+ }, "strict", z.ZodTypeAny, {
1711
+ strategy?: string[] | undefined;
1712
+ identity?: {
1713
+ region?: string | undefined;
1714
+ languages?: string[] | undefined;
1715
+ self_description?: string | undefined;
1716
+ } | undefined;
1717
+ rules?: string[] | undefined;
1718
+ preferences?: Record<string, unknown> | undefined;
1719
+ requirements?: string[] | undefined;
1720
+ spec?: string | undefined;
1721
+ }, {
1722
+ strategy?: string[] | undefined;
1723
+ identity?: {
1724
+ region?: string | undefined;
1725
+ languages?: string[] | undefined;
1726
+ self_description?: string | undefined;
1727
+ } | undefined;
1728
+ rules?: string[] | undefined;
1729
+ preferences?: Record<string, unknown> | undefined;
1730
+ requirements?: string[] | undefined;
1731
+ spec?: string | undefined;
1732
+ }>;
1733
+ effective: z.ZodObject<{
1734
+ scope: z.ZodEnum<["system", "account"]>;
1735
+ account: z.ZodOptional<z.ZodString>;
1736
+ role: z.ZodEnum<["merchant", "user", "arbitrator"]>;
1737
+ industries: z.ZodArray<z.ZodEnum<["freelance", "rental", "education", "travel", "subscription", "retail"]>, "many">;
1738
+ layer: z.ZodObject<{
1739
+ identity: z.ZodOptional<z.ZodObject<{
1740
+ region: z.ZodOptional<z.ZodString>;
1741
+ languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1742
+ self_description: z.ZodOptional<z.ZodString>;
1743
+ }, "strict", z.ZodTypeAny, {
1744
+ region?: string | undefined;
1745
+ languages?: string[] | undefined;
1746
+ self_description?: string | undefined;
1747
+ }, {
1748
+ region?: string | undefined;
1749
+ languages?: string[] | undefined;
1750
+ self_description?: string | undefined;
1751
+ }>>;
1752
+ preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1753
+ strategy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1754
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1755
+ requirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1756
+ spec: z.ZodOptional<z.ZodString>;
1757
+ }, "strict", z.ZodTypeAny, {
1758
+ strategy?: string[] | undefined;
1759
+ identity?: {
1760
+ region?: string | undefined;
1761
+ languages?: string[] | undefined;
1762
+ self_description?: string | undefined;
1763
+ } | undefined;
1764
+ rules?: string[] | undefined;
1765
+ preferences?: Record<string, unknown> | undefined;
1766
+ requirements?: string[] | undefined;
1767
+ spec?: string | undefined;
1768
+ }, {
1769
+ strategy?: string[] | undefined;
1770
+ identity?: {
1771
+ region?: string | undefined;
1772
+ languages?: string[] | undefined;
1773
+ self_description?: string | undefined;
1774
+ } | undefined;
1775
+ rules?: string[] | undefined;
1776
+ preferences?: Record<string, unknown> | undefined;
1777
+ requirements?: string[] | undefined;
1778
+ spec?: string | undefined;
1779
+ }>;
1780
+ sources: z.ZodArray<z.ZodObject<{
1781
+ scope: z.ZodEnum<["system", "account"]>;
1782
+ account: z.ZodOptional<z.ZodString>;
1783
+ part: z.ZodEnum<["long_term", "current"]>;
1784
+ }, "strict", z.ZodTypeAny, {
1785
+ scope: "account" | "system";
1786
+ part: "current" | "long_term";
1787
+ account?: string | undefined;
1788
+ }, {
1789
+ scope: "account" | "system";
1790
+ part: "current" | "long_term";
1791
+ account?: string | undefined;
1792
+ }>, "many">;
1793
+ }, "strict", z.ZodTypeAny, {
1794
+ role: "user" | "merchant" | "arbitrator";
1795
+ scope: "account" | "system";
1796
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1797
+ layer: {
1798
+ strategy?: string[] | undefined;
1799
+ identity?: {
1800
+ region?: string | undefined;
1801
+ languages?: string[] | undefined;
1802
+ self_description?: string | undefined;
1803
+ } | undefined;
1804
+ rules?: string[] | undefined;
1805
+ preferences?: Record<string, unknown> | undefined;
1806
+ requirements?: string[] | undefined;
1807
+ spec?: string | undefined;
1808
+ };
1809
+ sources: {
1810
+ scope: "account" | "system";
1811
+ part: "current" | "long_term";
1812
+ account?: string | undefined;
1813
+ }[];
1814
+ account?: string | undefined;
1815
+ }, {
1816
+ role: "user" | "merchant" | "arbitrator";
1817
+ scope: "account" | "system";
1818
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1819
+ layer: {
1820
+ strategy?: string[] | undefined;
1821
+ identity?: {
1822
+ region?: string | undefined;
1823
+ languages?: string[] | undefined;
1824
+ self_description?: string | undefined;
1825
+ } | undefined;
1826
+ rules?: string[] | undefined;
1827
+ preferences?: Record<string, unknown> | undefined;
1828
+ requirements?: string[] | undefined;
1829
+ spec?: string | undefined;
1830
+ };
1831
+ sources: {
1832
+ scope: "account" | "system";
1833
+ part: "current" | "long_term";
1834
+ account?: string | undefined;
1835
+ }[];
1836
+ account?: string | undefined;
1837
+ }>;
1838
+ }, "strict", z.ZodTypeAny, {
1839
+ action: "sync";
1840
+ applied: {
1841
+ strategy?: string[] | undefined;
1842
+ identity?: {
1843
+ region?: string | undefined;
1844
+ languages?: string[] | undefined;
1845
+ self_description?: string | undefined;
1846
+ } | undefined;
1847
+ rules?: string[] | undefined;
1848
+ preferences?: Record<string, unknown> | undefined;
1849
+ requirements?: string[] | undefined;
1850
+ spec?: string | undefined;
1851
+ };
1852
+ effective: {
1853
+ role: "user" | "merchant" | "arbitrator";
1854
+ scope: "account" | "system";
1855
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1856
+ layer: {
1857
+ strategy?: string[] | undefined;
1858
+ identity?: {
1859
+ region?: string | undefined;
1860
+ languages?: string[] | undefined;
1861
+ self_description?: string | undefined;
1862
+ } | undefined;
1863
+ rules?: string[] | undefined;
1864
+ preferences?: Record<string, unknown> | undefined;
1865
+ requirements?: string[] | undefined;
1866
+ spec?: string | undefined;
1867
+ };
1868
+ sources: {
1869
+ scope: "account" | "system";
1870
+ part: "current" | "long_term";
1871
+ account?: string | undefined;
1872
+ }[];
1873
+ account?: string | undefined;
1874
+ };
1875
+ persona: {
1876
+ version: number;
1877
+ role: "user" | "merchant" | "arbitrator";
1878
+ current: {
1879
+ strategy?: string[] | undefined;
1880
+ identity?: {
1881
+ region?: string | undefined;
1882
+ languages?: string[] | undefined;
1883
+ self_description?: string | undefined;
1884
+ } | undefined;
1885
+ rules?: string[] | undefined;
1886
+ preferences?: Record<string, unknown> | undefined;
1887
+ requirements?: string[] | undefined;
1888
+ spec?: string | undefined;
1889
+ };
1890
+ scope: "account" | "system";
1891
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1892
+ long_term: {
1893
+ strategy?: string[] | undefined;
1894
+ identity?: {
1895
+ region?: string | undefined;
1896
+ languages?: string[] | undefined;
1897
+ self_description?: string | undefined;
1898
+ } | undefined;
1899
+ rules?: string[] | undefined;
1900
+ preferences?: Record<string, unknown> | undefined;
1901
+ requirements?: string[] | undefined;
1902
+ spec?: string | undefined;
1903
+ };
1904
+ updated_at: number;
1905
+ account?: string | undefined;
1906
+ };
1907
+ }, {
1908
+ action: "sync";
1909
+ applied: {
1910
+ strategy?: string[] | undefined;
1911
+ identity?: {
1912
+ region?: string | undefined;
1913
+ languages?: string[] | undefined;
1914
+ self_description?: string | undefined;
1915
+ } | undefined;
1916
+ rules?: string[] | undefined;
1917
+ preferences?: Record<string, unknown> | undefined;
1918
+ requirements?: string[] | undefined;
1919
+ spec?: string | undefined;
1920
+ };
1921
+ effective: {
1922
+ role: "user" | "merchant" | "arbitrator";
1923
+ scope: "account" | "system";
1924
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1925
+ layer: {
1926
+ strategy?: string[] | undefined;
1927
+ identity?: {
1928
+ region?: string | undefined;
1929
+ languages?: string[] | undefined;
1930
+ self_description?: string | undefined;
1931
+ } | undefined;
1932
+ rules?: string[] | undefined;
1933
+ preferences?: Record<string, unknown> | undefined;
1934
+ requirements?: string[] | undefined;
1935
+ spec?: string | undefined;
1936
+ };
1937
+ sources: {
1938
+ scope: "account" | "system";
1939
+ part: "current" | "long_term";
1940
+ account?: string | undefined;
1941
+ }[];
1942
+ account?: string | undefined;
1943
+ };
1944
+ persona: {
1945
+ version: number;
1946
+ role: "user" | "merchant" | "arbitrator";
1947
+ current: {
1948
+ strategy?: string[] | undefined;
1949
+ identity?: {
1950
+ region?: string | undefined;
1951
+ languages?: string[] | undefined;
1952
+ self_description?: string | undefined;
1953
+ } | undefined;
1954
+ rules?: string[] | undefined;
1955
+ preferences?: Record<string, unknown> | undefined;
1956
+ requirements?: string[] | undefined;
1957
+ spec?: string | undefined;
1958
+ };
1959
+ scope: "account" | "system";
1960
+ industries: ("freelance" | "rental" | "education" | "travel" | "subscription" | "retail")[];
1961
+ long_term: {
1962
+ strategy?: string[] | undefined;
1963
+ identity?: {
1964
+ region?: string | undefined;
1965
+ languages?: string[] | undefined;
1966
+ self_description?: string | undefined;
1967
+ } | undefined;
1968
+ rules?: string[] | undefined;
1969
+ preferences?: Record<string, unknown> | undefined;
1970
+ requirements?: string[] | undefined;
1971
+ spec?: string | undefined;
1972
+ };
1973
+ updated_at: number;
1974
+ account?: string | undefined;
1975
+ };
1976
+ }>, z.ZodObject<{
1977
+ action: z.ZodLiteral<"remove">;
1978
+ removed: z.ZodBoolean;
1979
+ }, "strict", z.ZodTypeAny, {
1980
+ action: "remove";
1981
+ removed: boolean;
1982
+ }, {
1983
+ action: "remove";
1984
+ removed: boolean;
1985
+ }>]>;