llmist 12.3.1 → 12.3.2
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/dist/index.cjs +30 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9085,6 +9085,33 @@ ${endPrefix}`
|
|
|
9085
9085
|
}
|
|
9086
9086
|
});
|
|
9087
9087
|
|
|
9088
|
+
// src/agent/hook-utils.ts
|
|
9089
|
+
function mergeObservers(child, parent) {
|
|
9090
|
+
if (!child && !parent) return void 0;
|
|
9091
|
+
if (!child) return parent;
|
|
9092
|
+
if (!parent) return child;
|
|
9093
|
+
const merged = { ...parent };
|
|
9094
|
+
for (const key of Object.keys(child)) {
|
|
9095
|
+
const childFn = child[key];
|
|
9096
|
+
const parentFn = parent[key];
|
|
9097
|
+
if (!childFn) continue;
|
|
9098
|
+
if (!parentFn) {
|
|
9099
|
+
merged[key] = childFn;
|
|
9100
|
+
} else {
|
|
9101
|
+
merged[key] = async (ctx) => {
|
|
9102
|
+
await childFn(ctx);
|
|
9103
|
+
await parentFn(ctx);
|
|
9104
|
+
};
|
|
9105
|
+
}
|
|
9106
|
+
}
|
|
9107
|
+
return merged;
|
|
9108
|
+
}
|
|
9109
|
+
var init_hook_utils = __esm({
|
|
9110
|
+
"src/agent/hook-utils.ts"() {
|
|
9111
|
+
"use strict";
|
|
9112
|
+
}
|
|
9113
|
+
});
|
|
9114
|
+
|
|
9088
9115
|
// src/gadgets/schema-introspector.ts
|
|
9089
9116
|
function getDef(schema) {
|
|
9090
9117
|
return schema._def;
|
|
@@ -9948,6 +9975,7 @@ var init_executor = __esm({
|
|
|
9948
9975
|
import_fast_deep_equal = __toESM(require("fast-deep-equal"), 1);
|
|
9949
9976
|
import_zod2 = require("zod");
|
|
9950
9977
|
init_builder();
|
|
9978
|
+
init_hook_utils();
|
|
9951
9979
|
init_client();
|
|
9952
9980
|
init_constants();
|
|
9953
9981
|
init_execution_tree();
|
|
@@ -10142,8 +10170,8 @@ var init_executor = __esm({
|
|
|
10142
10170
|
// Parent observer hooks for subagent visibility
|
|
10143
10171
|
// When a subagent uses withParentContext(ctx), it will receive these
|
|
10144
10172
|
// and call them for gadget events in addition to its own hooks
|
|
10145
|
-
//
|
|
10146
|
-
parentObservers: this.currentObservers
|
|
10173
|
+
// Merge child and parent observers so both get called (child first, then parent)
|
|
10174
|
+
parentObservers: mergeObservers(this.currentObservers, this.parentObservers)
|
|
10147
10175
|
};
|
|
10148
10176
|
let rawResult;
|
|
10149
10177
|
if (timeoutMs && timeoutMs > 0) {
|