@inkeep/agents-core 0.50.3 → 0.50.4
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.
- package/dist/auth/auth-schema.d.ts +83 -83
- package/dist/auth/auth-validation-schemas.d.ts +148 -148
- package/dist/auth/auth.d.ts +18 -18
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +11 -12
- package/dist/data-access/manage/agents.d.ts +40 -40
- package/dist/data-access/manage/artifactComponents.d.ts +2 -2
- package/dist/data-access/manage/contextConfigs.d.ts +8 -8
- package/dist/data-access/manage/functionTools.d.ts +2 -2
- package/dist/data-access/manage/skills.d.ts +3 -3
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +6 -6
- package/dist/data-access/manage/subAgentRelations.d.ts +2 -2
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +6 -6
- package/dist/data-access/manage/subAgents.d.ts +24 -24
- package/dist/data-access/manage/tools.d.ts +9 -9
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/conversations.d.ts +11 -11
- package/dist/data-access/runtime/tasks.d.ts +2 -2
- package/dist/data-access/runtime/workAppSlack.js +1 -0
- package/dist/db/manage/manage-schema.d.ts +4 -4
- package/dist/db/runtime/runtime-schema.d.ts +25 -8
- package/dist/db/runtime/runtime-schema.js +1 -0
- package/dist/middleware/no-auth.d.ts +2 -2
- package/dist/types/utility.d.ts +6 -0
- package/dist/utils/slack-user-token.d.ts +11 -0
- package/dist/utils/slack-user-token.js +11 -3
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/schemas.d.ts +1865 -1865
- package/drizzle/runtime/0014_odd_oracle.sql +1 -0
- package/drizzle/runtime/meta/0014_snapshot.json +3753 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +1 -1
|
@@ -11,10 +11,10 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
|
|
|
11
11
|
id: string;
|
|
12
12
|
createdAt: string;
|
|
13
13
|
updatedAt: string;
|
|
14
|
+
headers: Record<string, string> | null;
|
|
14
15
|
agentId: string;
|
|
15
16
|
projectId: string;
|
|
16
17
|
tenantId: string;
|
|
17
|
-
headers: Record<string, string> | null;
|
|
18
18
|
subAgentId: string;
|
|
19
19
|
targetAgentId: string;
|
|
20
20
|
} | undefined>;
|
|
@@ -46,10 +46,10 @@ declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =>
|
|
|
46
46
|
id: string;
|
|
47
47
|
createdAt: string;
|
|
48
48
|
updatedAt: string;
|
|
49
|
+
headers: Record<string, string> | null;
|
|
49
50
|
agentId: string;
|
|
50
51
|
projectId: string;
|
|
51
52
|
tenantId: string;
|
|
52
|
-
headers: Record<string, string> | null;
|
|
53
53
|
subAgentId: string;
|
|
54
54
|
targetAgentId: string;
|
|
55
55
|
}[]>;
|
|
@@ -59,10 +59,10 @@ declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseCli
|
|
|
59
59
|
id: string;
|
|
60
60
|
createdAt: string;
|
|
61
61
|
updatedAt: string;
|
|
62
|
+
headers: Record<string, string> | null;
|
|
62
63
|
agentId: string;
|
|
63
64
|
projectId: string;
|
|
64
65
|
tenantId: string;
|
|
65
|
-
headers: Record<string, string> | null;
|
|
66
66
|
subAgentId: string;
|
|
67
67
|
targetAgentId: string;
|
|
68
68
|
}[]>;
|
|
@@ -212,10 +212,10 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
212
212
|
id: string;
|
|
213
213
|
createdAt: string;
|
|
214
214
|
updatedAt: string;
|
|
215
|
+
headers: Record<string, string> | null;
|
|
215
216
|
agentId: string;
|
|
216
217
|
projectId: string;
|
|
217
218
|
tenantId: string;
|
|
218
|
-
headers: Record<string, string> | null;
|
|
219
219
|
subAgentId: string;
|
|
220
220
|
targetAgentId: string;
|
|
221
221
|
}>;
|
|
@@ -229,10 +229,10 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
|
|
|
229
229
|
id: string;
|
|
230
230
|
createdAt: string;
|
|
231
231
|
updatedAt: string;
|
|
232
|
+
headers: Record<string, string> | null;
|
|
232
233
|
agentId: string;
|
|
233
234
|
projectId: string;
|
|
234
235
|
tenantId: string;
|
|
235
|
-
headers: Record<string, string> | null;
|
|
236
236
|
subAgentId: string;
|
|
237
237
|
targetAgentId: string;
|
|
238
238
|
} | undefined>;
|
|
@@ -250,10 +250,10 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
250
250
|
id: string;
|
|
251
251
|
createdAt: string;
|
|
252
252
|
updatedAt: string;
|
|
253
|
+
headers: Record<string, string> | null;
|
|
253
254
|
agentId: string;
|
|
254
255
|
projectId: string;
|
|
255
256
|
tenantId: string;
|
|
256
|
-
headers: Record<string, string> | null;
|
|
257
257
|
subAgentId: string;
|
|
258
258
|
targetAgentId: string;
|
|
259
259
|
}>;
|
|
@@ -12,12 +12,10 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
12
12
|
name: string;
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
|
+
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
15
18
|
description: string | null;
|
|
16
|
-
stopWhen: {
|
|
17
|
-
stepCountIs?: number | undefined;
|
|
18
|
-
} | null;
|
|
19
|
-
prompt: string | null;
|
|
20
|
-
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
21
19
|
models: {
|
|
22
20
|
base?: {
|
|
23
21
|
model?: string | undefined;
|
|
@@ -32,9 +30,11 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
32
30
|
providerOptions?: Record<string, any> | undefined;
|
|
33
31
|
} | undefined;
|
|
34
32
|
} | null;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
prompt: string | null;
|
|
34
|
+
stopWhen: {
|
|
35
|
+
stepCountIs?: number | undefined;
|
|
36
|
+
} | null;
|
|
37
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
38
38
|
} | undefined>;
|
|
39
39
|
declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
40
40
|
scopes: AgentScopeConfig;
|
|
@@ -43,12 +43,10 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
43
43
|
name: string;
|
|
44
44
|
createdAt: string;
|
|
45
45
|
updatedAt: string;
|
|
46
|
+
agentId: string;
|
|
47
|
+
projectId: string;
|
|
48
|
+
tenantId: string;
|
|
46
49
|
description: string | null;
|
|
47
|
-
stopWhen: {
|
|
48
|
-
stepCountIs?: number | undefined;
|
|
49
|
-
} | null;
|
|
50
|
-
prompt: string | null;
|
|
51
|
-
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
52
50
|
models: {
|
|
53
51
|
base?: {
|
|
54
52
|
model?: string | undefined;
|
|
@@ -63,9 +61,11 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
63
61
|
providerOptions?: Record<string, any> | undefined;
|
|
64
62
|
} | undefined;
|
|
65
63
|
} | null;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
prompt: string | null;
|
|
65
|
+
stopWhen: {
|
|
66
|
+
stepCountIs?: number | undefined;
|
|
67
|
+
} | null;
|
|
68
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
69
69
|
}[]>;
|
|
70
70
|
declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
71
71
|
scopes: AgentScopeConfig;
|
|
@@ -112,12 +112,10 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
|
|
|
112
112
|
name: string;
|
|
113
113
|
createdAt: string;
|
|
114
114
|
updatedAt: string;
|
|
115
|
+
agentId: string;
|
|
116
|
+
projectId: string;
|
|
117
|
+
tenantId: string;
|
|
115
118
|
description: string | null;
|
|
116
|
-
stopWhen: {
|
|
117
|
-
stepCountIs?: number | undefined;
|
|
118
|
-
} | null;
|
|
119
|
-
prompt: string | null;
|
|
120
|
-
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
121
119
|
models: {
|
|
122
120
|
base?: {
|
|
123
121
|
model?: string | undefined;
|
|
@@ -132,9 +130,11 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
|
|
|
132
130
|
providerOptions?: Record<string, any> | undefined;
|
|
133
131
|
} | undefined;
|
|
134
132
|
} | null;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
prompt: string | null;
|
|
134
|
+
stopWhen: {
|
|
135
|
+
stepCountIs?: number | undefined;
|
|
136
|
+
} | null;
|
|
137
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
138
138
|
}>;
|
|
139
139
|
declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
140
140
|
scopes: AgentScopeConfig;
|
|
@@ -22,10 +22,10 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
22
22
|
name: string;
|
|
23
23
|
createdAt: string;
|
|
24
24
|
updatedAt: string;
|
|
25
|
-
|
|
25
|
+
headers: Record<string, string> | null;
|
|
26
26
|
projectId: string;
|
|
27
27
|
tenantId: string;
|
|
28
|
-
|
|
28
|
+
description: string | null;
|
|
29
29
|
config: {
|
|
30
30
|
type: "mcp";
|
|
31
31
|
mcp: ToolMcpConfig;
|
|
@@ -80,10 +80,10 @@ declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInser
|
|
|
80
80
|
name: string;
|
|
81
81
|
createdAt: string;
|
|
82
82
|
updatedAt: string;
|
|
83
|
-
|
|
83
|
+
headers: Record<string, string> | null;
|
|
84
84
|
projectId: string;
|
|
85
85
|
tenantId: string;
|
|
86
|
-
|
|
86
|
+
description: string | null;
|
|
87
87
|
config: {
|
|
88
88
|
type: "mcp";
|
|
89
89
|
mcp: ToolMcpConfig;
|
|
@@ -136,10 +136,10 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
136
136
|
id: string;
|
|
137
137
|
createdAt: string;
|
|
138
138
|
updatedAt: string;
|
|
139
|
+
headers: Record<string, string> | null;
|
|
139
140
|
agentId: string;
|
|
140
141
|
projectId: string;
|
|
141
142
|
tenantId: string;
|
|
142
|
-
headers: Record<string, string> | null;
|
|
143
143
|
toolId: string;
|
|
144
144
|
subAgentId: string;
|
|
145
145
|
toolPolicies: Record<string, {
|
|
@@ -155,10 +155,10 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
|
|
|
155
155
|
id: string;
|
|
156
156
|
createdAt: string;
|
|
157
157
|
updatedAt: string;
|
|
158
|
+
headers: Record<string, string> | null;
|
|
158
159
|
agentId: string;
|
|
159
160
|
projectId: string;
|
|
160
161
|
tenantId: string;
|
|
161
|
-
headers: Record<string, string> | null;
|
|
162
162
|
toolId: string;
|
|
163
163
|
subAgentId: string;
|
|
164
164
|
toolPolicies: Record<string, {
|
|
@@ -183,10 +183,10 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
183
183
|
id: string;
|
|
184
184
|
createdAt: string;
|
|
185
185
|
updatedAt: string;
|
|
186
|
+
headers: Record<string, string> | null;
|
|
186
187
|
agentId: string;
|
|
187
188
|
projectId: string;
|
|
188
189
|
tenantId: string;
|
|
189
|
-
headers: Record<string, string> | null;
|
|
190
190
|
toolId: string;
|
|
191
191
|
subAgentId: string;
|
|
192
192
|
toolPolicies: Record<string, {
|
|
@@ -204,10 +204,10 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
204
204
|
name: string;
|
|
205
205
|
createdAt: string;
|
|
206
206
|
updatedAt: string;
|
|
207
|
-
|
|
207
|
+
headers: Record<string, string> | null;
|
|
208
208
|
projectId: string;
|
|
209
209
|
tenantId: string;
|
|
210
|
-
|
|
210
|
+
description: string | null;
|
|
211
211
|
config: {
|
|
212
212
|
type: "mcp";
|
|
213
213
|
mcp: ToolMcpConfig;
|
|
@@ -40,13 +40,13 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
|
|
|
40
40
|
algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
|
|
41
41
|
encoding: "hex" | "base64";
|
|
42
42
|
signature: {
|
|
43
|
-
source: "query" | "
|
|
43
|
+
source: "query" | "body" | "header";
|
|
44
44
|
key: string;
|
|
45
45
|
prefix?: string | undefined;
|
|
46
46
|
regex?: string | undefined;
|
|
47
47
|
};
|
|
48
48
|
signedComponents: {
|
|
49
|
-
source: "literal" | "
|
|
49
|
+
source: "literal" | "body" | "header";
|
|
50
50
|
required: boolean;
|
|
51
51
|
key?: string | undefined;
|
|
52
52
|
value?: string | undefined;
|
|
@@ -19,16 +19,16 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
|
|
|
19
19
|
createdAt: string;
|
|
20
20
|
updatedAt: string;
|
|
21
21
|
ref: {
|
|
22
|
-
type: "
|
|
22
|
+
type: "tag" | "commit" | "branch";
|
|
23
23
|
name: string;
|
|
24
24
|
hash: string;
|
|
25
25
|
} | null;
|
|
26
26
|
userId: string | null;
|
|
27
27
|
metadata: ConversationMetadata | null;
|
|
28
|
-
title: string | null;
|
|
29
28
|
agentId: string | null;
|
|
30
29
|
projectId: string;
|
|
31
30
|
tenantId: string;
|
|
31
|
+
title: string | null;
|
|
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: "
|
|
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: "
|
|
72
|
+
type: "tag" | "commit" | "branch";
|
|
73
73
|
name: string;
|
|
74
74
|
hash: string;
|
|
75
75
|
} | null;
|
|
@@ -88,16 +88,16 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
88
88
|
createdAt: string;
|
|
89
89
|
updatedAt: string;
|
|
90
90
|
ref: {
|
|
91
|
-
type: "
|
|
91
|
+
type: "tag" | "commit" | "branch";
|
|
92
92
|
name: string;
|
|
93
93
|
hash: string;
|
|
94
94
|
} | null;
|
|
95
95
|
userId: string | null;
|
|
96
96
|
metadata: ConversationMetadata | null;
|
|
97
|
-
title: string | null;
|
|
98
97
|
agentId: string | null;
|
|
99
98
|
projectId: string;
|
|
100
99
|
tenantId: string;
|
|
100
|
+
title: string | null;
|
|
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: "
|
|
110
|
+
type: "tag" | "commit" | "branch";
|
|
111
111
|
name: string;
|
|
112
112
|
hash: string;
|
|
113
113
|
};
|
|
@@ -124,16 +124,16 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
124
124
|
createdAt: string;
|
|
125
125
|
updatedAt: string;
|
|
126
126
|
ref: {
|
|
127
|
-
type: "
|
|
127
|
+
type: "tag" | "commit" | "branch";
|
|
128
128
|
name: string;
|
|
129
129
|
hash: string;
|
|
130
130
|
} | null;
|
|
131
131
|
userId: string | null;
|
|
132
132
|
metadata: ConversationMetadata | null;
|
|
133
|
-
title: string | null;
|
|
134
133
|
agentId: string | null;
|
|
135
134
|
projectId: string;
|
|
136
135
|
tenantId: string;
|
|
136
|
+
title: string | null;
|
|
137
137
|
activeSubAgentId: string;
|
|
138
138
|
lastContextResolution: string | null;
|
|
139
139
|
}>;
|
|
@@ -156,16 +156,16 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
156
156
|
createdAt: string;
|
|
157
157
|
updatedAt: string;
|
|
158
158
|
ref: {
|
|
159
|
-
type: "
|
|
159
|
+
type: "tag" | "commit" | "branch";
|
|
160
160
|
name: string;
|
|
161
161
|
hash: string;
|
|
162
162
|
} | null;
|
|
163
163
|
userId: string | null;
|
|
164
164
|
metadata: ConversationMetadata | null;
|
|
165
|
-
title: string | null;
|
|
166
165
|
agentId: string | null;
|
|
167
166
|
projectId: string;
|
|
168
167
|
tenantId: string;
|
|
168
|
+
title: string | null;
|
|
169
169
|
activeSubAgentId: string;
|
|
170
170
|
lastContextResolution: string | null;
|
|
171
171
|
} | undefined>;
|
|
@@ -10,7 +10,7 @@ declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert)
|
|
|
10
10
|
createdAt: string;
|
|
11
11
|
updatedAt: string;
|
|
12
12
|
ref: {
|
|
13
|
-
type: "
|
|
13
|
+
type: "tag" | "commit" | "branch";
|
|
14
14
|
name: string;
|
|
15
15
|
hash: string;
|
|
16
16
|
} | null;
|
|
@@ -36,7 +36,7 @@ declare const updateTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
36
36
|
updatedAt: string;
|
|
37
37
|
contextId: string;
|
|
38
38
|
ref: {
|
|
39
|
-
type: "
|
|
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
|
}
|
|
@@ -814,13 +814,13 @@ declare const triggers: drizzle_orm_pg_core1479.PgTableWithColumns<{
|
|
|
814
814
|
algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
|
|
815
815
|
encoding: "hex" | "base64";
|
|
816
816
|
signature: {
|
|
817
|
-
source: "query" | "
|
|
817
|
+
source: "query" | "body" | "header";
|
|
818
818
|
key: string;
|
|
819
819
|
prefix?: string | undefined;
|
|
820
820
|
regex?: string | undefined;
|
|
821
821
|
};
|
|
822
822
|
signedComponents: {
|
|
823
|
-
source: "literal" | "
|
|
823
|
+
source: "literal" | "body" | "header";
|
|
824
824
|
required: boolean;
|
|
825
825
|
key?: string | undefined;
|
|
826
826
|
value?: string | undefined;
|
|
@@ -851,13 +851,13 @@ declare const triggers: drizzle_orm_pg_core1479.PgTableWithColumns<{
|
|
|
851
851
|
algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
|
|
852
852
|
encoding: "hex" | "base64";
|
|
853
853
|
signature: {
|
|
854
|
-
source: "query" | "
|
|
854
|
+
source: "query" | "body" | "header";
|
|
855
855
|
key: string;
|
|
856
856
|
prefix?: string | undefined;
|
|
857
857
|
regex?: string | undefined;
|
|
858
858
|
};
|
|
859
859
|
signedComponents: {
|
|
860
|
-
source: "literal" | "
|
|
860
|
+
source: "literal" | "body" | "header";
|
|
861
861
|
required: boolean;
|
|
862
862
|
key?: string | undefined;
|
|
863
863
|
value?: string | undefined;
|
|
@@ -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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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
|
|
1
|
+
import * as hono3 from "hono";
|
|
2
2
|
|
|
3
3
|
//#region src/middleware/no-auth.d.ts
|
|
4
|
-
declare const noAuth: () =>
|
|
4
|
+
declare const noAuth: () => hono3.MiddlewareHandler<any, string, {}, Response>;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { noAuth };
|
package/dist/types/utility.d.ts
CHANGED
|
@@ -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
|
});
|