@dudousxd/nestjs-agent-opencode 1.0.0 → 2.0.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 +88 -0
- package/dist/durable/index.cjs +617 -43
- package/dist/durable/index.cjs.map +1 -1
- package/dist/durable/index.d.cts +11 -5
- package/dist/durable/index.d.ts +11 -5
- package/dist/durable/index.js +620 -46
- package/dist/durable/index.js.map +1 -1
- package/dist/{engine-BX6MLzxs.d.cts → engine-yFh3eD8j.d.cts} +241 -7
- package/dist/{engine-BX6MLzxs.d.ts → engine-yFh3eD8j.d.ts} +241 -7
- package/dist/index.cjs +595 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +594 -26
- package/dist/index.js.map +1 -1
- package/package.json +8 -5
|
@@ -260,12 +260,18 @@ interface OpenCodeMessagePart {
|
|
|
260
260
|
state?: unknown;
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
/**
|
|
263
|
+
/**
|
|
264
|
+
* How an OpenCode execution ended. `stop` is set when a stop landed on the turn (a limit, or
|
|
265
|
+
* `stopTurn`): on a `failed` outcome the stop aborted it; on a `succeeded` one the answer was
|
|
266
|
+
* already settling and was kept.
|
|
267
|
+
*/
|
|
264
268
|
type TurnOutcome = {
|
|
265
269
|
status: 'succeeded';
|
|
270
|
+
stop?: OpenCodeTurnStop;
|
|
266
271
|
} | {
|
|
267
272
|
status: 'failed';
|
|
268
273
|
error: string;
|
|
274
|
+
stop?: OpenCodeTurnStop;
|
|
269
275
|
} | {
|
|
270
276
|
status: 'interrupted';
|
|
271
277
|
};
|
|
@@ -320,6 +326,11 @@ interface TurnProgress {
|
|
|
320
326
|
settled: string[];
|
|
321
327
|
/** Assistant messages whose step's usage was counted. */
|
|
322
328
|
steps: string[];
|
|
329
|
+
/** The rounds and compactions the turn's limits counted so far (absent before limits travelled). */
|
|
330
|
+
counts?: {
|
|
331
|
+
steps: number;
|
|
332
|
+
compactions: number;
|
|
333
|
+
};
|
|
323
334
|
}
|
|
324
335
|
/** What a turn says when it was rebuilt after a restart and the session left no answer for it. */
|
|
325
336
|
declare const LOST_ANSWER_ERROR = "The answer was lost while the agent restarted; ask again.";
|
|
@@ -557,12 +568,113 @@ declare class OpenCodeTurn {
|
|
|
557
568
|
*/
|
|
558
569
|
declare function usageOf(tokens: any): MessageUsage;
|
|
559
570
|
|
|
571
|
+
/** Why a turn was stopped by one of its {@link OpenCodeTurnLimits}. */
|
|
572
|
+
type OpenCodeStopReason = 'steps' | 'compactions' | 'wall-clock';
|
|
573
|
+
/**
|
|
574
|
+
* Bounds on one turn, counted from OpenCode's own events for the turn's session. Every bound is
|
|
575
|
+
* optional; a turn without any runs until OpenCode ends it (or `turnTimeoutMs`). The counts are
|
|
576
|
+
* what the turn may do: a limit of N allows N, and the one after stops the turn.
|
|
577
|
+
*/
|
|
578
|
+
interface OpenCodeTurnLimits {
|
|
579
|
+
/** Model rounds (`session.step.started`) the turn may run; the round after the last stops it. */
|
|
580
|
+
steps?: number;
|
|
581
|
+
/** Compactions (`session.compaction.started`) the turn may run; the one after the last stops it. */
|
|
582
|
+
compactions?: number;
|
|
583
|
+
/**
|
|
584
|
+
* Milliseconds from the turn's start (its `begin`) to stop at, time parked on a person included.
|
|
585
|
+
* A limit that passes while the turn is parked lands as soon as it observes OpenCode again.
|
|
586
|
+
*/
|
|
587
|
+
wallClockMs?: number;
|
|
588
|
+
}
|
|
589
|
+
/** What the turn had done when it was stopped. */
|
|
590
|
+
interface OpenCodeTurnCounts {
|
|
591
|
+
steps: number;
|
|
592
|
+
compactions: number;
|
|
593
|
+
elapsedMs: number;
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* A stop that landed on a turn: one of the limits, or the reason the app gave
|
|
597
|
+
* {@link OpenCodeTurns.stopTurn}. On the turn's outcome (`OpenCodeRunResult.outcome.stop`), on
|
|
598
|
+
* `onTurnEnd`, and on the durable workflow's result.
|
|
599
|
+
*/
|
|
600
|
+
interface OpenCodeTurnStop {
|
|
601
|
+
reason: OpenCodeStopReason | (string & {});
|
|
602
|
+
counts: OpenCodeTurnCounts;
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* What a stop did:
|
|
606
|
+
*
|
|
607
|
+
* - `aborted`: the session was aborted; the turn ends failed with `outcome.stop` (code `opencode_stopped`).
|
|
608
|
+
* - `settling`: the answer was already settling; it is kept, and `outcome.stop` still reports the stop.
|
|
609
|
+
* - `pending`: the turn is parked on a person; the stop lands when it observes OpenCode again.
|
|
610
|
+
* - `ignored`: the turn has ended, is not executed in this process (any more), no longer owns its
|
|
611
|
+
* session, the thread's store says another run holds the thread, or the turn was already stopped.
|
|
612
|
+
* - `unconfirmed`: the thread's store could not be read, so nothing was aborted (the abort could
|
|
613
|
+
* have landed on the thread's next turn). Ask again.
|
|
614
|
+
*/
|
|
615
|
+
type OpenCodeStopResult = 'aborted' | 'settling' | 'pending' | 'ignored' | 'unconfirmed';
|
|
616
|
+
/**
|
|
617
|
+
* How a turn ended for the process that executed it: its outcome when it settled here, or
|
|
618
|
+
* `released` when this process stopped executing it without it ending here (another worker took
|
|
619
|
+
* the run over, or this process shut down).
|
|
620
|
+
*/
|
|
621
|
+
type OpenCodeTurnEndStatus = TurnOutcome['status'] | 'released';
|
|
622
|
+
/**
|
|
623
|
+
* Lifecycle hooks of a turn, always called in the process that executes the turn's steps (with
|
|
624
|
+
* `openCodeDurable()`, the worker that runs them, which may not be the one that admitted the
|
|
625
|
+
* question). They carry ids and event types only, never prompts, tool input or output. Errors are
|
|
626
|
+
* logged and never fail the turn. Only `onTurnStart` is waited for, at most `hookTimeoutMs`.
|
|
627
|
+
*
|
|
628
|
+
* Every process that gets `onTurnStart` for a turn gets exactly one `onTurnEnd` for it.
|
|
629
|
+
*/
|
|
630
|
+
interface OpenCodeTurnHooks {
|
|
631
|
+
/**
|
|
632
|
+
* This process starts executing the turn: its `begin`, or (`resumed: true`) a later step after the
|
|
633
|
+
* run moved here — a crash, a run resumed elsewhere after a person answered.
|
|
634
|
+
*/
|
|
635
|
+
onTurnStart?(event: {
|
|
636
|
+
turnId: string;
|
|
637
|
+
threadId: string;
|
|
638
|
+
sessionId: string;
|
|
639
|
+
resumed: boolean;
|
|
640
|
+
}): void | Promise<void>;
|
|
641
|
+
/** One OpenCode event of the turn's own session: its type and the session, nothing else. */
|
|
642
|
+
onTurnEvent?(event: {
|
|
643
|
+
turnId: string;
|
|
644
|
+
type: string;
|
|
645
|
+
sessionId: string;
|
|
646
|
+
}): void;
|
|
647
|
+
/** A stop landed on the turn (a limit, or `stopTurn`): revoke what it holds, record it. */
|
|
648
|
+
onStop?(event: {
|
|
649
|
+
turnId: string;
|
|
650
|
+
reason: OpenCodeTurnStop['reason'];
|
|
651
|
+
counts: OpenCodeTurnCounts;
|
|
652
|
+
}): void | Promise<void>;
|
|
653
|
+
/**
|
|
654
|
+
* This process is done with the turn: it settled here (`succeeded`, `failed`, `interrupted`), it
|
|
655
|
+
* was cancelled while parked here (`interrupted`), or this process let it go (`released`: another
|
|
656
|
+
* worker took it over, or shutdown). `stop` is set when a stop landed on it and is on its outcome.
|
|
657
|
+
*/
|
|
658
|
+
onTurnEnd?(event: {
|
|
659
|
+
turnId: string;
|
|
660
|
+
status: OpenCodeTurnEndStatus;
|
|
661
|
+
stop?: OpenCodeTurnStop;
|
|
662
|
+
}): void | Promise<void>;
|
|
663
|
+
}
|
|
664
|
+
/** The limits as an option: fixed, or per turn. */
|
|
665
|
+
type OpenCodeTurnLimitsOption = OpenCodeTurnLimits | ((input: AgentRunInput) => OpenCodeTurnLimits | undefined);
|
|
666
|
+
/** The error code a stopped turn's run row and stream failure carry. */
|
|
667
|
+
declare const STOPPED_ERROR_CODE = "opencode_stopped";
|
|
668
|
+
|
|
560
669
|
/**
|
|
561
670
|
* Where a turn runs and how its OpenCode session is set up — the part only the host knows. The
|
|
562
671
|
* engine owns everything between the library and OpenCode (sessions per thread, the event stream,
|
|
563
672
|
* the turn's frames, approvals and questions, cancel); the host answers these questions.
|
|
673
|
+
*
|
|
674
|
+
* The turn lifecycle hooks (`onTurnStart`, `onTurnEvent`, `onStop`, `onTurnEnd`) can be set here
|
|
675
|
+
* as well as on the engine's options; both are called, the options' first.
|
|
564
676
|
*/
|
|
565
|
-
interface OpenCodeHost {
|
|
677
|
+
interface OpenCodeHost extends OpenCodeTurnHooks {
|
|
566
678
|
/**
|
|
567
679
|
* The OpenCode server this actor's turns run on — one per tenant in a sandbox, one for the whole
|
|
568
680
|
* deployment, anything. Asked once per turn, so a server that restarted is picked up.
|
|
@@ -817,7 +929,7 @@ interface OpenCodeToolsOptions {
|
|
|
817
929
|
*/
|
|
818
930
|
ttlMs?: number;
|
|
819
931
|
}
|
|
820
|
-
interface OpenCodeEngineSettings {
|
|
932
|
+
interface OpenCodeEngineSettings extends OpenCodeTurnHooks {
|
|
821
933
|
/** The id a run gets (e.g. a tenant prefix your durable store partitions by). Default: a random UUID. */
|
|
822
934
|
runId?: (input: AgentRunInput) => string;
|
|
823
935
|
/**
|
|
@@ -842,6 +954,19 @@ interface OpenCodeEngineSettings {
|
|
|
842
954
|
* parked on a person is not observing: this bounds one stretch of OpenCode working on its own.
|
|
843
955
|
*/
|
|
844
956
|
turnTimeoutMs?: number;
|
|
957
|
+
/**
|
|
958
|
+
* Bounds on each turn: model rounds, compactions, wall-clock time — fixed, or per turn. A turn that
|
|
959
|
+
* passes one is stopped: its session is aborted (while the turn still owns it) and the turn ends
|
|
960
|
+
* failed with `outcome.stop` (code `opencode_stopped`), or, when its answer was already settling,
|
|
961
|
+
* succeeded with the answer kept and `outcome.stop` set. Omit → no bounds besides `turnTimeoutMs`.
|
|
962
|
+
*/
|
|
963
|
+
limits?: OpenCodeTurnLimitsOption;
|
|
964
|
+
/**
|
|
965
|
+
* How long a step waits for `onTurnStart` before going on. The other hooks are not waited for (they
|
|
966
|
+
* observe); each is still given this long before a warning is logged. Default 5 seconds; it must
|
|
967
|
+
* be a positive number (anything else is refused when the module starts).
|
|
968
|
+
*/
|
|
969
|
+
hookTimeoutMs?: number;
|
|
845
970
|
/**
|
|
846
971
|
* Whose figure a model call is recorded at. OpenCode prices each call itself, off its model
|
|
847
972
|
* catalog (the `cost` its config declares, else models.dev's list price):
|
|
@@ -862,6 +987,8 @@ interface SessionHandle {
|
|
|
862
987
|
serverKey: string;
|
|
863
988
|
bootId?: string;
|
|
864
989
|
directory?: string;
|
|
990
|
+
/** When the turn began (epoch ms): what `limits.wallClockMs` is measured from, in any process. */
|
|
991
|
+
startedAt?: number;
|
|
865
992
|
}
|
|
866
993
|
/** What the engine's MCP endpoint tells the turns about the call it is serving. */
|
|
867
994
|
interface OpenCodeToolCall {
|
|
@@ -907,6 +1034,16 @@ declare class OpenCodeTurns implements OnApplicationShutdown {
|
|
|
907
1034
|
private readonly spent;
|
|
908
1035
|
/** When the tools endpoint was last registered for a location (`server|boot|directory|actor`). */
|
|
909
1036
|
private readonly toolsIssued;
|
|
1037
|
+
/**
|
|
1038
|
+
* What a turn let go of here had spent, for a settle that follows here (a cancel in this process
|
|
1039
|
+
* that settles after the turn was released). Dropped when the run settles here, or after
|
|
1040
|
+
* {@link RELEASED_USAGE_MS} when it settles elsewhere, so no run is kept for good.
|
|
1041
|
+
*/
|
|
1042
|
+
private readonly releasedUsage;
|
|
1043
|
+
private keepReleasedUsage;
|
|
1044
|
+
/** The turns this process executes, and which turn owns each session (`server|session`). */
|
|
1045
|
+
private readonly watches;
|
|
1046
|
+
private readonly owners;
|
|
910
1047
|
constructor(host: OpenCodeHost, sessions: OpenCodeSessionStore, settings: OpenCodeEngineSettings,
|
|
911
1048
|
/** Read by the MCP endpoint too (genui telemetry of the calls OpenCode makes). */
|
|
912
1049
|
store: AgentStore, sink: TokenStreamSink, deps: AgentDepsFactory, registry: ToolRegistry, skills?: SkillsConfig | undefined, memory?: MemoryConfig | undefined, queue?: ChatQueueService | undefined, toolsTokens?: (OpenCodeToolsTokens | null) | undefined, pricingStore?: AgentPricingStore, agentOptions?: {
|
|
@@ -1024,12 +1161,18 @@ declare class OpenCodeTurns implements OnApplicationShutdown {
|
|
|
1024
1161
|
* back from the session's messages, when the execution ends, what nobody heard after that.
|
|
1025
1162
|
*/
|
|
1026
1163
|
observe(runId: string, input: AgentRunInput, handle: SessionHandle, spent?: OpenCodeUsage, progress?: TurnProgress): Promise<Milestone>;
|
|
1164
|
+
private observeLive;
|
|
1027
1165
|
/**
|
|
1028
1166
|
* Hand a person's answer back to OpenCode. When the server restarted while the turn waited, the
|
|
1029
1167
|
* request is gone with it: a new session is opened, told what the person decided, and prompted
|
|
1030
1168
|
* to go on.
|
|
1031
1169
|
*/
|
|
1032
1170
|
reply(runId: string, input: AgentRunInput, handle: SessionHandle, ask: PendingAsk, reply: HumanReply, spent?: OpenCodeUsage, progress?: TurnProgress): Promise<SessionHandle>;
|
|
1171
|
+
/**
|
|
1172
|
+
* A stopping turn whose OpenCode server restarted while it waited: there is no session left to
|
|
1173
|
+
* abort, and none is opened or prompted. The ask is settled as refused and the turn ends stopped.
|
|
1174
|
+
*/
|
|
1175
|
+
private stopAfterRestart;
|
|
1033
1176
|
private continueAfterRestart;
|
|
1034
1177
|
/** What a session spent so far (`session.get`), or nothing when OpenCode does not say. */
|
|
1035
1178
|
private sessionUsage;
|
|
@@ -1038,8 +1181,23 @@ declare class OpenCodeTurns implements OnApplicationShutdown {
|
|
|
1038
1181
|
private ensureLive;
|
|
1039
1182
|
/** Stop following a run in this process. */
|
|
1040
1183
|
drop(runId: string): void;
|
|
1041
|
-
/**
|
|
1184
|
+
/**
|
|
1185
|
+
* Stop following a run and drop the approvals it was granted: it is over. Returns the turn this
|
|
1186
|
+
* process executed, now settled (no stop reaches it any more), for its `onTurnEnd`.
|
|
1187
|
+
*/
|
|
1042
1188
|
private forget;
|
|
1189
|
+
/**
|
|
1190
|
+
* A run that ended without settling here (cancelled while this process executed it; whoever
|
|
1191
|
+
* cancelled settled it): stop following it, and end the turn this process executed.
|
|
1192
|
+
*/
|
|
1193
|
+
abandon(runId: string): Promise<void>;
|
|
1194
|
+
/**
|
|
1195
|
+
* Let go of a turn this process executed without settling it here: it was cancelled while parked
|
|
1196
|
+
* (its session ended under it, `interrupted`), another worker took it over, or this process shuts
|
|
1197
|
+
* down (`released`). The per-turn state goes, `onTurnEnd` fires once, and a later stop of the turn
|
|
1198
|
+
* here is ignored. Nothing settles the run here afterwards: whoever answered or cancelled it does.
|
|
1199
|
+
*/
|
|
1200
|
+
private release;
|
|
1043
1201
|
/** A person was asked something: tell the host (cards in other channels, wake-ups). */
|
|
1044
1202
|
private reached;
|
|
1045
1203
|
/**
|
|
@@ -1065,8 +1223,84 @@ declare class OpenCodeTurns implements OnApplicationShutdown {
|
|
|
1065
1223
|
* End the run's stream and bookkeeping for how its execution ended. `spent` is what the run spent
|
|
1066
1224
|
* (the sum of its milestones' `usage`); omit → what the turn this process follows saw.
|
|
1067
1225
|
*/
|
|
1068
|
-
settle(runId: string, input: AgentRunInput,
|
|
1069
|
-
settleFailed(runId: string, input: AgentRunInput, error: string, durationMs?: number, spent?: OpenCodeUsage): Promise<
|
|
1226
|
+
settle(runId: string, input: AgentRunInput, ended: TurnOutcome, durationMs: number, spent?: OpenCodeUsage): Promise<TurnOutcome>;
|
|
1227
|
+
settleFailed(runId: string, input: AgentRunInput, error: string, durationMs?: number, spent?: OpenCodeUsage, stop?: OpenCodeTurnStop): Promise<TurnOutcome>;
|
|
1228
|
+
/**
|
|
1229
|
+
* Stop a turn's own work: abort its session so OpenCode starts no new round, only while the turn
|
|
1230
|
+
* still owns the session (a thread's session is reused by its next turn) — checked immediately
|
|
1231
|
+
* before the abort. Acts in the process executing the turn; see {@link OpenCodeStopResult}. The
|
|
1232
|
+
* turn ends failed with `outcome.stop` (code `opencode_stopped`), and `onStop` is called.
|
|
1233
|
+
*/
|
|
1234
|
+
stopTurn(turnId: string, reason: OpenCodeTurnStop['reason']): Promise<OpenCodeStopResult>;
|
|
1235
|
+
/** The turn this process executes, made known here on its first step in this process. */
|
|
1236
|
+
private adopt;
|
|
1237
|
+
private limitsFor;
|
|
1238
|
+
/**
|
|
1239
|
+
* One event of the turn's session: counted for the limits, and told to `onTurnEvent`. While the
|
|
1240
|
+
* turn is parked on a person here, it may also say the turn went on without this process
|
|
1241
|
+
* ({@link wentOnElsewhere}).
|
|
1242
|
+
*/
|
|
1243
|
+
private sawEvent;
|
|
1244
|
+
/**
|
|
1245
|
+
* Whether a turn parked here went on without this process, which then lets it go. While a tool of
|
|
1246
|
+
* the step waits on a person, OpenCode keeps running the step's other tools, so their events say
|
|
1247
|
+
* nothing. What does: a new round (`session.step.started`, which cannot begin while the step
|
|
1248
|
+
* waits), or the store showing the parked ask decided by someone else (another worker answered
|
|
1249
|
+
* it, or a cancel elsewhere settled it) — this process clears the park before it answers. When
|
|
1250
|
+
* the session's execution ends while parked, the store is asked again for a while, as a cancel
|
|
1251
|
+
* elsewhere settles the ask just after it interrupted the session; with the ask still open, the
|
|
1252
|
+
* turn stays here for its answer.
|
|
1253
|
+
*/
|
|
1254
|
+
private wentOnElsewhere;
|
|
1255
|
+
/**
|
|
1256
|
+
* Ask the store whether the parked ask was decided elsewhere, and let the turn go when it was —
|
|
1257
|
+
* one read at a time, at most one every {@link PARKED_READ_GAP_MS}. `series`: the session's
|
|
1258
|
+
* execution ended, so the store is asked again over {@link parkedRechecksMs}. An execution that
|
|
1259
|
+
* was interrupted under a parked turn means a cancel elsewhere: when the store cannot say (it has
|
|
1260
|
+
* no `toolCallApproval`, the read fails, the ask is not on file) past the first recheck, or the
|
|
1261
|
+
* rechecks run out with the ask still open, the turn is let go as `interrupted` anyway.
|
|
1262
|
+
*/
|
|
1263
|
+
private checkParked;
|
|
1264
|
+
/**
|
|
1265
|
+
* The checks of {@link checkParked}. `checking` is cleared in the same step the loop returns in,
|
|
1266
|
+
* so a check asked for afterwards starts a new loop; one asked for while it ran (`again`) but not
|
|
1267
|
+
* read because the loop returned starts one too.
|
|
1268
|
+
*/
|
|
1269
|
+
private runParkedChecks;
|
|
1270
|
+
private parkedChecks;
|
|
1271
|
+
/** What the store says of an ask: decided, still open, or nothing it can tell. */
|
|
1272
|
+
private parkedAsk;
|
|
1273
|
+
/**
|
|
1274
|
+
* The waits between the store's rereads of a parked ask after its execution ended (cumulative
|
|
1275
|
+
* 0.25, 1.25, 4.25, 14.25 and 44.25 seconds after the first). Overridden by tests only.
|
|
1276
|
+
*
|
|
1277
|
+
* @internal
|
|
1278
|
+
*/
|
|
1279
|
+
parkedRechecksMs: readonly number[];
|
|
1280
|
+
/** A limit's stop: what it did is the engine's to log, there is no caller to tell. */
|
|
1281
|
+
private limitStop;
|
|
1282
|
+
/** The wall-clock bound of an observation: a timer for what is left of it, if anything. */
|
|
1283
|
+
private watchClock;
|
|
1284
|
+
private counts;
|
|
1285
|
+
private requestStop;
|
|
1286
|
+
/** A stop that arrived while the answer settles: recorded and reported, the answer kept. */
|
|
1287
|
+
private landed;
|
|
1288
|
+
/** The milestone as the runner journals it: the limits' counts on an ask, the stop on an end. */
|
|
1289
|
+
private marked;
|
|
1290
|
+
/**
|
|
1291
|
+
* How a turn a stop landed on ends. An answer that settled anyway is kept, with the stop on it; an
|
|
1292
|
+
* execution that failed on its own keeps its error, with the stop on it; an execution the stop
|
|
1293
|
+
* aborted ends failed with the stop's own text. One interrupted by a person's cancel stays so.
|
|
1294
|
+
*/
|
|
1295
|
+
private withStop;
|
|
1296
|
+
/** `onTurnEnd`, once per turn this process executed; not waited for. */
|
|
1297
|
+
private ended;
|
|
1298
|
+
/**
|
|
1299
|
+
* A lifecycle hook, from the settings and the host, called at once. The promise settles when both
|
|
1300
|
+
* have, or after `hookTimeoutMs` (default 5 s) — only `onTurnStart` is waited for. Errors are
|
|
1301
|
+
* logged, never the turn's.
|
|
1302
|
+
*/
|
|
1303
|
+
private hook;
|
|
1070
1304
|
/** Starts the next queued message of the thread; set by the runner (it owns `start`). */
|
|
1071
1305
|
startNext: ((next: AgentRunInput, runId: string) => Promise<unknown>) | undefined;
|
|
1072
1306
|
/** As `InlineAgentRunner`: hand the thread to its next queued message, and say so on the stream. */
|
|
@@ -1094,4 +1328,4 @@ declare function openCodeControllers(options: OpenCodeEngineSettings): Type<obje
|
|
|
1094
1328
|
/** The providers every OpenCode engine needs: host, session store, settings and the turn steps. */
|
|
1095
1329
|
declare function openCodeProviders(options: OpenCodeEngineOptions): Provider[];
|
|
1096
1330
|
|
|
1097
|
-
export { type
|
|
1331
|
+
export { openCode as $, type OpenCodeToolCall as A, OpenCodeToolRefusedError as B, type OpenCodeToolsClaims as C, type OpenCodeToolsOptions as D, OpenCodeToolsTokens as E, OpenCodeTurn as F, type OpenCodeTurnContext as G, type OpenCodeTurnCounts as H, InMemoryOpenCodeSessionStore as I, type OpenCodeTurnEndStatus as J, type OpenCodeTurnHooks as K, LOST_ANSWER_ERROR as L, type Milestone as M, type OpenCodeTurnLimits as N, OpenCodeTurns as O, type OpenCodeTurnLimitsOption as P, type OpenCodeUsage as Q, type PendingAsk as R, STOPPED_ERROR_CODE as S, type SessionHandle as T, type StepCost as U, type StepModel as V, type TurnOutcome as W, type TurnProgress as X, addUsage as Y, emptyUsage as Z, keyValueOpenCodeSessionStore as _, type OpenCodeEngineSettings as a, openCodeControllers as a0, openCodeProviders as a1, usageOf as a2, type OpenCodeHost as b, type OpenCodeTurnStop as c, type OpenCodeEngineOptions as d, type OpenCodeClient as e, type OpenCodeEvent as f, type OpenCodeForm as g, type OpenCodeFormValue as h, type OpenCodeFormField as i, OpenCodeMcpEndpoint as j, type OpenCodeAmendment as k, type OpenCodeCallContext as l, type OpenCodeKeyValue as m, type OpenCodeMessage as n, type OpenCodeMessagePart as o, type OpenCodeModelRef as p, type OpenCodePermissionRequest as q, type OpenCodePermissionRule as r, OpenCodeReplyMismatchError as s, type OpenCodeRunResult as t, type OpenCodeServer as u, type OpenCodeSessionCreate as v, type OpenCodeSessionRef as w, type OpenCodeSessionStore as x, type OpenCodeStopReason as y, type OpenCodeStopResult as z };
|