@vellumai/assistant 0.4.57 → 0.5.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/package.json +1 -1
- package/src/__tests__/conversation-runtime-assembly.test.ts +28 -21
- package/src/__tests__/encrypted-store.test.ts +24 -12
- package/src/__tests__/file-read-tool.test.ts +40 -0
- package/src/__tests__/host-file-read-tool.test.ts +87 -0
- package/src/__tests__/identity-intro-cache.test.ts +209 -0
- package/src/__tests__/model-intents.test.ts +1 -1
- package/src/__tests__/non-member-access-request.test.ts +3 -3
- package/src/__tests__/skill-memory.test.ts +14 -12
- package/src/daemon/conversation-runtime-assembly.ts +4 -3
- package/src/daemon/trace-emitter.ts +3 -2
- package/src/memory/search/staleness.ts +4 -1
- package/src/notifications/decision-engine.ts +43 -2
- package/src/notifications/emit-signal.ts +1 -0
- package/src/prompts/templates/BOOTSTRAP.md +10 -4
- package/src/prompts/templates/IDENTITY.md +1 -2
- package/src/providers/anthropic/client.ts +5 -17
- package/src/runtime/access-request-helper.ts +15 -1
- package/src/runtime/guardian-vellum-migration.ts +1 -3
- package/src/runtime/routes/btw-routes.ts +84 -0
- package/src/runtime/routes/identity-intro-cache.ts +105 -0
- package/src/runtime/routes/identity-routes.ts +51 -0
- package/src/runtime/routes/settings-routes.ts +1 -1
- package/src/security/encrypted-store.ts +1 -2
- package/src/skills/skill-memory.ts +5 -3
- package/src/telemetry/usage-telemetry-reporter.test.ts +6 -1
- package/src/telemetry/usage-telemetry-reporter.ts +2 -0
- package/src/tools/filesystem/read.ts +14 -3
- package/src/tools/host-filesystem/read.ts +17 -1
- package/src/util/pricing.ts +4 -0
|
@@ -1,13 +1,19 @@
|
|
|
1
|
+
import { extname } from "node:path";
|
|
2
|
+
|
|
1
3
|
import { RiskLevel } from "../../permissions/types.js";
|
|
2
4
|
import type { ToolDefinition } from "../../providers/types.js";
|
|
3
5
|
import { FileSystemOps } from "../shared/filesystem/file-ops-service.js";
|
|
6
|
+
import {
|
|
7
|
+
IMAGE_EXTENSIONS,
|
|
8
|
+
readImageFile,
|
|
9
|
+
} from "../shared/filesystem/image-read.js";
|
|
4
10
|
import { hostPolicy } from "../shared/filesystem/path-policy.js";
|
|
5
11
|
import type { Tool, ToolContext, ToolExecutionResult } from "../types.js";
|
|
6
12
|
|
|
7
13
|
class HostFileReadTool implements Tool {
|
|
8
14
|
name = "host_file_read";
|
|
9
15
|
description =
|
|
10
|
-
"Read the contents of a file on the host filesystem. Not for workspace files under .vellum (use file_read instead).";
|
|
16
|
+
"Read the contents of a file on the host filesystem, including images (JPEG, PNG, GIF, WebP). Not for workspace files under .vellum (use file_read instead).";
|
|
11
17
|
category = "host-filesystem";
|
|
12
18
|
defaultRiskLevel = RiskLevel.Medium;
|
|
13
19
|
|
|
@@ -63,6 +69,16 @@ class HostFileReadTool implements Tool {
|
|
|
63
69
|
);
|
|
64
70
|
}
|
|
65
71
|
|
|
72
|
+
// For image files, delegate to the shared image reader.
|
|
73
|
+
const ext = extname(rawPath).toLowerCase();
|
|
74
|
+
if (IMAGE_EXTENSIONS.has(ext)) {
|
|
75
|
+
const pathCheck = hostPolicy(rawPath);
|
|
76
|
+
if (!pathCheck.ok) {
|
|
77
|
+
return { content: `Error: ${pathCheck.error}`, isError: true };
|
|
78
|
+
}
|
|
79
|
+
return readImageFile(pathCheck.resolved);
|
|
80
|
+
}
|
|
81
|
+
|
|
66
82
|
const ops = new FileSystemOps(hostPolicy);
|
|
67
83
|
|
|
68
84
|
const result = ops.readFileSafe({
|
package/src/util/pricing.ts
CHANGED
|
@@ -24,6 +24,9 @@ const PROVIDER_PRICING: Record<string, Record<string, ModelPricing>> = {
|
|
|
24
24
|
"claude-haiku-4": { inputPer1M: 0.8, outputPer1M: 4 },
|
|
25
25
|
},
|
|
26
26
|
openai: {
|
|
27
|
+
"gpt-5.4": { inputPer1M: 2.5, outputPer1M: 15 },
|
|
28
|
+
"gpt-5.4-nano": { inputPer1M: 0.2, outputPer1M: 1.25 },
|
|
29
|
+
"gpt-5.2": { inputPer1M: 1.75, outputPer1M: 14 },
|
|
27
30
|
"gpt-4o": { inputPer1M: 2.5, outputPer1M: 10 },
|
|
28
31
|
"gpt-4o-mini": { inputPer1M: 0.15, outputPer1M: 0.6 },
|
|
29
32
|
"gpt-4.1": { inputPer1M: 2.0, outputPer1M: 8.0 },
|
|
@@ -35,6 +38,7 @@ const PROVIDER_PRICING: Record<string, Record<string, ModelPricing>> = {
|
|
|
35
38
|
"o4-mini": { inputPer1M: 1.1, outputPer1M: 4.4 },
|
|
36
39
|
},
|
|
37
40
|
gemini: {
|
|
41
|
+
"gemini-3-flash": { inputPer1M: 0.5, outputPer1M: 3 },
|
|
38
42
|
"gemini-2.5-pro": { inputPer1M: 1.25, outputPer1M: 10 },
|
|
39
43
|
"gemini-2.5-flash": { inputPer1M: 0.15, outputPer1M: 0.6 },
|
|
40
44
|
"gemini-2.0-flash": { inputPer1M: 0.1, outputPer1M: 0.4 },
|