@inkeep/agents-core 0.0.0-dev-20260306191005 → 0.0.0-dev-20260306200324

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 (51) hide show
  1. package/dist/auth/auth-schema.d.ts +107 -107
  2. package/dist/auth/auth-validation-schemas.d.ts +152 -152
  3. package/dist/auth/auth.d.ts +28 -28
  4. package/dist/auth/permissions.d.ts +13 -13
  5. package/dist/client-exports.d.ts +5 -5
  6. package/dist/client-exports.js +2 -2
  7. package/dist/data-access/index.d.ts +2 -1
  8. package/dist/data-access/index.js +2 -1
  9. package/dist/data-access/manage/agents.d.ts +21 -21
  10. package/dist/data-access/manage/artifactComponents.d.ts +8 -8
  11. package/dist/data-access/manage/contextConfigs.d.ts +8 -8
  12. package/dist/data-access/manage/dataComponents.d.ts +4 -4
  13. package/dist/data-access/manage/functionTools.d.ts +10 -10
  14. package/dist/data-access/manage/skills.d.ts +12 -12
  15. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
  16. package/dist/data-access/manage/subAgentRelations.d.ts +18 -18
  17. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  18. package/dist/data-access/manage/subAgents.d.ts +15 -15
  19. package/dist/data-access/manage/tools.d.ts +15 -15
  20. package/dist/data-access/manage/tools.js +14 -2
  21. package/dist/data-access/runtime/apiKeys.d.ts +12 -12
  22. package/dist/data-access/runtime/cascade-delete.d.ts +3 -0
  23. package/dist/data-access/runtime/cascade-delete.js +9 -2
  24. package/dist/data-access/runtime/conversations.d.ts +24 -24
  25. package/dist/data-access/runtime/messages.d.ts +9 -9
  26. package/dist/data-access/runtime/slack-work-app-mcp.d.ts +26 -0
  27. package/dist/data-access/runtime/slack-work-app-mcp.js +69 -0
  28. package/dist/data-access/runtime/tasks.d.ts +7 -7
  29. package/dist/data-access/runtime/workAppSlack.js +2 -2
  30. package/dist/db/manage/manage-schema.d.ts +449 -449
  31. package/dist/db/manage/scope-definitions.d.ts +3 -1
  32. package/dist/db/manage/scope-definitions.js +5 -0
  33. package/dist/db/runtime/runtime-schema.d.ts +156 -2
  34. package/dist/db/runtime/runtime-schema.js +24 -1
  35. package/dist/env.d.ts +2 -0
  36. package/dist/env.js +1 -0
  37. package/dist/index.d.ts +5 -4
  38. package/dist/index.js +4 -3
  39. package/dist/middleware/no-auth.d.ts +2 -2
  40. package/dist/types/index.d.ts +2 -2
  41. package/dist/types/utility.d.ts +9 -2
  42. package/dist/utils/error.d.ts +51 -51
  43. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  44. package/dist/validation/index.d.ts +2 -2
  45. package/dist/validation/index.js +2 -2
  46. package/dist/validation/schemas.d.ts +1852 -1823
  47. package/dist/validation/schemas.js +16 -2
  48. package/drizzle/runtime/0020_tiny_killmonger.sql +15 -0
  49. package/drizzle/runtime/meta/0020_snapshot.json +4122 -0
  50. package/drizzle/runtime/meta/_journal.json +7 -0
  51. package/package.json +1 -1
@@ -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 };
@@ -24,6 +24,11 @@ const SCOPE_KEYS = {
24
24
  "projectId",
25
25
  "agentId",
26
26
  "subAgentId"
27
+ ],
28
+ tool: [
29
+ "tenantId",
30
+ "projectId",
31
+ "toolId"
27
32
  ]
28
33
  };
29
34
 
@@ -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")