@synap-core/api-types 1.17.0 → 1.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2108,6 +2108,9 @@ export type Playbook = typeof playbooks.$inferSelect;
2108
2108
  * source --feeds--> playbook (input-strategy source)
2109
2109
  * tool --provided_by--> source (tool backed by a provider)
2110
2110
  * participant|channel --member_of--> session (room participants)
2111
+ * entity(knowledge) --about--> tool | skill (knowledge↔config bridge)
2112
+ * entity(knowledge) --documents--> tool | skill (knowledge↔config bridge)
2113
+ * entity(knowledge) --concerns--> playbook|... (knowledge↔config bridge)
2111
2114
  *
2112
2115
  * Design doc: team/platform/playbooks-capability-substrate.mdx
2113
2116
  */
@@ -2117,7 +2120,23 @@ export type Playbook = typeof playbooks.$inferSelect;
2117
2120
  */
2118
2121
  export type LinkEndpointType = "playbook" | "tool" | "skill" | "command" | "session" | "source" | "entity" | "channel" | "participant";
2119
2122
  /** The relationship an edge expresses. */
2120
- export type LinkType = "grants" | "requires" | "instantiated_from" | "used" | "targets" | "produced" | "member_of" | "feeds" | "promoted_to" | "provided_by";
2123
+ export type LinkType = "grants" | "requires" | "instantiated_from" | "used" | "targets" | "produced" | "member_of" | "feeds" | "promoted_to" | "provided_by" | "about" | "documents" | "concerns";
2124
+ /**
2125
+ * Playbook Runs Schema — the run ledger (executor spine, Phase 3)
2126
+ *
2127
+ * RUNTIME (not config, not entity DATA). A playbook_run is one execution of a
2128
+ * Playbook: created when `runPlaybook` dispatches a playbook to its executor
2129
+ * (`is-agent` | `external-agent` | `hybrid`). It links the config (`playbook_id`)
2130
+ * to the runtime (`session_id`) and records status/summary/error as the executor
2131
+ * reports back (capture-back via the Hub `POST /runs/:id/capture` route).
2132
+ *
2133
+ * Part of the Playbooks & Capability Substrate
2134
+ * (team/platform/playbooks-capability-substrate.mdx §4.3-4.4).
2135
+ */
2136
+ /** Which "hands" ran this. Mirrors @synap/playbooks ExecutorRef. */
2137
+ export type PlaybookRunExecutorRef = "is-agent" | "external-agent" | "hybrid";
2138
+ /** Lifecycle of a run. */
2139
+ export type PlaybookRunStatus = "running" | "completed" | "failed" | "proposed";
2121
2140
  /**
2122
2141
  * EventRecord - Database representation of an event
2123
2142
  *
@@ -2137,6 +2156,19 @@ export interface EventRecord {
2137
2156
  causationId?: string;
2138
2157
  correlationId?: string;
2139
2158
  source: string;
2159
+ isAgent?: boolean;
2160
+ agentUserId?: string;
2161
+ agentType?: string;
2162
+ model?: string;
2163
+ provider?: string;
2164
+ costUsd?: number | null;
2165
+ tokensIn?: number;
2166
+ tokensOut?: number;
2167
+ tokensTotal?: number;
2168
+ latencyMs?: number;
2169
+ toolCount?: number;
2170
+ runStatus?: string;
2171
+ finishReason?: string;
2140
2172
  }
2141
2173
  /** Minimal message fields for list/preview */
2142
2174
  export interface LinkedMessagePreview {
@@ -3198,6 +3230,45 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3198
3230
  output: EventRecord[];
3199
3231
  meta: object;
3200
3232
  }>;
3233
+ listByCorrelationId: import("@trpc/server").TRPCQueryProcedure<{
3234
+ input: {
3235
+ correlationId: string;
3236
+ };
3237
+ output: {
3238
+ id: string;
3239
+ timestamp: Date;
3240
+ type: string;
3241
+ subjectType: string;
3242
+ subjectId: string;
3243
+ data: Record<string, unknown>;
3244
+ metadata: Record<string, unknown> | undefined;
3245
+ source: string;
3246
+ correlationId: string | undefined;
3247
+ userId: string;
3248
+ }[];
3249
+ meta: object;
3250
+ }>;
3251
+ aggregateTimeSeries: import("@trpc/server").TRPCQueryProcedure<{
3252
+ input: {
3253
+ workspaceId?: string | undefined;
3254
+ subjectId?: string | undefined;
3255
+ subjectType?: "user" | "message" | "apiKey" | "system" | "entity" | "chat" | "workspace" | "member" | "document" | "task" | "relation" | "project" | undefined;
3256
+ profileSlug?: string | undefined;
3257
+ eventTypes?: string[] | undefined;
3258
+ period?: "day" | "week" | "month" | undefined;
3259
+ range?: {
3260
+ from: unknown;
3261
+ to: unknown;
3262
+ } | undefined;
3263
+ };
3264
+ output: {
3265
+ points: {
3266
+ x: string;
3267
+ y: number;
3268
+ }[];
3269
+ };
3270
+ meta: object;
3271
+ }>;
3201
3272
  count: import("@trpc/server").TRPCQueryProcedure<{
3202
3273
  input: {
3203
3274
  userId?: string | undefined;
@@ -3309,6 +3380,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3309
3380
  }[];
3310
3381
  followUp: string | null;
3311
3382
  targetWorkspaceId: string | null;
3383
+ targetWorkspaceReason: string | null;
3384
+ targetWorkspaceConfidence: number | null;
3312
3385
  dedupCandidates: Record<string, {
3313
3386
  entityId: string;
3314
3387
  title: string;
@@ -3333,6 +3406,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3333
3406
  }[];
3334
3407
  followUp: string | null;
3335
3408
  targetWorkspaceId: string | null;
3409
+ targetWorkspaceReason: string | null;
3410
+ targetWorkspaceConfidence: number | null;
3336
3411
  dedupCandidates: Record<string, {
3337
3412
  entityId: string;
3338
3413
  title: string;
@@ -3376,6 +3451,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3376
3451
  relationType: string;
3377
3452
  }[];
3378
3453
  targetWorkspaceId?: string | null | undefined;
3454
+ idempotencyKey?: string | undefined;
3379
3455
  };
3380
3456
  output: {
3381
3457
  created: {
@@ -3903,13 +3979,13 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3903
3979
  createdByUserId: string | null;
3904
3980
  createdAt: Date;
3905
3981
  correlationId: string | null;
3982
+ agentUserId: string | null;
3906
3983
  profileId: string | null;
3907
3984
  title: string | null;
3908
3985
  preview: string | null;
3909
3986
  documentId: string | null;
3910
3987
  version: number;
3911
3988
  createdByKind: ProvenanceKind | null;
3912
- agentUserId: string | null;
3913
3989
  sourceProposalId: string | null;
3914
3990
  deletedAt: Date | null;
3915
3991
  };
@@ -3962,7 +4038,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
3962
4038
  input: {
3963
4039
  channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab";
3964
4040
  workspaceId?: string | undefined;
3965
- contextObjectType?: "user" | "entity" | "external" | "workspace" | "document" | "view" | "task" | "project" | undefined;
4041
+ contextObjectType?: "user" | "entity" | "external" | "workspace" | "view" | "document" | "task" | "project" | undefined;
3966
4042
  contextObjectId?: string | undefined;
3967
4043
  parentChannelId?: string | undefined;
3968
4044
  branchPurpose?: string | undefined;
@@ -4000,7 +4076,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4000
4076
  title: string | null;
4001
4077
  externalSource: string | null;
4002
4078
  status: "active" | "merged" | "archived";
4003
- scope: "user" | "pod" | "workspace";
4079
+ scope: "user" | "workspace" | "pod";
4004
4080
  channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
4005
4081
  feedScope: "user" | "workspace" | null;
4006
4082
  contextObjectType: string | null;
@@ -4090,7 +4166,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4090
4166
  deepAnalysis?: boolean | undefined;
4091
4167
  channelType?: "personal" | "thread" | "sub_thread" | "agent_collab" | undefined;
4092
4168
  contextObjectId?: string | undefined;
4093
- contextObjectType?: "entity" | "document" | "view" | undefined;
4169
+ contextObjectType?: "entity" | "view" | "document" | undefined;
4094
4170
  branchPurpose?: string | undefined;
4095
4171
  };
4096
4172
  output: {
@@ -4121,7 +4197,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4121
4197
  title: string | null;
4122
4198
  externalSource: string | null;
4123
4199
  status: "active" | "merged" | "archived";
4124
- scope: "user" | "pod" | "workspace";
4200
+ scope: "user" | "workspace" | "pod";
4125
4201
  channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
4126
4202
  feedScope: "user" | "workspace" | null;
4127
4203
  contextObjectType: string | null;
@@ -4220,7 +4296,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4220
4296
  error?: string | undefined;
4221
4297
  title?: string | undefined;
4222
4298
  description?: string | undefined;
4223
- status?: "error" | "pending" | "running" | "complete" | undefined;
4299
+ status?: "error" | "running" | "pending" | "complete" | undefined;
4224
4300
  }[] | undefined;
4225
4301
  agentType?: string | undefined;
4226
4302
  } | null;
@@ -4283,7 +4359,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4283
4359
  channelType?: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | undefined;
4284
4360
  limit?: number | undefined;
4285
4361
  contextObjectId?: string | undefined;
4286
- contextObjectType?: "entity" | "document" | "view" | undefined;
4362
+ contextObjectType?: "entity" | "view" | "document" | undefined;
4287
4363
  assignedAgentId?: string | undefined;
4288
4364
  agentUserId?: string | undefined;
4289
4365
  };
@@ -4300,7 +4376,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4300
4376
  input: {
4301
4377
  workspaceId?: string | undefined;
4302
4378
  contextObjectId?: string | undefined;
4303
- contextObjectType?: "entity" | "document" | "view" | undefined;
4379
+ contextObjectType?: "entity" | "view" | "document" | undefined;
4304
4380
  limit?: number | undefined;
4305
4381
  offset?: number | undefined;
4306
4382
  };
@@ -4419,7 +4495,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4419
4495
  title: string | null;
4420
4496
  externalSource: string | null;
4421
4497
  status: "active" | "merged" | "archived";
4422
- scope: "user" | "pod" | "workspace";
4498
+ scope: "user" | "workspace" | "pod";
4423
4499
  channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
4424
4500
  feedScope: "user" | "workspace" | null;
4425
4501
  contextObjectType: string | null;
@@ -4485,7 +4561,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4485
4561
  title: string | null;
4486
4562
  externalSource: string | null;
4487
4563
  status: "active" | "merged" | "archived";
4488
- scope: "user" | "pod" | "workspace";
4564
+ scope: "user" | "workspace" | "pod";
4489
4565
  channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
4490
4566
  feedScope: "user" | "workspace" | null;
4491
4567
  contextObjectType: string | null;
@@ -4513,7 +4589,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4513
4589
  createdAt: Date;
4514
4590
  channelId: string;
4515
4591
  relevanceScore: number | null;
4516
- objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
4592
+ objectType: "entity" | "proposal" | "view" | "document" | "inbox_item";
4517
4593
  objectId: string;
4518
4594
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
4519
4595
  conflictStatus: "pending" | "none" | "resolved";
@@ -4594,7 +4670,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4594
4670
  title: string | null;
4595
4671
  externalSource: string | null;
4596
4672
  status: "active" | "merged" | "archived";
4597
- scope: "user" | "pod" | "workspace";
4673
+ scope: "user" | "workspace" | "pod";
4598
4674
  channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
4599
4675
  feedScope: "user" | "workspace" | null;
4600
4676
  contextObjectType: string | null;
@@ -4624,7 +4700,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4624
4700
  title: string | null;
4625
4701
  externalSource: string | null;
4626
4702
  status: "active" | "merged" | "archived";
4627
- scope: "user" | "pod" | "workspace";
4703
+ scope: "user" | "workspace" | "pod";
4628
4704
  channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
4629
4705
  feedScope: "user" | "workspace" | null;
4630
4706
  contextObjectType: string | null;
@@ -4654,7 +4730,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4654
4730
  title: string | null;
4655
4731
  externalSource: string | null;
4656
4732
  status: "active" | "merged" | "archived";
4657
- scope: "user" | "pod" | "workspace";
4733
+ scope: "user" | "workspace" | "pod";
4658
4734
  channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
4659
4735
  feedScope: "user" | "workspace" | null;
4660
4736
  contextObjectType: string | null;
@@ -4680,7 +4756,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4680
4756
  getChannelContext: import("@trpc/server").TRPCQueryProcedure<{
4681
4757
  input: {
4682
4758
  channelId: string;
4683
- objectTypes?: ("entity" | "document" | "view" | "proposal" | "inbox_item")[] | undefined;
4759
+ objectTypes?: ("entity" | "proposal" | "view" | "document" | "inbox_item")[] | undefined;
4684
4760
  relationshipTypes?: ("created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent")[] | undefined;
4685
4761
  };
4686
4762
  output: {
@@ -4692,7 +4768,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4692
4768
  createdAt: Date;
4693
4769
  channelId: string;
4694
4770
  relevanceScore: number | null;
4695
- objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
4771
+ objectType: "entity" | "proposal" | "view" | "document" | "inbox_item";
4696
4772
  objectId: string;
4697
4773
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
4698
4774
  conflictStatus: "pending" | "none" | "resolved";
@@ -4705,7 +4781,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4705
4781
  createdAt: Date;
4706
4782
  channelId: string;
4707
4783
  relevanceScore: number | null;
4708
- objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
4784
+ objectType: "entity" | "proposal" | "view" | "document" | "inbox_item";
4709
4785
  objectId: string;
4710
4786
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
4711
4787
  conflictStatus: "pending" | "none" | "resolved";
@@ -4718,7 +4794,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4718
4794
  createdAt: Date;
4719
4795
  channelId: string;
4720
4796
  relevanceScore: number | null;
4721
- objectType: "entity" | "document" | "view" | "proposal" | "inbox_item";
4797
+ objectType: "entity" | "proposal" | "view" | "document" | "inbox_item";
4722
4798
  objectId: string;
4723
4799
  relationshipType: "created" | "updated" | "used_as_context" | "referenced" | "inherited_from_parent";
4724
4800
  conflictStatus: "pending" | "none" | "resolved";
@@ -4729,7 +4805,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4729
4805
  addContextItem: import("@trpc/server").TRPCMutationProcedure<{
4730
4806
  input: {
4731
4807
  channelId: string;
4732
- objectType: "entity" | "document" | "view";
4808
+ objectType: "entity" | "view" | "document";
4733
4809
  objectId: string;
4734
4810
  };
4735
4811
  output: {
@@ -4751,7 +4827,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4751
4827
  input: {
4752
4828
  channelId: string;
4753
4829
  objectId: string;
4754
- objectType: "entity" | "document" | "view";
4830
+ objectType: "entity" | "view" | "document";
4755
4831
  };
4756
4832
  output: {
4757
4833
  ok: boolean;
@@ -4819,7 +4895,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4819
4895
  title: string | null;
4820
4896
  externalSource: string | null;
4821
4897
  status: "active" | "merged" | "archived";
4822
- scope: "user" | "pod" | "workspace";
4898
+ scope: "user" | "workspace" | "pod";
4823
4899
  channelType: "external" | "personal" | "thread" | "sub_thread" | "feed" | "agent_collab" | "group";
4824
4900
  feedScope: "user" | "workspace" | null;
4825
4901
  contextObjectType: string | null;
@@ -4958,7 +5034,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
4958
5034
  limit?: number | undefined;
4959
5035
  offset?: number | undefined;
4960
5036
  workspaceId?: string | null | undefined;
4961
- targetType?: "entity" | "document" | "view" | "whiteboard" | "profile" | undefined;
5037
+ targetType?: "entity" | "view" | "document" | "whiteboard" | "profile" | undefined;
4962
5038
  targetId?: string | undefined;
4963
5039
  threadId?: string | undefined;
4964
5040
  correlationId?: string | undefined;
@@ -5143,7 +5219,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
5143
5219
  }>;
5144
5220
  submit: import("@trpc/server").TRPCMutationProcedure<{
5145
5221
  input: {
5146
- targetType: "entity" | "workspace" | "document" | "view" | "relation" | "profile";
5222
+ targetType: "entity" | "workspace" | "view" | "document" | "relation" | "profile";
5147
5223
  changeType: "create" | "update" | "delete";
5148
5224
  data: Record<string, any>;
5149
5225
  targetId?: string | undefined;
@@ -6914,11 +6990,11 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
6914
6990
  timestamp: Date;
6915
6991
  updatedAt: Date;
6916
6992
  createdAt: Date;
6993
+ provider: string;
6917
6994
  title: string;
6918
6995
  preview: string | null;
6919
6996
  status: string | null;
6920
6997
  externalId: string;
6921
- provider: string;
6922
6998
  account: string;
6923
6999
  deepLink: string | null;
6924
7000
  snoozedUntil: Date | null;
@@ -7435,7 +7511,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7435
7511
  allowedEntityTypes: string[] | null;
7436
7512
  maxEntitiesCreatedPerRun: number | null;
7437
7513
  canCreateViews: boolean;
7438
- outputMode: "view" | "proposal" | "text";
7514
+ outputMode: "proposal" | "view" | "text";
7439
7515
  permissionsProfile: "read_only" | "propose_writes";
7440
7516
  sharedScope: "user" | "workspace";
7441
7517
  }[];
@@ -7461,7 +7537,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7461
7537
  allowedEntityTypes: string[] | null;
7462
7538
  maxEntitiesCreatedPerRun: number | null;
7463
7539
  canCreateViews: boolean;
7464
- outputMode: "view" | "proposal" | "text";
7540
+ outputMode: "proposal" | "view" | "text";
7465
7541
  permissionsProfile: "read_only" | "propose_writes";
7466
7542
  sharedScope: "user" | "workspace";
7467
7543
  };
@@ -7476,7 +7552,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7476
7552
  allowedEntityTypes?: string[] | undefined;
7477
7553
  maxEntitiesCreatedPerRun?: number | undefined;
7478
7554
  canCreateViews?: boolean | undefined;
7479
- outputMode?: "view" | "proposal" | "text" | undefined;
7555
+ outputMode?: "proposal" | "view" | "text" | undefined;
7480
7556
  permissionsProfile?: "read_only" | "propose_writes" | undefined;
7481
7557
  sharedScope?: "user" | "workspace" | undefined;
7482
7558
  };
@@ -7495,7 +7571,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7495
7571
  allowedEntityTypes: string[] | null;
7496
7572
  maxEntitiesCreatedPerRun: number | null;
7497
7573
  canCreateViews: boolean;
7498
- outputMode: "view" | "proposal" | "text";
7574
+ outputMode: "proposal" | "view" | "text";
7499
7575
  permissionsProfile: "read_only" | "propose_writes";
7500
7576
  sharedScope: "user" | "workspace";
7501
7577
  };
@@ -7511,7 +7587,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7511
7587
  allowedEntityTypes?: string[] | undefined;
7512
7588
  maxEntitiesCreatedPerRun?: number | null | undefined;
7513
7589
  canCreateViews?: boolean | undefined;
7514
- outputMode?: "view" | "proposal" | "text" | undefined;
7590
+ outputMode?: "proposal" | "view" | "text" | undefined;
7515
7591
  permissionsProfile?: "read_only" | "propose_writes" | undefined;
7516
7592
  sharedScope?: "user" | "workspace" | undefined;
7517
7593
  };
@@ -7528,7 +7604,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
7528
7604
  allowedEntityTypes: string[] | null;
7529
7605
  maxEntitiesCreatedPerRun: number | null;
7530
7606
  canCreateViews: boolean;
7531
- outputMode: "view" | "proposal" | "text";
7607
+ outputMode: "proposal" | "view" | "text";
7532
7608
  permissionsProfile: "read_only" | "propose_writes";
7533
7609
  sharedScope: "user" | "workspace";
7534
7610
  createdAt: Date;
@@ -8134,6 +8210,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8134
8210
  createdByUserId: string | null;
8135
8211
  createdAt: Date;
8136
8212
  correlationId: string | null;
8213
+ agentUserId: string | null;
8137
8214
  profileId: string | null;
8138
8215
  title: string | null;
8139
8216
  preview: string | null;
@@ -8142,7 +8219,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8142
8219
  systemData: unknown;
8143
8220
  version: number;
8144
8221
  createdByKind: ProvenanceKind | null;
8145
- agentUserId: string | null;
8146
8222
  sourceProposalId: string | null;
8147
8223
  deletedAt: Date | null;
8148
8224
  }[];
@@ -8186,8 +8262,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8186
8262
  createdAt: Date;
8187
8263
  metadata: unknown;
8188
8264
  correlationId: string | null;
8189
- createdByKind: ProvenanceKind | null;
8190
8265
  agentUserId: string | null;
8266
+ createdByKind: ProvenanceKind | null;
8191
8267
  sourceProposalId: string | null;
8192
8268
  sourceEntityId: string | null;
8193
8269
  targetEntityId: string | null;
@@ -8230,8 +8306,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8230
8306
  createdAt: Date;
8231
8307
  metadata: unknown;
8232
8308
  correlationId: string | null;
8233
- createdByKind: ProvenanceKind | null;
8234
8309
  agentUserId: string | null;
8310
+ createdByKind: ProvenanceKind | null;
8235
8311
  sourceProposalId: string | null;
8236
8312
  sourceEntityId: string | null;
8237
8313
  targetEntityId: string | null;
@@ -8260,6 +8336,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8260
8336
  createdByUserId: string | null;
8261
8337
  createdAt: Date;
8262
8338
  correlationId: string | null;
8339
+ agentUserId: string | null;
8263
8340
  profileId: string | null;
8264
8341
  title: string | null;
8265
8342
  preview: string | null;
@@ -8268,10 +8345,21 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8268
8345
  systemData: unknown;
8269
8346
  version: number;
8270
8347
  createdByKind: ProvenanceKind | null;
8271
- agentUserId: string | null;
8272
8348
  sourceProposalId: string | null;
8273
8349
  deletedAt: Date | null;
8274
8350
  }[];
8351
+ configLinks: {
8352
+ workspaceId: string | null;
8353
+ id: string;
8354
+ createdAt: Date;
8355
+ metadata: unknown;
8356
+ createdBy: string | null;
8357
+ linkType: LinkType;
8358
+ fromType: LinkEndpointType;
8359
+ fromId: string;
8360
+ toType: LinkEndpointType;
8361
+ toId: string;
8362
+ }[];
8275
8363
  };
8276
8364
  meta: object;
8277
8365
  }>;
@@ -8323,6 +8411,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8323
8411
  createdByUserId: string | null;
8324
8412
  createdAt: Date;
8325
8413
  correlationId: string | null;
8414
+ agentUserId: string | null;
8326
8415
  profileId: string | null;
8327
8416
  title: string | null;
8328
8417
  preview: string | null;
@@ -8331,7 +8420,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8331
8420
  systemData: unknown;
8332
8421
  version: number;
8333
8422
  createdByKind: ProvenanceKind | null;
8334
- agentUserId: string | null;
8335
8423
  sourceProposalId: string | null;
8336
8424
  deletedAt: Date | null;
8337
8425
  } | null;
@@ -8453,6 +8541,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8453
8541
  createdByUserId: string | null;
8454
8542
  createdAt: Date;
8455
8543
  correlationId: string | null;
8544
+ agentUserId: string | null;
8456
8545
  profileId: string | null;
8457
8546
  title: string | null;
8458
8547
  preview: string | null;
@@ -8461,7 +8550,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8461
8550
  systemData: unknown;
8462
8551
  version: number;
8463
8552
  createdByKind: ProvenanceKind | null;
8464
- agentUserId: string | null;
8465
8553
  sourceProposalId: string | null;
8466
8554
  deletedAt: Date | null;
8467
8555
  };
@@ -8478,6 +8566,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8478
8566
  createdByUserId: string | null;
8479
8567
  createdAt: Date;
8480
8568
  correlationId: string | null;
8569
+ agentUserId: string | null;
8481
8570
  profileId: string | null;
8482
8571
  title: string | null;
8483
8572
  preview: string | null;
@@ -8486,7 +8575,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8486
8575
  systemData: unknown;
8487
8576
  version: number;
8488
8577
  createdByKind: ProvenanceKind | null;
8489
- agentUserId: string | null;
8490
8578
  sourceProposalId: string | null;
8491
8579
  deletedAt: Date | null;
8492
8580
  };
@@ -8499,8 +8587,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8499
8587
  createdAt: Date;
8500
8588
  metadata: unknown;
8501
8589
  correlationId: string | null;
8502
- createdByKind: ProvenanceKind | null;
8503
8590
  agentUserId: string | null;
8591
+ createdByKind: ProvenanceKind | null;
8504
8592
  sourceProposalId: string | null;
8505
8593
  sourceEntityId: string | null;
8506
8594
  targetEntityId: string | null;
@@ -8535,6 +8623,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8535
8623
  createdByUserId: string | null;
8536
8624
  createdAt: Date;
8537
8625
  correlationId: string | null;
8626
+ agentUserId: string | null;
8538
8627
  profileId: string | null;
8539
8628
  title: string | null;
8540
8629
  preview: string | null;
@@ -8543,7 +8632,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8543
8632
  systemData: unknown;
8544
8633
  version: number;
8545
8634
  createdByKind: ProvenanceKind | null;
8546
- agentUserId: string | null;
8547
8635
  sourceProposalId: string | null;
8548
8636
  deletedAt: Date | null;
8549
8637
  }[];
@@ -8556,8 +8644,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8556
8644
  createdAt: Date;
8557
8645
  metadata: unknown;
8558
8646
  correlationId: string | null;
8559
- createdByKind: ProvenanceKind | null;
8560
8647
  agentUserId: string | null;
8648
+ createdByKind: ProvenanceKind | null;
8561
8649
  sourceProposalId: string | null;
8562
8650
  sourceEntityId: string | null;
8563
8651
  targetEntityId: string | null;
@@ -8591,8 +8679,8 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8591
8679
  createdAt: Date;
8592
8680
  metadata: unknown;
8593
8681
  correlationId: string | null;
8594
- createdByKind: ProvenanceKind | null;
8595
8682
  agentUserId: string | null;
8683
+ createdByKind: ProvenanceKind | null;
8596
8684
  sourceProposalId: string | null;
8597
8685
  sourceEntityId: string | null;
8598
8686
  targetEntityId: string | null;
@@ -8975,7 +9063,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8975
9063
  email: string;
8976
9064
  workspaceId: string | null;
8977
9065
  id: string;
8978
- type: "pod" | "workspace";
9066
+ type: "workspace" | "pod";
8979
9067
  token: string;
8980
9068
  createdAt: Date;
8981
9069
  role: string;
@@ -8989,14 +9077,14 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
8989
9077
  }>;
8990
9078
  listInvites: import("@trpc/server").TRPCQueryProcedure<{
8991
9079
  input: {
8992
- type: "pod" | "workspace";
9080
+ type: "workspace" | "pod";
8993
9081
  workspaceId?: string | undefined;
8994
9082
  };
8995
9083
  output: {
8996
9084
  email: string;
8997
9085
  workspaceId: string | null;
8998
9086
  id: string;
8999
- type: "pod" | "workspace";
9087
+ type: "workspace" | "pod";
9000
9088
  token: string;
9001
9089
  createdAt: Date;
9002
9090
  role: string;
@@ -9053,7 +9141,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
9053
9141
  input: void;
9054
9142
  output: {
9055
9143
  id: string;
9056
- type: "pod" | "workspace";
9144
+ type: "workspace" | "pod";
9057
9145
  email: string;
9058
9146
  role: string;
9059
9147
  token: string;
@@ -10190,7 +10278,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10190
10278
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
10191
10279
  createPublicLink: import("@trpc/server").TRPCMutationProcedure<{
10192
10280
  input: {
10193
- resourceType: "entity" | "document" | "view";
10281
+ resourceType: "entity" | "view" | "document";
10194
10282
  resourceId: string;
10195
10283
  expiresInDays?: number | undefined;
10196
10284
  access?: "workspace_only" | "anyone_with_link" | undefined;
@@ -10205,7 +10293,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10205
10293
  }>;
10206
10294
  invite: import("@trpc/server").TRPCMutationProcedure<{
10207
10295
  input: {
10208
- resourceType: "entity" | "document" | "view";
10296
+ resourceType: "entity" | "view" | "document";
10209
10297
  resourceId: string;
10210
10298
  userEmail: string;
10211
10299
  };
@@ -10239,6 +10327,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10239
10327
  createdByUserId: string | null;
10240
10328
  createdAt: Date;
10241
10329
  correlationId: string | null;
10330
+ agentUserId: string | null;
10242
10331
  profileId: string | null;
10243
10332
  title: string | null;
10244
10333
  preview: string | null;
@@ -10247,7 +10336,6 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10247
10336
  systemData: unknown;
10248
10337
  version: number;
10249
10338
  createdByKind: ProvenanceKind | null;
10250
- agentUserId: string | null;
10251
10339
  sourceProposalId: string | null;
10252
10340
  deletedAt: Date | null;
10253
10341
  } | {
@@ -10312,7 +10400,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10312
10400
  }>;
10313
10401
  list: import("@trpc/server").TRPCQueryProcedure<{
10314
10402
  input: {
10315
- resourceType: "entity" | "document" | "view";
10403
+ resourceType: "entity" | "view" | "document";
10316
10404
  resourceId: string;
10317
10405
  visibility?: "private" | "public" | undefined;
10318
10406
  expiresAt?: Date | undefined;
@@ -10795,7 +10883,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10795
10883
  input: {
10796
10884
  workspaceId?: string | undefined;
10797
10885
  kind?: "code" | "instruction" | undefined;
10798
- scope?: "user" | "pod" | "workspace" | undefined;
10886
+ scope?: "user" | "workspace" | "pod" | undefined;
10799
10887
  status?: "error" | "active" | "inactive" | "all" | undefined;
10800
10888
  limit?: number | undefined;
10801
10889
  offset?: number | undefined;
@@ -10820,7 +10908,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10820
10908
  code: string;
10821
10909
  workspaceId?: string | undefined;
10822
10910
  kind?: "code" | "instruction" | undefined;
10823
- scope?: "user" | "pod" | "workspace" | undefined;
10911
+ scope?: "user" | "workspace" | "pod" | undefined;
10824
10912
  agentTypes?: string[] | undefined;
10825
10913
  description?: string | undefined;
10826
10914
  parameters?: Record<string, unknown> | undefined;
@@ -10843,7 +10931,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10843
10931
  input: {
10844
10932
  id: string;
10845
10933
  kind?: "code" | "instruction" | undefined;
10846
- scope?: "user" | "pod" | "workspace" | undefined;
10934
+ scope?: "user" | "workspace" | "pod" | undefined;
10847
10935
  agentTypes?: string[] | null | undefined;
10848
10936
  name?: string | undefined;
10849
10937
  description?: string | undefined;
@@ -10906,7 +10994,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10906
10994
  createTrigger: import("@trpc/server").TRPCMutationProcedure<{
10907
10995
  input: {
10908
10996
  skillId: string;
10909
- type: "entity_event" | "cron" | "manual";
10997
+ type: "cron" | "manual" | "entity_event";
10910
10998
  eventPattern?: string | undefined;
10911
10999
  filters?: Record<string, unknown> | undefined;
10912
11000
  cronExpression?: string | undefined;
@@ -10916,7 +11004,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10916
11004
  userId: string;
10917
11005
  workspaceId: string | null;
10918
11006
  id: string;
10919
- type: "entity_event" | "cron" | "manual";
11007
+ type: "cron" | "manual" | "entity_event";
10920
11008
  updatedAt: Date;
10921
11009
  createdAt: Date;
10922
11010
  isActive: boolean;
@@ -10934,19 +11022,19 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10934
11022
  skillId?: string | undefined;
10935
11023
  };
10936
11024
  output: {
11025
+ userId: string;
11026
+ workspaceId: string | null;
10937
11027
  id: string;
11028
+ type: "cron" | "manual" | "entity_event";
11029
+ updatedAt: Date;
11030
+ createdAt: Date;
11031
+ isActive: boolean;
11032
+ channelType: "personal_thread" | "new_thread";
11033
+ filters: Record<string, unknown> | null;
10938
11034
  skillId: string;
10939
- workspaceId: string | null;
10940
- userId: string;
10941
- type: "entity_event" | "cron" | "manual";
10942
11035
  eventPattern: string | null;
10943
- filters: Record<string, unknown> | null;
10944
11036
  cronExpression: string | null;
10945
- channelType: "personal_thread" | "new_thread";
10946
- isActive: boolean;
10947
11037
  automationId: string | null;
10948
- createdAt: Date;
10949
- updatedAt: Date;
10950
11038
  }[];
10951
11039
  meta: object;
10952
11040
  }>;
@@ -10960,7 +11048,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
10960
11048
  skillId: string;
10961
11049
  workspaceId: string | null;
10962
11050
  userId: string;
10963
- type: "entity_event" | "cron" | "manual";
11051
+ type: "cron" | "manual" | "entity_event";
10964
11052
  eventPattern: string | null;
10965
11053
  filters: Record<string, unknown> | null;
10966
11054
  cronExpression: string | null;
@@ -11275,7 +11363,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11275
11363
  parentProfileId: string | null;
11276
11364
  defaultValues: unknown;
11277
11365
  semanticSlug: string | null;
11278
- entityScope: "pod" | "workspace";
11366
+ entityScope: "workspace" | "pod";
11279
11367
  defaultListRenderer: unknown;
11280
11368
  defaultDetailRenderer: unknown;
11281
11369
  defaultDashboardRenderer: unknown;
@@ -11304,7 +11392,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11304
11392
  parentProfileId: string | null;
11305
11393
  defaultValues: unknown;
11306
11394
  semanticSlug: string | null;
11307
- entityScope: "pod" | "workspace";
11395
+ entityScope: "workspace" | "pod";
11308
11396
  defaultListRenderer: unknown;
11309
11397
  defaultDetailRenderer: unknown;
11310
11398
  defaultDashboardRenderer: unknown;
@@ -11323,7 +11411,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11323
11411
  defaultValues?: Record<string, unknown> | undefined;
11324
11412
  scope?: "user" | "shared" | "system" | "workspace" | undefined;
11325
11413
  allowedWorkspaceIds?: string[] | undefined;
11326
- entityScope?: "pod" | "workspace" | undefined;
11414
+ entityScope?: "workspace" | "pod" | undefined;
11327
11415
  source?: "user" | "system" | "ai" | "intelligence" | undefined;
11328
11416
  reasoning?: string | undefined;
11329
11417
  agentUserId?: string | undefined;
@@ -11344,7 +11432,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11344
11432
  parentProfileId: string | null;
11345
11433
  defaultValues: unknown;
11346
11434
  semanticSlug: string | null;
11347
- entityScope: "pod" | "workspace";
11435
+ entityScope: "workspace" | "pod";
11348
11436
  defaultListRenderer: unknown;
11349
11437
  defaultDetailRenderer: unknown;
11350
11438
  defaultDashboardRenderer: unknown;
@@ -11376,7 +11464,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11376
11464
  parentProfileId: string | null;
11377
11465
  defaultValues: unknown;
11378
11466
  semanticSlug: string | null;
11379
- entityScope: "pod" | "workspace";
11467
+ entityScope: "workspace" | "pod";
11380
11468
  defaultListRenderer: unknown;
11381
11469
  defaultDetailRenderer: unknown;
11382
11470
  defaultDashboardRenderer: unknown;
@@ -11398,7 +11486,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11398
11486
  defaultValues?: Record<string, unknown> | undefined;
11399
11487
  scope?: "user" | "shared" | "system" | "workspace" | undefined;
11400
11488
  allowedWorkspaceIds?: string[] | undefined;
11401
- entityScope?: "pod" | "workspace" | undefined;
11489
+ entityScope?: "workspace" | "pod" | undefined;
11402
11490
  defaultListRenderer?: {
11403
11491
  kind: "cell";
11404
11492
  cellKey: string;
@@ -11521,7 +11609,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11521
11609
  parentProfileId: string | null;
11522
11610
  defaultValues: unknown;
11523
11611
  semanticSlug: string | null;
11524
- entityScope: "pod" | "workspace";
11612
+ entityScope: "workspace" | "pod";
11525
11613
  defaultListRenderer: unknown;
11526
11614
  defaultDetailRenderer: unknown;
11527
11615
  defaultDashboardRenderer: unknown;
@@ -11568,7 +11656,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11568
11656
  parentProfileId: string | null;
11569
11657
  defaultValues: unknown;
11570
11658
  semanticSlug: string | null;
11571
- entityScope: "pod" | "workspace";
11659
+ entityScope: "workspace" | "pod";
11572
11660
  defaultListRenderer: unknown;
11573
11661
  defaultDetailRenderer: unknown;
11574
11662
  defaultDashboardRenderer: unknown;
@@ -11607,7 +11695,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11607
11695
  parentProfileId: string | null;
11608
11696
  defaultValues: unknown;
11609
11697
  semanticSlug: string | null;
11610
- entityScope: "pod" | "workspace";
11698
+ entityScope: "workspace" | "pod";
11611
11699
  defaultListRenderer: unknown;
11612
11700
  defaultDetailRenderer: unknown;
11613
11701
  defaultDashboardRenderer: unknown;
@@ -11637,7 +11725,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
11637
11725
  parentProfileId: string | null;
11638
11726
  defaultValues: unknown;
11639
11727
  semanticSlug: string | null;
11640
- entityScope: "pod" | "workspace";
11728
+ entityScope: "workspace" | "pod";
11641
11729
  defaultListRenderer: unknown;
11642
11730
  defaultDetailRenderer: unknown;
11643
11731
  defaultDashboardRenderer: unknown;
@@ -13083,6 +13171,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
13083
13171
  source: "markdown" | "obsidian" | "csv" | "bookmark";
13084
13172
  operations: Record<string, unknown>[];
13085
13173
  workspaceId?: string | undefined;
13174
+ idempotencyKey?: string | undefined;
13086
13175
  };
13087
13176
  output: {
13088
13177
  workspaceId: string;
@@ -13092,6 +13181,58 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
13092
13181
  };
13093
13182
  meta: object;
13094
13183
  }>;
13184
+ analyzeLarge: import("@trpc/server").TRPCMutationProcedure<{
13185
+ input: {
13186
+ source: "markdown" | "obsidian" | "csv" | "bookmark";
13187
+ items: {
13188
+ path: string;
13189
+ content: string;
13190
+ }[];
13191
+ workspaceId?: string | undefined;
13192
+ relationType?: string | undefined;
13193
+ aiStructure?: boolean | undefined;
13194
+ };
13195
+ output: {
13196
+ workspaceId: string;
13197
+ source: ImportRevealSource;
13198
+ mode: "deep";
13199
+ proposalId: string | null;
13200
+ operations: CompositeProposalOperation[];
13201
+ summary: string;
13202
+ stats: {
13203
+ itemsProcessed: number;
13204
+ itemsFailed: number;
13205
+ entityCount: number;
13206
+ relationCount: number;
13207
+ duplicatesMerged: number;
13208
+ linkedToExisting: number;
13209
+ documentCount: number;
13210
+ sourceDocCount: number;
13211
+ byType: Record<string, number>;
13212
+ wikilinkLinksResolved: number;
13213
+ wikilinkLinksUnresolved: number;
13214
+ chunks: number;
13215
+ };
13216
+ aiTyped: number;
13217
+ };
13218
+ meta: object;
13219
+ }>;
13220
+ applyLarge: import("@trpc/server").TRPCMutationProcedure<{
13221
+ input: {
13222
+ source: "markdown" | "obsidian" | "csv" | "bookmark";
13223
+ operations: Record<string, unknown>[];
13224
+ workspaceId?: string | undefined;
13225
+ idempotencyKey?: string | undefined;
13226
+ };
13227
+ output: {
13228
+ workspaceId: string;
13229
+ source: ImportRevealSource;
13230
+ created: number;
13231
+ linked: number;
13232
+ chunks: number;
13233
+ };
13234
+ meta: object;
13235
+ }>;
13095
13236
  linkedInContacts: import("@trpc/server").TRPCMutationProcedure<{
13096
13237
  input: {
13097
13238
  contacts: {
@@ -13645,7 +13786,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
13645
13786
  addPeer: import("@trpc/server").TRPCMutationProcedure<{
13646
13787
  input: {
13647
13788
  peerPodUrl: string;
13648
- direction: "push" | "bidirectional" | "pull";
13789
+ direction: "push" | "bidirectional" | "pull" | "inbound";
13649
13790
  label?: string | undefined;
13650
13791
  authToken?: string | undefined;
13651
13792
  workspaceIds?: string[] | undefined;
@@ -15068,6 +15209,49 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
15068
15209
  };
15069
15210
  transformer: true;
15070
15211
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
15212
+ links: import("@trpc/server").TRPCBuiltRouter<{
15213
+ ctx: Context;
15214
+ meta: object;
15215
+ errorShape: {
15216
+ message: string;
15217
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
15218
+ data: import("@trpc/server").TRPCDefaultErrorData;
15219
+ };
15220
+ transformer: true;
15221
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
15222
+ bySession: import("@trpc/server").TRPCQueryProcedure<{
15223
+ input: {
15224
+ sessionId: string;
15225
+ };
15226
+ output: {
15227
+ edges: {
15228
+ workspaceId: string | null;
15229
+ id: string;
15230
+ createdAt: Date;
15231
+ metadata: unknown;
15232
+ createdBy: string | null;
15233
+ linkType: LinkType;
15234
+ fromType: LinkEndpointType;
15235
+ fromId: string;
15236
+ toType: LinkEndpointType;
15237
+ toId: string;
15238
+ }[];
15239
+ grouped: Record<string, {
15240
+ workspaceId: string | null;
15241
+ id: string;
15242
+ createdAt: Date;
15243
+ metadata: unknown;
15244
+ createdBy: string | null;
15245
+ linkType: LinkType;
15246
+ fromType: LinkEndpointType;
15247
+ fromId: string;
15248
+ toType: LinkEndpointType;
15249
+ toId: string;
15250
+ }[]>;
15251
+ };
15252
+ meta: object;
15253
+ }>;
15254
+ }>>;
15071
15255
  list: import("@trpc/server").TRPCQueryProcedure<{
15072
15256
  input: {
15073
15257
  workspaceId: string;
@@ -15555,6 +15739,133 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
15555
15739
  };
15556
15740
  meta: object;
15557
15741
  }>;
15742
+ run: import("@trpc/server").TRPCMutationProcedure<{
15743
+ input: {
15744
+ playbookId: string;
15745
+ params?: Record<string, unknown> | undefined;
15746
+ agentIds?: string[] | undefined;
15747
+ agentUserId?: string | undefined;
15748
+ source?: string | undefined;
15749
+ reasoning?: string | undefined;
15750
+ };
15751
+ output: {
15752
+ run: null;
15753
+ session: FocusSession | null;
15754
+ status: "proposed";
15755
+ message: string;
15756
+ proposalId: string;
15757
+ } | {
15758
+ run: {
15759
+ error: string | null;
15760
+ workspaceId: string | null;
15761
+ sessionId: string | null;
15762
+ id: string;
15763
+ input: unknown;
15764
+ startedAt: Date;
15765
+ status: PlaybookRunStatus;
15766
+ createdBy: string;
15767
+ completedAt: Date | null;
15768
+ playbookId: string;
15769
+ executor: PlaybookRunExecutorRef;
15770
+ summary: string | null;
15771
+ };
15772
+ session: {
15773
+ userId: string;
15774
+ workspaceId: string;
15775
+ id: string;
15776
+ updatedAt: Date;
15777
+ createdAt: Date;
15778
+ correlationId: string | null;
15779
+ channelId: string | null;
15780
+ startedAt: Date;
15781
+ status: "active" | "paused" | "closed";
15782
+ goal: string;
15783
+ templateId: string | null;
15784
+ playbookId: string | null;
15785
+ expectedOutputs: unknown;
15786
+ progress: number | null;
15787
+ agentIds: string[] | null;
15788
+ closedAt: Date | null;
15789
+ contextReport: unknown;
15790
+ planReport: unknown;
15791
+ executionLog: unknown;
15792
+ verificationReport: unknown;
15793
+ };
15794
+ status: "running";
15795
+ message: string;
15796
+ proposalId: string | null;
15797
+ };
15798
+ meta: object;
15799
+ }>;
15800
+ }>>;
15801
+ playbookRuns: import("@trpc/server").TRPCBuiltRouter<{
15802
+ ctx: Context;
15803
+ meta: object;
15804
+ errorShape: {
15805
+ message: string;
15806
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
15807
+ data: import("@trpc/server").TRPCDefaultErrorData;
15808
+ };
15809
+ transformer: true;
15810
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
15811
+ listBySession: import("@trpc/server").TRPCQueryProcedure<{
15812
+ input: {
15813
+ sessionId: string;
15814
+ };
15815
+ output: {
15816
+ id: string;
15817
+ workspaceId: string | null;
15818
+ playbookId: string;
15819
+ sessionId: string | null;
15820
+ executor: PlaybookRunExecutorRef;
15821
+ status: PlaybookRunStatus;
15822
+ input: unknown;
15823
+ summary: string | null;
15824
+ error: string | null;
15825
+ startedAt: Date;
15826
+ completedAt: Date | null;
15827
+ createdBy: string;
15828
+ }[];
15829
+ meta: object;
15830
+ }>;
15831
+ }>>;
15832
+ agentRuns: import("@trpc/server").TRPCBuiltRouter<{
15833
+ ctx: Context;
15834
+ meta: object;
15835
+ errorShape: {
15836
+ message: string;
15837
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
15838
+ data: import("@trpc/server").TRPCDefaultErrorData;
15839
+ };
15840
+ transformer: true;
15841
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
15842
+ list: import("@trpc/server").TRPCQueryProcedure<{
15843
+ input: {
15844
+ workspaceId?: string | undefined;
15845
+ limit?: number | undefined;
15846
+ };
15847
+ output: {
15848
+ id: string;
15849
+ agentUserId: string | undefined;
15850
+ agentType: string | undefined;
15851
+ model: string | undefined;
15852
+ provider: string | undefined;
15853
+ costUsd: number | null | undefined;
15854
+ tokensIn: number | undefined;
15855
+ tokensOut: number | undefined;
15856
+ tokensTotal: number | undefined;
15857
+ latencyMs: number | undefined;
15858
+ toolCount: number | undefined;
15859
+ runStatus: string | undefined;
15860
+ finishReason: string | undefined;
15861
+ summary: string | undefined;
15862
+ workspaceId: string | undefined;
15863
+ sessionId: string | undefined;
15864
+ correlationId: string | undefined;
15865
+ createdAt: Date;
15866
+ }[];
15867
+ meta: object;
15868
+ }>;
15558
15869
  }>>;
15559
15870
  artifacts: import("@trpc/server").TRPCBuiltRouter<{
15560
15871
  ctx: Context;
@@ -15577,7 +15888,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
15577
15888
  id: string;
15578
15889
  workspaceId: string;
15579
15890
  userId: string;
15580
- kind: "url" | "entity" | "cell" | "document" | "view";
15891
+ kind: "url" | "entity" | "cell" | "view" | "document";
15581
15892
  refId: string | null;
15582
15893
  cellKey: string | null;
15583
15894
  props: unknown;
@@ -15605,7 +15916,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
15605
15916
  id: string;
15606
15917
  workspaceId: string;
15607
15918
  userId: string;
15608
- kind: "url" | "entity" | "cell" | "document" | "view";
15919
+ kind: "url" | "entity" | "cell" | "view" | "document";
15609
15920
  refId: string | null;
15610
15921
  cellKey: string | null;
15611
15922
  props: unknown;
@@ -15634,7 +15945,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
15634
15945
  updatedAt: Date;
15635
15946
  createdAt: Date;
15636
15947
  title: string;
15637
- kind: "url" | "entity" | "cell" | "document" | "view";
15948
+ kind: "url" | "entity" | "cell" | "view" | "document";
15638
15949
  refId: string | null;
15639
15950
  cellKey: string | null;
15640
15951
  props: unknown;
@@ -15649,7 +15960,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
15649
15960
  }>;
15650
15961
  create: import("@trpc/server").TRPCMutationProcedure<{
15651
15962
  input: {
15652
- kind: "url" | "entity" | "cell" | "document" | "view";
15963
+ kind: "url" | "entity" | "cell" | "view" | "document";
15653
15964
  title: string;
15654
15965
  refId?: string | undefined;
15655
15966
  cellKey?: string | undefined;
@@ -15667,7 +15978,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
15667
15978
  updatedAt: Date;
15668
15979
  createdAt: Date;
15669
15980
  title: string;
15670
- kind: "url" | "entity" | "cell" | "document" | "view";
15981
+ kind: "url" | "entity" | "cell" | "view" | "document";
15671
15982
  refId: string | null;
15672
15983
  cellKey: string | null;
15673
15984
  props: unknown;
@@ -15694,7 +16005,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
15694
16005
  updatedAt: Date;
15695
16006
  createdAt: Date;
15696
16007
  title: string;
15697
- kind: "url" | "entity" | "cell" | "document" | "view";
16008
+ kind: "url" | "entity" | "cell" | "view" | "document";
15698
16009
  refId: string | null;
15699
16010
  cellKey: string | null;
15700
16011
  props: unknown;