@squidcloud/local-backend 1.0.325 → 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 +116 -33
- package/dist/internal-common/src/public-types/ai-agent.public-types.js +8 -6
- package/dist/internal-common/src/public-types/ai-agent.public-types.js.map +1 -1
- package/dist/internal-common/src/public-types/bundle-data.public-types.d.ts +0 -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 +4 -4
- package/dist/internal-common/src/types/ai-agent.types.d.ts +11 -129
- package/dist/internal-common/src/types/ai-agent.types.js.map +1 -1
- package/dist/internal-common/src/types/backend-run.types.d.ts +1 -1
- package/dist/internal-common/src/types/backend-run.types.js +1 -2
- package/dist/internal-common/src/types/backend-run.types.js.map +1 -1
- package/dist/internal-common/src/types/bundle-data.types.d.ts +2 -2
- package/dist/internal-common/src/types/integrations/schemas.d.ts +0 -3
- package/dist/internal-common/src/types/integrations/schemas.js +0 -6
- package/dist/internal-common/src/types/integrations/schemas.js.map +1 -1
- package/dist/internal-common/src/types/observability.types.d.ts +1 -1
- package/dist/internal-common/src/types/observability.types.js +1 -1
- package/dist/internal-common/src/types/observability.types.js.map +1 -1
- package/dist/internal-common/src/utils/backend-transforms.js +3 -6
- 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,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AiAgentId, IntegrationId } from './communication.public-types';
|
|
1
|
+
import { AiAgentId, AiContextId, IntegrationId } from './communication.public-types';
|
|
3
2
|
import { IntegrationType } from './integration.public-types';
|
|
3
|
+
import { FunctionName, FunctionNameWithContext } from './bundle-data.public-types';
|
|
4
|
+
export declare const OPENAI_O1_CHAT_MODEL_NAMES: readonly ["o1", "o1-mini"];
|
|
5
|
+
export declare const OPENAI_REASONING_CHAT_MODEL_NAMES: readonly ["o1", "o1-mini", "o3-mini"];
|
|
4
6
|
export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-4o", "gpt-4o-mini", "o1", "o1-mini", "o3-mini"];
|
|
5
7
|
export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-1.5-pro", "gemini-2.0-flash"];
|
|
6
8
|
export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-3-5-haiku-latest", "claude-3-5-sonnet-latest"];
|
|
@@ -20,6 +22,7 @@ export declare const OPEN_AI_CREATE_SPEECH_FORMATS: readonly ["mp3", "opus", "aa
|
|
|
20
22
|
export type AiChatModelName = (typeof AI_CHAT_MODEL_NAMES)[number];
|
|
21
23
|
export type AiEmbeddingsModelName = (typeof AI_EMBEDDINGS_MODEL_NAMES)[number];
|
|
22
24
|
export type OpenAiChatModelName = (typeof OPENAI_CHAT_MODEL_NAMES)[number];
|
|
25
|
+
export type OpenAiReasoningChatModelName = (typeof OPENAI_REASONING_CHAT_MODEL_NAMES)[number];
|
|
23
26
|
export type GeminiChatModelName = (typeof GEMINI_CHAT_MODEL_NAMES)[number];
|
|
24
27
|
export type AnthropicChatModelName = (typeof ANTHROPIC_CHAT_MODEL_NAMES)[number];
|
|
25
28
|
export type AiImageModelName = (typeof AI_IMAGE_MODEL_NAMES)[number];
|
|
@@ -35,7 +38,7 @@ export type FluxModelName = (typeof FLUX_MODEL_NAMES)[number];
|
|
|
35
38
|
export type AiGenerateImageOptions = DallEOptions | StableDiffusionCoreOptions | FluxOptions;
|
|
36
39
|
export type AiAudioTranscribeOptions = WhisperOptions;
|
|
37
40
|
export type AiAudioCreateSpeechOptions = OpenAiCreateSpeechOptions;
|
|
38
|
-
export declare const VECTOR_DB_TYPES: readonly ["
|
|
41
|
+
export declare const VECTOR_DB_TYPES: readonly ["postgres"];
|
|
39
42
|
export type VectorDbType = (typeof VECTOR_DB_TYPES)[number];
|
|
40
43
|
export interface AiAudioCreateSpeechResponse {
|
|
41
44
|
mimeType: string;
|
|
@@ -108,7 +111,7 @@ export interface AiConnectedAgentMetadata {
|
|
|
108
111
|
export interface AiChatPromptQuotas {
|
|
109
112
|
maxAiCallStackSize: number;
|
|
110
113
|
}
|
|
111
|
-
|
|
114
|
+
interface BaseAiAgentChatOptions {
|
|
112
115
|
maxTokens?: number;
|
|
113
116
|
chatId?: string;
|
|
114
117
|
disableHistory?: boolean;
|
|
@@ -116,22 +119,94 @@ export interface AiAgentChatOptions {
|
|
|
116
119
|
includeReference?: boolean;
|
|
117
120
|
responseFormat?: OpenAiResponseFormat;
|
|
118
121
|
smoothTyping?: boolean;
|
|
119
|
-
temperature?: number;
|
|
120
|
-
topP?: number;
|
|
121
|
-
overrideModel?: AiChatModelName;
|
|
122
|
-
fileUrls?: Array<AiFileUrl>;
|
|
123
|
-
reasoningEffort?: 'low' | 'medium' | 'high';
|
|
124
122
|
agentContext?: Record<string, unknown>;
|
|
125
123
|
functions?: Array<FunctionName | FunctionNameWithContext>;
|
|
126
|
-
instructions?:
|
|
124
|
+
instructions?: string;
|
|
127
125
|
contextMetadataFilter?: AiContextMetadataFilter;
|
|
128
126
|
voiceOptions?: AiAudioCreateSpeechOptions;
|
|
129
127
|
connectedAgents?: Array<AiConnectedAgentMetadata>;
|
|
130
128
|
connectedIntegrations?: Array<AiConnectedIntegrationMetadata>;
|
|
131
129
|
quotas?: AiChatPromptQuotas;
|
|
132
130
|
includeMetadata?: boolean;
|
|
131
|
+
temperature?: number;
|
|
132
|
+
model?: AiChatModelName;
|
|
133
|
+
}
|
|
134
|
+
export interface GeminiChatOptions extends BaseAiAgentChatOptions {
|
|
135
|
+
model?: GeminiChatModelName;
|
|
133
136
|
groundingWithWebSearch?: boolean;
|
|
134
137
|
}
|
|
138
|
+
export interface OpenAiChatOptions extends BaseAiAgentChatOptions {
|
|
139
|
+
model?: OpenAiChatModelName;
|
|
140
|
+
fileUrls?: Array<AiFileUrl>;
|
|
141
|
+
}
|
|
142
|
+
export interface OpenAiReasoningChatOptions extends OpenAiChatOptions {
|
|
143
|
+
model?: OpenAiReasoningChatModelName;
|
|
144
|
+
reasoningEffort?: 'low' | 'medium' | 'high';
|
|
145
|
+
}
|
|
146
|
+
export interface AnthropicChatOptions extends BaseAiAgentChatOptions {
|
|
147
|
+
model?: AnthropicChatModelName;
|
|
148
|
+
}
|
|
149
|
+
export type AiSessionOptions = Partial<{
|
|
150
|
+
traceId: string;
|
|
151
|
+
clientId: string;
|
|
152
|
+
agentId: string;
|
|
153
|
+
}>;
|
|
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;
|
|
155
|
+
export type AllAiAgentChatOptions = {
|
|
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);
|
|
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
|
+
};
|
|
135
210
|
export interface AiObserveStatusOptions {
|
|
136
211
|
chatId?: string;
|
|
137
212
|
}
|
|
@@ -167,18 +242,10 @@ export interface AiSearchOptions {
|
|
|
167
242
|
}
|
|
168
243
|
export interface AiSearchRequest {
|
|
169
244
|
options: AiSearchOptions;
|
|
170
|
-
|
|
171
|
-
integrationId: IntegrationId;
|
|
245
|
+
agentId: AiAgentId;
|
|
172
246
|
}
|
|
173
247
|
export type AiMutationType = 'insert' | 'update' | 'delete' | 'append' | 'feedback';
|
|
174
248
|
export type AiResourceType = 'instruction' | 'profile' | 'context' | 'contexts';
|
|
175
|
-
export type AiContextType = 'text' | 'url' | 'file';
|
|
176
|
-
export interface AiContextBase {
|
|
177
|
-
type: AiContextType;
|
|
178
|
-
data: string;
|
|
179
|
-
metadata?: AiContextMetadata;
|
|
180
|
-
password?: string;
|
|
181
|
-
}
|
|
182
249
|
export interface AiSearchResponse {
|
|
183
250
|
chunks: Array<AiSearchResultChunk>;
|
|
184
251
|
}
|
|
@@ -187,29 +254,44 @@ export interface AiSearchResultChunk {
|
|
|
187
254
|
metadata?: AiContextMetadata;
|
|
188
255
|
score: number;
|
|
189
256
|
}
|
|
190
|
-
export
|
|
191
|
-
|
|
257
|
+
export declare class SecureAiAgentContext {
|
|
258
|
+
readonly prompt?: string;
|
|
259
|
+
readonly agentId: AiAgentId;
|
|
260
|
+
constructor(prototype: SecureAiAgentContext);
|
|
192
261
|
}
|
|
193
|
-
export interface
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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;
|
|
279
|
+
}
|
|
280
|
+
export type AiContextType = 'text' | 'file';
|
|
281
|
+
export interface TextContextRequest extends BaseContextRequest {
|
|
282
|
+
type: 'text';
|
|
283
|
+
title: string;
|
|
284
|
+
text: string;
|
|
198
285
|
}
|
|
199
|
-
export interface
|
|
286
|
+
export interface FileContextRequest extends BaseContextRequest {
|
|
200
287
|
type: 'file';
|
|
201
288
|
extractImages?: boolean;
|
|
202
289
|
minImageWidth?: number;
|
|
203
290
|
minImageHeight?: number;
|
|
204
291
|
fullPageAsImage?: boolean;
|
|
205
292
|
extractionModel?: AiChatModelName;
|
|
293
|
+
password?: string;
|
|
206
294
|
}
|
|
207
|
-
export declare class AiChatContext {
|
|
208
|
-
readonly prompt?: string;
|
|
209
|
-
readonly profileId: AiAgentId;
|
|
210
|
-
constructor(prototype: AiChatContext);
|
|
211
|
-
}
|
|
212
|
-
export type AiContext = AiTextContext | AiUrlContext | AiFileContext;
|
|
213
295
|
export type AiContextMetadataValue = number | string | boolean | undefined;
|
|
214
296
|
export type AiContextMetadataValueArray = AiContextMetadataValue[];
|
|
215
297
|
export interface AiContextMetadataEqFilter {
|
|
@@ -253,3 +335,4 @@ export type AiContextMetadataFilter = AiContextMetadataFieldFilter | AiContextMe
|
|
|
253
335
|
export type AiContextMetadata = Record<string, AiContextMetadataValue>;
|
|
254
336
|
export declare function validateAiContextMetadata(metadata: AiContextMetadata): void;
|
|
255
337
|
export declare function validateAiContextMetadataFilter(filter: AiContextMetadataFilter): void;
|
|
338
|
+
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
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
|
-
exports.
|
|
6
|
+
exports.OPENAI_O1_CHAT_MODEL_NAMES = ['o1', 'o1-mini'];
|
|
7
|
+
exports.OPENAI_REASONING_CHAT_MODEL_NAMES = [...exports.OPENAI_O1_CHAT_MODEL_NAMES, 'o3-mini'];
|
|
8
|
+
exports.OPENAI_CHAT_MODEL_NAMES = ['gpt-4o', 'gpt-4o-mini', ...exports.OPENAI_REASONING_CHAT_MODEL_NAMES];
|
|
7
9
|
exports.GEMINI_CHAT_MODEL_NAMES = ['gemini-1.5-pro', 'gemini-2.0-flash'];
|
|
8
10
|
exports.ANTHROPIC_CHAT_MODEL_NAMES = ['claude-3-5-haiku-latest', 'claude-3-5-sonnet-latest'];
|
|
9
11
|
exports.AI_CHAT_MODEL_NAMES = [
|
|
@@ -34,14 +36,14 @@ exports.AI_IMAGE_MODEL_NAMES = [
|
|
|
34
36
|
exports.AI_AUDIO_TRANSCRIPTION_MODEL_NAMES = [...exports.OPENAI_AUDIO_TRANSCRIPTION_MODEL_NAMES];
|
|
35
37
|
exports.AI_AUDIO_CREATE_SPEECH_MODEL_NAMES = [...exports.OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES];
|
|
36
38
|
exports.OPEN_AI_CREATE_SPEECH_FORMATS = ['mp3', 'opus', 'aac', 'flac', 'wav', 'pcm'];
|
|
37
|
-
exports.VECTOR_DB_TYPES = ['
|
|
38
|
-
class
|
|
39
|
+
exports.VECTOR_DB_TYPES = ['postgres'];
|
|
40
|
+
class SecureAiAgentContext {
|
|
39
41
|
constructor(prototype) {
|
|
40
|
-
this.
|
|
42
|
+
this.agentId = prototype.agentId;
|
|
41
43
|
this.prompt = prototype.prompt;
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
|
-
exports.
|
|
46
|
+
exports.SecureAiAgentContext = SecureAiAgentContext;
|
|
45
47
|
const INTERNAL_METADATA_KEYS = ['groupId', 'appId', 'integrationId', 'profileId', 'index', 'text', 'filePathInBucket'];
|
|
46
48
|
function validateAiContextMetadata(metadata) {
|
|
47
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":"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"}
|
|
@@ -3,7 +3,6 @@ export type DatabaseActionType = 'read' | 'write' | 'update' | 'insert' | 'delet
|
|
|
3
3
|
export type StorageActionType = 'read' | 'write' | 'update' | 'insert' | 'delete' | 'all';
|
|
4
4
|
export type TopicActionType = 'read' | 'write' | 'all';
|
|
5
5
|
export type MetricActionType = 'write' | 'all';
|
|
6
|
-
export type AiActionType = 'chat' | 'mutate' | 'all';
|
|
7
6
|
export type AiFunctionParamType = 'string' | 'number' | 'boolean' | 'date';
|
|
8
7
|
export interface AiFunctionParam {
|
|
9
8
|
name: string;
|
|
@@ -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":[],"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":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MutationContext } from './mutation.public-context';
|
|
2
2
|
import { ApiCallContext } from './api-call.public-context';
|
|
3
3
|
import { QueryContext } from './query.public-context';
|
|
4
|
-
import {
|
|
4
|
+
import { DatabaseActionType, MetricActionType, StorageActionType, TopicActionType } from '../public-types/bundle-data.public-types';
|
|
5
5
|
import { ClientConnectionState } from '../public-types/socket.public-types';
|
|
6
6
|
import { CollectionName, DocIdOrDocIdObj, DocumentData } from '../public-types/document.public-types';
|
|
7
7
|
import { MutationType } from '../public-types/mutation.public-types';
|
|
@@ -9,11 +9,11 @@ import { ClientId, IntegrationId, SquidDocId } from '../public-types/communicati
|
|
|
9
9
|
import { TopicReadContext, TopicWriteContext } from './topic.public-context';
|
|
10
10
|
import { DistributedLockContext } from './distributed-lock.public-context';
|
|
11
11
|
import { GraphqlContext } from './graphql.public-context';
|
|
12
|
-
import {
|
|
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
|
|
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,44 +1,21 @@
|
|
|
1
|
-
import { AiAgentChatOptions,
|
|
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
|
-
agentContext?: Record<string, unknown>;
|
|
19
|
-
functions?: Array<FunctionName | FunctionNameWithContext>;
|
|
20
|
-
connectedAgents?: Array<AiConnectedAgentMetadata>;
|
|
21
|
-
connectedIntegrations?: Array<AiConnectedIntegrationMetadata>;
|
|
22
|
-
quotas?: AiChatPromptQuotas;
|
|
23
|
-
groundingWithWebSearch?: boolean;
|
|
24
|
-
}
|
|
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';
|
|
25
4
|
type ModelDataType = {
|
|
26
5
|
maxTokens: number;
|
|
27
6
|
defaultTokens: number;
|
|
28
7
|
};
|
|
29
8
|
export declare const AiModelData: Record<AiChatModelName, ModelDataType>;
|
|
30
|
-
export interface
|
|
31
|
-
|
|
32
|
-
integrationId: IntegrationId;
|
|
33
|
-
}
|
|
34
|
-
export interface AiChatRequest extends AiBaseRequest {
|
|
9
|
+
export interface AiChatRequest {
|
|
10
|
+
agentId: AiAgentId;
|
|
35
11
|
clientRequestId: ClientRequestId;
|
|
36
12
|
prompt?: string;
|
|
37
|
-
options?:
|
|
13
|
+
options?: AllAiAgentChatOptions;
|
|
38
14
|
}
|
|
39
|
-
export interface AiAskRequest
|
|
15
|
+
export interface AiAskRequest {
|
|
16
|
+
agentId: AiAgentId;
|
|
40
17
|
prompt?: string;
|
|
41
|
-
options?:
|
|
18
|
+
options?: AllAiAgentChatOptions;
|
|
42
19
|
}
|
|
43
20
|
export interface AiGenerateImageRequest {
|
|
44
21
|
prompt: string;
|
|
@@ -46,115 +23,20 @@ export interface AiGenerateImageRequest {
|
|
|
46
23
|
}
|
|
47
24
|
export interface AiAskQuestionInternalRequest {
|
|
48
25
|
appId: AppId;
|
|
49
|
-
model: AiChatModelName;
|
|
50
26
|
prompt: string;
|
|
51
|
-
options:
|
|
27
|
+
options: AiAgentChatOptions;
|
|
52
28
|
}
|
|
53
29
|
export interface AiAskQuestionInternalResponse {
|
|
54
30
|
answer: string;
|
|
55
31
|
}
|
|
56
32
|
export interface AiContextSizeRequest {
|
|
57
33
|
appId: AppId;
|
|
58
|
-
|
|
59
|
-
profileId: AiAgentId;
|
|
34
|
+
agentId: AiAgentId;
|
|
60
35
|
}
|
|
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"}
|
|
@@ -28,7 +28,7 @@ export interface ConnectorRunConfiguration {
|
|
|
28
28
|
export interface LoadJsPayload {
|
|
29
29
|
indexJsPaths: Array<string>;
|
|
30
30
|
}
|
|
31
|
-
export declare const ExecuteFunctionSecureAnnotations: readonly ["
|
|
31
|
+
export declare const ExecuteFunctionSecureAnnotations: readonly ["secureAiAgent", "secureApi", "secureDistributedLock", "secureGraphQL", "secureMetricsReport", "secureMutation", "secureNamedQuery", "secureNativeQuery", "secureQuery", "secureQueueRead", "secureQueueWrite", "secureStorage"];
|
|
32
32
|
export type ExecuteFunctionSecureAnnotationType = (typeof ExecuteFunctionSecureAnnotations)[number];
|
|
33
33
|
export type ExecuteFunctionAnnotationType = 'aiFunction' | 'executable' | 'metadata' | 'openapi' | 'scheduler' | 'transformRead' | 'transformWrite' | 'trigger' | 'webhook' | ExecuteFunctionSecureAnnotationType;
|
|
34
34
|
export interface ExecuteFunctionPayload {
|