tnega 0.3.0 → 0.4.1
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 +3 -3
- package/dist/agent.js +2207 -513
- package/dist/agent.js.map +4 -4
- package/dist/bin.js +942 -469
- package/dist/bin.js.map +3 -3
- package/dist/cli-runtime.js +943 -469
- package/dist/cli-runtime.js.map +3 -3
- package/dist/coding-agent.js +1623 -162
- package/dist/coding-agent.js.map +4 -4
- package/dist/eval.js +422 -158
- package/dist/eval.js.map +3 -3
- package/dist/evolve.js +512 -326
- package/dist/evolve.js.map +4 -4
- package/dist/index.js +951 -469
- package/dist/index.js.map +3 -3
- package/dist/llm.js +47 -3
- package/dist/llm.js.map +3 -3
- package/dist/session.js +91 -5
- package/dist/session.js.map +2 -2
- package/dist/types/packages/agent/src/inbox-durable.d.ts +5 -0
- package/dist/types/packages/agent/src/live.d.ts +24 -8
- package/dist/types/packages/agent/src/service.d.ts +8 -2
- package/dist/types/packages/agent/src/types.d.ts +40 -2
- package/dist/types/packages/cli/src/config.d.ts +2 -0
- package/dist/types/packages/cli/src/index.d.ts +1 -0
- package/dist/types/packages/llm/src/types.d.ts +2 -0
- package/dist/types/packages/session/src/index.d.ts +68 -7
- package/dist/types/packages/session/src/invariant.d.ts +2 -0
- package/dist/types/src/index.d.ts +2 -2
- package/dist/web/assets/{index-45pokiBH.js → index-Bq0i29_u.js} +30 -30
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CancelCause, ContextUsage, ModelMessage } from "../../session/src/index.js";
|
|
1
|
+
import type { AssistantStreamChunk, CancelCause, ContextUsage, ModelMessage } from "../../session/src/index.js";
|
|
2
2
|
import type { ToolDefinition, ToolResult } from "../../tools/src/index.js";
|
|
3
3
|
export type AgentCancelCause = CancelCause;
|
|
4
4
|
export type AgentFinishReason = 'stop' | 'tool_calls' | 'length' | 'max_turns' | 'max_steps' | 'error' | 'cancelled';
|
|
@@ -18,6 +18,8 @@ export interface CompleteOptions {
|
|
|
18
18
|
provider?: string;
|
|
19
19
|
model?: string;
|
|
20
20
|
temperature?: number;
|
|
21
|
+
/** Capacity of the final model route, for durable request diagnostics. */
|
|
22
|
+
contextWindow?: number;
|
|
21
23
|
}
|
|
22
24
|
export interface LLMMessageStartEvent {
|
|
23
25
|
type: 'message_start';
|
|
@@ -83,7 +85,11 @@ export interface AgentRunOptions {
|
|
|
83
85
|
maxSteps?: number;
|
|
84
86
|
signal?: AbortSignal;
|
|
85
87
|
contextBudget?: AgentContextBudget;
|
|
88
|
+
/** Reuse a durable turn opened by the live inbox driver. */
|
|
89
|
+
turn?: number;
|
|
86
90
|
}
|
|
91
|
+
/** Pulls inputs admitted at a live agent's next-step boundary. */
|
|
92
|
+
export type AgentNextStepClaimer = () => Promise<readonly AgentInput[]>;
|
|
87
93
|
export interface AgentContextBudget {
|
|
88
94
|
limit?: number;
|
|
89
95
|
compactRatio?: number;
|
|
@@ -128,6 +134,10 @@ export interface AgentPreStepEvent {
|
|
|
128
134
|
/** Cancellation signal for the current turn. */
|
|
129
135
|
signal?: AbortSignal;
|
|
130
136
|
messages: ModelMessage[];
|
|
137
|
+
/** Newly claimed user messages for this proposed step, excluding history. */
|
|
138
|
+
claimedMessages: ModelMessage[];
|
|
139
|
+
/** Admit this proposed step, or end the turn before a model request. */
|
|
140
|
+
admission?: 'enter' | 'reject';
|
|
131
141
|
/** Begin a distinct model-message series before this step's admitted messages. */
|
|
132
142
|
startsRequestSeries?: boolean;
|
|
133
143
|
}
|
|
@@ -211,5 +221,33 @@ export interface AgentRunEndEvent {
|
|
|
211
221
|
type: 'run/end';
|
|
212
222
|
run: AgentRunResult;
|
|
213
223
|
}
|
|
214
|
-
|
|
224
|
+
/** Transient identity and ordering, scoped to the Agent service lifecycle. */
|
|
225
|
+
export type AssistantStreamFrame = {
|
|
226
|
+
attemptId: string;
|
|
227
|
+
revision: number;
|
|
228
|
+
} & ({
|
|
229
|
+
type: 'start';
|
|
230
|
+
turn: number;
|
|
231
|
+
step: number;
|
|
232
|
+
} | {
|
|
233
|
+
type: 'chunk';
|
|
234
|
+
index: number;
|
|
235
|
+
time: number;
|
|
236
|
+
chunk: AssistantStreamChunk;
|
|
237
|
+
} | {
|
|
238
|
+
type: 'end';
|
|
239
|
+
index: number;
|
|
240
|
+
outcome: {
|
|
241
|
+
kind: 'committed';
|
|
242
|
+
eventType: 'assistant/message' | 'assistant/attempt';
|
|
243
|
+
seq: number;
|
|
244
|
+
} | {
|
|
245
|
+
kind: 'abandoned';
|
|
246
|
+
};
|
|
247
|
+
});
|
|
248
|
+
export interface AgentAssistantStreamEvent {
|
|
249
|
+
type: 'assistant/stream';
|
|
250
|
+
frame: AssistantStreamFrame;
|
|
251
|
+
}
|
|
252
|
+
export type AgentStreamEvent = LLMStreamEvent | AgentAssistantStreamEvent | AgentToolStartEvent | AgentToolEndEvent | AgentRunEndEvent;
|
|
215
253
|
export type AgentLoop = (input?: AgentInput, options?: AgentRunOptions) => Promise<AgentRunResult>;
|
|
@@ -8,6 +8,7 @@ export interface SystemConfig {
|
|
|
8
8
|
baseUrl?: string;
|
|
9
9
|
model?: string;
|
|
10
10
|
protocol?: 'anthropic' | 'openai';
|
|
11
|
+
apiKeyHeader?: 'x-api-key' | 'api-key';
|
|
11
12
|
temperature?: number;
|
|
12
13
|
workspaces?: string[];
|
|
13
14
|
}
|
|
@@ -16,6 +17,7 @@ export interface EffectiveLlmConfig {
|
|
|
16
17
|
baseUrl: string;
|
|
17
18
|
model: string;
|
|
18
19
|
protocol?: 'anthropic' | 'openai';
|
|
20
|
+
apiKeyHeader?: 'x-api-key' | 'api-key';
|
|
19
21
|
temperature?: number;
|
|
20
22
|
}
|
|
21
23
|
export declare function systemConfigPath(): string;
|
|
@@ -4,6 +4,7 @@ export * from './profile-file.js';
|
|
|
4
4
|
export type { AgentRuntime, AgentRuntimeOptions, EvolveFileConfig, ImportBenchmarkCommandOptions, LlmEnvConfig, RunAgentCommandOptions, RunAgentCommandResult, RunEvolveCommandOptions, RunEvolveCommandResult, TasksFile, } from './commands.js';
|
|
5
5
|
export { CliError, compareCommand, createAgentRuntime, formatAgentRun, formatBenchmarkImport, formatCompare, formatEvolveResult, formatRun, importBenchmarkCommand, loadTasksFile, resolveLlmEnv, runAgentCommand, runCommand, runEvolveCommand, } from './commands.js';
|
|
6
6
|
export { parseYaml } from './yaml.js';
|
|
7
|
+
export { effectiveApiKey } from './config.js';
|
|
7
8
|
export type { CompareResult, EvalRun };
|
|
8
9
|
export declare function main(argv: readonly string[]): Promise<number>;
|
|
9
10
|
export declare const name = "index.js";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export interface LlmConfig {
|
|
2
2
|
apiKey?: string;
|
|
3
|
+
/** Header used for API-key authentication with Anthropic-compatible providers. */
|
|
4
|
+
apiKeyHeader?: 'x-api-key' | 'api-key';
|
|
3
5
|
baseUrl?: string;
|
|
4
6
|
model?: string;
|
|
5
7
|
/** Force the wire protocol instead of inferring it from the model catalog. */
|
|
@@ -15,9 +15,17 @@ import { type SessionInvariantFailure } from './invariant.js';
|
|
|
15
15
|
* its own `toolCalls` (the assistant turn is not reassembled from separate
|
|
16
16
|
* `tool/call` events at projection time).
|
|
17
17
|
*
|
|
18
|
-
*
|
|
18
|
+
* v10 extends the all-queue splice with explicit prefix delete counts, so a
|
|
19
|
+
* mixed next-step/next-turn claim commits as one fact. v9 and older logs are
|
|
20
|
+
* rejected without in-place migration.
|
|
21
|
+
*
|
|
22
|
+
* v9 adds an atomic `agent/inbox/spliced` clear target for both pending inbox
|
|
23
|
+
* queues, so cancellation cannot durably remove only one queue.
|
|
24
|
+
*
|
|
25
|
+
* v8 adds terminal, log-only `assistant/attempt` records for attempts without
|
|
26
|
+
* a surface message. Stream chunks are normalized before entering Session.
|
|
19
27
|
*/
|
|
20
|
-
export declare const SESSION_FORMAT_VERSION =
|
|
28
|
+
export declare const SESSION_FORMAT_VERSION = 10;
|
|
21
29
|
/** Serialized tool schema, structurally compatible with @tnega/tools ToolSchema. */
|
|
22
30
|
export interface ToolSchemaSnapshot {
|
|
23
31
|
name: string;
|
|
@@ -57,6 +65,8 @@ export interface UserMessagePayload {
|
|
|
57
65
|
}
|
|
58
66
|
export interface AssistantMessagePayload {
|
|
59
67
|
content: string;
|
|
68
|
+
/** Committed normalized stream for reconnect consumers; not model history. */
|
|
69
|
+
stream?: AssistantStreamRecord[];
|
|
60
70
|
name?: string;
|
|
61
71
|
parentId?: string;
|
|
62
72
|
interrupted?: boolean;
|
|
@@ -73,6 +83,47 @@ export interface AssistantChunkPayload {
|
|
|
73
83
|
content: string;
|
|
74
84
|
index?: number;
|
|
75
85
|
}
|
|
86
|
+
/** Session-owned normalized model output; never a provider wire payload. */
|
|
87
|
+
export type AssistantStreamChunk = {
|
|
88
|
+
type: 'message_start';
|
|
89
|
+
id: string;
|
|
90
|
+
model?: string;
|
|
91
|
+
} | {
|
|
92
|
+
type: 'message_delta';
|
|
93
|
+
id: string;
|
|
94
|
+
delta: string;
|
|
95
|
+
} | {
|
|
96
|
+
type: 'toolcall_start';
|
|
97
|
+
id: string;
|
|
98
|
+
index: number;
|
|
99
|
+
name: string;
|
|
100
|
+
} | {
|
|
101
|
+
type: 'toolcall_end';
|
|
102
|
+
id: string;
|
|
103
|
+
index: number;
|
|
104
|
+
name: string;
|
|
105
|
+
arguments: unknown;
|
|
106
|
+
} | {
|
|
107
|
+
type: 'message_stop';
|
|
108
|
+
id: string;
|
|
109
|
+
finishReason: AssistantStreamFinishReason;
|
|
110
|
+
} | {
|
|
111
|
+
type: 'stream_error';
|
|
112
|
+
error: ToolResultErrorPayload;
|
|
113
|
+
};
|
|
114
|
+
export type AssistantStreamFinishReason = 'stop' | 'tool_calls' | 'length' | 'max_turns' | 'max_steps' | 'error' | 'cancelled';
|
|
115
|
+
/** One delivered chunk with its timestamp; array order preserves delivery order. */
|
|
116
|
+
export interface AssistantStreamRecord {
|
|
117
|
+
time: number;
|
|
118
|
+
chunk: AssistantStreamChunk;
|
|
119
|
+
}
|
|
120
|
+
/** Terminal settlement of an attempt that committed no assistant/message. */
|
|
121
|
+
export interface AssistantAttemptPayload {
|
|
122
|
+
turn: number;
|
|
123
|
+
step: number;
|
|
124
|
+
/** May be empty when the request fails before delivering any chunks. */
|
|
125
|
+
stream: AssistantStreamRecord[];
|
|
126
|
+
}
|
|
76
127
|
export interface SystemMessagePayload {
|
|
77
128
|
content: string;
|
|
78
129
|
name?: string;
|
|
@@ -242,7 +293,14 @@ export interface PlanPayload {
|
|
|
242
293
|
status?: 'pending' | 'running' | 'done' | 'failed';
|
|
243
294
|
summary?: string;
|
|
244
295
|
}
|
|
245
|
-
export
|
|
296
|
+
export type InboxSplicePayload = {
|
|
297
|
+
target: 'all';
|
|
298
|
+
/** Prefix removals from both queues; omitted means clear both queues. */
|
|
299
|
+
deleteCounts?: {
|
|
300
|
+
nextTurn: number;
|
|
301
|
+
nextStep: number;
|
|
302
|
+
};
|
|
303
|
+
} | {
|
|
246
304
|
target: 'next-turn' | 'next-step';
|
|
247
305
|
index?: number;
|
|
248
306
|
deleteCount?: number;
|
|
@@ -253,7 +311,7 @@ export interface InboxSplicePayload {
|
|
|
253
311
|
payload?: unknown;
|
|
254
312
|
mode?: 'followup' | 'steer';
|
|
255
313
|
}>;
|
|
256
|
-
}
|
|
314
|
+
};
|
|
257
315
|
/** A durable change to session display metadata (title, mode, agentType). */
|
|
258
316
|
export interface MetaPatchPayload {
|
|
259
317
|
/** Keys changed by this event; only present keys are touched. */
|
|
@@ -264,7 +322,7 @@ export interface MetaPatchPayload {
|
|
|
264
322
|
}
|
|
265
323
|
export type AgentType = 'general' | 'coding';
|
|
266
324
|
export type SessionMode = 'auto' | 'plan' | 'execute';
|
|
267
|
-
export type SessionEventType = MessageEventType | 'assistant/chunk' | 'tool/call' | 'tool/result' | 'request/header' | 'request/context' | 'agent/inbox/spliced' | 'plan' | 'checkpoint' | 'compaction/start' | 'compaction/end' | 'meta' | 'meta/patch' | 'llm/retry' | 'llm/retry-started' | 'turn/start' | 'turn/end' | 'step/start' | 'step/end';
|
|
325
|
+
export type SessionEventType = MessageEventType | 'assistant/chunk' | 'assistant/attempt' | 'tool/call' | 'tool/result' | 'request/header' | 'request/context' | 'agent/inbox/spliced' | 'plan' | 'checkpoint' | 'compaction/start' | 'compaction/end' | 'meta' | 'meta/patch' | 'llm/retry' | 'llm/retry-started' | 'turn/start' | 'turn/end' | 'step/start' | 'step/end';
|
|
268
326
|
export interface SessionEventBase<T extends SessionEventType, P> {
|
|
269
327
|
id: string;
|
|
270
328
|
seq: number;
|
|
@@ -289,7 +347,7 @@ export type SurfaceOp = 'append' | {
|
|
|
289
347
|
start: number;
|
|
290
348
|
end: number;
|
|
291
349
|
};
|
|
292
|
-
export type SessionEvent = SessionEventBase<'user/message', UserMessagePayload> | SessionEventBase<'assistant/message', AssistantMessagePayload> | SessionEventBase<'assistant/chunk', AssistantChunkPayload> | SessionEventBase<'system/message', SystemMessagePayload> | SessionEventBase<'tool/call', ToolCallPayload> | SessionEventBase<'tool/result', ToolResultPayload> | SessionEventBase<'request/header', RequestHeaderPayload> | SessionEventBase<'request/context', RequestContextPayload> | SessionEventBase<'agent/inbox/spliced', InboxSplicePayload> | SessionEventBase<'plan', PlanPayload> | SessionEventBase<'checkpoint', CheckpointPayload> | SessionEventBase<'compaction/start', CompactionStartPayload> | SessionEventBase<'compaction/end', CompactionEndPayload> | SessionEventBase<'meta', Record<string, unknown>> | SessionEventBase<'meta/patch', MetaPatchPayload> | SessionEventBase<'llm/retry', LLMRetryPayload> | SessionEventBase<'llm/retry-started', LLMRetryStartedPayload> | SessionEventBase<'turn/start', TurnStartPayload> | SessionEventBase<'turn/end', TurnEndPayload> | SessionEventBase<'step/start', StepStartPayload> | SessionEventBase<'step/end', StepEndPayload>;
|
|
350
|
+
export type SessionEvent = SessionEventBase<'user/message', UserMessagePayload> | SessionEventBase<'assistant/message', AssistantMessagePayload> | SessionEventBase<'assistant/chunk', AssistantChunkPayload> | SessionEventBase<'assistant/attempt', AssistantAttemptPayload> | SessionEventBase<'system/message', SystemMessagePayload> | SessionEventBase<'tool/call', ToolCallPayload> | SessionEventBase<'tool/result', ToolResultPayload> | SessionEventBase<'request/header', RequestHeaderPayload> | SessionEventBase<'request/context', RequestContextPayload> | SessionEventBase<'agent/inbox/spliced', InboxSplicePayload> | SessionEventBase<'plan', PlanPayload> | SessionEventBase<'checkpoint', CheckpointPayload> | SessionEventBase<'compaction/start', CompactionStartPayload> | SessionEventBase<'compaction/end', CompactionEndPayload> | SessionEventBase<'meta', Record<string, unknown>> | SessionEventBase<'meta/patch', MetaPatchPayload> | SessionEventBase<'llm/retry', LLMRetryPayload> | SessionEventBase<'llm/retry-started', LLMRetryStartedPayload> | SessionEventBase<'turn/start', TurnStartPayload> | SessionEventBase<'turn/end', TurnEndPayload> | SessionEventBase<'step/start', StepStartPayload> | SessionEventBase<'step/end', StepEndPayload>;
|
|
293
351
|
export interface SessionConfig {
|
|
294
352
|
file: string;
|
|
295
353
|
broadcast?: SessionBroadcast;
|
|
@@ -309,6 +367,8 @@ export interface ContextUsage {
|
|
|
309
367
|
ratio: number;
|
|
310
368
|
}
|
|
311
369
|
export declare const DEFAULT_CONTEXT_LIMIT = 128000;
|
|
370
|
+
/** Replay committed streams in raw durable order, including shadowed messages. */
|
|
371
|
+
export declare function assistantStreams(events: readonly SessionEvent[]): AssistantStreamRecord[][];
|
|
312
372
|
/**
|
|
313
373
|
* Project an event list to model messages, in the list's own order. Each
|
|
314
374
|
* surface event is mapped through {@link deriveEventMessage}; a `checkpoint`
|
|
@@ -411,11 +471,12 @@ export declare class SessionLog {
|
|
|
411
471
|
private _pending;
|
|
412
472
|
private _drainScheduled;
|
|
413
473
|
private _writeError;
|
|
414
|
-
constructor(file: string, _broadcast?: SessionBroadcast | undefined);
|
|
474
|
+
constructor(file: string, _broadcast?: SessionBroadcast | undefined, publicationContext?: Context);
|
|
415
475
|
init(): Promise<void>;
|
|
416
476
|
append(type: 'user/message', payload: UserMessagePayload): Promise<SessionEvent>;
|
|
417
477
|
append(type: 'assistant/message', payload: AssistantMessagePayload): Promise<SessionEvent>;
|
|
418
478
|
append(type: 'assistant/chunk', payload: AssistantChunkPayload): Promise<SessionEvent>;
|
|
479
|
+
append(type: 'assistant/attempt', payload: AssistantAttemptPayload): Promise<SessionEvent>;
|
|
419
480
|
append(type: 'system/message', payload: SystemMessagePayload): Promise<SessionEvent>;
|
|
420
481
|
append(type: 'tool/call', payload: ToolCallPayload): Promise<SessionEvent>;
|
|
421
482
|
append(type: 'tool/result', payload: ToolResultPayload): Promise<SessionEvent>;
|
|
@@ -29,5 +29,7 @@ export declare function checkBalancedSteps(events: readonly SessionEvent[]): Ses
|
|
|
29
29
|
export declare function checkBalancedToolCalls(events: readonly SessionEvent[]): SessionInvariantFailure[];
|
|
30
30
|
/** seq is strictly monotonic (an append-only log never rewinds). */
|
|
31
31
|
export declare function checkMonotonicSeq(events: readonly SessionEvent[]): SessionInvariantFailure[];
|
|
32
|
+
/** A terminal attempt belongs to an open durable step, never to a live attempt id. */
|
|
33
|
+
export declare function checkAssistantAttempts(events: readonly SessionEvent[]): SessionInvariantFailure[];
|
|
32
34
|
/** Aggregate all structural session checks over an event stream. */
|
|
33
35
|
export declare function checkSessionInvariants(events: readonly SessionEvent[]): SessionInvariantFailure[];
|
|
@@ -6,9 +6,9 @@ export * as evalApi from '../packages/eval/src/index.js';
|
|
|
6
6
|
export * as evolveApi from '../packages/evolve/src/index.js';
|
|
7
7
|
export * as llmApi from '../packages/llm/src/index.js';
|
|
8
8
|
export { CordisError, CordisErrorCode, Context, DisposableList, EventsService, Fiber, FiberState, Inject, InvariantRegistry, InvariantViolationError, Logger, LoggerService, ReflectService, RegistryService, Service, ValidationError, assertInvariants, invariant, resolveConfig, symbols, type Any, type AnyFunction, type Dict, type Effect, type InjectKey, type InvariantContext, type InvariantCheck, type InvariantDefinition, type Plugin, type PluginBase, } from '../packages/core/src/index.js';
|
|
9
|
-
export { DEFAULT_CONTEXT_LIMIT, SESSION_FORMAT_VERSION, SessionFormatError, SessionLog, estimateContextUsage, estimateEventTokens, estimateMessageTokens, foldSessionMeta, projectEvents, repairUnclosed, resolveCompactKeep, safeCompactSplit, session, suffixStartIndexForTokens, checkBalancedSteps, checkBalancedToolCalls, checkBalancedTurns, checkMonotonicSeq, checkSessionInvariants, deriveEventMessage, foldRequestContext, foldRequestHeader, foldSurface, isAppendSurfaceEvent, isSurfaceEventType, type AgentType, type CheckpointPayload, type CompactOptions, type ContextUsage, type InboxSplicePayload, type MetaPatchPayload, type MessageEventPayload, type MessageEventType, type ModelMessage, type ModelRole, type ModelToolCall, type ReplayReducer, type SessionBroadcast, type SessionConfig, type SessionEvent, type SessionEventBase, type SessionEventType, type SessionInvariantFailure, type SessionMode, type AssistantChunkPayload, type StepEndPayload, type StepStartPayload, type ToolCallPayload, type ToolResultErrorPayload, type ToolResultPayload, type TurnEndPayload, type TurnEndReason, type TurnStartPayload, type CompactionEndPayload, type CompactionStartPayload, type LlmCallConfig, type RequestContextPayload, type RequestHeaderPayload, type RequestHeaderReason, type SurfaceEventType, type SurfaceFoldReplacement, type SurfaceFoldResult, type SurfaceOp, } from '../packages/session/src/index.js';
|
|
9
|
+
export { DEFAULT_CONTEXT_LIMIT, SESSION_FORMAT_VERSION, SessionFormatError, SessionLog, estimateContextUsage, estimateEventTokens, estimateMessageTokens, foldSessionMeta, projectEvents, repairUnclosed, resolveCompactKeep, safeCompactSplit, session, assistantStreams, suffixStartIndexForTokens, checkBalancedSteps, checkBalancedToolCalls, checkBalancedTurns, checkMonotonicSeq, checkSessionInvariants, deriveEventMessage, foldRequestContext, foldRequestHeader, foldSurface, isAppendSurfaceEvent, isSurfaceEventType, type AgentType, type CheckpointPayload, type CompactOptions, type ContextUsage, type InboxSplicePayload, type MetaPatchPayload, type MessageEventPayload, type MessageEventType, type ModelMessage, type ModelRole, type ModelToolCall, type ReplayReducer, type SessionBroadcast, type SessionConfig, type SessionEvent, type SessionEventBase, type SessionEventType, type SessionInvariantFailure, type SessionMode, type AssistantChunkPayload, type AssistantMessagePayload, type AssistantAttemptPayload, type AssistantStreamChunk, type AssistantStreamRecord, type AssistantStreamFinishReason, type StepEndPayload, type StepStartPayload, type ToolCallPayload, type ToolResultErrorPayload, type ToolResultPayload, type TurnEndPayload, type TurnEndReason, type TurnStartPayload, type CompactionEndPayload, type CompactionStartPayload, type LlmCallConfig, type RequestContextPayload, type RequestHeaderPayload, type RequestHeaderReason, type SurfaceEventType, type SurfaceFoldReplacement, type SurfaceFoldResult, type SurfaceOp, } from '../packages/session/src/index.js';
|
|
10
10
|
export { CalculatorError, PathSandboxError, ToolAuthorizationError, ToolAlreadyRegisteredError, ToolInputError, ToolNotFoundError, ToolsService, builtinTools, createBuiltinToolDefinitions, evaluateExpression, localExecutionProvider, tools, validateSchema, validateToolInput, type ToolAuthorizer, type BuiltinToolsConfig, type ToolDefinition, type ToolError, type ToolExecuteOptions, type ToolExecutor, type ToolInputValidator, type ToolParameterSchema, type ToolPolicy, type ToolRequest, type ToolResult, type ToolResultTruncator, type ToolSchema, type ToolStagePayload, type ToolsConfig, type ExecutionProvider, type HttpRequest, type HttpResponse, type ShellRequest, type ShellResult, } from '../packages/tools/src/index.js';
|
|
11
|
-
export { AgentError, AgentInbox, AgentRegistry, AgentService, DurableInbox, LlmService, agent, agents, llmService, systemPrompt, type AgentCreationOptions, type AgentConfig, type AgentCancelOptions, type AgentContextBudget, type AgentContextCompactEvent, type AgentEndEvent, type AgentFinishReason, type AgentHooks, type AgentInput, type AgentLoop, type AgentRunOptions, type AgentRunResult, type AgentStartEvent, type AgentStep, type AgentStepEvent, type AgentStreamEvent, type AgentPreStepEvent, type AgentRequestEvent, type AgentToolCallEvent, type AgentToolEndEvent, type AgentToolResultEvent, type AgentToolStartEvent, type AgentTurnEndEvent, type AgentTurnStoppingEvent, type AgentTurnStartEvent, type CompleteOptions, type AgentDefinition, type AgentDefinitionHooks, type AgentHandle, type AgentStatus, type AgentFactory, type DurableInboxMessage, type DurableTarget, type LiveAgent, type PromptAssembly, type PromptSection, type SystemPromptAssemblyOptions, type SystemPromptService, type DefineAgentConfig, type LLMAdapter, type LLMCompletion, type LLMMessageDeltaEvent, type LLMMessageStartEvent, type LLMMessageStopEvent, type LLMStreamRequestEvent, type LLMStreamEvent, type LLMToolCall, type LLMToolCallEndEvent, type LLMToolCallStartEvent, defineAgent, } from '../packages/agent/src/index.js';
|
|
11
|
+
export { AgentError, AgentInbox, AgentRegistry, AgentService, DurableInbox, LlmService, agent, agents, llmService, systemPrompt, type AgentCreationOptions, type AgentConfig, type AgentCancelOptions, type AgentContextBudget, type AgentContextCompactEvent, type AgentEndEvent, type AgentFinishReason, type AgentHooks, type AgentInput, type AgentLoop, type AgentRunOptions, type AgentRunResult, type AgentStartEvent, type AgentStep, type AgentStepEvent, type AgentStreamEvent, type AgentAssistantStreamEvent, type AssistantStreamFrame, type AgentPreStepEvent, type AgentRequestEvent, type AgentToolCallEvent, type AgentToolEndEvent, type AgentToolResultEvent, type AgentToolStartEvent, type AgentTurnEndEvent, type AgentTurnStoppingEvent, type AgentTurnStartEvent, type CompleteOptions, type AgentDefinition, type AgentDefinitionHooks, type AgentHandle, type AgentStatus, type AgentFactory, type DurableInboxMessage, type DurableTarget, type LiveAgent, type PromptAssembly, type PromptSection, type SystemPromptAssemblyOptions, type SystemPromptService, type DefineAgentConfig, type LLMAdapter, type LLMCompletion, type LLMMessageDeltaEvent, type LLMMessageStartEvent, type LLMMessageStopEvent, type LLMStreamRequestEvent, type LLMStreamEvent, type LLMToolCall, type LLMToolCallEndEvent, type LLMToolCallStartEvent, defineAgent, } from '../packages/agent/src/index.js';
|
|
12
12
|
export { EvalService, allStrategy, assertStrategy, createStrategyRegistry, defaultStrategyDefinitions, evalPlugin, gateStrategy, hashJson, judgeStrategy, recordJudgeOutput, recordedJudgeOutput, regressionStrategy, stableStringify, weightedStrategy, type AllStrategyOptions, type AssertStrategyOptions, type BudgetUsage, type CandidateMetadata, type CandidatePreset, type CompareResult, type Evidence, type EvalAbortEvent, type EvalPluginConfig, type EvalRun, type EvalRunEndEvent, type EvalRunOptions, type EvalStartEvent, type EvalStrategy, type EvalStrategyDefinition, type EvalTaskEndEvent, type EvalTaskStartEvent, type EvalVerdictEvent, type GateStrategyOptions, type JudgeStrategyOptions, type RegressionStrategyOptions, type RunBudget, type StrategyContext, type StrategyRegistry, type Task, type TaskAssertion, type TaskBudget, type Verdict, type VerdictStatus, type WeightedStrategyOptions, } from '../packages/eval/src/index.js';
|
|
13
13
|
export { ExperimentLog, EvolveService, candidateKey, createLlmProposeRule, diagnose, emptyDiagnosis, evolvePlugin, llmCandidate, parseLlmProposal, proposalContext, toCandidatePreset, toCandidateSnapshot, withSystemPrompt, type ApprovalRequest, type Candidate, type CandidateMutation, type CandidateSnapshot, type Diagnosis, type EvolveApprovalEvent, type EvolveDecisionEvent, type EvolveOptions, type EvolvePluginConfig, type EvolveProposeEvent, type EvolveRunEvent, type EvolveStepOptions, type EvolveStepResult, type ExperimentNode, type ExperimentReplay, type ExperimentStatus, type FailureMode, type GateCheck, type LlmCandidateConfig, type LlmCandidateOptions, type LlmProposal, type LlmProposeRuleOptions, type LlmProposalError, type ProposeRule, type ProposeRuleResult, type ProposalContext, type SelectionDecision, type SelectionPolicy, type StrategySummary, } from '../packages/evolve/src/index.js';
|
|
14
14
|
export { DEFAULT_MODEL, DEFAULT_DEEPSEEK_MODEL, DEFAULT_LLM_MAX_RETRIES, DEFAULT_LLM_RETRY_DELAY_MS, DEFAULT_LLM_TIMEOUT_MS, DEFAULT_OPENCODE_GO_BASE_URL, MODEL_CATALOG, OpenAICompatibleError, anthropicMessagesAdapter, createLlmAdapter, lookupModel, openaiCompatAdapter, type LlmConfig, type LlmProtocol, type ModelDefinition, type ModelPricing, type ModelPricingMeta, type OpenAICompatibleConfig, } from '../packages/llm/src/index.js';
|