@squidcloud/client 1.0.314 → 1.0.316

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.
@@ -1,5 +1,5 @@
1
1
  import { FunctionName, FunctionNameWithContext } from './bundle-data.public-types';
2
- import { IntegrationId } from './communication.public-types';
2
+ import { AiAgentId, IntegrationId } from './communication.public-types';
3
3
  import { AiChatPromptQuotas, AiConnectedAgentMetadata, AiConnectedIntegrationMetadata } from '../types/ai-chatbot.types';
4
4
  /** The supported OpenAI models */
5
5
  export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-4o", "gpt-4o-mini", "o1", "o1-mini", "o3-mini"];
@@ -233,10 +233,12 @@ export interface AiChatbotFileContext extends AiChatbotContextBase {
233
233
  extractImages?: boolean;
234
234
  minImageWidth?: number;
235
235
  minImageHeight?: number;
236
+ fullPageAsImage?: boolean;
237
+ extractionModel?: AiChatModelName;
236
238
  }
237
239
  export declare class AiChatbotChatContext {
238
240
  readonly prompt?: string;
239
- readonly profileId: string;
241
+ readonly profileId: AiAgentId;
240
242
  }
241
243
  export type AiChatbotContext = AiChatbotTextContext | AiChatbotUrlContext | AiChatbotFileContext;
242
244
  export type AiContextMetadataValue = number | string | boolean | undefined;
@@ -1,4 +1,4 @@
1
- import { AiChatbotChatOptions, AiChatbotContext, AiChatbotProfileMetadata, AiObserveStatusOptions, AiProfileId, AiSearchOptions, AiSearchResponse, AiStatusMessage, AiTranscribeAndAskResponse, AiTranscribeAndChatResponse, MUTABLE_AI_CHATBOT_PROFILE_METADATA_FIELDS } from './public-types';
1
+ import { AiAgentId, AiChatbotChatOptions, AiChatbotContext, AiChatbotProfileMetadata, AiObserveStatusOptions, AiSearchOptions, AiSearchResponse, AiStatusMessage, AiTranscribeAndAskResponse, AiTranscribeAndChatResponse, MUTABLE_AI_CHATBOT_PROFILE_METADATA_FIELDS } from './public-types';
2
2
  import { Observable } from 'rxjs';
3
3
  import { BlobAndFilename } from './types';
4
4
  export interface TranscribeAndChatResponse {
@@ -23,7 +23,6 @@ export type AskOptionsWithoutVoice = Omit<AiChatbotChatOptions, 'voiceOptions' |
23
23
  export declare class AiAgentClient {
24
24
  private readonly rpcManager;
25
25
  private readonly socketManager;
26
- private readonly integrationId;
27
26
  private readonly ongoingChatSequences;
28
27
  private readonly statusUpdates;
29
28
  /**
@@ -38,14 +37,14 @@ export declare class AiAgentClient {
38
37
  /**
39
38
  * Sends a prompt to the specified profile id.
40
39
  *
41
- * @param profileId - The profile id.
40
+ * @param agentId - The agent id.
42
41
  * @param prompt - The prompt.
43
42
  * @param options - The options to send to the chat model.
44
43
  * @returns An observable that emits when a new response token is received. The emitted value is the entire response
45
44
  * that has been received so far.
46
45
  */
47
- chat(profileId: string, prompt: string, options?: ChatOptionsWithoutVoice): Observable<string>;
48
- transcribeAndChat(profileId: string, fileToTranscribe: File, options?: ChatOptionsWithoutVoice): Promise<TranscribeAndChatResponse>;
46
+ chat(agentId: AiAgentId, prompt: string, options?: ChatOptionsWithoutVoice): Observable<string>;
47
+ transcribeAndChat(agentId: AiAgentId, fileToTranscribe: File, options?: ChatOptionsWithoutVoice): Promise<TranscribeAndChatResponse>;
49
48
  private chatInternal;
50
49
  search(agentId: string, options: AiSearchOptions): Promise<AiSearchResponse>;
51
50
  /**
@@ -56,12 +55,12 @@ export declare class AiAgentClient {
56
55
  * @param options - The options to send to the chat model.
57
56
  * @returns A promise that resolves when the chat is complete. The resolved value is the entire response.
58
57
  */
59
- ask(agentId: AiProfileId, prompt: string, options?: AskOptionsWithoutVoice): Promise<string>;
60
- observeStatusUpdates(agentId: AiProfileId, options?: AiObserveStatusOptions): Observable<AiStatusMessage>;
61
- transcribeAndAsk(profileId: string, fileToTranscribe: File, options?: AskOptionsWithoutVoice): Promise<AiTranscribeAndAskResponse>;
62
- transcribeAndAskWithVoiceResponse(profileId: string, fileToTranscribe: File, options?: Omit<AiChatbotChatOptions, 'smoothTyping'>): Promise<TranscribeAndAskWithVoiceResponse>;
63
- askWithVoiceResponse(profileId: string, prompt: string, options?: Omit<AiChatbotChatOptions, 'smoothTyping'>): Promise<AskWithVoiceResponse>;
64
- askInternal<T>(profileId: AiProfileId, prompt: string | File, isVoiceResponse: boolean, options?: Omit<AiChatbotChatOptions, 'smoothTyping'>): Promise<T>;
58
+ ask(agentId: AiAgentId, prompt: string, options?: AskOptionsWithoutVoice): Promise<string>;
59
+ observeStatusUpdates(agentId: AiAgentId, options?: AiObserveStatusOptions): Observable<AiStatusMessage>;
60
+ transcribeAndAsk(agentId: AiAgentId, fileToTranscribe: File, options?: AskOptionsWithoutVoice): Promise<AiTranscribeAndAskResponse>;
61
+ transcribeAndAskWithVoiceResponse(agentId: AiAgentId, fileToTranscribe: File, options?: Omit<AiChatbotChatOptions, 'smoothTyping'>): Promise<TranscribeAndAskWithVoiceResponse>;
62
+ askWithVoiceResponse(agentId: AiAgentId, prompt: string, options?: Omit<AiChatbotChatOptions, 'smoothTyping'>): Promise<AskWithVoiceResponse>;
63
+ askInternal<T>(agentId: AiAgentId, prompt: string | File, isVoiceResponse: boolean, options?: Omit<AiChatbotChatOptions, 'smoothTyping'>): Promise<T>;
65
64
  private handleChatResponse;
66
65
  private handleStatusMessage;
67
66
  private createStatusSubject;
@@ -1,6 +1,6 @@
1
- import { AiAgentReference, AiChatbotClient } from './ai-agent-client';
1
+ import { AiAgentReference } from './ai-agent-client';
2
2
  import { AiAssistantClient } from './ai-assistant-client';
3
- import { IntegrationId } from './public-types';
3
+ import { AiAgentId, IntegrationId } from './public-types';
4
4
  import { AiImageClient } from './ai-image-client';
5
5
  import { AiAudioClient } from './ai-audio-client';
6
6
  import { AiMatchMakingClient } from './ai-matchmaking-client';
@@ -11,17 +11,11 @@ import { ExecuteAiApiResponse, ExecuteAiQueryMultiResponse, ExecuteAiQueryOption
11
11
  * through its methods.
12
12
  */
13
13
  export declare class AiClient {
14
- private readonly aiChatbotClientFactory;
14
+ private readonly socketManager;
15
15
  private readonly rpcManager;
16
16
  private readonly aiAssistantClient;
17
- /**
18
- * Retrieves an AI chatbot client for a specific AI integration.
19
- * @param aiIntegrationId - The identifier for the AI integration.
20
- * @returns An instance of AiChatbotClient associated with the given AI integration ID.
21
- * @deprecated Use `agent` method instead.
22
- */
23
- chatbot(aiIntegrationId: IntegrationId): AiChatbotClient;
24
- agent(agentId: string): AiAgentReference;
17
+ private aiAgentClient?;
18
+ agent(agentId: AiAgentId): AiAgentReference;
25
19
  /**
26
20
  * Retrieves the AI assistant client.
27
21
  * @returns An instance of AiAssistantClient.
@@ -21,6 +21,7 @@ export interface ExecuteAiQueryOptions {
21
21
  enableRawResults?: boolean;
22
22
  enableCodeInterpreter?: boolean;
23
23
  overrideModel?: AiChatModelName;
24
+ generateWalkthrough?: boolean;
24
25
  }
25
26
  export interface ExecuteAiQueryResponse {
26
27
  answer: string;
@@ -1,5 +1,4 @@
1
1
  export * from './ai-assistant-client';
2
- export * from './ai-chatbot-client.factory';
3
2
  export * from './ai-agent-client';
4
3
  export * from './ai-image-client';
5
4
  export * from './ai-audio-client';
@@ -4,6 +4,14 @@ interface PsGetAccessTokenResponse {
4
4
  accessToken: string;
5
5
  expirationTime: Date;
6
6
  }
7
+ type PsDocumentType = 'file' | 'folder';
8
+ interface PsIndexedDocument {
9
+ id: string;
10
+ name: string;
11
+ type: PsDocumentType;
12
+ metadata: AiContextMetadata;
13
+ folderDocumentId?: string;
14
+ }
7
15
  /**
8
16
  * Client to handle personal storage integrations such as Google Drive or Microsoft OneDrive.
9
17
  * Provides methods for saving authentication tokens, indexing documents or folders for AI processing,
@@ -39,21 +47,20 @@ export declare class PersonalStorageClient {
39
47
  *
40
48
  * @param documentOrFolderId - The ID of the document or folder to be indexed.
41
49
  * @param identifier - A user-provided identifier (usually a user ID) that will be associated with the document.
42
- * @param aiIntegrationId - The integration ID for the AI processing configuration.
43
- * @param aiProfileId - The profile ID for the AI processing configuration.
50
+ * @param agentId - The agent ID for the AI processing configuration.
44
51
  * @param metadata - Metadata to include with the index
45
52
  * @returns A promise that resolves when the document or folder is successfully indexed.
46
53
  */
47
- indexDocumentOrFolder(documentOrFolderId: string, identifier: string, aiIntegrationId: string, aiProfileId: string, metadata?: AiContextMetadata): Promise<void>;
54
+ indexDocumentOrFolder(documentOrFolderId: string, identifier: string, agentId: string, metadata?: AiContextMetadata): Promise<void>;
55
+ listIndexedDocuments(identifier: string, agentId: string, type?: PsDocumentType): Promise<Array<PsIndexedDocument>>;
48
56
  /**
49
57
  * Unindexes a previously indexed document, removing it from AI processing.
50
58
  *
51
59
  * @param documentId - The ID of the document to be unindexed.
52
60
  * @param identifier - A user-provided identifier (usually a user ID) that was associated with the document.
53
- * @param aiProfileId - The profile ID for the AI processing configuration.
54
- * @param aiIntegrationId - The integration ID for the AI processing configuration.
61
+ * @param agentId - The agent ID for the AI processing configuration.
55
62
  * @returns A promise that resolves when the document is successfully unindexed.
56
63
  */
57
- unindexDocument(documentId: string, identifier: string, aiProfileId: string, aiIntegrationId: string): Promise<void>;
64
+ unindexDocument(documentId: string, identifier: string, agentId: string): Promise<void>;
58
65
  }
59
66
  export {};
@@ -95,7 +95,6 @@ export declare class Squid {
95
95
  private readonly distributedLockManager;
96
96
  private readonly authManager;
97
97
  private readonly clientIdService;
98
- private readonly aiClientFactory;
99
98
  private readonly _connectionDetails;
100
99
  private readonly querySender;
101
100
  private static readonly squidInstancesMap;
@@ -1 +1 @@
1
- export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.314";
1
+ export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.316";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.314",
3
+ "version": "1.0.316",
4
4
  "description": "A typescript implementation of the Squid client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/typescript-client/src/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "build:dev": "webpack --mode=development",
14
14
  "build:prod": "webpack --mode=production",
15
15
  "watch": "webpack --watch",
16
- "lint": "eslint . --ext .ts",
16
+ "lint": "eslint",
17
17
  "build-and-check-public-types": "npm run build && npm run check-public-types",
18
18
  "keep-only-public-types": "del-cli 'dist/internal-common/src/**' '!dist/internal-common/src/public-types' '!dist/internal-common/src/public-utils'",
19
19
  "check-public-types": "tsc -p tsconfig.types.json",