@synap-core/api-types 1.4.1 → 1.5.0

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.
@@ -57,6 +57,20 @@ export interface Context {
57
57
  workspaceId?: string | null;
58
58
  workspaceRole?: string | null;
59
59
  }
60
+ /**
61
+ * Users Table - Cache for Kratos Identity Data
62
+ *
63
+ * Purpose: Store Kratos identity data in Synap DB for performance
64
+ * - Allows JOINs without calling Kratos API
65
+ * - Can add Synap-specific fields (avatar, timezone)
66
+ * - Kratos remains source of truth for authentication
67
+ */
68
+ export interface AgentMetadata {
69
+ agentType: string;
70
+ description?: string;
71
+ createdByUserId: string;
72
+ capabilities?: string[];
73
+ }
60
74
  declare enum ChatThreadType {
61
75
  MAIN = "main",
62
76
  BRANCH = "branch"
@@ -73,7 +87,9 @@ declare enum ChatThreadAgentType {
73
87
  KNOWLEDGE_SEARCH = "knowledge-search",
74
88
  CODE = "code",
75
89
  WRITING = "writing",
76
- ACTION = "action"
90
+ ACTION = "action",
91
+ ONBOARDING = "onboarding",
92
+ WORKSPACE_CREATION = "workspace-creation"
77
93
  }
78
94
  declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
79
95
  name: "chat_threads";
@@ -287,7 +303,9 @@ declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
287
303
  ChatThreadAgentType.KNOWLEDGE_SEARCH,
288
304
  ChatThreadAgentType.CODE,
289
305
  ChatThreadAgentType.WRITING,
290
- ChatThreadAgentType.ACTION
306
+ ChatThreadAgentType.ACTION,
307
+ ChatThreadAgentType.ONBOARDING,
308
+ ChatThreadAgentType.WORKSPACE_CREATION
291
309
  ];
292
310
  baseColumn: never;
293
311
  identity: undefined;
@@ -446,11 +464,18 @@ export interface InputOverride {
446
464
  * - Team (multiple users with roles)
447
465
  * - Enterprise (advanced features)
448
466
  */
467
+ export interface WorkspaceLayoutConfig {
468
+ pinnedApps?: string[];
469
+ sidebarApps?: string[];
470
+ defaultView?: string;
471
+ theme?: string;
472
+ }
449
473
  export interface WorkspaceSettings {
450
474
  defaultEntityTypes?: string[];
451
475
  theme?: string;
452
476
  aiEnabled?: boolean;
453
477
  allowExternalSharing?: boolean;
478
+ layout?: WorkspaceLayoutConfig;
454
479
  mainWhiteboardId?: string;
455
480
  intelligenceServiceId?: string;
456
481
  intelligenceServiceOverrides?: {
@@ -474,11 +499,25 @@ export interface WorkspaceSettings {
474
499
  };
475
500
  };
476
501
  };
502
+ /** Name of the template used to seed this workspace. When set, workspace-init skips default views. */
503
+ templateName?: string;
504
+ /** Slug of the control plane package used to create this workspace. */
505
+ packageSlug?: string;
506
+ /** Version of the package at time of creation. */
507
+ packageVersion?: string;
508
+ /** Who/what created this workspace: user, control-plane provisioning, or plugin seed */
509
+ createdBy?: "user" | "provisioning" | "plugin";
510
+ /** ISO timestamp when provisioning created this workspace */
511
+ provisionedAt?: string;
512
+ /** Current provisioning status */
513
+ provisioningStatus?: "pending" | "active" | "failed";
477
514
  aiGovernance?: {
478
515
  autoApprove?: boolean;
479
516
  requireReviewFor?: string[];
480
517
  maxAgentsPerUser?: number;
481
518
  allowAgentCreation?: boolean;
519
+ /** Who can approve AI proposals. Default: "owner_and_admins" */
520
+ proposalApprovalPolicy?: "owner_and_admins" | "any_editor" | "admins_only";
482
521
  };
483
522
  }
484
523
  declare enum ProposalStatus {
@@ -680,7 +719,8 @@ declare enum PropertyValueType {
680
719
  DATE = "date",
681
720
  ENTITY_ID = "entity_id",
682
721
  ARRAY = "array",
683
- OBJECT = "object"
722
+ OBJECT = "object",
723
+ SECRET = "secret"
684
724
  }
685
725
  declare const propertyDefs: import("drizzle-orm/pg-core").PgTableWithColumns<{
686
726
  name: "property_defs";
@@ -742,7 +782,8 @@ declare const propertyDefs: import("drizzle-orm/pg-core").PgTableWithColumns<{
742
782
  PropertyValueType.DATE,
743
783
  PropertyValueType.ENTITY_ID,
744
784
  PropertyValueType.ARRAY,
745
- PropertyValueType.OBJECT
785
+ PropertyValueType.OBJECT,
786
+ PropertyValueType.SECRET
746
787
  ];
747
788
  baseColumn: never;
748
789
  identity: undefined;
@@ -928,19 +969,6 @@ export interface EntityQuery {
928
969
  /** Group by field (for kanban, timeline) */
929
970
  groupBy?: string;
930
971
  }
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
972
  declare enum AgentType {
945
973
  DEFAULT = "default",
946
974
  META = "meta",
@@ -1218,16 +1246,77 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1218
1246
  description?: string | undefined;
1219
1247
  properties?: Record<string, unknown> | undefined;
1220
1248
  documentId?: string | undefined;
1249
+ content?: string | undefined;
1250
+ global?: boolean | undefined;
1251
+ source?: "user" | "system" | "intelligence" | "ai" | undefined;
1252
+ reasoning?: string | undefined;
1253
+ agentUserId?: string | undefined;
1221
1254
  };
1222
1255
  output: {
1223
1256
  status: string;
1224
1257
  message: string;
1225
- id: string;
1258
+ id: `${string}-${string}-${string}-${string}-${string}`;
1226
1259
  entity: any;
1260
+ proposalId: string;
1261
+ } | {
1262
+ status: string;
1263
+ message: string;
1264
+ id: any;
1265
+ entity: {
1266
+ id: string;
1267
+ userId: string;
1268
+ workspaceId: string | null;
1269
+ type: string;
1270
+ profileId: string | null;
1271
+ title: string | null;
1272
+ preview: string | null;
1273
+ documentId: string | null;
1274
+ properties: Record<string, unknown>;
1275
+ fileUrl: string | null;
1276
+ filePath: string | null;
1277
+ fileSize: number | null;
1278
+ fileType: string | null;
1279
+ checksum: string | null;
1280
+ version: number;
1281
+ createdAt: Date;
1282
+ updatedAt: Date;
1283
+ deletedAt: Date | null;
1284
+ };
1285
+ proposalId?: undefined;
1227
1286
  };
1228
1287
  meta: object;
1229
1288
  }>;
1230
1289
  list: import("@trpc/server").TRPCQueryProcedure<{
1290
+ input: {
1291
+ profileSlug?: string | undefined;
1292
+ limit?: number | undefined;
1293
+ globalOnly?: boolean | undefined;
1294
+ };
1295
+ output: {
1296
+ entities: {
1297
+ id: string;
1298
+ userId: string;
1299
+ workspaceId: string | null;
1300
+ type: string;
1301
+ profileId: string | null;
1302
+ title: string | null;
1303
+ preview: string | null;
1304
+ documentId: string | null;
1305
+ properties: Record<string, unknown>;
1306
+ fileUrl: string | null;
1307
+ filePath: string | null;
1308
+ fileSize: number | null;
1309
+ fileType: string | null;
1310
+ checksum: string | null;
1311
+ version: number;
1312
+ createdAt: Date;
1313
+ updatedAt: Date;
1314
+ deletedAt: Date | null;
1315
+ }[];
1316
+ };
1317
+ meta: object;
1318
+ }>;
1319
+ listGlobal: import("@trpc/server").TRPCQueryProcedure<{
1231
1320
  input: {
1232
1321
  profileSlug?: string | undefined;
1233
1322
  limit?: number | undefined;
@@ -1298,9 +1387,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1298
1387
  get: import("@trpc/server").TRPCQueryProcedure<{
1299
1388
  input: {
1300
1389
  id: string;
1390
+ includeProfile?: boolean | undefined;
1301
1391
  };
1302
1392
  output: {
1303
1393
  entity: any;
1394
+ profile?: any;
1395
+ effectiveProperties?: any[] | undefined;
1304
1396
  };
1305
1397
  meta: object;
1306
1398
  }>;
@@ -1309,21 +1401,38 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1309
1401
  id: string;
1310
1402
  title?: string | undefined;
1311
1403
  description?: string | undefined;
1404
+ documentId?: string | null | undefined;
1312
1405
  properties?: Record<string, unknown> | undefined;
1406
+ source?: "user" | "system" | "intelligence" | "ai" | undefined;
1407
+ reasoning?: string | undefined;
1408
+ agentUserId?: string | undefined;
1313
1409
  };
1314
1410
  output: {
1315
1411
  status: string;
1316
1412
  message: string;
1413
+ proposalId: string;
1414
+ } | {
1415
+ status: string;
1416
+ message: string;
1417
+ proposalId?: undefined;
1317
1418
  };
1318
1419
  meta: object;
1319
1420
  }>;
1320
1421
  delete: import("@trpc/server").TRPCMutationProcedure<{
1321
1422
  input: {
1322
1423
  id: string;
1424
+ source?: "user" | "system" | "intelligence" | "ai" | undefined;
1425
+ reasoning?: string | undefined;
1426
+ agentUserId?: string | undefined;
1323
1427
  };
1324
1428
  output: {
1325
1429
  status: string;
1326
1430
  message: string;
1431
+ proposalId: string;
1432
+ } | {
1433
+ status: string;
1434
+ message: string;
1435
+ proposalId?: undefined;
1327
1436
  };
1328
1437
  meta: object;
1329
1438
  }>;
@@ -1339,12 +1448,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1339
1448
  parentThreadId?: string | undefined;
1340
1449
  branchPurpose?: string | undefined;
1341
1450
  agentId?: string | undefined;
1342
- agentType?: "code" | "action" | "meta" | "default" | "prompting" | "knowledge-search" | "writing" | undefined;
1451
+ agentType?: "code" | "action" | "meta" | "default" | "prompting" | "knowledge-search" | "writing" | "onboarding" | undefined;
1343
1452
  agentConfig?: Record<string, any> | undefined;
1344
1453
  inheritContext?: boolean | undefined;
1345
1454
  };
1346
1455
  output: {
1347
- threadId: undefined;
1456
+ threadId: `${string}-${string}-${string}-${string}-${string}`;
1348
1457
  status: string;
1349
1458
  message: string;
1350
1459
  thread?: undefined;
@@ -1374,11 +1483,27 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1374
1483
  };
1375
1484
  meta: object;
1376
1485
  }>;
1486
+ createDocumentComment: import("@trpc/server").TRPCMutationProcedure<{
1487
+ input: {
1488
+ documentId: string;
1489
+ position: {
1490
+ start: number;
1491
+ end: number;
1492
+ };
1493
+ content: string;
1494
+ };
1495
+ output: {
1496
+ threadId: `${string}-${string}-${string}-${string}-${string}`;
1497
+ messageId: `${string}-${string}-${string}-${string}-${string}`;
1498
+ };
1499
+ meta: object;
1500
+ }>;
1377
1501
  sendMessage: import("@trpc/server").TRPCMutationProcedure<{
1378
1502
  input: {
1379
1503
  content: string;
1380
1504
  threadId?: string | undefined;
1381
1505
  workspaceId?: string | undefined;
1506
+ agentType?: "code" | "action" | "meta" | "default" | "prompting" | "knowledge-search" | "writing" | "onboarding" | undefined;
1382
1507
  };
1383
1508
  output: {
1384
1509
  threadId: string;
@@ -1433,7 +1558,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1433
1558
  }[];
1434
1559
  executionSummaries: {
1435
1560
  tool: string;
1436
- status: "error" | "skipped" | "success";
1561
+ status: "error" | "success" | "skipped";
1437
1562
  result?: unknown;
1438
1563
  error?: string | undefined;
1439
1564
  }[];
@@ -1478,7 +1603,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1478
1603
  content: string;
1479
1604
  threadId: string;
1480
1605
  parentId: string | null;
1481
- role: "user" | "assistant" | "system";
1606
+ role: "user" | "system" | "assistant";
1482
1607
  previousHash: string | null;
1483
1608
  hash: string;
1484
1609
  }[];
@@ -1613,7 +1738,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1613
1738
  threadId: string;
1614
1739
  title?: string | undefined;
1615
1740
  agentId?: string | undefined;
1616
- agentType?: "code" | "action" | "meta" | "default" | "prompting" | "knowledge-search" | "writing" | undefined;
1741
+ agentType?: "code" | "action" | "meta" | "default" | "prompting" | "knowledge-search" | "writing" | "onboarding" | undefined;
1617
1742
  agentConfig?: Record<string, unknown> | undefined;
1618
1743
  };
1619
1744
  output: {
@@ -1704,7 +1829,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1704
1829
  getThreadContext: import("@trpc/server").TRPCQueryProcedure<{
1705
1830
  input: {
1706
1831
  threadId: string;
1707
- relationshipTypes?: ("used_as_context" | "created" | "updated" | "referenced" | "inherited_from_parent")[] | undefined;
1832
+ relationshipTypes?: ("created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent")[] | undefined;
1708
1833
  };
1709
1834
  output: {
1710
1835
  entities: {
@@ -1744,7 +1869,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1744
1869
  list: import("@trpc/server").TRPCQueryProcedure<{
1745
1870
  input: {
1746
1871
  workspaceId?: string | undefined;
1747
- targetType?: "entity" | "view" | "document" | "whiteboard" | undefined;
1872
+ targetType?: "entity" | "view" | "document" | "profile" | "whiteboard" | undefined;
1748
1873
  targetId?: string | undefined;
1749
1874
  status?: "pending" | "validated" | "rejected" | "all" | undefined;
1750
1875
  limit?: number | undefined;
@@ -1788,9 +1913,33 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1788
1913
  };
1789
1914
  meta: object;
1790
1915
  }>;
1916
+ batchApprove: import("@trpc/server").TRPCMutationProcedure<{
1917
+ input: {
1918
+ proposalIds: string[];
1919
+ comment?: string | undefined;
1920
+ };
1921
+ output: {
1922
+ results: {
1923
+ proposalId: string;
1924
+ success: boolean;
1925
+ error?: string;
1926
+ }[];
1927
+ };
1928
+ meta: object;
1929
+ }>;
1930
+ batchReject: import("@trpc/server").TRPCMutationProcedure<{
1931
+ input: {
1932
+ proposalIds: string[];
1933
+ reason?: string | undefined;
1934
+ };
1935
+ output: {
1936
+ success: boolean;
1937
+ };
1938
+ meta: object;
1939
+ }>;
1791
1940
  submit: import("@trpc/server").TRPCMutationProcedure<{
1792
1941
  input: {
1793
- targetType: "workspace" | "entity" | "view" | "document" | "relation";
1942
+ targetType: "workspace" | "entity" | "view" | "document" | "relation" | "profile";
1794
1943
  changeType: "create" | "update" | "delete";
1795
1944
  data: Record<string, any>;
1796
1945
  targetId?: string | undefined;
@@ -1798,12 +1947,24 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1798
1947
  };
1799
1948
  output: {
1800
1949
  success: boolean;
1801
- requestId: `${string}-${string}-${string}-${string}-${string}`;
1950
+ requestId: string;
1802
1951
  status: string;
1803
1952
  message: string;
1804
1953
  };
1805
1954
  meta: object;
1806
1955
  }>;
1956
+ createDocumentEdit: import("@trpc/server").TRPCMutationProcedure<{
1957
+ input: {
1958
+ documentId: string;
1959
+ from: number;
1960
+ to: number;
1961
+ replacementText: string;
1962
+ };
1963
+ output: {
1964
+ proposalId: string;
1965
+ };
1966
+ meta: object;
1967
+ }>;
1807
1968
  }>>;
1808
1969
  suggestions: import("@trpc/server").TRPCBuiltRouter<{
1809
1970
  ctx: Context;
@@ -2086,6 +2247,42 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2086
2247
  }[];
2087
2248
  meta: object;
2088
2249
  }>;
2250
+ getDataPodStats: import("@trpc/server").TRPCQueryProcedure<{
2251
+ input: void;
2252
+ output: {
2253
+ userCount: number;
2254
+ agentCount: number;
2255
+ workspaceCount: number;
2256
+ entityCount: number;
2257
+ documentCount: number;
2258
+ };
2259
+ meta: object;
2260
+ }>;
2261
+ listUsers: import("@trpc/server").TRPCQueryProcedure<{
2262
+ input: {
2263
+ type?: "all" | "human" | "agent" | undefined;
2264
+ limit?: number | undefined;
2265
+ offset?: number | undefined;
2266
+ };
2267
+ output: {
2268
+ users: {
2269
+ id: string;
2270
+ email: string;
2271
+ name: string | null;
2272
+ userType: string;
2273
+ agentMetadata: AgentMetadata | null;
2274
+ createdAt: string;
2275
+ workspaceMembershipCount: number;
2276
+ }[];
2277
+ pagination: {
2278
+ total: number;
2279
+ limit: number;
2280
+ offset: number;
2281
+ hasMore: boolean;
2282
+ };
2283
+ };
2284
+ meta: object;
2285
+ }>;
2089
2286
  }>>;
2090
2287
  hub: import("@trpc/server").TRPCBuiltRouter<{
2091
2288
  ctx: Context;
@@ -2182,13 +2379,22 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2182
2379
  scope: string[];
2183
2380
  hubId?: string | undefined;
2184
2381
  expiresInDays?: number | undefined;
2382
+ workspaceId?: string | undefined;
2185
2383
  };
2186
2384
  output: {
2187
2385
  id: `${string}-${string}-${string}-${string}-${string}`;
2188
2386
  key: string;
2189
2387
  keyPrefix: string;
2190
- status: string;
2388
+ status: "proposed";
2389
+ proposalId: string;
2390
+ message?: undefined;
2391
+ } | {
2392
+ id: any;
2393
+ key: string;
2394
+ keyPrefix: string;
2395
+ status: "created";
2191
2396
  message: string;
2397
+ proposalId?: undefined;
2192
2398
  };
2193
2399
  meta: object;
2194
2400
  }>;
@@ -2196,20 +2402,36 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2196
2402
  input: {
2197
2403
  keyId: string;
2198
2404
  reason?: string | undefined;
2405
+ workspaceId?: string | undefined;
2199
2406
  };
2200
2407
  output: {
2201
- status: string;
2202
- message: string;
2408
+ status: "proposed";
2409
+ proposalId: string;
2410
+ } | {
2411
+ status: "revoked";
2412
+ proposalId?: undefined;
2203
2413
  };
2204
2414
  meta: object;
2205
2415
  }>;
2206
2416
  rotate: import("@trpc/server").TRPCMutationProcedure<{
2207
2417
  input: {
2208
2418
  keyId: string;
2419
+ workspaceId?: string | undefined;
2209
2420
  };
2210
2421
  output: {
2211
- status: string;
2422
+ id: string;
2423
+ key: string;
2424
+ keyPrefix: string;
2425
+ status: "proposed";
2426
+ proposalId: string;
2427
+ message?: undefined;
2428
+ } | {
2429
+ id: any;
2430
+ key: string;
2431
+ keyPrefix: string;
2432
+ status: "rotated";
2212
2433
  message: string;
2434
+ proposalId?: undefined;
2213
2435
  };
2214
2436
  meta: object;
2215
2437
  }>;
@@ -2279,11 +2501,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2279
2501
  timestamp: string;
2280
2502
  checks: {
2281
2503
  database: string;
2282
- inngest: string;
2504
+ jobQueue: string;
2283
2505
  };
2284
2506
  details: {
2285
2507
  database: any;
2286
- inngest: any;
2508
+ jobQueue: any;
2287
2509
  };
2288
2510
  };
2289
2511
  meta: object;
@@ -2405,12 +2627,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2405
2627
  content?: string | undefined;
2406
2628
  type?: "code" | "text" | "markdown" | "pdf" | "docx" | undefined;
2407
2629
  projectId?: string | undefined;
2630
+ workspaceId?: string | undefined;
2408
2631
  };
2409
2632
  output: {
2410
2633
  status: string;
2411
2634
  message: string;
2412
2635
  document: {
2413
- id: `${string}-${string}-${string}-${string}-${string}`;
2636
+ id: string;
2414
2637
  title: string;
2415
2638
  };
2416
2639
  };
@@ -2424,11 +2647,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2424
2647
  language?: string | undefined;
2425
2648
  mimeType?: string | undefined;
2426
2649
  projectId?: string | undefined;
2650
+ workspaceId?: string | undefined;
2427
2651
  };
2428
2652
  output: {
2429
2653
  status: string;
2430
2654
  message: string;
2431
- documentId: `${string}-${string}-${string}-${string}-${string}`;
2655
+ documentId: string;
2432
2656
  };
2433
2657
  meta: object;
2434
2658
  }>;
@@ -2452,6 +2676,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2452
2676
  lastSavedVersion: number;
2453
2677
  workingState: string | null;
2454
2678
  workingStateUpdatedAt: Date | null;
2679
+ entityId: string | null;
2455
2680
  metadata: unknown;
2456
2681
  createdAt: Date;
2457
2682
  updatedAt: Date;
@@ -2464,11 +2689,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2464
2689
  update: import("@trpc/server").TRPCMutationProcedure<{
2465
2690
  input: {
2466
2691
  documentId: string;
2467
- version: number;
2468
2692
  delta?: {
2469
2693
  content: string;
2470
2694
  }[] | undefined;
2695
+ version?: number | undefined;
2471
2696
  message?: string | undefined;
2697
+ title?: string | undefined;
2472
2698
  };
2473
2699
  output: {
2474
2700
  version: number;
@@ -2553,6 +2779,19 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2553
2779
  };
2554
2780
  meta: object;
2555
2781
  }>;
2782
+ endSession: import("@trpc/server").TRPCMutationProcedure<{
2783
+ input: {
2784
+ sessionId: string;
2785
+ };
2786
+ output: {
2787
+ success: boolean;
2788
+ alreadyEnded: boolean;
2789
+ } | {
2790
+ success: boolean;
2791
+ alreadyEnded?: undefined;
2792
+ };
2793
+ meta: object;
2794
+ }>;
2556
2795
  list: import("@trpc/server").TRPCQueryProcedure<{
2557
2796
  input: {
2558
2797
  projectId?: string | undefined;
@@ -2575,6 +2814,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2575
2814
  lastSavedVersion: number;
2576
2815
  workingState: string | null;
2577
2816
  workingStateUpdatedAt: Date | null;
2817
+ entityId: string | null;
2578
2818
  metadata: unknown;
2579
2819
  createdAt: Date;
2580
2820
  updatedAt: Date;
@@ -2594,7 +2834,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2594
2834
  createFromText: import("@trpc/server").TRPCMutationProcedure<{
2595
2835
  input: {
2596
2836
  content: string;
2597
- targetType: "task" | "note";
2837
+ targetType: "note" | "task";
2598
2838
  metadata?: {
2599
2839
  title?: string | undefined;
2600
2840
  tags?: string[] | undefined;
@@ -2613,7 +2853,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2613
2853
  file: string;
2614
2854
  filename: string;
2615
2855
  contentType: string;
2616
- targetType: "document" | "note";
2856
+ targetType: "note" | "document";
2617
2857
  metadata?: {
2618
2858
  title?: string | undefined;
2619
2859
  description?: string | undefined;
@@ -2800,7 +3040,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2800
3040
  updateStatus: import("@trpc/server").TRPCMutationProcedure<{
2801
3041
  input: {
2802
3042
  id: string;
2803
- status: "archived" | "snoozed" | "read";
3043
+ status: "read" | "archived" | "snoozed";
2804
3044
  snoozedUntil?: unknown;
2805
3045
  };
2806
3046
  output: {
@@ -3131,7 +3371,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3131
3371
  errorMessage: string | null;
3132
3372
  startedAt: Date;
3133
3373
  threadId: string;
3134
- status: "completed" | "running" | "failed";
3374
+ status: "completed" | "failed" | "running";
3135
3375
  commandId: string;
3136
3376
  permissionsSnapshot: Record<string, unknown> | null;
3137
3377
  inputs: Record<string, unknown> | null;
@@ -3157,7 +3397,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3157
3397
  errorMessage: string | null;
3158
3398
  startedAt: Date;
3159
3399
  threadId: string;
3160
- status: "completed" | "running" | "failed";
3400
+ status: "completed" | "failed" | "running";
3161
3401
  commandId: string;
3162
3402
  permissionsSnapshot: Record<string, unknown> | null;
3163
3403
  inputs: Record<string, unknown> | null;
@@ -3233,32 +3473,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3233
3473
  entities: import("@trpc/server").TRPCQueryProcedure<{
3234
3474
  input: {
3235
3475
  query: string;
3236
- type?: "task" | "document" | "project" | "note" | undefined;
3476
+ type?: "note" | "task" | "document" | "project" | undefined;
3237
3477
  limit?: number | undefined;
3238
3478
  };
3239
3479
  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
- }[];
3480
+ entities: any[];
3255
3481
  };
3256
3482
  meta: object;
3257
3483
  }>;
3258
3484
  semantic: import("@trpc/server").TRPCQueryProcedure<{
3259
3485
  input: {
3260
3486
  query: string;
3261
- type?: "task" | "document" | "project" | "note" | undefined;
3487
+ type?: "note" | "task" | "document" | "project" | undefined;
3262
3488
  limit?: number | undefined;
3263
3489
  threshold?: number | undefined;
3264
3490
  };
@@ -3275,7 +3501,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3275
3501
  };
3276
3502
  output: {
3277
3503
  entities: {
3278
- workspaceId: string;
3504
+ workspaceId: string | null;
3279
3505
  userId: string;
3280
3506
  id: string;
3281
3507
  updatedAt: Date;
@@ -3352,7 +3578,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3352
3578
  };
3353
3579
  output: {
3354
3580
  entities: {
3355
- workspaceId: string;
3581
+ workspaceId: string | null;
3356
3582
  userId: string;
3357
3583
  id: string;
3358
3584
  updatedAt: Date;
@@ -3390,19 +3616,27 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3390
3616
  metadata?: Record<string, any> | undefined;
3391
3617
  };
3392
3618
  output: {
3393
- id: `${string}-${string}-${string}-${string}-${string}`;
3394
- status: string;
3395
- message: string;
3619
+ status: "proposed";
3620
+ proposalId: string;
3621
+ id?: undefined;
3622
+ } | {
3623
+ id: string;
3624
+ status: "created";
3625
+ proposalId?: undefined;
3396
3626
  };
3397
3627
  meta: object;
3398
3628
  }>;
3399
3629
  delete: import("@trpc/server").TRPCMutationProcedure<{
3400
3630
  input: {
3401
3631
  id: string;
3632
+ workspaceId?: string | undefined;
3402
3633
  };
3403
3634
  output: {
3404
- status: string;
3405
- message: string;
3635
+ status: "proposed";
3636
+ proposalId: string;
3637
+ } | {
3638
+ status: "deleted";
3639
+ proposalId?: undefined;
3406
3640
  };
3407
3641
  meta: object;
3408
3642
  }>;
@@ -3422,7 +3656,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3422
3656
  };
3423
3657
  output: {
3424
3658
  entity: {
3425
- workspaceId: string;
3659
+ workspaceId: string | null;
3426
3660
  userId: string;
3427
3661
  id: string;
3428
3662
  updatedAt: Date;
@@ -3441,7 +3675,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3441
3675
  stats: null;
3442
3676
  } | {
3443
3677
  entity: {
3444
- workspaceId: string;
3678
+ workspaceId: string | null;
3445
3679
  userId: string;
3446
3680
  id: string;
3447
3681
  updatedAt: Date;
@@ -3483,7 +3717,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3483
3717
  };
3484
3718
  output: {
3485
3719
  entities: {
3486
- workspaceId: string;
3720
+ workspaceId: string | null;
3487
3721
  userId: string;
3488
3722
  id: string;
3489
3723
  updatedAt: Date;
@@ -3553,9 +3787,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3553
3787
  type?: "enterprise" | "personal" | "team" | undefined;
3554
3788
  };
3555
3789
  output: {
3556
- status: string;
3790
+ status: "proposed";
3791
+ proposalId: string;
3557
3792
  message: string;
3558
- workspaceId: `${string}-${string}-${string}-${string}-${string}`;
3793
+ workspaceId?: undefined;
3794
+ } | {
3795
+ status: "created";
3796
+ workspaceId: string;
3797
+ message: string;
3798
+ proposalId?: undefined;
3559
3799
  };
3560
3800
  meta: object;
3561
3801
  }>;
@@ -3606,8 +3846,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3606
3846
  settings?: Record<string, unknown> | undefined;
3607
3847
  };
3608
3848
  output: {
3609
- status: string;
3849
+ status: "proposed";
3850
+ proposalId: string;
3851
+ message: string;
3852
+ } | {
3853
+ status: "updated";
3610
3854
  message: string;
3855
+ proposalId?: undefined;
3611
3856
  };
3612
3857
  meta: object;
3613
3858
  }>;
@@ -3617,8 +3862,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3617
3862
  serviceId: string | null;
3618
3863
  };
3619
3864
  output: {
3620
- status: string;
3865
+ status: "proposed";
3866
+ proposalId: string;
3867
+ message: string;
3868
+ } | {
3869
+ status: "updated";
3621
3870
  message: string;
3871
+ proposalId?: undefined;
3622
3872
  };
3623
3873
  meta: object;
3624
3874
  }>;
@@ -3627,8 +3877,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3627
3877
  id: string;
3628
3878
  };
3629
3879
  output: {
3630
- status: string;
3880
+ status: "proposed";
3881
+ proposalId: string;
3631
3882
  message: string;
3883
+ } | {
3884
+ status: "deleted";
3885
+ message: string;
3886
+ proposalId?: undefined;
3632
3887
  };
3633
3888
  meta: object;
3634
3889
  }>;
@@ -3639,8 +3894,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3639
3894
  role: "owner" | "editor" | "viewer";
3640
3895
  };
3641
3896
  output: {
3642
- status: string;
3897
+ status: "proposed";
3898
+ proposalId: string;
3899
+ message: string;
3900
+ memberId?: undefined;
3901
+ } | {
3902
+ status: "added";
3903
+ memberId: string;
3643
3904
  message: string;
3905
+ proposalId?: undefined;
3644
3906
  };
3645
3907
  meta: object;
3646
3908
  }>;
@@ -3664,7 +3926,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3664
3926
  avatarUrl: string | null;
3665
3927
  timezone: string;
3666
3928
  locale: string;
3667
- kratosIdentityId: string;
3929
+ userType: string;
3930
+ agentMetadata: AgentMetadata | null;
3931
+ kratosIdentityId: string | null;
3668
3932
  lastSyncedAt: Date | null;
3669
3933
  createdAt: Date;
3670
3934
  };
@@ -3677,8 +3941,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3677
3941
  userId: string;
3678
3942
  };
3679
3943
  output: {
3680
- status: string;
3944
+ status: "proposed";
3945
+ proposalId: string;
3681
3946
  message: string;
3947
+ } | {
3948
+ status: "removed";
3949
+ message: string;
3950
+ proposalId?: undefined;
3682
3951
  };
3683
3952
  meta: object;
3684
3953
  }>;
@@ -3689,8 +3958,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3689
3958
  role: "admin" | "editor" | "viewer";
3690
3959
  };
3691
3960
  output: {
3692
- status: string;
3961
+ status: "proposed";
3962
+ proposalId: string;
3693
3963
  message: string;
3964
+ } | {
3965
+ status: "updated";
3966
+ message: string;
3967
+ proposalId?: undefined;
3694
3968
  };
3695
3969
  meta: object;
3696
3970
  }>;
@@ -3733,7 +4007,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3733
4007
  token: string;
3734
4008
  };
3735
4009
  output: {
3736
- status: string;
4010
+ status: "accepted";
3737
4011
  workspaceId: string;
3738
4012
  message: string;
3739
4013
  };
@@ -3748,6 +4022,50 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3748
4022
  };
3749
4023
  meta: object;
3750
4024
  }>;
4025
+ createFromDefinition: import("@trpc/server").TRPCMutationProcedure<{
4026
+ input: {
4027
+ definition: unknown;
4028
+ packageSlug?: string | undefined;
4029
+ packageVersion?: string | undefined;
4030
+ workspaceName?: string | undefined;
4031
+ };
4032
+ output: {
4033
+ status: "created";
4034
+ workspaceId: string;
4035
+ profileIds: string[];
4036
+ viewIds: string[];
4037
+ entityIds: string[];
4038
+ };
4039
+ meta: object;
4040
+ }>;
4041
+ seedPlugin: import("@trpc/server").TRPCMutationProcedure<{
4042
+ input: {
4043
+ pluginId: string;
4044
+ definition?: unknown;
4045
+ };
4046
+ output: {
4047
+ status: "created";
4048
+ workspaceId: string;
4049
+ };
4050
+ meta: object;
4051
+ }>;
4052
+ previewInvite: import("@trpc/server").TRPCQueryProcedure<{
4053
+ input: {
4054
+ token: string;
4055
+ };
4056
+ output: {
4057
+ expired: true;
4058
+ workspaceName?: undefined;
4059
+ role?: undefined;
4060
+ expiresAt?: undefined;
4061
+ } | {
4062
+ expired: false;
4063
+ workspaceName: string;
4064
+ role: string;
4065
+ expiresAt: Date;
4066
+ } | null;
4067
+ meta: object;
4068
+ }>;
3751
4069
  }>>;
3752
4070
  views: import("@trpc/server").TRPCBuiltRouter<{
3753
4071
  ctx: Context;
@@ -3758,7 +4076,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3758
4076
  create: import("@trpc/server").TRPCMutationProcedure<{
3759
4077
  input: {
3760
4078
  name: string;
3761
- type: "calendar" | "list" | "table" | "whiteboard" | "graph" | "grid" | "timeline" | "kanban" | "gallery" | "gantt" | "mindmap" | "bento";
4079
+ type: "calendar" | "list" | "table" | "whiteboard" | "graph" | "timeline" | "grid" | "kanban" | "gallery" | "gantt" | "mindmap" | "flow" | "bento";
3762
4080
  workspaceId?: string | undefined;
3763
4081
  description?: string | undefined;
3764
4082
  scopeProfileIds?: string[] | undefined;
@@ -3775,33 +4093,54 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3775
4093
  embeddedViewIds?: string[] | undefined;
3776
4094
  metadata?: Record<string, any> | undefined;
3777
4095
  initialContent?: any;
4096
+ source?: "user" | "system" | "intelligence" | "ai" | undefined;
4097
+ reasoning?: string | undefined;
4098
+ agentUserId?: string | undefined;
3778
4099
  };
3779
4100
  output: {
4101
+ view: any;
4102
+ documentId: any;
4103
+ status: string;
4104
+ message: string;
4105
+ proposalId: string;
4106
+ } | {
3780
4107
  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
4108
  name: string;
3787
- description: string | undefined;
3788
- documentId: string;
3789
- metadata: {
3790
- entityCount: number;
3791
- createdBy: string;
3792
- };
3793
- createdAt: Date;
4109
+ workspaceId: string | null;
4110
+ userId: string;
4111
+ id: string;
4112
+ query: unknown;
4113
+ columns: unknown;
3794
4114
  updatedAt: Date;
4115
+ createdAt: Date;
4116
+ type: string;
4117
+ metadata: unknown;
4118
+ documentId: string | null;
4119
+ description: string | null;
4120
+ category: string;
4121
+ scopeProfileIds: string[] | null;
4122
+ scopeMode: string | null;
4123
+ config: unknown;
4124
+ filter: unknown;
4125
+ sort: unknown;
4126
+ layoutConfig: unknown;
4127
+ yjsRoomId: string | null;
4128
+ thumbnailUrl: string | null;
4129
+ schemaSnapshot: unknown;
4130
+ snapshotUpdatedAt: Date | null;
4131
+ embeddedViewIds: string[] | null;
3795
4132
  };
3796
4133
  documentId: string;
3797
4134
  status: string;
4135
+ message?: undefined;
4136
+ proposalId?: undefined;
3798
4137
  };
3799
4138
  meta: object;
3800
4139
  }>;
3801
4140
  list: import("@trpc/server").TRPCQueryProcedure<{
3802
4141
  input: {
3803
4142
  workspaceId?: string | undefined;
3804
- type?: "calendar" | "list" | "table" | "whiteboard" | "all" | "graph" | "grid" | "timeline" | "kanban" | "gallery" | "gantt" | "mindmap" | undefined;
4143
+ type?: "calendar" | "list" | "table" | "whiteboard" | "all" | "graph" | "timeline" | "grid" | "kanban" | "gallery" | "gantt" | "mindmap" | undefined;
3805
4144
  };
3806
4145
  output: {
3807
4146
  name: string;
@@ -3970,7 +4309,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3970
4309
  entities: {
3971
4310
  id: string;
3972
4311
  userId: string;
3973
- workspaceId: string;
4312
+ workspaceId: string | null;
3974
4313
  profileId: string | null;
3975
4314
  type: string;
3976
4315
  title: string | null;
@@ -4027,11 +4366,37 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4027
4366
  embeddedViewIds?: string[] | undefined;
4028
4367
  schemaSnapshot?: Record<string, any> | undefined;
4029
4368
  snapshotUpdatedAt?: Date | undefined;
4030
- type?: "calendar" | "list" | "table" | "whiteboard" | "graph" | "grid" | "timeline" | "kanban" | "gallery" | "gantt" | "mindmap" | "bento" | undefined;
4369
+ type?: "calendar" | "list" | "table" | "whiteboard" | "graph" | "timeline" | "grid" | "kanban" | "gallery" | "gantt" | "mindmap" | "flow" | "bento" | undefined;
4031
4370
  };
4032
4371
  output: {
4033
4372
  status: string;
4034
4373
  message: string;
4374
+ view: {
4375
+ name: string;
4376
+ workspaceId: string | null;
4377
+ userId: string;
4378
+ id: string;
4379
+ query: unknown;
4380
+ columns: unknown;
4381
+ updatedAt: Date;
4382
+ createdAt: Date;
4383
+ type: string;
4384
+ metadata: unknown;
4385
+ documentId: string | null;
4386
+ description: string | null;
4387
+ category: string;
4388
+ scopeProfileIds: string[] | null;
4389
+ scopeMode: string | null;
4390
+ config: unknown;
4391
+ filter: unknown;
4392
+ sort: unknown;
4393
+ layoutConfig: unknown;
4394
+ yjsRoomId: string | null;
4395
+ thumbnailUrl: string | null;
4396
+ schemaSnapshot: unknown;
4397
+ snapshotUpdatedAt: Date | null;
4398
+ embeddedViewIds: string[] | null;
4399
+ };
4035
4400
  };
4036
4401
  meta: object;
4037
4402
  }>;
@@ -4102,7 +4467,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4102
4467
  } | undefined;
4103
4468
  animations?: {
4104
4469
  enabled?: boolean | undefined;
4105
- speed?: "slow" | "normal" | "fast" | undefined;
4470
+ speed?: "normal" | "slow" | "fast" | undefined;
4106
4471
  } | undefined;
4107
4472
  } | undefined;
4108
4473
  defaultTemplates?: Record<string, string> | undefined;
@@ -4118,7 +4483,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4118
4483
  compactMode?: boolean | undefined;
4119
4484
  fontSize?: string | undefined;
4120
4485
  animations?: boolean | undefined;
4121
- defaultView?: "list" | "grid" | "timeline" | undefined;
4486
+ defaultView?: "list" | "timeline" | "grid" | undefined;
4122
4487
  entityOpenMode?: "floating" | "side" | "modal" | undefined;
4123
4488
  } | undefined;
4124
4489
  graphPreferences?: {
@@ -4168,7 +4533,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4168
4533
  } | undefined;
4169
4534
  animations?: {
4170
4535
  enabled?: boolean | undefined;
4171
- speed?: "slow" | "normal" | "fast" | undefined;
4536
+ speed?: "normal" | "slow" | "fast" | undefined;
4172
4537
  } | undefined;
4173
4538
  } | undefined;
4174
4539
  };
@@ -4225,7 +4590,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4225
4590
  }>;
4226
4591
  setIntelligenceService: import("@trpc/server").TRPCMutationProcedure<{
4227
4592
  input: {
4228
- serviceId: string;
4593
+ serviceId: string | null;
4229
4594
  capability?: "default" | "chat" | "analysis" | undefined;
4230
4595
  };
4231
4596
  output: {
@@ -4284,9 +4649,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4284
4649
  filters?: Record<string, any> | undefined;
4285
4650
  };
4286
4651
  output: {
4287
- id: `${string}-${string}-${string}-${string}-${string}`;
4288
- status: string;
4289
- message: string;
4652
+ status: "proposed";
4653
+ proposalId: string;
4654
+ id?: undefined;
4655
+ } | {
4656
+ id: any;
4657
+ status: "created";
4658
+ proposalId?: undefined;
4290
4659
  };
4291
4660
  meta: object;
4292
4661
  }>;
@@ -4297,20 +4666,28 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4297
4666
  description?: string | undefined;
4298
4667
  permissions?: Record<string, any> | undefined;
4299
4668
  filters?: Record<string, any> | undefined;
4669
+ workspaceId?: string | undefined;
4300
4670
  };
4301
4671
  output: {
4302
- status: string;
4303
- message: string;
4672
+ status: "proposed";
4673
+ proposalId: string;
4674
+ } | {
4675
+ status: "updated";
4676
+ proposalId?: undefined;
4304
4677
  };
4305
4678
  meta: object;
4306
4679
  }>;
4307
4680
  delete: import("@trpc/server").TRPCMutationProcedure<{
4308
4681
  input: {
4309
4682
  id: string;
4683
+ workspaceId?: string | undefined;
4310
4684
  };
4311
4685
  output: {
4312
- status: string;
4313
- message: string;
4686
+ status: "proposed";
4687
+ proposalId: string;
4688
+ } | {
4689
+ status: "deleted";
4690
+ proposalId?: undefined;
4314
4691
  };
4315
4692
  meta: object;
4316
4693
  }>;
@@ -4364,7 +4741,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4364
4741
  };
4365
4742
  output: {
4366
4743
  resource: {
4367
- workspaceId: string;
4744
+ workspaceId: string | null;
4368
4745
  userId: string;
4369
4746
  id: string;
4370
4747
  updatedAt: Date;
@@ -4929,8 +5306,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4929
5306
  };
4930
5307
  output: {
4931
5308
  id: `${string}-${string}-${string}-${string}-${string}`;
4932
- success: boolean;
4933
- message: string;
5309
+ status: "proposed";
5310
+ proposalId: string;
5311
+ } | {
5312
+ id: string;
5313
+ status: "created";
5314
+ proposalId?: undefined;
4934
5315
  };
4935
5316
  meta: object;
4936
5317
  }>;
@@ -4946,8 +5327,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4946
5327
  timeoutSeconds?: number | undefined;
4947
5328
  };
4948
5329
  output: {
4949
- success: boolean;
4950
- message: string;
5330
+ status: "proposed";
5331
+ proposalId: string;
5332
+ } | {
5333
+ status: "updated";
5334
+ proposalId?: undefined;
4951
5335
  };
4952
5336
  meta: object;
4953
5337
  }>;
@@ -4956,8 +5340,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4956
5340
  id: string;
4957
5341
  };
4958
5342
  output: {
4959
- success: boolean;
4960
- message: string;
5343
+ status: "proposed";
5344
+ proposalId: string;
5345
+ } | {
5346
+ status: "deleted";
5347
+ proposalId?: undefined;
4961
5348
  };
4962
5349
  meta: object;
4963
5350
  }>;
@@ -5002,8 +5389,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5002
5389
  };
5003
5390
  output: {
5004
5391
  id: `${string}-${string}-${string}-${string}-${string}`;
5005
- success: boolean;
5006
- message: string;
5392
+ status: "proposed";
5393
+ proposalId: string;
5394
+ } | {
5395
+ id: string;
5396
+ status: "created";
5397
+ proposalId?: undefined;
5007
5398
  };
5008
5399
  meta: object;
5009
5400
  }>;
@@ -5018,8 +5409,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5018
5409
  status?: "error" | "active" | "paused" | undefined;
5019
5410
  };
5020
5411
  output: {
5021
- success: boolean;
5022
- message: string;
5412
+ status: "proposed";
5413
+ proposalId: string;
5414
+ } | {
5415
+ status: "updated";
5416
+ proposalId?: undefined;
5023
5417
  };
5024
5418
  meta: object;
5025
5419
  }>;
@@ -5028,8 +5422,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5028
5422
  id: string;
5029
5423
  };
5030
5424
  output: {
5031
- success: boolean;
5032
- message: string;
5425
+ status: "proposed";
5426
+ proposalId: string;
5427
+ } | {
5428
+ status: "deleted";
5429
+ proposalId?: undefined;
5033
5430
  };
5034
5431
  meta: object;
5035
5432
  }>;
@@ -5222,6 +5619,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5222
5619
  parentProfileId?: string | undefined;
5223
5620
  uiHints?: Record<string, unknown> | undefined;
5224
5621
  scope?: "workspace" | "user" | "system" | undefined;
5622
+ source?: "user" | "system" | "intelligence" | "ai" | undefined;
5623
+ reasoning?: string | undefined;
5624
+ agentUserId?: string | undefined;
5225
5625
  };
5226
5626
  output: {
5227
5627
  profile: {
@@ -5238,6 +5638,35 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5238
5638
  displayName: string;
5239
5639
  parentProfileId: string | null;
5240
5640
  };
5641
+ existing: boolean;
5642
+ status?: undefined;
5643
+ message?: undefined;
5644
+ proposalId?: undefined;
5645
+ } | {
5646
+ profile: any;
5647
+ status: string;
5648
+ message: string;
5649
+ proposalId: string;
5650
+ existing?: undefined;
5651
+ } | {
5652
+ profile: {
5653
+ workspaceId: string | null;
5654
+ userId: string | null;
5655
+ id: string;
5656
+ updatedAt: Date;
5657
+ createdAt: Date;
5658
+ version: number;
5659
+ isActive: boolean;
5660
+ scope: ProfileScope;
5661
+ slug: string;
5662
+ uiHints: unknown;
5663
+ displayName: string;
5664
+ parentProfileId: string | null;
5665
+ };
5666
+ existing?: undefined;
5667
+ status?: undefined;
5668
+ message?: undefined;
5669
+ proposalId?: undefined;
5241
5670
  };
5242
5671
  meta: object;
5243
5672
  }>;
@@ -5362,6 +5791,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5362
5791
  constraints: unknown;
5363
5792
  uiHints: unknown;
5364
5793
  };
5794
+ existing: boolean;
5795
+ } | {
5796
+ propertyDef: {
5797
+ id: string;
5798
+ updatedAt: Date;
5799
+ createdAt: Date;
5800
+ slug: string;
5801
+ valueType: PropertyValueType;
5802
+ constraints: unknown;
5803
+ uiHints: unknown;
5804
+ };
5805
+ existing?: undefined;
5365
5806
  };
5366
5807
  meta: object;
5367
5808
  }>;
@@ -5460,6 +5901,69 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5460
5901
  meta: object;
5461
5902
  }>;
5462
5903
  }>>;
5904
+ agentUsers: import("@trpc/server").TRPCBuiltRouter<{
5905
+ ctx: Context;
5906
+ meta: object;
5907
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
5908
+ transformer: true;
5909
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
5910
+ create: import("@trpc/server").TRPCMutationProcedure<{
5911
+ input: {
5912
+ workspaceId: string;
5913
+ agentType: string;
5914
+ name: string;
5915
+ role: "admin" | "editor" | "viewer";
5916
+ description?: string | undefined;
5917
+ capabilities?: string[] | undefined;
5918
+ };
5919
+ output: {
5920
+ id: `${string}-${string}-${string}-${string}-${string}`;
5921
+ email: string;
5922
+ name: string;
5923
+ agentType: string;
5924
+ role: "admin" | "editor" | "viewer";
5925
+ };
5926
+ meta: object;
5927
+ }>;
5928
+ list: import("@trpc/server").TRPCQueryProcedure<{
5929
+ input: {
5930
+ workspaceId: string;
5931
+ };
5932
+ output: {
5933
+ id: string;
5934
+ name: string | null;
5935
+ email: string;
5936
+ agentMetadata: AgentMetadata | null;
5937
+ role: string;
5938
+ joinedAt: Date;
5939
+ }[];
5940
+ meta: object;
5941
+ }>;
5942
+ update: import("@trpc/server").TRPCMutationProcedure<{
5943
+ input: {
5944
+ workspaceId: string;
5945
+ agentUserId: string;
5946
+ name?: string | undefined;
5947
+ role?: "admin" | "editor" | "viewer" | undefined;
5948
+ description?: string | undefined;
5949
+ capabilities?: string[] | undefined;
5950
+ };
5951
+ output: {
5952
+ status: "updated";
5953
+ };
5954
+ meta: object;
5955
+ }>;
5956
+ remove: import("@trpc/server").TRPCMutationProcedure<{
5957
+ input: {
5958
+ workspaceId: string;
5959
+ agentUserId: string;
5960
+ };
5961
+ output: {
5962
+ status: "removed";
5963
+ };
5964
+ meta: object;
5965
+ }>;
5966
+ }>>;
5463
5967
  }>>;
5464
5968
  export type AppRouter = typeof coreRouter;
5465
5969