@squidcloud/client 1.0.324 → 1.0.326
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/cjs/index.js +1 -1
- package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +29 -16
- package/dist/internal-common/src/public-types/bundle-data.public-types.d.ts +0 -2
- package/dist/internal-common/src/public-types/communication.public-types.d.ts +1 -0
- package/dist/internal-common/src/public-types/integration.public-types.d.ts +1 -1
- package/dist/internal-common/src/types/ai-agent.types.d.ts +5 -0
- package/dist/internal-common/src/types/observability.types.d.ts +1 -1
- package/dist/typescript-client/src/ai-agent-client.d.ts +3 -3
- package/dist/typescript-client/src/ai-client.d.ts +1 -1
- package/dist/typescript-client/src/index.d.ts +1 -0
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { FunctionName, FunctionNameWithContext } from './bundle-data.public-types';
|
|
2
1
|
import { AiAgentId, IntegrationId } from './communication.public-types';
|
|
3
2
|
import { IntegrationType } from './integration.public-types';
|
|
3
|
+
import { FunctionName, FunctionNameWithContext } from './bundle-data.public-types';
|
|
4
4
|
/** The supported OpenAI models */
|
|
5
|
+
export declare const OPENAI_O1_CHAT_MODEL_NAMES: readonly ["o1", "o1-mini"];
|
|
6
|
+
export declare const OPENAI_REASONING_CHAT_MODEL_NAMES: readonly ["o1", "o1-mini", "o3-mini"];
|
|
5
7
|
export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-4o", "gpt-4o-mini", "o1", "o1-mini", "o3-mini"];
|
|
6
|
-
export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-1.5-pro", "gemini-
|
|
8
|
+
export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-1.5-pro", "gemini-2.0-flash"];
|
|
7
9
|
export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-3-5-haiku-latest", "claude-3-5-sonnet-latest"];
|
|
8
10
|
/** The supported AI model names. */
|
|
9
|
-
export declare const AI_CHAT_MODEL_NAMES: readonly ["gpt-4o", "gpt-4o-mini", "o1", "o1-mini", "o3-mini", "claude-3-5-haiku-latest", "claude-3-5-sonnet-latest", "gemini-1.5-pro", "gemini-
|
|
11
|
+
export declare const AI_CHAT_MODEL_NAMES: readonly ["gpt-4o", "gpt-4o-mini", "o1", "o1-mini", "o3-mini", "claude-3-5-haiku-latest", "claude-3-5-sonnet-latest", "gemini-1.5-pro", "gemini-2.0-flash"];
|
|
10
12
|
export declare const OPENAI_EMBEDDINGS_MODEL_NAMES: readonly ["text-embedding-3-small", "text-embedding-3-large", "text-embedding-ada-002"];
|
|
11
13
|
export declare const AI_EMBEDDINGS_MODEL_NAMES: readonly ["text-embedding-3-small", "text-embedding-3-large", "text-embedding-ada-002"];
|
|
12
14
|
/** The supported AI image generation model names. */
|
|
@@ -23,6 +25,7 @@ export declare const OPEN_AI_CREATE_SPEECH_FORMATS: readonly ["mp3", "opus", "aa
|
|
|
23
25
|
export type AiChatModelName = (typeof AI_CHAT_MODEL_NAMES)[number];
|
|
24
26
|
export type AiEmbeddingsModelName = (typeof AI_EMBEDDINGS_MODEL_NAMES)[number];
|
|
25
27
|
export type OpenAiChatModelName = (typeof OPENAI_CHAT_MODEL_NAMES)[number];
|
|
28
|
+
export type OpenAiReasoningChatModelName = (typeof OPENAI_REASONING_CHAT_MODEL_NAMES)[number];
|
|
26
29
|
export type GeminiChatModelName = (typeof GEMINI_CHAT_MODEL_NAMES)[number];
|
|
27
30
|
export type AnthropicChatModelName = (typeof ANTHROPIC_CHAT_MODEL_NAMES)[number];
|
|
28
31
|
export type AiImageModelName = (typeof AI_IMAGE_MODEL_NAMES)[number];
|
|
@@ -135,8 +138,7 @@ export interface AiChatPromptQuotas {
|
|
|
135
138
|
*/
|
|
136
139
|
maxAiCallStackSize: number;
|
|
137
140
|
}
|
|
138
|
-
|
|
139
|
-
export interface AiAgentChatOptions {
|
|
141
|
+
interface BaseAiAgentChatOptions {
|
|
140
142
|
/** The maximum number of tokens to use when making the request to the AI model. Default to the max tokens the model can accept. */
|
|
141
143
|
maxTokens?: number;
|
|
142
144
|
/** A unique chat ID, if the same chat ID is used again and history is not disabled, it will continue the conversation. */
|
|
@@ -155,16 +157,6 @@ export interface AiAgentChatOptions {
|
|
|
155
157
|
responseFormat?: OpenAiResponseFormat;
|
|
156
158
|
/** Whether to response in a "smooth typing" way, beneficial when the chat result is displayed in a UI. Default to true. */
|
|
157
159
|
smoothTyping?: boolean;
|
|
158
|
-
/** The temperature to use when sampling from the model. Default to 0.5. */
|
|
159
|
-
temperature?: number;
|
|
160
|
-
/** The top P value to use when sampling from the model. Default to 1. */
|
|
161
|
-
topP?: number;
|
|
162
|
-
/** The model to use for this chat. If not provided, the profile model will be used. */
|
|
163
|
-
overrideModel?: AiChatModelName;
|
|
164
|
-
/** File URLs (only images supported at the moment). */
|
|
165
|
-
fileUrls?: Array<AiFileUrl>;
|
|
166
|
-
/** Constrains effort on reasoning for reasoning models. o1 models only. */
|
|
167
|
-
reasoningEffort?: 'low' | 'medium' | 'high';
|
|
168
160
|
/** Global context passed to the agent and all AI functions of the agent. */
|
|
169
161
|
agentContext?: Record<string, unknown>;
|
|
170
162
|
/**
|
|
@@ -188,7 +180,27 @@ export interface AiAgentChatOptions {
|
|
|
188
180
|
quotas?: AiChatPromptQuotas;
|
|
189
181
|
/** Include metadata in the context */
|
|
190
182
|
includeMetadata?: boolean;
|
|
183
|
+
/** The temperature to use when sampling from the model. Default to 0.5. */
|
|
184
|
+
temperature?: number;
|
|
185
|
+
overrideModel?: AiChatModelName;
|
|
186
|
+
}
|
|
187
|
+
export interface GeminiChatOptions extends BaseAiAgentChatOptions {
|
|
188
|
+
overrideModel?: GeminiChatModelName;
|
|
189
|
+
groundingWithWebSearch?: boolean;
|
|
190
|
+
}
|
|
191
|
+
export interface OpenAiReasoningChatOptions extends BaseAiAgentChatOptions {
|
|
192
|
+
overrideModel?: OpenAiReasoningChatModelName;
|
|
193
|
+
reasoningEffort?: 'low' | 'medium' | 'high';
|
|
194
|
+
}
|
|
195
|
+
export interface OpenAiChatOptions extends BaseAiAgentChatOptions {
|
|
196
|
+
overrideModel?: OpenAiChatModelName;
|
|
197
|
+
topP?: number;
|
|
198
|
+
fileUrls?: Array<AiFileUrl>;
|
|
199
|
+
}
|
|
200
|
+
export interface AnthropicChatOptions extends BaseAiAgentChatOptions {
|
|
201
|
+
overrideModel?: AnthropicChatModelName;
|
|
191
202
|
}
|
|
203
|
+
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;
|
|
192
204
|
export interface AiObserveStatusOptions {
|
|
193
205
|
/** A unique chat ID for the conversation. */
|
|
194
206
|
chatId?: string;
|
|
@@ -268,7 +280,7 @@ export interface AiFileContext extends AiContextBase {
|
|
|
268
280
|
}
|
|
269
281
|
/**
|
|
270
282
|
* Provides context to the security rules of an AI Agent for each new user prompt.
|
|
271
|
-
* Refer to the `@
|
|
283
|
+
* Refer to the `@secureAiAgent` annotation for more details.
|
|
272
284
|
*/
|
|
273
285
|
export declare class AiChatContext {
|
|
274
286
|
readonly prompt?: string;
|
|
@@ -316,3 +328,4 @@ export interface AiContextMetadataOrFilter {
|
|
|
316
328
|
}
|
|
317
329
|
export type AiContextMetadataFilter = AiContextMetadataFieldFilter | AiContextMetadataAndFilter | AiContextMetadataOrFilter;
|
|
318
330
|
export type AiContextMetadata = Record<string, AiContextMetadataValue>;
|
|
331
|
+
export {};
|
|
@@ -7,8 +7,6 @@ export type StorageActionType = 'read' | 'write' | 'update' | 'insert' | 'delete
|
|
|
7
7
|
export type TopicActionType = 'read' | 'write' | 'all';
|
|
8
8
|
/** The different type of actions for metrics. */
|
|
9
9
|
export type MetricActionType = 'write' | 'all';
|
|
10
|
-
/** Types of actions that can be performed on an AI chatbot. */
|
|
11
|
-
export type AiActionType = 'chat' | 'mutate' | 'all';
|
|
12
10
|
export type AiFunctionParamType = 'string' | 'number' | 'boolean' | 'date';
|
|
13
11
|
export interface AiFunctionParam {
|
|
14
12
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IntegrationId } from './communication.public-types';
|
|
2
2
|
/** List of all integration types supported by Squid. */
|
|
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", "
|
|
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"];
|
|
4
4
|
export declare const DATA_INTEGRATION_TYPES: readonly ["bigquery", "built_in_db", "clickhouse", "cockroach", "mongo", "mssql", "mysql", "oracledb", "postgres", "sap_hana", "snowflake"];
|
|
5
5
|
export declare const AUTH_INTEGRATION_TYPES: readonly ["auth0", "jwt_rsa", "jwt_hmac", "cognito", "okta", "descope", "firebase_auth"];
|
|
6
6
|
export declare const GRAPHQL_INTEGRATION_TYPES: readonly ["graphql", "linear"];
|
|
@@ -16,6 +16,8 @@ export interface AiChatOptions {
|
|
|
16
16
|
agentId?: AiAgentId;
|
|
17
17
|
/** A unique chat ID for the conversation. */
|
|
18
18
|
chatId?: string;
|
|
19
|
+
/** A unique ID for the currentt trace. */
|
|
20
|
+
traceId?: string;
|
|
19
21
|
/** Global per-agent context passed to all AI functions. Must be a serializable JSON. */
|
|
20
22
|
agentContext?: Record<string, unknown>;
|
|
21
23
|
/** List of AI functions available for the agent. Overrides the stored list.*/
|
|
@@ -26,4 +28,7 @@ export interface AiChatOptions {
|
|
|
26
28
|
connectedIntegrations?: Array<AiConnectedIntegrationMetadata>;
|
|
27
29
|
/** Current budget for nested or recursive AI chat calls per single prompt. */
|
|
28
30
|
quotas?: AiChatPromptQuotas;
|
|
31
|
+
/** Enables grounding with real-time web search to enhance AI responses with up-to-date information.
|
|
32
|
+
* Currently supported only for gemini-2.0-flash. */
|
|
33
|
+
groundingWithWebSearch?: boolean;
|
|
29
34
|
}
|
|
@@ -38,7 +38,7 @@ export interface LogEvent {
|
|
|
38
38
|
source?: string;
|
|
39
39
|
service?: string;
|
|
40
40
|
}
|
|
41
|
-
export declare const AUDIT_LOG_EVENT_NAMES: readonly ["
|
|
41
|
+
export declare const AUDIT_LOG_EVENT_NAMES: readonly ["ai_agent"];
|
|
42
42
|
export type AuditLogEventName = (typeof AUDIT_LOG_EVENT_NAMES)[number];
|
|
43
43
|
export interface AuditLogEvent {
|
|
44
44
|
appId: AppId;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AiAgentChatOptions,
|
|
1
|
+
import { AiAgentChatOptions, AiAgentId, AiAgentMetadata, AiContext, AiObserveStatusOptions, AiSearchOptions, AiSearchResponse, AiStatusMessage, AiTranscribeAndAskResponse, AiTranscribeAndChatResponse, MUTABLE_AI_AGENT_METADATA_FIELDS } from './public-types';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { BlobAndFilename } from './types';
|
|
4
4
|
export interface TranscribeAndChatResponse {
|
|
@@ -126,7 +126,7 @@ export declare class AiAgentReference {
|
|
|
126
126
|
*
|
|
127
127
|
* @param data An object containing options for creating the agent.
|
|
128
128
|
* @param data.modelName - The name of the AI model (`gpt-3.5, `gpt-4`, `claude-3-5-sonnet-latest` or
|
|
129
|
-
* `claude-3-5-haiku-latest`, `gemini-1.5-pro
|
|
129
|
+
* `claude-3-5-haiku-latest`, `gemini-1.5-pro`, `gemini-2.0-flash`).
|
|
130
130
|
* @param data.isPublic - Whether the chat functionality of the agent can be accessed without security rules.
|
|
131
131
|
* @returns A promise that resolves when the agent is successfully created.
|
|
132
132
|
*/
|
|
@@ -137,7 +137,7 @@ export declare class AiAgentReference {
|
|
|
137
137
|
*
|
|
138
138
|
* @param data - An object containing options for updating the agent.
|
|
139
139
|
* @param data.modelName - The name of the OpenAI model (`gpt-3.5`, `gpt-4`, `claude-3-5-sonnet-latest`,
|
|
140
|
-
* `claude-3-5-haiku-latest`, `gemini-1.5-pro`,
|
|
140
|
+
* `claude-3-5-haiku-latest`, `gemini-1.5-pro`, `gemini-2.0-flash`).
|
|
141
141
|
* @param data.isPublic - Whether the chat functionality of the agent can be accessed without security rules.
|
|
142
142
|
* @param file - The file to upload (optional).
|
|
143
143
|
* @returns A promise that resolves when the agent is successfully updated.
|
|
@@ -15,7 +15,7 @@ export declare class AiClient {
|
|
|
15
15
|
private readonly rpcManager;
|
|
16
16
|
private readonly aiAssistantClient;
|
|
17
17
|
private aiAgentClient?;
|
|
18
|
-
agent(agentId
|
|
18
|
+
agent(agentId?: AiAgentId): AiAgentReference;
|
|
19
19
|
/**
|
|
20
20
|
* Retrieves the AI assistant client.
|
|
21
21
|
* @returns An instance of AiAssistantClient.
|
|
@@ -38,6 +38,7 @@ export * from './observability-client';
|
|
|
38
38
|
export * from './secret.client';
|
|
39
39
|
export * from './scheduler-client';
|
|
40
40
|
export * from './integration-client';
|
|
41
|
+
export * from './agent-client';
|
|
41
42
|
export * from './socket.manager';
|
|
42
43
|
export * from './squid-http-client';
|
|
43
44
|
export * from './squid';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.
|
|
1
|
+
export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.326";
|