@standards/schema 1.0.0-alpha.408 → 1.0.0-alpha.410

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 (95) hide show
  1. package/dist/all-B606hHr3.mjs +2 -0
  2. package/dist/{all-CYfzNNTD.d.ts → all-B802p9b-.d.mts} +12 -10
  3. package/dist/all-C-dQf23e.js +2 -0
  4. package/dist/{all-1spF7ByM.d.mts → all-CbM6xRtw.d.ts} +12 -10
  5. package/dist/api/index.d.mts +430 -31
  6. package/dist/api/index.d.ts +430 -31
  7. package/dist/api/index.js +1 -1
  8. package/dist/api/index.mjs +1 -1
  9. package/dist/{attributes-CB6EJyu2.d.mts → attributes-BgPCTw3y.d.mts} +1 -1
  10. package/dist/{attributes-DPwwMMgq.d.ts → attributes-D4nvUmw6.d.ts} +1 -1
  11. package/dist/{checkbox-B6TumdR6.d.mts → checkbox-D11vN4kY.d.mts} +2 -2
  12. package/dist/{checkbox-M5L3PYDZ.d.ts → checkbox-DSAorFpa.d.ts} +2 -2
  13. package/dist/{config-BWgga8mu.js → config-YSw2jzWj.js} +1 -1
  14. package/dist/{config-BwshhFai.mjs → config-iUwnquKr.mjs} +1 -1
  15. package/dist/{date-D5D3aP1p.d.ts → date-C29k_cah.d.ts} +2 -2
  16. package/dist/{date-DM0ExRcF.d.mts → date-CtZVrU3Z.d.mts} +2 -2
  17. package/dist/{exceptions-BlKiQcvh.d.ts → exceptions-CmMd5DGH.d.mts} +12 -0
  18. package/dist/{exceptions-BlKiQcvh.d.mts → exceptions-CmMd5DGH.d.ts} +12 -0
  19. package/dist/exceptions.d.mts +1 -1
  20. package/dist/exceptions.d.ts +1 -1
  21. package/dist/exceptions.js +1 -1
  22. package/dist/exceptions.mjs +1 -1
  23. package/dist/{index-CXyPgHS_.d.mts → index-B6XCKKgD.d.mts} +1 -1
  24. package/dist/{index-CkNJkuYX.d.ts → index-BDMlzqIt.d.ts} +3 -3
  25. package/dist/{index-Ba5hViTX.d.ts → index-CCt_hCgK.d.ts} +1 -1
  26. package/dist/{index-ChyZg9Dl.d.ts → index-CFSSj05K.d.ts} +3 -2
  27. package/dist/{index-DfaotFfW.d.mts → index-Ckbiu3d9.d.mts} +3 -3
  28. package/dist/{index-CIS58KNs.d.mts → index-CpWy2-oS.d.mts} +3 -2
  29. package/dist/{index-DfIVNu-r.d.mts → index-DeUkwS45.d.mts} +274 -13
  30. package/dist/{index-kIe8V1Oz.d.ts → index-ayjc-chp.d.ts} +274 -13
  31. package/dist/index.d.mts +10 -10
  32. package/dist/index.d.ts +10 -10
  33. package/dist/index.js +1 -1
  34. package/dist/index.mjs +1 -1
  35. package/dist/{number-CIP0eOB9.d.ts → number-BGpvOweC.d.ts} +2 -2
  36. package/dist/{number-BulsVlZX.d.mts → number-g88uoxhJ.d.mts} +2 -2
  37. package/dist/{objects-B07Ix6br.d.ts → objects-Bt5C4BNO.d.ts} +33 -3
  38. package/dist/{objects-Cvc21DHf.d.mts → objects-Ddi_zEYp.d.mts} +33 -3
  39. package/dist/{primitives-D9A6pmXV.mjs → primitives-BCJLtpaI.mjs} +1 -1
  40. package/dist/{primitives-BBtVhLdq.js → primitives-CVbrjJ24.js} +1 -1
  41. package/dist/record-aggregates-Cl_62tuW.mjs +2 -0
  42. package/dist/record-aggregates-eFfvQOzG.js +2 -0
  43. package/dist/record-operation-CyVr9RBO.js +2 -0
  44. package/dist/record-operation-prlqtHAm.mjs +2 -0
  45. package/dist/{text-BsEjIQsm.d.ts → text-CMMMIBIT.d.ts} +2 -2
  46. package/dist/{text-9dEmwy7y.d.mts → text-Dyxn_QlR.d.mts} +2 -2
  47. package/dist/{utils-5JI2a7Qr.d.ts → utils-Du85J1nY.d.ts} +1 -1
  48. package/dist/{utils-Vep_JDSS.d.mts → utils-mBdW0zGZ.d.mts} +1 -1
  49. package/dist/utils.d.mts +1 -1
  50. package/dist/utils.d.ts +1 -1
  51. package/dist/validation/all.d.mts +4 -4
  52. package/dist/validation/all.d.ts +4 -4
  53. package/dist/validation/all.js +1 -1
  54. package/dist/validation/all.mjs +1 -1
  55. package/dist/validation/complex/currency.d.mts +2 -2
  56. package/dist/validation/complex/currency.d.ts +2 -2
  57. package/dist/validation/complex/location.d.mts +2 -2
  58. package/dist/validation/complex/location.d.ts +2 -2
  59. package/dist/validation/complex/phone.d.mts +2 -2
  60. package/dist/validation/complex/phone.d.ts +2 -2
  61. package/dist/validation/complex/relation.d.mts +2 -2
  62. package/dist/validation/complex/relation.d.ts +2 -2
  63. package/dist/validation/complex/richtext.d.mts +2 -2
  64. package/dist/validation/complex/richtext.d.ts +2 -2
  65. package/dist/validation/complex/select.d.mts +2 -2
  66. package/dist/validation/complex/select.d.ts +2 -2
  67. package/dist/validation/complex/user.d.mts +2 -2
  68. package/dist/validation/complex/user.d.ts +2 -2
  69. package/dist/validation/computed/formula.d.mts +2 -2
  70. package/dist/validation/computed/formula.d.ts +2 -2
  71. package/dist/validation/computed/rollup.d.mts +2 -2
  72. package/dist/validation/computed/rollup.d.ts +2 -2
  73. package/dist/validation/config/index.d.mts +1 -1
  74. package/dist/validation/config/index.d.ts +1 -1
  75. package/dist/validation/config/index.js +1 -1
  76. package/dist/validation/config/index.mjs +1 -1
  77. package/dist/validation/core/index.d.mts +1 -1
  78. package/dist/validation/core/index.d.ts +1 -1
  79. package/dist/validation/object/index.d.mts +1 -1
  80. package/dist/validation/object/index.d.ts +1 -1
  81. package/dist/validation/primitives/checkbox.d.mts +1 -1
  82. package/dist/validation/primitives/checkbox.d.ts +1 -1
  83. package/dist/validation/primitives/date.d.mts +1 -1
  84. package/dist/validation/primitives/date.d.ts +1 -1
  85. package/dist/validation/primitives/number.d.mts +1 -1
  86. package/dist/validation/primitives/number.d.ts +1 -1
  87. package/dist/validation/primitives/text.d.mts +1 -1
  88. package/dist/validation/primitives/text.d.ts +1 -1
  89. package/package.json +2 -2
  90. package/dist/all-BNOv4MuC.js +0 -2
  91. package/dist/all-Bzzltedd.mjs +0 -2
  92. package/dist/record-aggregates-Bhi1lCSm.js +0 -2
  93. package/dist/record-aggregates-DEBOOgA0.mjs +0 -2
  94. package/dist/record-operation-BLq2emrx.js +0 -2
  95. package/dist/record-operation-DK20jPvI.mjs +0 -2
@@ -1,10 +1,10 @@
1
1
 
2
- import { SchemaError, SchemaErrorCode, ValidationError } from "./exceptions-BlKiQcvh.mjs";
3
- import { TenantId, Uuid } from "./utils-Vep_JDSS.mjs";
4
- import { DocumentLayout, ImageShape, ListViewTabVisibility, ObjectDefinition, ObjectImage, ObjectRecord, RecordAppearance, RecordListScope, ResourceVisibility, Timestamps, ViewerAccess } from "./objects-Cvc21DHf.mjs";
5
- import { Attribute, AttributeType, BilateralConfig, CheckboxAttribute, Currency, CurrencyAttribute, DateAttribute, DatePrecision, DateRangeValue, DocumentAttribute, FormulaAttribute, FormulaReturnType, Location, LocationAttribute, LocationGranularity, MultiRelationAttribute, MultiselectAttribute, NumberAttribute, Option, Phone, PhoneAttribute, PropertyAttribute, PropertySchema, RelationAttribute, RelationTarget, RichtextAttribute, RollupAttribute, RollupFunction, SelectAttribute, SingleRelationAttribute, StatusAttribute, TextAttribute, TimeFormat, UserAttribute, UserReferenceType } from "./attributes-CB6EJyu2.mjs";
6
- import { ActivityContentDefinition, BLOCK_PERIODS, BlockContext, BlockDefinition, BlockInput, BlockWidth, CollectionAction, CollectionContentDefinition, CollectionContentSource, ColumnReference, ContentConfiguration, ContentCreateMode, ContentField, ContentFieldGroup, ContentOpenMode, ContentViewContext, ContentViewDefinition, CustomContentDefinition, DocumentsContentDefinition, DynamicValue, Eager, EmailsContentDefinition, FilterOperator, FilterRule, FilterState, FilterValue, FormContentDefinition, FormDensity, FormsContentDefinition, GridPosition, GridViolation, HeightMode, InferAttributeValue, InferQualifiedProps, InputShape, LayoutTraits, ListableBlockInput, MeetingsContentDefinition, ObjectBuilderLike, ObjectViewContext, ObjectViewDefinition, PageContentDefinition, PageViewDefinition, QualifiedDocumentAttributeBuilder, QualifiedDocumentBrand, QueryState, RecordMetadata, RecordQuery, RecordQueryDefinition, RelativeDateValue, RichtextContentDefinition, SortRule, ViewContentDefinition, ViewRead, WithCustomAttributes, WithCustomRecordAttributes, WithoutSystemFields } from "./all-1spF7ByM.mjs";
7
- import { UpdateObjectInput } from "./index-CIS58KNs.mjs";
2
+ import { SchemaError, SchemaErrorCode, ValidationError } from "./exceptions-CmMd5DGH.mjs";
3
+ import { TenantId, Uuid } from "./utils-mBdW0zGZ.mjs";
4
+ import { DocumentLayout, ImageShape, ListViewTabVisibility, ObjectDefinition, ObjectImage, ObjectRecord, RecordAppearance, RecordListScope, ResourceVisibility, Timestamps, ViewerAccess } from "./objects-Ddi_zEYp.mjs";
5
+ import { Attribute, AttributeType, BilateralConfig, CheckboxAttribute, Currency, CurrencyAttribute, DateAttribute, DatePrecision, DateRangeValue, DocumentAttribute, FormulaAttribute, FormulaReturnType, Location, LocationAttribute, LocationGranularity, MultiRelationAttribute, MultiselectAttribute, NumberAttribute, Option, Phone, PhoneAttribute, PropertyAttribute, PropertySchema, RelationAttribute, RelationTarget, RichtextAttribute, RollupAttribute, RollupFunction, SelectAttribute, SingleRelationAttribute, StatusAttribute, TextAttribute, TimeFormat, UserAttribute, UserReferenceType } from "./attributes-BgPCTw3y.mjs";
6
+ import { ActivityContentDefinition, BLOCK_PERIODS, BlockContext, BlockDefinition, BlockInput, BlockWidth, CollectionAction, CollectionContentDefinition, CollectionContentSource, ColumnReference, ContentConfiguration, ContentCreateMode, ContentField, ContentFieldGroup, ContentOpenMode, ContentViewContext, ContentViewDefinition, CustomContentDefinition, DocumentsContentDefinition, DynamicValue, Eager, EmailsContentDefinition, FilterOperator, FilterRule, FilterState, FilterValue, FormContentDefinition, FormDensity, FormsContentDefinition, GridPosition, GridViolation, HeightMode, InferAttributeValue, InferQualifiedProps, InputShape, LayoutTraits, ListableBlockInput, MeetingsContentDefinition, ObjectBuilderLike, ObjectViewContext, ObjectViewDefinition, PageContentDefinition, PageViewDefinition, QualifiedDocumentAttributeBuilder, QualifiedDocumentBrand, QueryState, RecordMetadata, RecordQuery, RecordQueryDefinition, RelativeDateValue, RichtextContentDefinition, SortRule, ViewContentDefinition, ViewRead, WithCustomAttributes, WithCustomRecordAttributes, WithoutSystemFields } from "./all-B802p9b-.mjs";
7
+ import { UpdateObjectInput } from "./index-CpWy2-oS.mjs";
8
8
  import * as z$2 from "zod";
9
9
  import z, { z as z$1 } from "zod";
10
10
  import { ColorId, CountryIso3, CurrencyCode, IconName, MimeType } from "@standards/constants";
@@ -396,6 +396,13 @@ export declare const PERMISSION_CATALOG: readonly [{
396
396
  readonly id: "manage";
397
397
  readonly add: readonly ["create", "delete"];
398
398
  }];
399
+ }, {
400
+ readonly id: "devices";
401
+ readonly resources: readonly ["devices"];
402
+ readonly levels: readonly [{
403
+ readonly id: "manage";
404
+ readonly add: readonly ["manage"];
405
+ }];
399
406
  }];
400
407
  }, {
401
408
  readonly id: "administration";
@@ -510,11 +517,18 @@ export interface OperationUpload {
510
517
  readonly maxCount: number;
511
518
  readonly maxBytes?: number;
512
519
  }
513
- /** Which path parameter names the object an `objectPermission` applies to, and the action. */
514
- export interface OperationObjectPermission {
520
+ /**
521
+ * The object an `objectPermission` applies to, and the action: the object a
522
+ * path parameter names (the record routes), or one fixed object (a route
523
+ * serving a single native object, such as `skills.*` on `skill`).
524
+ */
525
+ export type OperationObjectPermission = {
515
526
  readonly param: string;
516
527
  readonly action: Action;
517
- }
528
+ } | {
529
+ readonly object: string;
530
+ readonly action: Action;
531
+ };
518
532
  /** One uploaded file as a handler receives it. */
519
533
  export interface UploadedPart {
520
534
  name: string;
@@ -567,8 +581,9 @@ export interface OperationDefinition {
567
581
  body?: string;
568
582
  /**
569
583
  * The object-level permission of a record route: `action` on the object a
570
- * path parameter names (`{ param: "objectName", action: "read" }`). The
571
- * host checks it before the handler, as it checks `permission`.
584
+ * path parameter names (`{ param: "objectName", action: "read" }`), or on
585
+ * one fixed object (`{ object: "skill", action: "read" }`). The host checks
586
+ * it before the handler, as it checks `permission`.
572
587
  */
573
588
  objectPermission?: OperationObjectPermission;
574
589
  /**
@@ -652,6 +667,9 @@ export declare function operation<const D extends OperationDefinition>(def: D &
652
667
  objectPermission?: {
653
668
  readonly param: PathParams<D["path"]>;
654
669
  readonly action: Action;
670
+ } | {
671
+ readonly object: string;
672
+ readonly action: Action;
655
673
  };
656
674
  }): Operation<D>;
657
675
  //#endregion
@@ -832,6 +850,9 @@ export type MeetingResponseStatus = "accepted" | "declined" | "tentative" | "nee
832
850
  /** An invitation's answer; "needs_action" is no answer and is not sent. */
833
851
  export declare const MEETING_RESPONSES: readonly ["accepted", "declined", "tentative"];
834
852
  export type MeetingResponse = (typeof MEETING_RESPONSES)[number];
853
+ /** Every reason a recording is failed for a bot that never answered ends with
854
+ * this, so a reader can say so in words without parsing the sentence. */
855
+ export declare const MEETING_BOT_SILENT_REASON = "sent nothing back";
835
856
  /** Lifecycle of the recording bot's transcript for one meeting. */
836
857
  export type TranscriptStatus = "scheduled" | "recording" | "completed" | "failed";
837
858
  /** An explicit per-meeting choice that beats the workspace policy. */
@@ -848,6 +869,9 @@ export interface MeetingRecording {
848
869
  status: MeetingRecordingStatus;
849
870
  /** Set when status is "failed"; null otherwise. */
850
871
  failureReason: string | null;
872
+ /** The bot is in the call's waiting room and someone must admit it. Only
873
+ * ever true while status is "recording". */
874
+ waitingRoom: boolean;
851
875
  /** The vendor's bot handle once dispatched; what a simulator or an operator
852
876
  * uses to correlate a vendor call with this meeting. Null otherwise. */
853
877
  botId: string | null;
@@ -906,6 +930,10 @@ export declare const meetingBotNotificationSchema: z$2.ZodDiscriminatedUnion<[z$
906
930
  kind: z$2.ZodLiteral<"failure">;
907
931
  botId: z$2.ZodString;
908
932
  reason: z$2.ZodString;
933
+ }, z$2.core.$strip>, z$2.ZodObject<{
934
+ kind: z$2.ZodLiteral<"waiting-room">;
935
+ botId: z$2.ZodString;
936
+ waiting: z$2.ZodBoolean;
909
937
  }, z$2.core.$strip>], "kind">;
910
938
  export type MeetingBotNotification = z$2.infer<typeof meetingBotNotificationSchema>;
911
939
  /** `GET /meetings/:id/transcript` — only a `completed` transcript answers. */
@@ -1621,6 +1649,12 @@ export interface Decision {
1621
1649
  links: DecisionLink[];
1622
1650
  /** Who raised it, as `decisions.list` reads it; absent elsewhere and for a system decision. */
1623
1651
  sender?: DecisionSender;
1652
+ /**
1653
+ * Everyone holding a row of a `question`, whatever its state, as
1654
+ * `decisions.list` reads it; absent elsewhere and for another kind. « Transférer »
1655
+ * (#6451) leaves them out of its picker, since the server refuses them.
1656
+ */
1657
+ recipientActorIds?: Uuid[];
1624
1658
  payload: Record<string, unknown>;
1625
1659
  /** Always set (§ 3c): its primary link's text form, or `decision:<id>`. */
1626
1660
  threadKey: string;
@@ -1662,6 +1696,26 @@ export interface DecisionRecipient {
1662
1696
  createdAt: Date;
1663
1697
  updatedAt: Date;
1664
1698
  }
1699
+ /**
1700
+ * A transfer (#6451): a recipient handed their open row of a `question` to
1701
+ * someone else. The caller's row closes `dismissed`; this entry, kept in the
1702
+ * decision's `payload.transfers` (oldest first), is that row's reason, which
1703
+ * « Décisions tranchées » reads as « Transférée à <toLabel> ».
1704
+ */
1705
+ export interface DecisionTransfer {
1706
+ fromActorId: Uuid;
1707
+ toActorId: Uuid;
1708
+ /** The target's name when the decision was handed over. */
1709
+ toLabel: string;
1710
+ /** ISO instant of the transfer. */
1711
+ at: string;
1712
+ }
1713
+ /** The payload key the transfers of a decision live under. */
1714
+ export declare const DECISION_TRANSFERS_KEY = "transfers";
1715
+ /** The transfers recorded on a decision, oldest first; anything malformed is skipped. */
1716
+ export declare function decisionTransfersOf(decision: Pick<Decision, "payload">): DecisionTransfer[];
1717
+ /** The transfer that closed `actorId`'s row, the last one they made; `undefined` when none did. */
1718
+ export declare function decisionTransferBy(decision: Pick<Decision, "payload">, actorId: string): DecisionTransfer | undefined;
1665
1719
  export interface DecisionWithRecipient {
1666
1720
  decision: Decision;
1667
1721
  recipient: DecisionRecipient;
@@ -3873,7 +3927,7 @@ export interface ToolSummary {
3873
3927
  approval: boolean;
3874
3928
  }
3875
3929
  export interface DeviceGrantDetail {
3876
- platform: "darwin" | "linux";
3930
+ platform: "darwin" | "linux" | "win32";
3877
3931
  status: "online" | "offline" | "revoked";
3878
3932
  agentExecutionAuthorized: boolean;
3879
3933
  }
@@ -3979,6 +4033,11 @@ export interface AgentUIDataTypes {
3979
4033
  reason: string;
3980
4034
  };
3981
4035
  usage: AgentUsageView;
4036
+ /** A completed `send` to the session's person, live beside its call: the step's `sent-message` part. */
4037
+ "sent-message": {
4038
+ text: string;
4039
+ attachments?: string[];
4040
+ };
3982
4041
  "message-updated": {
3983
4042
  message: AgentSessionMessage;
3984
4043
  };
@@ -3990,6 +4049,33 @@ export interface AgentUIDataTypes {
3990
4049
  };
3991
4050
  }
3992
4051
  //#endregion
4052
+ //#region src/types/record-hierarchy.d.ts
4053
+ /**
4054
+ * Who gains and who loses access when a record moves under another parent
4055
+ * (spec 2026-11-02-hierarchical-records-design.md §4): the diff between the
4056
+ * effective audiences of its current and its new access root. The client
4057
+ * shows it before confirming, and `records.move` refuses when it changed.
4058
+ */
4059
+ export interface MoveImpact {
4060
+ /** Actors who read the subtree after the move and not before. */
4061
+ readonly added: readonly Uuid[];
4062
+ /** Actors who read the subtree before the move and not after. */
4063
+ readonly removed: readonly Uuid[];
4064
+ /** Actors who keep access with another role. */
4065
+ readonly roleChanged: readonly Uuid[];
4066
+ readonly workspaceBefore: boolean;
4067
+ readonly workspaceAfter: boolean;
4068
+ /** The moved record and its descendants. */
4069
+ readonly subtreeSize: number;
4070
+ }
4071
+ /**
4072
+ * Whether a move lets anyone read the subtree who could not before: someone
4073
+ * gains it, or a private tree becomes the workspace's. A role change keeps
4074
+ * the same readers. The one rule an agent's move is always asked on, and
4075
+ * the one the move dialog reads.
4076
+ */
4077
+ export declare function moveWidensAudience(impact: MoveImpact): boolean;
4078
+ //#endregion
3993
4079
  //#region src/types/agent.d.ts
3994
4080
  /**
3995
4081
  * Outcome of a compaction pass: a no-op (context already small enough), an LLM
@@ -4767,6 +4853,18 @@ export interface ToolImpact {
4767
4853
  quoteTruncatedChars: number;
4768
4854
  };
4769
4855
  };
4856
+ /**
4857
+ * Who gains and loses a record's subtree if it moves (`organize`
4858
+ * `file_under`), measured when the person is asked: the approved move is
4859
+ * refused if the audience is no longer this one.
4860
+ */
4861
+ move?: MoveImpact;
4862
+ /**
4863
+ * Where that move files the record, beside `move`: the new parent, named as
4864
+ * `record` is, or `null` for the top level. The card names it before anyone
4865
+ * approves. Its label only.
4866
+ */
4867
+ parent?: NonNullable<ToolImpact["record"]> | null;
4770
4868
  /** Named counts, e.g. `{ records: 1284, brokenLinks: 63 }`. */
4771
4869
  counts?: Record<string, number>;
4772
4870
  warnings?: string[];
@@ -5743,10 +5841,43 @@ export declare class DeviceChannelProtocolError extends SchemaError {
5743
5841
  readonly _tag = "DeviceChannelProtocolError";
5744
5842
  constructor(message: string);
5745
5843
  }
5844
+ /** The shells a worker can open a session in; announced at `authenticate`. */
5845
+ export declare const DEVICE_SHELLS: readonly ["zsh", "bash", "sh", "fish", "pwsh", "powershell"];
5846
+ export type DeviceShell = (typeof DEVICE_SHELLS)[number];
5847
+ /** Whether the machine can drive its desktop through `agent-desktop`. */
5848
+ export declare const DEVICE_DESKTOP_STATES: readonly ["ready", "permission_missing", "no_session", "unavailable"];
5849
+ export type DeviceDesktopState = (typeof DEVICE_DESKTOP_STATES)[number];
5850
+ export declare const DeviceDesktopStatusSchema: z$2.ZodObject<{
5851
+ state: z$2.ZodEnum<{
5852
+ ready: "ready";
5853
+ permission_missing: "permission_missing";
5854
+ no_session: "no_session";
5855
+ unavailable: "unavailable";
5856
+ }>;
5857
+ version: z$2.ZodString;
5858
+ }, z$2.core.$strict>;
5859
+ export type DeviceDesktopStatus = z$2.infer<typeof DeviceDesktopStatusSchema>;
5746
5860
  export declare const DeviceChannelWorkerFrameSchema: z$2.ZodDiscriminatedUnion<[z$2.ZodObject<{
5747
5861
  type: z$2.ZodLiteral<"authenticate">;
5748
5862
  credential: z$2.ZodString;
5749
5863
  protocol: z$2.ZodOptional<z$2.ZodNumber>;
5864
+ desktop: z$2.ZodOptional<z$2.ZodObject<{
5865
+ state: z$2.ZodEnum<{
5866
+ ready: "ready";
5867
+ permission_missing: "permission_missing";
5868
+ no_session: "no_session";
5869
+ unavailable: "unavailable";
5870
+ }>;
5871
+ version: z$2.ZodString;
5872
+ }, z$2.core.$strict>>;
5873
+ shell: z$2.ZodOptional<z$2.ZodEnum<{
5874
+ zsh: "zsh";
5875
+ bash: "bash";
5876
+ sh: "sh";
5877
+ fish: "fish";
5878
+ pwsh: "pwsh";
5879
+ powershell: "powershell";
5880
+ }>>;
5750
5881
  }, z$2.core.$strict>, z$2.ZodObject<{
5751
5882
  id: z$2.ZodUUID;
5752
5883
  leaseToken: z$2.ZodString;
@@ -5774,6 +5905,10 @@ export declare const DeviceChannelWorkerFrameSchema: z$2.ZodDiscriminatedUnion<[
5774
5905
  execution_failed: "execution_failed";
5775
5906
  }>>;
5776
5907
  }, z$2.core.$strict>;
5908
+ background: z$2.ZodOptional<z$2.ZodObject<{
5909
+ pid: z$2.ZodNumber;
5910
+ logPath: z$2.ZodString;
5911
+ }, z$2.core.$strict>>;
5777
5912
  id: z$2.ZodUUID;
5778
5913
  leaseToken: z$2.ZodString;
5779
5914
  type: z$2.ZodLiteral<"complete">;
@@ -5800,9 +5935,14 @@ export declare const DeviceChannelServerFrameSchema: z$2.ZodDiscriminatedUnion<[
5800
5935
  timeoutMs: z$2.ZodNumber;
5801
5936
  command: z$2.ZodOptional<z$2.ZodString>;
5802
5937
  cwd: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodString>>;
5938
+ rootSessionId: z$2.ZodOptional<z$2.ZodString>;
5939
+ background: z$2.ZodOptional<z$2.ZodBoolean>;
5803
5940
  id: z$2.ZodUUID;
5804
5941
  leaseToken: z$2.ZodString;
5805
5942
  type: z$2.ZodLiteral<"command">;
5943
+ }, z$2.core.$strict>, z$2.ZodObject<{
5944
+ type: z$2.ZodLiteral<"release_session">;
5945
+ rootSessionId: z$2.ZodString;
5806
5946
  }, z$2.core.$strict>, z$2.ZodObject<{
5807
5947
  type: z$2.ZodLiteral<"cancel">;
5808
5948
  id: z$2.ZodUUID;
@@ -6305,6 +6445,8 @@ export declare const SYSTEM_ATTRIBUTE_I18N_KEYS: {
6305
6445
  readonly createdBy: "createdBy";
6306
6446
  readonly lastUpdatedBy: "lastUpdatedBy";
6307
6447
  readonly attachments: "attachments";
6448
+ readonly parentId: "parentId";
6449
+ readonly childIds: "childIds";
6308
6450
  };
6309
6451
  export type SystemAttributeI18nKey = (typeof SYSTEM_ATTRIBUTE_I18N_KEYS)[keyof typeof SYSTEM_ATTRIBUTE_I18N_KEYS];
6310
6452
  /**
@@ -6348,6 +6490,34 @@ export declare function getSystemAttributeList(): SystemAttribute[];
6348
6490
  export declare function isManagedSystemAttribute(attribute: {
6349
6491
  id?: string;
6350
6492
  }): boolean;
6493
+ /** Ids of the two relation attributes a hierarchical object carries (`hierarchy:` prefix). */
6494
+ export declare const HIERARCHY_ATTRIBUTE_IDS: readonly ["hierarchy:parentId", "hierarchy:childIds"];
6495
+ /**
6496
+ * Their names, which are also the record's root fields and the filter's system
6497
+ * columns: a rule naming one reads `parent_id`, never relation edges, whatever
6498
+ * type the attribute declares.
6499
+ */
6500
+ export declare const HIERARCHY_ATTRIBUTE_NAMES: ReadonlySet<string>;
6501
+ /** How many children the `childIds` root field carries at most; more are read from the tree. */
6502
+ export declare const HIERARCHY_CHILD_IDS_LIMIT = 6;
6503
+ /**
6504
+ * The parent and children of a hierarchical object, as relation attributes to
6505
+ * the object itself. Empty for a flat object. Their id prefix is `hierarchy:`
6506
+ * (not `system:`), so they are editable: `isManagedSystemAttribute` stays false.
6507
+ */
6508
+ export declare function getHierarchyAttributes(object: {
6509
+ hierarchical?: boolean;
6510
+ name: string;
6511
+ }): RelationAttribute[];
6512
+ /** Whether an attribute is the hierarchy's `parentId` or `childIds`. */
6513
+ export declare function isHierarchyAttribute(attribute: {
6514
+ id?: string;
6515
+ }): boolean;
6516
+ /** The system attributes of one object: the shared ones plus its hierarchy pair, if any. */
6517
+ export declare function getObjectSystemAttributes(object: {
6518
+ hierarchical?: boolean;
6519
+ name: string;
6520
+ }): Attribute[];
6351
6521
  //#endregion
6352
6522
  //#region src/types/schema-groups.d.ts
6353
6523
  /** A synced bundle (core excepted) that owns objects: one sidebar section, label only. */
@@ -7429,6 +7599,8 @@ export interface DBObject extends Timestamps {
7429
7599
  metadata?: Record<string, unknown>;
7430
7600
  /** Smart-folder layout convention for documents attached to records of this object. */
7431
7601
  documentLayout?: DocumentLayout;
7602
+ /** Records of this object may have a parent record of the same object. Stored in `metadata`. */
7603
+ hierarchical?: boolean;
7432
7604
  }
7433
7605
  /**
7434
7606
  * Data for creating a new object.
@@ -7447,6 +7619,7 @@ export interface CreateDBObject {
7447
7619
  system?: boolean;
7448
7620
  metadata?: Record<string, unknown>;
7449
7621
  documentLayout?: DocumentLayout;
7622
+ hierarchical?: boolean;
7450
7623
  }
7451
7624
  export interface UpdateDBObject {
7452
7625
  label?: string;
@@ -7461,6 +7634,7 @@ export interface UpdateDBObject {
7461
7634
  embeddingExpression?: string;
7462
7635
  metadata?: Record<string, unknown>;
7463
7636
  documentLayout?: DocumentLayout;
7637
+ hierarchical?: boolean;
7464
7638
  }
7465
7639
  /**
7466
7640
  * Data for upserting an object.
@@ -11449,6 +11623,10 @@ export declare class ObjectBuilder<TRecord extends Record<string, unknown> = {},
11449
11623
  * sub-folders and installable preset structures inside a record's drive.
11450
11624
  */
11451
11625
  documentLayout(layout: DocumentLayout): this;
11626
+ /**
11627
+ * Let records of this object have a parent record of the same object (a tree).
11628
+ */
11629
+ hierarchical(): this;
11452
11630
  /**
11453
11631
  * Build the final ObjectDefinition
11454
11632
  * @throws ValidationError if required fields are missing or invalid
@@ -12625,7 +12803,10 @@ export declare class GroupBuilder<const N extends string = string, const F exten
12625
12803
  attribute: string;
12626
12804
  }[]]>;
12627
12805
  description(description: string): GroupBuilder<N, F>;
12806
+ /** Every group folds already; this sets whether it starts folded. */
12628
12807
  collapsible(collapsed?: boolean): GroupBuilder<N, F>;
12808
+ /** Keeps the group open, with a plain title that does not fold it (#6439). */
12809
+ alwaysOpen(): GroupBuilder<N, F>;
12629
12810
  private presentation;
12630
12811
  build(): Omit<ContentFieldGroup, "name" | "fields"> & {
12631
12812
  name: N;
@@ -12990,7 +13171,11 @@ export interface FilterTarget {
12990
13171
  /** What the picker offers on it — always a subset of `operators`. */
12991
13172
  offered: readonly FilterOperator[];
12992
13173
  }
12993
- /** An attribute filtered as a whole: its unfolded type's operators (a rollup unfolds its aggregation). */
13174
+ /**
13175
+ * An attribute filtered as a whole: its unfolded type's operators (a rollup
13176
+ * unfolds its aggregation). The hierarchy pair is a relation stored in a
13177
+ * column: it takes that system column's operators.
13178
+ */
12994
13179
  export declare function attributeFilterTarget(attribute: AttributeLike & {
12995
13180
  name: string;
12996
13181
  }): FilterTarget;
@@ -14502,6 +14687,20 @@ export declare const toolImpactSchema: z$2.ZodObject<{
14502
14687
  quoteTruncatedChars: z$2.ZodNumber;
14503
14688
  }, z$2.core.$strict>>;
14504
14689
  }, z$2.core.$strict>>;
14690
+ move: z$2.ZodOptional<z$2.ZodReadonly<z$2.ZodObject<{
14691
+ added: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
14692
+ removed: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
14693
+ roleChanged: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
14694
+ workspaceBefore: z$2.ZodBoolean;
14695
+ workspaceAfter: z$2.ZodBoolean;
14696
+ subtreeSize: z$2.ZodNumber;
14697
+ }, z$2.core.$strict>>>;
14698
+ parent: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodObject<{
14699
+ objectName: z$2.ZodString;
14700
+ id: z$2.ZodString;
14701
+ label: z$2.ZodString;
14702
+ objectIcon: z$2.ZodOptional<z$2.ZodString>;
14703
+ }, z$2.core.$strict>>>;
14505
14704
  counts: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString, z$2.ZodNumber>>;
14506
14705
  warnings: z$2.ZodOptional<z$2.ZodArray<z$2.ZodString>>;
14507
14706
  }, z$2.core.$strict>;
@@ -14589,6 +14788,20 @@ export declare const agentMessagePartSchema: z$2.ZodUnion<readonly [z$2.ZodObjec
14589
14788
  quoteTruncatedChars: z$2.ZodNumber;
14590
14789
  }, z$2.core.$strict>>;
14591
14790
  }, z$2.core.$strict>>;
14791
+ move: z$2.ZodOptional<z$2.ZodReadonly<z$2.ZodObject<{
14792
+ added: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
14793
+ removed: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
14794
+ roleChanged: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
14795
+ workspaceBefore: z$2.ZodBoolean;
14796
+ workspaceAfter: z$2.ZodBoolean;
14797
+ subtreeSize: z$2.ZodNumber;
14798
+ }, z$2.core.$strict>>>;
14799
+ parent: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodObject<{
14800
+ objectName: z$2.ZodString;
14801
+ id: z$2.ZodString;
14802
+ label: z$2.ZodString;
14803
+ objectIcon: z$2.ZodOptional<z$2.ZodString>;
14804
+ }, z$2.core.$strict>>>;
14592
14805
  counts: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString, z$2.ZodNumber>>;
14593
14806
  warnings: z$2.ZodOptional<z$2.ZodArray<z$2.ZodString>>;
14594
14807
  }, z$2.core.$strict>>;
@@ -14767,6 +14980,20 @@ export declare const agentSessionMessageSchema: z$2.ZodObject<{
14767
14980
  quoteTruncatedChars: z$2.ZodNumber;
14768
14981
  }, z$2.core.$strict>>;
14769
14982
  }, z$2.core.$strict>>;
14983
+ move: z$2.ZodOptional<z$2.ZodReadonly<z$2.ZodObject<{
14984
+ added: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
14985
+ removed: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
14986
+ roleChanged: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
14987
+ workspaceBefore: z$2.ZodBoolean;
14988
+ workspaceAfter: z$2.ZodBoolean;
14989
+ subtreeSize: z$2.ZodNumber;
14990
+ }, z$2.core.$strict>>>;
14991
+ parent: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodObject<{
14992
+ objectName: z$2.ZodString;
14993
+ id: z$2.ZodString;
14994
+ label: z$2.ZodString;
14995
+ objectIcon: z$2.ZodOptional<z$2.ZodString>;
14996
+ }, z$2.core.$strict>>>;
14770
14997
  counts: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString, z$2.ZodNumber>>;
14771
14998
  warnings: z$2.ZodOptional<z$2.ZodArray<z$2.ZodString>>;
14772
14999
  }, z$2.core.$strict>>;
@@ -14946,6 +15173,10 @@ export declare const customDataChunkSchemas: {
14946
15173
  utilization: z$2.ZodNumber;
14947
15174
  costUsd: z$2.ZodOptional<z$2.ZodNumber>;
14948
15175
  }, z$2.core.$strict>;
15176
+ readonly "sent-message": z$2.ZodObject<{
15177
+ text: z$2.ZodString;
15178
+ attachments: z$2.ZodOptional<z$2.ZodArray<z$2.ZodString>>;
15179
+ }, z$2.core.$strict>;
14949
15180
  readonly "message-updated": z$2.ZodObject<{
14950
15181
  message: z$2.ZodObject<{
14951
15182
  id: z$2.ZodString;
@@ -15042,6 +15273,20 @@ export declare const customDataChunkSchemas: {
15042
15273
  quoteTruncatedChars: z$2.ZodNumber;
15043
15274
  }, z$2.core.$strict>>;
15044
15275
  }, z$2.core.$strict>>;
15276
+ move: z$2.ZodOptional<z$2.ZodReadonly<z$2.ZodObject<{
15277
+ added: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
15278
+ removed: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
15279
+ roleChanged: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
15280
+ workspaceBefore: z$2.ZodBoolean;
15281
+ workspaceAfter: z$2.ZodBoolean;
15282
+ subtreeSize: z$2.ZodNumber;
15283
+ }, z$2.core.$strict>>>;
15284
+ parent: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodObject<{
15285
+ objectName: z$2.ZodString;
15286
+ id: z$2.ZodString;
15287
+ label: z$2.ZodString;
15288
+ objectIcon: z$2.ZodOptional<z$2.ZodString>;
15289
+ }, z$2.core.$strict>>>;
15045
15290
  counts: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString, z$2.ZodNumber>>;
15046
15291
  warnings: z$2.ZodOptional<z$2.ZodArray<z$2.ZodString>>;
15047
15292
  }, z$2.core.$strict>>;
@@ -15173,6 +15418,20 @@ export declare const customDataChunkSchemas: {
15173
15418
  quoteTruncatedChars: z$2.ZodNumber;
15174
15419
  }, z$2.core.$strict>>;
15175
15420
  }, z$2.core.$strict>>;
15421
+ move: z$2.ZodOptional<z$2.ZodReadonly<z$2.ZodObject<{
15422
+ added: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
15423
+ removed: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
15424
+ roleChanged: z$2.ZodReadonly<z$2.ZodArray<z$2.ZodString>>;
15425
+ workspaceBefore: z$2.ZodBoolean;
15426
+ workspaceAfter: z$2.ZodBoolean;
15427
+ subtreeSize: z$2.ZodNumber;
15428
+ }, z$2.core.$strict>>>;
15429
+ parent: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodObject<{
15430
+ objectName: z$2.ZodString;
15431
+ id: z$2.ZodString;
15432
+ label: z$2.ZodString;
15433
+ objectIcon: z$2.ZodOptional<z$2.ZodString>;
15434
+ }, z$2.core.$strict>>>;
15176
15435
  counts: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString, z$2.ZodNumber>>;
15177
15436
  warnings: z$2.ZodOptional<z$2.ZodArray<z$2.ZodString>>;
15178
15437
  }, z$2.core.$strict>>;
@@ -17913,6 +18172,7 @@ declare const recordStep: z$2.ZodDiscriminatedUnion<[z$2.ZodObject<{
17913
18172
  base: z$2.ZodUnknown;
17914
18173
  props: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString, z$2.ZodUnknown>>;
17915
18174
  }, z$2.core.$strict>>;
18175
+ parentId: z$2.ZodOptional<z$2.ZodUUID>;
17916
18176
  }, z$2.core.$strict>>;
17917
18177
  }, z$2.core.$strict>, z$2.ZodObject<{
17918
18178
  kind: z$2.ZodLiteral<"record.delete">;
@@ -17964,6 +18224,7 @@ export declare const recordOperationSchema: z$2.ZodObject<{
17964
18224
  base: z$2.ZodUnknown;
17965
18225
  props: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString, z$2.ZodUnknown>>;
17966
18226
  }, z$2.core.$strict>>;
18227
+ parentId: z$2.ZodOptional<z$2.ZodUUID>;
17967
18228
  }, z$2.core.$strict>>;
17968
18229
  }, z$2.core.$strict>, z$2.ZodObject<{
17969
18230
  kind: z$2.ZodLiteral<"record.delete">;