@squidcloud/client 1.0.481 → 1.0.483
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-integrations.public-types.d.ts +7 -0
- package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +32 -0
- package/dist/internal-common/src/public-types/ai-common.public-types.d.ts +4 -4
- package/dist/internal-common/src/public-types/ai-knowledge-base.public-types.d.ts +655 -4
- package/dist/internal-common/src/public-types/ai-matchmaking.public-types.d.ts +4 -3
- package/dist/internal-common/src/public-types/ai-query.public-types.d.ts +6 -0
- 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 +120 -1
- package/dist/internal-common/src/public-types/integration.public-types.d.ts +1 -1
- package/dist/internal-common/src/public-types/langgraph.public-types.d.ts +40 -0
- package/dist/internal-common/src/public-types/metadata-filter.public-types.d.ts +6 -2
- package/dist/internal-common/src/public-types/web.public-types.d.ts +5 -0
- package/dist/typescript-client/src/ai-knowledge-base/ai-knowledge-base-client-reference.d.ts +34 -1
- package/dist/typescript-client/src/index.d.ts +1 -0
- package/dist/typescript-client/src/langgraph-client.d.ts +62 -0
- package/dist/typescript-client/src/public-types.d.ts +1 -0
- package/dist/typescript-client/src/squid.d.ts +6 -0
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/dist/typescript-client/src/web-client.d.ts +12 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AiContextMetadata
|
|
1
|
+
import { AiContextMetadata } from './ai-knowledge-base.public-types';
|
|
2
|
+
import { MetadataFilter } from './metadata-filter.public-types';
|
|
2
3
|
/**
|
|
3
4
|
* Represents a category in the matchmaker.
|
|
4
5
|
* The description is used by the AI to extract features from the content.
|
|
@@ -56,7 +57,7 @@ export interface MmEntityMatch extends MmEntity {
|
|
|
56
57
|
*/
|
|
57
58
|
export interface MmFindMatchesOptions {
|
|
58
59
|
/** Optional metadata filter conditions to narrow down matching entities; defaults to none. */
|
|
59
|
-
metadataFilter?:
|
|
60
|
+
metadataFilter?: MetadataFilter;
|
|
60
61
|
/** The maximum number of matches to return; defaults to 100, with a maximum of 100. */
|
|
61
62
|
limit?: number;
|
|
62
63
|
/** The category ID to match entities against; defaults to the next or first category in the matchmaker. */
|
|
@@ -68,7 +69,7 @@ export interface MmFindMatchesOptions {
|
|
|
68
69
|
*/
|
|
69
70
|
export interface MmListEntitiesOptions {
|
|
70
71
|
/** Optional metadata filter conditions to narrow down listed entities; defaults to none. */
|
|
71
|
-
metadataFilter?:
|
|
72
|
+
metadataFilter?: MetadataFilter;
|
|
72
73
|
/** The maximum number of entities to return; defaults to 100. */
|
|
73
74
|
limit?: number;
|
|
74
75
|
}
|
|
@@ -214,6 +214,12 @@ export interface AiSpreadsheetQueryOptions {
|
|
|
214
214
|
instructions?: string;
|
|
215
215
|
/** Overrides the model used to answer the query. */
|
|
216
216
|
model?: AiChatModelName;
|
|
217
|
+
/**
|
|
218
|
+
* Background gathered by the calling agent (facts from retrieved chunks, chat history, or earlier
|
|
219
|
+
* spreadsheet queries in the same conversation). Injected into the sub-agent's prompt as reference
|
|
220
|
+
* data — not as instructions — so it starts oriented instead of rediscovering the caller's context.
|
|
221
|
+
*/
|
|
222
|
+
context?: string;
|
|
217
223
|
}
|
|
218
224
|
/**
|
|
219
225
|
* Request for executing an AI-powered query over spreadsheet files.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 'CONNECTOR_PACKAGES_TO_EXCLUDE_FROM_AUTO_SYNC' in ConnectorsService (console-backend).
|
|
5
5
|
* @category Platform
|
|
6
6
|
*/
|
|
7
|
-
export declare const CONNECTOR_IDS: readonly ["confluence", "cotomi", "essentials", "freshdesk", "github", "google_calendar", "google_drive", "hubspot", "sharepoint", "jira", "jira_jsm", "linear", "mail", "onedrive", "salesforce", "servicenow_csm", "slack", "teams", "ticketmind_companion", "zendesk"];
|
|
7
|
+
export declare const CONNECTOR_IDS: readonly ["confluence", "cotomi", "essentials", "freshdesk", "github", "google_calendar", "google_drive", "hubspot", "sharepoint", "jira", "jira_jsm", "linear", "mail", "onedrive", "outlook", "salesforce", "servicenow_csm", "slack", "teams", "ticketmind_companion", "zendesk"];
|
|
8
8
|
/**
|
|
9
9
|
* Unique connector package name.
|
|
10
10
|
* @category Platform
|
|
@@ -121,6 +121,116 @@ export interface SpreadsheetSheetInfo {
|
|
|
121
121
|
* Number of columns in the sheet.
|
|
122
122
|
*/
|
|
123
123
|
columnCount: number;
|
|
124
|
+
/**
|
|
125
|
+
* Present and true when the sheet is hidden (or very-hidden) in the workbook. Hidden sheets are
|
|
126
|
+
* extracted like visible ones; the flag lets downstream surfaces say so. Omitted for visible
|
|
127
|
+
* sheets to keep the stored inventory JSON compact.
|
|
128
|
+
*/
|
|
129
|
+
hidden?: boolean;
|
|
130
|
+
/** Cells whose value is computed by a formula. Omitted when zero, keeping the stored JSON compact. */
|
|
131
|
+
formulaCellCount?: number;
|
|
132
|
+
/** Merged ranges declared on the sheet. Omitted when zero. */
|
|
133
|
+
mergedRangeCount?: number;
|
|
134
|
+
/**
|
|
135
|
+
* Sheet-qualified references to this sheet from formulas on OTHER VISIBLE sheets. Omitted when
|
|
136
|
+
* zero. Raw evidence of "a live sheet reads this one", which is why references from hidden sheets
|
|
137
|
+
* are excluded — those are reported through {@link disconnected}, which walks them transitively.
|
|
138
|
+
*/
|
|
139
|
+
inboundRefCount?: number;
|
|
140
|
+
/**
|
|
141
|
+
* Sheet-qualified references from this sheet's formulas to other sheets OF THIS WORKBOOK. Omitted
|
|
142
|
+
* when zero. External references (`[Book.xlsx]Sheet1!A1`) are not counted — except in a legacy
|
|
143
|
+
* .xls, whose formula text does not mark them (see {@link disconnected}), so a reference into
|
|
144
|
+
* another workbook's same-named sheet counts here.
|
|
145
|
+
*/
|
|
146
|
+
outboundRefCount?: number;
|
|
147
|
+
/** Formulas on the sheet containing a `#REF!` error, the signature of deleted precedents. Omitted when zero. */
|
|
148
|
+
refErrorCount?: number;
|
|
149
|
+
/**
|
|
150
|
+
* Present and true when the sheet is hidden AND takes no part in the workbook's live dependency
|
|
151
|
+
* graph: nothing the live model reads leads to it, and it reads no visible sheet itself.
|
|
152
|
+
*
|
|
153
|
+
* Reachability, not adjacency: a hidden sheet read by another hidden sheet that a visible sheet
|
|
154
|
+
* reads is live, and the walk crosses as many hidden hops as the workbook has. It follows the READ
|
|
155
|
+
* direction only. A hidden staging or print sheet that merely reads the live model — downstream of
|
|
156
|
+
* it, not orphaned from it — is spared by that second clause, but sparing it does not spare what
|
|
157
|
+
* feeds IT: were liveness to flow backwards, one legacy tab still pointing at the current dashboard
|
|
158
|
+
* would carry its whole cluster of stale detail sheets back into the live set.
|
|
159
|
+
*
|
|
160
|
+
* Deliberately conservative on two further counts. It is never asserted for visible sheets, which
|
|
161
|
+
* are orphaned by design far more often than not (cover pages, chart tabs, mapping tables). And it
|
|
162
|
+
* remains a heuristic for "legacy", not a proof: `INDIRECT()`, defined-name and VBA/Power Query
|
|
163
|
+
* references are all invisible to a formula scan, so a hidden sheet reached only that way is a
|
|
164
|
+
* false positive. Consumers should present it as the evidence it is, never as a verdict.
|
|
165
|
+
*
|
|
166
|
+
* It is also under-reported in the legacy .xls container, where a parsed external reference keeps
|
|
167
|
+
* only the other workbook's sheet NAME: a link to the model this file was copied from can be
|
|
168
|
+
* credited to that file's own leftover copy of the sheet and spare it the flag. Missing orphans
|
|
169
|
+
* that way, never inventing them, is the direction this signal can afford to be wrong in.
|
|
170
|
+
*/
|
|
171
|
+
disconnected?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Up to a few representative formulas ("C5=SUM(B2:B4)") for the summary preview. NOT persisted in
|
|
174
|
+
* the bounded inventory JSON — preview-time only.
|
|
175
|
+
*/
|
|
176
|
+
formulaSample?: Array<string>;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Workbook-level parts the per-sheet CSV dump cannot express, counted from the container index so
|
|
180
|
+
* the summary can SAY what it cannot show (chart-locked figures, pivot views, staleness of
|
|
181
|
+
* external-workbook cached values). Every field is omitted when zero/false.
|
|
182
|
+
*/
|
|
183
|
+
export interface SpreadsheetWorkbookFeatures {
|
|
184
|
+
/** Charts embedded in the workbook; chart data is not extracted. */
|
|
185
|
+
chartCount?: number;
|
|
186
|
+
/** Pivot tables; their computed views are not extracted. */
|
|
187
|
+
pivotTableCount?: number;
|
|
188
|
+
/** External-link parts (other workbooks, DDE, or OLE); linked cells carry last-cached values that may be stale. */
|
|
189
|
+
externalLinkCount?: number;
|
|
190
|
+
/** Sheets carrying cell comments/notes (not extracted). */
|
|
191
|
+
commentPartCount?: number;
|
|
192
|
+
/** The workbook contains VBA macros. */
|
|
193
|
+
hasVbaMacros?: boolean;
|
|
194
|
+
}
|
|
195
|
+
/** One data series of a chart, with its cached categories and values. */
|
|
196
|
+
export interface SpreadsheetChartSeries {
|
|
197
|
+
/** The series name. */
|
|
198
|
+
name?: string;
|
|
199
|
+
/** The categories (x-axis labels) for the series. */
|
|
200
|
+
categories: Array<string>;
|
|
201
|
+
/** The numeric values for the series. */
|
|
202
|
+
values: Array<number>;
|
|
203
|
+
/**
|
|
204
|
+
* The series' true cached point count, present ONLY when extraction retained fewer points than the
|
|
205
|
+
* series actually declares. Without it, a consumer cannot tell a complete 8-point series apart from
|
|
206
|
+
* the first 8 points of a 12-point one, and would describe a January-December series as ending in
|
|
207
|
+
* August.
|
|
208
|
+
*/
|
|
209
|
+
totalPointCount?: number;
|
|
210
|
+
}
|
|
211
|
+
/** One chart's cached content. Cached values are what the chart last rendered; formulas are not evaluated. */
|
|
212
|
+
export interface SpreadsheetChartInfo {
|
|
213
|
+
/** The chart's title, when it declares one. */
|
|
214
|
+
title?: string;
|
|
215
|
+
/** The worksheet the chart is anchored to, when the relationship graph resolves it. */
|
|
216
|
+
sheetName?: string;
|
|
217
|
+
/** The chart's data series, in declaration order. */
|
|
218
|
+
series: Array<SpreadsheetChartSeries>;
|
|
219
|
+
/**
|
|
220
|
+
* The chart's true series count, present ONLY when extraction retained fewer series than the chart
|
|
221
|
+
* actually declares — so an omitted-series count is computed against what the chart HAS, not against
|
|
222
|
+
* what survived extraction's own cap.
|
|
223
|
+
*/
|
|
224
|
+
totalSeriesCount?: number;
|
|
225
|
+
}
|
|
226
|
+
/** One pivot table's identity and fields. Displayed aggregates are NOT extracted — only what it is built from. */
|
|
227
|
+
export interface SpreadsheetPivotInfo {
|
|
228
|
+
/** The pivot table name. */
|
|
229
|
+
name?: string;
|
|
230
|
+
/** The worksheet the pivot table is anchored to. */
|
|
231
|
+
sheetName?: string;
|
|
232
|
+
/** The field names used in the pivot table. */
|
|
233
|
+
fields: Array<string>;
|
|
124
234
|
}
|
|
125
235
|
/**
|
|
126
236
|
* Structural information about a parseable spreadsheet document.
|
|
@@ -130,6 +240,12 @@ export interface SpreadsheetDocumentInfo {
|
|
|
130
240
|
* The sheets of the spreadsheet, in workbook order.
|
|
131
241
|
*/
|
|
132
242
|
sheets: Array<SpreadsheetSheetInfo>;
|
|
243
|
+
/** Workbook-level parts the CSV dump cannot express (best-effort; absent for CSV/TSV and .xls). */
|
|
244
|
+
features?: SpreadsheetWorkbookFeatures;
|
|
245
|
+
/** Charts with their cached series (best-effort; absent for .xls and when none exist). */
|
|
246
|
+
charts?: Array<SpreadsheetChartInfo>;
|
|
247
|
+
/** Pivot tables with their field names (best-effort; absent for .xls/.xlsb and when none exist). */
|
|
248
|
+
pivots?: Array<SpreadsheetPivotInfo>;
|
|
133
249
|
}
|
|
134
250
|
/**
|
|
135
251
|
* The full result of extracting data from a document, including all pages and any extracted images.
|
|
@@ -247,6 +363,9 @@ export interface DocumentMetadata {
|
|
|
247
363
|
docCreatedAt?: string;
|
|
248
364
|
/** Last-modified timestamp, ISO 8601. */
|
|
249
365
|
docModifiedAt?: string;
|
|
250
|
-
/**
|
|
366
|
+
/**
|
|
367
|
+
* Source document type: `pdf` | `docx` | `doc` | `pptx` | `ppt` | `xlsx` | `xlsm` | `xls` | `xlsb` |
|
|
368
|
+
* `eml` | `msg` | `csv` | `tsv` | `md` | `html` | `txt`.
|
|
369
|
+
*/
|
|
251
370
|
docType?: string;
|
|
252
371
|
}
|
|
@@ -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", "bedrock", "azure_blob", "azure_cosmosdb", "azure_postgresql", "azure_sql", "bigquery", "built_in_azure_blob", "built_in_db", "built_in_gcs", "built_in_queue", "built_in_s3", "cassandra", "clickhouse", "cloudsql", "cockroach", "cognito", "connected_knowledgebases", "confluence", "confluent", "datadog", "db2", "descope", "documentdb", "azure-entra-external-id", "dynamodb", "elasticsearch", "firebase_auth", "firestore", "gcs", "github", "google_calendar", "google_docs", "google_drive", "graphql", "hubspot", "jira", "jira_jsm", "jwt_hmac", "jwt_rsa", "kafka", "keycloak", "linear", "mariadb", "monday", "mongo", "mssql", "databricks", "mysql", "newrelic", "okta", "onedrive", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce", "sap_hana", "sentry", "snowflake", "spanner", "xata", "zendesk", "servicenow_csm", "freshdesk", "mail", "slack", "mcp", "a2a", "legend", "teams", "openai_compatible", "openai_compatible_embedding", "sharepoint", "vertex"];
|
|
3
|
+
export declare const INTEGRATION_TYPES: readonly ["active_directory", "ai_agents", "ai_chatbot", "algolia", "alloydb", "api", "auth0", "bedrock", "azure_blob", "azure_cosmosdb", "azure_postgresql", "azure_sql", "bigquery", "built_in_azure_blob", "built_in_db", "built_in_gcs", "built_in_queue", "built_in_s3", "cassandra", "clickhouse", "cloudsql", "cockroach", "cognito", "connected_knowledgebases", "confluence", "confluent", "datadog", "db2", "descope", "documentdb", "azure-entra-external-id", "dynamodb", "elasticsearch", "firebase_auth", "firestore", "gcs", "github", "google_calendar", "google_docs", "google_drive", "graphql", "hubspot", "jira", "jira_jsm", "jwt_hmac", "jwt_rsa", "kafka", "keycloak", "linear", "mariadb", "monday", "mongo", "mssql", "databricks", "mysql", "newrelic", "okta", "onedrive", "outlook", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce", "sap_hana", "sentry", "snowflake", "spanner", "xata", "zendesk", "servicenow_csm", "freshdesk", "mail", "slack", "mcp", "a2a", "legend", "teams", "openai_compatible", "openai_compatible_embedding", "sharepoint", "vertex"];
|
|
4
4
|
/**
|
|
5
5
|
* @category Database
|
|
6
6
|
*/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for starting a new LangGraph run.
|
|
3
|
+
* @category AI
|
|
4
|
+
*/
|
|
5
|
+
export interface InvokeLangGraphOptions {
|
|
6
|
+
/** If provided, the run executes against this thread. If omitted, a new thread is created. */
|
|
7
|
+
threadId?: string;
|
|
8
|
+
/** Initial state for the run. */
|
|
9
|
+
input?: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Successful result of a LangGraph invocation.
|
|
13
|
+
* @category AI
|
|
14
|
+
*/
|
|
15
|
+
export interface InvokeLangGraphSuccessResult {
|
|
16
|
+
/** Always `true` on success. */
|
|
17
|
+
ok: true;
|
|
18
|
+
/** Thread the run executed against. */
|
|
19
|
+
threadId: string;
|
|
20
|
+
/** `completed` when the graph finished, `interrupted` when awaiting a resume. */
|
|
21
|
+
status: 'completed' | 'interrupted';
|
|
22
|
+
/** Final (or paused) state values. */
|
|
23
|
+
state: Record<string, unknown> | null;
|
|
24
|
+
/** Next nodes to execute. Empty when `status` is `completed`. */
|
|
25
|
+
next: string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Successful result of a getState call.
|
|
29
|
+
* @category AI
|
|
30
|
+
*/
|
|
31
|
+
export interface GetLangGraphStateSuccessResult {
|
|
32
|
+
/** Always `true` on success. */
|
|
33
|
+
ok: true;
|
|
34
|
+
/** Thread the state belongs to. */
|
|
35
|
+
threadId: string;
|
|
36
|
+
/** Current state values. */
|
|
37
|
+
state: Record<string, unknown> | null;
|
|
38
|
+
/** Next nodes to execute. Empty if the graph has completed. */
|
|
39
|
+
next: string[];
|
|
40
|
+
}
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
* `$lte`, `$in`, `$nin`, `$exists`) and boolean combinators (`$and`, `$or`).
|
|
7
7
|
*
|
|
8
8
|
* Originally created for AI knowledge base context filtering, these types are now
|
|
9
|
-
* shared across metrics tag filtering, matchmaking, and other subsystems.
|
|
9
|
+
* shared across metrics tag filtering, matchmaking, and other subsystems. Operators
|
|
10
|
+
* specific to one subsystem (e.g. the knowledge base's `$underPath` for hierarchical
|
|
11
|
+
* path scoping) live with that subsystem, not here.
|
|
10
12
|
*/
|
|
11
13
|
/** Primitive metadata value. */
|
|
12
14
|
export type MetadataValue = number | string | boolean | undefined;
|
|
@@ -57,7 +59,9 @@ export interface MetadataExistsFilter {
|
|
|
57
59
|
/** Whether the field must exist. */
|
|
58
60
|
$exists: boolean;
|
|
59
61
|
}
|
|
60
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* A single-field operator: one of `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$in`, `$nin`, `$exists`.
|
|
64
|
+
*/
|
|
61
65
|
export type MetadataSimpleFilter = MetadataEqFilter | MetadataNeFilter | MetadataGtFilter | MetadataGteFilter | MetadataLtFilter | MetadataLteFilter | MetadataInFilter | MetadataNinFilter | MetadataExistsFilter;
|
|
62
66
|
/**
|
|
63
67
|
* A filter for metadata based on field-specific conditions or direct values.
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
export interface WebAiSearchRequest {
|
|
5
5
|
/** The search query. */
|
|
6
6
|
query: string;
|
|
7
|
+
/**
|
|
8
|
+
* When provided, restricts the web search to these domains (subdomains are included).
|
|
9
|
+
* Cited URLs in the response are guaranteed to belong to one of the listed domains.
|
|
10
|
+
*/
|
|
11
|
+
allowedDomains?: Array<string>;
|
|
7
12
|
}
|
|
8
13
|
/**
|
|
9
14
|
* Represents a cited URL in the search response.
|
package/dist/typescript-client/src/ai-knowledge-base/ai-knowledge-base-client-reference.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AiEmbeddingsModelWithOptionalFields, AiKnowledgeBase, AiKnowledgeBaseChatOptions, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseContextWithReasoning, AiKnowledgeBaseDownloadContextResponse, AiKnowledgeBaseSearchContextsWithContextIdRequest, AiKnowledgeBaseSearchContextsWithPromptRequest, AiKnowledgeBaseSearchResultChunk, GenerateMetadataFieldDescriptionsRequest, GenerateMetadataFieldDescriptionsResponse, ListAiKnowledgeBaseContextsPageResponse, ListKnowledgeBaseContextsOptions, UpsertKnowledgeBaseContextResponse, UpsertKnowledgeBaseContextsResponse } from '../../../internal-common/src/public-types/ai-knowledge-base.public-types';
|
|
1
|
+
import { AiEmbeddingsModelWithOptionalFields, AiKnowledgeBase, AiKnowledgeBaseChatOptions, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseContextWithReasoning, AiKnowledgeBaseDownloadContextResponse, AiKnowledgeBaseSearchContextsWithContextIdRequest, AiKnowledgeBaseSearchContextsWithPromptRequest, AiKnowledgeBaseSearchResponse, AiKnowledgeBaseSearchResultChunk, ExploreKnowledgeBaseGraphRequest, ExploreKnowledgeBaseGraphResponse, GenerateMetadataFieldDescriptionsRequest, GenerateMetadataFieldDescriptionsResponse, GetKnowledgeBaseGraphStatusResponse, ListAiKnowledgeBaseContextsPageResponse, ListKnowledgeBaseContextsOptions, QueryKnowledgeBaseGraphRequest, QueryKnowledgeBaseGraphResponse, RebuildKnowledgeBaseGraphRequest, UpsertKnowledgeBaseContextResponse, UpsertKnowledgeBaseContextsResponse } from '../../../internal-common/src/public-types/ai-knowledge-base.public-types';
|
|
2
2
|
import { AiContextId } from '../../../internal-common/src/public-types/communication.public-types';
|
|
3
3
|
/**
|
|
4
4
|
* Parameters for creating or updating an AI agent.
|
|
@@ -97,6 +97,39 @@ export declare class AiKnowledgeBaseReference {
|
|
|
97
97
|
search(options: AiKnowledgeBaseChatOptions & {
|
|
98
98
|
prompt: string;
|
|
99
99
|
}): Promise<Array<AiKnowledgeBaseSearchResultChunk>>;
|
|
100
|
+
/**
|
|
101
|
+
* Like {@link search}, but returns the full response — including `graphContext` (the traversed
|
|
102
|
+
* subgraph) when the search ran with `searchMode: 'graph'` and `graphOptions.includeGraphContext`.
|
|
103
|
+
* {@link search} predates `graphContext` and keeps returning only the chunks.
|
|
104
|
+
*/
|
|
105
|
+
searchWithGraphContext(options: AiKnowledgeBaseChatOptions & {
|
|
106
|
+
prompt: string;
|
|
107
|
+
}): Promise<AiKnowledgeBaseSearchResponse>;
|
|
108
|
+
/**
|
|
109
|
+
* Queries the knowledge base's graph (documents, entities, themes, facets) through the closed op set
|
|
110
|
+
* — overview / resolve / describe / subtree / docsUnder / conceptsOf / neighborhood / pathBetween /
|
|
111
|
+
* globalSummary. Requires `graphRag.enabled` on the knowledge base.
|
|
112
|
+
*/
|
|
113
|
+
queryGraph(request: Omit<QueryKnowledgeBaseGraphRequest, 'knowledgeBaseId'>): Promise<QueryKnowledgeBaseGraphResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Returns the knowledge base's graph build/readiness status: counts, facets, staleness, the most
|
|
116
|
+
* recent rebuild job, and the graph's LLM token/cost usage (`ingestUsage`, `lastRebuildUsage`).
|
|
117
|
+
*/
|
|
118
|
+
getGraphStatus(): Promise<GetKnowledgeBaseGraphStatusResponse>;
|
|
119
|
+
/**
|
|
120
|
+
* Enqueues a graph rebuild/backfill. The default `'full'` mode re-extracts every context with an
|
|
121
|
+
* LLM and rebuilds the concept layer (topics + facets); `mode: 'structural'` keeps the
|
|
122
|
+
* already-extracted entity graph (extracting only contexts never graph-indexed) and rebuilds just
|
|
123
|
+
* the concept layer — a small fraction of a full rebuild's LLM cost. Requires `graphRag.enabled`.
|
|
124
|
+
* Track progress via {@link getGraphStatus}'s `buildJob`; only one rebuild can run per knowledge
|
|
125
|
+
* base at a time.
|
|
126
|
+
*/
|
|
127
|
+
rebuildGraph(request?: Omit<RebuildKnowledgeBaseGraphRequest, 'knowledgeBaseId'>): Promise<void>;
|
|
128
|
+
/**
|
|
129
|
+
* Returns a bounded slice of the knowledge base's entity graph (highest-degree entities and the
|
|
130
|
+
* relationships among them) for exploration/visualization. Requires `graphRag.enabled`.
|
|
131
|
+
*/
|
|
132
|
+
exploreGraph(request?: Omit<ExploreKnowledgeBaseGraphRequest, 'knowledgeBaseId'>): Promise<ExploreKnowledgeBaseGraphResponse>;
|
|
100
133
|
/**
|
|
101
134
|
* Performs a semantic search in the knowledge base and returns contexts with reasoning.
|
|
102
135
|
* Can be used for matchmaking or similarity search.
|
|
@@ -33,6 +33,7 @@ export * from './extraction-client';
|
|
|
33
33
|
export * from './file-args-transformer';
|
|
34
34
|
export * from './integration-client';
|
|
35
35
|
export * from './job-client';
|
|
36
|
+
export * from './langgraph-client';
|
|
36
37
|
export * from './management-client';
|
|
37
38
|
export * from './mutation/mutation-sender';
|
|
38
39
|
export * from './native-query-manager';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { JobId } from '../../internal-common/src/public-types/job.public-types';
|
|
2
|
+
import { GetLangGraphStateSuccessResult, InvokeLangGraphOptions, InvokeLangGraphSuccessResult } from '../../internal-common/src/public-types/langgraph.public-types';
|
|
3
|
+
/**
|
|
4
|
+
* Reference to a specific LangGraph.
|
|
5
|
+
* @category AI
|
|
6
|
+
*/
|
|
7
|
+
export declare class LangGraphReference {
|
|
8
|
+
private readonly graphId;
|
|
9
|
+
private readonly rpcManager;
|
|
10
|
+
private readonly jobClient;
|
|
11
|
+
/**
|
|
12
|
+
* Starts a new LangGraph run and waits for the result.
|
|
13
|
+
*
|
|
14
|
+
* For very long graphs where you don't want to hold a Promise, use `invokeAsync()` instead.
|
|
15
|
+
*
|
|
16
|
+
* Note: graph execution caps at the tenant IPC timeout (currently 4 minutes).
|
|
17
|
+
*
|
|
18
|
+
* @param options Initial state and optional thread to run against.
|
|
19
|
+
*/
|
|
20
|
+
invoke(options?: InvokeLangGraphOptions): Promise<InvokeLangGraphSuccessResult>;
|
|
21
|
+
/**
|
|
22
|
+
* Starts a new LangGraph run without waiting for the result.
|
|
23
|
+
* Returns a jobId — pass it to `squid.job().awaitJob(jobId)` or `getJob(jobId)` to retrieve the result later.
|
|
24
|
+
*
|
|
25
|
+
* Use this for graphs that may run longer than is comfortable to hold a Promise for.
|
|
26
|
+
*
|
|
27
|
+
* Note: the underlying graph execution still caps at the tenant IPC timeout (currently 4 minutes)
|
|
28
|
+
*
|
|
29
|
+
* @param options Initial state and optional thread to run against.
|
|
30
|
+
*/
|
|
31
|
+
invokeAsync(options?: InvokeLangGraphOptions): Promise<JobId>;
|
|
32
|
+
/**
|
|
33
|
+
* Resumes an interrupted LangGraph thread and waits for the result.
|
|
34
|
+
* The thread must currently be in `interrupted` status.
|
|
35
|
+
*
|
|
36
|
+
* Note: graph execution caps at the tenant IPC timeout (currently 4 minutes).
|
|
37
|
+
*
|
|
38
|
+
* @param threadId The thread to resume.
|
|
39
|
+
* @param resumePayload Value passed to the `interrupt()` call inside the graph.
|
|
40
|
+
*/
|
|
41
|
+
resume(threadId: string, resumePayload: unknown): Promise<InvokeLangGraphSuccessResult>;
|
|
42
|
+
/**
|
|
43
|
+
* Resumes an interrupted LangGraph thread without waiting for the result.
|
|
44
|
+
* Returns a jobId — pass it to `squid.job().awaitJob(jobId)` or `getJob(jobId)` to retrieve the result later.
|
|
45
|
+
*
|
|
46
|
+
* Note: graph execution caps at the tenant IPC timeout (currently 4 minutes)
|
|
47
|
+
*
|
|
48
|
+
* @param threadId The thread to resume.
|
|
49
|
+
* @param resumePayload Value passed to the `interrupt()` call inside the graph.
|
|
50
|
+
*/
|
|
51
|
+
resumeAsync(threadId: string, resumePayload: unknown): Promise<JobId>;
|
|
52
|
+
/** Returns the current state of a LangGraph thread. */
|
|
53
|
+
getState(threadId: string): Promise<GetLangGraphStateSuccessResult>;
|
|
54
|
+
/**
|
|
55
|
+
* Deletes all checkpoints for the given thread on this graph. Idempotent — succeeds on a
|
|
56
|
+
* nonexistent thread. After deletion, `getState(threadId)` returns an empty state and any
|
|
57
|
+
* subsequent `invoke`/`resume` on the same threadId starts fresh with no prior history.
|
|
58
|
+
*
|
|
59
|
+
* @param threadId The thread to delete.
|
|
60
|
+
*/
|
|
61
|
+
deleteThread(threadId: string): Promise<void>;
|
|
62
|
+
}
|
|
@@ -20,6 +20,7 @@ export * from '../../internal-common/src/public-types/extraction.public-types';
|
|
|
20
20
|
export * from '../../internal-common/src/public-types/http-status.public-types';
|
|
21
21
|
export * from '../../internal-common/src/public-types/integration.public-types';
|
|
22
22
|
export * from '../../internal-common/src/public-types/job.public-types';
|
|
23
|
+
export * from '../../internal-common/src/public-types/langgraph.public-types';
|
|
23
24
|
export * from '../../internal-common/src/public-types/metadata-filter.public-types';
|
|
24
25
|
export * from '../../internal-common/src/public-types/metric.public-types';
|
|
25
26
|
export * from '../../internal-common/src/public-types/openapi.public-types';
|
|
@@ -9,6 +9,7 @@ import { ExecuteFunctionOptions } from './execute-function-options';
|
|
|
9
9
|
import { ExternalAuthClient } from './external-auth-client';
|
|
10
10
|
import { ExtractionClient } from './extraction-client';
|
|
11
11
|
import { JobClient } from './job-client';
|
|
12
|
+
import { LangGraphReference } from './langgraph-client';
|
|
12
13
|
import { NotificationClient } from './notification-client';
|
|
13
14
|
import { ObservabilityClient } from './observability-client';
|
|
14
15
|
import { ApiKey, AppId, CollectionName, DocumentData, EnvironmentId, IntegrationId, SquidDeveloperId, SquidRegion } from './public-types';
|
|
@@ -123,6 +124,7 @@ export declare class Squid {
|
|
|
123
124
|
private readonly querySender;
|
|
124
125
|
private readonly aiClient;
|
|
125
126
|
private readonly jobClient;
|
|
127
|
+
private readonly langGraphClient;
|
|
126
128
|
private readonly apiClient;
|
|
127
129
|
private readonly adminClient;
|
|
128
130
|
private readonly webClient;
|
|
@@ -329,6 +331,10 @@ export declare class Squid {
|
|
|
329
331
|
* Returns a set of functionality for interacting with jobs.
|
|
330
332
|
*/
|
|
331
333
|
job(): JobClient;
|
|
334
|
+
/**
|
|
335
|
+
* Returns a reference to a LangGraph by ID.
|
|
336
|
+
*/
|
|
337
|
+
langGraph(graphId: string): LangGraphReference;
|
|
332
338
|
/**
|
|
333
339
|
* Returns a set of functionality for interacting with API integrations.
|
|
334
340
|
*/
|
|
@@ -14,8 +14,13 @@ export declare class WebClient {
|
|
|
14
14
|
/**
|
|
15
15
|
* Search the web using AI. Returns a response containing Markdown text and cited URLs.
|
|
16
16
|
* @param query The keywords or query string to search for.
|
|
17
|
+
* @param abortSignal Optional signal used to abort the underlying request. When the signal aborts, the in-flight
|
|
18
|
+
* HTTP request is cancelled and its promise rejects, allowing callers to bound a single call
|
|
19
|
+
* without leaking the request.
|
|
20
|
+
* @param allowedDomains Optional list of domains the search is restricted to (subdomains included). When provided,
|
|
21
|
+
* every cited URL in the response belongs to one of the listed domains.
|
|
17
22
|
*/
|
|
18
|
-
aiSearch(query: string): Promise<WebAiSearchResponse>;
|
|
23
|
+
aiSearch(query: string, abortSignal?: AbortSignal, allowedDomains?: Array<string>): Promise<WebAiSearchResponse>;
|
|
19
24
|
/**
|
|
20
25
|
* Fetch content from a URL.
|
|
21
26
|
* @param url The URL to fetch content from.
|
|
@@ -55,4 +60,10 @@ export declare class WebClient {
|
|
|
55
60
|
* @param ids The IDs of the shortened URL to delete.
|
|
56
61
|
*/
|
|
57
62
|
deleteShortUrls(ids: string[]): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* POSTs a short URL request to the console `openapi/sqd/<op>` endpoint.
|
|
65
|
+
* With `'json'` the response body is read and returned parsed; with `'ignore'` it is never read.
|
|
66
|
+
* Only use after asserting apiKey is defined.
|
|
67
|
+
*/
|
|
68
|
+
private postShortUrlApi;
|
|
58
69
|
}
|