@salsita-ai/contracts 0.50.0-develop.da8d27f5d7 → 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 +1 -1
- package/dist/assistant/index.d.ts +2 -0
- package/dist/assistant/index.js +1 -1
- package/dist/assistant/message-metadata.d.ts +7 -7
- package/dist/assistant/message-metadata.js +1 -1
- package/dist/assistant/tool-error.d.ts +30 -0
- package/dist/assistant/tool-error.js +1 -0
- package/dist/domain/deployments/api-token-domain.d.ts +5 -0
- package/dist/domain/deployments/api-token-domain.js +1 -1
- package/dist/domain/deployments/index.d.ts +1 -1
- package/dist/domain/deployments/index.js +1 -1
- package/dist/domain/feedback/feedback-domain.d.ts +4 -3
- package/dist/domain/feedback/feedback-domain.js +1 -1
- package/package.json +2 -2
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
|
|
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';
|
package/dist/assistant/index.js
CHANGED
|
@@ -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";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* Metadata the assistant chat client attaches to each user message (AG-UI message `metadata`). It is
|
|
4
|
-
* persisted with the message, and the server shows `
|
|
5
|
-
* model knows
|
|
4
|
+
* persisted with the message, and the server shows `changes` to the model in front of the message, so
|
|
5
|
+
* the model knows what the user did in the configurator since it last acted.
|
|
6
6
|
*/
|
|
7
7
|
export interface AssistantMessageMetadata {
|
|
8
|
-
/**
|
|
9
|
-
readonly
|
|
8
|
+
/** The change record since the agent's previous action: a marker or a diff, as the assistant prompt describes it. */
|
|
9
|
+
readonly changes: string;
|
|
10
10
|
}
|
|
11
11
|
export declare const AssistantMessageMetadata: z.ZodObject<{
|
|
12
|
-
|
|
12
|
+
changes: z.ZodString;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
|
|
14
|
+
changes: string;
|
|
15
15
|
}, {
|
|
16
|
-
|
|
16
|
+
changes: string;
|
|
17
17
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as t}from"zod";export const AssistantMessageMetadata=t.object({
|
|
1
|
+
import{z as t}from"zod";export const AssistantMessageMetadata=t.object({changes:t.string()});
|
|
@@ -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()});
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* How long the name of an API token may be. A builder gives the name when approving `phoenix login` in Studio, and
|
|
4
|
+
* the CLI sends it back with `POST /auth/token`, so Studio and both server inputs apply this one limit.
|
|
5
|
+
*/
|
|
6
|
+
export declare const API_TOKEN_NAME_MAX_LENGTH = 100;
|
|
2
7
|
/**
|
|
3
8
|
* Identifies one API token: a long-lived, revocable credential that authenticates calls to the Phoenix API on
|
|
4
9
|
* behalf of the user who approved it. The id names the token in revocation and in the request session; it is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{validate as o}from"uuid";import{Branded as
|
|
1
|
+
import{validate as o}from"uuid";import{Branded as t}from"@salsita-ai/common/utils";export const API_TOKEN_NAME_MAX_LENGTH=100;export const ApiTokenId=r=>{if(!o(r))throw Error(`Invalid API token id: ${r}. It must be a valid UUID.`);return t(r)};
|
|
@@ -5,7 +5,7 @@ export { DEFAULT_PROJECT_ALIAS, ProjectId, ProjectName, ProjectSlug, ProjectCust
|
|
|
5
5
|
export { OAuthProviderId, OAuthClientId, OAuthClientSecret, OAuthBaseUrl, type OAuthProvider, OAuthProviderName, OAuthScopes, } from './oauth-provider-domain.js';
|
|
6
6
|
export { DeploymentBuild, DeploymentBuildId, DeploymentBuildMode, DeploymentBuildSourceKey, DeploymentBuildStatus, } from './deployment-build-domain.js';
|
|
7
7
|
export { SdkBuilderSetupState } from './sdk-builder-setup-domain.js';
|
|
8
|
-
export { ApiTokenId } from './api-token-domain.js';
|
|
8
|
+
export { API_TOKEN_NAME_MAX_LENGTH, ApiTokenId } from './api-token-domain.js';
|
|
9
9
|
export { CustomerId, CustomerName, type Customer, CustomerClerkPublishableKey, CustomerClerkSecretKey, CustomerClerkJwtSecret, CustomerClerkOAuthBaseUrl, CustomerClerkOAuthClientId, CustomerClerkOAuthClientSecret, type CustomerClerkSettings, CustomerSlug, CustomerType, CustomerTypeSchema, } from './customer-domain.js';
|
|
10
10
|
export { OAuthConnectionId, type OAuthConnectionProvider, OAuthRefreshToken, OAuthGrantedScopes, SHAREPOINT_MISSING_TENANT_DOMAIN, SharePointTenantDomainInvalidError, SharePointTenantDomainSchema, type NewOAuthConnection, type OAuthConnection, type SharePointProjectSite, OAUTH_STALE_CONNECTION_CODE, parseRequiredSharePointTenantDomain, parseSharePointTenantDomain, } from './oauth-connection-domain.js';
|
|
11
11
|
export { type Embeddings } from './embedding-domain.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{EnvironmentId,EnvironmentName,EnvironmentSlug,EnvironmentType,FrontendUrl,DevelopmentKey,DEFAULT_SESSION_LIMIT,PRODUCTION_ENVIRONMENT_SLUG,SessionLimit,ServerKey,BaseDomain,ServiceName,FrontendBucketName,LambdaFunctionName,TfStateKeyPrefix,DdServiceName}from"./environment-domain.js";export{ConfigurationSchemaId,ConfigurationSchemaJsonSchema,ConfigurationSchemaVersion}from"./configuration-schema-domain.js";export{ApplicationType,AllowedOrigin,ChatConfiguration,DeploymentId,ResourceUrl,LambdaWebhookUrl,PrivateS3Bucket,PrivateDeploymentResourcesPath,PublicS3Bucket,PublicDeploymentResourcesPath,DeploymentApplicationId,OAuthProviderRegistration}from"./deployment-domain.js";export{DEFAULT_PROJECT_ALIAS,ProjectId,ProjectName,ProjectSlug,ProjectCustomDomain,ParamStorePath}from"./project-domain.js";export{OAuthProviderId,OAuthClientId,OAuthClientSecret,OAuthBaseUrl,OAuthProviderName,OAuthScopes}from"./oauth-provider-domain.js";export{DeploymentBuild,DeploymentBuildId,DeploymentBuildMode,DeploymentBuildSourceKey,DeploymentBuildStatus}from"./deployment-build-domain.js";export{SdkBuilderSetupState}from"./sdk-builder-setup-domain.js";export{ApiTokenId}from"./api-token-domain.js";export{CustomerId,CustomerName,CustomerClerkPublishableKey,CustomerClerkSecretKey,CustomerClerkJwtSecret,CustomerClerkOAuthBaseUrl,CustomerClerkOAuthClientId,CustomerClerkOAuthClientSecret,CustomerSlug,CustomerType,CustomerTypeSchema}from"./customer-domain.js";export{OAuthConnectionId,OAuthRefreshToken,OAuthGrantedScopes,SHAREPOINT_MISSING_TENANT_DOMAIN,SharePointTenantDomainInvalidError,SharePointTenantDomainSchema,OAUTH_STALE_CONNECTION_CODE,parseRequiredSharePointTenantDomain,parseSharePointTenantDomain}from"./oauth-connection-domain.js";export{BucketTimestamp,SessionCount}from"./session-domain.js";export{AiImageCount}from"./ai-image-domain.js";export{ImageRenderCount,ImageRenderLimit,DEFAULT_IMAGE_RENDER_LIMIT}from"./image-render-domain.js";
|
|
1
|
+
export{EnvironmentId,EnvironmentName,EnvironmentSlug,EnvironmentType,FrontendUrl,DevelopmentKey,DEFAULT_SESSION_LIMIT,PRODUCTION_ENVIRONMENT_SLUG,SessionLimit,ServerKey,BaseDomain,ServiceName,FrontendBucketName,LambdaFunctionName,TfStateKeyPrefix,DdServiceName}from"./environment-domain.js";export{ConfigurationSchemaId,ConfigurationSchemaJsonSchema,ConfigurationSchemaVersion}from"./configuration-schema-domain.js";export{ApplicationType,AllowedOrigin,ChatConfiguration,DeploymentId,ResourceUrl,LambdaWebhookUrl,PrivateS3Bucket,PrivateDeploymentResourcesPath,PublicS3Bucket,PublicDeploymentResourcesPath,DeploymentApplicationId,OAuthProviderRegistration}from"./deployment-domain.js";export{DEFAULT_PROJECT_ALIAS,ProjectId,ProjectName,ProjectSlug,ProjectCustomDomain,ParamStorePath}from"./project-domain.js";export{OAuthProviderId,OAuthClientId,OAuthClientSecret,OAuthBaseUrl,OAuthProviderName,OAuthScopes}from"./oauth-provider-domain.js";export{DeploymentBuild,DeploymentBuildId,DeploymentBuildMode,DeploymentBuildSourceKey,DeploymentBuildStatus}from"./deployment-build-domain.js";export{SdkBuilderSetupState}from"./sdk-builder-setup-domain.js";export{API_TOKEN_NAME_MAX_LENGTH,ApiTokenId}from"./api-token-domain.js";export{CustomerId,CustomerName,CustomerClerkPublishableKey,CustomerClerkSecretKey,CustomerClerkJwtSecret,CustomerClerkOAuthBaseUrl,CustomerClerkOAuthClientId,CustomerClerkOAuthClientSecret,CustomerSlug,CustomerType,CustomerTypeSchema}from"./customer-domain.js";export{OAuthConnectionId,OAuthRefreshToken,OAuthGrantedScopes,SHAREPOINT_MISSING_TENANT_DOMAIN,SharePointTenantDomainInvalidError,SharePointTenantDomainSchema,OAUTH_STALE_CONNECTION_CODE,parseRequiredSharePointTenantDomain,parseSharePointTenantDomain}from"./oauth-connection-domain.js";export{BucketTimestamp,SessionCount}from"./session-domain.js";export{AiImageCount}from"./ai-image-domain.js";export{ImageRenderCount,ImageRenderLimit,DEFAULT_IMAGE_RENDER_LIMIT}from"./image-render-domain.js";
|
|
@@ -44,10 +44,11 @@ export declare const FeedbackSource: ((value: string) => FeedbackSource) & {
|
|
|
44
44
|
readonly Cli: 'cli';
|
|
45
45
|
};
|
|
46
46
|
/**
|
|
47
|
-
* Longest feedback message the server stores.
|
|
48
|
-
* the
|
|
47
|
+
* Longest feedback message the server stores. It leaves room for a full report: the error output and a condensed
|
|
48
|
+
* conversation log of the coding agent that wrote it. Studio and the CLI check it before sending, so a sender learns
|
|
49
|
+
* about the limit without a round trip.
|
|
49
50
|
*/
|
|
50
|
-
export declare const FEEDBACK_MESSAGE_MAX_LENGTH =
|
|
51
|
+
export declare const FEEDBACK_MESSAGE_MAX_LENGTH = 100000;
|
|
51
52
|
/**
|
|
52
53
|
* Longest contact detail a sender may leave with CLI feedback when they want a reply.
|
|
53
54
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{validate as e}from"uuid";import{z as t}from"zod";import{Branded as o}from"@salsita-ai/common/utils";export const FeedbackId=t=>{if(!e(t))throw Error(`Invalid feedback id: ${t}. It must be a valid UUID.`);return o(t)};let r={Bug:"bug",Idea:"idea",Other:"other"};export const FeedbackTypeSchema=t.nativeEnum(r);export const FeedbackType=Object.assign(e=>{let t=FeedbackTypeSchema.safeParse(e);if(!t.success)throw Error(`Invalid feedback type: ${e}. It must be one of ${Object.values(r).join(", ")}.`);return t.data},r);let a={Studio:"studio",Cli:"cli"};export const FeedbackSourceSchema=t.nativeEnum(a);export const FeedbackSource=Object.assign(e=>{let t=FeedbackSourceSchema.safeParse(e);if(!t.success)throw Error(`Invalid feedback source: ${e}. It must be one of ${Object.values(a).join(", ")}.`);return t.data},a);export const FEEDBACK_MESSAGE_MAX_LENGTH=
|
|
1
|
+
import{validate as e}from"uuid";import{z as t}from"zod";import{Branded as o}from"@salsita-ai/common/utils";export const FeedbackId=t=>{if(!e(t))throw Error(`Invalid feedback id: ${t}. It must be a valid UUID.`);return o(t)};let r={Bug:"bug",Idea:"idea",Other:"other"};export const FeedbackTypeSchema=t.nativeEnum(r);export const FeedbackType=Object.assign(e=>{let t=FeedbackTypeSchema.safeParse(e);if(!t.success)throw Error(`Invalid feedback type: ${e}. It must be one of ${Object.values(r).join(", ")}.`);return t.data},r);let a={Studio:"studio",Cli:"cli"};export const FeedbackSourceSchema=t.nativeEnum(a);export const FeedbackSource=Object.assign(e=>{let t=FeedbackSourceSchema.safeParse(e);if(!t.success)throw Error(`Invalid feedback source: ${e}. It must be one of ${Object.values(a).join(", ")}.`);return t.data},a);export const FEEDBACK_MESSAGE_MAX_LENGTH=1e5;export const FEEDBACK_CONTACT_MAX_LENGTH=200;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salsita-ai/contracts",
|
|
3
|
-
"version": "0.50.0-develop.
|
|
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.
|
|
59
|
+
"@salsita-ai/common": "0.50.0-develop.dbf0122072"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@lingui/core": "5.9.5",
|