@stndrds/schema 1.0.0-alpha.337 → 1.0.0-alpha.338

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 (63) hide show
  1. package/dist/{all-CHS22jdr.d.ts → all-BWBHE8zC.d.ts} +8 -8
  2. package/dist/{all-4UvqwWvq.d.mts → all-C1AF2SKY.d.mts} +8 -8
  3. package/dist/{checkbox-DF2BWd3r.d.ts → checkbox-BJiVPQKC.d.ts} +2 -2
  4. package/dist/{checkbox-Bz3UR7v-.d.mts → checkbox-C1oY-AXS.d.mts} +2 -2
  5. package/dist/{date-DBSBgOqg.d.ts → date-DJzdIygB.d.ts} +2 -2
  6. package/dist/{date-Do-4n4Ou.d.mts → date-pUpneFTR.d.mts} +2 -2
  7. package/dist/{exceptions-DZrk5n7t.d.mts → exceptions-CHlIXRKP.d.mts} +1 -0
  8. package/dist/{exceptions-DZrk5n7t.d.ts → exceptions-CHlIXRKP.d.ts} +1 -0
  9. package/dist/exceptions.d.mts +1 -1
  10. package/dist/exceptions.d.ts +1 -1
  11. package/dist/exceptions.js +1 -1
  12. package/dist/exceptions.mjs +1 -1
  13. package/dist/{index-D6o37TYA.d.mts → index-B-LzvZZe.d.mts} +1 -1
  14. package/dist/{index-DMtutoRi.d.ts → index-BAW8p4U_.d.ts} +1 -1
  15. package/dist/{index-BGv_lB_c.d.mts → index-BilM1Dnp.d.mts} +1 -1
  16. package/dist/{index-CO-zwdxS.d.ts → index-CJYpJqEh.d.ts} +1 -1
  17. package/dist/{index-CLTVHoQ4.d.ts → index-CUEwuqCj.d.ts} +2 -2
  18. package/dist/{index-CRhCzlVm.d.mts → index-DX1EILel.d.mts} +2 -2
  19. package/dist/index.d.mts +100 -16
  20. package/dist/index.d.ts +100 -16
  21. package/dist/index.js +9 -9
  22. package/dist/index.mjs +9 -9
  23. package/dist/{number-BgQH6KjT.d.ts → number-BZ9pUAob.d.ts} +2 -2
  24. package/dist/{number-PuhjSGfn.d.mts → number-D6UXWPnL.d.mts} +2 -2
  25. package/dist/{text-DBbxpQWo.d.ts → text-D4mEL9hl.d.ts} +2 -2
  26. package/dist/{text-DzIbQJJh.d.mts → text-_dBcTPGm.d.mts} +2 -2
  27. package/dist/utils.d.mts +1 -1
  28. package/dist/utils.d.ts +1 -1
  29. package/dist/validation/all.d.mts +4 -4
  30. package/dist/validation/all.d.ts +4 -4
  31. package/dist/validation/complex/currency.d.mts +2 -2
  32. package/dist/validation/complex/currency.d.ts +2 -2
  33. package/dist/validation/complex/location.d.mts +2 -2
  34. package/dist/validation/complex/location.d.ts +2 -2
  35. package/dist/validation/complex/phone.d.mts +2 -2
  36. package/dist/validation/complex/phone.d.ts +2 -2
  37. package/dist/validation/complex/relation.d.mts +2 -2
  38. package/dist/validation/complex/relation.d.ts +2 -2
  39. package/dist/validation/complex/richtext.d.mts +2 -2
  40. package/dist/validation/complex/richtext.d.ts +2 -2
  41. package/dist/validation/complex/select.d.mts +2 -2
  42. package/dist/validation/complex/select.d.ts +2 -2
  43. package/dist/validation/complex/user.d.mts +2 -2
  44. package/dist/validation/complex/user.d.ts +2 -2
  45. package/dist/validation/computed/formula.d.mts +2 -2
  46. package/dist/validation/computed/formula.d.ts +2 -2
  47. package/dist/validation/computed/rollup.d.mts +2 -2
  48. package/dist/validation/computed/rollup.d.ts +2 -2
  49. package/dist/validation/config/index.d.mts +1 -1
  50. package/dist/validation/config/index.d.ts +1 -1
  51. package/dist/validation/core/index.d.mts +1 -1
  52. package/dist/validation/core/index.d.ts +1 -1
  53. package/dist/validation/object/index.d.mts +1 -1
  54. package/dist/validation/object/index.d.ts +1 -1
  55. package/dist/validation/primitives/checkbox.d.mts +1 -1
  56. package/dist/validation/primitives/checkbox.d.ts +1 -1
  57. package/dist/validation/primitives/date.d.mts +1 -1
  58. package/dist/validation/primitives/date.d.ts +1 -1
  59. package/dist/validation/primitives/number.d.mts +1 -1
  60. package/dist/validation/primitives/number.d.ts +1 -1
  61. package/dist/validation/primitives/text.d.mts +1 -1
  62. package/dist/validation/primitives/text.d.ts +1 -1
  63. package/package.json +2 -2
@@ -1,12 +1,12 @@
1
1
 
2
- import { Tt as RollupAttribute, Y as Attribute, Z as AttributeType } from "./exceptions-DZrk5n7t.js";
3
- import { m as ListViewTabVisibility } from "./index-CLTVHoQ4.js";
4
- import "./index-CO-zwdxS.js";
5
- import "./index-DMtutoRi.js";
6
- import "./text-DBbxpQWo.js";
7
- import "./number-BgQH6KjT.js";
8
- import "./checkbox-DF2BWd3r.js";
9
- import "./date-DBSBgOqg.js";
2
+ import { Tt as RollupAttribute, Y as Attribute, Z as AttributeType } from "./exceptions-CHlIXRKP.js";
3
+ import { m as ListViewTabVisibility } from "./index-CUEwuqCj.js";
4
+ import "./index-CJYpJqEh.js";
5
+ import "./index-BAW8p4U_.js";
6
+ import "./text-D4mEL9hl.js";
7
+ import "./number-BZ9pUAob.js";
8
+ import "./checkbox-BJiVPQKC.js";
9
+ import "./date-DJzdIygB.js";
10
10
  import { z as z$1 } from "zod";
11
11
  import { IconName } from "@stndrds/constants";
12
12
  //#region src/types/filters.d.ts
@@ -1,12 +1,12 @@
1
1
 
2
- import { Tt as RollupAttribute, Y as Attribute, Z as AttributeType } from "./exceptions-DZrk5n7t.mjs";
3
- import { m as ListViewTabVisibility } from "./index-CRhCzlVm.mjs";
4
- import "./index-D6o37TYA.mjs";
5
- import "./index-BGv_lB_c.mjs";
6
- import "./text-DzIbQJJh.mjs";
7
- import "./number-PuhjSGfn.mjs";
8
- import "./checkbox-Bz3UR7v-.mjs";
9
- import "./date-Do-4n4Ou.mjs";
2
+ import { Tt as RollupAttribute, Y as Attribute, Z as AttributeType } from "./exceptions-CHlIXRKP.mjs";
3
+ import { m as ListViewTabVisibility } from "./index-DX1EILel.mjs";
4
+ import "./index-B-LzvZZe.mjs";
5
+ import "./index-BilM1Dnp.mjs";
6
+ import "./text-_dBcTPGm.mjs";
7
+ import "./number-D6UXWPnL.mjs";
8
+ import "./checkbox-C1oY-AXS.mjs";
9
+ import "./date-pUpneFTR.mjs";
10
10
  import { IconName } from "@stndrds/constants";
11
11
  import { z as z$1 } from "zod";
12
12
  //#region src/types/filters.d.ts
@@ -1,6 +1,6 @@
1
1
 
2
- import { et as CheckboxAttribute } from "./exceptions-DZrk5n7t.js";
3
- import { r as ValidationMessages } from "./index-DMtutoRi.js";
2
+ import { et as CheckboxAttribute } from "./exceptions-CHlIXRKP.js";
3
+ import { r as ValidationMessages } from "./index-BAW8p4U_.js";
4
4
  import { z as z$1 } from "zod";
5
5
  //#region src/validation/primitives/checkbox.d.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
1
 
2
- import { et as CheckboxAttribute } from "./exceptions-DZrk5n7t.mjs";
3
- import { r as ValidationMessages } from "./index-BGv_lB_c.mjs";
2
+ import { et as CheckboxAttribute } from "./exceptions-CHlIXRKP.mjs";
3
+ import { r as ValidationMessages } from "./index-BilM1Dnp.mjs";
4
4
  import { z as z$1 } from "zod";
5
5
  //#region src/validation/primitives/checkbox.d.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
1
 
2
- import { rt as DateAttribute } from "./exceptions-DZrk5n7t.js";
3
- import { r as ValidationMessages } from "./index-DMtutoRi.js";
2
+ import { rt as DateAttribute } from "./exceptions-CHlIXRKP.js";
3
+ import { r as ValidationMessages } from "./index-BAW8p4U_.js";
4
4
  import { z as z$1 } from "zod";
5
5
  //#region src/validation/primitives/date.d.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
1
 
2
- import { rt as DateAttribute } from "./exceptions-DZrk5n7t.mjs";
3
- import { r as ValidationMessages } from "./index-BGv_lB_c.mjs";
2
+ import { rt as DateAttribute } from "./exceptions-CHlIXRKP.mjs";
3
+ import { r as ValidationMessages } from "./index-BilM1Dnp.mjs";
4
4
  import { z as z$1 } from "zod";
5
5
  //#region src/validation/primitives/date.d.ts
6
6
  /**
@@ -971,6 +971,7 @@ declare const SchemaErrorCode: {
971
971
  readonly AGENT_WORK_MODE_REQUIRED: "AGENT_WORK_MODE_REQUIRED";
972
972
  readonly AGENT_MESSAGE_NOT_FOUND: "AGENT_MESSAGE_NOT_FOUND";
973
973
  readonly AGENT_MESSAGE_NOT_EDITABLE: "AGENT_MESSAGE_NOT_EDITABLE";
974
+ readonly INVALID_TOOL_INPUT: "INVALID_TOOL_INPUT";
974
975
  readonly DEVICE_NOT_FOUND: "DEVICE_NOT_FOUND";
975
976
  readonly DEVICE_OFFLINE: "DEVICE_OFFLINE";
976
977
  readonly AI_UNKNOWN: "AI_UNKNOWN";
@@ -971,6 +971,7 @@ declare const SchemaErrorCode: {
971
971
  readonly AGENT_WORK_MODE_REQUIRED: "AGENT_WORK_MODE_REQUIRED";
972
972
  readonly AGENT_MESSAGE_NOT_FOUND: "AGENT_MESSAGE_NOT_FOUND";
973
973
  readonly AGENT_MESSAGE_NOT_EDITABLE: "AGENT_MESSAGE_NOT_EDITABLE";
974
+ readonly INVALID_TOOL_INPUT: "INVALID_TOOL_INPUT";
974
975
  readonly DEVICE_NOT_FOUND: "DEVICE_NOT_FOUND";
975
976
  readonly DEVICE_OFFLINE: "DEVICE_OFFLINE";
976
977
  readonly AI_UNKNOWN: "AI_UNKNOWN";
@@ -1,3 +1,3 @@
1
1
 
2
- import { A as StorageError, B as isObjectReferencedError, C as RepositoryOperation, D as SchemaErrorCode, E as SchemaError, F as SystemEntityImmutableError, H as isRecordReferencedError, I as ValidationError, L as ValidationErrorDetail, M as SyncCascadeError, N as SyncConflictError, O as SchemaPlanNotFoundError, P as SyncError, R as isAttributeInUseError, S as RepositoryError, T as RoleNotFoundError, U as isSchemaError, V as isProtectedResourceError, W as isValidationError, _ as ProtectedResourceError, a as ChangeTypeNotSupportedError, b as RecordReference, c as DuplicateError, d as MigrationTimeoutError, f as NotFoundError, g as OrphanSystemAttributeError, h as ObjectReferencedError, i as AttributeUsage, j as StorageOperation, k as SearchBackendError, l as ForbiddenError, m as ObjectNotFoundError, n as AttributeInUseError, o as ConcurrentModificationError, p as NotImplementedError, r as AttributeNotFoundError, s as DestructiveSyncNotAllowedError, t as AccessDeniedError, u as MemoryNotFoundError, v as ProtectedRoleError, w as ReservedObjectNameError, x as RecordReferencedError, y as RecordNotFoundError, z as isNotFoundError } from "./exceptions-DZrk5n7t.mjs";
2
+ import { A as StorageError, B as isObjectReferencedError, C as RepositoryOperation, D as SchemaErrorCode, E as SchemaError, F as SystemEntityImmutableError, H as isRecordReferencedError, I as ValidationError, L as ValidationErrorDetail, M as SyncCascadeError, N as SyncConflictError, O as SchemaPlanNotFoundError, P as SyncError, R as isAttributeInUseError, S as RepositoryError, T as RoleNotFoundError, U as isSchemaError, V as isProtectedResourceError, W as isValidationError, _ as ProtectedResourceError, a as ChangeTypeNotSupportedError, b as RecordReference, c as DuplicateError, d as MigrationTimeoutError, f as NotFoundError, g as OrphanSystemAttributeError, h as ObjectReferencedError, i as AttributeUsage, j as StorageOperation, k as SearchBackendError, l as ForbiddenError, m as ObjectNotFoundError, n as AttributeInUseError, o as ConcurrentModificationError, p as NotImplementedError, r as AttributeNotFoundError, s as DestructiveSyncNotAllowedError, t as AccessDeniedError, u as MemoryNotFoundError, v as ProtectedRoleError, w as ReservedObjectNameError, x as RecordReferencedError, y as RecordNotFoundError, z as isNotFoundError } from "./exceptions-CHlIXRKP.mjs";
3
3
  export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, AttributeUsage, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReference, RecordReferencedError, RepositoryError, RepositoryOperation, ReservedObjectNameError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaPlanNotFoundError, SearchBackendError, StorageError, StorageOperation, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, ValidationErrorDetail, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError };
@@ -1,3 +1,3 @@
1
1
 
2
- import { A as StorageError, B as isObjectReferencedError, C as RepositoryOperation, D as SchemaErrorCode, E as SchemaError, F as SystemEntityImmutableError, H as isRecordReferencedError, I as ValidationError, L as ValidationErrorDetail, M as SyncCascadeError, N as SyncConflictError, O as SchemaPlanNotFoundError, P as SyncError, R as isAttributeInUseError, S as RepositoryError, T as RoleNotFoundError, U as isSchemaError, V as isProtectedResourceError, W as isValidationError, _ as ProtectedResourceError, a as ChangeTypeNotSupportedError, b as RecordReference, c as DuplicateError, d as MigrationTimeoutError, f as NotFoundError, g as OrphanSystemAttributeError, h as ObjectReferencedError, i as AttributeUsage, j as StorageOperation, k as SearchBackendError, l as ForbiddenError, m as ObjectNotFoundError, n as AttributeInUseError, o as ConcurrentModificationError, p as NotImplementedError, r as AttributeNotFoundError, s as DestructiveSyncNotAllowedError, t as AccessDeniedError, u as MemoryNotFoundError, v as ProtectedRoleError, w as ReservedObjectNameError, x as RecordReferencedError, y as RecordNotFoundError, z as isNotFoundError } from "./exceptions-DZrk5n7t.js";
2
+ import { A as StorageError, B as isObjectReferencedError, C as RepositoryOperation, D as SchemaErrorCode, E as SchemaError, F as SystemEntityImmutableError, H as isRecordReferencedError, I as ValidationError, L as ValidationErrorDetail, M as SyncCascadeError, N as SyncConflictError, O as SchemaPlanNotFoundError, P as SyncError, R as isAttributeInUseError, S as RepositoryError, T as RoleNotFoundError, U as isSchemaError, V as isProtectedResourceError, W as isValidationError, _ as ProtectedResourceError, a as ChangeTypeNotSupportedError, b as RecordReference, c as DuplicateError, d as MigrationTimeoutError, f as NotFoundError, g as OrphanSystemAttributeError, h as ObjectReferencedError, i as AttributeUsage, j as StorageOperation, k as SearchBackendError, l as ForbiddenError, m as ObjectNotFoundError, n as AttributeInUseError, o as ConcurrentModificationError, p as NotImplementedError, r as AttributeNotFoundError, s as DestructiveSyncNotAllowedError, t as AccessDeniedError, u as MemoryNotFoundError, v as ProtectedRoleError, w as ReservedObjectNameError, x as RecordReferencedError, y as RecordNotFoundError, z as isNotFoundError } from "./exceptions-CHlIXRKP.js";
3
3
  export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, AttributeUsage, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReference, RecordReferencedError, RepositoryError, RepositoryOperation, ReservedObjectNameError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaPlanNotFoundError, SearchBackendError, StorageError, StorageOperation, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, ValidationErrorDetail, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError };
@@ -1,3 +1,3 @@
1
1
  /*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e={DRAFT_REVISION_CONFLICT:`DRAFT_REVISION_CONFLICT`,UNKNOWN:`SCHEMA_UNKNOWN_ERROR`,OBJECT_NOT_FOUND:`SCHEMA_OBJECT_NOT_FOUND`,ATTRIBUTE_NOT_FOUND:`SCHEMA_ATTRIBUTE_NOT_FOUND`,RECORD_NOT_FOUND:`SCHEMA_RECORD_NOT_FOUND`,SOURCE_NOT_FOUND:`SCHEMA_SOURCE_NOT_FOUND`,ROLE_NOT_FOUND:`SCHEMA_ROLE_NOT_FOUND`,MEMORY_NOT_FOUND:`SCHEMA_MEMORY_NOT_FOUND`,SCHEMA_PLAN_NOT_FOUND:`SCHEMA_PLAN_NOT_FOUND`,VALIDATION_FAILED:`SCHEMA_VALIDATION_FAILED`,INVALID_ATTRIBUTE_NAME:`SCHEMA_INVALID_ATTRIBUTE_NAME`,INVALID_OBJECT_NAME:`SCHEMA_INVALID_OBJECT_NAME`,RESERVED_OBJECT_NAME:`SCHEMA_RESERVED_OBJECT_NAME`,PROTECTED_OBJECT:`SCHEMA_PROTECTED_OBJECT`,PROTECTED_ATTRIBUTE:`SCHEMA_PROTECTED_ATTRIBUTE`,PROTECTED_VIEW:`SCHEMA_PROTECTED_VIEW`,PROTECTED_ROLE:`SCHEMA_PROTECTED_ROLE`,FORBIDDEN:`SCHEMA_FORBIDDEN`,ACCESS_DENIED:`SCHEMA_ACCESS_DENIED`,WORKSPACE_INVARIANT:`SCHEMA_WORKSPACE_INVARIANT`,STATE_GATE:`SCHEMA_STATE_GATE`,ACTOR_CONTEXT_REQUIRED:`SCHEMA_ACTOR_CONTEXT_REQUIRED`,CONNECTOR_AUTH_FAILED:`SCHEMA_CONNECTOR_AUTH_FAILED`,CONNECTOR_INVALID_STATE:`SCHEMA_CONNECTOR_INVALID_STATE`,CONNECTOR_GRANT_ORPHANED:`SCHEMA_CONNECTOR_GRANT_ORPHANED`,SYNC_FAILED:`SCHEMA_SYNC_FAILED`,SYNC_CONFLICT:`SCHEMA_SYNC_CONFLICT`,SYNC_CASCADE:`SCHEMA_SYNC_CASCADE`,ORPHAN_SYSTEM_ATTRIBUTE:`SCHEMA_ORPHAN_SYSTEM_ATTRIBUTE`,SYSTEM_ENTITY_IMMUTABLE:`SCHEMA_SYSTEM_ENTITY_IMMUTABLE`,DESTRUCTIVE_NOT_ALLOWED:`SCHEMA_DESTRUCTIVE_NOT_ALLOWED`,MIGRATION_TIMEOUT:`SCHEMA_MIGRATION_TIMEOUT`,CHANGE_TYPE_NOT_SUPPORTED:`SCHEMA_CHANGE_TYPE_NOT_SUPPORTED`,DUPLICATE:`SCHEMA_DUPLICATE`,DUPLICATE_OBJECT:`SCHEMA_DUPLICATE_OBJECT`,DUPLICATE_ATTRIBUTE:`SCHEMA_DUPLICATE_ATTRIBUTE`,CONFLICT:`SCHEMA_CONFLICT`,STORAGE_UPLOAD_FAILED:`SCHEMA_STORAGE_UPLOAD_FAILED`,STORAGE_DOWNLOAD_FAILED:`SCHEMA_STORAGE_DOWNLOAD_FAILED`,STORAGE_DELETE_FAILED:`SCHEMA_STORAGE_DELETE_FAILED`,STORAGE_URL_FAILED:`SCHEMA_STORAGE_URL_FAILED`,REPOSITORY_CREATE_FAILED:`SCHEMA_REPOSITORY_CREATE_FAILED`,REPOSITORY_UPDATE_FAILED:`SCHEMA_REPOSITORY_UPDATE_FAILED`,REPOSITORY_DELETE_FAILED:`SCHEMA_REPOSITORY_DELETE_FAILED`,REPOSITORY_QUERY_FAILED:`SCHEMA_REPOSITORY_QUERY_FAILED`,NOT_IMPLEMENTED:`SCHEMA_NOT_IMPLEMENTED`,TIMEOUT:`SCHEMA_TIMEOUT`,RECORD_REFERENCED:`SCHEMA_RECORD_REFERENCED`,ATTRIBUTE_IN_USE:`SCHEMA_ATTRIBUTE_IN_USE`,OBJECT_REFERENCED:`SCHEMA_OBJECT_REFERENCED`,CONFIGURATION_REQUIRED:`CONFIGURATION_REQUIRED`,SEARCH_ADAPTER_REQUIRED:`SEARCH_ADAPTER_REQUIRED`,CRON_REGISTRATION_FAILED:`CRON_REGISTRATION_FAILED`,JOB_WORKER_SHUTDOWN_FAILED:`JOB_WORKER_SHUTDOWN_FAILED`,SEARCH_BACKEND_FAILED:`SEARCH_BACKEND_FAILED`,INVARIANT_VIOLATION:`INVARIANT_VIOLATION`,TENANT_CONTEXT_MISSING:`TENANT_CONTEXT_MISSING`,FEATURE_FLAGS_CONTEXT:`FEATURE_FLAGS_CONTEXT`,REALTIME_RATE_LIMITED:`REALTIME_RATE_LIMITED`,REALTIME_DELIVERY_FAILED:`REALTIME_DELIVERY_FAILED`,REALTIME_SUBSCRIPTION_FAILED:`REALTIME_SUBSCRIPTION_FAILED`,AGENT_UNKNOWN:`AGENT_UNKNOWN`,AGENT_DEPTH_EXCEEDED:`AGENT_DEPTH_EXCEEDED`,AGENT_COST_LIMIT_EXCEEDED:`AGENT_COST_LIMIT_EXCEEDED`,AGENT_TREE_COST_LIMIT_EXCEEDED:`AGENT_TREE_COST_LIMIT_EXCEEDED`,CREDITS_EXHAUSTED:`CREDITS_EXHAUSTED`,QUOTA_EXCEEDED:`QUOTA_EXCEEDED`,AGENT_SESSION_NOT_FOUND:`AGENT_SESSION_NOT_FOUND`,AGENT_DEFINITION_NOT_FOUND:`AGENT_DEFINITION_NOT_FOUND`,AGENT_RUN_CONFIG:`AGENT_RUN_CONFIG`,AGENT_STREAMING:`AGENT_STREAMING`,AGENT_MISSING_ACTOR:`AGENT_MISSING_ACTOR`,AGENT_INVALID_STATE:`AGENT_INVALID_STATE`,AGENT_COMPACTION_IMPOSSIBLE:`AGENT_COMPACTION_IMPOSSIBLE`,AGENT_COMPACTION_TIMEOUT:`AGENT_COMPACTION_TIMEOUT`,AGENT_LEASE_HELD:`AGENT_LEASE_HELD`,AGENT_LEASE_UNAVAILABLE:`AGENT_LEASE_UNAVAILABLE`,AGENT_WORK_MODE_REQUIRED:`AGENT_WORK_MODE_REQUIRED`,AGENT_MESSAGE_NOT_FOUND:`AGENT_MESSAGE_NOT_FOUND`,AGENT_MESSAGE_NOT_EDITABLE:`AGENT_MESSAGE_NOT_EDITABLE`,DEVICE_NOT_FOUND:`DEVICE_NOT_FOUND`,DEVICE_OFFLINE:`DEVICE_OFFLINE`,AI_UNKNOWN:`AI_UNKNOWN`,AI_USAGE_LIMIT_EXCEEDED:`AI_USAGE_LIMIT_EXCEEDED`,AI_INVALID_USAGE:`AI_INVALID_USAGE`,AI_INVALID_MODEL:`AI_INVALID_MODEL`,AI_INVALID_MODEL_INPUT:`AI_INVALID_MODEL_INPUT`,AI_REPOSITORY_ERROR:`AI_REPOSITORY_ERROR`,AI_GENERATION_FAILED:`AI_GENERATION_FAILED`,AI_IMAGE_USAGE_PENDING:`AI_IMAGE_USAGE_PENDING`,AI_IMAGE_GENERATION_INDETERMINATE:`AI_IMAGE_GENERATION_INDETERMINATE`,AI_IMAGE_PUBLICATION_FAILED:`AI_IMAGE_PUBLICATION_FAILED`,DOCUMENT_MIME_NOT_ACCEPTED:`DOCUMENT_MIME_NOT_ACCEPTED`,DOCUMENT_MULTIPLE_NOT_ALLOWED:`DOCUMENT_MULTIPLE_NOT_ALLOWED`,DOCUMENT_NOT_FOUND_FOR_OPERATION:`DOCUMENT_NOT_FOUND_FOR_OPERATION`,DOCUMENT_STORAGE_FAILED:`DOCUMENT_STORAGE_FAILED`,DOCUMENT_SIZE_EXCEEDED:`DOCUMENT_SIZE_EXCEEDED`,DOCUMENT_OCR_FAILED:`DOCUMENT_OCR_FAILED`,DOCUMENT_BLOB_EMPTY:`DOCUMENT_BLOB_EMPTY`,DOCUMENT_FILE_TOO_LARGE:`DOCUMENT_FILE_TOO_LARGE`,DOCUMENT_FILE_NOT_FOUND:`DOCUMENT_FILE_NOT_FOUND`,DOCUMENT_FILE_ALREADY_PACKED:`DOCUMENT_FILE_ALREADY_PACKED`,DOCUMENT_RECORD_NOT_FOUND:`DOCUMENT_RECORD_NOT_FOUND`,DOCUMENT_RECORD_OBJECT_MISMATCH:`DOCUMENT_RECORD_OBJECT_MISMATCH`,DOCUMENT_FOLDER_SERVICE_UNAVAILABLE:`DOCUMENT_FOLDER_SERVICE_UNAVAILABLE`,DOCUMENT_FOLDER_PATH_NOT_FOUND:`DOCUMENT_FOLDER_PATH_NOT_FOUND`,EMAIL_PROVIDER_API_FAILED:`EMAIL_PROVIDER_API_FAILED`,EMAIL_SEND_FAILED:`EMAIL_SEND_FAILED`,EMAIL_SENT_NOT_STORED:`EMAIL_SENT_NOT_STORED`,EMAIL_BATCH_ITEM_FAILED:`EMAIL_BATCH_ITEM_FAILED`,CALENDAR_PROVIDER_API_FAILED:`CALENDAR_PROVIDER_API_FAILED`,REFLEX_INVALID_TRANSITION:`REFLEX_INVALID_TRANSITION`,REFLEX_INVALID_TOKEN:`REFLEX_INVALID_TOKEN`,REFLEX_CAPABILITY_DENIED:`REFLEX_CAPABILITY_DENIED`,REFLEX_GATEWAY_UNAVAILABLE:`REFLEX_GATEWAY_UNAVAILABLE`,REFLEX_BUNDLE_FAILED:`REFLEX_BUNDLE_FAILED`,REFLEX_EGRESS_DENIED:`REFLEX_EGRESS_DENIED`,REFLEX_PROTOCOL_VIOLATION:`REFLEX_PROTOCOL_VIOLATION`,REFLEX_RUN_FAILED:`REFLEX_RUN_FAILED`,REFLEX_RUN_TIMEOUT:`REFLEX_RUN_TIMEOUT`,REFLEX_DEPENDENCY_DRIFT:`REFLEX_DEPENDENCY_DRIFT`,REFLEX_NOT_READY:`REFLEX_NOT_READY`,REFLEX_INVARIANT_VIOLATION:`REFLEX_INVARIANT_VIOLATION`,EMBEDDING_MODEL_UNAVAILABLE:`EMBEDDING_MODEL_UNAVAILABLE`,EMBEDDING_DIMENSION_MISMATCH:`EMBEDDING_DIMENSION_MISMATCH`};var SchemaError=class extends Error{constructor(t,n=e.UNKNOWN,r){super(t),this.name=`SchemaError`,this.code=n,this.details=r,Object.setPrototypeOf(this,new.target.prototype)}toJSON(){return{name:this.name,code:this.code,message:this.message,details:this.details}}},NotFoundError=class extends SchemaError{constructor(t,n,r=e.RECORD_NOT_FOUND,i=`${t} with id "${n}" not found`){super(i,r,{resourceType:t,resourceId:n}),this._tag=`NotFoundError`,this.name=`NotFoundError`,this.resourceType=t,this.resourceId=n}},ObjectNotFoundError=class extends NotFoundError{constructor(t){super(`Object`,t,e.OBJECT_NOT_FOUND),this.name=`ObjectNotFoundError`}},AttributeNotFoundError=class extends NotFoundError{constructor(t){super(`Attribute`,t,e.ATTRIBUTE_NOT_FOUND),this.name=`AttributeNotFoundError`}},RecordNotFoundError=class extends NotFoundError{constructor(t){super(`Record`,t,e.RECORD_NOT_FOUND),this.name=`RecordNotFoundError`}},SchemaPlanNotFoundError=class extends NotFoundError{constructor(t){super(`Schema plan`,t,e.SCHEMA_PLAN_NOT_FOUND),this.name=`SchemaPlanNotFoundError`}},t=class ValidationError extends SchemaError{constructor(t,n){super(t,e.VALIDATION_FAILED,{errors:n}),this._tag=`ValidationError`,this.name=`ValidationError`,this.errors=n}static fromZodErrors(e){let t=e.map(e=>({path:e.path.map(String),message:e.message})),n=`Validation failed: ${t.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`, `)}`;return new ValidationError(n,t)}},ProtectedResourceError=class extends SchemaError{constructor(t,n,r){let i=t===`object`?e.PROTECTED_OBJECT:t===`view`?e.PROTECTED_VIEW:e.PROTECTED_ATTRIBUTE;super(`Cannot ${r} system ${t} "${n}"`,i,{resourceType:t,resourceName:n,operation:r}),this.name=`ProtectedResourceError`,this.resourceType=t,this.resourceName=n,this.operation=r}},SyncError=class extends SchemaError{constructor(t,n,r){super(`Failed to sync object "${t}": ${n}`,e.SYNC_FAILED,{objectName:t,cause:r?.message}),this.name=`SyncError`,this.objectName=t,this.cause=r}},SystemEntityImmutableError=class extends SchemaError{constructor(t,n){super(`Cannot mutate system ${t} "${n}". System entities are declared in code and immutable at runtime.`,e.SYSTEM_ENTITY_IMMUTABLE,{entityType:t,entityName:n}),this.name=`SystemEntityImmutableError`,this.entityType=t,this.entityName=n}},SyncConflictError=class extends SchemaError{constructor(t){let n=t.attributeName?`"${t.objectName}.${t.attributeName}"`:`"${t.objectName}"`;super(`Cannot promote runtime entity ${n}: ${t.reason}. Resolve via: (1) relax the code constraint, (2) migrate runtime values manually, or (3) rename the code declaration.`,e.SYNC_CONFLICT,{objectName:t.objectName,attributeName:t.attributeName,reason:t.reason}),this.name=`SyncConflictError`,this.objectName=t.objectName,this.attributeName=t.attributeName,this.reason=t.reason}},SyncCascadeError=class extends SchemaError{constructor(t,n){super(`Cannot demote object "${t}": attributes ${n.join(`, `)} are still declared in code. Remove them from code first, or restore the object.`,e.SYNC_CASCADE,{objectName:t,conflictingAttributes:n}),this.name=`SyncCascadeError`,this.objectName=t,this.conflictingAttributes=n}},OrphanSystemAttributeError=class extends SchemaError{constructor(t,n){super(`Attribute "${t}.${n}" is system:true but its object parent is system:false. This is an invariant violation.`,e.ORPHAN_SYSTEM_ATTRIBUTE,{objectName:t,attributeName:n}),this.name=`OrphanSystemAttributeError`,this.objectName=t,this.attributeName=n}},DestructiveSyncNotAllowedError=class extends SchemaError{constructor(t){let n=t.map(e=>{let t=e;return t.name?`- ${e.type} "${t.name}"`:`- ${e.type}`}).join(`
2
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e={DRAFT_REVISION_CONFLICT:`DRAFT_REVISION_CONFLICT`,UNKNOWN:`SCHEMA_UNKNOWN_ERROR`,OBJECT_NOT_FOUND:`SCHEMA_OBJECT_NOT_FOUND`,ATTRIBUTE_NOT_FOUND:`SCHEMA_ATTRIBUTE_NOT_FOUND`,RECORD_NOT_FOUND:`SCHEMA_RECORD_NOT_FOUND`,SOURCE_NOT_FOUND:`SCHEMA_SOURCE_NOT_FOUND`,ROLE_NOT_FOUND:`SCHEMA_ROLE_NOT_FOUND`,MEMORY_NOT_FOUND:`SCHEMA_MEMORY_NOT_FOUND`,SCHEMA_PLAN_NOT_FOUND:`SCHEMA_PLAN_NOT_FOUND`,VALIDATION_FAILED:`SCHEMA_VALIDATION_FAILED`,INVALID_ATTRIBUTE_NAME:`SCHEMA_INVALID_ATTRIBUTE_NAME`,INVALID_OBJECT_NAME:`SCHEMA_INVALID_OBJECT_NAME`,RESERVED_OBJECT_NAME:`SCHEMA_RESERVED_OBJECT_NAME`,PROTECTED_OBJECT:`SCHEMA_PROTECTED_OBJECT`,PROTECTED_ATTRIBUTE:`SCHEMA_PROTECTED_ATTRIBUTE`,PROTECTED_VIEW:`SCHEMA_PROTECTED_VIEW`,PROTECTED_ROLE:`SCHEMA_PROTECTED_ROLE`,FORBIDDEN:`SCHEMA_FORBIDDEN`,ACCESS_DENIED:`SCHEMA_ACCESS_DENIED`,WORKSPACE_INVARIANT:`SCHEMA_WORKSPACE_INVARIANT`,STATE_GATE:`SCHEMA_STATE_GATE`,ACTOR_CONTEXT_REQUIRED:`SCHEMA_ACTOR_CONTEXT_REQUIRED`,CONNECTOR_AUTH_FAILED:`SCHEMA_CONNECTOR_AUTH_FAILED`,CONNECTOR_INVALID_STATE:`SCHEMA_CONNECTOR_INVALID_STATE`,CONNECTOR_GRANT_ORPHANED:`SCHEMA_CONNECTOR_GRANT_ORPHANED`,SYNC_FAILED:`SCHEMA_SYNC_FAILED`,SYNC_CONFLICT:`SCHEMA_SYNC_CONFLICT`,SYNC_CASCADE:`SCHEMA_SYNC_CASCADE`,ORPHAN_SYSTEM_ATTRIBUTE:`SCHEMA_ORPHAN_SYSTEM_ATTRIBUTE`,SYSTEM_ENTITY_IMMUTABLE:`SCHEMA_SYSTEM_ENTITY_IMMUTABLE`,DESTRUCTIVE_NOT_ALLOWED:`SCHEMA_DESTRUCTIVE_NOT_ALLOWED`,MIGRATION_TIMEOUT:`SCHEMA_MIGRATION_TIMEOUT`,CHANGE_TYPE_NOT_SUPPORTED:`SCHEMA_CHANGE_TYPE_NOT_SUPPORTED`,DUPLICATE:`SCHEMA_DUPLICATE`,DUPLICATE_OBJECT:`SCHEMA_DUPLICATE_OBJECT`,DUPLICATE_ATTRIBUTE:`SCHEMA_DUPLICATE_ATTRIBUTE`,CONFLICT:`SCHEMA_CONFLICT`,STORAGE_UPLOAD_FAILED:`SCHEMA_STORAGE_UPLOAD_FAILED`,STORAGE_DOWNLOAD_FAILED:`SCHEMA_STORAGE_DOWNLOAD_FAILED`,STORAGE_DELETE_FAILED:`SCHEMA_STORAGE_DELETE_FAILED`,STORAGE_URL_FAILED:`SCHEMA_STORAGE_URL_FAILED`,REPOSITORY_CREATE_FAILED:`SCHEMA_REPOSITORY_CREATE_FAILED`,REPOSITORY_UPDATE_FAILED:`SCHEMA_REPOSITORY_UPDATE_FAILED`,REPOSITORY_DELETE_FAILED:`SCHEMA_REPOSITORY_DELETE_FAILED`,REPOSITORY_QUERY_FAILED:`SCHEMA_REPOSITORY_QUERY_FAILED`,NOT_IMPLEMENTED:`SCHEMA_NOT_IMPLEMENTED`,TIMEOUT:`SCHEMA_TIMEOUT`,RECORD_REFERENCED:`SCHEMA_RECORD_REFERENCED`,ATTRIBUTE_IN_USE:`SCHEMA_ATTRIBUTE_IN_USE`,OBJECT_REFERENCED:`SCHEMA_OBJECT_REFERENCED`,CONFIGURATION_REQUIRED:`CONFIGURATION_REQUIRED`,SEARCH_ADAPTER_REQUIRED:`SEARCH_ADAPTER_REQUIRED`,CRON_REGISTRATION_FAILED:`CRON_REGISTRATION_FAILED`,JOB_WORKER_SHUTDOWN_FAILED:`JOB_WORKER_SHUTDOWN_FAILED`,SEARCH_BACKEND_FAILED:`SEARCH_BACKEND_FAILED`,INVARIANT_VIOLATION:`INVARIANT_VIOLATION`,TENANT_CONTEXT_MISSING:`TENANT_CONTEXT_MISSING`,FEATURE_FLAGS_CONTEXT:`FEATURE_FLAGS_CONTEXT`,REALTIME_RATE_LIMITED:`REALTIME_RATE_LIMITED`,REALTIME_DELIVERY_FAILED:`REALTIME_DELIVERY_FAILED`,REALTIME_SUBSCRIPTION_FAILED:`REALTIME_SUBSCRIPTION_FAILED`,AGENT_UNKNOWN:`AGENT_UNKNOWN`,AGENT_DEPTH_EXCEEDED:`AGENT_DEPTH_EXCEEDED`,AGENT_COST_LIMIT_EXCEEDED:`AGENT_COST_LIMIT_EXCEEDED`,AGENT_TREE_COST_LIMIT_EXCEEDED:`AGENT_TREE_COST_LIMIT_EXCEEDED`,CREDITS_EXHAUSTED:`CREDITS_EXHAUSTED`,QUOTA_EXCEEDED:`QUOTA_EXCEEDED`,AGENT_SESSION_NOT_FOUND:`AGENT_SESSION_NOT_FOUND`,AGENT_DEFINITION_NOT_FOUND:`AGENT_DEFINITION_NOT_FOUND`,AGENT_RUN_CONFIG:`AGENT_RUN_CONFIG`,AGENT_STREAMING:`AGENT_STREAMING`,AGENT_MISSING_ACTOR:`AGENT_MISSING_ACTOR`,AGENT_INVALID_STATE:`AGENT_INVALID_STATE`,AGENT_COMPACTION_IMPOSSIBLE:`AGENT_COMPACTION_IMPOSSIBLE`,AGENT_COMPACTION_TIMEOUT:`AGENT_COMPACTION_TIMEOUT`,AGENT_LEASE_HELD:`AGENT_LEASE_HELD`,AGENT_LEASE_UNAVAILABLE:`AGENT_LEASE_UNAVAILABLE`,AGENT_WORK_MODE_REQUIRED:`AGENT_WORK_MODE_REQUIRED`,AGENT_MESSAGE_NOT_FOUND:`AGENT_MESSAGE_NOT_FOUND`,AGENT_MESSAGE_NOT_EDITABLE:`AGENT_MESSAGE_NOT_EDITABLE`,INVALID_TOOL_INPUT:`INVALID_TOOL_INPUT`,DEVICE_NOT_FOUND:`DEVICE_NOT_FOUND`,DEVICE_OFFLINE:`DEVICE_OFFLINE`,AI_UNKNOWN:`AI_UNKNOWN`,AI_USAGE_LIMIT_EXCEEDED:`AI_USAGE_LIMIT_EXCEEDED`,AI_INVALID_USAGE:`AI_INVALID_USAGE`,AI_INVALID_MODEL:`AI_INVALID_MODEL`,AI_INVALID_MODEL_INPUT:`AI_INVALID_MODEL_INPUT`,AI_REPOSITORY_ERROR:`AI_REPOSITORY_ERROR`,AI_GENERATION_FAILED:`AI_GENERATION_FAILED`,AI_IMAGE_USAGE_PENDING:`AI_IMAGE_USAGE_PENDING`,AI_IMAGE_GENERATION_INDETERMINATE:`AI_IMAGE_GENERATION_INDETERMINATE`,AI_IMAGE_PUBLICATION_FAILED:`AI_IMAGE_PUBLICATION_FAILED`,DOCUMENT_MIME_NOT_ACCEPTED:`DOCUMENT_MIME_NOT_ACCEPTED`,DOCUMENT_MULTIPLE_NOT_ALLOWED:`DOCUMENT_MULTIPLE_NOT_ALLOWED`,DOCUMENT_NOT_FOUND_FOR_OPERATION:`DOCUMENT_NOT_FOUND_FOR_OPERATION`,DOCUMENT_STORAGE_FAILED:`DOCUMENT_STORAGE_FAILED`,DOCUMENT_SIZE_EXCEEDED:`DOCUMENT_SIZE_EXCEEDED`,DOCUMENT_OCR_FAILED:`DOCUMENT_OCR_FAILED`,DOCUMENT_BLOB_EMPTY:`DOCUMENT_BLOB_EMPTY`,DOCUMENT_FILE_TOO_LARGE:`DOCUMENT_FILE_TOO_LARGE`,DOCUMENT_FILE_NOT_FOUND:`DOCUMENT_FILE_NOT_FOUND`,DOCUMENT_FILE_ALREADY_PACKED:`DOCUMENT_FILE_ALREADY_PACKED`,DOCUMENT_RECORD_NOT_FOUND:`DOCUMENT_RECORD_NOT_FOUND`,DOCUMENT_RECORD_OBJECT_MISMATCH:`DOCUMENT_RECORD_OBJECT_MISMATCH`,DOCUMENT_FOLDER_SERVICE_UNAVAILABLE:`DOCUMENT_FOLDER_SERVICE_UNAVAILABLE`,DOCUMENT_FOLDER_PATH_NOT_FOUND:`DOCUMENT_FOLDER_PATH_NOT_FOUND`,EMAIL_PROVIDER_API_FAILED:`EMAIL_PROVIDER_API_FAILED`,EMAIL_SEND_FAILED:`EMAIL_SEND_FAILED`,EMAIL_SENT_NOT_STORED:`EMAIL_SENT_NOT_STORED`,EMAIL_BATCH_ITEM_FAILED:`EMAIL_BATCH_ITEM_FAILED`,CALENDAR_PROVIDER_API_FAILED:`CALENDAR_PROVIDER_API_FAILED`,REFLEX_INVALID_TRANSITION:`REFLEX_INVALID_TRANSITION`,REFLEX_INVALID_TOKEN:`REFLEX_INVALID_TOKEN`,REFLEX_CAPABILITY_DENIED:`REFLEX_CAPABILITY_DENIED`,REFLEX_GATEWAY_UNAVAILABLE:`REFLEX_GATEWAY_UNAVAILABLE`,REFLEX_BUNDLE_FAILED:`REFLEX_BUNDLE_FAILED`,REFLEX_EGRESS_DENIED:`REFLEX_EGRESS_DENIED`,REFLEX_PROTOCOL_VIOLATION:`REFLEX_PROTOCOL_VIOLATION`,REFLEX_RUN_FAILED:`REFLEX_RUN_FAILED`,REFLEX_RUN_TIMEOUT:`REFLEX_RUN_TIMEOUT`,REFLEX_DEPENDENCY_DRIFT:`REFLEX_DEPENDENCY_DRIFT`,REFLEX_NOT_READY:`REFLEX_NOT_READY`,REFLEX_INVARIANT_VIOLATION:`REFLEX_INVARIANT_VIOLATION`,EMBEDDING_MODEL_UNAVAILABLE:`EMBEDDING_MODEL_UNAVAILABLE`,EMBEDDING_DIMENSION_MISMATCH:`EMBEDDING_DIMENSION_MISMATCH`};var SchemaError=class extends Error{constructor(t,n=e.UNKNOWN,r){super(t),this.name=`SchemaError`,this.code=n,this.details=r,Object.setPrototypeOf(this,new.target.prototype)}toJSON(){return{name:this.name,code:this.code,message:this.message,details:this.details}}},NotFoundError=class extends SchemaError{constructor(t,n,r=e.RECORD_NOT_FOUND,i=`${t} with id "${n}" not found`){super(i,r,{resourceType:t,resourceId:n}),this._tag=`NotFoundError`,this.name=`NotFoundError`,this.resourceType=t,this.resourceId=n}},ObjectNotFoundError=class extends NotFoundError{constructor(t){super(`Object`,t,e.OBJECT_NOT_FOUND),this.name=`ObjectNotFoundError`}},AttributeNotFoundError=class extends NotFoundError{constructor(t){super(`Attribute`,t,e.ATTRIBUTE_NOT_FOUND),this.name=`AttributeNotFoundError`}},RecordNotFoundError=class extends NotFoundError{constructor(t){super(`Record`,t,e.RECORD_NOT_FOUND),this.name=`RecordNotFoundError`}},SchemaPlanNotFoundError=class extends NotFoundError{constructor(t){super(`Schema plan`,t,e.SCHEMA_PLAN_NOT_FOUND),this.name=`SchemaPlanNotFoundError`}},t=class ValidationError extends SchemaError{constructor(t,n){super(t,e.VALIDATION_FAILED,{errors:n}),this._tag=`ValidationError`,this.name=`ValidationError`,this.errors=n}static fromZodErrors(e){let t=e.map(e=>({path:e.path.map(String),message:e.message})),n=`Validation failed: ${t.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`, `)}`;return new ValidationError(n,t)}},ProtectedResourceError=class extends SchemaError{constructor(t,n,r){let i=t===`object`?e.PROTECTED_OBJECT:t===`view`?e.PROTECTED_VIEW:e.PROTECTED_ATTRIBUTE;super(`Cannot ${r} system ${t} "${n}"`,i,{resourceType:t,resourceName:n,operation:r}),this.name=`ProtectedResourceError`,this.resourceType=t,this.resourceName=n,this.operation=r}},SyncError=class extends SchemaError{constructor(t,n,r){super(`Failed to sync object "${t}": ${n}`,e.SYNC_FAILED,{objectName:t,cause:r?.message}),this.name=`SyncError`,this.objectName=t,this.cause=r}},SystemEntityImmutableError=class extends SchemaError{constructor(t,n){super(`Cannot mutate system ${t} "${n}". System entities are declared in code and immutable at runtime.`,e.SYSTEM_ENTITY_IMMUTABLE,{entityType:t,entityName:n}),this.name=`SystemEntityImmutableError`,this.entityType=t,this.entityName=n}},SyncConflictError=class extends SchemaError{constructor(t){let n=t.attributeName?`"${t.objectName}.${t.attributeName}"`:`"${t.objectName}"`;super(`Cannot promote runtime entity ${n}: ${t.reason}. Resolve via: (1) relax the code constraint, (2) migrate runtime values manually, or (3) rename the code declaration.`,e.SYNC_CONFLICT,{objectName:t.objectName,attributeName:t.attributeName,reason:t.reason}),this.name=`SyncConflictError`,this.objectName=t.objectName,this.attributeName=t.attributeName,this.reason=t.reason}},SyncCascadeError=class extends SchemaError{constructor(t,n){super(`Cannot demote object "${t}": attributes ${n.join(`, `)} are still declared in code. Remove them from code first, or restore the object.`,e.SYNC_CASCADE,{objectName:t,conflictingAttributes:n}),this.name=`SyncCascadeError`,this.objectName=t,this.conflictingAttributes=n}},OrphanSystemAttributeError=class extends SchemaError{constructor(t,n){super(`Attribute "${t}.${n}" is system:true but its object parent is system:false. This is an invariant violation.`,e.ORPHAN_SYSTEM_ATTRIBUTE,{objectName:t,attributeName:n}),this.name=`OrphanSystemAttributeError`,this.objectName=t,this.attributeName=n}},DestructiveSyncNotAllowedError=class extends SchemaError{constructor(t){let n=t.map(e=>{let t=e;return t.name?`- ${e.type} "${t.name}"`:`- ${e.type}`}).join(`
3
3
  `);super(`Destructive schema operations detected (data will be lost):\n${n}\n\nThese are applied only under an explicit opt-in; without it boot demotes the object to runtime and keeps its rows. To let Standards apply them automatically, set the environment variable:\n STANDARDS_ALLOW_DESTRUCTIVE_SYNC=1\n\nOtherwise, revert your code changes or back up the data first.`,e.DESTRUCTIVE_NOT_ALLOWED,{operations:t}),this.name=`DestructiveSyncNotAllowedError`,this.operations=t}},MigrationTimeoutError=class extends SchemaError{constructor(t,n,r,i){super(`Migration for "${t}" exceeded the maximum duration (${i}ms). Migrated ${n}/${r} records before timeout. Increase STANDARDS_MIGRATION_MAX_DURATION_MS or split the migration into smaller batches.`,e.MIGRATION_TIMEOUT,{objectName:t,migrated:n,total:r,maxDurationMs:i}),this.name=`MigrationTimeoutError`,this.objectName=t,this.migrated=n,this.total=r,this.maxDurationMs=i}},ChangeTypeNotSupportedError=class extends SchemaError{constructor(t,n){super(`Cannot change type of attribute "${t}.${n}" via runtime API. Declare a migration in your schema code:\n object("${t}").migration(N, (m) =>\n m.changeType("${n}", from, to, { transform: (v) => ... })\n )`,e.CHANGE_TYPE_NOT_SUPPORTED,{objectName:t,attributeName:n}),this.name=`ChangeTypeNotSupportedError`,this.objectName=t,this.attributeName=n}},DuplicateError=class extends SchemaError{constructor(t,n,r){let i=t===`object`?e.DUPLICATE_OBJECT:t===`attribute`?e.DUPLICATE_ATTRIBUTE:e.DUPLICATE,a=`${t.charAt(0).toUpperCase()}${t.slice(1)} "${n}" already exists`;super(r??a,i,{resourceType:t,resourceName:n}),this.name=`DuplicateError`,this.resourceType=t,this.resourceName=n}};const n={builder:`cannot be built by a consumer`,registry:`cannot be registered by a consumer`,bundle:`cannot be claimed by a bundle`,source:`cannot be declared by a schema source`};var ReservedObjectNameError=class extends SchemaError{constructor(t,r){super(`"${t}" is a framework-native object name and ${n[r]}: the framework ships it, pick another name.`,e.RESERVED_OBJECT_NAME,{objectName:t,context:r}),this.name=`ReservedObjectNameError`,this.objectName=t}};function isSchemaError(e){return e instanceof SchemaError}function isNotFoundError(e){return e instanceof NotFoundError}function isValidationError(e){return e instanceof t}function isProtectedResourceError(e){return e instanceof ProtectedResourceError}var ForbiddenError=class extends SchemaError{constructor(t,n,r){super(`No ${n} permission on object "${t}"`,e.FORBIDDEN,{objectName:t,action:n,userId:r}),this._tag=`ForbiddenError`,this.name=`ForbiddenError`,this.objectName=t,this.action=n,this.userId=r}},ProtectedRoleError=class extends SchemaError{constructor(t,n){super(`Cannot ${n} system role "${t}"`,e.PROTECTED_ROLE,{roleName:t,operation:n}),this.name=`ProtectedRoleError`,this.roleName=t,this.operation=n}},RoleNotFoundError=class extends NotFoundError{constructor(t){super(`Role`,t,e.ROLE_NOT_FOUND),this.name=`RoleNotFoundError`}},ConcurrentModificationError=class extends SchemaError{constructor(t){super(`Record ${t} was modified by another request. Please refresh and try again.`,e.CONFLICT,{recordId:t})}},StorageError=class extends SchemaError{constructor(t,n,r,i){let a=t===`upload`?e.STORAGE_UPLOAD_FAILED:t===`download`?e.STORAGE_DOWNLOAD_FAILED:t===`delete`?e.STORAGE_DELETE_FAILED:e.STORAGE_URL_FAILED;super(`Storage ${t} failed: ${n}`,a,{operation:t,path:r,cause:i}),this.name=`StorageError`,this.operation=t,this.path=r,this.cause=i}},AccessDeniedError=class extends SchemaError{constructor(t,n){super(n??`Access denied to resource: ${t}`,e.ACCESS_DENIED,{resource:t,reason:n}),this.name=`AccessDeniedError`,this.resource=t,this.reason=n}},RepositoryError=class extends SchemaError{constructor(t,n,r,i){let a=t===`create`?e.REPOSITORY_CREATE_FAILED:t===`update`?e.REPOSITORY_UPDATE_FAILED:t===`delete`?e.REPOSITORY_DELETE_FAILED:e.REPOSITORY_QUERY_FAILED;super(`Failed to ${t} ${n}: ${r}${i?` (${i})`:``}`,a,{operation:t,entity:n,cause:i}),this.name=`RepositoryError`,this.operation=t,this.entity=n,this.cause=i}},SearchBackendError=class extends SchemaError{constructor(t,n){super(`Search backend unavailable for ${t}`,e.SEARCH_BACKEND_FAILED,{scope:t,cause:n}),this.name=`SearchBackendError`,this.scope=t,this.cause=n}},NotImplementedError=class extends SchemaError{constructor(t,n){let r=n?`${t}: not implemented (${n})`:`${t}: not implemented`;super(r,e.NOT_IMPLEMENTED,{feature:t,milestone:n}),this.name=`NotImplementedError`,this.feature=t,this.milestone=n}},MemoryNotFoundError=class extends NotFoundError{constructor(t){super(`Memory`,t,e.MEMORY_NOT_FOUND),this.name=`MemoryNotFoundError`}},RecordReferencedError=class extends SchemaError{constructor(t,n){let r=n.reduce((e,t)=>e+t.count,0);super(`Cannot delete record: referenced by ${r} record${r>1?`s`:``}`,e.RECORD_REFERENCED,{recordId:t,references:n}),this.name=`RecordReferencedError`,this.recordId=t,this.references=n}},AttributeInUseError=class extends SchemaError{constructor(t,n){super(`Cannot delete attribute "${t}": used in ${n}`,e.ATTRIBUTE_IN_USE,{attributeName:t,usage:n}),this.name=`AttributeInUseError`,this.attributeName=t,this.usage=n}},ObjectReferencedError=class extends SchemaError{constructor(t,n){super(`Cannot delete object "${t}": target of relations in ${n.join(`, `)}`,e.OBJECT_REFERENCED,{objectName:t,referencingObjects:n}),this.name=`ObjectReferencedError`,this.objectName=t,this.referencingObjects=n}};function isRecordReferencedError(e){return e instanceof RecordReferencedError}function isAttributeInUseError(e){return e instanceof AttributeInUseError}function isObjectReferencedError(e){return e instanceof ObjectReferencedError}exports.AccessDeniedError=AccessDeniedError,exports.AttributeInUseError=AttributeInUseError,exports.AttributeNotFoundError=AttributeNotFoundError,exports.ChangeTypeNotSupportedError=ChangeTypeNotSupportedError,exports.ConcurrentModificationError=ConcurrentModificationError,exports.DestructiveSyncNotAllowedError=DestructiveSyncNotAllowedError,exports.DuplicateError=DuplicateError,exports.ForbiddenError=ForbiddenError,exports.MemoryNotFoundError=MemoryNotFoundError,exports.MigrationTimeoutError=MigrationTimeoutError,exports.NotFoundError=NotFoundError,exports.NotImplementedError=NotImplementedError,exports.ObjectNotFoundError=ObjectNotFoundError,exports.ObjectReferencedError=ObjectReferencedError,exports.OrphanSystemAttributeError=OrphanSystemAttributeError,exports.ProtectedResourceError=ProtectedResourceError,exports.ProtectedRoleError=ProtectedRoleError,exports.RecordNotFoundError=RecordNotFoundError,exports.RecordReferencedError=RecordReferencedError,exports.RepositoryError=RepositoryError,exports.ReservedObjectNameError=ReservedObjectNameError,exports.RoleNotFoundError=RoleNotFoundError,exports.SchemaError=SchemaError,exports.SchemaErrorCode=e,exports.SchemaPlanNotFoundError=SchemaPlanNotFoundError,exports.SearchBackendError=SearchBackendError,exports.StorageError=StorageError,exports.SyncCascadeError=SyncCascadeError,exports.SyncConflictError=SyncConflictError,exports.SyncError=SyncError,exports.SystemEntityImmutableError=SystemEntityImmutableError,exports.ValidationError=t,exports.isAttributeInUseError=isAttributeInUseError,exports.isNotFoundError=isNotFoundError,exports.isObjectReferencedError=isObjectReferencedError,exports.isProtectedResourceError=isProtectedResourceError,exports.isRecordReferencedError=isRecordReferencedError,exports.isSchemaError=isSchemaError,exports.isValidationError=isValidationError;
@@ -1,3 +1,3 @@
1
1
  /*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
- const e={DRAFT_REVISION_CONFLICT:`DRAFT_REVISION_CONFLICT`,UNKNOWN:`SCHEMA_UNKNOWN_ERROR`,OBJECT_NOT_FOUND:`SCHEMA_OBJECT_NOT_FOUND`,ATTRIBUTE_NOT_FOUND:`SCHEMA_ATTRIBUTE_NOT_FOUND`,RECORD_NOT_FOUND:`SCHEMA_RECORD_NOT_FOUND`,SOURCE_NOT_FOUND:`SCHEMA_SOURCE_NOT_FOUND`,ROLE_NOT_FOUND:`SCHEMA_ROLE_NOT_FOUND`,MEMORY_NOT_FOUND:`SCHEMA_MEMORY_NOT_FOUND`,SCHEMA_PLAN_NOT_FOUND:`SCHEMA_PLAN_NOT_FOUND`,VALIDATION_FAILED:`SCHEMA_VALIDATION_FAILED`,INVALID_ATTRIBUTE_NAME:`SCHEMA_INVALID_ATTRIBUTE_NAME`,INVALID_OBJECT_NAME:`SCHEMA_INVALID_OBJECT_NAME`,RESERVED_OBJECT_NAME:`SCHEMA_RESERVED_OBJECT_NAME`,PROTECTED_OBJECT:`SCHEMA_PROTECTED_OBJECT`,PROTECTED_ATTRIBUTE:`SCHEMA_PROTECTED_ATTRIBUTE`,PROTECTED_VIEW:`SCHEMA_PROTECTED_VIEW`,PROTECTED_ROLE:`SCHEMA_PROTECTED_ROLE`,FORBIDDEN:`SCHEMA_FORBIDDEN`,ACCESS_DENIED:`SCHEMA_ACCESS_DENIED`,WORKSPACE_INVARIANT:`SCHEMA_WORKSPACE_INVARIANT`,STATE_GATE:`SCHEMA_STATE_GATE`,ACTOR_CONTEXT_REQUIRED:`SCHEMA_ACTOR_CONTEXT_REQUIRED`,CONNECTOR_AUTH_FAILED:`SCHEMA_CONNECTOR_AUTH_FAILED`,CONNECTOR_INVALID_STATE:`SCHEMA_CONNECTOR_INVALID_STATE`,CONNECTOR_GRANT_ORPHANED:`SCHEMA_CONNECTOR_GRANT_ORPHANED`,SYNC_FAILED:`SCHEMA_SYNC_FAILED`,SYNC_CONFLICT:`SCHEMA_SYNC_CONFLICT`,SYNC_CASCADE:`SCHEMA_SYNC_CASCADE`,ORPHAN_SYSTEM_ATTRIBUTE:`SCHEMA_ORPHAN_SYSTEM_ATTRIBUTE`,SYSTEM_ENTITY_IMMUTABLE:`SCHEMA_SYSTEM_ENTITY_IMMUTABLE`,DESTRUCTIVE_NOT_ALLOWED:`SCHEMA_DESTRUCTIVE_NOT_ALLOWED`,MIGRATION_TIMEOUT:`SCHEMA_MIGRATION_TIMEOUT`,CHANGE_TYPE_NOT_SUPPORTED:`SCHEMA_CHANGE_TYPE_NOT_SUPPORTED`,DUPLICATE:`SCHEMA_DUPLICATE`,DUPLICATE_OBJECT:`SCHEMA_DUPLICATE_OBJECT`,DUPLICATE_ATTRIBUTE:`SCHEMA_DUPLICATE_ATTRIBUTE`,CONFLICT:`SCHEMA_CONFLICT`,STORAGE_UPLOAD_FAILED:`SCHEMA_STORAGE_UPLOAD_FAILED`,STORAGE_DOWNLOAD_FAILED:`SCHEMA_STORAGE_DOWNLOAD_FAILED`,STORAGE_DELETE_FAILED:`SCHEMA_STORAGE_DELETE_FAILED`,STORAGE_URL_FAILED:`SCHEMA_STORAGE_URL_FAILED`,REPOSITORY_CREATE_FAILED:`SCHEMA_REPOSITORY_CREATE_FAILED`,REPOSITORY_UPDATE_FAILED:`SCHEMA_REPOSITORY_UPDATE_FAILED`,REPOSITORY_DELETE_FAILED:`SCHEMA_REPOSITORY_DELETE_FAILED`,REPOSITORY_QUERY_FAILED:`SCHEMA_REPOSITORY_QUERY_FAILED`,NOT_IMPLEMENTED:`SCHEMA_NOT_IMPLEMENTED`,TIMEOUT:`SCHEMA_TIMEOUT`,RECORD_REFERENCED:`SCHEMA_RECORD_REFERENCED`,ATTRIBUTE_IN_USE:`SCHEMA_ATTRIBUTE_IN_USE`,OBJECT_REFERENCED:`SCHEMA_OBJECT_REFERENCED`,CONFIGURATION_REQUIRED:`CONFIGURATION_REQUIRED`,SEARCH_ADAPTER_REQUIRED:`SEARCH_ADAPTER_REQUIRED`,CRON_REGISTRATION_FAILED:`CRON_REGISTRATION_FAILED`,JOB_WORKER_SHUTDOWN_FAILED:`JOB_WORKER_SHUTDOWN_FAILED`,SEARCH_BACKEND_FAILED:`SEARCH_BACKEND_FAILED`,INVARIANT_VIOLATION:`INVARIANT_VIOLATION`,TENANT_CONTEXT_MISSING:`TENANT_CONTEXT_MISSING`,FEATURE_FLAGS_CONTEXT:`FEATURE_FLAGS_CONTEXT`,REALTIME_RATE_LIMITED:`REALTIME_RATE_LIMITED`,REALTIME_DELIVERY_FAILED:`REALTIME_DELIVERY_FAILED`,REALTIME_SUBSCRIPTION_FAILED:`REALTIME_SUBSCRIPTION_FAILED`,AGENT_UNKNOWN:`AGENT_UNKNOWN`,AGENT_DEPTH_EXCEEDED:`AGENT_DEPTH_EXCEEDED`,AGENT_COST_LIMIT_EXCEEDED:`AGENT_COST_LIMIT_EXCEEDED`,AGENT_TREE_COST_LIMIT_EXCEEDED:`AGENT_TREE_COST_LIMIT_EXCEEDED`,CREDITS_EXHAUSTED:`CREDITS_EXHAUSTED`,QUOTA_EXCEEDED:`QUOTA_EXCEEDED`,AGENT_SESSION_NOT_FOUND:`AGENT_SESSION_NOT_FOUND`,AGENT_DEFINITION_NOT_FOUND:`AGENT_DEFINITION_NOT_FOUND`,AGENT_RUN_CONFIG:`AGENT_RUN_CONFIG`,AGENT_STREAMING:`AGENT_STREAMING`,AGENT_MISSING_ACTOR:`AGENT_MISSING_ACTOR`,AGENT_INVALID_STATE:`AGENT_INVALID_STATE`,AGENT_COMPACTION_IMPOSSIBLE:`AGENT_COMPACTION_IMPOSSIBLE`,AGENT_COMPACTION_TIMEOUT:`AGENT_COMPACTION_TIMEOUT`,AGENT_LEASE_HELD:`AGENT_LEASE_HELD`,AGENT_LEASE_UNAVAILABLE:`AGENT_LEASE_UNAVAILABLE`,AGENT_WORK_MODE_REQUIRED:`AGENT_WORK_MODE_REQUIRED`,AGENT_MESSAGE_NOT_FOUND:`AGENT_MESSAGE_NOT_FOUND`,AGENT_MESSAGE_NOT_EDITABLE:`AGENT_MESSAGE_NOT_EDITABLE`,DEVICE_NOT_FOUND:`DEVICE_NOT_FOUND`,DEVICE_OFFLINE:`DEVICE_OFFLINE`,AI_UNKNOWN:`AI_UNKNOWN`,AI_USAGE_LIMIT_EXCEEDED:`AI_USAGE_LIMIT_EXCEEDED`,AI_INVALID_USAGE:`AI_INVALID_USAGE`,AI_INVALID_MODEL:`AI_INVALID_MODEL`,AI_INVALID_MODEL_INPUT:`AI_INVALID_MODEL_INPUT`,AI_REPOSITORY_ERROR:`AI_REPOSITORY_ERROR`,AI_GENERATION_FAILED:`AI_GENERATION_FAILED`,AI_IMAGE_USAGE_PENDING:`AI_IMAGE_USAGE_PENDING`,AI_IMAGE_GENERATION_INDETERMINATE:`AI_IMAGE_GENERATION_INDETERMINATE`,AI_IMAGE_PUBLICATION_FAILED:`AI_IMAGE_PUBLICATION_FAILED`,DOCUMENT_MIME_NOT_ACCEPTED:`DOCUMENT_MIME_NOT_ACCEPTED`,DOCUMENT_MULTIPLE_NOT_ALLOWED:`DOCUMENT_MULTIPLE_NOT_ALLOWED`,DOCUMENT_NOT_FOUND_FOR_OPERATION:`DOCUMENT_NOT_FOUND_FOR_OPERATION`,DOCUMENT_STORAGE_FAILED:`DOCUMENT_STORAGE_FAILED`,DOCUMENT_SIZE_EXCEEDED:`DOCUMENT_SIZE_EXCEEDED`,DOCUMENT_OCR_FAILED:`DOCUMENT_OCR_FAILED`,DOCUMENT_BLOB_EMPTY:`DOCUMENT_BLOB_EMPTY`,DOCUMENT_FILE_TOO_LARGE:`DOCUMENT_FILE_TOO_LARGE`,DOCUMENT_FILE_NOT_FOUND:`DOCUMENT_FILE_NOT_FOUND`,DOCUMENT_FILE_ALREADY_PACKED:`DOCUMENT_FILE_ALREADY_PACKED`,DOCUMENT_RECORD_NOT_FOUND:`DOCUMENT_RECORD_NOT_FOUND`,DOCUMENT_RECORD_OBJECT_MISMATCH:`DOCUMENT_RECORD_OBJECT_MISMATCH`,DOCUMENT_FOLDER_SERVICE_UNAVAILABLE:`DOCUMENT_FOLDER_SERVICE_UNAVAILABLE`,DOCUMENT_FOLDER_PATH_NOT_FOUND:`DOCUMENT_FOLDER_PATH_NOT_FOUND`,EMAIL_PROVIDER_API_FAILED:`EMAIL_PROVIDER_API_FAILED`,EMAIL_SEND_FAILED:`EMAIL_SEND_FAILED`,EMAIL_SENT_NOT_STORED:`EMAIL_SENT_NOT_STORED`,EMAIL_BATCH_ITEM_FAILED:`EMAIL_BATCH_ITEM_FAILED`,CALENDAR_PROVIDER_API_FAILED:`CALENDAR_PROVIDER_API_FAILED`,REFLEX_INVALID_TRANSITION:`REFLEX_INVALID_TRANSITION`,REFLEX_INVALID_TOKEN:`REFLEX_INVALID_TOKEN`,REFLEX_CAPABILITY_DENIED:`REFLEX_CAPABILITY_DENIED`,REFLEX_GATEWAY_UNAVAILABLE:`REFLEX_GATEWAY_UNAVAILABLE`,REFLEX_BUNDLE_FAILED:`REFLEX_BUNDLE_FAILED`,REFLEX_EGRESS_DENIED:`REFLEX_EGRESS_DENIED`,REFLEX_PROTOCOL_VIOLATION:`REFLEX_PROTOCOL_VIOLATION`,REFLEX_RUN_FAILED:`REFLEX_RUN_FAILED`,REFLEX_RUN_TIMEOUT:`REFLEX_RUN_TIMEOUT`,REFLEX_DEPENDENCY_DRIFT:`REFLEX_DEPENDENCY_DRIFT`,REFLEX_NOT_READY:`REFLEX_NOT_READY`,REFLEX_INVARIANT_VIOLATION:`REFLEX_INVARIANT_VIOLATION`,EMBEDDING_MODEL_UNAVAILABLE:`EMBEDDING_MODEL_UNAVAILABLE`,EMBEDDING_DIMENSION_MISMATCH:`EMBEDDING_DIMENSION_MISMATCH`};var SchemaError=class extends Error{constructor(t,n=e.UNKNOWN,r){super(t),this.name=`SchemaError`,this.code=n,this.details=r,Object.setPrototypeOf(this,new.target.prototype)}toJSON(){return{name:this.name,code:this.code,message:this.message,details:this.details}}},NotFoundError=class extends SchemaError{constructor(t,n,r=e.RECORD_NOT_FOUND,i=`${t} with id "${n}" not found`){super(i,r,{resourceType:t,resourceId:n}),this._tag=`NotFoundError`,this.name=`NotFoundError`,this.resourceType=t,this.resourceId=n}},ObjectNotFoundError=class extends NotFoundError{constructor(t){super(`Object`,t,e.OBJECT_NOT_FOUND),this.name=`ObjectNotFoundError`}},AttributeNotFoundError=class extends NotFoundError{constructor(t){super(`Attribute`,t,e.ATTRIBUTE_NOT_FOUND),this.name=`AttributeNotFoundError`}},RecordNotFoundError=class extends NotFoundError{constructor(t){super(`Record`,t,e.RECORD_NOT_FOUND),this.name=`RecordNotFoundError`}},SchemaPlanNotFoundError=class extends NotFoundError{constructor(t){super(`Schema plan`,t,e.SCHEMA_PLAN_NOT_FOUND),this.name=`SchemaPlanNotFoundError`}},t=class ValidationError extends SchemaError{constructor(t,n){super(t,e.VALIDATION_FAILED,{errors:n}),this._tag=`ValidationError`,this.name=`ValidationError`,this.errors=n}static fromZodErrors(e){let t=e.map(e=>({path:e.path.map(String),message:e.message})),n=`Validation failed: ${t.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`, `)}`;return new ValidationError(n,t)}},ProtectedResourceError=class extends SchemaError{constructor(t,n,r){let i=t===`object`?e.PROTECTED_OBJECT:t===`view`?e.PROTECTED_VIEW:e.PROTECTED_ATTRIBUTE;super(`Cannot ${r} system ${t} "${n}"`,i,{resourceType:t,resourceName:n,operation:r}),this.name=`ProtectedResourceError`,this.resourceType=t,this.resourceName=n,this.operation=r}},SyncError=class extends SchemaError{constructor(t,n,r){super(`Failed to sync object "${t}": ${n}`,e.SYNC_FAILED,{objectName:t,cause:r?.message}),this.name=`SyncError`,this.objectName=t,this.cause=r}},SystemEntityImmutableError=class extends SchemaError{constructor(t,n){super(`Cannot mutate system ${t} "${n}". System entities are declared in code and immutable at runtime.`,e.SYSTEM_ENTITY_IMMUTABLE,{entityType:t,entityName:n}),this.name=`SystemEntityImmutableError`,this.entityType=t,this.entityName=n}},SyncConflictError=class extends SchemaError{constructor(t){let n=t.attributeName?`"${t.objectName}.${t.attributeName}"`:`"${t.objectName}"`;super(`Cannot promote runtime entity ${n}: ${t.reason}. Resolve via: (1) relax the code constraint, (2) migrate runtime values manually, or (3) rename the code declaration.`,e.SYNC_CONFLICT,{objectName:t.objectName,attributeName:t.attributeName,reason:t.reason}),this.name=`SyncConflictError`,this.objectName=t.objectName,this.attributeName=t.attributeName,this.reason=t.reason}},SyncCascadeError=class extends SchemaError{constructor(t,n){super(`Cannot demote object "${t}": attributes ${n.join(`, `)} are still declared in code. Remove them from code first, or restore the object.`,e.SYNC_CASCADE,{objectName:t,conflictingAttributes:n}),this.name=`SyncCascadeError`,this.objectName=t,this.conflictingAttributes=n}},OrphanSystemAttributeError=class extends SchemaError{constructor(t,n){super(`Attribute "${t}.${n}" is system:true but its object parent is system:false. This is an invariant violation.`,e.ORPHAN_SYSTEM_ATTRIBUTE,{objectName:t,attributeName:n}),this.name=`OrphanSystemAttributeError`,this.objectName=t,this.attributeName=n}},DestructiveSyncNotAllowedError=class extends SchemaError{constructor(t){let n=t.map(e=>{let t=e;return t.name?`- ${e.type} "${t.name}"`:`- ${e.type}`}).join(`
2
+ const e={DRAFT_REVISION_CONFLICT:`DRAFT_REVISION_CONFLICT`,UNKNOWN:`SCHEMA_UNKNOWN_ERROR`,OBJECT_NOT_FOUND:`SCHEMA_OBJECT_NOT_FOUND`,ATTRIBUTE_NOT_FOUND:`SCHEMA_ATTRIBUTE_NOT_FOUND`,RECORD_NOT_FOUND:`SCHEMA_RECORD_NOT_FOUND`,SOURCE_NOT_FOUND:`SCHEMA_SOURCE_NOT_FOUND`,ROLE_NOT_FOUND:`SCHEMA_ROLE_NOT_FOUND`,MEMORY_NOT_FOUND:`SCHEMA_MEMORY_NOT_FOUND`,SCHEMA_PLAN_NOT_FOUND:`SCHEMA_PLAN_NOT_FOUND`,VALIDATION_FAILED:`SCHEMA_VALIDATION_FAILED`,INVALID_ATTRIBUTE_NAME:`SCHEMA_INVALID_ATTRIBUTE_NAME`,INVALID_OBJECT_NAME:`SCHEMA_INVALID_OBJECT_NAME`,RESERVED_OBJECT_NAME:`SCHEMA_RESERVED_OBJECT_NAME`,PROTECTED_OBJECT:`SCHEMA_PROTECTED_OBJECT`,PROTECTED_ATTRIBUTE:`SCHEMA_PROTECTED_ATTRIBUTE`,PROTECTED_VIEW:`SCHEMA_PROTECTED_VIEW`,PROTECTED_ROLE:`SCHEMA_PROTECTED_ROLE`,FORBIDDEN:`SCHEMA_FORBIDDEN`,ACCESS_DENIED:`SCHEMA_ACCESS_DENIED`,WORKSPACE_INVARIANT:`SCHEMA_WORKSPACE_INVARIANT`,STATE_GATE:`SCHEMA_STATE_GATE`,ACTOR_CONTEXT_REQUIRED:`SCHEMA_ACTOR_CONTEXT_REQUIRED`,CONNECTOR_AUTH_FAILED:`SCHEMA_CONNECTOR_AUTH_FAILED`,CONNECTOR_INVALID_STATE:`SCHEMA_CONNECTOR_INVALID_STATE`,CONNECTOR_GRANT_ORPHANED:`SCHEMA_CONNECTOR_GRANT_ORPHANED`,SYNC_FAILED:`SCHEMA_SYNC_FAILED`,SYNC_CONFLICT:`SCHEMA_SYNC_CONFLICT`,SYNC_CASCADE:`SCHEMA_SYNC_CASCADE`,ORPHAN_SYSTEM_ATTRIBUTE:`SCHEMA_ORPHAN_SYSTEM_ATTRIBUTE`,SYSTEM_ENTITY_IMMUTABLE:`SCHEMA_SYSTEM_ENTITY_IMMUTABLE`,DESTRUCTIVE_NOT_ALLOWED:`SCHEMA_DESTRUCTIVE_NOT_ALLOWED`,MIGRATION_TIMEOUT:`SCHEMA_MIGRATION_TIMEOUT`,CHANGE_TYPE_NOT_SUPPORTED:`SCHEMA_CHANGE_TYPE_NOT_SUPPORTED`,DUPLICATE:`SCHEMA_DUPLICATE`,DUPLICATE_OBJECT:`SCHEMA_DUPLICATE_OBJECT`,DUPLICATE_ATTRIBUTE:`SCHEMA_DUPLICATE_ATTRIBUTE`,CONFLICT:`SCHEMA_CONFLICT`,STORAGE_UPLOAD_FAILED:`SCHEMA_STORAGE_UPLOAD_FAILED`,STORAGE_DOWNLOAD_FAILED:`SCHEMA_STORAGE_DOWNLOAD_FAILED`,STORAGE_DELETE_FAILED:`SCHEMA_STORAGE_DELETE_FAILED`,STORAGE_URL_FAILED:`SCHEMA_STORAGE_URL_FAILED`,REPOSITORY_CREATE_FAILED:`SCHEMA_REPOSITORY_CREATE_FAILED`,REPOSITORY_UPDATE_FAILED:`SCHEMA_REPOSITORY_UPDATE_FAILED`,REPOSITORY_DELETE_FAILED:`SCHEMA_REPOSITORY_DELETE_FAILED`,REPOSITORY_QUERY_FAILED:`SCHEMA_REPOSITORY_QUERY_FAILED`,NOT_IMPLEMENTED:`SCHEMA_NOT_IMPLEMENTED`,TIMEOUT:`SCHEMA_TIMEOUT`,RECORD_REFERENCED:`SCHEMA_RECORD_REFERENCED`,ATTRIBUTE_IN_USE:`SCHEMA_ATTRIBUTE_IN_USE`,OBJECT_REFERENCED:`SCHEMA_OBJECT_REFERENCED`,CONFIGURATION_REQUIRED:`CONFIGURATION_REQUIRED`,SEARCH_ADAPTER_REQUIRED:`SEARCH_ADAPTER_REQUIRED`,CRON_REGISTRATION_FAILED:`CRON_REGISTRATION_FAILED`,JOB_WORKER_SHUTDOWN_FAILED:`JOB_WORKER_SHUTDOWN_FAILED`,SEARCH_BACKEND_FAILED:`SEARCH_BACKEND_FAILED`,INVARIANT_VIOLATION:`INVARIANT_VIOLATION`,TENANT_CONTEXT_MISSING:`TENANT_CONTEXT_MISSING`,FEATURE_FLAGS_CONTEXT:`FEATURE_FLAGS_CONTEXT`,REALTIME_RATE_LIMITED:`REALTIME_RATE_LIMITED`,REALTIME_DELIVERY_FAILED:`REALTIME_DELIVERY_FAILED`,REALTIME_SUBSCRIPTION_FAILED:`REALTIME_SUBSCRIPTION_FAILED`,AGENT_UNKNOWN:`AGENT_UNKNOWN`,AGENT_DEPTH_EXCEEDED:`AGENT_DEPTH_EXCEEDED`,AGENT_COST_LIMIT_EXCEEDED:`AGENT_COST_LIMIT_EXCEEDED`,AGENT_TREE_COST_LIMIT_EXCEEDED:`AGENT_TREE_COST_LIMIT_EXCEEDED`,CREDITS_EXHAUSTED:`CREDITS_EXHAUSTED`,QUOTA_EXCEEDED:`QUOTA_EXCEEDED`,AGENT_SESSION_NOT_FOUND:`AGENT_SESSION_NOT_FOUND`,AGENT_DEFINITION_NOT_FOUND:`AGENT_DEFINITION_NOT_FOUND`,AGENT_RUN_CONFIG:`AGENT_RUN_CONFIG`,AGENT_STREAMING:`AGENT_STREAMING`,AGENT_MISSING_ACTOR:`AGENT_MISSING_ACTOR`,AGENT_INVALID_STATE:`AGENT_INVALID_STATE`,AGENT_COMPACTION_IMPOSSIBLE:`AGENT_COMPACTION_IMPOSSIBLE`,AGENT_COMPACTION_TIMEOUT:`AGENT_COMPACTION_TIMEOUT`,AGENT_LEASE_HELD:`AGENT_LEASE_HELD`,AGENT_LEASE_UNAVAILABLE:`AGENT_LEASE_UNAVAILABLE`,AGENT_WORK_MODE_REQUIRED:`AGENT_WORK_MODE_REQUIRED`,AGENT_MESSAGE_NOT_FOUND:`AGENT_MESSAGE_NOT_FOUND`,AGENT_MESSAGE_NOT_EDITABLE:`AGENT_MESSAGE_NOT_EDITABLE`,INVALID_TOOL_INPUT:`INVALID_TOOL_INPUT`,DEVICE_NOT_FOUND:`DEVICE_NOT_FOUND`,DEVICE_OFFLINE:`DEVICE_OFFLINE`,AI_UNKNOWN:`AI_UNKNOWN`,AI_USAGE_LIMIT_EXCEEDED:`AI_USAGE_LIMIT_EXCEEDED`,AI_INVALID_USAGE:`AI_INVALID_USAGE`,AI_INVALID_MODEL:`AI_INVALID_MODEL`,AI_INVALID_MODEL_INPUT:`AI_INVALID_MODEL_INPUT`,AI_REPOSITORY_ERROR:`AI_REPOSITORY_ERROR`,AI_GENERATION_FAILED:`AI_GENERATION_FAILED`,AI_IMAGE_USAGE_PENDING:`AI_IMAGE_USAGE_PENDING`,AI_IMAGE_GENERATION_INDETERMINATE:`AI_IMAGE_GENERATION_INDETERMINATE`,AI_IMAGE_PUBLICATION_FAILED:`AI_IMAGE_PUBLICATION_FAILED`,DOCUMENT_MIME_NOT_ACCEPTED:`DOCUMENT_MIME_NOT_ACCEPTED`,DOCUMENT_MULTIPLE_NOT_ALLOWED:`DOCUMENT_MULTIPLE_NOT_ALLOWED`,DOCUMENT_NOT_FOUND_FOR_OPERATION:`DOCUMENT_NOT_FOUND_FOR_OPERATION`,DOCUMENT_STORAGE_FAILED:`DOCUMENT_STORAGE_FAILED`,DOCUMENT_SIZE_EXCEEDED:`DOCUMENT_SIZE_EXCEEDED`,DOCUMENT_OCR_FAILED:`DOCUMENT_OCR_FAILED`,DOCUMENT_BLOB_EMPTY:`DOCUMENT_BLOB_EMPTY`,DOCUMENT_FILE_TOO_LARGE:`DOCUMENT_FILE_TOO_LARGE`,DOCUMENT_FILE_NOT_FOUND:`DOCUMENT_FILE_NOT_FOUND`,DOCUMENT_FILE_ALREADY_PACKED:`DOCUMENT_FILE_ALREADY_PACKED`,DOCUMENT_RECORD_NOT_FOUND:`DOCUMENT_RECORD_NOT_FOUND`,DOCUMENT_RECORD_OBJECT_MISMATCH:`DOCUMENT_RECORD_OBJECT_MISMATCH`,DOCUMENT_FOLDER_SERVICE_UNAVAILABLE:`DOCUMENT_FOLDER_SERVICE_UNAVAILABLE`,DOCUMENT_FOLDER_PATH_NOT_FOUND:`DOCUMENT_FOLDER_PATH_NOT_FOUND`,EMAIL_PROVIDER_API_FAILED:`EMAIL_PROVIDER_API_FAILED`,EMAIL_SEND_FAILED:`EMAIL_SEND_FAILED`,EMAIL_SENT_NOT_STORED:`EMAIL_SENT_NOT_STORED`,EMAIL_BATCH_ITEM_FAILED:`EMAIL_BATCH_ITEM_FAILED`,CALENDAR_PROVIDER_API_FAILED:`CALENDAR_PROVIDER_API_FAILED`,REFLEX_INVALID_TRANSITION:`REFLEX_INVALID_TRANSITION`,REFLEX_INVALID_TOKEN:`REFLEX_INVALID_TOKEN`,REFLEX_CAPABILITY_DENIED:`REFLEX_CAPABILITY_DENIED`,REFLEX_GATEWAY_UNAVAILABLE:`REFLEX_GATEWAY_UNAVAILABLE`,REFLEX_BUNDLE_FAILED:`REFLEX_BUNDLE_FAILED`,REFLEX_EGRESS_DENIED:`REFLEX_EGRESS_DENIED`,REFLEX_PROTOCOL_VIOLATION:`REFLEX_PROTOCOL_VIOLATION`,REFLEX_RUN_FAILED:`REFLEX_RUN_FAILED`,REFLEX_RUN_TIMEOUT:`REFLEX_RUN_TIMEOUT`,REFLEX_DEPENDENCY_DRIFT:`REFLEX_DEPENDENCY_DRIFT`,REFLEX_NOT_READY:`REFLEX_NOT_READY`,REFLEX_INVARIANT_VIOLATION:`REFLEX_INVARIANT_VIOLATION`,EMBEDDING_MODEL_UNAVAILABLE:`EMBEDDING_MODEL_UNAVAILABLE`,EMBEDDING_DIMENSION_MISMATCH:`EMBEDDING_DIMENSION_MISMATCH`};var SchemaError=class extends Error{constructor(t,n=e.UNKNOWN,r){super(t),this.name=`SchemaError`,this.code=n,this.details=r,Object.setPrototypeOf(this,new.target.prototype)}toJSON(){return{name:this.name,code:this.code,message:this.message,details:this.details}}},NotFoundError=class extends SchemaError{constructor(t,n,r=e.RECORD_NOT_FOUND,i=`${t} with id "${n}" not found`){super(i,r,{resourceType:t,resourceId:n}),this._tag=`NotFoundError`,this.name=`NotFoundError`,this.resourceType=t,this.resourceId=n}},ObjectNotFoundError=class extends NotFoundError{constructor(t){super(`Object`,t,e.OBJECT_NOT_FOUND),this.name=`ObjectNotFoundError`}},AttributeNotFoundError=class extends NotFoundError{constructor(t){super(`Attribute`,t,e.ATTRIBUTE_NOT_FOUND),this.name=`AttributeNotFoundError`}},RecordNotFoundError=class extends NotFoundError{constructor(t){super(`Record`,t,e.RECORD_NOT_FOUND),this.name=`RecordNotFoundError`}},SchemaPlanNotFoundError=class extends NotFoundError{constructor(t){super(`Schema plan`,t,e.SCHEMA_PLAN_NOT_FOUND),this.name=`SchemaPlanNotFoundError`}},t=class ValidationError extends SchemaError{constructor(t,n){super(t,e.VALIDATION_FAILED,{errors:n}),this._tag=`ValidationError`,this.name=`ValidationError`,this.errors=n}static fromZodErrors(e){let t=e.map(e=>({path:e.path.map(String),message:e.message})),n=`Validation failed: ${t.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`, `)}`;return new ValidationError(n,t)}},ProtectedResourceError=class extends SchemaError{constructor(t,n,r){let i=t===`object`?e.PROTECTED_OBJECT:t===`view`?e.PROTECTED_VIEW:e.PROTECTED_ATTRIBUTE;super(`Cannot ${r} system ${t} "${n}"`,i,{resourceType:t,resourceName:n,operation:r}),this.name=`ProtectedResourceError`,this.resourceType=t,this.resourceName=n,this.operation=r}},SyncError=class extends SchemaError{constructor(t,n,r){super(`Failed to sync object "${t}": ${n}`,e.SYNC_FAILED,{objectName:t,cause:r?.message}),this.name=`SyncError`,this.objectName=t,this.cause=r}},SystemEntityImmutableError=class extends SchemaError{constructor(t,n){super(`Cannot mutate system ${t} "${n}". System entities are declared in code and immutable at runtime.`,e.SYSTEM_ENTITY_IMMUTABLE,{entityType:t,entityName:n}),this.name=`SystemEntityImmutableError`,this.entityType=t,this.entityName=n}},SyncConflictError=class extends SchemaError{constructor(t){let n=t.attributeName?`"${t.objectName}.${t.attributeName}"`:`"${t.objectName}"`;super(`Cannot promote runtime entity ${n}: ${t.reason}. Resolve via: (1) relax the code constraint, (2) migrate runtime values manually, or (3) rename the code declaration.`,e.SYNC_CONFLICT,{objectName:t.objectName,attributeName:t.attributeName,reason:t.reason}),this.name=`SyncConflictError`,this.objectName=t.objectName,this.attributeName=t.attributeName,this.reason=t.reason}},SyncCascadeError=class extends SchemaError{constructor(t,n){super(`Cannot demote object "${t}": attributes ${n.join(`, `)} are still declared in code. Remove them from code first, or restore the object.`,e.SYNC_CASCADE,{objectName:t,conflictingAttributes:n}),this.name=`SyncCascadeError`,this.objectName=t,this.conflictingAttributes=n}},OrphanSystemAttributeError=class extends SchemaError{constructor(t,n){super(`Attribute "${t}.${n}" is system:true but its object parent is system:false. This is an invariant violation.`,e.ORPHAN_SYSTEM_ATTRIBUTE,{objectName:t,attributeName:n}),this.name=`OrphanSystemAttributeError`,this.objectName=t,this.attributeName=n}},DestructiveSyncNotAllowedError=class extends SchemaError{constructor(t){let n=t.map(e=>{let t=e;return t.name?`- ${e.type} "${t.name}"`:`- ${e.type}`}).join(`
3
3
  `);super(`Destructive schema operations detected (data will be lost):\n${n}\n\nThese are applied only under an explicit opt-in; without it boot demotes the object to runtime and keeps its rows. To let Standards apply them automatically, set the environment variable:\n STANDARDS_ALLOW_DESTRUCTIVE_SYNC=1\n\nOtherwise, revert your code changes or back up the data first.`,e.DESTRUCTIVE_NOT_ALLOWED,{operations:t}),this.name=`DestructiveSyncNotAllowedError`,this.operations=t}},MigrationTimeoutError=class extends SchemaError{constructor(t,n,r,i){super(`Migration for "${t}" exceeded the maximum duration (${i}ms). Migrated ${n}/${r} records before timeout. Increase STANDARDS_MIGRATION_MAX_DURATION_MS or split the migration into smaller batches.`,e.MIGRATION_TIMEOUT,{objectName:t,migrated:n,total:r,maxDurationMs:i}),this.name=`MigrationTimeoutError`,this.objectName=t,this.migrated=n,this.total=r,this.maxDurationMs=i}},ChangeTypeNotSupportedError=class extends SchemaError{constructor(t,n){super(`Cannot change type of attribute "${t}.${n}" via runtime API. Declare a migration in your schema code:\n object("${t}").migration(N, (m) =>\n m.changeType("${n}", from, to, { transform: (v) => ... })\n )`,e.CHANGE_TYPE_NOT_SUPPORTED,{objectName:t,attributeName:n}),this.name=`ChangeTypeNotSupportedError`,this.objectName=t,this.attributeName=n}},DuplicateError=class extends SchemaError{constructor(t,n,r){let i=t===`object`?e.DUPLICATE_OBJECT:t===`attribute`?e.DUPLICATE_ATTRIBUTE:e.DUPLICATE,a=`${t.charAt(0).toUpperCase()}${t.slice(1)} "${n}" already exists`;super(r??a,i,{resourceType:t,resourceName:n}),this.name=`DuplicateError`,this.resourceType=t,this.resourceName=n}};const n={builder:`cannot be built by a consumer`,registry:`cannot be registered by a consumer`,bundle:`cannot be claimed by a bundle`,source:`cannot be declared by a schema source`};var ReservedObjectNameError=class extends SchemaError{constructor(t,r){super(`"${t}" is a framework-native object name and ${n[r]}: the framework ships it, pick another name.`,e.RESERVED_OBJECT_NAME,{objectName:t,context:r}),this.name=`ReservedObjectNameError`,this.objectName=t}};function isSchemaError(e){return e instanceof SchemaError}function isNotFoundError(e){return e instanceof NotFoundError}function isValidationError(e){return e instanceof t}function isProtectedResourceError(e){return e instanceof ProtectedResourceError}var ForbiddenError=class extends SchemaError{constructor(t,n,r){super(`No ${n} permission on object "${t}"`,e.FORBIDDEN,{objectName:t,action:n,userId:r}),this._tag=`ForbiddenError`,this.name=`ForbiddenError`,this.objectName=t,this.action=n,this.userId=r}},ProtectedRoleError=class extends SchemaError{constructor(t,n){super(`Cannot ${n} system role "${t}"`,e.PROTECTED_ROLE,{roleName:t,operation:n}),this.name=`ProtectedRoleError`,this.roleName=t,this.operation=n}},RoleNotFoundError=class extends NotFoundError{constructor(t){super(`Role`,t,e.ROLE_NOT_FOUND),this.name=`RoleNotFoundError`}},ConcurrentModificationError=class extends SchemaError{constructor(t){super(`Record ${t} was modified by another request. Please refresh and try again.`,e.CONFLICT,{recordId:t})}},StorageError=class extends SchemaError{constructor(t,n,r,i){let a=t===`upload`?e.STORAGE_UPLOAD_FAILED:t===`download`?e.STORAGE_DOWNLOAD_FAILED:t===`delete`?e.STORAGE_DELETE_FAILED:e.STORAGE_URL_FAILED;super(`Storage ${t} failed: ${n}`,a,{operation:t,path:r,cause:i}),this.name=`StorageError`,this.operation=t,this.path=r,this.cause=i}},AccessDeniedError=class extends SchemaError{constructor(t,n){super(n??`Access denied to resource: ${t}`,e.ACCESS_DENIED,{resource:t,reason:n}),this.name=`AccessDeniedError`,this.resource=t,this.reason=n}},RepositoryError=class extends SchemaError{constructor(t,n,r,i){let a=t===`create`?e.REPOSITORY_CREATE_FAILED:t===`update`?e.REPOSITORY_UPDATE_FAILED:t===`delete`?e.REPOSITORY_DELETE_FAILED:e.REPOSITORY_QUERY_FAILED;super(`Failed to ${t} ${n}: ${r}${i?` (${i})`:``}`,a,{operation:t,entity:n,cause:i}),this.name=`RepositoryError`,this.operation=t,this.entity=n,this.cause=i}},SearchBackendError=class extends SchemaError{constructor(t,n){super(`Search backend unavailable for ${t}`,e.SEARCH_BACKEND_FAILED,{scope:t,cause:n}),this.name=`SearchBackendError`,this.scope=t,this.cause=n}},NotImplementedError=class extends SchemaError{constructor(t,n){let r=n?`${t}: not implemented (${n})`:`${t}: not implemented`;super(r,e.NOT_IMPLEMENTED,{feature:t,milestone:n}),this.name=`NotImplementedError`,this.feature=t,this.milestone=n}},MemoryNotFoundError=class extends NotFoundError{constructor(t){super(`Memory`,t,e.MEMORY_NOT_FOUND),this.name=`MemoryNotFoundError`}},RecordReferencedError=class extends SchemaError{constructor(t,n){let r=n.reduce((e,t)=>e+t.count,0);super(`Cannot delete record: referenced by ${r} record${r>1?`s`:``}`,e.RECORD_REFERENCED,{recordId:t,references:n}),this.name=`RecordReferencedError`,this.recordId=t,this.references=n}},AttributeInUseError=class extends SchemaError{constructor(t,n){super(`Cannot delete attribute "${t}": used in ${n}`,e.ATTRIBUTE_IN_USE,{attributeName:t,usage:n}),this.name=`AttributeInUseError`,this.attributeName=t,this.usage=n}},ObjectReferencedError=class extends SchemaError{constructor(t,n){super(`Cannot delete object "${t}": target of relations in ${n.join(`, `)}`,e.OBJECT_REFERENCED,{objectName:t,referencingObjects:n}),this.name=`ObjectReferencedError`,this.objectName=t,this.referencingObjects=n}};function isRecordReferencedError(e){return e instanceof RecordReferencedError}function isAttributeInUseError(e){return e instanceof AttributeInUseError}function isObjectReferencedError(e){return e instanceof ObjectReferencedError}export{AccessDeniedError,AttributeInUseError,AttributeNotFoundError,ChangeTypeNotSupportedError,ConcurrentModificationError,DestructiveSyncNotAllowedError,DuplicateError,ForbiddenError,MemoryNotFoundError,MigrationTimeoutError,NotFoundError,NotImplementedError,ObjectNotFoundError,ObjectReferencedError,OrphanSystemAttributeError,ProtectedResourceError,ProtectedRoleError,RecordNotFoundError,RecordReferencedError,RepositoryError,ReservedObjectNameError,RoleNotFoundError,SchemaError,e as SchemaErrorCode,SchemaPlanNotFoundError,SearchBackendError,StorageError,SyncCascadeError,SyncConflictError,SyncError,SystemEntityImmutableError,t as ValidationError,isAttributeInUseError,isNotFoundError,isObjectReferencedError,isProtectedResourceError,isRecordReferencedError,isSchemaError,isValidationError};
@@ -1,5 +1,5 @@
1
1
 
2
- import { Y as Attribute, Z as AttributeType } from "./exceptions-DZrk5n7t.mjs";
2
+ import { Y as Attribute, Z as AttributeType } from "./exceptions-CHlIXRKP.mjs";
3
3
  import { IconName } from "@stndrds/constants";
4
4
  import { z as z$1 } from "zod";
5
5
  //#region src/types/mutations.d.ts
@@ -1,5 +1,5 @@
1
1
 
2
- import { Y as Attribute } from "./exceptions-DZrk5n7t.js";
2
+ import { Y as Attribute } from "./exceptions-CHlIXRKP.js";
3
3
  import { z as z$1 } from "zod";
4
4
  //#region src/validation/core/types.d.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
1
 
2
- import { Y as Attribute } from "./exceptions-DZrk5n7t.mjs";
2
+ import { Y as Attribute } from "./exceptions-CHlIXRKP.mjs";
3
3
  import { z as z$1 } from "zod";
4
4
  //#region src/validation/core/types.d.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
1
 
2
- import { Y as Attribute, Z as AttributeType } from "./exceptions-DZrk5n7t.js";
2
+ import { Y as Attribute, Z as AttributeType } from "./exceptions-CHlIXRKP.js";
3
3
  import { z as z$1 } from "zod";
4
4
  import { IconName } from "@stndrds/constants";
5
5
  //#region src/types/mutations.d.ts
@@ -1,6 +1,6 @@
1
1
 
2
- import { Jt as Uuid, K as MigrationDefinition, Y as Attribute } from "./exceptions-DZrk5n7t.js";
3
- import { i as ValidationResult, r as ValidationMessages } from "./index-DMtutoRi.js";
2
+ import { Jt as Uuid, K as MigrationDefinition, Y as Attribute } from "./exceptions-CHlIXRKP.js";
3
+ import { i as ValidationResult, r as ValidationMessages } from "./index-BAW8p4U_.js";
4
4
  import { z as z$1 } from "zod";
5
5
  import { IconName } from "@stndrds/constants";
6
6
  //#region src/types/document-layout.d.ts
@@ -1,6 +1,6 @@
1
1
 
2
- import { Jt as Uuid, K as MigrationDefinition, Y as Attribute } from "./exceptions-DZrk5n7t.mjs";
3
- import { i as ValidationResult, r as ValidationMessages } from "./index-BGv_lB_c.mjs";
2
+ import { Jt as Uuid, K as MigrationDefinition, Y as Attribute } from "./exceptions-CHlIXRKP.mjs";
3
+ import { i as ValidationResult, r as ValidationMessages } from "./index-BilM1Dnp.mjs";
4
4
  import { IconName } from "@stndrds/constants";
5
5
  import { z as z$1 } from "zod";
6
6
  //#region src/types/document-layout.d.ts
package/dist/index.d.mts CHANGED
@@ -1,13 +1,13 @@
1
1
 
2
- import { $ as BilateralConfig, $t as indexBy, A as StorageError, An as ComputedDependency, At as StatusGroup, B as isObjectReferencedError, Bn as ComputedFormulaLiteralNode, Bt as OptionPropertyAttribute, C as RepositoryOperation, Cn as assertAcyclicComputedDependencies, Ct as RichTextAttribute, D as SchemaErrorCode, Dn as ComputedFunctionName, Dt as SelectAttribute, E as SchemaError, En as COMPUTED_FUNCTION_NAMES, Et as RollupFunction, F as SystemEntityImmutableError, Fn as ComputedValueType, Ft as inferInverseCardinality, G as BuiltInTransform, Gt as resolvePropertyDefinitions, H as isRecordReferencedError, Hn as ComputedFormulaPathNode, Ht as PropertySchema, I as ValidationError, In as ComputedFormulaAstNode, It as isAttributeSortable, J as ATTRIBUTE_TYPES, Jt as Uuid, K as MigrationDefinition, Kt as TenantId, L as ValidationErrorDetail, Ln as ComputedFormulaBinaryNode, Lt as isBilateralRelation, M as SyncCascadeError, Mn as ComputedOptionsSource, Mt as TimeFormat, N as SyncConflictError, Nn as ComputedPlan, Nt as UserAttribute, O as SchemaPlanNotFoundError, On as ComputedFunctionSignature, Ot as SingleRelationAttribute, P as SyncError, Pn as ComputedReturnType, Pt as UserReferenceType, Q as BaseAttribute, Qt as generateId, R as isAttributeInUseError, Rn as ComputedFormulaBinaryOperator, Rt as isUniversalRelation, S as RepositoryError, Sn as ComputedFormulaCompileError, St as RelationTarget, T as RoleNotFoundError, Tn as COMPUTED_FUNCTIONS, Tt as RollupAttribute, U as isSchemaError, Un as parseComputedFormula, Ut as PropertyType, V as isProtectedResourceError, Vn as ComputedFormulaParseError, Vt as PropertyAttribute, W as isValidationError, Wt as hasOptions, X as AttributeGroup, Xt as asUserId, Y as Attribute, Yt as asTenantId, Z as AttributeType, Zt as deepEqual, _ as ProtectedResourceError, _n as CompileComputedFormulaInput, _t as Option, a as ChangeTypeNotSupportedError, an as COMPUTED_FUNCTION_METADATA, at as DateRangeValue, b as RecordReference, bn as ComputedCompileSchema, bt as RELATION_TARGET_ANY, c as DuplicateError, cn as ComputedFormulaResult, ct as FormulaAttribute, d as MigrationTimeoutError, dn as evaluateComputedFormulaWithResult, dt as LocationAttribute, en as NonJsonValueError, et as CheckboxAttribute, f as NotFoundError, fn as formatComputedResult, ft as LocationGranularity, g as OrphanSystemAttributeError, gn as rollupToFormulaExpression, gt as NumberUnit, h as ObjectReferencedError, hn as inferRollupReturnType, ht as NumberAttribute, i as AttributeUsage, in as serializeStableJson, it as DateFormat, j as StorageOperation, jn as ComputedFieldKind, jt as TextAttribute, k as SearchBackendError, kn as isComputedFunctionName, kt as StatusAttribute, l as ForbiddenError, ln as evaluateComputedAst, lt as FormulaReturnType, m as ObjectNotFoundError, mn as compileRollupAttribute, mt as MultiselectAttribute, n as AttributeInUseError, nn as sameStableValue, nt as CurrencyAttribute, o as ConcurrentModificationError, on as ComputedFunctionCategory, ot as DateValue, p as NotImplementedError, pn as isPlainRecord, pt as MultiRelationAttribute, q as SchemaOperation, qt as UserId, r as AttributeNotFoundError, rn as serializeCanonicalJson, rt as DateAttribute, s as DestructiveSyncNotAllowedError, sn as ComputedFunctionMetadata, st as DocumentAttribute, t as AccessDeniedError, tn as canonicalStringify, tt as Currency, u as MemoryNotFoundError, un as evaluateComputedFormula, ut as Location, v as ProtectedRoleError, vn as ComputedCompileAttribute, vt as Phone, w as ReservedObjectNameError, wn as compileComputedFormula, wt as RichtextAttribute, x as RecordReferencedError, xn as ComputedDependencyGraphNode, xt as RelationAttribute, y as RecordNotFoundError, yn as ComputedCompileObject, yt as PhoneAttribute, z as isNotFoundError, zn as ComputedFormulaCallNode, zt as relationTargetsOf } from "./exceptions-DZrk5n7t.mjs";
3
- import { $ as QueryState, A as FormContentDefinition, B as DayMonthValue, C as ContentOpenMode, D as CustomContentDefinition, E as ContentViewDefinition, F as MeetingsContentDefinition, G as FilterOperator, H as EdgeQuantifier, I as RichtextContentDefinition, J as FilterValue, K as FilterRule, L as ViewContentDefinition, M as FormsContentDefinition, N as KanbanCollectionContentDefinition, O as DocumentsContentDefinition, P as ListViewLayout, Q as PhoneFilterValue, R as ViewRead, S as ContentFieldGroup, T as ContentViewContext, U as ExtendedFilterRule, V as DynamicValue, W as FilterCombinator, X as NoValueOperator, Y as NO_VALUE_OPERATORS, Z as OPERATORS_BY_TYPE, _ as CollectionContentDefinition, a as contentViewDefinitionSchemaFor, at as isNoValueOperator, b as ContentCreateMode, c as draftContentViewDefinitionSchemaFor, d as sortsSchema, et as RelativeDateValue, f as colorIdSchema, g as CollectionAction, h as ActivityContentDefinition, i as contentViewDefinitionSchema, it as getRollupFilterOperators, j as FormDensity, k as EmailsContentDefinition, l as filterStateSchema, m as SCHEMA_LIMITS, n as collectionContentSourceSchema, nt as SortRule, o as displayAttributesSchema, p as iconNameSchema, q as FilterState, r as columnsSchema, rt as filterOperatorsByTypeForGeneration, s as draftContentViewDefinitionSchema, t as AsideRule, tt as SortDirection, u as publishedViewContentDefinitionSchema, v as CollectionContentSource, w as ContentPlacement, x as ContentField, y as ColumnReference, z as CurrencyFilterValue } from "./all-4UvqwWvq.mjs";
4
- import { A as FolderPreset, C as ResourceVisibility, D as parseResourceVisibility, E as Timestamps, M as PresetNode, O as DocumentLayout, S as ReservedObjectName, T as SystemFieldName, _ as ObjectRecord, a as validateDraft, b as RESOURCE_VISIBILITIES, c as validateObjectOrThrow, f as createFormAttributeValidator, g as ObjectDefinition, h as ObjectAttribute, j as MAX_PRESET_DEPTH, k as DocumentLayoutVariant, m as ListViewTabVisibility, o as validateDraftOrThrow, p as LIST_VIEW_TAB_VISIBILITIES, r as rejectUnknownAttributesOrThrow, s as validateObject, v as RESERVED_ATTRIBUTE_NAMES, w as SYSTEM_FIELD_NAMES, x as ReservedAttributeName, y as RESERVED_OBJECT_NAMES } from "./index-CRhCzlVm.mjs";
5
- import { S as UpdateObjectInput, _ as statusOptionWriteSchema, b as RelationOption, c as parseAttributeConfigForCreate, d as propertyAttributeWireSchema, f as propertySchemaSchema, g as statusGroupSchema, h as selectOptionWriteSchema, l as parseAttributeConfigForUpdate, m as refuseForeignKeys, n as WIRE_OMITTED_CONFIG_KEYS, o as multiselectOptionWriteSchema, p as propertySchemaWireSchema, r as attributeConfigSchemas, s as parseAttributeConfig, t as SIMPLE_PROPERTY_TYPES, u as propertyAttributeSchema, v as AddAttributeInput, x as RelationOptionsResponse, y as CreateCustomObjectInput } from "./index-D6o37TYA.mjs";
6
- import { n as DEFAULT_VALIDATION_MESSAGES, r as ValidationMessages, t as formatZodErrors } from "./index-BGv_lB_c.mjs";
7
- import { t as createTextValidator } from "./text-DzIbQJJh.mjs";
8
- import { t as createNumberValidator } from "./number-PuhjSGfn.mjs";
9
- import { t as createCheckboxValidator } from "./checkbox-Bz3UR7v-.mjs";
10
- import { t as createDateValidator } from "./date-Do-4n4Ou.mjs";
2
+ import { $ as BilateralConfig, $t as indexBy, A as StorageError, An as ComputedDependency, At as StatusGroup, B as isObjectReferencedError, Bn as ComputedFormulaLiteralNode, Bt as OptionPropertyAttribute, C as RepositoryOperation, Cn as assertAcyclicComputedDependencies, Ct as RichTextAttribute, D as SchemaErrorCode, Dn as ComputedFunctionName, Dt as SelectAttribute, E as SchemaError, En as COMPUTED_FUNCTION_NAMES, Et as RollupFunction, F as SystemEntityImmutableError, Fn as ComputedValueType, Ft as inferInverseCardinality, G as BuiltInTransform, Gt as resolvePropertyDefinitions, H as isRecordReferencedError, Hn as ComputedFormulaPathNode, Ht as PropertySchema, I as ValidationError, In as ComputedFormulaAstNode, It as isAttributeSortable, J as ATTRIBUTE_TYPES, Jt as Uuid, K as MigrationDefinition, Kt as TenantId, L as ValidationErrorDetail, Ln as ComputedFormulaBinaryNode, Lt as isBilateralRelation, M as SyncCascadeError, Mn as ComputedOptionsSource, Mt as TimeFormat, N as SyncConflictError, Nn as ComputedPlan, Nt as UserAttribute, O as SchemaPlanNotFoundError, On as ComputedFunctionSignature, Ot as SingleRelationAttribute, P as SyncError, Pn as ComputedReturnType, Pt as UserReferenceType, Q as BaseAttribute, Qt as generateId, R as isAttributeInUseError, Rn as ComputedFormulaBinaryOperator, Rt as isUniversalRelation, S as RepositoryError, Sn as ComputedFormulaCompileError, St as RelationTarget, T as RoleNotFoundError, Tn as COMPUTED_FUNCTIONS, Tt as RollupAttribute, U as isSchemaError, Un as parseComputedFormula, Ut as PropertyType, V as isProtectedResourceError, Vn as ComputedFormulaParseError, Vt as PropertyAttribute, W as isValidationError, Wt as hasOptions, X as AttributeGroup, Xt as asUserId, Y as Attribute, Yt as asTenantId, Z as AttributeType, Zt as deepEqual, _ as ProtectedResourceError, _n as CompileComputedFormulaInput, _t as Option, a as ChangeTypeNotSupportedError, an as COMPUTED_FUNCTION_METADATA, at as DateRangeValue, b as RecordReference, bn as ComputedCompileSchema, bt as RELATION_TARGET_ANY, c as DuplicateError, cn as ComputedFormulaResult, ct as FormulaAttribute, d as MigrationTimeoutError, dn as evaluateComputedFormulaWithResult, dt as LocationAttribute, en as NonJsonValueError, et as CheckboxAttribute, f as NotFoundError, fn as formatComputedResult, ft as LocationGranularity, g as OrphanSystemAttributeError, gn as rollupToFormulaExpression, gt as NumberUnit, h as ObjectReferencedError, hn as inferRollupReturnType, ht as NumberAttribute, i as AttributeUsage, in as serializeStableJson, it as DateFormat, j as StorageOperation, jn as ComputedFieldKind, jt as TextAttribute, k as SearchBackendError, kn as isComputedFunctionName, kt as StatusAttribute, l as ForbiddenError, ln as evaluateComputedAst, lt as FormulaReturnType, m as ObjectNotFoundError, mn as compileRollupAttribute, mt as MultiselectAttribute, n as AttributeInUseError, nn as sameStableValue, nt as CurrencyAttribute, o as ConcurrentModificationError, on as ComputedFunctionCategory, ot as DateValue, p as NotImplementedError, pn as isPlainRecord, pt as MultiRelationAttribute, q as SchemaOperation, qt as UserId, r as AttributeNotFoundError, rn as serializeCanonicalJson, rt as DateAttribute, s as DestructiveSyncNotAllowedError, sn as ComputedFunctionMetadata, st as DocumentAttribute, t as AccessDeniedError, tn as canonicalStringify, tt as Currency, u as MemoryNotFoundError, un as evaluateComputedFormula, ut as Location, v as ProtectedRoleError, vn as ComputedCompileAttribute, vt as Phone, w as ReservedObjectNameError, wn as compileComputedFormula, wt as RichtextAttribute, x as RecordReferencedError, xn as ComputedDependencyGraphNode, xt as RelationAttribute, y as RecordNotFoundError, yn as ComputedCompileObject, yt as PhoneAttribute, z as isNotFoundError, zn as ComputedFormulaCallNode, zt as relationTargetsOf } from "./exceptions-CHlIXRKP.mjs";
3
+ import { $ as QueryState, A as FormContentDefinition, B as DayMonthValue, C as ContentOpenMode, D as CustomContentDefinition, E as ContentViewDefinition, F as MeetingsContentDefinition, G as FilterOperator, H as EdgeQuantifier, I as RichtextContentDefinition, J as FilterValue, K as FilterRule, L as ViewContentDefinition, M as FormsContentDefinition, N as KanbanCollectionContentDefinition, O as DocumentsContentDefinition, P as ListViewLayout, Q as PhoneFilterValue, R as ViewRead, S as ContentFieldGroup, T as ContentViewContext, U as ExtendedFilterRule, V as DynamicValue, W as FilterCombinator, X as NoValueOperator, Y as NO_VALUE_OPERATORS, Z as OPERATORS_BY_TYPE, _ as CollectionContentDefinition, a as contentViewDefinitionSchemaFor, at as isNoValueOperator, b as ContentCreateMode, c as draftContentViewDefinitionSchemaFor, d as sortsSchema, et as RelativeDateValue, f as colorIdSchema, g as CollectionAction, h as ActivityContentDefinition, i as contentViewDefinitionSchema, it as getRollupFilterOperators, j as FormDensity, k as EmailsContentDefinition, l as filterStateSchema, m as SCHEMA_LIMITS, n as collectionContentSourceSchema, nt as SortRule, o as displayAttributesSchema, p as iconNameSchema, q as FilterState, r as columnsSchema, rt as filterOperatorsByTypeForGeneration, s as draftContentViewDefinitionSchema, t as AsideRule, tt as SortDirection, u as publishedViewContentDefinitionSchema, v as CollectionContentSource, w as ContentPlacement, x as ContentField, y as ColumnReference, z as CurrencyFilterValue } from "./all-C1AF2SKY.mjs";
4
+ import { A as FolderPreset, C as ResourceVisibility, D as parseResourceVisibility, E as Timestamps, M as PresetNode, O as DocumentLayout, S as ReservedObjectName, T as SystemFieldName, _ as ObjectRecord, a as validateDraft, b as RESOURCE_VISIBILITIES, c as validateObjectOrThrow, f as createFormAttributeValidator, g as ObjectDefinition, h as ObjectAttribute, j as MAX_PRESET_DEPTH, k as DocumentLayoutVariant, m as ListViewTabVisibility, o as validateDraftOrThrow, p as LIST_VIEW_TAB_VISIBILITIES, r as rejectUnknownAttributesOrThrow, s as validateObject, v as RESERVED_ATTRIBUTE_NAMES, w as SYSTEM_FIELD_NAMES, x as ReservedAttributeName, y as RESERVED_OBJECT_NAMES } from "./index-DX1EILel.mjs";
5
+ import { S as UpdateObjectInput, _ as statusOptionWriteSchema, b as RelationOption, c as parseAttributeConfigForCreate, d as propertyAttributeWireSchema, f as propertySchemaSchema, g as statusGroupSchema, h as selectOptionWriteSchema, l as parseAttributeConfigForUpdate, m as refuseForeignKeys, n as WIRE_OMITTED_CONFIG_KEYS, o as multiselectOptionWriteSchema, p as propertySchemaWireSchema, r as attributeConfigSchemas, s as parseAttributeConfig, t as SIMPLE_PROPERTY_TYPES, u as propertyAttributeSchema, v as AddAttributeInput, x as RelationOptionsResponse, y as CreateCustomObjectInput } from "./index-B-LzvZZe.mjs";
6
+ import { n as DEFAULT_VALIDATION_MESSAGES, r as ValidationMessages, t as formatZodErrors } from "./index-BilM1Dnp.mjs";
7
+ import { t as createTextValidator } from "./text-_dBcTPGm.mjs";
8
+ import { t as createNumberValidator } from "./number-D6UXWPnL.mjs";
9
+ import { t as createCheckboxValidator } from "./checkbox-C1oY-AXS.mjs";
10
+ import { t as createDateValidator } from "./date-pUpneFTR.mjs";
11
11
  import { ColorId, CountryIso3, CurrencyCode, IconName, MimeType } from "@stndrds/constants";
12
12
  import z, { z as z$1 } from "zod";
13
13
  import { StandardSchemaV1, StandardSchemaV1 as StandardSchemaV1$1 } from "@standard-schema/spec";
@@ -1794,9 +1794,10 @@ export declare function isToolApprovalState(state: ToolPartState): boolean;
1794
1794
  /**
1795
1795
  * Structured cause for a tool part that ended in `state: "error"` without the
1796
1796
  * tool having run. Lets the UI render a localized explanation instead of the
1797
- * raw error string.
1797
+ * raw error string. `INVALID_TOOL_INPUT` is the registry's own code: the tool's
1798
+ * input schema refused the call, and `error` names the fields for the model.
1798
1799
  */
1799
- export type ToolPartErrorCode = "output_limit_reached" | "interrupted";
1800
+ export type ToolPartErrorCode = "output_limit_reached" | "interrupted" | typeof SchemaErrorCode.INVALID_TOOL_INPUT;
1800
1801
  /**
1801
1802
  * Damage measured from a tool's input WITHOUT executing it — what a
1802
1803
  * confirmation card states so the human decides on numbers rather than on a
@@ -7462,6 +7463,12 @@ interface CatalogueViolation {
7462
7463
  interface ContentViewCatalogueCollection extends ContentViewCatalogueResult {
7463
7464
  readonly violations: readonly CatalogueViolation[];
7464
7465
  }
7466
+ /** How many names an inventory spells out; the rest are counted. */
7467
+ export declare const INVENTORY_LIMIT = 30;
7468
+ /** The first `limit` items, and how many were left out when the list is cut. */
7469
+ export declare function capped(items: readonly string[], limit: number): string;
7470
+ /** What an object does have, said to whoever named an attribute it does not. */
7471
+ export declare function attributeInventory(objectName: string, names: readonly string[]): string;
7465
7472
  /**
7466
7473
  * Resolves names against a collected snapshot and reports every rule it breaks;
7467
7474
  * it performs no writes or adoption.
@@ -9937,7 +9944,7 @@ interface BaseOperation {
9937
9944
  /** This operation's own id, used to remove it from a draft. */
9938
9945
  id: string;
9939
9946
  type: string;
9940
- /** Why, in the person's words; ≤ 160 chars. Persisted with the operation. */
9947
+ /** The architect's own sentence — what it does and why; ≤ 160 chars. Persisted with the operation. */
9941
9948
  note?: string;
9942
9949
  }
9943
9950
  //#endregion
@@ -10629,6 +10636,32 @@ export declare const VIEW_OPERATIONS: OperationDef[];
10629
10636
  export declare const OPERATION_REGISTRY: ReadonlyMap<string, OperationDef<BaseOperation>>;
10630
10637
  export declare const ALL_OPERATION_TYPES: readonly string[];
10631
10638
  //#endregion
10639
+ //#region src/architect/operation-pace.d.ts
10640
+ type OperationPace = "major" | "normal" | "minor";
10641
+ type DwellMode = "replay" | "live";
10642
+ /**
10643
+ * How long each operation deserves the person's eye. `impact` is not reused:
10644
+ * it drives navigation, and ranks a rename as `structural` — a rename reads at
10645
+ * a glance, a new object does not.
10646
+ *
10647
+ * Operation types are plain strings on the wire, so the compiler cannot hold
10648
+ * this map exhaustive; the test does, against `ALL_OPERATION_TYPES`.
10649
+ */
10650
+ export declare const OPERATION_PACE: Readonly<Record<string, OperationPace>>;
10651
+ /**
10652
+ * A draft may hold a type this build does not know; the follow runs in the
10653
+ * browser, where a throw would kill the tour — it gets the middle pace instead.
10654
+ */
10655
+ export declare function operationPace(operationType: string): OperationPace;
10656
+ export declare const PACE_DWELL_MS: Readonly<Record<OperationPace, Readonly<Record<DwellMode, number>>>>;
10657
+ /**
10658
+ * The pace value, unless the note needs longer to be read — never past the cap.
10659
+ * Read during render and inside a reducer: a step that reaches it without a
10660
+ * pace dwells like a normal one, and without a note length like one with no
10661
+ * note — a throw would take the tree down, a NaN would fire the timer at once.
10662
+ */
10663
+ export declare function dwellForStep(pace: OperationPace, mode: DwellMode, noteLength: number): number;
10664
+ //#endregion
10632
10665
  //#region src/architect/object-projection.d.ts
10633
10666
  /**
10634
10667
  * The settings a draft carries for an object, beyond the identity (`id`,
@@ -10675,7 +10708,9 @@ export declare function toDraftableObject(object: ObjectDefinition): DraftableOb
10675
10708
  export declare function toDraftableAttributes(object: ObjectDefinition): DraftableAttribute[];
10676
10709
  /**
10677
10710
  * The inverse of {@link toDraftableAttribute}: the attribute publish will
10678
- * write, rebuilt from a drafted one with its config spread last. The overlay
10711
+ * write, rebuilt from a drafted one with its config spread first and the row's
10712
+ * own columns last — the same precedence `dbAttributeToAttribute` applies to a
10713
+ * published row. The overlay
10679
10714
  * and the append-time validator both read this, so a drafted select carries
10680
10715
  * its options and a drafted relation its target before the draft lands —
10681
10716
  * never more, never less than publish creates (#3028).
@@ -10814,6 +10849,53 @@ export declare function bilateralDeclarationOf(attribute: DraftableAttribute): B
10814
10849
  */
10815
10850
  export declare function assertBilateralPairs(published: DraftableState, folded: DraftableState): void;
10816
10851
  //#endregion
10852
+ //#region src/architect/draft-refusal.d.ts
10853
+ /**
10854
+ * What the fold knows about a refusal beyond its message — the facts a caller
10855
+ * needs to say what to send next, read where the state is still in hand.
10856
+ * The message stays the refusal; this is the way out.
10857
+ */
10858
+ type DraftRefusal =
10859
+ /** The addressed object, attribute, content or sample is not in the folded state. */
10860
+ {
10861
+ kind: "target-missing";
10862
+ } |
10863
+ /** The named view is absent; `viewNames` are the ones the object does have. */
10864
+ {
10865
+ kind: "view-missing";
10866
+ objectName: string;
10867
+ viewNames: string[];
10868
+ } |
10869
+ /** `remove_object` while relations of other objects still target it — every one of them. */
10870
+ {
10871
+ kind: "object-targeted";
10872
+ blockers: {
10873
+ ownerObjectName: string;
10874
+ attribute: string;
10875
+ }[];
10876
+ } |
10877
+ /** A sample's relation value names no record. */
10878
+ {
10879
+ kind: "sample-relation-value";
10880
+ } |
10881
+ /** A sample value keyed by a name the object does not carry. */
10882
+ {
10883
+ kind: "sample-unknown-attribute";
10884
+ objectName: string;
10885
+ attributeNames: string[];
10886
+ };
10887
+ /**
10888
+ * A `ValidationError` of the fold that also carries its typed `DraftRefusal`.
10889
+ *
10890
+ * `name` stays the parent's, like `_tag`: `toJSON()` emits it and the HTTP
10891
+ * filter copies it, so a name of its own would change the body of
10892
+ * `POST /schema/draft/operations` for a refusal that is still a validation one.
10893
+ */
10894
+ export declare class DraftRefusalError extends ValidationError {
10895
+ readonly refusal: DraftRefusal;
10896
+ constructor(message: string, refusal: DraftRefusal, errors?: ValidationErrorDetail[]);
10897
+ }
10898
+ //#endregion
10817
10899
  //#region src/architect/families.d.ts
10818
10900
  /** The three operation slices an architect draft tool call is scoped to. */
10819
10901
  type OperationFamily = "schema" | "view";
@@ -10979,8 +11061,6 @@ export declare function summarizeDraft(state: DraftableState, operationCount: nu
10979
11061
  */
10980
11062
  /** The tools that WRITE into the draft. A call to one of them means it moved. */
10981
11063
  export declare const DRAFT_WRITE_TOOL_NAMES: readonly ["draft_schema"];
10982
- /** The tool that ends a draft by turning it into schema, always behind an approval. */
10983
- export declare const PUBLISH_ARCHITECT_DRAFT_TOOL_NAME = "publish_architect_draft";
10984
11064
  /** The tool that throws a draft away. */
10985
11065
  export declare const DISCARD_ARCHITECT_DRAFT_TOOL_NAME = "discard_architect_draft";
10986
11066
  /** The design-review gate: the run parks while a human validates a chapter. */
@@ -12811,6 +12891,7 @@ export declare const agentMessagePartSchema: z$1.ZodUnion<readonly [z$1.ZodObjec
12811
12891
  result: z$1.ZodOptional<z$1.ZodUnknown>;
12812
12892
  error: z$1.ZodOptional<z$1.ZodString>;
12813
12893
  errorCode: z$1.ZodOptional<z$1.ZodEnum<{
12894
+ INVALID_TOOL_INPUT: "INVALID_TOOL_INPUT";
12814
12895
  output_limit_reached: "output_limit_reached";
12815
12896
  interrupted: "interrupted";
12816
12897
  }>>;
@@ -12941,6 +13022,7 @@ export declare const agentSessionMessageSchema: z$1.ZodObject<{
12941
13022
  result: z$1.ZodOptional<z$1.ZodUnknown>;
12942
13023
  error: z$1.ZodOptional<z$1.ZodString>;
12943
13024
  errorCode: z$1.ZodOptional<z$1.ZodEnum<{
13025
+ INVALID_TOOL_INPUT: "INVALID_TOOL_INPUT";
12944
13026
  output_limit_reached: "output_limit_reached";
12945
13027
  interrupted: "interrupted";
12946
13028
  }>>;
@@ -13154,6 +13236,7 @@ export declare const customDataChunkSchemas: {
13154
13236
  result: z$1.ZodOptional<z$1.ZodUnknown>;
13155
13237
  error: z$1.ZodOptional<z$1.ZodString>;
13156
13238
  errorCode: z$1.ZodOptional<z$1.ZodEnum<{
13239
+ INVALID_TOOL_INPUT: "INVALID_TOOL_INPUT";
13157
13240
  output_limit_reached: "output_limit_reached";
13158
13241
  interrupted: "interrupted";
13159
13242
  }>>;
@@ -13292,6 +13375,7 @@ export declare const customDataChunkSchemas: {
13292
13375
  result: z$1.ZodOptional<z$1.ZodUnknown>;
13293
13376
  error: z$1.ZodOptional<z$1.ZodString>;
13294
13377
  errorCode: z$1.ZodOptional<z$1.ZodEnum<{
13378
+ INVALID_TOOL_INPUT: "INVALID_TOOL_INPUT";
13295
13379
  output_limit_reached: "output_limit_reached";
13296
13380
  interrupted: "interrupted";
13297
13381
  }>>;
@@ -13496,4 +13580,4 @@ export declare function schemaStateSourcePayload(entries: readonly SchemaStateEn
13496
13580
  export declare function parseSchemaState(input: unknown): SchemaState;
13497
13581
  export declare function diffSchemaState(state: SchemaState): SchemaStateDiff;
13498
13582
  //#endregion
13499
- export { ATTRIBUTE_TYPES, AccessDeniedError, type ActivityContentDefinition, AddAttributeInput, type ArchitectChange, type ArchitectFocus, type ArchitectImpact, type ArchitectNavigation, type ArchitectPresentation, type ArchitectProjection, type AsideRule, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, AttributeGroup, AttributeInUseError, type AttributeLifecycleCapabilities, type AttributeLike, AttributeNotFoundError, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, AttributeUsage, BaseAttribute, type BaseOperation, type BatchGuidance, BilateralConfig, BuiltInTransform, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, type CanonicalViewOperationInput, type CatalogueViolation, ChangeTypeNotSupportedError, CheckboxAttribute, type CollectionAction, type CollectionContentDefinition, type CollectionContentSource, type CollectionSourceAddress, type ColumnReference, type ColumnsNeeded, CompileComputedFormulaInput, ComputedCompileAttribute, ComputedCompileObject, ComputedCompileSchema, ComputedDependency, ComputedDependencyGraphNode, ComputedFieldKind, ComputedFormulaAstNode, ComputedFormulaBinaryNode, ComputedFormulaBinaryOperator, ComputedFormulaCallNode, ComputedFormulaCompileError, ComputedFormulaLiteralNode, ComputedFormulaParseError, ComputedFormulaPathNode, ComputedFormulaResult, ComputedFunctionCategory, ComputedFunctionMetadata, ComputedFunctionName, ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConcurrentModificationError, type ContentCreateMode, type ContentExtensionDefinition, type ContentField, type ContentFieldGroup, type ContentNavigation, type ContentOpenMode, type ContentPlacement, type ContentViewCatalogueCollection, type ContentViewCatalogueInput, type ContentViewCatalogueResult, type ContentViewContext, type ContentViewDefinition, type ConversationDisplayTitleInput, CreateCustomObjectInput, type CreateDBForm, type CreateDBFormSubmission, Currency, CurrencyAttribute, type CurrencyFilterValue, type CustomContentDefinition, type DBForm, type DBFormSubmission, DEFAULT_VALIDATION_MESSAGES, DateAttribute, DateFormat, DateRangeValue, DateValue, type DayMonthValue, type DefaultResolutionContext, type DefaultViewType, DestructiveSyncNotAllowedError, DocumentAttribute, DocumentLayout, DocumentLayoutVariant, type DocumentsContentDefinition, type DraftAppendCommand, type DraftAppendReceipt, type DraftCommandGuard, type DraftContentState, type DraftFocus, type DraftObjectSettings, type DraftOperationContext, type DraftPublishCommand, type DraftSummary, type DraftViewAuthoring, type DraftableAttribute, type DraftableObject, type DraftableSampleRecord, type DraftableState, type DraftableView, DuplicateError, type DynamicValue, type EdgeQuantifier, type EditingCapability, type EditingScope, type EmailsContentDefinition, type ExhaustiveDraftObjectSettings, type ExtendedFilterRule, type FilterCombinator, type FilterOperator, type FilterRule, type FilterState, type FilterValue, type FlagResolutionContext, FolderPreset, ForbiddenError, type FormContentDefinition, type FormDensity, FormRegistry, type FormsContentDefinition, FormulaAttribute, FormulaReturnType, type KanbanCollectionContentDefinition, LIST_VIEW_TAB_VISIBILITIES, type LabelContext, type ListViewLayout, ListViewTabVisibility, Location, LocationAttribute, type LocationFilterProperty, LocationGranularity, MAX_PRESET_DEPTH, type MeetingsContentDefinition, MemoryNotFoundError, MigrationDefinition, MigrationTimeoutError, MultiRelationAttribute, MultiselectAttribute, type MutationReceipt, NO_VALUE_OPERATORS, type NamedTarget, type NextStep, type NoValueOperator, NonJsonValueError, NotFoundError, NotImplementedError, NumberAttribute, NumberUnit, OPERATORS_BY_TYPE, ObjectAttribute, ObjectDefinition, ObjectNotFoundError, ObjectRecord, ObjectReferencedError, type OperationDef, type OperationFamily, Option, OptionPropertyAttribute, OrphanSystemAttributeError, Phone, PhoneAttribute, type PhoneFilterValue, PresetNode, PropertyAttribute, PropertySchema, PropertyType, type ProposalRevision, type ProposalTarget, ProtectedResourceError, ProtectedRoleError, type QueryState, RELATION_TARGET_ANY, RESERVED_ATTRIBUTE_NAMES, RESERVED_OBJECT_NAMES, RESOURCE_VISIBILITIES, type ReconcileRelationAttributesInput, type ReconciledRelationAttributes, RecordNotFoundError, RecordReference, RecordReferencedError, RelationAttribute, RelationOption, RelationOptionsResponse, type RelationPair, RelationTarget, type RelativeDateValue, RepositoryError, RepositoryOperation, ReservedAttributeName, ReservedObjectName, ReservedObjectNameError, ResourceVisibility, RichTextAttribute, RichtextAttribute, type RichtextContentDefinition, RoleNotFoundError, RollupAttribute, RollupFunction, SCHEMA_LIMITS, SIMPLE_PROPERTY_TYPES, SYSTEM_FIELD_NAMES, type SamplePublication, SchemaError, SchemaErrorCode, SchemaOperation, SchemaPlanNotFoundError, SearchBackendError, SelectAttribute, SingleRelationAttribute, type SortDirection, type SortRule, type StandardSchemaV1, StatusAttribute, StatusGroup, StorageError, StorageOperation, type StoredContentDefinition, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, SystemFieldName, type TenantId, TextAttribute, TimeFormat, Timestamps, type UpdateDBForm, type UpdateDBFormSubmission, UpdateObjectInput, UserAttribute, type UserId, type UserLike, UserReferenceType, type Uuid, ValidationError, ValidationErrorDetail, type ValidationMessages, type ValueRef, type ViewContentDefinition, type ViewOperation, type ViewRead, WIRE_OMITTED_CONFIG_KEYS, asTenantId, asUserId, assertAcyclicComputedDependencies, attributeConfigSchemas, canonicalStringify, collectionContentSourceSchema, colorIdSchema, columnsSchema, compileComputedFormula, compileRollupAttribute, contentViewDefinitionSchema, contentViewDefinitionSchemaFor, createCheckboxValidator, createDateValidator, createFormAttributeValidator, createNumberValidator, createTextValidator, deepEqual, displayAttributesSchema, draftContentViewDefinitionSchema, draftContentViewDefinitionSchemaFor, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, filterOperatorsByTypeForGeneration, filterStateSchema, formatComputedResult, formatZodErrors, generateId, getRollupFilterOperators, hasOptions, iconNameSchema, indexBy, inferInverseCardinality, inferRollupReturnType, isAttributeInUseError, isAttributeSortable, isBilateralRelation, isComputedFunctionName, isNoValueOperator, isNotFoundError, isObjectReferencedError, isPlainRecord, isProtectedResourceError, isRecordReferencedError, isSchemaError, isUniversalRelation, isValidationError, multiselectOptionWriteSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, parseComputedFormula, parseResourceVisibility, propertyAttributeSchema, propertyAttributeWireSchema, propertySchemaSchema, propertySchemaWireSchema, publishedViewContentDefinitionSchema, refuseForeignKeys, rejectUnknownAttributesOrThrow, relationTargetsOf, resolvePropertyDefinitions, rollupToFormulaExpression, sameStableValue, selectOptionWriteSchema, serializeCanonicalJson, serializeStableJson, sortsSchema, statusGroupSchema, statusOptionWriteSchema, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow };
13583
+ export { ATTRIBUTE_TYPES, AccessDeniedError, type ActivityContentDefinition, AddAttributeInput, type ArchitectChange, type ArchitectFocus, type ArchitectImpact, type ArchitectNavigation, type ArchitectPresentation, type ArchitectProjection, type AsideRule, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, AttributeGroup, AttributeInUseError, type AttributeLifecycleCapabilities, type AttributeLike, AttributeNotFoundError, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, AttributeUsage, BaseAttribute, type BaseOperation, type BatchGuidance, BilateralConfig, BuiltInTransform, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, type CanonicalViewOperationInput, type CatalogueViolation, ChangeTypeNotSupportedError, CheckboxAttribute, type CollectionAction, type CollectionContentDefinition, type CollectionContentSource, type CollectionSourceAddress, type ColumnReference, type ColumnsNeeded, CompileComputedFormulaInput, ComputedCompileAttribute, ComputedCompileObject, ComputedCompileSchema, ComputedDependency, ComputedDependencyGraphNode, ComputedFieldKind, ComputedFormulaAstNode, ComputedFormulaBinaryNode, ComputedFormulaBinaryOperator, ComputedFormulaCallNode, ComputedFormulaCompileError, ComputedFormulaLiteralNode, ComputedFormulaParseError, ComputedFormulaPathNode, ComputedFormulaResult, ComputedFunctionCategory, ComputedFunctionMetadata, ComputedFunctionName, ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConcurrentModificationError, type ContentCreateMode, type ContentExtensionDefinition, type ContentField, type ContentFieldGroup, type ContentNavigation, type ContentOpenMode, type ContentPlacement, type ContentViewCatalogueCollection, type ContentViewCatalogueInput, type ContentViewCatalogueResult, type ContentViewContext, type ContentViewDefinition, type ConversationDisplayTitleInput, CreateCustomObjectInput, type CreateDBForm, type CreateDBFormSubmission, Currency, CurrencyAttribute, type CurrencyFilterValue, type CustomContentDefinition, type DBForm, type DBFormSubmission, DEFAULT_VALIDATION_MESSAGES, DateAttribute, DateFormat, DateRangeValue, DateValue, type DayMonthValue, type DefaultResolutionContext, type DefaultViewType, DestructiveSyncNotAllowedError, DocumentAttribute, DocumentLayout, DocumentLayoutVariant, type DocumentsContentDefinition, type DraftAppendCommand, type DraftAppendReceipt, type DraftCommandGuard, type DraftContentState, type DraftFocus, type DraftObjectSettings, type DraftOperationContext, type DraftPublishCommand, type DraftRefusal, type DraftSummary, type DraftViewAuthoring, type DraftableAttribute, type DraftableObject, type DraftableSampleRecord, type DraftableState, type DraftableView, DuplicateError, type DwellMode, type DynamicValue, type EdgeQuantifier, type EditingCapability, type EditingScope, type EmailsContentDefinition, type ExhaustiveDraftObjectSettings, type ExtendedFilterRule, type FilterCombinator, type FilterOperator, type FilterRule, type FilterState, type FilterValue, type FlagResolutionContext, FolderPreset, ForbiddenError, type FormContentDefinition, type FormDensity, FormRegistry, type FormsContentDefinition, FormulaAttribute, FormulaReturnType, type KanbanCollectionContentDefinition, LIST_VIEW_TAB_VISIBILITIES, type LabelContext, type ListViewLayout, ListViewTabVisibility, Location, LocationAttribute, type LocationFilterProperty, LocationGranularity, MAX_PRESET_DEPTH, type MeetingsContentDefinition, MemoryNotFoundError, MigrationDefinition, MigrationTimeoutError, MultiRelationAttribute, MultiselectAttribute, type MutationReceipt, NO_VALUE_OPERATORS, type NamedTarget, type NextStep, type NoValueOperator, NonJsonValueError, NotFoundError, NotImplementedError, NumberAttribute, NumberUnit, OPERATORS_BY_TYPE, ObjectAttribute, ObjectDefinition, ObjectNotFoundError, ObjectRecord, ObjectReferencedError, type OperationDef, type OperationFamily, type OperationPace, Option, OptionPropertyAttribute, OrphanSystemAttributeError, Phone, PhoneAttribute, type PhoneFilterValue, PresetNode, PropertyAttribute, PropertySchema, PropertyType, type ProposalRevision, type ProposalTarget, ProtectedResourceError, ProtectedRoleError, type QueryState, RELATION_TARGET_ANY, RESERVED_ATTRIBUTE_NAMES, RESERVED_OBJECT_NAMES, RESOURCE_VISIBILITIES, type ReconcileRelationAttributesInput, type ReconciledRelationAttributes, RecordNotFoundError, RecordReference, RecordReferencedError, RelationAttribute, RelationOption, RelationOptionsResponse, type RelationPair, RelationTarget, type RelativeDateValue, RepositoryError, RepositoryOperation, ReservedAttributeName, ReservedObjectName, ReservedObjectNameError, ResourceVisibility, RichTextAttribute, RichtextAttribute, type RichtextContentDefinition, RoleNotFoundError, RollupAttribute, RollupFunction, SCHEMA_LIMITS, SIMPLE_PROPERTY_TYPES, SYSTEM_FIELD_NAMES, type SamplePublication, SchemaError, SchemaErrorCode, SchemaOperation, SchemaPlanNotFoundError, SearchBackendError, SelectAttribute, SingleRelationAttribute, type SortDirection, type SortRule, type StandardSchemaV1, StatusAttribute, StatusGroup, StorageError, StorageOperation, type StoredContentDefinition, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, SystemFieldName, type TenantId, TextAttribute, TimeFormat, Timestamps, type UpdateDBForm, type UpdateDBFormSubmission, UpdateObjectInput, UserAttribute, type UserId, type UserLike, UserReferenceType, type Uuid, ValidationError, ValidationErrorDetail, type ValidationMessages, type ValueRef, type ViewContentDefinition, type ViewOperation, type ViewRead, WIRE_OMITTED_CONFIG_KEYS, asTenantId, asUserId, assertAcyclicComputedDependencies, attributeConfigSchemas, canonicalStringify, collectionContentSourceSchema, colorIdSchema, columnsSchema, compileComputedFormula, compileRollupAttribute, contentViewDefinitionSchema, contentViewDefinitionSchemaFor, createCheckboxValidator, createDateValidator, createFormAttributeValidator, createNumberValidator, createTextValidator, deepEqual, displayAttributesSchema, draftContentViewDefinitionSchema, draftContentViewDefinitionSchemaFor, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, filterOperatorsByTypeForGeneration, filterStateSchema, formatComputedResult, formatZodErrors, generateId, getRollupFilterOperators, hasOptions, iconNameSchema, indexBy, inferInverseCardinality, inferRollupReturnType, isAttributeInUseError, isAttributeSortable, isBilateralRelation, isComputedFunctionName, isNoValueOperator, isNotFoundError, isObjectReferencedError, isPlainRecord, isProtectedResourceError, isRecordReferencedError, isSchemaError, isUniversalRelation, isValidationError, multiselectOptionWriteSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, parseComputedFormula, parseResourceVisibility, propertyAttributeSchema, propertyAttributeWireSchema, propertySchemaSchema, propertySchemaWireSchema, publishedViewContentDefinitionSchema, refuseForeignKeys, rejectUnknownAttributesOrThrow, relationTargetsOf, resolvePropertyDefinitions, rollupToFormulaExpression, sameStableValue, selectOptionWriteSchema, serializeCanonicalJson, serializeStableJson, sortsSchema, statusGroupSchema, statusOptionWriteSchema, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow };