@inkeep/agents-api 0.0.0-dev-20260211191741 → 0.0.0-dev-20260211220939

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 (46) hide show
  1. package/dist/.well-known/workflow/v1/manifest.debug.json +19 -19
  2. package/dist/.well-known/workflow/v1/step.cjs +424 -250
  3. package/dist/createApp.js +12 -1
  4. package/dist/domains/evals/routes/datasetTriggers.d.ts +2 -2
  5. package/dist/domains/evals/routes/index.d.ts +2 -2
  6. package/dist/domains/evals/services/EvaluationService.d.ts +0 -5
  7. package/dist/domains/evals/services/EvaluationService.js +2 -51
  8. package/dist/domains/evals/workflow/routes.d.ts +2 -2
  9. package/dist/domains/manage/routes/availableAgents.d.ts +2 -2
  10. package/dist/domains/manage/routes/conversations.d.ts +2 -2
  11. package/dist/domains/manage/routes/index.d.ts +2 -2
  12. package/dist/domains/manage/routes/invitations.d.ts +2 -2
  13. package/dist/domains/manage/routes/mcp.d.ts +2 -2
  14. package/dist/domains/manage/routes/passwordResetLinks.d.ts +2 -2
  15. package/dist/domains/manage/routes/users.d.ts +2 -2
  16. package/dist/domains/mcp/routes/mcp.d.ts +2 -2
  17. package/dist/domains/run/agents/Agent.js +2 -2
  18. package/dist/domains/run/agents/relationTools.d.ts +2 -2
  19. package/dist/domains/run/utils/SchemaProcessor.d.ts +1 -1
  20. package/dist/domains/run/utils/project.js +2 -2
  21. package/dist/domains/run/utils/token-estimator.d.ts +2 -2
  22. package/dist/domains/work-apps/index.d.ts +13 -0
  23. package/dist/domains/work-apps/index.js +23 -0
  24. package/dist/env.d.ts +2 -2
  25. package/dist/factory.d.ts +20 -20
  26. package/dist/index.d.ts +18 -18
  27. package/dist/middleware/cors.d.ts +6 -1
  28. package/dist/middleware/cors.js +27 -1
  29. package/dist/middleware/evalsAuth.d.ts +2 -2
  30. package/dist/middleware/index.d.ts +3 -2
  31. package/dist/middleware/index.js +3 -2
  32. package/dist/middleware/manageAuth.d.ts +2 -2
  33. package/dist/middleware/manageAuth.js +16 -1
  34. package/dist/middleware/projectAccess.d.ts +2 -2
  35. package/dist/middleware/projectConfig.d.ts +3 -3
  36. package/dist/middleware/requirePermission.d.ts +2 -2
  37. package/dist/middleware/runAuth.d.ts +4 -4
  38. package/dist/middleware/runAuth.js +71 -1
  39. package/dist/middleware/sessionAuth.d.ts +3 -3
  40. package/dist/middleware/tenantAccess.d.ts +2 -2
  41. package/dist/middleware/tracing.d.ts +3 -3
  42. package/dist/middleware/workAppsAuth.d.ts +7 -0
  43. package/dist/middleware/workAppsAuth.js +30 -0
  44. package/dist/openapi.d.ts +5 -0
  45. package/dist/openapi.js +6 -1
  46. package/package.json +5 -5
package/dist/createApp.js CHANGED
@@ -7,12 +7,14 @@ import { flushBatchProcessor } from "./instrumentation.js";
7
7
  import { manageRoutes } from "./domains/manage/index.js";
8
8
  import mcp_default from "./domains/mcp/routes/mcp.js";
9
9
  import { runRoutes } from "./domains/run/index.js";
10
- import { authCorsConfig, defaultCorsConfig, playgroundCorsConfig, runCorsConfig, signozCorsConfig } from "./middleware/cors.js";
10
+ import { workAppsRoutes } from "./domains/work-apps/index.js";
11
+ import { authCorsConfig, defaultCorsConfig, playgroundCorsConfig, runCorsConfig, signozCorsConfig, workAppsCorsConfig } from "./middleware/cors.js";
11
12
  import { errorHandler } from "./middleware/errorHandler.js";
12
13
  import { manageApiKeyAuth } from "./middleware/manageAuth.js";
13
14
  import { manageRefMiddleware, oauthRefMiddleware, runRefMiddleware, writeProtectionMiddleware } from "./middleware/ref.js";
14
15
  import { runApiKeyAuth, runApiKeyAuthExcept } from "./middleware/runAuth.js";
15
16
  import { requireTenantAccess } from "./middleware/tenantAccess.js";
17
+ import { workAppsAuth } from "./middleware/workAppsAuth.js";
16
18
  import "./middleware/index.js";
17
19
  import { branchScopedDbMiddleware } from "./middleware/branchScopedDb.js";
18
20
  import { evalApiKeyAuth } from "./middleware/evalsAuth.js";
@@ -52,9 +54,11 @@ function createAgentsHono(config) {
52
54
  app.use("/run/*", cors(runCorsConfig));
53
55
  app.use("/manage/tenants/*/playground/token", cors(playgroundCorsConfig));
54
56
  app.use("/manage/tenants/*/signoz/*", cors(signozCorsConfig));
57
+ app.use("/work-apps/*", cors(workAppsCorsConfig));
55
58
  app.use("*", async (c, next) => {
56
59
  if (auth && c.req.path.startsWith("/api/auth/")) return next();
57
60
  if (c.req.path.startsWith("/run/")) return next();
61
+ if (c.req.path.startsWith("/work-apps/")) return next();
58
62
  if (c.req.path.includes("/playground/token")) return next();
59
63
  if (c.req.path.includes("/signoz/")) return next();
60
64
  if (c.req.path.includes("/work-apps/github/")) return next();
@@ -69,6 +73,10 @@ function createAgentsHono(config) {
69
73
  c.set("auth", auth);
70
74
  await next();
71
75
  });
76
+ app.use("/work-apps/*", async (c, next) => {
77
+ c.set("auth", auth);
78
+ await next();
79
+ });
72
80
  app.use("/run/*", async (c, next) => {
73
81
  if (sandboxConfig) c.set("sandboxConfig", sandboxConfig);
74
82
  await next();
@@ -185,6 +193,9 @@ function createAgentsHono(config) {
185
193
  });
186
194
  app.route("/evals", evalRoutes);
187
195
  app.route("/work-apps/github", githubRoutes);
196
+ app.use("/work-apps/slack/workspaces/*", workAppsAuth);
197
+ app.use("/work-apps/slack/users/*", workAppsAuth);
198
+ app.route("/work-apps", workAppsRoutes);
188
199
  app.route("/mcp", mcp_default);
189
200
  setupOpenAPIRoutes(app);
190
201
  app.use("/run/*", async (_c, next) => {
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono1 from "hono";
2
+ import * as hono15 from "hono";
3
3
 
4
4
  //#region src/domains/evals/routes/datasetTriggers.d.ts
5
- declare const app: OpenAPIHono<hono1.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono15.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono2 from "hono";
2
+ import * as hono18 from "hono";
3
3
 
4
4
  //#region src/domains/evals/routes/index.d.ts
5
- declare const app: OpenAPIHono<hono2.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono18.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -43,11 +43,6 @@ declare class EvaluationService {
43
43
  * Extract messages from dataset item input
44
44
  */
45
45
  private extractMessagesFromDatasetItem;
46
- /**
47
- * Parse SSE (Server-Sent Events) response from chat API
48
- * Handles text deltas, error operations, and other data operations
49
- */
50
- private parseSSEResponse;
51
46
  /**
52
47
  * Run an evaluation job based on an evaluation job config
53
48
  * Filters conversations based on jobFilters and runs evaluations with configured evaluators
@@ -3,7 +3,7 @@ import { env } from "../../../env.js";
3
3
  import manageDbClient_default from "../../../data/db/manageDbClient.js";
4
4
  import manageDbPool_default from "../../../data/db/manageDbPool.js";
5
5
  import runDbClient_default from "../../../data/db/runDbClient.js";
6
- import { ModelFactory, createEvaluationResult, createEvaluationRun, filterConversationsForJob, generateId, getConversationHistory, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluatorById, getFullAgent, getProjectScopedRef, resolveRef, updateEvaluationResult, withRef } from "@inkeep/agents-core";
6
+ import { ModelFactory, createEvaluationResult, createEvaluationRun, filterConversationsForJob, generateId, getConversationHistory, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluatorById, getFullAgent, getProjectScopedRef, parseSSEResponse, resolveRef, updateEvaluationResult, withRef } from "@inkeep/agents-core";
7
7
  import { generateObject, generateText } from "ai";
8
8
  import { z } from "zod";
9
9
 
@@ -105,8 +105,7 @@ var EvaluationService = class {
105
105
  error: `Chat API error: ${response.status} ${response.statusText}`
106
106
  };
107
107
  }
108
- const responseText = await response.text();
109
- const parseResult = this.parseSSEResponse(responseText);
108
+ const parseResult = parseSSEResponse(await response.text());
110
109
  if (parseResult.error) {
111
110
  logger.error({
112
111
  datasetItemId: datasetItem.id,
@@ -314,54 +313,6 @@ Generate the next user message:`;
314
313
  return null;
315
314
  }
316
315
  /**
317
- * Parse SSE (Server-Sent Events) response from chat API
318
- * Handles text deltas, error operations, and other data operations
319
- */
320
- parseSSEResponse(sseText) {
321
- let textContent = "";
322
- let hasError = false;
323
- let errorMessage = "";
324
- const lines = sseText.split("\n").filter((line) => line.startsWith("data: "));
325
- for (const line of lines) try {
326
- const data = JSON.parse(line.slice(6));
327
- if (data.object === "chat.completion.chunk" && data.choices?.[0]?.delta) {
328
- const delta = data.choices[0].delta;
329
- if (delta.content) textContent += delta.content;
330
- if (delta.content && typeof delta.content === "string") try {
331
- const parsedContent = JSON.parse(delta.content);
332
- if (parsedContent.type === "data-operation" && parsedContent.data?.type === "error") {
333
- hasError = true;
334
- errorMessage = parsedContent.data.message || "Unknown error occurred";
335
- logger.warn({
336
- errorMessage,
337
- errorData: parsedContent.data
338
- }, "Received error operation from chat API");
339
- }
340
- } catch {}
341
- } else if (data.type === "text-delta" && data.delta) textContent += data.delta;
342
- else if (data.type === "data-operation" && data.data?.type === "error") {
343
- hasError = true;
344
- errorMessage = data.data.message || "Unknown error occurred";
345
- logger.warn({
346
- errorMessage,
347
- errorData: data.data
348
- }, "Received error operation from chat API");
349
- } else if (data.type === "error") {
350
- hasError = true;
351
- errorMessage = data.message || "Unknown error occurred";
352
- logger.warn({
353
- errorMessage,
354
- errorData: data
355
- }, "Received error event from chat API");
356
- } else if (data.content) textContent += typeof data.content === "string" ? data.content : JSON.stringify(data.content);
357
- } catch {}
358
- if (hasError) return {
359
- text: textContent.trim(),
360
- error: errorMessage
361
- };
362
- return { text: textContent.trim() };
363
- }
364
- /**
365
316
  * Run an evaluation job based on an evaluation job config
366
317
  * Filters conversations based on jobFilters and runs evaluations with configured evaluators
367
318
  */
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types5 from "hono/types";
2
+ import * as hono_types12 from "hono/types";
3
3
 
4
4
  //#region src/domains/evals/workflow/routes.d.ts
5
- declare const workflowRoutes: Hono<hono_types5.BlankEnv, hono_types5.BlankSchema, "/">;
5
+ declare const workflowRoutes: Hono<hono_types12.BlankEnv, hono_types12.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { workflowRoutes };
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono5 from "hono";
2
+ import * as hono17 from "hono";
3
3
 
4
4
  //#region src/domains/manage/routes/availableAgents.d.ts
5
- declare const app: OpenAPIHono<hono5.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono17.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono17 from "hono";
2
+ import * as hono16 from "hono";
3
3
 
4
4
  //#region src/domains/manage/routes/conversations.d.ts
5
- declare const app: OpenAPIHono<hono17.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono16.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono16 from "hono";
2
+ import * as hono14 from "hono";
3
3
 
4
4
  //#region src/domains/manage/routes/index.d.ts
5
- declare const app: OpenAPIHono<hono16.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono14.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,10 +1,10 @@
1
1
  import { ManageAppVariables } from "../../../types/app.js";
2
2
  import { Hono } from "hono";
3
- import * as hono_types9 from "hono/types";
3
+ import * as hono_types7 from "hono/types";
4
4
 
5
5
  //#region src/domains/manage/routes/invitations.d.ts
6
6
  declare const invitationsRoutes: Hono<{
7
7
  Variables: ManageAppVariables;
8
- }, hono_types9.BlankSchema, "/">;
8
+ }, hono_types7.BlankSchema, "/">;
9
9
  //#endregion
10
10
  export { invitationsRoutes as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types10 from "hono/types";
2
+ import * as hono_types8 from "hono/types";
3
3
 
4
4
  //#region src/domains/manage/routes/mcp.d.ts
5
- declare const app: Hono<hono_types10.BlankEnv, hono_types10.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types8.BlankEnv, hono_types8.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,10 +1,10 @@
1
1
  import { ManageAppVariables } from "../../../types/app.js";
2
2
  import { Hono } from "hono";
3
- import * as hono_types12 from "hono/types";
3
+ import * as hono_types11 from "hono/types";
4
4
 
5
5
  //#region src/domains/manage/routes/passwordResetLinks.d.ts
6
6
  declare const passwordResetLinksRoutes: Hono<{
7
7
  Variables: ManageAppVariables;
8
- }, hono_types12.BlankSchema, "/">;
8
+ }, hono_types11.BlankSchema, "/">;
9
9
  //#endregion
10
10
  export { passwordResetLinksRoutes as default };
@@ -1,10 +1,10 @@
1
1
  import { ManageAppVariables } from "../../../types/app.js";
2
2
  import { Hono } from "hono";
3
- import * as hono_types13 from "hono/types";
3
+ import * as hono_types10 from "hono/types";
4
4
 
5
5
  //#region src/domains/manage/routes/users.d.ts
6
6
  declare const usersRoutes: Hono<{
7
7
  Variables: ManageAppVariables;
8
- }, hono_types13.BlankSchema, "/">;
8
+ }, hono_types10.BlankSchema, "/">;
9
9
  //#endregion
10
10
  export { usersRoutes as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types7 from "hono/types";
2
+ import * as hono_types5 from "hono/types";
3
3
 
4
4
  //#region src/domains/mcp/routes/mcp.d.ts
5
- declare const app: Hono<hono_types7.BlankEnv, hono_types7.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types5.BlankEnv, hono_types5.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -2035,8 +2035,8 @@ ${typeof cleanResult === "string" ? cleanResult : JSON.stringify(cleanResult, nu
2035
2035
  buildDataComponentsSchema() {
2036
2036
  const componentSchemas = [];
2037
2037
  this.config.dataComponents?.forEach((dc) => {
2038
- const normalizedProps = dc.props ? SchemaProcessor.makeAllPropertiesRequired(dc.props) : null;
2039
- const propsSchema = normalizedProps ? z.fromJSONSchema(normalizedProps) : z.string();
2038
+ const normalizedProps = SchemaProcessor.makeAllPropertiesRequired(dc.props);
2039
+ const propsSchema = z.fromJSONSchema(normalizedProps);
2040
2040
  componentSchemas.push(z.object({
2041
2041
  id: z.string(),
2042
2042
  name: z.literal(dc.name),
@@ -1,6 +1,6 @@
1
1
  import { AgentConfig, DelegateRelation } from "./Agent.js";
2
2
  import { InternalRelation } from "../utils/project.js";
3
- import * as _inkeep_agents_core2 from "@inkeep/agents-core";
3
+ import * as _inkeep_agents_core1 from "@inkeep/agents-core";
4
4
  import { CredentialStoreRegistry, FullExecutionContext } from "@inkeep/agents-core";
5
5
  import * as ai0 from "ai";
6
6
 
@@ -44,7 +44,7 @@ declare function createDelegateToAgentTool({
44
44
  message: string;
45
45
  }, {
46
46
  toolCallId: any;
47
- result: _inkeep_agents_core2.Message | _inkeep_agents_core2.Task;
47
+ result: _inkeep_agents_core1.Message | _inkeep_agents_core1.Task;
48
48
  }>;
49
49
  /**
50
50
  * Parameters for building a transfer relation config
@@ -48,7 +48,7 @@ declare class SchemaProcessor {
48
48
  * Makes all properties required recursively throughout the schema.
49
49
  * This ensures compatibility across all LLM providers (OpenAI/Azure require it, Anthropic accepts it).
50
50
  */
51
- static makeAllPropertiesRequired(schema: JSONSchema.BaseSchema | Record<string, unknown> | null | undefined): JSONSchema.BaseSchema | Record<string, unknown> | null | undefined;
51
+ static makeAllPropertiesRequired<T extends JSONSchema.BaseSchema | Record<string, unknown> | null | undefined>(schema: T): T;
52
52
  /**
53
53
  * Enhance schema with JMESPath guidance for artifact component schemas
54
54
  * Transforms all schema types to string selectors with helpful descriptions
@@ -167,7 +167,7 @@ function getDataComponentsForSubAgent(params) {
167
167
  const { project, subAgent } = params;
168
168
  const dataComponentIds = subAgent.dataComponents || [];
169
169
  const dataComponentsMap = project.dataComponents || {};
170
- return dataComponentIds.map((id) => dataComponentsMap[id]).filter((c) => c !== null && c !== void 0);
170
+ return dataComponentIds.map((id) => dataComponentsMap[id]).filter((c) => !!c);
171
171
  }
172
172
  /**
173
173
  * Get artifact components for a sub-agent
@@ -177,7 +177,7 @@ function getArtifactComponentsForSubAgent(params) {
177
177
  const { project, subAgent } = params;
178
178
  const artifactComponentIds = subAgent.artifactComponents || [];
179
179
  const artifactComponentsMap = project.artifactComponents || {};
180
- return artifactComponentIds.map((id) => artifactComponentsMap[id]).filter((c) => c !== null && c !== void 0);
180
+ return artifactComponentIds.map((id) => artifactComponentsMap[id]).filter((c) => !!c);
181
181
  }
182
182
  /**
183
183
  * Get transfer relations for a target sub-agent
@@ -1,4 +1,4 @@
1
- import * as _inkeep_agents_core1 from "@inkeep/agents-core";
1
+ import * as _inkeep_agents_core3 from "@inkeep/agents-core";
2
2
  import { BreakdownComponentDef, ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown } from "@inkeep/agents-core";
3
3
 
4
4
  //#region src/domains/run/utils/token-estimator.d.ts
@@ -17,7 +17,7 @@ interface AssembleResult {
17
17
  /** The assembled prompt string */
18
18
  prompt: string;
19
19
  /** Token breakdown for each component */
20
- breakdown: _inkeep_agents_core1.ContextBreakdown;
20
+ breakdown: _inkeep_agents_core3.ContextBreakdown;
21
21
  }
22
22
  //#endregion
23
23
  export { AssembleResult, type BreakdownComponentDef, type ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown, estimateTokens };
@@ -0,0 +1,13 @@
1
+ import { OpenAPIHono } from "@hono/zod-openapi";
2
+ import { WorkAppsVariables } from "@inkeep/agents-work-apps/slack";
3
+
4
+ //#region src/domains/work-apps/index.d.ts
5
+
6
+ declare function createWorkAppsRoutes(): OpenAPIHono<{
7
+ Variables: WorkAppsVariables;
8
+ }, {}, "/">;
9
+ declare const workAppsRoutes: OpenAPIHono<{
10
+ Variables: WorkAppsVariables;
11
+ }, {}, "/">;
12
+ //#endregion
13
+ export { createWorkAppsRoutes, workAppsRoutes };
@@ -0,0 +1,23 @@
1
+ import { OpenAPIHono } from "@hono/zod-openapi";
2
+ import { slackRoutes } from "@inkeep/agents-work-apps/slack";
3
+
4
+ //#region src/domains/work-apps/index.ts
5
+ /**
6
+ * Work Apps Domain
7
+ *
8
+ * Modular integration layer for third-party work applications (Slack, GitHub, etc.)
9
+ * Work app implementations are in @inkeep/agents-work-apps package.
10
+ *
11
+ * Each work app is mounted as a sub-route:
12
+ * - /work-apps/slack/* - Slack workspace installation, user linking, commands
13
+ * - /work-apps/github/* - GitHub integration (mounted separately in createApp)
14
+ */
15
+ function createWorkAppsRoutes() {
16
+ const app = new OpenAPIHono();
17
+ app.route("/slack", slackRoutes);
18
+ return app;
19
+ }
20
+ const workAppsRoutes = createWorkAppsRoutes();
21
+
22
+ //#endregion
23
+ export { createWorkAppsRoutes, workAppsRoutes };
package/dist/env.d.ts CHANGED
@@ -14,11 +14,11 @@ declare const envSchema: z.ZodObject<{
14
14
  pentest: "pentest";
15
15
  }>>;
16
16
  LOG_LEVEL: z.ZodDefault<z.ZodEnum<{
17
- error: "error";
18
17
  trace: "trace";
19
18
  debug: "debug";
20
19
  info: "info";
21
20
  warn: "warn";
21
+ error: "error";
22
22
  }>>;
23
23
  INKEEP_AGENTS_MANAGE_DATABASE_URL: z.ZodString;
24
24
  INKEEP_AGENTS_RUN_DATABASE_URL: z.ZodString;
@@ -59,7 +59,7 @@ declare const envSchema: z.ZodObject<{
59
59
  declare const env: {
60
60
  NODE_ENV: "development" | "production" | "test";
61
61
  ENVIRONMENT: "development" | "production" | "test" | "pentest";
62
- LOG_LEVEL: "error" | "trace" | "debug" | "info" | "warn";
62
+ LOG_LEVEL: "trace" | "debug" | "info" | "warn" | "error";
63
63
  INKEEP_AGENTS_MANAGE_DATABASE_URL: string;
64
64
  INKEEP_AGENTS_RUN_DATABASE_URL: string;
65
65
  INKEEP_AGENTS_API_URL: string;
package/dist/factory.d.ts CHANGED
@@ -3,7 +3,7 @@ import "./types/index.js";
3
3
  import { createAgentsHono } from "./createApp.js";
4
4
  import { createAuth0Provider, createOIDCProvider } from "./ssoHelpers.js";
5
5
  import { CredentialStore, ServerConfig } from "@inkeep/agents-core";
6
- import * as hono3 from "hono";
6
+ import * as hono0 from "hono";
7
7
  import * as zod0 from "zod";
8
8
  import { SSOProviderConfig, UserAuthConfig } from "@inkeep/agents-core/auth";
9
9
  import * as hono_types1 from "hono/types";
@@ -804,25 +804,25 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
804
804
  ac: better_auth_plugins0.AccessControl;
805
805
  roles: {
806
806
  member: {
807
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
808
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
807
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
808
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
809
809
  connector: "OR" | "AND";
810
810
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
811
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
811
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
812
812
  };
813
813
  admin: {
814
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
815
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
814
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
815
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
816
816
  connector: "OR" | "AND";
817
817
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
818
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
818
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
819
819
  };
820
820
  owner: {
821
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
822
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
821
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
822
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
823
823
  connector: "OR" | "AND";
824
824
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
825
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
825
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
826
826
  };
827
827
  };
828
828
  creatorRole: "admin";
@@ -1127,25 +1127,25 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
1127
1127
  ac: better_auth_plugins0.AccessControl;
1128
1128
  roles: {
1129
1129
  member: {
1130
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
1131
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
1130
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
1131
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
1132
1132
  connector: "OR" | "AND";
1133
1133
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1134
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
1134
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
1135
1135
  };
1136
1136
  admin: {
1137
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
1138
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
1137
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
1138
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
1139
1139
  connector: "OR" | "AND";
1140
1140
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1141
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
1141
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
1142
1142
  };
1143
1143
  owner: {
1144
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
1145
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
1144
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
1145
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
1146
1146
  connector: "OR" | "AND";
1147
1147
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1148
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
1148
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
1149
1149
  };
1150
1150
  };
1151
1151
  creatorRole: "admin";
@@ -1570,6 +1570,6 @@ declare function createAgentsApp(config?: {
1570
1570
  credentialStores?: CredentialStore[];
1571
1571
  auth?: UserAuthConfig;
1572
1572
  sandboxConfig?: SandboxConfig;
1573
- }): hono3.Hono<hono_types1.BlankEnv, hono_types1.BlankSchema, "/">;
1573
+ }): hono0.Hono<hono_types1.BlankEnv, hono_types1.BlankSchema, "/">;
1574
1574
  //#endregion
1575
1575
  export { type SSOProviderConfig, type UserAuthConfig, createAgentsApp, createAgentsAuth, createAgentsHono, createAuth0Provider, createOIDCProvider };
package/dist/index.d.ts CHANGED
@@ -805,25 +805,25 @@ declare const auth: better_auth79.Auth<{
805
805
  ac: better_auth_plugins69.AccessControl;
806
806
  roles: {
807
807
  member: {
808
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>[key] | {
809
- actions: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>[key];
808
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
809
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
810
810
  connector: "OR" | "AND";
811
811
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
812
- statements: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>;
812
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
813
813
  };
814
814
  admin: {
815
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>[key] | {
816
- actions: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>[key];
815
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
816
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
817
817
  connector: "OR" | "AND";
818
818
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
819
- statements: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>;
819
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
820
820
  };
821
821
  owner: {
822
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>[key] | {
823
- actions: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>[key];
822
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
823
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
824
824
  connector: "OR" | "AND";
825
825
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
826
- statements: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>;
826
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
827
827
  };
828
828
  };
829
829
  creatorRole: "admin";
@@ -1128,25 +1128,25 @@ declare const auth: better_auth79.Auth<{
1128
1128
  ac: better_auth_plugins69.AccessControl;
1129
1129
  roles: {
1130
1130
  member: {
1131
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>[key] | {
1132
- actions: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>[key];
1131
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
1132
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
1133
1133
  connector: "OR" | "AND";
1134
1134
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
1135
- statements: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>;
1135
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
1136
1136
  };
1137
1137
  admin: {
1138
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>[key] | {
1139
- actions: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>[key];
1138
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
1139
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
1140
1140
  connector: "OR" | "AND";
1141
1141
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
1142
- statements: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>;
1142
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
1143
1143
  };
1144
1144
  owner: {
1145
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>[key] | {
1146
- actions: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>[key];
1145
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
1146
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
1147
1147
  connector: "OR" | "AND";
1148
1148
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
1149
- statements: better_auth_plugins69.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins69.Statements>;
1149
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
1150
1150
  };
1151
1151
  };
1152
1152
  creatorRole: "admin";
@@ -37,5 +37,10 @@ declare const runCorsConfig: CorsOptions;
37
37
  * CORS configuration for SigNoz proxy routes
38
38
  */
39
39
  declare const signozCorsConfig: CorsOptions;
40
+ /**
41
+ * CORS configuration for work-apps routes (Slack, etc.)
42
+ * Needs to allow cross-origin requests with credentials for dashboard integration
43
+ */
44
+ declare const workAppsCorsConfig: CorsOptions;
40
45
  //#endregion
41
- export { authCorsConfig, defaultCorsConfig, getBaseDomain, getRootDomain, isOriginAllowed, playgroundCorsConfig, runCorsConfig, signozCorsConfig };
46
+ export { authCorsConfig, defaultCorsConfig, getBaseDomain, getRootDomain, isOriginAllowed, playgroundCorsConfig, runCorsConfig, signozCorsConfig, workAppsCorsConfig };