@wowok/agent-mcp 2.6.8 → 2.7.0

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 (59) hide show
  1. package/README.md +0 -2
  2. package/dist/customer/customer-advice.js +1 -0
  3. package/dist/customer/info-puzzle.js +1 -0
  4. package/dist/customer/reminder-system.d.ts +1 -0
  5. package/dist/customer/reminder-system.js +20 -0
  6. package/dist/customer/types.d.ts +1 -0
  7. package/dist/examples/{insurance-machine-create-publish.json → insurance-machine-create.json} +9 -9
  8. package/dist/examples/insurance-service-allocators.json +55 -0
  9. package/dist/examples/machine-publish.json +30 -0
  10. package/dist/examples/rental-ziroom-service-create.json +12 -64
  11. package/dist/examples/retail-myshop-service-create.json +14 -64
  12. package/dist/examples/retail-myshop-service-customer-required.json +31 -0
  13. package/dist/examples/threebody-machine-create.json +9 -10
  14. package/dist/examples/threebody-service-allocators.json +3 -4
  15. package/dist/examples/travel-machine-create.json +9 -10
  16. package/dist/examples/travel-service-create.json +11 -79
  17. package/dist/harness/index.d.ts +6 -1
  18. package/dist/harness/index.js +4 -1
  19. package/dist/harness/plan.d.ts +13 -0
  20. package/dist/harness/plan.js +24 -0
  21. package/dist/harness/recover.js +2 -2
  22. package/dist/index.js +10 -0
  23. package/dist/knowledge/fund-layer.js +8 -4
  24. package/dist/project/context-assembly.d.ts +9 -0
  25. package/dist/project/context-assembly.js +122 -6
  26. package/dist/project/graph-builder.d.ts +6 -1
  27. package/dist/project/graph-builder.js +1 -1
  28. package/dist/project/handlers.d.ts +1 -0
  29. package/dist/project/handlers.js +22 -9
  30. package/dist/schema/call/allocation.js +1 -1
  31. package/dist/schema/call/payment.d.ts +11 -11
  32. package/dist/schema/call/payment.js +5 -3
  33. package/dist/schema/call/semantic.js +10 -1
  34. package/dist/schema/call/service.d.ts +6 -6
  35. package/dist/schema/call/service.js +14 -3
  36. package/dist/schema/messenger/index.d.ts +171 -0
  37. package/dist/schema/messenger/index.js +5 -0
  38. package/dist/schema/operations.d.ts +11 -11
  39. package/dist/schema/project/index.d.ts +105 -0
  40. package/dist/schema/project/index.js +53 -0
  41. package/dist/schema/query/index.d.ts +571 -0
  42. package/dist/schema/query/index.js +42 -1
  43. package/dist/schema/sync-layer4.js +25 -4
  44. package/dist/schemas/index.json +1 -1
  45. package/dist/schemas/messenger_operation.output.json +14 -0
  46. package/dist/schemas/messenger_operation.schema.json +18 -0
  47. package/dist/schemas/onchain_operations.schema.json +7 -8
  48. package/dist/schemas/onchain_operations_allocation.schema.json +1 -1
  49. package/dist/schemas/onchain_operations_payment.schema.json +3 -4
  50. package/dist/schemas/onchain_operations_service.schema.json +3 -3
  51. package/dist/schemas/project_operation.output.json +79 -0
  52. package/dist/schemas/project_operation.schema.json +13 -0
  53. package/dist/schemas/query_toolkit.output.json +39 -1
  54. package/dist/schemas/wowok_buildin_info.output.json +132 -0
  55. package/dist/schemas/wowok_buildin_info.schema.json +14 -0
  56. package/dist/tools/handlers/onchain.js +94 -4
  57. package/dist/tools/index.js +3 -3
  58. package/package.json +2 -2
  59. package/dist/examples/insurance-service-allocators-publish.json +0 -56
@@ -8,6 +8,8 @@ export declare const ProjectOperationInputSchema: z.ZodObject<{
8
8
  context_objects: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9
9
  include_events: z.ZodOptional<z.ZodBoolean>;
10
10
  context_network: z.ZodOptional<z.ZodEnum<["testnet", "mainnet"]>>;
11
+ context_depth: z.ZodOptional<z.ZodNumber>;
12
+ context_include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
11
13
  filter_status: z.ZodOptional<z.ZodEnum<["draft", "active", "inactive", "archived"]>>;
12
14
  filter_perspective: z.ZodOptional<z.ZodEnum<["producer", "consumer", "both"]>>;
13
15
  filter_network: z.ZodOptional<z.ZodEnum<["testnet", "mainnet"]>>;
@@ -399,6 +401,8 @@ export declare const ProjectOperationInputSchema: z.ZodObject<{
399
401
  context_objects?: string[] | undefined;
400
402
  include_events?: boolean | undefined;
401
403
  context_network?: "testnet" | "mainnet" | undefined;
404
+ context_depth?: number | undefined;
405
+ context_include?: string[] | undefined;
402
406
  filter_status?: "active" | "inactive" | "draft" | "archived" | undefined;
403
407
  filter_perspective?: "consumer" | "producer" | "both" | undefined;
404
408
  filter_network?: "testnet" | "mainnet" | undefined;
@@ -577,6 +581,8 @@ export declare const ProjectOperationInputSchema: z.ZodObject<{
577
581
  context_objects?: string[] | undefined;
578
582
  include_events?: boolean | undefined;
579
583
  context_network?: "testnet" | "mainnet" | undefined;
584
+ context_depth?: number | undefined;
585
+ context_include?: string[] | undefined;
580
586
  filter_status?: "active" | "inactive" | "draft" | "archived" | undefined;
581
587
  filter_perspective?: "consumer" | "producer" | "both" | undefined;
582
588
  filter_network?: "testnet" | "mainnet" | undefined;
@@ -2680,6 +2686,26 @@ export declare const ProjectOperationOutputSchema: z.ZodObject<{
2680
2686
  objects: z.ZodArray<z.ZodUnknown, "many">;
2681
2687
  events: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
2682
2688
  embedded_history: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2689
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
2690
+ object: z.ZodString;
2691
+ depth: z.ZodNumber;
2692
+ via_field: z.ZodString;
2693
+ via_type: z.ZodString;
2694
+ parent: z.ZodString;
2695
+ }, "strip", z.ZodTypeAny, {
2696
+ object: string;
2697
+ parent: string;
2698
+ depth: number;
2699
+ via_field: string;
2700
+ via_type: string;
2701
+ }, {
2702
+ object: string;
2703
+ parent: string;
2704
+ depth: number;
2705
+ via_field: string;
2706
+ via_type: string;
2707
+ }>, "many">>;
2708
+ dependency_objects: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
2683
2709
  semantic_summary: z.ZodOptional<z.ZodUnknown>;
2684
2710
  context_digest: z.ZodString;
2685
2711
  next_action: z.ZodString;
@@ -2702,8 +2728,16 @@ export declare const ProjectOperationOutputSchema: z.ZodObject<{
2702
2728
  context_digest: string;
2703
2729
  next_action: string;
2704
2730
  events?: unknown[] | undefined;
2731
+ dependencies?: {
2732
+ object: string;
2733
+ parent: string;
2734
+ depth: number;
2735
+ via_field: string;
2736
+ via_type: string;
2737
+ }[] | undefined;
2705
2738
  semantic_summary?: unknown;
2706
2739
  embedded_history?: Record<string, unknown> | undefined;
2740
+ dependency_objects?: unknown[] | undefined;
2707
2741
  flywheel_collected?: {
2708
2742
  signature_recorded: boolean;
2709
2743
  proposal_created: boolean;
@@ -2715,8 +2749,16 @@ export declare const ProjectOperationOutputSchema: z.ZodObject<{
2715
2749
  context_digest: string;
2716
2750
  next_action: string;
2717
2751
  events?: unknown[] | undefined;
2752
+ dependencies?: {
2753
+ object: string;
2754
+ parent: string;
2755
+ depth: number;
2756
+ via_field: string;
2757
+ via_type: string;
2758
+ }[] | undefined;
2718
2759
  semantic_summary?: unknown;
2719
2760
  embedded_history?: Record<string, unknown> | undefined;
2761
+ dependency_objects?: unknown[] | undefined;
2720
2762
  flywheel_collected?: {
2721
2763
  signature_recorded: boolean;
2722
2764
  proposal_created: boolean;
@@ -3967,6 +4009,25 @@ export declare const ProjectOperationOutputSchema: z.ZodObject<{
3967
4009
  cloned_objects_count: number;
3968
4010
  }>;
3969
4011
  key_principle: z.ZodString;
4012
+ payment_token_decision: z.ZodObject<{
4013
+ round: z.ZodString;
4014
+ question: z.ZodString;
4015
+ options: z.ZodArray<z.ZodString, "many">;
4016
+ default: z.ZodOptional<z.ZodString>;
4017
+ note: z.ZodOptional<z.ZodString>;
4018
+ }, "strict", z.ZodTypeAny, {
4019
+ options: string[];
4020
+ round: string;
4021
+ question: string;
4022
+ default?: string | undefined;
4023
+ note?: string | undefined;
4024
+ }, {
4025
+ options: string[];
4026
+ round: string;
4027
+ question: string;
4028
+ default?: string | undefined;
4029
+ note?: string | undefined;
4030
+ }>;
3970
4031
  migration_plan: z.ZodArray<z.ZodObject<{
3971
4032
  step: z.ZodNumber;
3972
4033
  status: z.ZodEnum<["completed", "pending_user_action"]>;
@@ -4047,6 +4108,13 @@ export declare const ProjectOperationOutputSchema: z.ZodObject<{
4047
4108
  cloned_objects_count: number;
4048
4109
  };
4049
4110
  key_principle: string;
4111
+ payment_token_decision: {
4112
+ options: string[];
4113
+ round: string;
4114
+ question: string;
4115
+ default?: string | undefined;
4116
+ note?: string | undefined;
4117
+ };
4050
4118
  migration_plan: {
4051
4119
  status: "completed" | "pending_user_action";
4052
4120
  description: string;
@@ -4080,6 +4148,13 @@ export declare const ProjectOperationOutputSchema: z.ZodObject<{
4080
4148
  cloned_objects_count: number;
4081
4149
  };
4082
4150
  key_principle: string;
4151
+ payment_token_decision: {
4152
+ options: string[];
4153
+ round: string;
4154
+ question: string;
4155
+ default?: string | undefined;
4156
+ note?: string | undefined;
4157
+ };
4083
4158
  migration_plan: {
4084
4159
  status: "completed" | "pending_user_action";
4085
4160
  description: string;
@@ -6859,8 +6934,16 @@ export declare const ProjectOperationOutputSchema: z.ZodObject<{
6859
6934
  context_digest: string;
6860
6935
  next_action: string;
6861
6936
  events?: unknown[] | undefined;
6937
+ dependencies?: {
6938
+ object: string;
6939
+ parent: string;
6940
+ depth: number;
6941
+ via_field: string;
6942
+ via_type: string;
6943
+ }[] | undefined;
6862
6944
  semantic_summary?: unknown;
6863
6945
  embedded_history?: Record<string, unknown> | undefined;
6946
+ dependency_objects?: unknown[] | undefined;
6864
6947
  flywheel_collected?: {
6865
6948
  signature_recorded: boolean;
6866
6949
  proposal_created: boolean;
@@ -7535,6 +7618,13 @@ export declare const ProjectOperationOutputSchema: z.ZodObject<{
7535
7618
  cloned_objects_count: number;
7536
7619
  };
7537
7620
  key_principle: string;
7621
+ payment_token_decision: {
7622
+ options: string[];
7623
+ round: string;
7624
+ question: string;
7625
+ default?: string | undefined;
7626
+ note?: string | undefined;
7627
+ };
7538
7628
  migration_plan: {
7539
7629
  status: "completed" | "pending_user_action";
7540
7630
  description: string;
@@ -8077,8 +8167,16 @@ export declare const ProjectOperationOutputSchema: z.ZodObject<{
8077
8167
  context_digest: string;
8078
8168
  next_action: string;
8079
8169
  events?: unknown[] | undefined;
8170
+ dependencies?: {
8171
+ object: string;
8172
+ parent: string;
8173
+ depth: number;
8174
+ via_field: string;
8175
+ via_type: string;
8176
+ }[] | undefined;
8080
8177
  semantic_summary?: unknown;
8081
8178
  embedded_history?: Record<string, unknown> | undefined;
8179
+ dependency_objects?: unknown[] | undefined;
8082
8180
  flywheel_collected?: {
8083
8181
  signature_recorded: boolean;
8084
8182
  proposal_created: boolean;
@@ -8753,6 +8851,13 @@ export declare const ProjectOperationOutputSchema: z.ZodObject<{
8753
8851
  cloned_objects_count: number;
8754
8852
  };
8755
8853
  key_principle: string;
8854
+ payment_token_decision: {
8855
+ options: string[];
8856
+ round: string;
8857
+ question: string;
8858
+ default?: string | undefined;
8859
+ note?: string | undefined;
8860
+ };
8756
8861
  migration_plan: {
8757
8862
  status: "completed" | "pending_user_action";
8758
8863
  description: string;
@@ -125,6 +125,33 @@ export const ProjectOperationInputSchema = z
125
125
  .enum(["testnet", "mainnet"])
126
126
  .optional()
127
127
  .describe("Network for assemble_context queries. Defaults to 'testnet' if omitted."),
128
+ context_depth: z
129
+ .number()
130
+ .int()
131
+ .min(0)
132
+ .max(5)
133
+ .optional()
134
+ .describe("BFS recursion depth for dependency expansion in assemble_context (default 0 = no expansion). " +
135
+ "When >0, the assembly recursively queries objects referenced by the center objects " +
136
+ "(permission, guard, machine, service, repositories, etc.) up to the given depth, " +
137
+ "using the same address-field extraction rules as build_graph (Pathway 1). " +
138
+ "Each level issues one batched query_objects call (≤50 IDs per batch). " +
139
+ "Cycles are detected and skipped via a visited set. " +
140
+ "Discovered dependencies are returned in `dependencies` (edge metadata) and " +
141
+ "`dependency_objects` (full object states). Recommended: 1–2 for most use cases; " +
142
+ "3+ may pull large subgraphs (use context_include to constrain)."),
143
+ context_include: z
144
+ .array(z.string())
145
+ .optional()
146
+ .describe("Optional filter for dependency expansion edge types. When omitted, ALL outbound " +
147
+ "references are followed. When provided, only edges whose `field` matches one of the " +
148
+ "listed names are followed. Recognized field names (from extractAddressFields): " +
149
+ "'permission', 'machine', 'service', 'progress', 'buy_guard', 'um', 'repositories', " +
150
+ "'arbitrations', 'rewards', 'consensus_repositories', 'context_repositories', " +
151
+ "'dispute', 'allocation', 'external_deposit_guard', 'external_withdraw_guard', " +
152
+ "'allocator_guard', 'for_object', 'for_guard', 'payment', 'voting_guard', 'usage_guard', " +
153
+ "'guard', 'write_guard', 'quote_guard', 'recipient_entity', 'order_allocators'. " +
154
+ "Example: ['permission','guard'] expands only permission/guard dependencies."),
128
155
  filter_status: z
129
156
  .enum(["draft", "active", "inactive", "archived"])
130
157
  .optional()
@@ -714,6 +741,25 @@ const AssembleContextResultSchema = z
714
741
  "Progress objects: session.forwards (who did what, when, accomplished). " +
715
742
  "Order objects: disputes, claimed_by, progress_object. " +
716
743
  "This is the CORRECT history source: convergent, no infinite recursion."),
744
+ dependencies: z
745
+ .array(z.object({
746
+ object: z.string().describe("Discovered dependency object ID (0x...)."),
747
+ depth: z.number().int().min(1).describe("BFS depth at which this dependency was discovered (1 = direct reference from a center object)."),
748
+ via_field: z.string().describe("Field name on the parent object that references this dependency (e.g. 'permission', 'machine', 'guard'). Matches extractAddressFields output."),
749
+ via_type: z.string().describe("Semantic edge type: 'bind' | 'validate' | 'consume' | 'trigger' | 'create'."),
750
+ parent: z.string().describe("Object ID of the parent that referenced this dependency."),
751
+ }))
752
+ .optional()
753
+ .describe("Dependency edges discovered via BFS expansion (only when context_depth > 0). " +
754
+ "Each entry describes one outbound reference (parent → child) with the field name " +
755
+ "and semantic edge type. Use with dependency_objects to get the full states. " +
756
+ "Cycles are deduplicated — each object ID appears at most once at its shallowest depth."),
757
+ dependency_objects: z
758
+ .array(z.unknown())
759
+ .optional()
760
+ .describe("Full on-chain states of the discovered dependency objects (only when context_depth > 0). " +
761
+ "Order matches `dependencies` when possible; safe to consume as an unordered set. " +
762
+ "Center objects are NOT repeated here — they live in `objects`."),
717
763
  semantic_summary: z
718
764
  .unknown()
719
765
  .optional()
@@ -1425,6 +1471,13 @@ const MigrateToMainnetResultSchema = z
1425
1471
  cloned_objects_count: z.number(),
1426
1472
  }).strict(),
1427
1473
  key_principle: z.string().describe("Explains that testnet/mainnet are different projects with different addresses for same names."),
1474
+ payment_token_decision: z.object({
1475
+ round: z.string().describe("Decision round identifier (e.g. 'M1')."),
1476
+ question: z.string().describe("Question asking whether to keep WOW or switch to a stablecoin when migrating testnet → mainnet."),
1477
+ options: z.array(z.string()).describe("Available choices (e.g. Keep WOW / Switch to USDT / Switch to USDC / Other stablecoin)."),
1478
+ default: z.string().optional().describe("Recommended default choice (Keep WOW)."),
1479
+ note: z.string().optional().describe("Guidance: mainnet stablecoins are available via the ETH mainnet cross-chain bridge; if switching, update Service/Treasury/Allocation type_parameter before publishing."),
1480
+ }).strict().describe("Payment-token migration decision. testnet recommends WOW; mainnet supports USDT and other stablecoins via the ETH mainnet bridge. Must be resolved BEFORE step 2 (on-chain deployment) because the Service/Treasury/Allocation type_parameter determines the payment token."),
1428
1481
  migration_plan: z.array(MigrationPlanStepSchema).describe("5-step migration plan. Step 1 is completed; steps 2-5 require user action."),
1429
1482
  summary: z.string().describe("Human-readable summary of the migration."),
1430
1483
  })