@inkeep/agents-core 0.50.3 → 0.50.5

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.
Files changed (39) hide show
  1. package/dist/auth/auth-schema.d.ts +105 -105
  2. package/dist/auth/auth-validation-schemas.d.ts +148 -148
  3. package/dist/auth/auth.d.ts +53 -53
  4. package/dist/auth/permissions.d.ts +13 -13
  5. package/dist/client-exports.d.ts +11 -12
  6. package/dist/data-access/manage/agents.d.ts +40 -40
  7. package/dist/data-access/manage/artifactComponents.d.ts +12 -12
  8. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  9. package/dist/data-access/manage/dataComponents.d.ts +6 -6
  10. package/dist/data-access/manage/functionTools.d.ts +18 -18
  11. package/dist/data-access/manage/scope-helpers.d.ts +5 -5
  12. package/dist/data-access/manage/skills.d.ts +14 -14
  13. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
  14. package/dist/data-access/manage/subAgentRelations.d.ts +28 -28
  15. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  16. package/dist/data-access/manage/subAgents.d.ts +24 -24
  17. package/dist/data-access/manage/tools.d.ts +24 -24
  18. package/dist/data-access/runtime/apiKeys.d.ts +12 -12
  19. package/dist/data-access/runtime/conversations.d.ts +27 -27
  20. package/dist/data-access/runtime/messages.d.ts +9 -9
  21. package/dist/data-access/runtime/tasks.d.ts +6 -6
  22. package/dist/data-access/runtime/workAppSlack.js +1 -0
  23. package/dist/db/manage/manage-schema.js +1 -1
  24. package/dist/db/runtime/runtime-schema.d.ts +25 -8
  25. package/dist/db/runtime/runtime-schema.js +1 -0
  26. package/dist/middleware/no-auth.d.ts +2 -2
  27. package/dist/types/utility.d.ts +6 -0
  28. package/dist/utils/slack-user-token.d.ts +11 -0
  29. package/dist/utils/slack-user-token.js +11 -3
  30. package/dist/validation/dolt-schemas.d.ts +1 -1
  31. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  32. package/dist/validation/schemas.d.ts +1977 -1977
  33. package/drizzle/manage/0010_oval_angel.sql +2 -0
  34. package/drizzle/manage/meta/0010_snapshot.json +3673 -0
  35. package/drizzle/manage/meta/_journal.json +7 -0
  36. package/drizzle/runtime/0014_odd_oracle.sql +1 -0
  37. package/drizzle/runtime/meta/0014_snapshot.json +3753 -0
  38. package/drizzle/runtime/meta/_journal.json +7 -0
  39. package/package.json +1 -1
@@ -20,11 +20,11 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
20
20
  }) => Promise<{
21
21
  id: string;
22
22
  name: string;
23
- createdAt: string;
24
- updatedAt: string;
25
23
  description: string | null;
26
- projectId: string;
27
24
  tenantId: string;
25
+ projectId: string;
26
+ createdAt: string;
27
+ updatedAt: string;
28
28
  headers: Record<string, string> | null;
29
29
  config: {
30
30
  type: "mcp";
@@ -78,11 +78,11 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
78
78
  declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
79
79
  id: string;
80
80
  name: string;
81
- createdAt: string;
82
- updatedAt: string;
83
81
  description: string | null;
84
- projectId: string;
85
82
  tenantId: string;
83
+ projectId: string;
84
+ createdAt: string;
85
+ updatedAt: string;
86
86
  headers: Record<string, string> | null;
87
87
  config: {
88
88
  type: "mcp";
@@ -134,17 +134,17 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
134
134
  }> | null;
135
135
  }) => Promise<{
136
136
  id: string;
137
+ tenantId: string;
138
+ projectId: string;
139
+ agentId: string;
137
140
  createdAt: string;
138
141
  updatedAt: string;
139
- agentId: string;
140
- projectId: string;
141
- tenantId: string;
142
- headers: Record<string, string> | null;
143
142
  toolId: string;
144
- subAgentId: string;
143
+ headers: Record<string, string> | null;
145
144
  toolPolicies: Record<string, {
146
145
  needsApproval?: boolean;
147
146
  }> | null;
147
+ subAgentId: string;
148
148
  selectedTools: string[] | null;
149
149
  }>;
150
150
  declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -153,17 +153,17 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
153
153
  toolId: string;
154
154
  }) => Promise<{
155
155
  id: string;
156
+ tenantId: string;
157
+ projectId: string;
158
+ agentId: string;
156
159
  createdAt: string;
157
160
  updatedAt: string;
158
- agentId: string;
159
- projectId: string;
160
- tenantId: string;
161
- headers: Record<string, string> | null;
162
161
  toolId: string;
163
- subAgentId: string;
162
+ headers: Record<string, string> | null;
164
163
  toolPolicies: Record<string, {
165
164
  needsApproval?: boolean;
166
165
  }> | null;
166
+ subAgentId: string;
167
167
  selectedTools: string[] | null;
168
168
  }>;
169
169
  /**
@@ -181,17 +181,17 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
181
181
  relationId?: string;
182
182
  }) => Promise<{
183
183
  id: string;
184
+ tenantId: string;
185
+ projectId: string;
186
+ agentId: string;
184
187
  createdAt: string;
185
188
  updatedAt: string;
186
- agentId: string;
187
- projectId: string;
188
- tenantId: string;
189
- headers: Record<string, string> | null;
190
189
  toolId: string;
191
- subAgentId: string;
190
+ headers: Record<string, string> | null;
192
191
  toolPolicies: Record<string, {
193
192
  needsApproval?: boolean;
194
193
  }> | null;
194
+ subAgentId: string;
195
195
  selectedTools: string[] | null;
196
196
  }>;
197
197
  /**
@@ -202,11 +202,11 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
202
202
  }) => Promise<{
203
203
  id: string;
204
204
  name: string;
205
- createdAt: string;
206
- updatedAt: string;
207
205
  description: string | null;
208
- projectId: string;
209
206
  tenantId: string;
207
+ projectId: string;
208
+ createdAt: string;
209
+ updatedAt: string;
210
210
  headers: Record<string, string> | null;
211
211
  config: {
212
212
  type: "mcp";
@@ -9,12 +9,12 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
9
9
  }) => Promise<{
10
10
  id: string;
11
11
  name: string | null;
12
+ tenantId: string;
13
+ projectId: string;
14
+ agentId: string;
12
15
  createdAt: string;
13
16
  updatedAt: string;
14
17
  expiresAt: string | null;
15
- agentId: string;
16
- projectId: string;
17
- tenantId: string;
18
18
  publicId: string;
19
19
  keyHash: string;
20
20
  keyPrefix: string;
@@ -23,12 +23,12 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
23
23
  declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
24
24
  id: string;
25
25
  name: string | null;
26
+ tenantId: string;
27
+ projectId: string;
28
+ agentId: string;
26
29
  createdAt: string;
27
30
  updatedAt: string;
28
31
  expiresAt: string | null;
29
- agentId: string;
30
- projectId: string;
31
- tenantId: string;
32
32
  publicId: string;
33
33
  keyHash: string;
34
34
  keyPrefix: string;
@@ -40,12 +40,12 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
40
40
  }) => Promise<{
41
41
  id: string;
42
42
  name: string | null;
43
+ tenantId: string;
44
+ projectId: string;
45
+ agentId: string;
43
46
  createdAt: string;
44
47
  updatedAt: string;
45
48
  expiresAt: string | null;
46
- agentId: string;
47
- projectId: string;
48
- tenantId: string;
49
49
  publicId: string;
50
50
  keyHash: string;
51
51
  keyPrefix: string;
@@ -67,12 +67,12 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
67
67
  declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
68
68
  id: string;
69
69
  name: string | null;
70
+ tenantId: string;
71
+ projectId: string;
72
+ agentId: string;
70
73
  createdAt: string;
71
74
  updatedAt: string;
72
75
  expiresAt: string | null;
73
- agentId: string;
74
- projectId: string;
75
- tenantId: string;
76
76
  publicId: string;
77
77
  keyHash: string;
78
78
  keyPrefix: string;
@@ -16,19 +16,19 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
16
16
  }>;
17
17
  declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
18
18
  id: string;
19
+ tenantId: string;
20
+ projectId: string;
21
+ agentId: string | null;
22
+ title: string | null;
19
23
  createdAt: string;
20
24
  updatedAt: string;
25
+ metadata: ConversationMetadata | null;
21
26
  ref: {
22
- type: "commit" | "tag" | "branch";
27
+ type: "tag" | "commit" | "branch";
23
28
  name: string;
24
29
  hash: string;
25
30
  } | null;
26
31
  userId: string | null;
27
- metadata: ConversationMetadata | null;
28
- title: string | null;
29
- agentId: string | null;
30
- projectId: string;
31
- tenantId: string;
32
32
  activeSubAgentId: string;
33
33
  lastContextResolution: string | null;
34
34
  }>;
@@ -43,7 +43,7 @@ declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
43
43
  agentId: string | null;
44
44
  activeSubAgentId: string;
45
45
  ref: {
46
- type: "commit" | "tag" | "branch";
46
+ type: "tag" | "commit" | "branch";
47
47
  name: string;
48
48
  hash: string;
49
49
  } | null;
@@ -69,7 +69,7 @@ declare const updateConversationActiveSubAgent: (db: AgentsRunDatabaseClient) =>
69
69
  agentId: string | null;
70
70
  activeSubAgentId: string;
71
71
  ref: {
72
- type: "commit" | "tag" | "branch";
72
+ type: "tag" | "commit" | "branch";
73
73
  name: string;
74
74
  hash: string;
75
75
  } | null;
@@ -85,19 +85,19 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
85
85
  conversationId: string;
86
86
  }) => Promise<{
87
87
  id: string;
88
+ tenantId: string;
89
+ projectId: string;
90
+ agentId: string | null;
91
+ title: string | null;
88
92
  createdAt: string;
89
93
  updatedAt: string;
94
+ metadata: ConversationMetadata | null;
90
95
  ref: {
91
- type: "commit" | "tag" | "branch";
96
+ type: "tag" | "commit" | "branch";
92
97
  name: string;
93
98
  hash: string;
94
99
  } | null;
95
100
  userId: string | null;
96
- metadata: ConversationMetadata | null;
97
- title: string | null;
98
- agentId: string | null;
99
- projectId: string;
100
- tenantId: string;
101
101
  activeSubAgentId: string;
102
102
  lastContextResolution: string | null;
103
103
  } | undefined>;
@@ -107,7 +107,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
107
107
  tenantId: string;
108
108
  id: string;
109
109
  ref: {
110
- type: "commit" | "tag" | "branch";
110
+ type: "tag" | "commit" | "branch";
111
111
  name: string;
112
112
  hash: string;
113
113
  };
@@ -121,19 +121,19 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
121
121
  contextConfigId?: string | undefined;
122
122
  } | {
123
123
  id: string;
124
+ tenantId: string;
125
+ projectId: string;
126
+ agentId: string | null;
127
+ title: string | null;
124
128
  createdAt: string;
125
129
  updatedAt: string;
130
+ metadata: ConversationMetadata | null;
126
131
  ref: {
127
- type: "commit" | "tag" | "branch";
132
+ type: "tag" | "commit" | "branch";
128
133
  name: string;
129
134
  hash: string;
130
135
  } | null;
131
136
  userId: string | null;
132
- metadata: ConversationMetadata | null;
133
- title: string | null;
134
- agentId: string | null;
135
- projectId: string;
136
- tenantId: string;
137
137
  activeSubAgentId: string;
138
138
  lastContextResolution: string | null;
139
139
  }>;
@@ -153,19 +153,19 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
153
153
  conversationId: string;
154
154
  }) => Promise<{
155
155
  id: string;
156
+ tenantId: string;
157
+ projectId: string;
158
+ agentId: string | null;
159
+ title: string | null;
156
160
  createdAt: string;
157
161
  updatedAt: string;
162
+ metadata: ConversationMetadata | null;
158
163
  ref: {
159
- type: "commit" | "tag" | "branch";
164
+ type: "tag" | "commit" | "branch";
160
165
  name: string;
161
166
  hash: string;
162
167
  } | null;
163
168
  userId: string | null;
164
- metadata: ConversationMetadata | null;
165
- title: string | null;
166
- agentId: string | null;
167
- projectId: string;
168
- tenantId: string;
169
169
  activeSubAgentId: string;
170
170
  lastContextResolution: string | null;
171
171
  } | undefined>;
@@ -10,13 +10,13 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
10
10
  messageId: string;
11
11
  }) => Promise<{
12
12
  id: string;
13
+ tenantId: string;
14
+ projectId: string;
13
15
  createdAt: string;
14
16
  updatedAt: string;
15
17
  metadata: MessageMetadata | null;
16
- role: string;
17
- projectId: string;
18
- tenantId: string;
19
18
  content: MessageContent;
19
+ role: string;
20
20
  conversationId: string;
21
21
  fromSubAgentId: string | null;
22
22
  toSubAgentId: string | null;
@@ -141,13 +141,13 @@ declare const getVisibleMessages: (db: AgentsRunDatabaseClient) => (params: {
141
141
  }[]>;
142
142
  declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageInsert) => Promise<{
143
143
  id: string;
144
+ tenantId: string;
145
+ projectId: string;
144
146
  createdAt: string;
145
147
  updatedAt: string;
146
148
  metadata: MessageMetadata | null;
147
- role: string;
148
- projectId: string;
149
- tenantId: string;
150
149
  content: MessageContent;
150
+ role: string;
151
151
  conversationId: string;
152
152
  fromSubAgentId: string | null;
153
153
  toSubAgentId: string | null;
@@ -194,13 +194,13 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
194
194
  messageId: string;
195
195
  }) => Promise<{
196
196
  id: string;
197
+ tenantId: string;
198
+ projectId: string;
197
199
  createdAt: string;
198
200
  updatedAt: string;
199
201
  metadata: MessageMetadata | null;
200
- role: string;
201
- projectId: string;
202
- tenantId: string;
203
202
  content: MessageContent;
203
+ role: string;
204
204
  conversationId: string;
205
205
  fromSubAgentId: string | null;
206
206
  toSubAgentId: string | null;
@@ -7,18 +7,18 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
7
7
  //#region src/data-access/runtime/tasks.d.ts
8
8
  declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
9
9
  id: string;
10
+ tenantId: string;
11
+ projectId: string;
12
+ agentId: string;
10
13
  createdAt: string;
11
14
  updatedAt: string;
15
+ metadata: TaskMetadataConfig | null;
12
16
  ref: {
13
- type: "commit" | "tag" | "branch";
17
+ type: "tag" | "commit" | "branch";
14
18
  name: string;
15
19
  hash: string;
16
20
  } | null;
17
- metadata: TaskMetadataConfig | null;
18
21
  status: string;
19
- agentId: string;
20
- projectId: string;
21
- tenantId: string;
22
22
  contextId: string;
23
23
  subAgentId: string;
24
24
  }>;
@@ -36,7 +36,7 @@ declare const updateTask: (db: AgentsRunDatabaseClient) => (params: {
36
36
  updatedAt: string;
37
37
  contextId: string;
38
38
  ref: {
39
- type: "commit" | "tag" | "branch";
39
+ type: "tag" | "commit" | "branch";
40
40
  name: string;
41
41
  hash: string;
42
42
  } | null;
@@ -129,6 +129,7 @@ const upsertWorkAppSlackChannelAgentConfig = (db) => async (data) => {
129
129
  slackChannelName: data.slackChannelName,
130
130
  slackChannelType: data.slackChannelType,
131
131
  enabled: data.enabled,
132
+ grantAccessToMembers: data.grantAccessToMembers,
132
133
  configuredByUserId: data.configuredByUserId,
133
134
  updatedAt: now
134
135
  }
@@ -338,7 +338,7 @@ const subAgentSkills = pgTable("sub_agent_skills", {
338
338
  ],
339
339
  name: "sub_agent_skills_skill_fk"
340
340
  }).onDelete("cascade"),
341
- unique("sub_agent_skills_sub_agent_skill_unique").on(table.subAgentId, table.skillId),
341
+ unique("sub_agent_skills_sub_agent_skill_unique").on(table.tenantId, table.projectId, table.agentId, table.subAgentId, table.skillId),
342
342
  index("sub_agent_skills_skill_idx").on(table.skillId)
343
343
  ]);
344
344
  const subAgentRelations = pgTable("sub_agent_relations", {
@@ -216,7 +216,7 @@ declare const conversations: drizzle_orm_pg_core1831.PgTableWithColumns<{
216
216
  dataType: "json";
217
217
  columnType: "PgJsonb";
218
218
  data: {
219
- type: "commit" | "tag" | "branch";
219
+ type: "tag" | "commit" | "branch";
220
220
  name: string;
221
221
  hash: string;
222
222
  };
@@ -232,7 +232,7 @@ declare const conversations: drizzle_orm_pg_core1831.PgTableWithColumns<{
232
232
  generated: undefined;
233
233
  }, {}, {
234
234
  $type: {
235
- type: "commit" | "tag" | "branch";
235
+ type: "tag" | "commit" | "branch";
236
236
  name: string;
237
237
  hash: string;
238
238
  };
@@ -413,7 +413,7 @@ declare const tasks: drizzle_orm_pg_core1831.PgTableWithColumns<{
413
413
  dataType: "json";
414
414
  columnType: "PgJsonb";
415
415
  data: {
416
- type: "commit" | "tag" | "branch";
416
+ type: "tag" | "commit" | "branch";
417
417
  name: string;
418
418
  hash: string;
419
419
  };
@@ -429,7 +429,7 @@ declare const tasks: drizzle_orm_pg_core1831.PgTableWithColumns<{
429
429
  generated: undefined;
430
430
  }, {}, {
431
431
  $type: {
432
- type: "commit" | "tag" | "branch";
432
+ type: "tag" | "commit" | "branch";
433
433
  name: string;
434
434
  hash: string;
435
435
  };
@@ -1743,6 +1743,23 @@ declare const workAppSlackChannelAgentConfigs: drizzle_orm_pg_core1831.PgTableWi
1743
1743
  identity: undefined;
1744
1744
  generated: undefined;
1745
1745
  }, {}, {}>;
1746
+ grantAccessToMembers: drizzle_orm_pg_core1831.PgColumn<{
1747
+ name: "grant_access_to_members";
1748
+ tableName: "work_app_slack_channel_agent_configs";
1749
+ dataType: "boolean";
1750
+ columnType: "PgBoolean";
1751
+ data: boolean;
1752
+ driverParam: boolean;
1753
+ notNull: true;
1754
+ hasDefault: true;
1755
+ isPrimaryKey: false;
1756
+ isAutoincrement: false;
1757
+ hasRuntimeDefault: false;
1758
+ enumValues: undefined;
1759
+ baseColumn: never;
1760
+ identity: undefined;
1761
+ generated: undefined;
1762
+ }, {}, {}>;
1746
1763
  };
1747
1764
  dialect: "pg";
1748
1765
  }>;
@@ -3013,7 +3030,7 @@ declare const contextCache: drizzle_orm_pg_core1831.PgTableWithColumns<{
3013
3030
  dataType: "json";
3014
3031
  columnType: "PgJsonb";
3015
3032
  data: {
3016
- type: "commit" | "tag" | "branch";
3033
+ type: "tag" | "commit" | "branch";
3017
3034
  name: string;
3018
3035
  hash: string;
3019
3036
  };
@@ -3029,7 +3046,7 @@ declare const contextCache: drizzle_orm_pg_core1831.PgTableWithColumns<{
3029
3046
  generated: undefined;
3030
3047
  }, {}, {
3031
3048
  $type: {
3032
- type: "commit" | "tag" | "branch";
3049
+ type: "tag" | "commit" | "branch";
3033
3050
  name: string;
3034
3051
  hash: string;
3035
3052
  };
@@ -3933,7 +3950,7 @@ declare const workAppGitHubInstallations: drizzle_orm_pg_core1831.PgTableWithCol
3933
3950
  tableName: "work_app_github_installations";
3934
3951
  dataType: "string";
3935
3952
  columnType: "PgVarchar";
3936
- data: "Organization" | "User";
3953
+ data: "User" | "Organization";
3937
3954
  driverParam: string;
3938
3955
  notNull: true;
3939
3956
  hasDefault: false;
@@ -3946,7 +3963,7 @@ declare const workAppGitHubInstallations: drizzle_orm_pg_core1831.PgTableWithCol
3946
3963
  generated: undefined;
3947
3964
  }, {}, {
3948
3965
  length: 20;
3949
- $type: "Organization" | "User";
3966
+ $type: "User" | "Organization";
3950
3967
  }>;
3951
3968
  status: drizzle_orm_pg_core1831.PgColumn<{
3952
3969
  name: "status";
@@ -228,6 +228,7 @@ const workAppSlackChannelAgentConfigs = pgTable("work_app_slack_channel_agent_co
228
228
  agentName: varchar("agent_name", { length: 256 }),
229
229
  configuredByUserId: text("configured_by_user_id").references(() => user.id, { onDelete: "set null" }),
230
230
  enabled: boolean("enabled").notNull().default(true),
231
+ grantAccessToMembers: boolean("grant_access_to_members").notNull().default(true),
231
232
  ...timestamps
232
233
  }, (table) => [
233
234
  unique("work_app_slack_channel_agent_configs_unique").on(table.tenantId, table.slackTeamId, table.slackChannelId),
@@ -1,6 +1,6 @@
1
- import * as hono0 from "hono";
1
+ import * as hono3 from "hono";
2
2
 
3
3
  //#region src/middleware/no-auth.d.ts
4
- declare const noAuth: () => hono0.MiddlewareHandler<any, string, {}, Response>;
4
+ declare const noAuth: () => hono3.MiddlewareHandler<any, string, {}, Response>;
5
5
  //#endregion
6
6
  export { noAuth };
@@ -243,6 +243,12 @@ interface BaseExecutionContext {
243
243
  type: 'user' | 'api_key';
244
244
  id: string;
245
245
  };
246
+ slack?: {
247
+ authorized: true;
248
+ authSource: 'channel' | 'workspace';
249
+ channelId?: string;
250
+ teamId: string;
251
+ };
246
252
  };
247
253
  }
248
254
  interface FullExecutionContext extends BaseExecutionContext {
@@ -24,6 +24,13 @@ declare const SlackAccessTokenPayloadSchema: z.ZodObject<{
24
24
  userId: z.ZodString;
25
25
  enterpriseId: z.ZodOptional<z.ZodString>;
26
26
  email: z.ZodOptional<z.ZodString>;
27
+ authorized: z.ZodOptional<z.ZodBoolean>;
28
+ authSource: z.ZodOptional<z.ZodEnum<{
29
+ channel: "channel";
30
+ workspace: "workspace";
31
+ }>>;
32
+ channelId: z.ZodOptional<z.ZodString>;
33
+ authorizedProjectId: z.ZodOptional<z.ZodString>;
27
34
  }, z.core.$strip>;
28
35
  }, z.core.$strip>;
29
36
  type SlackAccessTokenPayload = z.infer<typeof SlackAccessTokenPayloadSchema>;
@@ -37,6 +44,10 @@ interface SignSlackUserTokenParams {
37
44
  slackUserId: string;
38
45
  slackEnterpriseId?: string;
39
46
  slackEmail?: string;
47
+ slackAuthorized?: boolean;
48
+ slackAuthSource?: 'channel' | 'workspace';
49
+ slackChannelId?: string;
50
+ slackAuthorizedProjectId?: string;
40
51
  }
41
52
  /**
42
53
  * Result of verifying a Slack user token
@@ -27,8 +27,12 @@ const SlackAccessTokenPayloadSchema = z.object({
27
27
  teamId: z.string().min(1),
28
28
  userId: z.string().min(1),
29
29
  enterpriseId: z.string().min(1).optional(),
30
- email: z.string().email().optional()
31
- })
30
+ email: z.string().email().optional(),
31
+ authorized: z.boolean().optional(),
32
+ authSource: z.enum(["channel", "workspace"]).optional(),
33
+ channelId: z.string().min(1).optional(),
34
+ authorizedProjectId: z.string().min(1).optional()
35
+ }).refine((data) => !data.authorized || data.authorizedProjectId && data.authSource, { message: "When authorized is true, authorizedProjectId and authSource are required" })
32
36
  });
33
37
  /**
34
38
  * Sign a Slack user JWT token for calling Manage/Run APIs.
@@ -53,7 +57,11 @@ async function signSlackUserToken(params) {
53
57
  teamId: params.slackTeamId,
54
58
  userId: params.slackUserId,
55
59
  ...params.slackEnterpriseId && { enterpriseId: params.slackEnterpriseId },
56
- ...params.slackEmail && { email: params.slackEmail }
60
+ ...params.slackEmail && { email: params.slackEmail },
61
+ ...params.slackAuthorized != null && { authorized: params.slackAuthorized },
62
+ ...params.slackAuthSource && { authSource: params.slackAuthSource },
63
+ ...params.slackChannelId && { channelId: params.slackChannelId },
64
+ ...params.slackAuthorizedProjectId && { authorizedProjectId: params.slackAuthorizedProjectId }
57
65
  }
58
66
  }
59
67
  });
@@ -32,8 +32,8 @@ declare const BranchNameParamsSchema: z.ZodObject<{
32
32
  }, z.core.$strip>;
33
33
  declare const ResolvedRefSchema: z.ZodObject<{
34
34
  type: z.ZodEnum<{
35
- commit: "commit";
36
35
  tag: "tag";
36
+ commit: "commit";
37
37
  branch: "branch";
38
38
  }>;
39
39
  name: z.ZodString;
@@ -1,10 +1,10 @@
1
1
  import { z } from "@hono/zod-openapi";
2
- import * as drizzle_zod361 from "drizzle-zod";
2
+ import * as drizzle_zod0 from "drizzle-zod";
3
3
  import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
4
4
 
5
5
  //#region src/validation/drizzle-schema-helpers.d.ts
6
- declare function createSelectSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod361.BuildSchema<"select", T["_"]["columns"], drizzle_zod361.BuildRefine<T["_"]["columns"], undefined>, undefined>;
7
- declare function createInsertSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod361.BuildSchema<"insert", T["_"]["columns"], drizzle_zod361.BuildRefine<Pick<T["_"]["columns"], keyof T["$inferInsert"]>, undefined>, undefined>;
6
+ declare function createSelectSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod0.BuildSchema<"select", T["_"]["columns"], drizzle_zod0.BuildRefine<T["_"]["columns"], undefined>, undefined>;
7
+ declare function createInsertSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod0.BuildSchema<"insert", T["_"]["columns"], drizzle_zod0.BuildRefine<Pick<T["_"]["columns"], keyof T["$inferInsert"]>, undefined>, undefined>;
8
8
  declare const createSelectSchema: typeof createSelectSchemaWithModifiers;
9
9
  declare const createInsertSchema: typeof createInsertSchemaWithModifiers;
10
10
  /**