@vibexp/api-client 0.89.0 → 0.90.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.
@@ -455,7 +455,17 @@ export declare const getPromptDependencies: <ThrowOnError extends boolean = fals
455
455
  /**
456
456
  * Render a prompt
457
457
  *
458
- * Renders a prompt by resolving @references and substituting placeholders with provided values.
458
+ * Renders a prompt by resolving references and substituting placeholders with provided values.
459
+ *
460
+ * A reference is written `@prompt:<slug>` and resolves to a prompt in the
461
+ * prompt's own team; `@@` escapes a literal `@`. A bare `@slug` is the
462
+ * deprecated legacy form: it expands only when it resolves to a prompt and is
463
+ * otherwise left as plain text without a warning, so emails, handles and
464
+ * `git@host` remotes are safe. References are resolved on the authored body
465
+ * only; placeholder values are inserted verbatim.
466
+ *
467
+ * With `strict: true`, bare `@slug` is never resolved and an unresolved
468
+ * `@prompt:<slug>` fails the render with 422.
459
469
  *
460
470
  */
461
471
  export declare const renderPrompt: <ThrowOnError extends boolean = false>(options: Options<RenderPromptData, ThrowOnError>) => RequestResult<RenderPromptResponses, RenderPromptErrors, ThrowOnError>;
@@ -1040,7 +1040,17 @@ export const getPromptDependencies = (options) => (options.client ?? client).get
1040
1040
  /**
1041
1041
  * Render a prompt
1042
1042
  *
1043
- * Renders a prompt by resolving @references and substituting placeholders with provided values.
1043
+ * Renders a prompt by resolving references and substituting placeholders with provided values.
1044
+ *
1045
+ * A reference is written `@prompt:<slug>` and resolves to a prompt in the
1046
+ * prompt's own team; `@@` escapes a literal `@`. A bare `@slug` is the
1047
+ * deprecated legacy form: it expands only when it resolves to a prompt and is
1048
+ * otherwise left as plain text without a warning, so emails, handles and
1049
+ * `git@host` remotes are safe. References are resolved on the authored body
1050
+ * only; placeholder values are inserted verbatim.
1051
+ *
1052
+ * With `strict: true`, bare `@slug` is never resolved and an unresolved
1053
+ * `@prompt:<slug>` fails the render with 422.
1044
1054
  *
1045
1055
  */
1046
1056
  export const renderPrompt = (options) => (options.client ?? client).post({
@@ -376,6 +376,10 @@ export type RenderPromptRequest = {
376
376
  placeholders: {
377
377
  [key: string]: string;
378
378
  };
379
+ /**
380
+ * When true, only explicit @prompt:slug references are resolved (a bare @word such as an email, handle or git@host remote stays literal text), and an unresolved @prompt:slug fails the render with 422 instead of a warning. Recommended for unattended agents.
381
+ */
382
+ strict?: boolean;
379
383
  };
380
384
  export type RenderPromptResponse = {
381
385
  rendered_body: string;
@@ -385,7 +389,7 @@ export type RenderPromptResponse = {
385
389
  placeholders_missing?: Array<string>;
386
390
  references_used?: Array<string>;
387
391
  /**
388
- * Warnings about issues during rendering (e.g., missing references)
392
+ * Warnings about issues during rendering, such as an explicit @prompt:slug reference that does not resolve (kept as-is in rendered_body). A bare @word that does not resolve is plain text and never produces a warning.
389
393
  */
390
394
  warnings?: Array<string>;
391
395
  };
@@ -9127,6 +9131,10 @@ export type RenderPromptErrors = {
9127
9131
  * Prompt not found
9128
9132
  */
9129
9133
  404: ErrorResponse;
9134
+ /**
9135
+ * Strict render failed: one or more explicit @prompt:slug references do not resolve. The detail names the missing slugs.
9136
+ */
9137
+ 422: ErrorResponse;
9130
9138
  };
9131
9139
  export type RenderPromptError = RenderPromptErrors[keyof RenderPromptErrors];
9132
9140
  export type RenderPromptResponses = {
package/dist/schema.d.ts CHANGED
@@ -1037,7 +1037,17 @@ export interface paths {
1037
1037
  put?: never;
1038
1038
  /**
1039
1039
  * Render a prompt
1040
- * @description Renders a prompt by resolving @references and substituting placeholders with provided values.
1040
+ * @description Renders a prompt by resolving references and substituting placeholders with provided values.
1041
+ *
1042
+ * A reference is written `@prompt:<slug>` and resolves to a prompt in the
1043
+ * prompt's own team; `@@` escapes a literal `@`. A bare `@slug` is the
1044
+ * deprecated legacy form: it expands only when it resolves to a prompt and is
1045
+ * otherwise left as plain text without a warning, so emails, handles and
1046
+ * `git@host` remotes are safe. References are resolved on the authored body
1047
+ * only; placeholder values are inserted verbatim.
1048
+ *
1049
+ * With `strict: true`, bare `@slug` is never resolved and an unresolved
1050
+ * `@prompt:<slug>` fails the render with 422.
1041
1051
  */
1042
1052
  post: operations["renderPrompt"];
1043
1053
  delete?: never;
@@ -5850,6 +5860,11 @@ export interface components {
5850
5860
  placeholders: {
5851
5861
  [key: string]: string;
5852
5862
  };
5863
+ /**
5864
+ * @description When true, only explicit @prompt:slug references are resolved (a bare @word such as an email, handle or git@host remote stays literal text), and an unresolved @prompt:slug fails the render with 422 instead of a warning. Recommended for unattended agents.
5865
+ * @default false
5866
+ */
5867
+ strict: boolean;
5853
5868
  };
5854
5869
  RenderPromptResponse: {
5855
5870
  /** @example Please review this code for: security vulnerabilities and code quality */
@@ -5863,9 +5878,9 @@ export interface components {
5863
5878
  placeholders_missing?: string[];
5864
5879
  references_used?: string[];
5865
5880
  /**
5866
- * @description Warnings about issues during rendering (e.g., missing references)
5881
+ * @description Warnings about issues during rendering, such as an explicit @prompt:slug reference that does not resolve (kept as-is in rendered_body). A bare @word that does not resolve is plain text and never produces a warning.
5867
5882
  * @example [
5868
- * "Reference not found: @nonexistent"
5883
+ * "Reference not found: @prompt:nonexistent"
5869
5884
  * ]
5870
5885
  */
5871
5886
  warnings?: string[];
@@ -16700,6 +16715,15 @@ export interface operations {
16700
16715
  "application/problem+json": components["schemas"]["ErrorResponse"];
16701
16716
  };
16702
16717
  };
16718
+ /** @description Strict render failed: one or more explicit @prompt:slug references do not resolve. The detail names the missing slugs. */
16719
+ 422: {
16720
+ headers: {
16721
+ [name: string]: unknown;
16722
+ };
16723
+ content: {
16724
+ "application/problem+json": components["schemas"]["ErrorResponse"];
16725
+ };
16726
+ };
16703
16727
  };
16704
16728
  };
16705
16729
  getPromptShare: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibexp/api-client",
3
- "version": "0.89.0",
3
+ "version": "0.90.0",
4
4
  "description": "Typed VibeXP API client generated from the OpenAPI spec (openapi-fetch main entrypoint, axios SDK at ./axios)",
5
5
  "license": "MIT",
6
6
  "repository": {