agentic-flow 3.4.0 → 3.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.
- package/CHANGELOG.md +6 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/config/claudeFlow.d.ts +1 -1
- package/dist/optimizations/configuration-tuning.d.ts +1 -1
- package/package.json +2 -5
- package/wasm/reasoningbank/reasoningbank_wasm_bg.js +179 -186
- package/wasm/reasoningbank/reasoningbank_wasm_bg.wasm +0 -0
- package/wasm/reasoningbank/reasoningbank_wasm_bg.wasm.d.ts +15 -12
|
@@ -26,7 +26,7 @@ export declare function getMemoryConfig(agentName?: string): {
|
|
|
26
26
|
* Initialize swarm coordination for multi-agent tasks
|
|
27
27
|
*/
|
|
28
28
|
export declare function getSwarmConfig(topology?: ClaudeFlowConfig['coordinationTopology']): {
|
|
29
|
-
topology: "
|
|
29
|
+
topology: "hierarchical" | "mesh" | "ring" | "star";
|
|
30
30
|
maxAgents: number;
|
|
31
31
|
strategy: "balanced";
|
|
32
32
|
};
|
|
@@ -122,7 +122,7 @@ export declare class ConfigurationTuning {
|
|
|
122
122
|
entries: number;
|
|
123
123
|
};
|
|
124
124
|
topology: {
|
|
125
|
-
mode: "
|
|
125
|
+
mode: "hierarchical" | "mesh" | "ring" | "star" | "auto";
|
|
126
126
|
changes: number;
|
|
127
127
|
improvement: string;
|
|
128
128
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-flow",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "The agentic meta-harness — freeze the model, evolve the harness. An open runtime that routes each query to the cost-optimal model, evolves its own harness (planner/context/reviewer/retry/tool/memory/score policy) and autonomously repairs code, then orchestrates 66 specialized agents, 213 MCP tools, ReasoningBank memory, and multi-agent swarms on top. Built by @ruvnet on the Claude Agent SDK.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"@ruvector/sona": "^0.1.11",
|
|
200
200
|
"@ruvnet/sublinear-core": "^1.0.0",
|
|
201
201
|
"agent-booster": "^0.2.2",
|
|
202
|
-
"aidefence": "^3.0.
|
|
202
|
+
"aidefence": "^3.0.2",
|
|
203
203
|
"better-sqlite3": "^11.10.0",
|
|
204
204
|
"onnxruntime-node": "^1.23.2",
|
|
205
205
|
"sharp": "^0.35.5",
|
|
@@ -209,9 +209,6 @@
|
|
|
209
209
|
"protobufjs": ">=7.5.5",
|
|
210
210
|
"@huggingface/transformers": {
|
|
211
211
|
"sharp": "$sharp"
|
|
212
|
-
},
|
|
213
|
-
"aidefence": {
|
|
214
|
-
"zod": "$zod"
|
|
215
212
|
}
|
|
216
213
|
},
|
|
217
214
|
"devDependencies": {
|
|
@@ -26,12 +26,20 @@ export class ReasoningBankWasm {
|
|
|
26
26
|
* @returns {Promise<string>}
|
|
27
27
|
*/
|
|
28
28
|
findSimilar(task_description, task_category, top_k) {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
const val3 = +top_k;
|
|
30
|
+
let ptr0, len0, ptr1, len1;
|
|
31
|
+
try {
|
|
32
|
+
ptr0 = passStringToWasm0(task_description, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
33
|
+
len0 = WASM_VECTOR_LEN;
|
|
34
|
+
ptr1 = passStringToWasm0(task_category, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
35
|
+
len1 = WASM_VECTOR_LEN;
|
|
36
|
+
} catch (e) {
|
|
37
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
38
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
39
|
+
throw e;
|
|
40
|
+
}
|
|
41
|
+
const ret = wasm.reasoningbankwasm_findSimilar(this.__wbg_ptr, ptr0, len0, ptr1, len1, val3);
|
|
42
|
+
return ret;
|
|
35
43
|
}
|
|
36
44
|
/**
|
|
37
45
|
* Retrieve a pattern by ID
|
|
@@ -42,7 +50,7 @@ export class ReasoningBankWasm {
|
|
|
42
50
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
43
51
|
const len0 = WASM_VECTOR_LEN;
|
|
44
52
|
const ret = wasm.reasoningbankwasm_getPattern(this.__wbg_ptr, ptr0, len0);
|
|
45
|
-
return
|
|
53
|
+
return ret;
|
|
46
54
|
}
|
|
47
55
|
/**
|
|
48
56
|
* Get storage statistics
|
|
@@ -50,7 +58,7 @@ export class ReasoningBankWasm {
|
|
|
50
58
|
*/
|
|
51
59
|
getStats() {
|
|
52
60
|
const ret = wasm.reasoningbankwasm_getStats(this.__wbg_ptr);
|
|
53
|
-
return
|
|
61
|
+
return ret;
|
|
54
62
|
}
|
|
55
63
|
/**
|
|
56
64
|
* Create a new ReasoningBank instance
|
|
@@ -60,7 +68,7 @@ export class ReasoningBankWasm {
|
|
|
60
68
|
var ptr0 = isLikeNone(db_name) ? 0 : passStringToWasm0(db_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
61
69
|
var len0 = WASM_VECTOR_LEN;
|
|
62
70
|
const ret = wasm.reasoningbankwasm_new(ptr0, len0);
|
|
63
|
-
return
|
|
71
|
+
return ret;
|
|
64
72
|
}
|
|
65
73
|
/**
|
|
66
74
|
* Search patterns by category
|
|
@@ -69,10 +77,11 @@ export class ReasoningBankWasm {
|
|
|
69
77
|
* @returns {Promise<string>}
|
|
70
78
|
*/
|
|
71
79
|
searchByCategory(category, limit) {
|
|
80
|
+
const val2 = +limit;
|
|
72
81
|
const ptr0 = passStringToWasm0(category, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
73
82
|
const len0 = WASM_VECTOR_LEN;
|
|
74
|
-
const ret = wasm.reasoningbankwasm_searchByCategory(this.__wbg_ptr, ptr0, len0,
|
|
75
|
-
return
|
|
83
|
+
const ret = wasm.reasoningbankwasm_searchByCategory(this.__wbg_ptr, ptr0, len0, val2);
|
|
84
|
+
return ret;
|
|
76
85
|
}
|
|
77
86
|
/**
|
|
78
87
|
* Store a reasoning pattern
|
|
@@ -83,7 +92,7 @@ export class ReasoningBankWasm {
|
|
|
83
92
|
const ptr0 = passStringToWasm0(pattern_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
84
93
|
const len0 = WASM_VECTOR_LEN;
|
|
85
94
|
const ret = wasm.reasoningbankwasm_storePattern(this.__wbg_ptr, ptr0, len0);
|
|
86
|
-
return
|
|
95
|
+
return ret;
|
|
87
96
|
}
|
|
88
97
|
}
|
|
89
98
|
if (Symbol.dispose) ReasoningBankWasm.prototype[Symbol.dispose] = ReasoningBankWasm.prototype.free;
|
|
@@ -104,32 +113,36 @@ export function log(message) {
|
|
|
104
113
|
const len0 = WASM_VECTOR_LEN;
|
|
105
114
|
wasm.log(ptr0, len0);
|
|
106
115
|
}
|
|
107
|
-
export function
|
|
108
|
-
const ret =
|
|
116
|
+
export function __wbg_Error_208446807d0d1e30(arg0, arg1) {
|
|
117
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
118
|
+
return ret;
|
|
119
|
+
}
|
|
120
|
+
export function __wbg___wbindgen_debug_string_f249a2a76caa9a55(arg0, arg1) {
|
|
121
|
+
const ret = debugString(arg1);
|
|
109
122
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
110
123
|
const len1 = WASM_VECTOR_LEN;
|
|
111
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
112
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
124
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
125
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
113
126
|
}
|
|
114
|
-
export function
|
|
115
|
-
const ret = typeof(
|
|
127
|
+
export function __wbg___wbindgen_is_function_741ff2bb612836f5(arg0) {
|
|
128
|
+
const ret = typeof(arg0) === 'function';
|
|
116
129
|
return ret;
|
|
117
130
|
}
|
|
118
|
-
export function
|
|
119
|
-
const ret =
|
|
131
|
+
export function __wbg___wbindgen_is_undefined_be5b34249ff1fc15(arg0) {
|
|
132
|
+
const ret = arg0 === undefined;
|
|
120
133
|
return ret;
|
|
121
134
|
}
|
|
122
|
-
export function
|
|
135
|
+
export function __wbg___wbindgen_throw_4c88d8bf264fd984(arg0, arg1) {
|
|
123
136
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
124
137
|
}
|
|
125
|
-
export function
|
|
126
|
-
|
|
138
|
+
export function __wbg__wbg_cb_unref_09736879a3f67559(arg0) {
|
|
139
|
+
arg0._wbg_cb_unref();
|
|
127
140
|
}
|
|
128
|
-
export function
|
|
129
|
-
const ret =
|
|
130
|
-
return
|
|
141
|
+
export function __wbg_call_a410eb4b59ed5965() { return handleError(function (arg0, arg1, arg2) {
|
|
142
|
+
const ret = arg0.call(arg1, arg2);
|
|
143
|
+
return ret;
|
|
131
144
|
}, arguments); }
|
|
132
|
-
export function
|
|
145
|
+
export function __wbg_error_757e9472f8410341(arg0, arg1) {
|
|
133
146
|
let deferred0_0;
|
|
134
147
|
let deferred0_1;
|
|
135
148
|
try {
|
|
@@ -137,222 +150,207 @@ export function __wbg_error_a6fa202b58aa1cd3(arg0, arg1) {
|
|
|
137
150
|
deferred0_1 = arg1;
|
|
138
151
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
139
152
|
} finally {
|
|
140
|
-
wasm.
|
|
153
|
+
wasm.__wbindgen_export3(deferred0_0, deferred0_1, 1);
|
|
141
154
|
}
|
|
142
155
|
}
|
|
143
|
-
export function
|
|
156
|
+
export function __wbg_getRandomValues_19b7c67932c07470() { return handleError(function (arg0, arg1) {
|
|
144
157
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
145
158
|
}, arguments); }
|
|
146
|
-
export function
|
|
147
|
-
const ret = Reflect.get(
|
|
148
|
-
return
|
|
159
|
+
export function __wbg_get_2080c49015e35254() { return handleError(function (arg0, arg1) {
|
|
160
|
+
const ret = Reflect.get(arg0, arg1);
|
|
161
|
+
return ret;
|
|
149
162
|
}, arguments); }
|
|
150
|
-
export function
|
|
151
|
-
const ret =
|
|
152
|
-
return isLikeNone(ret) ? 0 :
|
|
163
|
+
export function __wbg_indexedDB_26307da63b55488b() { return handleError(function (arg0) {
|
|
164
|
+
const ret = arg0.indexedDB;
|
|
165
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
153
166
|
}, arguments); }
|
|
154
|
-
export function
|
|
167
|
+
export function __wbg_instanceof_Window_5cf453f5639aa1a2(arg0) {
|
|
155
168
|
let result;
|
|
156
169
|
try {
|
|
157
|
-
result =
|
|
170
|
+
result = arg0 instanceof Window;
|
|
158
171
|
} catch (_) {
|
|
159
172
|
result = false;
|
|
160
173
|
}
|
|
161
174
|
const ret = result;
|
|
162
175
|
return ret;
|
|
163
176
|
}
|
|
164
|
-
export function
|
|
165
|
-
console.log(
|
|
177
|
+
export function __wbg_log_ff86bbb34c295e21(arg0) {
|
|
178
|
+
console.log(arg0);
|
|
166
179
|
}
|
|
167
|
-
export function
|
|
180
|
+
export function __wbg_new_bb74001155cb8ca8() {
|
|
168
181
|
const ret = new Error();
|
|
169
|
-
return
|
|
182
|
+
return ret;
|
|
170
183
|
}
|
|
171
|
-
export function
|
|
184
|
+
export function __wbg_new_typed_e09da9dae6ee5935(arg0, arg1) {
|
|
172
185
|
try {
|
|
173
186
|
var state0 = {a: arg0, b: arg1};
|
|
174
187
|
var cb0 = (arg0, arg1) => {
|
|
175
188
|
const a = state0.a;
|
|
176
189
|
state0.a = 0;
|
|
177
190
|
try {
|
|
178
|
-
return
|
|
191
|
+
return __wasm_bindgen_func_elem_364(a, state0.b, arg0, arg1);
|
|
179
192
|
} finally {
|
|
180
193
|
state0.a = a;
|
|
181
194
|
}
|
|
182
195
|
};
|
|
183
196
|
const ret = new Promise(cb0);
|
|
184
|
-
return
|
|
197
|
+
return ret;
|
|
185
198
|
} finally {
|
|
186
199
|
state0.a = 0;
|
|
187
200
|
}
|
|
188
201
|
}
|
|
189
|
-
export function
|
|
190
|
-
const ret =
|
|
191
|
-
return
|
|
202
|
+
export function __wbg_open_0b7832f51fde5a5f() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
203
|
+
const ret = arg0.open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
|
|
204
|
+
return ret;
|
|
192
205
|
}, arguments); }
|
|
193
|
-
export function
|
|
194
|
-
queueMicrotask
|
|
206
|
+
export function __wbg_queueMicrotask_1e8503a8a690f0a3(arg0) {
|
|
207
|
+
const ret = arg0.queueMicrotask;
|
|
208
|
+
return ret;
|
|
195
209
|
}
|
|
196
|
-
export function
|
|
197
|
-
|
|
198
|
-
return addHeapObject(ret);
|
|
210
|
+
export function __wbg_queueMicrotask_4a1a4d8dd332373b(arg0) {
|
|
211
|
+
queueMicrotask(arg0);
|
|
199
212
|
}
|
|
200
213
|
export function __wbg_reasoningbankwasm_new(arg0) {
|
|
201
214
|
const ret = ReasoningBankWasm.__wrap(arg0);
|
|
202
|
-
return
|
|
215
|
+
return ret;
|
|
203
216
|
}
|
|
204
|
-
export function
|
|
205
|
-
const ret = Promise.resolve(
|
|
206
|
-
return
|
|
217
|
+
export function __wbg_resolve_dbf78ab4942478b0(arg0) {
|
|
218
|
+
const ret = Promise.resolve(arg0);
|
|
219
|
+
return ret;
|
|
207
220
|
}
|
|
208
|
-
export function
|
|
209
|
-
const ret =
|
|
221
|
+
export function __wbg_stack_575c4e0918581b9c(arg0, arg1) {
|
|
222
|
+
const ret = arg1.stack;
|
|
210
223
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
211
224
|
const len1 = WASM_VECTOR_LEN;
|
|
212
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
213
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
225
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
226
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
214
227
|
}
|
|
215
|
-
export function
|
|
216
|
-
const ret = typeof globalThis === 'undefined' ?
|
|
217
|
-
return isLikeNone(ret) ? 0 :
|
|
228
|
+
export function __wbg_static_accessor_GLOBAL_THIS_003ee833af9699fc() {
|
|
229
|
+
const ret = typeof globalThis === 'undefined' ? undefined : globalThis;
|
|
230
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
218
231
|
}
|
|
219
|
-
export function
|
|
220
|
-
const ret = typeof global === 'undefined' ?
|
|
221
|
-
return isLikeNone(ret) ? 0 :
|
|
232
|
+
export function __wbg_static_accessor_GLOBAL_e4293fb22cbe77da() {
|
|
233
|
+
const ret = typeof global === 'undefined' ? undefined : global;
|
|
234
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
222
235
|
}
|
|
223
|
-
export function
|
|
224
|
-
const ret = typeof self === 'undefined' ?
|
|
225
|
-
return isLikeNone(ret) ? 0 :
|
|
236
|
+
export function __wbg_static_accessor_SELF_53bb20457401453d() {
|
|
237
|
+
const ret = typeof self === 'undefined' ? undefined : self;
|
|
238
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
226
239
|
}
|
|
227
|
-
export function
|
|
228
|
-
const ret = typeof window === 'undefined' ?
|
|
229
|
-
return isLikeNone(ret) ? 0 :
|
|
240
|
+
export function __wbg_static_accessor_WINDOW_b5e0810bfecb7feb() {
|
|
241
|
+
const ret = typeof window === 'undefined' ? undefined : window;
|
|
242
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
230
243
|
}
|
|
231
|
-
export function
|
|
232
|
-
const ret =
|
|
233
|
-
return
|
|
244
|
+
export function __wbg_then_e3f7f2d365708be8(arg0, arg1) {
|
|
245
|
+
const ret = arg0.then(arg1);
|
|
246
|
+
return ret;
|
|
234
247
|
}
|
|
235
|
-
export function
|
|
248
|
+
export function __wbindgen_generic_0000000000000001(arg0, arg1) {
|
|
236
249
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 95, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
237
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
238
|
-
return
|
|
250
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_349);
|
|
251
|
+
return ret;
|
|
239
252
|
}
|
|
240
|
-
export function
|
|
253
|
+
export function __wbindgen_generic_0000000000000002(arg0, arg1) {
|
|
241
254
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
242
255
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
243
|
-
return
|
|
256
|
+
return ret;
|
|
244
257
|
}
|
|
245
|
-
export function
|
|
246
|
-
const
|
|
247
|
-
|
|
258
|
+
export function __wbindgen_init_externref_table() {
|
|
259
|
+
const table = wasm.__wbindgen_externrefs;
|
|
260
|
+
table.set(0, undefined);
|
|
261
|
+
table.set(1024, undefined);
|
|
262
|
+
table.set(1025, null);
|
|
263
|
+
table.set(1026, true);
|
|
264
|
+
table.set(1027, false);
|
|
248
265
|
}
|
|
249
|
-
|
|
250
|
-
|
|
266
|
+
function __wasm_bindgen_func_elem_364(arg0, arg1, arg2, arg3) {
|
|
267
|
+
wasm.__wasm_bindgen_func_elem_364(arg0, arg1, arg2, arg3);
|
|
251
268
|
}
|
|
252
|
-
|
|
269
|
+
|
|
270
|
+
function __wasm_bindgen_func_elem_349(arg0, arg1, arg2) {
|
|
253
271
|
try {
|
|
254
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
255
|
-
wasm.
|
|
272
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
|
|
273
|
+
wasm.__wasm_bindgen_func_elem_349(retptr, arg0, arg1, arg2);
|
|
256
274
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
257
275
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
258
276
|
if (r1) {
|
|
259
|
-
throw
|
|
277
|
+
throw takeFromExternrefTable0(r0);
|
|
260
278
|
}
|
|
261
279
|
} finally {
|
|
262
280
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
263
281
|
}
|
|
264
282
|
}
|
|
265
283
|
|
|
266
|
-
function __wasm_bindgen_func_elem_352(arg0, arg1, arg2, arg3) {
|
|
267
|
-
wasm.__wasm_bindgen_func_elem_352(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
268
|
-
}
|
|
269
|
-
|
|
270
284
|
const ReasoningBankWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
271
285
|
? { register: () => {}, unregister: () => {} }
|
|
272
286
|
: new FinalizationRegistry(ptr => wasm.__wbg_reasoningbankwasm_free(ptr, 1));
|
|
273
287
|
|
|
274
|
-
function
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
heap_next = heap[idx];
|
|
278
|
-
|
|
279
|
-
heap[idx] = obj;
|
|
288
|
+
function addToExternrefTable0(obj) {
|
|
289
|
+
const idx = wasm.__wbindgen_export5();
|
|
290
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
280
291
|
return idx;
|
|
281
292
|
}
|
|
282
293
|
|
|
283
294
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
284
295
|
? { register: () => {}, unregister: () => {} }
|
|
285
|
-
: new FinalizationRegistry(state => wasm.
|
|
296
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_export6(state.a, state.b));
|
|
286
297
|
|
|
287
298
|
function debugString(val) {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
340
|
-
} catch (_) {
|
|
341
|
-
return 'Object';
|
|
299
|
+
switch (typeof val) {
|
|
300
|
+
// primitive types
|
|
301
|
+
case 'number':
|
|
302
|
+
case 'boolean':
|
|
303
|
+
case 'undefined':
|
|
304
|
+
return `${val}`;
|
|
305
|
+
case 'string':
|
|
306
|
+
return JSON.stringify(val);
|
|
307
|
+
case 'bigint':
|
|
308
|
+
return `${val}n`;
|
|
309
|
+
case 'symbol':
|
|
310
|
+
return val.description !== undefined
|
|
311
|
+
? `Symbol(${val.description})`
|
|
312
|
+
: 'Symbol';
|
|
313
|
+
case 'function':
|
|
314
|
+
return typeof val.name === 'string' && val.name !== ''
|
|
315
|
+
? `Function(${val.name})`
|
|
316
|
+
: 'Function';
|
|
317
|
+
case 'object': {
|
|
318
|
+
if (val === null) {
|
|
319
|
+
return 'null';
|
|
320
|
+
}
|
|
321
|
+
// objects
|
|
322
|
+
if (Array.isArray(val)) {
|
|
323
|
+
return '[' + Array.from(val, debugString).join(', ') + ']';
|
|
324
|
+
}
|
|
325
|
+
// errors
|
|
326
|
+
if (val instanceof Error) {
|
|
327
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
const toStringOutput = toString.call(val);
|
|
331
|
+
// Test for built-in
|
|
332
|
+
const className = /\[object ([^\]]+)\]/.exec(toStringOutput)?.[1];
|
|
333
|
+
|
|
334
|
+
// Failed to match the standard '[object ClassName]'
|
|
335
|
+
if (className === undefined) {
|
|
336
|
+
return toStringOutput;
|
|
337
|
+
}
|
|
338
|
+
if (className === 'Object') {
|
|
339
|
+
// we're a user defined class or Object
|
|
340
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
341
|
+
// easier than looping through ownProperties of `val`.
|
|
342
|
+
try {
|
|
343
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
344
|
+
} catch (_) {
|
|
345
|
+
return 'Object';
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
349
|
+
return className;
|
|
342
350
|
}
|
|
351
|
+
// Per MDN: 'This list of values is exhaustive.'
|
|
352
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof#description
|
|
343
353
|
}
|
|
344
|
-
// errors
|
|
345
|
-
if (val instanceof Error) {
|
|
346
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
347
|
-
}
|
|
348
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
349
|
-
return className;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
function dropObject(idx) {
|
|
353
|
-
if (idx < 1028) return;
|
|
354
|
-
heap[idx] = heap_next;
|
|
355
|
-
heap_next = idx;
|
|
356
354
|
}
|
|
357
355
|
|
|
358
356
|
function getArrayU8FromWasm0(ptr, len) {
|
|
@@ -369,7 +367,8 @@ function getDataViewMemory0() {
|
|
|
369
367
|
}
|
|
370
368
|
|
|
371
369
|
function getStringFromWasm0(ptr, len) {
|
|
372
|
-
|
|
370
|
+
ptr = ptr >>> 0;
|
|
371
|
+
return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
373
372
|
}
|
|
374
373
|
|
|
375
374
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -380,21 +379,15 @@ function getUint8ArrayMemory0() {
|
|
|
380
379
|
return cachedUint8ArrayMemory0;
|
|
381
380
|
}
|
|
382
381
|
|
|
383
|
-
function getObject(idx) { return heap[idx]; }
|
|
384
|
-
|
|
385
382
|
function handleError(f, args) {
|
|
386
383
|
try {
|
|
387
384
|
return f.apply(this, args);
|
|
388
385
|
} catch (e) {
|
|
389
|
-
|
|
386
|
+
const idx = addToExternrefTable0(e);
|
|
387
|
+
wasm.__wbindgen_export4(idx);
|
|
390
388
|
}
|
|
391
389
|
}
|
|
392
390
|
|
|
393
|
-
let heap = new Array(1024).fill(undefined);
|
|
394
|
-
heap.push(undefined, null, true, false);
|
|
395
|
-
|
|
396
|
-
let heap_next = heap.length;
|
|
397
|
-
|
|
398
391
|
function isLikeNone(x) {
|
|
399
392
|
return x === undefined || x === null;
|
|
400
393
|
}
|
|
@@ -418,7 +411,7 @@ function makeMutClosure(arg0, arg1, f) {
|
|
|
418
411
|
};
|
|
419
412
|
real._wbg_cb_unref = () => {
|
|
420
413
|
if (--state.cnt === 0) {
|
|
421
|
-
wasm.
|
|
414
|
+
wasm.__wbindgen_export6(state.a, state.b);
|
|
422
415
|
state.a = 0;
|
|
423
416
|
CLOSURE_DTORS.unregister(state);
|
|
424
417
|
}
|
|
@@ -464,24 +457,24 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
464
457
|
return ptr;
|
|
465
458
|
}
|
|
466
459
|
|
|
467
|
-
function
|
|
468
|
-
const
|
|
469
|
-
|
|
470
|
-
return
|
|
460
|
+
function takeFromExternrefTable0(idx) {
|
|
461
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
462
|
+
wasm.__wbindgen_export7(idx);
|
|
463
|
+
return value;
|
|
471
464
|
}
|
|
472
465
|
|
|
473
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true
|
|
466
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
|
|
474
467
|
cachedTextDecoder.decode();
|
|
475
468
|
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
476
469
|
let numBytesDecoded = 0;
|
|
477
|
-
function decodeText(
|
|
478
|
-
numBytesDecoded +=
|
|
470
|
+
function decodeText(bytes) {
|
|
471
|
+
numBytesDecoded += bytes.length;
|
|
479
472
|
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
480
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true
|
|
473
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
|
|
481
474
|
cachedTextDecoder.decode();
|
|
482
|
-
numBytesDecoded =
|
|
475
|
+
numBytesDecoded = bytes.length;
|
|
483
476
|
}
|
|
484
|
-
return cachedTextDecoder.decode(
|
|
477
|
+
return cachedTextDecoder.decode(bytes);
|
|
485
478
|
}
|
|
486
479
|
|
|
487
480
|
const cachedTextEncoder = new TextEncoder();
|
|
Binary file
|
|
@@ -2,20 +2,23 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_reasoningbankwasm_free: (a: number, b: number) => void;
|
|
5
|
-
export const log: (a: number, b: number) => void;
|
|
6
|
-
export const reasoningbankwasm_findSimilar: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
7
|
-
export const reasoningbankwasm_getPattern: (a: number, b: number, c: number) => number;
|
|
8
|
-
export const reasoningbankwasm_getStats: (a: number) => number;
|
|
9
|
-
export const reasoningbankwasm_new: (a: number, b: number) => number;
|
|
10
|
-
export const reasoningbankwasm_searchByCategory: (a: number, b: number, c: number, d: number) => number;
|
|
11
|
-
export const reasoningbankwasm_storePattern: (a: number, b: number, c: number) => number;
|
|
12
5
|
export const init: () => void;
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
6
|
+
export const log: (a: number, b: number) => void;
|
|
7
|
+
export const reasoningbankwasm_findSimilar: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
8
|
+
export const reasoningbankwasm_getPattern: (a: number, b: number, c: number) => any;
|
|
9
|
+
export const reasoningbankwasm_getStats: (a: number) => any;
|
|
10
|
+
export const reasoningbankwasm_new: (a: number, b: number) => any;
|
|
11
|
+
export const reasoningbankwasm_searchByCategory: (a: number, b: number, c: number, d: number) => any;
|
|
12
|
+
export const reasoningbankwasm_storePattern: (a: number, b: number, c: number) => any;
|
|
13
|
+
export const __wasm_bindgen_func_elem_349: (a: number, b: number, c: number, d: any) => void;
|
|
14
|
+
export const __wasm_bindgen_func_elem_364: (a: number, b: number, c: any, d: any) => void;
|
|
15
15
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
16
16
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
17
|
-
export const __wbindgen_export3: (a: number) => void;
|
|
18
|
-
export const __wbindgen_export4: (a: number
|
|
19
|
-
export const __wbindgen_export5: (
|
|
17
|
+
export const __wbindgen_export3: (a: number, b: number, c: number) => void;
|
|
18
|
+
export const __wbindgen_export4: (a: number) => void;
|
|
19
|
+
export const __wbindgen_export5: () => number;
|
|
20
|
+
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
21
|
+
export const __wbindgen_export6: (a: number, b: number) => void;
|
|
20
22
|
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
23
|
+
export const __wbindgen_export7: (a: number) => void;
|
|
21
24
|
export const __wbindgen_start: () => void;
|