@cuylabs/agent-core 0.9.0 → 0.11.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.
- package/README.md +33 -17
- package/dist/chunk-2O4MCSQS.js +780 -0
- package/dist/chunk-2TTOLHBT.js +198 -0
- package/dist/chunk-5FMSGQVX.js +281 -0
- package/dist/chunk-5NVVNXPQ.js +288 -0
- package/dist/{chunk-EKR6PKXU.js → chunk-6HZBHFOL.js} +3 -3
- package/dist/chunk-CJI7PVS2.js +58 -0
- package/dist/{chunk-WKHDSSXG.js → chunk-CMYN2RCB.js} +146 -46
- package/dist/chunk-FII65CN7.js +117 -0
- package/dist/{chunk-UHCJEM2E.js → chunk-ICZ66572.js} +13 -6
- package/dist/chunk-KYLPMBHD.js +316 -0
- package/dist/chunk-MXAP4UG6.js +2956 -0
- package/dist/{chunk-4QFNWPIF.js → chunk-N3VX7FEE.js} +35 -2
- package/dist/{chunk-MAZ5DY5B.js → chunk-NDZWXCBZ.js} +213 -78
- package/dist/{chunk-MHKK374K.js → chunk-Q742PSH3.js} +11 -27
- package/dist/{chunk-WGZAPU6N.js → chunk-QAL3OMI3.js} +15 -1
- package/dist/{chunk-UDCZ673N.js → chunk-RN6WZEUF.js} +27 -23
- package/dist/{chunk-ZXAKHMWH.js → chunk-ROTGCYDW.js} +22 -84
- package/dist/chunk-SPBFQXOT.js +0 -0
- package/dist/chunk-SSFBF3US.js +602 -0
- package/dist/chunk-SZ2XBPTW.js +8 -0
- package/dist/chunk-T4UIX5D7.js +115 -0
- package/dist/{chunk-IYWQOJMQ.js → chunk-TIHPYVAJ.js} +34 -34
- package/dist/{chunk-RKEW5WXI.js → chunk-TOTDGK3P.js} +1 -1
- package/dist/chunk-V4RFNEET.js +563 -0
- package/dist/chunk-VOUEJSW6.js +0 -0
- package/dist/{chunk-J4QDGZIA.js → chunk-WBPOZ7CL.js} +659 -275
- package/dist/chunk-X4VN4GIJ.js +185 -0
- package/dist/dispatch/index.d.ts +93 -0
- package/dist/dispatch/index.js +37 -0
- package/dist/events/index.d.ts +93 -0
- package/dist/events/index.js +6 -0
- package/dist/{runtime → execution}/index.d.ts +120 -35
- package/dist/{runtime → execution}/index.js +17 -11
- package/dist/index.d.ts +489 -115
- package/dist/index.js +1665 -462
- package/dist/inference/errors/index.js +1 -1
- package/dist/inference/index.d.ts +13 -21
- package/dist/inference/index.js +15 -12
- package/dist/instance-DzPiv6EK.d.ts +5723 -0
- package/dist/logger/index.d.ts +50 -0
- package/dist/logger/index.js +11 -0
- package/dist/mcp/index.d.ts +5 -9
- package/dist/mcp/index.js +2 -3
- package/dist/middleware/index.d.ts +10 -150
- package/dist/middleware/index.js +10 -2
- package/dist/model-messages-CJfwfzGe.d.ts +13 -0
- package/dist/models/index.d.ts +5 -2
- package/dist/models/index.js +2 -1
- package/dist/models/reasoning/index.js +2 -1
- package/dist/plugin/index.d.ts +55 -11
- package/dist/plugin/index.js +1 -1
- package/dist/profiles/index.d.ts +55 -0
- package/dist/{presets → profiles}/index.js +10 -10
- package/dist/prompt/index.d.ts +8 -13
- package/dist/safety/index.d.ts +109 -14
- package/dist/safety/index.js +59 -3
- package/dist/sandbox/index.d.ts +81 -0
- package/dist/sandbox/index.js +1 -0
- package/dist/skill/index.d.ts +10 -8
- package/dist/skill/index.js +2 -2
- package/dist/storage/index.d.ts +12 -4
- package/dist/storage/index.js +1 -1
- package/dist/subagents/index.d.ts +177 -0
- package/dist/subagents/index.js +78 -0
- package/dist/team/index.d.ts +544 -0
- package/dist/team/index.js +41 -0
- package/dist/tool/host/index.d.ts +41 -0
- package/dist/tool/host/index.js +10 -0
- package/dist/tool/index.d.ts +111 -21
- package/dist/tool/index.js +20 -13
- package/dist/{types-VQgymC1N.d.ts → types-Bj_J8u_W.d.ts} +44 -64
- package/dist/{types-CHiPh8U2.d.ts → types-C_LCeYNg.d.ts} +7 -7
- package/dist/types-RSCv7nQ4.d.ts +59 -0
- package/package.json +46 -47
- package/dist/builder-BgZ_j4Vs.d.ts +0 -35
- package/dist/chunk-5ARZJWD2.js +0 -259
- package/dist/chunk-DXFBQMXP.js +0 -53
- package/dist/chunk-H3FUYU52.js +0 -81
- package/dist/chunk-JLXG2SH7.js +0 -905
- package/dist/chunk-N7P4PN3O.js +0 -84
- package/dist/chunk-OFDKHNCX.js +0 -727
- package/dist/chunk-SDSBEQXG.js +0 -157
- package/dist/chunk-VEKUXUVF.js +0 -41
- package/dist/chunk-VNQBHPCT.js +0 -398
- package/dist/chunk-WWYYNWEW.js +0 -259
- package/dist/context/index.d.ts +0 -259
- package/dist/context/index.js +0 -26
- package/dist/events-CE72w8W4.d.ts +0 -149
- package/dist/host/index.d.ts +0 -45
- package/dist/host/index.js +0 -8
- package/dist/index-DQuTZ8xL.d.ts +0 -1335
- package/dist/messages-BYWGn8TY.d.ts +0 -110
- package/dist/presets/index.d.ts +0 -53
- package/dist/registry-DwYqsQkX.d.ts +0 -164
- package/dist/runner-CI-XeR16.d.ts +0 -91
- package/dist/scope/index.d.ts +0 -10
- package/dist/scope/index.js +0 -14
- package/dist/session-manager-KbYt2WUh.d.ts +0 -282
- package/dist/signal/index.d.ts +0 -28
- package/dist/signal/index.js +0 -6
- package/dist/sub-agent/index.d.ts +0 -24
- package/dist/sub-agent/index.js +0 -32
- package/dist/tool-CZWN3KbO.d.ts +0 -141
- package/dist/tool-DkhSCV2Y.d.ts +0 -145
- package/dist/tracker-DClqYqTj.d.ts +0 -96
- package/dist/tracking/index.d.ts +0 -111
- package/dist/tracking/index.js +0 -20
- package/dist/types-BfNpU8NS.d.ts +0 -270
- package/dist/types-BlOKk-Bb.d.ts +0 -330
- package/dist/types-BlZwmnuW.d.ts +0 -50
- package/dist/types-CQL-SvTn.d.ts +0 -29
- package/dist/types-CWm-7rvB.d.ts +0 -55
- package/dist/types-DTSkxakL.d.ts +0 -651
- package/dist/types-DmDwi2zI.d.ts +0 -339
- package/dist/types-YuWV4ag7.d.ts +0 -72
package/dist/chunk-N7P4PN3O.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
// src/scope/store.ts
|
|
2
|
-
import { AsyncLocalStorage } from "async_hooks";
|
|
3
|
-
import { randomUUID } from "crypto";
|
|
4
|
-
var scopeStore = new AsyncLocalStorage();
|
|
5
|
-
function cloneAttributes(attributes) {
|
|
6
|
-
return { ...attributes };
|
|
7
|
-
}
|
|
8
|
-
function cloneScope(scope) {
|
|
9
|
-
return {
|
|
10
|
-
...scope,
|
|
11
|
-
attributes: cloneAttributes(scope.attributes)
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
function getStoredScope() {
|
|
15
|
-
return scopeStore.getStore();
|
|
16
|
-
}
|
|
17
|
-
function buildScope(options, current) {
|
|
18
|
-
const parent = options.parent === void 0 ? current : options.parent ?? void 0;
|
|
19
|
-
const id = options.id ?? randomUUID();
|
|
20
|
-
return {
|
|
21
|
-
id,
|
|
22
|
-
rootId: parent?.rootId ?? id,
|
|
23
|
-
kind: options.kind,
|
|
24
|
-
name: options.name,
|
|
25
|
-
parentId: parent?.id,
|
|
26
|
-
depth: (parent?.depth ?? -1) + 1,
|
|
27
|
-
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
28
|
-
sessionId: options.sessionId ?? parent?.sessionId,
|
|
29
|
-
taskId: options.taskId ?? parent?.taskId,
|
|
30
|
-
step: options.step ?? parent?.step,
|
|
31
|
-
attributes: cloneAttributes(options.attributes ?? {})
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function runWithScope(scope, fn) {
|
|
35
|
-
return Promise.resolve(scopeStore.run(scope, fn));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// src/scope/run.ts
|
|
39
|
-
function currentScope() {
|
|
40
|
-
const scope = getStoredScope();
|
|
41
|
-
return scope ? cloneScope(scope) : void 0;
|
|
42
|
-
}
|
|
43
|
-
function snapshotScope(scope = getStoredScope()) {
|
|
44
|
-
return scope ? cloneScope(scope) : void 0;
|
|
45
|
-
}
|
|
46
|
-
function createScope(options) {
|
|
47
|
-
return buildScope(options, getStoredScope());
|
|
48
|
-
}
|
|
49
|
-
function withinScope(options, fn) {
|
|
50
|
-
return runWithScope(buildScope(options, getStoredScope()), fn);
|
|
51
|
-
}
|
|
52
|
-
function restoreScope(snapshot, fn) {
|
|
53
|
-
if (!snapshot) {
|
|
54
|
-
return Promise.resolve(fn());
|
|
55
|
-
}
|
|
56
|
-
return runWithScope(cloneScope(snapshot), fn);
|
|
57
|
-
}
|
|
58
|
-
async function* streamWithinScope(options, iterable) {
|
|
59
|
-
const scope = buildScope(options, getStoredScope());
|
|
60
|
-
const iterator = await runWithScope(scope, () => iterable[Symbol.asyncIterator]());
|
|
61
|
-
try {
|
|
62
|
-
while (true) {
|
|
63
|
-
const next = await runWithScope(scope, () => iterator.next());
|
|
64
|
-
if (next.done) {
|
|
65
|
-
return next.value;
|
|
66
|
-
}
|
|
67
|
-
yield next.value;
|
|
68
|
-
}
|
|
69
|
-
} finally {
|
|
70
|
-
const returnFn = iterator.return?.bind(iterator);
|
|
71
|
-
if (returnFn) {
|
|
72
|
-
await runWithScope(scope, () => returnFn(void 0));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export {
|
|
78
|
-
currentScope,
|
|
79
|
-
snapshotScope,
|
|
80
|
-
createScope,
|
|
81
|
-
withinScope,
|
|
82
|
-
restoreScope,
|
|
83
|
-
streamWithinScope
|
|
84
|
-
};
|