@rivus/agent 0.16.1 → 0.16.6

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.
@@ -1,192 +1,5 @@
1
- import { a as RivusRuntimeToolId, d as RivusResolvedToolDescriptor, f as RivusToolDescriptor, g as RivusToolGrantSet, n as RivusSkillDescriptor, r as RivusSkillGrantSet, s as RegisteredRivusTool, t as RegisteredRivusSkill, u as RivusMemoryScope } from "./rivus-skill.js";
1
+ import { RivusAgentDeployment, RivusPlugin } from "@rivus/gateway";
2
2
 
3
- //#region src/core/application/agent-catalog/contracts/rivus-agent-definition.d.ts
4
- interface RivusAgentProfile {
5
- readonly id: string;
6
- readonly displayName: string;
7
- readonly systemPrompt: string;
8
- readonly model: Readonly<Record<string, unknown>>;
9
- readonly tools: {
10
- readonly allow: ReadonlyArray<string>;
11
- };
12
- readonly skills: {
13
- readonly allow: ReadonlyArray<string>;
14
- };
15
- readonly memory: {
16
- readonly scopes: ReadonlyArray<RivusMemoryScope>;
17
- };
18
- readonly runtimeTools?: {
19
- readonly allow: ReadonlyArray<RivusRuntimeToolId>;
20
- };
21
- }
22
- interface RegisteredRivusAgentProfile extends RivusAgentProfile {
23
- readonly pluginId: string;
24
- }
25
- interface RivusAgentDeployment {
26
- readonly agentId: string;
27
- readonly pluginId: string;
28
- readonly profileId: string;
29
- readonly projectSpaceId?: string;
30
- readonly endpointIds: ReadonlyArray<string>;
31
- readonly memory?: {
32
- readonly scopes: ReadonlyArray<RivusMemoryScope>;
33
- readonly tool: boolean;
34
- };
35
- readonly runtimeTools?: {
36
- readonly allow: ReadonlyArray<RivusRuntimeToolId>;
37
- };
38
- readonly skills: {
39
- readonly allow: ReadonlyArray<string>;
40
- };
41
- readonly tools: {
42
- readonly allow: ReadonlyArray<string>;
43
- };
44
- }
45
- interface ResolvedRivusAgentDefinition {
46
- readonly agentId: string;
47
- readonly pluginId: string;
48
- readonly profileId: string;
49
- readonly projectSpaceId?: string;
50
- readonly projectSpaceRevision?: string;
51
- readonly endpointIds: ReadonlyArray<string>;
52
- readonly profileRevision: string;
53
- readonly systemPrompt: string;
54
- readonly model: Readonly<Record<string, unknown>>;
55
- readonly memory: {
56
- readonly scopes: ReadonlyArray<RivusMemoryScope>;
57
- readonly tool: boolean;
58
- };
59
- readonly runtimeToolGrantSet: RivusRuntimeToolGrantSet;
60
- readonly skillGrantSet: RivusSkillGrantSet;
61
- readonly skills: ReadonlyArray<RegisteredRivusSkill>;
62
- readonly tools: ReadonlyArray<RivusResolvedToolDescriptor>;
63
- readonly toolGrantSet: RivusToolGrantSet;
64
- }
65
- interface RivusRuntimeToolGrantSet {
66
- readonly revision: string;
67
- readonly toolIds: ReadonlyArray<RivusRuntimeToolId>;
68
- }
69
- //#endregion
70
- //#region src/core/application/agent-catalog/contracts/rivus-plugin.d.ts
71
- declare const RIVUS_PLUGIN_API_VERSION = "1";
72
- interface RivusPluginManifest {
73
- readonly apiVersion: string;
74
- readonly id: string;
75
- readonly version: string;
76
- }
77
- interface RegisteredRivusPlugin extends RivusPluginManifest {}
78
- declare class InvalidRivusPlugin extends Error {
79
- readonly name = "InvalidRivusPlugin";
80
- }
81
- //#endregion
82
- //#region src/core/application/automation/presentation/automation-line-chart.d.ts
83
- interface AutomationLineChart {
84
- readonly title: string;
85
- readonly labels: ReadonlyArray<string>;
86
- readonly unit: string;
87
- readonly seriesLayout?: "overlay" | "separate";
88
- readonly series: ReadonlyArray<{
89
- readonly name: string;
90
- readonly values: ReadonlyArray<number>;
91
- }>;
92
- }
93
- //#endregion
94
- //#region src/core/application/automation/presentation/automation-presentation.d.ts
95
- declare const AUTOMATION_PRESENTATION_SCHEMA_VERSION: 1;
96
- type AutomationPresentationKind = "daily-ai" | "generic" | "industry" | "news" | "subscriptions";
97
- interface AutomationPresentationSource {
98
- readonly label: string;
99
- readonly url: string;
100
- }
101
- interface AutomationPresentationItem {
102
- readonly headline: string;
103
- readonly note?: string;
104
- readonly sources: ReadonlyArray<AutomationPresentationSource>;
105
- }
106
- interface AutomationPresentationSection {
107
- readonly id: string;
108
- readonly items: ReadonlyArray<AutomationPresentationItem>;
109
- readonly title: string;
110
- }
111
- interface AutomationPresentation {
112
- readonly lineChart?: AutomationLineChart;
113
- readonly footnote?: string;
114
- readonly kind?: AutomationPresentationKind;
115
- readonly meta: ReadonlyArray<string>;
116
- readonly schemaVersion: typeof AUTOMATION_PRESENTATION_SCHEMA_VERSION;
117
- readonly sections: ReadonlyArray<AutomationPresentationSection>;
118
- readonly summary?: string;
119
- readonly title: string;
120
- }
121
- interface AutomationPresentationInput {
122
- readonly lineChart?: AutomationLineChart;
123
- readonly footnote?: string;
124
- readonly kind?: AutomationPresentationKind;
125
- readonly meta?: ReadonlyArray<string>;
126
- readonly sections: ReadonlyArray<{
127
- readonly id: string;
128
- readonly items: ReadonlyArray<{
129
- readonly headline: string;
130
- readonly note?: string;
131
- readonly sources?: ReadonlyArray<AutomationPresentationSource>;
132
- }>;
133
- readonly title: string;
134
- }>;
135
- readonly summary?: string;
136
- readonly title: string;
137
- }
138
- declare class InvalidAutomationPresentation extends Error {
139
- readonly name = "InvalidAutomationPresentation";
140
- }
141
- declare function createAutomationPresentation(input: AutomationPresentationInput): AutomationPresentation;
142
- declare function readAutomationPresentation(value: unknown): AutomationPresentation;
143
- //#endregion
144
- //#region src/core/application/agent-catalog/contracts/rivus-automation-template.d.ts
145
- interface RivusAutomationTemplate {
146
- readonly id: string;
147
- readonly profileId: string;
148
- readonly requestedSkillIds: ReadonlyArray<string>;
149
- readonly requestedToolIds: ReadonlyArray<string>;
150
- readonly createInput: (tick: RivusAutomationTickContext) => RivusAutomationInput;
151
- readonly createPresentation?: (output: RivusAutomationOutput) => AutomationPresentation;
152
- }
153
- interface RivusAutomationTickContext {
154
- readonly occurrence: string;
155
- }
156
- interface RivusAutomationInput {
157
- readonly text: string;
158
- }
159
- interface RivusAutomationOutput {
160
- readonly occurrence: string;
161
- readonly text: string;
162
- }
163
- interface RegisteredRivusAutomation extends RivusAutomationTemplate {
164
- readonly pluginId: string;
165
- }
166
- //#endregion
167
- //#region src/core/application/agent-catalog/contracts/rivus-plugin-contracts.d.ts
168
- interface RivusPluginRegistry {
169
- registerAgentProfile(profile: RivusAgentProfile): void;
170
- registerTool(tool: RivusToolDescriptor): void;
171
- registerSkill(skill: RivusSkillDescriptor): void;
172
- registerAutomation(template: RivusAutomationTemplate): void;
173
- }
174
- interface RivusPlugin {
175
- readonly manifest: RivusPluginManifest;
176
- register(registry: RivusPluginRegistry): void;
177
- }
178
- interface RivusPluginCatalogSnapshot {
179
- readonly plugins: ReadonlyArray<RegisteredRivusPlugin>;
180
- readonly profiles: ReadonlyArray<RegisteredRivusAgentProfile>;
181
- readonly tools: ReadonlyArray<RegisteredRivusTool>;
182
- readonly skills: ReadonlyArray<RegisteredRivusSkill>;
183
- readonly automations: ReadonlyArray<RegisteredRivusAutomation>;
184
- }
185
- interface RivusPluginCatalog {
186
- registerPlugin(plugin: RivusPlugin): void;
187
- snapshot(): RivusPluginCatalogSnapshot;
188
- }
189
- //#endregion
190
3
  //#region src/testing/rivus-plugin-testkit.d.ts
191
4
  interface RivusPluginLifecycleProbe {
192
5
  activate(): Promise<{
@@ -211,4 +24,4 @@ declare class RivusPluginConformanceError extends Error {
211
24
  declare function assertRivusPluginConforms(input: RivusPluginConformanceInput): Promise<RivusPluginConformanceReport>;
212
25
  declare function createFakeRivusPlugin(): RivusPlugin;
213
26
  //#endregion
214
- export { RegisteredRivusAgentProfile as A, InvalidAutomationPresentation as C, RIVUS_PLUGIN_API_VERSION as D, InvalidRivusPlugin as E, RivusAgentDeployment as M, RivusAgentProfile as N, RegisteredRivusPlugin as O, RivusRuntimeToolGrantSet as P, AutomationPresentationSource as S, readAutomationPresentation as T, AutomationPresentation as _, assertRivusPluginConforms as a, AutomationPresentationKind as b, RivusPluginCatalog as c, RegisteredRivusAutomation as d, RivusAutomationInput as f, AUTOMATION_PRESENTATION_SCHEMA_VERSION as g, RivusAutomationTickContext as h, RivusPluginLifecycleProbe as i, ResolvedRivusAgentDefinition as j, RivusPluginManifest as k, RivusPluginCatalogSnapshot as l, RivusAutomationTemplate as m, RivusPluginConformanceInput as n, createFakeRivusPlugin as o, RivusAutomationOutput as p, RivusPluginConformanceReport as r, RivusPlugin as s, RivusPluginConformanceError as t, RivusPluginRegistry as u, AutomationPresentationInput as v, createAutomationPresentation as w, AutomationPresentationSection as x, AutomationPresentationItem as y };
27
+ export { assertRivusPluginConforms as a, RivusPluginLifecycleProbe as i, RivusPluginConformanceInput as n, createFakeRivusPlugin as o, RivusPluginConformanceReport as r, RivusPluginConformanceError as t };
@@ -1,20 +1,5 @@
1
- import { t as createSha256Digest } from "./sha256-digest.js";
2
- import { o as createRivusHostToolDescriptorProvider, p as deepFreeze, r as createRivusPluginCatalog$1, s as RIVUS_MEMORY_TOOL_ID, t as createRivusAgentCatalog } from "./rivus-agent-definition-resolver.js";
3
- //#region src/adapters/compatibility/agent-catalog/rivus-agent-catalog.ts
4
- const runtime = Object.freeze({
5
- digest: createSha256Digest,
6
- deepFreeze
7
- });
8
- function createRivusPluginCatalog() {
9
- return createRivusPluginCatalog$1(runtime);
10
- }
11
- function createCompatibleRivusAgentCatalog(options = {}) {
12
- return createRivusAgentCatalog([createRivusHostToolDescriptorProvider({ backgroundSessions: options.backgroundSessions === true })], runtime);
13
- }
14
- function resolveRivusAgentDefinition(catalog, deployment, options = {}) {
15
- return createCompatibleRivusAgentCatalog(options).resolve(catalog, deployment);
16
- }
17
- //#endregion
1
+ import { RIVUS_PLUGIN_API_VERSION, createRivusPluginCatalog, resolveRivusAgentDefinition } from "@rivus/gateway";
2
+ import { RIVUS_MEMORY_TOOL_ID } from "@rivus/runtime";
18
3
  //#region src/testing/rivus-plugin-testkit.ts
19
4
  var RivusPluginConformanceError = class extends Error {
20
5
  name = "RivusPluginConformanceError";
@@ -40,7 +25,7 @@ async function assertRivusPluginConforms(input) {
40
25
  function createFakeRivusPlugin() {
41
26
  return {
42
27
  manifest: {
43
- apiVersion: "1",
28
+ apiVersion: RIVUS_PLUGIN_API_VERSION,
44
29
  id: "fake-plugin",
45
30
  version: "1.0.0"
46
31
  },
@@ -75,4 +60,4 @@ function createFakeRivusPlugin() {
75
60
  };
76
61
  }
77
62
  //#endregion
78
- export { createRivusPluginCatalog as a, createCompatibleRivusAgentCatalog as i, assertRivusPluginConforms as n, resolveRivusAgentDefinition as o, createFakeRivusPlugin as r, RivusPluginConformanceError as t };
63
+ export { assertRivusPluginConforms as n, createFakeRivusPlugin as r, RivusPluginConformanceError as t };