@2kw/ai 7.4.0-dev.6 → 7.4.0-dev.7

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.
@@ -102,6 +102,7 @@ const CODE_HINTS = {
102
102
  "Check pendingToolCalls and pendingApprovals in the run envelope.",
103
103
  unknown_tool_output: "That call id was not released by this response. Use the responseId of the latest envelope.",
104
104
  conversation_agent_mismatch: "This conversation belongs to another agent. Start a new conversation or run the agent that owns it.",
105
+ provider_quota_exhausted: "The model provider account is out of credits or at its spend limit. Add credits or raise the limit with the provider; retrying will not help.",
105
106
  };
106
107
  /** The most specific hint for an API error: gateway code, then known messages, then the status table. */
107
108
  export function hintFor(err) {
@@ -114,7 +115,7 @@ export function hintFor(err) {
114
115
  if (err.headResponseId) {
115
116
  return `The run's newest response is ${err.headResponseId}. Check it: 2kw responses get ${err.headResponseId}`;
116
117
  }
117
- if (err.code && CODE_HINTS[err.code])
118
+ if (err.code && Object.hasOwn(CODE_HINTS, err.code))
118
119
  return CODE_HINTS[err.code];
119
120
  // The gateway answers `agent_not_published` (code), the REST layer AGENT_NOT_PUBLISHED (errorCode).
120
121
  if (err.code === "agent_not_published" || err.errorCode === "AGENT_NOT_PUBLISHED") {
@@ -27,6 +27,11 @@ export declare const POLL_WAIT_SECONDS = 25;
27
27
  export declare const ACCEPTANCE_MS = 10000;
28
28
  export declare const OWNER_LEASE_MS = 30000;
29
29
  export declare const OFFLINE_MS = 60000;
30
+ /**
31
+ * How often a relay refreshes the backend's signing keys on its own. The hub uses it to decide how
32
+ * long a JWKS refresh hint stays relevant for a relay it first sees later (#801).
33
+ */
34
+ export declare const JWKS_REFRESH_INTERVAL_MS: number;
30
35
  export declare const CALL_TOTAL_MS: number;
31
36
  export declare const LISTEN_TOTAL_MS: number;
32
37
  export declare const MAX_HEAD_DEADLINE_MS: number;
@@ -29,6 +29,11 @@ export const POLL_WAIT_SECONDS = 25;
29
29
  export const ACCEPTANCE_MS = 10_000;
30
30
  export const OWNER_LEASE_MS = 30_000;
31
31
  export const OFFLINE_MS = 60_000;
32
+ /**
33
+ * How often a relay refreshes the backend's signing keys on its own. The hub uses it to decide how
34
+ * long a JWKS refresh hint stays relevant for a relay it first sees later (#801).
35
+ */
36
+ export const JWKS_REFRESH_INTERVAL_MS = 10 * 60_000;
32
37
  export const CALL_TOTAL_MS = 10 * 60_000;
33
38
  export const LISTEN_TOTAL_MS = 60 * 60_000;
34
39
  export const MAX_HEAD_DEADLINE_MS = 10 * 60_000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2kw/ai",
3
- "version": "7.4.0-dev.6",
3
+ "version": "7.4.0-dev.7",
4
4
  "description": "CLI for 2kw.ai — schema-driven document extraction, an OpenAI-compatible EU LLM gateway, transcription, prompts, datasets, and experiments from your terminal or agentic workflows. Ships as 2kw, backbone, and bb.",
5
5
  "keywords": [
6
6
  "cli",