@wowok/agent-mcp 2.3.16 → 2.4.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 (136) hide show
  1. package/dist/customer/index.d.ts +9 -0
  2. package/dist/customer/index.js +9 -0
  3. package/dist/customer/industry-risks.d.ts +4 -0
  4. package/dist/customer/industry-risks.js +45 -31
  5. package/dist/customer/order-monitor.js +57 -57
  6. package/dist/customer/order-strategy.js +89 -89
  7. package/dist/customer/post-purchase.js +97 -97
  8. package/dist/customer/reminder-system.js +26 -26
  9. package/dist/customer/risk-assessment.js +46 -46
  10. package/dist/customer/types.d.ts +4 -4
  11. package/dist/customer/types.js +4 -4
  12. package/dist/customer/user-preferences.d.ts +3 -0
  13. package/dist/customer/user-preferences.js +59 -50
  14. package/dist/experience/intent-distill.js +6 -6
  15. package/dist/experience/realtime-feedback.js +17 -0
  16. package/dist/index.js +360 -273
  17. package/dist/knowledge/acquisition-flywheel.d.ts +3 -0
  18. package/dist/knowledge/acquisition-flywheel.js +73 -64
  19. package/dist/knowledge/arbitration-trust.js +10 -10
  20. package/dist/knowledge/demand-matching.js +8 -8
  21. package/dist/knowledge/dynamic-pricing.js +18 -18
  22. package/dist/knowledge/flywheel-loop.js +11 -11
  23. package/dist/knowledge/glossary.js +22 -22
  24. package/dist/knowledge/guard-ledger.d.ts +19 -0
  25. package/dist/knowledge/guard-ledger.js +246 -0
  26. package/dist/knowledge/guard-lint.d.ts +76 -0
  27. package/dist/knowledge/guard-lint.js +590 -0
  28. package/dist/knowledge/guard-puzzle.d.ts +188 -0
  29. package/dist/knowledge/guard-puzzle.js +804 -0
  30. package/dist/knowledge/guard-risk.d.ts +67 -0
  31. package/dist/knowledge/guard-risk.js +1046 -0
  32. package/dist/knowledge/guard-templates.d.ts +37 -0
  33. package/dist/knowledge/guard-templates.js +329 -0
  34. package/dist/knowledge/guard-translation.d.ts +58 -0
  35. package/dist/knowledge/guard-translation.js +1118 -0
  36. package/dist/knowledge/index.d.ts +17 -0
  37. package/dist/knowledge/index.js +17 -0
  38. package/dist/knowledge/industry-evolution.js +29 -29
  39. package/dist/knowledge/industry-generalizer.js +52 -52
  40. package/dist/knowledge/industry-registry.d.ts +1 -2
  41. package/dist/knowledge/industry-registry.js +43 -36
  42. package/dist/knowledge/intent-metrics.js +67 -67
  43. package/dist/knowledge/process-model.js +80 -80
  44. package/dist/knowledge/reputation-rules.js +9 -9
  45. package/dist/knowledge/reward-templates.js +51 -51
  46. package/dist/knowledge/safety-rules.js +63 -2
  47. package/dist/knowledge/tool-constraints.js +17 -11
  48. package/dist/knowledge/trust-metrics.js +26 -26
  49. package/dist/safety/confirm-gate.d.ts +4 -2
  50. package/dist/safety/confirm-gate.js +48 -4
  51. package/dist/schema/call/allocation.d.ts +24 -14
  52. package/dist/schema/call/arbitration.d.ts +142 -132
  53. package/dist/schema/call/base.d.ts +901 -43
  54. package/dist/schema/call/base.js +77 -13
  55. package/dist/schema/call/bridge-handler.js +15 -2
  56. package/dist/schema/call/bridge.d.ts +795 -27
  57. package/dist/schema/call/bridge.js +37 -0
  58. package/dist/schema/call/contact.d.ts +10 -0
  59. package/dist/schema/call/demand.d.ts +94 -84
  60. package/dist/schema/call/guard.d.ts +229 -46
  61. package/dist/schema/call/guard.js +50 -0
  62. package/dist/schema/call/handler.js +46 -14
  63. package/dist/schema/call/machine.d.ts +158 -138
  64. package/dist/schema/call/order.d.ts +10 -0
  65. package/dist/schema/call/payment.d.ts +10 -0
  66. package/dist/schema/call/permission.d.ts +314 -304
  67. package/dist/schema/call/personal.d.ts +10 -0
  68. package/dist/schema/call/progress.d.ts +10 -0
  69. package/dist/schema/call/proof.d.ts +20 -0
  70. package/dist/schema/call/repository.d.ts +32 -22
  71. package/dist/schema/call/reward.d.ts +10 -0
  72. package/dist/schema/call/semantic.d.ts +9 -2
  73. package/dist/schema/call/semantic.js +617 -25
  74. package/dist/schema/call/service.d.ts +20 -10
  75. package/dist/schema/call/treasury.d.ts +10 -0
  76. package/dist/schema/config/index.d.ts +18 -0
  77. package/dist/schema/config/index.js +17 -0
  78. package/dist/schema/index.d.ts +6 -0
  79. package/dist/schema/index.js +5 -0
  80. package/dist/schema/local/index.d.ts +9 -9
  81. package/dist/schema/local/index.js +9 -0
  82. package/dist/schema/local/wip.d.ts +39 -19
  83. package/dist/schema/local/wip.js +5 -5
  84. package/dist/schema/messenger/index.d.ts +376 -55
  85. package/dist/schema/messenger/index.js +19 -19
  86. package/dist/schema/operations.d.ts +1881 -681
  87. package/dist/schema/operations.js +91 -96
  88. package/dist/schema/project/index.d.ts +21 -0
  89. package/dist/schema/project/index.js +32 -0
  90. package/dist/schema/query/index.d.ts +1074 -168
  91. package/dist/schema/query/index.js +8 -8
  92. package/dist/schema/schema-query/index.d.ts +33 -0
  93. package/dist/schema/schema-query/index.js +36 -0
  94. package/dist/schema/schema-version.d.ts +25 -0
  95. package/dist/schema/schema-version.js +76 -0
  96. package/dist/schema/trust/index.d.ts +407 -0
  97. package/dist/schema/trust/index.js +113 -0
  98. package/dist/schema/utils/guard-parser.js +4 -4
  99. package/dist/schema/utils/node-parser.js +14 -14
  100. package/dist/schemas/bridge_operation.output.json +233 -9
  101. package/dist/schemas/bridge_operation.schema.json +67 -8
  102. package/dist/schemas/config_operation.output.json +18 -0
  103. package/dist/schemas/config_operation.schema.json +34 -0
  104. package/dist/schemas/guard-node-schema.json +82 -0
  105. package/dist/schemas/guard2file.schema.json +8 -0
  106. package/dist/schemas/index.json +19 -1
  107. package/dist/schemas/machineNode2file.schema.json +8 -0
  108. package/dist/schemas/messenger_operation.output.json +236 -10
  109. package/dist/schemas/onchain_events.output.json +718 -0
  110. package/dist/schemas/onchain_operations.output.json +286 -11
  111. package/dist/schemas/onchain_operations.schema.json +19 -16
  112. package/dist/schemas/onchain_operations_allocation.schema.json +8 -0
  113. package/dist/schemas/onchain_operations_arbitration.schema.json +8 -0
  114. package/dist/schemas/onchain_operations_contact.schema.json +8 -0
  115. package/dist/schemas/onchain_operations_demand.schema.json +8 -0
  116. package/dist/schemas/onchain_operations_gen_passport.schema.json +16 -0
  117. package/dist/schemas/onchain_operations_guard.schema.json +11 -16
  118. package/dist/schemas/onchain_operations_machine.schema.json +8 -0
  119. package/dist/schemas/onchain_operations_order.schema.json +8 -0
  120. package/dist/schemas/onchain_operations_payment.schema.json +8 -0
  121. package/dist/schemas/onchain_operations_permission.schema.json +8 -0
  122. package/dist/schemas/onchain_operations_personal.schema.json +8 -0
  123. package/dist/schemas/onchain_operations_progress.schema.json +8 -0
  124. package/dist/schemas/onchain_operations_repository.schema.json +8 -0
  125. package/dist/schemas/onchain_operations_reward.schema.json +8 -0
  126. package/dist/schemas/onchain_operations_service.schema.json +8 -0
  127. package/dist/schemas/onchain_operations_treasury.schema.json +8 -0
  128. package/dist/schemas/onchain_table_data.output.json +718 -0
  129. package/dist/schemas/project_operation.output.json +18 -0
  130. package/dist/schemas/project_operation.schema.json +42 -0
  131. package/dist/schemas/query_toolkit.schema.json +360 -368
  132. package/dist/schemas/schema_query.schema.json +6 -3
  133. package/dist/schemas/trust_score.output.json +327 -0
  134. package/dist/schemas/trust_score.schema.json +46 -0
  135. package/dist/schemas/wip_file.output.json +24 -1
  136. package/package.json +2 -2
@@ -0,0 +1,188 @@
1
+ export interface IntentPuzzle {
2
+ action: "buy" | "forward" | "allocate" | "claim_reward" | "vote" | "dispute" | "write_repository" | "submit_progress" | "gen_passport" | "custom";
3
+ rule_sentence: string;
4
+ failure_conditions: string[];
5
+ }
6
+ export interface BindingPuzzle {
7
+ host_object: "Service" | "Machine" | "Arbitration" | "Reward" | "Repository" | "Progress" | "Demand" | "Standalone";
8
+ host_object_name?: string;
9
+ binding_field: "buy_guard" | "order_allocators" | "Forward.guard" | "submission" | "guard" | "write_guard" | "usage_guard" | "voting_guard" | "ServiceGuard" | "none";
10
+ circular_reference: boolean;
11
+ host_object_state: "not_created" | "created_unpublished" | "published_immutable" | "unknown";
12
+ }
13
+ export interface OnChainConstantEntry {
14
+ identifier: number;
15
+ object_address: string;
16
+ object_type: string;
17
+ name: string;
18
+ is_system_address?: boolean;
19
+ }
20
+ export interface WitnessDerivedEntry {
21
+ identifier: number;
22
+ source_type: string;
23
+ witness_type: number;
24
+ witness_name: string;
25
+ target_type: string;
26
+ source_b_submission: boolean;
27
+ name: string;
28
+ }
29
+ export interface SubmittedObjectEntry {
30
+ identifier: number;
31
+ expected_object_type: string;
32
+ value_type: string;
33
+ name: string;
34
+ binding_constraint?: string;
35
+ }
36
+ export interface SubmittedValueEntry {
37
+ identifier: number;
38
+ value_type: string;
39
+ name: string;
40
+ binding_constraint?: string;
41
+ }
42
+ export interface SystemContextEntry {
43
+ context_type: "Signer" | "Clock" | "Guard";
44
+ usage: string;
45
+ }
46
+ export interface DataSourcePuzzle {
47
+ on_chain_constants: OnChainConstantEntry[];
48
+ witness_derived: WitnessDerivedEntry[];
49
+ submitted_objects: SubmittedObjectEntry[];
50
+ submitted_values: SubmittedValueEntry[];
51
+ system_contexts: SystemContextEntry[];
52
+ }
53
+ export interface QueryPuzzle {
54
+ query_id: number;
55
+ query_name: string;
56
+ object_type: string;
57
+ parameters: string[];
58
+ return_type: string;
59
+ witness?: {
60
+ witness_type: number;
61
+ witness_name: string;
62
+ source_type: string;
63
+ target_type: string;
64
+ scenario: string;
65
+ };
66
+ purpose: string;
67
+ }
68
+ export interface LogicNodePuzzle {
69
+ node_type: string;
70
+ return_type: string;
71
+ children?: LogicNodePuzzle[];
72
+ references_identifier?: number;
73
+ query?: QueryPuzzle;
74
+ description: string;
75
+ }
76
+ export interface RelyPuzzle {
77
+ guards: string[];
78
+ logic_or: boolean;
79
+ rep_verified: boolean[];
80
+ }
81
+ export interface ConstraintChecklist {
82
+ pitfall_01_identifiers_in_table: boolean;
83
+ pitfall_02_type_compatibility: boolean;
84
+ pitfall_03_query_instruction_valid: boolean;
85
+ pitfall_04_witness_correct: boolean;
86
+ pitfall_05_time_lock_test_safe: boolean;
87
+ pitfall_06_exported_before_recreate: boolean;
88
+ pitfall_07_root_returns_bool: boolean;
89
+ pitfall_08_rely_rep_true: boolean;
90
+ pitfall_09_voting_weight_numeric: boolean;
91
+ pitfall_10_arbitration_not_paused: boolean;
92
+ runtime_01_guard_immutable: boolean;
93
+ runtime_02_submission_type_match: boolean;
94
+ runtime_03_submission_complete: boolean;
95
+ runtime_04_submission_size: boolean;
96
+ runtime_05_witness_source_valid: boolean;
97
+ runtime_06_query_object_valid: boolean;
98
+ }
99
+ export interface GuardPuzzle {
100
+ current_round: "R1" | "R2" | "R3" | "R4" | "R5" | "R6" | "R7" | "R8" | "R9" | "R10";
101
+ intent?: IntentPuzzle;
102
+ binding?: BindingPuzzle;
103
+ data_sources?: DataSourcePuzzle;
104
+ queries?: QueryPuzzle[];
105
+ logic?: {
106
+ root: LogicNodePuzzle;
107
+ rely?: RelyPuzzle;
108
+ };
109
+ constraints?: ConstraintChecklist;
110
+ }
111
+ export type PuzzleDimension = "intent" | "binding" | "data_sources" | "query" | "logic" | "constraints";
112
+ export interface PuzzleCompleteness {
113
+ dimensions: Record<PuzzleDimension, boolean>;
114
+ missing: PuzzleDimension[];
115
+ missing_details: string[];
116
+ complete: boolean;
117
+ next_step: {
118
+ round: GuardPuzzle["current_round"];
119
+ action: string;
120
+ questions: string[];
121
+ };
122
+ }
123
+ export declare function checkPuzzleCompleteness(puzzle: GuardPuzzle): PuzzleCompleteness;
124
+ export declare function generateConfirmationText(puzzle: GuardPuzzle): string;
125
+ export declare function initPuzzleFromIntent(intent: Partial<IntentPuzzle>): GuardPuzzle;
126
+ export declare function inferBindingFromAction(action: IntentPuzzle["action"]): Partial<BindingPuzzle>;
127
+ export declare function emptyDataSources(): DataSourcePuzzle;
128
+ export declare const WITNESS_NAME_MAP: Record<number, {
129
+ name: string;
130
+ source: string;
131
+ target: string;
132
+ }>;
133
+ export declare function getWitnessInfo(witness_type: number): {
134
+ name: string;
135
+ source: string;
136
+ target: string;
137
+ } | undefined;
138
+ export interface RootNodeSnapshot {
139
+ type: string;
140
+ identifier?: number;
141
+ query?: string | number;
142
+ object?: {
143
+ identifier: number;
144
+ convert_witness?: number;
145
+ };
146
+ parameters?: RootNodeSnapshot[];
147
+ context?: "Clock" | "Guard" | "Signer";
148
+ nodes?: RootNodeSnapshot[];
149
+ node?: RootNodeSnapshot;
150
+ nodeLeft?: RootNodeSnapshot;
151
+ nodeRight?: RootNodeSnapshot;
152
+ }
153
+ export type ValueSnapshot = string | number | boolean | string[] | number[] | boolean[];
154
+ export interface TableItemSnapshot {
155
+ identifier: number;
156
+ b_submission: boolean;
157
+ value_type: string | number;
158
+ value?: ValueSnapshot;
159
+ name: string;
160
+ object_type?: string;
161
+ }
162
+ export interface BindingHintSnapshot {
163
+ action: string;
164
+ host_object: string;
165
+ binding_field: string;
166
+ rule_sentence?: string;
167
+ failure_conditions?: string[];
168
+ circular_reference?: boolean;
169
+ }
170
+ export interface DerivePuzzleInput {
171
+ table?: TableItemSnapshot[];
172
+ root?: RootNodeSnapshot;
173
+ rely?: {
174
+ guards: string[];
175
+ logic_or?: boolean;
176
+ };
177
+ binding_hint?: BindingHintSnapshot;
178
+ }
179
+ export declare function derivePuzzleFromCallData(input: DerivePuzzleInput): GuardPuzzle;
180
+ export declare function getPuzzleStatusBooleans(puzzle: GuardPuzzle): {
181
+ intent: boolean;
182
+ binding: boolean;
183
+ data: boolean;
184
+ query: boolean;
185
+ logic: boolean;
186
+ constraints: boolean;
187
+ };
188
+ export declare function getPendingQuestions(puzzle: GuardPuzzle): string[];