@stndrds/schema 1.0.0-alpha.276 → 1.0.0-alpha.277
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-D5zeUllO.d.mts → all-D-E8v5yo.d.mts} +1 -1
- package/dist/{all--B2_3ksI.d.ts → all-D5SkjRst.d.ts} +1 -1
- package/dist/{chunk-EDOEX3O7.js → chunk-F32XOFSP.js} +156 -54
- package/dist/{chunk-RAF6K6VG.js → chunk-FMLZHHWB.js} +19 -5
- package/dist/{chunk-QLU5QR7M.mjs → chunk-K4UER3DU.mjs} +2 -6
- package/dist/{chunk-T7BST4JS.js → chunk-KKR6I3YV.js} +3 -3
- package/dist/{chunk-RBG2YMF2.mjs → chunk-PSCSTHUB.mjs} +16 -3
- package/dist/{chunk-F3YPU2N6.js → chunk-RYAQOR7M.js} +2 -6
- package/dist/{chunk-U7QUIEFF.mjs → chunk-VVYIFBFQ.mjs} +1 -1
- package/dist/{chunk-4USPA67J.mjs → chunk-XQEDMB6B.mjs} +118 -25
- package/dist/exceptions.d.mts +1 -6
- package/dist/exceptions.d.ts +1 -6
- package/dist/exceptions.js +39 -39
- package/dist/exceptions.mjs +1 -1
- package/dist/{index-Bq1KrQkR.d.ts → index-AJeEKoy6.d.ts} +24 -234
- package/dist/{index-DtxtOBYT.d.mts → index-ApHE8c1J.d.mts} +24 -234
- package/dist/index.d.mts +404 -10
- package/dist/index.d.ts +404 -10
- package/dist/index.js +257 -248
- package/dist/index.mjs +63 -90
- package/dist/validation/all.d.mts +2 -2
- package/dist/validation/all.d.ts +2 -2
- package/dist/validation/all.js +29 -29
- package/dist/validation/all.mjs +4 -4
- package/dist/validation/config/index.d.mts +1 -1
- package/dist/validation/config/index.d.ts +1 -1
- package/dist/validation/config/index.js +11 -11
- package/dist/validation/config/index.mjs +2 -2
- package/dist/validation/object/index.js +14 -14
- package/dist/validation/object/index.mjs +2 -2
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { A as Attribute, f as AttributeType, e as RollupAttribute } from './attributes-_b3Db8vT.js';
|
|
3
|
-
import { IconName
|
|
4
|
-
import { Uuid } from './utils.js';
|
|
3
|
+
import { IconName } from '@stndrds/constants';
|
|
5
4
|
import { L as ListViewTabVisibility, T as Timestamps, R as ResourceVisibility } from './objects-A1ED9af-.js';
|
|
5
|
+
import { Uuid } from './utils.js';
|
|
6
6
|
|
|
7
7
|
/** Operators for text-based attributes */
|
|
8
8
|
type TextFilterOperator = "is" | "is_not" | "contains" | "not_contains" | "starts_with" | "ends_with" | "is_empty" | "is_not_empty";
|
|
@@ -858,235 +858,6 @@ interface MentionedContext {
|
|
|
858
858
|
summary: string;
|
|
859
859
|
}
|
|
860
860
|
|
|
861
|
-
type DocumentKind = "file" | "folder";
|
|
862
|
-
interface Document extends Timestamps {
|
|
863
|
-
id: Uuid;
|
|
864
|
-
tenantId: Uuid;
|
|
865
|
-
title: string;
|
|
866
|
-
kind: DocumentKind;
|
|
867
|
-
parentId?: Uuid | null;
|
|
868
|
-
description?: string;
|
|
869
|
-
contentHash?: string;
|
|
870
|
-
createdBy?: Uuid;
|
|
871
|
-
updatedBy?: Uuid;
|
|
872
|
-
deletedAt?: Date | null;
|
|
873
|
-
/**
|
|
874
|
-
* Fractional ordering position within `(tenantId, parentId)`. Lower values
|
|
875
|
-
* sort first. New rows default to `max(siblings) + 1024` so reorderings can
|
|
876
|
-
* insert between neighbours without renumbering. The server may rebalance
|
|
877
|
-
* positions in the background to keep the spacing bounded.
|
|
878
|
-
*/
|
|
879
|
-
position: number;
|
|
880
|
-
}
|
|
881
|
-
interface DocumentWithSubCount extends Document {
|
|
882
|
-
subCount: number | null;
|
|
883
|
-
}
|
|
884
|
-
/** OCR processing lifecycle for a single file within a document pack. */
|
|
885
|
-
type FileOcrStatus = "pending" | "processing" | "completed" | "failed";
|
|
886
|
-
/**
|
|
887
|
-
* A single anonymous file belonging to a document pack.
|
|
888
|
-
* Unlike the slot-based model, files carry no slot name — order within the
|
|
889
|
-
* pack is `position` only, and `name` is provenance (originalName), never a
|
|
890
|
-
* label rendered in the UI.
|
|
891
|
-
*/
|
|
892
|
-
interface DocumentFile {
|
|
893
|
-
id: Uuid;
|
|
894
|
-
documentId: Uuid;
|
|
895
|
-
position: number;
|
|
896
|
-
/** Provenance only (originalName) — never rendered as a label. */
|
|
897
|
-
name: string;
|
|
898
|
-
mimeType: string;
|
|
899
|
-
size: number;
|
|
900
|
-
ocrStatus: FileOcrStatus | null;
|
|
901
|
-
ocrText: string | null;
|
|
902
|
-
ocrConfidence: number | null;
|
|
903
|
-
processedAt: Date | null;
|
|
904
|
-
}
|
|
905
|
-
type DocumentWithFiles = Document & {
|
|
906
|
-
files: DocumentFile[];
|
|
907
|
-
};
|
|
908
|
-
interface CreateDocument {
|
|
909
|
-
title: string;
|
|
910
|
-
kind?: DocumentKind;
|
|
911
|
-
parentId?: Uuid | null;
|
|
912
|
-
description?: string;
|
|
913
|
-
position?: number;
|
|
914
|
-
}
|
|
915
|
-
/**
|
|
916
|
-
* Reference to a record attribute that should atomically attach a freshly
|
|
917
|
-
* created Document. Passed alongside `CreateDocument` to make creation
|
|
918
|
-
* link-aware end-to-end (client → REST → service → repo).
|
|
919
|
-
*
|
|
920
|
-
* The server requires this — orphan Documents are not creatable through the
|
|
921
|
-
* REST API.
|
|
922
|
-
*/
|
|
923
|
-
interface CreateDocumentLink {
|
|
924
|
-
objectName: string;
|
|
925
|
-
sourceRecordId: string;
|
|
926
|
-
attributeName: string;
|
|
927
|
-
}
|
|
928
|
-
interface UpdateDocument {
|
|
929
|
-
title?: string;
|
|
930
|
-
parentId?: Uuid | null;
|
|
931
|
-
position?: number;
|
|
932
|
-
}
|
|
933
|
-
interface DocumentListOptions {
|
|
934
|
-
limit?: number;
|
|
935
|
-
offset?: number;
|
|
936
|
-
}
|
|
937
|
-
interface RecordDocuments {
|
|
938
|
-
/** Documents grouped by attribute name (includes system 'attachments' attribute) */
|
|
939
|
-
byAttribute: Record<string, DocumentWithFiles[]>;
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
/**
|
|
943
|
-
* Storage provider type
|
|
944
|
-
*/
|
|
945
|
-
type StorageProvider = "s3" | "gcs" | "azure" | "local" | "cloudflare-r2" | string;
|
|
946
|
-
/**
|
|
947
|
-
* File - Represents uploaded file metadata and storage info
|
|
948
|
-
*
|
|
949
|
-
* ARCHITECTURE:
|
|
950
|
-
* - Fixed table (no custom attributes)
|
|
951
|
-
* - Manages file storage metadata
|
|
952
|
-
* - uploadedBy links to user_profiles table
|
|
953
|
-
* - Supports soft delete via deletedAt
|
|
954
|
-
*
|
|
955
|
-
* @example
|
|
956
|
-
* ```typescript
|
|
957
|
-
* const file: File = {
|
|
958
|
-
* id: "file-123",
|
|
959
|
-
* tenantId: "tenant-456",
|
|
960
|
-
* name: "contract-2025.pdf",
|
|
961
|
-
* originalName: "Contract Acme Corp 2025.pdf",
|
|
962
|
-
* mimeType: "application/pdf",
|
|
963
|
-
* size: 2458624,
|
|
964
|
-
* storageProvider: "s3",
|
|
965
|
-
* storagePath: "tenants/456/files/2025/11/contract-2025.pdf",
|
|
966
|
-
* storageBucket: "my-app-files",
|
|
967
|
-
* url: "https://cdn.example.com/files/file-123",
|
|
968
|
-
* uploadedBy: "profile-789",
|
|
969
|
-
* folderPath: "/contracts/2025",
|
|
970
|
-
* createdAt: new Date(),
|
|
971
|
-
* updatedAt: new Date(),
|
|
972
|
-
* };
|
|
973
|
-
* ```
|
|
974
|
-
*/
|
|
975
|
-
interface File extends Timestamps {
|
|
976
|
-
id: Uuid;
|
|
977
|
-
tenantId: Uuid;
|
|
978
|
-
/**
|
|
979
|
-
* File name (sanitized for storage)
|
|
980
|
-
*/
|
|
981
|
-
name: string;
|
|
982
|
-
/**
|
|
983
|
-
* Original file name (as uploaded by user)
|
|
984
|
-
*/
|
|
985
|
-
originalName: string;
|
|
986
|
-
/**
|
|
987
|
-
* MIME type (e.g., "application/pdf", "image/jpeg")
|
|
988
|
-
*/
|
|
989
|
-
mimeType: MimeType | string;
|
|
990
|
-
/**
|
|
991
|
-
* File size in bytes
|
|
992
|
-
*/
|
|
993
|
-
size: number;
|
|
994
|
-
/**
|
|
995
|
-
* Storage provider (s3, gcs, azure, local, etc.)
|
|
996
|
-
*/
|
|
997
|
-
storageProvider: StorageProvider;
|
|
998
|
-
/**
|
|
999
|
-
* Path in the storage bucket
|
|
1000
|
-
*/
|
|
1001
|
-
storagePath: string;
|
|
1002
|
-
/**
|
|
1003
|
-
* Storage bucket name (if applicable)
|
|
1004
|
-
*/
|
|
1005
|
-
storageBucket?: string;
|
|
1006
|
-
/**
|
|
1007
|
-
* Public or signed URL to access the file
|
|
1008
|
-
*/
|
|
1009
|
-
url: string;
|
|
1010
|
-
/**
|
|
1011
|
-
* User who uploaded the file (FK to user_profiles)
|
|
1012
|
-
* Optional for system-generated files or anonymous uploads.
|
|
1013
|
-
*/
|
|
1014
|
-
uploadedBy?: Uuid;
|
|
1015
|
-
/**
|
|
1016
|
-
* Folder path for organization (e.g., "/contracts/2025")
|
|
1017
|
-
*/
|
|
1018
|
-
folderPath?: string;
|
|
1019
|
-
/**
|
|
1020
|
-
* Soft delete timestamp (null = not deleted)
|
|
1021
|
-
*/
|
|
1022
|
-
deletedAt?: Date;
|
|
1023
|
-
/**
|
|
1024
|
-
* Document this file belongs to, when the file is a member of a document
|
|
1025
|
-
* pack. NULL for files that aren't part of a document (e.g. freshly
|
|
1026
|
-
* uploaded blobs not yet attached to a pack).
|
|
1027
|
-
*/
|
|
1028
|
-
documentId?: Uuid | null;
|
|
1029
|
-
/**
|
|
1030
|
-
* Append-only position within the owning document pack (plain integer,
|
|
1031
|
-
* `max(position) + 1`). Packs are NOT reorderable (spec §2).
|
|
1032
|
-
*/
|
|
1033
|
-
position?: number | null;
|
|
1034
|
-
/**
|
|
1035
|
-
* OCR processing status for this file, when applicable.
|
|
1036
|
-
*/
|
|
1037
|
-
ocrStatus?: FileOcrStatus | null;
|
|
1038
|
-
/**
|
|
1039
|
-
* Extracted OCR text, when processing has completed.
|
|
1040
|
-
*/
|
|
1041
|
-
ocrText?: string | null;
|
|
1042
|
-
/**
|
|
1043
|
-
* OCR confidence score, when processing has completed.
|
|
1044
|
-
*/
|
|
1045
|
-
ocrConfidence?: number | null;
|
|
1046
|
-
/**
|
|
1047
|
-
* Timestamp of the last OCR processing attempt.
|
|
1048
|
-
*/
|
|
1049
|
-
processedAt?: Date | null;
|
|
1050
|
-
}
|
|
1051
|
-
/**
|
|
1052
|
-
* Data required to create a new file record
|
|
1053
|
-
*/
|
|
1054
|
-
/**
|
|
1055
|
-
* Data for creating a new file.
|
|
1056
|
-
* Tenant ID is automatically set from execution context.
|
|
1057
|
-
*/
|
|
1058
|
-
interface CreateFile {
|
|
1059
|
-
name: string;
|
|
1060
|
-
originalName: string;
|
|
1061
|
-
mimeType: MimeType | string;
|
|
1062
|
-
size: number;
|
|
1063
|
-
storageProvider: StorageProvider;
|
|
1064
|
-
storagePath: string;
|
|
1065
|
-
storageBucket?: string;
|
|
1066
|
-
url: string;
|
|
1067
|
-
uploadedBy?: Uuid;
|
|
1068
|
-
folderPath?: string;
|
|
1069
|
-
documentId?: Uuid | null;
|
|
1070
|
-
position?: number | null;
|
|
1071
|
-
ocrStatus?: FileOcrStatus | null;
|
|
1072
|
-
ocrText?: string | null;
|
|
1073
|
-
ocrConfidence?: number | null;
|
|
1074
|
-
processedAt?: Date | null;
|
|
1075
|
-
}
|
|
1076
|
-
/**
|
|
1077
|
-
* Data for updating an existing file record
|
|
1078
|
-
*/
|
|
1079
|
-
interface UpdateFile {
|
|
1080
|
-
name?: string;
|
|
1081
|
-
folderPath?: string;
|
|
1082
|
-
documentId?: Uuid | null;
|
|
1083
|
-
position?: number | null;
|
|
1084
|
-
ocrStatus?: FileOcrStatus | null;
|
|
1085
|
-
ocrText?: string | null;
|
|
1086
|
-
ocrConfidence?: number | null;
|
|
1087
|
-
processedAt?: Date | null;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
861
|
/**
|
|
1091
862
|
* Outcome of a compaction pass: a no-op (context already small enough), an LLM
|
|
1092
863
|
* `summary`, or a degraded `truncation` (the summarizer failed/timed out/returned
|
|
@@ -1160,6 +931,12 @@ interface AgentConfig {
|
|
|
1160
931
|
systemPrompt: string;
|
|
1161
932
|
model: ModelDefinition;
|
|
1162
933
|
tools?: string[];
|
|
934
|
+
/**
|
|
935
|
+
* MCP servers whose tools mount into this agent's toolchain. Ids opt in
|
|
936
|
+
* explicitly; `"all"` mounts every server the viewer can see. Absent means
|
|
937
|
+
* none — so agents that predate this field are tool-identical.
|
|
938
|
+
*/
|
|
939
|
+
mcpServers?: string[] | "all";
|
|
1163
940
|
timeoutMs?: number;
|
|
1164
941
|
costLimitUsd?: number | null;
|
|
1165
942
|
canDelegate: boolean;
|
|
@@ -1263,6 +1040,13 @@ interface AgentBlueprint {
|
|
|
1263
1040
|
canDelegate?: boolean;
|
|
1264
1041
|
maxDepth?: number;
|
|
1265
1042
|
maxTreeCostUsd?: number;
|
|
1043
|
+
/**
|
|
1044
|
+
* MCP servers this agent may use (see `AgentConfig.mcpServers`). Absent
|
|
1045
|
+
* means none — an agent that never declares this stays tool-identical to
|
|
1046
|
+
* one predating the field. Reconciled by the boot sync like the other
|
|
1047
|
+
* optional config fields (`SYNCED_FIELDS`).
|
|
1048
|
+
*/
|
|
1049
|
+
mcpServers?: string[] | "all";
|
|
1266
1050
|
system: boolean;
|
|
1267
1051
|
/** Code-declared agents are workspace-visible; private is runtime-only. */
|
|
1268
1052
|
visibility: ResourceVisibility;
|
|
@@ -1385,6 +1169,14 @@ interface AgentDefinition {
|
|
|
1385
1169
|
tools?: string[];
|
|
1386
1170
|
schedule?: AgentSchedule;
|
|
1387
1171
|
config: AgentExecutionConfig;
|
|
1172
|
+
/**
|
|
1173
|
+
* MCP servers this definition may use (see `AgentConfig.mcpServers`).
|
|
1174
|
+
* Absent means none — a definition that predates this field is
|
|
1175
|
+
* tool-identical to one that never sets it. The opt-in is narrowed further
|
|
1176
|
+
* by the viewer's visibility at resolution time (`buildMcpToolset`); a
|
|
1177
|
+
* server id here that the viewer cannot see yields no tools from it.
|
|
1178
|
+
*/
|
|
1179
|
+
mcpServers?: string[] | "all";
|
|
1388
1180
|
/** Code-declared (immutable via public API); reconciled by the boot sync. */
|
|
1389
1181
|
system: boolean;
|
|
1390
1182
|
visibility: ResourceVisibility;
|
|
@@ -1399,8 +1191,6 @@ interface AgentDefinition {
|
|
|
1399
1191
|
critic?: CriticConfig;
|
|
1400
1192
|
missionPolicy?: AgentMissionPolicy;
|
|
1401
1193
|
autoDecide?: boolean;
|
|
1402
|
-
fileIds?: string[];
|
|
1403
|
-
attachments?: File[];
|
|
1404
1194
|
requiredPermission?: AgentRequiredPermission;
|
|
1405
1195
|
}
|
|
1406
1196
|
interface AgentRun {
|
|
@@ -2410,4 +2200,4 @@ declare function parseAttributeConfigForCreate(type: AttributeType, input: unkno
|
|
|
2410
2200
|
*/
|
|
2411
2201
|
declare function parseAttributeConfigForUpdate(stored: Attribute, patch: Partial<AddAttributeInput>): Record<string, unknown>;
|
|
2412
2202
|
|
|
2413
|
-
export { type AIQuestionOption as $, type Action as A, type AIBatchQuestion as B, type ConfigOverrides as C, type DetailViewConfig as D, type AIBatchQuestionAnswer as E, type FilterState as F, type Group as G, type AIBatchQuestionOption as H, type AIBatchQuestionType as I, type AIChatMessage as J, type AIChatMessagePart as K, type ListViewConfig as L, type ModelDefinition as M, type AIChatMessagePartType as N, type AIChatNotification as O, type PermissionScope as P, type AICompactionSummary as Q, type RelationGroup as R, type SortRule as S, type TriggerEventType as T, type AIMemoryEntry as U, type ViewType as V, type AIMemoryType as W, type AIMessageRole as X, type AIProviderMetrics as Y, type AIQuestion as Z, type AIQuestionAnswer as _, type ViewConfig as a, type
|
|
2203
|
+
export { type AIQuestionOption as $, type Action as A, type AIBatchQuestion as B, type ConfigOverrides as C, type DetailViewConfig as D, type AIBatchQuestionAnswer as E, type FilterState as F, type Group as G, type AIBatchQuestionOption as H, type AIBatchQuestionType as I, type AIChatMessage as J, type AIChatMessagePart as K, type ListViewConfig as L, type ModelDefinition as M, type AIChatMessagePartType as N, type AIChatNotification as O, type PermissionScope as P, type AICompactionSummary as Q, type RelationGroup as R, type SortRule as S, type TriggerEventType as T, type AIMemoryEntry as U, type ViewType as V, type AIMemoryType as W, type AIMessageRole as X, type AIProviderMetrics as Y, type AIQuestion as Z, type AIQuestionAnswer as _, type ViewConfig as a, type HumanRequestNeed as a$, type AIQuestionType as a0, type AISubagentStatus as a1, type AITodoItem as a2, type AITodoList as a3, type AITodoStatus as a4, type AIToolCall as a5, type AIToolCallStatus as a6, type AIUsageMetrics as a7, ALL_ACTIONS as a8, type AccessLevel as a9, type AgentTodoPlanStatus as aA, type AgentTodoPlanView as aB, type AgentToolCall as aC, type AgentTriggerDefinition as aD, type AgentTriggerType as aE, type ApprovalMode as aF, type AssignRoleInput as aG, type CompactionStrategy as aH, type CreateCustomObjectInput as aI, type CreatePermissionInput as aJ, type CreateRoleInput as aK, type CreateViewInput as aL, type CriticConfig as aM, type CurrencyFilterValue as aN, type CustomTab as aO, DEFAULT_APPROVAL_POLICY as aP, type DocumentsTab as aQ, type EdgeQuantifier as aR, type EffectivePermissions as aS, type EmailsTab as aT, type ExtendedFilterRule as aU, type FilterCombinator as aV, type FilterGroup as aW, type FormDensity as aX, type FormSubmittedAgentEvent as aY, type FormTab as aZ, type FormsTab as a_, type ActivityTab as aa, type AddAttributeInput as ab, type AdvancedFilterState as ac, type AgentConfig as ad, type AgentDashboard as ae, type AgentDefinition as af, type AgentEvent as ag, type AgentMessageAttachment as ah, type AgentMessagePart as ai, type AgentMission as aj, type AgentMissionArtifact as ak, type AgentMissionPage as al, type AgentMissionPolicy as am, type AgentMissionRubric as an, type AgentMissionRubricCriterion as ao, type AgentMissionStatus as ap, type AgentMissionVerification as aq, type AgentMissionView as ar, type AgentRequiredPermission as as, type AgentRun as at, type AgentRunStatus as au, type AgentSession as av, type AgentSessionMessage as aw, type AgentSessionMode as ax, type AgentSessionStatus as ay, type AgentTodoPlan as az, type FilterOperator as b, multiselectOptionWriteSchema as b$, type InverseSource as b0, type ListViewLayout as b1, MAX_TODOS as b2, MAX_TODO_DESCRIPTION_CHARS as b3, MAX_TODO_ID_CHARS as b4, MAX_TODO_RESULT_CHARS as b5, type MentionEntityType as b6, type MentionReference as b7, type MentionedContext as b8, type MentionedEntityContext as b9, type SystemPermissions as bA, TODO_PLAN_STATUSES as bB, TODO_STATUSES as bC, type TabType as bD, type TableSource as bE, type TerminalSessionStatus as bF, type TextPartData as bG, type ThinkingPartData as bH, type ToolImpact as bI, type ToolPartData as bJ, type ToolPartErrorCode as bK, type ToolPartState as bL, type UpdateObjectInput as bM, type UpdateRoleInput as bN, type UpdateViewInput as bO, type UserRoleAssignment as bP, type ViewOverlay as bQ, accessLevelToActions as bR, actionsToAccessLevel as bS, agentDisplayName as bT, getRollupFilterOperators as bU, isDetailView as bV, isFieldGroup as bW, isListView as bX, isNoValueOperator as bY, isRelationGroup as bZ, isTerminalSessionStatus as b_, NO_VALUE_OPERATORS as ba, type NoValueOperator as bb, OPERATORS_BY_TYPE as bc, type ObjectPermissions as bd, type Permission as be, type PhoneFilterValue as bf, type QueryState as bg, type ReasoningPartData as bh, type RecordAgentEvent as bi, type RelationOption as bj, type RelationOptionsResponse as bk, type RelationSource as bl, type RetryPolicy as bm, type RichtextTab as bn, type Role as bo, SESSION_TERMINAL_STATUSES as bp, type SessionApprovalMode as bq, type SortDirection as br, type StreamEventCompactionEnd as bs, type StreamEventCompactionFailed as bt, type StreamEventCompactionStart as bu, type StreamEventMessagePersisted as bv, type StreamEventMessageUpdated as bw, type StreamEventMissionUpdate as bx, type StreamEventTodoPlanUpdate as by, type StreamEventUsage as bz, type SystemResource as c, parseAttributeConfig as c0, parseAttributeConfigForCreate as c1, parseAttributeConfigForUpdate as c2, selectOptionWriteSchema as c3, statusGroupSchema as c4, statusOptionWriteSchema as c5, attributeConfigSchemas as c6, getAttributeConfigSchema as c7, type ProviderName as d, type AgentSchedule as e, type AgentExecutionConfig as f, type AgentApprovalPolicy as g, type AgentTriggerBlueprint as h, type AgentBlueprint as i, type DetailViewDefinition as j, type SidePanelConfig as k, type Field as l, type AttributeGroupField as m, type FieldGroup as n, type TableTab as o, type CreateMode as p, type Tab as q, type ListViewDefinition as r, type ViewDefinition as s, type ListViewTab as t, type FilterValue as u, type FilterRule as v, type DynamicValue as w, type RelativeDateValue as x, type AIAvailableModel as y, type AIBatchAnswerValue as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { A as Attribute, f as AttributeType, e as RollupAttribute } from './attributes-lBLiOIY3.mjs';
|
|
3
|
-
import { IconName
|
|
4
|
-
import { Uuid } from './utils.mjs';
|
|
3
|
+
import { IconName } from '@stndrds/constants';
|
|
5
4
|
import { L as ListViewTabVisibility, T as Timestamps, R as ResourceVisibility } from './objects-BCaBw2ef.mjs';
|
|
5
|
+
import { Uuid } from './utils.mjs';
|
|
6
6
|
|
|
7
7
|
/** Operators for text-based attributes */
|
|
8
8
|
type TextFilterOperator = "is" | "is_not" | "contains" | "not_contains" | "starts_with" | "ends_with" | "is_empty" | "is_not_empty";
|
|
@@ -858,235 +858,6 @@ interface MentionedContext {
|
|
|
858
858
|
summary: string;
|
|
859
859
|
}
|
|
860
860
|
|
|
861
|
-
type DocumentKind = "file" | "folder";
|
|
862
|
-
interface Document extends Timestamps {
|
|
863
|
-
id: Uuid;
|
|
864
|
-
tenantId: Uuid;
|
|
865
|
-
title: string;
|
|
866
|
-
kind: DocumentKind;
|
|
867
|
-
parentId?: Uuid | null;
|
|
868
|
-
description?: string;
|
|
869
|
-
contentHash?: string;
|
|
870
|
-
createdBy?: Uuid;
|
|
871
|
-
updatedBy?: Uuid;
|
|
872
|
-
deletedAt?: Date | null;
|
|
873
|
-
/**
|
|
874
|
-
* Fractional ordering position within `(tenantId, parentId)`. Lower values
|
|
875
|
-
* sort first. New rows default to `max(siblings) + 1024` so reorderings can
|
|
876
|
-
* insert between neighbours without renumbering. The server may rebalance
|
|
877
|
-
* positions in the background to keep the spacing bounded.
|
|
878
|
-
*/
|
|
879
|
-
position: number;
|
|
880
|
-
}
|
|
881
|
-
interface DocumentWithSubCount extends Document {
|
|
882
|
-
subCount: number | null;
|
|
883
|
-
}
|
|
884
|
-
/** OCR processing lifecycle for a single file within a document pack. */
|
|
885
|
-
type FileOcrStatus = "pending" | "processing" | "completed" | "failed";
|
|
886
|
-
/**
|
|
887
|
-
* A single anonymous file belonging to a document pack.
|
|
888
|
-
* Unlike the slot-based model, files carry no slot name — order within the
|
|
889
|
-
* pack is `position` only, and `name` is provenance (originalName), never a
|
|
890
|
-
* label rendered in the UI.
|
|
891
|
-
*/
|
|
892
|
-
interface DocumentFile {
|
|
893
|
-
id: Uuid;
|
|
894
|
-
documentId: Uuid;
|
|
895
|
-
position: number;
|
|
896
|
-
/** Provenance only (originalName) — never rendered as a label. */
|
|
897
|
-
name: string;
|
|
898
|
-
mimeType: string;
|
|
899
|
-
size: number;
|
|
900
|
-
ocrStatus: FileOcrStatus | null;
|
|
901
|
-
ocrText: string | null;
|
|
902
|
-
ocrConfidence: number | null;
|
|
903
|
-
processedAt: Date | null;
|
|
904
|
-
}
|
|
905
|
-
type DocumentWithFiles = Document & {
|
|
906
|
-
files: DocumentFile[];
|
|
907
|
-
};
|
|
908
|
-
interface CreateDocument {
|
|
909
|
-
title: string;
|
|
910
|
-
kind?: DocumentKind;
|
|
911
|
-
parentId?: Uuid | null;
|
|
912
|
-
description?: string;
|
|
913
|
-
position?: number;
|
|
914
|
-
}
|
|
915
|
-
/**
|
|
916
|
-
* Reference to a record attribute that should atomically attach a freshly
|
|
917
|
-
* created Document. Passed alongside `CreateDocument` to make creation
|
|
918
|
-
* link-aware end-to-end (client → REST → service → repo).
|
|
919
|
-
*
|
|
920
|
-
* The server requires this — orphan Documents are not creatable through the
|
|
921
|
-
* REST API.
|
|
922
|
-
*/
|
|
923
|
-
interface CreateDocumentLink {
|
|
924
|
-
objectName: string;
|
|
925
|
-
sourceRecordId: string;
|
|
926
|
-
attributeName: string;
|
|
927
|
-
}
|
|
928
|
-
interface UpdateDocument {
|
|
929
|
-
title?: string;
|
|
930
|
-
parentId?: Uuid | null;
|
|
931
|
-
position?: number;
|
|
932
|
-
}
|
|
933
|
-
interface DocumentListOptions {
|
|
934
|
-
limit?: number;
|
|
935
|
-
offset?: number;
|
|
936
|
-
}
|
|
937
|
-
interface RecordDocuments {
|
|
938
|
-
/** Documents grouped by attribute name (includes system 'attachments' attribute) */
|
|
939
|
-
byAttribute: Record<string, DocumentWithFiles[]>;
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
/**
|
|
943
|
-
* Storage provider type
|
|
944
|
-
*/
|
|
945
|
-
type StorageProvider = "s3" | "gcs" | "azure" | "local" | "cloudflare-r2" | string;
|
|
946
|
-
/**
|
|
947
|
-
* File - Represents uploaded file metadata and storage info
|
|
948
|
-
*
|
|
949
|
-
* ARCHITECTURE:
|
|
950
|
-
* - Fixed table (no custom attributes)
|
|
951
|
-
* - Manages file storage metadata
|
|
952
|
-
* - uploadedBy links to user_profiles table
|
|
953
|
-
* - Supports soft delete via deletedAt
|
|
954
|
-
*
|
|
955
|
-
* @example
|
|
956
|
-
* ```typescript
|
|
957
|
-
* const file: File = {
|
|
958
|
-
* id: "file-123",
|
|
959
|
-
* tenantId: "tenant-456",
|
|
960
|
-
* name: "contract-2025.pdf",
|
|
961
|
-
* originalName: "Contract Acme Corp 2025.pdf",
|
|
962
|
-
* mimeType: "application/pdf",
|
|
963
|
-
* size: 2458624,
|
|
964
|
-
* storageProvider: "s3",
|
|
965
|
-
* storagePath: "tenants/456/files/2025/11/contract-2025.pdf",
|
|
966
|
-
* storageBucket: "my-app-files",
|
|
967
|
-
* url: "https://cdn.example.com/files/file-123",
|
|
968
|
-
* uploadedBy: "profile-789",
|
|
969
|
-
* folderPath: "/contracts/2025",
|
|
970
|
-
* createdAt: new Date(),
|
|
971
|
-
* updatedAt: new Date(),
|
|
972
|
-
* };
|
|
973
|
-
* ```
|
|
974
|
-
*/
|
|
975
|
-
interface File extends Timestamps {
|
|
976
|
-
id: Uuid;
|
|
977
|
-
tenantId: Uuid;
|
|
978
|
-
/**
|
|
979
|
-
* File name (sanitized for storage)
|
|
980
|
-
*/
|
|
981
|
-
name: string;
|
|
982
|
-
/**
|
|
983
|
-
* Original file name (as uploaded by user)
|
|
984
|
-
*/
|
|
985
|
-
originalName: string;
|
|
986
|
-
/**
|
|
987
|
-
* MIME type (e.g., "application/pdf", "image/jpeg")
|
|
988
|
-
*/
|
|
989
|
-
mimeType: MimeType | string;
|
|
990
|
-
/**
|
|
991
|
-
* File size in bytes
|
|
992
|
-
*/
|
|
993
|
-
size: number;
|
|
994
|
-
/**
|
|
995
|
-
* Storage provider (s3, gcs, azure, local, etc.)
|
|
996
|
-
*/
|
|
997
|
-
storageProvider: StorageProvider;
|
|
998
|
-
/**
|
|
999
|
-
* Path in the storage bucket
|
|
1000
|
-
*/
|
|
1001
|
-
storagePath: string;
|
|
1002
|
-
/**
|
|
1003
|
-
* Storage bucket name (if applicable)
|
|
1004
|
-
*/
|
|
1005
|
-
storageBucket?: string;
|
|
1006
|
-
/**
|
|
1007
|
-
* Public or signed URL to access the file
|
|
1008
|
-
*/
|
|
1009
|
-
url: string;
|
|
1010
|
-
/**
|
|
1011
|
-
* User who uploaded the file (FK to user_profiles)
|
|
1012
|
-
* Optional for system-generated files or anonymous uploads.
|
|
1013
|
-
*/
|
|
1014
|
-
uploadedBy?: Uuid;
|
|
1015
|
-
/**
|
|
1016
|
-
* Folder path for organization (e.g., "/contracts/2025")
|
|
1017
|
-
*/
|
|
1018
|
-
folderPath?: string;
|
|
1019
|
-
/**
|
|
1020
|
-
* Soft delete timestamp (null = not deleted)
|
|
1021
|
-
*/
|
|
1022
|
-
deletedAt?: Date;
|
|
1023
|
-
/**
|
|
1024
|
-
* Document this file belongs to, when the file is a member of a document
|
|
1025
|
-
* pack. NULL for files that aren't part of a document (e.g. freshly
|
|
1026
|
-
* uploaded blobs not yet attached to a pack).
|
|
1027
|
-
*/
|
|
1028
|
-
documentId?: Uuid | null;
|
|
1029
|
-
/**
|
|
1030
|
-
* Append-only position within the owning document pack (plain integer,
|
|
1031
|
-
* `max(position) + 1`). Packs are NOT reorderable (spec §2).
|
|
1032
|
-
*/
|
|
1033
|
-
position?: number | null;
|
|
1034
|
-
/**
|
|
1035
|
-
* OCR processing status for this file, when applicable.
|
|
1036
|
-
*/
|
|
1037
|
-
ocrStatus?: FileOcrStatus | null;
|
|
1038
|
-
/**
|
|
1039
|
-
* Extracted OCR text, when processing has completed.
|
|
1040
|
-
*/
|
|
1041
|
-
ocrText?: string | null;
|
|
1042
|
-
/**
|
|
1043
|
-
* OCR confidence score, when processing has completed.
|
|
1044
|
-
*/
|
|
1045
|
-
ocrConfidence?: number | null;
|
|
1046
|
-
/**
|
|
1047
|
-
* Timestamp of the last OCR processing attempt.
|
|
1048
|
-
*/
|
|
1049
|
-
processedAt?: Date | null;
|
|
1050
|
-
}
|
|
1051
|
-
/**
|
|
1052
|
-
* Data required to create a new file record
|
|
1053
|
-
*/
|
|
1054
|
-
/**
|
|
1055
|
-
* Data for creating a new file.
|
|
1056
|
-
* Tenant ID is automatically set from execution context.
|
|
1057
|
-
*/
|
|
1058
|
-
interface CreateFile {
|
|
1059
|
-
name: string;
|
|
1060
|
-
originalName: string;
|
|
1061
|
-
mimeType: MimeType | string;
|
|
1062
|
-
size: number;
|
|
1063
|
-
storageProvider: StorageProvider;
|
|
1064
|
-
storagePath: string;
|
|
1065
|
-
storageBucket?: string;
|
|
1066
|
-
url: string;
|
|
1067
|
-
uploadedBy?: Uuid;
|
|
1068
|
-
folderPath?: string;
|
|
1069
|
-
documentId?: Uuid | null;
|
|
1070
|
-
position?: number | null;
|
|
1071
|
-
ocrStatus?: FileOcrStatus | null;
|
|
1072
|
-
ocrText?: string | null;
|
|
1073
|
-
ocrConfidence?: number | null;
|
|
1074
|
-
processedAt?: Date | null;
|
|
1075
|
-
}
|
|
1076
|
-
/**
|
|
1077
|
-
* Data for updating an existing file record
|
|
1078
|
-
*/
|
|
1079
|
-
interface UpdateFile {
|
|
1080
|
-
name?: string;
|
|
1081
|
-
folderPath?: string;
|
|
1082
|
-
documentId?: Uuid | null;
|
|
1083
|
-
position?: number | null;
|
|
1084
|
-
ocrStatus?: FileOcrStatus | null;
|
|
1085
|
-
ocrText?: string | null;
|
|
1086
|
-
ocrConfidence?: number | null;
|
|
1087
|
-
processedAt?: Date | null;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
861
|
/**
|
|
1091
862
|
* Outcome of a compaction pass: a no-op (context already small enough), an LLM
|
|
1092
863
|
* `summary`, or a degraded `truncation` (the summarizer failed/timed out/returned
|
|
@@ -1160,6 +931,12 @@ interface AgentConfig {
|
|
|
1160
931
|
systemPrompt: string;
|
|
1161
932
|
model: ModelDefinition;
|
|
1162
933
|
tools?: string[];
|
|
934
|
+
/**
|
|
935
|
+
* MCP servers whose tools mount into this agent's toolchain. Ids opt in
|
|
936
|
+
* explicitly; `"all"` mounts every server the viewer can see. Absent means
|
|
937
|
+
* none — so agents that predate this field are tool-identical.
|
|
938
|
+
*/
|
|
939
|
+
mcpServers?: string[] | "all";
|
|
1163
940
|
timeoutMs?: number;
|
|
1164
941
|
costLimitUsd?: number | null;
|
|
1165
942
|
canDelegate: boolean;
|
|
@@ -1263,6 +1040,13 @@ interface AgentBlueprint {
|
|
|
1263
1040
|
canDelegate?: boolean;
|
|
1264
1041
|
maxDepth?: number;
|
|
1265
1042
|
maxTreeCostUsd?: number;
|
|
1043
|
+
/**
|
|
1044
|
+
* MCP servers this agent may use (see `AgentConfig.mcpServers`). Absent
|
|
1045
|
+
* means none — an agent that never declares this stays tool-identical to
|
|
1046
|
+
* one predating the field. Reconciled by the boot sync like the other
|
|
1047
|
+
* optional config fields (`SYNCED_FIELDS`).
|
|
1048
|
+
*/
|
|
1049
|
+
mcpServers?: string[] | "all";
|
|
1266
1050
|
system: boolean;
|
|
1267
1051
|
/** Code-declared agents are workspace-visible; private is runtime-only. */
|
|
1268
1052
|
visibility: ResourceVisibility;
|
|
@@ -1385,6 +1169,14 @@ interface AgentDefinition {
|
|
|
1385
1169
|
tools?: string[];
|
|
1386
1170
|
schedule?: AgentSchedule;
|
|
1387
1171
|
config: AgentExecutionConfig;
|
|
1172
|
+
/**
|
|
1173
|
+
* MCP servers this definition may use (see `AgentConfig.mcpServers`).
|
|
1174
|
+
* Absent means none — a definition that predates this field is
|
|
1175
|
+
* tool-identical to one that never sets it. The opt-in is narrowed further
|
|
1176
|
+
* by the viewer's visibility at resolution time (`buildMcpToolset`); a
|
|
1177
|
+
* server id here that the viewer cannot see yields no tools from it.
|
|
1178
|
+
*/
|
|
1179
|
+
mcpServers?: string[] | "all";
|
|
1388
1180
|
/** Code-declared (immutable via public API); reconciled by the boot sync. */
|
|
1389
1181
|
system: boolean;
|
|
1390
1182
|
visibility: ResourceVisibility;
|
|
@@ -1399,8 +1191,6 @@ interface AgentDefinition {
|
|
|
1399
1191
|
critic?: CriticConfig;
|
|
1400
1192
|
missionPolicy?: AgentMissionPolicy;
|
|
1401
1193
|
autoDecide?: boolean;
|
|
1402
|
-
fileIds?: string[];
|
|
1403
|
-
attachments?: File[];
|
|
1404
1194
|
requiredPermission?: AgentRequiredPermission;
|
|
1405
1195
|
}
|
|
1406
1196
|
interface AgentRun {
|
|
@@ -2410,4 +2200,4 @@ declare function parseAttributeConfigForCreate(type: AttributeType, input: unkno
|
|
|
2410
2200
|
*/
|
|
2411
2201
|
declare function parseAttributeConfigForUpdate(stored: Attribute, patch: Partial<AddAttributeInput>): Record<string, unknown>;
|
|
2412
2202
|
|
|
2413
|
-
export { type AIQuestionOption as $, type Action as A, type AIBatchQuestion as B, type ConfigOverrides as C, type DetailViewConfig as D, type AIBatchQuestionAnswer as E, type FilterState as F, type Group as G, type AIBatchQuestionOption as H, type AIBatchQuestionType as I, type AIChatMessage as J, type AIChatMessagePart as K, type ListViewConfig as L, type ModelDefinition as M, type AIChatMessagePartType as N, type AIChatNotification as O, type PermissionScope as P, type AICompactionSummary as Q, type RelationGroup as R, type SortRule as S, type TriggerEventType as T, type AIMemoryEntry as U, type ViewType as V, type AIMemoryType as W, type AIMessageRole as X, type AIProviderMetrics as Y, type AIQuestion as Z, type AIQuestionAnswer as _, type ViewConfig as a, type
|
|
2203
|
+
export { type AIQuestionOption as $, type Action as A, type AIBatchQuestion as B, type ConfigOverrides as C, type DetailViewConfig as D, type AIBatchQuestionAnswer as E, type FilterState as F, type Group as G, type AIBatchQuestionOption as H, type AIBatchQuestionType as I, type AIChatMessage as J, type AIChatMessagePart as K, type ListViewConfig as L, type ModelDefinition as M, type AIChatMessagePartType as N, type AIChatNotification as O, type PermissionScope as P, type AICompactionSummary as Q, type RelationGroup as R, type SortRule as S, type TriggerEventType as T, type AIMemoryEntry as U, type ViewType as V, type AIMemoryType as W, type AIMessageRole as X, type AIProviderMetrics as Y, type AIQuestion as Z, type AIQuestionAnswer as _, type ViewConfig as a, type HumanRequestNeed as a$, type AIQuestionType as a0, type AISubagentStatus as a1, type AITodoItem as a2, type AITodoList as a3, type AITodoStatus as a4, type AIToolCall as a5, type AIToolCallStatus as a6, type AIUsageMetrics as a7, ALL_ACTIONS as a8, type AccessLevel as a9, type AgentTodoPlanStatus as aA, type AgentTodoPlanView as aB, type AgentToolCall as aC, type AgentTriggerDefinition as aD, type AgentTriggerType as aE, type ApprovalMode as aF, type AssignRoleInput as aG, type CompactionStrategy as aH, type CreateCustomObjectInput as aI, type CreatePermissionInput as aJ, type CreateRoleInput as aK, type CreateViewInput as aL, type CriticConfig as aM, type CurrencyFilterValue as aN, type CustomTab as aO, DEFAULT_APPROVAL_POLICY as aP, type DocumentsTab as aQ, type EdgeQuantifier as aR, type EffectivePermissions as aS, type EmailsTab as aT, type ExtendedFilterRule as aU, type FilterCombinator as aV, type FilterGroup as aW, type FormDensity as aX, type FormSubmittedAgentEvent as aY, type FormTab as aZ, type FormsTab as a_, type ActivityTab as aa, type AddAttributeInput as ab, type AdvancedFilterState as ac, type AgentConfig as ad, type AgentDashboard as ae, type AgentDefinition as af, type AgentEvent as ag, type AgentMessageAttachment as ah, type AgentMessagePart as ai, type AgentMission as aj, type AgentMissionArtifact as ak, type AgentMissionPage as al, type AgentMissionPolicy as am, type AgentMissionRubric as an, type AgentMissionRubricCriterion as ao, type AgentMissionStatus as ap, type AgentMissionVerification as aq, type AgentMissionView as ar, type AgentRequiredPermission as as, type AgentRun as at, type AgentRunStatus as au, type AgentSession as av, type AgentSessionMessage as aw, type AgentSessionMode as ax, type AgentSessionStatus as ay, type AgentTodoPlan as az, type FilterOperator as b, multiselectOptionWriteSchema as b$, type InverseSource as b0, type ListViewLayout as b1, MAX_TODOS as b2, MAX_TODO_DESCRIPTION_CHARS as b3, MAX_TODO_ID_CHARS as b4, MAX_TODO_RESULT_CHARS as b5, type MentionEntityType as b6, type MentionReference as b7, type MentionedContext as b8, type MentionedEntityContext as b9, type SystemPermissions as bA, TODO_PLAN_STATUSES as bB, TODO_STATUSES as bC, type TabType as bD, type TableSource as bE, type TerminalSessionStatus as bF, type TextPartData as bG, type ThinkingPartData as bH, type ToolImpact as bI, type ToolPartData as bJ, type ToolPartErrorCode as bK, type ToolPartState as bL, type UpdateObjectInput as bM, type UpdateRoleInput as bN, type UpdateViewInput as bO, type UserRoleAssignment as bP, type ViewOverlay as bQ, accessLevelToActions as bR, actionsToAccessLevel as bS, agentDisplayName as bT, getRollupFilterOperators as bU, isDetailView as bV, isFieldGroup as bW, isListView as bX, isNoValueOperator as bY, isRelationGroup as bZ, isTerminalSessionStatus as b_, NO_VALUE_OPERATORS as ba, type NoValueOperator as bb, OPERATORS_BY_TYPE as bc, type ObjectPermissions as bd, type Permission as be, type PhoneFilterValue as bf, type QueryState as bg, type ReasoningPartData as bh, type RecordAgentEvent as bi, type RelationOption as bj, type RelationOptionsResponse as bk, type RelationSource as bl, type RetryPolicy as bm, type RichtextTab as bn, type Role as bo, SESSION_TERMINAL_STATUSES as bp, type SessionApprovalMode as bq, type SortDirection as br, type StreamEventCompactionEnd as bs, type StreamEventCompactionFailed as bt, type StreamEventCompactionStart as bu, type StreamEventMessagePersisted as bv, type StreamEventMessageUpdated as bw, type StreamEventMissionUpdate as bx, type StreamEventTodoPlanUpdate as by, type StreamEventUsage as bz, type SystemResource as c, parseAttributeConfig as c0, parseAttributeConfigForCreate as c1, parseAttributeConfigForUpdate as c2, selectOptionWriteSchema as c3, statusGroupSchema as c4, statusOptionWriteSchema as c5, attributeConfigSchemas as c6, getAttributeConfigSchema as c7, type ProviderName as d, type AgentSchedule as e, type AgentExecutionConfig as f, type AgentApprovalPolicy as g, type AgentTriggerBlueprint as h, type AgentBlueprint as i, type DetailViewDefinition as j, type SidePanelConfig as k, type Field as l, type AttributeGroupField as m, type FieldGroup as n, type TableTab as o, type CreateMode as p, type Tab as q, type ListViewDefinition as r, type ViewDefinition as s, type ListViewTab as t, type FilterValue as u, type FilterRule as v, type DynamicValue as w, type RelativeDateValue as x, type AIAvailableModel as y, type AIBatchAnswerValue as z };
|