@stndrds/schema 1.0.0-alpha.342 → 1.0.0-alpha.344
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 +246 -12
- package/dist/index.d.ts +245 -11
- 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. */
|
|
@@ -1950,7 +1950,7 @@ export type AgentMessagePart = {
|
|
|
1950
1950
|
} | {
|
|
1951
1951
|
type: "compaction";
|
|
1952
1952
|
state: "failed";
|
|
1953
|
-
/** Human-readable reason
|
|
1953
|
+
/** Human-readable reason the summary could not be produced (`summary_timeout`, `summary_failed`, …). */
|
|
1954
1954
|
reason: string;
|
|
1955
1955
|
durationMs?: number;
|
|
1956
1956
|
};
|
|
@@ -2324,6 +2324,17 @@ export type AISubagentStatus = "completed" | "failed" | "cancelled" | "timeout"
|
|
|
2324
2324
|
export declare const AGENT_NOTIFICATION_KIND = "agent-notification";
|
|
2325
2325
|
/** Whether a message's metadata marks it as a subagent notification. */
|
|
2326
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;
|
|
2327
2338
|
/**
|
|
2328
2339
|
* Narrow, UI-ready projection of an `agent-notification` message. Derived by the
|
|
2329
2340
|
* react mapper from the raw `AgentSessionMessage.metadata` so the UI never has to
|
|
@@ -2677,6 +2688,229 @@ export interface AIUsageMeasurementsV1 {
|
|
|
2677
2688
|
source: "server" | "provider" | "mixed";
|
|
2678
2689
|
}
|
|
2679
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
|
+
/**
|
|
2714
|
+
* The code a worker closes with when a frame breaks the protocol. A browser
|
|
2715
|
+
* `WebSocket` only accepts 1000 and 3000-4999, so the private-use mirror of
|
|
2716
|
+
* 1008 is the one code every worker can actually send.
|
|
2717
|
+
*/
|
|
2718
|
+
export declare const DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION = 4008;
|
|
2719
|
+
/** Where an exponential backoff starts, and where it stops doubling. */
|
|
2720
|
+
export interface RetryBounds {
|
|
2721
|
+
initialMs: number;
|
|
2722
|
+
maxMs: number;
|
|
2723
|
+
}
|
|
2724
|
+
/**
|
|
2725
|
+
* Where the channel is: the path is absolute on the API origin, so a profile's
|
|
2726
|
+
* `apiUrl` keeps only its host and the scheme swaps to the socket one. Written
|
|
2727
|
+
* as an explicit map rather than a rewrite of the origin string, because a
|
|
2728
|
+
* two-letter scheme literal reads to the SDK's egress scan as the `ws` package.
|
|
2729
|
+
*/
|
|
2730
|
+
export declare function deviceChannelUrl(apiUrl: string): string;
|
|
2731
|
+
/** Exponential backoff within the given bounds, plus the shared jitter window. */
|
|
2732
|
+
export declare function computeRetryDelay(attempt: number, random: () => number, bounds: RetryBounds): number;
|
|
2733
|
+
/** When to reconnect to the channel: 1 s doubling up to 30 s, plus jitter. */
|
|
2734
|
+
export declare function computeReconnectDelay(attempt: number, random?: () => number): number;
|
|
2735
|
+
export declare const DEVICE_COMMAND_ERROR_CODES: readonly ["worker_disconnected", "cancelled", "timed_out", "execution_failed", "stale_reference", "tab_unavailable", "debugger_unavailable", "blocked_by_user"];
|
|
2736
|
+
export type DeviceCommandErrorCode = (typeof DEVICE_COMMAND_ERROR_CODES)[number];
|
|
2737
|
+
export declare class DeviceChannelProtocolError extends SchemaError {
|
|
2738
|
+
readonly _tag = "DeviceChannelProtocolError";
|
|
2739
|
+
constructor(message: string);
|
|
2740
|
+
}
|
|
2741
|
+
/** The two payloads the shared protocol leaves opaque; the server refines them. */
|
|
2742
|
+
export interface DeviceChannelPayloadSchemas<Action, Result> {
|
|
2743
|
+
action: z$1.ZodType<Action>;
|
|
2744
|
+
result: z$1.ZodType<Result>;
|
|
2745
|
+
}
|
|
2746
|
+
/** Builds both frame unions around the given browser payload schemas. */
|
|
2747
|
+
export declare function defineDeviceChannelFrames<Action, Result>(payloads: DeviceChannelPayloadSchemas<Action, Result>): {
|
|
2748
|
+
worker: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2749
|
+
type: z$1.ZodLiteral<"authenticate">;
|
|
2750
|
+
credential: z$1.ZodString;
|
|
2751
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2752
|
+
id: z$1.ZodUUID;
|
|
2753
|
+
leaseToken: z$1.ZodString;
|
|
2754
|
+
type: z$1.ZodLiteral<"running">;
|
|
2755
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2756
|
+
id: z$1.ZodUUID;
|
|
2757
|
+
leaseToken: z$1.ZodString;
|
|
2758
|
+
type: z$1.ZodLiteral<"heartbeat">;
|
|
2759
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2760
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2761
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2762
|
+
id: z$1.ZodUUID;
|
|
2763
|
+
leaseToken: z$1.ZodString;
|
|
2764
|
+
type: z$1.ZodLiteral<"output">;
|
|
2765
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2766
|
+
result: z$1.ZodObject<{
|
|
2767
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2768
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2769
|
+
exitCode: z$1.ZodNumber;
|
|
2770
|
+
success: z$1.ZodBoolean;
|
|
2771
|
+
errorCode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2772
|
+
cancelled: "cancelled";
|
|
2773
|
+
worker_disconnected: "worker_disconnected";
|
|
2774
|
+
timed_out: "timed_out";
|
|
2775
|
+
execution_failed: "execution_failed";
|
|
2776
|
+
stale_reference: "stale_reference";
|
|
2777
|
+
tab_unavailable: "tab_unavailable";
|
|
2778
|
+
debugger_unavailable: "debugger_unavailable";
|
|
2779
|
+
blocked_by_user: "blocked_by_user";
|
|
2780
|
+
}>>;
|
|
2781
|
+
result: z$1.ZodOptional<z$1.ZodType<Result, unknown, z$1.core.$ZodTypeInternals<Result, unknown>>>;
|
|
2782
|
+
}, z$1.core.$strict>;
|
|
2783
|
+
id: z$1.ZodUUID;
|
|
2784
|
+
leaseToken: z$1.ZodString;
|
|
2785
|
+
type: z$1.ZodLiteral<"complete">;
|
|
2786
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2787
|
+
type: z$1.ZodLiteral<"pong">;
|
|
2788
|
+
}, z$1.core.$strict>], "type">;
|
|
2789
|
+
server: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2790
|
+
type: z$1.ZodLiteral<"ready">;
|
|
2791
|
+
device: z$1.ZodObject<{
|
|
2792
|
+
id: z$1.ZodString;
|
|
2793
|
+
name: z$1.ZodString;
|
|
2794
|
+
capability: z$1.ZodEnum<{
|
|
2795
|
+
shell: "shell";
|
|
2796
|
+
browser: "browser";
|
|
2797
|
+
}>;
|
|
2798
|
+
}, z$1.core.$strict>;
|
|
2799
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2800
|
+
kind: z$1.ZodEnum<{
|
|
2801
|
+
shell: "shell";
|
|
2802
|
+
browser: "browser";
|
|
2803
|
+
}>;
|
|
2804
|
+
intent: z$1.ZodString;
|
|
2805
|
+
timeoutMs: z$1.ZodNumber;
|
|
2806
|
+
command: z$1.ZodOptional<z$1.ZodString>;
|
|
2807
|
+
cwd: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
2808
|
+
action: z$1.ZodOptional<z$1.ZodType<Action, unknown, z$1.core.$ZodTypeInternals<Action, unknown>>>;
|
|
2809
|
+
id: z$1.ZodUUID;
|
|
2810
|
+
leaseToken: z$1.ZodString;
|
|
2811
|
+
type: z$1.ZodLiteral<"command">;
|
|
2812
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2813
|
+
type: z$1.ZodLiteral<"cancel">;
|
|
2814
|
+
id: z$1.ZodUUID;
|
|
2815
|
+
reason: z$1.ZodEnum<{
|
|
2816
|
+
cancelled: "cancelled";
|
|
2817
|
+
timed_out: "timed_out";
|
|
2818
|
+
revoked: "revoked";
|
|
2819
|
+
}>;
|
|
2820
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2821
|
+
type: z$1.ZodLiteral<"reauthenticate">;
|
|
2822
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2823
|
+
type: z$1.ZodLiteral<"revoked">;
|
|
2824
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2825
|
+
type: z$1.ZodLiteral<"ping">;
|
|
2826
|
+
}, z$1.core.$strict>], "type">;
|
|
2827
|
+
};
|
|
2828
|
+
export declare const DeviceChannelWorkerFrameSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2829
|
+
type: z$1.ZodLiteral<"authenticate">;
|
|
2830
|
+
credential: z$1.ZodString;
|
|
2831
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2832
|
+
id: z$1.ZodUUID;
|
|
2833
|
+
leaseToken: z$1.ZodString;
|
|
2834
|
+
type: z$1.ZodLiteral<"running">;
|
|
2835
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2836
|
+
id: z$1.ZodUUID;
|
|
2837
|
+
leaseToken: z$1.ZodString;
|
|
2838
|
+
type: z$1.ZodLiteral<"heartbeat">;
|
|
2839
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2840
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2841
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2842
|
+
id: z$1.ZodUUID;
|
|
2843
|
+
leaseToken: z$1.ZodString;
|
|
2844
|
+
type: z$1.ZodLiteral<"output">;
|
|
2845
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2846
|
+
result: z$1.ZodObject<{
|
|
2847
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2848
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2849
|
+
exitCode: z$1.ZodNumber;
|
|
2850
|
+
success: z$1.ZodBoolean;
|
|
2851
|
+
errorCode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2852
|
+
cancelled: "cancelled";
|
|
2853
|
+
worker_disconnected: "worker_disconnected";
|
|
2854
|
+
timed_out: "timed_out";
|
|
2855
|
+
execution_failed: "execution_failed";
|
|
2856
|
+
stale_reference: "stale_reference";
|
|
2857
|
+
tab_unavailable: "tab_unavailable";
|
|
2858
|
+
debugger_unavailable: "debugger_unavailable";
|
|
2859
|
+
blocked_by_user: "blocked_by_user";
|
|
2860
|
+
}>>;
|
|
2861
|
+
result: z$1.ZodOptional<z$1.ZodType<Record<string, unknown>, unknown, z$1.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
|
|
2862
|
+
}, z$1.core.$strict>;
|
|
2863
|
+
id: z$1.ZodUUID;
|
|
2864
|
+
leaseToken: z$1.ZodString;
|
|
2865
|
+
type: z$1.ZodLiteral<"complete">;
|
|
2866
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2867
|
+
type: z$1.ZodLiteral<"pong">;
|
|
2868
|
+
}, z$1.core.$strict>], "type">;
|
|
2869
|
+
export declare const DeviceChannelServerFrameSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2870
|
+
type: z$1.ZodLiteral<"ready">;
|
|
2871
|
+
device: z$1.ZodObject<{
|
|
2872
|
+
id: z$1.ZodString;
|
|
2873
|
+
name: z$1.ZodString;
|
|
2874
|
+
capability: z$1.ZodEnum<{
|
|
2875
|
+
shell: "shell";
|
|
2876
|
+
browser: "browser";
|
|
2877
|
+
}>;
|
|
2878
|
+
}, z$1.core.$strict>;
|
|
2879
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2880
|
+
kind: z$1.ZodEnum<{
|
|
2881
|
+
shell: "shell";
|
|
2882
|
+
browser: "browser";
|
|
2883
|
+
}>;
|
|
2884
|
+
intent: z$1.ZodString;
|
|
2885
|
+
timeoutMs: z$1.ZodNumber;
|
|
2886
|
+
command: z$1.ZodOptional<z$1.ZodString>;
|
|
2887
|
+
cwd: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
2888
|
+
action: z$1.ZodOptional<z$1.ZodType<Record<string, unknown>, unknown, z$1.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
|
|
2889
|
+
id: z$1.ZodUUID;
|
|
2890
|
+
leaseToken: z$1.ZodString;
|
|
2891
|
+
type: z$1.ZodLiteral<"command">;
|
|
2892
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2893
|
+
type: z$1.ZodLiteral<"cancel">;
|
|
2894
|
+
id: z$1.ZodUUID;
|
|
2895
|
+
reason: z$1.ZodEnum<{
|
|
2896
|
+
cancelled: "cancelled";
|
|
2897
|
+
timed_out: "timed_out";
|
|
2898
|
+
revoked: "revoked";
|
|
2899
|
+
}>;
|
|
2900
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2901
|
+
type: z$1.ZodLiteral<"reauthenticate">;
|
|
2902
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2903
|
+
type: z$1.ZodLiteral<"revoked">;
|
|
2904
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2905
|
+
type: z$1.ZodLiteral<"ping">;
|
|
2906
|
+
}, z$1.core.$strict>], "type">;
|
|
2907
|
+
export type DeviceChannelWorkerFrame = z$1.infer<typeof DeviceChannelWorkerFrameSchema>;
|
|
2908
|
+
export type DeviceChannelServerFrame = z$1.infer<typeof DeviceChannelServerFrameSchema>;
|
|
2909
|
+
/** Parses one text frame; a non-JSON or off-protocol frame is a `DeviceChannelProtocolError`. */
|
|
2910
|
+
export declare function parseDeviceChannelFrame<T>(schema: z$1.ZodType<T>, raw: string): T;
|
|
2911
|
+
export declare function parseWorkerFrame(raw: string): DeviceChannelWorkerFrame;
|
|
2912
|
+
export declare function parseServerFrame(raw: string): DeviceChannelServerFrame;
|
|
2913
|
+
//#endregion
|
|
2680
2914
|
//#region src/types/documents.d.ts
|
|
2681
2915
|
export type DocumentKind = "file" | "folder";
|
|
2682
2916
|
export interface Document extends Timestamps {
|
|
@@ -5107,7 +5341,7 @@ export interface AIGenerationResult {
|
|
|
5107
5341
|
//#endregion
|
|
5108
5342
|
//#region src/types/ai-usage.d.ts
|
|
5109
5343
|
/** Client-safe AI usage and wallet vocabulary, shared by the journal, the API and the composer. */
|
|
5110
|
-
export type UsageModality = "text" | "image" | "audio" | "video" | "embedding";
|
|
5344
|
+
export type UsageModality = "text" | "image" | "audio" | "video" | "embedding" | "decision";
|
|
5111
5345
|
/** Whose usage a report covers: the caller's own (agents folded into their principal) or the whole workspace. */
|
|
5112
5346
|
export type UsageScope = "me" | "workspace";
|
|
5113
5347
|
/** 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";
|
|
@@ -1950,7 +1950,7 @@ export type AgentMessagePart = {
|
|
|
1950
1950
|
} | {
|
|
1951
1951
|
type: "compaction";
|
|
1952
1952
|
state: "failed";
|
|
1953
|
-
/** Human-readable reason
|
|
1953
|
+
/** Human-readable reason the summary could not be produced (`summary_timeout`, `summary_failed`, …). */
|
|
1954
1954
|
reason: string;
|
|
1955
1955
|
durationMs?: number;
|
|
1956
1956
|
};
|
|
@@ -2324,6 +2324,17 @@ export type AISubagentStatus = "completed" | "failed" | "cancelled" | "timeout"
|
|
|
2324
2324
|
export declare const AGENT_NOTIFICATION_KIND = "agent-notification";
|
|
2325
2325
|
/** Whether a message's metadata marks it as a subagent notification. */
|
|
2326
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;
|
|
2327
2338
|
/**
|
|
2328
2339
|
* Narrow, UI-ready projection of an `agent-notification` message. Derived by the
|
|
2329
2340
|
* react mapper from the raw `AgentSessionMessage.metadata` so the UI never has to
|
|
@@ -2677,6 +2688,229 @@ export interface AIUsageMeasurementsV1 {
|
|
|
2677
2688
|
source: "server" | "provider" | "mixed";
|
|
2678
2689
|
}
|
|
2679
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
|
+
/**
|
|
2714
|
+
* The code a worker closes with when a frame breaks the protocol. A browser
|
|
2715
|
+
* `WebSocket` only accepts 1000 and 3000-4999, so the private-use mirror of
|
|
2716
|
+
* 1008 is the one code every worker can actually send.
|
|
2717
|
+
*/
|
|
2718
|
+
export declare const DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION = 4008;
|
|
2719
|
+
/** Where an exponential backoff starts, and where it stops doubling. */
|
|
2720
|
+
export interface RetryBounds {
|
|
2721
|
+
initialMs: number;
|
|
2722
|
+
maxMs: number;
|
|
2723
|
+
}
|
|
2724
|
+
/**
|
|
2725
|
+
* Where the channel is: the path is absolute on the API origin, so a profile's
|
|
2726
|
+
* `apiUrl` keeps only its host and the scheme swaps to the socket one. Written
|
|
2727
|
+
* as an explicit map rather than a rewrite of the origin string, because a
|
|
2728
|
+
* two-letter scheme literal reads to the SDK's egress scan as the `ws` package.
|
|
2729
|
+
*/
|
|
2730
|
+
export declare function deviceChannelUrl(apiUrl: string): string;
|
|
2731
|
+
/** Exponential backoff within the given bounds, plus the shared jitter window. */
|
|
2732
|
+
export declare function computeRetryDelay(attempt: number, random: () => number, bounds: RetryBounds): number;
|
|
2733
|
+
/** When to reconnect to the channel: 1 s doubling up to 30 s, plus jitter. */
|
|
2734
|
+
export declare function computeReconnectDelay(attempt: number, random?: () => number): number;
|
|
2735
|
+
export declare const DEVICE_COMMAND_ERROR_CODES: readonly ["worker_disconnected", "cancelled", "timed_out", "execution_failed", "stale_reference", "tab_unavailable", "debugger_unavailable", "blocked_by_user"];
|
|
2736
|
+
export type DeviceCommandErrorCode = (typeof DEVICE_COMMAND_ERROR_CODES)[number];
|
|
2737
|
+
export declare class DeviceChannelProtocolError extends SchemaError {
|
|
2738
|
+
readonly _tag = "DeviceChannelProtocolError";
|
|
2739
|
+
constructor(message: string);
|
|
2740
|
+
}
|
|
2741
|
+
/** The two payloads the shared protocol leaves opaque; the server refines them. */
|
|
2742
|
+
export interface DeviceChannelPayloadSchemas<Action, Result> {
|
|
2743
|
+
action: z$1.ZodType<Action>;
|
|
2744
|
+
result: z$1.ZodType<Result>;
|
|
2745
|
+
}
|
|
2746
|
+
/** Builds both frame unions around the given browser payload schemas. */
|
|
2747
|
+
export declare function defineDeviceChannelFrames<Action, Result>(payloads: DeviceChannelPayloadSchemas<Action, Result>): {
|
|
2748
|
+
worker: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2749
|
+
type: z$1.ZodLiteral<"authenticate">;
|
|
2750
|
+
credential: z$1.ZodString;
|
|
2751
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2752
|
+
id: z$1.ZodUUID;
|
|
2753
|
+
leaseToken: z$1.ZodString;
|
|
2754
|
+
type: z$1.ZodLiteral<"running">;
|
|
2755
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2756
|
+
id: z$1.ZodUUID;
|
|
2757
|
+
leaseToken: z$1.ZodString;
|
|
2758
|
+
type: z$1.ZodLiteral<"heartbeat">;
|
|
2759
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2760
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2761
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2762
|
+
id: z$1.ZodUUID;
|
|
2763
|
+
leaseToken: z$1.ZodString;
|
|
2764
|
+
type: z$1.ZodLiteral<"output">;
|
|
2765
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2766
|
+
result: z$1.ZodObject<{
|
|
2767
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2768
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2769
|
+
exitCode: z$1.ZodNumber;
|
|
2770
|
+
success: z$1.ZodBoolean;
|
|
2771
|
+
errorCode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2772
|
+
cancelled: "cancelled";
|
|
2773
|
+
worker_disconnected: "worker_disconnected";
|
|
2774
|
+
timed_out: "timed_out";
|
|
2775
|
+
execution_failed: "execution_failed";
|
|
2776
|
+
stale_reference: "stale_reference";
|
|
2777
|
+
tab_unavailable: "tab_unavailable";
|
|
2778
|
+
debugger_unavailable: "debugger_unavailable";
|
|
2779
|
+
blocked_by_user: "blocked_by_user";
|
|
2780
|
+
}>>;
|
|
2781
|
+
result: z$1.ZodOptional<z$1.ZodType<Result, unknown, z$1.core.$ZodTypeInternals<Result, unknown>>>;
|
|
2782
|
+
}, z$1.core.$strict>;
|
|
2783
|
+
id: z$1.ZodUUID;
|
|
2784
|
+
leaseToken: z$1.ZodString;
|
|
2785
|
+
type: z$1.ZodLiteral<"complete">;
|
|
2786
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2787
|
+
type: z$1.ZodLiteral<"pong">;
|
|
2788
|
+
}, z$1.core.$strict>], "type">;
|
|
2789
|
+
server: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2790
|
+
type: z$1.ZodLiteral<"ready">;
|
|
2791
|
+
device: z$1.ZodObject<{
|
|
2792
|
+
id: z$1.ZodString;
|
|
2793
|
+
name: z$1.ZodString;
|
|
2794
|
+
capability: z$1.ZodEnum<{
|
|
2795
|
+
shell: "shell";
|
|
2796
|
+
browser: "browser";
|
|
2797
|
+
}>;
|
|
2798
|
+
}, z$1.core.$strict>;
|
|
2799
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2800
|
+
kind: z$1.ZodEnum<{
|
|
2801
|
+
shell: "shell";
|
|
2802
|
+
browser: "browser";
|
|
2803
|
+
}>;
|
|
2804
|
+
intent: z$1.ZodString;
|
|
2805
|
+
timeoutMs: z$1.ZodNumber;
|
|
2806
|
+
command: z$1.ZodOptional<z$1.ZodString>;
|
|
2807
|
+
cwd: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
2808
|
+
action: z$1.ZodOptional<z$1.ZodType<Action, unknown, z$1.core.$ZodTypeInternals<Action, unknown>>>;
|
|
2809
|
+
id: z$1.ZodUUID;
|
|
2810
|
+
leaseToken: z$1.ZodString;
|
|
2811
|
+
type: z$1.ZodLiteral<"command">;
|
|
2812
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2813
|
+
type: z$1.ZodLiteral<"cancel">;
|
|
2814
|
+
id: z$1.ZodUUID;
|
|
2815
|
+
reason: z$1.ZodEnum<{
|
|
2816
|
+
cancelled: "cancelled";
|
|
2817
|
+
timed_out: "timed_out";
|
|
2818
|
+
revoked: "revoked";
|
|
2819
|
+
}>;
|
|
2820
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2821
|
+
type: z$1.ZodLiteral<"reauthenticate">;
|
|
2822
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2823
|
+
type: z$1.ZodLiteral<"revoked">;
|
|
2824
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2825
|
+
type: z$1.ZodLiteral<"ping">;
|
|
2826
|
+
}, z$1.core.$strict>], "type">;
|
|
2827
|
+
};
|
|
2828
|
+
export declare const DeviceChannelWorkerFrameSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2829
|
+
type: z$1.ZodLiteral<"authenticate">;
|
|
2830
|
+
credential: z$1.ZodString;
|
|
2831
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2832
|
+
id: z$1.ZodUUID;
|
|
2833
|
+
leaseToken: z$1.ZodString;
|
|
2834
|
+
type: z$1.ZodLiteral<"running">;
|
|
2835
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2836
|
+
id: z$1.ZodUUID;
|
|
2837
|
+
leaseToken: z$1.ZodString;
|
|
2838
|
+
type: z$1.ZodLiteral<"heartbeat">;
|
|
2839
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2840
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2841
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2842
|
+
id: z$1.ZodUUID;
|
|
2843
|
+
leaseToken: z$1.ZodString;
|
|
2844
|
+
type: z$1.ZodLiteral<"output">;
|
|
2845
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2846
|
+
result: z$1.ZodObject<{
|
|
2847
|
+
stdout: z$1.ZodOptional<z$1.ZodString>;
|
|
2848
|
+
stderr: z$1.ZodOptional<z$1.ZodString>;
|
|
2849
|
+
exitCode: z$1.ZodNumber;
|
|
2850
|
+
success: z$1.ZodBoolean;
|
|
2851
|
+
errorCode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2852
|
+
cancelled: "cancelled";
|
|
2853
|
+
worker_disconnected: "worker_disconnected";
|
|
2854
|
+
timed_out: "timed_out";
|
|
2855
|
+
execution_failed: "execution_failed";
|
|
2856
|
+
stale_reference: "stale_reference";
|
|
2857
|
+
tab_unavailable: "tab_unavailable";
|
|
2858
|
+
debugger_unavailable: "debugger_unavailable";
|
|
2859
|
+
blocked_by_user: "blocked_by_user";
|
|
2860
|
+
}>>;
|
|
2861
|
+
result: z$1.ZodOptional<z$1.ZodType<Record<string, unknown>, unknown, z$1.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
|
|
2862
|
+
}, z$1.core.$strict>;
|
|
2863
|
+
id: z$1.ZodUUID;
|
|
2864
|
+
leaseToken: z$1.ZodString;
|
|
2865
|
+
type: z$1.ZodLiteral<"complete">;
|
|
2866
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2867
|
+
type: z$1.ZodLiteral<"pong">;
|
|
2868
|
+
}, z$1.core.$strict>], "type">;
|
|
2869
|
+
export declare const DeviceChannelServerFrameSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2870
|
+
type: z$1.ZodLiteral<"ready">;
|
|
2871
|
+
device: z$1.ZodObject<{
|
|
2872
|
+
id: z$1.ZodString;
|
|
2873
|
+
name: z$1.ZodString;
|
|
2874
|
+
capability: z$1.ZodEnum<{
|
|
2875
|
+
shell: "shell";
|
|
2876
|
+
browser: "browser";
|
|
2877
|
+
}>;
|
|
2878
|
+
}, z$1.core.$strict>;
|
|
2879
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2880
|
+
kind: z$1.ZodEnum<{
|
|
2881
|
+
shell: "shell";
|
|
2882
|
+
browser: "browser";
|
|
2883
|
+
}>;
|
|
2884
|
+
intent: z$1.ZodString;
|
|
2885
|
+
timeoutMs: z$1.ZodNumber;
|
|
2886
|
+
command: z$1.ZodOptional<z$1.ZodString>;
|
|
2887
|
+
cwd: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
2888
|
+
action: z$1.ZodOptional<z$1.ZodType<Record<string, unknown>, unknown, z$1.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
|
|
2889
|
+
id: z$1.ZodUUID;
|
|
2890
|
+
leaseToken: z$1.ZodString;
|
|
2891
|
+
type: z$1.ZodLiteral<"command">;
|
|
2892
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2893
|
+
type: z$1.ZodLiteral<"cancel">;
|
|
2894
|
+
id: z$1.ZodUUID;
|
|
2895
|
+
reason: z$1.ZodEnum<{
|
|
2896
|
+
cancelled: "cancelled";
|
|
2897
|
+
timed_out: "timed_out";
|
|
2898
|
+
revoked: "revoked";
|
|
2899
|
+
}>;
|
|
2900
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2901
|
+
type: z$1.ZodLiteral<"reauthenticate">;
|
|
2902
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2903
|
+
type: z$1.ZodLiteral<"revoked">;
|
|
2904
|
+
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
2905
|
+
type: z$1.ZodLiteral<"ping">;
|
|
2906
|
+
}, z$1.core.$strict>], "type">;
|
|
2907
|
+
export type DeviceChannelWorkerFrame = z$1.infer<typeof DeviceChannelWorkerFrameSchema>;
|
|
2908
|
+
export type DeviceChannelServerFrame = z$1.infer<typeof DeviceChannelServerFrameSchema>;
|
|
2909
|
+
/** Parses one text frame; a non-JSON or off-protocol frame is a `DeviceChannelProtocolError`. */
|
|
2910
|
+
export declare function parseDeviceChannelFrame<T>(schema: z$1.ZodType<T>, raw: string): T;
|
|
2911
|
+
export declare function parseWorkerFrame(raw: string): DeviceChannelWorkerFrame;
|
|
2912
|
+
export declare function parseServerFrame(raw: string): DeviceChannelServerFrame;
|
|
2913
|
+
//#endregion
|
|
2680
2914
|
//#region src/types/documents.d.ts
|
|
2681
2915
|
export type DocumentKind = "file" | "folder";
|
|
2682
2916
|
export interface Document extends Timestamps {
|
|
@@ -5107,7 +5341,7 @@ export interface AIGenerationResult {
|
|
|
5107
5341
|
//#endregion
|
|
5108
5342
|
//#region src/types/ai-usage.d.ts
|
|
5109
5343
|
/** Client-safe AI usage and wallet vocabulary, shared by the journal, the API and the composer. */
|
|
5110
|
-
export type UsageModality = "text" | "image" | "audio" | "video" | "embedding";
|
|
5344
|
+
export type UsageModality = "text" | "image" | "audio" | "video" | "embedding" | "decision";
|
|
5111
5345
|
/** Whose usage a report covers: the caller's own (agents folded into their principal) or the whole workspace. */
|
|
5112
5346
|
export type UsageScope = "me" | "workspace";
|
|
5113
5347
|
/** One aggregate of journal rows; money as decimal strings, counts as integers. */
|