@vellumai/plugin-api 0.11.4-dev.202608202309.2fd95bc → 0.11.4-dev.202608202341.f06cdd5
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 +34 -0
- package/index.js +1 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4536,6 +4536,9 @@ export declare function getModelProfiles(): ModelProfileInfo[];
|
|
|
4536
4536
|
* When the VELLUM_WORKSPACE_DIR env var is set, returns that value (used in
|
|
4537
4537
|
* containerized deployments where the workspace is a separate volume).
|
|
4538
4538
|
* Otherwise falls back to ~/.vellum/workspace.
|
|
4539
|
+
*
|
|
4540
|
+
* In test processes the resolved directory must live under `os.tmpdir()`
|
|
4541
|
+
* (see the live-workspace guard above); anything else throws.
|
|
4539
4542
|
*/
|
|
4540
4543
|
export declare function getWorkspaceDir(): string;
|
|
4541
4544
|
|
|
@@ -5404,6 +5407,37 @@ export declare function parseMessageMetadata(metadataJson: string | null): Promi
|
|
|
5404
5407
|
*/
|
|
5405
5408
|
declare function parseMessageMetadata_2(metadataJson: string | null): MessageMetadata_2 | undefined;
|
|
5406
5409
|
|
|
5410
|
+
/**
|
|
5411
|
+
* Plugin-facing facade over the host's system-card writer: a daemon-authored
|
|
5412
|
+
* transcript notice, persisted as an assistant row stamped
|
|
5413
|
+
* `messageKind: "system_card"` so clients render it as a standalone system
|
|
5414
|
+
* notice rather than assistant-persona speech. Plugins use it to tell the user
|
|
5415
|
+
* about something the turn did to their input that the model's own reply
|
|
5416
|
+
* cannot explain (e.g. an attachment the turn could not send).
|
|
5417
|
+
*
|
|
5418
|
+
* The writer is loaded through a dynamic `import()` inside the wrapper, for the
|
|
5419
|
+
* same reason `persistence/conversation-plugin-facade.ts` does: it carries the
|
|
5420
|
+
* DB/drizzle import graph, whose named exports must not be forced to resolve
|
|
5421
|
+
* merely because a plugin imported `@vellumai/plugin-api`. Suites that
|
|
5422
|
+
* partial-mock a module in that graph would otherwise fail to instantiate.
|
|
5423
|
+
*/
|
|
5424
|
+
/**
|
|
5425
|
+
* Persist a system card in a conversation's transcript and announce it to
|
|
5426
|
+
* connected clients through the sync invalidation that drives a refetch.
|
|
5427
|
+
* Returns the persisted message id.
|
|
5428
|
+
*
|
|
5429
|
+
* A plugin card is non-terminal: it never emits `message_complete`, so a card
|
|
5430
|
+
* written from a hook that runs inside a turn leaves that turn's streaming and
|
|
5431
|
+
* processing state untouched. It is also not appended to the conversation's
|
|
5432
|
+
* in-memory working history, so it cannot leave a trailing assistant message
|
|
5433
|
+
* for the turn's next provider call to continue from.
|
|
5434
|
+
*/
|
|
5435
|
+
export declare function persistSystemCard(opts: {
|
|
5436
|
+
conversationId: string;
|
|
5437
|
+
text: string;
|
|
5438
|
+
metadata: Record<string, unknown>;
|
|
5439
|
+
}): Promise<string>;
|
|
5440
|
+
|
|
5407
5441
|
/**
|
|
5408
5442
|
* The subset of {@link AssistantEventHub} workspace plugins may use. Picking
|
|
5409
5443
|
* method signatures off the class keeps the facade in sync with the hub while
|
package/index.js
CHANGED
|
@@ -40,6 +40,7 @@ export const listConversations = api.listConversations;
|
|
|
40
40
|
export const listInstalledSkills = api.listInstalledSkills;
|
|
41
41
|
export const openTranscriptionSession = api.openTranscriptionSession;
|
|
42
42
|
export const parseMessageMetadata = api.parseMessageMetadata;
|
|
43
|
+
export const persistSystemCard = api.persistSystemCard;
|
|
43
44
|
export const publishEvent = api.publishEvent;
|
|
44
45
|
export const quarantineRefusedExchanges = api.quarantineRefusedExchanges;
|
|
45
46
|
export const queryIndex = api.queryIndex;
|
package/package.json
CHANGED