@stndrds/schema 1.0.0-alpha.280 → 1.0.0-alpha.281
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.
- package/dist/{all-Ig0ig9wp.d.ts → all-BVp3k9Hi.d.ts} +4 -15
- package/dist/{all-C0hXd79K.d.mts → all-CnIU2anT.d.mts} +4 -15
- package/dist/{chunk-MSIGO7JA.mjs → chunk-A5PPZ2FM.mjs} +1 -1
- package/dist/{chunk-3PGLMGTR.js → chunk-E47WAI5K.js} +4 -4
- package/dist/{chunk-M3WFXOA4.js → chunk-HWZRSXFB.js} +2 -0
- package/dist/{chunk-FAEOVIDJ.js → chunk-LRFLSFIA.js} +3 -3
- package/dist/{chunk-PUMM6SPY.mjs → chunk-MLTXSBOB.mjs} +1 -1
- package/dist/{chunk-TBAD2T7Q.mjs → chunk-ORPCS24B.mjs} +5 -11
- package/dist/{chunk-XTBGGJ3G.js → chunk-OYHBQMC7.js} +3 -3
- package/dist/{chunk-XDA5PZRT.mjs → chunk-SYQDFZ74.mjs} +2 -0
- package/dist/{chunk-MXYCCUNB.js → chunk-TU6ECJFZ.js} +37 -43
- package/dist/{chunk-NUEIGMYS.mjs → chunk-XCLVXM7F.mjs} +1 -1
- package/dist/exceptions.d.mts +2 -0
- package/dist/exceptions.d.ts +2 -0
- package/dist/exceptions.js +39 -39
- package/dist/exceptions.mjs +1 -1
- package/dist/{index-C3P5Dnwt.d.mts → index-DWoqObyG.d.mts} +13 -22
- package/dist/{index-SpFpkWVC.d.ts → index-TMlrIKAY.d.ts} +13 -22
- package/dist/index.d.mts +253 -73
- package/dist/index.d.ts +253 -73
- package/dist/index.js +1175 -286
- package/dist/index.mjs +970 -93
- package/dist/utils.js +8 -8
- package/dist/utils.mjs +2 -2
- package/dist/validation/all.d.mts +2 -2
- package/dist/validation/all.d.ts +2 -2
- package/dist/validation/all.js +29 -29
- package/dist/validation/all.mjs +4 -4
- package/dist/validation/config/index.d.mts +1 -1
- package/dist/validation/config/index.d.ts +1 -1
- package/dist/validation/config/index.js +11 -11
- package/dist/validation/config/index.mjs +2 -2
- package/dist/validation/object/index.js +14 -14
- package/dist/validation/object/index.mjs +2 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SortRule, F as FilterState, V as ViewType, a as ViewConfig, C as ConfigOverrides, b as FilterOperator, D as DetailViewConfig, c as DetailViewDefinition, d as SidePanelConfig, e as Field, A as AttributeGroupField, f as FieldGroup,
|
|
2
|
-
export {
|
|
1
|
+
import { S as SortRule, F as FilterState, V as ViewType, a as ViewConfig, C as ConfigOverrides, b as FilterOperator, D as DetailViewConfig, c as DetailViewDefinition, d as SidePanelConfig, e as Field, A as AttributeGroupField, f as FieldGroup, G as Group, T as TableTab, g as CreateMode, E as EmailsTab, M as MeetingsTab, h as Tab, L as ListViewConfig, i as ListViewDefinition, j as ViewDefinition, k as ListViewTab, l as FilterValue, m as FilterRule, n as DynamicValue, R as RelativeDateValue } from './index-TMlrIKAY.js';
|
|
2
|
+
export { o as ActivityTab, p as AddAttributeInput, q as AdvancedFilterState, r as CreateCustomObjectInput, s as CreateViewInput, t as CurrencyFilterValue, u as CustomTab, v as DayMonthValue, w as DocumentsTab, x as EdgeQuantifier, y as ExtendedFilterRule, z as FilterCombinator, B as FilterGroup, H as FormDensity, I as FormTab, J as FormsTab, K as InverseSource, N as ListViewLayout, O as NO_VALUE_OPERATORS, P as NoValueOperator, Q as OPERATORS_BY_TYPE, U as PhoneFilterValue, W as QueryState, X as RelationOption, Y as RelationOptionsResponse, Z as RelationSource, _ as RichtextTab, $ as SortDirection, a0 as TabType, a1 as TableSource, a2 as UpdateObjectInput, a3 as UpdateViewInput, a4 as ViewOverlay, a5 as getRollupFilterOperators, a6 as isDetailView, a7 as isFieldGroup, a8 as isListView, a9 as isNoValueOperator, aa as multiselectOptionWriteSchema, ab as parseAttributeConfig, ac as parseAttributeConfigForCreate, ad as parseAttributeConfigForUpdate, ae as selectOptionWriteSchema, af as statusGroupSchema, ag as statusOptionWriteSchema } from './index-TMlrIKAY.js';
|
|
3
3
|
import { i as ComputedValueType, j as ComputedReturnType, f as AttributeType, k as ComputedOptionsSource, l as ComputedDependency, m as ComputedPlan, e as RollupAttribute, n as ComputedFormulaAstNode, A as Attribute, o as LocationGranularity, p as Location, F as FormulaAttribute, D as DateAttribute, q as DateRangeValue, r as DocumentAttribute, d as StatusAttribute, c as SelectAttribute, b as MultiselectAttribute, s as Phone, t as Currency, U as UserAttribute, T as TextAttribute, u as PropertySchema, g as CheckboxAttribute, C as CurrencyAttribute, v as TimeFormat, w as PropertyAttribute, x as FormulaReturnType, L as LocationAttribute, O as Option, N as NumberAttribute, P as PhoneAttribute, R as RelationAttribute, B as BilateralConfig, S as SingleRelationAttribute, M as MultiRelationAttribute, y as RelationTarget, a as RichtextAttribute, z as RollupFunction, E as UserReferenceType } from './attributes-D8eHv5Kf.js';
|
|
4
4
|
export { G as AttributeGroup, H as BaseAttribute, h as ComputedAttributeState, I as ComputedFieldKind, J as ComputedFormulaBinaryNode, K as ComputedFormulaBinaryOperator, Q as ComputedFormulaCallNode, V as ComputedFormulaLiteralNode, W as ComputedFormulaParseError, X as ComputedFormulaPathNode, Y as ComputedStateStatus, Z as DateFormat, _ as DateValue, $ as NumberUnit, a0 as OptionPropertyAttribute, a1 as PropertyType, a2 as RELATION_TARGET_ANY, a3 as RichTextAttribute, a4 as StatusGroup, a5 as hasOptions, a6 as inferInverseCardinality, a7 as isAttributeSortable, a8 as isBilateralRelation, a9 as isUniversalRelation, aa as parseComputedFormula, ab as resolvePropertyDefinitions } from './attributes-D8eHv5Kf.js';
|
|
5
5
|
import { IconName, MimeType, ColorId, CountryIso3, CurrencyCode } from '@stndrds/constants';
|
|
@@ -16,7 +16,7 @@ export { StandardSchemaV1 } from '@standard-schema/spec';
|
|
|
16
16
|
import z, { z as z$1 } from 'zod';
|
|
17
17
|
export { V as ValidationMessages } from './types-DYYFto8d.js';
|
|
18
18
|
export { DEFAULT_VALIDATION_MESSAGES, formatZodErrors } from './validation/core/index.js';
|
|
19
|
-
export { S as SCHEMA_LIMITS, c as colorIdSchema, d as detailTabSchema, a as detailViewConfigSchema, i as iconNameSchema, b as inverseSourceSchema, l as listViewConfigSchema, e as listViewTabSchema, p as parseViewConfig, r as relationSourceSchema, t as tableSourceSchema, v as viewConfigByTypeSchema, f as viewTypeSchema } from './all-
|
|
19
|
+
export { S as SCHEMA_LIMITS, c as colorIdSchema, d as detailTabSchema, a as detailViewConfigSchema, i as iconNameSchema, b as inverseSourceSchema, l as listViewConfigSchema, e as listViewTabSchema, p as parseViewConfig, r as relationSourceSchema, t as tableSourceSchema, v as viewConfigByTypeSchema, f as viewTypeSchema } from './all-BVp3k9Hi.js';
|
|
20
20
|
export { a as createFormAttributeValidator, r as rejectUnknownAttributesOrThrow, b as validateDraft, d as validateDraftOrThrow, e as validateObject, f as validateObjectOrThrow } from './helpers-DyoPqiSz.js';
|
|
21
21
|
export { createCheckboxValidator } from './validation/primitives/checkbox.js';
|
|
22
22
|
export { createDateValidator } from './validation/primitives/date.js';
|
|
@@ -1420,6 +1420,26 @@ declare function legacyStatusToSessionState(status: AgentSessionStatus): Session
|
|
|
1420
1420
|
declare const SESSION_TERMINAL_STATUSES: readonly ["completed", "failed", "cancelled", "timeout", "expired"];
|
|
1421
1421
|
type TerminalSessionStatus = (typeof SESSION_TERMINAL_STATUSES)[number];
|
|
1422
1422
|
declare function isTerminalSessionStatus(status: AgentSessionStatus): status is TerminalSessionStatus;
|
|
1423
|
+
/**
|
|
1424
|
+
* Statuses a session can be CLAIMED from — the exact set `tryClaimSession`
|
|
1425
|
+
* accepts before it flips a session to `running`.
|
|
1426
|
+
*
|
|
1427
|
+
* A terminated conversation (cancelled via Stop, or failed) stays resumable:
|
|
1428
|
+
* claiming it for a new message is how the user continues. `waiting_agents` (a
|
|
1429
|
+
* parent parked on children) is claimable so the wake path can CAS-claim it
|
|
1430
|
+
* before enqueuing a turn. `active` is not — a turn is already running — and
|
|
1431
|
+
* neither is `expired`, which is the one terminal outcome a session never
|
|
1432
|
+
* resumes from.
|
|
1433
|
+
*
|
|
1434
|
+
* Lives here, beside the union it partitions, because three places must agree:
|
|
1435
|
+
* the SQL claim, the in-memory mock that stands in for it, and every caller
|
|
1436
|
+
* that wants to refuse BEFORE it writes rather than discover the refusal after.
|
|
1437
|
+
* A hand-copied fourth copy is how a guard comes to accept what the claim will
|
|
1438
|
+
* reject.
|
|
1439
|
+
*/
|
|
1440
|
+
declare const CLAIMABLE_SESSION_STATUSES: readonly ["idle", "completed", "waiting_human", "waiting_agents", "cancelled", "failed", "timeout"];
|
|
1441
|
+
type ClaimableSessionStatus = (typeof CLAIMABLE_SESSION_STATUSES)[number];
|
|
1442
|
+
declare function isClaimableSessionStatus(status: AgentSessionStatus): status is ClaimableSessionStatus;
|
|
1423
1443
|
type AgentSessionMode = "interactive" | "autonomous";
|
|
1424
1444
|
/** Whether a class of tool call is confirmed by a human or executed straight away. */
|
|
1425
1445
|
type ApprovalMode = "ask" | "auto";
|
|
@@ -2687,6 +2707,26 @@ interface RecordDocuments {
|
|
|
2687
2707
|
/** Documents grouped by attribute name (includes system 'attachments' attribute) */
|
|
2688
2708
|
byAttribute: Record<string, DocumentWithFiles[]>;
|
|
2689
2709
|
}
|
|
2710
|
+
/**
|
|
2711
|
+
* One record that holds documents, with how much sits at its drive root and
|
|
2712
|
+
* when it last moved. The wire shape of `GET /documents/record-owners`.
|
|
2713
|
+
*/
|
|
2714
|
+
interface DocumentRecordOwner {
|
|
2715
|
+
recordId: Uuid;
|
|
2716
|
+
objectName: string;
|
|
2717
|
+
label: string;
|
|
2718
|
+
/** Live entries at the drive root — files and folders, not the subtree. */
|
|
2719
|
+
itemCount: number;
|
|
2720
|
+
/** Root entries that are files. The cross-record listing only shows records where this is > 0 — auto-provisioned empty folders are not "holding documents". */
|
|
2721
|
+
fileCount: number;
|
|
2722
|
+
/** ISO timestamp of the newest document edge — what "recent" sorts on. */
|
|
2723
|
+
lastActivityAt: string;
|
|
2724
|
+
}
|
|
2725
|
+
/** One page of {@link DocumentRecordOwner}s; `nextOffset: null` is the last page. */
|
|
2726
|
+
interface DocumentRecordOwnerPage {
|
|
2727
|
+
data: DocumentRecordOwner[];
|
|
2728
|
+
nextOffset: number | null;
|
|
2729
|
+
}
|
|
2690
2730
|
|
|
2691
2731
|
/**
|
|
2692
2732
|
* Extracts a safe error message from an unknown error value.
|
|
@@ -3598,12 +3638,27 @@ type ExtractRecordUpdateStrict<TBuilder> = TBuilder extends {
|
|
|
3598
3638
|
};
|
|
3599
3639
|
} ? WithoutSystemFields<R> : never;
|
|
3600
3640
|
|
|
3601
|
-
/**
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
type
|
|
3641
|
+
/**
|
|
3642
|
+
* Lifecycle of a Reflex. There is no "broken" state: a failing reflex disarms
|
|
3643
|
+
* itself. `learning` was removed with the engine alignment (#2580) — it
|
|
3644
|
+
* returns with webhook ingest, which is what made it observable.
|
|
3645
|
+
*/
|
|
3646
|
+
type ReflexState = "armed" | "disarmed";
|
|
3647
|
+
/** A version is proposed, then promoted then eventually replaced — or rejected. */
|
|
3648
|
+
type ReflexVersionStatus = "candidate" | "promoted" | "superseded" | "rejected";
|
|
3649
|
+
/**
|
|
3650
|
+
* `live` and `rehearsal` are the old module's vocabulary (`rehearsal`
|
|
3651
|
+
* captures outbound effects instead of performing them); `promoted` and `lkg`
|
|
3652
|
+
* are the engine's — they name which artefact answered a run (#2580). One
|
|
3653
|
+
* union because both write the same `reflex_runs.mode` column.
|
|
3654
|
+
*/
|
|
3655
|
+
type RunMode = "live" | "rehearsal" | "promoted" | "lkg";
|
|
3656
|
+
/**
|
|
3657
|
+
* The old module's slice of {@link RunMode} — what `ReflexRunRepository.start()`
|
|
3658
|
+
* accepts and run tokens carry. The engine's `promoted`/`lkg` rows are written
|
|
3659
|
+
* by the run-record sink, never through that path.
|
|
3660
|
+
*/
|
|
3661
|
+
type ModuleRunMode = Extract<RunMode, "live" | "rehearsal">;
|
|
3607
3662
|
/**
|
|
3608
3663
|
* One thing a run did, or would have done. Recorded by the gateway, never by
|
|
3609
3664
|
* the Reflex code itself (D19) — code that reports on its own behaviour is
|
|
@@ -6066,6 +6121,18 @@ declare class ObjectBuilder<TRecord extends Record<string, unknown> = {}> implem
|
|
|
6066
6121
|
* order fall back to alphabetical order at the consumer level.
|
|
6067
6122
|
*/
|
|
6068
6123
|
order(value: number): this;
|
|
6124
|
+
/**
|
|
6125
|
+
* Hide this object from navigation surfaces — the sidebar data section and
|
|
6126
|
+
* the command palette, which already honour `metadata.hidden`. For objects
|
|
6127
|
+
* that own a dedicated surface: `drives` has the Drive page, so listing it
|
|
6128
|
+
* beside business objects would offer the same thing twice under two
|
|
6129
|
+
* different affordances.
|
|
6130
|
+
*
|
|
6131
|
+
* The object stays whole everywhere else: API, search, permissions, agent
|
|
6132
|
+
* tools, filters and record pages all continue to see it. This hides a
|
|
6133
|
+
* navigation entry; it never restricts access.
|
|
6134
|
+
*/
|
|
6135
|
+
hidden(): this;
|
|
6069
6136
|
/**
|
|
6070
6137
|
* Set the label expression template for displaying records
|
|
6071
6138
|
* This is REQUIRED for every object.
|
|
@@ -6202,51 +6269,6 @@ declare class GroupBuilder {
|
|
|
6202
6269
|
*/
|
|
6203
6270
|
build(): FieldGroup;
|
|
6204
6271
|
}
|
|
6205
|
-
/**
|
|
6206
|
-
* Builder for creating relation groups inside a form tab
|
|
6207
|
-
*
|
|
6208
|
-
* @example
|
|
6209
|
-
* ```typescript
|
|
6210
|
-
* relationGroup("contacts", "Contacts", "contacts")
|
|
6211
|
-
* .columns("name", "email", "phone")
|
|
6212
|
-
* .allowCreate()
|
|
6213
|
-
* .collapsible()
|
|
6214
|
-
* ```
|
|
6215
|
-
*/
|
|
6216
|
-
declare class RelationGroupBuilder {
|
|
6217
|
-
private data;
|
|
6218
|
-
constructor(id: string, label: string, attribute: string);
|
|
6219
|
-
/**
|
|
6220
|
-
* Set group description
|
|
6221
|
-
*/
|
|
6222
|
-
description(value: string): this;
|
|
6223
|
-
/**
|
|
6224
|
-
* Make group collapsible
|
|
6225
|
-
* @param collapsed - Initial collapsed state (default: false)
|
|
6226
|
-
*/
|
|
6227
|
-
collapsible(collapsed?: boolean): this;
|
|
6228
|
-
/**
|
|
6229
|
-
* Set display order
|
|
6230
|
-
*/
|
|
6231
|
-
order(value: number): this;
|
|
6232
|
-
/**
|
|
6233
|
-
* Set columns to display in the relations table
|
|
6234
|
-
* @example .columns("name", "email", "phone")
|
|
6235
|
-
*/
|
|
6236
|
-
columns(...names: string[]): this;
|
|
6237
|
-
/**
|
|
6238
|
-
* Set the group as read-only (no add/remove/edit)
|
|
6239
|
-
*/
|
|
6240
|
-
readOnly(value?: boolean): this;
|
|
6241
|
-
/**
|
|
6242
|
-
* Allow creating new related records inline
|
|
6243
|
-
*/
|
|
6244
|
-
allowCreate(value?: boolean): this;
|
|
6245
|
-
/**
|
|
6246
|
-
* Build the relation group definition
|
|
6247
|
-
*/
|
|
6248
|
-
build(): RelationGroup;
|
|
6249
|
-
}
|
|
6250
6272
|
/**
|
|
6251
6273
|
* Base tab configuration shared across tab types
|
|
6252
6274
|
*/
|
|
@@ -6539,9 +6561,9 @@ declare class TabBuilder {
|
|
|
6539
6561
|
order(value: number): this;
|
|
6540
6562
|
/**
|
|
6541
6563
|
* Create a form tab with groups
|
|
6542
|
-
* @example .form(group("info", "Info").fields("name", "email")
|
|
6564
|
+
* @example .form(group("info", "Info").fields("name", "email"))
|
|
6543
6565
|
*/
|
|
6544
|
-
form(...groups: (GroupBuilder |
|
|
6566
|
+
form(...groups: (GroupBuilder | Group)[]): DetailViewBuilder;
|
|
6545
6567
|
/**
|
|
6546
6568
|
* Create a table tab for a relation attribute on the current object
|
|
6547
6569
|
*
|
|
@@ -7020,22 +7042,6 @@ declare function listView(name: string, label: string): ListViewBuilder;
|
|
|
7020
7042
|
* ```
|
|
7021
7043
|
*/
|
|
7022
7044
|
declare function group(id: string, label: string): GroupBuilder;
|
|
7023
|
-
/**
|
|
7024
|
-
* Create a new relation group builder
|
|
7025
|
-
*
|
|
7026
|
-
* @param id - Group identifier
|
|
7027
|
-
* @param label - Display label
|
|
7028
|
-
* @param attribute - Relation attribute name on the source object
|
|
7029
|
-
*
|
|
7030
|
-
* @example
|
|
7031
|
-
* ```typescript
|
|
7032
|
-
* relationGroup("contacts", "Contacts", "contacts")
|
|
7033
|
-
* .columns("name", "email", "phone")
|
|
7034
|
-
* .allowCreate()
|
|
7035
|
-
* .collapsible()
|
|
7036
|
-
* ```
|
|
7037
|
-
*/
|
|
7038
|
-
declare function relationGroup(id: string, label: string, attribute: string): RelationGroupBuilder;
|
|
7039
7045
|
|
|
7040
7046
|
/**
|
|
7041
7047
|
* Standard Schema v1 integration for @stndrds/schema
|
|
@@ -7441,6 +7447,20 @@ declare class FlagService {
|
|
|
7441
7447
|
* @returns Map of flag names to resolved values
|
|
7442
7448
|
*/
|
|
7443
7449
|
resolveAll(context?: FlagResolutionContext): Promise<Map<string, unknown>>;
|
|
7450
|
+
/**
|
|
7451
|
+
* Resolve every flag from static defaults only, never touching the
|
|
7452
|
+
* overrides repository.
|
|
7453
|
+
*
|
|
7454
|
+
* For callers running outside any tenant context (e.g. tenant-less public
|
|
7455
|
+
* HTTP routes such as the connectors OAuth callback): overrides are
|
|
7456
|
+
* tenant-scoped in storage, so without a tenant there is nothing to fetch —
|
|
7457
|
+
* and asking the repository anyway would require the very context that is
|
|
7458
|
+
* absent.
|
|
7459
|
+
*/
|
|
7460
|
+
resolveAllStatic(): Map<string, unknown>;
|
|
7461
|
+
/** Flag names known to this service: registry entries plus static defaults. */
|
|
7462
|
+
private collectFlagNames;
|
|
7463
|
+
private resolveNames;
|
|
7444
7464
|
/**
|
|
7445
7465
|
* Resolve a single flag with full metadata.
|
|
7446
7466
|
*
|
|
@@ -7634,6 +7654,29 @@ declare const MEMORY_OBJECT: ObjectDefinition;
|
|
|
7634
7654
|
declare const MEMORY_VIEW: DetailViewDefinition;
|
|
7635
7655
|
declare const MEMORY_LIST_VIEW: ListViewDefinition;
|
|
7636
7656
|
|
|
7657
|
+
/** The native object name. Imported instead of retyped at every call site. */
|
|
7658
|
+
declare const DRIVE_OBJECT_NAME = "drives";
|
|
7659
|
+
/**
|
|
7660
|
+
* A drive is a storage space that happens to be a record.
|
|
7661
|
+
*
|
|
7662
|
+
* It declares no storage attribute on purpose: every record already owns a
|
|
7663
|
+
* drive through the `attachments` edge, so filing a document into a drive is
|
|
7664
|
+
* the ordinary attachment path with no drive-specific code behind it.
|
|
7665
|
+
*
|
|
7666
|
+
* No `owner` attribute either — same reasoning as MEMORY_OBJECT. Resource
|
|
7667
|
+
* visibility owns scoping: a drive is `workspace` or `private` with a single
|
|
7668
|
+
* `ownedBy` actor enforced server-side on every read path. A plain user value
|
|
7669
|
+
* could only describe an intent, never restrict access.
|
|
7670
|
+
*
|
|
7671
|
+
* Sealed: a drive is infrastructure, not a business object. Its identity is
|
|
7672
|
+
* the tree it carries, and an attribute added at runtime would be an attribute
|
|
7673
|
+
* the Drive surface renders nowhere — present in the API and invisible to the
|
|
7674
|
+
* person who added it.
|
|
7675
|
+
*/
|
|
7676
|
+
declare const DRIVE_OBJECT: ObjectDefinition;
|
|
7677
|
+
declare const DRIVE_VIEW: DetailViewDefinition;
|
|
7678
|
+
declare const DRIVE_LIST_VIEW: ListViewDefinition;
|
|
7679
|
+
|
|
7637
7680
|
/**
|
|
7638
7681
|
* Registry for developer-defined view definitions
|
|
7639
7682
|
*
|
|
@@ -9793,4 +9836,141 @@ type SchemaPlanProposalInput = z$1.input<typeof structuralSchemaPlanSchema>;
|
|
|
9793
9836
|
type ParsedSchemaPlanProposal = z$1.output<typeof schemaPlanSchema>;
|
|
9794
9837
|
type ParsedPersistedSchemaPlan = z$1.output<typeof persistedSchemaPlanSchema>;
|
|
9795
9838
|
|
|
9796
|
-
export { AGENT_UI_BATCH_MAX_BYTES, AGENT_UI_BATCH_MAX_ITEMS, type AIAvailableModel, type AIBatchAnswerValue, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIBatchQuestionType, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AIChatNotification, type AICompactionSummary, type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AISubagentStatus, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, AUDIT_ACTIONS, AUDIT_RESOURCE_TYPES, type AcceptsCandidate, type AccessLevel, type Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddSharedMailboxInput, type AgentApprovalPolicy, type AgentBlueprint, AgentBuilder, type AgentBuilderConfig, type AgentConfig, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentMessageAttachment, type AgentMessagePart, type AgentRequiredPermission, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionPatchLiveEvent, type AgentSessionStatus, type AgentTodoPlan, type AgentTodoPlanStatus, type AgentTodoPlanView, type AgentToolCall, type AgentTriggerBlueprint, type AgentTriggerDefinition, type AgentTriggerType, type AgentUIDataTypes, type AgentUIMessageBatch, type AgentUIMessageBatchItem, type AgentUnreadPatchLiveEvent, type AgentUsageView, type AgentWorkMode, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type ApprovalMode, type AssignActorRoleInput, type AssignRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, AttributeGroupField, type AttributeLifecycleCapabilities, type AttributeLike, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, type AuthorizedGlobalSearchResult, type AuthorizedRecordSearchResult, type AuthorizedSearchPage, BEHAVIOR_PROPERTIES, BROWSER_PREVIEW_STATUSES, BYTE_UNIT_LABELS, BilateralConfig, type BoundingBox, type BrowserPreviewDescriptor, type BrowserPreviewStatus, type BrowserPreviewUpdatedLiveEvent, type BuilderConfig, type ByteMagnitude, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, CONNECTOR_CALLBACK_PARAM, COUNT_MODES, type CalendarConnectorProviderId, type CalendarMeetingEndedData, type CalendarMeetingTranscriptCreatedData, type ChannelRevokedLiveEvent, CheckboxAttribute, type CollectionPage, type CollectionRequest, type CollectionResponse, type CompactionStrategy, type CompileComputedFormulaInput, type ComputedCompileAttribute, type ComputedCompileObject, type ComputedCompileSchema, ComputedDependency, type ComputedDependencyGraphNode, ComputedFormulaAstNode, ComputedFormulaCompileError, type ComputedFormulaResult, type ComputedFunctionCategory, type ComputedFunctionMetadata, type ComputedFunctionName, type ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConfigOverrides, type ConnectMcpServerInput, type ConnectionStatus, type ConnectionStatusId, type ConnectionView, type ConnectorCallbackStatusValue, type ConnectorProviderId, type ConnectorProvidersResult, type ConnectorScope, type ContinuationPage, type ConversationDisplayTitleInput, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateDocument, type CreateDocumentLink, type CreateFile, CreateMode, type CreateNotificationInput, type CreateNotificationRecipientInput, type CreateObjectRecord, type CreatePermissionInput, type CreateReflexInput, type CreateReflexVersionInput, type CreateRoleInput, type CreateUserProfile, type CriticConfig, Currency, CurrencyAttribute, type CustomAttributeValue, type CustomObjectInfo, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, type DBViewSyncResolution, DB_COLUMN_FIELDS, DEFAULT_AGENT_EXECUTION_CONFIG, DEFAULT_APPROVAL_POLICY, DEFAULT_LABEL_FALLBACK, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, DateRangeValue, type DefaultResolutionContext, type DefaultRoleName, type DeletedMode, DetailViewBuilder, DetailViewConfig, DetailViewDefinition, type Document, DocumentAttribute, type DocumentFile, type DocumentKind, DocumentLayout, type DocumentListOptions, type DocumentWithFiles, type DocumentWithSubCount, DocumentsTabConfig, type DomainEvent, type DriftAttributeInfo, DynamicValue, type DynamicValueResolver, EMPTY_VALUE_PLACEHOLDER, ESTIMATED_COUNT_CAP, type Eager, type EffectivePermissions, type EmailAttachmentMeta, type EmailConnectorProviderId, type EmailDirection, type EmailParticipantRef, type EmailParticipantRole, type EmailProvider, EmailsTab, EmailsTabConfig, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, Field, FieldGroup, type FieldHistoryEntry, type File, type FileListOptions, type FileOcrStatus, FilterOperator, FilterRule, FilterState, FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, type FlagResolutionContext, FlagService, type FlagValueType, FormBuilder, type FormDefinition, type FormFieldRef, type FormFieldsRow, type FormFreeFieldRef, type FormHeadingRow, FormRegistry, type FormRow, FormRowBuilder, type FormSeparatorRow, type FormSlot, type FormSlotFieldRef, type FormStatus, type FormStep, FormStepBuilder, type FormSubmission, type FormSubmissionStatus, type FormSubmittedAgentEvent, type FormTextRow, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, Group, GroupBuilder, type HumanRequestNeed, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InviteUserInput, type IsWithinBounds, LIVE_EVENT_TYPES, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, ListViewTabVisibility, type LiveChannel, type LiveChannelKind, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveNotification, type LiveNotificationRecipient, type LiveNotificationRecipientPatch, Location, LocationAttribute, LocationGranularity, MAX_TODOS, MAX_TODO_DESCRIPTION_CHARS, MAX_TODO_ID_CHARS, MAX_TODO_RESULT_CHARS, MEMORY_LIST_VIEW, MEMORY_OBJECT, MEMORY_VIEW, type MailboxAccount, type MailboxAccountVisibility, type MailboxCursor, type MailboxEmail, type MailboxListResponse, type MailboxQuery, type MailboxReadState, type MailboxThread, type MailboxThreadDetail, type McpCatalogEntry, type McpServerAuthInput, type McpServerAuthType, type McpServerStatus, type McpServerView, type Meeting, type MeetingLinkedRecord, type MeetingParticipantRef, type MeetingParticipantRole, type MeetingResponseStatus, type MeetingStatus, type MeetingsListResponse, type MeetingsQuery, MeetingsTab, MeetingsTabConfig, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NATIVE_AGENT_UI_PART_IDS_METADATA_KEY, NATIVE_AGENT_UI_PART_IDS_METADATA_SCHEMA_VERSION, NOTIFICATION_INBOX_STATES, NOTIFICATION_KINDS, NOTIFICATION_PRIORITIES, NOTIFICATION_SENSITIVITIES, NOTIFICATION_TYPES_V1, NOTIFICATION_TYPE_AGENT_QUESTION_REQUESTED, NOTIFICATION_TYPE_AGENT_SESSION_COMPLETED, NOTIFICATION_TYPE_AGENT_SESSION_FAILED, NOTIFICATION_TYPE_AGENT_SESSION_TIMEOUT, NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN, NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED, NOTIFICATION_WORK_STATES, type NativeAgentUIPartIds, type NativeAgentUIPartIdsMetadata, NoopGeocodingAdapter, type Notification, type NotificationCountPatchLiveEvent, type NotificationCounts, type NotificationCreatedLiveEvent, type NotificationInboxState, type NotificationKind, type NotificationListParams, type NotificationListResult, type NotificationPriority, type NotificationRecipient, type NotificationRecipientPatchLiveEvent, type NotificationSensitivity, type NotificationSubject, type NotificationType, type NotificationV1Type, type NotificationWithRecipient, type NotificationWorkState, NumberAttribute, OPERATOR_SPECS, ObjectBuilder, type ObjectConfig, ObjectDefinition, type ObjectPermissions, ObjectRecord, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type ParsedPersistedSchemaPlan, type ParsedSchemaPlanProposal, type Permission, type PermissionScope, type PersistedDefaultViewTarget, type PersistedSchemaPlan, type PersistedSchemaPlanAdditive, Phone, PhoneAttribute, type PlannedAttribute, type PlannedAttributeRemoval, type PlannedObject, type PlannedObjectRemoval, type PlannedRename, PropertyAttribute, PropertySchema, type ProposedDefaultViewTarget, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentAttributeBuilder, type QualifiedDocumentBrand, RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY, REMOVED_OPERATOR_REPLACEMENTS, type ReasoningPartData, type RecordAgentEvent, type RecordCreatedLiveEvent, type RecordDeletedLiveEvent, type RecordDocuments, type RecordFieldPatch, type RecordLiveSnapshot, type RecordMetadata, type RecordPatchLiveEvent, type RecordRemovedLiveEvent, type Reflex, type ReflexRun, type ReflexState, type ReflexVersion, type ReflexVersionStatus, type RegexGenerationInput, RelationAttribute, RelationGroup, RelationGroupBuilder, RelationTarget, RelativeDateValue, type ResolutionContext, type ResolvedFlag, ResourceVisibility, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, RichtextTabConfig, type Role, RollupAttribute, RollupFunction, type RunEffect, type RunMode, SCHEMA_PLAN_LIMITS, SESSION_TERMINAL_STATUSES, SKILL_LIST_VIEW, SKILL_OBJECT, SKILL_VIEW, STANDARD_SCHEMA_VENDOR, SYNONYM_ALIASES, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FILTER_ATTRIBUTE_TYPES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SchemaDriftResult, type SchemaPlan, type SchemaPlanAdditive, type SchemaPlanAdditiveBase, type SchemaPlanChangeSet, type SchemaPlanDestructive, type SchemaPlanDraft, type SchemaPlanDraftResponse, type SchemaPlanDraftState, type SchemaPlanDraftStatus, type SchemaPlanDraftWrite, type SchemaPlanImpact, type SchemaPlanImpactEntry, type SchemaPlanOutcome, type SchemaPlanProposalInput, type SchemaPlanSampleData, type SchemaPlanStatus, type SchemaPlanViewChanges, type SchemaState, type SearchOptions, SelectAttribute, type SessionApprovalMode, type SessionOutcome, type SessionParkedOn, type SessionPhase, type SessionState, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, SortRule, type StandardSchemaIssue, type StandardSchemaResult, type StartConnectorAuthInput, type StartConnectorAuthResult, type StaticFlagDefault, StatusAttribute, type StorageProvider, type StoredSchemaPlan, type SystemAttribute, type SystemAttributeI18nKey, type SystemFields, type SystemObjectDriftInfo, type SystemPermissions, type SystemResource, TEXT_FORMAT_PATTERNS, TODAY_DEFAULT, TODO_PLAN_STATUSES, TODO_STATUSES, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, type TenantSettings, type TerminalSessionStatus, TextAttribute, type TextPartData, type ThinkingPartData, TimeFormat, Timestamps, type ToolImpact, type ToolPartData, type ToolPartErrorCode, type ToolPartState, type TriggerEventType, USER_STATUSES, USER_WORK_POSTURES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateDocument, type UpdateFile, type UpdateRoleInput, type UpdateUserProfile, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserLike, type UserProfile, UserReferenceType, type UserRoleAssignment, type UserStatus, type UserWorkPosture, Uuid, ValidationError, type ValueRef, type ViewBaselineOrigin, type ViewChange, ViewConfig, type ViewConfigDelta, ViewDefinition, type ViewProjectionStaleLiveEvent, type ViewStateEntry, type ViewStateResolution, type ViewSyncPayload, ViewType, type WithCustomAttributes, type WithCustomRecordAttributes, type WithoutSystemFields, accessLevelToActions, actionsToAccessLevel, agent, agentDisplayName, applyPipes, applyRelationProps, assertAcyclicComputedDependencies, booleanFlag, buildAgentFallbackTitle, buildPermissionFlags, buildPropertySchema, buildQualifiedAttribute, canonicalizeFilterValue, checkbox, collectQualifiedRuleIssues, compileComputedFormula, compileRollupAttribute, computeByteMagnitude, conversationDisplayTitle, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, currentActor, date, dateInTimezone, dateValueStart, deriveInitials, destructiveSchema, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, evaluateRecordFilterState, extractAttributeNames, extractCurrencyFilterValue, extractFilterValue, extractValueRefs, flagRegistry, form, formRegistry, formatAttributeValue, formatByteSize, formatComputedResult, formatLocationValue, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRecordCreatorPrincipalId, getSlotFieldTargets, getSystemAttributeI18nKey, getSystemAttributeList, getUserDisplayName, group, hasDestructiveEntries, includesAction, inferRollupReturnType, isAgentUIMessageBatch, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isCheckboxEquality, isComputedFunctionName, isDateRangeValue, isDefaultRole, isDocumentAttribute, isDynamicValue, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isManagedSystemAttribute, isNotEmpty, isNullishOrEmptyString, isPlainRecord, isRelativeDateValue, isSetMembershipOperator, isStandardSchema, isTerminalSessionStatus, isTerminalState, isValuePresent, jsonFlag, legacyStatusToSessionState, listView, liveChannelKey, location, matchesAccepts, multiselect, nativeAgentUIPartIdMetadataKey, normalizeDateValue, normalizeFilterRule, normalizeForEdgeRpc, normalizeOperator, now, number, numberFlag, object, parseCountMode, parseLiveChannelKey, parseNativeAgentUIPartIdsMetadata, parseOptionalCountMode, parseQualifiedAttribute, persistedDefaultViewTargetSchema, persistedSchemaPlanSchema, phone, plannedAttributeSchema, plannedInlineAttributeSchema, plannedObjectSchema, proposedDefaultViewTargetSchema, registry, relation, relationGroup, relationPropertyDefs, renderLabelExpression, resetViewToDefault, resolveAttributeDefaultValue, resolveEffectiveFilterType, resolveFieldRequired, resolveIsWithinBounds, resolveTextPattern, resolveUtcDayBounds, richtext, rollup, rollupToFormulaExpression, schemaPlanSchema, select, sessionStateToLegacyStatus, status, stringFlag, text, toMultiValueOperator, toUndefinedIfEmpty, toUtcDayString, today, user, validateAttributeName, validateLabelExpression, validateObjectName, validateQualifiedRule, validateViewName, viewRegistry, viewStateKey, viewSyncPayload };
|
|
9839
|
+
/**
|
|
9840
|
+
* Where an operation is visible. Drives live navigation: the client turns a
|
|
9841
|
+
* focus into a route and, when following, goes there before rendering the
|
|
9842
|
+
* overlay.
|
|
9843
|
+
*/
|
|
9844
|
+
interface DraftFocus {
|
|
9845
|
+
objectId?: string;
|
|
9846
|
+
viewId?: string;
|
|
9847
|
+
recordId?: string;
|
|
9848
|
+
tabId?: string;
|
|
9849
|
+
groupId?: string;
|
|
9850
|
+
fieldId?: string;
|
|
9851
|
+
}
|
|
9852
|
+
/** A view as the fold sees it — published shape, no persistence concerns. */
|
|
9853
|
+
interface DraftableView {
|
|
9854
|
+
id: string;
|
|
9855
|
+
objectId: string;
|
|
9856
|
+
type: "detail" | "list";
|
|
9857
|
+
label: string;
|
|
9858
|
+
tabs: Tab[];
|
|
9859
|
+
config: {
|
|
9860
|
+
tabs?: ListViewTab[];
|
|
9861
|
+
} & Record<string, unknown>;
|
|
9862
|
+
}
|
|
9863
|
+
interface DraftableObject {
|
|
9864
|
+
id: string;
|
|
9865
|
+
name: string;
|
|
9866
|
+
label: string;
|
|
9867
|
+
icon?: string;
|
|
9868
|
+
}
|
|
9869
|
+
interface DraftableAttribute {
|
|
9870
|
+
id: string;
|
|
9871
|
+
objectId: string;
|
|
9872
|
+
name: string;
|
|
9873
|
+
label: string;
|
|
9874
|
+
attributeType: string;
|
|
9875
|
+
}
|
|
9876
|
+
interface DraftableSampleRecord {
|
|
9877
|
+
id: string;
|
|
9878
|
+
objectId: string;
|
|
9879
|
+
values: Record<string, unknown>;
|
|
9880
|
+
}
|
|
9881
|
+
/**
|
|
9882
|
+
* Everything an operation may read or write.
|
|
9883
|
+
*
|
|
9884
|
+
* The client folds a draft over this shape to render the overlay; the server
|
|
9885
|
+
* folds the same draft over the same shape at publish time. One fold, so a
|
|
9886
|
+
* preview is the result rather than a prediction of it.
|
|
9887
|
+
*/
|
|
9888
|
+
interface DraftableState {
|
|
9889
|
+
objects: DraftableObject[];
|
|
9890
|
+
attributes: DraftableAttribute[];
|
|
9891
|
+
views: DraftableView[];
|
|
9892
|
+
sampleRecords: DraftableSampleRecord[];
|
|
9893
|
+
}
|
|
9894
|
+
/** Context passed to `describe` so summaries can be localised. */
|
|
9895
|
+
interface LabelContext {
|
|
9896
|
+
locale: "fr" | "en";
|
|
9897
|
+
}
|
|
9898
|
+
/** The shape every operation payload shares. */
|
|
9899
|
+
interface BaseOperation {
|
|
9900
|
+
/** This operation's own id, used to remove it from a draft. */
|
|
9901
|
+
id: string;
|
|
9902
|
+
type: string;
|
|
9903
|
+
}
|
|
9904
|
+
|
|
9905
|
+
/**
|
|
9906
|
+
* Any registered operation. Structural rather than a closed union so the three
|
|
9907
|
+
* slices stay independent of one another; the registry is what makes a type
|
|
9908
|
+
* real, and `applyOperations` rejects anything it does not hold.
|
|
9909
|
+
*/
|
|
9910
|
+
type ViewOperation = BaseOperation & Record<string, unknown>;
|
|
9911
|
+
/**
|
|
9912
|
+
* The fold.
|
|
9913
|
+
*
|
|
9914
|
+
* Runs identically on the client overlay and on the server at publish time, so
|
|
9915
|
+
* what a person previews is the result rather than a prediction of it. Pure:
|
|
9916
|
+
* never mutates `state`. Throws at the first operation that cannot apply, so a
|
|
9917
|
+
* caller that catches has applied nothing.
|
|
9918
|
+
*/
|
|
9919
|
+
declare function applyOperations(state: DraftableState, operations: readonly ViewOperation[]): DraftableState;
|
|
9920
|
+
/** Where an operation is visible. Turned into a route by the client. */
|
|
9921
|
+
declare function focusOf(operation: ViewOperation): DraftFocus;
|
|
9922
|
+
/** One human-readable line per operation, in the reader's language. */
|
|
9923
|
+
declare function describeOperations(operations: readonly ViewOperation[], ctx: LabelContext): string[];
|
|
9924
|
+
/**
|
|
9925
|
+
* Parses a payload against its own declared schema. The single gate an
|
|
9926
|
+
* operation passes before it reaches a draft.
|
|
9927
|
+
*/
|
|
9928
|
+
declare function parseOperation(candidate: unknown): ViewOperation;
|
|
9929
|
+
|
|
9930
|
+
/**
|
|
9931
|
+
* The single declaration of an operation. Four consumers derive from it instead
|
|
9932
|
+
* of each keeping their own copy: the client mutation, the server write, the
|
|
9933
|
+
* agent tool schema, and the human-readable summary.
|
|
9934
|
+
*/
|
|
9935
|
+
interface OperationDef<T extends BaseOperation = BaseOperation> {
|
|
9936
|
+
/** Discriminant — also the agent tool's name. */
|
|
9937
|
+
type: T["type"];
|
|
9938
|
+
/** Payload contract — also the agent tool's input schema. */
|
|
9939
|
+
schema: z$1.ZodType<T>;
|
|
9940
|
+
/** The fold. Must be pure: never mutate `state`. */
|
|
9941
|
+
apply: (state: DraftableState, op: T) => DraftableState;
|
|
9942
|
+
/** Where this operation is visible. */
|
|
9943
|
+
focus: (op: T) => DraftFocus;
|
|
9944
|
+
/** One-line human summary. */
|
|
9945
|
+
describe: (op: T, ctx: LabelContext) => string;
|
|
9946
|
+
}
|
|
9947
|
+
/**
|
|
9948
|
+
* Identity with inference. Exists so a definition site keeps its literal type
|
|
9949
|
+
* while the registry can hold the erased form.
|
|
9950
|
+
*/
|
|
9951
|
+
declare function defineOperation<T extends BaseOperation>(def: OperationDef<T>): OperationDef<T>;
|
|
9952
|
+
|
|
9953
|
+
/**
|
|
9954
|
+
* Builds a slot id from its group and its own discriminator. Exported so the
|
|
9955
|
+
* SQL backfill's expected output can be pinned against it in a test.
|
|
9956
|
+
*/
|
|
9957
|
+
declare function makeFieldId(groupId: string, seed: string, collisionIndex: number): string;
|
|
9958
|
+
/**
|
|
9959
|
+
* Ensures every field slot in a detail-view tab list carries a stable id.
|
|
9960
|
+
*
|
|
9961
|
+
* Pure and idempotent: a slot that already has an id keeps it, and running the
|
|
9962
|
+
* function on its own output returns an identical value. Mirrored by the SQL
|
|
9963
|
+
* backfill in `20260814100000_field_slot_ids.sql`, which must produce the same
|
|
9964
|
+
* ids for the same input.
|
|
9965
|
+
*/
|
|
9966
|
+
declare function ensureFieldIds(tabs: Tab[]): Tab[];
|
|
9967
|
+
|
|
9968
|
+
/**
|
|
9969
|
+
* Every operation, declared once. The client mutation, the server write, the
|
|
9970
|
+
* agent tool schemas and the change summary all read this map instead of
|
|
9971
|
+
* keeping their own copy of what an operation is.
|
|
9972
|
+
*/
|
|
9973
|
+
declare const OPERATION_REGISTRY: ReadonlyMap<string, OperationDef<BaseOperation>>;
|
|
9974
|
+
declare const ALL_OPERATION_TYPES: readonly string[];
|
|
9975
|
+
|
|
9976
|
+
export { AGENT_UI_BATCH_MAX_BYTES, AGENT_UI_BATCH_MAX_ITEMS, type AIAvailableModel, type AIBatchAnswerValue, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIBatchQuestionType, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AIChatNotification, type AICompactionSummary, type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AISubagentStatus, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_OPERATION_TYPES, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, AUDIT_ACTIONS, AUDIT_RESOURCE_TYPES, type AcceptsCandidate, type AccessLevel, type Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddSharedMailboxInput, type AgentApprovalPolicy, type AgentBlueprint, AgentBuilder, type AgentBuilderConfig, type AgentConfig, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentMessageAttachment, type AgentMessagePart, type AgentRequiredPermission, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionPatchLiveEvent, type AgentSessionStatus, type AgentTodoPlan, type AgentTodoPlanStatus, type AgentTodoPlanView, type AgentToolCall, type AgentTriggerBlueprint, type AgentTriggerDefinition, type AgentTriggerType, type AgentUIDataTypes, type AgentUIMessageBatch, type AgentUIMessageBatchItem, type AgentUnreadPatchLiveEvent, type AgentUsageView, type AgentWorkMode, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type ApprovalMode, type AssignActorRoleInput, type AssignRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, AttributeGroupField, type AttributeLifecycleCapabilities, type AttributeLike, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, type AuthorizedGlobalSearchResult, type AuthorizedRecordSearchResult, type AuthorizedSearchPage, BEHAVIOR_PROPERTIES, BROWSER_PREVIEW_STATUSES, BYTE_UNIT_LABELS, type BaseOperation, BilateralConfig, type BoundingBox, type BrowserPreviewDescriptor, type BrowserPreviewStatus, type BrowserPreviewUpdatedLiveEvent, type BuilderConfig, type ByteMagnitude, CLAIMABLE_SESSION_STATUSES, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, CONNECTOR_CALLBACK_PARAM, COUNT_MODES, type CalendarConnectorProviderId, type CalendarMeetingEndedData, type CalendarMeetingTranscriptCreatedData, type ChannelRevokedLiveEvent, CheckboxAttribute, type ClaimableSessionStatus, type CollectionPage, type CollectionRequest, type CollectionResponse, type CompactionStrategy, type CompileComputedFormulaInput, type ComputedCompileAttribute, type ComputedCompileObject, type ComputedCompileSchema, ComputedDependency, type ComputedDependencyGraphNode, ComputedFormulaAstNode, ComputedFormulaCompileError, type ComputedFormulaResult, type ComputedFunctionCategory, type ComputedFunctionMetadata, type ComputedFunctionName, type ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConfigOverrides, type ConnectMcpServerInput, type ConnectionStatus, type ConnectionStatusId, type ConnectionView, type ConnectorCallbackStatusValue, type ConnectorProviderId, type ConnectorProvidersResult, type ConnectorScope, type ContinuationPage, type ConversationDisplayTitleInput, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateDocument, type CreateDocumentLink, type CreateFile, CreateMode, type CreateNotificationInput, type CreateNotificationRecipientInput, type CreateObjectRecord, type CreatePermissionInput, type CreateReflexInput, type CreateReflexVersionInput, type CreateRoleInput, type CreateUserProfile, type CriticConfig, Currency, CurrencyAttribute, type CustomAttributeValue, type CustomObjectInfo, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, type DBViewSyncResolution, DB_COLUMN_FIELDS, DEFAULT_AGENT_EXECUTION_CONFIG, DEFAULT_APPROVAL_POLICY, DEFAULT_LABEL_FALLBACK, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DRIVE_LIST_VIEW, DRIVE_OBJECT, DRIVE_OBJECT_NAME, DRIVE_VIEW, DateAttribute, DateRangeValue, type DefaultResolutionContext, type DefaultRoleName, type DeletedMode, DetailViewBuilder, DetailViewConfig, DetailViewDefinition, type Document, DocumentAttribute, type DocumentFile, type DocumentKind, DocumentLayout, type DocumentListOptions, type DocumentRecordOwner, type DocumentRecordOwnerPage, type DocumentWithFiles, type DocumentWithSubCount, DocumentsTabConfig, type DomainEvent, type DraftFocus, type DraftableAttribute, type DraftableObject, type DraftableSampleRecord, type DraftableState, type DraftableView, type DriftAttributeInfo, DynamicValue, type DynamicValueResolver, EMPTY_VALUE_PLACEHOLDER, ESTIMATED_COUNT_CAP, type Eager, type EffectivePermissions, type EmailAttachmentMeta, type EmailConnectorProviderId, type EmailDirection, type EmailParticipantRef, type EmailParticipantRole, type EmailProvider, EmailsTab, EmailsTabConfig, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, Field, FieldGroup, type FieldHistoryEntry, type File, type FileListOptions, type FileOcrStatus, FilterOperator, FilterRule, FilterState, FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, type FlagResolutionContext, FlagService, type FlagValueType, FormBuilder, type FormDefinition, type FormFieldRef, type FormFieldsRow, type FormFreeFieldRef, type FormHeadingRow, FormRegistry, type FormRow, FormRowBuilder, type FormSeparatorRow, type FormSlot, type FormSlotFieldRef, type FormStatus, type FormStep, FormStepBuilder, type FormSubmission, type FormSubmissionStatus, type FormSubmittedAgentEvent, type FormTextRow, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, Group, GroupBuilder, type HumanRequestNeed, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InviteUserInput, type IsWithinBounds, LIVE_EVENT_TYPES, type LabelContext, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, ListViewTabVisibility, type LiveChannel, type LiveChannelKind, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveNotification, type LiveNotificationRecipient, type LiveNotificationRecipientPatch, Location, LocationAttribute, LocationGranularity, MAX_TODOS, MAX_TODO_DESCRIPTION_CHARS, MAX_TODO_ID_CHARS, MAX_TODO_RESULT_CHARS, MEMORY_LIST_VIEW, MEMORY_OBJECT, MEMORY_VIEW, type MailboxAccount, type MailboxAccountVisibility, type MailboxCursor, type MailboxEmail, type MailboxListResponse, type MailboxQuery, type MailboxReadState, type MailboxThread, type MailboxThreadDetail, type McpCatalogEntry, type McpServerAuthInput, type McpServerAuthType, type McpServerStatus, type McpServerView, type Meeting, type MeetingLinkedRecord, type MeetingParticipantRef, type MeetingParticipantRole, type MeetingResponseStatus, type MeetingStatus, type MeetingsListResponse, type MeetingsQuery, MeetingsTab, MeetingsTabConfig, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, type ModelDefinition, type ModuleRunMode, MultiRelationAttribute, MultiselectAttribute, NATIVE_AGENT_UI_PART_IDS_METADATA_KEY, NATIVE_AGENT_UI_PART_IDS_METADATA_SCHEMA_VERSION, NOTIFICATION_INBOX_STATES, NOTIFICATION_KINDS, NOTIFICATION_PRIORITIES, NOTIFICATION_SENSITIVITIES, NOTIFICATION_TYPES_V1, NOTIFICATION_TYPE_AGENT_QUESTION_REQUESTED, NOTIFICATION_TYPE_AGENT_SESSION_COMPLETED, NOTIFICATION_TYPE_AGENT_SESSION_FAILED, NOTIFICATION_TYPE_AGENT_SESSION_TIMEOUT, NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN, NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED, NOTIFICATION_WORK_STATES, type NativeAgentUIPartIds, type NativeAgentUIPartIdsMetadata, NoopGeocodingAdapter, type Notification, type NotificationCountPatchLiveEvent, type NotificationCounts, type NotificationCreatedLiveEvent, type NotificationInboxState, type NotificationKind, type NotificationListParams, type NotificationListResult, type NotificationPriority, type NotificationRecipient, type NotificationRecipientPatchLiveEvent, type NotificationSensitivity, type NotificationSubject, type NotificationType, type NotificationV1Type, type NotificationWithRecipient, type NotificationWorkState, NumberAttribute, OPERATION_REGISTRY, OPERATOR_SPECS, ObjectBuilder, type ObjectConfig, ObjectDefinition, type ObjectPermissions, ObjectRecord, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperationDef, type OperatorSpec, Option, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type ParsedPersistedSchemaPlan, type ParsedSchemaPlanProposal, type Permission, type PermissionScope, type PersistedDefaultViewTarget, type PersistedSchemaPlan, type PersistedSchemaPlanAdditive, Phone, PhoneAttribute, type PlannedAttribute, type PlannedAttributeRemoval, type PlannedObject, type PlannedObjectRemoval, type PlannedRename, PropertyAttribute, PropertySchema, type ProposedDefaultViewTarget, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentAttributeBuilder, type QualifiedDocumentBrand, RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY, REMOVED_OPERATOR_REPLACEMENTS, type ReasoningPartData, type RecordAgentEvent, type RecordCreatedLiveEvent, type RecordDeletedLiveEvent, type RecordDocuments, type RecordFieldPatch, type RecordLiveSnapshot, type RecordMetadata, type RecordPatchLiveEvent, type RecordRemovedLiveEvent, type Reflex, type ReflexRun, type ReflexState, type ReflexVersion, type ReflexVersionStatus, type RegexGenerationInput, RelationAttribute, RelationTarget, RelativeDateValue, type ResolutionContext, type ResolvedFlag, ResourceVisibility, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, RichtextTabConfig, type Role, RollupAttribute, RollupFunction, type RunEffect, type RunMode, SCHEMA_PLAN_LIMITS, SESSION_TERMINAL_STATUSES, SKILL_LIST_VIEW, SKILL_OBJECT, SKILL_VIEW, STANDARD_SCHEMA_VENDOR, SYNONYM_ALIASES, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FILTER_ATTRIBUTE_TYPES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SchemaDriftResult, type SchemaPlan, type SchemaPlanAdditive, type SchemaPlanAdditiveBase, type SchemaPlanChangeSet, type SchemaPlanDestructive, type SchemaPlanDraft, type SchemaPlanDraftResponse, type SchemaPlanDraftState, type SchemaPlanDraftStatus, type SchemaPlanDraftWrite, type SchemaPlanImpact, type SchemaPlanImpactEntry, type SchemaPlanOutcome, type SchemaPlanProposalInput, type SchemaPlanSampleData, type SchemaPlanStatus, type SchemaPlanViewChanges, type SchemaState, type SearchOptions, SelectAttribute, type SessionApprovalMode, type SessionOutcome, type SessionParkedOn, type SessionPhase, type SessionState, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, SortRule, type StandardSchemaIssue, type StandardSchemaResult, type StartConnectorAuthInput, type StartConnectorAuthResult, type StaticFlagDefault, StatusAttribute, type StorageProvider, type StoredSchemaPlan, type SystemAttribute, type SystemAttributeI18nKey, type SystemFields, type SystemObjectDriftInfo, type SystemPermissions, type SystemResource, TEXT_FORMAT_PATTERNS, TODAY_DEFAULT, TODO_PLAN_STATUSES, TODO_STATUSES, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, type TenantSettings, type TerminalSessionStatus, TextAttribute, type TextPartData, type ThinkingPartData, TimeFormat, Timestamps, type ToolImpact, type ToolPartData, type ToolPartErrorCode, type ToolPartState, type TriggerEventType, USER_STATUSES, USER_WORK_POSTURES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateDocument, type UpdateFile, type UpdateRoleInput, type UpdateUserProfile, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserLike, type UserProfile, UserReferenceType, type UserRoleAssignment, type UserStatus, type UserWorkPosture, Uuid, ValidationError, type ValueRef, type ViewBaselineOrigin, type ViewChange, ViewConfig, type ViewConfigDelta, ViewDefinition, type ViewOperation, type ViewProjectionStaleLiveEvent, type ViewStateEntry, type ViewStateResolution, type ViewSyncPayload, ViewType, type WithCustomAttributes, type WithCustomRecordAttributes, type WithoutSystemFields, accessLevelToActions, actionsToAccessLevel, agent, agentDisplayName, applyOperations, applyPipes, applyRelationProps, assertAcyclicComputedDependencies, booleanFlag, buildAgentFallbackTitle, buildPermissionFlags, buildPropertySchema, buildQualifiedAttribute, canonicalizeFilterValue, checkbox, collectQualifiedRuleIssues, compileComputedFormula, compileRollupAttribute, computeByteMagnitude, conversationDisplayTitle, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, currentActor, date, dateInTimezone, dateValueStart, defineOperation, deriveInitials, describeOperations, destructiveSchema, detailView, document, ensureFieldIds, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, evaluateRecordFilterState, extractAttributeNames, extractCurrencyFilterValue, extractFilterValue, extractValueRefs, flagRegistry, focusOf, form, formRegistry, formatAttributeValue, formatByteSize, formatComputedResult, formatLocationValue, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRecordCreatorPrincipalId, getSlotFieldTargets, getSystemAttributeI18nKey, getSystemAttributeList, getUserDisplayName, group, hasDestructiveEntries, includesAction, inferRollupReturnType, isAgentUIMessageBatch, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isCheckboxEquality, isClaimableSessionStatus, isComputedFunctionName, isDateRangeValue, isDefaultRole, isDocumentAttribute, isDynamicValue, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isManagedSystemAttribute, isNotEmpty, isNullishOrEmptyString, isPlainRecord, isRelativeDateValue, isSetMembershipOperator, isStandardSchema, isTerminalSessionStatus, isTerminalState, isValuePresent, jsonFlag, legacyStatusToSessionState, listView, liveChannelKey, location, makeFieldId, matchesAccepts, multiselect, nativeAgentUIPartIdMetadataKey, normalizeDateValue, normalizeFilterRule, normalizeForEdgeRpc, normalizeOperator, now, number, numberFlag, object, parseCountMode, parseLiveChannelKey, parseNativeAgentUIPartIdsMetadata, parseOperation, parseOptionalCountMode, parseQualifiedAttribute, persistedDefaultViewTargetSchema, persistedSchemaPlanSchema, phone, plannedAttributeSchema, plannedInlineAttributeSchema, plannedObjectSchema, proposedDefaultViewTargetSchema, registry, relation, relationPropertyDefs, renderLabelExpression, resetViewToDefault, resolveAttributeDefaultValue, resolveEffectiveFilterType, resolveFieldRequired, resolveIsWithinBounds, resolveTextPattern, resolveUtcDayBounds, richtext, rollup, rollupToFormulaExpression, schemaPlanSchema, select, sessionStateToLegacyStatus, status, stringFlag, text, toMultiValueOperator, toUndefinedIfEmpty, toUtcDayString, today, user, validateAttributeName, validateLabelExpression, validateObjectName, validateQualifiedRule, validateViewName, viewRegistry, viewStateKey, viewSyncPayload };
|