@inkeep/agents-api 0.0.0-dev-20260126093157 → 0.0.0-dev-20260126174131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.well-known/workflow/v1/manifest.debug.json +22 -22
- package/dist/createApp.js +3 -0
- package/dist/domains/evals/routes/datasetTriggers.d.ts +2 -2
- package/dist/domains/evals/routes/index.d.ts +2 -2
- package/dist/domains/evals/workflow/routes.d.ts +2 -2
- package/dist/domains/github/config.d.ts +14 -0
- package/dist/domains/github/config.js +47 -0
- package/dist/domains/github/index.d.ts +12 -0
- package/dist/domains/github/index.js +18 -0
- package/dist/domains/github/installation.d.ts +34 -0
- package/dist/domains/github/installation.js +172 -0
- package/dist/domains/github/jwks.d.ts +20 -0
- package/dist/domains/github/jwks.js +85 -0
- package/dist/domains/github/oidcToken.d.ts +22 -0
- package/dist/domains/github/oidcToken.js +140 -0
- package/dist/domains/github/routes/tokenExchange.d.ts +7 -0
- package/dist/domains/github/routes/tokenExchange.js +130 -0
- package/dist/domains/index.d.ts +2 -1
- package/dist/domains/index.js +2 -1
- package/dist/domains/manage/routes/conversations.d.ts +2 -2
- package/dist/domains/manage/routes/evals/evaluationResults.d.ts +2 -2
- package/dist/domains/manage/routes/index.d.ts +2 -2
- package/dist/domains/manage/routes/mcp.d.ts +2 -2
- package/dist/domains/manage/routes/signoz.d.ts +2 -2
- package/dist/domains/run/agents/relationTools.d.ts +2 -2
- package/dist/domains/run/context/ContextResolver.js +1 -1
- package/dist/domains/run/services/BaseCompressor.js +1 -1
- package/dist/domains/run/utils/token-estimator.d.ts +2 -2
- package/dist/factory.d.ts +22 -22
- package/dist/index.d.ts +22 -22
- package/dist/middleware/evalsAuth.d.ts +2 -2
- package/dist/middleware/manageAuth.d.ts +2 -2
- package/dist/middleware/projectAccess.d.ts +2 -2
- package/dist/middleware/projectConfig.d.ts +3 -3
- package/dist/middleware/requirePermission.d.ts +2 -2
- package/dist/middleware/sessionAuth.d.ts +3 -3
- package/dist/middleware/tenantAccess.d.ts +2 -2
- package/dist/middleware/tracing.d.ts +3 -3
- package/package.json +4 -3
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { getLogger } from "../../logger.js";
|
|
2
|
+
import { getJwkForToken } from "./jwks.js";
|
|
3
|
+
import { decodeProtectedHeader, errors, jwtVerify } from "jose";
|
|
4
|
+
|
|
5
|
+
//#region src/domains/github/oidcToken.ts
|
|
6
|
+
const logger = getLogger("github-oidc-token");
|
|
7
|
+
const GITHUB_OIDC_ISSUER = "https://token.actions.githubusercontent.com";
|
|
8
|
+
const EXPECTED_AUDIENCE = "inkeep-agents-action";
|
|
9
|
+
async function validateOidcToken(token) {
|
|
10
|
+
let header;
|
|
11
|
+
try {
|
|
12
|
+
header = decodeProtectedHeader(token);
|
|
13
|
+
} catch (error) {
|
|
14
|
+
const message = error instanceof Error ? error.message : "Unknown error";
|
|
15
|
+
logger.warn({ error: message }, "Failed to decode JWT header");
|
|
16
|
+
return {
|
|
17
|
+
success: false,
|
|
18
|
+
errorType: "malformed",
|
|
19
|
+
message: "Invalid JWT format: unable to decode token header"
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
if (header.alg !== "RS256") {
|
|
23
|
+
logger.warn({ algorithm: header.alg }, "Unexpected JWT algorithm");
|
|
24
|
+
return {
|
|
25
|
+
success: false,
|
|
26
|
+
errorType: "malformed",
|
|
27
|
+
message: `Invalid JWT algorithm: expected RS256, got ${header.alg}`
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const jwkResult = await getJwkForToken(header);
|
|
31
|
+
if (!jwkResult.success) {
|
|
32
|
+
logger.error({ error: jwkResult.error }, "Failed to get JWK for token");
|
|
33
|
+
return {
|
|
34
|
+
success: false,
|
|
35
|
+
errorType: "jwks_error",
|
|
36
|
+
message: jwkResult.error
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
const { payload } = await jwtVerify(token, jwkResult.key, {
|
|
41
|
+
issuer: GITHUB_OIDC_ISSUER,
|
|
42
|
+
audience: EXPECTED_AUDIENCE
|
|
43
|
+
});
|
|
44
|
+
const repository = payload.repository;
|
|
45
|
+
const repositoryOwner = payload.repository_owner;
|
|
46
|
+
const repositoryId = payload.repository_id;
|
|
47
|
+
const workflow = payload.workflow;
|
|
48
|
+
const actor = payload.actor;
|
|
49
|
+
const ref = payload.ref;
|
|
50
|
+
if (typeof repository !== "string" || typeof repositoryOwner !== "string" || typeof repositoryId !== "string" || typeof workflow !== "string" || typeof actor !== "string" || typeof ref !== "string") {
|
|
51
|
+
logger.warn({ payload }, "OIDC token missing required claims");
|
|
52
|
+
return {
|
|
53
|
+
success: false,
|
|
54
|
+
errorType: "malformed",
|
|
55
|
+
message: "OIDC token missing required claims: repository, repository_owner, repository_id, workflow, actor, or ref"
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
logger.info({
|
|
59
|
+
repository,
|
|
60
|
+
actor
|
|
61
|
+
}, "Successfully validated OIDC token");
|
|
62
|
+
return {
|
|
63
|
+
success: true,
|
|
64
|
+
claims: {
|
|
65
|
+
repository,
|
|
66
|
+
repository_owner: repositoryOwner,
|
|
67
|
+
repository_id: repositoryId,
|
|
68
|
+
workflow,
|
|
69
|
+
actor,
|
|
70
|
+
ref
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
} catch (error) {
|
|
74
|
+
if (error instanceof errors.JWTExpired) {
|
|
75
|
+
logger.warn({}, "OIDC token has expired");
|
|
76
|
+
return {
|
|
77
|
+
success: false,
|
|
78
|
+
errorType: "expired",
|
|
79
|
+
message: "OIDC token has expired"
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
if (error instanceof errors.JWTClaimValidationFailed) {
|
|
83
|
+
const claimError = error;
|
|
84
|
+
if (claimError.claim === "iss") {
|
|
85
|
+
logger.warn({ issuer: claimError.reason }, "Invalid OIDC token issuer");
|
|
86
|
+
return {
|
|
87
|
+
success: false,
|
|
88
|
+
errorType: "wrong_issuer",
|
|
89
|
+
message: `Invalid token issuer: expected ${GITHUB_OIDC_ISSUER}`
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
if (claimError.claim === "aud") {
|
|
93
|
+
logger.warn({ audience: claimError.reason }, "Invalid OIDC token audience");
|
|
94
|
+
return {
|
|
95
|
+
success: false,
|
|
96
|
+
errorType: "wrong_audience",
|
|
97
|
+
message: `Invalid token audience: expected ${EXPECTED_AUDIENCE}`
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
logger.warn({
|
|
101
|
+
claim: claimError.claim,
|
|
102
|
+
reason: claimError.reason
|
|
103
|
+
}, "JWT claim validation failed");
|
|
104
|
+
return {
|
|
105
|
+
success: false,
|
|
106
|
+
errorType: "malformed",
|
|
107
|
+
message: `JWT claim validation failed: ${claimError.claim} ${claimError.reason}`
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
if (error instanceof errors.JWSSignatureVerificationFailed) {
|
|
111
|
+
logger.warn({}, "Invalid OIDC token signature");
|
|
112
|
+
return {
|
|
113
|
+
success: false,
|
|
114
|
+
errorType: "invalid_signature",
|
|
115
|
+
message: "Invalid token signature"
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
if (error instanceof errors.JOSEError) {
|
|
119
|
+
logger.error({
|
|
120
|
+
error: error.message,
|
|
121
|
+
code: error.code
|
|
122
|
+
}, "JOSE error during token validation");
|
|
123
|
+
return {
|
|
124
|
+
success: false,
|
|
125
|
+
errorType: "malformed",
|
|
126
|
+
message: `Token validation error: ${error.message}`
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
const message = error instanceof Error ? error.message : "Unknown error";
|
|
130
|
+
logger.error({ error: message }, "Unexpected error during token validation");
|
|
131
|
+
return {
|
|
132
|
+
success: false,
|
|
133
|
+
errorType: "malformed",
|
|
134
|
+
message: `Token validation error: ${message}`
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
//#endregion
|
|
140
|
+
export { validateOidcToken };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { getLogger } from "../../../logger.js";
|
|
2
|
+
import { isGitHubAppConfigured } from "../config.js";
|
|
3
|
+
import { generateInstallationAccessToken, lookupInstallationForRepo } from "../installation.js";
|
|
4
|
+
import { validateOidcToken } from "../oidcToken.js";
|
|
5
|
+
import { Hono } from "hono";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
|
|
8
|
+
//#region src/domains/github/routes/tokenExchange.ts
|
|
9
|
+
const logger = getLogger("github-token-exchange");
|
|
10
|
+
const TokenExchangeRequestSchema = z.object({ oidc_token: z.string() });
|
|
11
|
+
const app = new Hono();
|
|
12
|
+
/**
|
|
13
|
+
* Exchange GitHub OIDC token for installation token.
|
|
14
|
+
*
|
|
15
|
+
* This is an internal infrastructure endpoint called by the CLI from GitHub Actions.
|
|
16
|
+
* It exchanges a GitHub Actions OIDC token for a GitHub App installation access token.
|
|
17
|
+
* Not included in the public OpenAPI spec.
|
|
18
|
+
*/
|
|
19
|
+
app.post("/", async (c) => {
|
|
20
|
+
const rawBody = await c.req.json().catch(() => null);
|
|
21
|
+
const parseResult = TokenExchangeRequestSchema.safeParse(rawBody);
|
|
22
|
+
if (!parseResult.success) {
|
|
23
|
+
const errorMessage = parseResult.error.issues.map((issue) => `${issue.path.join(".")}: ${issue.message}`).join("; ");
|
|
24
|
+
c.header("Content-Type", "application/problem+json");
|
|
25
|
+
return c.json({
|
|
26
|
+
title: "Bad Request",
|
|
27
|
+
status: 400,
|
|
28
|
+
detail: errorMessage,
|
|
29
|
+
error: errorMessage
|
|
30
|
+
}, 400);
|
|
31
|
+
}
|
|
32
|
+
const body = parseResult.data;
|
|
33
|
+
logger.info({}, "Processing token exchange request");
|
|
34
|
+
if (!isGitHubAppConfigured()) {
|
|
35
|
+
logger.error({}, "GitHub App credentials not configured");
|
|
36
|
+
const errorMessage = "GitHub App credentials are not configured. Please contact the administrator to set up GITHUB_APP_ID and GITHUB_APP_PRIVATE_KEY.";
|
|
37
|
+
c.header("Content-Type", "application/problem+json");
|
|
38
|
+
return c.json({
|
|
39
|
+
title: "GitHub App Not Configured",
|
|
40
|
+
status: 500,
|
|
41
|
+
detail: errorMessage,
|
|
42
|
+
error: errorMessage
|
|
43
|
+
}, 500);
|
|
44
|
+
}
|
|
45
|
+
const validationResult = await validateOidcToken(body.oidc_token);
|
|
46
|
+
if (!validationResult.success) {
|
|
47
|
+
const errorType = validationResult.errorType;
|
|
48
|
+
logger.warn({
|
|
49
|
+
errorType,
|
|
50
|
+
message: validationResult.message
|
|
51
|
+
}, "OIDC token validation failed");
|
|
52
|
+
c.header("Content-Type", "application/problem+json");
|
|
53
|
+
if (errorType === "malformed") return c.json({
|
|
54
|
+
title: "Bad Request",
|
|
55
|
+
status: 400,
|
|
56
|
+
detail: validationResult.message,
|
|
57
|
+
error: validationResult.message
|
|
58
|
+
}, 400);
|
|
59
|
+
return c.json({
|
|
60
|
+
title: "Token Validation Failed",
|
|
61
|
+
status: 401,
|
|
62
|
+
detail: validationResult.message,
|
|
63
|
+
error: validationResult.message
|
|
64
|
+
}, 401);
|
|
65
|
+
}
|
|
66
|
+
const { claims } = validationResult;
|
|
67
|
+
const installationResult = await lookupInstallationForRepo(claims.repository_owner, claims.repository.split("/")[1]);
|
|
68
|
+
if (!installationResult.success) {
|
|
69
|
+
const { errorType, message } = installationResult;
|
|
70
|
+
if (errorType === "not_installed") {
|
|
71
|
+
c.header("Content-Type", "application/problem+json");
|
|
72
|
+
return c.json({
|
|
73
|
+
title: "GitHub App Not Installed",
|
|
74
|
+
status: 403,
|
|
75
|
+
detail: message,
|
|
76
|
+
error: message
|
|
77
|
+
}, 403);
|
|
78
|
+
}
|
|
79
|
+
logger.error({
|
|
80
|
+
errorType,
|
|
81
|
+
message,
|
|
82
|
+
repository: claims.repository
|
|
83
|
+
}, "Failed to look up GitHub App installation");
|
|
84
|
+
c.header("Content-Type", "application/problem+json");
|
|
85
|
+
return c.json({
|
|
86
|
+
title: "Installation Lookup Failed",
|
|
87
|
+
status: 500,
|
|
88
|
+
detail: message,
|
|
89
|
+
error: message
|
|
90
|
+
}, 500);
|
|
91
|
+
}
|
|
92
|
+
const { installation } = installationResult;
|
|
93
|
+
logger.info({
|
|
94
|
+
installationId: installation.installationId,
|
|
95
|
+
repository: claims.repository
|
|
96
|
+
}, "Found GitHub App installation");
|
|
97
|
+
const tokenResult = await generateInstallationAccessToken(installation.installationId);
|
|
98
|
+
if (!tokenResult.success) {
|
|
99
|
+
const { errorType, message } = tokenResult;
|
|
100
|
+
logger.error({
|
|
101
|
+
errorType,
|
|
102
|
+
message,
|
|
103
|
+
installationId: installation.installationId,
|
|
104
|
+
repository: claims.repository
|
|
105
|
+
}, "Failed to generate installation access token");
|
|
106
|
+
c.header("Content-Type", "application/problem+json");
|
|
107
|
+
return c.json({
|
|
108
|
+
title: "Token Generation Failed",
|
|
109
|
+
status: 500,
|
|
110
|
+
detail: message,
|
|
111
|
+
error: message
|
|
112
|
+
}, 500);
|
|
113
|
+
}
|
|
114
|
+
const { accessToken } = tokenResult;
|
|
115
|
+
logger.info({
|
|
116
|
+
installationId: installation.installationId,
|
|
117
|
+
repository: claims.repository,
|
|
118
|
+
expiresAt: accessToken.expiresAt
|
|
119
|
+
}, "Token exchange completed successfully");
|
|
120
|
+
return c.json({
|
|
121
|
+
token: accessToken.token,
|
|
122
|
+
expires_at: accessToken.expiresAt,
|
|
123
|
+
repository: claims.repository,
|
|
124
|
+
installation_id: installation.installationId
|
|
125
|
+
}, 200);
|
|
126
|
+
});
|
|
127
|
+
var tokenExchange_default = app;
|
|
128
|
+
|
|
129
|
+
//#endregion
|
|
130
|
+
export { tokenExchange_default as default };
|
package/dist/domains/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createEvalRoutes, evalRoutes } from "./evals/index.js";
|
|
2
|
+
import { createGithubRoutes, githubRoutes } from "./github/index.js";
|
|
2
3
|
import { createManageRoutes, manageRoutes } from "./manage/index.js";
|
|
3
4
|
import { createRunRoutes, runRoutes } from "./run/index.js";
|
|
4
|
-
export { createEvalRoutes, createManageRoutes, createRunRoutes, evalRoutes, manageRoutes, runRoutes };
|
|
5
|
+
export { createEvalRoutes, createGithubRoutes, createManageRoutes, createRunRoutes, evalRoutes, githubRoutes, manageRoutes, runRoutes };
|
package/dist/domains/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createEvalRoutes, evalRoutes } from "./evals/index.js";
|
|
2
|
+
import { createGithubRoutes, githubRoutes } from "./github/index.js";
|
|
2
3
|
import { createManageRoutes, manageRoutes } from "./manage/index.js";
|
|
3
4
|
import { createRunRoutes, runRoutes } from "./run/index.js";
|
|
4
5
|
|
|
5
|
-
export { createEvalRoutes, createManageRoutes, createRunRoutes, evalRoutes, manageRoutes, runRoutes };
|
|
6
|
+
export { createEvalRoutes, createGithubRoutes, createManageRoutes, createRunRoutes, evalRoutes, githubRoutes, manageRoutes, runRoutes };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono10 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/manage/routes/conversations.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono10.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
|
|
2
|
+
import * as hono17 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/manage/routes/evals/evaluationResults.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
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
|
|
2
|
+
import * as hono18 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/manage/routes/index.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono18.Env, {}, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
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<
|
|
5
|
+
declare const app: Hono<hono_types13.BlankEnv, hono_types13.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
|
|
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
|
-
},
|
|
8
|
+
}, hono_types15.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { app as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgentConfig, DelegateRelation } from "./Agent.js";
|
|
2
2
|
import { InternalRelation } from "../utils/project.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _inkeep_agents_core2 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:
|
|
47
|
+
result: _inkeep_agents_core2.Message | _inkeep_agents_core2.Task;
|
|
48
48
|
}>;
|
|
49
49
|
/**
|
|
50
50
|
* Parameters for building a transfer relation config
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ContextCache } from "./contextCache.js";
|
|
2
2
|
import { ContextFetcher, MissingRequiredVariableError } from "./ContextFetcher.js";
|
|
3
3
|
import { getLogger, getTracer, setSpanWithError } from "@inkeep/agents-core";
|
|
4
|
-
import { SpanStatusCode } from "@opentelemetry/api";
|
|
5
4
|
import crypto from "node:crypto";
|
|
5
|
+
import { SpanStatusCode } from "@opentelemetry/api";
|
|
6
6
|
|
|
7
7
|
//#region src/domains/run/context/ContextResolver.ts
|
|
8
8
|
const logger = getLogger("context-resolver");
|
|
@@ -5,8 +5,8 @@ import { getCompressionConfigForModel } from "../utils/model-context-utils.js";
|
|
|
5
5
|
import { tracer } from "../utils/tracer.js";
|
|
6
6
|
import { agentSessionManager } from "./AgentSession.js";
|
|
7
7
|
import { getLedgerArtifacts } from "@inkeep/agents-core";
|
|
8
|
-
import { SpanStatusCode } from "@opentelemetry/api";
|
|
9
8
|
import { randomUUID } from "node:crypto";
|
|
9
|
+
import { SpanStatusCode } from "@opentelemetry/api";
|
|
10
10
|
|
|
11
11
|
//#region src/domains/run/services/BaseCompressor.ts
|
|
12
12
|
const logger = getLogger$1("BaseCompressor");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _inkeep_agents_core1 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:
|
|
20
|
+
breakdown: _inkeep_agents_core1.ContextBreakdown;
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
23
|
export { AssembleResult, type BreakdownComponentDef, type ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown, estimateTokens };
|
package/dist/factory.d.ts
CHANGED
|
@@ -795,25 +795,25 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
|
|
|
795
795
|
ac: better_auth_plugins0.AccessControl;
|
|
796
796
|
roles: {
|
|
797
797
|
member: {
|
|
798
|
-
authorize<K_1 extends "organization" | "
|
|
799
|
-
actions: better_auth_plugins0.Subset<"organization" | "
|
|
798
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
799
|
+
actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
800
800
|
connector: "OR" | "AND";
|
|
801
801
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
802
|
-
statements: better_auth_plugins0.Subset<"organization" | "
|
|
802
|
+
statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
803
803
|
};
|
|
804
804
|
admin: {
|
|
805
|
-
authorize<K_1 extends "organization" | "
|
|
806
|
-
actions: better_auth_plugins0.Subset<"organization" | "
|
|
805
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
806
|
+
actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
807
807
|
connector: "OR" | "AND";
|
|
808
808
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
809
|
-
statements: better_auth_plugins0.Subset<"organization" | "
|
|
809
|
+
statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
810
810
|
};
|
|
811
811
|
owner: {
|
|
812
|
-
authorize<K_1 extends "organization" | "
|
|
813
|
-
actions: better_auth_plugins0.Subset<"organization" | "
|
|
812
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
813
|
+
actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
814
814
|
connector: "OR" | "AND";
|
|
815
815
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
816
|
-
statements: better_auth_plugins0.Subset<"organization" | "
|
|
816
|
+
statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
817
817
|
};
|
|
818
818
|
};
|
|
819
819
|
membershipLimit: 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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
1029
|
+
role: "owner" | "admin" | "member";
|
|
1030
1030
|
status: better_auth_plugins0.InvitationStatus;
|
|
1031
1031
|
inviterId: string;
|
|
1032
1032
|
expiresAt: Date;
|
|
@@ -1104,25 +1104,25 @@ 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" | "
|
|
1108
|
-
actions: better_auth_plugins0.Subset<"organization" | "
|
|
1107
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1108
|
+
actions: better_auth_plugins0.Subset<"organization" | "project" | "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" | "
|
|
1111
|
+
statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
1112
1112
|
};
|
|
1113
1113
|
admin: {
|
|
1114
|
-
authorize<K_1 extends "organization" | "
|
|
1115
|
-
actions: better_auth_plugins0.Subset<"organization" | "
|
|
1114
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1115
|
+
actions: better_auth_plugins0.Subset<"organization" | "project" | "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" | "
|
|
1118
|
+
statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
1119
1119
|
};
|
|
1120
1120
|
owner: {
|
|
1121
|
-
authorize<K_1 extends "organization" | "
|
|
1122
|
-
actions: better_auth_plugins0.Subset<"organization" | "
|
|
1121
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1122
|
+
actions: better_auth_plugins0.Subset<"organization" | "project" | "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" | "
|
|
1125
|
+
statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
1126
1126
|
};
|
|
1127
1127
|
};
|
|
1128
1128
|
membershipLimit: number;
|