@squidcloud/client 1.0.386 → 1.0.388
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/esm/index.js +1 -1
- package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +41 -0
- package/dist/internal-common/src/public-types/context.public-types.d.ts +20 -0
- package/dist/typescript-client/src/agent/ai-agent-client-reference.d.ts +4 -2
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -665,6 +665,47 @@ interface BaseContextRequest {
|
|
|
665
665
|
type: AiContextType;
|
|
666
666
|
metadata?: AiContextMetadata;
|
|
667
667
|
}
|
|
668
|
+
/**
|
|
669
|
+
* Status of an individual context item after successfully upserting it.
|
|
670
|
+
* @category AI
|
|
671
|
+
*/
|
|
672
|
+
export interface UpsertContextStatusSuccess {
|
|
673
|
+
/** Whether the context upsert was successful or got an error. */
|
|
674
|
+
status: 'success';
|
|
675
|
+
/** The unique identifier of the context item. */
|
|
676
|
+
contextId: string;
|
|
677
|
+
/** The name of the context item, typically the title or filename. */
|
|
678
|
+
name: string;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Status of an individual context item after it failed to upsert.
|
|
682
|
+
*
|
|
683
|
+
* Contains the error message for why the upsert failed.
|
|
684
|
+
* @category AI
|
|
685
|
+
*/
|
|
686
|
+
export interface UpsertContextStatusError {
|
|
687
|
+
/** Whether the context upsert was successful or got an error. */
|
|
688
|
+
status: 'error';
|
|
689
|
+
/** The unique identifier of the context item. */
|
|
690
|
+
contextId: string;
|
|
691
|
+
/** The name of the context item, typically the title or filename. */
|
|
692
|
+
name: string;
|
|
693
|
+
/** Reason the upsert failed. */
|
|
694
|
+
errorMessage: string;
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Status of an individual context item after attempting to upsert it.
|
|
698
|
+
* @category AI
|
|
699
|
+
*/
|
|
700
|
+
export type UpsertContextStatus = UpsertContextStatusSuccess | UpsertContextStatusError;
|
|
701
|
+
/**
|
|
702
|
+
* Response structure for upserting contexts.
|
|
703
|
+
* @category AI
|
|
704
|
+
*/
|
|
705
|
+
export interface UpsertAgentContextsResponse {
|
|
706
|
+
/** List of the upsert status of each item sent in the request. */
|
|
707
|
+
failures: Array<UpsertContextStatusError>;
|
|
708
|
+
}
|
|
668
709
|
/**
|
|
669
710
|
* Base options for upserting text content into the AI agent's context.
|
|
670
711
|
* @category AI
|
|
@@ -60,4 +60,24 @@ export interface RunContext {
|
|
|
60
60
|
sourceIp?: string;
|
|
61
61
|
/** The headers of the request. Headers are in lower-case. */
|
|
62
62
|
headers?: Record<string, any>;
|
|
63
|
+
/** Additional context for OpenAPI requests */
|
|
64
|
+
openApiContext?: OpenApiContext;
|
|
65
|
+
}
|
|
66
|
+
/** In the case of OpenAPI, the context of the request is provided in a separate object. */
|
|
67
|
+
export interface OpenApiContext {
|
|
68
|
+
/** The OpenAPI request. */
|
|
69
|
+
request: RawRequest;
|
|
70
|
+
}
|
|
71
|
+
/** Represents a raw HTTP request, including method, path, query parameters, body, and headers. */
|
|
72
|
+
export interface RawRequest {
|
|
73
|
+
/** The HTTP method of the request (e.g., GET, POST, PUT, DELETE). */
|
|
74
|
+
method: string;
|
|
75
|
+
/** The path of the request, excluding the domain and query parameters. */
|
|
76
|
+
path: string;
|
|
77
|
+
/** The query parameters of the request, represented as key-value pairs. */
|
|
78
|
+
queryParams?: Record<string, string>;
|
|
79
|
+
/** The body of the request, if applicable. */
|
|
80
|
+
rawBody?: string;
|
|
81
|
+
/** The headers of the request, represented as key-value pairs. */
|
|
82
|
+
headers?: Record<string, string>;
|
|
63
83
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { AgentContextRequest, AiAgent, AiAgentContext, AiChatModelName, AiConnectedAgentMetadata, AiSearchOptions, AiSearchResultChunk, AiStatusMessage, AiTranscribeAndAskResponse, GuardrailsOptions, UpsertAgentRequest } from '../../../internal-common/src/public-types/ai-agent.public-types';
|
|
2
|
+
import { AgentContextRequest, AiAgent, AiAgentContext, AiChatModelName, AiConnectedAgentMetadata, AiSearchOptions, AiSearchResultChunk, AiStatusMessage, AiTranscribeAndAskResponse, GuardrailsOptions, UpsertAgentContextsResponse, UpsertAgentRequest } from '../../../internal-common/src/public-types/ai-agent.public-types';
|
|
3
3
|
import { JobId } from '../../../internal-common/src/public-types/job.public-types';
|
|
4
4
|
import { AiAskOptions, AiAskOptionsWithVoice, AiChatOptionsWithoutVoice, AskWithVoiceResponse, TranscribeAndAskWithVoiceResponse, TranscribeAndChatResponse } from './ai-agent-client.types';
|
|
5
5
|
/**
|
|
@@ -66,8 +66,10 @@ export declare class AiAgentReference {
|
|
|
66
66
|
upsertContext(contextRequest: AgentContextRequest, file?: File): Promise<void>;
|
|
67
67
|
/**
|
|
68
68
|
* Adds or updates multiple agent contexts.
|
|
69
|
+
*
|
|
70
|
+
* @return Response object containing the individual statuses of whether each context was successfully upserted.
|
|
69
71
|
*/
|
|
70
|
-
upsertContexts(contextRequests: Array<AgentContextRequest>, files?: Array<File>): Promise<
|
|
72
|
+
upsertContexts(contextRequests: Array<AgentContextRequest>, files?: Array<File>): Promise<UpsertAgentContextsResponse>;
|
|
71
73
|
/**
|
|
72
74
|
* Sends user feedback to the agent.
|
|
73
75
|
*/
|