@cuylabs/agent-core 0.8.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-CAA7FHIH.js → chunk-6HZBHFOL.js} +3 -103
- package/dist/chunk-CJI7PVS2.js +58 -0
- package/dist/{chunk-N6HWIEEA.js → chunk-CMYN2RCB.js} +278 -61
- package/dist/chunk-FII65CN7.js +117 -0
- package/dist/{chunk-IVUJDISU.js → chunk-GFTW23FV.js} +5 -14
- package/dist/chunk-I6PKJ7XQ.js +292 -0
- package/dist/{chunk-BDBZ3SLK.js → chunk-ICZ66572.js} +48 -4
- package/dist/chunk-KYLPMBHD.js +316 -0
- package/dist/chunk-MXAP4UG6.js +2956 -0
- package/dist/{chunk-RZITT45F.js → chunk-N3VX7FEE.js} +39 -6
- package/dist/{chunk-YSLSEQ6B.js → chunk-NDZWXCBZ.js} +218 -95
- package/dist/{chunk-P6YF7USR.js → chunk-Q742PSH3.js} +23 -38
- package/dist/chunk-QAL3OMI3.js +943 -0
- package/dist/{chunk-RFEKJKTO.js → chunk-RN6WZEUF.js} +330 -280
- package/dist/{chunk-ZXAKHMWH.js → chunk-ROTGCYDW.js} +22 -84
- package/dist/chunk-SPBFQXOT.js +0 -0
- package/dist/{chunk-LRHOS4ZN.js → chunk-SPILYYDF.js} +3 -2
- package/dist/chunk-SSFBF3US.js +602 -0
- package/dist/chunk-SZ2XBPTW.js +8 -0
- package/dist/chunk-T4UIX5D7.js +115 -0
- package/dist/chunk-TIHPYVAJ.js +102 -0
- package/dist/{chunk-YUUJK53A.js → chunk-TOTDGK3P.js} +1 -1
- package/dist/chunk-V4RFNEET.js +563 -0
- package/dist/chunk-VOUEJSW6.js +0 -0
- package/dist/{chunk-4BDA7DQY.js → chunk-WBPOZ7CL.js} +673 -273
- 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 -34
- package/dist/{runtime → execution}/index.js +18 -13
- package/dist/index-BCqEGzBj.d.ts +251 -0
- package/dist/index.d.ts +490 -122
- package/dist/index.js +2104 -615
- package/dist/{errors → inference/errors}/index.d.ts +2 -2
- package/dist/{errors → inference/errors}/index.js +1 -1
- package/dist/inference/index.d.ts +16 -23
- package/dist/inference/index.js +45 -16
- 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 -149
- package/dist/middleware/index.js +11 -3
- package/dist/model-messages-B4nK9D1-.d.ts +13 -0
- package/dist/models/index.d.ts +23 -18
- package/dist/models/index.js +48 -11
- package/dist/models/reasoning/index.d.ts +4 -0
- package/dist/{reasoning → models/reasoning}/index.js +3 -3
- package/dist/plugin/index.d.ts +458 -0
- package/dist/plugin/index.js +32 -0
- package/dist/profiles/index.d.ts +55 -0
- package/dist/profiles/index.js +30 -0
- package/dist/prompt/index.d.ts +8 -12
- package/dist/prompt/index.js +3 -2
- 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 +3 -3
- 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 +125 -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 +58 -53
- package/dist/builder-UpOWQMW3.d.ts +0 -34
- package/dist/chunk-7MUFEN4K.js +0 -559
- package/dist/chunk-7VKQ4WPB.js +0 -73
- package/dist/chunk-BFM2YHNM.js +0 -222
- package/dist/chunk-DWYX7ASF.js +0 -26
- package/dist/chunk-KUVSERLJ.js +0 -50
- package/dist/chunk-N7P4PN3O.js +0 -84
- package/dist/chunk-SDSBEQXG.js +0 -157
- package/dist/chunk-SQU2AJHO.js +0 -305
- package/dist/chunk-VBWWUHWI.js +0 -724
- 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-CWSchSql.d.ts +0 -1058
- package/dist/messages-BYWGn8TY.d.ts +0 -110
- package/dist/presets/index.d.ts +0 -53
- package/dist/presets/index.js +0 -28
- package/dist/reasoning/index.d.ts +0 -116
- package/dist/registry-DwYqsQkX.d.ts +0 -164
- package/dist/runner-e2YRcUoX.d.ts +0 -786
- package/dist/scope/index.d.ts +0 -10
- package/dist/scope/index.js +0 -14
- package/dist/session-manager-B_CWGTsl.d.ts +0 -274
- package/dist/signal/index.d.ts +0 -28
- package/dist/signal/index.js +0 -6
- package/dist/sub-agent/index.d.ts +0 -23
- package/dist/sub-agent/index.js +0 -15
- package/dist/tool-BHbyUAy3.d.ts +0 -150
- package/dist/tool-DLXAR9Ce.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-BnpEOYV-.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-KKDrdU9Y.d.ts +0 -325
- package/dist/types-QA4WhEfz.d.ts +0 -138
- package/dist/types-QKHHQLLq.d.ts +0 -336
- package/dist/types-YuWV4ag7.d.ts +0 -72
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ErrorCategory, R as ResponseHeaders } from '
|
|
2
|
-
export { L as LLMError, a as LLMErrorOptions } from '
|
|
1
|
+
import { E as ErrorCategory, R as ResponseHeaders } from '../../llm-error-D93FNNLY.js';
|
|
2
|
+
export { L as LLMError, a as LLMErrorOptions } from '../../llm-error-D93FNNLY.js';
|
|
3
3
|
|
|
4
4
|
declare function isRetryableCategory(category: ErrorCategory): boolean;
|
|
5
5
|
declare function parseRetryDelay(headers: ResponseHeaders): number | undefined;
|
|
@@ -1,19 +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
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
import
|
|
7
|
-
import { T as ToolExecutionMode, I as InferenceStreamInput, A as AnyInferenceResult } from '../types-KKDrdU9Y.js';
|
|
8
|
-
export { a as AnyStreamResult, C as CustomStreamProvider, b as CustomStreamResult, D as DEFAULT_MAX_OUTPUT_TOKENS, c as InferenceCustomResult, d as InferenceStepInfo, e as InferenceStreamResult, L as LLMStreamInput, f as LLMStreamResult, O as OUTPUT_TOKEN_MAX, S as StepInfo } from '../types-KKDrdU9Y.js';
|
|
4
|
+
import { T as ToolHost } from '../types-C_LCeYNg.js';
|
|
5
|
+
export { c as convertAgentMessagesToModelMessages } from '../model-messages-B4nK9D1-.js';
|
|
6
|
+
export { E as ErrorCategory, L as LLMError, a as LLMErrorOptions, R as ResponseHeaders } from '../llm-error-D93FNNLY.js';
|
|
7
|
+
export { getErrorCategory, getRetryDelay, isRetryable, isRetryableCategory, parseRetryDelay } from './errors/index.js';
|
|
8
|
+
import '../types-RSCv7nQ4.js';
|
|
9
9
|
import 'zod';
|
|
10
|
-
import '@ai-sdk/provider-utils';
|
|
11
|
-
import '../events-CE72w8W4.js';
|
|
12
|
-
import '../messages-BYWGn8TY.js';
|
|
13
|
-
import '../types-BfNpU8NS.js';
|
|
14
|
-
import '../types-CQL-SvTn.js';
|
|
15
10
|
import '../types-CQaXbRsS.js';
|
|
16
|
-
import '../
|
|
11
|
+
import '../types-Bj_J8u_W.js';
|
|
12
|
+
import '@ai-sdk/provider-utils';
|
|
13
|
+
import '../sandbox/index.js';
|
|
17
14
|
|
|
18
15
|
/**
|
|
19
16
|
* Build a Vercel AI SDK `ToolSet` from `Tool.Info` definitions.
|
|
@@ -22,14 +19,18 @@ declare function buildToolSet(options: {
|
|
|
22
19
|
tools: Record<string, Tool.Info>;
|
|
23
20
|
cwd: string;
|
|
24
21
|
sessionID: string;
|
|
22
|
+
turnID?: string;
|
|
25
23
|
messageID: string;
|
|
26
24
|
abort: AbortSignal;
|
|
27
25
|
turnTracker?: TurnTrackerContext;
|
|
28
26
|
host?: ToolHost;
|
|
27
|
+
humanInputController?: HumanInputController;
|
|
29
28
|
middleware?: MiddlewareRunner;
|
|
29
|
+
onEvent?: (event: AgentEvent) => void | Promise<void>;
|
|
30
30
|
executionMode?: ToolExecutionMode;
|
|
31
31
|
}): Promise<ToolSet>;
|
|
32
32
|
|
|
33
|
+
declare function buildModelCallContext(input: InferenceStreamInput): ModelCallContext;
|
|
33
34
|
/**
|
|
34
35
|
* Create a model inference stream with optional retry support.
|
|
35
36
|
*/
|
|
@@ -44,19 +45,11 @@ declare function streamOnce(input: InferenceStreamInput): Promise<AnyInferenceRe
|
|
|
44
45
|
declare function streamStep(input: InferenceStreamInput): Promise<AnyInferenceResult>;
|
|
45
46
|
|
|
46
47
|
declare const Inference: {
|
|
47
|
-
readonly
|
|
48
|
-
readonly stream: typeof stream;
|
|
49
|
-
readonly streamOnce: typeof streamOnce;
|
|
50
|
-
readonly streamStep: typeof streamStep;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated Use `Inference`.
|
|
54
|
-
*/
|
|
55
|
-
declare const LLM: {
|
|
48
|
+
readonly buildModelCallContext: typeof buildModelCallContext;
|
|
56
49
|
readonly buildToolSet: typeof buildToolSet;
|
|
57
50
|
readonly stream: typeof stream;
|
|
58
51
|
readonly streamOnce: typeof streamOnce;
|
|
59
52
|
readonly streamStep: typeof streamStep;
|
|
60
53
|
};
|
|
61
54
|
|
|
62
|
-
export { AnyInferenceResult, Inference, InferenceStreamInput,
|
|
55
|
+
export { AnyInferenceResult, Inference, InferenceStreamInput, ToolExecutionMode, buildModelCallContext, buildToolSet, stream, streamOnce, streamStep };
|
package/dist/inference/index.js
CHANGED
|
@@ -1,27 +1,56 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
DEFAULT_RETRY_CONFIG,
|
|
3
3
|
Inference,
|
|
4
|
-
|
|
5
|
-
OUTPUT_TOKEN_MAX,
|
|
4
|
+
buildModelCallContext,
|
|
6
5
|
buildToolSet,
|
|
6
|
+
calculateDelay,
|
|
7
|
+
convertAgentMessagesToModelMessages,
|
|
8
|
+
createRetryHandler,
|
|
9
|
+
createRetryState,
|
|
10
|
+
shouldRetry,
|
|
11
|
+
sleep,
|
|
7
12
|
stream,
|
|
8
13
|
streamOnce,
|
|
9
|
-
streamStep
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
streamStep,
|
|
15
|
+
withRetry
|
|
16
|
+
} from "../chunk-CMYN2RCB.js";
|
|
17
|
+
import "../chunk-5NVVNXPQ.js";
|
|
18
|
+
import {
|
|
19
|
+
LLMError,
|
|
20
|
+
getErrorCategory,
|
|
21
|
+
getRetryDelay,
|
|
22
|
+
isRetryable,
|
|
23
|
+
isRetryableCategory,
|
|
24
|
+
parseRetryDelay
|
|
25
|
+
} from "../chunk-N3VX7FEE.js";
|
|
26
|
+
import "../chunk-RN6WZEUF.js";
|
|
27
|
+
import {
|
|
28
|
+
DEFAULT_MAX_TOKENS
|
|
29
|
+
} from "../chunk-CJI7PVS2.js";
|
|
30
|
+
import "../chunk-I6PKJ7XQ.js";
|
|
31
|
+
import "../chunk-V4RFNEET.js";
|
|
32
|
+
import "../chunk-FII65CN7.js";
|
|
33
|
+
import "../chunk-T4UIX5D7.js";
|
|
18
34
|
export {
|
|
19
|
-
DEFAULT_MAX_OUTPUT_TOKENS,
|
|
35
|
+
DEFAULT_MAX_TOKENS as DEFAULT_MAX_OUTPUT_TOKENS,
|
|
36
|
+
DEFAULT_RETRY_CONFIG,
|
|
20
37
|
Inference,
|
|
21
|
-
|
|
22
|
-
|
|
38
|
+
LLMError,
|
|
39
|
+
buildModelCallContext,
|
|
23
40
|
buildToolSet,
|
|
41
|
+
calculateDelay,
|
|
42
|
+
convertAgentMessagesToModelMessages,
|
|
43
|
+
createRetryHandler,
|
|
44
|
+
createRetryState,
|
|
45
|
+
getErrorCategory,
|
|
46
|
+
getRetryDelay,
|
|
47
|
+
isRetryable,
|
|
48
|
+
isRetryableCategory,
|
|
49
|
+
parseRetryDelay,
|
|
50
|
+
shouldRetry,
|
|
51
|
+
sleep,
|
|
24
52
|
stream,
|
|
25
53
|
streamOnce,
|
|
26
|
-
streamStep
|
|
54
|
+
streamStep,
|
|
55
|
+
withRetry
|
|
27
56
|
};
|