@synap-core/api-types 1.14.2 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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,27 @@ export interface AgentMetadata {
90
91
  writesRequireProposal?: boolean;
91
92
  activePersonality?: string;
92
93
  }
94
+ /**
95
+ * Shared provenance vocabulary for the uniform `created_by_kind` column added
96
+ * across mutation-bearing tables (Wave B3). Type-only — no import cycle.
97
+ *
98
+ * NOTE: `cell_instances.createdByKind` (user|agent|system) and
99
+ * `messages.authorType` (human|ai_agent|external|bot) are PRE-EXISTING and kept
100
+ * as-is. This vocab (human|ai_agent|system — matching `channel_members.memberKind`)
101
+ * is for the NEW provenance columns only.
102
+ */
103
+ export type ProvenanceKind = "human" | "ai_agent" | "system";
104
+ /**
105
+ * The kind of object on one end of a relation edge.
106
+ *
107
+ * Relations are polymorphic: each endpoint is EITHER an entity (kind='entity',
108
+ * resolved via {source,target}EntityId — the original, default behavior) OR a
109
+ * cell instance (kind='cell', resolved via {source,target}CellId).
110
+ *
111
+ * Existing relations default to 'entity' on both ends and keep working
112
+ * unchanged — the entity columns stay populated and the cell columns are NULL.
113
+ */
114
+ export type RelationEndpointKind = "entity" | "cell";
93
115
  declare const ChannelType: {
94
116
  readonly THREAD: "thread";
95
117
  readonly PERSONAL: "personal";
@@ -97,6 +119,7 @@ declare const ChannelType: {
97
119
  readonly FEED: "feed";
98
120
  readonly EXTERNAL: "external";
99
121
  readonly AGENT_COLLAB: "agent_collab";
122
+ readonly GROUP: "group";
100
123
  };
101
124
  export type ChannelType = (typeof ChannelType)[keyof typeof ChannelType];
102
125
  declare const ChannelScope: {
@@ -116,6 +139,12 @@ declare const ChannelStatus: {
116
139
  readonly ARCHIVED: "archived";
117
140
  };
118
141
  export type ChannelStatus = (typeof ChannelStatus)[keyof typeof ChannelStatus];
142
+ declare const AiReactionMode: {
143
+ readonly ONLY_MENTIONED: "only_mentioned";
144
+ readonly WHEN_CONFIDENT: "when_confident";
145
+ readonly OFF: "off";
146
+ };
147
+ export type AiReactionMode = (typeof AiReactionMode)[keyof typeof AiReactionMode];
119
148
  /** Channel row — explicit interface so consumers don't need drizzle-orm to resolve it. */
120
149
  export interface Channel {
121
150
  id: string;
@@ -130,6 +159,7 @@ export interface Channel {
130
159
  parentChannelId: string | null;
131
160
  branchedFromMessageId: string | null;
132
161
  branchPurpose: string | null;
162
+ aiReactionMode: AiReactionMode;
133
163
  assignedAgentId: string | null;
134
164
  senderAgentId: string | null;
135
165
  status: ChannelStatus;
@@ -311,9 +341,30 @@ export interface ProactiveAiPreferences {
311
341
  };
312
342
  /** Controls how many proactive nudges the AI sends. Default: "balanced" */
313
343
  nudgeDensity: ProactiveNudgeDensity;
344
+ /**
345
+ * Event-driven proactive triggers (Feature C). Each toggle opts the workspace
346
+ * into reacting to a class of user action. Time-based features above
347
+ * (morningBriefing/weeklyDigest/healthCheck) are independent of these.
348
+ * All default OFF — proactive event reactions are opt-in.
349
+ */
350
+ triggers?: ProactiveAiTriggers;
314
351
  /** ISO 8601 timestamp — snooze all proactive AI until this time */
315
352
  mutedUntil?: string;
316
353
  }
354
+ /**
355
+ * Per-event opt-in toggles for event-driven proactive AI (Feature C).
356
+ * Keyed by the validated event that fires the proactive scan.
357
+ */
358
+ export interface ProactiveAiTriggers {
359
+ /** N captures sharing a topic → propose a Question to track them. */
360
+ captureCluster?: boolean;
361
+ /** Task moved to done → connect it back to its decision/research. */
362
+ taskCompleted?: boolean;
363
+ /** New Question created → suggest research from existing captures. */
364
+ questionCreated?: boolean;
365
+ /** New Decision created → auto-link the research that informed it. */
366
+ decisionCreated?: boolean;
367
+ }
317
368
  /**
318
369
  * Which surface(s) receive a signal.
319
370
  * - feed → proactive feed channel (AI-initiated messages)
@@ -341,11 +392,98 @@ export interface DeliveryPreferences {
341
392
  /** IS agent-generated insights (via /proactive/post) */
342
393
  ai_insight?: SignalDeliveryRule;
343
394
  }
395
+ /**
396
+ * Match criteria for an agent-routing rule. Every DEFINED field must equal the
397
+ * dispatch context (undefined = wildcard). A trailing "*" on a value is a prefix
398
+ * match (e.g. eventPattern "entity.update.*"). First matching rule wins.
399
+ */
400
+ export interface AgentRoutingMatch {
401
+ /** Entity/task type (e.g. "task", "devplane_feature") */
402
+ taskType?: string;
403
+ /** Profile slug of the subject entity */
404
+ profileSlug?: string;
405
+ /** Typed event name/pattern (e.g. "entity.update.completed") */
406
+ eventPattern?: string;
407
+ /** Channel type, when dispatch originates from a channel */
408
+ channelType?: string;
409
+ /** State transition guards (e.g. agent_status from/to) */
410
+ fromState?: string;
411
+ toState?: string;
412
+ }
413
+ export interface AgentRoutingRule {
414
+ match: AgentRoutingMatch;
415
+ /** Stable agent slug (portable across pods) the matched work dispatches to */
416
+ agentSlug: string;
417
+ }
418
+ /**
419
+ * Workspace-level agent routing: "this kind of task/event → this registered agent".
420
+ * The canonical replacement for runtime-specific hardwiring (e.g. Hermes-only
421
+ * dispatch). Resolution: first matching rule → defaultAgentSlug → plain IS fallback.
422
+ * Resolved by resolveAgentForTask() in @synap/intelligence-client. Any workspace
423
+ * can use this for automation, not just DevPlane.
424
+ */
425
+ export interface AgentRoutingPolicy {
426
+ /** Agent slug used when no rule matches */
427
+ defaultAgentSlug?: string;
428
+ /** Ordered rules; first match wins */
429
+ rules?: AgentRoutingRule[];
430
+ }
431
+ /**
432
+ * High-level purpose of a workspace inside a pod.
433
+ *
434
+ * `workspaceType` already exists as a promoted column for legacy operational
435
+ * filtering. `workspacePurpose` is the product-facing contract used by the
436
+ * browser and agents to understand how a workspace should be used.
437
+ */
438
+ export type WorkspacePurpose = "personal" | "project" | "agent" | "library" | "operational";
439
+ /**
440
+ * Discoverability/access mode for a workspace.
441
+ *
442
+ * Write access is still controlled by workspace_members + role permissions.
443
+ * `pod_visible` and `pod_joinable` only make the workspace discoverable/readable
444
+ * to authenticated users on the same data pod.
445
+ */
446
+ export type WorkspaceVisibility = "private" | "members" | "pod_visible" | "pod_joinable" | "public_link";
447
+ export type WorkspaceSourceRole = "provider" | "consumer" | "provider-consumer";
448
+ export interface WorkspaceDefaultSource {
449
+ workspaceId: string;
450
+ capability?: string;
451
+ profileSlug?: string;
452
+ label?: string;
453
+ }
344
454
  export interface WorkspaceSettings {
345
455
  defaultEntityTypes?: string[];
346
456
  theme?: string;
347
457
  aiEnabled?: boolean;
348
458
  allowExternalSharing?: boolean;
459
+ /**
460
+ * Product-facing purpose used by browser/apps/agents to resolve cross-workspace
461
+ * sources (e.g. a brand-library workspace serving artboards in a project).
462
+ */
463
+ workspacePurpose?: WorkspacePurpose;
464
+ /**
465
+ * Free-form subtype within the purpose, e.g. "brand-library",
466
+ * "research-library", "agent-lab".
467
+ */
468
+ workspaceSubtype?: string;
469
+ /**
470
+ * Discovery/read visibility. Defaults to "members" when absent.
471
+ */
472
+ workspaceVisibility?: WorkspaceVisibility;
473
+ /**
474
+ * Capability ids this workspace provides or consumes, e.g.
475
+ * "brand.library", "brand.assets", "research.sources", "agent.staging".
476
+ */
477
+ workspaceCapabilities?: string[];
478
+ /**
479
+ * Domain → role map. Example: { brand: "provider", research: "consumer" }.
480
+ */
481
+ sourceRoles?: Record<string, WorkspaceSourceRole>;
482
+ /**
483
+ * Domain/capability → default source workspace. Stored on consumer
484
+ * workspaces so features can resolve defaults without copying data.
485
+ */
486
+ defaultSources?: Record<string, WorkspaceDefaultSource>;
349
487
  /** External MCP servers whose tools will be available to AI agents in this workspace */
350
488
  mcpServers?: McpServerConfig[];
351
489
  layout?: WorkspaceLayoutConfig;
@@ -368,6 +506,30 @@ export interface WorkspaceSettings {
368
506
  profileEntityBentoTemplates?: Record<string, {
369
507
  blocks: Array<Record<string, unknown>>;
370
508
  }>;
509
+ /**
510
+ * Per-profile renderer override for THIS workspace (Profile Renderer North Star).
511
+ * Each value is a RendererTarget (from @synap-core/renderer-runtime). Stored as
512
+ * Record<string, unknown> here to avoid pulling a frontend type into the schema
513
+ * package — runtime validation lives in the routers and the canonical type is
514
+ * re-exported by @synap-core/profile-renderer.
515
+ *
516
+ * Resolution chain in ProfileResolutionService.getEffectiveRenderer():
517
+ * 1. this workspace overlay (profileRenderers[slug][slot])
518
+ * 2. profile system default (profiles.default_list_renderer / .default_detail_renderer)
519
+ * 3. hardcoded system fallback
520
+ *
521
+ * Example:
522
+ * {
523
+ * "contact": { detail: { kind: "cell", cellKey: "form-detail", props: {} } },
524
+ * "task": { list: { kind: "view", viewId: "uuid-task-kanban" } }
525
+ * }
526
+ *
527
+ * Spec: synap-team-docs/content/team/platform/profile-renderer.mdx
528
+ */
529
+ profileRenderers?: Record<string, {
530
+ list?: Record<string, unknown>;
531
+ detail?: Record<string, unknown>;
532
+ }>;
371
533
  /** UUID of the main whiteboard view for this workspace */
372
534
  mainWhiteboardId?: string;
373
535
  /**
@@ -385,6 +547,12 @@ export interface WorkspaceSettings {
385
547
  * Kept separate from Synap internal intelligence service routing.
386
548
  */
387
549
  eveProviderRouting?: EveProviderRoutingPolicy;
550
+ /**
551
+ * Workspace-level agent routing: "this kind of task/event → this agent".
552
+ * Resolved by resolveAgentForTask() in @synap/intelligence-client. Decouples
553
+ * automation from any single runtime (Hermes becomes one registered target).
554
+ */
555
+ agentRouting?: AgentRoutingPolicy;
388
556
  validationRules?: {
389
557
  [tableName: string]: {
390
558
  create?: boolean;
@@ -548,8 +716,23 @@ export interface WorkspaceSettings {
548
716
  autoApprove?: boolean;
549
717
  maxAgentsPerUser?: number;
550
718
  allowAgentCreation?: boolean;
719
+ /** When true, any workspace member can create their own twin agent without admin approval. Default: false */
720
+ allowSelfServiceTwin?: boolean;
551
721
  /** Who can approve AI proposals. Default: "owner_and_admins" */
552
722
  proposalApprovalPolicy?: "owner_and_admins" | "any_editor" | "admins_only";
723
+ /**
724
+ * Controls whether AI navigation commands (e.g. [[open:side|view:UUID]])
725
+ * execute automatically or require user confirmation.
726
+ */
727
+ navigationPermissions?: {
728
+ /** When true, AI-suggested panel/surface opens happen immediately without confirmation. */
729
+ autoApprove: boolean;
730
+ /**
731
+ * Resource types the AI is allowed to suggest opening.
732
+ * All types are allowed by default when this field is absent.
733
+ */
734
+ allowedResourceTypes?: Array<"entity" | "view" | "doc" | "cell" | "channel" | "automation">;
735
+ };
553
736
  };
554
737
  /** Settings for the DevPlane app embedded in this workspace */
555
738
  devplane?: {
@@ -1033,7 +1216,45 @@ declare enum ProfileScope {
1033
1216
  * 1. IS config generation/validation
1034
1217
  * 2. Settings form auto-generation in the frontend
1035
1218
  */
1036
- export type WidgetRendererType = "builtin" | "iframe" | "native";
1219
+ export type WidgetRendererType = "builtin" | "iframe" | "native" | "frame";
1220
+ /**
1221
+ * Trust level of a widget/cell definition — the server-side authority for
1222
+ * whether a framed view's mutation may execute directly or must propose.
1223
+ *
1224
+ * Mirrors `AppTrustLevel` from `@synap-core/overlay-protocol`. Trust is
1225
+ * assigned by a human-approved event (marketplace install) — NEVER self-claimed
1226
+ * by the frame and NEVER taken from a request body.
1227
+ *
1228
+ * - "trusted" → first-party / user-authored: may act directly in-envelope.
1229
+ * - "installed" → human-approved marketplace install: proposes.
1230
+ * - "generated" → AI-generated, unreviewed: proposes (most conservative).
1231
+ *
1232
+ * Default is the most conservative ("generated") so an un-migrated or
1233
+ * unspecified row can never write directly.
1234
+ */
1235
+ export type WidgetTrustLevel = "trusted" | "installed" | "generated";
1236
+ /**
1237
+ * Functional role of a widget/cell definition — what surface it targets.
1238
+ *
1239
+ * - "widget" → bento add-block picker item (the default)
1240
+ * - "view-renderer" → renders a typed view (e.g. custom kanban board)
1241
+ * - "entity-renderer" → renders a profile's entity detail page
1242
+ * - "panel" → side or floating panel surface
1243
+ */
1244
+ export type WidgetRole = "widget" | "view-renderer" | "entity-renderer" | "panel";
1245
+ /**
1246
+ * Content kind — the single de-conflated taxonomy for WHAT a cell renders. It
1247
+ * REPLACES `role` (which conflated content with placement). DISTINCT from
1248
+ * `rendererType` (the rendering MECHANISM: frame/builtin/iframe/native).
1249
+ * Mirrors `ContentKind` in `@synap-core/capabilities` (canonical copy).
1250
+ *
1251
+ * - "entity-detail" → renders ONE entity (its full page)
1252
+ * - "entity-profile" → renders the WHOLE profile/type (its dashboard / home)
1253
+ * - "collection" → renders a view of MANY entities
1254
+ * - "widget" → generic, content-agnostic — the DEFAULT; never a
1255
+ * profile assignment, only placeable
1256
+ */
1257
+ export type ContentKind = "entity-detail" | "entity-profile" | "collection" | "widget";
1037
1258
  export interface PodIntelligenceDefaults {
1038
1259
  chatModelId: string | null;
1039
1260
  reasoningModelId: string | null;
@@ -1049,6 +1270,67 @@ export interface PodProactiveDefaults {
1049
1270
  healthCheck: boolean;
1050
1271
  };
1051
1272
  }
1273
+ /**
1274
+ * Cell Instances Schema — The Universal Rendering Unit (persisted)
1275
+ *
1276
+ * A `cell_instance` is a concrete, addressable instance of a cell type living
1277
+ * in a workspace. Where `widget_definitions` describes a cell *type* (the
1278
+ * template / renderer), a `cell_instance` is an actual placed/standalone cell
1279
+ * with its own config, optional name, and optional backing document.
1280
+ *
1281
+ * Two complementary persistence paths:
1282
+ * 1. `config` (JSONB) — declarative cell config (the common case: composed
1283
+ * cells, charts, maps, embeds referencing other instanceIds, etc.).
1284
+ * 2. `sourceDocumentId` — for content-bearing cells (e.g. an `html-embed`
1285
+ * cell), the versioned HTML/markdown lives in a `documents` row (MinIO +
1286
+ * document_versions), and the cell references it. This reuses the existing
1287
+ * document storage path — cells never invent their own blob storage.
1288
+ *
1289
+ * `isTemplate` marks an instance as a reusable template (duplicated into fresh
1290
+ * instances rather than rendered directly).
1291
+ *
1292
+ * Governance fields mirror `widget_definitions`:
1293
+ * - `createdByKind` — provenance: 'user' | 'agent' | 'system'
1294
+ * - `trustLevel` — server-side authority for whether the cell may write
1295
+ * directly or must propose. Conservative by default for
1296
+ * agent/marketplace origins.
1297
+ */
1298
+ /**
1299
+ * Who created the cell instance. Provenance only — NOT a write gate by itself
1300
+ * (the gate is `trustLevel` + the governance check in the API layer).
1301
+ */
1302
+ export type CellInstanceCreatedByKind = "user" | "agent" | "system";
1303
+ /**
1304
+ * Server-side trust authority for governing a cell instance's writes.
1305
+ *
1306
+ * Mirrors `WidgetTrustLevel`:
1307
+ * - "trusted" → first-party / user-authored: may act directly in-envelope.
1308
+ * - "installed" → human-approved marketplace install: proposes.
1309
+ * - "generated" → AI-generated, unreviewed: proposes (most conservative).
1310
+ *
1311
+ * Default is "trusted" because the canonical create path is a user action; the
1312
+ * agent (Hub Protocol) path sets a conservative level explicitly and is routed
1313
+ * through `checkPermissionOrPropose()`.
1314
+ */
1315
+ export type CellInstanceTrustLevel = "trusted" | "installed" | "generated";
1316
+ /**
1317
+ * AI Providers Schema
1318
+ *
1319
+ * Pod-level registry of AI model providers. Source of truth for provider
1320
+ * configuration — decoupled from any specific IntelligenceSystem or workspace.
1321
+ * The backend syncs this to the active IS on every change.
1322
+ *
1323
+ * API keys are stored server-side encrypted via encryptServiceKey/decryptServiceKey.
1324
+ */
1325
+ export interface AiProviderModelEntry {
1326
+ id: string;
1327
+ tier?: "free" | "balanced" | "advanced" | "complex";
1328
+ contextWindow?: number;
1329
+ supportsTools?: boolean;
1330
+ supportsJson?: boolean;
1331
+ costPer1MInput?: number;
1332
+ costPer1MOutput?: number;
1333
+ }
1052
1334
  /**
1053
1335
  * EventRecord - Database representation of an event
1054
1336
  *
@@ -1087,6 +1369,56 @@ export interface EffectiveProperty extends PropertyDef {
1087
1369
  defaultValue: unknown;
1088
1370
  displayOrder: number;
1089
1371
  }
1372
+ /**
1373
+ * RendererRef — what a profile or workspace stores as its renderer choice
1374
+ * for a (slot, profile) pair.
1375
+ *
1376
+ * Structural mirror of `RendererTarget` from `@synap-core/renderer-runtime`.
1377
+ * Kept as a structural type in the database layer (rather than importing the
1378
+ * frontend package) so the schema package stays UI-free. The canonical type
1379
+ * lives in `@synap-core/renderer-runtime` and is re-exported by
1380
+ * `@synap-core/profile-renderer` as `RendererRef`.
1381
+ *
1382
+ * Stored as JSONB on `profiles.default_(list|detail)_renderer` and inside
1383
+ * `workspaces.settings.profileRenderers[slug]`.
1384
+ *
1385
+ * Spec: synap-team-docs/content/team/platform/profile-renderer.mdx
1386
+ */
1387
+ export type RendererRef = {
1388
+ kind: "cell";
1389
+ cellKey: string;
1390
+ props: Record<string, unknown>;
1391
+ title?: string;
1392
+ displayMode?: string;
1393
+ rendererHint?: Record<string, unknown>;
1394
+ } | {
1395
+ kind: "view";
1396
+ viewId: string;
1397
+ title?: string;
1398
+ displayMode?: string;
1399
+ } | {
1400
+ kind: "iframe-srcdoc";
1401
+ appId: string;
1402
+ srcdoc: string;
1403
+ title?: string;
1404
+ props?: Record<string, unknown>;
1405
+ } | {
1406
+ kind: "external-app";
1407
+ appId: string;
1408
+ url: string;
1409
+ title?: string;
1410
+ props?: Record<string, unknown>;
1411
+ } | {
1412
+ kind: "url";
1413
+ url: string;
1414
+ external?: boolean;
1415
+ title?: string;
1416
+ } | {
1417
+ kind: "view-adapter";
1418
+ adapterKey: string;
1419
+ props?: Record<string, unknown>;
1420
+ title?: string;
1421
+ };
1090
1422
  /**
1091
1423
  * Column definition for views
1092
1424
  */
@@ -1289,6 +1621,32 @@ export interface ProposalReviewEvent {
1289
1621
  source?: string;
1290
1622
  correlationId?: string;
1291
1623
  }
1624
+ /**
1625
+ * Reviewable, frontend-facing summary of a COMPOSITE (graph) proposal.
1626
+ *
1627
+ * A composite proposal's `data` is `{ operations: [...] }`, which the flat
1628
+ * `ProposalReviewChange[]` cannot express. This carries the graph so the review
1629
+ * UI can render the entities and relations that approval would materialize.
1630
+ *
1631
+ * PINNED CONTRACT — the frontend mirrors this shape exactly; do not change field
1632
+ * names/shapes without updating the frontend in lockstep.
1633
+ */
1634
+ export interface ProposalReviewGraph {
1635
+ entities: Array<{
1636
+ ref: string;
1637
+ profileSlug: string;
1638
+ title: string;
1639
+ propertyCount: number;
1640
+ hasContent: boolean;
1641
+ }>;
1642
+ relations: Array<{
1643
+ type: string;
1644
+ sourceLabel: string;
1645
+ targetLabel: string;
1646
+ }>;
1647
+ entityCount: number;
1648
+ relationCount: number;
1649
+ }
1292
1650
  export interface ProposalReviewModel {
1293
1651
  summary: string;
1294
1652
  actorName?: string;
@@ -1304,8 +1662,34 @@ export interface ProposalReviewModel {
1304
1662
  validatedEventId?: string;
1305
1663
  completedEventId?: string;
1306
1664
  changes: ProposalReviewChange[];
1665
+ /**
1666
+ * Present ONLY for composite (graph) proposals. When set, `changes` may be
1667
+ * empty and the graph carries the reviewable content.
1668
+ */
1669
+ graph?: ProposalReviewGraph;
1307
1670
  events: ProposalReviewEvent[];
1308
1671
  }
1672
+ /**
1673
+ * Record of what a proposal MATERIALIZED on approval.
1674
+ *
1675
+ * Stamped onto `proposals.data.materialized` by the approve flow so a later
1676
+ * `revert` can compute the exact inverse without a schema change. This is the
1677
+ * canonical "what did approval produce" record:
1678
+ * - inline entity-create + composite-create mint FRESH ids (≠ proposal.targetId)
1679
+ * so the created ids would otherwise be unrecoverable from the row alone;
1680
+ * - relation/document ids created as a side effect are captured here too.
1681
+ * Branches whose materialized id is deterministic from the row (generic
1682
+ * `.validated` create/update where subjectId is known, document create where
1683
+ * documentId === targetId) do not strictly need this, but populate it when cheap.
1684
+ */
1685
+ export interface ProposalMaterializedRecord {
1686
+ /** Entity ids CREATED by approval (revert → soft/hard delete each). */
1687
+ entityIds?: string[];
1688
+ /** Relation ids CREATED by approval (revert → delete each). */
1689
+ relationIds?: string[];
1690
+ /** Document ids CREATED by approval (revert → delete each). */
1691
+ documentIds?: string[];
1692
+ }
1309
1693
  declare enum MessageLinkTargetType {
1310
1694
  ENTITY = "entity",
1311
1695
  DOCUMENT = "document",
@@ -1395,24 +1779,256 @@ declare const SystemEventTypes: {
1395
1779
  readonly WEBHOOK_DELIVERY: "webhooks.deliver.requested";
1396
1780
  };
1397
1781
  export type SystemEventType = (typeof SystemEventTypes)[keyof typeof SystemEventTypes];
1782
+ /**
1783
+ * Metadata carried by every event catalog entry.
1784
+ * Used by automation trigger pickers in the frontend.
1785
+ */
1786
+ export interface EventDefinition {
1787
+ type: string;
1788
+ label: string;
1789
+ domain: string;
1790
+ description: string;
1791
+ filterKeys?: string[];
1792
+ }
1398
1793
  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";
1794
+ readonly ENTITY_CREATED: {
1795
+ readonly type: "entity.create.completed";
1796
+ readonly label: "Entity created";
1797
+ readonly domain: "Entity";
1798
+ readonly description: "Fires after any entity is successfully created.";
1799
+ readonly filterKeys: [
1800
+ "profileSlug"
1801
+ ];
1802
+ };
1803
+ readonly ENTITY_UPDATED: {
1804
+ readonly type: "entity.update.completed";
1805
+ readonly label: "Entity updated";
1806
+ readonly domain: "Entity";
1807
+ readonly description: "Fires after any entity field or property is updated.";
1808
+ readonly filterKeys: [
1809
+ "profileSlug",
1810
+ "changedKeys",
1811
+ "changed.<fieldName>",
1812
+ "<fieldName>"
1813
+ ];
1814
+ };
1815
+ readonly ENTITY_DELETED: {
1816
+ readonly type: "entity.delete.completed";
1817
+ readonly label: "Entity deleted";
1818
+ readonly domain: "Entity";
1819
+ readonly description: "Fires after an entity is permanently deleted.";
1820
+ readonly filterKeys: [
1821
+ "profileSlug"
1822
+ ];
1823
+ };
1824
+ readonly PROPOSAL_CREATED: {
1825
+ readonly type: "proposal.created.completed";
1826
+ readonly label: "Proposal created";
1827
+ readonly domain: "Proposals";
1828
+ readonly description: "A new AI proposal is pending review.";
1829
+ readonly filterKeys: [
1830
+ "proposalStatus",
1831
+ "targetType",
1832
+ "changeType"
1833
+ ];
1834
+ };
1835
+ readonly PROPOSAL_APPROVED: {
1836
+ readonly type: "proposal.approved.completed";
1837
+ readonly label: "Proposal approved";
1838
+ readonly domain: "Proposals";
1839
+ readonly description: "An AI proposal was approved and applied.";
1840
+ readonly filterKeys: [
1841
+ "proposalStatus",
1842
+ "targetType"
1843
+ ];
1844
+ };
1845
+ readonly PROPOSAL_REJECTED: {
1846
+ readonly type: "proposal.rejected.completed";
1847
+ readonly label: "Proposal rejected";
1848
+ readonly domain: "Proposals";
1849
+ readonly description: "An AI proposal was rejected.";
1850
+ readonly filterKeys: [
1851
+ "proposalStatus",
1852
+ "targetType"
1853
+ ];
1854
+ };
1855
+ readonly RELATION_CREATED: {
1856
+ readonly type: "relation.create.completed";
1857
+ readonly label: "Relation created";
1858
+ readonly domain: "Relations";
1859
+ readonly description: "Two entities were linked.";
1860
+ readonly filterKeys: [
1861
+ "relationType"
1862
+ ];
1863
+ };
1864
+ readonly RELATION_DELETED: {
1865
+ readonly type: "relation.delete.completed";
1866
+ readonly label: "Relation deleted";
1867
+ readonly domain: "Relations";
1868
+ readonly description: "A relation between entities was removed.";
1869
+ readonly filterKeys: [
1870
+ "relationType"
1871
+ ];
1872
+ };
1873
+ readonly DOCUMENT_CREATED: {
1874
+ readonly type: "document.create.completed";
1875
+ readonly label: "Document created";
1876
+ readonly domain: "Documents";
1877
+ readonly description: "Fires after a document is created.";
1878
+ readonly filterKeys: [
1879
+ "profileSlug"
1880
+ ];
1881
+ };
1882
+ readonly DOCUMENT_UPDATED: {
1883
+ readonly type: "document.update.completed";
1884
+ readonly label: "Document updated";
1885
+ readonly domain: "Documents";
1886
+ readonly description: "Fires after a document is updated.";
1887
+ readonly filterKeys: [
1888
+ "profileSlug"
1889
+ ];
1890
+ };
1891
+ readonly CAPTURE_COMPLETE: {
1892
+ readonly type: "capture.complete.completed";
1893
+ readonly label: "Capture completed";
1894
+ readonly domain: "Capture";
1895
+ readonly description: "A capture finished processing.";
1896
+ readonly filterKeys: [
1897
+ "profileSlug"
1898
+ ];
1899
+ };
1900
+ readonly COMMAND_EXECUTED: {
1901
+ readonly type: "command.execute.completed";
1902
+ readonly label: "Command executed";
1903
+ readonly domain: "Commands";
1904
+ readonly description: "Fires after a command finishes execution.";
1905
+ readonly filterKeys: [
1906
+ "commandSlug"
1907
+ ];
1908
+ };
1909
+ readonly CONNECTOR_SYNC_COMPLETE: {
1910
+ readonly type: "connector_sync.complete.completed";
1911
+ readonly label: "Connector synced";
1912
+ readonly domain: "Connectors";
1913
+ readonly description: "A connector finished a sync run.";
1914
+ readonly filterKeys: [
1915
+ "provider",
1916
+ "syncStatus"
1917
+ ];
1918
+ };
1919
+ readonly PROACTIVE_POST: {
1920
+ readonly type: "proactive.post.completed";
1921
+ readonly label: "Proactive post";
1922
+ readonly domain: "Intelligence";
1923
+ readonly description: "The proactive AI posted a message into your channel.";
1924
+ readonly filterKeys: [
1925
+ "proactiveType"
1926
+ ];
1927
+ };
1928
+ readonly NOTIFICATION_CREATED: {
1929
+ readonly type: "notification.created.completed";
1930
+ readonly label: "Notification created";
1931
+ readonly domain: "Notifications";
1932
+ readonly description: "A notification was raised.";
1933
+ readonly filterKeys: [
1934
+ "notificationType",
1935
+ "category"
1936
+ ];
1937
+ };
1938
+ readonly CHANNEL_MESSAGE_CREATED: {
1939
+ readonly type: "channel_message.created.completed";
1940
+ readonly label: "Channel message created";
1941
+ readonly domain: "Messaging";
1942
+ readonly description: "A new message was posted into a Synap channel.";
1943
+ readonly filterKeys: [
1944
+ "channelId",
1945
+ "messageRole"
1946
+ ];
1947
+ };
1948
+ readonly FEED_NEW_ITEM: {
1949
+ readonly type: "feed.new_item.completed";
1950
+ readonly label: "Feed new item";
1951
+ readonly domain: "Feed";
1952
+ readonly description: "A new item appeared in the intelligence feed.";
1953
+ readonly filterKeys: [
1954
+ "feedArchetype",
1955
+ "feedMinRelevanceScore"
1956
+ ];
1957
+ };
1958
+ readonly EXTERNAL_MESSAGE_RECEIVED: {
1959
+ readonly type: "external_message.received.completed";
1960
+ readonly label: "External message received";
1961
+ readonly domain: "Messaging";
1962
+ readonly description: "An inbound message arrived on a connected external channel.";
1963
+ readonly filterKeys: [
1964
+ "provider",
1965
+ "channelId"
1966
+ ];
1967
+ };
1968
+ readonly EXTERNAL_CHANNEL_CREATED: {
1969
+ readonly type: "external_channel.created.completed";
1970
+ readonly label: "External channel created";
1971
+ readonly domain: "Messaging";
1972
+ readonly description: "A new external conversation channel was auto-created.";
1973
+ readonly filterKeys: [
1974
+ "provider"
1975
+ ];
1976
+ };
1977
+ readonly MESSAGING_ACCOUNT_CREATED: {
1978
+ readonly type: "messaging_account.created.completed";
1979
+ readonly label: "Messaging account connected";
1980
+ readonly domain: "Messaging";
1981
+ readonly description: "A messaging account was connected.";
1982
+ readonly filterKeys: [
1983
+ "provider"
1984
+ ];
1985
+ };
1986
+ readonly MESSAGING_ACCOUNT_RECONNECTION_REQUIRED: {
1987
+ readonly type: "messaging_account.reconnection_required.completed";
1988
+ readonly label: "Messaging account needs reconnection";
1989
+ readonly domain: "Messaging";
1990
+ readonly description: "A messaging account requires reconnection.";
1991
+ readonly filterKeys: [
1992
+ "provider"
1993
+ ];
1994
+ };
1995
+ readonly MESSAGING_ACCOUNT_DISCONNECTED: {
1996
+ readonly type: "messaging_account.disconnected.completed";
1997
+ readonly label: "Messaging account disconnected";
1998
+ readonly domain: "Messaging";
1999
+ readonly description: "A messaging account was disconnected.";
2000
+ readonly filterKeys: [
2001
+ "provider"
2002
+ ];
2003
+ };
2004
+ readonly INBOX_ITEM_RECEIVED: {
2005
+ readonly type: "inbox_item.received.completed";
2006
+ readonly label: "Inbox item received";
2007
+ readonly domain: "Inbox";
2008
+ readonly description: "A new item arrived from an external integration.";
2009
+ readonly filterKeys: [
2010
+ "sourceType"
2011
+ ];
2012
+ };
2013
+ readonly INBOX_ITEM_ANALYZED: {
2014
+ readonly type: "inbox_item.analyzed.completed";
2015
+ readonly label: "Inbox item analyzed";
2016
+ readonly domain: "Inbox";
2017
+ readonly description: "An inbox item was analyzed by the intelligence service.";
2018
+ readonly filterKeys: [
2019
+ "sourceType"
2020
+ ];
2021
+ };
2022
+ readonly USER_UPDATED: {
2023
+ readonly type: "user.updated.completed";
2024
+ readonly label: "User updated";
2025
+ readonly domain: "Identity";
2026
+ readonly description: "A user identity was updated.";
2027
+ readonly filterKeys: [
2028
+ ];
2029
+ };
1414
2030
  };
1415
- export type OperationalEventType = (typeof OperationalEventTypes)[keyof typeof OperationalEventTypes];
2031
+ export type OperationalEventType = (typeof OperationalEventTypes)[keyof typeof OperationalEventTypes]["type"];
1416
2032
  /**
1417
2033
  * All possible event type values
1418
2034
  */
@@ -1555,6 +2171,60 @@ export interface RunStep {
1555
2171
  startedAt: string;
1556
2172
  finishedAt: string;
1557
2173
  }
2174
+ /**
2175
+ * Reaction projection types — the read-only "Reactions" / Pulse data model.
2176
+ *
2177
+ * This is a PROJECTION over the existing event spine + reactive primitives
2178
+ * (automation runs, webhook deliveries, notifications, downstream events).
2179
+ * There is NO `reactions` write table — these shapes are derived at query
2180
+ * time by `subscriptionsRouter` (see `routers/subscriptions.ts`).
2181
+ *
2182
+ * The frontend Reactions UI is built EXACTLY to these shapes; do not rename
2183
+ * fields without updating the consuming surface.
2184
+ */
2185
+ /** The category of a single fan-out reaction. */
2186
+ export type ReactionKind = "automation" | "ai_feed" | "ai_react" | "notify" | "webhook" | "message_out";
2187
+ /** Lens used to filter reactions by direction (internal vs external). */
2188
+ export type ReactionLens = "all" | "internal" | "external";
2189
+ /** A single fan-out reaction triggered by a source event. */
2190
+ export interface Reaction {
2191
+ kind: ReactionKind;
2192
+ label: string;
2193
+ status?: "success" | "pending" | "failed";
2194
+ /** e.g. "200", "504", "pending" */
2195
+ responseStatus?: string;
2196
+ detail?: string;
2197
+ }
2198
+ /** A source event in the Pulse feed, with its fan-out reactions. */
2199
+ export interface ReactionEvent {
2200
+ id: string;
2201
+ /** e.g. "deal.update.completed" */
2202
+ type: string;
2203
+ /** ISO timestamp */
2204
+ timestamp: string;
2205
+ /** human summary, e.g. "Helix Robotics · closeDate → Jun 3" */
2206
+ subject: string;
2207
+ subjectId?: string;
2208
+ subjectType?: string;
2209
+ /** "Hestia" | "Maya Chen" | "cron:0 7 * * *" | "feed:rss" */
2210
+ actor: string;
2211
+ actorAI: boolean;
2212
+ correlationId?: string;
2213
+ /** event itself represents a failure (e.g. webhook.delivery.failed) */
2214
+ failed?: boolean;
2215
+ /** trigger flowing IN (cron.fired, feed.item.received) */
2216
+ inbound?: boolean;
2217
+ /**
2218
+ * A `.requested` event whose linked proposal is still awaiting a decision.
2219
+ * This is the decision-inbox signal — the user must approve or reject.
2220
+ */
2221
+ pending?: boolean;
2222
+ /** The proposal awaiting decision, when `pending` (for inline approve/reject). */
2223
+ proposalId?: string;
2224
+ note?: string;
2225
+ /** the fan-out */
2226
+ reactions: Reaction[];
2227
+ }
1558
2228
  /**
1559
2229
  * Core API Router
1560
2230
  */
@@ -1600,7 +2270,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1600
2270
  log: import("@trpc/server").TRPCMutationProcedure<{
1601
2271
  input: {
1602
2272
  subjectId: string;
1603
- subjectType: "user" | "message" | "apiKey" | "system" | "chat" | "workspace" | "entity" | "document" | "task" | "relation" | "project" | "member";
2273
+ subjectType: "user" | "message" | "apiKey" | "system" | "entity" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project";
1604
2274
  eventType: string;
1605
2275
  data: Record<string, unknown>;
1606
2276
  version: number;
@@ -1617,7 +2287,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1617
2287
  since?: unknown;
1618
2288
  until?: unknown;
1619
2289
  type?: string | undefined;
1620
- subjectType?: "user" | "message" | "apiKey" | "system" | "chat" | "workspace" | "entity" | "document" | "task" | "relation" | "project" | "member" | undefined;
2290
+ subjectType?: "user" | "message" | "apiKey" | "system" | "entity" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project" | undefined;
1621
2291
  limit?: number | undefined;
1622
2292
  lean?: boolean | undefined;
1623
2293
  };
@@ -1645,7 +2315,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1645
2315
  input: {
1646
2316
  userId?: string | undefined;
1647
2317
  eventType?: string | undefined;
1648
- subjectType?: "user" | "message" | "apiKey" | "system" | "chat" | "workspace" | "entity" | "document" | "task" | "relation" | "project" | "member" | undefined;
2318
+ subjectType?: "user" | "message" | "apiKey" | "system" | "entity" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project" | undefined;
1649
2319
  subjectId?: string | undefined;
1650
2320
  correlationId?: string | undefined;
1651
2321
  fromDate?: Date | undefined;
@@ -1661,7 +2331,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1661
2331
  input: {
1662
2332
  userId?: string | undefined;
1663
2333
  eventType?: string | undefined;
1664
- subjectType?: "user" | "message" | "apiKey" | "system" | "chat" | "workspace" | "entity" | "document" | "task" | "relation" | "project" | "member" | undefined;
2334
+ subjectType?: "user" | "message" | "apiKey" | "system" | "entity" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project" | undefined;
1665
2335
  fromDate?: Date | undefined;
1666
2336
  toDate?: Date | undefined;
1667
2337
  workspaceId?: string | undefined;
@@ -1726,6 +2396,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1726
2396
  relationType: string;
1727
2397
  }[];
1728
2398
  followUp: string | null;
2399
+ targetWorkspaceId: string | null;
1729
2400
  dedupCandidates: Record<string, {
1730
2401
  entityId: string;
1731
2402
  title: string;
@@ -1749,7 +2420,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1749
2420
  availableRelations?: string[] | undefined;
1750
2421
  contextHint?: string | undefined;
1751
2422
  };
1752
- output: ImportAnalysisPlan | null;
2423
+ output: ImportAnalysisPlan;
1753
2424
  meta: object;
1754
2425
  }>;
1755
2426
  execute: import("@trpc/server").TRPCMutationProcedure<{
@@ -1760,6 +2431,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1760
2431
  title: string;
1761
2432
  description?: string | undefined;
1762
2433
  properties?: Record<string, unknown> | undefined;
2434
+ content?: string | undefined;
1763
2435
  existingEntityId?: string | undefined;
1764
2436
  }[];
1765
2437
  relations: {
@@ -1767,6 +2439,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1767
2439
  targetTempId: string;
1768
2440
  relationType: string;
1769
2441
  }[];
2442
+ targetWorkspaceId?: string | null | undefined;
1770
2443
  };
1771
2444
  output: {
1772
2445
  created: {
@@ -1864,9 +2537,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1864
2537
  content?: string | undefined;
1865
2538
  global?: boolean | undefined;
1866
2539
  targetWorkspaceId?: string | undefined;
1867
- source?: "user" | "system" | "ai" | "intelligence" | "agent" | "openwebui-pipeline" | "openclaw" | "extension" | "cli" | "n8n" | "raycast" | undefined;
2540
+ workspaceScoped?: boolean | undefined;
2541
+ source?: "user" | "system" | "ai" | "agent" | "intelligence" | "openwebui-pipeline" | "openclaw" | "extension" | "cli" | "n8n" | "raycast" | undefined;
1868
2542
  reasoning?: string | undefined;
1869
2543
  agentUserId?: string | undefined;
2544
+ viewContext?: {
2545
+ viewId?: string | undefined;
2546
+ typeKey?: string | undefined;
2547
+ } | undefined;
1870
2548
  };
1871
2549
  output: {
1872
2550
  status: string;
@@ -1964,6 +2642,66 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
1964
2642
  };
1965
2643
  meta: object;
1966
2644
  }>;
2645
+ listAll: import("@trpc/server").TRPCQueryProcedure<{
2646
+ input: {
2647
+ limit?: number | undefined;
2648
+ offset?: number | undefined;
2649
+ profileSlug?: string | undefined;
2650
+ includeDescendants?: boolean | undefined;
2651
+ };
2652
+ output: {
2653
+ items: {
2654
+ id: string;
2655
+ userId: string;
2656
+ workspaceId: string | null;
2657
+ type: string;
2658
+ profileId: string | null;
2659
+ title: string | null;
2660
+ preview: string | null;
2661
+ documentId: string | null;
2662
+ properties: Record<string, unknown>;
2663
+ fileUrl: string | null;
2664
+ filePath: string | null;
2665
+ fileSize: number | null;
2666
+ fileType: string | null;
2667
+ checksum: string | null;
2668
+ version: number;
2669
+ createdAt: Date;
2670
+ updatedAt: Date;
2671
+ deletedAt: Date | null;
2672
+ systemData?: Record<string, unknown> | undefined;
2673
+ }[];
2674
+ pagination: {
2675
+ hasMore: boolean;
2676
+ total?: number;
2677
+ limit: number;
2678
+ offset: number;
2679
+ };
2680
+ entities: {
2681
+ id: string;
2682
+ userId: string;
2683
+ workspaceId: string | null;
2684
+ type: string;
2685
+ profileId: string | null;
2686
+ title: string | null;
2687
+ preview: string | null;
2688
+ documentId: string | null;
2689
+ properties: Record<string, unknown>;
2690
+ fileUrl: string | null;
2691
+ filePath: string | null;
2692
+ fileSize: number | null;
2693
+ fileType: string | null;
2694
+ checksum: string | null;
2695
+ version: number;
2696
+ createdAt: Date;
2697
+ updatedAt: Date;
2698
+ deletedAt: Date | null;
2699
+ systemData?: Record<string, unknown> | undefined;
2700
+ }[];
2701
+ hasMore: boolean;
2702
+ };
2703
+ meta: object;
2704
+ }>;
1967
2705
  listGlobal: import("@trpc/server").TRPCQueryProcedure<{
1968
2706
  input: {
1969
2707
  profileSlug?: string | undefined;
@@ -2101,11 +2839,17 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2101
2839
  description?: string | undefined;
2102
2840
  documentId?: string | null | undefined;
2103
2841
  properties?: Record<string, unknown> | undefined;
2842
+ deleteProperties?: string[] | undefined;
2104
2843
  profileSlug?: string | undefined;
2105
- source?: "user" | "system" | "ai" | "intelligence" | "agent" | undefined;
2844
+ source?: "user" | "system" | "ai" | "agent" | "intelligence" | "extension" | undefined;
2106
2845
  reasoning?: string | undefined;
2107
2846
  agentUserId?: string | undefined;
2108
2847
  global?: boolean | undefined;
2848
+ targetWorkspaceId?: string | undefined;
2849
+ viewContext?: {
2850
+ viewId?: string | undefined;
2851
+ typeKey?: string | undefined;
2852
+ } | undefined;
2109
2853
  };
2110
2854
  output: {
2111
2855
  status: string;
@@ -2121,7 +2865,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2121
2865
  delete: import("@trpc/server").TRPCMutationProcedure<{
2122
2866
  input: {
2123
2867
  id: string;
2124
- source?: "user" | "system" | "ai" | "intelligence" | "agent" | undefined;
2868
+ source?: "user" | "system" | "ai" | "agent" | "intelligence" | undefined;
2125
2869
  reasoning?: string | undefined;
2126
2870
  agentUserId?: string | undefined;
2127
2871
  };
@@ -2182,7 +2926,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2182
2926
  description?: string | undefined;
2183
2927
  properties?: Record<string, unknown> | undefined;
2184
2928
  content?: string | undefined;
2185
- source?: "user" | "system" | "ai" | "intelligence" | "agent" | "cli" | undefined;
2929
+ source?: "user" | "system" | "ai" | "agent" | "intelligence" | "cli" | undefined;
2186
2930
  profileHints?: {
2187
2931
  displayName?: string | undefined;
2188
2932
  icon?: string | undefined;
@@ -2216,16 +2960,43 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2216
2960
  id: string;
2217
2961
  type: string;
2218
2962
  updatedAt: Date;
2963
+ createdByUserId: string | null;
2219
2964
  createdAt: Date;
2965
+ correlationId: string | null;
2220
2966
  profileId: string | null;
2221
2967
  title: string | null;
2222
2968
  preview: string | null;
2223
2969
  documentId: string | null;
2224
2970
  version: number;
2971
+ createdByKind: ProvenanceKind | null;
2972
+ agentUserId: string | null;
2973
+ sourceProposalId: string | null;
2225
2974
  deletedAt: Date | null;
2226
2975
  };
2227
2976
  meta: object;
2228
2977
  }>;
2978
+ adminDelete: import("@trpc/server").TRPCMutationProcedure<{
2979
+ input: {
2980
+ id: string;
2981
+ };
2982
+ output: {
2983
+ deleted: boolean;
2984
+ id: string;
2985
+ type: string;
2986
+ };
2987
+ meta: object;
2988
+ }>;
2989
+ adminBatchDelete: import("@trpc/server").TRPCMutationProcedure<{
2990
+ input: {
2991
+ ids?: string[] | undefined;
2992
+ profileSlug?: string | undefined;
2993
+ workspaceId?: string | null | undefined;
2994
+ };
2995
+ output: {
2996
+ deletedCount: number;
2997
+ };
2998
+ meta: object;
2999
+ }>;
2229
3000
  adminListProfiles: import("@trpc/server").TRPCQueryProcedure<{
2230
3001
  input: {
2231
3002
  workspaceId?: string | null | undefined;
@@ -2249,9 +3020,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2249
3020
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2250
3021
  resolveOrCreateChannel: import("@trpc/server").TRPCQueryProcedure<{
2251
3022
  input: {
2252
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3023
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab";
2253
3024
  workspaceId?: string | undefined;
2254
- contextObjectType?: "user" | "external" | "workspace" | "view" | "entity" | "document" | "task" | "project" | undefined;
3025
+ contextObjectType?: "user" | "entity" | "external" | "workspace" | "document" | "view" | "task" | "project" | undefined;
2255
3026
  contextObjectId?: string | undefined;
2256
3027
  parentChannelId?: string | undefined;
2257
3028
  branchPurpose?: string | undefined;
@@ -2290,13 +3061,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2290
3061
  externalSource: string | null;
2291
3062
  status: "active" | "merged" | "archived";
2292
3063
  scope: "user" | "pod" | "workspace";
2293
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3064
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
2294
3065
  feedScope: "user" | "workspace" | null;
2295
3066
  contextObjectType: string | null;
2296
3067
  contextObjectId: string | null;
2297
3068
  parentChannelId: string | null;
2298
3069
  branchedFromMessageId: string | null;
2299
3070
  branchPurpose: string | null;
3071
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
2300
3072
  agentConfig: unknown;
2301
3073
  mcpServerIds: string[] | null;
2302
3074
  assignedAgentId: string | null;
@@ -2329,6 +3101,17 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2329
3101
  };
2330
3102
  meta: object;
2331
3103
  }>;
3104
+ createGroupChannel: import("@trpc/server").TRPCMutationProcedure<{
3105
+ input: {
3106
+ name: string;
3107
+ participants?: string[] | undefined;
3108
+ };
3109
+ output: {
3110
+ channelId: `${string}-${string}-${string}-${string}-${string}`;
3111
+ status: "created";
3112
+ };
3113
+ meta: object;
3114
+ }>;
2332
3115
  createDocumentComment: import("@trpc/server").TRPCMutationProcedure<{
2333
3116
  input: {
2334
3117
  documentId: string;
@@ -2365,9 +3148,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2365
3148
  parentChannelId?: string | undefined;
2366
3149
  attachmentEntityIds?: string[] | undefined;
2367
3150
  deepAnalysis?: boolean | undefined;
2368
- channelType?: "thread" | "personal" | "sub_thread" | "agent_collab" | undefined;
3151
+ channelType?: "personal" | "thread" | "sub_thread" | "agent_collab" | undefined;
2369
3152
  contextObjectId?: string | undefined;
2370
- contextObjectType?: "view" | "entity" | "document" | undefined;
3153
+ contextObjectType?: "entity" | "document" | "view" | undefined;
2371
3154
  branchPurpose?: string | undefined;
2372
3155
  };
2373
3156
  output: {
@@ -2399,13 +3182,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2399
3182
  externalSource: string | null;
2400
3183
  status: "active" | "merged" | "archived";
2401
3184
  scope: "user" | "pod" | "workspace";
2402
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3185
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
2403
3186
  feedScope: "user" | "workspace" | null;
2404
3187
  contextObjectType: string | null;
2405
3188
  contextObjectId: string | null;
2406
3189
  parentChannelId: string | null;
2407
3190
  branchedFromMessageId: string | null;
2408
3191
  branchPurpose: string | null;
3192
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
2409
3193
  agentConfig: unknown;
2410
3194
  mcpServerIds: string[] | null;
2411
3195
  assignedAgentId: string | null;
@@ -2441,7 +3225,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2441
3225
  }[];
2442
3226
  executionSummaries: {
2443
3227
  tool: string;
2444
- status: "error" | "success" | "skipped";
3228
+ status: "error" | "skipped" | "success";
2445
3229
  result?: unknown;
2446
3230
  error?: string | undefined;
2447
3231
  }[];
@@ -2483,16 +3267,33 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2483
3267
  latency?: number | undefined;
2484
3268
  intelligenceServiceId?: string | undefined;
2485
3269
  agentId?: string | undefined;
3270
+ aiSteps?: {
3271
+ id: string;
3272
+ type: string;
3273
+ content: string;
3274
+ timestamp: string;
3275
+ toolName?: string | undefined;
3276
+ toolInput?: unknown;
3277
+ toolOutput?: unknown;
3278
+ duration?: number | undefined;
3279
+ error?: string | undefined;
3280
+ title?: string | undefined;
3281
+ description?: string | undefined;
3282
+ status?: "error" | "pending" | "running" | "complete" | undefined;
3283
+ }[] | undefined;
3284
+ agentType?: string | undefined;
2486
3285
  } | null;
2487
3286
  deletedAt: Date | null;
2488
3287
  content: string;
2489
3288
  channelId: string;
2490
3289
  parentId: string | null;
2491
3290
  role: "user" | "system" | "assistant";
2492
- authorType: "external" | "human" | "ai_agent" | "bot";
3291
+ authorType: "human" | "ai_agent" | "external" | "bot";
2493
3292
  messageCategory: "chat" | "comment" | "system_notification" | "review";
2494
3293
  externalSource: string | null;
2495
3294
  inboxItemId: string | null;
3295
+ routedTeammateId: string | null;
3296
+ routedSource: "orchestrator" | "mention" | "direct" | null;
2496
3297
  previousHash: string | null;
2497
3298
  hash: string;
2498
3299
  sessionId: string | null;
@@ -2502,19 +3303,55 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2502
3303
  };
2503
3304
  meta: object;
2504
3305
  }>;
2505
- listChannels: import("@trpc/server").TRPCQueryProcedure<{
3306
+ getTimeline: import("@trpc/server").TRPCQueryProcedure<{
2506
3307
  input: {
2507
- workspaceId?: string | undefined;
2508
- channelType?: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab" | undefined;
3308
+ channelId: string;
2509
3309
  limit?: number | undefined;
2510
- contextObjectId?: string | undefined;
2511
- contextObjectType?: "view" | "entity" | "document" | undefined;
2512
- assignedAgentId?: string | undefined;
2513
3310
  };
2514
3311
  output: {
2515
- channels: (Channel & {
3312
+ turns: {
3313
+ index: number;
3314
+ userMessage: {
3315
+ id: string;
3316
+ content: string;
3317
+ timestamp: Date;
3318
+ };
3319
+ assistantMessage: {
3320
+ id: string;
3321
+ content: string;
3322
+ timestamp: Date;
3323
+ agentType: string | undefined;
3324
+ agentId: string | undefined;
3325
+ } | undefined;
3326
+ steps: AIStep[];
3327
+ isCompactionBoundary: boolean;
3328
+ compactionSummary: string | undefined;
3329
+ proposals: {
3330
+ proposalId: string;
3331
+ toolName: string;
3332
+ description: string;
3333
+ }[];
3334
+ }[];
3335
+ totalTurns: number;
3336
+ sessionCount: number;
3337
+ };
3338
+ meta: object;
3339
+ }>;
3340
+ listChannels: import("@trpc/server").TRPCQueryProcedure<{
3341
+ input: {
3342
+ workspaceId?: string | undefined;
3343
+ channelType?: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | undefined;
3344
+ limit?: number | undefined;
3345
+ contextObjectId?: string | undefined;
3346
+ contextObjectType?: "entity" | "document" | "view" | undefined;
3347
+ assignedAgentId?: string | undefined;
3348
+ agentUserId?: string | undefined;
3349
+ };
3350
+ output: {
3351
+ channels: (Channel & {
2516
3352
  hasAssistantMessage: boolean;
2517
3353
  origin: string;
3354
+ unreadCount: number;
2518
3355
  })[];
2519
3356
  };
2520
3357
  meta: object;
@@ -2523,7 +3360,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2523
3360
  input: {
2524
3361
  workspaceId?: string | undefined;
2525
3362
  contextObjectId?: string | undefined;
2526
- contextObjectType?: "view" | "entity" | "document" | undefined;
3363
+ contextObjectType?: "entity" | "document" | "view" | undefined;
2527
3364
  limit?: number | undefined;
2528
3365
  offset?: number | undefined;
2529
3366
  };
@@ -2531,6 +3368,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2531
3368
  items: (Channel & {
2532
3369
  hasAssistantMessage: boolean;
2533
3370
  origin: string;
3371
+ unreadCount: number;
2534
3372
  })[];
2535
3373
  pagination: {
2536
3374
  hasMore: boolean;
@@ -2551,6 +3389,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2551
3389
  items: (Channel & {
2552
3390
  hasAssistantMessage: boolean;
2553
3391
  origin: string;
3392
+ unreadCount: number;
2554
3393
  })[];
2555
3394
  pagination: {
2556
3395
  hasMore: boolean;
@@ -2570,6 +3409,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2570
3409
  items: (Channel & {
2571
3410
  hasAssistantMessage: boolean;
2572
3411
  origin: string;
3412
+ unreadCount: number;
2573
3413
  })[];
2574
3414
  pagination: {
2575
3415
  hasMore: boolean;
@@ -2589,6 +3429,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2589
3429
  items: (Channel & {
2590
3430
  hasAssistantMessage: boolean;
2591
3431
  origin: string;
3432
+ unreadCount: number;
2592
3433
  })[];
2593
3434
  pagination: {
2594
3435
  hasMore: boolean;
@@ -2607,6 +3448,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2607
3448
  };
2608
3449
  meta: object;
2609
3450
  }>;
3451
+ getOrCreateAgentThreadByType: import("@trpc/server").TRPCMutationProcedure<{
3452
+ input: {
3453
+ agentType: string;
3454
+ };
3455
+ output: {
3456
+ channel: Channel;
3457
+ };
3458
+ meta: object;
3459
+ }>;
2610
3460
  getOrCreateWorkspaceGroup: import("@trpc/server").TRPCQueryProcedure<{
2611
3461
  input: Record<string, never>;
2612
3462
  output: {
@@ -2630,13 +3480,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2630
3480
  externalSource: string | null;
2631
3481
  status: "active" | "merged" | "archived";
2632
3482
  scope: "user" | "pod" | "workspace";
2633
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3483
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
2634
3484
  feedScope: "user" | "workspace" | null;
2635
3485
  contextObjectType: string | null;
2636
3486
  contextObjectId: string | null;
2637
3487
  parentChannelId: string | null;
2638
3488
  branchedFromMessageId: string | null;
2639
3489
  branchPurpose: string | null;
3490
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
2640
3491
  agentConfig: unknown;
2641
3492
  mcpServerIds: string[] | null;
2642
3493
  assignedAgentId: string | null;
@@ -2695,13 +3546,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2695
3546
  externalSource: string | null;
2696
3547
  status: "active" | "merged" | "archived";
2697
3548
  scope: "user" | "pod" | "workspace";
2698
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3549
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
2699
3550
  feedScope: "user" | "workspace" | null;
2700
3551
  contextObjectType: string | null;
2701
3552
  contextObjectId: string | null;
2702
3553
  parentChannelId: string | null;
2703
3554
  branchedFromMessageId: string | null;
2704
3555
  branchPurpose: string | null;
3556
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
2705
3557
  agentConfig: unknown;
2706
3558
  mcpServerIds: string[] | null;
2707
3559
  assignedAgentId: string | null;
@@ -2720,11 +3572,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2720
3572
  id: string;
2721
3573
  createdAt: Date;
2722
3574
  channelId: string;
2723
- objectType: "proposal" | "view" | "entity" | "document" | "inbox_item";
3575
+ relevanceScore: number | null;
3576
+ objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
2724
3577
  objectId: string;
2725
3578
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
2726
- conflictStatus: "none" | "pending" | "resolved";
2727
- relevanceScore: number | null;
3579
+ conflictStatus: "pending" | "none" | "resolved";
2728
3580
  }[] | undefined;
2729
3581
  branchTree: any;
2730
3582
  };
@@ -2737,6 +3589,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2737
3589
  assignedAgentId?: string | null | undefined;
2738
3590
  agentConfig?: Record<string, unknown> | undefined;
2739
3591
  mcpServerIds?: string[] | null | undefined;
3592
+ aiReactionMode?: "only_mentioned" | "when_confident" | "off" | undefined;
3593
+ addAgentMemberId?: string | undefined;
3594
+ removeAgentMemberId?: string | undefined;
2740
3595
  };
2741
3596
  output: {
2742
3597
  status: string;
@@ -2800,13 +3655,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2800
3655
  externalSource: string | null;
2801
3656
  status: "active" | "merged" | "archived";
2802
3657
  scope: "user" | "pod" | "workspace";
2803
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3658
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
2804
3659
  feedScope: "user" | "workspace" | null;
2805
3660
  contextObjectType: string | null;
2806
3661
  contextObjectId: string | null;
2807
3662
  parentChannelId: string | null;
2808
3663
  branchedFromMessageId: string | null;
2809
3664
  branchPurpose: string | null;
3665
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
2810
3666
  agentConfig: unknown;
2811
3667
  mcpServerIds: string[] | null;
2812
3668
  assignedAgentId: string | null;
@@ -2829,13 +3685,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2829
3685
  externalSource: string | null;
2830
3686
  status: "active" | "merged" | "archived";
2831
3687
  scope: "user" | "pod" | "workspace";
2832
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3688
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
2833
3689
  feedScope: "user" | "workspace" | null;
2834
3690
  contextObjectType: string | null;
2835
3691
  contextObjectId: string | null;
2836
3692
  parentChannelId: string | null;
2837
3693
  branchedFromMessageId: string | null;
2838
3694
  branchPurpose: string | null;
3695
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
2839
3696
  agentConfig: unknown;
2840
3697
  mcpServerIds: string[] | null;
2841
3698
  assignedAgentId: string | null;
@@ -2858,13 +3715,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2858
3715
  externalSource: string | null;
2859
3716
  status: "active" | "merged" | "archived";
2860
3717
  scope: "user" | "pod" | "workspace";
2861
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3718
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
2862
3719
  feedScope: "user" | "workspace" | null;
2863
3720
  contextObjectType: string | null;
2864
3721
  contextObjectId: string | null;
2865
3722
  parentChannelId: string | null;
2866
3723
  branchedFromMessageId: string | null;
2867
3724
  branchPurpose: string | null;
3725
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
2868
3726
  agentConfig: unknown;
2869
3727
  mcpServerIds: string[] | null;
2870
3728
  assignedAgentId: string | null;
@@ -2882,7 +3740,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2882
3740
  getChannelContext: import("@trpc/server").TRPCQueryProcedure<{
2883
3741
  input: {
2884
3742
  channelId: string;
2885
- objectTypes?: ("proposal" | "view" | "entity" | "document" | "inbox_item")[] | undefined;
3743
+ objectTypes?: ("entity" | "document" | "view" | "proposal" | "inbox_item")[] | undefined;
2886
3744
  relationshipTypes?: ("created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent")[] | undefined;
2887
3745
  };
2888
3746
  output: {
@@ -2893,11 +3751,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2893
3751
  id: string;
2894
3752
  createdAt: Date;
2895
3753
  channelId: string;
2896
- objectType: "proposal" | "view" | "entity" | "document" | "inbox_item";
3754
+ relevanceScore: number | null;
3755
+ objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
2897
3756
  objectId: string;
2898
3757
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
2899
- conflictStatus: "none" | "pending" | "resolved";
2900
- relevanceScore: number | null;
3758
+ conflictStatus: "pending" | "none" | "resolved";
2901
3759
  }[];
2902
3760
  entities: {
2903
3761
  userId: string;
@@ -2906,11 +3764,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2906
3764
  id: string;
2907
3765
  createdAt: Date;
2908
3766
  channelId: string;
2909
- objectType: "proposal" | "view" | "entity" | "document" | "inbox_item";
3767
+ relevanceScore: number | null;
3768
+ objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
2910
3769
  objectId: string;
2911
3770
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
2912
- conflictStatus: "none" | "pending" | "resolved";
2913
- relevanceScore: number | null;
3771
+ conflictStatus: "pending" | "none" | "resolved";
2914
3772
  }[];
2915
3773
  documents: {
2916
3774
  userId: string;
@@ -2919,11 +3777,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2919
3777
  id: string;
2920
3778
  createdAt: Date;
2921
3779
  channelId: string;
2922
- objectType: "proposal" | "view" | "entity" | "document" | "inbox_item";
3780
+ relevanceScore: number | null;
3781
+ objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
2923
3782
  objectId: string;
2924
3783
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
2925
- conflictStatus: "none" | "pending" | "resolved";
2926
- relevanceScore: number | null;
3784
+ conflictStatus: "pending" | "none" | "resolved";
2927
3785
  }[];
2928
3786
  };
2929
3787
  meta: object;
@@ -2931,7 +3789,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2931
3789
  addContextItem: import("@trpc/server").TRPCMutationProcedure<{
2932
3790
  input: {
2933
3791
  channelId: string;
2934
- objectType: "view" | "entity" | "document";
3792
+ objectType: "entity" | "document" | "view";
2935
3793
  objectId: string;
2936
3794
  };
2937
3795
  output: {
@@ -2953,7 +3811,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
2953
3811
  input: {
2954
3812
  channelId: string;
2955
3813
  objectId: string;
2956
- objectType: "view" | "entity" | "document";
3814
+ objectType: "entity" | "document" | "view";
2957
3815
  };
2958
3816
  output: {
2959
3817
  ok: boolean;
@@ -3022,13 +3880,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3022
3880
  externalSource: string | null;
3023
3881
  status: "active" | "merged" | "archived";
3024
3882
  scope: "user" | "pod" | "workspace";
3025
- channelType: "external" | "thread" | "personal" | "sub_thread" | "feed" | "agent_collab";
3883
+ channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
3026
3884
  feedScope: "user" | "workspace" | null;
3027
3885
  contextObjectType: string | null;
3028
3886
  contextObjectId: string | null;
3029
3887
  parentChannelId: string | null;
3030
3888
  branchedFromMessageId: string | null;
3031
3889
  branchPurpose: string | null;
3890
+ aiReactionMode: "only_mentioned" | "when_confident" | "off";
3032
3891
  agentConfig: unknown;
3033
3892
  mcpServerIds: string[] | null;
3034
3893
  assignedAgentId: string | null;
@@ -3058,6 +3917,91 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3058
3917
  };
3059
3918
  meta: object;
3060
3919
  }>;
3920
+ addTeammate: import("@trpc/server").TRPCMutationProcedure<{
3921
+ input: {
3922
+ channelId: string;
3923
+ agentUserId: string;
3924
+ canDraft?: boolean | undefined;
3925
+ canPropose?: boolean | undefined;
3926
+ canAct?: boolean | undefined;
3927
+ };
3928
+ output: {
3929
+ status: "added";
3930
+ channelId: string;
3931
+ };
3932
+ meta: object;
3933
+ }>;
3934
+ removeTeammate: import("@trpc/server").TRPCMutationProcedure<{
3935
+ input: {
3936
+ channelId: string;
3937
+ agentUserId: string;
3938
+ };
3939
+ output: {
3940
+ status: "removed";
3941
+ channelId: string;
3942
+ };
3943
+ meta: object;
3944
+ }>;
3945
+ listRoomMembers: import("@trpc/server").TRPCQueryProcedure<{
3946
+ input: {
3947
+ channelId: string;
3948
+ };
3949
+ output: {
3950
+ members: {
3951
+ memberId: string;
3952
+ memberKind: "human" | "ai_agent";
3953
+ role: "owner" | "member";
3954
+ capabilities: {
3955
+ canDraft: boolean;
3956
+ canPropose: boolean;
3957
+ canAct: boolean;
3958
+ };
3959
+ addedBy: string | null;
3960
+ createdAt: Date;
3961
+ name: string | null;
3962
+ email: string | null;
3963
+ avatarUrl: string | null;
3964
+ agent: {
3965
+ agentType: string | null;
3966
+ } | null;
3967
+ }[];
3968
+ };
3969
+ meta: object;
3970
+ }>;
3971
+ toggleReaction: import("@trpc/server").TRPCMutationProcedure<{
3972
+ input: {
3973
+ messageId: string;
3974
+ emoji: string;
3975
+ };
3976
+ output: {
3977
+ action: "removed";
3978
+ } | {
3979
+ action: "added";
3980
+ };
3981
+ meta: object;
3982
+ }>;
3983
+ getChannelReactions: import("@trpc/server").TRPCQueryProcedure<{
3984
+ input: {
3985
+ messageIds: string[];
3986
+ };
3987
+ output: {
3988
+ reactions: Record<string, {
3989
+ emoji: string;
3990
+ count: number;
3991
+ reactedByMe: boolean;
3992
+ }[]>;
3993
+ };
3994
+ meta: object;
3995
+ }>;
3996
+ markChannelRead: import("@trpc/server").TRPCMutationProcedure<{
3997
+ input: {
3998
+ channelId: string;
3999
+ };
4000
+ output: {
4001
+ ok: boolean;
4002
+ };
4003
+ meta: object;
4004
+ }>;
3061
4005
  }>>;
3062
4006
  proposals: import("@trpc/server").TRPCBuiltRouter<{
3063
4007
  ctx: Context;
@@ -3074,20 +4018,27 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3074
4018
  limit?: number | undefined;
3075
4019
  offset?: number | undefined;
3076
4020
  workspaceId?: string | null | undefined;
3077
- targetType?: "view" | "entity" | "document" | "whiteboard" | "profile" | undefined;
4021
+ targetType?: "entity" | "document" | "view" | "whiteboard" | "profile" | undefined;
3078
4022
  targetId?: string | undefined;
3079
4023
  threadId?: string | undefined;
4024
+ agentUserId?: string | undefined;
4025
+ agentOnly?: boolean | undefined;
4026
+ includeExpired?: boolean | undefined;
3080
4027
  status?: "pending" | "rejected" | "validated" | "all" | undefined;
4028
+ cursor?: string | undefined;
3081
4029
  };
3082
4030
  output: {
3083
- items: ({
4031
+ items: {
4032
+ viewerCanReview: boolean;
3084
4033
  workspaceId: string | null;
3085
4034
  sourceMessageId: string | null;
3086
4035
  id: string;
3087
4036
  data: unknown;
3088
4037
  updatedAt: Date;
3089
4038
  createdAt: Date;
3090
- status: "approved" | "pending" | "rejected" | "auto_approved";
4039
+ correlationId: string | null;
4040
+ agentUserId: string | null;
4041
+ status: "approved" | "pending" | "rejected" | "auto_approved" | "reverted";
3091
4042
  expiresAt: Date | null;
3092
4043
  createdBy: string | null;
3093
4044
  threadId: string | null;
@@ -3095,31 +4046,34 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3095
4046
  targetId: string;
3096
4047
  proposalType: string;
3097
4048
  commandRunId: string | null;
3098
- agentUserId: string | null;
4049
+ requestedEventId: string | null;
3099
4050
  reviewedBy: string | null;
3100
4051
  reviewedAt: Date | null;
3101
4052
  rejectionReason: string | null;
3102
4053
  comments: unknown;
3103
- } & {
3104
4054
  request: UpdateRequest;
3105
4055
  authorName?: string;
3106
4056
  targetName?: string;
3107
4057
  review: ProposalReviewModel;
3108
- })[];
4058
+ }[];
3109
4059
  pagination: {
4060
+ nextCursor: string | undefined;
3110
4061
  hasMore: boolean;
3111
4062
  total?: number;
3112
4063
  limit: number;
3113
4064
  offset: number;
3114
4065
  };
3115
- proposals: ({
4066
+ proposals: {
4067
+ viewerCanReview: boolean;
3116
4068
  workspaceId: string | null;
3117
4069
  sourceMessageId: string | null;
3118
4070
  id: string;
3119
4071
  data: unknown;
3120
4072
  updatedAt: Date;
3121
4073
  createdAt: Date;
3122
- status: "approved" | "pending" | "rejected" | "auto_approved";
4074
+ correlationId: string | null;
4075
+ agentUserId: string | null;
4076
+ status: "approved" | "pending" | "rejected" | "auto_approved" | "reverted";
3123
4077
  expiresAt: Date | null;
3124
4078
  createdBy: string | null;
3125
4079
  threadId: string | null;
@@ -3127,17 +4081,16 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3127
4081
  targetId: string;
3128
4082
  proposalType: string;
3129
4083
  commandRunId: string | null;
3130
- agentUserId: string | null;
4084
+ requestedEventId: string | null;
3131
4085
  reviewedBy: string | null;
3132
4086
  reviewedAt: Date | null;
3133
4087
  rejectionReason: string | null;
3134
4088
  comments: unknown;
3135
- } & {
3136
4089
  request: UpdateRequest;
3137
4090
  authorName?: string;
3138
4091
  targetName?: string;
3139
4092
  review: ProposalReviewModel;
3140
- })[];
4093
+ }[];
3141
4094
  };
3142
4095
  meta: object;
3143
4096
  }>;
@@ -3152,7 +4105,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3152
4105
  data: unknown;
3153
4106
  updatedAt: Date;
3154
4107
  createdAt: Date;
3155
- status: "approved" | "pending" | "rejected" | "auto_approved";
4108
+ correlationId: string | null;
4109
+ agentUserId: string | null;
4110
+ status: "approved" | "pending" | "rejected" | "auto_approved" | "reverted";
3156
4111
  expiresAt: Date | null;
3157
4112
  createdBy: string | null;
3158
4113
  threadId: string | null;
@@ -3160,7 +4115,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3160
4115
  targetId: string;
3161
4116
  proposalType: string;
3162
4117
  commandRunId: string | null;
3163
- agentUserId: string | null;
4118
+ requestedEventId: string | null;
3164
4119
  reviewedBy: string | null;
3165
4120
  reviewedAt: Date | null;
3166
4121
  rejectionReason: string | null;
@@ -3179,6 +4134,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3179
4134
  };
3180
4135
  output: {
3181
4136
  success: boolean;
4137
+ primaryId: string;
4138
+ created: number;
4139
+ linked: number;
4140
+ } | {
4141
+ success: boolean;
4142
+ primaryId?: undefined;
4143
+ created?: undefined;
4144
+ linked?: undefined;
3182
4145
  };
3183
4146
  meta: object;
3184
4147
  }>;
@@ -3192,6 +4155,23 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3192
4155
  };
3193
4156
  meta: object;
3194
4157
  }>;
4158
+ revert: import("@trpc/server").TRPCMutationProcedure<{
4159
+ input: {
4160
+ proposalId: string;
4161
+ reason?: string | undefined;
4162
+ };
4163
+ output: {
4164
+ success: boolean;
4165
+ reverted: ProposalMaterializedRecord;
4166
+ alreadyReverted: boolean;
4167
+ } | {
4168
+ partialFailures?: string[] | undefined;
4169
+ success: boolean;
4170
+ reverted: ProposalMaterializedRecord;
4171
+ alreadyReverted?: undefined;
4172
+ };
4173
+ meta: object;
4174
+ }>;
3195
4175
  batchApprove: import("@trpc/server").TRPCMutationProcedure<{
3196
4176
  input: {
3197
4177
  proposalIds: string[];
@@ -3218,8 +4198,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3218
4198
  }>;
3219
4199
  submit: import("@trpc/server").TRPCMutationProcedure<{
3220
4200
  input: {
3221
- targetType: "workspace" | "view" | "entity" | "document" | "relation" | "profile";
3222
- changeType: "update" | "delete" | "create";
4201
+ targetType: "entity" | "workspace" | "document" | "view" | "relation" | "profile";
4202
+ changeType: "create" | "update" | "delete";
3223
4203
  data: Record<string, any>;
3224
4204
  targetId?: string | undefined;
3225
4205
  reasoning?: string | undefined;
@@ -3725,10 +4705,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3725
4705
  }>;
3726
4706
  listAuditLogs: import("@trpc/server").TRPCQueryProcedure<{
3727
4707
  input: {
3728
- workspaceId?: string | undefined;
3729
- userId?: string | undefined;
3730
- subjectType?: string | undefined;
3731
- action?: string | undefined;
4708
+ workspaceId?: string | null | undefined;
4709
+ userId?: string | null | undefined;
4710
+ subjectType?: string | null | undefined;
4711
+ action?: string | null | undefined;
4712
+ actions?: string[] | undefined;
3732
4713
  fromDate?: string | undefined;
3733
4714
  toDate?: string | undefined;
3734
4715
  limit?: number | undefined;
@@ -3763,6 +4744,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3763
4744
  };
3764
4745
  meta: object;
3765
4746
  }>;
4747
+ listEventCatalog: import("@trpc/server").TRPCQueryProcedure<{
4748
+ input: void;
4749
+ output: EventDefinition[];
4750
+ meta: object;
4751
+ }>;
3766
4752
  deleteUser: import("@trpc/server").TRPCMutationProcedure<{
3767
4753
  input: {
3768
4754
  userId: string;
@@ -4002,7 +4988,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4002
4988
  id: string;
4003
4989
  email: string;
4004
4990
  name: string | null;
4005
- };
4991
+ } | null;
4006
4992
  }[];
4007
4993
  meta: object;
4008
4994
  }>;
@@ -4021,6 +5007,22 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4021
5007
  };
4022
5008
  meta: object;
4023
5009
  }>;
5010
+ adminCreateServiceKey: import("@trpc/server").TRPCMutationProcedure<{
5011
+ input: {
5012
+ keyName: string;
5013
+ scope: string[];
5014
+ workspaceId: string;
5015
+ expiresInDays?: number | undefined;
5016
+ };
5017
+ output: {
5018
+ id: any;
5019
+ key: string;
5020
+ keyPrefix: string;
5021
+ status: "created";
5022
+ message: string;
5023
+ };
5024
+ meta: object;
5025
+ }>;
4024
5026
  connectIntegration: import("@trpc/server").TRPCMutationProcedure<{
4025
5027
  input: {
4026
5028
  integration: "custom" | "openclaw" | "cli" | "raycast";
@@ -4211,6 +5213,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4211
5213
  subscription: {
4212
5214
  name: string;
4213
5215
  userId: string;
5216
+ workspaceId: string | null;
4214
5217
  id: string;
4215
5218
  secret: string;
4216
5219
  createdAt: Date;
@@ -4229,6 +5232,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4229
5232
  output: {
4230
5233
  name: string;
4231
5234
  userId: string;
5235
+ workspaceId: string | null;
4232
5236
  id: string;
4233
5237
  secret: string;
4234
5238
  createdAt: Date;
@@ -4251,6 +5255,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4251
5255
  output: {
4252
5256
  id: string;
4253
5257
  userId: string;
5258
+ workspaceId: string | null;
4254
5259
  name: string;
4255
5260
  url: string;
4256
5261
  eventTypes: string[];
@@ -4270,104 +5275,284 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4270
5275
  };
4271
5276
  meta: object;
4272
5277
  }>;
4273
- }>>;
4274
- documents: import("@trpc/server").TRPCBuiltRouter<{
4275
- ctx: Context;
4276
- meta: object;
4277
- errorShape: {
4278
- message: string;
4279
- code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
4280
- data: import("@trpc/server").TRPCDefaultErrorData;
4281
- };
4282
- transformer: true;
4283
- }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
4284
- create: import("@trpc/server").TRPCMutationProcedure<{
4285
- input: {
4286
- title: string;
4287
- content?: string | undefined;
4288
- type?: "code" | "text" | "markdown" | "pdf" | "docx" | undefined;
4289
- projectId?: string | undefined;
4290
- workspaceId?: string | undefined;
4291
- };
4292
- output: {
4293
- status: string;
4294
- message: string;
4295
- document: {
4296
- id: string;
4297
- title: string;
4298
- };
4299
- };
4300
- meta: object;
4301
- }>;
4302
- upload: import("@trpc/server").TRPCMutationProcedure<{
4303
- input: {
4304
- type: "code" | "text" | "markdown" | "pdf" | "docx";
4305
- content: string;
4306
- title?: string | undefined;
4307
- language?: string | undefined;
4308
- mimeType?: string | undefined;
4309
- projectId?: string | undefined;
4310
- workspaceId?: string | undefined;
4311
- };
5278
+ listForWorkspace: import("@trpc/server").TRPCQueryProcedure<{
5279
+ input: void;
4312
5280
  output: {
4313
- status: string;
4314
- message: string;
4315
- documentId: string;
4316
- };
5281
+ name: string;
5282
+ userId: string;
5283
+ workspaceId: string | null;
5284
+ id: string;
5285
+ secret: string;
5286
+ createdAt: Date;
5287
+ url: string;
5288
+ eventTypes: string[];
5289
+ active: boolean;
5290
+ retryConfig: unknown;
5291
+ lastTriggeredAt: Date | null;
5292
+ }[];
4317
5293
  meta: object;
4318
5294
  }>;
4319
- get: import("@trpc/server").TRPCQueryProcedure<{
5295
+ createForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
4320
5296
  input: {
4321
- documentId: string;
5297
+ name: string;
5298
+ url: string;
5299
+ eventTypes: string[];
4322
5300
  };
4323
5301
  output: {
4324
- document: {
4325
- id: string;
5302
+ subscription: {
5303
+ name: string;
4326
5304
  userId: string;
4327
5305
  workspaceId: string | null;
4328
- title: string;
4329
- type: string;
4330
- language: string | null;
4331
- storageUrl: string | null;
4332
- storageKey: string | null;
4333
- size: number;
4334
- mimeType: string | null;
4335
- currentVersion: number;
4336
- lastSavedVersion: number;
4337
- workingState: string | null;
4338
- workingStateUpdatedAt: Date | null;
4339
- metadata: unknown;
5306
+ id: string;
5307
+ secret: string;
4340
5308
  createdAt: Date;
4341
- updatedAt: Date;
4342
- deletedAt: Date | null;
5309
+ url: string;
5310
+ eventTypes: string[];
5311
+ active: boolean;
5312
+ retryConfig: unknown;
5313
+ lastTriggeredAt: Date | null;
4343
5314
  };
4344
- content: string;
5315
+ secret: string;
4345
5316
  };
4346
5317
  meta: object;
4347
5318
  }>;
4348
- update: import("@trpc/server").TRPCMutationProcedure<{
5319
+ deleteForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
4349
5320
  input: {
4350
- documentId: string;
4351
- delta?: {
4352
- content: string;
4353
- }[] | undefined;
4354
- version?: number | undefined;
4355
- message?: string | undefined;
4356
- title?: string | undefined;
5321
+ id: string;
4357
5322
  };
4358
5323
  output: {
4359
- version: number;
4360
5324
  success: boolean;
4361
5325
  };
4362
5326
  meta: object;
4363
5327
  }>;
4364
- delete: import("@trpc/server").TRPCMutationProcedure<{
5328
+ toggleForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
4365
5329
  input: {
4366
- documentId: string;
5330
+ id: string;
5331
+ active: boolean;
4367
5332
  };
4368
5333
  output: {
4369
- success: boolean;
4370
- };
5334
+ id: string;
5335
+ userId: string;
5336
+ workspaceId: string | null;
5337
+ name: string;
5338
+ url: string;
5339
+ eventTypes: string[];
5340
+ active: boolean;
5341
+ retryConfig: unknown;
5342
+ createdAt: Date;
5343
+ lastTriggeredAt: Date | null;
5344
+ };
5345
+ meta: object;
5346
+ }>;
5347
+ adminListForWorkspace: import("@trpc/server").TRPCQueryProcedure<{
5348
+ input: {
5349
+ workspaceId: string;
5350
+ };
5351
+ output: {
5352
+ name: string;
5353
+ userId: string;
5354
+ workspaceId: string | null;
5355
+ id: string;
5356
+ secret: string;
5357
+ createdAt: Date;
5358
+ url: string;
5359
+ eventTypes: string[];
5360
+ active: boolean;
5361
+ retryConfig: unknown;
5362
+ lastTriggeredAt: Date | null;
5363
+ }[];
5364
+ meta: object;
5365
+ }>;
5366
+ adminCreateForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
5367
+ input: {
5368
+ workspaceId: string;
5369
+ url: string;
5370
+ events: string[];
5371
+ description?: string | undefined;
5372
+ };
5373
+ output: {
5374
+ subscription: {
5375
+ name: string;
5376
+ userId: string;
5377
+ workspaceId: string | null;
5378
+ id: string;
5379
+ secret: string;
5380
+ createdAt: Date;
5381
+ url: string;
5382
+ eventTypes: string[];
5383
+ active: boolean;
5384
+ retryConfig: unknown;
5385
+ lastTriggeredAt: Date | null;
5386
+ };
5387
+ secret: string;
5388
+ };
5389
+ meta: object;
5390
+ }>;
5391
+ adminDeleteForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
5392
+ input: {
5393
+ id: string;
5394
+ workspaceId: string;
5395
+ };
5396
+ output: {
5397
+ success: boolean;
5398
+ };
5399
+ meta: object;
5400
+ }>;
5401
+ adminToggleForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
5402
+ input: {
5403
+ id: string;
5404
+ workspaceId: string;
5405
+ active: boolean;
5406
+ };
5407
+ output: {
5408
+ id: string;
5409
+ userId: string;
5410
+ workspaceId: string | null;
5411
+ name: string;
5412
+ url: string;
5413
+ eventTypes: string[];
5414
+ active: boolean;
5415
+ retryConfig: unknown;
5416
+ createdAt: Date;
5417
+ lastTriggeredAt: Date | null;
5418
+ };
5419
+ meta: object;
5420
+ }>;
5421
+ deliveriesForSubscription: import("@trpc/server").TRPCQueryProcedure<{
5422
+ input: {
5423
+ subscriptionId: string;
5424
+ limit?: number | undefined;
5425
+ };
5426
+ output: {
5427
+ id: string;
5428
+ createdAt: Date;
5429
+ status: string;
5430
+ subscriptionId: string;
5431
+ eventId: string;
5432
+ responseStatus: number | null;
5433
+ attempt: number;
5434
+ deliveredAt: Date | null;
5435
+ }[];
5436
+ meta: object;
5437
+ }>;
5438
+ deliveries: import("@trpc/server").TRPCQueryProcedure<{
5439
+ input: {
5440
+ subscriptionId: string;
5441
+ limit?: number | undefined;
5442
+ };
5443
+ output: {
5444
+ id: string;
5445
+ status: "success" | "failed" | "pending";
5446
+ responseStatus: string | undefined;
5447
+ attempt: number;
5448
+ deliveredAt: string | undefined;
5449
+ createdAt: string | undefined;
5450
+ }[];
5451
+ meta: object;
5452
+ }>;
5453
+ }>>;
5454
+ documents: import("@trpc/server").TRPCBuiltRouter<{
5455
+ ctx: Context;
5456
+ meta: object;
5457
+ errorShape: {
5458
+ message: string;
5459
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
5460
+ data: import("@trpc/server").TRPCDefaultErrorData;
5461
+ };
5462
+ transformer: true;
5463
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
5464
+ create: import("@trpc/server").TRPCMutationProcedure<{
5465
+ input: {
5466
+ title: string;
5467
+ content?: string | undefined;
5468
+ type?: "code" | "text" | "markdown" | "pdf" | "docx" | "html" | undefined;
5469
+ projectId?: string | undefined;
5470
+ workspaceId?: string | undefined;
5471
+ };
5472
+ output: {
5473
+ status: string;
5474
+ message: string;
5475
+ document: {
5476
+ id: string;
5477
+ title: string;
5478
+ };
5479
+ };
5480
+ meta: object;
5481
+ }>;
5482
+ upload: import("@trpc/server").TRPCMutationProcedure<{
5483
+ input: {
5484
+ type: "code" | "text" | "markdown" | "pdf" | "docx" | "html";
5485
+ content: string;
5486
+ title?: string | undefined;
5487
+ language?: string | undefined;
5488
+ mimeType?: string | undefined;
5489
+ projectId?: string | undefined;
5490
+ workspaceId?: string | undefined;
5491
+ };
5492
+ output: {
5493
+ status: string;
5494
+ message: string;
5495
+ documentId: string;
5496
+ };
5497
+ meta: object;
5498
+ }>;
5499
+ get: import("@trpc/server").TRPCQueryProcedure<{
5500
+ input: {
5501
+ documentId: string;
5502
+ };
5503
+ output: {
5504
+ document: {
5505
+ id: string;
5506
+ userId: string;
5507
+ workspaceId: string | null;
5508
+ title: string;
5509
+ type: string;
5510
+ language: string | null;
5511
+ storageUrl: string | null;
5512
+ storageKey: string | null;
5513
+ size: number;
5514
+ mimeType: string | null;
5515
+ currentVersion: number;
5516
+ lastSavedVersion: number;
5517
+ workingState: string | null;
5518
+ workingStateUpdatedAt: Date | null;
5519
+ metadata: unknown;
5520
+ createdByKind: ProvenanceKind | null;
5521
+ createdByUserId: string | null;
5522
+ agentUserId: string | null;
5523
+ sourceProposalId: string | null;
5524
+ correlationId: string | null;
5525
+ createdAt: Date;
5526
+ updatedAt: Date;
5527
+ deletedAt: Date | null;
5528
+ };
5529
+ content: string;
5530
+ };
5531
+ meta: object;
5532
+ }>;
5533
+ update: import("@trpc/server").TRPCMutationProcedure<{
5534
+ input: {
5535
+ documentId: string;
5536
+ delta?: {
5537
+ content: string;
5538
+ }[] | undefined;
5539
+ version?: number | undefined;
5540
+ message?: string | undefined;
5541
+ title?: string | undefined;
5542
+ };
5543
+ output: {
5544
+ version: number;
5545
+ success: boolean;
5546
+ };
5547
+ meta: object;
5548
+ }>;
5549
+ delete: import("@trpc/server").TRPCMutationProcedure<{
5550
+ input: {
5551
+ documentId: string;
5552
+ };
5553
+ output: {
5554
+ success: boolean;
5555
+ };
4371
5556
  meta: object;
4372
5557
  }>;
4373
5558
  saveVersion: import("@trpc/server").TRPCMutationProcedure<{
@@ -4393,6 +5578,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4393
5578
  message: string | null;
4394
5579
  createdBy: string;
4395
5580
  createdAt: Date;
5581
+ size: number;
5582
+ mimeType: string | null;
5583
+ checksum: string | null;
5584
+ hasStoredSnapshot: boolean;
4396
5585
  }[];
4397
5586
  latest: {
4398
5587
  currentVersion: number;
@@ -4417,12 +5606,17 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4417
5606
  versionId: string;
4418
5607
  };
4419
5608
  output: {
5609
+ content: string;
4420
5610
  id: string;
4421
5611
  message: string | null;
4422
5612
  createdAt: Date;
4423
5613
  documentId: string;
4424
5614
  version: number;
4425
- content: string;
5615
+ storageUrl: string | null;
5616
+ storageKey: string | null;
5617
+ size: number;
5618
+ mimeType: string | null;
5619
+ checksum: string | null;
4426
5620
  author: string;
4427
5621
  authorId: string;
4428
5622
  };
@@ -4454,7 +5648,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4454
5648
  list: import("@trpc/server").TRPCQueryProcedure<{
4455
5649
  input: {
4456
5650
  projectId?: string | undefined;
4457
- type?: "code" | "text" | "markdown" | "pdf" | "docx" | undefined;
5651
+ type?: "code" | "text" | "markdown" | "pdf" | "docx" | "html" | undefined;
4458
5652
  limit?: number | undefined;
4459
5653
  };
4460
5654
  output: {
@@ -4474,6 +5668,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4474
5668
  workingState: string | null;
4475
5669
  workingStateUpdatedAt: Date | null;
4476
5670
  metadata: unknown;
5671
+ createdByKind: ProvenanceKind | null;
5672
+ createdByUserId: string | null;
5673
+ agentUserId: string | null;
5674
+ sourceProposalId: string | null;
5675
+ correlationId: string | null;
4477
5676
  createdAt: Date;
4478
5677
  updatedAt: Date;
4479
5678
  deletedAt: Date | null;
@@ -4837,6 +6036,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4837
6036
  description?: string | undefined;
4838
6037
  version?: string | undefined;
4839
6038
  pricing?: "custom" | "enterprise" | "free" | "premium" | undefined;
6039
+ providerType?: "custom" | "openai" | "anthropic" | "self-hosted" | undefined;
4840
6040
  metadata?: Record<string, unknown> | undefined;
4841
6041
  };
4842
6042
  output: {
@@ -4876,6 +6076,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4876
6076
  version: string | null;
4877
6077
  capabilities: string[];
4878
6078
  pricing: string | null;
6079
+ providerType: string | null;
6080
+ metadata: Record<string, unknown> | null;
4879
6081
  status: string;
4880
6082
  enabled: boolean;
4881
6083
  createdAt: Date;
@@ -5288,7 +6490,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5288
6490
  allowedEntityTypes: string[] | null;
5289
6491
  maxEntitiesCreatedPerRun: number | null;
5290
6492
  canCreateViews: boolean;
5291
- outputMode: "proposal" | "view" | "text";
6493
+ outputMode: "view" | "proposal" | "text";
5292
6494
  permissionsProfile: "read_only" | "propose_writes";
5293
6495
  sharedScope: "user" | "workspace";
5294
6496
  }[];
@@ -5314,7 +6516,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5314
6516
  allowedEntityTypes: string[] | null;
5315
6517
  maxEntitiesCreatedPerRun: number | null;
5316
6518
  canCreateViews: boolean;
5317
- outputMode: "proposal" | "view" | "text";
6519
+ outputMode: "view" | "proposal" | "text";
5318
6520
  permissionsProfile: "read_only" | "propose_writes";
5319
6521
  sharedScope: "user" | "workspace";
5320
6522
  };
@@ -5329,7 +6531,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5329
6531
  allowedEntityTypes?: string[] | undefined;
5330
6532
  maxEntitiesCreatedPerRun?: number | undefined;
5331
6533
  canCreateViews?: boolean | undefined;
5332
- outputMode?: "proposal" | "view" | "text" | undefined;
6534
+ outputMode?: "view" | "proposal" | "text" | undefined;
5333
6535
  permissionsProfile?: "read_only" | "propose_writes" | undefined;
5334
6536
  sharedScope?: "user" | "workspace" | undefined;
5335
6537
  };
@@ -5348,7 +6550,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5348
6550
  allowedEntityTypes: string[] | null;
5349
6551
  maxEntitiesCreatedPerRun: number | null;
5350
6552
  canCreateViews: boolean;
5351
- outputMode: "proposal" | "view" | "text";
6553
+ outputMode: "view" | "proposal" | "text";
5352
6554
  permissionsProfile: "read_only" | "propose_writes";
5353
6555
  sharedScope: "user" | "workspace";
5354
6556
  };
@@ -5364,7 +6566,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5364
6566
  allowedEntityTypes?: string[] | undefined;
5365
6567
  maxEntitiesCreatedPerRun?: number | null | undefined;
5366
6568
  canCreateViews?: boolean | undefined;
5367
- outputMode?: "proposal" | "view" | "text" | undefined;
6569
+ outputMode?: "view" | "proposal" | "text" | undefined;
5368
6570
  permissionsProfile?: "read_only" | "propose_writes" | undefined;
5369
6571
  sharedScope?: "user" | "workspace" | undefined;
5370
6572
  };
@@ -5381,7 +6583,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5381
6583
  allowedEntityTypes: string[] | null;
5382
6584
  maxEntitiesCreatedPerRun: number | null;
5383
6585
  canCreateViews: boolean;
5384
- outputMode: "proposal" | "view" | "text";
6586
+ outputMode: "view" | "proposal" | "text";
5385
6587
  permissionsProfile: "read_only" | "propose_writes";
5386
6588
  sharedScope: "user" | "workspace";
5387
6589
  createdAt: Date;
@@ -5514,6 +6716,23 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5514
6716
  };
5515
6717
  meta: object;
5516
6718
  }>;
6719
+ listAllAgents: import("@trpc/server").TRPCQueryProcedure<{
6720
+ input: void;
6721
+ output: {
6722
+ agents: {
6723
+ id: string;
6724
+ label: string;
6725
+ description?: string;
6726
+ isDefault: boolean;
6727
+ isInternal: boolean;
6728
+ toolCount: number;
6729
+ serviceId: string;
6730
+ serviceName: string;
6731
+ isSynapIS: boolean;
6732
+ }[];
6733
+ };
6734
+ meta: object;
6735
+ }>;
5517
6736
  memoryFacts: import("@trpc/server").TRPCQueryProcedure<{
5518
6737
  input: {
5519
6738
  limit?: number | undefined;
@@ -5967,7 +7186,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5967
7186
  id: string;
5968
7187
  type: string;
5969
7188
  updatedAt: Date;
7189
+ createdByUserId: string | null;
5970
7190
  createdAt: Date;
7191
+ correlationId: string | null;
5971
7192
  profileId: string | null;
5972
7193
  title: string | null;
5973
7194
  preview: string | null;
@@ -5975,6 +7196,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5975
7196
  properties: unknown;
5976
7197
  systemData: unknown;
5977
7198
  version: number;
7199
+ createdByKind: ProvenanceKind | null;
7200
+ agentUserId: string | null;
7201
+ sourceProposalId: string | null;
5978
7202
  deletedAt: Date | null;
5979
7203
  }[];
5980
7204
  };
@@ -6013,10 +7237,19 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6013
7237
  workspaceId: string | null;
6014
7238
  id: string;
6015
7239
  type: string;
7240
+ createdByUserId: string | null;
6016
7241
  createdAt: Date;
6017
7242
  metadata: unknown;
6018
- sourceEntityId: string;
6019
- targetEntityId: string;
7243
+ correlationId: string | null;
7244
+ createdByKind: ProvenanceKind | null;
7245
+ agentUserId: string | null;
7246
+ sourceProposalId: string | null;
7247
+ sourceEntityId: string | null;
7248
+ targetEntityId: string | null;
7249
+ sourceKind: RelationEndpointKind;
7250
+ targetKind: RelationEndpointKind;
7251
+ sourceCellId: string | null;
7252
+ targetCellId: string | null;
6020
7253
  }[];
6021
7254
  };
6022
7255
  meta: object;
@@ -6048,10 +7281,19 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6048
7281
  workspaceId: string | null;
6049
7282
  id: string;
6050
7283
  type: string;
7284
+ createdByUserId: string | null;
6051
7285
  createdAt: Date;
6052
7286
  metadata: unknown;
6053
- sourceEntityId: string;
6054
- targetEntityId: string;
7287
+ correlationId: string | null;
7288
+ createdByKind: ProvenanceKind | null;
7289
+ agentUserId: string | null;
7290
+ sourceProposalId: string | null;
7291
+ sourceEntityId: string | null;
7292
+ targetEntityId: string | null;
7293
+ sourceKind: RelationEndpointKind;
7294
+ targetKind: RelationEndpointKind;
7295
+ sourceCellId: string | null;
7296
+ targetCellId: string | null;
6055
7297
  }[];
6056
7298
  };
6057
7299
  meta: object;
@@ -6070,7 +7312,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6070
7312
  id: string;
6071
7313
  type: string;
6072
7314
  updatedAt: Date;
7315
+ createdByUserId: string | null;
6073
7316
  createdAt: Date;
7317
+ correlationId: string | null;
6074
7318
  profileId: string | null;
6075
7319
  title: string | null;
6076
7320
  preview: string | null;
@@ -6078,6 +7322,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6078
7322
  properties: unknown;
6079
7323
  systemData: unknown;
6080
7324
  version: number;
7325
+ createdByKind: ProvenanceKind | null;
7326
+ agentUserId: string | null;
7327
+ sourceProposalId: string | null;
6081
7328
  deletedAt: Date | null;
6082
7329
  }[];
6083
7330
  };
@@ -6128,7 +7375,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6128
7375
  id: string;
6129
7376
  type: string;
6130
7377
  updatedAt: Date;
7378
+ createdByUserId: string | null;
6131
7379
  createdAt: Date;
7380
+ correlationId: string | null;
6132
7381
  profileId: string | null;
6133
7382
  title: string | null;
6134
7383
  preview: string | null;
@@ -6136,6 +7385,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6136
7385
  properties: unknown;
6137
7386
  systemData: unknown;
6138
7387
  version: number;
7388
+ createdByKind: ProvenanceKind | null;
7389
+ agentUserId: string | null;
7390
+ sourceProposalId: string | null;
6139
7391
  deletedAt: Date | null;
6140
7392
  } | null;
6141
7393
  label: string;
@@ -6253,7 +7505,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6253
7505
  id: string;
6254
7506
  type: string;
6255
7507
  updatedAt: Date;
7508
+ createdByUserId: string | null;
6256
7509
  createdAt: Date;
7510
+ correlationId: string | null;
6257
7511
  profileId: string | null;
6258
7512
  title: string | null;
6259
7513
  preview: string | null;
@@ -6261,6 +7515,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6261
7515
  properties: unknown;
6262
7516
  systemData: unknown;
6263
7517
  version: number;
7518
+ createdByKind: ProvenanceKind | null;
7519
+ agentUserId: string | null;
7520
+ sourceProposalId: string | null;
6264
7521
  deletedAt: Date | null;
6265
7522
  };
6266
7523
  relations: never[];
@@ -6273,7 +7530,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6273
7530
  id: string;
6274
7531
  type: string;
6275
7532
  updatedAt: Date;
7533
+ createdByUserId: string | null;
6276
7534
  createdAt: Date;
7535
+ correlationId: string | null;
6277
7536
  profileId: string | null;
6278
7537
  title: string | null;
6279
7538
  preview: string | null;
@@ -6281,6 +7540,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6281
7540
  properties: unknown;
6282
7541
  systemData: unknown;
6283
7542
  version: number;
7543
+ createdByKind: ProvenanceKind | null;
7544
+ agentUserId: string | null;
7545
+ sourceProposalId: string | null;
6284
7546
  deletedAt: Date | null;
6285
7547
  };
6286
7548
  relations: {
@@ -6288,10 +7550,19 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6288
7550
  workspaceId: string | null;
6289
7551
  id: string;
6290
7552
  type: string;
7553
+ createdByUserId: string | null;
6291
7554
  createdAt: Date;
6292
7555
  metadata: unknown;
6293
- sourceEntityId: string;
6294
- targetEntityId: string;
7556
+ correlationId: string | null;
7557
+ createdByKind: ProvenanceKind | null;
7558
+ agentUserId: string | null;
7559
+ sourceProposalId: string | null;
7560
+ sourceEntityId: string | null;
7561
+ targetEntityId: string | null;
7562
+ sourceKind: RelationEndpointKind;
7563
+ targetKind: RelationEndpointKind;
7564
+ sourceCellId: string | null;
7565
+ targetCellId: string | null;
6295
7566
  }[];
6296
7567
  relatedEntities: any[];
6297
7568
  stats: {
@@ -6316,7 +7587,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6316
7587
  id: string;
6317
7588
  type: string;
6318
7589
  updatedAt: Date;
7590
+ createdByUserId: string | null;
6319
7591
  createdAt: Date;
7592
+ correlationId: string | null;
6320
7593
  profileId: string | null;
6321
7594
  title: string | null;
6322
7595
  preview: string | null;
@@ -6324,6 +7597,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6324
7597
  properties: unknown;
6325
7598
  systemData: unknown;
6326
7599
  version: number;
7600
+ createdByKind: ProvenanceKind | null;
7601
+ agentUserId: string | null;
7602
+ sourceProposalId: string | null;
6327
7603
  deletedAt: Date | null;
6328
7604
  }[];
6329
7605
  relations: {
@@ -6331,22 +7607,66 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6331
7607
  workspaceId: string | null;
6332
7608
  id: string;
6333
7609
  type: string;
7610
+ createdByUserId: string | null;
6334
7611
  createdAt: Date;
6335
7612
  metadata: unknown;
6336
- sourceEntityId: string;
6337
- targetEntityId: string;
7613
+ correlationId: string | null;
7614
+ createdByKind: ProvenanceKind | null;
7615
+ agentUserId: string | null;
7616
+ sourceProposalId: string | null;
7617
+ sourceEntityId: string | null;
7618
+ targetEntityId: string | null;
7619
+ sourceKind: RelationEndpointKind;
7620
+ targetKind: RelationEndpointKind;
7621
+ sourceCellId: string | null;
7622
+ targetCellId: string | null;
6338
7623
  }[];
6339
7624
  };
6340
7625
  meta: object;
6341
7626
  }>;
6342
- getStats: import("@trpc/server").TRPCQueryProcedure<{
7627
+ getFull: import("@trpc/server").TRPCQueryProcedure<{
6343
7628
  input: {
6344
- entityId?: string | undefined;
6345
- entityType?: string | undefined;
7629
+ profileSlug?: string | undefined;
7630
+ limit?: number | undefined;
6346
7631
  };
6347
7632
  output: {
6348
- entityId: string;
6349
- relationCount: number;
7633
+ entities: {
7634
+ workspaceId: string | null;
7635
+ id: string;
7636
+ type: string;
7637
+ title: string | null;
7638
+ preview: string | null;
7639
+ }[];
7640
+ relations: {
7641
+ userId: string;
7642
+ workspaceId: string | null;
7643
+ id: string;
7644
+ type: string;
7645
+ createdByUserId: string | null;
7646
+ createdAt: Date;
7647
+ metadata: unknown;
7648
+ correlationId: string | null;
7649
+ createdByKind: ProvenanceKind | null;
7650
+ agentUserId: string | null;
7651
+ sourceProposalId: string | null;
7652
+ sourceEntityId: string | null;
7653
+ targetEntityId: string | null;
7654
+ sourceKind: RelationEndpointKind;
7655
+ targetKind: RelationEndpointKind;
7656
+ sourceCellId: string | null;
7657
+ targetCellId: string | null;
7658
+ }[];
7659
+ };
7660
+ meta: object;
7661
+ }>;
7662
+ getStats: import("@trpc/server").TRPCQueryProcedure<{
7663
+ input: {
7664
+ entityId?: string | undefined;
7665
+ entityType?: string | undefined;
7666
+ };
7667
+ output: {
7668
+ entityId: string;
7669
+ relationCount: number;
6350
7670
  outgoing: number;
6351
7671
  incoming: number;
6352
7672
  totalEntities?: undefined;
@@ -6403,9 +7723,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6403
7723
  includeArchived?: boolean | undefined;
6404
7724
  appId?: string | undefined;
6405
7725
  } | undefined;
6406
- output: {
6407
- role: string;
6408
- joinedAt: Date;
7726
+ output: ({
6409
7727
  name: string;
6410
7728
  id: string;
6411
7729
  type: string;
@@ -6414,11 +7732,20 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6414
7732
  description: string | null;
6415
7733
  settings: WorkspaceSettings;
6416
7734
  ownerId: string;
7735
+ systemSlug: string | null;
7736
+ packageSlug: string | null;
7737
+ provisioningProposalId: string | null;
7738
+ provisioningStatus: string | null;
7739
+ workspaceType: string;
6417
7740
  subscriptionTier: string | null;
6418
7741
  subscriptionStatus: string | null;
6419
7742
  stripeCustomerId: string | null;
6420
7743
  archivedAt: Date | null;
6421
- }[];
7744
+ } & {
7745
+ role?: string;
7746
+ joinedAt?: Date;
7747
+ accessKind?: "member" | "pod_visible";
7748
+ })[];
6422
7749
  meta: object;
6423
7750
  }>;
6424
7751
  get: import("@trpc/server").TRPCQueryProcedure<{
@@ -6427,6 +7754,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6427
7754
  };
6428
7755
  output: {
6429
7756
  role: string;
7757
+ accessKind: string;
6430
7758
  name: string;
6431
7759
  id: string;
6432
7760
  type: string;
@@ -6435,6 +7763,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6435
7763
  description: string | null;
6436
7764
  settings: WorkspaceSettings;
6437
7765
  ownerId: string;
7766
+ systemSlug: string | null;
7767
+ packageSlug: string | null;
7768
+ provisioningProposalId: string | null;
7769
+ provisioningStatus: string | null;
7770
+ workspaceType: string;
6438
7771
  subscriptionTier: string | null;
6439
7772
  subscriptionStatus: string | null;
6440
7773
  stripeCustomerId: string | null;
@@ -6503,6 +7836,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6503
7836
  description: string | null;
6504
7837
  type: string;
6505
7838
  settings: WorkspaceSettings;
7839
+ systemSlug: string | null;
7840
+ packageSlug: string | null;
7841
+ provisioningProposalId: string | null;
7842
+ provisioningStatus: string | null;
7843
+ workspaceType: string;
6506
7844
  subscriptionTier: string | null;
6507
7845
  subscriptionStatus: string | null;
6508
7846
  stripeCustomerId: string | null;
@@ -6527,6 +7865,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6527
7865
  description: string | null;
6528
7866
  settings: WorkspaceSettings;
6529
7867
  ownerId: string;
7868
+ systemSlug: string | null;
7869
+ packageSlug: string | null;
7870
+ provisioningProposalId: string | null;
7871
+ provisioningStatus: string | null;
7872
+ workspaceType: string;
6530
7873
  subscriptionTier: string | null;
6531
7874
  subscriptionStatus: string | null;
6532
7875
  stripeCustomerId: string | null;
@@ -6546,6 +7889,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6546
7889
  description: string | null;
6547
7890
  settings: WorkspaceSettings;
6548
7891
  ownerId: string;
7892
+ systemSlug: string | null;
7893
+ packageSlug: string | null;
7894
+ provisioningProposalId: string | null;
7895
+ provisioningStatus: string | null;
7896
+ workspaceType: string;
6549
7897
  subscriptionTier: string | null;
6550
7898
  subscriptionStatus: string | null;
6551
7899
  stripeCustomerId: string | null;
@@ -6561,6 +7909,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6561
7909
  output: {
6562
7910
  status: "deleted";
6563
7911
  message: string;
7912
+ purged: {
7913
+ entities: number;
7914
+ documents: number;
7915
+ relations: number;
7916
+ proposals: number;
7917
+ blobs: number;
7918
+ };
6564
7919
  };
6565
7920
  meta: object;
6566
7921
  }>;
@@ -6605,6 +7960,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6605
7960
  locale: string;
6606
7961
  userType: string;
6607
7962
  agentMetadata: AgentMetadata | null;
7963
+ createdByUserId: string | null;
7964
+ isPersonalAgent: boolean;
7965
+ agentTemplate: string | null;
7966
+ agentType: string | null;
7967
+ parentAgentId: string | null;
6608
7968
  kratosIdentityId: string | null;
6609
7969
  lastSyncedAt: Date | null;
6610
7970
  createdAt: Date;
@@ -6908,6 +8268,17 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6908
8268
  profileEntityBentoTemplates?: Record<string, {
6909
8269
  blocks: Record<string, unknown>[];
6910
8270
  }> | undefined;
8271
+ workspacePurpose?: "personal" | "agent" | "project" | "library" | "operational" | undefined;
8272
+ workspaceSubtype?: string | undefined;
8273
+ workspaceVisibility?: "members" | "private" | "pod_visible" | "pod_joinable" | "public_link" | undefined;
8274
+ workspaceCapabilities?: string[] | undefined;
8275
+ sourceRoles?: Record<string, "provider" | "consumer" | "provider-consumer"> | undefined;
8276
+ defaultSources?: Record<string, {
8277
+ workspaceId: string;
8278
+ capability?: string | undefined;
8279
+ profileSlug?: string | undefined;
8280
+ label?: string | undefined;
8281
+ }> | undefined;
6911
8282
  entityLinks?: {
6912
8283
  sourceProfileSlug: string;
6913
8284
  targetProfileSlug: string;
@@ -6920,7 +8291,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6920
8291
  templateId?: string | undefined;
6921
8292
  templateName?: string | undefined;
6922
8293
  workspaceName?: string | undefined;
6923
- workspaceType?: "personal" | "project" | "agent" | "operational" | undefined;
8294
+ workspaceType?: "personal" | "agent" | "project" | "operational" | undefined;
6924
8295
  linkedAgentId?: string | undefined;
6925
8296
  workspaceId?: string | undefined;
6926
8297
  proposalId?: string | undefined;
@@ -7142,7 +8513,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7142
8513
  layoutConfig?: Record<string, unknown> | undefined;
7143
8514
  profileEntityBentoTemplates?: Record<string, unknown> | undefined;
7144
8515
  };
7145
- mode?: "update" | "create" | undefined;
8516
+ mode?: "create" | "update" | undefined;
7146
8517
  workspaceId?: string | undefined;
7147
8518
  proposalId?: string | undefined;
7148
8519
  appId?: string | undefined;
@@ -7164,6 +8535,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7164
8535
  };
7165
8536
  meta: object;
7166
8537
  }>;
8538
+ resetEntities: import("@trpc/server").TRPCMutationProcedure<{
8539
+ input: {
8540
+ workspaceId: string;
8541
+ };
8542
+ output: {
8543
+ deletedCount: number;
8544
+ };
8545
+ meta: object;
8546
+ }>;
7167
8547
  }>>;
7168
8548
  views: import("@trpc/server").TRPCBuiltRouter<{
7169
8549
  ctx: Context;
@@ -7244,7 +8624,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7244
8624
  limit?: number | undefined;
7245
8625
  offset?: number | undefined;
7246
8626
  workspaceIds?: string[] | undefined;
7247
- type?: "calendar" | "table" | "whiteboard" | "list" | "all" | "graph" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap" | undefined;
8627
+ type?: "calendar" | "table" | "whiteboard" | "list" | "graph" | "all" | "timeline" | "kanban" | "grid" | "gallery" | "gantt" | "mindmap" | undefined;
7248
8628
  excludeAutoCreated?: boolean | undefined;
7249
8629
  };
7250
8630
  output: PaginatedResponse<{
@@ -7423,6 +8803,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7423
8803
  properties: unknown;
7424
8804
  systemData: unknown;
7425
8805
  version: number;
8806
+ createdByKind: ProvenanceKind | null;
8807
+ createdByUserId: string | null;
8808
+ agentUserId: string | null;
8809
+ sourceProposalId: string | null;
8810
+ correlationId: string | null;
7426
8811
  createdAt: Date;
7427
8812
  updatedAt: Date;
7428
8813
  deletedAt: Date | null;
@@ -7431,10 +8816,19 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7431
8816
  id: string;
7432
8817
  userId: string;
7433
8818
  workspaceId: string | null;
7434
- sourceEntityId: string;
7435
- targetEntityId: string;
8819
+ sourceEntityId: string | null;
8820
+ targetEntityId: string | null;
8821
+ sourceKind: RelationEndpointKind;
8822
+ targetKind: RelationEndpointKind;
8823
+ sourceCellId: string | null;
8824
+ targetCellId: string | null;
7436
8825
  type: string;
7437
8826
  metadata: unknown;
8827
+ createdByKind: ProvenanceKind | null;
8828
+ createdByUserId: string | null;
8829
+ agentUserId: string | null;
8830
+ sourceProposalId: string | null;
8831
+ correlationId: string | null;
7438
8832
  createdAt: Date;
7439
8833
  }[];
7440
8834
  columns: ViewColumn[];
@@ -7472,6 +8866,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7472
8866
  embeddedViewIds?: string[] | undefined;
7473
8867
  schemaSnapshot?: Record<string, any> | undefined;
7474
8868
  snapshotUpdatedAt?: Date | undefined;
8869
+ metadata?: Record<string, any> | undefined;
7475
8870
  type?: string | undefined;
7476
8871
  };
7477
8872
  output: {
@@ -7831,7 +9226,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7831
9226
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
7832
9227
  createPublicLink: import("@trpc/server").TRPCMutationProcedure<{
7833
9228
  input: {
7834
- resourceType: "view" | "entity" | "document";
9229
+ resourceType: "entity" | "document" | "view";
7835
9230
  resourceId: string;
7836
9231
  expiresInDays?: number | undefined;
7837
9232
  access?: "workspace_only" | "anyone_with_link" | undefined;
@@ -7846,7 +9241,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7846
9241
  }>;
7847
9242
  invite: import("@trpc/server").TRPCMutationProcedure<{
7848
9243
  input: {
7849
- resourceType: "view" | "entity" | "document";
9244
+ resourceType: "entity" | "document" | "view";
7850
9245
  resourceId: string;
7851
9246
  userEmail: string;
7852
9247
  };
@@ -7877,7 +9272,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7877
9272
  id: string;
7878
9273
  type: string;
7879
9274
  updatedAt: Date;
9275
+ createdByUserId: string | null;
7880
9276
  createdAt: Date;
9277
+ correlationId: string | null;
7881
9278
  profileId: string | null;
7882
9279
  title: string | null;
7883
9280
  preview: string | null;
@@ -7885,6 +9282,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7885
9282
  properties: unknown;
7886
9283
  systemData: unknown;
7887
9284
  version: number;
9285
+ createdByKind: ProvenanceKind | null;
9286
+ agentUserId: string | null;
9287
+ sourceProposalId: string | null;
7888
9288
  deletedAt: Date | null;
7889
9289
  } | {
7890
9290
  name: string;
@@ -7927,6 +9327,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7927
9327
  id: string;
7928
9328
  updatedAt: Date;
7929
9329
  createdAt: Date;
9330
+ lastAccessedAt: Date | null;
7930
9331
  expiresAt: Date | null;
7931
9332
  createdBy: string;
7932
9333
  revokedAt: Date | null;
@@ -7940,7 +9341,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7940
9341
  access: string | null;
7941
9342
  invitedUsers: string[] | null;
7942
9343
  viewCount: number | null;
7943
- lastAccessedAt: Date | null;
7944
9344
  }[];
7945
9345
  resourceLabels: Record<string, string>;
7946
9346
  };
@@ -7948,15 +9348,16 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7948
9348
  }>;
7949
9349
  list: import("@trpc/server").TRPCQueryProcedure<{
7950
9350
  input: {
7951
- resourceType: "view" | "entity" | "document";
9351
+ resourceType: "entity" | "document" | "view";
7952
9352
  resourceId: string;
7953
- visibility?: "public" | "private" | undefined;
9353
+ visibility?: "private" | "public" | undefined;
7954
9354
  expiresAt?: Date | undefined;
7955
9355
  };
7956
9356
  output: {
7957
9357
  id: string;
7958
9358
  updatedAt: Date;
7959
9359
  createdAt: Date;
9360
+ lastAccessedAt: Date | null;
7960
9361
  expiresAt: Date | null;
7961
9362
  createdBy: string;
7962
9363
  revokedAt: Date | null;
@@ -7970,7 +9371,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7970
9371
  access: string | null;
7971
9372
  invitedUsers: string[] | null;
7972
9373
  viewCount: number | null;
7973
- lastAccessedAt: Date | null;
7974
9374
  }[];
7975
9375
  meta: object;
7976
9376
  }>;
@@ -8349,7 +9749,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8349
9749
  createdAt: Date;
8350
9750
  documentId: string;
8351
9751
  version: number;
9752
+ storageUrl: string | null;
9753
+ storageKey: string | null;
9754
+ size: number;
9755
+ mimeType: string | null;
8352
9756
  content: string;
9757
+ checksum: string | null;
8353
9758
  author: string;
8354
9759
  authorId: string;
8355
9760
  }[];
@@ -8382,7 +9787,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8382
9787
  createdAt: Date;
8383
9788
  documentId: string;
8384
9789
  version: number;
9790
+ storageUrl: string | null;
9791
+ storageKey: string | null;
9792
+ size: number;
9793
+ mimeType: string | null;
8385
9794
  content: string;
9795
+ checksum: string | null;
8386
9796
  author: string;
8387
9797
  authorId: string;
8388
9798
  };
@@ -8391,6 +9801,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8391
9801
  message: string | null;
8392
9802
  author: string;
8393
9803
  createdAt: Date;
9804
+ hasStoredSnapshot: boolean;
8394
9805
  };
8395
9806
  };
8396
9807
  meta: object;
@@ -8531,7 +9942,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8531
9942
  createTrigger: import("@trpc/server").TRPCMutationProcedure<{
8532
9943
  input: {
8533
9944
  skillId: string;
8534
- type: "cron" | "manual" | "entity_event";
9945
+ type: "entity_event" | "cron" | "manual";
8535
9946
  eventPattern?: string | undefined;
8536
9947
  filters?: Record<string, unknown> | undefined;
8537
9948
  cronExpression?: string | undefined;
@@ -8541,7 +9952,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8541
9952
  userId: string;
8542
9953
  workspaceId: string | null;
8543
9954
  id: string;
8544
- type: "cron" | "manual" | "entity_event";
9955
+ type: "entity_event" | "cron" | "manual";
8545
9956
  updatedAt: Date;
8546
9957
  createdAt: Date;
8547
9958
  isActive: boolean;
@@ -8563,7 +9974,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8563
9974
  skillId: string;
8564
9975
  workspaceId: string | null;
8565
9976
  userId: string;
8566
- type: "cron" | "manual" | "entity_event";
9977
+ type: "entity_event" | "cron" | "manual";
8567
9978
  eventPattern: string | null;
8568
9979
  filters: Record<string, unknown> | null;
8569
9980
  cronExpression: string | null;
@@ -8585,7 +9996,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8585
9996
  skillId: string;
8586
9997
  workspaceId: string | null;
8587
9998
  userId: string;
8588
- type: "cron" | "manual" | "entity_event";
9999
+ type: "entity_event" | "cron" | "manual";
8589
10000
  eventPattern: string | null;
8590
10001
  filters: Record<string, unknown> | null;
8591
10002
  cronExpression: string | null;
@@ -8762,10 +10173,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8762
10173
  id: string;
8763
10174
  createdAt: Date;
8764
10175
  metadata: unknown;
10176
+ messageId: string;
8765
10177
  relationshipType: string;
8766
10178
  targetType: string;
8767
10179
  targetId: string;
8768
- messageId: string;
8769
10180
  position: unknown;
8770
10181
  };
8771
10182
  meta: object;
@@ -8789,10 +10200,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8789
10200
  id: string;
8790
10201
  createdAt: Date;
8791
10202
  metadata: unknown;
10203
+ messageId: string;
8792
10204
  relationshipType: string;
8793
10205
  targetType: string;
8794
10206
  targetId: string;
8795
- messageId: string;
8796
10207
  position: unknown;
8797
10208
  }[];
8798
10209
  meta: object;
@@ -8808,10 +10219,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8808
10219
  id: string;
8809
10220
  createdAt: Date;
8810
10221
  metadata: unknown;
10222
+ messageId: string;
8811
10223
  relationshipType: string;
8812
10224
  targetType: string;
8813
10225
  targetId: string;
8814
- messageId: string;
8815
10226
  position: unknown;
8816
10227
  }[];
8817
10228
  meta: object;
@@ -8826,10 +10237,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8826
10237
  id: string;
8827
10238
  createdAt: Date;
8828
10239
  metadata: unknown;
10240
+ messageId: string;
8829
10241
  relationshipType: string;
8830
10242
  targetType: string;
8831
10243
  targetId: string;
8832
- messageId: string;
8833
10244
  position: unknown;
8834
10245
  }[];
8835
10246
  meta: object;
@@ -8847,10 +10258,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8847
10258
  id: string;
8848
10259
  createdAt: Date;
8849
10260
  metadata: unknown;
10261
+ messageId: string;
8850
10262
  relationshipType: string;
8851
10263
  targetType: string;
8852
10264
  targetId: string;
8853
- messageId: string;
8854
10265
  position: unknown;
8855
10266
  }[];
8856
10267
  meta: object;
@@ -8901,6 +10312,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8901
10312
  defaultValues: unknown;
8902
10313
  semanticSlug: string | null;
8903
10314
  entityScope: "pod" | "workspace";
10315
+ defaultListRenderer: unknown;
10316
+ defaultDetailRenderer: unknown;
10317
+ defaultDashboardRenderer: unknown;
10318
+ defaultRenderers: Record<string, unknown>;
8904
10319
  }[];
8905
10320
  };
8906
10321
  meta: object;
@@ -8926,6 +10341,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8926
10341
  defaultValues: unknown;
8927
10342
  semanticSlug: string | null;
8928
10343
  entityScope: "pod" | "workspace";
10344
+ defaultListRenderer: unknown;
10345
+ defaultDetailRenderer: unknown;
10346
+ defaultDashboardRenderer: unknown;
10347
+ defaultRenderers: Record<string, unknown>;
8929
10348
  };
8930
10349
  effectiveProperties: EffectiveProperty[];
8931
10350
  };
@@ -8962,6 +10381,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8962
10381
  defaultValues: unknown;
8963
10382
  semanticSlug: string | null;
8964
10383
  entityScope: "pod" | "workspace";
10384
+ defaultListRenderer: unknown;
10385
+ defaultDetailRenderer: unknown;
10386
+ defaultDashboardRenderer: unknown;
10387
+ defaultRenderers: Record<string, unknown>;
8965
10388
  };
8966
10389
  existing: boolean;
8967
10390
  status?: undefined;
@@ -8990,6 +10413,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8990
10413
  defaultValues: unknown;
8991
10414
  semanticSlug: string | null;
8992
10415
  entityScope: "pod" | "workspace";
10416
+ defaultListRenderer: unknown;
10417
+ defaultDetailRenderer: unknown;
10418
+ defaultDashboardRenderer: unknown;
10419
+ defaultRenderers: Record<string, unknown>;
8993
10420
  };
8994
10421
  existing?: undefined;
8995
10422
  status?: undefined;
@@ -9008,6 +10435,111 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9008
10435
  scope?: "user" | "shared" | "system" | "workspace" | undefined;
9009
10436
  allowedWorkspaceIds?: string[] | undefined;
9010
10437
  entityScope?: "pod" | "workspace" | undefined;
10438
+ defaultListRenderer?: {
10439
+ kind: "cell";
10440
+ cellKey: string;
10441
+ props: Record<string, unknown>;
10442
+ title?: string | undefined;
10443
+ displayMode?: string | undefined;
10444
+ rendererHint?: Record<string, unknown> | undefined;
10445
+ } | {
10446
+ kind: "view";
10447
+ viewId: string;
10448
+ title?: string | undefined;
10449
+ displayMode?: string | undefined;
10450
+ } | {
10451
+ kind: "iframe-srcdoc";
10452
+ appId: string;
10453
+ srcdoc: string;
10454
+ title?: string | undefined;
10455
+ props?: Record<string, unknown> | undefined;
10456
+ } | {
10457
+ kind: "external-app";
10458
+ appId: string;
10459
+ url: string;
10460
+ title?: string | undefined;
10461
+ props?: Record<string, unknown> | undefined;
10462
+ } | {
10463
+ kind: "url";
10464
+ url: string;
10465
+ external?: boolean | undefined;
10466
+ title?: string | undefined;
10467
+ } | {
10468
+ kind: "view-adapter";
10469
+ adapterKey: string;
10470
+ props?: Record<string, unknown> | undefined;
10471
+ title?: string | undefined;
10472
+ } | null | undefined;
10473
+ defaultDetailRenderer?: {
10474
+ kind: "cell";
10475
+ cellKey: string;
10476
+ props: Record<string, unknown>;
10477
+ title?: string | undefined;
10478
+ displayMode?: string | undefined;
10479
+ rendererHint?: Record<string, unknown> | undefined;
10480
+ } | {
10481
+ kind: "view";
10482
+ viewId: string;
10483
+ title?: string | undefined;
10484
+ displayMode?: string | undefined;
10485
+ } | {
10486
+ kind: "iframe-srcdoc";
10487
+ appId: string;
10488
+ srcdoc: string;
10489
+ title?: string | undefined;
10490
+ props?: Record<string, unknown> | undefined;
10491
+ } | {
10492
+ kind: "external-app";
10493
+ appId: string;
10494
+ url: string;
10495
+ title?: string | undefined;
10496
+ props?: Record<string, unknown> | undefined;
10497
+ } | {
10498
+ kind: "url";
10499
+ url: string;
10500
+ external?: boolean | undefined;
10501
+ title?: string | undefined;
10502
+ } | {
10503
+ kind: "view-adapter";
10504
+ adapterKey: string;
10505
+ props?: Record<string, unknown> | undefined;
10506
+ title?: string | undefined;
10507
+ } | null | undefined;
10508
+ defaultDashboardRenderer?: {
10509
+ kind: "cell";
10510
+ cellKey: string;
10511
+ props: Record<string, unknown>;
10512
+ title?: string | undefined;
10513
+ displayMode?: string | undefined;
10514
+ rendererHint?: Record<string, unknown> | undefined;
10515
+ } | {
10516
+ kind: "view";
10517
+ viewId: string;
10518
+ title?: string | undefined;
10519
+ displayMode?: string | undefined;
10520
+ } | {
10521
+ kind: "iframe-srcdoc";
10522
+ appId: string;
10523
+ srcdoc: string;
10524
+ title?: string | undefined;
10525
+ props?: Record<string, unknown> | undefined;
10526
+ } | {
10527
+ kind: "external-app";
10528
+ appId: string;
10529
+ url: string;
10530
+ title?: string | undefined;
10531
+ props?: Record<string, unknown> | undefined;
10532
+ } | {
10533
+ kind: "url";
10534
+ url: string;
10535
+ external?: boolean | undefined;
10536
+ title?: string | undefined;
10537
+ } | {
10538
+ kind: "view-adapter";
10539
+ adapterKey: string;
10540
+ props?: Record<string, unknown> | undefined;
10541
+ title?: string | undefined;
10542
+ } | null | undefined;
9011
10543
  };
9012
10544
  output: {
9013
10545
  profile: {
@@ -9026,6 +10558,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9026
10558
  defaultValues: unknown;
9027
10559
  semanticSlug: string | null;
9028
10560
  entityScope: "pod" | "workspace";
10561
+ defaultListRenderer: unknown;
10562
+ defaultDetailRenderer: unknown;
10563
+ defaultDashboardRenderer: unknown;
10564
+ defaultRenderers: Record<string, unknown>;
9029
10565
  };
9030
10566
  };
9031
10567
  meta: object;
@@ -9069,6 +10605,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9069
10605
  defaultValues: unknown;
9070
10606
  semanticSlug: string | null;
9071
10607
  entityScope: "pod" | "workspace";
10608
+ defaultListRenderer: unknown;
10609
+ defaultDetailRenderer: unknown;
10610
+ defaultDashboardRenderer: unknown;
10611
+ defaultRenderers: Record<string, unknown>;
9072
10612
  }[];
9073
10613
  };
9074
10614
  meta: object;
@@ -9104,6 +10644,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9104
10644
  defaultValues: unknown;
9105
10645
  semanticSlug: string | null;
9106
10646
  entityScope: "pod" | "workspace";
10647
+ defaultListRenderer: unknown;
10648
+ defaultDetailRenderer: unknown;
10649
+ defaultDashboardRenderer: unknown;
10650
+ defaultRenderers: Record<string, unknown>;
9107
10651
  }[];
9108
10652
  };
9109
10653
  meta: object;
@@ -9130,6 +10674,10 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9130
10674
  defaultValues: unknown;
9131
10675
  semanticSlug: string | null;
9132
10676
  entityScope: "pod" | "workspace";
10677
+ defaultListRenderer: unknown;
10678
+ defaultDetailRenderer: unknown;
10679
+ defaultDashboardRenderer: unknown;
10680
+ defaultRenderers: Record<string, unknown>;
9133
10681
  }[];
9134
10682
  };
9135
10683
  meta: object;
@@ -9154,6 +10702,89 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9154
10702
  };
9155
10703
  meta: object;
9156
10704
  }>;
10705
+ getEffectiveRenderers: import("@trpc/server").TRPCQueryProcedure<{
10706
+ input: {
10707
+ profileSlug: string;
10708
+ contentKind?: "entity-detail" | "entity-profile" | "collection" | undefined;
10709
+ };
10710
+ output: {
10711
+ "entity-detail": RendererRef | null;
10712
+ "entity-profile": RendererRef | null;
10713
+ collection: RendererRef | null;
10714
+ };
10715
+ meta: object;
10716
+ }>;
10717
+ setProfileRendererOverride: import("@trpc/server").TRPCMutationProcedure<{
10718
+ input: {
10719
+ profileSlug: string;
10720
+ contentKind: "entity-detail" | "entity-profile" | "collection";
10721
+ ref: {
10722
+ kind: "cell";
10723
+ cellKey: string;
10724
+ props: Record<string, unknown>;
10725
+ title?: string | undefined;
10726
+ displayMode?: string | undefined;
10727
+ rendererHint?: Record<string, unknown> | undefined;
10728
+ } | {
10729
+ kind: "view";
10730
+ viewId: string;
10731
+ title?: string | undefined;
10732
+ displayMode?: string | undefined;
10733
+ } | {
10734
+ kind: "iframe-srcdoc";
10735
+ appId: string;
10736
+ srcdoc: string;
10737
+ title?: string | undefined;
10738
+ props?: Record<string, unknown> | undefined;
10739
+ } | {
10740
+ kind: "external-app";
10741
+ appId: string;
10742
+ url: string;
10743
+ title?: string | undefined;
10744
+ props?: Record<string, unknown> | undefined;
10745
+ } | {
10746
+ kind: "url";
10747
+ url: string;
10748
+ external?: boolean | undefined;
10749
+ title?: string | undefined;
10750
+ } | {
10751
+ kind: "view-adapter";
10752
+ adapterKey: string;
10753
+ props?: Record<string, unknown> | undefined;
10754
+ title?: string | undefined;
10755
+ } | null;
10756
+ };
10757
+ output: {
10758
+ success: boolean;
10759
+ };
10760
+ meta: object;
10761
+ }>;
10762
+ resolveDashboard: import("@trpc/server").TRPCMutationProcedure<{
10763
+ input: {
10764
+ profileSlug: string;
10765
+ };
10766
+ output: {
10767
+ viewId: string;
10768
+ config: unknown;
10769
+ userAuthored: boolean;
10770
+ } | {
10771
+ viewId: null;
10772
+ config: null;
10773
+ userAuthored: boolean;
10774
+ };
10775
+ meta: object;
10776
+ }>;
10777
+ saveDashboard: import("@trpc/server").TRPCMutationProcedure<{
10778
+ input: {
10779
+ profileSlug: string;
10780
+ config: Record<string, any>;
10781
+ };
10782
+ output: {
10783
+ viewId: string;
10784
+ config: unknown;
10785
+ };
10786
+ meta: object;
10787
+ }>;
9157
10788
  }>>;
9158
10789
  propertyDefs: import("@trpc/server").TRPCBuiltRouter<{
9159
10790
  ctx: Context;
@@ -9523,11 +11154,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9523
11154
  create: import("@trpc/server").TRPCMutationProcedure<{
9524
11155
  input: {
9525
11156
  workspaceId: string;
9526
- agentType: string;
9527
11157
  name: string;
9528
- role: "admin" | "editor" | "viewer";
11158
+ agentType?: string | undefined;
11159
+ role?: "admin" | "editor" | "viewer" | undefined;
9529
11160
  description?: string | undefined;
9530
11161
  capabilities?: string[] | undefined;
11162
+ template?: "custom" | "assistant" | "twin" | undefined;
9531
11163
  };
9532
11164
  output: {
9533
11165
  id: `${string}-${string}-${string}-${string}-${string}`;
@@ -9535,6 +11167,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9535
11167
  name: string;
9536
11168
  agentType: string;
9537
11169
  role: "admin" | "editor" | "viewer";
11170
+ template: "custom" | "assistant" | "twin" | undefined;
9538
11171
  };
9539
11172
  meta: object;
9540
11173
  }>;
@@ -9542,6 +11175,18 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9542
11175
  input: {
9543
11176
  workspaceId: string;
9544
11177
  };
11178
+ output: {
11179
+ role: string | null;
11180
+ joinedAt: Date | null;
11181
+ id: string;
11182
+ name: string | null;
11183
+ email: string;
11184
+ agentMetadata: AgentMetadata | null;
11185
+ }[];
11186
+ meta: object;
11187
+ }>;
11188
+ listAll: import("@trpc/server").TRPCQueryProcedure<{
11189
+ input: void;
9545
11190
  output: {
9546
11191
  id: string;
9547
11192
  name: string | null;
@@ -9560,9 +11205,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9560
11205
  role?: "admin" | "editor" | "viewer" | undefined;
9561
11206
  description?: string | undefined;
9562
11207
  capabilities?: string[] | undefined;
11208
+ writesRequireProposal?: boolean | undefined;
9563
11209
  };
9564
11210
  output: {
11211
+ status: "proposed";
11212
+ proposalId: string;
11213
+ } | {
9565
11214
  status: "updated";
11215
+ proposalId?: undefined;
9566
11216
  };
9567
11217
  meta: object;
9568
11218
  }>;
@@ -9797,8 +11447,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9797
11447
  workspaceId: string | null;
9798
11448
  id: string;
9799
11449
  updatedAt: Date;
9800
- createdAt: Date;
9801
11450
  agentType: string;
11451
+ createdAt: Date;
9802
11452
  promptAppend: string | null;
9803
11453
  extraToolIds: string[];
9804
11454
  disabledToolIds: string[];
@@ -9818,8 +11468,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9818
11468
  workspaceId: string | null;
9819
11469
  id: string;
9820
11470
  updatedAt: Date;
9821
- createdAt: Date;
9822
11471
  agentType: string;
11472
+ createdAt: Date;
9823
11473
  promptAppend: string | null;
9824
11474
  extraToolIds: string[];
9825
11475
  disabledToolIds: string[];
@@ -9845,8 +11495,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9845
11495
  workspaceId: string | null;
9846
11496
  id: string;
9847
11497
  updatedAt: Date;
9848
- createdAt: Date;
9849
11498
  agentType: string;
11499
+ createdAt: Date;
9850
11500
  promptAppend: string | null;
9851
11501
  extraToolIds: string[];
9852
11502
  disabledToolIds: string[];
@@ -10024,6 +11674,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10024
11674
  createdAt: Date;
10025
11675
  version: string | null;
10026
11676
  isActive: boolean;
11677
+ role: WidgetRole;
10027
11678
  description: string | null;
10028
11679
  icon: string | null;
10029
11680
  category: string | null;
@@ -10041,6 +11692,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10041
11692
  w: number;
10042
11693
  h: number;
10043
11694
  } | null;
11695
+ deps: Record<string, string> | null;
11696
+ trustLevel: WidgetTrustLevel;
11697
+ contentKind: ContentKind;
10044
11698
  }[];
10045
11699
  meta: object;
10046
11700
  }>;
@@ -10057,6 +11711,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10057
11711
  createdAt: Date;
10058
11712
  version: string | null;
10059
11713
  isActive: boolean;
11714
+ role: WidgetRole;
10060
11715
  description: string | null;
10061
11716
  icon: string | null;
10062
11717
  category: string | null;
@@ -10074,9 +11729,24 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10074
11729
  w: number;
10075
11730
  h: number;
10076
11731
  } | null;
11732
+ deps: Record<string, string> | null;
11733
+ trustLevel: WidgetTrustLevel;
11734
+ contentKind: ContentKind;
10077
11735
  } | null;
10078
11736
  meta: object;
10079
11737
  }>;
11738
+ generateSource: import("@trpc/server").TRPCMutationProcedure<{
11739
+ input: {
11740
+ description: string;
11741
+ language?: "module" | "react" | undefined;
11742
+ existingCode?: string | undefined;
11743
+ };
11744
+ output: {
11745
+ source: string;
11746
+ language: "module" | "react";
11747
+ };
11748
+ meta: object;
11749
+ }>;
10080
11750
  upsert: import("@trpc/server").TRPCMutationProcedure<{
10081
11751
  input: {
10082
11752
  typeKey: string;
@@ -10084,9 +11754,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10084
11754
  description?: string | undefined;
10085
11755
  icon?: string | undefined;
10086
11756
  category?: string | undefined;
10087
- rendererType?: "builtin" | "iframe" | "native" | undefined;
11757
+ rendererType?: "builtin" | "iframe" | "native" | "frame" | undefined;
11758
+ contentKind?: "widget" | "entity-detail" | "entity-profile" | "collection" | undefined;
10088
11759
  rendererSource?: string | undefined;
10089
11760
  source?: string | undefined;
11761
+ deps?: Record<string, string> | undefined;
10090
11762
  configSchema?: Record<string, unknown> | undefined;
10091
11763
  defaultConfig?: Record<string, unknown> | undefined;
10092
11764
  defaultSize?: {
@@ -10107,6 +11779,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10107
11779
  createdAt: Date;
10108
11780
  version: string | null;
10109
11781
  isActive: boolean;
11782
+ role: WidgetRole;
10110
11783
  description: string | null;
10111
11784
  icon: string | null;
10112
11785
  category: string | null;
@@ -10124,6 +11797,9 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10124
11797
  w: number;
10125
11798
  h: number;
10126
11799
  } | null;
11800
+ deps: Record<string, string> | null;
11801
+ trustLevel: WidgetTrustLevel;
11802
+ contentKind: ContentKind;
10127
11803
  };
10128
11804
  meta: object;
10129
11805
  }>;
@@ -10137,7 +11813,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10137
11813
  meta: object;
10138
11814
  }>;
10139
11815
  }>>;
10140
- channelGateway: import("@trpc/server").TRPCBuiltRouter<{
11816
+ cells: import("@trpc/server").TRPCBuiltRouter<{
10141
11817
  ctx: Context;
10142
11818
  meta: object;
10143
11819
  errorShape: {
@@ -10147,42 +11823,38 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10147
11823
  };
10148
11824
  transformer: true;
10149
11825
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
10150
- initLink: import("@trpc/server").TRPCMutationProcedure<{
11826
+ install: import("@trpc/server").TRPCMutationProcedure<{
10151
11827
  input: {
10152
- channel: "telegram" | "whatsapp" | "discord";
10153
- defaultChannelId?: string | undefined;
11828
+ packageSlug: string;
11829
+ cellKey: string;
10154
11830
  };
10155
11831
  output: {
10156
- token: string;
10157
- expiresAt: Date;
10158
- instruction: string;
11832
+ success: boolean;
11833
+ typeKey: string;
10159
11834
  };
10160
11835
  meta: object;
10161
11836
  }>;
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<{
11837
+ uninstall: import("@trpc/server").TRPCMutationProcedure<{
10176
11838
  input: {
10177
- connectionId: string;
11839
+ typeKey: string;
10178
11840
  };
10179
11841
  output: {
10180
- ok: boolean;
11842
+ success: boolean;
10181
11843
  };
10182
11844
  meta: object;
10183
11845
  }>;
11846
+ listInstalled: import("@trpc/server").TRPCQueryProcedure<{
11847
+ input: void;
11848
+ output: {
11849
+ typeKey: string;
11850
+ name: string;
11851
+ deps: Record<string, string>;
11852
+ rendererSource: string;
11853
+ }[];
11854
+ meta: object;
11855
+ }>;
10184
11856
  }>>;
10185
- import: import("@trpc/server").TRPCBuiltRouter<{
11857
+ cellInstances: import("@trpc/server").TRPCBuiltRouter<{
10186
11858
  ctx: Context;
10187
11859
  meta: object;
10188
11860
  errorShape: {
@@ -10192,27 +11864,229 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10192
11864
  };
10193
11865
  transformer: true;
10194
11866
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
10195
- submitBatch: import("@trpc/server").TRPCMutationProcedure<{
11867
+ create: import("@trpc/server").TRPCMutationProcedure<{
10196
11868
  input: {
10197
- items: {
10198
- path: string;
10199
- contentBase64: string;
10200
- mimeType?: string | undefined;
10201
- }[];
11869
+ cellType: string;
11870
+ config?: Record<string, unknown> | undefined;
11871
+ name?: string | undefined;
11872
+ isTemplate?: boolean | undefined;
11873
+ sourceDocumentId?: string | undefined;
10202
11874
  workspaceId?: string | undefined;
10203
11875
  };
10204
11876
  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}`;
11877
+ id: string;
11878
+ workspaceId: string;
11879
+ userId: string;
11880
+ cellType: string;
11881
+ config: Record<string, unknown>;
11882
+ name: string | null;
11883
+ isTemplate: boolean;
11884
+ sourceDocumentId: string | null;
11885
+ createdByKind: CellInstanceCreatedByKind;
11886
+ trustLevel: CellInstanceTrustLevel;
11887
+ createdAt: Date;
11888
+ updatedAt: Date;
11889
+ };
11890
+ meta: object;
11891
+ }>;
11892
+ createHtmlCell: import("@trpc/server").TRPCMutationProcedure<{
11893
+ input: {
11894
+ html: string;
11895
+ name?: string | undefined;
11896
+ workspaceId?: string | undefined;
11897
+ };
11898
+ output: {
11899
+ id: string;
11900
+ workspaceId: string;
11901
+ userId: string;
11902
+ cellType: string;
11903
+ config: Record<string, unknown>;
11904
+ name: string | null;
11905
+ isTemplate: boolean;
11906
+ sourceDocumentId: string | null;
11907
+ createdByKind: CellInstanceCreatedByKind;
11908
+ trustLevel: CellInstanceTrustLevel;
11909
+ createdAt: Date;
11910
+ updatedAt: Date;
11911
+ };
11912
+ meta: object;
11913
+ }>;
11914
+ get: import("@trpc/server").TRPCQueryProcedure<{
11915
+ input: {
11916
+ id: string;
11917
+ };
11918
+ output: {
11919
+ id: string;
11920
+ workspaceId: string;
11921
+ userId: string;
11922
+ cellType: string;
11923
+ config: Record<string, unknown>;
11924
+ name: string | null;
11925
+ isTemplate: boolean;
11926
+ sourceDocumentId: string | null;
11927
+ createdByKind: CellInstanceCreatedByKind;
11928
+ trustLevel: CellInstanceTrustLevel;
11929
+ createdAt: Date;
11930
+ updatedAt: Date;
11931
+ };
11932
+ meta: object;
11933
+ }>;
11934
+ list: import("@trpc/server").TRPCQueryProcedure<{
11935
+ input: {
11936
+ workspaceId: string;
11937
+ isTemplate?: boolean | undefined;
11938
+ };
11939
+ output: {
11940
+ cellInstances: {
11941
+ id: string;
11942
+ workspaceId: string;
11943
+ userId: string;
11944
+ cellType: string;
11945
+ config: Record<string, unknown>;
11946
+ name: string | null;
11947
+ isTemplate: boolean;
11948
+ sourceDocumentId: string | null;
11949
+ createdByKind: CellInstanceCreatedByKind;
11950
+ trustLevel: CellInstanceTrustLevel;
11951
+ createdAt: Date;
11952
+ updatedAt: Date;
11953
+ }[];
11954
+ };
11955
+ meta: object;
11956
+ }>;
11957
+ updateConfig: import("@trpc/server").TRPCMutationProcedure<{
11958
+ input: {
11959
+ id: string;
11960
+ config: Record<string, unknown>;
11961
+ };
11962
+ output: {
11963
+ id: string;
11964
+ workspaceId: string;
11965
+ userId: string;
11966
+ cellType: string;
11967
+ config: Record<string, unknown>;
11968
+ name: string | null;
11969
+ isTemplate: boolean;
11970
+ sourceDocumentId: string | null;
11971
+ createdByKind: CellInstanceCreatedByKind;
11972
+ trustLevel: CellInstanceTrustLevel;
11973
+ createdAt: Date;
11974
+ updatedAt: Date;
11975
+ };
11976
+ meta: object;
11977
+ }>;
11978
+ duplicate: import("@trpc/server").TRPCMutationProcedure<{
11979
+ input: {
11980
+ id: string;
11981
+ deep?: boolean | undefined;
11982
+ };
11983
+ output: {
11984
+ id: string;
11985
+ workspaceId: string;
11986
+ userId: string;
11987
+ cellType: string;
11988
+ config: Record<string, unknown>;
11989
+ name: string | null;
11990
+ isTemplate: boolean;
11991
+ sourceDocumentId: string | null;
11992
+ createdByKind: CellInstanceCreatedByKind;
11993
+ trustLevel: CellInstanceTrustLevel;
11994
+ createdAt: Date;
11995
+ updatedAt: Date;
11996
+ };
11997
+ meta: object;
11998
+ }>;
11999
+ link: import("@trpc/server").TRPCMutationProcedure<{
12000
+ input: {
12001
+ cellId: string;
12002
+ entityId: string;
12003
+ relationType?: string | undefined;
12004
+ workspaceId?: string | undefined;
12005
+ };
12006
+ output: {
12007
+ id: string;
12008
+ status: "created";
12009
+ };
12010
+ meta: object;
12011
+ }>;
12012
+ }>>;
12013
+ channelGateway: import("@trpc/server").TRPCBuiltRouter<{
12014
+ ctx: Context;
12015
+ meta: object;
12016
+ errorShape: {
12017
+ message: string;
12018
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
12019
+ data: import("@trpc/server").TRPCDefaultErrorData;
12020
+ };
12021
+ transformer: true;
12022
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
12023
+ initLink: import("@trpc/server").TRPCMutationProcedure<{
12024
+ input: {
12025
+ channel: "telegram" | "whatsapp" | "discord";
12026
+ defaultChannelId?: string | undefined;
12027
+ };
12028
+ output: {
12029
+ token: string;
12030
+ expiresAt: Date;
12031
+ instruction: string;
12032
+ };
12033
+ meta: object;
12034
+ }>;
12035
+ list: import("@trpc/server").TRPCQueryProcedure<{
12036
+ input: void;
12037
+ output: {
12038
+ workspaceId: string | null;
12039
+ id: string;
12040
+ createdAt: Date;
12041
+ channel: string;
12042
+ channelUserId: string;
12043
+ defaultChannelId: string | null;
12044
+ externalUsername: string | null;
12045
+ }[];
12046
+ meta: object;
12047
+ }>;
12048
+ unlink: import("@trpc/server").TRPCMutationProcedure<{
12049
+ input: {
12050
+ connectionId: string;
12051
+ };
12052
+ output: {
12053
+ ok: boolean;
12054
+ };
12055
+ meta: object;
12056
+ }>;
12057
+ }>>;
12058
+ import: import("@trpc/server").TRPCBuiltRouter<{
12059
+ ctx: Context;
12060
+ meta: object;
12061
+ errorShape: {
12062
+ message: string;
12063
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
12064
+ data: import("@trpc/server").TRPCDefaultErrorData;
12065
+ };
12066
+ transformer: true;
12067
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
12068
+ submitBatch: import("@trpc/server").TRPCMutationProcedure<{
12069
+ input: {
12070
+ items: {
12071
+ path: string;
12072
+ contentBase64: string;
12073
+ mimeType?: string | undefined;
12074
+ }[];
12075
+ workspaceId?: string | undefined;
12076
+ };
12077
+ output: {
12078
+ filesReceived: number;
12079
+ entitiesCreated: number;
12080
+ proposalsCreated: number;
12081
+ documentsCreated: number;
12082
+ channelsCreated: number;
12083
+ messagesCreated: number;
12084
+ filesStoredOnly: number;
12085
+ errors: {
12086
+ path: string;
12087
+ message: string;
12088
+ }[];
12089
+ batchId: `${string}-${string}-${string}-${string}-${string}`;
10216
12090
  };
10217
12091
  meta: object;
10218
12092
  }>;
@@ -10246,6 +12120,15 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10246
12120
  };
10247
12121
  meta: object;
10248
12122
  }>;
12123
+ batchProgressRoom: import("@trpc/server").TRPCQueryProcedure<{
12124
+ input: void;
12125
+ output: {
12126
+ event: "import:file:progress";
12127
+ room: string;
12128
+ description: string;
12129
+ };
12130
+ meta: object;
12131
+ }>;
10249
12132
  }>>;
10250
12133
  connectors: import("@trpc/server").TRPCBuiltRouter<{
10251
12134
  ctx: Context;
@@ -10527,6 +12410,38 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10527
12410
  };
10528
12411
  meta: object;
10529
12412
  }>;
12413
+ listAll: import("@trpc/server").TRPCQueryProcedure<{
12414
+ input: {
12415
+ status?: "read" | "unread" | "dismissed" | "all" | undefined;
12416
+ category?: "data" | "system" | "ai" | "governance" | "inbox" | undefined;
12417
+ limit?: number | undefined;
12418
+ offset?: number | undefined;
12419
+ };
12420
+ output: {
12421
+ notifications: {
12422
+ id: string;
12423
+ workspaceId: string | null;
12424
+ userId: string;
12425
+ type: string;
12426
+ category: "data" | "system" | "ai" | "governance" | "inbox";
12427
+ priority: "normal" | "low" | "high" | "urgent";
12428
+ title: string;
12429
+ body: string;
12430
+ icon: string | null;
12431
+ sourceType: string;
12432
+ sourceId: string | null;
12433
+ workspaceUrl: string | null;
12434
+ actions: unknown;
12435
+ groupKey: string | null;
12436
+ status: "read" | "unread" | "dismissed" | "actioned";
12437
+ readAt: Date | null;
12438
+ expiresAt: Date | null;
12439
+ createdAt: Date;
12440
+ }[];
12441
+ total: number;
12442
+ };
12443
+ meta: object;
12444
+ }>;
10530
12445
  unreadCount: import("@trpc/server").TRPCQueryProcedure<{
10531
12446
  input: void;
10532
12447
  output: {
@@ -10633,6 +12548,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10633
12548
  frequencyDays?: number | undefined;
10634
12549
  } | undefined;
10635
12550
  nudgeDensity?: "minimal" | "balanced" | "proactive" | undefined;
12551
+ triggers?: {
12552
+ captureCluster?: boolean | undefined;
12553
+ taskCompleted?: boolean | undefined;
12554
+ questionCreated?: boolean | undefined;
12555
+ decisionCreated?: boolean | undefined;
12556
+ } | undefined;
10636
12557
  mutedUntil?: string | null | undefined;
10637
12558
  };
10638
12559
  output: {
@@ -10654,6 +12575,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10654
12575
  frequencyDays: number;
10655
12576
  };
10656
12577
  nudgeDensity: ProactiveNudgeDensity;
12578
+ triggers: {
12579
+ captureCluster?: boolean;
12580
+ taskCompleted?: boolean;
12581
+ questionCreated?: boolean;
12582
+ decisionCreated?: boolean;
12583
+ };
10657
12584
  mutedUntil: string | undefined;
10658
12585
  };
10659
12586
  meta: object;
@@ -10900,6 +12827,29 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10900
12827
  output: void;
10901
12828
  meta: object;
10902
12829
  }>;
12830
+ adminRegister: import("@trpc/server").TRPCMutationProcedure<{
12831
+ input: {
12832
+ issuerUrl: string;
12833
+ displayName: string;
12834
+ allowedScopes: string[];
12835
+ };
12836
+ output: {
12837
+ id: string;
12838
+ updatedAt: Date;
12839
+ createdAt: Date;
12840
+ status: "approved" | "revoked" | "pending" | "rejected";
12841
+ description: string | null;
12842
+ reviewedBy: string | null;
12843
+ reviewedAt: Date | null;
12844
+ rejectionReason: string | null;
12845
+ displayName: string;
12846
+ issuerUrl: string;
12847
+ allowedScopes: string[];
12848
+ isBuiltIn: boolean;
12849
+ initialRequestData: unknown;
12850
+ };
12851
+ meta: object;
12852
+ }>;
10903
12853
  }>>;
10904
12854
  sourceConfigs: import("@trpc/server").TRPCBuiltRouter<{
10905
12855
  ctx: Context;
@@ -11431,7 +13381,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11431
13381
  }>;
11432
13382
  saveProviderApiKey: import("@trpc/server").TRPCMutationProcedure<{
11433
13383
  input: {
11434
- providerType: "anthropic" | "openrouter" | "openai";
13384
+ providerType: "openai" | "anthropic" | "openrouter";
11435
13385
  apiKey: string;
11436
13386
  };
11437
13387
  output: {
@@ -11522,6 +13472,539 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11522
13472
  meta: object;
11523
13473
  }>;
11524
13474
  }>>;
13475
+ secretsVault: import("@trpc/server").TRPCBuiltRouter<{
13476
+ ctx: Context;
13477
+ meta: object;
13478
+ errorShape: {
13479
+ message: string;
13480
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
13481
+ data: import("@trpc/server").TRPCDefaultErrorData;
13482
+ };
13483
+ transformer: true;
13484
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
13485
+ hasVault: import("@trpc/server").TRPCQueryProcedure<{
13486
+ input: void;
13487
+ output: boolean;
13488
+ meta: object;
13489
+ }>;
13490
+ getVaultMetadata: import("@trpc/server").TRPCQueryProcedure<{
13491
+ input: void;
13492
+ output: {
13493
+ salt: any;
13494
+ keyDerivationAlgorithm: any;
13495
+ keyDerivationParams: any;
13496
+ verificationCipher: any;
13497
+ verificationIv: any;
13498
+ verificationTag: any;
13499
+ hasRecoveryKey: boolean;
13500
+ } | null;
13501
+ meta: object;
13502
+ }>;
13503
+ setupVault: import("@trpc/server").TRPCMutationProcedure<{
13504
+ input: {
13505
+ salt: string;
13506
+ keyDerivationAlgorithm: string;
13507
+ keyDerivationParams: {
13508
+ N: number;
13509
+ r: number;
13510
+ p: number;
13511
+ };
13512
+ verificationCipher: string;
13513
+ verificationIv: string;
13514
+ verificationTag: string;
13515
+ recoveryKeyHash?: string | undefined;
13516
+ };
13517
+ output: {
13518
+ success: boolean;
13519
+ };
13520
+ meta: object;
13521
+ }>;
13522
+ recordUnlock: import("@trpc/server").TRPCMutationProcedure<{
13523
+ input: void;
13524
+ output: {
13525
+ success: boolean;
13526
+ };
13527
+ meta: object;
13528
+ }>;
13529
+ generateRecoveryKey: import("@trpc/server").TRPCMutationProcedure<{
13530
+ input: void;
13531
+ output: {
13532
+ recoveryKey: string;
13533
+ message: string;
13534
+ };
13535
+ meta: object;
13536
+ }>;
13537
+ list: import("@trpc/server").TRPCQueryProcedure<{
13538
+ input: {
13539
+ type?: "identity" | "password" | "api_key" | "credential" | "note" | "card" | "ssh_key" | "certificate" | "env_variable" | "database" | "oauth" | undefined;
13540
+ category?: string | undefined;
13541
+ search?: string | undefined;
13542
+ tags?: string[] | undefined;
13543
+ includeDeleted?: boolean | undefined;
13544
+ limit?: number | undefined;
13545
+ offset?: number | undefined;
13546
+ } | undefined;
13547
+ output: any;
13548
+ meta: object;
13549
+ }>;
13550
+ get: import("@trpc/server").TRPCQueryProcedure<{
13551
+ input: {
13552
+ id: string;
13553
+ };
13554
+ output: {
13555
+ id: string;
13556
+ name: string;
13557
+ type: "identity" | "password" | "api_key" | "credential" | "note" | "card" | "ssh_key" | "certificate" | "env_variable" | "database" | "oauth";
13558
+ url: string | null;
13559
+ category: string | null;
13560
+ description: string | null;
13561
+ iconUrl: string | null;
13562
+ encryptedData: string;
13563
+ iv: string;
13564
+ authTag: string;
13565
+ encryptionVersion: number;
13566
+ isFavorite: boolean;
13567
+ isShared: boolean;
13568
+ isCompromised: boolean | null;
13569
+ passwordStrength: number | null;
13570
+ passwordLastChanged: Date | null;
13571
+ lastAccessedAt: Date | null;
13572
+ accessCount: number;
13573
+ createdAt: Date;
13574
+ updatedAt: Date;
13575
+ tags: string[];
13576
+ };
13577
+ meta: object;
13578
+ }>;
13579
+ create: import("@trpc/server").TRPCMutationProcedure<{
13580
+ input: {
13581
+ name: string;
13582
+ type: "identity" | "password" | "api_key" | "credential" | "note" | "card" | "ssh_key" | "certificate" | "env_variable" | "database" | "oauth";
13583
+ encryptedData: string;
13584
+ iv: string;
13585
+ authTag: string;
13586
+ url?: string | undefined;
13587
+ category?: string | undefined;
13588
+ description?: string | undefined;
13589
+ iconUrl?: string | undefined;
13590
+ passwordStrength?: number | undefined;
13591
+ tags?: string[] | undefined;
13592
+ workspaceId?: string | undefined;
13593
+ };
13594
+ output: {
13595
+ id: string;
13596
+ name: string;
13597
+ type: "identity" | "password" | "api_key" | "credential" | "note" | "card" | "ssh_key" | "certificate" | "env_variable" | "database" | "oauth";
13598
+ createdAt: Date;
13599
+ };
13600
+ meta: object;
13601
+ }>;
13602
+ update: import("@trpc/server").TRPCMutationProcedure<{
13603
+ input: {
13604
+ id: string;
13605
+ name?: string | undefined;
13606
+ url?: string | null | undefined;
13607
+ category?: string | null | undefined;
13608
+ description?: string | null | undefined;
13609
+ iconUrl?: string | null | undefined;
13610
+ encryptedData?: string | undefined;
13611
+ iv?: string | undefined;
13612
+ authTag?: string | undefined;
13613
+ isFavorite?: boolean | undefined;
13614
+ sortOrder?: number | undefined;
13615
+ passwordStrength?: number | undefined;
13616
+ tags?: string[] | undefined;
13617
+ };
13618
+ output: {
13619
+ id: string;
13620
+ name: string;
13621
+ updatedAt: Date;
13622
+ };
13623
+ meta: object;
13624
+ }>;
13625
+ delete: import("@trpc/server").TRPCMutationProcedure<{
13626
+ input: {
13627
+ id: string;
13628
+ };
13629
+ output: {
13630
+ success: boolean;
13631
+ };
13632
+ meta: object;
13633
+ }>;
13634
+ permanentDelete: import("@trpc/server").TRPCMutationProcedure<{
13635
+ input: {
13636
+ id: string;
13637
+ };
13638
+ output: {
13639
+ success: boolean;
13640
+ };
13641
+ meta: object;
13642
+ }>;
13643
+ restore: import("@trpc/server").TRPCMutationProcedure<{
13644
+ input: {
13645
+ id: string;
13646
+ };
13647
+ output: {
13648
+ success: boolean;
13649
+ };
13650
+ meta: object;
13651
+ }>;
13652
+ findByUrl: import("@trpc/server").TRPCQueryProcedure<{
13653
+ input: {
13654
+ url: string;
13655
+ };
13656
+ output: any;
13657
+ meta: object;
13658
+ }>;
13659
+ recordCopy: import("@trpc/server").TRPCMutationProcedure<{
13660
+ input: {
13661
+ id: string;
13662
+ };
13663
+ output: {
13664
+ success: boolean;
13665
+ };
13666
+ meta: object;
13667
+ }>;
13668
+ getCategories: import("@trpc/server").TRPCQueryProcedure<{
13669
+ input: void;
13670
+ output: string[];
13671
+ meta: object;
13672
+ }>;
13673
+ getTags: import("@trpc/server").TRPCQueryProcedure<{
13674
+ input: void;
13675
+ output: string[];
13676
+ meta: object;
13677
+ }>;
13678
+ share: import("@trpc/server").TRPCMutationProcedure<{
13679
+ input: {
13680
+ secretId: string;
13681
+ sharedWithUserId?: string | undefined;
13682
+ sharedWithWorkspaceId?: string | undefined;
13683
+ permission?: "read" | "write" | undefined;
13684
+ expiresAt?: Date | undefined;
13685
+ };
13686
+ output: {
13687
+ id: string;
13688
+ secretId: string;
13689
+ permission: string;
13690
+ };
13691
+ meta: object;
13692
+ }>;
13693
+ revokeShare: import("@trpc/server").TRPCMutationProcedure<{
13694
+ input: {
13695
+ shareId: string;
13696
+ };
13697
+ output: {
13698
+ success: boolean;
13699
+ };
13700
+ meta: object;
13701
+ }>;
13702
+ sharedWithMe: import("@trpc/server").TRPCQueryProcedure<{
13703
+ input: void;
13704
+ output: any;
13705
+ meta: object;
13706
+ }>;
13707
+ getAuditLog: import("@trpc/server").TRPCQueryProcedure<{
13708
+ input: {
13709
+ secretId: string;
13710
+ limit?: number | undefined;
13711
+ };
13712
+ output: any;
13713
+ meta: object;
13714
+ }>;
13715
+ getSecurityStats: import("@trpc/server").TRPCQueryProcedure<{
13716
+ input: void;
13717
+ output: {
13718
+ compromised: number;
13719
+ weakPasswords: number;
13720
+ oldPasswords: number;
13721
+ total: number;
13722
+ };
13723
+ meta: object;
13724
+ }>;
13725
+ markCompromised: import("@trpc/server").TRPCMutationProcedure<{
13726
+ input: {
13727
+ id: string;
13728
+ };
13729
+ output: {
13730
+ success: boolean;
13731
+ };
13732
+ meta: object;
13733
+ }>;
13734
+ grantAIAccess: import("@trpc/server").TRPCMutationProcedure<{
13735
+ input: {
13736
+ secretId: string;
13737
+ proposalId: string;
13738
+ };
13739
+ output: {
13740
+ vaultRef: string;
13741
+ secretId: string;
13742
+ proposalId: string;
13743
+ };
13744
+ meta: object;
13745
+ }>;
13746
+ }>>;
13747
+ subscriptions: import("@trpc/server").TRPCBuiltRouter<{
13748
+ ctx: Context;
13749
+ meta: object;
13750
+ errorShape: {
13751
+ message: string;
13752
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
13753
+ data: import("@trpc/server").TRPCDefaultErrorData;
13754
+ };
13755
+ transformer: true;
13756
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
13757
+ listAll: import("@trpc/server").TRPCQueryProcedure<{
13758
+ input: {
13759
+ workspaceId?: string | null | undefined;
13760
+ limit?: number | undefined;
13761
+ kind?: "webhook" | "automation" | "ai_feed" | "ai_react" | "notify" | "message_out" | undefined;
13762
+ eventType?: string | undefined;
13763
+ lens?: "external" | "all" | "internal" | undefined;
13764
+ pending?: boolean | undefined;
13765
+ };
13766
+ output: {
13767
+ items: ReactionEvent[];
13768
+ lens: ReactionLens;
13769
+ };
13770
+ meta: object;
13771
+ }>;
13772
+ eventFanout: import("@trpc/server").TRPCQueryProcedure<{
13773
+ input: {
13774
+ eventId: string;
13775
+ lens?: "external" | "all" | "internal" | undefined;
13776
+ };
13777
+ output: ReactionEvent;
13778
+ meta: object;
13779
+ }>;
13780
+ }>>;
13781
+ aiProviders: import("@trpc/server").TRPCBuiltRouter<{
13782
+ ctx: Context;
13783
+ meta: object;
13784
+ errorShape: {
13785
+ message: string;
13786
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
13787
+ data: import("@trpc/server").TRPCDefaultErrorData;
13788
+ };
13789
+ transformer: true;
13790
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
13791
+ list: import("@trpc/server").TRPCQueryProcedure<{
13792
+ input: void;
13793
+ output: {
13794
+ hasApiKey: boolean;
13795
+ name: string;
13796
+ id: string;
13797
+ updatedAt: Date;
13798
+ createdAt: Date;
13799
+ metadata: Record<string, unknown>;
13800
+ priority: number;
13801
+ tags: string[];
13802
+ enabled: boolean;
13803
+ providerId: string;
13804
+ baseUrl: string;
13805
+ apiKeyEnvVar: string;
13806
+ models: AiProviderModelEntry[];
13807
+ rateLimit: {
13808
+ rpm: number;
13809
+ rpd?: number;
13810
+ } | null;
13811
+ extraBody: Record<string, unknown> | null;
13812
+ systemPromptPrefix: string | null;
13813
+ }[];
13814
+ meta: object;
13815
+ }>;
13816
+ upsert: import("@trpc/server").TRPCMutationProcedure<{
13817
+ input: {
13818
+ providerId: string;
13819
+ name: string;
13820
+ baseUrl: string;
13821
+ apiKeyEnvVar: string;
13822
+ apiKey?: string | undefined;
13823
+ enabled?: boolean | undefined;
13824
+ priority?: number | undefined;
13825
+ tags?: string[] | undefined;
13826
+ models?: {
13827
+ id: string;
13828
+ tier?: "free" | "balanced" | "advanced" | "complex" | undefined;
13829
+ contextWindow?: number | undefined;
13830
+ supportsTools?: boolean | undefined;
13831
+ supportsJson?: boolean | undefined;
13832
+ costPer1MInput?: number | undefined;
13833
+ costPer1MOutput?: number | undefined;
13834
+ }[] | undefined;
13835
+ rateLimit?: {
13836
+ rpm: number;
13837
+ rpd?: number | undefined;
13838
+ } | undefined;
13839
+ extraBody?: Record<string, unknown> | undefined;
13840
+ systemPromptPrefix?: string | undefined;
13841
+ metadata?: Record<string, unknown> | undefined;
13842
+ };
13843
+ output: {
13844
+ hasApiKey: boolean;
13845
+ name: string;
13846
+ id: string;
13847
+ updatedAt: Date;
13848
+ createdAt: Date;
13849
+ metadata: Record<string, unknown>;
13850
+ priority: number;
13851
+ tags: string[];
13852
+ enabled: boolean;
13853
+ providerId: string;
13854
+ baseUrl: string;
13855
+ apiKeyEnvVar: string;
13856
+ models: AiProviderModelEntry[];
13857
+ rateLimit: {
13858
+ rpm: number;
13859
+ rpd?: number;
13860
+ } | null;
13861
+ extraBody: Record<string, unknown> | null;
13862
+ systemPromptPrefix: string | null;
13863
+ };
13864
+ meta: object;
13865
+ }>;
13866
+ enable: import("@trpc/server").TRPCMutationProcedure<{
13867
+ input: {
13868
+ providerId: string;
13869
+ };
13870
+ output: {
13871
+ ok: boolean;
13872
+ };
13873
+ meta: object;
13874
+ }>;
13875
+ disable: import("@trpc/server").TRPCMutationProcedure<{
13876
+ input: {
13877
+ providerId: string;
13878
+ };
13879
+ output: {
13880
+ ok: boolean;
13881
+ };
13882
+ meta: object;
13883
+ }>;
13884
+ remove: import("@trpc/server").TRPCMutationProcedure<{
13885
+ input: {
13886
+ providerId: string;
13887
+ };
13888
+ output: {
13889
+ ok: boolean;
13890
+ };
13891
+ meta: object;
13892
+ }>;
13893
+ probe: import("@trpc/server").TRPCMutationProcedure<{
13894
+ input: {
13895
+ providerId: string;
13896
+ };
13897
+ output: {
13898
+ ok: boolean;
13899
+ models: string[];
13900
+ latencyMs: number;
13901
+ error?: string;
13902
+ };
13903
+ meta: object;
13904
+ }>;
13905
+ sync: import("@trpc/server").TRPCMutationProcedure<{
13906
+ input: void;
13907
+ output: {
13908
+ ok: boolean;
13909
+ count: number;
13910
+ };
13911
+ meta: object;
13912
+ }>;
13913
+ }>>;
13914
+ aiProviderCredentials: import("@trpc/server").TRPCBuiltRouter<{
13915
+ ctx: Context;
13916
+ meta: object;
13917
+ errorShape: {
13918
+ message: string;
13919
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
13920
+ data: import("@trpc/server").TRPCDefaultErrorData;
13921
+ };
13922
+ transformer: true;
13923
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
13924
+ listForWorkspace: import("@trpc/server").TRPCQueryProcedure<{
13925
+ input: {
13926
+ workspaceId: string;
13927
+ };
13928
+ output: (Omit<{
13929
+ userId: string | null;
13930
+ workspaceId: string | null;
13931
+ id: string;
13932
+ updatedAt: Date;
13933
+ createdAt: Date;
13934
+ createdBy: string;
13935
+ priority: number;
13936
+ enabled: boolean;
13937
+ providerId: string;
13938
+ encryptedApiKey: string;
13939
+ }, "encryptedApiKey"> & {
13940
+ hasApiKey: true;
13941
+ })[];
13942
+ meta: object;
13943
+ }>;
13944
+ upsertForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
13945
+ input: {
13946
+ providerId: string;
13947
+ apiKey: string;
13948
+ workspaceId: string;
13949
+ enabled?: boolean | undefined;
13950
+ priority?: number | undefined;
13951
+ };
13952
+ output: {
13953
+ ok: boolean;
13954
+ };
13955
+ meta: object;
13956
+ }>;
13957
+ removeForWorkspace: import("@trpc/server").TRPCMutationProcedure<{
13958
+ input: {
13959
+ workspaceId: string;
13960
+ providerId: string;
13961
+ };
13962
+ output: {
13963
+ ok: boolean;
13964
+ };
13965
+ meta: object;
13966
+ }>;
13967
+ listForUser: import("@trpc/server").TRPCQueryProcedure<{
13968
+ input: void;
13969
+ output: (Omit<{
13970
+ userId: string | null;
13971
+ workspaceId: string | null;
13972
+ id: string;
13973
+ updatedAt: Date;
13974
+ createdAt: Date;
13975
+ createdBy: string;
13976
+ priority: number;
13977
+ enabled: boolean;
13978
+ providerId: string;
13979
+ encryptedApiKey: string;
13980
+ }, "encryptedApiKey"> & {
13981
+ hasApiKey: true;
13982
+ })[];
13983
+ meta: object;
13984
+ }>;
13985
+ upsertForUser: import("@trpc/server").TRPCMutationProcedure<{
13986
+ input: {
13987
+ providerId: string;
13988
+ apiKey: string;
13989
+ enabled?: boolean | undefined;
13990
+ priority?: number | undefined;
13991
+ workspaceId?: string | undefined;
13992
+ };
13993
+ output: {
13994
+ ok: boolean;
13995
+ };
13996
+ meta: object;
13997
+ }>;
13998
+ removeForUser: import("@trpc/server").TRPCMutationProcedure<{
13999
+ input: {
14000
+ providerId: string;
14001
+ };
14002
+ output: {
14003
+ ok: boolean;
14004
+ };
14005
+ meta: object;
14006
+ }>;
14007
+ }>>;
11525
14008
  }>>;
11526
14009
  export type AppRouter = typeof coreRouter;
11527
14010