@synap-core/api-types 1.15.0 → 1.16.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.
@@ -92,12 +92,15 @@ export interface AgentMetadata {
92
92
  activePersonality?: string;
93
93
  }
94
94
  /**
95
- * Relations Schema - The Knowledge Graph Edges
95
+ * Shared provenance vocabulary for the uniform `created_by_kind` column added
96
+ * across mutation-bearing tables (Wave B3). Type-only — no import cycle.
96
97
  *
97
- * Links between entities, forming the knowledge graph.
98
- *
99
- * PostgreSQL-only schema with Row-Level Security (RLS) for multi-user support.
98
+ * NOTE: `cell_instances.createdByKind` (user|agent|system) and
99
+ * `messages.authorType` (human|ai_agent|external|bot) are PRE-EXISTING and kept
100
+ * as-is. This vocab (human|ai_agent|system matching `channel_members.memberKind`)
101
+ * is for the NEW provenance columns only.
100
102
  */
103
+ export type ProvenanceKind = "human" | "ai_agent" | "system";
101
104
  /**
102
105
  * The kind of object on one end of a relation edge.
103
106
  *
@@ -425,11 +428,62 @@ export interface AgentRoutingPolicy {
425
428
  /** Ordered rules; first match wins */
426
429
  rules?: AgentRoutingRule[];
427
430
  }
431
+ /**
432
+ * High-level purpose of a workspace inside a pod.
433
+ *
434
+ * `workspaceType` already exists as a promoted column for legacy operational
435
+ * filtering. `workspacePurpose` is the product-facing contract used by the
436
+ * browser and agents to understand how a workspace should be used.
437
+ */
438
+ export type WorkspacePurpose = "personal" | "project" | "agent" | "library" | "operational";
439
+ /**
440
+ * Discoverability/access mode for a workspace.
441
+ *
442
+ * Write access is still controlled by workspace_members + role permissions.
443
+ * `pod_visible` and `pod_joinable` only make the workspace discoverable/readable
444
+ * to authenticated users on the same data pod.
445
+ */
446
+ export type WorkspaceVisibility = "private" | "members" | "pod_visible" | "pod_joinable" | "public_link";
447
+ export type WorkspaceSourceRole = "provider" | "consumer" | "provider-consumer";
448
+ export interface WorkspaceDefaultSource {
449
+ workspaceId: string;
450
+ capability?: string;
451
+ profileSlug?: string;
452
+ label?: string;
453
+ }
428
454
  export interface WorkspaceSettings {
429
455
  defaultEntityTypes?: string[];
430
456
  theme?: string;
431
457
  aiEnabled?: boolean;
432
458
  allowExternalSharing?: boolean;
459
+ /**
460
+ * Product-facing purpose used by browser/apps/agents to resolve cross-workspace
461
+ * sources (e.g. a brand-library workspace serving artboards in a project).
462
+ */
463
+ workspacePurpose?: WorkspacePurpose;
464
+ /**
465
+ * Free-form subtype within the purpose, e.g. "brand-library",
466
+ * "research-library", "agent-lab".
467
+ */
468
+ workspaceSubtype?: string;
469
+ /**
470
+ * Discovery/read visibility. Defaults to "members" when absent.
471
+ */
472
+ workspaceVisibility?: WorkspaceVisibility;
473
+ /**
474
+ * Capability ids this workspace provides or consumes, e.g.
475
+ * "brand.library", "brand.assets", "research.sources", "agent.staging".
476
+ */
477
+ workspaceCapabilities?: string[];
478
+ /**
479
+ * Domain → role map. Example: { brand: "provider", research: "consumer" }.
480
+ */
481
+ sourceRoles?: Record<string, WorkspaceSourceRole>;
482
+ /**
483
+ * Domain/capability → default source workspace. Stored on consumer
484
+ * workspaces so features can resolve defaults without copying data.
485
+ */
486
+ defaultSources?: Record<string, WorkspaceDefaultSource>;
433
487
  /** External MCP servers whose tools will be available to AI agents in this workspace */
434
488
  mcpServers?: McpServerConfig[];
435
489
  layout?: WorkspaceLayoutConfig;
@@ -1179,6 +1233,28 @@ export type WidgetRendererType = "builtin" | "iframe" | "native" | "frame";
1179
1233
  * unspecified row can never write directly.
1180
1234
  */
1181
1235
  export type WidgetTrustLevel = "trusted" | "installed" | "generated";
1236
+ /**
1237
+ * Functional role of a widget/cell definition — what surface it targets.
1238
+ *
1239
+ * - "widget" → bento add-block picker item (the default)
1240
+ * - "view-renderer" → renders a typed view (e.g. custom kanban board)
1241
+ * - "entity-renderer" → renders a profile's entity detail page
1242
+ * - "panel" → side or floating panel surface
1243
+ */
1244
+ export type WidgetRole = "widget" | "view-renderer" | "entity-renderer" | "panel";
1245
+ /**
1246
+ * Content kind — the single de-conflated taxonomy for WHAT a cell renders. It
1247
+ * REPLACES `role` (which conflated content with placement). DISTINCT from
1248
+ * `rendererType` (the rendering MECHANISM: frame/builtin/iframe/native).
1249
+ * Mirrors `ContentKind` in `@synap-core/capabilities` (canonical copy).
1250
+ *
1251
+ * - "entity-detail" → renders ONE entity (its full page)
1252
+ * - "entity-profile" → renders the WHOLE profile/type (its dashboard / home)
1253
+ * - "collection" → renders a view of MANY entities
1254
+ * - "widget" → generic, content-agnostic — the DEFAULT; never a
1255
+ * profile assignment, only placeable
1256
+ */
1257
+ export type ContentKind = "entity-detail" | "entity-profile" | "collection" | "widget";
1182
1258
  export interface PodIntelligenceDefaults {
1183
1259
  chatModelId: string | null;
1184
1260
  reasoningModelId: string | null;
@@ -1237,6 +1313,24 @@ export type CellInstanceCreatedByKind = "user" | "agent" | "system";
1237
1313
  * through `checkPermissionOrPropose()`.
1238
1314
  */
1239
1315
  export type CellInstanceTrustLevel = "trusted" | "installed" | "generated";
1316
+ /**
1317
+ * AI Providers Schema
1318
+ *
1319
+ * Pod-level registry of AI model providers. Source of truth for provider
1320
+ * configuration — decoupled from any specific IntelligenceSystem or workspace.
1321
+ * The backend syncs this to the active IS on every change.
1322
+ *
1323
+ * API keys are stored server-side encrypted via encryptServiceKey/decryptServiceKey.
1324
+ */
1325
+ export interface AiProviderModelEntry {
1326
+ id: string;
1327
+ tier?: "free" | "balanced" | "advanced" | "complex";
1328
+ contextWindow?: number;
1329
+ supportsTools?: boolean;
1330
+ supportsJson?: boolean;
1331
+ costPer1MInput?: number;
1332
+ costPer1MOutput?: number;
1333
+ }
1240
1334
  /**
1241
1335
  * EventRecord - Database representation of an event
1242
1336
  *
@@ -1575,6 +1669,27 @@ export interface ProposalReviewModel {
1575
1669
  graph?: ProposalReviewGraph;
1576
1670
  events: ProposalReviewEvent[];
1577
1671
  }
1672
+ /**
1673
+ * Record of what a proposal MATERIALIZED on approval.
1674
+ *
1675
+ * Stamped onto `proposals.data.materialized` by the approve flow so a later
1676
+ * `revert` can compute the exact inverse without a schema change. This is the
1677
+ * canonical "what did approval produce" record:
1678
+ * - inline entity-create + composite-create mint FRESH ids (≠ proposal.targetId)
1679
+ * so the created ids would otherwise be unrecoverable from the row alone;
1680
+ * - relation/document ids created as a side effect are captured here too.
1681
+ * Branches whose materialized id is deterministic from the row (generic
1682
+ * `.validated` create/update where subjectId is known, document create where
1683
+ * documentId === targetId) do not strictly need this, but populate it when cheap.
1684
+ */
1685
+ export interface ProposalMaterializedRecord {
1686
+ /** Entity ids CREATED by approval (revert → soft/hard delete each). */
1687
+ entityIds?: string[];
1688
+ /** Relation ids CREATED by approval (revert → delete each). */
1689
+ relationIds?: string[];
1690
+ /** Document ids CREATED by approval (revert → delete each). */
1691
+ documentIds?: string[];
1692
+ }
1578
1693
  declare enum MessageLinkTargetType {
1579
1694
  ENTITY = "entity",
1580
1695
  DOCUMENT = "document",
@@ -2155,7 +2270,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2155
2270
  log: import("@trpc/server").TRPCMutationProcedure<{
2156
2271
  input: {
2157
2272
  subjectId: string;
2158
- subjectType: "user" | "message" | "apiKey" | "entity" | "system" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project";
2273
+ subjectType: "user" | "message" | "apiKey" | "system" | "entity" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project";
2159
2274
  eventType: string;
2160
2275
  data: Record<string, unknown>;
2161
2276
  version: number;
@@ -2172,7 +2287,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2172
2287
  since?: unknown;
2173
2288
  until?: unknown;
2174
2289
  type?: string | undefined;
2175
- subjectType?: "user" | "message" | "apiKey" | "entity" | "system" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project" | undefined;
2290
+ subjectType?: "user" | "message" | "apiKey" | "system" | "entity" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project" | undefined;
2176
2291
  limit?: number | undefined;
2177
2292
  lean?: boolean | undefined;
2178
2293
  };
@@ -2200,7 +2315,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2200
2315
  input: {
2201
2316
  userId?: string | undefined;
2202
2317
  eventType?: string | undefined;
2203
- subjectType?: "user" | "message" | "apiKey" | "entity" | "system" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project" | undefined;
2318
+ subjectType?: "user" | "message" | "apiKey" | "system" | "entity" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project" | undefined;
2204
2319
  subjectId?: string | undefined;
2205
2320
  correlationId?: string | undefined;
2206
2321
  fromDate?: Date | undefined;
@@ -2216,7 +2331,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2216
2331
  input: {
2217
2332
  userId?: string | undefined;
2218
2333
  eventType?: string | undefined;
2219
- subjectType?: "user" | "message" | "apiKey" | "entity" | "system" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project" | undefined;
2334
+ subjectType?: "user" | "message" | "apiKey" | "system" | "entity" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project" | undefined;
2220
2335
  fromDate?: Date | undefined;
2221
2336
  toDate?: Date | undefined;
2222
2337
  workspaceId?: string | undefined;
@@ -2724,11 +2839,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2724
2839
  description?: string | undefined;
2725
2840
  documentId?: string | null | undefined;
2726
2841
  properties?: Record<string, unknown> | undefined;
2842
+ deleteProperties?: string[] | undefined;
2727
2843
  profileSlug?: string | undefined;
2728
2844
  source?: "user" | "system" | "ai" | "agent" | "intelligence" | "extension" | undefined;
2729
2845
  reasoning?: string | undefined;
2730
2846
  agentUserId?: string | undefined;
2731
2847
  global?: boolean | undefined;
2848
+ targetWorkspaceId?: string | undefined;
2732
2849
  viewContext?: {
2733
2850
  viewId?: string | undefined;
2734
2851
  typeKey?: string | undefined;
@@ -2843,12 +2960,17 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2843
2960
  id: string;
2844
2961
  type: string;
2845
2962
  updatedAt: Date;
2963
+ createdByUserId: string | null;
2846
2964
  createdAt: Date;
2965
+ correlationId: string | null;
2847
2966
  profileId: string | null;
2848
2967
  title: string | null;
2849
2968
  preview: string | null;
2850
2969
  documentId: string | null;
2851
2970
  version: number;
2971
+ createdByKind: ProvenanceKind | null;
2972
+ agentUserId: string | null;
2973
+ sourceProposalId: string | null;
2852
2974
  deletedAt: Date | null;
2853
2975
  };
2854
2976
  meta: object;
@@ -3165,8 +3287,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3165
3287
  content: string;
3166
3288
  channelId: string;
3167
3289
  parentId: string | null;
3168
- role: "user" | "assistant" | "system";
3169
- authorType: "external" | "human" | "ai_agent" | "bot";
3290
+ role: "user" | "system" | "assistant";
3291
+ authorType: "human" | "ai_agent" | "external" | "bot";
3170
3292
  messageCategory: "chat" | "comment" | "system_notification" | "review";
3171
3293
  externalSource: string | null;
3172
3294
  inboxItemId: string | null;
@@ -3229,6 +3351,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3229
3351
  channels: (Channel & {
3230
3352
  hasAssistantMessage: boolean;
3231
3353
  origin: string;
3354
+ unreadCount: number;
3232
3355
  })[];
3233
3356
  };
3234
3357
  meta: object;
@@ -3245,6 +3368,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3245
3368
  items: (Channel & {
3246
3369
  hasAssistantMessage: boolean;
3247
3370
  origin: string;
3371
+ unreadCount: number;
3248
3372
  })[];
3249
3373
  pagination: {
3250
3374
  hasMore: boolean;
@@ -3265,6 +3389,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3265
3389
  items: (Channel & {
3266
3390
  hasAssistantMessage: boolean;
3267
3391
  origin: string;
3392
+ unreadCount: number;
3268
3393
  })[];
3269
3394
  pagination: {
3270
3395
  hasMore: boolean;
@@ -3284,6 +3409,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3284
3409
  items: (Channel & {
3285
3410
  hasAssistantMessage: boolean;
3286
3411
  origin: string;
3412
+ unreadCount: number;
3287
3413
  })[];
3288
3414
  pagination: {
3289
3415
  hasMore: boolean;
@@ -3303,6 +3429,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3303
3429
  items: (Channel & {
3304
3430
  hasAssistantMessage: boolean;
3305
3431
  origin: string;
3432
+ unreadCount: number;
3306
3433
  })[];
3307
3434
  pagination: {
3308
3435
  hasMore: boolean;
@@ -3445,11 +3572,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3445
3572
  id: string;
3446
3573
  createdAt: Date;
3447
3574
  channelId: string;
3575
+ relevanceScore: number | null;
3448
3576
  objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
3449
3577
  objectId: string;
3450
3578
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
3451
3579
  conflictStatus: "pending" | "none" | "resolved";
3452
- relevanceScore: number | null;
3453
3580
  }[] | undefined;
3454
3581
  branchTree: any;
3455
3582
  };
@@ -3624,11 +3751,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3624
3751
  id: string;
3625
3752
  createdAt: Date;
3626
3753
  channelId: string;
3754
+ relevanceScore: number | null;
3627
3755
  objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
3628
3756
  objectId: string;
3629
3757
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
3630
3758
  conflictStatus: "pending" | "none" | "resolved";
3631
- relevanceScore: number | null;
3632
3759
  }[];
3633
3760
  entities: {
3634
3761
  userId: string;
@@ -3637,11 +3764,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3637
3764
  id: string;
3638
3765
  createdAt: Date;
3639
3766
  channelId: string;
3767
+ relevanceScore: number | null;
3640
3768
  objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
3641
3769
  objectId: string;
3642
3770
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
3643
3771
  conflictStatus: "pending" | "none" | "resolved";
3644
- relevanceScore: number | null;
3645
3772
  }[];
3646
3773
  documents: {
3647
3774
  userId: string;
@@ -3650,11 +3777,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3650
3777
  id: string;
3651
3778
  createdAt: Date;
3652
3779
  channelId: string;
3780
+ relevanceScore: number | null;
3653
3781
  objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
3654
3782
  objectId: string;
3655
3783
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
3656
3784
  conflictStatus: "pending" | "none" | "resolved";
3657
- relevanceScore: number | null;
3658
3785
  }[];
3659
3786
  };
3660
3787
  meta: object;
@@ -3841,6 +3968,40 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3841
3968
  };
3842
3969
  meta: object;
3843
3970
  }>;
3971
+ toggleReaction: import("@trpc/server").TRPCMutationProcedure<{
3972
+ input: {
3973
+ messageId: string;
3974
+ emoji: string;
3975
+ };
3976
+ output: {
3977
+ action: "removed";
3978
+ } | {
3979
+ action: "added";
3980
+ };
3981
+ meta: object;
3982
+ }>;
3983
+ getChannelReactions: import("@trpc/server").TRPCQueryProcedure<{
3984
+ input: {
3985
+ messageIds: string[];
3986
+ };
3987
+ output: {
3988
+ reactions: Record<string, {
3989
+ emoji: string;
3990
+ count: number;
3991
+ reactedByMe: boolean;
3992
+ }[]>;
3993
+ };
3994
+ meta: object;
3995
+ }>;
3996
+ markChannelRead: import("@trpc/server").TRPCMutationProcedure<{
3997
+ input: {
3998
+ channelId: string;
3999
+ };
4000
+ output: {
4001
+ ok: boolean;
4002
+ };
4003
+ meta: object;
4004
+ }>;
3844
4005
  }>>;
3845
4006
  proposals: import("@trpc/server").TRPCBuiltRouter<{
3846
4007
  ctx: Context;
@@ -3867,7 +4028,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3867
4028
  cursor?: string | undefined;
3868
4029
  };
3869
4030
  output: {
3870
- items: ({
4031
+ items: {
4032
+ viewerCanReview: boolean;
3871
4033
  workspaceId: string | null;
3872
4034
  sourceMessageId: string | null;
3873
4035
  id: string;
@@ -3875,7 +4037,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3875
4037
  updatedAt: Date;
3876
4038
  createdAt: Date;
3877
4039
  correlationId: string | null;
3878
- status: "approved" | "pending" | "rejected" | "auto_approved";
4040
+ agentUserId: string | null;
4041
+ status: "approved" | "pending" | "rejected" | "auto_approved" | "reverted";
3879
4042
  expiresAt: Date | null;
3880
4043
  createdBy: string | null;
3881
4044
  threadId: string | null;
@@ -3883,18 +4046,16 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3883
4046
  targetId: string;
3884
4047
  proposalType: string;
3885
4048
  commandRunId: string | null;
3886
- agentUserId: string | null;
3887
4049
  requestedEventId: string | null;
3888
4050
  reviewedBy: string | null;
3889
4051
  reviewedAt: Date | null;
3890
4052
  rejectionReason: string | null;
3891
4053
  comments: unknown;
3892
- } & {
3893
4054
  request: UpdateRequest;
3894
4055
  authorName?: string;
3895
4056
  targetName?: string;
3896
4057
  review: ProposalReviewModel;
3897
- })[];
4058
+ }[];
3898
4059
  pagination: {
3899
4060
  nextCursor: string | undefined;
3900
4061
  hasMore: boolean;
@@ -3902,7 +4063,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3902
4063
  limit: number;
3903
4064
  offset: number;
3904
4065
  };
3905
- proposals: ({
4066
+ proposals: {
4067
+ viewerCanReview: boolean;
3906
4068
  workspaceId: string | null;
3907
4069
  sourceMessageId: string | null;
3908
4070
  id: string;
@@ -3910,7 +4072,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3910
4072
  updatedAt: Date;
3911
4073
  createdAt: Date;
3912
4074
  correlationId: string | null;
3913
- status: "approved" | "pending" | "rejected" | "auto_approved";
4075
+ agentUserId: string | null;
4076
+ status: "approved" | "pending" | "rejected" | "auto_approved" | "reverted";
3914
4077
  expiresAt: Date | null;
3915
4078
  createdBy: string | null;
3916
4079
  threadId: string | null;
@@ -3918,18 +4081,16 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3918
4081
  targetId: string;
3919
4082
  proposalType: string;
3920
4083
  commandRunId: string | null;
3921
- agentUserId: string | null;
3922
4084
  requestedEventId: string | null;
3923
4085
  reviewedBy: string | null;
3924
4086
  reviewedAt: Date | null;
3925
4087
  rejectionReason: string | null;
3926
4088
  comments: unknown;
3927
- } & {
3928
4089
  request: UpdateRequest;
3929
4090
  authorName?: string;
3930
4091
  targetName?: string;
3931
4092
  review: ProposalReviewModel;
3932
- })[];
4093
+ }[];
3933
4094
  };
3934
4095
  meta: object;
3935
4096
  }>;
@@ -3945,7 +4106,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3945
4106
  updatedAt: Date;
3946
4107
  createdAt: Date;
3947
4108
  correlationId: string | null;
3948
- status: "approved" | "pending" | "rejected" | "auto_approved";
4109
+ agentUserId: string | null;
4110
+ status: "approved" | "pending" | "rejected" | "auto_approved" | "reverted";
3949
4111
  expiresAt: Date | null;
3950
4112
  createdBy: string | null;
3951
4113
  threadId: string | null;
@@ -3953,7 +4115,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3953
4115
  targetId: string;
3954
4116
  proposalType: string;
3955
4117
  commandRunId: string | null;
3956
- agentUserId: string | null;
3957
4118
  requestedEventId: string | null;
3958
4119
  reviewedBy: string | null;
3959
4120
  reviewedAt: Date | null;
@@ -3994,6 +4155,23 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3994
4155
  };
3995
4156
  meta: object;
3996
4157
  }>;
4158
+ revert: import("@trpc/server").TRPCMutationProcedure<{
4159
+ input: {
4160
+ proposalId: string;
4161
+ reason?: string | undefined;
4162
+ };
4163
+ output: {
4164
+ success: boolean;
4165
+ reverted: ProposalMaterializedRecord;
4166
+ alreadyReverted: boolean;
4167
+ } | {
4168
+ partialFailures?: string[] | undefined;
4169
+ success: boolean;
4170
+ reverted: ProposalMaterializedRecord;
4171
+ alreadyReverted?: undefined;
4172
+ };
4173
+ meta: object;
4174
+ }>;
3997
4175
  batchApprove: import("@trpc/server").TRPCMutationProcedure<{
3998
4176
  input: {
3999
4177
  proposalIds: string[];
@@ -5287,7 +5465,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5287
5465
  input: {
5288
5466
  title: string;
5289
5467
  content?: string | undefined;
5290
- type?: "code" | "text" | "markdown" | "pdf" | "docx" | undefined;
5468
+ type?: "code" | "text" | "markdown" | "pdf" | "docx" | "html" | undefined;
5291
5469
  projectId?: string | undefined;
5292
5470
  workspaceId?: string | undefined;
5293
5471
  };
@@ -5303,7 +5481,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5303
5481
  }>;
5304
5482
  upload: import("@trpc/server").TRPCMutationProcedure<{
5305
5483
  input: {
5306
- type: "code" | "text" | "markdown" | "pdf" | "docx";
5484
+ type: "code" | "text" | "markdown" | "pdf" | "docx" | "html";
5307
5485
  content: string;
5308
5486
  title?: string | undefined;
5309
5487
  language?: string | undefined;
@@ -5339,6 +5517,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5339
5517
  workingState: string | null;
5340
5518
  workingStateUpdatedAt: Date | null;
5341
5519
  metadata: unknown;
5520
+ createdByKind: ProvenanceKind | null;
5521
+ createdByUserId: string | null;
5522
+ agentUserId: string | null;
5523
+ sourceProposalId: string | null;
5524
+ correlationId: string | null;
5342
5525
  createdAt: Date;
5343
5526
  updatedAt: Date;
5344
5527
  deletedAt: Date | null;
@@ -5395,6 +5578,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5395
5578
  message: string | null;
5396
5579
  createdBy: string;
5397
5580
  createdAt: Date;
5581
+ size: number;
5582
+ mimeType: string | null;
5583
+ checksum: string | null;
5584
+ hasStoredSnapshot: boolean;
5398
5585
  }[];
5399
5586
  latest: {
5400
5587
  currentVersion: number;
@@ -5419,12 +5606,17 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5419
5606
  versionId: string;
5420
5607
  };
5421
5608
  output: {
5609
+ content: string;
5422
5610
  id: string;
5423
5611
  message: string | null;
5424
5612
  createdAt: Date;
5425
5613
  documentId: string;
5426
5614
  version: number;
5427
- content: string;
5615
+ storageUrl: string | null;
5616
+ storageKey: string | null;
5617
+ size: number;
5618
+ mimeType: string | null;
5619
+ checksum: string | null;
5428
5620
  author: string;
5429
5621
  authorId: string;
5430
5622
  };
@@ -5456,7 +5648,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5456
5648
  list: import("@trpc/server").TRPCQueryProcedure<{
5457
5649
  input: {
5458
5650
  projectId?: string | undefined;
5459
- type?: "code" | "text" | "markdown" | "pdf" | "docx" | undefined;
5651
+ type?: "code" | "text" | "markdown" | "pdf" | "docx" | "html" | undefined;
5460
5652
  limit?: number | undefined;
5461
5653
  };
5462
5654
  output: {
@@ -5476,6 +5668,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5476
5668
  workingState: string | null;
5477
5669
  workingStateUpdatedAt: Date | null;
5478
5670
  metadata: unknown;
5671
+ createdByKind: ProvenanceKind | null;
5672
+ createdByUserId: string | null;
5673
+ agentUserId: string | null;
5674
+ sourceProposalId: string | null;
5675
+ correlationId: string | null;
5479
5676
  createdAt: Date;
5480
5677
  updatedAt: Date;
5481
5678
  deletedAt: Date | null;
@@ -5839,6 +6036,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5839
6036
  description?: string | undefined;
5840
6037
  version?: string | undefined;
5841
6038
  pricing?: "custom" | "enterprise" | "free" | "premium" | undefined;
6039
+ providerType?: "custom" | "openai" | "anthropic" | "self-hosted" | undefined;
5842
6040
  metadata?: Record<string, unknown> | undefined;
5843
6041
  };
5844
6042
  output: {
@@ -5878,6 +6076,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5878
6076
  version: string | null;
5879
6077
  capabilities: string[];
5880
6078
  pricing: string | null;
6079
+ providerType: string | null;
6080
+ metadata: Record<string, unknown> | null;
5881
6081
  status: string;
5882
6082
  enabled: boolean;
5883
6083
  createdAt: Date;
@@ -6986,7 +7186,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6986
7186
  id: string;
6987
7187
  type: string;
6988
7188
  updatedAt: Date;
7189
+ createdByUserId: string | null;
6989
7190
  createdAt: Date;
7191
+ correlationId: string | null;
6990
7192
  profileId: string | null;
6991
7193
  title: string | null;
6992
7194
  preview: string | null;
@@ -6994,6 +7196,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6994
7196
  properties: unknown;
6995
7197
  systemData: unknown;
6996
7198
  version: number;
7199
+ createdByKind: ProvenanceKind | null;
7200
+ agentUserId: string | null;
7201
+ sourceProposalId: string | null;
6997
7202
  deletedAt: Date | null;
6998
7203
  }[];
6999
7204
  };
@@ -7032,8 +7237,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7032
7237
  workspaceId: string | null;
7033
7238
  id: string;
7034
7239
  type: string;
7240
+ createdByUserId: string | null;
7035
7241
  createdAt: Date;
7036
7242
  metadata: unknown;
7243
+ correlationId: string | null;
7244
+ createdByKind: ProvenanceKind | null;
7245
+ agentUserId: string | null;
7246
+ sourceProposalId: string | null;
7037
7247
  sourceEntityId: string | null;
7038
7248
  targetEntityId: string | null;
7039
7249
  sourceKind: RelationEndpointKind;
@@ -7071,8 +7281,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7071
7281
  workspaceId: string | null;
7072
7282
  id: string;
7073
7283
  type: string;
7284
+ createdByUserId: string | null;
7074
7285
  createdAt: Date;
7075
7286
  metadata: unknown;
7287
+ correlationId: string | null;
7288
+ createdByKind: ProvenanceKind | null;
7289
+ agentUserId: string | null;
7290
+ sourceProposalId: string | null;
7076
7291
  sourceEntityId: string | null;
7077
7292
  targetEntityId: string | null;
7078
7293
  sourceKind: RelationEndpointKind;
@@ -7097,7 +7312,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7097
7312
  id: string;
7098
7313
  type: string;
7099
7314
  updatedAt: Date;
7315
+ createdByUserId: string | null;
7100
7316
  createdAt: Date;
7317
+ correlationId: string | null;
7101
7318
  profileId: string | null;
7102
7319
  title: string | null;
7103
7320
  preview: string | null;
@@ -7105,6 +7322,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7105
7322
  properties: unknown;
7106
7323
  systemData: unknown;
7107
7324
  version: number;
7325
+ createdByKind: ProvenanceKind | null;
7326
+ agentUserId: string | null;
7327
+ sourceProposalId: string | null;
7108
7328
  deletedAt: Date | null;
7109
7329
  }[];
7110
7330
  };
@@ -7155,7 +7375,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7155
7375
  id: string;
7156
7376
  type: string;
7157
7377
  updatedAt: Date;
7378
+ createdByUserId: string | null;
7158
7379
  createdAt: Date;
7380
+ correlationId: string | null;
7159
7381
  profileId: string | null;
7160
7382
  title: string | null;
7161
7383
  preview: string | null;
@@ -7163,6 +7385,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7163
7385
  properties: unknown;
7164
7386
  systemData: unknown;
7165
7387
  version: number;
7388
+ createdByKind: ProvenanceKind | null;
7389
+ agentUserId: string | null;
7390
+ sourceProposalId: string | null;
7166
7391
  deletedAt: Date | null;
7167
7392
  } | null;
7168
7393
  label: string;
@@ -7280,7 +7505,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7280
7505
  id: string;
7281
7506
  type: string;
7282
7507
  updatedAt: Date;
7508
+ createdByUserId: string | null;
7283
7509
  createdAt: Date;
7510
+ correlationId: string | null;
7284
7511
  profileId: string | null;
7285
7512
  title: string | null;
7286
7513
  preview: string | null;
@@ -7288,6 +7515,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7288
7515
  properties: unknown;
7289
7516
  systemData: unknown;
7290
7517
  version: number;
7518
+ createdByKind: ProvenanceKind | null;
7519
+ agentUserId: string | null;
7520
+ sourceProposalId: string | null;
7291
7521
  deletedAt: Date | null;
7292
7522
  };
7293
7523
  relations: never[];
@@ -7300,7 +7530,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7300
7530
  id: string;
7301
7531
  type: string;
7302
7532
  updatedAt: Date;
7533
+ createdByUserId: string | null;
7303
7534
  createdAt: Date;
7535
+ correlationId: string | null;
7304
7536
  profileId: string | null;
7305
7537
  title: string | null;
7306
7538
  preview: string | null;
@@ -7308,6 +7540,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7308
7540
  properties: unknown;
7309
7541
  systemData: unknown;
7310
7542
  version: number;
7543
+ createdByKind: ProvenanceKind | null;
7544
+ agentUserId: string | null;
7545
+ sourceProposalId: string | null;
7311
7546
  deletedAt: Date | null;
7312
7547
  };
7313
7548
  relations: {
@@ -7315,8 +7550,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7315
7550
  workspaceId: string | null;
7316
7551
  id: string;
7317
7552
  type: string;
7553
+ createdByUserId: string | null;
7318
7554
  createdAt: Date;
7319
7555
  metadata: unknown;
7556
+ correlationId: string | null;
7557
+ createdByKind: ProvenanceKind | null;
7558
+ agentUserId: string | null;
7559
+ sourceProposalId: string | null;
7320
7560
  sourceEntityId: string | null;
7321
7561
  targetEntityId: string | null;
7322
7562
  sourceKind: RelationEndpointKind;
@@ -7347,7 +7587,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7347
7587
  id: string;
7348
7588
  type: string;
7349
7589
  updatedAt: Date;
7590
+ createdByUserId: string | null;
7350
7591
  createdAt: Date;
7592
+ correlationId: string | null;
7351
7593
  profileId: string | null;
7352
7594
  title: string | null;
7353
7595
  preview: string | null;
@@ -7355,6 +7597,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7355
7597
  properties: unknown;
7356
7598
  systemData: unknown;
7357
7599
  version: number;
7600
+ createdByKind: ProvenanceKind | null;
7601
+ agentUserId: string | null;
7602
+ sourceProposalId: string | null;
7358
7603
  deletedAt: Date | null;
7359
7604
  }[];
7360
7605
  relations: {
@@ -7362,8 +7607,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7362
7607
  workspaceId: string | null;
7363
7608
  id: string;
7364
7609
  type: string;
7610
+ createdByUserId: string | null;
7365
7611
  createdAt: Date;
7366
7612
  metadata: unknown;
7613
+ correlationId: string | null;
7614
+ createdByKind: ProvenanceKind | null;
7615
+ agentUserId: string | null;
7616
+ sourceProposalId: string | null;
7367
7617
  sourceEntityId: string | null;
7368
7618
  targetEntityId: string | null;
7369
7619
  sourceKind: RelationEndpointKind;
@@ -7392,8 +7642,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7392
7642
  workspaceId: string | null;
7393
7643
  id: string;
7394
7644
  type: string;
7645
+ createdByUserId: string | null;
7395
7646
  createdAt: Date;
7396
7647
  metadata: unknown;
7648
+ correlationId: string | null;
7649
+ createdByKind: ProvenanceKind | null;
7650
+ agentUserId: string | null;
7651
+ sourceProposalId: string | null;
7397
7652
  sourceEntityId: string | null;
7398
7653
  targetEntityId: string | null;
7399
7654
  sourceKind: RelationEndpointKind;
@@ -7468,9 +7723,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7468
7723
  includeArchived?: boolean | undefined;
7469
7724
  appId?: string | undefined;
7470
7725
  } | undefined;
7471
- output: {
7472
- role: string;
7473
- joinedAt: Date;
7726
+ output: ({
7474
7727
  name: string;
7475
7728
  id: string;
7476
7729
  type: string;
@@ -7488,7 +7741,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7488
7741
  subscriptionStatus: string | null;
7489
7742
  stripeCustomerId: string | null;
7490
7743
  archivedAt: Date | null;
7491
- }[];
7744
+ } & {
7745
+ role?: string;
7746
+ joinedAt?: Date;
7747
+ accessKind?: "member" | "pod_visible";
7748
+ })[];
7492
7749
  meta: object;
7493
7750
  }>;
7494
7751
  get: import("@trpc/server").TRPCQueryProcedure<{
@@ -7497,6 +7754,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7497
7754
  };
7498
7755
  output: {
7499
7756
  role: string;
7757
+ accessKind: string;
7500
7758
  name: string;
7501
7759
  id: string;
7502
7760
  type: string;
@@ -8010,6 +8268,17 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8010
8268
  profileEntityBentoTemplates?: Record<string, {
8011
8269
  blocks: Record<string, unknown>[];
8012
8270
  }> | undefined;
8271
+ workspacePurpose?: "personal" | "agent" | "project" | "library" | "operational" | undefined;
8272
+ workspaceSubtype?: string | undefined;
8273
+ workspaceVisibility?: "members" | "private" | "pod_visible" | "pod_joinable" | "public_link" | undefined;
8274
+ workspaceCapabilities?: string[] | undefined;
8275
+ sourceRoles?: Record<string, "provider" | "consumer" | "provider-consumer"> | undefined;
8276
+ defaultSources?: Record<string, {
8277
+ workspaceId: string;
8278
+ capability?: string | undefined;
8279
+ profileSlug?: string | undefined;
8280
+ label?: string | undefined;
8281
+ }> | undefined;
8013
8282
  entityLinks?: {
8014
8283
  sourceProfileSlug: string;
8015
8284
  targetProfileSlug: string;
@@ -8534,6 +8803,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8534
8803
  properties: unknown;
8535
8804
  systemData: unknown;
8536
8805
  version: number;
8806
+ createdByKind: ProvenanceKind | null;
8807
+ createdByUserId: string | null;
8808
+ agentUserId: string | null;
8809
+ sourceProposalId: string | null;
8810
+ correlationId: string | null;
8537
8811
  createdAt: Date;
8538
8812
  updatedAt: Date;
8539
8813
  deletedAt: Date | null;
@@ -8550,6 +8824,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8550
8824
  targetCellId: string | null;
8551
8825
  type: string;
8552
8826
  metadata: unknown;
8827
+ createdByKind: ProvenanceKind | null;
8828
+ createdByUserId: string | null;
8829
+ agentUserId: string | null;
8830
+ sourceProposalId: string | null;
8831
+ correlationId: string | null;
8553
8832
  createdAt: Date;
8554
8833
  }[];
8555
8834
  columns: ViewColumn[];
@@ -8587,6 +8866,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8587
8866
  embeddedViewIds?: string[] | undefined;
8588
8867
  schemaSnapshot?: Record<string, any> | undefined;
8589
8868
  snapshotUpdatedAt?: Date | undefined;
8869
+ metadata?: Record<string, any> | undefined;
8590
8870
  type?: string | undefined;
8591
8871
  };
8592
8872
  output: {
@@ -8992,7 +9272,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8992
9272
  id: string;
8993
9273
  type: string;
8994
9274
  updatedAt: Date;
9275
+ createdByUserId: string | null;
8995
9276
  createdAt: Date;
9277
+ correlationId: string | null;
8996
9278
  profileId: string | null;
8997
9279
  title: string | null;
8998
9280
  preview: string | null;
@@ -9000,6 +9282,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9000
9282
  properties: unknown;
9001
9283
  systemData: unknown;
9002
9284
  version: number;
9285
+ createdByKind: ProvenanceKind | null;
9286
+ agentUserId: string | null;
9287
+ sourceProposalId: string | null;
9003
9288
  deletedAt: Date | null;
9004
9289
  } | {
9005
9290
  name: string;
@@ -9042,6 +9327,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9042
9327
  id: string;
9043
9328
  updatedAt: Date;
9044
9329
  createdAt: Date;
9330
+ lastAccessedAt: Date | null;
9045
9331
  expiresAt: Date | null;
9046
9332
  createdBy: string;
9047
9333
  revokedAt: Date | null;
@@ -9055,7 +9341,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9055
9341
  access: string | null;
9056
9342
  invitedUsers: string[] | null;
9057
9343
  viewCount: number | null;
9058
- lastAccessedAt: Date | null;
9059
9344
  }[];
9060
9345
  resourceLabels: Record<string, string>;
9061
9346
  };
@@ -9065,13 +9350,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9065
9350
  input: {
9066
9351
  resourceType: "entity" | "document" | "view";
9067
9352
  resourceId: string;
9068
- visibility?: "public" | "private" | undefined;
9353
+ visibility?: "private" | "public" | undefined;
9069
9354
  expiresAt?: Date | undefined;
9070
9355
  };
9071
9356
  output: {
9072
9357
  id: string;
9073
9358
  updatedAt: Date;
9074
9359
  createdAt: Date;
9360
+ lastAccessedAt: Date | null;
9075
9361
  expiresAt: Date | null;
9076
9362
  createdBy: string;
9077
9363
  revokedAt: Date | null;
@@ -9085,7 +9371,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9085
9371
  access: string | null;
9086
9372
  invitedUsers: string[] | null;
9087
9373
  viewCount: number | null;
9088
- lastAccessedAt: Date | null;
9089
9374
  }[];
9090
9375
  meta: object;
9091
9376
  }>;
@@ -9464,7 +9749,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9464
9749
  createdAt: Date;
9465
9750
  documentId: string;
9466
9751
  version: number;
9752
+ storageUrl: string | null;
9753
+ storageKey: string | null;
9754
+ size: number;
9755
+ mimeType: string | null;
9467
9756
  content: string;
9757
+ checksum: string | null;
9468
9758
  author: string;
9469
9759
  authorId: string;
9470
9760
  }[];
@@ -9497,7 +9787,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9497
9787
  createdAt: Date;
9498
9788
  documentId: string;
9499
9789
  version: number;
9790
+ storageUrl: string | null;
9791
+ storageKey: string | null;
9792
+ size: number;
9793
+ mimeType: string | null;
9500
9794
  content: string;
9795
+ checksum: string | null;
9501
9796
  author: string;
9502
9797
  authorId: string;
9503
9798
  };
@@ -9506,6 +9801,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9506
9801
  message: string | null;
9507
9802
  author: string;
9508
9803
  createdAt: Date;
9804
+ hasStoredSnapshot: boolean;
9509
9805
  };
9510
9806
  };
9511
9807
  meta: object;
@@ -9877,10 +10173,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9877
10173
  id: string;
9878
10174
  createdAt: Date;
9879
10175
  metadata: unknown;
10176
+ messageId: string;
9880
10177
  relationshipType: string;
9881
10178
  targetType: string;
9882
10179
  targetId: string;
9883
- messageId: string;
9884
10180
  position: unknown;
9885
10181
  };
9886
10182
  meta: object;
@@ -9904,10 +10200,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9904
10200
  id: string;
9905
10201
  createdAt: Date;
9906
10202
  metadata: unknown;
10203
+ messageId: string;
9907
10204
  relationshipType: string;
9908
10205
  targetType: string;
9909
10206
  targetId: string;
9910
- messageId: string;
9911
10207
  position: unknown;
9912
10208
  }[];
9913
10209
  meta: object;
@@ -9923,10 +10219,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9923
10219
  id: string;
9924
10220
  createdAt: Date;
9925
10221
  metadata: unknown;
10222
+ messageId: string;
9926
10223
  relationshipType: string;
9927
10224
  targetType: string;
9928
10225
  targetId: string;
9929
- messageId: string;
9930
10226
  position: unknown;
9931
10227
  }[];
9932
10228
  meta: object;
@@ -9941,10 +10237,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9941
10237
  id: string;
9942
10238
  createdAt: Date;
9943
10239
  metadata: unknown;
10240
+ messageId: string;
9944
10241
  relationshipType: string;
9945
10242
  targetType: string;
9946
10243
  targetId: string;
9947
- messageId: string;
9948
10244
  position: unknown;
9949
10245
  }[];
9950
10246
  meta: object;
@@ -9962,10 +10258,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9962
10258
  id: string;
9963
10259
  createdAt: Date;
9964
10260
  metadata: unknown;
10261
+ messageId: string;
9965
10262
  relationshipType: string;
9966
10263
  targetType: string;
9967
10264
  targetId: string;
9968
- messageId: string;
9969
10265
  position: unknown;
9970
10266
  }[];
9971
10267
  meta: object;
@@ -10018,6 +10314,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10018
10314
  entityScope: "pod" | "workspace";
10019
10315
  defaultListRenderer: unknown;
10020
10316
  defaultDetailRenderer: unknown;
10317
+ defaultDashboardRenderer: unknown;
10318
+ defaultRenderers: Record<string, unknown>;
10021
10319
  }[];
10022
10320
  };
10023
10321
  meta: object;
@@ -10045,6 +10343,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10045
10343
  entityScope: "pod" | "workspace";
10046
10344
  defaultListRenderer: unknown;
10047
10345
  defaultDetailRenderer: unknown;
10346
+ defaultDashboardRenderer: unknown;
10347
+ defaultRenderers: Record<string, unknown>;
10048
10348
  };
10049
10349
  effectiveProperties: EffectiveProperty[];
10050
10350
  };
@@ -10083,6 +10383,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10083
10383
  entityScope: "pod" | "workspace";
10084
10384
  defaultListRenderer: unknown;
10085
10385
  defaultDetailRenderer: unknown;
10386
+ defaultDashboardRenderer: unknown;
10387
+ defaultRenderers: Record<string, unknown>;
10086
10388
  };
10087
10389
  existing: boolean;
10088
10390
  status?: undefined;
@@ -10113,6 +10415,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10113
10415
  entityScope: "pod" | "workspace";
10114
10416
  defaultListRenderer: unknown;
10115
10417
  defaultDetailRenderer: unknown;
10418
+ defaultDashboardRenderer: unknown;
10419
+ defaultRenderers: Record<string, unknown>;
10116
10420
  };
10117
10421
  existing?: undefined;
10118
10422
  status?: undefined;
@@ -10201,6 +10505,41 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10201
10505
  props?: Record<string, unknown> | undefined;
10202
10506
  title?: string | undefined;
10203
10507
  } | null | undefined;
10508
+ defaultDashboardRenderer?: {
10509
+ kind: "cell";
10510
+ cellKey: string;
10511
+ props: Record<string, unknown>;
10512
+ title?: string | undefined;
10513
+ displayMode?: string | undefined;
10514
+ rendererHint?: Record<string, unknown> | undefined;
10515
+ } | {
10516
+ kind: "view";
10517
+ viewId: string;
10518
+ title?: string | undefined;
10519
+ displayMode?: string | undefined;
10520
+ } | {
10521
+ kind: "iframe-srcdoc";
10522
+ appId: string;
10523
+ srcdoc: string;
10524
+ title?: string | undefined;
10525
+ props?: Record<string, unknown> | undefined;
10526
+ } | {
10527
+ kind: "external-app";
10528
+ appId: string;
10529
+ url: string;
10530
+ title?: string | undefined;
10531
+ props?: Record<string, unknown> | undefined;
10532
+ } | {
10533
+ kind: "url";
10534
+ url: string;
10535
+ external?: boolean | undefined;
10536
+ title?: string | undefined;
10537
+ } | {
10538
+ kind: "view-adapter";
10539
+ adapterKey: string;
10540
+ props?: Record<string, unknown> | undefined;
10541
+ title?: string | undefined;
10542
+ } | null | undefined;
10204
10543
  };
10205
10544
  output: {
10206
10545
  profile: {
@@ -10221,6 +10560,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10221
10560
  entityScope: "pod" | "workspace";
10222
10561
  defaultListRenderer: unknown;
10223
10562
  defaultDetailRenderer: unknown;
10563
+ defaultDashboardRenderer: unknown;
10564
+ defaultRenderers: Record<string, unknown>;
10224
10565
  };
10225
10566
  };
10226
10567
  meta: object;
@@ -10266,6 +10607,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10266
10607
  entityScope: "pod" | "workspace";
10267
10608
  defaultListRenderer: unknown;
10268
10609
  defaultDetailRenderer: unknown;
10610
+ defaultDashboardRenderer: unknown;
10611
+ defaultRenderers: Record<string, unknown>;
10269
10612
  }[];
10270
10613
  };
10271
10614
  meta: object;
@@ -10303,6 +10646,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10303
10646
  entityScope: "pod" | "workspace";
10304
10647
  defaultListRenderer: unknown;
10305
10648
  defaultDetailRenderer: unknown;
10649
+ defaultDashboardRenderer: unknown;
10650
+ defaultRenderers: Record<string, unknown>;
10306
10651
  }[];
10307
10652
  };
10308
10653
  meta: object;
@@ -10331,6 +10676,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10331
10676
  entityScope: "pod" | "workspace";
10332
10677
  defaultListRenderer: unknown;
10333
10678
  defaultDetailRenderer: unknown;
10679
+ defaultDashboardRenderer: unknown;
10680
+ defaultRenderers: Record<string, unknown>;
10334
10681
  }[];
10335
10682
  };
10336
10683
  meta: object;
@@ -10358,21 +10705,19 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10358
10705
  getEffectiveRenderers: import("@trpc/server").TRPCQueryProcedure<{
10359
10706
  input: {
10360
10707
  profileSlug: string;
10361
- slot?: "list" | "detail" | undefined;
10708
+ contentKind?: "entity-detail" | "entity-profile" | "collection" | undefined;
10362
10709
  };
10363
10710
  output: {
10364
- list: RendererRef;
10365
- detail: RendererRef | null;
10366
- } | {
10367
- list: RendererRef | null;
10368
- detail: RendererRef;
10711
+ "entity-detail": RendererRef | null;
10712
+ "entity-profile": RendererRef | null;
10713
+ collection: RendererRef | null;
10369
10714
  };
10370
10715
  meta: object;
10371
10716
  }>;
10372
10717
  setProfileRendererOverride: import("@trpc/server").TRPCMutationProcedure<{
10373
10718
  input: {
10374
10719
  profileSlug: string;
10375
- slot: "list" | "detail";
10720
+ contentKind: "entity-detail" | "entity-profile" | "collection";
10376
10721
  ref: {
10377
10722
  kind: "cell";
10378
10723
  cellKey: string;
@@ -10414,6 +10759,32 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10414
10759
  };
10415
10760
  meta: object;
10416
10761
  }>;
10762
+ resolveDashboard: import("@trpc/server").TRPCMutationProcedure<{
10763
+ input: {
10764
+ profileSlug: string;
10765
+ };
10766
+ output: {
10767
+ viewId: string;
10768
+ config: unknown;
10769
+ userAuthored: boolean;
10770
+ } | {
10771
+ viewId: null;
10772
+ config: null;
10773
+ userAuthored: boolean;
10774
+ };
10775
+ meta: object;
10776
+ }>;
10777
+ saveDashboard: import("@trpc/server").TRPCMutationProcedure<{
10778
+ input: {
10779
+ profileSlug: string;
10780
+ config: Record<string, any>;
10781
+ };
10782
+ output: {
10783
+ viewId: string;
10784
+ config: unknown;
10785
+ };
10786
+ meta: object;
10787
+ }>;
10417
10788
  }>>;
10418
10789
  propertyDefs: import("@trpc/server").TRPCBuiltRouter<{
10419
10790
  ctx: Context;
@@ -11303,6 +11674,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11303
11674
  createdAt: Date;
11304
11675
  version: string | null;
11305
11676
  isActive: boolean;
11677
+ role: WidgetRole;
11306
11678
  description: string | null;
11307
11679
  icon: string | null;
11308
11680
  category: string | null;
@@ -11322,6 +11694,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11322
11694
  } | null;
11323
11695
  deps: Record<string, string> | null;
11324
11696
  trustLevel: WidgetTrustLevel;
11697
+ contentKind: ContentKind;
11325
11698
  }[];
11326
11699
  meta: object;
11327
11700
  }>;
@@ -11338,6 +11711,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11338
11711
  createdAt: Date;
11339
11712
  version: string | null;
11340
11713
  isActive: boolean;
11714
+ role: WidgetRole;
11341
11715
  description: string | null;
11342
11716
  icon: string | null;
11343
11717
  category: string | null;
@@ -11357,9 +11731,22 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11357
11731
  } | null;
11358
11732
  deps: Record<string, string> | null;
11359
11733
  trustLevel: WidgetTrustLevel;
11734
+ contentKind: ContentKind;
11360
11735
  } | null;
11361
11736
  meta: object;
11362
11737
  }>;
11738
+ generateSource: import("@trpc/server").TRPCMutationProcedure<{
11739
+ input: {
11740
+ description: string;
11741
+ language?: "module" | "react" | undefined;
11742
+ existingCode?: string | undefined;
11743
+ };
11744
+ output: {
11745
+ source: string;
11746
+ language: "module" | "react";
11747
+ };
11748
+ meta: object;
11749
+ }>;
11363
11750
  upsert: import("@trpc/server").TRPCMutationProcedure<{
11364
11751
  input: {
11365
11752
  typeKey: string;
@@ -11368,6 +11755,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11368
11755
  icon?: string | undefined;
11369
11756
  category?: string | undefined;
11370
11757
  rendererType?: "builtin" | "iframe" | "native" | "frame" | undefined;
11758
+ contentKind?: "widget" | "entity-detail" | "entity-profile" | "collection" | undefined;
11371
11759
  rendererSource?: string | undefined;
11372
11760
  source?: string | undefined;
11373
11761
  deps?: Record<string, string> | undefined;
@@ -11391,6 +11779,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11391
11779
  createdAt: Date;
11392
11780
  version: string | null;
11393
11781
  isActive: boolean;
11782
+ role: WidgetRole;
11394
11783
  description: string | null;
11395
11784
  icon: string | null;
11396
11785
  category: string | null;
@@ -11410,6 +11799,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11410
11799
  } | null;
11411
11800
  deps: Record<string, string> | null;
11412
11801
  trustLevel: WidgetTrustLevel;
11802
+ contentKind: ContentKind;
11413
11803
  };
11414
11804
  meta: object;
11415
11805
  }>;
@@ -11730,6 +12120,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11730
12120
  };
11731
12121
  meta: object;
11732
12122
  }>;
12123
+ batchProgressRoom: import("@trpc/server").TRPCQueryProcedure<{
12124
+ input: void;
12125
+ output: {
12126
+ event: "import:file:progress";
12127
+ room: string;
12128
+ description: string;
12129
+ };
12130
+ meta: object;
12131
+ }>;
11733
12132
  }>>;
11734
12133
  connectors: import("@trpc/server").TRPCBuiltRouter<{
11735
12134
  ctx: Context;
@@ -11993,7 +12392,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11993
12392
  userId: string;
11994
12393
  type: string;
11995
12394
  category: "data" | "system" | "ai" | "governance" | "inbox";
11996
- priority: "low" | "normal" | "high" | "urgent";
12395
+ priority: "normal" | "low" | "high" | "urgent";
11997
12396
  title: string;
11998
12397
  body: string;
11999
12398
  icon: string | null;
@@ -12025,7 +12424,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
12025
12424
  userId: string;
12026
12425
  type: string;
12027
12426
  category: "data" | "system" | "ai" | "governance" | "inbox";
12028
- priority: "low" | "normal" | "high" | "urgent";
12427
+ priority: "normal" | "low" | "high" | "urgent";
12029
12428
  title: string;
12030
12429
  body: string;
12031
12430
  icon: string | null;
@@ -12982,7 +13381,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
12982
13381
  }>;
12983
13382
  saveProviderApiKey: import("@trpc/server").TRPCMutationProcedure<{
12984
13383
  input: {
12985
- providerType: "anthropic" | "openrouter" | "openai";
13384
+ providerType: "openai" | "anthropic" | "openrouter";
12986
13385
  apiKey: string;
12987
13386
  };
12988
13387
  output: {
@@ -13379,6 +13778,233 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
13379
13778
  meta: object;
13380
13779
  }>;
13381
13780
  }>>;
13781
+ aiProviders: import("@trpc/server").TRPCBuiltRouter<{
13782
+ ctx: Context;
13783
+ meta: object;
13784
+ errorShape: {
13785
+ message: string;
13786
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
13787
+ data: import("@trpc/server").TRPCDefaultErrorData;
13788
+ };
13789
+ transformer: true;
13790
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
13791
+ list: import("@trpc/server").TRPCQueryProcedure<{
13792
+ input: void;
13793
+ output: {
13794
+ hasApiKey: boolean;
13795
+ name: string;
13796
+ id: string;
13797
+ updatedAt: Date;
13798
+ createdAt: Date;
13799
+ metadata: Record<string, unknown>;
13800
+ priority: number;
13801
+ tags: string[];
13802
+ enabled: boolean;
13803
+ providerId: string;
13804
+ baseUrl: string;
13805
+ apiKeyEnvVar: string;
13806
+ models: AiProviderModelEntry[];
13807
+ rateLimit: {
13808
+ rpm: number;
13809
+ rpd?: number;
13810
+ } | null;
13811
+ extraBody: Record<string, unknown> | null;
13812
+ systemPromptPrefix: string | null;
13813
+ }[];
13814
+ meta: object;
13815
+ }>;
13816
+ upsert: import("@trpc/server").TRPCMutationProcedure<{
13817
+ input: {
13818
+ providerId: string;
13819
+ name: string;
13820
+ baseUrl: string;
13821
+ apiKeyEnvVar: string;
13822
+ apiKey?: string | undefined;
13823
+ enabled?: boolean | undefined;
13824
+ priority?: number | undefined;
13825
+ tags?: string[] | undefined;
13826
+ models?: {
13827
+ id: string;
13828
+ tier?: "free" | "balanced" | "advanced" | "complex" | undefined;
13829
+ contextWindow?: number | undefined;
13830
+ supportsTools?: boolean | undefined;
13831
+ supportsJson?: boolean | undefined;
13832
+ costPer1MInput?: number | undefined;
13833
+ costPer1MOutput?: number | undefined;
13834
+ }[] | undefined;
13835
+ rateLimit?: {
13836
+ rpm: number;
13837
+ rpd?: number | undefined;
13838
+ } | undefined;
13839
+ extraBody?: Record<string, unknown> | undefined;
13840
+ systemPromptPrefix?: string | undefined;
13841
+ metadata?: Record<string, unknown> | undefined;
13842
+ };
13843
+ output: {
13844
+ hasApiKey: boolean;
13845
+ name: string;
13846
+ id: string;
13847
+ updatedAt: Date;
13848
+ createdAt: Date;
13849
+ metadata: Record<string, unknown>;
13850
+ priority: number;
13851
+ tags: string[];
13852
+ enabled: boolean;
13853
+ providerId: string;
13854
+ baseUrl: string;
13855
+ apiKeyEnvVar: string;
13856
+ models: AiProviderModelEntry[];
13857
+ rateLimit: {
13858
+ rpm: number;
13859
+ rpd?: number;
13860
+ } | null;
13861
+ extraBody: Record<string, unknown> | null;
13862
+ systemPromptPrefix: string | null;
13863
+ };
13864
+ meta: object;
13865
+ }>;
13866
+ enable: import("@trpc/server").TRPCMutationProcedure<{
13867
+ input: {
13868
+ providerId: string;
13869
+ };
13870
+ output: {
13871
+ ok: boolean;
13872
+ };
13873
+ meta: object;
13874
+ }>;
13875
+ disable: import("@trpc/server").TRPCMutationProcedure<{
13876
+ input: {
13877
+ providerId: string;
13878
+ };
13879
+ output: {
13880
+ ok: boolean;
13881
+ };
13882
+ meta: object;
13883
+ }>;
13884
+ remove: import("@trpc/server").TRPCMutationProcedure<{
13885
+ input: {
13886
+ providerId: string;
13887
+ };
13888
+ output: {
13889
+ ok: boolean;
13890
+ };
13891
+ meta: object;
13892
+ }>;
13893
+ probe: import("@trpc/server").TRPCMutationProcedure<{
13894
+ input: {
13895
+ providerId: string;
13896
+ };
13897
+ output: {
13898
+ ok: boolean;
13899
+ models: string[];
13900
+ latencyMs: number;
13901
+ error?: string;
13902
+ };
13903
+ meta: object;
13904
+ }>;
13905
+ sync: import("@trpc/server").TRPCMutationProcedure<{
13906
+ input: void;
13907
+ output: {
13908
+ ok: boolean;
13909
+ count: number;
13910
+ };
13911
+ meta: object;
13912
+ }>;
13913
+ }>>;
13914
+ aiProviderCredentials: import("@trpc/server").TRPCBuiltRouter<{
13915
+ ctx: Context;
13916
+ meta: object;
13917
+ errorShape: {
13918
+ message: string;
13919
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
13920
+ data: import("@trpc/server").TRPCDefaultErrorData;
13921
+ };
13922
+ transformer: true;
13923
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
13924
+ listForWorkspace: import("@trpc/server").TRPCQueryProcedure<{
13925
+ input: {
13926
+ workspaceId: string;
13927
+ };
13928
+ output: (Omit<{
13929
+ userId: string | null;
13930
+ workspaceId: string | null;
13931
+ id: string;
13932
+ updatedAt: Date;
13933
+ createdAt: Date;
13934
+ createdBy: string;
13935
+ priority: number;
13936
+ enabled: boolean;
13937
+ providerId: string;
13938
+ encryptedApiKey: string;
13939
+ }, "encryptedApiKey"> & {
13940
+ hasApiKey: true;
13941
+ })[];
13942
+ meta: object;
13943
+ }>;
13944
+ upsertForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
13945
+ input: {
13946
+ providerId: string;
13947
+ apiKey: string;
13948
+ workspaceId: string;
13949
+ enabled?: boolean | undefined;
13950
+ priority?: number | undefined;
13951
+ };
13952
+ output: {
13953
+ ok: boolean;
13954
+ };
13955
+ meta: object;
13956
+ }>;
13957
+ removeForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
13958
+ input: {
13959
+ workspaceId: string;
13960
+ providerId: string;
13961
+ };
13962
+ output: {
13963
+ ok: boolean;
13964
+ };
13965
+ meta: object;
13966
+ }>;
13967
+ listForUser: import("@trpc/server").TRPCQueryProcedure<{
13968
+ input: void;
13969
+ output: (Omit<{
13970
+ userId: string | null;
13971
+ workspaceId: string | null;
13972
+ id: string;
13973
+ updatedAt: Date;
13974
+ createdAt: Date;
13975
+ createdBy: string;
13976
+ priority: number;
13977
+ enabled: boolean;
13978
+ providerId: string;
13979
+ encryptedApiKey: string;
13980
+ }, "encryptedApiKey"> & {
13981
+ hasApiKey: true;
13982
+ })[];
13983
+ meta: object;
13984
+ }>;
13985
+ upsertForUser: import("@trpc/server").TRPCMutationProcedure<{
13986
+ input: {
13987
+ providerId: string;
13988
+ apiKey: string;
13989
+ enabled?: boolean | undefined;
13990
+ priority?: number | undefined;
13991
+ workspaceId?: string | undefined;
13992
+ };
13993
+ output: {
13994
+ ok: boolean;
13995
+ };
13996
+ meta: object;
13997
+ }>;
13998
+ removeForUser: import("@trpc/server").TRPCMutationProcedure<{
13999
+ input: {
14000
+ providerId: string;
14001
+ };
14002
+ output: {
14003
+ ok: boolean;
14004
+ };
14005
+ meta: object;
14006
+ }>;
14007
+ }>>;
13382
14008
  }>>;
13383
14009
  export type AppRouter = typeof coreRouter;
13384
14010