@hasna/skills 0.5.3 → 0.5.4

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.
@@ -7,6 +7,8 @@ import { type RemoteSkillRunContract } from "./remote-run-contract.js";
7
7
  import { type RemoteCreditPack, type RemoteRunApproval, type RemoteRunQuote } from "./remote-account.js";
8
8
  import { type RemoteInputFile } from "./remote-files.js";
9
9
  import { type UpdateRemoteProfile, type UpdateRemoteWorkspace } from "./remote-profile.js";
10
+ import { type RemoteQuoteUnavailableCode } from "./remote-quote-errors.js";
11
+ export type { RemoteQuoteUnavailableCode } from "./remote-quote-errors.js";
10
12
  /**
11
13
  * A server that predates this client's pin/tag/incremental-sync routes answered
12
14
  * 404/405 for them. The caller must never mistake that for "no pins" or "empty
@@ -25,6 +27,11 @@ export declare class RemoteRequestError extends Error {
25
27
  readonly status: number;
26
28
  constructor(path: string, status: number, _statusText?: string);
27
29
  }
30
+ /** A recognized unavailable quote; status compatibility and client-owned copy. */
31
+ export declare class RemoteQuoteUnavailableError extends RemoteRequestError {
32
+ readonly code: RemoteQuoteUnavailableCode;
33
+ constructor(path: string, code: RemoteQuoteUnavailableCode);
34
+ }
28
35
  /** A recognized membership refusal, with fixed text and no server payload. */
29
36
  export declare class RemoteWorkspaceMemberError extends RemoteRequestError {
30
37
  readonly code: RemoteWorkspaceMemberErrorCode;
@@ -0,0 +1,12 @@
1
+ /** Client-owned copy only. Server error strings and details are never displayed. */
2
+ export declare const quoteUnavailableMessages: Readonly<{
3
+ HOSTED_PROVIDER_UNAVAILABLE: "Hosted execution is temporarily unavailable on this Skills instance.";
4
+ HOSTED_CONNECTORS_UNAVAILABLE: "Hosted connector execution is unavailable on this Skills instance.";
5
+ SKILL_IMPLEMENTATION_UNAVAILABLE: "This skill has no hosted execution implementation.";
6
+ HOSTED_PRICING_UNAVAILABLE: "Hosted execution is unavailable while this skill's pricing is reviewed.";
7
+ RUNTIME_ALLOWLIST_REQUIRED: "Hosted execution is unavailable until this Skills instance enables its skill catalog.";
8
+ RUNTIME_SKILL_NOT_ALLOWED: "This skill is not enabled for hosted execution on this Skills instance.";
9
+ }>;
10
+ export type RemoteQuoteUnavailableCode = keyof typeof quoteUnavailableMessages;
11
+ /** Read one small error body, bounded even when a peer sends headers then stalls. */
12
+ export declare function readQuoteUnavailableCode(response: Response): Promise<RemoteQuoteUnavailableCode | null>;
@@ -30,7 +30,8 @@ export * from "./events.js";
30
30
  export * from "./spend.js";
31
31
  export * from "./offline.js";
32
32
  export * from "./execution/index.js";
33
- export { RemoteSkillsClient, createRemoteSkillsClient, RemoteRequestError, RemoteRouteUnsupportedError, RemoteCapabilityUnavailableError, RemoteWorkspaceMemberError } from "../lib/remote-client.js";
33
+ export { RemoteSkillsClient, createRemoteSkillsClient, RemoteRequestError, RemoteRouteUnsupportedError, RemoteCapabilityUnavailableError, RemoteQuoteUnavailableError, RemoteWorkspaceMemberError } from "../lib/remote-client.js";
34
+ export type { RemoteQuoteUnavailableCode } from "../lib/remote-client.js";
34
35
  export { RemoteCreditApprovalError, type RemoteRunApproval, type RemoteRunQuote, type RemoteCreditPack } from "../lib/remote-account.js";
35
36
  export { type RemoteInputFile, type RemoteInputFileDescriptor } from "../lib/remote-files.js";
36
37
  export { RemoteSkillsAuthClient, HostedApiError } from "../lib/remote-auth.js";