@rivus/agent 0.13.2 → 0.14.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/README.md +20 -15
- package/dist/acp.d.ts +40 -40
- package/dist/acp.js +71 -31
- package/dist/bootstrap/pi-feishu.d.ts +20 -0
- package/dist/bootstrap/pi-feishu.js +594 -0
- package/dist/{agent-loop.d.ts → chunks/agent-loop.d.ts} +293 -44
- package/dist/chunks/agent-loop.js +1272 -0
- package/dist/chunks/api.d.ts +70 -0
- package/dist/chunks/api.js +471 -0
- package/dist/{rivus-plugin.d.ts → chunks/api2.d.ts} +271 -120
- package/dist/chunks/api2.js +1331 -0
- package/dist/chunks/api3.d.ts +402 -0
- package/dist/chunks/index.d.ts +3662 -0
- package/dist/chunks/module.js +267 -0
- package/dist/chunks/pi-skill-tool.js +460 -0
- package/dist/chunks/pi-tool-proxy.d.ts +188 -0
- package/dist/chunks/pi.js +329 -0
- package/dist/{rivus-daemon-cli.js → chunks/rivus-daemon-cli.js} +2197 -1526
- package/dist/{rivus-plugin-testkit.d.ts → chunks/rivus-plugin-testkit.d.ts} +1 -1
- package/dist/{rivus-plugin-testkit.js → chunks/rivus-plugin-testkit.js} +11 -3
- package/dist/chunks/sha256-digest.js +12 -0
- package/dist/chunks/spi.d.ts +1 -0
- package/dist/chunks/spi.js +2 -0
- package/dist/chunks/src.js +9897 -0
- package/dist/cli.js +602 -93
- package/dist/index.d.ts +8 -3645
- package/dist/index.js +9 -10483
- package/dist/mcp.d.ts +3 -38
- package/dist/mcp.js +4 -114
- package/dist/pi.d.ts +95 -9
- package/dist/pi.js +3 -146
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +1 -1
- package/examples/pi-feishu-deployment.bootstrap.ts +35 -46
- package/examples/pi-feishu.bootstrap.ts +35 -20
- package/examples/rivus-starter.plugin.mjs +3 -1
- package/package.json +8 -2
- package/dist/agent-loop.js +0 -121
- package/dist/agent-memory.d.ts +0 -100
- package/dist/agent-memory.js +0 -114
- package/dist/background-session-authority.js +0 -224
- package/dist/background-session-input.js +0 -45
- package/dist/background-session-service.d.ts +0 -291
- package/dist/pi-tool-proxy.d.ts +0 -197
- package/dist/rivus-plugin-registry.js +0 -215
- package/dist/tool-input-digest.js +0 -128
package/dist/index.d.ts
CHANGED
|
@@ -1,3645 +1,8 @@
|
|
|
1
|
-
import { $ as AgentTranscriptTurn, A as createAgentLoopFromCallback, At as AgentTurnCompleted, B as createAgentLoopTurnStart, C as AgentLoopToolExecutionUpdateOptions, Ct as AgentRunId, D as EventAgentLoopOptions, Dt as AgentToolExecutionEvent, E as AsyncIterableAgentLoopOptions, Et as AgentToolExecutionEnded, F as createAgentLoopTextDelta, Ft as TerminalAgentDomainEvent, G as AgentInvocationOrigin, H as createEventAgentLoop, I as createAgentLoopThinkingDelta, It as isAgentToolExecutionEvent, J as LocalCliAgentInvocationOrigin, K as AutomationAgentInvocationOrigin, L as createAgentLoopToolExecutionEnd, Lt as isAssistantTextDeltaEvent, M as createAgentLoopModelExecutionStart, Mt as AssistantTextDelta, N as createAgentLoopSkillExecutionEnd, Nt as AssistantThinkingDelta, O as TextAgentLoopCallback, Ot as AgentToolExecutionStarted, P as createAgentLoopSkillExecutionStart, Pt as SessionKey, Q as AgentTranscriptMessageRole, R as createAgentLoopToolExecutionStart, Rt as isAssistantThinkingDeltaEvent, S as AgentLoopToolExecutionUpdate, St as AgentRunFailed, T as AgentSteeringChannel, Tt as AgentSkillExecutionStarted, U as createTextAgentLoop, V as createAsyncIterableAgentLoop, W as createTextAgentLoopFromCallback, X as AgentTranscript, Y as AgentConversationMessagesOptions, Z as AgentTranscriptMessage, _ as AgentLoopThinkingDelta, _t as AgentModelExecutionStarted, a as AgentLoopEvent, at as AgentRunSummary, b as AgentLoopToolExecutionStart, bt as AgentRunCancelled$1, c as AgentLoopModelExecutionEnd, ct as AgentRunPhase, d as AgentLoopModelExecutionStartOptions, dt as evolveAgentRun, et as createAgentConversationMessages, f as AgentLoopSkillExecutionEnd, ft as initialAgentRunState, g as AgentLoopTextDelta, gt as AgentModelExecutionEvent, h as AgentLoopSkillExecutionStartOptions, ht as AgentModelExecutionEnded, i as AgentLoopCallbackResult, it as AgentHistory, j as createAgentLoopModelExecutionEnd, jt as AgentTurnStarted, k as TextAgentLoopOptions, kt as AgentToolExecutionUpdated, l as AgentLoopModelExecutionEndOptions, lt as AgentRunState, m as AgentLoopSkillExecutionStart, mt as AgentDomainEvent, n as AgentLoopCallback, nt as createAgentTranscriptTurn, o as AgentLoopEventLike, ot as AgentSessionSummary, p as AgentLoopSkillExecutionEndOptions, pt as isTerminalAgentRunPhase, q as FeishuAgentInvocationOrigin, r as AgentLoopCallbackOutput, rt as replayAgentTranscript, s as AgentLoopInput, st as replayAgentHistory, t as AgentLoop, tt as createAgentTranscriptMessages, u as AgentLoopModelExecutionStart, ut as AgentSkillExecutionState, v as AgentLoopToolExecutionEnd, vt as AgentModelUsage, w as AgentLoopTurnStart, wt as AgentSkillExecutionEnded, x as AgentLoopToolExecutionStartOptions, xt as AgentRunCompleted, y as AgentLoopToolExecutionEndOptions, yt as AgentRunAccepted, z as createAgentLoopToolExecutionUpdate, zt as isTerminalAgentDomainEvent } from "./agent-loop.js";
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { A as
|
|
5
|
-
import {
|
|
6
|
-
import { a as
|
|
7
|
-
import {
|
|
8
|
-
import { Tracer } from "@opentelemetry/api";
|
|
9
|
-
|
|
10
|
-
//#region src/domain/conversation-progress.d.ts
|
|
11
|
-
declare const DEFAULT_CONVERSATION_PROGRESS_DISPLAY: "collapsed";
|
|
12
|
-
type ConversationProgressDisplay = "hidden" | "collapsed" | "expanded";
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/application/agent/agent-harness.d.ts
|
|
15
|
-
interface AgentClock {
|
|
16
|
-
readonly now: Effect.Effect<Date>;
|
|
17
|
-
}
|
|
18
|
-
interface RunIdGenerator {
|
|
19
|
-
readonly next: Effect.Effect<AgentRunId>;
|
|
20
|
-
}
|
|
21
|
-
interface AgentHarnessOptions {
|
|
22
|
-
readonly clock: AgentClock;
|
|
23
|
-
readonly eventSinks?: ReadonlyArray<AgentDomainEventSink>;
|
|
24
|
-
readonly initialEvents?: ReadonlyArray<AgentDomainEvent>;
|
|
25
|
-
readonly initialRunStates?: ReadonlyArray<AgentRunState>;
|
|
26
|
-
readonly loop: AgentLoop;
|
|
27
|
-
readonly runTimeoutMs?: number;
|
|
28
|
-
readonly runIds: RunIdGenerator;
|
|
29
|
-
}
|
|
30
|
-
interface PromptCommand {
|
|
31
|
-
readonly invocation?: AgentInvocationOrigin;
|
|
32
|
-
readonly sessionKey: SessionKey;
|
|
33
|
-
readonly text: string;
|
|
34
|
-
}
|
|
35
|
-
interface AgentPromptResult {
|
|
36
|
-
readonly runId: AgentRunId;
|
|
37
|
-
readonly events: ReadonlyArray<AgentDomainEvent>;
|
|
38
|
-
readonly finalText: string;
|
|
39
|
-
readonly runSnapshot: AgentRunSnapshot;
|
|
40
|
-
readonly snapshot: AgentSessionSnapshot;
|
|
41
|
-
readonly state: AgentRunState;
|
|
42
|
-
readonly turn: AgentTranscriptTurn;
|
|
43
|
-
readonly updates: ReadonlyArray<AgentRunUpdate>;
|
|
44
|
-
}
|
|
45
|
-
interface AgentRunUpdate {
|
|
46
|
-
readonly event: AgentDomainEvent;
|
|
47
|
-
readonly previousState?: AgentRunState;
|
|
48
|
-
readonly state: AgentRunState;
|
|
49
|
-
}
|
|
50
|
-
interface AgentRunSnapshot {
|
|
51
|
-
readonly events: ReadonlyArray<AgentDomainEvent>;
|
|
52
|
-
readonly runId: AgentRunId;
|
|
53
|
-
readonly state?: AgentRunState;
|
|
54
|
-
readonly summary: AgentRunSummary;
|
|
55
|
-
readonly updates: ReadonlyArray<AgentRunUpdate>;
|
|
56
|
-
}
|
|
57
|
-
interface ActiveAgentRun {
|
|
58
|
-
readonly runId: AgentRunId;
|
|
59
|
-
readonly sessionKey: SessionKey;
|
|
60
|
-
}
|
|
61
|
-
type AgentHarnessAvailability = AgentHarnessIdleAvailability | AgentHarnessBusyAvailability;
|
|
62
|
-
type AgentSessionAvailability = AgentHarnessIdleAvailability | AgentSessionBusyAvailability;
|
|
63
|
-
interface AgentHarnessIdleAvailability {
|
|
64
|
-
readonly busy: false;
|
|
65
|
-
}
|
|
66
|
-
interface AgentHarnessBusyAvailability {
|
|
67
|
-
readonly activeRun: ActiveAgentRun;
|
|
68
|
-
readonly activeRunId: AgentRunId;
|
|
69
|
-
readonly activeSessionKey: SessionKey;
|
|
70
|
-
readonly activeState?: AgentRunState;
|
|
71
|
-
readonly busy: true;
|
|
72
|
-
}
|
|
73
|
-
type AgentSessionBusyAvailability = AgentSessionOwnedBusyAvailability | AgentSessionOtherBusyAvailability;
|
|
74
|
-
interface AgentSessionOwnedBusyAvailability {
|
|
75
|
-
readonly activeInSession: true;
|
|
76
|
-
readonly activeRun: ActiveAgentRun;
|
|
77
|
-
readonly activeRunId: AgentRunId;
|
|
78
|
-
readonly activeState?: AgentRunState;
|
|
79
|
-
readonly busy: true;
|
|
80
|
-
}
|
|
81
|
-
interface AgentSessionOtherBusyAvailability {
|
|
82
|
-
readonly activeInSession: false;
|
|
83
|
-
readonly busy: true;
|
|
84
|
-
}
|
|
85
|
-
interface AgentSessionSnapshot {
|
|
86
|
-
readonly availability: AgentSessionAvailability;
|
|
87
|
-
readonly latestRunSummary?: AgentRunSummary;
|
|
88
|
-
readonly runs: ReadonlyArray<AgentRunSummary>;
|
|
89
|
-
readonly sessionKey: SessionKey;
|
|
90
|
-
readonly state?: AgentRunState;
|
|
91
|
-
readonly summary?: AgentSessionSummary;
|
|
92
|
-
readonly transcript: AgentTranscript;
|
|
93
|
-
}
|
|
94
|
-
declare class AgentHarnessBusy {
|
|
95
|
-
readonly activeRun: ActiveAgentRun;
|
|
96
|
-
readonly activeState?: AgentRunState | undefined;
|
|
97
|
-
readonly _tag = "AgentHarnessBusy";
|
|
98
|
-
readonly activeRunId: AgentRunId;
|
|
99
|
-
readonly activeSessionKey: SessionKey;
|
|
100
|
-
constructor(activeRun: ActiveAgentRun, activeState?: AgentRunState | undefined);
|
|
101
|
-
}
|
|
102
|
-
declare class AgentLoopFailed {
|
|
103
|
-
readonly runId: AgentRunId;
|
|
104
|
-
readonly errorMessage: string;
|
|
105
|
-
readonly cause: unknown;
|
|
106
|
-
readonly state?: AgentRunState | undefined;
|
|
107
|
-
readonly _tag = "AgentLoopFailed";
|
|
108
|
-
constructor(runId: AgentRunId, errorMessage: string, cause: unknown, state?: AgentRunState | undefined);
|
|
109
|
-
}
|
|
110
|
-
declare class AgentEventSinkFailed {
|
|
111
|
-
readonly runId: AgentRunId;
|
|
112
|
-
readonly eventType: AgentDomainEvent["type"];
|
|
113
|
-
readonly cause: unknown;
|
|
114
|
-
readonly _tag = "AgentEventSinkFailed";
|
|
115
|
-
constructor(runId: AgentRunId, eventType: AgentDomainEvent["type"], cause: unknown);
|
|
116
|
-
}
|
|
117
|
-
declare class AgentEventHandlerFailed {
|
|
118
|
-
readonly runId: AgentRunId;
|
|
119
|
-
readonly eventType: AgentDomainEvent["type"];
|
|
120
|
-
readonly cause: unknown;
|
|
121
|
-
readonly state?: AgentRunState | undefined;
|
|
122
|
-
readonly _tag = "AgentEventHandlerFailed";
|
|
123
|
-
constructor(runId: AgentRunId, eventType: AgentDomainEvent["type"], cause: unknown, state?: AgentRunState | undefined);
|
|
124
|
-
}
|
|
125
|
-
declare class AgentRunCancelled {
|
|
126
|
-
readonly runId: AgentRunId;
|
|
127
|
-
readonly reason: string | undefined;
|
|
128
|
-
readonly state: AgentRunState;
|
|
129
|
-
readonly _tag = "AgentRunCancelled";
|
|
130
|
-
constructor(runId: AgentRunId, reason: string | undefined, state: AgentRunState);
|
|
131
|
-
}
|
|
132
|
-
type AgentHarnessError = AgentHarnessBusy | AgentLoopFailed | AgentEventSinkFailed | AgentEventHandlerFailed | AgentRunCancelled;
|
|
133
|
-
interface AgentHarness {
|
|
134
|
-
cancelActiveRun(reason?: string): Effect.Effect<boolean>;
|
|
135
|
-
cancelRun(runId: AgentRunId, reason?: string): Effect.Effect<boolean>;
|
|
136
|
-
steerRun(runId: AgentRunId, text: string): Effect.Effect<boolean>;
|
|
137
|
-
forSession(sessionKey: SessionKey): AgentSessionHandle;
|
|
138
|
-
getActiveRun(): ActiveAgentRun | undefined;
|
|
139
|
-
getActiveRunId(): AgentRunId | undefined;
|
|
140
|
-
getActiveRunState(): AgentRunState | undefined;
|
|
141
|
-
getAvailability(): AgentHarnessAvailability;
|
|
142
|
-
getHistory(): AgentHistory;
|
|
143
|
-
getRunEvents(runId: AgentRunId): ReadonlyArray<AgentDomainEvent> | undefined;
|
|
144
|
-
getRunSnapshot(runId: AgentRunId): AgentRunSnapshot | undefined;
|
|
145
|
-
getRunSummary(runId: AgentRunId): AgentRunSummary | undefined;
|
|
146
|
-
getRunState(runId: AgentRunId): AgentRunState | undefined;
|
|
147
|
-
getRunUpdates(runId: AgentRunId): ReadonlyArray<AgentRunUpdate> | undefined;
|
|
148
|
-
getSessionHistory(sessionKey: SessionKey): AgentHistory;
|
|
149
|
-
getSessionLatestRunSnapshot(sessionKey: SessionKey): AgentRunSnapshot | undefined;
|
|
150
|
-
getSessionLatestRunSummary(sessionKey: SessionKey): AgentRunSummary | undefined;
|
|
151
|
-
getSessionRuns(sessionKey: SessionKey): ReadonlyArray<AgentRunSummary>;
|
|
152
|
-
getSessionSnapshot(sessionKey: SessionKey): AgentSessionSnapshot;
|
|
153
|
-
getSessionSummary(sessionKey: SessionKey): AgentSessionSummary | undefined;
|
|
154
|
-
getSessionTranscript(sessionKey: SessionKey): AgentTranscript;
|
|
155
|
-
getSessionState(sessionKey: SessionKey): AgentRunState | undefined;
|
|
156
|
-
getState(): AgentRunState;
|
|
157
|
-
prompt(command: PromptCommand): Effect.Effect<AgentPromptResult, AgentHarnessError>;
|
|
158
|
-
promptRunSnapshot(command: PromptCommand): Effect.Effect<AgentRunSnapshot, AgentHarnessError>;
|
|
159
|
-
promptSnapshot(command: PromptCommand): Effect.Effect<AgentSessionSnapshot, AgentHarnessError>;
|
|
160
|
-
promptText(command: PromptCommand): Effect.Effect<string, AgentHarnessError>;
|
|
161
|
-
promptTurn(command: PromptCommand): Effect.Effect<AgentTranscriptTurn, AgentHarnessError>;
|
|
162
|
-
promptWithEvents<R>(command: PromptCommand, onEvent: AgentDomainEventHandler<R>): Effect.Effect<AgentPromptResult, AgentHarnessError, R>;
|
|
163
|
-
promptWithUpdates<R>(command: PromptCommand, onUpdate: AgentRunUpdateHandler<R>): Effect.Effect<AgentPromptResult, AgentHarnessError, R>;
|
|
164
|
-
stream(command: PromptCommand): Stream.Stream<AgentDomainEvent, AgentHarnessError>;
|
|
165
|
-
streamText(command: PromptCommand): Stream.Stream<string, AgentHarnessError>;
|
|
166
|
-
streamUpdates(command: PromptCommand): Stream.Stream<AgentRunUpdate, AgentHarnessError>;
|
|
167
|
-
subscribe(listener: AgentDomainEventListener): () => void;
|
|
168
|
-
subscribeRun(runId: AgentRunId, listener: AgentDomainEventListener): () => void;
|
|
169
|
-
subscribeRunUpdates(runId: AgentRunId, listener: AgentRunUpdateListener): () => void;
|
|
170
|
-
subscribeUpdates(listener: AgentRunUpdateListener): () => void;
|
|
171
|
-
}
|
|
172
|
-
interface AgentSessionHandle {
|
|
173
|
-
readonly sessionKey: SessionKey;
|
|
174
|
-
cancelActiveRun(reason?: string): Effect.Effect<boolean>;
|
|
175
|
-
cancelRun(runId: AgentRunId, reason?: string): Effect.Effect<boolean>;
|
|
176
|
-
steerRun(runId: AgentRunId, text: string): Effect.Effect<boolean>;
|
|
177
|
-
getActiveRun(): ActiveAgentRun | undefined;
|
|
178
|
-
getActiveRunState(): AgentRunState | undefined;
|
|
179
|
-
getAvailability(): AgentSessionAvailability;
|
|
180
|
-
getHistory(): AgentHistory;
|
|
181
|
-
getLatestRunSnapshot(): AgentRunSnapshot | undefined;
|
|
182
|
-
getLatestRunSummary(): AgentRunSummary | undefined;
|
|
183
|
-
getRunEvents(runId: AgentRunId): ReadonlyArray<AgentDomainEvent> | undefined;
|
|
184
|
-
getRunSnapshot(runId: AgentRunId): AgentRunSnapshot | undefined;
|
|
185
|
-
getRunSummary(runId: AgentRunId): AgentRunSummary | undefined;
|
|
186
|
-
getRuns(): ReadonlyArray<AgentRunSummary>;
|
|
187
|
-
getSnapshot(): AgentSessionSnapshot;
|
|
188
|
-
getSummary(): AgentSessionSummary | undefined;
|
|
189
|
-
getTranscript(): AgentTranscript;
|
|
190
|
-
getRunState(runId: AgentRunId): AgentRunState | undefined;
|
|
191
|
-
getRunUpdates(runId: AgentRunId): ReadonlyArray<AgentRunUpdate> | undefined;
|
|
192
|
-
getState(): AgentRunState | undefined;
|
|
193
|
-
prompt(text: string): Effect.Effect<AgentPromptResult, AgentHarnessError>;
|
|
194
|
-
promptRunSnapshot(text: string): Effect.Effect<AgentRunSnapshot, AgentHarnessError>;
|
|
195
|
-
promptSnapshot(text: string): Effect.Effect<AgentSessionSnapshot, AgentHarnessError>;
|
|
196
|
-
promptText(text: string): Effect.Effect<string, AgentHarnessError>;
|
|
197
|
-
promptTurn(text: string): Effect.Effect<AgentTranscriptTurn, AgentHarnessError>;
|
|
198
|
-
promptWithEvents<R>(text: string, onEvent: AgentDomainEventHandler<R>): Effect.Effect<AgentPromptResult, AgentHarnessError, R>;
|
|
199
|
-
promptWithUpdates<R>(text: string, onUpdate: AgentRunUpdateHandler<R>): Effect.Effect<AgentPromptResult, AgentHarnessError, R>;
|
|
200
|
-
stream(text: string): Stream.Stream<AgentDomainEvent, AgentHarnessError>;
|
|
201
|
-
streamText(text: string): Stream.Stream<string, AgentHarnessError>;
|
|
202
|
-
streamUpdates(text: string): Stream.Stream<AgentRunUpdate, AgentHarnessError>;
|
|
203
|
-
subscribe(listener: AgentDomainEventListener): () => void;
|
|
204
|
-
subscribeRun(runId: AgentRunId, listener: AgentDomainEventListener): () => void;
|
|
205
|
-
subscribeRunUpdates(runId: AgentRunId, listener: AgentRunUpdateListener): () => void;
|
|
206
|
-
subscribeUpdates(listener: AgentRunUpdateListener): () => void;
|
|
207
|
-
}
|
|
208
|
-
type AgentDomainEventListener = (event: AgentDomainEvent) => void;
|
|
209
|
-
type AgentRunUpdateListener = (update: AgentRunUpdate) => void;
|
|
210
|
-
type AgentDomainEventCallback = (event: AgentDomainEvent) => void | Promise<void>;
|
|
211
|
-
type AgentDomainEventHandler<R = never> = (event: AgentDomainEvent) => Effect.Effect<void, unknown, R>;
|
|
212
|
-
type AgentRunUpdateCallback = (update: AgentRunUpdate) => void | Promise<void>;
|
|
213
|
-
type AgentRunUpdateHandler<R = never> = (update: AgentRunUpdate) => Effect.Effect<void, unknown, R>;
|
|
214
|
-
interface AgentDomainEventSink {
|
|
215
|
-
append(event: AgentDomainEvent): Effect.Effect<void, unknown>;
|
|
216
|
-
}
|
|
217
|
-
type AgentDomainEventSinkCallback = (event: AgentDomainEvent) => void | Promise<void>;
|
|
218
|
-
declare function createAgentDomainEventSink(append: (event: AgentDomainEvent) => Effect.Effect<void, unknown>): AgentDomainEventSink;
|
|
219
|
-
declare function createAgentDomainEventSinkFromCallback(append: AgentDomainEventSinkCallback): AgentDomainEventSink;
|
|
220
|
-
declare function createAgentDomainEventHandler(handle: AgentDomainEventCallback): AgentDomainEventHandler;
|
|
221
|
-
declare function createAgentRunUpdateHandler(handle: AgentRunUpdateCallback): AgentRunUpdateHandler;
|
|
222
|
-
declare function createAgentHarness(options: AgentHarnessOptions): AgentHarness;
|
|
223
|
-
//#endregion
|
|
224
|
-
//#region src/domain/run-presentation.d.ts
|
|
225
|
-
declare const RUN_PRESENTATION_SCHEMA_VERSION: 2;
|
|
226
|
-
type RunPresentationPhase = "cancelled" | "completed" | "failed" | "running";
|
|
227
|
-
type PresentationStepStatus = "completed" | "failed" | "running";
|
|
228
|
-
type PresentedValue = {
|
|
229
|
-
readonly kind: "boolean";
|
|
230
|
-
readonly value: boolean;
|
|
231
|
-
} | {
|
|
232
|
-
readonly entries: ReadonlyArray<{
|
|
233
|
-
readonly key: string;
|
|
234
|
-
readonly value: PresentedValue;
|
|
235
|
-
}>;
|
|
236
|
-
readonly kind: "record";
|
|
237
|
-
readonly omittedEntries: number;
|
|
238
|
-
} | {
|
|
239
|
-
readonly items: ReadonlyArray<PresentedValue>;
|
|
240
|
-
readonly kind: "list";
|
|
241
|
-
readonly omittedItems: number;
|
|
242
|
-
} | {
|
|
243
|
-
readonly kind: "null";
|
|
244
|
-
} | {
|
|
245
|
-
readonly kind: "number";
|
|
246
|
-
readonly value: number;
|
|
247
|
-
} | {
|
|
248
|
-
readonly kind: "redacted";
|
|
249
|
-
readonly reason: "sensitive-key" | "sensitive-value";
|
|
250
|
-
} | {
|
|
251
|
-
readonly kind: "text";
|
|
252
|
-
readonly omittedCharacters: number;
|
|
253
|
-
readonly value: string;
|
|
254
|
-
} | {
|
|
255
|
-
readonly kind: "unsupported";
|
|
256
|
-
readonly valueType: string;
|
|
257
|
-
};
|
|
258
|
-
interface PresentationStepBase {
|
|
259
|
-
readonly durationMs?: number;
|
|
260
|
-
readonly endedAt?: string;
|
|
261
|
-
readonly id: string;
|
|
262
|
-
readonly label: string;
|
|
263
|
-
readonly startedAt: string;
|
|
264
|
-
readonly status: PresentationStepStatus;
|
|
265
|
-
}
|
|
266
|
-
interface AssistantPresentationStep extends PresentationStepBase {
|
|
267
|
-
readonly kind: "assistant";
|
|
268
|
-
readonly text: string;
|
|
269
|
-
}
|
|
270
|
-
interface ModelPresentationStep extends PresentationStepBase {
|
|
271
|
-
readonly kind: "model";
|
|
272
|
-
readonly model: string;
|
|
273
|
-
readonly provider: string;
|
|
274
|
-
}
|
|
275
|
-
interface SkillPresentationStep extends PresentationStepBase {
|
|
276
|
-
readonly kind: "skill";
|
|
277
|
-
readonly skillId: string;
|
|
278
|
-
}
|
|
279
|
-
interface ToolPresentationStep extends PresentationStepBase {
|
|
280
|
-
readonly error?: PresentedValue;
|
|
281
|
-
readonly input: PresentedValue;
|
|
282
|
-
readonly kind: "tool";
|
|
283
|
-
readonly output?: PresentedValue;
|
|
284
|
-
readonly skillId?: string;
|
|
285
|
-
readonly toolName: string;
|
|
286
|
-
}
|
|
287
|
-
interface ResponsePresentationStep extends PresentationStepBase {
|
|
288
|
-
readonly kind: "response";
|
|
289
|
-
}
|
|
290
|
-
type PresentationStep = AssistantPresentationStep | ModelPresentationStep | ResponsePresentationStep | SkillPresentationStep | ToolPresentationStep;
|
|
291
|
-
interface RunPresentation {
|
|
292
|
-
readonly answer: {
|
|
293
|
-
readonly format: "markdown";
|
|
294
|
-
readonly text: string;
|
|
295
|
-
};
|
|
296
|
-
readonly omittedStepCount: number;
|
|
297
|
-
readonly phase: RunPresentationPhase;
|
|
298
|
-
readonly revision: number;
|
|
299
|
-
readonly runId: AgentRunId;
|
|
300
|
-
readonly schemaVersion: typeof RUN_PRESENTATION_SCHEMA_VERSION;
|
|
301
|
-
readonly steps: ReadonlyArray<PresentationStep>;
|
|
302
|
-
readonly totalStepCount: number;
|
|
303
|
-
readonly totalToolCallCount: number;
|
|
304
|
-
}
|
|
305
|
-
declare function hasInspectableRunProgress(presentation: RunPresentation): boolean;
|
|
306
|
-
//#endregion
|
|
307
|
-
//#region src/application/feishu/feishu-stream-projector.d.ts
|
|
308
|
-
type FeishuStreamAction = {
|
|
309
|
-
readonly type: "update_text";
|
|
310
|
-
readonly runId: AgentRunId;
|
|
311
|
-
readonly text: string;
|
|
312
|
-
} | {
|
|
313
|
-
readonly presentation: RunPresentation;
|
|
314
|
-
readonly runId: AgentRunId;
|
|
315
|
-
readonly type: "update_progress";
|
|
316
|
-
} | {
|
|
317
|
-
readonly presentation?: RunPresentation;
|
|
318
|
-
readonly runId: AgentRunId;
|
|
319
|
-
readonly sessionKey: string;
|
|
320
|
-
readonly text?: string;
|
|
321
|
-
readonly type: "update_presentation";
|
|
322
|
-
} | {
|
|
323
|
-
readonly presentation?: RunPresentation;
|
|
324
|
-
readonly type: "finish";
|
|
325
|
-
readonly runId: AgentRunId;
|
|
326
|
-
readonly text: string;
|
|
327
|
-
} | {
|
|
328
|
-
readonly presentation?: RunPresentation;
|
|
329
|
-
readonly type: "fail";
|
|
330
|
-
readonly runId: AgentRunId;
|
|
331
|
-
readonly errorMessage: string;
|
|
332
|
-
} | {
|
|
333
|
-
readonly presentation?: RunPresentation;
|
|
334
|
-
readonly type: "cancel";
|
|
335
|
-
readonly runId: AgentRunId;
|
|
336
|
-
readonly reason?: string;
|
|
337
|
-
readonly text?: string;
|
|
338
|
-
};
|
|
339
|
-
interface FeishuStreamProjector {
|
|
340
|
-
apply(event: AgentDomainEvent): ReadonlyArray<FeishuStreamAction>;
|
|
341
|
-
applyUpdate(update: AgentRunUpdate): ReadonlyArray<FeishuStreamAction>;
|
|
342
|
-
}
|
|
343
|
-
declare function createFeishuStreamProjector(): FeishuStreamProjector;
|
|
344
|
-
//#endregion
|
|
345
|
-
//#region src/application/feishu/feishu-card-delivery-ledger.d.ts
|
|
346
|
-
interface FeishuCardDeliveryRecord {
|
|
347
|
-
readonly revision: number;
|
|
348
|
-
readonly runId: AgentRunId;
|
|
349
|
-
readonly sequence: number;
|
|
350
|
-
readonly terminalPublished: boolean;
|
|
351
|
-
}
|
|
352
|
-
interface FeishuCardDeliveryLedger {
|
|
353
|
-
isTerminalPublished(runId: AgentRunId): boolean;
|
|
354
|
-
markTerminal(runId: AgentRunId): Effect.Effect<void, unknown>;
|
|
355
|
-
reserveSequence(runId: AgentRunId): Effect.Effect<number, unknown>;
|
|
356
|
-
}
|
|
357
|
-
interface FeishuCardDeliveryLedgerStateOptions {
|
|
358
|
-
readonly initial?: ReadonlyArray<FeishuCardDeliveryRecord>;
|
|
359
|
-
readonly persist?: (record: FeishuCardDeliveryRecord) => Promise<void>;
|
|
360
|
-
}
|
|
361
|
-
interface FeishuCardDeliveryReconciler {
|
|
362
|
-
reconcile(): Effect.Effect<{
|
|
363
|
-
readonly repaired: number;
|
|
364
|
-
readonly skipped: number;
|
|
365
|
-
readonly terminalRuns: number;
|
|
366
|
-
}, unknown>;
|
|
367
|
-
}
|
|
368
|
-
interface FeishuCardDeliveryReconcilerOptions {
|
|
369
|
-
readonly events: ReadonlyArray<AgentDomainEvent>;
|
|
370
|
-
readonly ledger: FeishuCardDeliveryLedger;
|
|
371
|
-
readonly publish: (action: FeishuStreamAction) => Effect.Effect<void, unknown>;
|
|
372
|
-
}
|
|
373
|
-
declare function createFeishuCardDeliveryLedger(options?: FeishuCardDeliveryLedgerStateOptions): FeishuCardDeliveryLedger;
|
|
374
|
-
declare function createFeishuCardDeliveryReconciler(options: FeishuCardDeliveryReconcilerOptions): FeishuCardDeliveryReconciler;
|
|
375
|
-
//#endregion
|
|
376
|
-
//#region src/infrastructure/persistence/jsonl-feishu-card-delivery-ledger.d.ts
|
|
377
|
-
interface JsonlFeishuCardDeliveryLedgerOptions {
|
|
378
|
-
readonly filePath: string;
|
|
379
|
-
}
|
|
380
|
-
declare function openJsonlFeishuCardDeliveryLedger(options: JsonlFeishuCardDeliveryLedgerOptions): Promise<FeishuCardDeliveryLedger>;
|
|
381
|
-
//#endregion
|
|
382
|
-
//#region src/domain/human-interaction.d.ts
|
|
383
|
-
type HumanInteractionId = string;
|
|
384
|
-
interface HumanInteractionActor {
|
|
385
|
-
readonly openId: string;
|
|
386
|
-
readonly tenantKey: string;
|
|
387
|
-
}
|
|
388
|
-
interface HumanInteractionFact {
|
|
389
|
-
readonly label: string;
|
|
390
|
-
readonly value: string;
|
|
391
|
-
}
|
|
392
|
-
interface ToolApprovalBinding {
|
|
393
|
-
readonly agentId: string;
|
|
394
|
-
readonly callId: string;
|
|
395
|
-
readonly inputDigest: string;
|
|
396
|
-
readonly instanceId: string;
|
|
397
|
-
readonly operationId: string;
|
|
398
|
-
readonly risk: RivusToolRisk;
|
|
399
|
-
readonly runId: string;
|
|
400
|
-
readonly sessionKey: string;
|
|
401
|
-
readonly tenantKey: string;
|
|
402
|
-
readonly toolId: string;
|
|
403
|
-
readonly toolVersion: string;
|
|
404
|
-
}
|
|
405
|
-
interface HumanInteractionBase {
|
|
406
|
-
readonly agentId: string;
|
|
407
|
-
readonly allowedActorOpenIds: ReadonlyArray<string>;
|
|
408
|
-
readonly createdAt: string;
|
|
409
|
-
readonly expiresAt: string;
|
|
410
|
-
readonly facts: ReadonlyArray<HumanInteractionFact>;
|
|
411
|
-
readonly id: HumanInteractionId;
|
|
412
|
-
readonly instanceId: string;
|
|
413
|
-
readonly revision: number;
|
|
414
|
-
readonly runId: string;
|
|
415
|
-
readonly sessionKey: string;
|
|
416
|
-
readonly sourceMessageId: string;
|
|
417
|
-
readonly summary: string;
|
|
418
|
-
readonly tenantKey: string;
|
|
419
|
-
readonly title: string;
|
|
420
|
-
}
|
|
421
|
-
interface PendingHumanInteractionState {
|
|
422
|
-
readonly status: "pending";
|
|
423
|
-
}
|
|
424
|
-
interface ApprovedHumanInteractionState {
|
|
425
|
-
readonly actor: HumanInteractionActor;
|
|
426
|
-
readonly consumedAt?: string;
|
|
427
|
-
readonly resolvedAt: string;
|
|
428
|
-
readonly status: "approved";
|
|
429
|
-
}
|
|
430
|
-
interface RejectedHumanInteractionState {
|
|
431
|
-
readonly actor: HumanInteractionActor;
|
|
432
|
-
readonly resolvedAt: string;
|
|
433
|
-
readonly status: "rejected";
|
|
434
|
-
}
|
|
435
|
-
interface SelectedHumanInteractionState {
|
|
436
|
-
readonly actor: HumanInteractionActor;
|
|
437
|
-
readonly optionId: string;
|
|
438
|
-
readonly resolvedAt: string;
|
|
439
|
-
readonly status: "selected";
|
|
440
|
-
}
|
|
441
|
-
interface ExpiredHumanInteractionState {
|
|
442
|
-
readonly expiredAt: string;
|
|
443
|
-
readonly status: "expired";
|
|
444
|
-
}
|
|
445
|
-
interface CancelledHumanInteractionState {
|
|
446
|
-
readonly cancelledAt: string;
|
|
447
|
-
readonly reason?: string;
|
|
448
|
-
readonly status: "cancelled";
|
|
449
|
-
}
|
|
450
|
-
type ToolApprovalInteractionState = PendingHumanInteractionState | ApprovedHumanInteractionState | RejectedHumanInteractionState | ExpiredHumanInteractionState | CancelledHumanInteractionState;
|
|
451
|
-
interface ToolApprovalInteraction extends HumanInteractionBase {
|
|
452
|
-
readonly kind: "tool-approval";
|
|
453
|
-
readonly request: Omit<ToolApprovalBinding, "agentId" | "instanceId" | "runId" | "sessionKey" | "tenantKey">;
|
|
454
|
-
readonly state: ToolApprovalInteractionState;
|
|
455
|
-
}
|
|
456
|
-
interface UserDecisionOption {
|
|
457
|
-
readonly description: string;
|
|
458
|
-
readonly id: string;
|
|
459
|
-
readonly label: string;
|
|
460
|
-
}
|
|
461
|
-
type UserDecisionInteractionState = PendingHumanInteractionState | SelectedHumanInteractionState | RejectedHumanInteractionState | ExpiredHumanInteractionState | CancelledHumanInteractionState;
|
|
462
|
-
interface UserDecisionInteraction extends HumanInteractionBase {
|
|
463
|
-
readonly kind: "user-decision";
|
|
464
|
-
readonly options: ReadonlyArray<UserDecisionOption>;
|
|
465
|
-
readonly recommendedOptionId?: string;
|
|
466
|
-
readonly state: UserDecisionInteractionState;
|
|
467
|
-
}
|
|
468
|
-
type HumanInteraction = ToolApprovalInteraction | UserDecisionInteraction;
|
|
469
|
-
type HumanInteractionResolutionAction = "approve" | "reject" | "select";
|
|
470
|
-
type HumanInteractionTransition = {
|
|
471
|
-
readonly action: HumanInteractionResolutionAction;
|
|
472
|
-
readonly actor: HumanInteractionActor;
|
|
473
|
-
readonly now: string;
|
|
474
|
-
readonly optionId?: string;
|
|
475
|
-
readonly type: "resolve";
|
|
476
|
-
} | {
|
|
477
|
-
readonly binding: ToolApprovalBinding;
|
|
478
|
-
readonly now: string;
|
|
479
|
-
readonly type: "consume-approval";
|
|
480
|
-
} | {
|
|
481
|
-
readonly now: string;
|
|
482
|
-
readonly reason?: string;
|
|
483
|
-
readonly type: "cancel";
|
|
484
|
-
};
|
|
485
|
-
//#endregion
|
|
486
|
-
//#region src/application/interaction/human-interaction-repository.d.ts
|
|
487
|
-
declare class HumanInteractionRepositoryError extends Error {
|
|
488
|
-
readonly operation: "create" | "get" | "update";
|
|
489
|
-
readonly cause?: unknown | undefined;
|
|
490
|
-
readonly name = "HumanInteractionRepositoryError";
|
|
491
|
-
constructor(operation: "create" | "get" | "update", message: string, cause?: unknown | undefined);
|
|
492
|
-
}
|
|
493
|
-
interface HumanInteractionRepository {
|
|
494
|
-
create(interaction: HumanInteraction): Effect.Effect<void, HumanInteractionRepositoryError>;
|
|
495
|
-
get(id: HumanInteractionId): Effect.Effect<HumanInteraction | undefined, HumanInteractionRepositoryError>;
|
|
496
|
-
update(id: HumanInteractionId, transition: (current: HumanInteraction) => HumanInteraction): Effect.Effect<HumanInteraction, HumanInteractionRepositoryError>;
|
|
497
|
-
}
|
|
498
|
-
declare function createInMemoryHumanInteractionRepository(): HumanInteractionRepository;
|
|
499
|
-
//#endregion
|
|
500
|
-
//#region src/application/interaction/human-interaction-service.d.ts
|
|
501
|
-
interface HumanInteractionClock {
|
|
502
|
-
now(): string;
|
|
503
|
-
}
|
|
504
|
-
interface HumanInteractionPresenter {
|
|
505
|
-
present(interaction: HumanInteraction): Effect.Effect<void, unknown>;
|
|
506
|
-
}
|
|
507
|
-
interface RequestToolApprovalInput {
|
|
508
|
-
readonly agentId: string;
|
|
509
|
-
readonly allowedActorOpenIds: ReadonlyArray<string>;
|
|
510
|
-
readonly expiresAt: string;
|
|
511
|
-
readonly facts: ReadonlyArray<HumanInteractionFact>;
|
|
512
|
-
readonly instanceId: string;
|
|
513
|
-
readonly interactionId: string;
|
|
514
|
-
readonly request: {
|
|
515
|
-
readonly callId: string;
|
|
516
|
-
readonly inputDigest: string;
|
|
517
|
-
readonly operationId: string;
|
|
518
|
-
readonly risk: RivusToolRisk;
|
|
519
|
-
readonly toolId: string;
|
|
520
|
-
readonly toolVersion: string;
|
|
521
|
-
};
|
|
522
|
-
readonly runId: string;
|
|
523
|
-
readonly sessionKey: string;
|
|
524
|
-
readonly sourceMessageId: string;
|
|
525
|
-
readonly summary: string;
|
|
526
|
-
readonly tenantKey: string;
|
|
527
|
-
readonly title: string;
|
|
528
|
-
}
|
|
529
|
-
interface RequestUserDecisionInput {
|
|
530
|
-
readonly agentId: string;
|
|
531
|
-
readonly allowedActorOpenIds: ReadonlyArray<string>;
|
|
532
|
-
readonly expiresAt: string;
|
|
533
|
-
readonly facts: ReadonlyArray<HumanInteractionFact>;
|
|
534
|
-
readonly instanceId: string;
|
|
535
|
-
readonly interactionId: string;
|
|
536
|
-
readonly options: ReadonlyArray<UserDecisionOption>;
|
|
537
|
-
readonly recommendedOptionId?: string;
|
|
538
|
-
readonly runId: string;
|
|
539
|
-
readonly sessionKey: string;
|
|
540
|
-
readonly sourceMessageId: string;
|
|
541
|
-
readonly summary: string;
|
|
542
|
-
readonly tenantKey: string;
|
|
543
|
-
readonly title: string;
|
|
544
|
-
}
|
|
545
|
-
interface ResolveHumanInteractionInput {
|
|
546
|
-
readonly action: HumanInteractionResolutionAction;
|
|
547
|
-
readonly actor: HumanInteractionActor;
|
|
548
|
-
readonly interactionId: string;
|
|
549
|
-
readonly optionId?: string;
|
|
550
|
-
}
|
|
551
|
-
interface ConsumeToolApprovalInput {
|
|
552
|
-
readonly approvalId: string;
|
|
553
|
-
readonly binding: ToolApprovalBinding;
|
|
554
|
-
}
|
|
555
|
-
interface HumanInteractionService {
|
|
556
|
-
consumeToolApproval(input: ConsumeToolApprovalInput): Effect.Effect<boolean, unknown>;
|
|
557
|
-
get(interactionId: string): Effect.Effect<HumanInteraction | undefined, unknown>;
|
|
558
|
-
resolve(input: ResolveHumanInteractionInput): Effect.Effect<HumanInteraction, unknown>;
|
|
559
|
-
requestToolApproval(input: RequestToolApprovalInput): Effect.Effect<ToolApprovalInteraction, unknown>;
|
|
560
|
-
requestUserDecision(input: RequestUserDecisionInput): Effect.Effect<UserDecisionInteraction, unknown>;
|
|
561
|
-
waitForResolution(input: {
|
|
562
|
-
readonly interactionId: string;
|
|
563
|
-
readonly signal?: AbortSignal;
|
|
564
|
-
}): Effect.Effect<HumanInteraction, unknown>;
|
|
565
|
-
}
|
|
566
|
-
interface HumanInteractionServiceOptions {
|
|
567
|
-
readonly clock: HumanInteractionClock;
|
|
568
|
-
readonly presenter: HumanInteractionPresenter;
|
|
569
|
-
readonly repository: HumanInteractionRepository;
|
|
570
|
-
readonly sleep?: (ms: number) => Promise<void>;
|
|
571
|
-
}
|
|
572
|
-
declare function createHumanInteractionService(options: HumanInteractionServiceOptions): HumanInteractionService;
|
|
573
|
-
//#endregion
|
|
574
|
-
//#region src/application/feishu/feishu-session-key.d.ts
|
|
575
|
-
interface FeishuSessionReference {
|
|
576
|
-
readonly tenantKey: string;
|
|
577
|
-
readonly chatId: string;
|
|
578
|
-
readonly threadId?: string;
|
|
579
|
-
readonly agentId: string;
|
|
580
|
-
}
|
|
581
|
-
type FeishuConversationReference = Omit<FeishuSessionReference, "agentId">;
|
|
582
|
-
declare class InvalidFeishuSessionReference {
|
|
583
|
-
readonly field: keyof FeishuSessionReference;
|
|
584
|
-
readonly message: string;
|
|
585
|
-
readonly _tag = "InvalidFeishuSessionReference";
|
|
586
|
-
constructor(field: keyof FeishuSessionReference, message: string);
|
|
587
|
-
}
|
|
588
|
-
declare function createFeishuSessionKey(reference: FeishuSessionReference): Effect.Effect<SessionKey, InvalidFeishuSessionReference>;
|
|
589
|
-
declare function createFeishuConversationId(reference: FeishuConversationReference): Effect.Effect<string, InvalidFeishuSessionReference>;
|
|
590
|
-
//#endregion
|
|
591
|
-
//#region src/application/feishu/feishu-session-store.d.ts
|
|
592
|
-
interface FeishuSessionEpochRecord {
|
|
593
|
-
readonly baseSessionKey: string;
|
|
594
|
-
readonly generation: number;
|
|
595
|
-
}
|
|
596
|
-
interface FeishuSessionResetResult {
|
|
597
|
-
readonly generation: number;
|
|
598
|
-
readonly previousSessionKey: string;
|
|
599
|
-
readonly sessionKey: string;
|
|
600
|
-
}
|
|
601
|
-
interface FeishuSessionStore {
|
|
602
|
-
current(baseSessionKey: string): Effect.Effect<string, Error>;
|
|
603
|
-
reset(baseSessionKey: string): Effect.Effect<FeishuSessionResetResult, Error>;
|
|
604
|
-
}
|
|
605
|
-
interface FeishuSessionStoreOptions {
|
|
606
|
-
readonly initial?: ReadonlyArray<FeishuSessionEpochRecord>;
|
|
607
|
-
readonly persist?: (records: ReadonlyArray<FeishuSessionEpochRecord>) => Promise<void>;
|
|
608
|
-
}
|
|
609
|
-
declare function createFeishuSessionStore(options?: FeishuSessionStoreOptions): FeishuSessionStore;
|
|
610
|
-
//#endregion
|
|
611
|
-
//#region src/application/feishu/feishu-message-content.d.ts
|
|
612
|
-
declare class UnsupportedFeishuMessage extends Error {
|
|
613
|
-
readonly messageType: string;
|
|
614
|
-
readonly name = "UnsupportedFeishuMessage";
|
|
615
|
-
readonly _tag = "UnsupportedFeishuMessage";
|
|
616
|
-
constructor(messageType: string);
|
|
617
|
-
}
|
|
618
|
-
declare class InvalidFeishuMessageContent extends Error {
|
|
619
|
-
readonly reason: string;
|
|
620
|
-
readonly name = "InvalidFeishuMessageContent";
|
|
621
|
-
readonly _tag = "InvalidFeishuMessageContent";
|
|
622
|
-
constructor(reason: string);
|
|
623
|
-
}
|
|
624
|
-
interface FeishuMessageContentInput {
|
|
625
|
-
readonly content: string;
|
|
626
|
-
readonly messageType: string;
|
|
627
|
-
}
|
|
628
|
-
declare function readFeishuMessageContent(input: FeishuMessageContentInput): Effect.Effect<string, UnsupportedFeishuMessage | InvalidFeishuMessageContent>;
|
|
629
|
-
//#endregion
|
|
630
|
-
//#region src/application/feishu/feishu-message-intake.d.ts
|
|
631
|
-
interface FeishuMessageIntakeOptions {
|
|
632
|
-
readonly agentId: string;
|
|
633
|
-
readonly botOpenId?: string;
|
|
634
|
-
readonly sessionStore?: FeishuSessionStore;
|
|
635
|
-
}
|
|
636
|
-
interface FeishuReceiveMessagePayload {
|
|
637
|
-
readonly header?: {
|
|
638
|
-
readonly tenant_key?: string;
|
|
639
|
-
};
|
|
640
|
-
readonly event: {
|
|
641
|
-
readonly sender?: {
|
|
642
|
-
readonly sender_id?: {
|
|
643
|
-
readonly open_id?: string;
|
|
644
|
-
};
|
|
645
|
-
readonly sender_type?: string;
|
|
646
|
-
readonly tenant_key?: string;
|
|
647
|
-
};
|
|
648
|
-
readonly message: {
|
|
649
|
-
readonly create_time?: string;
|
|
650
|
-
readonly message_id: string;
|
|
651
|
-
readonly chat_id: string;
|
|
652
|
-
readonly chat_type?: string;
|
|
653
|
-
readonly thread_id?: string;
|
|
654
|
-
readonly parent_id?: string;
|
|
655
|
-
readonly root_id?: string;
|
|
656
|
-
readonly message_type: string;
|
|
657
|
-
readonly mentions?: ReadonlyArray<{
|
|
658
|
-
readonly id?: Readonly<Record<string, string>>;
|
|
659
|
-
readonly key?: string;
|
|
660
|
-
readonly name?: string;
|
|
661
|
-
}>;
|
|
662
|
-
readonly content: string;
|
|
663
|
-
};
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
interface FeishuPromptAgentCommand {
|
|
667
|
-
readonly conversationId: string;
|
|
668
|
-
readonly messageId: string;
|
|
669
|
-
readonly command: PromptCommand;
|
|
670
|
-
readonly type: "prompt";
|
|
671
|
-
}
|
|
672
|
-
interface FeishuNewSessionCommand {
|
|
673
|
-
readonly messageId: string;
|
|
674
|
-
readonly previousSessionKey: SessionKey;
|
|
675
|
-
readonly sessionKey: SessionKey;
|
|
676
|
-
readonly type: "new_session";
|
|
677
|
-
}
|
|
678
|
-
interface FeishuCancelRunCommand {
|
|
679
|
-
readonly type: "cancel_run";
|
|
680
|
-
readonly messageId: string;
|
|
681
|
-
/** Omitted when `/cancel` targets the active run in this Feishu session. */
|
|
682
|
-
readonly runId?: AgentRunId;
|
|
683
|
-
readonly reason: string;
|
|
684
|
-
readonly sessionKey?: SessionKey;
|
|
685
|
-
readonly token?: string;
|
|
686
|
-
}
|
|
687
|
-
type FeishuAgentCommand = FeishuPromptAgentCommand | FeishuNewSessionCommand | FeishuCancelRunCommand;
|
|
688
|
-
type FeishuMessageIntakeSummary = FeishuPromptMessageIntakeSummary | FeishuNewSessionMessageIntakeSummary | FeishuCancelMessageIntakeSummary;
|
|
689
|
-
interface FeishuMessageIntakeBaseSummary {
|
|
690
|
-
readonly messageId: string;
|
|
691
|
-
readonly sessionKey: SessionKey;
|
|
692
|
-
readonly sessionReference: FeishuSessionReference;
|
|
693
|
-
}
|
|
694
|
-
interface FeishuPromptMessageIntakeSummary extends FeishuMessageIntakeBaseSummary {
|
|
695
|
-
readonly commandType: "prompt";
|
|
696
|
-
readonly text: string;
|
|
697
|
-
}
|
|
698
|
-
interface FeishuNewSessionMessageIntakeSummary extends FeishuMessageIntakeBaseSummary {
|
|
699
|
-
readonly commandType: "new_session";
|
|
700
|
-
readonly previousSessionKey: SessionKey;
|
|
701
|
-
}
|
|
702
|
-
interface FeishuCancelMessageIntakeSummary extends FeishuMessageIntakeBaseSummary {
|
|
703
|
-
readonly commandType: "cancel_run";
|
|
704
|
-
readonly reason: string;
|
|
705
|
-
readonly runId?: AgentRunId;
|
|
706
|
-
}
|
|
707
|
-
type FeishuMessageIntakeError = UnsupportedFeishuMessage | InvalidFeishuMessageContent | InvalidFeishuSessionReference;
|
|
708
|
-
declare function createAgentCommandFromFeishuMessage(payload: FeishuReceiveMessagePayload, options: FeishuMessageIntakeOptions): Effect.Effect<FeishuAgentCommand, FeishuMessageIntakeError>;
|
|
709
|
-
declare function describeFeishuMessageIntake(payload: FeishuReceiveMessagePayload, options: FeishuMessageIntakeOptions): Effect.Effect<FeishuMessageIntakeSummary, FeishuMessageIntakeError>;
|
|
710
|
-
//#endregion
|
|
711
|
-
//#region src/application/feishu/feishu-card-action-intake.d.ts
|
|
712
|
-
interface FeishuCardActionTriggerPayload {
|
|
713
|
-
readonly action?: {
|
|
714
|
-
readonly tag?: string;
|
|
715
|
-
readonly value?: unknown;
|
|
716
|
-
};
|
|
717
|
-
readonly context?: {
|
|
718
|
-
readonly chat_id?: string;
|
|
719
|
-
readonly open_chat_id?: string;
|
|
720
|
-
readonly open_message_id?: string;
|
|
721
|
-
};
|
|
722
|
-
readonly event?: FeishuCardActionTriggerPayload;
|
|
723
|
-
readonly event_type?: string;
|
|
724
|
-
readonly operator?: {
|
|
725
|
-
readonly open_id?: string;
|
|
726
|
-
readonly tenant_key?: string;
|
|
727
|
-
readonly union_id?: string;
|
|
728
|
-
readonly user_id?: string;
|
|
729
|
-
};
|
|
730
|
-
readonly token?: string;
|
|
731
|
-
}
|
|
732
|
-
declare class InvalidFeishuCardAction {
|
|
733
|
-
readonly reason: string;
|
|
734
|
-
readonly _tag = "InvalidFeishuCardAction";
|
|
735
|
-
constructor(reason: string);
|
|
736
|
-
}
|
|
737
|
-
declare class UnsupportedFeishuCardAction {
|
|
738
|
-
readonly reason: string;
|
|
739
|
-
readonly _tag = "UnsupportedFeishuCardAction";
|
|
740
|
-
constructor(reason: string);
|
|
741
|
-
}
|
|
742
|
-
type FeishuCardActionIntakeError = InvalidFeishuCardAction | UnsupportedFeishuCardAction;
|
|
743
|
-
interface FeishuResolveInteractionCommand {
|
|
744
|
-
readonly action: HumanInteractionResolutionAction;
|
|
745
|
-
readonly actor: HumanInteractionActor;
|
|
746
|
-
readonly interactionId: string;
|
|
747
|
-
readonly messageId: string;
|
|
748
|
-
readonly optionId?: string;
|
|
749
|
-
readonly token: string;
|
|
750
|
-
readonly type: "resolve_interaction";
|
|
751
|
-
}
|
|
752
|
-
type FeishuCardActionCommand = FeishuCancelRunCommand | FeishuResolveInteractionCommand;
|
|
753
|
-
declare function createAgentCommandFromFeishuCardAction(payload: FeishuCardActionTriggerPayload): Effect.Effect<FeishuCardActionCommand, FeishuCardActionIntakeError>;
|
|
754
|
-
//#endregion
|
|
755
|
-
//#region src/application/feishu/feishu-prompt-context.d.ts
|
|
756
|
-
interface FeishuPromptContextInput {
|
|
757
|
-
readonly payload: FeishuReceiveMessagePayload;
|
|
758
|
-
readonly text: string;
|
|
759
|
-
}
|
|
760
|
-
/** Resolves conversation context only when a message is about to start a run. */
|
|
761
|
-
interface FeishuPromptContextResolver {
|
|
762
|
-
resolve(input: FeishuPromptContextInput): Effect.Effect<string, unknown>;
|
|
763
|
-
}
|
|
764
|
-
declare function composeFeishuTopicPrompt(currentText: string, rootText: string): string;
|
|
765
|
-
//#endregion
|
|
766
|
-
//#region src/application/feishu/feishu-agent-daemon.d.ts
|
|
767
|
-
interface FeishuAgentDaemonBaseOptions {
|
|
768
|
-
readonly acknowledgeSteering?: (messageId: string) => Effect.Effect<void, unknown>;
|
|
769
|
-
readonly agentId: string;
|
|
770
|
-
readonly botOpenId?: string;
|
|
771
|
-
readonly dedupe?: boolean;
|
|
772
|
-
readonly finalizeRun?: (runId: AgentRunId) => Effect.Effect<void>;
|
|
773
|
-
readonly interactions?: FeishuHumanInteractionActions;
|
|
774
|
-
readonly prepareRun?: (run: FeishuAgentRunPreparation) => Effect.Effect<void, unknown>;
|
|
775
|
-
readonly publish: (action: FeishuStreamAction) => Effect.Effect<void, unknown>;
|
|
776
|
-
readonly publishRunUpdate?: AgentRunUpdateHandler;
|
|
777
|
-
readonly reply?: (messageId: string, text: string) => Effect.Effect<void, unknown>;
|
|
778
|
-
readonly promptContext?: FeishuPromptContextResolver;
|
|
779
|
-
readonly resolveInvocation?: (payload: FeishuReceiveMessagePayload, conversationId: string) => AgentInvocationOrigin;
|
|
780
|
-
readonly sessionStore?: FeishuSessionStore;
|
|
781
|
-
}
|
|
782
|
-
type FeishuAgentDaemonOptions = FeishuAgentDaemonBaseOptions & ({
|
|
783
|
-
readonly execution: FeishuAgentExecution;
|
|
784
|
-
readonly harness?: never;
|
|
785
|
-
} | {
|
|
786
|
-
readonly execution?: never;
|
|
787
|
-
readonly harness: AgentHarness;
|
|
788
|
-
});
|
|
789
|
-
interface FeishuAgentExecutionResult {
|
|
790
|
-
readonly finalText: string;
|
|
791
|
-
readonly runId: AgentRunId;
|
|
792
|
-
}
|
|
793
|
-
interface FeishuAgentExecution {
|
|
794
|
-
cancelActiveRun(input: {
|
|
795
|
-
readonly reason: string;
|
|
796
|
-
readonly sessionKey: SessionKey;
|
|
797
|
-
}): Effect.Effect<AgentRunId | undefined, unknown>;
|
|
798
|
-
cancelRun(input: {
|
|
799
|
-
readonly reason: string;
|
|
800
|
-
readonly runId: AgentRunId;
|
|
801
|
-
readonly sessionKey?: SessionKey;
|
|
802
|
-
}): Effect.Effect<boolean, unknown>;
|
|
803
|
-
/** Routes a message into the active run without creating a second run/card. */
|
|
804
|
-
steerRun(input: {
|
|
805
|
-
readonly sessionKey: SessionKey;
|
|
806
|
-
readonly text: string;
|
|
807
|
-
}): Effect.Effect<{
|
|
808
|
-
readonly runId: AgentRunId;
|
|
809
|
-
readonly steered: true;
|
|
810
|
-
} | undefined, unknown>;
|
|
811
|
-
promptWithUpdates(command: PromptCommand, onUpdate: AgentRunUpdateHandler): Effect.Effect<FeishuAgentExecutionResult, unknown>;
|
|
812
|
-
}
|
|
813
|
-
interface FeishuAgentRunPreparation {
|
|
814
|
-
readonly messageId: string;
|
|
815
|
-
readonly prompt: string;
|
|
816
|
-
readonly receiveId: string;
|
|
817
|
-
readonly runId: AgentRunId;
|
|
818
|
-
readonly sessionKey: SessionKey;
|
|
819
|
-
}
|
|
820
|
-
interface FeishuAgentDaemonRunResult {
|
|
821
|
-
readonly messageId: string;
|
|
822
|
-
readonly runId: string;
|
|
823
|
-
readonly finalText: string;
|
|
824
|
-
}
|
|
825
|
-
interface FeishuAgentDaemonSkippedResult {
|
|
826
|
-
readonly messageId: string;
|
|
827
|
-
readonly skipped: true;
|
|
828
|
-
readonly reason: "duplicate";
|
|
829
|
-
}
|
|
830
|
-
interface FeishuAgentDaemonCancelResult {
|
|
831
|
-
readonly cancelled: boolean;
|
|
832
|
-
readonly messageId: string;
|
|
833
|
-
readonly runId?: AgentRunId;
|
|
834
|
-
readonly reason?: "not_active";
|
|
835
|
-
}
|
|
836
|
-
interface FeishuAgentDaemonSteeredResult {
|
|
837
|
-
readonly messageId: string;
|
|
838
|
-
readonly runId: AgentRunId;
|
|
839
|
-
readonly steered: true;
|
|
840
|
-
}
|
|
841
|
-
interface FeishuAgentDaemonInteractionResult {
|
|
842
|
-
readonly interaction: HumanInteraction;
|
|
843
|
-
readonly interactionId: string;
|
|
844
|
-
readonly messageId: string;
|
|
845
|
-
readonly resolved: true;
|
|
846
|
-
}
|
|
847
|
-
interface FeishuAgentDaemonSessionResetResult {
|
|
848
|
-
readonly messageId: string;
|
|
849
|
-
readonly previousSessionKey: SessionKey;
|
|
850
|
-
readonly sessionKey: SessionKey;
|
|
851
|
-
readonly reset: true;
|
|
852
|
-
}
|
|
853
|
-
interface FeishuHumanInteractionActions {
|
|
854
|
-
resolve(input: ResolveHumanInteractionInput): Effect.Effect<HumanInteraction, unknown>;
|
|
855
|
-
}
|
|
856
|
-
type FeishuAgentDaemonHandleResult = FeishuAgentDaemonRunResult | FeishuAgentDaemonSkippedResult | FeishuAgentDaemonCancelResult | FeishuAgentDaemonSteeredResult | FeishuAgentDaemonInteractionResult | FeishuAgentDaemonSessionResetResult;
|
|
857
|
-
type FeishuAgentMessageSideEffects = "enabled" | "disabled";
|
|
858
|
-
interface FeishuAgentDaemonHandleMessageOptions {
|
|
859
|
-
readonly sideEffects?: FeishuAgentMessageSideEffects;
|
|
860
|
-
}
|
|
861
|
-
interface FeishuAgentDaemon {
|
|
862
|
-
handleCardAction(payload: FeishuCardActionTriggerPayload): Effect.Effect<FeishuAgentDaemonHandleResult, unknown>;
|
|
863
|
-
trySteerMessage(payload: FeishuReceiveMessagePayload): Effect.Effect<FeishuAgentDaemonHandleResult | undefined, unknown>;
|
|
864
|
-
handleMessage(payload: FeishuReceiveMessagePayload, options?: FeishuAgentDaemonHandleMessageOptions): Effect.Effect<FeishuAgentDaemonHandleResult, unknown>;
|
|
865
|
-
}
|
|
866
|
-
declare function createFeishuAgentDaemon(options: FeishuAgentDaemonOptions): FeishuAgentDaemon;
|
|
867
|
-
//#endregion
|
|
868
|
-
//#region src/application/feishu/feishu-inbox-repository.d.ts
|
|
869
|
-
interface FeishuInboxPendingState {
|
|
870
|
-
readonly availableAt: string;
|
|
871
|
-
readonly status: "pending";
|
|
872
|
-
}
|
|
873
|
-
interface FeishuInboxLeasedState {
|
|
874
|
-
readonly leaseExpiresAt: string;
|
|
875
|
-
readonly leaseId: string;
|
|
876
|
-
readonly leasedAt: string;
|
|
877
|
-
readonly status: "leased";
|
|
878
|
-
}
|
|
879
|
-
interface FeishuInboxCompletedState {
|
|
880
|
-
readonly completedAt: string;
|
|
881
|
-
readonly status: "completed";
|
|
882
|
-
}
|
|
883
|
-
interface FeishuInboxDeadState {
|
|
884
|
-
readonly failedAt: string;
|
|
885
|
-
readonly reason: string;
|
|
886
|
-
readonly status: "dead";
|
|
887
|
-
}
|
|
888
|
-
type FeishuInboxDeliveryState = FeishuInboxPendingState | FeishuInboxLeasedState | FeishuInboxCompletedState | FeishuInboxDeadState;
|
|
889
|
-
interface FeishuInboxDelivery {
|
|
890
|
-
readonly acceptedAt: string;
|
|
891
|
-
readonly attempts: number;
|
|
892
|
-
readonly id: string;
|
|
893
|
-
readonly laneKey: string;
|
|
894
|
-
readonly options?: FeishuAgentDaemonHandleMessageOptions;
|
|
895
|
-
readonly payload: FeishuReceiveMessagePayload;
|
|
896
|
-
readonly recovery?: RecoveryAction;
|
|
897
|
-
readonly revision: number;
|
|
898
|
-
readonly state: FeishuInboxDeliveryState;
|
|
899
|
-
}
|
|
900
|
-
interface FeishuInboxRepository {
|
|
901
|
-
admit(delivery: FeishuInboxDelivery, maxPending: number): Effect.Effect<"created" | "duplicate" | "capacity", unknown>;
|
|
902
|
-
claim(input: {
|
|
903
|
-
readonly leaseExpiresAt: string;
|
|
904
|
-
readonly leaseId: string;
|
|
905
|
-
readonly now: string;
|
|
906
|
-
}): Effect.Effect<FeishuInboxDelivery | undefined, unknown>;
|
|
907
|
-
claimById(input: {
|
|
908
|
-
readonly id: string;
|
|
909
|
-
readonly leaseExpiresAt: string;
|
|
910
|
-
readonly leaseId: string;
|
|
911
|
-
readonly now: string;
|
|
912
|
-
}): Effect.Effect<FeishuInboxDelivery | undefined, unknown>;
|
|
913
|
-
complete(input: {
|
|
914
|
-
readonly completedAt: string;
|
|
915
|
-
readonly id: string;
|
|
916
|
-
readonly leaseId: string;
|
|
917
|
-
}): Effect.Effect<void, unknown>;
|
|
918
|
-
create(delivery: FeishuInboxDelivery): Effect.Effect<boolean, unknown>;
|
|
919
|
-
deadLetters(): ReadonlyArray<FeishuInboxDelivery>;
|
|
920
|
-
fail(input: {
|
|
921
|
-
readonly availableAt?: string;
|
|
922
|
-
readonly failedAt: string;
|
|
923
|
-
readonly id: string;
|
|
924
|
-
readonly leaseId: string;
|
|
925
|
-
readonly reason: string;
|
|
926
|
-
readonly terminal: boolean;
|
|
927
|
-
}): Effect.Effect<void, unknown>;
|
|
928
|
-
pendingCount(): number;
|
|
929
|
-
requeueDeadLetter(input: {
|
|
930
|
-
readonly availableAt: string;
|
|
931
|
-
readonly expectedRevision: number;
|
|
932
|
-
readonly id: string;
|
|
933
|
-
readonly recovery: RecoveryAction;
|
|
934
|
-
}): Effect.Effect<FeishuInboxDelivery, unknown>;
|
|
935
|
-
release(input: {
|
|
936
|
-
readonly availableAt: string;
|
|
937
|
-
readonly id: string;
|
|
938
|
-
readonly leaseId: string;
|
|
939
|
-
}): Effect.Effect<void, unknown>;
|
|
940
|
-
}
|
|
941
|
-
interface FeishuInboxRepositoryStateOptions {
|
|
942
|
-
readonly initial?: ReadonlyArray<FeishuInboxDelivery>;
|
|
943
|
-
readonly persist?: (delivery: FeishuInboxDelivery) => Promise<void>;
|
|
944
|
-
}
|
|
945
|
-
declare function createFeishuInboxRepository(options?: FeishuInboxRepositoryStateOptions): FeishuInboxRepository;
|
|
946
|
-
//#endregion
|
|
947
|
-
//#region src/application/recovery/recovery-control.d.ts
|
|
948
|
-
interface DeadLetterRecoveryItem {
|
|
949
|
-
readonly acceptedAt: string;
|
|
950
|
-
readonly attempts: number;
|
|
951
|
-
readonly deliveryId: string;
|
|
952
|
-
readonly endpointId: string;
|
|
953
|
-
readonly failureCode: "delivery_failed";
|
|
954
|
-
readonly failureSummary: string;
|
|
955
|
-
readonly failedAt: string;
|
|
956
|
-
readonly revision: number;
|
|
957
|
-
}
|
|
958
|
-
interface DeadLetterRequeueResult {
|
|
959
|
-
readonly acceptedAt: string;
|
|
960
|
-
readonly attempts: 0;
|
|
961
|
-
readonly availableAt: string;
|
|
962
|
-
readonly deliveryId: string;
|
|
963
|
-
readonly endpointId: string;
|
|
964
|
-
readonly recoveredAt: string;
|
|
965
|
-
readonly recoveredBy: string;
|
|
966
|
-
readonly revision: number;
|
|
967
|
-
readonly status: "pending";
|
|
968
|
-
}
|
|
969
|
-
interface RecoverySnapshot {
|
|
970
|
-
readonly deadLetters: ReadonlyArray<DeadLetterRecoveryItem>;
|
|
971
|
-
readonly toolOperations: ReadonlyArray<ToolOperationRecoveryItem>;
|
|
972
|
-
}
|
|
973
|
-
interface ToolOperationRecoveryItem {
|
|
974
|
-
readonly agentId: string;
|
|
975
|
-
readonly inputDigest: string;
|
|
976
|
-
readonly instanceId: string;
|
|
977
|
-
readonly operationId: string;
|
|
978
|
-
readonly failureCode: "tool_outcome_unknown";
|
|
979
|
-
readonly failureSummary: string;
|
|
980
|
-
readonly revision: number;
|
|
981
|
-
readonly status: "reconciliation-required";
|
|
982
|
-
readonly toolId: string;
|
|
983
|
-
readonly toolVersion: string;
|
|
984
|
-
}
|
|
985
|
-
interface ToolOperationResolutionResult {
|
|
986
|
-
readonly agentId: string;
|
|
987
|
-
readonly inputDigest: string;
|
|
988
|
-
readonly instanceId: string;
|
|
989
|
-
readonly operationId: string;
|
|
990
|
-
readonly reconciledAt: string;
|
|
991
|
-
readonly reconciledBy: string;
|
|
992
|
-
readonly revision: number;
|
|
993
|
-
readonly status: "aborted" | "completed";
|
|
994
|
-
readonly toolId: string;
|
|
995
|
-
readonly toolVersion: string;
|
|
996
|
-
}
|
|
997
|
-
interface RecoveryControl {
|
|
998
|
-
inspect(): Effect.Effect<RecoverySnapshot, unknown>;
|
|
999
|
-
requeueDeadLetter(input: {
|
|
1000
|
-
readonly actorId: string;
|
|
1001
|
-
readonly deliveryId: string;
|
|
1002
|
-
readonly endpointId: string;
|
|
1003
|
-
readonly expectedRevision: number;
|
|
1004
|
-
readonly note: string;
|
|
1005
|
-
}): Effect.Effect<DeadLetterRequeueResult, unknown>;
|
|
1006
|
-
resolveToolOperation(input: {
|
|
1007
|
-
readonly actorId: string;
|
|
1008
|
-
readonly expectedRevision: number;
|
|
1009
|
-
readonly instanceId: string;
|
|
1010
|
-
readonly note: string;
|
|
1011
|
-
readonly operationId: string;
|
|
1012
|
-
readonly outcome: ToolOperationReconciliationOutcome;
|
|
1013
|
-
}): Effect.Effect<ToolOperationResolutionResult, unknown>;
|
|
1014
|
-
}
|
|
1015
|
-
interface RecoveryControlOptions {
|
|
1016
|
-
readonly clock: {
|
|
1017
|
-
readonly now: () => string;
|
|
1018
|
-
};
|
|
1019
|
-
readonly inboxes: ReadonlyArray<{
|
|
1020
|
-
readonly endpointId: string;
|
|
1021
|
-
readonly repository: FeishuInboxRepository;
|
|
1022
|
-
}>;
|
|
1023
|
-
readonly toolOperations: ReadonlyArray<{
|
|
1024
|
-
readonly instanceId: string;
|
|
1025
|
-
readonly ledger: ToolOperationLedger;
|
|
1026
|
-
}>;
|
|
1027
|
-
}
|
|
1028
|
-
declare function createRecoveryControl(options: RecoveryControlOptions): RecoveryControl;
|
|
1029
|
-
//#endregion
|
|
1030
|
-
//#region src/infrastructure/persistence/jsonl-feishu-inbox-repository.d.ts
|
|
1031
|
-
interface JsonlFeishuInboxRepositoryOptions {
|
|
1032
|
-
readonly filePath: string;
|
|
1033
|
-
}
|
|
1034
|
-
declare function openJsonlFeishuInboxRepository(options: JsonlFeishuInboxRepositoryOptions): Promise<FeishuInboxRepository>;
|
|
1035
|
-
//#endregion
|
|
1036
|
-
//#region src/infrastructure/persistence/json-feishu-session-store.d.ts
|
|
1037
|
-
interface OpenJsonFeishuSessionStoreOptions {
|
|
1038
|
-
readonly filePath: string;
|
|
1039
|
-
}
|
|
1040
|
-
declare function openJsonFeishuSessionStore(options: OpenJsonFeishuSessionStoreOptions): Promise<FeishuSessionStore>;
|
|
1041
|
-
//#endregion
|
|
1042
|
-
//#region src/application/host/agent-instance-registry.d.ts
|
|
1043
|
-
interface AgentInstanceRecord {
|
|
1044
|
-
readonly agentId: string;
|
|
1045
|
-
readonly binding: AgentInstanceBinding;
|
|
1046
|
-
readonly bindingKey: string;
|
|
1047
|
-
readonly instanceId: string;
|
|
1048
|
-
readonly runtimeGenerationId: string;
|
|
1049
|
-
}
|
|
1050
|
-
type AgentInstanceBinding = {
|
|
1051
|
-
readonly kind: "endpoint";
|
|
1052
|
-
readonly endpointId: string;
|
|
1053
|
-
} | {
|
|
1054
|
-
readonly kind: "automation";
|
|
1055
|
-
readonly automationId: string;
|
|
1056
|
-
} | {
|
|
1057
|
-
readonly kind: "background-session";
|
|
1058
|
-
readonly agentId: string;
|
|
1059
|
-
};
|
|
1060
|
-
interface AgentInstanceRegistryOptions {
|
|
1061
|
-
readonly initialRecords?: ReadonlyArray<AgentInstanceRecord>;
|
|
1062
|
-
}
|
|
1063
|
-
interface AgentInstanceRegistry {
|
|
1064
|
-
resolveAutomation(automationId: string, definition: ResolvedRivusAgentDefinition): AgentInstanceRecord;
|
|
1065
|
-
resolveBackgroundSession(agentId: string, definition: ResolvedRivusAgentDefinition): AgentInstanceRecord;
|
|
1066
|
-
resolveEndpoint(endpointId: string, definition: ResolvedRivusAgentDefinition): AgentInstanceRecord;
|
|
1067
|
-
snapshot(): ReadonlyArray<AgentInstanceRecord>;
|
|
1068
|
-
}
|
|
1069
|
-
declare class AgentInstanceConflict extends Error {
|
|
1070
|
-
readonly name = "AgentInstanceConflict";
|
|
1071
|
-
}
|
|
1072
|
-
declare function createAgentInstanceRegistry(options?: AgentInstanceRegistryOptions): AgentInstanceRegistry;
|
|
1073
|
-
//#endregion
|
|
1074
|
-
//#region src/application/host/agent-runtime-pool.d.ts
|
|
1075
|
-
interface AgentRuntimeInput {
|
|
1076
|
-
readonly invocation?: AgentInvocationOrigin;
|
|
1077
|
-
readonly onUpdate?: (update: AgentRunUpdate) => void | Promise<void>;
|
|
1078
|
-
readonly payload?: unknown;
|
|
1079
|
-
readonly sessionKey: SessionKey;
|
|
1080
|
-
readonly text: string;
|
|
1081
|
-
}
|
|
1082
|
-
interface AgentRuntimeCancellation {
|
|
1083
|
-
readonly reason?: string;
|
|
1084
|
-
readonly runId: AgentRunId;
|
|
1085
|
-
readonly sessionKey: SessionKey;
|
|
1086
|
-
}
|
|
1087
|
-
interface AgentRuntimeSteering {
|
|
1088
|
-
readonly runId: AgentRunId;
|
|
1089
|
-
readonly sessionKey: SessionKey;
|
|
1090
|
-
readonly text: string;
|
|
1091
|
-
}
|
|
1092
|
-
interface PooledAgentRuntime {
|
|
1093
|
-
readonly concurrency?: "managed";
|
|
1094
|
-
cancel?(input: AgentRuntimeCancellation): Promise<boolean>;
|
|
1095
|
-
steer?(input: AgentRuntimeSteering): Promise<boolean>;
|
|
1096
|
-
run(input: AgentRuntimeInput): Promise<unknown>;
|
|
1097
|
-
dispose?(): Promise<void> | void;
|
|
1098
|
-
}
|
|
1099
|
-
interface AgentRuntimePoolOptions {
|
|
1100
|
-
readonly disposeTimeoutMs?: number;
|
|
1101
|
-
readonly registry: AgentInstanceRegistry;
|
|
1102
|
-
readonly createRuntime: (instance: AgentInstanceRecord) => PooledAgentRuntime | Promise<PooledAgentRuntime>;
|
|
1103
|
-
}
|
|
1104
|
-
interface AgentRuntimePool {
|
|
1105
|
-
readonly registry: AgentInstanceRegistry;
|
|
1106
|
-
cancel(instance: AgentInstanceRecord, input: AgentRuntimeCancellation): Promise<boolean>;
|
|
1107
|
-
steer(instance: AgentInstanceRecord, input: AgentRuntimeSteering): Promise<boolean>;
|
|
1108
|
-
run(instance: AgentInstanceRecord, input: AgentRuntimeInput): Promise<unknown>;
|
|
1109
|
-
disposeAll(): Promise<void>;
|
|
1110
|
-
}
|
|
1111
|
-
declare class AgentInstanceBusy extends Error {
|
|
1112
|
-
readonly name = "AgentInstanceBusy";
|
|
1113
|
-
}
|
|
1114
|
-
declare class AgentRuntimeDisposed extends Error {
|
|
1115
|
-
readonly name = "AgentRuntimeDisposed";
|
|
1116
|
-
}
|
|
1117
|
-
declare function createAgentRuntimePool(options: AgentRuntimePoolOptions): AgentRuntimePool;
|
|
1118
|
-
//#endregion
|
|
1119
|
-
//#region src/application/host/session-scheduler.d.ts
|
|
1120
|
-
interface SessionSchedulerOptions {
|
|
1121
|
-
readonly createRuntime: (sessionKey: string) => PooledAgentRuntime | Promise<PooledAgentRuntime>;
|
|
1122
|
-
readonly maxConcurrentSessions: number;
|
|
1123
|
-
readonly maxQueuedRuns: number;
|
|
1124
|
-
}
|
|
1125
|
-
interface SessionSchedulerStatus {
|
|
1126
|
-
readonly activeSessions: number;
|
|
1127
|
-
readonly queuedRuns: number;
|
|
1128
|
-
readonly sessions: number;
|
|
1129
|
-
}
|
|
1130
|
-
interface SessionScheduler extends PooledAgentRuntime {
|
|
1131
|
-
readonly concurrency: "managed";
|
|
1132
|
-
status(): SessionSchedulerStatus;
|
|
1133
|
-
}
|
|
1134
|
-
declare class SessionSchedulerCapacityExceeded extends Error {
|
|
1135
|
-
readonly name = "SessionSchedulerCapacityExceeded";
|
|
1136
|
-
}
|
|
1137
|
-
declare class SessionSchedulerDisposed extends Error {
|
|
1138
|
-
readonly name = "SessionSchedulerDisposed";
|
|
1139
|
-
}
|
|
1140
|
-
declare function createSessionScheduler(options: SessionSchedulerOptions): SessionScheduler;
|
|
1141
|
-
//#endregion
|
|
1142
|
-
//#region src/infrastructure/http/json-fetch-request.d.ts
|
|
1143
|
-
interface JsonHttpRequest {
|
|
1144
|
-
readonly method: string;
|
|
1145
|
-
readonly url: string;
|
|
1146
|
-
readonly headers?: Readonly<Record<string, string>>;
|
|
1147
|
-
readonly body?: unknown;
|
|
1148
|
-
}
|
|
1149
|
-
interface JsonHttpResponse {
|
|
1150
|
-
readonly status: number;
|
|
1151
|
-
readonly body: unknown;
|
|
1152
|
-
}
|
|
1153
|
-
interface FetchLikeResponse {
|
|
1154
|
-
readonly status: number;
|
|
1155
|
-
json(): Promise<unknown>;
|
|
1156
|
-
}
|
|
1157
|
-
type FetchLike = (url: string, init: {
|
|
1158
|
-
readonly method: string;
|
|
1159
|
-
readonly headers: Readonly<Record<string, string>>;
|
|
1160
|
-
readonly body?: string;
|
|
1161
|
-
readonly signal: AbortSignal;
|
|
1162
|
-
}) => Promise<FetchLikeResponse>;
|
|
1163
|
-
interface JsonFetchRequestOptions {
|
|
1164
|
-
readonly fetch?: FetchLike;
|
|
1165
|
-
}
|
|
1166
|
-
declare function createJsonFetchRequest(options?: JsonFetchRequestOptions): (request: JsonHttpRequest) => Effect.Effect<JsonHttpResponse, unknown>;
|
|
1167
|
-
//#endregion
|
|
1168
|
-
//#region src/application/agent/agent-harness-client.d.ts
|
|
1169
|
-
interface AgentHarnessClient {
|
|
1170
|
-
readonly harness: AgentHarness;
|
|
1171
|
-
cancelActiveRun(reason?: string): Promise<boolean>;
|
|
1172
|
-
cancelRun(runId: AgentRunId, reason?: string): Promise<boolean>;
|
|
1173
|
-
forSession(sessionKey: SessionKey): AgentSessionClient;
|
|
1174
|
-
getActiveRun(): ActiveAgentRun | undefined;
|
|
1175
|
-
getActiveRunId(): AgentRunId | undefined;
|
|
1176
|
-
getActiveRunState(): AgentRunState | undefined;
|
|
1177
|
-
getAvailability(): AgentHarnessAvailability;
|
|
1178
|
-
getHistory(): AgentHistory;
|
|
1179
|
-
getRunEvents(runId: AgentRunId): ReadonlyArray<AgentDomainEvent> | undefined;
|
|
1180
|
-
getRunSnapshot(runId: AgentRunId): AgentRunSnapshot | undefined;
|
|
1181
|
-
getRunSummary(runId: AgentRunId): AgentRunSummary | undefined;
|
|
1182
|
-
getRunState(runId: AgentRunId): AgentRunState | undefined;
|
|
1183
|
-
getRunUpdates(runId: AgentRunId): ReadonlyArray<AgentRunUpdate> | undefined;
|
|
1184
|
-
getSessionHistory(sessionKey: SessionKey): AgentHistory;
|
|
1185
|
-
getSessionLatestRunSnapshot(sessionKey: SessionKey): AgentRunSnapshot | undefined;
|
|
1186
|
-
getSessionLatestRunSummary(sessionKey: SessionKey): AgentRunSummary | undefined;
|
|
1187
|
-
getSessionRuns(sessionKey: SessionKey): ReadonlyArray<AgentRunSummary>;
|
|
1188
|
-
getSessionSnapshot(sessionKey: SessionKey): AgentSessionSnapshot;
|
|
1189
|
-
getSessionSummary(sessionKey: SessionKey): AgentSessionSummary | undefined;
|
|
1190
|
-
getSessionTranscript(sessionKey: SessionKey): AgentTranscript;
|
|
1191
|
-
getSessionState(sessionKey: SessionKey): AgentRunState | undefined;
|
|
1192
|
-
getState(): AgentRunState;
|
|
1193
|
-
prompt(command: PromptCommand): Promise<AgentPromptResult>;
|
|
1194
|
-
promptRunSnapshot(command: PromptCommand): Promise<AgentRunSnapshot>;
|
|
1195
|
-
promptSnapshot(command: PromptCommand): Promise<AgentSessionSnapshot>;
|
|
1196
|
-
promptText(command: PromptCommand): Promise<string>;
|
|
1197
|
-
promptTurn(command: PromptCommand): Promise<AgentTranscriptTurn>;
|
|
1198
|
-
promptWithEvents(command: PromptCommand, onEvent: AgentDomainEventCallback): Promise<AgentPromptResult>;
|
|
1199
|
-
promptWithText(command: PromptCommand, onTextDelta: AgentTextDeltaCallback): Promise<AgentPromptResult>;
|
|
1200
|
-
promptWithUpdates(command: PromptCommand, onUpdate: AgentRunUpdateCallback): Promise<AgentPromptResult>;
|
|
1201
|
-
stream(command: PromptCommand): AsyncIterable<AgentDomainEvent>;
|
|
1202
|
-
streamText(command: PromptCommand): AsyncIterable<string>;
|
|
1203
|
-
streamUpdates(command: PromptCommand): AsyncIterable<AgentRunUpdate>;
|
|
1204
|
-
subscribe(listener: AgentDomainEventListener): () => void;
|
|
1205
|
-
subscribeRun(runId: AgentRunId, listener: AgentDomainEventListener): () => void;
|
|
1206
|
-
subscribeRunUpdates(runId: AgentRunId, listener: AgentRunUpdateListener): () => void;
|
|
1207
|
-
subscribeUpdates(listener: AgentRunUpdateListener): () => void;
|
|
1208
|
-
tryPrompt(command: PromptCommand): Promise<AgentClientAttempt<AgentPromptResult, unknown>>;
|
|
1209
|
-
tryPromptText(command: PromptCommand): Promise<AgentClientAttempt<string, unknown>>;
|
|
1210
|
-
}
|
|
1211
|
-
interface AgentSessionClient {
|
|
1212
|
-
readonly handle: AgentSessionHandle;
|
|
1213
|
-
readonly sessionKey: SessionKey;
|
|
1214
|
-
cancelActiveRun(reason?: string): Promise<boolean>;
|
|
1215
|
-
cancelRun(runId: AgentRunId, reason?: string): Promise<boolean>;
|
|
1216
|
-
getActiveRun(): ActiveAgentRun | undefined;
|
|
1217
|
-
getActiveRunState(): AgentRunState | undefined;
|
|
1218
|
-
getAvailability(): AgentSessionAvailability;
|
|
1219
|
-
getHistory(): AgentHistory;
|
|
1220
|
-
getLatestRunSnapshot(): AgentRunSnapshot | undefined;
|
|
1221
|
-
getLatestRunSummary(): AgentRunSummary | undefined;
|
|
1222
|
-
getRunEvents(runId: AgentRunId): ReadonlyArray<AgentDomainEvent> | undefined;
|
|
1223
|
-
getRunSnapshot(runId: AgentRunId): AgentRunSnapshot | undefined;
|
|
1224
|
-
getRunSummary(runId: AgentRunId): AgentRunSummary | undefined;
|
|
1225
|
-
getRuns(): ReadonlyArray<AgentRunSummary>;
|
|
1226
|
-
getRunState(runId: AgentRunId): AgentRunState | undefined;
|
|
1227
|
-
getRunUpdates(runId: AgentRunId): ReadonlyArray<AgentRunUpdate> | undefined;
|
|
1228
|
-
getSnapshot(): AgentSessionSnapshot;
|
|
1229
|
-
getState(): AgentRunState | undefined;
|
|
1230
|
-
getSummary(): AgentSessionSummary | undefined;
|
|
1231
|
-
getTranscript(): AgentTranscript;
|
|
1232
|
-
prompt(text: string): Promise<AgentPromptResult>;
|
|
1233
|
-
promptRunSnapshot(text: string): Promise<AgentRunSnapshot>;
|
|
1234
|
-
promptSnapshot(text: string): Promise<AgentSessionSnapshot>;
|
|
1235
|
-
promptText(text: string): Promise<string>;
|
|
1236
|
-
promptTurn(text: string): Promise<AgentTranscriptTurn>;
|
|
1237
|
-
promptWithEvents(text: string, onEvent: AgentDomainEventCallback): Promise<AgentPromptResult>;
|
|
1238
|
-
promptWithText(text: string, onTextDelta: AgentTextDeltaCallback): Promise<AgentPromptResult>;
|
|
1239
|
-
promptWithUpdates(text: string, onUpdate: AgentRunUpdateCallback): Promise<AgentPromptResult>;
|
|
1240
|
-
stream(text: string): AsyncIterable<AgentDomainEvent>;
|
|
1241
|
-
streamText(text: string): AsyncIterable<string>;
|
|
1242
|
-
streamUpdates(text: string): AsyncIterable<AgentRunUpdate>;
|
|
1243
|
-
subscribe(listener: AgentDomainEventListener): () => void;
|
|
1244
|
-
subscribeRun(runId: AgentRunId, listener: AgentDomainEventListener): () => void;
|
|
1245
|
-
subscribeRunUpdates(runId: AgentRunId, listener: AgentRunUpdateListener): () => void;
|
|
1246
|
-
subscribeUpdates(listener: AgentRunUpdateListener): () => void;
|
|
1247
|
-
tryPrompt(text: string): Promise<AgentClientAttempt<AgentPromptResult, unknown>>;
|
|
1248
|
-
tryPromptText(text: string): Promise<AgentClientAttempt<string, unknown>>;
|
|
1249
|
-
}
|
|
1250
|
-
type AgentTextDeltaCallback = (delta: string) => void | Promise<void>;
|
|
1251
|
-
type AgentClientAttempt<T, E = unknown> = AgentClientSuccess<T> | AgentClientFailure<E>;
|
|
1252
|
-
interface AgentClientSuccess<T> {
|
|
1253
|
-
readonly ok: true;
|
|
1254
|
-
readonly value: T;
|
|
1255
|
-
}
|
|
1256
|
-
interface AgentClientFailure<E = unknown> {
|
|
1257
|
-
readonly ok: false;
|
|
1258
|
-
readonly error: E;
|
|
1259
|
-
}
|
|
1260
|
-
declare function createAgentHarnessClient(harness: AgentHarness): AgentHarnessClient;
|
|
1261
|
-
//#endregion
|
|
1262
|
-
//#region src/infrastructure/runtime/agent-runtime-primitives.d.ts
|
|
1263
|
-
type DefaultAgentHarnessOptions = Omit<AgentHarnessOptions, "clock" | "runIds"> & {
|
|
1264
|
-
readonly clock?: AgentClock;
|
|
1265
|
-
readonly runIds?: RunIdGenerator;
|
|
1266
|
-
};
|
|
1267
|
-
type DefaultAgentHarnessFromCallbackOptions = Omit<DefaultAgentHarnessOptions, "loop">;
|
|
1268
|
-
type DefaultAgentHarnessFromTextCallbackOptions = DefaultAgentHarnessFromCallbackOptions;
|
|
1269
|
-
type DefaultAgentHarnessClientOptions = DefaultAgentHarnessOptions;
|
|
1270
|
-
type DefaultAgentHarnessClientFromCallbackOptions = DefaultAgentHarnessFromCallbackOptions;
|
|
1271
|
-
type DefaultAgentHarnessClientFromTextCallbackOptions = DefaultAgentHarnessFromTextCallbackOptions;
|
|
1272
|
-
interface DefaultAgentRuntimeSessionOptions {
|
|
1273
|
-
readonly mainSessionKey?: SessionKey;
|
|
1274
|
-
}
|
|
1275
|
-
interface AgentRuntime {
|
|
1276
|
-
readonly client: AgentHarnessClient;
|
|
1277
|
-
readonly harness: AgentHarness;
|
|
1278
|
-
readonly mainClient: AgentSessionClient;
|
|
1279
|
-
readonly mainSession: AgentSessionHandle;
|
|
1280
|
-
readonly mainSessionKey: SessionKey;
|
|
1281
|
-
forSession(sessionKey: SessionKey): AgentSessionHandle;
|
|
1282
|
-
forSessionClient(sessionKey: SessionKey): AgentSessionClient;
|
|
1283
|
-
prompt(text: string): Promise<AgentPromptResult>;
|
|
1284
|
-
promptText(text: string): Promise<string>;
|
|
1285
|
-
promptTurn(text: string): Promise<AgentTranscriptTurn>;
|
|
1286
|
-
tryPrompt(text: string): Promise<AgentClientAttempt<AgentPromptResult, unknown>>;
|
|
1287
|
-
tryPromptText(text: string): Promise<AgentClientAttempt<string, unknown>>;
|
|
1288
|
-
}
|
|
1289
|
-
type DefaultAgentRuntimeOptions = DefaultAgentHarnessOptions;
|
|
1290
|
-
type DefaultAgentRuntimeFromCallbackOptions = DefaultAgentHarnessFromCallbackOptions;
|
|
1291
|
-
type DefaultAgentRuntimeFromTextCallbackOptions = DefaultAgentHarnessFromTextCallbackOptions;
|
|
1292
|
-
declare function createDefaultAgentHarness(options: DefaultAgentHarnessOptions): AgentHarness;
|
|
1293
|
-
declare function createDefaultAgentHarnessFromCallback(run: AgentLoopCallback, options?: DefaultAgentHarnessFromCallbackOptions): AgentHarness;
|
|
1294
|
-
declare function createDefaultAgentHarnessFromTextCallback(generate: TextAgentLoopCallback, options?: DefaultAgentHarnessFromTextCallbackOptions): AgentHarness;
|
|
1295
|
-
declare function createDefaultAgentHarnessClient(options: DefaultAgentHarnessClientOptions): AgentHarnessClient;
|
|
1296
|
-
declare function createDefaultAgentHarnessClientFromCallback(run: AgentLoopCallback, options?: DefaultAgentHarnessClientFromCallbackOptions): AgentHarnessClient;
|
|
1297
|
-
declare function createDefaultAgentHarnessClientFromTextCallback(generate: TextAgentLoopCallback, options?: DefaultAgentHarnessClientFromTextCallbackOptions): AgentHarnessClient;
|
|
1298
|
-
declare function createDefaultAgentRuntime(options: DefaultAgentRuntimeOptions, runtimeOptions?: DefaultAgentRuntimeSessionOptions): AgentRuntime;
|
|
1299
|
-
declare function createDefaultAgentRuntimeFromCallback(run: AgentLoopCallback, options?: DefaultAgentRuntimeFromCallbackOptions, runtimeOptions?: DefaultAgentRuntimeSessionOptions): AgentRuntime;
|
|
1300
|
-
declare function createDefaultAgentRuntimeFromTextCallback(generate: TextAgentLoopCallback, options?: DefaultAgentRuntimeFromTextCallbackOptions, runtimeOptions?: DefaultAgentRuntimeSessionOptions): AgentRuntime;
|
|
1301
|
-
declare function createSystemClock(): AgentClock;
|
|
1302
|
-
declare function createUuidRunIds(): RunIdGenerator;
|
|
1303
|
-
declare function createAgentRuntime(harness: AgentHarness, options?: DefaultAgentRuntimeSessionOptions): AgentRuntime;
|
|
1304
|
-
//#endregion
|
|
1305
|
-
//#region src/infrastructure/config/rivus-daemon-config.d.ts
|
|
1306
|
-
type RivusDaemonEnv = Readonly<Record<string, string | undefined>>;
|
|
1307
|
-
type RivusThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
1308
|
-
type RivusTextFileReader = (path: string) => Promise<string> | string;
|
|
1309
|
-
interface RivusDaemonConfigLoaderOptions {
|
|
1310
|
-
readonly readTextFile?: RivusTextFileReader;
|
|
1311
|
-
}
|
|
1312
|
-
interface RivusDaemonConfig {
|
|
1313
|
-
readonly agentId: string;
|
|
1314
|
-
readonly feishu: {
|
|
1315
|
-
readonly appId: string;
|
|
1316
|
-
readonly appSecret: string;
|
|
1317
|
-
readonly baseUrl: string;
|
|
1318
|
-
readonly cardStreamLeaseMs: number;
|
|
1319
|
-
readonly streamMinIntervalMs: number;
|
|
1320
|
-
};
|
|
1321
|
-
readonly pi: {
|
|
1322
|
-
readonly apiKey?: string;
|
|
1323
|
-
readonly baseUrl?: string;
|
|
1324
|
-
readonly model?: string;
|
|
1325
|
-
readonly thinkingLevel?: RivusThinkingLevel;
|
|
1326
|
-
};
|
|
1327
|
-
}
|
|
1328
|
-
declare class RivusDaemonConfigError {
|
|
1329
|
-
readonly variable: string;
|
|
1330
|
-
readonly message: string;
|
|
1331
|
-
readonly _tag = "RivusDaemonConfigError";
|
|
1332
|
-
constructor(variable: string, message: string);
|
|
1333
|
-
}
|
|
1334
|
-
declare function loadRivusDaemonConfig(env: RivusDaemonEnv, options?: RivusDaemonConfigLoaderOptions): Effect.Effect<RivusDaemonConfig, RivusDaemonConfigError>;
|
|
1335
|
-
//#endregion
|
|
1336
|
-
//#region src/infrastructure/config/feishu-endpoint-credentials.d.ts
|
|
1337
|
-
interface FeishuEndpointCredentials {
|
|
1338
|
-
readonly appId: string;
|
|
1339
|
-
readonly appSecret: string;
|
|
1340
|
-
}
|
|
1341
|
-
declare class FeishuEndpointCredentialError extends Error {
|
|
1342
|
-
readonly name = "FeishuEndpointCredentialError";
|
|
1343
|
-
}
|
|
1344
|
-
declare function resolveFeishuEndpointCredentials(credentialRef: string, env: RivusDaemonEnv): FeishuEndpointCredentials;
|
|
1345
|
-
//#endregion
|
|
1346
|
-
//#region src/infrastructure/config/openclaw-env-import.d.ts
|
|
1347
|
-
type RivusEnvFileVariables = Readonly<Record<string, string>>;
|
|
1348
|
-
interface OpenClawEnvImportOptions {
|
|
1349
|
-
readonly feishuBaseUrl?: string;
|
|
1350
|
-
readonly piApiKeyFile?: string;
|
|
1351
|
-
readonly streamMinIntervalMs?: number;
|
|
1352
|
-
}
|
|
1353
|
-
interface OpenClawEnvImportResult {
|
|
1354
|
-
readonly env: RivusEnvFileVariables;
|
|
1355
|
-
readonly warnings: ReadonlyArray<string>;
|
|
1356
|
-
}
|
|
1357
|
-
declare class OpenClawEnvImportError extends Error {
|
|
1358
|
-
constructor(message: string);
|
|
1359
|
-
}
|
|
1360
|
-
declare function createRivusEnvFromOpenClawConfig(openClawConfig: unknown, options?: OpenClawEnvImportOptions): OpenClawEnvImportResult;
|
|
1361
|
-
declare function formatRivusEnvFile(env: RivusEnvFileVariables): string;
|
|
1362
|
-
//#endregion
|
|
1363
|
-
//#region src/application/feishu/feishu-message-queue.d.ts
|
|
1364
|
-
interface FeishuMessageQueueOptions {
|
|
1365
|
-
readonly clock?: {
|
|
1366
|
-
readonly now: () => string;
|
|
1367
|
-
};
|
|
1368
|
-
/**
|
|
1369
|
-
* Applies cancellation, session reset, or steering immediately after the
|
|
1370
|
-
* message is durably admitted. Returning undefined leaves it on the prompt
|
|
1371
|
-
* lane; returning a result completes the durable delivery.
|
|
1372
|
-
*/
|
|
1373
|
-
readonly handleControl?: (payload: FeishuReceiveMessagePayload) => Effect.Effect<FeishuAgentDaemonHandleResult | undefined, unknown>;
|
|
1374
|
-
readonly handleMessage: (payload: FeishuReceiveMessagePayload, options?: FeishuAgentDaemonHandleMessageOptions) => Effect.Effect<FeishuAgentDaemonHandleResult, unknown>;
|
|
1375
|
-
readonly shouldRetryError?: (error: unknown) => boolean;
|
|
1376
|
-
readonly leaseMs?: number;
|
|
1377
|
-
readonly maxAttempts?: number;
|
|
1378
|
-
readonly maxPending?: number;
|
|
1379
|
-
readonly repository?: FeishuInboxRepository;
|
|
1380
|
-
readonly retryDelayMs?: number;
|
|
1381
|
-
/**
|
|
1382
|
-
* Identifies a delivery that belongs to a run which was interrupted before
|
|
1383
|
-
* the process restarted. Such a delivery is completed as a duplicate rather
|
|
1384
|
-
* than starting the same user prompt a second time.
|
|
1385
|
-
*/
|
|
1386
|
-
readonly shouldSkipReplay?: (payload: FeishuReceiveMessagePayload) => Effect.Effect<boolean, unknown>;
|
|
1387
|
-
}
|
|
1388
|
-
type FeishuMessageAcceptResult = {
|
|
1389
|
-
readonly accepted: true;
|
|
1390
|
-
readonly messageId: string;
|
|
1391
|
-
readonly pending: number;
|
|
1392
|
-
} | {
|
|
1393
|
-
readonly accepted: false;
|
|
1394
|
-
readonly messageId: string;
|
|
1395
|
-
readonly pending: number;
|
|
1396
|
-
readonly reason: "capacity" | "duplicate" | "ignored";
|
|
1397
|
-
};
|
|
1398
|
-
type FeishuMessageDrainResult = {
|
|
1399
|
-
readonly handled: true;
|
|
1400
|
-
readonly messageId: string;
|
|
1401
|
-
readonly result: FeishuAgentDaemonHandleResult;
|
|
1402
|
-
} | {
|
|
1403
|
-
readonly handled: false;
|
|
1404
|
-
readonly reason: "empty";
|
|
1405
|
-
};
|
|
1406
|
-
interface FeishuMessageQueue {
|
|
1407
|
-
accept(payload: FeishuReceiveMessagePayload, options?: FeishuAgentDaemonHandleMessageOptions): Effect.Effect<FeishuMessageAcceptResult, unknown>;
|
|
1408
|
-
drainOne(): Effect.Effect<FeishuMessageDrainResult, unknown>;
|
|
1409
|
-
deadLetters(): ReadonlyArray<FeishuInboxDelivery>;
|
|
1410
|
-
pending(): number;
|
|
1411
|
-
}
|
|
1412
|
-
declare function createFeishuMessageQueue(options: FeishuMessageQueueOptions): FeishuMessageQueue;
|
|
1413
|
-
//#endregion
|
|
1414
|
-
//#region src/application/feishu/feishu-group-policy.d.ts
|
|
1415
|
-
type FeishuEndpointGroupPolicy = "mention-only" | "ignore-unmentioned" | "default-responder";
|
|
1416
|
-
declare function shouldAcceptFeishuEndpointMessage(payload: FeishuReceiveMessagePayload, policy: FeishuEndpointGroupPolicy, botOpenId: string): boolean;
|
|
1417
|
-
//#endregion
|
|
1418
|
-
//#region src/application/feishu/feishu-message-worker.d.ts
|
|
1419
|
-
interface FeishuMessageWorkerQueue {
|
|
1420
|
-
drainOne(): Effect.Effect<FeishuMessageDrainResult, unknown>;
|
|
1421
|
-
pending(): number;
|
|
1422
|
-
}
|
|
1423
|
-
interface FeishuMessageWorkerDrainAvailableResult {
|
|
1424
|
-
readonly drained: number;
|
|
1425
|
-
readonly results: ReadonlyArray<Extract<FeishuMessageDrainResult, {
|
|
1426
|
-
readonly handled: true;
|
|
1427
|
-
}>>;
|
|
1428
|
-
}
|
|
1429
|
-
interface FeishuMessageWorker {
|
|
1430
|
-
drainAvailable(): Effect.Effect<FeishuMessageWorkerDrainAvailableResult, unknown>;
|
|
1431
|
-
}
|
|
1432
|
-
interface FeishuMessageWorkerOptions {
|
|
1433
|
-
readonly concurrency?: number;
|
|
1434
|
-
readonly queue: FeishuMessageWorkerQueue;
|
|
1435
|
-
}
|
|
1436
|
-
declare function createFeishuMessageWorker(options: FeishuMessageWorkerOptions): FeishuMessageWorker;
|
|
1437
|
-
//#endregion
|
|
1438
|
-
//#region src/application/support/periodic-effect-loop.d.ts
|
|
1439
|
-
interface PeriodicEffectLoop {
|
|
1440
|
-
running(): boolean;
|
|
1441
|
-
start(): void;
|
|
1442
|
-
stop(): Promise<void>;
|
|
1443
|
-
}
|
|
1444
|
-
//#endregion
|
|
1445
|
-
//#region src/application/feishu/feishu-worker-loop.d.ts
|
|
1446
|
-
interface FeishuWorkerLoopOptions {
|
|
1447
|
-
readonly drainAvailable: () => Effect.Effect<unknown, unknown>;
|
|
1448
|
-
readonly intervalMs: number;
|
|
1449
|
-
readonly onError?: (error: unknown) => void | Promise<void>;
|
|
1450
|
-
readonly sleep: (ms: number) => Effect.Effect<void, unknown>;
|
|
1451
|
-
}
|
|
1452
|
-
type FeishuWorkerLoop = PeriodicEffectLoop;
|
|
1453
|
-
declare function createFeishuWorkerLoop(options: FeishuWorkerLoopOptions): FeishuWorkerLoop;
|
|
1454
|
-
//#endregion
|
|
1455
|
-
//#region src/application/daemon/rivus-daemon-process.d.ts
|
|
1456
|
-
interface RivusDaemonTransport {
|
|
1457
|
-
running(): boolean;
|
|
1458
|
-
start(): Promise<void> | void;
|
|
1459
|
-
stop(): Promise<void> | void;
|
|
1460
|
-
}
|
|
1461
|
-
interface RivusDaemonWorkerLoop {
|
|
1462
|
-
running(): boolean;
|
|
1463
|
-
start(): void;
|
|
1464
|
-
stop(): Promise<void> | void;
|
|
1465
|
-
}
|
|
1466
|
-
interface RivusDaemonProcessOptions {
|
|
1467
|
-
readonly transport: RivusDaemonTransport;
|
|
1468
|
-
readonly workerLoop: RivusDaemonWorkerLoop;
|
|
1469
|
-
}
|
|
1470
|
-
interface RivusDaemonProcess {
|
|
1471
|
-
running(): boolean;
|
|
1472
|
-
start(): Effect.Effect<void, unknown>;
|
|
1473
|
-
stop(): Effect.Effect<void, unknown>;
|
|
1474
|
-
}
|
|
1475
|
-
declare function createRivusDaemonProcess(options: RivusDaemonProcessOptions): RivusDaemonProcess;
|
|
1476
|
-
//#endregion
|
|
1477
|
-
//#region src/application/daemon/rivus-daemon-transport.d.ts
|
|
1478
|
-
interface CompositeRivusDaemonTransportOptions {
|
|
1479
|
-
readonly transports: ReadonlyArray<RivusDaemonTransport>;
|
|
1480
|
-
}
|
|
1481
|
-
declare function createCompositeRivusDaemonTransport(options: CompositeRivusDaemonTransportOptions): RivusDaemonTransport;
|
|
1482
|
-
//#endregion
|
|
1483
|
-
//#region src/domain/card-presentation.d.ts
|
|
1484
|
-
type CardPresentationStatus = "streaming" | "handoff-pending" | "active" | "closed" | "terminal";
|
|
1485
|
-
interface CardPresentation {
|
|
1486
|
-
readonly runId: string;
|
|
1487
|
-
readonly presentationId: string;
|
|
1488
|
-
readonly generation: number;
|
|
1489
|
-
readonly cardId: string;
|
|
1490
|
-
readonly elementId?: string;
|
|
1491
|
-
readonly sourceMessageId: string;
|
|
1492
|
-
readonly status: CardPresentationStatus;
|
|
1493
|
-
readonly createdAt: string;
|
|
1494
|
-
readonly leaseDeadlineAt: string;
|
|
1495
|
-
readonly handoffAt?: string;
|
|
1496
|
-
readonly handoffFailedAt?: string;
|
|
1497
|
-
readonly predecessorPresentationId?: string;
|
|
1498
|
-
readonly successorPresentationId?: string;
|
|
1499
|
-
readonly terminalReceiptId?: string;
|
|
1500
|
-
}
|
|
1501
|
-
interface CardPresentationChain {
|
|
1502
|
-
readonly runId: string;
|
|
1503
|
-
readonly activeGeneration: number;
|
|
1504
|
-
readonly activePresentationId: string;
|
|
1505
|
-
readonly presentations: ReadonlyArray<CardPresentation>;
|
|
1506
|
-
readonly revision: number;
|
|
1507
|
-
}
|
|
1508
|
-
interface CardPresentationBinding {
|
|
1509
|
-
readonly cardId: string;
|
|
1510
|
-
readonly createdAt: string;
|
|
1511
|
-
readonly elementId?: string;
|
|
1512
|
-
readonly leaseDeadlineAt: string;
|
|
1513
|
-
readonly presentationId: string;
|
|
1514
|
-
readonly runId: string;
|
|
1515
|
-
readonly sourceMessageId: string;
|
|
1516
|
-
}
|
|
1517
|
-
interface CardPresentationSuccessor {
|
|
1518
|
-
readonly cardId: string;
|
|
1519
|
-
readonly createdAt: string;
|
|
1520
|
-
readonly elementId?: string;
|
|
1521
|
-
readonly leaseDeadlineAt: string;
|
|
1522
|
-
readonly presentationId: string;
|
|
1523
|
-
}
|
|
1524
|
-
declare class CardPresentationTransitionDenied extends Error {
|
|
1525
|
-
readonly name = "CardPresentationTransitionDenied";
|
|
1526
|
-
}
|
|
1527
|
-
declare function activeCardPresentation(chain: CardPresentationChain): CardPresentation;
|
|
1528
|
-
declare function acceptsCardPresentationProgress(chain: CardPresentationChain): boolean;
|
|
1529
|
-
declare function isCardPresentationHandoffDue(chain: CardPresentationChain, now: string): boolean;
|
|
1530
|
-
//#endregion
|
|
1531
|
-
//#region src/application/feishu/feishu-card-presentation-store.d.ts
|
|
1532
|
-
declare class FeishuCardPresentationNotFound {
|
|
1533
|
-
readonly runId: string;
|
|
1534
|
-
readonly _tag = "FeishuCardPresentationNotFound";
|
|
1535
|
-
constructor(runId: string);
|
|
1536
|
-
}
|
|
1537
|
-
interface FeishuCardPresentationHandoffStart {
|
|
1538
|
-
readonly presentation: CardPresentation;
|
|
1539
|
-
readonly started: boolean;
|
|
1540
|
-
}
|
|
1541
|
-
interface FeishuCardPresentationStore {
|
|
1542
|
-
bind(binding: CardPresentationBinding): Effect.Effect<CardPresentation, unknown>;
|
|
1543
|
-
beginHandoff(input: {
|
|
1544
|
-
readonly handoffAt: string;
|
|
1545
|
-
readonly runId: string;
|
|
1546
|
-
}): Effect.Effect<FeishuCardPresentationHandoffStart, unknown>;
|
|
1547
|
-
chain(runId: string): CardPresentationChain | undefined;
|
|
1548
|
-
chains(): ReadonlyArray<CardPresentationChain>;
|
|
1549
|
-
compensateInterruptedHandoffs(compensatedAt: string): Effect.Effect<ReadonlyArray<CardPresentationChain>, unknown>;
|
|
1550
|
-
completeHandoff(input: {
|
|
1551
|
-
readonly runId: string;
|
|
1552
|
-
readonly successor: CardPresentationSuccessor;
|
|
1553
|
-
}): Effect.Effect<CardPresentation, unknown>;
|
|
1554
|
-
failHandoff(input: {
|
|
1555
|
-
readonly failedAt: string;
|
|
1556
|
-
readonly runId: string;
|
|
1557
|
-
}): Effect.Effect<void, unknown>;
|
|
1558
|
-
markTerminal(input: {
|
|
1559
|
-
readonly runId: string;
|
|
1560
|
-
readonly terminalReceiptId: string;
|
|
1561
|
-
}): Effect.Effect<void, unknown>;
|
|
1562
|
-
release(runId: string): Effect.Effect<void, unknown>;
|
|
1563
|
-
size(): number;
|
|
1564
|
-
}
|
|
1565
|
-
interface FeishuCardPresentationStoreOptions {
|
|
1566
|
-
readonly initial?: ReadonlyArray<CardPresentationChain>;
|
|
1567
|
-
readonly persist?: (chains: ReadonlyArray<CardPresentationChain>) => Promise<void>;
|
|
1568
|
-
}
|
|
1569
|
-
declare function createFeishuCardPresentationStore(options?: FeishuCardPresentationStoreOptions): FeishuCardPresentationStore;
|
|
1570
|
-
//#endregion
|
|
1571
|
-
//#region src/application/feishu/feishu-card-rollover.d.ts
|
|
1572
|
-
declare const DEFAULT_CARD_STREAM_LEASE_MS = 510000;
|
|
1573
|
-
interface FeishuCardRolloverTarget {
|
|
1574
|
-
readonly cardId: string;
|
|
1575
|
-
readonly elementId?: string;
|
|
1576
|
-
}
|
|
1577
|
-
interface FeishuCardRolloverSuccessorRequest {
|
|
1578
|
-
readonly generation: number;
|
|
1579
|
-
readonly presentationId: string;
|
|
1580
|
-
readonly run: FeishuAgentRunPreparation;
|
|
1581
|
-
}
|
|
1582
|
-
interface FeishuCardRolloverStreamPublisher {
|
|
1583
|
-
flush(runId?: string): Effect.Effect<void, unknown>;
|
|
1584
|
-
publish(action: FeishuStreamAction): Effect.Effect<void, unknown>;
|
|
1585
|
-
}
|
|
1586
|
-
type FeishuCardRolloverEventType = "handoff_started" | "handoff_succeeded" | "handoff_failed" | "handoff_notice_failed" | "presentation_write_failed" | "stale_update_dropped" | "stream_closed" | "terminal_delivery_failed";
|
|
1587
|
-
interface FeishuCardRolloverEvent {
|
|
1588
|
-
readonly at?: string;
|
|
1589
|
-
readonly cardId?: string;
|
|
1590
|
-
readonly error?: unknown;
|
|
1591
|
-
readonly generation?: number;
|
|
1592
|
-
readonly presentationId?: string;
|
|
1593
|
-
readonly runId?: string;
|
|
1594
|
-
readonly sourceMessageId?: string;
|
|
1595
|
-
readonly successorCardId?: string;
|
|
1596
|
-
readonly type: FeishuCardRolloverEventType;
|
|
1597
|
-
}
|
|
1598
|
-
type FeishuCardRolloverCounters = Readonly<Record<FeishuCardRolloverEventType, number>>;
|
|
1599
|
-
interface FeishuCardRolloverStatus {
|
|
1600
|
-
readonly counters: FeishuCardRolloverCounters;
|
|
1601
|
-
readonly leaseMs: number;
|
|
1602
|
-
readonly live: ReadonlyArray<CardPresentation>;
|
|
1603
|
-
}
|
|
1604
|
-
type FeishuCardRolloverHandoffResult = {
|
|
1605
|
-
readonly presentation: CardPresentation;
|
|
1606
|
-
readonly status: "rolled-over";
|
|
1607
|
-
} | {
|
|
1608
|
-
readonly reason: "already-pending" | "not-due" | "not-live" | "not-streaming";
|
|
1609
|
-
readonly status: "skipped";
|
|
1610
|
-
} | {
|
|
1611
|
-
readonly error: unknown;
|
|
1612
|
-
readonly status: "failed";
|
|
1613
|
-
};
|
|
1614
|
-
interface FeishuCardRolloverOptions {
|
|
1615
|
-
readonly clock: AgentClock;
|
|
1616
|
-
readonly createSuccessor: (request: FeishuCardRolloverSuccessorRequest) => Effect.Effect<FeishuCardRolloverTarget, unknown>;
|
|
1617
|
-
readonly leaseMs?: number;
|
|
1618
|
-
readonly observe?: (event: FeishuCardRolloverEvent) => void;
|
|
1619
|
-
readonly publisher: FeishuCardRolloverStreamPublisher;
|
|
1620
|
-
readonly store: FeishuCardPresentationStore;
|
|
1621
|
-
}
|
|
1622
|
-
interface FeishuCardRollover extends FeishuCardRolloverStreamPublisher {
|
|
1623
|
-
bindRun(run: FeishuAgentRunPreparation, target: FeishuCardRolloverTarget): Effect.Effect<CardPresentation, unknown>;
|
|
1624
|
-
dueRunIds(now: Date): ReadonlyArray<string>;
|
|
1625
|
-
handoff(runId: string): Effect.Effect<FeishuCardRolloverHandoffResult, unknown>;
|
|
1626
|
-
observeStreamClosed(cardId: string): void;
|
|
1627
|
-
recover(): Effect.Effect<{
|
|
1628
|
-
readonly compensated: number;
|
|
1629
|
-
}, unknown>;
|
|
1630
|
-
releaseRun(runId: string): Effect.Effect<void>;
|
|
1631
|
-
status(): FeishuCardRolloverStatus;
|
|
1632
|
-
}
|
|
1633
|
-
declare function createFeishuCardRollover(options: FeishuCardRolloverOptions): FeishuCardRollover;
|
|
1634
|
-
//#endregion
|
|
1635
|
-
//#region src/application/feishu/feishu-receive-status.d.ts
|
|
1636
|
-
type FeishuReceiveMessageReplayOptions = FeishuAgentDaemonHandleMessageOptions;
|
|
1637
|
-
interface FeishuReceiveMessageSummary {
|
|
1638
|
-
readonly chatId: string;
|
|
1639
|
-
readonly messageId: string;
|
|
1640
|
-
readonly tenantKey?: string;
|
|
1641
|
-
readonly threadId?: string;
|
|
1642
|
-
}
|
|
1643
|
-
interface FeishuReceiveAcceptedObservation {
|
|
1644
|
-
readonly accepted: FeishuMessageAcceptResult;
|
|
1645
|
-
readonly message: FeishuReceiveMessageSummary;
|
|
1646
|
-
readonly observedAt: Date;
|
|
1647
|
-
}
|
|
1648
|
-
interface FeishuReceiveHandledObservation {
|
|
1649
|
-
readonly intake: FeishuMessageIntakeSummary;
|
|
1650
|
-
readonly messageId: string;
|
|
1651
|
-
readonly observedAt: Date;
|
|
1652
|
-
readonly result: FeishuAgentDaemonHandleResult;
|
|
1653
|
-
}
|
|
1654
|
-
interface FeishuReceiveRuntimeStatus {
|
|
1655
|
-
readonly lastAccepted?: FeishuReceiveAcceptedObservation;
|
|
1656
|
-
readonly lastHandled?: FeishuReceiveHandledObservation;
|
|
1657
|
-
}
|
|
1658
|
-
interface FeishuReceiveMessageReplayResult {
|
|
1659
|
-
readonly accepted: FeishuMessageAcceptResult;
|
|
1660
|
-
readonly drained: FeishuMessageWorkerDrainAvailableResult;
|
|
1661
|
-
readonly intake: FeishuMessageIntakeSummary;
|
|
1662
|
-
}
|
|
1663
|
-
//#endregion
|
|
1664
|
-
//#region src/application/daemon/rivus-daemon-status.d.ts
|
|
1665
|
-
interface RivusDaemonStatus {
|
|
1666
|
-
readonly agentId: string;
|
|
1667
|
-
readonly cards?: FeishuCardRolloverStatus;
|
|
1668
|
-
readonly harness: {
|
|
1669
|
-
readonly activeRunId?: AgentRunId;
|
|
1670
|
-
readonly activeRunState?: AgentRunState;
|
|
1671
|
-
readonly activeSessionKey?: SessionKey;
|
|
1672
|
-
readonly busy: boolean;
|
|
1673
|
-
};
|
|
1674
|
-
readonly history: AgentHistory;
|
|
1675
|
-
readonly process: {
|
|
1676
|
-
readonly running: boolean;
|
|
1677
|
-
};
|
|
1678
|
-
readonly queue: {
|
|
1679
|
-
readonly pending: number;
|
|
1680
|
-
};
|
|
1681
|
-
readonly receive?: FeishuReceiveRuntimeStatus;
|
|
1682
|
-
readonly transport: {
|
|
1683
|
-
readonly running: boolean;
|
|
1684
|
-
};
|
|
1685
|
-
readonly workerLoop: {
|
|
1686
|
-
readonly running: boolean;
|
|
1687
|
-
};
|
|
1688
|
-
}
|
|
1689
|
-
interface RivusDaemonStatusReporter {
|
|
1690
|
-
status(): Effect.Effect<RivusDaemonStatus, unknown>;
|
|
1691
|
-
}
|
|
1692
|
-
interface RivusDaemonStatusReporterOptions {
|
|
1693
|
-
readonly activeRun?: () => ActiveAgentRun | undefined;
|
|
1694
|
-
readonly cardPresentations?: () => FeishuCardRolloverStatus;
|
|
1695
|
-
readonly activeRunId?: () => AgentRunId | undefined;
|
|
1696
|
-
readonly activeRunState?: () => AgentRunState | undefined;
|
|
1697
|
-
readonly agentId: string;
|
|
1698
|
-
readonly availability?: () => AgentHarnessAvailability;
|
|
1699
|
-
readonly pending: () => number;
|
|
1700
|
-
readonly processRunning: () => boolean;
|
|
1701
|
-
readonly receiveStatus?: () => FeishuReceiveRuntimeStatus;
|
|
1702
|
-
readonly restoreHistory: () => Effect.Effect<AgentHistory, unknown>;
|
|
1703
|
-
readonly transportRunning: () => boolean;
|
|
1704
|
-
readonly workerLoopRunning: () => boolean;
|
|
1705
|
-
}
|
|
1706
|
-
declare function createRivusDaemonStatusReporter(options: RivusDaemonStatusReporterOptions): RivusDaemonStatusReporter;
|
|
1707
|
-
//#endregion
|
|
1708
|
-
//#region src/infrastructure/http/rivus-daemon-status-http-server.d.ts
|
|
1709
|
-
interface RivusDaemonStatusHttpServerOptions {
|
|
1710
|
-
readonly host?: string;
|
|
1711
|
-
readonly path?: string;
|
|
1712
|
-
readonly port: number;
|
|
1713
|
-
readonly statusReporter: RivusDaemonStatusReporter;
|
|
1714
|
-
}
|
|
1715
|
-
interface RivusDaemonStatusHttpServer extends RivusDaemonTransport {
|
|
1716
|
-
url(): string | undefined;
|
|
1717
|
-
}
|
|
1718
|
-
declare function createRivusDaemonStatusHttpServer(options: RivusDaemonStatusHttpServerOptions): RivusDaemonStatusHttpServer;
|
|
1719
|
-
//#endregion
|
|
1720
|
-
//#region src/application/daemon/rivus-daemon-shutdown-controller.d.ts
|
|
1721
|
-
type RivusDaemonShutdownSignal = "SIGINT" | "SIGTERM";
|
|
1722
|
-
interface RivusDaemonSignalSource {
|
|
1723
|
-
on(signal: RivusDaemonShutdownSignal, listener: () => void): void;
|
|
1724
|
-
}
|
|
1725
|
-
interface RivusDaemonShutdownControllerOptions {
|
|
1726
|
-
readonly daemon: Pick<RivusDaemonProcess, "stop">;
|
|
1727
|
-
readonly signalSource: RivusDaemonSignalSource;
|
|
1728
|
-
readonly signals?: ReadonlyArray<RivusDaemonShutdownSignal>;
|
|
1729
|
-
readonly onError?: (error: unknown, signal: RivusDaemonShutdownSignal) => void | Promise<void>;
|
|
1730
|
-
readonly onStopped?: (signal: RivusDaemonShutdownSignal) => void | Promise<void>;
|
|
1731
|
-
}
|
|
1732
|
-
interface RivusDaemonShutdownController {
|
|
1733
|
-
handle(signal: RivusDaemonShutdownSignal): Promise<void>;
|
|
1734
|
-
install(): void;
|
|
1735
|
-
stopping(): boolean;
|
|
1736
|
-
}
|
|
1737
|
-
declare function createRivusDaemonShutdownController(options: RivusDaemonShutdownControllerOptions): RivusDaemonShutdownController;
|
|
1738
|
-
//#endregion
|
|
1739
|
-
//#region src/application/host/rivus-agent-host.d.ts
|
|
1740
|
-
interface RivusEndpointDefinition {
|
|
1741
|
-
readonly id: string;
|
|
1742
|
-
readonly agentId: string;
|
|
1743
|
-
}
|
|
1744
|
-
interface RivusAgentHostOptions {
|
|
1745
|
-
readonly automations?: ReadonlyArray<RivusAutomationDefinition>;
|
|
1746
|
-
readonly backgroundSessions?: ReadonlyArray<RivusBackgroundSessionDefinition>;
|
|
1747
|
-
readonly definitions: ReadonlyArray<ResolvedRivusAgentDefinition>;
|
|
1748
|
-
readonly endpoints: ReadonlyArray<RivusEndpointDefinition>;
|
|
1749
|
-
readonly runtimePool: AgentRuntimePool;
|
|
1750
|
-
}
|
|
1751
|
-
interface RivusAutomationDefinition {
|
|
1752
|
-
readonly definition: ResolvedRivusAgentDefinition;
|
|
1753
|
-
readonly id: string;
|
|
1754
|
-
}
|
|
1755
|
-
interface RivusBackgroundSessionDefinition {
|
|
1756
|
-
readonly agentId: string;
|
|
1757
|
-
readonly definition: ResolvedRivusAgentDefinition;
|
|
1758
|
-
}
|
|
1759
|
-
interface RivusEndpointInput extends AgentRuntimeInput {}
|
|
1760
|
-
interface RivusAgentHost {
|
|
1761
|
-
cancelBackgroundSession(agentId: string, input: AgentRuntimeCancellation): Promise<boolean>;
|
|
1762
|
-
cancelEndpoint(endpointId: string, input: AgentRuntimeCancellation): Promise<boolean>;
|
|
1763
|
-
steerEndpoint(endpointId: string, input: AgentRuntimeSteering): Promise<boolean>;
|
|
1764
|
-
handleAutomation(automationId: string, input: AgentRuntimeInput): Promise<unknown>;
|
|
1765
|
-
handleBackgroundSession(agentId: string, input: AgentRuntimeInput): Promise<unknown>;
|
|
1766
|
-
handleEndpoint(endpointId: string, input: RivusEndpointInput): Promise<unknown>;
|
|
1767
|
-
resolveAutomation(automationId: string): AgentInstanceRecord;
|
|
1768
|
-
resolveBackgroundSession(agentId: string): AgentInstanceRecord;
|
|
1769
|
-
resolveEndpoint(endpointId: string): AgentInstanceRecord;
|
|
1770
|
-
}
|
|
1771
|
-
declare class InvalidRivusEndpointBinding extends Error {
|
|
1772
|
-
readonly name = "InvalidRivusEndpointBinding";
|
|
1773
|
-
}
|
|
1774
|
-
declare function createRivusAgentHost(options: RivusAgentHostOptions): RivusAgentHost;
|
|
1775
|
-
//#endregion
|
|
1776
|
-
//#region src/domain/project-space.d.ts
|
|
1777
|
-
interface RivusProjectSpaceDeployment {
|
|
1778
|
-
readonly id: string;
|
|
1779
|
-
readonly root: string;
|
|
1780
|
-
readonly workingDirectory: string;
|
|
1781
|
-
readonly skills: {
|
|
1782
|
-
readonly sources: ReadonlyArray<string>;
|
|
1783
|
-
};
|
|
1784
|
-
}
|
|
1785
|
-
interface ResolvedRivusProjectSpace {
|
|
1786
|
-
readonly id: string;
|
|
1787
|
-
readonly root: string;
|
|
1788
|
-
readonly workingDirectory: string;
|
|
1789
|
-
readonly skillPaths: ReadonlyArray<string>;
|
|
1790
|
-
readonly revision: string;
|
|
1791
|
-
}
|
|
1792
|
-
declare class InvalidRivusProjectSpace extends Error {
|
|
1793
|
-
readonly name = "InvalidRivusProjectSpace";
|
|
1794
|
-
}
|
|
1795
|
-
//#endregion
|
|
1796
|
-
//#region src/application/plugin/rivus-plugin-loader.d.ts
|
|
1797
|
-
interface RivusPluginDeclaration {
|
|
1798
|
-
readonly id: string;
|
|
1799
|
-
readonly module: string;
|
|
1800
|
-
readonly required: boolean;
|
|
1801
|
-
}
|
|
1802
|
-
interface RivusDeploymentManifest {
|
|
1803
|
-
readonly plugins: ReadonlyArray<RivusPluginDeclaration>;
|
|
1804
|
-
readonly agents: ReadonlyArray<RivusAgentDeployment>;
|
|
1805
|
-
readonly automations?: ReadonlyArray<RivusAutomationDeployment>;
|
|
1806
|
-
readonly endpoints: ReadonlyArray<RivusEndpointDeployment>;
|
|
1807
|
-
readonly defaultAgentId: string;
|
|
1808
|
-
readonly defaultEndpointId: string;
|
|
1809
|
-
readonly projectSpaces?: ReadonlyArray<RivusProjectSpaceDeployment>;
|
|
1810
|
-
readonly backgroundSessions?: RivusBackgroundSessionsDeployment;
|
|
1811
|
-
}
|
|
1812
|
-
interface RivusBackgroundSessionsDeployment {
|
|
1813
|
-
readonly enabled: boolean;
|
|
1814
|
-
readonly required: boolean;
|
|
1815
|
-
readonly stepTimeoutMs: number;
|
|
1816
|
-
readonly maxConcurrentSessions: number;
|
|
1817
|
-
readonly leaseMs: number;
|
|
1818
|
-
readonly leaseRenewalIntervalMs: number;
|
|
1819
|
-
readonly maxConsecutiveFailures: number;
|
|
1820
|
-
readonly retryBackoffMs: number;
|
|
1821
|
-
readonly sessionLifetimeMs: number;
|
|
1822
|
-
}
|
|
1823
|
-
type RivusAutomationDeliveryTargetType = "chat_id" | "open_id" | "user_id" | "union_id" | "email";
|
|
1824
|
-
interface RivusAutomationDelivery {
|
|
1825
|
-
readonly endpointId: string;
|
|
1826
|
-
readonly targetRef: string;
|
|
1827
|
-
readonly targetType: RivusAutomationDeliveryTargetType;
|
|
1828
|
-
}
|
|
1829
|
-
interface RivusAutomationDeployment {
|
|
1830
|
-
readonly id: string;
|
|
1831
|
-
readonly agentId: string;
|
|
1832
|
-
readonly templateId: string;
|
|
1833
|
-
readonly enabled: boolean;
|
|
1834
|
-
readonly required: boolean;
|
|
1835
|
-
readonly schedule: string;
|
|
1836
|
-
readonly timeZone: string;
|
|
1837
|
-
readonly delivery: RivusAutomationDelivery;
|
|
1838
|
-
}
|
|
1839
|
-
interface RivusEndpointDeployment {
|
|
1840
|
-
readonly id: string;
|
|
1841
|
-
readonly agentId: string;
|
|
1842
|
-
readonly sessionNamespace: string;
|
|
1843
|
-
readonly credentialRef: string;
|
|
1844
|
-
readonly enabled: boolean;
|
|
1845
|
-
readonly experimental?: RivusEndpointExperimentalFeatures;
|
|
1846
|
-
readonly required: boolean;
|
|
1847
|
-
readonly baseUrl: string;
|
|
1848
|
-
readonly cardStreamLeaseMs: number;
|
|
1849
|
-
readonly streamMinIntervalMs: number;
|
|
1850
|
-
readonly groupPolicy: "mention-only" | "ignore-unmentioned" | "default-responder";
|
|
1851
|
-
readonly progressDisplay?: ConversationProgressDisplay;
|
|
1852
|
-
}
|
|
1853
|
-
interface RivusEndpointExperimentalFeatures {
|
|
1854
|
-
readonly cotMessages: boolean;
|
|
1855
|
-
}
|
|
1856
|
-
interface RivusPluginModuleLoadRequest {
|
|
1857
|
-
readonly deploymentRoot: string;
|
|
1858
|
-
readonly module: string;
|
|
1859
|
-
readonly pluginId: string;
|
|
1860
|
-
}
|
|
1861
|
-
type RivusPluginModule = RivusPlugin | {
|
|
1862
|
-
readonly default: RivusPlugin | (() => RivusPlugin | Promise<RivusPlugin>);
|
|
1863
|
-
};
|
|
1864
|
-
interface RivusPluginLoadStatus {
|
|
1865
|
-
readonly id: string;
|
|
1866
|
-
readonly module: string;
|
|
1867
|
-
readonly required: boolean;
|
|
1868
|
-
readonly status: "loaded" | "failed";
|
|
1869
|
-
readonly version?: string;
|
|
1870
|
-
readonly error?: string;
|
|
1871
|
-
}
|
|
1872
|
-
interface RivusAgentDeploymentStatus {
|
|
1873
|
-
readonly agentId: string;
|
|
1874
|
-
readonly pluginId: string;
|
|
1875
|
-
readonly profileId: string;
|
|
1876
|
-
readonly status: "enabled" | "disabled";
|
|
1877
|
-
readonly reason?: string;
|
|
1878
|
-
readonly definition?: ResolvedRivusAgentDefinition;
|
|
1879
|
-
}
|
|
1880
|
-
interface LoadedRivusDeployment {
|
|
1881
|
-
readonly manifest: RivusDeploymentManifest;
|
|
1882
|
-
readonly catalog: RivusPluginCatalog;
|
|
1883
|
-
readonly plugins: ReadonlyArray<RivusPluginLoadStatus>;
|
|
1884
|
-
readonly agents: ReadonlyArray<RivusAgentDeploymentStatus>;
|
|
1885
|
-
readonly definitions: ReadonlyArray<ResolvedRivusAgentDefinition>;
|
|
1886
|
-
readonly automationDefinitions: ReadonlyArray<ResolvedRivusAutomationDefinition>;
|
|
1887
|
-
}
|
|
1888
|
-
interface ResolvedRivusAutomationDefinition extends RivusAutomationDeployment {
|
|
1889
|
-
readonly runtimeDefinition: ResolvedRivusAgentDefinition;
|
|
1890
|
-
readonly template: RegisteredRivusAutomation;
|
|
1891
|
-
}
|
|
1892
|
-
interface LoadRivusDeploymentOptions {
|
|
1893
|
-
readonly deploymentRoot: string;
|
|
1894
|
-
readonly manifest: RivusDeploymentManifest;
|
|
1895
|
-
readonly loadModule: (request: RivusPluginModuleLoadRequest) => Promise<RivusPluginModule> | RivusPluginModule;
|
|
1896
|
-
}
|
|
1897
|
-
declare class RivusPluginLoadError extends Error {
|
|
1898
|
-
readonly pluginId: string;
|
|
1899
|
-
readonly moduleSpecifier: string;
|
|
1900
|
-
readonly name = "RivusPluginLoadError";
|
|
1901
|
-
constructor(pluginId: string, moduleSpecifier: string, message: string, options?: ErrorOptions);
|
|
1902
|
-
}
|
|
1903
|
-
declare function loadRivusDeployment(options: LoadRivusDeploymentOptions): Promise<LoadedRivusDeployment>;
|
|
1904
|
-
declare function validateRivusDeploymentManifest(manifest: RivusDeploymentManifest): void;
|
|
1905
|
-
//#endregion
|
|
1906
|
-
//#region src/application/automation/automation-mandate.d.ts
|
|
1907
|
-
interface AutomationBinding {
|
|
1908
|
-
readonly agentId: string;
|
|
1909
|
-
readonly bindingId: string;
|
|
1910
|
-
readonly delivery: AutomationDeliveryBinding;
|
|
1911
|
-
readonly schedule: string;
|
|
1912
|
-
readonly servicePrincipalId: string;
|
|
1913
|
-
readonly skillGrantRevision: string;
|
|
1914
|
-
readonly skillIds: ReadonlyArray<string>;
|
|
1915
|
-
readonly templateId: string;
|
|
1916
|
-
readonly timeZone: string;
|
|
1917
|
-
readonly toolIds: ReadonlyArray<string>;
|
|
1918
|
-
}
|
|
1919
|
-
interface AutomationDeliveryBinding {
|
|
1920
|
-
readonly endpointId: string;
|
|
1921
|
-
readonly targetKey: string;
|
|
1922
|
-
readonly targetType: "chat_id" | "open_id" | "user_id" | "union_id" | "email";
|
|
1923
|
-
}
|
|
1924
|
-
interface AutomationMandate extends AutomationBinding {
|
|
1925
|
-
readonly id: string;
|
|
1926
|
-
readonly active: boolean;
|
|
1927
|
-
}
|
|
1928
|
-
interface AutomationTick {
|
|
1929
|
-
readonly tickId: string;
|
|
1930
|
-
readonly mandateId: string;
|
|
1931
|
-
readonly occurrence: string;
|
|
1932
|
-
readonly claimedBy: string;
|
|
1933
|
-
}
|
|
1934
|
-
interface AutomationMandateStore {
|
|
1935
|
-
activate(binding: AutomationBinding): AutomationMandate;
|
|
1936
|
-
revoke(id: string): void;
|
|
1937
|
-
claim(id: string, occurrence: string, workerId: string): AutomationTick;
|
|
1938
|
-
}
|
|
1939
|
-
declare class AutomationMandateError extends Error {
|
|
1940
|
-
readonly name = "AutomationMandateError";
|
|
1941
|
-
}
|
|
1942
|
-
declare function createAutomationMandateStore(): AutomationMandateStore;
|
|
1943
|
-
//#endregion
|
|
1944
|
-
//#region src/application/automation/scheduled-automation.d.ts
|
|
1945
|
-
declare const AUTOMATION_SUPPRESSION_PREFIX = "RIVUS_AUTOMATION_SUPPRESSED:";
|
|
1946
|
-
type AutomationTickStatus = "running" | "failed" | "generated" | "suppressed" | "delivered";
|
|
1947
|
-
interface AutomationTickRecord {
|
|
1948
|
-
readonly automationId: string;
|
|
1949
|
-
readonly body?: string;
|
|
1950
|
-
readonly error?: string;
|
|
1951
|
-
readonly occurrence: string;
|
|
1952
|
-
readonly mandateId: string;
|
|
1953
|
-
readonly providerMessageId?: string;
|
|
1954
|
-
readonly presentation?: AutomationPresentation;
|
|
1955
|
-
readonly revision: number;
|
|
1956
|
-
readonly runId?: string;
|
|
1957
|
-
readonly suppressionReason?: string;
|
|
1958
|
-
readonly status: AutomationTickStatus;
|
|
1959
|
-
readonly tickId: string;
|
|
1960
|
-
}
|
|
1961
|
-
interface AutomationTickRepository {
|
|
1962
|
-
get(automationId: string, occurrence: string): Promise<AutomationTickRecord | undefined>;
|
|
1963
|
-
put(record: AutomationTickRecord): Promise<AutomationTickRecord>;
|
|
1964
|
-
}
|
|
1965
|
-
interface ScheduledAutomationRunInput {
|
|
1966
|
-
readonly occurrence: string;
|
|
1967
|
-
readonly sessionKey: string;
|
|
1968
|
-
readonly text: string;
|
|
1969
|
-
readonly tickId: string;
|
|
1970
|
-
}
|
|
1971
|
-
interface ScheduledAutomationRunResult {
|
|
1972
|
-
readonly body?: string;
|
|
1973
|
-
readonly presentation?: AutomationPresentation;
|
|
1974
|
-
readonly runId: string;
|
|
1975
|
-
readonly suppressedReason?: string;
|
|
1976
|
-
}
|
|
1977
|
-
interface ScheduledAutomationDeliveryInput {
|
|
1978
|
-
readonly body: string;
|
|
1979
|
-
readonly idempotencyKey: string;
|
|
1980
|
-
readonly presentation?: AutomationPresentation;
|
|
1981
|
-
}
|
|
1982
|
-
interface ScheduledAutomationOptions {
|
|
1983
|
-
readonly automationId: string;
|
|
1984
|
-
readonly binding: AutomationBinding;
|
|
1985
|
-
readonly clock?: ScheduledAutomationClock;
|
|
1986
|
-
readonly createInput: (tick: RivusAutomationTickContext) => RivusAutomationInput;
|
|
1987
|
-
readonly deliver: (input: ScheduledAutomationDeliveryInput) => Promise<{
|
|
1988
|
-
readonly providerMessageId: string;
|
|
1989
|
-
}>;
|
|
1990
|
-
readonly repository: AutomationTickRepository;
|
|
1991
|
-
readonly onError?: (error: unknown) => Promise<void> | void;
|
|
1992
|
-
readonly retryDelayMs?: number;
|
|
1993
|
-
readonly run: (input: ScheduledAutomationRunInput) => Promise<ScheduledAutomationRunResult>;
|
|
1994
|
-
}
|
|
1995
|
-
interface ScheduledAutomationClock {
|
|
1996
|
-
now(): Date;
|
|
1997
|
-
sleep(milliseconds: number, signal: AbortSignal): Promise<void>;
|
|
1998
|
-
}
|
|
1999
|
-
interface ScheduledAutomation {
|
|
2000
|
-
running(): boolean;
|
|
2001
|
-
runDue(at: Date): Promise<AutomationTickRecord | undefined>;
|
|
2002
|
-
start(): Promise<void>;
|
|
2003
|
-
stop(): Promise<void>;
|
|
2004
|
-
}
|
|
2005
|
-
declare function createScheduledAutomation(options: ScheduledAutomationOptions): ScheduledAutomation;
|
|
2006
|
-
//#endregion
|
|
2007
|
-
//#region src/application/background-session/background-session-supervisor.d.ts
|
|
2008
|
-
interface BackgroundSessionLimits {
|
|
2009
|
-
readonly intervalMs: number;
|
|
2010
|
-
readonly leaseMs: number;
|
|
2011
|
-
readonly leaseRenewalIntervalMs: number;
|
|
2012
|
-
readonly maxConcurrentSessions: number;
|
|
2013
|
-
readonly maxConsecutiveFailures: number;
|
|
2014
|
-
readonly retryBackoffMs: number;
|
|
2015
|
-
readonly sessionLifetimeMs: number;
|
|
2016
|
-
}
|
|
2017
|
-
interface BackgroundSessionStepResult {
|
|
2018
|
-
readonly finalText: string;
|
|
2019
|
-
readonly runId: string;
|
|
2020
|
-
}
|
|
2021
|
-
type BackgroundSessionDeliveryKindForSupervisor = "progress" | "final" | "stopped" | "failed" | "reconciliation";
|
|
2022
|
-
interface BackgroundSessionSupervisorOptions {
|
|
2023
|
-
readonly clock: {
|
|
2024
|
-
now(): string;
|
|
2025
|
-
};
|
|
2026
|
-
readonly config: BackgroundSessionLimits;
|
|
2027
|
-
readonly deliveries: BackgroundSessionDeliveryStore;
|
|
2028
|
-
readonly deliver: (delivery: {
|
|
2029
|
-
readonly deliveryId: string;
|
|
2030
|
-
readonly kind: BackgroundSessionDeliveryKindForSupervisor;
|
|
2031
|
-
readonly sessionId: string;
|
|
2032
|
-
readonly text: string;
|
|
2033
|
-
}) => Promise<{
|
|
2034
|
-
readonly providerMessageId: string;
|
|
2035
|
-
}>;
|
|
2036
|
-
readonly onError?: (error: unknown) => void;
|
|
2037
|
-
readonly repository: BackgroundSessionRepository;
|
|
2038
|
-
readonly runStep: (input: {
|
|
2039
|
-
readonly session: BackgroundSessionState;
|
|
2040
|
-
readonly signal: AbortSignal;
|
|
2041
|
-
readonly wakeText: string;
|
|
2042
|
-
}) => Promise<BackgroundSessionStepResult>;
|
|
2043
|
-
readonly sleep: (ms: number) => Effect.Effect<void>;
|
|
2044
|
-
}
|
|
2045
|
-
interface BackgroundSessionSupervisorStatus {
|
|
2046
|
-
readonly capacity: number;
|
|
2047
|
-
readonly counters: {
|
|
2048
|
-
readonly completed: number;
|
|
2049
|
-
readonly deliveriesDelivered: number;
|
|
2050
|
-
readonly failed: number;
|
|
2051
|
-
readonly started: number;
|
|
2052
|
-
readonly staleLeaseEventsDropped: number;
|
|
2053
|
-
readonly stopped: number;
|
|
2054
|
-
};
|
|
2055
|
-
readonly inFlightSteps: number;
|
|
2056
|
-
readonly oldestDueAt?: string;
|
|
2057
|
-
readonly owner: string;
|
|
2058
|
-
readonly phaseCounts: Readonly<Record<BackgroundSessionPhase, number>>;
|
|
2059
|
-
readonly reconciliationCount: number;
|
|
2060
|
-
readonly repositoryHealthy: boolean;
|
|
2061
|
-
readonly running: boolean;
|
|
2062
|
-
}
|
|
2063
|
-
interface BackgroundSessionSupervisor {
|
|
2064
|
-
recover(): Effect.Effect<void>;
|
|
2065
|
-
start(): Effect.Effect<void>;
|
|
2066
|
-
status(): BackgroundSessionSupervisorStatus;
|
|
2067
|
-
stop(): Effect.Effect<void>;
|
|
2068
|
-
tick(): Effect.Effect<void>;
|
|
2069
|
-
}
|
|
2070
|
-
declare function createBackgroundSessionSupervisor(options: BackgroundSessionSupervisorOptions): BackgroundSessionSupervisor;
|
|
2071
|
-
//#endregion
|
|
2072
|
-
//#region src/application/deployment/rivus-deployment-daemon.d.ts
|
|
2073
|
-
interface RivusDeploymentEndpoint {
|
|
2074
|
-
running(): boolean;
|
|
2075
|
-
start(): Promise<void> | void;
|
|
2076
|
-
stop(): Promise<void> | void;
|
|
2077
|
-
}
|
|
2078
|
-
interface RivusDeploymentAutomation {
|
|
2079
|
-
running(): boolean;
|
|
2080
|
-
start(): Promise<void> | void;
|
|
2081
|
-
stop(): Promise<void> | void;
|
|
2082
|
-
}
|
|
2083
|
-
interface RivusDeploymentBackgroundSession {
|
|
2084
|
-
running(): boolean;
|
|
2085
|
-
start(): Promise<void> | void;
|
|
2086
|
-
status?(): BackgroundSessionSupervisorStatus;
|
|
2087
|
-
stop(): Promise<void> | void;
|
|
2088
|
-
}
|
|
2089
|
-
interface CreateRivusDeploymentAutomationInput {
|
|
2090
|
-
readonly automationId: string;
|
|
2091
|
-
readonly definition: ResolvedRivusAutomationDefinition;
|
|
2092
|
-
readonly deliveryEndpoint: RivusEndpointDeployment;
|
|
2093
|
-
readonly instanceId: string;
|
|
2094
|
-
readonly run: (input: ScheduledAutomationRunInput) => Promise<unknown>;
|
|
2095
|
-
}
|
|
2096
|
-
interface CreateRivusDeploymentEndpointInput {
|
|
2097
|
-
readonly agentId: string;
|
|
2098
|
-
readonly cancel: (input: AgentRuntimeCancellation) => Promise<boolean>;
|
|
2099
|
-
readonly endpointId: string;
|
|
2100
|
-
readonly definition: RivusEndpointDeployment;
|
|
2101
|
-
readonly handle: (input: RivusEndpointInput) => Promise<unknown>;
|
|
2102
|
-
/** Optional control-plane steering; endpoints that do not support it remain prompt-only. */
|
|
2103
|
-
readonly steer?: (input: AgentRuntimeSteering) => Promise<boolean>;
|
|
2104
|
-
readonly instanceId: string;
|
|
2105
|
-
readonly projectSpaceId?: string;
|
|
2106
|
-
}
|
|
2107
|
-
interface CreateRivusDeploymentBackgroundSessionInput {
|
|
2108
|
-
readonly agentIds: ReadonlyArray<string>;
|
|
2109
|
-
readonly config: RivusBackgroundSessionsDeployment;
|
|
2110
|
-
readonly cancel: (input: {
|
|
2111
|
-
readonly agentId: string;
|
|
2112
|
-
readonly reason?: string;
|
|
2113
|
-
readonly runId: string;
|
|
2114
|
-
readonly sessionKey: SessionKey;
|
|
2115
|
-
}) => Promise<boolean>;
|
|
2116
|
-
readonly run: (input: {
|
|
2117
|
-
readonly agentId: string;
|
|
2118
|
-
readonly invocation: AgentInvocationOrigin;
|
|
2119
|
-
readonly onUpdate?: (update: AgentRunUpdate) => void | Promise<void>;
|
|
2120
|
-
readonly sessionKey: SessionKey;
|
|
2121
|
-
readonly text: string;
|
|
2122
|
-
}) => Promise<unknown>;
|
|
2123
|
-
}
|
|
2124
|
-
interface CreateRivusDeploymentRuntimeInput extends AgentInstanceRecord {
|
|
2125
|
-
readonly catalog: RivusPluginCatalog;
|
|
2126
|
-
readonly definition: ResolvedRivusAgentDefinition;
|
|
2127
|
-
readonly projectSpace?: ResolvedRivusProjectSpace;
|
|
2128
|
-
}
|
|
2129
|
-
interface CreateRivusDeploymentDaemonOptions {
|
|
2130
|
-
readonly deploymentRoot: string;
|
|
2131
|
-
readonly manifest: RivusDeploymentManifest;
|
|
2132
|
-
readonly loadModule: (request: RivusPluginModuleLoadRequest) => Promise<RivusPluginModule> | RivusPluginModule;
|
|
2133
|
-
readonly initialInstanceRecords?: AgentInstanceRegistryOptions["initialRecords"];
|
|
2134
|
-
readonly createRuntime: (input: CreateRivusDeploymentRuntimeInput) => PooledAgentRuntime | Promise<PooledAgentRuntime>;
|
|
2135
|
-
readonly createEndpoint: (input: CreateRivusDeploymentEndpointInput) => RivusDeploymentEndpoint | Promise<RivusDeploymentEndpoint>;
|
|
2136
|
-
readonly createAutomation?: (input: CreateRivusDeploymentAutomationInput) => RivusDeploymentAutomation | Promise<RivusDeploymentAutomation>;
|
|
2137
|
-
readonly createBackgroundSession?: (input: CreateRivusDeploymentBackgroundSessionInput) => RivusDeploymentBackgroundSession | Promise<RivusDeploymentBackgroundSession>;
|
|
2138
|
-
readonly resolveProjectSpace?: (input: {
|
|
2139
|
-
readonly declaration: RivusProjectSpaceDeployment;
|
|
2140
|
-
readonly deploymentRoot: string;
|
|
2141
|
-
}) => Promise<ResolvedRivusProjectSpace> | ResolvedRivusProjectSpace;
|
|
2142
|
-
}
|
|
2143
|
-
type RivusDeploymentComponentLifecycle = "disabled" | "stopped" | "starting" | "running" | "degraded" | "stopping" | "cleanup-required";
|
|
2144
|
-
type RivusDeploymentEndpointLifecycle = RivusDeploymentComponentLifecycle;
|
|
2145
|
-
type RivusDeploymentAutomationLifecycle = RivusDeploymentComponentLifecycle;
|
|
2146
|
-
interface RivusDeploymentEndpointStatus {
|
|
2147
|
-
readonly agentId: string;
|
|
2148
|
-
readonly endpointId: string;
|
|
2149
|
-
readonly enabled: boolean;
|
|
2150
|
-
readonly required: boolean;
|
|
2151
|
-
readonly running: boolean;
|
|
2152
|
-
readonly lifecycle: RivusDeploymentEndpointLifecycle;
|
|
2153
|
-
readonly error?: string;
|
|
2154
|
-
}
|
|
2155
|
-
type RivusDeploymentDaemonLifecycle = "stopped" | "starting" | "running" | "degraded" | "stopping" | "cleanup-required";
|
|
2156
|
-
interface RivusDeploymentDaemonStatus {
|
|
2157
|
-
readonly running: boolean;
|
|
2158
|
-
readonly ready: boolean;
|
|
2159
|
-
readonly lifecycle: RivusDeploymentDaemonLifecycle;
|
|
2160
|
-
readonly defaultAgentId: string;
|
|
2161
|
-
readonly defaultEndpointId: string;
|
|
2162
|
-
readonly plugins: LoadedRivusDeployment["plugins"];
|
|
2163
|
-
readonly agents: LoadedRivusDeployment["agents"];
|
|
2164
|
-
readonly endpoints: ReadonlyArray<RivusDeploymentEndpointStatus>;
|
|
2165
|
-
readonly automations: ReadonlyArray<RivusDeploymentAutomationStatus>;
|
|
2166
|
-
readonly backgroundSessions?: RivusDeploymentBackgroundSessionStatus;
|
|
2167
|
-
}
|
|
2168
|
-
interface RivusDeploymentAutomationStatus {
|
|
2169
|
-
readonly agentId: string;
|
|
2170
|
-
readonly automationId: string;
|
|
2171
|
-
readonly enabled: boolean;
|
|
2172
|
-
readonly required: boolean;
|
|
2173
|
-
readonly running: boolean;
|
|
2174
|
-
readonly lifecycle: RivusDeploymentAutomationLifecycle;
|
|
2175
|
-
readonly error?: string;
|
|
2176
|
-
}
|
|
2177
|
-
interface RivusDeploymentBackgroundSessionStatus {
|
|
2178
|
-
readonly enabled: boolean;
|
|
2179
|
-
readonly required: boolean;
|
|
2180
|
-
readonly running: boolean;
|
|
2181
|
-
readonly lifecycle: RivusDeploymentBackgroundSessionLifecycle;
|
|
2182
|
-
readonly error?: string;
|
|
2183
|
-
readonly supervisor?: BackgroundSessionSupervisorStatus;
|
|
2184
|
-
}
|
|
2185
|
-
type RivusDeploymentBackgroundSessionLifecycle = RivusDeploymentComponentLifecycle;
|
|
2186
|
-
interface RivusDeploymentDaemon {
|
|
2187
|
-
readonly deployment: LoadedRivusDeployment;
|
|
2188
|
-
handleDefault(input: RivusEndpointInput): Promise<unknown>;
|
|
2189
|
-
handleEndpoint(endpointId: string, input: RivusEndpointInput): Promise<unknown>;
|
|
2190
|
-
runDefaultAgent(input: RivusEndpointInput): Promise<unknown>;
|
|
2191
|
-
running(): boolean;
|
|
2192
|
-
start(): Promise<void>;
|
|
2193
|
-
status(): RivusDeploymentDaemonStatus;
|
|
2194
|
-
stop(): Promise<void>;
|
|
2195
|
-
}
|
|
2196
|
-
declare class RivusDeploymentDaemonLifecycleError extends Error {
|
|
2197
|
-
readonly name = "RivusDeploymentDaemonLifecycleError";
|
|
2198
|
-
}
|
|
2199
|
-
declare class RivusDeploymentReadinessError extends Error {
|
|
2200
|
-
readonly endpointIds: ReadonlyArray<string>;
|
|
2201
|
-
readonly name = "RivusDeploymentReadinessError";
|
|
2202
|
-
constructor(endpointIds: ReadonlyArray<string>);
|
|
2203
|
-
}
|
|
2204
|
-
declare class RivusDeploymentAutomationReadinessError extends Error {
|
|
2205
|
-
readonly automationIds: ReadonlyArray<string>;
|
|
2206
|
-
readonly name = "RivusDeploymentAutomationReadinessError";
|
|
2207
|
-
constructor(automationIds: ReadonlyArray<string>);
|
|
2208
|
-
}
|
|
2209
|
-
declare function createRivusDeploymentDaemon(options: CreateRivusDeploymentDaemonOptions): Promise<RivusDeploymentDaemon>;
|
|
2210
|
-
//#endregion
|
|
2211
|
-
//#region src/composition/rivus-deployment-cli-process.d.ts
|
|
2212
|
-
interface RivusDeploymentBootstrapAdapters {
|
|
2213
|
-
readonly initialInstanceRecords?: AgentInstanceRegistryOptions["initialRecords"];
|
|
2214
|
-
readonly dispose?: () => Promise<void> | void;
|
|
2215
|
-
readonly createAutomation?: (input: CreateRivusDeploymentAutomationInput) => RivusDeploymentAutomation | Promise<RivusDeploymentAutomation>;
|
|
2216
|
-
readonly createBackgroundSession?: (input: CreateRivusDeploymentBackgroundSessionInput) => RivusDeploymentBackgroundSession | Promise<RivusDeploymentBackgroundSession>;
|
|
2217
|
-
readonly createRecoveryControl?: () => Promise<RecoveryControl> | RecoveryControl;
|
|
2218
|
-
readonly createRuntime: (input: CreateRivusDeploymentRuntimeInput) => PooledAgentRuntime | Promise<PooledAgentRuntime>;
|
|
2219
|
-
readonly createEndpoint: (input: CreateRivusDeploymentEndpointInput) => RivusDeploymentEndpoint | Promise<RivusDeploymentEndpoint>;
|
|
2220
|
-
readonly replayReceiveMessage?: (handleDefault: (input: RivusEndpointInput) => Promise<unknown>, payload: FeishuReceiveMessagePayload, options?: FeishuReceiveMessageReplayOptions) => Effect.Effect<FeishuReceiveMessageReplayResult, unknown>;
|
|
2221
|
-
}
|
|
2222
|
-
interface RivusDeploymentBootstrapContext {
|
|
2223
|
-
readonly argv: ReadonlyArray<string>;
|
|
2224
|
-
readonly env: RivusDaemonEnv;
|
|
2225
|
-
readonly manifestPath: string;
|
|
2226
|
-
}
|
|
2227
|
-
type RivusDeploymentBootstrapFactory = (context: RivusDeploymentBootstrapContext) => Promise<RivusDeploymentBootstrapAdapters> | RivusDeploymentBootstrapAdapters;
|
|
2228
|
-
interface RivusDeploymentCliProcess extends RivusDaemonProcess {
|
|
2229
|
-
readonly defaultSessionKey: string;
|
|
2230
|
-
openRecoveryControl(): Effect.Effect<RecoveryControl, unknown>;
|
|
2231
|
-
promptText(command: PromptCommand): Effect.Effect<string, unknown>;
|
|
2232
|
-
replayReceiveMessage?(payload: FeishuReceiveMessagePayload, options?: FeishuReceiveMessageReplayOptions): Effect.Effect<FeishuReceiveMessageReplayResult, unknown>;
|
|
2233
|
-
status(): Effect.Effect<RivusDeploymentDaemonStatus>;
|
|
2234
|
-
}
|
|
2235
|
-
declare function createRivusDeploymentCliProcess(factory: RivusDeploymentBootstrapFactory, context: RivusDeploymentBootstrapContext): Promise<RivusDeploymentCliProcess>;
|
|
2236
|
-
//#endregion
|
|
2237
|
-
//#region src/composition/rivus-daemon-cli.d.ts
|
|
2238
|
-
interface RivusDaemonBootstrapContext {
|
|
2239
|
-
readonly argv: ReadonlyArray<string>;
|
|
2240
|
-
readonly config: RivusDaemonConfig;
|
|
2241
|
-
readonly env: RivusDaemonEnv;
|
|
2242
|
-
}
|
|
2243
|
-
type RivusDaemonBootstrapFactory = (context: RivusDaemonBootstrapContext) => Promise<RivusDaemonProcess> | RivusDaemonProcess;
|
|
2244
|
-
interface RivusDaemonBootstrapModule {
|
|
2245
|
-
readonly createRivusDaemonProcess?: RivusDaemonBootstrapFactory;
|
|
2246
|
-
readonly createRivusDeploymentAdapters?: RivusDeploymentBootstrapFactory;
|
|
2247
|
-
readonly default?: RivusDaemonBootstrapFactory;
|
|
2248
|
-
}
|
|
2249
|
-
interface RivusDaemonCliWriter {
|
|
2250
|
-
write(text: string): unknown;
|
|
2251
|
-
}
|
|
2252
|
-
interface RivusDaemonPromptRunner {
|
|
2253
|
-
readonly defaultSessionKey?: string;
|
|
2254
|
-
promptText(command: PromptCommand): Effect.Effect<string, unknown>;
|
|
2255
|
-
}
|
|
2256
|
-
interface RivusDaemonFeishuReplayRunner {
|
|
2257
|
-
replayReceiveMessage(payload: FeishuReceiveMessagePayload, options?: FeishuReceiveMessageReplayOptions): Effect.Effect<FeishuReceiveMessageReplayResult, unknown>;
|
|
2258
|
-
}
|
|
2259
|
-
interface RivusDaemonRecoveryRunner {
|
|
2260
|
-
openRecoveryControl(): Effect.Effect<RecoveryControl, unknown>;
|
|
2261
|
-
}
|
|
2262
|
-
interface RivusDaemonCliOptions {
|
|
2263
|
-
readonly argv: ReadonlyArray<string>;
|
|
2264
|
-
readonly env: RivusDaemonEnv;
|
|
2265
|
-
readonly exitAfterSignal?: (exitCode: number) => void;
|
|
2266
|
-
readonly loadBootstrap?: (specifier: string) => Promise<RivusDaemonBootstrapModule>;
|
|
2267
|
-
readonly signalSource: RivusDaemonSignalSource;
|
|
2268
|
-
readonly stderr: RivusDaemonCliWriter;
|
|
2269
|
-
readonly stdout: RivusDaemonCliWriter;
|
|
2270
|
-
}
|
|
2271
|
-
declare function runRivusDaemonCli(options: RivusDaemonCliOptions): Effect.Effect<number>;
|
|
2272
|
-
//#endregion
|
|
2273
|
-
//#region src/infrastructure/feishu/feishu-human-interaction-card.d.ts
|
|
2274
|
-
interface FeishuRawCardJson {
|
|
2275
|
-
readonly body: {
|
|
2276
|
-
readonly direction?: "horizontal" | "vertical";
|
|
2277
|
-
readonly elements: ReadonlyArray<unknown>;
|
|
2278
|
-
readonly padding?: string;
|
|
2279
|
-
readonly vertical_spacing?: string;
|
|
2280
|
-
};
|
|
2281
|
-
readonly config: {
|
|
2282
|
-
readonly streaming_mode?: boolean;
|
|
2283
|
-
readonly update_multi: true;
|
|
2284
|
-
};
|
|
2285
|
-
readonly header: {
|
|
2286
|
-
readonly padding?: string;
|
|
2287
|
-
readonly template: "blue" | "green" | "grey" | "orange" | "red";
|
|
2288
|
-
readonly title: {
|
|
2289
|
-
readonly content: string;
|
|
2290
|
-
readonly tag: "plain_text";
|
|
2291
|
-
};
|
|
2292
|
-
};
|
|
2293
|
-
readonly schema: "2.0";
|
|
2294
|
-
}
|
|
2295
|
-
declare function createFeishuHumanInteractionCard(interaction: HumanInteraction): FeishuRawCardJson;
|
|
2296
|
-
//#endregion
|
|
2297
|
-
//#region src/infrastructure/feishu/feishu-card-action-response.d.ts
|
|
2298
|
-
interface FeishuCardActionCallbackResponse {
|
|
2299
|
-
readonly card?: {
|
|
2300
|
-
readonly data: FeishuRawCardJson;
|
|
2301
|
-
readonly type: "raw";
|
|
2302
|
-
};
|
|
2303
|
-
readonly toast: FeishuCardActionToast;
|
|
2304
|
-
}
|
|
2305
|
-
interface FeishuCardActionToast {
|
|
2306
|
-
readonly type: "success" | "info" | "warning" | "error";
|
|
2307
|
-
readonly content: string;
|
|
2308
|
-
readonly i18n?: {
|
|
2309
|
-
readonly en_us?: string;
|
|
2310
|
-
readonly zh_cn?: string;
|
|
2311
|
-
};
|
|
2312
|
-
}
|
|
2313
|
-
declare function createFeishuCardActionCallbackResponse(result: FeishuAgentDaemonHandleResult): FeishuCardActionCallbackResponse;
|
|
2314
|
-
declare function createFeishuCardActionErrorResponse(): FeishuCardActionCallbackResponse;
|
|
2315
|
-
//#endregion
|
|
2316
|
-
//#region src/infrastructure/feishu/feishu-event-handlers.d.ts
|
|
2317
|
-
interface FeishuEventHandlerQueue {
|
|
2318
|
-
accept(payload: FeishuReceiveMessagePayload): Effect.Effect<FeishuMessageAcceptResult, unknown>;
|
|
2319
|
-
pending?(): number;
|
|
2320
|
-
}
|
|
2321
|
-
interface FeishuEventHandlerCardActions {
|
|
2322
|
-
handleCardAction(payload: FeishuCardActionTriggerPayload): Effect.Effect<FeishuAgentDaemonHandleResult, unknown>;
|
|
2323
|
-
}
|
|
2324
|
-
interface FeishuEventHandlersOptions {
|
|
2325
|
-
readonly cardActions?: FeishuEventHandlerCardActions;
|
|
2326
|
-
readonly queue: FeishuEventHandlerQueue;
|
|
2327
|
-
}
|
|
2328
|
-
interface FeishuSdkReceiveMessagePayload {
|
|
2329
|
-
readonly message: FeishuReceiveMessagePayload["event"]["message"];
|
|
2330
|
-
readonly sender?: FeishuReceiveMessagePayload["event"]["sender"];
|
|
2331
|
-
readonly tenant_key?: string;
|
|
2332
|
-
}
|
|
2333
|
-
type FeishuReceiveMessageHandlerPayload = FeishuReceiveMessagePayload | FeishuSdkReceiveMessagePayload;
|
|
2334
|
-
interface FeishuEventHandlers {
|
|
2335
|
-
readonly "card.action.trigger"?: (payload: FeishuCardActionTriggerPayload) => Promise<FeishuCardActionCallbackResponse>;
|
|
2336
|
-
readonly "im.message.receive_v1": (payload: FeishuReceiveMessageHandlerPayload) => Promise<FeishuMessageAcceptResult>;
|
|
2337
|
-
}
|
|
2338
|
-
declare function createFeishuEventHandlers(options: FeishuEventHandlersOptions): FeishuEventHandlers;
|
|
2339
|
-
//#endregion
|
|
2340
|
-
//#region src/composition/feishu-agent-runtime.d.ts
|
|
2341
|
-
interface FeishuAgentRuntimeOptions {
|
|
2342
|
-
readonly acknowledgeSteering?: (messageId: string) => Effect.Effect<void, unknown>;
|
|
2343
|
-
readonly agentId: string;
|
|
2344
|
-
readonly botOpenId?: string;
|
|
2345
|
-
readonly clock: AgentClock;
|
|
2346
|
-
readonly eventSinks?: ReadonlyArray<AgentDomainEventSink>;
|
|
2347
|
-
readonly finalizeRun?: (runId: AgentRunId) => Effect.Effect<void>;
|
|
2348
|
-
readonly inboxRepository?: FeishuInboxRepository;
|
|
2349
|
-
readonly initialEvents?: ReadonlyArray<AgentDomainEvent>;
|
|
2350
|
-
readonly initialRunStates?: ReadonlyArray<AgentRunState>;
|
|
2351
|
-
readonly loop: AgentLoop;
|
|
2352
|
-
readonly prepareRun?: (run: FeishuAgentRunPreparation) => Effect.Effect<void, unknown>;
|
|
2353
|
-
readonly promptContext?: FeishuPromptContextResolver;
|
|
2354
|
-
readonly periodicFlush?: FeishuPeriodicFlushSupervisor;
|
|
2355
|
-
readonly publish: (action: FeishuStreamAction) => Effect.Effect<void, unknown>;
|
|
2356
|
-
readonly reply?: (messageId: string, text: string) => Effect.Effect<void, unknown>;
|
|
2357
|
-
readonly runTimeoutMs?: number;
|
|
2358
|
-
readonly runIds: RunIdGenerator;
|
|
2359
|
-
readonly sessionStore?: FeishuSessionStore;
|
|
2360
|
-
}
|
|
2361
|
-
interface FeishuPeriodicFlushSupervisor {
|
|
2362
|
-
withPeriodicFlush<A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, unknown, R>;
|
|
2363
|
-
}
|
|
2364
|
-
interface FeishuAgentRuntime {
|
|
2365
|
-
readonly handlers: FeishuEventHandlers;
|
|
2366
|
-
readonly harness: AgentHarness;
|
|
2367
|
-
readonly queue: FeishuMessageQueue;
|
|
2368
|
-
readonly worker: FeishuMessageWorker;
|
|
2369
|
-
drainAvailable(): Effect.Effect<FeishuMessageWorkerDrainAvailableResult, unknown>;
|
|
2370
|
-
drainOne(): Effect.Effect<FeishuMessageDrainResult, unknown>;
|
|
2371
|
-
pending(): number;
|
|
2372
|
-
receiveStatus(): FeishuReceiveRuntimeStatus;
|
|
2373
|
-
replayReceiveMessage(payload: FeishuReceiveMessagePayload, options?: FeishuReceiveMessageReplayOptions): Effect.Effect<FeishuReceiveMessageReplayResult, unknown>;
|
|
2374
|
-
}
|
|
2375
|
-
declare function createFeishuAgentRuntime(options: FeishuAgentRuntimeOptions): FeishuAgentRuntime;
|
|
2376
|
-
//#endregion
|
|
2377
|
-
//#region src/application/agent/agent-history.d.ts
|
|
2378
|
-
interface AgentHistoryEventLog {
|
|
2379
|
-
readAll(): Effect.Effect<ReadonlyArray<AgentDomainEvent>, unknown>;
|
|
2380
|
-
}
|
|
2381
|
-
declare function restoreAgentHistory(eventLog: AgentHistoryEventLog): Effect.Effect<AgentHistory, unknown>;
|
|
2382
|
-
//#endregion
|
|
2383
|
-
//#region src/infrastructure/feishu/feishu-websocket-daemon.d.ts
|
|
2384
|
-
interface FeishuWebSocketClientStartOptions {
|
|
2385
|
-
readonly eventDispatcher: unknown;
|
|
2386
|
-
}
|
|
2387
|
-
interface FeishuWebSocketClient {
|
|
2388
|
-
connected?(): boolean;
|
|
2389
|
-
start(options: FeishuWebSocketClientStartOptions): void | Promise<void>;
|
|
2390
|
-
close?(): void | Promise<void>;
|
|
2391
|
-
disconnect?(): void | Promise<void>;
|
|
2392
|
-
stop?(): void | Promise<void>;
|
|
2393
|
-
}
|
|
2394
|
-
interface FeishuWebSocketEventDispatcher {
|
|
2395
|
-
register(handlers: FeishuEventHandlers): unknown;
|
|
2396
|
-
}
|
|
2397
|
-
declare function createLazyFeishuWebSocketEventDispatcher(create: () => FeishuWebSocketEventDispatcher): FeishuWebSocketEventDispatcher;
|
|
2398
|
-
interface FeishuWebSocketRuntime {
|
|
2399
|
-
readonly handlers: FeishuEventHandlers;
|
|
2400
|
-
drainAvailable?(): unknown;
|
|
2401
|
-
}
|
|
2402
|
-
type FeishuWebSocketDaemonOptions = {
|
|
2403
|
-
readonly client: FeishuWebSocketClient;
|
|
2404
|
-
readonly eventDispatcher: FeishuWebSocketEventDispatcher;
|
|
2405
|
-
readonly handlers: FeishuEventHandlers;
|
|
2406
|
-
readonly runtime?: never;
|
|
2407
|
-
} | {
|
|
2408
|
-
readonly client: FeishuWebSocketClient;
|
|
2409
|
-
readonly eventDispatcher: FeishuWebSocketEventDispatcher;
|
|
2410
|
-
readonly handlers?: never;
|
|
2411
|
-
readonly runtime: FeishuWebSocketRuntime;
|
|
2412
|
-
};
|
|
2413
|
-
interface FeishuWebSocketDaemon {
|
|
2414
|
-
running(): boolean;
|
|
2415
|
-
start(): Promise<void>;
|
|
2416
|
-
stop(): Promise<void>;
|
|
2417
|
-
}
|
|
2418
|
-
declare function createFeishuWebSocketDaemon(options: FeishuWebSocketDaemonOptions): FeishuWebSocketDaemon;
|
|
2419
|
-
//#endregion
|
|
2420
|
-
//#region src/infrastructure/feishu/feishu-cardkit-publisher.d.ts
|
|
2421
|
-
interface FeishuCardTarget {
|
|
2422
|
-
readonly cardId: string;
|
|
2423
|
-
readonly elementId: string;
|
|
2424
|
-
readonly progressElementId?: string;
|
|
2425
|
-
}
|
|
2426
|
-
interface FeishuCardKitTextUpdate {
|
|
2427
|
-
readonly cardId: string;
|
|
2428
|
-
readonly elementId: string;
|
|
2429
|
-
readonly content: string;
|
|
2430
|
-
readonly sequence: number;
|
|
2431
|
-
}
|
|
2432
|
-
interface FeishuCardKitPresentationUpdate {
|
|
2433
|
-
readonly cardId: string;
|
|
2434
|
-
readonly presentation?: RunPresentation;
|
|
2435
|
-
readonly runId: AgentRunId;
|
|
2436
|
-
readonly sequence: number;
|
|
2437
|
-
readonly sessionKey: string;
|
|
2438
|
-
readonly text?: string;
|
|
2439
|
-
}
|
|
2440
|
-
interface FeishuCardKitFinish {
|
|
2441
|
-
readonly cardId: string;
|
|
2442
|
-
readonly presentation?: RunPresentation;
|
|
2443
|
-
readonly text: string;
|
|
2444
|
-
readonly sequence: number;
|
|
2445
|
-
}
|
|
2446
|
-
interface FeishuCardKitFail {
|
|
2447
|
-
readonly cardId: string;
|
|
2448
|
-
readonly errorMessage: string;
|
|
2449
|
-
readonly presentation?: RunPresentation;
|
|
2450
|
-
readonly sequence: number;
|
|
2451
|
-
}
|
|
2452
|
-
interface FeishuCardKitCancel {
|
|
2453
|
-
readonly cardId: string;
|
|
2454
|
-
readonly presentation?: RunPresentation;
|
|
2455
|
-
readonly reason?: string;
|
|
2456
|
-
readonly sequence: number;
|
|
2457
|
-
readonly text?: string;
|
|
2458
|
-
}
|
|
2459
|
-
interface FeishuCardKitClient {
|
|
2460
|
-
cancel(request: FeishuCardKitCancel): Effect.Effect<void, unknown>;
|
|
2461
|
-
updatePresentation(request: FeishuCardKitPresentationUpdate): Effect.Effect<void, unknown>;
|
|
2462
|
-
updateText(request: FeishuCardKitTextUpdate): Effect.Effect<void, unknown>;
|
|
2463
|
-
finish(request: FeishuCardKitFinish): Effect.Effect<void, unknown>;
|
|
2464
|
-
fail(request: FeishuCardKitFail): Effect.Effect<void, unknown>;
|
|
2465
|
-
}
|
|
2466
|
-
interface FeishuCardKitPublisherOptions {
|
|
2467
|
-
readonly client: FeishuCardKitClient;
|
|
2468
|
-
readonly ledger?: FeishuCardDeliveryLedger;
|
|
2469
|
-
readonly resolveTarget: (runId: AgentRunId) => Effect.Effect<FeishuCardTarget, unknown>;
|
|
2470
|
-
}
|
|
2471
|
-
interface FeishuCardKitPublisher {
|
|
2472
|
-
publish(action: FeishuStreamAction): Effect.Effect<void, unknown>;
|
|
2473
|
-
}
|
|
2474
|
-
declare function createFeishuCardKitPublisher(options: FeishuCardKitPublisherOptions): FeishuCardKitPublisher;
|
|
2475
|
-
//#endregion
|
|
2476
|
-
//#region src/infrastructure/feishu/feishu-card-target-registry.d.ts
|
|
2477
|
-
declare class FeishuCardTargetNotFound {
|
|
2478
|
-
readonly runId: AgentRunId;
|
|
2479
|
-
readonly _tag = "FeishuCardTargetNotFound";
|
|
2480
|
-
constructor(runId: AgentRunId);
|
|
2481
|
-
}
|
|
2482
|
-
type FeishuCardTargetRegistryOperation = "load" | "save";
|
|
2483
|
-
declare class FeishuCardTargetRegistryStoreError {
|
|
2484
|
-
readonly operation: FeishuCardTargetRegistryOperation;
|
|
2485
|
-
readonly cause: unknown;
|
|
2486
|
-
readonly _tag = "FeishuCardTargetRegistryStoreError";
|
|
2487
|
-
constructor(operation: FeishuCardTargetRegistryOperation, cause: unknown);
|
|
2488
|
-
}
|
|
2489
|
-
interface FeishuCardTargetRegistry extends FeishuCardPresentationStore {
|
|
2490
|
-
resolveTarget(runId: AgentRunId): Effect.Effect<FeishuCardTarget, unknown>;
|
|
2491
|
-
}
|
|
2492
|
-
interface JsonFileFeishuCardTargetRegistryOptions {
|
|
2493
|
-
readonly filePath: string;
|
|
2494
|
-
}
|
|
2495
|
-
declare function createInMemoryFeishuCardTargetRegistry(initial?: ReadonlyArray<CardPresentationChain>): FeishuCardTargetRegistry;
|
|
2496
|
-
declare function createJsonFileFeishuCardTargetRegistry(options: JsonFileFeishuCardTargetRegistryOptions): FeishuCardTargetRegistry;
|
|
2497
|
-
//#endregion
|
|
2498
|
-
//#region src/application/feishu/feishu-card-rollover-supervisor.d.ts
|
|
2499
|
-
interface FeishuCardRolloverSupervisorOptions {
|
|
2500
|
-
readonly clock: AgentClock;
|
|
2501
|
-
readonly intervalMs?: number;
|
|
2502
|
-
readonly onError?: (error: unknown) => void | Promise<void>;
|
|
2503
|
-
readonly rollover: Pick<FeishuCardRollover, "dueRunIds" | "handoff" | "recover">;
|
|
2504
|
-
readonly sleep: (ms: number) => Effect.Effect<void, unknown>;
|
|
2505
|
-
}
|
|
2506
|
-
interface FeishuCardRolloverSupervisorTickResult {
|
|
2507
|
-
readonly results: ReadonlyArray<FeishuCardRolloverHandoffResult>;
|
|
2508
|
-
}
|
|
2509
|
-
interface FeishuCardRolloverSupervisor {
|
|
2510
|
-
recover(): Effect.Effect<void, unknown>;
|
|
2511
|
-
running(): boolean;
|
|
2512
|
-
start(): void;
|
|
2513
|
-
stop(): Promise<void>;
|
|
2514
|
-
tick(): Effect.Effect<FeishuCardRolloverSupervisorTickResult, unknown>;
|
|
2515
|
-
}
|
|
2516
|
-
declare function createFeishuCardRolloverSupervisor(options: FeishuCardRolloverSupervisorOptions): FeishuCardRolloverSupervisor;
|
|
2517
|
-
//#endregion
|
|
2518
|
-
//#region src/infrastructure/feishu/feishu-tenant-token-provider.d.ts
|
|
2519
|
-
interface FeishuTenantAccessTokenRequest {
|
|
2520
|
-
readonly method: "POST";
|
|
2521
|
-
readonly url: string;
|
|
2522
|
-
readonly headers: Readonly<Record<string, string>>;
|
|
2523
|
-
readonly body: {
|
|
2524
|
-
readonly app_id: string;
|
|
2525
|
-
readonly app_secret: string;
|
|
2526
|
-
};
|
|
2527
|
-
}
|
|
2528
|
-
interface FeishuTenantAccessTokenResponse {
|
|
2529
|
-
readonly status: number;
|
|
2530
|
-
readonly body: {
|
|
2531
|
-
readonly code?: number;
|
|
2532
|
-
readonly msg?: string;
|
|
2533
|
-
readonly tenant_access_token?: string;
|
|
2534
|
-
readonly expire?: number;
|
|
2535
|
-
};
|
|
2536
|
-
}
|
|
2537
|
-
interface FeishuTenantAccessTokenProviderOptions {
|
|
2538
|
-
readonly appId: string;
|
|
2539
|
-
readonly appSecret: string;
|
|
2540
|
-
readonly baseUrl?: string;
|
|
2541
|
-
readonly refreshWindowMs?: number;
|
|
2542
|
-
readonly now?: () => number;
|
|
2543
|
-
readonly request: (request: FeishuTenantAccessTokenRequest) => Effect.Effect<FeishuTenantAccessTokenResponse, unknown>;
|
|
2544
|
-
}
|
|
2545
|
-
interface FeishuTenantAccessTokenProvider {
|
|
2546
|
-
getTenantAccessToken(): Effect.Effect<string, unknown>;
|
|
2547
|
-
}
|
|
2548
|
-
declare class FeishuTenantAccessTokenError {
|
|
2549
|
-
readonly status: number;
|
|
2550
|
-
readonly code: number | undefined;
|
|
2551
|
-
readonly message: string;
|
|
2552
|
-
readonly _tag = "FeishuTenantAccessTokenError";
|
|
2553
|
-
constructor(status: number, code: number | undefined, message: string);
|
|
2554
|
-
}
|
|
2555
|
-
declare function createFeishuTenantAccessTokenProvider(options: FeishuTenantAccessTokenProviderOptions): FeishuTenantAccessTokenProvider;
|
|
2556
|
-
//#endregion
|
|
2557
|
-
//#region src/infrastructure/feishu/feishu-openapi-client.d.ts
|
|
2558
|
-
interface FeishuOpenApiRequest {
|
|
2559
|
-
readonly method: "GET" | "PATCH" | "POST" | "PUT";
|
|
2560
|
-
readonly url: string;
|
|
2561
|
-
readonly headers: Readonly<Record<string, string>>;
|
|
2562
|
-
readonly body?: unknown;
|
|
2563
|
-
}
|
|
2564
|
-
interface FeishuOpenApiResponse {
|
|
2565
|
-
readonly status: number;
|
|
2566
|
-
readonly body: {
|
|
2567
|
-
readonly code?: number;
|
|
2568
|
-
readonly msg?: string;
|
|
2569
|
-
readonly data?: unknown;
|
|
2570
|
-
};
|
|
2571
|
-
}
|
|
2572
|
-
interface FeishuOpenApiClient {
|
|
2573
|
-
request(request: Omit<FeishuOpenApiRequest, "headers">, errorMessage?: string): Effect.Effect<FeishuOpenApiResponse, unknown>;
|
|
2574
|
-
}
|
|
2575
|
-
type ConfiguredFeishuOpenApiRequest = FeishuOpenApiRequest | FeishuTenantAccessTokenRequest;
|
|
2576
|
-
type ConfiguredFeishuOpenApiResponse = FeishuOpenApiResponse | FeishuTenantAccessTokenResponse;
|
|
2577
|
-
declare class FeishuOpenApiError extends Error {
|
|
2578
|
-
readonly status: number;
|
|
2579
|
-
readonly code: number | undefined;
|
|
2580
|
-
readonly _tag = "FeishuOpenApiError";
|
|
2581
|
-
readonly name = "FeishuOpenApiError";
|
|
2582
|
-
constructor(status: number, code: number | undefined, message: string);
|
|
2583
|
-
}
|
|
2584
|
-
declare function createFeishuOpenApiClient(options: {
|
|
2585
|
-
readonly getTenantAccessToken: () => Effect.Effect<string, unknown>;
|
|
2586
|
-
readonly request: (request: FeishuOpenApiRequest) => Effect.Effect<FeishuOpenApiResponse, unknown>;
|
|
2587
|
-
}): FeishuOpenApiClient;
|
|
2588
|
-
declare function createConfiguredFeishuOpenApiClient(options: {
|
|
2589
|
-
readonly config: RivusDaemonConfig;
|
|
2590
|
-
readonly request: (request: ConfiguredFeishuOpenApiRequest) => Effect.Effect<ConfiguredFeishuOpenApiResponse, unknown>;
|
|
2591
|
-
}): FeishuOpenApiClient;
|
|
2592
|
-
//#endregion
|
|
2593
|
-
//#region src/composition/feishu-card-rollover-runtime.d.ts
|
|
2594
|
-
interface ConfiguredFeishuCardRolloverRuntimeOptions {
|
|
2595
|
-
readonly agentName?: string;
|
|
2596
|
-
readonly cardTargets: FeishuCardTargetRegistry;
|
|
2597
|
-
/** Whether running cards should include Feishu HTTP callback cancel buttons. */
|
|
2598
|
-
readonly cancelButton?: boolean;
|
|
2599
|
-
readonly client: FeishuOpenApiClient;
|
|
2600
|
-
readonly clock: AgentClock;
|
|
2601
|
-
readonly config: RivusDaemonConfig;
|
|
2602
|
-
readonly elementId?: string;
|
|
2603
|
-
readonly initialContent?: string;
|
|
2604
|
-
readonly flushIntervalMs?: number;
|
|
2605
|
-
readonly ledger?: FeishuCardDeliveryLedger;
|
|
2606
|
-
readonly observe?: (event: FeishuCardRolloverEvent) => void;
|
|
2607
|
-
readonly onError?: (error: unknown) => void | Promise<void>;
|
|
2608
|
-
readonly progressDisplay?: ConversationProgressDisplay;
|
|
2609
|
-
readonly sleep: (ms: number) => Effect.Effect<void, unknown>;
|
|
2610
|
-
readonly supervisorIntervalMs?: number;
|
|
2611
|
-
readonly title?: string;
|
|
2612
|
-
}
|
|
2613
|
-
interface ConfiguredFeishuCardRolloverRuntime {
|
|
2614
|
-
readonly rollover: FeishuCardRollover;
|
|
2615
|
-
readonly supervisor: FeishuCardRolloverSupervisor;
|
|
2616
|
-
readonly transport: RivusDaemonTransport;
|
|
2617
|
-
prepareRun(run: FeishuAgentRunPreparation): Effect.Effect<void, unknown>;
|
|
2618
|
-
}
|
|
2619
|
-
declare function createConfiguredFeishuCardRolloverRuntime(options: ConfiguredFeishuCardRolloverRuntimeOptions): ConfiguredFeishuCardRolloverRuntime;
|
|
2620
|
-
//#endregion
|
|
2621
|
-
//#region src/infrastructure/persistence/jsonl-agent-event-log.d.ts
|
|
2622
|
-
type AgentEventLogOperation = "append" | "read";
|
|
2623
|
-
declare class AgentEventLogStoreError {
|
|
2624
|
-
readonly operation: AgentEventLogOperation;
|
|
2625
|
-
readonly cause: unknown;
|
|
2626
|
-
readonly _tag = "AgentEventLogStoreError";
|
|
2627
|
-
constructor(operation: AgentEventLogOperation, cause: unknown);
|
|
2628
|
-
}
|
|
2629
|
-
interface AgentEventLog extends AgentDomainEventSink {
|
|
2630
|
-
append(event: AgentDomainEvent): Effect.Effect<void, AgentEventLogStoreError>;
|
|
2631
|
-
readAll(): Effect.Effect<ReadonlyArray<AgentDomainEvent>, AgentEventLogStoreError>;
|
|
2632
|
-
readRun(runId: AgentRunId): Effect.Effect<ReadonlyArray<AgentDomainEvent>, AgentEventLogStoreError>;
|
|
2633
|
-
}
|
|
2634
|
-
interface JsonlAgentEventLogOptions {
|
|
2635
|
-
readonly filePath: string;
|
|
2636
|
-
}
|
|
2637
|
-
declare function createJsonlAgentEventLog(options: JsonlAgentEventLogOptions): AgentEventLog;
|
|
2638
|
-
//#endregion
|
|
2639
|
-
//#region src/composition/rivus-daemon-bootstrap.d.ts
|
|
2640
|
-
type ConfiguredRivusDaemonBootstrapRequest = ConfiguredFeishuOpenApiRequest;
|
|
2641
|
-
type ConfiguredRivusDaemonBootstrapResponse = ConfiguredFeishuOpenApiResponse;
|
|
2642
|
-
interface ConfiguredRivusDaemonBootstrapOptions {
|
|
2643
|
-
readonly botOpenId?: string;
|
|
2644
|
-
readonly cardLedger?: FeishuCardDeliveryLedger;
|
|
2645
|
-
readonly cardRolloverIntervalMs?: number;
|
|
2646
|
-
readonly cardTargets: FeishuCardTargetRegistry;
|
|
2647
|
-
readonly clock: AgentClock;
|
|
2648
|
-
readonly config: RivusDaemonConfig;
|
|
2649
|
-
readonly createStatusTransport?: (statusReporter: RivusDaemonStatusReporter) => RivusDaemonTransport;
|
|
2650
|
-
readonly eventDispatcher: FeishuWebSocketEventDispatcher;
|
|
2651
|
-
readonly eventLog: AgentEventLog;
|
|
2652
|
-
readonly flushIntervalMs?: number;
|
|
2653
|
-
readonly initialEvents?: ReadonlyArray<AgentDomainEvent>;
|
|
2654
|
-
readonly initialRunStates?: ReadonlyArray<AgentRunState>;
|
|
2655
|
-
readonly inboxRepository?: FeishuInboxRepository;
|
|
2656
|
-
readonly loop: AgentLoop;
|
|
2657
|
-
readonly observeCardRollover?: (event: FeishuCardRolloverEvent) => void;
|
|
2658
|
-
readonly onWorkerError?: (error: unknown) => void | Promise<void>;
|
|
2659
|
-
readonly request: (request: ConfiguredRivusDaemonBootstrapRequest) => Effect.Effect<ConfiguredRivusDaemonBootstrapResponse, unknown>;
|
|
2660
|
-
readonly runIds: RunIdGenerator;
|
|
2661
|
-
readonly runTimeoutMs?: number;
|
|
2662
|
-
readonly sleep: (ms: number) => Effect.Effect<void, unknown>;
|
|
2663
|
-
readonly websocketClient: FeishuWebSocketClient;
|
|
2664
|
-
readonly workerIntervalMs?: number;
|
|
2665
|
-
}
|
|
2666
|
-
interface ConfiguredRivusDaemonBootstrap {
|
|
2667
|
-
readonly cardRollover: ConfiguredFeishuCardRolloverRuntime;
|
|
2668
|
-
readonly cardTargets: FeishuCardTargetRegistry;
|
|
2669
|
-
readonly eventLog: AgentEventLog;
|
|
2670
|
-
readonly process: RivusDaemonProcess;
|
|
2671
|
-
readonly publisher: FeishuCardRollover;
|
|
2672
|
-
readonly runtime: FeishuAgentRuntime;
|
|
2673
|
-
readonly statusReporter: RivusDaemonStatusReporter;
|
|
2674
|
-
readonly transport: RivusDaemonTransport;
|
|
2675
|
-
readonly websocketTransport: FeishuWebSocketDaemon;
|
|
2676
|
-
readonly workerLoop: FeishuWorkerLoop;
|
|
2677
|
-
promptText(command: PromptCommand): Effect.Effect<string, unknown>;
|
|
2678
|
-
restoreHistory(): Effect.Effect<AgentHistory, unknown>;
|
|
2679
|
-
status(): Effect.Effect<RivusDaemonStatus, unknown>;
|
|
2680
|
-
}
|
|
2681
|
-
declare function restoreConfiguredRivusDaemonBootstrap(options: ConfiguredRivusDaemonBootstrapOptions): Effect.Effect<ConfiguredRivusDaemonBootstrap, unknown>;
|
|
2682
|
-
declare function createConfiguredRivusDaemonBootstrap(options: ConfiguredRivusDaemonBootstrapOptions): ConfiguredRivusDaemonBootstrap;
|
|
2683
|
-
//#endregion
|
|
2684
|
-
//#region src/application/agent/agent-model-content-observer.d.ts
|
|
2685
|
-
interface AgentModelInputObservation {
|
|
2686
|
-
readonly input: unknown;
|
|
2687
|
-
readonly modelCallId: string;
|
|
2688
|
-
readonly runId: AgentRunId;
|
|
2689
|
-
}
|
|
2690
|
-
interface AgentModelOutputObservation {
|
|
2691
|
-
readonly modelCallId: string;
|
|
2692
|
-
readonly output: unknown;
|
|
2693
|
-
readonly runId: AgentRunId;
|
|
2694
|
-
}
|
|
2695
|
-
interface AgentModelContentObserver {
|
|
2696
|
-
observeInput(observation: AgentModelInputObservation): void;
|
|
2697
|
-
observeOutput(observation: AgentModelOutputObservation): void;
|
|
2698
|
-
}
|
|
2699
|
-
//#endregion
|
|
2700
|
-
//#region src/infrastructure/observability/langfuse-agent-telemetry.d.ts
|
|
2701
|
-
type LangfuseTelemetryEnv = Readonly<Record<string, string | undefined>>;
|
|
2702
|
-
type LangfuseTelemetryContentMode = "metadata-only" | "redacted";
|
|
2703
|
-
interface LangfuseTelemetryConfig {
|
|
2704
|
-
readonly contentMode?: LangfuseTelemetryContentMode;
|
|
2705
|
-
readonly endpoint: string;
|
|
2706
|
-
readonly environment: string;
|
|
2707
|
-
readonly publicKey: string;
|
|
2708
|
-
readonly secretKey: string;
|
|
2709
|
-
readonly serviceName: string;
|
|
2710
|
-
}
|
|
2711
|
-
interface LangfuseAgentTelemetry {
|
|
2712
|
-
readonly modelContentObserver: AgentModelContentObserver;
|
|
2713
|
-
readonly sink: AgentDomainEventSink;
|
|
2714
|
-
forceFlush(): Promise<void>;
|
|
2715
|
-
shutdown(): Promise<void>;
|
|
2716
|
-
}
|
|
2717
|
-
declare class LangfuseTelemetryConfigError extends Error {
|
|
2718
|
-
constructor(message: string);
|
|
2719
|
-
}
|
|
2720
|
-
declare function resolveLangfuseTelemetryConfig(env: LangfuseTelemetryEnv): LangfuseTelemetryConfig | undefined;
|
|
2721
|
-
declare function createLangfuseAgentTelemetry(config: LangfuseTelemetryConfig): LangfuseAgentTelemetry;
|
|
2722
|
-
//#endregion
|
|
2723
|
-
//#region src/infrastructure/observability/telemetry-content-redactor.d.ts
|
|
2724
|
-
interface TelemetryContentRedactorOptions {
|
|
2725
|
-
readonly maxArrayItems?: number;
|
|
2726
|
-
readonly maxDepth?: number;
|
|
2727
|
-
readonly maxObjectKeys?: number;
|
|
2728
|
-
readonly maxSerializedLength?: number;
|
|
2729
|
-
readonly maxStringLength?: number;
|
|
2730
|
-
}
|
|
2731
|
-
type TelemetryContentRedactor = (value: unknown) => string;
|
|
2732
|
-
declare function createTelemetryContentRedactor(options?: TelemetryContentRedactorOptions): TelemetryContentRedactor;
|
|
2733
|
-
//#endregion
|
|
2734
|
-
//#region src/infrastructure/observability/open-telemetry-agent-event-sink.d.ts
|
|
2735
|
-
interface OpenTelemetryAgentEventSinkOptions {
|
|
2736
|
-
readonly captureContent?: boolean;
|
|
2737
|
-
readonly onProjectionError?: (error: unknown, event: AgentDomainEvent) => Promise<void> | void;
|
|
2738
|
-
readonly redactContent?: TelemetryContentRedactor;
|
|
2739
|
-
readonly tracer: Tracer;
|
|
2740
|
-
}
|
|
2741
|
-
interface OpenTelemetryAgentTelemetry {
|
|
2742
|
-
readonly modelContentObserver: AgentModelContentObserver;
|
|
2743
|
-
readonly sink: AgentDomainEventSink;
|
|
2744
|
-
}
|
|
2745
|
-
declare function createOpenTelemetryAgentEventSink(options: OpenTelemetryAgentEventSinkOptions): AgentDomainEventSink;
|
|
2746
|
-
declare function createOpenTelemetryAgentTelemetry(options: OpenTelemetryAgentEventSinkOptions): OpenTelemetryAgentTelemetry;
|
|
2747
|
-
//#endregion
|
|
2748
|
-
//#region src/infrastructure/pi/pi-agent-loop.d.ts
|
|
2749
|
-
type PiAgentSessionEvent = PiMessageStartEvent | PiMessageUpdateEvent | PiMessageEndEvent | PiToolExecutionStartEvent | PiToolExecutionUpdateEvent | PiToolExecutionEndEvent | {
|
|
2750
|
-
readonly type: string;
|
|
2751
|
-
readonly [key: string]: unknown;
|
|
2752
|
-
};
|
|
2753
|
-
interface PiMessageUpdateEvent {
|
|
2754
|
-
readonly type: "message_update";
|
|
2755
|
-
readonly message: unknown;
|
|
2756
|
-
readonly assistantMessageEvent: {
|
|
2757
|
-
readonly type: "text_delta";
|
|
2758
|
-
readonly contentIndex: number;
|
|
2759
|
-
readonly delta: string;
|
|
2760
|
-
readonly partial: unknown;
|
|
2761
|
-
} | {
|
|
2762
|
-
readonly type: "thinking_delta";
|
|
2763
|
-
readonly contentIndex: number;
|
|
2764
|
-
readonly delta: string;
|
|
2765
|
-
readonly partial: unknown;
|
|
2766
|
-
} | {
|
|
2767
|
-
readonly type: string;
|
|
2768
|
-
readonly [key: string]: unknown;
|
|
2769
|
-
};
|
|
2770
|
-
}
|
|
2771
|
-
interface PiMessageStartEvent {
|
|
2772
|
-
readonly type: "message_start";
|
|
2773
|
-
readonly message: unknown;
|
|
2774
|
-
}
|
|
2775
|
-
interface PiMessageEndEvent {
|
|
2776
|
-
readonly type: "message_end";
|
|
2777
|
-
readonly message: unknown;
|
|
2778
|
-
}
|
|
2779
|
-
interface PiToolExecutionStartEvent {
|
|
2780
|
-
readonly type: "tool_execution_start";
|
|
2781
|
-
readonly toolCallId: string;
|
|
2782
|
-
readonly toolName: string;
|
|
2783
|
-
readonly args?: unknown;
|
|
2784
|
-
readonly input?: unknown;
|
|
2785
|
-
}
|
|
2786
|
-
interface PiToolExecutionUpdateEvent {
|
|
2787
|
-
readonly type: "tool_execution_update";
|
|
2788
|
-
readonly toolCallId: string;
|
|
2789
|
-
readonly toolName: string;
|
|
2790
|
-
readonly args?: unknown;
|
|
2791
|
-
readonly input?: unknown;
|
|
2792
|
-
readonly partialResult: unknown;
|
|
2793
|
-
}
|
|
2794
|
-
interface PiToolExecutionEndEvent {
|
|
2795
|
-
readonly type: "tool_execution_end";
|
|
2796
|
-
readonly toolCallId: string;
|
|
2797
|
-
readonly toolName: string;
|
|
2798
|
-
readonly result: unknown;
|
|
2799
|
-
readonly isError: boolean;
|
|
2800
|
-
}
|
|
2801
|
-
interface PiAgentSession {
|
|
2802
|
-
abort?: () => Promise<void> | void;
|
|
2803
|
-
prompt(text: string): Promise<void>;
|
|
2804
|
-
readonly state?: unknown;
|
|
2805
|
-
subscribe(listener: (event: PiAgentSessionEvent) => void): () => void;
|
|
2806
|
-
dispose?: () => Promise<void> | void;
|
|
2807
|
-
}
|
|
2808
|
-
interface PiAgentSessionHandle {
|
|
2809
|
-
readonly activate?: (input: AgentLoopInput) => Promise<void> | void;
|
|
2810
|
-
readonly dispose?: () => Promise<void> | void;
|
|
2811
|
-
readonly preparePrompt?: (input: AgentLoopInput) => Promise<string> | string;
|
|
2812
|
-
readonly resolveToolName?: (toolName: string) => string;
|
|
2813
|
-
readonly session: PiAgentSession;
|
|
2814
|
-
}
|
|
2815
|
-
interface PiAgentLoopOptions {
|
|
2816
|
-
readonly disposeSessionAfterRun?: boolean;
|
|
2817
|
-
readonly modelContentObserver?: AgentModelContentObserver;
|
|
2818
|
-
readonly resolveSession: (input: AgentLoopInput) => Promise<PiAgentSessionHandle> | PiAgentSessionHandle;
|
|
2819
|
-
}
|
|
2820
|
-
interface PiCreateAgentSessionResult {
|
|
2821
|
-
readonly session: PiAgentSession;
|
|
2822
|
-
}
|
|
2823
|
-
interface PiSdkAgentLoopOptions<TSessionOptions = unknown> {
|
|
2824
|
-
readonly createAgentSession: (options: TSessionOptions | undefined) => Promise<PiCreateAgentSessionResult> | PiCreateAgentSessionResult;
|
|
2825
|
-
readonly sessionOptions?: TSessionOptions;
|
|
2826
|
-
}
|
|
2827
|
-
declare function createPiAgentLoop(options: PiAgentLoopOptions): AgentLoop;
|
|
2828
|
-
declare function createPiSdkAgentLoop<TSessionOptions = unknown>(options: PiSdkAgentLoopOptions<TSessionOptions>): AgentLoop;
|
|
2829
|
-
//#endregion
|
|
2830
|
-
//#region src/infrastructure/pi/pi-session-registry.d.ts
|
|
2831
|
-
interface PiSessionRegistryOptions {
|
|
2832
|
-
readonly createSession: (input: AgentLoopInput) => Promise<PiAgentSessionHandle> | PiAgentSessionHandle;
|
|
2833
|
-
}
|
|
2834
|
-
interface PiSessionRegistry {
|
|
2835
|
-
resolve(input: AgentLoopInput): Promise<PiAgentSessionHandle>;
|
|
2836
|
-
size(): number;
|
|
2837
|
-
dispose(sessionKey: SessionKey): Promise<void>;
|
|
2838
|
-
disposeAll(): Promise<void>;
|
|
2839
|
-
}
|
|
2840
|
-
declare function createPiSessionRegistry(options: PiSessionRegistryOptions): PiSessionRegistry;
|
|
2841
|
-
//#endregion
|
|
2842
|
-
//#region src/application/presentation/presented-value.d.ts
|
|
2843
|
-
interface PresentedValueOptions {
|
|
2844
|
-
readonly maxCollectionItems?: number;
|
|
2845
|
-
readonly maxDepth?: number;
|
|
2846
|
-
readonly maxNodes?: number;
|
|
2847
|
-
readonly maxStringCharacters?: number;
|
|
2848
|
-
}
|
|
2849
|
-
declare function createPresentedValue(value: unknown, options?: PresentedValueOptions): PresentedValue;
|
|
2850
|
-
//#endregion
|
|
2851
|
-
//#region src/application/presentation/run-presentation-projector.d.ts
|
|
2852
|
-
interface RunPresentationProjector {
|
|
2853
|
-
apply(event: AgentDomainEvent, canonicalText?: string): RunPresentation | undefined;
|
|
2854
|
-
snapshot(runId: AgentRunId): RunPresentation | undefined;
|
|
2855
|
-
}
|
|
2856
|
-
declare function createRunPresentationProjector(): RunPresentationProjector;
|
|
2857
|
-
//#endregion
|
|
2858
|
-
//#region src/infrastructure/feishu/feishu-cardkit-openapi-client.d.ts
|
|
2859
|
-
interface FeishuCardKitOpenApiClientOptions {
|
|
2860
|
-
readonly agentName?: string;
|
|
2861
|
-
readonly baseUrl?: string;
|
|
2862
|
-
readonly cancelButton?: boolean;
|
|
2863
|
-
readonly client: FeishuOpenApiClient;
|
|
2864
|
-
readonly onStreamingClosed?: (cardId: string) => void;
|
|
2865
|
-
readonly progressDisplay?: ConversationProgressDisplay;
|
|
2866
|
-
}
|
|
2867
|
-
declare function createFeishuCardKitOpenApiClient(options: FeishuCardKitOpenApiClientOptions): FeishuCardKitClient;
|
|
2868
|
-
//#endregion
|
|
2869
|
-
//#region src/infrastructure/feishu/feishu-topic-context-resolver.d.ts
|
|
2870
|
-
interface FeishuTopicContextResolverOptions {
|
|
2871
|
-
readonly baseUrl?: string;
|
|
2872
|
-
readonly client: FeishuOpenApiClient;
|
|
2873
|
-
}
|
|
2874
|
-
declare class InvalidFeishuTopicContext extends Error {
|
|
2875
|
-
readonly name = "InvalidFeishuTopicContext";
|
|
2876
|
-
}
|
|
2877
|
-
declare function createFeishuTopicContextResolver(options: FeishuTopicContextResolverOptions): FeishuPromptContextResolver;
|
|
2878
|
-
//#endregion
|
|
2879
|
-
//#region src/infrastructure/feishu/feishu-cot-publisher.d.ts
|
|
2880
|
-
type FeishuCotRunPreparation = FeishuAgentRunPreparation;
|
|
2881
|
-
interface FeishuCotPublisher {
|
|
2882
|
-
fail(runId: string): Effect.Effect<void, unknown>;
|
|
2883
|
-
prepare(run: FeishuCotRunPreparation): Effect.Effect<void, unknown>;
|
|
2884
|
-
publish(update: AgentRunUpdate): Effect.Effect<void, unknown>;
|
|
2885
|
-
}
|
|
2886
|
-
interface FeishuCotPublisherOptions {
|
|
2887
|
-
readonly baseUrl: string;
|
|
2888
|
-
readonly client: FeishuOpenApiClient;
|
|
2889
|
-
readonly minIntervalMs: number;
|
|
2890
|
-
readonly now?: () => number;
|
|
2891
|
-
}
|
|
2892
|
-
declare class FeishuCotProtocolError extends Error {
|
|
2893
|
-
readonly name = "FeishuCotProtocolError";
|
|
2894
|
-
}
|
|
2895
|
-
declare function createFeishuCotPublisher(options: FeishuCotPublisherOptions): FeishuCotPublisher;
|
|
2896
|
-
//#endregion
|
|
2897
|
-
//#region src/infrastructure/feishu/feishu-cardkit-target-preparation.d.ts
|
|
2898
|
-
interface FeishuCardTargetCreateOptions {
|
|
2899
|
-
readonly generation?: number;
|
|
2900
|
-
readonly initialContent?: string;
|
|
2901
|
-
readonly initialPresentation?: RunPresentation;
|
|
2902
|
-
}
|
|
2903
|
-
interface FeishuCardTargetCreator {
|
|
2904
|
-
createTarget(run: FeishuAgentRunPreparation, options?: FeishuCardTargetCreateOptions): Effect.Effect<FeishuCardTarget, unknown>;
|
|
2905
|
-
}
|
|
2906
|
-
interface FeishuCardPresentationBinder {
|
|
2907
|
-
bindRun(run: FeishuAgentRunPreparation, target: FeishuCardTarget): Effect.Effect<unknown, unknown>;
|
|
2908
|
-
}
|
|
2909
|
-
interface FeishuCardTargetPreparationOptions {
|
|
2910
|
-
readonly createTarget: (run: FeishuAgentRunPreparation) => Effect.Effect<FeishuCardTarget, unknown>;
|
|
2911
|
-
readonly presentations: FeishuCardPresentationBinder;
|
|
2912
|
-
}
|
|
2913
|
-
interface FeishuCardKitOpenApiTargetCreatorOptions {
|
|
2914
|
-
readonly baseUrl?: string;
|
|
2915
|
-
readonly cancelButton?: boolean;
|
|
2916
|
-
readonly client: FeishuOpenApiClient;
|
|
2917
|
-
readonly elementId: string;
|
|
2918
|
-
readonly initialContent?: string;
|
|
2919
|
-
readonly progressDisplay?: ConversationProgressDisplay;
|
|
2920
|
-
readonly title?: string;
|
|
2921
|
-
}
|
|
2922
|
-
interface ConfiguredFeishuCardKitTargetCreatorOptions {
|
|
2923
|
-
readonly cancelButton?: boolean;
|
|
2924
|
-
readonly client: FeishuOpenApiClient;
|
|
2925
|
-
readonly config: RivusDaemonConfig;
|
|
2926
|
-
readonly elementId?: string;
|
|
2927
|
-
readonly initialContent?: string;
|
|
2928
|
-
readonly progressDisplay?: ConversationProgressDisplay;
|
|
2929
|
-
readonly title?: string;
|
|
2930
|
-
}
|
|
2931
|
-
declare function createFeishuCardTargetPreparation(options: FeishuCardTargetPreparationOptions): (run: FeishuAgentRunPreparation) => Effect.Effect<void, unknown>;
|
|
2932
|
-
declare function createConfiguredFeishuCardKitTargetCreator(options: ConfiguredFeishuCardKitTargetCreatorOptions): FeishuCardTargetCreator;
|
|
2933
|
-
declare function createFeishuCardKitOpenApiTargetCreator(options: FeishuCardKitOpenApiTargetCreatorOptions): FeishuCardTargetCreator;
|
|
2934
|
-
//#endregion
|
|
2935
|
-
//#region src/infrastructure/feishu/feishu-rate-limited-publisher.d.ts
|
|
2936
|
-
interface FeishuStreamActionPublisher {
|
|
2937
|
-
publish(action: FeishuStreamAction): Effect.Effect<void, unknown>;
|
|
2938
|
-
}
|
|
2939
|
-
interface RateLimitedFeishuPublisherOptions {
|
|
2940
|
-
readonly publisher: FeishuStreamActionPublisher;
|
|
2941
|
-
readonly minIntervalMs: number;
|
|
2942
|
-
readonly sleep: (ms: number) => Effect.Effect<void, unknown>;
|
|
2943
|
-
}
|
|
2944
|
-
declare function createRateLimitedFeishuPublisher(options: RateLimitedFeishuPublisherOptions): FeishuStreamActionPublisher;
|
|
2945
|
-
//#endregion
|
|
2946
|
-
//#region src/infrastructure/feishu/feishu-coalescing-publisher.d.ts
|
|
2947
|
-
interface FeishuCoalescingPublisher extends FeishuStreamActionPublisher {
|
|
2948
|
-
flush(runId?: AgentRunId): Effect.Effect<void, unknown>;
|
|
2949
|
-
}
|
|
2950
|
-
interface FeishuCoalescingPublisherOptions {
|
|
2951
|
-
readonly publisher: FeishuStreamActionPublisher;
|
|
2952
|
-
}
|
|
2953
|
-
declare function createCoalescingFeishuPublisher(options: FeishuCoalescingPublisherOptions): FeishuCoalescingPublisher;
|
|
2954
|
-
//#endregion
|
|
2955
|
-
//#region src/infrastructure/feishu/feishu-configured-cardkit-publisher.d.ts
|
|
2956
|
-
interface ConfiguredFeishuCardKitPublisherOptions {
|
|
2957
|
-
readonly agentName?: string;
|
|
2958
|
-
readonly cancelButton?: boolean;
|
|
2959
|
-
readonly client: FeishuOpenApiClient;
|
|
2960
|
-
readonly config: RivusDaemonConfig;
|
|
2961
|
-
readonly ledger?: FeishuCardDeliveryLedger;
|
|
2962
|
-
readonly onStreamingClosed?: (cardId: string) => void;
|
|
2963
|
-
readonly progressDisplay?: ConversationProgressDisplay;
|
|
2964
|
-
readonly resolveTarget: (runId: AgentRunId) => Effect.Effect<FeishuCardTarget, unknown>;
|
|
2965
|
-
readonly sleep: (ms: number) => Effect.Effect<void, unknown>;
|
|
2966
|
-
}
|
|
2967
|
-
declare function createConfiguredFeishuCardKitPublisher(options: ConfiguredFeishuCardKitPublisherOptions): FeishuCoalescingPublisher;
|
|
2968
|
-
//#endregion
|
|
2969
|
-
//#region src/infrastructure/feishu/feishu-periodic-flush.d.ts
|
|
2970
|
-
interface FeishuPeriodicFlushOptions {
|
|
2971
|
-
readonly flush: () => Effect.Effect<void, unknown>;
|
|
2972
|
-
readonly intervalMs: number;
|
|
2973
|
-
readonly sleep: (ms: number) => Effect.Effect<void, unknown>;
|
|
2974
|
-
}
|
|
2975
|
-
interface FeishuPeriodicFlush {
|
|
2976
|
-
withPeriodicFlush<A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, unknown, R>;
|
|
2977
|
-
}
|
|
2978
|
-
declare function createFeishuPeriodicFlush(options: FeishuPeriodicFlushOptions): FeishuPeriodicFlush;
|
|
2979
|
-
//#endregion
|
|
2980
|
-
//#region src/testing/fakes.d.ts
|
|
2981
|
-
declare function createFixedClock(now: Date): AgentClock;
|
|
2982
|
-
declare function createTestClock(initial: Date): AgentClock & {
|
|
2983
|
-
advance(ms: number): void;
|
|
2984
|
-
};
|
|
2985
|
-
declare function createSequenceRunIds(runIds: ReadonlyArray<AgentRunId>): RunIdGenerator;
|
|
2986
|
-
//#endregion
|
|
2987
|
-
//#region src/application/plugin/rivus-plugin-registry.d.ts
|
|
2988
|
-
declare function createRivusPluginCatalog(): RivusPluginCatalog;
|
|
2989
|
-
declare function resolveRivusAgentDefinition(catalog: RivusPluginCatalog, deployment: RivusAgentDeployment, options?: {
|
|
2990
|
-
readonly backgroundSessions?: boolean;
|
|
2991
|
-
}): ResolvedRivusAgentDefinition;
|
|
2992
|
-
//#endregion
|
|
2993
|
-
//#region src/application/workspace/workspace-instructions.d.ts
|
|
2994
|
-
interface WorkspaceRootHandle {
|
|
2995
|
-
readonly id: string;
|
|
2996
|
-
}
|
|
2997
|
-
interface WorkspaceInstructionSource {
|
|
2998
|
-
readonly relativePath: string;
|
|
2999
|
-
readonly digest: string;
|
|
3000
|
-
readonly bytes: number;
|
|
3001
|
-
readonly content: string;
|
|
3002
|
-
}
|
|
3003
|
-
type WorkspaceInstructionsDiagnosticCode = "workspace-instructions-refresh-required" | "workspace-instructions-source-omitted";
|
|
3004
|
-
interface WorkspaceInstructionsDiagnostic {
|
|
3005
|
-
readonly code: WorkspaceInstructionsDiagnosticCode;
|
|
3006
|
-
readonly relativePath?: string;
|
|
3007
|
-
readonly reason: string;
|
|
3008
|
-
}
|
|
3009
|
-
interface WorkspaceInstructionsRequest {
|
|
3010
|
-
readonly workspaceRoot: WorkspaceRootHandle;
|
|
3011
|
-
readonly workingDirectory: string;
|
|
3012
|
-
readonly targetPath?: string;
|
|
3013
|
-
readonly maxBytes: number;
|
|
3014
|
-
readonly operation?: "read" | "mutate";
|
|
3015
|
-
readonly presentedDigests?: ReadonlyArray<string>;
|
|
3016
|
-
}
|
|
3017
|
-
interface WorkspaceInstructionsView {
|
|
3018
|
-
readonly sources: ReadonlyArray<WorkspaceInstructionSource>;
|
|
3019
|
-
readonly content: string;
|
|
3020
|
-
readonly digest: string;
|
|
3021
|
-
readonly truncated: boolean;
|
|
3022
|
-
readonly refreshRequired: boolean;
|
|
3023
|
-
readonly diagnostics: ReadonlyArray<WorkspaceInstructionsDiagnostic>;
|
|
3024
|
-
}
|
|
3025
|
-
interface WorkspaceInstructionsProvider {
|
|
3026
|
-
resolve(request: WorkspaceInstructionsRequest): Promise<WorkspaceInstructionsView>;
|
|
3027
|
-
}
|
|
3028
|
-
declare class InvalidWorkspaceRoot extends Error {
|
|
3029
|
-
readonly name = "InvalidWorkspaceRoot";
|
|
3030
|
-
}
|
|
3031
|
-
declare function createWorkspaceRootHandle(rootPath: string): Promise<WorkspaceRootHandle>;
|
|
3032
|
-
//#endregion
|
|
3033
|
-
//#region src/infrastructure/workspace/agents-md-instructions-provider.d.ts
|
|
3034
|
-
declare class WorkspaceInstructionsSourceError extends Error {
|
|
3035
|
-
readonly relativePath: string;
|
|
3036
|
-
readonly reason: string;
|
|
3037
|
-
readonly name = "WorkspaceInstructionsSourceError";
|
|
3038
|
-
constructor(relativePath: string, reason: string);
|
|
3039
|
-
}
|
|
3040
|
-
declare function createAgentsMdInstructionsProvider(): WorkspaceInstructionsProvider;
|
|
3041
|
-
//#endregion
|
|
3042
|
-
//#region src/infrastructure/persistence/jsonl-tool-operation-ledger.d.ts
|
|
3043
|
-
declare function openJsonlToolOperationLedger(options: {
|
|
3044
|
-
readonly filePath: string;
|
|
3045
|
-
}): Promise<ToolOperationLedger>;
|
|
3046
|
-
//#endregion
|
|
3047
|
-
//#region src/infrastructure/persistence/jsonl-recovery-control.d.ts
|
|
3048
|
-
interface JsonlRecoveryControlOptions {
|
|
3049
|
-
readonly clock?: {
|
|
3050
|
-
readonly now: () => string;
|
|
3051
|
-
};
|
|
3052
|
-
readonly endpointsDirectory: string;
|
|
3053
|
-
readonly instancesDirectory: string;
|
|
3054
|
-
}
|
|
3055
|
-
declare function openJsonlRecoveryControl(options: JsonlRecoveryControlOptions): Promise<RecoveryControl>;
|
|
3056
|
-
//#endregion
|
|
3057
|
-
//#region src/composition/agent-harness-pooled-runtime.d.ts
|
|
3058
|
-
declare function createAgentHarnessPooledRuntime(harness: AgentHarness): PooledAgentRuntime;
|
|
3059
|
-
//#endregion
|
|
3060
|
-
//#region src/composition/feishu-deployment-endpoint.d.ts
|
|
3061
|
-
interface FeishuDeploymentEndpointOptions extends Pick<CreateRivusDeploymentEndpointInput, "agentId" | "cancel" | "handle" | "steer"> {
|
|
3062
|
-
readonly acknowledgeSteering?: (messageId: string) => Effect.Effect<void, unknown>;
|
|
3063
|
-
readonly botOpenId: string;
|
|
3064
|
-
readonly cardRollover?: RivusDaemonTransport;
|
|
3065
|
-
readonly endpointId?: string;
|
|
3066
|
-
readonly finalizeRun?: (runId: string) => Effect.Effect<void>;
|
|
3067
|
-
readonly eventDispatcher: FeishuWebSocketEventDispatcher;
|
|
3068
|
-
readonly groupPolicy: FeishuEndpointGroupPolicy;
|
|
3069
|
-
readonly initialEvents?: ReadonlyArray<AgentDomainEvent>;
|
|
3070
|
-
readonly interactions?: FeishuHumanInteractionActions;
|
|
3071
|
-
readonly inboxRepository?: FeishuInboxRepository;
|
|
3072
|
-
readonly maxPendingMessages?: number;
|
|
3073
|
-
readonly memoryTenantId?: string;
|
|
3074
|
-
readonly projectSpaceId?: string;
|
|
3075
|
-
readonly onWorkerError?: (error: unknown) => void | Promise<void>;
|
|
3076
|
-
readonly onCapacityExceeded?: (payload: FeishuReceiveMessagePayload) => Effect.Effect<void, unknown>;
|
|
3077
|
-
readonly prepareRun?: (run: FeishuAgentRunPreparation) => Effect.Effect<void, unknown>;
|
|
3078
|
-
readonly promptContext: FeishuPromptContextResolver;
|
|
3079
|
-
readonly publish: (action: FeishuStreamAction) => Effect.Effect<void, unknown>;
|
|
3080
|
-
readonly publishRunUpdate?: AgentRunUpdateHandler;
|
|
3081
|
-
readonly reply?: (messageId: string, text: string) => Effect.Effect<void, unknown>;
|
|
3082
|
-
readonly sessionStore?: FeishuSessionStore;
|
|
3083
|
-
readonly sessionNamespace: string;
|
|
3084
|
-
readonly shutdownTimeoutMs?: number;
|
|
3085
|
-
readonly sleep: (ms: number) => Effect.Effect<void, unknown>;
|
|
3086
|
-
readonly websocketClient: FeishuWebSocketClient;
|
|
3087
|
-
readonly workerIntervalMs?: number;
|
|
3088
|
-
readonly workerConcurrency?: number;
|
|
3089
|
-
}
|
|
3090
|
-
declare function createFeishuDeploymentEndpoint(options: FeishuDeploymentEndpointOptions): RivusDeploymentEndpoint;
|
|
3091
|
-
//#endregion
|
|
3092
|
-
//#region src/composition/feishu-presentation-preparation.d.ts
|
|
3093
|
-
interface FeishuPresentationPreparationOptions {
|
|
3094
|
-
readonly cotPublisher?: Pick<FeishuCotPublisher, "fail" | "prepare">;
|
|
3095
|
-
readonly prepareCardTarget: (run: FeishuAgentRunPreparation) => Effect.Effect<void, unknown>;
|
|
3096
|
-
readonly reportCotError: (operation: "abort" | "create", error: unknown) => Effect.Effect<void>;
|
|
3097
|
-
}
|
|
3098
|
-
declare function createFeishuPresentationPreparation(options: FeishuPresentationPreparationOptions): (run: FeishuAgentRunPreparation) => Effect.Effect<void, unknown>;
|
|
3099
|
-
//#endregion
|
|
3100
|
-
//#region src/application/memory/agent-memory.d.ts
|
|
3101
|
-
interface MemorySearchQuery {
|
|
3102
|
-
readonly query: string;
|
|
3103
|
-
}
|
|
3104
|
-
interface AgentMemoryHandle {
|
|
3105
|
-
readonly namespace: string;
|
|
3106
|
-
readonly scope: MemoryScope;
|
|
3107
|
-
confirm(input: {
|
|
3108
|
-
readonly id: string;
|
|
3109
|
-
readonly expectedRevision: number;
|
|
3110
|
-
readonly conversationSafe?: boolean;
|
|
3111
|
-
}): Promise<MemoryRecord>;
|
|
3112
|
-
forgetRequest(input: {
|
|
3113
|
-
readonly expectedRevision: number;
|
|
3114
|
-
readonly id: string;
|
|
3115
|
-
readonly reason?: string;
|
|
3116
|
-
}): Promise<MemoryRecord>;
|
|
3117
|
-
inspect(id: string): Promise<MemoryRecord | undefined>;
|
|
3118
|
-
propose(input: {
|
|
3119
|
-
readonly content: string;
|
|
3120
|
-
}): Promise<MemoryRecord>;
|
|
3121
|
-
read(id: string): Promise<MemoryRecord | undefined>;
|
|
3122
|
-
search(query: MemorySearchQuery): Promise<ReadonlyArray<MemoryRecord>>;
|
|
3123
|
-
}
|
|
3124
|
-
interface AgentMemoryService {
|
|
3125
|
-
bind(binding: MemoryBinding): AgentMemoryHandle;
|
|
3126
|
-
}
|
|
3127
|
-
interface AgentMemoryServiceOptions {
|
|
3128
|
-
readonly ids?: {
|
|
3129
|
-
readonly next: () => string;
|
|
3130
|
-
};
|
|
3131
|
-
readonly initial?: ReadonlyArray<AgentMemorySnapshot>;
|
|
3132
|
-
readonly persist?: (snapshot: AgentMemorySnapshot) => Promise<void>;
|
|
3133
|
-
}
|
|
3134
|
-
declare class AgentMemoryError extends Error {
|
|
3135
|
-
readonly name = "AgentMemoryError";
|
|
3136
|
-
}
|
|
3137
|
-
declare function createAgentMemoryService(options?: AgentMemoryServiceOptions): AgentMemoryService;
|
|
3138
|
-
//#endregion
|
|
3139
|
-
//#region src/application/background-session/background-session-tools.d.ts
|
|
3140
|
-
interface CreateBackgroundSessionHostToolsOptions {
|
|
3141
|
-
readonly createSessionId: () => string;
|
|
3142
|
-
readonly definition: ResolvedRivusAgentDefinition;
|
|
3143
|
-
readonly service: BackgroundSessionService;
|
|
3144
|
-
}
|
|
3145
|
-
declare function createBackgroundSessionHostTools(options: CreateBackgroundSessionHostToolsOptions): ReadonlyArray<RivusHostToolDescriptor>;
|
|
3146
|
-
//#endregion
|
|
3147
|
-
//#region src/application/background-session/background-session-config.d.ts
|
|
3148
|
-
declare const DEFAULT_BACKGROUND_SESSION_STEP_TIMEOUT_MS: number;
|
|
3149
|
-
declare const DEFAULT_BACKGROUND_SESSION_MAX_CONCURRENT_SESSIONS = 4;
|
|
3150
|
-
declare const DEFAULT_BACKGROUND_SESSION_LEASE_MS = 30000;
|
|
3151
|
-
declare const DEFAULT_BACKGROUND_SESSION_LEASE_RENEWAL_INTERVAL_MS = 10000;
|
|
3152
|
-
declare const DEFAULT_BACKGROUND_SESSION_MAX_CONSECUTIVE_FAILURES = 3;
|
|
3153
|
-
declare const DEFAULT_BACKGROUND_SESSION_RETRY_BACKOFF_MS = 30000;
|
|
3154
|
-
declare const DEFAULT_BACKGROUND_SESSION_LIFETIME_MS: number;
|
|
3155
|
-
declare const DEFAULT_BACKGROUND_SESSION_SUPERVISOR_INTERVAL_MS = 1000;
|
|
3156
|
-
declare function resolveBackgroundSessionSupervisorIntervalMs(leaseMs: number): number;
|
|
3157
|
-
//#endregion
|
|
3158
|
-
//#region src/infrastructure/persistence/jsonl-background-session-repository.d.ts
|
|
3159
|
-
declare const BACKGROUND_SESSION_JSONL_VERSION = 1;
|
|
3160
|
-
interface OpenJsonlBackgroundSessionRepositoryOptions {
|
|
3161
|
-
readonly filePath: string;
|
|
3162
|
-
readonly compactThreshold?: number;
|
|
3163
|
-
}
|
|
3164
|
-
declare function openJsonlBackgroundSessionRepository(options: OpenJsonlBackgroundSessionRepositoryOptions): Promise<BackgroundSessionRepository>;
|
|
3165
|
-
declare function isBackgroundSessionState(value: unknown): value is BackgroundSessionState;
|
|
3166
|
-
//#endregion
|
|
3167
|
-
//#region src/infrastructure/persistence/jsonl-background-session-delivery-store.d.ts
|
|
3168
|
-
declare const BACKGROUND_SESSION_DELIVERY_JSONL_VERSION = 1;
|
|
3169
|
-
interface OpenJsonlBackgroundSessionDeliveryStoreOptions {
|
|
3170
|
-
readonly filePath: string;
|
|
3171
|
-
readonly compactThreshold?: number;
|
|
3172
|
-
}
|
|
3173
|
-
declare function openJsonlBackgroundSessionDeliveryStore(options: OpenJsonlBackgroundSessionDeliveryStoreOptions): Promise<BackgroundSessionDeliveryStore>;
|
|
3174
|
-
//#endregion
|
|
3175
|
-
//#region src/infrastructure/feishu/feishu-background-session-delivery.d.ts
|
|
3176
|
-
type FeishuBackgroundSessionDeliveryKind = "progress" | "final" | "stopped" | "failed" | "reconciliation";
|
|
3177
|
-
interface FeishuBackgroundSessionDeliveryInput {
|
|
3178
|
-
readonly chatId: string;
|
|
3179
|
-
readonly deliveryId: string;
|
|
3180
|
-
readonly displayName: string;
|
|
3181
|
-
readonly kind: FeishuBackgroundSessionDeliveryKind;
|
|
3182
|
-
readonly sessionId: string;
|
|
3183
|
-
readonly text: string;
|
|
3184
|
-
}
|
|
3185
|
-
interface FeishuBackgroundSessionDelivery {
|
|
3186
|
-
deliver(input: FeishuBackgroundSessionDeliveryInput): Promise<{
|
|
3187
|
-
readonly providerMessageId: string;
|
|
3188
|
-
}>;
|
|
3189
|
-
}
|
|
3190
|
-
/**
|
|
3191
|
-
* Background sessions keep the transport-authenticated Feishu conversation id
|
|
3192
|
-
* (`feishu:<tenant>:<chat>:<thread>`) as their stable origin. Feishu's send
|
|
3193
|
-
* API, however, accepts only the raw chat id. Keep the translation at the
|
|
3194
|
-
* Feishu adapter boundary and retain support for older sessions that stored a
|
|
3195
|
-
* raw chat id directly.
|
|
3196
|
-
*/
|
|
3197
|
-
declare function resolveFeishuDeliveryChatId(conversationId: string): string;
|
|
3198
|
-
declare function createConfiguredFeishuBackgroundSessionDelivery(options: {
|
|
3199
|
-
readonly client: FeishuOpenApiClient;
|
|
3200
|
-
readonly config: RivusDaemonConfig;
|
|
3201
|
-
}): FeishuBackgroundSessionDelivery;
|
|
3202
|
-
declare function createBackgroundSessionCard(input: {
|
|
3203
|
-
readonly displayName: string;
|
|
3204
|
-
readonly kind: FeishuBackgroundSessionDeliveryKind;
|
|
3205
|
-
readonly sessionId: string;
|
|
3206
|
-
readonly text: string;
|
|
3207
|
-
}): FeishuRawCardJson;
|
|
3208
|
-
//#endregion
|
|
3209
|
-
//#region src/application/memory/rivus-memory-tool.d.ts
|
|
3210
|
-
interface RivusMemoryTool {
|
|
3211
|
-
execute(command: {
|
|
3212
|
-
readonly command: "forget_request";
|
|
3213
|
-
readonly id: string;
|
|
3214
|
-
readonly reason?: string;
|
|
3215
|
-
}): Promise<MemoryTombstoneReceipt>;
|
|
3216
|
-
execute(command: {
|
|
3217
|
-
readonly command: "propose";
|
|
3218
|
-
readonly input: {
|
|
3219
|
-
readonly content: string;
|
|
3220
|
-
};
|
|
3221
|
-
readonly scope?: Exclude<MemoryScope, "shared-user-profile">;
|
|
3222
|
-
}): Promise<MemoryRecord>;
|
|
3223
|
-
execute(command: {
|
|
3224
|
-
readonly command: "read";
|
|
3225
|
-
readonly id: string;
|
|
3226
|
-
}): Promise<MemoryRecord | undefined>;
|
|
3227
|
-
execute(command: {
|
|
3228
|
-
readonly command: "search";
|
|
3229
|
-
readonly query: MemorySearchQuery;
|
|
3230
|
-
readonly scope?: MemoryScope;
|
|
3231
|
-
}): Promise<ReadonlyArray<MemoryRecord>>;
|
|
3232
|
-
replayCompleted(command: unknown, completedResult: unknown): Promise<unknown>;
|
|
3233
|
-
}
|
|
3234
|
-
interface MemoryTombstoneReceipt {
|
|
3235
|
-
readonly id: string;
|
|
3236
|
-
readonly revision: number;
|
|
3237
|
-
readonly scope: MemoryScope;
|
|
3238
|
-
readonly state: "tombstoned";
|
|
3239
|
-
}
|
|
3240
|
-
declare function createRivusMemoryTool(memory: AgentMemoryHandle | ReadonlyArray<AgentMemoryHandle>): RivusMemoryTool;
|
|
3241
|
-
declare function createRivusMemoryToolDescriptor(options: {
|
|
3242
|
-
readonly memory: AgentMemoryService;
|
|
3243
|
-
}): RivusHostToolDescriptor;
|
|
3244
|
-
//#endregion
|
|
3245
|
-
//#region src/application/memory/project-memory-recall.d.ts
|
|
3246
|
-
interface ProjectMemoryRecallOptions {
|
|
3247
|
-
readonly agentId: string;
|
|
3248
|
-
readonly memory: AgentMemoryService;
|
|
3249
|
-
readonly projectId: string;
|
|
3250
|
-
readonly maxBytes?: number;
|
|
3251
|
-
readonly maxRecords?: number;
|
|
3252
|
-
readonly identity?: ProjectMemoryRecallIdentity;
|
|
3253
|
-
}
|
|
3254
|
-
interface ProjectMemoryRecallIdentity {
|
|
3255
|
-
readonly subjectId: string;
|
|
3256
|
-
readonly tenantId: string;
|
|
3257
|
-
}
|
|
3258
|
-
interface ProjectMemoryPromptInput {
|
|
3259
|
-
readonly invocation?: AgentInvocationOrigin;
|
|
3260
|
-
readonly text: string;
|
|
3261
|
-
}
|
|
3262
|
-
declare function createProjectMemoryPromptPreparer(options: ProjectMemoryRecallOptions): (input: ProjectMemoryPromptInput) => Promise<string>;
|
|
3263
|
-
//#endregion
|
|
3264
|
-
//#region src/application/agent/agent-loop-prompt-transformer.d.ts
|
|
3265
|
-
declare function createAgentLoopPromptTransformer(options: {
|
|
3266
|
-
readonly loop: AgentLoop;
|
|
3267
|
-
readonly transform: (input: AgentLoopInput) => Promise<string> | string;
|
|
3268
|
-
}): AgentLoop;
|
|
3269
|
-
//#endregion
|
|
3270
|
-
//#region src/infrastructure/workspace/rivus-project-space.d.ts
|
|
3271
|
-
declare function resolveRivusProjectSpace(input: {
|
|
3272
|
-
readonly declaration: RivusProjectSpaceDeployment;
|
|
3273
|
-
readonly deploymentRoot: string;
|
|
3274
|
-
}): Promise<ResolvedRivusProjectSpace>;
|
|
3275
|
-
//#endregion
|
|
3276
|
-
//#region src/application/project/project-skill-catalog.d.ts
|
|
3277
|
-
interface ProjectSkillCatalogEntry {
|
|
3278
|
-
readonly name: string;
|
|
3279
|
-
}
|
|
3280
|
-
interface ProjectSkillCatalogDiagnostic {
|
|
3281
|
-
readonly message: string;
|
|
3282
|
-
readonly path?: string;
|
|
3283
|
-
readonly type: "warning" | "error" | "collision";
|
|
3284
|
-
}
|
|
3285
|
-
declare class InvalidProjectSkillCatalog extends Error {
|
|
3286
|
-
readonly name = "InvalidProjectSkillCatalog";
|
|
3287
|
-
}
|
|
3288
|
-
declare function validateProjectSkillCatalog(input: {
|
|
3289
|
-
readonly diagnostics: ReadonlyArray<ProjectSkillCatalogDiagnostic>;
|
|
3290
|
-
readonly skills: ReadonlyArray<ProjectSkillCatalogEntry>;
|
|
3291
|
-
}): ReadonlySet<string>;
|
|
3292
|
-
declare function validateProjectSkillCommand(text: string, skillNames: ReadonlySet<string>): void;
|
|
3293
|
-
//#endregion
|
|
3294
|
-
//#region src/infrastructure/persistence/jsonl-agent-memory-service.d.ts
|
|
3295
|
-
declare function openJsonlAgentMemoryService(options: {
|
|
3296
|
-
readonly filePath: string;
|
|
3297
|
-
}): Promise<AgentMemoryService>;
|
|
3298
|
-
//#endregion
|
|
3299
|
-
//#region src/application/memory/context-assembler.d.ts
|
|
3300
|
-
type AgentContextLayerKind = "host-safety" | "system-prompt" | "managed-instructions" | "workspace-instructions" | "tool-schema" | "skill" | "memory" | "compaction" | "transcript" | "current-input";
|
|
3301
|
-
interface AgentContextLayer {
|
|
3302
|
-
readonly kind: AgentContextLayerKind;
|
|
3303
|
-
readonly content: string;
|
|
3304
|
-
}
|
|
3305
|
-
interface AgentContextInput {
|
|
3306
|
-
readonly hostSafety: string;
|
|
3307
|
-
readonly systemPrompt: string;
|
|
3308
|
-
readonly managedInstructions?: string;
|
|
3309
|
-
readonly workspaceInstructions?: ReadonlyArray<string>;
|
|
3310
|
-
readonly toolSchemas: ReadonlyArray<string>;
|
|
3311
|
-
readonly skills?: ReadonlyArray<string>;
|
|
3312
|
-
readonly memory?: ReadonlyArray<string>;
|
|
3313
|
-
readonly compaction?: string;
|
|
3314
|
-
readonly transcript?: ReadonlyArray<string>;
|
|
3315
|
-
readonly currentInput: string;
|
|
3316
|
-
readonly maxBytes: number;
|
|
3317
|
-
}
|
|
3318
|
-
interface AssembledAgentContext {
|
|
3319
|
-
readonly layers: ReadonlyArray<AgentContextLayer>;
|
|
3320
|
-
readonly omittedKinds: ReadonlyArray<AgentContextLayerKind>;
|
|
3321
|
-
readonly bytes: number;
|
|
3322
|
-
}
|
|
3323
|
-
declare class AgentContextBudgetExceeded extends Error {
|
|
3324
|
-
readonly name = "AgentContextBudgetExceeded";
|
|
3325
|
-
}
|
|
3326
|
-
declare function assembleAgentContext(input: AgentContextInput): AssembledAgentContext;
|
|
3327
|
-
//#endregion
|
|
3328
|
-
//#region src/application/memory/compaction.d.ts
|
|
3329
|
-
interface CompactionInput {
|
|
3330
|
-
readonly tenantId: string;
|
|
3331
|
-
readonly agentId: string;
|
|
3332
|
-
readonly instanceId: string;
|
|
3333
|
-
readonly conversationId: string;
|
|
3334
|
-
readonly profileRevision: string;
|
|
3335
|
-
readonly watermark: number;
|
|
3336
|
-
readonly transcript: ReadonlyArray<string>;
|
|
3337
|
-
}
|
|
3338
|
-
interface CompactorPort {
|
|
3339
|
-
compact(input: CompactionInput): Promise<string>;
|
|
3340
|
-
}
|
|
3341
|
-
interface CompactionSnapshot extends Omit<CompactionInput, "transcript"> {
|
|
3342
|
-
readonly id: string;
|
|
3343
|
-
readonly summary: string;
|
|
3344
|
-
}
|
|
3345
|
-
interface CompactionService {
|
|
3346
|
-
createCandidate(input: CompactionInput): Promise<CompactionSnapshot>;
|
|
3347
|
-
commit(candidateId: string): CompactionSnapshot;
|
|
3348
|
-
current(instanceId: string, conversationId: string): CompactionSnapshot | undefined;
|
|
3349
|
-
}
|
|
3350
|
-
declare class CompactionError extends Error {
|
|
3351
|
-
readonly name = "CompactionError";
|
|
3352
|
-
}
|
|
3353
|
-
declare function createCompactionService(options: {
|
|
3354
|
-
readonly compactor: CompactorPort;
|
|
3355
|
-
}): CompactionService;
|
|
3356
|
-
//#endregion
|
|
3357
|
-
//#region src/application/automation/daily-automation-schedule.d.ts
|
|
3358
|
-
interface DailyAutomationSchedule {
|
|
3359
|
-
currentOccurrence(now: Date): string | undefined;
|
|
3360
|
-
nextOccurrence(now: Date): Date;
|
|
3361
|
-
}
|
|
3362
|
-
declare function createDailyAutomationSchedule(expression: string, timeZone: string, now?: Date): DailyAutomationSchedule;
|
|
3363
|
-
//#endregion
|
|
3364
|
-
//#region src/infrastructure/persistence/json-automation-tick-repository.d.ts
|
|
3365
|
-
interface OpenJsonAutomationTickRepositoryOptions {
|
|
3366
|
-
readonly filePath: string;
|
|
3367
|
-
}
|
|
3368
|
-
declare function openJsonAutomationTickRepository(options: OpenJsonAutomationTickRepositoryOptions): Promise<AutomationTickRepository>;
|
|
3369
|
-
//#endregion
|
|
3370
|
-
//#region src/application/automation/plugin-state.d.ts
|
|
3371
|
-
interface PluginStateRecord {
|
|
3372
|
-
readonly pluginId: string;
|
|
3373
|
-
readonly agentId: string;
|
|
3374
|
-
readonly key: string;
|
|
3375
|
-
readonly value: unknown;
|
|
3376
|
-
readonly revision: number;
|
|
3377
|
-
}
|
|
3378
|
-
interface PutPluginState {
|
|
3379
|
-
readonly pluginId: string;
|
|
3380
|
-
readonly agentId: string;
|
|
3381
|
-
readonly key: string;
|
|
3382
|
-
readonly value: unknown;
|
|
3383
|
-
readonly expectedRevision: number;
|
|
3384
|
-
}
|
|
3385
|
-
interface PluginStateStore {
|
|
3386
|
-
get(pluginId: string, agentId: string, key: string): PluginStateRecord | undefined;
|
|
3387
|
-
put(input: PutPluginState): PluginStateRecord;
|
|
3388
|
-
}
|
|
3389
|
-
declare class PluginStateConflict extends Error {
|
|
3390
|
-
readonly name = "PluginStateConflict";
|
|
3391
|
-
}
|
|
3392
|
-
declare function createPluginStateStore(): PluginStateStore;
|
|
3393
|
-
//#endregion
|
|
3394
|
-
//#region src/application/automation/delivery-outbox.d.ts
|
|
3395
|
-
type AutomationOutcome = {
|
|
3396
|
-
readonly kind: "suppressed";
|
|
3397
|
-
} | {
|
|
3398
|
-
readonly kind: "report" | "alert";
|
|
3399
|
-
readonly body: string;
|
|
3400
|
-
readonly target: string;
|
|
3401
|
-
};
|
|
3402
|
-
type DeliveryJobStatus = "pending" | "delivered" | "reconciliation-required";
|
|
3403
|
-
interface DeliveryJob {
|
|
3404
|
-
readonly id: string;
|
|
3405
|
-
readonly tickId: string;
|
|
3406
|
-
readonly kind: "report" | "alert";
|
|
3407
|
-
readonly body: string;
|
|
3408
|
-
readonly target: string;
|
|
3409
|
-
readonly status: DeliveryJobStatus;
|
|
3410
|
-
readonly receiptId?: string;
|
|
3411
|
-
}
|
|
3412
|
-
interface DeliveryOutbox {
|
|
3413
|
-
enqueue(job: Omit<DeliveryJob, "status">): DeliveryJob;
|
|
3414
|
-
recordAttempt(id: string, result: {
|
|
3415
|
-
readonly kind: "delivered";
|
|
3416
|
-
readonly providerMessageId: string;
|
|
3417
|
-
} | {
|
|
3418
|
-
readonly kind: "uncertain";
|
|
3419
|
-
}): DeliveryJob;
|
|
3420
|
-
snapshot(): ReadonlyArray<DeliveryJob>;
|
|
3421
|
-
}
|
|
3422
|
-
interface CommitAutomationOutcomeInput {
|
|
3423
|
-
readonly tickId: string;
|
|
3424
|
-
readonly outcome: AutomationOutcome;
|
|
3425
|
-
readonly state: PluginStateStore;
|
|
3426
|
-
readonly stateUpdate: PutPluginState;
|
|
3427
|
-
readonly outbox: DeliveryOutbox;
|
|
3428
|
-
}
|
|
3429
|
-
interface CommittedAutomationOutcome {
|
|
3430
|
-
readonly state: PluginStateRecord;
|
|
3431
|
-
readonly job?: DeliveryJob;
|
|
3432
|
-
}
|
|
3433
|
-
declare class DeliveryOutboxError extends Error {
|
|
3434
|
-
readonly name = "DeliveryOutboxError";
|
|
3435
|
-
}
|
|
3436
|
-
declare function createDeliveryOutbox(): DeliveryOutbox;
|
|
3437
|
-
declare function commitAutomationOutcome(input: CommitAutomationOutcomeInput): CommittedAutomationOutcome;
|
|
3438
|
-
//#endregion
|
|
3439
|
-
//#region src/application/delegation/delegation-service.d.ts
|
|
3440
|
-
interface DelegationEdge {
|
|
3441
|
-
readonly fromAgentId: string;
|
|
3442
|
-
readonly toAgentId: string;
|
|
3443
|
-
readonly toolIds: ReadonlyArray<string>;
|
|
3444
|
-
readonly maxHops: number;
|
|
3445
|
-
readonly maxBudget: number;
|
|
3446
|
-
}
|
|
3447
|
-
interface DelegationRequest {
|
|
3448
|
-
readonly callerAuthority: InvocationAuthorityRef;
|
|
3449
|
-
readonly targetAgentId: string;
|
|
3450
|
-
readonly targetInstanceId: string;
|
|
3451
|
-
readonly targetToolGrantSet: RivusToolGrantSet;
|
|
3452
|
-
readonly requestedToolIds: ReadonlyArray<string>;
|
|
3453
|
-
readonly hopCount: number;
|
|
3454
|
-
readonly budget: number;
|
|
3455
|
-
}
|
|
3456
|
-
interface DelegationGrant {
|
|
3457
|
-
readonly id: string;
|
|
3458
|
-
readonly request: DelegationRequest;
|
|
3459
|
-
readonly toolGrantSet: RivusToolGrantSet;
|
|
3460
|
-
readonly authority: InvocationAuthorityRef;
|
|
3461
|
-
}
|
|
3462
|
-
interface DelegationService {
|
|
3463
|
-
delegate(request: DelegationRequest): DelegationGrant;
|
|
3464
|
-
}
|
|
3465
|
-
declare class DelegationDenied extends Error {
|
|
3466
|
-
readonly name = "DelegationDenied";
|
|
3467
|
-
}
|
|
3468
|
-
declare function createDelegationService(options: {
|
|
3469
|
-
readonly edges: ReadonlyArray<DelegationEdge>;
|
|
3470
|
-
}): DelegationService;
|
|
3471
|
-
declare function intersectToolIds(sets: ReadonlyArray<ReadonlyArray<string>>): RivusToolGrantSet;
|
|
3472
|
-
//#endregion
|
|
3473
|
-
//#region src/application/delegation/subagent-coordinator.d.ts
|
|
3474
|
-
interface SpawnSubagentRequest {
|
|
3475
|
-
readonly parentAuthority: InvocationAuthorityRef;
|
|
3476
|
-
readonly childAgentId: string;
|
|
3477
|
-
readonly childProfileToolIds: ReadonlyArray<string>;
|
|
3478
|
-
readonly childDeploymentToolIds: ReadonlyArray<string>;
|
|
3479
|
-
readonly requestedToolIds: ReadonlyArray<string>;
|
|
3480
|
-
}
|
|
3481
|
-
interface SubagentRecord {
|
|
3482
|
-
readonly id: string;
|
|
3483
|
-
readonly parentRunId: string;
|
|
3484
|
-
readonly childAgentId: string;
|
|
3485
|
-
readonly toolGrantSet: RivusToolGrantSet;
|
|
3486
|
-
readonly authority: InvocationAuthorityRef;
|
|
3487
|
-
readonly capabilities: {
|
|
3488
|
-
readonly senderIdentity: false;
|
|
3489
|
-
readonly privateMemory: false;
|
|
3490
|
-
readonly shell: false;
|
|
3491
|
-
};
|
|
3492
|
-
readonly status: "active" | "cancelled";
|
|
3493
|
-
}
|
|
3494
|
-
interface SubagentCoordinator {
|
|
3495
|
-
spawn(request: SpawnSubagentRequest): SubagentRecord;
|
|
3496
|
-
cancelParent(parentRunId: string): void;
|
|
3497
|
-
get(id: string): SubagentRecord | undefined;
|
|
3498
|
-
}
|
|
3499
|
-
declare function createSubagentCoordinator(): SubagentCoordinator;
|
|
3500
|
-
//#endregion
|
|
3501
|
-
//#region src/infrastructure/plugin/node-rivus-plugin-module-loader.d.ts
|
|
3502
|
-
declare function loadNodeRivusPluginModule(request: RivusPluginModuleLoadRequest): Promise<RivusPluginModule>;
|
|
3503
|
-
//#endregion
|
|
3504
|
-
//#region src/infrastructure/config/rivus-deployment-manifest.d.ts
|
|
3505
|
-
interface LoadRivusDeploymentManifestOptions {
|
|
3506
|
-
readonly maxBytes?: number;
|
|
3507
|
-
}
|
|
3508
|
-
declare class RivusDeploymentManifestError extends Error {
|
|
3509
|
-
readonly manifestPath: string;
|
|
3510
|
-
readonly name = "RivusDeploymentManifestError";
|
|
3511
|
-
constructor(manifestPath: string, message: string, options?: ErrorOptions);
|
|
3512
|
-
}
|
|
3513
|
-
declare function loadRivusDeploymentManifest(manifestPath: string, options?: LoadRivusDeploymentManifestOptions): Promise<RivusDeploymentManifest>;
|
|
3514
|
-
//#endregion
|
|
3515
|
-
//#region src/infrastructure/runtime/configured-rivus-deployment-daemon.d.ts
|
|
3516
|
-
type CreateConfiguredRivusDeploymentDaemonOptions = Omit<CreateRivusDeploymentDaemonOptions, "deploymentRoot" | "loadModule" | "manifest"> & {
|
|
3517
|
-
readonly manifestPath: string;
|
|
3518
|
-
readonly manifestOptions?: LoadRivusDeploymentManifestOptions;
|
|
3519
|
-
};
|
|
3520
|
-
declare function createConfiguredRivusDeploymentDaemon(options: CreateConfiguredRivusDeploymentDaemonOptions): Promise<RivusDeploymentDaemon>;
|
|
3521
|
-
//#endregion
|
|
3522
|
-
//#region src/domain/human-interaction-transition.d.ts
|
|
3523
|
-
declare class HumanInteractionTransitionDenied extends Error {
|
|
3524
|
-
readonly name = "HumanInteractionTransitionDenied";
|
|
3525
|
-
}
|
|
3526
|
-
declare function transitionHumanInteraction(interaction: HumanInteraction, transition: HumanInteractionTransition): HumanInteraction;
|
|
3527
|
-
//#endregion
|
|
3528
|
-
//#region src/application/delegation/tool-input-digest.d.ts
|
|
3529
|
-
declare class InvalidStableJson extends Error {
|
|
3530
|
-
readonly name: string;
|
|
3531
|
-
}
|
|
3532
|
-
declare class InvalidToolInput extends InvalidStableJson {
|
|
3533
|
-
readonly name = "InvalidToolInput";
|
|
3534
|
-
}
|
|
3535
|
-
declare function createToolInputDigest(input: unknown): string;
|
|
3536
|
-
declare function normalizeStableJson(value: unknown): unknown;
|
|
3537
|
-
//#endregion
|
|
3538
|
-
//#region src/composition/human-interaction-tool-approval-gateway.d.ts
|
|
3539
|
-
interface HumanInteractionEndpointRegistry {
|
|
3540
|
-
register(endpointId: string, service: HumanInteractionService): void;
|
|
3541
|
-
resolve(endpointId: string): HumanInteractionService | undefined;
|
|
3542
|
-
services(): ReadonlyArray<HumanInteractionService>;
|
|
3543
|
-
}
|
|
3544
|
-
declare function createHumanInteractionEndpointRegistry(): HumanInteractionEndpointRegistry;
|
|
3545
|
-
declare function createHumanInteractionToolApprovalGateway(options: {
|
|
3546
|
-
readonly clock?: {
|
|
3547
|
-
readonly now: () => string;
|
|
3548
|
-
};
|
|
3549
|
-
readonly expiresAfterMs?: number;
|
|
3550
|
-
readonly registry: HumanInteractionEndpointRegistry;
|
|
3551
|
-
}): PiToolApprovalGateway;
|
|
3552
|
-
declare function createRoutedHumanInteractionToolApprovalService(registry: HumanInteractionEndpointRegistry): ToolApprovalService;
|
|
3553
|
-
//#endregion
|
|
3554
|
-
//#region src/infrastructure/feishu/feishu-text-reply.d.ts
|
|
3555
|
-
interface FeishuTextReplySender {
|
|
3556
|
-
reply(messageId: string, text: string): Effect.Effect<void, unknown>;
|
|
3557
|
-
}
|
|
3558
|
-
declare function createConfiguredFeishuTextReplySender(options: {
|
|
3559
|
-
readonly client: FeishuOpenApiClient;
|
|
3560
|
-
readonly config: RivusDaemonConfig;
|
|
3561
|
-
}): FeishuTextReplySender;
|
|
3562
|
-
//#endregion
|
|
3563
|
-
//#region src/infrastructure/feishu/feishu-message-reaction.d.ts
|
|
3564
|
-
interface FeishuMessageReactionSender {
|
|
3565
|
-
add(messageId: string, emojiType?: string): Effect.Effect<void, unknown>;
|
|
3566
|
-
}
|
|
3567
|
-
declare function createConfiguredFeishuMessageReactionSender(options: {
|
|
3568
|
-
readonly client: FeishuOpenApiClient;
|
|
3569
|
-
readonly config: RivusDaemonConfig;
|
|
3570
|
-
}): FeishuMessageReactionSender;
|
|
3571
|
-
//#endregion
|
|
3572
|
-
//#region src/infrastructure/feishu/feishu-automation-card-sender.d.ts
|
|
3573
|
-
interface FeishuAutomationCardInput {
|
|
3574
|
-
readonly idempotencyKey: string;
|
|
3575
|
-
readonly markdown: string;
|
|
3576
|
-
readonly presentation?: AutomationPresentation;
|
|
3577
|
-
readonly receiveId: string;
|
|
3578
|
-
readonly receiveIdType: RivusAutomationDeliveryTargetType;
|
|
3579
|
-
}
|
|
3580
|
-
interface FeishuAutomationCardSender {
|
|
3581
|
-
send(input: FeishuAutomationCardInput): Effect.Effect<{
|
|
3582
|
-
readonly providerMessageId: string;
|
|
3583
|
-
}, unknown>;
|
|
3584
|
-
}
|
|
3585
|
-
declare function createConfiguredFeishuAutomationCardSender(options: {
|
|
3586
|
-
readonly client: FeishuOpenApiClient;
|
|
3587
|
-
readonly config: RivusDaemonConfig;
|
|
3588
|
-
}): FeishuAutomationCardSender;
|
|
3589
|
-
//#endregion
|
|
3590
|
-
//#region src/infrastructure/persistence/jsonl-human-interaction-repository.d.ts
|
|
3591
|
-
interface JsonlHumanInteractionRepositoryOptions {
|
|
3592
|
-
readonly filePath: string;
|
|
3593
|
-
}
|
|
3594
|
-
declare function createJsonlHumanInteractionRepository(options: JsonlHumanInteractionRepositoryOptions): HumanInteractionRepository;
|
|
3595
|
-
//#endregion
|
|
3596
|
-
//#region src/infrastructure/feishu/feishu-agent-run-card.d.ts
|
|
3597
|
-
declare const FEISHU_AGENT_CARD_ELEMENT_ID = "rivus_agent_answer";
|
|
3598
|
-
declare const FEISHU_AGENT_CARD_PROGRESS_ELEMENT_ID = "rivus_agent_progress";
|
|
3599
|
-
type FeishuAgentRunCardInput = {
|
|
3600
|
-
readonly agentName: string;
|
|
3601
|
-
readonly elementId?: string;
|
|
3602
|
-
readonly generation?: number;
|
|
3603
|
-
readonly runId: string;
|
|
3604
|
-
readonly sessionKey: string;
|
|
3605
|
-
readonly status: "running"; /** Disable only when a deployment has not subscribed to the modern card.action.trigger callback. */
|
|
3606
|
-
readonly cancelButton?: boolean;
|
|
3607
|
-
readonly presentation?: RunPresentation;
|
|
3608
|
-
readonly progressDisplay?: ConversationProgressDisplay;
|
|
3609
|
-
readonly text?: string;
|
|
3610
|
-
} | {
|
|
3611
|
-
readonly agentName: string;
|
|
3612
|
-
readonly presentation?: RunPresentation;
|
|
3613
|
-
readonly progressDisplay?: ConversationProgressDisplay;
|
|
3614
|
-
readonly status: "completed";
|
|
3615
|
-
readonly text: string;
|
|
3616
|
-
} | {
|
|
3617
|
-
readonly agentName: string;
|
|
3618
|
-
readonly presentation?: RunPresentation;
|
|
3619
|
-
readonly progressDisplay?: ConversationProgressDisplay;
|
|
3620
|
-
readonly reason?: string;
|
|
3621
|
-
readonly status: "cancelled";
|
|
3622
|
-
readonly text?: string;
|
|
3623
|
-
} | {
|
|
3624
|
-
readonly agentName: string;
|
|
3625
|
-
readonly presentation?: RunPresentation;
|
|
3626
|
-
readonly progressDisplay?: ConversationProgressDisplay;
|
|
3627
|
-
readonly status: "failed";
|
|
3628
|
-
};
|
|
3629
|
-
declare function createFeishuAgentRunCard(input: FeishuAgentRunCardInput): FeishuRawCardJson;
|
|
3630
|
-
//#endregion
|
|
3631
|
-
//#region src/infrastructure/feishu/feishu-human-interaction-presenter.d.ts
|
|
3632
|
-
interface FeishuHumanInteractionPresenterOptions {
|
|
3633
|
-
readonly baseUrl?: string;
|
|
3634
|
-
readonly client: FeishuOpenApiClient;
|
|
3635
|
-
}
|
|
3636
|
-
declare function createFeishuHumanInteractionPresenter(options: FeishuHumanInteractionPresenterOptions): HumanInteractionPresenter;
|
|
3637
|
-
//#endregion
|
|
3638
|
-
//#region src/infrastructure/feishu/feishu-configured-human-interaction-presenter.d.ts
|
|
3639
|
-
interface ConfiguredFeishuHumanInteractionPresenterOptions {
|
|
3640
|
-
readonly client: FeishuOpenApiClient;
|
|
3641
|
-
readonly config: RivusDaemonConfig;
|
|
3642
|
-
}
|
|
3643
|
-
declare function createConfiguredFeishuHumanInteractionPresenter(options: ConfiguredFeishuHumanInteractionPresenterOptions): HumanInteractionPresenter;
|
|
3644
|
-
//#endregion
|
|
3645
|
-
export { AUTOMATION_PRESENTATION_SCHEMA_VERSION, AUTOMATION_SUPPRESSION_PREFIX, 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 AgentLoopTurnStart, 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 AssistantPresentationStep, type AssistantTextDelta, type AssistantThinkingDelta, type AsyncIterableAgentLoopOptions, type AuthorizationPolicyProvider, type AuthorizationPolicyState, type AutomationAgentInvocationOrigin, type AutomationBinding, type AutomationDeliveryBinding, type AutomationMandate, AutomationMandateError, type AutomationMandateStore, type AutomationOutcome, type AutomationPresentation, type AutomationPresentationInput, type AutomationPresentationItem, type AutomationPresentationKind, type AutomationPresentationSection, type AutomationPresentationSource, 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 ConversationProgressDisplay, 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, DEFAULT_CONVERSATION_PROGRESS_DISPLAY, 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, FEISHU_AGENT_CARD_ELEMENT_ID, FEISHU_AGENT_CARD_PROGRESS_ELEMENT_ID, 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 FeishuCardKitOpenApiClientOptions, type FeishuCardKitOpenApiTargetCreatorOptions, type FeishuCardKitPresentationUpdate, 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, InvalidAutomationPresentation, 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, type ModelPresentationStep, 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 PresentationStep, type PresentationStepStatus, type PresentedValue, type PresentedValueOptions, 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, RUN_PRESENTATION_SCHEMA_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 ResponsePresentationStep, type RivusAgentDeployment, type RivusAgentDeploymentStatus, type RivusAgentHost, type RivusAgentHostOptions, type RivusAgentProfile, type RivusAutomationDelivery, type RivusAutomationDeliveryTargetType, type RivusAutomationDeployment, type RivusAutomationInput, type RivusAutomationOutput, 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 RunPresentation, type RunPresentationPhase, type RunPresentationProjector, 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 SkillPresentationStep, 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, type ToolPresentationStep, 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, createAgentLoopTurnStart, createAgentMemoryService, createAgentRunUpdateHandler, createAgentRuntime, createAgentRuntimePool, createAgentTranscriptMessages, createAgentTranscriptTurn, createAgentsMdInstructionsProvider, createAsyncIterableAgentLoop, createAutomationMandateStore, createAutomationPresentation, 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, createPresentedValue, createProjectMemoryPromptPreparer, createRateLimitedFeishuPublisher, createRecoveryAction, createRecoveryControl, createRivusAgentHost, createRivusDaemonProcess, createRivusDaemonShutdownController, createRivusDaemonStatusHttpServer, createRivusDaemonStatusReporter, createRivusDeploymentCliProcess, createRivusDeploymentDaemon, createRivusEnvFromOpenClawConfig, createRivusMemoryTool, createRivusMemoryToolContract, createRivusMemoryToolDescriptor, createRivusPluginCatalog, createRoutedHumanInteractionToolApprovalService, createRunPresentationProjector, createScheduledAutomation, createSequenceRunIds, createSessionScheduler, createSubagentCoordinator, createSystemClock, createTelemetryContentRedactor, createTestClock, createTextAgentLoop, createTextAgentLoopFromCallback, createToolBroker, createToolInputDigest, createToolOperationLedger, createUuidRunIds, createWorkspaceRootHandle, describeFeishuMessageIntake, evolveAgentRun, extendBackgroundSessionDefinition, failBackgroundSessionStep, formatRivusEnvFile, hasInspectableRunProgress, 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, readAutomationPresentation, 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 };
|
|
1
|
+
import { $ as DelegationEdge, $a as WorkspaceRootHandle, $c as createRecoveryControl, $i as RivusDaemonCliWriter, $l as FeishuMessageIntakeSummary, $n as FeishuCardKitOpenApiClientOptions, $o as FeishuWorkerLoopOptions, $r as createFeishuTenantAccessTokenProvider, $s as createDefaultAgentHarnessClientFromTextCallback, $t as RivusAgentHost, $u as JsonlFeishuCardDeliveryLedgerOptions, A as CreateRivusDeploymentBackgroundSessionInput, Aa as RivusAutomationDeliveryTargetType, Ac as SessionSchedulerDisposed, Ai as AgentEventLogStoreError, Al as FeishuAgentExecution, An as createConfiguredFeishuCardKitPublisher, Ao as FeishuCardRolloverEventType, Ar as resolveLangfuseTelemetryConfig, As as resolveFeishuEndpointCredentials, At as RivusMemoryTool, Au as HumanInteractionRepositoryError, B as LoadRivusDeploymentOptions, Ba as ProjectSkillCatalogEntry, Bc as createAgentRuntimePool, Bi as FeishuEventHandlersOptions, Bl as FeishuCardActionCommand, Bn as FeishuCardTargetCreator, Bo as CardPresentationStatus, Br as ConfiguredFeishuOpenApiRequest, Bs as DefaultAgentHarnessClientFromTextCallbackOptions, Bt as openJsonlBackgroundSessionDeliveryStore, Bu as HumanInteractionFact, C as createRoutedHumanInteractionToolApprovalService, Ca as LoadedRivusDeployment, Cc as FetchLikeResponse, Cd as hasInspectableRunProgress, Ci as FeishuWebSocketDaemonOptions, Cl as FeishuAgentDaemonHandleResult, Cn as createFixedClock, Co as RivusDaemonStatus, Cr as createTelemetryContentRedactor, Cs as OpenClawEnvImportOptions, Ct as ProjectMemoryRecallOptions, Cu as ConsumeToolApprovalInput, D as LoadRivusDeploymentManifestOptions, Da as RivusPluginLoadStatus, Dc as createJsonFetchRequest, Di as createLazyFeishuWebSocketEventDispatcher, Dl as FeishuAgentDaemonSessionResetResult, Dn as FeishuPeriodicFlushOptions, Do as FeishuCardRollover, Dr as LangfuseTelemetryContentMode, Ds as formatRivusEnvFile, Dt as RIVUS_MEMORY_TOOL_VERSION, Du as ResolveHumanInteractionInput, E as loadRivusDeploymentManifest, Ea as RivusPluginLoadError, Ec as JsonHttpResponse, Ed as createPresentedValue, Ei as createFeishuWebSocketDaemon, El as FeishuAgentDaemonRunResult, En as FeishuPeriodicFlush, Eo as createRivusDaemonStatusReporter, Er as LangfuseTelemetryConfigError, Es as createRivusEnvFromOpenClawConfig, Et as RIVUS_MEMORY_TOOL_PLUGIN_ID, Eu as HumanInteractionServiceOptions, F as RivusDeploymentBackgroundSession, Fa as RivusEndpointExperimentalFeatures, Fc as AgentRuntimeInput, Fi as FeishuPeriodicFlushSupervisor, Fl as createFeishuAgentDaemon, Fn as RateLimitedFeishuPublisherOptions, Fo as FeishuCardPresentationHandoffStart, Fr as createConfiguredRivusDaemonBootstrap, Fs as RivusTextFileReader, Ft as FeishuBackgroundSessionDeliveryKind, Fu as CancelledHumanInteractionState, G as DelegationService, Ga as RivusProjectSpaceDeployment, Gc as AgentInstanceRegistryOptions, Gi as FeishuCardActionToast, Gl as UnsupportedFeishuCardAction, Gn as FeishuCotProtocolError, Go as CompositeRivusDaemonTransportOptions, Gr as FeishuOpenApiResponse, Gs as DefaultAgentRuntimeFromCallbackOptions, Gt as createBackgroundSessionHostTools, Gu as RejectedHumanInteractionState, H as loadRivusDeployment, Ha as validateProjectSkillCommand, Hc as createAgentInstanceRegistry, Hi as FeishuSdkReceiveMessagePayload, Hl as FeishuCardActionTriggerPayload, Hn as createConfiguredFeishuCardKitTargetCreator, Ho as acceptsCardPresentationProgress, Hr as FeishuOpenApiClient, Hs as DefaultAgentHarnessFromCallbackOptions, Ht as isBackgroundSessionState, Hu as HumanInteractionResolutionAction, I as RivusDeploymentDaemon, Ia as RivusPluginDeclaration, Ic as AgentRuntimePool, Ii as createFeishuAgentRuntime, Il as FeishuPromptContextInput, In as createRateLimitedFeishuPublisher, Io as FeishuCardPresentationStore, Ir as restoreConfiguredRivusDaemonBootstrap, Is as RivusThinkingLevel, It as createBackgroundSessionCard, Iu as ExpiredHumanInteractionState, J as SpawnSubagentRequest, Ja as WorkspaceInstructionsDiagnostic, Jc as OpenJsonFeishuSessionStoreOptions, Ji as FeishuRawCardJson, Jl as FeishuCancelMessageIntakeSummary, Jn as FeishuCotRunPreparation, Jo as RivusDaemonProcessOptions, Jr as FeishuTenantAccessTokenError, Js as DefaultAgentRuntimeSessionOptions, Jt as AgentMemoryServiceOptions, Ju as ToolApprovalInteraction, K as createDelegationService, Ka as InvalidWorkspaceRoot, Kc as AgentInstanceConflict, Ki as createFeishuCardActionCallbackResponse, Kl as createAgentCommandFromFeishuCardAction, Kn as FeishuCotPublisher, Ko as createCompositeRivusDaemonTransport, Kr as createConfiguredFeishuOpenApiClient, Ks as DefaultAgentRuntimeFromTextCallbackOptions, Kt as createBackgroundSessionDeliveryStore, Ku as SelectedHumanInteractionState, L as RivusDeploymentEndpoint, La as validateRivusDeploymentManifest, Lc as AgentRuntimePoolOptions, Li as FeishuEventHandlerCardActions, Ll as FeishuPromptContextResolver, Ln as FeishuCardKitOpenApiTargetCreatorOptions, Lo as DEFAULT_CARD_STREAM_LEASE_MS, Lr as ConfiguredFeishuCardRolloverRuntime, Ls as loadRivusDaemonConfig, Lt as createConfiguredFeishuBackgroundSessionDelivery, Lu as HumanInteraction, M as CreateRivusDeploymentEndpointInput, Ma as RivusBackgroundSessionsDeployment, Mc as SessionSchedulerStatus, Mi as createJsonlAgentEventLog, Ml as FeishuAgentMessageSideEffects, Mn as FeishuCoalescingPublisherOptions, Mo as FeishuCardRolloverOptions, Mr as ConfiguredRivusDaemonBootstrapOptions, Ms as RivusDaemonConfigError, Mt as createRivusMemoryToolDescriptor, Mu as RequestToolApprovalInput, N as CreateRivusDeploymentRuntimeInput, Na as RivusDeploymentManifest, Nc as createSessionScheduler, Ni as FeishuAgentRuntime, Nl as FeishuAgentPreparedControl, Nn as createCoalescingFeishuPublisher, No as FeishuCardRolloverStatus, Nr as ConfiguredRivusDaemonBootstrapRequest, Ns as RivusDaemonConfigLoaderOptions, Nt as FeishuBackgroundSessionDelivery, Nu as RequestUserDecisionInput, O as RivusDeploymentManifestError, Oa as RivusPluginModuleLoadRequest, Oc as SessionScheduler, Oi as AgentEventLog, Ol as FeishuAgentDaemonSkippedResult, On as createFeishuPeriodicFlush, Oo as FeishuCardRolloverCounters, Or as LangfuseTelemetryEnv, Os as FeishuEndpointCredentialError, Ot as createRivusMemoryToolContract, Ou as createHumanInteractionService, P as RivusDeploymentAutomation, Pa as RivusEndpointDeployment, Pc as AgentRuntimeCancellation, Pi as FeishuAgentRuntimeOptions, Pl as FeishuHumanInteractionActions, Pn as FeishuStreamActionPublisher, Po as createFeishuCardRollover, Pr as ConfiguredRivusDaemonBootstrapResponse, Ps as RivusDaemonEnv, Pt as FeishuBackgroundSessionDeliveryInput, Pu as ApprovedHumanInteractionState, Q as DelegationDenied, Qa as WorkspaceInstructionsView, Qc as RecoveryControlOptions, Qi as RivusDaemonCliOptions, Ql as FeishuMessageIntakeOptions, Qn as createFeishuTopicContextResolver, Qo as FeishuWorkerLoop, Qr as FeishuTenantAccessTokenResponse, Qs as createDefaultAgentHarnessClientFromCallback, Qt as InvalidRivusEndpointBinding, Qu as UserDecisionOption, R as createRivusDeploymentDaemon, Ra as InvalidProjectSkillCatalog, Rc as AgentRuntimeSteering, Ri as FeishuEventHandlerQueue, Rl as composeFeishuTopicPrompt, Rn as FeishuCardPresentationBinder, Ro as CardPresentation, Rr as ConfiguredFeishuCardRolloverRuntimeOptions, Rs as AgentRuntime, Rt as resolveFeishuDeliveryChatId, Ru as HumanInteractionActor, S as createHumanInteractionToolApprovalGateway, Sa as RivusDeploymentComponentLifecycle, Sc as FetchLike, Sd as ToolPresentationStep, Si as FeishuWebSocketDaemon, Sl as FeishuAgentDaemonHandleMessageOptions, Sn as resolveRivusAgentDefinition, So as createRivusDaemonStatusHttpServer, Sr as TelemetryContentRedactorOptions, Ss as OpenClawEnvImportError, St as ProjectMemoryRecallIdentity, Su as transitionHumanInteraction, T as createConfiguredRivusDeploymentDaemon, Ta as RivusAgentDeploymentStatus, Tc as JsonHttpRequest, Td as PresentedValueOptions, Ti as FeishuWebSocketRuntime, Tl as FeishuAgentDaemonOptions, Tn as createTestClock, To as RivusDaemonStatusReporterOptions, Tr as LangfuseTelemetryConfig, Ts as RivusEnvFileVariables, Tt as RIVUS_MEMORY_TOOL_ID, Tu as HumanInteractionService, U as SubagentCoordinator, Ua as InvalidRivusProjectSpace, Uc as AgentInstanceBusy, Ui as createFeishuEventHandlers, Ul as FeishuResolveInteractionCommand, Un as createFeishuCardKitOpenApiTargetCreator, Uo as activeCardPresentation, Ur as FeishuOpenApiError, Us as DefaultAgentHarnessFromTextCallbackOptions, Ut as openJsonlBackgroundSessionRepository, Uu as HumanInteractionTransition, V as RivusPluginModule, Va as validateProjectSkillCatalog, Vc as AgentInstanceRegistry, Vi as FeishuReceiveMessageHandlerPayload, Vl as FeishuCardActionIntakeError, Vn as FeishuCardTargetPreparationOptions, Vo as CardPresentationTransitionDenied, Vr as ConfiguredFeishuOpenApiResponse, Vs as DefaultAgentHarnessClientOptions, Vt as BACKGROUND_SESSION_JSONL_VERSION, Vu as HumanInteractionId, W as createSubagentCoordinator, Wa as ResolvedRivusProjectSpace, Wc as AgentRuntimeDisposed, Wi as FeishuCardActionCallbackResponse, Wl as InvalidFeishuCardAction, Wn as createFeishuCardTargetPreparation, Wo as isCardPresentationHandoffDue, Wr as FeishuOpenApiRequest, Ws as DefaultAgentHarnessOptions, Wt as CreateBackgroundSessionHostToolsOptions, Wu as PendingHumanInteractionState, X as DelegationGrant, Xa as WorkspaceInstructionsRequest, Xc as JsonlFeishuInboxRepositoryOptions, Xi as RivusDaemonBootstrapFactory, Xl as FeishuMessageIntakeBaseSummary, Xn as FeishuTopicContextResolverOptions, Xo as RivusDaemonWorkerLoop, Xr as FeishuTenantAccessTokenProviderOptions, Xs as createDefaultAgentHarness, Xt as AgentMemoryHandle, Xu as UserDecisionInteraction, Y as SubagentRecord, Ya as WorkspaceInstructionsDiagnosticCode, Yc as openJsonFeishuSessionStore, Yi as RivusDaemonBootstrapContext, Yl as FeishuCancelRunCommand, Yn as createFeishuCotPublisher, Yo as RivusDaemonTransport, Yr as FeishuTenantAccessTokenProvider, Ys as createAgentRuntime, Yt as createAgentMemoryService, Yu as ToolApprovalInteractionState, Z as DelegationRequest, Za as WorkspaceInstructionsSourceError, Zc as openJsonlFeishuInboxRepository, Zi as RivusDaemonBootstrapModule, Zl as FeishuMessageIntakeError, Zn as InvalidFeishuTopicContext, Zo as createRivusDaemonProcess, Zr as FeishuTenantAccessTokenRequest, Zs as createDefaultAgentHarnessClient, Zt as AgentMemoryService, Zu as UserDecisionInteractionState, _ as createConfiguredFeishuMessageReactionSender, _a as RivusDeploymentDaemonLifecycleError, _c as createAgentDomainEventHandler, _d as RUN_PRESENTATION_SCHEMA_VERSION, _i as FeishuCardKitTextUpdate, _l as InvalidRecoveryAction, _n as createToolBroker, _o as RivusDaemonShutdownSignal, _r as OpenTelemetryAgentEventSinkOptions, _s as FeishuMessageQueueOptions, _t as CompactorPort, _u as InvalidFeishuSessionReference, a as FEISHU_AGENT_CARD_ELEMENT_ID, aa as RivusDeploymentBootstrapContext, ac as createSystemClock, ad as FeishuCardDeliveryRecord, ai as FeishuCardTargetRegistryOperation, al as FeishuInboxDeliveryState, an as createFeishuPresentationPreparation, ao as failBackgroundSessionStep, ar as createRunPresentationProjector, as as FeishuMessageWorkerDrainAvailableResult, at as PluginStateConflict, au as describeFeishuMessageIntake, b as HumanInteractionEndpointRegistry, ba as RivusDeploymentEndpointStatus, bc as AgentHarnessOptions, bd as RunPresentationPhase, bi as FeishuWebSocketClient, bl as FeishuAgentDaemon, bn as createWorkspaceRootHandle, bo as RivusDaemonStatusHttpServer, br as createOpenTelemetryAgentTelemetry, bs as MergePiProviderBaseUrlOverrideOptions, bt as createAgentLoopPromptTransformer, bu as FeishuReceiveMessagePayload, c as createFeishuAgentRunCard, ca as createRivusDeploymentCliProcess, cc as AgentClientFailure, cd as FeishuStreamAction, ci as createInMemoryFeishuCardTargetRegistry, cl as FeishuInboxRepository, cn as createAgentHarnessPooledRuntime, co as parkBackgroundSessionForReconciliation, cr as createPiSessionRegistry, cs as FeishuReceiveMessageReplayOptions, ct as openJsonAutomationTickRepository, cu as UnsupportedFeishuMessage, d as createJsonlHumanInteractionRepository, da as RivusDeploymentAutomationReadinessError, dc as AgentSessionClient, dd as ConversationProgressDisplay, di as FeishuCardKitClient, dl as DeadLetterRecoveryItem, dn as openJsonlToolOperationLedger, do as requestBackgroundSessionStop, dr as createPiAgentLoop, ds as FeishuReceiveRuntimeStatus, dt as ScheduledAutomation, du as FeishuSessionResetResult, ea as RivusDaemonFeishuReplayRunner, ec as createDefaultAgentHarnessFromCallback, ed as openJsonlFeishuCardDeliveryLedger, ei as FeishuCardRolloverSupervisor, el as ToolOperationLedger, en as RivusAgentHostOptions, eo as appendBackgroundSessionInput, er as createFeishuCardKitOpenApiClient, es as createFeishuWorkerLoop, et as CommitAutomationOutcomeInput, eu as FeishuNewSessionCommand, f as createInMemoryHumanInteractionRepository, fa as RivusDeploymentAutomationStatus, fc as AgentTextDeltaCallback, fd as DEFAULT_CONVERSATION_PROGRESS_DISPLAY, fi as FeishuCardKitFail, fl as DeadLetterRequeueResult, fn as AuthorizationPolicyProvider, fo as requeueInterruptedBackgroundSessionStep, fr as createPiSdkAgentLoop, fs as FeishuEndpointGroupPolicy, ft as ScheduledAutomationClock, fu as FeishuSessionStore, g as FeishuMessageReactionSender, ga as RivusDeploymentDaemonLifecycle, gc as AgentRunUpdateCallback, gd as PresentationStepStatus, gi as FeishuCardKitPublisherOptions, gl as ToolOperationResolutionResult, gn as ToolExecutionRequest, go as RivusDaemonShutdownControllerOptions, gr as PiSdkAgentLoopOptions, gs as FeishuMessageQueue, gt as CompactionService, gu as FeishuSessionReference, h as createConfiguredFeishuAutomationCardSender, ha as RivusDeploymentBackgroundSessionStatus, hc as AgentDomainEventSinkCallback, hd as PresentationStep, hi as FeishuCardKitPublisher, hl as ToolOperationRecoveryItem, hn as ToolBrokerOptions, ho as RivusDaemonShutdownController, hr as PiCreateAgentSessionResult, hs as FeishuMessagePreparedControl, ht as createAutomationMandateStore, hu as FeishuConversationReference, i as createFeishuHumanInteractionPresenter, ia as RivusDeploymentBootstrapAdapters, ic as createDefaultAgentRuntimeFromTextCallback, id as FeishuCardDeliveryReconcilerOptions, ii as FeishuCardTargetRegistry, il as FeishuInboxDelivery, in as FeishuPresentationPreparationOptions, io as createBackgroundSession, ir as RunPresentationProjector, is as createFeishuMessageWorker, it as createDeliveryOutbox, iu as createAgentCommandFromFeishuMessage, j as CreateRivusDeploymentDaemonOptions, ja as RivusAutomationDeployment, jc as SessionSchedulerOptions, ji as JsonlAgentEventLogOptions, jl as FeishuAgentExecutionResult, jn as FeishuCoalescingPublisher, jo as FeishuCardRolloverHandoffResult, jr as ConfiguredRivusDaemonBootstrap, js as RivusDaemonConfig, jt as createRivusMemoryTool, ju as HumanInteractionPresenter, k as CreateRivusDeploymentAutomationInput, ka as RivusAutomationDelivery, kc as SessionSchedulerCapacityExceeded, ki as AgentEventLogOperation, kl as FeishuAgentDaemonSteeredResult, kn as ConfiguredFeishuCardKitPublisherOptions, ko as FeishuCardRolloverEvent, kr as createLangfuseAgentTelemetry, ks as FeishuEndpointCredentials, kt as MemoryTombstoneReceipt, ku as HumanInteractionRepository, l as createFeishuHumanInteractionCard, lc as AgentClientSuccess, ld as FeishuStreamProjector, li as createJsonFileFeishuCardTargetRegistry, ll as FeishuInboxRepositoryStateOptions, ln as JsonlRecoveryControlOptions, lo as releaseBackgroundSessionLease, lr as PiAgentLoopOptions, ls as FeishuReceiveMessageReplayResult, lt as OpenJsonAutomationTickRepositoryOptions, lu as readFeishuMessageContent, m as FeishuAutomationCardSender, ma as RivusDeploymentBackgroundSessionReadinessError, mc as AgentDomainEventCallback, md as ModelPresentationStep, mi as FeishuCardKitPresentationUpdate, ml as RecoverySnapshot, mn as ToolBroker, mo as suspendBackgroundSession, mr as PiAgentSessionEvent, ms as FeishuMessageDrainResult, mt as createScheduledAutomation, mu as createFeishuSessionStore, n as createConfiguredFeishuHumanInteractionPresenter, na as RivusDaemonRecoveryRunner, nc as createDefaultAgentRuntime, nd as FeishuCardDeliveryLedgerStateOptions, ni as createFeishuCardRolloverSupervisor, nl as FeishuInboxCompletedState, nn as RivusEndpointInput, no as completeBackgroundSessionStep, nr as FeishuCardPresentationStoreOptions, ns as FeishuMessageWorkerOptions, nt as DeliveryOutbox, nu as FeishuPromptAgentCommand, o as FEISHU_AGENT_CARD_PROGRESS_ELEMENT_ID, oa as RivusDeploymentBootstrapFactory, oc as createUuidRunIds, od as createFeishuCardDeliveryLedger, oi as FeishuCardTargetRegistryStoreError, ol as FeishuInboxLeasedState, on as FeishuDeploymentEndpointOptions, oo as isBackgroundSessionDue, or as PiSessionRegistry, os as FeishuReceiveAcceptedObservation, ot as PluginStateStore, ou as FeishuMessageContentInput, p as FeishuAutomationCardInput, pa as RivusDeploymentBackgroundSessionLifecycle, pc as createAgentHarnessClient, pd as AssistantPresentationStep, pi as FeishuCardKitFinish, pl as RecoveryControl, pn as ToolApprovalService, po as resolveBackgroundSessionReconciliation, pr as PiAgentSession, ps as shouldAcceptFeishuEndpointMessage, pt as ScheduledAutomationOptions, pu as FeishuSessionStoreOptions, q as intersectToolIds, qa as WorkspaceInstructionSource, qc as AgentInstanceRecord, qi as createFeishuCardActionErrorResponse, ql as FeishuAgentCommand, qn as FeishuCotPublisherOptions, qo as RivusDaemonProcess, qr as createFeishuOpenApiClient, qs as DefaultAgentRuntimeOptions, qt as createBackgroundSessionRepository, qu as ToolApprovalBinding, r as FeishuHumanInteractionPresenterOptions, ra as runRivusDaemonCli, rc as createDefaultAgentRuntimeFromCallback, rd as FeishuCardDeliveryReconciler, ri as FeishuCardTargetNotFound, rl as FeishuInboxDeadState, rn as createRivusAgentHost, ro as completeBackgroundSessionStop, rr as createFeishuCardPresentationStore, rs as FeishuMessageWorkerQueue, rt as DeliveryOutboxError, ru as FeishuPromptMessageIntakeSummary, s as FeishuAgentRunCardInput, sa as RivusDeploymentCliProcess, sc as AgentClientAttempt, sd as createFeishuCardDeliveryReconciler, si as JsonFileFeishuCardTargetRegistryOptions, sl as FeishuInboxPendingState, sn as createFeishuDeploymentEndpoint, so as isBackgroundSessionLeaseExpired, sr as PiSessionRegistryOptions, ss as FeishuReceiveHandledObservation, st as createPluginStateStore, su as InvalidFeishuMessageContent, t as ConfiguredFeishuHumanInteractionPresenterOptions, ta as RivusDaemonPromptRunner, tc as createDefaultAgentHarnessFromTextCallback, td as FeishuCardDeliveryLedger, ti as FeishuCardRolloverSupervisorOptions, tl as createToolOperationLedger, tn as RivusEndpointDefinition, to as claimBackgroundSession, tr as FeishuCardPresentationNotFound, ts as FeishuMessageWorker, tt as commitAutomationOutcome, tu as FeishuNewSessionMessageIntakeSummary, u as JsonlHumanInteractionRepositoryOptions, ua as RivusDeploymentAutomationLifecycle, uc as AgentHarnessClient, ud as createFeishuStreamProjector, ui as FeishuCardKitCancel, ul as createFeishuInboxRepository, un as openJsonlRecoveryControl, uo as renewBackgroundSessionLease, ur as PiAgentSessionHandle, us as FeishuReceiveMessageSummary, ut as AutomationTickRepositoryCompatibility, uu as FeishuSessionEpochRecord, v as FeishuTextReplySender, va as RivusDeploymentDaemonStatus, vc as createAgentDomainEventSinkFromCallback, vd as ResponsePresentationStep, vi as FeishuCardTarget, vl as RecoveryAction, vn as WorkspaceInstructionsProvider, vo as RivusDaemonSignalSource, vr as OpenTelemetryAgentTelemetry, vs as createFeishuMessageQueue, vt as createCompactionService, vu as createFeishuConversationId, w as CreateConfiguredRivusDeploymentDaemonOptions, wa as ResolvedRivusAutomationDefinition, wc as JsonFetchRequestOptions, wd as PresentedValue, wi as FeishuWebSocketEventDispatcher, wl as FeishuAgentDaemonInteractionResult, wn as createSequenceRunIds, wo as RivusDaemonStatusReporter, wr as LangfuseAgentTelemetry, ws as OpenClawEnvImportResult, wt as createProjectMemoryPromptPreparer, wu as HumanInteractionClock, x as createHumanInteractionEndpointRegistry, xa as RivusDeploymentReadinessError, xc as createAgentHarness, xd as SkillPresentationStep, xi as FeishuWebSocketClientStartOptions, xl as FeishuAgentDaemonCancelResult, xn as resolveRivusProjectSpace, xo as RivusDaemonStatusHttpServerOptions, xr as TelemetryContentRedactor, xs as mergePiProviderBaseUrlOverride, xt as ProjectMemoryPromptInput, xu as HumanInteractionTransitionDenied, y as createConfiguredFeishuTextReplySender, ya as RivusDeploymentEndpointLifecycle, yc as createAgentRunUpdateHandler, yd as RunPresentation, yi as createFeishuCardKitPublisher, yl as createRecoveryAction, yn as createAgentsMdInstructionsProvider, yo as createRivusDaemonShutdownController, yr as createOpenTelemetryAgentEventSink, ys as FeishuMessageAcceptResult, yt as openJsonlAgentMemoryService, yu as createFeishuSessionKey, z as loadNodeRivusPluginModule, za as ProjectSkillCatalogDiagnostic, zc as PooledAgentRuntime, zi as FeishuEventHandlers, zl as FeishuAgentRunPreparation, zn as FeishuCardTargetCreateOptions, zo as CardPresentationChain, zr as createConfiguredFeishuCardRolloverRuntime, zs as DefaultAgentHarnessClientFromCallbackOptions, zt as BACKGROUND_SESSION_DELIVERY_JSONL_VERSION, zu as HumanInteractionBase } from "./chunks/index.js";
|
|
2
|
+
import { $ as AgentSessionSnapshot, $t as isTerminalAgentRunPhase, A as AgentHarnessBusy, At as createAgentLoopTurnStart, B as AgentHarnessBusyAvailability, Bt as createAgentConversationMessages, C as AssembledAgentContext, Cn as isAssistantThinkingDeltaEvent, Ct as createAgentLoopSkillExecutionEnd, D as createAgentDomainEventSink, Dt as createAgentLoopToolExecutionEnd, E as restoreAgentHistory, Et as createAgentLoopThinkingDelta, F as AgentDomainEventHandler, Ft as AgentConversationMessagesOptions, G as AgentRunUpdate, Gt as AgentRunSummary, H as AgentHarnessIdleAvailability, Ht as createAgentTranscriptTurn, I as AgentDomainEventListener, It as AgentTranscript, J as AgentSessionAvailability, Jt as AgentRunPhase, K as AgentRunUpdateHandler, Kt as AgentSessionSummary, L as AgentDomainEventSink, Lt as AgentTranscriptMessage, M as AgentRunCancelled, Mt as AutomationAgentInvocationOrigin, N as ActiveAgentRun, Nt as FeishuAgentInvocationOrigin, O as AgentEventHandlerFailed, Ot as createAgentLoopToolExecutionStart, P as AgentClock, Pt as LocalCliAgentInvocationOrigin, Q as AgentSessionOwnedBusyAvailability, Qt as initialAgentRunState, R as AgentHarness, Rt as AgentTranscriptMessageRole, S as AgentContextLayerKind, Sn as isAssistantTextDeltaEvent, St as createAgentLoopModelExecutionStart, T as AgentHistoryEventLog, Tt as createAgentLoopTextDelta, U as AgentPromptResult, Ut as replayAgentTranscript, V as AgentHarnessError, Vt as createAgentTranscriptMessages, W as AgentRunSnapshot, Wt as AgentHistory, X as AgentSessionHandle, Xt as AgentSkillExecutionState, Y as AgentSessionBusyAvailability, Yt as AgentRunState, Z as AgentSessionOtherBusyAvailability, Zt as evolveAgentRun, _ as AgentModelInputObservation, _n as AssistantTextDelta, _t as AgentLoopToolExecutionStartOptions, a as AgentLoopInput, an as AgentRunAccepted, at as AgentLoopModelExecutionEndOptions, b as AgentContextInput, bn as TerminalAgentDomainEvent, bt as AgentLoopTurnStart, c as EventAgentLoopOptions, cn as AgentRunId, ct as AgentLoopSkillExecutionEnd, d as createAgentLoopFromCallback, dn as AgentToolExecutionEnded, dt as AgentLoopSkillExecutionStartOptions, en as AgentDomainEvent, et as PromptCommand, f as createAsyncIterableAgentLoop, fn as AgentToolExecutionEvent, ft as AgentLoopTextDelta, g as AgentModelContentObserver, gn as AgentTurnStarted, gt as AgentLoopToolExecutionStart, h as createTextAgentLoopFromCallback, hn as AgentTurnCompleted, ht as AgentLoopToolExecutionEndOptions, i as AgentLoopCallbackResult, in as AgentModelUsage, it as AgentLoopModelExecutionEnd, j as AgentLoopFailed, jt as AgentInvocationOrigin, k as AgentEventSinkFailed, kt as createAgentLoopToolExecutionUpdate, l as TextAgentLoopCallback, ln as AgentSkillExecutionEnded, lt as AgentLoopSkillExecutionEndOptions, m as createTextAgentLoop, mn as AgentToolExecutionUpdated, mt as AgentLoopToolExecutionEnd, n as AgentLoopCallback, nn as AgentModelExecutionEvent, nt as AgentLoopEvent, o as AgentSteeringChannel, on as AgentRunCompleted, ot as AgentLoopModelExecutionStart, p as createEventAgentLoop, pn as AgentToolExecutionStarted, pt as AgentLoopThinkingDelta, q as AgentRunUpdateListener, qt as replayAgentHistory, r as AgentLoopCallbackOutput, rn as AgentModelExecutionStarted, rt as AgentLoopEventLike, s as AsyncIterableAgentLoopOptions, sn as AgentRunFailed, st as AgentLoopModelExecutionStartOptions, t as AgentLoop, tn as AgentModelExecutionEnded, tt as RunIdGenerator, u as TextAgentLoopOptions, un as AgentSkillExecutionStarted, ut as AgentLoopSkillExecutionStart, v as AgentModelOutputObservation, vn as AssistantThinkingDelta, vt as AgentLoopToolExecutionUpdate, w as assembleAgentContext, wn as isTerminalAgentDomainEvent, wt as createAgentLoopSkillExecutionStart, x as AgentContextLayer, xn as isAgentToolExecutionEvent, xt as createAgentLoopModelExecutionEnd, y as AgentContextBudgetExceeded, yn as SessionKey, yt as AgentLoopToolExecutionUpdateOptions, z as AgentHarnessAvailability, zt as AgentTranscriptTurn } from "./chunks/agent-loop.js";
|
|
3
|
+
import { a as MemoryState, c as MEMORY_SCOPES, d as MemoryScope, f as createMemoryNamespace, g as CompactionSnapshot, h as CompactionInput, i as MemoryRecord, l as MemoryBinding, m as CompactionError, n as MemorySearchQuery, o as AgentMemoryAuthority, p as restrictMemoryScopesForAudience, r as AgentMemorySnapshot, s as AgentMemoryIdentity, t as AgentMemoryError, u as MemoryInvocationAudience } from "./chunks/api.js";
|
|
4
|
+
import { $ as RivusToolDescriptor, A as InvalidAutomationPresentation, B as CommittedAutomationOutcome, C as AUTOMATION_PRESENTATION_SCHEMA_VERSION, D as AutomationPresentationKind, E as AutomationPresentationItem, F as AutomationMandate, G as PutPluginState, H as DeliveryJob, I as AutomationMandateError, J as RivusAgentDeployment, K as RegisteredRivusAgentProfile, L as AutomationMandateStore, M as readAutomationPresentation, N as AutomationBinding, O as AutomationPresentationSection, P as AutomationDeliveryBinding, Q as RivusResolvedToolDescriptor, R as AutomationTick, S as AutomationTickStatus, T as AutomationPresentationInput, U as DeliveryJobStatus, W as PluginStateRecord, X as RegisteredRivusTool, Y as RivusAgentProfile, Z as RivusHostToolDescriptor, _ as AUTOMATION_SUPPRESSION_PREFIX, a as RivusPlugin, at as RivusToolInputRejected, b as ScheduledAutomationRunResult, c as RivusPluginManifest, ct as RivusSkillDescriptor, d as RivusAutomationInput, dt as RivusRuntimeToolGrantSet, et as RivusToolExecutionContext, f as RivusAutomationOutput, ft as RivusRuntimeToolId, g as createDailyAutomationSchedule, h as DailyAutomationSchedule, i as RegisteredRivusPlugin, it as RivusToolIdempotency, j as createAutomationPresentation, k as AutomationPresentationSource, l as RivusPluginRegistry, lt as RivusSkillGrantSet, m as RivusAutomationTickContext, n as InvalidRivusPlugin, nt as RivusToolFactoryContext, o as RivusPluginCatalog, ot as RivusToolRisk, p as RivusAutomationTemplate, pt as isRivusRuntimeToolId, q as ResolvedRivusAgentDefinition, r as RIVUS_PLUGIN_API_VERSION, rt as RivusToolGrantSet, s as RivusPluginCatalogSnapshot, st as RegisteredRivusSkill, t as createRivusPluginCatalog, tt as RivusToolExecutor, u as RegisteredRivusAutomation, ut as RIVUS_RUNTIME_TOOL_IDS, v as ScheduledAutomationDeliveryInput, w as AutomationPresentation, x as AutomationTickRecord, y as ScheduledAutomationRunInput, z as AutomationOutcome } from "./chunks/api2.js";
|
|
5
|
+
import { C as InvalidInvocationAuthority, S as requiresToolApproval, T as InvocationAuthorityRef, _ as ToolOperationInspectResult, b as ToolOperationRecord, c as InvalidToolInput, d as ToolInvocationDenied, f as AuthorizationPolicyState, g as ToolOperationBinding, h as ToolOperationBeginResult, l as normalizeStableJson, m as createInvocationAuthority, o as createToolInputDigest, p as ToolApprovalRequest, s as InvalidStableJson, v as ToolOperationReconciliation, w as InvocationAuthority, x as ToolOperationState, y as ToolOperationReconciliationOutcome } from "./chunks/pi-tool-proxy.js";
|
|
6
|
+
import { $ as BackgroundSessionPhase, A as BackgroundSessionRepository, B as backgroundSessionToolIds, C as BackgroundSessionDetail, D as progressDeliveryId, E as createBackgroundSessionService, F as BackgroundSessionDeliveryStore, G as BACKGROUND_SESSION_SESSION_KEY_PREFIX, H as extendBackgroundSessionDefinition, I as BACKGROUND_SESSION_START_TOOL_ID, J as BackgroundSessionAuthority, K as createBackgroundSessionKey, L as BACKGROUND_SESSION_TOOL_IDS, M as BackgroundSessionRepositoryCorrupted, N as BackgroundSessionDeliveryConflict, O as sessionIdFromSessionKey, P as BackgroundSessionDeliveryRecord, Q as BackgroundSessionOrigin, R as BACKGROUND_SESSION_TOOL_PLUGIN_ID, S as BackgroundSessionCallerDenied, T as BackgroundSessionSummary, U as isBackgroundSessionToolId, V as createBackgroundSessionToolContracts, W as narrowBackgroundSessionDefinition, X as BackgroundSessionId, Y as BackgroundSessionCancellation, Z as BackgroundSessionLease, a as createBackgroundSessionSupervisor, c as DEFAULT_BACKGROUND_SESSION_LIFETIME_MS, d as DEFAULT_BACKGROUND_SESSION_RETRY_BACKOFF_MS, et as BackgroundSessionState, f as DEFAULT_BACKGROUND_SESSION_STEP_TIMEOUT_MS, i as BackgroundSessionSupervisorStatus, j as BackgroundSessionRepositoryConflict, k as terminalDeliveryId, l as DEFAULT_BACKGROUND_SESSION_MAX_CONCURRENT_SESSIONS, m as resolveBackgroundSessionSupervisorIntervalMs, n as BackgroundSessionSupervisor, nt as BackgroundSessionTransitionDenied, o as DEFAULT_BACKGROUND_SESSION_LEASE_MS, p as DEFAULT_BACKGROUND_SESSION_SUPERVISOR_INTERVAL_MS, q as createBackgroundSessionStepSourceMessageId, r as BackgroundSessionSupervisorOptions, rt as isBackgroundSessionTerminalPhase, s as DEFAULT_BACKGROUND_SESSION_LEASE_RENEWAL_INTERVAL_MS, t as BackgroundSessionLimits, tt as BackgroundSessionTerminalResult, u as DEFAULT_BACKGROUND_SESSION_MAX_CONSECUTIVE_FAILURES, w as BackgroundSessionService, z as BACKGROUND_SESSION_TOOL_VERSION } from "./chunks/api3.js";
|
|
7
|
+
import { a as assertRivusPluginConforms, i as RivusPluginLifecycleProbe, n as RivusPluginConformanceInput, o as createFakeRivusPlugin, r as RivusPluginConformanceReport, t as RivusPluginConformanceError } from "./chunks/rivus-plugin-testkit.js";
|
|
8
|
+
export { AUTOMATION_PRESENTATION_SCHEMA_VERSION, AUTOMATION_SUPPRESSION_PREFIX, 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 AgentLoopTurnStart, 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 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 AssistantPresentationStep, type AssistantTextDelta, type AssistantThinkingDelta, type AsyncIterableAgentLoopOptions, type AuthorizationPolicyProvider, type AuthorizationPolicyState, type AutomationAgentInvocationOrigin, type AutomationBinding, type AutomationDeliveryBinding, type AutomationMandate, AutomationMandateError, type AutomationMandateStore, type AutomationOutcome, type AutomationPresentation, type AutomationPresentationInput, type AutomationPresentationItem, type AutomationPresentationKind, type AutomationPresentationSection, type AutomationPresentationSource, type AutomationTick, type AutomationTickRecord, type AutomationTickRepositoryCompatibility as 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 ConversationProgressDisplay, 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, DEFAULT_CONVERSATION_PROGRESS_DISPLAY, 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, FEISHU_AGENT_CARD_ELEMENT_ID, FEISHU_AGENT_CARD_PROGRESS_ELEMENT_ID, 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 FeishuAgentPreparedControl, 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 FeishuCardKitOpenApiClientOptions, type FeishuCardKitOpenApiTargetCreatorOptions, type FeishuCardKitPresentationUpdate, 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 FeishuMessagePreparedControl, 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, InvalidAutomationPresentation, 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, type MergePiProviderBaseUrlOverrideOptions, type ModelPresentationStep, 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 PresentationStep, type PresentationStepStatus, type PresentedValue, type PresentedValueOptions, 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, RIVUS_RUNTIME_TOOL_IDS, RUN_PRESENTATION_SCHEMA_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 ResponsePresentationStep, type RivusAgentDeployment, type RivusAgentDeploymentStatus, type RivusAgentHost, type RivusAgentHostOptions, type RivusAgentProfile, type RivusAutomationDelivery, type RivusAutomationDeliveryTargetType, type RivusAutomationDeployment, type RivusAutomationInput, type RivusAutomationOutput, 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, RivusDeploymentBackgroundSessionReadinessError, 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 RivusRuntimeToolGrantSet, type RivusRuntimeToolId, 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 RunPresentation, type RunPresentationPhase, type RunPresentationProjector, 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 SkillPresentationStep, 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, type ToolPresentationStep, 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, createAgentLoopTurnStart, createAgentMemoryService, createAgentRunUpdateHandler, createAgentRuntime, createAgentRuntimePool, createAgentTranscriptMessages, createAgentTranscriptTurn, createAgentsMdInstructionsProvider, createAsyncIterableAgentLoop, createAutomationMandateStore, createAutomationPresentation, 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, createPresentedValue, createProjectMemoryPromptPreparer, createRateLimitedFeishuPublisher, createRecoveryAction, createRecoveryControl, createRivusAgentHost, createRivusDaemonProcess, createRivusDaemonShutdownController, createRivusDaemonStatusHttpServer, createRivusDaemonStatusReporter, createRivusDeploymentCliProcess, createRivusDeploymentDaemon, createRivusEnvFromOpenClawConfig, createRivusMemoryTool, createRivusMemoryToolContract, createRivusMemoryToolDescriptor, createRivusPluginCatalog, createRoutedHumanInteractionToolApprovalService, createRunPresentationProjector, createScheduledAutomation, createSequenceRunIds, createSessionScheduler, createSubagentCoordinator, createSystemClock, createTelemetryContentRedactor, createTestClock, createTextAgentLoop, createTextAgentLoopFromCallback, createToolBroker, createToolInputDigest, createToolOperationLedger, createUuidRunIds, createWorkspaceRootHandle, describeFeishuMessageIntake, evolveAgentRun, extendBackgroundSessionDefinition, failBackgroundSessionStep, formatRivusEnvFile, hasInspectableRunProgress, initialAgentRunState, intersectToolIds, isAgentToolExecutionEvent, isAssistantTextDeltaEvent, isAssistantThinkingDeltaEvent, isBackgroundSessionDue, isBackgroundSessionLeaseExpired, isBackgroundSessionState, isBackgroundSessionTerminalPhase, isBackgroundSessionToolId, isCardPresentationHandoffDue, isRivusRuntimeToolId, isTerminalAgentDomainEvent, isTerminalAgentRunPhase, loadNodeRivusPluginModule, loadRivusDaemonConfig, loadRivusDeployment, loadRivusDeploymentManifest, mergePiProviderBaseUrlOverride, narrowBackgroundSessionDefinition, normalizeStableJson, openJsonAutomationTickRepository, openJsonFeishuSessionStore, openJsonlAgentMemoryService, openJsonlBackgroundSessionDeliveryStore, openJsonlBackgroundSessionRepository, openJsonlFeishuCardDeliveryLedger, openJsonlFeishuInboxRepository, openJsonlRecoveryControl, openJsonlToolOperationLedger, parkBackgroundSessionForReconciliation, progressDeliveryId, readAutomationPresentation, 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 };
|