@wowok/agent-mcp 2.3.18 → 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 (65) hide show
  1. package/dist/customer/industry-risks.js +31 -31
  2. package/dist/customer/order-monitor.js +57 -57
  3. package/dist/customer/order-strategy.js +89 -89
  4. package/dist/customer/post-purchase.js +97 -97
  5. package/dist/customer/reminder-system.js +26 -26
  6. package/dist/customer/risk-assessment.js +46 -46
  7. package/dist/customer/types.d.ts +4 -4
  8. package/dist/customer/types.js +4 -4
  9. package/dist/customer/user-preferences.js +50 -50
  10. package/dist/experience/intent-distill.js +6 -6
  11. package/dist/knowledge/acquisition-flywheel.js +64 -64
  12. package/dist/knowledge/arbitration-trust.js +10 -10
  13. package/dist/knowledge/demand-matching.js +8 -8
  14. package/dist/knowledge/dynamic-pricing.js +18 -18
  15. package/dist/knowledge/flywheel-loop.js +11 -11
  16. package/dist/knowledge/glossary.js +22 -22
  17. package/dist/knowledge/guard-ledger.d.ts +1 -1
  18. package/dist/knowledge/guard-ledger.js +131 -104
  19. package/dist/knowledge/guard-lint.d.ts +76 -0
  20. package/dist/knowledge/guard-lint.js +590 -0
  21. package/dist/knowledge/guard-puzzle.d.ts +109 -14
  22. package/dist/knowledge/guard-puzzle.js +627 -101
  23. package/dist/knowledge/guard-risk.d.ts +8 -1
  24. package/dist/knowledge/guard-risk.js +868 -296
  25. package/dist/knowledge/guard-templates.d.ts +37 -0
  26. package/dist/knowledge/guard-templates.js +329 -0
  27. package/dist/knowledge/guard-translation.d.ts +14 -2
  28. package/dist/knowledge/guard-translation.js +825 -194
  29. package/dist/knowledge/index.d.ts +8 -4
  30. package/dist/knowledge/index.js +9 -5
  31. package/dist/knowledge/industry-evolution.js +29 -29
  32. package/dist/knowledge/industry-generalizer.js +52 -52
  33. package/dist/knowledge/industry-registry.js +20 -33
  34. package/dist/knowledge/intent-metrics.js +67 -67
  35. package/dist/knowledge/process-model.js +80 -80
  36. package/dist/knowledge/reputation-rules.js +9 -9
  37. package/dist/knowledge/reward-templates.js +51 -51
  38. package/dist/knowledge/safety-rules.js +3 -3
  39. package/dist/knowledge/tool-constraints.js +20 -4
  40. package/dist/knowledge/trust-metrics.js +26 -26
  41. package/dist/schema/call/base.js +16 -16
  42. package/dist/schema/call/bridge.d.ts +32 -32
  43. package/dist/schema/call/demand.d.ts +84 -84
  44. package/dist/schema/call/guard.d.ts +153 -0
  45. package/dist/schema/call/guard.js +50 -0
  46. package/dist/schema/call/permission.d.ts +78 -78
  47. package/dist/schema/call/repository.d.ts +22 -22
  48. package/dist/schema/call/semantic.js +228 -24
  49. package/dist/schema/local/wip.d.ts +39 -19
  50. package/dist/schema/local/wip.js +5 -5
  51. package/dist/schema/messenger/index.d.ts +26 -26
  52. package/dist/schema/messenger/index.js +2 -2
  53. package/dist/schema/operations.d.ts +222 -144
  54. package/dist/schema/query/index.d.ts +38 -38
  55. package/dist/schema/trust/index.d.ts +4 -4
  56. package/dist/schema/utils/guard-parser.js +4 -4
  57. package/dist/schema/utils/node-parser.js +14 -14
  58. package/dist/schemas/bridge_operation.output.json +14 -14
  59. package/dist/schemas/index.json +1 -1
  60. package/dist/schemas/messenger_operation.output.json +17 -15
  61. package/dist/schemas/onchain_events.output.json +14 -14
  62. package/dist/schemas/onchain_operations.output.json +14 -14
  63. package/dist/schemas/onchain_table_data.output.json +14 -14
  64. package/dist/schemas/wip_file.output.json +24 -1
  65. package/package.json +2 -2
@@ -10,21 +10,45 @@ export interface BindingPuzzle {
10
10
  circular_reference: boolean;
11
11
  host_object_state: "not_created" | "created_unpublished" | "published_immutable" | "unknown";
12
12
  }
13
- export interface DataEntryPuzzle {
13
+ export interface OnChainConstantEntry {
14
14
  identifier: number;
15
- b_submission: boolean;
16
- value_type: string;
17
- value?: string | number | boolean | string[];
15
+ object_address: string;
16
+ object_type: string;
18
17
  name: string;
19
- object_type?: string;
20
18
  is_system_address?: boolean;
21
19
  }
22
- export interface WitnessUsagePuzzle {
20
+ export interface WitnessDerivedEntry {
21
+ identifier: number;
22
+ source_type: string;
23
23
  witness_type: number;
24
24
  witness_name: string;
25
- source_type: string;
26
25
  target_type: string;
27
- scenario: 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[];
28
52
  }
29
53
  export interface QueryPuzzle {
30
54
  query_id: number;
@@ -32,7 +56,13 @@ export interface QueryPuzzle {
32
56
  object_type: string;
33
57
  parameters: string[];
34
58
  return_type: string;
35
- witness?: WitnessUsagePuzzle;
59
+ witness?: {
60
+ witness_type: number;
61
+ witness_name: string;
62
+ source_type: string;
63
+ target_type: string;
64
+ scenario: string;
65
+ };
36
66
  purpose: string;
37
67
  }
38
68
  export interface LogicNodePuzzle {
@@ -59,15 +89,18 @@ export interface ConstraintChecklist {
59
89
  pitfall_08_rely_rep_true: boolean;
60
90
  pitfall_09_voting_weight_numeric: boolean;
61
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;
62
98
  }
63
99
  export interface GuardPuzzle {
64
100
  current_round: "R1" | "R2" | "R3" | "R4" | "R5" | "R6" | "R7" | "R8" | "R9" | "R10";
65
101
  intent?: IntentPuzzle;
66
102
  binding?: BindingPuzzle;
67
- data?: {
68
- entries: DataEntryPuzzle[];
69
- witnesses: WitnessUsagePuzzle[];
70
- };
103
+ data_sources?: DataSourcePuzzle;
71
104
  queries?: QueryPuzzle[];
72
105
  logic?: {
73
106
  root: LogicNodePuzzle;
@@ -75,7 +108,7 @@ export interface GuardPuzzle {
75
108
  };
76
109
  constraints?: ConstraintChecklist;
77
110
  }
78
- export type PuzzleDimension = "intent" | "binding" | "data" | "query" | "logic" | "constraints";
111
+ export type PuzzleDimension = "intent" | "binding" | "data_sources" | "query" | "logic" | "constraints";
79
112
  export interface PuzzleCompleteness {
80
113
  dimensions: Record<PuzzleDimension, boolean>;
81
114
  missing: PuzzleDimension[];
@@ -91,3 +124,65 @@ export declare function checkPuzzleCompleteness(puzzle: GuardPuzzle): PuzzleComp
91
124
  export declare function generateConfirmationText(puzzle: GuardPuzzle): string;
92
125
  export declare function initPuzzleFromIntent(intent: Partial<IntentPuzzle>): GuardPuzzle;
93
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[];