@anvia/core 1.9.0 → 1.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 +1 -1
- package/dist/agent/agent.js +10 -9
- package/dist/agent/index.d.ts +5 -5
- package/dist/agent/index.js +13 -12
- package/dist/agent/resolve-options.js +4 -4
- package/dist/agent/resolved-agent.js +11 -10
- package/dist/agent/team/agent-team.js +13 -12
- package/dist/agent/team/index.js +13 -12
- package/dist/agent/tool-catalog.js +2 -2
- package/dist/{agent-BOoZ3jbr.d.ts → agent-BUEZxrEv.d.ts} +5 -3
- package/dist/{chunk-RW32K6OO.js → chunk-547CQSO2.js} +2 -2
- package/dist/{chunk-5I2NVRHC.js → chunk-5ZM5DB3O.js} +14 -2
- package/dist/chunk-5ZM5DB3O.js.map +1 -0
- package/dist/{chunk-AGPDR6FF.js → chunk-BH7RLRLQ.js} +3 -3
- package/dist/{chunk-KL652GO5.js → chunk-EF26KTFU.js} +2 -2
- package/dist/{chunk-AGOZCYFP.js → chunk-ET5SCES6.js} +6 -6
- package/dist/{chunk-7NWFT422.js → chunk-G4ZKCVBW.js} +3 -3
- package/dist/{chunk-V5NIO3J3.js → chunk-G7NJDOT5.js} +3 -3
- package/dist/{chunk-EWTZ3IAH.js → chunk-J6O567TG.js} +4 -4
- package/dist/{chunk-7AV3PEYW.js → chunk-LQFBCC74.js} +3 -3
- package/dist/chunk-M7LU47T5.js +143 -0
- package/dist/chunk-M7LU47T5.js.map +1 -0
- package/dist/{chunk-PILUQCGV.js → chunk-MNWULFRX.js} +2 -2
- package/dist/{chunk-AKQQG3IX.js → chunk-PFSWAJTY.js} +2 -2
- package/dist/{chunk-MA3TYOKF.js → chunk-PLQAN4EO.js} +25 -1
- package/dist/chunk-PLQAN4EO.js.map +1 -0
- package/dist/{chunk-M32FTMYD.js → chunk-SHSSCEGO.js} +2 -2
- package/dist/chunk-SHSSCEGO.js.map +1 -0
- package/dist/{chunk-AO2QL2VD.js → chunk-SISGNHNO.js} +48 -13
- package/dist/chunk-SISGNHNO.js.map +1 -0
- package/dist/{chunk-WLUWRBQ4.js → chunk-SVFEG2TI.js} +4 -1
- package/dist/chunk-SVFEG2TI.js.map +1 -0
- package/dist/{chunk-3YVGQNTI.js → chunk-WGUE44ZD.js} +3 -3
- package/dist/{chunk-KLDNHX4Z.js → chunk-X4XULHDO.js} +4 -4
- package/dist/{chunk-BRGNY5ZB.js → chunk-Y4Q66NQY.js} +16 -1
- package/dist/chunk-Y4Q66NQY.js.map +1 -0
- package/dist/decision/decide.js +4 -4
- package/dist/decision/errors.js +5 -3
- package/dist/decision/index.d.ts +14 -1
- package/dist/decision/index.js +8 -6
- package/dist/decision/questions.js +3 -3
- package/dist/decision/result.js +3 -3
- package/dist/decision/validation.js +2 -2
- package/dist/embeddings/index.js +7 -7
- package/dist/evals/advanced-metrics.js +2 -2
- package/dist/evals/cli.js +3 -3
- package/dist/evals/index.d.ts +2 -2
- package/dist/evals/index.js +32 -32
- package/dist/evals/metrics.js +4 -4
- package/dist/evals/runner.js +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +22 -19
- package/dist/internal/agent-runtime/agent-run.js +8 -6
- package/dist/internal/agent-runtime/continuation-state.js +1 -1
- package/dist/internal/agent-runtime/execution.js +1 -1
- package/dist/internal/agent-runtime/loop-context.js +33 -0
- package/dist/internal/agent-runtime/loop-context.js.map +1 -0
- package/dist/internal/agent-runtime/memory.js +3 -1
- package/dist/internal/agent-runtime/retrieval.js +2 -2
- package/dist/internal/agent-runtime/tool-execution.js +2 -2
- package/dist/internal/agent.d.ts +46 -6
- package/dist/internal/agent.js +21 -11
- package/dist/internal/team-runtime/run.js +12 -11
- package/dist/memory/index.d.ts +2 -2
- package/dist/memory/index.js +1 -1
- package/dist/memory/options.js +1 -1
- package/dist/{middleware-BNxyEpUX.d.ts → middleware-D_WPyilQ.d.ts} +1 -1
- package/dist/observability/index.d.ts +2 -2
- package/dist/pipeline/index.d.ts +3 -3
- package/dist/redaction/index.js +19 -0
- package/dist/redaction/index.js.map +1 -1
- package/dist/skills/index.js +2 -2
- package/dist/skills/load.js +2 -2
- package/dist/skills/tools.js +2 -2
- package/dist/tool/dynamic-tools.js +2 -2
- package/dist/tool/index.d.ts +2 -2
- package/dist/tool/index.js +2 -2
- package/dist/{types-B8KBVXuH.d.ts → types-CaAiktBl.d.ts} +4 -1
- package/dist/vector-store/index.js +2 -2
- package/dist/vector-store/ingest.js +2 -2
- package/dist/vector-store/retrieve.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-5I2NVRHC.js.map +0 -1
- package/dist/chunk-AO2QL2VD.js.map +0 -1
- package/dist/chunk-BRGNY5ZB.js.map +0 -1
- package/dist/chunk-M32FTMYD.js.map +0 -1
- package/dist/chunk-MA3TYOKF.js.map +0 -1
- package/dist/chunk-WLUWRBQ4.js.map +0 -1
- /package/dist/{chunk-RW32K6OO.js.map → chunk-547CQSO2.js.map} +0 -0
- /package/dist/{chunk-AGPDR6FF.js.map → chunk-BH7RLRLQ.js.map} +0 -0
- /package/dist/{chunk-KL652GO5.js.map → chunk-EF26KTFU.js.map} +0 -0
- /package/dist/{chunk-AGOZCYFP.js.map → chunk-ET5SCES6.js.map} +0 -0
- /package/dist/{chunk-7NWFT422.js.map → chunk-G4ZKCVBW.js.map} +0 -0
- /package/dist/{chunk-V5NIO3J3.js.map → chunk-G7NJDOT5.js.map} +0 -0
- /package/dist/{chunk-EWTZ3IAH.js.map → chunk-J6O567TG.js.map} +0 -0
- /package/dist/{chunk-7AV3PEYW.js.map → chunk-LQFBCC74.js.map} +0 -0
- /package/dist/{chunk-PILUQCGV.js.map → chunk-MNWULFRX.js.map} +0 -0
- /package/dist/{chunk-AKQQG3IX.js.map → chunk-PFSWAJTY.js.map} +0 -0
- /package/dist/{chunk-3YVGQNTI.js.map → chunk-WGUE44ZD.js.map} +0 -0
- /package/dist/{chunk-KLDNHX4Z.js.map → chunk-X4XULHDO.js.map} +0 -0
package/dist/embeddings/index.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import "../chunk-ERN7P6Q4.js";
|
|
2
|
-
import {
|
|
3
|
-
embedDocuments,
|
|
4
|
-
embedSparseQuery,
|
|
5
|
-
embedSparseTexts,
|
|
6
|
-
embedText,
|
|
7
|
-
embedTexts
|
|
8
|
-
} from "../chunk-YCTXTOOQ.js";
|
|
9
2
|
import "../chunk-DU4WA6LQ.js";
|
|
10
3
|
import {
|
|
11
4
|
angularDistance,
|
|
@@ -15,6 +8,13 @@ import {
|
|
|
15
8
|
euclideanDistance,
|
|
16
9
|
manhattanDistance
|
|
17
10
|
} from "../chunk-7F53DOML.js";
|
|
11
|
+
import {
|
|
12
|
+
embedDocuments,
|
|
13
|
+
embedSparseQuery,
|
|
14
|
+
embedSparseTexts,
|
|
15
|
+
embedText,
|
|
16
|
+
embedTexts
|
|
17
|
+
} from "../chunk-YCTXTOOQ.js";
|
|
18
18
|
import "../chunk-4FIVU53H.js";
|
|
19
19
|
import "../chunk-POXHJF3H.js";
|
|
20
20
|
import "../chunk-USRKPEQN.js";
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
turnRelevancy
|
|
12
12
|
} from "../chunk-R4AJ2EE3.js";
|
|
13
13
|
import "../chunk-V5KBSXAJ.js";
|
|
14
|
-
import "../chunk-3P3YVJ7V.js";
|
|
15
|
-
import "../chunk-VCOGUS3Q.js";
|
|
16
14
|
import "../chunk-ZPXOBQDS.js";
|
|
17
15
|
import "../chunk-EJR6VVB3.js";
|
|
18
16
|
import "../chunk-ZYXMWEL4.js";
|
|
17
|
+
import "../chunk-3P3YVJ7V.js";
|
|
18
|
+
import "../chunk-VCOGUS3Q.js";
|
|
19
19
|
import "../chunk-TP3MCUXS.js";
|
|
20
20
|
import "../chunk-6RQYWZI3.js";
|
|
21
21
|
import "../chunk-NF6WBPFG.js";
|
package/dist/evals/cli.js
CHANGED
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
formatEvalResult,
|
|
8
8
|
printEvalResult,
|
|
9
9
|
runEvalCli
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-EF26KTFU.js";
|
|
11
|
+
import "../chunk-X4XULHDO.js";
|
|
12
12
|
import "../chunk-PHLGGRHC.js";
|
|
13
|
-
import "../chunk-EJR6VVB3.js";
|
|
14
13
|
import "../chunk-4OSA3MMA.js";
|
|
14
|
+
import "../chunk-EJR6VVB3.js";
|
|
15
15
|
import "../chunk-ZYXMWEL4.js";
|
|
16
16
|
import "../chunk-TP3MCUXS.js";
|
|
17
17
|
import "../chunk-6RQYWZI3.js";
|
package/dist/evals/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { U as Usage, J as JsonObject, d as CompletionModel, M as Message } from '../types-DYqZKDA8.js';
|
|
2
2
|
import { Z as ZodSchema } from '../zod-schema-C7F4clpm.js';
|
|
3
|
-
import { Z as AgentRunPromptRef, g as AgentInteractionOutcome, n as AgentResponse, o as AgentRunOptions, l as AgentOutcome } from '../middleware-
|
|
3
|
+
import { Z as AgentRunPromptRef, g as AgentInteractionOutcome, n as AgentResponse, o as AgentRunOptions, l as AgentOutcome } from '../middleware-D_WPyilQ.js';
|
|
4
4
|
import { AgentInteractionRequest, AgentInteractionResponse } from '../agent/interactions/index.js';
|
|
5
5
|
import { E as EmbeddingModel } from '../types-Cr4uiYo5.js';
|
|
6
6
|
import '../model-call-options-CZkSw_xN.js';
|
|
7
7
|
import 'zod';
|
|
8
8
|
import '../types-CqiX-4_C.js';
|
|
9
9
|
import '../retry-CjvSlKGW.js';
|
|
10
|
-
import '../types-
|
|
10
|
+
import '../types-CaAiktBl.js';
|
|
11
11
|
import '../tool-W1cAPuRF.js';
|
|
12
12
|
|
|
13
13
|
type EvalOutcomeOptions = {
|
package/dist/evals/index.js
CHANGED
|
@@ -3,6 +3,34 @@ import {
|
|
|
3
3
|
defineEvalCases,
|
|
4
4
|
defineEvalSuite
|
|
5
5
|
} from "../chunk-CX7ZVTO5.js";
|
|
6
|
+
import {
|
|
7
|
+
AgentEvalSuspensionError,
|
|
8
|
+
agentEvalTarget
|
|
9
|
+
} from "../chunk-W6V63YPY.js";
|
|
10
|
+
import {
|
|
11
|
+
EvalAssertionError,
|
|
12
|
+
assertEvalOutcomes,
|
|
13
|
+
assertEvalTotals,
|
|
14
|
+
defineEvalExpectations,
|
|
15
|
+
evalExitCode,
|
|
16
|
+
formatEvalResult,
|
|
17
|
+
printEvalResult,
|
|
18
|
+
runEvalCli
|
|
19
|
+
} from "../chunk-EF26KTFU.js";
|
|
20
|
+
import {
|
|
21
|
+
EvalFailFastError,
|
|
22
|
+
EvalReporterDispatchError,
|
|
23
|
+
runEvalSuite
|
|
24
|
+
} from "../chunk-X4XULHDO.js";
|
|
25
|
+
import {
|
|
26
|
+
defaultEvalTraceSelector,
|
|
27
|
+
projectEvalOutcome,
|
|
28
|
+
resolveEvalTraceRef
|
|
29
|
+
} from "../chunk-PHLGGRHC.js";
|
|
30
|
+
import {
|
|
31
|
+
EvalAbortError,
|
|
32
|
+
EvalTimeoutError
|
|
33
|
+
} from "../chunk-4OSA3MMA.js";
|
|
6
34
|
import {
|
|
7
35
|
defineMetric
|
|
8
36
|
} from "../chunk-F2OKLHGB.js";
|
|
@@ -19,7 +47,7 @@ import {
|
|
|
19
47
|
notContains,
|
|
20
48
|
requiredFields,
|
|
21
49
|
semanticSimilarity
|
|
22
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-ET5SCES6.js";
|
|
23
51
|
import {
|
|
24
52
|
abstention,
|
|
25
53
|
answerRelevancy,
|
|
@@ -33,51 +61,23 @@ import {
|
|
|
33
61
|
turnRelevancy
|
|
34
62
|
} from "../chunk-R4AJ2EE3.js";
|
|
35
63
|
import "../chunk-V5KBSXAJ.js";
|
|
36
|
-
import "../chunk-3P3YVJ7V.js";
|
|
37
|
-
import "../chunk-VCOGUS3Q.js";
|
|
38
64
|
import {
|
|
39
65
|
selectEvalCaseIds,
|
|
40
66
|
selectPromptOutput
|
|
41
67
|
} from "../chunk-ZPXOBQDS.js";
|
|
42
|
-
import {
|
|
43
|
-
AgentEvalSuspensionError,
|
|
44
|
-
agentEvalTarget
|
|
45
|
-
} from "../chunk-W6V63YPY.js";
|
|
46
|
-
import {
|
|
47
|
-
EvalAssertionError,
|
|
48
|
-
assertEvalOutcomes,
|
|
49
|
-
assertEvalTotals,
|
|
50
|
-
defineEvalExpectations,
|
|
51
|
-
evalExitCode,
|
|
52
|
-
formatEvalResult,
|
|
53
|
-
printEvalResult,
|
|
54
|
-
runEvalCli
|
|
55
|
-
} from "../chunk-KL652GO5.js";
|
|
56
|
-
import {
|
|
57
|
-
EvalFailFastError,
|
|
58
|
-
EvalReporterDispatchError,
|
|
59
|
-
runEvalSuite
|
|
60
|
-
} from "../chunk-KLDNHX4Z.js";
|
|
61
|
-
import {
|
|
62
|
-
defaultEvalTraceSelector,
|
|
63
|
-
projectEvalOutcome,
|
|
64
|
-
resolveEvalTraceRef
|
|
65
|
-
} from "../chunk-PHLGGRHC.js";
|
|
66
68
|
import {
|
|
67
69
|
EvalOutcome
|
|
68
70
|
} from "../chunk-EJR6VVB3.js";
|
|
69
|
-
import {
|
|
70
|
-
EvalAbortError,
|
|
71
|
-
EvalTimeoutError
|
|
72
|
-
} from "../chunk-4OSA3MMA.js";
|
|
73
71
|
import "../chunk-ZYXMWEL4.js";
|
|
72
|
+
import "../chunk-3P3YVJ7V.js";
|
|
73
|
+
import "../chunk-VCOGUS3Q.js";
|
|
74
74
|
import "../chunk-TP3MCUXS.js";
|
|
75
75
|
import "../chunk-6RQYWZI3.js";
|
|
76
76
|
import "../chunk-NF6WBPFG.js";
|
|
77
77
|
import "../chunk-ERN7P6Q4.js";
|
|
78
|
-
import "../chunk-YCTXTOOQ.js";
|
|
79
78
|
import "../chunk-DU4WA6LQ.js";
|
|
80
79
|
import "../chunk-7F53DOML.js";
|
|
80
|
+
import "../chunk-YCTXTOOQ.js";
|
|
81
81
|
import "../chunk-4FIVU53H.js";
|
|
82
82
|
import "../chunk-LGPXCJJO.js";
|
|
83
83
|
import "../chunk-57AUTEQ6.js";
|
package/dist/evals/metrics.js
CHANGED
|
@@ -11,19 +11,19 @@ import {
|
|
|
11
11
|
notContains,
|
|
12
12
|
requiredFields,
|
|
13
13
|
semanticSimilarity
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-3P3YVJ7V.js";
|
|
16
|
-
import "../chunk-VCOGUS3Q.js";
|
|
14
|
+
} from "../chunk-ET5SCES6.js";
|
|
17
15
|
import "../chunk-ZPXOBQDS.js";
|
|
18
16
|
import "../chunk-EJR6VVB3.js";
|
|
19
17
|
import "../chunk-ZYXMWEL4.js";
|
|
18
|
+
import "../chunk-3P3YVJ7V.js";
|
|
19
|
+
import "../chunk-VCOGUS3Q.js";
|
|
20
20
|
import "../chunk-TP3MCUXS.js";
|
|
21
21
|
import "../chunk-6RQYWZI3.js";
|
|
22
22
|
import "../chunk-NF6WBPFG.js";
|
|
23
23
|
import "../chunk-ERN7P6Q4.js";
|
|
24
|
-
import "../chunk-YCTXTOOQ.js";
|
|
25
24
|
import "../chunk-DU4WA6LQ.js";
|
|
26
25
|
import "../chunk-7F53DOML.js";
|
|
26
|
+
import "../chunk-YCTXTOOQ.js";
|
|
27
27
|
import "../chunk-4FIVU53H.js";
|
|
28
28
|
import "../chunk-LGPXCJJO.js";
|
|
29
29
|
import "../chunk-57AUTEQ6.js";
|
package/dist/evals/runner.js
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
EvalFailFastError,
|
|
3
3
|
EvalReporterDispatchError,
|
|
4
4
|
runEvalSuite
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-X4XULHDO.js";
|
|
6
6
|
import "../chunk-PHLGGRHC.js";
|
|
7
|
-
import "../chunk-EJR6VVB3.js";
|
|
8
7
|
import "../chunk-4OSA3MMA.js";
|
|
8
|
+
import "../chunk-EJR6VVB3.js";
|
|
9
9
|
import "../chunk-ZYXMWEL4.js";
|
|
10
10
|
import "../chunk-TP3MCUXS.js";
|
|
11
11
|
import "../chunk-6RQYWZI3.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as Agent, a as AgentContextInput, b as AgentMemory, c as AgentMemoryOptions, d as AgentOptions, e as AgentToolInput, f as AgentToolOptions, C as CreateHybridVectorContextOptions, g as CreateVectorContextOptions, V as VectorContext, h as VectorContextBaseOptions, i as createVectorContext, j as isVectorContext } from './agent-
|
|
1
|
+
export { A as Agent, a as AgentContextInput, b as AgentMemory, c as AgentMemoryOptions, d as AgentOptions, e as AgentToolInput, f as AgentToolOptions, C as CreateHybridVectorContextOptions, g as CreateVectorContextOptions, V as VectorContext, h as VectorContextBaseOptions, i as createVectorContext, j as isVectorContext } from './agent-BUEZxrEv.js';
|
|
2
2
|
export { AgentRunBlockedError, AgentRunCancelledError, AgentStreamClosedError, AgentStructuredOutputError, AgentStructuredOutputFormat, AgentStructuredOutputPhase, AgentTeam, AgentTeamEvent, AgentTeamInteraction, AgentTeamInteractionError, AgentTeamLimitError, AgentTeamLimits, AgentTeamMember, AgentTeamMemberStatus, AgentTeamMemberSummary, AgentTeamMessage, AgentTeamOptions, AgentTeamOutcome, AgentTeamRunOptions, AgentTeamSpawnRule, AgentTeamStream, AgentToolSuspensionError, MaxTurnsError } from './agent/index.js';
|
|
3
|
-
export { A as AgentBlockedOutcome, a as AgentChildStreamEvent, b as AgentDeltaEvent, c as AgentErrorEvent, d as AgentErrorStreamEvent, e as AgentFinishEvent, f as AgentInput, g as AgentInteractionOutcome, h as AgentLifecycle, i as AgentMemoryCompactionEvent, j as AgentMemoryCompactionOptions, k as AgentMiddleware, l as AgentOutcome, m as AgentPrompt, n as AgentResponse, o as AgentRunOptions, p as AgentRunSettings, q as AgentStartEvent, r as AgentSteerInput, s as AgentSteerReceipt, t as AgentStepFinishEvent, u as AgentStream, v as AgentStreamEvent, w as AgentToolCallDeltaEvent, x as AgentToolFinishEvent, y as AgentToolStartEvent, C as CompletionRequestMiddlewareArgs, z as CompletionRequestMiddlewareResult, B as CompletionResponseMiddlewareArgs, D as CompletionResponseMiddlewareResult, T as ToolInputMiddlewareArgs, E as ToolInputMiddlewareResult, F as ToolOutputMiddlewareArgs, G as ToolOutputMiddlewareResult, H as ToolResultMiddlewareArgs, I as createMiddleware } from './middleware-
|
|
3
|
+
export { A as AgentBlockedOutcome, a as AgentChildStreamEvent, b as AgentDeltaEvent, c as AgentErrorEvent, d as AgentErrorStreamEvent, e as AgentFinishEvent, f as AgentInput, g as AgentInteractionOutcome, h as AgentLifecycle, i as AgentMemoryCompactionEvent, j as AgentMemoryCompactionOptions, k as AgentMiddleware, l as AgentOutcome, m as AgentPrompt, n as AgentResponse, o as AgentRunOptions, p as AgentRunSettings, q as AgentStartEvent, r as AgentSteerInput, s as AgentSteerReceipt, t as AgentStepFinishEvent, u as AgentStream, v as AgentStreamEvent, w as AgentToolCallDeltaEvent, x as AgentToolFinishEvent, y as AgentToolStartEvent, C as CompletionRequestMiddlewareArgs, z as CompletionRequestMiddlewareResult, B as CompletionResponseMiddlewareArgs, D as CompletionResponseMiddlewareResult, T as ToolInputMiddlewareArgs, E as ToolInputMiddlewareResult, F as ToolOutputMiddlewareArgs, G as ToolOutputMiddlewareResult, H as ToolResultMiddlewareArgs, I as createMiddleware } from './middleware-D_WPyilQ.js';
|
|
4
4
|
export { M as ModelCallOptions } from './model-call-options-CZkSw_xN.js';
|
|
5
5
|
export { R as RetryContext, a as RetryOptions, b as RetrySetting } from './retry-CjvSlKGW.js';
|
|
6
6
|
export { C as COMPLETION_PROVIDER_OUTPUT_ERROR_CODE, a as CompletionBaseOptions, b as CompletionInput, c as CompletionProviderOutputError, d as CompletionProviderOutputErrorKind, e as CompletionProviderOutputErrorOptions, f as CompletionStructuredOutputError, g as CompletionStructuredOutputPhase, G as GenerateCompletionOptions, h as GenerateStructuredCompletionOptions, M as MessageMetadataSchema, R as REASONING_EFFORT_CONTROL_ID, i as ReasoningEffortControls, S as StandardJSONSchemaV1, j as StandardSchemaV1, k as StreamCompletionOptions, l as StreamStructuredCompletionOptions, m as createMessageSchema, n as defineCompletionModelControls, o as generateCompletion, p as isJsonValue, q as isMessage, r as isStandardSchema, s as messageSchema, t as messagesSchema, u as parseMessage, v as parseMessages, w as streamCompletion } from './provider-output-error-CQD0MWey.js';
|
|
@@ -9,7 +9,7 @@ export { a as allow, b as block, d as defineGuardrailPolicy, c as defineInputGua
|
|
|
9
9
|
export { G as GuardrailBoundary, a as GuardrailDecisionRecord, b as GuardrailMode, c as GuardrailPolicy, d as GuardrailPolicyInput, e as GuardrailPolicyOptions, I as InputGuardrail, f as InputGuardrailActions, g as InputGuardrailContext, O as OutputGuardrail, h as OutputGuardrailActions, i as OutputGuardrailContext } from './types-CqiX-4_C.js';
|
|
10
10
|
export { GenerateImageOptions, GeneratedImage, ImageGenerationModel, ImageGenerationRequest, ImageGenerationResult, generateImage } from './image-generation/index.js';
|
|
11
11
|
export { MemoryCompactionConflictError, MemoryCompactionError, createMemoryScopeKey, createSummaryMemoryCompactor, estimateMemoryTokens, isMemoryCompactionMessage } from './memory/index.js';
|
|
12
|
-
export { C as CreateMemoryScopeKeyOptions, a as CreateSummaryMemoryCompactorOptions, M as MemoryAppendOptions, b as MemoryClearOptions, c as MemoryCompactionCapability, d as MemoryCompactionConflictRetryOptions, e as MemoryCompactionInfo, f as MemoryCompactionMessage, g as MemoryCompactionMetadata, h as MemoryCompactionOptions, i as MemoryCompactionReplacePrefixOptions, j as MemoryCompactionReplacePrefixResult, k as MemoryCompactionResult, l as MemoryCompactionRetention, m as MemoryCompactionSnapshot, n as MemoryCompactionSnapshotOptions, o as MemoryCompactor, p as MemoryCompactorInput, q as MemoryCompactorResult, r as MemoryConversation, s as MemoryConversationGetOptions, t as MemoryConversationListOptions, u as MemoryConversationMessage, v as MemoryConversationSummary, w as MemoryErrorOptions, x as MemoryInspector, y as MemoryLoadOptions, z as MemoryOptions, A as MemorySavePolicy, B as MemoryScope, D as MemoryScopeKeyOptions, E as MemoryScopeKeyResolver, F as MemoryStore, G as MemoryTokenCounter } from './types-
|
|
12
|
+
export { C as CreateMemoryScopeKeyOptions, a as CreateSummaryMemoryCompactorOptions, M as MemoryAppendOptions, b as MemoryClearOptions, c as MemoryCompactionCapability, d as MemoryCompactionConflictRetryOptions, e as MemoryCompactionInfo, f as MemoryCompactionMessage, g as MemoryCompactionMetadata, h as MemoryCompactionOptions, i as MemoryCompactionReplacePrefixOptions, j as MemoryCompactionReplacePrefixResult, k as MemoryCompactionResult, l as MemoryCompactionRetention, m as MemoryCompactionSnapshot, n as MemoryCompactionSnapshotOptions, o as MemoryCompactor, p as MemoryCompactorInput, q as MemoryCompactorResult, r as MemoryConversation, s as MemoryConversationGetOptions, t as MemoryConversationListOptions, u as MemoryConversationMessage, v as MemoryConversationSummary, w as MemoryErrorOptions, x as MemoryInspector, y as MemoryLoadOptions, z as MemoryOptions, A as MemorySavePolicy, B as MemoryScope, D as MemoryScopeKeyOptions, E as MemoryScopeKeyResolver, F as MemoryStore, G as MemoryTokenCounter } from './types-CaAiktBl.js';
|
|
13
13
|
export { Z as ZodSchema } from './zod-schema-C7F4clpm.js';
|
|
14
14
|
export { loadSkills, skill } from './skills/index.js';
|
|
15
15
|
export { S as SkillValidationError } from './types-CIG2loIE.js';
|
|
@@ -17,7 +17,7 @@ export { GenerateSpeechOptions, SpeechGenerationModel, SpeechGenerationRequest,
|
|
|
17
17
|
export { C as CreateToolOptions, c as createQuestionTool, a as createThinkTool, b as createTool } from './think-tool-DJbtUDZm.js';
|
|
18
18
|
export { A as AnyTool, T as Tool, a as ToolApprovalContext, b as ToolApprovalRequirement, c as ToolCallContext, d as ToolCallStreamEvent, e as ToolRequiresApproval } from './tool-W1cAPuRF.js';
|
|
19
19
|
export { TranscribeOptions, TranscriptionAudio, TranscriptionModel, TranscriptionRequest, TranscriptionResult, transcribe } from './transcription/index.js';
|
|
20
|
-
export { CheckAnswer, CheckQuestion, ChoiceAnswer, ChoiceQuestion, DecideBatchOptions, DecideOptions, DecisionAnswerFor, DecisionAnswers, DecisionBatchItem, DecisionBatchResult, DecisionCapabilities, DecisionCapabilityError, DecisionModel, DecisionOptions, DecisionProviderOutputError, DecisionQuestion, DecisionQuestionType, DecisionQuestions, DecisionRawResponseOf, DecisionRequest, DecisionResult, DecisionRubric, MultiLabelAnswer, MultiLabelQuestion, ScoreAnswer, ScoreQuestion, check, choice, decide, decideBatch, multiLabel, score } from './decision/index.js';
|
|
20
|
+
export { CheckAnswer, CheckQuestion, ChoiceAnswer, ChoiceQuestion, DecideBatchOptions, DecideOptions, DecisionAnswerFor, DecisionAnswers, DecisionBatchItem, DecisionBatchResult, DecisionCapabilities, DecisionCapabilityError, DecisionModel, DecisionOptions, DecisionProviderOutputError, DecisionQuestion, DecisionQuestionType, DecisionQuestions, DecisionRawResponseOf, DecisionRefusalError, DecisionRequest, DecisionResult, DecisionRubric, MultiLabelAnswer, MultiLabelQuestion, ScoreAnswer, ScoreQuestion, check, choice, decide, decideBatch, multiLabel, score } from './decision/index.js';
|
|
21
21
|
import './types-94Q2mPRa.js';
|
|
22
22
|
import './agent/interactions/index.js';
|
|
23
23
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -21,12 +21,12 @@ import {
|
|
|
21
21
|
generateSpeech
|
|
22
22
|
} from "./chunk-SYULMZGL.js";
|
|
23
23
|
import "./chunk-NMPDZTBM.js";
|
|
24
|
-
import "./chunk-V4OZ7ISA.js";
|
|
25
24
|
import "./chunk-4ITAV7YA.js";
|
|
26
25
|
import {
|
|
27
26
|
createMemoryScopeKey
|
|
28
27
|
} from "./chunk-2XSMGVBG.js";
|
|
29
28
|
import "./chunk-GDJNOZ47.js";
|
|
29
|
+
import "./chunk-V4OZ7ISA.js";
|
|
30
30
|
import "./chunk-RA4YVN43.js";
|
|
31
31
|
import "./chunk-4UUIGAIX.js";
|
|
32
32
|
import {
|
|
@@ -38,24 +38,25 @@ import {
|
|
|
38
38
|
choice,
|
|
39
39
|
multiLabel,
|
|
40
40
|
score
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-PFSWAJTY.js";
|
|
42
42
|
import "./chunk-F2UVTXNE.js";
|
|
43
43
|
import {
|
|
44
44
|
decide,
|
|
45
45
|
decideBatch
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
46
|
+
} from "./chunk-WGUE44ZD.js";
|
|
47
|
+
import "./chunk-BH7RLRLQ.js";
|
|
48
|
+
import "./chunk-547CQSO2.js";
|
|
49
49
|
import {
|
|
50
50
|
DecisionCapabilityError,
|
|
51
|
-
DecisionProviderOutputError
|
|
52
|
-
|
|
51
|
+
DecisionProviderOutputError,
|
|
52
|
+
DecisionRefusalError
|
|
53
|
+
} from "./chunk-Y4Q66NQY.js";
|
|
53
54
|
import "./chunk-53TPAXYR.js";
|
|
54
55
|
import {
|
|
55
56
|
AgentTeam
|
|
56
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-LQFBCC74.js";
|
|
57
58
|
import "./chunk-X6WS3XWL.js";
|
|
58
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-G4ZKCVBW.js";
|
|
59
60
|
import "./chunk-PIMD4DYG.js";
|
|
60
61
|
import "./chunk-FSBDE6RF.js";
|
|
61
62
|
import "./chunk-3TAQXJBC.js";
|
|
@@ -64,20 +65,21 @@ import {
|
|
|
64
65
|
AgentTeamInteractionError,
|
|
65
66
|
AgentTeamLimitError
|
|
66
67
|
} from "./chunk-ENZ2XX27.js";
|
|
67
|
-
import "./chunk-
|
|
68
|
+
import "./chunk-G7NJDOT5.js";
|
|
68
69
|
import {
|
|
69
70
|
Agent
|
|
70
|
-
} from "./chunk-
|
|
71
|
-
import "./chunk-
|
|
71
|
+
} from "./chunk-J6O567TG.js";
|
|
72
|
+
import "./chunk-SISGNHNO.js";
|
|
73
|
+
import "./chunk-SXE4J43E.js";
|
|
72
74
|
import "./chunk-DRSKZVC6.js";
|
|
73
75
|
import "./chunk-LAIATEUB.js";
|
|
74
|
-
import "./chunk-
|
|
76
|
+
import "./chunk-PLQAN4EO.js";
|
|
77
|
+
import "./chunk-M7LU47T5.js";
|
|
75
78
|
import "./chunk-PFJN5OIQ.js";
|
|
76
79
|
import "./chunk-7FBSGD6E.js";
|
|
77
80
|
import "./chunk-NPJ2T3L5.js";
|
|
78
81
|
import "./chunk-YWRXOPHC.js";
|
|
79
|
-
import "./chunk-
|
|
80
|
-
import "./chunk-5I2NVRHC.js";
|
|
82
|
+
import "./chunk-5ZM5DB3O.js";
|
|
81
83
|
import "./chunk-5IURMWFN.js";
|
|
82
84
|
import "./chunk-2NLINXRF.js";
|
|
83
85
|
import "./chunk-JMJFK3A4.js";
|
|
@@ -116,10 +118,10 @@ import "./chunk-NF6WBPFG.js";
|
|
|
116
118
|
import "./chunk-LBYJPMHC.js";
|
|
117
119
|
import "./chunk-KFAVEL5F.js";
|
|
118
120
|
import "./chunk-GLMYZ6OA.js";
|
|
119
|
-
import "./chunk-
|
|
121
|
+
import "./chunk-MNWULFRX.js";
|
|
120
122
|
import {
|
|
121
123
|
estimateMemoryTokens
|
|
122
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-SVFEG2TI.js";
|
|
123
125
|
import "./chunk-ZPJFXRQZ.js";
|
|
124
126
|
import "./chunk-MEN4AFDZ.js";
|
|
125
127
|
import "./chunk-VZ5ZZBNX.js";
|
|
@@ -146,12 +148,12 @@ import "./chunk-PJNE75WC.js";
|
|
|
146
148
|
import "./chunk-PLDJCCVL.js";
|
|
147
149
|
import "./chunk-3J2CSVPR.js";
|
|
148
150
|
import "./chunk-ERN7P6Q4.js";
|
|
149
|
-
import "./chunk-YCTXTOOQ.js";
|
|
150
151
|
import "./chunk-DU4WA6LQ.js";
|
|
152
|
+
import "./chunk-7F53DOML.js";
|
|
153
|
+
import "./chunk-YCTXTOOQ.js";
|
|
151
154
|
import "./chunk-KO5NMTAM.js";
|
|
152
155
|
import "./chunk-TFIOU6UR.js";
|
|
153
156
|
import "./chunk-GPVXCY5I.js";
|
|
154
|
-
import "./chunk-7F53DOML.js";
|
|
155
157
|
import "./chunk-4FIVU53H.js";
|
|
156
158
|
import "./chunk-NVALGVQG.js";
|
|
157
159
|
import {
|
|
@@ -230,6 +232,7 @@ export {
|
|
|
230
232
|
CompletionStructuredOutputError,
|
|
231
233
|
DecisionCapabilityError,
|
|
232
234
|
DecisionProviderOutputError,
|
|
235
|
+
DecisionRefusalError,
|
|
233
236
|
MaxTurnsError,
|
|
234
237
|
MemoryCompactionConflictError,
|
|
235
238
|
MemoryCompactionError,
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentRun
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-SISGNHNO.js";
|
|
4
|
+
import "../../chunk-SXE4J43E.js";
|
|
4
5
|
import "../../chunk-DRSKZVC6.js";
|
|
5
6
|
import "../../chunk-LAIATEUB.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-PLQAN4EO.js";
|
|
8
|
+
import "../../chunk-M7LU47T5.js";
|
|
7
9
|
import "../../chunk-PFJN5OIQ.js";
|
|
8
10
|
import "../../chunk-7FBSGD6E.js";
|
|
9
11
|
import "../../chunk-NPJ2T3L5.js";
|
|
10
12
|
import "../../chunk-YWRXOPHC.js";
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-5I2NVRHC.js";
|
|
13
|
+
import "../../chunk-5ZM5DB3O.js";
|
|
13
14
|
import "../../chunk-5IURMWFN.js";
|
|
14
15
|
import "../../chunk-2NLINXRF.js";
|
|
15
16
|
import "../../chunk-JMJFK3A4.js";
|
|
@@ -32,6 +33,7 @@ import "../../chunk-NF6WBPFG.js";
|
|
|
32
33
|
import "../../chunk-LBYJPMHC.js";
|
|
33
34
|
import "../../chunk-KFAVEL5F.js";
|
|
34
35
|
import "../../chunk-GLMYZ6OA.js";
|
|
36
|
+
import "../../chunk-SVFEG2TI.js";
|
|
35
37
|
import "../../chunk-ZPJFXRQZ.js";
|
|
36
38
|
import "../../chunk-MEN4AFDZ.js";
|
|
37
39
|
import "../../chunk-VZ5ZZBNX.js";
|
|
@@ -49,12 +51,12 @@ import "../../chunk-PJNE75WC.js";
|
|
|
49
51
|
import "../../chunk-PLDJCCVL.js";
|
|
50
52
|
import "../../chunk-3J2CSVPR.js";
|
|
51
53
|
import "../../chunk-ERN7P6Q4.js";
|
|
52
|
-
import "../../chunk-YCTXTOOQ.js";
|
|
53
54
|
import "../../chunk-DU4WA6LQ.js";
|
|
55
|
+
import "../../chunk-7F53DOML.js";
|
|
56
|
+
import "../../chunk-YCTXTOOQ.js";
|
|
54
57
|
import "../../chunk-KO5NMTAM.js";
|
|
55
58
|
import "../../chunk-TFIOU6UR.js";
|
|
56
59
|
import "../../chunk-GPVXCY5I.js";
|
|
57
|
-
import "../../chunk-7F53DOML.js";
|
|
58
60
|
import "../../chunk-4FIVU53H.js";
|
|
59
61
|
import "../../chunk-ZHC5CD6J.js";
|
|
60
62
|
import "../../chunk-5V533R7F.js";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
finishLoopContext,
|
|
3
|
+
planLoopContext,
|
|
4
|
+
projectLoopContext,
|
|
5
|
+
summarizeLoopContext
|
|
6
|
+
} from "../../chunk-M7LU47T5.js";
|
|
7
|
+
import "../../chunk-5CKB7RQY.js";
|
|
8
|
+
import "../../chunk-LQJ4KHMY.js";
|
|
9
|
+
import "../../chunk-TP3MCUXS.js";
|
|
10
|
+
import "../../chunk-6RQYWZI3.js";
|
|
11
|
+
import "../../chunk-NF6WBPFG.js";
|
|
12
|
+
import "../../chunk-SVFEG2TI.js";
|
|
13
|
+
import "../../chunk-ZPJFXRQZ.js";
|
|
14
|
+
import "../../chunk-LGPXCJJO.js";
|
|
15
|
+
import "../../chunk-57AUTEQ6.js";
|
|
16
|
+
import "../../chunk-6OO5C5GW.js";
|
|
17
|
+
import "../../chunk-GSVOMQEE.js";
|
|
18
|
+
import "../../chunk-4ONUNWGC.js";
|
|
19
|
+
import "../../chunk-MIPBH5S7.js";
|
|
20
|
+
import "../../chunk-XQV3XNVT.js";
|
|
21
|
+
import "../../chunk-HJ6KTQTZ.js";
|
|
22
|
+
import "../../chunk-BONQTXRQ.js";
|
|
23
|
+
import "../../chunk-4C7AXYOM.js";
|
|
24
|
+
import "../../chunk-SQAAVYJG.js";
|
|
25
|
+
import "../../chunk-POXHJF3H.js";
|
|
26
|
+
import "../../chunk-USRKPEQN.js";
|
|
27
|
+
export {
|
|
28
|
+
finishLoopContext,
|
|
29
|
+
planLoopContext,
|
|
30
|
+
projectLoopContext,
|
|
31
|
+
summarizeLoopContext
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=loop-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentRunMemory
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-PLQAN4EO.js";
|
|
4
|
+
import "../../chunk-M7LU47T5.js";
|
|
4
5
|
import "../../chunk-5CKB7RQY.js";
|
|
5
6
|
import "../../chunk-LQJ4KHMY.js";
|
|
6
7
|
import "../../chunk-TP3MCUXS.js";
|
|
7
8
|
import "../../chunk-6RQYWZI3.js";
|
|
8
9
|
import "../../chunk-NF6WBPFG.js";
|
|
10
|
+
import "../../chunk-SVFEG2TI.js";
|
|
9
11
|
import "../../chunk-ZPJFXRQZ.js";
|
|
10
12
|
import "../../chunk-LGPXCJJO.js";
|
|
11
13
|
import "../../chunk-57AUTEQ6.js";
|
|
@@ -9,12 +9,12 @@ import "../../chunk-ESOFEAYK.js";
|
|
|
9
9
|
import "../../chunk-CB2L2NIQ.js";
|
|
10
10
|
import "../../chunk-5WLIHNNJ.js";
|
|
11
11
|
import "../../chunk-ERN7P6Q4.js";
|
|
12
|
-
import "../../chunk-YCTXTOOQ.js";
|
|
13
12
|
import "../../chunk-DU4WA6LQ.js";
|
|
13
|
+
import "../../chunk-7F53DOML.js";
|
|
14
|
+
import "../../chunk-YCTXTOOQ.js";
|
|
14
15
|
import "../../chunk-KO5NMTAM.js";
|
|
15
16
|
import "../../chunk-TFIOU6UR.js";
|
|
16
17
|
import "../../chunk-GPVXCY5I.js";
|
|
17
|
-
import "../../chunk-7F53DOML.js";
|
|
18
18
|
import "../../chunk-4FIVU53H.js";
|
|
19
19
|
import "../../chunk-ZHC5CD6J.js";
|
|
20
20
|
import "../../chunk-5V533R7F.js";
|
|
@@ -25,12 +25,12 @@ import "../../chunk-PJNE75WC.js";
|
|
|
25
25
|
import "../../chunk-PLDJCCVL.js";
|
|
26
26
|
import "../../chunk-3J2CSVPR.js";
|
|
27
27
|
import "../../chunk-ERN7P6Q4.js";
|
|
28
|
-
import "../../chunk-YCTXTOOQ.js";
|
|
29
28
|
import "../../chunk-DU4WA6LQ.js";
|
|
29
|
+
import "../../chunk-7F53DOML.js";
|
|
30
|
+
import "../../chunk-YCTXTOOQ.js";
|
|
30
31
|
import "../../chunk-KO5NMTAM.js";
|
|
31
32
|
import "../../chunk-TFIOU6UR.js";
|
|
32
33
|
import "../../chunk-GPVXCY5I.js";
|
|
33
|
-
import "../../chunk-7F53DOML.js";
|
|
34
34
|
import "../../chunk-4FIVU53H.js";
|
|
35
35
|
import "../../chunk-5V533R7F.js";
|
|
36
36
|
import "../../chunk-LGPXCJJO.js";
|
package/dist/internal/agent.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { R as ResolvedAgentOptions, A as Agent } from '../agent-
|
|
2
|
-
import { d as CompletionModel, P as ProviderTool,
|
|
1
|
+
import { R as ResolvedAgentOptions, A as Agent } from '../agent-BUEZxrEv.js';
|
|
2
|
+
import { d as CompletionModel, P as ProviderTool, M as Message, U as Usage, k as CompletionResponse, j as CompletionRequest, y as ToolCallPart, G as ToolResultContentPart } from '../types-DYqZKDA8.js';
|
|
3
3
|
import { T as ToolIndex } from '../dynamic-tools-B3OjYyhC.js';
|
|
4
4
|
import { A as AnyTool, c as ToolCallContext, N as NormalizedToolOutput } from '../tool-W1cAPuRF.js';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { e as MemoryCompactionInfo, G as MemoryTokenCounter, o as MemoryCompactor, B as MemoryScope } from '../types-CaAiktBl.js';
|
|
6
|
+
import { v as AgentStreamEvent } from '../middleware-D_WPyilQ.js';
|
|
7
7
|
import '../retry-CjvSlKGW.js';
|
|
8
8
|
import '../types-CqiX-4_C.js';
|
|
9
9
|
import '../types-94Q2mPRa.js';
|
|
@@ -26,8 +26,46 @@ type AgentToolState = {
|
|
|
26
26
|
};
|
|
27
27
|
declare function getAgentToolState(agent: object): AgentToolState;
|
|
28
28
|
|
|
29
|
+
/** Indexes refer to the unchanged input transcript of this execution segment. */
|
|
30
|
+
type LoopContextCheckpoint = {
|
|
31
|
+
summary: string;
|
|
32
|
+
coveredMessages: number;
|
|
33
|
+
compactedMessageCount: number;
|
|
34
|
+
};
|
|
35
|
+
type PreparedLoopContext = {
|
|
36
|
+
messages: Message[];
|
|
37
|
+
checkpoint?: LoopContextCheckpoint | undefined;
|
|
38
|
+
compaction?: MemoryCompactionInfo | undefined;
|
|
39
|
+
};
|
|
40
|
+
type LoopContextPlan = {
|
|
41
|
+
messages: Message[];
|
|
42
|
+
prefix: Message[];
|
|
43
|
+
coveredMessages: number;
|
|
44
|
+
compactedMessageCount: number;
|
|
45
|
+
originalMessageCount: number;
|
|
46
|
+
originalTokenCount: number;
|
|
47
|
+
compactedTokenCount: number;
|
|
48
|
+
retainedTokenCount: number;
|
|
49
|
+
};
|
|
50
|
+
declare function projectLoopContext(messages: readonly Message[], checkpoint?: LoopContextCheckpoint): Message[];
|
|
51
|
+
/** Select only complete exchanges; parallel tool calls must all have results before a cut. */
|
|
52
|
+
declare function planLoopContext(messages: readonly Message[], checkpoint: LoopContextCheckpoint | undefined, options: {
|
|
53
|
+
afterTokens: number;
|
|
54
|
+
recentToolTurns?: number | undefined;
|
|
55
|
+
tokenCounter?: MemoryTokenCounter | undefined;
|
|
56
|
+
}, signal?: AbortSignal): Promise<LoopContextPlan | undefined>;
|
|
57
|
+
/** Validation is inside the summarizer boundary so durable retry budgets cover invalid results. */
|
|
58
|
+
declare function summarizeLoopContext(plan: LoopContextPlan, compactor: MemoryCompactor, scope: MemoryScope, signal?: AbortSignal): Promise<{
|
|
59
|
+
summary: string;
|
|
60
|
+
usage: Usage;
|
|
61
|
+
}>;
|
|
62
|
+
declare function finishLoopContext(plan: LoopContextPlan, result: {
|
|
63
|
+
summary: string;
|
|
64
|
+
usage: Usage;
|
|
65
|
+
}, counter?: MemoryTokenCounter, signal?: AbortSignal, attempts?: number): Promise<PreparedLoopContext>;
|
|
66
|
+
|
|
29
67
|
/** Runtime capability marker: older core versions must fail before accepting durable work. */
|
|
30
|
-
declare const AGENT_RUN_EXECUTION_VERSION =
|
|
68
|
+
declare const AGENT_RUN_EXECUTION_VERSION = 3;
|
|
31
69
|
/** Normalized generation progress; never includes raw provider responses. */
|
|
32
70
|
type AgentCompletionStreamEvent = Extract<AgentStreamEvent<unknown, unknown>, {
|
|
33
71
|
type: "text_delta" | "reasoning_delta" | "tool_call_delta" | "tool_call" | "source" | "provider_tool_call";
|
|
@@ -43,6 +81,8 @@ type AgentToolExecutionResult = {
|
|
|
43
81
|
};
|
|
44
82
|
/** Internal persistence boundary used by execution runtimes. Callbacks own external effects. */
|
|
45
83
|
interface AgentRunExecution {
|
|
84
|
+
/** Persist the context selected before each model call, including skipped compaction decisions. */
|
|
85
|
+
prepareMessages?(turn: number, messages: readonly Message[], checkpoint?: LoopContextCheckpoint): Promise<PreparedLoopContext>;
|
|
46
86
|
completion(turn: number, request: CompletionRequest, execute: () => Promise<CompletionResponse>): Promise<CompletionResponse>;
|
|
47
87
|
streamCompletion?(turn: number, request: CompletionRequest, execute: () => AgentCompletionStream): AgentCompletionStream;
|
|
48
88
|
tool(call: {
|
|
@@ -214,4 +254,4 @@ type InternalAgentRunOptions = {
|
|
|
214
254
|
};
|
|
215
255
|
declare function withInternalAgentRunOptions<T extends object>(options: T, internal: InternalAgentRunOptions): T;
|
|
216
256
|
|
|
217
|
-
export { AGENT_RUN_EXECUTION_VERSION, Agent, type AgentCompletionStream, type AgentCompletionStreamEvent, type AgentHook, type AgentRunExecution, type AgentToolExecutionResult, type InternalAgentRunOptions, ResolvedAgentOptions, createHook, createResolvedAgent, getAgentToolState, getResolvedAgentOptions, withInternalAgentRunOptions };
|
|
257
|
+
export { AGENT_RUN_EXECUTION_VERSION, Agent, type AgentCompletionStream, type AgentCompletionStreamEvent, type AgentHook, type AgentRunExecution, type AgentToolExecutionResult, type InternalAgentRunOptions, type LoopContextCheckpoint, type PreparedLoopContext, ResolvedAgentOptions, createHook, createResolvedAgent, finishLoopContext, getAgentToolState, getResolvedAgentOptions, planLoopContext, projectLoopContext, summarizeLoopContext, withInternalAgentRunOptions };
|