@synap-core/api-types 1.4.1 → 1.6.1

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.
@@ -2,23 +2,8 @@
2
2
 
3
3
  import { Column, SQL } from 'drizzle-orm';
4
4
 
5
- /**
6
- * Context Types
7
- *
8
- * Proper type definitions for tRPC context to avoid `any` types.
9
- */
10
- /**
11
- * Database client type
12
- *
13
- * Note: Using `any` here to preserve Drizzle's schema inference.
14
- * Attempting to use PostgresJsDatabase<any> loses the schema generic
15
- * and breaks db.query.tableName access patterns.
16
- */
17
- export type DatabaseClient = any;
18
- /**
19
- * Ory Kratos identity
20
- */
21
- export interface KratosIdentity {
5
+ type DatabaseClient = any;
6
+ interface KratosIdentity {
22
7
  id: string;
23
8
  traits: {
24
9
  email: string;
@@ -26,27 +11,18 @@ export interface KratosIdentity {
26
11
  [key: string]: unknown;
27
12
  };
28
13
  }
29
- /**
30
- * Ory Kratos session
31
- */
32
- export interface KratosSession {
14
+ interface KratosSession {
33
15
  identity: KratosIdentity;
34
16
  active: boolean;
35
17
  expires_at?: string;
36
18
  authenticated_at?: string;
37
19
  }
38
- /**
39
- * User object (simplified from Kratos identity)
40
- */
41
- export interface User {
20
+ interface User {
42
21
  id: string;
43
22
  email: string;
44
23
  name?: string;
45
24
  }
46
- /**
47
- * Full tRPC context
48
- */
49
- export interface Context {
25
+ interface Context {
50
26
  db: DatabaseClient;
51
27
  authenticated: boolean;
52
28
  userId?: string | null;
@@ -57,6 +33,12 @@ export interface Context {
57
33
  workspaceId?: string | null;
58
34
  workspaceRole?: string | null;
59
35
  }
36
+ interface AgentMetadata {
37
+ agentType: string;
38
+ description?: string;
39
+ createdByUserId: string;
40
+ capabilities?: string[];
41
+ }
60
42
  declare enum ChatThreadType {
61
43
  MAIN = "main",
62
44
  BRANCH = "branch"
@@ -73,7 +55,9 @@ declare enum ChatThreadAgentType {
73
55
  KNOWLEDGE_SEARCH = "knowledge-search",
74
56
  CODE = "code",
75
57
  WRITING = "writing",
76
- ACTION = "action"
58
+ ACTION = "action",
59
+ ONBOARDING = "onboarding",
60
+ WORKSPACE_CREATION = "workspace-creation"
77
61
  }
78
62
  declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
79
63
  name: "chat_threads";
@@ -287,7 +271,9 @@ declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
287
271
  ChatThreadAgentType.KNOWLEDGE_SEARCH,
288
272
  ChatThreadAgentType.CODE,
289
273
  ChatThreadAgentType.WRITING,
290
- ChatThreadAgentType.ACTION
274
+ ChatThreadAgentType.ACTION,
275
+ ChatThreadAgentType.ONBOARDING,
276
+ ChatThreadAgentType.WORKSPACE_CREATION
291
277
  ];
292
278
  baseColumn: never;
293
279
  identity: undefined;
@@ -401,7 +387,7 @@ declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
401
387
  };
402
388
  dialect: "pg";
403
389
  }>;
404
- export type ChatThread = typeof chatThreads.$inferSelect;
390
+ type ChatThread = typeof chatThreads.$inferSelect;
405
391
  declare enum ThreadEntityRelationshipType {
406
392
  USED_AS_CONTEXT = "used_as_context",
407
393
  CREATED = "created",
@@ -426,31 +412,30 @@ declare enum ThreadDocumentConflictStatus {
426
412
  PENDING = "pending",
427
413
  RESOLVED = "resolved"
428
414
  }
429
- export interface DerivedInput {
415
+ interface DerivedInput {
430
416
  name: string;
431
417
  label?: string;
432
418
  type?: string;
433
419
  options?: string[];
434
420
  default?: string;
435
421
  }
436
- export interface InputOverride {
422
+ interface InputOverride {
437
423
  label?: string;
438
424
  default?: string;
439
425
  options?: string[];
440
426
  }
441
- /**
442
- * Workspaces Schema - Multi-user workspace support
443
- *
444
- * A workspace can be:
445
- * - Personal (single user)
446
- * - Team (multiple users with roles)
447
- * - Enterprise (advanced features)
448
- */
449
- export interface WorkspaceSettings {
427
+ interface WorkspaceLayoutConfig {
428
+ pinnedApps?: string[];
429
+ sidebarApps?: string[];
430
+ defaultView?: string;
431
+ theme?: string;
432
+ }
433
+ interface WorkspaceSettings {
450
434
  defaultEntityTypes?: string[];
451
435
  theme?: string;
452
436
  aiEnabled?: boolean;
453
437
  allowExternalSharing?: boolean;
438
+ layout?: WorkspaceLayoutConfig;
454
439
  mainWhiteboardId?: string;
455
440
  intelligenceServiceId?: string;
456
441
  intelligenceServiceOverrides?: {
@@ -474,11 +459,25 @@ export interface WorkspaceSettings {
474
459
  };
475
460
  };
476
461
  };
462
+ /** Name of the template used to seed this workspace. When set, workspace-init skips default views. */
463
+ templateName?: string;
464
+ /** Slug of the control plane package used to create this workspace. */
465
+ packageSlug?: string;
466
+ /** Version of the package at time of creation. */
467
+ packageVersion?: string;
468
+ /** Who/what created this workspace: user, control-plane provisioning, or plugin seed */
469
+ createdBy?: "user" | "provisioning" | "plugin";
470
+ /** ISO timestamp when provisioning created this workspace */
471
+ provisionedAt?: string;
472
+ /** Current provisioning status */
473
+ provisioningStatus?: "pending" | "active" | "failed";
477
474
  aiGovernance?: {
478
475
  autoApprove?: boolean;
479
476
  requireReviewFor?: string[];
480
477
  maxAgentsPerUser?: number;
481
478
  allowAgentCreation?: boolean;
479
+ /** Who can approve AI proposals. Default: "owner_and_admins" */
480
+ proposalApprovalPolicy?: "owner_and_admins" | "any_editor" | "admins_only";
482
481
  };
483
482
  }
484
483
  declare enum ProposalStatus {
@@ -672,7 +671,7 @@ declare const messageLinks: import("drizzle-orm/pg-core").PgTableWithColumns<{
672
671
  };
673
672
  dialect: "pg";
674
673
  }>;
675
- export type MessageLink = typeof messageLinks.$inferSelect;
674
+ type MessageLink = typeof messageLinks.$inferSelect;
676
675
  declare enum PropertyValueType {
677
676
  STRING = "string",
678
677
  NUMBER = "number",
@@ -680,7 +679,8 @@ declare enum PropertyValueType {
680
679
  DATE = "date",
681
680
  ENTITY_ID = "entity_id",
682
681
  ARRAY = "array",
683
- OBJECT = "object"
682
+ OBJECT = "object",
683
+ SECRET = "secret"
684
684
  }
685
685
  declare const propertyDefs: import("drizzle-orm/pg-core").PgTableWithColumns<{
686
686
  name: "property_defs";
@@ -742,7 +742,8 @@ declare const propertyDefs: import("drizzle-orm/pg-core").PgTableWithColumns<{
742
742
  PropertyValueType.DATE,
743
743
  PropertyValueType.ENTITY_ID,
744
744
  PropertyValueType.ARRAY,
745
- PropertyValueType.OBJECT
745
+ PropertyValueType.OBJECT,
746
+ PropertyValueType.SECRET
746
747
  ];
747
748
  baseColumn: never;
748
749
  identity: undefined;
@@ -819,19 +820,13 @@ declare const propertyDefs: import("drizzle-orm/pg-core").PgTableWithColumns<{
819
820
  };
820
821
  dialect: "pg";
821
822
  }>;
822
- export type PropertyDef = typeof propertyDefs.$inferSelect;
823
+ type PropertyDef = typeof propertyDefs.$inferSelect;
823
824
  declare enum ProfileScope {
824
825
  SYSTEM = "system",// Available to all users
825
826
  WORKSPACE = "workspace",// Shared within workspace
826
827
  USER = "user"
827
828
  }
828
- /**
829
- * EventRecord - Database representation of an event
830
- *
831
- * This is the format returned from the database.
832
- * It maps directly to the events table structure.
833
- */
834
- export interface EventRecord {
829
+ interface EventRecord {
835
830
  id: string;
836
831
  timestamp: Date;
837
832
  subjectId: string;
@@ -845,8 +840,7 @@ export interface EventRecord {
845
840
  correlationId?: string;
846
841
  source: string;
847
842
  }
848
- /** Minimal message fields for list/preview */
849
- export interface LinkedMessagePreview {
843
+ interface LinkedMessagePreview {
850
844
  id: string;
851
845
  threadId: string;
852
846
  role: string;
@@ -854,19 +848,16 @@ export interface LinkedMessagePreview {
854
848
  timestamp: Date;
855
849
  userId: string;
856
850
  }
857
- export interface LinkedMessageItem {
851
+ interface LinkedMessageItem {
858
852
  link: MessageLink;
859
853
  message: LinkedMessagePreview;
860
854
  }
861
- export interface EffectiveProperty extends PropertyDef {
855
+ interface EffectiveProperty extends PropertyDef {
862
856
  required: boolean;
863
857
  defaultValue: unknown;
864
858
  displayOrder: number;
865
859
  }
866
- /**
867
- * Column definition for views
868
- */
869
- export interface ViewColumn {
860
+ interface ViewColumn {
870
861
  id: string;
871
862
  field: string;
872
863
  title?: string;
@@ -875,38 +866,17 @@ export interface ViewColumn {
875
866
  visible?: boolean;
876
867
  width?: number;
877
868
  }
878
- /**
879
- * View Query Types
880
- *
881
- * Single source of truth for all view query and filter types.
882
- */
883
- /**
884
- * Filter operator types
885
- */
886
- export type FilterOperator = "equals" | "not_equals" | "contains" | "not_contains" | "in" | "not_in" | "is_empty" | "is_not_empty" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal";
887
- /**
888
- * Filter definition for entity queries
889
- */
890
- export interface EntityFilter {
869
+ type FilterOperator = "equals" | "not_equals" | "contains" | "not_contains" | "in" | "not_in" | "is_empty" | "is_not_empty" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal";
870
+ interface EntityFilter {
891
871
  field: string;
892
872
  operator: FilterOperator;
893
873
  value?: unknown;
894
874
  }
895
- /**
896
- * Sort rule for entity queries
897
- */
898
- export interface SortRule {
875
+ interface SortRule {
899
876
  field: string;
900
877
  direction: "asc" | "desc";
901
878
  }
902
- /**
903
- * Query definition for structured views
904
- * Defines which entities to show and how to filter them
905
- *
906
- * NOTE: profileIds/profileSlugs are now stored in views.scopeProfileIds
907
- * This query structure only contains filters, sorts, search, pagination, and groupBy
908
- */
909
- export interface EntityQuery {
879
+ interface EntityQuery {
910
880
  /** @deprecated - Profile IDs now stored in views.scopeProfileIds */
911
881
  profileIds?: string[];
912
882
  /** @deprecated - Profile slugs now stored in views.scopeProfileIds (resolved to IDs) */
@@ -928,19 +898,6 @@ export interface EntityQuery {
928
898
  /** Group by field (for kanban, timeline) */
929
899
  groupBy?: string;
930
900
  }
931
- /**
932
- * View Content Types
933
- *
934
- * Defines the discriminated union for view content based on category.
935
- * Categories determine the structure and purpose of view content.
936
- */
937
- /**
938
- * View category determines content structure and rendering approach
939
- * - structured: Query-based views with interchangeable layouts (table, kanban, graph, etc.)
940
- * - canvas: Freeform drawing views (whiteboard, mindmap)
941
- * - composite: Views that compose other views (bento grid, dashboard)
942
- */
943
- export type ViewCategory = "structured" | "canvas" | "composite";
944
901
  declare enum AgentType {
945
902
  DEFAULT = "default",
946
903
  META = "meta",
@@ -950,10 +907,7 @@ declare enum AgentType {
950
907
  WRITING = "writing",
951
908
  ACTION = "action"
952
909
  }
953
- /**
954
- * Agent type as string literal union (for flexibility)
955
- */
956
- export type AgentTypeString = `${AgentType}` | (string & {});
910
+ type AgentTypeString = `${AgentType}` | (string & {});
957
911
  declare enum AIStepType {
958
912
  THINKING = "thinking",
959
913
  TOOL_CALL = "tool_call",
@@ -961,17 +915,7 @@ declare enum AIStepType {
961
915
  DECISION = "decision",
962
916
  ERROR = "error"
963
917
  }
964
- /**
965
- * AI step - shows what the AI is doing
966
- *
967
- * Represents any step in the AI's reasoning/execution process:
968
- * - thinking: General analysis and reasoning
969
- * - tool_call: When AI calls a tool
970
- * - tool_result: Result from tool execution
971
- * - decision: AI making a decision
972
- * - error: Error during processing
973
- */
974
- export interface AIStep {
918
+ interface AIStep {
975
919
  id: string;
976
920
  type: AIStepType | string;
977
921
  content: string;
@@ -985,10 +929,7 @@ export interface AIStep {
985
929
  description?: string;
986
930
  status?: "pending" | "running" | "complete" | "error";
987
931
  }
988
- /**
989
- * Branch decision from meta-agent
990
- */
991
- export interface BranchDecision {
932
+ interface BranchDecision {
992
933
  shouldBranch: boolean;
993
934
  reason: string;
994
935
  suggestedAgentType?: AgentTypeString;
@@ -1028,35 +969,7 @@ declare enum MessageLinkRelationshipType {
1028
969
  QUOTES = "quotes",// Message quotes this object
1029
970
  CONTEXT = "context"
1030
971
  }
1031
- /**
1032
- * @synap/events - Schema-Driven Event Generator
1033
- *
1034
- * This module generates event types and payload schemas from Drizzle database tables.
1035
- *
1036
- * V2.0 CONSOLIDATED PATTERN: {table}.{action}.{modifier}
1037
- *
1038
- * Actions: create | update | delete
1039
- * Modifiers: requested | validated
1040
- *
1041
- * Examples:
1042
- * entities.create.requested ← Intent submitted (by user or AI)
1043
- * entities.create.validated ← Change confirmed and applied
1044
- * entities.update.requested ← Update intent
1045
- * entities.update.validated ← Update confirmed
1046
- *
1047
- * No direct actions (e.g., entities.create) - all changes go through requested→validated flow.
1048
- */
1049
- /**
1050
- * Standard CRUD actions with modifiers for table events
1051
- *
1052
- * V2.1: Added 'approved' modifier for 3-phase flow
1053
- *
1054
- * Flow:
1055
- * 1. requested: Intent (user/AI wants to do something)
1056
- * 2. approved: Validated (permissions checked, user approved if needed)
1057
- * 3. validated: Completed (DB operation done, entity exists)
1058
- */
1059
- export type TableAction = "create.requested" | "create.approved" | "create.validated" | "update.requested" | "update.approved" | "update.validated" | "delete.requested" | "delete.approved" | "delete.validated";
972
+ type TableAction = "create.requested" | "create.approved" | "create.validated" | "update.requested" | "update.approved" | "update.validated" | "delete.requested" | "delete.approved" | "delete.validated";
1060
973
  declare const CORE_TABLES: readonly [
1061
974
  "entities",
1062
975
  "documents",
@@ -1072,22 +985,9 @@ declare const CORE_TABLES: readonly [
1072
985
  "views",
1073
986
  "userPreferences"
1074
987
  ];
1075
- export type CoreTable = (typeof CORE_TABLES)[number];
1076
- /**
1077
- * Flat list of all generated event types (for type checking)
1078
- *
1079
- * V2.1: Added .approved phase for 3-phase flow
1080
- */
1081
- export type GeneratedEventType = `${CoreTable}.create.requested` | `${CoreTable}.create.approved` | `${CoreTable}.create.validated` | `${CoreTable}.update.requested` | `${CoreTable}.update.approved` | `${CoreTable}.update.validated` | `${CoreTable}.delete.requested` | `${CoreTable}.delete.approved` | `${CoreTable}.delete.validated`;
1082
- /**
1083
- * Worker Registry - Static worker metadata for Admin UI
1084
- *
1085
- * V2.0: Simplified registry with only active workers
1086
- *
1087
- * Pattern: Table workers handle {table}.{crud}.requested events
1088
- * and emit {table}.{crud}.completed events.
1089
- */
1090
- export interface WorkerMetadata {
988
+ type CoreTable = (typeof CORE_TABLES)[number];
989
+ type GeneratedEventType = `${CoreTable}.create.requested` | `${CoreTable}.create.approved` | `${CoreTable}.create.validated` | `${CoreTable}.update.requested` | `${CoreTable}.update.approved` | `${CoreTable}.update.validated` | `${CoreTable}.delete.requested` | `${CoreTable}.delete.approved` | `${CoreTable}.delete.validated`;
990
+ interface WorkerMetadata {
1091
991
  id: string;
1092
992
  name: string;
1093
993
  description: string;
@@ -1218,16 +1118,77 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1218
1118
  description?: string | undefined;
1219
1119
  properties?: Record<string, unknown> | undefined;
1220
1120
  documentId?: string | undefined;
1121
+ content?: string | undefined;
1122
+ global?: boolean | undefined;
1123
+ source?: "user" | "system" | "intelligence" | "ai" | undefined;
1124
+ reasoning?: string | undefined;
1125
+ agentUserId?: string | undefined;
1221
1126
  };
1222
1127
  output: {
1223
1128
  status: string;
1224
1129
  message: string;
1225
- id: string;
1130
+ id: `${string}-${string}-${string}-${string}-${string}`;
1226
1131
  entity: any;
1132
+ proposalId: string;
1133
+ } | {
1134
+ status: string;
1135
+ message: string;
1136
+ id: any;
1137
+ entity: {
1138
+ id: string;
1139
+ userId: string;
1140
+ workspaceId: string | null;
1141
+ type: string;
1142
+ profileId: string | null;
1143
+ title: string | null;
1144
+ preview: string | null;
1145
+ documentId: string | null;
1146
+ properties: Record<string, unknown>;
1147
+ fileUrl: string | null;
1148
+ filePath: string | null;
1149
+ fileSize: number | null;
1150
+ fileType: string | null;
1151
+ checksum: string | null;
1152
+ version: number;
1153
+ createdAt: Date;
1154
+ updatedAt: Date;
1155
+ deletedAt: Date | null;
1156
+ };
1157
+ proposalId?: undefined;
1227
1158
  };
1228
1159
  meta: object;
1229
1160
  }>;
1230
1161
  list: import("@trpc/server").TRPCQueryProcedure<{
1162
+ input: {
1163
+ profileSlug?: string | undefined;
1164
+ limit?: number | undefined;
1165
+ globalOnly?: boolean | undefined;
1166
+ };
1167
+ output: {
1168
+ entities: {
1169
+ id: string;
1170
+ userId: string;
1171
+ workspaceId: string | null;
1172
+ type: string;
1173
+ profileId: string | null;
1174
+ title: string | null;
1175
+ preview: string | null;
1176
+ documentId: string | null;
1177
+ properties: Record<string, unknown>;
1178
+ fileUrl: string | null;
1179
+ filePath: string | null;
1180
+ fileSize: number | null;
1181
+ fileType: string | null;
1182
+ checksum: string | null;
1183
+ version: number;
1184
+ createdAt: Date;
1185
+ updatedAt: Date;
1186
+ deletedAt: Date | null;
1187
+ }[];
1188
+ };
1189
+ meta: object;
1190
+ }>;
1191
+ listGlobal: import("@trpc/server").TRPCQueryProcedure<{
1231
1192
  input: {
1232
1193
  profileSlug?: string | undefined;
1233
1194
  limit?: number | undefined;
@@ -1298,9 +1259,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1298
1259
  get: import("@trpc/server").TRPCQueryProcedure<{
1299
1260
  input: {
1300
1261
  id: string;
1262
+ includeProfile?: boolean | undefined;
1301
1263
  };
1302
1264
  output: {
1303
1265
  entity: any;
1266
+ profile?: any;
1267
+ effectiveProperties?: any[] | undefined;
1304
1268
  };
1305
1269
  meta: object;
1306
1270
  }>;
@@ -1309,21 +1273,38 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1309
1273
  id: string;
1310
1274
  title?: string | undefined;
1311
1275
  description?: string | undefined;
1276
+ documentId?: string | null | undefined;
1312
1277
  properties?: Record<string, unknown> | undefined;
1278
+ source?: "user" | "system" | "intelligence" | "ai" | undefined;
1279
+ reasoning?: string | undefined;
1280
+ agentUserId?: string | undefined;
1313
1281
  };
1314
1282
  output: {
1315
1283
  status: string;
1316
1284
  message: string;
1285
+ proposalId: string;
1286
+ } | {
1287
+ status: string;
1288
+ message: string;
1289
+ proposalId?: undefined;
1317
1290
  };
1318
1291
  meta: object;
1319
1292
  }>;
1320
1293
  delete: import("@trpc/server").TRPCMutationProcedure<{
1321
1294
  input: {
1322
1295
  id: string;
1296
+ source?: "user" | "system" | "intelligence" | "ai" | undefined;
1297
+ reasoning?: string | undefined;
1298
+ agentUserId?: string | undefined;
1323
1299
  };
1324
1300
  output: {
1325
1301
  status: string;
1326
1302
  message: string;
1303
+ proposalId: string;
1304
+ } | {
1305
+ status: string;
1306
+ message: string;
1307
+ proposalId?: undefined;
1327
1308
  };
1328
1309
  meta: object;
1329
1310
  }>;
@@ -1339,12 +1320,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1339
1320
  parentThreadId?: string | undefined;
1340
1321
  branchPurpose?: string | undefined;
1341
1322
  agentId?: string | undefined;
1342
- agentType?: "code" | "action" | "meta" | "default" | "prompting" | "knowledge-search" | "writing" | undefined;
1323
+ agentType?: "code" | "action" | "meta" | "default" | "prompting" | "knowledge-search" | "writing" | "onboarding" | undefined;
1343
1324
  agentConfig?: Record<string, any> | undefined;
1344
1325
  inheritContext?: boolean | undefined;
1345
1326
  };
1346
1327
  output: {
1347
- threadId: undefined;
1328
+ threadId: `${string}-${string}-${string}-${string}-${string}`;
1348
1329
  status: string;
1349
1330
  message: string;
1350
1331
  thread?: undefined;
@@ -1374,11 +1355,27 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1374
1355
  };
1375
1356
  meta: object;
1376
1357
  }>;
1358
+ createDocumentComment: import("@trpc/server").TRPCMutationProcedure<{
1359
+ input: {
1360
+ documentId: string;
1361
+ position: {
1362
+ start: number;
1363
+ end: number;
1364
+ };
1365
+ content: string;
1366
+ };
1367
+ output: {
1368
+ threadId: `${string}-${string}-${string}-${string}-${string}`;
1369
+ messageId: `${string}-${string}-${string}-${string}-${string}`;
1370
+ };
1371
+ meta: object;
1372
+ }>;
1377
1373
  sendMessage: import("@trpc/server").TRPCMutationProcedure<{
1378
1374
  input: {
1379
1375
  content: string;
1380
1376
  threadId?: string | undefined;
1381
1377
  workspaceId?: string | undefined;
1378
+ agentType?: "code" | "action" | "meta" | "default" | "prompting" | "knowledge-search" | "writing" | "onboarding" | undefined;
1382
1379
  };
1383
1380
  output: {
1384
1381
  threadId: string;
@@ -1433,7 +1430,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1433
1430
  }[];
1434
1431
  executionSummaries: {
1435
1432
  tool: string;
1436
- status: "error" | "skipped" | "success";
1433
+ status: "error" | "success" | "skipped";
1437
1434
  result?: unknown;
1438
1435
  error?: string | undefined;
1439
1436
  }[];
@@ -1478,7 +1475,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1478
1475
  content: string;
1479
1476
  threadId: string;
1480
1477
  parentId: string | null;
1481
- role: "user" | "assistant" | "system";
1478
+ role: "user" | "system" | "assistant";
1482
1479
  previousHash: string | null;
1483
1480
  hash: string;
1484
1481
  }[];
@@ -1613,7 +1610,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1613
1610
  threadId: string;
1614
1611
  title?: string | undefined;
1615
1612
  agentId?: string | undefined;
1616
- agentType?: "code" | "action" | "meta" | "default" | "prompting" | "knowledge-search" | "writing" | undefined;
1613
+ agentType?: "code" | "action" | "meta" | "default" | "prompting" | "knowledge-search" | "writing" | "onboarding" | undefined;
1617
1614
  agentConfig?: Record<string, unknown> | undefined;
1618
1615
  };
1619
1616
  output: {
@@ -1704,7 +1701,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1704
1701
  getThreadContext: import("@trpc/server").TRPCQueryProcedure<{
1705
1702
  input: {
1706
1703
  threadId: string;
1707
- relationshipTypes?: ("used_as_context" | "created" | "updated" | "referenced" | "inherited_from_parent")[] | undefined;
1704
+ relationshipTypes?: ("created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent")[] | undefined;
1708
1705
  };
1709
1706
  output: {
1710
1707
  entities: {
@@ -1744,7 +1741,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1744
1741
  list: import("@trpc/server").TRPCQueryProcedure<{
1745
1742
  input: {
1746
1743
  workspaceId?: string | undefined;
1747
- targetType?: "entity" | "view" | "document" | "whiteboard" | undefined;
1744
+ targetType?: "entity" | "view" | "document" | "profile" | "whiteboard" | undefined;
1748
1745
  targetId?: string | undefined;
1749
1746
  status?: "pending" | "validated" | "rejected" | "all" | undefined;
1750
1747
  limit?: number | undefined;
@@ -1788,9 +1785,33 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1788
1785
  };
1789
1786
  meta: object;
1790
1787
  }>;
1788
+ batchApprove: import("@trpc/server").TRPCMutationProcedure<{
1789
+ input: {
1790
+ proposalIds: string[];
1791
+ comment?: string | undefined;
1792
+ };
1793
+ output: {
1794
+ results: {
1795
+ proposalId: string;
1796
+ success: boolean;
1797
+ error?: string;
1798
+ }[];
1799
+ };
1800
+ meta: object;
1801
+ }>;
1802
+ batchReject: import("@trpc/server").TRPCMutationProcedure<{
1803
+ input: {
1804
+ proposalIds: string[];
1805
+ reason?: string | undefined;
1806
+ };
1807
+ output: {
1808
+ success: boolean;
1809
+ };
1810
+ meta: object;
1811
+ }>;
1791
1812
  submit: import("@trpc/server").TRPCMutationProcedure<{
1792
1813
  input: {
1793
- targetType: "workspace" | "entity" | "view" | "document" | "relation";
1814
+ targetType: "workspace" | "entity" | "view" | "document" | "relation" | "profile";
1794
1815
  changeType: "create" | "update" | "delete";
1795
1816
  data: Record<string, any>;
1796
1817
  targetId?: string | undefined;
@@ -1798,12 +1819,24 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1798
1819
  };
1799
1820
  output: {
1800
1821
  success: boolean;
1801
- requestId: `${string}-${string}-${string}-${string}-${string}`;
1822
+ requestId: string;
1802
1823
  status: string;
1803
1824
  message: string;
1804
1825
  };
1805
1826
  meta: object;
1806
1827
  }>;
1828
+ createDocumentEdit: import("@trpc/server").TRPCMutationProcedure<{
1829
+ input: {
1830
+ documentId: string;
1831
+ from: number;
1832
+ to: number;
1833
+ replacementText: string;
1834
+ };
1835
+ output: {
1836
+ proposalId: string;
1837
+ };
1838
+ meta: object;
1839
+ }>;
1807
1840
  }>>;
1808
1841
  suggestions: import("@trpc/server").TRPCBuiltRouter<{
1809
1842
  ctx: Context;
@@ -2086,6 +2119,42 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2086
2119
  }[];
2087
2120
  meta: object;
2088
2121
  }>;
2122
+ getDataPodStats: import("@trpc/server").TRPCQueryProcedure<{
2123
+ input: void;
2124
+ output: {
2125
+ userCount: number;
2126
+ agentCount: number;
2127
+ workspaceCount: number;
2128
+ entityCount: number;
2129
+ documentCount: number;
2130
+ };
2131
+ meta: object;
2132
+ }>;
2133
+ listUsers: import("@trpc/server").TRPCQueryProcedure<{
2134
+ input: {
2135
+ type?: "all" | "human" | "agent" | undefined;
2136
+ limit?: number | undefined;
2137
+ offset?: number | undefined;
2138
+ };
2139
+ output: {
2140
+ users: {
2141
+ id: string;
2142
+ email: string;
2143
+ name: string | null;
2144
+ userType: string;
2145
+ agentMetadata: AgentMetadata | null;
2146
+ createdAt: string;
2147
+ workspaceMembershipCount: number;
2148
+ }[];
2149
+ pagination: {
2150
+ total: number;
2151
+ limit: number;
2152
+ offset: number;
2153
+ hasMore: boolean;
2154
+ };
2155
+ };
2156
+ meta: object;
2157
+ }>;
2089
2158
  }>>;
2090
2159
  hub: import("@trpc/server").TRPCBuiltRouter<{
2091
2160
  ctx: Context;
@@ -2182,13 +2251,22 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2182
2251
  scope: string[];
2183
2252
  hubId?: string | undefined;
2184
2253
  expiresInDays?: number | undefined;
2254
+ workspaceId?: string | undefined;
2185
2255
  };
2186
2256
  output: {
2187
2257
  id: `${string}-${string}-${string}-${string}-${string}`;
2188
2258
  key: string;
2189
2259
  keyPrefix: string;
2190
- status: string;
2260
+ status: "proposed";
2261
+ proposalId: string;
2262
+ message?: undefined;
2263
+ } | {
2264
+ id: any;
2265
+ key: string;
2266
+ keyPrefix: string;
2267
+ status: "created";
2191
2268
  message: string;
2269
+ proposalId?: undefined;
2192
2270
  };
2193
2271
  meta: object;
2194
2272
  }>;
@@ -2196,20 +2274,36 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2196
2274
  input: {
2197
2275
  keyId: string;
2198
2276
  reason?: string | undefined;
2277
+ workspaceId?: string | undefined;
2199
2278
  };
2200
2279
  output: {
2201
- status: string;
2202
- message: string;
2280
+ status: "proposed";
2281
+ proposalId: string;
2282
+ } | {
2283
+ status: "revoked";
2284
+ proposalId?: undefined;
2203
2285
  };
2204
2286
  meta: object;
2205
2287
  }>;
2206
2288
  rotate: import("@trpc/server").TRPCMutationProcedure<{
2207
2289
  input: {
2208
2290
  keyId: string;
2291
+ workspaceId?: string | undefined;
2209
2292
  };
2210
2293
  output: {
2211
- status: string;
2294
+ id: string;
2295
+ key: string;
2296
+ keyPrefix: string;
2297
+ status: "proposed";
2298
+ proposalId: string;
2299
+ message?: undefined;
2300
+ } | {
2301
+ id: any;
2302
+ key: string;
2303
+ keyPrefix: string;
2304
+ status: "rotated";
2212
2305
  message: string;
2306
+ proposalId?: undefined;
2213
2307
  };
2214
2308
  meta: object;
2215
2309
  }>;
@@ -2279,11 +2373,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2279
2373
  timestamp: string;
2280
2374
  checks: {
2281
2375
  database: string;
2282
- inngest: string;
2376
+ jobQueue: string;
2283
2377
  };
2284
2378
  details: {
2285
2379
  database: any;
2286
- inngest: any;
2380
+ jobQueue: any;
2287
2381
  };
2288
2382
  };
2289
2383
  meta: object;
@@ -2405,12 +2499,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2405
2499
  content?: string | undefined;
2406
2500
  type?: "code" | "text" | "markdown" | "pdf" | "docx" | undefined;
2407
2501
  projectId?: string | undefined;
2502
+ workspaceId?: string | undefined;
2408
2503
  };
2409
2504
  output: {
2410
2505
  status: string;
2411
2506
  message: string;
2412
2507
  document: {
2413
- id: `${string}-${string}-${string}-${string}-${string}`;
2508
+ id: string;
2414
2509
  title: string;
2415
2510
  };
2416
2511
  };
@@ -2424,11 +2519,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2424
2519
  language?: string | undefined;
2425
2520
  mimeType?: string | undefined;
2426
2521
  projectId?: string | undefined;
2522
+ workspaceId?: string | undefined;
2427
2523
  };
2428
2524
  output: {
2429
2525
  status: string;
2430
2526
  message: string;
2431
- documentId: `${string}-${string}-${string}-${string}-${string}`;
2527
+ documentId: string;
2432
2528
  };
2433
2529
  meta: object;
2434
2530
  }>;
@@ -2452,6 +2548,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2452
2548
  lastSavedVersion: number;
2453
2549
  workingState: string | null;
2454
2550
  workingStateUpdatedAt: Date | null;
2551
+ entityId: string | null;
2455
2552
  metadata: unknown;
2456
2553
  createdAt: Date;
2457
2554
  updatedAt: Date;
@@ -2464,11 +2561,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2464
2561
  update: import("@trpc/server").TRPCMutationProcedure<{
2465
2562
  input: {
2466
2563
  documentId: string;
2467
- version: number;
2468
2564
  delta?: {
2469
2565
  content: string;
2470
2566
  }[] | undefined;
2567
+ version?: number | undefined;
2471
2568
  message?: string | undefined;
2569
+ title?: string | undefined;
2472
2570
  };
2473
2571
  output: {
2474
2572
  version: number;
@@ -2553,6 +2651,19 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2553
2651
  };
2554
2652
  meta: object;
2555
2653
  }>;
2654
+ endSession: import("@trpc/server").TRPCMutationProcedure<{
2655
+ input: {
2656
+ sessionId: string;
2657
+ };
2658
+ output: {
2659
+ success: boolean;
2660
+ alreadyEnded: boolean;
2661
+ } | {
2662
+ success: boolean;
2663
+ alreadyEnded?: undefined;
2664
+ };
2665
+ meta: object;
2666
+ }>;
2556
2667
  list: import("@trpc/server").TRPCQueryProcedure<{
2557
2668
  input: {
2558
2669
  projectId?: string | undefined;
@@ -2575,6 +2686,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2575
2686
  lastSavedVersion: number;
2576
2687
  workingState: string | null;
2577
2688
  workingStateUpdatedAt: Date | null;
2689
+ entityId: string | null;
2578
2690
  metadata: unknown;
2579
2691
  createdAt: Date;
2580
2692
  updatedAt: Date;
@@ -2594,7 +2706,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2594
2706
  createFromText: import("@trpc/server").TRPCMutationProcedure<{
2595
2707
  input: {
2596
2708
  content: string;
2597
- targetType: "task" | "note";
2709
+ targetType: "note" | "task";
2598
2710
  metadata?: {
2599
2711
  title?: string | undefined;
2600
2712
  tags?: string[] | undefined;
@@ -2613,7 +2725,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2613
2725
  file: string;
2614
2726
  filename: string;
2615
2727
  contentType: string;
2616
- targetType: "document" | "note";
2728
+ targetType: "note" | "document";
2617
2729
  metadata?: {
2618
2730
  title?: string | undefined;
2619
2731
  description?: string | undefined;
@@ -2800,7 +2912,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2800
2912
  updateStatus: import("@trpc/server").TRPCMutationProcedure<{
2801
2913
  input: {
2802
2914
  id: string;
2803
- status: "archived" | "snoozed" | "read";
2915
+ status: "read" | "archived" | "snoozed";
2804
2916
  snoozedUntil?: unknown;
2805
2917
  };
2806
2918
  output: {
@@ -3131,7 +3243,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3131
3243
  errorMessage: string | null;
3132
3244
  startedAt: Date;
3133
3245
  threadId: string;
3134
- status: "completed" | "running" | "failed";
3246
+ status: "completed" | "failed" | "running";
3135
3247
  commandId: string;
3136
3248
  permissionsSnapshot: Record<string, unknown> | null;
3137
3249
  inputs: Record<string, unknown> | null;
@@ -3157,7 +3269,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3157
3269
  errorMessage: string | null;
3158
3270
  startedAt: Date;
3159
3271
  threadId: string;
3160
- status: "completed" | "running" | "failed";
3272
+ status: "completed" | "failed" | "running";
3161
3273
  commandId: string;
3162
3274
  permissionsSnapshot: Record<string, unknown> | null;
3163
3275
  inputs: Record<string, unknown> | null;
@@ -3233,32 +3345,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3233
3345
  entities: import("@trpc/server").TRPCQueryProcedure<{
3234
3346
  input: {
3235
3347
  query: string;
3236
- type?: "task" | "document" | "project" | "note" | undefined;
3348
+ type?: "note" | "task" | "document" | "project" | undefined;
3237
3349
  limit?: number | undefined;
3238
3350
  };
3239
3351
  output: {
3240
- entities: {
3241
- workspaceId: string;
3242
- userId: string;
3243
- id: string;
3244
- updatedAt: Date;
3245
- createdAt: Date;
3246
- type: string;
3247
- profileId: string | null;
3248
- title: string | null;
3249
- preview: string | null;
3250
- documentId: string | null;
3251
- properties: unknown;
3252
- version: number;
3253
- deletedAt: Date | null;
3254
- }[];
3352
+ entities: any[];
3255
3353
  };
3256
3354
  meta: object;
3257
3355
  }>;
3258
3356
  semantic: import("@trpc/server").TRPCQueryProcedure<{
3259
3357
  input: {
3260
3358
  query: string;
3261
- type?: "task" | "document" | "project" | "note" | undefined;
3359
+ type?: "note" | "task" | "document" | "project" | undefined;
3262
3360
  limit?: number | undefined;
3263
3361
  threshold?: number | undefined;
3264
3362
  };
@@ -3275,7 +3373,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3275
3373
  };
3276
3374
  output: {
3277
3375
  entities: {
3278
- workspaceId: string;
3376
+ workspaceId: string | null;
3279
3377
  userId: string;
3280
3378
  id: string;
3281
3379
  updatedAt: Date;
@@ -3352,7 +3450,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3352
3450
  };
3353
3451
  output: {
3354
3452
  entities: {
3355
- workspaceId: string;
3453
+ workspaceId: string | null;
3356
3454
  userId: string;
3357
3455
  id: string;
3358
3456
  updatedAt: Date;
@@ -3385,24 +3483,32 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3385
3483
  input: {
3386
3484
  sourceEntityId: string;
3387
3485
  targetEntityId: string;
3388
- type: "created_by" | "depends_on" | "assigned_to" | "mentions" | "links_to" | "parent_of" | "relates_to" | "tagged_with" | "attended_by" | "blocks" | "belongs_to_project" | "embedded_in" | "visualized_in" | "references";
3389
- workspaceId: string;
3486
+ type: string;
3390
3487
  metadata?: Record<string, any> | undefined;
3488
+ workspaceId?: string | undefined;
3391
3489
  };
3392
3490
  output: {
3393
- id: `${string}-${string}-${string}-${string}-${string}`;
3394
- status: string;
3395
- message: string;
3491
+ status: "proposed";
3492
+ proposalId: string;
3493
+ id?: undefined;
3494
+ } | {
3495
+ id: string;
3496
+ status: "created";
3497
+ proposalId?: undefined;
3396
3498
  };
3397
3499
  meta: object;
3398
3500
  }>;
3399
3501
  delete: import("@trpc/server").TRPCMutationProcedure<{
3400
3502
  input: {
3401
3503
  id: string;
3504
+ workspaceId?: string | undefined;
3402
3505
  };
3403
3506
  output: {
3404
- status: string;
3405
- message: string;
3507
+ status: "proposed";
3508
+ proposalId: string;
3509
+ } | {
3510
+ status: "deleted";
3511
+ proposalId?: undefined;
3406
3512
  };
3407
3513
  meta: object;
3408
3514
  }>;
@@ -3422,7 +3528,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3422
3528
  };
3423
3529
  output: {
3424
3530
  entity: {
3425
- workspaceId: string;
3531
+ workspaceId: string | null;
3426
3532
  userId: string;
3427
3533
  id: string;
3428
3534
  updatedAt: Date;
@@ -3441,7 +3547,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3441
3547
  stats: null;
3442
3548
  } | {
3443
3549
  entity: {
3444
- workspaceId: string;
3550
+ workspaceId: string | null;
3445
3551
  userId: string;
3446
3552
  id: string;
3447
3553
  updatedAt: Date;
@@ -3483,7 +3589,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3483
3589
  };
3484
3590
  output: {
3485
3591
  entities: {
3486
- workspaceId: string;
3592
+ workspaceId: string | null;
3487
3593
  userId: string;
3488
3594
  id: string;
3489
3595
  updatedAt: Date;
@@ -3553,9 +3659,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3553
3659
  type?: "enterprise" | "personal" | "team" | undefined;
3554
3660
  };
3555
3661
  output: {
3556
- status: string;
3662
+ status: "proposed";
3663
+ proposalId: string;
3664
+ message: string;
3665
+ workspaceId?: undefined;
3666
+ } | {
3667
+ status: "created";
3668
+ workspaceId: string;
3557
3669
  message: string;
3558
- workspaceId: `${string}-${string}-${string}-${string}-${string}`;
3670
+ proposalId?: undefined;
3559
3671
  };
3560
3672
  meta: object;
3561
3673
  }>;
@@ -3606,8 +3718,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3606
3718
  settings?: Record<string, unknown> | undefined;
3607
3719
  };
3608
3720
  output: {
3609
- status: string;
3721
+ status: "proposed";
3722
+ proposalId: string;
3723
+ message: string;
3724
+ } | {
3725
+ status: "updated";
3610
3726
  message: string;
3727
+ proposalId?: undefined;
3611
3728
  };
3612
3729
  meta: object;
3613
3730
  }>;
@@ -3617,8 +3734,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3617
3734
  serviceId: string | null;
3618
3735
  };
3619
3736
  output: {
3620
- status: string;
3737
+ status: "proposed";
3738
+ proposalId: string;
3621
3739
  message: string;
3740
+ } | {
3741
+ status: "updated";
3742
+ message: string;
3743
+ proposalId?: undefined;
3622
3744
  };
3623
3745
  meta: object;
3624
3746
  }>;
@@ -3627,8 +3749,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3627
3749
  id: string;
3628
3750
  };
3629
3751
  output: {
3630
- status: string;
3752
+ status: "proposed";
3753
+ proposalId: string;
3754
+ message: string;
3755
+ } | {
3756
+ status: "deleted";
3631
3757
  message: string;
3758
+ proposalId?: undefined;
3632
3759
  };
3633
3760
  meta: object;
3634
3761
  }>;
@@ -3639,8 +3766,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3639
3766
  role: "owner" | "editor" | "viewer";
3640
3767
  };
3641
3768
  output: {
3642
- status: string;
3769
+ status: "proposed";
3770
+ proposalId: string;
3643
3771
  message: string;
3772
+ memberId?: undefined;
3773
+ } | {
3774
+ status: "added";
3775
+ memberId: string;
3776
+ message: string;
3777
+ proposalId?: undefined;
3644
3778
  };
3645
3779
  meta: object;
3646
3780
  }>;
@@ -3664,7 +3798,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3664
3798
  avatarUrl: string | null;
3665
3799
  timezone: string;
3666
3800
  locale: string;
3667
- kratosIdentityId: string;
3801
+ userType: string;
3802
+ agentMetadata: AgentMetadata | null;
3803
+ kratosIdentityId: string | null;
3668
3804
  lastSyncedAt: Date | null;
3669
3805
  createdAt: Date;
3670
3806
  };
@@ -3677,8 +3813,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3677
3813
  userId: string;
3678
3814
  };
3679
3815
  output: {
3680
- status: string;
3816
+ status: "proposed";
3817
+ proposalId: string;
3818
+ message: string;
3819
+ } | {
3820
+ status: "removed";
3681
3821
  message: string;
3822
+ proposalId?: undefined;
3682
3823
  };
3683
3824
  meta: object;
3684
3825
  }>;
@@ -3689,8 +3830,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3689
3830
  role: "admin" | "editor" | "viewer";
3690
3831
  };
3691
3832
  output: {
3692
- status: string;
3833
+ status: "proposed";
3834
+ proposalId: string;
3693
3835
  message: string;
3836
+ } | {
3837
+ status: "updated";
3838
+ message: string;
3839
+ proposalId?: undefined;
3694
3840
  };
3695
3841
  meta: object;
3696
3842
  }>;
@@ -3733,7 +3879,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3733
3879
  token: string;
3734
3880
  };
3735
3881
  output: {
3736
- status: string;
3882
+ status: "accepted";
3737
3883
  workspaceId: string;
3738
3884
  message: string;
3739
3885
  };
@@ -3748,6 +3894,131 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3748
3894
  };
3749
3895
  meta: object;
3750
3896
  }>;
3897
+ createFromDefinition: import("@trpc/server").TRPCMutationProcedure<{
3898
+ input: {
3899
+ definition: {
3900
+ [x: string]: unknown;
3901
+ workspaceName?: string | undefined;
3902
+ description?: string | undefined;
3903
+ profiles?: {
3904
+ slug: string;
3905
+ displayName: string;
3906
+ icon?: string | undefined;
3907
+ color?: string | undefined;
3908
+ description?: string | undefined;
3909
+ scope?: string | undefined;
3910
+ properties?: {
3911
+ slug: string;
3912
+ valueType: string;
3913
+ label?: string | undefined;
3914
+ inputType?: string | undefined;
3915
+ placeholder?: string | undefined;
3916
+ enumValues?: string[] | undefined;
3917
+ constraints?: Record<string, unknown> | undefined;
3918
+ }[] | undefined;
3919
+ }[] | undefined;
3920
+ views?: {
3921
+ name: string;
3922
+ type: string;
3923
+ scopeProfileSlug?: string | undefined;
3924
+ scopeProfileSlugs?: string[] | undefined;
3925
+ config?: Record<string, unknown> | undefined;
3926
+ }[] | undefined;
3927
+ bentoLayout?: {
3928
+ widgetType: string;
3929
+ pos: {
3930
+ x: number;
3931
+ y: number;
3932
+ w: number;
3933
+ h: number;
3934
+ };
3935
+ config?: Record<string, unknown> | undefined;
3936
+ }[] | undefined;
3937
+ bentoViewBlocks?: {
3938
+ viewName: string;
3939
+ pos: {
3940
+ x: number;
3941
+ y: number;
3942
+ w: number;
3943
+ h: number;
3944
+ };
3945
+ kind?: "view" | undefined;
3946
+ overrides?: Record<string, unknown> | undefined;
3947
+ }[] | undefined;
3948
+ suggestedEntities?: {
3949
+ profileSlug: string;
3950
+ title: string;
3951
+ properties?: Record<string, unknown> | undefined;
3952
+ content?: string | undefined;
3953
+ }[] | undefined;
3954
+ suggestedRelations?: {
3955
+ sourceRef: string;
3956
+ targetRef: string;
3957
+ type: string;
3958
+ metadata?: Record<string, unknown> | undefined;
3959
+ }[] | undefined;
3960
+ displayTemplates?: {
3961
+ name: string;
3962
+ config: Record<string, unknown>;
3963
+ description?: string | undefined;
3964
+ entityType?: string | undefined;
3965
+ targetType?: string | undefined;
3966
+ isDefault?: boolean | undefined;
3967
+ }[] | undefined;
3968
+ layoutConfig?: {
3969
+ pinnedApps?: string[] | undefined;
3970
+ sidebarApps?: string[] | undefined;
3971
+ defaultView?: string | undefined;
3972
+ theme?: string | undefined;
3973
+ } | undefined;
3974
+ entityLinks?: {
3975
+ sourceProfileSlug: string;
3976
+ targetProfileSlug: string;
3977
+ type: string;
3978
+ label?: string | undefined;
3979
+ }[] | undefined;
3980
+ };
3981
+ packageSlug?: string | undefined;
3982
+ packageVersion?: string | undefined;
3983
+ workspaceName?: string | undefined;
3984
+ };
3985
+ output: {
3986
+ status: "created";
3987
+ workspaceId: string;
3988
+ profileIds: string[];
3989
+ viewIds: string[];
3990
+ entityIds: string[];
3991
+ };
3992
+ meta: object;
3993
+ }>;
3994
+ seedPlugin: import("@trpc/server").TRPCMutationProcedure<{
3995
+ input: {
3996
+ pluginId: string;
3997
+ definition?: unknown;
3998
+ };
3999
+ output: {
4000
+ status: "created";
4001
+ workspaceId: string;
4002
+ };
4003
+ meta: object;
4004
+ }>;
4005
+ previewInvite: import("@trpc/server").TRPCQueryProcedure<{
4006
+ input: {
4007
+ token: string;
4008
+ };
4009
+ output: {
4010
+ expired: true;
4011
+ workspaceName?: undefined;
4012
+ role?: undefined;
4013
+ expiresAt?: undefined;
4014
+ } | {
4015
+ expired: false;
4016
+ workspaceName: string;
4017
+ role: string;
4018
+ expiresAt: Date;
4019
+ } | null;
4020
+ meta: object;
4021
+ }>;
3751
4022
  }>>;
3752
4023
  views: import("@trpc/server").TRPCBuiltRouter<{
3753
4024
  ctx: Context;
@@ -3758,7 +4029,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3758
4029
  create: import("@trpc/server").TRPCMutationProcedure<{
3759
4030
  input: {
3760
4031
  name: string;
3761
- type: "calendar" | "list" | "table" | "whiteboard" | "graph" | "grid" | "timeline" | "kanban" | "gallery" | "gantt" | "mindmap" | "bento";
4032
+ type: "calendar" | "list" | "table" | "whiteboard" | "graph" | "timeline" | "grid" | "kanban" | "gallery" | "gantt" | "mindmap" | "flow" | "bento";
3762
4033
  workspaceId?: string | undefined;
3763
4034
  description?: string | undefined;
3764
4035
  scopeProfileIds?: string[] | undefined;
@@ -3775,33 +4046,54 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3775
4046
  embeddedViewIds?: string[] | undefined;
3776
4047
  metadata?: Record<string, any> | undefined;
3777
4048
  initialContent?: any;
4049
+ source?: "user" | "system" | "intelligence" | "ai" | undefined;
4050
+ reasoning?: string | undefined;
4051
+ agentUserId?: string | undefined;
3778
4052
  };
3779
4053
  output: {
4054
+ view: any;
4055
+ documentId: any;
4056
+ status: string;
4057
+ message: string;
4058
+ proposalId: string;
4059
+ } | {
3780
4060
  view: {
3781
- id: `${string}-${string}-${string}-${string}-${string}`;
3782
- workspaceId: string | undefined;
3783
- userId: string;
3784
- type: "calendar" | "list" | "table" | "whiteboard" | "graph" | "grid" | "timeline" | "kanban" | "gallery" | "gantt" | "mindmap" | "bento";
3785
- category: ViewCategory;
3786
4061
  name: string;
3787
- description: string | undefined;
3788
- documentId: string;
3789
- metadata: {
3790
- entityCount: number;
3791
- createdBy: string;
3792
- };
3793
- createdAt: Date;
4062
+ workspaceId: string | null;
4063
+ userId: string;
4064
+ id: string;
4065
+ query: unknown;
4066
+ columns: unknown;
3794
4067
  updatedAt: Date;
4068
+ createdAt: Date;
4069
+ type: string;
4070
+ metadata: unknown;
4071
+ documentId: string | null;
4072
+ description: string | null;
4073
+ category: string;
4074
+ scopeProfileIds: string[] | null;
4075
+ scopeMode: string | null;
4076
+ config: unknown;
4077
+ filter: unknown;
4078
+ sort: unknown;
4079
+ layoutConfig: unknown;
4080
+ yjsRoomId: string | null;
4081
+ thumbnailUrl: string | null;
4082
+ schemaSnapshot: unknown;
4083
+ snapshotUpdatedAt: Date | null;
4084
+ embeddedViewIds: string[] | null;
3795
4085
  };
3796
4086
  documentId: string;
3797
4087
  status: string;
4088
+ message?: undefined;
4089
+ proposalId?: undefined;
3798
4090
  };
3799
4091
  meta: object;
3800
4092
  }>;
3801
4093
  list: import("@trpc/server").TRPCQueryProcedure<{
3802
4094
  input: {
3803
4095
  workspaceId?: string | undefined;
3804
- type?: "calendar" | "list" | "table" | "whiteboard" | "all" | "graph" | "grid" | "timeline" | "kanban" | "gallery" | "gantt" | "mindmap" | undefined;
4096
+ type?: "calendar" | "list" | "table" | "whiteboard" | "all" | "graph" | "timeline" | "grid" | "kanban" | "gallery" | "gantt" | "mindmap" | undefined;
3805
4097
  };
3806
4098
  output: {
3807
4099
  name: string;
@@ -3970,7 +4262,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3970
4262
  entities: {
3971
4263
  id: string;
3972
4264
  userId: string;
3973
- workspaceId: string;
4265
+ workspaceId: string | null;
3974
4266
  profileId: string | null;
3975
4267
  type: string;
3976
4268
  title: string | null;
@@ -4027,11 +4319,37 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4027
4319
  embeddedViewIds?: string[] | undefined;
4028
4320
  schemaSnapshot?: Record<string, any> | undefined;
4029
4321
  snapshotUpdatedAt?: Date | undefined;
4030
- type?: "calendar" | "list" | "table" | "whiteboard" | "graph" | "grid" | "timeline" | "kanban" | "gallery" | "gantt" | "mindmap" | "bento" | undefined;
4322
+ type?: "calendar" | "list" | "table" | "whiteboard" | "graph" | "timeline" | "grid" | "kanban" | "gallery" | "gantt" | "mindmap" | "flow" | "bento" | undefined;
4031
4323
  };
4032
4324
  output: {
4033
4325
  status: string;
4034
4326
  message: string;
4327
+ view: {
4328
+ name: string;
4329
+ workspaceId: string | null;
4330
+ userId: string;
4331
+ id: string;
4332
+ query: unknown;
4333
+ columns: unknown;
4334
+ updatedAt: Date;
4335
+ createdAt: Date;
4336
+ type: string;
4337
+ metadata: unknown;
4338
+ documentId: string | null;
4339
+ description: string | null;
4340
+ category: string;
4341
+ scopeProfileIds: string[] | null;
4342
+ scopeMode: string | null;
4343
+ config: unknown;
4344
+ filter: unknown;
4345
+ sort: unknown;
4346
+ layoutConfig: unknown;
4347
+ yjsRoomId: string | null;
4348
+ thumbnailUrl: string | null;
4349
+ schemaSnapshot: unknown;
4350
+ snapshotUpdatedAt: Date | null;
4351
+ embeddedViewIds: string[] | null;
4352
+ };
4035
4353
  };
4036
4354
  meta: object;
4037
4355
  }>;
@@ -4102,7 +4420,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4102
4420
  } | undefined;
4103
4421
  animations?: {
4104
4422
  enabled?: boolean | undefined;
4105
- speed?: "slow" | "normal" | "fast" | undefined;
4423
+ speed?: "normal" | "slow" | "fast" | undefined;
4106
4424
  } | undefined;
4107
4425
  } | undefined;
4108
4426
  defaultTemplates?: Record<string, string> | undefined;
@@ -4118,7 +4436,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4118
4436
  compactMode?: boolean | undefined;
4119
4437
  fontSize?: string | undefined;
4120
4438
  animations?: boolean | undefined;
4121
- defaultView?: "list" | "grid" | "timeline" | undefined;
4439
+ defaultView?: "list" | "timeline" | "grid" | undefined;
4122
4440
  entityOpenMode?: "floating" | "side" | "modal" | undefined;
4123
4441
  } | undefined;
4124
4442
  graphPreferences?: {
@@ -4168,7 +4486,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4168
4486
  } | undefined;
4169
4487
  animations?: {
4170
4488
  enabled?: boolean | undefined;
4171
- speed?: "slow" | "normal" | "fast" | undefined;
4489
+ speed?: "normal" | "slow" | "fast" | undefined;
4172
4490
  } | undefined;
4173
4491
  } | undefined;
4174
4492
  };
@@ -4225,7 +4543,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4225
4543
  }>;
4226
4544
  setIntelligenceService: import("@trpc/server").TRPCMutationProcedure<{
4227
4545
  input: {
4228
- serviceId: string;
4546
+ serviceId: string | null;
4229
4547
  capability?: "default" | "chat" | "analysis" | undefined;
4230
4548
  };
4231
4549
  output: {
@@ -4284,9 +4602,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4284
4602
  filters?: Record<string, any> | undefined;
4285
4603
  };
4286
4604
  output: {
4287
- id: `${string}-${string}-${string}-${string}-${string}`;
4288
- status: string;
4289
- message: string;
4605
+ status: "proposed";
4606
+ proposalId: string;
4607
+ id?: undefined;
4608
+ } | {
4609
+ id: any;
4610
+ status: "created";
4611
+ proposalId?: undefined;
4290
4612
  };
4291
4613
  meta: object;
4292
4614
  }>;
@@ -4297,20 +4619,28 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4297
4619
  description?: string | undefined;
4298
4620
  permissions?: Record<string, any> | undefined;
4299
4621
  filters?: Record<string, any> | undefined;
4622
+ workspaceId?: string | undefined;
4300
4623
  };
4301
4624
  output: {
4302
- status: string;
4303
- message: string;
4625
+ status: "proposed";
4626
+ proposalId: string;
4627
+ } | {
4628
+ status: "updated";
4629
+ proposalId?: undefined;
4304
4630
  };
4305
4631
  meta: object;
4306
4632
  }>;
4307
4633
  delete: import("@trpc/server").TRPCMutationProcedure<{
4308
4634
  input: {
4309
4635
  id: string;
4636
+ workspaceId?: string | undefined;
4310
4637
  };
4311
4638
  output: {
4312
- status: string;
4313
- message: string;
4639
+ status: "proposed";
4640
+ proposalId: string;
4641
+ } | {
4642
+ status: "deleted";
4643
+ proposalId?: undefined;
4314
4644
  };
4315
4645
  meta: object;
4316
4646
  }>;
@@ -4364,7 +4694,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4364
4694
  };
4365
4695
  output: {
4366
4696
  resource: {
4367
- workspaceId: string;
4697
+ workspaceId: string | null;
4368
4698
  userId: string;
4369
4699
  id: string;
4370
4700
  updatedAt: Date;
@@ -4929,8 +5259,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4929
5259
  };
4930
5260
  output: {
4931
5261
  id: `${string}-${string}-${string}-${string}-${string}`;
4932
- success: boolean;
4933
- message: string;
5262
+ status: "proposed";
5263
+ proposalId: string;
5264
+ } | {
5265
+ id: string;
5266
+ status: "created";
5267
+ proposalId?: undefined;
4934
5268
  };
4935
5269
  meta: object;
4936
5270
  }>;
@@ -4946,8 +5280,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4946
5280
  timeoutSeconds?: number | undefined;
4947
5281
  };
4948
5282
  output: {
4949
- success: boolean;
4950
- message: string;
5283
+ status: "proposed";
5284
+ proposalId: string;
5285
+ } | {
5286
+ status: "updated";
5287
+ proposalId?: undefined;
4951
5288
  };
4952
5289
  meta: object;
4953
5290
  }>;
@@ -4956,8 +5293,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4956
5293
  id: string;
4957
5294
  };
4958
5295
  output: {
4959
- success: boolean;
4960
- message: string;
5296
+ status: "proposed";
5297
+ proposalId: string;
5298
+ } | {
5299
+ status: "deleted";
5300
+ proposalId?: undefined;
4961
5301
  };
4962
5302
  meta: object;
4963
5303
  }>;
@@ -5002,8 +5342,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5002
5342
  };
5003
5343
  output: {
5004
5344
  id: `${string}-${string}-${string}-${string}-${string}`;
5005
- success: boolean;
5006
- message: string;
5345
+ status: "proposed";
5346
+ proposalId: string;
5347
+ } | {
5348
+ id: string;
5349
+ status: "created";
5350
+ proposalId?: undefined;
5007
5351
  };
5008
5352
  meta: object;
5009
5353
  }>;
@@ -5018,8 +5362,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5018
5362
  status?: "error" | "active" | "paused" | undefined;
5019
5363
  };
5020
5364
  output: {
5021
- success: boolean;
5022
- message: string;
5365
+ status: "proposed";
5366
+ proposalId: string;
5367
+ } | {
5368
+ status: "updated";
5369
+ proposalId?: undefined;
5023
5370
  };
5024
5371
  meta: object;
5025
5372
  }>;
@@ -5028,8 +5375,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5028
5375
  id: string;
5029
5376
  };
5030
5377
  output: {
5031
- success: boolean;
5032
- message: string;
5378
+ status: "proposed";
5379
+ proposalId: string;
5380
+ } | {
5381
+ status: "deleted";
5382
+ proposalId?: undefined;
5033
5383
  };
5034
5384
  meta: object;
5035
5385
  }>;
@@ -5222,6 +5572,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5222
5572
  parentProfileId?: string | undefined;
5223
5573
  uiHints?: Record<string, unknown> | undefined;
5224
5574
  scope?: "workspace" | "user" | "system" | undefined;
5575
+ source?: "user" | "system" | "intelligence" | "ai" | undefined;
5576
+ reasoning?: string | undefined;
5577
+ agentUserId?: string | undefined;
5225
5578
  };
5226
5579
  output: {
5227
5580
  profile: {
@@ -5238,6 +5591,35 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5238
5591
  displayName: string;
5239
5592
  parentProfileId: string | null;
5240
5593
  };
5594
+ existing: boolean;
5595
+ status?: undefined;
5596
+ message?: undefined;
5597
+ proposalId?: undefined;
5598
+ } | {
5599
+ profile: any;
5600
+ status: string;
5601
+ message: string;
5602
+ proposalId: string;
5603
+ existing?: undefined;
5604
+ } | {
5605
+ profile: {
5606
+ workspaceId: string | null;
5607
+ userId: string | null;
5608
+ id: string;
5609
+ updatedAt: Date;
5610
+ createdAt: Date;
5611
+ version: number;
5612
+ isActive: boolean;
5613
+ scope: ProfileScope;
5614
+ slug: string;
5615
+ uiHints: unknown;
5616
+ displayName: string;
5617
+ parentProfileId: string | null;
5618
+ };
5619
+ existing?: undefined;
5620
+ status?: undefined;
5621
+ message?: undefined;
5622
+ proposalId?: undefined;
5241
5623
  };
5242
5624
  meta: object;
5243
5625
  }>;
@@ -5348,7 +5730,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5348
5730
  create: import("@trpc/server").TRPCMutationProcedure<{
5349
5731
  input: {
5350
5732
  slug: string;
5351
- valueType: "string" | "number" | "boolean" | "object" | "array" | "date" | "entity_id";
5733
+ valueType: "string" | "number" | "boolean" | "object" | "array" | "date" | "secret" | "entity_id";
5352
5734
  constraints?: Record<string, unknown> | undefined;
5353
5735
  uiHints?: Record<string, unknown> | undefined;
5354
5736
  };
@@ -5362,6 +5744,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5362
5744
  constraints: unknown;
5363
5745
  uiHints: unknown;
5364
5746
  };
5747
+ existing: boolean;
5748
+ } | {
5749
+ propertyDef: {
5750
+ id: string;
5751
+ updatedAt: Date;
5752
+ createdAt: Date;
5753
+ slug: string;
5754
+ valueType: PropertyValueType;
5755
+ constraints: unknown;
5756
+ uiHints: unknown;
5757
+ };
5758
+ existing?: undefined;
5365
5759
  };
5366
5760
  meta: object;
5367
5761
  }>;
@@ -5369,7 +5763,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5369
5763
  input: {
5370
5764
  id: string;
5371
5765
  slug?: string | undefined;
5372
- valueType?: "string" | "number" | "boolean" | "object" | "array" | "date" | "entity_id" | undefined;
5766
+ valueType?: "string" | "number" | "boolean" | "object" | "array" | "date" | "secret" | "entity_id" | undefined;
5373
5767
  constraints?: Record<string, unknown> | undefined;
5374
5768
  uiHints?: Record<string, unknown> | undefined;
5375
5769
  };
@@ -5460,6 +5854,179 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5460
5854
  meta: object;
5461
5855
  }>;
5462
5856
  }>>;
5857
+ relationDefs: import("@trpc/server").TRPCBuiltRouter<{
5858
+ ctx: Context;
5859
+ meta: object;
5860
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
5861
+ transformer: true;
5862
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
5863
+ list: import("@trpc/server").TRPCQueryProcedure<{
5864
+ input: void;
5865
+ output: {
5866
+ relationDefs: {
5867
+ workspaceId: string;
5868
+ userId: string;
5869
+ id: string;
5870
+ updatedAt: Date;
5871
+ createdAt: Date;
5872
+ description: string | null;
5873
+ slug: string;
5874
+ uiHints: unknown;
5875
+ displayName: string;
5876
+ isDirectional: boolean;
5877
+ }[];
5878
+ };
5879
+ meta: object;
5880
+ }>;
5881
+ create: import("@trpc/server").TRPCMutationProcedure<{
5882
+ input: {
5883
+ slug: string;
5884
+ displayName: string;
5885
+ description?: string | undefined;
5886
+ uiHints?: Record<string, unknown> | undefined;
5887
+ isDirectional?: boolean | undefined;
5888
+ };
5889
+ output: {
5890
+ relationDef: {
5891
+ workspaceId: string;
5892
+ userId: string;
5893
+ id: string;
5894
+ updatedAt: Date;
5895
+ createdAt: Date;
5896
+ description: string | null;
5897
+ slug: string;
5898
+ uiHints: unknown;
5899
+ displayName: string;
5900
+ isDirectional: boolean;
5901
+ };
5902
+ };
5903
+ meta: object;
5904
+ }>;
5905
+ delete: import("@trpc/server").TRPCMutationProcedure<{
5906
+ input: {
5907
+ id: string;
5908
+ };
5909
+ output: {
5910
+ success: boolean;
5911
+ };
5912
+ meta: object;
5913
+ }>;
5914
+ }>>;
5915
+ profileRelations: import("@trpc/server").TRPCBuiltRouter<{
5916
+ ctx: Context;
5917
+ meta: object;
5918
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
5919
+ transformer: true;
5920
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
5921
+ link: import("@trpc/server").TRPCMutationProcedure<{
5922
+ input: {
5923
+ sourceProfileId: string;
5924
+ targetProfileId: string;
5925
+ relationDefId: string;
5926
+ displayOrder?: number | undefined;
5927
+ metadata?: Record<string, unknown> | undefined;
5928
+ };
5929
+ output: {
5930
+ link: {
5931
+ metadata: unknown;
5932
+ displayOrder: number;
5933
+ sourceProfileId: string;
5934
+ targetProfileId: string;
5935
+ relationDefId: string;
5936
+ };
5937
+ };
5938
+ meta: object;
5939
+ }>;
5940
+ unlink: import("@trpc/server").TRPCMutationProcedure<{
5941
+ input: {
5942
+ sourceProfileId: string;
5943
+ targetProfileId: string;
5944
+ relationDefId: string;
5945
+ };
5946
+ output: {
5947
+ success: boolean;
5948
+ };
5949
+ meta: object;
5950
+ }>;
5951
+ getByProfile: import("@trpc/server").TRPCQueryProcedure<{
5952
+ input: {
5953
+ profileId: string;
5954
+ };
5955
+ output: {
5956
+ relations: {
5957
+ metadata: unknown;
5958
+ displayOrder: number;
5959
+ sourceProfileId: string;
5960
+ targetProfileId: string;
5961
+ relationDefId: string;
5962
+ }[];
5963
+ };
5964
+ meta: object;
5965
+ }>;
5966
+ }>>;
5967
+ agentUsers: import("@trpc/server").TRPCBuiltRouter<{
5968
+ ctx: Context;
5969
+ meta: object;
5970
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
5971
+ transformer: true;
5972
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
5973
+ create: import("@trpc/server").TRPCMutationProcedure<{
5974
+ input: {
5975
+ workspaceId: string;
5976
+ agentType: string;
5977
+ name: string;
5978
+ role: "admin" | "editor" | "viewer";
5979
+ description?: string | undefined;
5980
+ capabilities?: string[] | undefined;
5981
+ };
5982
+ output: {
5983
+ id: `${string}-${string}-${string}-${string}-${string}`;
5984
+ email: string;
5985
+ name: string;
5986
+ agentType: string;
5987
+ role: "admin" | "editor" | "viewer";
5988
+ };
5989
+ meta: object;
5990
+ }>;
5991
+ list: import("@trpc/server").TRPCQueryProcedure<{
5992
+ input: {
5993
+ workspaceId: string;
5994
+ };
5995
+ output: {
5996
+ id: string;
5997
+ name: string | null;
5998
+ email: string;
5999
+ agentMetadata: AgentMetadata | null;
6000
+ role: string;
6001
+ joinedAt: Date;
6002
+ }[];
6003
+ meta: object;
6004
+ }>;
6005
+ update: import("@trpc/server").TRPCMutationProcedure<{
6006
+ input: {
6007
+ workspaceId: string;
6008
+ agentUserId: string;
6009
+ name?: string | undefined;
6010
+ role?: "admin" | "editor" | "viewer" | undefined;
6011
+ description?: string | undefined;
6012
+ capabilities?: string[] | undefined;
6013
+ };
6014
+ output: {
6015
+ status: "updated";
6016
+ };
6017
+ meta: object;
6018
+ }>;
6019
+ remove: import("@trpc/server").TRPCMutationProcedure<{
6020
+ input: {
6021
+ workspaceId: string;
6022
+ agentUserId: string;
6023
+ };
6024
+ output: {
6025
+ status: "removed";
6026
+ };
6027
+ meta: object;
6028
+ }>;
6029
+ }>>;
5463
6030
  }>>;
5464
6031
  export type AppRouter = typeof coreRouter;
5465
6032