@rivus/agent 0.5.2 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import { $ as createAgentTranscriptTurn, A as createAgentLoopModelExecutionStart, At as AssistantThinkingDelta, B as createTextAgentLoop, C as AgentLoopToolExecutionUpdateOptions, Ct as AgentToolExecutionEnded, D as TextAgentLoopOptions, Dt as AgentTurnCompleted, E as TextAgentLoopCallback, Et as AgentToolExecutionUpdated, F as createAgentLoopToolExecutionEnd, Ft as isAssistantThinkingDeltaEvent, G as LocalCliAgentInvocationOrigin, H as AgentInvocationOrigin, I as createAgentLoopToolExecutionStart, It as isTerminalAgentDomainEvent, J as AgentTranscriptMessage, K as AgentConversationMessagesOptions, L as createAgentLoopToolExecutionUpdate, M as createAgentLoopSkillExecutionStart, Mt as TerminalAgentDomainEvent, N as createAgentLoopTextDelta, Nt as isAgentToolExecutionEvent, O as createAgentLoopFromCallback, Ot as AgentTurnStarted, P as createAgentLoopThinkingDelta, Pt as isAssistantTextDeltaEvent, Q as createAgentTranscriptMessages, R as createAsyncIterableAgentLoop, S as AgentLoopToolExecutionUpdate, St as AgentSkillExecutionStarted, T as EventAgentLoopOptions, Tt as AgentToolExecutionStarted, U as AutomationAgentInvocationOrigin, V as createTextAgentLoopFromCallback, W as FeishuAgentInvocationOrigin, X as AgentTranscriptTurn, Y as AgentTranscriptMessageRole, Z as createAgentConversationMessages, _ as AgentLoopThinkingDelta, _t as AgentRunCancelled$1, a as AgentLoopEvent, at as AgentRunPhase, b as AgentLoopToolExecutionStart, bt as AgentRunId, c as AgentLoopModelExecutionEnd, ct as evolveAgentRun, d as AgentLoopModelExecutionStartOptions, dt as AgentDomainEvent, et as replayAgentTranscript, f as AgentLoopSkillExecutionEnd, ft as AgentModelExecutionEnded, g as AgentLoopTextDelta, gt as AgentRunAccepted, h as AgentLoopSkillExecutionStartOptions, ht as AgentModelUsage, i as AgentLoopCallbackResult, it as replayAgentHistory, j as createAgentLoopSkillExecutionEnd, jt as SessionKey, k as createAgentLoopModelExecutionEnd, kt as AssistantTextDelta, l as AgentLoopModelExecutionEndOptions, lt as initialAgentRunState, m as AgentLoopSkillExecutionStart, mt as AgentModelExecutionStarted, n as AgentLoopCallback, nt as AgentRunSummary, o as AgentLoopEventLike, ot as AgentRunState, p as AgentLoopSkillExecutionEndOptions, pt as AgentModelExecutionEvent, q as AgentTranscript, r as AgentLoopCallbackOutput, rt as AgentSessionSummary, s as AgentLoopInput, st as AgentSkillExecutionState, t as AgentLoop, tt as AgentHistory, u as AgentLoopModelExecutionStart, ut as isTerminalAgentRunPhase, v as AgentLoopToolExecutionEnd, vt as AgentRunCompleted, w as AsyncIterableAgentLoopOptions, wt as AgentToolExecutionEvent, x as AgentLoopToolExecutionStartOptions, xt as AgentSkillExecutionEnded, y as AgentLoopToolExecutionEndOptions, yt as AgentRunFailed, z as createEventAgentLoop } from "./agent-loop.js";
2
2
  import { a as MemoryBinding, c as MemoryScope, d as RIVUS_MEMORY_TOOL_PLUGIN_ID, f as RIVUS_MEMORY_TOOL_VERSION, h as restrictMemoryScopesForAudience, i as MEMORY_SCOPES, l as MemoryState, m as createRivusMemoryToolContract, n as AgentMemoryIdentity, o as MemoryInvocationAudience, p as createMemoryNamespace, r as AgentMemorySnapshot, s as MemoryRecord, t as AgentMemoryAuthority, u as RIVUS_MEMORY_TOOL_ID } from "./agent-memory.js";
3
- import { A as RivusToolExecutionContext, C as RivusPluginCatalogSnapshot, D as RivusSkillDescriptor, E as RivusResolvedToolDescriptor, F as RivusToolInputRejected, I as RivusToolRisk, L as requiresToolApproval, M as RivusToolFactoryContext, N as RivusToolGrantSet, O as RivusSkillGrantSet, P as RivusToolIdempotency, S as RivusPluginCatalog, T as RivusPluginRegistry, _ as RivusAutomationInput, a as assertRivusPluginConforms, b as RivusHostToolDescriptor, c as RIVUS_PLUGIN_API_VERSION, d as RegisteredRivusPlugin, f as RegisteredRivusSkill, g as RivusAgentProfile, h as RivusAgentDeployment, i as RivusPluginLifecycleProbe, j as RivusToolExecutor, k as RivusToolDescriptor, l as RegisteredRivusAgentProfile, m as ResolvedRivusAgentDefinition, n as RivusPluginConformanceInput, o as createFakeRivusPlugin, p as RegisteredRivusTool, r as RivusPluginConformanceReport, s as InvalidRivusPlugin, t as RivusPluginConformanceError, u as RegisteredRivusAutomation, v as RivusAutomationTemplate, w as RivusPluginManifest, x as RivusPlugin, y as RivusAutomationTickContext } from "./rivus-plugin-testkit.js";
3
+ import { A as createRecoveryAction, C as ToolOperationReconciliation, D as createToolOperationLedger, E as ToolOperationState, O as InvalidRecoveryAction, S as ToolOperationLedger, T as ToolOperationRecord, _ as InvocationAuthorityRef, b as ToolOperationBinding, c as ToolApprovalRequest, d as ToolBrokerOptions, f as ToolExecutionRequest, g as InvocationAuthority, h as InvalidInvocationAuthority, k as RecoveryAction, l as ToolApprovalService, m as createToolBroker, o as AuthorizationPolicyProvider, p as ToolInvocationDenied, s as AuthorizationPolicyState, t as PiToolApprovalGateway, u as ToolBroker, v as createInvocationAuthority, w as ToolOperationReconciliationOutcome, x as ToolOperationInspectResult, y as ToolOperationBeginResult } from "./pi-tool-proxy.js";
4
+ import { A as RivusToolRisk, C as RivusToolDescriptor, D as RivusToolGrantSet, E as RivusToolFactoryContext, O as RivusToolIdempotency, S as RivusSkillGrantSet, T as RivusToolExecutor, _ as RivusPluginCatalogSnapshot, a as RegisteredRivusPlugin, b as RivusResolvedToolDescriptor, c as ResolvedRivusAgentDefinition, d as RivusAutomationInput, f as RivusAutomationTemplate, g as RivusPluginCatalog, h as RivusPlugin, i as RegisteredRivusAutomation, j as requiresToolApproval, k as RivusToolInputRejected, l as RivusAgentDeployment, m as RivusHostToolDescriptor, n as RIVUS_PLUGIN_API_VERSION, o as RegisteredRivusSkill, p as RivusAutomationTickContext, r as RegisteredRivusAgentProfile, s as RegisteredRivusTool, t as InvalidRivusPlugin, u as RivusAgentProfile, v as RivusPluginManifest, w as RivusToolExecutionContext, x as RivusSkillDescriptor, y as RivusPluginRegistry } from "./rivus-plugin.js";
5
+ import { a as assertRivusPluginConforms, i as RivusPluginLifecycleProbe, n as RivusPluginConformanceInput, o as createFakeRivusPlugin, r as RivusPluginConformanceReport, t as RivusPluginConformanceError } from "./rivus-plugin-testkit.js";
4
6
  import { Effect, Stream } from "effect";
5
7
  import { Tracer } from "@opentelemetry/api";
6
- import { ToolDefinition } from "@earendil-works/pi-coding-agent";
7
8
 
8
9
  //#region src/application/agent/agent-harness.d.ts
9
10
  interface AgentClock {
@@ -218,6 +219,9 @@ type FeishuStreamAction = {
218
219
  readonly type: "update_text";
219
220
  readonly runId: AgentRunId;
220
221
  readonly text: string;
222
+ } | {
223
+ readonly type: "handoff";
224
+ readonly runId: AgentRunId;
221
225
  } | {
222
226
  readonly type: "finish";
223
227
  readonly runId: AgentRunId;
@@ -273,17 +277,6 @@ interface JsonlFeishuCardDeliveryLedgerOptions {
273
277
  }
274
278
  declare function openJsonlFeishuCardDeliveryLedger(options: JsonlFeishuCardDeliveryLedgerOptions): Promise<FeishuCardDeliveryLedger>;
275
279
  //#endregion
276
- //#region src/domain/recovery-action.d.ts
277
- interface RecoveryAction {
278
- readonly actorId: string;
279
- readonly at: string;
280
- readonly note: string;
281
- }
282
- declare class InvalidRecoveryAction extends Error {
283
- readonly name = "InvalidRecoveryAction";
284
- }
285
- declare function createRecoveryAction(input: RecoveryAction): RecoveryAction;
286
- //#endregion
287
280
  //#region src/domain/human-interaction.d.ts
288
281
  type HumanInteractionId = string;
289
282
  interface HumanInteractionActor {
@@ -620,6 +613,7 @@ interface FeishuAgentDaemonBaseOptions {
620
613
  readonly agentId: string;
621
614
  readonly botOpenId?: string;
622
615
  readonly dedupe?: boolean;
616
+ readonly finalizeRun?: (runId: AgentRunId) => Effect.Effect<void>;
623
617
  readonly interactions?: FeishuHumanInteractionActions;
624
618
  readonly prepareRun?: (run: FeishuAgentRunPreparation) => Effect.Effect<void, unknown>;
625
619
  readonly publish: (action: FeishuStreamAction) => Effect.Effect<void, unknown>;
@@ -756,80 +750,6 @@ interface FeishuInboxRepositoryStateOptions {
756
750
  }
757
751
  declare function createFeishuInboxRepository(options?: FeishuInboxRepositoryStateOptions): FeishuInboxRepository;
758
752
  //#endregion
759
- //#region src/application/delegation/tool-operation-ledger.d.ts
760
- interface ToolOperationBinding {
761
- readonly agentId: string;
762
- readonly inputDigest: string;
763
- readonly instanceId: string;
764
- readonly sourceMessageId: string;
765
- readonly toolId: string;
766
- readonly toolVersion: string;
767
- }
768
- type ToolOperationState = {
769
- readonly status: "pending";
770
- } | {
771
- readonly result: unknown;
772
- readonly status: "completed";
773
- } | {
774
- readonly reason: string;
775
- readonly status: "reconciliation-required";
776
- } | {
777
- readonly status: "aborted";
778
- };
779
- interface ToolOperationRecord {
780
- readonly binding: ToolOperationBinding;
781
- readonly operationId: string;
782
- readonly reconciliation?: ToolOperationReconciliation;
783
- readonly revision: number;
784
- readonly state: ToolOperationState;
785
- }
786
- interface ToolOperationReconciliation extends RecoveryAction {
787
- readonly outcome: "applied" | "not-applied";
788
- }
789
- type ToolOperationReconciliationOutcome = {
790
- readonly result: unknown;
791
- readonly status: "applied";
792
- } | {
793
- readonly status: "not-applied";
794
- };
795
- type ToolOperationBeginResult = {
796
- readonly status: "acquired";
797
- } | {
798
- readonly result: unknown;
799
- readonly status: "completed";
800
- } | {
801
- readonly status: "blocked";
802
- readonly reason: string;
803
- };
804
- type ToolOperationInspectResult = {
805
- readonly status: "missing";
806
- } | {
807
- readonly result: unknown;
808
- readonly status: "completed";
809
- } | {
810
- readonly status: "blocked";
811
- readonly reason: string;
812
- };
813
- interface ToolOperationLedger {
814
- abort(operationId: string, binding: ToolOperationBinding): Promise<void>;
815
- begin(operationId: string, binding: ToolOperationBinding): Promise<ToolOperationBeginResult>;
816
- complete(operationId: string, binding: ToolOperationBinding, result: unknown): Promise<void>;
817
- inspect(operationId: string, binding: ToolOperationBinding): Promise<ToolOperationInspectResult>;
818
- reconciliationRequired(): ReadonlyArray<ToolOperationRecord>;
819
- reconcile(input: {
820
- readonly action: RecoveryAction;
821
- readonly expectedRevision: number;
822
- readonly operationId: string;
823
- readonly outcome: ToolOperationReconciliationOutcome;
824
- }): Promise<ToolOperationRecord>;
825
- requireReconciliation(operationId: string, binding: ToolOperationBinding, reason: string): Promise<void>;
826
- unresolvedForSource(sourceMessageId: string): ReadonlyArray<ToolOperationRecord>;
827
- }
828
- declare function createToolOperationLedger(options?: {
829
- readonly initial?: ReadonlyArray<ToolOperationRecord>;
830
- readonly persist?: (record: ToolOperationRecord) => Promise<void>;
831
- }): ToolOperationLedger;
832
- //#endregion
833
753
  //#region src/application/recovery/recovery-control.d.ts
834
754
  interface DeadLetterRecoveryItem {
835
755
  readonly acceptedAt: string;
@@ -1184,6 +1104,7 @@ interface RivusDaemonConfig {
1184
1104
  readonly appId: string;
1185
1105
  readonly appSecret: string;
1186
1106
  readonly baseUrl: string;
1107
+ readonly cardStreamLeaseMs: number;
1187
1108
  readonly streamMinIntervalMs: number;
1188
1109
  };
1189
1110
  readonly pi: {
@@ -1291,6 +1212,13 @@ interface FeishuMessageWorkerOptions {
1291
1212
  }
1292
1213
  declare function createFeishuMessageWorker(options: FeishuMessageWorkerOptions): FeishuMessageWorker;
1293
1214
  //#endregion
1215
+ //#region src/application/support/periodic-effect-loop.d.ts
1216
+ interface PeriodicEffectLoop {
1217
+ running(): boolean;
1218
+ start(): void;
1219
+ stop(): Promise<void>;
1220
+ }
1221
+ //#endregion
1294
1222
  //#region src/application/feishu/feishu-worker-loop.d.ts
1295
1223
  interface FeishuWorkerLoopOptions {
1296
1224
  readonly drainAvailable: () => Effect.Effect<unknown, unknown>;
@@ -1298,11 +1226,7 @@ interface FeishuWorkerLoopOptions {
1298
1226
  readonly onError?: (error: unknown) => void | Promise<void>;
1299
1227
  readonly sleep: (ms: number) => Effect.Effect<void, unknown>;
1300
1228
  }
1301
- interface FeishuWorkerLoop {
1302
- running(): boolean;
1303
- start(): void;
1304
- stop(): Promise<void>;
1305
- }
1229
+ type FeishuWorkerLoop = PeriodicEffectLoop;
1306
1230
  declare function createFeishuWorkerLoop(options: FeishuWorkerLoopOptions): FeishuWorkerLoop;
1307
1231
  //#endregion
1308
1232
  //#region src/application/daemon/rivus-daemon-process.d.ts
@@ -1333,6 +1257,158 @@ interface CompositeRivusDaemonTransportOptions {
1333
1257
  }
1334
1258
  declare function createCompositeRivusDaemonTransport(options: CompositeRivusDaemonTransportOptions): RivusDaemonTransport;
1335
1259
  //#endregion
1260
+ //#region src/domain/card-presentation.d.ts
1261
+ type CardPresentationStatus = "streaming" | "handoff-pending" | "active" | "closed" | "terminal";
1262
+ interface CardPresentation {
1263
+ readonly runId: string;
1264
+ readonly presentationId: string;
1265
+ readonly generation: number;
1266
+ readonly cardId: string;
1267
+ readonly elementId?: string;
1268
+ readonly sourceMessageId: string;
1269
+ readonly status: CardPresentationStatus;
1270
+ readonly createdAt: string;
1271
+ readonly leaseDeadlineAt: string;
1272
+ readonly handoffAt?: string;
1273
+ readonly handoffFailedAt?: string;
1274
+ readonly predecessorPresentationId?: string;
1275
+ readonly successorPresentationId?: string;
1276
+ readonly terminalReceiptId?: string;
1277
+ }
1278
+ interface CardPresentationChain {
1279
+ readonly runId: string;
1280
+ readonly activeGeneration: number;
1281
+ readonly activePresentationId: string;
1282
+ readonly presentations: ReadonlyArray<CardPresentation>;
1283
+ readonly revision: number;
1284
+ }
1285
+ interface CardPresentationBinding {
1286
+ readonly cardId: string;
1287
+ readonly createdAt: string;
1288
+ readonly elementId?: string;
1289
+ readonly leaseDeadlineAt: string;
1290
+ readonly presentationId: string;
1291
+ readonly runId: string;
1292
+ readonly sourceMessageId: string;
1293
+ }
1294
+ interface CardPresentationSuccessor {
1295
+ readonly cardId: string;
1296
+ readonly createdAt: string;
1297
+ readonly elementId?: string;
1298
+ readonly leaseDeadlineAt: string;
1299
+ readonly presentationId: string;
1300
+ }
1301
+ declare class CardPresentationTransitionDenied extends Error {
1302
+ readonly name = "CardPresentationTransitionDenied";
1303
+ }
1304
+ declare function activeCardPresentation(chain: CardPresentationChain): CardPresentation;
1305
+ declare function acceptsCardPresentationProgress(chain: CardPresentationChain): boolean;
1306
+ declare function isCardPresentationHandoffDue(chain: CardPresentationChain, now: string): boolean;
1307
+ //#endregion
1308
+ //#region src/application/feishu/feishu-card-presentation-store.d.ts
1309
+ declare class FeishuCardPresentationNotFound {
1310
+ readonly runId: string;
1311
+ readonly _tag = "FeishuCardPresentationNotFound";
1312
+ constructor(runId: string);
1313
+ }
1314
+ interface FeishuCardPresentationHandoffStart {
1315
+ readonly presentation: CardPresentation;
1316
+ readonly started: boolean;
1317
+ }
1318
+ interface FeishuCardPresentationStore {
1319
+ bind(binding: CardPresentationBinding): Effect.Effect<CardPresentation, unknown>;
1320
+ beginHandoff(input: {
1321
+ readonly handoffAt: string;
1322
+ readonly runId: string;
1323
+ }): Effect.Effect<FeishuCardPresentationHandoffStart, unknown>;
1324
+ chain(runId: string): CardPresentationChain | undefined;
1325
+ chains(): ReadonlyArray<CardPresentationChain>;
1326
+ compensateInterruptedHandoffs(compensatedAt: string): Effect.Effect<ReadonlyArray<CardPresentationChain>, unknown>;
1327
+ completeHandoff(input: {
1328
+ readonly runId: string;
1329
+ readonly successor: CardPresentationSuccessor;
1330
+ }): Effect.Effect<CardPresentation, unknown>;
1331
+ failHandoff(input: {
1332
+ readonly failedAt: string;
1333
+ readonly runId: string;
1334
+ }): Effect.Effect<void, unknown>;
1335
+ markTerminal(input: {
1336
+ readonly runId: string;
1337
+ readonly terminalReceiptId: string;
1338
+ }): Effect.Effect<void, unknown>;
1339
+ release(runId: string): Effect.Effect<void, unknown>;
1340
+ size(): number;
1341
+ }
1342
+ interface FeishuCardPresentationStoreOptions {
1343
+ readonly initial?: ReadonlyArray<CardPresentationChain>;
1344
+ readonly persist?: (chains: ReadonlyArray<CardPresentationChain>) => Promise<void>;
1345
+ }
1346
+ declare function createFeishuCardPresentationStore(options?: FeishuCardPresentationStoreOptions): FeishuCardPresentationStore;
1347
+ //#endregion
1348
+ //#region src/application/feishu/feishu-card-rollover.d.ts
1349
+ declare const DEFAULT_CARD_STREAM_LEASE_MS = 510000;
1350
+ interface FeishuCardRolloverTarget {
1351
+ readonly cardId: string;
1352
+ readonly elementId?: string;
1353
+ }
1354
+ interface FeishuCardRolloverSuccessorRequest {
1355
+ readonly generation: number;
1356
+ readonly presentationId: string;
1357
+ readonly run: FeishuAgentRunPreparation;
1358
+ }
1359
+ interface FeishuCardRolloverStreamPublisher {
1360
+ flush(runId?: string): Effect.Effect<void, unknown>;
1361
+ publish(action: FeishuStreamAction): Effect.Effect<void, unknown>;
1362
+ }
1363
+ type FeishuCardRolloverEventType = "handoff_started" | "handoff_succeeded" | "handoff_failed" | "handoff_notice_failed" | "presentation_write_failed" | "stale_update_dropped" | "stream_closed" | "terminal_delivery_failed";
1364
+ interface FeishuCardRolloverEvent {
1365
+ readonly at?: string;
1366
+ readonly cardId?: string;
1367
+ readonly error?: unknown;
1368
+ readonly generation?: number;
1369
+ readonly presentationId?: string;
1370
+ readonly runId?: string;
1371
+ readonly sourceMessageId?: string;
1372
+ readonly successorCardId?: string;
1373
+ readonly type: FeishuCardRolloverEventType;
1374
+ }
1375
+ type FeishuCardRolloverCounters = Readonly<Record<FeishuCardRolloverEventType, number>>;
1376
+ interface FeishuCardRolloverStatus {
1377
+ readonly counters: FeishuCardRolloverCounters;
1378
+ readonly leaseMs: number;
1379
+ readonly live: ReadonlyArray<CardPresentation>;
1380
+ }
1381
+ type FeishuCardRolloverHandoffResult = {
1382
+ readonly presentation: CardPresentation;
1383
+ readonly status: "rolled-over";
1384
+ } | {
1385
+ readonly reason: "already-pending" | "not-due" | "not-live" | "not-streaming";
1386
+ readonly status: "skipped";
1387
+ } | {
1388
+ readonly error: unknown;
1389
+ readonly status: "failed";
1390
+ };
1391
+ interface FeishuCardRolloverOptions {
1392
+ readonly clock: AgentClock;
1393
+ readonly createSuccessor: (request: FeishuCardRolloverSuccessorRequest) => Effect.Effect<FeishuCardRolloverTarget, unknown>;
1394
+ readonly leaseMs?: number;
1395
+ readonly observe?: (event: FeishuCardRolloverEvent) => void;
1396
+ readonly publisher: FeishuCardRolloverStreamPublisher;
1397
+ readonly store: FeishuCardPresentationStore;
1398
+ }
1399
+ interface FeishuCardRollover extends FeishuCardRolloverStreamPublisher {
1400
+ bindRun(run: FeishuAgentRunPreparation, target: FeishuCardRolloverTarget): Effect.Effect<CardPresentation, unknown>;
1401
+ dueRunIds(now: Date): ReadonlyArray<string>;
1402
+ handoff(runId: string): Effect.Effect<FeishuCardRolloverHandoffResult, unknown>;
1403
+ observeStreamClosed(cardId: string): void;
1404
+ recover(): Effect.Effect<{
1405
+ readonly compensated: number;
1406
+ }, unknown>;
1407
+ releaseRun(runId: string): Effect.Effect<void>;
1408
+ status(): FeishuCardRolloverStatus;
1409
+ }
1410
+ declare function createFeishuCardRollover(options: FeishuCardRolloverOptions): FeishuCardRollover;
1411
+ //#endregion
1336
1412
  //#region src/application/feishu/feishu-receive-status.d.ts
1337
1413
  type FeishuReceiveMessageReplayOptions = FeishuAgentDaemonHandleMessageOptions;
1338
1414
  interface FeishuReceiveMessageSummary {
@@ -1365,6 +1441,7 @@ interface FeishuReceiveMessageReplayResult {
1365
1441
  //#region src/application/daemon/rivus-daemon-status.d.ts
1366
1442
  interface RivusDaemonStatus {
1367
1443
  readonly agentId: string;
1444
+ readonly cards?: FeishuCardRolloverStatus;
1368
1445
  readonly harness: {
1369
1446
  readonly activeRunId?: AgentRunId;
1370
1447
  readonly activeRunState?: AgentRunState;
@@ -1391,6 +1468,7 @@ interface RivusDaemonStatusReporter {
1391
1468
  }
1392
1469
  interface RivusDaemonStatusReporterOptions {
1393
1470
  readonly activeRun?: () => ActiveAgentRun | undefined;
1471
+ readonly cardPresentations?: () => FeishuCardRolloverStatus;
1394
1472
  readonly activeRunId?: () => AgentRunId | undefined;
1395
1473
  readonly activeRunState?: () => AgentRunState | undefined;
1396
1474
  readonly agentId: string;
@@ -1523,6 +1601,7 @@ interface RivusEndpointDeployment {
1523
1601
  readonly experimental?: RivusEndpointExperimentalFeatures;
1524
1602
  readonly required: boolean;
1525
1603
  readonly baseUrl: string;
1604
+ readonly cardStreamLeaseMs: number;
1526
1605
  readonly streamMinIntervalMs: number;
1527
1606
  readonly groupPolicy: "mention-only" | "ignore-unmentioned" | "default-responder";
1528
1607
  }
@@ -1906,6 +1985,7 @@ interface FeishuAgentRuntimeOptions {
1906
1985
  readonly botOpenId?: string;
1907
1986
  readonly clock: AgentClock;
1908
1987
  readonly eventSinks?: ReadonlyArray<AgentDomainEventSink>;
1988
+ readonly finalizeRun?: (runId: AgentRunId) => Effect.Effect<void>;
1909
1989
  readonly inboxRepository?: FeishuInboxRepository;
1910
1990
  readonly initialEvents?: ReadonlyArray<AgentDomainEvent>;
1911
1991
  readonly initialRunStates?: ReadonlyArray<AgentRunState>;
@@ -2001,8 +2081,13 @@ interface FeishuCardKitCancel {
2001
2081
  readonly reason?: string;
2002
2082
  readonly sequence: number;
2003
2083
  }
2084
+ interface FeishuCardKitHandoff {
2085
+ readonly cardId: string;
2086
+ readonly sequence: number;
2087
+ }
2004
2088
  interface FeishuCardKitClient {
2005
2089
  cancel(request: FeishuCardKitCancel): Effect.Effect<void, unknown>;
2090
+ handoff(request: FeishuCardKitHandoff): Effect.Effect<void, unknown>;
2006
2091
  updateText(request: FeishuCardKitTextUpdate): Effect.Effect<void, unknown>;
2007
2092
  finish(request: FeishuCardKitFinish): Effect.Effect<void, unknown>;
2008
2093
  fail(request: FeishuCardKitFail): Effect.Effect<void, unknown>;
@@ -2030,37 +2115,34 @@ declare class FeishuCardTargetRegistryStoreError {
2030
2115
  readonly _tag = "FeishuCardTargetRegistryStoreError";
2031
2116
  constructor(operation: FeishuCardTargetRegistryOperation, cause: unknown);
2032
2117
  }
2033
- interface FeishuCardTargetRegistry {
2034
- bind(runId: AgentRunId, target: FeishuCardTarget): Effect.Effect<void, FeishuCardTargetRegistryStoreError>;
2035
- release(runId: AgentRunId): Effect.Effect<void, FeishuCardTargetRegistryStoreError>;
2036
- resolveTarget(runId: AgentRunId): Effect.Effect<FeishuCardTarget, FeishuCardTargetNotFound | FeishuCardTargetRegistryStoreError>;
2037
- size(): number;
2118
+ interface FeishuCardTargetRegistry extends FeishuCardPresentationStore {
2119
+ resolveTarget(runId: AgentRunId): Effect.Effect<FeishuCardTarget, unknown>;
2038
2120
  }
2039
2121
  interface JsonFileFeishuCardTargetRegistryOptions {
2040
2122
  readonly filePath: string;
2041
2123
  }
2042
- declare function createInMemoryFeishuCardTargetRegistry(): FeishuCardTargetRegistry;
2124
+ declare function createInMemoryFeishuCardTargetRegistry(initial?: ReadonlyArray<CardPresentationChain>): FeishuCardTargetRegistry;
2043
2125
  declare function createJsonFileFeishuCardTargetRegistry(options: JsonFileFeishuCardTargetRegistryOptions): FeishuCardTargetRegistry;
2044
2126
  //#endregion
2045
- //#region src/infrastructure/feishu/feishu-rate-limited-publisher.d.ts
2046
- interface FeishuStreamActionPublisher {
2047
- publish(action: FeishuStreamAction): Effect.Effect<void, unknown>;
2048
- }
2049
- interface RateLimitedFeishuPublisherOptions {
2050
- readonly publisher: FeishuStreamActionPublisher;
2051
- readonly minIntervalMs: number;
2127
+ //#region src/application/feishu/feishu-card-rollover-supervisor.d.ts
2128
+ interface FeishuCardRolloverSupervisorOptions {
2129
+ readonly clock: AgentClock;
2130
+ readonly intervalMs?: number;
2131
+ readonly onError?: (error: unknown) => void | Promise<void>;
2132
+ readonly rollover: Pick<FeishuCardRollover, "dueRunIds" | "handoff" | "recover">;
2052
2133
  readonly sleep: (ms: number) => Effect.Effect<void, unknown>;
2053
2134
  }
2054
- declare function createRateLimitedFeishuPublisher(options: RateLimitedFeishuPublisherOptions): FeishuStreamActionPublisher;
2055
- //#endregion
2056
- //#region src/infrastructure/feishu/feishu-coalescing-publisher.d.ts
2057
- interface FeishuCoalescingPublisher extends FeishuStreamActionPublisher {
2058
- flush(runId?: AgentRunId): Effect.Effect<void, unknown>;
2135
+ interface FeishuCardRolloverSupervisorTickResult {
2136
+ readonly results: ReadonlyArray<FeishuCardRolloverHandoffResult>;
2059
2137
  }
2060
- interface FeishuCoalescingPublisherOptions {
2061
- readonly publisher: FeishuStreamActionPublisher;
2138
+ interface FeishuCardRolloverSupervisor {
2139
+ recover(): Effect.Effect<void, unknown>;
2140
+ running(): boolean;
2141
+ start(): void;
2142
+ stop(): Promise<void>;
2143
+ tick(): Effect.Effect<FeishuCardRolloverSupervisorTickResult, unknown>;
2062
2144
  }
2063
- declare function createCoalescingFeishuPublisher(options: FeishuCoalescingPublisherOptions): FeishuCoalescingPublisher;
2145
+ declare function createFeishuCardRolloverSupervisor(options: FeishuCardRolloverSupervisorOptions): FeishuCardRolloverSupervisor;
2064
2146
  //#endregion
2065
2147
  //#region src/infrastructure/feishu/feishu-tenant-token-provider.d.ts
2066
2148
  interface FeishuTenantAccessTokenRequest {
@@ -2137,6 +2219,30 @@ declare function createConfiguredFeishuOpenApiClient(options: {
2137
2219
  readonly request: (request: ConfiguredFeishuOpenApiRequest) => Effect.Effect<ConfiguredFeishuOpenApiResponse, unknown>;
2138
2220
  }): FeishuOpenApiClient;
2139
2221
  //#endregion
2222
+ //#region src/composition/feishu-card-rollover-runtime.d.ts
2223
+ interface ConfiguredFeishuCardRolloverRuntimeOptions {
2224
+ readonly agentName?: string;
2225
+ readonly cardTargets: FeishuCardTargetRegistry;
2226
+ readonly client: FeishuOpenApiClient;
2227
+ readonly clock: AgentClock;
2228
+ readonly config: RivusDaemonConfig;
2229
+ readonly elementId?: string;
2230
+ readonly initialContent?: string;
2231
+ readonly ledger?: FeishuCardDeliveryLedger;
2232
+ readonly observe?: (event: FeishuCardRolloverEvent) => void;
2233
+ readonly onError?: (error: unknown) => void | Promise<void>;
2234
+ readonly sleep: (ms: number) => Effect.Effect<void, unknown>;
2235
+ readonly supervisorIntervalMs?: number;
2236
+ readonly title?: string;
2237
+ }
2238
+ interface ConfiguredFeishuCardRolloverRuntime {
2239
+ readonly rollover: FeishuCardRollover;
2240
+ readonly supervisor: FeishuCardRolloverSupervisor;
2241
+ readonly transport: RivusDaemonTransport;
2242
+ prepareRun(run: FeishuAgentRunPreparation): Effect.Effect<void, unknown>;
2243
+ }
2244
+ declare function createConfiguredFeishuCardRolloverRuntime(options: ConfiguredFeishuCardRolloverRuntimeOptions): ConfiguredFeishuCardRolloverRuntime;
2245
+ //#endregion
2140
2246
  //#region src/infrastructure/persistence/jsonl-agent-event-log.d.ts
2141
2247
  type AgentEventLogOperation = "append" | "read";
2142
2248
  declare class AgentEventLogStoreError {
@@ -2160,6 +2266,8 @@ type ConfiguredRivusDaemonBootstrapRequest = ConfiguredFeishuOpenApiRequest;
2160
2266
  type ConfiguredRivusDaemonBootstrapResponse = ConfiguredFeishuOpenApiResponse;
2161
2267
  interface ConfiguredRivusDaemonBootstrapOptions {
2162
2268
  readonly botOpenId?: string;
2269
+ readonly cardLedger?: FeishuCardDeliveryLedger;
2270
+ readonly cardRolloverIntervalMs?: number;
2163
2271
  readonly cardTargets: FeishuCardTargetRegistry;
2164
2272
  readonly clock: AgentClock;
2165
2273
  readonly config: RivusDaemonConfig;
@@ -2171,6 +2279,7 @@ interface ConfiguredRivusDaemonBootstrapOptions {
2171
2279
  readonly initialRunStates?: ReadonlyArray<AgentRunState>;
2172
2280
  readonly inboxRepository?: FeishuInboxRepository;
2173
2281
  readonly loop: AgentLoop;
2282
+ readonly observeCardRollover?: (event: FeishuCardRolloverEvent) => void;
2174
2283
  readonly onWorkerError?: (error: unknown) => void | Promise<void>;
2175
2284
  readonly request: (request: ConfiguredRivusDaemonBootstrapRequest) => Effect.Effect<ConfiguredRivusDaemonBootstrapResponse, unknown>;
2176
2285
  readonly runIds: RunIdGenerator;
@@ -2180,10 +2289,11 @@ interface ConfiguredRivusDaemonBootstrapOptions {
2180
2289
  readonly workerIntervalMs?: number;
2181
2290
  }
2182
2291
  interface ConfiguredRivusDaemonBootstrap {
2292
+ readonly cardRollover: ConfiguredFeishuCardRolloverRuntime;
2183
2293
  readonly cardTargets: FeishuCardTargetRegistry;
2184
2294
  readonly eventLog: AgentEventLog;
2185
2295
  readonly process: RivusDaemonProcess;
2186
- readonly publisher: FeishuCoalescingPublisher;
2296
+ readonly publisher: FeishuCardRollover;
2187
2297
  readonly runtime: FeishuAgentRuntime;
2188
2298
  readonly statusReporter: RivusDaemonStatusReporter;
2189
2299
  readonly transport: RivusDaemonTransport;
@@ -2260,13 +2370,6 @@ interface OpenTelemetryAgentTelemetry {
2260
2370
  declare function createOpenTelemetryAgentEventSink(options: OpenTelemetryAgentEventSinkOptions): AgentDomainEventSink;
2261
2371
  declare function createOpenTelemetryAgentTelemetry(options: OpenTelemetryAgentEventSinkOptions): OpenTelemetryAgentTelemetry;
2262
2372
  //#endregion
2263
- //#region src/infrastructure/pi/pi-skill-tool.d.ts
2264
- interface PiSkillRuntime {
2265
- readonly prompt: string;
2266
- readonly tool?: ToolDefinition;
2267
- }
2268
- declare function createPiSkillRuntime(skills: ReadonlyArray<RegisteredRivusSkill>): PiSkillRuntime;
2269
- //#endregion
2270
2373
  //#region src/infrastructure/pi/pi-agent-loop.d.ts
2271
2374
  type PiAgentSessionEvent = PiMessageStartEvent | PiMessageUpdateEvent | PiMessageEndEvent | PiToolExecutionStartEvent | PiToolExecutionUpdateEvent | PiToolExecutionEndEvent | {
2272
2375
  readonly type: string;
@@ -2366,6 +2469,7 @@ interface FeishuCardKitOpenApiClientOptions {
2366
2469
  readonly agentName?: string;
2367
2470
  readonly baseUrl?: string;
2368
2471
  readonly client: FeishuOpenApiClient;
2472
+ readonly onStreamingClosed?: (cardId: string) => void;
2369
2473
  }
2370
2474
  declare function createFeishuCardKitOpenApiClient(options: FeishuCardKitOpenApiClientOptions): FeishuCardKitClient;
2371
2475
  //#endregion
@@ -2388,12 +2492,18 @@ declare class FeishuCotProtocolError extends Error {
2388
2492
  declare function createFeishuCotPublisher(options: FeishuCotPublisherOptions): FeishuCotPublisher;
2389
2493
  //#endregion
2390
2494
  //#region src/infrastructure/feishu/feishu-cardkit-target-preparation.d.ts
2495
+ interface FeishuCardTargetCreateOptions {
2496
+ readonly generation?: number;
2497
+ }
2391
2498
  interface FeishuCardTargetCreator {
2392
- createTarget(run: FeishuAgentRunPreparation): Effect.Effect<FeishuCardTarget, unknown>;
2499
+ createTarget(run: FeishuAgentRunPreparation, options?: FeishuCardTargetCreateOptions): Effect.Effect<FeishuCardTarget, unknown>;
2500
+ }
2501
+ interface FeishuCardPresentationBinder {
2502
+ bindRun(run: FeishuAgentRunPreparation, target: FeishuCardTarget): Effect.Effect<unknown, unknown>;
2393
2503
  }
2394
2504
  interface FeishuCardTargetPreparationOptions {
2395
2505
  readonly createTarget: (run: FeishuAgentRunPreparation) => Effect.Effect<FeishuCardTarget, unknown>;
2396
- readonly registry: FeishuCardTargetRegistry;
2506
+ readonly presentations: FeishuCardPresentationBinder;
2397
2507
  }
2398
2508
  interface FeishuCardKitOpenApiTargetCreatorOptions {
2399
2509
  readonly baseUrl?: string;
@@ -2402,24 +2512,44 @@ interface FeishuCardKitOpenApiTargetCreatorOptions {
2402
2512
  readonly initialContent?: string;
2403
2513
  readonly title?: string;
2404
2514
  }
2405
- interface ConfiguredFeishuCardKitTargetPreparationOptions {
2515
+ interface ConfiguredFeishuCardKitTargetCreatorOptions {
2406
2516
  readonly client: FeishuOpenApiClient;
2407
2517
  readonly config: RivusDaemonConfig;
2408
2518
  readonly elementId?: string;
2409
2519
  readonly initialContent?: string;
2410
- readonly registry: FeishuCardTargetRegistry;
2411
2520
  readonly title?: string;
2412
2521
  }
2413
2522
  declare function createFeishuCardTargetPreparation(options: FeishuCardTargetPreparationOptions): (run: FeishuAgentRunPreparation) => Effect.Effect<void, unknown>;
2414
- declare function createConfiguredFeishuCardKitTargetPreparation(options: ConfiguredFeishuCardKitTargetPreparationOptions): (run: FeishuAgentRunPreparation) => Effect.Effect<void, unknown>;
2523
+ declare function createConfiguredFeishuCardKitTargetCreator(options: ConfiguredFeishuCardKitTargetCreatorOptions): FeishuCardTargetCreator;
2415
2524
  declare function createFeishuCardKitOpenApiTargetCreator(options: FeishuCardKitOpenApiTargetCreatorOptions): FeishuCardTargetCreator;
2416
2525
  //#endregion
2526
+ //#region src/infrastructure/feishu/feishu-rate-limited-publisher.d.ts
2527
+ interface FeishuStreamActionPublisher {
2528
+ publish(action: FeishuStreamAction): Effect.Effect<void, unknown>;
2529
+ }
2530
+ interface RateLimitedFeishuPublisherOptions {
2531
+ readonly publisher: FeishuStreamActionPublisher;
2532
+ readonly minIntervalMs: number;
2533
+ readonly sleep: (ms: number) => Effect.Effect<void, unknown>;
2534
+ }
2535
+ declare function createRateLimitedFeishuPublisher(options: RateLimitedFeishuPublisherOptions): FeishuStreamActionPublisher;
2536
+ //#endregion
2537
+ //#region src/infrastructure/feishu/feishu-coalescing-publisher.d.ts
2538
+ interface FeishuCoalescingPublisher extends FeishuStreamActionPublisher {
2539
+ flush(runId?: AgentRunId): Effect.Effect<void, unknown>;
2540
+ }
2541
+ interface FeishuCoalescingPublisherOptions {
2542
+ readonly publisher: FeishuStreamActionPublisher;
2543
+ }
2544
+ declare function createCoalescingFeishuPublisher(options: FeishuCoalescingPublisherOptions): FeishuCoalescingPublisher;
2545
+ //#endregion
2417
2546
  //#region src/infrastructure/feishu/feishu-configured-cardkit-publisher.d.ts
2418
2547
  interface ConfiguredFeishuCardKitPublisherOptions {
2419
2548
  readonly agentName?: string;
2420
2549
  readonly client: FeishuOpenApiClient;
2421
2550
  readonly config: RivusDaemonConfig;
2422
2551
  readonly ledger?: FeishuCardDeliveryLedger;
2552
+ readonly onStreamingClosed?: (cardId: string) => void;
2423
2553
  readonly resolveTarget: (runId: AgentRunId) => Effect.Effect<FeishuCardTarget, unknown>;
2424
2554
  readonly sleep: (ms: number) => Effect.Effect<void, unknown>;
2425
2555
  }
@@ -2438,6 +2568,9 @@ declare function createFeishuPeriodicFlush(options: FeishuPeriodicFlushOptions):
2438
2568
  //#endregion
2439
2569
  //#region src/testing/fakes.d.ts
2440
2570
  declare function createFixedClock(now: Date): AgentClock;
2571
+ declare function createTestClock(initial: Date): AgentClock & {
2572
+ advance(ms: number): void;
2573
+ };
2441
2574
  declare function createSequenceRunIds(runIds: ReadonlyArray<AgentRunId>): RunIdGenerator;
2442
2575
  //#endregion
2443
2576
  //#region src/application/plugin/rivus-plugin-registry.d.ts
@@ -2493,74 +2626,6 @@ declare class WorkspaceInstructionsSourceError extends Error {
2493
2626
  }
2494
2627
  declare function createAgentsMdInstructionsProvider(): WorkspaceInstructionsProvider;
2495
2628
  //#endregion
2496
- //#region src/application/delegation/tool-authority.d.ts
2497
- interface InvocationAuthorityRef {
2498
- readonly id: string;
2499
- }
2500
- interface InvocationAuthority {
2501
- readonly agentId: string;
2502
- readonly instanceId: string;
2503
- readonly memory?: AgentMemoryAuthority;
2504
- readonly runId: string;
2505
- readonly sessionKey: string;
2506
- readonly sourceMessageId: string;
2507
- readonly tenantKey: string;
2508
- readonly toolGrantSet: RivusToolGrantSet;
2509
- }
2510
- declare class InvalidInvocationAuthority extends Error {
2511
- readonly name = "InvalidInvocationAuthority";
2512
- }
2513
- declare function createInvocationAuthority(authority: InvocationAuthority): InvocationAuthorityRef;
2514
- //#endregion
2515
- //#region src/application/delegation/tool-broker.d.ts
2516
- interface AuthorizationPolicyState {
2517
- readonly epoch: number;
2518
- readonly revokedToolIds: ReadonlyArray<string>;
2519
- }
2520
- interface AuthorizationPolicyProvider {
2521
- current(): Promise<AuthorizationPolicyState>;
2522
- }
2523
- interface ToolApprovalRequest {
2524
- readonly approvalId: string;
2525
- readonly agentId: string;
2526
- readonly instanceId: string;
2527
- readonly inputDigest: string;
2528
- readonly operationId: string;
2529
- readonly runId: string;
2530
- readonly sessionKey: string;
2531
- readonly tenantKey: string;
2532
- readonly callId: string;
2533
- readonly toolId: string;
2534
- readonly toolVersion: string;
2535
- readonly risk: RivusToolRisk;
2536
- }
2537
- interface ToolApprovalService {
2538
- consume(request: ToolApprovalRequest): Promise<boolean>;
2539
- }
2540
- interface ToolBrokerOptions {
2541
- readonly approvals: ToolApprovalService;
2542
- readonly catalog: RivusPluginCatalog;
2543
- readonly hostTools?: ReadonlyArray<RivusHostToolDescriptor>;
2544
- readonly policy: AuthorizationPolicyProvider;
2545
- readonly operations?: ToolOperationLedger;
2546
- }
2547
- interface ToolExecutionRequest {
2548
- readonly authority: InvocationAuthorityRef;
2549
- readonly callId: string;
2550
- readonly toolId: string;
2551
- readonly version: string;
2552
- readonly input: unknown;
2553
- readonly operationId?: string;
2554
- readonly approvalId?: string;
2555
- }
2556
- interface ToolBroker {
2557
- execute(request: ToolExecutionRequest): Promise<unknown>;
2558
- }
2559
- declare class ToolInvocationDenied extends Error {
2560
- readonly name = "ToolInvocationDenied";
2561
- }
2562
- declare function createToolBroker(options: ToolBrokerOptions): ToolBroker;
2563
- //#endregion
2564
2629
  //#region src/infrastructure/persistence/jsonl-tool-operation-ledger.d.ts
2565
2630
  declare function openJsonlToolOperationLedger(options: {
2566
2631
  readonly filePath: string;
@@ -2582,7 +2647,9 @@ declare function createAgentHarnessPooledRuntime(harness: AgentHarness): PooledA
2582
2647
  //#region src/composition/feishu-deployment-endpoint.d.ts
2583
2648
  interface FeishuDeploymentEndpointOptions extends Pick<CreateRivusDeploymentEndpointInput, "agentId" | "cancel" | "handle"> {
2584
2649
  readonly botOpenId: string;
2650
+ readonly cardRollover?: RivusDaemonTransport;
2585
2651
  readonly endpointId?: string;
2652
+ readonly finalizeRun?: (runId: string) => Effect.Effect<void>;
2586
2653
  readonly eventDispatcher: FeishuWebSocketEventDispatcher;
2587
2654
  readonly groupPolicy: FeishuEndpointGroupPolicy;
2588
2655
  readonly interactions?: FeishuHumanInteractionActions;
@@ -2980,41 +3047,6 @@ declare class InvalidToolInput extends InvalidStableJson {
2980
3047
  declare function createToolInputDigest(input: unknown): string;
2981
3048
  declare function normalizeStableJson(value: unknown): unknown;
2982
3049
  //#endregion
2983
- //#region src/infrastructure/pi/pi-tool-proxy.d.ts
2984
- interface PiToolApprovalRequest {
2985
- readonly agentId: string;
2986
- readonly allowedActorOpenIds: ReadonlyArray<string>;
2987
- readonly approvalId: string;
2988
- readonly callId: string;
2989
- readonly endpointId: string;
2990
- readonly inputDigest: string;
2991
- readonly instanceId: string;
2992
- readonly operationId: string;
2993
- readonly risk: RivusToolRisk;
2994
- readonly runId: string;
2995
- readonly sessionKey: string;
2996
- readonly signal?: AbortSignal;
2997
- readonly sourceMessageId: string;
2998
- readonly tenantKey: string;
2999
- readonly toolId: string;
3000
- readonly toolVersion: string;
3001
- }
3002
- interface PiToolApprovalGateway {
3003
- requestApproval(request: PiToolApprovalRequest): Promise<void>;
3004
- }
3005
- interface PiToolProxyOptions {
3006
- readonly agentId: string;
3007
- readonly approvals: PiToolApprovalGateway;
3008
- readonly broker: ToolBroker;
3009
- readonly getActiveInput: () => AgentLoopInput | undefined;
3010
- readonly instanceId: string;
3011
- readonly memoryScopes?: ReadonlyArray<MemoryScope>;
3012
- readonly toolGrantSet: RivusToolGrantSet;
3013
- readonly tools: ReadonlyArray<RivusResolvedToolDescriptor>;
3014
- }
3015
- declare function createPiToolProxyDefinitions(options: PiToolProxyOptions): ToolDefinition[];
3016
- declare function createPiToolNameResolver(tools: ReadonlyArray<Pick<RivusResolvedToolDescriptor, "id">>): (toolName: string) => string;
3017
- //#endregion
3018
3050
  //#region src/composition/human-interaction-tool-approval-gateway.d.ts
3019
3051
  interface HumanInteractionEndpointRegistry {
3020
3052
  register(endpointId: string, service: HumanInteractionService): void;
@@ -3067,6 +3099,7 @@ declare function createJsonlHumanInteractionRepository(options: JsonlHumanIntera
3067
3099
  type FeishuAgentRunCardInput = {
3068
3100
  readonly agentName: string;
3069
3101
  readonly elementId?: string;
3102
+ readonly generation?: number;
3070
3103
  readonly runId: string;
3071
3104
  readonly sessionKey: string;
3072
3105
  readonly status: "running";
@@ -3077,7 +3110,7 @@ type FeishuAgentRunCardInput = {
3077
3110
  readonly text: string;
3078
3111
  } | {
3079
3112
  readonly agentName: string;
3080
- readonly status: "cancelled" | "failed";
3113
+ readonly status: "cancelled" | "failed" | "handoff";
3081
3114
  };
3082
3115
  declare function createFeishuAgentRunCard(input: FeishuAgentRunCardInput): FeishuRawCardJson;
3083
3116
  //#endregion
@@ -3095,4 +3128,4 @@ interface ConfiguredFeishuHumanInteractionPresenterOptions {
3095
3128
  }
3096
3129
  declare function createConfiguredFeishuHumanInteractionPresenter(options: ConfiguredFeishuHumanInteractionPresenterOptions): HumanInteractionPresenter;
3097
3130
  //#endregion
3098
- export { type ActiveAgentRun, type AgentClientAttempt, type AgentClientFailure, type AgentClientSuccess, type AgentClock, AgentContextBudgetExceeded, type AgentContextInput, type AgentContextLayer, type AgentContextLayerKind, type AgentConversationMessagesOptions, type AgentDomainEvent, type AgentDomainEventCallback, type AgentDomainEventHandler, type AgentDomainEventListener, type AgentDomainEventSink, type AgentDomainEventSinkCallback, AgentEventHandlerFailed, type AgentEventLog, type AgentEventLogOperation, AgentEventLogStoreError, AgentEventSinkFailed, type AgentHarness, type AgentHarnessAvailability, AgentHarnessBusy, type AgentHarnessBusyAvailability, type AgentHarnessClient, type AgentHarnessError, type AgentHarnessIdleAvailability, type AgentHarnessOptions, type AgentHistory, type AgentHistoryEventLog, AgentInstanceBusy, AgentInstanceConflict, type AgentInstanceRecord, type AgentInstanceRegistry, type AgentInstanceRegistryOptions, type AgentInvocationOrigin, type AgentLoop, type AgentLoopCallback, type AgentLoopCallbackOutput, type AgentLoopCallbackResult, type AgentLoopEvent, type AgentLoopEventLike, AgentLoopFailed, type AgentLoopInput, type AgentLoopModelExecutionEnd, type AgentLoopModelExecutionEndOptions, type AgentLoopModelExecutionStart, type AgentLoopModelExecutionStartOptions, type AgentLoopSkillExecutionEnd, type AgentLoopSkillExecutionEndOptions, type AgentLoopSkillExecutionStart, type AgentLoopSkillExecutionStartOptions, type AgentLoopTextDelta, type AgentLoopThinkingDelta, type AgentLoopToolExecutionEnd, type AgentLoopToolExecutionEndOptions, type AgentLoopToolExecutionStart, type AgentLoopToolExecutionStartOptions, type AgentLoopToolExecutionUpdate, type AgentLoopToolExecutionUpdateOptions, type AgentMemoryAuthority, AgentMemoryError, type AgentMemoryHandle, type AgentMemoryIdentity, type AgentMemoryService, type AgentMemoryServiceOptions, type AgentMemorySnapshot, type AgentModelContentObserver, type AgentModelExecutionEnded, type AgentModelExecutionEvent, type AgentModelExecutionStarted, type AgentModelInputObservation, type AgentModelOutputObservation, type AgentModelUsage, type AgentPromptResult, type AgentRunAccepted, AgentRunCancelled, type AgentRunCancelled$1 as AgentRunCancelledEvent, type AgentRunCompleted, type AgentRunFailed, type AgentRunId, type AgentRunPhase, type AgentRunSnapshot, type AgentRunState, type AgentRunSummary, type AgentRunUpdate, type AgentRunUpdateCallback, type AgentRunUpdateHandler, type AgentRunUpdateListener, type AgentRuntime, type AgentRuntimeCancellation, AgentRuntimeDisposed, type AgentRuntimeInput, type AgentRuntimePool, type AgentRuntimePoolOptions, type AgentSessionAvailability, type AgentSessionBusyAvailability, type AgentSessionClient, type AgentSessionHandle, type AgentSessionOtherBusyAvailability, type AgentSessionOwnedBusyAvailability, type AgentSessionSnapshot, type AgentSessionSummary, type AgentSkillExecutionEnded, type AgentSkillExecutionStarted, type AgentSkillExecutionState, type AgentTextDeltaCallback, type AgentToolExecutionEnded, type AgentToolExecutionEvent, type AgentToolExecutionStarted, type AgentToolExecutionUpdated, type AgentTranscript, type AgentTranscriptMessage, type AgentTranscriptMessageRole, type AgentTranscriptTurn, type AgentTurnCompleted, type AgentTurnStarted, type ApprovedHumanInteractionState, type AssembledAgentContext, type AssistantTextDelta, type AssistantThinkingDelta, type AsyncIterableAgentLoopOptions, type AuthorizationPolicyProvider, type AuthorizationPolicyState, type AutomationAgentInvocationOrigin, type AutomationBinding, type AutomationDeliveryBinding, type AutomationMandate, AutomationMandateError, type AutomationMandateStore, type AutomationOutcome, type AutomationTick, type AutomationTickRecord, type AutomationTickRepository, type AutomationTickStatus, type CancelledHumanInteractionState, type CommitAutomationOutcomeInput, type CommittedAutomationOutcome, CompactionError, type CompactionInput, type CompactionService, type CompactionSnapshot, type CompactorPort, type CompositeRivusDaemonTransportOptions, type ConfiguredFeishuCardKitPublisherOptions, type ConfiguredFeishuCardKitTargetPreparationOptions, type ConfiguredFeishuHumanInteractionPresenterOptions, type ConfiguredFeishuOpenApiRequest, type ConfiguredFeishuOpenApiResponse, type ConfiguredRivusDaemonBootstrap, type ConfiguredRivusDaemonBootstrapOptions, type ConfiguredRivusDaemonBootstrapRequest, type ConfiguredRivusDaemonBootstrapResponse, type ConsumeToolApprovalInput, type CreateConfiguredRivusDeploymentDaemonOptions, type CreateRivusDeploymentAutomationInput, type CreateRivusDeploymentDaemonOptions, type CreateRivusDeploymentEndpointInput, type CreateRivusDeploymentRuntimeInput, type DailyAutomationSchedule, type DeadLetterRecoveryItem, type DeadLetterRequeueResult, type DefaultAgentHarnessClientFromCallbackOptions, type DefaultAgentHarnessClientFromTextCallbackOptions, type DefaultAgentHarnessClientOptions, type DefaultAgentHarnessFromCallbackOptions, type DefaultAgentHarnessFromTextCallbackOptions, type DefaultAgentHarnessOptions, type DefaultAgentRuntimeFromCallbackOptions, type DefaultAgentRuntimeFromTextCallbackOptions, type DefaultAgentRuntimeOptions, type DefaultAgentRuntimeSessionOptions, DelegationDenied, type DelegationEdge, type DelegationGrant, type DelegationRequest, type DelegationService, type DeliveryJob, type DeliveryJobStatus, type DeliveryOutbox, DeliveryOutboxError, type EventAgentLoopOptions, type ExpiredHumanInteractionState, type FeishuAgentCommand, type FeishuAgentDaemon, type FeishuAgentDaemonCancelResult, type FeishuAgentDaemonHandleMessageOptions, type FeishuAgentDaemonHandleResult, type FeishuAgentDaemonInteractionResult, type FeishuAgentDaemonOptions, type FeishuAgentDaemonRunResult, type FeishuAgentDaemonSkippedResult, type FeishuAgentExecution, type FeishuAgentExecutionResult, type FeishuAgentInvocationOrigin, type FeishuAgentMessageSideEffects, type FeishuAgentRunCardInput, type FeishuAgentRunPreparation, type FeishuAgentRuntime, type FeishuAgentRuntimeOptions, type FeishuAutomationCardInput, type FeishuAutomationCardSender, type FeishuCancelMessageIntakeSummary, type FeishuCancelRunCommand, type FeishuCardActionCallbackResponse, type FeishuCardActionCommand, type FeishuCardActionIntakeError, type FeishuCardActionToast, type FeishuCardActionTriggerPayload, type FeishuCardDeliveryLedger, type FeishuCardDeliveryLedgerStateOptions, type FeishuCardDeliveryReconciler, type FeishuCardDeliveryReconcilerOptions, type FeishuCardDeliveryRecord, type FeishuCardKitCancel, type FeishuCardKitClient, type FeishuCardKitFail, type FeishuCardKitFinish, type FeishuCardKitOpenApiClientOptions, type FeishuCardKitOpenApiTargetCreatorOptions, type FeishuCardKitPublisher, type FeishuCardKitPublisherOptions, type FeishuCardKitTextUpdate, type FeishuCardTarget, type FeishuCardTargetCreator, FeishuCardTargetNotFound, type FeishuCardTargetPreparationOptions, type FeishuCardTargetRegistry, type FeishuCardTargetRegistryOperation, FeishuCardTargetRegistryStoreError, type FeishuCoalescingPublisher, type FeishuCoalescingPublisherOptions, type FeishuConversationReference, FeishuCotProtocolError, type FeishuCotPublisher, type FeishuCotPublisherOptions, type FeishuCotRunPreparation, type FeishuDeploymentEndpointOptions, FeishuEndpointCredentialError, type FeishuEndpointCredentials, type FeishuEndpointGroupPolicy, type FeishuEventHandlerCardActions, type FeishuEventHandlerQueue, type FeishuEventHandlers, type FeishuEventHandlersOptions, type FeishuHumanInteractionActions, type FeishuHumanInteractionPresenterOptions, type FeishuInboxCompletedState, type FeishuInboxDeadState, type FeishuInboxDelivery, type FeishuInboxDeliveryState, type FeishuInboxLeasedState, type FeishuInboxPendingState, type FeishuInboxRepository, type FeishuInboxRepositoryStateOptions, type FeishuMessageAcceptResult, type FeishuMessageDrainResult, type FeishuMessageIntakeBaseSummary, type FeishuMessageIntakeError, type FeishuMessageIntakeOptions, type FeishuMessageIntakeSummary, type FeishuMessageQueue, type FeishuMessageQueueOptions, type FeishuMessageWorker, type FeishuMessageWorkerDrainAvailableResult, type FeishuMessageWorkerOptions, type FeishuMessageWorkerQueue, type FeishuOpenApiClient, FeishuOpenApiError, type FeishuOpenApiRequest, type FeishuOpenApiResponse, type FeishuPeriodicFlush, type FeishuPeriodicFlushOptions, type FeishuPeriodicFlushSupervisor, type FeishuPresentationPreparationOptions, type FeishuPromptAgentCommand, type FeishuPromptMessageIntakeSummary, type FeishuRawCardJson, type FeishuReceiveAcceptedObservation, type FeishuReceiveHandledObservation, type FeishuReceiveMessageHandlerPayload, type FeishuReceiveMessagePayload, type FeishuReceiveMessageReplayOptions, type FeishuReceiveMessageReplayResult, type FeishuReceiveMessageSummary, type FeishuReceiveRuntimeStatus, type FeishuResolveInteractionCommand, type FeishuSdkReceiveMessagePayload, type FeishuSessionReference, type FeishuStreamAction, type FeishuStreamActionPublisher, type FeishuStreamProjector, FeishuTenantAccessTokenError, type FeishuTenantAccessTokenProvider, type FeishuTenantAccessTokenProviderOptions, type FeishuTenantAccessTokenRequest, type FeishuTenantAccessTokenResponse, type FeishuTextReplySender, type FeishuWebSocketClient, type FeishuWebSocketClientStartOptions, type FeishuWebSocketDaemon, type FeishuWebSocketDaemonOptions, type FeishuWebSocketEventDispatcher, type FeishuWebSocketRuntime, type FeishuWorkerLoop, type FeishuWorkerLoopOptions, type FetchLike, type FetchLikeResponse, type HumanInteraction, type HumanInteractionActor, type HumanInteractionBase, type HumanInteractionClock, type HumanInteractionEndpointRegistry, type HumanInteractionFact, type HumanInteractionId, type HumanInteractionPresenter, type HumanInteractionRepository, HumanInteractionRepositoryError, type HumanInteractionResolutionAction, type HumanInteractionService, type HumanInteractionServiceOptions, type HumanInteractionTransition, HumanInteractionTransitionDenied, InvalidFeishuCardAction, InvalidFeishuMessageContent, InvalidFeishuSessionReference, InvalidInvocationAuthority, InvalidProjectSkillCatalog, InvalidRecoveryAction, InvalidRivusEndpointBinding, InvalidRivusPlugin, InvalidRivusProjectSpace, InvalidStableJson, InvalidToolInput, InvalidWorkspaceRoot, type InvocationAuthority, type InvocationAuthorityRef, type JsonFetchRequestOptions, type JsonFileFeishuCardTargetRegistryOptions, type JsonHttpRequest, type JsonHttpResponse, type JsonlAgentEventLogOptions, type JsonlFeishuCardDeliveryLedgerOptions, type JsonlFeishuInboxRepositoryOptions, type JsonlHumanInteractionRepositoryOptions, type JsonlRecoveryControlOptions, type LangfuseAgentTelemetry, type LangfuseTelemetryConfig, LangfuseTelemetryConfigError, type LangfuseTelemetryContentMode, type LangfuseTelemetryEnv, type LoadRivusDeploymentManifestOptions, type LoadRivusDeploymentOptions, type LoadedRivusDeployment, type LocalCliAgentInvocationOrigin, MEMORY_SCOPES, type MemoryBinding, type MemoryInvocationAudience, type MemoryRecord, type MemoryScope, type MemorySearchQuery, type MemoryState, type MemoryTombstoneReceipt, OpenClawEnvImportError, type OpenClawEnvImportOptions, type OpenClawEnvImportResult, type OpenJsonAutomationTickRepositoryOptions, type OpenTelemetryAgentEventSinkOptions, type OpenTelemetryAgentTelemetry, type PendingHumanInteractionState, type PiAgentLoopOptions, type PiAgentSession, type PiAgentSessionEvent, type PiAgentSessionHandle, type PiCreateAgentSessionResult, type PiSdkAgentLoopOptions, type PiSessionRegistry, type PiSessionRegistryOptions, type PiToolApprovalGateway, type PiToolApprovalRequest, type PiToolProxyOptions, PluginStateConflict, type PluginStateRecord, type PluginStateStore, type PooledAgentRuntime, type ProjectMemoryPromptInput, type ProjectMemoryRecallIdentity, type ProjectMemoryRecallOptions, type ProjectSkillCatalogDiagnostic, type ProjectSkillCatalogEntry, type PromptCommand, type PutPluginState, RIVUS_MEMORY_TOOL_ID, RIVUS_MEMORY_TOOL_PLUGIN_ID, RIVUS_MEMORY_TOOL_VERSION, RIVUS_PLUGIN_API_VERSION, type RateLimitedFeishuPublisherOptions, type RecoveryAction, type RecoveryControl, type RecoveryControlOptions, type RecoverySnapshot, type RegisteredRivusAgentProfile, type RegisteredRivusAutomation, type RegisteredRivusPlugin, type RegisteredRivusSkill, type RegisteredRivusTool, type RejectedHumanInteractionState, type RequestToolApprovalInput, type RequestUserDecisionInput, type ResolveHumanInteractionInput, type ResolvedRivusAgentDefinition, type ResolvedRivusAutomationDefinition, type ResolvedRivusProjectSpace, type RivusAgentDeployment, type RivusAgentDeploymentStatus, type RivusAgentHost, type RivusAgentHostOptions, type RivusAgentProfile, type RivusAutomationDelivery, type RivusAutomationDeliveryTargetType, type RivusAutomationDeployment, type RivusAutomationInput, type RivusAutomationTemplate, type RivusAutomationTickContext, type RivusDaemonBootstrapContext, type RivusDaemonBootstrapFactory, type RivusDaemonBootstrapModule, type RivusDaemonCliOptions, type RivusDaemonCliWriter, type RivusDaemonConfig, RivusDaemonConfigError, type RivusDaemonConfigLoaderOptions, type RivusDaemonEnv, type RivusDaemonFeishuReplayRunner, type RivusDaemonProcess, type RivusDaemonProcessOptions, type RivusDaemonPromptRunner, type RivusDaemonRecoveryRunner, type RivusDaemonShutdownController, type RivusDaemonShutdownControllerOptions, type RivusDaemonShutdownSignal, type RivusDaemonSignalSource, type RivusDaemonStatus, type RivusDaemonStatusHttpServer, type RivusDaemonStatusHttpServerOptions, type RivusDaemonStatusReporter, type RivusDaemonStatusReporterOptions, type RivusDaemonTransport, type RivusDaemonWorkerLoop, type RivusDeploymentAutomation, type RivusDeploymentAutomationLifecycle, RivusDeploymentAutomationReadinessError, type RivusDeploymentAutomationStatus, type RivusDeploymentBootstrapAdapters, type RivusDeploymentBootstrapContext, type RivusDeploymentBootstrapFactory, type RivusDeploymentCliProcess, type RivusDeploymentComponentLifecycle, type RivusDeploymentDaemon, type RivusDeploymentDaemonLifecycle, RivusDeploymentDaemonLifecycleError, type RivusDeploymentDaemonStatus, type RivusDeploymentEndpoint, type RivusDeploymentEndpointLifecycle, type RivusDeploymentEndpointStatus, type RivusDeploymentManifest, RivusDeploymentManifestError, RivusDeploymentReadinessError, type RivusEndpointDefinition, type RivusEndpointDeployment, type RivusEndpointExperimentalFeatures, type RivusEndpointInput, type RivusEnvFileVariables, type RivusHostToolDescriptor, type RivusMemoryTool, type RivusPlugin, type RivusPluginCatalog, type RivusPluginCatalogSnapshot, RivusPluginConformanceError, type RivusPluginConformanceInput, type RivusPluginConformanceReport, type RivusPluginDeclaration, type RivusPluginLifecycleProbe, RivusPluginLoadError, type RivusPluginLoadStatus, type RivusPluginManifest, type RivusPluginModule, type RivusPluginModuleLoadRequest, type RivusPluginRegistry, type RivusProjectSpaceDeployment, type RivusResolvedToolDescriptor, type RivusSkillDescriptor, type RivusSkillGrantSet, type RivusTextFileReader, type RivusThinkingLevel, type RivusToolDescriptor, type RivusToolExecutionContext, type RivusToolExecutor, type RivusToolFactoryContext, type RivusToolGrantSet, type RivusToolIdempotency, RivusToolInputRejected, type RivusToolRisk, type RunIdGenerator, type ScheduledAutomation, type ScheduledAutomationClock, type ScheduledAutomationDeliveryInput, type ScheduledAutomationOptions, type ScheduledAutomationRunInput, type ScheduledAutomationRunResult, type SelectedHumanInteractionState, type SessionKey, type SessionScheduler, SessionSchedulerCapacityExceeded, SessionSchedulerDisposed, type SessionSchedulerOptions, type SessionSchedulerStatus, type SpawnSubagentRequest, type SubagentCoordinator, type SubagentRecord, type TelemetryContentRedactor, type TelemetryContentRedactorOptions, type TerminalAgentDomainEvent, type TextAgentLoopCallback, type TextAgentLoopOptions, type ToolApprovalBinding, type ToolApprovalInteraction, type ToolApprovalInteractionState, type ToolApprovalRequest, type ToolApprovalService, type ToolBroker, type ToolBrokerOptions, type ToolExecutionRequest, ToolInvocationDenied, type ToolOperationBeginResult, type ToolOperationBinding, type ToolOperationInspectResult, type ToolOperationLedger, type ToolOperationReconciliation, type ToolOperationReconciliationOutcome, type ToolOperationRecord, type ToolOperationRecoveryItem, type ToolOperationResolutionResult, type ToolOperationState, UnsupportedFeishuCardAction, UnsupportedFeishuMessage, type UserDecisionInteraction, type UserDecisionInteractionState, type UserDecisionOption, type WorkspaceInstructionSource, type WorkspaceInstructionsDiagnostic, type WorkspaceInstructionsDiagnosticCode, type WorkspaceInstructionsProvider, type WorkspaceInstructionsRequest, WorkspaceInstructionsSourceError, type WorkspaceInstructionsView, type WorkspaceRootHandle, assembleAgentContext, assertRivusPluginConforms, commitAutomationOutcome, createAgentCommandFromFeishuCardAction, createAgentCommandFromFeishuMessage, createAgentConversationMessages, createAgentDomainEventHandler, createAgentDomainEventSink, createAgentDomainEventSinkFromCallback, createAgentHarness, createAgentHarnessClient, createAgentHarnessPooledRuntime, createAgentInstanceRegistry, createAgentLoopFromCallback, createAgentLoopModelExecutionEnd, createAgentLoopModelExecutionStart, createAgentLoopPromptTransformer, createAgentLoopSkillExecutionEnd, createAgentLoopSkillExecutionStart, createAgentLoopTextDelta, createAgentLoopThinkingDelta, createAgentLoopToolExecutionEnd, createAgentLoopToolExecutionStart, createAgentLoopToolExecutionUpdate, createAgentMemoryService, createAgentRunUpdateHandler, createAgentRuntime, createAgentRuntimePool, createAgentTranscriptMessages, createAgentTranscriptTurn, createAgentsMdInstructionsProvider, createAsyncIterableAgentLoop, createAutomationMandateStore, createCoalescingFeishuPublisher, createCompactionService, createCompositeRivusDaemonTransport, createConfiguredFeishuAutomationCardSender, createConfiguredFeishuCardKitPublisher, createConfiguredFeishuCardKitTargetPreparation, createConfiguredFeishuHumanInteractionPresenter, createConfiguredFeishuOpenApiClient, createConfiguredFeishuTextReplySender, createConfiguredRivusDaemonBootstrap, createConfiguredRivusDeploymentDaemon, createDailyAutomationSchedule, createDefaultAgentHarness, createDefaultAgentHarnessClient, createDefaultAgentHarnessClientFromCallback, createDefaultAgentHarnessClientFromTextCallback, createDefaultAgentHarnessFromCallback, createDefaultAgentHarnessFromTextCallback, createDefaultAgentRuntime, createDefaultAgentRuntimeFromCallback, createDefaultAgentRuntimeFromTextCallback, createDelegationService, createDeliveryOutbox, createEventAgentLoop, createFakeRivusPlugin, createFeishuAgentDaemon, createFeishuAgentRunCard, createFeishuAgentRuntime, createFeishuCardActionCallbackResponse, createFeishuCardActionErrorResponse, createFeishuCardDeliveryLedger, createFeishuCardDeliveryReconciler, createFeishuCardKitOpenApiClient, createFeishuCardKitOpenApiTargetCreator, createFeishuCardKitPublisher, createFeishuCardTargetPreparation, createFeishuConversationId, createFeishuCotPublisher, createFeishuDeploymentEndpoint, createFeishuEventHandlers, createFeishuHumanInteractionCard, createFeishuHumanInteractionPresenter, createFeishuInboxRepository, createFeishuMessageQueue, createFeishuMessageWorker, createFeishuOpenApiClient, createFeishuPeriodicFlush, createFeishuPresentationPreparation, createFeishuSessionKey, createFeishuStreamProjector, createFeishuTenantAccessTokenProvider, createFeishuWebSocketDaemon, createFeishuWorkerLoop, createFixedClock, createHumanInteractionEndpointRegistry, createHumanInteractionService, createHumanInteractionToolApprovalGateway, createInMemoryFeishuCardTargetRegistry, createInMemoryHumanInteractionRepository, createInvocationAuthority, createJsonFetchRequest, createJsonFileFeishuCardTargetRegistry, createJsonlAgentEventLog, createJsonlHumanInteractionRepository, createLangfuseAgentTelemetry, createLazyFeishuWebSocketEventDispatcher, createMemoryNamespace, createOpenTelemetryAgentEventSink, createOpenTelemetryAgentTelemetry, createPiAgentLoop, createPiSdkAgentLoop, createPiSessionRegistry, createPiSkillRuntime, createPiToolNameResolver, createPiToolProxyDefinitions, createPluginStateStore, createProjectMemoryPromptPreparer, createRateLimitedFeishuPublisher, createRecoveryAction, createRecoveryControl, createRivusAgentHost, createRivusDaemonProcess, createRivusDaemonShutdownController, createRivusDaemonStatusHttpServer, createRivusDaemonStatusReporter, createRivusDeploymentCliProcess, createRivusDeploymentDaemon, createRivusEnvFromOpenClawConfig, createRivusMemoryTool, createRivusMemoryToolContract, createRivusMemoryToolDescriptor, createRivusPluginCatalog, createRoutedHumanInteractionToolApprovalService, createScheduledAutomation, createSequenceRunIds, createSessionScheduler, createSubagentCoordinator, createSystemClock, createTelemetryContentRedactor, createTextAgentLoop, createTextAgentLoopFromCallback, createToolBroker, createToolInputDigest, createToolOperationLedger, createUuidRunIds, createWorkspaceRootHandle, describeFeishuMessageIntake, evolveAgentRun, formatRivusEnvFile, initialAgentRunState, intersectToolIds, isAgentToolExecutionEvent, isAssistantTextDeltaEvent, isAssistantThinkingDeltaEvent, isTerminalAgentDomainEvent, isTerminalAgentRunPhase, loadNodeRivusPluginModule, loadRivusDaemonConfig, loadRivusDeployment, loadRivusDeploymentManifest, normalizeStableJson, openJsonAutomationTickRepository, openJsonlAgentMemoryService, openJsonlFeishuCardDeliveryLedger, openJsonlFeishuInboxRepository, openJsonlRecoveryControl, openJsonlToolOperationLedger, replayAgentHistory, replayAgentTranscript, requiresToolApproval, resolveFeishuEndpointCredentials, resolveLangfuseTelemetryConfig, resolveRivusAgentDefinition, resolveRivusProjectSpace, restoreAgentHistory, restoreConfiguredRivusDaemonBootstrap, restrictMemoryScopesForAudience, runRivusDaemonCli, shouldAcceptFeishuEndpointMessage, transitionHumanInteraction, validateProjectSkillCatalog, validateProjectSkillCommand, validateRivusDeploymentManifest };
3131
+ export { type ActiveAgentRun, type AgentClientAttempt, type AgentClientFailure, type AgentClientSuccess, type AgentClock, AgentContextBudgetExceeded, type AgentContextInput, type AgentContextLayer, type AgentContextLayerKind, type AgentConversationMessagesOptions, type AgentDomainEvent, type AgentDomainEventCallback, type AgentDomainEventHandler, type AgentDomainEventListener, type AgentDomainEventSink, type AgentDomainEventSinkCallback, AgentEventHandlerFailed, type AgentEventLog, type AgentEventLogOperation, AgentEventLogStoreError, AgentEventSinkFailed, type AgentHarness, type AgentHarnessAvailability, AgentHarnessBusy, type AgentHarnessBusyAvailability, type AgentHarnessClient, type AgentHarnessError, type AgentHarnessIdleAvailability, type AgentHarnessOptions, type AgentHistory, type AgentHistoryEventLog, AgentInstanceBusy, AgentInstanceConflict, type AgentInstanceRecord, type AgentInstanceRegistry, type AgentInstanceRegistryOptions, type AgentInvocationOrigin, type AgentLoop, type AgentLoopCallback, type AgentLoopCallbackOutput, type AgentLoopCallbackResult, type AgentLoopEvent, type AgentLoopEventLike, AgentLoopFailed, type AgentLoopInput, type AgentLoopModelExecutionEnd, type AgentLoopModelExecutionEndOptions, type AgentLoopModelExecutionStart, type AgentLoopModelExecutionStartOptions, type AgentLoopSkillExecutionEnd, type AgentLoopSkillExecutionEndOptions, type AgentLoopSkillExecutionStart, type AgentLoopSkillExecutionStartOptions, type AgentLoopTextDelta, type AgentLoopThinkingDelta, type AgentLoopToolExecutionEnd, type AgentLoopToolExecutionEndOptions, type AgentLoopToolExecutionStart, type AgentLoopToolExecutionStartOptions, type AgentLoopToolExecutionUpdate, type AgentLoopToolExecutionUpdateOptions, type AgentMemoryAuthority, AgentMemoryError, type AgentMemoryHandle, type AgentMemoryIdentity, type AgentMemoryService, type AgentMemoryServiceOptions, type AgentMemorySnapshot, type AgentModelContentObserver, type AgentModelExecutionEnded, type AgentModelExecutionEvent, type AgentModelExecutionStarted, type AgentModelInputObservation, type AgentModelOutputObservation, type AgentModelUsage, type AgentPromptResult, type AgentRunAccepted, AgentRunCancelled, type AgentRunCancelled$1 as AgentRunCancelledEvent, type AgentRunCompleted, type AgentRunFailed, type AgentRunId, type AgentRunPhase, type AgentRunSnapshot, type AgentRunState, type AgentRunSummary, type AgentRunUpdate, type AgentRunUpdateCallback, type AgentRunUpdateHandler, type AgentRunUpdateListener, type AgentRuntime, type AgentRuntimeCancellation, AgentRuntimeDisposed, type AgentRuntimeInput, type AgentRuntimePool, type AgentRuntimePoolOptions, type AgentSessionAvailability, type AgentSessionBusyAvailability, type AgentSessionClient, type AgentSessionHandle, type AgentSessionOtherBusyAvailability, type AgentSessionOwnedBusyAvailability, type AgentSessionSnapshot, type AgentSessionSummary, type AgentSkillExecutionEnded, type AgentSkillExecutionStarted, type AgentSkillExecutionState, type AgentTextDeltaCallback, type AgentToolExecutionEnded, type AgentToolExecutionEvent, type AgentToolExecutionStarted, type AgentToolExecutionUpdated, type AgentTranscript, type AgentTranscriptMessage, type AgentTranscriptMessageRole, type AgentTranscriptTurn, type AgentTurnCompleted, type AgentTurnStarted, type ApprovedHumanInteractionState, type AssembledAgentContext, type AssistantTextDelta, type AssistantThinkingDelta, type AsyncIterableAgentLoopOptions, type AuthorizationPolicyProvider, type AuthorizationPolicyState, type AutomationAgentInvocationOrigin, type AutomationBinding, type AutomationDeliveryBinding, type AutomationMandate, AutomationMandateError, type AutomationMandateStore, type AutomationOutcome, type AutomationTick, type AutomationTickRecord, type AutomationTickRepository, type AutomationTickStatus, type CancelledHumanInteractionState, type CardPresentation, type CardPresentationChain, type CardPresentationStatus, CardPresentationTransitionDenied, type CommitAutomationOutcomeInput, type CommittedAutomationOutcome, CompactionError, type CompactionInput, type CompactionService, type CompactionSnapshot, type CompactorPort, type CompositeRivusDaemonTransportOptions, type ConfiguredFeishuCardKitPublisherOptions, type ConfiguredFeishuCardRolloverRuntime, type ConfiguredFeishuCardRolloverRuntimeOptions, type ConfiguredFeishuHumanInteractionPresenterOptions, type ConfiguredFeishuOpenApiRequest, type ConfiguredFeishuOpenApiResponse, type ConfiguredRivusDaemonBootstrap, type ConfiguredRivusDaemonBootstrapOptions, type ConfiguredRivusDaemonBootstrapRequest, type ConfiguredRivusDaemonBootstrapResponse, type ConsumeToolApprovalInput, type CreateConfiguredRivusDeploymentDaemonOptions, type CreateRivusDeploymentAutomationInput, type CreateRivusDeploymentDaemonOptions, type CreateRivusDeploymentEndpointInput, type CreateRivusDeploymentRuntimeInput, DEFAULT_CARD_STREAM_LEASE_MS, type DailyAutomationSchedule, type DeadLetterRecoveryItem, type DeadLetterRequeueResult, type DefaultAgentHarnessClientFromCallbackOptions, type DefaultAgentHarnessClientFromTextCallbackOptions, type DefaultAgentHarnessClientOptions, type DefaultAgentHarnessFromCallbackOptions, type DefaultAgentHarnessFromTextCallbackOptions, type DefaultAgentHarnessOptions, type DefaultAgentRuntimeFromCallbackOptions, type DefaultAgentRuntimeFromTextCallbackOptions, type DefaultAgentRuntimeOptions, type DefaultAgentRuntimeSessionOptions, DelegationDenied, type DelegationEdge, type DelegationGrant, type DelegationRequest, type DelegationService, type DeliveryJob, type DeliveryJobStatus, type DeliveryOutbox, DeliveryOutboxError, type EventAgentLoopOptions, type ExpiredHumanInteractionState, type FeishuAgentCommand, type FeishuAgentDaemon, type FeishuAgentDaemonCancelResult, type FeishuAgentDaemonHandleMessageOptions, type FeishuAgentDaemonHandleResult, type FeishuAgentDaemonInteractionResult, type FeishuAgentDaemonOptions, type FeishuAgentDaemonRunResult, type FeishuAgentDaemonSkippedResult, type FeishuAgentExecution, type FeishuAgentExecutionResult, type FeishuAgentInvocationOrigin, type FeishuAgentMessageSideEffects, type FeishuAgentRunCardInput, type FeishuAgentRunPreparation, type FeishuAgentRuntime, type FeishuAgentRuntimeOptions, type FeishuAutomationCardInput, type FeishuAutomationCardSender, type FeishuCancelMessageIntakeSummary, type FeishuCancelRunCommand, type FeishuCardActionCallbackResponse, type FeishuCardActionCommand, type FeishuCardActionIntakeError, type FeishuCardActionToast, type FeishuCardActionTriggerPayload, type FeishuCardDeliveryLedger, type FeishuCardDeliveryLedgerStateOptions, type FeishuCardDeliveryReconciler, type FeishuCardDeliveryReconcilerOptions, type FeishuCardDeliveryRecord, type FeishuCardKitCancel, type FeishuCardKitClient, type FeishuCardKitFail, type FeishuCardKitFinish, type FeishuCardKitHandoff, type FeishuCardKitOpenApiClientOptions, type FeishuCardKitOpenApiTargetCreatorOptions, type FeishuCardKitPublisher, type FeishuCardKitPublisherOptions, type FeishuCardKitTextUpdate, type FeishuCardPresentationBinder, type FeishuCardPresentationHandoffStart, FeishuCardPresentationNotFound, type FeishuCardPresentationStore, type FeishuCardPresentationStoreOptions, type FeishuCardRollover, type FeishuCardRolloverCounters, type FeishuCardRolloverEvent, type FeishuCardRolloverEventType, type FeishuCardRolloverHandoffResult, type FeishuCardRolloverOptions, type FeishuCardRolloverStatus, type FeishuCardRolloverSupervisor, type FeishuCardRolloverSupervisorOptions, type FeishuCardTarget, type FeishuCardTargetCreateOptions, type FeishuCardTargetCreator, FeishuCardTargetNotFound, type FeishuCardTargetPreparationOptions, type FeishuCardTargetRegistry, type FeishuCardTargetRegistryOperation, FeishuCardTargetRegistryStoreError, type FeishuCoalescingPublisher, type FeishuCoalescingPublisherOptions, type FeishuConversationReference, FeishuCotProtocolError, type FeishuCotPublisher, type FeishuCotPublisherOptions, type FeishuCotRunPreparation, type FeishuDeploymentEndpointOptions, FeishuEndpointCredentialError, type FeishuEndpointCredentials, type FeishuEndpointGroupPolicy, type FeishuEventHandlerCardActions, type FeishuEventHandlerQueue, type FeishuEventHandlers, type FeishuEventHandlersOptions, type FeishuHumanInteractionActions, type FeishuHumanInteractionPresenterOptions, type FeishuInboxCompletedState, type FeishuInboxDeadState, type FeishuInboxDelivery, type FeishuInboxDeliveryState, type FeishuInboxLeasedState, type FeishuInboxPendingState, type FeishuInboxRepository, type FeishuInboxRepositoryStateOptions, type FeishuMessageAcceptResult, type FeishuMessageDrainResult, type FeishuMessageIntakeBaseSummary, type FeishuMessageIntakeError, type FeishuMessageIntakeOptions, type FeishuMessageIntakeSummary, type FeishuMessageQueue, type FeishuMessageQueueOptions, type FeishuMessageWorker, type FeishuMessageWorkerDrainAvailableResult, type FeishuMessageWorkerOptions, type FeishuMessageWorkerQueue, type FeishuOpenApiClient, FeishuOpenApiError, type FeishuOpenApiRequest, type FeishuOpenApiResponse, type FeishuPeriodicFlush, type FeishuPeriodicFlushOptions, type FeishuPeriodicFlushSupervisor, type FeishuPresentationPreparationOptions, type FeishuPromptAgentCommand, type FeishuPromptMessageIntakeSummary, type FeishuRawCardJson, type FeishuReceiveAcceptedObservation, type FeishuReceiveHandledObservation, type FeishuReceiveMessageHandlerPayload, type FeishuReceiveMessagePayload, type FeishuReceiveMessageReplayOptions, type FeishuReceiveMessageReplayResult, type FeishuReceiveMessageSummary, type FeishuReceiveRuntimeStatus, type FeishuResolveInteractionCommand, type FeishuSdkReceiveMessagePayload, type FeishuSessionReference, type FeishuStreamAction, type FeishuStreamActionPublisher, type FeishuStreamProjector, FeishuTenantAccessTokenError, type FeishuTenantAccessTokenProvider, type FeishuTenantAccessTokenProviderOptions, type FeishuTenantAccessTokenRequest, type FeishuTenantAccessTokenResponse, type FeishuTextReplySender, type FeishuWebSocketClient, type FeishuWebSocketClientStartOptions, type FeishuWebSocketDaemon, type FeishuWebSocketDaemonOptions, type FeishuWebSocketEventDispatcher, type FeishuWebSocketRuntime, type FeishuWorkerLoop, type FeishuWorkerLoopOptions, type FetchLike, type FetchLikeResponse, type HumanInteraction, type HumanInteractionActor, type HumanInteractionBase, type HumanInteractionClock, type HumanInteractionEndpointRegistry, type HumanInteractionFact, type HumanInteractionId, type HumanInteractionPresenter, type HumanInteractionRepository, HumanInteractionRepositoryError, type HumanInteractionResolutionAction, type HumanInteractionService, type HumanInteractionServiceOptions, type HumanInteractionTransition, HumanInteractionTransitionDenied, InvalidFeishuCardAction, InvalidFeishuMessageContent, InvalidFeishuSessionReference, InvalidInvocationAuthority, InvalidProjectSkillCatalog, InvalidRecoveryAction, InvalidRivusEndpointBinding, InvalidRivusPlugin, InvalidRivusProjectSpace, InvalidStableJson, InvalidToolInput, InvalidWorkspaceRoot, type InvocationAuthority, type InvocationAuthorityRef, type JsonFetchRequestOptions, type JsonFileFeishuCardTargetRegistryOptions, type JsonHttpRequest, type JsonHttpResponse, type JsonlAgentEventLogOptions, type JsonlFeishuCardDeliveryLedgerOptions, type JsonlFeishuInboxRepositoryOptions, type JsonlHumanInteractionRepositoryOptions, type JsonlRecoveryControlOptions, type LangfuseAgentTelemetry, type LangfuseTelemetryConfig, LangfuseTelemetryConfigError, type LangfuseTelemetryContentMode, type LangfuseTelemetryEnv, type LoadRivusDeploymentManifestOptions, type LoadRivusDeploymentOptions, type LoadedRivusDeployment, type LocalCliAgentInvocationOrigin, MEMORY_SCOPES, type MemoryBinding, type MemoryInvocationAudience, type MemoryRecord, type MemoryScope, type MemorySearchQuery, type MemoryState, type MemoryTombstoneReceipt, OpenClawEnvImportError, type OpenClawEnvImportOptions, type OpenClawEnvImportResult, type OpenJsonAutomationTickRepositoryOptions, type OpenTelemetryAgentEventSinkOptions, type OpenTelemetryAgentTelemetry, type PendingHumanInteractionState, type PiAgentLoopOptions, type PiAgentSession, type PiAgentSessionEvent, type PiAgentSessionHandle, type PiCreateAgentSessionResult, type PiSdkAgentLoopOptions, type PiSessionRegistry, type PiSessionRegistryOptions, PluginStateConflict, type PluginStateRecord, type PluginStateStore, type PooledAgentRuntime, type ProjectMemoryPromptInput, type ProjectMemoryRecallIdentity, type ProjectMemoryRecallOptions, type ProjectSkillCatalogDiagnostic, type ProjectSkillCatalogEntry, type PromptCommand, type PutPluginState, RIVUS_MEMORY_TOOL_ID, RIVUS_MEMORY_TOOL_PLUGIN_ID, RIVUS_MEMORY_TOOL_VERSION, RIVUS_PLUGIN_API_VERSION, type RateLimitedFeishuPublisherOptions, type RecoveryAction, type RecoveryControl, type RecoveryControlOptions, type RecoverySnapshot, type RegisteredRivusAgentProfile, type RegisteredRivusAutomation, type RegisteredRivusPlugin, type RegisteredRivusSkill, type RegisteredRivusTool, type RejectedHumanInteractionState, type RequestToolApprovalInput, type RequestUserDecisionInput, type ResolveHumanInteractionInput, type ResolvedRivusAgentDefinition, type ResolvedRivusAutomationDefinition, type ResolvedRivusProjectSpace, type RivusAgentDeployment, type RivusAgentDeploymentStatus, type RivusAgentHost, type RivusAgentHostOptions, type RivusAgentProfile, type RivusAutomationDelivery, type RivusAutomationDeliveryTargetType, type RivusAutomationDeployment, type RivusAutomationInput, type RivusAutomationTemplate, type RivusAutomationTickContext, type RivusDaemonBootstrapContext, type RivusDaemonBootstrapFactory, type RivusDaemonBootstrapModule, type RivusDaemonCliOptions, type RivusDaemonCliWriter, type RivusDaemonConfig, RivusDaemonConfigError, type RivusDaemonConfigLoaderOptions, type RivusDaemonEnv, type RivusDaemonFeishuReplayRunner, type RivusDaemonProcess, type RivusDaemonProcessOptions, type RivusDaemonPromptRunner, type RivusDaemonRecoveryRunner, type RivusDaemonShutdownController, type RivusDaemonShutdownControllerOptions, type RivusDaemonShutdownSignal, type RivusDaemonSignalSource, type RivusDaemonStatus, type RivusDaemonStatusHttpServer, type RivusDaemonStatusHttpServerOptions, type RivusDaemonStatusReporter, type RivusDaemonStatusReporterOptions, type RivusDaemonTransport, type RivusDaemonWorkerLoop, type RivusDeploymentAutomation, type RivusDeploymentAutomationLifecycle, RivusDeploymentAutomationReadinessError, type RivusDeploymentAutomationStatus, type RivusDeploymentBootstrapAdapters, type RivusDeploymentBootstrapContext, type RivusDeploymentBootstrapFactory, type RivusDeploymentCliProcess, type RivusDeploymentComponentLifecycle, type RivusDeploymentDaemon, type RivusDeploymentDaemonLifecycle, RivusDeploymentDaemonLifecycleError, type RivusDeploymentDaemonStatus, type RivusDeploymentEndpoint, type RivusDeploymentEndpointLifecycle, type RivusDeploymentEndpointStatus, type RivusDeploymentManifest, RivusDeploymentManifestError, RivusDeploymentReadinessError, type RivusEndpointDefinition, type RivusEndpointDeployment, type RivusEndpointExperimentalFeatures, type RivusEndpointInput, type RivusEnvFileVariables, type RivusHostToolDescriptor, type RivusMemoryTool, type RivusPlugin, type RivusPluginCatalog, type RivusPluginCatalogSnapshot, RivusPluginConformanceError, type RivusPluginConformanceInput, type RivusPluginConformanceReport, type RivusPluginDeclaration, type RivusPluginLifecycleProbe, RivusPluginLoadError, type RivusPluginLoadStatus, type RivusPluginManifest, type RivusPluginModule, type RivusPluginModuleLoadRequest, type RivusPluginRegistry, type RivusProjectSpaceDeployment, type RivusResolvedToolDescriptor, type RivusSkillDescriptor, type RivusSkillGrantSet, type RivusTextFileReader, type RivusThinkingLevel, type RivusToolDescriptor, type RivusToolExecutionContext, type RivusToolExecutor, type RivusToolFactoryContext, type RivusToolGrantSet, type RivusToolIdempotency, RivusToolInputRejected, type RivusToolRisk, type RunIdGenerator, type ScheduledAutomation, type ScheduledAutomationClock, type ScheduledAutomationDeliveryInput, type ScheduledAutomationOptions, type ScheduledAutomationRunInput, type ScheduledAutomationRunResult, type SelectedHumanInteractionState, type SessionKey, type SessionScheduler, SessionSchedulerCapacityExceeded, SessionSchedulerDisposed, type SessionSchedulerOptions, type SessionSchedulerStatus, type SpawnSubagentRequest, type SubagentCoordinator, type SubagentRecord, type TelemetryContentRedactor, type TelemetryContentRedactorOptions, type TerminalAgentDomainEvent, type TextAgentLoopCallback, type TextAgentLoopOptions, type ToolApprovalBinding, type ToolApprovalInteraction, type ToolApprovalInteractionState, type ToolApprovalRequest, type ToolApprovalService, type ToolBroker, type ToolBrokerOptions, type ToolExecutionRequest, ToolInvocationDenied, type ToolOperationBeginResult, type ToolOperationBinding, type ToolOperationInspectResult, type ToolOperationLedger, type ToolOperationReconciliation, type ToolOperationReconciliationOutcome, type ToolOperationRecord, type ToolOperationRecoveryItem, type ToolOperationResolutionResult, type ToolOperationState, UnsupportedFeishuCardAction, UnsupportedFeishuMessage, type UserDecisionInteraction, type UserDecisionInteractionState, type UserDecisionOption, type WorkspaceInstructionSource, type WorkspaceInstructionsDiagnostic, type WorkspaceInstructionsDiagnosticCode, type WorkspaceInstructionsProvider, type WorkspaceInstructionsRequest, WorkspaceInstructionsSourceError, type WorkspaceInstructionsView, type WorkspaceRootHandle, acceptsCardPresentationProgress, activeCardPresentation, assembleAgentContext, assertRivusPluginConforms, commitAutomationOutcome, createAgentCommandFromFeishuCardAction, createAgentCommandFromFeishuMessage, createAgentConversationMessages, createAgentDomainEventHandler, createAgentDomainEventSink, createAgentDomainEventSinkFromCallback, createAgentHarness, createAgentHarnessClient, createAgentHarnessPooledRuntime, createAgentInstanceRegistry, createAgentLoopFromCallback, createAgentLoopModelExecutionEnd, createAgentLoopModelExecutionStart, createAgentLoopPromptTransformer, createAgentLoopSkillExecutionEnd, createAgentLoopSkillExecutionStart, createAgentLoopTextDelta, createAgentLoopThinkingDelta, createAgentLoopToolExecutionEnd, createAgentLoopToolExecutionStart, createAgentLoopToolExecutionUpdate, createAgentMemoryService, createAgentRunUpdateHandler, createAgentRuntime, createAgentRuntimePool, createAgentTranscriptMessages, createAgentTranscriptTurn, createAgentsMdInstructionsProvider, createAsyncIterableAgentLoop, createAutomationMandateStore, createCoalescingFeishuPublisher, createCompactionService, createCompositeRivusDaemonTransport, createConfiguredFeishuAutomationCardSender, createConfiguredFeishuCardKitPublisher, createConfiguredFeishuCardKitTargetCreator, createConfiguredFeishuCardRolloverRuntime, createConfiguredFeishuHumanInteractionPresenter, createConfiguredFeishuOpenApiClient, createConfiguredFeishuTextReplySender, createConfiguredRivusDaemonBootstrap, createConfiguredRivusDeploymentDaemon, createDailyAutomationSchedule, createDefaultAgentHarness, createDefaultAgentHarnessClient, createDefaultAgentHarnessClientFromCallback, createDefaultAgentHarnessClientFromTextCallback, createDefaultAgentHarnessFromCallback, createDefaultAgentHarnessFromTextCallback, createDefaultAgentRuntime, createDefaultAgentRuntimeFromCallback, createDefaultAgentRuntimeFromTextCallback, createDelegationService, createDeliveryOutbox, createEventAgentLoop, createFakeRivusPlugin, createFeishuAgentDaemon, createFeishuAgentRunCard, createFeishuAgentRuntime, createFeishuCardActionCallbackResponse, createFeishuCardActionErrorResponse, createFeishuCardDeliveryLedger, createFeishuCardDeliveryReconciler, createFeishuCardKitOpenApiClient, createFeishuCardKitOpenApiTargetCreator, createFeishuCardKitPublisher, createFeishuCardPresentationStore, createFeishuCardRollover, createFeishuCardRolloverSupervisor, createFeishuCardTargetPreparation, createFeishuConversationId, createFeishuCotPublisher, createFeishuDeploymentEndpoint, createFeishuEventHandlers, createFeishuHumanInteractionCard, createFeishuHumanInteractionPresenter, createFeishuInboxRepository, createFeishuMessageQueue, createFeishuMessageWorker, createFeishuOpenApiClient, createFeishuPeriodicFlush, createFeishuPresentationPreparation, createFeishuSessionKey, createFeishuStreamProjector, createFeishuTenantAccessTokenProvider, createFeishuWebSocketDaemon, createFeishuWorkerLoop, createFixedClock, createHumanInteractionEndpointRegistry, createHumanInteractionService, createHumanInteractionToolApprovalGateway, createInMemoryFeishuCardTargetRegistry, createInMemoryHumanInteractionRepository, createInvocationAuthority, createJsonFetchRequest, createJsonFileFeishuCardTargetRegistry, createJsonlAgentEventLog, createJsonlHumanInteractionRepository, createLangfuseAgentTelemetry, createLazyFeishuWebSocketEventDispatcher, createMemoryNamespace, createOpenTelemetryAgentEventSink, createOpenTelemetryAgentTelemetry, createPiAgentLoop, createPiSdkAgentLoop, createPiSessionRegistry, createPluginStateStore, createProjectMemoryPromptPreparer, createRateLimitedFeishuPublisher, createRecoveryAction, createRecoveryControl, createRivusAgentHost, createRivusDaemonProcess, createRivusDaemonShutdownController, createRivusDaemonStatusHttpServer, createRivusDaemonStatusReporter, createRivusDeploymentCliProcess, createRivusDeploymentDaemon, createRivusEnvFromOpenClawConfig, createRivusMemoryTool, createRivusMemoryToolContract, createRivusMemoryToolDescriptor, createRivusPluginCatalog, createRoutedHumanInteractionToolApprovalService, createScheduledAutomation, createSequenceRunIds, createSessionScheduler, createSubagentCoordinator, createSystemClock, createTelemetryContentRedactor, createTestClock, createTextAgentLoop, createTextAgentLoopFromCallback, createToolBroker, createToolInputDigest, createToolOperationLedger, createUuidRunIds, createWorkspaceRootHandle, describeFeishuMessageIntake, evolveAgentRun, formatRivusEnvFile, initialAgentRunState, intersectToolIds, isAgentToolExecutionEvent, isAssistantTextDeltaEvent, isAssistantThinkingDeltaEvent, isCardPresentationHandoffDue, isTerminalAgentDomainEvent, isTerminalAgentRunPhase, loadNodeRivusPluginModule, loadRivusDaemonConfig, loadRivusDeployment, loadRivusDeploymentManifest, normalizeStableJson, openJsonAutomationTickRepository, openJsonlAgentMemoryService, openJsonlFeishuCardDeliveryLedger, openJsonlFeishuInboxRepository, openJsonlRecoveryControl, openJsonlToolOperationLedger, replayAgentHistory, replayAgentTranscript, requiresToolApproval, resolveFeishuEndpointCredentials, resolveLangfuseTelemetryConfig, resolveRivusAgentDefinition, resolveRivusProjectSpace, restoreAgentHistory, restoreConfiguredRivusDaemonBootstrap, restrictMemoryScopesForAudience, runRivusDaemonCli, shouldAcceptFeishuEndpointMessage, transitionHumanInteraction, validateProjectSkillCatalog, validateProjectSkillCommand, validateRivusDeploymentManifest };