@rivus/agent 0.13.2 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -18
- 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 +596 -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 +604 -95
- 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 +45 -54
- package/examples/pi-feishu.bootstrap.ts +53 -37
- package/examples/rivus-starter.plugin.mjs +3 -1
- package/package.json +12 -14
- 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
|
@@ -1,66 +1,37 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as MemoryScope, o as AgentMemoryAuthority } from "./api.js";
|
|
2
|
+
import { Effect } from "effect";
|
|
2
3
|
|
|
3
|
-
//#region src/domain/
|
|
4
|
-
declare const
|
|
5
|
-
type
|
|
6
|
-
interface
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
}
|
|
10
|
-
interface AutomationPresentationItem {
|
|
11
|
-
readonly headline: string;
|
|
12
|
-
readonly note?: string;
|
|
13
|
-
readonly sources: ReadonlyArray<AutomationPresentationSource>;
|
|
4
|
+
//#region src/modules/agent-catalog/domain/runtime-tool/rivus-runtime-tool.d.ts
|
|
5
|
+
declare const RIVUS_RUNTIME_TOOL_IDS: readonly ["read", "bash", "edit", "write", "grep", "find", "ls"];
|
|
6
|
+
type RivusRuntimeToolId = (typeof RIVUS_RUNTIME_TOOL_IDS)[number];
|
|
7
|
+
interface RivusRuntimeToolGrantSet {
|
|
8
|
+
readonly revision: string;
|
|
9
|
+
readonly toolIds: ReadonlyArray<RivusRuntimeToolId>;
|
|
14
10
|
}
|
|
15
|
-
|
|
11
|
+
declare function isRivusRuntimeToolId(value: string): value is RivusRuntimeToolId;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/modules/agent-catalog/domain/skill/rivus-skill.d.ts
|
|
14
|
+
interface RivusSkillDescriptor {
|
|
16
15
|
readonly id: string;
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
}
|
|
20
|
-
interface AutomationPresentation {
|
|
21
|
-
readonly footnote?: string;
|
|
22
|
-
readonly kind?: AutomationPresentationKind;
|
|
23
|
-
readonly meta: ReadonlyArray<string>;
|
|
24
|
-
readonly schemaVersion: typeof AUTOMATION_PRESENTATION_SCHEMA_VERSION;
|
|
25
|
-
readonly sections: ReadonlyArray<AutomationPresentationSection>;
|
|
26
|
-
readonly summary?: string;
|
|
16
|
+
readonly version: string;
|
|
17
|
+
readonly digest: string;
|
|
27
18
|
readonly title: string;
|
|
19
|
+
readonly content: string;
|
|
28
20
|
}
|
|
29
|
-
interface
|
|
30
|
-
readonly
|
|
31
|
-
readonly kind?: AutomationPresentationKind;
|
|
32
|
-
readonly meta?: ReadonlyArray<string>;
|
|
33
|
-
readonly sections: ReadonlyArray<{
|
|
34
|
-
readonly id: string;
|
|
35
|
-
readonly items: ReadonlyArray<{
|
|
36
|
-
readonly headline: string;
|
|
37
|
-
readonly note?: string;
|
|
38
|
-
readonly sources?: ReadonlyArray<AutomationPresentationSource>;
|
|
39
|
-
}>;
|
|
40
|
-
readonly title: string;
|
|
41
|
-
}>;
|
|
42
|
-
readonly summary?: string;
|
|
43
|
-
readonly title: string;
|
|
21
|
+
interface RegisteredRivusSkill extends RivusSkillDescriptor {
|
|
22
|
+
readonly pluginId: string;
|
|
44
23
|
}
|
|
45
|
-
|
|
46
|
-
readonly
|
|
24
|
+
interface RivusSkillGrantSet {
|
|
25
|
+
readonly skillIds: ReadonlyArray<string>;
|
|
26
|
+
readonly revision: string;
|
|
47
27
|
}
|
|
48
|
-
declare function createAutomationPresentation(input: AutomationPresentationInput): AutomationPresentation;
|
|
49
|
-
declare function readAutomationPresentation(value: unknown): AutomationPresentation;
|
|
50
28
|
//#endregion
|
|
51
|
-
//#region src/domain/rivus-
|
|
52
|
-
declare const RIVUS_PLUGIN_API_VERSION = "1";
|
|
29
|
+
//#region src/modules/agent-catalog/domain/tool/rivus-tool.d.ts
|
|
53
30
|
type RivusToolRisk = "observe" | "mutate" | "irreversible" | "host-control";
|
|
54
31
|
type RivusToolIdempotency = "none" | "supported" | "required";
|
|
55
|
-
declare function requiresToolApproval(risk: RivusToolRisk): boolean;
|
|
56
32
|
declare class RivusToolInputRejected extends Error {
|
|
57
33
|
readonly name: string;
|
|
58
34
|
}
|
|
59
|
-
interface RivusPluginManifest {
|
|
60
|
-
readonly apiVersion: string;
|
|
61
|
-
readonly id: string;
|
|
62
|
-
readonly version: string;
|
|
63
|
-
}
|
|
64
35
|
interface RivusToolExecutor {
|
|
65
36
|
execute(input: unknown, context: RivusToolExecutionContext): unknown;
|
|
66
37
|
}
|
|
@@ -101,31 +72,25 @@ interface RivusToolDescriptor {
|
|
|
101
72
|
interface RivusHostToolDescriptor extends RivusToolDescriptor {
|
|
102
73
|
readonly replayCompleted?: (input: unknown, completedResult: unknown, context: RivusToolExecutionContext) => unknown;
|
|
103
74
|
}
|
|
104
|
-
interface
|
|
75
|
+
interface RegisteredRivusTool extends RivusToolDescriptor {
|
|
76
|
+
readonly pluginId: string;
|
|
77
|
+
}
|
|
78
|
+
interface RivusResolvedToolDescriptor {
|
|
105
79
|
readonly id: string;
|
|
106
80
|
readonly version: string;
|
|
107
81
|
readonly digest: string;
|
|
108
|
-
readonly
|
|
109
|
-
readonly
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
readonly
|
|
113
|
-
readonly profileId: string;
|
|
114
|
-
readonly requestedSkillIds: ReadonlyArray<string>;
|
|
115
|
-
readonly requestedToolIds: ReadonlyArray<string>;
|
|
116
|
-
readonly createInput: (tick: RivusAutomationTickContext) => RivusAutomationInput;
|
|
117
|
-
readonly createPresentation?: (output: RivusAutomationOutput) => AutomationPresentation;
|
|
118
|
-
}
|
|
119
|
-
interface RivusAutomationTickContext {
|
|
120
|
-
readonly occurrence: string;
|
|
121
|
-
}
|
|
122
|
-
interface RivusAutomationInput {
|
|
123
|
-
readonly text: string;
|
|
82
|
+
readonly description: string;
|
|
83
|
+
readonly inputSchema: unknown;
|
|
84
|
+
readonly risk: RivusToolRisk;
|
|
85
|
+
readonly idempotency: RivusToolIdempotency;
|
|
86
|
+
readonly pluginId: string;
|
|
124
87
|
}
|
|
125
|
-
interface
|
|
126
|
-
readonly
|
|
127
|
-
readonly
|
|
88
|
+
interface RivusToolGrantSet {
|
|
89
|
+
readonly toolIds: ReadonlyArray<string>;
|
|
90
|
+
readonly revision: string;
|
|
128
91
|
}
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/modules/agent-catalog/domain/agent/rivus-agent-definition.d.ts
|
|
129
94
|
interface RivusAgentProfile {
|
|
130
95
|
readonly id: string;
|
|
131
96
|
readonly displayName: string;
|
|
@@ -140,41 +105,13 @@ interface RivusAgentProfile {
|
|
|
140
105
|
readonly memory: {
|
|
141
106
|
readonly scopes: ReadonlyArray<MemoryScope>;
|
|
142
107
|
};
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
registerTool(tool: RivusToolDescriptor): void;
|
|
147
|
-
registerSkill(skill: RivusSkillDescriptor): void;
|
|
148
|
-
registerAutomation(template: RivusAutomationTemplate): void;
|
|
149
|
-
}
|
|
150
|
-
interface RivusPlugin {
|
|
151
|
-
readonly manifest: RivusPluginManifest;
|
|
152
|
-
register(registry: RivusPluginRegistry): void;
|
|
153
|
-
}
|
|
154
|
-
interface RegisteredRivusPlugin extends RivusPluginManifest {}
|
|
155
|
-
interface RegisteredRivusTool extends RivusToolDescriptor {
|
|
156
|
-
readonly pluginId: string;
|
|
157
|
-
}
|
|
158
|
-
interface RegisteredRivusSkill extends RivusSkillDescriptor {
|
|
159
|
-
readonly pluginId: string;
|
|
160
|
-
}
|
|
161
|
-
interface RegisteredRivusAutomation extends RivusAutomationTemplate {
|
|
162
|
-
readonly pluginId: string;
|
|
108
|
+
readonly runtimeTools?: {
|
|
109
|
+
readonly allow: ReadonlyArray<RivusRuntimeToolId>;
|
|
110
|
+
};
|
|
163
111
|
}
|
|
164
112
|
interface RegisteredRivusAgentProfile extends RivusAgentProfile {
|
|
165
113
|
readonly pluginId: string;
|
|
166
114
|
}
|
|
167
|
-
interface RivusPluginCatalogSnapshot {
|
|
168
|
-
readonly plugins: ReadonlyArray<RegisteredRivusPlugin>;
|
|
169
|
-
readonly profiles: ReadonlyArray<RegisteredRivusAgentProfile>;
|
|
170
|
-
readonly tools: ReadonlyArray<RegisteredRivusTool>;
|
|
171
|
-
readonly skills: ReadonlyArray<RegisteredRivusSkill>;
|
|
172
|
-
readonly automations: ReadonlyArray<RegisteredRivusAutomation>;
|
|
173
|
-
}
|
|
174
|
-
interface RivusPluginCatalog {
|
|
175
|
-
registerPlugin(plugin: RivusPlugin): void;
|
|
176
|
-
snapshot(): RivusPluginCatalogSnapshot;
|
|
177
|
-
}
|
|
178
115
|
interface RivusAgentDeployment {
|
|
179
116
|
readonly agentId: string;
|
|
180
117
|
readonly pluginId: string;
|
|
@@ -185,6 +122,9 @@ interface RivusAgentDeployment {
|
|
|
185
122
|
readonly scopes: ReadonlyArray<MemoryScope>;
|
|
186
123
|
readonly tool: boolean;
|
|
187
124
|
};
|
|
125
|
+
readonly runtimeTools?: {
|
|
126
|
+
readonly allow: ReadonlyArray<RivusRuntimeToolId>;
|
|
127
|
+
};
|
|
188
128
|
readonly skills: {
|
|
189
129
|
readonly allow: ReadonlyArray<string>;
|
|
190
130
|
};
|
|
@@ -192,24 +132,6 @@ interface RivusAgentDeployment {
|
|
|
192
132
|
readonly allow: ReadonlyArray<string>;
|
|
193
133
|
};
|
|
194
134
|
}
|
|
195
|
-
interface RivusResolvedToolDescriptor {
|
|
196
|
-
readonly id: string;
|
|
197
|
-
readonly version: string;
|
|
198
|
-
readonly digest: string;
|
|
199
|
-
readonly description: string;
|
|
200
|
-
readonly inputSchema: unknown;
|
|
201
|
-
readonly risk: RivusToolRisk;
|
|
202
|
-
readonly idempotency: RivusToolIdempotency;
|
|
203
|
-
readonly pluginId: string;
|
|
204
|
-
}
|
|
205
|
-
interface RivusToolGrantSet {
|
|
206
|
-
readonly toolIds: ReadonlyArray<string>;
|
|
207
|
-
readonly revision: string;
|
|
208
|
-
}
|
|
209
|
-
interface RivusSkillGrantSet {
|
|
210
|
-
readonly skillIds: ReadonlyArray<string>;
|
|
211
|
-
readonly revision: string;
|
|
212
|
-
}
|
|
213
135
|
interface ResolvedRivusAgentDefinition {
|
|
214
136
|
readonly agentId: string;
|
|
215
137
|
readonly pluginId: string;
|
|
@@ -224,13 +146,242 @@ interface ResolvedRivusAgentDefinition {
|
|
|
224
146
|
readonly scopes: ReadonlyArray<MemoryScope>;
|
|
225
147
|
readonly tool: boolean;
|
|
226
148
|
};
|
|
149
|
+
readonly runtimeToolGrantSet: RivusRuntimeToolGrantSet;
|
|
227
150
|
readonly skillGrantSet: RivusSkillGrantSet;
|
|
228
151
|
readonly skills: ReadonlyArray<RegisteredRivusSkill>;
|
|
229
152
|
readonly tools: ReadonlyArray<RivusResolvedToolDescriptor>;
|
|
230
153
|
readonly toolGrantSet: RivusToolGrantSet;
|
|
231
154
|
}
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/modules/automation/application/outcome/automation-outcome.d.ts
|
|
157
|
+
type AutomationOutcome = {
|
|
158
|
+
readonly kind: "suppressed";
|
|
159
|
+
} | {
|
|
160
|
+
readonly kind: "report" | "alert";
|
|
161
|
+
readonly body: string;
|
|
162
|
+
readonly target: string;
|
|
163
|
+
};
|
|
164
|
+
interface PluginStateRecord {
|
|
165
|
+
readonly pluginId: string;
|
|
166
|
+
readonly agentId: string;
|
|
167
|
+
readonly key: string;
|
|
168
|
+
readonly value: unknown;
|
|
169
|
+
readonly revision: number;
|
|
170
|
+
}
|
|
171
|
+
interface PutPluginState {
|
|
172
|
+
readonly pluginId: string;
|
|
173
|
+
readonly agentId: string;
|
|
174
|
+
readonly key: string;
|
|
175
|
+
readonly value: unknown;
|
|
176
|
+
readonly expectedRevision: number;
|
|
177
|
+
}
|
|
178
|
+
type DeliveryJobStatus = "pending" | "delivered" | "reconciliation-required";
|
|
179
|
+
interface DeliveryJob {
|
|
180
|
+
readonly id: string;
|
|
181
|
+
readonly tickId: string;
|
|
182
|
+
readonly kind: "report" | "alert";
|
|
183
|
+
readonly body: string;
|
|
184
|
+
readonly target: string;
|
|
185
|
+
readonly status: DeliveryJobStatus;
|
|
186
|
+
readonly receiptId?: string;
|
|
187
|
+
}
|
|
188
|
+
type DeliveryAttemptResult = {
|
|
189
|
+
readonly kind: "delivered";
|
|
190
|
+
readonly providerMessageId: string;
|
|
191
|
+
} | {
|
|
192
|
+
readonly kind: "uncertain";
|
|
193
|
+
};
|
|
194
|
+
interface CommittedAutomationOutcome {
|
|
195
|
+
readonly state: PluginStateRecord;
|
|
196
|
+
readonly job?: DeliveryJob;
|
|
197
|
+
}
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region src/modules/automation/domain/mandate/automation-mandate.d.ts
|
|
200
|
+
interface AutomationBinding {
|
|
201
|
+
readonly agentId: string;
|
|
202
|
+
readonly bindingId: string;
|
|
203
|
+
readonly delivery: AutomationDeliveryBinding;
|
|
204
|
+
readonly schedule: string;
|
|
205
|
+
readonly servicePrincipalId: string;
|
|
206
|
+
readonly skillGrantRevision: string;
|
|
207
|
+
readonly skillIds: ReadonlyArray<string>;
|
|
208
|
+
readonly templateId: string;
|
|
209
|
+
readonly timeZone: string;
|
|
210
|
+
readonly toolIds: ReadonlyArray<string>;
|
|
211
|
+
}
|
|
212
|
+
interface AutomationDeliveryBinding {
|
|
213
|
+
readonly endpointId: string;
|
|
214
|
+
readonly targetKey: string;
|
|
215
|
+
readonly targetType: "chat_id" | "open_id" | "user_id" | "union_id" | "email";
|
|
216
|
+
}
|
|
217
|
+
interface AutomationMandate extends AutomationBinding {
|
|
218
|
+
readonly id: string;
|
|
219
|
+
readonly active: boolean;
|
|
220
|
+
}
|
|
221
|
+
interface AutomationTick {
|
|
222
|
+
readonly tickId: string;
|
|
223
|
+
readonly mandateId: string;
|
|
224
|
+
readonly occurrence: string;
|
|
225
|
+
readonly claimedBy: string;
|
|
226
|
+
}
|
|
227
|
+
interface AutomationMandateStore {
|
|
228
|
+
activate(binding: AutomationBinding): AutomationMandate;
|
|
229
|
+
revoke(id: string): void;
|
|
230
|
+
claim(id: string, occurrence: string, workerId: string): AutomationTick;
|
|
231
|
+
}
|
|
232
|
+
declare class AutomationMandateError extends Error {
|
|
233
|
+
readonly name = "AutomationMandateError";
|
|
234
|
+
}
|
|
235
|
+
//#endregion
|
|
236
|
+
//#region src/modules/automation/domain/presentation/automation-presentation.d.ts
|
|
237
|
+
declare const AUTOMATION_PRESENTATION_SCHEMA_VERSION: 1;
|
|
238
|
+
type AutomationPresentationKind = "daily-ai" | "generic" | "industry" | "news" | "subscriptions";
|
|
239
|
+
interface AutomationPresentationSource {
|
|
240
|
+
readonly label: string;
|
|
241
|
+
readonly url: string;
|
|
242
|
+
}
|
|
243
|
+
interface AutomationPresentationItem {
|
|
244
|
+
readonly headline: string;
|
|
245
|
+
readonly note?: string;
|
|
246
|
+
readonly sources: ReadonlyArray<AutomationPresentationSource>;
|
|
247
|
+
}
|
|
248
|
+
interface AutomationPresentationSection {
|
|
249
|
+
readonly id: string;
|
|
250
|
+
readonly items: ReadonlyArray<AutomationPresentationItem>;
|
|
251
|
+
readonly title: string;
|
|
252
|
+
}
|
|
253
|
+
interface AutomationPresentation {
|
|
254
|
+
readonly footnote?: string;
|
|
255
|
+
readonly kind?: AutomationPresentationKind;
|
|
256
|
+
readonly meta: ReadonlyArray<string>;
|
|
257
|
+
readonly schemaVersion: typeof AUTOMATION_PRESENTATION_SCHEMA_VERSION;
|
|
258
|
+
readonly sections: ReadonlyArray<AutomationPresentationSection>;
|
|
259
|
+
readonly summary?: string;
|
|
260
|
+
readonly title: string;
|
|
261
|
+
}
|
|
262
|
+
interface AutomationPresentationInput {
|
|
263
|
+
readonly footnote?: string;
|
|
264
|
+
readonly kind?: AutomationPresentationKind;
|
|
265
|
+
readonly meta?: ReadonlyArray<string>;
|
|
266
|
+
readonly sections: ReadonlyArray<{
|
|
267
|
+
readonly id: string;
|
|
268
|
+
readonly items: ReadonlyArray<{
|
|
269
|
+
readonly headline: string;
|
|
270
|
+
readonly note?: string;
|
|
271
|
+
readonly sources?: ReadonlyArray<AutomationPresentationSource>;
|
|
272
|
+
}>;
|
|
273
|
+
readonly title: string;
|
|
274
|
+
}>;
|
|
275
|
+
readonly summary?: string;
|
|
276
|
+
readonly title: string;
|
|
277
|
+
}
|
|
278
|
+
declare class InvalidAutomationPresentation extends Error {
|
|
279
|
+
readonly name = "InvalidAutomationPresentation";
|
|
280
|
+
}
|
|
281
|
+
declare function createAutomationPresentation(input: AutomationPresentationInput): AutomationPresentation;
|
|
282
|
+
declare function readAutomationPresentation(value: unknown): AutomationPresentation;
|
|
283
|
+
//#endregion
|
|
284
|
+
//#region src/modules/automation/domain/tick/automation-tick.d.ts
|
|
285
|
+
type AutomationTickStatus = "running" | "failed" | "generated" | "suppressed" | "delivered";
|
|
286
|
+
interface AutomationTickRecord {
|
|
287
|
+
readonly automationId: string;
|
|
288
|
+
readonly body?: string;
|
|
289
|
+
readonly error?: string;
|
|
290
|
+
readonly occurrence: string;
|
|
291
|
+
readonly mandateId: string;
|
|
292
|
+
readonly providerMessageId?: string;
|
|
293
|
+
readonly presentation?: AutomationPresentation;
|
|
294
|
+
readonly revision: number;
|
|
295
|
+
readonly runId?: string;
|
|
296
|
+
readonly suppressionReason?: string;
|
|
297
|
+
readonly status: AutomationTickStatus;
|
|
298
|
+
readonly tickId: string;
|
|
299
|
+
}
|
|
300
|
+
//#endregion
|
|
301
|
+
//#region src/modules/automation/application/scheduling/automation-scheduler.d.ts
|
|
302
|
+
declare const AUTOMATION_SUPPRESSION_PREFIX = "RIVUS_AUTOMATION_SUPPRESSED:";
|
|
303
|
+
interface ScheduledAutomationRunInput {
|
|
304
|
+
readonly occurrence: string;
|
|
305
|
+
readonly sessionKey: string;
|
|
306
|
+
readonly text: string;
|
|
307
|
+
readonly tickId: string;
|
|
308
|
+
}
|
|
309
|
+
interface ScheduledAutomationRunResult {
|
|
310
|
+
readonly body?: string;
|
|
311
|
+
readonly presentation?: AutomationPresentation;
|
|
312
|
+
readonly runId: string;
|
|
313
|
+
readonly suppressedReason?: string;
|
|
314
|
+
}
|
|
315
|
+
interface ScheduledAutomationDeliveryInput {
|
|
316
|
+
readonly body: string;
|
|
317
|
+
readonly idempotencyKey: string;
|
|
318
|
+
readonly presentation?: AutomationPresentation;
|
|
319
|
+
}
|
|
320
|
+
//#endregion
|
|
321
|
+
//#region src/modules/automation/domain/schedule/daily-automation-schedule.d.ts
|
|
322
|
+
interface DailyAutomationSchedule {
|
|
323
|
+
currentOccurrence(now: Date): string | undefined;
|
|
324
|
+
nextOccurrence(now: Date): Date;
|
|
325
|
+
}
|
|
326
|
+
declare function createDailyAutomationSchedule(expression: string, timeZone: string, now?: Date): DailyAutomationSchedule;
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region src/modules/agent-catalog/domain/automation/rivus-automation-template.d.ts
|
|
329
|
+
interface RivusAutomationTemplate {
|
|
330
|
+
readonly id: string;
|
|
331
|
+
readonly profileId: string;
|
|
332
|
+
readonly requestedSkillIds: ReadonlyArray<string>;
|
|
333
|
+
readonly requestedToolIds: ReadonlyArray<string>;
|
|
334
|
+
readonly createInput: (tick: RivusAutomationTickContext) => RivusAutomationInput;
|
|
335
|
+
readonly createPresentation?: (output: RivusAutomationOutput) => AutomationPresentation;
|
|
336
|
+
}
|
|
337
|
+
interface RivusAutomationTickContext {
|
|
338
|
+
readonly occurrence: string;
|
|
339
|
+
}
|
|
340
|
+
interface RivusAutomationInput {
|
|
341
|
+
readonly text: string;
|
|
342
|
+
}
|
|
343
|
+
interface RivusAutomationOutput {
|
|
344
|
+
readonly occurrence: string;
|
|
345
|
+
readonly text: string;
|
|
346
|
+
}
|
|
347
|
+
interface RegisteredRivusAutomation extends RivusAutomationTemplate {
|
|
348
|
+
readonly pluginId: string;
|
|
349
|
+
}
|
|
350
|
+
//#endregion
|
|
351
|
+
//#region src/modules/agent-catalog/domain/plugin/rivus-plugin.d.ts
|
|
352
|
+
declare const RIVUS_PLUGIN_API_VERSION = "1";
|
|
353
|
+
interface RivusPluginManifest {
|
|
354
|
+
readonly apiVersion: string;
|
|
355
|
+
readonly id: string;
|
|
356
|
+
readonly version: string;
|
|
357
|
+
}
|
|
358
|
+
interface RivusPluginRegistry {
|
|
359
|
+
registerAgentProfile(profile: RivusAgentProfile): void;
|
|
360
|
+
registerTool(tool: RivusToolDescriptor): void;
|
|
361
|
+
registerSkill(skill: RivusSkillDescriptor): void;
|
|
362
|
+
registerAutomation(template: RivusAutomationTemplate): void;
|
|
363
|
+
}
|
|
364
|
+
interface RivusPlugin {
|
|
365
|
+
readonly manifest: RivusPluginManifest;
|
|
366
|
+
register(registry: RivusPluginRegistry): void;
|
|
367
|
+
}
|
|
368
|
+
interface RegisteredRivusPlugin extends RivusPluginManifest {}
|
|
369
|
+
interface RivusPluginCatalogSnapshot {
|
|
370
|
+
readonly plugins: ReadonlyArray<RegisteredRivusPlugin>;
|
|
371
|
+
readonly profiles: ReadonlyArray<RegisteredRivusAgentProfile>;
|
|
372
|
+
readonly tools: ReadonlyArray<RegisteredRivusTool>;
|
|
373
|
+
readonly skills: ReadonlyArray<RegisteredRivusSkill>;
|
|
374
|
+
readonly automations: ReadonlyArray<RegisteredRivusAutomation>;
|
|
375
|
+
}
|
|
376
|
+
interface RivusPluginCatalog {
|
|
377
|
+
registerPlugin(plugin: RivusPlugin): void;
|
|
378
|
+
snapshot(): RivusPluginCatalogSnapshot;
|
|
379
|
+
}
|
|
232
380
|
declare class InvalidRivusPlugin extends Error {
|
|
233
381
|
readonly name = "InvalidRivusPlugin";
|
|
234
382
|
}
|
|
235
383
|
//#endregion
|
|
236
|
-
|
|
384
|
+
//#region src/modules/agent-catalog/application/catalog/rivus-plugin-catalog.d.ts
|
|
385
|
+
declare function createRivusPluginCatalog(): RivusPluginCatalog;
|
|
386
|
+
//#endregion
|
|
387
|
+
export { RivusToolDescriptor as $, InvalidAutomationPresentation as A, CommittedAutomationOutcome as B, AUTOMATION_PRESENTATION_SCHEMA_VERSION as C, AutomationPresentationKind as D, AutomationPresentationItem as E, AutomationMandate as F, PutPluginState as G, DeliveryJob as H, AutomationMandateError as I, RivusAgentDeployment as J, RegisteredRivusAgentProfile as K, AutomationMandateStore as L, readAutomationPresentation as M, AutomationBinding as N, AutomationPresentationSection as O, AutomationDeliveryBinding as P, RivusResolvedToolDescriptor as Q, AutomationTick as R, AutomationTickStatus as S, AutomationPresentationInput as T, DeliveryJobStatus as U, DeliveryAttemptResult as V, PluginStateRecord as W, RegisteredRivusTool as X, RivusAgentProfile as Y, RivusHostToolDescriptor as Z, AUTOMATION_SUPPRESSION_PREFIX as _, RivusPlugin as a, RivusToolInputRejected as at, ScheduledAutomationRunResult as b, RivusPluginManifest as c, RivusSkillDescriptor as ct, RivusAutomationInput as d, RivusRuntimeToolGrantSet as dt, RivusToolExecutionContext as et, RivusAutomationOutput as f, RivusRuntimeToolId as ft, createDailyAutomationSchedule as g, DailyAutomationSchedule as h, RegisteredRivusPlugin as i, RivusToolIdempotency as it, createAutomationPresentation as j, AutomationPresentationSource as k, RivusPluginRegistry as l, RivusSkillGrantSet as lt, RivusAutomationTickContext as m, InvalidRivusPlugin as n, RivusToolFactoryContext as nt, RivusPluginCatalog as o, RivusToolRisk as ot, RivusAutomationTemplate as p, isRivusRuntimeToolId as pt, ResolvedRivusAgentDefinition as q, RIVUS_PLUGIN_API_VERSION as r, RivusToolGrantSet as rt, RivusPluginCatalogSnapshot as s, RegisteredRivusSkill as st, createRivusPluginCatalog as t, RivusToolExecutor as tt, RegisteredRivusAutomation as u, RIVUS_RUNTIME_TOOL_IDS as ut, ScheduledAutomationDeliveryInput as v, AutomationPresentation as w, AutomationTickRecord as x, ScheduledAutomationRunInput as y, AutomationOutcome as z };
|