@work-shape/catalyst-asset-schemas 0.8.0-rc.4 → 0.8.0-rc.6

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 (3) hide show
  1. package/dist/index.d.ts +1512 -24
  2. package/dist/index.js +929 -122
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -4,6 +4,8 @@ import { z } from 'zod';
4
4
  * The shape of an agent and of a skill as a file holds it. These are the public half of the
5
5
  * asset model: a working copy, the command line tool and the instance read the same types.
6
6
  */
7
+ /** The configuration rights reported for an asset; publish applies to draft/published kinds. */
8
+ declare const ASSET_ACCESS_VERBS: readonly ["read", "write", "delete", "publish"];
7
9
  declare const localeCodes: readonly ["en", "de"];
8
10
  type LocaleCode = (typeof localeCodes)[number];
9
11
  type LocalizedStringConfig = string | {
@@ -128,6 +130,8 @@ interface SkillResourceConfig {
128
130
  mediaType: SkillResourceMediaType;
129
131
  content: string;
130
132
  }
133
+ /** Ordered from the narrowest App audience to the widest. */
134
+ declare const APP_AUDIENCES: readonly ["self", "workspace", "instance"];
131
135
 
132
136
  /**
133
137
  * The values the HTTP contract of an instance is written with: scopes, actions, error codes
@@ -141,12 +145,8 @@ declare const FIRST_PARTY_AUTH_SCOPES: readonly ["*", "me:read", "me:delete", "c
141
145
  type ChatSessionAuthScope = (typeof CHAT_SESSION_AUTH_SCOPES)[number];
142
146
  type FirstPartyAuthScope = (typeof FIRST_PARTY_AUTH_SCOPES)[number];
143
147
  type OperationScope = Exclude<FirstPartyAuthScope, "*">;
144
- declare const ACTIONS: readonly ["agent.read", "agent.write", "agent.publish", "agent.delete", "skill.read", "skill.write", "skill.delete", "skill.approve", "connection.read", "connection.use", "connection.write", "connection.delete", "connection.approve", "app.read", "app.write", "app.publish", "app.approve", "app.delete", "app.use", "workflow.read", "workflow.write", "workflow.publish", "workflow.approve", "workflow.delete", "workflow.use", "workflow.read_run_data", "data_store.read", "data_store.write", "data_store.publish", "data_store.delete", "data_store.insert", "data_store.execute", "knowledge_base.read", "knowledge_base.write", "knowledge_base.publish", "knowledge_base.delete", "knowledge_base.use", "guardrail.read", "guardrail.write", "guardrail.publish", "guardrail.delete", "operations.approve", "users.manage", "usage.view", "audit.view", "api_access.manage", "service_principals.manage", "agent_models.manage", "assets.release"];
148
+ declare const ACTIONS: readonly ["agent.read", "agent.write", "agent.publish", "agent.delete", "skill.read", "skill.write", "skill.delete", "skill.approve", "connection.read", "connection.use", "connection.write", "connection.delete", "connection.approve", "app.read", "app.write", "app.publish", "app.approve", "app.delete", "app.use", "workflow.read", "workflow.write", "workflow.publish", "workflow.approve", "workflow.delete", "workflow.use", "workflow.read_run_data", "data_store.read", "data_store.write", "data_store.publish", "data_store.delete", "data_store.insert", "data_store.execute", "data_store.records", "knowledge_base.read", "knowledge_base.write", "knowledge_base.publish", "knowledge_base.delete", "knowledge_base.use", "mail_sender.use", "guardrail.read", "guardrail.write", "guardrail.publish", "guardrail.delete", "operations.approve", "feedback.review", "users.manage", "usage.view", "audit.view", "api_access.manage", "service_principals.manage", "agent_models.manage", "assets.release", "builder", "publisher"];
145
149
  type PlatformAction = (typeof ACTIONS)[number];
146
- /** A Namespace prefix: lowercase words joined by single hyphens, ending in one hyphen. */
147
- declare const NAMESPACE_PREFIX_PATTERN: RegExp;
148
- declare const NAMESPACE_PREFIX_MIN_LENGTH = 2;
149
- declare const NAMESPACE_PREFIX_MAX_LENGTH = 32;
150
150
  type AppErrorCode = (typeof APP_ERROR_CODES)[number];
151
151
  /** The HTTP status every error code answers with. */
152
152
  declare const APP_ERROR_STATUS_CODES: Record<AppErrorCode, number>;
@@ -173,7 +173,7 @@ declare const PROVIDER_CHECK_ERROR_CLASSES: readonly ["unreachable", "timeout",
173
173
  type ProviderCheckErrorClass = (typeof PROVIDER_CHECK_ERROR_CLASSES)[number];
174
174
  /**
175
175
  * The immutable machine name. It is part of every operation name of the Connection
176
- * (`connection.<name>.<operation>`), so it holds no dot. A Namespace prefix fits in front.
176
+ * (`connection.<name>.<operation>`), so it holds no dot.
177
177
  */
178
178
  declare const CONNECTION_NAME_PATTERN: RegExp;
179
179
  declare const CONNECTION_NAME_MAX_LENGTH = 64;
@@ -195,8 +195,16 @@ declare const CONNECTION_HEALTH_STATES: readonly ["unknown", "ok", "failed", "ne
195
195
  type ConnectionHealth = (typeof CONNECTION_HEALTH_STATES)[number];
196
196
  declare const GRANT_HOLDER_KINDS: readonly ["user", "service_principal", "role", "group"];
197
197
  type GrantHolderKind = (typeof GRANT_HOLDER_KINDS)[number];
198
- declare const GRANT_SCOPE_KINDS: readonly ["instance", "workspace", "namespace", "asset"];
198
+ declare const GRANT_SCOPE_KINDS: readonly ["instance", "workspace", "asset"];
199
199
  type GrantScopeKind = (typeof GRANT_SCOPE_KINDS)[number];
200
+ /** Where a role's grant lies: the whole instance, one workspace or one asset. */
201
+ declare const ROLE_GRANT_SCOPE_KINDS: readonly ["instance", "workspace", "asset"];
202
+ type RoleGrantScopeKind = (typeof ROLE_GRANT_SCOPE_KINDS)[number];
203
+ /** What a release did to an action of a built-in role's default that waits for a superadmin. */
204
+ declare const ROLE_PENDING_CHANGES: readonly ["added", "removed"];
205
+ /** A superadmin's decision on a pending action: apply what the release did, or dismiss it. */
206
+ declare const ROLE_PENDING_DECISIONS: readonly ["apply", "dismiss"];
207
+ type RolePendingDecision = (typeof ROLE_PENDING_DECISIONS)[number];
200
208
  declare const GRANT_EFFECTS: readonly ["allow", "deny"];
201
209
  type GrantEffect = (typeof GRANT_EFFECTS)[number];
202
210
  declare const ACCESS_SOURCES: readonly ["role", "legacy_ref", "grant", "membership"];
@@ -209,6 +217,22 @@ declare const ADMINISTERED_USER_STATUSES: readonly ["active", "disabled", "delet
209
217
  type AdministeredUserStatus = (typeof ADMINISTERED_USER_STATUSES)[number];
210
218
  declare const SERVICE_PRINCIPAL_STATUSES: readonly ["active", "disabled"];
211
219
  type ServicePrincipalStatus = (typeof SERVICE_PRINCIPAL_STATUSES)[number];
220
+ /**
221
+ * When the account a Workflow runs as needs a right its definition names. `publish`: the
222
+ * publish is refused without it. `run`: the step that needs it fails when it runs.
223
+ */
224
+ declare const WORKFLOW_RIGHT_NEEDED_FOR: readonly ["publish", "run"];
225
+ /** The revision of a publish's Workflow the rights are read from: the one published, or a live child. */
226
+ declare const WORKFLOW_RIGHTS_REVISIONS: readonly ["draft", "published"];
227
+ /** How the account a Workflow names stands: a principal's status, or no principal of the name. */
228
+ declare const WORKFLOW_RUN_ACCOUNT_STATUSES: readonly ["active", "disabled", "unknown"];
229
+ /**
230
+ * Why a reader cannot give an account a right it lacks. `not_grantable`: nobody can give it to
231
+ * an account here. `not_administrator`: giving needs someone who administers technical
232
+ * accounts. `not_held`: the reader does not hold it there. `account_unavailable`: the account
233
+ * is missing or disabled. `asset_unavailable`: no active asset of the name exists.
234
+ */
235
+ declare const WORKFLOW_RIGHT_REFUSALS: readonly ["not_grantable", "not_administrator", "not_held", "account_unavailable", "asset_unavailable", "not_visible"];
212
236
  declare const SERVICE_PRINCIPAL_PERMISSIONS: readonly ["config_assets.read", "config_assets.release"];
213
237
  type ServicePrincipalPermission = (typeof SERVICE_PRINCIPAL_PERMISSIONS)[number];
214
238
  declare const API_CREDENTIAL_SCOPES: readonly ["config_assets:read", "config_assets:release"];
@@ -396,10 +420,16 @@ type KnowledgeBaseStatus = (typeof KNOWLEDGE_BASE_STATUSES)[number];
396
420
  declare const KNOWLEDGE_DOCUMENT_STATES: readonly ["pending", "indexed", "failed"];
397
421
  type KnowledgeDocumentState = (typeof KNOWLEDGE_DOCUMENT_STATES)[number];
398
422
  /**
399
- * Why a document was not indexed. The first five can also come from the extraction of a PDF
400
- * or DOCX (`KNOWLEDGE_EXTRACTION_FAILURE_CODES` in core); the rest are the index job's own.
423
+ * The largest file a Knowledge Base takes, as document processing takes it. A larger file is
424
+ * refused when it is added, with this limit named.
425
+ */
426
+ declare const KNOWLEDGE_FILE_MAX_BYTES: number;
427
+ /**
428
+ * Why a document was not indexed. The first five and `knowledge_file_too_many_pages` can also
429
+ * come from the extraction of a PDF or DOCX (`KNOWLEDGE_EXTRACTION_FAILURE_CODES` in core); the
430
+ * rest are the index job's own. The list only gains members.
401
431
  */
402
- declare const KNOWLEDGE_DOCUMENT_FAILURE_CODES: readonly ["knowledge_file_format_unsupported", "knowledge_file_over_limit", "knowledge_file_unreadable", "knowledge_file_missing", "knowledge_extraction_failed", "knowledge_file_format_unavailable", "knowledge_text_unreadable", "knowledge_text_empty", "knowledge_index_failed"];
432
+ declare const KNOWLEDGE_DOCUMENT_FAILURE_CODES: readonly ["knowledge_file_format_unsupported", "knowledge_file_over_limit", "knowledge_file_unreadable", "knowledge_file_missing", "knowledge_extraction_failed", "knowledge_file_format_unavailable", "knowledge_text_unreadable", "knowledge_text_empty", "knowledge_index_failed", "knowledge_file_too_many_pages", "knowledge_processor_output_invalid", "knowledge_conversion_timeout"];
403
433
  type KnowledgeDocumentFailureCode = (typeof KNOWLEDGE_DOCUMENT_FAILURE_CODES)[number];
404
434
  /**
405
435
  * Why a `pending` document waits, where it waits for something other than its turn. It goes on
@@ -413,10 +443,10 @@ type KnowledgeDocumentWaitCode = (typeof KNOWLEDGE_DOCUMENT_WAIT_CODES)[number];
413
443
  * recorded with `knowledge_file_over_limit` or `knowledge_file_format_unsupported` and never
414
444
  * fetched. Spec: Synced sources, Contract freezes (SRC-0).
415
445
  */
416
- declare const KNOWLEDGE_SOURCE_FAILURE_CODES: readonly ["knowledge_source_unreachable", "knowledge_source_refused", "knowledge_fetch_failed", "knowledge_source_limit_reached"];
446
+ declare const KNOWLEDGE_SOURCE_FAILURE_CODES: readonly ["knowledge_source_unreachable", "knowledge_source_refused", "knowledge_fetch_failed", "knowledge_source_limit_reached", "knowledge_item_invalid", "knowledge_fetch_not_allowed"];
417
447
  type KnowledgeSourceFailureCode = (typeof KNOWLEDGE_SOURCE_FAILURE_CODES)[number];
418
448
  /** The code a failed item of a synced source carries: a source code, or one it shares with a file added by hand. */
419
- declare const KNOWLEDGE_SOURCE_ITEM_FAILURE_CODES: readonly ["knowledge_source_unreachable", "knowledge_source_refused", "knowledge_fetch_failed", "knowledge_source_limit_reached", "knowledge_file_over_limit", "knowledge_file_format_unsupported"];
449
+ declare const KNOWLEDGE_SOURCE_ITEM_FAILURE_CODES: readonly ["knowledge_source_unreachable", "knowledge_source_refused", "knowledge_fetch_failed", "knowledge_source_limit_reached", "knowledge_item_invalid", "knowledge_fetch_not_allowed", "knowledge_file_over_limit", "knowledge_file_format_unsupported"];
420
450
  type KnowledgeSourceItemFailureCode = (typeof KNOWLEDGE_SOURCE_ITEM_FAILURE_CODES)[number];
421
451
  /**
422
452
  * The state of an item of a synced source as the sync keeps it. It ends at `fetched`: from
@@ -430,7 +460,7 @@ type KnowledgeSourceItemState = (typeof KNOWLEDGE_SOURCE_ITEM_STATES)[number];
430
460
  */
431
461
  declare const KNOWLEDGE_SYNC_MODES: readonly ["initial", "changes", "full"];
432
462
  type KnowledgeSyncMode = (typeof KNOWLEDGE_SYNC_MODES)[number];
433
- declare const KNOWLEDGE_SYNC_RUN_STATES: readonly ["running", "done", "failed"];
463
+ declare const KNOWLEDGE_SYNC_RUN_STATES: readonly ["running", "done", "failed", "superseded"];
434
464
  type KnowledgeSyncRunState = (typeof KNOWLEDGE_SYNC_RUN_STATES)[number];
435
465
  /** What a sync run counts, in this order wherever it shows them. */
436
466
  declare const KNOWLEDGE_SYNC_COUNTS: readonly ["discovered", "added", "changed", "moved", "withdrawn", "failed", "skipped"];
@@ -443,7 +473,7 @@ declare const KNOWLEDGE_SEARCH_SIGNALS: readonly ["semantic", "keyword", "title"
443
473
  type KnowledgeSearchSignal = (typeof KNOWLEDGE_SEARCH_SIGNALS)[number];
444
474
  declare const DATABASE_RELATION_TYPES: readonly ["table", "view", "materialized_view", "foreign_table"];
445
475
  type DatabaseRelationType = (typeof DATABASE_RELATION_TYPES)[number];
446
- declare const WORKFLOW_RUN_STATUSES: readonly ["queued", "running", "waiting", "done", "failed", "cancelled", "limit_reached"];
476
+ declare const WORKFLOW_RUN_STATUSES: readonly ["continued", "queued", "running", "waiting", "done", "failed", "cancelled", "limit_reached"];
447
477
  type WorkflowRunStatus = (typeof WORKFLOW_RUN_STATUSES)[number];
448
478
  declare const WORKFLOW_STEP_TYPES: readonly ["trigger", "operation", "loop", "code", "output", "agent", "notify", "workflow"];
449
479
  type WorkflowStepType = (typeof WORKFLOW_STEP_TYPES)[number];
@@ -452,6 +482,13 @@ type WorkflowReservedStepType = (typeof WORKFLOW_RESERVED_STEP_TYPES)[number];
452
482
  declare const WORKFLOW_TRIGGER_KINDS: readonly ["manual", "schedule", "parent"];
453
483
  type WorkflowTriggerKind = (typeof WORKFLOW_TRIGGER_KINDS)[number];
454
484
  declare const NOTIFY_CHANNELS: readonly ["inbox", "mail"];
485
+ /**
486
+ * What an operation step's facts name as its source (`stepFacts`, workflow-canvas.md 9.8). A
487
+ * step on `mail.send` names its sender as `mail_sender`, with the sender's icon key as
488
+ * `service` (`MAIL_SENDER_SYSTEM_ICON`, or a Connection's service).
489
+ */
490
+ declare const WORKFLOW_STEP_SOURCE_KINDS: readonly ["connection", "data_store", "knowledge_base", "workflow", "mail_sender", "other"];
491
+ type WorkflowStepSourceKind = (typeof WORKFLOW_STEP_SOURCE_KINDS)[number];
455
492
  type NotifyChannel = (typeof NOTIFY_CHANNELS)[number];
456
493
  declare const PRINCIPAL_HOLDER_KINDS: readonly ["user", "service_principal"];
457
494
  type PrincipalHolderKind = (typeof PRINCIPAL_HOLDER_KINDS)[number];
@@ -499,10 +536,25 @@ declare const KNOWLEDGE_CHECK_STATUSES: readonly ["preparing", "ok", "needs_atte
499
536
  type KnowledgeCheckStatus = (typeof KNOWLEDGE_CHECK_STATUSES)[number];
500
537
  declare const WORKFLOW_STEP_RUN_STATUSES: readonly ["queued", "running", "waiting", "done", "failed", "cancelled"];
501
538
  type WorkflowStepRunStatus = (typeof WORKFLOW_STEP_RUN_STATUSES)[number];
502
- declare const WORKFLOW_ENDED_STATUSES: readonly ["done", "failed", "cancelled", "limit_reached"];
539
+ declare const WORKFLOW_ENDED_STATUSES: readonly ["continued", "done", "failed", "cancelled", "limit_reached"];
503
540
  type WorkflowEndedStatus = (typeof WORKFLOW_ENDED_STATUSES)[number];
504
541
  /** A released Managed File keeps its identity; original bytes live at the synced source. */
505
542
  declare const MANAGED_FILE_STATUSES: readonly ["available", "released", "deleted"];
543
+ /** A Workflow automates a process unless it fills or processes data. */
544
+ declare const WORKFLOW_KINDS: readonly ["process", "data"];
545
+ type WorkflowKind = (typeof WORKFLOW_KINDS)[number];
546
+ /** Wire formats for a streamed Workflow result dataset. */
547
+ declare const WORKFLOW_DATASET_DOWNLOAD_FORMATS: readonly ["jsonl", "csv"];
548
+ type WorkflowDatasetDownloadFormat = (typeof WORKFLOW_DATASET_DOWNLOAD_FORMATS)[number];
549
+ /** Instance resources whose use may be inherited through workspace availability. */
550
+ declare const WORKSPACE_USE_ASSET_KINDS: readonly ["knowledge_base", "connection"];
551
+ /** Published assets that consume Connections or stored data. Agents hold tools separately. */
552
+ declare const PUBLISHED_DATA_CONSUMER_KINDS: readonly ["app", "workflow", "knowledge_base"];
553
+ type PublishedDataConsumerKind = (typeof PUBLISHED_DATA_CONSUMER_KINDS)[number];
554
+ /** State of a scheduled prompt. */
555
+ declare const SCHEDULED_START_STATES: readonly ["active", "paused"];
556
+ /** Which revision answered an agent preview turn. */
557
+ declare const AGENT_PREVIEW_SOURCES: readonly ["draft", "live"];
506
558
 
507
559
  declare const localizedStringSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
508
560
  en: z.ZodOptional<z.ZodString>;
@@ -848,8 +900,11 @@ declare class YamlDataError extends Error {
848
900
  declare function loadYamlData(text: string, file: string): unknown;
849
901
 
850
902
  declare const knowledgeSyncInputSchema: z.ZodObject<{
851
- source: z.ZodString;
852
- mode: z.ZodOptional<z.ZodLiteral<"full">>;
903
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
904
+ mode: z.ZodOptional<z.ZodEnum<{
905
+ full: "full";
906
+ changes: "changes";
907
+ }>>;
853
908
  }, z.core.$strict>;
854
909
  type KnowledgeSyncInput = z.infer<typeof knowledgeSyncInputSchema>;
855
910
  /** What a sync run ends with: the result of its Operation Run, and a Workflow step's output. */
@@ -868,6 +923,7 @@ declare const knowledgeSyncResultSchema: z.ZodObject<{
868
923
  failed: "failed";
869
924
  running: "running";
870
925
  done: "done";
926
+ superseded: "superseded";
871
927
  }>;
872
928
  counts: z.ZodObject<{
873
929
  discovered: z.ZodNumber;
@@ -884,6 +940,8 @@ declare const knowledgeSyncResultSchema: z.ZodObject<{
884
940
  knowledge_source_refused: "knowledge_source_refused";
885
941
  knowledge_fetch_failed: "knowledge_fetch_failed";
886
942
  knowledge_source_limit_reached: "knowledge_source_limit_reached";
943
+ knowledge_item_invalid: "knowledge_item_invalid";
944
+ knowledge_fetch_not_allowed: "knowledge_fetch_not_allowed";
887
945
  }>>;
888
946
  startedAt: z.ZodString;
889
947
  endedAt: z.ZodOptional<z.ZodString>;
@@ -896,9 +954,10 @@ type KnowledgeSyncResult = z.infer<typeof knowledgeSyncResultSchema>;
896
954
  declare const KNOWLEDGE_SOURCE_ITEM_SHOWN_STATES: readonly ["discovered", "fetched", "indexed", "failed", "withdrawn"];
897
955
  type KnowledgeSourceItemShownState = (typeof KNOWLEDGE_SOURCE_ITEM_SHOWN_STATES)[number];
898
956
  declare const knowledgeSourcesOutputSchema: z.ZodObject<{
899
- sources: z.ZodArray<z.ZodObject<{
957
+ sources: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
900
958
  id: z.ZodString;
901
959
  connection: z.ZodString;
960
+ kind: z.ZodOptional<z.ZodLiteral<"connector">>;
902
961
  items: z.ZodObject<{
903
962
  discovered: z.ZodNumber;
904
963
  fetched: z.ZodNumber;
@@ -914,6 +973,8 @@ declare const knowledgeSourcesOutputSchema: z.ZodObject<{
914
973
  knowledge_source_refused: "knowledge_source_refused";
915
974
  knowledge_fetch_failed: "knowledge_fetch_failed";
916
975
  knowledge_source_limit_reached: "knowledge_source_limit_reached";
976
+ knowledge_item_invalid: "knowledge_item_invalid";
977
+ knowledge_fetch_not_allowed: "knowledge_fetch_not_allowed";
917
978
  }>, z.ZodEnum<{
918
979
  knowledge_file_format_unsupported: "knowledge_file_format_unsupported";
919
980
  knowledge_file_over_limit: "knowledge_file_over_limit";
@@ -924,6 +985,9 @@ declare const knowledgeSourcesOutputSchema: z.ZodObject<{
924
985
  knowledge_text_unreadable: "knowledge_text_unreadable";
925
986
  knowledge_text_empty: "knowledge_text_empty";
926
987
  knowledge_index_failed: "knowledge_index_failed";
988
+ knowledge_file_too_many_pages: "knowledge_file_too_many_pages";
989
+ knowledge_processor_output_invalid: "knowledge_processor_output_invalid";
990
+ knowledge_conversion_timeout: "knowledge_conversion_timeout";
927
991
  }>]>;
928
992
  count: z.ZodNumber;
929
993
  }, z.core.$strict>>;
@@ -953,6 +1017,7 @@ declare const knowledgeSourcesOutputSchema: z.ZodObject<{
953
1017
  failed: "failed";
954
1018
  running: "running";
955
1019
  done: "done";
1020
+ superseded: "superseded";
956
1021
  }>;
957
1022
  counts: z.ZodObject<{
958
1023
  discovered: z.ZodNumber;
@@ -969,17 +1034,107 @@ declare const knowledgeSourcesOutputSchema: z.ZodObject<{
969
1034
  knowledge_source_refused: "knowledge_source_refused";
970
1035
  knowledge_fetch_failed: "knowledge_fetch_failed";
971
1036
  knowledge_source_limit_reached: "knowledge_source_limit_reached";
1037
+ knowledge_item_invalid: "knowledge_item_invalid";
1038
+ knowledge_fetch_not_allowed: "knowledge_fetch_not_allowed";
972
1039
  }>>;
973
1040
  startedAt: z.ZodString;
974
1041
  endedAt: z.ZodOptional<z.ZodString>;
975
1042
  }, z.core.$strict>>;
976
1043
  lastChangeAt: z.ZodOptional<z.ZodString>;
977
1044
  oldestOpenChangeAt: z.ZodOptional<z.ZodString>;
978
- }, z.core.$strict>>;
1045
+ }, z.core.$strict>, z.ZodObject<{
1046
+ id: z.ZodString;
1047
+ kind: z.ZodLiteral<"workflow">;
1048
+ workflowId: z.ZodString;
1049
+ running: z.ZodOptional<z.ZodObject<{
1050
+ syncRunId: z.ZodString;
1051
+ mode: z.ZodEnum<{
1052
+ full: "full";
1053
+ initial: "initial";
1054
+ changes: "changes";
1055
+ }>;
1056
+ startedAt: z.ZodString;
1057
+ itemsPerMinute: z.ZodOptional<z.ZodNumber>;
1058
+ estimatedEndAt: z.ZodOptional<z.ZodString>;
1059
+ }, z.core.$strict>>;
1060
+ failures: z.ZodArray<z.ZodObject<{
1061
+ code: z.ZodUnion<readonly [z.ZodEnum<{
1062
+ knowledge_file_format_unsupported: "knowledge_file_format_unsupported";
1063
+ knowledge_file_over_limit: "knowledge_file_over_limit";
1064
+ knowledge_source_unreachable: "knowledge_source_unreachable";
1065
+ knowledge_source_refused: "knowledge_source_refused";
1066
+ knowledge_fetch_failed: "knowledge_fetch_failed";
1067
+ knowledge_source_limit_reached: "knowledge_source_limit_reached";
1068
+ knowledge_item_invalid: "knowledge_item_invalid";
1069
+ knowledge_fetch_not_allowed: "knowledge_fetch_not_allowed";
1070
+ }>, z.ZodEnum<{
1071
+ knowledge_file_format_unsupported: "knowledge_file_format_unsupported";
1072
+ knowledge_file_over_limit: "knowledge_file_over_limit";
1073
+ knowledge_file_unreadable: "knowledge_file_unreadable";
1074
+ knowledge_file_missing: "knowledge_file_missing";
1075
+ knowledge_extraction_failed: "knowledge_extraction_failed";
1076
+ knowledge_file_format_unavailable: "knowledge_file_format_unavailable";
1077
+ knowledge_text_unreadable: "knowledge_text_unreadable";
1078
+ knowledge_text_empty: "knowledge_text_empty";
1079
+ knowledge_index_failed: "knowledge_index_failed";
1080
+ knowledge_file_too_many_pages: "knowledge_file_too_many_pages";
1081
+ knowledge_processor_output_invalid: "knowledge_processor_output_invalid";
1082
+ knowledge_conversion_timeout: "knowledge_conversion_timeout";
1083
+ }>]>;
1084
+ count: z.ZodNumber;
1085
+ }, z.core.$strict>>;
1086
+ items: z.ZodObject<{
1087
+ discovered: z.ZodNumber;
1088
+ fetched: z.ZodNumber;
1089
+ indexed: z.ZodNumber;
1090
+ failed: z.ZodNumber;
1091
+ withdrawn: z.ZodNumber;
1092
+ }, z.core.$strict>;
1093
+ last: z.ZodOptional<z.ZodObject<{
1094
+ syncRunId: z.ZodString;
1095
+ source: z.ZodString;
1096
+ mode: z.ZodEnum<{
1097
+ full: "full";
1098
+ initial: "initial";
1099
+ changes: "changes";
1100
+ }>;
1101
+ reason: z.ZodOptional<z.ZodEnum<{
1102
+ cursor_expired: "cursor_expired";
1103
+ }>>;
1104
+ state: z.ZodEnum<{
1105
+ failed: "failed";
1106
+ running: "running";
1107
+ done: "done";
1108
+ superseded: "superseded";
1109
+ }>;
1110
+ counts: z.ZodObject<{
1111
+ discovered: z.ZodNumber;
1112
+ added: z.ZodNumber;
1113
+ changed: z.ZodNumber;
1114
+ moved: z.ZodNumber;
1115
+ withdrawn: z.ZodNumber;
1116
+ failed: z.ZodNumber;
1117
+ skipped: z.ZodNumber;
1118
+ }, z.core.$strict>;
1119
+ bytesFetched: z.ZodNumber;
1120
+ failureCode: z.ZodOptional<z.ZodEnum<{
1121
+ knowledge_source_unreachable: "knowledge_source_unreachable";
1122
+ knowledge_source_refused: "knowledge_source_refused";
1123
+ knowledge_fetch_failed: "knowledge_fetch_failed";
1124
+ knowledge_source_limit_reached: "knowledge_source_limit_reached";
1125
+ knowledge_item_invalid: "knowledge_item_invalid";
1126
+ knowledge_fetch_not_allowed: "knowledge_fetch_not_allowed";
1127
+ }>>;
1128
+ startedAt: z.ZodString;
1129
+ endedAt: z.ZodOptional<z.ZodString>;
1130
+ }, z.core.$strict>>;
1131
+ lastChangeAt: z.ZodOptional<z.ZodString>;
1132
+ oldestOpenChangeAt: z.ZodOptional<z.ZodString>;
1133
+ }, z.core.$strict>]>>;
979
1134
  }, z.core.$strict>;
980
1135
  type KnowledgeSourcesOutput = z.infer<typeof knowledgeSourcesOutputSchema>;
981
1136
  declare const knowledgeSourceItemsInputSchema: z.ZodObject<{
982
- source: z.ZodString;
1137
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
983
1138
  state: z.ZodOptional<z.ZodEnum<{
984
1139
  failed: "failed";
985
1140
  withdrawn: "withdrawn";
@@ -994,6 +1149,8 @@ declare const knowledgeSourceItemsInputSchema: z.ZodObject<{
994
1149
  knowledge_source_refused: "knowledge_source_refused";
995
1150
  knowledge_fetch_failed: "knowledge_fetch_failed";
996
1151
  knowledge_source_limit_reached: "knowledge_source_limit_reached";
1152
+ knowledge_item_invalid: "knowledge_item_invalid";
1153
+ knowledge_fetch_not_allowed: "knowledge_fetch_not_allowed";
997
1154
  }>, z.ZodEnum<{
998
1155
  knowledge_file_format_unsupported: "knowledge_file_format_unsupported";
999
1156
  knowledge_file_over_limit: "knowledge_file_over_limit";
@@ -1004,6 +1161,9 @@ declare const knowledgeSourceItemsInputSchema: z.ZodObject<{
1004
1161
  knowledge_text_unreadable: "knowledge_text_unreadable";
1005
1162
  knowledge_text_empty: "knowledge_text_empty";
1006
1163
  knowledge_index_failed: "knowledge_index_failed";
1164
+ knowledge_file_too_many_pages: "knowledge_file_too_many_pages";
1165
+ knowledge_processor_output_invalid: "knowledge_processor_output_invalid";
1166
+ knowledge_conversion_timeout: "knowledge_conversion_timeout";
1007
1167
  }>]>>;
1008
1168
  limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
1009
1169
  cursor: z.ZodOptional<z.ZodString>;
@@ -1029,6 +1189,8 @@ declare const knowledgeSourceItemsOutputSchema: z.ZodObject<{
1029
1189
  knowledge_source_refused: "knowledge_source_refused";
1030
1190
  knowledge_fetch_failed: "knowledge_fetch_failed";
1031
1191
  knowledge_source_limit_reached: "knowledge_source_limit_reached";
1192
+ knowledge_item_invalid: "knowledge_item_invalid";
1193
+ knowledge_fetch_not_allowed: "knowledge_fetch_not_allowed";
1032
1194
  }>, z.ZodEnum<{
1033
1195
  knowledge_file_format_unsupported: "knowledge_file_format_unsupported";
1034
1196
  knowledge_file_over_limit: "knowledge_file_over_limit";
@@ -1039,6 +1201,9 @@ declare const knowledgeSourceItemsOutputSchema: z.ZodObject<{
1039
1201
  knowledge_text_unreadable: "knowledge_text_unreadable";
1040
1202
  knowledge_text_empty: "knowledge_text_empty";
1041
1203
  knowledge_index_failed: "knowledge_index_failed";
1204
+ knowledge_file_too_many_pages: "knowledge_file_too_many_pages";
1205
+ knowledge_processor_output_invalid: "knowledge_processor_output_invalid";
1206
+ knowledge_conversion_timeout: "knowledge_conversion_timeout";
1042
1207
  }>]>>;
1043
1208
  documentId: z.ZodOptional<z.ZodString>;
1044
1209
  originLink: z.ZodOptional<z.ZodString>;
@@ -1055,10 +1220,10 @@ type KnowledgeSourceItemsOutput = z.infer<typeof knowledgeSourceItemsOutputSchem
1055
1220
  declare const knowledgeRetryInputSchema: z.ZodUnion<readonly [z.ZodObject<{
1056
1221
  documentIds: z.ZodArray<z.ZodString>;
1057
1222
  }, z.core.$strict>, z.ZodObject<{
1058
- source: z.ZodString;
1223
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1059
1224
  sourceItemIds: z.ZodArray<z.ZodString>;
1060
1225
  }, z.core.$strict>, z.ZodObject<{
1061
- source: z.ZodString;
1226
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1062
1227
  failureCode: z.ZodUnion<readonly [z.ZodEnum<{
1063
1228
  knowledge_file_format_unsupported: "knowledge_file_format_unsupported";
1064
1229
  knowledge_file_over_limit: "knowledge_file_over_limit";
@@ -1066,6 +1231,8 @@ declare const knowledgeRetryInputSchema: z.ZodUnion<readonly [z.ZodObject<{
1066
1231
  knowledge_source_refused: "knowledge_source_refused";
1067
1232
  knowledge_fetch_failed: "knowledge_fetch_failed";
1068
1233
  knowledge_source_limit_reached: "knowledge_source_limit_reached";
1234
+ knowledge_item_invalid: "knowledge_item_invalid";
1235
+ knowledge_fetch_not_allowed: "knowledge_fetch_not_allowed";
1069
1236
  }>, z.ZodEnum<{
1070
1237
  knowledge_file_format_unsupported: "knowledge_file_format_unsupported";
1071
1238
  knowledge_file_over_limit: "knowledge_file_over_limit";
@@ -1076,9 +1243,12 @@ declare const knowledgeRetryInputSchema: z.ZodUnion<readonly [z.ZodObject<{
1076
1243
  knowledge_text_unreadable: "knowledge_text_unreadable";
1077
1244
  knowledge_text_empty: "knowledge_text_empty";
1078
1245
  knowledge_index_failed: "knowledge_index_failed";
1246
+ knowledge_file_too_many_pages: "knowledge_file_too_many_pages";
1247
+ knowledge_processor_output_invalid: "knowledge_processor_output_invalid";
1248
+ knowledge_conversion_timeout: "knowledge_conversion_timeout";
1079
1249
  }>]>;
1080
1250
  }, z.core.$strict>, z.ZodObject<{
1081
- source: z.ZodString;
1251
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1082
1252
  all: z.ZodLiteral<true>;
1083
1253
  }, z.core.$strict>]>;
1084
1254
  type KnowledgeRetryInput = z.infer<typeof knowledgeRetryInputSchema>;
@@ -1117,4 +1287,1322 @@ declare const knowledgeLocateOutputSchema: z.ZodObject<{
1117
1287
  }, z.core.$strict>;
1118
1288
  type KnowledgeLocateOutput = z.infer<typeof knowledgeLocateOutputSchema>;
1119
1289
 
1120
- export { ACCESS_SOURCES, ACTIONS, ACTIVE_AGENT_RUN_STATUSES, ADMINISTERED_USER_STATUSES, AGENT_AVAILABILITY_MODES, AGENT_EDITABLE_FIELDS, AGENT_RUN_FAILURE_CATEGORIES, AGENT_RUN_STATUSES, AGENT_STARTERS_MAX, API_CREDENTIAL_SCOPES, APPROVAL_CHECK_FAILURE_OUTCOMES, APPROVAL_CHECK_STATUSES, APPROVAL_EXECUTIONS, APPROVAL_REQUEST_STATUSES, APP_ACTION_CALL_STATUSES, APP_ERROR_CODES, APP_ERROR_STATUS_CODES, APP_MODES, ARTIFACT_PREVIEW_IMAGE_FORMATS, ARTIFACT_PREVIEW_IMAGE_MIME_TYPES, ARTIFACT_PREVIEW_STATUSES, ASSET_LIFECYCLES, ASSET_NAME_REFUSAL_REASONS, ASSET_OWNER_KINDS, ASSET_REPO_BUNDLE_KINDS, ASSET_REPRESENTATIONS, ASSET_SYNC_CHANGE_TYPES, ATTACHMENT_CREATE_OUTCOMES, AUDIT_ACTOR_KINDS, AUDIT_EVENT_STATUSES, AUDIT_OUTCOMES, AUDIT_TIERS, AUTH_PRINCIPAL_KINDS, AUTH_SCOPE_WILDCARD, type AccessSource, type ActiveAgentRunStatus, type AdministeredUserStatus, type AgentAvailabilityMode, type AgentConfig, type AgentEditableField, type AgentInitialPromptConfig, type AgentRunFailureCategory, type AgentRunStatus, type ApiCredentialScope, type AppActionCallStatus, type AppErrorCode, type AppMode, type ApprovalCheckFailureOutcome, type ApprovalCheckStatus, type ApprovalExecution, type ApprovalRequestStatus, type ArtifactPreviewImageFormat, type ArtifactPreviewImageMimeType, type ArtifactPreviewStatus, type AssetLifecycle, type AssetNameRefusalReason, type AssetOwnerKind, type AssetRepoBundleKind, type AssetRepresentation, type AssetSyncChangeType, type AttachmentCreateOutcome, type AuditActorKind, type AuditEventStatus, type AuditOutcome, type AuditTier, type AuthPrincipalKind, CHAT_MESSAGE_ROLES, CHAT_SESSION_AUTH_SCOPES, COLLABORATION_WORKSPACE_KINDS, CONFIG_ASSET_CHANGE_OPERATIONS, CONFIG_ASSET_KINDS, CONNECTION_BINDING_STATES, CONNECTION_EXPOSURES, CONNECTION_HEALTH_STATES, CONNECTION_NAME_MAX_LENGTH, CONNECTION_NAME_PATTERN, CONNECTION_NETWORKS, CONNECTION_OAUTH_REGISTRATIONS, CONNECTION_OPERATION_POLICIES, CONNECTION_OPERATION_STATUSES, CONNECTION_ORIGINS, CONNECTION_PROVIDER_REVOCATIONS, CONNECTION_SECRET_STATES, CONNECTOR_TEST_STATUSES, CONVERSATION_ATTACHMENT_STATUSES, CONVERSATION_KINDS, CONVERSATION_VISIBILITIES, type ChatMessageRole, type ChatSessionAuthScope, type CollaborationWorkspaceKind, type ConfigAssetChangeOperation, type ConfigAssetKind, type ConnectionBindingState, type ConnectionExposure, type ConnectionHealth, type ConnectionNetwork, type ConnectionOAuthRegistration, type ConnectionOperationPolicy, type ConnectionOperationStatus, type ConnectionOrigin, type ConnectionProviderRevocation, type ConnectionSecretState, type ConnectorTestStatus, type ConversationAttachmentStatus, type ConversationKind, type ConversationVisibility, DATABASE_RELATION_TYPES, DATA_STORE_CONDITIONS, DATA_STORE_INSERT_CONFLICT_MODES, DATA_STORE_LOAD_CONFLICT_MODES, DATA_STORE_MIGRATION_OUTCOMES, DATA_STORE_SCALAR_TYPES, DATA_STORE_STATUSES, DECIDED_APPROVAL_REQUEST_STATUSES, DELETION_STATES, type DataStoreCondition, type DataStoreInsertConflictMode, type DataStoreLoadConflictMode, type DataStoreMigrationOutcome, type DataStoreScalarType, type DataStoreStatus, type DatabaseRelationType, type DecidedApprovalRequestStatus, type DeletionState, ENDED_AGENT_RUN_STATUSES, ENDED_APPROVAL_EXECUTIONS, type EndedAgentRunStatus, type EndedApprovalExecution, FAILED_JOB_STATUSES, FIRST_PARTY_AUTH_SCOPES, FOLLOW_UP_MODES, FOLLOW_UP_STATUSES, type FailedJobStatus, type FirstPartyAuthScope, GRANT_EFFECTS, GRANT_HOLDER_KINDS, GRANT_SCOPE_KINDS, GUARDRAIL_HIT_OUTCOMES, GUARDRAIL_NAME_MAX_LENGTH, GUARDRAIL_NAME_PATTERN, GUARDRAIL_OUTCOMES, type GrantEffect, type GrantHolderKind, type GrantScopeKind, type GuardrailHitOutcome, type GuardrailOutcome, IDEMPOTENCY_KEY_MAX_LENGTH, INFRASTRUCTURE_SECRET_STATES, INFRASTRUCTURE_WITHHELD_FIELDS, type InfrastructureSecretState, type InfrastructureWithheldField, JOB_STATUSES, type JobStatus, KNOWLEDGE_BASE_STATUSES, KNOWLEDGE_CHECK_STATUSES, KNOWLEDGE_DOCUMENT_FAILURE_CODES, KNOWLEDGE_DOCUMENT_STATES, KNOWLEDGE_DOCUMENT_WAIT_CODES, KNOWLEDGE_SEARCH_SIGNALS, KNOWLEDGE_SOURCE_FAILURE_CODES, KNOWLEDGE_SOURCE_ITEM_FAILURE_CODES, KNOWLEDGE_SOURCE_ITEM_SHOWN_STATES, KNOWLEDGE_SOURCE_ITEM_STATES, KNOWLEDGE_SYNC_COUNTS, KNOWLEDGE_SYNC_MODES, KNOWLEDGE_SYNC_RUN_STATES, type KnowledgeBaseStatus, type KnowledgeCheckStatus, type KnowledgeDocumentFailureCode, type KnowledgeDocumentState, type KnowledgeDocumentWaitCode, type KnowledgeLocateInput, type KnowledgeLocateOutput, type KnowledgeRetryInput, type KnowledgeRetryOutput, type KnowledgeSearchSignal, type KnowledgeSourceFailureCode, type KnowledgeSourceItemFailureCode, type KnowledgeSourceItemShownState, type KnowledgeSourceItemState, type KnowledgeSourceItemsInput, type KnowledgeSourceItemsOutput, type KnowledgeSourcesOutput, type KnowledgeSyncCount, type KnowledgeSyncInput, type KnowledgeSyncMode, type KnowledgeSyncResult, type KnowledgeSyncRunState, LISTED_DATA_STORE_STATUSES, LIVE_JOB_STATUSES, type ListedDataStoreStatus, type LiveJobStatus, type LocaleCode, type LocalizedStringConfig, MANAGED_FILE_STATUSES, MESSAGE_FINISH_STATUSES, MODEL_PROVIDER_AUTH_MODES, MODEL_USAGE_EVENT_STATUSES, MODEL_USAGE_SOURCES, MODEL_USAGE_TIERS, type MessageFinishStatus, type ModelProviderAuthMode, type ModelUsageEventStatus, type ModelUsageSource, type ModelUsageTier, NAMESPACE_PREFIX_MAX_LENGTH, NAMESPACE_PREFIX_MIN_LENGTH, NAMESPACE_PREFIX_PATTERN, NOTIFY_CHANNELS, type NotifyChannel, OPENAI_COMPATIBLE_APIS, OPERATIONS_AUDIENCES, OPERATION_CONFIRMATION_DECISIONS, OPERATION_DENIAL_REASONS, OPERATION_EFFECTS, OPERATION_ORIGIN_KINDS, OPERATION_RUN_DECISION_MODES, OPERATION_RUN_DECISION_REASONS, OPERATION_RUN_STATUSES, OPERATION_TARGETS, type OpenaiCompatibleApi, type OperationDenialReason, type OperationEffect, type OperationOriginKind, type OperationRunDecisionMode, type OperationRunDecisionReason, type OperationRunStatus, type OperationScope, type OperationTarget, type OperationsAudience, POLICY_VALUES, PRINCIPAL_HOLDER_KINDS, PROVIDER_CHECK_ERROR_CLASSES, PROVIDER_PORTS, PROVIDER_REGIONS, type PlatformAction, type PolicyValue, type PrincipalHolderKind, type ProviderCheckErrorClass, type ProviderPort, type ProviderRegion, READING_POLICY_VALUES, REASONING_EFFORTS, type ReadingPolicyValue, type ReasoningEffortConfig, SERVICE_PRINCIPAL_PERMISSIONS, SERVICE_PRINCIPAL_STATUSES, SKILL_CHANGE_TYPES, SKILL_FRONTMATTER_FIELDS, SKILL_FRONTMATTER_MAX_BYTES, SKILL_FRONTMATTER_MAX_DEPTH, SKILL_NAME_PATTERN, SKILL_NAME_RULE, SKILL_ORIGINS, SKILL_PORTABLE_DESCRIPTION_MAX_CHARS, SKILL_PORTABLE_NAME_MAX_CHARS, SKILL_RESOURCE_MEDIA_TYPES, SKILL_STARTERS_MAX, SKILL_STARTER_LINE_MAX_LENGTH, SKILL_SUMMARY_MAX_LENGTH, STRUCTURED_DATA_REVIEW_REASONS, SUPPORTED_IMAGE_MIME_TYPES, type ServicePrincipalPermission, type ServicePrincipalStatus, type SkillChangeType, type SkillConfig, type SkillFileEntry, type SkillFrontmatterRefusal, SkillMarkdownError, type SkillOrigin, type SkillResourceConfig, type SkillResourceMediaType, type SkillStarterConfig, type StructuredDataReviewReason, type SupportedImageMimeType, THEME_MODES, THEME_MODE_PREFERENCES, TOOL_CALL_STATES, TOOL_DECISION_MODES, TOOL_DECISION_OUTCOMES, TOOL_DISPLAY_MODES, TOOL_GROUPS, TOOL_INPUT_PARSE_ERROR_CODES, type ThemeMode, type ThemeModePreference, type ToolCallState, type ToolDisplayMode, type ToolGroup, type ToolInputParseErrorCode, USAGE_COST_STATUSES, USER_STATUSES, type UsageCostStatus, type UserStatus, WAITING_OPERATION_RUN_STATUSES, WEB_SOURCE_PROVIDERS, WORKFLOW_ENDED_STATUSES, WORKFLOW_NAME_PATTERN, WORKFLOW_NAME_RULE, WORKFLOW_RESERVED_STEP_TYPES, WORKFLOW_RUN_MODES, WORKFLOW_RUN_STATUSES, WORKFLOW_STEP_RUN_STATUSES, WORKFLOW_STEP_TYPES, WORKFLOW_TRIGGER_KINDS, WORKSPACE_ACCENT_COLORS, WORKSPACE_ACCESS_STATES, WORKSPACE_COMMAND_STATUSES, WORKSPACE_FILE_KINDS, WORKSPACE_MEMBERSHIP_ROLES, WORKSPACE_SECTIONS, WORKSPACE_VISIBILITIES, type WebSourceProvider, type WorkflowAssetConfig, type WorkflowEndedStatus, type WorkflowReservedStepType, type WorkflowRunMode, type WorkflowRunStatus, type WorkflowStepRunStatus, type WorkflowStepType, type WorkflowTriggerKind, type WorkspaceAccentColor, type WorkspaceAccessState, type WorkspaceCommandStatus, type WorkspaceFileKind, type WorkspaceMembershipRole, type WorkspaceSection, type WorkspaceVisibility, YAML_DATA_MAX_VALUES, YamlDataError, type YamlDataIssue, type YamlDataIssueCode, type YamlDataOptions, type YamlDataResult, agentConfigSchema, checkStorableTexts, deriveSkillTitle, formatSkillMarkdown, isStorableText, knowledgeLocateInputSchema, knowledgeLocateOutputSchema, knowledgeRetryInputSchema, knowledgeRetryOutputSchema, knowledgeSourceItemsInputSchema, knowledgeSourceItemsOutputSchema, knowledgeSourcesOutputSchema, knowledgeSyncInputSchema, knowledgeSyncResultSchema, loadYamlData, localeCodes, localizedStringSchema, parseSkillMarkdown, readYamlData, skillConfigSchema, skillFileEntrySchema, skillFileFrontmatterSchema, skillNameSchema, skillPortabilityIssues, skillResourceConfigSchema, skillResourceMediaTypeForPath, skillResourcePathSchema, skillStarterSchema, workflowConfigSchema, yamlValueIssue, yamlValueIssueSentence };
1290
+ /** Dataset checkpoints exposed in Workflow metadata; rows remain in object storage. */
1291
+ declare const WORKFLOW_DATASET_STATES: readonly ["writing", "complete", "deleted"];
1292
+ type WorkflowDatasetState = (typeof WORKFLOW_DATASET_STATES)[number];
1293
+
1294
+ /** The reference kept in step data; rows live in the owning run's dataset. */
1295
+ declare const workflowDatasetReferenceSchema: z.ZodObject<{
1296
+ $dataset: z.ZodString;
1297
+ rowCount: z.ZodNumber;
1298
+ bytes: z.ZodNumber;
1299
+ offset: z.ZodOptional<z.ZodNumber>;
1300
+ }, z.core.$strict>;
1301
+ /** One row of a batch's failures dataset, preserving the input item for a retry. */
1302
+ declare const operationBatchFailureSchema: z.ZodObject<{
1303
+ item: z.ZodJSONSchema;
1304
+ code: z.ZodString;
1305
+ message: z.ZodString;
1306
+ }, z.core.$strict>;
1307
+ /** One failed item never fails the call or its neighbours. */
1308
+ declare const operationBatchResultSchema: z.ZodObject<{
1309
+ done: z.ZodNumber;
1310
+ failed: z.ZodNumber;
1311
+ failures: z.ZodObject<{
1312
+ $dataset: z.ZodString;
1313
+ rowCount: z.ZodNumber;
1314
+ bytes: z.ZodNumber;
1315
+ offset: z.ZodOptional<z.ZodNumber>;
1316
+ }, z.core.$strict>;
1317
+ }, z.core.$strict>;
1318
+ type OperationBatchResult = z.infer<typeof operationBatchResultSchema>;
1319
+ type OperationBatchFailure = z.infer<typeof operationBatchFailureSchema>;
1320
+
1321
+ /** Reserved until CONN-DL: the Workflow's account must be allowed to use this Connection. */
1322
+ declare const knowledgeIngestFetchSchema: z.ZodObject<{
1323
+ connection: z.ZodString;
1324
+ operation: z.ZodString;
1325
+ input: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1326
+ }, z.core.$strict>;
1327
+ /** Exactly one content, in both the TypeScript type and the runtime schema. */
1328
+ declare const knowledgeIngestItemSchema: z.ZodUnion<readonly [z.ZodObject<{
1329
+ itemId: z.ZodString;
1330
+ version: z.ZodString;
1331
+ name: z.ZodString;
1332
+ path: z.ZodOptional<z.ZodString>;
1333
+ originLink: z.ZodOptional<z.ZodURL>;
1334
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
1335
+ fileId: z.ZodOptional<z.ZodNever>;
1336
+ fetch: z.ZodOptional<z.ZodNever>;
1337
+ text: z.ZodString;
1338
+ }, z.core.$strict>, z.ZodObject<{
1339
+ itemId: z.ZodString;
1340
+ version: z.ZodString;
1341
+ name: z.ZodString;
1342
+ path: z.ZodOptional<z.ZodString>;
1343
+ originLink: z.ZodOptional<z.ZodURL>;
1344
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
1345
+ text: z.ZodOptional<z.ZodNever>;
1346
+ fetch: z.ZodOptional<z.ZodNever>;
1347
+ fileId: z.ZodString;
1348
+ }, z.core.$strict>, z.ZodObject<{
1349
+ itemId: z.ZodString;
1350
+ version: z.ZodString;
1351
+ name: z.ZodString;
1352
+ path: z.ZodOptional<z.ZodString>;
1353
+ originLink: z.ZodOptional<z.ZodURL>;
1354
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
1355
+ text: z.ZodOptional<z.ZodNever>;
1356
+ fileId: z.ZodOptional<z.ZodNever>;
1357
+ fetch: z.ZodObject<{
1358
+ connection: z.ZodString;
1359
+ operation: z.ZodString;
1360
+ input: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1361
+ }, z.core.$strict>;
1362
+ }, z.core.$strict>]>;
1363
+ type KnowledgeIngestItem = z.infer<typeof knowledgeIngestItemSchema>;
1364
+ declare const knowledgeIngestInputSchema: z.ZodUnion<readonly [z.ZodObject<{
1365
+ items: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1366
+ itemId: z.ZodString;
1367
+ version: z.ZodString;
1368
+ name: z.ZodString;
1369
+ path: z.ZodOptional<z.ZodString>;
1370
+ originLink: z.ZodOptional<z.ZodURL>;
1371
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
1372
+ fileId: z.ZodOptional<z.ZodNever>;
1373
+ fetch: z.ZodOptional<z.ZodNever>;
1374
+ text: z.ZodString;
1375
+ }, z.core.$strict>, z.ZodObject<{
1376
+ itemId: z.ZodString;
1377
+ version: z.ZodString;
1378
+ name: z.ZodString;
1379
+ path: z.ZodOptional<z.ZodString>;
1380
+ originLink: z.ZodOptional<z.ZodURL>;
1381
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
1382
+ text: z.ZodOptional<z.ZodNever>;
1383
+ fetch: z.ZodOptional<z.ZodNever>;
1384
+ fileId: z.ZodString;
1385
+ }, z.core.$strict>, z.ZodObject<{
1386
+ itemId: z.ZodString;
1387
+ version: z.ZodString;
1388
+ name: z.ZodString;
1389
+ path: z.ZodOptional<z.ZodString>;
1390
+ originLink: z.ZodOptional<z.ZodURL>;
1391
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
1392
+ text: z.ZodOptional<z.ZodNever>;
1393
+ fileId: z.ZodOptional<z.ZodNever>;
1394
+ fetch: z.ZodObject<{
1395
+ connection: z.ZodString;
1396
+ operation: z.ZodString;
1397
+ input: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1398
+ }, z.core.$strict>;
1399
+ }, z.core.$strict>]>>;
1400
+ complete: z.ZodOptional<z.ZodBoolean>;
1401
+ }, z.core.$strict>, z.ZodObject<{
1402
+ dataset: z.ZodObject<{
1403
+ $dataset: z.ZodString;
1404
+ rowCount: z.ZodNumber;
1405
+ bytes: z.ZodNumber;
1406
+ offset: z.ZodOptional<z.ZodNumber>;
1407
+ }, z.core.$strict>;
1408
+ complete: z.ZodOptional<z.ZodBoolean>;
1409
+ }, z.core.$strict>]>;
1410
+ declare const knowledgeIngestOutputSchema: z.ZodObject<{
1411
+ done: z.ZodNumber;
1412
+ failed: z.ZodNumber;
1413
+ failures: z.ZodObject<{
1414
+ $dataset: z.ZodString;
1415
+ rowCount: z.ZodNumber;
1416
+ bytes: z.ZodNumber;
1417
+ offset: z.ZodOptional<z.ZodNumber>;
1418
+ }, z.core.$strict>;
1419
+ accepted: z.ZodNumber;
1420
+ withdrawn: z.ZodNumber;
1421
+ }, z.core.$strict>;
1422
+ declare const knowledgeWithdrawInputSchema: z.ZodObject<{
1423
+ itemIds: z.ZodArray<z.ZodString>;
1424
+ }, z.core.$strict>;
1425
+ declare const knowledgeWithdrawOutputSchema: z.ZodObject<{
1426
+ withdrawn: z.ZodNumber;
1427
+ }, z.core.$strict>;
1428
+ declare const knowledgePendingInputSchema: z.ZodObject<{
1429
+ type: z.ZodOptional<z.ZodString>;
1430
+ since: z.ZodOptional<z.ZodISODateTime>;
1431
+ limit: z.ZodNumber;
1432
+ }, z.core.$strict>;
1433
+ declare const knowledgePendingRowSchema: z.ZodObject<{
1434
+ id: z.ZodString;
1435
+ type: z.ZodString;
1436
+ contentHash: z.ZodString;
1437
+ pages: z.ZodObject<{
1438
+ $dataset: z.ZodString;
1439
+ rowCount: z.ZodNumber;
1440
+ bytes: z.ZodNumber;
1441
+ offset: z.ZodOptional<z.ZodNumber>;
1442
+ }, z.core.$strict>;
1443
+ }, z.core.$strict>;
1444
+ declare const knowledgePendingOutputSchema: z.ZodObject<{
1445
+ documents: z.ZodObject<{
1446
+ $dataset: z.ZodString;
1447
+ rowCount: z.ZodNumber;
1448
+ bytes: z.ZodNumber;
1449
+ offset: z.ZodOptional<z.ZodNumber>;
1450
+ }, z.core.$strict>;
1451
+ }, z.core.$strict>;
1452
+ /**
1453
+ * A processor returns logical documents and page text (tables as Markdown), optional
1454
+ * section boundaries and fields. Chunking and vectors remain the platform's. This is the
1455
+ * single validator for built-ins and Workflow write-back; every refusal has the code
1456
+ * knowledge_processor_output_invalid. Fields' declared JSON Schema is checked by PROC-1.
1457
+ */
1458
+ declare const knowledgeProcessorOutputSchema: z.ZodObject<{
1459
+ documents: z.ZodArray<z.ZodObject<{
1460
+ pageFrom: z.ZodNumber;
1461
+ pageTo: z.ZodNumber;
1462
+ }, z.core.$strict>>;
1463
+ sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
1464
+ pageFrom: z.ZodNumber;
1465
+ pageTo: z.ZodNumber;
1466
+ title: z.ZodString;
1467
+ }, z.core.$strict>>>;
1468
+ fields: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1469
+ pages: z.ZodArray<z.ZodObject<{
1470
+ page: z.ZodNumber;
1471
+ text: z.ZodString;
1472
+ }, z.core.$strict>>;
1473
+ }, z.core.$strict>;
1474
+ type KnowledgeProcessorOutput = z.infer<typeof knowledgeProcessorOutputSchema>;
1475
+ declare const knowledgePutProcessedInputSchema: z.ZodObject<{
1476
+ items: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
1477
+ documentId: z.ZodString;
1478
+ contentHash: z.ZodString;
1479
+ workflowRevision: z.ZodString;
1480
+ output: z.ZodObject<{
1481
+ documents: z.ZodArray<z.ZodObject<{
1482
+ pageFrom: z.ZodNumber;
1483
+ pageTo: z.ZodNumber;
1484
+ }, z.core.$strict>>;
1485
+ sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
1486
+ pageFrom: z.ZodNumber;
1487
+ pageTo: z.ZodNumber;
1488
+ title: z.ZodString;
1489
+ }, z.core.$strict>>>;
1490
+ fields: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1491
+ pages: z.ZodObject<{
1492
+ $dataset: z.ZodString;
1493
+ rowCount: z.ZodNumber;
1494
+ bytes: z.ZodNumber;
1495
+ offset: z.ZodOptional<z.ZodNumber>;
1496
+ }, z.core.$strict>;
1497
+ }, z.core.$strict>;
1498
+ }, z.core.$strict>>, z.ZodObject<{
1499
+ $dataset: z.ZodString;
1500
+ rowCount: z.ZodNumber;
1501
+ bytes: z.ZodNumber;
1502
+ offset: z.ZodOptional<z.ZodNumber>;
1503
+ }, z.core.$strict>]>;
1504
+ }, z.core.$strict>;
1505
+ declare const knowledgeFieldValueSchema: z.ZodJSONSchema;
1506
+ declare const knowledgeExtractFieldsInputSchema: z.ZodObject<{
1507
+ documentId: z.ZodString;
1508
+ schema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1509
+ }, z.core.$strict>;
1510
+ declare const knowledgeExtractFieldsOutputSchema: z.ZodObject<{
1511
+ droppedFields: z.ZodOptional<z.ZodNumber>;
1512
+ failedFields: z.ZodOptional<z.ZodNumber>;
1513
+ path: z.ZodString;
1514
+ date: z.ZodNullable<z.ZodISODate>;
1515
+ type: z.ZodString;
1516
+ fields: z.ZodRecord<z.ZodString, z.ZodObject<{
1517
+ value: z.ZodJSONSchema;
1518
+ page: z.ZodNumber;
1519
+ quote: z.ZodString;
1520
+ }, z.core.$strict>>;
1521
+ }, z.core.$strict>;
1522
+ /** Created by the first ingest, never authored in kb.yaml; the id cannot collide with a connector source. */
1523
+ declare const knowledgeWorkflowSourceSchema: z.ZodObject<{
1524
+ id: z.ZodString;
1525
+ kind: z.ZodLiteral<"workflow">;
1526
+ workflowId: z.ZodString;
1527
+ }, z.core.$strict>;
1528
+ type KnowledgeWorkflowSource = z.infer<typeof knowledgeWorkflowSourceSchema>;
1529
+ /** Contract inventory; completion, batch and dataset are present only where the table declares them. */
1530
+ declare const knowledgeWriteContracts: {
1531
+ readonly ingest: {
1532
+ readonly description: "Ingest items or a dataset into the calling data Workflow's source; complete promises a full pass, withdrawn only after the run succeeds.";
1533
+ readonly inputSchema: z.ZodUnion<readonly [z.ZodObject<{
1534
+ items: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1535
+ itemId: z.ZodString;
1536
+ version: z.ZodString;
1537
+ name: z.ZodString;
1538
+ path: z.ZodOptional<z.ZodString>;
1539
+ originLink: z.ZodOptional<z.ZodURL>;
1540
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
1541
+ fileId: z.ZodOptional<z.ZodNever>;
1542
+ fetch: z.ZodOptional<z.ZodNever>;
1543
+ text: z.ZodString;
1544
+ }, z.core.$strict>, z.ZodObject<{
1545
+ itemId: z.ZodString;
1546
+ version: z.ZodString;
1547
+ name: z.ZodString;
1548
+ path: z.ZodOptional<z.ZodString>;
1549
+ originLink: z.ZodOptional<z.ZodURL>;
1550
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
1551
+ text: z.ZodOptional<z.ZodNever>;
1552
+ fetch: z.ZodOptional<z.ZodNever>;
1553
+ fileId: z.ZodString;
1554
+ }, z.core.$strict>, z.ZodObject<{
1555
+ itemId: z.ZodString;
1556
+ version: z.ZodString;
1557
+ name: z.ZodString;
1558
+ path: z.ZodOptional<z.ZodString>;
1559
+ originLink: z.ZodOptional<z.ZodURL>;
1560
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
1561
+ text: z.ZodOptional<z.ZodNever>;
1562
+ fileId: z.ZodOptional<z.ZodNever>;
1563
+ fetch: z.ZodObject<{
1564
+ connection: z.ZodString;
1565
+ operation: z.ZodString;
1566
+ input: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1567
+ }, z.core.$strict>;
1568
+ }, z.core.$strict>]>>;
1569
+ complete: z.ZodOptional<z.ZodBoolean>;
1570
+ }, z.core.$strict>, z.ZodObject<{
1571
+ dataset: z.ZodObject<{
1572
+ $dataset: z.ZodString;
1573
+ rowCount: z.ZodNumber;
1574
+ bytes: z.ZodNumber;
1575
+ offset: z.ZodOptional<z.ZodNumber>;
1576
+ }, z.core.$strict>;
1577
+ complete: z.ZodOptional<z.ZodBoolean>;
1578
+ }, z.core.$strict>]>;
1579
+ readonly outputSchema: z.ZodObject<{
1580
+ done: z.ZodNumber;
1581
+ failed: z.ZodNumber;
1582
+ failures: z.ZodObject<{
1583
+ $dataset: z.ZodString;
1584
+ rowCount: z.ZodNumber;
1585
+ bytes: z.ZodNumber;
1586
+ offset: z.ZodOptional<z.ZodNumber>;
1587
+ }, z.core.$strict>;
1588
+ accepted: z.ZodNumber;
1589
+ withdrawn: z.ZodNumber;
1590
+ }, z.core.$strict>;
1591
+ readonly effect: "changing";
1592
+ readonly right: "knowledge_base.write";
1593
+ readonly keyLevel: "write";
1594
+ readonly completion: "async";
1595
+ readonly batch: true;
1596
+ };
1597
+ readonly withdraw: {
1598
+ readonly description: "Withdraw item ids from the calling Workflow's source; removed from search immediately.";
1599
+ readonly inputSchema: z.ZodObject<{
1600
+ itemIds: z.ZodArray<z.ZodString>;
1601
+ }, z.core.$strict>;
1602
+ readonly outputSchema: z.ZodObject<{
1603
+ withdrawn: z.ZodNumber;
1604
+ }, z.core.$strict>;
1605
+ readonly effect: "changing";
1606
+ readonly right: "knowledge_base.write";
1607
+ readonly keyLevel: "write";
1608
+ };
1609
+ readonly pending: {
1610
+ readonly description: "Pull pending documents by type and time as a dataset; page text is another dataset reference.";
1611
+ readonly inputSchema: z.ZodObject<{
1612
+ type: z.ZodOptional<z.ZodString>;
1613
+ since: z.ZodOptional<z.ZodISODateTime>;
1614
+ limit: z.ZodNumber;
1615
+ }, z.core.$strict>;
1616
+ readonly outputSchema: z.ZodObject<{
1617
+ documents: z.ZodObject<{
1618
+ $dataset: z.ZodString;
1619
+ rowCount: z.ZodNumber;
1620
+ bytes: z.ZodNumber;
1621
+ offset: z.ZodOptional<z.ZodNumber>;
1622
+ }, z.core.$strict>;
1623
+ }, z.core.$strict>;
1624
+ readonly rowSchema: z.ZodObject<{
1625
+ id: z.ZodString;
1626
+ type: z.ZodString;
1627
+ contentHash: z.ZodString;
1628
+ pages: z.ZodObject<{
1629
+ $dataset: z.ZodString;
1630
+ rowCount: z.ZodNumber;
1631
+ bytes: z.ZodNumber;
1632
+ offset: z.ZodOptional<z.ZodNumber>;
1633
+ }, z.core.$strict>;
1634
+ }, z.core.$strict>;
1635
+ readonly effect: "reading";
1636
+ readonly right: "knowledge_base.read";
1637
+ readonly keyLevel: "read";
1638
+ readonly dataset: true;
1639
+ };
1640
+ readonly put_processed: {
1641
+ readonly description: "Write processor output by document, content hash and Workflow revision, with pages as a dataset reference like pending; the platform validates, chunks and indexes it, with per-item outcomes.";
1642
+ readonly inputSchema: z.ZodObject<{
1643
+ items: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
1644
+ documentId: z.ZodString;
1645
+ contentHash: z.ZodString;
1646
+ workflowRevision: z.ZodString;
1647
+ output: z.ZodObject<{
1648
+ documents: z.ZodArray<z.ZodObject<{
1649
+ pageFrom: z.ZodNumber;
1650
+ pageTo: z.ZodNumber;
1651
+ }, z.core.$strict>>;
1652
+ sections: z.ZodOptional<z.ZodArray<z.ZodObject<{
1653
+ pageFrom: z.ZodNumber;
1654
+ pageTo: z.ZodNumber;
1655
+ title: z.ZodString;
1656
+ }, z.core.$strict>>>;
1657
+ fields: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1658
+ pages: z.ZodObject<{
1659
+ $dataset: z.ZodString;
1660
+ rowCount: z.ZodNumber;
1661
+ bytes: z.ZodNumber;
1662
+ offset: z.ZodOptional<z.ZodNumber>;
1663
+ }, z.core.$strict>;
1664
+ }, z.core.$strict>;
1665
+ }, z.core.$strict>>, z.ZodObject<{
1666
+ $dataset: z.ZodString;
1667
+ rowCount: z.ZodNumber;
1668
+ bytes: z.ZodNumber;
1669
+ offset: z.ZodOptional<z.ZodNumber>;
1670
+ }, z.core.$strict>]>;
1671
+ }, z.core.$strict>;
1672
+ readonly outputSchema: z.ZodObject<{
1673
+ done: z.ZodNumber;
1674
+ failed: z.ZodNumber;
1675
+ failures: z.ZodObject<{
1676
+ $dataset: z.ZodString;
1677
+ rowCount: z.ZodNumber;
1678
+ bytes: z.ZodNumber;
1679
+ offset: z.ZodOptional<z.ZodNumber>;
1680
+ }, z.core.$strict>;
1681
+ }, z.core.$strict>;
1682
+ readonly effect: "changing";
1683
+ readonly right: "knowledge_base.write";
1684
+ readonly keyLevel: "write";
1685
+ readonly batch: true;
1686
+ };
1687
+ readonly extract_fields: {
1688
+ readonly description: "Extract fields by schema through the approved model binding within the Knowledge Base budget; each value carries page and quote evidence.";
1689
+ readonly inputSchema: z.ZodObject<{
1690
+ documentId: z.ZodString;
1691
+ schema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1692
+ }, z.core.$strict>;
1693
+ readonly outputSchema: z.ZodObject<{
1694
+ droppedFields: z.ZodOptional<z.ZodNumber>;
1695
+ failedFields: z.ZodOptional<z.ZodNumber>;
1696
+ path: z.ZodString;
1697
+ date: z.ZodNullable<z.ZodISODate>;
1698
+ type: z.ZodString;
1699
+ fields: z.ZodRecord<z.ZodString, z.ZodObject<{
1700
+ value: z.ZodJSONSchema;
1701
+ page: z.ZodNumber;
1702
+ quote: z.ZodString;
1703
+ }, z.core.$strict>>;
1704
+ }, z.core.$strict>;
1705
+ readonly effect: "reading";
1706
+ readonly right: "knowledge_base.read";
1707
+ readonly keyLevel: "read";
1708
+ };
1709
+ };
1710
+ /** Records rules belong to the Data Store; kb.yaml must never hold them. */
1711
+ declare const knowledgeRecordsRefusalSchema: z.ZodOptional<z.ZodNever>;
1712
+ type KnowledgeIngestInput = z.infer<typeof knowledgeIngestInputSchema>;
1713
+ type KnowledgeIngestOutput = z.infer<typeof knowledgeIngestOutputSchema>;
1714
+ type KnowledgeIngestFetch = z.infer<typeof knowledgeIngestFetchSchema>;
1715
+ type KnowledgeWithdrawInput = z.infer<typeof knowledgeWithdrawInputSchema>;
1716
+ type KnowledgeWithdrawOutput = z.infer<typeof knowledgeWithdrawOutputSchema>;
1717
+ type KnowledgePendingInput = z.infer<typeof knowledgePendingInputSchema>;
1718
+ type KnowledgePendingRow = z.infer<typeof knowledgePendingRowSchema>;
1719
+ type KnowledgePendingOutput = z.infer<typeof knowledgePendingOutputSchema>;
1720
+ type KnowledgePutProcessedInput = z.infer<typeof knowledgePutProcessedInputSchema>;
1721
+ type KnowledgeExtractFieldsInput = z.infer<typeof knowledgeExtractFieldsInputSchema>;
1722
+ type KnowledgeExtractFieldsOutput = z.infer<typeof knowledgeExtractFieldsOutputSchema>;
1723
+
1724
+ /** Paging settings shared by accepted Connections and their API view. */
1725
+ declare const operationPagingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1726
+ by: z.ZodEnum<{
1727
+ page: "page";
1728
+ offset: "offset";
1729
+ }>;
1730
+ param: z.ZodString;
1731
+ sizeParam: z.ZodString;
1732
+ size: z.ZodNumber;
1733
+ start: z.ZodOptional<z.ZodNumber>;
1734
+ }, z.core.$strict>, z.ZodObject<{
1735
+ by: z.ZodEnum<{
1736
+ cursor: "cursor";
1737
+ next_link: "next_link";
1738
+ }>;
1739
+ param: z.ZodString;
1740
+ cursor: z.ZodString;
1741
+ }, z.core.$strict>], "by">;
1742
+ type OperationPaging = z.infer<typeof operationPagingSchema>;
1743
+
1744
+ /** Published data Workflows that fill or process an asset, with unreadable names withheld. */
1745
+ declare const workflowDataFlowsSchema: z.ZodObject<{
1746
+ fills: z.ZodArray<z.ZodObject<{
1747
+ id: z.ZodString;
1748
+ name: z.ZodString;
1749
+ title: z.ZodString;
1750
+ }, z.core.$strip>>;
1751
+ processes: z.ZodArray<z.ZodObject<{
1752
+ id: z.ZodString;
1753
+ name: z.ZodString;
1754
+ title: z.ZodString;
1755
+ }, z.core.$strip>>;
1756
+ hidden: z.ZodObject<{
1757
+ fills: z.ZodNumber;
1758
+ processes: z.ZodNumber;
1759
+ }, z.core.$strip>;
1760
+ truncated: z.ZodBoolean;
1761
+ }, z.core.$strip>;
1762
+
1763
+ declare const RECORDS_PROPOSE_MAX_ITEMS_PER_CALL = 1000;
1764
+ declare const RECORDS_PROPOSE_MAX_FIELDS_PER_ITEM = 1000;
1765
+ declare const RECORDS_FLAGGED_MAX_ITEMS_PER_PAGE = 10000;
1766
+ declare const dataStoreRecordsRuleSchema: z.ZodObject<{
1767
+ table: z.ZodString;
1768
+ key: z.ZodUnion<readonly [z.ZodObject<{
1769
+ column: z.ZodString;
1770
+ fromPath: z.ZodString;
1771
+ }, z.core.$strict>, z.ZodObject<{
1772
+ column: z.ZodString;
1773
+ fromField: z.ZodString;
1774
+ }, z.core.$strict>]>;
1775
+ precedence: z.ZodDefault<z.ZodArray<z.ZodString>>;
1776
+ review: z.ZodDefault<z.ZodObject<{
1777
+ always: z.ZodDefault<z.ZodArray<z.ZodString>>;
1778
+ }, z.core.$strict>>;
1779
+ retainWithoutSource: z.ZodDefault<z.ZodBoolean>;
1780
+ }, z.core.$strict>;
1781
+ type DataStoreRecordsRule = z.infer<typeof dataStoreRecordsRuleSchema>;
1782
+ /** A necessary condition, never a model confidence score or proof of correctness. */
1783
+ declare const recordEvidenceResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1784
+ status: z.ZodLiteral<"passed">;
1785
+ }, z.core.$strict>, z.ZodObject<{
1786
+ status: z.ZodLiteral<"failed">;
1787
+ reason: z.ZodEnum<{
1788
+ page_not_found: "page_not_found";
1789
+ quote_not_found: "quote_not_found";
1790
+ value_not_parsed: "value_not_parsed";
1791
+ }>;
1792
+ }, z.core.$strict>], "status">;
1793
+ type RecordEvidenceResult = z.infer<typeof recordEvidenceResultSchema>;
1794
+ declare const RECORD_FIELD_STATES: readonly ["extracted", "confirmed", "corrected", "conflict"];
1795
+ declare const RECORD_FIELD_FAILURE_CODES: readonly ["record_field_unknown"];
1796
+ declare const dataStoreRecordProposalItemSchema: z.ZodObject<{
1797
+ knowledgeBaseId: z.ZodString;
1798
+ documentId: z.ZodString;
1799
+ kind: z.ZodString;
1800
+ documentDate: z.ZodNullable<z.ZodISODate>;
1801
+ path: z.ZodOptional<z.ZodString>;
1802
+ fields: z.ZodArray<z.ZodObject<{
1803
+ value: z.ZodJSONSchema;
1804
+ page: z.ZodNumber;
1805
+ quote: z.ZodString;
1806
+ name: z.ZodString;
1807
+ }, z.core.$strict>>;
1808
+ }, z.core.$strict>;
1809
+ type DataStoreRecordProposalItem = z.infer<typeof dataStoreRecordProposalItemSchema>;
1810
+ declare const dataStoreRecordsProposeInputSchema: z.ZodObject<{
1811
+ table: z.ZodString;
1812
+ items: z.ZodArray<z.ZodObject<{
1813
+ knowledgeBaseId: z.ZodString;
1814
+ documentId: z.ZodString;
1815
+ kind: z.ZodString;
1816
+ documentDate: z.ZodNullable<z.ZodISODate>;
1817
+ path: z.ZodOptional<z.ZodString>;
1818
+ fields: z.ZodArray<z.ZodObject<{
1819
+ value: z.ZodJSONSchema;
1820
+ page: z.ZodNumber;
1821
+ quote: z.ZodString;
1822
+ name: z.ZodString;
1823
+ }, z.core.$strict>>;
1824
+ }, z.core.$strict>>;
1825
+ }, z.core.$strict>;
1826
+ type DataStoreRecordsProposeInput = z.infer<typeof dataStoreRecordsProposeInputSchema>;
1827
+ declare const dataStoreRecordsDecideInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1828
+ table: z.ZodString;
1829
+ key: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
1830
+ field: z.ZodString;
1831
+ documentId: z.ZodOptional<z.ZodString>;
1832
+ knowledgeBaseId: z.ZodOptional<z.ZodString>;
1833
+ action: z.ZodLiteral<"confirm">;
1834
+ }, z.core.$strict>, z.ZodObject<{
1835
+ table: z.ZodString;
1836
+ key: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
1837
+ field: z.ZodString;
1838
+ documentId: z.ZodOptional<z.ZodString>;
1839
+ knowledgeBaseId: z.ZodOptional<z.ZodString>;
1840
+ action: z.ZodLiteral<"correct">;
1841
+ value: z.ZodJSONSchema;
1842
+ }, z.core.$strict>, z.ZodObject<{
1843
+ table: z.ZodString;
1844
+ key: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
1845
+ field: z.ZodString;
1846
+ action: z.ZodLiteral<"assign">;
1847
+ documentId: z.ZodString;
1848
+ knowledgeBaseId: z.ZodString;
1849
+ }, z.core.$strict>], "action">;
1850
+ type DataStoreRecordsDecideInput = z.infer<typeof dataStoreRecordsDecideInputSchema>;
1851
+ declare const dataStoreRecordsDecideOutputSchema: z.ZodObject<{
1852
+ decided: z.ZodLiteral<true>;
1853
+ }, z.core.$strict>;
1854
+ declare const dataStoreRecordsFlaggedInputSchema: z.ZodObject<{
1855
+ table: z.ZodOptional<z.ZodString>;
1856
+ cursor: z.ZodOptional<z.ZodString>;
1857
+ limit: z.ZodNumber;
1858
+ }, z.core.$strict>;
1859
+ declare const dataStoreRecordFieldSchema: z.ZodObject<{
1860
+ value: z.ZodJSONSchema;
1861
+ page: z.ZodNumber;
1862
+ quote: z.ZodString;
1863
+ name: z.ZodString;
1864
+ table: z.ZodString;
1865
+ key: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1866
+ knowledgeBaseId: z.ZodString;
1867
+ documentId: z.ZodString;
1868
+ kind: z.ZodString;
1869
+ documentDate: z.ZodNullable<z.ZodISODate>;
1870
+ extractedAt: z.ZodISODateTime;
1871
+ evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
1872
+ status: z.ZodLiteral<"passed">;
1873
+ }, z.core.$strict>, z.ZodObject<{
1874
+ status: z.ZodLiteral<"failed">;
1875
+ reason: z.ZodEnum<{
1876
+ page_not_found: "page_not_found";
1877
+ quote_not_found: "quote_not_found";
1878
+ value_not_parsed: "value_not_parsed";
1879
+ }>;
1880
+ }, z.core.$strict>], "status">;
1881
+ state: z.ZodEnum<{
1882
+ confirmed: "confirmed";
1883
+ extracted: "extracted";
1884
+ corrected: "corrected";
1885
+ conflict: "conflict";
1886
+ }>;
1887
+ decidedBy: z.ZodNullable<z.ZodString>;
1888
+ decidedAt: z.ZodNullable<z.ZodISODateTime>;
1889
+ }, z.core.$strict>;
1890
+ type DataStoreRecordField = z.infer<typeof dataStoreRecordFieldSchema>;
1891
+ declare const dataStoreRecordsFlaggedOutputSchema: z.ZodObject<{
1892
+ items: z.ZodArray<z.ZodObject<{
1893
+ value: z.ZodJSONSchema;
1894
+ page: z.ZodNumber;
1895
+ quote: z.ZodString;
1896
+ name: z.ZodString;
1897
+ table: z.ZodString;
1898
+ key: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1899
+ knowledgeBaseId: z.ZodString;
1900
+ documentId: z.ZodString;
1901
+ kind: z.ZodString;
1902
+ documentDate: z.ZodNullable<z.ZodISODate>;
1903
+ extractedAt: z.ZodISODateTime;
1904
+ evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
1905
+ status: z.ZodLiteral<"passed">;
1906
+ }, z.core.$strict>, z.ZodObject<{
1907
+ status: z.ZodLiteral<"failed">;
1908
+ reason: z.ZodEnum<{
1909
+ page_not_found: "page_not_found";
1910
+ quote_not_found: "quote_not_found";
1911
+ value_not_parsed: "value_not_parsed";
1912
+ }>;
1913
+ }, z.core.$strict>], "status">;
1914
+ state: z.ZodEnum<{
1915
+ confirmed: "confirmed";
1916
+ extracted: "extracted";
1917
+ corrected: "corrected";
1918
+ conflict: "conflict";
1919
+ }>;
1920
+ decidedBy: z.ZodNullable<z.ZodString>;
1921
+ decidedAt: z.ZodNullable<z.ZodISODateTime>;
1922
+ reason: z.ZodEnum<{
1923
+ conflict: "conflict";
1924
+ not_evidenced: "not_evidenced";
1925
+ confirmation_required: "confirmation_required";
1926
+ key_unresolved: "key_unresolved";
1927
+ }>;
1928
+ }, z.core.$strict>>;
1929
+ nextCursor: z.ZodOptional<z.ZodString>;
1930
+ }, z.core.$strict>;
1931
+ type ColumnType = (typeof DATA_STORE_SCALAR_TYPES)[number];
1932
+ interface RecordColumn {
1933
+ name: string;
1934
+ type: ColumnType | `${ColumnType}[]` | "other";
1935
+ nullable: boolean;
1936
+ generated?: boolean;
1937
+ }
1938
+ /**
1939
+ * Validate a whole item before any candidate or customer row is written. The batch writer
1940
+ * maps this refusal to record_field_unknown for that item and continues with other items.
1941
+ * Types come from the store catalog, never from the caller's extraction schema.
1942
+ */
1943
+ declare function proposalItemSchemaFor(columns: readonly RecordColumn[]): z.ZodObject<{
1944
+ knowledgeBaseId: z.ZodString;
1945
+ documentId: z.ZodString;
1946
+ kind: z.ZodString;
1947
+ documentDate: z.ZodNullable<z.ZodISODate>;
1948
+ path: z.ZodOptional<z.ZodString>;
1949
+ fields: z.ZodArray<z.ZodObject<{
1950
+ value: z.ZodJSONSchema;
1951
+ page: z.ZodNumber;
1952
+ quote: z.ZodString;
1953
+ name: z.ZodString;
1954
+ }, z.core.$strict>>;
1955
+ }, z.core.$strict>;
1956
+ /** Contracts only: REC-1a/1b/2 register the implementations, not REC-0. */
1957
+ declare const dataStoreRecordsContracts: {
1958
+ readonly propose: {
1959
+ readonly description: "Propose extracted fields with Knowledge Base/document/page/quote evidence. Validate each whole item against the published table before writing; failures are per item. Send at most 1000 items per call and 1000 fields per item; split larger work into batches. Merge by evidence precedence, then document date; unresolved keys and evidence go to review.";
1960
+ readonly inputSchema: z.ZodObject<{
1961
+ table: z.ZodString;
1962
+ items: z.ZodArray<z.ZodObject<{
1963
+ knowledgeBaseId: z.ZodString;
1964
+ documentId: z.ZodString;
1965
+ kind: z.ZodString;
1966
+ documentDate: z.ZodNullable<z.ZodISODate>;
1967
+ path: z.ZodOptional<z.ZodString>;
1968
+ fields: z.ZodArray<z.ZodObject<{
1969
+ value: z.ZodJSONSchema;
1970
+ page: z.ZodNumber;
1971
+ quote: z.ZodString;
1972
+ name: z.ZodString;
1973
+ }, z.core.$strict>>;
1974
+ }, z.core.$strict>>;
1975
+ }, z.core.$strict>;
1976
+ readonly outputSchema: z.ZodObject<{
1977
+ done: z.ZodNumber;
1978
+ failed: z.ZodNumber;
1979
+ failures: z.ZodObject<{
1980
+ $dataset: z.ZodString;
1981
+ rowCount: z.ZodNumber;
1982
+ bytes: z.ZodNumber;
1983
+ offset: z.ZodOptional<z.ZodNumber>;
1984
+ }, z.core.$strict>;
1985
+ }, z.core.$strict>;
1986
+ readonly itemSchemaFor: typeof proposalItemSchemaFor;
1987
+ readonly effect: "changing";
1988
+ readonly right: "data_store.records";
1989
+ readonly keyLevel: "write";
1990
+ readonly batch: true;
1991
+ };
1992
+ readonly decide: {
1993
+ readonly description: "Confirm or correct a field against its evidence, or assign a document to an object key. Decisions are pinned; audit table/field/action/actor only, never the value.";
1994
+ readonly inputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1995
+ table: z.ZodString;
1996
+ key: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
1997
+ field: z.ZodString;
1998
+ documentId: z.ZodOptional<z.ZodString>;
1999
+ knowledgeBaseId: z.ZodOptional<z.ZodString>;
2000
+ action: z.ZodLiteral<"confirm">;
2001
+ }, z.core.$strict>, z.ZodObject<{
2002
+ table: z.ZodString;
2003
+ key: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
2004
+ field: z.ZodString;
2005
+ documentId: z.ZodOptional<z.ZodString>;
2006
+ knowledgeBaseId: z.ZodOptional<z.ZodString>;
2007
+ action: z.ZodLiteral<"correct">;
2008
+ value: z.ZodJSONSchema;
2009
+ }, z.core.$strict>, z.ZodObject<{
2010
+ table: z.ZodString;
2011
+ key: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
2012
+ field: z.ZodString;
2013
+ action: z.ZodLiteral<"assign">;
2014
+ documentId: z.ZodString;
2015
+ knowledgeBaseId: z.ZodString;
2016
+ }, z.core.$strict>], "action">;
2017
+ readonly outputSchema: z.ZodObject<{
2018
+ decided: z.ZodLiteral<true>;
2019
+ }, z.core.$strict>;
2020
+ readonly effect: "changing";
2021
+ readonly right: "data_store.records";
2022
+ readonly keyLevel: "write";
2023
+ };
2024
+ readonly flagged: {
2025
+ readonly description: "Page through fields needing review, up to 10000 per call; pass nextCursor as cursor for the next page. Check Knowledge Base access before showing any document citation; the store right alone does not grant access to source documents.";
2026
+ readonly inputSchema: z.ZodObject<{
2027
+ table: z.ZodOptional<z.ZodString>;
2028
+ cursor: z.ZodOptional<z.ZodString>;
2029
+ limit: z.ZodNumber;
2030
+ }, z.core.$strict>;
2031
+ readonly outputSchema: z.ZodObject<{
2032
+ items: z.ZodArray<z.ZodObject<{
2033
+ value: z.ZodJSONSchema;
2034
+ page: z.ZodNumber;
2035
+ quote: z.ZodString;
2036
+ name: z.ZodString;
2037
+ table: z.ZodString;
2038
+ key: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
2039
+ knowledgeBaseId: z.ZodString;
2040
+ documentId: z.ZodString;
2041
+ kind: z.ZodString;
2042
+ documentDate: z.ZodNullable<z.ZodISODate>;
2043
+ extractedAt: z.ZodISODateTime;
2044
+ evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
2045
+ status: z.ZodLiteral<"passed">;
2046
+ }, z.core.$strict>, z.ZodObject<{
2047
+ status: z.ZodLiteral<"failed">;
2048
+ reason: z.ZodEnum<{
2049
+ page_not_found: "page_not_found";
2050
+ quote_not_found: "quote_not_found";
2051
+ value_not_parsed: "value_not_parsed";
2052
+ }>;
2053
+ }, z.core.$strict>], "status">;
2054
+ state: z.ZodEnum<{
2055
+ confirmed: "confirmed";
2056
+ extracted: "extracted";
2057
+ corrected: "corrected";
2058
+ conflict: "conflict";
2059
+ }>;
2060
+ decidedBy: z.ZodNullable<z.ZodString>;
2061
+ decidedAt: z.ZodNullable<z.ZodISODateTime>;
2062
+ reason: z.ZodEnum<{
2063
+ conflict: "conflict";
2064
+ not_evidenced: "not_evidenced";
2065
+ confirmation_required: "confirmation_required";
2066
+ key_unresolved: "key_unresolved";
2067
+ }>;
2068
+ }, z.core.$strict>>;
2069
+ nextCursor: z.ZodOptional<z.ZodString>;
2070
+ }, z.core.$strict>;
2071
+ readonly effect: "reading";
2072
+ readonly right: "data_store.records";
2073
+ readonly keyLevel: "read";
2074
+ };
2075
+ };
2076
+ type DataStoreRecordsDecideOutput = z.infer<typeof dataStoreRecordsDecideOutputSchema>;
2077
+ type DataStoreRecordsFlaggedInput = z.infer<typeof dataStoreRecordsFlaggedInputSchema>;
2078
+ type DataStoreRecordsFlaggedOutput = z.infer<typeof dataStoreRecordsFlaggedOutputSchema>;
2079
+
2080
+ /** The UTC counter windows, metrics and scopes a model usage refusal may name. */
2081
+ declare const MODEL_USAGE_LIMIT_PERIODS: readonly ["day", "month"];
2082
+ declare const MODEL_USAGE_LIMIT_METRICS: readonly ["modelCallCount", "tokens", "costMicros"];
2083
+ declare const MODEL_USAGE_LIMIT_SCOPES: readonly ["instance", "user", "system"];
2084
+ /** The limit that refused a call: its period, what it counts, and whose counter it is. */
2085
+ interface ModelUsageRefusal {
2086
+ period: (typeof MODEL_USAGE_LIMIT_PERIODS)[number];
2087
+ metric: (typeof MODEL_USAGE_LIMIT_METRICS)[number];
2088
+ /**
2089
+ * `user`: the person's own calls. `system`: the calls the product makes for a person, or
2090
+ * those no person made. `instance`: the spend budget everyone shares.
2091
+ */
2092
+ scope: (typeof MODEL_USAGE_LIMIT_SCOPES)[number];
2093
+ }
2094
+
2095
+ /**
2096
+ * The JSON Schema `format` of a string field that takes Markdown, such as the body of
2097
+ * `mail.send`. In such a field a referenced list of strings joins as a bulleted list and a
2098
+ * list of flat records as a table, and every referenced value is escaped as Markdown text.
2099
+ */
2100
+ declare const WORKFLOW_TEXT_FORMAT_MARKDOWN = "markdown";
2101
+ /** The most parts one joined text has. */
2102
+ declare const WORKFLOW_TEXT_MAX_PARTS = 100;
2103
+ /** A referenced list in a Markdown field joins as at most this many rows; more is refused. */
2104
+ declare const WORKFLOW_MARKDOWN_MAX_ROWS = 100;
2105
+ /** A referenced list of records joins as a table of at most this many columns. */
2106
+ declare const WORKFLOW_MARKDOWN_MAX_COLUMNS = 8;
2107
+
2108
+ /** The platform operation. It exists on an instance only while `outbound.enabled` is true. */
2109
+ declare const MAIL_SEND_OPERATION = "mail.send";
2110
+ /** The resource kind of a sender. Its right is `mail_sender.use`, on one sender. */
2111
+ declare const MAIL_SENDER_RESOURCE_KIND = "mail_sender";
2112
+ declare const MAIL_SENDER_USE_ACTION = "mail_sender.use";
2113
+ /** The instance's own mailer (`infrastructure.mail`), the only sender until MAIL-M365S. */
2114
+ declare const MAIL_SENDER_SYSTEM = "system";
2115
+ /** The prefix of a Connection sender (MAIL-M365S, MAIL-M365P): `connection.<name>`. */
2116
+ declare const MAIL_SENDER_CONNECTION_PREFIX = "connection.";
2117
+ /**
2118
+ * The icon key the step shows for the system sender. An assembly may register the instance's
2119
+ * mark under it; without one the generic mail icon stands. A Connection sender shows its
2120
+ * Connection's `service` icon. The transport (Mailjet, capture, SMTP) never has an icon.
2121
+ */
2122
+ declare const MAIL_SENDER_SYSTEM_ICON = "system-mail";
2123
+ /** The template `packages/mail` renders a mail of `mail.send` in. */
2124
+ declare const MAIL_WORKFLOW_MESSAGE_TEMPLATE = "workflow-message";
2125
+ /** Addresses of one mail once `{ workspace }` recipients are expanded, over to, cc and bcc. */
2126
+ declare const MAIL_SEND_MAX_ADDRESSES = 50;
2127
+ declare const MAIL_SUBJECT_MAX_LENGTH = 200;
2128
+ declare const MAIL_BODY_MAX_BYTES: number;
2129
+ declare const MAIL_SENDER_NAME_MAX_LENGTH = 80;
2130
+ /** The longest address RFC 5321 lets through a path. */
2131
+ declare const MAIL_ADDRESS_MAX_LENGTH = 254;
2132
+ /** `infrastructure.mail.outbound.limits` unless release config sets them; only it raises them. */
2133
+ declare const MAIL_OUTBOUND_DEFAULT_LIMITS: {
2134
+ readonly perWorkflowPerHour: 200;
2135
+ readonly perInstancePerDay: 1000;
2136
+ };
2137
+ /** One language's legal footer (§ 37a HGB company details), as plain text. */
2138
+ declare const MAIL_OUTBOUND_FOOTER_MAX_LENGTH = 2000;
2139
+ /** `mail.sent` names at most this many distinct recipient domains, then counts the rest. */
2140
+ declare const MAIL_AUDIT_MAX_DOMAINS = 10;
2141
+ /** Reserved for MAIL-4: Managed Files and datasets of the run, together. */
2142
+ declare const MAIL_ATTACHMENTS_MAX_FILES = 10;
2143
+ declare const MAIL_ATTACHMENTS_MAX_BYTES: number;
2144
+ /**
2145
+ * Why `mail.send` refused or failed a mail, as `details.reason` of a VALIDATION_FAILED and as
2146
+ * the code of a failed step. None is retried.
2147
+ * - `recipient_not_allowed`: an address outside `recipientDomains` that is not a person of the
2148
+ * instance, or such a `replyTo`. `details.domain` names its domain. Nothing is sent to any
2149
+ * recipient of the mail.
2150
+ * - `no_recipient`: `to` named people or workspaces, and none of them has an address.
2151
+ * - `workspace_not_allowed`: a `{ workspace }` recipient is not a Shared Workspace the author
2152
+ * of the mail can see: they are no member of it and no instance admin (MAIL-2). The author
2153
+ * is the person who saves, publishes or tests the Workflow, or for whom an agent calls; in a
2154
+ * published run, its publisher. Nothing is sent and no member of it is named.
2155
+ * - `mail_rejected`: the provider refused the mail before accepting it. `details.providerCode`
2156
+ * holds the provider's own code; its text is never kept.
2157
+ * A transient failure is not one of these: a refused connection is retried by the step's
2158
+ * attempts, and an answer lost after the request left is `operation_interrupted`.
2159
+ */
2160
+ declare const MAIL_SEND_ERROR_CODES: {
2161
+ readonly recipientNotAllowed: "recipient_not_allowed";
2162
+ readonly noRecipient: "no_recipient";
2163
+ readonly mailRejected: "mail_rejected";
2164
+ readonly workspaceNotAllowed: "workspace_not_allowed";
2165
+ };
2166
+ type MailSendErrorCode = (typeof MAIL_SEND_ERROR_CODES)[keyof typeof MAIL_SEND_ERROR_CODES];
2167
+ declare const MAIL_SEND_REFUSAL_REASONS: readonly ["recipient_not_allowed", "no_recipient", "mail_rejected", "workspace_not_allowed"];
2168
+ /** `details` of a refused `mail.send`: the one refused domain, or the provider's code. */
2169
+ declare const mailSendRefusalDetailsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2170
+ reason: z.ZodLiteral<"recipient_not_allowed">;
2171
+ domain: z.ZodString;
2172
+ }, z.core.$strict>, z.ZodObject<{
2173
+ reason: z.ZodLiteral<"no_recipient">;
2174
+ }, z.core.$strict>, z.ZodObject<{
2175
+ reason: z.ZodLiteral<"workspace_not_allowed">;
2176
+ }, z.core.$strict>, z.ZodObject<{
2177
+ reason: z.ZodLiteral<"mail_rejected">;
2178
+ providerCode: z.ZodOptional<z.ZodString>;
2179
+ }, z.core.$strict>], "reason">;
2180
+ type MailSendRefusalDetails = z.infer<typeof mailSendRefusalDetailsSchema>;
2181
+ /** A user or workspace id, as `NOTICE_ID_PATTERN` of core reads it. */
2182
+ declare const MAIL_RECIPIENT_ID_PATTERN: RegExp;
2183
+ /** One address as written. Its domain is compared without regard to case. */
2184
+ declare const mailAddressSchema: z.ZodEmail;
2185
+ /**
2186
+ * A domain of `recipientDomains`, lowercase: `kanzlei.de` matches that domain only,
2187
+ * `*.kanzlei.de` its subdomains and not the domain itself. `*` alone admits every address.
2188
+ */
2189
+ declare const MAIL_RECIPIENT_DOMAIN_PATTERN: RegExp;
2190
+ declare const MAIL_RECIPIENT_DOMAINS_ANY = "*";
2191
+ declare const mailRecipientDomainSchema: z.ZodString;
2192
+ /**
2193
+ * Which sender the mail goes out as. `system` until MAIL-M365S; `connection.<name>` is
2194
+ * reserved and refused with `not_supported_yet`.
2195
+ */
2196
+ declare const mailSenderIdSchema: z.ZodUnion<readonly [z.ZodLiteral<"system">, z.ZodTemplateLiteral<`connection.${string}`>]>;
2197
+ type MailSenderId = typeof MAIL_SENDER_SYSTEM | `connection.${string}`;
2198
+ /**
2199
+ * One recipient of a literal list: an address, a person of the instance by id, or a workspace,
2200
+ * which stands for its members. A person or member without an address is skipped and counted.
2201
+ */
2202
+ declare const mailRecipientSchema: z.ZodUnion<readonly [z.ZodObject<{
2203
+ address: z.ZodEmail;
2204
+ }, z.core.$strict>, z.ZodObject<{
2205
+ user: z.ZodString;
2206
+ }, z.core.$strict>, z.ZodObject<{
2207
+ workspace: z.ZodString;
2208
+ }, z.core.$strict>]>;
2209
+ type MailSendRecipient = z.infer<typeof mailRecipientSchema>;
2210
+ declare const mailRecipientListSchema: z.ZodUnion<readonly [z.ZodEmail, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodUnion<readonly [z.ZodObject<{
2211
+ address: z.ZodEmail;
2212
+ }, z.core.$strict>, z.ZodObject<{
2213
+ user: z.ZodString;
2214
+ }, z.core.$strict>, z.ZodObject<{
2215
+ workspace: z.ZodString;
2216
+ }, z.core.$strict>]>, z.ZodObject<{
2217
+ email: z.ZodEmail;
2218
+ }, z.core.$loose>]>>]>;
2219
+ type MailSendRecipientList = z.infer<typeof mailRecipientListSchema>;
2220
+ /**
2221
+ * What `cc` and `bcc` take: as `to`, and an empty list too, since a referenced list of copy
2222
+ * recipients may hold nobody and the mail still goes to `to`.
2223
+ */
2224
+ declare const mailCopyRecipientListSchema: z.ZodUnion<readonly [z.ZodEmail, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodUnion<readonly [z.ZodObject<{
2225
+ address: z.ZodEmail;
2226
+ }, z.core.$strict>, z.ZodObject<{
2227
+ user: z.ZodString;
2228
+ }, z.core.$strict>, z.ZodObject<{
2229
+ workspace: z.ZodString;
2230
+ }, z.core.$strict>]>, z.ZodObject<{
2231
+ email: z.ZodEmail;
2232
+ }, z.core.$loose>]>>]>;
2233
+ /** One address, or a person of the instance. The recipient rule applies to it as to `to`. */
2234
+ declare const mailReplyToSchema: z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
2235
+ address: z.ZodEmail;
2236
+ }, z.core.$strict>, z.ZodObject<{
2237
+ user: z.ZodString;
2238
+ }, z.core.$strict>]>;
2239
+ /** One line of 1 to 200 characters with something besides spaces. */
2240
+ declare const mailSubjectSchema: z.ZodString;
2241
+ /**
2242
+ * The author's Markdown, rendered on the server: no raw HTML, no image, links over `https`,
2243
+ * `http` and `mailto` only. `format: markdown` is what makes a mapped field join lists and
2244
+ * tables (EW-TEXT) and escape every referenced value, and a field mapped as one reference show
2245
+ * each link's address after its label (MAIL-2).
2246
+ */
2247
+ declare const mailBodySchema: z.ZodString;
2248
+ /** The display name on the From line. The address stays the sender's. */
2249
+ declare const mailSenderNameSchema: z.ZodString;
2250
+ /**
2251
+ * The input of `mail.send`, as the operation reads it after a step's mapping is resolved. Each
2252
+ * field of a step's mapping takes a literal, a reference or, for the strings, text joined
2253
+ * from parts (EW-TEXT). `attachments` arrives with MAIL-4 and is refused until then.
2254
+ */
2255
+ declare const mailSendInputSchema: z.ZodObject<{
2256
+ sender: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"system">, z.ZodTemplateLiteral<`connection.${string}`>]>>;
2257
+ to: z.ZodUnion<readonly [z.ZodEmail, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodUnion<readonly [z.ZodObject<{
2258
+ address: z.ZodEmail;
2259
+ }, z.core.$strict>, z.ZodObject<{
2260
+ user: z.ZodString;
2261
+ }, z.core.$strict>, z.ZodObject<{
2262
+ workspace: z.ZodString;
2263
+ }, z.core.$strict>]>, z.ZodObject<{
2264
+ email: z.ZodEmail;
2265
+ }, z.core.$loose>]>>]>;
2266
+ cc: z.ZodOptional<z.ZodUnion<readonly [z.ZodEmail, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodUnion<readonly [z.ZodObject<{
2267
+ address: z.ZodEmail;
2268
+ }, z.core.$strict>, z.ZodObject<{
2269
+ user: z.ZodString;
2270
+ }, z.core.$strict>, z.ZodObject<{
2271
+ workspace: z.ZodString;
2272
+ }, z.core.$strict>]>, z.ZodObject<{
2273
+ email: z.ZodEmail;
2274
+ }, z.core.$loose>]>>]>>;
2275
+ bcc: z.ZodOptional<z.ZodUnion<readonly [z.ZodEmail, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodUnion<readonly [z.ZodObject<{
2276
+ address: z.ZodEmail;
2277
+ }, z.core.$strict>, z.ZodObject<{
2278
+ user: z.ZodString;
2279
+ }, z.core.$strict>, z.ZodObject<{
2280
+ workspace: z.ZodString;
2281
+ }, z.core.$strict>]>, z.ZodObject<{
2282
+ email: z.ZodEmail;
2283
+ }, z.core.$loose>]>>]>>;
2284
+ subject: z.ZodString;
2285
+ body: z.ZodString;
2286
+ senderName: z.ZodOptional<z.ZodString>;
2287
+ replyTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
2288
+ address: z.ZodEmail;
2289
+ }, z.core.$strict>, z.ZodObject<{
2290
+ user: z.ZodString;
2291
+ }, z.core.$strict>]>>;
2292
+ locale: z.ZodOptional<z.ZodEnum<{
2293
+ en: "en";
2294
+ de: "de";
2295
+ }>>;
2296
+ }, z.core.$strict>;
2297
+ type MailSendInput = z.infer<typeof mailSendInputSchema>;
2298
+ type MailSendInputFields = z.input<typeof mailSendInputSchema>;
2299
+ /**
2300
+ * What a live or test send answers: counts and the provider's message id, never an address.
2301
+ * `skipped` counts people and members without an address. `test` marks "Run live once",
2302
+ * which sent to the tester alone.
2303
+ */
2304
+ declare const mailSendOutputSchema: z.ZodObject<{
2305
+ sentAt: z.ZodISODateTime;
2306
+ messageId: z.ZodOptional<z.ZodString>;
2307
+ recipients: z.ZodObject<{
2308
+ to: z.ZodNumber;
2309
+ cc: z.ZodNumber;
2310
+ bcc: z.ZodNumber;
2311
+ }, z.core.$strict>;
2312
+ skipped: z.ZodNumber;
2313
+ test: z.ZodOptional<z.ZodLiteral<true>>;
2314
+ }, z.core.$strict>;
2315
+ type MailSendOutput = z.infer<typeof mailSendOutputSchema>;
2316
+ /** A recipient as a preview names it: a person by name, an address as written. */
2317
+ declare const mailPreviewRecipientSchema: z.ZodObject<{
2318
+ kind: z.ZodEnum<{
2319
+ address: "address";
2320
+ person: "person";
2321
+ }>;
2322
+ label: z.ZodString;
2323
+ }, z.core.$strict>;
2324
+ type MailPreviewRecipient = z.infer<typeof mailPreviewRecipientSchema>;
2325
+ /**
2326
+ * The mail as it would go out, checked against the recipient rule. It is step data of a test
2327
+ * run and the confirmation card's content; it is never audit data.
2328
+ */
2329
+ declare const mailSendPreviewSchema: z.ZodObject<{
2330
+ from: z.ZodObject<{
2331
+ name: z.ZodString;
2332
+ address: z.ZodEmail;
2333
+ }, z.core.$strict>;
2334
+ replyTo: z.ZodOptional<z.ZodEmail>;
2335
+ to: z.ZodArray<z.ZodObject<{
2336
+ kind: z.ZodEnum<{
2337
+ address: "address";
2338
+ person: "person";
2339
+ }>;
2340
+ label: z.ZodString;
2341
+ }, z.core.$strict>>;
2342
+ cc: z.ZodArray<z.ZodObject<{
2343
+ kind: z.ZodEnum<{
2344
+ address: "address";
2345
+ person: "person";
2346
+ }>;
2347
+ label: z.ZodString;
2348
+ }, z.core.$strict>>;
2349
+ bcc: z.ZodArray<z.ZodObject<{
2350
+ kind: z.ZodEnum<{
2351
+ address: "address";
2352
+ person: "person";
2353
+ }>;
2354
+ label: z.ZodString;
2355
+ }, z.core.$strict>>;
2356
+ skipped: z.ZodNumber;
2357
+ subject: z.ZodString;
2358
+ html: z.ZodString;
2359
+ text: z.ZodString;
2360
+ }, z.core.$strict>;
2361
+ type MailSendPreview = z.infer<typeof mailSendPreviewSchema>;
2362
+ /** What a simulated call (a test run's `dry_run`, an agent preview turn) answers. */
2363
+ declare const mailSendSimulatedOutputSchema: z.ZodObject<{
2364
+ simulated: z.ZodLiteral<true>;
2365
+ preview: z.ZodObject<{
2366
+ from: z.ZodObject<{
2367
+ name: z.ZodString;
2368
+ address: z.ZodEmail;
2369
+ }, z.core.$strict>;
2370
+ replyTo: z.ZodOptional<z.ZodEmail>;
2371
+ to: z.ZodArray<z.ZodObject<{
2372
+ kind: z.ZodEnum<{
2373
+ address: "address";
2374
+ person: "person";
2375
+ }>;
2376
+ label: z.ZodString;
2377
+ }, z.core.$strict>>;
2378
+ cc: z.ZodArray<z.ZodObject<{
2379
+ kind: z.ZodEnum<{
2380
+ address: "address";
2381
+ person: "person";
2382
+ }>;
2383
+ label: z.ZodString;
2384
+ }, z.core.$strict>>;
2385
+ bcc: z.ZodArray<z.ZodObject<{
2386
+ kind: z.ZodEnum<{
2387
+ address: "address";
2388
+ person: "person";
2389
+ }>;
2390
+ label: z.ZodString;
2391
+ }, z.core.$strict>>;
2392
+ skipped: z.ZodNumber;
2393
+ subject: z.ZodString;
2394
+ html: z.ZodString;
2395
+ text: z.ZodString;
2396
+ }, z.core.$strict>;
2397
+ }, z.core.$strict>;
2398
+ type MailSendSimulatedOutput = z.infer<typeof mailSendSimulatedOutputSchema>;
2399
+ /**
2400
+ * The params of the template `workflow-message`, per mail. The frame (the instance's name,
2401
+ * embedded logo, accent colour and `outbound.footer`) is the instance's and not a param; the
2402
+ * envelope (From name, to, cc, bcc, Reply-To) is the message's and not a param either.
2403
+ * `markdown` arrives with every joined referenced value already escaped, and a body mapped as
2404
+ * one reference with each link's address shown. `test` puts "[Test]" before
2405
+ * the subject and lists whom the mail would have reached.
2406
+ */
2407
+ declare const workflowMessageMailParamsSchema: z.ZodObject<{
2408
+ subject: z.ZodString;
2409
+ markdown: z.ZodString;
2410
+ sentBy: z.ZodDiscriminatedUnion<[z.ZodObject<{
2411
+ kind: z.ZodLiteral<"workflow">;
2412
+ workflowName: z.ZodString;
2413
+ }, z.core.$strict>, z.ZodObject<{
2414
+ kind: z.ZodLiteral<"agent">;
2415
+ onBehalfOf: z.ZodString;
2416
+ }, z.core.$strict>], "kind">;
2417
+ test: z.ZodOptional<z.ZodObject<{
2418
+ intendedRecipients: z.ZodObject<{
2419
+ to: z.ZodArray<z.ZodObject<{
2420
+ kind: z.ZodEnum<{
2421
+ address: "address";
2422
+ person: "person";
2423
+ }>;
2424
+ label: z.ZodString;
2425
+ }, z.core.$strict>>;
2426
+ cc: z.ZodArray<z.ZodObject<{
2427
+ kind: z.ZodEnum<{
2428
+ address: "address";
2429
+ person: "person";
2430
+ }>;
2431
+ label: z.ZodString;
2432
+ }, z.core.$strict>>;
2433
+ bcc: z.ZodArray<z.ZodObject<{
2434
+ kind: z.ZodEnum<{
2435
+ address: "address";
2436
+ person: "person";
2437
+ }>;
2438
+ label: z.ZodString;
2439
+ }, z.core.$strict>>;
2440
+ }, z.core.$strict>;
2441
+ }, z.core.$strict>>;
2442
+ }, z.core.$strict>;
2443
+ type WorkflowMessageMailParams = z.infer<typeof workflowMessageMailParamsSchema>;
2444
+ /**
2445
+ * What the step facts of a `mail.send` step carry beside `source { kind: "mail_sender", title,
2446
+ * service }`, where `service` is the icon key: the sender's address and the instance's
2447
+ * `recipientDomains`, so the panel marks an address a run would refuse.
2448
+ */
2449
+ declare const workflowMailSenderFactSchema: z.ZodObject<{
2450
+ sender: z.ZodString;
2451
+ title: z.ZodString;
2452
+ icon: z.ZodString;
2453
+ address: z.ZodEmail;
2454
+ recipientDomains: z.ZodArray<z.ZodString>;
2455
+ }, z.core.$strict>;
2456
+ type WorkflowMailSenderFact = z.infer<typeof workflowMailSenderFactSchema>;
2457
+ /** Contract only: MAIL-1 registers the operation while `outbound.enabled` is true. */
2458
+ declare const mailSendContract: {
2459
+ readonly name: "mail.send";
2460
+ readonly description: "Send one e-mail as a sender of the instance (system unless set). Recipients are addresses, people of the instance and workspaces; an address outside the instance's recipient domains is refused. The body is Markdown in the instance's frame. A test run previews the mail and sends nothing.";
2461
+ readonly inputSchema: z.ZodObject<{
2462
+ sender: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"system">, z.ZodTemplateLiteral<`connection.${string}`>]>>;
2463
+ to: z.ZodUnion<readonly [z.ZodEmail, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodUnion<readonly [z.ZodObject<{
2464
+ address: z.ZodEmail;
2465
+ }, z.core.$strict>, z.ZodObject<{
2466
+ user: z.ZodString;
2467
+ }, z.core.$strict>, z.ZodObject<{
2468
+ workspace: z.ZodString;
2469
+ }, z.core.$strict>]>, z.ZodObject<{
2470
+ email: z.ZodEmail;
2471
+ }, z.core.$loose>]>>]>;
2472
+ cc: z.ZodOptional<z.ZodUnion<readonly [z.ZodEmail, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodUnion<readonly [z.ZodObject<{
2473
+ address: z.ZodEmail;
2474
+ }, z.core.$strict>, z.ZodObject<{
2475
+ user: z.ZodString;
2476
+ }, z.core.$strict>, z.ZodObject<{
2477
+ workspace: z.ZodString;
2478
+ }, z.core.$strict>]>, z.ZodObject<{
2479
+ email: z.ZodEmail;
2480
+ }, z.core.$loose>]>>]>>;
2481
+ bcc: z.ZodOptional<z.ZodUnion<readonly [z.ZodEmail, z.ZodArray<z.ZodUnion<readonly [z.ZodEmail, z.ZodUnion<readonly [z.ZodObject<{
2482
+ address: z.ZodEmail;
2483
+ }, z.core.$strict>, z.ZodObject<{
2484
+ user: z.ZodString;
2485
+ }, z.core.$strict>, z.ZodObject<{
2486
+ workspace: z.ZodString;
2487
+ }, z.core.$strict>]>, z.ZodObject<{
2488
+ email: z.ZodEmail;
2489
+ }, z.core.$loose>]>>]>>;
2490
+ subject: z.ZodString;
2491
+ body: z.ZodString;
2492
+ senderName: z.ZodOptional<z.ZodString>;
2493
+ replyTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
2494
+ address: z.ZodEmail;
2495
+ }, z.core.$strict>, z.ZodObject<{
2496
+ user: z.ZodString;
2497
+ }, z.core.$strict>]>>;
2498
+ locale: z.ZodOptional<z.ZodEnum<{
2499
+ en: "en";
2500
+ de: "de";
2501
+ }>>;
2502
+ }, z.core.$strict>;
2503
+ readonly outputSchema: z.ZodObject<{
2504
+ sentAt: z.ZodISODateTime;
2505
+ messageId: z.ZodOptional<z.ZodString>;
2506
+ recipients: z.ZodObject<{
2507
+ to: z.ZodNumber;
2508
+ cc: z.ZodNumber;
2509
+ bcc: z.ZodNumber;
2510
+ }, z.core.$strict>;
2511
+ skipped: z.ZodNumber;
2512
+ test: z.ZodOptional<z.ZodLiteral<true>>;
2513
+ }, z.core.$strict>;
2514
+ readonly simulatedOutputSchema: z.ZodObject<{
2515
+ simulated: z.ZodLiteral<true>;
2516
+ preview: z.ZodObject<{
2517
+ from: z.ZodObject<{
2518
+ name: z.ZodString;
2519
+ address: z.ZodEmail;
2520
+ }, z.core.$strict>;
2521
+ replyTo: z.ZodOptional<z.ZodEmail>;
2522
+ to: z.ZodArray<z.ZodObject<{
2523
+ kind: z.ZodEnum<{
2524
+ address: "address";
2525
+ person: "person";
2526
+ }>;
2527
+ label: z.ZodString;
2528
+ }, z.core.$strict>>;
2529
+ cc: z.ZodArray<z.ZodObject<{
2530
+ kind: z.ZodEnum<{
2531
+ address: "address";
2532
+ person: "person";
2533
+ }>;
2534
+ label: z.ZodString;
2535
+ }, z.core.$strict>>;
2536
+ bcc: z.ZodArray<z.ZodObject<{
2537
+ kind: z.ZodEnum<{
2538
+ address: "address";
2539
+ person: "person";
2540
+ }>;
2541
+ label: z.ZodString;
2542
+ }, z.core.$strict>>;
2543
+ skipped: z.ZodNumber;
2544
+ subject: z.ZodString;
2545
+ html: z.ZodString;
2546
+ text: z.ZodString;
2547
+ }, z.core.$strict>;
2548
+ }, z.core.$strict>;
2549
+ readonly effect: "changing";
2550
+ readonly changeClass: "outward";
2551
+ readonly right: "mail_sender.use";
2552
+ readonly resourceKind: "mail_sender";
2553
+ readonly events: {
2554
+ readonly after: "mail.sent";
2555
+ readonly refused: "mail.refused";
2556
+ };
2557
+ readonly errorCodes: {
2558
+ readonly recipientNotAllowed: "recipient_not_allowed";
2559
+ readonly noRecipient: "no_recipient";
2560
+ readonly mailRejected: "mail_rejected";
2561
+ readonly workspaceNotAllowed: "workspace_not_allowed";
2562
+ };
2563
+ };
2564
+
2565
+ /** One instance's data separation dimension. SCOPE-1 serves one dimension. */
2566
+ declare const dataScopeNameSchema: z.ZodString;
2567
+ declare const dataScopesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
2568
+ label: z.ZodString;
2569
+ valueType: z.ZodLiteral<"text">;
2570
+ }, z.core.$strict>>;
2571
+ type DataScopes = z.infer<typeof dataScopesSchema>;
2572
+ declare const scopeAssignmentInputSchema: z.ZodObject<{
2573
+ dimension: z.ZodString;
2574
+ holderKind: z.ZodEnum<{
2575
+ user: "user";
2576
+ service_principal: "service_principal";
2577
+ group: "group";
2578
+ }>;
2579
+ holderId: z.ZodString;
2580
+ effect: z.ZodEnum<{
2581
+ allow: "allow";
2582
+ deny: "deny";
2583
+ }>;
2584
+ values: z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>;
2585
+ }, z.core.$strict>;
2586
+ type ScopeAssignmentInput = z.infer<typeof scopeAssignmentInputSchema>;
2587
+ declare const scopedTablesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
2588
+ scope: z.ZodRecord<z.ZodString, z.ZodString>;
2589
+ }, z.core.$strict>>;
2590
+ type ScopedTables = z.infer<typeof scopedTablesSchema>;
2591
+
2592
+ /** The longest comment. */
2593
+ declare const FEEDBACK_TEXT_MAX_LENGTH = 4000;
2594
+ /** The longest machine-written summary and category a workflow stores on a comment. */
2595
+ declare const FEEDBACK_SUMMARY_MAX_LENGTH = 1000;
2596
+ declare const FEEDBACK_CATEGORY_MAX_LENGTH = 60;
2597
+ /** The longest note a reviewer leaves when marking a comment handled. */
2598
+ declare const FEEDBACK_NOTE_MAX_LENGTH = 2000;
2599
+ /**
2600
+ * What a comment is about. `message` in the first version; an App and a Workflow run follow
2601
+ * (LU-6), each with a reference of its own.
2602
+ */
2603
+ declare const FEEDBACK_SUBJECT_KINDS: readonly ["message"];
2604
+ type FeedbackSubjectKind = (typeof FEEDBACK_SUBJECT_KINDS)[number];
2605
+ declare const FEEDBACK_STATES: readonly ["new", "handled"];
2606
+ type FeedbackState = (typeof FEEDBACK_STATES)[number];
2607
+
2608
+ export { ACCESS_SOURCES, ACTIONS, ACTIVE_AGENT_RUN_STATUSES, ADMINISTERED_USER_STATUSES, AGENT_AVAILABILITY_MODES, AGENT_EDITABLE_FIELDS, AGENT_PREVIEW_SOURCES, AGENT_RUN_FAILURE_CATEGORIES, AGENT_RUN_STATUSES, AGENT_STARTERS_MAX, API_CREDENTIAL_SCOPES, APPROVAL_CHECK_FAILURE_OUTCOMES, APPROVAL_CHECK_STATUSES, APPROVAL_EXECUTIONS, APPROVAL_REQUEST_STATUSES, APP_ACTION_CALL_STATUSES, APP_AUDIENCES, APP_ERROR_CODES, APP_ERROR_STATUS_CODES, APP_MODES, ARTIFACT_PREVIEW_IMAGE_FORMATS, ARTIFACT_PREVIEW_IMAGE_MIME_TYPES, ARTIFACT_PREVIEW_STATUSES, ASSET_ACCESS_VERBS, ASSET_LIFECYCLES, ASSET_NAME_REFUSAL_REASONS, ASSET_OWNER_KINDS, ASSET_REPO_BUNDLE_KINDS, ASSET_REPRESENTATIONS, ASSET_SYNC_CHANGE_TYPES, ATTACHMENT_CREATE_OUTCOMES, AUDIT_ACTOR_KINDS, AUDIT_EVENT_STATUSES, AUDIT_OUTCOMES, AUDIT_TIERS, AUTH_PRINCIPAL_KINDS, AUTH_SCOPE_WILDCARD, type AccessSource, type ActiveAgentRunStatus, type AdministeredUserStatus, type AgentAvailabilityMode, type AgentConfig, type AgentEditableField, type AgentInitialPromptConfig, type AgentRunFailureCategory, type AgentRunStatus, type ApiCredentialScope, type AppActionCallStatus, type AppErrorCode, type AppMode, type ApprovalCheckFailureOutcome, type ApprovalCheckStatus, type ApprovalExecution, type ApprovalRequestStatus, type ArtifactPreviewImageFormat, type ArtifactPreviewImageMimeType, type ArtifactPreviewStatus, type AssetLifecycle, type AssetNameRefusalReason, type AssetOwnerKind, type AssetRepoBundleKind, type AssetRepresentation, type AssetSyncChangeType, type AttachmentCreateOutcome, type AuditActorKind, type AuditEventStatus, type AuditOutcome, type AuditTier, type AuthPrincipalKind, CHAT_MESSAGE_ROLES, CHAT_SESSION_AUTH_SCOPES, COLLABORATION_WORKSPACE_KINDS, CONFIG_ASSET_CHANGE_OPERATIONS, CONFIG_ASSET_KINDS, CONNECTION_BINDING_STATES, CONNECTION_EXPOSURES, CONNECTION_HEALTH_STATES, CONNECTION_NAME_MAX_LENGTH, CONNECTION_NAME_PATTERN, CONNECTION_NETWORKS, CONNECTION_OAUTH_REGISTRATIONS, CONNECTION_OPERATION_POLICIES, CONNECTION_OPERATION_STATUSES, CONNECTION_ORIGINS, CONNECTION_PROVIDER_REVOCATIONS, CONNECTION_SECRET_STATES, CONNECTOR_TEST_STATUSES, CONVERSATION_ATTACHMENT_STATUSES, CONVERSATION_KINDS, CONVERSATION_VISIBILITIES, type ChatMessageRole, type ChatSessionAuthScope, type CollaborationWorkspaceKind, type ConfigAssetChangeOperation, type ConfigAssetKind, type ConnectionBindingState, type ConnectionExposure, type ConnectionHealth, type ConnectionNetwork, type ConnectionOAuthRegistration, type ConnectionOperationPolicy, type ConnectionOperationStatus, type ConnectionOrigin, type ConnectionProviderRevocation, type ConnectionSecretState, type ConnectorTestStatus, type ConversationAttachmentStatus, type ConversationKind, type ConversationVisibility, DATABASE_RELATION_TYPES, DATA_STORE_CONDITIONS, DATA_STORE_INSERT_CONFLICT_MODES, DATA_STORE_LOAD_CONFLICT_MODES, DATA_STORE_MIGRATION_OUTCOMES, DATA_STORE_SCALAR_TYPES, DATA_STORE_STATUSES, DECIDED_APPROVAL_REQUEST_STATUSES, DELETION_STATES, type DataScopes, type DataStoreCondition, type DataStoreInsertConflictMode, type DataStoreLoadConflictMode, type DataStoreMigrationOutcome, type DataStoreRecordField, type DataStoreRecordProposalItem, type DataStoreRecordsDecideInput, type DataStoreRecordsDecideOutput, type DataStoreRecordsFlaggedInput, type DataStoreRecordsFlaggedOutput, type DataStoreRecordsProposeInput, type DataStoreRecordsRule, type DataStoreScalarType, type DataStoreStatus, type DatabaseRelationType, type DecidedApprovalRequestStatus, type DeletionState, ENDED_AGENT_RUN_STATUSES, ENDED_APPROVAL_EXECUTIONS, type EndedAgentRunStatus, type EndedApprovalExecution, FAILED_JOB_STATUSES, FEEDBACK_CATEGORY_MAX_LENGTH, FEEDBACK_NOTE_MAX_LENGTH, FEEDBACK_STATES, FEEDBACK_SUBJECT_KINDS, FEEDBACK_SUMMARY_MAX_LENGTH, FEEDBACK_TEXT_MAX_LENGTH, FIRST_PARTY_AUTH_SCOPES, FOLLOW_UP_MODES, FOLLOW_UP_STATUSES, type FailedJobStatus, type FeedbackState, type FeedbackSubjectKind, type FirstPartyAuthScope, GRANT_EFFECTS, GRANT_HOLDER_KINDS, GRANT_SCOPE_KINDS, GUARDRAIL_HIT_OUTCOMES, GUARDRAIL_NAME_MAX_LENGTH, GUARDRAIL_NAME_PATTERN, GUARDRAIL_OUTCOMES, type GrantEffect, type GrantHolderKind, type GrantScopeKind, type GuardrailHitOutcome, type GuardrailOutcome, IDEMPOTENCY_KEY_MAX_LENGTH, INFRASTRUCTURE_SECRET_STATES, INFRASTRUCTURE_WITHHELD_FIELDS, type InfrastructureSecretState, type InfrastructureWithheldField, JOB_STATUSES, type JobStatus, KNOWLEDGE_BASE_STATUSES, KNOWLEDGE_CHECK_STATUSES, KNOWLEDGE_DOCUMENT_FAILURE_CODES, KNOWLEDGE_DOCUMENT_STATES, KNOWLEDGE_DOCUMENT_WAIT_CODES, KNOWLEDGE_FILE_MAX_BYTES, KNOWLEDGE_SEARCH_SIGNALS, KNOWLEDGE_SOURCE_FAILURE_CODES, KNOWLEDGE_SOURCE_ITEM_FAILURE_CODES, KNOWLEDGE_SOURCE_ITEM_SHOWN_STATES, KNOWLEDGE_SOURCE_ITEM_STATES, KNOWLEDGE_SYNC_COUNTS, KNOWLEDGE_SYNC_MODES, KNOWLEDGE_SYNC_RUN_STATES, type KnowledgeBaseStatus, type KnowledgeCheckStatus, type KnowledgeDocumentFailureCode, type KnowledgeDocumentState, type KnowledgeDocumentWaitCode, type KnowledgeExtractFieldsInput, type KnowledgeExtractFieldsOutput, type KnowledgeIngestFetch, type KnowledgeIngestInput, type KnowledgeIngestItem, type KnowledgeIngestOutput, type KnowledgeLocateInput, type KnowledgeLocateOutput, type KnowledgePendingInput, type KnowledgePendingOutput, type KnowledgePendingRow, type KnowledgeProcessorOutput, type KnowledgePutProcessedInput, type KnowledgeRetryInput, type KnowledgeRetryOutput, type KnowledgeSearchSignal, type KnowledgeSourceFailureCode, type KnowledgeSourceItemFailureCode, type KnowledgeSourceItemShownState, type KnowledgeSourceItemState, type KnowledgeSourceItemsInput, type KnowledgeSourceItemsOutput, type KnowledgeSourcesOutput, type KnowledgeSyncCount, type KnowledgeSyncInput, type KnowledgeSyncMode, type KnowledgeSyncResult, type KnowledgeSyncRunState, type KnowledgeWithdrawInput, type KnowledgeWithdrawOutput, type KnowledgeWorkflowSource, LISTED_DATA_STORE_STATUSES, LIVE_JOB_STATUSES, type ListedDataStoreStatus, type LiveJobStatus, type LocaleCode, type LocalizedStringConfig, MAIL_ADDRESS_MAX_LENGTH, MAIL_ATTACHMENTS_MAX_BYTES, MAIL_ATTACHMENTS_MAX_FILES, MAIL_AUDIT_MAX_DOMAINS, MAIL_BODY_MAX_BYTES, MAIL_OUTBOUND_DEFAULT_LIMITS, MAIL_OUTBOUND_FOOTER_MAX_LENGTH, MAIL_RECIPIENT_DOMAINS_ANY, MAIL_RECIPIENT_DOMAIN_PATTERN, MAIL_RECIPIENT_ID_PATTERN, MAIL_SENDER_CONNECTION_PREFIX, MAIL_SENDER_NAME_MAX_LENGTH, MAIL_SENDER_RESOURCE_KIND, MAIL_SENDER_SYSTEM, MAIL_SENDER_SYSTEM_ICON, MAIL_SENDER_USE_ACTION, MAIL_SEND_ERROR_CODES, MAIL_SEND_MAX_ADDRESSES, MAIL_SEND_OPERATION, MAIL_SEND_REFUSAL_REASONS, MAIL_SUBJECT_MAX_LENGTH, MAIL_WORKFLOW_MESSAGE_TEMPLATE, MANAGED_FILE_STATUSES, MESSAGE_FINISH_STATUSES, MODEL_PROVIDER_AUTH_MODES, MODEL_USAGE_EVENT_STATUSES, MODEL_USAGE_LIMIT_METRICS, MODEL_USAGE_LIMIT_PERIODS, MODEL_USAGE_LIMIT_SCOPES, MODEL_USAGE_SOURCES, MODEL_USAGE_TIERS, type MailPreviewRecipient, type MailSendErrorCode, type MailSendInput, type MailSendInputFields, type MailSendOutput, type MailSendPreview, type MailSendRecipient, type MailSendRecipientList, type MailSendRefusalDetails, type MailSendSimulatedOutput, type MailSenderId, type MessageFinishStatus, type ModelProviderAuthMode, type ModelUsageEventStatus, type ModelUsageRefusal, type ModelUsageSource, type ModelUsageTier, NOTIFY_CHANNELS, type NotifyChannel, OPENAI_COMPATIBLE_APIS, OPERATIONS_AUDIENCES, OPERATION_CONFIRMATION_DECISIONS, OPERATION_DENIAL_REASONS, OPERATION_EFFECTS, OPERATION_ORIGIN_KINDS, OPERATION_RUN_DECISION_MODES, OPERATION_RUN_DECISION_REASONS, OPERATION_RUN_STATUSES, OPERATION_TARGETS, type OpenaiCompatibleApi, type OperationBatchFailure, type OperationBatchResult, type OperationDenialReason, type OperationEffect, type OperationOriginKind, type OperationPaging, type OperationRunDecisionMode, type OperationRunDecisionReason, type OperationRunStatus, type OperationScope, type OperationTarget, type OperationsAudience, POLICY_VALUES, PRINCIPAL_HOLDER_KINDS, PROVIDER_CHECK_ERROR_CLASSES, PROVIDER_PORTS, PROVIDER_REGIONS, PUBLISHED_DATA_CONSUMER_KINDS, type PlatformAction, type PolicyValue, type PrincipalHolderKind, type ProviderCheckErrorClass, type ProviderPort, type ProviderRegion, type PublishedDataConsumerKind, READING_POLICY_VALUES, REASONING_EFFORTS, RECORDS_FLAGGED_MAX_ITEMS_PER_PAGE, RECORDS_PROPOSE_MAX_FIELDS_PER_ITEM, RECORDS_PROPOSE_MAX_ITEMS_PER_CALL, RECORD_FIELD_FAILURE_CODES, RECORD_FIELD_STATES, ROLE_GRANT_SCOPE_KINDS, ROLE_PENDING_CHANGES, ROLE_PENDING_DECISIONS, type ReadingPolicyValue, type ReasoningEffortConfig, type RecordColumn, type RecordEvidenceResult, type RoleGrantScopeKind, type RolePendingDecision, SCHEDULED_START_STATES, SERVICE_PRINCIPAL_PERMISSIONS, SERVICE_PRINCIPAL_STATUSES, SKILL_CHANGE_TYPES, SKILL_FRONTMATTER_FIELDS, SKILL_FRONTMATTER_MAX_BYTES, SKILL_FRONTMATTER_MAX_DEPTH, SKILL_NAME_PATTERN, SKILL_NAME_RULE, SKILL_ORIGINS, SKILL_PORTABLE_DESCRIPTION_MAX_CHARS, SKILL_PORTABLE_NAME_MAX_CHARS, SKILL_RESOURCE_MEDIA_TYPES, SKILL_STARTERS_MAX, SKILL_STARTER_LINE_MAX_LENGTH, SKILL_SUMMARY_MAX_LENGTH, STRUCTURED_DATA_REVIEW_REASONS, SUPPORTED_IMAGE_MIME_TYPES, type ScopeAssignmentInput, type ScopedTables, type ServicePrincipalPermission, type ServicePrincipalStatus, type SkillChangeType, type SkillConfig, type SkillFileEntry, type SkillFrontmatterRefusal, SkillMarkdownError, type SkillOrigin, type SkillResourceConfig, type SkillResourceMediaType, type SkillStarterConfig, type StructuredDataReviewReason, type SupportedImageMimeType, THEME_MODES, THEME_MODE_PREFERENCES, TOOL_CALL_STATES, TOOL_DECISION_MODES, TOOL_DECISION_OUTCOMES, TOOL_DISPLAY_MODES, TOOL_GROUPS, TOOL_INPUT_PARSE_ERROR_CODES, type ThemeMode, type ThemeModePreference, type ToolCallState, type ToolDisplayMode, type ToolGroup, type ToolInputParseErrorCode, USAGE_COST_STATUSES, USER_STATUSES, type UsageCostStatus, type UserStatus, WAITING_OPERATION_RUN_STATUSES, WEB_SOURCE_PROVIDERS, WORKFLOW_DATASET_DOWNLOAD_FORMATS, WORKFLOW_DATASET_STATES, WORKFLOW_ENDED_STATUSES, WORKFLOW_KINDS, WORKFLOW_MARKDOWN_MAX_COLUMNS, WORKFLOW_MARKDOWN_MAX_ROWS, WORKFLOW_NAME_PATTERN, WORKFLOW_NAME_RULE, WORKFLOW_RESERVED_STEP_TYPES, WORKFLOW_RIGHTS_REVISIONS, WORKFLOW_RIGHT_NEEDED_FOR, WORKFLOW_RIGHT_REFUSALS, WORKFLOW_RUN_ACCOUNT_STATUSES, WORKFLOW_RUN_MODES, WORKFLOW_RUN_STATUSES, WORKFLOW_STEP_RUN_STATUSES, WORKFLOW_STEP_SOURCE_KINDS, WORKFLOW_STEP_TYPES, WORKFLOW_TEXT_FORMAT_MARKDOWN, WORKFLOW_TEXT_MAX_PARTS, WORKFLOW_TRIGGER_KINDS, WORKSPACE_ACCENT_COLORS, WORKSPACE_ACCESS_STATES, WORKSPACE_COMMAND_STATUSES, WORKSPACE_FILE_KINDS, WORKSPACE_MEMBERSHIP_ROLES, WORKSPACE_SECTIONS, WORKSPACE_USE_ASSET_KINDS, WORKSPACE_VISIBILITIES, type WebSourceProvider, type WorkflowAssetConfig, type WorkflowDatasetDownloadFormat, type WorkflowDatasetState, type WorkflowEndedStatus, type WorkflowKind, type WorkflowMailSenderFact, type WorkflowMessageMailParams, type WorkflowReservedStepType, type WorkflowRunMode, type WorkflowRunStatus, type WorkflowStepRunStatus, type WorkflowStepSourceKind, type WorkflowStepType, type WorkflowTriggerKind, type WorkspaceAccentColor, type WorkspaceAccessState, type WorkspaceCommandStatus, type WorkspaceFileKind, type WorkspaceMembershipRole, type WorkspaceSection, type WorkspaceVisibility, YAML_DATA_MAX_VALUES, YamlDataError, type YamlDataIssue, type YamlDataIssueCode, type YamlDataOptions, type YamlDataResult, agentConfigSchema, checkStorableTexts, dataScopeNameSchema, dataScopesSchema, dataStoreRecordFieldSchema, dataStoreRecordProposalItemSchema, dataStoreRecordsContracts, dataStoreRecordsDecideInputSchema, dataStoreRecordsDecideOutputSchema, dataStoreRecordsFlaggedInputSchema, dataStoreRecordsFlaggedOutputSchema, dataStoreRecordsProposeInputSchema, dataStoreRecordsRuleSchema, deriveSkillTitle, formatSkillMarkdown, isStorableText, knowledgeExtractFieldsInputSchema, knowledgeExtractFieldsOutputSchema, knowledgeFieldValueSchema, knowledgeIngestFetchSchema, knowledgeIngestInputSchema, knowledgeIngestItemSchema, knowledgeIngestOutputSchema, knowledgeLocateInputSchema, knowledgeLocateOutputSchema, knowledgePendingInputSchema, knowledgePendingOutputSchema, knowledgePendingRowSchema, knowledgeProcessorOutputSchema, knowledgePutProcessedInputSchema, knowledgeRecordsRefusalSchema, knowledgeRetryInputSchema, knowledgeRetryOutputSchema, knowledgeSourceItemsInputSchema, knowledgeSourceItemsOutputSchema, knowledgeSourcesOutputSchema, knowledgeSyncInputSchema, knowledgeSyncResultSchema, knowledgeWithdrawInputSchema, knowledgeWithdrawOutputSchema, knowledgeWorkflowSourceSchema, knowledgeWriteContracts, loadYamlData, localeCodes, localizedStringSchema, mailAddressSchema, mailBodySchema, mailCopyRecipientListSchema, mailPreviewRecipientSchema, mailRecipientDomainSchema, mailRecipientListSchema, mailRecipientSchema, mailReplyToSchema, mailSendContract, mailSendInputSchema, mailSendOutputSchema, mailSendPreviewSchema, mailSendRefusalDetailsSchema, mailSendSimulatedOutputSchema, mailSenderIdSchema, mailSenderNameSchema, mailSubjectSchema, operationBatchFailureSchema, operationBatchResultSchema, operationPagingSchema, parseSkillMarkdown, readYamlData, recordEvidenceResultSchema, scopeAssignmentInputSchema, scopedTablesSchema, skillConfigSchema, skillFileEntrySchema, skillFileFrontmatterSchema, skillNameSchema, skillPortabilityIssues, skillResourceConfigSchema, skillResourceMediaTypeForPath, skillResourcePathSchema, skillStarterSchema, workflowConfigSchema, workflowDataFlowsSchema, workflowDatasetReferenceSchema, workflowMailSenderFactSchema, workflowMessageMailParamsSchema, yamlValueIssue, yamlValueIssueSentence };