@rivus/agent 0.14.2 → 0.14.4

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 (37) hide show
  1. package/README.md +1 -1
  2. package/dist/acp.js +1 -2
  3. package/dist/bootstrap/pi-feishu.d.ts +1 -1
  4. package/dist/bootstrap/pi-feishu.js +4 -4
  5. package/dist/chunks/agent-loop.d.ts +55 -300
  6. package/dist/chunks/agent-loop.js +3 -1123
  7. package/dist/chunks/background-session-authority.js +230 -0
  8. package/dist/chunks/background-session-control-input.js +51 -0
  9. package/dist/chunks/background-session-service.d.ts +382 -0
  10. package/dist/chunks/index.d.ts +1201 -538
  11. package/dist/chunks/pi-tool-proxy.d.ts +22 -90
  12. package/dist/chunks/pi.js +5 -2
  13. package/dist/chunks/rivus-agent-definition-resolver.js +508 -0
  14. package/dist/chunks/rivus-daemon-cli.js +2776 -3244
  15. package/dist/chunks/rivus-plugin-testkit.d.ts +175 -2
  16. package/dist/chunks/rivus-plugin-testkit.js +11 -4
  17. package/dist/chunks/rivus-skill.d.ts +95 -0
  18. package/dist/chunks/sha256-digest.js +2 -7
  19. package/dist/chunks/src.js +11941 -7001
  20. package/dist/chunks/tool-input-digest.js +158 -0
  21. package/dist/cli.js +764 -712
  22. package/dist/index.d.ts +6 -7
  23. package/dist/index.js +7 -8
  24. package/dist/mcp.d.ts +48 -9
  25. package/dist/mcp.js +146 -20
  26. package/dist/pi.d.ts +3 -4
  27. package/dist/pi.js +1 -1
  28. package/package.json +5 -5
  29. package/dist/chunks/api.d.ts +0 -70
  30. package/dist/chunks/api.js +0 -471
  31. package/dist/chunks/api2.d.ts +0 -387
  32. package/dist/chunks/api2.js +0 -1331
  33. package/dist/chunks/api3.d.ts +0 -402
  34. package/dist/chunks/module.js +0 -267
  35. package/dist/chunks/pi-skill-tool.js +0 -460
  36. package/dist/chunks/spi.d.ts +0 -1
  37. package/dist/chunks/spi.js +0 -2
@@ -1,12 +1,209 @@
1
- import { $ as AgentSessionSnapshot, F as AgentDomainEventHandler, G as AgentRunUpdate, Gt as AgentRunSummary, I as AgentDomainEventListener, It as AgentTranscript, J as AgentSessionAvailability, K as AgentRunUpdateHandler, Kt as AgentSessionSummary, L as AgentDomainEventSink, N as ActiveAgentRun, P as AgentClock, R as AgentHarness, U as AgentPromptResult, W as AgentRunSnapshot, Wt as AgentHistory, X as AgentSessionHandle, Yt as AgentRunState, a as AgentLoopInput, cn as AgentRunId$1, en as AgentDomainEvent, et as PromptCommand, g as AgentModelContentObserver, jt as AgentInvocationOrigin, l as TextAgentLoopCallback, n as AgentLoopCallback, q as AgentRunUpdateListener, t as AgentLoop, tt as RunIdGenerator, yn as SessionKey, z as AgentHarnessAvailability, zt as AgentTranscriptTurn } from "./agent-loop.js";
2
- import { d as MemoryScope, g as CompactionSnapshot, h as CompactionInput, i as MemoryRecord, l as MemoryBinding, n as MemorySearchQuery, r as AgentMemorySnapshot } from "./api.js";
3
- import { B as CommittedAutomationOutcome, G as PutPluginState, H as DeliveryJob, J as RivusAgentDeployment, L as AutomationMandateStore, N as AutomationBinding, V as DeliveryAttemptResult, W as PluginStateRecord, Z as RivusHostToolDescriptor, a as RivusPlugin, b as ScheduledAutomationRunResult, o as RivusPluginCatalog, q as ResolvedRivusAgentDefinition, rt as RivusToolGrantSet, u as RegisteredRivusAutomation, v as ScheduledAutomationDeliveryInput, w as AutomationPresentation, x as AutomationTickRecord, y as ScheduledAutomationRunInput, z as AutomationOutcome } from "./api2.js";
4
- import { T as InvocationAuthorityRef, _ as ToolOperationInspectResult, b as ToolOperationRecord, f as AuthorizationPolicyState, g as ToolOperationBinding, h as ToolOperationBeginResult, p as ToolApprovalRequest, t as PiToolApprovalGateway, y as ToolOperationReconciliationOutcome } from "./pi-tool-proxy.js";
5
- import { A as BackgroundSessionRepository, F as BackgroundSessionDeliveryStore, J as BackgroundSessionAuthority, P as BackgroundSessionDeliveryRecord, Q as BackgroundSessionOrigin, X as BackgroundSessionId, Z as BackgroundSessionLease, et as BackgroundSessionState, i as BackgroundSessionSupervisorStatus, w as BackgroundSessionService } from "./api3.js";
6
- import { Effect } from "effect";
1
+ import { Et as SessionKey, K as AgentTranscript, Mt as AgentInvocationOrigin, Y as AgentTranscriptTurn, a as AgentLoopInput, at as AgentRunState, et as AgentHistory, ht as AgentRunId$1, it as AgentRunPhase, l as TextAgentLoopCallback, n as AgentLoopCallback, nt as AgentSessionSummary, st as AgentDomainEvent, t as AgentLoop, tt as AgentRunSummary } from "./agent-loop.js";
2
+ import { c as RivusHostToolDescriptor, g as RivusToolGrantSet, l as RivusMemoryAuthority, y as RivusToolRisk } from "./rivus-skill.js";
3
+ import { M as RivusAgentDeployment, _ as AutomationPresentation, c as RivusPluginCatalog, d as RegisteredRivusAutomation, j as ResolvedRivusAgentDefinition, s as RivusPlugin } from "./rivus-plugin-testkit.js";
4
+ import { C as SuspendBackgroundSessionInput, E as BackgroundSessionPhase, M as BackgroundSessionId, O as BackgroundSessionLease, S as CreateBackgroundSessionInput, b as BackgroundSession, d as BackgroundSessionLeasePrecondition, f as BackgroundSessionLeaseRequirement, j as BackgroundSessionMemoryScope, m as BackgroundSessionRepository$1, p as BackgroundSessionLeaseStaleOrAbsent, r as BackgroundSessionService, v as BackgroundSessionDeliveryRecord, w as BackgroundSessionSnapshot, x as ClaimBackgroundSessionInput, y as BackgroundSessionDeliveryStore } from "./background-session-service.js";
5
+ import { c as ToolExecutionRequest$1, d as InvocationAuthorityRef$1, o as AuthorizationPolicyState$1, s as ToolApprovalRequest$1, t as PiToolApprovalGateway, u as InvocationAuthority$1 } from "./pi-tool-proxy.js";
6
+ import { Effect, Stream } from "effect";
7
7
  import { Tracer } from "@opentelemetry/api";
8
8
 
9
- //#region src/modules/run-presentation/domain/value/presented-value.d.ts
9
+ //#region src/core/application/run-presentation/projection/conversation-progress.d.ts
10
+ declare const DEFAULT_CONVERSATION_PROGRESS_DISPLAY: "collapsed";
11
+ type ConversationProgressDisplay = "hidden" | "collapsed" | "expanded";
12
+ //#endregion
13
+ //#region src/core/application/agent-execution/contracts/agent-execution-errors.d.ts
14
+ declare class AgentHarnessBusy {
15
+ readonly activeRun: ActiveAgentRun;
16
+ readonly activeState?: AgentRunState | undefined;
17
+ readonly _tag = "AgentHarnessBusy";
18
+ readonly activeRunId: AgentRunId$1;
19
+ readonly activeSessionKey: SessionKey;
20
+ constructor(activeRun: ActiveAgentRun, activeState?: AgentRunState | undefined);
21
+ }
22
+ declare class AgentLoopFailed {
23
+ readonly runId: AgentRunId$1;
24
+ readonly errorMessage: string;
25
+ readonly cause: unknown;
26
+ readonly state?: AgentRunState | undefined;
27
+ readonly _tag = "AgentLoopFailed";
28
+ constructor(runId: AgentRunId$1, errorMessage: string, cause: unknown, state?: AgentRunState | undefined);
29
+ }
30
+ declare class AgentEventSinkFailed {
31
+ readonly runId: AgentRunId$1;
32
+ readonly eventType: AgentDomainEvent["type"];
33
+ readonly cause: unknown;
34
+ readonly _tag = "AgentEventSinkFailed";
35
+ constructor(runId: AgentRunId$1, eventType: AgentDomainEvent["type"], cause: unknown);
36
+ }
37
+ declare class AgentEventHandlerFailed {
38
+ readonly runId: AgentRunId$1;
39
+ readonly eventType: AgentDomainEvent["type"];
40
+ readonly cause: unknown;
41
+ readonly state?: AgentRunState | undefined;
42
+ readonly _tag = "AgentEventHandlerFailed";
43
+ constructor(runId: AgentRunId$1, eventType: AgentDomainEvent["type"], cause: unknown, state?: AgentRunState | undefined);
44
+ }
45
+ declare class AgentRunCancelled {
46
+ readonly runId: AgentRunId$1;
47
+ readonly reason: string | undefined;
48
+ readonly state: AgentRunState;
49
+ readonly _tag = "AgentRunCancelled";
50
+ constructor(runId: AgentRunId$1, reason: string | undefined, state: AgentRunState);
51
+ }
52
+ //#endregion
53
+ //#region src/core/application/agent-execution/contracts/agent-execution-contracts.d.ts
54
+ interface AgentClock {
55
+ readonly now: Effect.Effect<Date>;
56
+ }
57
+ interface RunIdGenerator {
58
+ readonly next: Effect.Effect<AgentRunId$1>;
59
+ }
60
+ interface PromptCommand {
61
+ readonly invocation?: AgentInvocationOrigin;
62
+ readonly sessionKey: SessionKey;
63
+ readonly text: string;
64
+ }
65
+ interface AgentPromptResult {
66
+ readonly runId: AgentRunId$1;
67
+ readonly events: ReadonlyArray<AgentDomainEvent>;
68
+ readonly finalText: string;
69
+ readonly runSnapshot: AgentRunSnapshot;
70
+ readonly snapshot: AgentSessionSnapshot;
71
+ readonly state: AgentRunState;
72
+ readonly turn: AgentTranscriptTurn;
73
+ readonly updates: ReadonlyArray<AgentRunUpdate>;
74
+ }
75
+ interface AgentRunUpdate {
76
+ readonly event: AgentDomainEvent;
77
+ readonly previousState?: AgentRunState;
78
+ readonly state: AgentRunState;
79
+ }
80
+ interface AgentRunSnapshot {
81
+ readonly events: ReadonlyArray<AgentDomainEvent>;
82
+ readonly runId: AgentRunId$1;
83
+ readonly state?: AgentRunState;
84
+ readonly summary: AgentRunSummary;
85
+ readonly updates: ReadonlyArray<AgentRunUpdate>;
86
+ }
87
+ interface ActiveAgentRun {
88
+ readonly runId: AgentRunId$1;
89
+ readonly sessionKey: SessionKey;
90
+ }
91
+ type AgentHarnessAvailability = AgentHarnessIdleAvailability | AgentHarnessBusyAvailability;
92
+ type AgentSessionAvailability = AgentHarnessIdleAvailability | AgentSessionBusyAvailability;
93
+ interface AgentHarnessIdleAvailability {
94
+ readonly busy: false;
95
+ }
96
+ interface AgentHarnessBusyAvailability {
97
+ readonly activeRun: ActiveAgentRun;
98
+ readonly activeRunId: AgentRunId$1;
99
+ readonly activeSessionKey: SessionKey;
100
+ readonly activeState?: AgentRunState;
101
+ readonly busy: true;
102
+ }
103
+ type AgentSessionBusyAvailability = AgentSessionOwnedBusyAvailability | AgentSessionOtherBusyAvailability;
104
+ interface AgentSessionOwnedBusyAvailability {
105
+ readonly activeInSession: true;
106
+ readonly activeRun: ActiveAgentRun;
107
+ readonly activeRunId: AgentRunId$1;
108
+ readonly activeState?: AgentRunState;
109
+ readonly busy: true;
110
+ }
111
+ interface AgentSessionOtherBusyAvailability {
112
+ readonly activeInSession: false;
113
+ readonly busy: true;
114
+ }
115
+ interface AgentSessionSnapshot {
116
+ readonly availability: AgentSessionAvailability;
117
+ readonly latestRunSummary?: AgentRunSummary;
118
+ readonly runs: ReadonlyArray<AgentRunSummary>;
119
+ readonly sessionKey: SessionKey;
120
+ readonly state?: AgentRunState;
121
+ readonly summary?: AgentSessionSummary;
122
+ readonly transcript: AgentTranscript;
123
+ }
124
+ type AgentHarnessError = AgentHarnessBusy | AgentLoopFailed | AgentEventSinkFailed | AgentEventHandlerFailed | AgentRunCancelled;
125
+ interface AgentRunSubscriptionCapabilities {
126
+ subscribe(listener: AgentDomainEventListener): () => void;
127
+ subscribeRun(runId: AgentRunId$1, listener: AgentDomainEventListener): () => void;
128
+ subscribeRunUpdates(runId: AgentRunId$1, listener: AgentRunUpdateListener): () => void;
129
+ subscribeUpdates(listener: AgentRunUpdateListener): () => void;
130
+ }
131
+ interface AgentHarness extends AgentRunSubscriptionCapabilities {
132
+ cancelActiveRun(reason?: string): Effect.Effect<boolean>;
133
+ cancelRun(runId: AgentRunId$1, reason?: string): Effect.Effect<boolean>;
134
+ steerRun(runId: AgentRunId$1, text: string): Effect.Effect<boolean>;
135
+ forSession(sessionKey: SessionKey): AgentSessionHandle;
136
+ getActiveRun(): ActiveAgentRun | undefined;
137
+ getActiveRunId(): AgentRunId$1 | undefined;
138
+ getActiveRunState(): AgentRunState | undefined;
139
+ getAvailability(): AgentHarnessAvailability;
140
+ getHistory(): AgentHistory;
141
+ getRunEvents(runId: AgentRunId$1): ReadonlyArray<AgentDomainEvent> | undefined;
142
+ getRunSnapshot(runId: AgentRunId$1): AgentRunSnapshot | undefined;
143
+ getRunSummary(runId: AgentRunId$1): AgentRunSummary | undefined;
144
+ getRunState(runId: AgentRunId$1): AgentRunState | undefined;
145
+ getRunUpdates(runId: AgentRunId$1): ReadonlyArray<AgentRunUpdate> | undefined;
146
+ getSessionHistory(sessionKey: SessionKey): AgentHistory;
147
+ getSessionLatestRunSnapshot(sessionKey: SessionKey): AgentRunSnapshot | undefined;
148
+ getSessionLatestRunSummary(sessionKey: SessionKey): AgentRunSummary | undefined;
149
+ getSessionRuns(sessionKey: SessionKey): ReadonlyArray<AgentRunSummary>;
150
+ getSessionSnapshot(sessionKey: SessionKey): AgentSessionSnapshot;
151
+ getSessionSummary(sessionKey: SessionKey): AgentSessionSummary | undefined;
152
+ getSessionTranscript(sessionKey: SessionKey): AgentTranscript;
153
+ getSessionState(sessionKey: SessionKey): AgentRunState | undefined;
154
+ getState(): AgentRunState;
155
+ prompt(command: PromptCommand): Effect.Effect<AgentPromptResult, AgentHarnessError>;
156
+ promptRunSnapshot(command: PromptCommand): Effect.Effect<AgentRunSnapshot, AgentHarnessError>;
157
+ promptSnapshot(command: PromptCommand): Effect.Effect<AgentSessionSnapshot, AgentHarnessError>;
158
+ promptText(command: PromptCommand): Effect.Effect<string, AgentHarnessError>;
159
+ promptTurn(command: PromptCommand): Effect.Effect<AgentTranscriptTurn, AgentHarnessError>;
160
+ promptWithEvents<R>(command: PromptCommand, onEvent: AgentDomainEventHandler<R>): Effect.Effect<AgentPromptResult, AgentHarnessError, R>;
161
+ promptWithUpdates<R>(command: PromptCommand, onUpdate: AgentRunUpdateHandler<R>): Effect.Effect<AgentPromptResult, AgentHarnessError, R>;
162
+ stream(command: PromptCommand): Stream.Stream<AgentDomainEvent, AgentHarnessError>;
163
+ streamText(command: PromptCommand): Stream.Stream<string, AgentHarnessError>;
164
+ streamUpdates(command: PromptCommand): Stream.Stream<AgentRunUpdate, AgentHarnessError>;
165
+ }
166
+ interface AgentSessionHandle extends AgentRunSubscriptionCapabilities {
167
+ readonly sessionKey: SessionKey;
168
+ cancelActiveRun(reason?: string): Effect.Effect<boolean>;
169
+ cancelRun(runId: AgentRunId$1, reason?: string): Effect.Effect<boolean>;
170
+ steerRun(runId: AgentRunId$1, text: string): Effect.Effect<boolean>;
171
+ getActiveRun(): ActiveAgentRun | undefined;
172
+ getActiveRunState(): AgentRunState | undefined;
173
+ getAvailability(): AgentSessionAvailability;
174
+ getHistory(): AgentHistory;
175
+ getLatestRunSnapshot(): AgentRunSnapshot | undefined;
176
+ getLatestRunSummary(): AgentRunSummary | undefined;
177
+ getRunEvents(runId: AgentRunId$1): ReadonlyArray<AgentDomainEvent> | undefined;
178
+ getRunSnapshot(runId: AgentRunId$1): AgentRunSnapshot | undefined;
179
+ getRunSummary(runId: AgentRunId$1): AgentRunSummary | undefined;
180
+ getRuns(): ReadonlyArray<AgentRunSummary>;
181
+ getSnapshot(): AgentSessionSnapshot;
182
+ getSummary(): AgentSessionSummary | undefined;
183
+ getTranscript(): AgentTranscript;
184
+ getRunState(runId: AgentRunId$1): AgentRunState | undefined;
185
+ getRunUpdates(runId: AgentRunId$1): ReadonlyArray<AgentRunUpdate> | undefined;
186
+ getState(): AgentRunState | undefined;
187
+ prompt(text: string): Effect.Effect<AgentPromptResult, AgentHarnessError>;
188
+ promptRunSnapshot(text: string): Effect.Effect<AgentRunSnapshot, AgentHarnessError>;
189
+ promptSnapshot(text: string): Effect.Effect<AgentSessionSnapshot, AgentHarnessError>;
190
+ promptText(text: string): Effect.Effect<string, AgentHarnessError>;
191
+ promptTurn(text: string): Effect.Effect<AgentTranscriptTurn, AgentHarnessError>;
192
+ promptWithEvents<R>(text: string, onEvent: AgentDomainEventHandler<R>): Effect.Effect<AgentPromptResult, AgentHarnessError, R>;
193
+ promptWithUpdates<R>(text: string, onUpdate: AgentRunUpdateHandler<R>): Effect.Effect<AgentPromptResult, AgentHarnessError, R>;
194
+ stream(text: string): Stream.Stream<AgentDomainEvent, AgentHarnessError>;
195
+ streamText(text: string): Stream.Stream<string, AgentHarnessError>;
196
+ streamUpdates(text: string): Stream.Stream<AgentRunUpdate, AgentHarnessError>;
197
+ }
198
+ type AgentDomainEventListener = (event: AgentDomainEvent) => void;
199
+ type AgentRunUpdateListener = (update: AgentRunUpdate) => void;
200
+ type AgentDomainEventHandler<R = never> = (event: AgentDomainEvent) => Effect.Effect<void, unknown, R>;
201
+ type AgentRunUpdateHandler<R = never> = (update: AgentRunUpdate) => Effect.Effect<void, unknown, R>;
202
+ interface AgentDomainEventSink {
203
+ append(event: AgentDomainEvent): Effect.Effect<void, unknown>;
204
+ }
205
+ //#endregion
206
+ //#region src/core/application/run-presentation/projection/presented-value.d.ts
10
207
  type PresentedValue = {
11
208
  readonly kind: "boolean";
12
209
  readonly value: boolean;
@@ -45,7 +242,7 @@ interface PresentedValueOptions {
45
242
  }
46
243
  declare function createPresentedValue(value: unknown, options?: PresentedValueOptions): PresentedValue;
47
244
  //#endregion
48
- //#region src/modules/run-presentation/domain/presentation/run-presentation.d.ts
245
+ //#region src/core/application/run-presentation/projection/run-presentation.d.ts
49
246
  declare const RUN_PRESENTATION_SCHEMA_VERSION: 2;
50
247
  type AgentRunId = string;
51
248
  type RunPresentationPhase = "cancelled" | "completed" | "failed" | "running";
@@ -99,10 +296,6 @@ interface RunPresentation {
99
296
  }
100
297
  declare function hasInspectableRunProgress(presentation: RunPresentation): boolean;
101
298
  //#endregion
102
- //#region src/modules/run-presentation/domain/presentation/conversation-progress.d.ts
103
- declare const DEFAULT_CONVERSATION_PROGRESS_DISPLAY: "collapsed";
104
- type ConversationProgressDisplay = "hidden" | "collapsed" | "expanded";
105
- //#endregion
106
299
  //#region src/adapters/feishu/card-presentation/streaming/feishu-stream-projector.d.ts
107
300
  type FeishuStreamAction = {
108
301
  readonly type: "update_text";
@@ -178,18 +371,18 @@ interface JsonlFeishuCardDeliveryLedgerOptions {
178
371
  }
179
372
  declare function openJsonlFeishuCardDeliveryLedger(options: JsonlFeishuCardDeliveryLedgerOptions): Promise<FeishuCardDeliveryLedger>;
180
373
  //#endregion
181
- //#region src/modules/human-interaction/domain/interaction/human-interaction-model.d.ts
182
- type HumanInteractionId = string;
374
+ //#region src/core/domain/human-interaction/aggregate/snapshot.d.ts
375
+ type HumanInteractionId$1 = string;
183
376
  type HumanInteractionToolRisk = "observe" | "mutate" | "irreversible" | "host-control";
184
- interface HumanInteractionActor {
377
+ interface HumanInteractionActor$1 {
185
378
  readonly openId: string;
186
379
  readonly tenantKey: string;
187
380
  }
188
- interface HumanInteractionFact {
381
+ interface HumanInteractionFact$1 {
189
382
  readonly label: string;
190
383
  readonly value: string;
191
384
  }
192
- interface ToolApprovalBinding {
385
+ interface ToolApprovalBinding$1 {
193
386
  readonly agentId: string;
194
387
  readonly callId: string;
195
388
  readonly inputDigest: string;
@@ -202,13 +395,13 @@ interface ToolApprovalBinding {
202
395
  readonly toolId: string;
203
396
  readonly toolVersion: string;
204
397
  }
205
- interface HumanInteractionBase {
398
+ interface HumanInteractionBase$1 {
206
399
  readonly agentId: string;
207
400
  readonly allowedActorOpenIds: ReadonlyArray<string>;
208
401
  readonly createdAt: string;
209
402
  readonly expiresAt: string;
210
- readonly facts: ReadonlyArray<HumanInteractionFact>;
211
- readonly id: HumanInteractionId;
403
+ readonly facts: ReadonlyArray<HumanInteractionFact$1>;
404
+ readonly id: HumanInteractionId$1;
212
405
  readonly instanceId: string;
213
406
  readonly revision: number;
214
407
  readonly runId: string;
@@ -218,63 +411,64 @@ interface HumanInteractionBase {
218
411
  readonly tenantKey: string;
219
412
  readonly title: string;
220
413
  }
221
- interface PendingHumanInteractionState {
414
+ interface PendingHumanInteractionState$1 {
222
415
  readonly status: "pending";
223
416
  }
224
- interface ApprovedHumanInteractionState {
225
- readonly actor: HumanInteractionActor;
417
+ interface ApprovedHumanInteractionState$1 {
418
+ readonly actor: HumanInteractionActor$1;
226
419
  readonly consumedAt?: string;
227
420
  readonly resolvedAt: string;
228
421
  readonly status: "approved";
229
422
  }
230
- interface RejectedHumanInteractionState {
231
- readonly actor: HumanInteractionActor;
423
+ interface RejectedHumanInteractionState$1 {
424
+ readonly actor: HumanInteractionActor$1;
232
425
  readonly resolvedAt: string;
233
426
  readonly status: "rejected";
234
427
  }
235
- interface SelectedHumanInteractionState {
236
- readonly actor: HumanInteractionActor;
428
+ interface SelectedHumanInteractionState$1 {
429
+ readonly actor: HumanInteractionActor$1;
237
430
  readonly optionId: string;
238
431
  readonly resolvedAt: string;
239
432
  readonly status: "selected";
240
433
  }
241
- interface ExpiredHumanInteractionState {
434
+ interface ExpiredHumanInteractionState$1 {
242
435
  readonly expiredAt: string;
243
436
  readonly status: "expired";
244
437
  }
245
- interface CancelledHumanInteractionState {
438
+ interface CancelledHumanInteractionState$1 {
246
439
  readonly cancelledAt: string;
247
440
  readonly reason?: string;
248
441
  readonly status: "cancelled";
249
442
  }
250
- type ToolApprovalInteractionState = PendingHumanInteractionState | ApprovedHumanInteractionState | RejectedHumanInteractionState | ExpiredHumanInteractionState | CancelledHumanInteractionState;
251
- interface ToolApprovalInteraction extends HumanInteractionBase {
443
+ type ToolApprovalInteractionState$1 = PendingHumanInteractionState$1 | ApprovedHumanInteractionState$1 | RejectedHumanInteractionState$1 | ExpiredHumanInteractionState$1 | CancelledHumanInteractionState$1;
444
+ interface ToolApprovalInteraction$1 extends HumanInteractionBase$1 {
252
445
  readonly kind: "tool-approval";
253
- readonly request: Omit<ToolApprovalBinding, "agentId" | "instanceId" | "runId" | "sessionKey" | "tenantKey">;
254
- readonly state: ToolApprovalInteractionState;
446
+ readonly request: Omit<ToolApprovalBinding$1, "agentId" | "instanceId" | "runId" | "sessionKey" | "tenantKey">;
447
+ readonly state: ToolApprovalInteractionState$1;
255
448
  }
256
- interface UserDecisionOption {
449
+ interface UserDecisionOption$1 {
257
450
  readonly description: string;
258
451
  readonly id: string;
259
452
  readonly label: string;
260
453
  }
261
- type UserDecisionInteractionState = PendingHumanInteractionState | SelectedHumanInteractionState | RejectedHumanInteractionState | ExpiredHumanInteractionState | CancelledHumanInteractionState;
262
- interface UserDecisionInteraction extends HumanInteractionBase {
454
+ type UserDecisionInteractionState$1 = PendingHumanInteractionState$1 | SelectedHumanInteractionState$1 | RejectedHumanInteractionState$1 | ExpiredHumanInteractionState$1 | CancelledHumanInteractionState$1;
455
+ interface UserDecisionInteraction$1 extends HumanInteractionBase$1 {
263
456
  readonly kind: "user-decision";
264
- readonly options: ReadonlyArray<UserDecisionOption>;
457
+ readonly options: ReadonlyArray<UserDecisionOption$1>;
265
458
  readonly recommendedOptionId?: string;
266
- readonly state: UserDecisionInteractionState;
267
- }
268
- type HumanInteraction = ToolApprovalInteraction | UserDecisionInteraction;
269
- type HumanInteractionResolutionAction = "approve" | "reject" | "select";
270
- type HumanInteractionTransition = {
271
- readonly action: HumanInteractionResolutionAction;
272
- readonly actor: HumanInteractionActor;
459
+ readonly state: UserDecisionInteractionState$1;
460
+ }
461
+ type HumanInteraction$1 = ToolApprovalInteraction$1 | UserDecisionInteraction$1;
462
+ type HumanInteractionSnapshot = HumanInteraction$1;
463
+ type HumanInteractionResolutionAction$1 = "approve" | "reject" | "select";
464
+ type HumanInteractionTransition$1 = {
465
+ readonly action: HumanInteractionResolutionAction$1;
466
+ readonly actor: HumanInteractionActor$1;
273
467
  readonly now: string;
274
468
  readonly optionId?: string;
275
469
  readonly type: "resolve";
276
470
  } | {
277
- readonly binding: ToolApprovalBinding;
471
+ readonly binding: ToolApprovalBinding$1;
278
472
  readonly now: string;
279
473
  readonly type: "consume-approval";
280
474
  } | {
@@ -282,13 +476,11 @@ type HumanInteractionTransition = {
282
476
  readonly reason?: string;
283
477
  readonly type: "cancel";
284
478
  };
285
- //#endregion
286
- //#region src/modules/human-interaction/application/interaction/human-interaction-request.d.ts
287
- interface RequestToolApprovalInput {
479
+ interface RequestToolApprovalInput$1 {
288
480
  readonly agentId: string;
289
481
  readonly allowedActorOpenIds: ReadonlyArray<string>;
290
482
  readonly expiresAt: string;
291
- readonly facts: ReadonlyArray<HumanInteractionFact>;
483
+ readonly facts: ReadonlyArray<HumanInteractionFact$1>;
292
484
  readonly instanceId: string;
293
485
  readonly interactionId: string;
294
486
  readonly request: {
@@ -306,14 +498,14 @@ interface RequestToolApprovalInput {
306
498
  readonly tenantKey: string;
307
499
  readonly title: string;
308
500
  }
309
- interface RequestUserDecisionInput {
501
+ interface RequestUserDecisionInput$1 {
310
502
  readonly agentId: string;
311
503
  readonly allowedActorOpenIds: ReadonlyArray<string>;
312
504
  readonly expiresAt: string;
313
- readonly facts: ReadonlyArray<HumanInteractionFact>;
505
+ readonly facts: ReadonlyArray<HumanInteractionFact$1>;
314
506
  readonly instanceId: string;
315
507
  readonly interactionId: string;
316
- readonly options: ReadonlyArray<UserDecisionOption>;
508
+ readonly options: ReadonlyArray<UserDecisionOption$1>;
317
509
  readonly recommendedOptionId?: string;
318
510
  readonly runId: string;
319
511
  readonly sessionKey: string;
@@ -323,62 +515,55 @@ interface RequestUserDecisionInput {
323
515
  readonly title: string;
324
516
  }
325
517
  //#endregion
326
- //#region src/modules/human-interaction/application/interaction/human-interaction-presenter.d.ts
327
- interface HumanInteractionPresenter {
328
- present(interaction: HumanInteraction): Effect.Effect<void, unknown>;
329
- }
330
- //#endregion
331
- //#region src/modules/human-interaction/application/interaction/human-interaction-repository.d.ts
332
- declare class HumanInteractionRepositoryError extends Error {
333
- readonly operation: "create" | "get" | "update";
334
- readonly cause?: unknown | undefined;
335
- readonly name = "HumanInteractionRepositoryError";
336
- constructor(operation: "create" | "get" | "update", message: string, cause?: unknown | undefined);
337
- }
338
- interface HumanInteractionRepository {
339
- create(interaction: HumanInteraction): Effect.Effect<void, HumanInteractionRepositoryError>;
340
- get(id: HumanInteractionId): Effect.Effect<HumanInteraction | undefined, HumanInteractionRepositoryError>;
341
- update(id: HumanInteractionId, transition: (current: HumanInteraction) => HumanInteraction): Effect.Effect<HumanInteraction, HumanInteractionRepositoryError>;
342
- }
343
- //#endregion
344
- //#region src/modules/human-interaction/application/interaction/human-interaction-service.d.ts
345
- interface HumanInteractionClock {
518
+ //#region src/core/application/human-interaction/ports/human-interaction-contracts.d.ts
519
+ interface HumanInteractionClock$1 {
346
520
  now(): string;
347
521
  }
348
- interface ResolveHumanInteractionInput {
349
- readonly action: HumanInteractionResolutionAction;
350
- readonly actor: HumanInteractionActor;
522
+ interface ResolveHumanInteractionInput$1 {
523
+ readonly action: HumanInteractionResolutionAction$1;
524
+ readonly actor: HumanInteractionActor$1;
351
525
  readonly interactionId: string;
352
526
  readonly optionId?: string;
353
527
  }
354
- interface ConsumeToolApprovalInput {
528
+ interface ConsumeToolApprovalInput$1 {
355
529
  readonly approvalId: string;
356
- readonly binding: ToolApprovalBinding;
357
- }
358
- interface HumanInteractionService {
359
- consumeToolApproval(input: ConsumeToolApprovalInput): Effect.Effect<boolean, unknown>;
360
- get(interactionId: string): Effect.Effect<HumanInteraction | undefined, unknown>;
361
- resolve(input: ResolveHumanInteractionInput): Effect.Effect<HumanInteraction, unknown>;
362
- requestToolApproval(input: RequestToolApprovalInput): Effect.Effect<ToolApprovalInteraction, unknown>;
363
- requestUserDecision(input: RequestUserDecisionInput): Effect.Effect<UserDecisionInteraction, unknown>;
530
+ readonly binding: ToolApprovalBinding$1;
531
+ }
532
+ interface HumanInteractionServiceContract<Interaction, ToolApprovalInteraction = Interaction, UserDecisionInteraction = Interaction, ToolApprovalInput = RequestToolApprovalInput$1, UserDecisionInput = RequestUserDecisionInput$1, ResolveInput = ResolveHumanInteractionInput$1, ConsumeInput = ConsumeToolApprovalInput$1> {
533
+ consumeToolApproval(input: ConsumeInput): Effect.Effect<boolean, unknown>;
534
+ get(interactionId: string): Effect.Effect<Interaction | undefined, unknown>;
535
+ resolve(input: ResolveInput): Effect.Effect<Interaction, unknown>;
536
+ requestToolApproval(input: ToolApprovalInput): Effect.Effect<ToolApprovalInteraction, unknown>;
537
+ requestUserDecision(input: UserDecisionInput): Effect.Effect<UserDecisionInteraction, unknown>;
364
538
  waitForResolution(input: {
365
539
  readonly interactionId: string;
366
540
  readonly signal?: AbortSignal;
367
- }): Effect.Effect<HumanInteraction, unknown>;
541
+ }): Effect.Effect<Interaction, unknown>;
368
542
  }
369
- interface HumanInteractionServiceOptions {
370
- readonly clock: HumanInteractionClock;
371
- readonly presenter: HumanInteractionPresenter;
372
- readonly repository: HumanInteractionRepository;
543
+ interface HumanInteractionServiceOptionsContract<Clock, Presenter, Repository> {
544
+ readonly clock: Clock;
545
+ readonly presenter: Presenter;
546
+ readonly repository: Repository;
373
547
  readonly sleep?: (ms: number) => Promise<void>;
374
548
  }
375
- declare function createHumanInteractionService(options: HumanInteractionServiceOptions): HumanInteractionService;
376
549
  //#endregion
377
- //#region src/modules/human-interaction/domain/interaction/human-interaction-transitions.d.ts
378
- declare class HumanInteractionTransitionDenied extends Error {
379
- readonly name = "HumanInteractionTransitionDenied";
550
+ //#region src/core/application/human-interaction/ports/human-interaction-presenter.d.ts
551
+ interface HumanInteractionPresenterContract<Interaction> {
552
+ present(interaction: Interaction): Effect.Effect<void, unknown>;
553
+ }
554
+ //#endregion
555
+ //#region src/core/application/human-interaction/ports/human-interaction-repository.d.ts
556
+ declare class HumanInteractionRepositoryError extends Error {
557
+ readonly operation: "create" | "get" | "update";
558
+ readonly cause?: unknown | undefined;
559
+ readonly name = "HumanInteractionRepositoryError";
560
+ constructor(operation: "create" | "get" | "update", message: string, cause?: unknown | undefined);
561
+ }
562
+ interface HumanInteractionRepositoryContract<Interaction> {
563
+ create(interaction: Interaction): Effect.Effect<void, HumanInteractionRepositoryError>;
564
+ get(id: HumanInteractionId$1): Effect.Effect<Interaction | undefined, HumanInteractionRepositoryError>;
565
+ update(id: HumanInteractionId$1, transition: (current: Interaction) => Interaction): Effect.Effect<Interaction, HumanInteractionRepositoryError>;
380
566
  }
381
- declare function transitionHumanInteraction(interaction: HumanInteraction, transition: HumanInteractionTransition): HumanInteraction;
382
567
  //#endregion
383
568
  //#region src/adapters/feishu/protocol/feishu-receive-message.d.ts
384
569
  interface FeishuReceiveMessagePayload {
@@ -412,10 +597,8 @@ interface FeishuReceiveMessagePayload {
412
597
  };
413
598
  }
414
599
  //#endregion
415
- //#region src/modules/conversation-session/domain/session/conversation-session.d.ts
416
- type ConversationSessionKey = string;
417
- //#endregion
418
600
  //#region src/adapters/feishu/conversation-session/feishu-session-key.d.ts
601
+ type ConversationSessionKey = string;
419
602
  interface FeishuSessionReference {
420
603
  readonly tenantKey: string;
421
604
  readonly chatId: string;
@@ -555,8 +738,8 @@ declare class UnsupportedFeishuCardAction {
555
738
  }
556
739
  type FeishuCardActionIntakeError = InvalidFeishuCardAction | UnsupportedFeishuCardAction;
557
740
  interface FeishuResolveInteractionCommand {
558
- readonly action: HumanInteractionResolutionAction;
559
- readonly actor: HumanInteractionActor;
741
+ readonly action: HumanInteractionResolutionAction$1;
742
+ readonly actor: HumanInteractionActor$1;
560
743
  readonly interactionId: string;
561
744
  readonly messageId: string;
562
745
  readonly optionId?: string;
@@ -567,7 +750,6 @@ type FeishuCardActionCommand = FeishuCancelRunCommand | FeishuResolveInteraction
567
750
  declare function createAgentCommandFromFeishuCardAction(payload: FeishuCardActionTriggerPayload): Effect.Effect<FeishuCardActionCommand, FeishuCardActionIntakeError>;
568
751
  //#endregion
569
752
  //#region src/adapters/feishu/protocol/feishu-agent-run-preparation.d.ts
570
- /** Channel contract shared by Feishu intake and presentation adapters. */
571
753
  interface FeishuAgentRunPreparation {
572
754
  readonly messageId: string;
573
755
  readonly prompt: string;
@@ -659,7 +841,7 @@ interface FeishuAgentDaemonSteeredResult {
659
841
  readonly steered: true;
660
842
  }
661
843
  interface FeishuAgentDaemonInteractionResult {
662
- readonly interaction: HumanInteraction;
844
+ readonly interaction: HumanInteractionSnapshot;
663
845
  readonly interactionId: string;
664
846
  readonly messageId: string;
665
847
  readonly resolved: true;
@@ -671,7 +853,7 @@ interface FeishuAgentDaemonSessionResetResult {
671
853
  readonly reset: true;
672
854
  }
673
855
  interface FeishuHumanInteractionActions {
674
- resolve(input: ResolveHumanInteractionInput): Effect.Effect<HumanInteraction, unknown>;
856
+ resolve(input: ResolveHumanInteractionInput$1): Effect.Effect<HumanInteractionSnapshot, unknown>;
675
857
  }
676
858
  type FeishuAgentDaemonHandleResult = FeishuAgentDaemonRunResult | FeishuAgentDaemonSkippedResult | FeishuAgentDaemonCancelResult | FeishuAgentDaemonSteeredResult | FeishuAgentDaemonInteractionResult | FeishuAgentDaemonSessionResetResult;
677
859
  interface FeishuAgentPreparedControl {
@@ -689,18 +871,12 @@ interface FeishuAgentDaemon {
689
871
  }
690
872
  declare function createFeishuAgentDaemon(options: FeishuAgentDaemonOptions): FeishuAgentDaemon;
691
873
  //#endregion
692
- //#region src/modules/recovery/domain/action/recovery-action.d.ts
874
+ //#region src/core/application/recovery/contracts/recovery-control.d.ts
693
875
  interface RecoveryAction {
694
876
  readonly actorId: string;
695
877
  readonly at: string;
696
878
  readonly note: string;
697
879
  }
698
- declare class InvalidRecoveryAction extends Error {
699
- readonly name = "InvalidRecoveryAction";
700
- }
701
- declare function createRecoveryAction(input: RecoveryAction): RecoveryAction;
702
- //#endregion
703
- //#region src/modules/recovery/application/control/recovery-control.d.ts
704
880
  type RecoveryToolOperationOutcome = {
705
881
  readonly result: unknown;
706
882
  readonly status: "applied";
@@ -775,94 +951,6 @@ interface RecoveryControl {
775
951
  }): Effect.Effect<ToolOperationResolutionResult, unknown>;
776
952
  }
777
953
  //#endregion
778
- //#region src/modules/inbound-delivery/domain/delivery/inbound-delivery.d.ts
779
- interface InboundDeliveryPendingState {
780
- readonly availableAt: string;
781
- readonly status: "pending";
782
- }
783
- interface InboundDeliveryLeasedState {
784
- readonly leaseExpiresAt: string;
785
- readonly leaseId: string;
786
- readonly leasedAt: string;
787
- readonly status: "leased";
788
- }
789
- interface InboundDeliveryCompletedState {
790
- readonly completedAt: string;
791
- readonly status: "completed";
792
- }
793
- interface InboundDeliveryDeadState {
794
- readonly failedAt: string;
795
- readonly reason: string;
796
- readonly status: "dead";
797
- }
798
- type InboundDeliveryState = InboundDeliveryPendingState | InboundDeliveryLeasedState | InboundDeliveryCompletedState | InboundDeliveryDeadState;
799
- interface InboundDeliveryRecoveryAudit {
800
- readonly actorId: string;
801
- readonly at: string;
802
- readonly note: string;
803
- }
804
- interface InboundDelivery<Payload = unknown, Metadata = unknown> {
805
- readonly acceptedAt: string;
806
- readonly attempts: number;
807
- readonly id: string;
808
- readonly laneKey: string;
809
- readonly metadata?: Metadata;
810
- readonly payload: Payload;
811
- readonly recovery?: InboundDeliveryRecoveryAudit;
812
- readonly revision: number;
813
- readonly state: InboundDeliveryState;
814
- }
815
- //#endregion
816
- //#region src/modules/inbound-delivery/application/inbox/inbound-delivery-repository.d.ts
817
- type InboundDeliveryAdmission = "created" | "duplicate" | "capacity";
818
- interface InboundDeliveryRepository<Payload = unknown, Metadata = unknown> {
819
- admit(delivery: InboundDelivery<Payload, Metadata>, maxPending: number): Effect.Effect<InboundDeliveryAdmission, unknown>;
820
- claim(input: {
821
- readonly leaseExpiresAt: string;
822
- readonly leaseId: string;
823
- readonly now: string;
824
- }): Effect.Effect<InboundDelivery<Payload, Metadata> | undefined, unknown>;
825
- claimById(input: {
826
- readonly id: string;
827
- readonly leaseExpiresAt: string;
828
- readonly leaseId: string;
829
- readonly now: string;
830
- }): Effect.Effect<InboundDelivery<Payload, Metadata> | undefined, unknown>;
831
- complete(input: {
832
- readonly completedAt: string;
833
- readonly id: string;
834
- readonly leaseId: string;
835
- }): Effect.Effect<void, unknown>;
836
- create(delivery: InboundDelivery<Payload, Metadata>): Effect.Effect<boolean, unknown>;
837
- deadLetters(): ReadonlyArray<InboundDelivery<Payload, Metadata>>;
838
- fail(input: {
839
- readonly availableAt?: string;
840
- readonly failedAt: string;
841
- readonly id: string;
842
- readonly leaseId: string;
843
- readonly reason: string;
844
- readonly terminal: boolean;
845
- }): Effect.Effect<void, unknown>;
846
- pendingCount(): number;
847
- renew(input: {
848
- readonly id: string;
849
- readonly leaseExpiresAt: string;
850
- readonly leaseId: string;
851
- readonly now: string;
852
- }): Effect.Effect<InboundDelivery<Payload, Metadata>, unknown>;
853
- requeueDeadLetter(input: {
854
- readonly availableAt: string;
855
- readonly expectedRevision: number;
856
- readonly id: string;
857
- readonly recovery: InboundDeliveryRecoveryAudit;
858
- }): Effect.Effect<InboundDelivery<Payload, Metadata>, unknown>;
859
- release(input: {
860
- readonly availableAt: string;
861
- readonly id: string;
862
- readonly leaseId: string;
863
- }): Effect.Effect<void, unknown>;
864
- }
865
- //#endregion
866
954
  //#region src/adapters/compatibility/inbound-delivery/feishu-inbox-repository.d.ts
867
955
  interface FeishuInboxPendingState {
868
956
  readonly availableAt: string;
@@ -895,15 +983,40 @@ interface FeishuInboxDelivery {
895
983
  readonly revision: number;
896
984
  readonly state: FeishuInboxDeliveryState;
897
985
  }
898
- type FeishuInboundDeliveryRepository = InboundDeliveryRepository<FeishuReceiveMessagePayload, FeishuAgentDaemonHandleMessageOptions>;
986
+ interface FeishuInboxClaimInput {
987
+ readonly leaseExpiresAt: string;
988
+ readonly leaseId: string;
989
+ readonly now: string;
990
+ }
991
+ interface FeishuInboxClaimByIdInput extends FeishuInboxClaimInput {
992
+ readonly id: string;
993
+ }
994
+ interface FeishuInboxCompleteInput {
995
+ readonly completedAt: string;
996
+ readonly id: string;
997
+ readonly leaseId: string;
998
+ }
999
+ interface FeishuInboxFailInput {
1000
+ readonly availableAt?: string;
1001
+ readonly failedAt: string;
1002
+ readonly id: string;
1003
+ readonly leaseId: string;
1004
+ readonly reason: string;
1005
+ readonly terminal: boolean;
1006
+ }
1007
+ interface FeishuInboxReleaseInput {
1008
+ readonly availableAt: string;
1009
+ readonly id: string;
1010
+ readonly leaseId: string;
1011
+ }
899
1012
  interface FeishuInboxRepository {
900
- admit(delivery: FeishuInboxDelivery, maxPending: number): ReturnType<FeishuInboundDeliveryRepository["admit"]>;
901
- claim(input: Parameters<FeishuInboundDeliveryRepository["claim"]>[0]): Effect.Effect<FeishuInboxDelivery | undefined, unknown>;
902
- claimById(input: Parameters<FeishuInboundDeliveryRepository["claimById"]>[0]): Effect.Effect<FeishuInboxDelivery | undefined, unknown>;
903
- complete(input: Parameters<FeishuInboundDeliveryRepository["complete"]>[0]): ReturnType<FeishuInboundDeliveryRepository["complete"]>;
1013
+ admit(delivery: FeishuInboxDelivery, maxPending: number): Effect.Effect<"created" | "duplicate" | "capacity", unknown>;
1014
+ claim(input: FeishuInboxClaimInput): Effect.Effect<FeishuInboxDelivery | undefined, unknown>;
1015
+ claimById(input: FeishuInboxClaimByIdInput): Effect.Effect<FeishuInboxDelivery | undefined, unknown>;
1016
+ complete(input: FeishuInboxCompleteInput): Effect.Effect<void, unknown>;
904
1017
  create(delivery: FeishuInboxDelivery): Effect.Effect<boolean, unknown>;
905
1018
  deadLetters(): ReadonlyArray<FeishuInboxDelivery>;
906
- fail(input: Parameters<FeishuInboundDeliveryRepository["fail"]>[0]): ReturnType<FeishuInboundDeliveryRepository["fail"]>;
1019
+ fail(input: FeishuInboxFailInput): Effect.Effect<void, unknown>;
907
1020
  pendingCount(): number;
908
1021
  requeueDeadLetter(input: {
909
1022
  readonly availableAt: string;
@@ -911,7 +1024,7 @@ interface FeishuInboxRepository {
911
1024
  readonly id: string;
912
1025
  readonly recovery: RecoveryAction;
913
1026
  }): Effect.Effect<FeishuInboxDelivery, unknown>;
914
- release(input: Parameters<FeishuInboundDeliveryRepository["release"]>[0]): ReturnType<FeishuInboundDeliveryRepository["release"]>;
1027
+ release(input: FeishuInboxReleaseInput): Effect.Effect<void, unknown>;
915
1028
  }
916
1029
  interface FeishuInboxRepositoryStateOptions {
917
1030
  readonly initial?: ReadonlyArray<FeishuInboxDelivery>;
@@ -919,7 +1032,77 @@ interface FeishuInboxRepositoryStateOptions {
919
1032
  }
920
1033
  declare function createFeishuInboxRepository(options?: FeishuInboxRepositoryStateOptions): FeishuInboxRepository;
921
1034
  //#endregion
1035
+ //#region src/core/domain/tool-operation/value-objects/binding.d.ts
1036
+ interface ToolOperationBinding$1 {
1037
+ readonly agentId: string;
1038
+ readonly inputDigest: string;
1039
+ readonly instanceId: string;
1040
+ readonly sourceMessageId: string;
1041
+ readonly toolId: string;
1042
+ readonly toolVersion: string;
1043
+ }
1044
+ //#endregion
1045
+ //#region src/core/domain/tool-operation/aggregate/snapshot.d.ts
1046
+ type ToolOperationState$1 = {
1047
+ readonly status: "pending";
1048
+ } | {
1049
+ readonly result: unknown;
1050
+ readonly status: "completed";
1051
+ } | {
1052
+ readonly reason: string;
1053
+ readonly status: "reconciliation-required";
1054
+ } | {
1055
+ readonly status: "aborted";
1056
+ };
1057
+ interface ToolOperationReconciliationAction {
1058
+ readonly actorId: string;
1059
+ readonly at: string;
1060
+ readonly note: string;
1061
+ }
1062
+ interface ToolOperationReconciliation$1 extends ToolOperationReconciliationAction {
1063
+ readonly outcome: "applied" | "not-applied";
1064
+ }
1065
+ interface ToolOperationSnapshot {
1066
+ readonly binding: ToolOperationBinding$1;
1067
+ readonly operationId: string;
1068
+ readonly reconciliation?: ToolOperationReconciliation$1;
1069
+ readonly revision: number;
1070
+ readonly state: ToolOperationState$1;
1071
+ }
1072
+ type ToolOperationRecord$1 = ToolOperationSnapshot;
1073
+ type ToolOperationReconciliationOutcome$1 = {
1074
+ readonly result: unknown;
1075
+ readonly status: "applied";
1076
+ } | {
1077
+ readonly status: "not-applied";
1078
+ };
1079
+ type ToolOperationBeginResult$1 = {
1080
+ readonly status: "acquired";
1081
+ } | {
1082
+ readonly result: unknown;
1083
+ readonly status: "completed";
1084
+ } | {
1085
+ readonly status: "blocked";
1086
+ readonly reason: string;
1087
+ };
1088
+ type ToolOperationInspectResult$1 = {
1089
+ readonly status: "missing";
1090
+ } | {
1091
+ readonly result: unknown;
1092
+ readonly status: "completed";
1093
+ } | {
1094
+ readonly status: "blocked";
1095
+ readonly reason: string;
1096
+ };
1097
+ //#endregion
922
1098
  //#region src/adapters/compatibility/tool-execution/tool-operation-ledger.d.ts
1099
+ interface ToolOperationBinding extends ToolOperationBinding$1 {}
1100
+ type ToolOperationState = ToolOperationState$1;
1101
+ interface ToolOperationReconciliation extends ToolOperationReconciliation$1 {}
1102
+ interface ToolOperationRecord extends ToolOperationRecord$1 {}
1103
+ type ToolOperationReconciliationOutcome = ToolOperationReconciliationOutcome$1;
1104
+ type ToolOperationBeginResult = ToolOperationBeginResult$1;
1105
+ type ToolOperationInspectResult = ToolOperationInspectResult$1;
923
1106
  interface ToolOperationLedger {
924
1107
  abort(operationId: string, binding: ToolOperationBinding): Promise<void>;
925
1108
  begin(operationId: string, binding: ToolOperationBinding): Promise<ToolOperationBeginResult>;
@@ -956,6 +1139,12 @@ interface RecoveryControlOptions {
956
1139
  }
957
1140
  declare function createRecoveryControl(options: RecoveryControlOptions): RecoveryControl;
958
1141
  //#endregion
1142
+ //#region src/core/application/recovery/commands/recovery-action.d.ts
1143
+ declare class InvalidRecoveryAction extends Error {
1144
+ readonly name = "InvalidRecoveryAction";
1145
+ }
1146
+ declare function createRecoveryAction(input: RecoveryAction): RecoveryAction;
1147
+ //#endregion
959
1148
  //#region src/adapters/compatibility/inbound-delivery/jsonl-feishu-inbox-repository.d.ts
960
1149
  interface JsonlFeishuInboxRepositoryOptions {
961
1150
  readonly filePath: string;
@@ -968,7 +1157,7 @@ interface OpenJsonFeishuSessionStoreOptions {
968
1157
  }
969
1158
  declare function openJsonFeishuSessionStore(options: OpenJsonFeishuSessionStoreOptions): Promise<FeishuSessionStore>;
970
1159
  //#endregion
971
- //#region src/modules/agent-host/domain/instance/agent-instance.d.ts
1160
+ //#region src/core/application/agent-host/contracts/agent-instance.d.ts
972
1161
  type AgentInstanceBinding = {
973
1162
  readonly kind: "endpoint";
974
1163
  readonly endpointId: string;
@@ -986,16 +1175,8 @@ interface AgentInstanceRecord {
986
1175
  readonly instanceId: string;
987
1176
  readonly runtimeGenerationId: string;
988
1177
  }
989
- declare class AgentInstanceConflict extends Error {
990
- readonly name = "AgentInstanceConflict";
991
- }
992
1178
  //#endregion
993
- //#region src/modules/agent-host/application/registry/agent-instance-registry.d.ts
994
- interface AgentInstanceRegistryOptions {
995
- readonly initialRecords?: ReadonlyArray<AgentInstanceRecord>;
996
- }
997
- //#endregion
998
- //#region src/modules/agent-host/application/runtime/agent-host-runtime.d.ts
1179
+ //#region src/core/application/agent-host/contracts/agent-host-runtime.d.ts
999
1180
  interface AgentRuntimeInput$1 {
1000
1181
  readonly invocation?: AgentInvocationOrigin;
1001
1182
  readonly onUpdate?: (update: AgentRunUpdate) => Effect.Effect<void, unknown>;
@@ -1013,6 +1194,8 @@ interface AgentRuntimeSteering$1 {
1013
1194
  readonly sessionKey: SessionKey;
1014
1195
  readonly text: string;
1015
1196
  }
1197
+ //#endregion
1198
+ //#region src/adapters/agent/runtime/effect-agent-runtime-pool.d.ts
1016
1199
  declare class AgentInstanceBusy extends Error {
1017
1200
  readonly name = "AgentInstanceBusy";
1018
1201
  }
@@ -1020,6 +1203,14 @@ declare class AgentRuntimeDisposed extends Error {
1020
1203
  readonly name = "AgentRuntimeDisposed";
1021
1204
  }
1022
1205
  //#endregion
1206
+ //#region src/core/application/agent-host/registry/agent-instance-registry.d.ts
1207
+ interface AgentInstanceRegistryOptions {
1208
+ readonly initialRecords?: ReadonlyArray<AgentInstanceRecord>;
1209
+ }
1210
+ declare class AgentInstanceConflict extends Error {
1211
+ readonly name = "AgentInstanceConflict";
1212
+ }
1213
+ //#endregion
1023
1214
  //#region src/adapters/compatibility/agent-host/agent-instance-registry.d.ts
1024
1215
  interface AgentInstanceRegistry {
1025
1216
  resolveAutomation(automationId: string, definition: ResolvedRivusAgentDefinition): AgentInstanceRecord;
@@ -1329,8 +1520,8 @@ interface MergePiProviderBaseUrlOverrideOptions {
1329
1520
  }
1330
1521
  declare function mergePiProviderBaseUrlOverride(options: MergePiProviderBaseUrlOverrideOptions): Promise<void>;
1331
1522
  //#endregion
1332
- //#region src/modules/inbound-delivery/application/queue/inbound-delivery-queue.d.ts
1333
- interface InboundDeliveryPreparedControl<Result> {
1523
+ //#region src/platform/durable-queue/processing/durable-queue.d.ts
1524
+ interface DurableQueuePreparedAction<Result> {
1334
1525
  execute(): Effect.Effect<Result | undefined, unknown>;
1335
1526
  }
1336
1527
  //#endregion
@@ -1372,7 +1563,7 @@ interface FeishuMessageQueueOptions {
1372
1563
  */
1373
1564
  readonly shouldSkipReplay?: (payload: FeishuReceiveMessagePayload) => Effect.Effect<boolean, unknown>;
1374
1565
  }
1375
- type FeishuMessagePreparedControl = InboundDeliveryPreparedControl<FeishuAgentDaemonHandleResult>;
1566
+ type FeishuMessagePreparedControl = DurableQueuePreparedAction<FeishuAgentDaemonHandleResult>;
1376
1567
  type FeishuMessageDrainResult = {
1377
1568
  readonly handled: true;
1378
1569
  readonly messageId: string;
@@ -1489,7 +1680,7 @@ interface CompositeRivusDaemonTransportOptions {
1489
1680
  }
1490
1681
  declare function createCompositeRivusDaemonTransport(options: CompositeRivusDaemonTransportOptions): RivusDaemonTransport;
1491
1682
  //#endregion
1492
- //#region src/modules/card-presentation/domain/presentation/card-presentation.d.ts
1683
+ //#region src/core/application/card-presentation/projection/card-presentation.d.ts
1493
1684
  type CardPresentationStatus = "streaming" | "handoff-pending" | "active" | "closed" | "terminal";
1494
1685
  interface CardPresentation {
1495
1686
  readonly runId: string;
@@ -1537,9 +1728,6 @@ declare function activeCardPresentation(chain: CardPresentationChain): CardPrese
1537
1728
  declare function acceptsCardPresentationProgress(chain: CardPresentationChain): boolean;
1538
1729
  declare function isCardPresentationHandoffDue(chain: CardPresentationChain, now: string): boolean;
1539
1730
  //#endregion
1540
- //#region src/modules/card-presentation/domain/presentation/card-presentation-lease.d.ts
1541
- declare const DEFAULT_CARD_STREAM_LEASE_MS = 510000;
1542
- //#endregion
1543
1731
  //#region src/adapters/feishu/card-presentation/feishu-card-presentation-store.d.ts
1544
1732
  interface FeishuCardPresentationHandoffStart {
1545
1733
  readonly presentation: CardPresentation;
@@ -1570,6 +1758,9 @@ interface FeishuCardPresentationStore {
1570
1758
  size(): number;
1571
1759
  }
1572
1760
  //#endregion
1761
+ //#region src/core/application/card-presentation/projection/card-presentation-lease.d.ts
1762
+ declare const DEFAULT_CARD_STREAM_LEASE_MS = 510000;
1763
+ //#endregion
1573
1764
  //#region src/adapters/feishu/card-presentation/rollover/feishu-card-rollover.d.ts
1574
1765
  interface FeishuCardRolloverTarget {
1575
1766
  readonly cardId: string;
@@ -1720,151 +1911,134 @@ interface ProcessAgentRuntime {
1720
1911
  steer?(input: AgentRuntimeSteering$1): Promise<boolean>;
1721
1912
  }
1722
1913
  //#endregion
1723
- //#region src/modules/background-session/domain/session/background-session-transitions.d.ts
1724
- interface CreateBackgroundSessionInput {
1725
- readonly sessionId: BackgroundSessionId;
1726
- readonly displayName: string;
1727
- readonly prompt: string;
1728
- readonly parentRunId: string;
1729
- readonly sourceMessageId: string;
1730
- readonly origin: BackgroundSessionOrigin;
1731
- readonly authority: BackgroundSessionAuthority;
1732
- readonly now: string;
1914
+ //#region src/core/application/automation/policy/automation-mandate.d.ts
1915
+ interface AutomationBinding {
1916
+ readonly agentId: string;
1917
+ readonly bindingId: string;
1918
+ readonly delivery: AutomationDeliveryBinding;
1919
+ readonly schedule: string;
1920
+ readonly servicePrincipalId: string;
1921
+ readonly skillGrantRevision: string;
1922
+ readonly skillIds: ReadonlyArray<string>;
1923
+ readonly templateId: string;
1924
+ readonly timeZone: string;
1925
+ readonly toolIds: ReadonlyArray<string>;
1733
1926
  }
1734
- declare function createBackgroundSession(input: CreateBackgroundSessionInput): BackgroundSessionState;
1735
- interface ClaimBackgroundSessionInput {
1736
- readonly lease: BackgroundSessionLease;
1737
- readonly stepRunId: string;
1738
- readonly wakeText: string;
1739
- readonly now: string;
1927
+ interface AutomationDeliveryBinding {
1928
+ readonly endpointId: string;
1929
+ readonly targetKey: string;
1930
+ readonly targetType: "chat_id" | "open_id" | "user_id" | "union_id" | "email";
1740
1931
  }
1741
- declare function claimBackgroundSession(state: BackgroundSessionState, input: ClaimBackgroundSessionInput): BackgroundSessionState;
1742
- declare function renewBackgroundSessionLease(state: BackgroundSessionState, lease: BackgroundSessionLease): BackgroundSessionState;
1743
- declare function releaseBackgroundSessionLease(state: BackgroundSessionState): BackgroundSessionState;
1744
- interface SuspendBackgroundSessionInput {
1745
- readonly wakeAt?: string;
1746
- readonly reason?: string;
1747
- readonly now: string;
1748
- }
1749
- declare function suspendBackgroundSession(state: BackgroundSessionState, input: SuspendBackgroundSessionInput): BackgroundSessionState;
1750
- declare function completeBackgroundSessionStep(state: BackgroundSessionState, input: {
1751
- readonly text: string;
1752
- readonly stepRunId: string;
1753
- readonly now: string;
1754
- }): BackgroundSessionState;
1755
- declare function failBackgroundSessionStep(state: BackgroundSessionState, input: {
1756
- readonly errorMessage: string;
1757
- readonly now: string;
1758
- readonly retryable: boolean;
1759
- readonly wakeAt?: string;
1760
- }): BackgroundSessionState;
1761
- declare function requestBackgroundSessionStop(state: BackgroundSessionState, input: {
1762
- readonly reason: string;
1763
- readonly now: string;
1764
- }): BackgroundSessionState;
1765
- declare function completeBackgroundSessionStop(state: BackgroundSessionState, input: {
1766
- readonly now: string;
1767
- }): BackgroundSessionState;
1768
- declare function parkBackgroundSessionForReconciliation(state: BackgroundSessionState, input: {
1769
- readonly reason: string;
1770
- readonly now: string;
1771
- }): BackgroundSessionState;
1772
- declare function resolveBackgroundSessionReconciliation(state: BackgroundSessionState, input: {
1773
- readonly outcome: "continue" | "stop";
1774
- readonly now: string;
1775
- }): BackgroundSessionState;
1776
- declare function appendBackgroundSessionInput(state: BackgroundSessionState, input: {
1777
- readonly message: string;
1778
- readonly now: string;
1779
- }): BackgroundSessionState;
1780
- declare function requeueInterruptedBackgroundSessionStep(state: BackgroundSessionState, input: {
1781
- readonly wakeText: string;
1782
- readonly now: string;
1783
- }): BackgroundSessionState;
1784
- declare function isBackgroundSessionLeaseExpired(state: BackgroundSessionState, now: string): boolean;
1785
- declare function isBackgroundSessionDue(state: BackgroundSessionState, now: string): boolean;
1786
- //#endregion
1787
- //#region src/modules/project-space/application/workspace/workspace-instructions.d.ts
1788
- interface WorkspaceRootHandle {
1932
+ interface AutomationMandate extends AutomationBinding {
1789
1933
  readonly id: string;
1934
+ readonly active: boolean;
1790
1935
  }
1791
- interface WorkspaceInstructionSource {
1792
- readonly relativePath: string;
1793
- readonly digest: string;
1794
- readonly bytes: number;
1795
- readonly content: string;
1796
- }
1797
- type WorkspaceInstructionsDiagnosticCode = "workspace-instructions-refresh-required" | "workspace-instructions-source-omitted";
1798
- interface WorkspaceInstructionsDiagnostic {
1799
- readonly code: WorkspaceInstructionsDiagnosticCode;
1800
- readonly relativePath?: string;
1801
- readonly reason: string;
1802
- }
1803
- interface WorkspaceInstructionsRequest {
1804
- readonly workspaceRoot: WorkspaceRootHandle;
1805
- readonly workingDirectory: string;
1806
- readonly targetPath?: string;
1807
- readonly maxBytes: number;
1808
- readonly operation?: "read" | "mutate";
1809
- readonly presentedDigests?: ReadonlyArray<string>;
1810
- }
1811
- interface WorkspaceInstructionsView {
1812
- readonly sources: ReadonlyArray<WorkspaceInstructionSource>;
1813
- readonly content: string;
1814
- readonly digest: string;
1815
- readonly truncated: boolean;
1816
- readonly refreshRequired: boolean;
1817
- readonly diagnostics: ReadonlyArray<WorkspaceInstructionsDiagnostic>;
1936
+ interface AutomationTick {
1937
+ readonly tickId: string;
1938
+ readonly mandateId: string;
1939
+ readonly occurrence: string;
1940
+ readonly claimedBy: string;
1818
1941
  }
1819
- declare class InvalidWorkspaceRoot extends Error {
1820
- readonly name = "InvalidWorkspaceRoot";
1942
+ interface AutomationMandateStore {
1943
+ activate(binding: AutomationBinding): AutomationMandate;
1944
+ revoke(id: string): void;
1945
+ claim(id: string, occurrence: string, workerId: string): AutomationTick;
1821
1946
  }
1822
- declare class WorkspaceInstructionsSourceError extends Error {
1823
- readonly relativePath: string;
1824
- readonly reason: string;
1825
- readonly name = "WorkspaceInstructionsSourceError";
1826
- constructor(relativePath: string, reason: string);
1947
+ declare class AutomationMandateError extends Error {
1948
+ readonly name = "AutomationMandateError";
1827
1949
  }
1828
1950
  //#endregion
1829
- //#region src/modules/project-space/domain/space/project-space.d.ts
1830
- interface RivusProjectSpaceDeployment {
1831
- readonly id: string;
1832
- readonly root: string;
1833
- readonly workingDirectory: string;
1834
- readonly skills: {
1835
- readonly sources: ReadonlyArray<string>;
1836
- };
1951
+ //#region src/core/application/automation/scheduling/automation-scheduler.d.ts
1952
+ declare const AUTOMATION_SUPPRESSION_PREFIX = "RIVUS_AUTOMATION_SUPPRESSED:";
1953
+ interface ScheduledAutomationRunInput {
1954
+ readonly occurrence: string;
1955
+ readonly sessionKey: string;
1956
+ readonly text: string;
1957
+ readonly tickId: string;
1837
1958
  }
1838
- interface ResolvedRivusProjectSpace {
1839
- readonly id: string;
1840
- readonly root: string;
1841
- readonly workingDirectory: string;
1842
- readonly skillPaths: ReadonlyArray<string>;
1843
- readonly revision: string;
1959
+ interface ScheduledAutomationRunResult {
1960
+ readonly body?: string;
1961
+ readonly presentation?: AutomationPresentation;
1962
+ readonly runId: string;
1963
+ readonly suppressedReason?: string;
1844
1964
  }
1845
- declare class InvalidRivusProjectSpace extends Error {
1846
- readonly name = "InvalidRivusProjectSpace";
1965
+ interface ScheduledAutomationDeliveryInput {
1966
+ readonly body: string;
1967
+ readonly idempotencyKey: string;
1968
+ readonly presentation?: AutomationPresentation;
1847
1969
  }
1848
1970
  //#endregion
1849
- //#region src/modules/project-space/application/catalog/project-skill-catalog.d.ts
1850
- interface ProjectSkillCatalogEntry {
1851
- readonly name: string;
1971
+ //#region src/core/domain/background-session/factories/create-background-session.d.ts
1972
+ declare function createBackgroundSession$1(input: CreateBackgroundSessionInput): BackgroundSession;
1973
+ //#endregion
1974
+ //#region src/core/application/background-session/supervision/background-session-delivery-queue.d.ts
1975
+ type BackgroundSessionDeliveryKindForSupervisor = "progress" | "final" | "stopped" | "failed" | "reconciliation";
1976
+ type BackgroundSessionDeliverySink = (delivery: {
1977
+ readonly deliveryId: string;
1978
+ readonly kind: BackgroundSessionDeliveryKindForSupervisor;
1979
+ readonly sessionId: string;
1980
+ readonly text: string;
1981
+ }) => Promise<{
1982
+ readonly providerMessageId: string;
1983
+ }>;
1984
+ //#endregion
1985
+ //#region src/core/application/background-session/supervision/background-session-supervisor.d.ts
1986
+ interface BackgroundSessionLimits {
1987
+ readonly intervalMs: number;
1988
+ readonly leaseMs: number;
1989
+ readonly leaseRenewalIntervalMs: number;
1990
+ readonly maxConcurrentSessions: number;
1991
+ readonly maxConsecutiveFailures: number;
1992
+ readonly retryBackoffMs: number;
1993
+ readonly sessionLifetimeMs: number;
1852
1994
  }
1853
- interface ProjectSkillCatalogDiagnostic {
1854
- readonly message: string;
1855
- readonly path?: string;
1856
- readonly type: "warning" | "error" | "collision";
1995
+ interface BackgroundSessionStepResult {
1996
+ readonly finalText: string;
1997
+ readonly runId: string;
1857
1998
  }
1858
- declare class InvalidProjectSkillCatalog extends Error {
1859
- readonly name = "InvalidProjectSkillCatalog";
1999
+ interface BackgroundSessionSupervisorOptions$1 {
2000
+ readonly clock: {
2001
+ now(): string;
2002
+ };
2003
+ readonly config: BackgroundSessionLimits;
2004
+ readonly deliveries: BackgroundSessionDeliveryStore;
2005
+ readonly deliver: BackgroundSessionDeliverySink;
2006
+ readonly onError?: (error: unknown) => void;
2007
+ readonly repository: BackgroundSessionRepository$1;
2008
+ readonly runStep: (input: {
2009
+ readonly session: BackgroundSession;
2010
+ readonly signal: AbortSignal;
2011
+ readonly wakeText: string;
2012
+ }) => Promise<BackgroundSessionStepResult>;
2013
+ readonly sleep: (ms: number) => Effect.Effect<void>;
2014
+ }
2015
+ interface BackgroundSessionSupervisorStatus {
2016
+ readonly capacity: number;
2017
+ readonly counters: {
2018
+ readonly completed: number;
2019
+ readonly deliveriesDelivered: number;
2020
+ readonly failed: number;
2021
+ readonly started: number;
2022
+ readonly staleLeaseEventsDropped: number;
2023
+ readonly stopped: number;
2024
+ };
2025
+ readonly inFlightSteps: number;
2026
+ readonly oldestDueAt?: string;
2027
+ readonly owner: string;
2028
+ readonly phaseCounts: Readonly<Record<BackgroundSessionPhase, number>>;
2029
+ readonly reconciliationCount: number;
2030
+ readonly repositoryHealthy: boolean;
2031
+ readonly running: boolean;
2032
+ }
2033
+ interface BackgroundSessionSupervisor {
2034
+ recover(): Effect.Effect<void>;
2035
+ start(): Effect.Effect<void>;
2036
+ status(): BackgroundSessionSupervisorStatus;
2037
+ stop(): Effect.Effect<void>;
2038
+ tick(): Effect.Effect<void>;
1860
2039
  }
1861
- declare function validateProjectSkillCatalog(input: {
1862
- readonly diagnostics: ReadonlyArray<ProjectSkillCatalogDiagnostic>;
1863
- readonly skills: ReadonlyArray<ProjectSkillCatalogEntry>;
1864
- }): ReadonlySet<string>;
1865
- declare function validateProjectSkillCommand(text: string, skillNames: ReadonlySet<string>): void;
1866
2040
  //#endregion
1867
- //#region src/modules/deployment-control/domain/manifest/deployment-manifest.d.ts
2041
+ //#region src/core/application/deployment/contracts/manifest.d.ts
1868
2042
  interface RivusPluginDeclaration {
1869
2043
  readonly id: string;
1870
2044
  readonly module: string;
@@ -1916,7 +2090,7 @@ interface RivusEndpointDeployment {
1916
2090
  readonly experimental?: RivusEndpointExperimentalFeatures;
1917
2091
  readonly groupPolicy: "mention-only" | "ignore-unmentioned" | "default-responder";
1918
2092
  readonly id: string;
1919
- readonly progressDisplay?: ConversationProgressDisplay;
2093
+ readonly progressDisplay?: "hidden" | "collapsed" | "expanded";
1920
2094
  readonly required: boolean;
1921
2095
  readonly sessionNamespace: string;
1922
2096
  readonly streamMinIntervalMs: number;
@@ -1924,16 +2098,16 @@ interface RivusEndpointDeployment {
1924
2098
  interface RivusEndpointExperimentalFeatures {
1925
2099
  readonly cotMessages: boolean;
1926
2100
  }
1927
- declare function validateRivusDeploymentManifest(manifest: RivusDeploymentManifest): void;
1928
- //#endregion
1929
- //#region src/modules/deployment-control/application/resolution/deployment-resolution-ports.d.ts
1930
- interface RivusPluginModuleLoadRequest {
1931
- readonly deploymentRoot: string;
1932
- readonly module: string;
1933
- readonly pluginId: string;
2101
+ interface RivusProjectSpaceDeployment {
2102
+ readonly id: string;
2103
+ readonly root: string;
2104
+ readonly workingDirectory: string;
2105
+ readonly skills: {
2106
+ readonly sources: ReadonlyArray<string>;
2107
+ };
1934
2108
  }
1935
2109
  //#endregion
1936
- //#region src/modules/deployment-control/application/resolution/deployment-resolution.d.ts
2110
+ //#region src/core/application/deployment/contracts/deployment.d.ts
1937
2111
  interface RivusPluginLoadStatus {
1938
2112
  readonly error?: string;
1939
2113
  readonly id: string;
@@ -1954,6 +2128,13 @@ interface ResolvedRivusAutomationDefinition extends RivusAutomationDeployment {
1954
2128
  readonly runtimeDefinition: ResolvedRivusAgentDefinition;
1955
2129
  readonly template: RegisteredRivusAutomation;
1956
2130
  }
2131
+ interface ResolvedRivusProjectSpace {
2132
+ readonly id: string;
2133
+ readonly root: string;
2134
+ readonly workingDirectory: string;
2135
+ readonly skillPaths: ReadonlyArray<string>;
2136
+ readonly revision: string;
2137
+ }
1957
2138
  interface LoadedRivusDeployment {
1958
2139
  readonly agents: ReadonlyArray<RivusAgentDeploymentStatus>;
1959
2140
  readonly automationDefinitions: ReadonlyArray<ResolvedRivusAutomationDefinition>;
@@ -1962,14 +2143,11 @@ interface LoadedRivusDeployment {
1962
2143
  readonly manifest: RivusDeploymentManifest;
1963
2144
  readonly plugins: ReadonlyArray<RivusPluginLoadStatus>;
1964
2145
  }
1965
- declare class RivusPluginLoadError extends Error {
2146
+ interface RivusPluginModuleLoadRequest {
2147
+ readonly deploymentRoot: string;
2148
+ readonly module: string;
1966
2149
  readonly pluginId: string;
1967
- readonly moduleSpecifier: string;
1968
- readonly name = "RivusPluginLoadError";
1969
- constructor(pluginId: string, moduleSpecifier: string, message: string, options?: ErrorOptions);
1970
2150
  }
1971
- //#endregion
1972
- //#region src/modules/deployment-control/application/lifecycle/deployment-control-ports.d.ts
1973
2151
  interface RivusDeploymentBackgroundSessionCancellation {
1974
2152
  readonly agentId: string;
1975
2153
  readonly reason?: string;
@@ -1977,64 +2155,7 @@ interface RivusDeploymentBackgroundSessionCancellation {
1977
2155
  readonly sessionKey: string;
1978
2156
  }
1979
2157
  //#endregion
1980
- //#region src/modules/deployment-control/domain/lifecycle/deployment-lifecycle.d.ts
1981
- type RivusDeploymentComponentLifecycle = "disabled" | "stopped" | "starting" | "running" | "degraded" | "stopping" | "cleanup-required";
1982
- type RivusDeploymentControlLifecycle = "stopped" | "starting" | "running" | "degraded" | "stopping" | "cleanup-required";
1983
- //#endregion
1984
- //#region src/modules/deployment-control/application/lifecycle/deployment-control.d.ts
1985
- type RivusDeploymentDaemonLifecycle = RivusDeploymentControlLifecycle;
1986
- type RivusDeploymentEndpointLifecycle = RivusDeploymentComponentLifecycle;
1987
- type RivusDeploymentAutomationLifecycle = RivusDeploymentComponentLifecycle;
1988
- type RivusDeploymentBackgroundSessionLifecycle = RivusDeploymentComponentLifecycle;
1989
- interface RivusDeploymentEndpointStatus extends RivusDeploymentComponentStatus {
1990
- readonly agentId: string;
1991
- readonly endpointId: string;
1992
- }
1993
- interface RivusDeploymentAutomationStatus extends RivusDeploymentComponentStatus {
1994
- readonly agentId: string;
1995
- readonly automationId: string;
1996
- }
1997
- interface RivusDeploymentBackgroundSessionStatus extends RivusDeploymentComponentStatus {
1998
- readonly supervisor?: BackgroundSessionSupervisorStatus;
1999
- }
2000
- interface RivusDeploymentComponentStatus {
2001
- readonly enabled: boolean;
2002
- readonly error?: string;
2003
- readonly lifecycle: RivusDeploymentComponentLifecycle;
2004
- readonly required: boolean;
2005
- readonly running: boolean;
2006
- }
2007
- interface RivusDeploymentDaemonStatus {
2008
- readonly agents: LoadedRivusDeployment["agents"];
2009
- readonly automations: ReadonlyArray<RivusDeploymentAutomationStatus>;
2010
- readonly backgroundSessions?: RivusDeploymentBackgroundSessionStatus;
2011
- readonly defaultAgentId: string;
2012
- readonly defaultEndpointId: string;
2013
- readonly endpoints: ReadonlyArray<RivusDeploymentEndpointStatus>;
2014
- readonly lifecycle: RivusDeploymentDaemonLifecycle;
2015
- readonly plugins: LoadedRivusDeployment["plugins"];
2016
- readonly ready: boolean;
2017
- readonly running: boolean;
2018
- }
2019
- declare class RivusDeploymentDaemonLifecycleError extends Error {
2020
- readonly name = "RivusDeploymentDaemonLifecycleError";
2021
- }
2022
- declare class RivusDeploymentReadinessError extends Error {
2023
- readonly endpointIds: ReadonlyArray<string>;
2024
- readonly name = "RivusDeploymentReadinessError";
2025
- constructor(endpointIds: ReadonlyArray<string>);
2026
- }
2027
- declare class RivusDeploymentAutomationReadinessError extends Error {
2028
- readonly automationIds: ReadonlyArray<string>;
2029
- readonly name = "RivusDeploymentAutomationReadinessError";
2030
- constructor(automationIds: ReadonlyArray<string>);
2031
- }
2032
- declare class RivusDeploymentBackgroundSessionReadinessError extends Error {
2033
- readonly name = "RivusDeploymentBackgroundSessionReadinessError";
2034
- constructor();
2035
- }
2036
- //#endregion
2037
- //#region src/adapters/deployment/bootstrap/process-deployment-adapters.d.ts
2158
+ //#region src/adapters/deployment/process/process-deployment-adapters.d.ts
2038
2159
  interface ProcessDeploymentRuntime extends ProcessAgentRuntime {}
2039
2160
  interface CreateProcessDeploymentRuntimeInput extends AgentInstanceRecord {
2040
2161
  readonly catalog: RivusPluginCatalog;
@@ -2087,7 +2208,112 @@ interface CreateProcessDeploymentBackgroundSessionInput {
2087
2208
  }) => Promise<unknown>;
2088
2209
  }
2089
2210
  //#endregion
2090
- //#region src/composition/rivus-deployment-cli-process.d.ts
2211
+ //#region src/core/application/background-session/authority/background-session-authority.d.ts
2212
+ declare const BACKGROUND_SESSION_TOOL_IDS: readonly ["background.start", "background.wait", "background.list", "background.status", "background.send", "background.stop"];
2213
+ declare const BACKGROUND_SESSION_START_TOOL_ID = "background.start";
2214
+ declare const BACKGROUND_SESSION_TOOL_PLUGIN_ID = "rivus-core";
2215
+ declare const BACKGROUND_SESSION_TOOL_VERSION = "1.0.0";
2216
+ interface BackgroundSessionToolContract {
2217
+ readonly description: string;
2218
+ readonly digest: string;
2219
+ readonly id: string;
2220
+ readonly idempotency: "none" | "supported" | "required";
2221
+ readonly inputSchema: unknown;
2222
+ readonly pluginId: string;
2223
+ readonly risk: "observe" | "mutate" | "irreversible" | "host-control";
2224
+ readonly version: string;
2225
+ }
2226
+ interface BackgroundSessionToolGrantSet {
2227
+ readonly revision: string;
2228
+ readonly toolIds: ReadonlyArray<string>;
2229
+ }
2230
+ interface BackgroundSessionAgentDefinition {
2231
+ readonly agentId: string;
2232
+ readonly endpointIds: ReadonlyArray<string>;
2233
+ readonly memory: {
2234
+ readonly scopes: ReadonlyArray<BackgroundSessionMemoryScope>;
2235
+ };
2236
+ readonly model: Readonly<Record<string, unknown>>;
2237
+ readonly pluginId: string;
2238
+ readonly profileId: string;
2239
+ readonly profileRevision: string;
2240
+ readonly projectSpaceId?: string;
2241
+ readonly projectSpaceRevision?: string;
2242
+ readonly skillGrantSet: {
2243
+ readonly revision: string;
2244
+ readonly skillIds: ReadonlyArray<string>;
2245
+ };
2246
+ readonly skills: ReadonlyArray<unknown>;
2247
+ readonly systemPrompt: string;
2248
+ readonly tools: ReadonlyArray<BackgroundSessionToolContract>;
2249
+ readonly toolGrantSet: BackgroundSessionToolGrantSet;
2250
+ }
2251
+ type TransformedBackgroundSessionDefinition<T extends BackgroundSessionAgentDefinition> = Omit<T, "toolGrantSet" | "tools"> & {
2252
+ readonly toolGrantSet: BackgroundSessionToolGrantSet;
2253
+ readonly tools: ReadonlyArray<BackgroundSessionToolContract>;
2254
+ };
2255
+ declare function createBackgroundSessionToolContracts(): ReadonlyArray<BackgroundSessionToolContract>;
2256
+ declare function backgroundSessionToolIds(): ReadonlyArray<string>;
2257
+ declare function isBackgroundSessionToolId(toolId: string): boolean;
2258
+ //#endregion
2259
+ //#region src/core/application/deployment/lifecycle/deployment-lifecycle.d.ts
2260
+ type RivusDeploymentComponentLifecycle = "disabled" | "stopped" | "starting" | "running" | "degraded" | "stopping" | "cleanup-required";
2261
+ type RivusDeploymentControlLifecycle = "stopped" | "starting" | "running" | "degraded" | "stopping" | "cleanup-required";
2262
+ declare class RivusDeploymentDaemonLifecycleError extends Error {
2263
+ readonly name = "RivusDeploymentDaemonLifecycleError";
2264
+ }
2265
+ //#endregion
2266
+ //#region src/core/application/deployment/lifecycle/deployment-control.d.ts
2267
+ type RivusDeploymentDaemonLifecycle = RivusDeploymentControlLifecycle;
2268
+ type RivusDeploymentEndpointLifecycle = RivusDeploymentComponentLifecycle;
2269
+ type RivusDeploymentAutomationLifecycle = RivusDeploymentComponentLifecycle;
2270
+ type RivusDeploymentBackgroundSessionLifecycle = RivusDeploymentComponentLifecycle;
2271
+ interface RivusDeploymentEndpointStatus extends RivusDeploymentComponentStatus {
2272
+ readonly agentId: string;
2273
+ readonly endpointId: string;
2274
+ }
2275
+ interface RivusDeploymentAutomationStatus extends RivusDeploymentComponentStatus {
2276
+ readonly agentId: string;
2277
+ readonly automationId: string;
2278
+ }
2279
+ interface RivusDeploymentBackgroundSessionStatus extends RivusDeploymentComponentStatus {
2280
+ readonly supervisor?: BackgroundSessionSupervisorStatus;
2281
+ }
2282
+ interface RivusDeploymentComponentStatus {
2283
+ readonly enabled: boolean;
2284
+ readonly error?: string;
2285
+ readonly lifecycle: RivusDeploymentComponentLifecycle;
2286
+ readonly required: boolean;
2287
+ readonly running: boolean;
2288
+ }
2289
+ interface RivusDeploymentDaemonStatus {
2290
+ readonly agents: LoadedRivusDeployment["agents"];
2291
+ readonly automations: ReadonlyArray<RivusDeploymentAutomationStatus>;
2292
+ readonly backgroundSessions?: RivusDeploymentBackgroundSessionStatus;
2293
+ readonly defaultAgentId: string;
2294
+ readonly defaultEndpointId: string;
2295
+ readonly endpoints: ReadonlyArray<RivusDeploymentEndpointStatus>;
2296
+ readonly lifecycle: RivusDeploymentDaemonLifecycle;
2297
+ readonly plugins: LoadedRivusDeployment["plugins"];
2298
+ readonly ready: boolean;
2299
+ readonly running: boolean;
2300
+ }
2301
+ declare class RivusDeploymentReadinessError extends Error {
2302
+ readonly endpointIds: ReadonlyArray<string>;
2303
+ readonly name = "RivusDeploymentReadinessError";
2304
+ constructor(endpointIds: ReadonlyArray<string>);
2305
+ }
2306
+ declare class RivusDeploymentAutomationReadinessError extends Error {
2307
+ readonly automationIds: ReadonlyArray<string>;
2308
+ readonly name = "RivusDeploymentAutomationReadinessError";
2309
+ constructor(automationIds: ReadonlyArray<string>);
2310
+ }
2311
+ declare class RivusDeploymentBackgroundSessionReadinessError extends Error {
2312
+ readonly name = "RivusDeploymentBackgroundSessionReadinessError";
2313
+ constructor();
2314
+ }
2315
+ //#endregion
2316
+ //#region src/bootstrap/deployment/rivus-deployment-cli-process.d.ts
2091
2317
  interface RivusDeploymentBootstrapAdapters {
2092
2318
  readonly initialInstanceRecords?: AgentInstanceRegistryOptions["initialRecords"];
2093
2319
  readonly dispose?: () => Promise<void> | void;
@@ -2114,7 +2340,7 @@ interface RivusDeploymentCliProcess extends RivusDaemonProcess {
2114
2340
  }
2115
2341
  declare function createRivusDeploymentCliProcess(factory: RivusDeploymentBootstrapFactory, context: RivusDeploymentBootstrapContext): Promise<RivusDeploymentCliProcess>;
2116
2342
  //#endregion
2117
- //#region src/composition/rivus-daemon-cli.d.ts
2343
+ //#region src/bootstrap/daemon/rivus-daemon-cli.d.ts
2118
2344
  interface RivusDaemonBootstrapContext {
2119
2345
  readonly argv: ReadonlyArray<string>;
2120
2346
  readonly config: RivusDaemonConfig;
@@ -2218,7 +2444,12 @@ interface FeishuEventHandlers {
2218
2444
  }
2219
2445
  declare function createFeishuEventHandlers(options: FeishuEventHandlersOptions): FeishuEventHandlers;
2220
2446
  //#endregion
2221
- //#region src/composition/feishu-agent-runtime.d.ts
2447
+ //#region src/adapters/feishu/runtime/feishu-receive-runtime.d.ts
2448
+ interface FeishuPeriodicFlushSupervisor {
2449
+ withPeriodicFlush<A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, unknown, R>;
2450
+ }
2451
+ //#endregion
2452
+ //#region src/bootstrap/feishu/agent-runtime.d.ts
2222
2453
  interface FeishuAgentRuntimeOptions {
2223
2454
  readonly acknowledgeSteering?: (messageId: string) => Effect.Effect<void, unknown>;
2224
2455
  readonly agentId: string;
@@ -2239,9 +2470,6 @@ interface FeishuAgentRuntimeOptions {
2239
2470
  readonly runIds: RunIdGenerator;
2240
2471
  readonly sessionStore?: FeishuSessionStore;
2241
2472
  }
2242
- interface FeishuPeriodicFlushSupervisor {
2243
- withPeriodicFlush<A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, unknown, R>;
2244
- }
2245
2473
  interface FeishuAgentRuntime {
2246
2474
  readonly handlers: FeishuEventHandlers;
2247
2475
  readonly harness: AgentHarness;
@@ -2255,7 +2483,16 @@ interface FeishuAgentRuntime {
2255
2483
  }
2256
2484
  declare function createFeishuAgentRuntime(options: FeishuAgentRuntimeOptions): FeishuAgentRuntime;
2257
2485
  //#endregion
2258
- //#region src/modules/agent-execution/infrastructure/persistence/event-log/jsonl-agent-event-log.d.ts
2486
+ //#region src/core/application/agent-execution/execution/agent-event-sink.d.ts
2487
+ declare function createAgentDomainEventSink(append: (event: AgentDomainEvent) => Effect.Effect<void, unknown>): AgentDomainEventSink;
2488
+ //#endregion
2489
+ //#region src/core/application/agent-execution/history/restore-agent-history.d.ts
2490
+ interface AgentHistoryEventLog {
2491
+ readAll(): Effect.Effect<ReadonlyArray<AgentDomainEvent>, unknown>;
2492
+ }
2493
+ declare function restoreAgentHistory(eventLog: AgentHistoryEventLog): Effect.Effect<AgentHistory, unknown>;
2494
+ //#endregion
2495
+ //#region src/adapters/outbound/persistence/agent-run/event-log/jsonl-agent-event-log.d.ts
2259
2496
  type AgentEventLogOperation = "append" | "read";
2260
2497
  declare class AgentEventLogStoreError {
2261
2498
  readonly operation: AgentEventLogOperation;
@@ -2512,11 +2749,10 @@ declare function createConfiguredFeishuOpenApiClient(options: {
2512
2749
  readonly request: (request: ConfiguredFeishuOpenApiRequest) => Effect.Effect<ConfiguredFeishuOpenApiResponse, unknown>;
2513
2750
  }): FeishuOpenApiClient;
2514
2751
  //#endregion
2515
- //#region src/composition/feishu-card-rollover-runtime.d.ts
2752
+ //#region src/bootstrap/feishu/card-rollover-runtime.d.ts
2516
2753
  interface ConfiguredFeishuCardRolloverRuntimeOptions {
2517
2754
  readonly agentName?: string;
2518
2755
  readonly cardTargets: FeishuCardTargetRegistry;
2519
- /** Whether running cards should include Feishu HTTP callback cancel buttons. */
2520
2756
  readonly cancelButton?: boolean;
2521
2757
  readonly client: FeishuOpenApiClient;
2522
2758
  readonly clock: AgentClock;
@@ -2540,7 +2776,7 @@ interface ConfiguredFeishuCardRolloverRuntime {
2540
2776
  }
2541
2777
  declare function createConfiguredFeishuCardRolloverRuntime(options: ConfiguredFeishuCardRolloverRuntimeOptions): ConfiguredFeishuCardRolloverRuntime;
2542
2778
  //#endregion
2543
- //#region src/composition/rivus-daemon-bootstrap.d.ts
2779
+ //#region src/bootstrap/feishu/rivus-daemon-bootstrap.d.ts
2544
2780
  type ConfiguredRivusDaemonBootstrapRequest = ConfiguredFeishuOpenApiRequest;
2545
2781
  type ConfiguredRivusDaemonBootstrapResponse = ConfiguredFeishuOpenApiResponse;
2546
2782
  type ConfiguredRivusDaemonStatus = DaemonStatusSnapshot<AgentHistory, AgentRunState, FeishuCardRolloverStatus, FeishuReceiveRuntimeStatus>;
@@ -2587,6 +2823,22 @@ interface ConfiguredRivusDaemonBootstrap {
2587
2823
  declare function restoreConfiguredRivusDaemonBootstrap(options: ConfiguredRivusDaemonBootstrapOptions): Effect.Effect<ConfiguredRivusDaemonBootstrap, unknown>;
2588
2824
  declare function createConfiguredRivusDaemonBootstrap(options: ConfiguredRivusDaemonBootstrapOptions): ConfiguredRivusDaemonBootstrap;
2589
2825
  //#endregion
2826
+ //#region src/core/application/agent-execution/observation/agent-model-content-observer.d.ts
2827
+ interface AgentModelInputObservation {
2828
+ readonly input: unknown;
2829
+ readonly modelCallId: string;
2830
+ readonly runId: AgentRunId$1;
2831
+ }
2832
+ interface AgentModelOutputObservation {
2833
+ readonly modelCallId: string;
2834
+ readonly output: unknown;
2835
+ readonly runId: AgentRunId$1;
2836
+ }
2837
+ interface AgentModelContentObserver {
2838
+ observeInput(observation: AgentModelInputObservation): void;
2839
+ observeOutput(observation: AgentModelOutputObservation): void;
2840
+ }
2841
+ //#endregion
2590
2842
  //#region src/adapters/observability/agent/langfuse-agent-telemetry.d.ts
2591
2843
  type LangfuseTelemetryEnv = Readonly<Record<string, string | undefined>>;
2592
2844
  type LangfuseTelemetryContentMode = "metadata-only" | "redacted";
@@ -2635,6 +2887,11 @@ interface OpenTelemetryAgentTelemetry {
2635
2887
  declare function createOpenTelemetryAgentEventSink(options: OpenTelemetryAgentEventSinkOptions): AgentDomainEventSink;
2636
2888
  declare function createOpenTelemetryAgentTelemetry(options: OpenTelemetryAgentEventSinkOptions): OpenTelemetryAgentTelemetry;
2637
2889
  //#endregion
2890
+ //#region src/core/application/agent-execution/history/agent-run-state-projection.d.ts
2891
+ declare const initialAgentRunState: AgentRunState;
2892
+ declare function isTerminalAgentRunPhase(phase: AgentRunPhase): boolean;
2893
+ declare function evolveAgentRun(state: AgentRunState, event: AgentDomainEvent): AgentRunState;
2894
+ //#endregion
2638
2895
  //#region src/adapters/pi/execution/pi-agent-loop.d.ts
2639
2896
  type PiAgentSessionEvent = PiMessageStartEvent | PiMessageUpdateEvent | PiMessageEndEvent | PiToolExecutionStartEvent | PiToolExecutionUpdateEvent | PiToolExecutionEndEvent | {
2640
2897
  readonly type: string;
@@ -2880,17 +3137,56 @@ declare function createTestClock(initial: Date): AgentClock & {
2880
3137
  declare function createSequenceRunIds(runIds: ReadonlyArray<AgentRunId$1>): RunIdGenerator;
2881
3138
  //#endregion
2882
3139
  //#region src/adapters/compatibility/agent-catalog/rivus-agent-catalog.d.ts
3140
+ declare function createRivusPluginCatalog(): RivusPluginCatalog;
2883
3141
  declare function resolveRivusAgentDefinition(catalog: RivusPluginCatalog, deployment: RivusAgentDeployment, options?: {
2884
3142
  readonly backgroundSessions?: boolean;
2885
3143
  }): ResolvedRivusAgentDefinition;
2886
3144
  //#endregion
2887
- //#region src/modules/project-space/infrastructure/space/node-project-space-resolver.d.ts
2888
- declare function resolveRivusProjectSpace(input: {
2889
- readonly declaration: RivusProjectSpaceDeployment;
2890
- readonly deploymentRoot: string;
2891
- }): Promise<ResolvedRivusProjectSpace>;
3145
+ //#region src/core/application/agent-execution/contracts/workspace-instructions.d.ts
3146
+ interface WorkspaceRootHandle {
3147
+ readonly id: string;
3148
+ }
3149
+ interface WorkspaceInstructionSource {
3150
+ readonly relativePath: string;
3151
+ readonly digest: string;
3152
+ readonly bytes: number;
3153
+ readonly content: string;
3154
+ }
3155
+ type WorkspaceInstructionsDiagnosticCode = "workspace-instructions-refresh-required" | "workspace-instructions-source-omitted";
3156
+ interface WorkspaceInstructionsDiagnostic {
3157
+ readonly code: WorkspaceInstructionsDiagnosticCode;
3158
+ readonly relativePath?: string;
3159
+ readonly reason: string;
3160
+ }
3161
+ interface WorkspaceInstructionsRequest {
3162
+ readonly workspaceRoot: WorkspaceRootHandle;
3163
+ readonly workingDirectory: string;
3164
+ readonly targetPath?: string;
3165
+ readonly maxBytes: number;
3166
+ readonly operation?: "read" | "mutate";
3167
+ readonly presentedDigests?: ReadonlyArray<string>;
3168
+ }
3169
+ interface WorkspaceInstructionsView {
3170
+ readonly sources: ReadonlyArray<WorkspaceInstructionSource>;
3171
+ readonly content: string;
3172
+ readonly digest: string;
3173
+ readonly truncated: boolean;
3174
+ readonly refreshRequired: boolean;
3175
+ readonly diagnostics: ReadonlyArray<WorkspaceInstructionsDiagnostic>;
3176
+ }
2892
3177
  //#endregion
2893
- //#region src/modules/project-space/infrastructure/workspace/node-workspace-root-registry.d.ts
3178
+ //#region src/core/application/agent-execution/context/workspace-instructions-resolver.d.ts
3179
+ declare class InvalidWorkspaceRoot extends Error {
3180
+ readonly name = "InvalidWorkspaceRoot";
3181
+ }
3182
+ declare class WorkspaceInstructionsSourceError extends Error {
3183
+ readonly relativePath: string;
3184
+ readonly reason: string;
3185
+ readonly name = "WorkspaceInstructionsSourceError";
3186
+ constructor(relativePath: string, reason: string);
3187
+ }
3188
+ //#endregion
3189
+ //#region src/adapters/agent/workspace/node-workspace-root-registry.d.ts
2894
3190
  declare function createWorkspaceRootHandle(rootPath: string): Promise<WorkspaceRootHandle>;
2895
3191
  //#endregion
2896
3192
  //#region src/adapters/compatibility/project-space/workspace-instructions.d.ts
@@ -2899,7 +3195,35 @@ interface WorkspaceInstructionsProvider {
2899
3195
  }
2900
3196
  declare function createAgentsMdInstructionsProvider(): WorkspaceInstructionsProvider;
2901
3197
  //#endregion
3198
+ //#region src/core/application/tool-execution/brokerage/tool-input-digest.d.ts
3199
+ declare class InvalidStableJson extends Error {
3200
+ readonly name: string;
3201
+ }
3202
+ declare class InvalidToolInput extends InvalidStableJson {
3203
+ readonly name = "InvalidToolInput";
3204
+ }
3205
+ declare function normalizeStableJson(value: unknown): unknown;
3206
+ //#endregion
3207
+ //#region src/adapters/compatibility/tool-execution/public-contract.d.ts
3208
+ interface InvocationAuthorityRef extends InvocationAuthorityRef$1 {}
3209
+ interface InvocationAuthority extends Omit<InvocationAuthority$1, "memory" | "toolGrantSet"> {
3210
+ readonly memory?: RivusMemoryAuthority;
3211
+ readonly toolGrantSet: RivusToolGrantSet;
3212
+ }
3213
+ declare function createInvocationAuthority(authority: InvocationAuthority): InvocationAuthorityRef;
3214
+ declare function createToolInputDigest(input: unknown): string;
3215
+ declare function requiresToolApproval(risk: RivusToolRisk): boolean;
3216
+ //#endregion
3217
+ //#region src/core/application/tool-execution/brokerage/tool-broker.d.ts
3218
+ declare class ToolInvocationDenied extends Error {
3219
+ readonly name = "ToolInvocationDenied";
3220
+ }
3221
+ //#endregion
2902
3222
  //#region src/adapters/compatibility/tool-execution/tool-broker.d.ts
3223
+ interface AuthorizationPolicyState extends AuthorizationPolicyState$1 {}
3224
+ interface ToolApprovalRequest extends ToolApprovalRequest$1 {
3225
+ readonly risk: RivusToolRisk;
3226
+ }
2903
3227
  interface AuthorizationPolicyProvider {
2904
3228
  current(): Promise<AuthorizationPolicyState>;
2905
3229
  }
@@ -2913,14 +3237,8 @@ interface ToolBrokerOptions {
2913
3237
  readonly policy: AuthorizationPolicyProvider;
2914
3238
  readonly operations?: ToolOperationLedger;
2915
3239
  }
2916
- interface ToolExecutionRequest {
3240
+ interface ToolExecutionRequest extends ToolExecutionRequest$1 {
2917
3241
  readonly authority: InvocationAuthorityRef;
2918
- readonly callId: string;
2919
- readonly toolId: string;
2920
- readonly version: string;
2921
- readonly input: unknown;
2922
- readonly operationId?: string;
2923
- readonly approvalId?: string;
2924
3242
  }
2925
3243
  interface ToolBroker {
2926
3244
  execute(request: ToolExecutionRequest): Promise<unknown>;
@@ -2942,10 +3260,10 @@ interface JsonlRecoveryControlOptions {
2942
3260
  }
2943
3261
  declare function openJsonlRecoveryControl(options: JsonlRecoveryControlOptions): Promise<RecoveryControl>;
2944
3262
  //#endregion
2945
- //#region src/composition/agent-harness-pooled-runtime.d.ts
3263
+ //#region src/adapters/compatibility/agent-host/runtime/agent-harness-pooled-runtime.d.ts
2946
3264
  declare function createAgentHarnessPooledRuntime(harness: AgentHarness): PooledAgentRuntime;
2947
3265
  //#endregion
2948
- //#region src/composition/feishu-deployment-endpoint.d.ts
3266
+ //#region src/bootstrap/feishu/deployment-endpoint.d.ts
2949
3267
  interface FeishuDeploymentEndpointOptions extends Pick<CreateProcessDeploymentEndpointInput, "agentId" | "cancel" | "handle" | "steer"> {
2950
3268
  readonly acknowledgeSteering?: (messageId: string) => Effect.Effect<void, unknown>;
2951
3269
  readonly botOpenId: string;
@@ -2977,7 +3295,7 @@ interface FeishuDeploymentEndpointOptions extends Pick<CreateProcessDeploymentEn
2977
3295
  }
2978
3296
  declare function createFeishuDeploymentEndpoint(options: FeishuDeploymentEndpointOptions): ProcessDeploymentEndpoint;
2979
3297
  //#endregion
2980
- //#region src/composition/feishu-presentation-preparation.d.ts
3298
+ //#region src/adapters/feishu/run-presentation/feishu-presentation-preparation.d.ts
2981
3299
  interface FeishuPresentationPreparationOptions {
2982
3300
  readonly cotPublisher?: Pick<FeishuCotPublisher, "fail" | "prepare">;
2983
3301
  readonly prepareCardTarget: (run: FeishuAgentRunPreparation) => Effect.Effect<void, unknown>;
@@ -3005,24 +3323,67 @@ interface RivusBackgroundSessionDefinition {
3005
3323
  readonly agentId: string;
3006
3324
  readonly definition: ResolvedRivusAgentDefinition;
3007
3325
  }
3008
- interface RivusEndpointInput$1 extends AgentRuntimeInput {}
3009
- interface RivusAgentHost {
3010
- cancelBackgroundSession(agentId: string, input: AgentRuntimeCancellation): Promise<boolean>;
3011
- cancelEndpoint(endpointId: string, input: AgentRuntimeCancellation): Promise<boolean>;
3012
- steerEndpoint(endpointId: string, input: AgentRuntimeSteering): Promise<boolean>;
3013
- handleAutomation(automationId: string, input: AgentRuntimeInput): Promise<unknown>;
3014
- handleBackgroundSession(agentId: string, input: AgentRuntimeInput): Promise<unknown>;
3015
- handleEndpoint(endpointId: string, input: RivusEndpointInput$1): Promise<unknown>;
3016
- resolveAutomation(automationId: string): AgentInstanceRecord;
3017
- resolveBackgroundSession(agentId: string): AgentInstanceRecord;
3018
- resolveEndpoint(endpointId: string): AgentInstanceRecord;
3326
+ interface RivusEndpointInput$1 extends AgentRuntimeInput {}
3327
+ interface RivusAgentHost {
3328
+ cancelBackgroundSession(agentId: string, input: AgentRuntimeCancellation): Promise<boolean>;
3329
+ cancelEndpoint(endpointId: string, input: AgentRuntimeCancellation): Promise<boolean>;
3330
+ steerEndpoint(endpointId: string, input: AgentRuntimeSteering): Promise<boolean>;
3331
+ handleAutomation(automationId: string, input: AgentRuntimeInput): Promise<unknown>;
3332
+ handleBackgroundSession(agentId: string, input: AgentRuntimeInput): Promise<unknown>;
3333
+ handleEndpoint(endpointId: string, input: RivusEndpointInput$1): Promise<unknown>;
3334
+ resolveAutomation(automationId: string): AgentInstanceRecord;
3335
+ resolveBackgroundSession(agentId: string): AgentInstanceRecord;
3336
+ resolveEndpoint(endpointId: string): AgentInstanceRecord;
3337
+ }
3338
+ declare class InvalidRivusEndpointBinding extends Error {
3339
+ readonly name = "InvalidRivusEndpointBinding";
3340
+ }
3341
+ declare function createRivusAgentHost(options: RivusAgentHostOptions): RivusAgentHost;
3342
+ //#endregion
3343
+ //#region src/core/application/memory/commands/agent-memory-service.d.ts
3344
+ declare class AgentMemoryError extends Error {
3345
+ readonly name = "AgentMemoryError";
3346
+ }
3347
+ //#endregion
3348
+ //#region src/adapters/agent/memory/agent-memory-access.d.ts
3349
+ declare const MEMORY_SCOPES: readonly ["conversation", "agent-private", "project", "shared-user-profile"];
3350
+ type MemoryScope = (typeof MEMORY_SCOPES)[number];
3351
+ type MemoryInvocationAudience = "group" | "private";
3352
+ interface MemoryBinding {
3353
+ readonly agentId: string;
3354
+ readonly conversationId?: string;
3355
+ readonly projectId?: string;
3356
+ readonly scope: MemoryScope;
3357
+ readonly subjectId: string;
3358
+ readonly tenantId: string;
3359
+ }
3360
+ interface AgentMemoryIdentity {
3361
+ readonly audience: MemoryInvocationAudience;
3362
+ readonly conversationId?: string;
3363
+ readonly projectId?: string;
3364
+ readonly subjectId: string;
3365
+ readonly tenantId: string;
3366
+ }
3367
+ interface AgentMemoryAuthority extends AgentMemoryIdentity {
3368
+ readonly scopes: ReadonlyArray<MemoryScope>;
3369
+ }
3370
+ type MemoryState = "proposed" | "confirmed" | "superseded" | "tombstoned";
3371
+ interface MemoryRecord {
3372
+ readonly content: string;
3373
+ readonly conversationSafe: boolean;
3374
+ readonly id: string;
3375
+ readonly revision: number;
3376
+ readonly scope: MemoryScope;
3377
+ readonly state: MemoryState;
3378
+ readonly tombstoneReason?: string;
3379
+ }
3380
+ interface AgentMemorySnapshot {
3381
+ readonly binding: MemoryBinding;
3382
+ readonly record: MemoryRecord;
3019
3383
  }
3020
- declare class InvalidRivusEndpointBinding extends Error {
3021
- readonly name = "InvalidRivusEndpointBinding";
3384
+ interface MemorySearchQuery {
3385
+ readonly query: string;
3022
3386
  }
3023
- declare function createRivusAgentHost(options: RivusAgentHostOptions): RivusAgentHost;
3024
- //#endregion
3025
- //#region src/adapters/agent/memory/agent-memory-access.d.ts
3026
3387
  /** Promise-based Memory access required at the host-tool adapter boundary. */
3027
3388
  interface AgentMemoryHandle {
3028
3389
  readonly namespace: string;
@@ -3059,38 +3420,99 @@ interface AgentMemoryServiceOptions {
3059
3420
  }
3060
3421
  declare function createAgentMemoryService(options?: AgentMemoryServiceOptions): AgentMemoryService;
3061
3422
  //#endregion
3062
- //#region src/modules/background-session/infrastructure/persistence/session/in-memory-background-session-repository.d.ts
3063
- interface CreateBackgroundSessionRepositoryOptions {
3064
- readonly initial?: ReadonlyArray<BackgroundSessionState>;
3065
- readonly persist?: (state: BackgroundSessionState) => Promise<void>;
3423
+ //#region src/adapters/compatibility/background-session/transitions.d.ts
3424
+ type BackgroundSessionState = BackgroundSessionSnapshot;
3425
+ declare function isBackgroundSessionTerminalPhase(phase: BackgroundSessionPhase): boolean;
3426
+ declare class BackgroundSessionTransitionDenied extends Error {
3427
+ readonly sessionId: BackgroundSessionId;
3428
+ readonly name = "BackgroundSessionTransitionDenied";
3429
+ constructor(sessionId: BackgroundSessionId, message: string);
3066
3430
  }
3067
- declare function createBackgroundSessionRepository(options?: CreateBackgroundSessionRepositoryOptions): BackgroundSessionRepository;
3431
+ declare function createBackgroundSession(input: Parameters<typeof createBackgroundSession$1>[0]): BackgroundSessionState;
3432
+ declare function claimBackgroundSession(state: BackgroundSessionState, input: ClaimBackgroundSessionInput): BackgroundSessionState;
3433
+ declare function renewBackgroundSessionLease(state: BackgroundSessionState, lease: BackgroundSessionLease): BackgroundSessionState;
3434
+ declare function releaseBackgroundSessionLease(state: BackgroundSessionState): BackgroundSessionState;
3435
+ declare function suspendBackgroundSession(state: BackgroundSessionState, input: SuspendBackgroundSessionInput): BackgroundSessionState;
3436
+ declare function completeBackgroundSessionStep(state: BackgroundSessionState, input: {
3437
+ readonly text: string;
3438
+ readonly stepRunId: string;
3439
+ readonly now: string;
3440
+ }): BackgroundSessionState;
3441
+ declare function failBackgroundSessionStep(state: BackgroundSessionState, input: {
3442
+ readonly errorMessage: string;
3443
+ readonly now: string;
3444
+ readonly retryable: boolean;
3445
+ readonly wakeAt?: string;
3446
+ }): BackgroundSessionState;
3447
+ declare function requestBackgroundSessionStop(state: BackgroundSessionState, input: {
3448
+ readonly reason: string;
3449
+ readonly now: string;
3450
+ }): BackgroundSessionState;
3451
+ declare function completeBackgroundSessionStop(state: BackgroundSessionState, input: {
3452
+ readonly now: string;
3453
+ }): BackgroundSessionState;
3454
+ declare function parkBackgroundSessionForReconciliation(state: BackgroundSessionState, input: {
3455
+ readonly reason: string;
3456
+ readonly now: string;
3457
+ }): BackgroundSessionState;
3458
+ declare function resolveBackgroundSessionReconciliation(state: BackgroundSessionState, input: {
3459
+ readonly outcome: "continue" | "stop";
3460
+ readonly now: string;
3461
+ }): BackgroundSessionState;
3462
+ declare function appendBackgroundSessionInput(state: BackgroundSessionState, input: {
3463
+ readonly message: string;
3464
+ readonly now: string;
3465
+ }): BackgroundSessionState;
3466
+ declare function requeueInterruptedBackgroundSessionStep(state: BackgroundSessionState, input: {
3467
+ readonly wakeText: string;
3468
+ readonly now: string;
3469
+ }): BackgroundSessionState;
3470
+ declare function isBackgroundSessionDue(state: BackgroundSessionState, now: string): boolean;
3471
+ declare function isBackgroundSessionLeaseExpired(state: BackgroundSessionState, now: string): boolean;
3068
3472
  //#endregion
3069
- //#region src/modules/background-session/infrastructure/persistence/delivery/in-memory-background-session-delivery-store.d.ts
3070
- interface CreateBackgroundSessionDeliveryStoreOptions {
3071
- readonly initial?: ReadonlyArray<BackgroundSessionDeliveryRecord>;
3072
- readonly persist?: (record: BackgroundSessionDeliveryRecord) => Promise<void>;
3473
+ //#region src/adapters/compatibility/background-session/repository.d.ts
3474
+ interface BackgroundSessionRepository {
3475
+ create(state: BackgroundSessionState): Promise<BackgroundSessionState>;
3476
+ get(sessionId: string): Promise<BackgroundSessionState | undefined>;
3477
+ list(options?: {
3478
+ readonly phase?: BackgroundSessionPhase;
3479
+ readonly limit?: number;
3480
+ }): Promise<ReadonlyArray<BackgroundSessionState>>;
3481
+ update(input: {
3482
+ readonly sessionId: string;
3483
+ readonly expectedRevision: number;
3484
+ readonly expectedLease?: BackgroundSessionLeasePrecondition | BackgroundSessionLeaseRequirement | BackgroundSessionLeaseStaleOrAbsent;
3485
+ readonly now?: string;
3486
+ readonly build: (state: BackgroundSessionState) => BackgroundSessionState;
3487
+ }): Promise<BackgroundSessionState | undefined>;
3073
3488
  }
3074
- declare function createBackgroundSessionDeliveryStore(options?: CreateBackgroundSessionDeliveryStoreOptions): BackgroundSessionDeliveryStore;
3075
3489
  //#endregion
3076
- //#region src/adapters/agent/background-session-host-tools.d.ts
3077
- interface CreateBackgroundSessionHostToolsOptions {
3078
- readonly createSessionId: () => string;
3079
- readonly definition: ResolvedRivusAgentDefinition;
3080
- readonly service: BackgroundSessionService;
3490
+ //#region src/adapters/compatibility/background-session/service.d.ts
3491
+ interface BackgroundSessionServiceOptions {
3492
+ readonly clock: {
3493
+ now(): string;
3494
+ };
3495
+ readonly deliveries: BackgroundSessionDeliveryStore;
3496
+ readonly repository: BackgroundSessionRepository;
3081
3497
  }
3082
- declare function createBackgroundSessionHostTools(options: CreateBackgroundSessionHostToolsOptions): ReadonlyArray<RivusHostToolDescriptor>;
3498
+ declare function createBackgroundSessionService(options: BackgroundSessionServiceOptions): BackgroundSessionService;
3083
3499
  //#endregion
3084
- //#region src/modules/background-session/infrastructure/persistence/session/jsonl-background-session-repository.d.ts
3500
+ //#region src/adapters/outbound/persistence/background-session/session/jsonl-background-session-repository.d.ts
3085
3501
  declare const BACKGROUND_SESSION_JSONL_VERSION = 1;
3086
3502
  interface OpenJsonlBackgroundSessionRepositoryOptions {
3087
3503
  readonly filePath: string;
3088
3504
  readonly compactThreshold?: number;
3089
3505
  }
3090
- declare function openJsonlBackgroundSessionRepository(options: OpenJsonlBackgroundSessionRepositoryOptions): Promise<BackgroundSessionRepository>;
3091
- declare function isBackgroundSessionState(value: unknown): value is BackgroundSessionState;
3506
+ declare function isBackgroundSessionState(value: unknown): value is BackgroundSessionSnapshot;
3507
+ //#endregion
3508
+ //#region src/adapters/outbound/persistence/background-session/delivery/in-memory-background-session-delivery-store.d.ts
3509
+ interface CreateBackgroundSessionDeliveryStoreOptions {
3510
+ readonly initial?: ReadonlyArray<BackgroundSessionDeliveryRecord>;
3511
+ readonly persist?: (record: BackgroundSessionDeliveryRecord) => Promise<void>;
3512
+ }
3513
+ declare function createBackgroundSessionDeliveryStore(options?: CreateBackgroundSessionDeliveryStoreOptions): BackgroundSessionDeliveryStore;
3092
3514
  //#endregion
3093
- //#region src/modules/background-session/infrastructure/persistence/delivery/jsonl-background-session-delivery-store.d.ts
3515
+ //#region src/adapters/outbound/persistence/background-session/delivery/jsonl-background-session-delivery-store.d.ts
3094
3516
  declare const BACKGROUND_SESSION_DELIVERY_JSONL_VERSION = 1;
3095
3517
  interface OpenJsonlBackgroundSessionDeliveryStoreOptions {
3096
3518
  readonly filePath: string;
@@ -3098,6 +3520,51 @@ interface OpenJsonlBackgroundSessionDeliveryStoreOptions {
3098
3520
  }
3099
3521
  declare function openJsonlBackgroundSessionDeliveryStore(options: OpenJsonlBackgroundSessionDeliveryStoreOptions): Promise<BackgroundSessionDeliveryStore>;
3100
3522
  //#endregion
3523
+ //#region src/adapters/compatibility/background-session/persistence.d.ts
3524
+ interface CreateBackgroundSessionRepositoryOptions {
3525
+ readonly initial?: ReadonlyArray<BackgroundSessionState>;
3526
+ readonly persist?: (state: BackgroundSessionState) => Promise<void>;
3527
+ }
3528
+ declare function createBackgroundSessionRepository(options?: CreateBackgroundSessionRepositoryOptions): BackgroundSessionRepository;
3529
+ declare function openJsonlBackgroundSessionRepository(options: OpenJsonlBackgroundSessionRepositoryOptions): Promise<BackgroundSessionRepository>;
3530
+ //#endregion
3531
+ //#region src/adapters/compatibility/background-session/runtime.d.ts
3532
+ interface BackgroundSessionSupervisorOptions extends Pick<BackgroundSessionSupervisorOptions$1, "clock" | "config" | "deliver" | "deliveries" | "onError" | "sleep"> {
3533
+ readonly repository: BackgroundSessionRepository;
3534
+ readonly runStep: (input: {
3535
+ readonly session: BackgroundSessionState;
3536
+ readonly signal: AbortSignal;
3537
+ readonly wakeText: string;
3538
+ }) => Promise<{
3539
+ readonly finalText: string;
3540
+ readonly runId: string;
3541
+ }>;
3542
+ }
3543
+ declare function createBackgroundSessionSupervisor(options: BackgroundSessionSupervisorOptions): BackgroundSessionSupervisor;
3544
+ //#endregion
3545
+ //#region src/adapters/agent/background-session/background-session-host-tools.d.ts
3546
+ interface CreateBackgroundSessionHostToolsOptions {
3547
+ readonly createSessionId: () => string;
3548
+ readonly definition: ResolvedRivusAgentDefinition;
3549
+ readonly service: BackgroundSessionService;
3550
+ }
3551
+ declare function createBackgroundSessionHostTools(options: CreateBackgroundSessionHostToolsOptions): ReadonlyArray<RivusHostToolDescriptor>;
3552
+ //#endregion
3553
+ //#region src/adapters/compatibility/background-session/authority.d.ts
3554
+ declare function extendBackgroundSessionDefinition<T extends BackgroundSessionAgentDefinition>(definition: T): TransformedBackgroundSessionDefinition<T>;
3555
+ declare function narrowBackgroundSessionDefinition<T extends BackgroundSessionAgentDefinition>(definition: T): TransformedBackgroundSessionDefinition<T>;
3556
+ //#endregion
3557
+ //#region src/core/application/background-session/supervision/background-session-config.d.ts
3558
+ declare const DEFAULT_BACKGROUND_SESSION_STEP_TIMEOUT_MS: number;
3559
+ declare const DEFAULT_BACKGROUND_SESSION_MAX_CONCURRENT_SESSIONS = 4;
3560
+ declare const DEFAULT_BACKGROUND_SESSION_LEASE_MS = 30000;
3561
+ declare const DEFAULT_BACKGROUND_SESSION_LEASE_RENEWAL_INTERVAL_MS = 10000;
3562
+ declare const DEFAULT_BACKGROUND_SESSION_MAX_CONSECUTIVE_FAILURES = 3;
3563
+ declare const DEFAULT_BACKGROUND_SESSION_RETRY_BACKOFF_MS = 30000;
3564
+ declare const DEFAULT_BACKGROUND_SESSION_LIFETIME_MS: number;
3565
+ declare const DEFAULT_BACKGROUND_SESSION_SUPERVISOR_INTERVAL_MS = 1000;
3566
+ declare function resolveBackgroundSessionSupervisorIntervalMs(leaseMs: number): number;
3567
+ //#endregion
3101
3568
  //#region src/adapters/feishu/background-session/background-session-delivery.d.ts
3102
3569
  type FeishuBackgroundSessionDeliveryKind = "progress" | "final" | "stopped" | "failed" | "reconciliation";
3103
3570
  interface FeishuBackgroundSessionDeliveryInput {
@@ -3132,6 +3599,10 @@ declare function createBackgroundSessionCard(input: {
3132
3599
  readonly text: string;
3133
3600
  }): FeishuRawCardJson;
3134
3601
  //#endregion
3602
+ //#region src/adapters/compatibility/memory/public-contract.d.ts
3603
+ declare function createMemoryNamespace(binding: MemoryBinding): string;
3604
+ declare function restrictMemoryScopesForAudience(scopes: ReadonlyArray<MemoryScope>, audience: MemoryInvocationAudience): ReadonlyArray<MemoryScope>;
3605
+ //#endregion
3135
3606
  //#region src/adapters/agent/memory/rivus-memory-tool.d.ts
3136
3607
  interface RivusMemoryTool {
3137
3608
  execute(command: {
@@ -3255,11 +3726,90 @@ declare function createAgentLoopPromptTransformer(options: {
3255
3726
  readonly transform: (input: AgentLoopInput) => Promise<string> | string;
3256
3727
  }): AgentLoop;
3257
3728
  //#endregion
3729
+ //#region src/core/application/deployment/manifest/deployment-manifest.d.ts
3730
+ declare class InvalidRivusProjectSpace extends Error {
3731
+ readonly name = "InvalidRivusProjectSpace";
3732
+ }
3733
+ declare function validateRivusDeploymentManifest(manifest: RivusDeploymentManifest): void;
3734
+ //#endregion
3735
+ //#region src/adapters/deployment/project-space/node-project-space-resolver.d.ts
3736
+ declare function resolveRivusProjectSpace(input: {
3737
+ readonly declaration: RivusProjectSpaceDeployment;
3738
+ readonly deploymentRoot: string;
3739
+ }): Promise<ResolvedRivusProjectSpace>;
3740
+ //#endregion
3741
+ //#region src/adapters/pi/skills/project-skill-catalog.d.ts
3742
+ interface ProjectSkillCatalogEntry {
3743
+ readonly name: string;
3744
+ }
3745
+ interface ProjectSkillCatalogDiagnostic {
3746
+ readonly message: string;
3747
+ readonly path?: string;
3748
+ readonly type: "warning" | "error" | "collision";
3749
+ }
3750
+ declare class InvalidProjectSkillCatalog extends Error {
3751
+ readonly name = "InvalidProjectSkillCatalog";
3752
+ }
3753
+ declare function validateProjectSkillCatalog(input: {
3754
+ readonly diagnostics: ReadonlyArray<ProjectSkillCatalogDiagnostic>;
3755
+ readonly skills: ReadonlyArray<ProjectSkillCatalogEntry>;
3756
+ }): ReadonlySet<string>;
3757
+ declare function validateProjectSkillCommand(text: string, skillNames: ReadonlySet<string>): void;
3758
+ //#endregion
3258
3759
  //#region src/adapters/compatibility/memory/service/jsonl-agent-memory-service.d.ts
3259
3760
  declare function openJsonlAgentMemoryService(options: {
3260
3761
  readonly filePath: string;
3261
3762
  }): Promise<AgentMemoryService>;
3262
3763
  //#endregion
3764
+ //#region src/core/application/agent-execution/context/agent-context-assembler.d.ts
3765
+ type AgentContextLayerKind = "host-safety" | "system-prompt" | "managed-instructions" | "workspace-instructions" | "tool-schema" | "skill" | "memory" | "compaction" | "transcript" | "current-input";
3766
+ interface AgentContextLayer {
3767
+ readonly kind: AgentContextLayerKind;
3768
+ readonly content: string;
3769
+ }
3770
+ interface AgentContextInput {
3771
+ readonly hostSafety: string;
3772
+ readonly systemPrompt: string;
3773
+ readonly managedInstructions?: string;
3774
+ readonly workspaceInstructions?: ReadonlyArray<string>;
3775
+ readonly toolSchemas: ReadonlyArray<string>;
3776
+ readonly skills?: ReadonlyArray<string>;
3777
+ readonly memory?: ReadonlyArray<string>;
3778
+ readonly compaction?: string;
3779
+ readonly transcript?: ReadonlyArray<string>;
3780
+ readonly currentInput: string;
3781
+ readonly maxBytes: number;
3782
+ }
3783
+ interface AssembledAgentContext {
3784
+ readonly layers: ReadonlyArray<AgentContextLayer>;
3785
+ readonly omittedKinds: ReadonlyArray<AgentContextLayerKind>;
3786
+ readonly bytes: number;
3787
+ }
3788
+ declare class AgentContextBudgetExceeded extends Error {
3789
+ readonly name = "AgentContextBudgetExceeded";
3790
+ }
3791
+ declare function assembleAgentContext(input: AgentContextInput): AssembledAgentContext;
3792
+ //#endregion
3793
+ //#region src/core/application/memory/ports/compactor.d.ts
3794
+ interface CompactionInput {
3795
+ readonly tenantId: string;
3796
+ readonly agentId: string;
3797
+ readonly instanceId: string;
3798
+ readonly conversationId: string;
3799
+ readonly profileRevision: string;
3800
+ readonly watermark: number;
3801
+ readonly transcript: ReadonlyArray<string>;
3802
+ }
3803
+ //#endregion
3804
+ //#region src/core/application/memory/compaction/compaction-service.d.ts
3805
+ interface CompactionSnapshot extends Omit<CompactionInput, "transcript"> {
3806
+ readonly id: string;
3807
+ readonly summary: string;
3808
+ }
3809
+ declare class CompactionError extends Error {
3810
+ readonly name = "CompactionError";
3811
+ }
3812
+ //#endregion
3263
3813
  //#region src/adapters/compatibility/memory/compaction/compaction-service.d.ts
3264
3814
  interface CompactorPort {
3265
3815
  compact(input: CompactionInput): Promise<string>;
@@ -3276,6 +3826,23 @@ declare function createCompactionService(options: {
3276
3826
  //#region src/adapters/compatibility/automation/automation-mandate-store.d.ts
3277
3827
  declare function createAutomationMandateStore(): AutomationMandateStore;
3278
3828
  //#endregion
3829
+ //#region src/adapters/compatibility/automation/automation-tick-record.d.ts
3830
+ type AutomationTickStatus = "running" | "failed" | "generated" | "suppressed" | "delivered";
3831
+ interface AutomationTickRecord {
3832
+ readonly automationId: string;
3833
+ readonly body?: string;
3834
+ readonly error?: string;
3835
+ readonly occurrence: string;
3836
+ readonly mandateId: string;
3837
+ readonly providerMessageId?: string;
3838
+ readonly presentation?: AutomationPresentation;
3839
+ readonly revision: number;
3840
+ readonly runId?: string;
3841
+ readonly suppressionReason?: string;
3842
+ readonly status: AutomationTickStatus;
3843
+ readonly tickId: string;
3844
+ }
3845
+ //#endregion
3279
3846
  //#region src/adapters/compatibility/automation/scheduled-automation.d.ts
3280
3847
  interface ScheduledAutomationClock {
3281
3848
  now(): Date;
@@ -3310,14 +3877,62 @@ interface ScheduledAutomation {
3310
3877
  }
3311
3878
  declare function createScheduledAutomation(options: ScheduledAutomationOptions): ScheduledAutomation;
3312
3879
  //#endregion
3313
- //#region src/modules/automation/infrastructure/persistence/tick/json-automation-tick-repository.d.ts
3314
- interface OpenJsonAutomationTickRepositoryOptions {
3315
- readonly filePath: string;
3880
+ //#region src/core/application/automation/policy/daily-automation-schedule.d.ts
3881
+ interface DailyAutomationSchedule {
3882
+ currentOccurrence(now: Date): string | undefined;
3883
+ nextOccurrence(now: Date): Date;
3316
3884
  }
3885
+ declare function createDailyAutomationSchedule(expression: string, timeZone: string, now?: Date): DailyAutomationSchedule;
3317
3886
  //#endregion
3318
3887
  //#region src/adapters/compatibility/automation/json-automation-tick-repository.d.ts
3888
+ interface OpenJsonAutomationTickRepositoryOptions {
3889
+ readonly filePath: string;
3890
+ }
3319
3891
  declare function openJsonAutomationTickRepository(options: OpenJsonAutomationTickRepositoryOptions): Promise<AutomationTickRepositoryCompatibility>;
3320
3892
  //#endregion
3893
+ //#region src/core/application/automation/outcome/automation-outcome.d.ts
3894
+ type AutomationOutcome = {
3895
+ readonly kind: "suppressed";
3896
+ } | {
3897
+ readonly kind: "report" | "alert";
3898
+ readonly body: string;
3899
+ readonly target: string;
3900
+ };
3901
+ interface PluginStateRecord {
3902
+ readonly pluginId: string;
3903
+ readonly agentId: string;
3904
+ readonly key: string;
3905
+ readonly value: unknown;
3906
+ readonly revision: number;
3907
+ }
3908
+ interface PutPluginState {
3909
+ readonly pluginId: string;
3910
+ readonly agentId: string;
3911
+ readonly key: string;
3912
+ readonly value: unknown;
3913
+ readonly expectedRevision: number;
3914
+ }
3915
+ type DeliveryJobStatus = "pending" | "delivered" | "reconciliation-required";
3916
+ interface DeliveryJob {
3917
+ readonly id: string;
3918
+ readonly tickId: string;
3919
+ readonly kind: "report" | "alert";
3920
+ readonly body: string;
3921
+ readonly target: string;
3922
+ readonly status: DeliveryJobStatus;
3923
+ readonly receiptId?: string;
3924
+ }
3925
+ type DeliveryAttemptResult = {
3926
+ readonly kind: "delivered";
3927
+ readonly providerMessageId: string;
3928
+ } | {
3929
+ readonly kind: "uncertain";
3930
+ };
3931
+ interface CommittedAutomationOutcome {
3932
+ readonly state: PluginStateRecord;
3933
+ readonly job?: DeliveryJob;
3934
+ }
3935
+ //#endregion
3321
3936
  //#region src/adapters/compatibility/automation/outcome/plugin-state-store.d.ts
3322
3937
  interface PluginStateStore {
3323
3938
  get(pluginId: string, agentId: string, key: string): PluginStateRecord | undefined;
@@ -3349,7 +3964,7 @@ interface CommitAutomationOutcomeInput {
3349
3964
  }
3350
3965
  declare function commitAutomationOutcome(input: CommitAutomationOutcomeInput): CommittedAutomationOutcome;
3351
3966
  //#endregion
3352
- //#region src/modules/delegation/domain/grant/peer-delegation.d.ts
3967
+ //#region src/core/application/delegation/contracts/delegation.d.ts
3353
3968
  interface DelegationEdge {
3354
3969
  readonly fromAgentId: string;
3355
3970
  readonly toAgentId: string;
@@ -3357,13 +3972,8 @@ interface DelegationEdge {
3357
3972
  readonly maxHops: number;
3358
3973
  readonly maxBudget: number;
3359
3974
  }
3360
- declare class DelegationDenied extends Error {
3361
- readonly name = "DelegationDenied";
3362
- }
3363
- //#endregion
3364
- //#region src/modules/delegation/application/grant/delegation-service.d.ts
3365
3975
  interface DelegationRequest {
3366
- readonly callerAuthority: InvocationAuthorityRef;
3976
+ readonly callerAuthority: InvocationAuthorityRef$1;
3367
3977
  readonly targetAgentId: string;
3368
3978
  readonly targetInstanceId: string;
3369
3979
  readonly targetToolGrantSet: RivusToolGrantSet;
@@ -3375,20 +3985,26 @@ interface DelegationGrant {
3375
3985
  readonly id: string;
3376
3986
  readonly request: DelegationRequest;
3377
3987
  readonly toolGrantSet: RivusToolGrantSet;
3378
- readonly authority: InvocationAuthorityRef;
3988
+ readonly authority: InvocationAuthorityRef$1;
3379
3989
  }
3380
3990
  //#endregion
3381
- //#region src/modules/delegation/domain/subagent/subagent-record.d.ts
3382
- interface ChildDelegationRecord {
3383
- readonly id: string;
3384
- readonly parentRunId: string;
3385
- readonly childAgentId: string;
3386
- readonly status: "active" | "cancelled";
3991
+ //#region src/core/application/delegation/grant/delegation-service.d.ts
3992
+ declare class DelegationDenied extends Error {
3993
+ readonly name = "DelegationDenied";
3994
+ }
3995
+ //#endregion
3996
+ //#region src/adapters/compatibility/delegation/delegation-service.d.ts
3997
+ interface DelegationService {
3998
+ delegate(request: DelegationRequest): DelegationGrant;
3387
3999
  }
4000
+ declare function createDelegationService(options: {
4001
+ readonly edges: ReadonlyArray<DelegationEdge>;
4002
+ }): DelegationService;
4003
+ declare function intersectToolIds(sets: ReadonlyArray<ReadonlyArray<string>>): RivusToolGrantSet;
3388
4004
  //#endregion
3389
- //#region src/modules/delegation/application/subagent/subagent-contracts.d.ts
4005
+ //#region src/core/application/delegation/contracts/subagent.d.ts
3390
4006
  interface SpawnSubagentRequest {
3391
- readonly parentAuthority: InvocationAuthorityRef;
4007
+ readonly parentAuthority: InvocationAuthorityRef$1;
3392
4008
  readonly childAgentId: string;
3393
4009
  readonly childProfileToolIds: ReadonlyArray<string>;
3394
4010
  readonly childDeploymentToolIds: ReadonlyArray<string>;
@@ -3399,21 +4015,16 @@ interface SubagentCapabilities {
3399
4015
  readonly privateMemory: false;
3400
4016
  readonly shell: false;
3401
4017
  }
3402
- interface SubagentRecord extends ChildDelegationRecord {
4018
+ interface SubagentRecord {
4019
+ readonly id: string;
4020
+ readonly parentRunId: string;
4021
+ readonly childAgentId: string;
4022
+ readonly status: "active" | "cancelled";
3403
4023
  readonly toolGrantSet: RivusToolGrantSet;
3404
- readonly authority: InvocationAuthorityRef;
4024
+ readonly authority: InvocationAuthorityRef$1;
3405
4025
  readonly capabilities: SubagentCapabilities;
3406
4026
  }
3407
4027
  //#endregion
3408
- //#region src/adapters/compatibility/delegation/delegation-service.d.ts
3409
- interface DelegationService {
3410
- delegate(request: DelegationRequest): DelegationGrant;
3411
- }
3412
- declare function createDelegationService(options: {
3413
- readonly edges: ReadonlyArray<DelegationEdge>;
3414
- }): DelegationService;
3415
- declare function intersectToolIds(sets: ReadonlyArray<ReadonlyArray<string>>): RivusToolGrantSet;
3416
- //#endregion
3417
4028
  //#region src/adapters/compatibility/delegation/subagent-coordinator.d.ts
3418
4029
  interface SubagentCoordinator {
3419
4030
  spawn(request: SpawnSubagentRequest): SubagentRecord;
@@ -3422,6 +4033,14 @@ interface SubagentCoordinator {
3422
4033
  }
3423
4034
  declare function createSubagentCoordinator(): SubagentCoordinator;
3424
4035
  //#endregion
4036
+ //#region src/core/application/deployment/resolution/deployment-resolution.d.ts
4037
+ declare class RivusPluginLoadError extends Error {
4038
+ readonly pluginId: string;
4039
+ readonly moduleSpecifier: string;
4040
+ readonly name = "RivusPluginLoadError";
4041
+ constructor(pluginId: string, moduleSpecifier: string, message: string, options?: ErrorOptions);
4042
+ }
4043
+ //#endregion
3425
4044
  //#region src/adapters/compatibility/deployment-control/rivus-plugin-loader.d.ts
3426
4045
  type RivusPluginModule = RivusPlugin | {
3427
4046
  readonly default: RivusPlugin | (() => RivusPlugin | Promise<RivusPlugin>);
@@ -3471,7 +4090,6 @@ interface CreateRivusDeploymentEndpointInput {
3471
4090
  readonly endpointId: string;
3472
4091
  readonly definition: RivusEndpointDeployment;
3473
4092
  readonly handle: (input: RivusEndpointInput) => Promise<unknown>;
3474
- /** Optional control-plane steering; endpoints that do not support it remain prompt-only. */
3475
4093
  readonly steer?: (input: AgentRuntimeSteering) => Promise<boolean>;
3476
4094
  readonly instanceId: string;
3477
4095
  readonly projectSpaceId?: string;
@@ -3523,6 +4141,8 @@ interface RivusDeploymentDaemon {
3523
4141
  status(): RivusDeploymentDaemonStatus;
3524
4142
  stop(): Promise<void>;
3525
4143
  }
4144
+ //#endregion
4145
+ //#region src/bootstrap/deployment/rivus-deployment-daemon.d.ts
3526
4146
  declare function createRivusDeploymentDaemon(options: CreateRivusDeploymentDaemonOptions): Promise<RivusDeploymentDaemon>;
3527
4147
  //#endregion
3528
4148
  //#region src/adapters/deployment/manifest/node-rivus-deployment-manifest.d.ts
@@ -3538,7 +4158,7 @@ declare class RivusDeploymentManifestError extends Error {
3538
4158
  //#region src/adapters/compatibility/deployment-control/rivus-deployment-manifest.d.ts
3539
4159
  declare function loadRivusDeploymentManifest(manifestPath: string, options?: LoadRivusDeploymentManifestOptions): Promise<RivusDeploymentManifest>;
3540
4160
  //#endregion
3541
- //#region src/adapters/compatibility/deployment-control/configured-rivus-deployment-daemon.d.ts
4161
+ //#region src/bootstrap/deployment/configured-rivus-deployment-daemon.d.ts
3542
4162
  type CreateConfiguredRivusDeploymentDaemonOptions = Omit<CreateRivusDeploymentDaemonOptions, "deploymentRoot" | "loadModule" | "manifest"> & {
3543
4163
  readonly manifestPath: string;
3544
4164
  readonly manifestOptions?: LoadRivusDeploymentManifestOptions;
@@ -3546,13 +4166,58 @@ type CreateConfiguredRivusDeploymentDaemonOptions = Omit<CreateRivusDeploymentDa
3546
4166
  };
3547
4167
  declare function createConfiguredRivusDeploymentDaemon(options: CreateConfiguredRivusDeploymentDaemonOptions): Promise<RivusDeploymentDaemon>;
3548
4168
  //#endregion
3549
- //#region src/composition/human-interaction-tool-approval-gateway.d.ts
4169
+ //#region src/adapters/compatibility/human-interaction/snapshot.d.ts
4170
+ interface ApprovedHumanInteractionState extends ApprovedHumanInteractionState$1 {}
4171
+ interface CancelledHumanInteractionState extends CancelledHumanInteractionState$1 {}
4172
+ interface ExpiredHumanInteractionState extends ExpiredHumanInteractionState$1 {}
4173
+ interface HumanInteractionActor extends HumanInteractionActor$1 {}
4174
+ interface HumanInteractionBase extends HumanInteractionBase$1 {}
4175
+ interface HumanInteractionFact extends HumanInteractionFact$1 {}
4176
+ type HumanInteractionId = HumanInteractionId$1;
4177
+ type HumanInteractionResolutionAction = HumanInteractionResolutionAction$1;
4178
+ type HumanInteractionTransition = HumanInteractionTransition$1;
4179
+ interface PendingHumanInteractionState extends PendingHumanInteractionState$1 {}
4180
+ interface RejectedHumanInteractionState extends RejectedHumanInteractionState$1 {}
4181
+ interface RequestToolApprovalInput extends RequestToolApprovalInput$1 {}
4182
+ interface RequestUserDecisionInput extends RequestUserDecisionInput$1 {}
4183
+ interface SelectedHumanInteractionState extends SelectedHumanInteractionState$1 {}
4184
+ interface ToolApprovalBinding extends ToolApprovalBinding$1 {}
4185
+ type ToolApprovalInteractionState = ToolApprovalInteractionState$1;
4186
+ type UserDecisionInteractionState = UserDecisionInteractionState$1;
4187
+ interface UserDecisionOption extends UserDecisionOption$1 {}
4188
+ type HumanInteraction = ToolApprovalInteraction | UserDecisionInteraction;
4189
+ interface ToolApprovalInteraction extends ToolApprovalInteraction$1 {}
4190
+ interface UserDecisionInteraction extends UserDecisionInteraction$1 {}
4191
+ //#endregion
4192
+ //#region src/adapters/compatibility/human-interaction/transitions.d.ts
4193
+ declare class HumanInteractionTransitionDenied extends Error {
4194
+ readonly name = "HumanInteractionTransitionDenied";
4195
+ }
4196
+ declare function transitionHumanInteraction(interaction: HumanInteraction, transition: HumanInteractionTransition): HumanInteraction;
4197
+ //#endregion
4198
+ //#region src/adapters/compatibility/human-interaction/presenter.d.ts
4199
+ interface HumanInteractionPresenter extends HumanInteractionPresenterContract<HumanInteraction> {}
4200
+ //#endregion
4201
+ //#region src/adapters/compatibility/human-interaction/repository.d.ts
4202
+ interface HumanInteractionRepository extends HumanInteractionRepositoryContract<HumanInteraction> {}
4203
+ //#endregion
4204
+ //#region src/adapters/compatibility/human-interaction/service.d.ts
4205
+ interface HumanInteractionClock extends HumanInteractionClock$1 {}
4206
+ interface ResolveHumanInteractionInput extends ResolveHumanInteractionInput$1 {}
4207
+ interface ConsumeToolApprovalInput extends ConsumeToolApprovalInput$1 {}
4208
+ interface HumanInteractionService extends HumanInteractionServiceContract<HumanInteraction, ToolApprovalInteraction, UserDecisionInteraction, RequestToolApprovalInput, RequestUserDecisionInput, ResolveHumanInteractionInput, ConsumeToolApprovalInput> {}
4209
+ interface HumanInteractionServiceOptions extends HumanInteractionServiceOptionsContract<HumanInteractionClock, HumanInteractionPresenter, HumanInteractionRepository> {}
4210
+ declare function createHumanInteractionService(options: HumanInteractionServiceOptions): HumanInteractionService;
4211
+ //#endregion
4212
+ //#region src/adapters/compatibility/human-interaction/endpoint-registry.d.ts
3550
4213
  interface HumanInteractionEndpointRegistry {
3551
4214
  register(endpointId: string, service: HumanInteractionService): void;
3552
4215
  resolve(endpointId: string): HumanInteractionService | undefined;
3553
4216
  services(): ReadonlyArray<HumanInteractionService>;
3554
4217
  }
3555
4218
  declare function createHumanInteractionEndpointRegistry(): HumanInteractionEndpointRegistry;
4219
+ //#endregion
4220
+ //#region src/adapters/compatibility/human-interaction/tool-approval-gateway.d.ts
3556
4221
  declare function createHumanInteractionToolApprovalGateway(options: {
3557
4222
  readonly clock?: {
3558
4223
  readonly now: () => string;
@@ -3560,6 +4225,8 @@ declare function createHumanInteractionToolApprovalGateway(options: {
3560
4225
  readonly expiresAfterMs?: number;
3561
4226
  readonly registry: HumanInteractionEndpointRegistry;
3562
4227
  }): PiToolApprovalGateway;
4228
+ //#endregion
4229
+ //#region src/adapters/compatibility/human-interaction/routed-tool-approval-service.d.ts
3563
4230
  declare function createRoutedHumanInteractionToolApprovalService(registry: HumanInteractionEndpointRegistry): ToolApprovalService;
3564
4231
  //#endregion
3565
4232
  //#region src/adapters/feishu/delivery/feishu-text-reply.d.ts
@@ -3598,17 +4265,27 @@ declare function createConfiguredFeishuAutomationCardSender(options: {
3598
4265
  readonly config: RivusDaemonConfig;
3599
4266
  }): FeishuAutomationCardSender;
3600
4267
  //#endregion
3601
- //#region src/modules/human-interaction/infrastructure/persistence/interaction/in-memory-human-interaction-repository.d.ts
3602
- declare function createInMemoryHumanInteractionRepository(): HumanInteractionRepository;
3603
- //#endregion
3604
- //#region src/modules/human-interaction/infrastructure/persistence/interaction/jsonl-human-interaction-repository.d.ts
4268
+ //#region src/adapters/outbound/persistence/human-interaction/jsonl-human-interaction-repository.d.ts
3605
4269
  interface JsonlHumanInteractionRepositoryOptions {
3606
4270
  readonly filePath: string;
3607
4271
  }
4272
+ //#endregion
4273
+ //#region src/adapters/compatibility/human-interaction/persistence.d.ts
4274
+ declare function createInMemoryHumanInteractionRepository(): HumanInteractionRepository;
3608
4275
  declare function createJsonlHumanInteractionRepository(options: JsonlHumanInteractionRepositoryOptions): HumanInteractionRepository;
3609
4276
  //#endregion
3610
- //#region src/adapters/feishu/interaction/human-interaction-card.d.ts
4277
+ //#region src/adapters/compatibility/human-interaction/feishu.d.ts
3611
4278
  declare function createFeishuHumanInteractionCard(interaction: HumanInteraction): FeishuRawCardJson;
4279
+ interface FeishuHumanInteractionPresenterOptions {
4280
+ readonly baseUrl?: string;
4281
+ readonly client: FeishuOpenApiClient;
4282
+ }
4283
+ declare function createFeishuHumanInteractionPresenter(options: FeishuHumanInteractionPresenterOptions): HumanInteractionPresenter;
4284
+ interface ConfiguredFeishuHumanInteractionPresenterOptions {
4285
+ readonly client: FeishuOpenApiClient;
4286
+ readonly config: RivusDaemonConfig;
4287
+ }
4288
+ declare function createConfiguredFeishuHumanInteractionPresenter(options: ConfiguredFeishuHumanInteractionPresenterOptions): HumanInteractionPresenter;
3612
4289
  //#endregion
3613
4290
  //#region src/adapters/feishu/run-presentation/feishu-agent-run-card.d.ts
3614
4291
  declare const FEISHU_AGENT_CARD_ELEMENT_ID = "rivus_agent_answer";
@@ -3645,18 +4322,4 @@ type FeishuAgentRunCardInput = {
3645
4322
  };
3646
4323
  declare function createFeishuAgentRunCard(input: FeishuAgentRunCardInput): FeishuRawCardJson;
3647
4324
  //#endregion
3648
- //#region src/adapters/feishu/interaction/human-interaction-presenter.d.ts
3649
- interface FeishuHumanInteractionPresenterOptions {
3650
- readonly baseUrl?: string;
3651
- readonly client: FeishuOpenApiClient;
3652
- }
3653
- declare function createFeishuHumanInteractionPresenter(options: FeishuHumanInteractionPresenterOptions): HumanInteractionPresenter;
3654
- //#endregion
3655
- //#region src/adapters/feishu/interaction/configured-human-interaction-presenter.d.ts
3656
- interface ConfiguredFeishuHumanInteractionPresenterOptions {
3657
- readonly client: FeishuOpenApiClient;
3658
- readonly config: RivusDaemonConfig;
3659
- }
3660
- declare function createConfiguredFeishuHumanInteractionPresenter(options: ConfiguredFeishuHumanInteractionPresenterOptions): HumanInteractionPresenter;
3661
- //#endregion
3662
- export { DelegationEdge as $, WorkspaceRootHandle as $a, createRecoveryControl as $c, RivusDaemonCliWriter as $i, FeishuMessageIntakeSummary as $l, FeishuCardKitOpenApiClientOptions as $n, FeishuWorkerLoopOptions as $o, createFeishuTenantAccessTokenProvider as $r, createDefaultAgentHarnessClientFromTextCallback as $s, RivusAgentHost as $t, JsonlFeishuCardDeliveryLedgerOptions as $u, CreateRivusDeploymentBackgroundSessionInput as A, RivusAutomationDeliveryTargetType as Aa, SessionSchedulerDisposed as Ac, AgentEventLogStoreError as Ai, FeishuAgentExecution as Al, createConfiguredFeishuCardKitPublisher as An, FeishuCardRolloverEventType as Ao, resolveLangfuseTelemetryConfig as Ar, resolveFeishuEndpointCredentials as As, RivusMemoryTool as At, HumanInteractionRepositoryError as Au, LoadRivusDeploymentOptions as B, ProjectSkillCatalogEntry as Ba, createAgentRuntimePool as Bc, FeishuEventHandlersOptions as Bi, FeishuCardActionCommand as Bl, FeishuCardTargetCreator as Bn, CardPresentationStatus as Bo, ConfiguredFeishuOpenApiRequest as Br, DefaultAgentHarnessClientFromTextCallbackOptions as Bs, openJsonlBackgroundSessionDeliveryStore as Bt, HumanInteractionFact as Bu, createRoutedHumanInteractionToolApprovalService as C, LoadedRivusDeployment as Ca, FetchLikeResponse as Cc, hasInspectableRunProgress as Cd, FeishuWebSocketDaemonOptions as Ci, FeishuAgentDaemonHandleResult as Cl, createFixedClock as Cn, RivusDaemonStatus as Co, createTelemetryContentRedactor as Cr, OpenClawEnvImportOptions as Cs, ProjectMemoryRecallOptions as Ct, ConsumeToolApprovalInput as Cu, LoadRivusDeploymentManifestOptions as D, RivusPluginLoadStatus as Da, createJsonFetchRequest as Dc, createLazyFeishuWebSocketEventDispatcher as Di, FeishuAgentDaemonSessionResetResult as Dl, FeishuPeriodicFlushOptions as Dn, FeishuCardRollover as Do, LangfuseTelemetryContentMode as Dr, formatRivusEnvFile as Ds, RIVUS_MEMORY_TOOL_VERSION as Dt, ResolveHumanInteractionInput as Du, loadRivusDeploymentManifest as E, RivusPluginLoadError as Ea, JsonHttpResponse as Ec, createPresentedValue as Ed, createFeishuWebSocketDaemon as Ei, FeishuAgentDaemonRunResult as El, FeishuPeriodicFlush as En, createRivusDaemonStatusReporter as Eo, LangfuseTelemetryConfigError as Er, createRivusEnvFromOpenClawConfig as Es, RIVUS_MEMORY_TOOL_PLUGIN_ID as Et, HumanInteractionServiceOptions as Eu, RivusDeploymentBackgroundSession as F, RivusEndpointExperimentalFeatures as Fa, AgentRuntimeInput as Fc, FeishuPeriodicFlushSupervisor as Fi, createFeishuAgentDaemon as Fl, RateLimitedFeishuPublisherOptions as Fn, FeishuCardPresentationHandoffStart as Fo, createConfiguredRivusDaemonBootstrap as Fr, RivusTextFileReader as Fs, FeishuBackgroundSessionDeliveryKind as Ft, CancelledHumanInteractionState as Fu, DelegationService as G, RivusProjectSpaceDeployment as Ga, AgentInstanceRegistryOptions as Gc, FeishuCardActionToast as Gi, UnsupportedFeishuCardAction as Gl, FeishuCotProtocolError as Gn, CompositeRivusDaemonTransportOptions as Go, FeishuOpenApiResponse as Gr, DefaultAgentRuntimeFromCallbackOptions as Gs, createBackgroundSessionHostTools as Gt, RejectedHumanInteractionState as Gu, loadRivusDeployment as H, validateProjectSkillCommand as Ha, createAgentInstanceRegistry as Hc, FeishuSdkReceiveMessagePayload as Hi, FeishuCardActionTriggerPayload as Hl, createConfiguredFeishuCardKitTargetCreator as Hn, acceptsCardPresentationProgress as Ho, FeishuOpenApiClient as Hr, DefaultAgentHarnessFromCallbackOptions as Hs, isBackgroundSessionState as Ht, HumanInteractionResolutionAction as Hu, RivusDeploymentDaemon as I, RivusPluginDeclaration as Ia, AgentRuntimePool as Ic, createFeishuAgentRuntime as Ii, FeishuPromptContextInput as Il, createRateLimitedFeishuPublisher as In, FeishuCardPresentationStore as Io, restoreConfiguredRivusDaemonBootstrap as Ir, RivusThinkingLevel as Is, createBackgroundSessionCard as It, ExpiredHumanInteractionState as Iu, SpawnSubagentRequest as J, WorkspaceInstructionsDiagnostic as Ja, OpenJsonFeishuSessionStoreOptions as Jc, FeishuRawCardJson as Ji, FeishuCancelMessageIntakeSummary as Jl, FeishuCotRunPreparation as Jn, RivusDaemonProcessOptions as Jo, FeishuTenantAccessTokenError as Jr, DefaultAgentRuntimeSessionOptions as Js, AgentMemoryServiceOptions as Jt, ToolApprovalInteraction as Ju, createDelegationService as K, InvalidWorkspaceRoot as Ka, AgentInstanceConflict as Kc, createFeishuCardActionCallbackResponse as Ki, createAgentCommandFromFeishuCardAction as Kl, FeishuCotPublisher as Kn, createCompositeRivusDaemonTransport as Ko, createConfiguredFeishuOpenApiClient as Kr, DefaultAgentRuntimeFromTextCallbackOptions as Ks, createBackgroundSessionDeliveryStore as Kt, SelectedHumanInteractionState as Ku, RivusDeploymentEndpoint as L, validateRivusDeploymentManifest as La, AgentRuntimePoolOptions as Lc, FeishuEventHandlerCardActions as Li, FeishuPromptContextResolver as Ll, FeishuCardKitOpenApiTargetCreatorOptions as Ln, DEFAULT_CARD_STREAM_LEASE_MS as Lo, ConfiguredFeishuCardRolloverRuntime as Lr, loadRivusDaemonConfig as Ls, createConfiguredFeishuBackgroundSessionDelivery as Lt, HumanInteraction as Lu, CreateRivusDeploymentEndpointInput as M, RivusBackgroundSessionsDeployment as Ma, SessionSchedulerStatus as Mc, createJsonlAgentEventLog as Mi, FeishuAgentMessageSideEffects as Ml, FeishuCoalescingPublisherOptions as Mn, FeishuCardRolloverOptions as Mo, ConfiguredRivusDaemonBootstrapOptions as Mr, RivusDaemonConfigError as Ms, createRivusMemoryToolDescriptor as Mt, RequestToolApprovalInput as Mu, CreateRivusDeploymentRuntimeInput as N, RivusDeploymentManifest as Na, createSessionScheduler as Nc, FeishuAgentRuntime as Ni, FeishuAgentPreparedControl as Nl, createCoalescingFeishuPublisher as Nn, FeishuCardRolloverStatus as No, ConfiguredRivusDaemonBootstrapRequest as Nr, RivusDaemonConfigLoaderOptions as Ns, FeishuBackgroundSessionDelivery as Nt, RequestUserDecisionInput as Nu, RivusDeploymentManifestError as O, RivusPluginModuleLoadRequest as Oa, SessionScheduler as Oc, AgentEventLog as Oi, FeishuAgentDaemonSkippedResult as Ol, createFeishuPeriodicFlush as On, FeishuCardRolloverCounters as Oo, LangfuseTelemetryEnv as Or, FeishuEndpointCredentialError as Os, createRivusMemoryToolContract as Ot, createHumanInteractionService as Ou, RivusDeploymentAutomation as P, RivusEndpointDeployment as Pa, AgentRuntimeCancellation as Pc, FeishuAgentRuntimeOptions as Pi, FeishuHumanInteractionActions as Pl, FeishuStreamActionPublisher as Pn, createFeishuCardRollover as Po, ConfiguredRivusDaemonBootstrapResponse as Pr, RivusDaemonEnv as Ps, FeishuBackgroundSessionDeliveryInput as Pt, ApprovedHumanInteractionState as Pu, DelegationDenied as Q, WorkspaceInstructionsView as Qa, RecoveryControlOptions as Qc, RivusDaemonCliOptions as Qi, FeishuMessageIntakeOptions as Ql, createFeishuTopicContextResolver as Qn, FeishuWorkerLoop as Qo, FeishuTenantAccessTokenResponse as Qr, createDefaultAgentHarnessClientFromCallback as Qs, InvalidRivusEndpointBinding as Qt, UserDecisionOption as Qu, createRivusDeploymentDaemon as R, InvalidProjectSkillCatalog as Ra, AgentRuntimeSteering as Rc, FeishuEventHandlerQueue as Ri, composeFeishuTopicPrompt as Rl, FeishuCardPresentationBinder as Rn, CardPresentation as Ro, ConfiguredFeishuCardRolloverRuntimeOptions as Rr, AgentRuntime as Rs, resolveFeishuDeliveryChatId as Rt, HumanInteractionActor as Ru, createHumanInteractionToolApprovalGateway as S, RivusDeploymentComponentLifecycle as Sa, FetchLike as Sc, ToolPresentationStep as Sd, FeishuWebSocketDaemon as Si, FeishuAgentDaemonHandleMessageOptions as Sl, resolveRivusAgentDefinition as Sn, createRivusDaemonStatusHttpServer as So, TelemetryContentRedactorOptions as Sr, OpenClawEnvImportError as Ss, ProjectMemoryRecallIdentity as St, transitionHumanInteraction as Su, createConfiguredRivusDeploymentDaemon as T, RivusAgentDeploymentStatus as Ta, JsonHttpRequest as Tc, PresentedValueOptions as Td, FeishuWebSocketRuntime as Ti, FeishuAgentDaemonOptions as Tl, createTestClock as Tn, RivusDaemonStatusReporterOptions as To, LangfuseTelemetryConfig as Tr, RivusEnvFileVariables as Ts, RIVUS_MEMORY_TOOL_ID as Tt, HumanInteractionService as Tu, SubagentCoordinator as U, InvalidRivusProjectSpace as Ua, AgentInstanceBusy as Uc, createFeishuEventHandlers as Ui, FeishuResolveInteractionCommand as Ul, createFeishuCardKitOpenApiTargetCreator as Un, activeCardPresentation as Uo, FeishuOpenApiError as Ur, DefaultAgentHarnessFromTextCallbackOptions as Us, openJsonlBackgroundSessionRepository as Ut, HumanInteractionTransition as Uu, RivusPluginModule as V, validateProjectSkillCatalog as Va, AgentInstanceRegistry as Vc, FeishuReceiveMessageHandlerPayload as Vi, FeishuCardActionIntakeError as Vl, FeishuCardTargetPreparationOptions as Vn, CardPresentationTransitionDenied as Vo, ConfiguredFeishuOpenApiResponse as Vr, DefaultAgentHarnessClientOptions as Vs, BACKGROUND_SESSION_JSONL_VERSION as Vt, HumanInteractionId as Vu, createSubagentCoordinator as W, ResolvedRivusProjectSpace as Wa, AgentRuntimeDisposed as Wc, FeishuCardActionCallbackResponse as Wi, InvalidFeishuCardAction as Wl, createFeishuCardTargetPreparation as Wn, isCardPresentationHandoffDue as Wo, FeishuOpenApiRequest as Wr, DefaultAgentHarnessOptions as Ws, CreateBackgroundSessionHostToolsOptions as Wt, PendingHumanInteractionState as Wu, DelegationGrant as X, WorkspaceInstructionsRequest as Xa, JsonlFeishuInboxRepositoryOptions as Xc, RivusDaemonBootstrapFactory as Xi, FeishuMessageIntakeBaseSummary as Xl, FeishuTopicContextResolverOptions as Xn, RivusDaemonWorkerLoop as Xo, FeishuTenantAccessTokenProviderOptions as Xr, createDefaultAgentHarness as Xs, AgentMemoryHandle as Xt, UserDecisionInteraction as Xu, SubagentRecord as Y, WorkspaceInstructionsDiagnosticCode as Ya, openJsonFeishuSessionStore as Yc, RivusDaemonBootstrapContext as Yi, FeishuCancelRunCommand as Yl, createFeishuCotPublisher as Yn, RivusDaemonTransport as Yo, FeishuTenantAccessTokenProvider as Yr, createAgentRuntime as Ys, createAgentMemoryService as Yt, ToolApprovalInteractionState as Yu, DelegationRequest as Z, WorkspaceInstructionsSourceError as Za, openJsonlFeishuInboxRepository as Zc, RivusDaemonBootstrapModule as Zi, FeishuMessageIntakeError as Zl, InvalidFeishuTopicContext as Zn, createRivusDaemonProcess as Zo, FeishuTenantAccessTokenRequest as Zr, createDefaultAgentHarnessClient as Zs, AgentMemoryService as Zt, UserDecisionInteractionState as Zu, createConfiguredFeishuMessageReactionSender as _, RivusDeploymentDaemonLifecycleError as _a, createAgentDomainEventHandler as _c, RUN_PRESENTATION_SCHEMA_VERSION as _d, FeishuCardKitTextUpdate as _i, InvalidRecoveryAction as _l, createToolBroker as _n, RivusDaemonShutdownSignal as _o, OpenTelemetryAgentEventSinkOptions as _r, FeishuMessageQueueOptions as _s, CompactorPort as _t, InvalidFeishuSessionReference as _u, FEISHU_AGENT_CARD_ELEMENT_ID as a, RivusDeploymentBootstrapContext as aa, createSystemClock as ac, FeishuCardDeliveryRecord as ad, FeishuCardTargetRegistryOperation as ai, FeishuInboxDeliveryState as al, createFeishuPresentationPreparation as an, failBackgroundSessionStep as ao, createRunPresentationProjector as ar, FeishuMessageWorkerDrainAvailableResult as as, PluginStateConflict as at, describeFeishuMessageIntake as au, HumanInteractionEndpointRegistry as b, RivusDeploymentEndpointStatus as ba, AgentHarnessOptions as bc, RunPresentationPhase as bd, FeishuWebSocketClient as bi, FeishuAgentDaemon as bl, createWorkspaceRootHandle as bn, RivusDaemonStatusHttpServer as bo, createOpenTelemetryAgentTelemetry as br, MergePiProviderBaseUrlOverrideOptions as bs, createAgentLoopPromptTransformer as bt, FeishuReceiveMessagePayload as bu, createFeishuAgentRunCard as c, createRivusDeploymentCliProcess as ca, AgentClientFailure as cc, FeishuStreamAction as cd, createInMemoryFeishuCardTargetRegistry as ci, FeishuInboxRepository as cl, createAgentHarnessPooledRuntime as cn, parkBackgroundSessionForReconciliation as co, createPiSessionRegistry as cr, FeishuReceiveMessageReplayOptions as cs, openJsonAutomationTickRepository as ct, UnsupportedFeishuMessage as cu, createJsonlHumanInteractionRepository as d, RivusDeploymentAutomationReadinessError as da, AgentSessionClient as dc, ConversationProgressDisplay as dd, FeishuCardKitClient as di, DeadLetterRecoveryItem as dl, openJsonlToolOperationLedger as dn, requestBackgroundSessionStop as do, createPiAgentLoop as dr, FeishuReceiveRuntimeStatus as ds, ScheduledAutomation as dt, FeishuSessionResetResult as du, RivusDaemonFeishuReplayRunner as ea, createDefaultAgentHarnessFromCallback as ec, openJsonlFeishuCardDeliveryLedger as ed, FeishuCardRolloverSupervisor as ei, ToolOperationLedger as el, RivusAgentHostOptions as en, appendBackgroundSessionInput as eo, createFeishuCardKitOpenApiClient as er, createFeishuWorkerLoop as es, CommitAutomationOutcomeInput as et, FeishuNewSessionCommand as eu, createInMemoryHumanInteractionRepository as f, RivusDeploymentAutomationStatus as fa, AgentTextDeltaCallback as fc, DEFAULT_CONVERSATION_PROGRESS_DISPLAY as fd, FeishuCardKitFail as fi, DeadLetterRequeueResult as fl, AuthorizationPolicyProvider as fn, requeueInterruptedBackgroundSessionStep as fo, createPiSdkAgentLoop as fr, FeishuEndpointGroupPolicy as fs, ScheduledAutomationClock as ft, FeishuSessionStore as fu, FeishuMessageReactionSender as g, RivusDeploymentDaemonLifecycle as ga, AgentRunUpdateCallback as gc, PresentationStepStatus as gd, FeishuCardKitPublisherOptions as gi, ToolOperationResolutionResult as gl, ToolExecutionRequest as gn, RivusDaemonShutdownControllerOptions as go, PiSdkAgentLoopOptions as gr, FeishuMessageQueue as gs, CompactionService as gt, FeishuSessionReference as gu, createConfiguredFeishuAutomationCardSender as h, RivusDeploymentBackgroundSessionStatus as ha, AgentDomainEventSinkCallback as hc, PresentationStep as hd, FeishuCardKitPublisher as hi, ToolOperationRecoveryItem as hl, ToolBrokerOptions as hn, RivusDaemonShutdownController as ho, PiCreateAgentSessionResult as hr, FeishuMessagePreparedControl as hs, createAutomationMandateStore as ht, FeishuConversationReference as hu, createFeishuHumanInteractionPresenter as i, RivusDeploymentBootstrapAdapters as ia, createDefaultAgentRuntimeFromTextCallback as ic, FeishuCardDeliveryReconcilerOptions as id, FeishuCardTargetRegistry as ii, FeishuInboxDelivery as il, FeishuPresentationPreparationOptions as in, createBackgroundSession as io, RunPresentationProjector as ir, createFeishuMessageWorker as is, createDeliveryOutbox as it, createAgentCommandFromFeishuMessage as iu, CreateRivusDeploymentDaemonOptions as j, RivusAutomationDeployment as ja, SessionSchedulerOptions as jc, JsonlAgentEventLogOptions as ji, FeishuAgentExecutionResult as jl, FeishuCoalescingPublisher as jn, FeishuCardRolloverHandoffResult as jo, ConfiguredRivusDaemonBootstrap as jr, RivusDaemonConfig as js, createRivusMemoryTool as jt, HumanInteractionPresenter as ju, CreateRivusDeploymentAutomationInput as k, RivusAutomationDelivery as ka, SessionSchedulerCapacityExceeded as kc, AgentEventLogOperation as ki, FeishuAgentDaemonSteeredResult as kl, ConfiguredFeishuCardKitPublisherOptions as kn, FeishuCardRolloverEvent as ko, createLangfuseAgentTelemetry as kr, FeishuEndpointCredentials as ks, MemoryTombstoneReceipt as kt, HumanInteractionRepository as ku, createFeishuHumanInteractionCard as l, ProcessDeploymentEndpoint as la, AgentClientSuccess as lc, FeishuStreamProjector as ld, createJsonFileFeishuCardTargetRegistry as li, FeishuInboxRepositoryStateOptions as ll, JsonlRecoveryControlOptions as ln, releaseBackgroundSessionLease as lo, PiAgentLoopOptions as lr, FeishuReceiveMessageReplayResult as ls, OpenJsonAutomationTickRepositoryOptions as lt, readFeishuMessageContent as lu, FeishuAutomationCardSender as m, RivusDeploymentBackgroundSessionReadinessError as ma, AgentDomainEventCallback as mc, ModelPresentationStep as md, FeishuCardKitPresentationUpdate as mi, RecoverySnapshot as ml, ToolBroker as mn, suspendBackgroundSession as mo, PiAgentSessionEvent as mr, FeishuMessageDrainResult as ms, createScheduledAutomation as mt, createFeishuSessionStore as mu, createConfiguredFeishuHumanInteractionPresenter as n, RivusDaemonRecoveryRunner as na, createDefaultAgentRuntime as nc, FeishuCardDeliveryLedgerStateOptions as nd, createFeishuCardRolloverSupervisor as ni, FeishuInboxCompletedState as nl, RivusEndpointInput$1 as nn, completeBackgroundSessionStep as no, FeishuCardPresentationStoreOptions as nr, FeishuMessageWorkerOptions as ns, DeliveryOutbox as nt, FeishuPromptAgentCommand as nu, FEISHU_AGENT_CARD_PROGRESS_ELEMENT_ID as o, RivusDeploymentBootstrapFactory as oa, createUuidRunIds as oc, createFeishuCardDeliveryLedger as od, FeishuCardTargetRegistryStoreError as oi, FeishuInboxLeasedState as ol, FeishuDeploymentEndpointOptions as on, isBackgroundSessionDue as oo, PiSessionRegistry as or, FeishuReceiveAcceptedObservation as os, PluginStateStore as ot, FeishuMessageContentInput as ou, FeishuAutomationCardInput as p, RivusDeploymentBackgroundSessionLifecycle as pa, createAgentHarnessClient as pc, AssistantPresentationStep as pd, FeishuCardKitFinish as pi, RecoveryControl as pl, ToolApprovalService as pn, resolveBackgroundSessionReconciliation as po, PiAgentSession as pr, shouldAcceptFeishuEndpointMessage as ps, ScheduledAutomationOptions as pt, FeishuSessionStoreOptions as pu, intersectToolIds as q, WorkspaceInstructionSource as qa, AgentInstanceRecord as qc, createFeishuCardActionErrorResponse as qi, FeishuAgentCommand as ql, FeishuCotPublisherOptions as qn, RivusDaemonProcess as qo, createFeishuOpenApiClient as qr, DefaultAgentRuntimeOptions as qs, createBackgroundSessionRepository as qt, ToolApprovalBinding as qu, FeishuHumanInteractionPresenterOptions as r, runRivusDaemonCli as ra, createDefaultAgentRuntimeFromCallback as rc, FeishuCardDeliveryReconciler as rd, FeishuCardTargetNotFound as ri, FeishuInboxDeadState as rl, createRivusAgentHost as rn, completeBackgroundSessionStop as ro, createFeishuCardPresentationStore as rr, FeishuMessageWorkerQueue as rs, DeliveryOutboxError as rt, FeishuPromptMessageIntakeSummary as ru, FeishuAgentRunCardInput as s, RivusDeploymentCliProcess as sa, AgentClientAttempt as sc, createFeishuCardDeliveryReconciler as sd, JsonFileFeishuCardTargetRegistryOptions as si, FeishuInboxPendingState as sl, createFeishuDeploymentEndpoint as sn, isBackgroundSessionLeaseExpired as so, PiSessionRegistryOptions as sr, FeishuReceiveHandledObservation as ss, createPluginStateStore as st, InvalidFeishuMessageContent as su, ConfiguredFeishuHumanInteractionPresenterOptions as t, RivusDaemonPromptRunner as ta, createDefaultAgentHarnessFromTextCallback as tc, FeishuCardDeliveryLedger as td, FeishuCardRolloverSupervisorOptions as ti, createToolOperationLedger as tl, RivusEndpointDefinition as tn, claimBackgroundSession as to, FeishuCardPresentationNotFound as tr, FeishuMessageWorker as ts, commitAutomationOutcome as tt, FeishuNewSessionMessageIntakeSummary as tu, JsonlHumanInteractionRepositoryOptions as u, RivusDeploymentAutomationLifecycle as ua, AgentHarnessClient as uc, createFeishuStreamProjector as ud, FeishuCardKitCancel as ui, createFeishuInboxRepository as ul, openJsonlRecoveryControl as un, renewBackgroundSessionLease as uo, PiAgentSessionHandle as ur, FeishuReceiveMessageSummary as us, AutomationTickRepositoryCompatibility as ut, FeishuSessionEpochRecord as uu, FeishuTextReplySender as v, RivusDeploymentDaemonStatus as va, createAgentDomainEventSinkFromCallback as vc, ResponsePresentationStep as vd, FeishuCardTarget as vi, RecoveryAction as vl, WorkspaceInstructionsProvider as vn, RivusDaemonSignalSource as vo, OpenTelemetryAgentTelemetry as vr, createFeishuMessageQueue as vs, createCompactionService as vt, createFeishuConversationId as vu, CreateConfiguredRivusDeploymentDaemonOptions as w, ResolvedRivusAutomationDefinition as wa, JsonFetchRequestOptions as wc, PresentedValue as wd, FeishuWebSocketEventDispatcher as wi, FeishuAgentDaemonInteractionResult as wl, createSequenceRunIds as wn, RivusDaemonStatusReporter as wo, LangfuseAgentTelemetry as wr, OpenClawEnvImportResult as ws, createProjectMemoryPromptPreparer as wt, HumanInteractionClock as wu, createHumanInteractionEndpointRegistry as x, RivusDeploymentReadinessError as xa, createAgentHarness as xc, SkillPresentationStep as xd, FeishuWebSocketClientStartOptions as xi, FeishuAgentDaemonCancelResult as xl, resolveRivusProjectSpace as xn, RivusDaemonStatusHttpServerOptions as xo, TelemetryContentRedactor as xr, mergePiProviderBaseUrlOverride as xs, ProjectMemoryPromptInput as xt, HumanInteractionTransitionDenied as xu, createConfiguredFeishuTextReplySender as y, RivusDeploymentEndpointLifecycle as ya, createAgentRunUpdateHandler as yc, RunPresentation as yd, createFeishuCardKitPublisher as yi, createRecoveryAction as yl, createAgentsMdInstructionsProvider as yn, createRivusDaemonShutdownController as yo, createOpenTelemetryAgentEventSink as yr, FeishuMessageAcceptResult as ys, openJsonlAgentMemoryService as yt, createFeishuSessionKey as yu, loadNodeRivusPluginModule as z, ProjectSkillCatalogDiagnostic as za, PooledAgentRuntime as zc, FeishuEventHandlers as zi, FeishuAgentRunPreparation as zl, FeishuCardTargetCreateOptions as zn, CardPresentationChain as zo, createConfiguredFeishuCardRolloverRuntime as zr, DefaultAgentHarnessClientFromCallbackOptions as zs, BACKGROUND_SESSION_DELIVERY_JSONL_VERSION as zt, HumanInteractionBase as zu };
4325
+ export { UserDecisionInteractionState as $, ConfiguredRivusDaemonBootstrap as $a, CardPresentationChain as $c, FeishuAgentMessageSideEffects as $d, FeishuStreamProjector as $f, FeishuCardKitOpenApiTargetCreatorOptions as $i, DefaultAgentHarnessClientFromCallbackOptions as $l, DEFAULT_BACKGROUND_SESSION_SUPERVISOR_INTERVAL_MS as $n, JsonlAgentEventLogOptions as $o, RivusEndpointInput$1 as $r, isBackgroundSessionToolId as $s, ScheduledAutomationOptions as $t, PooledAgentRuntime as $u, HumanInteractionRepository as A, PiAgentSessionEvent as Aa, RivusDaemonShutdownControllerOptions as Ac, FeishuInboxPendingState as Ad, readFeishuMessageContent as Af, WorkspaceInstructionsSourceError as Ai, FeishuMessageQueue as Al, RIVUS_MEMORY_TOOL_ID as An, createInMemoryFeishuCardTargetRegistry as Ao, AgentSessionAvailability as Ap, requestBackgroundSessionStop as Ar, RivusDeploymentBootstrapContext as As, DelegationGrant as At, AgentRunUpdateCallback as Au, HumanInteractionFact as B, TelemetryContentRedactor as Ba, createRivusDaemonStatusReporter as Bc, ToolOperationResolutionResult as Bd, createFeishuSessionKey as Bf, createSequenceRunIds as Bi, createRivusEnvFromOpenClawConfig as Bl, FeishuBackgroundSessionDelivery as Bn, FeishuCardTarget as Bo, AgentHarnessBusy as Bp, AgentMemorySnapshot as Br, RivusDeploymentDaemonLifecycle as Bs, AutomationOutcome as Bt, JsonHttpResponse as Bu, createHumanInteractionEndpointRegistry as C, PiSessionRegistryOptions as Ca, AutomationBinding as Cc, ToolOperationState as Cd, FeishuPromptAgentCommand as Cf, InvalidStableJson as Ci, FeishuReceiveMessageReplayResult as Cl, InvalidRivusProjectSpace as Cn, FeishuCardRolloverSupervisorOptions as Co, AgentHarnessError as Cp, failBackgroundSessionStep as Cr, RivusDaemonCliOptions as Cs, SpawnSubagentRequest as Ct, AgentClientSuccess as Cu, HumanInteractionServiceOptions as D, createPiAgentLoop as Da, AutomationMandateStore as Dc, FeishuInboxDelivery as Dd, FeishuMessageContentInput as Df, createAgentsMdInstructionsProvider as Di, shouldAcceptFeishuEndpointMessage as Dl, ProjectMemoryRecallIdentity as Dn, FeishuCardTargetRegistryOperation as Do, AgentRunUpdate as Dp, parkBackgroundSessionForReconciliation as Dr, RivusDaemonRecoveryRunner as Ds, intersectToolIds as Dt, createAgentHarnessClient as Du, HumanInteractionService as E, PiAgentSessionHandle as Ea, AutomationMandateError as Ec, FeishuInboxDeadState as Ed, describeFeishuMessageIntake as Ef, WorkspaceInstructionsProvider as Ei, FeishuEndpointGroupPolicy as El, ProjectMemoryPromptInput as En, FeishuCardTargetRegistry as Eo, AgentRunSnapshot as Ep, isBackgroundSessionTerminalPhase as Er, RivusDaemonPromptRunner as Es, createDelegationService as Et, AgentTextDeltaCallback as Eu, CancelledHumanInteractionState as F, isTerminalAgentRunPhase as Fa, RivusDaemonStatusHttpServerOptions as Fc, DeadLetterRequeueResult as Fd, createFeishuSessionStore as Ff, WorkspaceInstructionsView as Fi, mergePiProviderBaseUrlOverride as Fl, RivusMemoryTool as Fn, FeishuCardKitFinish as Fo, AgentSessionSnapshot as Fp, createAgentMemoryService as Fr, RivusDeploymentAutomationReadinessError as Fs, DeliveryOutboxError as Ft, createAgentHarness as Fu, RejectedHumanInteractionState as G, LangfuseTelemetryConfigError as Ga, FeishuCardRolloverHandoffResult as Gc, FeishuAgentDaemonInteractionResult as Gd, FeishuCardDeliveryLedger as Gf, ConfiguredFeishuCardKitPublisherOptions as Gi, RivusDaemonConfig as Gl, resolveFeishuDeliveryChatId as Gn, FeishuWebSocketDaemonOptions as Go, MemoryScope as Gr, RivusDeploymentComponentLifecycle as Gs, PutPluginState as Gt, SessionSchedulerOptions as Gu, HumanInteractionResolutionAction as H, createTelemetryContentRedactor as Ha, FeishuCardRolloverCounters as Hc, FeishuAgentDaemonCancelResult as Hd, HumanInteractionRepositoryError as Hf, FeishuPeriodicFlush as Hi, FeishuEndpointCredentialError as Hl, FeishuBackgroundSessionDeliveryKind as Hn, FeishuWebSocketClient as Ho, AgentRunCancelled as Hp, MemoryBinding as Hr, RivusDeploymentEndpointLifecycle as Hs, DeliveryJob as Ht, SessionScheduler as Hu, ExpiredHumanInteractionState as I, OpenTelemetryAgentEventSinkOptions as Ia, createRivusDaemonStatusHttpServer as Ic, RecoveryAction as Id, FeishuConversationReference as If, WorkspaceRootHandle as Ii, OpenClawEnvImportError as Il, createRivusMemoryTool as In, FeishuCardKitPresentationUpdate as Io, PromptCommand as Ip, AgentMemoryAuthority as Ir, RivusDeploymentAutomationStatus as Is, createDeliveryOutbox as It, FetchLike as Iu, SelectedHumanInteractionState as J, createLangfuseAgentTelemetry as Ja, createFeishuCardRollover as Jc, FeishuAgentDaemonSessionResetResult as Jd, FeishuCardDeliveryReconcilerOptions as Jf, FeishuCoalescingPublisherOptions as Ji, RivusDaemonEnv as Jl, DEFAULT_BACKGROUND_SESSION_LIFETIME_MS as Jn, createFeishuWebSocketDaemon as Jo, AgentMemoryError as Jr, BACKGROUND_SESSION_TOOL_IDS as Js, DailyAutomationSchedule as Jt, AgentRuntimeCancellation as Ju, RequestToolApprovalInput as K, LangfuseTelemetryContentMode as Ka, FeishuCardRolloverOptions as Kc, FeishuAgentDaemonOptions as Kd, FeishuCardDeliveryLedgerStateOptions as Kf, createConfiguredFeishuCardKitPublisher as Ki, RivusDaemonConfigError as Kl, DEFAULT_BACKGROUND_SESSION_LEASE_MS as Kn, FeishuWebSocketEventDispatcher as Ko, MemorySearchQuery as Kr, RivusDeploymentDaemonLifecycleError as Ks, OpenJsonAutomationTickRepositoryOptions as Kt, SessionSchedulerStatus as Ku, HumanInteraction as L, OpenTelemetryAgentTelemetry as La, RivusDaemonStatus as Lc, RecoveryControl as Ld, FeishuSessionReference as Lf, createRivusPluginCatalog as Li, OpenClawEnvImportOptions as Ll, createRivusMemoryToolDescriptor as Ln, FeishuCardKitPublisher as Lo, RunIdGenerator as Lp, AgentMemoryHandle as Lr, RivusDeploymentBackgroundSessionLifecycle as Ls, PluginStateConflict as Lt, FetchLikeResponse as Lu, HumanInteractionTransitionDenied as M, PiSdkAgentLoopOptions as Ma, RivusDaemonSignalSource as Mc, FeishuInboxRepositoryStateOptions as Md, FeishuSessionResetResult as Mf, WorkspaceInstructionsDiagnostic as Mi, createFeishuMessageQueue as Ml, RIVUS_MEMORY_TOOL_VERSION as Mn, FeishuCardKitCancel as Mo, AgentSessionHandle as Mp, resolveBackgroundSessionReconciliation as Mr, RivusDeploymentCliProcess as Ms, CommitAutomationOutcomeInput as Mt, createAgentDomainEventSinkFromCallback as Mu, transitionHumanInteraction as N, evolveAgentRun as Na, createRivusDaemonShutdownController as Nc, createFeishuInboxRepository as Nd, FeishuSessionStore as Nf, WorkspaceInstructionsDiagnosticCode as Ni, FeishuMessageAcceptResult as Nl, createRivusMemoryToolContract as Nn, FeishuCardKitClient as No, AgentSessionOtherBusyAvailability as Np, suspendBackgroundSession as Nr, createRivusDeploymentCliProcess as Ns, commitAutomationOutcome as Nt, createAgentRunUpdateHandler as Nu, ResolveHumanInteractionInput as O, createPiSdkAgentLoop as Oa, AutomationTick as Oc, FeishuInboxDeliveryState as Od, InvalidFeishuMessageContent as Of, createWorkspaceRootHandle as Oi, FeishuMessageDrainResult as Ol, ProjectMemoryRecallOptions as On, FeishuCardTargetRegistryStoreError as Oo, AgentRunUpdateHandler as Op, releaseBackgroundSessionLease as Or, runRivusDaemonCli as Os, DelegationDenied as Ot, AgentDomainEventCallback as Ou, ApprovedHumanInteractionState as P, initialAgentRunState as Pa, RivusDaemonStatusHttpServer as Pc, DeadLetterRecoveryItem as Pd, FeishuSessionStoreOptions as Pf, WorkspaceInstructionsRequest as Pi, MergePiProviderBaseUrlOverrideOptions as Pl, MemoryTombstoneReceipt as Pn, FeishuCardKitFail as Po, AgentSessionOwnedBusyAvailability as Pp, AgentMemoryServiceOptions as Pr, RivusDeploymentAutomationLifecycle as Ps, DeliveryOutbox as Pt, AgentHarnessOptions as Pu, UserDecisionInteraction as Q, AgentModelOutputObservation as Qa, CardPresentation as Qc, FeishuAgentExecutionResult as Qd, FeishuStreamAction as Qf, createRateLimitedFeishuPublisher as Qi, AgentRuntime as Ql, DEFAULT_BACKGROUND_SESSION_STEP_TIMEOUT_MS as Qn, AgentEventLogStoreError as Qo, RivusEndpointDefinition as Qr, createBackgroundSessionToolContracts as Qs, ScheduledAutomationClock as Qt, AgentRuntimeSteering as Qu, HumanInteractionActor as R, createOpenTelemetryAgentEventSink as Ra, RivusDaemonStatusReporter as Rc, RecoverySnapshot as Rd, InvalidFeishuSessionReference as Rf, resolveRivusAgentDefinition as Ri, OpenClawEnvImportResult as Rl, createMemoryNamespace as Rn, FeishuCardKitPublisherOptions as Ro, AgentEventHandlerFailed as Rp, AgentMemoryIdentity as Rr, RivusDeploymentBackgroundSessionReadinessError as Rs, PluginStateStore as Rt, JsonFetchRequestOptions as Ru, HumanInteractionEndpointRegistry as S, PiSessionRegistry as Sa, ScheduledAutomationRunResult as Sc, ToolOperationRecord as Sd, FeishuNewSessionMessageIntakeSummary as Sf, requiresToolApproval as Si, FeishuReceiveMessageReplayOptions as Sl, resolveRivusProjectSpace as Sn, FeishuCardRolloverSupervisor as So, AgentHarnessBusyAvailability as Sp, createBackgroundSession as Sr, RivusDaemonBootstrapModule as Ss, createSubagentCoordinator as St, AgentClientFailure as Su, HumanInteractionClock as T, PiAgentLoopOptions as Ta, AutomationMandate as Tc, FeishuInboxCompletedState as Td, createAgentCommandFromFeishuMessage as Tf, normalizeStableJson as Ti, FeishuReceiveRuntimeStatus as Tl, createAgentLoopPromptTransformer as Tn, FeishuCardTargetNotFound as To, AgentPromptResult as Tp, isBackgroundSessionLeaseExpired as Tr, RivusDaemonFeishuReplayRunner as Ts, DelegationService as Tt, AgentSessionClient as Tu, HumanInteractionTransition as U, LangfuseAgentTelemetry as Ua, FeishuCardRolloverEvent as Uc, FeishuAgentDaemonHandleMessageOptions as Ud, JsonlFeishuCardDeliveryLedgerOptions as Uf, FeishuPeriodicFlushOptions as Ui, FeishuEndpointCredentials as Ul, createBackgroundSessionCard as Un, FeishuWebSocketClientStartOptions as Uo, ConversationProgressDisplay as Up, MemoryInvocationAudience as Ur, RivusDeploymentEndpointStatus as Us, DeliveryJobStatus as Ut, SessionSchedulerCapacityExceeded as Uu, HumanInteractionId as V, TelemetryContentRedactorOptions as Va, FeishuCardRollover as Vc, FeishuAgentDaemon as Vd, FeishuReceiveMessagePayload as Vf, createTestClock as Vi, formatRivusEnvFile as Vl, FeishuBackgroundSessionDeliveryInput as Vn, createFeishuCardKitPublisher as Vo, AgentLoopFailed as Vp, MEMORY_SCOPES as Vr, RivusDeploymentDaemonStatus as Vs, CommittedAutomationOutcome as Vt, createJsonFetchRequest as Vu, PendingHumanInteractionState as W, LangfuseTelemetryConfig as Wa, FeishuCardRolloverEventType as Wc, FeishuAgentDaemonHandleResult as Wd, openJsonlFeishuCardDeliveryLedger as Wf, createFeishuPeriodicFlush as Wi, resolveFeishuEndpointCredentials as Wl, createConfiguredFeishuBackgroundSessionDelivery as Wn, FeishuWebSocketDaemon as Wo, DEFAULT_CONVERSATION_PROGRESS_DISPLAY as Wp, MemoryRecord as Wr, RivusDeploymentReadinessError as Ws, PluginStateRecord as Wt, SessionSchedulerDisposed as Wu, ToolApprovalInteraction as X, AgentModelContentObserver as Xa, FeishuCardPresentationHandoffStart as Xc, FeishuAgentDaemonSteeredResult as Xd, createFeishuCardDeliveryLedger as Xf, FeishuStreamActionPublisher as Xi, RivusThinkingLevel as Xl, DEFAULT_BACKGROUND_SESSION_MAX_CONSECUTIVE_FAILURES as Xn, AgentEventLog as Xo, RivusAgentHost as Xr, BACKGROUND_SESSION_TOOL_VERSION as Xs, AutomationTickRepositoryCompatibility as Xt, AgentRuntimePool as Xu, ToolApprovalBinding as Y, resolveLangfuseTelemetryConfig as Ya, DEFAULT_CARD_STREAM_LEASE_MS as Yc, FeishuAgentDaemonSkippedResult as Yd, FeishuCardDeliveryRecord as Yf, createCoalescingFeishuPublisher as Yi, RivusTextFileReader as Yl, DEFAULT_BACKGROUND_SESSION_MAX_CONCURRENT_SESSIONS as Yn, createLazyFeishuWebSocketEventDispatcher as Yo, InvalidRivusEndpointBinding as Yr, BACKGROUND_SESSION_TOOL_PLUGIN_ID as Ys, createDailyAutomationSchedule as Yt, AgentRuntimeInput as Yu, ToolApprovalInteractionState as Z, AgentModelInputObservation as Za, FeishuCardPresentationStore as Zc, FeishuAgentExecution as Zd, createFeishuCardDeliveryReconciler as Zf, RateLimitedFeishuPublisherOptions as Zi, loadRivusDaemonConfig as Zl, DEFAULT_BACKGROUND_SESSION_RETRY_BACKOFF_MS as Zn, AgentEventLogOperation as Zo, RivusAgentHostOptions as Zr, backgroundSessionToolIds as Zs, ScheduledAutomation as Zt, AgentRuntimePoolOptions as Zu, createConfiguredFeishuMessageReactionSender as _, FeishuCardPresentationNotFound as _a, BackgroundSessionSupervisor as _c, ToolOperationBinding as _d, FeishuMessageIntakeBaseSummary as _f, ToolInvocationDenied as _i, FeishuMessageWorkerQueue as _l, InvalidProjectSkillCatalog as _n, FeishuTenantAccessTokenProvider as _o, AgentDomainEventHandler as _p, BackgroundSessionTransitionDenied as _r, createFeishuCardActionCallbackResponse as _s, LoadRivusDeploymentOptions as _t, createDefaultAgentRuntimeFromCallback as _u, ConfiguredFeishuHumanInteractionPresenterOptions as a, createFeishuCardKitOpenApiTargetCreator as aa, RivusPluginLoadStatus as ac, AgentInstanceBusy as ad, composeFeishuTopicPrompt as af, createAgentHarnessPooledRuntime as ai, CompositeRivusDaemonTransportOptions as al, CompactorPort as an, ConfiguredFeishuCardRolloverRuntime as ao, RUN_PRESENTATION_SCHEMA_VERSION as ap, BackgroundSessionSupervisorOptions as ar, FeishuAgentRuntimeOptions as as, RivusDeploymentManifestError as at, DefaultAgentRuntimeFromCallbackOptions as au, createRoutedHumanInteractionToolApprovalService as b, RunPresentationProjector as ba, ScheduledAutomationDeliveryInput as bc, ToolOperationReconciliation as bd, FeishuMessageIntakeSummary as bf, createInvocationAuthority as bi, FeishuReceiveAcceptedObservation as bl, validateProjectSkillCatalog as bn, FeishuTenantAccessTokenResponse as bo, AgentHarness as bp, completeBackgroundSessionStep as br, RivusDaemonBootstrapContext as bs, RivusPluginLoadError as bt, createUuidRunIds as bu, createFeishuHumanInteractionCard as c, FeishuCotPublisher as ca, RivusAutomationDeliveryTargetType as cc, OpenJsonFeishuSessionStoreOptions as cd, FeishuCardActionIntakeError as cf, openJsonlToolOperationLedger as ci, RivusDaemonProcessOptions as cl, CompactionSnapshot as cn, ConfiguredFeishuOpenApiRequest as co, RunPresentationPhase as cp, openJsonlBackgroundSessionRepository as cr, FeishuEventHandlerCardActions as cs, CreateRivusDeploymentBackgroundSessionInput as ct, DefaultAgentRuntimeSessionOptions as cu, createJsonlHumanInteractionRepository as d, createFeishuCotPublisher as da, RivusDeploymentManifest as dc, openJsonlFeishuInboxRepository as dd, InvalidFeishuCardAction as df, ToolApprovalRequest as di, createRivusDaemonProcess as dl, AgentContextInput as dn, FeishuOpenApiError as do, hasInspectableRunProgress as dp, createBackgroundSessionDeliveryStore as dr, FeishuEventHandlersOptions as ds, CreateRivusDeploymentRuntimeInput as dt, createDefaultAgentHarnessClient as du, FeishuCardPresentationBinder as ea, ProcessDeploymentEndpoint as ec, createAgentRuntimePool as ed, FeishuAgentPreparedControl as ef, createRivusAgentHost as ei, CardPresentationStatus as el, createScheduledAutomation as en, ConfiguredRivusDaemonBootstrapOptions as eo, createFeishuStreamProjector as ep, resolveBackgroundSessionSupervisorIntervalMs as er, createJsonlAgentEventLog as es, UserDecisionOption as et, DefaultAgentHarnessClientFromTextCallbackOptions as eu, JsonlHumanInteractionRepositoryOptions as f, FeishuTopicContextResolverOptions as fa, RivusEndpointDeployment as fc, InvalidRecoveryAction as fd, UnsupportedFeishuCardAction as ff, ToolApprovalService as fi, FeishuWorkerLoop as fl, AgentContextLayer as fn, FeishuOpenApiRequest as fo, PresentedValue as fp, BACKGROUND_SESSION_JSONL_VERSION as fr, FeishuReceiveMessageHandlerPayload as fs, RivusDeploymentAutomation as ft, createDefaultAgentHarnessClientFromCallback as fu, FeishuMessageReactionSender as g, createFeishuCardKitOpenApiClient as ga, BackgroundSessionLimits as gc, ToolOperationBeginResult as gd, FeishuCancelRunCommand as gf, createToolBroker as gi, FeishuMessageWorkerOptions as gl, openJsonlAgentMemoryService as gn, FeishuTenantAccessTokenError as go, AgentClock as gp, BackgroundSessionState as gr, FeishuCardActionToast as gs, loadNodeRivusPluginModule as gt, createDefaultAgentRuntime as gu, createConfiguredFeishuAutomationCardSender as h, FeishuCardKitOpenApiClientOptions as ha, RivusProjectSpaceDeployment as hc, createRecoveryControl as hd, FeishuCancelMessageIntakeSummary as hf, ToolExecutionRequest as hi, FeishuMessageWorker as hl, assembleAgentContext as hn, createFeishuOpenApiClient as ho, ActiveAgentRun as hp, BackgroundSessionRepository as hr, FeishuCardActionCallbackResponse as hs, RivusDeploymentEndpoint as ht, createDefaultAgentHarnessFromTextCallback as hu, createFeishuAgentRunCard as i, createConfiguredFeishuCardKitTargetCreator as ia, RivusAgentDeploymentStatus as ic, AgentInstanceRegistryOptions as id, FeishuPromptContextResolver as if, createFeishuDeploymentEndpoint as ii, isCardPresentationHandoffDue as il, CompactionService as in, restoreConfiguredRivusDaemonBootstrap as io, PresentationStepStatus as ip, createBackgroundSessionHostTools as ir, FeishuAgentRuntime as is, LoadRivusDeploymentManifestOptions as it, DefaultAgentHarnessOptions as iu, HumanInteractionPresenter as j, PiCreateAgentSessionResult as ja, RivusDaemonShutdownSignal as jc, FeishuInboxRepository as jd, FeishuSessionEpochRecord as jf, WorkspaceInstructionSource as ji, FeishuMessageQueueOptions as jl, RIVUS_MEMORY_TOOL_PLUGIN_ID as jn, createJsonFileFeishuCardTargetRegistry as jo, AgentSessionBusyAvailability as jp, requeueInterruptedBackgroundSessionStep as jr, RivusDeploymentBootstrapFactory as js, DelegationRequest as jt, createAgentDomainEventHandler as ju, createHumanInteractionService as k, PiAgentSession as ka, RivusDaemonShutdownController as kc, FeishuInboxLeasedState as kd, UnsupportedFeishuMessage as kf, InvalidWorkspaceRoot as ki, FeishuMessagePreparedControl as kl, createProjectMemoryPromptPreparer as kn, JsonFileFeishuCardTargetRegistryOptions as ko, AgentRunUpdateListener as kp, renewBackgroundSessionLease as kr, RivusDeploymentBootstrapAdapters as ks, DelegationEdge as kt, AgentDomainEventSinkCallback as ku, createFeishuHumanInteractionPresenter as l, FeishuCotPublisherOptions as la, RivusAutomationDeployment as lc, openJsonFeishuSessionStore as ld, FeishuCardActionTriggerPayload as lf, AuthorizationPolicyProvider as li, RivusDaemonTransport as ll, CompactionInput as ln, ConfiguredFeishuOpenApiResponse as lo, SkillPresentationStep as lp, BACKGROUND_SESSION_DELIVERY_JSONL_VERSION as lr, FeishuEventHandlerQueue as ls, CreateRivusDeploymentDaemonOptions as lt, createAgentRuntime as lu, FeishuAutomationCardSender as m, createFeishuTopicContextResolver as ma, RivusPluginDeclaration as mc, RecoveryControlOptions as md, FeishuAgentCommand as mf, ToolBrokerOptions as mi, createFeishuWorkerLoop as ml, AssembledAgentContext as mn, createConfiguredFeishuOpenApiClient as mo, createPresentedValue as mp, createBackgroundSessionService as mr, createFeishuEventHandlers as ms, RivusDeploymentDaemon as mt, createDefaultAgentHarnessFromCallback as mu, FEISHU_AGENT_CARD_PROGRESS_ELEMENT_ID as n, FeishuCardTargetCreator as na, ResolvedRivusAutomationDefinition as nc, createAgentInstanceRegistry as nd, createFeishuAgentDaemon as nf, createFeishuPresentationPreparation as ni, acceptsCardPresentationProgress as nl, AutomationTickStatus as nn, ConfiguredRivusDaemonBootstrapResponse as no, ModelPresentationStep as np, narrowBackgroundSessionDefinition as nr, restoreAgentHistory as ns, createConfiguredRivusDeploymentDaemon as nt, DefaultAgentHarnessFromCallbackOptions as nu, FeishuHumanInteractionPresenterOptions as o, createFeishuCardTargetPreparation as oa, RivusPluginModuleLoadRequest as oc, AgentRuntimeDisposed as od, FeishuAgentRunPreparation as of, JsonlRecoveryControlOptions as oi, createCompositeRivusDaemonTransport as ol, createCompactionService as on, ConfiguredFeishuCardRolloverRuntimeOptions as oo, ResponsePresentationStep as op, createBackgroundSessionSupervisor as or, createFeishuAgentRuntime as os, createRivusDeploymentDaemon as ot, DefaultAgentRuntimeFromTextCallbackOptions as ou, FeishuAutomationCardInput as p, InvalidFeishuTopicContext as pa, RivusEndpointExperimentalFeatures as pc, createRecoveryAction as pd, createAgentCommandFromFeishuCardAction as pf, ToolBroker as pi, FeishuWorkerLoopOptions as pl, AgentContextLayerKind as pn, FeishuOpenApiResponse as po, PresentedValueOptions as pp, isBackgroundSessionState as pr, FeishuSdkReceiveMessagePayload as ps, RivusDeploymentBackgroundSession as pt, createDefaultAgentHarnessClientFromTextCallback as pu, RequestUserDecisionInput as q, LangfuseTelemetryEnv as qa, FeishuCardRolloverStatus as qc, FeishuAgentDaemonRunResult as qd, FeishuCardDeliveryReconciler as qf, FeishuCoalescingPublisher as qi, RivusDaemonConfigLoaderOptions as ql, DEFAULT_BACKGROUND_SESSION_LEASE_RENEWAL_INTERVAL_MS as qn, FeishuWebSocketRuntime as qo, MemoryState as qr, BACKGROUND_SESSION_START_TOOL_ID as qs, openJsonAutomationTickRepository as qt, createSessionScheduler as qu, FeishuAgentRunCardInput as r, FeishuCardTargetPreparationOptions as ra, ResolvedRivusProjectSpace as rc, AgentInstanceConflict as rd, FeishuPromptContextInput as rf, FeishuDeploymentEndpointOptions as ri, activeCardPresentation as rl, createAutomationMandateStore as rn, createConfiguredRivusDaemonBootstrap as ro, PresentationStep as rp, CreateBackgroundSessionHostToolsOptions as rr, createAgentDomainEventSink as rs, loadRivusDeploymentManifest as rt, DefaultAgentHarnessFromTextCallbackOptions as ru, createConfiguredFeishuHumanInteractionPresenter as s, FeishuCotProtocolError as sa, RivusAutomationDelivery as sc, AgentInstanceRecord as sd, FeishuCardActionCommand as sf, openJsonlRecoveryControl as si, RivusDaemonProcess as sl, CompactionError as sn, createConfiguredFeishuCardRolloverRuntime as so, RunPresentation as sp, createBackgroundSessionRepository as sr, FeishuPeriodicFlushSupervisor as ss, CreateRivusDeploymentAutomationInput as st, DefaultAgentRuntimeOptions as su, FEISHU_AGENT_CARD_ELEMENT_ID as t, FeishuCardTargetCreateOptions as ta, LoadedRivusDeployment as tc, AgentInstanceRegistry as td, FeishuHumanInteractionActions as tf, FeishuPresentationPreparationOptions as ti, CardPresentationTransitionDenied as tl, AutomationTickRecord as tn, ConfiguredRivusDaemonBootstrapRequest as to, AssistantPresentationStep as tp, extendBackgroundSessionDefinition as tr, AgentHistoryEventLog as ts, CreateConfiguredRivusDeploymentDaemonOptions as tt, DefaultAgentHarnessClientOptions as tu, createInMemoryHumanInteractionRepository as u, FeishuCotRunPreparation as ua, RivusBackgroundSessionsDeployment as uc, JsonlFeishuInboxRepositoryOptions as ud, FeishuResolveInteractionCommand as uf, AuthorizationPolicyState as ui, RivusDaemonWorkerLoop as ul, AgentContextBudgetExceeded as un, FeishuOpenApiClient as uo, ToolPresentationStep as up, openJsonlBackgroundSessionDeliveryStore as ur, FeishuEventHandlers as us, CreateRivusDeploymentEndpointInput as ut, createDefaultAgentHarness as uu, FeishuTextReplySender as v, FeishuCardPresentationStoreOptions as va, BackgroundSessionSupervisorStatus as vc, ToolOperationInspectResult as vd, FeishuMessageIntakeError as vf, InvocationAuthority as vi, createFeishuMessageWorker as vl, ProjectSkillCatalogDiagnostic as vn, FeishuTenantAccessTokenProviderOptions as vo, AgentDomainEventListener as vp, appendBackgroundSessionInput as vr, createFeishuCardActionErrorResponse as vs, RivusPluginModule as vt, createDefaultAgentRuntimeFromTextCallback as vu, ConsumeToolApprovalInput as w, createPiSessionRegistry as wa, AutomationDeliveryBinding as wc, createToolOperationLedger as wd, FeishuPromptMessageIntakeSummary as wf, InvalidToolInput as wi, FeishuReceiveMessageSummary as wl, validateRivusDeploymentManifest as wn, createFeishuCardRolloverSupervisor as wo, AgentHarnessIdleAvailability as wp, isBackgroundSessionDue as wr, RivusDaemonCliWriter as ws, SubagentRecord as wt, AgentHarnessClient as wu, createHumanInteractionToolApprovalGateway as x, createRunPresentationProjector as xa, ScheduledAutomationRunInput as xc, ToolOperationReconciliationOutcome as xd, FeishuNewSessionCommand as xf, createToolInputDigest as xi, FeishuReceiveHandledObservation as xl, validateProjectSkillCommand as xn, createFeishuTenantAccessTokenProvider as xo, AgentHarnessAvailability as xp, completeBackgroundSessionStop as xr, RivusDaemonBootstrapFactory as xs, SubagentCoordinator as xt, AgentClientAttempt as xu, createConfiguredFeishuTextReplySender as y, createFeishuCardPresentationStore as ya, AUTOMATION_SUPPRESSION_PREFIX as yc, ToolOperationLedger as yd, FeishuMessageIntakeOptions as yf, InvocationAuthorityRef as yi, FeishuMessageWorkerDrainAvailableResult as yl, ProjectSkillCatalogEntry as yn, FeishuTenantAccessTokenRequest as yo, AgentDomainEventSink as yp, claimBackgroundSession as yr, FeishuRawCardJson as ys, loadRivusDeployment as yt, createSystemClock as yu, HumanInteractionBase as z, createOpenTelemetryAgentTelemetry as za, RivusDaemonStatusReporterOptions as zc, ToolOperationRecoveryItem as zd, createFeishuConversationId as zf, createFixedClock as zi, RivusEnvFileVariables as zl, restrictMemoryScopesForAudience as zn, FeishuCardKitTextUpdate as zo, AgentEventSinkFailed as zp, AgentMemoryService as zr, RivusDeploymentBackgroundSessionStatus as zs, createPluginStateStore as zt, JsonHttpRequest as zu };