@cuylabs/agent-core 0.9.0 → 0.10.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-BqV2D5pc.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-B4nK9D1-.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/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# @cuylabs/agent-core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Composable AI agent harness with pluggable execution control.
|
|
4
4
|
|
|
5
|
-
`@cuylabs/agent-core` is the in-process execution
|
|
6
|
-
|
|
7
|
-
prompt construction, tracing, and the reusable
|
|
8
|
-
that
|
|
5
|
+
`@cuylabs/agent-core` is the in-process execution kernel for AI agents. It owns
|
|
6
|
+
the `Agent` API, streaming execution, tool and model semantics, middleware and
|
|
7
|
+
lifecycle hooks, sessions, prompt construction, tracing, and the reusable
|
|
8
|
+
task/turn/workflow primitives that runtime packages build on for durability,
|
|
9
|
+
hosting, and scheduling.
|
|
9
10
|
|
|
10
11
|
## Package Boundary
|
|
11
12
|
|
|
@@ -15,15 +16,20 @@ Use `@cuylabs/agent-core` when you want:
|
|
|
15
16
|
- tool definition and execution
|
|
16
17
|
- model hooks, tool hooks, and lifecycle middleware
|
|
17
18
|
- sessions, storage, branching, and prompt construction
|
|
18
|
-
- tracing, MCP, skills,
|
|
19
|
-
-
|
|
19
|
+
- tracing, MCP, skills, profiles, and dispatch-based child-agent tools
|
|
20
|
+
- execution-facing task/turn/workflow helpers from `@cuylabs/agent-core/execution`
|
|
20
21
|
|
|
21
22
|
This package does not own outer orchestration or hosting:
|
|
22
23
|
|
|
23
|
-
- use `@cuylabs/agent-runtime` for
|
|
24
|
-
- use `@cuylabs/agent-runtime-dapr` for Dapr
|
|
24
|
+
- use `@cuylabs/agent-runtime` for the backend-agnostic orchestration contract — it defines the interfaces for scheduling, dispatch, workload lifecycle, and execution stores that runtime backends implement
|
|
25
|
+
- use `@cuylabs/agent-runtime-dapr` for a concrete backend that implements those contracts with Dapr workflows, state stores, and pub/sub
|
|
26
|
+
- use `@cuylabs/agent-server` for a transport-neutral local server with session management, turn execution, and streamed event fanout over WebSocket / stdio
|
|
25
27
|
- use `@cuylabs/agent-http` for an AI SDK chat-stream HTTP adapter
|
|
26
28
|
|
|
29
|
+
`@cuylabs/agent-core` includes the default local execution host. Non-local
|
|
30
|
+
tool environments should live in separate packages so the execution semantics
|
|
31
|
+
and host implementations stay decoupled.
|
|
32
|
+
|
|
27
33
|
## Core Capabilities
|
|
28
34
|
|
|
29
35
|
- Streaming agent execution with structured events
|
|
@@ -31,9 +37,11 @@ This package does not own outer orchestration or hosting:
|
|
|
31
37
|
- Middleware for model input/output, stream chunks, tool calls, and lifecycle hooks
|
|
32
38
|
- Session persistence with branching support
|
|
33
39
|
- Prompt pipeline and dynamic prompt sections
|
|
34
|
-
- Skills and built-in
|
|
40
|
+
- Skills and built-in dispatch-based child-agent delegation
|
|
35
41
|
- OpenTelemetry tracing
|
|
36
42
|
- MCP integration
|
|
43
|
+
- EventBus — pluggable pub/sub with history replay and backpressure
|
|
44
|
+
- AgentSignal — typed inter-agent signalling within teams
|
|
37
45
|
- Runtime-facing task, turn, and workflow primitives for durable adapters
|
|
38
46
|
|
|
39
47
|
## Installation
|
|
@@ -110,17 +118,23 @@ structure when you want clearer boundaries:
|
|
|
110
118
|
import { createAgent, Tool } from "@cuylabs/agent-core";
|
|
111
119
|
import type { AgentMiddleware } from "@cuylabs/agent-core/middleware";
|
|
112
120
|
import { Inference } from "@cuylabs/agent-core/inference";
|
|
113
|
-
import { createAgentTaskRunner } from "@cuylabs/agent-core/
|
|
114
|
-
import { localHost } from "@cuylabs/agent-core/host";
|
|
121
|
+
import { createAgentTaskRunner } from "@cuylabs/agent-core/execution";
|
|
122
|
+
import { localHost } from "@cuylabs/agent-core/tool/host";
|
|
115
123
|
import { createPromptBuilder } from "@cuylabs/agent-core/prompt";
|
|
116
124
|
import { withinScope } from "@cuylabs/agent-core/scope";
|
|
117
125
|
import { createSkillRegistry } from "@cuylabs/agent-core/skill";
|
|
118
|
-
import { createSubAgentTools } from "@cuylabs/agent-core/
|
|
126
|
+
import { createSubAgentTools } from "@cuylabs/agent-core/subagents";
|
|
119
127
|
import { createMCPManager } from "@cuylabs/agent-core/mcp";
|
|
128
|
+
import { createEventBus } from "@cuylabs/agent-core/events";
|
|
129
|
+
import type { AgentSignal } from "@cuylabs/agent-core/signal";
|
|
120
130
|
```
|
|
121
131
|
|
|
122
132
|
Additional focused entrypoints are available for `tool`, `tracking`, `storage`,
|
|
123
|
-
`
|
|
133
|
+
`reasoning`, `models`, `mcp`, `inference`, `tool/host`, `scope`, `dispatch`,
|
|
134
|
+
`subagents`, `events`, and `signal`.
|
|
135
|
+
|
|
136
|
+
For non-local tool execution environments, install a dedicated host package and
|
|
137
|
+
pass its host instance through the same `host` option.
|
|
124
138
|
|
|
125
139
|
## Relationship To The Runtime Packages
|
|
126
140
|
|
|
@@ -150,10 +164,12 @@ Start with the package docs:
|
|
|
150
164
|
|
|
151
165
|
- [docs/README.md](./docs/README.md) for the learning path
|
|
152
166
|
- [docs/agent.md](./docs/agent.md) for the main `Agent` API
|
|
153
|
-
- [docs/middleware
|
|
167
|
+
- [docs/middleware/](./docs/middleware/README.md) for model/tool hooks and lifecycle middleware
|
|
154
168
|
- [docs/scope.md](./docs/scope.md) for nested execution lineage and scope snapshots
|
|
155
|
-
- [docs/tools
|
|
156
|
-
- [docs/
|
|
169
|
+
- [docs/tools/](./docs/tools/README.md) for tool definition and execution
|
|
170
|
+
- [docs/execution/README.md](./docs/execution/README.md) for task/turn/workflow execution integration
|
|
171
|
+
- [docs/events.md](./docs/events.md) for the EventBus pub/sub interface
|
|
172
|
+
- [docs/signal.md](./docs/signal.md) for inter-agent signalling
|
|
157
173
|
- [docs/tracing.md](./docs/tracing.md) for tracing setup
|
|
158
174
|
|
|
159
175
|
Runnable examples live in [examples/README.md](./examples/README.md).
|