@inkeep/agents-api 0.0.0-dev-20260129102848 → 0.0.0-dev-20260129143016

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 (44) hide show
  1. package/dist/.well-known/workflow/v1/manifest.debug.json +14 -14
  2. package/dist/.well-known/workflow/v1/step.cjs +0 -1
  3. package/dist/createApp.d.ts +2 -2
  4. package/dist/createApp.js +8 -6
  5. package/dist/data/db/runDbClient.d.ts +2 -2
  6. package/dist/domains/evals/routes/datasetTriggers.d.ts +2 -2
  7. package/dist/domains/evals/routes/index.d.ts +2 -2
  8. package/dist/domains/github/index.d.ts +3 -3
  9. package/dist/domains/manage/routes/conversations.d.ts +2 -2
  10. package/dist/domains/manage/routes/evals/evaluationResults.d.ts +2 -2
  11. package/dist/domains/manage/routes/index.d.ts +2 -2
  12. package/dist/domains/manage/routes/mcp.d.ts +2 -2
  13. package/dist/domains/manage/routes/projectMembers.js +1 -14
  14. package/dist/domains/manage/routes/projectPermissions.js +2 -9
  15. package/dist/domains/manage/routes/projects.js +14 -16
  16. package/dist/domains/manage/routes/signoz.d.ts +2 -2
  17. package/dist/domains/manage/routes/signoz.js +1 -1
  18. package/dist/domains/manage/routes/userProjectMemberships.js +1 -2
  19. package/dist/domains/run/context/validation.d.ts +1 -1
  20. package/dist/domains/run/services/TriggerService.d.ts +1 -1
  21. package/dist/domains/run/utils/token-estimator.d.ts +2 -2
  22. package/dist/env.d.ts +0 -2
  23. package/dist/env.js +0 -1
  24. package/dist/factory.d.ts +29 -29
  25. package/dist/factory.js +4 -10
  26. package/dist/index.d.ts +30 -29
  27. package/dist/index.js +3 -5
  28. package/dist/middleware/branchScopedDb.d.ts +1 -1
  29. package/dist/middleware/evalsAuth.d.ts +2 -2
  30. package/dist/middleware/manageAuth.d.ts +2 -2
  31. package/dist/middleware/projectAccess.d.ts +2 -11
  32. package/dist/middleware/projectAccess.js +7 -33
  33. package/dist/middleware/projectConfig.d.ts +3 -3
  34. package/dist/middleware/ref.d.ts +1 -1
  35. package/dist/middleware/requirePermission.d.ts +2 -2
  36. package/dist/middleware/requirePermission.js +1 -2
  37. package/dist/middleware/runAuth.d.ts +4 -4
  38. package/dist/middleware/sessionAuth.d.ts +3 -3
  39. package/dist/middleware/sessionAuth.js +1 -2
  40. package/dist/middleware/tenantAccess.d.ts +2 -2
  41. package/dist/middleware/tracing.d.ts +3 -3
  42. package/package.json +4 -4
  43. package/dist/initialization.d.ts +0 -6
  44. package/dist/initialization.js +0 -72
@@ -11,20 +11,6 @@
11
11
  "stepId": "__builtin_response_text"
12
12
  }
13
13
  },
14
- "src/domains/evals/workflow/functions/evaluateConversation.ts": {
15
- "executeEvaluatorStep": {
16
- "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//executeEvaluatorStep"
17
- },
18
- "getConversationStep": {
19
- "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//getConversationStep"
20
- },
21
- "getEvaluatorsStep": {
22
- "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//getEvaluatorsStep"
23
- },
24
- "logStep": {
25
- "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//logStep"
26
- }
27
- },
28
14
  "src/domains/evals/workflow/functions/runDatasetItem.ts": {
29
15
  "callChatApiStep": {
30
16
  "stepId": "step//src/domains/evals/workflow/functions/runDatasetItem.ts//callChatApiStep"
@@ -38,6 +24,20 @@
38
24
  "logStep": {
39
25
  "stepId": "step//src/domains/evals/workflow/functions/runDatasetItem.ts//logStep"
40
26
  }
27
+ },
28
+ "src/domains/evals/workflow/functions/evaluateConversation.ts": {
29
+ "executeEvaluatorStep": {
30
+ "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//executeEvaluatorStep"
31
+ },
32
+ "getConversationStep": {
33
+ "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//getConversationStep"
34
+ },
35
+ "getEvaluatorsStep": {
36
+ "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//getEvaluatorsStep"
37
+ },
38
+ "logStep": {
39
+ "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//logStep"
40
+ }
41
41
  }
42
42
  },
43
43
  "workflows": {
@@ -212680,7 +212680,6 @@ var envSchema2 = external_exports.object({
212680
212680
  NANGO_SECRET_KEY: external_exports.string().optional(),
212681
212681
  OTEL_BSP_SCHEDULE_DELAY: external_exports.coerce.number().optional().default(500),
212682
212682
  OTEL_BSP_MAX_EXPORT_BATCH_SIZE: external_exports.coerce.number().optional().default(64),
212683
- DISABLE_AUTH: external_exports.string().optional().default("false").transform((val) => val === "true"),
212684
212683
  TENANT_ID: external_exports.string().optional().default("default"),
212685
212684
  SIGNOZ_URL: external_exports.string().optional(),
212686
212685
  SIGNOZ_API_KEY: external_exports.string().optional(),
@@ -1,10 +1,10 @@
1
1
  import { AppConfig } from "./types/app.js";
2
2
  import "./types/index.js";
3
3
  import { Hono } from "hono";
4
- import * as hono_types1 from "hono/types";
4
+ import * as hono_types16 from "hono/types";
5
5
 
6
6
  //#region src/createApp.d.ts
7
7
  declare const isWebhookRoute: (path: string) => boolean;
8
- declare function createAgentsHono(config: AppConfig): Hono<hono_types1.BlankEnv, hono_types1.BlankSchema, "/">;
8
+ declare function createAgentsHono(config: AppConfig): Hono<hono_types16.BlankEnv, hono_types16.BlankSchema, "/">;
9
9
  //#endregion
10
10
  export { createAgentsHono, isWebhookRoute };
package/dist/createApp.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getLogger } from "./logger.js";
1
+ import { getLogger as getLogger$1 } from "./logger.js";
2
2
  import { env } from "./env.js";
3
3
  import { evalRoutes } from "./domains/evals/index.js";
4
4
  import { workflowRoutes } from "./domains/evals/workflow/routes.js";
@@ -22,13 +22,14 @@ import { executionBaggageMiddleware } from "./middleware/tracing.js";
22
22
  import { setupOpenAPIRoutes } from "./openapi.js";
23
23
  import { healthChecksHandler } from "./routes/healthChecks.js";
24
24
  import { OpenAPIHono, createRoute, z } from "@hono/zod-openapi";
25
+ import { OrgRoles } from "@inkeep/agents-core";
25
26
  import { Hono } from "hono";
26
27
  import { cors } from "hono/cors";
27
28
  import { requestId } from "hono/request-id";
28
29
  import { pinoLogger } from "hono-pino";
29
30
 
30
31
  //#region src/createApp.ts
31
- const logger = getLogger("agents-api");
32
+ const logger = getLogger$1("agents-api");
32
33
  const isTestEnvironment = () => env.ENVIRONMENT === "test";
33
34
  const isWebhookRoute = (path) => {
34
35
  return path.includes("/triggers/") && !path.endsWith("/triggers") && !path.endsWith("/triggers/");
@@ -82,7 +83,7 @@ function createAgentsHono(config) {
82
83
  return next();
83
84
  });
84
85
  app.use(pinoLogger({
85
- pino: getLogger("agents-api").getPinoInstance(),
86
+ pino: getLogger$1("agents-api").getPinoInstance(),
86
87
  http: { onResLevel(c) {
87
88
  if (c.res.status >= 500) return "error";
88
89
  if (c.req.path.includes("/signoz/")) return "debug";
@@ -107,7 +108,7 @@ function createAgentsHono(config) {
107
108
  });
108
109
  });
109
110
  app.use("/manage/tenants/*", async (c, next) => {
110
- if (env.DISABLE_AUTH || isTestEnvironment()) {
111
+ if (isTestEnvironment()) {
111
112
  await next();
112
113
  return;
113
114
  }
@@ -115,7 +116,7 @@ function createAgentsHono(config) {
115
116
  return sessionAuth()(c, next);
116
117
  });
117
118
  app.use("/manage/capabilities", async (c, next) => {
118
- if (!auth || env.DISABLE_AUTH || isTestEnvironment()) {
119
+ if (!auth || isTestEnvironment()) {
119
120
  await next();
120
121
  return;
121
122
  }
@@ -140,11 +141,12 @@ function createAgentsHono(config) {
140
141
  runtime: sandboxConfig.runtime
141
142
  } });
142
143
  });
143
- if (env.DISABLE_AUTH || isTestEnvironment()) app.use("/manage/tenants/:tenantId/*", async (c, next) => {
144
+ if (isTestEnvironment()) app.use("/manage/tenants/:tenantId/*", async (c, next) => {
144
145
  const tenantId = c.req.param("tenantId");
145
146
  if (tenantId) {
146
147
  c.set("tenantId", tenantId);
147
148
  c.set("userId", "anonymous");
149
+ c.set("tenantRole", OrgRoles.OWNER);
148
150
  }
149
151
  await next();
150
152
  });
@@ -1,6 +1,6 @@
1
- import * as _inkeep_agents_core3 from "@inkeep/agents-core";
1
+ import * as _inkeep_agents_core0 from "@inkeep/agents-core";
2
2
 
3
3
  //#region src/data/db/runDbClient.d.ts
4
- declare const runDbClient: _inkeep_agents_core3.AgentsRunDatabaseClient;
4
+ declare const runDbClient: _inkeep_agents_core0.AgentsRunDatabaseClient;
5
5
  //#endregion
6
6
  export { runDbClient as default };
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono9 from "hono";
2
+ import * as hono2 from "hono";
3
3
 
4
4
  //#region src/domains/evals/routes/datasetTriggers.d.ts
5
- declare const app: OpenAPIHono<hono9.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono2.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 hono8 from "hono";
2
+ import * as hono3 from "hono";
3
3
 
4
4
  //#region src/domains/evals/routes/index.d.ts
5
- declare const app: OpenAPIHono<hono8.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono3.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -3,10 +3,10 @@ import { GenerateInstallationAccessTokenResult, GenerateTokenError, GenerateToke
3
3
  import { GetJwkResult, JwksError, JwksResult, clearJwksCache, getJwkForToken, getJwksCacheStatus } from "./jwks.js";
4
4
  import { GitHubOidcClaims, ValidateOidcTokenResult, ValidateTokenError, ValidateTokenResult, validateOidcToken } from "./oidcToken.js";
5
5
  import { Hono } from "hono";
6
- import * as hono_types14 from "hono/types";
6
+ import * as hono_types9 from "hono/types";
7
7
 
8
8
  //#region src/domains/github/index.d.ts
9
- declare function createGithubRoutes(): Hono<hono_types14.BlankEnv, hono_types14.BlankSchema, "/">;
10
- declare const githubRoutes: Hono<hono_types14.BlankEnv, hono_types14.BlankSchema, "/">;
9
+ declare function createGithubRoutes(): Hono<hono_types9.BlankEnv, hono_types9.BlankSchema, "/">;
10
+ declare const githubRoutes: Hono<hono_types9.BlankEnv, hono_types9.BlankSchema, "/">;
11
11
  //#endregion
12
12
  export { type GenerateInstallationAccessTokenResult, type GenerateTokenError, type GenerateTokenResult, type GetJwkResult, type GitHubAppConfig, type GitHubOidcClaims, type InstallationAccessToken, type InstallationInfo, type JwksError, type JwksResult, type LookupInstallationError, type LookupInstallationForRepoResult, type LookupInstallationResult, type ValidateOidcTokenResult, type ValidateTokenError, type ValidateTokenResult, clearJwksCache, createGithubRoutes, generateInstallationAccessToken, getGitHubAppConfig, getJwkForToken, getJwksCacheStatus, githubRoutes, isGitHubAppConfigured, lookupInstallationForRepo, validateOidcToken };
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono6 from "hono";
2
+ import * as hono13 from "hono";
3
3
 
4
4
  //#region src/domains/manage/routes/conversations.d.ts
5
- declare const app: OpenAPIHono<hono6.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono13.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 hono7 from "hono";
2
+ import * as hono16 from "hono";
3
3
 
4
4
  //#region src/domains/manage/routes/evals/evaluationResults.d.ts
5
- declare const app: OpenAPIHono<hono7.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 hono5 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<hono5.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono14.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types12 from "hono/types";
2
+ import * as hono_types13 from "hono/types";
3
3
 
4
4
  //#region src/domains/manage/routes/mcp.d.ts
5
- declare const app: Hono<hono_types12.BlankEnv, hono_types12.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types13.BlankEnv, hono_types13.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,6 +1,6 @@
1
1
  import { requireProjectPermission } from "../../../middleware/projectAccess.js";
2
2
  import { OpenAPIHono, createRoute, z } from "@hono/zod-openapi";
3
- import { ProjectRoles, changeProjectRole, commonGetErrorResponses, createApiError, grantProjectAccess, isAuthzEnabled, listProjectMembers, revokeProjectAccess } from "@inkeep/agents-core";
3
+ import { ProjectRoles, changeProjectRole, commonGetErrorResponses, createApiError, grantProjectAccess, listProjectMembers, revokeProjectAccess } from "@inkeep/agents-core";
4
4
 
5
5
  //#region src/domains/manage/routes/projectMembers.ts
6
6
  const app = new OpenAPIHono();
@@ -51,7 +51,6 @@ app.openapi(createRoute({
51
51
  }
52
52
  }), async (c) => {
53
53
  const { projectId, tenantId } = c.req.valid("param");
54
- if (!isAuthzEnabled()) return c.json({ data: [] });
55
54
  const members = await listProjectMembers({
56
55
  tenantId,
57
56
  projectId
@@ -83,10 +82,6 @@ app.openapi(createRoute({
83
82
  }), async (c) => {
84
83
  const { projectId, tenantId } = c.req.valid("param");
85
84
  const { userId, role } = c.req.valid("json");
86
- if (!isAuthzEnabled()) throw createApiError({
87
- code: "bad_request",
88
- message: "Project member management requires authorization to be enabled (ENABLE_AUTHZ=true)"
89
- });
90
85
  await grantProjectAccess({
91
86
  tenantId,
92
87
  projectId,
@@ -120,10 +115,6 @@ app.openapi(createRoute({
120
115
  }), async (c) => {
121
116
  const { projectId, userId, tenantId } = c.req.valid("param");
122
117
  const { role: newRole, previousRole } = c.req.valid("json");
123
- if (!isAuthzEnabled()) throw createApiError({
124
- code: "bad_request",
125
- message: "Project member management requires authorization to be enabled (ENABLE_AUTHZ=true)"
126
- });
127
118
  if (!previousRole) throw createApiError({
128
119
  code: "bad_request",
129
120
  message: "previousRole is required to update a member role"
@@ -164,10 +155,6 @@ app.openapi(createRoute({
164
155
  }), async (c) => {
165
156
  const { projectId, userId, tenantId } = c.req.valid("param");
166
157
  const { role } = c.req.valid("query");
167
- if (!isAuthzEnabled()) throw createApiError({
168
- code: "bad_request",
169
- message: "Project member management requires authorization to be enabled (ENABLE_AUTHZ=true)"
170
- });
171
158
  await revokeProjectAccess({
172
159
  tenantId,
173
160
  projectId,
@@ -1,6 +1,5 @@
1
- import { env } from "../../../env.js";
2
1
  import { OpenAPIHono, createRoute, z } from "@hono/zod-openapi";
3
- import { OrgRoles, SpiceDbProjectPermissions, SpiceDbResourceTypes, checkBulkPermissions, commonGetErrorResponses, createApiError, isAuthzEnabled } from "@inkeep/agents-core";
2
+ import { OrgRoles, SpiceDbProjectPermissions, SpiceDbResourceTypes, checkBulkPermissions, commonGetErrorResponses, createApiError } from "@inkeep/agents-core";
4
3
 
5
4
  //#region src/domains/manage/routes/projectPermissions.ts
6
5
  const app = new OpenAPIHono();
@@ -32,8 +31,7 @@ app.openapi(createRoute({
32
31
  const { projectId } = c.req.valid("param");
33
32
  const userId = c.get("userId");
34
33
  const tenantRole = c.get("tenantRole");
35
- const isTestEnvironment = process.env.ENVIRONMENT === "test";
36
- if (env.DISABLE_AUTH || isTestEnvironment) return c.json({ data: {
34
+ if (process.env.ENVIRONMENT === "test") return c.json({ data: {
37
35
  canView: true,
38
36
  canUse: true,
39
37
  canEdit: true
@@ -43,11 +41,6 @@ app.openapi(createRoute({
43
41
  canUse: true,
44
42
  canEdit: true
45
43
  } });
46
- if (!isAuthzEnabled()) return c.json({ data: {
47
- canView: true,
48
- canUse: true,
49
- canEdit: false
50
- } });
51
44
  if (!userId) throw createApiError({
52
45
  code: "unauthorized",
53
46
  message: "User not found"
@@ -4,7 +4,7 @@ import { requireProjectPermission } from "../../../middleware/projectAccess.js";
4
4
  import { speakeasyOffsetLimitPagination } from "../../../utils/speakeasy.js";
5
5
  import { requirePermission } from "../../../middleware/requirePermission.js";
6
6
  import { OpenAPIHono, createRoute } from "@hono/zod-openapi";
7
- import { ErrorResponseSchema, PaginationQueryParamsSchema, ProjectApiInsertSchema, ProjectApiUpdateSchema, ProjectListResponse, ProjectResponse, TenantIdParamsSchema, TenantParamsSchema, cascadeDeleteByProject, commonGetErrorResponses, createApiError, createProject, createProjectMetadataAndBranch, deleteProject, deleteProjectWithBranch, doltCheckout, getProject, getProjectMainBranchName, isAuthzEnabled, listAccessibleProjectIds, listProjectsWithMetadataPaginated, removeProjectFromSpiceDb, syncProjectToSpiceDb, updateProject } from "@inkeep/agents-core";
7
+ import { ErrorResponseSchema, PaginationQueryParamsSchema, ProjectApiInsertSchema, ProjectApiUpdateSchema, ProjectListResponse, ProjectResponse, TenantIdParamsSchema, TenantParamsSchema, cascadeDeleteByProject, commonGetErrorResponses, createApiError, createProject, createProjectMetadataAndBranch, deleteProject, deleteProjectWithBranch, doltCheckout, getProject, getProjectMainBranchName, listAccessibleProjectIds, listProjectsWithMetadataPaginated, removeProjectFromSpiceDb, syncProjectToSpiceDb, updateProject } from "@inkeep/agents-core";
8
8
 
9
9
  //#region src/domains/manage/routes/projects.ts
10
10
  const app = new OpenAPIHono();
@@ -45,7 +45,7 @@ app.openapi(createRoute({
45
45
  const page = Number(c.req.query("page")) || 1;
46
46
  const limit = Math.min(Number(c.req.query("limit")) || 10, 100);
47
47
  let accessibleIds;
48
- if (isAuthzEnabled() && userId) {
48
+ if (userId) {
49
49
  const result$1 = await listAccessibleProjectIds({
50
50
  userId,
51
51
  orgRole: tenantRole
@@ -148,20 +148,18 @@ app.openapi(createRoute({
148
148
  tenantId,
149
149
  ...body
150
150
  });
151
- if (isAuthzEnabled()) {
152
- if (!userId) throw createApiError({
153
- code: "unauthorized",
154
- message: "User not found"
151
+ if (!userId) throw createApiError({
152
+ code: "unauthorized",
153
+ message: "User not found"
154
+ });
155
+ try {
156
+ await syncProjectToSpiceDb({
157
+ tenantId,
158
+ projectId: body.id,
159
+ creatorUserId: userId
155
160
  });
156
- try {
157
- await syncProjectToSpiceDb({
158
- tenantId,
159
- projectId: body.id,
160
- creatorUserId: userId
161
- });
162
- } catch (syncError) {
163
- console.warn("Failed to sync project to SpiceDB:", syncError);
164
- }
161
+ } catch (syncError) {
162
+ console.warn("Failed to sync project to SpiceDB:", syncError);
165
163
  }
166
164
  return c.json({ data: {
167
165
  ...projectConfig,
@@ -255,7 +253,7 @@ app.openapi(createRoute({
255
253
  code: "not_found",
256
254
  message: "Project not found"
257
255
  });
258
- if (isAuthzEnabled()) try {
256
+ try {
259
257
  await removeProjectFromSpiceDb({
260
258
  tenantId,
261
259
  projectId: id
@@ -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_types15 from "hono/types";
4
4
 
5
5
  //#region src/domains/manage/routes/signoz.d.ts
6
6
  declare const app: Hono<{
7
7
  Variables: ManageAppVariables;
8
- }, hono_types9.BlankSchema, "/">;
8
+ }, hono_types15.BlankSchema, "/">;
9
9
  //#endregion
10
10
  export { app as default };
@@ -1,8 +1,8 @@
1
1
  import { getLogger as getLogger$1 } from "../../../logger.js";
2
2
  import { env } from "../../../env.js";
3
3
  import { enforceSecurityFilters } from "../../../utils/signozHelpers.js";
4
- import { Hono } from "hono";
5
4
  import { createApiError, projectExists } from "@inkeep/agents-core";
5
+ import { Hono } from "hono";
6
6
  import axios from "axios";
7
7
 
8
8
  //#region src/domains/manage/routes/signoz.ts
@@ -1,5 +1,5 @@
1
1
  import { OpenAPIHono, createRoute, z } from "@hono/zod-openapi";
2
- import { ProjectRoles, commonGetErrorResponses, isAuthzEnabled, listUserProjectMembershipsInSpiceDb } from "@inkeep/agents-core";
2
+ import { ProjectRoles, commonGetErrorResponses, listUserProjectMembershipsInSpiceDb } from "@inkeep/agents-core";
3
3
 
4
4
  //#region src/domains/manage/routes/userProjectMemberships.ts
5
5
  const app = new OpenAPIHono();
@@ -32,7 +32,6 @@ app.openapi(createRoute({
32
32
  }
33
33
  }), async (c) => {
34
34
  const { tenantId, userId } = c.req.valid("param");
35
- if (!isAuthzEnabled()) return c.json({ data: [] });
36
35
  const memberships = await listUserProjectMembershipsInSpiceDb({
37
36
  tenantId,
38
37
  userId
@@ -1,5 +1,5 @@
1
- import { Context, Next } from "hono";
2
1
  import { CredentialStoreRegistry, FullExecutionContext } from "@inkeep/agents-core";
2
+ import { Context, Next } from "hono";
3
3
  import { ValidateFunction } from "ajv";
4
4
 
5
5
  //#region src/domains/run/context/validation.d.ts
@@ -1,5 +1,5 @@
1
- import { Context } from "hono";
2
1
  import { ResolvedRef } from "@inkeep/agents-core";
2
+ import { Context } from "hono";
3
3
 
4
4
  //#region src/domains/run/services/TriggerService.d.ts
5
5
 
@@ -1,4 +1,4 @@
1
- import * as _inkeep_agents_core0 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_core0.ContextBreakdown;
20
+ breakdown: _inkeep_agents_core3.ContextBreakdown;
21
21
  }
22
22
  //#endregion
23
23
  export { AssembleResult, type BreakdownComponentDef, type ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown, estimateTokens };
package/dist/env.d.ts CHANGED
@@ -37,7 +37,6 @@ declare const envSchema: z.ZodObject<{
37
37
  NANGO_SECRET_KEY: z.ZodOptional<z.ZodString>;
38
38
  OTEL_BSP_SCHEDULE_DELAY: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
39
39
  OTEL_BSP_MAX_EXPORT_BATCH_SIZE: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
40
- DISABLE_AUTH: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodString>>, z.ZodTransform<boolean, string>>;
41
40
  TENANT_ID: z.ZodDefault<z.ZodOptional<z.ZodString>>;
42
41
  SIGNOZ_URL: z.ZodOptional<z.ZodString>;
43
42
  SIGNOZ_API_KEY: z.ZodOptional<z.ZodString>;
@@ -60,7 +59,6 @@ declare const env: {
60
59
  NANGO_SERVER_URL: string;
61
60
  OTEL_BSP_SCHEDULE_DELAY: number;
62
61
  OTEL_BSP_MAX_EXPORT_BATCH_SIZE: number;
63
- DISABLE_AUTH: boolean;
64
62
  TENANT_ID: string;
65
63
  ANTHROPIC_API_KEY: string;
66
64
  INKEEP_AGENTS_MANAGE_UI_URL?: string | undefined;
package/dist/env.js CHANGED
@@ -39,7 +39,6 @@ const envSchema = z.object({
39
39
  NANGO_SECRET_KEY: z.string().optional(),
40
40
  OTEL_BSP_SCHEDULE_DELAY: z.coerce.number().optional().default(500),
41
41
  OTEL_BSP_MAX_EXPORT_BATCH_SIZE: z.coerce.number().optional().default(64),
42
- DISABLE_AUTH: z.string().optional().default("false").transform((val) => val === "true"),
43
42
  TENANT_ID: z.string().optional().default("default"),
44
43
  SIGNOZ_URL: z.string().optional(),
45
44
  SIGNOZ_API_KEY: z.string().optional(),
package/dist/factory.d.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  import { SandboxConfig } from "./types/app.js";
2
2
  import "./types/index.js";
3
3
  import { createAgentsHono } from "./createApp.js";
4
- import { initializeDefaultUser } from "./initialization.js";
5
4
  import { createAuth0Provider, createOIDCProvider } from "./ssoHelpers.js";
6
- import * as hono0 from "hono";
7
5
  import { CredentialStore, ServerConfig } from "@inkeep/agents-core";
6
+ import * as hono0 from "hono";
8
7
  import * as zod0 from "zod";
9
8
  import { SSOProviderConfig, UserAuthConfig } from "@inkeep/agents-core/auth";
10
9
  import * as hono_types0 from "hono/types";
@@ -122,11 +121,11 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
122
121
  useSecureCookies?: boolean | undefined;
123
122
  disableCSRFCheck?: boolean | undefined;
124
123
  disableOriginCheck?: boolean | undefined;
125
- crossSubDomainCookies: {
124
+ crossSubDomainCookies?: {
126
125
  enabled: boolean;
127
126
  additionalCookies?: string[];
128
127
  domain?: string;
129
- };
128
+ } | undefined;
130
129
  cookies?: {
131
130
  [key: string]: {
132
131
  name?: string;
@@ -795,27 +794,28 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
795
794
  ac: better_auth_plugins0.AccessControl;
796
795
  roles: {
797
796
  member: {
798
- 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] | {
799
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
797
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
798
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
800
799
  connector: "OR" | "AND";
801
800
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
802
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
801
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
803
802
  };
804
803
  admin: {
805
- 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] | {
806
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
804
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
805
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
807
806
  connector: "OR" | "AND";
808
807
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
809
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
808
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
810
809
  };
811
810
  owner: {
812
- 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] | {
813
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
811
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
812
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
814
813
  connector: "OR" | "AND";
815
814
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
816
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
815
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
817
816
  };
818
817
  };
818
+ creatorRole: "admin";
819
819
  membershipLimit: number;
820
820
  invitationLimit: number;
821
821
  invitationExpiresIn: number;
@@ -987,7 +987,7 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
987
987
  id: string;
988
988
  organizationId: string;
989
989
  email: string;
990
- role: "member" | "admin" | "owner";
990
+ role: "owner" | "admin" | "member";
991
991
  status: better_auth_plugins0.InvitationStatus;
992
992
  inviterId: string;
993
993
  expiresAt: Date;
@@ -996,7 +996,7 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
996
996
  Member: {
997
997
  id: string;
998
998
  organizationId: string;
999
- role: "member" | "admin" | "owner";
999
+ role: "owner" | "admin" | "member";
1000
1000
  createdAt: Date;
1001
1001
  userId: string;
1002
1002
  user: {
@@ -1012,7 +1012,7 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
1012
1012
  members: {
1013
1013
  id: string;
1014
1014
  organizationId: string;
1015
- role: "member" | "admin" | "owner";
1015
+ role: "owner" | "admin" | "member";
1016
1016
  createdAt: Date;
1017
1017
  userId: string;
1018
1018
  user: {
@@ -1026,7 +1026,7 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
1026
1026
  id: string;
1027
1027
  organizationId: string;
1028
1028
  email: string;
1029
- role: "member" | "admin" | "owner";
1029
+ role: "owner" | "admin" | "member";
1030
1030
  status: better_auth_plugins0.InvitationStatus;
1031
1031
  inviterId: string;
1032
1032
  expiresAt: Date;
@@ -1104,27 +1104,28 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
1104
1104
  ac: better_auth_plugins0.AccessControl;
1105
1105
  roles: {
1106
1106
  member: {
1107
- 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] | {
1108
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
1107
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1108
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
1109
1109
  connector: "OR" | "AND";
1110
1110
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1111
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
1111
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
1112
1112
  };
1113
1113
  admin: {
1114
- 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] | {
1115
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
1114
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1115
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
1116
1116
  connector: "OR" | "AND";
1117
1117
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1118
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
1118
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
1119
1119
  };
1120
1120
  owner: {
1121
- 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] | {
1122
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
1121
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1122
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
1123
1123
  connector: "OR" | "AND";
1124
1124
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1125
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
1125
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
1126
1126
  };
1127
1127
  };
1128
+ creatorRole: "admin";
1128
1129
  membershipLimit: number;
1129
1130
  invitationLimit: number;
1130
1131
  invitationExpiresIn: number;
@@ -1529,13 +1530,12 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
1529
1530
  verificationUri?: string | undefined;
1530
1531
  }>;
1531
1532
  }];
1532
- }> | null;
1533
+ }>;
1533
1534
  declare function createAgentsApp(config?: {
1534
1535
  serverConfig?: ServerConfig;
1535
1536
  credentialStores?: CredentialStore[];
1536
1537
  auth?: UserAuthConfig;
1537
1538
  sandboxConfig?: SandboxConfig;
1538
- skipInitialization?: boolean;
1539
1539
  }): hono0.Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
1540
1540
  //#endregion
1541
- export { type SSOProviderConfig, type UserAuthConfig, createAgentsApp, createAgentsAuth, createAgentsHono, createAuth0Provider, createOIDCProvider, initializeDefaultUser };
1541
+ export { type SSOProviderConfig, type UserAuthConfig, createAgentsApp, createAgentsAuth, createAgentsHono, createAuth0Provider, createOIDCProvider };