@salsita-ai/contracts 0.50.0-develop.1162eef277 → 0.50.0-develop.12744a81f2

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.
Files changed (141) hide show
  1. package/README.md +14 -3
  2. package/dist/api/cli-access.d.ts +60 -0
  3. package/dist/api/cli-access.js +1 -0
  4. package/dist/api/cli-login-approval.d.ts +15 -0
  5. package/dist/api/cli-login-approval.js +1 -0
  6. package/dist/api/cli-sign-in.d.ts +23 -0
  7. package/dist/api/cli-sign-in.js +1 -0
  8. package/dist/api/index.d.ts +6 -0
  9. package/dist/api/index.js +1 -1
  10. package/dist/api/session-token.d.ts +1 -1
  11. package/dist/api/studio-session.d.ts +104 -0
  12. package/dist/api/studio-session.js +1 -0
  13. package/dist/api/workspace-creation-options.d.ts +19 -0
  14. package/dist/api/workspace-creation-options.js +1 -0
  15. package/dist/api/workspace-creation.d.ts +19 -0
  16. package/dist/api/workspace-creation.js +1 -0
  17. package/dist/assistant/ban-tool.d.ts +17 -0
  18. package/dist/assistant/ban-tool.js +1 -0
  19. package/dist/assistant/deployment-assistant.d.ts +154 -0
  20. package/dist/assistant/deployment-assistant.js +1 -1
  21. package/dist/assistant/graphql-tools.d.ts +18 -3
  22. package/dist/assistant/graphql-tools.js +1 -1
  23. package/dist/assistant/image-reference.d.ts +10 -0
  24. package/dist/assistant/image-reference.js +1 -0
  25. package/dist/assistant/index.d.ts +9 -4
  26. package/dist/assistant/index.js +1 -1
  27. package/dist/assistant/message-metadata.d.ts +138 -1
  28. package/dist/assistant/message-metadata.js +1 -1
  29. package/dist/assistant/speech-text.d.ts +15 -0
  30. package/dist/assistant/speech-text.js +1 -0
  31. package/dist/assistant/transcript-event.d.ts +25 -0
  32. package/dist/assistant/transcript-event.js +1 -0
  33. package/dist/assistant/voice-recording.d.ts +13 -0
  34. package/dist/assistant/voice-recording.js +1 -0
  35. package/dist/chat/api.d.ts +0 -41
  36. package/dist/chat/api.js +1 -1
  37. package/dist/chat/completions/types.d.ts +0 -3
  38. package/dist/chat/completions/types.js +1 -1
  39. package/dist/chat/functions/process.d.ts +1 -2
  40. package/dist/chat/functions/process.js +1 -1
  41. package/dist/chat/index.d.ts +3 -6
  42. package/dist/chat/index.js +1 -1
  43. package/dist/domain/account-status.d.ts +6 -0
  44. package/dist/domain/account-status.js +1 -0
  45. package/dist/domain/deployments/activations/environment-activation-kind.d.ts +11 -0
  46. package/dist/domain/deployments/activations/environment-activation-kind.js +1 -0
  47. package/dist/domain/deployments/activations/index.d.ts +2 -0
  48. package/dist/domain/deployments/activations/index.js +1 -0
  49. package/dist/domain/deployments/activations/production-rollback-state.d.ts +14 -0
  50. package/dist/domain/deployments/activations/production-rollback-state.js +1 -0
  51. package/dist/domain/deployments/api-tokens/index.d.ts +1 -0
  52. package/dist/domain/deployments/api-tokens/index.js +1 -0
  53. package/dist/domain/deployments/api-tokens/limits.d.ts +16 -0
  54. package/dist/domain/deployments/api-tokens/limits.js +1 -0
  55. package/dist/domain/deployments/assistant-limit-domain.d.ts +13 -0
  56. package/dist/domain/deployments/assistant-limit-domain.js +1 -0
  57. package/dist/domain/deployments/custom-domains/custom-domain.d.ts +40 -0
  58. package/dist/domain/deployments/custom-domains/custom-domain.js +1 -0
  59. package/dist/domain/deployments/custom-domains/index.d.ts +1 -0
  60. package/dist/domain/deployments/custom-domains/index.js +1 -0
  61. package/dist/domain/deployments/customer-domain.d.ts +2 -0
  62. package/dist/domain/deployments/deployment-build-domain.d.ts +18 -0
  63. package/dist/domain/deployments/deployment-domain.d.ts +2 -0
  64. package/dist/domain/deployments/environment-domain.d.ts +3 -0
  65. package/dist/domain/deployments/index.d.ts +9 -1
  66. package/dist/domain/deployments/index.js +1 -1
  67. package/dist/domain/deployments/oauth-connection-domain.d.ts +0 -7
  68. package/dist/domain/deployments/oauth-connection-domain.js +1 -1
  69. package/dist/domain/deployments/previews/index.d.ts +2 -0
  70. package/dist/domain/deployments/previews/index.js +1 -0
  71. package/dist/domain/deployments/previews/preview-limits.d.ts +5 -0
  72. package/dist/domain/deployments/previews/preview-limits.js +1 -0
  73. package/dist/domain/deployments/previews/preview-name.d.ts +23 -0
  74. package/dist/domain/deployments/previews/preview-name.js +1 -0
  75. package/dist/domain/deployments/project-domain.d.ts +6 -3
  76. package/dist/domain/deployments/sdk-builder-environment-domain.d.ts +20 -0
  77. package/dist/domain/deployments/sdk-builder-environment-domain.js +1 -0
  78. package/dist/domain/deployments/sdk-builder-project-domain.d.ts +22 -0
  79. package/dist/domain/deployments/sdk-builder-project-domain.js +1 -0
  80. package/dist/domain/deployments/sdk-builder-setup-domain.d.ts +5 -4
  81. package/dist/domain/deployments/teardowns/index.d.ts +1 -0
  82. package/dist/domain/deployments/teardowns/index.js +1 -0
  83. package/dist/domain/deployments/teardowns/teardown-status.d.ts +23 -0
  84. package/dist/domain/deployments/teardowns/teardown-status.js +1 -0
  85. package/dist/domain/index.d.ts +6 -0
  86. package/dist/domain/index.js +1 -1
  87. package/dist/domain/password-policy.d.ts +22 -0
  88. package/dist/domain/password-policy.js +1 -0
  89. package/dist/domain/product-configurations/analytics/configuration-chart-definition.d.ts +798 -0
  90. package/dist/domain/product-configurations/analytics/configuration-chart-definition.js +1 -0
  91. package/dist/domain/product-configurations/analytics/index.d.ts +1 -0
  92. package/dist/domain/product-configurations/analytics/index.js +1 -0
  93. package/dist/domain/product-configurations/configuration-insight-field.d.ts +54 -0
  94. package/dist/domain/product-configurations/configuration-insight-field.js +1 -0
  95. package/dist/domain/product-configurations/configuration-insight-status.d.ts +4 -0
  96. package/dist/domain/product-configurations/configuration-insight-status.js +1 -0
  97. package/dist/domain/product-configurations/configuration-insight-value.d.ts +114 -0
  98. package/dist/domain/product-configurations/configuration-insight-value.js +1 -0
  99. package/dist/domain/product-configurations/configurations-domain.d.ts +2 -7
  100. package/dist/domain/product-configurations/configurations-domain.js +1 -1
  101. package/dist/domain/product-configurations/index.d.ts +5 -1
  102. package/dist/domain/product-configurations/index.js +1 -1
  103. package/dist/domain/workspace-invitation-role.d.ts +7 -0
  104. package/dist/domain/workspace-invitation-role.js +1 -0
  105. package/dist/domain/workspace-invitation.d.ts +7 -0
  106. package/dist/domain/workspace-invitation.js +1 -0
  107. package/dist/domain/workspace-lifecycle/disabled-workspace-status.d.ts +7 -0
  108. package/dist/domain/workspace-lifecycle/disabled-workspace-status.js +1 -0
  109. package/dist/domain/workspace-lifecycle/index.d.ts +3 -0
  110. package/dist/domain/workspace-lifecycle/index.js +1 -0
  111. package/dist/domain/workspace-lifecycle/workspace-disabled-message.d.ts +6 -0
  112. package/dist/domain/workspace-lifecycle/workspace-disabled-message.js +1 -0
  113. package/dist/domain/workspace-lifecycle/workspace-status.d.ts +13 -0
  114. package/dist/domain/workspace-lifecycle/workspace-status.js +1 -0
  115. package/dist/domain/workspace-membership-status.d.ts +6 -0
  116. package/dist/domain/workspace-membership-status.js +1 -0
  117. package/dist/webhook/implementation/backend-data-response.d.ts +3 -0
  118. package/dist/webhook/implementation/backend-data-response.js +1 -0
  119. package/dist/webhook/implementation/configuration-insights-payload.d.ts +41 -0
  120. package/dist/webhook/implementation/configuration-insights-payload.js +1 -0
  121. package/dist/webhook/implementation/configuration-insights-response.d.ts +184 -0
  122. package/dist/webhook/implementation/configuration-insights-response.js +1 -0
  123. package/dist/webhook/implementation/index.d.ts +3 -2
  124. package/dist/webhook/implementation/index.js +1 -1
  125. package/dist/webhook/implementation/webhook-api-types.d.ts +188 -6
  126. package/dist/webhook/implementation/webhook-api-types.js +1 -1
  127. package/dist/webhook/implementation/webhook-routing.d.ts +3 -6
  128. package/dist/webhook/implementation/webhook-routing.js +1 -1
  129. package/dist/webhook/implementation/webhook-tunnel-types.d.ts +9 -0
  130. package/dist/webhook/implementation/webhook-tunnel-types.js +1 -1
  131. package/package.json +5 -6
  132. package/dist/assistant/browser-details-tool.d.ts +0 -16
  133. package/dist/assistant/browser-details-tool.js +0 -1
  134. package/dist/chat/completions/messages.d.ts +0 -3
  135. package/dist/chat/completions/messages.js +0 -1
  136. package/dist/chat/functions/augmentations.d.ts +0 -3
  137. package/dist/chat/functions/augmentations.js +0 -1
  138. package/dist/chat/functions/create.d.ts +0 -5
  139. package/dist/chat/functions/create.js +0 -1
  140. package/dist/webhook/implementation/webhook-client.d.ts +0 -86
  141. package/dist/webhook/implementation/webhook-client.js +0 -1
@@ -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({title:t.string().nullish().catch(void 0),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:{title:{type:"string",description:"A short name of this call for the user, two to five words in their language, saying what it does."},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. `errors` say why an operation failed; `warnings` are what its changes would newly cause, and do not make it fail. 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. A call that only moves the user between pages, views and tools, or only changes the selection, makes no undo step by itself; with configuration changes it is part of their step. All or nothing: when any operation fails, nothing changes. `committed` says whether the changes were kept. `errors` say why an operation failed; `warnings` are what the changes newly cause, and do not stop them. Screenshots the operations take follow the results as images, each after its label.",inputSchema:o});
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The URL an image part carries for an image the browser uploaded, a screenshot in an assistant tool
3
+ * result or an image the user attached to their message: `assistant-image:<imageId>`, the id the
4
+ * server's image upload answered with. The thread stores
5
+ * the reference; the server swaps it for the image only in the copy of the thread sent to the model,
6
+ * and the panel fetches the image by its id.
7
+ */
8
+ export declare const assistantImageReference: (imageId: string) => string;
9
+ /** The image id of an `assistant-image:` reference; `null` for any other URL. */
10
+ 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};
@@ -1,8 +1,13 @@
1
- export { browserDetailsTool } from './browser-details-tool.js';
2
- export { ASSISTANT_AI_PROVIDERS, ASSISTANT_MODEL_TIERS, ASSISTANT_REASONING_LEVELS, AssistantAiSettings, DeploymentAssistant, } from './deployment-assistant.js';
1
+ export { ASSISTANT_AI_PROVIDERS, ASSISTANT_HOURLY_LIMIT_LEVELS, ASSISTANT_HOURLY_LIMIT_MAXIMA, ASSISTANT_MODEL_TIERS, ASSISTANT_REASONING_LEVELS, ASSISTANT_MAX_THREAD_SIZE, ASSISTANT_MAX_TOOL_CALLS_PER_MESSAGE, ASSISTANT_MAX_RETENTION_DAYS, AssistantAiSettings, DeploymentAssistant, } from './deployment-assistant.js';
2
+ export { banTool } from './ban-tool.js';
3
3
  export { AssistantGraphQLToolInput, applyTool, queryTool } from './graphql-tools.js';
4
4
  export type { AssistantGraphQLOperation } from './graphql-tools.js';
5
- export type { AssistantAiProvider, AssistantModelTier, AssistantReasoningLevel } from './deployment-assistant.js';
6
- export { AssistantMessageMetadata } from './message-metadata.js';
5
+ export type { AssistantAiProvider, AssistantHourlyLimitLevel, AssistantHourlyLimits, AssistantModelTier, AssistantReasoningLevel, } from './deployment-assistant.js';
6
+ export { assistantImageReference, readAssistantImageReference } from './image-reference.js';
7
+ export { AssistantAnnotationPin, AssistantAnnotationSource, AssistantMessageAnnotation, 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';
10
+ export { ASSISTANT_TRANSCRIPT_EVENT, AssistantTranscriptEvent } from './transcript-event.js';
11
+ export { ASSISTANT_VOICE_MIME_TYPES, readAssistantVoiceMimeType } from './voice-recording.js';
12
+ export type { AssistantVoiceMimeType } from './voice-recording.js';
13
+ export { ASSISTANT_SPEECH_MAX_CHARACTERS, buildSpeechText } from './speech-text.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";export{ASSISTANT_TOOL_ERROR_CODES,AssistantToolError}from"./tool-error.js";
1
+ export{ASSISTANT_AI_PROVIDERS,ASSISTANT_HOURLY_LIMIT_LEVELS,ASSISTANT_HOURLY_LIMIT_MAXIMA,ASSISTANT_MODEL_TIERS,ASSISTANT_REASONING_LEVELS,ASSISTANT_MAX_THREAD_SIZE,ASSISTANT_MAX_TOOL_CALLS_PER_MESSAGE,ASSISTANT_MAX_RETENTION_DAYS,AssistantAiSettings,DeploymentAssistant}from"./deployment-assistant.js";export{banTool}from"./ban-tool.js";export{AssistantGraphQLToolInput,applyTool,queryTool}from"./graphql-tools.js";export{assistantImageReference,readAssistantImageReference}from"./image-reference.js";export{AssistantAnnotationPin,AssistantAnnotationSource,AssistantMessageAnnotation,AssistantMessageMetadata}from"./message-metadata.js";export{ASSISTANT_TOOL_ERROR_CODES,AssistantToolError}from"./tool-error.js";export{ASSISTANT_TRANSCRIPT_EVENT,AssistantTranscriptEvent}from"./transcript-event.js";export{ASSISTANT_VOICE_MIME_TYPES,readAssistantVoiceMimeType}from"./voice-recording.js";export{ASSISTANT_SPEECH_MAX_CHARACTERS,buildSpeechText}from"./speech-text.js";
@@ -1,17 +1,154 @@
1
1
  import { z } from 'zod';
2
+ /**
3
+ * A numbered comment the user pinned onto an annotation. `x` and `y` are where it points, as
4
+ * fractions 0–1 of the annotation image's width and height from its top left corner. Its number, drawn
5
+ * on the image and named in the text for the model, is its position in the annotation's `pins`, from 1.
6
+ */
7
+ export interface AssistantAnnotationPin {
8
+ readonly x: number;
9
+ readonly y: number;
10
+ readonly comment: string;
11
+ }
12
+ export declare const AssistantAnnotationPin: z.ZodObject<{
13
+ x: z.ZodNumber;
14
+ y: z.ZodNumber;
15
+ comment: z.ZodString;
16
+ }, "strip", z.ZodTypeAny, {
17
+ x: number;
18
+ y: number;
19
+ comment: string;
20
+ }, {
21
+ x: number;
22
+ y: number;
23
+ comment: string;
24
+ }>;
25
+ /**
26
+ * What the user annotated: `view`, a frozen view of their configurator, or `image`, an image they
27
+ * opened in the editor, such as a drawing of the assistant.
28
+ */
29
+ export type AssistantAnnotationSource = 'view' | 'image';
30
+ export declare const AssistantAnnotationSource: z.ZodEnum<["view", "image"]>;
31
+ /**
32
+ * An annotation the user attached to a message: a frozen view of their configurator or an image, with
33
+ * their marker strokes and numbered pins flattened into one image, which the message references like
34
+ * any attached image, and the comments of the pins, which the image shows only as numbers.
35
+ */
36
+ export interface AssistantMessageAnnotation {
37
+ /** The id of the annotation image, as the message's image part references it. */
38
+ readonly imageId: string;
39
+ readonly pins: ReadonlyArray<AssistantAnnotationPin>;
40
+ /** What was annotated. Absent on messages from clients and versions that do not send it, which annotated the view. */
41
+ readonly source?: AssistantAnnotationSource;
42
+ }
43
+ export declare const AssistantMessageAnnotation: z.ZodObject<{
44
+ imageId: z.ZodString;
45
+ pins: z.ZodArray<z.ZodObject<{
46
+ x: z.ZodNumber;
47
+ y: z.ZodNumber;
48
+ comment: z.ZodString;
49
+ }, "strip", z.ZodTypeAny, {
50
+ x: number;
51
+ y: number;
52
+ comment: string;
53
+ }, {
54
+ x: number;
55
+ y: number;
56
+ comment: string;
57
+ }>, "many">;
58
+ source: z.ZodOptional<z.ZodEnum<["view", "image"]>>;
59
+ }, "strip", z.ZodTypeAny, {
60
+ imageId: string;
61
+ pins: {
62
+ x: number;
63
+ y: number;
64
+ comment: string;
65
+ }[];
66
+ source?: "image" | "view" | undefined;
67
+ }, {
68
+ imageId: string;
69
+ pins: {
70
+ x: number;
71
+ y: number;
72
+ comment: string;
73
+ }[];
74
+ source?: "image" | "view" | undefined;
75
+ }>;
2
76
  /**
3
77
  * Metadata the assistant chat client attaches to each user message (AG-UI message `metadata`). It is
4
78
  * 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.
79
+ * the model knows what the user did in the configurator since it last acted. It also tells the model
80
+ * which language to reply in, on a thread's first user message and wherever `locale` changed, and
81
+ * lists the comments of the message's annotations.
6
82
  */
7
83
  export interface AssistantMessageMetadata {
8
84
  /** The change record since the agent's previous action: a marker or a diff, as the assistant prompt describes it. */
9
85
  readonly changes: string;
86
+ /**
87
+ * The locale the configurator showed when the user sent the message, as its i18n code (e.g. `de` or
88
+ * `de-AT`). Absent on messages from clients and versions that do not send it.
89
+ */
90
+ readonly locale?: string;
91
+ /** The annotations among the message's images, in their order. Absent on messages without any. */
92
+ readonly annotations?: ReadonlyArray<AssistantMessageAnnotation>;
93
+ /**
94
+ * True on a message the user spoke: the server transcribed its recording and stored the transcript
95
+ * as its text. Set by the server only; it drops the claim from a message that carries no recording.
96
+ */
97
+ readonly spoken?: true;
10
98
  }
11
99
  export declare const AssistantMessageMetadata: z.ZodObject<{
12
100
  changes: z.ZodString;
101
+ locale: z.ZodOptional<z.ZodString>;
102
+ annotations: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
103
+ imageId: z.ZodString;
104
+ pins: z.ZodArray<z.ZodObject<{
105
+ x: z.ZodNumber;
106
+ y: z.ZodNumber;
107
+ comment: z.ZodString;
108
+ }, "strip", z.ZodTypeAny, {
109
+ x: number;
110
+ y: number;
111
+ comment: string;
112
+ }, {
113
+ x: number;
114
+ y: number;
115
+ comment: string;
116
+ }>, "many">;
117
+ source: z.ZodOptional<z.ZodEnum<["view", "image"]>>;
118
+ }, "strip", z.ZodTypeAny, {
119
+ imageId: string;
120
+ pins: {
121
+ x: number;
122
+ y: number;
123
+ comment: string;
124
+ }[];
125
+ source?: "image" | "view" | undefined;
126
+ }, {
127
+ imageId: string;
128
+ pins: {
129
+ x: number;
130
+ y: number;
131
+ comment: string;
132
+ }[];
133
+ source?: "image" | "view" | undefined;
134
+ }>, "many">>>;
135
+ spoken: z.ZodCatch<z.ZodOptional<z.ZodLiteral<true>>>;
13
136
  }, "strip", z.ZodTypeAny, {
14
137
  changes: string;
138
+ locale?: string | undefined;
139
+ annotations?: {
140
+ imageId: string;
141
+ pins: {
142
+ x: number;
143
+ y: number;
144
+ comment: string;
145
+ }[];
146
+ source?: "image" | "view" | undefined;
147
+ }[] | undefined;
148
+ spoken?: true | undefined;
15
149
  }, {
16
150
  changes: string;
151
+ locale?: string | undefined;
152
+ annotations?: unknown;
153
+ spoken?: unknown;
17
154
  }>;
@@ -1 +1 @@
1
- import{z as t}from"zod";export const AssistantMessageMetadata=t.object({changes:t.string()});
1
+ import{z as t}from"zod";export const AssistantAnnotationPin=t.object({x:t.number().min(0).max(1),y:t.number().min(0).max(1),comment:t.string()});export const AssistantAnnotationSource=t.enum(["view","image"]);export const AssistantMessageAnnotation=t.object({imageId:t.string(),pins:t.array(AssistantAnnotationPin),source:AssistantAnnotationSource.optional()});export const AssistantMessageMetadata=t.object({changes:t.string(),locale:t.string().optional(),annotations:t.array(AssistantMessageAnnotation).optional().catch(void 0),spoken:t.literal(!0).optional().catch(void 0)});
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The longest speech text of a reply the server reads aloud, in characters. A voice turn is prompted
3
+ * for a short reply, so a longer one is a reply written to be read, and the panel shows it no play button.
4
+ */
5
+ export declare const ASSISTANT_SPEECH_MAX_CHARACTERS = 1500;
6
+ /**
7
+ * What the server reads aloud of an assistant reply: its text parts, as the panel renders each as
8
+ * Markdown, cleaned to plain sentences. Fenced code, tables and images are dropped; links read as
9
+ * their text; headings, list items and alert blocks become sentences without their markers; bold,
10
+ * italic and inline code keep their words. Empty for a reply that has nothing to say aloud.
11
+ *
12
+ * The panel shows a play button only for a reply whose speech text is not empty and within
13
+ * {@link ASSISTANT_SPEECH_MAX_CHARACTERS}, which the server refuses to synthesize otherwise.
14
+ */
15
+ export declare const buildSpeechText: (texts: ReadonlyArray<string>) => string;
@@ -0,0 +1 @@
1
+ let e;import{remark as r}from"remark";import t from"remark-gfm";export const ASSISTANT_SPEECH_MAX_CHARACTERS=1500;let a=/^\s*\[![a-z]+\]\s*/i,c=/[.!?…:;]$/,s=e=>e.map(e=>{switch(e.type){case"text":case"inlineCode":return e.value;case"break":return" ";case"emphasis":case"strong":case"delete":case"link":case"linkReference":return s(e.children);default:return""}}).join(""),l=(e,r)=>e.flatMap((e,t)=>{switch(e.type){case"paragraph":case"heading":{let l,n=s(e.children);return""===(l=(r&&0===t?n.replace(a,""):n).replace(/\s+/g," ").replace(/ ([.,!?;:])/g,"$1").trim())?[]:[c.test(l)?l:`${l}.`]}case"blockquote":return l(e.children,!0);case"list":case"listItem":return l(e.children,!1);default:return[]}});export const buildSpeechText=a=>a.flatMap(a=>l((e??=r().use(t)).parse(a).children,!1)).join(" ");
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * The name of the AG-UI `CUSTOM` event that opens the stream of a run started by a voice message: the
4
+ * transcript the server stored as the message's text, in place of the recording.
5
+ */
6
+ export declare const ASSISTANT_TRANSCRIPT_EVENT = "assistant:transcript";
7
+ /**
8
+ * The value of an {@link ASSISTANT_TRANSCRIPT_EVENT} event. The browser puts the transcript in its
9
+ * own copy of the message, so no later request posts the recording again.
10
+ */
11
+ export interface AssistantTranscriptEvent {
12
+ /** The id of the user message the browser sent the recording in. */
13
+ readonly messageId: string;
14
+ readonly transcript: string;
15
+ }
16
+ export declare const AssistantTranscriptEvent: z.ZodObject<{
17
+ messageId: z.ZodString;
18
+ transcript: z.ZodString;
19
+ }, "strip", z.ZodTypeAny, {
20
+ messageId: string;
21
+ transcript: string;
22
+ }, {
23
+ messageId: string;
24
+ transcript: string;
25
+ }>;
@@ -0,0 +1 @@
1
+ import{z as t}from"zod";export const ASSISTANT_TRANSCRIPT_EVENT="assistant:transcript";export const AssistantTranscriptEvent=t.object({messageId:t.string(),transcript:t.string()});
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The audio types a voice message may be recorded in: what `MediaRecorder` produces in the browsers
3
+ * the panel supports, webm/Opus in most and mp4/AAC in Safari, and Ogg/Opus. The server sends the
4
+ * recording to the transcription model as it is, without transcoding it.
5
+ */
6
+ export declare const ASSISTANT_VOICE_MIME_TYPES: readonly ['audio/webm', 'audio/mp4', 'audio/ogg'];
7
+ /** An audio type a voice message may be recorded in; see {@link ASSISTANT_VOICE_MIME_TYPES}. */
8
+ export type AssistantVoiceMimeType = (typeof ASSISTANT_VOICE_MIME_TYPES)[number];
9
+ /**
10
+ * The voice type of a recording's MIME type, as `MediaRecorder` reports it, its parameters such as
11
+ * `codecs` ignored; `null` for a type a voice message may not be recorded in.
12
+ */
13
+ export declare const readAssistantVoiceMimeType: (mimeType: string) => AssistantVoiceMimeType | null;
@@ -0,0 +1 @@
1
+ export const ASSISTANT_VOICE_MIME_TYPES=["audio/webm","audio/mp4","audio/ogg"];export const readAssistantVoiceMimeType=e=>{let o=e.split(";")[0]?.trim().toLowerCase()??"";return ASSISTANT_VOICE_MIME_TYPES.find(e=>e===o)??null};
@@ -1,45 +1,4 @@
1
1
  import type OpenAI from 'openai';
2
- import type { Uploadable } from 'openai/core/uploads';
3
- /**
4
- * Generate a completion from a prompt and message history
5
- * @param openai OpenAI instance
6
- * @param params completion options
7
- * @param prompt base prompt
8
- * @param messages message history- last message should be user message
9
- * @param tools available functions to call
10
- * @returns
11
- */
12
- export declare const createCompletion: (openai: OpenAI, params: Omit<OpenAI.Chat.Completions.ChatCompletionCreateParams, 'stream' | 'messages'>, prompt: string, messages: OpenAI.ChatCompletionMessageParam[], tools?: OpenAI.ChatCompletionTool[]) => Promise<import("openai/core/streaming.mjs").Stream<OpenAI.ChatCompletionChunk> & {
13
- _request_id?: string | null;
14
- }>;
15
- /**
16
- * Generate a text transcription from an audio file
17
- * @param openai OpenAI instance
18
- * @param params transcription options
19
- * @param file audio file
20
- * @returns
21
- */
22
- export declare const createTranscription: (openai: OpenAI, params: Omit<OpenAI.Audio.Transcriptions.TranscriptionCreateParamsNonStreaming, 'file' | 'model'>, file: Uploadable) => Promise<OpenAI.Audio.Transcription & {
23
- _request_id?: string | null;
24
- }>;
25
- /**
26
- * Generate a speech audio file from a text message
27
- * @param openai OpenAI instance
28
- * @param params speech options
29
- * @param message text message
30
- * @returns
31
- */
32
- export declare const createSpeech: (openai: OpenAI, params: Omit<OpenAI.Audio.Speech.SpeechCreateParams, 'input' | 'model' | 'voice'>, message: string) => Promise<Response>;
33
- /**
34
- * Generate a function call completion from a prompt and message
35
- * @param openai OpenAI instance
36
- * @param params completion options
37
- * @param prompt base prompt
38
- * @param message input message
39
- * @param tools available functions to call
40
- * @returns
41
- */
42
- export declare const createFunctionCallCompletion: (openai: OpenAI, params: Omit<OpenAI.Chat.Completions.ChatCompletionCreateParams, 'stream' | 'messages'>, prompt: string, message: string, tools: OpenAI.ChatCompletionTool[]) => Promise<OpenAI.ChatCompletionMessageFunctionToolCall.Function[]>;
43
2
  /**
44
3
  * Generate an embedding from a text input
45
4
  * @param openai OpenAI instance
package/dist/chat/api.js CHANGED
@@ -1 +1 @@
1
- export const createCompletion=async(e,t,o,c,n)=>e.chat.completions.create({...t,messages:[{role:"system",content:o},...c],...n&&n.length>0?{tools:n,tool_choice:"auto"}:{},stream:!0});export const createTranscription=async(e,t,o)=>e.audio.transcriptions.create({...t,model:"whisper-1",file:o});export const createSpeech=async(e,t,o)=>e.audio.speech.create({...t,input:o,model:"tts-1",voice:"alloy"});export const createFunctionCallCompletion=async(e,t,o,c,n)=>{let a=await e.chat.completions.create({...t,messages:[{role:"system",content:o},{role:"user",content:c}],...n.length>0?{tools:n,tool_choice:1===n.length?n[0]:"auto"}:{}});return a.choices[0]?.message.tool_calls?.filter(e=>"function"===e.type).map(e=>e.function)??[]};export const createEmbedding=async(e,t,o)=>{let c=await e.embeddings.create({model:"text-embedding-3-small",...t,input:o});return c.data[0]?.embedding};
1
+ export const createEmbedding=async(e,d,t)=>{let a=await e.embeddings.create({model:"text-embedding-3-small",...d,input:t});return a.data[0]?.embedding};
@@ -22,7 +22,4 @@ export interface ChatMessageAugmentation {
22
22
  augmentation: Record<string, unknown>;
23
23
  }
24
24
  export type ChatStreamChunk = ChatMessageContentChunk | ChatToolCalls | ChatErrorChunk | ChatMessageAugmentation;
25
- export declare const isChatMessageContentChunk: (chunk: ChatStreamChunk) => chunk is ChatMessageContentChunk;
26
- export declare const isChatMessageAugmentation: (chunk: ChatStreamChunk) => chunk is ChatMessageAugmentation;
27
- export declare const isChatToolCalls: (chunk: ChatStreamChunk) => chunk is ChatToolCalls;
28
25
  export declare const isChatError: (chunk: ChatStreamChunk) => chunk is ChatErrorChunk;
@@ -1 +1 @@
1
- export const ChunkType={content:"content",calls:"calls",error:"error",augment:"augment"};export const isChatMessageContentChunk=t=>t.type===ChunkType.content;export const isChatMessageAugmentation=t=>t.type===ChunkType.augment;export const isChatToolCalls=t=>t.type===ChunkType.calls;export const isChatError=t=>t.type===ChunkType.error;
1
+ export const ChunkType={content:"content",calls:"calls",error:"error",augment:"augment"};export const isChatError=r=>r.type===ChunkType.error;
@@ -1,7 +1,6 @@
1
1
  import type OpenAI from 'openai';
2
2
  import type { Empty } from '../utils/types.js';
3
- import type { ChatExecutableFunction, ChatFunctionDefinition, ChatFunctionResult } from './types.js';
4
- export declare const createCompletionTool: <C extends Empty = Empty, R extends Empty = Empty>({ name, description, parameters, }: OpenAI.FunctionDefinition | ChatFunctionDefinition<C, R, any>) => OpenAI.ChatCompletionFunctionTool;
3
+ import type { ChatExecutableFunction, ChatFunctionResult } from './types.js';
5
4
  /**
6
5
  * Processes tool calls and generates array of return messages.
7
6
  *
@@ -1 +1 @@
1
- export const createCompletionTool=({name:t,description:n,parameters:o})=>({type:"function",function:{name:t,description:n,parameters:o}});export const processToolCalls=async(t,n,o,e)=>{let l=[];for(let r of t){let{id:t}=r,c={tool_call_id:t,role:"tool"};if("function"!==r.type){l.push({...c,content:`Tool call type '${r.type}' is not supported — only function tool calls can be processed by this handler.`});continue}let{function:i}=r;try{let t=n?.find(t=>t.name===i.name);if(!t){l.push({...c,content:`Function \`${i.name}\` not found`});continue}let s=JSON.parse(i.arguments??"{}"),a=t.validate(s);if(a){l.push({...c,content:a});continue}let u=await t.function(s,o);e?.(u,r),l.push({...c,content:u.result})}catch(o){let n=o instanceof Error?o.message:String(o);throw Error(`Call ${t} of function \`${i.name}\` resulted in error: ${n}`)}}return l};
1
+ export const processToolCalls=async(t,n,e,o)=>{let l=[];for(let r of t){let{id:t}=r,c={tool_call_id:t,role:"tool"};if("function"!==r.type){l.push({...c,content:`Tool call type '${r.type}' is not supported — only function tool calls can be processed by this handler.`});continue}let{function:s}=r;try{let t=n?.find(t=>t.name===s.name);if(!t){l.push({...c,content:`Function \`${s.name}\` not found`});continue}let a=JSON.parse(s.arguments??"{}"),i=t.validate(a);if(i){l.push({...c,content:i});continue}let u=await t.function(a,e);o?.(u,r),l.push({...c,content:u.result})}catch(e){let n=e instanceof Error?e.message:String(e);throw Error(`Call ${t} of function \`${s.name}\` resulted in error: ${n}`)}}return l};
@@ -1,10 +1,7 @@
1
- export { createCompletion, createFunctionCallCompletion, createTranscription as createSpeechToTextCompletion, createSpeech as createTextToSpeechCompletion, createEmbedding, } from './api.js';
2
- export { createAssistantMessage, createToolCallResultMessage } from './completions/messages.js';
3
- export { ChunkType, isChatMessageContentChunk, isChatMessageAugmentation, isChatToolCalls, isChatError, } from './completions/types.js';
1
+ export { createEmbedding } from './api.js';
2
+ export { ChunkType, isChatError } from './completions/types.js';
4
3
  export type { ChatMessageContentChunk, ChatToolCalls, ChatErrorChunk, ChatStreamChunk, ChatMessageAugmentation, } from './completions/types.js';
5
4
  export { createValidator } from './functions/validate.js';
6
- export { createChatFunctionDefinition as createFunctionDefintion, createChatExecutableFunction, } from './functions/create.js';
7
- export { simpleAugmentationHandler } from './functions/augmentations.js';
8
- export { processToolCalls, createCompletionTool } from './functions/process.js';
5
+ export { processToolCalls } from './functions/process.js';
9
6
  export type { ChatFunction, ChatExecutableFunction, ChatFunctionDefinition, ChatFunctionResult, } from './functions/types.js';
10
7
  export type { Empty } from './utils/types.js';
@@ -1 +1 @@
1
- export{createCompletion,createFunctionCallCompletion,createTranscription as createSpeechToTextCompletion,createSpeech as createTextToSpeechCompletion,createEmbedding}from"./api.js";export{createAssistantMessage,createToolCallResultMessage}from"./completions/messages.js";export{ChunkType,isChatMessageContentChunk,isChatMessageAugmentation,isChatToolCalls,isChatError}from"./completions/types.js";export{createValidator}from"./functions/validate.js";export{createChatFunctionDefinition as createFunctionDefintion,createChatExecutableFunction}from"./functions/create.js";export{simpleAugmentationHandler}from"./functions/augmentations.js";export{processToolCalls,createCompletionTool}from"./functions/process.js";
1
+ export{createEmbedding}from"./api.js";export{ChunkType,isChatError}from"./completions/types.js";export{createValidator}from"./functions/validate.js";export{processToolCalls}from"./functions/process.js";
@@ -0,0 +1,6 @@
1
+ /** Global account state; disabled accounts cannot use any workspace membership. */
2
+ export declare const AccountStatus: {
3
+ readonly Active: 'active';
4
+ readonly Disabled: 'disabled';
5
+ };
6
+ export type AccountStatus = (typeof AccountStatus)[keyof typeof AccountStatus];
@@ -0,0 +1 @@
1
+ export const AccountStatus={Active:"active",Disabled:"disabled"};
@@ -0,0 +1,11 @@
1
+ import type { ValueOf } from '@salsita-ai/common/utils';
2
+ /**
3
+ * How an environment came to serve a deployment: a build of it went live (`build`), or a rollback made an earlier
4
+ * production deployment live again without building (`rollback`). Production's Overview names each change of its live
5
+ * build by this kind.
6
+ */
7
+ export declare const EnvironmentActivationKind: {
8
+ readonly Build: 'build';
9
+ readonly Rollback: 'rollback';
10
+ };
11
+ export type EnvironmentActivationKind = ValueOf<typeof EnvironmentActivationKind>;
@@ -0,0 +1 @@
1
+ export const EnvironmentActivationKind={Build:"build",Rollback:"rollback"};
@@ -0,0 +1,2 @@
1
+ export { EnvironmentActivationKind } from './environment-activation-kind.js';
2
+ export { ProductionRollbackState } from './production-rollback-state.js';
@@ -0,0 +1 @@
1
+ export{EnvironmentActivationKind}from"./environment-activation-kind.js";export{ProductionRollbackState}from"./production-rollback-state.js";
@@ -0,0 +1,14 @@
1
+ import type { ValueOf } from '@salsita-ai/common/utils';
2
+ /**
3
+ * Where the latest rollback of production stands, as production's Overview shows it: the runner is switching the
4
+ * frontend (`running`), it failed before anything was switched so production is unchanged (`failed`), or it failed
5
+ * after the switch began or never answered, so production's pages may already be the target's while the replaced
6
+ * deployment is still live (`unfinished`). A rollback that went live has no state of its own; it is a row of the
7
+ * history.
8
+ */
9
+ export declare const ProductionRollbackState: {
10
+ readonly Running: 'running';
11
+ readonly Failed: 'failed';
12
+ readonly Unfinished: 'unfinished';
13
+ };
14
+ export type ProductionRollbackState = ValueOf<typeof ProductionRollbackState>;
@@ -0,0 +1 @@
1
+ export const ProductionRollbackState={Running:"running",Failed:"failed",Unfinished:"unfinished"};
@@ -0,0 +1 @@
1
+ export { ApiTokenLimits } from './limits.js';
@@ -0,0 +1 @@
1
+ export{ApiTokenLimits}from"./limits.js";
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Immutable limits of an automation token, which alone decide what it may do: the token belongs to its workspace or
4
+ * project, not to the user who created it. Null project means every project of the token's workspace.
5
+ */
6
+ export declare const ApiTokenLimits: z.ZodObject<{
7
+ projectId: z.ZodNullable<z.ZodString>;
8
+ actions: z.ZodTuple<[z.ZodLiteral<"deploy">], null>;
9
+ }, "strict", z.ZodTypeAny, {
10
+ projectId: string | null;
11
+ actions: ["deploy"];
12
+ }, {
13
+ projectId: string | null;
14
+ actions: ["deploy"];
15
+ }>;
16
+ export type ApiTokenLimits = z.infer<typeof ApiTokenLimits>;
@@ -0,0 +1 @@
1
+ import{z as t}from"zod";export const ApiTokenLimits=t.object({projectId:t.string().uuid().nullable(),actions:t.tuple([t.literal("deploy")])}).strict();
@@ -0,0 +1,13 @@
1
+ import { Branded } from '@salsita-ai/common/utils';
2
+ /**
3
+ * How many weighted tokens the conversational assistant may use in a calendar month, set by a super admin in Studio
4
+ * on each environment and each customer. A weighted token is an output-token equivalent at gpt-6.1-sol list prices
5
+ * (1,000,000 is about $10), the same unit as the assistant's hourly limits. Once either the environment's or the
6
+ * customer's cap is used up, the server refuses new user messages until the next month.
7
+ */
8
+ export type AssistantMonthlyLimit = Branded<'AssistantMonthlyLimit', number>;
9
+ export declare const AssistantMonthlyLimit: (limit: number) => AssistantMonthlyLimit;
10
+ /** The cap of an environment nobody configured. */
11
+ export declare const DEFAULT_ENVIRONMENT_ASSISTANT_MONTHLY_LIMIT: AssistantMonthlyLimit;
12
+ /** The cap of a customer nobody configured, across all its environments. */
13
+ export declare const DEFAULT_CUSTOMER_ASSISTANT_MONTHLY_LIMIT: AssistantMonthlyLimit;
@@ -0,0 +1 @@
1
+ import{Branded as t}from"@salsita-ai/common/utils";export const AssistantMonthlyLimit=o=>{if(!Number.isSafeInteger(o)||o<0)throw Error(`Assistant monthly limit must be a non-negative whole number of weighted tokens up to ${Number.MAX_SAFE_INTEGER}, but it is ${o}. Enter 0 to turn the assistant off, or a positive whole number.`);return t(o)};export const DEFAULT_ENVIRONMENT_ASSISTANT_MONTHLY_LIMIT=AssistantMonthlyLimit(5e7);export const DEFAULT_CUSTOMER_ASSISTANT_MONTHLY_LIMIT=AssistantMonthlyLimit(1e8);
@@ -0,0 +1,40 @@
1
+ import type { ValueOf } from '@salsita-ai/common/utils';
2
+ /**
3
+ * Where a builder project's custom domain stands, as Project settings shows it: the server looks for its two DNS
4
+ * records (`waiting_for_dns`), found them while production has nothing deployed (`waiting_for_production`), is
5
+ * issuing the certificate and attaching the domain (`issuing`), serves production at it (`active`), stopped with a
6
+ * problem the builder or the platform has to fix (`failed`, Not verified), or is detaching it (`removing`).
7
+ */
8
+ export declare const CustomDomainStatus: {
9
+ readonly WaitingForDns: 'waiting_for_dns';
10
+ readonly WaitingForProduction: 'waiting_for_production';
11
+ readonly Issuing: 'issuing';
12
+ readonly Active: 'active';
13
+ readonly Failed: 'failed';
14
+ readonly Removing: 'removing';
15
+ };
16
+ export type CustomDomainStatus = ValueOf<typeof CustomDomainStatus>;
17
+ /** Why a typed value cannot be a project's custom domain. */
18
+ export declare const CustomDomainProblem: {
19
+ readonly Empty: 'empty';
20
+ readonly NotASubdomain: 'not_a_subdomain';
21
+ readonly Wildcard: 'wildcard';
22
+ readonly IpAddress: 'ip_address';
23
+ readonly TooLong: 'too_long';
24
+ readonly OwnDomain: 'own_domain';
25
+ };
26
+ export type CustomDomainProblem = ValueOf<typeof CustomDomainProblem>;
27
+ /**
28
+ * What a typed custom domain is stored as: trimmed, in lowercase and without the root's trailing dot. Only a value
29
+ * with no problem is ever stored.
30
+ */
31
+ export declare const normalizeCustomDomain: (value: string) => string;
32
+ /**
33
+ * Why a typed value cannot be a project's custom domain, or null when it can: a subdomain of the builder's own domain,
34
+ * at least three labels and at most 253 characters, with no scheme, path, port or wildcard, not an IP address and not
35
+ * a name under the server's base domain. Studio checks it beside the field and the server refuses with it. An apex of
36
+ * a multi-part suffix (`acme.co.uk`) passes and never verifies, because it cannot have a CNAME.
37
+ */
38
+ export declare const findCustomDomainProblem: (value: string, baseDomain: string) => CustomDomainProblem | null;
39
+ /** What Studio shows beside the field, and the server answers, for a refused custom domain. */
40
+ export declare const describeCustomDomainProblem: (problem: CustomDomainProblem, baseDomain: string) => string;
@@ -0,0 +1 @@
1
+ export const CustomDomainStatus={WaitingForDns:"waiting_for_dns",WaitingForProduction:"waiting_for_production",Issuing:"issuing",Active:"active",Failed:"failed",Removing:"removing"};export const CustomDomainProblem={Empty:"empty",NotASubdomain:"not_a_subdomain",Wildcard:"wildcard",IpAddress:"ip_address",TooLong:"too_long",OwnDomain:"own_domain"};let o=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/,t=/^[a-z]{2,63}$/,n=/^\d{1,3}(?:\.\d{1,3}){3}$/;export const normalizeCustomDomain=o=>o.trim().toLowerCase().replace(/\.$/,"");export const findCustomDomainProblem=(e,a)=>{let m=normalizeCustomDomain(e);if(""===m)return CustomDomainProblem.Empty;if(m.includes("*"))return CustomDomainProblem.Wildcard;if(n.test(m)||m.includes(":")||m.startsWith("["))return/^[a-z][a-z0-9+.-]*:\/\//.test(m)||/^[^:]+:\d+$/.test(m)?CustomDomainProblem.NotASubdomain:CustomDomainProblem.IpAddress;if(m.length>253)return CustomDomainProblem.TooLong;let r=m.split("."),i=r.at(-1)??"";if(r.length<3||!r.every(t=>o.test(t))||!t.test(i))return CustomDomainProblem.NotASubdomain;let s=normalizeCustomDomain(a);return""!==s&&(m===s||m.endsWith(`.${s}`))?CustomDomainProblem.OwnDomain:null};let e="configure.acme-furniture.com";export const describeCustomDomainProblem=(o,t)=>{switch(o){case CustomDomainProblem.Empty:return`Enter a subdomain, such as ${e}.`;case CustomDomainProblem.NotASubdomain:return`Enter a subdomain only, such as ${e}: no https://, no path, and not the bare domain.`;case CustomDomainProblem.Wildcard:return`Wildcards are not supported. Enter one subdomain, such as ${e}.`;case CustomDomainProblem.IpAddress:return`Enter a domain name, not an IP address, such as ${e}.`;case CustomDomainProblem.TooLong:return"That domain is too long. A domain has at most 253 characters.";case CustomDomainProblem.OwnDomain:return`Use a domain of your own, not one under ${t}.`}};
@@ -0,0 +1 @@
1
+ export { CustomDomainProblem, CustomDomainStatus, describeCustomDomainProblem, findCustomDomainProblem, normalizeCustomDomain, } from './custom-domain.js';
@@ -0,0 +1 @@
1
+ export{CustomDomainProblem,CustomDomainStatus,describeCustomDomainProblem,findCustomDomainProblem,normalizeCustomDomain}from"./custom-domain.js";
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { Branded, type ValueOf } from '@salsita-ai/common/utils';
3
+ import type { AssistantMonthlyLimit } from './assistant-limit-domain.js';
3
4
  export type CustomerId = Branded<'CustomerId', string>;
4
5
  export declare const CustomerId: (id: string) => CustomerId;
5
6
  export type CustomerName = Branded<'CustomerName', string>;
@@ -64,6 +65,7 @@ export interface Customer {
64
65
  readonly aiPreviewEnabled: boolean;
65
66
  readonly aiAssistantEnabled: boolean;
66
67
  readonly aiImageLimit: number;
68
+ readonly aiAssistantMonthlyLimit: AssistantMonthlyLimit;
67
69
  readonly imageRenderLimitEnabled: boolean;
68
70
  }
69
71
  export {};
@@ -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;
@@ -66,6 +76,14 @@ export interface DeploymentBuild {
66
76
  readonly buildingAt: Date | null;
67
77
  readonly deployingAt: Date | null;
68
78
  readonly finishedAt: Date | null;
79
+ readonly startedAt: Date | null;
80
+ readonly dispatchedAt: Date | null;
81
+ readonly promotedFrom: {
82
+ readonly buildId: DeploymentBuildId | null;
83
+ readonly number: number | null;
84
+ readonly environment: string;
85
+ } | null;
86
+ readonly frontendRetained: boolean;
69
87
  }
70
88
  declare const isFinished: (status: DeploymentBuildStatus) => boolean;
71
89
  /**
@@ -88,6 +88,7 @@ export interface Deployment {
88
88
  readonly isActive: boolean;
89
89
  readonly assistantEnabled: boolean;
90
90
  readonly resourcesUrl: ResourceUrl;
91
+ readonly useCognito?: boolean;
91
92
  readonly useAuthHook: boolean;
92
93
  readonly lambdaWebhookUrl: LambdaWebhookUrl | null;
93
94
  readonly privateS3Bucket: PrivateS3Bucket;
@@ -110,6 +111,7 @@ export interface NewDeployment {
110
111
  readonly isActive: boolean;
111
112
  readonly assistantEnabled: boolean;
112
113
  readonly resourcesUrl: ResourceUrl;
114
+ readonly useCognito?: boolean;
113
115
  readonly useAuthHook: boolean;
114
116
  readonly lambdaWebhookUrl: LambdaWebhookUrl | null;
115
117
  readonly privateS3Bucket: PrivateS3Bucket;