@stndrds/schema 1.0.0-alpha.140 → 1.0.0-alpha.142

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/index.d.mts CHANGED
@@ -1189,6 +1189,12 @@ interface ModelDefinition {
1189
1189
  provider: ProviderName;
1190
1190
  model: string;
1191
1191
  maxTokens?: number;
1192
+ /**
1193
+ * Total context window in tokens (e.g. 200000 for Claude Sonnet).
1194
+ * Required by the compaction subsystem when this model is used as the
1195
+ * summary model; optional otherwise.
1196
+ */
1197
+ contextWindow?: number;
1192
1198
  }
1193
1199
  interface RetryPolicy {
1194
1200
  maxRetries: number;
@@ -1359,11 +1365,29 @@ type AgentMessagePart = {
1359
1365
  mimeType: string;
1360
1366
  } | {
1361
1367
  type: "compaction";
1362
- summary: string;
1368
+ state: "in-progress";
1369
+ reason: "preflight_threshold" | "overflow_recovery";
1370
+ estimatedTokens?: number;
1371
+ reportedTokens?: number;
1372
+ } | {
1373
+ type: "compaction";
1374
+ state: "completed";
1363
1375
  tokensBefore: number;
1364
1376
  tokensAfter: number;
1365
1377
  tokensSaved: number;
1366
- level: "soft" | "hard" | "critical";
1378
+ strategy: "summary";
1379
+ durationMs: number;
1380
+ /**
1381
+ * Raw summary text produced by the summarizer LLM. Persisted so that
1382
+ * follow-up turns can reuse it instead of re-running the summarizer.
1383
+ */
1384
+ summary?: string;
1385
+ } | {
1386
+ type: "compaction";
1387
+ state: "failed";
1388
+ /** Human-readable reason from the CompactionImpossibleError. */
1389
+ reason: string;
1390
+ durationMs?: number;
1367
1391
  };
1368
1392
  /**
1369
1393
  * Persisted message in an agent session.
@@ -1466,8 +1490,15 @@ type AIMessageRole = "user" | "assistant";
1466
1490
  * Configured on the backend and exposed via GET /agent/models.
1467
1491
  */
1468
1492
  interface AIAvailableModel {
1469
- /** Model identifier (e.g. "claude-sonnet-4-6") */
1493
+ /** Model identifier exposed to the UI (e.g. "claude-sonnet-4-6") */
1470
1494
  id: string;
1495
+ /**
1496
+ * Provider model ID sent to the underlying SDK. Defaults to `id` when omitted.
1497
+ * Use this to register multiple registry entries (different `contextWindow`,
1498
+ * `label`, etc.) that route to the same upstream model — e.g. a test entry
1499
+ * with a reduced context window for QA of the compaction system.
1500
+ */
1501
+ apiModelId?: string;
1471
1502
  /** Provider name (e.g. "anthropic", "google") */
1472
1503
  provider: string;
1473
1504
  /** Display label (e.g. "Claude 4.6 Sonnet") */
@@ -1510,7 +1541,7 @@ interface AIToolCall {
1510
1541
  /**
1511
1542
  * Part type for message content
1512
1543
  */
1513
- type AIChatMessagePartType = "text" | "attachment" | "tool" | "thinking" | "reasoning" | "todo" | "question" | "error" | "approval" | "record" | "search-results" | (string & {});
1544
+ type AIChatMessagePartType = "text" | "attachment" | "tool" | "thinking" | "reasoning" | "todo" | "question" | "error" | "approval" | "record" | "search-results" | "compaction" | (string & {});
1514
1545
  /**
1515
1546
  * Data for text part
1516
1547
  */
@@ -1585,6 +1616,16 @@ interface AIChatMessage {
1585
1616
  timestamp?: Date;
1586
1617
  /** Error message if the message failed */
1587
1618
  error?: string;
1619
+ /**
1620
+ * Tokens reported by the provider after this message completed. The `input`
1621
+ * value reflects the size of the conversation Anthropic actually saw on
1622
+ * that turn — used by the chat composer to render a context-window
1623
+ * progress ring.
1624
+ */
1625
+ tokenUsage?: {
1626
+ input: number;
1627
+ output: number;
1628
+ };
1588
1629
  }
1589
1630
  /**
1590
1631
  * Question types supported by the agent
@@ -3077,14 +3118,20 @@ interface StreamEventMessagePersisted {
3077
3118
  type: "message_persisted";
3078
3119
  message: AgentSessionMessage;
3079
3120
  }
3080
- type CompactionLevel = "soft" | "hard" | "critical";
3081
- interface StreamEventCompaction {
3082
- type: "compaction";
3083
- summary: string;
3121
+ interface StreamEventCompactionStart {
3122
+ type: "compaction_start";
3123
+ reason: "preflight_threshold" | "overflow_recovery";
3124
+ estimatedTokens?: number;
3125
+ reportedTokens?: number;
3126
+ }
3127
+ interface StreamEventCompactionEnd {
3128
+ type: "compaction_end";
3084
3129
  tokensBefore: number;
3085
3130
  tokensAfter: number;
3086
3131
  tokensSaved: number;
3087
- level: CompactionLevel;
3132
+ strategy: "summary";
3133
+ durationMs: number;
3134
+ summary?: string;
3088
3135
  }
3089
3136
 
3090
3137
  /**
@@ -6450,4 +6497,4 @@ declare const OPERATOR_SPECS: Record<FilterOperator, OperatorSpec>;
6450
6497
  */
6451
6498
  declare function evaluateFilterState(state: FilterState, values: Record<string, unknown>, attributes: Attribute[]): boolean;
6452
6499
 
6453
- export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, type AccessAction, type AccessActionList, AccessDeniedError, type AccessLevel, type AccessPolicy, type AccessPolicyPreset, type AccessResourceType, type Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AgentConfig, type AgentContextEntry, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentExecutionPolicy, type AgentMessageAttachment, type AgentMessagePart, type AgentQuestion, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, AttributeGroupField, AttributeInUseError, AttributeNotFoundError, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, CheckboxAttribute, type CompactionLevel, CompletionStatus, ConcurrentModificationError, ConfigOverrides, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateDocument, type CreateDocumentSlot, type CreateFile, CreateMode, type CreateObjectRecord, type CreatePermissionInput, type CreateProcessingJob, type CreateRoleInput, type CreateSandboxExecution, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CustomAttributeValue, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, DetailViewBuilder, DetailViewConfig, DetailViewDefinition, DetailViewLayout, type Document, DocumentAttribute, type DocumentListOptions, type DocumentSlot, DocumentsTabConfig, type DomainEvent, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type EffectivePermissions, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FeatureFlagDefinition, FeatureFlagsRepository, FeatureGate, Field, FieldGroup, type File, FileAttribute, type FileListOptions, type FileVisibility, FilterOperator, FilterState, FilterValue, FlagLevel, FlagRegistry, FlagService, FlagValueType, ForbiddenError, 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 FormulaResult, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type GrantResourceAccessInput, Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, InvalidPathError, type InviteUserInput, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, Location, LocationAttribute, LocationGranularity, MaxDepthExceededError, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NoopGeocodingAdapter, NotFoundError, NotImplementedError, NumberAttribute, OPERATOR_SPECS, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectRecord, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type PathCardinality, type PathSegment, type PathSegmentType, type Permission, type PermissionScope, Phone, PhoneAttribute, type PolicyContext, PolicyViolationError, type PrincipalType, type ProcessingJob, type ProcessingJobStatus, type ProcessingJobType, type ProcessingStatus, ProtectedResourceError, ProtectedRoleError, type ProviderName, type QuestionResponse, type QuestionStatus, RatingAttribute, type ReasoningPartData, type RecordAgentEvent, type RecordMetadata, RecordNotFoundError, type RecordPolicy, type RecordReference, RecordReferencedError, RelationAttribute, RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, RelationTarget, RepositoryError, type RepositoryOperation, ResolvedFlag, type ResourceAccess, type ResourceRef, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, RichtextFeature, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SandboxExecution, type SandboxExecutionInput, type SandboxExecutionResult, type SandboxExecutionStatus, type SandboxMode, type SandboxTrigger, SchemaError, SchemaErrorCode, type SchemaResolver, type SearchOptions, SelectAttribute, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, type SlotStatus, SortRule, type SpecificAccessAction, type StandardSchemaIssue, type StandardSchemaResult, StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompaction, type StreamEventMessagePersisted, SyncError, type SystemAttribute, type SystemFields, type SystemPermissions, type SystemResource, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, TextAreaAttribute, TextAttribute, type TextPartData, type ThinkingPartData, type TimeoutPolicy, Timestamps, type ToolPartData, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateDocument, type UpdateDocumentSlot, type UpdateFile, type UpdateObjectInput, type UpdateProcessingJob, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertAccessPolicyInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, ViewConfig, ViewDefinition, ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, booleanFlag, checkbox, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateFilterState, evaluateFormula, evaluateFormulaAttribute, evaluateFormulaWithResult, extractAttributeNames, extractFormulaVariables, extractRelationNames, extractRelationReferences, file, flagRegistry, flattenRelationsForEval, form, formRegistry, formatAttributeValue, formatFormulaResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getPathDepth, getRelationPath, getSystemAttributeList, getTargetAttributeName, group, hasRelationReferences, isAttributeInUseError, isDefaultRole, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isNotEmpty, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, location, multiselect, number, numberFlag, object, parsePath, pathHasManyCardinality, phone, rating, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, select, status, stringFlag, text, textarea, toUndefinedIfEmpty, user, validateAttributeName, validateFormulaExpression, validatePath, viewRegistry };
6500
+ export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, type AccessAction, type AccessActionList, AccessDeniedError, type AccessLevel, type AccessPolicy, type AccessPolicyPreset, type AccessResourceType, type Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AgentConfig, type AgentContextEntry, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentExecutionPolicy, type AgentMessageAttachment, type AgentMessagePart, type AgentQuestion, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, AttributeGroupField, AttributeInUseError, AttributeNotFoundError, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, CheckboxAttribute, CompletionStatus, ConcurrentModificationError, ConfigOverrides, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateDocument, type CreateDocumentSlot, type CreateFile, CreateMode, type CreateObjectRecord, type CreatePermissionInput, type CreateProcessingJob, type CreateRoleInput, type CreateSandboxExecution, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CustomAttributeValue, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, DetailViewBuilder, DetailViewConfig, DetailViewDefinition, DetailViewLayout, type Document, DocumentAttribute, type DocumentListOptions, type DocumentSlot, DocumentsTabConfig, type DomainEvent, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type EffectivePermissions, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FeatureFlagDefinition, FeatureFlagsRepository, FeatureGate, Field, FieldGroup, type File, FileAttribute, type FileListOptions, type FileVisibility, FilterOperator, FilterState, FilterValue, FlagLevel, FlagRegistry, FlagService, FlagValueType, ForbiddenError, 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 FormulaResult, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type GrantResourceAccessInput, Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, InvalidPathError, type InviteUserInput, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, Location, LocationAttribute, LocationGranularity, MaxDepthExceededError, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NoopGeocodingAdapter, NotFoundError, NotImplementedError, NumberAttribute, OPERATOR_SPECS, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectRecord, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type PathCardinality, type PathSegment, type PathSegmentType, type Permission, type PermissionScope, Phone, PhoneAttribute, type PolicyContext, PolicyViolationError, type PrincipalType, type ProcessingJob, type ProcessingJobStatus, type ProcessingJobType, type ProcessingStatus, ProtectedResourceError, ProtectedRoleError, type ProviderName, type QuestionResponse, type QuestionStatus, RatingAttribute, type ReasoningPartData, type RecordAgentEvent, type RecordMetadata, RecordNotFoundError, type RecordPolicy, type RecordReference, RecordReferencedError, RelationAttribute, RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, RelationTarget, RepositoryError, type RepositoryOperation, ResolvedFlag, type ResourceAccess, type ResourceRef, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, RichtextFeature, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SandboxExecution, type SandboxExecutionInput, type SandboxExecutionResult, type SandboxExecutionStatus, type SandboxMode, type SandboxTrigger, SchemaError, SchemaErrorCode, type SchemaResolver, type SearchOptions, SelectAttribute, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, type SlotStatus, SortRule, type SpecificAccessAction, type StandardSchemaIssue, type StandardSchemaResult, StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionStart, type StreamEventMessagePersisted, SyncError, type SystemAttribute, type SystemFields, type SystemPermissions, type SystemResource, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, TextAreaAttribute, TextAttribute, type TextPartData, type ThinkingPartData, type TimeoutPolicy, Timestamps, type ToolPartData, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateDocument, type UpdateDocumentSlot, type UpdateFile, type UpdateObjectInput, type UpdateProcessingJob, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertAccessPolicyInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, ViewConfig, ViewDefinition, ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, booleanFlag, checkbox, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateFilterState, evaluateFormula, evaluateFormulaAttribute, evaluateFormulaWithResult, extractAttributeNames, extractFormulaVariables, extractRelationNames, extractRelationReferences, file, flagRegistry, flattenRelationsForEval, form, formRegistry, formatAttributeValue, formatFormulaResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getPathDepth, getRelationPath, getSystemAttributeList, getTargetAttributeName, group, hasRelationReferences, isAttributeInUseError, isDefaultRole, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isNotEmpty, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, location, multiselect, number, numberFlag, object, parsePath, pathHasManyCardinality, phone, rating, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, select, status, stringFlag, text, textarea, toUndefinedIfEmpty, user, validateAttributeName, validateFormulaExpression, validatePath, viewRegistry };
package/dist/index.d.ts CHANGED
@@ -1189,6 +1189,12 @@ interface ModelDefinition {
1189
1189
  provider: ProviderName;
1190
1190
  model: string;
1191
1191
  maxTokens?: number;
1192
+ /**
1193
+ * Total context window in tokens (e.g. 200000 for Claude Sonnet).
1194
+ * Required by the compaction subsystem when this model is used as the
1195
+ * summary model; optional otherwise.
1196
+ */
1197
+ contextWindow?: number;
1192
1198
  }
1193
1199
  interface RetryPolicy {
1194
1200
  maxRetries: number;
@@ -1359,11 +1365,29 @@ type AgentMessagePart = {
1359
1365
  mimeType: string;
1360
1366
  } | {
1361
1367
  type: "compaction";
1362
- summary: string;
1368
+ state: "in-progress";
1369
+ reason: "preflight_threshold" | "overflow_recovery";
1370
+ estimatedTokens?: number;
1371
+ reportedTokens?: number;
1372
+ } | {
1373
+ type: "compaction";
1374
+ state: "completed";
1363
1375
  tokensBefore: number;
1364
1376
  tokensAfter: number;
1365
1377
  tokensSaved: number;
1366
- level: "soft" | "hard" | "critical";
1378
+ strategy: "summary";
1379
+ durationMs: number;
1380
+ /**
1381
+ * Raw summary text produced by the summarizer LLM. Persisted so that
1382
+ * follow-up turns can reuse it instead of re-running the summarizer.
1383
+ */
1384
+ summary?: string;
1385
+ } | {
1386
+ type: "compaction";
1387
+ state: "failed";
1388
+ /** Human-readable reason from the CompactionImpossibleError. */
1389
+ reason: string;
1390
+ durationMs?: number;
1367
1391
  };
1368
1392
  /**
1369
1393
  * Persisted message in an agent session.
@@ -1466,8 +1490,15 @@ type AIMessageRole = "user" | "assistant";
1466
1490
  * Configured on the backend and exposed via GET /agent/models.
1467
1491
  */
1468
1492
  interface AIAvailableModel {
1469
- /** Model identifier (e.g. "claude-sonnet-4-6") */
1493
+ /** Model identifier exposed to the UI (e.g. "claude-sonnet-4-6") */
1470
1494
  id: string;
1495
+ /**
1496
+ * Provider model ID sent to the underlying SDK. Defaults to `id` when omitted.
1497
+ * Use this to register multiple registry entries (different `contextWindow`,
1498
+ * `label`, etc.) that route to the same upstream model — e.g. a test entry
1499
+ * with a reduced context window for QA of the compaction system.
1500
+ */
1501
+ apiModelId?: string;
1471
1502
  /** Provider name (e.g. "anthropic", "google") */
1472
1503
  provider: string;
1473
1504
  /** Display label (e.g. "Claude 4.6 Sonnet") */
@@ -1510,7 +1541,7 @@ interface AIToolCall {
1510
1541
  /**
1511
1542
  * Part type for message content
1512
1543
  */
1513
- type AIChatMessagePartType = "text" | "attachment" | "tool" | "thinking" | "reasoning" | "todo" | "question" | "error" | "approval" | "record" | "search-results" | (string & {});
1544
+ type AIChatMessagePartType = "text" | "attachment" | "tool" | "thinking" | "reasoning" | "todo" | "question" | "error" | "approval" | "record" | "search-results" | "compaction" | (string & {});
1514
1545
  /**
1515
1546
  * Data for text part
1516
1547
  */
@@ -1585,6 +1616,16 @@ interface AIChatMessage {
1585
1616
  timestamp?: Date;
1586
1617
  /** Error message if the message failed */
1587
1618
  error?: string;
1619
+ /**
1620
+ * Tokens reported by the provider after this message completed. The `input`
1621
+ * value reflects the size of the conversation Anthropic actually saw on
1622
+ * that turn — used by the chat composer to render a context-window
1623
+ * progress ring.
1624
+ */
1625
+ tokenUsage?: {
1626
+ input: number;
1627
+ output: number;
1628
+ };
1588
1629
  }
1589
1630
  /**
1590
1631
  * Question types supported by the agent
@@ -3077,14 +3118,20 @@ interface StreamEventMessagePersisted {
3077
3118
  type: "message_persisted";
3078
3119
  message: AgentSessionMessage;
3079
3120
  }
3080
- type CompactionLevel = "soft" | "hard" | "critical";
3081
- interface StreamEventCompaction {
3082
- type: "compaction";
3083
- summary: string;
3121
+ interface StreamEventCompactionStart {
3122
+ type: "compaction_start";
3123
+ reason: "preflight_threshold" | "overflow_recovery";
3124
+ estimatedTokens?: number;
3125
+ reportedTokens?: number;
3126
+ }
3127
+ interface StreamEventCompactionEnd {
3128
+ type: "compaction_end";
3084
3129
  tokensBefore: number;
3085
3130
  tokensAfter: number;
3086
3131
  tokensSaved: number;
3087
- level: CompactionLevel;
3132
+ strategy: "summary";
3133
+ durationMs: number;
3134
+ summary?: string;
3088
3135
  }
3089
3136
 
3090
3137
  /**
@@ -6450,4 +6497,4 @@ declare const OPERATOR_SPECS: Record<FilterOperator, OperatorSpec>;
6450
6497
  */
6451
6498
  declare function evaluateFilterState(state: FilterState, values: Record<string, unknown>, attributes: Attribute[]): boolean;
6452
6499
 
6453
- export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, type AccessAction, type AccessActionList, AccessDeniedError, type AccessLevel, type AccessPolicy, type AccessPolicyPreset, type AccessResourceType, type Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AgentConfig, type AgentContextEntry, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentExecutionPolicy, type AgentMessageAttachment, type AgentMessagePart, type AgentQuestion, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, AttributeGroupField, AttributeInUseError, AttributeNotFoundError, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, CheckboxAttribute, type CompactionLevel, CompletionStatus, ConcurrentModificationError, ConfigOverrides, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateDocument, type CreateDocumentSlot, type CreateFile, CreateMode, type CreateObjectRecord, type CreatePermissionInput, type CreateProcessingJob, type CreateRoleInput, type CreateSandboxExecution, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CustomAttributeValue, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, DetailViewBuilder, DetailViewConfig, DetailViewDefinition, DetailViewLayout, type Document, DocumentAttribute, type DocumentListOptions, type DocumentSlot, DocumentsTabConfig, type DomainEvent, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type EffectivePermissions, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FeatureFlagDefinition, FeatureFlagsRepository, FeatureGate, Field, FieldGroup, type File, FileAttribute, type FileListOptions, type FileVisibility, FilterOperator, FilterState, FilterValue, FlagLevel, FlagRegistry, FlagService, FlagValueType, ForbiddenError, 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 FormulaResult, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type GrantResourceAccessInput, Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, InvalidPathError, type InviteUserInput, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, Location, LocationAttribute, LocationGranularity, MaxDepthExceededError, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NoopGeocodingAdapter, NotFoundError, NotImplementedError, NumberAttribute, OPERATOR_SPECS, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectRecord, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type PathCardinality, type PathSegment, type PathSegmentType, type Permission, type PermissionScope, Phone, PhoneAttribute, type PolicyContext, PolicyViolationError, type PrincipalType, type ProcessingJob, type ProcessingJobStatus, type ProcessingJobType, type ProcessingStatus, ProtectedResourceError, ProtectedRoleError, type ProviderName, type QuestionResponse, type QuestionStatus, RatingAttribute, type ReasoningPartData, type RecordAgentEvent, type RecordMetadata, RecordNotFoundError, type RecordPolicy, type RecordReference, RecordReferencedError, RelationAttribute, RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, RelationTarget, RepositoryError, type RepositoryOperation, ResolvedFlag, type ResourceAccess, type ResourceRef, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, RichtextFeature, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SandboxExecution, type SandboxExecutionInput, type SandboxExecutionResult, type SandboxExecutionStatus, type SandboxMode, type SandboxTrigger, SchemaError, SchemaErrorCode, type SchemaResolver, type SearchOptions, SelectAttribute, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, type SlotStatus, SortRule, type SpecificAccessAction, type StandardSchemaIssue, type StandardSchemaResult, StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompaction, type StreamEventMessagePersisted, SyncError, type SystemAttribute, type SystemFields, type SystemPermissions, type SystemResource, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, TextAreaAttribute, TextAttribute, type TextPartData, type ThinkingPartData, type TimeoutPolicy, Timestamps, type ToolPartData, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateDocument, type UpdateDocumentSlot, type UpdateFile, type UpdateObjectInput, type UpdateProcessingJob, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertAccessPolicyInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, ViewConfig, ViewDefinition, ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, booleanFlag, checkbox, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateFilterState, evaluateFormula, evaluateFormulaAttribute, evaluateFormulaWithResult, extractAttributeNames, extractFormulaVariables, extractRelationNames, extractRelationReferences, file, flagRegistry, flattenRelationsForEval, form, formRegistry, formatAttributeValue, formatFormulaResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getPathDepth, getRelationPath, getSystemAttributeList, getTargetAttributeName, group, hasRelationReferences, isAttributeInUseError, isDefaultRole, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isNotEmpty, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, location, multiselect, number, numberFlag, object, parsePath, pathHasManyCardinality, phone, rating, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, select, status, stringFlag, text, textarea, toUndefinedIfEmpty, user, validateAttributeName, validateFormulaExpression, validatePath, viewRegistry };
6500
+ export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, type AccessAction, type AccessActionList, AccessDeniedError, type AccessLevel, type AccessPolicy, type AccessPolicyPreset, type AccessResourceType, type Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AgentConfig, type AgentContextEntry, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentExecutionPolicy, type AgentMessageAttachment, type AgentMessagePart, type AgentQuestion, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, AttributeGroupField, AttributeInUseError, AttributeNotFoundError, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, CheckboxAttribute, CompletionStatus, ConcurrentModificationError, ConfigOverrides, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateDocument, type CreateDocumentSlot, type CreateFile, CreateMode, type CreateObjectRecord, type CreatePermissionInput, type CreateProcessingJob, type CreateRoleInput, type CreateSandboxExecution, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CustomAttributeValue, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, DetailViewBuilder, DetailViewConfig, DetailViewDefinition, DetailViewLayout, type Document, DocumentAttribute, type DocumentListOptions, type DocumentSlot, DocumentsTabConfig, type DomainEvent, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type EffectivePermissions, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FeatureFlagDefinition, FeatureFlagsRepository, FeatureGate, Field, FieldGroup, type File, FileAttribute, type FileListOptions, type FileVisibility, FilterOperator, FilterState, FilterValue, FlagLevel, FlagRegistry, FlagService, FlagValueType, ForbiddenError, 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 FormulaResult, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type GrantResourceAccessInput, Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, InvalidPathError, type InviteUserInput, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, Location, LocationAttribute, LocationGranularity, MaxDepthExceededError, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NoopGeocodingAdapter, NotFoundError, NotImplementedError, NumberAttribute, OPERATOR_SPECS, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectRecord, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type PathCardinality, type PathSegment, type PathSegmentType, type Permission, type PermissionScope, Phone, PhoneAttribute, type PolicyContext, PolicyViolationError, type PrincipalType, type ProcessingJob, type ProcessingJobStatus, type ProcessingJobType, type ProcessingStatus, ProtectedResourceError, ProtectedRoleError, type ProviderName, type QuestionResponse, type QuestionStatus, RatingAttribute, type ReasoningPartData, type RecordAgentEvent, type RecordMetadata, RecordNotFoundError, type RecordPolicy, type RecordReference, RecordReferencedError, RelationAttribute, RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, RelationTarget, RepositoryError, type RepositoryOperation, ResolvedFlag, type ResourceAccess, type ResourceRef, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, RichtextFeature, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SandboxExecution, type SandboxExecutionInput, type SandboxExecutionResult, type SandboxExecutionStatus, type SandboxMode, type SandboxTrigger, SchemaError, SchemaErrorCode, type SchemaResolver, type SearchOptions, SelectAttribute, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, type SlotStatus, SortRule, type SpecificAccessAction, type StandardSchemaIssue, type StandardSchemaResult, StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionStart, type StreamEventMessagePersisted, SyncError, type SystemAttribute, type SystemFields, type SystemPermissions, type SystemResource, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, TextAreaAttribute, TextAttribute, type TextPartData, type ThinkingPartData, type TimeoutPolicy, Timestamps, type ToolPartData, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateDocument, type UpdateDocumentSlot, type UpdateFile, type UpdateObjectInput, type UpdateProcessingJob, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertAccessPolicyInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, ViewConfig, ViewDefinition, ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, booleanFlag, checkbox, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateFilterState, evaluateFormula, evaluateFormulaAttribute, evaluateFormulaWithResult, extractAttributeNames, extractFormulaVariables, extractRelationNames, extractRelationReferences, file, flagRegistry, flattenRelationsForEval, form, formRegistry, formatAttributeValue, formatFormulaResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getPathDepth, getRelationPath, getSystemAttributeList, getTargetAttributeName, group, hasRelationReferences, isAttributeInUseError, isDefaultRole, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isNotEmpty, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, location, multiselect, number, numberFlag, object, parsePath, pathHasManyCardinality, phone, rating, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, select, status, stringFlag, text, textarea, toUndefinedIfEmpty, user, validateAttributeName, validateFormulaExpression, validatePath, viewRegistry };
package/dist/index.js CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  var chunkFRCDMQER_js = require('./chunk-FRCDMQER.js');
4
4
  require('./chunk-PGERPYDR.js');
5
- var chunkV6DE3MXC_js = require('./chunk-V6DE3MXC.js');
6
- var chunk64R5X3DF_js = require('./chunk-64R5X3DF.js');
7
- require('./chunk-MAKSIK3P.js');
5
+ var chunkHG6EF4XD_js = require('./chunk-HG6EF4XD.js');
8
6
  require('./chunk-J5HRK3WD.js');
9
7
  require('./chunk-TKN73433.js');
10
8
  require('./chunk-D7WFIGXW.js');
@@ -14,6 +12,8 @@ require('./chunk-EZHMVZQ4.js');
14
12
  require('./chunk-VXOTYFEW.js');
15
13
  require('./chunk-OAQWRMTP.js');
16
14
  require('./chunk-ACQ3TUFK.js');
15
+ var chunkV6DE3MXC_js = require('./chunk-V6DE3MXC.js');
16
+ require('./chunk-MAKSIK3P.js');
17
17
  require('./chunk-DC7YYE3U.js');
18
18
  require('./chunk-ROAZLZA2.js');
19
19
  require('./chunk-CCB4OY2O.js');
@@ -1224,7 +1224,7 @@ var BaseAttributeBuilder = class {
1224
1224
  * @see https://standardschema.dev/
1225
1225
  */
1226
1226
  get "~standard"() {
1227
- const zodSchema = chunk64R5X3DF_js.createAttributeValidator(this.build());
1227
+ const zodSchema = chunkHG6EF4XD_js.createAttributeValidator(this.build());
1228
1228
  return createStandardSchemaProps(zodSchema);
1229
1229
  }
1230
1230
  constructor(type, name, label) {
@@ -2585,7 +2585,7 @@ var ObjectBuilder = class {
2585
2585
  * @see https://standardschema.dev/
2586
2586
  */
2587
2587
  get "~standard"() {
2588
- const zodSchema = chunk64R5X3DF_js.createObjectValidator(this.build());
2588
+ const zodSchema = chunkHG6EF4XD_js.createObjectValidator(this.build());
2589
2589
  return createStandardSchemaProps(zodSchema);
2590
2590
  }
2591
2591
  /**
@@ -5485,29 +5485,29 @@ Object.defineProperty(exports, "indexBy", {
5485
5485
  enumerable: true,
5486
5486
  get: function () { return chunkFRCDMQER_js.indexBy; }
5487
5487
  });
5488
- Object.defineProperty(exports, "parseAttributeConfig", {
5489
- enumerable: true,
5490
- get: function () { return chunkV6DE3MXC_js.parseAttributeConfig; }
5491
- });
5492
5488
  Object.defineProperty(exports, "computeRecordStatus", {
5493
5489
  enumerable: true,
5494
- get: function () { return chunk64R5X3DF_js.computeRecordStatus; }
5490
+ get: function () { return chunkHG6EF4XD_js.computeRecordStatus; }
5495
5491
  });
5496
5492
  Object.defineProperty(exports, "createFormAttributeValidator", {
5497
5493
  enumerable: true,
5498
- get: function () { return chunk64R5X3DF_js.createFormAttributeValidator; }
5494
+ get: function () { return chunkHG6EF4XD_js.createFormAttributeValidator; }
5499
5495
  });
5500
5496
  Object.defineProperty(exports, "validateDraftOrThrow", {
5501
5497
  enumerable: true,
5502
- get: function () { return chunk64R5X3DF_js.validateDraftOrThrow; }
5498
+ get: function () { return chunkHG6EF4XD_js.validateDraftOrThrow; }
5503
5499
  });
5504
5500
  Object.defineProperty(exports, "validateObject", {
5505
5501
  enumerable: true,
5506
- get: function () { return chunk64R5X3DF_js.validateObject; }
5502
+ get: function () { return chunkHG6EF4XD_js.validateObject; }
5507
5503
  });
5508
5504
  Object.defineProperty(exports, "validateObjectOrThrow", {
5509
5505
  enumerable: true,
5510
- get: function () { return chunk64R5X3DF_js.validateObjectOrThrow; }
5506
+ get: function () { return chunkHG6EF4XD_js.validateObjectOrThrow; }
5507
+ });
5508
+ Object.defineProperty(exports, "parseAttributeConfig", {
5509
+ enumerable: true,
5510
+ get: function () { return chunkV6DE3MXC_js.parseAttributeConfig; }
5511
5511
  });
5512
5512
  Object.defineProperty(exports, "DEFAULT_VALIDATION_MESSAGES", {
5513
5513
  enumerable: true,
package/dist/index.mjs CHANGED
@@ -1,10 +1,8 @@
1
1
  import { generateId } from './chunk-QY6QFRRV.mjs';
2
2
  export { asTenantId, asUserId, deepEqual, generateId, indexBy } from './chunk-QY6QFRRV.mjs';
3
3
  import './chunk-SP3PNHYF.mjs';
4
- export { parseAttributeConfig } from './chunk-SS2NR6DH.mjs';
5
- import { createObjectValidator, createAttributeValidator } from './chunk-6JEQE4IP.mjs';
6
- export { computeRecordStatus, createFormAttributeValidator, validateDraftOrThrow, validateObject, validateObjectOrThrow } from './chunk-6JEQE4IP.mjs';
7
- import './chunk-TMYBEXBT.mjs';
4
+ import { createObjectValidator, createAttributeValidator } from './chunk-M7ZNKBOE.mjs';
5
+ export { computeRecordStatus, createFormAttributeValidator, validateDraftOrThrow, validateObject, validateObjectOrThrow } from './chunk-M7ZNKBOE.mjs';
8
6
  import './chunk-4KRLCWJM.mjs';
9
7
  import './chunk-KNYZH2WD.mjs';
10
8
  import './chunk-RUYUFXNW.mjs';
@@ -14,6 +12,8 @@ import './chunk-SMOHDR6M.mjs';
14
12
  import './chunk-ITTQ4FGR.mjs';
15
13
  import './chunk-IRTRJH37.mjs';
16
14
  import './chunk-OLJLCVNY.mjs';
15
+ export { parseAttributeConfig } from './chunk-SS2NR6DH.mjs';
16
+ import './chunk-TMYBEXBT.mjs';
17
17
  import './chunk-TEQNVO7W.mjs';
18
18
  import './chunk-4TC27SMF.mjs';
19
19
  import './chunk-TBYXYSGA.mjs';
@@ -1,9 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  require('../chunk-PGERPYDR.js');
4
- var chunkV6DE3MXC_js = require('../chunk-V6DE3MXC.js');
5
- var chunk64R5X3DF_js = require('../chunk-64R5X3DF.js');
6
- require('../chunk-MAKSIK3P.js');
4
+ var chunkHG6EF4XD_js = require('../chunk-HG6EF4XD.js');
7
5
  require('../chunk-J5HRK3WD.js');
8
6
  require('../chunk-TKN73433.js');
9
7
  require('../chunk-D7WFIGXW.js');
@@ -13,6 +11,8 @@ require('../chunk-EZHMVZQ4.js');
13
11
  require('../chunk-VXOTYFEW.js');
14
12
  require('../chunk-OAQWRMTP.js');
15
13
  require('../chunk-ACQ3TUFK.js');
14
+ var chunkV6DE3MXC_js = require('../chunk-V6DE3MXC.js');
15
+ require('../chunk-MAKSIK3P.js');
16
16
  require('../chunk-DC7YYE3U.js');
17
17
  require('../chunk-ROAZLZA2.js');
18
18
  require('../chunk-CCB4OY2O.js');
@@ -22,29 +22,29 @@ var chunkT225DB55_js = require('../chunk-T225DB55.js');
22
22
 
23
23
 
24
24
 
25
- Object.defineProperty(exports, "parseAttributeConfig", {
26
- enumerable: true,
27
- get: function () { return chunkV6DE3MXC_js.parseAttributeConfig; }
28
- });
29
25
  Object.defineProperty(exports, "computeRecordStatus", {
30
26
  enumerable: true,
31
- get: function () { return chunk64R5X3DF_js.computeRecordStatus; }
27
+ get: function () { return chunkHG6EF4XD_js.computeRecordStatus; }
32
28
  });
33
29
  Object.defineProperty(exports, "createFormAttributeValidator", {
34
30
  enumerable: true,
35
- get: function () { return chunk64R5X3DF_js.createFormAttributeValidator; }
31
+ get: function () { return chunkHG6EF4XD_js.createFormAttributeValidator; }
36
32
  });
37
33
  Object.defineProperty(exports, "validateDraftOrThrow", {
38
34
  enumerable: true,
39
- get: function () { return chunk64R5X3DF_js.validateDraftOrThrow; }
35
+ get: function () { return chunkHG6EF4XD_js.validateDraftOrThrow; }
40
36
  });
41
37
  Object.defineProperty(exports, "validateObject", {
42
38
  enumerable: true,
43
- get: function () { return chunk64R5X3DF_js.validateObject; }
39
+ get: function () { return chunkHG6EF4XD_js.validateObject; }
44
40
  });
45
41
  Object.defineProperty(exports, "validateObjectOrThrow", {
46
42
  enumerable: true,
47
- get: function () { return chunk64R5X3DF_js.validateObjectOrThrow; }
43
+ get: function () { return chunkHG6EF4XD_js.validateObjectOrThrow; }
44
+ });
45
+ Object.defineProperty(exports, "parseAttributeConfig", {
46
+ enumerable: true,
47
+ get: function () { return chunkV6DE3MXC_js.parseAttributeConfig; }
48
48
  });
49
49
  Object.defineProperty(exports, "DEFAULT_VALIDATION_MESSAGES", {
50
50
  enumerable: true,
@@ -1,7 +1,5 @@
1
1
  import '../chunk-SP3PNHYF.mjs';
2
- export { parseAttributeConfig } from '../chunk-SS2NR6DH.mjs';
3
- export { computeRecordStatus, createFormAttributeValidator, validateDraftOrThrow, validateObject, validateObjectOrThrow } from '../chunk-6JEQE4IP.mjs';
4
- import '../chunk-TMYBEXBT.mjs';
2
+ export { computeRecordStatus, createFormAttributeValidator, validateDraftOrThrow, validateObject, validateObjectOrThrow } from '../chunk-M7ZNKBOE.mjs';
5
3
  import '../chunk-4KRLCWJM.mjs';
6
4
  import '../chunk-KNYZH2WD.mjs';
7
5
  import '../chunk-RUYUFXNW.mjs';
@@ -11,6 +9,8 @@ import '../chunk-SMOHDR6M.mjs';
11
9
  import '../chunk-ITTQ4FGR.mjs';
12
10
  import '../chunk-IRTRJH37.mjs';
13
11
  import '../chunk-OLJLCVNY.mjs';
12
+ export { parseAttributeConfig } from '../chunk-SS2NR6DH.mjs';
13
+ import '../chunk-TMYBEXBT.mjs';
14
14
  import '../chunk-TEQNVO7W.mjs';
15
15
  import '../chunk-4TC27SMF.mjs';
16
16
  import '../chunk-TBYXYSGA.mjs';
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk64R5X3DF_js = require('../../chunk-64R5X3DF.js');
4
- require('../../chunk-MAKSIK3P.js');
3
+ var chunkHG6EF4XD_js = require('../../chunk-HG6EF4XD.js');
5
4
  require('../../chunk-J5HRK3WD.js');
6
5
  require('../../chunk-TKN73433.js');
7
6
  require('../../chunk-D7WFIGXW.js');
@@ -11,6 +10,7 @@ require('../../chunk-EZHMVZQ4.js');
11
10
  require('../../chunk-VXOTYFEW.js');
12
11
  require('../../chunk-OAQWRMTP.js');
13
12
  require('../../chunk-ACQ3TUFK.js');
13
+ require('../../chunk-MAKSIK3P.js');
14
14
  require('../../chunk-DC7YYE3U.js');
15
15
  require('../../chunk-ROAZLZA2.js');
16
16
  require('../../chunk-CCB4OY2O.js');
@@ -22,49 +22,49 @@ require('../../chunk-T225DB55.js');
22
22
 
23
23
  Object.defineProperty(exports, "computeRecordStatus", {
24
24
  enumerable: true,
25
- get: function () { return chunk64R5X3DF_js.computeRecordStatus; }
25
+ get: function () { return chunkHG6EF4XD_js.computeRecordStatus; }
26
26
  });
27
27
  Object.defineProperty(exports, "createAttributeValidator", {
28
28
  enumerable: true,
29
- get: function () { return chunk64R5X3DF_js.createAttributeValidator; }
29
+ get: function () { return chunkHG6EF4XD_js.createAttributeValidator; }
30
30
  });
31
31
  Object.defineProperty(exports, "createDraftValidator", {
32
32
  enumerable: true,
33
- get: function () { return chunk64R5X3DF_js.createDraftValidator; }
33
+ get: function () { return chunkHG6EF4XD_js.createDraftValidator; }
34
34
  });
35
35
  Object.defineProperty(exports, "createFormAttributeValidator", {
36
36
  enumerable: true,
37
- get: function () { return chunk64R5X3DF_js.createFormAttributeValidator; }
37
+ get: function () { return chunkHG6EF4XD_js.createFormAttributeValidator; }
38
38
  });
39
39
  Object.defineProperty(exports, "createObjectValidator", {
40
40
  enumerable: true,
41
- get: function () { return chunk64R5X3DF_js.createObjectValidator; }
41
+ get: function () { return chunkHG6EF4XD_js.createObjectValidator; }
42
42
  });
43
43
  Object.defineProperty(exports, "getMissingRequiredAttributes", {
44
44
  enumerable: true,
45
- get: function () { return chunk64R5X3DF_js.getMissingRequiredAttributes; }
45
+ get: function () { return chunkHG6EF4XD_js.getMissingRequiredAttributes; }
46
46
  });
47
47
  Object.defineProperty(exports, "isRecordComplete", {
48
48
  enumerable: true,
49
- get: function () { return chunk64R5X3DF_js.isRecordComplete; }
49
+ get: function () { return chunkHG6EF4XD_js.isRecordComplete; }
50
50
  });
51
51
  Object.defineProperty(exports, "validateAttribute", {
52
52
  enumerable: true,
53
- get: function () { return chunk64R5X3DF_js.validateAttribute; }
53
+ get: function () { return chunkHG6EF4XD_js.validateAttribute; }
54
54
  });
55
55
  Object.defineProperty(exports, "validateDraft", {
56
56
  enumerable: true,
57
- get: function () { return chunk64R5X3DF_js.validateDraft; }
57
+ get: function () { return chunkHG6EF4XD_js.validateDraft; }
58
58
  });
59
59
  Object.defineProperty(exports, "validateDraftOrThrow", {
60
60
  enumerable: true,
61
- get: function () { return chunk64R5X3DF_js.validateDraftOrThrow; }
61
+ get: function () { return chunkHG6EF4XD_js.validateDraftOrThrow; }
62
62
  });
63
63
  Object.defineProperty(exports, "validateObject", {
64
64
  enumerable: true,
65
- get: function () { return chunk64R5X3DF_js.validateObject; }
65
+ get: function () { return chunkHG6EF4XD_js.validateObject; }
66
66
  });
67
67
  Object.defineProperty(exports, "validateObjectOrThrow", {
68
68
  enumerable: true,
69
- get: function () { return chunk64R5X3DF_js.validateObjectOrThrow; }
69
+ get: function () { return chunkHG6EF4XD_js.validateObjectOrThrow; }
70
70
  });
@@ -1,5 +1,4 @@
1
- export { computeRecordStatus, createAttributeValidator, createDraftValidator, createFormAttributeValidator, createObjectValidator, getMissingRequiredAttributes, isRecordComplete, validateAttribute, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from '../../chunk-6JEQE4IP.mjs';
2
- import '../../chunk-TMYBEXBT.mjs';
1
+ export { computeRecordStatus, createAttributeValidator, createDraftValidator, createFormAttributeValidator, createObjectValidator, getMissingRequiredAttributes, isRecordComplete, validateAttribute, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from '../../chunk-M7ZNKBOE.mjs';
3
2
  import '../../chunk-4KRLCWJM.mjs';
4
3
  import '../../chunk-KNYZH2WD.mjs';
5
4
  import '../../chunk-RUYUFXNW.mjs';
@@ -9,6 +8,7 @@ import '../../chunk-SMOHDR6M.mjs';
9
8
  import '../../chunk-ITTQ4FGR.mjs';
10
9
  import '../../chunk-IRTRJH37.mjs';
11
10
  import '../../chunk-OLJLCVNY.mjs';
11
+ import '../../chunk-TMYBEXBT.mjs';
12
12
  import '../../chunk-TEQNVO7W.mjs';
13
13
  import '../../chunk-4TC27SMF.mjs';
14
14
  import '../../chunk-TBYXYSGA.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stndrds/schema",
3
- "version": "1.0.0-alpha.140",
3
+ "version": "1.0.0-alpha.142",
4
4
  "description": "Standard schema definitions and utilities",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -131,7 +131,7 @@
131
131
  "expr-eval": "^2.0.2",
132
132
  "libphonenumber-js": "^1.12.31",
133
133
  "zod": "^4.2.1",
134
- "@stndrds/constants": "1.0.0-alpha.140"
134
+ "@stndrds/constants": "1.0.0-alpha.142"
135
135
  },
136
136
  "devDependencies": {
137
137
  "@types/node": "^25.0.3",
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var chunkMAKSIK3P_js = require('./chunk-MAKSIK3P.js');
4
3
  var chunkJ5HRK3WD_js = require('./chunk-J5HRK3WD.js');
5
4
  var chunkTKN73433_js = require('./chunk-TKN73433.js');
6
5
  var chunkD7WFIGXW_js = require('./chunk-D7WFIGXW.js');
@@ -10,6 +9,7 @@ var chunkEZHMVZQ4_js = require('./chunk-EZHMVZQ4.js');
10
9
  var chunkVXOTYFEW_js = require('./chunk-VXOTYFEW.js');
11
10
  var chunkOAQWRMTP_js = require('./chunk-OAQWRMTP.js');
12
11
  var chunkACQ3TUFK_js = require('./chunk-ACQ3TUFK.js');
12
+ var chunkMAKSIK3P_js = require('./chunk-MAKSIK3P.js');
13
13
  var chunkDC7YYE3U_js = require('./chunk-DC7YYE3U.js');
14
14
  var chunkROAZLZA2_js = require('./chunk-ROAZLZA2.js');
15
15
  var chunkCCB4OY2O_js = require('./chunk-CCB4OY2O.js');
@@ -1,4 +1,3 @@
1
- import { createCheckboxValidator } from './chunk-TMYBEXBT.mjs';
2
1
  import { createDateValidator } from './chunk-4KRLCWJM.mjs';
3
2
  import { createNumberValidator } from './chunk-KNYZH2WD.mjs';
4
3
  import { createRatingValidator } from './chunk-RUYUFXNW.mjs';
@@ -8,6 +7,7 @@ import { createMultiselectValidator, createSelectValidator, createStatusValidato
8
7
  import { createUserValidator } from './chunk-ITTQ4FGR.mjs';
9
8
  import { createFormulaValidator } from './chunk-IRTRJH37.mjs';
10
9
  import { createRollupValidator } from './chunk-OLJLCVNY.mjs';
10
+ import { createCheckboxValidator } from './chunk-TMYBEXBT.mjs';
11
11
  import { createCurrencyValidator } from './chunk-TEQNVO7W.mjs';
12
12
  import { createFileValidator } from './chunk-4TC27SMF.mjs';
13
13
  import { createLocationValidator } from './chunk-TBYXYSGA.mjs';