@x-otto/composition 0.0.0-stage → 0.3.0-beta.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.
@@ -0,0 +1,968 @@
1
+ import * as _$_x_otto_kernel0 from "@x-otto/kernel";
2
+ import { AgentLimits, AgentSessionHandle, AgentSessionRegistry, Api, AskScope, AssemblyDiagnostic, AssemblyDiagnostic as AssemblyDiagnostic$1, AuthStore, BUILTIN_TUI_REGION_DECLARATIONS, ChatAttachment, Clock, Env, ExecutionBackend, ExecutionStatus, Id, InputReceipt, InstallStore, InstalledItem, InterruptReceipt, IssuedExecutionRootRecord, LeaseLivenessEvidence, LostJob, Message, ModelRef, PluginEntry, PluginManifest, Ports, ProviderCandidate, ProviderPackage, QueueEntry, QueueRevisionConflict, RecoveryAccelerateReceipt, RecoveryCancelReceipt, RecoveryTarget, RemoteSessionSend, ResidencyPerfSnapshot, RestartContinuationResume, RetryLastRoundRefusal, RuntimeAskChannels, RuntimeDiagnosticInput, RuntimeEnv, ServiceEvent, ServiceMethodMap, ServiceSource, SessionActivityWatchPort, SessionEntry, SessionManager, SessionMeta, SessionPrepareResult, SessionRestoreResult, SteerReceipt, SubagentLimits, TrajectoryEvent, WorkLoopLimits, WorkerRestartResumePhase, WorkerRestartRetryIdentity, WorkerRestartStore, WorkerRestartView, WorkspaceLocator, WorkspaceReadiness, WorkspaceReadinessSnapshot, WorkspaceSummary } from "@x-otto/kernel";
3
+ import * as _$_x_otto_universal0 from "@x-otto/universal";
4
+ import { Accessor, Component, Context, Fiber } from "@x-otto/universal";
5
+ import { PendingResultState, ResultMergeOutcome, ResultRecord, SessionLeaseLossCause, isTerminalResultState, mergeResultFrame, noticeAnchorsFromProjection, pendingResultKeys, projectHistory, projectPromptEnd, projectPromptStart, projectStreamEvent, projectToolEnd, projectToolStart, resultsNeedingResync, turnCompletionKey, turnEndAnchorsFromProjection, turnEndAnchorsOf } from "@x-otto/session";
6
+ import { PersistenceOptions } from "@x-otto/persistence";
7
+ import { InstallComponentOptions, OfficialRegistry, TrustReconcileResult } from "@x-otto/install";
8
+ import { SubagentLimitProfile } from "@x-otto/agent-session";
9
+ import { AskDiagnostic } from "@x-otto/service";
10
+ import { ConfigStore, SETTINGS_COMMAND_OWNER, SettingFieldMetadata, SettingsOptions } from "@x-otto/settings";
11
+ import { LlmComponentOptions, ManualCodeReaderFactory } from "@x-otto/llm";
12
+ import { WorkspaceConfig, WorkspaceRuntime } from "@x-otto/workspace-root";
13
+ import { MemoryScopeRef, MemoryStore } from "@x-otto/memory";
14
+ import { BootEnv, BootEnv as BootEnv$1, BootEnvResult, OTTO_ROOT, resolveBootEnv } from "@x-otto/env";
15
+ import { IsolatedArtifacts, SubagentWorkspaceOptions, collectIsolatedArtifacts, createSubagentWorkspaceRoots } from "@x-otto/subagent";
16
+ import { AttributionVolume } from "@x-otto/ottofs";
17
+ import { AuthStoreOptions } from "@x-otto/auth-store";
18
+ import { RESIDENCY_DISABLED_ENV, ResidencyHost, ResidencyHost as ResidencyHost$1, ResidencyHostDiagnostics, ResidencyHostOptions, ResidencyHostOptions as ResidencyHostOptions$1, createResidencyHost, processTreeSamplingReason, residencyEnabledFromEnv } from "@x-otto/residency/host";
19
+
20
+ //#region src/assembly/app-phase.d.ts
21
+ type AppPhase = 'assembling' | 'ready' | 'failed' | 'closing' | 'closed';
22
+ //#endregion
23
+ //#region src/ottofs-attribution.d.ts
24
+ interface OttofsAttributionOptions {
25
+ readonly volume: AttributionVolume;
26
+ readonly reconcileIntervalMs?: number;
27
+ readonly starttimeOf?: (pid: number) => number | undefined;
28
+ readonly processGroupAlive?: (pid: number) => boolean;
29
+ readonly log?: (message: string) => void;
30
+ }
31
+ //#endregion
32
+ //#region src/setting-field-specs.d.ts
33
+ declare const LEASE_ABSENT_POLICIES: readonly ["deny-write", "report-only"];
34
+ type LeaseAbsentPolicy = (typeof LEASE_ABSENT_POLICIES)[number];
35
+ //#endregion
36
+ //#region src/plugin-component.d.ts
37
+ interface PluginComponentOptions {
38
+ pluginRoot: string;
39
+ trustStateDir?: () => string | undefined;
40
+ }
41
+ //#endregion
42
+ //#region src/assembly-diagnostic-sink.d.ts
43
+ interface DiagnosticChannel<Entry> {
44
+ record(entry: Entry): void;
45
+ read(): readonly Entry[];
46
+ }
47
+ interface DiagnosticRing<Entry> extends DiagnosticChannel<Entry> {
48
+ total(): number;
49
+ subscribe(listener: () => void): () => void;
50
+ clear(): void;
51
+ }
52
+ interface AssemblyDiagnosticSink extends DiagnosticRing<AssemblyDiagnostic$1> {
53
+ clearForTest(): void;
54
+ }
55
+ declare function createAssemblyDiagnosticSink(capacity?: number): AssemblyDiagnosticSink;
56
+ //#endregion
57
+ //#region src/plugin-process-state.d.ts
58
+ interface TrustLedgerRecord {
59
+ readonly id: string;
60
+ readonly trustedAt: string;
61
+ readonly trustedReason: 'local-workspace' | 'manual';
62
+ readonly trustedCapabilitiesSnapshot: readonly string[];
63
+ readonly trustedContentRevision?: string;
64
+ }
65
+ //#endregion
66
+ //#region src/plugin-watch.d.ts
67
+ interface WatchLivenessOptions {
68
+ intervalMs: number;
69
+ silentAfterMs: number;
70
+ directory?: string;
71
+ pollIntervalMs?: number;
72
+ pollMaxIntervalMs?: number;
73
+ }
74
+ //#endregion
75
+ //#region src/extension-host.d.ts
76
+ interface TrustReconcileInput {
77
+ readonly trustedReason?: string;
78
+ readonly trustedCapabilitiesSnapshot?: readonly string[];
79
+ readonly trustedContentRevision?: string;
80
+ readonly currentCapabilities: readonly string[];
81
+ readonly currentContentRevision?: string;
82
+ }
83
+ interface ExtensionHostOptions {
84
+ moduleBudget?: number;
85
+ leaseSweepIntervalMs?: number;
86
+ watchLiveness?: WatchLivenessOptions | false;
87
+ bundled?: readonly InstalledItem[];
88
+ assemblyDiagnostics?: AssemblyDiagnosticSink;
89
+ stateDir?: string;
90
+ ottoHome?: string;
91
+ readTrustLedger?: (stateDir: string) => Promise<TrustLedgerReadForReconcile>;
92
+ reconcileTrust?: (input: TrustReconcileInput) => TrustReconcileResult;
93
+ refreshAdopted?: () => readonly InstalledItem[];
94
+ }
95
+ type TrustLedgerReadForReconcile = {
96
+ readonly kind: 'ok';
97
+ readonly records: readonly TrustLedgerRecord[];
98
+ } | {
99
+ readonly kind: 'unavailable';
100
+ readonly reason: string;
101
+ };
102
+ //#endregion
103
+ //#region src/app-options.d.ts
104
+ type AppSettingsOptions = Omit<SettingsOptions, 'globalPath' | 'projectPath'>;
105
+ interface AppOptions {
106
+ directory?: string;
107
+ sessionDataDirectory?: string;
108
+ workspaceStoreDirectory?: string;
109
+ workspaceConfig?: WorkspaceConfig;
110
+ deliveryDirectory?: string;
111
+ cwd: string;
112
+ bundledPlugins?: readonly string[];
113
+ bundledPluginDirectories?: ReadonlyMap<string, string>;
114
+ llm?: LlmComponentOptions;
115
+ providerPackages?: ProviderPackage[];
116
+ persistence?: PersistenceOptions;
117
+ workerRestartStore?: _$_x_otto_kernel0.WorkerRestartStore;
118
+ workerRestartResume?: {
119
+ workerScopeKey: string;
120
+ workspaceKeys: readonly string[];
121
+ concurrency?: number;
122
+ onActiveChange?(active: boolean): void;
123
+ onChanged?(view: _$_x_otto_kernel0.WorkerRestartView): void;
124
+ onResumeRequest?(listener: () => void): void;
125
+ };
126
+ settings?: AppSettingsOptions;
127
+ spaceChangeReporter?: SpaceChangeReporter;
128
+ lease?: {
129
+ timeoutMs?: number;
130
+ heartbeatIntervalMs?: number;
131
+ absentPolicy?: LeaseAbsentPolicy;
132
+ instanceBoot?: string;
133
+ };
134
+ stallWarnMs?: number;
135
+ stallHeartbeatMs?: number;
136
+ install?: Partial<InstallComponentOptions>;
137
+ extensionHost?: Pick<ExtensionHostOptions, 'watchLiveness' | 'moduleBudget'>;
138
+ plugin?: Partial<PluginComponentOptions>;
139
+ authStore?: Partial<AuthStoreOptions>;
140
+ manualCodeReaderFactory?: ManualCodeReaderFactory;
141
+ subagent?: SubagentLimits;
142
+ subagentAgentLimits?: SubagentLimitProfile;
143
+ agent?: Partial<AgentLimits>;
144
+ computePool?: {
145
+ enabled?: boolean;
146
+ size?: number;
147
+ };
148
+ workLoop?: Partial<WorkLoopLimits>;
149
+ releaseTimeoutMs?: number;
150
+ sessionSend?: RemoteSessionSend;
151
+ system?: string;
152
+ ports?: Partial<Ports>;
153
+ executionBackend?: ExecutionBackend;
154
+ env?: Env;
155
+ bootEnv?: BootEnv$1;
156
+ workspace?: {
157
+ interactive?: boolean;
158
+ exactRoot?: boolean;
159
+ };
160
+ residency?: Omit<ResidencyHostOptions$1, 'ports'>;
161
+ ottofs?: OttofsAttributionOptions;
162
+ memory?: {
163
+ compactionModel?: ModelRef | (() => ModelRef | undefined);
164
+ };
165
+ memoryRepositoryFactory?: (scope: MemoryScopeRef) => MemoryStore;
166
+ settingsRepositoryFactory?: () => ConfigStore;
167
+ }
168
+ interface SpaceChangeReporter {
169
+ report(): Promise<unknown>;
170
+ }
171
+ //#endregion
172
+ //#region src/app-helpers.d.ts
173
+ declare function resolveSettingsPaths(bootEnv: BootEnv$1, directory: string | undefined, cwd: string | undefined): {
174
+ globalPath?: string;
175
+ projectPath?: string;
176
+ };
177
+ //#endregion
178
+ //#region src/performance-diagnostic-sink.d.ts
179
+ interface PerformanceDiagnosticStats {
180
+ runId: string;
181
+ pid: number;
182
+ implementation: string;
183
+ identityScope: 'sink-factory-only';
184
+ path: string;
185
+ received: number;
186
+ written: number;
187
+ dropped: number;
188
+ writeFailures: number;
189
+ pending: number;
190
+ unconfirmed: number;
191
+ }
192
+ interface PerformanceDiagnosticSinkOptions {
193
+ directory: string;
194
+ clock: Clock;
195
+ id: Id;
196
+ capacity?: number;
197
+ maxFileBytes?: number;
198
+ maxFiles?: number;
199
+ flushIntervalMs?: number;
200
+ shutdownDeadlineMs?: number;
201
+ onFailure?(error: unknown): void;
202
+ }
203
+ declare function createPerformanceDiagnosticSink(options: PerformanceDiagnosticSinkOptions): {
204
+ path: string;
205
+ stats: () => PerformanceDiagnosticStats;
206
+ record(input: RuntimeDiagnosticInput): void;
207
+ flush: () => Promise<void>;
208
+ dispose(remainingMs?: number): Promise<void>;
209
+ };
210
+ type PerformanceDiagnosticSink = ReturnType<typeof createPerformanceDiagnosticSink>;
211
+ //#endregion
212
+ //#region src/writer-routing.d.ts
213
+ interface WriterRoutingEntry {
214
+ pid: number;
215
+ instanceBoot?: string;
216
+ }
217
+ interface WriterRoutingTable {
218
+ register(workspaceKey: string, sessionId: string, entry: WriterRoutingEntry): void;
219
+ unregister(workspaceKey: string, sessionId: string, entry?: WriterRoutingEntry): void;
220
+ holderOf(workspaceKey: string | undefined, sessionId: string): WriterRoutingEntry | undefined;
221
+ }
222
+ //#endregion
223
+ //#region src/ports/liveness.d.ts
224
+ type LivenessEvidence = LeaseLivenessEvidence;
225
+ interface LivenessProbe {
226
+ probeAsync?(pid: number): Promise<LivenessEvidence>;
227
+ probe(pid: number): LivenessEvidence;
228
+ }
229
+ interface HostIdentity {
230
+ host: string;
231
+ bootId: string;
232
+ machineId: string;
233
+ processStartedAt?: number;
234
+ describe(): string;
235
+ }
236
+ interface NodeHostIdentityOptions {
237
+ home?: string;
238
+ id: Id;
239
+ platformBootId?: () => string | undefined;
240
+ }
241
+ declare function createNodeLivenessProbe(): LivenessProbe;
242
+ declare function probeProcessStartedAt(pid: number): number | undefined;
243
+ declare function probeProcessStartedAtAsync(pid: number): Promise<number | undefined>;
244
+ declare function createNodeHostIdentity(options: NodeHostIdentityOptions): HostIdentity;
245
+ //#endregion
246
+ //#region src/agent-lease.d.ts
247
+ interface SessionLeasePorts {
248
+ holder: {
249
+ pid: number;
250
+ boot: string;
251
+ host?: string;
252
+ instance?: string;
253
+ bootId?: string;
254
+ startedAt?: number;
255
+ };
256
+ timeoutMs: number;
257
+ heartbeatIntervalMs?: number;
258
+ identity?: HostIdentity;
259
+ liveness?: LivenessProbe;
260
+ hardLock?: SessionLeaseHardLockPorts;
261
+ absentPolicy?(): LeaseAbsentPolicy;
262
+ externalWriteAuthority?(): boolean;
263
+ sameHostStorage?(): boolean;
264
+ processStartedAt?(pid: number): number | undefined;
265
+ processStartedAtAsync?(pid: number): Promise<number | undefined>;
266
+ now(): number;
267
+ idleReleaseMs?(): number | undefined;
268
+ isSessionWorking(sessionId: string): boolean;
269
+ isSessionScheduled?(sessionId: string): Promise<boolean>;
270
+ onLeaseStateChange?(sessionId: string, valid: boolean, token?: string, cause?: SessionLeaseLossCause): void;
271
+ }
272
+ type SessionLeaseHardLockProbe = 'writable' | 'readonly' | 'unsupported' | 'held-by-self';
273
+ interface SessionLeaseHardLockPorts {
274
+ acquire(sessionId: string): Promise<void>;
275
+ release(sessionId: string): Promise<void>;
276
+ probe(sessionId: string): Promise<SessionLeaseHardLockProbe>;
277
+ }
278
+ //#endregion
279
+ //#region src/diagnostic-coordinator.d.ts
280
+ type DiagnosticFallback = (message: string) => void;
281
+ interface RuntimeDiagnosticsRing {
282
+ push(input: RuntimeDiagnosticInput): void;
283
+ read(): readonly RuntimeDiagnosticInput[];
284
+ clear(): void;
285
+ }
286
+ //#endregion
287
+ //#region src/agent-service-types.d.ts
288
+ type EventSink = (sessionId: string, event: ServiceEvent) => void;
289
+ type QueueUpdateOutcome = ServiceMethodMap['chat.queue.update']['output'];
290
+ type QueuePromoteOutcome = ServiceMethodMap['chat.queue.promote']['output'];
291
+ type QueueMoveOutcome = ServiceMethodMap['chat.queue.move']['output'];
292
+ type ViewCloseInput = ServiceMethodMap['view.close']['input'];
293
+ type ViewCloseOutput = ServiceMethodMap['view.close']['output'];
294
+ interface AgentService extends ServiceSource {
295
+ createSession(input?: Record<string, unknown>): Promise<SessionEntry>;
296
+ effectiveModelRefOf?(sessionId: string): _$_x_otto_kernel0.ModelRef | undefined;
297
+ onEvent(sink: EventSink): () => void;
298
+ readArchivedHistory(sessionId: string, options?: {
299
+ limit?: number;
300
+ }): Promise<ServiceMethodMap['session.archivedHistory']['output']>;
301
+ readSessionSurface(sessionId: string, options?: {
302
+ limitMessages?: number;
303
+ beforeSeq?: number;
304
+ }): Promise<ServiceMethodMap['session.surface.read']['output']>;
305
+ listForkPoints(sessionId: string): Promise<ServiceMethodMap['session.forkPoints.list']['output']>;
306
+ forkSession(sessionId: string, input?: {
307
+ boundarySeq?: number;
308
+ label?: string;
309
+ childId?: string;
310
+ }): Promise<ServiceMethodMap['session.fork']['output']>;
311
+ announcePluginReplaced(id: string): void;
312
+ announceUiCatalogChanged(revision: number, revisionEpoch?: string): void;
313
+ announceAskDescendantsChanged(sessionId: string): void;
314
+ isSessionLeaseReadOnly?(sessionId: string): Promise<boolean>;
315
+ deferAwaitingResults?(sessionId: string): {
316
+ deferred: number;
317
+ } | Promise<{
318
+ deferred: number;
319
+ }>;
320
+ submitInput(sessionId: string, text: string, mode?: 'queue' | 'takeover', stageAttemptId?: string, attachments?: readonly ChatAttachment[], deliveryRequestId?: string): InputReceipt | Promise<InputReceipt>;
321
+ readChatSendAttempt(input: {
322
+ sessionId: string;
323
+ attemptId: string;
324
+ mode: 'queue' | 'takeover';
325
+ fingerprint: string;
326
+ }): Promise<{
327
+ kind: 'hit';
328
+ receipt: ServiceMethodMap['chat.send']['output'];
329
+ } | {
330
+ kind: 'conflict';
331
+ } | undefined>;
332
+ readChatSendAttemptById(input: {
333
+ sessionId: string;
334
+ attemptId: string;
335
+ }): Promise<{
336
+ kind: 'hit';
337
+ receipt: ServiceMethodMap['chat.send']['output'];
338
+ } | undefined>;
339
+ recordChatSendAttempt(input: {
340
+ sessionId: string;
341
+ attemptId: string;
342
+ mode: 'queue' | 'takeover';
343
+ fingerprint: string;
344
+ receipt: ServiceMethodMap['chat.send']['output'];
345
+ }): Promise<{
346
+ state: 'confirmed' | 'unknown';
347
+ settled: Promise<'confirmed' | 'unknown'>;
348
+ }>;
349
+ stageOpen?(input: {
350
+ sessionId: string;
351
+ stageId: string;
352
+ stageAttemptId?: string;
353
+ actor: string;
354
+ operationId: string;
355
+ }): {
356
+ stageAttemptId: string;
357
+ opened: boolean;
358
+ } | Promise<{
359
+ stageAttemptId: string;
360
+ opened: boolean;
361
+ }>;
362
+ stageSeal?(input: {
363
+ sessionId: string;
364
+ stageId: string;
365
+ stageAttemptId: string;
366
+ reason: 'completed' | 'failed' | 'budget' | 'user' | 'superseded';
367
+ actor: string;
368
+ operationId: string;
369
+ }): {
370
+ sealed: boolean;
371
+ pendingAdmissions: number;
372
+ } | Promise<{
373
+ sealed: boolean;
374
+ pendingAdmissions: number;
375
+ }>;
376
+ stageClosingStep?(input: {
377
+ sessionId: string;
378
+ stageId: string;
379
+ stageAttemptId: string;
380
+ text: string;
381
+ actor: string;
382
+ operationId: string;
383
+ }): {
384
+ queued: boolean;
385
+ reason?: string;
386
+ receipt?: string;
387
+ } | Promise<{
388
+ queued: boolean;
389
+ reason?: string;
390
+ receipt?: string;
391
+ }>;
392
+ prompt(sessionId: string, text: string): void;
393
+ steer(sessionId: string, text: string): SteerReceipt;
394
+ interrupt(sessionId: string, target?: {
395
+ turn: number;
396
+ }, mode?: 'stop-retry'): Promise<InterruptReceipt>;
397
+ executionStatus(sessionId: string, turn: number): Promise<ExecutionStatus>;
398
+ clear(sessionId: string): boolean | Promise<boolean>;
399
+ retryLastRound(sessionId: string, policy?: 'inject' | 'discard', restart?: WorkerRestartRetryIdentity, origin?: 'user' | 'automatic'): {
400
+ resumed: boolean;
401
+ reason?: RetryLastRoundRefusal;
402
+ injected?: number;
403
+ continuation?: boolean;
404
+ } | Promise<{
405
+ resumed: boolean;
406
+ reason?: RetryLastRoundRefusal;
407
+ }>;
408
+ continueWithPending(sessionId: string, restart?: WorkerRestartRetryIdentity): Promise<{
409
+ outcome: 'retried' | 'resumed' | 'blocked';
410
+ reason?: RetryLastRoundRefusal;
411
+ injected?: number;
412
+ released?: number;
413
+ }>;
414
+ releaseAdmission(sessionId: string): {
415
+ released: number;
416
+ };
417
+ retryAccelerate(sessionId: string, target: RecoveryTarget): RecoveryAccelerateReceipt;
418
+ retryCancel(sessionId: string, target: RecoveryTarget): RecoveryCancelReceipt;
419
+ withdraw(sessionId: string): {
420
+ withdrew: true;
421
+ text: string;
422
+ } | {
423
+ withdrew: false;
424
+ };
425
+ restore(sessionId: string, options?: {
426
+ preview?: boolean;
427
+ takeover?: boolean;
428
+ sinceSeq?: number;
429
+ tailMessages?: number;
430
+ }): Promise<SessionRestoreResult & {
431
+ messages?: readonly Message[];
432
+ }>;
433
+ recordDiagnostic(input: ServiceMethodMap['session.recordDiagnostic']['input']): ServiceMethodMap['session.recordDiagnostic']['output'] | Promise<ServiceMethodMap['session.recordDiagnostic']['output']>;
434
+ timelineSnapshot(sessionId: string, budget?: {
435
+ events: number;
436
+ bytes: number;
437
+ }): Promise<ServiceMethodMap['session.timeline.snapshot']['output']>;
438
+ workSnapshot(sessionId: string): Promise<ServiceMethodMap['session.work.snapshot']['output']>;
439
+ timelineDetail(sessionId: string, nodeIds: readonly string[], budget?: {
440
+ events: number;
441
+ bytes: number;
442
+ }): Promise<ServiceMethodMap['session.timeline.detail']['output']>;
443
+ contextArchiveRead(input: ServiceMethodMap['session.contextArchive.read']['input']): Promise<ServiceMethodMap['session.contextArchive.read']['output']>;
444
+ prepare(sessionId: string, connectionId?: string, turnToolView?: _$_x_otto_kernel0.ToolViewConstraint | {
445
+ clear: true;
446
+ }, clientId?: string): Promise<SessionPrepareResult>;
447
+ deliver(input: _$_x_otto_kernel0.SessionDeliveryRequest): Promise<_$_x_otto_kernel0.SessionDeliveryResult>;
448
+ writerHolderOf(sessionId: string): Promise<{
449
+ pid?: number;
450
+ boot?: string;
451
+ } | undefined>;
452
+ queuedEntries(sessionId: string): readonly QueueEntry[];
453
+ queueAppend(sessionId: string, text: string): InputReceipt | Promise<InputReceipt>;
454
+ queueList(sessionId: string): readonly QueueEntry[] | Promise<readonly QueueEntry[]>;
455
+ queueRemove(sessionId: string, inputId: string, options?: {
456
+ expectedQueueRevision?: number;
457
+ }): {
458
+ removed: boolean;
459
+ durable?: boolean;
460
+ conflict?: QueueRevisionConflict;
461
+ } | Promise<{
462
+ removed: boolean;
463
+ durable?: boolean;
464
+ conflict?: QueueRevisionConflict;
465
+ }>;
466
+ queueClear(sessionId: string, options?: {
467
+ expectedQueueRevision?: number;
468
+ }): {
469
+ cleared: number;
470
+ durable?: boolean;
471
+ conflict?: QueueRevisionConflict;
472
+ } | Promise<{
473
+ cleared: number;
474
+ durable?: boolean;
475
+ conflict?: QueueRevisionConflict;
476
+ }>;
477
+ queuePromote(sessionId: string, inputId: string, text?: string, options?: {
478
+ expectedQueueRevision?: number;
479
+ }): QueuePromoteOutcome | Promise<QueuePromoteOutcome>;
480
+ queueUpdate(sessionId: string, inputId: string, text: string, options?: {
481
+ expectedQueueRevision?: number;
482
+ }): QueueUpdateOutcome | Promise<QueueUpdateOutcome>;
483
+ queueMove(sessionId: string, inputId: string, delta: -1 | 1, options?: {
484
+ expectedQueueRevision?: number;
485
+ }): QueueMoveOutcome | Promise<QueueMoveOutcome>;
486
+ queuedCount(sessionId: string): number;
487
+ sessionCount(): number;
488
+ emitTrajectoryEvent(sessionId: string, event: ServiceEvent): void;
489
+ viewFrame(input: ServiceMethodMap['view.frame']['input']): ServiceMethodMap['view.frame']['output'];
490
+ viewInput(input: ServiceMethodMap['view.input']['input']): ServiceMethodMap['view.input']['output'];
491
+ viewClose(input: ViewCloseInput): ViewCloseOutput | Promise<ViewCloseOutput>;
492
+ }
493
+ //#endregion
494
+ //#region src/session-entry.d.ts
495
+ declare function sessionEntryOf(meta: SessionMeta, totalCost?: number, modelId?: string): SessionEntry;
496
+ //#endregion
497
+ //#region src/agent-service-component.d.ts
498
+ interface CreateAgentServiceOptions {
499
+ leasePorts?: SessionLeasePorts;
500
+ stallWarnMs?: number;
501
+ stallHeartbeatMs?: number;
502
+ manualCompact?: ManualCompactPort;
503
+ ports: Ports;
504
+ runtimeDiagnosticsRing?: RuntimeDiagnosticsRing;
505
+ editedCountsCachePath?: string;
506
+ writerRouting?: WriterRoutingTable;
507
+ sessionStoreOf?: () => _$_x_otto_kernel0.SessionStore | undefined;
508
+ workspaceKey?: () => string | undefined;
509
+ awaitWorkspaceKey?: () => Promise<string | undefined>;
510
+ workspaceRoot?: () => string | undefined;
511
+ runtimeEpoch?: () => string;
512
+ listWorkspaces?: () => Promise<readonly WorkspaceSummary[]>;
513
+ stalePendingAskOf?: (sessionId: string) => Promise<boolean>;
514
+ askPendingCountOf?: (sessionId: string) => number;
515
+ }
516
+ declare const AgentServiceComponent: _$_x_otto_universal0.ComponentDefinition<CreateAgentServiceOptions>;
517
+ //#endregion
518
+ //#region src/agent-service.d.ts
519
+ interface ManualCompactOutcome {
520
+ ok: boolean;
521
+ reason?: string;
522
+ laneBusy?: boolean;
523
+ beforeLength: number;
524
+ afterLength: number;
525
+ compaction?: {
526
+ outcome: string;
527
+ failureReason?: string;
528
+ contextTokensAfter?: number;
529
+ };
530
+ }
531
+ type ManualCompactPort = (sessionId: string, signal: AbortSignal) => Promise<ManualCompactOutcome>;
532
+ //#endregion
533
+ //#region src/create-app.d.ts
534
+ interface App {
535
+ phase: Accessor<AppPhase>;
536
+ service: Promise<AgentService>;
537
+ assembled: Promise<void>;
538
+ serviceReady(): boolean;
539
+ mount(component: Component, options?: {
540
+ definition?: string;
541
+ }): Fiber;
542
+ access<T>(slot: string): Accessor<T | undefined>;
543
+ resolve<T>(slot: string): T | undefined;
544
+ workspace(): WorkspaceRuntime;
545
+ askDiagnostics(): readonly AskDiagnostic[];
546
+ assemblyDiagnostics(): AssemblyDiagnosticSink;
547
+ runtimeDiagnostics(): readonly RuntimeDiagnosticInput[];
548
+ performanceDiagnostics(): PerformanceDiagnosticStats | undefined;
549
+ providersSettled(): Promise<void>;
550
+ residency(): ResidencyHost$1;
551
+ drainDelivery(): Promise<number>;
552
+ cleanupSettled?(): boolean;
553
+ dispose(options?: {
554
+ skipUnmount?: boolean;
555
+ }): Promise<void>;
556
+ }
557
+ declare function createApp(options: AppOptions): App;
558
+ //#endregion
559
+ //#region src/worker-restart-resume-ledger.d.ts
560
+ interface RestartResumeClaim {
561
+ sessionId: string;
562
+ restartId: string;
563
+ checkpointSeq: number;
564
+ attemptId: string;
565
+ }
566
+ interface RestartResumeLedger {
567
+ claim(input: RestartResumeClaim): Promise<void>;
568
+ settle(input: RestartResumeClaim, phase: WorkerRestartResumePhase, reason?: string): Promise<void>;
569
+ latest(input: Pick<RestartResumeClaim, 'sessionId' | 'restartId'>): Promise<RestartContinuationResume | undefined>;
570
+ }
571
+ declare function createRestartResumeLedger(sessions: SessionManager): RestartResumeLedger;
572
+ //#endregion
573
+ //#region src/worker-restart-resume.d.ts
574
+ interface WorkerRestartResumeRequest {
575
+ sessionId: string;
576
+ restartId: string;
577
+ generation: number;
578
+ checkpointSeq: number;
579
+ attemptId: string;
580
+ }
581
+ interface WorkerRestartResumeResult {
582
+ outcome: 'resumed' | 'idle' | 'blocked' | 'unknown';
583
+ reason?: string;
584
+ }
585
+ interface RestartResumeLedgerPort {
586
+ claim(input: {
587
+ sessionId: string;
588
+ restartId: string;
589
+ checkpointSeq: number;
590
+ attemptId: string;
591
+ }): Promise<void>;
592
+ settle(input: {
593
+ sessionId: string;
594
+ restartId: string;
595
+ checkpointSeq: number;
596
+ attemptId: string;
597
+ }, phase: WorkerRestartResumePhase, reason?: string): Promise<void>;
598
+ latest(input: Pick<RestartContinuationResume, 'sessionId' | 'restartId'>): Promise<RestartContinuationResume | undefined>;
599
+ }
600
+ interface SessionConnectionQuery {
601
+ isSessionConnected(sessionId: string): boolean;
602
+ }
603
+ interface RestartResumeCoordinatorOptions {
604
+ store: WorkerRestartStore;
605
+ workerScopeKey: string;
606
+ workspaceKeys: readonly string[];
607
+ newInstanceId: string;
608
+ concurrency?: number;
609
+ ledger?: RestartResumeLedgerPort;
610
+ shouldResume?(sessionId: string): Promise<boolean | string>;
611
+ priorityOf?(sessionId: string): number;
612
+ resume(request: WorkerRestartResumeRequest): Promise<WorkerRestartResumeResult>;
613
+ now?: () => number;
614
+ onChanged?(view: WorkerRestartView): void;
615
+ }
616
+ declare function expireWorkerRestart(options: Pick<RestartResumeCoordinatorOptions, 'store' | 'workerScopeKey' | 'now' | 'onChanged'>): Promise<WorkerRestartView | null>;
617
+ declare function reconcileWorkerRestart(options: RestartResumeCoordinatorOptions): Promise<WorkerRestartView | null>;
618
+ //#endregion
619
+ //#region src/setting-field-metadata.d.ts
620
+ declare function canonicalSettingFields(): readonly SettingFieldMetadata[];
621
+ //#endregion
622
+ //#region src/builtin-regions.d.ts
623
+ declare function contributeTuiBuiltinRegions(ctx: Context): void;
624
+ //#endregion
625
+ //#region src/extension-module.d.ts
626
+ declare class PluginLoadError extends Error {}
627
+ type PluginEntrypointRole = 'agent' | 'ui';
628
+ declare function loadPluginModule(directory: string, manifest: PluginManifest, generation: number, mayImport?: () => boolean, role?: PluginEntrypointRole, admitImport?: () => boolean): Promise<Record<string, unknown>>;
629
+ //#endregion
630
+ //#region src/plugin-entries.d.ts
631
+ declare const PLUGIN_ENTRIES_FILENAME = "plugin-entries.json";
632
+ declare function readEntries(dir: string): Promise<PluginEntry[]>;
633
+ //#endregion
634
+ //#region src/worker-restart-resume-component.d.ts
635
+ interface WorkerRestartResumeOptions {
636
+ store: WorkerRestartStore;
637
+ workerScopeKey: string;
638
+ workspaceKeys: readonly string[];
639
+ newInstanceId: string;
640
+ concurrency?: number;
641
+ onActiveChange?(active: boolean): void;
642
+ onChanged?(view: _$_x_otto_kernel0.WorkerRestartView): void;
643
+ onResumeRequest?(listener: () => void): void;
644
+ }
645
+ declare const WorkerRestartResumeComponent: _$_x_otto_universal0.ComponentDefinition<WorkerRestartResumeOptions>;
646
+ //#endregion
647
+ //#region src/residency-perf.d.ts
648
+ interface ResidencyPerfCpuDelta {
649
+ readonly userMs: number;
650
+ readonly systemMs: number;
651
+ }
652
+ declare function buildResidencyPerfSnapshot(host: ResidencyHost$1 | undefined, cpu: ResidencyPerfCpuDelta, now: number): ResidencyPerfSnapshot;
653
+ //#endregion
654
+ //#region src/derived-outcomes.d.ts
655
+ interface StaleDelivery {
656
+ entryId: string;
657
+ occurrence: number;
658
+ at: number;
659
+ staleMs: number;
660
+ }
661
+ interface DerivedUnknownOutcomes {
662
+ jobs: readonly LostJob[];
663
+ deliveries: readonly StaleDelivery[];
664
+ }
665
+ interface DeriveMissedOptions {
666
+ sessionId: string;
667
+ now: number;
668
+ }
669
+ interface DeriveUnknownOutcomesOptions extends DeriveMissedOptions {
670
+ timeoutMs: number;
671
+ }
672
+ declare function deriveUnknownOutcomes(events: readonly TrajectoryEvent[], options: DeriveUnknownOutcomesOptions): DerivedUnknownOutcomes;
673
+ //#endregion
674
+ //#region src/ports/runtime-env.d.ts
675
+ declare function createNodeRuntimeEnv(env: Env): RuntimeEnv;
676
+ //#endregion
677
+ //#region src/hooks.d.ts
678
+ declare const Hooks: _$_x_otto_universal0.ComponentDefinition<BootEnv$1>;
679
+ //#endregion
680
+ //#region src/persistence-selection.d.ts
681
+ declare const SQLITE_SESSION_BACKEND_RETIRED = "persistence.sqlite-backend-retired";
682
+ interface RetiredSessionBackend {
683
+ readonly code: typeof SQLITE_SESSION_BACKEND_RETIRED;
684
+ readonly backend: 'sqlite';
685
+ readonly replacement: 'file';
686
+ }
687
+ declare function retiredSessionBackendOf(bootEnv: BootEnv$1): RetiredSessionBackend | undefined;
688
+ declare function resolvePersistenceFromBootEnv(bootEnv: BootEnv$1, options?: {
689
+ blockNewSessions?: boolean;
690
+ }): PersistenceOptions | undefined;
691
+ declare function resolveWorkspacePersistence(bootEnv: BootEnv$1, sessionDataDirectory: string): PersistenceOptions;
692
+ declare function workspaceStoreDirectoryOf(persistence: Extract<PersistenceOptions, {
693
+ kind: 'file';
694
+ }>, explicitDirectory: string | undefined): string;
695
+ //#endregion
696
+ //#region src/provider-loader.d.ts
697
+ interface ProviderLoaderOptions {
698
+ packages: readonly ProviderPackage[];
699
+ assemblyDiagnostics?: AssemblyDiagnosticSink;
700
+ onLoaded: () => void;
701
+ onEvaluated?: () => void;
702
+ }
703
+ declare function synthesizeEnvProviderPackage(baseUrl: string | undefined, model: string | undefined, wireApi: Api, hasApiKey: boolean): ProviderPackage | undefined;
704
+ declare function createProviderLoader(options: ProviderLoaderOptions): Component;
705
+ //#endregion
706
+ //#region src/provider-catalog-component.d.ts
707
+ interface ProviderCatalogOptions {
708
+ cwd?: string;
709
+ adoptedPath?: string;
710
+ }
711
+ declare const ProviderCatalog: _$_x_otto_universal0.ComponentDefinition<ProviderCatalogOptions>;
712
+ //#endregion
713
+ //#region src/provider-catalog.d.ts
714
+ interface ProviderCatalogEntry {
715
+ id: string;
716
+ pkg: string;
717
+ supported: boolean;
718
+ }
719
+ declare const PROVIDER_CATALOG: readonly ProviderCatalogEntry[];
720
+ declare function resolvePackageDir(pkg: string, cwd?: string): string | undefined;
721
+ //#endregion
722
+ //#region src/provider-candidates.d.ts
723
+ interface ProbeNetworkGate {
724
+ (probeUrl: string): Promise<boolean>;
725
+ }
726
+ declare function probeNetworkGate(probeUrl: string): Promise<boolean>;
727
+ declare function listResolvableCandidates(cwd?: string): readonly ProviderCandidate[];
728
+ declare function listProviderCandidates(cwd?: string, probe?: ProbeNetworkGate): Promise<readonly ProviderCandidate[]>;
729
+ //#endregion
730
+ //#region src/workspace-router.d.ts
731
+ interface WorkspaceRouterOptions {
732
+ defaultKey?: string;
733
+ readyWaitMs?: number;
734
+ sessionKeyLimit?: number;
735
+ fallback?: DiagnosticFallback;
736
+ services: () => ReadonlyMap<string, AgentService>;
737
+ ownerKeyOf: (sessionId: string) => Promise<string | undefined>;
738
+ ownerKeyOfSync?: (sessionId: string) => string | undefined;
739
+ readiness?: (key: string) => WorkspaceReadiness;
740
+ whenSettled?: (key: string) => Promise<void>;
741
+ residencyPerf?: () => Promise<ResidencyPerfSnapshot> | ResidencyPerfSnapshot;
742
+ }
743
+ interface WorkspaceRouterPort extends AgentService {
744
+ routeKey(sessionId: string): Promise<string | undefined>;
745
+ resolve(sessionId: string): AgentService | undefined;
746
+ resolveAsync(sessionId: string): Promise<AgentService | undefined>;
747
+ refreshSubscriptions(): void;
748
+ }
749
+ declare function createWorkspaceRouter(options: WorkspaceRouterOptions): WorkspaceRouterPort;
750
+ //#endregion
751
+ //#region src/workspace-host.d.ts
752
+ interface WorkspaceHostEntry {
753
+ cwd: string;
754
+ directory: string;
755
+ }
756
+ interface WorkspaceHostShared {
757
+ authStore?: AuthStore;
758
+ install?: {
759
+ store: InstallStore;
760
+ official: OfficialRegistry;
761
+ };
762
+ persistence?: PersistenceOptions;
763
+ }
764
+ interface WorkspaceHostOptions {
765
+ workspaces: readonly WorkspaceHostEntry[];
766
+ base?: AppOptions;
767
+ shared?: WorkspaceHostShared;
768
+ ports?: Partial<Ports>;
769
+ env?: Env;
770
+ providerPackages?: ProviderPackage[];
771
+ settings?: AppSettingsOptions;
772
+ defaultKey?: string;
773
+ releaseTimeoutMs?: number;
774
+ deliveryHome?: string;
775
+ liveEngineProbe?: () => Promise<readonly number[]>;
776
+ }
777
+ interface WorkspaceHost {
778
+ apps: readonly App[];
779
+ router: WorkspaceRouterPort;
780
+ locator: WorkspaceLocator;
781
+ cwdOf(app: App): string | undefined;
782
+ conflicts(): readonly WorkspaceServiceConflict[];
783
+ ready(): Promise<void>;
784
+ readiness(key: string): WorkspaceReadiness;
785
+ readinessSignal(key: string): Accessor<WorkspaceReadiness> | undefined;
786
+ readinessSnapshot(key: string): WorkspaceReadinessSnapshot;
787
+ resolveAskOwner(scope: AskScope): Promise<RuntimeAskChannels | undefined>;
788
+ resolveAskRoot(scope: AskScope): Promise<string | undefined>;
789
+ addWorkspace(entry: WorkspaceHostEntry): Promise<void>;
790
+ removeWorkspace(workspaceId: string): Promise<WorkspaceHostCloseReport>;
791
+ closeReport(): WorkspaceHostCloseReport | undefined;
792
+ dispose(): Promise<void>;
793
+ }
794
+ interface WorkspaceHostDisposeFailure {
795
+ id: string;
796
+ message: string;
797
+ }
798
+ interface WorkspaceHostCloseReport {
799
+ admissionClosed: boolean;
800
+ executions: {
801
+ settled: boolean;
802
+ unsettled: string[];
803
+ };
804
+ commits: {
805
+ confirmed: string[];
806
+ failed: WorkspaceHostDisposeFailure[];
807
+ };
808
+ releases: {
809
+ released: string[];
810
+ failed: WorkspaceHostDisposeFailure[];
811
+ };
812
+ }
813
+ interface WorkspaceServiceConflict {
814
+ readonly id: string;
815
+ readonly keptRoot: string;
816
+ readonly refusedRoot: string;
817
+ readonly message: string;
818
+ }
819
+ declare class WorkspaceHostDisposeError extends Error {
820
+ readonly failures: readonly WorkspaceHostDisposeFailure[];
821
+ readonly report: WorkspaceHostCloseReport;
822
+ constructor(failures: readonly WorkspaceHostDisposeFailure[], report: WorkspaceHostCloseReport);
823
+ }
824
+ declare function createWorkspaceHost(options: WorkspaceHostOptions): WorkspaceHost;
825
+ //#endregion
826
+ //#region src/hub-types.d.ts
827
+ interface WorkspaceRegistration {
828
+ workspaceId?: string;
829
+ workspaceRoot: string;
830
+ directory: string;
831
+ }
832
+ interface HubSingleOptions {
833
+ appOptions: AppOptions;
834
+ cwd: string;
835
+ providerPackages?: readonly ProviderPackage[];
836
+ mountProviders?: readonly Component[];
837
+ }
838
+ type SharedResourceOwnership = 'owned' | 'borrowed';
839
+ interface SharedResourceFacet<T> {
840
+ readonly key: string;
841
+ readonly ownership: SharedResourceOwnership;
842
+ readonly value: T;
843
+ }
844
+ interface HubSharedInputs {
845
+ authStore?: WorkspaceHostShared['authStore'];
846
+ install?: WorkspaceHostShared['install'];
847
+ persistence?: WorkspaceHostShared['persistence'];
848
+ hostResolveRoots?: readonly SharedResourceFacet<() => () => void>[];
849
+ }
850
+ interface HubOptions {
851
+ profile: 'single' | 'multi';
852
+ workspaces?: readonly WorkspaceRegistration[];
853
+ single?: HubSingleOptions;
854
+ shared?: HubSharedInputs;
855
+ ports?: Partial<Ports>;
856
+ env?: Env;
857
+ defaultKey?: string;
858
+ releaseTimeoutMs?: number;
859
+ liveEngineProbe?: () => Promise<readonly number[]>;
860
+ }
861
+ interface WorkspaceHandle {
862
+ readonly root: string;
863
+ readonly app: App;
864
+ close(): Promise<WorkspaceHostCloseReport | undefined>;
865
+ }
866
+ interface HubHandle {
867
+ readonly apps: readonly App[];
868
+ readonly conflicts: readonly WorkspaceServiceConflict[];
869
+ readonly workspaces: readonly WorkspaceHandle[];
870
+ readonly shared: HubSharedInputs;
871
+ readonly sharedFacets: Readonly<Record<string, {
872
+ key: string;
873
+ ownership: SharedResourceOwnership;
874
+ }>>;
875
+ readonly router: WorkspaceRouterPort;
876
+ readonly askChannels: {
877
+ resolveOwner(scope: AskScope): Promise<RuntimeAskChannels | undefined>;
878
+ resolveRoot(scope: AskScope): Promise<string | undefined>;
879
+ };
880
+ readiness(key: string): WorkspaceReadiness;
881
+ singleApp(): App | undefined;
882
+ appOf(workspaceId: string): App | undefined;
883
+ ready(): Promise<void>;
884
+ addWorkspace(entry: WorkspaceRegistration): Promise<void>;
885
+ removeWorkspace(workspaceId: string): Promise<WorkspaceHostCloseReport>;
886
+ dispose(): Promise<WorkspaceHostCloseReport | undefined>;
887
+ }
888
+ //#endregion
889
+ //#region src/hub.d.ts
890
+ declare function createHubApp(options: HubOptions): HubHandle;
891
+ //#endregion
892
+ //#region src/terminal-outcome.d.ts
893
+ interface TerminalTurnEnd {
894
+ kind: string;
895
+ message?: string;
896
+ }
897
+ interface TerminalOutcomeInput {
898
+ at?: number;
899
+ model: string;
900
+ reason: TerminalTurnEnd;
901
+ sessionId: string;
902
+ turn: number;
903
+ }
904
+ interface TerminalOutcomeArbiter {
905
+ claim(sessionId: string, turn: number): boolean;
906
+ emitIfTerminal(input: TerminalOutcomeInput): boolean;
907
+ forget(sessionId: string): void;
908
+ }
909
+ declare function isRecorderBarrierTurnEnd(reason: TerminalTurnEnd): boolean;
910
+ declare function terminalOutcomeKeyOf(sessionId: string, turn: number): string;
911
+ declare function createTerminalOutcomeArbiter(emit: (sessionId: string, event: ServiceEvent) => void): TerminalOutcomeArbiter;
912
+ //#endregion
913
+ //#region src/workspace-cwd-context.d.ts
914
+ interface CwdContextSnapshot {
915
+ branch?: string;
916
+ dirty: boolean;
917
+ }
918
+ interface CwdContextSourceDeps {
919
+ readFile?: (path: string) => string;
920
+ runGitStatus?: (directory: string) => Promise<string>;
921
+ }
922
+ interface CwdContextReaderDeps extends CwdContextSourceDeps {
923
+ cacheTtlMs?: number;
924
+ now?: () => number;
925
+ }
926
+ declare function cwdContextOf(directory: string, deps?: CwdContextSourceDeps): Promise<CwdContextSnapshot>;
927
+ declare function createCwdContextReader(deps?: CwdContextReaderDeps): (directory: string) => Promise<CwdContextSnapshot>;
928
+ //#endregion
929
+ //#region src/bundled-plugins.d.ts
930
+ declare const BUNDLED_PLUGINS: readonly string[];
931
+ //#endregion
932
+ //#region src/session-activity-watch.d.ts
933
+ interface SessionActivityWatchDeps {
934
+ onEvent: (sink: (sessionId: string, event: ServiceEvent) => void) => () => void;
935
+ onError?: (error: unknown, sessionId: string) => void;
936
+ }
937
+ interface SessionActivityWatch extends SessionActivityWatchPort {
938
+ dispose(): void;
939
+ }
940
+ declare function createSessionActivityWatch(deps: SessionActivityWatchDeps): SessionActivityWatch;
941
+ //#endregion
942
+ //#region src/session-workspace-switch.d.ts
943
+ type SessionWorkspaceSwitchRejection = 'directory-missing' | 'not-authorized' | 'session-missing' | 'busy' | 'handle-unavailable';
944
+ interface SessionWorkspaceSwitchTarget {
945
+ readonly workspaceDir: string;
946
+ readonly isolatedRoot?: string;
947
+ }
948
+ type SessionWorkspaceSwitchOutcome = {
949
+ readonly ok: true;
950
+ readonly handle: AgentSessionHandle;
951
+ readonly workspaceDir: string;
952
+ } | {
953
+ readonly ok: false;
954
+ readonly reason: SessionWorkspaceSwitchRejection;
955
+ readonly message: string;
956
+ };
957
+ interface SessionWorkspaceSwitchDeps {
958
+ sessions: () => SessionManager;
959
+ registry: () => AgentSessionRegistry;
960
+ workspaceRoot?: () => string | undefined;
961
+ executionRoots?: () => readonly IssuedExecutionRootRecord[];
962
+ }
963
+ interface SessionWorkspaceSwitch {
964
+ switchWorkspace(sessionId: string, target: SessionWorkspaceSwitchTarget): Promise<SessionWorkspaceSwitchOutcome>;
965
+ }
966
+ declare function createSessionWorkspaceSwitch(deps: SessionWorkspaceSwitchDeps): SessionWorkspaceSwitch;
967
+ //#endregion
968
+ export { type AgentService, AgentServiceComponent, type App, type AppOptions, type AppSettingsOptions, type AssemblyDiagnostic, type AssemblyDiagnosticSink, BUILTIN_TUI_REGION_DECLARATIONS, BUNDLED_PLUGINS, type BootEnv, type BootEnvResult, type CreateAgentServiceOptions, type CwdContextReaderDeps, type CwdContextSnapshot, type CwdContextSourceDeps, type DeriveMissedOptions, type DeriveUnknownOutcomesOptions, type DerivedUnknownOutcomes, type EventSink, Hooks, type HostIdentity, type HubHandle, type HubOptions, type HubSharedInputs, type HubSingleOptions, type IsolatedArtifacts, type LivenessEvidence, type LivenessProbe, OTTO_ROOT, PLUGIN_ENTRIES_FILENAME, PROVIDER_CATALOG, type PendingResultState, type PerformanceDiagnosticSink, type PerformanceDiagnosticStats, type PluginEntrypointRole, PluginLoadError, type ProbeNetworkGate, type ProviderCandidate, ProviderCatalog, type ProviderCatalogEntry, type ProviderLoaderOptions, RESIDENCY_DISABLED_ENV, type ResidencyHost, type ResidencyHostDiagnostics, type ResidencyHostOptions, type ResidencyPerfCpuDelta, type RestartResumeClaim, type RestartResumeCoordinatorOptions, type RestartResumeLedger, type ResultMergeOutcome, type ResultRecord, type RetiredSessionBackend, SETTINGS_COMMAND_OWNER, SQLITE_SESSION_BACKEND_RETIRED, type SessionActivityWatch, type SessionActivityWatchDeps, type SessionConnectionQuery, type SessionWorkspaceSwitch, type SessionWorkspaceSwitchDeps, type SessionWorkspaceSwitchOutcome, type SessionWorkspaceSwitchRejection, type SessionWorkspaceSwitchTarget, type StaleDelivery, type SubagentWorkspaceOptions, WorkerRestartResumeComponent, type WorkerRestartResumeOptions, type WorkerRestartResumeRequest, type WorkerRestartResumeResult, type WorkspaceHandle, type WorkspaceHost, type WorkspaceHostCloseReport, WorkspaceHostDisposeError, type WorkspaceHostDisposeFailure, type WorkspaceHostEntry, type WorkspaceHostOptions, type WorkspaceHostShared, type WorkspaceRegistration, type WorkspaceRouterOptions, type WorkspaceRouterPort, buildResidencyPerfSnapshot, canonicalSettingFields, collectIsolatedArtifacts, contributeTuiBuiltinRegions, createApp, createAssemblyDiagnosticSink, createCwdContextReader, createHubApp, createNodeHostIdentity, createNodeLivenessProbe, createNodeRuntimeEnv, createPerformanceDiagnosticSink, createProviderLoader, createResidencyHost, createRestartResumeLedger, createSessionActivityWatch, createSessionWorkspaceSwitch, createSubagentWorkspaceRoots, createTerminalOutcomeArbiter, createWorkspaceHost, createWorkspaceRouter, cwdContextOf, deriveUnknownOutcomes, expireWorkerRestart, isRecorderBarrierTurnEnd, isTerminalResultState, listProviderCandidates, listResolvableCandidates, loadPluginModule, mergeResultFrame, noticeAnchorsFromProjection, pendingResultKeys, probeNetworkGate, probeProcessStartedAt, probeProcessStartedAtAsync, processTreeSamplingReason, projectHistory, projectPromptEnd, projectPromptStart, projectStreamEvent, projectToolEnd, projectToolStart, readEntries, reconcileWorkerRestart, residencyEnabledFromEnv, resolveBootEnv, resolvePackageDir, resolvePersistenceFromBootEnv, resolveSettingsPaths, resolveWorkspacePersistence, resultsNeedingResync, retiredSessionBackendOf, sessionEntryOf, synthesizeEnvProviderPackage, terminalOutcomeKeyOf, turnCompletionKey, turnEndAnchorsFromProjection, turnEndAnchorsOf, workspaceStoreDirectoryOf };