@rivus/agent 0.13.2 → 0.14.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.
Files changed (46) hide show
  1. package/README.md +17 -18
  2. package/dist/acp.d.ts +40 -40
  3. package/dist/acp.js +71 -31
  4. package/dist/bootstrap/pi-feishu.d.ts +20 -0
  5. package/dist/bootstrap/pi-feishu.js +596 -0
  6. package/dist/{agent-loop.d.ts → chunks/agent-loop.d.ts} +293 -44
  7. package/dist/chunks/agent-loop.js +1272 -0
  8. package/dist/chunks/api.d.ts +70 -0
  9. package/dist/chunks/api.js +471 -0
  10. package/dist/{rivus-plugin.d.ts → chunks/api2.d.ts} +271 -120
  11. package/dist/chunks/api2.js +1331 -0
  12. package/dist/chunks/api3.d.ts +402 -0
  13. package/dist/chunks/index.d.ts +3662 -0
  14. package/dist/chunks/module.js +267 -0
  15. package/dist/chunks/pi-skill-tool.js +460 -0
  16. package/dist/chunks/pi-tool-proxy.d.ts +188 -0
  17. package/dist/chunks/pi.js +329 -0
  18. package/dist/{rivus-daemon-cli.js → chunks/rivus-daemon-cli.js} +2197 -1526
  19. package/dist/{rivus-plugin-testkit.d.ts → chunks/rivus-plugin-testkit.d.ts} +1 -1
  20. package/dist/{rivus-plugin-testkit.js → chunks/rivus-plugin-testkit.js} +11 -3
  21. package/dist/chunks/sha256-digest.js +12 -0
  22. package/dist/chunks/spi.d.ts +1 -0
  23. package/dist/chunks/spi.js +2 -0
  24. package/dist/chunks/src.js +9897 -0
  25. package/dist/cli.js +604 -95
  26. package/dist/index.d.ts +8 -3645
  27. package/dist/index.js +9 -10483
  28. package/dist/mcp.d.ts +3 -38
  29. package/dist/mcp.js +4 -114
  30. package/dist/pi.d.ts +95 -9
  31. package/dist/pi.js +3 -146
  32. package/dist/testing/index.d.ts +1 -1
  33. package/dist/testing/index.js +1 -1
  34. package/examples/pi-feishu-deployment.bootstrap.ts +45 -54
  35. package/examples/pi-feishu.bootstrap.ts +53 -37
  36. package/examples/rivus-starter.plugin.mjs +3 -1
  37. package/package.json +12 -14
  38. package/dist/agent-loop.js +0 -121
  39. package/dist/agent-memory.d.ts +0 -100
  40. package/dist/agent-memory.js +0 -114
  41. package/dist/background-session-authority.js +0 -224
  42. package/dist/background-session-input.js +0 -45
  43. package/dist/background-session-service.d.ts +0 -291
  44. package/dist/pi-tool-proxy.d.ts +0 -197
  45. package/dist/rivus-plugin-registry.js +0 -215
  46. package/dist/tool-input-digest.js +0 -128
@@ -0,0 +1,402 @@
1
+ import { Effect } from "effect";
2
+
3
+ //#region src/modules/background-session/domain/session/background-session-model.d.ts
4
+ type BackgroundSessionMemoryScope = "conversation" | "agent-private" | "project" | "shared-user-profile";
5
+ interface BackgroundSessionMemoryIdentity {
6
+ readonly audience: "group" | "private";
7
+ readonly conversationId?: string;
8
+ readonly projectId?: string;
9
+ readonly subjectId: string;
10
+ readonly tenantId: string;
11
+ }
12
+ type BackgroundSessionId = string;
13
+ type BackgroundSessionPhase = "queued" | "running" | "waiting" | "input-required" | "stopping" | "stopped" | "completed" | "failed" | "reconciliation-required";
14
+ declare function isBackgroundSessionTerminalPhase(phase: BackgroundSessionPhase): boolean;
15
+ interface BackgroundSessionLease {
16
+ readonly owner: string;
17
+ readonly epoch: number;
18
+ readonly expiresAt: string;
19
+ }
20
+ interface BackgroundSessionOrigin {
21
+ readonly endpointId: string;
22
+ readonly tenantKey: string;
23
+ readonly conversationId?: string;
24
+ readonly allowedActorOpenIds: ReadonlyArray<string>;
25
+ readonly memory?: BackgroundSessionMemoryIdentity;
26
+ }
27
+ interface BackgroundSessionAuthority {
28
+ readonly agentId: string;
29
+ readonly profileRevision: string;
30
+ readonly toolGrantRevision: string;
31
+ readonly policyEpoch: number;
32
+ readonly memoryScopes: ReadonlyArray<BackgroundSessionMemoryScope>;
33
+ readonly projectSpaceId?: string;
34
+ readonly sessionKey: string;
35
+ }
36
+ interface BackgroundSessionTerminalResult {
37
+ readonly text: string;
38
+ readonly stepRunId: string;
39
+ readonly completedAt: string;
40
+ }
41
+ interface BackgroundSessionCancellation {
42
+ readonly reason: string;
43
+ readonly requestedAt: string;
44
+ }
45
+ interface BackgroundSessionState {
46
+ readonly sessionId: BackgroundSessionId;
47
+ readonly displayName: string;
48
+ readonly phase: BackgroundSessionPhase;
49
+ readonly revision: number;
50
+ readonly parentRunId: string;
51
+ readonly sourceMessageId: string;
52
+ readonly origin: BackgroundSessionOrigin;
53
+ readonly authority: BackgroundSessionAuthority;
54
+ readonly prompt: string;
55
+ readonly stepCount: number;
56
+ readonly wakeCount: number;
57
+ readonly currentStepRunId?: string;
58
+ readonly lastWakeText?: string;
59
+ readonly pendingInput: ReadonlyArray<string>;
60
+ readonly wakeAt?: string;
61
+ readonly lease?: BackgroundSessionLease;
62
+ readonly cancellation?: BackgroundSessionCancellation;
63
+ readonly consecutiveFailures: number;
64
+ readonly result?: BackgroundSessionTerminalResult;
65
+ readonly errorMessage?: string;
66
+ readonly reconciliationNote?: string;
67
+ readonly createdAt: string;
68
+ readonly updatedAt: string;
69
+ }
70
+ declare class BackgroundSessionTransitionDenied extends Error {
71
+ readonly sessionId: BackgroundSessionId;
72
+ readonly name = "BackgroundSessionTransitionDenied";
73
+ constructor(sessionId: BackgroundSessionId, message: string);
74
+ }
75
+ //#endregion
76
+ //#region src/modules/background-session/application/authority/background-session-identity.d.ts
77
+ declare const BACKGROUND_SESSION_SESSION_KEY_PREFIX = "background";
78
+ declare function createBackgroundSessionKey(sessionId: string): string;
79
+ declare function createBackgroundSessionStepSourceMessageId(sessionId: string, stepCount: number): string;
80
+ //#endregion
81
+ //#region src/modules/background-session/application/authority/background-session-authority.d.ts
82
+ declare const BACKGROUND_SESSION_TOOL_IDS: readonly ["background.start", "background.wait", "background.list", "background.status", "background.send", "background.stop"];
83
+ declare const BACKGROUND_SESSION_START_TOOL_ID = "background.start";
84
+ declare const BACKGROUND_SESSION_TOOL_PLUGIN_ID = "rivus-core";
85
+ declare const BACKGROUND_SESSION_TOOL_VERSION = "1.0.0";
86
+ interface BackgroundSessionToolContract {
87
+ readonly description: string;
88
+ readonly digest: string;
89
+ readonly id: string;
90
+ readonly idempotency: "none" | "supported" | "required";
91
+ readonly inputSchema: unknown;
92
+ readonly pluginId: string;
93
+ readonly risk: "observe" | "mutate" | "irreversible" | "host-control";
94
+ readonly version: string;
95
+ }
96
+ interface BackgroundSessionToolGrantSet {
97
+ readonly revision: string;
98
+ readonly toolIds: ReadonlyArray<string>;
99
+ }
100
+ interface BackgroundSessionAgentDefinition {
101
+ readonly agentId: string;
102
+ readonly endpointIds: ReadonlyArray<string>;
103
+ readonly memory: {
104
+ readonly scopes: ReadonlyArray<BackgroundSessionMemoryScope>;
105
+ };
106
+ readonly model: Readonly<Record<string, unknown>>;
107
+ readonly pluginId: string;
108
+ readonly profileId: string;
109
+ readonly profileRevision: string;
110
+ readonly projectSpaceId?: string;
111
+ readonly projectSpaceRevision?: string;
112
+ readonly skillGrantSet: {
113
+ readonly revision: string;
114
+ readonly skillIds: ReadonlyArray<string>;
115
+ };
116
+ readonly skills: ReadonlyArray<unknown>;
117
+ readonly systemPrompt: string;
118
+ readonly tools: ReadonlyArray<BackgroundSessionToolContract>;
119
+ readonly toolGrantSet: BackgroundSessionToolGrantSet;
120
+ }
121
+ type TransformedBackgroundSessionDefinition<T extends BackgroundSessionAgentDefinition> = Omit<T, "toolGrantSet" | "tools"> & {
122
+ readonly toolGrantSet: BackgroundSessionToolGrantSet;
123
+ readonly tools: ReadonlyArray<BackgroundSessionToolContract>;
124
+ };
125
+ declare function createBackgroundSessionToolContracts(): ReadonlyArray<BackgroundSessionToolContract>;
126
+ declare function backgroundSessionToolIds(): ReadonlyArray<string>;
127
+ declare function isBackgroundSessionToolId(toolId: string): boolean;
128
+ declare function extendBackgroundSessionDefinition<T extends BackgroundSessionAgentDefinition>(definition: T): TransformedBackgroundSessionDefinition<T>;
129
+ declare function narrowBackgroundSessionDefinition<T extends BackgroundSessionAgentDefinition>(definition: T): TransformedBackgroundSessionDefinition<T>;
130
+ //#endregion
131
+ //#region src/modules/background-session/application/session/background-session-delivery-store.d.ts
132
+ type BackgroundSessionDeliveryKind = "progress" | "final" | "stopped" | "failed" | "reconciliation";
133
+ interface BackgroundSessionDeliveryRecord {
134
+ readonly deliveryId: string;
135
+ readonly sessionId: string;
136
+ readonly kind: BackgroundSessionDeliveryKind;
137
+ readonly text: string;
138
+ readonly state: "pending" | "delivered";
139
+ readonly revision: number;
140
+ readonly providerMessageId?: string;
141
+ readonly createdAt: string;
142
+ }
143
+ interface BackgroundSessionDeliveryStore {
144
+ enqueue(input: {
145
+ readonly deliveryId: string;
146
+ readonly sessionId: string;
147
+ readonly kind: BackgroundSessionDeliveryKind;
148
+ readonly text: string;
149
+ readonly createdAt: string;
150
+ }): Promise<BackgroundSessionDeliveryRecord>;
151
+ pending(): Promise<ReadonlyArray<BackgroundSessionDeliveryRecord>>;
152
+ markDelivered(deliveryId: string, providerMessageId: string): Promise<BackgroundSessionDeliveryRecord | undefined>;
153
+ }
154
+ declare class BackgroundSessionDeliveryConflict extends Error {
155
+ readonly name = "BackgroundSessionDeliveryConflict";
156
+ constructor(deliveryId: string, message: string);
157
+ }
158
+ //#endregion
159
+ //#region src/modules/background-session/application/session/background-session-repository.d.ts
160
+ interface BackgroundSessionLeasePrecondition {
161
+ readonly kind: "absent";
162
+ }
163
+ interface BackgroundSessionLeaseRequirement {
164
+ readonly kind: "held";
165
+ readonly owner: string;
166
+ readonly epoch: number;
167
+ }
168
+ interface BackgroundSessionLeaseStaleOrAbsent {
169
+ readonly kind: "absent-or-stale";
170
+ }
171
+ interface BackgroundSessionRepository {
172
+ create(state: BackgroundSessionState): Promise<BackgroundSessionState>;
173
+ get(sessionId: string): Promise<BackgroundSessionState | undefined>;
174
+ list(options?: {
175
+ readonly phase?: BackgroundSessionPhase;
176
+ readonly limit?: number;
177
+ }): Promise<ReadonlyArray<BackgroundSessionState>>;
178
+ update(input: {
179
+ readonly sessionId: string;
180
+ readonly expectedRevision: number;
181
+ readonly expectedLease?: BackgroundSessionLeasePrecondition | BackgroundSessionLeaseRequirement | BackgroundSessionLeaseStaleOrAbsent;
182
+ readonly now?: string;
183
+ readonly build: (state: BackgroundSessionState) => BackgroundSessionState;
184
+ }): Promise<BackgroundSessionState | undefined>;
185
+ }
186
+ declare class BackgroundSessionRepositoryConflict extends Error {
187
+ readonly name = "BackgroundSessionRepositoryConflict";
188
+ constructor(sessionId: string, message: string);
189
+ }
190
+ declare class BackgroundSessionRepositoryCorrupted extends Error {
191
+ readonly name = "BackgroundSessionRepositoryCorrupted";
192
+ }
193
+ //#endregion
194
+ //#region src/modules/background-session/application/session/background-session-service.d.ts
195
+ interface BackgroundSessionExecutionOrigin {
196
+ readonly allowedActorOpenIds: ReadonlyArray<string>;
197
+ readonly conversationId?: string;
198
+ readonly endpointId: string;
199
+ readonly tenantKey: string;
200
+ }
201
+ interface BackgroundSessionExecutionContext {
202
+ readonly agentId: string;
203
+ readonly callId: string;
204
+ readonly instanceId: string;
205
+ readonly memory?: BackgroundSessionMemoryIdentity & {
206
+ readonly scopes: ReadonlyArray<BackgroundSessionMemoryScope>;
207
+ };
208
+ readonly operationId?: string;
209
+ readonly origin?: BackgroundSessionExecutionOrigin;
210
+ readonly policyEpoch: number;
211
+ readonly runId: string;
212
+ readonly sessionKey: string;
213
+ readonly sourceMessageId?: string;
214
+ readonly toolId: string;
215
+ readonly toolVersion: string;
216
+ }
217
+ interface BackgroundSessionSummary {
218
+ readonly sessionId: string;
219
+ readonly displayName: string;
220
+ readonly phase: BackgroundSessionPhase;
221
+ readonly stepCount: number;
222
+ readonly wakeAt?: string;
223
+ readonly createdAt: string;
224
+ readonly updatedAt: string;
225
+ }
226
+ interface BackgroundSessionDetail extends BackgroundSessionSummary {
227
+ readonly parentRunId: string;
228
+ readonly pendingInput: ReadonlyArray<string>;
229
+ readonly result?: BackgroundSessionState["result"];
230
+ readonly errorMessage?: string;
231
+ readonly cancellationReason?: string;
232
+ readonly reconciliationNote?: string;
233
+ }
234
+ declare class BackgroundSessionCallerDenied extends Error {
235
+ readonly name = "BackgroundSessionCallerDenied";
236
+ constructor(message: string);
237
+ }
238
+ interface BackgroundSessionServiceOptions {
239
+ readonly clock: {
240
+ now(): string;
241
+ };
242
+ readonly deliveries: BackgroundSessionDeliveryStore;
243
+ readonly repository: BackgroundSessionRepository;
244
+ }
245
+ interface BackgroundSessionService {
246
+ list(input: {
247
+ readonly context: BackgroundSessionExecutionContext;
248
+ readonly limit?: number;
249
+ readonly phase?: BackgroundSessionPhase;
250
+ }): Promise<ReadonlyArray<BackgroundSessionSummary>>;
251
+ resolveReconciliation(input: {
252
+ readonly outcome: "continue" | "stop";
253
+ readonly sessionId: string;
254
+ }): Promise<BackgroundSessionSummary>;
255
+ send(input: {
256
+ readonly context: BackgroundSessionExecutionContext;
257
+ readonly message: string;
258
+ readonly sessionId: string;
259
+ }): Promise<BackgroundSessionSummary>;
260
+ start(input: {
261
+ readonly authority: BackgroundSessionAuthority;
262
+ readonly context: BackgroundSessionExecutionContext;
263
+ readonly displayName?: string;
264
+ readonly prompt: string;
265
+ readonly sessionId: string;
266
+ }): Promise<BackgroundSessionSummary>;
267
+ status(input: {
268
+ readonly context: BackgroundSessionExecutionContext;
269
+ readonly sessionId: string;
270
+ }): Promise<BackgroundSessionDetail>;
271
+ stop(input: {
272
+ readonly context: BackgroundSessionExecutionContext;
273
+ readonly reason?: string;
274
+ readonly sessionId: string;
275
+ }): Promise<BackgroundSessionSummary>;
276
+ wait(input: {
277
+ readonly context: BackgroundSessionExecutionContext;
278
+ readonly delayMs?: number;
279
+ readonly reason?: string;
280
+ readonly until?: string;
281
+ }): Promise<BackgroundSessionSummary>;
282
+ }
283
+ declare function createBackgroundSessionService(options: BackgroundSessionServiceOptions): BackgroundSessionService;
284
+ declare function sessionIdFromSessionKey(sessionKey: string): string | undefined;
285
+ declare function terminalDeliveryId(sessionId: string, kind: BackgroundSessionDeliveryKind): string;
286
+ declare function progressDeliveryId(sessionId: string, stepCount: number): string;
287
+ //#endregion
288
+ //#region src/modules/background-session/application/control/background-session-control.d.ts
289
+ type BackgroundSessionControlCommand = "start" | "wait" | "list" | "status" | "send" | "stop";
290
+ interface BackgroundSessionControlOrigin {
291
+ readonly allowedActorOpenIds: ReadonlyArray<string>;
292
+ readonly conversationId?: string;
293
+ readonly endpointId: string;
294
+ readonly tenantKey: string;
295
+ }
296
+ interface BackgroundSessionControlContext {
297
+ readonly agentId: string;
298
+ readonly authority: BackgroundSessionAuthority;
299
+ readonly origin: BackgroundSessionControlOrigin;
300
+ readonly policyEpoch: number;
301
+ readonly runId: string;
302
+ readonly sessionKey: string;
303
+ readonly sourceMessageId: string;
304
+ }
305
+ interface BackgroundSessionControl {
306
+ handle(command: BackgroundSessionControlCommand, context: BackgroundSessionControlContext, input: unknown): Promise<unknown>;
307
+ }
308
+ declare function createBackgroundSessionControl(options: {
309
+ readonly service: BackgroundSessionService;
310
+ }): BackgroundSessionControl;
311
+ declare class BackgroundSessionControlError extends Error {
312
+ readonly name = "BackgroundSessionControlError";
313
+ }
314
+ declare function toControlContext(input: {
315
+ readonly agentId: string;
316
+ readonly authority: BackgroundSessionAuthority;
317
+ readonly origin: BackgroundSessionControlOrigin;
318
+ readonly policyEpoch: number;
319
+ readonly sessionKey: string;
320
+ readonly sourceMessageId?: string;
321
+ }): BackgroundSessionControlContext;
322
+ //#endregion
323
+ //#region src/modules/background-session/application/supervision/background-session-config.d.ts
324
+ declare const DEFAULT_BACKGROUND_SESSION_STEP_TIMEOUT_MS: number;
325
+ declare const DEFAULT_BACKGROUND_SESSION_MAX_CONCURRENT_SESSIONS = 4;
326
+ declare const DEFAULT_BACKGROUND_SESSION_LEASE_MS = 30000;
327
+ declare const DEFAULT_BACKGROUND_SESSION_LEASE_RENEWAL_INTERVAL_MS = 10000;
328
+ declare const DEFAULT_BACKGROUND_SESSION_MAX_CONSECUTIVE_FAILURES = 3;
329
+ declare const DEFAULT_BACKGROUND_SESSION_RETRY_BACKOFF_MS = 30000;
330
+ declare const DEFAULT_BACKGROUND_SESSION_LIFETIME_MS: number;
331
+ declare const DEFAULT_BACKGROUND_SESSION_SUPERVISOR_INTERVAL_MS = 1000;
332
+ declare function resolveBackgroundSessionSupervisorIntervalMs(leaseMs: number): number;
333
+ //#endregion
334
+ //#region src/modules/background-session/application/supervision/background-session-delivery-queue.d.ts
335
+ type BackgroundSessionDeliveryKindForSupervisor = "progress" | "final" | "stopped" | "failed" | "reconciliation";
336
+ type BackgroundSessionDeliverySink = (delivery: {
337
+ readonly deliveryId: string;
338
+ readonly kind: BackgroundSessionDeliveryKindForSupervisor;
339
+ readonly sessionId: string;
340
+ readonly text: string;
341
+ }) => Promise<{
342
+ readonly providerMessageId: string;
343
+ }>;
344
+ //#endregion
345
+ //#region src/modules/background-session/application/supervision/background-session-supervisor.d.ts
346
+ interface BackgroundSessionLimits {
347
+ readonly intervalMs: number;
348
+ readonly leaseMs: number;
349
+ readonly leaseRenewalIntervalMs: number;
350
+ readonly maxConcurrentSessions: number;
351
+ readonly maxConsecutiveFailures: number;
352
+ readonly retryBackoffMs: number;
353
+ readonly sessionLifetimeMs: number;
354
+ }
355
+ interface BackgroundSessionStepResult {
356
+ readonly finalText: string;
357
+ readonly runId: string;
358
+ }
359
+ interface BackgroundSessionSupervisorOptions {
360
+ readonly clock: {
361
+ now(): string;
362
+ };
363
+ readonly config: BackgroundSessionLimits;
364
+ readonly deliveries: BackgroundSessionDeliveryStore;
365
+ readonly deliver: BackgroundSessionDeliverySink;
366
+ readonly onError?: (error: unknown) => void;
367
+ readonly repository: BackgroundSessionRepository;
368
+ readonly runStep: (input: {
369
+ readonly session: BackgroundSessionState;
370
+ readonly signal: AbortSignal;
371
+ readonly wakeText: string;
372
+ }) => Promise<BackgroundSessionStepResult>;
373
+ readonly sleep: (ms: number) => Effect.Effect<void>;
374
+ }
375
+ interface BackgroundSessionSupervisorStatus {
376
+ readonly capacity: number;
377
+ readonly counters: {
378
+ readonly completed: number;
379
+ readonly deliveriesDelivered: number;
380
+ readonly failed: number;
381
+ readonly started: number;
382
+ readonly staleLeaseEventsDropped: number;
383
+ readonly stopped: number;
384
+ };
385
+ readonly inFlightSteps: number;
386
+ readonly oldestDueAt?: string;
387
+ readonly owner: string;
388
+ readonly phaseCounts: Readonly<Record<BackgroundSessionPhase, number>>;
389
+ readonly reconciliationCount: number;
390
+ readonly repositoryHealthy: boolean;
391
+ readonly running: boolean;
392
+ }
393
+ interface BackgroundSessionSupervisor {
394
+ recover(): Effect.Effect<void>;
395
+ start(): Effect.Effect<void>;
396
+ status(): BackgroundSessionSupervisorStatus;
397
+ stop(): Effect.Effect<void>;
398
+ tick(): Effect.Effect<void>;
399
+ }
400
+ declare function createBackgroundSessionSupervisor(options: BackgroundSessionSupervisorOptions): BackgroundSessionSupervisor;
401
+ //#endregion
402
+ export { BackgroundSessionPhase as $, BackgroundSessionRepository as A, backgroundSessionToolIds as B, BackgroundSessionDetail as C, progressDeliveryId as D, createBackgroundSessionService as E, BackgroundSessionDeliveryStore as F, BACKGROUND_SESSION_SESSION_KEY_PREFIX as G, extendBackgroundSessionDefinition as H, BACKGROUND_SESSION_START_TOOL_ID as I, BackgroundSessionAuthority as J, createBackgroundSessionKey as K, BACKGROUND_SESSION_TOOL_IDS as L, BackgroundSessionRepositoryCorrupted as M, BackgroundSessionDeliveryConflict as N, sessionIdFromSessionKey as O, BackgroundSessionDeliveryRecord as P, BackgroundSessionOrigin as Q, BACKGROUND_SESSION_TOOL_PLUGIN_ID as R, BackgroundSessionCallerDenied as S, BackgroundSessionSummary as T, isBackgroundSessionToolId as U, createBackgroundSessionToolContracts as V, narrowBackgroundSessionDefinition as W, BackgroundSessionId as X, BackgroundSessionCancellation as Y, BackgroundSessionLease as Z, BackgroundSessionControlContext as _, createBackgroundSessionSupervisor as a, createBackgroundSessionControl as b, DEFAULT_BACKGROUND_SESSION_LIFETIME_MS as c, DEFAULT_BACKGROUND_SESSION_RETRY_BACKOFF_MS as d, BackgroundSessionState as et, DEFAULT_BACKGROUND_SESSION_STEP_TIMEOUT_MS as f, BackgroundSessionControlCommand as g, BackgroundSessionControl as h, BackgroundSessionSupervisorStatus as i, BackgroundSessionRepositoryConflict as j, terminalDeliveryId as k, DEFAULT_BACKGROUND_SESSION_MAX_CONCURRENT_SESSIONS as l, resolveBackgroundSessionSupervisorIntervalMs as m, BackgroundSessionSupervisor as n, BackgroundSessionTransitionDenied as nt, DEFAULT_BACKGROUND_SESSION_LEASE_MS as o, DEFAULT_BACKGROUND_SESSION_SUPERVISOR_INTERVAL_MS as p, createBackgroundSessionStepSourceMessageId as q, BackgroundSessionSupervisorOptions as r, isBackgroundSessionTerminalPhase as rt, DEFAULT_BACKGROUND_SESSION_LEASE_RENEWAL_INTERVAL_MS as s, BackgroundSessionLimits as t, BackgroundSessionTerminalResult as tt, DEFAULT_BACKGROUND_SESSION_MAX_CONSECUTIVE_FAILURES as u, BackgroundSessionControlError as v, BackgroundSessionService as w, toControlContext as x, BackgroundSessionControlOrigin as y, BACKGROUND_SESSION_TOOL_VERSION as z };