UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

91 lines • 5.3 kB
import type { EffectOutcome } from "./effect-record.ts"; /** * The user-facing copy of every effect outcome that is not a plain success: the code, what happened in * plain words, and what the caller can do. One table so a client renders the same words the host wrote. */ export declare const EFFECT_OUTCOMES: { readonly inputInterruptedByReopen: { readonly kind: "interrupted_by_reopen"; readonly reason: "interrupted_by_reopen"; readonly detail: "the session was reopened while this input's turn was running, so that turn never finished"; readonly action: "read the transcript for what the turn produced, then send the input again with a new clientMessageId"; }; readonly inputCleared: { readonly kind: "cleared"; readonly reason: "cleared"; readonly detail: "the queue was cleared (clear_queue, or abort or unload_session with clearQueue) before this queued input was delivered"; readonly action: "send the input again with a new clientMessageId if it is still needed"; }; readonly queuedInputAlreadyDelivered: { readonly kind: "already_delivered"; readonly reason: "already_delivered"; readonly detail: "the queued message had already been handed to the agent, so it can no longer be removed or edited"; readonly action: "send a follow-up message to correct it, or abort the turn"; }; readonly queuedInputNotFound: { readonly kind: "not_found"; readonly reason: "not_found"; readonly detail: "no queued message has this queuedId in this session"; readonly action: "read queuedId values from get_state or queue_update and retry with one that is still queued"; }; readonly queuedInputConflict: { readonly kind: "conflict"; readonly reason: "conflict"; readonly detail: "the queued message was changed after the revision this request was based on, so nothing was changed"; readonly action: "read the input's current text and revision from get_state or queue_update, then retry with that expectedRevision if the change still applies"; }; readonly inputDroppedByReplace: { readonly kind: "dropped_by_replace"; readonly reason: "dropped_by_replace"; readonly detail: "the session was replaced (new_session, switch_session or fork) before this queued input was delivered"; readonly action: "send the input again with a new clientMessageId on the current session"; }; readonly abortInterruptedByReopen: { readonly kind: "interrupted_by_reopen"; readonly reason: "interrupted_by_reopen"; readonly detail: "the session was reopened, so the turn this abort targeted is no longer running"; }; readonly setModelInterruptedByReopen: { readonly kind: "interrupted_by_reopen"; readonly reason: "interrupted_by_reopen"; readonly detail: "the host restarted before the model switch was applied"; readonly action: "send set_model again with a new effectId"; }; readonly setModelSuperseded: { readonly kind: "superseded"; readonly reason: "superseded"; readonly detail: "a newer model selection replaced this switch before it was applied"; readonly action: "read the current model, then send set_model with a new effectId if you still want this model"; }; readonly setModelDroppedByReplace: { readonly kind: "dropped_by_replace"; readonly reason: "dropped_by_replace"; readonly detail: "the session was replaced (new_session, switch_session or fork) before this model switch was applied"; readonly action: "read the current model, then send set_model with a new effectId on the current session"; }; readonly setThinkingInterruptedByReopen: { readonly kind: "interrupted_by_reopen"; readonly reason: "interrupted_by_reopen"; readonly detail: "the host restarted before the thinking level was applied"; readonly action: "send set_thinking_level again with a new effectId"; }; readonly dequeueInterruptedByReopen: { readonly kind: "interrupted_by_reopen"; readonly reason: "interrupted_by_reopen"; readonly detail: "the session was reopened before the queued input was removed"; readonly action: "re-read queue_update.ordered and retry with a new effectId"; }; readonly editQueuedInterruptedByReopen: { readonly kind: "interrupted_by_reopen"; readonly reason: "interrupted_by_reopen"; readonly detail: "the session was reopened before the queued input was edited"; readonly action: "re-read queue_update.ordered and retry with a new effectId"; }; }; export declare function unknownModelOutcome(provider: string, modelId: string): EffectOutcome; export declare function providerUnavailableOutcome(detail: string): EffectOutcome; export declare function contextBudgetOutcome(detail: string): EffectOutcome; export declare function modelSwitchErrorOutcome(detail: string): EffectOutcome; export declare function unsupportedThinkingLevelOutcome(detail: string): EffectOutcome; export declare function turnErrorOutcome(detail: string | undefined): EffectOutcome; //# sourceMappingURL=effect-outcome-copy.d.ts.map