@inkeep/agents-core 0.58.2 → 0.58.3
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 +85 -85
- package/dist/auth/auth-validation-schemas.d.ts +152 -152
- package/dist/auth/auth.d.ts +28 -28
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/client-exports.d.ts +5 -5
- package/dist/client-exports.js +2 -2
- package/dist/data-access/index.d.ts +2 -1
- package/dist/data-access/index.js +2 -1
- package/dist/data-access/manage/agents.d.ts +15 -15
- package/dist/data-access/manage/artifactComponents.d.ts +14 -14
- package/dist/data-access/manage/contextConfigs.d.ts +4 -4
- package/dist/data-access/manage/dataComponents.d.ts +4 -4
- package/dist/data-access/manage/functionTools.d.ts +10 -10
- package/dist/data-access/manage/skills.d.ts +12 -12
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgents.d.ts +9 -9
- package/dist/data-access/manage/tools.d.ts +15 -15
- package/dist/data-access/manage/tools.js +14 -2
- package/dist/data-access/runtime/apiKeys.d.ts +8 -8
- package/dist/data-access/runtime/cascade-delete.d.ts +3 -0
- package/dist/data-access/runtime/cascade-delete.js +9 -2
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/messages.d.ts +24 -24
- package/dist/data-access/runtime/slack-work-app-mcp.d.ts +26 -0
- package/dist/data-access/runtime/slack-work-app-mcp.js +69 -0
- package/dist/data-access/runtime/tasks.d.ts +7 -7
- package/dist/data-access/runtime/workAppSlack.js +2 -2
- package/dist/db/manage/scope-definitions.d.ts +3 -1
- package/dist/db/manage/scope-definitions.js +5 -0
- package/dist/db/runtime/runtime-schema.d.ts +156 -2
- package/dist/db/runtime/runtime-schema.js +24 -1
- package/dist/env.d.ts +2 -0
- package/dist/env.js +1 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +4 -3
- package/dist/types/index.d.ts +2 -2
- package/dist/types/utility.d.ts +9 -2
- package/dist/utils/error.d.ts +51 -51
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/dist/validation/schemas.d.ts +1825 -1796
- package/dist/validation/schemas.js +16 -2
- package/drizzle/runtime/0020_tiny_killmonger.sql +15 -0
- package/drizzle/runtime/meta/0020_snapshot.json +4122 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { workAppSlackMcpToolAccessConfig, workAppSlackUserMappings } from "../../db/runtime/runtime-schema.js";
|
|
2
|
+
import { and, eq } from "drizzle-orm";
|
|
3
|
+
|
|
4
|
+
//#region src/data-access/runtime/slack-work-app-mcp.ts
|
|
5
|
+
const getSlackMcpToolAccessConfig = (db) => async (scope) => {
|
|
6
|
+
return (await db.select({
|
|
7
|
+
channelAccessMode: workAppSlackMcpToolAccessConfig.channelAccessMode,
|
|
8
|
+
dmEnabled: workAppSlackMcpToolAccessConfig.dmEnabled,
|
|
9
|
+
channelIds: workAppSlackMcpToolAccessConfig.channelIds
|
|
10
|
+
}).from(workAppSlackMcpToolAccessConfig).where(and(eq(workAppSlackMcpToolAccessConfig.tenantId, scope.tenantId), eq(workAppSlackMcpToolAccessConfig.projectId, scope.projectId), eq(workAppSlackMcpToolAccessConfig.toolId, scope.toolId))).limit(1))[0] ?? {
|
|
11
|
+
channelAccessMode: "selected",
|
|
12
|
+
dmEnabled: false,
|
|
13
|
+
channelIds: []
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
const setSlackMcpToolAccessConfig = (db) => async (params) => {
|
|
17
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
18
|
+
await db.insert(workAppSlackMcpToolAccessConfig).values({
|
|
19
|
+
toolId: params.toolId,
|
|
20
|
+
tenantId: params.tenantId,
|
|
21
|
+
projectId: params.projectId,
|
|
22
|
+
channelAccessMode: params.channelAccessMode,
|
|
23
|
+
dmEnabled: params.dmEnabled,
|
|
24
|
+
channelIds: params.channelIds,
|
|
25
|
+
createdAt: now,
|
|
26
|
+
updatedAt: now
|
|
27
|
+
}).onConflictDoUpdate({
|
|
28
|
+
target: [
|
|
29
|
+
workAppSlackMcpToolAccessConfig.tenantId,
|
|
30
|
+
workAppSlackMcpToolAccessConfig.projectId,
|
|
31
|
+
workAppSlackMcpToolAccessConfig.toolId
|
|
32
|
+
],
|
|
33
|
+
set: {
|
|
34
|
+
channelAccessMode: params.channelAccessMode,
|
|
35
|
+
dmEnabled: params.dmEnabled,
|
|
36
|
+
channelIds: params.channelIds,
|
|
37
|
+
updatedAt: now
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const updateSlackMcpToolAccessChannelIds = (db) => async (scope, channelIds) => {
|
|
42
|
+
await db.update(workAppSlackMcpToolAccessConfig).set({
|
|
43
|
+
channelIds,
|
|
44
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
45
|
+
}).where(and(eq(workAppSlackMcpToolAccessConfig.tenantId, scope.tenantId), eq(workAppSlackMcpToolAccessConfig.projectId, scope.projectId), eq(workAppSlackMcpToolAccessConfig.toolId, scope.toolId)));
|
|
46
|
+
};
|
|
47
|
+
const deleteSlackMcpToolAccessConfig = (db) => async (scope) => {
|
|
48
|
+
return (await db.delete(workAppSlackMcpToolAccessConfig).where(and(eq(workAppSlackMcpToolAccessConfig.tenantId, scope.tenantId), eq(workAppSlackMcpToolAccessConfig.projectId, scope.projectId), eq(workAppSlackMcpToolAccessConfig.toolId, scope.toolId))).returning()).length > 0;
|
|
49
|
+
};
|
|
50
|
+
const deleteAllSlackMcpToolAccessConfigsByTenant = (db) => async (tenantId) => {
|
|
51
|
+
return (await db.delete(workAppSlackMcpToolAccessConfig).where(eq(workAppSlackMcpToolAccessConfig.tenantId, tenantId)).returning()).length;
|
|
52
|
+
};
|
|
53
|
+
const isSlackWorkAppTool = (tool) => {
|
|
54
|
+
return tool.isWorkApp && tool.config.mcp.server.url.includes("/slack/mcp");
|
|
55
|
+
};
|
|
56
|
+
const resolveSlackUserContext = (db) => async (inkeepUserId) => {
|
|
57
|
+
const mappings = await db.select({
|
|
58
|
+
slackUserId: workAppSlackUserMappings.slackUserId,
|
|
59
|
+
slackUsername: workAppSlackUserMappings.slackUsername
|
|
60
|
+
}).from(workAppSlackUserMappings).where(eq(workAppSlackUserMappings.inkeepUserId, inkeepUserId)).limit(1);
|
|
61
|
+
if (mappings.length === 0) return void 0;
|
|
62
|
+
const mapping = mappings[0];
|
|
63
|
+
const parts = [`The current user's Slack user ID is ${mapping.slackUserId}.`];
|
|
64
|
+
if (mapping.slackUsername) parts.push(`Their Slack username is @${mapping.slackUsername}.`);
|
|
65
|
+
return parts.join(" ");
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
export { deleteAllSlackMcpToolAccessConfigsByTenant, deleteSlackMcpToolAccessConfig, getSlackMcpToolAccessConfig, isSlackWorkAppTool, resolveSlackUserContext, setSlackMcpToolAccessConfig, updateSlackMcpToolAccessChannelIds };
|
|
@@ -6,21 +6,21 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
|
|
|
6
6
|
|
|
7
7
|
//#region src/data-access/runtime/tasks.d.ts
|
|
8
8
|
declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
|
|
9
|
+
subAgentId: string;
|
|
9
10
|
id: string;
|
|
10
11
|
createdAt: string;
|
|
11
12
|
updatedAt: string;
|
|
13
|
+
projectId: string;
|
|
14
|
+
tenantId: string;
|
|
15
|
+
metadata: TaskMetadataConfig | null;
|
|
16
|
+
agentId: string;
|
|
17
|
+
status: string;
|
|
18
|
+
contextId: string;
|
|
12
19
|
ref: {
|
|
13
20
|
type: "commit" | "tag" | "branch";
|
|
14
21
|
name: string;
|
|
15
22
|
hash: string;
|
|
16
23
|
} | null;
|
|
17
|
-
metadata: TaskMetadataConfig | null;
|
|
18
|
-
status: string;
|
|
19
|
-
tenantId: string;
|
|
20
|
-
projectId: string;
|
|
21
|
-
subAgentId: string;
|
|
22
|
-
agentId: string;
|
|
23
|
-
contextId: string;
|
|
24
24
|
}>;
|
|
25
25
|
declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
26
26
|
id: string;
|
|
@@ -187,7 +187,7 @@ function clearDevConfigWorkspaceDefaultsByAgent(projectId, agentId) {
|
|
|
187
187
|
const defaultAgent = JSON.parse(config.metadata.default_agent);
|
|
188
188
|
if (defaultAgent.agentId === agentId && defaultAgent.projectId === projectId) {
|
|
189
189
|
config.metadata.default_agent = "";
|
|
190
|
-
writeFileSync(configPath, JSON.stringify(config, null, 2)
|
|
190
|
+
writeFileSync(configPath, `${JSON.stringify(config, null, 2)}\n`, "utf-8");
|
|
191
191
|
}
|
|
192
192
|
} catch {}
|
|
193
193
|
}
|
|
@@ -199,7 +199,7 @@ function clearDevConfigWorkspaceDefaultsByProject(projectId) {
|
|
|
199
199
|
if (!config?.metadata?.default_agent) return;
|
|
200
200
|
if (JSON.parse(config.metadata.default_agent).projectId === projectId) {
|
|
201
201
|
config.metadata.default_agent = "";
|
|
202
|
-
writeFileSync(configPath, JSON.stringify(config, null, 2)
|
|
202
|
+
writeFileSync(configPath, `${JSON.stringify(config, null, 2)}\n`, "utf-8");
|
|
203
203
|
}
|
|
204
204
|
} catch {}
|
|
205
205
|
}
|
|
@@ -16,6 +16,7 @@ declare const SCOPE_KEYS: {
|
|
|
16
16
|
readonly project: readonly ["tenantId", "projectId"];
|
|
17
17
|
readonly agent: readonly ["tenantId", "projectId", "agentId"];
|
|
18
18
|
readonly subAgent: readonly ["tenantId", "projectId", "agentId", "subAgentId"];
|
|
19
|
+
readonly tool: readonly ["tenantId", "projectId", "toolId"];
|
|
19
20
|
};
|
|
20
21
|
type ScopeLevel = keyof typeof SCOPE_KEYS;
|
|
21
22
|
type ScopeKeysOf<L extends ScopeLevel> = (typeof SCOPE_KEYS)[L][number];
|
|
@@ -27,5 +28,6 @@ type TenantScopeConfig = ScopeConfig<'tenant'>;
|
|
|
27
28
|
type ProjectScopeConfig = ScopeConfig<'project'>;
|
|
28
29
|
type AgentScopeConfig = ScopeConfig<'agent'>;
|
|
29
30
|
type SubAgentScopeConfig = ScopeConfig<'subAgent'>;
|
|
31
|
+
type ToolScopeConfig = ScopeConfig<'tool'>;
|
|
30
32
|
//#endregion
|
|
31
|
-
export { AgentScopeConfig, ProjectScopeConfig, SCOPE_KEYS, ScopeConfig, ScopeKeysOf, ScopeLevel, ScopedTable, SubAgentScopeConfig, TenantScopeConfig };
|
|
33
|
+
export { AgentScopeConfig, ProjectScopeConfig, SCOPE_KEYS, ScopeConfig, ScopeKeysOf, ScopeLevel, ScopedTable, SubAgentScopeConfig, TenantScopeConfig, ToolScopeConfig };
|
|
@@ -6,7 +6,7 @@ import * as drizzle_orm_pg_core1919 from "drizzle-orm/pg-core";
|
|
|
6
6
|
|
|
7
7
|
//#region src/db/runtime/runtime-schema.d.ts
|
|
8
8
|
declare namespace runtime_schema_d_exports {
|
|
9
|
-
export { account, apiKeys, contextCache, conversations, conversationsRelations, datasetRun, datasetRunConversationRelations, deviceCode, evaluationResult, evaluationRun, invitation, ledgerArtifacts, ledgerArtifactsRelations, member, messages, messagesRelations, organization, projectMetadata, scheduledTriggerInvocations, session, ssoProvider, taskRelations, taskRelationsRelations, tasks, tasksRelations, triggerInvocations, user, userProfile, userProfileRelations, verification, workAppGitHubInstallations, workAppGitHubInstallationsRelations, workAppGitHubMcpToolAccessMode, workAppGitHubMcpToolRepositoryAccess, workAppGitHubMcpToolRepositoryAccessRelations, workAppGitHubProjectAccessMode, workAppGitHubProjectRepositoryAccess, workAppGitHubProjectRepositoryAccessRelations, workAppGitHubRepositories, workAppGitHubRepositoriesRelations, workAppSlackChannelAgentConfigs, workAppSlackUserMappings, workAppSlackWorkspaces };
|
|
9
|
+
export { account, apiKeys, contextCache, conversations, conversationsRelations, datasetRun, datasetRunConversationRelations, deviceCode, evaluationResult, evaluationRun, invitation, ledgerArtifacts, ledgerArtifactsRelations, member, messages, messagesRelations, organization, projectMetadata, scheduledTriggerInvocations, session, ssoProvider, taskRelations, taskRelationsRelations, tasks, tasksRelations, triggerInvocations, user, userProfile, userProfileRelations, verification, workAppGitHubInstallations, workAppGitHubInstallationsRelations, workAppGitHubMcpToolAccessMode, workAppGitHubMcpToolRepositoryAccess, workAppGitHubMcpToolRepositoryAccessRelations, workAppGitHubProjectAccessMode, workAppGitHubProjectRepositoryAccess, workAppGitHubProjectRepositoryAccessRelations, workAppGitHubRepositories, workAppGitHubRepositoriesRelations, workAppSlackChannelAgentConfigs, workAppSlackMcpToolAccessConfig, workAppSlackUserMappings, workAppSlackWorkspaces };
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Runtime projects table - source of truth for which projects exist in a tenant.
|
|
@@ -4860,5 +4860,159 @@ declare const workAppGitHubProjectRepositoryAccessRelations: drizzle_orm111.Rela
|
|
|
4860
4860
|
declare const workAppGitHubMcpToolRepositoryAccessRelations: drizzle_orm111.Relations<"work_app_github_mcp_tool_repository_access", {
|
|
4861
4861
|
repository: drizzle_orm111.One<"work_app_github_repositories", true>;
|
|
4862
4862
|
}>;
|
|
4863
|
+
declare const workAppSlackMcpToolAccessConfig: drizzle_orm_pg_core1919.PgTableWithColumns<{
|
|
4864
|
+
name: "work_app_slack_mcp_tool_access_config";
|
|
4865
|
+
schema: undefined;
|
|
4866
|
+
columns: {
|
|
4867
|
+
createdAt: drizzle_orm_pg_core1919.PgColumn<{
|
|
4868
|
+
name: "created_at";
|
|
4869
|
+
tableName: "work_app_slack_mcp_tool_access_config";
|
|
4870
|
+
dataType: "string";
|
|
4871
|
+
columnType: "PgTimestampString";
|
|
4872
|
+
data: string;
|
|
4873
|
+
driverParam: string;
|
|
4874
|
+
notNull: true;
|
|
4875
|
+
hasDefault: true;
|
|
4876
|
+
isPrimaryKey: false;
|
|
4877
|
+
isAutoincrement: false;
|
|
4878
|
+
hasRuntimeDefault: false;
|
|
4879
|
+
enumValues: undefined;
|
|
4880
|
+
baseColumn: never;
|
|
4881
|
+
identity: undefined;
|
|
4882
|
+
generated: undefined;
|
|
4883
|
+
}, {}, {}>;
|
|
4884
|
+
updatedAt: drizzle_orm_pg_core1919.PgColumn<{
|
|
4885
|
+
name: "updated_at";
|
|
4886
|
+
tableName: "work_app_slack_mcp_tool_access_config";
|
|
4887
|
+
dataType: "string";
|
|
4888
|
+
columnType: "PgTimestampString";
|
|
4889
|
+
data: string;
|
|
4890
|
+
driverParam: string;
|
|
4891
|
+
notNull: true;
|
|
4892
|
+
hasDefault: true;
|
|
4893
|
+
isPrimaryKey: false;
|
|
4894
|
+
isAutoincrement: false;
|
|
4895
|
+
hasRuntimeDefault: false;
|
|
4896
|
+
enumValues: undefined;
|
|
4897
|
+
baseColumn: never;
|
|
4898
|
+
identity: undefined;
|
|
4899
|
+
generated: undefined;
|
|
4900
|
+
}, {}, {}>;
|
|
4901
|
+
toolId: drizzle_orm_pg_core1919.PgColumn<{
|
|
4902
|
+
name: "tool_id";
|
|
4903
|
+
tableName: "work_app_slack_mcp_tool_access_config";
|
|
4904
|
+
dataType: "string";
|
|
4905
|
+
columnType: "PgVarchar";
|
|
4906
|
+
data: string;
|
|
4907
|
+
driverParam: string;
|
|
4908
|
+
notNull: true;
|
|
4909
|
+
hasDefault: false;
|
|
4910
|
+
isPrimaryKey: false;
|
|
4911
|
+
isAutoincrement: false;
|
|
4912
|
+
hasRuntimeDefault: false;
|
|
4913
|
+
enumValues: [string, ...string[]];
|
|
4914
|
+
baseColumn: never;
|
|
4915
|
+
identity: undefined;
|
|
4916
|
+
generated: undefined;
|
|
4917
|
+
}, {}, {
|
|
4918
|
+
length: 256;
|
|
4919
|
+
}>;
|
|
4920
|
+
tenantId: drizzle_orm_pg_core1919.PgColumn<{
|
|
4921
|
+
name: "tenant_id";
|
|
4922
|
+
tableName: "work_app_slack_mcp_tool_access_config";
|
|
4923
|
+
dataType: "string";
|
|
4924
|
+
columnType: "PgVarchar";
|
|
4925
|
+
data: string;
|
|
4926
|
+
driverParam: string;
|
|
4927
|
+
notNull: true;
|
|
4928
|
+
hasDefault: false;
|
|
4929
|
+
isPrimaryKey: false;
|
|
4930
|
+
isAutoincrement: false;
|
|
4931
|
+
hasRuntimeDefault: false;
|
|
4932
|
+
enumValues: [string, ...string[]];
|
|
4933
|
+
baseColumn: never;
|
|
4934
|
+
identity: undefined;
|
|
4935
|
+
generated: undefined;
|
|
4936
|
+
}, {}, {
|
|
4937
|
+
length: 256;
|
|
4938
|
+
}>;
|
|
4939
|
+
projectId: drizzle_orm_pg_core1919.PgColumn<{
|
|
4940
|
+
name: "project_id";
|
|
4941
|
+
tableName: "work_app_slack_mcp_tool_access_config";
|
|
4942
|
+
dataType: "string";
|
|
4943
|
+
columnType: "PgVarchar";
|
|
4944
|
+
data: string;
|
|
4945
|
+
driverParam: string;
|
|
4946
|
+
notNull: true;
|
|
4947
|
+
hasDefault: false;
|
|
4948
|
+
isPrimaryKey: false;
|
|
4949
|
+
isAutoincrement: false;
|
|
4950
|
+
hasRuntimeDefault: false;
|
|
4951
|
+
enumValues: [string, ...string[]];
|
|
4952
|
+
baseColumn: never;
|
|
4953
|
+
identity: undefined;
|
|
4954
|
+
generated: undefined;
|
|
4955
|
+
}, {}, {
|
|
4956
|
+
length: 256;
|
|
4957
|
+
}>;
|
|
4958
|
+
channelAccessMode: drizzle_orm_pg_core1919.PgColumn<{
|
|
4959
|
+
name: "channel_access_mode";
|
|
4960
|
+
tableName: "work_app_slack_mcp_tool_access_config";
|
|
4961
|
+
dataType: "string";
|
|
4962
|
+
columnType: "PgVarchar";
|
|
4963
|
+
data: "all" | "selected";
|
|
4964
|
+
driverParam: string;
|
|
4965
|
+
notNull: true;
|
|
4966
|
+
hasDefault: false;
|
|
4967
|
+
isPrimaryKey: false;
|
|
4968
|
+
isAutoincrement: false;
|
|
4969
|
+
hasRuntimeDefault: false;
|
|
4970
|
+
enumValues: [string, ...string[]];
|
|
4971
|
+
baseColumn: never;
|
|
4972
|
+
identity: undefined;
|
|
4973
|
+
generated: undefined;
|
|
4974
|
+
}, {}, {
|
|
4975
|
+
length: 20;
|
|
4976
|
+
$type: "all" | "selected";
|
|
4977
|
+
}>;
|
|
4978
|
+
dmEnabled: drizzle_orm_pg_core1919.PgColumn<{
|
|
4979
|
+
name: "dm_enabled";
|
|
4980
|
+
tableName: "work_app_slack_mcp_tool_access_config";
|
|
4981
|
+
dataType: "boolean";
|
|
4982
|
+
columnType: "PgBoolean";
|
|
4983
|
+
data: boolean;
|
|
4984
|
+
driverParam: boolean;
|
|
4985
|
+
notNull: true;
|
|
4986
|
+
hasDefault: true;
|
|
4987
|
+
isPrimaryKey: false;
|
|
4988
|
+
isAutoincrement: false;
|
|
4989
|
+
hasRuntimeDefault: false;
|
|
4990
|
+
enumValues: undefined;
|
|
4991
|
+
baseColumn: never;
|
|
4992
|
+
identity: undefined;
|
|
4993
|
+
generated: undefined;
|
|
4994
|
+
}, {}, {}>;
|
|
4995
|
+
channelIds: drizzle_orm_pg_core1919.PgColumn<{
|
|
4996
|
+
name: "channel_ids";
|
|
4997
|
+
tableName: "work_app_slack_mcp_tool_access_config";
|
|
4998
|
+
dataType: "json";
|
|
4999
|
+
columnType: "PgJsonb";
|
|
5000
|
+
data: string[];
|
|
5001
|
+
driverParam: unknown;
|
|
5002
|
+
notNull: true;
|
|
5003
|
+
hasDefault: true;
|
|
5004
|
+
isPrimaryKey: false;
|
|
5005
|
+
isAutoincrement: false;
|
|
5006
|
+
hasRuntimeDefault: false;
|
|
5007
|
+
enumValues: undefined;
|
|
5008
|
+
baseColumn: never;
|
|
5009
|
+
identity: undefined;
|
|
5010
|
+
generated: undefined;
|
|
5011
|
+
}, {}, {
|
|
5012
|
+
$type: string[];
|
|
5013
|
+
}>;
|
|
5014
|
+
};
|
|
5015
|
+
dialect: "pg";
|
|
5016
|
+
}>;
|
|
4863
5017
|
//#endregion
|
|
4864
|
-
export { account, apiKeys, contextCache, conversations, conversationsRelations, datasetRun, datasetRunConversationRelations, deviceCode, evaluationResult, evaluationRun, invitation, ledgerArtifacts, ledgerArtifactsRelations, member, messages, messagesRelations, organization, projectMetadata, runtime_schema_d_exports, scheduledTriggerInvocations, session, ssoProvider, taskRelations, taskRelationsRelations, tasks, tasksRelations, triggerInvocations, user, userProfile, userProfileRelations, verification, workAppGitHubInstallations, workAppGitHubInstallationsRelations, workAppGitHubMcpToolAccessMode, workAppGitHubMcpToolRepositoryAccess, workAppGitHubMcpToolRepositoryAccessRelations, workAppGitHubProjectAccessMode, workAppGitHubProjectRepositoryAccess, workAppGitHubProjectRepositoryAccessRelations, workAppGitHubRepositories, workAppGitHubRepositoriesRelations, workAppSlackChannelAgentConfigs, workAppSlackUserMappings, workAppSlackWorkspaces };
|
|
5018
|
+
export { account, apiKeys, contextCache, conversations, conversationsRelations, datasetRun, datasetRunConversationRelations, deviceCode, evaluationResult, evaluationRun, invitation, ledgerArtifacts, ledgerArtifactsRelations, member, messages, messagesRelations, organization, projectMetadata, runtime_schema_d_exports, scheduledTriggerInvocations, session, ssoProvider, taskRelations, taskRelationsRelations, tasks, tasksRelations, triggerInvocations, user, userProfile, userProfileRelations, verification, workAppGitHubInstallations, workAppGitHubInstallationsRelations, workAppGitHubMcpToolAccessMode, workAppGitHubMcpToolRepositoryAccess, workAppGitHubMcpToolRepositoryAccessRelations, workAppGitHubProjectAccessMode, workAppGitHubProjectRepositoryAccess, workAppGitHubProjectRepositoryAccessRelations, workAppGitHubRepositories, workAppGitHubRepositoriesRelations, workAppSlackChannelAgentConfigs, workAppSlackMcpToolAccessConfig, workAppSlackUserMappings, workAppSlackWorkspaces };
|
|
@@ -46,6 +46,7 @@ var runtime_schema_exports = /* @__PURE__ */ __exportAll({
|
|
|
46
46
|
workAppGitHubRepositories: () => workAppGitHubRepositories,
|
|
47
47
|
workAppGitHubRepositoriesRelations: () => workAppGitHubRepositoriesRelations,
|
|
48
48
|
workAppSlackChannelAgentConfigs: () => workAppSlackChannelAgentConfigs,
|
|
49
|
+
workAppSlackMcpToolAccessConfig: () => workAppSlackMcpToolAccessConfig,
|
|
49
50
|
workAppSlackUserMappings: () => workAppSlackUserMappings,
|
|
50
51
|
workAppSlackWorkspaces: () => workAppSlackWorkspaces
|
|
51
52
|
});
|
|
@@ -774,6 +775,28 @@ const workAppGitHubMcpToolRepositoryAccessRelations = relations(workAppGitHubMcp
|
|
|
774
775
|
fields: [workAppGitHubMcpToolRepositoryAccess.repositoryDbId],
|
|
775
776
|
references: [workAppGitHubRepositories.id]
|
|
776
777
|
}) }));
|
|
778
|
+
const workAppSlackMcpToolAccessConfig = pgTable("work_app_slack_mcp_tool_access_config", {
|
|
779
|
+
toolId: varchar("tool_id", { length: 256 }).notNull(),
|
|
780
|
+
tenantId: varchar("tenant_id", { length: 256 }).notNull(),
|
|
781
|
+
projectId: varchar("project_id", { length: 256 }).notNull(),
|
|
782
|
+
channelAccessMode: varchar("channel_access_mode", { length: 20 }).$type().notNull(),
|
|
783
|
+
dmEnabled: boolean("dm_enabled").notNull().default(false),
|
|
784
|
+
channelIds: jsonb("channel_ids").$type().notNull().default([]),
|
|
785
|
+
...timestamps
|
|
786
|
+
}, (table) => [
|
|
787
|
+
primaryKey({ columns: [
|
|
788
|
+
table.tenantId,
|
|
789
|
+
table.projectId,
|
|
790
|
+
table.toolId
|
|
791
|
+
] }),
|
|
792
|
+
index("work_app_slack_mcp_tool_access_config_tenant_idx").on(table.tenantId),
|
|
793
|
+
index("work_app_slack_mcp_tool_access_config_project_idx").on(table.projectId),
|
|
794
|
+
foreignKey({
|
|
795
|
+
columns: [table.tenantId],
|
|
796
|
+
foreignColumns: [organization.id],
|
|
797
|
+
name: "work_app_slack_mcp_tool_access_config_tenant_fk"
|
|
798
|
+
}).onDelete("cascade")
|
|
799
|
+
]);
|
|
777
800
|
|
|
778
801
|
//#endregion
|
|
779
|
-
export { account, apiKeys, contextCache, conversations, conversationsRelations, datasetRun, datasetRunConversationRelations, deviceCode, evaluationResult, evaluationRun, invitation, ledgerArtifacts, ledgerArtifactsRelations, member, messages, messagesRelations, organization, projectMetadata, runtime_schema_exports, scheduledTriggerInvocations, session, ssoProvider, taskRelations, taskRelationsRelations, tasks, tasksRelations, triggerInvocations, user, userProfile, userProfileRelations, verification, workAppGitHubInstallations, workAppGitHubInstallationsRelations, workAppGitHubMcpToolAccessMode, workAppGitHubMcpToolRepositoryAccess, workAppGitHubMcpToolRepositoryAccessRelations, workAppGitHubProjectAccessMode, workAppGitHubProjectRepositoryAccess, workAppGitHubProjectRepositoryAccessRelations, workAppGitHubRepositories, workAppGitHubRepositoriesRelations, workAppSlackChannelAgentConfigs, workAppSlackUserMappings, workAppSlackWorkspaces };
|
|
802
|
+
export { account, apiKeys, contextCache, conversations, conversationsRelations, datasetRun, datasetRunConversationRelations, deviceCode, evaluationResult, evaluationRun, invitation, ledgerArtifacts, ledgerArtifactsRelations, member, messages, messagesRelations, organization, projectMetadata, runtime_schema_exports, scheduledTriggerInvocations, session, ssoProvider, taskRelations, taskRelationsRelations, tasks, tasksRelations, triggerInvocations, user, userProfile, userProfileRelations, verification, workAppGitHubInstallations, workAppGitHubInstallationsRelations, workAppGitHubMcpToolAccessMode, workAppGitHubMcpToolRepositoryAccess, workAppGitHubMcpToolRepositoryAccessRelations, workAppGitHubProjectAccessMode, workAppGitHubProjectRepositoryAccess, workAppGitHubProjectRepositoryAccessRelations, workAppGitHubRepositories, workAppGitHubRepositoriesRelations, workAppSlackChannelAgentConfigs, workAppSlackMcpToolAccessConfig, workAppSlackUserMappings, workAppSlackWorkspaces };
|
package/dist/env.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ declare const envSchema: z.ZodObject<{
|
|
|
20
20
|
INKEEP_AGENTS_API_URL: z.ZodOptional<z.ZodString>;
|
|
21
21
|
AUTH_COOKIE_DOMAIN: z.ZodOptional<z.ZodString>;
|
|
22
22
|
GITHUB_MCP_API_KEY: z.ZodOptional<z.ZodString>;
|
|
23
|
+
SLACK_MCP_API_KEY: z.ZodOptional<z.ZodString>;
|
|
23
24
|
SPICEDB_ENDPOINT: z.ZodOptional<z.ZodString>;
|
|
24
25
|
SPICEDB_PRESHARED_KEY: z.ZodOptional<z.ZodString>;
|
|
25
26
|
SPICEDB_TLS_ENABLED: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
|
|
@@ -37,6 +38,7 @@ declare const env: {
|
|
|
37
38
|
INKEEP_AGENTS_API_URL?: string | undefined;
|
|
38
39
|
AUTH_COOKIE_DOMAIN?: string | undefined;
|
|
39
40
|
GITHUB_MCP_API_KEY?: string | undefined;
|
|
41
|
+
SLACK_MCP_API_KEY?: string | undefined;
|
|
40
42
|
SPICEDB_ENDPOINT?: string | undefined;
|
|
41
43
|
SPICEDB_PRESHARED_KEY?: string | undefined;
|
|
42
44
|
SPICEDB_TLS_ENABLED?: boolean | undefined;
|
package/dist/env.js
CHANGED
|
@@ -49,6 +49,7 @@ const envSchema = z.object({
|
|
|
49
49
|
INKEEP_AGENTS_API_URL: z.string().optional().describe("URL where the agents management API is running"),
|
|
50
50
|
AUTH_COOKIE_DOMAIN: z.string().optional().describe("Explicit cookie domain for cross-subdomain auth (e.g., .inkeep.com). Required when the API and UI do not share a common 3-part parent domain."),
|
|
51
51
|
GITHUB_MCP_API_KEY: z.string().optional().describe("API key for the GitHub MCP"),
|
|
52
|
+
SLACK_MCP_API_KEY: z.string().optional().describe("API key for the Slack MCP"),
|
|
52
53
|
SPICEDB_ENDPOINT: z.string().optional().describe("SpiceDB endpoint"),
|
|
53
54
|
SPICEDB_PRESHARED_KEY: z.string().optional().describe("SpiceDB pre-shared key"),
|
|
54
55
|
SPICEDB_TLS_ENABLED: z.stringbool().optional().describe("SpiceDB TLS enabled")
|