@squidcloud/client 1.0.489 → 1.0.491
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 +57 -3
- package/dist/internal-common/src/public-types/ai-common.public-types.d.ts +7 -7
- package/dist/internal-common/src/public-types/ai-knowledge-base.public-types.d.ts +248 -4
- package/dist/internal-common/src/public-types/connector.public-types.d.ts +1 -1
- package/dist/internal-common/src/public-types/extraction.public-types.d.ts +15 -1
- package/dist/internal-common/src/public-types/integration.public-types.d.ts +10 -2
- package/dist/internal-common/src/public-types/source-code.public-types.d.ts +12 -0
- package/dist/typescript-client/src/ai-knowledge-base/ai-knowledge-base-client-reference.d.ts +31 -3
- package/dist/typescript-client/src/integration-client.d.ts +30 -3
- package/dist/typescript-client/src/query-utils.d.ts +14 -2
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,14 @@ export declare const SOURCE_CODE_MAX_SUPPLEMENTAL_INSTRUCTIONS_LENGTH = 20000;
|
|
|
10
10
|
export declare const SOURCE_CODE_ANALYZER_MODELS: readonly ["claude-code", "codex"];
|
|
11
11
|
/** Identifies a CLI provider available for source-code analysis. */
|
|
12
12
|
export type SourceCodeAnalyzerModel = (typeof SOURCE_CODE_ANALYZER_MODELS)[number];
|
|
13
|
+
/** Lists trusted source-cache lifecycle strategies. */
|
|
14
|
+
export declare const SOURCE_CODE_CACHE_STRATEGIES: readonly ["reuse", "recreate"];
|
|
15
|
+
/** Selects how source analysis manages its pod-local trusted cache. */
|
|
16
|
+
export type SourceCodeCacheStrategy = (typeof SOURCE_CODE_CACHE_STRATEGIES)[number];
|
|
17
|
+
/** Lists the repository capabilities available to the configured CLI agent. */
|
|
18
|
+
export declare const SOURCE_CODE_EXECUTION_MODES: readonly ["read-only", "write"];
|
|
19
|
+
/** Selects whether the configured CLI agent may modify and publish repository state. */
|
|
20
|
+
export type SourceCodeExecutionMode = (typeof SOURCE_CODE_EXECUTION_MODES)[number];
|
|
13
21
|
/** Lists supported source-control providers. */
|
|
14
22
|
export declare const SOURCE_CONTROL_PROVIDERS: readonly ["github", "bitbucket"];
|
|
15
23
|
/** Identifies a supported source-control provider. */
|
|
@@ -30,6 +38,10 @@ export interface AiAgentSourceCodeIntegrationOptions {
|
|
|
30
38
|
analyzerReasoningEffort?: CanonicalReasoningEffort;
|
|
31
39
|
/** Provides supplemental code-analysis instructions. */
|
|
32
40
|
analyzerInstructions?: string;
|
|
41
|
+
/** Reuses the pod-local trusted cache by default or recreates it for every analysis. */
|
|
42
|
+
cacheStrategy?: SourceCodeCacheStrategy;
|
|
43
|
+
/** Inspects repositories by default or enables unrestricted repository work. */
|
|
44
|
+
executionMode?: SourceCodeExecutionMode;
|
|
33
45
|
}
|
|
34
46
|
/** Stores the immutable GitHub identity and access metadata for a selected repository. */
|
|
35
47
|
export interface GitHubRepositoryConfiguration {
|
package/dist/typescript-client/src/ai-knowledge-base/ai-knowledge-base-client-reference.d.ts
CHANGED
|
@@ -19,6 +19,14 @@ export interface UpsertContextsOptions {
|
|
|
19
19
|
*/
|
|
20
20
|
onUploaded?: () => void;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Options for retrieving a knowledge base context.
|
|
24
|
+
* @category AI
|
|
25
|
+
*/
|
|
26
|
+
export interface GetContextOptions {
|
|
27
|
+
/** The number of characters after which text is truncated. Optional */
|
|
28
|
+
truncateTextAfter?: number;
|
|
29
|
+
}
|
|
22
30
|
/**
|
|
23
31
|
* A reference to an AI knowledge base.
|
|
24
32
|
*/
|
|
@@ -73,9 +81,11 @@ export declare class AiKnowledgeBaseReference {
|
|
|
73
81
|
*/
|
|
74
82
|
listContextIds(): Promise<Array<AiContextId>>;
|
|
75
83
|
/**
|
|
76
|
-
* Retrieves a specific context by its ID.
|
|
84
|
+
* Retrieves a specific context by its ID. Pass `truncateTextAfter: 0` to omit the context's `text`
|
|
85
|
+
* field from the response when only its metadata (e.g. `contentHash`) is needed — the stored text
|
|
86
|
+
* can be multiple MB, and truncating it avoids sending that payload back in full.
|
|
77
87
|
*/
|
|
78
|
-
getContext(contextId: string): Promise<AiKnowledgeBaseContext | undefined>;
|
|
88
|
+
getContext(contextId: string, options?: GetContextOptions): Promise<AiKnowledgeBaseContext | undefined>;
|
|
79
89
|
/**
|
|
80
90
|
* Deletes a specific context by its ID.
|
|
81
91
|
*/
|
|
@@ -84,6 +94,20 @@ export declare class AiKnowledgeBaseReference {
|
|
|
84
94
|
* Deletes multiple contexts.
|
|
85
95
|
*/
|
|
86
96
|
deleteContexts(contextIds: Array<string>): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Replaces the access scopes that grant read access to a context.
|
|
99
|
+
*
|
|
100
|
+
* Only meaningful on a knowledge base with `accessControl.mode: 'enforced'`: a search then returns a
|
|
101
|
+
* context only when the caller holds at least one of its scopes. Passing an empty array makes the
|
|
102
|
+
* context visible to every caller.
|
|
103
|
+
*
|
|
104
|
+
* The refresh primitive for permissions that changed at the source without the document itself
|
|
105
|
+
* changing. Pass `scopes` on the upsert instead when ingesting, so a restricted context is never
|
|
106
|
+
* briefly readable by everyone.
|
|
107
|
+
*
|
|
108
|
+
* @returns how many of the context's chunks were rewritten.
|
|
109
|
+
*/
|
|
110
|
+
setContextScopes(contextId: string, scopes: Array<string>): Promise<number>;
|
|
87
111
|
/**
|
|
88
112
|
* Adds or updates a single context.
|
|
89
113
|
*/
|
|
@@ -164,12 +188,16 @@ export declare class AiKnowledgeBaseReference {
|
|
|
164
188
|
* spreadsheet rows verbatim, and matches characters rather than meaning. The pattern is always a
|
|
165
189
|
* literal — regex metacharacters in it are escaped — and matching is case-insensitive.
|
|
166
190
|
* `options.metadataFilter` scopes the scan to the contexts it admits before any text is matched.
|
|
191
|
+
* Refused on a knowledge base with `accessControl.mode: 'enforced'` — the raw text carries no access
|
|
192
|
+
* scopes, so the scan cannot be filtered per caller.
|
|
167
193
|
*/
|
|
168
194
|
grep(pattern: string, options?: GrepKnowledgeBaseOptions): Promise<GrepKnowledgeBaseResponse>;
|
|
169
195
|
/**
|
|
170
196
|
* Queries the knowledge base's graph (documents, entities, themes, facets) through the closed op set
|
|
171
197
|
* — overview / resolve / describe / subtree / docsUnder / conceptsOf / neighborhood / pathBetween /
|
|
172
|
-
* globalSummary. Requires `graphRag.enabled` on the knowledge base.
|
|
198
|
+
* globalSummary. Requires `graphRag.enabled` on the knowledge base. Refused on a knowledge base with
|
|
199
|
+
* `accessControl.mode: 'enforced'` — the graph carries no access scopes, so its answers cannot be
|
|
200
|
+
* filtered per caller.
|
|
173
201
|
*/
|
|
174
202
|
queryGraph(request: Omit<QueryKnowledgeBaseGraphRequest, 'knowledgeBaseId'>): Promise<QueryKnowledgeBaseGraphResponse>;
|
|
175
203
|
/**
|
|
@@ -8,19 +8,36 @@ export declare class IntegrationClient {
|
|
|
8
8
|
private readonly rpcManager;
|
|
9
9
|
private readonly iacBaseUrl;
|
|
10
10
|
/**
|
|
11
|
-
* Lists all integrations for the current application.
|
|
11
|
+
* Lists all enabled integrations for the current application.
|
|
12
12
|
*
|
|
13
13
|
* @param type - (Optional) Filter by integration type.
|
|
14
|
+
* @param options - (Optional) Pass `includeDisabled: true` to also list disabled integrations.
|
|
14
15
|
* @returns A promise that resolves with a list of integrations.
|
|
15
16
|
*/
|
|
16
|
-
list<ConfigurationType = Record<string, any>>(type?: IntegrationType): Promise<Array<IntegrationInfo<ConfigurationType>>>;
|
|
17
|
+
list<ConfigurationType = Record<string, any>>(type?: IntegrationType, options?: ListIntegrationsOptions): Promise<Array<IntegrationInfo<ConfigurationType>>>;
|
|
17
18
|
/**
|
|
18
|
-
* Retrieves the integration by its ID.
|
|
19
|
+
* Retrieves the integration by its ID. Disabled integrations are returned too - check the
|
|
20
|
+
* `enabled` field of the result (`false` means disabled).
|
|
19
21
|
*
|
|
20
22
|
* @param integrationId - The ID of the integration to retrieve.
|
|
21
23
|
* @returns A promise that resolves with the integration info, or `undefined` if not found.
|
|
22
24
|
*/
|
|
23
25
|
get<ConfigurationType = Record<string, any>>(integrationId: IntegrationId): Promise<IntegrationInfo<ConfigurationType> | undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* Enables a disabled integration. The integration becomes available again for runtime access and sync jobs.
|
|
28
|
+
*
|
|
29
|
+
* @param integrationId - The ID of the integration to enable.
|
|
30
|
+
* @returns A promise that resolves when the integration has been enabled.
|
|
31
|
+
*/
|
|
32
|
+
enable(integrationId: IntegrationId): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Disables an integration. Runtime access is rejected and sync jobs skip it until it is enabled again.
|
|
35
|
+
*
|
|
36
|
+
* @param integrationId - The ID of the integration to disable.
|
|
37
|
+
* @returns A promise that resolves when the integration has been disabled.
|
|
38
|
+
*/
|
|
39
|
+
disable(integrationId: IntegrationId): Promise<void>;
|
|
40
|
+
private setEnabled;
|
|
24
41
|
/**
|
|
25
42
|
* Retrieves the integration's schema by its ID.
|
|
26
43
|
*
|
|
@@ -142,6 +159,16 @@ export declare class IntegrationClient {
|
|
|
142
159
|
*/
|
|
143
160
|
discoverOpenApiSchemaFromFile<SchemaType = Record<string, any>>(integrationId: IntegrationId): Promise<DiscoverOpenApiSchemaResponse<SchemaType>>;
|
|
144
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Options for listing integrations.
|
|
164
|
+
* @category Platform
|
|
165
|
+
*/
|
|
166
|
+
export interface ListIntegrationsOptions {
|
|
167
|
+
/**
|
|
168
|
+
* When true, disabled integrations are included in the result. By default only enabled integrations are returned.
|
|
169
|
+
*/
|
|
170
|
+
includeDisabled?: boolean;
|
|
171
|
+
}
|
|
145
172
|
/**
|
|
146
173
|
* Request for generating AI descriptions for a data schema.
|
|
147
174
|
* @category Platform
|
|
@@ -10,12 +10,24 @@ export interface VisitQueryResultsStats {
|
|
|
10
10
|
/** Time in millis spent in the function. */
|
|
11
11
|
time: number;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Progress of a paginated read, reported once per loaded page.
|
|
15
|
+
* @category Database
|
|
16
|
+
*/
|
|
17
|
+
export interface PageProgress {
|
|
18
|
+
/** Zero-based index of the page just loaded. */
|
|
19
|
+
pageIndex: number;
|
|
20
|
+
/** Number of documents on that page, which the last page makes smaller than the requested size. */
|
|
21
|
+
documentCount: number;
|
|
22
|
+
/** Number of documents loaded so far, this page included. */
|
|
23
|
+
totalLoaded: number;
|
|
24
|
+
}
|
|
13
25
|
/**
|
|
14
26
|
* Reads all objects from the query in a safe way (with pagination) and calls callback() on every object.
|
|
15
27
|
* The iteration is interrupted if error is thrown.
|
|
16
28
|
* @category Database
|
|
17
29
|
*/
|
|
18
|
-
export declare function visitQueryResults<T extends DocumentData>(query: QueryBuilder<T>, callback: (t: T) => Promise<unknown>, pageSize?: number): Promise<VisitQueryResultsStats>;
|
|
30
|
+
export declare function visitQueryResults<T extends DocumentData>(query: QueryBuilder<T>, callback: (t: T) => Promise<unknown>, pageSize?: number, onPageLoaded?: (progress: PageProgress) => void): Promise<VisitQueryResultsStats>;
|
|
19
31
|
/**
|
|
20
32
|
* Paginates through the query and returns the docIds of all matching documents in a form
|
|
21
33
|
* that can be passed back to `collection.doc(id)` to retrieve the same documents. Does
|
|
@@ -38,4 +50,4 @@ export declare function visitQueryResults<T extends DocumentData>(query: QueryBu
|
|
|
38
50
|
*
|
|
39
51
|
* @category Database
|
|
40
52
|
*/
|
|
41
|
-
export declare function loadQueryResultDocIds<T extends DocumentData>(query: QueryBuilder<T>, pageSize?: number): Promise<Array<DocIdOrDocIdObj>>;
|
|
53
|
+
export declare function loadQueryResultDocIds<T extends DocumentData>(query: QueryBuilder<T>, pageSize?: number, onPageLoaded?: (progress: PageProgress) => void): Promise<Array<DocIdOrDocIdObj>>;
|