@synap-core/api-types 1.14.2 → 1.15.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.
@@ -82,6 +82,7 @@ export interface Context {
82
82
  */
83
83
  export interface AgentMetadata {
84
84
  agentType: string;
85
+ agentTemplate?: "twin" | "assistant" | "custom";
85
86
  description?: string;
86
87
  createdByUserId: string;
87
88
  capabilities?: string[];
@@ -90,6 +91,24 @@ export interface AgentMetadata {
90
91
  writesRequireProposal?: boolean;
91
92
  activePersonality?: string;
92
93
  }
94
+ /**
95
+ * Relations Schema - The Knowledge Graph Edges
96
+ *
97
+ * Links between entities, forming the knowledge graph.
98
+ *
99
+ * PostgreSQL-only schema with Row-Level Security (RLS) for multi-user support.
100
+ */
101
+ /**
102
+ * The kind of object on one end of a relation edge.
103
+ *
104
+ * Relations are polymorphic: each endpoint is EITHER an entity (kind='entity',
105
+ * resolved via {source,target}EntityId — the original, default behavior) OR a
106
+ * cell instance (kind='cell', resolved via {source,target}CellId).
107
+ *
108
+ * Existing relations default to 'entity' on both ends and keep working
109
+ * unchanged — the entity columns stay populated and the cell columns are NULL.
110
+ */
111
+ export type RelationEndpointKind = "entity" | "cell";
93
112
  declare const ChannelType: {
94
113
  readonly THREAD: "thread";
95
114
  readonly PERSONAL: "personal";
@@ -97,6 +116,7 @@ declare const ChannelType: {
97
116
  readonly FEED: "feed";
98
117
  readonly EXTERNAL: "external";
99
118
  readonly AGENT_COLLAB: "agent_collab";
119
+ readonly GROUP: "group";
100
120
  };
101
121
  export type ChannelType = (typeof ChannelType)[keyof typeof ChannelType];
102
122
  declare const ChannelScope: {
@@ -116,6 +136,12 @@ declare const ChannelStatus: {
116
136
  readonly ARCHIVED: "archived";
117
137
  };
118
138
  export type ChannelStatus = (typeof ChannelStatus)[keyof typeof ChannelStatus];
139
+ declare const AiReactionMode: {
140
+ readonly ONLY_MENTIONED: "only_mentioned";
141
+ readonly WHEN_CONFIDENT: "when_confident";
142
+ readonly OFF: "off";
143
+ };
144
+ export type AiReactionMode = (typeof AiReactionMode)[keyof typeof AiReactionMode];
119
145
  /** Channel row — explicit interface so consumers don't need drizzle-orm to resolve it. */
120
146
  export interface Channel {
121
147
  id: string;
@@ -130,6 +156,7 @@ export interface Channel {
130
156
  parentChannelId: string | null;
131
157
  branchedFromMessageId: string | null;
132
158
  branchPurpose: string | null;
159
+ aiReactionMode: AiReactionMode;
133
160
  assignedAgentId: string | null;
134
161
  senderAgentId: string | null;
135
162
  status: ChannelStatus;
@@ -311,9 +338,30 @@ export interface ProactiveAiPreferences {
311
338
  };
312
339
  /** Controls how many proactive nudges the AI sends. Default: "balanced" */
313
340
  nudgeDensity: ProactiveNudgeDensity;
341
+ /**
342
+ * Event-driven proactive triggers (Feature C). Each toggle opts the workspace
343
+ * into reacting to a class of user action. Time-based features above
344
+ * (morningBriefing/weeklyDigest/healthCheck) are independent of these.
345
+ * All default OFF — proactive event reactions are opt-in.
346
+ */
347
+ triggers?: ProactiveAiTriggers;
314
348
  /** ISO 8601 timestamp — snooze all proactive AI until this time */
315
349
  mutedUntil?: string;
316
350
  }
351
+ /**
352
+ * Per-event opt-in toggles for event-driven proactive AI (Feature C).
353
+ * Keyed by the validated event that fires the proactive scan.
354
+ */
355
+ export interface ProactiveAiTriggers {
356
+ /** N captures sharing a topic → propose a Question to track them. */
357
+ captureCluster?: boolean;
358
+ /** Task moved to done → connect it back to its decision/research. */
359
+ taskCompleted?: boolean;
360
+ /** New Question created → suggest research from existing captures. */
361
+ questionCreated?: boolean;
362
+ /** New Decision created → auto-link the research that informed it. */
363
+ decisionCreated?: boolean;
364
+ }
317
365
  /**
318
366
  * Which surface(s) receive a signal.
319
367
  * - feed → proactive feed channel (AI-initiated messages)
@@ -341,6 +389,42 @@ export interface DeliveryPreferences {
341
389
  /** IS agent-generated insights (via /proactive/post) */
342
390
  ai_insight?: SignalDeliveryRule;
343
391
  }
392
+ /**
393
+ * Match criteria for an agent-routing rule. Every DEFINED field must equal the
394
+ * dispatch context (undefined = wildcard). A trailing "*" on a value is a prefix
395
+ * match (e.g. eventPattern "entity.update.*"). First matching rule wins.
396
+ */
397
+ export interface AgentRoutingMatch {
398
+ /** Entity/task type (e.g. "task", "devplane_feature") */
399
+ taskType?: string;
400
+ /** Profile slug of the subject entity */
401
+ profileSlug?: string;
402
+ /** Typed event name/pattern (e.g. "entity.update.completed") */
403
+ eventPattern?: string;
404
+ /** Channel type, when dispatch originates from a channel */
405
+ channelType?: string;
406
+ /** State transition guards (e.g. agent_status from/to) */
407
+ fromState?: string;
408
+ toState?: string;
409
+ }
410
+ export interface AgentRoutingRule {
411
+ match: AgentRoutingMatch;
412
+ /** Stable agent slug (portable across pods) the matched work dispatches to */
413
+ agentSlug: string;
414
+ }
415
+ /**
416
+ * Workspace-level agent routing: "this kind of task/event → this registered agent".
417
+ * The canonical replacement for runtime-specific hardwiring (e.g. Hermes-only
418
+ * dispatch). Resolution: first matching rule → defaultAgentSlug → plain IS fallback.
419
+ * Resolved by resolveAgentForTask() in @synap/intelligence-client. Any workspace
420
+ * can use this for automation, not just DevPlane.
421
+ */
422
+ export interface AgentRoutingPolicy {
423
+ /** Agent slug used when no rule matches */
424
+ defaultAgentSlug?: string;
425
+ /** Ordered rules; first match wins */
426
+ rules?: AgentRoutingRule[];
427
+ }
344
428
  export interface WorkspaceSettings {
345
429
  defaultEntityTypes?: string[];
346
430
  theme?: string;
@@ -368,6 +452,30 @@ export interface WorkspaceSettings {
368
452
  profileEntityBentoTemplates?: Record<string, {
369
453
  blocks: Array<Record<string, unknown>>;
370
454
  }>;
455
+ /**
456
+ * Per-profile renderer override for THIS workspace (Profile Renderer North Star).
457
+ * Each value is a RendererTarget (from @synap-core/renderer-runtime). Stored as
458
+ * Record<string, unknown> here to avoid pulling a frontend type into the schema
459
+ * package — runtime validation lives in the routers and the canonical type is
460
+ * re-exported by @synap-core/profile-renderer.
461
+ *
462
+ * Resolution chain in ProfileResolutionService.getEffectiveRenderer():
463
+ * 1. this workspace overlay (profileRenderers[slug][slot])
464
+ * 2. profile system default (profiles.default_list_renderer / .default_detail_renderer)
465
+ * 3. hardcoded system fallback
466
+ *
467
+ * Example:
468
+ * {
469
+ * "contact": { detail: { kind: "cell", cellKey: "form-detail", props: {} } },
470
+ * "task": { list: { kind: "view", viewId: "uuid-task-kanban" } }
471
+ * }
472
+ *
473
+ * Spec: synap-team-docs/content/team/platform/profile-renderer.mdx
474
+ */
475
+ profileRenderers?: Record<string, {
476
+ list?: Record<string, unknown>;
477
+ detail?: Record<string, unknown>;
478
+ }>;
371
479
  /** UUID of the main whiteboard view for this workspace */
372
480
  mainWhiteboardId?: string;
373
481
  /**
@@ -385,6 +493,12 @@ export interface WorkspaceSettings {
385
493
  * Kept separate from Synap internal intelligence service routing.
386
494
  */
387
495
  eveProviderRouting?: EveProviderRoutingPolicy;
496
+ /**
497
+ * Workspace-level agent routing: "this kind of task/event → this agent".
498
+ * Resolved by resolveAgentForTask() in @synap/intelligence-client. Decouples
499
+ * automation from any single runtime (Hermes becomes one registered target).
500
+ */
501
+ agentRouting?: AgentRoutingPolicy;
388
502
  validationRules?: {
389
503
  [tableName: string]: {
390
504
  create?: boolean;
@@ -548,8 +662,23 @@ export interface WorkspaceSettings {
548
662
  autoApprove?: boolean;
549
663
  maxAgentsPerUser?: number;
550
664
  allowAgentCreation?: boolean;
665
+ /** When true, any workspace member can create their own twin agent without admin approval. Default: false */
666
+ allowSelfServiceTwin?: boolean;
551
667
  /** Who can approve AI proposals. Default: "owner_and_admins" */
552
668
  proposalApprovalPolicy?: "owner_and_admins" | "any_editor" | "admins_only";
669
+ /**
670
+ * Controls whether AI navigation commands (e.g. [[open:side|view:UUID]])
671
+ * execute automatically or require user confirmation.
672
+ */
673
+ navigationPermissions?: {
674
+ /** When true, AI-suggested panel/surface opens happen immediately without confirmation. */
675
+ autoApprove: boolean;
676
+ /**
677
+ * Resource types the AI is allowed to suggest opening.
678
+ * All types are allowed by default when this field is absent.
679
+ */
680
+ allowedResourceTypes?: Array<"entity" | "view" | "doc" | "cell" | "channel" | "automation">;
681
+ };
553
682
  };
554
683
  /** Settings for the DevPlane app embedded in this workspace */
555
684
  devplane?: {
@@ -1033,7 +1162,23 @@ declare enum ProfileScope {
1033
1162
  * 1. IS config generation/validation
1034
1163
  * 2. Settings form auto-generation in the frontend
1035
1164
  */
1036
- export type WidgetRendererType = "builtin" | "iframe" | "native";
1165
+ export type WidgetRendererType = "builtin" | "iframe" | "native" | "frame";
1166
+ /**
1167
+ * Trust level of a widget/cell definition — the server-side authority for
1168
+ * whether a framed view's mutation may execute directly or must propose.
1169
+ *
1170
+ * Mirrors `AppTrustLevel` from `@synap-core/overlay-protocol`. Trust is
1171
+ * assigned by a human-approved event (marketplace install) — NEVER self-claimed
1172
+ * by the frame and NEVER taken from a request body.
1173
+ *
1174
+ * - "trusted" → first-party / user-authored: may act directly in-envelope.
1175
+ * - "installed" → human-approved marketplace install: proposes.
1176
+ * - "generated" → AI-generated, unreviewed: proposes (most conservative).
1177
+ *
1178
+ * Default is the most conservative ("generated") so an un-migrated or
1179
+ * unspecified row can never write directly.
1180
+ */
1181
+ export type WidgetTrustLevel = "trusted" | "installed" | "generated";
1037
1182
  export interface PodIntelligenceDefaults {
1038
1183
  chatModelId: string | null;
1039
1184
  reasoningModelId: string | null;
@@ -1049,6 +1194,49 @@ export interface PodProactiveDefaults {
1049
1194
  healthCheck: boolean;
1050
1195
  };
1051
1196
  }
1197
+ /**
1198
+ * Cell Instances Schema — The Universal Rendering Unit (persisted)
1199
+ *
1200
+ * A `cell_instance` is a concrete, addressable instance of a cell type living
1201
+ * in a workspace. Where `widget_definitions` describes a cell *type* (the
1202
+ * template / renderer), a `cell_instance` is an actual placed/standalone cell
1203
+ * with its own config, optional name, and optional backing document.
1204
+ *
1205
+ * Two complementary persistence paths:
1206
+ * 1. `config` (JSONB) — declarative cell config (the common case: composed
1207
+ * cells, charts, maps, embeds referencing other instanceIds, etc.).
1208
+ * 2. `sourceDocumentId` — for content-bearing cells (e.g. an `html-embed`
1209
+ * cell), the versioned HTML/markdown lives in a `documents` row (MinIO +
1210
+ * document_versions), and the cell references it. This reuses the existing
1211
+ * document storage path — cells never invent their own blob storage.
1212
+ *
1213
+ * `isTemplate` marks an instance as a reusable template (duplicated into fresh
1214
+ * instances rather than rendered directly).
1215
+ *
1216
+ * Governance fields mirror `widget_definitions`:
1217
+ * - `createdByKind` — provenance: 'user' | 'agent' | 'system'
1218
+ * - `trustLevel` — server-side authority for whether the cell may write
1219
+ * directly or must propose. Conservative by default for
1220
+ * agent/marketplace origins.
1221
+ */
1222
+ /**
1223
+ * Who created the cell instance. Provenance only — NOT a write gate by itself
1224
+ * (the gate is `trustLevel` + the governance check in the API layer).
1225
+ */
1226
+ export type CellInstanceCreatedByKind = "user" | "agent" | "system";
1227
+ /**
1228
+ * Server-side trust authority for governing a cell instance's writes.
1229
+ *
1230
+ * Mirrors `WidgetTrustLevel`:
1231
+ * - "trusted" → first-party / user-authored: may act directly in-envelope.
1232
+ * - "installed" → human-approved marketplace install: proposes.
1233
+ * - "generated" → AI-generated, unreviewed: proposes (most conservative).
1234
+ *
1235
+ * Default is "trusted" because the canonical create path is a user action; the
1236
+ * agent (Hub Protocol) path sets a conservative level explicitly and is routed
1237
+ * through `checkPermissionOrPropose()`.
1238
+ */
1239
+ export type CellInstanceTrustLevel = "trusted" | "installed" | "generated";
1052
1240
  /**
1053
1241
  * EventRecord - Database representation of an event
1054
1242
  *
@@ -1087,6 +1275,56 @@ export interface EffectiveProperty extends PropertyDef {
1087
1275
  defaultValue: unknown;
1088
1276
  displayOrder: number;
1089
1277
  }
1278
+ /**
1279
+ * RendererRef — what a profile or workspace stores as its renderer choice
1280
+ * for a (slot, profile) pair.
1281
+ *
1282
+ * Structural mirror of `RendererTarget` from `@synap-core/renderer-runtime`.
1283
+ * Kept as a structural type in the database layer (rather than importing the
1284
+ * frontend package) so the schema package stays UI-free. The canonical type
1285
+ * lives in `@synap-core/renderer-runtime` and is re-exported by
1286
+ * `@synap-core/profile-renderer` as `RendererRef`.
1287
+ *
1288
+ * Stored as JSONB on `profiles.default_(list|detail)_renderer` and inside
1289
+ * `workspaces.settings.profileRenderers[slug]`.
1290
+ *
1291
+ * Spec: synap-team-docs/content/team/platform/profile-renderer.mdx
1292
+ */
1293
+ export type RendererRef = {
1294
+ kind: "cell";
1295
+ cellKey: string;
1296
+ props: Record<string, unknown>;
1297
+ title?: string;
1298
+ displayMode?: string;
1299
+ rendererHint?: Record<string, unknown>;
1300
+ } | {
1301
+ kind: "view";
1302
+ viewId: string;
1303
+ title?: string;
1304
+ displayMode?: string;
1305
+ } | {
1306
+ kind: "iframe-srcdoc";
1307
+ appId: string;
1308
+ srcdoc: string;
1309
+ title?: string;
1310
+ props?: Record<string, unknown>;
1311
+ } | {
1312
+ kind: "external-app";
1313
+ appId: string;
1314
+ url: string;
1315
+ title?: string;
1316
+ props?: Record<string, unknown>;
1317
+ } | {
1318
+ kind: "url";
1319
+ url: string;
1320
+ external?: boolean;
1321
+ title?: string;
1322
+ } | {
1323
+ kind: "view-adapter";
1324
+ adapterKey: string;
1325
+ props?: Record<string, unknown>;
1326
+ title?: string;
1327
+ };
1090
1328
  /**
1091
1329
  * Column definition for views
1092
1330
  */
@@ -1289,6 +1527,32 @@ export interface ProposalReviewEvent {
1289
1527
  source?: string;
1290
1528
  correlationId?: string;
1291
1529
  }
1530
+ /**
1531
+ * Reviewable, frontend-facing summary of a COMPOSITE (graph) proposal.
1532
+ *
1533
+ * A composite proposal's `data` is `{ operations: [...] }`, which the flat
1534
+ * `ProposalReviewChange[]` cannot express. This carries the graph so the review
1535
+ * UI can render the entities and relations that approval would materialize.
1536
+ *
1537
+ * PINNED CONTRACT — the frontend mirrors this shape exactly; do not change field
1538
+ * names/shapes without updating the frontend in lockstep.
1539
+ */
1540
+ export interface ProposalReviewGraph {
1541
+ entities: Array<{
1542
+ ref: string;
1543
+ profileSlug: string;
1544
+ title: string;
1545
+ propertyCount: number;
1546
+ hasContent: boolean;
1547
+ }>;
1548
+ relations: Array<{
1549
+ type: string;
1550
+ sourceLabel: string;
1551
+ targetLabel: string;
1552
+ }>;
1553
+ entityCount: number;
1554
+ relationCount: number;
1555
+ }
1292
1556
  export interface ProposalReviewModel {
1293
1557
  summary: string;
1294
1558
  actorName?: string;
@@ -1304,6 +1568,11 @@ export interface ProposalReviewModel {
1304
1568
  validatedEventId?: string;
1305
1569
  completedEventId?: string;
1306
1570
  changes: ProposalReviewChange[];
1571
+ /**
1572
+ * Present ONLY for composite (graph) proposals. When set, `changes` may be
1573
+ * empty and the graph carries the reviewable content.
1574
+ */
1575
+ graph?: ProposalReviewGraph;
1307
1576
  events: ProposalReviewEvent[];
1308
1577
  }
1309
1578
  declare enum MessageLinkTargetType {
@@ -1395,24 +1664,256 @@ declare const SystemEventTypes: {
1395
1664
  readonly WEBHOOK_DELIVERY: "webhooks.deliver.requested";
1396
1665
  };
1397
1666
  export type SystemEventType = (typeof SystemEventTypes)[keyof typeof SystemEventTypes];
1667
+ /**
1668
+ * Metadata carried by every event catalog entry.
1669
+ * Used by automation trigger pickers in the frontend.
1670
+ */
1671
+ export interface EventDefinition {
1672
+ type: string;
1673
+ label: string;
1674
+ domain: string;
1675
+ description: string;
1676
+ filterKeys?: string[];
1677
+ }
1398
1678
  declare const OperationalEventTypes: {
1399
- readonly ENTITY_CREATED: "entity.create.completed";
1400
- readonly ENTITY_UPDATED: "entity.update.completed";
1401
- readonly ENTITY_DELETED: "entity.delete.completed";
1402
- readonly PROPOSAL_CREATED: "proposal.created.completed";
1403
- readonly PROPOSAL_APPROVED: "proposal.approved.completed";
1404
- readonly PROPOSAL_REJECTED: "proposal.rejected.completed";
1405
- readonly RELATION_CREATED: "relation.create.completed";
1406
- readonly RELATION_DELETED: "relation.delete.completed";
1407
- readonly CAPTURE_COMPLETE: "capture.complete.completed";
1408
- readonly CONNECTOR_SYNC_COMPLETE: "connector_sync.complete.completed";
1409
- readonly PROACTIVE_POST: "proactive.post.completed";
1410
- readonly NOTIFICATION_CREATED: "notification.created";
1411
- readonly CHANNEL_MESSAGE_CREATED: "channel_message.created.completed";
1412
- /** Fires once per entity created from the feed pipeline (post-classification, post-threshold). */
1413
- readonly FEED_NEW_ITEM: "feed.new_item.completed";
1679
+ readonly ENTITY_CREATED: {
1680
+ readonly type: "entity.create.completed";
1681
+ readonly label: "Entity created";
1682
+ readonly domain: "Entity";
1683
+ readonly description: "Fires after any entity is successfully created.";
1684
+ readonly filterKeys: [
1685
+ "profileSlug"
1686
+ ];
1687
+ };
1688
+ readonly ENTITY_UPDATED: {
1689
+ readonly type: "entity.update.completed";
1690
+ readonly label: "Entity updated";
1691
+ readonly domain: "Entity";
1692
+ readonly description: "Fires after any entity field or property is updated.";
1693
+ readonly filterKeys: [
1694
+ "profileSlug",
1695
+ "changedKeys",
1696
+ "changed.<fieldName>",
1697
+ "<fieldName>"
1698
+ ];
1699
+ };
1700
+ readonly ENTITY_DELETED: {
1701
+ readonly type: "entity.delete.completed";
1702
+ readonly label: "Entity deleted";
1703
+ readonly domain: "Entity";
1704
+ readonly description: "Fires after an entity is permanently deleted.";
1705
+ readonly filterKeys: [
1706
+ "profileSlug"
1707
+ ];
1708
+ };
1709
+ readonly PROPOSAL_CREATED: {
1710
+ readonly type: "proposal.created.completed";
1711
+ readonly label: "Proposal created";
1712
+ readonly domain: "Proposals";
1713
+ readonly description: "A new AI proposal is pending review.";
1714
+ readonly filterKeys: [
1715
+ "proposalStatus",
1716
+ "targetType",
1717
+ "changeType"
1718
+ ];
1719
+ };
1720
+ readonly PROPOSAL_APPROVED: {
1721
+ readonly type: "proposal.approved.completed";
1722
+ readonly label: "Proposal approved";
1723
+ readonly domain: "Proposals";
1724
+ readonly description: "An AI proposal was approved and applied.";
1725
+ readonly filterKeys: [
1726
+ "proposalStatus",
1727
+ "targetType"
1728
+ ];
1729
+ };
1730
+ readonly PROPOSAL_REJECTED: {
1731
+ readonly type: "proposal.rejected.completed";
1732
+ readonly label: "Proposal rejected";
1733
+ readonly domain: "Proposals";
1734
+ readonly description: "An AI proposal was rejected.";
1735
+ readonly filterKeys: [
1736
+ "proposalStatus",
1737
+ "targetType"
1738
+ ];
1739
+ };
1740
+ readonly RELATION_CREATED: {
1741
+ readonly type: "relation.create.completed";
1742
+ readonly label: "Relation created";
1743
+ readonly domain: "Relations";
1744
+ readonly description: "Two entities were linked.";
1745
+ readonly filterKeys: [
1746
+ "relationType"
1747
+ ];
1748
+ };
1749
+ readonly RELATION_DELETED: {
1750
+ readonly type: "relation.delete.completed";
1751
+ readonly label: "Relation deleted";
1752
+ readonly domain: "Relations";
1753
+ readonly description: "A relation between entities was removed.";
1754
+ readonly filterKeys: [
1755
+ "relationType"
1756
+ ];
1757
+ };
1758
+ readonly DOCUMENT_CREATED: {
1759
+ readonly type: "document.create.completed";
1760
+ readonly label: "Document created";
1761
+ readonly domain: "Documents";
1762
+ readonly description: "Fires after a document is created.";
1763
+ readonly filterKeys: [
1764
+ "profileSlug"
1765
+ ];
1766
+ };
1767
+ readonly DOCUMENT_UPDATED: {
1768
+ readonly type: "document.update.completed";
1769
+ readonly label: "Document updated";
1770
+ readonly domain: "Documents";
1771
+ readonly description: "Fires after a document is updated.";
1772
+ readonly filterKeys: [
1773
+ "profileSlug"
1774
+ ];
1775
+ };
1776
+ readonly CAPTURE_COMPLETE: {
1777
+ readonly type: "capture.complete.completed";
1778
+ readonly label: "Capture completed";
1779
+ readonly domain: "Capture";
1780
+ readonly description: "A capture finished processing.";
1781
+ readonly filterKeys: [
1782
+ "profileSlug"
1783
+ ];
1784
+ };
1785
+ readonly COMMAND_EXECUTED: {
1786
+ readonly type: "command.execute.completed";
1787
+ readonly label: "Command executed";
1788
+ readonly domain: "Commands";
1789
+ readonly description: "Fires after a command finishes execution.";
1790
+ readonly filterKeys: [
1791
+ "commandSlug"
1792
+ ];
1793
+ };
1794
+ readonly CONNECTOR_SYNC_COMPLETE: {
1795
+ readonly type: "connector_sync.complete.completed";
1796
+ readonly label: "Connector synced";
1797
+ readonly domain: "Connectors";
1798
+ readonly description: "A connector finished a sync run.";
1799
+ readonly filterKeys: [
1800
+ "provider",
1801
+ "syncStatus"
1802
+ ];
1803
+ };
1804
+ readonly PROACTIVE_POST: {
1805
+ readonly type: "proactive.post.completed";
1806
+ readonly label: "Proactive post";
1807
+ readonly domain: "Intelligence";
1808
+ readonly description: "The proactive AI posted a message into your channel.";
1809
+ readonly filterKeys: [
1810
+ "proactiveType"
1811
+ ];
1812
+ };
1813
+ readonly NOTIFICATION_CREATED: {
1814
+ readonly type: "notification.created.completed";
1815
+ readonly label: "Notification created";
1816
+ readonly domain: "Notifications";
1817
+ readonly description: "A notification was raised.";
1818
+ readonly filterKeys: [
1819
+ "notificationType",
1820
+ "category"
1821
+ ];
1822
+ };
1823
+ readonly CHANNEL_MESSAGE_CREATED: {
1824
+ readonly type: "channel_message.created.completed";
1825
+ readonly label: "Channel message created";
1826
+ readonly domain: "Messaging";
1827
+ readonly description: "A new message was posted into a Synap channel.";
1828
+ readonly filterKeys: [
1829
+ "channelId",
1830
+ "messageRole"
1831
+ ];
1832
+ };
1833
+ readonly FEED_NEW_ITEM: {
1834
+ readonly type: "feed.new_item.completed";
1835
+ readonly label: "Feed new item";
1836
+ readonly domain: "Feed";
1837
+ readonly description: "A new item appeared in the intelligence feed.";
1838
+ readonly filterKeys: [
1839
+ "feedArchetype",
1840
+ "feedMinRelevanceScore"
1841
+ ];
1842
+ };
1843
+ readonly EXTERNAL_MESSAGE_RECEIVED: {
1844
+ readonly type: "external_message.received.completed";
1845
+ readonly label: "External message received";
1846
+ readonly domain: "Messaging";
1847
+ readonly description: "An inbound message arrived on a connected external channel.";
1848
+ readonly filterKeys: [
1849
+ "provider",
1850
+ "channelId"
1851
+ ];
1852
+ };
1853
+ readonly EXTERNAL_CHANNEL_CREATED: {
1854
+ readonly type: "external_channel.created.completed";
1855
+ readonly label: "External channel created";
1856
+ readonly domain: "Messaging";
1857
+ readonly description: "A new external conversation channel was auto-created.";
1858
+ readonly filterKeys: [
1859
+ "provider"
1860
+ ];
1861
+ };
1862
+ readonly MESSAGING_ACCOUNT_CREATED: {
1863
+ readonly type: "messaging_account.created.completed";
1864
+ readonly label: "Messaging account connected";
1865
+ readonly domain: "Messaging";
1866
+ readonly description: "A messaging account was connected.";
1867
+ readonly filterKeys: [
1868
+ "provider"
1869
+ ];
1870
+ };
1871
+ readonly MESSAGING_ACCOUNT_RECONNECTION_REQUIRED: {
1872
+ readonly type: "messaging_account.reconnection_required.completed";
1873
+ readonly label: "Messaging account needs reconnection";
1874
+ readonly domain: "Messaging";
1875
+ readonly description: "A messaging account requires reconnection.";
1876
+ readonly filterKeys: [
1877
+ "provider"
1878
+ ];
1879
+ };
1880
+ readonly MESSAGING_ACCOUNT_DISCONNECTED: {
1881
+ readonly type: "messaging_account.disconnected.completed";
1882
+ readonly label: "Messaging account disconnected";
1883
+ readonly domain: "Messaging";
1884
+ readonly description: "A messaging account was disconnected.";
1885
+ readonly filterKeys: [
1886
+ "provider"
1887
+ ];
1888
+ };
1889
+ readonly INBOX_ITEM_RECEIVED: {
1890
+ readonly type: "inbox_item.received.completed";
1891
+ readonly label: "Inbox item received";
1892
+ readonly domain: "Inbox";
1893
+ readonly description: "A new item arrived from an external integration.";
1894
+ readonly filterKeys: [
1895
+ "sourceType"
1896
+ ];
1897
+ };
1898
+ readonly INBOX_ITEM_ANALYZED: {
1899
+ readonly type: "inbox_item.analyzed.completed";
1900
+ readonly label: "Inbox item analyzed";
1901
+ readonly domain: "Inbox";
1902
+ readonly description: "An inbox item was analyzed by the intelligence service.";
1903
+ readonly filterKeys: [
1904
+ "sourceType"
1905
+ ];
1906
+ };
1907
+ readonly USER_UPDATED: {
1908
+ readonly type: "user.updated.completed";
1909
+ readonly label: "User updated";
1910
+ readonly domain: "Identity";
1911
+ readonly description: "A user identity was updated.";
1912
+ readonly filterKeys: [
1913
+ ];
1914
+ };
1414
1915
  };
1415
- export type OperationalEventType = (typeof OperationalEventTypes)[keyof typeof OperationalEventTypes];
1916
+ export type OperationalEventType = (typeof OperationalEventTypes)[keyof typeof OperationalEventTypes]["type"];
1416
1917
  /**
1417
1918
  * All possible event type values
1418
1919
  */
@@ -1555,6 +2056,60 @@ export interface RunStep {
1555
2056
  startedAt: string;
1556
2057
  finishedAt: string;
1557
2058
  }
2059
+ /**
2060
+ * Reaction projection types — the read-only "Reactions" / Pulse data model.
2061
+ *
2062
+ * This is a PROJECTION over the existing event spine + reactive primitives
2063
+ * (automation runs, webhook deliveries, notifications, downstream events).
2064
+ * There is NO `reactions` write table — these shapes are derived at query
2065
+ * time by `subscriptionsRouter` (see `routers/subscriptions.ts`).
2066
+ *
2067
+ * The frontend Reactions UI is built EXACTLY to these shapes; do not rename
2068
+ * fields without updating the consuming surface.
2069
+ */
2070
+ /** The category of a single fan-out reaction. */
2071
+ export type ReactionKind = "automation" | "ai_feed" | "ai_react" | "notify" | "webhook" | "message_out";
2072
+ /** Lens used to filter reactions by direction (internal vs external). */
2073
+ export type ReactionLens = "all" | "internal" | "external";
2074
+ /** A single fan-out reaction triggered by a source event. */
2075
+ export interface Reaction {
2076
+ kind: ReactionKind;
2077
+ label: string;
2078
+ status?: "success" | "pending" | "failed";
2079
+ /** e.g. "200", "504", "pending" */
2080
+ responseStatus?: string;
2081
+ detail?: string;
2082
+ }
2083
+ /** A source event in the Pulse feed, with its fan-out reactions. */
2084
+ export interface ReactionEvent {
2085
+ id: string;
2086
+ /** e.g. "deal.update.completed" */
2087
+ type: string;
2088
+ /** ISO timestamp */
2089
+ timestamp: string;
2090
+ /** human summary, e.g. "Helix Robotics · closeDate → Jun 3" */
2091
+ subject: string;
2092
+ subjectId?: string;
2093
+ subjectType?: string;
2094
+ /** "Hestia" | "Maya Chen" | "cron:0 7 * * *" | "feed:rss" */
2095
+ actor: string;
2096
+ actorAI: boolean;
2097
+ correlationId?: string;
2098
+ /** event itself represents a failure (e.g. webhook.delivery.failed) */
2099
+ failed?: boolean;
2100
+ /** trigger flowing IN (cron.fired, feed.item.received) */
2101
+ inbound?: boolean;
2102
+ /**
2103
+ * A `.requested` event whose linked proposal is still awaiting a decision.
2104
+ * This is the decision-inbox signal — the user must approve or reject.
2105
+ */
2106
+ pending?: boolean;
2107
+ /** The proposal awaiting decision, when `pending` (for inline approve/reject). */
2108
+ proposalId?: string;
2109
+ note?: string;
2110
+ /** the fan-out */
2111
+ reactions: Reaction[];
2112
+ }
1558
2113
  /**
1559
2114
  * Core API Router
1560
2115
  */
@@ -1600,7 +2155,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1600
2155
  log: import("@trpc/server").TRPCMutationProcedure<{
1601
2156
  input: {
1602
2157
  subjectId: string;
1603
- subjectType: "user" | "message" | "apiKey" | "system" | "chat" | "workspace" | "entity" | "document" | "task" | "relation" | "project" | "member";
2158
+ subjectType: "user" | "message" | "apiKey" | "entity" | "system" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project";
1604
2159
  eventType: string;
1605
2160
  data: Record<string, unknown>;
1606
2161
  version: number;
@@ -1617,7 +2172,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1617
2172
  since?: unknown;
1618
2173
  until?: unknown;
1619
2174
  type?: string | undefined;
1620
- subjectType?: "user" | "message" | "apiKey" | "system" | "chat" | "workspace" | "entity" | "document" | "task" | "relation" | "project" | "member" | undefined;
2175
+ subjectType?: "user" | "message" | "apiKey" | "entity" | "system" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project" | undefined;
1621
2176
  limit?: number | undefined;
1622
2177
  lean?: boolean | undefined;
1623
2178
  };
@@ -1645,7 +2200,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1645
2200
  input: {
1646
2201
  userId?: string | undefined;
1647
2202
  eventType?: string | undefined;
1648
- subjectType?: "user" | "message" | "apiKey" | "system" | "chat" | "workspace" | "entity" | "document" | "task" | "relation" | "project" | "member" | undefined;
2203
+ subjectType?: "user" | "message" | "apiKey" | "entity" | "system" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project" | undefined;
1649
2204
  subjectId?: string | undefined;
1650
2205
  correlationId?: string | undefined;
1651
2206
  fromDate?: Date | undefined;
@@ -1661,7 +2216,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1661
2216
  input: {
1662
2217
  userId?: string | undefined;
1663
2218
  eventType?: string | undefined;
1664
- subjectType?: "user" | "message" | "apiKey" | "system" | "chat" | "workspace" | "entity" | "document" | "task" | "relation" | "project" | "member" | undefined;
2219
+ subjectType?: "user" | "message" | "apiKey" | "entity" | "system" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project" | undefined;
1665
2220
  fromDate?: Date | undefined;
1666
2221
  toDate?: Date | undefined;
1667
2222
  workspaceId?: string | undefined;
@@ -1726,6 +2281,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1726
2281
  relationType: string;
1727
2282
  }[];
1728
2283
  followUp: string | null;
2284
+ targetWorkspaceId: string | null;
1729
2285
  dedupCandidates: Record<string, {
1730
2286
  entityId: string;
1731
2287
  title: string;
@@ -1749,7 +2305,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1749
2305
  availableRelations?: string[] | undefined;
1750
2306
  contextHint?: string | undefined;
1751
2307
  };
1752
- output: ImportAnalysisPlan | null;
2308
+ output: ImportAnalysisPlan;
1753
2309
  meta: object;
1754
2310
  }>;
1755
2311
  execute: import("@trpc/server").TRPCMutationProcedure<{
@@ -1760,6 +2316,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1760
2316
  title: string;
1761
2317
  description?: string | undefined;
1762
2318
  properties?: Record<string, unknown> | undefined;
2319
+ content?: string | undefined;
1763
2320
  existingEntityId?: string | undefined;
1764
2321
  }[];
1765
2322
  relations: {
@@ -1767,6 +2324,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1767
2324
  targetTempId: string;
1768
2325
  relationType: string;
1769
2326
  }[];
2327
+ targetWorkspaceId?: string | null | undefined;
1770
2328
  };
1771
2329
  output: {
1772
2330
  created: {
@@ -1864,9 +2422,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1864
2422
  content?: string | undefined;
1865
2423
  global?: boolean | undefined;
1866
2424
  targetWorkspaceId?: string | undefined;
1867
- source?: "user" | "system" | "ai" | "intelligence" | "agent" | "openwebui-pipeline" | "openclaw" | "extension" | "cli" | "n8n" | "raycast" | undefined;
2425
+ workspaceScoped?: boolean | undefined;
2426
+ source?: "user" | "system" | "ai" | "agent" | "intelligence" | "openwebui-pipeline" | "openclaw" | "extension" | "cli" | "n8n" | "raycast" | undefined;
1868
2427
  reasoning?: string | undefined;
1869
2428
  agentUserId?: string | undefined;
2429
+ viewContext?: {
2430
+ viewId?: string | undefined;
2431
+ typeKey?: string | undefined;
2432
+ } | undefined;
1870
2433
  };
1871
2434
  output: {
1872
2435
  status: string;
@@ -1964,6 +2527,66 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1964
2527
  };
1965
2528
  meta: object;
1966
2529
  }>;
2530
+ listAll: import("@trpc/server").TRPCQueryProcedure<{
2531
+ input: {
2532
+ limit?: number | undefined;
2533
+ offset?: number | undefined;
2534
+ profileSlug?: string | undefined;
2535
+ includeDescendants?: boolean | undefined;
2536
+ };
2537
+ output: {
2538
+ items: {
2539
+ id: string;
2540
+ userId: string;
2541
+ workspaceId: string | null;
2542
+ type: string;
2543
+ profileId: string | null;
2544
+ title: string | null;
2545
+ preview: string | null;
2546
+ documentId: string | null;
2547
+ properties: Record<string, unknown>;
2548
+ fileUrl: string | null;
2549
+ filePath: string | null;
2550
+ fileSize: number | null;
2551
+ fileType: string | null;
2552
+ checksum: string | null;
2553
+ version: number;
2554
+ createdAt: Date;
2555
+ updatedAt: Date;
2556
+ deletedAt: Date | null;
2557
+ systemData?: Record<string, unknown> | undefined;
2558
+ }[];
2559
+ pagination: {
2560
+ hasMore: boolean;
2561
+ total?: number;
2562
+ limit: number;
2563
+ offset: number;
2564
+ };
2565
+ entities: {
2566
+ id: string;
2567
+ userId: string;
2568
+ workspaceId: string | null;
2569
+ type: string;
2570
+ profileId: string | null;
2571
+ title: string | null;
2572
+ preview: string | null;
2573
+ documentId: string | null;
2574
+ properties: Record<string, unknown>;
2575
+ fileUrl: string | null;
2576
+ filePath: string | null;
2577
+ fileSize: number | null;
2578
+ fileType: string | null;
2579
+ checksum: string | null;
2580
+ version: number;
2581
+ createdAt: Date;
2582
+ updatedAt: Date;
2583
+ deletedAt: Date | null;
2584
+ systemData?: Record<string, unknown> | undefined;
2585
+ }[];
2586
+ hasMore: boolean;
2587
+ };
2588
+ meta: object;
2589
+ }>;
1967
2590
  listGlobal: import("@trpc/server").TRPCQueryProcedure<{
1968
2591
  input: {
1969
2592
  profileSlug?: string | undefined;
@@ -2102,10 +2725,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2102
2725
  documentId?: string | null | undefined;
2103
2726
  properties?: Record<string, unknown> | undefined;
2104
2727
  profileSlug?: string | undefined;
2105
- source?: "user" | "system" | "ai" | "intelligence" | "agent" | undefined;
2728
+ source?: "user" | "system" | "ai" | "agent" | "intelligence" | "extension" | undefined;
2106
2729
  reasoning?: string | undefined;
2107
2730
  agentUserId?: string | undefined;
2108
2731
  global?: boolean | undefined;
2732
+ viewContext?: {
2733
+ viewId?: string | undefined;
2734
+ typeKey?: string | undefined;
2735
+ } | undefined;
2109
2736
  };
2110
2737
  output: {
2111
2738
  status: string;
@@ -2121,7 +2748,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2121
2748
  delete: import("@trpc/server").TRPCMutationProcedure<{
2122
2749
  input: {
2123
2750
  id: string;
2124
- source?: "user" | "system" | "ai" | "intelligence" | "agent" | undefined;
2751
+ source?: "user" | "system" | "ai" | "agent" | "intelligence" | undefined;
2125
2752
  reasoning?: string | undefined;
2126
2753
  agentUserId?: string | undefined;
2127
2754
  };
@@ -2182,7 +2809,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2182
2809
  description?: string | undefined;
2183
2810
  properties?: Record<string, unknown> | undefined;
2184
2811
  content?: string | undefined;
2185
- source?: "user" | "system" | "ai" | "intelligence" | "agent" | "cli" | undefined;
2812
+ source?: "user" | "system" | "ai" | "agent" | "intelligence" | "cli" | undefined;
2186
2813
  profileHints?: {
2187
2814
  displayName?: string | undefined;
2188
2815
  icon?: string | undefined;
@@ -2226,6 +2853,28 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2226
2853
  };
2227
2854
  meta: object;
2228
2855
  }>;
2856
+ adminDelete: import("@trpc/server").TRPCMutationProcedure<{
2857
+ input: {
2858
+ id: string;
2859
+ };
2860
+ output: {
2861
+ deleted: boolean;
2862
+ id: string;
2863
+ type: string;
2864
+ };
2865
+ meta: object;
2866
+ }>;
2867
+ adminBatchDelete: import("@trpc/server").TRPCMutationProcedure<{
2868
+ input: {
2869
+ ids?: string[] | undefined;
2870
+ profileSlug?: string | undefined;
2871
+ workspaceId?: string | null | undefined;
2872
+ };
2873
+ output: {
2874
+ deletedCount: number;
2875
+ };
2876
+ meta: object;
2877
+ }>;
2229
2878
  adminListProfiles: import("@trpc/server").TRPCQueryProcedure<{
2230
2879
  input: {
2231
2880
  workspaceId?: string | null | undefined;
@@ -2249,9 +2898,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2249
2898
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2250
2899
  resolveOrCreateChannel: import("@trpc/server").TRPCQueryProcedure<{
2251
2900
  input: {
2252
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
2901
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab";
2253
2902
  workspaceId?: string | undefined;
2254
- contextObjectType?: "user" | "external" | "workspace" | "view" | "entity" | "document" | "task" | "project" | undefined;
2903
+ contextObjectType?: "user" | "entity" | "external" | "workspace" | "document" | "view" | "task" | "project" | undefined;
2255
2904
  contextObjectId?: string | undefined;
2256
2905
  parentChannelId?: string | undefined;
2257
2906
  branchPurpose?: string | undefined;
@@ -2290,13 +2939,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2290
2939
  externalSource: string | null;
2291
2940
  status: "active" | "merged" | "archived";
2292
2941
  scope: "user" | "pod" | "workspace";
2293
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
2942
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
2294
2943
  feedScope: "user" | "workspace" | null;
2295
2944
  contextObjectType: string | null;
2296
2945
  contextObjectId: string | null;
2297
2946
  parentChannelId: string | null;
2298
2947
  branchedFromMessageId: string | null;
2299
2948
  branchPurpose: string | null;
2949
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
2300
2950
  agentConfig: unknown;
2301
2951
  mcpServerIds: string[] | null;
2302
2952
  assignedAgentId: string | null;
@@ -2329,6 +2979,17 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2329
2979
  };
2330
2980
  meta: object;
2331
2981
  }>;
2982
+ createGroupChannel: import("@trpc/server").TRPCMutationProcedure<{
2983
+ input: {
2984
+ name: string;
2985
+ participants?: string[] | undefined;
2986
+ };
2987
+ output: {
2988
+ channelId: `${string}-${string}-${string}-${string}-${string}`;
2989
+ status: "created";
2990
+ };
2991
+ meta: object;
2992
+ }>;
2332
2993
  createDocumentComment: import("@trpc/server").TRPCMutationProcedure<{
2333
2994
  input: {
2334
2995
  documentId: string;
@@ -2365,9 +3026,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2365
3026
  parentChannelId?: string | undefined;
2366
3027
  attachmentEntityIds?: string[] | undefined;
2367
3028
  deepAnalysis?: boolean | undefined;
2368
- channelType?: "thread" | "personal" | "sub_thread" | "agent_collab" | undefined;
3029
+ channelType?: "personal" | "thread" | "sub_thread" | "agent_collab" | undefined;
2369
3030
  contextObjectId?: string | undefined;
2370
- contextObjectType?: "view" | "entity" | "document" | undefined;
3031
+ contextObjectType?: "entity" | "document" | "view" | undefined;
2371
3032
  branchPurpose?: string | undefined;
2372
3033
  };
2373
3034
  output: {
@@ -2399,13 +3060,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2399
3060
  externalSource: string | null;
2400
3061
  status: "active" | "merged" | "archived";
2401
3062
  scope: "user" | "pod" | "workspace";
2402
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3063
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
2403
3064
  feedScope: "user" | "workspace" | null;
2404
3065
  contextObjectType: string | null;
2405
3066
  contextObjectId: string | null;
2406
3067
  parentChannelId: string | null;
2407
3068
  branchedFromMessageId: string | null;
2408
3069
  branchPurpose: string | null;
3070
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
2409
3071
  agentConfig: unknown;
2410
3072
  mcpServerIds: string[] | null;
2411
3073
  assignedAgentId: string | null;
@@ -2441,7 +3103,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2441
3103
  }[];
2442
3104
  executionSummaries: {
2443
3105
  tool: string;
2444
- status: "error" | "success" | "skipped";
3106
+ status: "error" | "skipped" | "success";
2445
3107
  result?: unknown;
2446
3108
  error?: string | undefined;
2447
3109
  }[];
@@ -2483,16 +3145,33 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2483
3145
  latency?: number | undefined;
2484
3146
  intelligenceServiceId?: string | undefined;
2485
3147
  agentId?: string | undefined;
3148
+ aiSteps?: {
3149
+ id: string;
3150
+ type: string;
3151
+ content: string;
3152
+ timestamp: string;
3153
+ toolName?: string | undefined;
3154
+ toolInput?: unknown;
3155
+ toolOutput?: unknown;
3156
+ duration?: number | undefined;
3157
+ error?: string | undefined;
3158
+ title?: string | undefined;
3159
+ description?: string | undefined;
3160
+ status?: "error" | "pending" | "running" | "complete" | undefined;
3161
+ }[] | undefined;
3162
+ agentType?: string | undefined;
2486
3163
  } | null;
2487
3164
  deletedAt: Date | null;
2488
3165
  content: string;
2489
3166
  channelId: string;
2490
3167
  parentId: string | null;
2491
- role: "user" | "system" | "assistant";
3168
+ role: "user" | "assistant" | "system";
2492
3169
  authorType: "external" | "human" | "ai_agent" | "bot";
2493
3170
  messageCategory: "chat" | "comment" | "system_notification" | "review";
2494
3171
  externalSource: string | null;
2495
3172
  inboxItemId: string | null;
3173
+ routedTeammateId: string | null;
3174
+ routedSource: "orchestrator" | "mention" | "direct" | null;
2496
3175
  previousHash: string | null;
2497
3176
  hash: string;
2498
3177
  sessionId: string | null;
@@ -2502,14 +3181,49 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2502
3181
  };
2503
3182
  meta: object;
2504
3183
  }>;
3184
+ getTimeline: import("@trpc/server").TRPCQueryProcedure<{
3185
+ input: {
3186
+ channelId: string;
3187
+ limit?: number | undefined;
3188
+ };
3189
+ output: {
3190
+ turns: {
3191
+ index: number;
3192
+ userMessage: {
3193
+ id: string;
3194
+ content: string;
3195
+ timestamp: Date;
3196
+ };
3197
+ assistantMessage: {
3198
+ id: string;
3199
+ content: string;
3200
+ timestamp: Date;
3201
+ agentType: string | undefined;
3202
+ agentId: string | undefined;
3203
+ } | undefined;
3204
+ steps: AIStep[];
3205
+ isCompactionBoundary: boolean;
3206
+ compactionSummary: string | undefined;
3207
+ proposals: {
3208
+ proposalId: string;
3209
+ toolName: string;
3210
+ description: string;
3211
+ }[];
3212
+ }[];
3213
+ totalTurns: number;
3214
+ sessionCount: number;
3215
+ };
3216
+ meta: object;
3217
+ }>;
2505
3218
  listChannels: import("@trpc/server").TRPCQueryProcedure<{
2506
3219
  input: {
2507
3220
  workspaceId?: string | undefined;
2508
- channelType?: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab" | undefined;
3221
+ channelType?: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | undefined;
2509
3222
  limit?: number | undefined;
2510
3223
  contextObjectId?: string | undefined;
2511
- contextObjectType?: "view" | "entity" | "document" | undefined;
3224
+ contextObjectType?: "entity" | "document" | "view" | undefined;
2512
3225
  assignedAgentId?: string | undefined;
3226
+ agentUserId?: string | undefined;
2513
3227
  };
2514
3228
  output: {
2515
3229
  channels: (Channel & {
@@ -2523,7 +3237,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2523
3237
  input: {
2524
3238
  workspaceId?: string | undefined;
2525
3239
  contextObjectId?: string | undefined;
2526
- contextObjectType?: "view" | "entity" | "document" | undefined;
3240
+ contextObjectType?: "entity" | "document" | "view" | undefined;
2527
3241
  limit?: number | undefined;
2528
3242
  offset?: number | undefined;
2529
3243
  };
@@ -2607,6 +3321,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2607
3321
  };
2608
3322
  meta: object;
2609
3323
  }>;
3324
+ getOrCreateAgentThreadByType: import("@trpc/server").TRPCMutationProcedure<{
3325
+ input: {
3326
+ agentType: string;
3327
+ };
3328
+ output: {
3329
+ channel: Channel;
3330
+ };
3331
+ meta: object;
3332
+ }>;
2610
3333
  getOrCreateWorkspaceGroup: import("@trpc/server").TRPCQueryProcedure<{
2611
3334
  input: Record<string, never>;
2612
3335
  output: {
@@ -2630,13 +3353,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2630
3353
  externalSource: string | null;
2631
3354
  status: "active" | "merged" | "archived";
2632
3355
  scope: "user" | "pod" | "workspace";
2633
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3356
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
2634
3357
  feedScope: "user" | "workspace" | null;
2635
3358
  contextObjectType: string | null;
2636
3359
  contextObjectId: string | null;
2637
3360
  parentChannelId: string | null;
2638
3361
  branchedFromMessageId: string | null;
2639
3362
  branchPurpose: string | null;
3363
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
2640
3364
  agentConfig: unknown;
2641
3365
  mcpServerIds: string[] | null;
2642
3366
  assignedAgentId: string | null;
@@ -2695,13 +3419,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2695
3419
  externalSource: string | null;
2696
3420
  status: "active" | "merged" | "archived";
2697
3421
  scope: "user" | "pod" | "workspace";
2698
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3422
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
2699
3423
  feedScope: "user" | "workspace" | null;
2700
3424
  contextObjectType: string | null;
2701
3425
  contextObjectId: string | null;
2702
3426
  parentChannelId: string | null;
2703
3427
  branchedFromMessageId: string | null;
2704
3428
  branchPurpose: string | null;
3429
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
2705
3430
  agentConfig: unknown;
2706
3431
  mcpServerIds: string[] | null;
2707
3432
  assignedAgentId: string | null;
@@ -2720,10 +3445,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2720
3445
  id: string;
2721
3446
  createdAt: Date;
2722
3447
  channelId: string;
2723
- objectType: "proposal" | "view" | "entity" | "document" | "inbox_item";
3448
+ objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
2724
3449
  objectId: string;
2725
3450
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
2726
- conflictStatus: "none" | "pending" | "resolved";
3451
+ conflictStatus: "pending" | "none" | "resolved";
2727
3452
  relevanceScore: number | null;
2728
3453
  }[] | undefined;
2729
3454
  branchTree: any;
@@ -2737,6 +3462,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2737
3462
  assignedAgentId?: string | null | undefined;
2738
3463
  agentConfig?: Record<string, unknown> | undefined;
2739
3464
  mcpServerIds?: string[] | null | undefined;
3465
+ aiReactionMode?: "only_mentioned" | "when_confident" | "off" | undefined;
3466
+ addAgentMemberId?: string | undefined;
3467
+ removeAgentMemberId?: string | undefined;
2740
3468
  };
2741
3469
  output: {
2742
3470
  status: string;
@@ -2800,13 +3528,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2800
3528
  externalSource: string | null;
2801
3529
  status: "active" | "merged" | "archived";
2802
3530
  scope: "user" | "pod" | "workspace";
2803
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3531
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
2804
3532
  feedScope: "user" | "workspace" | null;
2805
3533
  contextObjectType: string | null;
2806
3534
  contextObjectId: string | null;
2807
3535
  parentChannelId: string | null;
2808
3536
  branchedFromMessageId: string | null;
2809
3537
  branchPurpose: string | null;
3538
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
2810
3539
  agentConfig: unknown;
2811
3540
  mcpServerIds: string[] | null;
2812
3541
  assignedAgentId: string | null;
@@ -2829,13 +3558,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2829
3558
  externalSource: string | null;
2830
3559
  status: "active" | "merged" | "archived";
2831
3560
  scope: "user" | "pod" | "workspace";
2832
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3561
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
2833
3562
  feedScope: "user" | "workspace" | null;
2834
3563
  contextObjectType: string | null;
2835
3564
  contextObjectId: string | null;
2836
3565
  parentChannelId: string | null;
2837
3566
  branchedFromMessageId: string | null;
2838
3567
  branchPurpose: string | null;
3568
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
2839
3569
  agentConfig: unknown;
2840
3570
  mcpServerIds: string[] | null;
2841
3571
  assignedAgentId: string | null;
@@ -2858,13 +3588,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2858
3588
  externalSource: string | null;
2859
3589
  status: "active" | "merged" | "archived";
2860
3590
  scope: "user" | "pod" | "workspace";
2861
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3591
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
2862
3592
  feedScope: "user" | "workspace" | null;
2863
3593
  contextObjectType: string | null;
2864
3594
  contextObjectId: string | null;
2865
3595
  parentChannelId: string | null;
2866
3596
  branchedFromMessageId: string | null;
2867
3597
  branchPurpose: string | null;
3598
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
2868
3599
  agentConfig: unknown;
2869
3600
  mcpServerIds: string[] | null;
2870
3601
  assignedAgentId: string | null;
@@ -2882,7 +3613,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2882
3613
  getChannelContext: import("@trpc/server").TRPCQueryProcedure<{
2883
3614
  input: {
2884
3615
  channelId: string;
2885
- objectTypes?: ("proposal" | "view" | "entity" | "document" | "inbox_item")[] | undefined;
3616
+ objectTypes?: ("entity" | "document" | "view" | "proposal" | "inbox_item")[] | undefined;
2886
3617
  relationshipTypes?: ("created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent")[] | undefined;
2887
3618
  };
2888
3619
  output: {
@@ -2893,10 +3624,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2893
3624
  id: string;
2894
3625
  createdAt: Date;
2895
3626
  channelId: string;
2896
- objectType: "proposal" | "view" | "entity" | "document" | "inbox_item";
3627
+ objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
2897
3628
  objectId: string;
2898
3629
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
2899
- conflictStatus: "none" | "pending" | "resolved";
3630
+ conflictStatus: "pending" | "none" | "resolved";
2900
3631
  relevanceScore: number | null;
2901
3632
  }[];
2902
3633
  entities: {
@@ -2906,10 +3637,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2906
3637
  id: string;
2907
3638
  createdAt: Date;
2908
3639
  channelId: string;
2909
- objectType: "proposal" | "view" | "entity" | "document" | "inbox_item";
3640
+ objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
2910
3641
  objectId: string;
2911
3642
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
2912
- conflictStatus: "none" | "pending" | "resolved";
3643
+ conflictStatus: "pending" | "none" | "resolved";
2913
3644
  relevanceScore: number | null;
2914
3645
  }[];
2915
3646
  documents: {
@@ -2919,10 +3650,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2919
3650
  id: string;
2920
3651
  createdAt: Date;
2921
3652
  channelId: string;
2922
- objectType: "proposal" | "view" | "entity" | "document" | "inbox_item";
3653
+ objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
2923
3654
  objectId: string;
2924
3655
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
2925
- conflictStatus: "none" | "pending" | "resolved";
3656
+ conflictStatus: "pending" | "none" | "resolved";
2926
3657
  relevanceScore: number | null;
2927
3658
  }[];
2928
3659
  };
@@ -2931,7 +3662,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2931
3662
  addContextItem: import("@trpc/server").TRPCMutationProcedure<{
2932
3663
  input: {
2933
3664
  channelId: string;
2934
- objectType: "view" | "entity" | "document";
3665
+ objectType: "entity" | "document" | "view";
2935
3666
  objectId: string;
2936
3667
  };
2937
3668
  output: {
@@ -2953,7 +3684,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2953
3684
  input: {
2954
3685
  channelId: string;
2955
3686
  objectId: string;
2956
- objectType: "view" | "entity" | "document";
3687
+ objectType: "entity" | "document" | "view";
2957
3688
  };
2958
3689
  output: {
2959
3690
  ok: boolean;
@@ -3022,13 +3753,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3022
3753
  externalSource: string | null;
3023
3754
  status: "active" | "merged" | "archived";
3024
3755
  scope: "user" | "pod" | "workspace";
3025
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3756
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
3026
3757
  feedScope: "user" | "workspace" | null;
3027
3758
  contextObjectType: string | null;
3028
3759
  contextObjectId: string | null;
3029
3760
  parentChannelId: string | null;
3030
3761
  branchedFromMessageId: string | null;
3031
3762
  branchPurpose: string | null;
3763
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
3032
3764
  agentConfig: unknown;
3033
3765
  mcpServerIds: string[] | null;
3034
3766
  assignedAgentId: string | null;
@@ -3058,35 +3790,91 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3058
3790
  };
3059
3791
  meta: object;
3060
3792
  }>;
3061
- }>>;
3062
- proposals: import("@trpc/server").TRPCBuiltRouter<{
3063
- ctx: Context;
3064
- meta: object;
3065
- errorShape: {
3066
- message: string;
3067
- code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
3068
- data: import("@trpc/server").TRPCDefaultErrorData;
3069
- };
3070
- transformer: true;
3071
- }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3072
- list: import("@trpc/server").TRPCQueryProcedure<{
3793
+ addTeammate: import("@trpc/server").TRPCMutationProcedure<{
3073
3794
  input: {
3074
- limit?: number | undefined;
3075
- offset?: number | undefined;
3076
- workspaceId?: string | null | undefined;
3077
- targetType?: "view" | "entity" | "document" | "whiteboard" | "profile" | undefined;
3078
- targetId?: string | undefined;
3079
- threadId?: string | undefined;
3080
- status?: "pending" | "rejected" | "validated" | "all" | undefined;
3795
+ channelId: string;
3796
+ agentUserId: string;
3797
+ canDraft?: boolean | undefined;
3798
+ canPropose?: boolean | undefined;
3799
+ canAct?: boolean | undefined;
3081
3800
  };
3082
3801
  output: {
3083
- items: ({
3802
+ status: "added";
3803
+ channelId: string;
3804
+ };
3805
+ meta: object;
3806
+ }>;
3807
+ removeTeammate: import("@trpc/server").TRPCMutationProcedure<{
3808
+ input: {
3809
+ channelId: string;
3810
+ agentUserId: string;
3811
+ };
3812
+ output: {
3813
+ status: "removed";
3814
+ channelId: string;
3815
+ };
3816
+ meta: object;
3817
+ }>;
3818
+ listRoomMembers: import("@trpc/server").TRPCQueryProcedure<{
3819
+ input: {
3820
+ channelId: string;
3821
+ };
3822
+ output: {
3823
+ members: {
3824
+ memberId: string;
3825
+ memberKind: "human" | "ai_agent";
3826
+ role: "owner" | "member";
3827
+ capabilities: {
3828
+ canDraft: boolean;
3829
+ canPropose: boolean;
3830
+ canAct: boolean;
3831
+ };
3832
+ addedBy: string | null;
3833
+ createdAt: Date;
3834
+ name: string | null;
3835
+ email: string | null;
3836
+ avatarUrl: string | null;
3837
+ agent: {
3838
+ agentType: string | null;
3839
+ } | null;
3840
+ }[];
3841
+ };
3842
+ meta: object;
3843
+ }>;
3844
+ }>>;
3845
+ proposals: import("@trpc/server").TRPCBuiltRouter<{
3846
+ ctx: Context;
3847
+ meta: object;
3848
+ errorShape: {
3849
+ message: string;
3850
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
3851
+ data: import("@trpc/server").TRPCDefaultErrorData;
3852
+ };
3853
+ transformer: true;
3854
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3855
+ list: import("@trpc/server").TRPCQueryProcedure<{
3856
+ input: {
3857
+ limit?: number | undefined;
3858
+ offset?: number | undefined;
3859
+ workspaceId?: string | null | undefined;
3860
+ targetType?: "entity" | "document" | "view" | "whiteboard" | "profile" | undefined;
3861
+ targetId?: string | undefined;
3862
+ threadId?: string | undefined;
3863
+ agentUserId?: string | undefined;
3864
+ agentOnly?: boolean | undefined;
3865
+ includeExpired?: boolean | undefined;
3866
+ status?: "pending" | "rejected" | "validated" | "all" | undefined;
3867
+ cursor?: string | undefined;
3868
+ };
3869
+ output: {
3870
+ items: ({
3084
3871
  workspaceId: string | null;
3085
3872
  sourceMessageId: string | null;
3086
3873
  id: string;
3087
3874
  data: unknown;
3088
3875
  updatedAt: Date;
3089
3876
  createdAt: Date;
3877
+ correlationId: string | null;
3090
3878
  status: "approved" | "pending" | "rejected" | "auto_approved";
3091
3879
  expiresAt: Date | null;
3092
3880
  createdBy: string | null;
@@ -3096,6 +3884,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3096
3884
  proposalType: string;
3097
3885
  commandRunId: string | null;
3098
3886
  agentUserId: string | null;
3887
+ requestedEventId: string | null;
3099
3888
  reviewedBy: string | null;
3100
3889
  reviewedAt: Date | null;
3101
3890
  rejectionReason: string | null;
@@ -3107,6 +3896,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3107
3896
  review: ProposalReviewModel;
3108
3897
  })[];
3109
3898
  pagination: {
3899
+ nextCursor: string | undefined;
3110
3900
  hasMore: boolean;
3111
3901
  total?: number;
3112
3902
  limit: number;
@@ -3119,6 +3909,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3119
3909
  data: unknown;
3120
3910
  updatedAt: Date;
3121
3911
  createdAt: Date;
3912
+ correlationId: string | null;
3122
3913
  status: "approved" | "pending" | "rejected" | "auto_approved";
3123
3914
  expiresAt: Date | null;
3124
3915
  createdBy: string | null;
@@ -3128,6 +3919,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3128
3919
  proposalType: string;
3129
3920
  commandRunId: string | null;
3130
3921
  agentUserId: string | null;
3922
+ requestedEventId: string | null;
3131
3923
  reviewedBy: string | null;
3132
3924
  reviewedAt: Date | null;
3133
3925
  rejectionReason: string | null;
@@ -3152,6 +3944,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3152
3944
  data: unknown;
3153
3945
  updatedAt: Date;
3154
3946
  createdAt: Date;
3947
+ correlationId: string | null;
3155
3948
  status: "approved" | "pending" | "rejected" | "auto_approved";
3156
3949
  expiresAt: Date | null;
3157
3950
  createdBy: string | null;
@@ -3161,6 +3954,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3161
3954
  proposalType: string;
3162
3955
  commandRunId: string | null;
3163
3956
  agentUserId: string | null;
3957
+ requestedEventId: string | null;
3164
3958
  reviewedBy: string | null;
3165
3959
  reviewedAt: Date | null;
3166
3960
  rejectionReason: string | null;
@@ -3179,6 +3973,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3179
3973
  };
3180
3974
  output: {
3181
3975
  success: boolean;
3976
+ primaryId: string;
3977
+ created: number;
3978
+ linked: number;
3979
+ } | {
3980
+ success: boolean;
3981
+ primaryId?: undefined;
3982
+ created?: undefined;
3983
+ linked?: undefined;
3182
3984
  };
3183
3985
  meta: object;
3184
3986
  }>;
@@ -3218,8 +4020,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3218
4020
  }>;
3219
4021
  submit: import("@trpc/server").TRPCMutationProcedure<{
3220
4022
  input: {
3221
- targetType: "workspace" | "view" | "entity" | "document" | "relation" | "profile";
3222
- changeType: "update" | "delete" | "create";
4023
+ targetType: "entity" | "workspace" | "document" | "view" | "relation" | "profile";
4024
+ changeType: "create" | "update" | "delete";
3223
4025
  data: Record<string, any>;
3224
4026
  targetId?: string | undefined;
3225
4027
  reasoning?: string | undefined;
@@ -3725,10 +4527,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3725
4527
  }>;
3726
4528
  listAuditLogs: import("@trpc/server").TRPCQueryProcedure<{
3727
4529
  input: {
3728
- workspaceId?: string | undefined;
3729
- userId?: string | undefined;
3730
- subjectType?: string | undefined;
3731
- action?: string | undefined;
4530
+ workspaceId?: string | null | undefined;
4531
+ userId?: string | null | undefined;
4532
+ subjectType?: string | null | undefined;
4533
+ action?: string | null | undefined;
4534
+ actions?: string[] | undefined;
3732
4535
  fromDate?: string | undefined;
3733
4536
  toDate?: string | undefined;
3734
4537
  limit?: number | undefined;
@@ -3763,6 +4566,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3763
4566
  };
3764
4567
  meta: object;
3765
4568
  }>;
4569
+ listEventCatalog: import("@trpc/server").TRPCQueryProcedure<{
4570
+ input: void;
4571
+ output: EventDefinition[];
4572
+ meta: object;
4573
+ }>;
3766
4574
  deleteUser: import("@trpc/server").TRPCMutationProcedure<{
3767
4575
  input: {
3768
4576
  userId: string;
@@ -4002,7 +4810,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4002
4810
  id: string;
4003
4811
  email: string;
4004
4812
  name: string | null;
4005
- };
4813
+ } | null;
4006
4814
  }[];
4007
4815
  meta: object;
4008
4816
  }>;
@@ -4021,6 +4829,22 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4021
4829
  };
4022
4830
  meta: object;
4023
4831
  }>;
4832
+ adminCreateServiceKey: import("@trpc/server").TRPCMutationProcedure<{
4833
+ input: {
4834
+ keyName: string;
4835
+ scope: string[];
4836
+ workspaceId: string;
4837
+ expiresInDays?: number | undefined;
4838
+ };
4839
+ output: {
4840
+ id: any;
4841
+ key: string;
4842
+ keyPrefix: string;
4843
+ status: "created";
4844
+ message: string;
4845
+ };
4846
+ meta: object;
4847
+ }>;
4024
4848
  connectIntegration: import("@trpc/server").TRPCMutationProcedure<{
4025
4849
  input: {
4026
4850
  integration: "custom" | "openclaw" | "cli" | "raycast";
@@ -4211,6 +5035,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4211
5035
  subscription: {
4212
5036
  name: string;
4213
5037
  userId: string;
5038
+ workspaceId: string | null;
4214
5039
  id: string;
4215
5040
  secret: string;
4216
5041
  createdAt: Date;
@@ -4229,6 +5054,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4229
5054
  output: {
4230
5055
  name: string;
4231
5056
  userId: string;
5057
+ workspaceId: string | null;
4232
5058
  id: string;
4233
5059
  secret: string;
4234
5060
  createdAt: Date;
@@ -4251,6 +5077,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4251
5077
  output: {
4252
5078
  id: string;
4253
5079
  userId: string;
5080
+ workspaceId: string | null;
4254
5081
  name: string;
4255
5082
  url: string;
4256
5083
  eventTypes: string[];
@@ -4270,6 +5097,181 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4270
5097
  };
4271
5098
  meta: object;
4272
5099
  }>;
5100
+ listForWorkspace: import("@trpc/server").TRPCQueryProcedure<{
5101
+ input: void;
5102
+ output: {
5103
+ name: string;
5104
+ userId: string;
5105
+ workspaceId: string | null;
5106
+ id: string;
5107
+ secret: string;
5108
+ createdAt: Date;
5109
+ url: string;
5110
+ eventTypes: string[];
5111
+ active: boolean;
5112
+ retryConfig: unknown;
5113
+ lastTriggeredAt: Date | null;
5114
+ }[];
5115
+ meta: object;
5116
+ }>;
5117
+ createForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
5118
+ input: {
5119
+ name: string;
5120
+ url: string;
5121
+ eventTypes: string[];
5122
+ };
5123
+ output: {
5124
+ subscription: {
5125
+ name: string;
5126
+ userId: string;
5127
+ workspaceId: string | null;
5128
+ id: string;
5129
+ secret: string;
5130
+ createdAt: Date;
5131
+ url: string;
5132
+ eventTypes: string[];
5133
+ active: boolean;
5134
+ retryConfig: unknown;
5135
+ lastTriggeredAt: Date | null;
5136
+ };
5137
+ secret: string;
5138
+ };
5139
+ meta: object;
5140
+ }>;
5141
+ deleteForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
5142
+ input: {
5143
+ id: string;
5144
+ };
5145
+ output: {
5146
+ success: boolean;
5147
+ };
5148
+ meta: object;
5149
+ }>;
5150
+ toggleForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
5151
+ input: {
5152
+ id: string;
5153
+ active: boolean;
5154
+ };
5155
+ output: {
5156
+ id: string;
5157
+ userId: string;
5158
+ workspaceId: string | null;
5159
+ name: string;
5160
+ url: string;
5161
+ eventTypes: string[];
5162
+ active: boolean;
5163
+ retryConfig: unknown;
5164
+ createdAt: Date;
5165
+ lastTriggeredAt: Date | null;
5166
+ };
5167
+ meta: object;
5168
+ }>;
5169
+ adminListForWorkspace: import("@trpc/server").TRPCQueryProcedure<{
5170
+ input: {
5171
+ workspaceId: string;
5172
+ };
5173
+ output: {
5174
+ name: string;
5175
+ userId: string;
5176
+ workspaceId: string | null;
5177
+ id: string;
5178
+ secret: string;
5179
+ createdAt: Date;
5180
+ url: string;
5181
+ eventTypes: string[];
5182
+ active: boolean;
5183
+ retryConfig: unknown;
5184
+ lastTriggeredAt: Date | null;
5185
+ }[];
5186
+ meta: object;
5187
+ }>;
5188
+ adminCreateForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
5189
+ input: {
5190
+ workspaceId: string;
5191
+ url: string;
5192
+ events: string[];
5193
+ description?: string | undefined;
5194
+ };
5195
+ output: {
5196
+ subscription: {
5197
+ name: string;
5198
+ userId: string;
5199
+ workspaceId: string | null;
5200
+ id: string;
5201
+ secret: string;
5202
+ createdAt: Date;
5203
+ url: string;
5204
+ eventTypes: string[];
5205
+ active: boolean;
5206
+ retryConfig: unknown;
5207
+ lastTriggeredAt: Date | null;
5208
+ };
5209
+ secret: string;
5210
+ };
5211
+ meta: object;
5212
+ }>;
5213
+ adminDeleteForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
5214
+ input: {
5215
+ id: string;
5216
+ workspaceId: string;
5217
+ };
5218
+ output: {
5219
+ success: boolean;
5220
+ };
5221
+ meta: object;
5222
+ }>;
5223
+ adminToggleForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
5224
+ input: {
5225
+ id: string;
5226
+ workspaceId: string;
5227
+ active: boolean;
5228
+ };
5229
+ output: {
5230
+ id: string;
5231
+ userId: string;
5232
+ workspaceId: string | null;
5233
+ name: string;
5234
+ url: string;
5235
+ eventTypes: string[];
5236
+ active: boolean;
5237
+ retryConfig: unknown;
5238
+ createdAt: Date;
5239
+ lastTriggeredAt: Date | null;
5240
+ };
5241
+ meta: object;
5242
+ }>;
5243
+ deliveriesForSubscription: import("@trpc/server").TRPCQueryProcedure<{
5244
+ input: {
5245
+ subscriptionId: string;
5246
+ limit?: number | undefined;
5247
+ };
5248
+ output: {
5249
+ id: string;
5250
+ createdAt: Date;
5251
+ status: string;
5252
+ subscriptionId: string;
5253
+ eventId: string;
5254
+ responseStatus: number | null;
5255
+ attempt: number;
5256
+ deliveredAt: Date | null;
5257
+ }[];
5258
+ meta: object;
5259
+ }>;
5260
+ deliveries: import("@trpc/server").TRPCQueryProcedure<{
5261
+ input: {
5262
+ subscriptionId: string;
5263
+ limit?: number | undefined;
5264
+ };
5265
+ output: {
5266
+ id: string;
5267
+ status: "success" | "failed" | "pending";
5268
+ responseStatus: string | undefined;
5269
+ attempt: number;
5270
+ deliveredAt: string | undefined;
5271
+ createdAt: string | undefined;
5272
+ }[];
5273
+ meta: object;
5274
+ }>;
4273
5275
  }>>;
4274
5276
  documents: import("@trpc/server").TRPCBuiltRouter<{
4275
5277
  ctx: Context;
@@ -5288,7 +6290,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5288
6290
  allowedEntityTypes: string[] | null;
5289
6291
  maxEntitiesCreatedPerRun: number | null;
5290
6292
  canCreateViews: boolean;
5291
- outputMode: "proposal" | "view" | "text";
6293
+ outputMode: "view" | "proposal" | "text";
5292
6294
  permissionsProfile: "read_only" | "propose_writes";
5293
6295
  sharedScope: "user" | "workspace";
5294
6296
  }[];
@@ -5314,7 +6316,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5314
6316
  allowedEntityTypes: string[] | null;
5315
6317
  maxEntitiesCreatedPerRun: number | null;
5316
6318
  canCreateViews: boolean;
5317
- outputMode: "proposal" | "view" | "text";
6319
+ outputMode: "view" | "proposal" | "text";
5318
6320
  permissionsProfile: "read_only" | "propose_writes";
5319
6321
  sharedScope: "user" | "workspace";
5320
6322
  };
@@ -5329,7 +6331,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5329
6331
  allowedEntityTypes?: string[] | undefined;
5330
6332
  maxEntitiesCreatedPerRun?: number | undefined;
5331
6333
  canCreateViews?: boolean | undefined;
5332
- outputMode?: "proposal" | "view" | "text" | undefined;
6334
+ outputMode?: "view" | "proposal" | "text" | undefined;
5333
6335
  permissionsProfile?: "read_only" | "propose_writes" | undefined;
5334
6336
  sharedScope?: "user" | "workspace" | undefined;
5335
6337
  };
@@ -5348,7 +6350,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5348
6350
  allowedEntityTypes: string[] | null;
5349
6351
  maxEntitiesCreatedPerRun: number | null;
5350
6352
  canCreateViews: boolean;
5351
- outputMode: "proposal" | "view" | "text";
6353
+ outputMode: "view" | "proposal" | "text";
5352
6354
  permissionsProfile: "read_only" | "propose_writes";
5353
6355
  sharedScope: "user" | "workspace";
5354
6356
  };
@@ -5364,7 +6366,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5364
6366
  allowedEntityTypes?: string[] | undefined;
5365
6367
  maxEntitiesCreatedPerRun?: number | null | undefined;
5366
6368
  canCreateViews?: boolean | undefined;
5367
- outputMode?: "proposal" | "view" | "text" | undefined;
6369
+ outputMode?: "view" | "proposal" | "text" | undefined;
5368
6370
  permissionsProfile?: "read_only" | "propose_writes" | undefined;
5369
6371
  sharedScope?: "user" | "workspace" | undefined;
5370
6372
  };
@@ -5381,7 +6383,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5381
6383
  allowedEntityTypes: string[] | null;
5382
6384
  maxEntitiesCreatedPerRun: number | null;
5383
6385
  canCreateViews: boolean;
5384
- outputMode: "proposal" | "view" | "text";
6386
+ outputMode: "view" | "proposal" | "text";
5385
6387
  permissionsProfile: "read_only" | "propose_writes";
5386
6388
  sharedScope: "user" | "workspace";
5387
6389
  createdAt: Date;
@@ -5514,6 +6516,23 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5514
6516
  };
5515
6517
  meta: object;
5516
6518
  }>;
6519
+ listAllAgents: import("@trpc/server").TRPCQueryProcedure<{
6520
+ input: void;
6521
+ output: {
6522
+ agents: {
6523
+ id: string;
6524
+ label: string;
6525
+ description?: string;
6526
+ isDefault: boolean;
6527
+ isInternal: boolean;
6528
+ toolCount: number;
6529
+ serviceId: string;
6530
+ serviceName: string;
6531
+ isSynapIS: boolean;
6532
+ }[];
6533
+ };
6534
+ meta: object;
6535
+ }>;
5517
6536
  memoryFacts: import("@trpc/server").TRPCQueryProcedure<{
5518
6537
  input: {
5519
6538
  limit?: number | undefined;
@@ -6015,8 +7034,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6015
7034
  type: string;
6016
7035
  createdAt: Date;
6017
7036
  metadata: unknown;
6018
- sourceEntityId: string;
6019
- targetEntityId: string;
7037
+ sourceEntityId: string | null;
7038
+ targetEntityId: string | null;
7039
+ sourceKind: RelationEndpointKind;
7040
+ targetKind: RelationEndpointKind;
7041
+ sourceCellId: string | null;
7042
+ targetCellId: string | null;
6020
7043
  }[];
6021
7044
  };
6022
7045
  meta: object;
@@ -6050,8 +7073,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6050
7073
  type: string;
6051
7074
  createdAt: Date;
6052
7075
  metadata: unknown;
6053
- sourceEntityId: string;
6054
- targetEntityId: string;
7076
+ sourceEntityId: string | null;
7077
+ targetEntityId: string | null;
7078
+ sourceKind: RelationEndpointKind;
7079
+ targetKind: RelationEndpointKind;
7080
+ sourceCellId: string | null;
7081
+ targetCellId: string | null;
6055
7082
  }[];
6056
7083
  };
6057
7084
  meta: object;
@@ -6290,8 +7317,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6290
7317
  type: string;
6291
7318
  createdAt: Date;
6292
7319
  metadata: unknown;
6293
- sourceEntityId: string;
6294
- targetEntityId: string;
7320
+ sourceEntityId: string | null;
7321
+ targetEntityId: string | null;
7322
+ sourceKind: RelationEndpointKind;
7323
+ targetKind: RelationEndpointKind;
7324
+ sourceCellId: string | null;
7325
+ targetCellId: string | null;
6295
7326
  }[];
6296
7327
  relatedEntities: any[];
6297
7328
  stats: {
@@ -6333,8 +7364,42 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6333
7364
  type: string;
6334
7365
  createdAt: Date;
6335
7366
  metadata: unknown;
6336
- sourceEntityId: string;
6337
- targetEntityId: string;
7367
+ sourceEntityId: string | null;
7368
+ targetEntityId: string | null;
7369
+ sourceKind: RelationEndpointKind;
7370
+ targetKind: RelationEndpointKind;
7371
+ sourceCellId: string | null;
7372
+ targetCellId: string | null;
7373
+ }[];
7374
+ };
7375
+ meta: object;
7376
+ }>;
7377
+ getFull: import("@trpc/server").TRPCQueryProcedure<{
7378
+ input: {
7379
+ profileSlug?: string | undefined;
7380
+ limit?: number | undefined;
7381
+ };
7382
+ output: {
7383
+ entities: {
7384
+ workspaceId: string | null;
7385
+ id: string;
7386
+ type: string;
7387
+ title: string | null;
7388
+ preview: string | null;
7389
+ }[];
7390
+ relations: {
7391
+ userId: string;
7392
+ workspaceId: string | null;
7393
+ id: string;
7394
+ type: string;
7395
+ createdAt: Date;
7396
+ metadata: unknown;
7397
+ sourceEntityId: string | null;
7398
+ targetEntityId: string | null;
7399
+ sourceKind: RelationEndpointKind;
7400
+ targetKind: RelationEndpointKind;
7401
+ sourceCellId: string | null;
7402
+ targetCellId: string | null;
6338
7403
  }[];
6339
7404
  };
6340
7405
  meta: object;
@@ -6414,6 +7479,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6414
7479
  description: string | null;
6415
7480
  settings: WorkspaceSettings;
6416
7481
  ownerId: string;
7482
+ systemSlug: string | null;
7483
+ packageSlug: string | null;
7484
+ provisioningProposalId: string | null;
7485
+ provisioningStatus: string | null;
7486
+ workspaceType: string;
6417
7487
  subscriptionTier: string | null;
6418
7488
  subscriptionStatus: string | null;
6419
7489
  stripeCustomerId: string | null;
@@ -6435,6 +7505,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6435
7505
  description: string | null;
6436
7506
  settings: WorkspaceSettings;
6437
7507
  ownerId: string;
7508
+ systemSlug: string | null;
7509
+ packageSlug: string | null;
7510
+ provisioningProposalId: string | null;
7511
+ provisioningStatus: string | null;
7512
+ workspaceType: string;
6438
7513
  subscriptionTier: string | null;
6439
7514
  subscriptionStatus: string | null;
6440
7515
  stripeCustomerId: string | null;
@@ -6503,6 +7578,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6503
7578
  description: string | null;
6504
7579
  type: string;
6505
7580
  settings: WorkspaceSettings;
7581
+ systemSlug: string | null;
7582
+ packageSlug: string | null;
7583
+ provisioningProposalId: string | null;
7584
+ provisioningStatus: string | null;
7585
+ workspaceType: string;
6506
7586
  subscriptionTier: string | null;
6507
7587
  subscriptionStatus: string | null;
6508
7588
  stripeCustomerId: string | null;
@@ -6527,6 +7607,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6527
7607
  description: string | null;
6528
7608
  settings: WorkspaceSettings;
6529
7609
  ownerId: string;
7610
+ systemSlug: string | null;
7611
+ packageSlug: string | null;
7612
+ provisioningProposalId: string | null;
7613
+ provisioningStatus: string | null;
7614
+ workspaceType: string;
6530
7615
  subscriptionTier: string | null;
6531
7616
  subscriptionStatus: string | null;
6532
7617
  stripeCustomerId: string | null;
@@ -6546,6 +7631,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6546
7631
  description: string | null;
6547
7632
  settings: WorkspaceSettings;
6548
7633
  ownerId: string;
7634
+ systemSlug: string | null;
7635
+ packageSlug: string | null;
7636
+ provisioningProposalId: string | null;
7637
+ provisioningStatus: string | null;
7638
+ workspaceType: string;
6549
7639
  subscriptionTier: string | null;
6550
7640
  subscriptionStatus: string | null;
6551
7641
  stripeCustomerId: string | null;
@@ -6561,6 +7651,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6561
7651
  output: {
6562
7652
  status: "deleted";
6563
7653
  message: string;
7654
+ purged: {
7655
+ entities: number;
7656
+ documents: number;
7657
+ relations: number;
7658
+ proposals: number;
7659
+ blobs: number;
7660
+ };
6564
7661
  };
6565
7662
  meta: object;
6566
7663
  }>;
@@ -6605,6 +7702,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6605
7702
  locale: string;
6606
7703
  userType: string;
6607
7704
  agentMetadata: AgentMetadata | null;
7705
+ createdByUserId: string | null;
7706
+ isPersonalAgent: boolean;
7707
+ agentTemplate: string | null;
7708
+ agentType: string | null;
7709
+ parentAgentId: string | null;
6608
7710
  kratosIdentityId: string | null;
6609
7711
  lastSyncedAt: Date | null;
6610
7712
  createdAt: Date;
@@ -6920,7 +8022,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6920
8022
  templateId?: string | undefined;
6921
8023
  templateName?: string | undefined;
6922
8024
  workspaceName?: string | undefined;
6923
- workspaceType?: "personal" | "project" | "agent" | "operational" | undefined;
8025
+ workspaceType?: "personal" | "agent" | "project" | "operational" | undefined;
6924
8026
  linkedAgentId?: string | undefined;
6925
8027
  workspaceId?: string | undefined;
6926
8028
  proposalId?: string | undefined;
@@ -7142,7 +8244,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7142
8244
  layoutConfig?: Record<string, unknown> | undefined;
7143
8245
  profileEntityBentoTemplates?: Record<string, unknown> | undefined;
7144
8246
  };
7145
- mode?: "update" | "create" | undefined;
8247
+ mode?: "create" | "update" | undefined;
7146
8248
  workspaceId?: string | undefined;
7147
8249
  proposalId?: string | undefined;
7148
8250
  appId?: string | undefined;
@@ -7164,6 +8266,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7164
8266
  };
7165
8267
  meta: object;
7166
8268
  }>;
8269
+ resetEntities: import("@trpc/server").TRPCMutationProcedure<{
8270
+ input: {
8271
+ workspaceId: string;
8272
+ };
8273
+ output: {
8274
+ deletedCount: number;
8275
+ };
8276
+ meta: object;
8277
+ }>;
7167
8278
  }>>;
7168
8279
  views: import("@trpc/server").TRPCBuiltRouter<{
7169
8280
  ctx: Context;
@@ -7244,7 +8355,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7244
8355
  limit?: number | undefined;
7245
8356
  offset?: number | undefined;
7246
8357
  workspaceIds?: string[] | undefined;
7247
- type?: "calendar" | "table" | "whiteboard" | "list" | "all" | "graph" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap" | undefined;
8358
+ type?: "calendar" | "table" | "whiteboard" | "list" | "graph" | "all" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap" | undefined;
7248
8359
  excludeAutoCreated?: boolean | undefined;
7249
8360
  };
7250
8361
  output: PaginatedResponse<{
@@ -7431,8 +8542,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7431
8542
  id: string;
7432
8543
  userId: string;
7433
8544
  workspaceId: string | null;
7434
- sourceEntityId: string;
7435
- targetEntityId: string;
8545
+ sourceEntityId: string | null;
8546
+ targetEntityId: string | null;
8547
+ sourceKind: RelationEndpointKind;
8548
+ targetKind: RelationEndpointKind;
8549
+ sourceCellId: string | null;
8550
+ targetCellId: string | null;
7436
8551
  type: string;
7437
8552
  metadata: unknown;
7438
8553
  createdAt: Date;
@@ -7831,7 +8946,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7831
8946
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
7832
8947
  createPublicLink: import("@trpc/server").TRPCMutationProcedure<{
7833
8948
  input: {
7834
- resourceType: "view" | "entity" | "document";
8949
+ resourceType: "entity" | "document" | "view";
7835
8950
  resourceId: string;
7836
8951
  expiresInDays?: number | undefined;
7837
8952
  access?: "workspace_only" | "anyone_with_link" | undefined;
@@ -7846,7 +8961,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7846
8961
  }>;
7847
8962
  invite: import("@trpc/server").TRPCMutationProcedure<{
7848
8963
  input: {
7849
- resourceType: "view" | "entity" | "document";
8964
+ resourceType: "entity" | "document" | "view";
7850
8965
  resourceId: string;
7851
8966
  userEmail: string;
7852
8967
  };
@@ -7948,7 +9063,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7948
9063
  }>;
7949
9064
  list: import("@trpc/server").TRPCQueryProcedure<{
7950
9065
  input: {
7951
- resourceType: "view" | "entity" | "document";
9066
+ resourceType: "entity" | "document" | "view";
7952
9067
  resourceId: string;
7953
9068
  visibility?: "public" | "private" | undefined;
7954
9069
  expiresAt?: Date | undefined;
@@ -8531,7 +9646,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8531
9646
  createTrigger: import("@trpc/server").TRPCMutationProcedure<{
8532
9647
  input: {
8533
9648
  skillId: string;
8534
- type: "cron" | "manual" | "entity_event";
9649
+ type: "entity_event" | "cron" | "manual";
8535
9650
  eventPattern?: string | undefined;
8536
9651
  filters?: Record<string, unknown> | undefined;
8537
9652
  cronExpression?: string | undefined;
@@ -8541,7 +9656,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8541
9656
  userId: string;
8542
9657
  workspaceId: string | null;
8543
9658
  id: string;
8544
- type: "cron" | "manual" | "entity_event";
9659
+ type: "entity_event" | "cron" | "manual";
8545
9660
  updatedAt: Date;
8546
9661
  createdAt: Date;
8547
9662
  isActive: boolean;
@@ -8563,7 +9678,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8563
9678
  skillId: string;
8564
9679
  workspaceId: string | null;
8565
9680
  userId: string;
8566
- type: "cron" | "manual" | "entity_event";
9681
+ type: "entity_event" | "cron" | "manual";
8567
9682
  eventPattern: string | null;
8568
9683
  filters: Record<string, unknown> | null;
8569
9684
  cronExpression: string | null;
@@ -8585,7 +9700,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8585
9700
  skillId: string;
8586
9701
  workspaceId: string | null;
8587
9702
  userId: string;
8588
- type: "cron" | "manual" | "entity_event";
9703
+ type: "entity_event" | "cron" | "manual";
8589
9704
  eventPattern: string | null;
8590
9705
  filters: Record<string, unknown> | null;
8591
9706
  cronExpression: string | null;
@@ -8901,6 +10016,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8901
10016
  defaultValues: unknown;
8902
10017
  semanticSlug: string | null;
8903
10018
  entityScope: "pod" | "workspace";
10019
+ defaultListRenderer: unknown;
10020
+ defaultDetailRenderer: unknown;
8904
10021
  }[];
8905
10022
  };
8906
10023
  meta: object;
@@ -8926,6 +10043,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8926
10043
  defaultValues: unknown;
8927
10044
  semanticSlug: string | null;
8928
10045
  entityScope: "pod" | "workspace";
10046
+ defaultListRenderer: unknown;
10047
+ defaultDetailRenderer: unknown;
8929
10048
  };
8930
10049
  effectiveProperties: EffectiveProperty[];
8931
10050
  };
@@ -8962,6 +10081,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8962
10081
  defaultValues: unknown;
8963
10082
  semanticSlug: string | null;
8964
10083
  entityScope: "pod" | "workspace";
10084
+ defaultListRenderer: unknown;
10085
+ defaultDetailRenderer: unknown;
8965
10086
  };
8966
10087
  existing: boolean;
8967
10088
  status?: undefined;
@@ -8990,6 +10111,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8990
10111
  defaultValues: unknown;
8991
10112
  semanticSlug: string | null;
8992
10113
  entityScope: "pod" | "workspace";
10114
+ defaultListRenderer: unknown;
10115
+ defaultDetailRenderer: unknown;
8993
10116
  };
8994
10117
  existing?: undefined;
8995
10118
  status?: undefined;
@@ -9008,6 +10131,76 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9008
10131
  scope?: "user" | "shared" | "system" | "workspace" | undefined;
9009
10132
  allowedWorkspaceIds?: string[] | undefined;
9010
10133
  entityScope?: "pod" | "workspace" | undefined;
10134
+ defaultListRenderer?: {
10135
+ kind: "cell";
10136
+ cellKey: string;
10137
+ props: Record<string, unknown>;
10138
+ title?: string | undefined;
10139
+ displayMode?: string | undefined;
10140
+ rendererHint?: Record<string, unknown> | undefined;
10141
+ } | {
10142
+ kind: "view";
10143
+ viewId: string;
10144
+ title?: string | undefined;
10145
+ displayMode?: string | undefined;
10146
+ } | {
10147
+ kind: "iframe-srcdoc";
10148
+ appId: string;
10149
+ srcdoc: string;
10150
+ title?: string | undefined;
10151
+ props?: Record<string, unknown> | undefined;
10152
+ } | {
10153
+ kind: "external-app";
10154
+ appId: string;
10155
+ url: string;
10156
+ title?: string | undefined;
10157
+ props?: Record<string, unknown> | undefined;
10158
+ } | {
10159
+ kind: "url";
10160
+ url: string;
10161
+ external?: boolean | undefined;
10162
+ title?: string | undefined;
10163
+ } | {
10164
+ kind: "view-adapter";
10165
+ adapterKey: string;
10166
+ props?: Record<string, unknown> | undefined;
10167
+ title?: string | undefined;
10168
+ } | null | undefined;
10169
+ defaultDetailRenderer?: {
10170
+ kind: "cell";
10171
+ cellKey: string;
10172
+ props: Record<string, unknown>;
10173
+ title?: string | undefined;
10174
+ displayMode?: string | undefined;
10175
+ rendererHint?: Record<string, unknown> | undefined;
10176
+ } | {
10177
+ kind: "view";
10178
+ viewId: string;
10179
+ title?: string | undefined;
10180
+ displayMode?: string | undefined;
10181
+ } | {
10182
+ kind: "iframe-srcdoc";
10183
+ appId: string;
10184
+ srcdoc: string;
10185
+ title?: string | undefined;
10186
+ props?: Record<string, unknown> | undefined;
10187
+ } | {
10188
+ kind: "external-app";
10189
+ appId: string;
10190
+ url: string;
10191
+ title?: string | undefined;
10192
+ props?: Record<string, unknown> | undefined;
10193
+ } | {
10194
+ kind: "url";
10195
+ url: string;
10196
+ external?: boolean | undefined;
10197
+ title?: string | undefined;
10198
+ } | {
10199
+ kind: "view-adapter";
10200
+ adapterKey: string;
10201
+ props?: Record<string, unknown> | undefined;
10202
+ title?: string | undefined;
10203
+ } | null | undefined;
9011
10204
  };
9012
10205
  output: {
9013
10206
  profile: {
@@ -9026,6 +10219,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9026
10219
  defaultValues: unknown;
9027
10220
  semanticSlug: string | null;
9028
10221
  entityScope: "pod" | "workspace";
10222
+ defaultListRenderer: unknown;
10223
+ defaultDetailRenderer: unknown;
9029
10224
  };
9030
10225
  };
9031
10226
  meta: object;
@@ -9069,6 +10264,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9069
10264
  defaultValues: unknown;
9070
10265
  semanticSlug: string | null;
9071
10266
  entityScope: "pod" | "workspace";
10267
+ defaultListRenderer: unknown;
10268
+ defaultDetailRenderer: unknown;
9072
10269
  }[];
9073
10270
  };
9074
10271
  meta: object;
@@ -9104,6 +10301,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9104
10301
  defaultValues: unknown;
9105
10302
  semanticSlug: string | null;
9106
10303
  entityScope: "pod" | "workspace";
10304
+ defaultListRenderer: unknown;
10305
+ defaultDetailRenderer: unknown;
9107
10306
  }[];
9108
10307
  };
9109
10308
  meta: object;
@@ -9130,6 +10329,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9130
10329
  defaultValues: unknown;
9131
10330
  semanticSlug: string | null;
9132
10331
  entityScope: "pod" | "workspace";
10332
+ defaultListRenderer: unknown;
10333
+ defaultDetailRenderer: unknown;
9133
10334
  }[];
9134
10335
  };
9135
10336
  meta: object;
@@ -9154,6 +10355,65 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9154
10355
  };
9155
10356
  meta: object;
9156
10357
  }>;
10358
+ getEffectiveRenderers: import("@trpc/server").TRPCQueryProcedure<{
10359
+ input: {
10360
+ profileSlug: string;
10361
+ slot?: "list" | "detail" | undefined;
10362
+ };
10363
+ output: {
10364
+ list: RendererRef;
10365
+ detail: RendererRef | null;
10366
+ } | {
10367
+ list: RendererRef | null;
10368
+ detail: RendererRef;
10369
+ };
10370
+ meta: object;
10371
+ }>;
10372
+ setProfileRendererOverride: import("@trpc/server").TRPCMutationProcedure<{
10373
+ input: {
10374
+ profileSlug: string;
10375
+ slot: "list" | "detail";
10376
+ ref: {
10377
+ kind: "cell";
10378
+ cellKey: string;
10379
+ props: Record<string, unknown>;
10380
+ title?: string | undefined;
10381
+ displayMode?: string | undefined;
10382
+ rendererHint?: Record<string, unknown> | undefined;
10383
+ } | {
10384
+ kind: "view";
10385
+ viewId: string;
10386
+ title?: string | undefined;
10387
+ displayMode?: string | undefined;
10388
+ } | {
10389
+ kind: "iframe-srcdoc";
10390
+ appId: string;
10391
+ srcdoc: string;
10392
+ title?: string | undefined;
10393
+ props?: Record<string, unknown> | undefined;
10394
+ } | {
10395
+ kind: "external-app";
10396
+ appId: string;
10397
+ url: string;
10398
+ title?: string | undefined;
10399
+ props?: Record<string, unknown> | undefined;
10400
+ } | {
10401
+ kind: "url";
10402
+ url: string;
10403
+ external?: boolean | undefined;
10404
+ title?: string | undefined;
10405
+ } | {
10406
+ kind: "view-adapter";
10407
+ adapterKey: string;
10408
+ props?: Record<string, unknown> | undefined;
10409
+ title?: string | undefined;
10410
+ } | null;
10411
+ };
10412
+ output: {
10413
+ success: boolean;
10414
+ };
10415
+ meta: object;
10416
+ }>;
9157
10417
  }>>;
9158
10418
  propertyDefs: import("@trpc/server").TRPCBuiltRouter<{
9159
10419
  ctx: Context;
@@ -9523,11 +10783,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9523
10783
  create: import("@trpc/server").TRPCMutationProcedure<{
9524
10784
  input: {
9525
10785
  workspaceId: string;
9526
- agentType: string;
9527
10786
  name: string;
9528
- role: "admin" | "editor" | "viewer";
10787
+ agentType?: string | undefined;
10788
+ role?: "admin" | "editor" | "viewer" | undefined;
9529
10789
  description?: string | undefined;
9530
10790
  capabilities?: string[] | undefined;
10791
+ template?: "custom" | "assistant" | "twin" | undefined;
9531
10792
  };
9532
10793
  output: {
9533
10794
  id: `${string}-${string}-${string}-${string}-${string}`;
@@ -9535,6 +10796,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9535
10796
  name: string;
9536
10797
  agentType: string;
9537
10798
  role: "admin" | "editor" | "viewer";
10799
+ template: "custom" | "assistant" | "twin" | undefined;
9538
10800
  };
9539
10801
  meta: object;
9540
10802
  }>;
@@ -9542,6 +10804,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9542
10804
  input: {
9543
10805
  workspaceId: string;
9544
10806
  };
10807
+ output: {
10808
+ role: string | null;
10809
+ joinedAt: Date | null;
10810
+ id: string;
10811
+ name: string | null;
10812
+ email: string;
10813
+ agentMetadata: AgentMetadata | null;
10814
+ }[];
10815
+ meta: object;
10816
+ }>;
10817
+ listAll: import("@trpc/server").TRPCQueryProcedure<{
10818
+ input: void;
9545
10819
  output: {
9546
10820
  id: string;
9547
10821
  name: string | null;
@@ -9560,9 +10834,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9560
10834
  role?: "admin" | "editor" | "viewer" | undefined;
9561
10835
  description?: string | undefined;
9562
10836
  capabilities?: string[] | undefined;
10837
+ writesRequireProposal?: boolean | undefined;
9563
10838
  };
9564
10839
  output: {
10840
+ status: "proposed";
10841
+ proposalId: string;
10842
+ } | {
9565
10843
  status: "updated";
10844
+ proposalId?: undefined;
9566
10845
  };
9567
10846
  meta: object;
9568
10847
  }>;
@@ -9797,8 +11076,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9797
11076
  workspaceId: string | null;
9798
11077
  id: string;
9799
11078
  updatedAt: Date;
9800
- createdAt: Date;
9801
11079
  agentType: string;
11080
+ createdAt: Date;
9802
11081
  promptAppend: string | null;
9803
11082
  extraToolIds: string[];
9804
11083
  disabledToolIds: string[];
@@ -9818,8 +11097,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9818
11097
  workspaceId: string | null;
9819
11098
  id: string;
9820
11099
  updatedAt: Date;
9821
- createdAt: Date;
9822
11100
  agentType: string;
11101
+ createdAt: Date;
9823
11102
  promptAppend: string | null;
9824
11103
  extraToolIds: string[];
9825
11104
  disabledToolIds: string[];
@@ -9845,8 +11124,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9845
11124
  workspaceId: string | null;
9846
11125
  id: string;
9847
11126
  updatedAt: Date;
9848
- createdAt: Date;
9849
11127
  agentType: string;
11128
+ createdAt: Date;
9850
11129
  promptAppend: string | null;
9851
11130
  extraToolIds: string[];
9852
11131
  disabledToolIds: string[];
@@ -10041,6 +11320,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10041
11320
  w: number;
10042
11321
  h: number;
10043
11322
  } | null;
11323
+ deps: Record<string, string> | null;
11324
+ trustLevel: WidgetTrustLevel;
10044
11325
  }[];
10045
11326
  meta: object;
10046
11327
  }>;
@@ -10074,6 +11355,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10074
11355
  w: number;
10075
11356
  h: number;
10076
11357
  } | null;
11358
+ deps: Record<string, string> | null;
11359
+ trustLevel: WidgetTrustLevel;
10077
11360
  } | null;
10078
11361
  meta: object;
10079
11362
  }>;
@@ -10084,9 +11367,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10084
11367
  description?: string | undefined;
10085
11368
  icon?: string | undefined;
10086
11369
  category?: string | undefined;
10087
- rendererType?: "builtin" | "iframe" | "native" | undefined;
11370
+ rendererType?: "builtin" | "iframe" | "native" | "frame" | undefined;
10088
11371
  rendererSource?: string | undefined;
10089
11372
  source?: string | undefined;
11373
+ deps?: Record<string, string> | undefined;
10090
11374
  configSchema?: Record<string, unknown> | undefined;
10091
11375
  defaultConfig?: Record<string, unknown> | undefined;
10092
11376
  defaultSize?: {
@@ -10124,6 +11408,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10124
11408
  w: number;
10125
11409
  h: number;
10126
11410
  } | null;
11411
+ deps: Record<string, string> | null;
11412
+ trustLevel: WidgetTrustLevel;
10127
11413
  };
10128
11414
  meta: object;
10129
11415
  }>;
@@ -10137,7 +11423,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10137
11423
  meta: object;
10138
11424
  }>;
10139
11425
  }>>;
10140
- channelGateway: import("@trpc/server").TRPCBuiltRouter<{
11426
+ cells: import("@trpc/server").TRPCBuiltRouter<{
10141
11427
  ctx: Context;
10142
11428
  meta: object;
10143
11429
  errorShape: {
@@ -10147,42 +11433,38 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10147
11433
  };
10148
11434
  transformer: true;
10149
11435
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
10150
- initLink: import("@trpc/server").TRPCMutationProcedure<{
11436
+ install: import("@trpc/server").TRPCMutationProcedure<{
10151
11437
  input: {
10152
- channel: "telegram" | "whatsapp" | "discord";
10153
- defaultChannelId?: string | undefined;
11438
+ packageSlug: string;
11439
+ cellKey: string;
10154
11440
  };
10155
11441
  output: {
10156
- token: string;
10157
- expiresAt: Date;
10158
- instruction: string;
11442
+ success: boolean;
11443
+ typeKey: string;
10159
11444
  };
10160
11445
  meta: object;
10161
11446
  }>;
10162
- list: import("@trpc/server").TRPCQueryProcedure<{
10163
- input: void;
10164
- output: {
10165
- workspaceId: string | null;
10166
- id: string;
10167
- createdAt: Date;
10168
- channel: string;
10169
- channelUserId: string;
10170
- defaultChannelId: string | null;
10171
- externalUsername: string | null;
10172
- }[];
10173
- meta: object;
10174
- }>;
10175
- unlink: import("@trpc/server").TRPCMutationProcedure<{
11447
+ uninstall: import("@trpc/server").TRPCMutationProcedure<{
10176
11448
  input: {
10177
- connectionId: string;
11449
+ typeKey: string;
10178
11450
  };
10179
11451
  output: {
10180
- ok: boolean;
11452
+ success: boolean;
10181
11453
  };
10182
11454
  meta: object;
10183
11455
  }>;
11456
+ listInstalled: import("@trpc/server").TRPCQueryProcedure<{
11457
+ input: void;
11458
+ output: {
11459
+ typeKey: string;
11460
+ name: string;
11461
+ deps: Record<string, string>;
11462
+ rendererSource: string;
11463
+ }[];
11464
+ meta: object;
11465
+ }>;
10184
11466
  }>>;
10185
- import: import("@trpc/server").TRPCBuiltRouter<{
11467
+ cellInstances: import("@trpc/server").TRPCBuiltRouter<{
10186
11468
  ctx: Context;
10187
11469
  meta: object;
10188
11470
  errorShape: {
@@ -10192,95 +11474,297 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10192
11474
  };
10193
11475
  transformer: true;
10194
11476
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
10195
- submitBatch: import("@trpc/server").TRPCMutationProcedure<{
11477
+ create: import("@trpc/server").TRPCMutationProcedure<{
10196
11478
  input: {
10197
- items: {
10198
- path: string;
10199
- contentBase64: string;
10200
- mimeType?: string | undefined;
10201
- }[];
11479
+ cellType: string;
11480
+ config?: Record<string, unknown> | undefined;
11481
+ name?: string | undefined;
11482
+ isTemplate?: boolean | undefined;
11483
+ sourceDocumentId?: string | undefined;
10202
11484
  workspaceId?: string | undefined;
10203
11485
  };
10204
11486
  output: {
10205
- filesReceived: number;
10206
- entitiesCreated: number;
10207
- documentsCreated: number;
10208
- channelsCreated: number;
10209
- messagesCreated: number;
10210
- filesStoredOnly: number;
10211
- errors: {
10212
- path: string;
10213
- message: string;
10214
- }[];
10215
- batchId: `${string}-${string}-${string}-${string}-${string}`;
11487
+ id: string;
11488
+ workspaceId: string;
11489
+ userId: string;
11490
+ cellType: string;
11491
+ config: Record<string, unknown>;
11492
+ name: string | null;
11493
+ isTemplate: boolean;
11494
+ sourceDocumentId: string | null;
11495
+ createdByKind: CellInstanceCreatedByKind;
11496
+ trustLevel: CellInstanceTrustLevel;
11497
+ createdAt: Date;
11498
+ updatedAt: Date;
10216
11499
  };
10217
11500
  meta: object;
10218
11501
  }>;
10219
- linkedInContacts: import("@trpc/server").TRPCMutationProcedure<{
11502
+ createHtmlCell: import("@trpc/server").TRPCMutationProcedure<{
10220
11503
  input: {
10221
- contacts: {
10222
- externalId: string;
10223
- name: string;
10224
- email?: string | null | undefined;
10225
- company?: string | null | undefined;
10226
- role?: string | null | undefined;
10227
- connectedOn?: string | null | undefined;
10228
- }[];
11504
+ html: string;
11505
+ name?: string | undefined;
11506
+ workspaceId?: string | undefined;
10229
11507
  };
10230
11508
  output: {
10231
- jobId: string | null;
10232
- total: number;
10233
- status: "queued";
11509
+ id: string;
11510
+ workspaceId: string;
11511
+ userId: string;
11512
+ cellType: string;
11513
+ config: Record<string, unknown>;
11514
+ name: string | null;
11515
+ isTemplate: boolean;
11516
+ sourceDocumentId: string | null;
11517
+ createdByKind: CellInstanceCreatedByKind;
11518
+ trustLevel: CellInstanceTrustLevel;
11519
+ createdAt: Date;
11520
+ updatedAt: Date;
10234
11521
  };
10235
11522
  meta: object;
10236
11523
  }>;
10237
- previewModeling: import("@trpc/server").TRPCQueryProcedure<{
11524
+ get: import("@trpc/server").TRPCQueryProcedure<{
10238
11525
  input: {
10239
- source: "json" | "markdown" | "csv" | "bookmarks_html" | "contacts_device" | "telegram_archive" | "linkedin_archive" | "connector_sync" | "local_migration";
10240
- sampleRows: Record<string, unknown>[];
11526
+ id: string;
10241
11527
  };
10242
11528
  output: {
10243
- source: "json" | "markdown" | "csv" | "bookmarks_html" | "contacts_device" | "telegram_archive" | "linkedin_archive" | "connector_sync" | "local_migration";
10244
- analyzedRows: number;
10245
- suggestions: ImportModelingSuggestion[];
11529
+ id: string;
11530
+ workspaceId: string;
11531
+ userId: string;
11532
+ cellType: string;
11533
+ config: Record<string, unknown>;
11534
+ name: string | null;
11535
+ isTemplate: boolean;
11536
+ sourceDocumentId: string | null;
11537
+ createdByKind: CellInstanceCreatedByKind;
11538
+ trustLevel: CellInstanceTrustLevel;
11539
+ createdAt: Date;
11540
+ updatedAt: Date;
10246
11541
  };
10247
11542
  meta: object;
10248
11543
  }>;
10249
- }>>;
10250
- connectors: import("@trpc/server").TRPCBuiltRouter<{
10251
- ctx: Context;
10252
- meta: object;
10253
- errorShape: {
10254
- message: string;
10255
- code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
10256
- data: import("@trpc/server").TRPCDefaultErrorData;
10257
- };
10258
- transformer: true;
10259
- }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
10260
- providers: import("@trpc/server").TRPCQueryProcedure<{
11544
+ list: import("@trpc/server").TRPCQueryProcedure<{
10261
11545
  input: {
10262
- cpUrl?: string | undefined;
10263
- } | undefined;
11546
+ workspaceId: string;
11547
+ isTemplate?: boolean | undefined;
11548
+ };
10264
11549
  output: {
10265
- providers: unknown[];
10266
- connectorLimit: number;
10267
- tier: string;
11550
+ cellInstances: {
11551
+ id: string;
11552
+ workspaceId: string;
11553
+ userId: string;
11554
+ cellType: string;
11555
+ config: Record<string, unknown>;
11556
+ name: string | null;
11557
+ isTemplate: boolean;
11558
+ sourceDocumentId: string | null;
11559
+ createdByKind: CellInstanceCreatedByKind;
11560
+ trustLevel: CellInstanceTrustLevel;
11561
+ createdAt: Date;
11562
+ updatedAt: Date;
11563
+ }[];
10268
11564
  };
10269
11565
  meta: object;
10270
11566
  }>;
10271
- connections: import("@trpc/server").TRPCQueryProcedure<{
10272
- input: {
10273
- cpUrl?: string | undefined;
10274
- } | undefined;
10275
- output: unknown[];
10276
- meta: object;
10277
- }>;
10278
- session: import("@trpc/server").TRPCMutationProcedure<{
11567
+ updateConfig: import("@trpc/server").TRPCMutationProcedure<{
10279
11568
  input: {
10280
- cpUrl?: string | undefined;
10281
- providerId?: string | undefined;
10282
- workspaceId?: string | undefined;
10283
- } | undefined;
11569
+ id: string;
11570
+ config: Record<string, unknown>;
11571
+ };
11572
+ output: {
11573
+ id: string;
11574
+ workspaceId: string;
11575
+ userId: string;
11576
+ cellType: string;
11577
+ config: Record<string, unknown>;
11578
+ name: string | null;
11579
+ isTemplate: boolean;
11580
+ sourceDocumentId: string | null;
11581
+ createdByKind: CellInstanceCreatedByKind;
11582
+ trustLevel: CellInstanceTrustLevel;
11583
+ createdAt: Date;
11584
+ updatedAt: Date;
11585
+ };
11586
+ meta: object;
11587
+ }>;
11588
+ duplicate: import("@trpc/server").TRPCMutationProcedure<{
11589
+ input: {
11590
+ id: string;
11591
+ deep?: boolean | undefined;
11592
+ };
11593
+ output: {
11594
+ id: string;
11595
+ workspaceId: string;
11596
+ userId: string;
11597
+ cellType: string;
11598
+ config: Record<string, unknown>;
11599
+ name: string | null;
11600
+ isTemplate: boolean;
11601
+ sourceDocumentId: string | null;
11602
+ createdByKind: CellInstanceCreatedByKind;
11603
+ trustLevel: CellInstanceTrustLevel;
11604
+ createdAt: Date;
11605
+ updatedAt: Date;
11606
+ };
11607
+ meta: object;
11608
+ }>;
11609
+ link: import("@trpc/server").TRPCMutationProcedure<{
11610
+ input: {
11611
+ cellId: string;
11612
+ entityId: string;
11613
+ relationType?: string | undefined;
11614
+ workspaceId?: string | undefined;
11615
+ };
11616
+ output: {
11617
+ id: string;
11618
+ status: "created";
11619
+ };
11620
+ meta: object;
11621
+ }>;
11622
+ }>>;
11623
+ channelGateway: import("@trpc/server").TRPCBuiltRouter<{
11624
+ ctx: Context;
11625
+ meta: object;
11626
+ errorShape: {
11627
+ message: string;
11628
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
11629
+ data: import("@trpc/server").TRPCDefaultErrorData;
11630
+ };
11631
+ transformer: true;
11632
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
11633
+ initLink: import("@trpc/server").TRPCMutationProcedure<{
11634
+ input: {
11635
+ channel: "telegram" | "whatsapp" | "discord";
11636
+ defaultChannelId?: string | undefined;
11637
+ };
11638
+ output: {
11639
+ token: string;
11640
+ expiresAt: Date;
11641
+ instruction: string;
11642
+ };
11643
+ meta: object;
11644
+ }>;
11645
+ list: import("@trpc/server").TRPCQueryProcedure<{
11646
+ input: void;
11647
+ output: {
11648
+ workspaceId: string | null;
11649
+ id: string;
11650
+ createdAt: Date;
11651
+ channel: string;
11652
+ channelUserId: string;
11653
+ defaultChannelId: string | null;
11654
+ externalUsername: string | null;
11655
+ }[];
11656
+ meta: object;
11657
+ }>;
11658
+ unlink: import("@trpc/server").TRPCMutationProcedure<{
11659
+ input: {
11660
+ connectionId: string;
11661
+ };
11662
+ output: {
11663
+ ok: boolean;
11664
+ };
11665
+ meta: object;
11666
+ }>;
11667
+ }>>;
11668
+ import: import("@trpc/server").TRPCBuiltRouter<{
11669
+ ctx: Context;
11670
+ meta: object;
11671
+ errorShape: {
11672
+ message: string;
11673
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
11674
+ data: import("@trpc/server").TRPCDefaultErrorData;
11675
+ };
11676
+ transformer: true;
11677
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
11678
+ submitBatch: import("@trpc/server").TRPCMutationProcedure<{
11679
+ input: {
11680
+ items: {
11681
+ path: string;
11682
+ contentBase64: string;
11683
+ mimeType?: string | undefined;
11684
+ }[];
11685
+ workspaceId?: string | undefined;
11686
+ };
11687
+ output: {
11688
+ filesReceived: number;
11689
+ entitiesCreated: number;
11690
+ proposalsCreated: number;
11691
+ documentsCreated: number;
11692
+ channelsCreated: number;
11693
+ messagesCreated: number;
11694
+ filesStoredOnly: number;
11695
+ errors: {
11696
+ path: string;
11697
+ message: string;
11698
+ }[];
11699
+ batchId: `${string}-${string}-${string}-${string}-${string}`;
11700
+ };
11701
+ meta: object;
11702
+ }>;
11703
+ linkedInContacts: import("@trpc/server").TRPCMutationProcedure<{
11704
+ input: {
11705
+ contacts: {
11706
+ externalId: string;
11707
+ name: string;
11708
+ email?: string | null | undefined;
11709
+ company?: string | null | undefined;
11710
+ role?: string | null | undefined;
11711
+ connectedOn?: string | null | undefined;
11712
+ }[];
11713
+ };
11714
+ output: {
11715
+ jobId: string | null;
11716
+ total: number;
11717
+ status: "queued";
11718
+ };
11719
+ meta: object;
11720
+ }>;
11721
+ previewModeling: import("@trpc/server").TRPCQueryProcedure<{
11722
+ input: {
11723
+ source: "json" | "markdown" | "csv" | "bookmarks_html" | "contacts_device" | "telegram_archive" | "linkedin_archive" | "connector_sync" | "local_migration";
11724
+ sampleRows: Record<string, unknown>[];
11725
+ };
11726
+ output: {
11727
+ source: "json" | "markdown" | "csv" | "bookmarks_html" | "contacts_device" | "telegram_archive" | "linkedin_archive" | "connector_sync" | "local_migration";
11728
+ analyzedRows: number;
11729
+ suggestions: ImportModelingSuggestion[];
11730
+ };
11731
+ meta: object;
11732
+ }>;
11733
+ }>>;
11734
+ connectors: import("@trpc/server").TRPCBuiltRouter<{
11735
+ ctx: Context;
11736
+ meta: object;
11737
+ errorShape: {
11738
+ message: string;
11739
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
11740
+ data: import("@trpc/server").TRPCDefaultErrorData;
11741
+ };
11742
+ transformer: true;
11743
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
11744
+ providers: import("@trpc/server").TRPCQueryProcedure<{
11745
+ input: {
11746
+ cpUrl?: string | undefined;
11747
+ } | undefined;
11748
+ output: {
11749
+ providers: unknown[];
11750
+ connectorLimit: number;
11751
+ tier: string;
11752
+ };
11753
+ meta: object;
11754
+ }>;
11755
+ connections: import("@trpc/server").TRPCQueryProcedure<{
11756
+ input: {
11757
+ cpUrl?: string | undefined;
11758
+ } | undefined;
11759
+ output: unknown[];
11760
+ meta: object;
11761
+ }>;
11762
+ session: import("@trpc/server").TRPCMutationProcedure<{
11763
+ input: {
11764
+ cpUrl?: string | undefined;
11765
+ providerId?: string | undefined;
11766
+ workspaceId?: string | undefined;
11767
+ } | undefined;
10284
11768
  output: {
10285
11769
  token: string;
10286
11770
  nangoHost: string | undefined;
@@ -10509,7 +11993,39 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10509
11993
  userId: string;
10510
11994
  type: string;
10511
11995
  category: "data" | "system" | "ai" | "governance" | "inbox";
10512
- priority: "normal" | "low" | "high" | "urgent";
11996
+ priority: "low" | "normal" | "high" | "urgent";
11997
+ title: string;
11998
+ body: string;
11999
+ icon: string | null;
12000
+ sourceType: string;
12001
+ sourceId: string | null;
12002
+ workspaceUrl: string | null;
12003
+ actions: unknown;
12004
+ groupKey: string | null;
12005
+ status: "read" | "unread" | "dismissed" | "actioned";
12006
+ readAt: Date | null;
12007
+ expiresAt: Date | null;
12008
+ createdAt: Date;
12009
+ }[];
12010
+ total: number;
12011
+ };
12012
+ meta: object;
12013
+ }>;
12014
+ listAll: import("@trpc/server").TRPCQueryProcedure<{
12015
+ input: {
12016
+ status?: "read" | "unread" | "dismissed" | "all" | undefined;
12017
+ category?: "data" | "system" | "ai" | "governance" | "inbox" | undefined;
12018
+ limit?: number | undefined;
12019
+ offset?: number | undefined;
12020
+ };
12021
+ output: {
12022
+ notifications: {
12023
+ id: string;
12024
+ workspaceId: string | null;
12025
+ userId: string;
12026
+ type: string;
12027
+ category: "data" | "system" | "ai" | "governance" | "inbox";
12028
+ priority: "low" | "normal" | "high" | "urgent";
10513
12029
  title: string;
10514
12030
  body: string;
10515
12031
  icon: string | null;
@@ -10633,6 +12149,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10633
12149
  frequencyDays?: number | undefined;
10634
12150
  } | undefined;
10635
12151
  nudgeDensity?: "minimal" | "balanced" | "proactive" | undefined;
12152
+ triggers?: {
12153
+ captureCluster?: boolean | undefined;
12154
+ taskCompleted?: boolean | undefined;
12155
+ questionCreated?: boolean | undefined;
12156
+ decisionCreated?: boolean | undefined;
12157
+ } | undefined;
10636
12158
  mutedUntil?: string | null | undefined;
10637
12159
  };
10638
12160
  output: {
@@ -10654,6 +12176,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10654
12176
  frequencyDays: number;
10655
12177
  };
10656
12178
  nudgeDensity: ProactiveNudgeDensity;
12179
+ triggers: {
12180
+ captureCluster?: boolean;
12181
+ taskCompleted?: boolean;
12182
+ questionCreated?: boolean;
12183
+ decisionCreated?: boolean;
12184
+ };
10657
12185
  mutedUntil: string | undefined;
10658
12186
  };
10659
12187
  meta: object;
@@ -10900,6 +12428,29 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10900
12428
  output: void;
10901
12429
  meta: object;
10902
12430
  }>;
12431
+ adminRegister: import("@trpc/server").TRPCMutationProcedure<{
12432
+ input: {
12433
+ issuerUrl: string;
12434
+ displayName: string;
12435
+ allowedScopes: string[];
12436
+ };
12437
+ output: {
12438
+ id: string;
12439
+ updatedAt: Date;
12440
+ createdAt: Date;
12441
+ status: "approved" | "revoked" | "pending" | "rejected";
12442
+ description: string | null;
12443
+ reviewedBy: string | null;
12444
+ reviewedAt: Date | null;
12445
+ rejectionReason: string | null;
12446
+ displayName: string;
12447
+ issuerUrl: string;
12448
+ allowedScopes: string[];
12449
+ isBuiltIn: boolean;
12450
+ initialRequestData: unknown;
12451
+ };
12452
+ meta: object;
12453
+ }>;
10903
12454
  }>>;
10904
12455
  sourceConfigs: import("@trpc/server").TRPCBuiltRouter<{
10905
12456
  ctx: Context;
@@ -11522,6 +13073,312 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11522
13073
  meta: object;
11523
13074
  }>;
11524
13075
  }>>;
13076
+ secretsVault: import("@trpc/server").TRPCBuiltRouter<{
13077
+ ctx: Context;
13078
+ meta: object;
13079
+ errorShape: {
13080
+ message: string;
13081
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
13082
+ data: import("@trpc/server").TRPCDefaultErrorData;
13083
+ };
13084
+ transformer: true;
13085
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
13086
+ hasVault: import("@trpc/server").TRPCQueryProcedure<{
13087
+ input: void;
13088
+ output: boolean;
13089
+ meta: object;
13090
+ }>;
13091
+ getVaultMetadata: import("@trpc/server").TRPCQueryProcedure<{
13092
+ input: void;
13093
+ output: {
13094
+ salt: any;
13095
+ keyDerivationAlgorithm: any;
13096
+ keyDerivationParams: any;
13097
+ verificationCipher: any;
13098
+ verificationIv: any;
13099
+ verificationTag: any;
13100
+ hasRecoveryKey: boolean;
13101
+ } | null;
13102
+ meta: object;
13103
+ }>;
13104
+ setupVault: import("@trpc/server").TRPCMutationProcedure<{
13105
+ input: {
13106
+ salt: string;
13107
+ keyDerivationAlgorithm: string;
13108
+ keyDerivationParams: {
13109
+ N: number;
13110
+ r: number;
13111
+ p: number;
13112
+ };
13113
+ verificationCipher: string;
13114
+ verificationIv: string;
13115
+ verificationTag: string;
13116
+ recoveryKeyHash?: string | undefined;
13117
+ };
13118
+ output: {
13119
+ success: boolean;
13120
+ };
13121
+ meta: object;
13122
+ }>;
13123
+ recordUnlock: import("@trpc/server").TRPCMutationProcedure<{
13124
+ input: void;
13125
+ output: {
13126
+ success: boolean;
13127
+ };
13128
+ meta: object;
13129
+ }>;
13130
+ generateRecoveryKey: import("@trpc/server").TRPCMutationProcedure<{
13131
+ input: void;
13132
+ output: {
13133
+ recoveryKey: string;
13134
+ message: string;
13135
+ };
13136
+ meta: object;
13137
+ }>;
13138
+ list: import("@trpc/server").TRPCQueryProcedure<{
13139
+ input: {
13140
+ type?: "identity" | "password" | "api_key" | "credential" | "note" | "card" | "ssh_key" | "certificate" | "env_variable" | "database" | "oauth" | undefined;
13141
+ category?: string | undefined;
13142
+ search?: string | undefined;
13143
+ tags?: string[] | undefined;
13144
+ includeDeleted?: boolean | undefined;
13145
+ limit?: number | undefined;
13146
+ offset?: number | undefined;
13147
+ } | undefined;
13148
+ output: any;
13149
+ meta: object;
13150
+ }>;
13151
+ get: import("@trpc/server").TRPCQueryProcedure<{
13152
+ input: {
13153
+ id: string;
13154
+ };
13155
+ output: {
13156
+ id: string;
13157
+ name: string;
13158
+ type: "identity" | "password" | "api_key" | "credential" | "note" | "card" | "ssh_key" | "certificate" | "env_variable" | "database" | "oauth";
13159
+ url: string | null;
13160
+ category: string | null;
13161
+ description: string | null;
13162
+ iconUrl: string | null;
13163
+ encryptedData: string;
13164
+ iv: string;
13165
+ authTag: string;
13166
+ encryptionVersion: number;
13167
+ isFavorite: boolean;
13168
+ isShared: boolean;
13169
+ isCompromised: boolean | null;
13170
+ passwordStrength: number | null;
13171
+ passwordLastChanged: Date | null;
13172
+ lastAccessedAt: Date | null;
13173
+ accessCount: number;
13174
+ createdAt: Date;
13175
+ updatedAt: Date;
13176
+ tags: string[];
13177
+ };
13178
+ meta: object;
13179
+ }>;
13180
+ create: import("@trpc/server").TRPCMutationProcedure<{
13181
+ input: {
13182
+ name: string;
13183
+ type: "identity" | "password" | "api_key" | "credential" | "note" | "card" | "ssh_key" | "certificate" | "env_variable" | "database" | "oauth";
13184
+ encryptedData: string;
13185
+ iv: string;
13186
+ authTag: string;
13187
+ url?: string | undefined;
13188
+ category?: string | undefined;
13189
+ description?: string | undefined;
13190
+ iconUrl?: string | undefined;
13191
+ passwordStrength?: number | undefined;
13192
+ tags?: string[] | undefined;
13193
+ workspaceId?: string | undefined;
13194
+ };
13195
+ output: {
13196
+ id: string;
13197
+ name: string;
13198
+ type: "identity" | "password" | "api_key" | "credential" | "note" | "card" | "ssh_key" | "certificate" | "env_variable" | "database" | "oauth";
13199
+ createdAt: Date;
13200
+ };
13201
+ meta: object;
13202
+ }>;
13203
+ update: import("@trpc/server").TRPCMutationProcedure<{
13204
+ input: {
13205
+ id: string;
13206
+ name?: string | undefined;
13207
+ url?: string | null | undefined;
13208
+ category?: string | null | undefined;
13209
+ description?: string | null | undefined;
13210
+ iconUrl?: string | null | undefined;
13211
+ encryptedData?: string | undefined;
13212
+ iv?: string | undefined;
13213
+ authTag?: string | undefined;
13214
+ isFavorite?: boolean | undefined;
13215
+ sortOrder?: number | undefined;
13216
+ passwordStrength?: number | undefined;
13217
+ tags?: string[] | undefined;
13218
+ };
13219
+ output: {
13220
+ id: string;
13221
+ name: string;
13222
+ updatedAt: Date;
13223
+ };
13224
+ meta: object;
13225
+ }>;
13226
+ delete: import("@trpc/server").TRPCMutationProcedure<{
13227
+ input: {
13228
+ id: string;
13229
+ };
13230
+ output: {
13231
+ success: boolean;
13232
+ };
13233
+ meta: object;
13234
+ }>;
13235
+ permanentDelete: import("@trpc/server").TRPCMutationProcedure<{
13236
+ input: {
13237
+ id: string;
13238
+ };
13239
+ output: {
13240
+ success: boolean;
13241
+ };
13242
+ meta: object;
13243
+ }>;
13244
+ restore: import("@trpc/server").TRPCMutationProcedure<{
13245
+ input: {
13246
+ id: string;
13247
+ };
13248
+ output: {
13249
+ success: boolean;
13250
+ };
13251
+ meta: object;
13252
+ }>;
13253
+ findByUrl: import("@trpc/server").TRPCQueryProcedure<{
13254
+ input: {
13255
+ url: string;
13256
+ };
13257
+ output: any;
13258
+ meta: object;
13259
+ }>;
13260
+ recordCopy: import("@trpc/server").TRPCMutationProcedure<{
13261
+ input: {
13262
+ id: string;
13263
+ };
13264
+ output: {
13265
+ success: boolean;
13266
+ };
13267
+ meta: object;
13268
+ }>;
13269
+ getCategories: import("@trpc/server").TRPCQueryProcedure<{
13270
+ input: void;
13271
+ output: string[];
13272
+ meta: object;
13273
+ }>;
13274
+ getTags: import("@trpc/server").TRPCQueryProcedure<{
13275
+ input: void;
13276
+ output: string[];
13277
+ meta: object;
13278
+ }>;
13279
+ share: import("@trpc/server").TRPCMutationProcedure<{
13280
+ input: {
13281
+ secretId: string;
13282
+ sharedWithUserId?: string | undefined;
13283
+ sharedWithWorkspaceId?: string | undefined;
13284
+ permission?: "read" | "write" | undefined;
13285
+ expiresAt?: Date | undefined;
13286
+ };
13287
+ output: {
13288
+ id: string;
13289
+ secretId: string;
13290
+ permission: string;
13291
+ };
13292
+ meta: object;
13293
+ }>;
13294
+ revokeShare: import("@trpc/server").TRPCMutationProcedure<{
13295
+ input: {
13296
+ shareId: string;
13297
+ };
13298
+ output: {
13299
+ success: boolean;
13300
+ };
13301
+ meta: object;
13302
+ }>;
13303
+ sharedWithMe: import("@trpc/server").TRPCQueryProcedure<{
13304
+ input: void;
13305
+ output: any;
13306
+ meta: object;
13307
+ }>;
13308
+ getAuditLog: import("@trpc/server").TRPCQueryProcedure<{
13309
+ input: {
13310
+ secretId: string;
13311
+ limit?: number | undefined;
13312
+ };
13313
+ output: any;
13314
+ meta: object;
13315
+ }>;
13316
+ getSecurityStats: import("@trpc/server").TRPCQueryProcedure<{
13317
+ input: void;
13318
+ output: {
13319
+ compromised: number;
13320
+ weakPasswords: number;
13321
+ oldPasswords: number;
13322
+ total: number;
13323
+ };
13324
+ meta: object;
13325
+ }>;
13326
+ markCompromised: import("@trpc/server").TRPCMutationProcedure<{
13327
+ input: {
13328
+ id: string;
13329
+ };
13330
+ output: {
13331
+ success: boolean;
13332
+ };
13333
+ meta: object;
13334
+ }>;
13335
+ grantAIAccess: import("@trpc/server").TRPCMutationProcedure<{
13336
+ input: {
13337
+ secretId: string;
13338
+ proposalId: string;
13339
+ };
13340
+ output: {
13341
+ vaultRef: string;
13342
+ secretId: string;
13343
+ proposalId: string;
13344
+ };
13345
+ meta: object;
13346
+ }>;
13347
+ }>>;
13348
+ subscriptions: import("@trpc/server").TRPCBuiltRouter<{
13349
+ ctx: Context;
13350
+ meta: object;
13351
+ errorShape: {
13352
+ message: string;
13353
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
13354
+ data: import("@trpc/server").TRPCDefaultErrorData;
13355
+ };
13356
+ transformer: true;
13357
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
13358
+ listAll: import("@trpc/server").TRPCQueryProcedure<{
13359
+ input: {
13360
+ workspaceId?: string | null | undefined;
13361
+ limit?: number | undefined;
13362
+ kind?: "webhook" | "automation" | "ai_feed" | "ai_react" | "notify" | "message_out" | undefined;
13363
+ eventType?: string | undefined;
13364
+ lens?: "external" | "all" | "internal" | undefined;
13365
+ pending?: boolean | undefined;
13366
+ };
13367
+ output: {
13368
+ items: ReactionEvent[];
13369
+ lens: ReactionLens;
13370
+ };
13371
+ meta: object;
13372
+ }>;
13373
+ eventFanout: import("@trpc/server").TRPCQueryProcedure<{
13374
+ input: {
13375
+ eventId: string;
13376
+ lens?: "external" | "all" | "internal" | undefined;
13377
+ };
13378
+ output: ReactionEvent;
13379
+ meta: object;
13380
+ }>;
13381
+ }>>;
11525
13382
  }>>;
11526
13383
  export type AppRouter = typeof coreRouter;
11527
13384