@vellumai/plugin-api 0.10.7-dev.202607081046.662cc92 → 0.10.7-dev.202607081138.e95f760
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/index.d.ts +73 -17
- package/index.js +1 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -508,6 +508,33 @@ declare interface BackgroundToolStarted {
|
|
|
508
508
|
startedAt: number;
|
|
509
509
|
}
|
|
510
510
|
|
|
511
|
+
/**
|
|
512
|
+
* Media payload for an image or file content block. One unified type covers
|
|
513
|
+
* both blocks and both storage forms:
|
|
514
|
+
*
|
|
515
|
+
* - `base64` — the bytes travel inline with the block. This is the runtime
|
|
516
|
+
* shape the provider transforms consume and the shape produced for a live
|
|
517
|
+
* (in-flight) turn.
|
|
518
|
+
* - `workspace_ref` — the bytes live somewhere in the workspace, not inline.
|
|
519
|
+
* This is the shape PERSISTED into `messages.content`, keeping large blobs
|
|
520
|
+
* out of the DB row and the lexical index. It is resolved back to inline
|
|
521
|
+
* bytes at the provider send boundary (`providers/media-resolve.ts`); any
|
|
522
|
+
* consumer that needs the raw bytes from stored content resolves it with
|
|
523
|
+
* `resolveMediaSourceData(source)`.
|
|
524
|
+
*
|
|
525
|
+
* `filename` is optional on both arms (present for file blocks and for
|
|
526
|
+
* generated-media references). For references, `sizeBytes` (and, for images,
|
|
527
|
+
* `width`/`height`) are captured at persist time so size-only consumers — the
|
|
528
|
+
* per-turn token estimator especially — can cost the block without reading the
|
|
529
|
+
* file back off disk.
|
|
530
|
+
*/
|
|
531
|
+
declare interface Base64MediaSource {
|
|
532
|
+
type: "base64";
|
|
533
|
+
media_type: string;
|
|
534
|
+
data: string;
|
|
535
|
+
filename?: string;
|
|
536
|
+
}
|
|
537
|
+
|
|
511
538
|
/**
|
|
512
539
|
* A single assistant event wrapping an outbound message payload.
|
|
513
540
|
*
|
|
@@ -1494,20 +1521,15 @@ declare interface ExecutorTelemetryStamp {
|
|
|
1494
1521
|
|
|
1495
1522
|
export declare interface FileContent {
|
|
1496
1523
|
type: "file";
|
|
1497
|
-
source:
|
|
1498
|
-
type: "base64";
|
|
1499
|
-
media_type: string;
|
|
1500
|
-
data: string;
|
|
1501
|
-
filename: string;
|
|
1502
|
-
};
|
|
1524
|
+
source: MediaSource_2;
|
|
1503
1525
|
extracted_text?: string;
|
|
1504
1526
|
/**
|
|
1505
|
-
* Internal id linking
|
|
1506
|
-
*
|
|
1507
|
-
* attachment
|
|
1508
|
-
*
|
|
1509
|
-
*
|
|
1510
|
-
* model.
|
|
1527
|
+
* Internal id linking a base64 file block to a row in the attachments table
|
|
1528
|
+
* so consumers (DB joins, inline-chip positioning) can correlate the block
|
|
1529
|
+
* back to its attachment. Redundant once the block is a reference (use
|
|
1530
|
+
* `source.attachmentId`); retained only while file media is still persisted
|
|
1531
|
+
* inline as base64, and removed when file uploads move to references.
|
|
1532
|
+
* Stripped by `daemon/handlers/shared.ts` before sending to the model.
|
|
1511
1533
|
*/
|
|
1512
1534
|
_attachmentId?: string;
|
|
1513
1535
|
}
|
|
@@ -2263,11 +2285,7 @@ declare interface IdentityGetResponse {
|
|
|
2263
2285
|
|
|
2264
2286
|
export declare interface ImageContent {
|
|
2265
2287
|
type: "image";
|
|
2266
|
-
source:
|
|
2267
|
-
type: "base64";
|
|
2268
|
-
media_type: string;
|
|
2269
|
-
data: string;
|
|
2270
|
-
};
|
|
2288
|
+
source: MediaSource_2;
|
|
2271
2289
|
}
|
|
2272
2290
|
|
|
2273
2291
|
declare type _InboxServerMessages = ContactsInviteResponse | AssistantInboxEscalationResponse;
|
|
@@ -2446,6 +2464,8 @@ declare const LLMCallSiteEnum: z.ZodEnum<{
|
|
|
2446
2464
|
workflowLeaf: "workflowLeaf";
|
|
2447
2465
|
}>;
|
|
2448
2466
|
|
|
2467
|
+
declare type MediaSource_2 = Base64MediaSource | WorkspaceRefMediaSource;
|
|
2468
|
+
|
|
2449
2469
|
declare interface MemoryRecalled {
|
|
2450
2470
|
type: "memory_recalled";
|
|
2451
2471
|
provider: string;
|
|
@@ -3368,6 +3388,17 @@ declare const RelationshipStateUpdatedEventSchema: z.ZodObject<{
|
|
|
3368
3388
|
updatedAt: z.ZodString;
|
|
3369
3389
|
}, z.core.$strip>;
|
|
3370
3390
|
|
|
3391
|
+
/**
|
|
3392
|
+
* Resolve a media source to inline base64, reading a reference source back from
|
|
3393
|
+
* its workspace location. Returns `null` when a reference can no longer be
|
|
3394
|
+
* read. For consumers that hold an individual in-memory block (image
|
|
3395
|
+
* captioning, media retry) and need its bytes outside the provider transform.
|
|
3396
|
+
*/
|
|
3397
|
+
export declare function resolveMediaSourceData(source: MediaSource_2): {
|
|
3398
|
+
data: string;
|
|
3399
|
+
media_type: string;
|
|
3400
|
+
} | null;
|
|
3401
|
+
|
|
3371
3402
|
export declare enum RiskLevel {
|
|
3372
3403
|
Low = "low",
|
|
3373
3404
|
Medium = "medium",
|
|
@@ -5442,6 +5473,31 @@ declare interface WorkspaceFilesListResponse {
|
|
|
5442
5473
|
}>;
|
|
5443
5474
|
}
|
|
5444
5475
|
|
|
5476
|
+
/**
|
|
5477
|
+
* A reference to bytes stored in the workspace rather than inlined. The bytes
|
|
5478
|
+
* live in the workspace attachment store, addressed by `attachmentId`, and are
|
|
5479
|
+
* read back at the provider send boundary. User uploads are attachment rows
|
|
5480
|
+
* already; tool-result media is materialized into attachment rows before it is
|
|
5481
|
+
* referenced, so a single `attachmentId` resolves every case and needs no
|
|
5482
|
+
* fallback locator.
|
|
5483
|
+
*
|
|
5484
|
+
* `sizeBytes` (and, for images, `width`/`height`) are the persist-time hints
|
|
5485
|
+
* that let size-only consumers cost the block without a disk read.
|
|
5486
|
+
*/
|
|
5487
|
+
declare interface WorkspaceRefMediaSource {
|
|
5488
|
+
type: "workspace_ref";
|
|
5489
|
+
media_type: string;
|
|
5490
|
+
/** Attachment row id; resolves to bytes via the attachment store. */
|
|
5491
|
+
attachmentId: string;
|
|
5492
|
+
/** Byte length of the referenced file. */
|
|
5493
|
+
sizeBytes: number;
|
|
5494
|
+
filename?: string;
|
|
5495
|
+
/** Decoded pixel width, when the reference is an image. */
|
|
5496
|
+
width?: number;
|
|
5497
|
+
/** Decoded pixel height, when the reference is an image. */
|
|
5498
|
+
height?: number;
|
|
5499
|
+
}
|
|
5500
|
+
|
|
5445
5501
|
declare type _WorkspaceServerMessages = WorkspaceFilesListResponse | WorkspaceFileReadResponse | IdentityGetResponse | ToolPermissionSimulateResponse | ToolNamesListResponse | IdentityChangedEvent;
|
|
5446
5502
|
|
|
5447
5503
|
export { }
|
package/index.js
CHANGED
|
@@ -7,3 +7,4 @@ export const doesSupportVision = api.doesSupportVision;
|
|
|
7
7
|
export const getConfiguredProvider = api.getConfiguredProvider;
|
|
8
8
|
export const getModelProfiles = api.getModelProfiles;
|
|
9
9
|
export const isMaxTokensStopReason = api.isMaxTokensStopReason;
|
|
10
|
+
export const resolveMediaSourceData = api.resolveMediaSourceData;
|
package/package.json
CHANGED