@stndrds/schema 1.0.0-alpha.338 → 1.0.0-alpha.343
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-BWBHE8zC.d.ts → all-BjBPrd9V.d.ts} +8 -8
- package/dist/{all-C1AF2SKY.d.mts → all-BrEKv8xR.d.mts} +9 -9
- package/dist/{checkbox-BJiVPQKC.d.ts → checkbox-D8nK0oIO.d.ts} +2 -2
- package/dist/{checkbox-C1oY-AXS.d.mts → checkbox-DSzn5epa.d.mts} +2 -2
- package/dist/{config-aeELOnWd.mjs → config-6uO9OYWQ.mjs} +3 -3
- package/dist/{config-BvijG1IN.js → config-DIBMi8S_.js} +3 -3
- package/dist/{date-DJzdIygB.d.ts → date-BGULTVlX.d.ts} +2 -2
- package/dist/{date-pUpneFTR.d.mts → date-CteDw_88.d.mts} +2 -2
- package/dist/{exceptions-CHlIXRKP.d.mts → exceptions-BCfkN2ct.d.mts} +3 -0
- package/dist/{exceptions-CHlIXRKP.d.ts → exceptions-BCfkN2ct.d.ts} +3 -0
- package/dist/exceptions.d.mts +1 -1
- package/dist/exceptions.d.ts +1 -1
- package/dist/exceptions.js +1 -1
- package/dist/exceptions.mjs +1 -1
- package/dist/{index-CJYpJqEh.d.ts → index-BKv7a08I.d.ts} +1 -1
- package/dist/{index-CUEwuqCj.d.ts → index-CLEwI8GE.d.ts} +2 -2
- package/dist/{index-DX1EILel.d.mts → index-Ds0DxPHk.d.mts} +3 -3
- package/dist/{index-BAW8p4U_.d.ts → index-DyeLYnEc.d.ts} +1 -1
- package/dist/{index-BilM1Dnp.d.mts → index-DzEWbzP-.d.mts} +1 -1
- package/dist/{index-B-LzvZZe.d.mts → index-_gdqRN1W.d.mts} +2 -2
- package/dist/index.d.mts +237 -11
- package/dist/index.d.ts +236 -10
- package/dist/index.js +9 -9
- package/dist/index.mjs +9 -9
- package/dist/{number-BZ9pUAob.d.ts → number-BcMYyg8j.d.ts} +2 -2
- package/dist/{number-D6UXWPnL.d.mts → number-U7UMAXKt.d.mts} +2 -2
- package/dist/{object-BfGtzS7g.js → object-BA3vKFl0.js} +1 -1
- package/dist/{object-D-aDCAHn.mjs → object-C92B0Oei.mjs} +1 -1
- package/dist/phone-CsV9QNwF.mjs +2 -0
- package/dist/{phone-CUgSbH-z.js → phone-MN6Li5Wx.js} +1 -1
- package/dist/{text-D4mEL9hl.d.ts → text-C4EAE9Ap.d.ts} +2 -2
- package/dist/{text-_dBcTPGm.d.mts → text-CjhjkBXJ.d.mts} +2 -2
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/validation/all.d.mts +4 -4
- package/dist/validation/all.d.ts +4 -4
- package/dist/validation/all.js +1 -1
- package/dist/validation/all.mjs +1 -1
- package/dist/validation/complex/currency.d.mts +2 -2
- package/dist/validation/complex/currency.d.ts +2 -2
- package/dist/validation/complex/location.d.mts +2 -2
- package/dist/validation/complex/location.d.ts +2 -2
- package/dist/validation/complex/phone.d.mts +2 -2
- package/dist/validation/complex/phone.d.ts +2 -2
- package/dist/validation/complex/phone.js +1 -1
- package/dist/validation/complex/phone.mjs +1 -1
- package/dist/validation/complex/relation.d.mts +2 -2
- package/dist/validation/complex/relation.d.ts +2 -2
- package/dist/validation/complex/richtext.d.mts +2 -2
- package/dist/validation/complex/richtext.d.ts +2 -2
- package/dist/validation/complex/select.d.mts +2 -2
- package/dist/validation/complex/select.d.ts +2 -2
- package/dist/validation/complex/user.d.mts +2 -2
- package/dist/validation/complex/user.d.ts +2 -2
- package/dist/validation/computed/formula.d.mts +2 -2
- package/dist/validation/computed/formula.d.ts +2 -2
- package/dist/validation/computed/rollup.d.mts +2 -2
- package/dist/validation/computed/rollup.d.ts +2 -2
- package/dist/validation/config/index.d.mts +1 -1
- package/dist/validation/config/index.d.ts +1 -1
- package/dist/validation/config/index.js +1 -1
- package/dist/validation/config/index.mjs +1 -1
- package/dist/validation/core/index.d.mts +1 -1
- package/dist/validation/core/index.d.ts +1 -1
- package/dist/validation/object/index.d.mts +1 -1
- package/dist/validation/object/index.d.ts +1 -1
- package/dist/validation/object/index.js +1 -1
- package/dist/validation/object/index.mjs +1 -1
- package/dist/validation/primitives/checkbox.d.mts +1 -1
- package/dist/validation/primitives/checkbox.d.ts +1 -1
- package/dist/validation/primitives/date.d.mts +1 -1
- package/dist/validation/primitives/date.d.ts +1 -1
- package/dist/validation/primitives/number.d.mts +1 -1
- package/dist/validation/primitives/number.d.ts +1 -1
- package/dist/validation/primitives/text.d.mts +1 -1
- package/dist/validation/primitives/text.d.ts +1 -1
- package/dist/{view-config.schema-CMjVNRCh.mjs → view-config.schema-CupkOK1m.mjs} +1 -1
- package/dist/{view-config.schema-4QhPV9el.js → view-config.schema-D6b67GQM.js} +1 -1
- package/package.json +2 -2
- package/dist/phone-X_nKo0qe.mjs +0 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
import { $ as BilateralConfig, $t as indexBy, A as StorageError, An as ComputedDependency, At as StatusGroup, B as isObjectReferencedError, Bn as ComputedFormulaLiteralNode, Bt as OptionPropertyAttribute, C as RepositoryOperation, Cn as assertAcyclicComputedDependencies, Ct as RichTextAttribute, D as SchemaErrorCode, Dn as ComputedFunctionName, Dt as SelectAttribute, E as SchemaError, En as COMPUTED_FUNCTION_NAMES, Et as RollupFunction, F as SystemEntityImmutableError, Fn as ComputedValueType, Ft as inferInverseCardinality, G as BuiltInTransform, Gt as resolvePropertyDefinitions, H as isRecordReferencedError, Hn as ComputedFormulaPathNode, Ht as PropertySchema, I as ValidationError, In as ComputedFormulaAstNode, It as isAttributeSortable, J as ATTRIBUTE_TYPES, Jt as Uuid, K as MigrationDefinition, Kt as TenantId, L as ValidationErrorDetail, Ln as ComputedFormulaBinaryNode, Lt as isBilateralRelation, M as SyncCascadeError, Mn as ComputedOptionsSource, Mt as TimeFormat, N as SyncConflictError, Nn as ComputedPlan, Nt as UserAttribute, O as SchemaPlanNotFoundError, On as ComputedFunctionSignature, Ot as SingleRelationAttribute, P as SyncError, Pn as ComputedReturnType, Pt as UserReferenceType, Q as BaseAttribute, Qt as generateId, R as isAttributeInUseError, Rn as ComputedFormulaBinaryOperator, Rt as isUniversalRelation, S as RepositoryError, Sn as ComputedFormulaCompileError, St as RelationTarget, T as RoleNotFoundError, Tn as COMPUTED_FUNCTIONS, Tt as RollupAttribute, U as isSchemaError, Un as parseComputedFormula, Ut as PropertyType, V as isProtectedResourceError, Vn as ComputedFormulaParseError, Vt as PropertyAttribute, W as isValidationError, Wt as hasOptions, X as AttributeGroup, Xt as asUserId, Y as Attribute, Yt as asTenantId, Z as AttributeType, Zt as deepEqual, _ as ProtectedResourceError, _n as CompileComputedFormulaInput, _t as Option, a as ChangeTypeNotSupportedError, an as COMPUTED_FUNCTION_METADATA, at as DateRangeValue, b as RecordReference, bn as ComputedCompileSchema, bt as RELATION_TARGET_ANY, c as DuplicateError, cn as ComputedFormulaResult, ct as FormulaAttribute, d as MigrationTimeoutError, dn as evaluateComputedFormulaWithResult, dt as LocationAttribute, en as NonJsonValueError, et as CheckboxAttribute, f as NotFoundError, fn as formatComputedResult, ft as LocationGranularity, g as OrphanSystemAttributeError, gn as rollupToFormulaExpression, gt as NumberUnit, h as ObjectReferencedError, hn as inferRollupReturnType, ht as NumberAttribute, i as AttributeUsage, in as serializeStableJson, it as DateFormat, j as StorageOperation, jn as ComputedFieldKind, jt as TextAttribute, k as SearchBackendError, kn as isComputedFunctionName, kt as StatusAttribute, l as ForbiddenError, ln as evaluateComputedAst, lt as FormulaReturnType, m as ObjectNotFoundError, mn as compileRollupAttribute, mt as MultiselectAttribute, n as AttributeInUseError, nn as sameStableValue, nt as CurrencyAttribute, o as ConcurrentModificationError, on as ComputedFunctionCategory, ot as DateValue, p as NotImplementedError, pn as isPlainRecord, pt as MultiRelationAttribute, q as SchemaOperation, qt as UserId, r as AttributeNotFoundError, rn as serializeCanonicalJson, rt as DateAttribute, s as DestructiveSyncNotAllowedError, sn as ComputedFunctionMetadata, st as DocumentAttribute, t as AccessDeniedError, tn as canonicalStringify, tt as Currency, u as MemoryNotFoundError, un as evaluateComputedFormula, ut as Location, v as ProtectedRoleError, vn as ComputedCompileAttribute, vt as Phone, w as ReservedObjectNameError, wn as compileComputedFormula, wt as RichtextAttribute, x as RecordReferencedError, xn as ComputedDependencyGraphNode, xt as RelationAttribute, y as RecordNotFoundError, yn as ComputedCompileObject, yt as PhoneAttribute, z as isNotFoundError, zn as ComputedFormulaCallNode, zt as relationTargetsOf } from "./exceptions-
|
|
3
|
-
import { $ as QueryState, A as FormContentDefinition, B as DayMonthValue, C as ContentOpenMode, D as CustomContentDefinition, E as ContentViewDefinition, F as MeetingsContentDefinition, G as FilterOperator, H as EdgeQuantifier, I as RichtextContentDefinition, J as FilterValue, K as FilterRule, L as ViewContentDefinition, M as FormsContentDefinition, N as KanbanCollectionContentDefinition, O as DocumentsContentDefinition, P as ListViewLayout, Q as PhoneFilterValue, R as ViewRead, S as ContentFieldGroup, T as ContentViewContext, U as ExtendedFilterRule, V as DynamicValue, W as FilterCombinator, X as NoValueOperator, Y as NO_VALUE_OPERATORS, Z as OPERATORS_BY_TYPE, _ as CollectionContentDefinition, a as contentViewDefinitionSchemaFor, at as isNoValueOperator, b as ContentCreateMode, c as draftContentViewDefinitionSchemaFor, d as sortsSchema, et as RelativeDateValue, f as colorIdSchema, g as CollectionAction, h as ActivityContentDefinition, i as contentViewDefinitionSchema, it as getRollupFilterOperators, j as FormDensity, k as EmailsContentDefinition, l as filterStateSchema, m as SCHEMA_LIMITS, n as collectionContentSourceSchema, nt as SortRule, o as displayAttributesSchema, p as iconNameSchema, q as FilterState, r as columnsSchema, rt as filterOperatorsByTypeForGeneration, s as draftContentViewDefinitionSchema, t as AsideRule, tt as SortDirection, u as publishedViewContentDefinitionSchema, v as CollectionContentSource, w as ContentPlacement, x as ContentField, y as ColumnReference, z as CurrencyFilterValue } from "./all-
|
|
4
|
-
import { A as FolderPreset, C as ResourceVisibility, D as parseResourceVisibility, E as Timestamps, M as PresetNode, O as DocumentLayout, S as ReservedObjectName, T as SystemFieldName, _ as ObjectRecord, a as validateDraft, b as RESOURCE_VISIBILITIES, c as validateObjectOrThrow, f as createFormAttributeValidator, g as ObjectDefinition, h as ObjectAttribute, j as MAX_PRESET_DEPTH, k as DocumentLayoutVariant, m as ListViewTabVisibility, o as validateDraftOrThrow, p as LIST_VIEW_TAB_VISIBILITIES, r as rejectUnknownAttributesOrThrow, s as validateObject, v as RESERVED_ATTRIBUTE_NAMES, w as SYSTEM_FIELD_NAMES, x as ReservedAttributeName, y as RESERVED_OBJECT_NAMES } from "./index-
|
|
5
|
-
import { S as UpdateObjectInput, _ as statusOptionWriteSchema, b as RelationOption, c as parseAttributeConfigForCreate, d as propertyAttributeWireSchema, f as propertySchemaSchema, g as statusGroupSchema, h as selectOptionWriteSchema, l as parseAttributeConfigForUpdate, m as refuseForeignKeys, n as WIRE_OMITTED_CONFIG_KEYS, o as multiselectOptionWriteSchema, p as propertySchemaWireSchema, r as attributeConfigSchemas, s as parseAttributeConfig, t as SIMPLE_PROPERTY_TYPES, u as propertyAttributeSchema, v as AddAttributeInput, x as RelationOptionsResponse, y as CreateCustomObjectInput } from "./index-
|
|
6
|
-
import { n as DEFAULT_VALIDATION_MESSAGES, r as ValidationMessages, t as formatZodErrors } from "./index-
|
|
7
|
-
import { t as createTextValidator } from "./text-
|
|
8
|
-
import { t as createNumberValidator } from "./number-
|
|
9
|
-
import { t as createCheckboxValidator } from "./checkbox-
|
|
10
|
-
import { t as createDateValidator } from "./date-
|
|
11
|
-
import { ColorId, CountryIso3, CurrencyCode, IconName, MimeType } from "@stndrds/constants";
|
|
2
|
+
import { $ as BilateralConfig, $t as indexBy, A as StorageError, An as ComputedDependency, At as StatusGroup, B as isObjectReferencedError, Bn as ComputedFormulaLiteralNode, Bt as OptionPropertyAttribute, C as RepositoryOperation, Cn as assertAcyclicComputedDependencies, Ct as RichTextAttribute, D as SchemaErrorCode, Dn as ComputedFunctionName, Dt as SelectAttribute, E as SchemaError, En as COMPUTED_FUNCTION_NAMES, Et as RollupFunction, F as SystemEntityImmutableError, Fn as ComputedValueType, Ft as inferInverseCardinality, G as BuiltInTransform, Gt as resolvePropertyDefinitions, H as isRecordReferencedError, Hn as ComputedFormulaPathNode, Ht as PropertySchema, I as ValidationError, In as ComputedFormulaAstNode, It as isAttributeSortable, J as ATTRIBUTE_TYPES, Jt as Uuid, K as MigrationDefinition, Kt as TenantId, L as ValidationErrorDetail, Ln as ComputedFormulaBinaryNode, Lt as isBilateralRelation, M as SyncCascadeError, Mn as ComputedOptionsSource, Mt as TimeFormat, N as SyncConflictError, Nn as ComputedPlan, Nt as UserAttribute, O as SchemaPlanNotFoundError, On as ComputedFunctionSignature, Ot as SingleRelationAttribute, P as SyncError, Pn as ComputedReturnType, Pt as UserReferenceType, Q as BaseAttribute, Qt as generateId, R as isAttributeInUseError, Rn as ComputedFormulaBinaryOperator, Rt as isUniversalRelation, S as RepositoryError, Sn as ComputedFormulaCompileError, St as RelationTarget, T as RoleNotFoundError, Tn as COMPUTED_FUNCTIONS, Tt as RollupAttribute, U as isSchemaError, Un as parseComputedFormula, Ut as PropertyType, V as isProtectedResourceError, Vn as ComputedFormulaParseError, Vt as PropertyAttribute, W as isValidationError, Wt as hasOptions, X as AttributeGroup, Xt as asUserId, Y as Attribute, Yt as asTenantId, Z as AttributeType, Zt as deepEqual, _ as ProtectedResourceError, _n as CompileComputedFormulaInput, _t as Option, a as ChangeTypeNotSupportedError, an as COMPUTED_FUNCTION_METADATA, at as DateRangeValue, b as RecordReference, bn as ComputedCompileSchema, bt as RELATION_TARGET_ANY, c as DuplicateError, cn as ComputedFormulaResult, ct as FormulaAttribute, d as MigrationTimeoutError, dn as evaluateComputedFormulaWithResult, dt as LocationAttribute, en as NonJsonValueError, et as CheckboxAttribute, f as NotFoundError, fn as formatComputedResult, ft as LocationGranularity, g as OrphanSystemAttributeError, gn as rollupToFormulaExpression, gt as NumberUnit, h as ObjectReferencedError, hn as inferRollupReturnType, ht as NumberAttribute, i as AttributeUsage, in as serializeStableJson, it as DateFormat, j as StorageOperation, jn as ComputedFieldKind, jt as TextAttribute, k as SearchBackendError, kn as isComputedFunctionName, kt as StatusAttribute, l as ForbiddenError, ln as evaluateComputedAst, lt as FormulaReturnType, m as ObjectNotFoundError, mn as compileRollupAttribute, mt as MultiselectAttribute, n as AttributeInUseError, nn as sameStableValue, nt as CurrencyAttribute, o as ConcurrentModificationError, on as ComputedFunctionCategory, ot as DateValue, p as NotImplementedError, pn as isPlainRecord, pt as MultiRelationAttribute, q as SchemaOperation, qt as UserId, r as AttributeNotFoundError, rn as serializeCanonicalJson, rt as DateAttribute, s as DestructiveSyncNotAllowedError, sn as ComputedFunctionMetadata, st as DocumentAttribute, t as AccessDeniedError, tn as canonicalStringify, tt as Currency, u as MemoryNotFoundError, un as evaluateComputedFormula, ut as Location, v as ProtectedRoleError, vn as ComputedCompileAttribute, vt as Phone, w as ReservedObjectNameError, wn as compileComputedFormula, wt as RichtextAttribute, x as RecordReferencedError, xn as ComputedDependencyGraphNode, xt as RelationAttribute, y as RecordNotFoundError, yn as ComputedCompileObject, yt as PhoneAttribute, z as isNotFoundError, zn as ComputedFormulaCallNode, zt as relationTargetsOf } from "./exceptions-BCfkN2ct.mjs";
|
|
3
|
+
import { $ as QueryState, A as FormContentDefinition, B as DayMonthValue, C as ContentOpenMode, D as CustomContentDefinition, E as ContentViewDefinition, F as MeetingsContentDefinition, G as FilterOperator, H as EdgeQuantifier, I as RichtextContentDefinition, J as FilterValue, K as FilterRule, L as ViewContentDefinition, M as FormsContentDefinition, N as KanbanCollectionContentDefinition, O as DocumentsContentDefinition, P as ListViewLayout, Q as PhoneFilterValue, R as ViewRead, S as ContentFieldGroup, T as ContentViewContext, U as ExtendedFilterRule, V as DynamicValue, W as FilterCombinator, X as NoValueOperator, Y as NO_VALUE_OPERATORS, Z as OPERATORS_BY_TYPE, _ as CollectionContentDefinition, a as contentViewDefinitionSchemaFor, at as isNoValueOperator, b as ContentCreateMode, c as draftContentViewDefinitionSchemaFor, d as sortsSchema, et as RelativeDateValue, f as colorIdSchema, g as CollectionAction, h as ActivityContentDefinition, i as contentViewDefinitionSchema, it as getRollupFilterOperators, j as FormDensity, k as EmailsContentDefinition, l as filterStateSchema, m as SCHEMA_LIMITS, n as collectionContentSourceSchema, nt as SortRule, o as displayAttributesSchema, p as iconNameSchema, q as FilterState, r as columnsSchema, rt as filterOperatorsByTypeForGeneration, s as draftContentViewDefinitionSchema, t as AsideRule, tt as SortDirection, u as publishedViewContentDefinitionSchema, v as CollectionContentSource, w as ContentPlacement, x as ContentField, y as ColumnReference, z as CurrencyFilterValue } from "./all-BrEKv8xR.mjs";
|
|
4
|
+
import { A as FolderPreset, C as ResourceVisibility, D as parseResourceVisibility, E as Timestamps, M as PresetNode, O as DocumentLayout, S as ReservedObjectName, T as SystemFieldName, _ as ObjectRecord, a as validateDraft, b as RESOURCE_VISIBILITIES, c as validateObjectOrThrow, f as createFormAttributeValidator, g as ObjectDefinition, h as ObjectAttribute, j as MAX_PRESET_DEPTH, k as DocumentLayoutVariant, m as ListViewTabVisibility, o as validateDraftOrThrow, p as LIST_VIEW_TAB_VISIBILITIES, r as rejectUnknownAttributesOrThrow, s as validateObject, v as RESERVED_ATTRIBUTE_NAMES, w as SYSTEM_FIELD_NAMES, x as ReservedAttributeName, y as RESERVED_OBJECT_NAMES } from "./index-Ds0DxPHk.mjs";
|
|
5
|
+
import { S as UpdateObjectInput, _ as statusOptionWriteSchema, b as RelationOption, c as parseAttributeConfigForCreate, d as propertyAttributeWireSchema, f as propertySchemaSchema, g as statusGroupSchema, h as selectOptionWriteSchema, l as parseAttributeConfigForUpdate, m as refuseForeignKeys, n as WIRE_OMITTED_CONFIG_KEYS, o as multiselectOptionWriteSchema, p as propertySchemaWireSchema, r as attributeConfigSchemas, s as parseAttributeConfig, t as SIMPLE_PROPERTY_TYPES, u as propertyAttributeSchema, v as AddAttributeInput, x as RelationOptionsResponse, y as CreateCustomObjectInput } from "./index-_gdqRN1W.mjs";
|
|
6
|
+
import { n as DEFAULT_VALIDATION_MESSAGES, r as ValidationMessages, t as formatZodErrors } from "./index-DzEWbzP-.mjs";
|
|
7
|
+
import { t as createTextValidator } from "./text-CjhjkBXJ.mjs";
|
|
8
|
+
import { t as createNumberValidator } from "./number-U7UMAXKt.mjs";
|
|
9
|
+
import { t as createCheckboxValidator } from "./checkbox-DSzn5epa.mjs";
|
|
10
|
+
import { t as createDateValidator } from "./date-CteDw_88.mjs";
|
|
12
11
|
import z, { z as z$1 } from "zod";
|
|
12
|
+
import { ColorId, CountryIso3, CurrencyCode, IconName, MimeType } from "@stndrds/constants";
|
|
13
13
|
import { StandardSchemaV1, StandardSchemaV1 as StandardSchemaV1$1 } from "@standard-schema/spec";
|
|
14
14
|
//#region src/relations/attribute-lookup.d.ts
|
|
15
15
|
/** A record-scoped collection addressed through its owner's ordinary attribute. */
|
|
@@ -2310,6 +2310,31 @@ export type AIChatMessagePart = {
|
|
|
2310
2310
|
* notification. `completed` reads as success; everything else reads as failure.
|
|
2311
2311
|
*/
|
|
2312
2312
|
export type AISubagentStatus = "completed" | "failed" | "cancelled" | "timeout" | "expired";
|
|
2313
|
+
/**
|
|
2314
|
+
* `metadata.kind` of the `user` row the backend appends to a parent session when
|
|
2315
|
+
* a dispatched child finishes. It is delivered by its own mechanism and is NEVER
|
|
2316
|
+
* a waiting message: a person did not send it, and the agent's read watermark
|
|
2317
|
+
* ignores it. Every reader that decides "is this message waiting" reaches the
|
|
2318
|
+
* rule here: the SQL predicate (`waitingUserMessage` in the Postgres
|
|
2319
|
+
* repository) binds {@link AGENT_NOTIFICATION_KIND} as a query parameter; the
|
|
2320
|
+
* runtime mock and the client readers call {@link isAgentNotificationMetadata}.
|
|
2321
|
+
* A contract test in the runtime keeps the literal out of everywhere else
|
|
2322
|
+
* (#3792).
|
|
2323
|
+
*/
|
|
2324
|
+
export declare const AGENT_NOTIFICATION_KIND = "agent-notification";
|
|
2325
|
+
/** Whether a message's metadata marks it as a subagent notification. */
|
|
2326
|
+
export declare function isAgentNotificationMetadata(metadata: Readonly<Record<string, unknown>> | null | undefined): boolean;
|
|
2327
|
+
/**
|
|
2328
|
+
* `metadata.kind` of a `user` row another agent wrote into a session through
|
|
2329
|
+
* `sendInitialMessage`: a spawn mission or a `message_agent` follow-up. Like
|
|
2330
|
+
* the notification, it is the turn's input but not a person's message, so
|
|
2331
|
+
* anything that means "what the person just gave" — attachments above all —
|
|
2332
|
+
* must not read it as one. The runtime's `messaging/message-author` composes
|
|
2333
|
+
* the row-level predicates from this and {@link isAgentNotificationMetadata}.
|
|
2334
|
+
*/
|
|
2335
|
+
export declare const AGENT_MESSAGE_KIND = "agent-message";
|
|
2336
|
+
/** Whether a message's metadata marks it as written by another agent. */
|
|
2337
|
+
export declare function isAgentMessageMetadata(metadata: Readonly<Record<string, unknown>> | null | undefined): boolean;
|
|
2313
2338
|
/**
|
|
2314
2339
|
* Narrow, UI-ready projection of an `agent-notification` message. Derived by the
|
|
2315
2340
|
* react mapper from the raw `AgentSessionMessage.metadata` so the UI never has to
|
|
@@ -2663,6 +2688,207 @@ export interface AIUsageMeasurementsV1 {
|
|
|
2663
2688
|
source: "server" | "provider" | "mixed";
|
|
2664
2689
|
}
|
|
2665
2690
|
//#endregion
|
|
2691
|
+
//#region src/types/device-channel.d.ts
|
|
2692
|
+
/**
|
|
2693
|
+
* The device channel wire protocol, shared by the API server, the CLI shell
|
|
2694
|
+
* worker and the browser extension. Browser payloads (`command.action`,
|
|
2695
|
+
* `complete.result.result`) are opaque records here: only the server refines
|
|
2696
|
+
* them against the browser action vocabulary.
|
|
2697
|
+
*/
|
|
2698
|
+
/** Absolute path of the channel on the API origin (the `/v1` prefix included). */
|
|
2699
|
+
export declare const DEVICE_CHANNEL_PATH = "/v1/device-worker/channel";
|
|
2700
|
+
export declare const DEVICE_CHANNEL_MAX_FRAME_BYTES = 262144;
|
|
2701
|
+
/** A socket that has not sent `authenticate` within this budget is closed 1008. */
|
|
2702
|
+
export declare const DEVICE_CHANNEL_AUTHENTICATE_TIMEOUT_MS = 10000;
|
|
2703
|
+
/** The server leases the next queued command from the store on this cadence while idle. */
|
|
2704
|
+
export declare const DEVICE_CHANNEL_IDLE_POLL_MS = 2000;
|
|
2705
|
+
/** The server re-validates the credential and refreshes presence on this cadence. */
|
|
2706
|
+
export declare const DEVICE_CHANNEL_PRESENCE_MS = 2000;
|
|
2707
|
+
/**
|
|
2708
|
+
* The server sends `{ type: "ping" }` plus a control ping on this cadence; a
|
|
2709
|
+
* socket that has not answered the control ping by the next tick is dropped.
|
|
2710
|
+
* The JSON frame is what keeps an MV3 service worker awake.
|
|
2711
|
+
*/
|
|
2712
|
+
export declare const DEVICE_CHANNEL_KEEPALIVE_MS = 20000;
|
|
2713
|
+
export declare const DEVICE_COMMAND_ERROR_CODES: readonly ["worker_disconnected", "cancelled", "timed_out", "execution_failed", "stale_reference", "tab_unavailable", "debugger_unavailable", "blocked_by_user"];
|
|
2714
|
+
export type DeviceCommandErrorCode = (typeof DEVICE_COMMAND_ERROR_CODES)[number];
|
|
2715
|
+
export declare class DeviceChannelProtocolError extends SchemaError {
|
|
2716
|
+
readonly _tag = "DeviceChannelProtocolError";
|
|
2717
|
+
constructor(message: string);
|
|
2718
|
+
}
|
|
2719
|
+
/** The two payloads the shared protocol leaves opaque; the server refines them. */
|
|
2720
|
+
export interface DeviceChannelPayloadSchemas<Action, Result> {
|
|
2721
|
+
action: z$1.ZodType<Action>;
|
|
2722
|
+
result: z$1.ZodType<Result>;
|
|
2723
|
+
}
|
|
2724
|
+
/** Builds both frame unions around the given browser payload schemas. */
|
|
2725
|
+
export declare function defineDeviceChannelFrames<Action, Result>(payloads: DeviceChannelPayloadSchemas<Action, Result>): {
|
|
2726
|
+
worker: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2727
|
+
type: z$1.ZodLiteral<"authenticate">;
|
|
2728
|
+
credential: z$1.ZodString;
|
|
2729
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2730
|
+
id: z$1.ZodUUID;
|
|
2731
|
+
leaseToken: z$1.ZodString;
|
|
2732
|
+
type: z$1.ZodLiteral<"running">;
|
|
2733
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2734
|
+
id: z$1.ZodUUID;
|
|
2735
|
+
leaseToken: z$1.ZodString;
|
|
2736
|
+
type: z$1.ZodLiteral<"heartbeat">;
|
|
2737
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2738
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2739
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2740
|
+
id: z$1.ZodUUID;
|
|
2741
|
+
leaseToken: z$1.ZodString;
|
|
2742
|
+
type: z$1.ZodLiteral<"output">;
|
|
2743
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2744
|
+
result: z$1.ZodObject<{
|
|
2745
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2746
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2747
|
+
exitCode: z$1.ZodNumber;
|
|
2748
|
+
success: z$1.ZodBoolean;
|
|
2749
|
+
errorCode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2750
|
+
cancelled: "cancelled";
|
|
2751
|
+
worker_disconnected: "worker_disconnected";
|
|
2752
|
+
timed_out: "timed_out";
|
|
2753
|
+
execution_failed: "execution_failed";
|
|
2754
|
+
stale_reference: "stale_reference";
|
|
2755
|
+
tab_unavailable: "tab_unavailable";
|
|
2756
|
+
debugger_unavailable: "debugger_unavailable";
|
|
2757
|
+
blocked_by_user: "blocked_by_user";
|
|
2758
|
+
}>>;
|
|
2759
|
+
result: z$1.ZodOptional<z$1.ZodType<Result, unknown, z$1.core.$ZodTypeInternals<Result, unknown>>>;
|
|
2760
|
+
}, z$1.core.$strict>;
|
|
2761
|
+
id: z$1.ZodUUID;
|
|
2762
|
+
leaseToken: z$1.ZodString;
|
|
2763
|
+
type: z$1.ZodLiteral<"complete">;
|
|
2764
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2765
|
+
type: z$1.ZodLiteral<"pong">;
|
|
2766
|
+
}, z$1.core.$strict>], "type">;
|
|
2767
|
+
server: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2768
|
+
type: z$1.ZodLiteral<"ready">;
|
|
2769
|
+
device: z$1.ZodObject<{
|
|
2770
|
+
id: z$1.ZodString;
|
|
2771
|
+
name: z$1.ZodString;
|
|
2772
|
+
capability: z$1.ZodEnum<{
|
|
2773
|
+
shell: "shell";
|
|
2774
|
+
browser: "browser";
|
|
2775
|
+
}>;
|
|
2776
|
+
}, z$1.core.$strict>;
|
|
2777
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2778
|
+
kind: z$1.ZodEnum<{
|
|
2779
|
+
shell: "shell";
|
|
2780
|
+
browser: "browser";
|
|
2781
|
+
}>;
|
|
2782
|
+
intent: z$1.ZodString;
|
|
2783
|
+
timeoutMs: z$1.ZodNumber;
|
|
2784
|
+
command: z$1.ZodOptional<z$1.ZodString>;
|
|
2785
|
+
cwd: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
2786
|
+
action: z$1.ZodOptional<z$1.ZodType<Action, unknown, z$1.core.$ZodTypeInternals<Action, unknown>>>;
|
|
2787
|
+
id: z$1.ZodUUID;
|
|
2788
|
+
leaseToken: z$1.ZodString;
|
|
2789
|
+
type: z$1.ZodLiteral<"command">;
|
|
2790
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2791
|
+
type: z$1.ZodLiteral<"cancel">;
|
|
2792
|
+
id: z$1.ZodUUID;
|
|
2793
|
+
reason: z$1.ZodEnum<{
|
|
2794
|
+
cancelled: "cancelled";
|
|
2795
|
+
timed_out: "timed_out";
|
|
2796
|
+
revoked: "revoked";
|
|
2797
|
+
}>;
|
|
2798
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2799
|
+
type: z$1.ZodLiteral<"reauthenticate">;
|
|
2800
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2801
|
+
type: z$1.ZodLiteral<"revoked">;
|
|
2802
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2803
|
+
type: z$1.ZodLiteral<"ping">;
|
|
2804
|
+
}, z$1.core.$strict>], "type">;
|
|
2805
|
+
};
|
|
2806
|
+
export declare const DeviceChannelWorkerFrameSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2807
|
+
type: z$1.ZodLiteral<"authenticate">;
|
|
2808
|
+
credential: z$1.ZodString;
|
|
2809
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2810
|
+
id: z$1.ZodUUID;
|
|
2811
|
+
leaseToken: z$1.ZodString;
|
|
2812
|
+
type: z$1.ZodLiteral<"running">;
|
|
2813
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2814
|
+
id: z$1.ZodUUID;
|
|
2815
|
+
leaseToken: z$1.ZodString;
|
|
2816
|
+
type: z$1.ZodLiteral<"heartbeat">;
|
|
2817
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2818
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2819
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2820
|
+
id: z$1.ZodUUID;
|
|
2821
|
+
leaseToken: z$1.ZodString;
|
|
2822
|
+
type: z$1.ZodLiteral<"output">;
|
|
2823
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2824
|
+
result: z$1.ZodObject<{
|
|
2825
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2826
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2827
|
+
exitCode: z$1.ZodNumber;
|
|
2828
|
+
success: z$1.ZodBoolean;
|
|
2829
|
+
errorCode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2830
|
+
cancelled: "cancelled";
|
|
2831
|
+
worker_disconnected: "worker_disconnected";
|
|
2832
|
+
timed_out: "timed_out";
|
|
2833
|
+
execution_failed: "execution_failed";
|
|
2834
|
+
stale_reference: "stale_reference";
|
|
2835
|
+
tab_unavailable: "tab_unavailable";
|
|
2836
|
+
debugger_unavailable: "debugger_unavailable";
|
|
2837
|
+
blocked_by_user: "blocked_by_user";
|
|
2838
|
+
}>>;
|
|
2839
|
+
result: z$1.ZodOptional<z$1.ZodType<Record<string, unknown>, unknown, z$1.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
|
|
2840
|
+
}, z$1.core.$strict>;
|
|
2841
|
+
id: z$1.ZodUUID;
|
|
2842
|
+
leaseToken: z$1.ZodString;
|
|
2843
|
+
type: z$1.ZodLiteral<"complete">;
|
|
2844
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2845
|
+
type: z$1.ZodLiteral<"pong">;
|
|
2846
|
+
}, z$1.core.$strict>], "type">;
|
|
2847
|
+
export declare const DeviceChannelServerFrameSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2848
|
+
type: z$1.ZodLiteral<"ready">;
|
|
2849
|
+
device: z$1.ZodObject<{
|
|
2850
|
+
id: z$1.ZodString;
|
|
2851
|
+
name: z$1.ZodString;
|
|
2852
|
+
capability: z$1.ZodEnum<{
|
|
2853
|
+
shell: "shell";
|
|
2854
|
+
browser: "browser";
|
|
2855
|
+
}>;
|
|
2856
|
+
}, z$1.core.$strict>;
|
|
2857
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2858
|
+
kind: z$1.ZodEnum<{
|
|
2859
|
+
shell: "shell";
|
|
2860
|
+
browser: "browser";
|
|
2861
|
+
}>;
|
|
2862
|
+
intent: z$1.ZodString;
|
|
2863
|
+
timeoutMs: z$1.ZodNumber;
|
|
2864
|
+
command: z$1.ZodOptional<z$1.ZodString>;
|
|
2865
|
+
cwd: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
2866
|
+
action: z$1.ZodOptional<z$1.ZodType<Record<string, unknown>, unknown, z$1.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
|
|
2867
|
+
id: z$1.ZodUUID;
|
|
2868
|
+
leaseToken: z$1.ZodString;
|
|
2869
|
+
type: z$1.ZodLiteral<"command">;
|
|
2870
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2871
|
+
type: z$1.ZodLiteral<"cancel">;
|
|
2872
|
+
id: z$1.ZodUUID;
|
|
2873
|
+
reason: z$1.ZodEnum<{
|
|
2874
|
+
cancelled: "cancelled";
|
|
2875
|
+
timed_out: "timed_out";
|
|
2876
|
+
revoked: "revoked";
|
|
2877
|
+
}>;
|
|
2878
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2879
|
+
type: z$1.ZodLiteral<"reauthenticate">;
|
|
2880
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2881
|
+
type: z$1.ZodLiteral<"revoked">;
|
|
2882
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2883
|
+
type: z$1.ZodLiteral<"ping">;
|
|
2884
|
+
}, z$1.core.$strict>], "type">;
|
|
2885
|
+
export type DeviceChannelWorkerFrame = z$1.infer<typeof DeviceChannelWorkerFrameSchema>;
|
|
2886
|
+
export type DeviceChannelServerFrame = z$1.infer<typeof DeviceChannelServerFrameSchema>;
|
|
2887
|
+
/** Parses one text frame; a non-JSON or off-protocol frame is a `DeviceChannelProtocolError`. */
|
|
2888
|
+
export declare function parseDeviceChannelFrame<T>(schema: z$1.ZodType<T>, raw: string): T;
|
|
2889
|
+
export declare function parseWorkerFrame(raw: string): DeviceChannelWorkerFrame;
|
|
2890
|
+
export declare function parseServerFrame(raw: string): DeviceChannelServerFrame;
|
|
2891
|
+
//#endregion
|
|
2666
2892
|
//#region src/types/documents.d.ts
|
|
2667
2893
|
export type DocumentKind = "file" | "folder";
|
|
2668
2894
|
export interface Document extends Timestamps {
|
|
@@ -5093,7 +5319,7 @@ export interface AIGenerationResult {
|
|
|
5093
5319
|
//#endregion
|
|
5094
5320
|
//#region src/types/ai-usage.d.ts
|
|
5095
5321
|
/** Client-safe AI usage and wallet vocabulary, shared by the journal, the API and the composer. */
|
|
5096
|
-
export type UsageModality = "text" | "image" | "audio" | "video" | "embedding";
|
|
5322
|
+
export type UsageModality = "text" | "image" | "audio" | "video" | "embedding" | "decision";
|
|
5097
5323
|
/** Whose usage a report covers: the caller's own (agents folded into their principal) or the whole workspace. */
|
|
5098
5324
|
export type UsageScope = "me" | "workspace";
|
|
5099
5325
|
/** One aggregate of journal rows; money as decimal strings, counts as integers. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
import { $ as BilateralConfig, $t as indexBy, A as StorageError, An as ComputedDependency, At as StatusGroup, B as isObjectReferencedError, Bn as ComputedFormulaLiteralNode, Bt as OptionPropertyAttribute, C as RepositoryOperation, Cn as assertAcyclicComputedDependencies, Ct as RichTextAttribute, D as SchemaErrorCode, Dn as ComputedFunctionName, Dt as SelectAttribute, E as SchemaError, En as COMPUTED_FUNCTION_NAMES, Et as RollupFunction, F as SystemEntityImmutableError, Fn as ComputedValueType, Ft as inferInverseCardinality, G as BuiltInTransform, Gt as resolvePropertyDefinitions, H as isRecordReferencedError, Hn as ComputedFormulaPathNode, Ht as PropertySchema, I as ValidationError, In as ComputedFormulaAstNode, It as isAttributeSortable, J as ATTRIBUTE_TYPES, Jt as Uuid, K as MigrationDefinition, Kt as TenantId, L as ValidationErrorDetail, Ln as ComputedFormulaBinaryNode, Lt as isBilateralRelation, M as SyncCascadeError, Mn as ComputedOptionsSource, Mt as TimeFormat, N as SyncConflictError, Nn as ComputedPlan, Nt as UserAttribute, O as SchemaPlanNotFoundError, On as ComputedFunctionSignature, Ot as SingleRelationAttribute, P as SyncError, Pn as ComputedReturnType, Pt as UserReferenceType, Q as BaseAttribute, Qt as generateId, R as isAttributeInUseError, Rn as ComputedFormulaBinaryOperator, Rt as isUniversalRelation, S as RepositoryError, Sn as ComputedFormulaCompileError, St as RelationTarget, T as RoleNotFoundError, Tn as COMPUTED_FUNCTIONS, Tt as RollupAttribute, U as isSchemaError, Un as parseComputedFormula, Ut as PropertyType, V as isProtectedResourceError, Vn as ComputedFormulaParseError, Vt as PropertyAttribute, W as isValidationError, Wt as hasOptions, X as AttributeGroup, Xt as asUserId, Y as Attribute, Yt as asTenantId, Z as AttributeType, Zt as deepEqual, _ as ProtectedResourceError, _n as CompileComputedFormulaInput, _t as Option, a as ChangeTypeNotSupportedError, an as COMPUTED_FUNCTION_METADATA, at as DateRangeValue, b as RecordReference, bn as ComputedCompileSchema, bt as RELATION_TARGET_ANY, c as DuplicateError, cn as ComputedFormulaResult, ct as FormulaAttribute, d as MigrationTimeoutError, dn as evaluateComputedFormulaWithResult, dt as LocationAttribute, en as NonJsonValueError, et as CheckboxAttribute, f as NotFoundError, fn as formatComputedResult, ft as LocationGranularity, g as OrphanSystemAttributeError, gn as rollupToFormulaExpression, gt as NumberUnit, h as ObjectReferencedError, hn as inferRollupReturnType, ht as NumberAttribute, i as AttributeUsage, in as serializeStableJson, it as DateFormat, j as StorageOperation, jn as ComputedFieldKind, jt as TextAttribute, k as SearchBackendError, kn as isComputedFunctionName, kt as StatusAttribute, l as ForbiddenError, ln as evaluateComputedAst, lt as FormulaReturnType, m as ObjectNotFoundError, mn as compileRollupAttribute, mt as MultiselectAttribute, n as AttributeInUseError, nn as sameStableValue, nt as CurrencyAttribute, o as ConcurrentModificationError, on as ComputedFunctionCategory, ot as DateValue, p as NotImplementedError, pn as isPlainRecord, pt as MultiRelationAttribute, q as SchemaOperation, qt as UserId, r as AttributeNotFoundError, rn as serializeCanonicalJson, rt as DateAttribute, s as DestructiveSyncNotAllowedError, sn as ComputedFunctionMetadata, st as DocumentAttribute, t as AccessDeniedError, tn as canonicalStringify, tt as Currency, u as MemoryNotFoundError, un as evaluateComputedFormula, ut as Location, v as ProtectedRoleError, vn as ComputedCompileAttribute, vt as Phone, w as ReservedObjectNameError, wn as compileComputedFormula, wt as RichtextAttribute, x as RecordReferencedError, xn as ComputedDependencyGraphNode, xt as RelationAttribute, y as RecordNotFoundError, yn as ComputedCompileObject, yt as PhoneAttribute, z as isNotFoundError, zn as ComputedFormulaCallNode, zt as relationTargetsOf } from "./exceptions-
|
|
3
|
-
import { $ as QueryState, A as FormContentDefinition, B as DayMonthValue, C as ContentOpenMode, D as CustomContentDefinition, E as ContentViewDefinition, F as MeetingsContentDefinition, G as FilterOperator, H as EdgeQuantifier, I as RichtextContentDefinition, J as FilterValue, K as FilterRule, L as ViewContentDefinition, M as FormsContentDefinition, N as KanbanCollectionContentDefinition, O as DocumentsContentDefinition, P as ListViewLayout, Q as PhoneFilterValue, R as ViewRead, S as ContentFieldGroup, T as ContentViewContext, U as ExtendedFilterRule, V as DynamicValue, W as FilterCombinator, X as NoValueOperator, Y as NO_VALUE_OPERATORS, Z as OPERATORS_BY_TYPE, _ as CollectionContentDefinition, a as contentViewDefinitionSchemaFor, at as isNoValueOperator, b as ContentCreateMode, c as draftContentViewDefinitionSchemaFor, d as sortsSchema, et as RelativeDateValue, f as colorIdSchema, g as CollectionAction, h as ActivityContentDefinition, i as contentViewDefinitionSchema, it as getRollupFilterOperators, j as FormDensity, k as EmailsContentDefinition, l as filterStateSchema, m as SCHEMA_LIMITS, n as collectionContentSourceSchema, nt as SortRule, o as displayAttributesSchema, p as iconNameSchema, q as FilterState, r as columnsSchema, rt as filterOperatorsByTypeForGeneration, s as draftContentViewDefinitionSchema, t as AsideRule, tt as SortDirection, u as publishedViewContentDefinitionSchema, v as CollectionContentSource, w as ContentPlacement, x as ContentField, y as ColumnReference, z as CurrencyFilterValue } from "./all-
|
|
4
|
-
import { A as FolderPreset, C as ResourceVisibility, D as parseResourceVisibility, E as Timestamps, M as PresetNode, O as DocumentLayout, S as ReservedObjectName, T as SystemFieldName, _ as ObjectRecord, a as validateDraft, b as RESOURCE_VISIBILITIES, c as validateObjectOrThrow, f as createFormAttributeValidator, g as ObjectDefinition, h as ObjectAttribute, j as MAX_PRESET_DEPTH, k as DocumentLayoutVariant, m as ListViewTabVisibility, o as validateDraftOrThrow, p as LIST_VIEW_TAB_VISIBILITIES, r as rejectUnknownAttributesOrThrow, s as validateObject, v as RESERVED_ATTRIBUTE_NAMES, w as SYSTEM_FIELD_NAMES, x as ReservedAttributeName, y as RESERVED_OBJECT_NAMES } from "./index-
|
|
5
|
-
import { S as UpdateObjectInput, _ as statusOptionWriteSchema, b as RelationOption, c as parseAttributeConfigForCreate, d as propertyAttributeWireSchema, f as propertySchemaSchema, g as statusGroupSchema, h as selectOptionWriteSchema, l as parseAttributeConfigForUpdate, m as refuseForeignKeys, n as WIRE_OMITTED_CONFIG_KEYS, o as multiselectOptionWriteSchema, p as propertySchemaWireSchema, r as attributeConfigSchemas, s as parseAttributeConfig, t as SIMPLE_PROPERTY_TYPES, u as propertyAttributeSchema, v as AddAttributeInput, x as RelationOptionsResponse, y as CreateCustomObjectInput } from "./index-
|
|
6
|
-
import { n as DEFAULT_VALIDATION_MESSAGES, r as ValidationMessages, t as formatZodErrors } from "./index-
|
|
7
|
-
import { t as createTextValidator } from "./text-
|
|
8
|
-
import { t as createNumberValidator } from "./number-
|
|
9
|
-
import { t as createCheckboxValidator } from "./checkbox-
|
|
10
|
-
import { t as createDateValidator } from "./date-
|
|
2
|
+
import { $ as BilateralConfig, $t as indexBy, A as StorageError, An as ComputedDependency, At as StatusGroup, B as isObjectReferencedError, Bn as ComputedFormulaLiteralNode, Bt as OptionPropertyAttribute, C as RepositoryOperation, Cn as assertAcyclicComputedDependencies, Ct as RichTextAttribute, D as SchemaErrorCode, Dn as ComputedFunctionName, Dt as SelectAttribute, E as SchemaError, En as COMPUTED_FUNCTION_NAMES, Et as RollupFunction, F as SystemEntityImmutableError, Fn as ComputedValueType, Ft as inferInverseCardinality, G as BuiltInTransform, Gt as resolvePropertyDefinitions, H as isRecordReferencedError, Hn as ComputedFormulaPathNode, Ht as PropertySchema, I as ValidationError, In as ComputedFormulaAstNode, It as isAttributeSortable, J as ATTRIBUTE_TYPES, Jt as Uuid, K as MigrationDefinition, Kt as TenantId, L as ValidationErrorDetail, Ln as ComputedFormulaBinaryNode, Lt as isBilateralRelation, M as SyncCascadeError, Mn as ComputedOptionsSource, Mt as TimeFormat, N as SyncConflictError, Nn as ComputedPlan, Nt as UserAttribute, O as SchemaPlanNotFoundError, On as ComputedFunctionSignature, Ot as SingleRelationAttribute, P as SyncError, Pn as ComputedReturnType, Pt as UserReferenceType, Q as BaseAttribute, Qt as generateId, R as isAttributeInUseError, Rn as ComputedFormulaBinaryOperator, Rt as isUniversalRelation, S as RepositoryError, Sn as ComputedFormulaCompileError, St as RelationTarget, T as RoleNotFoundError, Tn as COMPUTED_FUNCTIONS, Tt as RollupAttribute, U as isSchemaError, Un as parseComputedFormula, Ut as PropertyType, V as isProtectedResourceError, Vn as ComputedFormulaParseError, Vt as PropertyAttribute, W as isValidationError, Wt as hasOptions, X as AttributeGroup, Xt as asUserId, Y as Attribute, Yt as asTenantId, Z as AttributeType, Zt as deepEqual, _ as ProtectedResourceError, _n as CompileComputedFormulaInput, _t as Option, a as ChangeTypeNotSupportedError, an as COMPUTED_FUNCTION_METADATA, at as DateRangeValue, b as RecordReference, bn as ComputedCompileSchema, bt as RELATION_TARGET_ANY, c as DuplicateError, cn as ComputedFormulaResult, ct as FormulaAttribute, d as MigrationTimeoutError, dn as evaluateComputedFormulaWithResult, dt as LocationAttribute, en as NonJsonValueError, et as CheckboxAttribute, f as NotFoundError, fn as formatComputedResult, ft as LocationGranularity, g as OrphanSystemAttributeError, gn as rollupToFormulaExpression, gt as NumberUnit, h as ObjectReferencedError, hn as inferRollupReturnType, ht as NumberAttribute, i as AttributeUsage, in as serializeStableJson, it as DateFormat, j as StorageOperation, jn as ComputedFieldKind, jt as TextAttribute, k as SearchBackendError, kn as isComputedFunctionName, kt as StatusAttribute, l as ForbiddenError, ln as evaluateComputedAst, lt as FormulaReturnType, m as ObjectNotFoundError, mn as compileRollupAttribute, mt as MultiselectAttribute, n as AttributeInUseError, nn as sameStableValue, nt as CurrencyAttribute, o as ConcurrentModificationError, on as ComputedFunctionCategory, ot as DateValue, p as NotImplementedError, pn as isPlainRecord, pt as MultiRelationAttribute, q as SchemaOperation, qt as UserId, r as AttributeNotFoundError, rn as serializeCanonicalJson, rt as DateAttribute, s as DestructiveSyncNotAllowedError, sn as ComputedFunctionMetadata, st as DocumentAttribute, t as AccessDeniedError, tn as canonicalStringify, tt as Currency, u as MemoryNotFoundError, un as evaluateComputedFormula, ut as Location, v as ProtectedRoleError, vn as ComputedCompileAttribute, vt as Phone, w as ReservedObjectNameError, wn as compileComputedFormula, wt as RichtextAttribute, x as RecordReferencedError, xn as ComputedDependencyGraphNode, xt as RelationAttribute, y as RecordNotFoundError, yn as ComputedCompileObject, yt as PhoneAttribute, z as isNotFoundError, zn as ComputedFormulaCallNode, zt as relationTargetsOf } from "./exceptions-BCfkN2ct.js";
|
|
3
|
+
import { $ as QueryState, A as FormContentDefinition, B as DayMonthValue, C as ContentOpenMode, D as CustomContentDefinition, E as ContentViewDefinition, F as MeetingsContentDefinition, G as FilterOperator, H as EdgeQuantifier, I as RichtextContentDefinition, J as FilterValue, K as FilterRule, L as ViewContentDefinition, M as FormsContentDefinition, N as KanbanCollectionContentDefinition, O as DocumentsContentDefinition, P as ListViewLayout, Q as PhoneFilterValue, R as ViewRead, S as ContentFieldGroup, T as ContentViewContext, U as ExtendedFilterRule, V as DynamicValue, W as FilterCombinator, X as NoValueOperator, Y as NO_VALUE_OPERATORS, Z as OPERATORS_BY_TYPE, _ as CollectionContentDefinition, a as contentViewDefinitionSchemaFor, at as isNoValueOperator, b as ContentCreateMode, c as draftContentViewDefinitionSchemaFor, d as sortsSchema, et as RelativeDateValue, f as colorIdSchema, g as CollectionAction, h as ActivityContentDefinition, i as contentViewDefinitionSchema, it as getRollupFilterOperators, j as FormDensity, k as EmailsContentDefinition, l as filterStateSchema, m as SCHEMA_LIMITS, n as collectionContentSourceSchema, nt as SortRule, o as displayAttributesSchema, p as iconNameSchema, q as FilterState, r as columnsSchema, rt as filterOperatorsByTypeForGeneration, s as draftContentViewDefinitionSchema, t as AsideRule, tt as SortDirection, u as publishedViewContentDefinitionSchema, v as CollectionContentSource, w as ContentPlacement, x as ContentField, y as ColumnReference, z as CurrencyFilterValue } from "./all-BjBPrd9V.js";
|
|
4
|
+
import { A as FolderPreset, C as ResourceVisibility, D as parseResourceVisibility, E as Timestamps, M as PresetNode, O as DocumentLayout, S as ReservedObjectName, T as SystemFieldName, _ as ObjectRecord, a as validateDraft, b as RESOURCE_VISIBILITIES, c as validateObjectOrThrow, f as createFormAttributeValidator, g as ObjectDefinition, h as ObjectAttribute, j as MAX_PRESET_DEPTH, k as DocumentLayoutVariant, m as ListViewTabVisibility, o as validateDraftOrThrow, p as LIST_VIEW_TAB_VISIBILITIES, r as rejectUnknownAttributesOrThrow, s as validateObject, v as RESERVED_ATTRIBUTE_NAMES, w as SYSTEM_FIELD_NAMES, x as ReservedAttributeName, y as RESERVED_OBJECT_NAMES } from "./index-CLEwI8GE.js";
|
|
5
|
+
import { S as UpdateObjectInput, _ as statusOptionWriteSchema, b as RelationOption, c as parseAttributeConfigForCreate, d as propertyAttributeWireSchema, f as propertySchemaSchema, g as statusGroupSchema, h as selectOptionWriteSchema, l as parseAttributeConfigForUpdate, m as refuseForeignKeys, n as WIRE_OMITTED_CONFIG_KEYS, o as multiselectOptionWriteSchema, p as propertySchemaWireSchema, r as attributeConfigSchemas, s as parseAttributeConfig, t as SIMPLE_PROPERTY_TYPES, u as propertyAttributeSchema, v as AddAttributeInput, x as RelationOptionsResponse, y as CreateCustomObjectInput } from "./index-BKv7a08I.js";
|
|
6
|
+
import { n as DEFAULT_VALIDATION_MESSAGES, r as ValidationMessages, t as formatZodErrors } from "./index-DyeLYnEc.js";
|
|
7
|
+
import { t as createTextValidator } from "./text-C4EAE9Ap.js";
|
|
8
|
+
import { t as createNumberValidator } from "./number-BcMYyg8j.js";
|
|
9
|
+
import { t as createCheckboxValidator } from "./checkbox-D8nK0oIO.js";
|
|
10
|
+
import { t as createDateValidator } from "./date-BGULTVlX.js";
|
|
11
11
|
import z, { z as z$1 } from "zod";
|
|
12
12
|
import { ColorId, CountryIso3, CurrencyCode, IconName, MimeType } from "@stndrds/constants";
|
|
13
13
|
import { StandardSchemaV1, StandardSchemaV1 as StandardSchemaV1$1 } from "@standard-schema/spec";
|
|
@@ -2310,6 +2310,31 @@ export type AIChatMessagePart = {
|
|
|
2310
2310
|
* notification. `completed` reads as success; everything else reads as failure.
|
|
2311
2311
|
*/
|
|
2312
2312
|
export type AISubagentStatus = "completed" | "failed" | "cancelled" | "timeout" | "expired";
|
|
2313
|
+
/**
|
|
2314
|
+
* `metadata.kind` of the `user` row the backend appends to a parent session when
|
|
2315
|
+
* a dispatched child finishes. It is delivered by its own mechanism and is NEVER
|
|
2316
|
+
* a waiting message: a person did not send it, and the agent's read watermark
|
|
2317
|
+
* ignores it. Every reader that decides "is this message waiting" reaches the
|
|
2318
|
+
* rule here: the SQL predicate (`waitingUserMessage` in the Postgres
|
|
2319
|
+
* repository) binds {@link AGENT_NOTIFICATION_KIND} as a query parameter; the
|
|
2320
|
+
* runtime mock and the client readers call {@link isAgentNotificationMetadata}.
|
|
2321
|
+
* A contract test in the runtime keeps the literal out of everywhere else
|
|
2322
|
+
* (#3792).
|
|
2323
|
+
*/
|
|
2324
|
+
export declare const AGENT_NOTIFICATION_KIND = "agent-notification";
|
|
2325
|
+
/** Whether a message's metadata marks it as a subagent notification. */
|
|
2326
|
+
export declare function isAgentNotificationMetadata(metadata: Readonly<Record<string, unknown>> | null | undefined): boolean;
|
|
2327
|
+
/**
|
|
2328
|
+
* `metadata.kind` of a `user` row another agent wrote into a session through
|
|
2329
|
+
* `sendInitialMessage`: a spawn mission or a `message_agent` follow-up. Like
|
|
2330
|
+
* the notification, it is the turn's input but not a person's message, so
|
|
2331
|
+
* anything that means "what the person just gave" — attachments above all —
|
|
2332
|
+
* must not read it as one. The runtime's `messaging/message-author` composes
|
|
2333
|
+
* the row-level predicates from this and {@link isAgentNotificationMetadata}.
|
|
2334
|
+
*/
|
|
2335
|
+
export declare const AGENT_MESSAGE_KIND = "agent-message";
|
|
2336
|
+
/** Whether a message's metadata marks it as written by another agent. */
|
|
2337
|
+
export declare function isAgentMessageMetadata(metadata: Readonly<Record<string, unknown>> | null | undefined): boolean;
|
|
2313
2338
|
/**
|
|
2314
2339
|
* Narrow, UI-ready projection of an `agent-notification` message. Derived by the
|
|
2315
2340
|
* react mapper from the raw `AgentSessionMessage.metadata` so the UI never has to
|
|
@@ -2663,6 +2688,207 @@ export interface AIUsageMeasurementsV1 {
|
|
|
2663
2688
|
source: "server" | "provider" | "mixed";
|
|
2664
2689
|
}
|
|
2665
2690
|
//#endregion
|
|
2691
|
+
//#region src/types/device-channel.d.ts
|
|
2692
|
+
/**
|
|
2693
|
+
* The device channel wire protocol, shared by the API server, the CLI shell
|
|
2694
|
+
* worker and the browser extension. Browser payloads (`command.action`,
|
|
2695
|
+
* `complete.result.result`) are opaque records here: only the server refines
|
|
2696
|
+
* them against the browser action vocabulary.
|
|
2697
|
+
*/
|
|
2698
|
+
/** Absolute path of the channel on the API origin (the `/v1` prefix included). */
|
|
2699
|
+
export declare const DEVICE_CHANNEL_PATH = "/v1/device-worker/channel";
|
|
2700
|
+
export declare const DEVICE_CHANNEL_MAX_FRAME_BYTES = 262144;
|
|
2701
|
+
/** A socket that has not sent `authenticate` within this budget is closed 1008. */
|
|
2702
|
+
export declare const DEVICE_CHANNEL_AUTHENTICATE_TIMEOUT_MS = 10000;
|
|
2703
|
+
/** The server leases the next queued command from the store on this cadence while idle. */
|
|
2704
|
+
export declare const DEVICE_CHANNEL_IDLE_POLL_MS = 2000;
|
|
2705
|
+
/** The server re-validates the credential and refreshes presence on this cadence. */
|
|
2706
|
+
export declare const DEVICE_CHANNEL_PRESENCE_MS = 2000;
|
|
2707
|
+
/**
|
|
2708
|
+
* The server sends `{ type: "ping" }` plus a control ping on this cadence; a
|
|
2709
|
+
* socket that has not answered the control ping by the next tick is dropped.
|
|
2710
|
+
* The JSON frame is what keeps an MV3 service worker awake.
|
|
2711
|
+
*/
|
|
2712
|
+
export declare const DEVICE_CHANNEL_KEEPALIVE_MS = 20000;
|
|
2713
|
+
export declare const DEVICE_COMMAND_ERROR_CODES: readonly ["worker_disconnected", "cancelled", "timed_out", "execution_failed", "stale_reference", "tab_unavailable", "debugger_unavailable", "blocked_by_user"];
|
|
2714
|
+
export type DeviceCommandErrorCode = (typeof DEVICE_COMMAND_ERROR_CODES)[number];
|
|
2715
|
+
export declare class DeviceChannelProtocolError extends SchemaError {
|
|
2716
|
+
readonly _tag = "DeviceChannelProtocolError";
|
|
2717
|
+
constructor(message: string);
|
|
2718
|
+
}
|
|
2719
|
+
/** The two payloads the shared protocol leaves opaque; the server refines them. */
|
|
2720
|
+
export interface DeviceChannelPayloadSchemas<Action, Result> {
|
|
2721
|
+
action: z$1.ZodType<Action>;
|
|
2722
|
+
result: z$1.ZodType<Result>;
|
|
2723
|
+
}
|
|
2724
|
+
/** Builds both frame unions around the given browser payload schemas. */
|
|
2725
|
+
export declare function defineDeviceChannelFrames<Action, Result>(payloads: DeviceChannelPayloadSchemas<Action, Result>): {
|
|
2726
|
+
worker: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2727
|
+
type: z$1.ZodLiteral<"authenticate">;
|
|
2728
|
+
credential: z$1.ZodString;
|
|
2729
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2730
|
+
id: z$1.ZodUUID;
|
|
2731
|
+
leaseToken: z$1.ZodString;
|
|
2732
|
+
type: z$1.ZodLiteral<"running">;
|
|
2733
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2734
|
+
id: z$1.ZodUUID;
|
|
2735
|
+
leaseToken: z$1.ZodString;
|
|
2736
|
+
type: z$1.ZodLiteral<"heartbeat">;
|
|
2737
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2738
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2739
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2740
|
+
id: z$1.ZodUUID;
|
|
2741
|
+
leaseToken: z$1.ZodString;
|
|
2742
|
+
type: z$1.ZodLiteral<"output">;
|
|
2743
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2744
|
+
result: z$1.ZodObject<{
|
|
2745
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2746
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2747
|
+
exitCode: z$1.ZodNumber;
|
|
2748
|
+
success: z$1.ZodBoolean;
|
|
2749
|
+
errorCode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2750
|
+
cancelled: "cancelled";
|
|
2751
|
+
worker_disconnected: "worker_disconnected";
|
|
2752
|
+
timed_out: "timed_out";
|
|
2753
|
+
execution_failed: "execution_failed";
|
|
2754
|
+
stale_reference: "stale_reference";
|
|
2755
|
+
tab_unavailable: "tab_unavailable";
|
|
2756
|
+
debugger_unavailable: "debugger_unavailable";
|
|
2757
|
+
blocked_by_user: "blocked_by_user";
|
|
2758
|
+
}>>;
|
|
2759
|
+
result: z$1.ZodOptional<z$1.ZodType<Result, unknown, z$1.core.$ZodTypeInternals<Result, unknown>>>;
|
|
2760
|
+
}, z$1.core.$strict>;
|
|
2761
|
+
id: z$1.ZodUUID;
|
|
2762
|
+
leaseToken: z$1.ZodString;
|
|
2763
|
+
type: z$1.ZodLiteral<"complete">;
|
|
2764
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2765
|
+
type: z$1.ZodLiteral<"pong">;
|
|
2766
|
+
}, z$1.core.$strict>], "type">;
|
|
2767
|
+
server: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2768
|
+
type: z$1.ZodLiteral<"ready">;
|
|
2769
|
+
device: z$1.ZodObject<{
|
|
2770
|
+
id: z$1.ZodString;
|
|
2771
|
+
name: z$1.ZodString;
|
|
2772
|
+
capability: z$1.ZodEnum<{
|
|
2773
|
+
shell: "shell";
|
|
2774
|
+
browser: "browser";
|
|
2775
|
+
}>;
|
|
2776
|
+
}, z$1.core.$strict>;
|
|
2777
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2778
|
+
kind: z$1.ZodEnum<{
|
|
2779
|
+
shell: "shell";
|
|
2780
|
+
browser: "browser";
|
|
2781
|
+
}>;
|
|
2782
|
+
intent: z$1.ZodString;
|
|
2783
|
+
timeoutMs: z$1.ZodNumber;
|
|
2784
|
+
command: z$1.ZodOptional<z$1.ZodString>;
|
|
2785
|
+
cwd: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
2786
|
+
action: z$1.ZodOptional<z$1.ZodType<Action, unknown, z$1.core.$ZodTypeInternals<Action, unknown>>>;
|
|
2787
|
+
id: z$1.ZodUUID;
|
|
2788
|
+
leaseToken: z$1.ZodString;
|
|
2789
|
+
type: z$1.ZodLiteral<"command">;
|
|
2790
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2791
|
+
type: z$1.ZodLiteral<"cancel">;
|
|
2792
|
+
id: z$1.ZodUUID;
|
|
2793
|
+
reason: z$1.ZodEnum<{
|
|
2794
|
+
cancelled: "cancelled";
|
|
2795
|
+
timed_out: "timed_out";
|
|
2796
|
+
revoked: "revoked";
|
|
2797
|
+
}>;
|
|
2798
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2799
|
+
type: z$1.ZodLiteral<"reauthenticate">;
|
|
2800
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2801
|
+
type: z$1.ZodLiteral<"revoked">;
|
|
2802
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2803
|
+
type: z$1.ZodLiteral<"ping">;
|
|
2804
|
+
}, z$1.core.$strict>], "type">;
|
|
2805
|
+
};
|
|
2806
|
+
export declare const DeviceChannelWorkerFrameSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2807
|
+
type: z$1.ZodLiteral<"authenticate">;
|
|
2808
|
+
credential: z$1.ZodString;
|
|
2809
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2810
|
+
id: z$1.ZodUUID;
|
|
2811
|
+
leaseToken: z$1.ZodString;
|
|
2812
|
+
type: z$1.ZodLiteral<"running">;
|
|
2813
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2814
|
+
id: z$1.ZodUUID;
|
|
2815
|
+
leaseToken: z$1.ZodString;
|
|
2816
|
+
type: z$1.ZodLiteral<"heartbeat">;
|
|
2817
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2818
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2819
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2820
|
+
id: z$1.ZodUUID;
|
|
2821
|
+
leaseToken: z$1.ZodString;
|
|
2822
|
+
type: z$1.ZodLiteral<"output">;
|
|
2823
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2824
|
+
result: z$1.ZodObject<{
|
|
2825
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2826
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2827
|
+
exitCode: z$1.ZodNumber;
|
|
2828
|
+
success: z$1.ZodBoolean;
|
|
2829
|
+
errorCode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2830
|
+
cancelled: "cancelled";
|
|
2831
|
+
worker_disconnected: "worker_disconnected";
|
|
2832
|
+
timed_out: "timed_out";
|
|
2833
|
+
execution_failed: "execution_failed";
|
|
2834
|
+
stale_reference: "stale_reference";
|
|
2835
|
+
tab_unavailable: "tab_unavailable";
|
|
2836
|
+
debugger_unavailable: "debugger_unavailable";
|
|
2837
|
+
blocked_by_user: "blocked_by_user";
|
|
2838
|
+
}>>;
|
|
2839
|
+
result: z$1.ZodOptional<z$1.ZodType<Record<string, unknown>, unknown, z$1.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
|
|
2840
|
+
}, z$1.core.$strict>;
|
|
2841
|
+
id: z$1.ZodUUID;
|
|
2842
|
+
leaseToken: z$1.ZodString;
|
|
2843
|
+
type: z$1.ZodLiteral<"complete">;
|
|
2844
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2845
|
+
type: z$1.ZodLiteral<"pong">;
|
|
2846
|
+
}, z$1.core.$strict>], "type">;
|
|
2847
|
+
export declare const DeviceChannelServerFrameSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2848
|
+
type: z$1.ZodLiteral<"ready">;
|
|
2849
|
+
device: z$1.ZodObject<{
|
|
2850
|
+
id: z$1.ZodString;
|
|
2851
|
+
name: z$1.ZodString;
|
|
2852
|
+
capability: z$1.ZodEnum<{
|
|
2853
|
+
shell: "shell";
|
|
2854
|
+
browser: "browser";
|
|
2855
|
+
}>;
|
|
2856
|
+
}, z$1.core.$strict>;
|
|
2857
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2858
|
+
kind: z$1.ZodEnum<{
|
|
2859
|
+
shell: "shell";
|
|
2860
|
+
browser: "browser";
|
|
2861
|
+
}>;
|
|
2862
|
+
intent: z$1.ZodString;
|
|
2863
|
+
timeoutMs: z$1.ZodNumber;
|
|
2864
|
+
command: z$1.ZodOptional<z$1.ZodString>;
|
|
2865
|
+
cwd: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
2866
|
+
action: z$1.ZodOptional<z$1.ZodType<Record<string, unknown>, unknown, z$1.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
|
|
2867
|
+
id: z$1.ZodUUID;
|
|
2868
|
+
leaseToken: z$1.ZodString;
|
|
2869
|
+
type: z$1.ZodLiteral<"command">;
|
|
2870
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2871
|
+
type: z$1.ZodLiteral<"cancel">;
|
|
2872
|
+
id: z$1.ZodUUID;
|
|
2873
|
+
reason: z$1.ZodEnum<{
|
|
2874
|
+
cancelled: "cancelled";
|
|
2875
|
+
timed_out: "timed_out";
|
|
2876
|
+
revoked: "revoked";
|
|
2877
|
+
}>;
|
|
2878
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2879
|
+
type: z$1.ZodLiteral<"reauthenticate">;
|
|
2880
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2881
|
+
type: z$1.ZodLiteral<"revoked">;
|
|
2882
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2883
|
+
type: z$1.ZodLiteral<"ping">;
|
|
2884
|
+
}, z$1.core.$strict>], "type">;
|
|
2885
|
+
export type DeviceChannelWorkerFrame = z$1.infer<typeof DeviceChannelWorkerFrameSchema>;
|
|
2886
|
+
export type DeviceChannelServerFrame = z$1.infer<typeof DeviceChannelServerFrameSchema>;
|
|
2887
|
+
/** Parses one text frame; a non-JSON or off-protocol frame is a `DeviceChannelProtocolError`. */
|
|
2888
|
+
export declare function parseDeviceChannelFrame<T>(schema: z$1.ZodType<T>, raw: string): T;
|
|
2889
|
+
export declare function parseWorkerFrame(raw: string): DeviceChannelWorkerFrame;
|
|
2890
|
+
export declare function parseServerFrame(raw: string): DeviceChannelServerFrame;
|
|
2891
|
+
//#endregion
|
|
2666
2892
|
//#region src/types/documents.d.ts
|
|
2667
2893
|
export type DocumentKind = "file" | "folder";
|
|
2668
2894
|
export interface Document extends Timestamps {
|
|
@@ -5093,7 +5319,7 @@ export interface AIGenerationResult {
|
|
|
5093
5319
|
//#endregion
|
|
5094
5320
|
//#region src/types/ai-usage.d.ts
|
|
5095
5321
|
/** Client-safe AI usage and wallet vocabulary, shared by the journal, the API and the composer. */
|
|
5096
|
-
export type UsageModality = "text" | "image" | "audio" | "video" | "embedding";
|
|
5322
|
+
export type UsageModality = "text" | "image" | "audio" | "video" | "embedding" | "decision";
|
|
5097
5323
|
/** Whose usage a report covers: the caller's own (agents folded into their principal) or the whole workspace. */
|
|
5098
5324
|
export type UsageScope = "me" | "workspace";
|
|
5099
5325
|
/** One aggregate of journal rows; money as decimal strings, counts as integers. */
|