fascicle 0.18.1 → 0.19.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/CHANGELOG.md +66 -0
- package/README.md +27 -1
- package/dist/AGENTS.md +11 -10
- package/dist/a2a.d.ts +358 -0
- package/dist/a2a.js +2234 -0
- package/dist/a2a.js.map +1 -0
- package/dist/acp.d.ts +120 -9
- package/dist/acp.js +927 -154
- package/dist/acp.js.map +1 -1
- package/dist/adapters-DYFauXE1.js +1147 -0
- package/dist/adapters-DYFauXE1.js.map +1 -0
- package/dist/adapters.d.ts +124 -36
- package/dist/adapters.js +1 -1
- package/dist/agents.d.ts +2 -2
- package/dist/agents.js +1 -1
- package/dist/{core-BH7sWpEG.js → core-xTtRZqdb.js} +217 -99
- package/dist/core-xTtRZqdb.js.map +1 -0
- package/dist/diagram_bin.js +1 -1
- package/dist/durable-CgU0kO2H.d.ts +144 -0
- package/dist/{engine-fOjYHcv6.js → engine-B_Yl7acj.js} +128 -42
- package/dist/engine-B_Yl7acj.js.map +1 -0
- package/dist/index.d.ts +9 -136
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/{invoke-7iu8db6V.js → invoke-Bbk0RuVL.js} +3 -3
- package/dist/{invoke-7iu8db6V.js.map → invoke-Bbk0RuVL.js.map} +1 -1
- package/dist/{leading_system-BeQUSAim.js → leading_system-m-x7HzbQ.js} +16 -4
- package/dist/leading_system-m-x7HzbQ.js.map +1 -0
- package/dist/mcp-D1hN5ywq.js +662 -0
- package/dist/mcp-D1hN5ywq.js.map +1 -0
- package/dist/mcp.d.ts +115 -5
- package/dist/mcp.js +2 -2
- package/dist/otel.d.ts +1 -1
- package/dist/stdio.d.ts +1 -1
- package/dist/stdio.js +2 -2
- package/dist/testing.d.ts +7 -5
- package/dist/testing.js +618 -318
- package/dist/testing.js.map +1 -1
- package/dist/{types-BUXt_zgJ.d.ts → types-BtRpSctv.d.ts} +38 -5
- package/dist/{types-Dk9tLpUq.d.ts → types-CDTW7XWB.d.ts} +2 -2
- package/dist/ui.d.ts +2 -2
- package/dist/viewer.js +2 -2
- package/dist/web.d.ts +1 -1
- package/package.json +18 -6
- package/dist/adapters-CpKpDk7r.js +0 -461
- package/dist/adapters-CpKpDk7r.js.map +0 -1
- package/dist/core-BH7sWpEG.js.map +0 -1
- package/dist/engine-fOjYHcv6.js.map +0 -1
- package/dist/leading_system-BeQUSAim.js.map +0 -1
- package/dist/mcp-CHJ88HiG.js +0 -262
- package/dist/mcp-CHJ88HiG.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,139 +1,8 @@
|
|
|
1
|
-
import { A as StepTiming, B as UsageTotals, C as ProviderConfigMap, D as RetryFailureKind, E as ResolvedModel, F as ToolCallRecord, G as NativeProviderAdapter, H as AiSdkProviderAdapter, I as ToolExecContext, J as ProviderFactory, K as ProviderAdapter, L as TruncatedTurnPolicy, M as Tool, N as ToolApprovalHandler, O as RetryPolicy, P as ToolApprovalRequest, Q as ClaudeCliProviderReported, R as TurnRequest, S as PricingTable, T as ProviderOptions, U as EffortTranslation, V as UserContentPart, W as ExternalAgentAdapter, X as RawProviderUsage, Y as ProviderTransport, Z as default_normalize_usage, _ as Message, a as CacheSetting, b as PrepareStepResult, c as CostBreakdown, d as EngineConfig, f as EngineDefaults, g as GenerateTiming, h as GenerateResult, i as BedrockCredentials, j as StreamChunk, k as StepRecord, l as EffortLevel, m as GenerateOptions, n as AssistantContentPart, o as CaptureLevel, p as FinishReason, q as ProviderCapability, r as BedrockCredentialProvider, s as CapturePayload, t as AiSdkTelemetrySettings, u as Engine, v as PrepareStepContext, w as ProviderInit, x as Pricing, y as PrepareStepHook, z as TurnResult } from "./types-
|
|
1
|
+
import { A as StepTiming, B as UsageTotals, C as ProviderConfigMap, D as RetryFailureKind, E as ResolvedModel, F as ToolCallRecord, G as NativeProviderAdapter, H as AiSdkProviderAdapter, I as ToolExecContext, J as ProviderFactory, K as ProviderAdapter, L as TruncatedTurnPolicy, M as Tool, N as ToolApprovalHandler, O as RetryPolicy, P as ToolApprovalRequest, Q as ClaudeCliProviderReported, R as TurnRequest, S as PricingTable, T as ProviderOptions, U as EffortTranslation, V as UserContentPart, W as ExternalAgentAdapter, X as RawProviderUsage, Y as ProviderTransport, Z as default_normalize_usage, _ as Message, a as CacheSetting, b as PrepareStepResult, c as CostBreakdown, d as EngineConfig, f as EngineDefaults, g as GenerateTiming, h as GenerateResult, i as BedrockCredentials, j as StreamChunk, k as StepRecord, l as EffortLevel, m as GenerateOptions, n as AssistantContentPart, o as CaptureLevel, p as FinishReason, q as ProviderCapability, r as BedrockCredentialProvider, s as CapturePayload, t as AiSdkTelemetrySettings, u as Engine, v as PrepareStepContext, w as ProviderInit, x as Pricing, y as PrepareStepHook, z as TurnResult } from "./types-CDTW7XWB.js";
|
|
2
|
+
import { a as DurableRuns, c as RunOptions, d as run, i as DurableRunState, l as RunOutcome, n as DurableOutcome, o as DurableStore, r as DurableRunOptions, s as durable, t as DurableConfig, u as StreamingRunHandle } from "./durable-CgU0kO2H.js";
|
|
2
3
|
import { n as SchemaIssue, r as ToolSchema, t as AnySchema } from "./types-CvghbZ0x.js";
|
|
3
4
|
import { _ as is_run_end_event, a as MapItemFailedEvent, b as is_step_replayed_event, c as RunEndStatus, d as StepReplayedEvent, f as TrajectoryParseResult, g as is_map_item_failed_event, h as is_emit_event, i as EmitEvent, l as SpanEndEvent, m as is_custom_trajectory_event, n as CheckpointStatus, o as ParsedTrajectoryEvent, p as is_checkpoint_event, r as CustomTrajectoryEvent, s as RunEndEvent, t as CheckpointEvent, u as SpanStartEvent, v as is_span_end_event, x as parse_trajectory_event, y as is_span_start_event } from "./trajectory-Dt0-A7kb.js";
|
|
4
|
-
import { a as FlowValue, c as Step, d as StepMetadata, f as StepOptions, h as TrajectoryLogger, i as FlowNode, l as StepFn, m as TrajectoryEvent, n as CheckpointStore, o as RunContext, p as StepOutput, r as CleanupFn, s as ScopedCheckpointStore, t as AnyStep, u as StepInput } from "./types-
|
|
5
|
-
type RunOptions = {
|
|
6
|
-
readonly install_signal_handlers?: boolean;
|
|
7
|
-
readonly trajectory?: TrajectoryLogger;
|
|
8
|
-
readonly checkpoint_store?: CheckpointStore;
|
|
9
|
-
readonly resume_data?: Readonly<Record<string, unknown>>;
|
|
10
|
-
readonly abort?: AbortSignal;
|
|
11
|
-
};
|
|
12
|
-
type StreamingRunHandle<o> = {
|
|
13
|
-
readonly events: AsyncIterable<TrajectoryEvent>;
|
|
14
|
-
readonly result: Promise<o>;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Execute a flow and resolve with its final output.
|
|
18
|
-
*/
|
|
19
|
-
declare function run_impl<i, o>(flow: Step<i, o>, input: i, options?: RunOptions): Promise<o>;
|
|
20
|
-
/**
|
|
21
|
-
* Execute a flow while exposing its trajectory events as an async iterable.
|
|
22
|
-
*/
|
|
23
|
-
declare function run_stream<i, o>(flow: Step<i, o>, input: i, options?: RunOptions): StreamingRunHandle<o>;
|
|
24
|
-
type RunOutcome<o> = {
|
|
25
|
-
readonly kind: 'done';
|
|
26
|
-
readonly output: o;
|
|
27
|
-
} | {
|
|
28
|
-
readonly kind: 'suspended';
|
|
29
|
-
readonly id: string;
|
|
30
|
-
readonly payload: unknown;
|
|
31
|
-
readonly deadline_ms?: number;
|
|
32
|
-
readonly resume: (data: unknown) => Promise<RunOutcome<o>>;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Execute a flow, reporting suspension as a typed outcome instead of a
|
|
36
|
-
* thrown `suspended_error`.
|
|
37
|
-
*
|
|
38
|
-
* Resolves `{ kind: 'done', output }` on completion. When a `suspend` gate
|
|
39
|
-
* fires, resolves `{ kind: 'suspended', id, payload, resume }` where `id` is
|
|
40
|
-
* the gate's suspend id, `payload` is what the gate raised on its
|
|
41
|
-
* `suspended_error` (plus `deadline_ms`, when the gate set one), and
|
|
42
|
-
* `resume(data)` re-runs the flow from the original
|
|
43
|
-
* input with `resume_data[id] = data` merged over the caller's options: the
|
|
44
|
-
* same full re-run semantics as calling `run` again yourself, so pure
|
|
45
|
-
* prefixes replay and `checkpoint`ed steps are served from the store. The
|
|
46
|
-
* returned promise resolves to the next outcome, so a flow with several
|
|
47
|
-
* gates is driven by awaiting `resume` repeatedly. Real errors still throw,
|
|
48
|
-
* from the initial call and from `resume` alike.
|
|
49
|
-
*/
|
|
50
|
-
declare function run_until_suspended<i, o>(flow: Step<i, o>, input: i, options?: RunOptions): Promise<RunOutcome<o>>;
|
|
51
|
-
/**
|
|
52
|
-
* The public entry point for executing a flow.
|
|
53
|
-
*
|
|
54
|
-
* Callable as `run(flow, input, options?)` for a plain result,
|
|
55
|
-
* `run.stream(flow, input, options?)` for `{ events, result }`, or
|
|
56
|
-
* `run.until_suspended(flow, input, options?)` for a `RunOutcome` that
|
|
57
|
-
* carries suspension as data. All share one implementation, so every entry
|
|
58
|
-
* point runs the same graph identically.
|
|
59
|
-
*/
|
|
60
|
-
export declare const run: typeof run_impl & {
|
|
61
|
-
stream: typeof run_stream;
|
|
62
|
-
until_suspended: typeof run_until_suspended;
|
|
63
|
-
};
|
|
64
|
-
type Claims = Required<Pick<CheckpointStore, 'claim' | 'release'>>;
|
|
65
|
-
/**
|
|
66
|
-
* A store `durable` can keep runs in: one that scopes, and whose scopes can
|
|
67
|
-
* claim. `filesystem_store` from `fascicle/adapters` is one, and
|
|
68
|
-
* `checkpoint_store_conformance` in `fascicle/testing` checks a store of
|
|
69
|
-
* your own.
|
|
70
|
-
*/
|
|
71
|
-
type DurableStore = {
|
|
72
|
-
readonly scope: (prefix: string) => ScopedCheckpointStore & Claims;
|
|
73
|
-
};
|
|
74
|
-
type DurableConfig = {
|
|
75
|
-
readonly store: DurableStore;
|
|
76
|
-
/**
|
|
77
|
-
* How long a drive owns its run before another invocation may take it
|
|
78
|
-
* over, in milliseconds. The driver renews the lease every third of this
|
|
79
|
-
* while it drives, so the lease only runs out once a drive stops answering
|
|
80
|
-
* (its process died, or stalled for longer than this). Default 60 seconds.
|
|
81
|
-
*/
|
|
82
|
-
readonly lease_ms?: number;
|
|
83
|
-
/**
|
|
84
|
-
* What happens when a run's flow no longer has the shape the run started
|
|
85
|
-
* on. `'fail'` (the default) throws `flow_changed_error`. `'replay'` takes
|
|
86
|
-
* the new shape, records a `flow_changed` event, and drives on.
|
|
87
|
-
*/
|
|
88
|
-
readonly on_flow_change?: 'fail' | 'replay';
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* The `run` options a drive passes through. The driver owns the checkpoint
|
|
92
|
-
* store and the resume data, so it leaves those two out.
|
|
93
|
-
*/
|
|
94
|
-
type DurableRunOptions = Omit<RunOptions, 'checkpoint_store' | 'resume_data'>;
|
|
95
|
-
type DurableOutcome<o> = {
|
|
96
|
-
readonly kind: 'done';
|
|
97
|
-
readonly run_id: string;
|
|
98
|
-
readonly output: o;
|
|
99
|
-
} | {
|
|
100
|
-
readonly kind: 'suspended';
|
|
101
|
-
readonly run_id: string;
|
|
102
|
-
readonly id: string;
|
|
103
|
-
readonly payload: unknown;
|
|
104
|
-
readonly deadline_at?: number;
|
|
105
|
-
} | {
|
|
106
|
-
readonly kind: 'busy';
|
|
107
|
-
readonly run_id: string;
|
|
108
|
-
};
|
|
109
|
-
type DurableRunState = Exclude<DurableOutcome<unknown>, {
|
|
110
|
-
readonly kind: 'busy';
|
|
111
|
-
}> | {
|
|
112
|
-
readonly kind: 'running';
|
|
113
|
-
readonly run_id: string;
|
|
114
|
-
} | {
|
|
115
|
-
readonly kind: 'failed';
|
|
116
|
-
readonly run_id: string;
|
|
117
|
-
readonly error: string;
|
|
118
|
-
};
|
|
119
|
-
type DurableRuns = {
|
|
120
|
-
readonly start: <i, o>(run_id: string, flow: Step<i, o>, input: i, options?: DurableRunOptions) => Promise<DurableOutcome<o>>;
|
|
121
|
-
readonly resume: <i, o>(run_id: string, flow: Step<i, o>, resume_data: Readonly<Record<string, unknown>>, options?: DurableRunOptions) => Promise<DurableOutcome<o>>;
|
|
122
|
-
readonly get: (run_id: string) => Promise<DurableRunState | undefined>;
|
|
123
|
-
readonly delete: (run_id: string) => Promise<boolean>;
|
|
124
|
-
};
|
|
125
|
-
/**
|
|
126
|
-
* Keep the runs of flows that suspend in `config.store`, and drive them one
|
|
127
|
-
* event at a time.
|
|
128
|
-
*
|
|
129
|
-
* `start(run_id, flow, input)` begins a run and drives it until it's done or
|
|
130
|
-
* waiting at a gate. `resume(run_id, flow, { [gate]: data })` hands a run
|
|
131
|
-
* the data its gate waits for and drives it on. Both report `busy` instead
|
|
132
|
-
* when another invocation is driving the run, and both are safe to repeat.
|
|
133
|
-
* `get(run_id)` reads where a run stands without driving it, and
|
|
134
|
-
* `delete(run_id)` removes it, resolving false while a drive holds it.
|
|
135
|
-
*/
|
|
136
|
-
export declare function durable(config: DurableConfig): DurableRuns;
|
|
5
|
+
import { a as FlowValue, c as Step, d as StepMetadata, f as StepOptions, g as Versioned, h as TrajectoryLogger, i as FlowNode, l as StepFn, m as TrajectoryEvent, n as CheckpointStore, o as RunContext, p as StepOutput, r as CleanupFn, s as ScopedCheckpointStore, t as AnyStep, u as StepInput } from "./types-BtRpSctv.js";
|
|
137
6
|
/**
|
|
138
7
|
* Wrap a plain function as a `Step`, named or anonymous.
|
|
139
8
|
*
|
|
@@ -1687,6 +1556,9 @@ export declare class provider_error extends Error {
|
|
|
1687
1556
|
* expiry as retryable without any timeout-specific branch. An expiry after a
|
|
1688
1557
|
* chunk has reached an on_chunk consumer never reaches here; retry_turn
|
|
1689
1558
|
* converts it to a non-retryable stream interruption first.
|
|
1559
|
+
*
|
|
1560
|
+
* The message names `turn_timeout_ms` as the option to raise, and it keeps
|
|
1561
|
+
* that action when retry exhaustion quotes it after its own lead.
|
|
1690
1562
|
*/
|
|
1691
1563
|
export declare class turn_timeout_error extends Error {
|
|
1692
1564
|
readonly kind: 'timeout';
|
|
@@ -2520,7 +2392,8 @@ type ModelCallConfig<T = string, projected = GenerateResult<T>> = {
|
|
|
2520
2392
|
* `GenerateOptions`.
|
|
2521
2393
|
*
|
|
2522
2394
|
* Threads `ctx.abort` and `ctx.trajectory` (nested under the model_call
|
|
2523
|
-
* step's own span) into every call, and, when `run.stream` is driving
|
|
2395
|
+
* step's own span) into every call, and, when `run.stream` is driving or
|
|
2396
|
+
* the run set `record_chunks`,
|
|
2524
2397
|
* records each chunk as a `model_chunk` trajectory event before handing it
|
|
2525
2398
|
* to `cfg.on_chunk`. `cfg.project`
|
|
2526
2399
|
* maps the `GenerateResult` envelope into the step's output inside the same
|
|
@@ -2556,5 +2429,5 @@ export declare function model_step<T = string>(cfg: Omit<ModelCallConfig<T>, 'pr
|
|
|
2556
2429
|
* }
|
|
2557
2430
|
*/
|
|
2558
2431
|
export declare function forward_standard_env(): Record<string, string>;
|
|
2559
|
-
export { type AdversarialBuildInput, type AdversarialConfig, type AdversarialCritiqueResult, type AdversarialResult, type AiSdkProviderAdapter, type AiSdkTelemetrySettings, type AnySchema, type AnyStep, type AssistantContentPart, type BedrockCredentialProvider, type BedrockCredentials, type BenchCase, type BenchOptions, type BenchReport, type BenchSummary, type BracketRecord, type BranchConfig, type CacheSetting, type Candidate, type CaptureLevel, type CapturePayload, type CapturedSettings, type CapturedTool, type CapturedTurn, type CaseResult, type Chain, type ChainOpen, type ChainStepOptions, type CheckpointConfig, type CheckpointEvent, type CheckpointStatus, type CheckpointStore, type ClaudeCliErrorReason, type ClaudeCliProviderReported, type CleanupFn, type ComposeConfig, type ConsensusConfig, type ConsensusResult, type CostBreakdown, type CustomTrajectoryEvent, type DescribeOptions, type DiagramOptions, type DurableConfig, type DurableOutcome, type DurableRunOptions, type DurableRunState, type DurableRuns, type DurableStore, type EffortLevel, type EffortTranslation, type EmitEvent, type Engine, type EngineConfig, type EngineDefaults, type EnsembleConfig, type EnsembleResult, type EnsembleStepConfig, type EnsembleStepResult, type ExternalAgentAdapter, type FallbackOptions, type FallbackOutcome, type FallbackProjection, type FinishReason, type FlowNode, type FlowValue, type GateConfig, type GenerateOptions, type GenerateResult, type GenerateTiming, type HistoryEntry, type ImproveBudget, type ImproveConfig, type ImproveResult, type ImproveRoundInput, type Improvement, type Judge, type JudgeArgs, type JudgeLlmConfig, type JudgeWithFn, type LearnConfig, type LearnInput, type LearnResult, type Lesson, type LoopConfig, type LoopGuardPredicate, type LoopGuardResult, type LoopOutcome, type MapConfig, type MapItemFailedEvent, type MapSettleConfig, type Message, type ModelCallConfig, type ModelCallInput, type NativeProviderAdapter, type ParallelOptions, type ParsedTrajectoryEvent, type PerCaseDelta, type PipeOptions, type PrepareStepContext, type PrepareStepHook, type PrepareStepResult, type Pricing, type PricingTable, type ProviderAdapter, type ProviderCapability, type ProviderConfigMap, type ProviderFactory, type ProviderInit, type ProviderOptions, type ProviderTransport, type RawProviderUsage, type RegressionCompareOptions, type RegressionDelta, type RegressionReport, type ReplayHint, type ResolvedModel, type RetryConfig, type RetryFailureKind, type RetryOutcome, type RetryPolicy, type RetryProjection, type RunContext, type RunEndEvent, type RunEndStatus, type RunOptions, type RunOutcome, type SchemaIssue, type ScopeOptions, type ScopedCheckpointStore, type Score, type ScoredCandidate, type SequenceOptions, type Settled, type SettledError, type SpanEndEvent, type SpanStartEvent, type StashOptions, type Step, type StepFn, type StepInput, type StepKind, type StepMetadata, type StepOptions, type StepOutput, type StepRecord, type StepReplayedEvent, type StepTiming, type StreamChunk, type StreamingRunHandle, type SuspendConfig, type Throughput, type TimeoutOptions, type Tool, type ToolApprovalHandler, type ToolApprovalRequest, type ToolCallRecord, type ToolExecContext, type ToolSchema, type TournamentConfig, type TournamentResult, type TrajectoryEvent, type TrajectoryLogger, type TrajectoryParseResult, type TrajectorySource, type TruncatedTurnPolicy, type TurnRequest, type TurnResult, type UsageTotals, type UseOptions, type UserContentPart, default_normalize_usage, is_checkpoint_event, is_custom_trajectory_event, is_emit_event, is_map_item_failed_event, is_run_end_event, is_span_end_event, is_span_start_event, is_step_replayed_event, parse_trajectory_event };
|
|
2432
|
+
export { type AdversarialBuildInput, type AdversarialConfig, type AdversarialCritiqueResult, type AdversarialResult, type AiSdkProviderAdapter, type AiSdkTelemetrySettings, type AnySchema, type AnyStep, type AssistantContentPart, type BedrockCredentialProvider, type BedrockCredentials, type BenchCase, type BenchOptions, type BenchReport, type BenchSummary, type BracketRecord, type BranchConfig, type CacheSetting, type Candidate, type CaptureLevel, type CapturePayload, type CapturedSettings, type CapturedTool, type CapturedTurn, type CaseResult, type Chain, type ChainOpen, type ChainStepOptions, type CheckpointConfig, type CheckpointEvent, type CheckpointStatus, type CheckpointStore, type ClaudeCliErrorReason, type ClaudeCliProviderReported, type CleanupFn, type ComposeConfig, type ConsensusConfig, type ConsensusResult, type CostBreakdown, type CustomTrajectoryEvent, type DescribeOptions, type DiagramOptions, type DurableConfig, type DurableOutcome, type DurableRunOptions, type DurableRunState, type DurableRuns, type DurableStore, type EffortLevel, type EffortTranslation, type EmitEvent, type Engine, type EngineConfig, type EngineDefaults, type EnsembleConfig, type EnsembleResult, type EnsembleStepConfig, type EnsembleStepResult, type ExternalAgentAdapter, type FallbackOptions, type FallbackOutcome, type FallbackProjection, type FinishReason, type FlowNode, type FlowValue, type GateConfig, type GenerateOptions, type GenerateResult, type GenerateTiming, type HistoryEntry, type ImproveBudget, type ImproveConfig, type ImproveResult, type ImproveRoundInput, type Improvement, type Judge, type JudgeArgs, type JudgeLlmConfig, type JudgeWithFn, type LearnConfig, type LearnInput, type LearnResult, type Lesson, type LoopConfig, type LoopGuardPredicate, type LoopGuardResult, type LoopOutcome, type MapConfig, type MapItemFailedEvent, type MapSettleConfig, type Message, type ModelCallConfig, type ModelCallInput, type NativeProviderAdapter, type ParallelOptions, type ParsedTrajectoryEvent, type PerCaseDelta, type PipeOptions, type PrepareStepContext, type PrepareStepHook, type PrepareStepResult, type Pricing, type PricingTable, type ProviderAdapter, type ProviderCapability, type ProviderConfigMap, type ProviderFactory, type ProviderInit, type ProviderOptions, type ProviderTransport, type RawProviderUsage, type RegressionCompareOptions, type RegressionDelta, type RegressionReport, type ReplayHint, type ResolvedModel, type RetryConfig, type RetryFailureKind, type RetryOutcome, type RetryPolicy, type RetryProjection, type RunContext, type RunEndEvent, type RunEndStatus, type RunOptions, type RunOutcome, type SchemaIssue, type ScopeOptions, type ScopedCheckpointStore, type Score, type ScoredCandidate, type SequenceOptions, type Settled, type SettledError, type SpanEndEvent, type SpanStartEvent, type StashOptions, type Step, type StepFn, type StepInput, type StepKind, type StepMetadata, type StepOptions, type StepOutput, type StepRecord, type StepReplayedEvent, type StepTiming, type StreamChunk, type StreamingRunHandle, type SuspendConfig, type Throughput, type TimeoutOptions, type Tool, type ToolApprovalHandler, type ToolApprovalRequest, type ToolCallRecord, type ToolExecContext, type ToolSchema, type TournamentConfig, type TournamentResult, type TrajectoryEvent, type TrajectoryLogger, type TrajectoryParseResult, type TrajectorySource, type TruncatedTurnPolicy, type TurnRequest, type TurnResult, type UsageTotals, type UseOptions, type UserContentPart, type Versioned, default_normalize_usage, durable, is_checkpoint_event, is_custom_trajectory_event, is_emit_event, is_map_item_failed_event, is_run_end_event, is_span_end_event, is_span_start_event, is_step_replayed_event, parse_trajectory_event, run };
|
|
2560
2433
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { A as is_step, B as timeout_error, F as flow_changed_error, H as is_step_kind, I as gate_result_error, L as resume_validation_error, M as describe_cycle_error, N as duplicate_suspend_id_error, O as same_input_as, P as error_path, R as run_not_found_error, U as resolve_display_name, V as STEP_KINDS, _ as step, a as suspend, b as suggest_step_id, c as loop, d as retry, f as pipe, g as sequence, h as parallel, i as use, j as aborted_error, k as describe, l as timeout, m as branch, n as scope, o as checkpoint, p as map, r as stash, s as compose, t as chain, u as fallback, v as assert_valid_step_id, w as run, x as durable, y as is_valid_step_id, z as suspended_error } from "./core-
|
|
2
|
-
import { a as
|
|
3
|
-
import { t as create_engine } from "./engine-
|
|
1
|
+
import { A as is_step, B as timeout_error, F as flow_changed_error, H as is_step_kind, I as gate_result_error, L as resume_validation_error, M as describe_cycle_error, N as duplicate_suspend_id_error, O as same_input_as, P as error_path, R as run_not_found_error, U as resolve_display_name, V as STEP_KINDS, _ as step, a as suspend, b as suggest_step_id, c as loop, d as retry, f as pipe, g as sequence, h as parallel, i as use, j as aborted_error, k as describe, l as timeout, m as branch, n as scope, o as checkpoint, p as map, r as stash, s as compose, t as chain, u as fallback, v as assert_valid_step_id, w as run, x as durable, y as is_valid_step_id, z as suspended_error } from "./core-xTtRZqdb.js";
|
|
2
|
+
import { a as tee_logger, c as http_logger, l as filesystem_logger } from "./adapters-DYFauXE1.js";
|
|
3
|
+
import { t as create_engine } from "./engine-B_Yl7acj.js";
|
|
4
4
|
import { n as is_record$1 } from "./records-Btlmvunj.js";
|
|
5
5
|
import { a as is_run_end_event, c as is_step_replayed_event, i as is_map_item_failed_event, l as parse_trajectory_event, n as is_custom_trajectory_event, o as is_span_end_event, r as is_emit_event, s as is_span_start_event, t as is_checkpoint_event } from "./trajectory-CkCFZWNR.js";
|
|
6
6
|
import { t as json_schema_to_standard } from "./json_schema_to_standard-BstoXjM8.js";
|
|
7
|
-
import { A as
|
|
7
|
+
import { A as on_chunk_error, B as turn_timeout_error, D as engine_disposed_error, E as engine_config_error, F as provider_required_error, I as rate_limit_error, L as schema_validation_error, M as provider_capability_error, N as provider_error, O as incomplete_generation_error, P as provider_not_configured_error, R as tool_approval_denied_error, T as claude_cli_error, _ as default_normalize_usage, j as provider_auth_error, k as model_required_error, z as tool_error } from "./leading_system-m-x7HzbQ.js";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
9
|
import { mkdir, readFile, readdir, writeFile } from "node:fs/promises";
|
|
10
10
|
import { dirname, join } from "node:path";
|
|
@@ -2747,7 +2747,8 @@ function build_generate_options(cfg, prompt, ctx) {
|
|
|
2747
2747
|
* `GenerateOptions`.
|
|
2748
2748
|
*
|
|
2749
2749
|
* Threads `ctx.abort` and `ctx.trajectory` (nested under the model_call
|
|
2750
|
-
* step's own span) into every call, and, when `run.stream` is driving
|
|
2750
|
+
* step's own span) into every call, and, when `run.stream` is driving or
|
|
2751
|
+
* the run set `record_chunks`,
|
|
2751
2752
|
* records each chunk as a `model_chunk` trajectory event before handing it
|
|
2752
2753
|
* to `cfg.on_chunk`. `cfg.project`
|
|
2753
2754
|
* maps the `GenerateResult` envelope into the step's output inside the same
|