@salsita-ai/contracts 0.50.0-develop.5f7528aea8 → 0.50.0-develop.600437cb2f
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/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -1
- package/dist/api/studio-session.d.ts +54 -0
- package/dist/api/studio-session.js +1 -0
- package/dist/assistant/graphql-tools.d.ts +1 -1
- package/dist/assistant/graphql-tools.js +1 -1
- package/dist/domain/deployments/deployment-build-domain.d.ts +1 -0
- package/package.json +2 -6
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ There is no package-root export. Import from the path that owns the boundary; th
|
|
|
15
15
|
|
|
16
16
|
| Entry point | Boundary it defines |
|
|
17
17
|
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
18
|
-
| `api` | API access levels, session roles,
|
|
18
|
+
| `api` | API access levels, session roles, access/session token payloads, and Studio browser-session response schema. |
|
|
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. |
|
package/dist/api/index.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export { AccessLevel } from './access-level.js';
|
|
|
2
2
|
export { SessionRole } from './session-role.js';
|
|
3
3
|
export { type SessionTokenPayload } from './session-token.js';
|
|
4
4
|
export { type AccessTokenPayload } from './access-token.js';
|
|
5
|
+
export { StudioSession } from './studio-session.js';
|
package/dist/api/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AccessLevel}from"./access-level.js";export{SessionRole}from"./session-role.js";
|
|
1
|
+
export{AccessLevel}from"./access-level.js";export{SessionRole}from"./session-role.js";export{StudioSession}from"./studio-session.js";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Account and current memberships of a fixed-lifetime Studio browser session; grants no workspace API access. */
|
|
3
|
+
export declare const StudioSession: z.ZodObject<{
|
|
4
|
+
userId: z.ZodString;
|
|
5
|
+
expiresAt: z.ZodNumber;
|
|
6
|
+
workspaces: z.ZodArray<z.ZodObject<{
|
|
7
|
+
customerId: z.ZodString;
|
|
8
|
+
slug: z.ZodString;
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
type: z.ZodNativeEnum<{
|
|
11
|
+
readonly Standard: 'standard';
|
|
12
|
+
readonly SdkBuilder: 'sdk_builder';
|
|
13
|
+
}>;
|
|
14
|
+
role: z.ZodEnum<["user", "admin", "superadmin"]>;
|
|
15
|
+
tags: z.ZodArray<z.ZodString, "many">;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
customerId: string;
|
|
18
|
+
slug: string;
|
|
19
|
+
name: string;
|
|
20
|
+
type: "sdk_builder" | "standard";
|
|
21
|
+
role: "admin" | "superadmin" | "user";
|
|
22
|
+
tags: string[];
|
|
23
|
+
}, {
|
|
24
|
+
customerId: string;
|
|
25
|
+
slug: string;
|
|
26
|
+
name: string;
|
|
27
|
+
type: "sdk_builder" | "standard";
|
|
28
|
+
role: "admin" | "superadmin" | "user";
|
|
29
|
+
tags: string[];
|
|
30
|
+
}>, "many">;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
userId: string;
|
|
33
|
+
expiresAt: number;
|
|
34
|
+
workspaces: {
|
|
35
|
+
customerId: string;
|
|
36
|
+
slug: string;
|
|
37
|
+
name: string;
|
|
38
|
+
type: "sdk_builder" | "standard";
|
|
39
|
+
role: "admin" | "superadmin" | "user";
|
|
40
|
+
tags: string[];
|
|
41
|
+
}[];
|
|
42
|
+
}, {
|
|
43
|
+
userId: string;
|
|
44
|
+
expiresAt: number;
|
|
45
|
+
workspaces: {
|
|
46
|
+
customerId: string;
|
|
47
|
+
slug: string;
|
|
48
|
+
name: string;
|
|
49
|
+
type: "sdk_builder" | "standard";
|
|
50
|
+
role: "admin" | "superadmin" | "user";
|
|
51
|
+
tags: string[];
|
|
52
|
+
}[];
|
|
53
|
+
}>;
|
|
54
|
+
export type StudioSession = z.infer<typeof StudioSession>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as r}from"zod";import{CustomerTypeSchema as s}from"../domain/index.js";export const StudioSession=r.object({userId:r.string().uuid(),expiresAt:r.number(),workspaces:r.array(r.object({customerId:r.string().uuid(),slug:r.string(),name:r.string(),type:s,role:r.enum(["user","admin","superadmin"]),tags:r.array(r.string())}))});
|
|
@@ -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});
|
|
@@ -53,6 +53,7 @@ export declare const DeploymentBuildStatus: ((value: string) => DeploymentBuildS
|
|
|
53
53
|
export interface DeploymentBuild {
|
|
54
54
|
readonly id: DeploymentBuildId;
|
|
55
55
|
readonly environmentId: EnvironmentId;
|
|
56
|
+
readonly number: number | null;
|
|
56
57
|
readonly mode: DeploymentBuildMode;
|
|
57
58
|
readonly status: DeploymentBuildStatus;
|
|
58
59
|
readonly sourceKey: DeploymentBuildSourceKey | null;
|
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.600437cb2f",
|
|
4
4
|
"description": "Shared API, authentication, domain, chat, and webhook contracts for Phoenix.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"salsita",
|
|
@@ -48,23 +48,19 @@
|
|
|
48
48
|
"@tanstack/ai": "0.64.0",
|
|
49
49
|
"@types/aws-lambda": "8.10.133",
|
|
50
50
|
"ajv": "8.20.0",
|
|
51
|
-
"http-errors": "2.0.1",
|
|
52
51
|
"jose": "6.2.3",
|
|
53
|
-
"lodash-es": "4.18.1",
|
|
54
52
|
"openai": "7.23.0",
|
|
55
53
|
"ts-pattern": "5.9.0",
|
|
56
54
|
"uuid": "14.0.0",
|
|
57
55
|
"valid-url": "1.0.9",
|
|
58
56
|
"zod": "3.25.76",
|
|
59
|
-
"@salsita-ai/common": "0.50.0-develop.
|
|
57
|
+
"@salsita-ai/common": "0.50.0-develop.600437cb2f"
|
|
60
58
|
},
|
|
61
59
|
"devDependencies": {
|
|
62
60
|
"@lingui/core": "5.9.5",
|
|
63
61
|
"@swc/cli": "0.8.1",
|
|
64
62
|
"@swc/core": "1.15.40",
|
|
65
|
-
"@types/http-errors": "2.0.5",
|
|
66
63
|
"@types/json-schema": "7.0.15",
|
|
67
|
-
"@types/lodash-es": "4.17.12",
|
|
68
64
|
"@types/valid-url": "1.0.7",
|
|
69
65
|
"eslint": "9.39.4",
|
|
70
66
|
"prettier": "3.8.3",
|