@inkeep/agents-api 0.0.0-dev-20260205192144 → 0.0.0-dev-20260205203133
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 +19 -19
- package/dist/.well-known/workflow/v1/step.cjs +1 -50
- package/dist/createApp.d.ts +2 -2
- package/dist/domains/evals/routes/datasetTriggers.d.ts +2 -2
- package/dist/domains/evals/routes/index.d.ts +2 -2
- package/dist/domains/evals/services/EvaluationService.js +1 -41
- package/dist/domains/evals/workflow/routes.d.ts +2 -2
- package/dist/domains/manage/routes/invitations.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/manage/routes/userOrganizations.d.ts +2 -2
- package/dist/domains/mcp/routes/mcp.d.ts +2 -2
- package/dist/domains/run/agents/Agent.js +5 -5
- package/dist/domains/run/agents/relationTools.d.ts +2 -2
- package/dist/domains/run/services/AgentSession.js +1 -1
- package/dist/domains/run/utils/artifact-component-schema.d.ts +1 -5
- package/dist/domains/run/utils/artifact-component-schema.js +3 -38
- package/dist/domains/run/utils/token-estimator.d.ts +2 -2
- package/dist/factory.d.ts +21 -21
- package/dist/index.d.ts +20 -20
- 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/runAuth.d.ts +4 -4
- 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 +5 -5
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"steps": {
|
|
3
|
-
"src/domains/evals/workflow/functions/evaluateConversation.ts": {
|
|
4
|
-
"executeEvaluatorStep": {
|
|
5
|
-
"stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//executeEvaluatorStep"
|
|
6
|
-
},
|
|
7
|
-
"getConversationStep": {
|
|
8
|
-
"stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//getConversationStep"
|
|
9
|
-
},
|
|
10
|
-
"getEvaluatorsStep": {
|
|
11
|
-
"stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//getEvaluatorsStep"
|
|
12
|
-
},
|
|
13
|
-
"logStep": {
|
|
14
|
-
"stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//logStep"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
3
|
"node_modules/.pnpm/workflow@4.0.1-beta.33_@aws-sdk+client-sts@3.970.0_@opentelemetry+api@1.9.0_@types+reac_162752afbc89dc886082698201e5b45d/node_modules/workflow/dist/internal/builtins.js": {
|
|
18
4
|
"__builtin_response_array_buffer": {
|
|
19
5
|
"stepId": "__builtin_response_array_buffer"
|
|
@@ -38,18 +24,32 @@
|
|
|
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": {
|
|
44
|
-
"src/domains/evals/workflow/functions/runDatasetItem.ts": {
|
|
45
|
-
"_runDatasetItemWorkflow": {
|
|
46
|
-
"workflowId": "workflow//src/domains/evals/workflow/functions/runDatasetItem.ts//_runDatasetItemWorkflow"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
44
|
"src/domains/evals/workflow/functions/evaluateConversation.ts": {
|
|
50
45
|
"_evaluateConversationWorkflow": {
|
|
51
46
|
"workflowId": "workflow//src/domains/evals/workflow/functions/evaluateConversation.ts//_evaluateConversationWorkflow"
|
|
52
47
|
}
|
|
48
|
+
},
|
|
49
|
+
"src/domains/evals/workflow/functions/runDatasetItem.ts": {
|
|
50
|
+
"_runDatasetItemWorkflow": {
|
|
51
|
+
"workflowId": "workflow//src/domains/evals/workflow/functions/runDatasetItem.ts//_runDatasetItemWorkflow"
|
|
52
|
+
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -228857,55 +228857,6 @@ var runDbClient_default = runDbClient;
|
|
|
228857
228857
|
|
|
228858
228858
|
// src/domains/evals/services/EvaluationService.ts
|
|
228859
228859
|
var logger21 = getLogger("EvaluationService");
|
|
228860
|
-
function jsonSchemaToZod3(jsonSchema3) {
|
|
228861
|
-
if (!jsonSchema3 || typeof jsonSchema3 !== "object") {
|
|
228862
|
-
logger21.warn({
|
|
228863
|
-
jsonSchema: jsonSchema3
|
|
228864
|
-
}, "Invalid JSON schema provided, using string fallback");
|
|
228865
|
-
return external_exports.string();
|
|
228866
|
-
}
|
|
228867
|
-
switch (jsonSchema3.type) {
|
|
228868
|
-
case "object":
|
|
228869
|
-
if (jsonSchema3.properties) {
|
|
228870
|
-
const shape = {};
|
|
228871
|
-
const required3 = jsonSchema3.required || [];
|
|
228872
|
-
for (const [key, prop] of Object.entries(jsonSchema3.properties)) {
|
|
228873
|
-
const propSchema = prop;
|
|
228874
|
-
let zodType = jsonSchemaToZod3(propSchema);
|
|
228875
|
-
if (propSchema.description) {
|
|
228876
|
-
zodType = zodType.describe(String(propSchema.description));
|
|
228877
|
-
}
|
|
228878
|
-
if (!required3.includes(key)) {
|
|
228879
|
-
zodType = zodType.optional();
|
|
228880
|
-
}
|
|
228881
|
-
shape[key] = zodType;
|
|
228882
|
-
}
|
|
228883
|
-
return external_exports.object(shape);
|
|
228884
|
-
}
|
|
228885
|
-
return external_exports.record(external_exports.string(), external_exports.unknown());
|
|
228886
|
-
case "array": {
|
|
228887
|
-
const itemSchema = jsonSchema3.items ? jsonSchemaToZod3(jsonSchema3.items) : external_exports.unknown();
|
|
228888
|
-
return external_exports.array(itemSchema);
|
|
228889
|
-
}
|
|
228890
|
-
case "string":
|
|
228891
|
-
return external_exports.string();
|
|
228892
|
-
case "number":
|
|
228893
|
-
return external_exports.number();
|
|
228894
|
-
case "integer":
|
|
228895
|
-
return external_exports.number().int();
|
|
228896
|
-
case "boolean":
|
|
228897
|
-
return external_exports.boolean();
|
|
228898
|
-
case "null":
|
|
228899
|
-
return external_exports.null();
|
|
228900
|
-
default:
|
|
228901
|
-
logger21.warn({
|
|
228902
|
-
unsupportedType: jsonSchema3.type,
|
|
228903
|
-
schema: jsonSchema3
|
|
228904
|
-
}, "Unsupported JSON schema type, using unknown validation");
|
|
228905
|
-
return external_exports.unknown();
|
|
228906
|
-
}
|
|
228907
|
-
}
|
|
228908
|
-
__name(jsonSchemaToZod3, "jsonSchemaToZod");
|
|
228909
228860
|
var EvaluationService = class {
|
|
228910
228861
|
static {
|
|
228911
228862
|
__name(this, "EvaluationService");
|
|
@@ -229652,7 +229603,7 @@ Return your evaluation as a JSON object matching the schema above.`;
|
|
|
229652
229603
|
const providerOptions = modelConfig?.providerOptions || {};
|
|
229653
229604
|
let resultSchema;
|
|
229654
229605
|
try {
|
|
229655
|
-
resultSchema =
|
|
229606
|
+
resultSchema = external_exports.fromJSONSchema(schema);
|
|
229656
229607
|
logger21.info({
|
|
229657
229608
|
schemaType: typeof schema,
|
|
229658
229609
|
schemaKeys: schema && typeof schema === "object" ? Object.keys(schema) : [],
|
package/dist/createApp.d.ts
CHANGED
|
@@ -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
|
|
4
|
+
import * as hono_types1 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<
|
|
8
|
+
declare function createAgentsHono(config: AppConfig): Hono<hono_types1.BlankEnv, hono_types1.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { createAgentsHono, isWebhookRoute };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono14 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/evals/routes/datasetTriggers.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono14.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 hono15 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/evals/routes/index.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono15.Env, {}, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -10,46 +10,6 @@ import { z } from "zod";
|
|
|
10
10
|
//#region src/domains/evals/services/EvaluationService.ts
|
|
11
11
|
const logger = getLogger$1("EvaluationService");
|
|
12
12
|
/**
|
|
13
|
-
* Converts JSON Schema objects to Zod schema types
|
|
14
|
-
*/
|
|
15
|
-
function jsonSchemaToZod$1(jsonSchema) {
|
|
16
|
-
if (!jsonSchema || typeof jsonSchema !== "object") {
|
|
17
|
-
logger.warn({ jsonSchema }, "Invalid JSON schema provided, using string fallback");
|
|
18
|
-
return z.string();
|
|
19
|
-
}
|
|
20
|
-
switch (jsonSchema.type) {
|
|
21
|
-
case "object":
|
|
22
|
-
if (jsonSchema.properties) {
|
|
23
|
-
const shape = {};
|
|
24
|
-
const required = jsonSchema.required || [];
|
|
25
|
-
for (const [key, prop] of Object.entries(jsonSchema.properties)) {
|
|
26
|
-
const propSchema = prop;
|
|
27
|
-
let zodType = jsonSchemaToZod$1(propSchema);
|
|
28
|
-
if (propSchema.description) zodType = zodType.describe(String(propSchema.description));
|
|
29
|
-
if (!required.includes(key)) zodType = zodType.optional();
|
|
30
|
-
shape[key] = zodType;
|
|
31
|
-
}
|
|
32
|
-
return z.object(shape);
|
|
33
|
-
}
|
|
34
|
-
return z.record(z.string(), z.unknown());
|
|
35
|
-
case "array": {
|
|
36
|
-
const itemSchema = jsonSchema.items ? jsonSchemaToZod$1(jsonSchema.items) : z.unknown();
|
|
37
|
-
return z.array(itemSchema);
|
|
38
|
-
}
|
|
39
|
-
case "string": return z.string();
|
|
40
|
-
case "number": return z.number();
|
|
41
|
-
case "integer": return z.number().int();
|
|
42
|
-
case "boolean": return z.boolean();
|
|
43
|
-
case "null": return z.null();
|
|
44
|
-
default:
|
|
45
|
-
logger.warn({
|
|
46
|
-
unsupportedType: jsonSchema.type,
|
|
47
|
-
schema: jsonSchema
|
|
48
|
-
}, "Unsupported JSON schema type, using unknown validation");
|
|
49
|
-
return z.unknown();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
13
|
* Service for running dataset items through the chat API endpoint
|
|
54
14
|
*/
|
|
55
15
|
var EvaluationService = class {
|
|
@@ -698,7 +658,7 @@ Return your evaluation as a JSON object matching the schema above.`;
|
|
|
698
658
|
const providerOptions = modelConfig?.providerOptions || {};
|
|
699
659
|
let resultSchema;
|
|
700
660
|
try {
|
|
701
|
-
resultSchema =
|
|
661
|
+
resultSchema = z.fromJSONSchema(schema);
|
|
702
662
|
logger.info({
|
|
703
663
|
schemaType: typeof schema,
|
|
704
664
|
schemaKeys: schema && typeof schema === "object" ? Object.keys(schema) : [],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types3 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/evals/workflow/routes.d.ts
|
|
5
|
-
declare const workflowRoutes: Hono<
|
|
5
|
+
declare const workflowRoutes: Hono<hono_types3.BlankEnv, hono_types3.BlankSchema, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { workflowRoutes };
|
|
@@ -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_types5 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
|
-
},
|
|
8
|
+
}, hono_types5.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { invitationsRoutes as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types7 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_types7.BlankEnv, hono_types7.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_types6 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_types6.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
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_types11 from "hono/types";
|
|
4
4
|
|
|
5
5
|
//#region src/domains/manage/routes/userOrganizations.d.ts
|
|
6
6
|
declare const userOrganizationsRoutes: Hono<{
|
|
7
7
|
Variables: ManageAppVariables;
|
|
8
|
-
},
|
|
8
|
+
}, hono_types11.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { userOrganizationsRoutes as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types9 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/mcp/routes/mcp.d.ts
|
|
5
|
-
declare const app: Hono<
|
|
5
|
+
declare const app: Hono<hono_types9.BlankEnv, hono_types9.BlankSchema, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -26,7 +26,7 @@ import { SystemPromptBuilder } from "./SystemPromptBuilder.js";
|
|
|
26
26
|
import { Phase1Config, V1_BREAKDOWN_SCHEMA } from "./versions/v1/Phase1Config.js";
|
|
27
27
|
import { Phase2Config } from "./versions/v1/Phase2Config.js";
|
|
28
28
|
import { z } from "@hono/zod-openapi";
|
|
29
|
-
import { CredentialStuffer, JsonTransformer, MCPServerType, MCPTransportType, McpClient, ModelFactory, TemplateEngine, buildComposioMCPUrl, createMessage, generateId, getFunctionToolsForSubAgent, getLedgerArtifacts, isGithubWorkAppTool,
|
|
29
|
+
import { CredentialStuffer, JsonTransformer, MCPServerType, MCPTransportType, McpClient, ModelFactory, TemplateEngine, buildComposioMCPUrl, createMessage, generateId, getFunctionToolsForSubAgent, getLedgerArtifacts, isGithubWorkAppTool, listTaskIdsByContextId, parseEmbeddedJson, withRef } from "@inkeep/agents-core";
|
|
30
30
|
import { Output, generateText, streamText, tool } from "ai";
|
|
31
31
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
32
32
|
|
|
@@ -823,7 +823,7 @@ var Agent = class {
|
|
|
823
823
|
}, "Function not found in functions table");
|
|
824
824
|
continue;
|
|
825
825
|
}
|
|
826
|
-
const zodSchema =
|
|
826
|
+
const zodSchema = functionData.inputSchema ? z.fromJSONSchema(functionData.inputSchema) : z.string();
|
|
827
827
|
const toolPolicies = functionToolDef.toolPolicies;
|
|
828
828
|
const needsApproval = !!toolPolicies?.["*"]?.needsApproval || !!toolPolicies?.[functionToolDef.name]?.needsApproval;
|
|
829
829
|
const aiTool = tool({
|
|
@@ -1350,7 +1350,7 @@ var Agent = class {
|
|
|
1350
1350
|
}, "Processing tool override");
|
|
1351
1351
|
let inputSchema;
|
|
1352
1352
|
try {
|
|
1353
|
-
inputSchema = override.schema ?
|
|
1353
|
+
inputSchema = override.schema ? z.fromJSONSchema(override.schema) : toolDef.inputSchema;
|
|
1354
1354
|
} catch (schemaError) {
|
|
1355
1355
|
logger.error({
|
|
1356
1356
|
mcpToolName: mcpTool.name,
|
|
@@ -2119,8 +2119,8 @@ ${output}${structureHintsFormatted}`;
|
|
|
2119
2119
|
}
|
|
2120
2120
|
buildDataComponentsSchema() {
|
|
2121
2121
|
const componentSchemas = [];
|
|
2122
|
-
|
|
2123
|
-
const propsSchema =
|
|
2122
|
+
this.config.dataComponents?.forEach((dc) => {
|
|
2123
|
+
const propsSchema = dc.props ? z.fromJSONSchema(dc.props) : z.string();
|
|
2124
2124
|
componentSchemas.push(z.object({
|
|
2125
2125
|
id: z.string(),
|
|
2126
2126
|
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
|
|
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:
|
|
47
|
+
result: _inkeep_agents_core1.Message | _inkeep_agents_core1.Task;
|
|
48
48
|
}>;
|
|
49
49
|
/**
|
|
50
50
|
* Parameters for building a transfer relation config
|
|
@@ -526,7 +526,7 @@ var AgentSession = class {
|
|
|
526
526
|
const previousSummaryContext = previousSummaries.length > 0 ? `\nPrevious updates sent to user:\n${previousSummaries.map((s, i) => `${i + 1}. ${s}`).join("\n")}\n` : "";
|
|
527
527
|
const selectionSchema = z.object({ updates: z.array(z.union([z.object({
|
|
528
528
|
type: z.literal("no_relevant_updates"),
|
|
529
|
-
data: z.object({ no_updates: z.boolean()
|
|
529
|
+
data: z.object({ no_updates: z.boolean() }).describe("Use when nothing substantially new to report. Should only use on its own.")
|
|
530
530
|
}), ...statusComponents.map((component) => z.object({
|
|
531
531
|
type: z.literal(component.type),
|
|
532
532
|
data: this.getComponentSchema(component).describe(component.description || component.type)
|
|
@@ -3,10 +3,6 @@ import { ArtifactComponentApiInsert, ArtifactComponentApiSelect, DataComponentIn
|
|
|
3
3
|
|
|
4
4
|
//#region src/domains/run/utils/artifact-component-schema.d.ts
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* Converts artifact component configurations to Zod schema for structured generation
|
|
8
|
-
*/
|
|
9
|
-
declare function createArtifactComponentsSchema(artifactComponents?: ArtifactComponentApiSelect[]): z.ZodObject<{}, z.core.$strip> | z.ZodUnion<any>;
|
|
10
6
|
/**
|
|
11
7
|
* Standard artifact reference component schema for tool responses
|
|
12
8
|
*/
|
|
@@ -39,4 +35,4 @@ declare class ArtifactCreateSchema {
|
|
|
39
35
|
static getDataComponents(tenantId: string, projectId: string | undefined, artifactComponents: Array<ArtifactComponentApiInsert | ArtifactComponentApiSelect>): DataComponentInsert[];
|
|
40
36
|
}
|
|
41
37
|
//#endregion
|
|
42
|
-
export { ArtifactCreateSchema, ArtifactReferenceSchema
|
|
38
|
+
export { ArtifactCreateSchema, ArtifactReferenceSchema };
|
|
@@ -1,42 +1,7 @@
|
|
|
1
|
-
import { getLogger as getLogger$1 } from "../../../logger.js";
|
|
2
1
|
import { SchemaProcessor } from "./SchemaProcessor.js";
|
|
3
2
|
import { z } from "@hono/zod-openapi";
|
|
4
|
-
import { jsonSchemaToZod } from "@inkeep/agents-core";
|
|
5
3
|
|
|
6
4
|
//#region src/domains/run/utils/artifact-component-schema.ts
|
|
7
|
-
getLogger$1("ArtifactComponentSchema");
|
|
8
|
-
/**
|
|
9
|
-
* Converts artifact component configurations to Zod schema for structured generation
|
|
10
|
-
*/
|
|
11
|
-
function createArtifactComponentsSchema(artifactComponents) {
|
|
12
|
-
const componentSchemas = artifactComponents?.map((component) => {
|
|
13
|
-
const propsSchema = jsonSchemaToZod(component.props ? removePreviewFlags(component.props) : {});
|
|
14
|
-
return z.object({
|
|
15
|
-
id: z.string().describe(component.id),
|
|
16
|
-
name: z.literal(component.name).describe(component.name),
|
|
17
|
-
props: propsSchema
|
|
18
|
-
}).describe(`${component.name}: ${component.description}`);
|
|
19
|
-
}) || [];
|
|
20
|
-
if (componentSchemas.length === 0) return z.object({});
|
|
21
|
-
if (componentSchemas.length === 1) return componentSchemas[0];
|
|
22
|
-
return z.union(componentSchemas);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Remove inPreview flags from schema properties (for LLM consumption)
|
|
26
|
-
*/
|
|
27
|
-
function removePreviewFlags(schema) {
|
|
28
|
-
const cleanSchema = { ...schema };
|
|
29
|
-
if (cleanSchema.properties) {
|
|
30
|
-
const cleanProperties = {};
|
|
31
|
-
for (const [key, prop] of Object.entries(cleanSchema.properties)) {
|
|
32
|
-
const cleanProp = { ...prop };
|
|
33
|
-
delete cleanProp.inPreview;
|
|
34
|
-
cleanProperties[key] = cleanProp;
|
|
35
|
-
}
|
|
36
|
-
cleanSchema.properties = cleanProperties;
|
|
37
|
-
}
|
|
38
|
-
return cleanSchema;
|
|
39
|
-
}
|
|
40
5
|
/**
|
|
41
6
|
* Standard artifact reference component schema for tool responses
|
|
42
7
|
*/
|
|
@@ -62,7 +27,7 @@ var ArtifactReferenceSchema = class ArtifactReferenceSchema {
|
|
|
62
27
|
return z.object({
|
|
63
28
|
id: z.string(),
|
|
64
29
|
name: z.literal("Artifact"),
|
|
65
|
-
props:
|
|
30
|
+
props: z.fromJSONSchema(ArtifactReferenceSchema.ARTIFACT_PROPS_SCHEMA)
|
|
66
31
|
});
|
|
67
32
|
}
|
|
68
33
|
/**
|
|
@@ -126,7 +91,7 @@ var ArtifactCreateSchema = class {
|
|
|
126
91
|
return z.object({
|
|
127
92
|
id: z.string(),
|
|
128
93
|
name: z.literal(`ArtifactCreate_${component.name}`),
|
|
129
|
-
props:
|
|
94
|
+
props: z.fromJSONSchema(propsSchema)
|
|
130
95
|
});
|
|
131
96
|
});
|
|
132
97
|
}
|
|
@@ -183,4 +148,4 @@ var ArtifactCreateSchema = class {
|
|
|
183
148
|
};
|
|
184
149
|
|
|
185
150
|
//#endregion
|
|
186
|
-
export { ArtifactCreateSchema, ArtifactReferenceSchema
|
|
151
|
+
export { ArtifactCreateSchema, ArtifactReferenceSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
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:
|
|
20
|
+
breakdown: _inkeep_agents_core3.ContextBreakdown;
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
23
|
export { AssembleResult, type BreakdownComponentDef, type ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown, estimateTokens };
|
package/dist/factory.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ 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
|
|
6
|
+
import * as hono0 from "hono";
|
|
7
7
|
import * as zod0 from "zod";
|
|
8
8
|
import { SSOProviderConfig, UserAuthConfig } from "@inkeep/agents-core/auth";
|
|
9
|
-
import * as
|
|
9
|
+
import * as hono_types0 from "hono/types";
|
|
10
10
|
import * as better_auth0 from "better-auth";
|
|
11
11
|
import * as better_auth_plugins0 from "better-auth/plugins";
|
|
12
12
|
import * as _better_auth_sso0 from "@better-auth/sso";
|
|
@@ -794,25 +794,25 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
|
|
|
794
794
|
ac: better_auth_plugins0.AccessControl;
|
|
795
795
|
roles: {
|
|
796
796
|
member: {
|
|
797
|
-
authorize<K_1 extends "
|
|
798
|
-
actions: better_auth_plugins0.Subset<"
|
|
797
|
+
authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
|
|
798
|
+
actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
|
|
799
799
|
connector: "OR" | "AND";
|
|
800
800
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
801
|
-
statements: better_auth_plugins0.Subset<"
|
|
801
|
+
statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
|
|
802
802
|
};
|
|
803
803
|
admin: {
|
|
804
|
-
authorize<K_1 extends "
|
|
805
|
-
actions: better_auth_plugins0.Subset<"
|
|
804
|
+
authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
|
|
805
|
+
actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
|
|
806
806
|
connector: "OR" | "AND";
|
|
807
807
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
808
|
-
statements: better_auth_plugins0.Subset<"
|
|
808
|
+
statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
|
|
809
809
|
};
|
|
810
810
|
owner: {
|
|
811
|
-
authorize<K_1 extends "
|
|
812
|
-
actions: better_auth_plugins0.Subset<"
|
|
811
|
+
authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
|
|
812
|
+
actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
|
|
813
813
|
connector: "OR" | "AND";
|
|
814
814
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
815
|
-
statements: better_auth_plugins0.Subset<"
|
|
815
|
+
statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
|
|
816
816
|
};
|
|
817
817
|
};
|
|
818
818
|
creatorRole: "admin";
|
|
@@ -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 "
|
|
1108
|
-
actions: better_auth_plugins0.Subset<"
|
|
1107
|
+
authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
|
|
1108
|
+
actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", 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<"
|
|
1111
|
+
statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
|
|
1112
1112
|
};
|
|
1113
1113
|
admin: {
|
|
1114
|
-
authorize<K_1 extends "
|
|
1115
|
-
actions: better_auth_plugins0.Subset<"
|
|
1114
|
+
authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
|
|
1115
|
+
actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", 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<"
|
|
1118
|
+
statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
|
|
1119
1119
|
};
|
|
1120
1120
|
owner: {
|
|
1121
|
-
authorize<K_1 extends "
|
|
1122
|
-
actions: better_auth_plugins0.Subset<"
|
|
1121
|
+
authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
|
|
1122
|
+
actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", 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<"
|
|
1125
|
+
statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
|
|
1126
1126
|
};
|
|
1127
1127
|
};
|
|
1128
1128
|
creatorRole: "admin";
|
|
@@ -1536,6 +1536,6 @@ declare function createAgentsApp(config?: {
|
|
|
1536
1536
|
credentialStores?: CredentialStore[];
|
|
1537
1537
|
auth?: UserAuthConfig;
|
|
1538
1538
|
sandboxConfig?: SandboxConfig;
|
|
1539
|
-
}):
|
|
1539
|
+
}): hono0.Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
|
|
1540
1540
|
//#endregion
|
|
1541
1541
|
export { type SSOProviderConfig, type UserAuthConfig, createAgentsApp, createAgentsAuth, createAgentsHono, createAuth0Provider, createOIDCProvider };
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { createAuth0Provider, createOIDCProvider } from "./ssoHelpers.js";
|
|
|
7
7
|
import { SSOProviderConfig, UserAuthConfig, createAgentsApp } from "./factory.js";
|
|
8
8
|
import { Hono } from "hono";
|
|
9
9
|
import * as zod205 from "zod";
|
|
10
|
-
import * as
|
|
10
|
+
import * as hono_types12 from "hono/types";
|
|
11
11
|
import * as better_auth78 from "better-auth";
|
|
12
12
|
import * as better_auth_plugins69 from "better-auth/plugins";
|
|
13
13
|
import * as _better_auth_sso10 from "@better-auth/sso";
|
|
@@ -795,25 +795,25 @@ declare const auth: better_auth78.Auth<{
|
|
|
795
795
|
ac: better_auth_plugins69.AccessControl;
|
|
796
796
|
roles: {
|
|
797
797
|
member: {
|
|
798
|
-
authorize<K_1 extends "
|
|
799
|
-
actions: better_auth_plugins69.Subset<"
|
|
798
|
+
authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key] | {
|
|
799
|
+
actions: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key];
|
|
800
800
|
connector: "OR" | "AND";
|
|
801
801
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
802
|
-
statements: better_auth_plugins69.Subset<"
|
|
802
|
+
statements: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>;
|
|
803
803
|
};
|
|
804
804
|
admin: {
|
|
805
|
-
authorize<K_1 extends "
|
|
806
|
-
actions: better_auth_plugins69.Subset<"
|
|
805
|
+
authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key] | {
|
|
806
|
+
actions: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key];
|
|
807
807
|
connector: "OR" | "AND";
|
|
808
808
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
809
|
-
statements: better_auth_plugins69.Subset<"
|
|
809
|
+
statements: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>;
|
|
810
810
|
};
|
|
811
811
|
owner: {
|
|
812
|
-
authorize<K_1 extends "
|
|
813
|
-
actions: better_auth_plugins69.Subset<"
|
|
812
|
+
authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key] | {
|
|
813
|
+
actions: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key];
|
|
814
814
|
connector: "OR" | "AND";
|
|
815
815
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
816
|
-
statements: better_auth_plugins69.Subset<"
|
|
816
|
+
statements: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>;
|
|
817
817
|
};
|
|
818
818
|
};
|
|
819
819
|
creatorRole: "admin";
|
|
@@ -1105,25 +1105,25 @@ declare const auth: better_auth78.Auth<{
|
|
|
1105
1105
|
ac: better_auth_plugins69.AccessControl;
|
|
1106
1106
|
roles: {
|
|
1107
1107
|
member: {
|
|
1108
|
-
authorize<K_1 extends "
|
|
1109
|
-
actions: better_auth_plugins69.Subset<"
|
|
1108
|
+
authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key] | {
|
|
1109
|
+
actions: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key];
|
|
1110
1110
|
connector: "OR" | "AND";
|
|
1111
1111
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
1112
|
-
statements: better_auth_plugins69.Subset<"
|
|
1112
|
+
statements: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>;
|
|
1113
1113
|
};
|
|
1114
1114
|
admin: {
|
|
1115
|
-
authorize<K_1 extends "
|
|
1116
|
-
actions: better_auth_plugins69.Subset<"
|
|
1115
|
+
authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key] | {
|
|
1116
|
+
actions: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key];
|
|
1117
1117
|
connector: "OR" | "AND";
|
|
1118
1118
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
1119
|
-
statements: better_auth_plugins69.Subset<"
|
|
1119
|
+
statements: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>;
|
|
1120
1120
|
};
|
|
1121
1121
|
owner: {
|
|
1122
|
-
authorize<K_1 extends "
|
|
1123
|
-
actions: better_auth_plugins69.Subset<"
|
|
1122
|
+
authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key] | {
|
|
1123
|
+
actions: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key];
|
|
1124
1124
|
connector: "OR" | "AND";
|
|
1125
1125
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
1126
|
-
statements: better_auth_plugins69.Subset<"
|
|
1126
|
+
statements: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>;
|
|
1127
1127
|
};
|
|
1128
1128
|
};
|
|
1129
1129
|
creatorRole: "admin";
|
|
@@ -1532,6 +1532,6 @@ declare const auth: better_auth78.Auth<{
|
|
|
1532
1532
|
}>;
|
|
1533
1533
|
}];
|
|
1534
1534
|
}>;
|
|
1535
|
-
declare const app: Hono<
|
|
1535
|
+
declare const app: Hono<hono_types12.BlankEnv, hono_types12.BlankSchema, "/">;
|
|
1536
1536
|
//#endregion
|
|
1537
1537
|
export { type AppConfig, type AppVariables, Hono, type NativeSandboxConfig, type SSOProviderConfig, type SandboxConfig, type UserAuthConfig, type VercelSandboxConfig, auth, createAgentsApp, createAgentsHono, createAuth0Provider, createOIDCProvider, app as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseExecutionContext } from "@inkeep/agents-core";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono4 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/middleware/evalsAuth.d.ts
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ import * as hono14 from "hono";
|
|
|
7
7
|
* Middleware to authenticate API requests using Bearer token authentication
|
|
8
8
|
* First checks if token matches INKEEP_AGENTS_EVAL_API_BYPASS_SECRET,
|
|
9
9
|
*/
|
|
10
|
-
declare const evalApiKeyAuth: () =>
|
|
10
|
+
declare const evalApiKeyAuth: () => hono4.MiddlewareHandler<{
|
|
11
11
|
Variables: {
|
|
12
12
|
executionContext: BaseExecutionContext;
|
|
13
13
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseExecutionContext } from "@inkeep/agents-core";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono0 from "hono";
|
|
3
3
|
import { createAuth } from "@inkeep/agents-core/auth";
|
|
4
4
|
|
|
5
5
|
//#region src/middleware/manageAuth.d.ts
|
|
@@ -12,7 +12,7 @@ import { createAuth } from "@inkeep/agents-core/auth";
|
|
|
12
12
|
* 3. Database API key
|
|
13
13
|
* 4. Internal service token
|
|
14
14
|
*/
|
|
15
|
-
declare const manageApiKeyAuth: () =>
|
|
15
|
+
declare const manageApiKeyAuth: () => hono0.MiddlewareHandler<{
|
|
16
16
|
Variables: {
|
|
17
17
|
executionContext: BaseExecutionContext;
|
|
18
18
|
userId?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ManageAppVariables } from "../types/app.js";
|
|
2
2
|
import { ProjectPermissionLevel } from "@inkeep/agents-core";
|
|
3
|
-
import * as
|
|
3
|
+
import * as hono8 from "hono";
|
|
4
4
|
|
|
5
5
|
//#region src/middleware/projectAccess.d.ts
|
|
6
6
|
/**
|
|
@@ -10,6 +10,6 @@ declare const requireProjectPermission: <Env$1 extends {
|
|
|
10
10
|
Variables: ManageAppVariables;
|
|
11
11
|
} = {
|
|
12
12
|
Variables: ManageAppVariables;
|
|
13
|
-
}>(permission?: ProjectPermissionLevel) =>
|
|
13
|
+
}>(permission?: ProjectPermissionLevel) => hono8.MiddlewareHandler<Env$1, string, {}, Response>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { requireProjectPermission };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BaseExecutionContext, ResolvedRef } from "@inkeep/agents-core";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono9 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/middleware/projectConfig.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Middleware that fetches the full project definition from the Management API
|
|
7
7
|
*/
|
|
8
|
-
declare const projectConfigMiddleware:
|
|
8
|
+
declare const projectConfigMiddleware: hono9.MiddlewareHandler<{
|
|
9
9
|
Variables: {
|
|
10
10
|
executionContext: BaseExecutionContext;
|
|
11
11
|
resolvedRef: ResolvedRef;
|
|
@@ -15,7 +15,7 @@ declare const projectConfigMiddleware: hono0.MiddlewareHandler<{
|
|
|
15
15
|
* Creates a middleware that applies project config fetching except for specified route patterns
|
|
16
16
|
* @param skipRouteCheck - Function that returns true if the route should skip the middleware
|
|
17
17
|
*/
|
|
18
|
-
declare const projectConfigMiddlewareExcept: (skipRouteCheck: (path: string) => boolean) =>
|
|
18
|
+
declare const projectConfigMiddlewareExcept: (skipRouteCheck: (path: string) => boolean) => hono9.MiddlewareHandler<{
|
|
19
19
|
Variables: {
|
|
20
20
|
executionContext: BaseExecutionContext;
|
|
21
21
|
resolvedRef: ResolvedRef;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ManageAppVariables } from "../types/app.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono1 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/middleware/requirePermission.d.ts
|
|
5
5
|
type Permission = {
|
|
@@ -9,6 +9,6 @@ declare const requirePermission: <Env$1 extends {
|
|
|
9
9
|
Variables: ManageAppVariables;
|
|
10
10
|
} = {
|
|
11
11
|
Variables: ManageAppVariables;
|
|
12
|
-
}>(permissions: Permission) =>
|
|
12
|
+
}>(permissions: Permission) => hono1.MiddlewareHandler<Env$1, string, {}, Response>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { requirePermission };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseExecutionContext } from "@inkeep/agents-core";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono5 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/middleware/runAuth.d.ts
|
|
5
|
-
declare const runApiKeyAuth: () =>
|
|
5
|
+
declare const runApiKeyAuth: () => hono5.MiddlewareHandler<{
|
|
6
6
|
Variables: {
|
|
7
7
|
executionContext: BaseExecutionContext;
|
|
8
8
|
};
|
|
@@ -11,7 +11,7 @@ declare const runApiKeyAuth: () => hono3.MiddlewareHandler<{
|
|
|
11
11
|
* Creates a middleware that applies API key authentication except for specified route patterns
|
|
12
12
|
* @param skipRouteCheck - Function that returns true if the route should skip authentication
|
|
13
13
|
*/
|
|
14
|
-
declare const runApiKeyAuthExcept: (skipRouteCheck: (path: string) => boolean) =>
|
|
14
|
+
declare const runApiKeyAuthExcept: (skipRouteCheck: (path: string) => boolean) => hono5.MiddlewareHandler<{
|
|
15
15
|
Variables: {
|
|
16
16
|
executionContext: BaseExecutionContext;
|
|
17
17
|
};
|
|
@@ -20,7 +20,7 @@ declare const runApiKeyAuthExcept: (skipRouteCheck: (path: string) => boolean) =
|
|
|
20
20
|
* Helper middleware for endpoints that optionally support API key authentication
|
|
21
21
|
* If no auth header is present, it continues without setting the executionContext
|
|
22
22
|
*/
|
|
23
|
-
declare const runOptionalAuth: () =>
|
|
23
|
+
declare const runOptionalAuth: () => hono5.MiddlewareHandler<{
|
|
24
24
|
Variables: {
|
|
25
25
|
executionContext?: BaseExecutionContext;
|
|
26
26
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as hono2 from "hono";
|
|
2
2
|
|
|
3
3
|
//#region src/middleware/sessionAuth.d.ts
|
|
4
4
|
|
|
@@ -7,11 +7,11 @@ import * as hono6 from "hono";
|
|
|
7
7
|
* Requires that a user has already been authenticated via Better Auth session.
|
|
8
8
|
* Used primarily for manage routes that require an active user session.
|
|
9
9
|
*/
|
|
10
|
-
declare const sessionAuth: () =>
|
|
10
|
+
declare const sessionAuth: () => hono2.MiddlewareHandler<any, string, {}, Response>;
|
|
11
11
|
/**
|
|
12
12
|
* Global session middleware - sets user and session in context for all routes
|
|
13
13
|
* Used for all routes that require an active user session.
|
|
14
14
|
*/
|
|
15
|
-
declare const sessionContext: () =>
|
|
15
|
+
declare const sessionContext: () => hono2.MiddlewareHandler<any, string, {}, Response>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { sessionAuth, sessionContext };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as hono11 from "hono";
|
|
2
2
|
|
|
3
3
|
//#region src/middleware/tenantAccess.d.ts
|
|
4
4
|
|
|
@@ -11,7 +11,7 @@ import * as hono8 from "hono";
|
|
|
11
11
|
* - API key user: Access only to the tenant associated with the API key
|
|
12
12
|
* - Session user: Access based on organization membership
|
|
13
13
|
*/
|
|
14
|
-
declare const requireTenantAccess: () =>
|
|
14
|
+
declare const requireTenantAccess: () => hono11.MiddlewareHandler<{
|
|
15
15
|
Variables: {
|
|
16
16
|
userId: string;
|
|
17
17
|
tenantId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as hono12 from "hono";
|
|
2
2
|
|
|
3
3
|
//#region src/middleware/tracing.d.ts
|
|
4
|
-
declare const otelBaggageMiddleware: () =>
|
|
5
|
-
declare const executionBaggageMiddleware: () =>
|
|
4
|
+
declare const otelBaggageMiddleware: () => hono12.MiddlewareHandler<any, string, {}, Response>;
|
|
5
|
+
declare const executionBaggageMiddleware: () => hono12.MiddlewareHandler<any, string, {}, Response>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { executionBaggageMiddleware, otelBaggageMiddleware };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-api",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260205203133",
|
|
4
4
|
"description": "Unified Inkeep Agents API - combines management, runtime, and evaluation capabilities",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"openid-client": "^6.8.1",
|
|
67
67
|
"pg": "^8.16.3",
|
|
68
68
|
"workflow": "4.0.1-beta.33",
|
|
69
|
-
"@inkeep/agents-core": "^0.0.0-dev-
|
|
70
|
-
"@inkeep/agents-manage-mcp": "^0.0.0-dev-
|
|
71
|
-
"@inkeep/agents-mcp": "^0.0.0-dev-
|
|
72
|
-
"@inkeep/agents-work-apps": "^0.0.0-dev-
|
|
69
|
+
"@inkeep/agents-core": "^0.0.0-dev-20260205203133",
|
|
70
|
+
"@inkeep/agents-manage-mcp": "^0.0.0-dev-20260205203133",
|
|
71
|
+
"@inkeep/agents-mcp": "^0.0.0-dev-20260205203133",
|
|
72
|
+
"@inkeep/agents-work-apps": "^0.0.0-dev-20260205203133"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"@hono/zod-openapi": "^1.1.5",
|