@openbkn/bkn-sdk 0.1.2 → 0.1.3

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/index.d.ts CHANGED
@@ -408,6 +408,258 @@ declare function appKeys(ctx: RequestContext): {
408
408
  adminRevoke: (id: string) => Promise<void>;
409
409
  };
410
410
 
411
+ type LifecycleErrorCode = "conversation_required" | "conversation_not_found" | "conversation_closed" | "conversation_expired" | "conversation_owner_mismatch" | "interaction_required" | "interaction_in_progress" | "interaction_terminal" | "operation_required" | "idempotency_conflict" | "event_payload_conflict" | "receipt_pending" | "terminal_conflict" | "closure_manifest_invalid" | "feature_not_installed" | "capability_not_licensed" | "permission_denied" | "resource_not_disclosed";
412
+ interface LifecycleError {
413
+ code: LifecycleErrorCode;
414
+ message: string;
415
+ retryable: boolean;
416
+ retry_after_ms: number;
417
+ current_status?: string;
418
+ required_action?: string;
419
+ request_id?: string;
420
+ }
421
+ interface LifecycleErrorEnvelope {
422
+ error: LifecycleError;
423
+ }
424
+ interface LifecycleOwner {
425
+ tenant_id: string;
426
+ business_domain_id: string;
427
+ application_principal_id: string;
428
+ effective_subject_type: "user" | "service";
429
+ effective_subject_id: string;
430
+ delegation_id?: string;
431
+ }
432
+ interface ManagedConversation {
433
+ conversation_id: string;
434
+ agent_name?: string;
435
+ owner: LifecycleOwner;
436
+ external_conversation_key: string;
437
+ generation: number;
438
+ status: "active" | "closed" | "expired";
439
+ one_shot: boolean;
440
+ row_version: number;
441
+ created_at: string;
442
+ updated_at: string;
443
+ closed_at?: string;
444
+ }
445
+ interface ConversationPage {
446
+ entries: ManagedConversation[];
447
+ }
448
+ interface ListConversationsQuery {
449
+ limit?: number;
450
+ }
451
+ interface ExpectedOperation {
452
+ operation_id: string;
453
+ required: boolean;
454
+ }
455
+ interface ExpectedReceipt {
456
+ receipt_id: string;
457
+ required: boolean;
458
+ }
459
+ interface EvidenceReference {
460
+ evidence_ref: string;
461
+ ref_type: "event" | "artifact" | "artifact_fragment" | "operation_output" | "claim";
462
+ source_interaction_id: string;
463
+ source_revision_id: string;
464
+ source_operation_id?: string;
465
+ artifact_ref?: string;
466
+ fragment_selector?: string;
467
+ version: string;
468
+ content_hash: string;
469
+ as_of?: string;
470
+ }
471
+ interface ClaimSupport {
472
+ target_ref: string;
473
+ target_type: "evidence" | "claim" | "artifact_fragment" | "operation_output";
474
+ source_interaction_id: string;
475
+ source_revision_id: string;
476
+ source_operation_id?: string;
477
+ version: string;
478
+ content_hash: string;
479
+ fragment_selector?: string;
480
+ role: string;
481
+ status: "adopted" | "rejected";
482
+ reason?: string;
483
+ }
484
+ interface ManagedClaim {
485
+ claim_id: string;
486
+ claim_type: string;
487
+ materiality: "material" | "supporting";
488
+ claim_status: "asserted" | "withdrawn";
489
+ content_artifact_ref: string;
490
+ required_support_roles: string[];
491
+ supports: ClaimSupport[];
492
+ }
493
+ interface InteractionCompletionInput {
494
+ terminal_idempotency_key: string;
495
+ lease_token: string;
496
+ lease_epoch: number;
497
+ completion_manifest_version: string;
498
+ completion_reason: string;
499
+ answer_artifact_ref?: string;
500
+ claims?: ManagedClaim[];
501
+ expected_operations?: ExpectedOperation[];
502
+ expected_receipts?: ExpectedReceipt[];
503
+ assembler_deadline?: string;
504
+ }
505
+ interface InteractionClosureManifest {
506
+ completion_manifest_version: string;
507
+ completion_reason: string;
508
+ answer_artifact_ref?: string;
509
+ claims?: ManagedClaim[];
510
+ expected_operations?: ExpectedOperation[];
511
+ expected_receipts?: ExpectedReceipt[];
512
+ assembler_deadline?: string;
513
+ system_partial_reasons?: string[];
514
+ }
515
+ interface ManagedInteraction {
516
+ interaction_id: string;
517
+ conversation_id: string;
518
+ ordinal: number;
519
+ execution_status: "active" | "completed" | "failed" | "canceled" | "handed_off" | "abandoned";
520
+ evidence_status: "not_applicable" | "assembling" | "complete" | "partial" | "failed";
521
+ closure_manifest?: InteractionClosureManifest;
522
+ lease_token: string;
523
+ lease_epoch: number;
524
+ lease_version: number;
525
+ lease_expires_at: string;
526
+ row_version: number;
527
+ created_at: string;
528
+ updated_at: string;
529
+ terminal_at?: string;
530
+ }
531
+ interface ManagedOperation {
532
+ operation_id: string;
533
+ conversation_id: string;
534
+ interaction_id: string;
535
+ operation_key: string;
536
+ tool_name: string;
537
+ normalized_input_hash: string;
538
+ parent_operation_id?: string;
539
+ causation_event_ids?: string[];
540
+ attempt: number;
541
+ attempt_status: "pending" | "completed" | "failed";
542
+ retryable: boolean;
543
+ row_version: number;
544
+ created_at: string;
545
+ updated_at: string;
546
+ }
547
+ interface LifecycleBusinessRef {
548
+ ref_type: string;
549
+ ref_id: string;
550
+ business_domain_id: string;
551
+ version: string;
552
+ as_of?: string;
553
+ display_hint?: string;
554
+ }
555
+ type EvidenceDurability = "pending" | "durable" | "failed";
556
+ interface OperationReceipt {
557
+ receipt_id: string;
558
+ schema_version: string;
559
+ owner: LifecycleOwner;
560
+ conversation_id: string;
561
+ interaction_id: string;
562
+ operation_id: string;
563
+ attempt: number;
564
+ operation_key: string;
565
+ tool_name: string;
566
+ normalized_input_hash: string;
567
+ receipt_status: "pending" | "completed" | "failed";
568
+ evidence_durability: EvidenceDurability;
569
+ required: boolean;
570
+ request_id: string;
571
+ trace_id: string;
572
+ causation_event_ids: string[];
573
+ observed_evidence_refs: EvidenceReference[];
574
+ business_refs: LifecycleBusinessRef[];
575
+ artifact_refs: string[];
576
+ partial_reasons: string[];
577
+ row_version: number;
578
+ issued_at: string;
579
+ terminal_at?: string;
580
+ payload_hash: string;
581
+ }
582
+ interface OperationResult {
583
+ operation: ManagedOperation;
584
+ receipt: OperationReceipt;
585
+ created: boolean;
586
+ }
587
+ interface EnsureConversationInput {
588
+ external_conversation_key: string;
589
+ idempotency_key?: string;
590
+ one_shot?: boolean;
591
+ }
592
+ interface CreateNewConversationGenerationInput extends EnsureConversationInput {
593
+ idempotency_key: string;
594
+ }
595
+ interface ResumeConversationInput {
596
+ conversation_id: string;
597
+ }
598
+ interface CloseConversationInput {
599
+ idempotency_key?: string;
600
+ }
601
+ interface StartInteractionInput {
602
+ idempotency_key: string;
603
+ agent_name?: string;
604
+ lease_seconds?: number;
605
+ }
606
+ interface EnsureOperationInput {
607
+ operation_key: string;
608
+ tool_name: string;
609
+ normalized_input_hash: string;
610
+ parent_operation_id?: string;
611
+ causation_event_ids?: string[];
612
+ required?: boolean;
613
+ lease_token: string;
614
+ lease_epoch: number;
615
+ }
616
+ interface RetryOperationAttemptInput {
617
+ lease_token: string;
618
+ lease_epoch: number;
619
+ }
620
+ interface FinishOperationAttemptInput {
621
+ receipt_id: string;
622
+ payload_hash: string;
623
+ evidence_durability: EvidenceDurability;
624
+ retryable?: boolean;
625
+ request_id: string;
626
+ trace_id: string;
627
+ observed_evidence_refs?: EvidenceReference[];
628
+ business_refs?: LifecycleBusinessRef[];
629
+ artifact_refs?: string[];
630
+ partial_reasons?: string[];
631
+ }
632
+ interface TraceLifecycleApi {
633
+ listConversations(query?: ListConversationsQuery): Promise<ConversationPage>;
634
+ ensureConversation(input: EnsureConversationInput): Promise<ManagedConversation>;
635
+ createNewConversationGeneration(input: CreateNewConversationGenerationInput): Promise<ManagedConversation>;
636
+ resumeConversation(input: ResumeConversationInput): Promise<ManagedConversation>;
637
+ getConversation(conversationId: string): Promise<ManagedConversation>;
638
+ closeConversation(conversationId: string, input: CloseConversationInput): Promise<ManagedConversation>;
639
+ startInteraction(conversationId: string, input: StartInteractionInput): Promise<ManagedInteraction>;
640
+ getInteraction(interactionId: string): Promise<ManagedInteraction>;
641
+ completeInteraction(interactionId: string, input: InteractionCompletionInput): Promise<ManagedInteraction>;
642
+ failInteraction(interactionId: string, input: InteractionCompletionInput): Promise<ManagedInteraction>;
643
+ cancelInteraction(interactionId: string, input: InteractionCompletionInput): Promise<ManagedInteraction>;
644
+ handoffInteraction(interactionId: string, input: InteractionCompletionInput): Promise<ManagedInteraction>;
645
+ ensureOperation(conversationId: string, interactionId: string, input: EnsureOperationInput): Promise<OperationResult>;
646
+ getOperation(operationId: string): Promise<ManagedOperation>;
647
+ retryOperationAttempt(operationId: string, input: RetryOperationAttemptInput): Promise<OperationResult>;
648
+ completeOperationAttempt(operationId: string, attempt: number, input: FinishOperationAttemptInput): Promise<OperationResult>;
649
+ failOperationAttempt(operationId: string, attempt: number, input: FinishOperationAttemptInput): Promise<OperationResult>;
650
+ getReceipt(receiptId: string): Promise<OperationReceipt>;
651
+ }
652
+ declare function traceLifecycleApi(ctx: RequestContext): TraceLifecycleApi;
653
+
654
+ interface ManagedToolResult<T = unknown> {
655
+ value: T;
656
+ receipt: OperationReceipt;
657
+ }
658
+ /** Adapter-owned MCP metadata for lifecycle-safe host retries. */
659
+ interface ToolCallOptions {
660
+ hostConversationKey?: string;
661
+ clientInvocationId?: string;
662
+ }
411
663
  interface SearchSchemaOptions {
412
664
  searchScope?: string[];
413
665
  maxConcepts?: number;
@@ -415,8 +667,6 @@ interface SearchSchemaOptions {
415
667
  /** Progressive KN-detail disclosure level: `summary` (skeleton + property names) | `full`. */
416
668
  type DetailLevel = "summary" | "full";
417
669
 
418
- /** Context-loader resource surface (MCP over agent-retrieval). */
419
-
420
670
  declare function context(ctx: RequestContext): {
421
671
  searchSchema: (knId: string, query: string, opts?: SearchSchemaOptions) => Promise<unknown>;
422
672
  queryObjectInstance: (knId: string, args: Record<string, unknown>) => Promise<unknown>;
@@ -426,7 +676,8 @@ declare function context(ctx: RequestContext): {
426
676
  relationTypes: (knId: string, ids: string[]) => Promise<unknown>;
427
677
  info: () => Promise<unknown>;
428
678
  tools: (knId: string) => Promise<unknown>;
429
- toolCall: (knId: string, name: string, args: Record<string, unknown>) => Promise<unknown>;
679
+ toolCall: (knId: string, name: string, args: Record<string, unknown>, options?: ToolCallOptions) => Promise<unknown>;
680
+ managedToolCall: <T = unknown>(knId: string, name: string, args: Record<string, unknown>, options?: ToolCallOptions) => Promise<ManagedToolResult<T>>;
430
681
  callMethod: (knId: string, method: string, params?: Record<string, unknown>) => Promise<unknown>;
431
682
  queryInstanceSubgraph: (knId: string, args: Record<string, unknown>) => Promise<unknown>;
432
683
  logicProperties: (knId: string, args: Record<string, unknown>) => Promise<unknown>;
@@ -481,6 +732,33 @@ declare function dataflows(ctx: RequestContext): {
481
732
  createBkn: (template: string, args: Record<string, unknown>) => Promise<unknown>;
482
733
  };
483
734
 
735
+ /** The body field the lifecycle middleware reads. Snake_case: it goes on the wire. */
736
+ interface BknContext {
737
+ conversation_id: string;
738
+ interaction_id: string;
739
+ /** v1 only. v2 rejects the field outright, so it must stay absent there. */
740
+ operation_key?: string;
741
+ }
742
+ /**
743
+ * Release the interactions this process opened.
744
+ *
745
+ * Only v2 is released. Its finish takes an id and an outcome, where v1's
746
+ * cancel demands a closure manifest — and the two kinds of v1 session are
747
+ * skipped for different reasons: one we opened ourselves carries `one_shot`
748
+ * and is swept when idle, while one opened inside a caller's conversation has
749
+ * no `one_shot` to rely on and no manifest we can supply (see `openSession`),
750
+ * so it waits out its five-minute lease. The outcome is `cancelled` because a
751
+ * CLI invocation has no answer artifact to close over, and `completed` without
752
+ * one is rejected.
753
+ *
754
+ * Best-effort by construction: this runs while a process is shutting down,
755
+ * where a throw would turn a successful command into a failed one. The whole
756
+ * release is bounded, not just its final call — the handshake being awaited
757
+ * here has no deadline of its own, so a server that accepted the connection
758
+ * and went quiet would hold the process open after its output was printed.
759
+ */
760
+ declare function releaseLifecycleSessions(): Promise<void>;
761
+
484
762
  /**
485
763
  * Knowledge-network backend client (ontology-manager + agent-retrieval).
486
764
  * Responses are passed through as parsed JSON
@@ -522,6 +800,15 @@ interface SemanticSearchOptions {
522
800
  mode?: string;
523
801
  maxConcepts?: number;
524
802
  returnQueryUnderstanding?: boolean;
803
+ /**
804
+ * A `bkn_context` the caller built itself, sent as-is.
805
+ *
806
+ * The same escape hatch `context.toolCall` has: supplying one skips the
807
+ * managed session entirely, so an `operation_key` pre-registered through
808
+ * `ManagedTrace` survives instead of being replaced, and
809
+ * `parent_operation_id` / `causation_event_ids` travel with it.
810
+ */
811
+ bknContext?: BknContext;
525
812
  }
526
813
 
527
814
  interface CreateFromCatalogOptions {
@@ -773,6 +1060,33 @@ declare function resources(ctx: RequestContext): {
773
1060
  query: (id: string, opts?: QueryResourceOptions) => Promise<unknown>;
774
1061
  };
775
1062
 
1063
+ /**
1064
+ * Which side of the skill API to read.
1065
+ *
1066
+ * The consumer surface serves the **published** release; the management surface
1067
+ * serves the **draft** (current) version and takes `view`/`modify` permissions
1068
+ * rather than `execute`/`public_access`/`view`. The two disagree whenever a
1069
+ * skill has been edited but not republished, so they are never interchangeable.
1070
+ */
1071
+ type SkillView = "published" | "draft";
1072
+ interface ExecuteSkillOptions {
1073
+ /** Shell command run inside the sandbox, relative to the skill's work dir. */
1074
+ entryShell: string;
1075
+ /** Sandbox wall-clock limit in seconds. */
1076
+ timeout?: number;
1077
+ }
1078
+ interface SkillExecutionResult {
1079
+ skill_id?: string;
1080
+ session_id?: string;
1081
+ work_dir?: string;
1082
+ command?: string;
1083
+ exit_code?: number;
1084
+ stdout?: string;
1085
+ stderr?: string;
1086
+ execution_time?: number;
1087
+ /** True when the sandbox stubbed the run instead of executing it. */
1088
+ mocked?: boolean;
1089
+ }
776
1090
  interface ListSkillsOptions {
777
1091
  page?: number;
778
1092
  pageSize?: number;
@@ -781,16 +1095,69 @@ interface ListSkillsOptions {
781
1095
  status?: string;
782
1096
  createUser?: string;
783
1097
  }
1098
+ /**
1099
+ * `url` hands back a pre-signed object-store link; `content` inlines the file
1100
+ * body. Only the management surface honours `content` today — the consumer
1101
+ * surface ignores it and answers with a URL either way.
1102
+ */
1103
+ type SkillResponseMode = "url" | "content";
1104
+ interface SkillContentResponse {
1105
+ skill_id?: string;
1106
+ version?: string;
1107
+ url?: string;
1108
+ /** Present only when the backend honoured `response_mode=content`. */
1109
+ content?: string;
1110
+ files?: SkillFileEntry[];
1111
+ }
1112
+ interface SkillFileEntry {
1113
+ rel_path: string;
1114
+ file_type?: string;
1115
+ size?: number;
1116
+ mime_type?: string;
1117
+ }
1118
+ interface SkillReadFileResponse {
1119
+ skill_id?: string;
1120
+ rel_path?: string;
1121
+ url?: string;
1122
+ content?: string;
1123
+ mime_type?: string;
1124
+ file_type?: string;
1125
+ }
784
1126
  type SkillStatus = "unpublish" | "published" | "offline";
785
1127
 
1128
+ /** Which version a read targets: the published release, or the editable draft. */
1129
+ interface SkillViewOptions {
1130
+ draft?: boolean;
1131
+ }
786
1132
  declare function skills(ctx: RequestContext): {
787
1133
  list: (opts?: ListSkillsOptions) => Promise<unknown>;
788
1134
  get: (skillId: string) => Promise<unknown>;
789
1135
  market: (opts?: ListSkillsOptions) => Promise<unknown>;
790
1136
  marketGet: (skillId: string) => Promise<unknown>;
791
1137
  delete: (skillId: string) => Promise<unknown>;
792
- content: (skillId: string) => Promise<unknown>;
793
- readFile: (skillId: string, relPath: string) => Promise<unknown>;
1138
+ content: (skillId: string, opts?: SkillViewOptions) => Promise<SkillContentResponse>;
1139
+ readFile: (skillId: string, relPath: string, opts?: SkillViewOptions) => Promise<SkillReadFileResponse>;
1140
+ /** SKILL.md's own text, for callers that want the document rather than a link. */
1141
+ contentRaw: (skillId: string, opts?: SkillViewOptions) => Promise<string>;
1142
+ /** A bundled file's text. */
1143
+ readFileRaw: (skillId: string, relPath: string, opts?: SkillViewOptions) => Promise<string>;
1144
+ /** Run the skill in the platform sandbox. */
1145
+ execute: (skillId: string, opts: ExecuteSkillOptions) => Promise<SkillExecutionResult>;
1146
+ /** Resolve skill ids to names; unknown ids are simply absent from the result. */
1147
+ names: (ids: string[]) => Promise<unknown>;
1148
+ /**
1149
+ * One level of the skill's file tree. Directories are inferred from the
1150
+ * manifest's paths — see utils/skill-tree.
1151
+ */
1152
+ files: (skillId: string, path?: string, opts?: SkillViewOptions) => Promise<{
1153
+ skillId: string;
1154
+ path: string;
1155
+ entries: SkillChild[];
1156
+ totalFiles: number;
1157
+ totalSize: number;
1158
+ }>;
1159
+ /** The manifest itself, for callers that want to render the whole tree. */
1160
+ fileManifest: (skillId: string, opts?: SkillViewOptions) => Promise<SkillFileEntry[]>;
794
1161
  history: (skillId: string) => Promise<unknown>;
795
1162
  setStatus: (skillId: string, status: SkillStatus) => Promise<unknown>;
796
1163
  updateMetadata: (skillId: string, body: unknown) => Promise<unknown>;
@@ -804,13 +1171,13 @@ declare function skills(ctx: RequestContext): {
804
1171
  /** Replace a skill's package from a local directory. */
805
1172
  updatePackage: (skillId: string, dir: string) => Promise<unknown>;
806
1173
  /** Download a skill archive to a local .zip file. */
807
- download: (skillId: string, outPath?: string) => Promise<{
1174
+ download: (skillId: string, outPath?: string, opts?: SkillViewOptions) => Promise<{
808
1175
  skillId: string;
809
1176
  path: string;
810
1177
  bytes: number;
811
1178
  }>;
812
1179
  /** Download a skill archive and extract it into a directory. */
813
- install: (skillId: string, dir?: string) => Promise<{
1180
+ install: (skillId: string, dir?: string, opts?: SkillViewOptions) => Promise<{
814
1181
  skillId: string;
815
1182
  dir: string;
816
1183
  files: number;
@@ -882,6 +1249,85 @@ interface FixturePathValidationResult {
882
1249
  results: FixtureValidationResult[];
883
1250
  }
884
1251
 
1252
+ type ConversationStrategy = {
1253
+ mode: "resume_by_id";
1254
+ conversationId: string;
1255
+ } | {
1256
+ mode: "ensure_current";
1257
+ externalConversationKey: string;
1258
+ } | {
1259
+ mode: "one_shot";
1260
+ externalConversationKey?: string;
1261
+ } | {
1262
+ mode: "create_new_generation";
1263
+ externalConversationKey: string;
1264
+ };
1265
+ type ManagedCompletionInput = Omit<InteractionCompletionInput, "terminal_idempotency_key" | "lease_token" | "lease_epoch">;
1266
+ interface BknBusinessContext {
1267
+ bkn_context: {
1268
+ conversation_id: string;
1269
+ interaction_id: string;
1270
+ operation_key: string;
1271
+ parent_operation_id?: string;
1272
+ causation_event_ids?: string[];
1273
+ };
1274
+ }
1275
+ interface SupportCandidate {
1276
+ ref: EvidenceReference;
1277
+ state: "observed";
1278
+ adopted: false;
1279
+ }
1280
+ interface ManagedInteractionScope {
1281
+ conversation: ManagedConversation;
1282
+ interaction: ManagedInteraction;
1283
+ bknContext(operationKey: string, parentOperationId?: string, causationEventIds?: string[]): BknBusinessContext;
1284
+ recordReceipt(receipt: OperationReceipt): void;
1285
+ supportCandidates(): SupportCandidate[];
1286
+ runOperation<T>(input: ManagedOperationInput, execute: (call: ManagedOperationCall) => Promise<ManagedOperationExecution<T>>): Promise<ManagedOperationResult<T>>;
1287
+ cancel(reason: string): Promise<ManagedInteraction>;
1288
+ handoff(reason: string): Promise<ManagedInteraction>;
1289
+ }
1290
+ interface ManagedOperationInput {
1291
+ operationKey?: string;
1292
+ toolName: string;
1293
+ normalizedInputHash: string;
1294
+ parentOperationId?: string;
1295
+ causationEventIds?: string[];
1296
+ required?: boolean;
1297
+ /** Maximum authoritative attempt ordinal, including the current attempt. */
1298
+ maxAttempts?: number;
1299
+ }
1300
+ interface ManagedOperationCall {
1301
+ context: BknBusinessContext;
1302
+ operation: ManagedOperation;
1303
+ receipt: OperationReceipt;
1304
+ }
1305
+ interface ManagedOperationExecution<T> {
1306
+ value: T;
1307
+ receipt: OperationReceipt;
1308
+ }
1309
+ type ManagedOperationResult<T> = (ManagedOperationExecution<T> & {
1310
+ recovered: false;
1311
+ }) | {
1312
+ value: undefined;
1313
+ receipt: OperationReceipt;
1314
+ recovered: true;
1315
+ };
1316
+ interface ManagedTraceOptions {
1317
+ idFactory?: () => string;
1318
+ }
1319
+ declare class ManagedTrace {
1320
+ private readonly api;
1321
+ private readonly idFactory;
1322
+ private readonly pendingConversations;
1323
+ private readonly activeConversationIds;
1324
+ constructor(api: TraceLifecycleApi, options?: ManagedTraceOptions);
1325
+ withInteraction(strategy: ConversationStrategy, callback: (scope: ManagedInteractionScope) => Promise<ManagedCompletionInput>): Promise<ManagedInteraction>;
1326
+ private resolveConversation;
1327
+ private ensureCurrent;
1328
+ private runOperation;
1329
+ }
1330
+
885
1331
  /**
886
1332
  * BKN Trace client (agent-observability). Implements raw trace search and a
887
1333
  * two-hop "spans by conversation" fetch. The full
@@ -889,74 +1335,6 @@ interface FixturePathValidationResult {
889
1335
  * is NOT included here — see docs/exec-plans/tech-debt-tracker.md.
890
1336
  */
891
1337
 
892
- interface EvidenceTraceContext {
893
- trace_id: string;
894
- traceparent: string;
895
- "bkn.request.id": string;
896
- "bkn.conversation.id"?: string;
897
- "bkn.tenant.id"?: string;
898
- business_domain?: string;
899
- "bkn.account.id": string;
900
- "bkn.account.type": string;
901
- }
902
- type BusinessEvidenceEventType = "agent.interaction.started" | "retrieval.completed" | "knowledge.read.observed" | "data.query.observed" | "logic.execution.observed" | "model.call.observed" | "tool.called" | "tool.result.observed" | "claim.created" | "evidence.refs.created" | "business.refs.resolved" | "action.recommended" | "action.approval_requested" | "action.approved" | "action.rejected" | "action.executed" | "action.result_recorded";
903
- interface EvidenceEvent {
904
- event_id: string;
905
- event_type: BusinessEvidenceEventType | (string & {});
906
- "bkn.trace.schema.version": string;
907
- observed_at: string;
908
- emitted_at: string;
909
- producer_module: string;
910
- trace_id: string;
911
- span_id: string;
912
- "bkn.request.id": string;
913
- "bkn.operation.name": string;
914
- interaction_id?: string;
915
- operation_id?: string;
916
- causation_event_id?: string;
917
- claim_id?: string;
918
- attempt?: number;
919
- payload: Record<string, unknown>;
920
- }
921
- interface EvidenceIngestRequest {
922
- "bkn.trace.schema.version": "2.0.0" | "2.1.0" | "2.2.0";
923
- trace: EvidenceTraceContext;
924
- events: EvidenceEvent[];
925
- }
926
- type EvidenceArtifactType = "action_input" | "action_result" | "data_result" | "logic_execution" | "query" | "question" | "result";
927
- interface EvidenceArtifact {
928
- artifact_id: string;
929
- artifact_type: EvidenceArtifactType;
930
- "bkn.request.id": string;
931
- trace_id?: string;
932
- interaction_id?: string;
933
- operation_id?: string;
934
- claim_id?: string;
935
- source_ref?: string;
936
- business_refs?: string[];
937
- content_type: string;
938
- schema_version: "2.2.0";
939
- observed_at: string;
940
- as_of?: string;
941
- source_version?: string;
942
- content_hash: string;
943
- content?: unknown;
944
- snapshot_ref?: string;
945
- "bkn.tenant.id"?: string;
946
- business_domain?: string;
947
- "bkn.account.id": string;
948
- "bkn.account.type": string;
949
- initiator?: string;
950
- agent_or_app?: string;
951
- }
952
- interface EvidenceArtifactIngestResponse {
953
- artifact_id: string;
954
- artifact_type: EvidenceArtifactType;
955
- "bkn.request.id": string;
956
- trace_id?: string;
957
- content_hash: string;
958
- created: boolean;
959
- }
960
1338
  interface ActionSummary {
961
1339
  recommended: number;
962
1340
  approved: number;
@@ -964,27 +1342,6 @@ interface ActionSummary {
964
1342
  completed: number;
965
1343
  last_status?: string;
966
1344
  }
967
- interface RequestSummary {
968
- request_id: string;
969
- conversation_id?: string;
970
- interaction_id?: string;
971
- started_at?: string;
972
- completed_at?: string;
973
- initiator?: string;
974
- agent_or_app?: string;
975
- business_domain?: string;
976
- knowledge_networks?: string[];
977
- question_preview?: string;
978
- result_preview?: string;
979
- status: string;
980
- evidence_completeness: string;
981
- partial_reasons?: string[];
982
- business_refs?: string[];
983
- action_summary: Partial<ActionSummary>;
984
- trace_count: number;
985
- duration_ms?: number;
986
- error_summary?: string;
987
- }
988
1345
  interface TraceExecutionSummary {
989
1346
  trace_id: string;
990
1347
  request_id: string;
@@ -1000,47 +1357,6 @@ interface TraceExecutionSummary {
1000
1357
  duration_ms?: number;
1001
1358
  error_summary?: string;
1002
1359
  }
1003
- interface SummaryPage<T> {
1004
- entries: T[];
1005
- total: number;
1006
- next_cursor?: string | null;
1007
- truncated: boolean;
1008
- partial: boolean;
1009
- partial_reasons?: string[];
1010
- }
1011
- interface RequestSummaryQuery {
1012
- limit?: number;
1013
- cursor?: string;
1014
- from?: string;
1015
- to?: string;
1016
- status?: string;
1017
- agentOrApp?: string;
1018
- businessDomain?: string;
1019
- conversationId?: string;
1020
- interactionId?: string;
1021
- knowledgeNetwork?: string;
1022
- evidenceCompleteness?: string;
1023
- keyword?: string;
1024
- }
1025
- interface InteractionSummary {
1026
- interaction_id: string;
1027
- conversation_id?: string;
1028
- started_at?: string;
1029
- completed_at?: string;
1030
- status: string;
1031
- duration_ms?: number;
1032
- requests: RequestSummary[];
1033
- traces: TraceExecutionSummary[];
1034
- }
1035
- interface EvidenceIngestResponse {
1036
- trace_id: string;
1037
- "bkn.request.id": string;
1038
- "bkn.trace.schema.version": string;
1039
- accepted_event_count: number;
1040
- claim_count: number;
1041
- evidence_ref_count: number;
1042
- business_ref_count: number;
1043
- }
1044
1360
  interface VisibilitySummary {
1045
1361
  authorized_ref_count: number;
1046
1362
  redacted_ref_count: number;
@@ -1085,52 +1401,6 @@ interface TraceGraphResponse {
1085
1401
  edges: TraceGraphEdge[];
1086
1402
  };
1087
1403
  }
1088
- interface EvidenceChainResponse {
1089
- trace_id: string;
1090
- "bkn.request.id": string;
1091
- partial: boolean;
1092
- partial_reason: string[];
1093
- visibility_summary: VisibilitySummary;
1094
- page: GraphPage;
1095
- data: {
1096
- claims: Array<Record<string, unknown>>;
1097
- evidence_refs: Array<Record<string, unknown>>;
1098
- business_refs: Array<Record<string, unknown>>;
1099
- };
1100
- }
1101
- interface BusinessGraphResponse {
1102
- trace_id: string;
1103
- "bkn.request.id": string;
1104
- partial: boolean;
1105
- partial_reason: string[];
1106
- visibility_summary: VisibilitySummary;
1107
- page: GraphPage;
1108
- data: {
1109
- nodes: Array<Record<string, unknown>>;
1110
- edges: Array<Record<string, unknown>>;
1111
- };
1112
- }
1113
- interface SnapshotPreviewResponse {
1114
- trace_id: string;
1115
- "bkn.request.id": string;
1116
- partial: boolean;
1117
- partial_reason: string[];
1118
- visibility_summary: VisibilitySummary;
1119
- snapshot_ref: {
1120
- snapshot_id: string;
1121
- mode: "preview" | string;
1122
- uri?: string;
1123
- };
1124
- manifest: Record<string, unknown>;
1125
- }
1126
- type TraceScope = string | {
1127
- traceId: string;
1128
- } | {
1129
- requestId: string;
1130
- };
1131
- interface TraceQueryOptions {
1132
- limit?: number;
1133
- }
1134
1404
 
1135
1405
  /**
1136
1406
  * Trace diagnose engine. Fetches a conversation's spans, shapes them into a
@@ -1219,261 +1489,15 @@ interface EvalSetResult {
1219
1489
  cases: CaseResult[];
1220
1490
  }
1221
1491
 
1222
- type EvidenceEmitter = (body: EvidenceIngestRequest) => Promise<EvidenceIngestResponse>;
1223
- type IDFactory = () => string;
1224
- interface TraceSessionOptions {
1225
- trace: EvidenceTraceContext;
1226
- producerModule: string;
1227
- spanId: string;
1228
- interactionId?: string;
1229
- conversationId?: string;
1230
- contractVersion?: "2.1.0" | "2.2.0";
1231
- emit: EvidenceEmitter;
1232
- idFactory?: IDFactory;
1233
- now?: () => string;
1234
- }
1235
- interface InteractionBase {
1236
- operationName: string;
1237
- intentHash: string;
1238
- mode: "chat" | "task" | "background";
1239
- questionArtifactRef?: string;
1240
- }
1241
- type InteractionInput = InteractionBase & ({
1242
- agentId: string;
1243
- appRef?: string;
1244
- } | {
1245
- agentId?: string;
1246
- appRef: string;
1247
- });
1248
- interface OperationEventPayloadMap {
1249
- "retrieval.completed": {
1250
- query_hash: string;
1251
- candidate_count: number;
1252
- truncated: boolean;
1253
- version_status?: string;
1254
- source_refs?: string[];
1255
- };
1256
- "knowledge.read.observed": {
1257
- kn_id: string;
1258
- read_kind: string;
1259
- version_status: string;
1260
- schema_version?: string;
1261
- business_refs?: string[];
1262
- };
1263
- "data.query.observed": {
1264
- query_hash: string;
1265
- query_type: string;
1266
- row_count: number;
1267
- truncated?: boolean;
1268
- as_of?: string;
1269
- version_status?: string;
1270
- resource_refs?: string[];
1271
- field_refs?: string[];
1272
- query_artifact_ref?: string;
1273
- result_artifact_ref?: string;
1274
- };
1275
- "logic.execution.observed": {
1276
- logic_ref: string;
1277
- input_artifact_ref: string;
1278
- result_artifact_ref: string;
1279
- status: "ok" | "success" | "error";
1280
- };
1281
- "model.call.observed": {
1282
- model_name: string;
1283
- model_provider: string;
1284
- status: "ok" | "error";
1285
- input_token_count: number;
1286
- output_token_count: number;
1287
- prompt_hash: string;
1288
- output_hash: string;
1289
- error_category?: string;
1290
- error_hash?: string;
1291
- };
1292
- "tool.called": {
1293
- tool_id: string;
1294
- tool_name: string;
1295
- args_hash: string;
1296
- visibility: string;
1297
- version_status: string;
1298
- };
1299
- "tool.result.observed": {
1300
- tool_id: string;
1301
- tool_name: string;
1302
- status: "success" | "error";
1303
- result_hash?: string;
1304
- error_hash?: string;
1305
- visibility: string;
1306
- version_status: string;
1307
- };
1308
- }
1309
- type OperationEventType = keyof OperationEventPayloadMap;
1310
- interface OperationInput<T extends OperationEventType = OperationEventType> {
1311
- operationName: string;
1312
- causationEventId: string;
1313
- operationId?: string;
1314
- attempt?: number;
1315
- claimId?: string;
1316
- payload: OperationEventPayloadMap[T];
1317
- }
1318
- interface ClaimInput {
1319
- operationName: string;
1320
- causationEventId: string;
1321
- claimId: string;
1322
- claimType: "answer" | "recommendation" | "structured_output" | "finding";
1323
- claimHash: string;
1324
- sourceEventIds: string[];
1325
- operationIds: string[];
1326
- resultArtifactRef?: string;
1327
- visibility?: string;
1328
- versionStatus?: string;
1329
- }
1330
- interface EvidenceRefInput {
1331
- refId: string;
1332
- refType: string;
1333
- sourceSystem: string;
1334
- validity: "observed" | "available" | "unavailable" | "expired" | "partial";
1335
- versionStatus: "versioned" | "unversioned" | "not_auditable";
1336
- visibility: "visible" | "redacted" | "hidden" | "omitted" | "unresolved" | "unauthorized";
1337
- summaryHash?: string;
1338
- }
1339
- interface EvidenceRefsInput {
1340
- operationName: string;
1341
- claimId: string;
1342
- causationEventId?: string;
1343
- refs: EvidenceRefInput[];
1344
- }
1345
- interface BusinessRefInput {
1346
- refId: string;
1347
- refType: "knowledge_network" | "object" | "property" | "relation" | "metric" | "logic" | "action";
1348
- sourceSystem: string;
1349
- validity: "observed" | "available" | "unavailable" | "expired" | "partial";
1350
- versionStatus: "versioned" | "unversioned" | "not_auditable";
1351
- visibility: "visible" | "redacted" | "hidden" | "omitted" | "unresolved" | "unauthorized";
1352
- }
1353
- interface BusinessRefsInput {
1354
- operationName: string;
1355
- claimId: string;
1356
- causationEventId?: string;
1357
- resolverStatus: "resolved" | "partial" | "unresolved";
1358
- refs: BusinessRefInput[];
1359
- }
1360
- interface ActionHandle {
1361
- readonly actionInstanceId: string;
1362
- readonly claimId: string;
1363
- readonly operationId: string;
1364
- readonly lastEventId: string;
1365
- readonly state: "recommended" | "approval_requested" | "approved" | "rejected" | "executed" | "result_recorded";
1366
- }
1367
- interface RecommendActionInput {
1368
- operationName: string;
1369
- claimId: string;
1370
- actionType: string;
1371
- targetRefs: string[];
1372
- reasonHash: string;
1373
- reasonArtifactRef?: string;
1374
- inputArtifactRef?: string;
1375
- causationEventId?: string;
1376
- }
1377
- type ExecuteActionInput = {
1378
- status: "ok";
1379
- invocationRef: string;
1380
- } | {
1381
- status: "error";
1382
- invocationRef: string;
1383
- errorCategory: string;
1384
- errorHash: string;
1385
- };
1386
- type ActionResultInput = {
1387
- status: string;
1388
- resultHash: string;
1389
- } & ({
1390
- resultArtifactRef: string;
1391
- taskRef?: string;
1392
- artifactRef?: never;
1393
- } | {
1394
- taskRef: string;
1395
- artifactRef?: string;
1396
- resultArtifactRef?: string;
1397
- } | {
1398
- taskRef?: string;
1399
- artifactRef: string;
1400
- resultArtifactRef?: string;
1401
- });
1402
- declare class TraceSession {
1403
- readonly interactionId: string;
1404
- private readonly trace;
1405
- private readonly producerModule;
1406
- private readonly spanId;
1407
- private readonly emit;
1408
- private readonly contractVersion;
1409
- private readonly idFactory;
1410
- private readonly now;
1411
- private readonly events;
1412
- private readonly eventIDs;
1413
- private readonly operationIDs;
1414
- private readonly claimEventIDs;
1415
- private readonly actions;
1416
- private flushTail;
1417
- constructor(options: TraceSessionOptions);
1418
- startInteraction(input: InteractionInput): EvidenceEvent;
1419
- observeOperation<T extends OperationEventType>(eventType: T, input: OperationInput<T>): EvidenceEvent;
1420
- createClaim(input: ClaimInput): EvidenceEvent;
1421
- createEvidenceRefs(input: EvidenceRefsInput): EvidenceEvent;
1422
- resolveBusinessRefs(input: BusinessRefsInput): EvidenceEvent;
1423
- recommendAction(input: RecommendActionInput): ActionHandle;
1424
- requestActionApproval(action: ActionHandle, input: {
1425
- policyRef: string;
1426
- }): EvidenceEvent;
1427
- approveAction(action: ActionHandle, input: {
1428
- actorRef: string;
1429
- policyDecisionRef: string;
1430
- }): EvidenceEvent;
1431
- rejectAction(action: ActionHandle, input: {
1432
- actorRef: string;
1433
- policyDecisionRef: string;
1434
- }): EvidenceEvent;
1435
- executeAction(action: ActionHandle, input: ExecuteActionInput): EvidenceEvent;
1436
- recordActionResult(action: ActionHandle, input: ActionResultInput): EvidenceEvent;
1437
- pendingEvents(): EvidenceEvent[];
1438
- flush(): Promise<EvidenceIngestResponse | undefined>;
1439
- private appendAction;
1440
- private append;
1441
- private flushEvents;
1442
- private assertContractPayload;
1443
- private assertKnownRefs;
1444
- private requireClaim;
1445
- private expectActionState;
1446
- }
1447
-
1448
1492
  declare function trace(ctx: RequestContext): {
1493
+ /** Low-level BKN Trace 3.0 lifecycle and durable receipt API. */
1494
+ lifecycle: TraceLifecycleApi;
1495
+ /** Own one complete interaction lifecycle around an application callback. */
1496
+ withInteraction: (strategy: ConversationStrategy, callback: (scope: ManagedInteractionScope) => Promise<ManagedCompletionInput>) => Promise<ManagedInteraction>;
1449
1497
  /** Raw trace search (OpenSearch-style body). */
1450
1498
  search: (body: unknown) => Promise<unknown>;
1451
- /** Submit BKN Trace phase-two claim/evidence/business events. */
1452
- emitEvidenceEvents: (body: EvidenceIngestRequest) => Promise<EvidenceIngestResponse>;
1453
- /** Store one authorized BKN Trace 2.2 business-content artifact. */
1454
- emitArtifact: (body: EvidenceArtifact) => Promise<EvidenceArtifactIngestResponse>;
1455
- /** Read one authorized BKN Trace 2.2 business-content artifact. */
1456
- artifact: (artifactId: string) => Promise<EvidenceArtifact>;
1457
- /** Product-facing business request list and request-to-trace drilldown. */
1458
- requests: {
1459
- get: (requestId: string) => Promise<RequestSummary>;
1460
- list: (query?: RequestSummaryQuery) => Promise<SummaryPage<RequestSummary>>;
1461
- traces: (requestId: string, query?: Pick<RequestSummaryQuery, "cursor" | "limit">) => Promise<SummaryPage<TraceExecutionSummary>>;
1462
- };
1463
- /** Aggregate all OpenBKN requests and traces for one caller-owned interaction. */
1464
- interactions: {
1465
- get: (interactionId: string) => Promise<InteractionSummary>;
1466
- };
1467
- /** Create a typed BKN Trace 2.1 session for an Agent or AI application. */
1468
- createSession: (options: Omit<TraceSessionOptions, "emit">) => TraceSession;
1469
1499
  /** Normalized trace tree/status graph by trace id. */
1470
1500
  graph: (traceId: string) => Promise<TraceGraphResponse>;
1471
- /** Claim -> evidence/business refs graph by trace id or BKN request id. */
1472
- evidenceChain: (scope: TraceScope, opts?: TraceQueryOptions) => Promise<EvidenceChainResponse>;
1473
- /** Business semantic graph by trace id or BKN request id. */
1474
- businessGraph: (scope: TraceScope, opts?: TraceQueryOptions) => Promise<BusinessGraphResponse>;
1475
- /** Metadata-only evidence snapshot preview by trace id or BKN request id. */
1476
- snapshotPreview: (scope: TraceScope, opts?: TraceQueryOptions) => Promise<SnapshotPreviewResponse>;
1477
1501
  /** All span source docs for a conversation. */
1478
1502
  spans: (conversationId: string, opts?: {
1479
1503
  maxTraceIds?: number;
@@ -1525,32 +1549,113 @@ declare function trace(ctx: RequestContext): {
1525
1549
 
1526
1550
  declare const BuildMode: z.ZodEnum<["batch", "streaming"]>;
1527
1551
  type BuildMode = z.infer<typeof BuildMode>;
1552
+ declare const BuildTaskStatus: z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
1553
+ type BuildTaskStatus = z.infer<typeof BuildTaskStatus>;
1554
+ declare const CatalogHealthCheckScheduleMode: z.ZodEnum<["inherit", "enabled", "disabled"]>;
1555
+ type CatalogHealthCheckScheduleMode = z.infer<typeof CatalogHealthCheckScheduleMode>;
1556
+ declare const CatalogHealthCheckStatus: z.ZodEnum<["healthy", "degraded", "unhealthy", "offline", "unchecked"]>;
1557
+ type CatalogHealthCheckStatus = z.infer<typeof CatalogHealthCheckStatus>;
1558
+ declare const CatalogHealthStatus: z.ZodObject<{
1559
+ id: z.ZodString;
1560
+ health_check_status: z.ZodEnum<["healthy", "degraded", "unhealthy", "offline", "unchecked"]>;
1561
+ last_check_time: z.ZodOptional<z.ZodNumber>;
1562
+ health_check_result: z.ZodOptional<z.ZodString>;
1563
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1564
+ id: z.ZodString;
1565
+ health_check_status: z.ZodEnum<["healthy", "degraded", "unhealthy", "offline", "unchecked"]>;
1566
+ last_check_time: z.ZodOptional<z.ZodNumber>;
1567
+ health_check_result: z.ZodOptional<z.ZodString>;
1568
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1569
+ id: z.ZodString;
1570
+ health_check_status: z.ZodEnum<["healthy", "degraded", "unhealthy", "offline", "unchecked"]>;
1571
+ last_check_time: z.ZodOptional<z.ZodNumber>;
1572
+ health_check_result: z.ZodOptional<z.ZodString>;
1573
+ }, z.ZodTypeAny, "passthrough">>;
1574
+ type CatalogHealthStatus = z.infer<typeof CatalogHealthStatus>;
1575
+ type CatalogHealthCheckScheduleRequest = {
1576
+ mode: "enabled";
1577
+ cronExpr: string;
1578
+ } | {
1579
+ mode: "inherit" | "disabled";
1580
+ cronExpr?: never;
1581
+ };
1582
+ declare const CatalogHealthCheckSchedule: z.ZodObject<{
1583
+ catalog_id: z.ZodString;
1584
+ mode: z.ZodEnum<["inherit", "enabled", "disabled"]>;
1585
+ cron_expr: z.ZodOptional<z.ZodString>;
1586
+ last_run: z.ZodNumber;
1587
+ next_run: z.ZodNumber;
1588
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1589
+ catalog_id: z.ZodString;
1590
+ mode: z.ZodEnum<["inherit", "enabled", "disabled"]>;
1591
+ cron_expr: z.ZodOptional<z.ZodString>;
1592
+ last_run: z.ZodNumber;
1593
+ next_run: z.ZodNumber;
1594
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1595
+ catalog_id: z.ZodString;
1596
+ mode: z.ZodEnum<["inherit", "enabled", "disabled"]>;
1597
+ cron_expr: z.ZodOptional<z.ZodString>;
1598
+ last_run: z.ZodNumber;
1599
+ next_run: z.ZodNumber;
1600
+ }, z.ZodTypeAny, "passthrough">>;
1601
+ type CatalogHealthCheckSchedule = z.infer<typeof CatalogHealthCheckSchedule>;
1602
+ interface CatalogConnectionTestRequest {
1603
+ connectorType: string;
1604
+ connectorConfig: Record<string, unknown>;
1605
+ }
1606
+ declare const CatalogConnectionTestResult: z.ZodObject<{
1607
+ success: z.ZodBoolean;
1608
+ message: z.ZodOptional<z.ZodString>;
1609
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1610
+ success: z.ZodBoolean;
1611
+ message: z.ZodOptional<z.ZodString>;
1612
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1613
+ success: z.ZodBoolean;
1614
+ message: z.ZodOptional<z.ZodString>;
1615
+ }, z.ZodTypeAny, "passthrough">>;
1616
+ type CatalogConnectionTestResult = z.infer<typeof CatalogConnectionTestResult>;
1617
+ interface CatalogWriteOptions {
1618
+ allowUnhealthy?: boolean;
1619
+ }
1528
1620
  /** POST /build-tasks body. */
1529
- declare const CreateBuildTaskRequest: z.ZodObject<{
1621
+ declare const CreateBuildTaskRequest: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1530
1622
  resource_id: z.ZodString;
1531
- mode: z.ZodEnum<["batch", "streaming"]>;
1623
+ mode: z.ZodLiteral<"batch">;
1532
1624
  execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
1533
1625
  }, "strip", z.ZodTypeAny, {
1534
- mode: "batch" | "streaming";
1626
+ mode: "batch";
1535
1627
  resource_id: string;
1536
1628
  execute_type?: "full" | "incremental" | undefined;
1537
1629
  }, {
1538
- mode: "batch" | "streaming";
1630
+ mode: "batch";
1539
1631
  resource_id: string;
1540
1632
  execute_type?: "full" | "incremental" | undefined;
1541
- }>;
1633
+ }>, z.ZodObject<{
1634
+ resource_id: z.ZodString;
1635
+ mode: z.ZodLiteral<"streaming">;
1636
+ execute_type: z.ZodOptional<z.ZodNever>;
1637
+ }, "strip", z.ZodTypeAny, {
1638
+ mode: "streaming";
1639
+ resource_id: string;
1640
+ execute_type?: undefined;
1641
+ }, {
1642
+ mode: "streaming";
1643
+ resource_id: string;
1644
+ execute_type?: undefined;
1645
+ }>]>;
1542
1646
  type CreateBuildTaskRequest = z.infer<typeof CreateBuildTaskRequest>;
1543
1647
  declare const BuildTask: z.ZodObject<{
1544
1648
  id: z.ZodString;
1545
1649
  resource_id: z.ZodOptional<z.ZodString>;
1546
1650
  mode: z.ZodOptional<z.ZodEnum<["batch", "streaming"]>>;
1547
- status: z.ZodOptional<z.ZodString>;
1651
+ status: z.ZodOptional<z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>>;
1548
1652
  state: z.ZodOptional<z.ZodString>;
1549
1653
  total_count: z.ZodOptional<z.ZodNumber>;
1550
1654
  synced_count: z.ZodOptional<z.ZodNumber>;
1551
1655
  vectorized_count: z.ZodOptional<z.ZodNumber>;
1552
1656
  index_config: z.ZodOptional<z.ZodUnknown>;
1553
1657
  catalog_id: z.ZodOptional<z.ZodString>;
1658
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
1554
1659
  index_health: z.ZodOptional<z.ZodObject<{
1555
1660
  embedding: z.ZodString;
1556
1661
  fulltext: z.ZodString;
@@ -1568,13 +1673,14 @@ declare const BuildTask: z.ZodObject<{
1568
1673
  id: z.ZodString;
1569
1674
  resource_id: z.ZodOptional<z.ZodString>;
1570
1675
  mode: z.ZodOptional<z.ZodEnum<["batch", "streaming"]>>;
1571
- status: z.ZodOptional<z.ZodString>;
1676
+ status: z.ZodOptional<z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>>;
1572
1677
  state: z.ZodOptional<z.ZodString>;
1573
1678
  total_count: z.ZodOptional<z.ZodNumber>;
1574
1679
  synced_count: z.ZodOptional<z.ZodNumber>;
1575
1680
  vectorized_count: z.ZodOptional<z.ZodNumber>;
1576
1681
  index_config: z.ZodOptional<z.ZodUnknown>;
1577
1682
  catalog_id: z.ZodOptional<z.ZodString>;
1683
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
1578
1684
  index_health: z.ZodOptional<z.ZodObject<{
1579
1685
  embedding: z.ZodString;
1580
1686
  fulltext: z.ZodString;
@@ -1592,13 +1698,14 @@ declare const BuildTask: z.ZodObject<{
1592
1698
  id: z.ZodString;
1593
1699
  resource_id: z.ZodOptional<z.ZodString>;
1594
1700
  mode: z.ZodOptional<z.ZodEnum<["batch", "streaming"]>>;
1595
- status: z.ZodOptional<z.ZodString>;
1701
+ status: z.ZodOptional<z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>>;
1596
1702
  state: z.ZodOptional<z.ZodString>;
1597
1703
  total_count: z.ZodOptional<z.ZodNumber>;
1598
1704
  synced_count: z.ZodOptional<z.ZodNumber>;
1599
1705
  vectorized_count: z.ZodOptional<z.ZodNumber>;
1600
1706
  index_config: z.ZodOptional<z.ZodUnknown>;
1601
1707
  catalog_id: z.ZodOptional<z.ZodString>;
1708
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
1602
1709
  index_health: z.ZodOptional<z.ZodObject<{
1603
1710
  embedding: z.ZodString;
1604
1711
  fulltext: z.ZodString;
@@ -1614,15 +1721,533 @@ declare const BuildTask: z.ZodObject<{
1614
1721
  }, z.ZodTypeAny, "passthrough">>>;
1615
1722
  }, z.ZodTypeAny, "passthrough">>;
1616
1723
  type BuildTask = z.infer<typeof BuildTask>;
1724
+ /** Lightweight BuildTask representation returned by list APIs. */
1725
+ declare const BuildTaskSummary: z.ZodObject<{
1726
+ id: z.ZodString;
1727
+ resource_id: z.ZodString;
1728
+ resource_name: z.ZodOptional<z.ZodString>;
1729
+ catalog_id: z.ZodString;
1730
+ catalog_name: z.ZodOptional<z.ZodString>;
1731
+ status: z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
1732
+ mode: z.ZodEnum<["batch", "streaming"]>;
1733
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
1734
+ total_count: z.ZodNumber;
1735
+ synced_count: z.ZodNumber;
1736
+ vectorized_count: z.ZodNumber;
1737
+ synced_mark: z.ZodString;
1738
+ error_msg: z.ZodOptional<z.ZodString>;
1739
+ creator: z.ZodObject<{
1740
+ id: z.ZodString;
1741
+ name: z.ZodOptional<z.ZodString>;
1742
+ type: z.ZodString;
1743
+ }, "strip", z.ZodTypeAny, {
1744
+ id: string;
1745
+ type: string;
1746
+ name?: string | undefined;
1747
+ }, {
1748
+ id: string;
1749
+ type: string;
1750
+ name?: string | undefined;
1751
+ }>;
1752
+ create_time: z.ZodNumber;
1753
+ update_time: z.ZodNumber;
1754
+ index_health: z.ZodOptional<z.ZodObject<{
1755
+ embedding: z.ZodString;
1756
+ fulltext: z.ZodString;
1757
+ usable: z.ZodBoolean;
1758
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1759
+ embedding: z.ZodString;
1760
+ fulltext: z.ZodString;
1761
+ usable: z.ZodBoolean;
1762
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1763
+ embedding: z.ZodString;
1764
+ fulltext: z.ZodString;
1765
+ usable: z.ZodBoolean;
1766
+ }, z.ZodTypeAny, "passthrough">>>;
1767
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1768
+ id: z.ZodString;
1769
+ resource_id: z.ZodString;
1770
+ resource_name: z.ZodOptional<z.ZodString>;
1771
+ catalog_id: z.ZodString;
1772
+ catalog_name: z.ZodOptional<z.ZodString>;
1773
+ status: z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
1774
+ mode: z.ZodEnum<["batch", "streaming"]>;
1775
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
1776
+ total_count: z.ZodNumber;
1777
+ synced_count: z.ZodNumber;
1778
+ vectorized_count: z.ZodNumber;
1779
+ synced_mark: z.ZodString;
1780
+ error_msg: z.ZodOptional<z.ZodString>;
1781
+ creator: z.ZodObject<{
1782
+ id: z.ZodString;
1783
+ name: z.ZodOptional<z.ZodString>;
1784
+ type: z.ZodString;
1785
+ }, "strip", z.ZodTypeAny, {
1786
+ id: string;
1787
+ type: string;
1788
+ name?: string | undefined;
1789
+ }, {
1790
+ id: string;
1791
+ type: string;
1792
+ name?: string | undefined;
1793
+ }>;
1794
+ create_time: z.ZodNumber;
1795
+ update_time: z.ZodNumber;
1796
+ index_health: z.ZodOptional<z.ZodObject<{
1797
+ embedding: z.ZodString;
1798
+ fulltext: z.ZodString;
1799
+ usable: z.ZodBoolean;
1800
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1801
+ embedding: z.ZodString;
1802
+ fulltext: z.ZodString;
1803
+ usable: z.ZodBoolean;
1804
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1805
+ embedding: z.ZodString;
1806
+ fulltext: z.ZodString;
1807
+ usable: z.ZodBoolean;
1808
+ }, z.ZodTypeAny, "passthrough">>>;
1809
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1810
+ id: z.ZodString;
1811
+ resource_id: z.ZodString;
1812
+ resource_name: z.ZodOptional<z.ZodString>;
1813
+ catalog_id: z.ZodString;
1814
+ catalog_name: z.ZodOptional<z.ZodString>;
1815
+ status: z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
1816
+ mode: z.ZodEnum<["batch", "streaming"]>;
1817
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
1818
+ total_count: z.ZodNumber;
1819
+ synced_count: z.ZodNumber;
1820
+ vectorized_count: z.ZodNumber;
1821
+ synced_mark: z.ZodString;
1822
+ error_msg: z.ZodOptional<z.ZodString>;
1823
+ creator: z.ZodObject<{
1824
+ id: z.ZodString;
1825
+ name: z.ZodOptional<z.ZodString>;
1826
+ type: z.ZodString;
1827
+ }, "strip", z.ZodTypeAny, {
1828
+ id: string;
1829
+ type: string;
1830
+ name?: string | undefined;
1831
+ }, {
1832
+ id: string;
1833
+ type: string;
1834
+ name?: string | undefined;
1835
+ }>;
1836
+ create_time: z.ZodNumber;
1837
+ update_time: z.ZodNumber;
1838
+ index_health: z.ZodOptional<z.ZodObject<{
1839
+ embedding: z.ZodString;
1840
+ fulltext: z.ZodString;
1841
+ usable: z.ZodBoolean;
1842
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1843
+ embedding: z.ZodString;
1844
+ fulltext: z.ZodString;
1845
+ usable: z.ZodBoolean;
1846
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1847
+ embedding: z.ZodString;
1848
+ fulltext: z.ZodString;
1849
+ usable: z.ZodBoolean;
1850
+ }, z.ZodTypeAny, "passthrough">>>;
1851
+ }, z.ZodTypeAny, "passthrough">>;
1852
+ type BuildTaskSummary = z.infer<typeof BuildTaskSummary>;
1853
+ declare const ListBuildTasksResponse: z.ZodObject<{
1854
+ entries: z.ZodArray<z.ZodObject<{
1855
+ id: z.ZodString;
1856
+ resource_id: z.ZodString;
1857
+ resource_name: z.ZodOptional<z.ZodString>;
1858
+ catalog_id: z.ZodString;
1859
+ catalog_name: z.ZodOptional<z.ZodString>;
1860
+ status: z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
1861
+ mode: z.ZodEnum<["batch", "streaming"]>;
1862
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
1863
+ total_count: z.ZodNumber;
1864
+ synced_count: z.ZodNumber;
1865
+ vectorized_count: z.ZodNumber;
1866
+ synced_mark: z.ZodString;
1867
+ error_msg: z.ZodOptional<z.ZodString>;
1868
+ creator: z.ZodObject<{
1869
+ id: z.ZodString;
1870
+ name: z.ZodOptional<z.ZodString>;
1871
+ type: z.ZodString;
1872
+ }, "strip", z.ZodTypeAny, {
1873
+ id: string;
1874
+ type: string;
1875
+ name?: string | undefined;
1876
+ }, {
1877
+ id: string;
1878
+ type: string;
1879
+ name?: string | undefined;
1880
+ }>;
1881
+ create_time: z.ZodNumber;
1882
+ update_time: z.ZodNumber;
1883
+ index_health: z.ZodOptional<z.ZodObject<{
1884
+ embedding: z.ZodString;
1885
+ fulltext: z.ZodString;
1886
+ usable: z.ZodBoolean;
1887
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1888
+ embedding: z.ZodString;
1889
+ fulltext: z.ZodString;
1890
+ usable: z.ZodBoolean;
1891
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1892
+ embedding: z.ZodString;
1893
+ fulltext: z.ZodString;
1894
+ usable: z.ZodBoolean;
1895
+ }, z.ZodTypeAny, "passthrough">>>;
1896
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1897
+ id: z.ZodString;
1898
+ resource_id: z.ZodString;
1899
+ resource_name: z.ZodOptional<z.ZodString>;
1900
+ catalog_id: z.ZodString;
1901
+ catalog_name: z.ZodOptional<z.ZodString>;
1902
+ status: z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
1903
+ mode: z.ZodEnum<["batch", "streaming"]>;
1904
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
1905
+ total_count: z.ZodNumber;
1906
+ synced_count: z.ZodNumber;
1907
+ vectorized_count: z.ZodNumber;
1908
+ synced_mark: z.ZodString;
1909
+ error_msg: z.ZodOptional<z.ZodString>;
1910
+ creator: z.ZodObject<{
1911
+ id: z.ZodString;
1912
+ name: z.ZodOptional<z.ZodString>;
1913
+ type: z.ZodString;
1914
+ }, "strip", z.ZodTypeAny, {
1915
+ id: string;
1916
+ type: string;
1917
+ name?: string | undefined;
1918
+ }, {
1919
+ id: string;
1920
+ type: string;
1921
+ name?: string | undefined;
1922
+ }>;
1923
+ create_time: z.ZodNumber;
1924
+ update_time: z.ZodNumber;
1925
+ index_health: z.ZodOptional<z.ZodObject<{
1926
+ embedding: z.ZodString;
1927
+ fulltext: z.ZodString;
1928
+ usable: z.ZodBoolean;
1929
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1930
+ embedding: z.ZodString;
1931
+ fulltext: z.ZodString;
1932
+ usable: z.ZodBoolean;
1933
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1934
+ embedding: z.ZodString;
1935
+ fulltext: z.ZodString;
1936
+ usable: z.ZodBoolean;
1937
+ }, z.ZodTypeAny, "passthrough">>>;
1938
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1939
+ id: z.ZodString;
1940
+ resource_id: z.ZodString;
1941
+ resource_name: z.ZodOptional<z.ZodString>;
1942
+ catalog_id: z.ZodString;
1943
+ catalog_name: z.ZodOptional<z.ZodString>;
1944
+ status: z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
1945
+ mode: z.ZodEnum<["batch", "streaming"]>;
1946
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
1947
+ total_count: z.ZodNumber;
1948
+ synced_count: z.ZodNumber;
1949
+ vectorized_count: z.ZodNumber;
1950
+ synced_mark: z.ZodString;
1951
+ error_msg: z.ZodOptional<z.ZodString>;
1952
+ creator: z.ZodObject<{
1953
+ id: z.ZodString;
1954
+ name: z.ZodOptional<z.ZodString>;
1955
+ type: z.ZodString;
1956
+ }, "strip", z.ZodTypeAny, {
1957
+ id: string;
1958
+ type: string;
1959
+ name?: string | undefined;
1960
+ }, {
1961
+ id: string;
1962
+ type: string;
1963
+ name?: string | undefined;
1964
+ }>;
1965
+ create_time: z.ZodNumber;
1966
+ update_time: z.ZodNumber;
1967
+ index_health: z.ZodOptional<z.ZodObject<{
1968
+ embedding: z.ZodString;
1969
+ fulltext: z.ZodString;
1970
+ usable: z.ZodBoolean;
1971
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1972
+ embedding: z.ZodString;
1973
+ fulltext: z.ZodString;
1974
+ usable: z.ZodBoolean;
1975
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1976
+ embedding: z.ZodString;
1977
+ fulltext: z.ZodString;
1978
+ usable: z.ZodBoolean;
1979
+ }, z.ZodTypeAny, "passthrough">>>;
1980
+ }, z.ZodTypeAny, "passthrough">>, "many">;
1981
+ total_count: z.ZodNumber;
1982
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1983
+ entries: z.ZodArray<z.ZodObject<{
1984
+ id: z.ZodString;
1985
+ resource_id: z.ZodString;
1986
+ resource_name: z.ZodOptional<z.ZodString>;
1987
+ catalog_id: z.ZodString;
1988
+ catalog_name: z.ZodOptional<z.ZodString>;
1989
+ status: z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
1990
+ mode: z.ZodEnum<["batch", "streaming"]>;
1991
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
1992
+ total_count: z.ZodNumber;
1993
+ synced_count: z.ZodNumber;
1994
+ vectorized_count: z.ZodNumber;
1995
+ synced_mark: z.ZodString;
1996
+ error_msg: z.ZodOptional<z.ZodString>;
1997
+ creator: z.ZodObject<{
1998
+ id: z.ZodString;
1999
+ name: z.ZodOptional<z.ZodString>;
2000
+ type: z.ZodString;
2001
+ }, "strip", z.ZodTypeAny, {
2002
+ id: string;
2003
+ type: string;
2004
+ name?: string | undefined;
2005
+ }, {
2006
+ id: string;
2007
+ type: string;
2008
+ name?: string | undefined;
2009
+ }>;
2010
+ create_time: z.ZodNumber;
2011
+ update_time: z.ZodNumber;
2012
+ index_health: z.ZodOptional<z.ZodObject<{
2013
+ embedding: z.ZodString;
2014
+ fulltext: z.ZodString;
2015
+ usable: z.ZodBoolean;
2016
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2017
+ embedding: z.ZodString;
2018
+ fulltext: z.ZodString;
2019
+ usable: z.ZodBoolean;
2020
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2021
+ embedding: z.ZodString;
2022
+ fulltext: z.ZodString;
2023
+ usable: z.ZodBoolean;
2024
+ }, z.ZodTypeAny, "passthrough">>>;
2025
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2026
+ id: z.ZodString;
2027
+ resource_id: z.ZodString;
2028
+ resource_name: z.ZodOptional<z.ZodString>;
2029
+ catalog_id: z.ZodString;
2030
+ catalog_name: z.ZodOptional<z.ZodString>;
2031
+ status: z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
2032
+ mode: z.ZodEnum<["batch", "streaming"]>;
2033
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
2034
+ total_count: z.ZodNumber;
2035
+ synced_count: z.ZodNumber;
2036
+ vectorized_count: z.ZodNumber;
2037
+ synced_mark: z.ZodString;
2038
+ error_msg: z.ZodOptional<z.ZodString>;
2039
+ creator: z.ZodObject<{
2040
+ id: z.ZodString;
2041
+ name: z.ZodOptional<z.ZodString>;
2042
+ type: z.ZodString;
2043
+ }, "strip", z.ZodTypeAny, {
2044
+ id: string;
2045
+ type: string;
2046
+ name?: string | undefined;
2047
+ }, {
2048
+ id: string;
2049
+ type: string;
2050
+ name?: string | undefined;
2051
+ }>;
2052
+ create_time: z.ZodNumber;
2053
+ update_time: z.ZodNumber;
2054
+ index_health: z.ZodOptional<z.ZodObject<{
2055
+ embedding: z.ZodString;
2056
+ fulltext: z.ZodString;
2057
+ usable: z.ZodBoolean;
2058
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2059
+ embedding: z.ZodString;
2060
+ fulltext: z.ZodString;
2061
+ usable: z.ZodBoolean;
2062
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2063
+ embedding: z.ZodString;
2064
+ fulltext: z.ZodString;
2065
+ usable: z.ZodBoolean;
2066
+ }, z.ZodTypeAny, "passthrough">>>;
2067
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2068
+ id: z.ZodString;
2069
+ resource_id: z.ZodString;
2070
+ resource_name: z.ZodOptional<z.ZodString>;
2071
+ catalog_id: z.ZodString;
2072
+ catalog_name: z.ZodOptional<z.ZodString>;
2073
+ status: z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
2074
+ mode: z.ZodEnum<["batch", "streaming"]>;
2075
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
2076
+ total_count: z.ZodNumber;
2077
+ synced_count: z.ZodNumber;
2078
+ vectorized_count: z.ZodNumber;
2079
+ synced_mark: z.ZodString;
2080
+ error_msg: z.ZodOptional<z.ZodString>;
2081
+ creator: z.ZodObject<{
2082
+ id: z.ZodString;
2083
+ name: z.ZodOptional<z.ZodString>;
2084
+ type: z.ZodString;
2085
+ }, "strip", z.ZodTypeAny, {
2086
+ id: string;
2087
+ type: string;
2088
+ name?: string | undefined;
2089
+ }, {
2090
+ id: string;
2091
+ type: string;
2092
+ name?: string | undefined;
2093
+ }>;
2094
+ create_time: z.ZodNumber;
2095
+ update_time: z.ZodNumber;
2096
+ index_health: z.ZodOptional<z.ZodObject<{
2097
+ embedding: z.ZodString;
2098
+ fulltext: z.ZodString;
2099
+ usable: z.ZodBoolean;
2100
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2101
+ embedding: z.ZodString;
2102
+ fulltext: z.ZodString;
2103
+ usable: z.ZodBoolean;
2104
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2105
+ embedding: z.ZodString;
2106
+ fulltext: z.ZodString;
2107
+ usable: z.ZodBoolean;
2108
+ }, z.ZodTypeAny, "passthrough">>>;
2109
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2110
+ total_count: z.ZodNumber;
2111
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2112
+ entries: z.ZodArray<z.ZodObject<{
2113
+ id: z.ZodString;
2114
+ resource_id: z.ZodString;
2115
+ resource_name: z.ZodOptional<z.ZodString>;
2116
+ catalog_id: z.ZodString;
2117
+ catalog_name: z.ZodOptional<z.ZodString>;
2118
+ status: z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
2119
+ mode: z.ZodEnum<["batch", "streaming"]>;
2120
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
2121
+ total_count: z.ZodNumber;
2122
+ synced_count: z.ZodNumber;
2123
+ vectorized_count: z.ZodNumber;
2124
+ synced_mark: z.ZodString;
2125
+ error_msg: z.ZodOptional<z.ZodString>;
2126
+ creator: z.ZodObject<{
2127
+ id: z.ZodString;
2128
+ name: z.ZodOptional<z.ZodString>;
2129
+ type: z.ZodString;
2130
+ }, "strip", z.ZodTypeAny, {
2131
+ id: string;
2132
+ type: string;
2133
+ name?: string | undefined;
2134
+ }, {
2135
+ id: string;
2136
+ type: string;
2137
+ name?: string | undefined;
2138
+ }>;
2139
+ create_time: z.ZodNumber;
2140
+ update_time: z.ZodNumber;
2141
+ index_health: z.ZodOptional<z.ZodObject<{
2142
+ embedding: z.ZodString;
2143
+ fulltext: z.ZodString;
2144
+ usable: z.ZodBoolean;
2145
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2146
+ embedding: z.ZodString;
2147
+ fulltext: z.ZodString;
2148
+ usable: z.ZodBoolean;
2149
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2150
+ embedding: z.ZodString;
2151
+ fulltext: z.ZodString;
2152
+ usable: z.ZodBoolean;
2153
+ }, z.ZodTypeAny, "passthrough">>>;
2154
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2155
+ id: z.ZodString;
2156
+ resource_id: z.ZodString;
2157
+ resource_name: z.ZodOptional<z.ZodString>;
2158
+ catalog_id: z.ZodString;
2159
+ catalog_name: z.ZodOptional<z.ZodString>;
2160
+ status: z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
2161
+ mode: z.ZodEnum<["batch", "streaming"]>;
2162
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
2163
+ total_count: z.ZodNumber;
2164
+ synced_count: z.ZodNumber;
2165
+ vectorized_count: z.ZodNumber;
2166
+ synced_mark: z.ZodString;
2167
+ error_msg: z.ZodOptional<z.ZodString>;
2168
+ creator: z.ZodObject<{
2169
+ id: z.ZodString;
2170
+ name: z.ZodOptional<z.ZodString>;
2171
+ type: z.ZodString;
2172
+ }, "strip", z.ZodTypeAny, {
2173
+ id: string;
2174
+ type: string;
2175
+ name?: string | undefined;
2176
+ }, {
2177
+ id: string;
2178
+ type: string;
2179
+ name?: string | undefined;
2180
+ }>;
2181
+ create_time: z.ZodNumber;
2182
+ update_time: z.ZodNumber;
2183
+ index_health: z.ZodOptional<z.ZodObject<{
2184
+ embedding: z.ZodString;
2185
+ fulltext: z.ZodString;
2186
+ usable: z.ZodBoolean;
2187
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2188
+ embedding: z.ZodString;
2189
+ fulltext: z.ZodString;
2190
+ usable: z.ZodBoolean;
2191
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2192
+ embedding: z.ZodString;
2193
+ fulltext: z.ZodString;
2194
+ usable: z.ZodBoolean;
2195
+ }, z.ZodTypeAny, "passthrough">>>;
2196
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2197
+ id: z.ZodString;
2198
+ resource_id: z.ZodString;
2199
+ resource_name: z.ZodOptional<z.ZodString>;
2200
+ catalog_id: z.ZodString;
2201
+ catalog_name: z.ZodOptional<z.ZodString>;
2202
+ status: z.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
2203
+ mode: z.ZodEnum<["batch", "streaming"]>;
2204
+ execute_type: z.ZodOptional<z.ZodEnum<["incremental", "full"]>>;
2205
+ total_count: z.ZodNumber;
2206
+ synced_count: z.ZodNumber;
2207
+ vectorized_count: z.ZodNumber;
2208
+ synced_mark: z.ZodString;
2209
+ error_msg: z.ZodOptional<z.ZodString>;
2210
+ creator: z.ZodObject<{
2211
+ id: z.ZodString;
2212
+ name: z.ZodOptional<z.ZodString>;
2213
+ type: z.ZodString;
2214
+ }, "strip", z.ZodTypeAny, {
2215
+ id: string;
2216
+ type: string;
2217
+ name?: string | undefined;
2218
+ }, {
2219
+ id: string;
2220
+ type: string;
2221
+ name?: string | undefined;
2222
+ }>;
2223
+ create_time: z.ZodNumber;
2224
+ update_time: z.ZodNumber;
2225
+ index_health: z.ZodOptional<z.ZodObject<{
2226
+ embedding: z.ZodString;
2227
+ fulltext: z.ZodString;
2228
+ usable: z.ZodBoolean;
2229
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2230
+ embedding: z.ZodString;
2231
+ fulltext: z.ZodString;
2232
+ usable: z.ZodBoolean;
2233
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2234
+ embedding: z.ZodString;
2235
+ fulltext: z.ZodString;
2236
+ usable: z.ZodBoolean;
2237
+ }, z.ZodTypeAny, "passthrough">>>;
2238
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2239
+ total_count: z.ZodNumber;
2240
+ }, z.ZodTypeAny, "passthrough">>;
2241
+ type ListBuildTasksResponse = z.infer<typeof ListBuildTasksResponse>;
1617
2242
  interface ListBuildTasksOptions {
1618
2243
  limit?: number;
1619
2244
  offset?: number;
1620
2245
  resourceId?: string;
1621
2246
  catalogId?: string;
1622
- status?: string | string[];
2247
+ status?: BuildTaskStatus | BuildTaskStatus[];
1623
2248
  active?: boolean;
1624
2249
  mode?: BuildMode;
1625
- orderBy?: "default" | "created_at" | "updated_at" | "status" | "mode";
2250
+ orderBy?: "created_at" | "updated_at";
1626
2251
  order?: "asc" | "desc";
1627
2252
  }
1628
2253
  interface DeleteBuildTasksOptions {
@@ -1671,7 +2296,7 @@ interface ListCatalogsOptions {
1671
2296
  tag?: string;
1672
2297
  type?: "physical" | "logical" | string;
1673
2298
  enabled?: boolean;
1674
- healthCheckStatus?: string;
2299
+ healthCheckStatus?: CatalogHealthCheckStatus;
1675
2300
  includeExtensions?: boolean;
1676
2301
  includeExtensionKeys?: string;
1677
2302
  extensionPairs?: Array<{
@@ -1685,27 +2310,64 @@ interface ListCatalogsOptions {
1685
2310
  interface CreateCatalogRequest {
1686
2311
  name: string;
1687
2312
  connectorType: string;
1688
- connectorConfig: unknown;
2313
+ connectorConfig: Record<string, unknown>;
1689
2314
  tags?: string[];
1690
2315
  description?: string;
1691
2316
  enabled?: boolean;
1692
2317
  id?: string;
1693
2318
  internal?: boolean;
1694
2319
  extensions?: Record<string, string>;
2320
+ healthCheckSchedule?: CatalogHealthCheckScheduleRequest | null;
2321
+ }
2322
+ /** Full PUT /catalogs/{id} body; the path id is injected by the API client. */
2323
+ interface UpdateCatalogRequest {
2324
+ name: string;
2325
+ connectorType: string;
2326
+ enabled: boolean;
2327
+ connectorConfig?: Record<string, unknown>;
2328
+ tags?: string[];
2329
+ description?: string;
2330
+ extensions?: Record<string, string>;
1695
2331
  }
1696
2332
 
1697
2333
  declare function vega(ctx: RequestContext): {
1698
2334
  catalogs: (opts?: ListCatalogsOptions) => Promise<unknown>;
1699
2335
  getCatalog: (id: string) => Promise<unknown>;
1700
- createCatalog: (req: CreateCatalogRequest) => Promise<unknown>;
1701
- updateCatalog: (id: string, req: Partial<CreateCatalogRequest>) => Promise<unknown>;
2336
+ createCatalog: (req: CreateCatalogRequest, opts?: CatalogWriteOptions) => Promise<unknown>;
2337
+ updateCatalog: (id: string, req: UpdateCatalogRequest, opts?: CatalogWriteOptions) => Promise<unknown>;
1702
2338
  enableCatalog: (id: string) => Promise<unknown>;
1703
2339
  disableCatalog: (id: string) => Promise<unknown>;
1704
2340
  deleteCatalog: (id: string) => Promise<unknown>;
1705
- testCatalogConnection: (id: string) => Promise<unknown>;
2341
+ testCatalogConnectionConfig: (req: CatalogConnectionTestRequest) => Promise<zod.objectOutputType<{
2342
+ success: zod.ZodBoolean;
2343
+ message: zod.ZodOptional<zod.ZodString>;
2344
+ }, zod.ZodTypeAny, "passthrough">>;
2345
+ testCatalogConnection: (id: string) => Promise<zod.objectOutputType<{
2346
+ success: zod.ZodBoolean;
2347
+ message: zod.ZodOptional<zod.ZodString>;
2348
+ }, zod.ZodTypeAny, "passthrough">>;
2349
+ catalogHealthCheckSchedule: (id: string) => Promise<zod.objectOutputType<{
2350
+ catalog_id: zod.ZodString;
2351
+ mode: zod.ZodEnum<["inherit", "enabled", "disabled"]>;
2352
+ cron_expr: zod.ZodOptional<zod.ZodString>;
2353
+ last_run: zod.ZodNumber;
2354
+ next_run: zod.ZodNumber;
2355
+ }, zod.ZodTypeAny, "passthrough">>;
2356
+ updateCatalogHealthCheckSchedule: (id: string, req: CatalogHealthCheckScheduleRequest) => Promise<zod.objectOutputType<{
2357
+ catalog_id: zod.ZodString;
2358
+ mode: zod.ZodEnum<["inherit", "enabled", "disabled"]>;
2359
+ cron_expr: zod.ZodOptional<zod.ZodString>;
2360
+ last_run: zod.ZodNumber;
2361
+ next_run: zod.ZodNumber;
2362
+ }, zod.ZodTypeAny, "passthrough">>;
1706
2363
  discoverCatalog: (id: string, wait?: boolean) => Promise<unknown>;
1707
2364
  catalogResources: (id: string, category?: string, limit?: number, offset?: number) => Promise<unknown>;
1708
- catalogHealth: (ids: string[]) => Promise<unknown>;
2365
+ catalogHealth: (id: string) => Promise<zod.objectOutputType<{
2366
+ id: zod.ZodString;
2367
+ health_check_status: zod.ZodEnum<["healthy", "degraded", "unhealthy", "offline", "unchecked"]>;
2368
+ last_check_time: zod.ZodOptional<zod.ZodNumber>;
2369
+ health_check_result: zod.ZodOptional<zod.ZodString>;
2370
+ }, zod.ZodTypeAny, "passthrough">>;
1709
2371
  connectorTypes: () => Promise<unknown>;
1710
2372
  connectorType: (type: string) => Promise<unknown>;
1711
2373
  /** Run SQL / OpenSearch DSL directly against a data source. */
@@ -1720,13 +2382,14 @@ declare function vega(ctx: RequestContext): {
1720
2382
  id: zod.ZodString;
1721
2383
  resource_id: zod.ZodOptional<zod.ZodString>;
1722
2384
  mode: zod.ZodOptional<zod.ZodEnum<["batch", "streaming"]>>;
1723
- status: zod.ZodOptional<zod.ZodString>;
2385
+ status: zod.ZodOptional<zod.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>>;
1724
2386
  state: zod.ZodOptional<zod.ZodString>;
1725
2387
  total_count: zod.ZodOptional<zod.ZodNumber>;
1726
2388
  synced_count: zod.ZodOptional<zod.ZodNumber>;
1727
2389
  vectorized_count: zod.ZodOptional<zod.ZodNumber>;
1728
2390
  index_config: zod.ZodOptional<zod.ZodUnknown>;
1729
2391
  catalog_id: zod.ZodOptional<zod.ZodString>;
2392
+ execute_type: zod.ZodOptional<zod.ZodEnum<["incremental", "full"]>>;
1730
2393
  index_health: zod.ZodOptional<zod.ZodObject<{
1731
2394
  embedding: zod.ZodString;
1732
2395
  fulltext: zod.ZodString;
@@ -1741,7 +2404,136 @@ declare function vega(ctx: RequestContext): {
1741
2404
  usable: zod.ZodBoolean;
1742
2405
  }, zod.ZodTypeAny, "passthrough">>>;
1743
2406
  }, zod.ZodTypeAny, "passthrough">>;
1744
- buildTasks: (opts?: ListBuildTasksOptions) => Promise<unknown>;
2407
+ buildTasks: (opts?: ListBuildTasksOptions) => Promise<zod.objectOutputType<{
2408
+ entries: zod.ZodArray<zod.ZodObject<{
2409
+ id: zod.ZodString;
2410
+ resource_id: zod.ZodString;
2411
+ resource_name: zod.ZodOptional<zod.ZodString>;
2412
+ catalog_id: zod.ZodString;
2413
+ catalog_name: zod.ZodOptional<zod.ZodString>;
2414
+ status: zod.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
2415
+ mode: zod.ZodEnum<["batch", "streaming"]>;
2416
+ execute_type: zod.ZodOptional<zod.ZodEnum<["incremental", "full"]>>;
2417
+ total_count: zod.ZodNumber;
2418
+ synced_count: zod.ZodNumber;
2419
+ vectorized_count: zod.ZodNumber;
2420
+ synced_mark: zod.ZodString;
2421
+ error_msg: zod.ZodOptional<zod.ZodString>;
2422
+ creator: zod.ZodObject<{
2423
+ id: zod.ZodString;
2424
+ name: zod.ZodOptional<zod.ZodString>;
2425
+ type: zod.ZodString;
2426
+ }, "strip", zod.ZodTypeAny, {
2427
+ id: string;
2428
+ type: string;
2429
+ name?: string | undefined;
2430
+ }, {
2431
+ id: string;
2432
+ type: string;
2433
+ name?: string | undefined;
2434
+ }>;
2435
+ create_time: zod.ZodNumber;
2436
+ update_time: zod.ZodNumber;
2437
+ index_health: zod.ZodOptional<zod.ZodObject<{
2438
+ embedding: zod.ZodString;
2439
+ fulltext: zod.ZodString;
2440
+ usable: zod.ZodBoolean;
2441
+ }, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{
2442
+ embedding: zod.ZodString;
2443
+ fulltext: zod.ZodString;
2444
+ usable: zod.ZodBoolean;
2445
+ }, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{
2446
+ embedding: zod.ZodString;
2447
+ fulltext: zod.ZodString;
2448
+ usable: zod.ZodBoolean;
2449
+ }, zod.ZodTypeAny, "passthrough">>>;
2450
+ }, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{
2451
+ id: zod.ZodString;
2452
+ resource_id: zod.ZodString;
2453
+ resource_name: zod.ZodOptional<zod.ZodString>;
2454
+ catalog_id: zod.ZodString;
2455
+ catalog_name: zod.ZodOptional<zod.ZodString>;
2456
+ status: zod.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
2457
+ mode: zod.ZodEnum<["batch", "streaming"]>;
2458
+ execute_type: zod.ZodOptional<zod.ZodEnum<["incremental", "full"]>>;
2459
+ total_count: zod.ZodNumber;
2460
+ synced_count: zod.ZodNumber;
2461
+ vectorized_count: zod.ZodNumber;
2462
+ synced_mark: zod.ZodString;
2463
+ error_msg: zod.ZodOptional<zod.ZodString>;
2464
+ creator: zod.ZodObject<{
2465
+ id: zod.ZodString;
2466
+ name: zod.ZodOptional<zod.ZodString>;
2467
+ type: zod.ZodString;
2468
+ }, "strip", zod.ZodTypeAny, {
2469
+ id: string;
2470
+ type: string;
2471
+ name?: string | undefined;
2472
+ }, {
2473
+ id: string;
2474
+ type: string;
2475
+ name?: string | undefined;
2476
+ }>;
2477
+ create_time: zod.ZodNumber;
2478
+ update_time: zod.ZodNumber;
2479
+ index_health: zod.ZodOptional<zod.ZodObject<{
2480
+ embedding: zod.ZodString;
2481
+ fulltext: zod.ZodString;
2482
+ usable: zod.ZodBoolean;
2483
+ }, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{
2484
+ embedding: zod.ZodString;
2485
+ fulltext: zod.ZodString;
2486
+ usable: zod.ZodBoolean;
2487
+ }, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{
2488
+ embedding: zod.ZodString;
2489
+ fulltext: zod.ZodString;
2490
+ usable: zod.ZodBoolean;
2491
+ }, zod.ZodTypeAny, "passthrough">>>;
2492
+ }, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{
2493
+ id: zod.ZodString;
2494
+ resource_id: zod.ZodString;
2495
+ resource_name: zod.ZodOptional<zod.ZodString>;
2496
+ catalog_id: zod.ZodString;
2497
+ catalog_name: zod.ZodOptional<zod.ZodString>;
2498
+ status: zod.ZodEnum<["init", "running", "stopping", "stopped", "completed", "failed"]>;
2499
+ mode: zod.ZodEnum<["batch", "streaming"]>;
2500
+ execute_type: zod.ZodOptional<zod.ZodEnum<["incremental", "full"]>>;
2501
+ total_count: zod.ZodNumber;
2502
+ synced_count: zod.ZodNumber;
2503
+ vectorized_count: zod.ZodNumber;
2504
+ synced_mark: zod.ZodString;
2505
+ error_msg: zod.ZodOptional<zod.ZodString>;
2506
+ creator: zod.ZodObject<{
2507
+ id: zod.ZodString;
2508
+ name: zod.ZodOptional<zod.ZodString>;
2509
+ type: zod.ZodString;
2510
+ }, "strip", zod.ZodTypeAny, {
2511
+ id: string;
2512
+ type: string;
2513
+ name?: string | undefined;
2514
+ }, {
2515
+ id: string;
2516
+ type: string;
2517
+ name?: string | undefined;
2518
+ }>;
2519
+ create_time: zod.ZodNumber;
2520
+ update_time: zod.ZodNumber;
2521
+ index_health: zod.ZodOptional<zod.ZodObject<{
2522
+ embedding: zod.ZodString;
2523
+ fulltext: zod.ZodString;
2524
+ usable: zod.ZodBoolean;
2525
+ }, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{
2526
+ embedding: zod.ZodString;
2527
+ fulltext: zod.ZodString;
2528
+ usable: zod.ZodBoolean;
2529
+ }, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{
2530
+ embedding: zod.ZodString;
2531
+ fulltext: zod.ZodString;
2532
+ usable: zod.ZodBoolean;
2533
+ }, zod.ZodTypeAny, "passthrough">>>;
2534
+ }, zod.ZodTypeAny, "passthrough">>, "many">;
2535
+ total_count: zod.ZodNumber;
2536
+ }, zod.ZodTypeAny, "passthrough">>;
1745
2537
  deleteBuildTasks: (ids: string[], opts?: DeleteBuildTasksOptions) => Promise<unknown>;
1746
2538
  startBuildTask: (taskId: string, opts?: {
1747
2539
  reset?: boolean;
@@ -1782,6 +2574,15 @@ declare class HttpError extends Error {
1782
2574
  readonly hint?: string;
1783
2575
  constructor(status: number, statusText: string, body: string, hint?: string);
1784
2576
  }
2577
+ /**
2578
+ * Raised when an MCP tool answers with `isError`. The transport call succeeded,
2579
+ * so this is not an {@link HttpError} — but the server's error `code` is what
2580
+ * decides whether a caller can recover, so it travels with the error.
2581
+ */
2582
+ declare class ToolError extends Error {
2583
+ readonly code?: string;
2584
+ constructor(message: string, code?: string);
2585
+ }
1785
2586
  /** Raised for bad CLI/SDK input before any request is made. */
1786
2587
  declare class InputError extends Error {
1787
2588
  constructor(message: string);
@@ -1940,6 +2741,33 @@ declare namespace auth {
1940
2741
  export { type auth_AuthStatus as AuthStatus, type auth_PlatformListItem as PlatformListItem, type auth_WhoamiResult as WhoamiResult, auth_attachToken as attachToken, auth_currentToken as currentToken, auth_currentTokenFresh as currentTokenFresh, auth_deletePlatform as deletePlatform, auth_exportCreds as exportCreds, auth_hostOf as hostOf, auth_listPlatforms as listPlatforms, auth_logout as logout, auth_status as status, auth_switchUser as switchUser, auth_use as use, auth_userIdFromToken as userIdFromToken, auth_usersOf as usersOf, auth_whoami as whoami };
1941
2742
  }
1942
2743
 
2744
+ /**
2745
+ * Directory views over a skill's file manifest.
2746
+ *
2747
+ * The backend manifest is a flat list of archive-relative paths — registration
2748
+ * drops zip directory entries — so the folder structure here is inferred from
2749
+ * the paths themselves. One consequence is inherent: a directory that holds no
2750
+ * files cannot appear, because nothing in the manifest mentions it.
2751
+ */
2752
+
2753
+ interface SkillDirChild {
2754
+ name: string;
2755
+ type: "dir";
2756
+ /** Files anywhere beneath this directory. */
2757
+ files: number;
2758
+ /** Total bytes beneath this directory. */
2759
+ size: number;
2760
+ }
2761
+ interface SkillFileChild {
2762
+ name: string;
2763
+ type: "file";
2764
+ relPath: string;
2765
+ fileType?: string;
2766
+ size?: number;
2767
+ mime?: string;
2768
+ }
2769
+ type SkillChild = SkillDirChild | SkillFileChild;
2770
+
1943
2771
  interface RequestInitEx {
1944
2772
  method?: string;
1945
2773
  /** JSON body — serialized and Content-Type set automatically. */
@@ -1951,9 +2779,16 @@ interface RequestInitEx {
1951
2779
  redirect?: "follow" | "error" | "manual";
1952
2780
  /** Per-request timeout; defaults to 30s. */
1953
2781
  timeoutMs?: number;
2782
+ /**
2783
+ * Raise undici's 300s response-header deadline for this request.
2784
+ *
2785
+ * Needed by any endpoint that blocks until its work finishes — it sends no
2786
+ * headers until then, so `timeoutMs` alone cannot buy more than 300s.
2787
+ */
2788
+ headersTimeoutMs?: number;
1954
2789
  }
1955
2790
  declare function request<T = unknown>(ctx: RequestContext, path: string, init?: RequestInitEx): Promise<T>;
1956
2791
 
1957
2792
  declare function resolveContext(opts?: ClientOptions): RequestContext;
1958
2793
 
1959
- export { type ActionHandle, type ActionResultInput, type ActionSummary, type BknClient, BuildMode, BuildTask, type BusinessEvidenceEventType, type BusinessGraphResponse, type BusinessRefInput, type BusinessRefsInput, type ClaimInput, type ClientOptions, CreateBuildTaskRequest, DEFAULT_BUSINESS_DOMAIN, DEFAULT_LIST_LIMIT, DEFAULT_QUERY_LIMIT, type DslRawQueryRequest, type EvidenceArtifact, type EvidenceArtifactIngestResponse, type EvidenceArtifactType, type EvidenceChainResponse, type EvidenceEvent, type EvidenceIngestRequest, type EvidenceIngestResponse, type EvidenceRefInput, type EvidenceRefsInput, type EvidenceTraceContext, type ExecuteActionInput, type GraphPage, HttpError, InputError, type InteractionInput, type InteractionSummary, type OperationEventPayloadMap, type OperationEventType, type OperationInput, type QueryPagingMode, type RawQueryContinuationRequest, type RawQueryPaging, type RawQueryRequest, type RecommendActionInput, type RequestContext, type RequestSummary, type RequestSummaryQuery, type SnapshotPreviewResponse, type SqlRawQueryRequest, type SummaryPage, type TraceExecutionSummary, type TraceGraphEdge, type TraceGraphNode, type TraceGraphResponse, type TraceQueryOptions, type TraceScope, TraceSession, type TraceSessionOptions, type VisibilitySummary, admin, agents, auth, context, createClient, dataflows, kn, models, request, resolveContext, resources, skills, toolboxes, trace, vega };
2794
+ export { type ActionSummary, type BknBusinessContext, type BknClient, type BknContext, BuildMode, BuildTask, BuildTaskSummary, type CatalogConnectionTestRequest, CatalogConnectionTestResult, CatalogHealthCheckSchedule, CatalogHealthCheckScheduleMode, type CatalogHealthCheckScheduleRequest, CatalogHealthCheckStatus, CatalogHealthStatus, type CatalogWriteOptions, type ClaimSupport, type ClientOptions, type CloseConversationInput, type ConversationPage, type ConversationStrategy, CreateBuildTaskRequest, type CreateCatalogRequest, type CreateNewConversationGenerationInput, DEFAULT_BUSINESS_DOMAIN, DEFAULT_LIST_LIMIT, DEFAULT_QUERY_LIMIT, type DslRawQueryRequest, type EnsureConversationInput, type EnsureOperationInput, type EvidenceDurability, type EvidenceReference, type ExecuteSkillOptions, type ExpectedOperation, type ExpectedReceipt, type FinishOperationAttemptInput, type GraphPage, HttpError, InputError, type InteractionCompletionInput, type LifecycleBusinessRef, type LifecycleError, type LifecycleErrorCode, type LifecycleErrorEnvelope, type LifecycleOwner, type ListBuildTasksOptions, ListBuildTasksResponse, type ListConversationsQuery, type ManagedClaim, type ManagedCompletionInput, type ManagedConversation, type ManagedInteraction, type ManagedInteractionScope, type ManagedOperation, type ManagedOperationCall, type ManagedOperationExecution, type ManagedOperationInput, type ManagedOperationResult, type ManagedToolResult, ManagedTrace, type ManagedTraceOptions, type OperationReceipt, type OperationResult, type QueryPagingMode, type RawQueryContinuationRequest, type RawQueryPaging, type RawQueryRequest, type RequestContext, type ResumeConversationInput, type RetryOperationAttemptInput, type SkillChild, type SkillContentResponse, type SkillDirChild, type SkillExecutionResult, type SkillFileChild, type SkillFileEntry, type SkillReadFileResponse, type SkillResponseMode, type SkillView, type SkillViewOptions, type SqlRawQueryRequest, type StartInteractionInput, type SupportCandidate, type ToolCallOptions, ToolError, type TraceExecutionSummary, type TraceGraphEdge, type TraceGraphNode, type TraceGraphResponse, type TraceLifecycleApi, type UpdateCatalogRequest, type VisibilitySummary, admin, agents, auth, context, createClient, dataflows, kn, models, releaseLifecycleSessions, request, resolveContext, resources, skills, toolboxes, trace, traceLifecycleApi, vega };