@rivus/agent 0.1.1 → 0.3.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.
@@ -1,4 +1,4 @@
1
- import { n as resolveRivusAgentDefinition, t as createRivusPluginCatalog } from "./rivus-plugin-registry.js";
1
+ import { a as RIVUS_MEMORY_TOOL_ID, n as resolveRivusAgentDefinition, t as createRivusPluginCatalog } from "./rivus-plugin-registry.js";
2
2
  //#region src/testing/rivus-plugin-testkit.ts
3
3
  var RivusPluginConformanceError = class extends Error {
4
4
  name = "RivusPluginConformanceError";
@@ -7,7 +7,7 @@ async function assertRivusPluginConforms(input) {
7
7
  const catalog = createRivusPluginCatalog();
8
8
  catalog.registerPlugin(input.plugin);
9
9
  const resolved = resolveRivusAgentDefinition(catalog, input.deployment);
10
- const requested = new Set(input.deployment.tools.allow);
10
+ const requested = /* @__PURE__ */ new Set([...input.deployment.tools.allow, ...input.deployment.memory?.tool === true ? [RIVUS_MEMORY_TOOL_ID] : []]);
11
11
  if (resolved.toolGrantSet.toolIds.some((id) => !requested.has(id))) throw new RivusPluginConformanceError("resolved ToolGrantSet expanded beyond deployment request");
12
12
  if (input.lifecycle) {
13
13
  const lifecycle = await input.lifecycle.activate();
@@ -15,7 +15,7 @@ import {
15
15
  createAgentHarness,
16
16
  createAgentHarnessPooledRuntime,
17
17
  createRivusMemoryToolDescriptor,
18
- createConfiguredFeishuMarkdownMessageSender,
18
+ createConfiguredFeishuAutomationCardSender,
19
19
  createConfiguredFeishuCardKitPublisher,
20
20
  createConfiguredFeishuCardKitTargetPreparation,
21
21
  createConfiguredFeishuHumanInteractionPresenter,
@@ -113,7 +113,7 @@ export async function createRivusDeploymentAdapters(context: RivusDeploymentBoot
113
113
  pi: {}
114
114
  };
115
115
  const openApiClient = createOpenApiClient(config);
116
- const sender = createConfiguredFeishuMarkdownMessageSender({
116
+ const sender = createConfiguredFeishuAutomationCardSender({
117
117
  client: openApiClient,
118
118
  config
119
119
  });
@@ -0,0 +1,45 @@
1
+ import { readCurrentWeather } from "./current-weather.mjs";
2
+
3
+ const TOOL_ID = "rivus-starter/current-weather";
4
+
5
+ export default {
6
+ manifest: {
7
+ apiVersion: "1",
8
+ id: "rivus-starter",
9
+ version: "1.0.0"
10
+ },
11
+ register(registry) {
12
+ registry.registerTool({
13
+ createExecutor: () => ({ execute: readCurrentWeather }),
14
+ description:
15
+ "Read current conditions and today's forecast from Open-Meteo, using the configured default when location is omitted",
16
+ digest: "sha256:rivus-starter-current-weather-v1",
17
+ id: TOOL_ID,
18
+ idempotency: "none",
19
+ inputSchema: {
20
+ additionalProperties: false,
21
+ properties: {
22
+ location: {
23
+ description: "City or place name. Omit it when the user did not specify one.",
24
+ maxLength: 100,
25
+ minLength: 1,
26
+ type: "string"
27
+ }
28
+ },
29
+ type: "object"
30
+ },
31
+ risk: "observe",
32
+ version: "1.0.0"
33
+ });
34
+ registry.registerAgentProfile({
35
+ displayName: "Rivus Agent",
36
+ id: "agent-a",
37
+ memory: { scopes: [] },
38
+ model: {},
39
+ skills: { allow: [] },
40
+ systemPrompt:
41
+ "You are a concise local assistant. For current or today's weather, call current-weather. If the user did not name a location, omit location and report the Tool's resolved place.",
42
+ tools: { allow: [TOOL_ID] }
43
+ });
44
+ }
45
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivus/agent",
3
- "version": "0.1.1",
3
+ "version": "0.3.1",
4
4
  "description": "A local agent daemon core built around a usable agent harness and domain events.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -65,7 +65,8 @@
65
65
  "typecheck": "vp check --no-fmt --no-lint",
66
66
  "check": "vp check && vp test --coverage && vp run duplicates && vp pack && vp run package:check && vp run audit && ./scripts/check-repository.sh",
67
67
  "duplicates": "jscpd src examples --min-lines 6 --min-tokens 40 --threshold 0 --reporters console --ignore '**/*.test.ts,**/*.test.mjs' --format 'typescript,javascript,json'",
68
- "version-packages": "changeset version && npm install --package-lock-only --ignore-scripts"
68
+ "version-packages": "changeset version && npm install --package-lock-only --ignore-scripts",
69
+ "version-packages:ci": "npm run version-packages && npm run check"
69
70
  },
70
71
  "dependencies": {
71
72
  "@opentelemetry/api": "^1.9.1",
@@ -77,7 +78,7 @@
77
78
  "typebox": "^1.1.38"
78
79
  },
79
80
  "peerDependencies": {
80
- "@earendil-works/pi-coding-agent": "^0.80.6",
81
+ "@earendil-works/pi-coding-agent": "0.80.6",
81
82
  "@larksuiteoapi/node-sdk": "^1.70.0"
82
83
  },
83
84
  "peerDependenciesMeta": {
@@ -91,10 +92,10 @@
91
92
  "devDependencies": {
92
93
  "@changesets/cli": "^2.31.1",
93
94
  "@earendil-works/pi-coding-agent": "0.80.6",
94
- "@larksuiteoapi/node-sdk": "1.70.0",
95
- "@types/node": "24.3.3",
95
+ "@larksuiteoapi/node-sdk": "1.71.1",
96
+ "@types/node": "24.13.3",
96
97
  "@vitest/coverage-v8": "4.1.10",
97
- "jscpd": "4.0.5",
98
+ "jscpd": "4.2.5",
98
99
  "typescript": "6.0.3",
99
100
  "vite": "npm:@voidzero-dev/vite-plus-core@0.2.4",
100
101
  "vite-plus": "0.2.4"