@rivus/agent 0.1.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,424 +1,10 @@
1
- import { A as RivusToolExecutionContext, B as AgentMemorySnapshot, C as RivusPluginCatalogSnapshot, D as RivusSkillDescriptor, E as RivusResolvedToolDescriptor, F as RivusToolInputRejected, G as MemoryScope, H as MemoryBinding, I as RivusToolRisk, J as RIVUS_MEMORY_TOOL_PLUGIN_ID, K as MemoryState, L as requiresToolApproval, M as RivusToolFactoryContext, N as RivusToolGrantSet, O as RivusSkillGrantSet, P as RivusToolIdempotency, Q as restrictMemoryScopesForAudience, R as AgentMemoryAuthority, S as RivusPluginCatalog, T as RivusPluginRegistry, U as MemoryInvocationAudience, V as MEMORY_SCOPES, W as MemoryRecord, X as createMemoryNamespace, Y as RIVUS_MEMORY_TOOL_VERSION, Z as createRivusMemoryToolContract, _ 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, q as RIVUS_MEMORY_TOOL_ID, r as RivusPluginConformanceReport, s as InvalidRivusPlugin, t as RivusPluginConformanceError, u as RegisteredRivusAutomation, v as RivusAutomationTemplate, w as RivusPluginManifest, x as RivusPlugin, y as RivusAutomationTickContext, z as AgentMemoryIdentity } from "./rivus-plugin-testkit.js";
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
+ 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";
2
4
  import { Effect, Stream } from "effect";
3
5
  import { Tracer } from "@opentelemetry/api";
4
6
  import { ToolDefinition } from "@earendil-works/pi-coding-agent";
5
7
 
6
- //#region src/domain/agent-invocation.d.ts
7
- type AgentMemoryInvocationIdentity = AgentMemoryIdentity;
8
- interface FeishuAgentInvocationOrigin {
9
- readonly allowedActorOpenIds: ReadonlyArray<string>;
10
- readonly endpointId: string;
11
- readonly kind: "feishu";
12
- readonly memory?: AgentMemoryInvocationIdentity;
13
- readonly sourceMessageId: string;
14
- readonly tenantKey: string;
15
- }
16
- interface LocalCliAgentInvocationOrigin {
17
- readonly allowedActorOpenIds: readonly [];
18
- readonly endpointId: string;
19
- readonly kind: "local-cli";
20
- readonly memory?: AgentMemoryInvocationIdentity;
21
- readonly sourceMessageId: string;
22
- readonly tenantKey: "local";
23
- }
24
- interface AutomationAgentInvocationOrigin {
25
- readonly allowedActorOpenIds: readonly [];
26
- readonly automationId: string;
27
- readonly endpointId: string;
28
- readonly kind: "automation";
29
- readonly memory?: AgentMemoryInvocationIdentity;
30
- readonly sourceMessageId: string;
31
- readonly tenantKey: "automation";
32
- readonly tickId: string;
33
- }
34
- type AgentInvocationOrigin = FeishuAgentInvocationOrigin | LocalCliAgentInvocationOrigin | AutomationAgentInvocationOrigin;
35
- //#endregion
36
- //#region src/domain/agent-events.d.ts
37
- type AgentRunId = string;
38
- type SessionKey = string;
39
- interface AgentRunAccepted {
40
- readonly type: "agent_run_accepted";
41
- readonly runId: AgentRunId;
42
- readonly sessionKey: SessionKey;
43
- readonly prompt: string;
44
- readonly occurredAt: Date;
45
- }
46
- interface AgentTurnStarted {
47
- readonly type: "agent_turn_started";
48
- readonly runId: AgentRunId;
49
- readonly sessionKey: SessionKey;
50
- readonly occurredAt: Date;
51
- }
52
- interface AssistantTextDelta {
53
- readonly type: "assistant_text_delta";
54
- readonly runId: AgentRunId;
55
- readonly delta: string;
56
- readonly occurredAt: Date;
57
- }
58
- interface AssistantThinkingDelta {
59
- readonly type: "assistant_thinking_delta";
60
- readonly runId: AgentRunId;
61
- readonly delta: string;
62
- readonly occurredAt: Date;
63
- }
64
- interface AgentModelExecutionStarted {
65
- readonly type: "agent_model_execution_started";
66
- readonly api: string;
67
- readonly model: string;
68
- readonly modelCallId: string;
69
- readonly occurredAt: Date;
70
- readonly provider: string;
71
- readonly runId: AgentRunId;
72
- }
73
- interface AgentModelUsage {
74
- readonly cacheRead: number;
75
- readonly cacheWrite: number;
76
- readonly cost: number;
77
- readonly input: number;
78
- readonly output: number;
79
- readonly reasoning?: number;
80
- readonly total: number;
81
- }
82
- interface AgentModelExecutionEnded {
83
- readonly type: "agent_model_execution_ended";
84
- readonly api: string;
85
- readonly errorMessage?: string;
86
- readonly model: string;
87
- readonly modelCallId: string;
88
- readonly occurredAt: Date;
89
- readonly provider: string;
90
- readonly responseModel?: string;
91
- readonly runId: AgentRunId;
92
- readonly stopReason: string;
93
- readonly usage: AgentModelUsage;
94
- }
95
- interface AgentSkillExecutionStarted {
96
- readonly type: "agent_skill_execution_started";
97
- readonly occurredAt: Date;
98
- readonly runId: AgentRunId;
99
- readonly skillCallId: string;
100
- readonly skillId: string;
101
- }
102
- interface AgentSkillExecutionSucceeded {
103
- readonly type: "agent_skill_execution_ended";
104
- readonly contentLength: number;
105
- readonly digest: string;
106
- readonly isError: false;
107
- readonly occurredAt: Date;
108
- readonly runId: AgentRunId;
109
- readonly skillCallId: string;
110
- readonly skillId: string;
111
- readonly title: string;
112
- readonly version: string;
113
- }
114
- interface AgentSkillExecutionFailed {
115
- readonly type: "agent_skill_execution_ended";
116
- readonly isError: true;
117
- readonly occurredAt: Date;
118
- readonly runId: AgentRunId;
119
- readonly skillCallId: string;
120
- readonly skillId: string;
121
- }
122
- type AgentSkillExecutionEnded = AgentSkillExecutionSucceeded | AgentSkillExecutionFailed;
123
- interface AgentToolExecutionStarted {
124
- readonly type: "agent_tool_execution_started";
125
- readonly runId: AgentRunId;
126
- readonly toolCallId: string;
127
- readonly toolName: string;
128
- readonly input: unknown;
129
- readonly occurredAt: Date;
130
- }
131
- interface AgentToolExecutionUpdated {
132
- readonly type: "agent_tool_execution_updated";
133
- readonly runId: AgentRunId;
134
- readonly toolCallId: string;
135
- readonly toolName: string;
136
- readonly input: unknown;
137
- readonly partialResult: unknown;
138
- readonly occurredAt: Date;
139
- }
140
- interface AgentToolExecutionEnded {
141
- readonly type: "agent_tool_execution_ended";
142
- readonly runId: AgentRunId;
143
- readonly toolCallId: string;
144
- readonly toolName: string;
145
- readonly result: unknown;
146
- readonly isError: boolean;
147
- readonly occurredAt: Date;
148
- }
149
- interface AgentTurnCompleted {
150
- readonly type: "agent_turn_completed";
151
- readonly runId: AgentRunId;
152
- readonly finalText: string;
153
- readonly occurredAt: Date;
154
- }
155
- interface AgentRunCompleted {
156
- readonly type: "agent_run_completed";
157
- readonly runId: AgentRunId;
158
- readonly finalText: string;
159
- readonly occurredAt: Date;
160
- }
161
- interface AgentRunFailed {
162
- readonly type: "agent_run_failed";
163
- readonly runId: AgentRunId;
164
- readonly errorMessage: string;
165
- readonly occurredAt: Date;
166
- }
167
- interface AgentRunCancelled$1 {
168
- readonly type: "agent_run_cancelled";
169
- readonly runId: AgentRunId;
170
- readonly reason?: string;
171
- readonly occurredAt: Date;
172
- }
173
- type AgentDomainEvent = AgentRunAccepted | AgentTurnStarted | AssistantTextDelta | AssistantThinkingDelta | AgentModelExecutionStarted | AgentModelExecutionEnded | AgentSkillExecutionStarted | AgentSkillExecutionEnded | AgentToolExecutionStarted | AgentToolExecutionUpdated | AgentToolExecutionEnded | AgentTurnCompleted | AgentRunCompleted | AgentRunFailed | AgentRunCancelled$1;
174
- type AgentToolExecutionEvent = AgentToolExecutionStarted | AgentToolExecutionUpdated | AgentToolExecutionEnded;
175
- type AgentModelExecutionEvent = AgentModelExecutionStarted | AgentModelExecutionEnded;
176
- type TerminalAgentDomainEvent = AgentRunCompleted | AgentRunFailed | AgentRunCancelled$1;
177
- declare function isAssistantTextDeltaEvent(event: AgentDomainEvent): event is AssistantTextDelta;
178
- declare function isAssistantThinkingDeltaEvent(event: AgentDomainEvent): event is AssistantThinkingDelta;
179
- declare function isAgentToolExecutionEvent(event: AgentDomainEvent): event is AgentToolExecutionEvent;
180
- declare function isTerminalAgentDomainEvent(event: AgentDomainEvent): event is TerminalAgentDomainEvent;
181
- //#endregion
182
- //#region src/domain/agent-run-state.d.ts
183
- type AgentRunPhase = "idle" | "accepted" | "running" | "completed" | "failed" | "cancelled";
184
- interface AgentRunState {
185
- readonly phase: AgentRunPhase;
186
- readonly runId?: AgentRunId;
187
- readonly sessionKey?: SessionKey;
188
- readonly prompt?: string;
189
- readonly finalText: string;
190
- readonly errorMessage?: string;
191
- readonly cancellationReason?: string;
192
- readonly thinkingText?: string;
193
- readonly skillExecutions: Readonly<Record<string, AgentSkillExecutionState>>;
194
- readonly toolExecutions: Readonly<Record<string, AgentToolExecutionState>>;
195
- }
196
- interface AgentSkillExecutionState {
197
- readonly contentLength?: number;
198
- readonly digest?: string;
199
- readonly isError?: boolean;
200
- readonly skillCallId: string;
201
- readonly skillId: string;
202
- readonly status: "running" | "completed";
203
- readonly title?: string;
204
- readonly version?: string;
205
- }
206
- interface AgentToolExecutionState {
207
- readonly toolCallId: string;
208
- readonly toolName: string;
209
- readonly input: unknown;
210
- readonly partialResult?: unknown;
211
- readonly result?: unknown;
212
- readonly isError?: boolean;
213
- readonly status: "running" | "completed";
214
- }
215
- declare const initialAgentRunState: AgentRunState;
216
- declare function isTerminalAgentRunPhase(phase: AgentRunPhase): boolean;
217
- declare function evolveAgentRun(state: AgentRunState, event: AgentDomainEvent): AgentRunState;
218
- //#endregion
219
- //#region src/domain/agent-history.d.ts
220
- interface AgentRunSummary {
221
- readonly acceptedAt?: Date;
222
- readonly cancellationReason?: string;
223
- readonly cancelledAt?: Date;
224
- readonly completedAt?: Date;
225
- readonly errorMessage?: string;
226
- readonly eventCount: number;
227
- readonly failedToolExecutionCount: number;
228
- readonly failedSkillExecutionCount: number;
229
- readonly failedAt?: Date;
230
- readonly finalText: string;
231
- readonly phase: AgentRunPhase;
232
- readonly prompt?: string;
233
- readonly runId: AgentRunId;
234
- readonly sessionKey?: SessionKey;
235
- readonly startedAt?: Date;
236
- readonly state: AgentRunState;
237
- readonly thinkingText: string;
238
- readonly skillExecutionCount: number;
239
- readonly toolExecutionCount: number;
240
- readonly updatedAt: Date;
241
- }
242
- interface AgentSessionSummary {
243
- readonly failedToolExecutionCount: number;
244
- readonly failedSkillExecutionCount: number;
245
- readonly finalText: string;
246
- readonly latestPhase: AgentRunPhase;
247
- readonly latestRunId: AgentRunId;
248
- readonly runCount: number;
249
- readonly runIds: ReadonlyArray<AgentRunId>;
250
- readonly sessionKey: SessionKey;
251
- readonly thinkingText: string;
252
- readonly skillExecutionCount: number;
253
- readonly toolExecutionCount: number;
254
- readonly updatedAt: Date;
255
- }
256
- interface AgentHistory {
257
- readonly runs: ReadonlyArray<AgentRunSummary>;
258
- readonly sessions: ReadonlyArray<AgentSessionSummary>;
259
- readonly totalEvents: number;
260
- }
261
- declare function replayAgentHistory(events: ReadonlyArray<AgentDomainEvent>): AgentHistory;
262
- //#endregion
263
- //#region src/domain/agent-transcript.d.ts
264
- interface AgentTranscript {
265
- readonly latestTurn?: AgentTranscriptTurn;
266
- readonly sessionKey: SessionKey;
267
- readonly turnCount: number;
268
- readonly turns: ReadonlyArray<AgentTranscriptTurn>;
269
- }
270
- interface AgentTranscriptTurn {
271
- readonly acceptedAt?: Date;
272
- readonly assistantText: string;
273
- readonly cancellationReason?: string;
274
- readonly cancelledAt?: Date;
275
- readonly completedAt?: Date;
276
- readonly errorMessage?: string;
277
- readonly failedAt?: Date;
278
- readonly failedToolExecutionCount: number;
279
- readonly phase: AgentRunPhase;
280
- readonly runId: AgentRunId;
281
- readonly sessionKey: SessionKey;
282
- readonly thinkingText: string;
283
- readonly toolExecutionCount: number;
284
- readonly updatedAt: Date;
285
- readonly userText: string;
286
- }
287
- type AgentTranscriptMessageRole = "assistant" | "user";
288
- interface AgentTranscriptMessage {
289
- readonly content: string;
290
- readonly role: AgentTranscriptMessageRole;
291
- }
292
- interface AgentConversationMessagesOptions {
293
- readonly text: string;
294
- readonly transcript?: AgentTranscript;
295
- }
296
- declare function replayAgentTranscript(events: ReadonlyArray<AgentDomainEvent>, sessionKey: SessionKey): AgentTranscript;
297
- declare function createAgentTranscriptTurn(summary: AgentRunSummary & {
298
- readonly sessionKey: SessionKey;
299
- }): AgentTranscriptTurn;
300
- declare function createAgentTranscriptMessages(transcript: AgentTranscript): ReadonlyArray<AgentTranscriptMessage>;
301
- declare function createAgentConversationMessages(options: AgentConversationMessagesOptions): ReadonlyArray<AgentTranscriptMessage>;
302
- //#endregion
303
- //#region src/application/agent/agent-loop.d.ts
304
- interface AgentLoopInput {
305
- readonly abortSignal: AbortSignal;
306
- readonly invocation?: AgentInvocationOrigin;
307
- readonly messages?: ReadonlyArray<AgentTranscriptMessage>;
308
- readonly runId: AgentRunId;
309
- readonly sessionKey: SessionKey;
310
- readonly text: string;
311
- readonly previousSessionState?: AgentRunState;
312
- readonly previousSessionTranscript?: AgentTranscript;
313
- }
314
- type AgentLoopEvent = AgentLoopTextDelta | AgentLoopThinkingDelta | AgentLoopModelExecutionStart | AgentLoopModelExecutionEnd | AgentLoopSkillExecutionStart | AgentLoopSkillExecutionEnd | AgentLoopToolExecutionStart | AgentLoopToolExecutionUpdate | AgentLoopToolExecutionEnd;
315
- type AgentLoopEventLike = AgentLoopEvent | string;
316
- interface AgentLoopTextDelta {
317
- readonly type: "assistant_text_delta";
318
- readonly delta: string;
319
- }
320
- interface AgentLoopThinkingDelta {
321
- readonly type: "assistant_thinking_delta";
322
- readonly delta: string;
323
- }
324
- interface AgentLoopModelExecutionStart {
325
- readonly type: "model_execution_start";
326
- readonly api: string;
327
- readonly model: string;
328
- readonly modelCallId: string;
329
- readonly provider: string;
330
- }
331
- interface AgentLoopModelExecutionEnd {
332
- readonly type: "model_execution_end";
333
- readonly api: string;
334
- readonly errorMessage?: string;
335
- readonly model: string;
336
- readonly modelCallId: string;
337
- readonly provider: string;
338
- readonly responseModel?: string;
339
- readonly stopReason: string;
340
- readonly usage: AgentModelUsage;
341
- }
342
- interface AgentLoopSkillExecutionStart {
343
- readonly type: "skill_execution_start";
344
- readonly skillCallId: string;
345
- readonly skillId: string;
346
- }
347
- interface AgentLoopSkillExecutionSucceeded {
348
- readonly type: "skill_execution_end";
349
- readonly contentLength: number;
350
- readonly digest: string;
351
- readonly isError: false;
352
- readonly skillCallId: string;
353
- readonly skillId: string;
354
- readonly title: string;
355
- readonly version: string;
356
- }
357
- interface AgentLoopSkillExecutionFailed {
358
- readonly type: "skill_execution_end";
359
- readonly isError: true;
360
- readonly skillCallId: string;
361
- readonly skillId: string;
362
- }
363
- type AgentLoopSkillExecutionEnd = AgentLoopSkillExecutionSucceeded | AgentLoopSkillExecutionFailed;
364
- interface AgentLoopToolExecutionStart {
365
- readonly type: "tool_execution_start";
366
- readonly toolCallId: string;
367
- readonly toolName: string;
368
- readonly input: unknown;
369
- }
370
- interface AgentLoopToolExecutionUpdate {
371
- readonly type: "tool_execution_update";
372
- readonly toolCallId: string;
373
- readonly toolName: string;
374
- readonly input: unknown;
375
- readonly partialResult: unknown;
376
- }
377
- interface AgentLoopToolExecutionEnd {
378
- readonly type: "tool_execution_end";
379
- readonly toolCallId: string;
380
- readonly toolName: string;
381
- readonly result: unknown;
382
- readonly isError: boolean;
383
- }
384
- interface AgentLoop {
385
- run(input: AgentLoopInput): Stream.Stream<AgentLoopEvent, unknown>;
386
- }
387
- type AgentLoopCallbackOutput = Iterable<AgentLoopEventLike> | AsyncIterable<AgentLoopEventLike> | Stream.Stream<AgentLoopEventLike, unknown>;
388
- type AgentLoopCallbackResult = AgentLoopCallbackOutput | PromiseLike<AgentLoopCallbackOutput> | Effect.Effect<AgentLoopCallbackOutput, unknown>;
389
- type AgentLoopCallback = (input: AgentLoopInput) => AgentLoopCallbackResult;
390
- interface AsyncIterableAgentLoopOptions {
391
- readonly run: (input: AgentLoopInput) => AsyncIterable<AgentLoopEventLike>;
392
- }
393
- interface EventAgentLoopOptions {
394
- readonly events: ReadonlyArray<AgentLoopEventLike> | ((input: AgentLoopInput) => ReadonlyArray<AgentLoopEventLike> | Promise<ReadonlyArray<AgentLoopEventLike>>);
395
- }
396
- interface TextAgentLoopOptions {
397
- readonly generate: (input: AgentLoopInput) => Effect.Effect<string, unknown>;
398
- }
399
- type TextAgentLoopCallback = (input: AgentLoopInput) => string | Promise<string>;
400
- type AgentLoopToolExecutionStartOptions = Omit<AgentLoopToolExecutionStart, "type">;
401
- type AgentLoopToolExecutionUpdateOptions = Omit<AgentLoopToolExecutionUpdate, "type">;
402
- type AgentLoopToolExecutionEndOptions = Omit<AgentLoopToolExecutionEnd, "type">;
403
- type AgentLoopModelExecutionStartOptions = Omit<AgentLoopModelExecutionStart, "type">;
404
- type AgentLoopModelExecutionEndOptions = Omit<AgentLoopModelExecutionEnd, "type">;
405
- type AgentLoopSkillExecutionStartOptions = Omit<AgentLoopSkillExecutionStart, "type">;
406
- type AgentLoopSkillExecutionEndOptions = Omit<AgentLoopSkillExecutionSucceeded, "type"> | Omit<AgentLoopSkillExecutionFailed, "type">;
407
- declare function createAgentLoopTextDelta(delta: string): AgentLoopTextDelta;
408
- declare function createAgentLoopThinkingDelta(delta: string): AgentLoopThinkingDelta;
409
- declare function createAgentLoopModelExecutionStart(options: AgentLoopModelExecutionStartOptions): AgentLoopModelExecutionStart;
410
- declare function createAgentLoopModelExecutionEnd(options: AgentLoopModelExecutionEndOptions): AgentLoopModelExecutionEnd;
411
- declare function createAgentLoopSkillExecutionStart(options: AgentLoopSkillExecutionStartOptions): AgentLoopSkillExecutionStart;
412
- declare function createAgentLoopSkillExecutionEnd(options: AgentLoopSkillExecutionEndOptions): AgentLoopSkillExecutionEnd;
413
- declare function createAgentLoopToolExecutionStart(options: AgentLoopToolExecutionStartOptions): AgentLoopToolExecutionStart;
414
- declare function createAgentLoopToolExecutionUpdate(options: AgentLoopToolExecutionUpdateOptions): AgentLoopToolExecutionUpdate;
415
- declare function createAgentLoopToolExecutionEnd(options: AgentLoopToolExecutionEndOptions): AgentLoopToolExecutionEnd;
416
- declare function createEventAgentLoop(options: EventAgentLoopOptions): AgentLoop;
417
- declare function createAsyncIterableAgentLoop(options: AsyncIterableAgentLoopOptions): AgentLoop;
418
- declare function createAgentLoopFromCallback(run: AgentLoopCallback): AgentLoop;
419
- declare function createTextAgentLoop(options: TextAgentLoopOptions): AgentLoop;
420
- declare function createTextAgentLoopFromCallback(generate: TextAgentLoopCallback): AgentLoop;
421
- //#endregion
422
8
  //#region src/application/agent/agent-harness.d.ts
423
9
  interface AgentClock {
424
10
  readonly now: Effect.Effect<Date>;
@@ -967,13 +553,15 @@ interface FeishuCancelMessageIntakeSummary extends FeishuMessageIntakeBaseSummar
967
553
  readonly reason: string;
968
554
  readonly runId: AgentRunId;
969
555
  }
970
- declare class UnsupportedFeishuMessage {
556
+ declare class UnsupportedFeishuMessage extends Error {
971
557
  readonly messageType: string;
558
+ readonly name = "UnsupportedFeishuMessage";
972
559
  readonly _tag = "UnsupportedFeishuMessage";
973
560
  constructor(messageType: string);
974
561
  }
975
- declare class InvalidFeishuMessageContent {
562
+ declare class InvalidFeishuMessageContent extends Error {
976
563
  readonly reason: string;
564
+ readonly name = "InvalidFeishuMessageContent";
977
565
  readonly _tag = "InvalidFeishuMessageContent";
978
566
  constructor(reason: string);
979
567
  }
@@ -2020,7 +1608,7 @@ interface AutomationTickRecord {
2020
1608
  readonly tickId: string;
2021
1609
  }
2022
1610
  interface AutomationTickRepository {
2023
- get(mandateId: string, occurrence: string): Promise<AutomationTickRecord | undefined>;
1611
+ get(automationId: string, occurrence: string): Promise<AutomationTickRecord | undefined>;
2024
1612
  put(record: AutomationTickRecord): Promise<AutomationTickRecord>;
2025
1613
  }
2026
1614
  interface ScheduledAutomationRunInput {
@@ -3365,22 +2953,22 @@ declare function createConfiguredFeishuTextReplySender(options: {
3365
2953
  readonly config: RivusDaemonConfig;
3366
2954
  }): FeishuTextReplySender;
3367
2955
  //#endregion
3368
- //#region src/infrastructure/feishu/feishu-markdown-message-sender.d.ts
3369
- interface FeishuMarkdownMessageInput {
2956
+ //#region src/infrastructure/feishu/feishu-automation-card-sender.d.ts
2957
+ interface FeishuAutomationCardInput {
3370
2958
  readonly idempotencyKey: string;
3371
2959
  readonly markdown: string;
3372
2960
  readonly receiveId: string;
3373
2961
  readonly receiveIdType: RivusAutomationDeliveryTargetType;
3374
2962
  }
3375
- interface FeishuMarkdownMessageSender {
3376
- send(input: FeishuMarkdownMessageInput): Effect.Effect<{
2963
+ interface FeishuAutomationCardSender {
2964
+ send(input: FeishuAutomationCardInput): Effect.Effect<{
3377
2965
  readonly providerMessageId: string;
3378
2966
  }, unknown>;
3379
2967
  }
3380
- declare function createConfiguredFeishuMarkdownMessageSender(options: {
2968
+ declare function createConfiguredFeishuAutomationCardSender(options: {
3381
2969
  readonly client: FeishuOpenApiClient;
3382
2970
  readonly config: RivusDaemonConfig;
3383
- }): FeishuMarkdownMessageSender;
2971
+ }): FeishuAutomationCardSender;
3384
2972
  //#endregion
3385
2973
  //#region src/infrastructure/persistence/jsonl-human-interaction-repository.d.ts
3386
2974
  interface JsonlHumanInteractionRepositoryOptions {
@@ -3420,4 +3008,4 @@ interface ConfiguredFeishuHumanInteractionPresenterOptions {
3420
3008
  }
3421
3009
  declare function createConfiguredFeishuHumanInteractionPresenter(options: ConfiguredFeishuHumanInteractionPresenterOptions): HumanInteractionPresenter;
3422
3010
  //#endregion
3423
- 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 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 FeishuMarkdownMessageInput, type FeishuMarkdownMessageSender, 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, InvalidRecoveryAction, InvalidRivusEndpointBinding, InvalidRivusPlugin, 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 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 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 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, createAgentLoopSkillExecutionEnd, createAgentLoopSkillExecutionStart, createAgentLoopTextDelta, createAgentLoopThinkingDelta, createAgentLoopToolExecutionEnd, createAgentLoopToolExecutionStart, createAgentLoopToolExecutionUpdate, createAgentMemoryService, createAgentRunUpdateHandler, createAgentRuntime, createAgentRuntimePool, createAgentTranscriptMessages, createAgentTranscriptTurn, createAgentsMdInstructionsProvider, createAsyncIterableAgentLoop, createAutomationMandateStore, createCoalescingFeishuPublisher, createCompactionService, createCompositeRivusDaemonTransport, createConfiguredFeishuCardKitPublisher, createConfiguredFeishuCardKitTargetPreparation, createConfiguredFeishuHumanInteractionPresenter, createConfiguredFeishuMarkdownMessageSender, 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, 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, restoreAgentHistory, restoreConfiguredRivusDaemonBootstrap, restrictMemoryScopesForAudience, runRivusDaemonCli, shouldAcceptFeishuEndpointMessage, transitionHumanInteraction, validateRivusDeploymentManifest };
3011
+ 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, InvalidRecoveryAction, InvalidRivusEndpointBinding, InvalidRivusPlugin, 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 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 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 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, 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, 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, restoreAgentHistory, restoreConfiguredRivusDaemonBootstrap, restrictMemoryScopesForAudience, runRivusDaemonCli, shouldAcceptFeishuEndpointMessage, transitionHumanInteraction, validateRivusDeploymentManifest };