@rivus/agent 0.11.0 → 0.12.5

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,4 +1,4 @@
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";
1
+ import { $ as createAgentTranscriptMessages, A as createAgentLoopModelExecutionEnd, At as AssistantTextDelta, B as createEventAgentLoop, C as AgentLoopToolExecutionUpdateOptions, Ct as AgentSkillExecutionStarted, D as TextAgentLoopCallback, Dt as AgentToolExecutionUpdated, E as EventAgentLoopOptions, Et as AgentToolExecutionStarted, F as createAgentLoopThinkingDelta, Ft as isAssistantTextDeltaEvent, G as FeishuAgentInvocationOrigin, H as createTextAgentLoopFromCallback, I as createAgentLoopToolExecutionEnd, It as isAssistantThinkingDeltaEvent, J as AgentTranscript, K as LocalCliAgentInvocationOrigin, L as createAgentLoopToolExecutionStart, Lt as isTerminalAgentDomainEvent, M as createAgentLoopSkillExecutionEnd, Mt as SessionKey, N as createAgentLoopSkillExecutionStart, Nt as TerminalAgentDomainEvent, O as TextAgentLoopOptions, Ot as AgentTurnCompleted, P as createAgentLoopTextDelta, Pt as isAgentToolExecutionEvent, Q as createAgentConversationMessages, R as createAgentLoopToolExecutionUpdate, S as AgentLoopToolExecutionUpdate, St as AgentSkillExecutionEnded, T as AsyncIterableAgentLoopOptions, Tt as AgentToolExecutionEvent, U as AgentInvocationOrigin, V as createTextAgentLoop, W as AutomationAgentInvocationOrigin, X as AgentTranscriptMessageRole, Y as AgentTranscriptMessage, Z as AgentTranscriptTurn, _ as AgentLoopThinkingDelta, _t as AgentRunAccepted, a as AgentLoopEvent, at as replayAgentHistory, b as AgentLoopToolExecutionStart, bt as AgentRunFailed, c as AgentLoopModelExecutionEnd, ct as AgentSkillExecutionState, d as AgentLoopModelExecutionStartOptions, dt as isTerminalAgentRunPhase, et as createAgentTranscriptTurn, f as AgentLoopSkillExecutionEnd, ft as AgentDomainEvent, g as AgentLoopTextDelta, gt as AgentModelUsage, h as AgentLoopSkillExecutionStartOptions, ht as AgentModelExecutionStarted, i as AgentLoopCallbackResult, it as AgentSessionSummary, j as createAgentLoopModelExecutionStart, jt as AssistantThinkingDelta, k as createAgentLoopFromCallback, kt as AgentTurnStarted, l as AgentLoopModelExecutionEndOptions, lt as evolveAgentRun, m as AgentLoopSkillExecutionStart, mt as AgentModelExecutionEvent, n as AgentLoopCallback, nt as AgentHistory, o as AgentLoopEventLike, ot as AgentRunPhase, p as AgentLoopSkillExecutionEndOptions, pt as AgentModelExecutionEnded, q as AgentConversationMessagesOptions, r as AgentLoopCallbackOutput, rt as AgentRunSummary, s as AgentLoopInput, st as AgentRunState, t as AgentLoop, tt as replayAgentTranscript, u as AgentLoopModelExecutionStart, ut as initialAgentRunState, v as AgentLoopToolExecutionEnd, vt as AgentRunCancelled$1, w as AgentSteeringChannel, wt as AgentToolExecutionEnded, x as AgentLoopToolExecutionStartOptions, xt as AgentRunId, y as AgentLoopToolExecutionEndOptions, yt as AgentRunCompleted, z as createAsyncIterableAgentLoop } 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
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
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";
@@ -129,6 +129,7 @@ type AgentHarnessError = AgentHarnessBusy | AgentLoopFailed | AgentEventSinkFail
129
129
  interface AgentHarness {
130
130
  cancelActiveRun(reason?: string): Effect.Effect<boolean>;
131
131
  cancelRun(runId: AgentRunId, reason?: string): Effect.Effect<boolean>;
132
+ steerRun(runId: AgentRunId, text: string): Effect.Effect<boolean>;
132
133
  forSession(sessionKey: SessionKey): AgentSessionHandle;
133
134
  getActiveRun(): ActiveAgentRun | undefined;
134
135
  getActiveRunId(): AgentRunId | undefined;
@@ -168,6 +169,7 @@ interface AgentSessionHandle {
168
169
  readonly sessionKey: SessionKey;
169
170
  cancelActiveRun(reason?: string): Effect.Effect<boolean>;
170
171
  cancelRun(runId: AgentRunId, reason?: string): Effect.Effect<boolean>;
172
+ steerRun(runId: AgentRunId, text: string): Effect.Effect<boolean>;
171
173
  getActiveRun(): ActiveAgentRun | undefined;
172
174
  getActiveRunState(): AgentRunState | undefined;
173
175
  getAvailability(): AgentSessionAvailability;
@@ -510,6 +512,25 @@ interface FeishuSessionStoreOptions {
510
512
  }
511
513
  declare function createFeishuSessionStore(options?: FeishuSessionStoreOptions): FeishuSessionStore;
512
514
  //#endregion
515
+ //#region src/application/feishu/feishu-message-content.d.ts
516
+ declare class UnsupportedFeishuMessage extends Error {
517
+ readonly messageType: string;
518
+ readonly name = "UnsupportedFeishuMessage";
519
+ readonly _tag = "UnsupportedFeishuMessage";
520
+ constructor(messageType: string);
521
+ }
522
+ declare class InvalidFeishuMessageContent extends Error {
523
+ readonly reason: string;
524
+ readonly name = "InvalidFeishuMessageContent";
525
+ readonly _tag = "InvalidFeishuMessageContent";
526
+ constructor(reason: string);
527
+ }
528
+ interface FeishuMessageContentInput {
529
+ readonly content: string;
530
+ readonly messageType: string;
531
+ }
532
+ declare function readFeishuMessageContent(input: FeishuMessageContentInput): Effect.Effect<string, UnsupportedFeishuMessage | InvalidFeishuMessageContent>;
533
+ //#endregion
513
534
  //#region src/application/feishu/feishu-message-intake.d.ts
514
535
  interface FeishuMessageIntakeOptions {
515
536
  readonly agentId: string;
@@ -529,10 +550,13 @@ interface FeishuReceiveMessagePayload {
529
550
  readonly tenant_key?: string;
530
551
  };
531
552
  readonly message: {
553
+ readonly create_time?: string;
532
554
  readonly message_id: string;
533
555
  readonly chat_id: string;
534
556
  readonly chat_type?: string;
535
557
  readonly thread_id?: string;
558
+ readonly parent_id?: string;
559
+ readonly root_id?: string;
536
560
  readonly message_type: string;
537
561
  readonly mentions?: ReadonlyArray<{
538
562
  readonly id?: Readonly<Record<string, string>>;
@@ -558,7 +582,8 @@ interface FeishuNewSessionCommand {
558
582
  interface FeishuCancelRunCommand {
559
583
  readonly type: "cancel_run";
560
584
  readonly messageId: string;
561
- readonly runId: AgentRunId;
585
+ /** Omitted when `/cancel` targets the active run in this Feishu session. */
586
+ readonly runId?: AgentRunId;
562
587
  readonly reason: string;
563
588
  readonly sessionKey?: SessionKey;
564
589
  readonly token?: string;
@@ -581,19 +606,7 @@ interface FeishuNewSessionMessageIntakeSummary extends FeishuMessageIntakeBaseSu
581
606
  interface FeishuCancelMessageIntakeSummary extends FeishuMessageIntakeBaseSummary {
582
607
  readonly commandType: "cancel_run";
583
608
  readonly reason: string;
584
- readonly runId: AgentRunId;
585
- }
586
- declare class UnsupportedFeishuMessage extends Error {
587
- readonly messageType: string;
588
- readonly name = "UnsupportedFeishuMessage";
589
- readonly _tag = "UnsupportedFeishuMessage";
590
- constructor(messageType: string);
591
- }
592
- declare class InvalidFeishuMessageContent extends Error {
593
- readonly reason: string;
594
- readonly name = "InvalidFeishuMessageContent";
595
- readonly _tag = "InvalidFeishuMessageContent";
596
- constructor(reason: string);
609
+ readonly runId?: AgentRunId;
597
610
  }
598
611
  type FeishuMessageIntakeError = UnsupportedFeishuMessage | InvalidFeishuMessageContent | InvalidFeishuSessionReference;
599
612
  declare function createAgentCommandFromFeishuMessage(payload: FeishuReceiveMessagePayload, options: FeishuMessageIntakeOptions): Effect.Effect<FeishuAgentCommand, FeishuMessageIntakeError>;
@@ -643,8 +656,20 @@ interface FeishuResolveInteractionCommand {
643
656
  type FeishuCardActionCommand = FeishuCancelRunCommand | FeishuResolveInteractionCommand;
644
657
  declare function createAgentCommandFromFeishuCardAction(payload: FeishuCardActionTriggerPayload): Effect.Effect<FeishuCardActionCommand, FeishuCardActionIntakeError>;
645
658
  //#endregion
659
+ //#region src/application/feishu/feishu-prompt-context.d.ts
660
+ interface FeishuPromptContextInput {
661
+ readonly payload: FeishuReceiveMessagePayload;
662
+ readonly text: string;
663
+ }
664
+ /** Resolves conversation context only when a message is about to start a run. */
665
+ interface FeishuPromptContextResolver {
666
+ resolve(input: FeishuPromptContextInput): Effect.Effect<string, unknown>;
667
+ }
668
+ declare function composeFeishuTopicPrompt(currentText: string, rootText: string): string;
669
+ //#endregion
646
670
  //#region src/application/feishu/feishu-agent-daemon.d.ts
647
671
  interface FeishuAgentDaemonBaseOptions {
672
+ readonly acknowledgeSteering?: (messageId: string) => Effect.Effect<void, unknown>;
648
673
  readonly agentId: string;
649
674
  readonly botOpenId?: string;
650
675
  readonly dedupe?: boolean;
@@ -654,6 +679,7 @@ interface FeishuAgentDaemonBaseOptions {
654
679
  readonly publish: (action: FeishuStreamAction) => Effect.Effect<void, unknown>;
655
680
  readonly publishRunUpdate?: AgentRunUpdateHandler;
656
681
  readonly reply?: (messageId: string, text: string) => Effect.Effect<void, unknown>;
682
+ readonly promptContext?: FeishuPromptContextResolver;
657
683
  readonly resolveInvocation?: (payload: FeishuReceiveMessagePayload, conversationId: string) => AgentInvocationOrigin;
658
684
  readonly sessionStore?: FeishuSessionStore;
659
685
  }
@@ -669,11 +695,23 @@ interface FeishuAgentExecutionResult {
669
695
  readonly runId: AgentRunId;
670
696
  }
671
697
  interface FeishuAgentExecution {
698
+ cancelActiveRun(input: {
699
+ readonly reason: string;
700
+ readonly sessionKey: SessionKey;
701
+ }): Effect.Effect<AgentRunId | undefined, unknown>;
672
702
  cancelRun(input: {
673
703
  readonly reason: string;
674
704
  readonly runId: AgentRunId;
675
705
  readonly sessionKey?: SessionKey;
676
706
  }): Effect.Effect<boolean, unknown>;
707
+ /** Routes a message into the active run without creating a second run/card. */
708
+ steerRun(input: {
709
+ readonly sessionKey: SessionKey;
710
+ readonly text: string;
711
+ }): Effect.Effect<{
712
+ readonly runId: AgentRunId;
713
+ readonly steered: true;
714
+ } | undefined, unknown>;
677
715
  promptWithUpdates(command: PromptCommand, onUpdate: AgentRunUpdateHandler): Effect.Effect<FeishuAgentExecutionResult, unknown>;
678
716
  }
679
717
  interface FeishuAgentRunPreparation {
@@ -696,9 +734,14 @@ interface FeishuAgentDaemonSkippedResult {
696
734
  interface FeishuAgentDaemonCancelResult {
697
735
  readonly cancelled: boolean;
698
736
  readonly messageId: string;
699
- readonly runId: AgentRunId;
737
+ readonly runId?: AgentRunId;
700
738
  readonly reason?: "not_active";
701
739
  }
740
+ interface FeishuAgentDaemonSteeredResult {
741
+ readonly messageId: string;
742
+ readonly runId: AgentRunId;
743
+ readonly steered: true;
744
+ }
702
745
  interface FeishuAgentDaemonInteractionResult {
703
746
  readonly interaction: HumanInteraction;
704
747
  readonly interactionId: string;
@@ -714,13 +757,14 @@ interface FeishuAgentDaemonSessionResetResult {
714
757
  interface FeishuHumanInteractionActions {
715
758
  resolve(input: ResolveHumanInteractionInput): Effect.Effect<HumanInteraction, unknown>;
716
759
  }
717
- type FeishuAgentDaemonHandleResult = FeishuAgentDaemonRunResult | FeishuAgentDaemonSkippedResult | FeishuAgentDaemonCancelResult | FeishuAgentDaemonInteractionResult | FeishuAgentDaemonSessionResetResult;
760
+ type FeishuAgentDaemonHandleResult = FeishuAgentDaemonRunResult | FeishuAgentDaemonSkippedResult | FeishuAgentDaemonCancelResult | FeishuAgentDaemonSteeredResult | FeishuAgentDaemonInteractionResult | FeishuAgentDaemonSessionResetResult;
718
761
  type FeishuAgentMessageSideEffects = "enabled" | "disabled";
719
762
  interface FeishuAgentDaemonHandleMessageOptions {
720
763
  readonly sideEffects?: FeishuAgentMessageSideEffects;
721
764
  }
722
765
  interface FeishuAgentDaemon {
723
766
  handleCardAction(payload: FeishuCardActionTriggerPayload): Effect.Effect<FeishuAgentDaemonHandleResult, unknown>;
767
+ trySteerMessage(payload: FeishuReceiveMessagePayload): Effect.Effect<FeishuAgentDaemonHandleResult | undefined, unknown>;
724
768
  handleMessage(payload: FeishuReceiveMessagePayload, options?: FeishuAgentDaemonHandleMessageOptions): Effect.Effect<FeishuAgentDaemonHandleResult, unknown>;
725
769
  }
726
770
  declare function createFeishuAgentDaemon(options: FeishuAgentDaemonOptions): FeishuAgentDaemon;
@@ -764,6 +808,12 @@ interface FeishuInboxRepository {
764
808
  readonly leaseId: string;
765
809
  readonly now: string;
766
810
  }): Effect.Effect<FeishuInboxDelivery | undefined, unknown>;
811
+ claimById(input: {
812
+ readonly id: string;
813
+ readonly leaseExpiresAt: string;
814
+ readonly leaseId: string;
815
+ readonly now: string;
816
+ }): Effect.Effect<FeishuInboxDelivery | undefined, unknown>;
767
817
  complete(input: {
768
818
  readonly completedAt: string;
769
819
  readonly id: string;
@@ -786,6 +836,11 @@ interface FeishuInboxRepository {
786
836
  readonly id: string;
787
837
  readonly recovery: RecoveryAction;
788
838
  }): Effect.Effect<FeishuInboxDelivery, unknown>;
839
+ release(input: {
840
+ readonly availableAt: string;
841
+ readonly id: string;
842
+ readonly leaseId: string;
843
+ }): Effect.Effect<void, unknown>;
789
844
  }
790
845
  interface FeishuInboxRepositoryStateOptions {
791
846
  readonly initial?: ReadonlyArray<FeishuInboxDelivery>;
@@ -933,9 +988,15 @@ interface AgentRuntimeCancellation {
933
988
  readonly runId: AgentRunId;
934
989
  readonly sessionKey: SessionKey;
935
990
  }
991
+ interface AgentRuntimeSteering {
992
+ readonly runId: AgentRunId;
993
+ readonly sessionKey: SessionKey;
994
+ readonly text: string;
995
+ }
936
996
  interface PooledAgentRuntime {
937
997
  readonly concurrency?: "managed";
938
998
  cancel?(input: AgentRuntimeCancellation): Promise<boolean>;
999
+ steer?(input: AgentRuntimeSteering): Promise<boolean>;
939
1000
  run(input: AgentRuntimeInput): Promise<unknown>;
940
1001
  dispose?(): Promise<void> | void;
941
1002
  }
@@ -947,6 +1008,7 @@ interface AgentRuntimePoolOptions {
947
1008
  interface AgentRuntimePool {
948
1009
  readonly registry: AgentInstanceRegistry;
949
1010
  cancel(instance: AgentInstanceRecord, input: AgentRuntimeCancellation): Promise<boolean>;
1011
+ steer(instance: AgentInstanceRecord, input: AgentRuntimeSteering): Promise<boolean>;
950
1012
  run(instance: AgentInstanceRecord, input: AgentRuntimeInput): Promise<unknown>;
951
1013
  disposeAll(): Promise<void>;
952
1014
  }
@@ -1207,6 +1269,12 @@ interface FeishuMessageQueueOptions {
1207
1269
  readonly clock?: {
1208
1270
  readonly now: () => string;
1209
1271
  };
1272
+ /**
1273
+ * Applies cancellation, session reset, or steering immediately after the
1274
+ * message is durably admitted. Returning undefined leaves it on the prompt
1275
+ * lane; returning a result completes the durable delivery.
1276
+ */
1277
+ readonly handleControl?: (payload: FeishuReceiveMessagePayload) => Effect.Effect<FeishuAgentDaemonHandleResult | undefined, unknown>;
1210
1278
  readonly handleMessage: (payload: FeishuReceiveMessagePayload, options?: FeishuAgentDaemonHandleMessageOptions) => Effect.Effect<FeishuAgentDaemonHandleResult, unknown>;
1211
1279
  readonly shouldRetryError?: (error: unknown) => boolean;
1212
1280
  readonly leaseMs?: number;
@@ -1214,6 +1282,12 @@ interface FeishuMessageQueueOptions {
1214
1282
  readonly maxPending?: number;
1215
1283
  readonly repository?: FeishuInboxRepository;
1216
1284
  readonly retryDelayMs?: number;
1285
+ /**
1286
+ * Identifies a delivery that belongs to a run which was interrupted before
1287
+ * the process restarted. Such a delivery is completed as a duplicate rather
1288
+ * than starting the same user prompt a second time.
1289
+ */
1290
+ readonly shouldSkipReplay?: (payload: FeishuReceiveMessagePayload) => Effect.Effect<boolean, unknown>;
1217
1291
  }
1218
1292
  type FeishuMessageAcceptResult = {
1219
1293
  readonly accepted: true;
@@ -1591,6 +1665,7 @@ interface RivusEndpointInput extends AgentRuntimeInput {}
1591
1665
  interface RivusAgentHost {
1592
1666
  cancelBackgroundSession(agentId: string, input: AgentRuntimeCancellation): Promise<boolean>;
1593
1667
  cancelEndpoint(endpointId: string, input: AgentRuntimeCancellation): Promise<boolean>;
1668
+ steerEndpoint(endpointId: string, input: AgentRuntimeSteering): Promise<boolean>;
1594
1669
  handleAutomation(automationId: string, input: AgentRuntimeInput): Promise<unknown>;
1595
1670
  handleBackgroundSession(agentId: string, input: AgentRuntimeInput): Promise<unknown>;
1596
1671
  handleEndpoint(endpointId: string, input: RivusEndpointInput): Promise<unknown>;
@@ -1922,6 +1997,8 @@ interface CreateRivusDeploymentEndpointInput {
1922
1997
  readonly endpointId: string;
1923
1998
  readonly definition: RivusEndpointDeployment;
1924
1999
  readonly handle: (input: RivusEndpointInput) => Promise<unknown>;
2000
+ /** Optional control-plane steering; endpoints that do not support it remain prompt-only. */
2001
+ readonly steer?: (input: AgentRuntimeSteering) => Promise<boolean>;
1925
2002
  readonly instanceId: string;
1926
2003
  readonly projectSpaceId?: string;
1927
2004
  }
@@ -2133,6 +2210,7 @@ declare function createFeishuCardActionErrorResponse(): FeishuCardActionCallback
2133
2210
  //#region src/infrastructure/feishu/feishu-event-handlers.d.ts
2134
2211
  interface FeishuEventHandlerQueue {
2135
2212
  accept(payload: FeishuReceiveMessagePayload): Effect.Effect<FeishuMessageAcceptResult, unknown>;
2213
+ pending?(): number;
2136
2214
  }
2137
2215
  interface FeishuEventHandlerCardActions {
2138
2216
  handleCardAction(payload: FeishuCardActionTriggerPayload): Effect.Effect<FeishuAgentDaemonHandleResult, unknown>;
@@ -2155,6 +2233,7 @@ declare function createFeishuEventHandlers(options: FeishuEventHandlersOptions):
2155
2233
  //#endregion
2156
2234
  //#region src/composition/feishu-agent-runtime.d.ts
2157
2235
  interface FeishuAgentRuntimeOptions {
2236
+ readonly acknowledgeSteering?: (messageId: string) => Effect.Effect<void, unknown>;
2158
2237
  readonly agentId: string;
2159
2238
  readonly botOpenId?: string;
2160
2239
  readonly clock: AgentClock;
@@ -2165,8 +2244,10 @@ interface FeishuAgentRuntimeOptions {
2165
2244
  readonly initialRunStates?: ReadonlyArray<AgentRunState>;
2166
2245
  readonly loop: AgentLoop;
2167
2246
  readonly prepareRun?: (run: FeishuAgentRunPreparation) => Effect.Effect<void, unknown>;
2247
+ readonly promptContext?: FeishuPromptContextResolver;
2168
2248
  readonly periodicFlush?: FeishuPeriodicFlushSupervisor;
2169
2249
  readonly publish: (action: FeishuStreamAction) => Effect.Effect<void, unknown>;
2250
+ readonly reply?: (messageId: string, text: string) => Effect.Effect<void, unknown>;
2170
2251
  readonly runTimeoutMs?: number;
2171
2252
  readonly runIds: RunIdGenerator;
2172
2253
  readonly sessionStore?: FeishuSessionStore;
@@ -2362,10 +2443,10 @@ declare function createFeishuTenantAccessTokenProvider(options: FeishuTenantAcce
2362
2443
  //#endregion
2363
2444
  //#region src/infrastructure/feishu/feishu-openapi-client.d.ts
2364
2445
  interface FeishuOpenApiRequest {
2365
- readonly method: "PATCH" | "POST" | "PUT";
2446
+ readonly method: "GET" | "PATCH" | "POST" | "PUT";
2366
2447
  readonly url: string;
2367
2448
  readonly headers: Readonly<Record<string, string>>;
2368
- readonly body: unknown;
2449
+ readonly body?: unknown;
2369
2450
  }
2370
2451
  interface FeishuOpenApiResponse {
2371
2452
  readonly status: number;
@@ -2400,11 +2481,14 @@ declare function createConfiguredFeishuOpenApiClient(options: {
2400
2481
  interface ConfiguredFeishuCardRolloverRuntimeOptions {
2401
2482
  readonly agentName?: string;
2402
2483
  readonly cardTargets: FeishuCardTargetRegistry;
2484
+ /** Whether running cards should include Feishu HTTP callback cancel buttons. */
2485
+ readonly cancelButton?: boolean;
2403
2486
  readonly client: FeishuOpenApiClient;
2404
2487
  readonly clock: AgentClock;
2405
2488
  readonly config: RivusDaemonConfig;
2406
2489
  readonly elementId?: string;
2407
2490
  readonly initialContent?: string;
2491
+ readonly flushIntervalMs?: number;
2408
2492
  readonly ledger?: FeishuCardDeliveryLedger;
2409
2493
  readonly observe?: (event: FeishuCardRolloverEvent) => void;
2410
2494
  readonly onError?: (error: unknown) => void | Promise<void>;
@@ -2650,6 +2734,16 @@ interface FeishuCardKitOpenApiClientOptions {
2650
2734
  }
2651
2735
  declare function createFeishuCardKitOpenApiClient(options: FeishuCardKitOpenApiClientOptions): FeishuCardKitClient;
2652
2736
  //#endregion
2737
+ //#region src/infrastructure/feishu/feishu-topic-context-resolver.d.ts
2738
+ interface FeishuTopicContextResolverOptions {
2739
+ readonly baseUrl?: string;
2740
+ readonly client: FeishuOpenApiClient;
2741
+ }
2742
+ declare class InvalidFeishuTopicContext extends Error {
2743
+ readonly name = "InvalidFeishuTopicContext";
2744
+ }
2745
+ declare function createFeishuTopicContextResolver(options: FeishuTopicContextResolverOptions): FeishuPromptContextResolver;
2746
+ //#endregion
2653
2747
  //#region src/infrastructure/feishu/feishu-cot-publisher.d.ts
2654
2748
  type FeishuCotRunPreparation = FeishuAgentRunPreparation;
2655
2749
  interface FeishuCotPublisher {
@@ -2685,12 +2779,14 @@ interface FeishuCardTargetPreparationOptions {
2685
2779
  }
2686
2780
  interface FeishuCardKitOpenApiTargetCreatorOptions {
2687
2781
  readonly baseUrl?: string;
2782
+ readonly cancelButton?: boolean;
2688
2783
  readonly client: FeishuOpenApiClient;
2689
2784
  readonly elementId: string;
2690
2785
  readonly initialContent?: string;
2691
2786
  readonly title?: string;
2692
2787
  }
2693
2788
  interface ConfiguredFeishuCardKitTargetCreatorOptions {
2789
+ readonly cancelButton?: boolean;
2694
2790
  readonly client: FeishuOpenApiClient;
2695
2791
  readonly config: RivusDaemonConfig;
2696
2792
  readonly elementId?: string;
@@ -2825,13 +2921,15 @@ declare function openJsonlRecoveryControl(options: JsonlRecoveryControlOptions):
2825
2921
  declare function createAgentHarnessPooledRuntime(harness: AgentHarness): PooledAgentRuntime;
2826
2922
  //#endregion
2827
2923
  //#region src/composition/feishu-deployment-endpoint.d.ts
2828
- interface FeishuDeploymentEndpointOptions extends Pick<CreateRivusDeploymentEndpointInput, "agentId" | "cancel" | "handle"> {
2924
+ interface FeishuDeploymentEndpointOptions extends Pick<CreateRivusDeploymentEndpointInput, "agentId" | "cancel" | "handle" | "steer"> {
2925
+ readonly acknowledgeSteering?: (messageId: string) => Effect.Effect<void, unknown>;
2829
2926
  readonly botOpenId: string;
2830
2927
  readonly cardRollover?: RivusDaemonTransport;
2831
2928
  readonly endpointId?: string;
2832
2929
  readonly finalizeRun?: (runId: string) => Effect.Effect<void>;
2833
2930
  readonly eventDispatcher: FeishuWebSocketEventDispatcher;
2834
2931
  readonly groupPolicy: FeishuEndpointGroupPolicy;
2932
+ readonly initialEvents?: ReadonlyArray<AgentDomainEvent>;
2835
2933
  readonly interactions?: FeishuHumanInteractionActions;
2836
2934
  readonly inboxRepository?: FeishuInboxRepository;
2837
2935
  readonly maxPendingMessages?: number;
@@ -2840,6 +2938,7 @@ interface FeishuDeploymentEndpointOptions extends Pick<CreateRivusDeploymentEndp
2840
2938
  readonly onWorkerError?: (error: unknown) => void | Promise<void>;
2841
2939
  readonly onCapacityExceeded?: (payload: FeishuReceiveMessagePayload) => Effect.Effect<void, unknown>;
2842
2940
  readonly prepareRun?: (run: FeishuAgentRunPreparation) => Effect.Effect<void, unknown>;
2941
+ readonly promptContext: FeishuPromptContextResolver;
2843
2942
  readonly publish: (action: FeishuStreamAction) => Effect.Effect<void, unknown>;
2844
2943
  readonly publishRunUpdate?: AgentRunUpdateHandler;
2845
2944
  readonly reply?: (messageId: string, text: string) => Effect.Effect<void, unknown>;
@@ -3324,6 +3423,15 @@ declare function createConfiguredFeishuTextReplySender(options: {
3324
3423
  readonly config: RivusDaemonConfig;
3325
3424
  }): FeishuTextReplySender;
3326
3425
  //#endregion
3426
+ //#region src/infrastructure/feishu/feishu-message-reaction.d.ts
3427
+ interface FeishuMessageReactionSender {
3428
+ add(messageId: string, emojiType?: string): Effect.Effect<void, unknown>;
3429
+ }
3430
+ declare function createConfiguredFeishuMessageReactionSender(options: {
3431
+ readonly client: FeishuOpenApiClient;
3432
+ readonly config: RivusDaemonConfig;
3433
+ }): FeishuMessageReactionSender;
3434
+ //#endregion
3327
3435
  //#region src/infrastructure/feishu/feishu-automation-card-sender.d.ts
3328
3436
  interface FeishuAutomationCardInput {
3329
3437
  readonly idempotencyKey: string;
@@ -3355,6 +3463,13 @@ type FeishuAgentRunCardInput = {
3355
3463
  readonly runId: string;
3356
3464
  readonly sessionKey: string;
3357
3465
  readonly status: "running";
3466
+ /**
3467
+ * Card action callbacks require Feishu's HTTP callback transport. Long
3468
+ * connection mode only delivers event subscriptions, so deployments
3469
+ * using the WebSocket transport must disable this button and use the
3470
+ * text cancel command shown in the note instead.
3471
+ */
3472
+ readonly cancelButton?: boolean;
3358
3473
  readonly text?: string;
3359
3474
  } | {
3360
3475
  readonly agentName: string;
@@ -3389,4 +3504,4 @@ interface ConfiguredFeishuHumanInteractionPresenterOptions {
3389
3504
  }
3390
3505
  declare function createConfiguredFeishuHumanInteractionPresenter(options: ConfiguredFeishuHumanInteractionPresenterOptions): HumanInteractionPresenter;
3391
3506
  //#endregion
3392
- 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, BACKGROUND_SESSION_DELIVERY_JSONL_VERSION, BACKGROUND_SESSION_JSONL_VERSION, BACKGROUND_SESSION_SESSION_KEY_PREFIX, BACKGROUND_SESSION_START_TOOL_ID, BACKGROUND_SESSION_TOOL_IDS, BACKGROUND_SESSION_TOOL_PLUGIN_ID, BACKGROUND_SESSION_TOOL_VERSION, type BackgroundSessionAuthority, BackgroundSessionCallerDenied, type BackgroundSessionCancellation, BackgroundSessionDeliveryConflict, type BackgroundSessionDeliveryRecord, type BackgroundSessionDeliveryStore, type BackgroundSessionDetail, type BackgroundSessionId, type BackgroundSessionLease, type BackgroundSessionLimits, type BackgroundSessionOrigin, type BackgroundSessionPhase, type BackgroundSessionRepository, BackgroundSessionRepositoryConflict, BackgroundSessionRepositoryCorrupted, type BackgroundSessionService, type BackgroundSessionState, type BackgroundSessionSummary, type BackgroundSessionSupervisor, type BackgroundSessionSupervisorOptions, type BackgroundSessionSupervisorStatus, type BackgroundSessionTerminalResult, BackgroundSessionTransitionDenied, 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 CreateBackgroundSessionHostToolsOptions, type CreateConfiguredRivusDeploymentDaemonOptions, type CreateRivusDeploymentAutomationInput, type CreateRivusDeploymentBackgroundSessionInput, type CreateRivusDeploymentDaemonOptions, type CreateRivusDeploymentEndpointInput, type CreateRivusDeploymentRuntimeInput, DEFAULT_BACKGROUND_SESSION_LEASE_MS, DEFAULT_BACKGROUND_SESSION_LEASE_RENEWAL_INTERVAL_MS, DEFAULT_BACKGROUND_SESSION_LIFETIME_MS, DEFAULT_BACKGROUND_SESSION_MAX_CONCURRENT_SESSIONS, DEFAULT_BACKGROUND_SESSION_MAX_CONSECUTIVE_FAILURES, DEFAULT_BACKGROUND_SESSION_RETRY_BACKOFF_MS, DEFAULT_BACKGROUND_SESSION_STEP_TIMEOUT_MS, DEFAULT_BACKGROUND_SESSION_SUPERVISOR_INTERVAL_MS, 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 FeishuAgentDaemonSessionResetResult, type FeishuAgentDaemonSkippedResult, type FeishuAgentExecution, type FeishuAgentExecutionResult, type FeishuAgentInvocationOrigin, type FeishuAgentMessageSideEffects, type FeishuAgentRunCardInput, type FeishuAgentRunPreparation, type FeishuAgentRuntime, type FeishuAgentRuntimeOptions, type FeishuAutomationCardInput, type FeishuAutomationCardSender, type FeishuBackgroundSessionDelivery, type FeishuBackgroundSessionDeliveryInput, type FeishuBackgroundSessionDeliveryKind, 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 FeishuNewSessionCommand, type FeishuNewSessionMessageIntakeSummary, 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 FeishuSessionEpochRecord, type FeishuSessionReference, type FeishuSessionResetResult, type FeishuSessionStore, type FeishuSessionStoreOptions, 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 OpenJsonFeishuSessionStoreOptions, 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 RivusBackgroundSessionsDeployment, 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 RivusDeploymentBackgroundSession, type RivusDeploymentBackgroundSessionLifecycle, type RivusDeploymentBackgroundSessionStatus, 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, appendBackgroundSessionInput, assembleAgentContext, assertRivusPluginConforms, backgroundSessionToolIds, claimBackgroundSession, commitAutomationOutcome, completeBackgroundSessionStep, completeBackgroundSessionStop, 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, createBackgroundSession, createBackgroundSessionCard, createBackgroundSessionDeliveryStore, createBackgroundSessionHostTools, createBackgroundSessionKey, createBackgroundSessionRepository, createBackgroundSessionService, createBackgroundSessionStepSourceMessageId, createBackgroundSessionSupervisor, createBackgroundSessionToolContracts, createCoalescingFeishuPublisher, createCompactionService, createCompositeRivusDaemonTransport, createConfiguredFeishuAutomationCardSender, createConfiguredFeishuBackgroundSessionDelivery, 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, createFeishuSessionStore, 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, extendBackgroundSessionDefinition, failBackgroundSessionStep, formatRivusEnvFile, initialAgentRunState, intersectToolIds, isAgentToolExecutionEvent, isAssistantTextDeltaEvent, isAssistantThinkingDeltaEvent, isBackgroundSessionDue, isBackgroundSessionLeaseExpired, isBackgroundSessionState, isBackgroundSessionTerminalPhase, isBackgroundSessionToolId, isCardPresentationHandoffDue, isTerminalAgentDomainEvent, isTerminalAgentRunPhase, loadNodeRivusPluginModule, loadRivusDaemonConfig, loadRivusDeployment, loadRivusDeploymentManifest, narrowBackgroundSessionDefinition, normalizeStableJson, openJsonAutomationTickRepository, openJsonFeishuSessionStore, openJsonlAgentMemoryService, openJsonlBackgroundSessionDeliveryStore, openJsonlBackgroundSessionRepository, openJsonlFeishuCardDeliveryLedger, openJsonlFeishuInboxRepository, openJsonlRecoveryControl, openJsonlToolOperationLedger, parkBackgroundSessionForReconciliation, progressDeliveryId, releaseBackgroundSessionLease, renewBackgroundSessionLease, replayAgentHistory, replayAgentTranscript, requestBackgroundSessionStop, requeueInterruptedBackgroundSessionStep, requiresToolApproval, resolveBackgroundSessionReconciliation, resolveBackgroundSessionSupervisorIntervalMs, resolveFeishuDeliveryChatId, resolveFeishuEndpointCredentials, resolveLangfuseTelemetryConfig, resolveRivusAgentDefinition, resolveRivusProjectSpace, restoreAgentHistory, restoreConfiguredRivusDaemonBootstrap, restrictMemoryScopesForAudience, runRivusDaemonCli, sessionIdFromSessionKey, shouldAcceptFeishuEndpointMessage, suspendBackgroundSession, terminalDeliveryId, transitionHumanInteraction, validateProjectSkillCatalog, validateProjectSkillCommand, validateRivusDeploymentManifest };
3507
+ 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 AgentRuntimeSteering, type AgentSessionAvailability, type AgentSessionBusyAvailability, type AgentSessionClient, type AgentSessionHandle, type AgentSessionOtherBusyAvailability, type AgentSessionOwnedBusyAvailability, type AgentSessionSnapshot, type AgentSessionSummary, type AgentSkillExecutionEnded, type AgentSkillExecutionStarted, type AgentSkillExecutionState, type AgentSteeringChannel, 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, BACKGROUND_SESSION_DELIVERY_JSONL_VERSION, BACKGROUND_SESSION_JSONL_VERSION, BACKGROUND_SESSION_SESSION_KEY_PREFIX, BACKGROUND_SESSION_START_TOOL_ID, BACKGROUND_SESSION_TOOL_IDS, BACKGROUND_SESSION_TOOL_PLUGIN_ID, BACKGROUND_SESSION_TOOL_VERSION, type BackgroundSessionAuthority, BackgroundSessionCallerDenied, type BackgroundSessionCancellation, BackgroundSessionDeliveryConflict, type BackgroundSessionDeliveryRecord, type BackgroundSessionDeliveryStore, type BackgroundSessionDetail, type BackgroundSessionId, type BackgroundSessionLease, type BackgroundSessionLimits, type BackgroundSessionOrigin, type BackgroundSessionPhase, type BackgroundSessionRepository, BackgroundSessionRepositoryConflict, BackgroundSessionRepositoryCorrupted, type BackgroundSessionService, type BackgroundSessionState, type BackgroundSessionSummary, type BackgroundSessionSupervisor, type BackgroundSessionSupervisorOptions, type BackgroundSessionSupervisorStatus, type BackgroundSessionTerminalResult, BackgroundSessionTransitionDenied, 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 CreateBackgroundSessionHostToolsOptions, type CreateConfiguredRivusDeploymentDaemonOptions, type CreateRivusDeploymentAutomationInput, type CreateRivusDeploymentBackgroundSessionInput, type CreateRivusDeploymentDaemonOptions, type CreateRivusDeploymentEndpointInput, type CreateRivusDeploymentRuntimeInput, DEFAULT_BACKGROUND_SESSION_LEASE_MS, DEFAULT_BACKGROUND_SESSION_LEASE_RENEWAL_INTERVAL_MS, DEFAULT_BACKGROUND_SESSION_LIFETIME_MS, DEFAULT_BACKGROUND_SESSION_MAX_CONCURRENT_SESSIONS, DEFAULT_BACKGROUND_SESSION_MAX_CONSECUTIVE_FAILURES, DEFAULT_BACKGROUND_SESSION_RETRY_BACKOFF_MS, DEFAULT_BACKGROUND_SESSION_STEP_TIMEOUT_MS, DEFAULT_BACKGROUND_SESSION_SUPERVISOR_INTERVAL_MS, 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 FeishuAgentDaemonSessionResetResult, type FeishuAgentDaemonSkippedResult, type FeishuAgentDaemonSteeredResult, type FeishuAgentExecution, type FeishuAgentExecutionResult, type FeishuAgentInvocationOrigin, type FeishuAgentMessageSideEffects, type FeishuAgentRunCardInput, type FeishuAgentRunPreparation, type FeishuAgentRuntime, type FeishuAgentRuntimeOptions, type FeishuAutomationCardInput, type FeishuAutomationCardSender, type FeishuBackgroundSessionDelivery, type FeishuBackgroundSessionDeliveryInput, type FeishuBackgroundSessionDeliveryKind, 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 FeishuMessageContentInput, type FeishuMessageDrainResult, type FeishuMessageIntakeBaseSummary, type FeishuMessageIntakeError, type FeishuMessageIntakeOptions, type FeishuMessageIntakeSummary, type FeishuMessageQueue, type FeishuMessageQueueOptions, type FeishuMessageReactionSender, type FeishuMessageWorker, type FeishuMessageWorkerDrainAvailableResult, type FeishuMessageWorkerOptions, type FeishuMessageWorkerQueue, type FeishuNewSessionCommand, type FeishuNewSessionMessageIntakeSummary, type FeishuOpenApiClient, FeishuOpenApiError, type FeishuOpenApiRequest, type FeishuOpenApiResponse, type FeishuPeriodicFlush, type FeishuPeriodicFlushOptions, type FeishuPeriodicFlushSupervisor, type FeishuPresentationPreparationOptions, type FeishuPromptAgentCommand, type FeishuPromptContextInput, type FeishuPromptContextResolver, 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 FeishuSessionEpochRecord, type FeishuSessionReference, type FeishuSessionResetResult, type FeishuSessionStore, type FeishuSessionStoreOptions, type FeishuStreamAction, type FeishuStreamActionPublisher, type FeishuStreamProjector, FeishuTenantAccessTokenError, type FeishuTenantAccessTokenProvider, type FeishuTenantAccessTokenProviderOptions, type FeishuTenantAccessTokenRequest, type FeishuTenantAccessTokenResponse, type FeishuTextReplySender, type FeishuTopicContextResolverOptions, 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, InvalidFeishuTopicContext, 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 OpenJsonFeishuSessionStoreOptions, 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 RivusBackgroundSessionsDeployment, 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 RivusDeploymentBackgroundSession, type RivusDeploymentBackgroundSessionLifecycle, type RivusDeploymentBackgroundSessionStatus, 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, appendBackgroundSessionInput, assembleAgentContext, assertRivusPluginConforms, backgroundSessionToolIds, claimBackgroundSession, commitAutomationOutcome, completeBackgroundSessionStep, completeBackgroundSessionStop, composeFeishuTopicPrompt, 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, createBackgroundSession, createBackgroundSessionCard, createBackgroundSessionDeliveryStore, createBackgroundSessionHostTools, createBackgroundSessionKey, createBackgroundSessionRepository, createBackgroundSessionService, createBackgroundSessionStepSourceMessageId, createBackgroundSessionSupervisor, createBackgroundSessionToolContracts, createCoalescingFeishuPublisher, createCompactionService, createCompositeRivusDaemonTransport, createConfiguredFeishuAutomationCardSender, createConfiguredFeishuBackgroundSessionDelivery, createConfiguredFeishuCardKitPublisher, createConfiguredFeishuCardKitTargetCreator, createConfiguredFeishuCardRolloverRuntime, createConfiguredFeishuHumanInteractionPresenter, createConfiguredFeishuMessageReactionSender, 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, createFeishuSessionStore, createFeishuStreamProjector, createFeishuTenantAccessTokenProvider, createFeishuTopicContextResolver, 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, extendBackgroundSessionDefinition, failBackgroundSessionStep, formatRivusEnvFile, initialAgentRunState, intersectToolIds, isAgentToolExecutionEvent, isAssistantTextDeltaEvent, isAssistantThinkingDeltaEvent, isBackgroundSessionDue, isBackgroundSessionLeaseExpired, isBackgroundSessionState, isBackgroundSessionTerminalPhase, isBackgroundSessionToolId, isCardPresentationHandoffDue, isTerminalAgentDomainEvent, isTerminalAgentRunPhase, loadNodeRivusPluginModule, loadRivusDaemonConfig, loadRivusDeployment, loadRivusDeploymentManifest, narrowBackgroundSessionDefinition, normalizeStableJson, openJsonAutomationTickRepository, openJsonFeishuSessionStore, openJsonlAgentMemoryService, openJsonlBackgroundSessionDeliveryStore, openJsonlBackgroundSessionRepository, openJsonlFeishuCardDeliveryLedger, openJsonlFeishuInboxRepository, openJsonlRecoveryControl, openJsonlToolOperationLedger, parkBackgroundSessionForReconciliation, progressDeliveryId, readFeishuMessageContent, releaseBackgroundSessionLease, renewBackgroundSessionLease, replayAgentHistory, replayAgentTranscript, requestBackgroundSessionStop, requeueInterruptedBackgroundSessionStep, requiresToolApproval, resolveBackgroundSessionReconciliation, resolveBackgroundSessionSupervisorIntervalMs, resolveFeishuDeliveryChatId, resolveFeishuEndpointCredentials, resolveLangfuseTelemetryConfig, resolveRivusAgentDefinition, resolveRivusProjectSpace, restoreAgentHistory, restoreConfiguredRivusDaemonBootstrap, restrictMemoryScopesForAudience, runRivusDaemonCli, sessionIdFromSessionKey, shouldAcceptFeishuEndpointMessage, suspendBackgroundSession, terminalDeliveryId, transitionHumanInteraction, validateProjectSkillCatalog, validateProjectSkillCommand, validateRivusDeploymentManifest };