@vellumai/plugin-api 0.10.7-dev.202607091922.eeb94f9 → 0.10.7-dev.202607092039.003f549
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 +99 -0
- package/index.js +2 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -3470,6 +3470,30 @@ declare type InterfaceId = (typeof INTERFACE_IDS)[number];
|
|
|
3470
3470
|
*/
|
|
3471
3471
|
export declare function isMaxTokensStopReason(stopReason: string | null | undefined): boolean;
|
|
3472
3472
|
|
|
3473
|
+
/**
|
|
3474
|
+
* The remote skill catalog, fetched via the shared catalog cache. Entries
|
|
3475
|
+
* whose declared feature flag is disabled are reported with
|
|
3476
|
+
* `state: "unavailable"`; all others are `state: "available"`. Not deduplicated
|
|
3477
|
+
* against the installed catalog — callers that merge the two lists filter by
|
|
3478
|
+
* installed ids themselves.
|
|
3479
|
+
*
|
|
3480
|
+
* A fetch failure never rejects: the underlying cache degrades through its
|
|
3481
|
+
* fallback chain (stale cache → bundled local catalog → empty) and this
|
|
3482
|
+
* returns whatever that yields. An empty result therefore means "could not
|
|
3483
|
+
* enumerate the catalog" as much as "the catalog is empty" — callers must
|
|
3484
|
+
* gate destructive reconciliation (pruning against the catalog id set) on a
|
|
3485
|
+
* non-empty result. Unexpected errors from the catalog read propagate.
|
|
3486
|
+
*/
|
|
3487
|
+
export declare function listCatalogSkills(): Promise<ResolvedSkillEntry[]>;
|
|
3488
|
+
|
|
3489
|
+
/**
|
|
3490
|
+
* The locally installed skill catalog with resolved states. Includes every
|
|
3491
|
+
* catalog entry — skills dropped by flag gating or the bundled allowlist are
|
|
3492
|
+
* reported with `state: "unavailable"` rather than omitted, so the returned
|
|
3493
|
+
* ids are the complete installed universe.
|
|
3494
|
+
*/
|
|
3495
|
+
export declare function listInstalledSkills(): Promise<ResolvedSkillEntry[]>;
|
|
3496
|
+
|
|
3473
3497
|
declare interface ListItem {
|
|
3474
3498
|
id: string;
|
|
3475
3499
|
title: string;
|
|
@@ -4468,6 +4492,52 @@ declare const RelationshipStateUpdatedEventSchema: z.ZodObject<{
|
|
|
4468
4492
|
updatedAt: z.ZodString;
|
|
4469
4493
|
}, z.core.$strip>;
|
|
4470
4494
|
|
|
4495
|
+
/**
|
|
4496
|
+
* Plugin-facing read API over the skill surface: the locally installed
|
|
4497
|
+
* catalog with resolved enablement states, and the remote skill catalog —
|
|
4498
|
+
* each composed host-side (catalog load + install-state resolution +
|
|
4499
|
+
* feature-flag gating + install-meta read), so callers hold no host config
|
|
4500
|
+
* and perform no flag checks of their own.
|
|
4501
|
+
*
|
|
4502
|
+
* The underlying skill and flag modules are loaded via dynamic `import()`
|
|
4503
|
+
* inside each function so that importing this module — which every
|
|
4504
|
+
* `@vellumai/plugin-api` consumer does transitively — does not eagerly pull
|
|
4505
|
+
* the catalog/flag import graph. An eager pull would force those modules'
|
|
4506
|
+
* named exports to resolve at instantiation, which breaks the intentional
|
|
4507
|
+
* partial module mocks in tests.
|
|
4508
|
+
*/
|
|
4509
|
+
/** One skill as seen by a plugin: capability fields plus resolved state. */
|
|
4510
|
+
export declare interface ResolvedSkillEntry {
|
|
4511
|
+
id: string;
|
|
4512
|
+
displayName: string;
|
|
4513
|
+
description: string;
|
|
4514
|
+
/** Compact routing cues declared in frontmatter / catalog metadata. */
|
|
4515
|
+
activationHints?: string[];
|
|
4516
|
+
/** Conditions under which the skill should not be loaded. */
|
|
4517
|
+
avoidWhen?: string[];
|
|
4518
|
+
/** True when the skill is pinned into the memory selector pool every turn. */
|
|
4519
|
+
alwaysCandidate?: boolean;
|
|
4520
|
+
/** True for locally installed skills; false for remote catalog entries. */
|
|
4521
|
+
installed: boolean;
|
|
4522
|
+
/** Where the installed skill comes from. Unset for remote catalog entries. */
|
|
4523
|
+
source?: SkillSource;
|
|
4524
|
+
/**
|
|
4525
|
+
* Resolved availability:
|
|
4526
|
+
* - `enabled` / `disabled` — installed, per config and source defaults.
|
|
4527
|
+
* - `unavailable` — gated off (feature flag disabled, or a bundled skill
|
|
4528
|
+
* excluded by the `allowBundled` allowlist). Present so callers can still
|
|
4529
|
+
* enumerate the full id universe.
|
|
4530
|
+
* - `available` — a remote catalog entry that is not locally installed.
|
|
4531
|
+
*/
|
|
4532
|
+
state: "enabled" | "disabled" | "unavailable" | "available";
|
|
4533
|
+
/**
|
|
4534
|
+
* Install metadata for user-installed skills (`managed` / `workspace` /
|
|
4535
|
+
* `extra` sources): `null` when the directory has no install-meta file,
|
|
4536
|
+
* unset for sources that never carry one (bundled, plugin, remote).
|
|
4537
|
+
*/
|
|
4538
|
+
installMeta?: SkillInstallMeta | null;
|
|
4539
|
+
}
|
|
4540
|
+
|
|
4471
4541
|
/**
|
|
4472
4542
|
* Resolve a media source to inline base64, reading a reference source back from
|
|
4473
4543
|
* its workspace location. Returns `null` when a reference can no longer be
|
|
@@ -4829,6 +4899,21 @@ declare interface SkillBodyResponse {
|
|
|
4829
4899
|
error?: string;
|
|
4830
4900
|
}
|
|
4831
4901
|
|
|
4902
|
+
declare interface SkillInstallMeta {
|
|
4903
|
+
origin: "vellum" | "clawhub" | "skillssh" | "custom";
|
|
4904
|
+
installedAt: string;
|
|
4905
|
+
installedBy?: string;
|
|
4906
|
+
backfilledBy?: string;
|
|
4907
|
+
version?: string;
|
|
4908
|
+
slug?: string;
|
|
4909
|
+
sourceRepo?: string;
|
|
4910
|
+
contentHash?: string;
|
|
4911
|
+
author?: "assistant" | "user";
|
|
4912
|
+
sourceConversationId?: string;
|
|
4913
|
+
retrospectiveConversationId?: string;
|
|
4914
|
+
lastUsedAt?: string;
|
|
4915
|
+
}
|
|
4916
|
+
|
|
4832
4917
|
declare interface SkillsDraftResponse {
|
|
4833
4918
|
type: "skills_draft_response";
|
|
4834
4919
|
success: boolean;
|
|
@@ -4884,6 +4969,20 @@ declare interface SkillsListResponse {
|
|
|
4884
4969
|
skills: SlimSkillResponse[];
|
|
4885
4970
|
}
|
|
4886
4971
|
|
|
4972
|
+
/**
|
|
4973
|
+
* Origin of a skill in the merged catalog.
|
|
4974
|
+
*
|
|
4975
|
+
* - `bundled`: ships inside the assistant binary under `bundled-skills/`.
|
|
4976
|
+
* - `managed`: installed into `$VELLUM_WORKSPACE_DIR/skills/` from our catalog.
|
|
4977
|
+
* - `workspace`: user-authored skill living in a conversation's working dir.
|
|
4978
|
+
* - `extra`: third-party directory roots passed via `loadSkillCatalog`'s
|
|
4979
|
+
* `extraDirs` argument (primarily for tests).
|
|
4980
|
+
* - `plugin`: shipped on disk inside an installed plugin at
|
|
4981
|
+
* `<workspaceDir>/plugins/<name>/skills/<id>/SKILL.md`, attributed back to
|
|
4982
|
+
* the owning plugin via its `owner` descriptor.
|
|
4983
|
+
*/
|
|
4984
|
+
declare type SkillSource = "bundled" | "managed" | "workspace" | "extra" | "plugin";
|
|
4985
|
+
|
|
4887
4986
|
declare type _SkillsServerMessages = SkillsListResponse | SkillBodyResponse | SkillStateChanged | SkillsInspectResponse | SkillsDraftResponse;
|
|
4888
4987
|
|
|
4889
4988
|
declare interface SkillsshSlimSkill extends SlimSkillBase {
|
package/index.js
CHANGED
|
@@ -9,6 +9,8 @@ export const getAssistantName = api.getAssistantName;
|
|
|
9
9
|
export const getConfiguredProvider = api.getConfiguredProvider;
|
|
10
10
|
export const getModelProfiles = api.getModelProfiles;
|
|
11
11
|
export const isMaxTokensStopReason = api.isMaxTokensStopReason;
|
|
12
|
+
export const listCatalogSkills = api.listCatalogSkills;
|
|
13
|
+
export const listInstalledSkills = api.listInstalledSkills;
|
|
12
14
|
export const resolveMediaSourceData = api.resolveMediaSourceData;
|
|
13
15
|
export const resolveUserName = api.resolveUserName;
|
|
14
16
|
export const selectedBackendSupportsMultimodal = api.selectedBackendSupportsMultimodal;
|
package/package.json
CHANGED