@squidcloud/jira-jsm-client 1.0.497 → 1.0.498
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/connectors/jira_jsm/common/src/jira-jsm-types.d.ts +1 -28
- package/dist/internal-common/src/ai/system-openai-compatible.d.ts +35 -0
- package/dist/internal-common/src/public-types/ai-agent-integrations.public-types.d.ts +71 -0
- package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +1594 -0
- package/dist/internal-common/src/public-types/ai-common.public-types.d.ts +303 -0
- package/dist/internal-common/src/public-types/ai-function.public-types.d.ts +114 -0
- package/dist/internal-common/src/public-types/ai-knowledge-base.public-types.d.ts +2378 -0
- package/dist/internal-common/src/public-types/ai-query.public-types.d.ts +266 -0
- package/dist/internal-common/src/public-types/api-client.public-types.d.ts +9 -0
- package/dist/internal-common/src/public-types/api.public-types.d.ts +99 -0
- package/dist/internal-common/src/public-types/backend.public-types.d.ts +61 -0
- package/dist/internal-common/src/public-types/connector.public-types.d.ts +12 -0
- package/dist/internal-common/src/public-types/context.public-types.d.ts +83 -0
- package/dist/internal-common/src/public-types/document.public-types.d.ts +71 -0
- package/dist/internal-common/src/public-types/event.public-types.d.ts +18 -0
- package/dist/internal-common/src/public-types/extraction.public-types.d.ts +405 -0
- package/dist/internal-common/src/public-types/http-status.public-types.d.ts +415 -0
- package/dist/internal-common/src/public-types/integration.public-types.d.ts +65 -0
- package/dist/internal-common/src/public-types/job.public-types.d.ts +101 -0
- package/dist/internal-common/src/public-types/langgraph.public-types.d.ts +50 -0
- package/dist/internal-common/src/public-types/metadata-filter.public-types.d.ts +106 -0
- package/dist/internal-common/src/public-types/query.public-types.d.ts +149 -0
- package/dist/internal-common/src/public-types/scheduler.public-types.d.ts +43 -0
- package/dist/internal-common/src/public-types/schema.public-types.d.ts +88 -0
- package/dist/internal-common/src/public-types/secret.public-types.d.ts +82 -0
- package/dist/internal-common/src/public-types/socket.public-types.d.ts +4 -0
- package/dist/internal-common/src/public-types/source-code.public-types.d.ts +208 -0
- package/dist/internal-common/src/public-types/typescript.public-types.d.ts +20 -0
- package/dist/internal-common/src/public-types-backend/ai-agent.public-context.d.ts +101 -0
- package/dist/internal-common/src/public-types-backend/api-call.public-context.d.ts +30 -0
- package/dist/internal-common/src/public-types-backend/application.public-types.d.ts +94 -0
- package/dist/internal-common/src/public-types-backend/bundle-api.public-types.d.ts +199 -0
- package/dist/internal-common/src/public-types-backend/bundle-data.public-types.d.ts +18 -0
- package/dist/internal-common/src/public-types-backend/distributed-lock.public-context.d.ts +4 -0
- package/dist/internal-common/src/public-types-backend/graphql.public-context.d.ts +7 -0
- package/dist/internal-common/src/public-types-backend/langgraph.public-context.d.ts +16 -0
- package/dist/internal-common/src/public-types-backend/mcp.public-types.d.ts +55 -0
- package/dist/internal-common/src/public-types-backend/metric.public-context.d.ts +12 -0
- package/dist/internal-common/src/public-types-backend/mutation.public-context.d.ts +161 -0
- package/dist/internal-common/src/public-types-backend/native-query.public-context.d.ts +75 -0
- package/dist/internal-common/src/public-types-backend/query.public-context.d.ts +193 -0
- package/dist/internal-common/src/public-types-backend/storage.public-types.d.ts +15 -0
- package/dist/internal-common/src/public-types-backend/topic.public-context.d.ts +17 -0
- package/dist/internal-common/src/types/application.types.d.ts +98 -0
- package/dist/internal-common/src/types/backend-run.types.d.ts +55 -0
- package/dist/internal-common/src/types/bundle-data.types.d.ts +18 -0
- package/dist/internal-common/src/types/connector.types.d.ts +77 -0
- package/dist/internal-common/src/types/integrations/ai.types.d.ts +1 -0
- package/dist/internal-common/src/types/integrations/api.types.d.ts +76 -0
- package/dist/internal-common/src/types/integrations/auth.types.d.ts +1 -0
- package/dist/internal-common/src/types/integrations/database.types.d.ts +44 -0
- package/dist/internal-common/src/types/integrations/observability.types.d.ts +1 -0
- package/dist/internal-common/src/types/integrations/queue-types.d.ts +1 -0
- package/dist/internal-common/src/types/integrations/schemas.d.ts +6 -0
- package/dist/internal-common/src/types/integrations/storage-types.d.ts +22 -0
- package/dist/internal-common/src/types/langgraph.types.d.ts +1 -0
- package/dist/internal-common/src/types/openapi.types.d.ts +1 -0
- package/dist/internal-common/src/types/query.types.d.ts +21 -0
- package/dist/internal-common/src/types/secret.types.d.ts +7 -0
- package/dist/internal-common/src/types/time-units.d.ts +1 -0
- package/dist/internal-common/src/utils/object.d.ts +88 -0
- package/dist/internal-common/src/utils/serialization.d.ts +30 -0
- package/dist/internal-common/src/utils/worker-manager-utils.d.ts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import { UserAiChatModelName } from './backend.public-types';
|
|
2
|
+
/**
|
|
3
|
+
* @category AI
|
|
4
|
+
*/
|
|
5
|
+
export declare const RERANK_PROVIDERS: readonly ["cohere", "voyage", "none"];
|
|
6
|
+
/**
|
|
7
|
+
* @category AI
|
|
8
|
+
*/
|
|
9
|
+
export type AiRerankProvider = (typeof RERANK_PROVIDERS)[number];
|
|
10
|
+
/** List of available AI provider types. See AiProviderType. */
|
|
11
|
+
export declare const AI_PROVIDER_TYPES: readonly ["anthropic", "bedrock", "claude-code", "codex", "cohere", "flux", "gemini", "openai", "openai-compatible", "grok", "stability", "voyage", "mistral", "textract", "azure_document_intelligence", "vertex", "external"];
|
|
12
|
+
/**
|
|
13
|
+
* Type of the AI provider.
|
|
14
|
+
* References a single AI service, regardless of the model or other AI function it provides (like
|
|
15
|
+
* chat/search/transcribe etc...).
|
|
16
|
+
*/
|
|
17
|
+
export type AiProviderType = (typeof AI_PROVIDER_TYPES)[number];
|
|
18
|
+
/**
|
|
19
|
+
* Canonical reasoning-effort levels, ordered from least to most effort.
|
|
20
|
+
* @category AI
|
|
21
|
+
*/
|
|
22
|
+
export type CanonicalReasoningEffort = 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ultra';
|
|
23
|
+
/**
|
|
24
|
+
* The AI providers that support file upload operations, and so are the only ones that resolve a
|
|
25
|
+
* pre-uploaded file id. Declared as the list, with the type derived from it, so the two cannot drift:
|
|
26
|
+
* a provider added to one is added to both.
|
|
27
|
+
*/
|
|
28
|
+
export declare const AI_FILE_PROVIDER_TYPES: readonly ["openai", "gemini", "anthropic", "grok"];
|
|
29
|
+
/**
|
|
30
|
+
* Type of AI provider that supports file upload operations.
|
|
31
|
+
* Only a subset of AI providers support file management features.
|
|
32
|
+
*/
|
|
33
|
+
export type AiFileProviderType = (typeof AI_FILE_PROVIDER_TYPES)[number];
|
|
34
|
+
/**
|
|
35
|
+
* True when the provider resolves pre-uploaded file ids. Every other provider — the integration-backed
|
|
36
|
+
* and user-defined ones, which report no vendor identity of their own — ignores `fileIds` outright, so
|
|
37
|
+
* for them the ids are inert rather than wrong.
|
|
38
|
+
*/
|
|
39
|
+
export declare function isFileCapableProviderType(type: AiProviderType): type is AiFileProviderType;
|
|
40
|
+
/**
|
|
41
|
+
* The AI providers whose chat provider implements the code interpreter. Declared like
|
|
42
|
+
* {@link AI_FILE_PROVIDER_TYPES}, so a provider that gains the interpreter is added here and nowhere else.
|
|
43
|
+
*/
|
|
44
|
+
export declare const AI_CODE_INTERPRETER_PROVIDER_TYPES: readonly ["openai", "anthropic", "gemini"];
|
|
45
|
+
/**
|
|
46
|
+
* Public OpenAI chat model names (active models only).
|
|
47
|
+
* @category AI
|
|
48
|
+
*/
|
|
49
|
+
export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-astra", "gpt-6-luna", "gpt-6.1-sol"];
|
|
50
|
+
/**
|
|
51
|
+
* Public Gemini chat model names (active models only).
|
|
52
|
+
* @category AI
|
|
53
|
+
*/
|
|
54
|
+
export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-3.1-pro", "gemini-3.8-flash", "gemini-3.5-flash-lite"];
|
|
55
|
+
/**
|
|
56
|
+
* Public Grok chat model names (active models only).
|
|
57
|
+
* @category AI
|
|
58
|
+
*/
|
|
59
|
+
export declare const GROK_CHAT_MODEL_NAMES: readonly ["grok-4.6", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
|
|
60
|
+
/**
|
|
61
|
+
* Public Anthropic chat model names (active models only).
|
|
62
|
+
* @category AI
|
|
63
|
+
*/
|
|
64
|
+
export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-fable-5", "claude-fable-5-1", "claude-haiku-4-5-20251001", "claude-opus-5-5", "claude-sonnet-5"];
|
|
65
|
+
/**
|
|
66
|
+
* The supported AI model names.
|
|
67
|
+
* @category AI
|
|
68
|
+
*/
|
|
69
|
+
export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-astra", "gpt-6-luna", "gpt-6.1-sol", "claude-fable-5", "claude-fable-5-1", "claude-haiku-4-5-20251001", "claude-opus-5-5", "claude-sonnet-5", "gemini-3.1-pro", "gemini-3.8-flash", "gemini-3.5-flash-lite", "grok-4.6", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
|
|
70
|
+
/** Checks if the given model name is a global AI chat model name. */
|
|
71
|
+
export declare function isVendorAiChatModelName(modelName: unknown): modelName is VendorAiChatModelName;
|
|
72
|
+
/**
|
|
73
|
+
* @category AI
|
|
74
|
+
*/
|
|
75
|
+
export declare const OPENAI_EMBEDDINGS_MODEL_NAMES: readonly ["text-embedding-3-small"];
|
|
76
|
+
/**
|
|
77
|
+
* @category AI
|
|
78
|
+
*/
|
|
79
|
+
export declare const VOYAGE_EMBEDDING_MODEL_NAMES: readonly ["voyage-3-large", "voyage-4-large", "voyage-4"];
|
|
80
|
+
/**
|
|
81
|
+
* @category AI
|
|
82
|
+
*/
|
|
83
|
+
export declare const BEDROCK_EMBEDDING_MODEL_NAMES: readonly ["titan-embed-text-v2"];
|
|
84
|
+
/**
|
|
85
|
+
* @category AI
|
|
86
|
+
*/
|
|
87
|
+
export declare const AI_EMBEDDINGS_MODEL_NAMES: readonly ["text-embedding-3-small", "voyage-3-large", "voyage-4-large", "voyage-4", "titan-embed-text-v2"];
|
|
88
|
+
/**
|
|
89
|
+
* Checks if the given model name is a valid AI embeddings model name.
|
|
90
|
+
* @category AI
|
|
91
|
+
*/
|
|
92
|
+
export declare function isAiEmbeddingsModelName(modelName: unknown): modelName is AiEmbeddingsModelName;
|
|
93
|
+
/**
|
|
94
|
+
* Represents an embedding model provided by an OpenAI-compatible integration.
|
|
95
|
+
* Unlike chat's `IntegrationModelSpec`, this includes `dimensions` because the same
|
|
96
|
+
* embedding model can be configured with different output dimensions.
|
|
97
|
+
* @category AI
|
|
98
|
+
*/
|
|
99
|
+
export interface IntegrationEmbeddingModelSpec {
|
|
100
|
+
/** The ID of the integration providing the embedding model. */
|
|
101
|
+
integrationId: string;
|
|
102
|
+
/** The model name as recognized by the provider. */
|
|
103
|
+
model: string;
|
|
104
|
+
/** The number of dimensions in the embedding vector output. */
|
|
105
|
+
dimensions: number;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Type guard for `IntegrationEmbeddingModelSpec`.
|
|
109
|
+
* @category AI
|
|
110
|
+
*/
|
|
111
|
+
export declare function isIntegrationEmbeddingModelSpec(model: unknown): model is IntegrationEmbeddingModelSpec;
|
|
112
|
+
/**
|
|
113
|
+
* Type for specifying which embedding model to use.
|
|
114
|
+
* Can be either a vendor model name (string) or an integration-based embedding model (object).
|
|
115
|
+
* @category AI
|
|
116
|
+
*/
|
|
117
|
+
export type AiEmbeddingsModelSelection = AiEmbeddingsModelName | IntegrationEmbeddingModelSpec;
|
|
118
|
+
/**
|
|
119
|
+
* The supported AI image generation model names.
|
|
120
|
+
* @category AI
|
|
121
|
+
*/
|
|
122
|
+
export declare const OPENAI_IMAGE_MODEL_NAMES: readonly ["gpt-image-1", "gpt-image-1-mini", "gpt-image-1.5", "gpt-image-2", "gpt-image-2-2026-04-21", "chatgpt-image-latest"];
|
|
123
|
+
/**
|
|
124
|
+
* @category AI
|
|
125
|
+
*/
|
|
126
|
+
export declare const OPENAI_AUDIO_TRANSCRIPTION_MODEL_NAMES: readonly ["whisper-1", "gpt-4o-transcribe", "gpt-4o-mini-transcribe"];
|
|
127
|
+
/**
|
|
128
|
+
* @category AI
|
|
129
|
+
*/
|
|
130
|
+
export declare const OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES: readonly ["tts-1", "tts-1-hd", "gpt-4o-mini-tts"];
|
|
131
|
+
/**
|
|
132
|
+
* @category AI
|
|
133
|
+
*/
|
|
134
|
+
export declare const OPENAI_AUDIO_MODEL_NAMES: readonly ["whisper-1", "gpt-4o-transcribe", "gpt-4o-mini-transcribe", "tts-1", "tts-1-hd", "gpt-4o-mini-tts"];
|
|
135
|
+
/**
|
|
136
|
+
* @category AI
|
|
137
|
+
*/
|
|
138
|
+
export declare const STABLE_DIFFUSION_MODEL_NAMES: readonly ["stable-diffusion-core"];
|
|
139
|
+
/**
|
|
140
|
+
* @category AI
|
|
141
|
+
*/
|
|
142
|
+
export declare const FLUX_MODEL_NAMES: readonly ["flux-pro-1.1", "flux-kontext-pro"];
|
|
143
|
+
/**
|
|
144
|
+
* @category AI
|
|
145
|
+
*/
|
|
146
|
+
export declare const AI_IMAGE_MODEL_NAMES: readonly ["gpt-image-1", "gpt-image-1-mini", "gpt-image-1.5", "gpt-image-2", "gpt-image-2-2026-04-21", "chatgpt-image-latest", "stable-diffusion-core", "flux-pro-1.1", "flux-kontext-pro"];
|
|
147
|
+
/**
|
|
148
|
+
* @category AI
|
|
149
|
+
*/
|
|
150
|
+
export declare const AI_AUDIO_TRANSCRIPTION_MODEL_NAMES: readonly ["whisper-1", "gpt-4o-transcribe", "gpt-4o-mini-transcribe"];
|
|
151
|
+
/**
|
|
152
|
+
* @category AI
|
|
153
|
+
*/
|
|
154
|
+
export declare const AI_AUDIO_CREATE_SPEECH_MODEL_NAMES: readonly ["tts-1", "tts-1-hd", "gpt-4o-mini-tts"];
|
|
155
|
+
/**
|
|
156
|
+
* @category AI
|
|
157
|
+
*/
|
|
158
|
+
export declare const OPEN_AI_CREATE_SPEECH_FORMATS: readonly ["mp3", "opus", "aac", "flac", "wav", "pcm"];
|
|
159
|
+
/**
|
|
160
|
+
* @category AI
|
|
161
|
+
*/
|
|
162
|
+
export type VendorAiChatModelName = (typeof VENDOR_AI_CHAT_MODEL_NAMES)[number];
|
|
163
|
+
/**
|
|
164
|
+
* @category AI
|
|
165
|
+
*/
|
|
166
|
+
export type AiChatModelName = VendorAiChatModelName | UserAiChatModelName;
|
|
167
|
+
/**
|
|
168
|
+
* @category AI
|
|
169
|
+
*/
|
|
170
|
+
export type AiEmbeddingsModelName = (typeof AI_EMBEDDINGS_MODEL_NAMES)[number];
|
|
171
|
+
/**
|
|
172
|
+
* @category AI
|
|
173
|
+
*/
|
|
174
|
+
export type AiVoyageEmbeddingsModelName = (typeof VOYAGE_EMBEDDING_MODEL_NAMES)[number];
|
|
175
|
+
/**
|
|
176
|
+
* @category AI
|
|
177
|
+
*/
|
|
178
|
+
export type OpenAiChatModelName = (typeof OPENAI_CHAT_MODEL_NAMES)[number];
|
|
179
|
+
/**
|
|
180
|
+
* @category AI
|
|
181
|
+
*/
|
|
182
|
+
export type GeminiChatModelName = (typeof GEMINI_CHAT_MODEL_NAMES)[number];
|
|
183
|
+
/**
|
|
184
|
+
* @category AI
|
|
185
|
+
*/
|
|
186
|
+
export type GrokChatModelName = (typeof GROK_CHAT_MODEL_NAMES)[number];
|
|
187
|
+
/**
|
|
188
|
+
* @category AI
|
|
189
|
+
*/
|
|
190
|
+
export type AnthropicChatModelName = (typeof ANTHROPIC_CHAT_MODEL_NAMES)[number];
|
|
191
|
+
/**
|
|
192
|
+
* @category AI
|
|
193
|
+
*/
|
|
194
|
+
export type AiImageModelName = (typeof AI_IMAGE_MODEL_NAMES)[number];
|
|
195
|
+
/**
|
|
196
|
+
* @category AI
|
|
197
|
+
*/
|
|
198
|
+
export type AiAudioTranscriptionModelName = (typeof AI_AUDIO_TRANSCRIPTION_MODEL_NAMES)[number];
|
|
199
|
+
/**
|
|
200
|
+
* @category AI
|
|
201
|
+
*/
|
|
202
|
+
export type AiAudioCreateSpeechModelName = (typeof OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES)[number];
|
|
203
|
+
/**
|
|
204
|
+
* @category AI
|
|
205
|
+
*/
|
|
206
|
+
export type AiAudioModelName = (typeof OPENAI_AUDIO_MODEL_NAMES)[number];
|
|
207
|
+
/**
|
|
208
|
+
* @category AI
|
|
209
|
+
*/
|
|
210
|
+
export type OpenAiImageModelName = (typeof OPENAI_IMAGE_MODEL_NAMES)[number];
|
|
211
|
+
/**
|
|
212
|
+
* @category AI
|
|
213
|
+
*/
|
|
214
|
+
export type OpenAiAudioTranscriptionModelName = (typeof OPENAI_AUDIO_TRANSCRIPTION_MODEL_NAMES)[number];
|
|
215
|
+
/**
|
|
216
|
+
* @category AI
|
|
217
|
+
*/
|
|
218
|
+
export type OpenAiAudioCreateSpeechModelName = (typeof OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES)[number];
|
|
219
|
+
/**
|
|
220
|
+
* @category AI
|
|
221
|
+
*/
|
|
222
|
+
export type OpenAiCreateSpeechFormat = (typeof OPEN_AI_CREATE_SPEECH_FORMATS)[number];
|
|
223
|
+
/**
|
|
224
|
+
* @category AI
|
|
225
|
+
*/
|
|
226
|
+
export type StableDiffusionModelName = (typeof STABLE_DIFFUSION_MODEL_NAMES)[number];
|
|
227
|
+
/**
|
|
228
|
+
* @category AI
|
|
229
|
+
*/
|
|
230
|
+
export type FluxModelName = (typeof FLUX_MODEL_NAMES)[number];
|
|
231
|
+
/**
|
|
232
|
+
* Where a chat model offered to an app comes from. See {@link ModelIdSpec.source}.
|
|
233
|
+
* @category AI
|
|
234
|
+
*/
|
|
235
|
+
export declare const AI_MODEL_SOURCES: readonly ["vendor", "connector", "custom"];
|
|
236
|
+
/**
|
|
237
|
+
* @category AI
|
|
238
|
+
*/
|
|
239
|
+
export type AiModelSource = (typeof AI_MODEL_SOURCES)[number];
|
|
240
|
+
/** Represents an AI model. */
|
|
241
|
+
export interface ModelIdSpec {
|
|
242
|
+
/** The model ID used for API calls. */
|
|
243
|
+
modelId: AiChatModelName;
|
|
244
|
+
/** The provider serving this model when Squid can determine it from the model registry. */
|
|
245
|
+
providerType?: AiProviderType;
|
|
246
|
+
/** Canonical reasoning-effort levels accepted natively by this model. */
|
|
247
|
+
reasoningEfforts?: CanonicalReasoningEffort[];
|
|
248
|
+
/** The integration ID if this model comes from an integration (OpenAI-compatible, Bedrock). Is undefined for Squid-provided models. */
|
|
249
|
+
integrationId?: string;
|
|
250
|
+
/** Human-readable display name for the model (e.g. "GPT-4o"). */
|
|
251
|
+
displayName?: string;
|
|
252
|
+
/** Short human-readable description of the model. Undefined for custom integration models. */
|
|
253
|
+
description?: string;
|
|
254
|
+
/**
|
|
255
|
+
* Set only for deprecated models: the active model that calls to this model are routed to.
|
|
256
|
+
* Undefined for active models.
|
|
257
|
+
*/
|
|
258
|
+
replacedBy?: AiChatModelName;
|
|
259
|
+
/**
|
|
260
|
+
* Where the model comes from. Always set on `listChatModels()` results:
|
|
261
|
+
* - 'vendor': a Squid-provided model from the vendor model registry.
|
|
262
|
+
* - 'connector': provided by an integration configured on the app (OpenAI-compatible, Bedrock, Vertex).
|
|
263
|
+
* - 'custom': a user-added model from the app's bundle (e.g. CLI agent models like Claude Code or Codex).
|
|
264
|
+
*/
|
|
265
|
+
source?: AiModelSource;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* An embedding model a new knowledge base can be created on. `modelId` alone is not an identity: an
|
|
269
|
+
* integration can serve the same model name as a vendor, so `(modelId, integrationId)` is.
|
|
270
|
+
* @category AI
|
|
271
|
+
*/
|
|
272
|
+
export interface EmbeddingModelIdSpec {
|
|
273
|
+
/** The embedding model ID used for API calls. */
|
|
274
|
+
modelId: string;
|
|
275
|
+
/** The integration ID if this model comes from an integration. Undefined for Squid-provided models. */
|
|
276
|
+
integrationId?: string;
|
|
277
|
+
/** The embedding dimensions, present for integration-based models. */
|
|
278
|
+
dimensions?: number;
|
|
279
|
+
/** Human-readable display name for the model. */
|
|
280
|
+
displayName: string;
|
|
281
|
+
/** Where the model comes from: 'vendor' (Squid-provided) or 'connector' (an integration configured on the app). */
|
|
282
|
+
source: AiModelSource;
|
|
283
|
+
/**
|
|
284
|
+
* Set only on a deprecated vendor model, which is listed on request: the model a new knowledge base
|
|
285
|
+
* asking for this one is created on. Undefined for active models.
|
|
286
|
+
*/
|
|
287
|
+
replacedBy?: AiEmbeddingsModelName;
|
|
288
|
+
/** True on exactly one entry of a non-empty list: the model to create on when the caller has no preference. */
|
|
289
|
+
isDefault?: boolean;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* The `embeddingModel` a knowledge base is created with for a listed model.
|
|
293
|
+
* @category AI
|
|
294
|
+
*/
|
|
295
|
+
export declare function embeddingModelSelectionOf(model: EmbeddingModelIdSpec): AiEmbeddingsModelSelection;
|
|
296
|
+
/**
|
|
297
|
+
* Type guard to check if a model selection is integration-based.
|
|
298
|
+
* @category AI
|
|
299
|
+
*/
|
|
300
|
+
export declare function isIntegrationModelSpec(model: unknown): model is {
|
|
301
|
+
integrationId: string;
|
|
302
|
+
model: string;
|
|
303
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { JSONSchema } from 'json-schema-typed';
|
|
2
|
+
import { AiFileUrl } from './ai-agent.public-types';
|
|
3
|
+
import { ServiceFunctionName } from './backend.public-types';
|
|
4
|
+
import { IntegrationType } from './integration.public-types';
|
|
5
|
+
/** Represents the possible data types for an AI function parameter. */
|
|
6
|
+
export type AiFunctionParamType = 'string' | 'number' | 'boolean' | 'date' | 'files' | 'object';
|
|
7
|
+
/** JSON Schema (draft 2020-12) describing the value of an `object` AI function parameter. */
|
|
8
|
+
export type AiFunctionParamSchema = JSONSchema.Interface;
|
|
9
|
+
/**
|
|
10
|
+
* How sticky affinity routing must be for a function that keeps state outside the request.
|
|
11
|
+
* - `pod`: the state is reachable by any worker of the pod (a file on disk, a child process).
|
|
12
|
+
* - `worker`: the state lives in one worker's memory, so the worker itself has to be reused.
|
|
13
|
+
*/
|
|
14
|
+
export declare const FUNCTION_AFFINITY_SCOPES: readonly ["pod", "worker"];
|
|
15
|
+
/** See {@link FUNCTION_AFFINITY_SCOPES}. */
|
|
16
|
+
export type FunctionAffinityScope = (typeof FUNCTION_AFFINITY_SCOPES)[number];
|
|
17
|
+
/** Defines the structure of a parameter for an AI function. */
|
|
18
|
+
export interface AiFunctionParam {
|
|
19
|
+
/** Name of the parameter. */
|
|
20
|
+
name: string;
|
|
21
|
+
/** Description of the parameter's purpose. */
|
|
22
|
+
description: string;
|
|
23
|
+
/** Data type of the parameter. */
|
|
24
|
+
type: AiFunctionParamType;
|
|
25
|
+
/** Indicates if the parameter is mandatory. */
|
|
26
|
+
required: boolean;
|
|
27
|
+
/** List of possible values for the parameter, if applicable. */
|
|
28
|
+
enum?: Array<Omit<AiFunctionParamType, 'date'>>;
|
|
29
|
+
/**
|
|
30
|
+
* The JSON Schema of the value; required when `type` is `'object'` and rejected otherwise. Its root must be
|
|
31
|
+
* `{ type: 'object' }`, and an object that lists `properties` accepts no other property unless it sets
|
|
32
|
+
* `additionalProperties`. Squid validates every call against it, so the function only receives a value that
|
|
33
|
+
* satisfies it.
|
|
34
|
+
*/
|
|
35
|
+
schema?: AiFunctionParamSchema;
|
|
36
|
+
/**
|
|
37
|
+
* Marks this parameter as the affinity key of the function and states how sticky the routing must
|
|
38
|
+
* be: every call carrying the same value is routed to the same tenant pod (and, for `worker`, the
|
|
39
|
+
* same worker) for as long as it is alive. Use it for functions that keep state outside the
|
|
40
|
+
* request. Only one `string` parameter of a function may declare it, and declaring it on a
|
|
41
|
+
* parameter of any other type fails the bundle build.
|
|
42
|
+
*
|
|
43
|
+
* A value of `undefined`, `null` or `''` means no affinity at all — the call is routed normally, to
|
|
44
|
+
* an arbitrary pod. Blank is deliberately not a key: a caller that leaves the parameter empty must
|
|
45
|
+
* get an instance of its own rather than share one with every other caller that also left it empty.
|
|
46
|
+
*
|
|
47
|
+
* The value is a namespace within the application, the function's SERVICE **and the calling job**
|
|
48
|
+
* (falling back to the conversation for callers without one): two agent requests that pick the same
|
|
49
|
+
* value are routed independently, so the value only has to be unique within one request's own
|
|
50
|
+
* calls. That matches where such values come from — a model authoring a session name is told
|
|
51
|
+
* nothing about other requests, and unrelated callers routinely land on the same word. A caller
|
|
52
|
+
* with neither a job nor a conversation gets no affinity at all rather than a namespace shared with
|
|
53
|
+
* every other such caller. Two callers cannot be routed to one instance on purpose by agreeing on a
|
|
54
|
+
* value; a function that needs genuinely shared state needs shared storage, not shared routing.
|
|
55
|
+
*
|
|
56
|
+
* The domain is the service rather than the single function so that companion functions of one
|
|
57
|
+
* service reach each other's state — a release function must land on the worker whose interpreter
|
|
58
|
+
* its key names, or it would no-op against an empty domain of its own and report success.
|
|
59
|
+
*
|
|
60
|
+
* The guarantee is routing, not durability: when the pod or worker goes away, so does whatever it
|
|
61
|
+
* held, and the next call lands on a fresh one. The function has to detect that itself and cope.
|
|
62
|
+
*/
|
|
63
|
+
affinity?: FunctionAffinityScope;
|
|
64
|
+
}
|
|
65
|
+
/** Represents an AI function response that also includes files. */
|
|
66
|
+
export interface AiFunctionResponseWithFiles<ResponseType = unknown> {
|
|
67
|
+
/** Indicates that this is an AI function response with files. */
|
|
68
|
+
__isAiFunctionResponseWithFiles: true;
|
|
69
|
+
/** The response from the AI function. */
|
|
70
|
+
response: ResponseType;
|
|
71
|
+
/** Optional list of files associated with the response. */
|
|
72
|
+
files: Array<AiFileUrl>;
|
|
73
|
+
}
|
|
74
|
+
/** Additional optional readonly metadata for AI function. */
|
|
75
|
+
export interface AiFunctionAttributes {
|
|
76
|
+
/**
|
|
77
|
+
* Type of integration this function is used for.
|
|
78
|
+
* Functions with defined 'integrationType' require 'integrationId' to be passed as part of the function context.
|
|
79
|
+
*/
|
|
80
|
+
integrationType?: Array<IntegrationType>;
|
|
81
|
+
}
|
|
82
|
+
/** Metadata describing an AI function available in the application. */
|
|
83
|
+
export interface AiFunctionMetadata {
|
|
84
|
+
/** The fully qualified name of the function (serviceName:functionName). */
|
|
85
|
+
serviceFunction: ServiceFunctionName;
|
|
86
|
+
/**
|
|
87
|
+
* Description of what the function does. Optional when {@link promptId} is set,
|
|
88
|
+
* in which case the description is resolved server-side from the prompt
|
|
89
|
+
* registry at the point the LLM tool definition is built.
|
|
90
|
+
*/
|
|
91
|
+
description?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Opaque id of a registered prompt that supplies this function's description.
|
|
94
|
+
* Stored verbatim (the public SDK never resolves it — that would ship the
|
|
95
|
+
* internal prompt registry to customers); resolution happens server-side.
|
|
96
|
+
*/
|
|
97
|
+
promptId?: string;
|
|
98
|
+
/** Parameters that the function accepts. */
|
|
99
|
+
params: Array<AiFunctionParam>;
|
|
100
|
+
/** Additional attributes for the function. */
|
|
101
|
+
attributes?: AiFunctionAttributes;
|
|
102
|
+
/** Categories this function belongs to. */
|
|
103
|
+
categories?: string[];
|
|
104
|
+
/** Whether this function is internal and not meant for direct use. */
|
|
105
|
+
internal?: boolean;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Response containing the list of AI functions registered in an application.
|
|
109
|
+
* @category AI
|
|
110
|
+
*/
|
|
111
|
+
export interface ListAiFunctionsResponse {
|
|
112
|
+
/** All AI functions registered for the application. */
|
|
113
|
+
functions: Array<AiFunctionMetadata>;
|
|
114
|
+
}
|