@vellumai/plugin-api 0.10.9-dev.202607161044.1a55a2d → 0.10.9-dev.202607161241.f69e16e

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.
Files changed (3) hide show
  1. package/index.d.ts +38 -0
  2. package/index.js +2 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -2390,6 +2390,34 @@ declare interface CopyBlockSurfaceData {
2390
2390
  language?: string;
2391
2391
  }
2392
2392
 
2393
+ /**
2394
+ * Plugin-facing credential resolution.
2395
+ *
2396
+ * {@link resolveCredential} returns a stored credential's plaintext value — the
2397
+ * same value `assistant credentials reveal` prints — resolving a reference that
2398
+ * is either a credential UUID or a `"service/field"` string, exactly as the
2399
+ * reveal path does (see {@link ../tools/credentials/resolve.resolveCredentialRef}
2400
+ * and the `credentials/reveal` route).
2401
+ *
2402
+ * ## Plugin scoping
2403
+ *
2404
+ * When a plugin is in context — its hook or tool is executing, tracked by
2405
+ * {@link ../plugins/plugin-execution-context.getCurrentPluginName} — resolution
2406
+ * is restricted: the plugin may only resolve credentials whose `field` equals
2407
+ * the plugin's own manifest name. A plugin named `acme` can therefore read
2408
+ * `openai/acme` or `stripe/acme` but not `openai/api_key`. Outside any plugin
2409
+ * context (host-internal callers, CLI, tests) the resolver is unscoped and
2410
+ * behaves like a direct reveal.
2411
+ */
2412
+ /**
2413
+ * Raised when a credential cannot be resolved: the reference does not match a
2414
+ * stored credential, the store is unreachable, or the calling plugin is not
2415
+ * permitted to resolve the requested credential.
2416
+ */
2417
+ export declare class CredentialResolutionError extends Error {
2418
+ constructor(message: string);
2419
+ }
2420
+
2393
2421
  declare interface CustomSlimSkill extends SlimSkillBase {
2394
2422
  origin: "custom";
2395
2423
  }
@@ -4764,6 +4792,16 @@ declare const RelationshipStateUpdatedEventSchema: z.ZodObject<{
4764
4792
  updatedAt: z.ZodString;
4765
4793
  }, z.core.$strip>;
4766
4794
 
4795
+ /**
4796
+ * Resolve a credential reference to its plaintext value.
4797
+ *
4798
+ * @param ref A credential UUID or a `"service/field"` string.
4799
+ * @returns The plaintext credential value.
4800
+ * @throws {CredentialResolutionError} when the reference does not resolve, the
4801
+ * store is unreachable, or a plugin in context is not scoped to the credential.
4802
+ */
4803
+ export declare function resolveCredential(ref: string): Promise<string>;
4804
+
4767
4805
  /**
4768
4806
  * Plugin-facing read API over the skill surface: the locally installed
4769
4807
  * catalog with resolved enablement states, and the remote skill catalog —
package/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // Generated by scripts/build-plugin-api.ts — do not edit by hand.
2
2
  const api = globalThis[Symbol.for("vellum.plugin-api")] ?? {};
3
3
  export const CLI_COMMAND_HELP = api.CLI_COMMAND_HELP;
4
+ export const CredentialResolutionError = api.CredentialResolutionError;
4
5
  export const HOOKS = api.HOOKS;
5
6
  export const INTERNAL_NUDGE_OUTPUT_SUPPRESSION = api.INTERNAL_NUDGE_OUTPUT_SUPPRESSION;
6
7
  export const RiskLevel = api.RiskLevel;
@@ -25,6 +26,7 @@ export const listCatalogSkills = api.listCatalogSkills;
25
26
  export const listConversations = api.listConversations;
26
27
  export const listInstalledSkills = api.listInstalledSkills;
27
28
  export const parseMessageMetadata = api.parseMessageMetadata;
29
+ export const resolveCredential = api.resolveCredential;
28
30
  export const resolveMediaSourceData = api.resolveMediaSourceData;
29
31
  export const resolveUserName = api.resolveUserName;
30
32
  export const runConversationTurn = api.runConversationTurn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/plugin-api",
3
- "version": "0.10.9-dev.202607161044.1a55a2d",
3
+ "version": "0.10.9-dev.202607161241.f69e16e",
4
4
  "description": "Public TypeScript authoring contract for Vellum assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",