@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.
Files changed (116) hide show
  1. package/README.md +33 -17
  2. package/dist/chunk-2O4MCSQS.js +780 -0
  3. package/dist/chunk-2TTOLHBT.js +198 -0
  4. package/dist/chunk-5FMSGQVX.js +281 -0
  5. package/dist/chunk-5NVVNXPQ.js +288 -0
  6. package/dist/{chunk-EKR6PKXU.js → chunk-6HZBHFOL.js} +3 -3
  7. package/dist/chunk-CJI7PVS2.js +58 -0
  8. package/dist/{chunk-WKHDSSXG.js → chunk-CMYN2RCB.js} +146 -46
  9. package/dist/chunk-FII65CN7.js +117 -0
  10. package/dist/{chunk-UHCJEM2E.js → chunk-ICZ66572.js} +13 -6
  11. package/dist/chunk-KYLPMBHD.js +316 -0
  12. package/dist/chunk-MXAP4UG6.js +2956 -0
  13. package/dist/{chunk-4QFNWPIF.js → chunk-N3VX7FEE.js} +35 -2
  14. package/dist/{chunk-MAZ5DY5B.js → chunk-NDZWXCBZ.js} +213 -78
  15. package/dist/{chunk-MHKK374K.js → chunk-Q742PSH3.js} +11 -27
  16. package/dist/{chunk-WGZAPU6N.js → chunk-QAL3OMI3.js} +15 -1
  17. package/dist/{chunk-UDCZ673N.js → chunk-RN6WZEUF.js} +27 -23
  18. package/dist/{chunk-ZXAKHMWH.js → chunk-ROTGCYDW.js} +22 -84
  19. package/dist/chunk-SPBFQXOT.js +0 -0
  20. package/dist/chunk-SSFBF3US.js +602 -0
  21. package/dist/chunk-SZ2XBPTW.js +8 -0
  22. package/dist/chunk-T4UIX5D7.js +115 -0
  23. package/dist/{chunk-IYWQOJMQ.js → chunk-TIHPYVAJ.js} +34 -34
  24. package/dist/{chunk-RKEW5WXI.js → chunk-TOTDGK3P.js} +1 -1
  25. package/dist/chunk-V4RFNEET.js +563 -0
  26. package/dist/chunk-VOUEJSW6.js +0 -0
  27. package/dist/{chunk-J4QDGZIA.js → chunk-WBPOZ7CL.js} +659 -275
  28. package/dist/chunk-X4VN4GIJ.js +185 -0
  29. package/dist/dispatch/index.d.ts +93 -0
  30. package/dist/dispatch/index.js +37 -0
  31. package/dist/events/index.d.ts +93 -0
  32. package/dist/events/index.js +6 -0
  33. package/dist/{runtime → execution}/index.d.ts +120 -35
  34. package/dist/{runtime → execution}/index.js +17 -11
  35. package/dist/index.d.ts +489 -115
  36. package/dist/index.js +1665 -462
  37. package/dist/inference/errors/index.js +1 -1
  38. package/dist/inference/index.d.ts +13 -21
  39. package/dist/inference/index.js +15 -12
  40. package/dist/instance-BqV2D5pc.d.ts +5723 -0
  41. package/dist/logger/index.d.ts +50 -0
  42. package/dist/logger/index.js +11 -0
  43. package/dist/mcp/index.d.ts +5 -9
  44. package/dist/mcp/index.js +2 -3
  45. package/dist/middleware/index.d.ts +10 -150
  46. package/dist/middleware/index.js +10 -2
  47. package/dist/model-messages-B4nK9D1-.d.ts +13 -0
  48. package/dist/models/index.d.ts +5 -2
  49. package/dist/models/index.js +2 -1
  50. package/dist/models/reasoning/index.js +2 -1
  51. package/dist/plugin/index.d.ts +55 -11
  52. package/dist/plugin/index.js +1 -1
  53. package/dist/profiles/index.d.ts +55 -0
  54. package/dist/{presets → profiles}/index.js +10 -10
  55. package/dist/prompt/index.d.ts +8 -13
  56. package/dist/safety/index.d.ts +109 -14
  57. package/dist/safety/index.js +59 -3
  58. package/dist/sandbox/index.d.ts +81 -0
  59. package/dist/sandbox/index.js +1 -0
  60. package/dist/skill/index.d.ts +10 -8
  61. package/dist/skill/index.js +2 -2
  62. package/dist/storage/index.d.ts +12 -4
  63. package/dist/storage/index.js +1 -1
  64. package/dist/subagents/index.d.ts +177 -0
  65. package/dist/subagents/index.js +78 -0
  66. package/dist/team/index.d.ts +544 -0
  67. package/dist/team/index.js +41 -0
  68. package/dist/tool/host/index.d.ts +41 -0
  69. package/dist/tool/host/index.js +10 -0
  70. package/dist/tool/index.d.ts +111 -21
  71. package/dist/tool/index.js +20 -13
  72. package/dist/{types-VQgymC1N.d.ts → types-Bj_J8u_W.d.ts} +44 -64
  73. package/dist/{types-CHiPh8U2.d.ts → types-C_LCeYNg.d.ts} +7 -7
  74. package/dist/types-RSCv7nQ4.d.ts +59 -0
  75. package/package.json +46 -47
  76. package/dist/builder-BgZ_j4Vs.d.ts +0 -35
  77. package/dist/chunk-5ARZJWD2.js +0 -259
  78. package/dist/chunk-DXFBQMXP.js +0 -53
  79. package/dist/chunk-H3FUYU52.js +0 -81
  80. package/dist/chunk-JLXG2SH7.js +0 -905
  81. package/dist/chunk-N7P4PN3O.js +0 -84
  82. package/dist/chunk-OFDKHNCX.js +0 -727
  83. package/dist/chunk-SDSBEQXG.js +0 -157
  84. package/dist/chunk-VEKUXUVF.js +0 -41
  85. package/dist/chunk-VNQBHPCT.js +0 -398
  86. package/dist/chunk-WWYYNWEW.js +0 -259
  87. package/dist/context/index.d.ts +0 -259
  88. package/dist/context/index.js +0 -26
  89. package/dist/events-CE72w8W4.d.ts +0 -149
  90. package/dist/host/index.d.ts +0 -45
  91. package/dist/host/index.js +0 -8
  92. package/dist/index-DQuTZ8xL.d.ts +0 -1335
  93. package/dist/messages-BYWGn8TY.d.ts +0 -110
  94. package/dist/presets/index.d.ts +0 -53
  95. package/dist/registry-DwYqsQkX.d.ts +0 -164
  96. package/dist/runner-CI-XeR16.d.ts +0 -91
  97. package/dist/scope/index.d.ts +0 -10
  98. package/dist/scope/index.js +0 -14
  99. package/dist/session-manager-KbYt2WUh.d.ts +0 -282
  100. package/dist/signal/index.d.ts +0 -28
  101. package/dist/signal/index.js +0 -6
  102. package/dist/sub-agent/index.d.ts +0 -24
  103. package/dist/sub-agent/index.js +0 -32
  104. package/dist/tool-CZWN3KbO.d.ts +0 -141
  105. package/dist/tool-DkhSCV2Y.d.ts +0 -145
  106. package/dist/tracker-DClqYqTj.d.ts +0 -96
  107. package/dist/tracking/index.d.ts +0 -111
  108. package/dist/tracking/index.js +0 -20
  109. package/dist/types-BfNpU8NS.d.ts +0 -270
  110. package/dist/types-BlOKk-Bb.d.ts +0 -330
  111. package/dist/types-BlZwmnuW.d.ts +0 -50
  112. package/dist/types-CQL-SvTn.d.ts +0 -29
  113. package/dist/types-CWm-7rvB.d.ts +0 -55
  114. package/dist/types-DTSkxakL.d.ts +0 -651
  115. package/dist/types-DmDwi2zI.d.ts +0 -339
  116. package/dist/types-YuWV4ag7.d.ts +0 -72
@@ -5,7 +5,7 @@ import {
5
5
  isRetryable,
6
6
  isRetryableCategory,
7
7
  parseRetryDelay
8
- } from "../../chunk-4QFNWPIF.js";
8
+ } from "../../chunk-N3VX7FEE.js";
9
9
  export {
10
10
  LLMError,
11
11
  getErrorCategory,
@@ -1,20 +1,16 @@
1
+ import { T as Tool, a as TurnTrackerContext, H as HumanInputController, b as MiddlewareRunner, A as AgentEvent, c as ToolExecutionMode, I as InferenceStreamInput, d as ModelCallContext, e as AnyInferenceResult } from '../instance-BqV2D5pc.js';
2
+ export { D as DEFAULT_MAX_OUTPUT_TOKENS, f as DEFAULT_RETRY_CONFIG, g as InferenceCustomResult, h as InferenceStepInfo, i as InferenceStreamResult, R as RetryConfig, j as RetryHandlerOptions, k as RetryState, l as calculateDelay, m as createRetryHandler, n as createRetryState, s as shouldRetry, o as sleep, w as withRetry } from '../instance-BqV2D5pc.js';
1
3
  import { ToolSet } from 'ai';
2
- import { T as Tool } from '../tool-CZWN3KbO.js';
3
- import { T as ToolHost } from '../types-CHiPh8U2.js';
4
- import { M as MiddlewareRunner } from '../runner-CI-XeR16.js';
5
- import { d as TurnTrackerContext } from '../tool-DkhSCV2Y.js';
6
- import { T as ToolExecutionMode, I as InferenceStreamInput, A as AnyInferenceResult } from '../types-BlOKk-Bb.js';
7
- export { a as AnyStreamResult, C as CustomStreamProvider, b as CustomStreamResult, D as DEFAULT_MAX_OUTPUT_TOKENS, c as DEFAULT_RETRY_CONFIG, d as InferenceCustomResult, e as InferenceStepInfo, f as InferenceStreamResult, L as LLMStreamInput, g as LLMStreamResult, O as OUTPUT_TOKEN_MAX, R as RetryConfig, h as RetryHandlerOptions, i as RetryState, S as StepInfo, j as calculateDelay, k as createRetryHandler, l as createRetryState, s as shouldRetry, m as sleep, w as withRetry } from '../types-BlOKk-Bb.js';
4
+ import { T as ToolHost } from '../types-C_LCeYNg.js';
5
+ export { c as convertAgentMessagesToModelMessages } from '../model-messages-B4nK9D1-.js';
8
6
  export { E as ErrorCategory, L as LLMError, a as LLMErrorOptions, R as ResponseHeaders } from '../llm-error-D93FNNLY.js';
9
7
  export { getErrorCategory, getRetryDelay, isRetryable, isRetryableCategory, parseRetryDelay } from './errors/index.js';
10
- export { S as StreamChunk } from '../types-DTSkxakL.js';
8
+ import '../types-RSCv7nQ4.js';
11
9
  import 'zod';
12
- import '../events-CE72w8W4.js';
13
- import '../messages-BYWGn8TY.js';
14
- import '../types-CQL-SvTn.js';
15
10
  import '../types-CQaXbRsS.js';
11
+ import '../types-Bj_J8u_W.js';
16
12
  import '@ai-sdk/provider-utils';
17
- import '../types-BfNpU8NS.js';
13
+ import '../sandbox/index.js';
18
14
 
19
15
  /**
20
16
  * Build a Vercel AI SDK `ToolSet` from `Tool.Info` definitions.
@@ -23,14 +19,18 @@ declare function buildToolSet(options: {
23
19
  tools: Record<string, Tool.Info>;
24
20
  cwd: string;
25
21
  sessionID: string;
22
+ turnID?: string;
26
23
  messageID: string;
27
24
  abort: AbortSignal;
28
25
  turnTracker?: TurnTrackerContext;
29
26
  host?: ToolHost;
27
+ humanInputController?: HumanInputController;
30
28
  middleware?: MiddlewareRunner;
29
+ onEvent?: (event: AgentEvent) => void | Promise<void>;
31
30
  executionMode?: ToolExecutionMode;
32
31
  }): Promise<ToolSet>;
33
32
 
33
+ declare function buildModelCallContext(input: InferenceStreamInput): ModelCallContext;
34
34
  /**
35
35
  * Create a model inference stream with optional retry support.
36
36
  */
@@ -45,19 +45,11 @@ declare function streamOnce(input: InferenceStreamInput): Promise<AnyInferenceRe
45
45
  declare function streamStep(input: InferenceStreamInput): Promise<AnyInferenceResult>;
46
46
 
47
47
  declare const Inference: {
48
- readonly buildToolSet: typeof buildToolSet;
49
- readonly stream: typeof stream;
50
- readonly streamOnce: typeof streamOnce;
51
- readonly streamStep: typeof streamStep;
52
- };
53
- /**
54
- * @deprecated Use `Inference`.
55
- */
56
- declare const LLM: {
48
+ readonly buildModelCallContext: typeof buildModelCallContext;
57
49
  readonly buildToolSet: typeof buildToolSet;
58
50
  readonly stream: typeof stream;
59
51
  readonly streamOnce: typeof streamOnce;
60
52
  readonly streamStep: typeof streamStep;
61
53
  };
62
54
 
63
- export { AnyInferenceResult, Inference, InferenceStreamInput, LLM, ToolExecutionMode, buildToolSet, stream, streamOnce, streamStep };
55
+ export { AnyInferenceResult, Inference, InferenceStreamInput, ToolExecutionMode, buildModelCallContext, buildToolSet, stream, streamOnce, streamStep };
@@ -1,11 +1,10 @@
1
1
  import {
2
- DEFAULT_MAX_OUTPUT_TOKENS,
3
2
  DEFAULT_RETRY_CONFIG,
4
3
  Inference,
5
- LLM,
6
- OUTPUT_TOKEN_MAX,
4
+ buildModelCallContext,
7
5
  buildToolSet,
8
6
  calculateDelay,
7
+ convertAgentMessagesToModelMessages,
9
8
  createRetryHandler,
10
9
  createRetryState,
11
10
  shouldRetry,
@@ -14,9 +13,8 @@ import {
14
13
  streamOnce,
15
14
  streamStep,
16
15
  withRetry
17
- } from "../chunk-WKHDSSXG.js";
18
- import "../chunk-H3FUYU52.js";
19
- import "../chunk-VEKUXUVF.js";
16
+ } from "../chunk-CMYN2RCB.js";
17
+ import "../chunk-5NVVNXPQ.js";
20
18
  import {
21
19
  LLMError,
22
20
  getErrorCategory,
@@ -24,19 +22,24 @@ import {
24
22
  isRetryable,
25
23
  isRetryableCategory,
26
24
  parseRetryDelay
27
- } from "../chunk-4QFNWPIF.js";
28
- import "../chunk-N7P4PN3O.js";
29
- import "../chunk-UDCZ673N.js";
25
+ } from "../chunk-N3VX7FEE.js";
26
+ import "../chunk-RN6WZEUF.js";
27
+ import {
28
+ DEFAULT_MAX_TOKENS
29
+ } from "../chunk-CJI7PVS2.js";
30
30
  import "../chunk-I6PKJ7XQ.js";
31
+ import "../chunk-V4RFNEET.js";
32
+ import "../chunk-FII65CN7.js";
33
+ import "../chunk-T4UIX5D7.js";
31
34
  export {
32
- DEFAULT_MAX_OUTPUT_TOKENS,
35
+ DEFAULT_MAX_TOKENS as DEFAULT_MAX_OUTPUT_TOKENS,
33
36
  DEFAULT_RETRY_CONFIG,
34
37
  Inference,
35
- LLM,
36
38
  LLMError,
37
- OUTPUT_TOKEN_MAX,
39
+ buildModelCallContext,
38
40
  buildToolSet,
39
41
  calculateDelay,
42
+ convertAgentMessagesToModelMessages,
40
43
  createRetryHandler,
41
44
  createRetryState,
42
45
  getErrorCategory,