@squidcloud/client 1.0.502 → 1.0.504

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/esm/index.js +1 -1
  3. package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +28 -2
  4. package/dist/internal-common/src/public-types/ai-common.public-types.d.ts +3 -3
  5. package/dist/internal-common/src/public-types/ai-knowledge-base.public-types.d.ts +30 -8
  6. package/dist/internal-common/src/public-types/ai-query.public-types.d.ts +5 -0
  7. package/dist/internal-common/src/public-types/ai-voice.public-types.d.ts +16 -0
  8. package/dist/internal-common/src/public-types/context.public-types.d.ts +2 -0
  9. package/dist/internal-common/src/public-types/extraction.public-types.d.ts +1 -1
  10. package/dist/internal-common/src/public-types/integration.public-types.d.ts +1 -1
  11. package/dist/internal-common/src/public-types/langgraph.public-types.d.ts +86 -0
  12. package/dist/internal-common/src/public-types/session.public-types.d.ts +82 -0
  13. package/dist/typescript-client/src/agent/ai-agent-client.types.d.ts +4 -4
  14. package/dist/typescript-client/src/ai-knowledge-base/ai-knowledge-base-client-reference.d.ts +1 -1
  15. package/dist/typescript-client/src/index.d.ts +1 -0
  16. package/dist/typescript-client/src/langgraph-client.d.ts +23 -1
  17. package/dist/typescript-client/src/public-types.d.ts +1 -0
  18. package/dist/typescript-client/src/session-client.d.ts +21 -0
  19. package/dist/typescript-client/src/squid.d.ts +12 -0
  20. package/dist/typescript-client/src/version.d.ts +1 -1
  21. package/package.json +1 -1
  22. package/dist/internal-common/src/ai/system-openai-compatible.d.ts +0 -35
  23. package/dist/internal-common/src/metric-name.d.ts +0 -5
  24. package/dist/internal-common/src/public-types-backend/api-call.public-context.d.ts +0 -30
  25. package/dist/internal-common/src/public-types-backend/mutation.public-context.d.ts +0 -161
  26. package/dist/internal-common/src/public-types-backend/native-query.public-context.d.ts +0 -75
  27. package/dist/internal-common/src/public-types-backend/query.public-context.d.ts +0 -193
  28. package/dist/internal-common/src/types/ai-agent.types.d.ts +0 -304
  29. package/dist/internal-common/src/types/ai-knowledge-base.types.d.ts +0 -798
  30. package/dist/internal-common/src/types/ai-matchmaking.types.d.ts +0 -19
  31. package/dist/internal-common/src/types/backend-function.types.d.ts +0 -1
  32. package/dist/internal-common/src/types/communication.types.d.ts +0 -1
  33. package/dist/internal-common/src/types/document.types.d.ts +0 -1
  34. package/dist/internal-common/src/types/file.types.d.ts +0 -6
  35. package/dist/internal-common/src/types/headers.types.d.ts +0 -45
  36. package/dist/internal-common/src/types/management-api-key.types.d.ts +0 -92
  37. package/dist/internal-common/src/types/mutation.types.d.ts +0 -1
  38. package/dist/internal-common/src/types/notification.types.d.ts +0 -19
  39. package/dist/internal-common/src/types/observability.types.d.ts +0 -296
  40. package/dist/internal-common/src/types/query.types.d.ts +0 -21
  41. package/dist/internal-common/src/types/secret.types.d.ts +0 -7
  42. package/dist/internal-common/src/types/socket.types.d.ts +0 -1
  43. package/dist/internal-common/src/types/stage.d.ts +0 -9
  44. package/dist/internal-common/src/types/time-units.d.ts +0 -1
  45. package/dist/internal-common/src/types/url-shortener.types.d.ts +0 -45
  46. package/dist/internal-common/src/utils/array.d.ts +0 -7
  47. package/dist/internal-common/src/utils/connector-path-status.d.ts +0 -27
  48. package/dist/internal-common/src/utils/e2e-test-utils.d.ts +0 -2
  49. package/dist/internal-common/src/utils/file-utils.d.ts +0 -2
  50. package/dist/internal-common/src/utils/global.utils.d.ts +0 -1
  51. package/dist/internal-common/src/utils/http-utils.d.ts +0 -15
  52. package/dist/internal-common/src/utils/http.d.ts +0 -4
  53. package/dist/internal-common/src/utils/integration-access-tokens.d.ts +0 -15
  54. package/dist/internal-common/src/utils/lock.manager.d.ts +0 -14
  55. package/dist/internal-common/src/utils/metric-utils.d.ts +0 -4
  56. package/dist/internal-common/src/utils/metrics.types.d.ts +0 -7
  57. package/dist/internal-common/src/utils/object.d.ts +0 -93
  58. package/dist/internal-common/src/utils/serialization.d.ts +0 -30
  59. package/dist/internal-common/src/utils/squid.constants.d.ts +0 -3
  60. package/dist/internal-common/src/utils/trace-id-generator.d.ts +0 -1
  61. package/dist/internal-common/src/utils/validation.d.ts +0 -21
  62. package/dist/internal-common/src/websocket.impl.d.ts +0 -26
@@ -1,304 +0,0 @@
1
- import { AgentContextRequest, AiAgent, AiAgentContext, AiAgentMcpServerConfig, AiAnnotation, AiAnswerValidationResult, AiAudioCreateSpeechOptions, AiChatMessage, AiChatOptions, AiChatRequestOptions, AiGenerateImageOptions, AiModelRoutingResult, ApplicationAiSettings, BuildAgentOptions } from '../public-types/ai-agent.public-types';
2
- import { AiProviderType, ModelIdSpec } from '../public-types/ai-common.public-types';
3
- import { AiContextMetadata, AiContextMetadataFilter } from '../public-types/ai-knowledge-base.public-types';
4
- import { AiAgentId, AiKnowledgeBaseId, AppId, ClientRequestId } from '../public-types/communication.public-types';
5
- import { JobId } from '../public-types/job.public-types';
6
- import { SecretKey } from '../public-types/secret.public-types';
7
- /** Specification for an AI model, defining its operational parameters. */
8
- export type AiModelSpec = {
9
- /** Maximum tokens the model can generate in a single response. */
10
- maxOutputTokens: number;
11
- /** Total context window size: input (aka prompt) + output (aka completion) tokens combined. */
12
- contextWindowTokens: number;
13
- };
14
- export interface AiChatRequest {
15
- agentId: AiAgentId;
16
- clientRequestId: ClientRequestId;
17
- prompt?: string;
18
- options?: AiChatRequestOptions;
19
- jobId: JobId;
20
- }
21
- export interface AiAskRequest {
22
- agentId: AiAgentId;
23
- prompt?: string;
24
- options?: AiChatRequestOptions;
25
- jobId: JobId;
26
- }
27
- export interface AiGenerateImageRequest {
28
- prompt: string;
29
- options: AiGenerateImageOptions;
30
- }
31
- export interface AiAskQuestionInternalRequest {
32
- appId: AppId;
33
- prompt: string;
34
- options: AiChatOptions;
35
- /**
36
- * API key resolution mode (see `AiProviderFactory.getChatProviderForModel`). 'system' is
37
- * required to resolve system-internal models (e.g. the 'openai-compatible' registry models)
38
- * and makes the call billable to Squid, not the app. Defaults to 'auto'. The endpoint is
39
- * `@Internal()`, so only internal-key callers can set this.
40
- */
41
- keyType?: 'auto' | 'system';
42
- }
43
- export interface AiAskQuestionInternalResponse {
44
- answer: string;
45
- }
46
- export interface GetSharedAgentsInternalRequest {
47
- organizationId: string;
48
- }
49
- export interface GetSharedAgentsInternalResponse {
50
- sharedAgents: Array<{
51
- agentId: AiAgentId;
52
- appId: AppId;
53
- }>;
54
- }
55
- export interface ClearSharedAgentsForOrgInternalRequest {
56
- organizationId: string;
57
- }
58
- export interface AiContextSizeRequest {
59
- appId: AppId;
60
- agentId: AiAgentId;
61
- }
62
- export interface AiContextSizeResponse {
63
- sizeBytes: number;
64
- }
65
- export interface AiAskResponse {
66
- validation?: AiAnswerValidationResult;
67
- responseString: string;
68
- annotations?: Record<string, AiAnnotation>;
69
- routing?: AiModelRoutingResult;
70
- }
71
- export interface AiAskWithVoiceResponse {
72
- responseString: string;
73
- voiceResponse: AiAudioCreateSpeechResponse;
74
- annotations?: Record<string, AiAnnotation>;
75
- }
76
- export interface AiTranscribeAndAskWithVoiceResponse {
77
- transcribedPrompt: string;
78
- responseString: string;
79
- voiceResponse: AiAudioCreateSpeechResponse;
80
- annotations?: Record<string, AiAnnotation>;
81
- }
82
- export interface AiTranscribeAndChatResponse {
83
- transcribedPrompt: string;
84
- }
85
- export interface AiAudioCreateSpeechResponse {
86
- mimeType: string;
87
- extension: string;
88
- base64File: string;
89
- }
90
- export interface AiAudioCreateSpeechRequest {
91
- input: string;
92
- options: AiAudioCreateSpeechOptions;
93
- }
94
- export interface GetAgentRequest {
95
- agentId: AiAgentId;
96
- }
97
- export interface GetAgentResponse {
98
- agent: AiAgent | undefined;
99
- }
100
- export interface GetAgentContextRequest {
101
- agentId: AiAgentId;
102
- contextId: string;
103
- }
104
- export interface ConnectAgentKnowledgeBaseRequest {
105
- agentId: AiAgentId;
106
- knowledgeBaseId: AiKnowledgeBaseId;
107
- description: string;
108
- }
109
- export interface DisconnectAgentKnowledgeBaseRequest {
110
- agentId: AiAgentId;
111
- knowledgeBaseId: AiKnowledgeBaseId;
112
- }
113
- export interface DeleteAgentRequest {
114
- agentId: AiAgentId;
115
- }
116
- export interface UnshareAgentRequest {
117
- agentId: AiAgentId;
118
- }
119
- export interface SetAgentOptionInPathRequest {
120
- agentId: AiAgentId;
121
- path: string;
122
- value: unknown;
123
- }
124
- export interface AddConnectedIntegrationRequest {
125
- agentId: AiAgentId;
126
- integrationId: string;
127
- integrationType: string;
128
- description: string;
129
- }
130
- export interface AddConnectedAgentRequest {
131
- agentId: AiAgentId;
132
- connectedAgentId: string;
133
- description: string;
134
- }
135
- export interface AddConnectedKnowledgeBaseRequest {
136
- agentId: AiAgentId;
137
- knowledgeBaseId: string;
138
- description: string;
139
- /** Mirrors {@link AiConnectedKnowledgeBaseMetadata.includeMetadata}; forwarded so this atomic API honors it. */
140
- includeMetadata?: boolean;
141
- }
142
- export interface AddFunctionRequest {
143
- agentId: AiAgentId;
144
- functionId: string;
145
- }
146
- export interface RemoveConnectedAgentRequest {
147
- agentId: AiAgentId;
148
- connectedAgentId: string;
149
- }
150
- export interface RemoveConnectedIntegrationRequest {
151
- agentId: AiAgentId;
152
- integrationId: string;
153
- }
154
- export interface RemoveConnectedKnowledgeBaseRequest {
155
- agentId: AiAgentId;
156
- knowledgeBaseId: string;
157
- }
158
- export interface RemoveFunctionRequest {
159
- agentId: AiAgentId;
160
- functionId: string;
161
- }
162
- export interface SetAgentDescriptionRequest {
163
- agentId: AiAgentId;
164
- description: string;
165
- }
166
- export interface SetAgentMcpServerRequest {
167
- agentId: AiAgentId;
168
- mcpServer: AiAgentMcpServerConfig;
169
- }
170
- export interface ListAgentContextsRequest {
171
- agentId: AiAgentId;
172
- }
173
- export interface ListAgentContextsResponse {
174
- contexts: Array<AiAgentContext>;
175
- }
176
- export interface DeleteAgentContextsRequest {
177
- agentId: AiAgentId;
178
- contextIds: Array<string>;
179
- }
180
- export interface UpsertAgentContextsRequest {
181
- agentId: AiAgentId;
182
- contextRequests: Array<AgentContextRequest>;
183
- }
184
- export interface UpsertAgentCustomGuardrailsRequest {
185
- agentId: AiAgentId;
186
- customGuardrail: string;
187
- }
188
- export interface DeleteAgentCustomGuardrailsRequest {
189
- agentId: AiAgentId;
190
- }
191
- export interface ListAgentsResponse {
192
- agents: Array<AiAgent>;
193
- }
194
- export interface GetApplicationAiSettingsResponse {
195
- settings: ApplicationAiSettings;
196
- }
197
- export interface GetApplicationAiSettingsResponse {
198
- settings: ApplicationAiSettings;
199
- }
200
- export interface SetApplicationAiSettingsRequest {
201
- settings: ApplicationAiSettings;
202
- }
203
- export interface SetAiProviderApiKeySecretRequest {
204
- providerType: AiProviderType;
205
- secretKey: SecretKey | undefined;
206
- }
207
- export interface SetAiProviderApiKeySecretResponse {
208
- settings: ApplicationAiSettings;
209
- }
210
- export interface ListChatModelsResponse {
211
- models: ModelIdSpec[];
212
- }
213
- export interface RegenerateAgentApiKeyRequest {
214
- agentId: AiAgentId;
215
- }
216
- export interface GetAgentApiKeyRequest {
217
- agentId: AiAgentId;
218
- }
219
- export declare function validateAiContextMetadata(metadata: AiContextMetadata): void;
220
- export declare function validateAiContextMetadataFilter(filter: AiContextMetadataFilter): void;
221
- export declare const METADATA_SERVICE_FUNCTION_NAME = "default:metadata";
222
- export interface GetChatHistoryRequest {
223
- agentId: AiAgentId;
224
- memoryId: string;
225
- }
226
- export interface GetChatHistoryResponse {
227
- messages: Array<AiChatMessage>;
228
- }
229
- export interface ProvideAgentFeedbackRequest {
230
- agentId: string;
231
- feedback: string;
232
- /** If true, proposed changes are stored for later admin review instead of being applied immediately. */
233
- holdForReview?: boolean;
234
- /** Arbitrary caller-supplied metadata to store alongside the feedback. Limited to 4096 bytes when serialized. */
235
- metadata?: Record<string, unknown>;
236
- }
237
- /** A proposed agent-feedback change, stored instead of applied when `holdForReview` is set. */
238
- export interface AgentFeedbackRecord {
239
- id: string;
240
- agentId: string;
241
- integrationId?: string;
242
- /** Name of the executable or aiFunction that produced this record, e.g. `provideAgentFeedback`. */
243
- action: string;
244
- params: Record<string, unknown>;
245
- rawFeedback: string;
246
- status: 'pending' | 'applied' | 'dismissed';
247
- createdAt: string;
248
- metadata?: Record<string, unknown>;
249
- }
250
- export interface ListAgentFeedbackRequest {
251
- agentId: string;
252
- limit?: number;
253
- /** Cursor from a previous response's `nextCursor`, to fetch the next page. */
254
- cursor?: string;
255
- /** If set, only returns records with this status. */
256
- status?: 'pending' | 'applied' | 'dismissed';
257
- }
258
- export interface ListAgentFeedbackResponse {
259
- records: Array<AgentFeedbackRecord>;
260
- nextCursor?: string;
261
- }
262
- /** Result of trying to apply or dismiss a single held-for-review feedback record. */
263
- export interface AgentFeedbackActionResult {
264
- id: string;
265
- success: boolean;
266
- error?: string;
267
- }
268
- export interface ApplyAgentFeedbackRequest {
269
- agentId: string;
270
- ids: Array<string>;
271
- }
272
- export interface ApplyAgentFeedbackResponse {
273
- results: Array<AgentFeedbackActionResult>;
274
- }
275
- export interface DismissAgentFeedbackRequest {
276
- agentId: string;
277
- ids: Array<string>;
278
- }
279
- export interface DismissAgentFeedbackResponse {
280
- results: Array<AgentFeedbackActionResult>;
281
- }
282
- export interface BuildAgentRequest {
283
- agentId: string;
284
- request: string;
285
- memoryId?: string;
286
- options?: BuildAgentOptions;
287
- }
288
- export interface UploadAiFileRequest {
289
- /** AI provider to upload file to. */
290
- provider: AiProviderType;
291
- /** Optional expiration time in seconds. If provided, file will be registered for automatic cleanup. */
292
- expirationInSeconds?: number;
293
- }
294
- export interface UploadAiFileResponse {
295
- fileId: string;
296
- }
297
- export interface DeleteAiFileRequest {
298
- fileId: string;
299
- /** AI provider that owns the file. */
300
- provider: AiProviderType;
301
- }
302
- export interface DeleteAiFileResponse {
303
- deleted: boolean;
304
- }