@stndrds/schema 1.0.0-alpha.346 → 1.0.0-alpha.348

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 (73) hide show
  1. package/dist/{all-72y_keWh.d.mts → all-CpdLgGJS.d.mts} +8 -8
  2. package/dist/{all-DCBPCw9F.d.ts → all-DjK6Qyn7.d.ts} +8 -8
  3. package/dist/capabilities.d.mts +7 -0
  4. package/dist/capabilities.d.ts +7 -0
  5. package/dist/capabilities.js +1 -1
  6. package/dist/capabilities.mjs +1 -1
  7. package/dist/{checkbox-CpPTW4Qn.d.mts → checkbox-BLcG591z.d.mts} +2 -2
  8. package/dist/{checkbox-CMNq2fkL.d.ts → checkbox-DZM_nCHU.d.ts} +2 -2
  9. package/dist/{date-B8W-uBOd.d.mts → date-DFpmksL8.d.mts} +2 -2
  10. package/dist/{date-Bn1QYgWY.d.ts → date-DdaRGJ6k.d.ts} +2 -2
  11. package/dist/{exceptions-B3WE8Upv.d.mts → exceptions-S2lmNz74.d.mts} +33 -2
  12. package/dist/{exceptions-B3WE8Upv.d.ts → exceptions-S2lmNz74.d.ts} +33 -2
  13. package/dist/exceptions.d.mts +2 -2
  14. package/dist/exceptions.d.ts +2 -2
  15. package/dist/exceptions.js +2 -2
  16. package/dist/exceptions.mjs +2 -2
  17. package/dist/{index-Dh21B6e4.d.ts → index-BCihfYR9.d.mts} +1 -1
  18. package/dist/{index-BKMp1wdz.d.mts → index-BT6-WMrI.d.ts} +1 -1
  19. package/dist/{index-CL87KvMy.d.ts → index-C2P7eGBD.d.ts} +2 -2
  20. package/dist/{index-nzT7sEBR.d.mts → index-DkmrYLFg.d.mts} +1 -1
  21. package/dist/{index-D4Fo465g.d.ts → index-TBK4s5wH.d.ts} +1 -1
  22. package/dist/{index-Dib0TdMy.d.mts → index-wvMnaDN-.d.mts} +2 -2
  23. package/dist/index.d.mts +10875 -10554
  24. package/dist/index.d.ts +10875 -10554
  25. package/dist/index.js +9 -9
  26. package/dist/index.mjs +9 -9
  27. package/dist/{number-B52ufFXh.d.mts → number-Bo9vQnrk.d.mts} +2 -2
  28. package/dist/{number-DwKAGHUq.d.ts → number-CL8uftq2.d.ts} +2 -2
  29. package/dist/{text-LRdjjxmn.d.ts → text-BUJ5u8t4.d.ts} +2 -2
  30. package/dist/{text-CjNrbnmS.d.mts → text-ClvAbA62.d.mts} +2 -2
  31. package/dist/utils.d.mts +1 -1
  32. package/dist/utils.d.ts +1 -1
  33. package/dist/validation/all.d.mts +4 -4
  34. package/dist/validation/all.d.ts +4 -4
  35. package/dist/validation/all.js +1 -1
  36. package/dist/validation/all.mjs +1 -1
  37. package/dist/validation/complex/currency.d.mts +2 -2
  38. package/dist/validation/complex/currency.d.ts +2 -2
  39. package/dist/validation/complex/location.d.mts +2 -2
  40. package/dist/validation/complex/location.d.ts +2 -2
  41. package/dist/validation/complex/phone.d.mts +2 -2
  42. package/dist/validation/complex/phone.d.ts +2 -2
  43. package/dist/validation/complex/relation.d.mts +2 -2
  44. package/dist/validation/complex/relation.d.ts +2 -2
  45. package/dist/validation/complex/richtext.d.mts +2 -2
  46. package/dist/validation/complex/richtext.d.ts +2 -2
  47. package/dist/validation/complex/select.d.mts +2 -2
  48. package/dist/validation/complex/select.d.ts +2 -2
  49. package/dist/validation/complex/user.d.mts +2 -2
  50. package/dist/validation/complex/user.d.ts +2 -2
  51. package/dist/validation/computed/formula.d.mts +2 -2
  52. package/dist/validation/computed/formula.d.ts +2 -2
  53. package/dist/validation/computed/rollup.d.mts +2 -2
  54. package/dist/validation/computed/rollup.d.ts +2 -2
  55. package/dist/validation/config/index.d.mts +1 -1
  56. package/dist/validation/config/index.d.ts +1 -1
  57. package/dist/validation/core/index.d.mts +1 -1
  58. package/dist/validation/core/index.d.ts +1 -1
  59. package/dist/validation/object/index.d.mts +1 -1
  60. package/dist/validation/object/index.d.ts +1 -1
  61. package/dist/validation/primitives/checkbox.d.mts +1 -1
  62. package/dist/validation/primitives/checkbox.d.ts +1 -1
  63. package/dist/validation/primitives/date.d.mts +1 -1
  64. package/dist/validation/primitives/date.d.ts +1 -1
  65. package/dist/validation/primitives/number.d.mts +1 -1
  66. package/dist/validation/primitives/number.d.ts +1 -1
  67. package/dist/validation/primitives/text.d.mts +1 -1
  68. package/dist/validation/primitives/text.d.ts +1 -1
  69. package/dist/view-config.schema-PCAznd98.mjs +2 -0
  70. package/dist/view-config.schema-VEoY_VAd.js +2 -0
  71. package/package.json +2 -2
  72. package/dist/view-config.schema-BDQ3S3IE.js +0 -2
  73. package/dist/view-config.schema-xYyZKn9M.mjs +0 -2
@@ -1,12 +1,12 @@
1
1
 
2
- import { Tt as RollupAttribute, Y as Attribute, Z as AttributeType } from "./exceptions-B3WE8Upv.mjs";
3
- import { m as ListViewTabVisibility } from "./index-Dib0TdMy.mjs";
4
- import "./index-BKMp1wdz.mjs";
5
- import "./index-nzT7sEBR.mjs";
6
- import "./text-CjNrbnmS.mjs";
7
- import "./number-B52ufFXh.mjs";
8
- import "./checkbox-CpPTW4Qn.mjs";
9
- import "./date-B8W-uBOd.mjs";
2
+ import { Ot as RollupAttribute, Q as Attribute, et as AttributeType } from "./exceptions-S2lmNz74.mjs";
3
+ import { m as ListViewTabVisibility } from "./index-wvMnaDN-.mjs";
4
+ import "./index-BCihfYR9.mjs";
5
+ import "./index-DkmrYLFg.mjs";
6
+ import "./text-ClvAbA62.mjs";
7
+ import "./number-Bo9vQnrk.mjs";
8
+ import "./checkbox-BLcG591z.mjs";
9
+ import "./date-DFpmksL8.mjs";
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-B3WE8Upv.js";
3
- import { m as ListViewTabVisibility } from "./index-CL87KvMy.js";
4
- import "./index-Dh21B6e4.js";
5
- import "./index-D4Fo465g.js";
6
- import "./text-LRdjjxmn.js";
7
- import "./number-DwKAGHUq.js";
8
- import "./checkbox-CMNq2fkL.js";
9
- import "./date-Bn1QYgWY.js";
2
+ import { Ot as RollupAttribute, Q as Attribute, et as AttributeType } from "./exceptions-S2lmNz74.js";
3
+ import { m as ListViewTabVisibility } from "./index-C2P7eGBD.js";
4
+ import "./index-BT6-WMrI.js";
5
+ import "./index-TBK4s5wH.js";
6
+ import "./text-BUJ5u8t4.js";
7
+ import "./number-CL8uftq2.js";
8
+ import "./checkbox-DZM_nCHU.js";
9
+ import "./date-DdaRGJ6k.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
@@ -3,6 +3,13 @@ import { z as z$1 } from "zod";
3
3
  //#region src/capabilities.d.ts
4
4
  /** Accepted forms of the object identifier every object-scoped capability takes. */
5
5
  export declare const OBJECT_ID_DESCRIPTION = "Object UUID, kebab-case name (e.g., 'contacts'), or display label (e.g., 'Personne physique'). All three are accepted; UUID is most precise.";
6
+ /**
7
+ * The `query` argument of every record search. The rule it states is what
8
+ * #3849 was missing: a model handed "with query / without query" answered a
9
+ * postal-code question with `query: "56"`, and a hit list ranked by token
10
+ * relevance is neither exact nor complete.
11
+ */
12
+ export declare const QUERY_DESCRIPTION = "Relevance ranking for a name or a phrase — matches tokens, not values. Exact criteria go in filters with NO query.";
6
13
  /** Shared suffix for record `data` inputs that accept `$fromSandboxFile` references for large content. */
7
14
  export declare const SANDBOX_FILE_DATA_HINT = " For large text content (> a few KB), write it to a sandbox file first and pass {\"$fromSandboxFile\": \"/workspace/<file>\"} as the attribute value — the server substitutes the file content.";
8
15
  /**
@@ -3,6 +3,13 @@ import { z as z$1 } from "zod";
3
3
  //#region src/capabilities.d.ts
4
4
  /** Accepted forms of the object identifier every object-scoped capability takes. */
5
5
  export declare const OBJECT_ID_DESCRIPTION = "Object UUID, kebab-case name (e.g., 'contacts'), or display label (e.g., 'Personne physique'). All three are accepted; UUID is most precise.";
6
+ /**
7
+ * The `query` argument of every record search. The rule it states is what
8
+ * #3849 was missing: a model handed "with query / without query" answered a
9
+ * postal-code question with `query: "56"`, and a hit list ranked by token
10
+ * relevance is neither exact nor complete.
11
+ */
12
+ export declare const QUERY_DESCRIPTION = "Relevance ranking for a name or a phrase — matches tokens, not values. Exact criteria go in filters with NO query.";
6
13
  /** Shared suffix for record `data` inputs that accept `$fromSandboxFile` references for large content. */
7
14
  export declare const SANDBOX_FILE_DATA_HINT = " For large text content (> a few KB), write it to a sandbox file first and pass {\"$fromSandboxFile\": \"/workspace/<file>\"} as the attribute value — the server substitutes the file content.";
8
15
  /**
@@ -1,2 +1,2 @@
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`});let e=require("zod");const t=`Object UUID, kebab-case name (e.g., 'contacts'), or display label (e.g., 'Personne physique'). All three are accepted; UUID is most precise.`,n=` For large text content (> a few KB), write it to a sandbox file first and pass {"$fromSandboxFile": "/workspace/<file>"} as the attribute value — the server substitutes the file content.`,r=e.z.object({combinator:e.z.enum([`and`,`or`]).default(`and`),rules:e.z.array(e.z.object({attribute:e.z.string().describe(`Attribute name on the object being searched`),property:e.z.string().optional().describe(`Optional. Only valid when 'attribute' is a relation / document / user attribute declared with .qualifyWith({...}). When set, the rule filters on the named EDGE property (not the linked record) and the operator must be valid for that property's type. See <filter_operators>.`),operator:e.z.string().describe(`Filter operator (canonical: is, is_not, contains, not_contains, starts_with, ends_with, less_than, greater_than, less_or_equal, greater_or_equal, is_within, on_day_month, any_of, none_of, is_empty, is_not_empty). Short codes (lt, gt, lte, gte, eq, neq, in) are accepted as input and auto-normalized to the canonical names. The valid set depends on the attribute type (or property type when 'property' is set) — see <filter_operators>.`),value:e.z.unknown().nullable().describe(`Value matching the attribute (or property) type: scalar for is/contains/less_than/etc (checkbox is: true|false); array (string[]) for any_of/none_of; null for is_empty/is_not_empty; { amount, unit, direction } for is_within; { day, month } for on_day_month.`)}))}),i=e.z.array(e.z.object({attribute:e.z.string().describe(`Attribute name`),direction:e.z.enum([`asc`,`desc`])})),a=e.z.object({recordId:e.z.string().describe(`Record UUID`),fields:e.z.array(e.z.string()).optional().describe(`Attribute names to return`)}),o=e.z.object({objectId:e.z.string().describe(t),_displayLabel:e.z.string().optional().describe(`Display label`),query:e.z.string().optional().describe(`Full-text search query (omit to browse/list)`),limit:e.z.number().optional().describe(`Max results per call: 1-1000 (default 20). Paginate via offset for more.`),offset:e.z.number().optional().describe(`Skip N records (default 0)`),fields:e.z.array(e.z.string()).optional().describe(`Attribute names to include in values`),filters:r.optional().describe(`Structured filter: { combinator: 'and'|'or', rules: [{attribute, operator, value, property?}] }. Operators are constrained per attribute type — see <filter_operators>. Use 'property' on a rule to filter on a qualified edge property.`),sorts:i.optional().describe(`Sorts: [{ attribute, direction: 'asc'|'desc' }]`)}),s=e.z.object({objectId:e.z.string().describe(t),_displayLabel:e.z.string().optional().describe(`Display label`),data:e.z.record(e.z.string(),e.z.unknown()).describe(`Record data.${n}`)}),c=e.z.object({recordId:e.z.string().describe(`Record UUID`),data:e.z.record(e.z.string(),e.z.unknown()).describe(`Fields to update.${n}`)}),l=e.z.object({recordId:e.z.string().describe(`Record UUID`)}),u={get_record:{name:`get_record`,kind:`read`,input:a},search_records:{name:`search_records`,kind:`read`,input:o},create_record:{name:`create_record`,kind:`create`,input:s},update_record:{name:`update_record`,kind:`update`,input:c},delete_record:{name:`delete_record`,kind:`delete`,input:l}},d=Object.freeze(Object.fromEntries(Object.values(u).map(e=>[e.name,e.kind])));exports.OBJECT_ID_DESCRIPTION=t,exports.RECORD_CAPABILITIES=u,exports.RECORD_CAPABILITY_KINDS=d,exports.SANDBOX_FILE_DATA_HINT=n,exports.filtersSchema=r,exports.sortsSchema=i;
2
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("zod");const t=`Object UUID, kebab-case name (e.g., 'contacts'), or display label (e.g., 'Personne physique'). All three are accepted; UUID is most precise.`,n=`Relevance ranking for a name or a phrase — matches tokens, not values. Exact criteria go in filters with NO query.`,r=` For large text content (> a few KB), write it to a sandbox file first and pass {"$fromSandboxFile": "/workspace/<file>"} as the attribute value — the server substitutes the file content.`,i=e.z.object({combinator:e.z.enum([`and`,`or`]).default(`and`),rules:e.z.array(e.z.object({attribute:e.z.string().describe(`Attribute name on the object being searched`),property:e.z.string().optional().describe(`Optional, and the only way to read one part of a compound value. On a relation / document / user attribute declared with .qualifyWith({...}) it names an EDGE property (not the linked record); on a location attribute it is one of city | postalCode | country, which is how a postal code or a city is filtered exactly. The operator must be valid for that property's type. See <filter_operators>.`),operator:e.z.string().describe(`Filter operator (canonical: is, is_not, contains, not_contains, starts_with, ends_with, less_than, greater_than, less_or_equal, greater_or_equal, is_within, on_day_month, any_of, none_of, is_empty, is_not_empty). Short codes (lt, gt, lte, gte, eq, neq, in) are accepted as input and auto-normalized to the canonical names. The valid set depends on the attribute type (or property type when 'property' is set) — see <filter_operators>.`),value:e.z.unknown().nullable().describe(`Value matching the attribute (or property) type: scalar for is/contains/less_than/etc (checkbox is: true|false); array (string[]) for any_of/none_of; null for is_empty/is_not_empty; { amount, unit, direction } for is_within; { day, month } for on_day_month.`)}))}),a=e.z.array(e.z.object({attribute:e.z.string().describe(`Attribute name`),direction:e.z.enum([`asc`,`desc`])})),o=e.z.object({recordId:e.z.string().describe(`Record UUID`),fields:e.z.array(e.z.string()).optional().describe(`Attribute names to return`)}),s=e.z.object({objectId:e.z.string().describe(t),_displayLabel:e.z.string().optional().describe(`Display label`),query:e.z.string().optional().describe(n),limit:e.z.number().optional().describe(`Max results per call: 1-1000 (default 20). Paginate via offset for more.`),offset:e.z.number().optional().describe(`Skip N records (default 0)`),fields:e.z.array(e.z.string()).optional().describe(`Attribute names to include in values`),filters:i.optional().describe(`Structured filter: { combinator: 'and'|'or', rules: [{attribute, operator, value, property?}] }. Operators are constrained per attribute type — see <filter_operators>. Use 'property' on a rule to filter on a qualified edge property.`),sorts:a.optional().describe(`Sorts: [{ attribute, direction: 'asc'|'desc' }]`)}),c=e.z.object({objectId:e.z.string().describe(t),_displayLabel:e.z.string().optional().describe(`Display label`),data:e.z.record(e.z.string(),e.z.unknown()).describe(`Record data.${r}`)}),l=e.z.object({recordId:e.z.string().describe(`Record UUID`),data:e.z.record(e.z.string(),e.z.unknown()).describe(`Fields to update.${r}`)}),u=e.z.object({recordId:e.z.string().describe(`Record UUID`)}),d={get_record:{name:`get_record`,kind:`read`,input:o},search_records:{name:`search_records`,kind:`read`,input:s},create_record:{name:`create_record`,kind:`create`,input:c},update_record:{name:`update_record`,kind:`update`,input:l},delete_record:{name:`delete_record`,kind:`delete`,input:u}},f=Object.freeze(Object.fromEntries(Object.values(d).map(e=>[e.name,e.kind])));exports.OBJECT_ID_DESCRIPTION=t,exports.QUERY_DESCRIPTION=n,exports.RECORD_CAPABILITIES=d,exports.RECORD_CAPABILITY_KINDS=f,exports.SANDBOX_FILE_DATA_HINT=r,exports.filtersSchema=i,exports.sortsSchema=a;
@@ -1,2 +1,2 @@
1
1
  /*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
- import{z as e}from"zod";const t=`Object UUID, kebab-case name (e.g., 'contacts'), or display label (e.g., 'Personne physique'). All three are accepted; UUID is most precise.`,n=` For large text content (> a few KB), write it to a sandbox file first and pass {"$fromSandboxFile": "/workspace/<file>"} as the attribute value — the server substitutes the file content.`,r=e.object({combinator:e.enum([`and`,`or`]).default(`and`),rules:e.array(e.object({attribute:e.string().describe(`Attribute name on the object being searched`),property:e.string().optional().describe(`Optional. Only valid when 'attribute' is a relation / document / user attribute declared with .qualifyWith({...}). When set, the rule filters on the named EDGE property (not the linked record) and the operator must be valid for that property's type. See <filter_operators>.`),operator:e.string().describe(`Filter operator (canonical: is, is_not, contains, not_contains, starts_with, ends_with, less_than, greater_than, less_or_equal, greater_or_equal, is_within, on_day_month, any_of, none_of, is_empty, is_not_empty). Short codes (lt, gt, lte, gte, eq, neq, in) are accepted as input and auto-normalized to the canonical names. The valid set depends on the attribute type (or property type when 'property' is set) — see <filter_operators>.`),value:e.unknown().nullable().describe(`Value matching the attribute (or property) type: scalar for is/contains/less_than/etc (checkbox is: true|false); array (string[]) for any_of/none_of; null for is_empty/is_not_empty; { amount, unit, direction } for is_within; { day, month } for on_day_month.`)}))}),i=e.array(e.object({attribute:e.string().describe(`Attribute name`),direction:e.enum([`asc`,`desc`])})),a=e.object({recordId:e.string().describe(`Record UUID`),fields:e.array(e.string()).optional().describe(`Attribute names to return`)}),o=e.object({objectId:e.string().describe(t),_displayLabel:e.string().optional().describe(`Display label`),query:e.string().optional().describe(`Full-text search query (omit to browse/list)`),limit:e.number().optional().describe(`Max results per call: 1-1000 (default 20). Paginate via offset for more.`),offset:e.number().optional().describe(`Skip N records (default 0)`),fields:e.array(e.string()).optional().describe(`Attribute names to include in values`),filters:r.optional().describe(`Structured filter: { combinator: 'and'|'or', rules: [{attribute, operator, value, property?}] }. Operators are constrained per attribute type — see <filter_operators>. Use 'property' on a rule to filter on a qualified edge property.`),sorts:i.optional().describe(`Sorts: [{ attribute, direction: 'asc'|'desc' }]`)}),s=e.object({objectId:e.string().describe(t),_displayLabel:e.string().optional().describe(`Display label`),data:e.record(e.string(),e.unknown()).describe(`Record data.${n}`)}),c=e.object({recordId:e.string().describe(`Record UUID`),data:e.record(e.string(),e.unknown()).describe(`Fields to update.${n}`)}),l=e.object({recordId:e.string().describe(`Record UUID`)}),u={get_record:{name:`get_record`,kind:`read`,input:a},search_records:{name:`search_records`,kind:`read`,input:o},create_record:{name:`create_record`,kind:`create`,input:s},update_record:{name:`update_record`,kind:`update`,input:c},delete_record:{name:`delete_record`,kind:`delete`,input:l}},d=Object.freeze(Object.fromEntries(Object.values(u).map(e=>[e.name,e.kind])));export{t as OBJECT_ID_DESCRIPTION,u as RECORD_CAPABILITIES,d as RECORD_CAPABILITY_KINDS,n as SANDBOX_FILE_DATA_HINT,r as filtersSchema,i as sortsSchema};
2
+ import{z as e}from"zod";const t=`Object UUID, kebab-case name (e.g., 'contacts'), or display label (e.g., 'Personne physique'). All three are accepted; UUID is most precise.`,n=`Relevance ranking for a name or a phrase — matches tokens, not values. Exact criteria go in filters with NO query.`,r=` For large text content (> a few KB), write it to a sandbox file first and pass {"$fromSandboxFile": "/workspace/<file>"} as the attribute value — the server substitutes the file content.`,i=e.object({combinator:e.enum([`and`,`or`]).default(`and`),rules:e.array(e.object({attribute:e.string().describe(`Attribute name on the object being searched`),property:e.string().optional().describe(`Optional, and the only way to read one part of a compound value. On a relation / document / user attribute declared with .qualifyWith({...}) it names an EDGE property (not the linked record); on a location attribute it is one of city | postalCode | country, which is how a postal code or a city is filtered exactly. The operator must be valid for that property's type. See <filter_operators>.`),operator:e.string().describe(`Filter operator (canonical: is, is_not, contains, not_contains, starts_with, ends_with, less_than, greater_than, less_or_equal, greater_or_equal, is_within, on_day_month, any_of, none_of, is_empty, is_not_empty). Short codes (lt, gt, lte, gte, eq, neq, in) are accepted as input and auto-normalized to the canonical names. The valid set depends on the attribute type (or property type when 'property' is set) — see <filter_operators>.`),value:e.unknown().nullable().describe(`Value matching the attribute (or property) type: scalar for is/contains/less_than/etc (checkbox is: true|false); array (string[]) for any_of/none_of; null for is_empty/is_not_empty; { amount, unit, direction } for is_within; { day, month } for on_day_month.`)}))}),a=e.array(e.object({attribute:e.string().describe(`Attribute name`),direction:e.enum([`asc`,`desc`])})),o=e.object({recordId:e.string().describe(`Record UUID`),fields:e.array(e.string()).optional().describe(`Attribute names to return`)}),s=e.object({objectId:e.string().describe(t),_displayLabel:e.string().optional().describe(`Display label`),query:e.string().optional().describe(n),limit:e.number().optional().describe(`Max results per call: 1-1000 (default 20). Paginate via offset for more.`),offset:e.number().optional().describe(`Skip N records (default 0)`),fields:e.array(e.string()).optional().describe(`Attribute names to include in values`),filters:i.optional().describe(`Structured filter: { combinator: 'and'|'or', rules: [{attribute, operator, value, property?}] }. Operators are constrained per attribute type — see <filter_operators>. Use 'property' on a rule to filter on a qualified edge property.`),sorts:a.optional().describe(`Sorts: [{ attribute, direction: 'asc'|'desc' }]`)}),c=e.object({objectId:e.string().describe(t),_displayLabel:e.string().optional().describe(`Display label`),data:e.record(e.string(),e.unknown()).describe(`Record data.${r}`)}),l=e.object({recordId:e.string().describe(`Record UUID`),data:e.record(e.string(),e.unknown()).describe(`Fields to update.${r}`)}),u=e.object({recordId:e.string().describe(`Record UUID`)}),d={get_record:{name:`get_record`,kind:`read`,input:o},search_records:{name:`search_records`,kind:`read`,input:s},create_record:{name:`create_record`,kind:`create`,input:c},update_record:{name:`update_record`,kind:`update`,input:l},delete_record:{name:`delete_record`,kind:`delete`,input:u}},f=Object.freeze(Object.fromEntries(Object.values(d).map(e=>[e.name,e.kind])));export{t as OBJECT_ID_DESCRIPTION,n as QUERY_DESCRIPTION,d as RECORD_CAPABILITIES,f as RECORD_CAPABILITY_KINDS,r as SANDBOX_FILE_DATA_HINT,i as filtersSchema,a as sortsSchema};
@@ -1,6 +1,6 @@
1
1
 
2
- import { et as CheckboxAttribute } from "./exceptions-B3WE8Upv.mjs";
3
- import { r as ValidationMessages } from "./index-nzT7sEBR.mjs";
2
+ import { rt as CheckboxAttribute } from "./exceptions-S2lmNz74.mjs";
3
+ import { r as ValidationMessages } from "./index-DkmrYLFg.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 { et as CheckboxAttribute } from "./exceptions-B3WE8Upv.js";
3
- import { r as ValidationMessages } from "./index-D4Fo465g.js";
2
+ import { rt as CheckboxAttribute } from "./exceptions-S2lmNz74.js";
3
+ import { r as ValidationMessages } from "./index-TBK4s5wH.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 { rt as DateAttribute } from "./exceptions-B3WE8Upv.mjs";
3
- import { r as ValidationMessages } from "./index-nzT7sEBR.mjs";
2
+ import { ot as DateAttribute } from "./exceptions-S2lmNz74.mjs";
3
+ import { r as ValidationMessages } from "./index-DkmrYLFg.mjs";
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-B3WE8Upv.js";
3
- import { r as ValidationMessages } from "./index-D4Fo465g.js";
2
+ import { ot as DateAttribute } from "./exceptions-S2lmNz74.js";
3
+ import { r as ValidationMessages } from "./index-TBK4s5wH.js";
4
4
  import { z as z$1 } from "zod";
5
5
  //#region src/validation/primitives/date.d.ts
6
6
  /**
@@ -981,6 +981,12 @@ declare const SchemaErrorCode: {
981
981
  readonly AGENT_MESSAGE_NOT_FOUND: "AGENT_MESSAGE_NOT_FOUND";
982
982
  readonly AGENT_MESSAGE_NOT_EDITABLE: "AGENT_MESSAGE_NOT_EDITABLE";
983
983
  readonly INVALID_TOOL_INPUT: "INVALID_TOOL_INPUT";
984
+ readonly AGENT_EXECUTION_CANCELLED: "AGENT_EXECUTION_CANCELLED";
985
+ readonly AGENT_EXECUTION_TIMEOUT: "AGENT_EXECUTION_TIMEOUT";
986
+ readonly AGENT_EXTERNAL_OUTCOME_UNKNOWN: "AGENT_EXTERNAL_OUTCOME_UNKNOWN";
987
+ readonly AGENT_TOOL_CANCELLATION_POLICY: "AGENT_TOOL_CANCELLATION_POLICY";
988
+ readonly AGENT_CANCELLATION_WATCH_CAPACITY: "AGENT_CANCELLATION_WATCH_CAPACITY";
989
+ readonly AGENT_CANCELLATION_CLEANUP: "AGENT_CANCELLATION_CLEANUP";
984
990
  readonly DEVICE_NOT_FOUND: "DEVICE_NOT_FOUND";
985
991
  readonly DEVICE_OFFLINE: "DEVICE_OFFLINE";
986
992
  readonly DEVICE_CAPABILITY_MISMATCH: "DEVICE_CAPABILITY_MISMATCH";
@@ -995,6 +1001,7 @@ declare const SchemaErrorCode: {
995
1001
  readonly AI_DECISION_FAILED: "AI_DECISION_FAILED";
996
1002
  readonly AI_IMAGE_USAGE_PENDING: "AI_IMAGE_USAGE_PENDING";
997
1003
  readonly AI_IMAGE_GENERATION_INDETERMINATE: "AI_IMAGE_GENERATION_INDETERMINATE";
1004
+ readonly AI_IMAGE_RESERVATION_CLEANUP_INDETERMINATE: "AI_IMAGE_RESERVATION_CLEANUP_INDETERMINATE";
998
1005
  readonly AI_IMAGE_PUBLICATION_FAILED: "AI_IMAGE_PUBLICATION_FAILED";
999
1006
  readonly DOCUMENT_MIME_NOT_ACCEPTED: "DOCUMENT_MIME_NOT_ACCEPTED";
1000
1007
  readonly DOCUMENT_MULTIPLE_NOT_ALLOWED: "DOCUMENT_MULTIPLE_NOT_ALLOWED";
@@ -1395,7 +1402,9 @@ type AttributeUsage = "labelExpression" | "embeddingExpression" | "view" | "filt
1395
1402
  declare class AttributeInUseError extends SchemaError {
1396
1403
  readonly attributeName: string;
1397
1404
  readonly usage: AttributeUsage;
1398
- constructor(attributeName: string, usage: AttributeUsage);
1405
+ /** Where exactly, when the usage alone would not let the caller find it. */
1406
+ readonly location?: string;
1407
+ constructor(attributeName: string, usage: AttributeUsage, location?: string);
1399
1408
  }
1400
1409
  /**
1401
1410
  * Thrown when attempting to delete an object that is a relation target.
@@ -1408,6 +1417,28 @@ declare class ObjectReferencedError extends SchemaError {
1408
1417
  readonly referencingObjects: string[];
1409
1418
  constructor(objectName: string, referencingObjects: string[]);
1410
1419
  }
1420
+ /**
1421
+ * Supabase Realtime refused a publish because the channel was rate limited.
1422
+ *
1423
+ * Lives here rather than beside the publisher so the browser channel client and
1424
+ * the server publisher can share one error vocabulary without either package
1425
+ * depending on the other.
1426
+ */
1427
+ declare class RealtimeRateLimitedError extends SchemaError {
1428
+ constructor();
1429
+ }
1430
+ /**
1431
+ * A Supabase Realtime publish did not reach the channel.
1432
+ */
1433
+ declare class RealtimeDeliveryError extends SchemaError {
1434
+ constructor();
1435
+ }
1436
+ /**
1437
+ * A Supabase Realtime channel could not be subscribed to.
1438
+ */
1439
+ declare class RealtimeSubscriptionError extends SchemaError {
1440
+ constructor();
1441
+ }
1411
1442
  /**
1412
1443
  * Check if an error is a RecordReferencedError
1413
1444
  */
@@ -1421,4 +1452,4 @@ declare function isAttributeInUseError(error: unknown): error is AttributeInUseE
1421
1452
  */
1422
1453
  declare function isObjectReferencedError(error: unknown): error is ObjectReferencedError;
1423
1454
  //#endregion
1424
- export { BilateralConfig as $, indexBy as $t, StorageError as A, ComputedDependency as An, StatusGroup as At, isObjectReferencedError as B, ComputedFormulaLiteralNode as Bn, OptionPropertyAttribute as Bt, RepositoryOperation as C, assertAcyclicComputedDependencies as Cn, RichTextAttribute as Ct, SchemaErrorCode as D, ComputedFunctionName as Dn, SelectAttribute as Dt, SchemaError as E, COMPUTED_FUNCTION_NAMES as En, RollupFunction as Et, SystemEntityImmutableError as F, ComputedValueType as Fn, inferInverseCardinality as Ft, BuiltInTransform as G, resolvePropertyDefinitions as Gt, isRecordReferencedError as H, ComputedFormulaPathNode as Hn, PropertySchema as Ht, ValidationError as I, ComputedFormulaAstNode as In, isAttributeSortable as It, ATTRIBUTE_TYPES as J, Uuid as Jt, MigrationDefinition as K, TenantId as Kt, ValidationErrorDetail as L, ComputedFormulaBinaryNode as Ln, isBilateralRelation as Lt, SyncCascadeError as M, ComputedOptionsSource as Mn, TimeFormat as Mt, SyncConflictError as N, ComputedPlan as Nn, UserAttribute as Nt, SchemaPlanNotFoundError as O, ComputedFunctionSignature as On, SingleRelationAttribute as Ot, SyncError as P, ComputedReturnType as Pn, UserReferenceType as Pt, BaseAttribute as Q, generateId as Qt, isAttributeInUseError as R, ComputedFormulaBinaryOperator as Rn, isUniversalRelation as Rt, RepositoryError as S, ComputedFormulaCompileError as Sn, RelationTarget as St, RoleNotFoundError as T, COMPUTED_FUNCTIONS as Tn, RollupAttribute as Tt, isSchemaError as U, parseComputedFormula as Un, PropertyType as Ut, isProtectedResourceError as V, ComputedFormulaParseError as Vn, PropertyAttribute as Vt, isValidationError as W, hasOptions as Wt, AttributeGroup as X, asUserId as Xt, Attribute as Y, asTenantId as Yt, AttributeType as Z, deepEqual as Zt, ProtectedResourceError as _, CompileComputedFormulaInput as _n, Option as _t, ChangeTypeNotSupportedError as a, COMPUTED_FUNCTION_METADATA as an, DateRangeValue as at, RecordReference as b, ComputedCompileSchema as bn, RELATION_TARGET_ANY as bt, DuplicateError as c, ComputedFormulaResult as cn, FormulaAttribute as ct, MigrationTimeoutError as d, evaluateComputedFormulaWithResult as dn, LocationAttribute as dt, NonJsonValueError as en, CheckboxAttribute as et, NotFoundError as f, formatComputedResult as fn, LocationGranularity as ft, OrphanSystemAttributeError as g, rollupToFormulaExpression as gn, NumberUnit as gt, ObjectReferencedError as h, inferRollupReturnType as hn, NumberAttribute as ht, AttributeUsage as i, serializeStableJson as in, DateFormat as it, StorageOperation as j, ComputedFieldKind as jn, TextAttribute as jt, SearchBackendError as k, isComputedFunctionName as kn, StatusAttribute as kt, ForbiddenError as l, evaluateComputedAst as ln, FormulaReturnType as lt, ObjectNotFoundError as m, compileRollupAttribute as mn, MultiselectAttribute as mt, AttributeInUseError as n, sameStableValue as nn, CurrencyAttribute as nt, ConcurrentModificationError as o, ComputedFunctionCategory as on, DateValue as ot, NotImplementedError as p, isPlainRecord as pn, MultiRelationAttribute as pt, SchemaOperation as q, UserId as qt, AttributeNotFoundError as r, serializeCanonicalJson as rn, DateAttribute as rt, DestructiveSyncNotAllowedError as s, ComputedFunctionMetadata as sn, DocumentAttribute as st, AccessDeniedError as t, canonicalStringify as tn, Currency as tt, MemoryNotFoundError as u, evaluateComputedFormula as un, Location as ut, ProtectedRoleError as v, ComputedCompileAttribute as vn, Phone as vt, ReservedObjectNameError as w, compileComputedFormula as wn, RichtextAttribute as wt, RecordReferencedError as x, ComputedDependencyGraphNode as xn, RelationAttribute as xt, RecordNotFoundError as y, ComputedCompileObject as yn, PhoneAttribute as yt, isNotFoundError as z, ComputedFormulaCallNode as zn, relationTargetsOf as zt };
1455
+ export { AttributeGroup as $, asUserId as $t, SchemaErrorCode as A, ComputedFunctionName as An, SelectAttribute as At, ValidationErrorDetail as B, ComputedFormulaBinaryNode as Bn, isBilateralRelation as Bt, RecordReference as C, ComputedCompileSchema as Cn, RELATION_TARGET_ANY as Ct, ReservedObjectNameError as D, compileComputedFormula as Dn, RichtextAttribute as Dt, RepositoryOperation as E, assertAcyclicComputedDependencies as En, RichTextAttribute as Et, SyncCascadeError as F, ComputedOptionsSource as Fn, TimeFormat as Ft, isRecordReferencedError as G, ComputedFormulaPathNode as Gn, PropertySchema as Gt, isNotFoundError as H, ComputedFormulaCallNode as Hn, relationTargetsOf as Ht, SyncConflictError as I, ComputedPlan as In, UserAttribute as It, BuiltInTransform as J, resolvePropertyDefinitions as Jt, isSchemaError as K, parseComputedFormula as Kn, PropertyType as Kt, SyncError as L, ComputedReturnType as Ln, UserReferenceType as Lt, SearchBackendError as M, isComputedFunctionName as Mn, StatusAttribute as Mt, StorageError as N, ComputedDependency as Nn, StatusGroup as Nt, RoleNotFoundError as O, COMPUTED_FUNCTIONS as On, RollupAttribute as Ot, StorageOperation as P, ComputedFieldKind as Pn, TextAttribute as Pt, Attribute as Q, asTenantId as Qt, SystemEntityImmutableError as R, ComputedValueType as Rn, inferInverseCardinality as Rt, RecordNotFoundError as S, ComputedCompileObject as Sn, PhoneAttribute as St, RepositoryError as T, ComputedFormulaCompileError as Tn, RelationTarget as Tt, isObjectReferencedError as U, ComputedFormulaLiteralNode as Un, OptionPropertyAttribute as Ut, isAttributeInUseError as V, ComputedFormulaBinaryOperator as Vn, isUniversalRelation as Vt, isProtectedResourceError as W, ComputedFormulaParseError as Wn, PropertyAttribute as Wt, SchemaOperation as X, UserId as Xt, MigrationDefinition as Y, TenantId as Yt, ATTRIBUTE_TYPES as Z, Uuid as Zt, ProtectedResourceError as _, compileRollupAttribute as _n, MultiselectAttribute as _t, ChangeTypeNotSupportedError as a, sameStableValue as an, CurrencyAttribute as at, RealtimeRateLimitedError as b, CompileComputedFormulaInput as bn, Option as bt, DuplicateError as c, COMPUTED_FUNCTION_METADATA as cn, DateRangeValue as ct, MigrationTimeoutError as d, ComputedFormulaResult as dn, FormulaAttribute as dt, deepEqual as en, AttributeType as et, NotFoundError as f, evaluateComputedAst as fn, FormulaReturnType as ft, OrphanSystemAttributeError as g, isPlainRecord as gn, MultiRelationAttribute as gt, ObjectReferencedError as h, formatComputedResult as hn, LocationGranularity as ht, AttributeUsage as i, canonicalStringify as in, Currency as it, SchemaPlanNotFoundError as j, ComputedFunctionSignature as jn, SingleRelationAttribute as jt, SchemaError as k, COMPUTED_FUNCTION_NAMES as kn, RollupFunction as kt, ForbiddenError as l, ComputedFunctionCategory as ln, DateValue as lt, ObjectNotFoundError as m, evaluateComputedFormulaWithResult as mn, LocationAttribute as mt, AttributeInUseError as n, indexBy as nn, BilateralConfig as nt, ConcurrentModificationError as o, serializeCanonicalJson as on, DateAttribute as ot, NotImplementedError as p, evaluateComputedFormula as pn, Location as pt, isValidationError as q, hasOptions as qt, AttributeNotFoundError as r, NonJsonValueError as rn, CheckboxAttribute as rt, DestructiveSyncNotAllowedError as s, serializeStableJson as sn, DateFormat as st, AccessDeniedError as t, generateId as tn, BaseAttribute as tt, MemoryNotFoundError as u, ComputedFunctionMetadata as un, DocumentAttribute as ut, ProtectedRoleError as v, inferRollupReturnType as vn, NumberAttribute as vt, RecordReferencedError as w, ComputedDependencyGraphNode as wn, RelationAttribute as wt, RealtimeSubscriptionError as x, ComputedCompileAttribute as xn, Phone as xt, RealtimeDeliveryError as y, rollupToFormulaExpression as yn, NumberUnit as yt, ValidationError as z, ComputedFormulaAstNode as zn, isAttributeSortable as zt };
@@ -981,6 +981,12 @@ declare const SchemaErrorCode: {
981
981
  readonly AGENT_MESSAGE_NOT_FOUND: "AGENT_MESSAGE_NOT_FOUND";
982
982
  readonly AGENT_MESSAGE_NOT_EDITABLE: "AGENT_MESSAGE_NOT_EDITABLE";
983
983
  readonly INVALID_TOOL_INPUT: "INVALID_TOOL_INPUT";
984
+ readonly AGENT_EXECUTION_CANCELLED: "AGENT_EXECUTION_CANCELLED";
985
+ readonly AGENT_EXECUTION_TIMEOUT: "AGENT_EXECUTION_TIMEOUT";
986
+ readonly AGENT_EXTERNAL_OUTCOME_UNKNOWN: "AGENT_EXTERNAL_OUTCOME_UNKNOWN";
987
+ readonly AGENT_TOOL_CANCELLATION_POLICY: "AGENT_TOOL_CANCELLATION_POLICY";
988
+ readonly AGENT_CANCELLATION_WATCH_CAPACITY: "AGENT_CANCELLATION_WATCH_CAPACITY";
989
+ readonly AGENT_CANCELLATION_CLEANUP: "AGENT_CANCELLATION_CLEANUP";
984
990
  readonly DEVICE_NOT_FOUND: "DEVICE_NOT_FOUND";
985
991
  readonly DEVICE_OFFLINE: "DEVICE_OFFLINE";
986
992
  readonly DEVICE_CAPABILITY_MISMATCH: "DEVICE_CAPABILITY_MISMATCH";
@@ -995,6 +1001,7 @@ declare const SchemaErrorCode: {
995
1001
  readonly AI_DECISION_FAILED: "AI_DECISION_FAILED";
996
1002
  readonly AI_IMAGE_USAGE_PENDING: "AI_IMAGE_USAGE_PENDING";
997
1003
  readonly AI_IMAGE_GENERATION_INDETERMINATE: "AI_IMAGE_GENERATION_INDETERMINATE";
1004
+ readonly AI_IMAGE_RESERVATION_CLEANUP_INDETERMINATE: "AI_IMAGE_RESERVATION_CLEANUP_INDETERMINATE";
998
1005
  readonly AI_IMAGE_PUBLICATION_FAILED: "AI_IMAGE_PUBLICATION_FAILED";
999
1006
  readonly DOCUMENT_MIME_NOT_ACCEPTED: "DOCUMENT_MIME_NOT_ACCEPTED";
1000
1007
  readonly DOCUMENT_MULTIPLE_NOT_ALLOWED: "DOCUMENT_MULTIPLE_NOT_ALLOWED";
@@ -1395,7 +1402,9 @@ type AttributeUsage = "labelExpression" | "embeddingExpression" | "view" | "filt
1395
1402
  declare class AttributeInUseError extends SchemaError {
1396
1403
  readonly attributeName: string;
1397
1404
  readonly usage: AttributeUsage;
1398
- constructor(attributeName: string, usage: AttributeUsage);
1405
+ /** Where exactly, when the usage alone would not let the caller find it. */
1406
+ readonly location?: string;
1407
+ constructor(attributeName: string, usage: AttributeUsage, location?: string);
1399
1408
  }
1400
1409
  /**
1401
1410
  * Thrown when attempting to delete an object that is a relation target.
@@ -1408,6 +1417,28 @@ declare class ObjectReferencedError extends SchemaError {
1408
1417
  readonly referencingObjects: string[];
1409
1418
  constructor(objectName: string, referencingObjects: string[]);
1410
1419
  }
1420
+ /**
1421
+ * Supabase Realtime refused a publish because the channel was rate limited.
1422
+ *
1423
+ * Lives here rather than beside the publisher so the browser channel client and
1424
+ * the server publisher can share one error vocabulary without either package
1425
+ * depending on the other.
1426
+ */
1427
+ declare class RealtimeRateLimitedError extends SchemaError {
1428
+ constructor();
1429
+ }
1430
+ /**
1431
+ * A Supabase Realtime publish did not reach the channel.
1432
+ */
1433
+ declare class RealtimeDeliveryError extends SchemaError {
1434
+ constructor();
1435
+ }
1436
+ /**
1437
+ * A Supabase Realtime channel could not be subscribed to.
1438
+ */
1439
+ declare class RealtimeSubscriptionError extends SchemaError {
1440
+ constructor();
1441
+ }
1411
1442
  /**
1412
1443
  * Check if an error is a RecordReferencedError
1413
1444
  */
@@ -1421,4 +1452,4 @@ declare function isAttributeInUseError(error: unknown): error is AttributeInUseE
1421
1452
  */
1422
1453
  declare function isObjectReferencedError(error: unknown): error is ObjectReferencedError;
1423
1454
  //#endregion
1424
- export { BilateralConfig as $, indexBy as $t, StorageError as A, ComputedDependency as An, StatusGroup as At, isObjectReferencedError as B, ComputedFormulaLiteralNode as Bn, OptionPropertyAttribute as Bt, RepositoryOperation as C, assertAcyclicComputedDependencies as Cn, RichTextAttribute as Ct, SchemaErrorCode as D, ComputedFunctionName as Dn, SelectAttribute as Dt, SchemaError as E, COMPUTED_FUNCTION_NAMES as En, RollupFunction as Et, SystemEntityImmutableError as F, ComputedValueType as Fn, inferInverseCardinality as Ft, BuiltInTransform as G, resolvePropertyDefinitions as Gt, isRecordReferencedError as H, ComputedFormulaPathNode as Hn, PropertySchema as Ht, ValidationError as I, ComputedFormulaAstNode as In, isAttributeSortable as It, ATTRIBUTE_TYPES as J, Uuid as Jt, MigrationDefinition as K, TenantId as Kt, ValidationErrorDetail as L, ComputedFormulaBinaryNode as Ln, isBilateralRelation as Lt, SyncCascadeError as M, ComputedOptionsSource as Mn, TimeFormat as Mt, SyncConflictError as N, ComputedPlan as Nn, UserAttribute as Nt, SchemaPlanNotFoundError as O, ComputedFunctionSignature as On, SingleRelationAttribute as Ot, SyncError as P, ComputedReturnType as Pn, UserReferenceType as Pt, BaseAttribute as Q, generateId as Qt, isAttributeInUseError as R, ComputedFormulaBinaryOperator as Rn, isUniversalRelation as Rt, RepositoryError as S, ComputedFormulaCompileError as Sn, RelationTarget as St, RoleNotFoundError as T, COMPUTED_FUNCTIONS as Tn, RollupAttribute as Tt, isSchemaError as U, parseComputedFormula as Un, PropertyType as Ut, isProtectedResourceError as V, ComputedFormulaParseError as Vn, PropertyAttribute as Vt, isValidationError as W, hasOptions as Wt, AttributeGroup as X, asUserId as Xt, Attribute as Y, asTenantId as Yt, AttributeType as Z, deepEqual as Zt, ProtectedResourceError as _, CompileComputedFormulaInput as _n, Option as _t, ChangeTypeNotSupportedError as a, COMPUTED_FUNCTION_METADATA as an, DateRangeValue as at, RecordReference as b, ComputedCompileSchema as bn, RELATION_TARGET_ANY as bt, DuplicateError as c, ComputedFormulaResult as cn, FormulaAttribute as ct, MigrationTimeoutError as d, evaluateComputedFormulaWithResult as dn, LocationAttribute as dt, NonJsonValueError as en, CheckboxAttribute as et, NotFoundError as f, formatComputedResult as fn, LocationGranularity as ft, OrphanSystemAttributeError as g, rollupToFormulaExpression as gn, NumberUnit as gt, ObjectReferencedError as h, inferRollupReturnType as hn, NumberAttribute as ht, AttributeUsage as i, serializeStableJson as in, DateFormat as it, StorageOperation as j, ComputedFieldKind as jn, TextAttribute as jt, SearchBackendError as k, isComputedFunctionName as kn, StatusAttribute as kt, ForbiddenError as l, evaluateComputedAst as ln, FormulaReturnType as lt, ObjectNotFoundError as m, compileRollupAttribute as mn, MultiselectAttribute as mt, AttributeInUseError as n, sameStableValue as nn, CurrencyAttribute as nt, ConcurrentModificationError as o, ComputedFunctionCategory as on, DateValue as ot, NotImplementedError as p, isPlainRecord as pn, MultiRelationAttribute as pt, SchemaOperation as q, UserId as qt, AttributeNotFoundError as r, serializeCanonicalJson as rn, DateAttribute as rt, DestructiveSyncNotAllowedError as s, ComputedFunctionMetadata as sn, DocumentAttribute as st, AccessDeniedError as t, canonicalStringify as tn, Currency as tt, MemoryNotFoundError as u, evaluateComputedFormula as un, Location as ut, ProtectedRoleError as v, ComputedCompileAttribute as vn, Phone as vt, ReservedObjectNameError as w, compileComputedFormula as wn, RichtextAttribute as wt, RecordReferencedError as x, ComputedDependencyGraphNode as xn, RelationAttribute as xt, RecordNotFoundError as y, ComputedCompileObject as yn, PhoneAttribute as yt, isNotFoundError as z, ComputedFormulaCallNode as zn, relationTargetsOf as zt };
1455
+ export { AttributeGroup as $, asUserId as $t, SchemaErrorCode as A, ComputedFunctionName as An, SelectAttribute as At, ValidationErrorDetail as B, ComputedFormulaBinaryNode as Bn, isBilateralRelation as Bt, RecordReference as C, ComputedCompileSchema as Cn, RELATION_TARGET_ANY as Ct, ReservedObjectNameError as D, compileComputedFormula as Dn, RichtextAttribute as Dt, RepositoryOperation as E, assertAcyclicComputedDependencies as En, RichTextAttribute as Et, SyncCascadeError as F, ComputedOptionsSource as Fn, TimeFormat as Ft, isRecordReferencedError as G, ComputedFormulaPathNode as Gn, PropertySchema as Gt, isNotFoundError as H, ComputedFormulaCallNode as Hn, relationTargetsOf as Ht, SyncConflictError as I, ComputedPlan as In, UserAttribute as It, BuiltInTransform as J, resolvePropertyDefinitions as Jt, isSchemaError as K, parseComputedFormula as Kn, PropertyType as Kt, SyncError as L, ComputedReturnType as Ln, UserReferenceType as Lt, SearchBackendError as M, isComputedFunctionName as Mn, StatusAttribute as Mt, StorageError as N, ComputedDependency as Nn, StatusGroup as Nt, RoleNotFoundError as O, COMPUTED_FUNCTIONS as On, RollupAttribute as Ot, StorageOperation as P, ComputedFieldKind as Pn, TextAttribute as Pt, Attribute as Q, asTenantId as Qt, SystemEntityImmutableError as R, ComputedValueType as Rn, inferInverseCardinality as Rt, RecordNotFoundError as S, ComputedCompileObject as Sn, PhoneAttribute as St, RepositoryError as T, ComputedFormulaCompileError as Tn, RelationTarget as Tt, isObjectReferencedError as U, ComputedFormulaLiteralNode as Un, OptionPropertyAttribute as Ut, isAttributeInUseError as V, ComputedFormulaBinaryOperator as Vn, isUniversalRelation as Vt, isProtectedResourceError as W, ComputedFormulaParseError as Wn, PropertyAttribute as Wt, SchemaOperation as X, UserId as Xt, MigrationDefinition as Y, TenantId as Yt, ATTRIBUTE_TYPES as Z, Uuid as Zt, ProtectedResourceError as _, compileRollupAttribute as _n, MultiselectAttribute as _t, ChangeTypeNotSupportedError as a, sameStableValue as an, CurrencyAttribute as at, RealtimeRateLimitedError as b, CompileComputedFormulaInput as bn, Option as bt, DuplicateError as c, COMPUTED_FUNCTION_METADATA as cn, DateRangeValue as ct, MigrationTimeoutError as d, ComputedFormulaResult as dn, FormulaAttribute as dt, deepEqual as en, AttributeType as et, NotFoundError as f, evaluateComputedAst as fn, FormulaReturnType as ft, OrphanSystemAttributeError as g, isPlainRecord as gn, MultiRelationAttribute as gt, ObjectReferencedError as h, formatComputedResult as hn, LocationGranularity as ht, AttributeUsage as i, canonicalStringify as in, Currency as it, SchemaPlanNotFoundError as j, ComputedFunctionSignature as jn, SingleRelationAttribute as jt, SchemaError as k, COMPUTED_FUNCTION_NAMES as kn, RollupFunction as kt, ForbiddenError as l, ComputedFunctionCategory as ln, DateValue as lt, ObjectNotFoundError as m, evaluateComputedFormulaWithResult as mn, LocationAttribute as mt, AttributeInUseError as n, indexBy as nn, BilateralConfig as nt, ConcurrentModificationError as o, serializeCanonicalJson as on, DateAttribute as ot, NotImplementedError as p, evaluateComputedFormula as pn, Location as pt, isValidationError as q, hasOptions as qt, AttributeNotFoundError as r, NonJsonValueError as rn, CheckboxAttribute as rt, DestructiveSyncNotAllowedError as s, serializeStableJson as sn, DateFormat as st, AccessDeniedError as t, generateId as tn, BaseAttribute as tt, MemoryNotFoundError as u, ComputedFunctionMetadata as un, DocumentAttribute as ut, ProtectedRoleError as v, inferRollupReturnType as vn, NumberAttribute as vt, RecordReferencedError as w, ComputedDependencyGraphNode as wn, RelationAttribute as wt, RealtimeSubscriptionError as x, ComputedCompileAttribute as xn, Phone as xt, RealtimeDeliveryError as y, rollupToFormulaExpression as yn, NumberUnit as yt, ValidationError as z, ComputedFormulaAstNode as zn, isAttributeSortable as zt };
@@ -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-B3WE8Upv.mjs";
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 };
2
+ import { A as SchemaErrorCode, B as ValidationErrorDetail, C as RecordReference, D as ReservedObjectNameError, E as RepositoryOperation, F as SyncCascadeError, G as isRecordReferencedError, H as isNotFoundError, I as SyncConflictError, K as isSchemaError, L as SyncError, M as SearchBackendError, N as StorageError, O as RoleNotFoundError, P as StorageOperation, R as SystemEntityImmutableError, S as RecordNotFoundError, T as RepositoryError, U as isObjectReferencedError, V as isAttributeInUseError, W as isProtectedResourceError, _ as ProtectedResourceError, a as ChangeTypeNotSupportedError, b as RealtimeRateLimitedError, c as DuplicateError, d as MigrationTimeoutError, f as NotFoundError, g as OrphanSystemAttributeError, h as ObjectReferencedError, i as AttributeUsage, j as SchemaPlanNotFoundError, k as SchemaError, l as ForbiddenError, m as ObjectNotFoundError, n as AttributeInUseError, o as ConcurrentModificationError, p as NotImplementedError, q as isValidationError, r as AttributeNotFoundError, s as DestructiveSyncNotAllowedError, t as AccessDeniedError, u as MemoryNotFoundError, v as ProtectedRoleError, w as RecordReferencedError, x as RealtimeSubscriptionError, y as RealtimeDeliveryError, z as ValidationError } from "./exceptions-S2lmNz74.mjs";
3
+ export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, AttributeUsage, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RealtimeDeliveryError, RealtimeRateLimitedError, RealtimeSubscriptionError, 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-B3WE8Upv.js";
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 };
2
+ import { A as SchemaErrorCode, B as ValidationErrorDetail, C as RecordReference, D as ReservedObjectNameError, E as RepositoryOperation, F as SyncCascadeError, G as isRecordReferencedError, H as isNotFoundError, I as SyncConflictError, K as isSchemaError, L as SyncError, M as SearchBackendError, N as StorageError, O as RoleNotFoundError, P as StorageOperation, R as SystemEntityImmutableError, S as RecordNotFoundError, T as RepositoryError, U as isObjectReferencedError, V as isAttributeInUseError, W as isProtectedResourceError, _ as ProtectedResourceError, a as ChangeTypeNotSupportedError, b as RealtimeRateLimitedError, c as DuplicateError, d as MigrationTimeoutError, f as NotFoundError, g as OrphanSystemAttributeError, h as ObjectReferencedError, i as AttributeUsage, j as SchemaPlanNotFoundError, k as SchemaError, l as ForbiddenError, m as ObjectNotFoundError, n as AttributeInUseError, o as ConcurrentModificationError, p as NotImplementedError, q as isValidationError, r as AttributeNotFoundError, s as DestructiveSyncNotAllowedError, t as AccessDeniedError, u as MemoryNotFoundError, v as ProtectedRoleError, w as RecordReferencedError, x as RealtimeSubscriptionError, y as RealtimeDeliveryError, z as ValidationError } from "./exceptions-S2lmNz74.js";
3
+ export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, AttributeUsage, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RealtimeDeliveryError, RealtimeRateLimitedError, RealtimeSubscriptionError, 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`,INVALID_TOOL_INPUT:`INVALID_TOOL_INPUT`,DEVICE_NOT_FOUND:`DEVICE_NOT_FOUND`,DEVICE_OFFLINE:`DEVICE_OFFLINE`,DEVICE_CAPABILITY_MISMATCH:`DEVICE_CAPABILITY_MISMATCH`,DEVICE_CHANNEL_PROTOCOL:`DEVICE_CHANNEL_PROTOCOL`,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_DECISION_FAILED:`AI_DECISION_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
- `);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;
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`,AGENT_EXECUTION_CANCELLED:`AGENT_EXECUTION_CANCELLED`,AGENT_EXECUTION_TIMEOUT:`AGENT_EXECUTION_TIMEOUT`,AGENT_EXTERNAL_OUTCOME_UNKNOWN:`AGENT_EXTERNAL_OUTCOME_UNKNOWN`,AGENT_TOOL_CANCELLATION_POLICY:`AGENT_TOOL_CANCELLATION_POLICY`,AGENT_CANCELLATION_WATCH_CAPACITY:`AGENT_CANCELLATION_WATCH_CAPACITY`,AGENT_CANCELLATION_CLEANUP:`AGENT_CANCELLATION_CLEANUP`,DEVICE_NOT_FOUND:`DEVICE_NOT_FOUND`,DEVICE_OFFLINE:`DEVICE_OFFLINE`,DEVICE_CAPABILITY_MISMATCH:`DEVICE_CAPABILITY_MISMATCH`,DEVICE_CHANNEL_PROTOCOL:`DEVICE_CHANNEL_PROTOCOL`,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_DECISION_FAILED:`AI_DECISION_FAILED`,AI_IMAGE_USAGE_PENDING:`AI_IMAGE_USAGE_PENDING`,AI_IMAGE_GENERATION_INDETERMINATE:`AI_IMAGE_GENERATION_INDETERMINATE`,AI_IMAGE_RESERVATION_CLEANUP_INDETERMINATE:`AI_IMAGE_RESERVATION_CLEANUP_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
+ `);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,r){super(`Cannot delete attribute "${t}": used in ${n}${r===void 0?``:` ${r}`}`,e.ATTRIBUTE_IN_USE,{attributeName:t,usage:n,...r===void 0?{}:{location:r}}),this.name=`AttributeInUseError`,this.attributeName=t,this.usage=n,this.location=r}},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}},RealtimeRateLimitedError=class extends SchemaError{constructor(){super(`Supabase Realtime delivery was rate limited`,e.REALTIME_RATE_LIMITED),this.name=`RealtimeRateLimitedError`}},RealtimeDeliveryError=class extends SchemaError{constructor(){super(`Supabase Realtime delivery failed`,e.REALTIME_DELIVERY_FAILED),this.name=`RealtimeDeliveryError`}},RealtimeSubscriptionError=class extends SchemaError{constructor(){super(`Supabase Realtime subscription failed`,e.REALTIME_SUBSCRIPTION_FAILED),this.name=`RealtimeSubscriptionError`}};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.RealtimeDeliveryError=RealtimeDeliveryError,exports.RealtimeRateLimitedError=RealtimeRateLimitedError,exports.RealtimeSubscriptionError=RealtimeSubscriptionError,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`,INVALID_TOOL_INPUT:`INVALID_TOOL_INPUT`,DEVICE_NOT_FOUND:`DEVICE_NOT_FOUND`,DEVICE_OFFLINE:`DEVICE_OFFLINE`,DEVICE_CAPABILITY_MISMATCH:`DEVICE_CAPABILITY_MISMATCH`,DEVICE_CHANNEL_PROTOCOL:`DEVICE_CHANNEL_PROTOCOL`,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_DECISION_FAILED:`AI_DECISION_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
- `);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};
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`,AGENT_EXECUTION_CANCELLED:`AGENT_EXECUTION_CANCELLED`,AGENT_EXECUTION_TIMEOUT:`AGENT_EXECUTION_TIMEOUT`,AGENT_EXTERNAL_OUTCOME_UNKNOWN:`AGENT_EXTERNAL_OUTCOME_UNKNOWN`,AGENT_TOOL_CANCELLATION_POLICY:`AGENT_TOOL_CANCELLATION_POLICY`,AGENT_CANCELLATION_WATCH_CAPACITY:`AGENT_CANCELLATION_WATCH_CAPACITY`,AGENT_CANCELLATION_CLEANUP:`AGENT_CANCELLATION_CLEANUP`,DEVICE_NOT_FOUND:`DEVICE_NOT_FOUND`,DEVICE_OFFLINE:`DEVICE_OFFLINE`,DEVICE_CAPABILITY_MISMATCH:`DEVICE_CAPABILITY_MISMATCH`,DEVICE_CHANNEL_PROTOCOL:`DEVICE_CHANNEL_PROTOCOL`,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_DECISION_FAILED:`AI_DECISION_FAILED`,AI_IMAGE_USAGE_PENDING:`AI_IMAGE_USAGE_PENDING`,AI_IMAGE_GENERATION_INDETERMINATE:`AI_IMAGE_GENERATION_INDETERMINATE`,AI_IMAGE_RESERVATION_CLEANUP_INDETERMINATE:`AI_IMAGE_RESERVATION_CLEANUP_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
+ `);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,r){super(`Cannot delete attribute "${t}": used in ${n}${r===void 0?``:` ${r}`}`,e.ATTRIBUTE_IN_USE,{attributeName:t,usage:n,...r===void 0?{}:{location:r}}),this.name=`AttributeInUseError`,this.attributeName=t,this.usage=n,this.location=r}},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}},RealtimeRateLimitedError=class extends SchemaError{constructor(){super(`Supabase Realtime delivery was rate limited`,e.REALTIME_RATE_LIMITED),this.name=`RealtimeRateLimitedError`}},RealtimeDeliveryError=class extends SchemaError{constructor(){super(`Supabase Realtime delivery failed`,e.REALTIME_DELIVERY_FAILED),this.name=`RealtimeDeliveryError`}},RealtimeSubscriptionError=class extends SchemaError{constructor(){super(`Supabase Realtime subscription failed`,e.REALTIME_SUBSCRIPTION_FAILED),this.name=`RealtimeSubscriptionError`}};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,RealtimeDeliveryError,RealtimeRateLimitedError,RealtimeSubscriptionError,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-B3WE8Upv.js";
2
+ import { Q as Attribute, et as AttributeType } from "./exceptions-S2lmNz74.mjs";
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,5 +1,5 @@
1
1
 
2
- import { Y as Attribute, Z as AttributeType } from "./exceptions-B3WE8Upv.mjs";
2
+ import { Q as Attribute, et as AttributeType } from "./exceptions-S2lmNz74.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-B3WE8Upv.js";
3
- import { i as ValidationResult, r as ValidationMessages } from "./index-D4Fo465g.js";
2
+ import { Q as Attribute, Y as MigrationDefinition, Zt as Uuid } from "./exceptions-S2lmNz74.js";
3
+ import { i as ValidationResult, r as ValidationMessages } from "./index-TBK4s5wH.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,5 +1,5 @@
1
1
 
2
- import { Y as Attribute } from "./exceptions-B3WE8Upv.mjs";
2
+ import { Q as Attribute } from "./exceptions-S2lmNz74.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 } from "./exceptions-B3WE8Upv.js";
2
+ import { Q as Attribute } from "./exceptions-S2lmNz74.js";
3
3
  import { z as z$1 } from "zod";
4
4
  //#region src/validation/core/types.d.ts
5
5
  /**
@@ -1,6 +1,6 @@
1
1
 
2
- import { Jt as Uuid, K as MigrationDefinition, Y as Attribute } from "./exceptions-B3WE8Upv.mjs";
3
- import { i as ValidationResult, r as ValidationMessages } from "./index-nzT7sEBR.mjs";
2
+ import { Q as Attribute, Y as MigrationDefinition, Zt as Uuid } from "./exceptions-S2lmNz74.mjs";
3
+ import { i as ValidationResult, r as ValidationMessages } from "./index-DkmrYLFg.mjs";
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