@squidcloud/local-backend 1.0.326 → 1.0.327
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 +98 -35
- 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;
|
|
@@ -121,7 +121,7 @@ interface BaseAiAgentChatOptions {
|
|
|
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,84 @@ 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 interface OpenAiReasoningChatOptions extends OpenAiChatOptions {
|
|
143
|
+
model?: OpenAiReasoningChatModelName;
|
|
144
|
+
reasoningEffort?: 'low' | 'medium' | 'high';
|
|
145
|
+
}
|
|
147
146
|
export interface AnthropicChatOptions extends BaseAiAgentChatOptions {
|
|
148
|
-
|
|
147
|
+
model?: AnthropicChatModelName;
|
|
149
148
|
}
|
|
149
|
+
export type AiSessionOptions = Partial<{
|
|
150
|
+
traceId: string;
|
|
151
|
+
clientId: string;
|
|
152
|
+
agentId: string;
|
|
153
|
+
}>;
|
|
150
154
|
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
155
|
export type AllAiAgentChatOptions = {
|
|
152
156
|
[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
157
|
};
|
|
158
|
+
export type AllOpenAiAgentChatOptions = {
|
|
159
|
+
[K in keyof OpenAiChatOptions | keyof OpenAiReasoningChatOptions]?: (K extends keyof OpenAiChatOptions ? OpenAiChatOptions[K] : never) | (K extends keyof OpenAiReasoningChatOptions ? OpenAiReasoningChatOptions[K] : never);
|
|
160
|
+
};
|
|
161
|
+
export interface AiAgent<T extends AiChatModelName | undefined = undefined> {
|
|
162
|
+
id: AiAgentId;
|
|
163
|
+
createdAt: Date;
|
|
164
|
+
updatedAt: Date;
|
|
165
|
+
description?: string;
|
|
166
|
+
isPublic?: boolean;
|
|
167
|
+
auditLog?: boolean;
|
|
168
|
+
options: AiAgentChatOptions<T>;
|
|
169
|
+
}
|
|
170
|
+
export interface GetAgentRequest {
|
|
171
|
+
agentId: AiAgentId;
|
|
172
|
+
}
|
|
173
|
+
export interface GetAgentResponse {
|
|
174
|
+
agent: AiAgent | undefined;
|
|
175
|
+
}
|
|
176
|
+
export interface GetAgentContextRequest {
|
|
177
|
+
agentId: AiAgentId;
|
|
178
|
+
contextId: string;
|
|
179
|
+
}
|
|
180
|
+
export interface DeleteAgentRequest {
|
|
181
|
+
agentId: AiAgentId;
|
|
182
|
+
}
|
|
183
|
+
export interface ListAgentContextsRequest {
|
|
184
|
+
agentId: AiAgentId;
|
|
185
|
+
}
|
|
186
|
+
export interface ListAgentContextsResponse {
|
|
187
|
+
contexts: Array<AiAgentContext>;
|
|
188
|
+
}
|
|
189
|
+
export interface DeleteAgentContextsRequest {
|
|
190
|
+
agentId: AiAgentId;
|
|
191
|
+
contextIds: Array<string>;
|
|
192
|
+
}
|
|
193
|
+
export interface UpsertAgentContextsRequest {
|
|
194
|
+
agentId: AiAgentId;
|
|
195
|
+
contextRequests: Array<AgentContextRequest>;
|
|
196
|
+
}
|
|
197
|
+
export interface ProvideAgentFeedbackRequest {
|
|
198
|
+
agentId: AiAgentId;
|
|
199
|
+
feedback: string;
|
|
200
|
+
}
|
|
201
|
+
export interface ResetAgentFeedbackRequest {
|
|
202
|
+
agentId: AiAgentId;
|
|
203
|
+
}
|
|
204
|
+
export interface ListAgentsResponse {
|
|
205
|
+
agents: Array<AiAgent>;
|
|
206
|
+
}
|
|
207
|
+
export type UpsertAgentRequest = Omit<AiAgent, 'createdAt' | 'updatedAt' | 'options'> & {
|
|
208
|
+
options?: AiAgentChatOptions;
|
|
209
|
+
};
|
|
154
210
|
export interface AiObserveStatusOptions {
|
|
155
211
|
chatId?: string;
|
|
156
212
|
}
|
|
@@ -186,18 +242,10 @@ export interface AiSearchOptions {
|
|
|
186
242
|
}
|
|
187
243
|
export interface AiSearchRequest {
|
|
188
244
|
options: AiSearchOptions;
|
|
189
|
-
|
|
190
|
-
integrationId: IntegrationId;
|
|
245
|
+
agentId: AiAgentId;
|
|
191
246
|
}
|
|
192
247
|
export type AiMutationType = 'insert' | 'update' | 'delete' | 'append' | 'feedback';
|
|
193
248
|
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;
|
|
200
|
-
}
|
|
201
249
|
export interface AiSearchResponse {
|
|
202
250
|
chunks: Array<AiSearchResultChunk>;
|
|
203
251
|
}
|
|
@@ -206,29 +254,44 @@ export interface AiSearchResultChunk {
|
|
|
206
254
|
metadata?: AiContextMetadata;
|
|
207
255
|
score: number;
|
|
208
256
|
}
|
|
209
|
-
export
|
|
210
|
-
|
|
257
|
+
export declare class SecureAiAgentContext {
|
|
258
|
+
readonly prompt?: string;
|
|
259
|
+
readonly agentId: AiAgentId;
|
|
260
|
+
constructor(prototype: SecureAiAgentContext);
|
|
211
261
|
}
|
|
212
|
-
export interface
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
262
|
+
export interface AiAgentContext {
|
|
263
|
+
id: AiContextId;
|
|
264
|
+
createdAt: Date;
|
|
265
|
+
updatedAt: Date;
|
|
266
|
+
agentId: AiAgentId;
|
|
267
|
+
type: AiContextType;
|
|
268
|
+
title: string;
|
|
269
|
+
text: string;
|
|
270
|
+
preview: boolean;
|
|
271
|
+
sizeBytes: number;
|
|
272
|
+
metadata: AiContextMetadata;
|
|
273
|
+
}
|
|
274
|
+
export type AgentContextRequest = TextContextRequest | FileContextRequest;
|
|
275
|
+
export interface BaseContextRequest {
|
|
276
|
+
contextId: string;
|
|
277
|
+
type: AiContextType;
|
|
278
|
+
metadata?: AiContextMetadata;
|
|
217
279
|
}
|
|
218
|
-
export
|
|
280
|
+
export type AiContextType = 'text' | 'file';
|
|
281
|
+
export interface TextContextRequest extends BaseContextRequest {
|
|
282
|
+
type: 'text';
|
|
283
|
+
title: string;
|
|
284
|
+
text: string;
|
|
285
|
+
}
|
|
286
|
+
export interface FileContextRequest extends BaseContextRequest {
|
|
219
287
|
type: 'file';
|
|
220
288
|
extractImages?: boolean;
|
|
221
289
|
minImageWidth?: number;
|
|
222
290
|
minImageHeight?: number;
|
|
223
291
|
fullPageAsImage?: boolean;
|
|
224
292
|
extractionModel?: AiChatModelName;
|
|
293
|
+
password?: string;
|
|
225
294
|
}
|
|
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
295
|
export type AiContextMetadataValue = number | string | boolean | undefined;
|
|
233
296
|
export type AiContextMetadataValueArray = AiContextMetadataValue[];
|
|
234
297
|
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":";;;AAokBA,8DAgBC;AAGD,0EAkCC;AApnBY,QAAA,0BAA0B,GAAG,CAAC,IAAI,EAAE,SAAS,CAAU,CAAC;AACxD,QAAA,iCAAiC,GAAG,CAAC,GAAG,kCAA0B,EAAE,SAAS,CAAU,CAAC;AACxF,QAAA,uBAAuB,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,yCAAiC,CAAU,CAAC;AAEnG,QAAA,uBAAuB,GAAG,CAAC,gBAAgB,EAAE,kBAAkB,CAAU,CAAC;AAE1E,QAAA,0BAA0B,GAAG,CAAC,yBAAyB,EAAE,0BAA0B,CAAU,CAAC;AAG9F,QAAA,mBAAmB,GAAG;IACjC,GAAG,+BAAuB;IAC1B,GAAG,kCAA0B;IAC7B,GAAG,+BAAuB;CAClB,CAAC;AAEE,QAAA,6BAA6B,GAAG;IAC3C,wBAA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BAAsB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBACzC,MAAM,IAAI,KAAK,CACb,+BAA+B,GAAG,gDAAgD,sBAAsB,CAAC,IAAI,CAC3G,IAAI,CACL,EAAE,CACJ,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YAC1B,IACE,OAAO,KAAK,KAAK,QAAQ;gBACzB,OAAO,KAAK,KAAK,QAAQ;gBACzB,OAAO,KAAK,KAAK,QAAQ;gBACzB,OAAO,KAAK,KAAK,SAAS,EAC1B,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,yCAAyC,GAAG,wBAAwB,OAAO,KAAK,EAAE,CAAC,CAAC;YACtG,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,MAA+B;IAClD,OAAO,MAAM,IAAI,MAAM,CAAC;AAC1B,CAAC;AAED,SAAS,UAAU,CAAC,MAA+B;IACjD,OAAO,KAAK,IAAI,MAAM,CAAC;AACzB,CAAC"}
|
|
@@ -7,6 +7,5 @@ export type ClientId = string;
|
|
|
7
7
|
export type SquidDocId = string;
|
|
8
8
|
export type ClientRequestId = string;
|
|
9
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":[],"m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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,2F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AqB,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')
|