@standards/schema 1.0.0-alpha.382 → 1.0.0-alpha.385

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 (158) hide show
  1. package/dist/{all-BgYwavNm.d.mts → all-Czr26_QP.d.ts} +1115 -1116
  2. package/dist/{all-DjdKldjX.d.ts → all-DIAipZSx.d.mts} +1115 -1116
  3. package/dist/api/index.d.mts +2986 -2923
  4. package/dist/api/index.d.ts +2986 -2923
  5. package/dist/api/index.js +1 -1
  6. package/dist/api/index.mjs +1 -1
  7. package/dist/attribute-validators-COsyRG9V.mjs +11 -0
  8. package/dist/attribute-validators-CQEf6iqM.js +11 -0
  9. package/dist/{attributes-kAhQzg8-.d.ts → attributes-BcA_reJZ.d.ts} +58 -59
  10. package/dist/{attributes-aTeqx6cK.d.mts → attributes-eqr1vdPP.d.mts} +58 -59
  11. package/dist/checkbox-C9aJ-6gq.d.ts +10 -0
  12. package/dist/checkbox-DfXrFM2z.d.mts +10 -0
  13. package/dist/config-C1CDWJf8.mjs +2 -0
  14. package/dist/config-DUQAd-Ur.js +2 -0
  15. package/dist/{core-397tQy5q.js → core-DAxRlJ5i.js} +1 -1
  16. package/dist/{core-BLHhNykL.mjs → core-rKI7Q9_U.mjs} +1 -1
  17. package/dist/{date-D007KyTI.d.ts → date-BzggmHjS.d.mts} +5 -6
  18. package/dist/{date-CxqDOhA0.d.mts → date-CdaoV9_L.d.ts} +5 -6
  19. package/dist/{exceptions-DjPVyS-Q.d.mts → exceptions-CgzBcQIl.d.mts} +70 -70
  20. package/dist/{exceptions-DjPVyS-Q.d.ts → exceptions-CgzBcQIl.d.ts} +70 -70
  21. package/dist/exceptions.d.mts +1 -1
  22. package/dist/exceptions.d.ts +1 -1
  23. package/dist/exceptions.js +1 -1
  24. package/dist/exceptions.mjs +1 -1
  25. package/dist/{index-CiTBL4gH.d.ts → index-BSYjSdhW.d.mts} +17 -18
  26. package/dist/{index-DLO8JpnY.d.ts → index-CCH94vyR.d.ts} +6 -7
  27. package/dist/{index-DPO5w-fC.d.mts → index-D1iR2xuc.d.ts} +17 -18
  28. package/dist/{index-D7TEaPqX.d.ts → index-DFQSFYiY.d.mts} +2863 -2790
  29. package/dist/{index-DwQWBzYJ.d.mts → index-DKjcsjFG.d.ts} +2863 -2790
  30. package/dist/{index-Bu9xF5Nq.d.ts → index-e1Oh8ngS.d.ts} +78 -78
  31. package/dist/{index-BmNMneu3.d.mts → index-jDwfdudj.d.mts} +78 -78
  32. package/dist/{index-3HZjBOpj.d.mts → index-zJz3LbXr.d.mts} +6 -7
  33. package/dist/index.d.mts +14 -14
  34. package/dist/index.d.ts +14 -14
  35. package/dist/index.js +1 -1
  36. package/dist/index.mjs +1 -1
  37. package/dist/number-B3u9vPtb.d.ts +10 -0
  38. package/dist/number-Br56q0hL.d.mts +10 -0
  39. package/dist/object-BF5y6bgs.mjs +4 -0
  40. package/dist/object-Kx-ADbIo.js +4 -0
  41. package/dist/{objects-B4DgFZ82.d.ts → objects-CLxyZh-U.d.ts} +66 -57
  42. package/dist/{objects-C9f6hFW_.d.mts → objects-DxEMaC2Z.d.mts} +66 -57
  43. package/dist/phone-BGJea5sr.mjs +2 -0
  44. package/dist/phone-DrHyIujN.js +2 -0
  45. package/dist/record-aggregates-Cj3p3_ce.js +2 -0
  46. package/dist/{record-aggregates-CzG86pUS.mjs → record-aggregates-DQXrIuGE.mjs} +1 -1
  47. package/dist/record-operation-7-DRRONb.mjs +2 -0
  48. package/dist/record-operation-Bbn-LZhq.js +2 -0
  49. package/dist/text-2DB_Jc_x.js +2 -0
  50. package/dist/text-BaxaZ5Vv.mjs +2 -0
  51. package/dist/text-Bvk4ila8.d.ts +10 -0
  52. package/dist/text-C5NnfCJg.d.mts +10 -0
  53. package/dist/{utils-gY3d9Dwp.js → utils-B-gGq3FS.js} +1 -1
  54. package/dist/{utils-B7Dlrtnx.d.ts → utils-B2bq4zLb.d.ts} +15 -16
  55. package/dist/{utils-DbRMK8NI.d.mts → utils-CRx-eR8T.d.mts} +15 -16
  56. package/dist/{utils-fXIvFFl6.mjs → utils-DaejNWxh.mjs} +1 -1
  57. package/dist/utils.d.mts +1 -1
  58. package/dist/utils.d.ts +1 -1
  59. package/dist/utils.js +1 -1
  60. package/dist/utils.mjs +1 -1
  61. package/dist/validation/all.d.mts +4 -4
  62. package/dist/validation/all.d.ts +4 -4
  63. package/dist/validation/all.js +1 -1
  64. package/dist/validation/all.mjs +1 -1
  65. package/dist/validation/complex/currency.d.mts +4 -4
  66. package/dist/validation/complex/currency.d.ts +4 -4
  67. package/dist/validation/complex/currency.js +1 -1
  68. package/dist/validation/complex/currency.mjs +1 -1
  69. package/dist/validation/complex/location.d.mts +4 -4
  70. package/dist/validation/complex/location.d.ts +4 -4
  71. package/dist/validation/complex/location.js +1 -1
  72. package/dist/validation/complex/location.mjs +1 -1
  73. package/dist/validation/complex/phone.d.mts +4 -4
  74. package/dist/validation/complex/phone.d.ts +4 -4
  75. package/dist/validation/complex/phone.js +1 -1
  76. package/dist/validation/complex/phone.mjs +1 -1
  77. package/dist/validation/complex/relation.d.mts +6 -6
  78. package/dist/validation/complex/relation.d.ts +6 -6
  79. package/dist/validation/complex/relation.js +1 -1
  80. package/dist/validation/complex/relation.mjs +1 -1
  81. package/dist/validation/complex/richtext.d.mts +4 -4
  82. package/dist/validation/complex/richtext.d.ts +4 -4
  83. package/dist/validation/complex/richtext.js +1 -1
  84. package/dist/validation/complex/richtext.mjs +1 -1
  85. package/dist/validation/complex/select.d.mts +6 -6
  86. package/dist/validation/complex/select.d.ts +6 -6
  87. package/dist/validation/complex/select.js +1 -1
  88. package/dist/validation/complex/select.mjs +1 -1
  89. package/dist/validation/complex/user.d.mts +4 -4
  90. package/dist/validation/complex/user.d.ts +4 -4
  91. package/dist/validation/complex/user.js +1 -1
  92. package/dist/validation/complex/user.mjs +1 -1
  93. package/dist/validation/computed/formula.d.mts +4 -4
  94. package/dist/validation/computed/formula.d.ts +4 -4
  95. package/dist/validation/computed/formula.js +1 -1
  96. package/dist/validation/computed/formula.mjs +1 -1
  97. package/dist/validation/computed/rollup.d.mts +4 -4
  98. package/dist/validation/computed/rollup.d.ts +4 -4
  99. package/dist/validation/computed/rollup.js +1 -1
  100. package/dist/validation/computed/rollup.mjs +1 -1
  101. package/dist/validation/config/index.d.mts +1 -1
  102. package/dist/validation/config/index.d.ts +1 -1
  103. package/dist/validation/config/index.js +1 -1
  104. package/dist/validation/config/index.mjs +1 -1
  105. package/dist/validation/core/index.d.mts +1 -1
  106. package/dist/validation/core/index.d.ts +1 -1
  107. package/dist/validation/core/index.js +1 -1
  108. package/dist/validation/core/index.mjs +1 -1
  109. package/dist/validation/object/index.d.mts +1 -1
  110. package/dist/validation/object/index.d.ts +1 -1
  111. package/dist/validation/object/index.js +1 -1
  112. package/dist/validation/object/index.mjs +1 -1
  113. package/dist/validation/primitives/checkbox.d.mts +1 -1
  114. package/dist/validation/primitives/checkbox.d.ts +1 -1
  115. package/dist/validation/primitives/checkbox.js +1 -1
  116. package/dist/validation/primitives/checkbox.mjs +1 -1
  117. package/dist/validation/primitives/date.d.mts +1 -1
  118. package/dist/validation/primitives/date.d.ts +1 -1
  119. package/dist/validation/primitives/date.js +1 -1
  120. package/dist/validation/primitives/date.mjs +1 -1
  121. package/dist/validation/primitives/number.d.mts +1 -1
  122. package/dist/validation/primitives/number.d.ts +1 -1
  123. package/dist/validation/primitives/number.js +1 -1
  124. package/dist/validation/primitives/number.mjs +1 -1
  125. package/dist/validation/primitives/text.d.mts +1 -1
  126. package/dist/validation/primitives/text.d.ts +1 -1
  127. package/dist/validation/primitives/text.js +1 -1
  128. package/dist/validation/primitives/text.mjs +1 -1
  129. package/dist/view-config.schema-BOuNAZ5T.js +2 -0
  130. package/dist/view-config.schema-Dl5GkAzl.mjs +2 -0
  131. package/dist/zod-locale-D_QkXhnp.d.mts +2 -0
  132. package/dist/zod-locale-D_QkXhnp.d.ts +2 -0
  133. package/dist/zod-locale.d.mts +2 -0
  134. package/dist/zod-locale.d.ts +2 -0
  135. package/dist/zod-locale.js +2 -0
  136. package/dist/zod-locale.mjs +2 -0
  137. package/package.json +17 -3
  138. package/dist/attribute-validators-DRqhAt2t.mjs +0 -11
  139. package/dist/attribute-validators-WAoJbap5.js +0 -11
  140. package/dist/checkbox-BZvZOraX.d.mts +0 -11
  141. package/dist/checkbox-n0YV1O13.d.ts +0 -11
  142. package/dist/config-BIxnbUN8.mjs +0 -2
  143. package/dist/config-DdjlHdPg.js +0 -2
  144. package/dist/number-CgBxEbjI.d.mts +0 -11
  145. package/dist/number-DncH-WRO.d.ts +0 -11
  146. package/dist/object-DcgxLvip.js +0 -4
  147. package/dist/object-Dzl7sfq8.mjs +0 -4
  148. package/dist/phone-BB-tzcSr.js +0 -2
  149. package/dist/phone-Bca_xiOX.mjs +0 -2
  150. package/dist/record-aggregates-DwpIJ2Dv.js +0 -2
  151. package/dist/record-operation-BSXczk7v.js +0 -2
  152. package/dist/record-operation-C9oXHmfF.mjs +0 -2
  153. package/dist/text-A9AJ1wUO.js +0 -2
  154. package/dist/text-C8Lb-NFo.mjs +0 -2
  155. package/dist/text-DDoY_LcQ.d.ts +0 -11
  156. package/dist/text-DeUqCFp9.d.mts +0 -11
  157. package/dist/view-config.schema-BQ9tU_9G.js +0 -2
  158. package/dist/view-config.schema-BmjCQJ51.mjs +0 -2
@@ -0,0 +1,4 @@
1
+ /*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ const e=require("./exceptions.js"),t=require("./zod-locale.js"),n=require("./text-2DB_Jc_x.js"),r=require("./core-DAxRlJ5i.js"),i=require("./validation/primitives/number.js"),a=require("./validation/primitives/checkbox.js"),o=require("./validation/primitives/date.js"),s=require("./validation/complex/currency.js"),c=require("./validation/complex/location.js"),l=require("./phone-DrHyIujN.js"),u=require("./validation/complex/relation.js"),d=require("./validation/complex/richtext.js"),f=require("./validation/complex/select.js"),p=require("./validation/complex/user.js"),m=require("./validation/computed/formula.js"),h=require("./validation/computed/rollup.js");let g=require("zod");g=t.__toESM(g);function isNullishOrEmptyString(e){return e==null||e===``}function isValuePresent(e){return e==null?!1:typeof e==`string`?e.trim()!==``:!Array.isArray(e)||e.length>0}const _={phone:[`countryCode`]};function isEmptyValue(e,t=[]){return e==null||typeof e==`string`&&e.trim()===``?!0:e instanceof Date?!1:typeof e==`object`&&!Array.isArray(e)&&Object.entries(e).filter(([e])=>!t.includes(e)).every(([,e])=>e==null||typeof e==`string`&&e.trim()===``)}function withEmptyToNull(e,t){return g.preprocess(e=>isEmptyValue(e,t)?null:e,e.nullish())}function createAttributeValidator(e,t=r.DEFAULT_VALIDATION_MESSAGES){switch(e.type){case`text`:return n.createTextValidator(e,t);case`richtext`:return d.createRichtextValidator(e,t);case`number`:return i.createNumberValidator(e,t);case`checkbox`:return a.createCheckboxValidator(e,t);case`date`:return o.createDateValidator(e,t);case`phone`:return l.createPhoneValidator(e,t);case`currency`:return s.createCurrencyValidator(e,t);case`status`:return f.createStatusValidator(e,t);case`location`:return c.createLocationValidator(e,t);case`select`:return f.createSelectValidator(e,t);case`multiselect`:return f.createMultiselectValidator(e,t);case`user`:return p.createUserValidator(e,t);case`relation`:return u.createRelationValidator(e,t);case`formula`:return m.createFormulaValidator(e,t);case`rollup`:return h.createRollupValidator(e,t);default:return g.unknown()}}function createFormAttributeValidator(e,t=r.DEFAULT_VALIDATION_MESSAGES){let n=createAttributeValidator(e,t);return e.required?n:withEmptyToNull(n,_[e.type])}const v=new WeakMap,y=new WeakMap;function createObjectValidator(e){let t=v.get(e);if(t)return t;let n={};for(let t of e.attributes){let e=createAttributeValidator(t);t.required?n[t.name]=e.refine(isValuePresent,{message:r.DEFAULT_VALIDATION_MESSAGES.required(t)}):n[t.name]=withEmptyToNull(e,_[t.type])}let i=g.object(n).passthrough();return v.set(e,i),i}function createDraftValidator(e){let t=y.get(e);if(t)return t;let n={};for(let t of e.attributes){let e=createAttributeValidator(t);n[t.name]=withEmptyToNull(e,_[t.type])}let r=g.object(n).passthrough();return y.set(e,r),r}function validateAttribute(e,t){let n=createAttributeValidator(e);if(!e.required&&t==null)return{success:!0,data:{[e.name]:t}};let i=n.safeParse(t);return i.success?{success:!0,data:{[e.name]:i.data}}:{success:!1,errors:r.formatZodErrors(i.error).map(t=>({path:[e.name,...t.path],message:t.message}))}}function validateObject(e,t){let n=createObjectValidator(e).safeParse(t);return n.success?{success:!0,data:n.data}:{success:!1,errors:r.formatZodErrors(n.error)}}function validateObjectOrThrow(t,n){let r=validateObject(t,n);if(!r.success){let n=r.errors??[],i=n.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`
3
+ `)||`Unknown validation error`;throw new e.ValidationError(`Validation failed for ${t.label}:\n${i}`,n.map(e=>({path:e.path,message:e.message})))}return r.data}function validateDraft(e,t){let n=createDraftValidator(e).safeParse(t);return n.success?{success:!0,data:n.data}:{success:!1,errors:r.formatZodErrors(n.error)}}function validateDraftOrThrow(t,n){let r=validateDraft(t,n);if(!r.success){let n=r.errors??[],i=n.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`
4
+ `)||`Unknown validation error`;throw new e.ValidationError(`Draft validation failed for ${t.label}:\n${i}`,n.map(e=>({path:e.path,message:e.message})))}return r.data}function rejectUnknownAttributesOrThrow(t,n){let r=new Set(t.attributes.map(e=>e.name)),i=Object.keys(n).filter(e=>!r.has(e));if(i.length>0)throw new e.ValidationError(`Unknown attribute${i.length>1?`s`:``} for ${t.label}: ${i.join(`, `)}`,i.map(e=>({path:[e],message:`Unknown attribute`})))}function getMissingRequiredAttributes(e,t){let n=[];for(let r of e.attributes)r.required&&!isValuePresent(t[r.name])&&n.push(r);return n}function isRecordComplete(e,t){return getMissingRequiredAttributes(e,t).length>0?!1:validateObject(e,t).success}Object.defineProperty(exports,"createAttributeValidator",{enumerable:!0,get:function(){return createAttributeValidator}}),Object.defineProperty(exports,"createDraftValidator",{enumerable:!0,get:function(){return createDraftValidator}}),Object.defineProperty(exports,"createFormAttributeValidator",{enumerable:!0,get:function(){return createFormAttributeValidator}}),Object.defineProperty(exports,"createObjectValidator",{enumerable:!0,get:function(){return createObjectValidator}}),Object.defineProperty(exports,"getMissingRequiredAttributes",{enumerable:!0,get:function(){return getMissingRequiredAttributes}}),Object.defineProperty(exports,"isEmptyValue",{enumerable:!0,get:function(){return isEmptyValue}}),Object.defineProperty(exports,"isNullishOrEmptyString",{enumerable:!0,get:function(){return isNullishOrEmptyString}}),Object.defineProperty(exports,"isRecordComplete",{enumerable:!0,get:function(){return isRecordComplete}}),Object.defineProperty(exports,"isValuePresent",{enumerable:!0,get:function(){return isValuePresent}}),Object.defineProperty(exports,"rejectUnknownAttributesOrThrow",{enumerable:!0,get:function(){return rejectUnknownAttributesOrThrow}}),Object.defineProperty(exports,"validateAttribute",{enumerable:!0,get:function(){return validateAttribute}}),Object.defineProperty(exports,"validateDraft",{enumerable:!0,get:function(){return validateDraft}}),Object.defineProperty(exports,"validateDraftOrThrow",{enumerable:!0,get:function(){return validateDraftOrThrow}}),Object.defineProperty(exports,"validateObject",{enumerable:!0,get:function(){return validateObject}}),Object.defineProperty(exports,"validateObjectOrThrow",{enumerable:!0,get:function(){return validateObjectOrThrow}});
@@ -1,22 +1,32 @@
1
1
 
2
- import { r as Uuid } from "./utils-B7Dlrtnx.js";
3
- import { n as Attribute } from "./attributes-kAhQzg8-.js";
2
+ import { Uuid } from "./utils-B2bq4zLb.js";
3
+ import { Attribute } from "./attributes-BcA_reJZ.js";
4
4
  import { ColorId, IconName } from "@standards/constants";
5
5
  //#region src/types/appearance.d.ts
6
6
  /** Icon used when neither the entity nor its parent has one. */
7
- declare const DEFAULT_APPEARANCE_ICON: IconName;
8
- declare const IMAGE_SHAPES: readonly ["circle", "square"];
9
- type ImageShape = (typeof IMAGE_SHAPES)[number];
7
+ export declare const DEFAULT_APPEARANCE_ICON: IconName;
8
+ export declare const IMAGE_SHAPES: readonly ["circle", "square"];
9
+ export type ImageShape = (typeof IMAGE_SHAPES)[number];
10
+ /**
11
+ * How an object's records wear an image (#5785 §2): the crop, and where the
12
+ * image may be found — an ordered fallback list of the object's `text`
13
+ * attributes, whose lookup kind is inferred (`text().url()` a website,
14
+ * `text().email()` an email, any other `text()` a name).
15
+ */
16
+ export interface ObjectImage {
17
+ shape: ImageShape;
18
+ from?: readonly string[];
19
+ }
10
20
  /** The one appearance shape: every entity stores the facets it accepts. */
11
- interface Appearance {
21
+ export interface Appearance {
12
22
  icon?: IconName;
13
23
  color?: ColorId;
14
24
  imageFileId?: Uuid;
15
25
  }
16
- type AppearanceFacet = "icon" | "color" | "image";
17
- type AppearanceEntity = "object" | "record" | "emailCategory" | "option" | "view" | "agent" | "user";
18
- declare const APPEARANCE_FACETS: Record<AppearanceEntity, readonly AppearanceFacet[]>;
19
- type ResolvedAppearance = {
26
+ export type AppearanceFacet = "icon" | "color" | "image";
27
+ export type AppearanceEntity = "object" | "record" | "emailCategory" | "option" | "view" | "agent" | "user";
28
+ export declare const APPEARANCE_FACETS: Record<AppearanceEntity, readonly AppearanceFacet[]>;
29
+ export type ResolvedAppearance = {
20
30
  kind: "image";
21
31
  imageFileId: Uuid;
22
32
  shape: ImageShape;
@@ -32,16 +42,16 @@ type Named = Appearance & {
32
42
  name?: string;
33
43
  };
34
44
  /** Image wins; else an icon in a colour (own, parent's or derived from the name) is a tile, without colour a glyph. */
35
- declare function resolveAppearance(entity: Named, parent?: Named & {
36
- imageShape?: ImageShape;
45
+ export declare function resolveAppearance(entity: Named, parent?: Named & {
46
+ image?: Pick<ObjectImage, "shape">;
37
47
  }): ResolvedAppearance;
38
48
  //#endregion
39
49
  //#region src/types/document-layout.d.ts
40
- interface DocumentLayout {
50
+ export interface DocumentLayout {
41
51
  /** Dev-declared folder structures the user can instantiate via the UI inside a record's drive. */
42
52
  presets?: FolderPreset[];
43
53
  }
44
- interface FolderPreset {
54
+ export interface FolderPreset {
45
55
  id: string;
46
56
  label: string;
47
57
  icon?: IconName;
@@ -50,13 +60,13 @@ interface FolderPreset {
50
60
  /** When true, this preset is auto-instantiated on every new record's drive for the owning object. */
51
61
  autoInstantiate?: boolean;
52
62
  }
53
- interface PresetNode {
63
+ export interface PresetNode {
54
64
  title: string;
55
65
  description?: string;
56
66
  children?: PresetNode[];
57
67
  }
58
68
  /** Max depth allowed for preset.structure to keep instantiation predictable. */
59
- declare const MAX_PRESET_DEPTH = 5;
69
+ export declare const MAX_PRESET_DEPTH = 5;
60
70
  //#endregion
61
71
  //#region src/types/record-access.d.ts
62
72
  /**
@@ -64,17 +74,17 @@ declare const MAX_PRESET_DEPTH = 5;
64
74
  * 2026-10-08 §3.2): `reader` sees, `runner` also uses (agents only),
65
75
  * `editor` also modifies and manages the grants.
66
76
  */
67
- declare const ACCESS_ROLES: readonly ["reader", "runner", "editor"];
68
- type AccessRole = (typeof ACCESS_ROLES)[number];
77
+ export declare const ACCESS_ROLES: readonly ["reader", "runner", "editor"];
78
+ export type AccessRole = (typeof ACCESS_ROLES)[number];
69
79
  /** Roles a record access grant can carry (spec 2026-09-25 §5.1): a record is never "used". */
70
- declare const RECORD_ACCESS_ROLES: readonly ["reader", "editor"];
71
- type RecordAccessRole = (typeof RECORD_ACCESS_ROLES)[number];
80
+ export declare const RECORD_ACCESS_ROLES: readonly ["reader", "editor"];
81
+ export type RecordAccessRole = (typeof RECORD_ACCESS_ROLES)[number];
72
82
  /**
73
83
  * Why a grant exists — the equivalent of Salesforce's `RowCause` (spec §3):
74
84
  * automatic grants are recomputed without ever touching manual shares.
75
85
  */
76
- declare const RECORD_ACCESS_SOURCES: readonly ["manual", "meeting_attendee"];
77
- type RecordAccessSource = (typeof RECORD_ACCESS_SOURCES)[number];
86
+ export declare const RECORD_ACCESS_SOURCES: readonly ["manual", "meeting_attendee"];
87
+ export type RecordAccessSource = (typeof RECORD_ACCESS_SOURCES)[number];
78
88
  /**
79
89
  * Agent-internal objects whose records are never shared (spec 2026-09-25
80
90
  * §5.3.4): the memory resolver reads "private and visible" as "mine", and an
@@ -82,19 +92,19 @@ type RecordAccessSource = (typeof RECORD_ACCESS_SOURCES)[number];
82
92
  * A constant in v1 — a definition flag would mean editing native objects. The
83
93
  * server refuses them; the UI hides the share control for them.
84
94
  */
85
- declare const UNSHAREABLE_OBJECT_NAMES: ReadonlySet<string>;
95
+ export declare const UNSHAREABLE_OBJECT_NAMES: ReadonlySet<string>;
86
96
  /** What the reading actor may do with a resource (spec §6.6); records never produce `runner`. */
87
- type ViewerAccess = "owner" | "editor" | "runner" | "reader" | "workspace";
97
+ export type ViewerAccess = "owner" | "editor" | "runner" | "reader" | "workspace";
88
98
  /** One beneficiary of a private resource: its effective role and every source that grants it. */
89
- interface ResourceAccessGrant<TRole extends AccessRole = AccessRole, TSource extends string = RecordAccessSource> {
99
+ export interface ResourceAccessGrant<TRole extends AccessRole = AccessRole, TSource extends string = RecordAccessSource> {
90
100
  actorId: Uuid;
91
101
  role: TRole;
92
102
  sources: TSource[];
93
103
  }
94
104
  /** One beneficiary of a private record (shape unchanged since 2026-09-25, D11). */
95
- type RecordAudienceGrant = ResourceAccessGrant<RecordAccessRole, RecordAccessSource>;
105
+ export type RecordAudienceGrant = ResourceAccessGrant<RecordAccessRole, RecordAccessSource>;
96
106
  /** Who can reach a record beyond its owner (`GET /records/:object/:id/access`). */
97
- interface RecordAudience {
107
+ export interface RecordAudience {
98
108
  recordId: Uuid;
99
109
  visibility: ResourceVisibility;
100
110
  ownedBy: Uuid | null;
@@ -103,7 +113,7 @@ interface RecordAudience {
103
113
  grants: RecordAudienceGrant[];
104
114
  }
105
115
  /** Who can reach an agent definition beyond its owner (`GET /agents/definitions/:id/access`). */
106
- interface AgentDefinitionAudience {
116
+ export interface AgentDefinitionAudience {
107
117
  definitionId: string;
108
118
  visibility: ResourceVisibility;
109
119
  ownedBy: Uuid | null;
@@ -112,7 +122,7 @@ interface AgentDefinitionAudience {
112
122
  grants: ResourceAccessGrant<AccessRole, "manual">[];
113
123
  }
114
124
  /** Who can reach a private page beyond its owner (`GET /pages/:id/access`). */
115
- interface PageAudience {
125
+ export interface PageAudience {
116
126
  pageId: Uuid;
117
127
  visibility: ResourceVisibility;
118
128
  ownedBy: Uuid | null;
@@ -121,7 +131,7 @@ interface PageAudience {
121
131
  grants: ResourceAccessGrant<RecordAccessRole, "manual">[];
122
132
  }
123
133
  /** The resource an access operation addresses. */
124
- type ResourceAccessTarget = {
134
+ export type ResourceAccessTarget = {
125
135
  kind: "record";
126
136
  object: string;
127
137
  id: string;
@@ -133,18 +143,18 @@ type ResourceAccessTarget = {
133
143
  id: string;
134
144
  };
135
145
  /** Narrow an untrusted value (HTTP body, CLI flag) to a record grant role. */
136
- declare function parseRecordAccessRole(value: unknown): RecordAccessRole;
146
+ export declare function parseRecordAccessRole(value: unknown): RecordAccessRole;
137
147
  /** Narrow an untrusted value to an agent definition grant role. */
138
- declare function parseAgentDefinitionAccessRole(value: unknown): AccessRole;
148
+ export declare function parseAgentDefinitionAccessRole(value: unknown): AccessRole;
139
149
  /** Narrow an untrusted value to a page grant role: a page is read or edited, never "used". */
140
- declare function parsePageAccessRole(value: unknown): RecordAccessRole;
150
+ export declare function parsePageAccessRole(value: unknown): RecordAccessRole;
141
151
  /**
142
152
  * The single derivation of `viewerAccess`, from the row's owner and the
143
153
  * `viewer_grant` storage computed FOR this viewer. A private resource that is
144
154
  * neither owned nor granted can only have been read by the system reader,
145
155
  * which reads and never writes: `reader`.
146
156
  */
147
- declare function deriveViewerAccess(resource: {
157
+ export declare function deriveViewerAccess(resource: {
148
158
  visibility: ResourceVisibility;
149
159
  ownedBy: string | null;
150
160
  viewerGrant?: AccessRole | null;
@@ -152,8 +162,8 @@ declare function deriveViewerAccess(resource: {
152
162
  //#endregion
153
163
  //#region src/types/objects.d.ts
154
164
  /** Visibility scopes shared by resources that can be workspace-wide or actor-private. */
155
- declare const RESOURCE_VISIBILITIES: readonly ["workspace", "private"];
156
- type ResourceVisibility = (typeof RESOURCE_VISIBILITIES)[number];
165
+ export declare const RESOURCE_VISIBILITIES: readonly ["workspace", "private"];
166
+ export type ResourceVisibility = (typeof RESOURCE_VISIBILITIES)[number];
157
167
  /**
158
168
  * Scope a list-view tab reads. Deliberately a SEPARATE union from
159
169
  * {@link ResourceVisibility}: a stored resource is always exactly one of
@@ -165,13 +175,13 @@ type ResourceVisibility = (typeof RESOURCE_VISIBILITIES)[number];
165
175
  * the viewer (spec 2026-10-08 §5). Never assign a tab scope to a record's
166
176
  * `visibility` column.
167
177
  */
168
- declare const LIST_VIEW_TAB_VISIBILITIES: readonly ["all", "workspace", "private", "shared"];
169
- type ListViewTabVisibility = (typeof LIST_VIEW_TAB_VISIBILITIES)[number];
178
+ export declare const LIST_VIEW_TAB_VISIBILITIES: readonly ["all", "workspace", "private", "shared"];
179
+ export type ListViewTabVisibility = (typeof LIST_VIEW_TAB_VISIBILITIES)[number];
170
180
  /** The exact scope a record list query may impose: a visibility, or `shared` (owned by someone else, granted to me). */
171
- declare const RECORD_LIST_SCOPES: readonly ["workspace", "private", "shared"];
172
- type RecordListScope = (typeof RECORD_LIST_SCOPES)[number];
181
+ export declare const RECORD_LIST_SCOPES: readonly ["workspace", "private", "shared"];
182
+ export type RecordListScope = (typeof RECORD_LIST_SCOPES)[number];
173
183
  /** Narrow an untrusted list scope (HTTP body) or reject it — `all` is a tab value, never a query scope. */
174
- declare function parseRecordListScope(value: unknown): RecordListScope;
184
+ export declare function parseRecordListScope(value: unknown): RecordListScope;
175
185
  /**
176
186
  * Narrow an untrusted value from an edge (HTTP body, CLI flag) to a
177
187
  * {@link ResourceVisibility}, or reject it.
@@ -187,18 +197,18 @@ declare function parseRecordListScope(value: unknown): RecordListScope;
187
197
  * Throws {@link ValidationError} rather than a transport exception so it can
188
198
  * be used below the controller layer; the HTTP filter maps its code to 400.
189
199
  */
190
- declare function parseResourceVisibility(value: unknown): ResourceVisibility;
200
+ export declare function parseResourceVisibility(value: unknown): ResourceVisibility;
191
201
  /**
192
202
  * Timestamps for tracking creation and updates
193
203
  */
194
- interface Timestamps {
204
+ export interface Timestamps {
195
205
  createdAt: Date;
196
206
  updatedAt: Date;
197
207
  }
198
208
  /**
199
209
  * Object definition - Represents a database table/entity
200
210
  */
201
- interface ObjectDefinition {
211
+ export interface ObjectDefinition {
202
212
  id?: Uuid;
203
213
  name: string;
204
214
  label: string;
@@ -206,8 +216,8 @@ interface ObjectDefinition {
206
216
  description?: string;
207
217
  icon?: IconName;
208
218
  color?: ColorId;
209
- /** How the images of this object's records are cropped. */
210
- imageShape?: ImageShape;
219
+ /** How this object's records wear an image: its crop, and where it may be found. */
220
+ image?: ObjectImage;
211
221
  /**
212
222
  * Template expression used to compute the object's display label.
213
223
  * Supports variable interpolation and pipes for formatting.
@@ -255,18 +265,18 @@ interface ObjectDefinition {
255
265
  /**
256
266
  * Links an attribute to an object
257
267
  */
258
- interface ObjectAttribute {
268
+ export interface ObjectAttribute {
259
269
  objectId: Uuid;
260
270
  attributeId: Uuid;
261
271
  order?: number;
262
272
  required?: boolean;
263
273
  }
264
274
  /** A record's own icon and image file (`APPEARANCE_FACETS.record`); each key is absent when unset. */
265
- type RecordAppearance = Pick<Appearance, "icon" | "imageFileId">;
275
+ export type RecordAppearance = Pick<Appearance, "icon" | "imageFileId">;
266
276
  /**
267
277
  * Record - Instance of an Object (a row in the database)
268
278
  */
269
- interface ObjectRecord<TValues extends Record<string, unknown> = Record<string, unknown>> extends Timestamps {
279
+ export interface ObjectRecord<TValues extends Record<string, unknown> = Record<string, unknown>> extends Timestamps {
270
280
  id: Uuid;
271
281
  objectId: Uuid;
272
282
  /**
@@ -362,11 +372,11 @@ interface ObjectRecord<TValues extends Record<string, unknown> = Record<string,
362
372
  * }
363
373
  * ```
364
374
  */
365
- declare const SYSTEM_FIELD_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "visibility", "ownedBy"];
375
+ export declare const SYSTEM_FIELD_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "visibility", "ownedBy"];
366
376
  /**
367
377
  * Type for system field names
368
378
  */
369
- type SystemFieldName = (typeof SYSTEM_FIELD_NAMES)[number];
379
+ export type SystemFieldName = (typeof SYSTEM_FIELD_NAMES)[number];
370
380
  /**
371
381
  * Reserved attribute names that cannot be used for custom attributes.
372
382
  * These names conflict with ObjectRecord properties.
@@ -382,17 +392,16 @@ type SystemFieldName = (typeof SYSTEM_FIELD_NAMES)[number];
382
392
  * }
383
393
  * ```
384
394
  */
385
- declare const RESERVED_ATTRIBUTE_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "visibility", "ownedBy", "objectId", "label", "embeddingText", "values", "metadata", "deletedAt", "deletedBy", "schemaVersion", "appearance", "owned_by"];
395
+ export declare const RESERVED_ATTRIBUTE_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "visibility", "ownedBy", "objectId", "label", "embeddingText", "values", "metadata", "deletedAt", "deletedBy", "schemaVersion", "appearance", "owned_by"];
386
396
  /**
387
397
  * Type for reserved attribute names
388
398
  */
389
- type ReservedAttributeName = (typeof RESERVED_ATTRIBUTE_NAMES)[number];
399
+ export type ReservedAttributeName = (typeof RESERVED_ATTRIBUTE_NAMES)[number];
390
400
  /**
391
401
  * Reserved object names: every framework-native object. They cannot be used
392
402
  * for user-created (runtime) objects, nor declared by a consumer's builder,
393
403
  * registry entry, bundle or schema source — see `native/names.ts`.
394
404
  */
395
- declare const RESERVED_OBJECT_NAMES: readonly ["skill", "memory", "drives", "artifact", "meeting"];
396
- type ReservedObjectName = (typeof RESERVED_OBJECT_NAMES)[number];
397
- //#endregion
398
- export { ResourceAccessGrant as A, MAX_PRESET_DEPTH as B, PageAudience as C, RecordAccessSource as D, RecordAccessRole as E, parseAgentDefinitionAccessRole as F, AppearanceFacet as G, APPEARANCE_FACETS as H, parsePageAccessRole as I, ImageShape as J, DEFAULT_APPEARANCE_ICON as K, parseRecordAccessRole as L, UNSHAREABLE_OBJECT_NAMES as M, ViewerAccess as N, RecordAudience as O, deriveViewerAccess as P, DocumentLayout as R, AgentDefinitionAudience as S, RECORD_ACCESS_SOURCES as T, Appearance as U, PresetNode as V, AppearanceEntity as W, resolveAppearance as X, ResolvedAppearance as Y, Timestamps as _, ObjectRecord as a, ACCESS_ROLES as b, RESERVED_OBJECT_NAMES as c, RecordListScope as d, ReservedAttributeName as f, SystemFieldName as g, SYSTEM_FIELD_NAMES as h, ObjectDefinition as i, ResourceAccessTarget as j, RecordAudienceGrant as k, RESOURCE_VISIBILITIES as l, ResourceVisibility as m, ListViewTabVisibility as n, RECORD_LIST_SCOPES as o, ReservedObjectName as p, IMAGE_SHAPES as q, ObjectAttribute as r, RESERVED_ATTRIBUTE_NAMES as s, LIST_VIEW_TAB_VISIBILITIES as t, RecordAppearance as u, parseRecordListScope as v, RECORD_ACCESS_ROLES as w, AccessRole as x, parseResourceVisibility as y, FolderPreset as z };
405
+ export declare const RESERVED_OBJECT_NAMES: readonly ["skill", "memory", "drives", "artifact", "meeting"];
406
+ export type ReservedObjectName = (typeof RESERVED_OBJECT_NAMES)[number];
407
+ //#endregion
@@ -1,22 +1,32 @@
1
1
 
2
- import { r as Uuid } from "./utils-DbRMK8NI.mjs";
3
- import { n as Attribute } from "./attributes-aTeqx6cK.mjs";
2
+ import { Uuid } from "./utils-CRx-eR8T.mjs";
3
+ import { Attribute } from "./attributes-eqr1vdPP.mjs";
4
4
  import { ColorId, IconName } from "@standards/constants";
5
5
  //#region src/types/appearance.d.ts
6
6
  /** Icon used when neither the entity nor its parent has one. */
7
- declare const DEFAULT_APPEARANCE_ICON: IconName;
8
- declare const IMAGE_SHAPES: readonly ["circle", "square"];
9
- type ImageShape = (typeof IMAGE_SHAPES)[number];
7
+ export declare const DEFAULT_APPEARANCE_ICON: IconName;
8
+ export declare const IMAGE_SHAPES: readonly ["circle", "square"];
9
+ export type ImageShape = (typeof IMAGE_SHAPES)[number];
10
+ /**
11
+ * How an object's records wear an image (#5785 §2): the crop, and where the
12
+ * image may be found — an ordered fallback list of the object's `text`
13
+ * attributes, whose lookup kind is inferred (`text().url()` a website,
14
+ * `text().email()` an email, any other `text()` a name).
15
+ */
16
+ export interface ObjectImage {
17
+ shape: ImageShape;
18
+ from?: readonly string[];
19
+ }
10
20
  /** The one appearance shape: every entity stores the facets it accepts. */
11
- interface Appearance {
21
+ export interface Appearance {
12
22
  icon?: IconName;
13
23
  color?: ColorId;
14
24
  imageFileId?: Uuid;
15
25
  }
16
- type AppearanceFacet = "icon" | "color" | "image";
17
- type AppearanceEntity = "object" | "record" | "emailCategory" | "option" | "view" | "agent" | "user";
18
- declare const APPEARANCE_FACETS: Record<AppearanceEntity, readonly AppearanceFacet[]>;
19
- type ResolvedAppearance = {
26
+ export type AppearanceFacet = "icon" | "color" | "image";
27
+ export type AppearanceEntity = "object" | "record" | "emailCategory" | "option" | "view" | "agent" | "user";
28
+ export declare const APPEARANCE_FACETS: Record<AppearanceEntity, readonly AppearanceFacet[]>;
29
+ export type ResolvedAppearance = {
20
30
  kind: "image";
21
31
  imageFileId: Uuid;
22
32
  shape: ImageShape;
@@ -32,16 +42,16 @@ type Named = Appearance & {
32
42
  name?: string;
33
43
  };
34
44
  /** Image wins; else an icon in a colour (own, parent's or derived from the name) is a tile, without colour a glyph. */
35
- declare function resolveAppearance(entity: Named, parent?: Named & {
36
- imageShape?: ImageShape;
45
+ export declare function resolveAppearance(entity: Named, parent?: Named & {
46
+ image?: Pick<ObjectImage, "shape">;
37
47
  }): ResolvedAppearance;
38
48
  //#endregion
39
49
  //#region src/types/document-layout.d.ts
40
- interface DocumentLayout {
50
+ export interface DocumentLayout {
41
51
  /** Dev-declared folder structures the user can instantiate via the UI inside a record's drive. */
42
52
  presets?: FolderPreset[];
43
53
  }
44
- interface FolderPreset {
54
+ export interface FolderPreset {
45
55
  id: string;
46
56
  label: string;
47
57
  icon?: IconName;
@@ -50,13 +60,13 @@ interface FolderPreset {
50
60
  /** When true, this preset is auto-instantiated on every new record's drive for the owning object. */
51
61
  autoInstantiate?: boolean;
52
62
  }
53
- interface PresetNode {
63
+ export interface PresetNode {
54
64
  title: string;
55
65
  description?: string;
56
66
  children?: PresetNode[];
57
67
  }
58
68
  /** Max depth allowed for preset.structure to keep instantiation predictable. */
59
- declare const MAX_PRESET_DEPTH = 5;
69
+ export declare const MAX_PRESET_DEPTH = 5;
60
70
  //#endregion
61
71
  //#region src/types/record-access.d.ts
62
72
  /**
@@ -64,17 +74,17 @@ declare const MAX_PRESET_DEPTH = 5;
64
74
  * 2026-10-08 §3.2): `reader` sees, `runner` also uses (agents only),
65
75
  * `editor` also modifies and manages the grants.
66
76
  */
67
- declare const ACCESS_ROLES: readonly ["reader", "runner", "editor"];
68
- type AccessRole = (typeof ACCESS_ROLES)[number];
77
+ export declare const ACCESS_ROLES: readonly ["reader", "runner", "editor"];
78
+ export type AccessRole = (typeof ACCESS_ROLES)[number];
69
79
  /** Roles a record access grant can carry (spec 2026-09-25 §5.1): a record is never "used". */
70
- declare const RECORD_ACCESS_ROLES: readonly ["reader", "editor"];
71
- type RecordAccessRole = (typeof RECORD_ACCESS_ROLES)[number];
80
+ export declare const RECORD_ACCESS_ROLES: readonly ["reader", "editor"];
81
+ export type RecordAccessRole = (typeof RECORD_ACCESS_ROLES)[number];
72
82
  /**
73
83
  * Why a grant exists — the equivalent of Salesforce's `RowCause` (spec §3):
74
84
  * automatic grants are recomputed without ever touching manual shares.
75
85
  */
76
- declare const RECORD_ACCESS_SOURCES: readonly ["manual", "meeting_attendee"];
77
- type RecordAccessSource = (typeof RECORD_ACCESS_SOURCES)[number];
86
+ export declare const RECORD_ACCESS_SOURCES: readonly ["manual", "meeting_attendee"];
87
+ export type RecordAccessSource = (typeof RECORD_ACCESS_SOURCES)[number];
78
88
  /**
79
89
  * Agent-internal objects whose records are never shared (spec 2026-09-25
80
90
  * §5.3.4): the memory resolver reads "private and visible" as "mine", and an
@@ -82,19 +92,19 @@ type RecordAccessSource = (typeof RECORD_ACCESS_SOURCES)[number];
82
92
  * A constant in v1 — a definition flag would mean editing native objects. The
83
93
  * server refuses them; the UI hides the share control for them.
84
94
  */
85
- declare const UNSHAREABLE_OBJECT_NAMES: ReadonlySet<string>;
95
+ export declare const UNSHAREABLE_OBJECT_NAMES: ReadonlySet<string>;
86
96
  /** What the reading actor may do with a resource (spec §6.6); records never produce `runner`. */
87
- type ViewerAccess = "owner" | "editor" | "runner" | "reader" | "workspace";
97
+ export type ViewerAccess = "owner" | "editor" | "runner" | "reader" | "workspace";
88
98
  /** One beneficiary of a private resource: its effective role and every source that grants it. */
89
- interface ResourceAccessGrant<TRole extends AccessRole = AccessRole, TSource extends string = RecordAccessSource> {
99
+ export interface ResourceAccessGrant<TRole extends AccessRole = AccessRole, TSource extends string = RecordAccessSource> {
90
100
  actorId: Uuid;
91
101
  role: TRole;
92
102
  sources: TSource[];
93
103
  }
94
104
  /** One beneficiary of a private record (shape unchanged since 2026-09-25, D11). */
95
- type RecordAudienceGrant = ResourceAccessGrant<RecordAccessRole, RecordAccessSource>;
105
+ export type RecordAudienceGrant = ResourceAccessGrant<RecordAccessRole, RecordAccessSource>;
96
106
  /** Who can reach a record beyond its owner (`GET /records/:object/:id/access`). */
97
- interface RecordAudience {
107
+ export interface RecordAudience {
98
108
  recordId: Uuid;
99
109
  visibility: ResourceVisibility;
100
110
  ownedBy: Uuid | null;
@@ -103,7 +113,7 @@ interface RecordAudience {
103
113
  grants: RecordAudienceGrant[];
104
114
  }
105
115
  /** Who can reach an agent definition beyond its owner (`GET /agents/definitions/:id/access`). */
106
- interface AgentDefinitionAudience {
116
+ export interface AgentDefinitionAudience {
107
117
  definitionId: string;
108
118
  visibility: ResourceVisibility;
109
119
  ownedBy: Uuid | null;
@@ -112,7 +122,7 @@ interface AgentDefinitionAudience {
112
122
  grants: ResourceAccessGrant<AccessRole, "manual">[];
113
123
  }
114
124
  /** Who can reach a private page beyond its owner (`GET /pages/:id/access`). */
115
- interface PageAudience {
125
+ export interface PageAudience {
116
126
  pageId: Uuid;
117
127
  visibility: ResourceVisibility;
118
128
  ownedBy: Uuid | null;
@@ -121,7 +131,7 @@ interface PageAudience {
121
131
  grants: ResourceAccessGrant<RecordAccessRole, "manual">[];
122
132
  }
123
133
  /** The resource an access operation addresses. */
124
- type ResourceAccessTarget = {
134
+ export type ResourceAccessTarget = {
125
135
  kind: "record";
126
136
  object: string;
127
137
  id: string;
@@ -133,18 +143,18 @@ type ResourceAccessTarget = {
133
143
  id: string;
134
144
  };
135
145
  /** Narrow an untrusted value (HTTP body, CLI flag) to a record grant role. */
136
- declare function parseRecordAccessRole(value: unknown): RecordAccessRole;
146
+ export declare function parseRecordAccessRole(value: unknown): RecordAccessRole;
137
147
  /** Narrow an untrusted value to an agent definition grant role. */
138
- declare function parseAgentDefinitionAccessRole(value: unknown): AccessRole;
148
+ export declare function parseAgentDefinitionAccessRole(value: unknown): AccessRole;
139
149
  /** Narrow an untrusted value to a page grant role: a page is read or edited, never "used". */
140
- declare function parsePageAccessRole(value: unknown): RecordAccessRole;
150
+ export declare function parsePageAccessRole(value: unknown): RecordAccessRole;
141
151
  /**
142
152
  * The single derivation of `viewerAccess`, from the row's owner and the
143
153
  * `viewer_grant` storage computed FOR this viewer. A private resource that is
144
154
  * neither owned nor granted can only have been read by the system reader,
145
155
  * which reads and never writes: `reader`.
146
156
  */
147
- declare function deriveViewerAccess(resource: {
157
+ export declare function deriveViewerAccess(resource: {
148
158
  visibility: ResourceVisibility;
149
159
  ownedBy: string | null;
150
160
  viewerGrant?: AccessRole | null;
@@ -152,8 +162,8 @@ declare function deriveViewerAccess(resource: {
152
162
  //#endregion
153
163
  //#region src/types/objects.d.ts
154
164
  /** Visibility scopes shared by resources that can be workspace-wide or actor-private. */
155
- declare const RESOURCE_VISIBILITIES: readonly ["workspace", "private"];
156
- type ResourceVisibility = (typeof RESOURCE_VISIBILITIES)[number];
165
+ export declare const RESOURCE_VISIBILITIES: readonly ["workspace", "private"];
166
+ export type ResourceVisibility = (typeof RESOURCE_VISIBILITIES)[number];
157
167
  /**
158
168
  * Scope a list-view tab reads. Deliberately a SEPARATE union from
159
169
  * {@link ResourceVisibility}: a stored resource is always exactly one of
@@ -165,13 +175,13 @@ type ResourceVisibility = (typeof RESOURCE_VISIBILITIES)[number];
165
175
  * the viewer (spec 2026-10-08 §5). Never assign a tab scope to a record's
166
176
  * `visibility` column.
167
177
  */
168
- declare const LIST_VIEW_TAB_VISIBILITIES: readonly ["all", "workspace", "private", "shared"];
169
- type ListViewTabVisibility = (typeof LIST_VIEW_TAB_VISIBILITIES)[number];
178
+ export declare const LIST_VIEW_TAB_VISIBILITIES: readonly ["all", "workspace", "private", "shared"];
179
+ export type ListViewTabVisibility = (typeof LIST_VIEW_TAB_VISIBILITIES)[number];
170
180
  /** The exact scope a record list query may impose: a visibility, or `shared` (owned by someone else, granted to me). */
171
- declare const RECORD_LIST_SCOPES: readonly ["workspace", "private", "shared"];
172
- type RecordListScope = (typeof RECORD_LIST_SCOPES)[number];
181
+ export declare const RECORD_LIST_SCOPES: readonly ["workspace", "private", "shared"];
182
+ export type RecordListScope = (typeof RECORD_LIST_SCOPES)[number];
173
183
  /** Narrow an untrusted list scope (HTTP body) or reject it — `all` is a tab value, never a query scope. */
174
- declare function parseRecordListScope(value: unknown): RecordListScope;
184
+ export declare function parseRecordListScope(value: unknown): RecordListScope;
175
185
  /**
176
186
  * Narrow an untrusted value from an edge (HTTP body, CLI flag) to a
177
187
  * {@link ResourceVisibility}, or reject it.
@@ -187,18 +197,18 @@ declare function parseRecordListScope(value: unknown): RecordListScope;
187
197
  * Throws {@link ValidationError} rather than a transport exception so it can
188
198
  * be used below the controller layer; the HTTP filter maps its code to 400.
189
199
  */
190
- declare function parseResourceVisibility(value: unknown): ResourceVisibility;
200
+ export declare function parseResourceVisibility(value: unknown): ResourceVisibility;
191
201
  /**
192
202
  * Timestamps for tracking creation and updates
193
203
  */
194
- interface Timestamps {
204
+ export interface Timestamps {
195
205
  createdAt: Date;
196
206
  updatedAt: Date;
197
207
  }
198
208
  /**
199
209
  * Object definition - Represents a database table/entity
200
210
  */
201
- interface ObjectDefinition {
211
+ export interface ObjectDefinition {
202
212
  id?: Uuid;
203
213
  name: string;
204
214
  label: string;
@@ -206,8 +216,8 @@ interface ObjectDefinition {
206
216
  description?: string;
207
217
  icon?: IconName;
208
218
  color?: ColorId;
209
- /** How the images of this object's records are cropped. */
210
- imageShape?: ImageShape;
219
+ /** How this object's records wear an image: its crop, and where it may be found. */
220
+ image?: ObjectImage;
211
221
  /**
212
222
  * Template expression used to compute the object's display label.
213
223
  * Supports variable interpolation and pipes for formatting.
@@ -255,18 +265,18 @@ interface ObjectDefinition {
255
265
  /**
256
266
  * Links an attribute to an object
257
267
  */
258
- interface ObjectAttribute {
268
+ export interface ObjectAttribute {
259
269
  objectId: Uuid;
260
270
  attributeId: Uuid;
261
271
  order?: number;
262
272
  required?: boolean;
263
273
  }
264
274
  /** A record's own icon and image file (`APPEARANCE_FACETS.record`); each key is absent when unset. */
265
- type RecordAppearance = Pick<Appearance, "icon" | "imageFileId">;
275
+ export type RecordAppearance = Pick<Appearance, "icon" | "imageFileId">;
266
276
  /**
267
277
  * Record - Instance of an Object (a row in the database)
268
278
  */
269
- interface ObjectRecord<TValues extends Record<string, unknown> = Record<string, unknown>> extends Timestamps {
279
+ export interface ObjectRecord<TValues extends Record<string, unknown> = Record<string, unknown>> extends Timestamps {
270
280
  id: Uuid;
271
281
  objectId: Uuid;
272
282
  /**
@@ -362,11 +372,11 @@ interface ObjectRecord<TValues extends Record<string, unknown> = Record<string,
362
372
  * }
363
373
  * ```
364
374
  */
365
- declare const SYSTEM_FIELD_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "visibility", "ownedBy"];
375
+ export declare const SYSTEM_FIELD_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "visibility", "ownedBy"];
366
376
  /**
367
377
  * Type for system field names
368
378
  */
369
- type SystemFieldName = (typeof SYSTEM_FIELD_NAMES)[number];
379
+ export type SystemFieldName = (typeof SYSTEM_FIELD_NAMES)[number];
370
380
  /**
371
381
  * Reserved attribute names that cannot be used for custom attributes.
372
382
  * These names conflict with ObjectRecord properties.
@@ -382,17 +392,16 @@ type SystemFieldName = (typeof SYSTEM_FIELD_NAMES)[number];
382
392
  * }
383
393
  * ```
384
394
  */
385
- declare const RESERVED_ATTRIBUTE_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "visibility", "ownedBy", "objectId", "label", "embeddingText", "values", "metadata", "deletedAt", "deletedBy", "schemaVersion", "appearance", "owned_by"];
395
+ export declare const RESERVED_ATTRIBUTE_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "visibility", "ownedBy", "objectId", "label", "embeddingText", "values", "metadata", "deletedAt", "deletedBy", "schemaVersion", "appearance", "owned_by"];
386
396
  /**
387
397
  * Type for reserved attribute names
388
398
  */
389
- type ReservedAttributeName = (typeof RESERVED_ATTRIBUTE_NAMES)[number];
399
+ export type ReservedAttributeName = (typeof RESERVED_ATTRIBUTE_NAMES)[number];
390
400
  /**
391
401
  * Reserved object names: every framework-native object. They cannot be used
392
402
  * for user-created (runtime) objects, nor declared by a consumer's builder,
393
403
  * registry entry, bundle or schema source — see `native/names.ts`.
394
404
  */
395
- declare const RESERVED_OBJECT_NAMES: readonly ["skill", "memory", "drives", "artifact", "meeting"];
396
- type ReservedObjectName = (typeof RESERVED_OBJECT_NAMES)[number];
397
- //#endregion
398
- export { ResourceAccessGrant as A, MAX_PRESET_DEPTH as B, PageAudience as C, RecordAccessSource as D, RecordAccessRole as E, parseAgentDefinitionAccessRole as F, AppearanceFacet as G, APPEARANCE_FACETS as H, parsePageAccessRole as I, ImageShape as J, DEFAULT_APPEARANCE_ICON as K, parseRecordAccessRole as L, UNSHAREABLE_OBJECT_NAMES as M, ViewerAccess as N, RecordAudience as O, deriveViewerAccess as P, DocumentLayout as R, AgentDefinitionAudience as S, RECORD_ACCESS_SOURCES as T, Appearance as U, PresetNode as V, AppearanceEntity as W, resolveAppearance as X, ResolvedAppearance as Y, Timestamps as _, ObjectRecord as a, ACCESS_ROLES as b, RESERVED_OBJECT_NAMES as c, RecordListScope as d, ReservedAttributeName as f, SystemFieldName as g, SYSTEM_FIELD_NAMES as h, ObjectDefinition as i, ResourceAccessTarget as j, RecordAudienceGrant as k, RESOURCE_VISIBILITIES as l, ResourceVisibility as m, ListViewTabVisibility as n, RECORD_LIST_SCOPES as o, ReservedObjectName as p, IMAGE_SHAPES as q, ObjectAttribute as r, RESERVED_ATTRIBUTE_NAMES as s, LIST_VIEW_TAB_VISIBILITIES as t, RecordAppearance as u, parseRecordListScope as v, RECORD_ACCESS_ROLES as w, AccessRole as x, parseResourceVisibility as y, FolderPreset as z };
405
+ export declare const RESERVED_OBJECT_NAMES: readonly ["skill", "memory", "drives", "artifact", "meeting"];
406
+ export type ReservedObjectName = (typeof RESERVED_OBJECT_NAMES)[number];
407
+ //#endregion
@@ -0,0 +1,2 @@
1
+ /*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ import"./zod-locale.mjs";import{DEFAULT_VALIDATION_MESSAGES as e}from"./core-rKI7Q9_U.mjs";import*as t from"zod";import{getCountryByIso3 as n,isValidIso3 as r,stripTrunkPrefix as i}from"@standards/constants";import{parsePhoneNumberFromString as a}from"libphonenumber-js";function digitsOnly(e){return e.replace(/\D/g,``)}function normalizeCountrylessPhoneNumber(e){return digitsOnly(e)}function getIso2(e){return n(e)?.iso2}function normalizePhoneNumber(e,t){if(!e)return``;let r=getIso2(t);if(!r)return digitsOnly(e);let o=a(e,r);if(o)return absorbDoubledCallingCode(o.nationalNumber,o.isValid(),t,r);let s=n(t),c=digitsOnly(e);if(s){let e=s.phoneCode.replace(`+`,``),t=c.startsWith(e)?c.slice(e.length):c;return i(t,s.phoneTrunkPrefix??``)}return c}function absorbDoubledCallingCode(e,t,r,i){if(t)return e;let o=n(r)?.phoneCode.replace(`+`,``);if(o===void 0||!e.startsWith(o))return e;let s=e.slice(o.length),c=a(`+${o}${s}`,i);return c?.isValid()?c.nationalNumber:e}function formatPhoneForDisplay(e){if(!e.phoneNumber)return``;let t=getIso2(e.countryCode),r=n(e.countryCode)?.phoneCode??``;if(!t)return`${r} ${e.phoneNumber}`.trim();let i=`${r}${digitsOnly(e.phoneNumber)}`,o=a(i);return o?o.formatInternational():`${r} ${e.phoneNumber}`.trim()}function createPhoneValidator(n,i=e){return t.object({countryCode:t.string().length(3),phoneNumber:t.string().min(1,{message:i.required(n)})},{message:i.invalidPhone(n)}).refine(e=>r(e.countryCode),{message:`Invalid country code`}).transform(e=>({countryCode:e.countryCode,phoneNumber:normalizePhoneNumber(e.phoneNumber,e.countryCode)}))}export{createPhoneValidator,formatPhoneForDisplay,getIso2,normalizeCountrylessPhoneNumber,normalizePhoneNumber};
@@ -0,0 +1,2 @@
1
+ /*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ const e=require("./zod-locale.js"),t=require("./core-DAxRlJ5i.js");let n=require("zod");n=e.__toESM(n);let r=require("@standards/constants"),i=require("libphonenumber-js");function digitsOnly(e){return e.replace(/\D/g,``)}function normalizeCountrylessPhoneNumber(e){return digitsOnly(e)}function getIso2(e){return(0,r.getCountryByIso3)(e)?.iso2}function normalizePhoneNumber(e,t){if(!e)return``;let n=getIso2(t);if(!n)return digitsOnly(e);let a=(0,i.parsePhoneNumberFromString)(e,n);if(a)return absorbDoubledCallingCode(a.nationalNumber,a.isValid(),t,n);let o=(0,r.getCountryByIso3)(t),s=digitsOnly(e);if(o){let e=o.phoneCode.replace(`+`,``),t=s.startsWith(e)?s.slice(e.length):s;return(0,r.stripTrunkPrefix)(t,o.phoneTrunkPrefix??``)}return s}function absorbDoubledCallingCode(e,t,n,a){if(t)return e;let o=(0,r.getCountryByIso3)(n)?.phoneCode.replace(`+`,``);if(o===void 0||!e.startsWith(o))return e;let s=e.slice(o.length),c=(0,i.parsePhoneNumberFromString)(`+${o}${s}`,a);return c?.isValid()?c.nationalNumber:e}function formatPhoneForDisplay(e){if(!e.phoneNumber)return``;let t=getIso2(e.countryCode),n=(0,r.getCountryByIso3)(e.countryCode)?.phoneCode??``;if(!t)return`${n} ${e.phoneNumber}`.trim();let a=`${n}${digitsOnly(e.phoneNumber)}`,o=(0,i.parsePhoneNumberFromString)(a);return o?o.formatInternational():`${n} ${e.phoneNumber}`.trim()}function createPhoneValidator(e,i=t.DEFAULT_VALIDATION_MESSAGES){return n.object({countryCode:n.string().length(3),phoneNumber:n.string().min(1,{message:i.required(e)})},{message:i.invalidPhone(e)}).refine(e=>(0,r.isValidIso3)(e.countryCode),{message:`Invalid country code`}).transform(e=>({countryCode:e.countryCode,phoneNumber:normalizePhoneNumber(e.phoneNumber,e.countryCode)}))}Object.defineProperty(exports,"createPhoneValidator",{enumerable:!0,get:function(){return createPhoneValidator}}),Object.defineProperty(exports,"formatPhoneForDisplay",{enumerable:!0,get:function(){return formatPhoneForDisplay}}),Object.defineProperty(exports,"getIso2",{enumerable:!0,get:function(){return getIso2}}),Object.defineProperty(exports,"normalizeCountrylessPhoneNumber",{enumerable:!0,get:function(){return normalizeCountrylessPhoneNumber}}),Object.defineProperty(exports,"normalizePhoneNumber",{enumerable:!0,get:function(){return normalizePhoneNumber}});
@@ -0,0 +1,2 @@
1
+ /*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ const e=[`fyi`,`task`,`question`,`handoff`,`system`],t=[`low`,`normal`,`high`,`urgent`],n={low:0,normal:1,high:2,urgent:3},r=[`public`,`internal`,`sensitive`],i=[`unread`,`read`,`archived`,`snoozed`],a=[`none`,`pending`,`processing`,`completed`,`dismissed`,`expired`,`failed`],o=`agent.session.waiting_human`,s=`agent.task.assigned`,c=`agent.question.requested`,l=`agent.routine_run.failed`,u=`agent.routine_run.notice`,d=`connector.connection.reauth_required`,f=`connector.connection.error`,p=`record.assigned`,m=`access.granted`,h=[o,s,c,l,u,d,f,p,m],g=[`task`,`question`,`handoff`];function isActionableNotificationKind(e){return g.includes(e)}const _=[`agents`,`connectors`,`assignment`,`sharing`],v={[o]:{kind:`question`,area:`agents`},[s]:{kind:`task`,area:null},[c]:{kind:`question`,area:null},[l]:{kind:`system`,area:`agents`},[u]:{kind:`fyi`,area:`agents`},[d]:{kind:`system`,area:`connectors`},[f]:{kind:`system`,area:`connectors`},[p]:{kind:`fyi`,area:`assignment`},[m]:{kind:`fyi`,area:`sharing`}},y=[`in_app`,`email`],b={agentSession:`agent_session`,agent:`agent`,routine:`routine`,record:`record`,page:`page`},x=[`count`,`sum`,`avg`,`min`,`max`],S=[`day`,`week`,`month`,`quarter`,`year`];Object.defineProperty(exports,"ACTIONABLE_NOTIFICATION_KINDS",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"AGGREGATE_BUCKETS",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"AGGREGATE_MEASURES",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"MAX_AGGREGATE_GROUPS",{enumerable:!0,get:function(){return 100}}),Object.defineProperty(exports,"NOTIFICATION_CHANNELS",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"NOTIFICATION_INBOX_STATES",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"NOTIFICATION_KINDS",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"NOTIFICATION_PRIORITIES",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"NOTIFICATION_PRIORITY_RANK",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"NOTIFICATION_SENSITIVITIES",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"NOTIFICATION_SETTINGS_AREAS",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"NOTIFICATION_SUBJECT_TYPES",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"NOTIFICATION_TYPES_V1",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"NOTIFICATION_TYPE_ACCESS_GRANTED",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"NOTIFICATION_TYPE_AGENT_QUESTION_REQUESTED",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"NOTIFICATION_TYPE_AGENT_ROUTINE_RUN_FAILED",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"NOTIFICATION_TYPE_AGENT_ROUTINE_RUN_NOTICE",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"NOTIFICATION_TYPE_CONNECTOR_CONNECTION_ERROR",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"NOTIFICATION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"NOTIFICATION_TYPE_KINDS",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"NOTIFICATION_TYPE_RECORD_ASSIGNED",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"NOTIFICATION_WORK_STATES",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"isActionableNotificationKind",{enumerable:!0,get:function(){return isActionableNotificationKind}});