@squidcloud/client 1.0.496 → 1.0.498

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.
Files changed (53) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/esm/index.js +1 -1
  3. package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +43 -4
  4. package/dist/internal-common/src/public-types/ai-common.public-types.d.ts +8 -3
  5. package/dist/internal-common/src/public-types/ai-function.public-types.d.ts +11 -1
  6. package/dist/internal-common/src/public-types/ai-knowledge-base.public-types.d.ts +193 -19
  7. package/dist/internal-common/src/public-types/langgraph.public-types.d.ts +10 -0
  8. package/dist/typescript-client/src/agent/ai-agent-client-reference.d.ts +4 -4
  9. package/dist/typescript-client/src/agent/ai-agent-client.types.d.ts +11 -3
  10. package/dist/typescript-client/src/ai-knowledge-base/ai-knowledge-base-client-reference.d.ts +18 -4
  11. package/dist/typescript-client/src/langgraph-client.d.ts +7 -13
  12. package/dist/typescript-client/src/version.d.ts +1 -1
  13. package/package.json +1 -1
  14. package/dist/internal-common/src/ai/system-openai-compatible.d.ts +0 -35
  15. package/dist/internal-common/src/metric-name.d.ts +0 -14
  16. package/dist/internal-common/src/public-types-backend/api-call.public-context.d.ts +0 -30
  17. package/dist/internal-common/src/public-types-backend/mutation.public-context.d.ts +0 -161
  18. package/dist/internal-common/src/public-types-backend/native-query.public-context.d.ts +0 -75
  19. package/dist/internal-common/src/public-types-backend/query.public-context.d.ts +0 -193
  20. package/dist/internal-common/src/types/ai-agent.types.d.ts +0 -302
  21. package/dist/internal-common/src/types/ai-knowledge-base.types.d.ts +0 -618
  22. package/dist/internal-common/src/types/ai-matchmaking.types.d.ts +0 -19
  23. package/dist/internal-common/src/types/backend-function.types.d.ts +0 -1
  24. package/dist/internal-common/src/types/communication.types.d.ts +0 -1
  25. package/dist/internal-common/src/types/document.types.d.ts +0 -1
  26. package/dist/internal-common/src/types/file.types.d.ts +0 -6
  27. package/dist/internal-common/src/types/headers.types.d.ts +0 -58
  28. package/dist/internal-common/src/types/management-api-key.types.d.ts +0 -92
  29. package/dist/internal-common/src/types/mutation.types.d.ts +0 -1
  30. package/dist/internal-common/src/types/notification.types.d.ts +0 -19
  31. package/dist/internal-common/src/types/observability.types.d.ts +0 -226
  32. package/dist/internal-common/src/types/query.types.d.ts +0 -15
  33. package/dist/internal-common/src/types/secret.types.d.ts +0 -7
  34. package/dist/internal-common/src/types/socket.types.d.ts +0 -1
  35. package/dist/internal-common/src/types/stage.d.ts +0 -9
  36. package/dist/internal-common/src/types/time-units.d.ts +0 -1
  37. package/dist/internal-common/src/types/url-shortener.types.d.ts +0 -45
  38. package/dist/internal-common/src/utils/array.d.ts +0 -7
  39. package/dist/internal-common/src/utils/e2e-test-utils.d.ts +0 -2
  40. package/dist/internal-common/src/utils/file-utils.d.ts +0 -2
  41. package/dist/internal-common/src/utils/global.utils.d.ts +0 -1
  42. package/dist/internal-common/src/utils/http-utils.d.ts +0 -15
  43. package/dist/internal-common/src/utils/http.d.ts +0 -4
  44. package/dist/internal-common/src/utils/integration-access-tokens.d.ts +0 -15
  45. package/dist/internal-common/src/utils/lock.manager.d.ts +0 -14
  46. package/dist/internal-common/src/utils/metric-utils.d.ts +0 -4
  47. package/dist/internal-common/src/utils/metrics.types.d.ts +0 -7
  48. package/dist/internal-common/src/utils/object.d.ts +0 -86
  49. package/dist/internal-common/src/utils/serialization.d.ts +0 -30
  50. package/dist/internal-common/src/utils/squid.constants.d.ts +0 -6
  51. package/dist/internal-common/src/utils/trace-id-generator.d.ts +0 -1
  52. package/dist/internal-common/src/utils/validation.d.ts +0 -21
  53. package/dist/internal-common/src/websocket.impl.d.ts +0 -26
@@ -1,5 +1,5 @@
1
1
  import { JSONSchema } from 'json-schema-typed';
2
- import { AiAudioCreateSpeechModelName, AiAudioTranscriptionModelName, AiChatModelName, AiImageModelName, AiProviderType, AiRerankProvider, AnthropicChatModelName, CanonicalReasoningEffort, EmbeddingModelIdSpec, GeminiChatModelName, GrokChatModelName, ModelIdSpec, OpenAiAudioCreateSpeechModelName, OpenAiAudioTranscriptionModelName, OpenAiChatModelName, OpenAiCreateSpeechFormat, OpenAiImageModelName } from './ai-common.public-types';
2
+ import { AiAudioCreateSpeechModelName, AiAudioTranscriptionModelName, AiChatModelName, AiImageModelName, AiProviderType, AiRerankProvider, AnthropicChatModelName, CanonicalReasoningEffort, EmbeddingModelIdSpec, GeminiChatModelName, GrokChatModelName, ModelIdSpec, OpenAiAudioCreateSpeechModelName, OpenAiAudioTranscriptionModelName, OpenAiChatModelName, OpenAiCreateSpeechFormat, OpenAiImageModelName, VendorAiChatModelName } from './ai-common.public-types';
3
3
  import { AiContextMetadata, AiContextMetadataFilter, AiKnowledgeBaseContextType, AiRagType } from './ai-knowledge-base.public-types';
4
4
  import { AiFunctionId, AiFunctionIdWithContext, UserAiChatModelName } from './backend.public-types';
5
5
  import { AiAgentId, AiContextId, AiKnowledgeBaseId, AppId, IntegrationId } from './communication.public-types';
@@ -420,6 +420,39 @@ export interface IntegrationModelSpec {
420
420
  * @category AI
421
421
  */
422
422
  export type AiChatModelSelection = AiChatModelName | IntegrationModelSpec;
423
+ /**
424
+ * Lets a routing model pick which of several vendor models answers an `ask` request. The routing model
425
+ * sees the question, the agent's instructions and a card per candidate (price, tier, reasoning,
426
+ * context window) and names the one that should answer; that model then serves the request.
427
+ * @category AI
428
+ */
429
+ export interface AiModelRoutingOptions {
430
+ /** The vendor models the routing model chooses from; at least two, no duplicates. */
431
+ models: VendorAiChatModelName[];
432
+ /** The vendor model that makes the choice. */
433
+ routingModel: VendorAiChatModelName;
434
+ }
435
+ /**
436
+ * The model of an `ask` request: a concrete model, or a set of models a routing model chooses from.
437
+ * @category AI
438
+ */
439
+ export type AiAskModelSelection = AiChatModelSelection | AiModelRoutingOptions;
440
+ /**
441
+ * How an `ask` request whose `model` was an {@link AiModelRoutingOptions} was routed.
442
+ * @category AI
443
+ */
444
+ export interface AiModelRoutingResult {
445
+ /** The model the routing model chose and the request was sent to. A `backupModel` may still have served it. */
446
+ model: VendorAiChatModelName;
447
+ /** The model that made the choice. */
448
+ routingModel: VendorAiChatModelName;
449
+ /** Input tokens the routing call consumed. */
450
+ inputTokens: number;
451
+ /** Output tokens the routing call generated. */
452
+ outputTokens: number;
453
+ /** Best-effort USD cost of the routing call; undefined when the routing model is unpriced. */
454
+ costUsd?: number;
455
+ }
423
456
  /**
424
457
  * A backup model together with the sampling settings to run it with. Use this form instead of a
425
458
  * bare {@link AiChatModelSelection} when the backup needs settings of its own; anything left unset
@@ -505,7 +538,11 @@ export interface BaseAiChatOptions {
505
538
  responseFormat?: AiAgentResponseFormat;
506
539
  /** Whether to response in a "smooth typing" way, beneficial when the chat result is displayed in a UI. Default to true. */
507
540
  smoothTyping?: boolean;
508
- /** Global context passed to the agent and all AI functions of the agent. */
541
+ /**
542
+ * Global context passed to the agent and all AI functions of the agent. A request's value also reaches the AI
543
+ * functions of its connected agents, merged over each one's stored `agentContext`. Its keys are caller input and
544
+ * win over stored ones: only the root agent's `@secureAiAgent` rules can vet them, and none run for a public agent.
545
+ */
509
546
  agentContext?: Record<string, unknown>;
510
547
  /**
511
548
  * Functions to expose to the AI.
@@ -1079,7 +1116,7 @@ export interface UpsertContextStatusSuccess extends BaseUpsertContextStatus {
1079
1116
  * succeed on retry. Document faults carry `retryable: false` because the same bytes fail again.
1080
1117
  * @category AI
1081
1118
  */
1082
- export type UpsertContextErrorCode = 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'EMBEDDING_FAILED' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_TIMED_OUT' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNREADABLE_WORKBOOK' | 'UNSUPPORTED_FILE_TYPE';
1119
+ export type UpsertContextErrorCode = 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'EMBEDDING_FAILED' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_TIMED_OUT' | 'IMAGE_OVER_PROVIDER_LIMIT' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNREADABLE_DOCUMENT' | 'UNREADABLE_WORKBOOK' | 'UNSUPPORTED_FILE_TYPE';
1083
1120
  /**
1084
1121
  * The existing context a `DUPLICATE_CONTENT` rejection points at — where the byte-identical original
1085
1122
  * already lives.
@@ -1240,7 +1277,7 @@ export type AiPiiEntityType = 'email' | 'phoneNumber' | 'creditCard' | 'ssn' | '
1240
1277
  /** Entity kinds screened when {@link AiPiiOptions.entities} is omitted. */
1241
1278
  export declare const DEFAULT_PII_ENTITY_TYPES: ReadonlyArray<AiPiiEntityType>;
1242
1279
  /** Model that screens prompts unless overridden. Small and fast: it runs on every prompt. */
1243
- export declare const DEFAULT_PII_CLASSIFIER_MODEL = "gpt-5.6-luna";
1280
+ export declare const DEFAULT_PII_CLASSIFIER_MODEL = "gpt-6-luna";
1244
1281
  /**
1245
1282
  * Rejects a prompt before it reaches the agent's model when it carries PII, so the prompt is never
1246
1283
  * sent to the model provider, never answered, and never written to chat memory.
@@ -1397,6 +1434,8 @@ export interface AiAskResponse {
1397
1434
  responseString: string;
1398
1435
  /** Optional annotations (e.g., file references) in the response */
1399
1436
  annotations?: Record<string, AiAnnotation>;
1437
+ /** Set when `model` was an {@link AiModelRoutingOptions}: which model answered and what routing cost. */
1438
+ routing?: AiModelRoutingResult;
1400
1439
  }
1401
1440
  /**
1402
1441
  * API request to create speech from text
@@ -37,11 +37,16 @@ export type AiFileProviderType = (typeof AI_FILE_PROVIDER_TYPES)[number];
37
37
  * for them the ids are inert rather than wrong.
38
38
  */
39
39
  export declare function isFileCapableProviderType(type: AiProviderType): type is AiFileProviderType;
40
+ /**
41
+ * The AI providers whose chat provider implements the code interpreter. Declared like
42
+ * {@link AI_FILE_PROVIDER_TYPES}, so a provider that gains the interpreter is added here and nowhere else.
43
+ */
44
+ export declare const AI_CODE_INTERPRETER_PROVIDER_TYPES: readonly ["openai", "anthropic", "gemini"];
40
45
  /**
41
46
  * Public OpenAI chat model names (active models only).
42
47
  * @category AI
43
48
  */
44
- export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-astra"];
49
+ export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-astra", "gpt-6-luna", "gpt-6.1-sol"];
45
50
  /**
46
51
  * Public Gemini chat model names (active models only).
47
52
  * @category AI
@@ -56,12 +61,12 @@ export declare const GROK_CHAT_MODEL_NAMES: readonly ["grok-4.6", "grok-4-1-fast
56
61
  * Public Anthropic chat model names (active models only).
57
62
  * @category AI
58
63
  */
59
- export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-fable-5", "claude-fable-5-1", "claude-haiku-4-5-20251001", "claude-opus-5", "claude-sonnet-5"];
64
+ export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-fable-5", "claude-fable-5-1", "claude-haiku-4-5-20251001", "claude-opus-5-5", "claude-sonnet-5"];
60
65
  /**
61
66
  * The supported AI model names.
62
67
  * @category AI
63
68
  */
64
- export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-astra", "claude-fable-5", "claude-fable-5-1", "claude-haiku-4-5-20251001", "claude-opus-5", "claude-sonnet-5", "gemini-3.1-pro", "gemini-3.8-flash", "gemini-3.5-flash-lite", "grok-4.6", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
69
+ export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-astra", "gpt-6-luna", "gpt-6.1-sol", "claude-fable-5", "claude-fable-5-1", "claude-haiku-4-5-20251001", "claude-opus-5-5", "claude-sonnet-5", "gemini-3.1-pro", "gemini-3.8-flash", "gemini-3.5-flash-lite", "grok-4.6", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
65
70
  /** Checks if the given model name is a global AI chat model name. */
66
71
  export declare function isVendorAiChatModelName(modelName: unknown): modelName is VendorAiChatModelName;
67
72
  /**
@@ -1,8 +1,11 @@
1
+ import { JSONSchema } from 'json-schema-typed';
1
2
  import { AiFileUrl } from './ai-agent.public-types';
2
3
  import { ServiceFunctionName } from './backend.public-types';
3
4
  import { IntegrationType } from './integration.public-types';
4
5
  /** Represents the possible data types for an AI function parameter. */
5
- export type AiFunctionParamType = 'string' | 'number' | 'boolean' | 'date' | 'files';
6
+ export type AiFunctionParamType = 'string' | 'number' | 'boolean' | 'date' | 'files' | 'object';
7
+ /** JSON Schema (draft 2020-12) describing the value of an `object` AI function parameter. */
8
+ export type AiFunctionParamSchema = JSONSchema.Interface;
6
9
  /**
7
10
  * How sticky affinity routing must be for a function that keeps state outside the request.
8
11
  * - `pod`: the state is reachable by any worker of the pod (a file on disk, a child process).
@@ -23,6 +26,13 @@ export interface AiFunctionParam {
23
26
  required: boolean;
24
27
  /** List of possible values for the parameter, if applicable. */
25
28
  enum?: Array<Omit<AiFunctionParamType, 'date'>>;
29
+ /**
30
+ * The JSON Schema of the value; required when `type` is `'object'` and rejected otherwise. Its root must be
31
+ * `{ type: 'object' }`, and an object that lists `properties` accepts no other property unless it sets
32
+ * `additionalProperties`. Squid validates every call against it, so the function only receives a value that
33
+ * satisfies it.
34
+ */
35
+ schema?: AiFunctionParamSchema;
26
36
  /**
27
37
  * Marks this parameter as the affinity key of the function and states how sticky the routing must
28
38
  * be: every call carrying the same value is routed to the same tenant pod (and, for `worker`, the
@@ -1,4 +1,4 @@
1
- import { AiChatModelSelection, AiReasoningEffort, ContextImageFailure, UpsertContextStatusError } from './ai-agent.public-types';
1
+ import { AiChatModelSelection, AiReasoningEffort, ContextImageFailure, UpsertContextErrorCode, UpsertContextStatusError } from './ai-agent.public-types';
2
2
  import { AiEmbeddingsModelSelection, AiRerankProvider } from './ai-common.public-types';
3
3
  import { AiContextId, AiKnowledgeBaseId, AppId } from './communication.public-types';
4
4
  import { DocumentExtractionMethod } from './extraction.public-types';
@@ -228,12 +228,24 @@ export interface AiKnowledgeBaseGraphConfig {
228
228
  */
229
229
  autoBuildDebounceMs?: number;
230
230
  /**
231
- * When true, the sweep does not start automatic structural builds for this KB: activity keeps arming
232
- * the build, and the first quiet window after the flag is cleared runs it. Meant for an ingestion
233
- * campaign whose builds an operator wants to schedule by hand; `rebuildGraph` stays available.
234
- * Defaults to false.
231
+ * When true, the sweep starts no automatic build for this KB, entity resolution included: activity keeps
232
+ * arming the build, and the first quiet window after the flag is cleared runs it. `rebuildGraph` stays
233
+ * available. To hold only the structural build, use `structuralBuildSchedule`. Defaults to false.
235
234
  */
236
235
  autoBuildPaused?: boolean;
236
+ /**
237
+ * When the sweep may start an automatic structural build: `'debounced'` (one quiet window after activity),
238
+ * `'off'` (manual `rebuildGraph` only) or a 5-field cron expression. Entity resolution keeps running
239
+ * either way. Omitted ⇒ the server's default, `'debounced'` unless the deployment sets one.
240
+ */
241
+ structuralBuildSchedule?: string;
242
+ /** IANA time zone of a cron `structuralBuildSchedule`, e.g. `'America/Los_Angeles'`. Omitted ⇒ the server's default (UTC). */
243
+ structuralBuildTimeZone?: string;
244
+ /**
245
+ * How long after a cron slot its structural build may still start (milliseconds); past it, the build waits for
246
+ * the next slot. Must be a positive integer. Omitted ⇒ the server's default (3 hours).
247
+ */
248
+ structuralBuildCatchUpMs?: number;
237
249
  /** Concept-layer (facet taxonomy) configuration. Omitted ⇒ `facets: 'auto'`. */
238
250
  concepts?: AiKnowledgeBaseGraphConceptsConfig;
239
251
  }
@@ -931,9 +943,11 @@ export interface AiKnowledgeBaseGrepMatch {
931
943
  * content was never searchable.
932
944
  * - `coverageUnknown` — the scan itself succeeded, but how much of the scope holds stored text could not
933
945
  * be determined, so completeness cannot be asserted either way.
946
+ * - `patternTooBroad` — the pattern may occur in too many places to check them all within the time limit,
947
+ * so only some were searched. Narrow with `metadataFilter` or use a longer, more distinctive pattern.
934
948
  * @category AI
935
949
  */
936
- export type GrepScanLimitation = 'timedOut' | 'noIndexedText' | 'filterMatchedNoContexts' | 'scopeTruncated' | 'partsCapReached' | 'partialCoverage' | 'truncatedContent' | 'coverageUnknown';
950
+ export type GrepScanLimitation = 'timedOut' | 'noIndexedText' | 'filterMatchedNoContexts' | 'scopeTruncated' | 'partsCapReached' | 'partialCoverage' | 'truncatedContent' | 'coverageUnknown' | 'patternTooBroad';
937
951
  /**
938
952
  * Response structure for a literal scan over a knowledge base's raw extracted text.
939
953
  * @category AI
@@ -1259,6 +1273,21 @@ export interface GetKnowledgeBaseGraphStatusResponse {
1259
1273
  conceptScopeReady?: boolean;
1260
1274
  /** The incremental entity-resolution sweep's latest readings, present once a sweep has sampled the KB. */
1261
1275
  resolution?: KnowledgeBaseGraphResolutionStatus;
1276
+ /** Scheduled structural build slots skipped because the build could not start in time, newest last. */
1277
+ structuralBuildSkips?: Array<KnowledgeBaseGraphStructuralBuildSkip>;
1278
+ /** A manual `rebuildGraph` request waiting for the running entity-resolution build to finish. */
1279
+ queuedRebuild?: KnowledgeBaseGraphQueuedRebuild;
1280
+ }
1281
+ /**
1282
+ * A manual graph rebuild requested while an entity-resolution build ran. It starts once that build ends,
1283
+ * regardless of the structural build schedule.
1284
+ * @category AI
1285
+ */
1286
+ export interface KnowledgeBaseGraphQueuedRebuild {
1287
+ /** The requested rebuild mode; a `'full'` request absorbs a `'structural'` one queued with it. */
1288
+ mode: KnowledgeBaseGraphRebuildMode;
1289
+ /** When the latest request was queued (epoch millis). */
1290
+ requestedAt: number;
1262
1291
  }
1263
1292
  /**
1264
1293
  * Readings the incremental entity-resolution sweep persists on a knowledge base: the dirty backlog it
@@ -1346,7 +1375,58 @@ export interface KnowledgeBaseGraphBuildUsage {
1346
1375
  usage: KnowledgeBaseGraphUsage;
1347
1376
  /** The split of {@link usage} across the stages the build ran. */
1348
1377
  stages: KnowledgeBaseGraphBuildStageUsage;
1378
+ /** What the build's incremental entity-resolution stage has got through; absent until its first pass reports. */
1379
+ resolutionProgress?: KnowledgeBaseGraphResolutionProgress;
1380
+ }
1381
+ /**
1382
+ * Running progress of a build's incremental entity-resolution stage, written as each pass proposes,
1383
+ * adjudicates and merges, and summed over the build's execution attempts. The build's `usage` is flushed
1384
+ * at the same points, so it reads as the cost so far while the build runs.
1385
+ * @category AI
1386
+ */
1387
+ export interface KnowledgeBaseGraphResolutionProgress {
1388
+ /** Drain rounds completed. */
1389
+ rounds: number;
1390
+ /** Resolution passes completed. */
1391
+ passes: number;
1392
+ /** Dirty entities examined. */
1393
+ examined: number;
1394
+ /** Candidate pairs sent to adjudication. */
1395
+ pairsProposed: number;
1396
+ /** Candidate pairs adjudication confirmed as the same entity. */
1397
+ pairsConfirmed: number;
1398
+ /** Entities merged into a canonical entity. */
1399
+ entitiesMerged: number;
1400
+ /** Time spent proposing candidate pairs (millis). */
1401
+ proposalMs: number;
1402
+ /** Time spent adjudicating candidate pairs (millis). */
1403
+ adjudicationMs: number;
1404
+ /** Time spent merging confirmed pairs and refreshing the survivors (millis). */
1405
+ mergeMs: number;
1406
+ /** When the progress was last written (epoch millis). */
1407
+ updatedAt: number;
1408
+ }
1409
+ /**
1410
+ * A scheduled structural build slot whose catch-up window closed (or the next slot superseded it) without a
1411
+ * structural build, because the automatic build could not start while the window was open.
1412
+ * @category AI
1413
+ */
1414
+ export interface KnowledgeBaseGraphStructuralBuildSkip {
1415
+ /** The cron slot that was skipped (epoch millis). */
1416
+ slotAt: number;
1417
+ /** When the slot's catch-up window closed (epoch millis). */
1418
+ windowEndsAt: number;
1419
+ /**
1420
+ * Why the build could not start: an entity-resolution build was still running, another graph build held the KB,
1421
+ * a manual rebuild was queued ahead of it, a bulk ingestion was writing to it, or `graphRag.autoBuildPaused` was set.
1422
+ * The last reason seen in the window.
1423
+ */
1424
+ reason: KnowledgeBaseGraphStructuralBuildSkipReason;
1425
+ /** When the skip was recorded (epoch millis). */
1426
+ recordedAt: number;
1349
1427
  }
1428
+ /** Why an automatic structural build could not start inside its scheduled window. @category AI */
1429
+ export type KnowledgeBaseGraphStructuralBuildSkipReason = 'resolution-running' | 'build-in-progress' | 'queued-rebuild' | 'bulk-ingest' | 'paused';
1350
1430
  /**
1351
1431
  * A graph build's LLM usage split by pipeline stage. A stage the build entered but spent nothing on
1352
1432
  * reads zero; a stage it never ran (skipped by its plan, or by a resume) is absent.
@@ -1884,6 +1964,23 @@ export interface BulkIngestionJobStatusCounts {
1884
1964
  /** Logical requests submitted to the provider and awaiting results. */
1885
1965
  requestsSubmitted: number;
1886
1966
  }
1967
+ /**
1968
+ * Machine-readable class of a bulk-ingestion file failure, for outcomes to treat differently from real
1969
+ * failures. Terminal — reported with `retryable: false` — are `'CONTENT_TOO_LARGE'` (past the per-context
1970
+ * ceiling), `'ENCRYPTED_DOCUMENT'`, `'IMAGE_OVER_PROVIDER_LIMIT'` (the OCR provider refuses an image in the
1971
+ * document as too large, even with the pages that draw it redrawn smaller), `'NO_EMBEDDABLE_CONTENT'`,
1972
+ * `'SOURCE_OVER_PROVIDER_LIMIT'` (the bytes exceed what the extraction provider accepts),
1973
+ * `'UNREADABLE_DOCUMENT'` (a PDF or Office file whose bytes cannot be opened as one), `'UNREADABLE_WORKBOOK'`
1974
+ * (a spreadsheet whose content the parser cannot read) and `'UNSUPPORTED_FILE_TYPE'`.
1975
+ * `'DUPLICATE_CONTENT'` is a skip rather than a failure: the KB already holds this content.
1976
+ * `'EXTRACTION_TIMED_OUT'` stays retryable — the deadline is contended, so a borderline document can
1977
+ * cross it under load. So do `'SOURCE_UNREACHABLE'` (the provider could not fetch the source, which a
1978
+ * fresh link can fix) and `'PROVIDER_ACCESS_DENIED'` (the provider refused the credential or its quota is
1979
+ * spent, a fault of the environment). `'JOB_FULL'`: the job's request ceiling had no room left for this
1980
+ * file, so re-submit it in a fresh job; a file that alone exceeds the ceiling fails this way in every job.
1981
+ * @category AI
1982
+ */
1983
+ export type BulkIngestionFileErrorCode = 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_TIMED_OUT' | 'IMAGE_OVER_PROVIDER_LIMIT' | 'JOB_FULL' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNREADABLE_DOCUMENT' | 'UNREADABLE_WORKBOOK' | 'UNSUPPORTED_FILE_TYPE';
1887
1984
  /**
1888
1985
  * Per-file/per-context status within a bulk-ingestion job, so a caller can see which file finished,
1889
1986
  * which is still processing, and why a file failed.
@@ -1900,19 +1997,9 @@ export interface BulkIngestionFileStatus {
1900
1997
  errorMessage?: string;
1901
1998
  /**
1902
1999
  * Machine-readable class of a failed file, for outcomes to treat differently from real failures.
1903
- * Terminal — reported with `retryable: false` — are `'CONTENT_TOO_LARGE'` (past the per-context
1904
- * ceiling), `'ENCRYPTED_DOCUMENT'`, `'NO_EMBEDDABLE_CONTENT'`, `'SOURCE_OVER_PROVIDER_LIMIT'` (the
1905
- * bytes exceed what the extraction provider accepts), `'UNREADABLE_WORKBOOK'` (a spreadsheet whose
1906
- * content the parser cannot read) and `'UNSUPPORTED_FILE_TYPE'`.
1907
- * `'DUPLICATE_CONTENT'` is a skip rather than a failure: the KB already holds this content.
1908
- * `'EXTRACTION_TIMED_OUT'` stays retryable — the deadline is contended, so a borderline document can
1909
- * cross it under load. So do `'SOURCE_UNREACHABLE'` (the provider could not fetch the source, which a
1910
- * fresh link can fix) and `'PROVIDER_ACCESS_DENIED'` (the provider refused the credential or its quota is
1911
- * spent, a fault of the environment). `'JOB_FULL'`: the job's request ceiling had no room left for this
1912
- * file, so re-submit it in a fresh job; a file that alone exceeds the ceiling fails this way in every job.
1913
- * Additive; absent for ordinary failures.
1914
- */
1915
- errorCode?: 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_TIMED_OUT' | 'JOB_FULL' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNREADABLE_WORKBOOK' | 'UNSUPPORTED_FILE_TYPE';
2000
+ * Additive; absent for ordinary failures. See {@link BulkIngestionFileErrorCode}.
2001
+ */
2002
+ errorCode?: BulkIngestionFileErrorCode;
1916
2003
  /**
1917
2004
  * Present only on a failed file an extraction provider answered: a stable fingerprint of that answer
1918
2005
  * (provider, HTTP status and provider code), so a caller can tell the same failure repeating from a new one.
@@ -1949,6 +2036,91 @@ export interface BulkIngestionFileStatus {
1949
2036
  * @category AI
1950
2037
  */
1951
2038
  export type BulkIngestionGraphSkipReason = 'cap' | 'queue';
2039
+ /**
2040
+ * The durable ingestion status of a single file/text context, tracked independently of any one
2041
+ * bulk-ingestion job so it survives job purge. `'no_record'` means the knowledge base has never seen
2042
+ * this path — never persisted, only synthesized when a status query finds nothing. `'in_progress'`
2043
+ * covers every non-terminal bulk-ingestion stage (staged through embedding); the ledger only records
2044
+ * terminal outcomes, so finer sub-stages are not distinguished. `'completed'` and `'failed'` are terminal.
2045
+ * @category AI
2046
+ */
2047
+ export type AiKnowledgeBaseFileStatus = 'no_record' | 'in_progress' | 'completed' | 'failed';
2048
+ /**
2049
+ * The durable ingestion status of one file/text context at a path, returned by
2050
+ * {@link AiKnowledgeBaseReference.getFileStatus} and as one entry of
2051
+ * {@link AiKnowledgeBaseFolderStatusResponse.files}.
2052
+ * @category AI
2053
+ */
2054
+ export interface AiKnowledgeBaseFileStatusInfo {
2055
+ /** The context id, absent only when `status` is `'no_record'`. */
2056
+ contextId?: AiContextId;
2057
+ /** The file's path: `folderPath/filename`, or just `filename` at the upload root. */
2058
+ path: string;
2059
+ /** The file's current durable status. */
2060
+ status: AiKnowledgeBaseFileStatus;
2061
+ /** Present only when `status` is `'failed'`: the terminal failure reason. */
2062
+ errorMessage?: string;
2063
+ /**
2064
+ * Present only when `status` is `'failed'`: the machine-readable failure class, when known. A bulk
2065
+ * lane failure reports {@link BulkIngestionFileErrorCode}; a synchronous `upsertContexts` failure
2066
+ * reports {@link UpsertContextErrorCode} — the two lanes use distinct, mostly-overlapping codes.
2067
+ */
2068
+ errorCode?: BulkIngestionFileErrorCode | UpsertContextErrorCode;
2069
+ /** When this status was last recorded; absent when `status` is `'no_record'`. */
2070
+ updatedAt?: Date;
2071
+ }
2072
+ /**
2073
+ * Request to look up the durable ingestion status of a single file/text context by path.
2074
+ * @category AI
2075
+ */
2076
+ export interface GetKnowledgeBaseFileStatusRequest {
2077
+ /** The knowledge base to query. */
2078
+ knowledgeBaseId: AiKnowledgeBaseId;
2079
+ /** The file's path: `folderPath/filename`, or just `filename` at the upload root. */
2080
+ path: string;
2081
+ }
2082
+ /**
2083
+ * Request to search and aggregate the durable ingestion status of every file/text context matching
2084
+ * `folderPath`, read three ways and unioned: a folder subtree, a bare filename anywhere in the
2085
+ * knowledge base, and — when it contains a `/` — an exact `folderPath/filename` path.
2086
+ * @category AI
2087
+ */
2088
+ export interface GetKnowledgeBaseFolderStatusRequest {
2089
+ /** The knowledge base to query. */
2090
+ knowledgeBaseId: AiKnowledgeBaseId;
2091
+ /**
2092
+ * The folder subtree, bare filename, or exact file path to search for. A subtree match uses the same
2093
+ * segment-safe matching as `$underPath` metadata filters; a value containing `/` also matches that
2094
+ * exact file, so pasting a path from an earlier result finds that one file, not a folder of the same name.
2095
+ */
2096
+ folderPath: string;
2097
+ /**
2098
+ * Maximum number of files to return in `files`, prioritizing failures (the ones needing attention)
2099
+ * before filling remaining room with other statuses. `counts`/`totalFiles` always cover every file
2100
+ * regardless of this cap. Defaults to 50.
2101
+ */
2102
+ fileLimit?: number;
2103
+ }
2104
+ /**
2105
+ * Aggregate ingestion status for every file/text context matching a searched folder subtree, bare
2106
+ * filename, or exact file path (see {@link GetKnowledgeBaseFolderStatusRequest.folderPath}), combining
2107
+ * a name/path search with per-status counts and the failures that need attention.
2108
+ * @category AI
2109
+ */
2110
+ export interface AiKnowledgeBaseFolderStatusResponse {
2111
+ /** The folder subtree, filename, or exact path that was searched. */
2112
+ folderPath: string;
2113
+ /** Count of matching files by terminal/in-progress status (excludes `no_record`), uncapped. */
2114
+ counts: Record<Exclude<AiKnowledgeBaseFileStatus, 'no_record'>, number>;
2115
+ /** Total files found, across all statuses in `counts`. */
2116
+ totalFiles: number;
2117
+ /** False when nothing matched — the folder-level `no_record` case. */
2118
+ hasAnyRecords: boolean;
2119
+ /** Files under the folder, capped at `fileLimit` and prioritizing failures. */
2120
+ files: Array<AiKnowledgeBaseFileStatusInfo>;
2121
+ /** True when `files` was capped and more files exist under the folder than are returned. */
2122
+ truncated: boolean;
2123
+ }
1952
2124
  /**
1953
2125
  * Why a whole bulk-ingestion staging call was refused, on the `details` of its 400 response. The
1954
2126
  * refusal names the one context that caused it, so a caller recording per-file outcomes charges only
@@ -1999,6 +2171,8 @@ export interface BulkIngestionProviderBatchStatus {
1999
2171
  providerStatus?: string;
2000
2172
  /** When a poll first saw {@link providerStatus}. */
2001
2173
  providerStatusChangedAt?: Date;
2174
+ /** Why the provider failed the batch as a whole, in its own words; absent on a batch it did not fail. */
2175
+ providerError?: string;
2002
2176
  /** When the provider started running the batch; absent while it has not. */
2003
2177
  providerInProgressAt?: Date;
2004
2178
  /** Per-request progress at the newest poll; absent for a provider that does not report it. */
@@ -7,6 +7,16 @@ export interface InvokeLangGraphOptions {
7
7
  threadId?: string;
8
8
  /** Initial state for the run. */
9
9
  input?: Record<string, unknown>;
10
+ /** How long the run may take, in ms, before it stops and fails. At most, and by default, one hour. */
11
+ timeoutMs?: number;
12
+ }
13
+ /**
14
+ * Options for resuming an interrupted LangGraph thread.
15
+ * @category AI
16
+ */
17
+ export interface ResumeLangGraphOptions {
18
+ /** How long the resumed run may take, in ms, before it stops and fails. At most, and by default, one hour. */
19
+ timeoutMs?: number;
10
20
  }
11
21
  /**
12
22
  * Successful result of a LangGraph invocation.
@@ -1,5 +1,5 @@
1
1
  import { Observable } from 'rxjs';
2
- import { AiAgent, AiAgentMcpServerConfig, AiChatMessage, AiChatModelSelection, AiConnectedAgentMetadata, AiConnectedIntegrationMetadata, AiConnectedKnowledgeBaseMetadata, AiPiiOptions, AiStatusMessage, AiTranscribeAndAskResponse, AllAiAgentChatOptions, BuildAgentOptions, GenerateAgentMcpDescriptionsResponse, GuardrailsOptions, ListAgentRevisionsResponse, UpsertAgentRequest } from '../../../internal-common/src/public-types/ai-agent.public-types';
2
+ import { AiAgent, AiAgentMcpServerConfig, AiAskModelSelection, AiChatMessage, AiChatModelSelection, AiConnectedAgentMetadata, AiConnectedIntegrationMetadata, AiConnectedKnowledgeBaseMetadata, AiPiiOptions, AiStatusMessage, AiTranscribeAndAskResponse, AllAiAgentChatOptions, BuildAgentOptions, GenerateAgentMcpDescriptionsResponse, GuardrailsOptions, ListAgentRevisionsResponse, 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 { Paths } from '../../../internal-common/src/public-types/typescript.public-types';
5
5
  import { AiAskOptions, AiAskOptionsWithVoice, AiChatOptionsWithoutVoice, AskResponse, AskWithVoiceResponse, TranscribeAndAskWithVoiceResponse, TranscribeAndChatResponse } from './ai-agent-client.types';
@@ -131,7 +131,7 @@ export declare class AiAgentReference {
131
131
  * `squid.jobs().getJob(jobId)` to track progress. Make sure each job ID is both unique and kept private—anyone who
132
132
  * knows it can look up the job’s status.
133
133
  */
134
- ask<T extends AiChatModelSelection | undefined = undefined>(prompt: string, options?: AiAskOptions<T>, jobId?: JobId): Promise<string>;
134
+ ask<T extends AiAskModelSelection | undefined = undefined>(prompt: string, options?: AiAskOptions<T>, jobId?: JobId): Promise<string>;
135
135
  /**
136
136
  * Sends a prompt and returns the string response and file annotations.
137
137
  * @param prompt The text prompt to send to the agent.
@@ -140,7 +140,7 @@ export declare class AiAgentReference {
140
140
  * `squid.jobs().getJob(jobId)` to track progress. Make sure each job ID is both unique and kept private—anyone who
141
141
  * knows it can look up the job’s status.
142
142
  */
143
- askWithAnnotations<T extends AiChatModelSelection | undefined = undefined>(prompt: string, options?: AiAskOptions<T>, jobId?: JobId): Promise<AskResponse>;
143
+ askWithAnnotations<T extends AiAskModelSelection | undefined = undefined>(prompt: string, options?: AiAskOptions<T>, jobId?: JobId): Promise<AskResponse>;
144
144
  /**
145
145
  * Sends a prompt and not wait for the result - the result can be tracked using the job ID
146
146
  * (`squid.jobs().awaitJob(jobId)` or `squid.jobs().getJob(jobId)).
@@ -151,7 +151,7 @@ export declare class AiAgentReference {
151
151
  to track progress. Make sure each job ID is both unique and kept private—anyone who knows it can look up the job’s status.
152
152
  * @param options Optional parameters for the AI ask request.
153
153
  */
154
- askAsync<T extends AiChatModelSelection | undefined = undefined>(prompt: string, jobId: JobId, options?: AiAskOptions<T>): Promise<void>;
154
+ askAsync<T extends AiAskModelSelection | undefined = undefined>(prompt: string, jobId: JobId, options?: AiAskOptions<T>): Promise<void>;
155
155
  /**
156
156
  * Observes live status messages from the agent.
157
157
  * @param jobId The job ID to filter status updates for a specific job. If not provided, all status updates for the agent are observed.
@@ -1,5 +1,5 @@
1
1
  import { Observable } from 'rxjs';
2
- import { AiAnnotation, AiChatModelSelection, AiChatOptions, AiChatRequestCredentials } from '../../../internal-common/src/public-types/ai-agent.public-types';
2
+ import { AiAnnotation, AiAskModelSelection, AiChatModelSelection, AiChatOptions, AiChatRequestCredentials, AiModelRoutingResult } from '../../../internal-common/src/public-types/ai-agent.public-types';
3
3
  /**
4
4
  * Response format for transcribing audio and generating a chat response.
5
5
  * Contains the transcribed text and a stream of AI-generated responses.
@@ -33,6 +33,8 @@ export interface AskResponse {
33
33
  responseString: string;
34
34
  /** Optional annotations that provide additional context or metadata about the response. */
35
35
  annotations?: Record<string, AiAnnotation>;
36
+ /** Set when `model` was an {@link AiModelRoutingOptions}: which model answered and what the routing call cost. */
37
+ routing?: AiModelRoutingResult;
36
38
  }
37
39
  /**
38
40
  * Response format for AI-generated voice responses.
@@ -56,13 +58,19 @@ export type AiChatOptionsWithoutVoice<T extends AiChatModelSelection | undefined
56
58
  * Options for AI-generated responses that exclude voice-specific settings and smooth typing behavior.
57
59
  * @category AI
58
60
  */
59
- export type AiAskOptions<T extends AiChatModelSelection | undefined = undefined> = Omit<AiChatOptions<T>, 'voiceOptions' | 'smoothTyping'> & {
61
+ export type AiAskOptions<T extends AiAskModelSelection | undefined = undefined> = Omit<AiChatOptions<ConcreteModelOf<T>>, 'voiceOptions' | 'smoothTyping' | 'model'> & {
60
62
  model?: T;
61
63
  } & AiChatRequestCredentials;
62
64
  /**
63
65
  * Options for AI-generated responses that include voice-specific settings but excludes smooth typing.
64
66
  * @category AI
65
67
  */
66
- export type AiAskOptionsWithVoice<T extends AiChatModelSelection | undefined = undefined> = Omit<AiChatOptions<T>, 'smoothTyping'> & {
68
+ export type AiAskOptionsWithVoice<T extends AiAskModelSelection | undefined = undefined> = Omit<AiChatOptions<ConcreteModelOf<T>>, 'smoothTyping' | 'model'> & {
67
69
  model?: T;
68
70
  } & AiChatRequestCredentials;
71
+ /**
72
+ * The concrete model an ask's model selection names, which picks the provider-specific option set;
73
+ * a routing choice names none, so it gets the provider-agnostic options.
74
+ * @category AI
75
+ */
76
+ export type ConcreteModelOf<T extends AiAskModelSelection | undefined> = T extends AiChatModelSelection ? T : undefined;
@@ -1,5 +1,5 @@
1
1
  import { Observable } from 'rxjs';
2
- import { AiEmbeddingsModelWithOptionalFields, AiKnowledgeBase, AiKnowledgeBaseChatOptions, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseContextWithReasoning, AiKnowledgeBaseDownloadContextResponse, AiKnowledgeBaseSearchContextsWithContextIdRequest, AiKnowledgeBaseSearchContextsWithPromptRequest, AiKnowledgeBaseSearchResponse, AiKnowledgeBaseSearchResultChunk, BulkIngestionContext, BulkIngestionCreateUploadUrlsResponse, BulkIngestionJobStatusResponse, BulkIngestionUpsertContextsOptions, BulkIngestionUpsertContextsResponse, ExploreKnowledgeBaseGraphRequest, ExploreKnowledgeBaseGraphResponse, GenerateMetadataFieldDescriptionsRequest, GenerateMetadataFieldDescriptionsResponse, GetKnowledgeBaseGraphStatusResponse, GrepKnowledgeBaseOptions, GrepKnowledgeBaseResponse, ListAiKnowledgeBaseContextsPageResponse, ListKnowledgeBaseContextsOptions, QueryKnowledgeBaseGraphRequest, QueryKnowledgeBaseGraphResponse, RebuildKnowledgeBaseGraphRequest, UpsertKnowledgeBaseContextResponse, UpsertKnowledgeBaseContextsResponse } from '../../../internal-common/src/public-types/ai-knowledge-base.public-types';
2
+ import { AiEmbeddingsModelWithOptionalFields, AiKnowledgeBase, AiKnowledgeBaseChatOptions, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseContextWithReasoning, AiKnowledgeBaseDownloadContextResponse, AiKnowledgeBaseFileStatusInfo, AiKnowledgeBaseFolderStatusResponse, AiKnowledgeBaseSearchContextsWithContextIdRequest, AiKnowledgeBaseSearchContextsWithPromptRequest, AiKnowledgeBaseSearchResponse, AiKnowledgeBaseSearchResultChunk, BulkIngestionContext, BulkIngestionCreateUploadUrlsResponse, BulkIngestionJobStatusResponse, BulkIngestionUpsertContextsOptions, BulkIngestionUpsertContextsResponse, ExploreKnowledgeBaseGraphRequest, ExploreKnowledgeBaseGraphResponse, GenerateMetadataFieldDescriptionsRequest, GenerateMetadataFieldDescriptionsResponse, GetKnowledgeBaseGraphStatusResponse, GrepKnowledgeBaseOptions, GrepKnowledgeBaseResponse, ListAiKnowledgeBaseContextsPageResponse, ListKnowledgeBaseContextsOptions, QueryKnowledgeBaseGraphRequest, QueryKnowledgeBaseGraphResponse, RebuildKnowledgeBaseGraphRequest, UpsertKnowledgeBaseContextResponse, UpsertKnowledgeBaseContextsResponse } from '../../../internal-common/src/public-types/ai-knowledge-base.public-types';
3
3
  import { AiContextId } from '../../../internal-common/src/public-types/communication.public-types';
4
4
  /**
5
5
  * Parameters for creating or updating an AI agent.
@@ -81,9 +81,9 @@ export declare class AiKnowledgeBaseReference {
81
81
  */
82
82
  listContextIds(): Promise<Array<AiContextId>>;
83
83
  /**
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.
84
+ * Retrieves a specific context by its ID. Pass `truncateTextAfter: 0` to return an empty `text`
85
+ * field when only its metadata (e.g. `contentHash`) is needed — the stored text can be multiple
86
+ * MB, and truncating it avoids sending that payload back in full.
87
87
  */
88
88
  getContext(contextId: string, options?: GetContextOptions): Promise<AiKnowledgeBaseContext | undefined>;
89
89
  /**
@@ -207,6 +207,20 @@ export declare class AiKnowledgeBaseReference {
207
207
  * recent rebuild job, and the graph's LLM token/cost usage (`ingestUsage`, `lastRebuildUsage`).
208
208
  */
209
209
  getGraphStatus(): Promise<GetKnowledgeBaseGraphStatusResponse>;
210
+ /**
211
+ * Looks up the durable ingestion status of one file by path (`folderPath/filename`, or just
212
+ * `filename` at the upload root): `'completed'`, `'failed'` (with `errorMessage`/`errorCode`),
213
+ * `'in_progress'`, or `'no_record'` when the knowledge base has no trace of that path.
214
+ */
215
+ getFileStatus(path: string): Promise<AiKnowledgeBaseFileStatusInfo>;
216
+ /**
217
+ * Searches and aggregates the durable ingestion status of every file matching `folderPath`, read
218
+ * three ways and unioned: a folder subtree (matched the same segment-safe way as `$underPath`
219
+ * metadata filters), a bare filename anywhere in the knowledge base, and — when it contains a `/` —
220
+ * an exact `folderPath/filename` path. Returns per-status counts plus the files themselves (failures
221
+ * prioritized, capped at `fileLimit`, default 50).
222
+ */
223
+ getFolderStatus(folderPath: string, fileLimit?: number): Promise<AiKnowledgeBaseFolderStatusResponse>;
210
224
  /**
211
225
  * Enqueues a graph rebuild/backfill. The default `'structural'` mode keeps the already-extracted
212
226
  * entity graph (extracting only contexts never graph-indexed) and rebuilds just the concept layer
@@ -1,5 +1,5 @@
1
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';
2
+ import { GetLangGraphStateSuccessResult, InvokeLangGraphOptions, InvokeLangGraphSuccessResult, ResumeLangGraphOptions } from '../../internal-common/src/public-types/langgraph.public-types';
3
3
  /**
4
4
  * Reference to a specific LangGraph.
5
5
  * @category AI
@@ -13,9 +13,7 @@ export declare class LangGraphReference {
13
13
  *
14
14
  * For very long graphs where you don't want to hold a Promise, use `invokeAsync()` instead.
15
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.
16
+ * @param options Initial state, optional thread to run against and optional timeout of the run.
19
17
  */
20
18
  invoke(options?: InvokeLangGraphOptions): Promise<InvokeLangGraphSuccessResult>;
21
19
  /**
@@ -24,31 +22,27 @@ export declare class LangGraphReference {
24
22
  *
25
23
  * Use this for graphs that may run longer than is comfortable to hold a Promise for.
26
24
  *
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.
25
+ * @param options Initial state, optional thread to run against and optional timeout of the run.
30
26
  */
31
27
  invokeAsync(options?: InvokeLangGraphOptions): Promise<JobId>;
32
28
  /**
33
29
  * Resumes an interrupted LangGraph thread and waits for the result.
34
30
  * The thread must currently be in `interrupted` status.
35
31
  *
36
- * Note: graph execution caps at the tenant IPC timeout (currently 4 minutes).
37
- *
38
32
  * @param threadId The thread to resume.
39
33
  * @param resumePayload Value passed to the `interrupt()` call inside the graph.
34
+ * @param options Optional timeout of the resumed run.
40
35
  */
41
- resume(threadId: string, resumePayload: unknown): Promise<InvokeLangGraphSuccessResult>;
36
+ resume(threadId: string, resumePayload: unknown, options?: ResumeLangGraphOptions): Promise<InvokeLangGraphSuccessResult>;
42
37
  /**
43
38
  * Resumes an interrupted LangGraph thread without waiting for the result.
44
39
  * Returns a jobId — pass it to `squid.job().awaitJob(jobId)` or `getJob(jobId)` to retrieve the result later.
45
40
  *
46
- * Note: graph execution caps at the tenant IPC timeout (currently 4 minutes)
47
- *
48
41
  * @param threadId The thread to resume.
49
42
  * @param resumePayload Value passed to the `interrupt()` call inside the graph.
43
+ * @param options Optional timeout of the resumed run.
50
44
  */
51
- resumeAsync(threadId: string, resumePayload: unknown): Promise<JobId>;
45
+ resumeAsync(threadId: string, resumePayload: unknown, options?: ResumeLangGraphOptions): Promise<JobId>;
52
46
  /** Returns the current state of a LangGraph thread. */
53
47
  getState(threadId: string): Promise<GetLangGraphStateSuccessResult>;
54
48
  /**
@@ -2,4 +2,4 @@
2
2
  * The current version of the SquidCloud client package.
3
3
  * @category Platform
4
4
  */
5
- export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.496";
5
+ export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.498";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.496",
3
+ "version": "1.0.498",
4
4
  "description": "A typescript implementation of the Squid client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",