@salsita-ai/contracts 0.50.0-develop.b335a15889 → 0.50.0-develop.bc08a38ffe

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.
@@ -1 +1 @@
1
- import{toolDefinition as e}from"@tanstack/ai";export const browserDetailsTool=e({name:"getBrowserDetails",description:"Captures the user's browser details (user agent, viewport size, device pixel ratio, language) as an image.",inputSchema:{type:"object",properties:{},required:[]}});
1
+ import{toolDefinition as e}from"@tanstack/ai";export const browserDetailsTool=e({name:"getBrowserDetails",description:"Call when the user asks about their browser, screen or device. Returns their browser details as an image.",inputSchema:{type:"object",properties:{},required:[]}});
@@ -20,19 +20,27 @@ export interface AssistantAiSettings {
20
20
  readonly provider: AssistantAiProvider;
21
21
  readonly model: AssistantModelTier;
22
22
  readonly reasoning: AssistantReasoningLevel;
23
+ /**
24
+ * How many input tokens a model call of a thread may reach before the thread is compacted on the
25
+ * user's next message. Defaults to the server's limit; the server also caps it.
26
+ */
27
+ readonly maxThreadSize?: number | undefined;
23
28
  }
24
29
  export declare const AssistantAiSettings: z.ZodObject<{
25
30
  provider: z.ZodEnum<["openai"]>;
26
31
  model: z.ZodEnum<["frontier", "advanced", "balanced", "fast"]>;
27
32
  reasoning: z.ZodEnum<["low", "medium", "high"]>;
33
+ maxThreadSize: z.ZodOptional<z.ZodNumber>;
28
34
  }, "strict", z.ZodTypeAny, {
29
35
  provider: "openai";
30
36
  model: "advanced" | "balanced" | "fast" | "frontier";
31
37
  reasoning: "high" | "low" | "medium";
38
+ maxThreadSize?: number | undefined;
32
39
  }, {
33
40
  provider: "openai";
34
41
  model: "advanced" | "balanced" | "fast" | "frontier";
35
42
  reasoning: "high" | "low" | "medium";
43
+ maxThreadSize?: number | undefined;
36
44
  }>;
37
45
  /**
38
46
  * The setup returned by a deployment webhook: GraphQL SDL, SDK-generated prompt, integrator
@@ -53,14 +61,17 @@ export declare const DeploymentAssistant: z.ZodObject<{
53
61
  provider: z.ZodEnum<["openai"]>;
54
62
  model: z.ZodEnum<["frontier", "advanced", "balanced", "fast"]>;
55
63
  reasoning: z.ZodEnum<["low", "medium", "high"]>;
64
+ maxThreadSize: z.ZodOptional<z.ZodNumber>;
56
65
  }, "strict", z.ZodTypeAny, {
57
66
  provider: "openai";
58
67
  model: "advanced" | "balanced" | "fast" | "frontier";
59
68
  reasoning: "high" | "low" | "medium";
69
+ maxThreadSize?: number | undefined;
60
70
  }, {
61
71
  provider: "openai";
62
72
  model: "advanced" | "balanced" | "fast" | "frontier";
63
73
  reasoning: "high" | "low" | "medium";
74
+ maxThreadSize?: number | undefined;
64
75
  }>;
65
76
  }, "strict", z.ZodTypeAny, {
66
77
  sdl: string;
@@ -70,6 +81,7 @@ export declare const DeploymentAssistant: z.ZodObject<{
70
81
  provider: "openai";
71
82
  model: "advanced" | "balanced" | "fast" | "frontier";
72
83
  reasoning: "high" | "low" | "medium";
84
+ maxThreadSize?: number | undefined;
73
85
  };
74
86
  }, {
75
87
  sdl: string;
@@ -79,5 +91,6 @@ export declare const DeploymentAssistant: z.ZodObject<{
79
91
  provider: "openai";
80
92
  model: "advanced" | "balanced" | "fast" | "frontier";
81
93
  reasoning: "high" | "low" | "medium";
94
+ maxThreadSize?: number | undefined;
82
95
  };
83
96
  }>;
@@ -1 +1 @@
1
- import{z as t}from"zod";export const ASSISTANT_AI_PROVIDERS=["openai"];export const ASSISTANT_MODEL_TIERS=["frontier","advanced","balanced","fast"];export const ASSISTANT_REASONING_LEVELS=["low","medium","high"];export const AssistantAiSettings=t.object({provider:t.enum(ASSISTANT_AI_PROVIDERS),model:t.enum(ASSISTANT_MODEL_TIERS),reasoning:t.enum(ASSISTANT_REASONING_LEVELS)}).strict();export const DeploymentAssistant=t.object({sdl:t.string().min(1),prompt:t.string().min(1),instructions:t.string().min(1).optional(),ai:AssistantAiSettings}).strict();
1
+ import{z as t}from"zod";export const ASSISTANT_AI_PROVIDERS=["openai"];export const ASSISTANT_MODEL_TIERS=["frontier","advanced","balanced","fast"];export const ASSISTANT_REASONING_LEVELS=["low","medium","high"];export const AssistantAiSettings=t.object({provider:t.enum(ASSISTANT_AI_PROVIDERS),model:t.enum(ASSISTANT_MODEL_TIERS),reasoning:t.enum(ASSISTANT_REASONING_LEVELS),maxThreadSize:t.number().int().positive().optional()}).strict();export const DeploymentAssistant=t.object({sdl:t.string().min(1),prompt:t.string().min(1),instructions:t.string().min(1).optional(),ai:AssistantAiSettings}).strict();
@@ -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:"Runs GraphQL operations against the open configuration and returns their results. Nothing is changed: mutations in the list are applied to a temporary copy that is discarded after the call, which shows what a change would do.",inputSchema:o});export const applyTool=e({name:"apply",description:"Runs GraphQL operations against the open configuration and keeps their changes as one undo step. All or nothing: when any operation fails, nothing is changed. The result says whether the changes were committed.",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.",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});
@@ -330,7 +330,11 @@ export declare const AssistantSetupPayload: z.ZodObject<{
330
330
  access: "o" | "r" | "rr";
331
331
  }>;
332
332
  export type AssistantSetupPayload = z.infer<typeof AssistantSetupPayload>;
333
- /** A deployment's assistant setup, or a session for which no assistant is available. */
333
+ /**
334
+ * A deployment's assistant setup, or a session for which no assistant is available. `threadLock`
335
+ * is outside the setup a thread is bound to: `'strict'` asks a development environment to lock a
336
+ * thread when the setup changes, as every other environment always does.
337
+ */
334
338
  export declare const AssistantSetupResponse: z.ZodObject<{
335
339
  setup: z.ZodNullable<z.ZodObject<{
336
340
  sdl: z.ZodString;
@@ -340,14 +344,17 @@ export declare const AssistantSetupResponse: z.ZodObject<{
340
344
  provider: z.ZodEnum<["openai"]>;
341
345
  model: z.ZodEnum<["frontier", "advanced", "balanced", "fast"]>;
342
346
  reasoning: z.ZodEnum<["low", "medium", "high"]>;
347
+ maxThreadSize: z.ZodOptional<z.ZodNumber>;
343
348
  }, "strict", z.ZodTypeAny, {
344
349
  provider: "openai";
345
350
  model: "advanced" | "balanced" | "fast" | "frontier";
346
351
  reasoning: "high" | "low" | "medium";
352
+ maxThreadSize?: number | undefined;
347
353
  }, {
348
354
  provider: "openai";
349
355
  model: "advanced" | "balanced" | "fast" | "frontier";
350
356
  reasoning: "high" | "low" | "medium";
357
+ maxThreadSize?: number | undefined;
351
358
  }>;
352
359
  }, "strict", z.ZodTypeAny, {
353
360
  sdl: string;
@@ -357,6 +364,7 @@ export declare const AssistantSetupResponse: z.ZodObject<{
357
364
  provider: "openai";
358
365
  model: "advanced" | "balanced" | "fast" | "frontier";
359
366
  reasoning: "high" | "low" | "medium";
367
+ maxThreadSize?: number | undefined;
360
368
  };
361
369
  }, {
362
370
  sdl: string;
@@ -366,8 +374,10 @@ export declare const AssistantSetupResponse: z.ZodObject<{
366
374
  provider: "openai";
367
375
  model: "advanced" | "balanced" | "fast" | "frontier";
368
376
  reasoning: "high" | "low" | "medium";
377
+ maxThreadSize?: number | undefined;
369
378
  };
370
379
  }>>;
380
+ threadLock: z.ZodOptional<z.ZodLiteral<"strict">>;
371
381
  }, "strict", z.ZodTypeAny, {
372
382
  setup: {
373
383
  sdl: string;
@@ -377,8 +387,10 @@ export declare const AssistantSetupResponse: z.ZodObject<{
377
387
  provider: "openai";
378
388
  model: "advanced" | "balanced" | "fast" | "frontier";
379
389
  reasoning: "high" | "low" | "medium";
390
+ maxThreadSize?: number | undefined;
380
391
  };
381
392
  } | null;
393
+ threadLock?: "strict" | undefined;
382
394
  }, {
383
395
  setup: {
384
396
  sdl: string;
@@ -388,7 +400,9 @@ export declare const AssistantSetupResponse: z.ZodObject<{
388
400
  provider: "openai";
389
401
  model: "advanced" | "balanced" | "fast" | "frontier";
390
402
  reasoning: "high" | "low" | "medium";
403
+ maxThreadSize?: number | undefined;
391
404
  };
392
405
  } | null;
406
+ threadLock?: "strict" | undefined;
393
407
  }>;
394
408
  export type AssistantSetupResponse = z.infer<typeof AssistantSetupResponse>;
@@ -1 +1 @@
1
- import{z as o}from"zod";import{usingType as n}from"@salsita-ai/common/utils";import{AccessLevel as e,SessionRole as t}from"../../api/index.js";import{DeploymentAssistant as r}from"../../assistant/index.js";import{ConfigurationId as s,DeploymentId as a,FrontendUrl as i,RevisionId as l}from"../../domain/index.js";import{CallLambdaBackResourceType as c}from"../tasks/index.js";export const CallbackPayload=o.object({replayData:o.record(o.unknown()),resources:o.record(o.object({type:o.literal(c.Link),link:o.string()}))});export const CallbackResponse=o.object({result:o.record(o.unknown()).optional()});export const AuthUserIdSource=o.enum(["clerk","custom"]);export const AuthHandlerResponse=o.discriminatedUnion("success",[o.object({success:o.literal(!0),data:o.record(o.unknown()),role:o.nativeEnum(t),refreshToken:o.string().optional(),expirationTime:o.number().optional(),scopes:o.array(o.string()).optional(),userId:o.string().optional(),userIdSource:AuthUserIdSource.optional()}),o.object({success:o.literal(!1)})]);export const RefreshPayload=o.object({type:o.literal("refresh"),refreshToken:o.string()});export const CodePayload=o.object({type:o.literal("code"),accessToken:o.string(),refreshToken:o.string().optional(),idToken:o.string().optional()});export const AnonymousPayload=o.object({type:o.literal("anonymous")});export const AuthPayload=o.union([RefreshPayload,CodePayload,AnonymousPayload]);export const FinalizeWebhookPayload=o.object({configurationId:o.string().transform(n(s)),revisionId:o.string().transform(n(l)),deploymentId:o.string().transform(n(a)),frontendUrl:o.string().transform(n(i)),rootEntityType:o.string(),entities:o.array(o.object({type:o.string(),id:o.string()}).and(o.record(o.unknown()))),modelVersion:o.number().positive(),data:o.record(o.unknown()),frontendData:o.record(o.unknown()).optional(),locale:o.string(),sessionRole:o.nativeEnum(t),sessionPayload:o.record(o.unknown()),publishedAdminRevisionPath:o.string().optional(),publishedChunkUrls:o.record(o.string()).optional(),chunksUploadUrl:o.string().optional(),connectedProviderAccessTokens:o.record(o.string()).optional()});export const FetchBackendDataPayload=o.object({deploymentId:o.string().transform(n(a)),frontendUrl:o.string().transform(n(i)),frontendData:o.record(o.unknown()).optional(),sessionRole:o.nativeEnum(t),sessionPayload:o.record(o.unknown()),publishedAdminRevisionPath:o.string().optional(),publishedChunkUrls:o.record(o.string()).optional()});export const FetchBackendDataHandlerResponse=o.object({backendData:o.record(o.unknown())});export const AssistantSetupPayload=o.object({deploymentId:o.string().transform(n(a)),sessionRole:o.nativeEnum(t),sessionPayload:o.record(o.unknown()),sub:o.string().optional(),access:o.nativeEnum(e)});export const AssistantSetupResponse=o.object({setup:r.nullable()}).strict();
1
+ import{z as o}from"zod";import{usingType as n}from"@salsita-ai/common/utils";import{AccessLevel as e,SessionRole as t}from"../../api/index.js";import{DeploymentAssistant as r}from"../../assistant/index.js";import{ConfigurationId as s,DeploymentId as a,FrontendUrl as i,RevisionId as l}from"../../domain/index.js";import{CallLambdaBackResourceType as c}from"../tasks/index.js";export const CallbackPayload=o.object({replayData:o.record(o.unknown()),resources:o.record(o.object({type:o.literal(c.Link),link:o.string()}))});export const CallbackResponse=o.object({result:o.record(o.unknown()).optional()});export const AuthUserIdSource=o.enum(["clerk","custom"]);export const AuthHandlerResponse=o.discriminatedUnion("success",[o.object({success:o.literal(!0),data:o.record(o.unknown()),role:o.nativeEnum(t),refreshToken:o.string().optional(),expirationTime:o.number().optional(),scopes:o.array(o.string()).optional(),userId:o.string().optional(),userIdSource:AuthUserIdSource.optional()}),o.object({success:o.literal(!1)})]);export const RefreshPayload=o.object({type:o.literal("refresh"),refreshToken:o.string()});export const CodePayload=o.object({type:o.literal("code"),accessToken:o.string(),refreshToken:o.string().optional(),idToken:o.string().optional()});export const AnonymousPayload=o.object({type:o.literal("anonymous")});export const AuthPayload=o.union([RefreshPayload,CodePayload,AnonymousPayload]);export const FinalizeWebhookPayload=o.object({configurationId:o.string().transform(n(s)),revisionId:o.string().transform(n(l)),deploymentId:o.string().transform(n(a)),frontendUrl:o.string().transform(n(i)),rootEntityType:o.string(),entities:o.array(o.object({type:o.string(),id:o.string()}).and(o.record(o.unknown()))),modelVersion:o.number().positive(),data:o.record(o.unknown()),frontendData:o.record(o.unknown()).optional(),locale:o.string(),sessionRole:o.nativeEnum(t),sessionPayload:o.record(o.unknown()),publishedAdminRevisionPath:o.string().optional(),publishedChunkUrls:o.record(o.string()).optional(),chunksUploadUrl:o.string().optional(),connectedProviderAccessTokens:o.record(o.string()).optional()});export const FetchBackendDataPayload=o.object({deploymentId:o.string().transform(n(a)),frontendUrl:o.string().transform(n(i)),frontendData:o.record(o.unknown()).optional(),sessionRole:o.nativeEnum(t),sessionPayload:o.record(o.unknown()),publishedAdminRevisionPath:o.string().optional(),publishedChunkUrls:o.record(o.string()).optional()});export const FetchBackendDataHandlerResponse=o.object({backendData:o.record(o.unknown())});export const AssistantSetupPayload=o.object({deploymentId:o.string().transform(n(a)),sessionRole:o.nativeEnum(t),sessionPayload:o.record(o.unknown()),sub:o.string().optional(),access:o.nativeEnum(e)});export const AssistantSetupResponse=o.object({setup:r.nullable(),threadLock:o.literal("strict").optional()}).strict();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salsita-ai/contracts",
3
- "version": "0.50.0-develop.b335a15889",
3
+ "version": "0.50.0-develop.bc08a38ffe",
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.b335a15889"
59
+ "@salsita-ai/common": "0.50.0-develop.bc08a38ffe"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@lingui/core": "5.9.5",