@salsita-ai/contracts 0.50.0-develop.e33c8d8711 → 0.50.0-develop.e597475bea
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/dist/assistant/graphql-tools.d.ts +1 -1
- package/dist/assistant/graphql-tools.js +1 -1
- package/dist/assistant/image-reference.d.ts +9 -0
- package/dist/assistant/image-reference.js +1 -0
- package/dist/assistant/index.d.ts +1 -0
- package/dist/assistant/index.js +1 -1
- package/dist/domain/deployments/deployment-build-domain.d.ts +10 -0
- package/package.json +2 -2
|
@@ -49,7 +49,7 @@ export declare const AssistantGraphQLToolInput: z.ZodObject<{
|
|
|
49
49
|
* Client-side tool of the assistant chat that reads the configuration: the browser runs the
|
|
50
50
|
* operations against the configurator's GraphQL schema from the committed state and discards every
|
|
51
51
|
* change, so mutations in the list answer "what if" questions. The result is the list of standard
|
|
52
|
-
* GraphQL results with `committed: false
|
|
52
|
+
* GraphQL results with `committed: false`, followed by the pictures of the screenshots they took.
|
|
53
53
|
*
|
|
54
54
|
* The server passes the definition to the model without an implementation, so every call becomes a
|
|
55
55
|
* client-tool interrupt; the SDK registers the browser implementation via `.client()`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toolDefinition as e}from"@tanstack/ai";import{z as t}from"zod";export const AssistantGraphQLToolInput=t.object({operations:t.array(t.object({query:t.string(),variables:t.record(t.unknown()).nullish(),operationName:t.string().nullish()})).min(1)});let o={type:"object",properties:{operations:{type:"array",minItems:1,description:"The operations to run, in order. Each one sees the changes of the ones before it.",items:{type:"object",properties:{query:{type:"string",description:"A GraphQL document with exactly one operation, a query or a mutation."},variables:{type:"object",description:"Values of the variables the document declares. Prefer literals written into the document."},operationName:{type:"string",description:"The name of the operation, when the document names it."}},required:["query"]}}},required:["operations"]};export const queryTool=e({name:"query",description:"Reads the open configuration: runs GraphQL operations and returns their results. Changes nothing; mutations run on a copy discarded after the call.",inputSchema:o});export const applyTool=e({name:"apply",description:"Changes the open configuration: runs GraphQL operations and keeps their changes as one undo step. All or nothing: when any operation fails, nothing changes. `committed` says whether the changes were kept.",inputSchema:o});
|
|
1
|
+
import{toolDefinition as e}from"@tanstack/ai";import{z as t}from"zod";export const AssistantGraphQLToolInput=t.object({operations:t.array(t.object({query:t.string(),variables:t.record(t.unknown()).nullish(),operationName:t.string().nullish()})).min(1)});let o={type:"object",properties:{operations:{type:"array",minItems:1,description:"The operations to run, in order. Each one sees the changes of the ones before it.",items:{type:"object",properties:{query:{type:"string",description:"A GraphQL document with exactly one operation, a query or a mutation."},variables:{type:"object",description:"Values of the variables the document declares. Prefer literals written into the document."},operationName:{type:"string",description:"The name of the operation, when the document names it."}},required:["query"]}}},required:["operations"]};export const queryTool=e({name:"query",description:"Reads the open configuration: runs GraphQL operations and returns their results. Changes nothing; mutations run on a copy discarded after the call. Screenshots the operations take follow the results as images, each after its label.",inputSchema:o});export const applyTool=e({name:"apply",description:"Changes the open configuration: runs GraphQL operations and keeps their changes as one undo step. All or nothing: when any operation fails, nothing changes. `committed` says whether the changes were kept. Screenshots the operations take follow the results as images, each after its label.",inputSchema:o});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The URL an image part of an assistant tool result carries for a screenshot the browser uploaded:
|
|
3
|
+
* `assistant-image:<imageId>`, the id the server's image upload answered with. The thread stores
|
|
4
|
+
* the reference; the server swaps it for the image only in the copy of the thread sent to the model,
|
|
5
|
+
* and the panel fetches the image by its id.
|
|
6
|
+
*/
|
|
7
|
+
export declare const assistantImageReference: (imageId: string) => string;
|
|
8
|
+
/** The image id of an `assistant-image:` reference; `null` for any other URL. */
|
|
9
|
+
export declare const readAssistantImageReference: (url: string) => string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e="assistant-image:",t=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;export const assistantImageReference=t=>`${e}${t}`;export const readAssistantImageReference=a=>{if(!a.startsWith(e))return null;let s=a.slice(e.length);return t.test(s)?s:null};
|
|
@@ -3,6 +3,7 @@ export { ASSISTANT_AI_PROVIDERS, ASSISTANT_MODEL_TIERS, ASSISTANT_REASONING_LEVE
|
|
|
3
3
|
export { AssistantGraphQLToolInput, applyTool, queryTool } from './graphql-tools.js';
|
|
4
4
|
export type { AssistantGraphQLOperation } from './graphql-tools.js';
|
|
5
5
|
export type { AssistantAiProvider, AssistantModelTier, AssistantReasoningLevel } from './deployment-assistant.js';
|
|
6
|
+
export { assistantImageReference, readAssistantImageReference } from './image-reference.js';
|
|
6
7
|
export { AssistantMessageMetadata } from './message-metadata.js';
|
|
7
8
|
export { ASSISTANT_TOOL_ERROR_CODES, AssistantToolError } from './tool-error.js';
|
|
8
9
|
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";export{ASSISTANT_TOOL_ERROR_CODES,AssistantToolError}from"./tool-error.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{assistantImageReference,readAssistantImageReference}from"./image-reference.js";export{AssistantMessageMetadata}from"./message-metadata.js";export{ASSISTANT_TOOL_ERROR_CODES,AssistantToolError}from"./tool-error.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Branded, type ValueOf } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { ApiTokenId } from './api-token-domain.js';
|
|
2
3
|
import type { DeploymentId } from './deployment-domain.js';
|
|
3
4
|
import type { EnvironmentId } from './environment-domain.js';
|
|
4
5
|
export type DeploymentBuildId = Branded<'DeploymentBuildId', string>;
|
|
@@ -53,11 +54,20 @@ export declare const DeploymentBuildStatus: ((value: string) => DeploymentBuildS
|
|
|
53
54
|
export interface DeploymentBuild {
|
|
54
55
|
readonly id: DeploymentBuildId;
|
|
55
56
|
readonly environmentId: EnvironmentId;
|
|
57
|
+
readonly number: number | null;
|
|
56
58
|
readonly mode: DeploymentBuildMode;
|
|
57
59
|
readonly status: DeploymentBuildStatus;
|
|
58
60
|
readonly sourceKey: DeploymentBuildSourceKey | null;
|
|
59
61
|
readonly sdkVersion: string | null;
|
|
62
|
+
readonly rebuiltFrom: {
|
|
63
|
+
readonly buildId: DeploymentBuildId;
|
|
64
|
+
readonly number: number | null;
|
|
65
|
+
} | null;
|
|
60
66
|
readonly createdByUserId: string | null;
|
|
67
|
+
readonly apiToken: {
|
|
68
|
+
readonly id: ApiTokenId;
|
|
69
|
+
readonly name: string;
|
|
70
|
+
} | null;
|
|
61
71
|
readonly deploymentId: DeploymentId | null;
|
|
62
72
|
readonly error: string | null;
|
|
63
73
|
readonly createdAt: Date;
|
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.e597475bea",
|
|
4
4
|
"description": "Shared API, authentication, domain, chat, and webhook contracts for Phoenix.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"salsita",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"uuid": "14.0.0",
|
|
55
55
|
"valid-url": "1.0.9",
|
|
56
56
|
"zod": "3.25.76",
|
|
57
|
-
"@salsita-ai/common": "0.50.0-develop.
|
|
57
|
+
"@salsita-ai/common": "0.50.0-develop.e597475bea"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@lingui/core": "5.9.5",
|