@squidcloud/local-backend 1.0.326 → 1.0.328
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/internal-common/src/public-types/ai-agent.public-types.d.ts +101 -39
- package/dist/internal-common/src/public-types/ai-agent.public-types.js +5 -5
- package/dist/internal-common/src/public-types/ai-agent.public-types.js.map +1 -1
- package/dist/internal-common/src/public-types/communication.public-types.d.ts +0 -1
- package/dist/internal-common/src/public-types/communication.public-types.js.map +1 -1
- package/dist/internal-common/src/public-types/integration.public-types.d.ts +1 -1
- package/dist/internal-common/src/public-types/integration.public-types.js +2 -2
- package/dist/internal-common/src/public-types/integration.public-types.js.map +1 -1
- package/dist/internal-common/src/public-types/query.public-types.js.map +1 -1
- package/dist/internal-common/src/public-types/socket.public-types.d.ts +2 -5
- package/dist/internal-common/src/public-types/socket.public-types.js +6 -7
- package/dist/internal-common/src/public-types/socket.public-types.js.map +1 -1
- package/dist/internal-common/src/public-types-backend/ai-chatbot.public-context.d.ts +0 -8
- package/dist/internal-common/src/public-types-backend/ai-chatbot.public-context.js +0 -10
- package/dist/internal-common/src/public-types-backend/ai-chatbot.public-context.js.map +1 -1
- package/dist/internal-common/src/public-types-backend/bundle-api.public-types.d.ts +2 -2
- package/dist/internal-common/src/types/ai-agent.types.d.ts +8 -126
- package/dist/internal-common/src/types/ai-agent.types.js.map +1 -1
- package/dist/internal-common/src/utils/backend-transforms.js +2 -2
- package/dist/internal-common/src/utils/backend-transforms.js.map +1 -1
- package/dist/local-backend/src/local-backend-socket.service.js +1 -1
- package/dist/local-backend/src/local-backend-socket.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/dist/internal-common/src/public-types/integrations/ai_agent.public-types.d.ts +0 -41
- package/dist/internal-common/src/public-types/integrations/ai_agent.public-types.js +0 -13
- package/dist/internal-common/src/public-types/integrations/ai_agent.public-types.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AiAgentId, IntegrationId } from './communication.public-types';
|
|
1
|
+
import { AiAgentId, AiContextId, IntegrationId } from './communication.public-types';
|
|
2
2
|
import { IntegrationType } from './integration.public-types';
|
|
3
3
|
import { FunctionName, FunctionNameWithContext } from './bundle-data.public-types';
|
|
4
4
|
export declare const OPENAI_O1_CHAT_MODEL_NAMES: readonly ["o1", "o1-mini"];
|
|
@@ -38,7 +38,7 @@ export type FluxModelName = (typeof FLUX_MODEL_NAMES)[number];
|
|
|
38
38
|
export type AiGenerateImageOptions = DallEOptions | StableDiffusionCoreOptions | FluxOptions;
|
|
39
39
|
export type AiAudioTranscribeOptions = WhisperOptions;
|
|
40
40
|
export type AiAudioCreateSpeechOptions = OpenAiCreateSpeechOptions;
|
|
41
|
-
export declare const VECTOR_DB_TYPES: readonly ["
|
|
41
|
+
export declare const VECTOR_DB_TYPES: readonly ["postgres"];
|
|
42
42
|
export type VectorDbType = (typeof VECTOR_DB_TYPES)[number];
|
|
43
43
|
export interface AiAudioCreateSpeechResponse {
|
|
44
44
|
mimeType: string;
|
|
@@ -93,7 +93,7 @@ export interface StableDiffusionCoreOptions extends BaseAiGenerateImageOptions {
|
|
|
93
93
|
outputFormat?: 'jpeg' | 'png' | 'webp';
|
|
94
94
|
}
|
|
95
95
|
export type ApiKeySource = 'user' | 'system';
|
|
96
|
-
export type
|
|
96
|
+
export type AiAgentResponseFormat = 'text' | 'json_object';
|
|
97
97
|
export type AiFileUrlType = 'image';
|
|
98
98
|
export interface AiFileUrl {
|
|
99
99
|
type: AiFileUrlType;
|
|
@@ -117,11 +117,11 @@ interface BaseAiAgentChatOptions {
|
|
|
117
117
|
disableHistory?: boolean;
|
|
118
118
|
disableContext?: boolean;
|
|
119
119
|
includeReference?: boolean;
|
|
120
|
-
responseFormat?:
|
|
120
|
+
responseFormat?: AiAgentResponseFormat;
|
|
121
121
|
smoothTyping?: boolean;
|
|
122
122
|
agentContext?: Record<string, unknown>;
|
|
123
123
|
functions?: Array<FunctionName | FunctionNameWithContext>;
|
|
124
|
-
instructions?:
|
|
124
|
+
instructions?: string;
|
|
125
125
|
contextMetadataFilter?: AiContextMetadataFilter;
|
|
126
126
|
voiceOptions?: AiAudioCreateSpeechOptions;
|
|
127
127
|
connectedAgents?: Array<AiConnectedAgentMetadata>;
|
|
@@ -129,28 +129,85 @@ interface BaseAiAgentChatOptions {
|
|
|
129
129
|
quotas?: AiChatPromptQuotas;
|
|
130
130
|
includeMetadata?: boolean;
|
|
131
131
|
temperature?: number;
|
|
132
|
-
|
|
132
|
+
model?: AiChatModelName;
|
|
133
133
|
}
|
|
134
134
|
export interface GeminiChatOptions extends BaseAiAgentChatOptions {
|
|
135
|
-
|
|
135
|
+
model?: GeminiChatModelName;
|
|
136
136
|
groundingWithWebSearch?: boolean;
|
|
137
137
|
}
|
|
138
|
-
export interface OpenAiReasoningChatOptions extends BaseAiAgentChatOptions {
|
|
139
|
-
overrideModel?: OpenAiReasoningChatModelName;
|
|
140
|
-
reasoningEffort?: 'low' | 'medium' | 'high';
|
|
141
|
-
}
|
|
142
138
|
export interface OpenAiChatOptions extends BaseAiAgentChatOptions {
|
|
143
|
-
|
|
144
|
-
topP?: number;
|
|
139
|
+
model?: OpenAiChatModelName;
|
|
145
140
|
fileUrls?: Array<AiFileUrl>;
|
|
146
141
|
}
|
|
142
|
+
export type OpenAiReasoningEffort = 'low' | 'medium' | 'high';
|
|
143
|
+
export interface OpenAiReasoningChatOptions extends OpenAiChatOptions {
|
|
144
|
+
model?: OpenAiReasoningChatModelName;
|
|
145
|
+
reasoningEffort?: OpenAiReasoningEffort;
|
|
146
|
+
}
|
|
147
147
|
export interface AnthropicChatOptions extends BaseAiAgentChatOptions {
|
|
148
|
-
|
|
148
|
+
model?: AnthropicChatModelName;
|
|
149
149
|
}
|
|
150
|
+
export type AiSessionOptions = Partial<{
|
|
151
|
+
traceId: string;
|
|
152
|
+
clientId: string;
|
|
153
|
+
agentId: string;
|
|
154
|
+
}>;
|
|
150
155
|
export type AiAgentChatOptions<T extends AiChatModelName | undefined = undefined> = T extends undefined ? BaseAiAgentChatOptions | GeminiChatOptions | OpenAiReasoningChatOptions | OpenAiChatOptions | AnthropicChatOptions : T extends GeminiChatModelName ? GeminiChatOptions : T extends OpenAiReasoningChatModelName ? OpenAiReasoningChatOptions : T extends OpenAiChatModelName ? OpenAiChatOptions : T extends AnthropicChatModelName ? AnthropicChatOptions : never;
|
|
151
156
|
export type AllAiAgentChatOptions = {
|
|
152
157
|
[K in keyof BaseAiAgentChatOptions | keyof GeminiChatOptions | keyof OpenAiReasoningChatOptions | keyof OpenAiChatOptions | keyof AnthropicChatOptions]?: (K extends keyof BaseAiAgentChatOptions ? BaseAiAgentChatOptions[K] : never) | (K extends keyof GeminiChatOptions ? GeminiChatOptions[K] : never) | (K extends keyof OpenAiReasoningChatOptions ? OpenAiReasoningChatOptions[K] : never) | (K extends keyof OpenAiChatOptions ? OpenAiChatOptions[K] : never) | (K extends keyof AnthropicChatOptions ? AnthropicChatOptions[K] : never);
|
|
153
158
|
};
|
|
159
|
+
export type AllOpenAiAgentChatOptions = {
|
|
160
|
+
[K in keyof OpenAiChatOptions | keyof OpenAiReasoningChatOptions]?: (K extends keyof OpenAiChatOptions ? OpenAiChatOptions[K] : never) | (K extends keyof OpenAiReasoningChatOptions ? OpenAiReasoningChatOptions[K] : never);
|
|
161
|
+
};
|
|
162
|
+
export interface AiAgent<T extends AiChatModelName | undefined = undefined> {
|
|
163
|
+
id: AiAgentId;
|
|
164
|
+
createdAt: Date;
|
|
165
|
+
updatedAt: Date;
|
|
166
|
+
description?: string;
|
|
167
|
+
isPublic?: boolean;
|
|
168
|
+
auditLog?: boolean;
|
|
169
|
+
options: AiAgentChatOptions<T>;
|
|
170
|
+
}
|
|
171
|
+
export interface GetAgentRequest {
|
|
172
|
+
agentId: AiAgentId;
|
|
173
|
+
}
|
|
174
|
+
export interface GetAgentResponse {
|
|
175
|
+
agent: AiAgent | undefined;
|
|
176
|
+
}
|
|
177
|
+
export interface GetAgentContextRequest {
|
|
178
|
+
agentId: AiAgentId;
|
|
179
|
+
contextId: string;
|
|
180
|
+
}
|
|
181
|
+
export interface DeleteAgentRequest {
|
|
182
|
+
agentId: AiAgentId;
|
|
183
|
+
}
|
|
184
|
+
export interface ListAgentContextsRequest {
|
|
185
|
+
agentId: AiAgentId;
|
|
186
|
+
}
|
|
187
|
+
export interface ListAgentContextsResponse {
|
|
188
|
+
contexts: Array<AiAgentContext>;
|
|
189
|
+
}
|
|
190
|
+
export interface DeleteAgentContextsRequest {
|
|
191
|
+
agentId: AiAgentId;
|
|
192
|
+
contextIds: Array<string>;
|
|
193
|
+
}
|
|
194
|
+
export interface UpsertAgentContextsRequest {
|
|
195
|
+
agentId: AiAgentId;
|
|
196
|
+
contextRequests: Array<AgentContextRequest>;
|
|
197
|
+
}
|
|
198
|
+
export interface ProvideAgentFeedbackRequest {
|
|
199
|
+
agentId: AiAgentId;
|
|
200
|
+
feedback: string;
|
|
201
|
+
}
|
|
202
|
+
export interface ResetAgentFeedbackRequest {
|
|
203
|
+
agentId: AiAgentId;
|
|
204
|
+
}
|
|
205
|
+
export interface ListAgentsResponse {
|
|
206
|
+
agents: Array<AiAgent>;
|
|
207
|
+
}
|
|
208
|
+
export type UpsertAgentRequest = Omit<AiAgent, 'createdAt' | 'updatedAt' | 'options'> & {
|
|
209
|
+
options?: AiAgentChatOptions;
|
|
210
|
+
};
|
|
154
211
|
export interface AiObserveStatusOptions {
|
|
155
212
|
chatId?: string;
|
|
156
213
|
}
|
|
@@ -186,17 +243,7 @@ export interface AiSearchOptions {
|
|
|
186
243
|
}
|
|
187
244
|
export interface AiSearchRequest {
|
|
188
245
|
options: AiSearchOptions;
|
|
189
|
-
|
|
190
|
-
integrationId: IntegrationId;
|
|
191
|
-
}
|
|
192
|
-
export type AiMutationType = 'insert' | 'update' | 'delete' | 'append' | 'feedback';
|
|
193
|
-
export type AiResourceType = 'instruction' | 'profile' | 'context' | 'contexts';
|
|
194
|
-
export type AiContextType = 'text' | 'url' | 'file';
|
|
195
|
-
export interface AiContextBase {
|
|
196
|
-
type: AiContextType;
|
|
197
|
-
data: string;
|
|
198
|
-
metadata?: AiContextMetadata;
|
|
199
|
-
password?: string;
|
|
246
|
+
agentId: AiAgentId;
|
|
200
247
|
}
|
|
201
248
|
export interface AiSearchResponse {
|
|
202
249
|
chunks: Array<AiSearchResultChunk>;
|
|
@@ -206,29 +253,44 @@ export interface AiSearchResultChunk {
|
|
|
206
253
|
metadata?: AiContextMetadata;
|
|
207
254
|
score: number;
|
|
208
255
|
}
|
|
209
|
-
export
|
|
210
|
-
|
|
256
|
+
export declare class SecureAiAgentContext {
|
|
257
|
+
readonly prompt?: string;
|
|
258
|
+
readonly agentId: AiAgentId;
|
|
259
|
+
constructor(prototype: SecureAiAgentContext);
|
|
211
260
|
}
|
|
212
|
-
export interface
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
261
|
+
export interface AiAgentContext {
|
|
262
|
+
id: AiContextId;
|
|
263
|
+
createdAt: Date;
|
|
264
|
+
updatedAt: Date;
|
|
265
|
+
agentId: AiAgentId;
|
|
266
|
+
type: AiContextType;
|
|
267
|
+
title: string;
|
|
268
|
+
text: string;
|
|
269
|
+
preview: boolean;
|
|
270
|
+
sizeBytes: number;
|
|
271
|
+
metadata: AiContextMetadata;
|
|
272
|
+
}
|
|
273
|
+
export type AgentContextRequest = TextContextRequest | FileContextRequest;
|
|
274
|
+
export interface BaseContextRequest {
|
|
275
|
+
contextId: string;
|
|
276
|
+
type: AiContextType;
|
|
277
|
+
metadata?: AiContextMetadata;
|
|
217
278
|
}
|
|
218
|
-
export
|
|
279
|
+
export type AiContextType = 'text' | 'file';
|
|
280
|
+
export interface TextContextRequest extends BaseContextRequest {
|
|
281
|
+
type: 'text';
|
|
282
|
+
title: string;
|
|
283
|
+
text: string;
|
|
284
|
+
}
|
|
285
|
+
export interface FileContextRequest extends BaseContextRequest {
|
|
219
286
|
type: 'file';
|
|
220
287
|
extractImages?: boolean;
|
|
221
288
|
minImageWidth?: number;
|
|
222
289
|
minImageHeight?: number;
|
|
223
290
|
fullPageAsImage?: boolean;
|
|
224
291
|
extractionModel?: AiChatModelName;
|
|
292
|
+
password?: string;
|
|
225
293
|
}
|
|
226
|
-
export declare class AiChatContext {
|
|
227
|
-
readonly prompt?: string;
|
|
228
|
-
readonly profileId: AiAgentId;
|
|
229
|
-
constructor(prototype: AiChatContext);
|
|
230
|
-
}
|
|
231
|
-
export type AiContext = AiTextContext | AiUrlContext | AiFileContext;
|
|
232
294
|
export type AiContextMetadataValue = number | string | boolean | undefined;
|
|
233
295
|
export type AiContextMetadataValueArray = AiContextMetadataValue[];
|
|
234
296
|
export interface AiContextMetadataEqFilter {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SecureAiAgentContext = exports.VECTOR_DB_TYPES = exports.OPEN_AI_CREATE_SPEECH_FORMATS = exports.AI_AUDIO_CREATE_SPEECH_MODEL_NAMES = exports.AI_AUDIO_TRANSCRIPTION_MODEL_NAMES = exports.AI_IMAGE_MODEL_NAMES = exports.FLUX_MODEL_NAMES = exports.STABLE_DIFFUSION_MODEL_NAMES = exports.OPENAI_AUDIO_MODEL_NAMES = exports.OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES = exports.OPENAI_AUDIO_TRANSCRIPTION_MODEL_NAMES = exports.OPENAI_IMAGE_MODEL_NAMES = exports.AI_EMBEDDINGS_MODEL_NAMES = exports.OPENAI_EMBEDDINGS_MODEL_NAMES = exports.AI_CHAT_MODEL_NAMES = exports.ANTHROPIC_CHAT_MODEL_NAMES = exports.GEMINI_CHAT_MODEL_NAMES = exports.OPENAI_CHAT_MODEL_NAMES = exports.OPENAI_REASONING_CHAT_MODEL_NAMES = exports.OPENAI_O1_CHAT_MODEL_NAMES = void 0;
|
|
4
4
|
exports.validateAiContextMetadata = validateAiContextMetadata;
|
|
5
5
|
exports.validateAiContextMetadataFilter = validateAiContextMetadataFilter;
|
|
6
6
|
exports.OPENAI_O1_CHAT_MODEL_NAMES = ['o1', 'o1-mini'];
|
|
@@ -36,14 +36,14 @@ exports.AI_IMAGE_MODEL_NAMES = [
|
|
|
36
36
|
exports.AI_AUDIO_TRANSCRIPTION_MODEL_NAMES = [...exports.OPENAI_AUDIO_TRANSCRIPTION_MODEL_NAMES];
|
|
37
37
|
exports.AI_AUDIO_CREATE_SPEECH_MODEL_NAMES = [...exports.OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES];
|
|
38
38
|
exports.OPEN_AI_CREATE_SPEECH_FORMATS = ['mp3', 'opus', 'aac', 'flac', 'wav', 'pcm'];
|
|
39
|
-
exports.VECTOR_DB_TYPES = ['
|
|
40
|
-
class
|
|
39
|
+
exports.VECTOR_DB_TYPES = ['postgres'];
|
|
40
|
+
class SecureAiAgentContext {
|
|
41
41
|
constructor(prototype) {
|
|
42
|
-
this.
|
|
42
|
+
this.agentId = prototype.agentId;
|
|
43
43
|
this.prompt = prototype.prompt;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
exports.
|
|
46
|
+
exports.SecureAiAgentContext = SecureAiAgentContext;
|
|
47
47
|
const INTERNAL_METADATA_KEYS = ['groupId', 'appId', 'integrationId', 'profileId', 'index', 'text', 'filePathInBucket'];
|
|
48
48
|
function validateAiContextMetadata(metadata) {
|
|
49
49
|
for (const key in metadata) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-agent.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/ai-agent.public-types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ai-agent.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/ai-agent.public-types.ts"],"names":[],"mappings":";;;AAmkBA,8DAgBC;AAGD,0EAkCC;AAnnBY,QAAA,0BAA0B,GA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
9
|
export type AiAgentId = string;
|
|
10
|
-
export type AiProfileId = AiAgentId;
|
|
11
10
|
export declare const BUILT_IN_AGENT_ID = "built_in_agent";
|
|
12
11
|
export type AiContextId = string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communication.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/communication.public-types.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"communication.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/communication.public-types.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,CAAU,CAAC;AAe3C,QAAA,iBAAiB,GAAG,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IntegrationId } from './communication.public-types';
|
|
2
|
+
export declare const AI_AGENTS_INTEGRATION_ID = "ai_agents";
|
|
2
3
|
export declare const INTEGRATION_TYPES: readonly ["active_directory", "ai_agents", "ai_chatbot", "algolia", "alloydb", "api", "auth0", "azure_cosmosdb", "azure_postgresql", "azure_sql", "bigquery", "built_in_db", "built_in_gcs", "built_in_queue", "built_in_s3", "cassandra", "clickhouse", "cloudsql", "cockroach", "cognito", "confluence", "confluent", "datadog", "db2", "descope", "documentdb", "dynamodb", "elastic_enterprise_search", "elastic_observability", "elastic_search", "firebase_auth", "firestore", "gcs", "google_docs", "google_drive", "graphql", "hubspot", "jira", "jwt_hmac", "jwt_rsa", "kafka", "linear", "mariadb", "monday", "mongo", "mssql", "mysql", "newrelic", "okta", "onedrive", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce_crm", "sap_hana", "sentry", "servicenow", "snowflake", "spanner", "xata", "zendesk", "mail", "slack"];
|
|
3
4
|
export declare const DATA_INTEGRATION_TYPES: readonly ["bigquery", "built_in_db", "clickhouse", "cockroach", "mongo", "mssql", "mysql", "oracledb", "postgres", "sap_hana", "snowflake"];
|
|
4
5
|
export declare const AUTH_INTEGRATION_TYPES: readonly ["auth0", "jwt_rsa", "jwt_hmac", "cognito", "okta", "descope", "firebase_auth"];
|
|
@@ -9,7 +10,6 @@ export declare const INTEGRATION_SCHEMA_TYPES: readonly ["data", "api", "graphql
|
|
|
9
10
|
export type IntegrationSchemaType = (typeof INTEGRATION_SCHEMA_TYPES)[number];
|
|
10
11
|
export declare const BUILT_IN_DB_INTEGRATION_ID: IntegrationId;
|
|
11
12
|
export declare const BUILT_IN_QUEUE_INTEGRATION_ID: IntegrationId;
|
|
12
|
-
export declare const AI_AGENTS_INTEGRATION_ID: IntegrationId;
|
|
13
13
|
export declare const BUILT_IN_STORAGE_INTEGRATION_ID: IntegrationId;
|
|
14
14
|
export interface IntegrationInfo<ConfigurationType = Record<string, any> | undefined> {
|
|
15
15
|
id: IntegrationId;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BUILT_IN_STORAGE_INTEGRATION_ID = exports.
|
|
3
|
+
exports.BUILT_IN_STORAGE_INTEGRATION_ID = exports.BUILT_IN_QUEUE_INTEGRATION_ID = exports.BUILT_IN_DB_INTEGRATION_ID = exports.INTEGRATION_SCHEMA_TYPES = exports.HTTP_INTEGRATION_TYPES = exports.GRAPHQL_INTEGRATION_TYPES = exports.AUTH_INTEGRATION_TYPES = exports.DATA_INTEGRATION_TYPES = exports.INTEGRATION_TYPES = exports.AI_AGENTS_INTEGRATION_ID = void 0;
|
|
4
|
+
exports.AI_AGENTS_INTEGRATION_ID = 'ai_agents';
|
|
4
5
|
exports.INTEGRATION_TYPES = [
|
|
5
6
|
'active_directory',
|
|
6
7
|
'ai_agents',
|
|
@@ -95,6 +96,5 @@ exports.HTTP_INTEGRATION_TYPES = ['api', 'confluence'];
|
|
|
95
96
|
exports.INTEGRATION_SCHEMA_TYPES = ['data', 'api', 'graphql'];
|
|
96
97
|
exports.BUILT_IN_DB_INTEGRATION_ID = 'built_in_db';
|
|
97
98
|
exports.BUILT_IN_QUEUE_INTEGRATION_ID = 'built_in_queue';
|
|
98
|
-
exports.AI_AGENTS_INTEGRATION_ID = 'ai_agents';
|
|
99
99
|
exports.BUILT_IN_STORAGE_INTEGRATION_ID = 'built_in_storage';
|
|
100
100
|
//# sourceMappingURL=integration.public-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/integration.public-types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"integration.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/integration.public-types.ts"],"names":[],"mappings":";;;AAEa,QAAA,wBAAwB,GAAG,WAAW,CAAC;AAGvC,QAAA,iBAAiB,GAAG;IAC/B,kBAAkB;IAClB,WAAW;IACX,YAAY;IACZ,SAAS;IACT,SAAS;IACT,KAAK;IACL,OAAO;IACP,gBAAgB;IAChB,kBAAkB;IAClB,WAAW;IACX,UAAU;IACV,aAAa;IACb,cAAc;IACd,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,YAAY;IACZ,UAAU;IACV,WAAW;IACX,SAAS;IACT,YAAY;IACZ,WAAW;IACX,SAAS;IACT,KAAK;IACL,SAAS;IACT,YAAY;IACZ,UAAU;IACV,2BAA2B;IAC3B,uBAAuB;IACvB,gBAAgB;IAChB,eAAe;IACf,WAAW;IACX,KAAK;IACL,aAAa;IACb,cAAc;IACd,SAAS;IACT,SAAS;IACT,MAAM;IACN,UAAU;IACV,SAAS;IACT,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,UAAU;IACV,MAAM;IACN,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,OAAO;IACP,IAAI;IACJ,gBAAgB;IAChB,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,WAAW;IACX,SAAS;IACT,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;CACC,CAAC;AAEE,QAAA,sBAAsB,GAAG;IACpC,UAAU;IACV,aAAa;IACb,YAAY;IACZ,WAAW;IACX,OAAO;IACP,OAAO;IACP,OAAO;IACP,UAAU;IACV,UAAU;IACV,UAAU;IACV,WAAW;CACH,CAAC;AAEE,QAAA,sBAAsB,GAAG;IACpC,OAAO;IACP,SAAS;IACT,UAAU;IACV,SAAS;IACT,MAAM;IACN,SAAS;IACT,eAAe;CACP,CAAC;AAEE,QAAA,yBAAyB,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAU,CAAC;AAC3D,QAAA,sBAAsB,GAAG,CAAC,KAAK,EAAE,YAAY,CAAU,CAAC;AAIxD,QAAA,wBAAwB,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,CAAU,CAAC;AAI/D,QAAA,0BAA0B,GAAkB,aAAa,CAAC;AAC1D,QAAA,6BAA6B,GAAkB,gBAAgB,CAAC;AAEhE,QAAA,+BAA+B,GAAkB,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/query.public-types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"query.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/query.public-types.ts"],"names":[],"mappings":";;;AA8CA,8CAEC;AAFD,SAAgB,iBAAiB,CAAC,SAAoB;IACpD,OAAO,WAAW,IAAI,SAAS,CAAC;AAClC,CAAC;AAIY,QAAA,eAAe,GAAG;IAC7B,IAAI;IACJ,QAAQ;IACR,qBAAqB;IACrB,oBAAoB;IACpB,oBAAoB;CACZ,CAAC;AAEE,QAAA,aAAa,GAAG;IAC3B,GAAG,uBAAe;IAClB,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,GAAG;IACH,MAAM;IACN,UAAU;IACV,SAAS;IACT,aAAa;CACL,CAAC"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
DISCONNECTED = "DISCONNECTED",
|
|
4
|
-
REMOVED = "REMOVED"
|
|
5
|
-
}
|
|
1
|
+
export declare const CLIENT_CONNECTION_STATES: readonly ["CONNECTED", "DISCONNECTED", "REMOVED"];
|
|
2
|
+
export type ClientConnectionState = (typeof CLIENT_CONNECTION_STATES)[number];
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})(ClientConnectionState || (exports.ClientConnectionState = ClientConnectionState = {}));
|
|
3
|
+
exports.CLIENT_CONNECTION_STATES = void 0;
|
|
4
|
+
exports.CLIENT_CONNECTION_STATES = [
|
|
5
|
+
'CONNECTED',
|
|
6
|
+
'DISCONNECTED',
|
|
7
|
+
'REMOVED',
|
|
8
|
+
];
|
|
10
9
|
//# sourceMappingURL=socket.public-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socket.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/socket.public-types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"socket.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/socket.public-types.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG;IAEtC,WAAW;IAEX,cAAc;IAEd,SAAS;CACD,CAAC"}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import { AiMutationType, AiResourceType } from '../public-types/ai-agent.public-types';
|
|
2
1
|
import { AiAgentId } from '../public-types/communication.public-types';
|
|
3
|
-
export declare class AiMutationContext {
|
|
4
|
-
readonly type: AiMutationType;
|
|
5
|
-
readonly resource: AiResourceType;
|
|
6
|
-
readonly profileId: AiAgentId;
|
|
7
|
-
readonly payload: any;
|
|
8
|
-
constructor(prototype: AiMutationContext);
|
|
9
|
-
}
|
|
10
2
|
export interface AiFunctionContext<AgentContextType = unknown, FunctionContextType = unknown> {
|
|
11
3
|
agentId?: AiAgentId;
|
|
12
4
|
agentContext: AgentContextType;
|
|
@@ -1,13 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AiMutationContext = void 0;
|
|
4
|
-
class AiMutationContext {
|
|
5
|
-
constructor(prototype) {
|
|
6
|
-
this.profileId = prototype.profileId;
|
|
7
|
-
this.type = prototype.type;
|
|
8
|
-
this.resource = prototype.resource;
|
|
9
|
-
this.payload = prototype.payload;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.AiMutationContext = AiMutationContext;
|
|
13
3
|
//# sourceMappingURL=ai-chatbot.public-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-chatbot.public-context.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types-backend/ai-chatbot.public-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ai-chatbot.public-context.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types-backend/ai-chatbot.public-context.ts"],"names":[],"mappings":""}
|
|
@@ -12,8 +12,8 @@ import { GraphqlContext } from './graphql.public-context';
|
|
|
12
12
|
import { AiFunctionContext } from './ai-chatbot.public-context';
|
|
13
13
|
import { StorageContext } from '../public-types/storage.types';
|
|
14
14
|
import { NativeQueryContext } from './native-query.public-context';
|
|
15
|
-
import { AiChatContext } from '../public-types/ai-agent.public-types';
|
|
16
15
|
import { SecureMetricContext } from './metric.public-context';
|
|
16
|
+
import { SecureAiAgentContext } from '../public-types/ai-agent.public-types';
|
|
17
17
|
export type SecureDatabaseAction<T extends DatabaseActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'read' ? ((context: QueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: MutationContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
18
18
|
export type SecureStorageAction<T extends StorageActionType> = T extends 'all' ? () => boolean | Promise<boolean> : (context: StorageContext) => boolean | Promise<boolean>;
|
|
19
19
|
export type SecureTopicAction<T extends TopicActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'read' ? ((context: TopicReadContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: TopicWriteContext<T>) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
@@ -22,7 +22,7 @@ export type SecureApiAction = ((context: ApiCallContext) => boolean | Promise<bo
|
|
|
22
22
|
export type SecureNativeQueryAction = ((context: NativeQueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
23
23
|
export type SecureDistributedLockAction = ((context: DistributedLockContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
24
24
|
export type SecureGraphQLAction = ((context: GraphqlContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
25
|
-
export type SecureAiAgentAction = ((context:
|
|
25
|
+
export type SecureAiAgentAction = ((context: SecureAiAgentContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
26
26
|
export type ClientConnectionStateChangeAction = (clientId: ClientId, clientConnectionState: ClientConnectionState) => Promise<void> | void;
|
|
27
27
|
export type ExecutableAction = (...args: any[]) => any;
|
|
28
28
|
export type AiFunctionAction<T extends Record<string, any> = any> = (params: T, context: AiFunctionContext<any, any>) => any;
|
|
@@ -1,43 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AiAgentId, AppId, ClientRequestId
|
|
3
|
-
import {
|
|
4
|
-
import { FunctionName, FunctionNameWithContext } from '../public-types/bundle-data.public-types';
|
|
5
|
-
import { O11Y_TAG_AI_MODEL, O11Y_TAG_AI_PROFILE, O11Y_TAG_API_KEY_SOURCE, O11Y_TAG_INTEGRATION_ID } from './observability.types';
|
|
6
|
-
export type AiChatResponseFormat = 'text' | 'json_object';
|
|
7
|
-
export interface AiChatOptions {
|
|
8
|
-
maxTokens: number;
|
|
9
|
-
responseFormat: AiChatResponseFormat;
|
|
10
|
-
temperature: number;
|
|
11
|
-
topP: number;
|
|
12
|
-
instructions: Array<string>;
|
|
13
|
-
clientId: string;
|
|
14
|
-
fileUrls: Array<AiFileUrl>;
|
|
15
|
-
reasoningEffort?: 'low' | 'medium' | 'high';
|
|
16
|
-
agentId?: AiAgentId;
|
|
17
|
-
chatId?: string;
|
|
18
|
-
traceId?: string;
|
|
19
|
-
agentContext?: Record<string, unknown>;
|
|
20
|
-
functions?: Array<FunctionName | FunctionNameWithContext>;
|
|
21
|
-
connectedAgents?: Array<AiConnectedAgentMetadata>;
|
|
22
|
-
connectedIntegrations?: Array<AiConnectedIntegrationMetadata>;
|
|
23
|
-
quotas?: AiChatPromptQuotas;
|
|
24
|
-
groundingWithWebSearch?: boolean;
|
|
25
|
-
}
|
|
1
|
+
import { AiAgentChatOptions, AiChatModelName, AiGenerateImageOptions, AllAiAgentChatOptions, ApiKeySource } from '../public-types/ai-agent.public-types';
|
|
2
|
+
import { AiAgentId, AppId, ClientRequestId } from '../public-types/communication.public-types';
|
|
3
|
+
import { O11Y_TAG_AI_MODEL, O11Y_TAG_AI_PROFILE, O11Y_TAG_API_KEY_SOURCE } from './observability.types';
|
|
26
4
|
type ModelDataType = {
|
|
27
5
|
maxTokens: number;
|
|
28
6
|
defaultTokens: number;
|
|
29
7
|
};
|
|
30
8
|
export declare const AiModelData: Record<AiChatModelName, ModelDataType>;
|
|
31
|
-
export interface
|
|
32
|
-
|
|
33
|
-
integrationId: IntegrationId;
|
|
34
|
-
}
|
|
35
|
-
export interface AiChatRequest extends AiBaseRequest {
|
|
9
|
+
export interface AiChatRequest {
|
|
10
|
+
agentId: AiAgentId;
|
|
36
11
|
clientRequestId: ClientRequestId;
|
|
37
12
|
prompt?: string;
|
|
38
13
|
options?: AllAiAgentChatOptions;
|
|
39
14
|
}
|
|
40
|
-
export interface AiAskRequest
|
|
15
|
+
export interface AiAskRequest {
|
|
16
|
+
agentId: AiAgentId;
|
|
41
17
|
prompt?: string;
|
|
42
18
|
options?: AllAiAgentChatOptions;
|
|
43
19
|
}
|
|
@@ -47,9 +23,8 @@ export interface AiGenerateImageRequest {
|
|
|
47
23
|
}
|
|
48
24
|
export interface AiAskQuestionInternalRequest {
|
|
49
25
|
appId: AppId;
|
|
50
|
-
model: AiChatModelName;
|
|
51
26
|
prompt: string;
|
|
52
|
-
options:
|
|
27
|
+
options: AiAgentChatOptions;
|
|
53
28
|
}
|
|
54
29
|
export interface AiAskQuestionInternalResponse {
|
|
55
30
|
answer: string;
|
|
@@ -61,100 +36,7 @@ export interface AiContextSizeRequest {
|
|
|
61
36
|
export interface AiContextSizeResponse {
|
|
62
37
|
sizeBytes: number;
|
|
63
38
|
}
|
|
64
|
-
export interface AiBaseMutateRequest extends AiBaseRequest {
|
|
65
|
-
type: AiMutationType;
|
|
66
|
-
resource: AiResourceType;
|
|
67
|
-
}
|
|
68
|
-
export interface AiCreateAgentRequest extends AiBaseMutateRequest {
|
|
69
|
-
type: 'insert';
|
|
70
|
-
resource: 'profile';
|
|
71
|
-
payload: Omit<AiAgentMetadata, 'instructions'>;
|
|
72
|
-
}
|
|
73
|
-
export interface AiInsertInstructionRequest extends AiBaseMutateRequest {
|
|
74
|
-
type: 'insert';
|
|
75
|
-
resource: 'instruction';
|
|
76
|
-
payload: {
|
|
77
|
-
id: string;
|
|
78
|
-
instruction: string;
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
export interface AiInsertContextPayload {
|
|
82
|
-
id: string;
|
|
83
|
-
title: string;
|
|
84
|
-
context: AiContext;
|
|
85
|
-
file?: any;
|
|
86
|
-
}
|
|
87
|
-
export interface AiUpsertContextInDbPayload {
|
|
88
|
-
id: string;
|
|
89
|
-
contextMetadata: AiAgentContextMetadata;
|
|
90
|
-
append?: boolean;
|
|
91
|
-
}
|
|
92
|
-
export interface AiUpdateContextPayload {
|
|
93
|
-
id: string;
|
|
94
|
-
title?: string;
|
|
95
|
-
context?: AiContext;
|
|
96
|
-
file?: any;
|
|
97
|
-
}
|
|
98
|
-
export interface AiInsertContextRequest extends AiBaseMutateRequest {
|
|
99
|
-
type: 'insert';
|
|
100
|
-
resource: 'context';
|
|
101
|
-
payload: AiInsertContextPayload;
|
|
102
|
-
}
|
|
103
|
-
export interface AiInsertManyContextsRequest extends AiBaseMutateRequest {
|
|
104
|
-
type: 'insert';
|
|
105
|
-
resource: 'contexts';
|
|
106
|
-
payload: Array<AiInsertContextPayload>;
|
|
107
|
-
}
|
|
108
|
-
export interface AiAppendContextRequest extends AiBaseMutateRequest {
|
|
109
|
-
type: 'append';
|
|
110
|
-
resource: 'context';
|
|
111
|
-
payload: {
|
|
112
|
-
id: string;
|
|
113
|
-
title: string;
|
|
114
|
-
context: AiContext;
|
|
115
|
-
file?: any;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
export interface AiUpdateAgentRequest extends AiBaseMutateRequest {
|
|
119
|
-
type: 'update';
|
|
120
|
-
resource: 'profile';
|
|
121
|
-
payload: Partial<Omit<AiAgentMetadata, 'instructions'>>;
|
|
122
|
-
}
|
|
123
|
-
export interface AiUpdateInstructionRequest extends AiBaseMutateRequest {
|
|
124
|
-
type: 'update';
|
|
125
|
-
resource: 'instruction';
|
|
126
|
-
payload: {
|
|
127
|
-
id: string;
|
|
128
|
-
instruction: string;
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
export interface AiUpdateContextRequest extends AiBaseMutateRequest {
|
|
132
|
-
type: 'update';
|
|
133
|
-
resource: 'context';
|
|
134
|
-
payload: AiUpdateContextPayload;
|
|
135
|
-
}
|
|
136
|
-
export interface AiDeleteRequest extends AiBaseMutateRequest {
|
|
137
|
-
type: 'delete';
|
|
138
|
-
payload: {
|
|
139
|
-
id?: string;
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
export interface AiFeedbackRequest extends AiBaseMutateRequest {
|
|
143
|
-
type: 'feedback';
|
|
144
|
-
payload: {
|
|
145
|
-
feedback: string;
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
export type AiInsertRequest = AiCreateAgentRequest | AiInsertInstructionRequest | AiInsertContextRequest | AiInsertManyContextsRequest | AiAppendContextRequest;
|
|
149
|
-
export type AiUpdateRequest = AiUpdateAgentRequest | AiUpdateInstructionRequest | AiUpdateContextRequest;
|
|
150
|
-
export type AiMutateRequest = AiInsertRequest | AiUpdateRequest | AiDeleteRequest | AiFeedbackRequest;
|
|
151
|
-
export interface AiMutateResponse {
|
|
152
|
-
groupId?: string;
|
|
153
|
-
instructionId?: string;
|
|
154
|
-
profileId?: AiAgentId;
|
|
155
|
-
}
|
|
156
39
|
export interface AiMetricTag extends Record<string, string> {
|
|
157
|
-
[O11Y_TAG_INTEGRATION_ID]: string;
|
|
158
40
|
[O11Y_TAG_AI_PROFILE]: string;
|
|
159
41
|
[O11Y_TAG_AI_MODEL]: AiChatModelName;
|
|
160
42
|
[O11Y_TAG_API_KEY_SOURCE]: ApiKeySource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-agent.types.js","sourceRoot":"","sources":["../../../../../internal-common/src/types/ai-agent.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ai-agent.types.js","sourceRoot":"","sources":["../../../../../internal-common/src/types/ai-agent.types.ts"],"names":[],"mappings":";;;AAQA,+DAAwG;AAQ3F,QAAA,WAAW,GAA2C;IACjE,gBAAgB,EAAE;QAChB,SAAS,EAAE,SAAS;QACpB,aAAa,EAAE,MAAM;KACtB;IACD,kBAAkB,EAAE;QAClB,SAAS,EAAE,SAAS;QACpB,aAAa,EAAE,MAAM;KACtB;IACD,0BAA0B,EAAE;QAC1B,SAAS,EAAE,OAAO;QAClB,aAAa,EAAE,MAAM;KACtB;IACD,yBAAyB,EAAE;QACzB,SAAS,EAAE,OAAO;QAClB,aAAa,EAAE,MAAM;KACtB;IACD,QAAQ,EAAE;QACR,SAAS,EAAE,OAAO;QAClB,aAAa,EAAE,MAAM;KACtB;IACD,aAAa,EAAE;QACb,SAAS,EAAE,OAAO;QAClB,aAAa,EAAE,MAAM;KACtB;IACD,EAAE,EAAE;QACF,SAAS,EAAE,OAAO;QAClB,aAAa,EAAE,MAAM;KACtB;IACD,SAAS,EAAE;QACT,SAAS,EAAE,OAAO;QAClB,aAAa,EAAE,MAAM;KACtB;IACD,SAAS,EAAE;QACT,SAAS,EAAE,OAAO;QAClB,aAAa,EAAE,MAAM;KACtB;CACF,CAAC"}
|
|
@@ -10,8 +10,8 @@ const api_call_public_context_1 = require("../public-types-backend/api-call.publ
|
|
|
10
10
|
const backend_run_types_1 = require("../types/backend-run.types");
|
|
11
11
|
const distributed_lock_public_context_1 = require("../public-types-backend/distributed-lock.public-context");
|
|
12
12
|
const graphql_public_context_1 = require("../public-types-backend/graphql.public-context");
|
|
13
|
-
const ai_agent_public_types_1 = require("../public-types/ai-agent.public-types");
|
|
14
13
|
const document_types_1 = require("../types/document.types");
|
|
14
|
+
const ai_agent_public_types_1 = require("../public-types/ai-agent.public-types");
|
|
15
15
|
function transformParams(params, executeFunctionAnnotationType) {
|
|
16
16
|
switch (executeFunctionAnnotationType) {
|
|
17
17
|
case 'scheduler':
|
|
@@ -33,7 +33,7 @@ function transformParams(params, executeFunctionAnnotationType) {
|
|
|
33
33
|
case 'secureStorage':
|
|
34
34
|
return [params[0]];
|
|
35
35
|
case 'secureAiAgent':
|
|
36
|
-
return [new ai_agent_public_types_1.
|
|
36
|
+
return [new ai_agent_public_types_1.SecureAiAgentContext(params[0])];
|
|
37
37
|
case 'trigger': {
|
|
38
38
|
const kotlinTriggerRequest = params[0];
|
|
39
39
|
const squidDocIdObject = (0, document_types_1.parseSquidDocId)(kotlinTriggerRequest.squidDocId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-transforms.js","sourceRoot":"","sources":["../../../../../internal-common/src/utils/backend-transforms.ts"],"names":[],"mappings":";;AAuBA,0CAqDC;AAGD,8CAyDC;AAGD,8CAEC;AAGD,8CAEC;AAlJD,uFAA4E;AAC5E,6FAAkF;AAClF,6FAAiF;AACjF,kEAIoC;AAGpC,6GAAiG;AACjG,2FAAgF;
|
|
1
|
+
{"version":3,"file":"backend-transforms.js","sourceRoot":"","sources":["../../../../../internal-common/src/utils/backend-transforms.ts"],"names":[],"mappings":";;AAuBA,0CAqDC;AAGD,8CAyDC;AAGD,8CAEC;AAGD,8CAEC;AAlJD,uFAA4E;AAC5E,6FAAkF;AAClF,6FAAiF;AACjF,kEAIoC;AAGpC,6GAAiG;AACjG,2FAAgF;AAQhF,4DAA0D;AAC1D,iFAA6E;AAG7E,SAAgB,eAAe,CAC7B,MAAkB,EAClB,6BAA4D;IAE5D,QAAQ,6BAA6B,EAAE,CAAC;QACtC,KAAK,WAAW;YACd,OAAO,EAAE,CAAC;QACZ,KAAK,aAAa;YAChB,OAAO,CAAC,IAAI,mCAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7C,KAAK,gBAAgB;YACnB,OAAO;gBACL,IAAI,yCAAe,CACjB,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,EAClB,MAAM,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAuB,EACrD,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAS,CACrC;aACF,CAAC;QACJ,KAAK,mBAAmB;YACtB,OAAO,CAAC,MAAM,CAAC,CAAC,CAAuB,CAAC,CAAC;QAC3C,KAAK,uBAAuB;YAC1B,OAAO,CAAC,IAAI,wDAAsB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACvD,KAAK,eAAe;YAClB,OAAO,CAAC,IAAI,uCAAc,CAAC,MAAM,CAAC,CAAC,CAAmB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IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QAG5F,MAAM,eAAe,GAAmD;YACtE,OAAO;YACP,IAAI;YACJ,UAAU,EAAE,gBAAgB,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;SAClD,CAAC;QAEF,OAAO,eAAe,CAAC;IACzB,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAGD,SAAgB,iBAAiB,CAAC,QAAa;IAC7C,OAAO,QAAQ,IAAI,QAAQ,CAAC,qBAAqB,CAAC;AACpD,CAAC;AAGD,SAAgB,iBAAiB,CAAC,QAAa;IAC7C,OAAO,QAAQ,IAAI,QAAQ,CAAC,qBAAqB,CAAC;AACpD,CAAC"}
|
|
@@ -75,7 +75,7 @@ let LocalBackendSocketService = class LocalBackendSocketService {
|
|
|
75
75
|
this.logTypes = new Set();
|
|
76
76
|
this.readLogTypes();
|
|
77
77
|
if (this.squidDeveloperId === 'prod') {
|
|
78
|
-
console.error('The local backend can only be run using the "dev" environment. Please follow the instructions in: https://docs.getsquid.ai/docs/
|
|
78
|
+
console.error('The local backend can only be run using the "dev" environment. Please follow the instructions in: https://docs.getsquid.ai/docs/fullstack/local-dev-cli');
|
|
79
79
|
process.exit(1);
|
|
80
80
|
}
|
|
81
81
|
this.socketEndpoint = (0, http_1.getApplicationUrl)(this.region, this.fullAppId, 'ws/localdev')
|