@salsita-ai/contracts 0.50.0-develop.db8514eccf → 0.50.0-develop.dbf0122072

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/README.md CHANGED
@@ -19,7 +19,7 @@ There is no package-root export. Import from the path that owns the boundary; th
19
19
  | `clerk` | Clerk backend client and services and the shared user, invitation, role, and token schemas. |
20
20
  | `domain` | Branded deployment, customer, project, environment, configuration, and revision data: types, schemas, constructors, and the state values clients compare against. |
21
21
  | `chat` | Chat completion and stream chunks, tool definitions, validation, speech, and embeddings. |
22
- | `assistant` | Experimental assistant: shared client-tool definitions and user-message metadata. |
22
+ | `assistant` | Experimental assistant: shared client-tool definitions, user-message metadata and the tool error the server records. |
23
23
  | `webhook` | Webhook clients and building blocks, finalization tasks and resources, spreadsheet adapters. |
24
24
 
25
25
  Runtime schemas and TypeScript types are kept aligned, so a value that passes the schema has the declared type.
@@ -4,3 +4,5 @@ export { AssistantGraphQLToolInput, applyTool, queryTool } from './graphql-tools
4
4
  export type { AssistantGraphQLOperation } from './graphql-tools.js';
5
5
  export type { AssistantAiProvider, AssistantModelTier, AssistantReasoningLevel } from './deployment-assistant.js';
6
6
  export { AssistantMessageMetadata } from './message-metadata.js';
7
+ export { ASSISTANT_TOOL_ERROR_CODES, AssistantToolError } from './tool-error.js';
8
+ export type { AssistantToolErrorCode } from './tool-error.js';
@@ -1 +1 @@
1
- export{browserDetailsTool}from"./browser-details-tool.js";export{ASSISTANT_AI_PROVIDERS,ASSISTANT_MODEL_TIERS,ASSISTANT_REASONING_LEVELS,AssistantAiSettings,DeploymentAssistant}from"./deployment-assistant.js";export{AssistantGraphQLToolInput,applyTool,queryTool}from"./graphql-tools.js";export{AssistantMessageMetadata}from"./message-metadata.js";
1
+ export{browserDetailsTool}from"./browser-details-tool.js";export{ASSISTANT_AI_PROVIDERS,ASSISTANT_MODEL_TIERS,ASSISTANT_REASONING_LEVELS,AssistantAiSettings,DeploymentAssistant}from"./deployment-assistant.js";export{AssistantGraphQLToolInput,applyTool,queryTool}from"./graphql-tools.js";export{AssistantMessageMetadata}from"./message-metadata.js";export{ASSISTANT_TOOL_ERROR_CODES,AssistantToolError}from"./tool-error.js";
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Why the server recorded an error in place of the result of an assistant tool call:
4
+ * - `cancelled`: the user stopped the reply while the call was waiting for its result
5
+ * - `no_result`: the thread stopped waiting for the call when the user wrote a new message
6
+ * - `tool_budget`: the reply had used its tool calls for one user message, so the call was not run
7
+ */
8
+ export declare const ASSISTANT_TOOL_ERROR_CODES: readonly ['cancelled', 'no_result', 'tool_budget'];
9
+ export type AssistantToolErrorCode = (typeof ASSISTANT_TOOL_ERROR_CODES)[number];
10
+ /**
11
+ * An error in place of the result of an assistant tool call. `error` is text for the model, in the
12
+ * `{ error }` form TanStack AI itself records for a tool that threw or was cancelled. `code` is set
13
+ * on the errors the server records and tells the assistant panel what to say to the user; it is
14
+ * read as any string, so a panel older than the server shows a code it does not know as a general
15
+ * failure.
16
+ */
17
+ export interface AssistantToolError {
18
+ readonly error: string;
19
+ readonly code?: string | undefined;
20
+ }
21
+ export declare const AssistantToolError: z.ZodObject<{
22
+ error: z.ZodString;
23
+ code: z.ZodOptional<z.ZodString>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ error: string;
26
+ code?: string | undefined;
27
+ }, {
28
+ error: string;
29
+ code?: string | undefined;
30
+ }>;
@@ -0,0 +1 @@
1
+ import{z as o}from"zod";export const ASSISTANT_TOOL_ERROR_CODES=["cancelled","no_result","tool_budget"];export const AssistantToolError=o.object({error:o.string(),code:o.string().optional()});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salsita-ai/contracts",
3
- "version": "0.50.0-develop.db8514eccf",
3
+ "version": "0.50.0-develop.dbf0122072",
4
4
  "description": "Shared API, authentication, domain, chat, and webhook contracts for Phoenix.",
5
5
  "keywords": [
6
6
  "salsita",
@@ -56,7 +56,7 @@
56
56
  "uuid": "14.0.0",
57
57
  "valid-url": "1.0.9",
58
58
  "zod": "3.25.76",
59
- "@salsita-ai/common": "0.50.0-develop.db8514eccf"
59
+ "@salsita-ai/common": "0.50.0-develop.dbf0122072"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@lingui/core": "5.9.5",