@inkeep/agents-core 0.0.0-dev-20260207220105 → 0.0.0-dev-20260209055455
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/auth/auth-schema.d.ts +83 -83
- package/dist/auth/auth-validation-schemas.d.ts +131 -131
- package/dist/auth/auth.d.ts +53 -53
- package/dist/auth/auth.js +1 -1
- package/dist/auth/authz/config.d.ts +5 -86
- package/dist/auth/authz/config.js +12 -73
- package/dist/auth/authz/index.d.ts +2 -1
- package/dist/auth/authz/index.js +2 -1
- package/dist/auth/authz/permissions.d.ts +1 -1
- package/dist/auth/authz/permissions.js +1 -1
- package/dist/auth/authz/sync.d.ts +1 -1
- package/dist/auth/authz/sync.js +1 -1
- package/dist/auth/authz/types.d.ts +92 -0
- package/dist/auth/authz/types.js +76 -0
- package/dist/auth/init.js +12 -2
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/auth/spicedb-schema.d.ts +9 -0
- package/dist/auth/spicedb-schema.js +24 -0
- package/dist/client-exports.d.ts +3 -3
- package/dist/client-exports.js +1 -1
- package/dist/data-access/manage/agents.d.ts +10 -10
- package/dist/data-access/manage/artifactComponents.d.ts +6 -6
- package/dist/data-access/manage/contextConfigs.d.ts +8 -8
- package/dist/data-access/manage/dataComponents.d.ts +2 -2
- package/dist/data-access/manage/functionTools.d.ts +8 -8
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +6 -6
- package/dist/data-access/manage/tools.d.ts +18 -18
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +12 -12
- package/dist/data-access/runtime/conversations.d.ts +16 -16
- package/dist/data-access/runtime/messages.d.ts +21 -21
- package/dist/data-access/runtime/tasks.d.ts +5 -5
- package/dist/db/manage/manage-schema.d.ts +382 -382
- package/dist/db/runtime/runtime-schema.d.ts +232 -232
- package/dist/env.d.ts +6 -0
- package/dist/env.js +4 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +478 -478
- package/package.json +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
//#region src/auth/authz/types.ts
|
|
2
|
+
/**
|
|
3
|
+
* Client-safe authz types and constants.
|
|
4
|
+
* These can be safely imported in client-side code without any Node.js dependencies.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* SpiceDB resource types used in the schema
|
|
8
|
+
*/
|
|
9
|
+
const SpiceDbResourceTypes = {
|
|
10
|
+
USER: "user",
|
|
11
|
+
ORGANIZATION: "organization",
|
|
12
|
+
PROJECT: "project"
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* SpiceDB relations used in the schema
|
|
16
|
+
*
|
|
17
|
+
* Relations are named as nouns (roles) per SpiceDB best practices.
|
|
18
|
+
* Project roles are prefixed for clarity when debugging/grepping.
|
|
19
|
+
*/
|
|
20
|
+
const SpiceDbRelations = {
|
|
21
|
+
OWNER: "owner",
|
|
22
|
+
ADMIN: "admin",
|
|
23
|
+
MEMBER: "member",
|
|
24
|
+
ORGANIZATION: "organization",
|
|
25
|
+
PROJECT_ADMIN: "project_admin",
|
|
26
|
+
PROJECT_MEMBER: "project_member",
|
|
27
|
+
PROJECT_VIEWER: "project_viewer"
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* SpiceDB permissions for organization resources.
|
|
31
|
+
*
|
|
32
|
+
* From schema.zed definition organization:
|
|
33
|
+
* - view: owner + admin + member
|
|
34
|
+
* - manage: owner + admin (includes managing org settings and all projects)
|
|
35
|
+
*/
|
|
36
|
+
const SpiceDbOrgPermissions = {
|
|
37
|
+
VIEW: "view",
|
|
38
|
+
MANAGE: "manage"
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* SpiceDB permissions for project resources.
|
|
42
|
+
*
|
|
43
|
+
* From schema.zed definition project:
|
|
44
|
+
* - view: read-only access to project and its resources
|
|
45
|
+
* - use: invoke agents, create API keys, view traces
|
|
46
|
+
* - edit: modify configurations, manage members
|
|
47
|
+
*/
|
|
48
|
+
const SpiceDbProjectPermissions = {
|
|
49
|
+
VIEW: "view",
|
|
50
|
+
USE: "use",
|
|
51
|
+
EDIT: "edit"
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Organization roles from SpiceDB schema.
|
|
55
|
+
*/
|
|
56
|
+
const OrgRoles = {
|
|
57
|
+
OWNER: "owner",
|
|
58
|
+
ADMIN: "admin",
|
|
59
|
+
MEMBER: "member"
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Project roles from SpiceDB schema.
|
|
63
|
+
*
|
|
64
|
+
* Hierarchy:
|
|
65
|
+
* - project_admin: Full access (view + use + edit + manage members)
|
|
66
|
+
* - project_member: Operator access (view + use: invoke agents, create API keys)
|
|
67
|
+
* - project_viewer: Read-only access (view only)
|
|
68
|
+
*/
|
|
69
|
+
const ProjectRoles = {
|
|
70
|
+
ADMIN: "project_admin",
|
|
71
|
+
MEMBER: "project_member",
|
|
72
|
+
VIEWER: "project_viewer"
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
export { OrgRoles, ProjectRoles, SpiceDbOrgPermissions, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes };
|
package/dist/auth/init.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OrgRoles } from "./authz/
|
|
1
|
+
import { OrgRoles } from "./authz/types.js";
|
|
2
2
|
import { loadEnvironmentFiles } from "../env.js";
|
|
3
3
|
import { syncOrgMemberToSpiceDb } from "./authz/sync.js";
|
|
4
4
|
import "./authz/index.js";
|
|
@@ -6,6 +6,7 @@ import { createAgentsRunDatabaseClient } from "../db/runtime/runtime-client.js";
|
|
|
6
6
|
import { addUserToOrganization, upsertOrganization } from "../data-access/runtime/organizations.js";
|
|
7
7
|
import { getUserByEmail } from "../data-access/runtime/users.js";
|
|
8
8
|
import { createAuth } from "./auth.js";
|
|
9
|
+
import { writeSpiceDbSchema } from "./spicedb-schema.js";
|
|
9
10
|
|
|
10
11
|
//#region src/auth/init.ts
|
|
11
12
|
/**
|
|
@@ -31,6 +32,15 @@ loadEnvironmentFiles();
|
|
|
31
32
|
const TENANT_ID = process.env.TENANT_ID || "default";
|
|
32
33
|
async function init() {
|
|
33
34
|
console.log("🚀 Initializing database with default organization and user...\n");
|
|
35
|
+
console.log("📜 Writing SpiceDB schema...");
|
|
36
|
+
try {
|
|
37
|
+
await writeSpiceDbSchema();
|
|
38
|
+
console.log(" ✅ SpiceDB schema applied");
|
|
39
|
+
} catch (error) {
|
|
40
|
+
console.error(" ❌ Failed to write SpiceDB schema:", error);
|
|
41
|
+
console.error(" Make sure SpiceDB is running (docker-compose.dbs.yml)");
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
34
44
|
const dbClient = createAgentsRunDatabaseClient();
|
|
35
45
|
const username = process.env.INKEEP_AGENTS_MANAGE_UI_USERNAME;
|
|
36
46
|
const password = process.env.INKEEP_AGENTS_MANAGE_UI_PASSWORD;
|
|
@@ -102,7 +112,7 @@ async function init() {
|
|
|
102
112
|
console.log("✅ Initialization complete!");
|
|
103
113
|
console.log("================================================");
|
|
104
114
|
console.log(`\nOrganization: ${TENANT_ID}`);
|
|
105
|
-
console.log(`Admin user: ${username}
|
|
115
|
+
console.log(`Admin user: ${username}`);
|
|
106
116
|
console.log("\nYou can now log in with these credentials.\n");
|
|
107
117
|
process.exit(0);
|
|
108
118
|
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as better_auth_plugins69 from "better-auth/plugins";
|
|
2
2
|
import { AccessControl } from "better-auth/plugins/access";
|
|
3
3
|
import { organizationClient } from "better-auth/client/plugins";
|
|
4
4
|
|
|
5
5
|
//#region src/auth/permissions.d.ts
|
|
6
6
|
declare const ac: AccessControl;
|
|
7
7
|
declare const memberRole: {
|
|
8
|
-
authorize<K_1 extends "
|
|
9
|
-
actions:
|
|
8
|
+
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] | {
|
|
9
|
+
actions: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key];
|
|
10
10
|
connector: "OR" | "AND";
|
|
11
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
12
|
-
statements:
|
|
11
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
12
|
+
statements: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>;
|
|
13
13
|
};
|
|
14
14
|
declare const adminRole: {
|
|
15
|
-
authorize<K_1 extends "
|
|
16
|
-
actions:
|
|
15
|
+
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] | {
|
|
16
|
+
actions: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key];
|
|
17
17
|
connector: "OR" | "AND";
|
|
18
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
19
|
-
statements:
|
|
18
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
19
|
+
statements: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>;
|
|
20
20
|
};
|
|
21
21
|
declare const ownerRole: {
|
|
22
|
-
authorize<K_1 extends "
|
|
23
|
-
actions:
|
|
22
|
+
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] | {
|
|
23
|
+
actions: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key];
|
|
24
24
|
connector: "OR" | "AND";
|
|
25
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
26
|
-
statements:
|
|
25
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
26
|
+
statements: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>;
|
|
27
27
|
};
|
|
28
28
|
//#endregion
|
|
29
29
|
export { ac, adminRole, memberRole, organizationClient, ownerRole };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getSpiceDbConfig } from "./authz/config.js";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
import { v1 } from "@authzed/authzed-node";
|
|
5
|
+
|
|
6
|
+
//#region src/auth/spicedb-schema.ts
|
|
7
|
+
async function writeSpiceDbSchema(options) {
|
|
8
|
+
const config = getSpiceDbConfig();
|
|
9
|
+
const { endpoint = config.endpoint, token = config.token, schemaPath = resolve(import.meta.dirname, "../../spicedb/schema.zed"), maxRetries = 30 } = options ?? {};
|
|
10
|
+
const schema = readFileSync(schemaPath, "utf-8");
|
|
11
|
+
const client = v1.NewClient(token, endpoint, config.tlsEnabled ? v1.ClientSecurity.SECURE : v1.ClientSecurity.INSECURE_LOCALHOST_ALLOWED);
|
|
12
|
+
let lastError;
|
|
13
|
+
for (let attempt = 1; attempt <= maxRetries; attempt++) try {
|
|
14
|
+
await client.promises.writeSchema(v1.WriteSchemaRequest.create({ schema }));
|
|
15
|
+
return;
|
|
16
|
+
} catch (error) {
|
|
17
|
+
lastError = error;
|
|
18
|
+
if (attempt < maxRetries) await new Promise((r) => setTimeout(r, 1e3));
|
|
19
|
+
}
|
|
20
|
+
throw new Error(`Failed to write SpiceDB schema after ${maxRetries} attempts: ${lastError?.message}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { writeSpiceDbSchema };
|
package/dist/client-exports.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OrgRole, OrgRoles, ProjectRole, ProjectRoles } from "./auth/authz/
|
|
1
|
+
import { OrgRole, OrgRoles, ProjectRole, ProjectRoles } from "./auth/authz/types.js";
|
|
2
2
|
import { BreakdownComponentDef, CONTEXT_BREAKDOWN_TOTAL_SPAN_ATTRIBUTE, ContextBreakdown, V1_BREAKDOWN_SCHEMA, calculateBreakdownTotal, createEmptyBreakdown, parseContextBreakdownFromSpan } from "./constants/context-breakdown.js";
|
|
3
3
|
import { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AI_OPERATIONS, AI_TOOL_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, SPAN_KEYS, SPAN_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE } from "./constants/otel-attributes.js";
|
|
4
4
|
import { AGGREGATE_OPERATORS, DATA_SOURCES, DATA_TYPES, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS } from "./constants/signoz-queries.js";
|
|
@@ -17,6 +17,8 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
17
17
|
defaultSubAgentId: z.ZodOptional<z.ZodString>;
|
|
18
18
|
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
19
19
|
id: z.ZodString;
|
|
20
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
21
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
20
22
|
name: z.ZodString;
|
|
21
23
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
24
|
conversationHistoryConfig: z.ZodOptional<z.ZodNullable<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>>;
|
|
@@ -43,8 +45,6 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
43
45
|
}, {
|
|
44
46
|
stepCountIs?: number | undefined;
|
|
45
47
|
}>>>>;
|
|
46
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
47
|
-
updatedAt: z.ZodOptional<z.ZodString>;
|
|
48
48
|
type: z.ZodLiteral<"internal">;
|
|
49
49
|
canUse: z.ZodArray<z.ZodObject<{
|
|
50
50
|
agentToolRelationId: z.ZodOptional<z.ZodString>;
|
package/dist/client-exports.js
CHANGED
|
@@ -2,7 +2,7 @@ import { schemaValidationDefaults } from "./constants/schema-validation/defaults
|
|
|
2
2
|
import { CredentialStoreType, MCPTransportType } from "./types/utility.js";
|
|
3
3
|
import { AgentWithinContextOfProjectResponse, AgentWithinContextOfProjectSchema, FullAgentAgentInsertSchema, HeadersSchema, MAX_ID_LENGTH } from "./validation/schemas.js";
|
|
4
4
|
import { DEFAULT_NANGO_STORE_ID } from "./credential-stores/default-constants.js";
|
|
5
|
-
import { OrgRoles, ProjectRoles } from "./auth/authz/
|
|
5
|
+
import { OrgRoles, ProjectRoles } from "./auth/authz/types.js";
|
|
6
6
|
import { CONTEXT_BREAKDOWN_TOTAL_SPAN_ATTRIBUTE, V1_BREAKDOWN_SCHEMA, calculateBreakdownTotal, createEmptyBreakdown, parseContextBreakdownFromSpan } from "./constants/context-breakdown.js";
|
|
7
7
|
import { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AI_OPERATIONS, AI_TOOL_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, SPAN_KEYS, SPAN_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE } from "./constants/otel-attributes.js";
|
|
8
8
|
import { AGGREGATE_OPERATORS, DATA_SOURCES, DATA_TYPES, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS } from "./constants/signoz-queries.js";
|
|
@@ -9,6 +9,8 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
9
9
|
scopes: AgentScopeConfig;
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
12
14
|
name: string;
|
|
13
15
|
description: string | null;
|
|
14
16
|
defaultSubAgentId: string | null;
|
|
@@ -32,8 +34,6 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
32
34
|
stopWhen: {
|
|
33
35
|
transferCountIs?: number | undefined;
|
|
34
36
|
} | null;
|
|
35
|
-
createdAt: string;
|
|
36
|
-
updatedAt: string;
|
|
37
37
|
contextConfigId: string | null;
|
|
38
38
|
statusUpdates: {
|
|
39
39
|
enabled?: boolean | undefined;
|
|
@@ -55,6 +55,8 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
55
55
|
scopes: AgentScopeConfig;
|
|
56
56
|
}) => Promise<{
|
|
57
57
|
id: string;
|
|
58
|
+
createdAt: string;
|
|
59
|
+
updatedAt: string;
|
|
58
60
|
name: string;
|
|
59
61
|
description: string | null;
|
|
60
62
|
defaultSubAgentId: string | null;
|
|
@@ -78,8 +80,6 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
78
80
|
stopWhen: {
|
|
79
81
|
transferCountIs?: number | undefined;
|
|
80
82
|
} | null;
|
|
81
|
-
createdAt: string;
|
|
82
|
-
updatedAt: string;
|
|
83
83
|
contextConfigId: string | null;
|
|
84
84
|
statusUpdates: {
|
|
85
85
|
enabled?: boolean | undefined;
|
|
@@ -98,6 +98,8 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
98
98
|
} | null;
|
|
99
99
|
defaultSubAgent: {
|
|
100
100
|
id: string;
|
|
101
|
+
createdAt: string;
|
|
102
|
+
updatedAt: string;
|
|
101
103
|
name: string;
|
|
102
104
|
description: string | null;
|
|
103
105
|
tenantId: string;
|
|
@@ -122,14 +124,14 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
122
124
|
stopWhen: {
|
|
123
125
|
stepCountIs?: number | undefined;
|
|
124
126
|
} | null;
|
|
125
|
-
createdAt: string;
|
|
126
|
-
updatedAt: string;
|
|
127
127
|
} | null;
|
|
128
128
|
} | null>;
|
|
129
129
|
declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
130
130
|
scopes: ProjectScopeConfig;
|
|
131
131
|
}) => Promise<{
|
|
132
132
|
id: string;
|
|
133
|
+
createdAt: string;
|
|
134
|
+
updatedAt: string;
|
|
133
135
|
name: string;
|
|
134
136
|
description: string | null;
|
|
135
137
|
defaultSubAgentId: string | null;
|
|
@@ -153,8 +155,6 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
153
155
|
stopWhen: {
|
|
154
156
|
transferCountIs?: number | undefined;
|
|
155
157
|
} | null;
|
|
156
|
-
createdAt: string;
|
|
157
|
-
updatedAt: string;
|
|
158
158
|
contextConfigId: string | null;
|
|
159
159
|
statusUpdates: {
|
|
160
160
|
enabled?: boolean | undefined;
|
|
@@ -246,6 +246,8 @@ declare function listAgentsAcrossProjectMainBranches(db: AgentsManageDatabaseCli
|
|
|
246
246
|
}): Promise<AvailableAgentInfo[]>;
|
|
247
247
|
declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
|
|
248
248
|
id: string;
|
|
249
|
+
createdAt: string;
|
|
250
|
+
updatedAt: string;
|
|
249
251
|
name: string;
|
|
250
252
|
description: string | null;
|
|
251
253
|
defaultSubAgentId: string | null;
|
|
@@ -269,8 +271,6 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
269
271
|
stopWhen: {
|
|
270
272
|
transferCountIs?: number | undefined;
|
|
271
273
|
} | null;
|
|
272
|
-
createdAt: string;
|
|
273
|
-
updatedAt: string;
|
|
274
274
|
contextConfigId: string | null;
|
|
275
275
|
statusUpdates: {
|
|
276
276
|
enabled?: boolean | undefined;
|
|
@@ -8,12 +8,12 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
|
|
|
8
8
|
id: string;
|
|
9
9
|
}) => Promise<{
|
|
10
10
|
id: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
updatedAt: string;
|
|
11
13
|
name: string;
|
|
12
14
|
description: string | null;
|
|
13
15
|
tenantId: string;
|
|
14
16
|
projectId: string;
|
|
15
|
-
createdAt: string;
|
|
16
|
-
updatedAt: string;
|
|
17
17
|
props: Record<string, unknown> | null;
|
|
18
18
|
render: {
|
|
19
19
|
component: string;
|
|
@@ -50,12 +50,12 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
|
|
|
50
50
|
}>;
|
|
51
51
|
declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
|
|
52
52
|
id: string;
|
|
53
|
+
createdAt: string;
|
|
54
|
+
updatedAt: string;
|
|
53
55
|
name: string;
|
|
54
56
|
description: string | null;
|
|
55
57
|
tenantId: string;
|
|
56
58
|
projectId: string;
|
|
57
|
-
createdAt: string;
|
|
58
|
-
updatedAt: string;
|
|
59
59
|
props: Record<string, unknown> | null;
|
|
60
60
|
render: {
|
|
61
61
|
component: string;
|
|
@@ -105,10 +105,10 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
|
|
|
105
105
|
artifactComponentId: string;
|
|
106
106
|
}) => Promise<{
|
|
107
107
|
id: string;
|
|
108
|
+
createdAt: string;
|
|
108
109
|
tenantId: string;
|
|
109
110
|
projectId: string;
|
|
110
111
|
agentId: string;
|
|
111
|
-
createdAt: string;
|
|
112
112
|
subAgentId: string;
|
|
113
113
|
artifactComponentId: string;
|
|
114
114
|
}>;
|
|
@@ -148,10 +148,10 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
|
|
|
148
148
|
artifactComponentId: string;
|
|
149
149
|
}) => Promise<{
|
|
150
150
|
id: string;
|
|
151
|
+
createdAt: string;
|
|
151
152
|
tenantId: string;
|
|
152
153
|
projectId: string;
|
|
153
154
|
agentId: string;
|
|
154
|
-
createdAt: string;
|
|
155
155
|
subAgentId: string;
|
|
156
156
|
artifactComponentId: string;
|
|
157
157
|
} | null>;
|
|
@@ -9,11 +9,11 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
9
9
|
id: string;
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
12
14
|
tenantId: string;
|
|
13
15
|
projectId: string;
|
|
14
16
|
agentId: string;
|
|
15
|
-
createdAt: string;
|
|
16
|
-
updatedAt: string;
|
|
17
17
|
headersSchema: unknown;
|
|
18
18
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
19
19
|
} | undefined>;
|
|
@@ -21,11 +21,11 @@ declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
21
21
|
scopes: AgentScopeConfig;
|
|
22
22
|
}) => Promise<{
|
|
23
23
|
id: string;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
updatedAt: string;
|
|
24
26
|
tenantId: string;
|
|
25
27
|
projectId: string;
|
|
26
28
|
agentId: string;
|
|
27
|
-
createdAt: string;
|
|
28
|
-
updatedAt: string;
|
|
29
29
|
headersSchema: unknown;
|
|
30
30
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
31
31
|
}[]>;
|
|
@@ -43,11 +43,11 @@ declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (
|
|
|
43
43
|
}>;
|
|
44
44
|
declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
|
|
45
45
|
id: string;
|
|
46
|
+
createdAt: string;
|
|
47
|
+
updatedAt: string;
|
|
46
48
|
tenantId: string;
|
|
47
49
|
projectId: string;
|
|
48
50
|
agentId: string;
|
|
49
|
-
createdAt: string;
|
|
50
|
-
updatedAt: string;
|
|
51
51
|
headersSchema: unknown;
|
|
52
52
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
53
53
|
}>;
|
|
@@ -83,11 +83,11 @@ declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params:
|
|
|
83
83
|
data: ContextConfigInsert;
|
|
84
84
|
}) => Promise<{
|
|
85
85
|
id: string;
|
|
86
|
+
createdAt: string;
|
|
87
|
+
updatedAt: string;
|
|
86
88
|
tenantId: string;
|
|
87
89
|
projectId: string;
|
|
88
90
|
agentId: string;
|
|
89
|
-
createdAt: string;
|
|
90
|
-
updatedAt: string;
|
|
91
91
|
headersSchema: unknown;
|
|
92
92
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
93
93
|
}>;
|
|
@@ -65,10 +65,10 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
|
|
|
65
65
|
dataComponentId: string;
|
|
66
66
|
}) => Promise<{
|
|
67
67
|
id: string;
|
|
68
|
+
createdAt: string;
|
|
68
69
|
tenantId: string;
|
|
69
70
|
projectId: string;
|
|
70
71
|
agentId: string;
|
|
71
|
-
createdAt: string;
|
|
72
72
|
subAgentId: string;
|
|
73
73
|
dataComponentId: string;
|
|
74
74
|
}>;
|
|
@@ -107,10 +107,10 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
|
|
|
107
107
|
dataComponentId: string;
|
|
108
108
|
}) => Promise<{
|
|
109
109
|
id: string;
|
|
110
|
+
createdAt: string;
|
|
110
111
|
tenantId: string;
|
|
111
112
|
projectId: string;
|
|
112
113
|
agentId: string;
|
|
113
|
-
createdAt: string;
|
|
114
114
|
subAgentId: string;
|
|
115
115
|
dataComponentId: string;
|
|
116
116
|
} | null>;
|
|
@@ -54,13 +54,13 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
54
54
|
scopes: AgentScopeConfig;
|
|
55
55
|
}) => Promise<{
|
|
56
56
|
id: string;
|
|
57
|
+
createdAt: string;
|
|
58
|
+
updatedAt: string;
|
|
57
59
|
name: string;
|
|
58
60
|
description: string | null;
|
|
59
61
|
tenantId: string;
|
|
60
62
|
projectId: string;
|
|
61
63
|
agentId: string;
|
|
62
|
-
createdAt: string;
|
|
63
|
-
updatedAt: string;
|
|
64
64
|
functionId: string;
|
|
65
65
|
}>;
|
|
66
66
|
/**
|
|
@@ -96,13 +96,13 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
96
96
|
scopes: AgentScopeConfig;
|
|
97
97
|
}) => Promise<{
|
|
98
98
|
id: string;
|
|
99
|
+
createdAt: string;
|
|
100
|
+
updatedAt: string;
|
|
99
101
|
name: string;
|
|
100
102
|
description: string | null;
|
|
101
103
|
tenantId: string;
|
|
102
104
|
projectId: string;
|
|
103
105
|
agentId: string;
|
|
104
|
-
createdAt: string;
|
|
105
|
-
updatedAt: string;
|
|
106
106
|
functionId: string;
|
|
107
107
|
}>;
|
|
108
108
|
declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -162,11 +162,11 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
|
|
|
162
162
|
}> | null;
|
|
163
163
|
}) => Promise<{
|
|
164
164
|
id: string;
|
|
165
|
+
createdAt: string;
|
|
166
|
+
updatedAt: string;
|
|
165
167
|
tenantId: string;
|
|
166
168
|
projectId: string;
|
|
167
169
|
agentId: string;
|
|
168
|
-
createdAt: string;
|
|
169
|
-
updatedAt: string;
|
|
170
170
|
toolPolicies: Record<string, {
|
|
171
171
|
needsApproval?: boolean;
|
|
172
172
|
}> | null;
|
|
@@ -227,11 +227,11 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
|
|
|
227
227
|
}> | null;
|
|
228
228
|
}) => Promise<{
|
|
229
229
|
id: string;
|
|
230
|
+
createdAt: string;
|
|
231
|
+
updatedAt: string;
|
|
230
232
|
tenantId: string;
|
|
231
233
|
projectId: string;
|
|
232
234
|
agentId: string;
|
|
233
|
-
createdAt: string;
|
|
234
|
-
updatedAt: string;
|
|
235
235
|
toolPolicies: Record<string, {
|
|
236
236
|
needsApproval?: boolean;
|
|
237
237
|
}> | null;
|
|
@@ -8,13 +8,13 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
|
|
|
8
8
|
scopes: SubAgentScopeConfig;
|
|
9
9
|
relationId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
+
headers: Record<string, string> | null;
|
|
11
12
|
id: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
updatedAt: string;
|
|
12
15
|
tenantId: string;
|
|
13
16
|
projectId: string;
|
|
14
17
|
agentId: string;
|
|
15
|
-
createdAt: string;
|
|
16
|
-
updatedAt: string;
|
|
17
|
-
headers: Record<string, string> | null;
|
|
18
18
|
externalAgentId: string;
|
|
19
19
|
subAgentId: string;
|
|
20
20
|
} | undefined>;
|
|
@@ -43,26 +43,26 @@ declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClien
|
|
|
43
43
|
declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
44
44
|
scopes: SubAgentScopeConfig;
|
|
45
45
|
}) => Promise<{
|
|
46
|
+
headers: Record<string, string> | null;
|
|
46
47
|
id: string;
|
|
48
|
+
createdAt: string;
|
|
49
|
+
updatedAt: string;
|
|
47
50
|
tenantId: string;
|
|
48
51
|
projectId: string;
|
|
49
52
|
agentId: string;
|
|
50
|
-
createdAt: string;
|
|
51
|
-
updatedAt: string;
|
|
52
|
-
headers: Record<string, string> | null;
|
|
53
53
|
externalAgentId: string;
|
|
54
54
|
subAgentId: string;
|
|
55
55
|
}[]>;
|
|
56
56
|
declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
57
57
|
scopes: AgentScopeConfig;
|
|
58
58
|
}) => Promise<{
|
|
59
|
+
headers: Record<string, string> | null;
|
|
59
60
|
id: string;
|
|
61
|
+
createdAt: string;
|
|
62
|
+
updatedAt: string;
|
|
60
63
|
tenantId: string;
|
|
61
64
|
projectId: string;
|
|
62
65
|
agentId: string;
|
|
63
|
-
createdAt: string;
|
|
64
|
-
updatedAt: string;
|
|
65
|
-
headers: Record<string, string> | null;
|
|
66
66
|
externalAgentId: string;
|
|
67
67
|
subAgentId: string;
|
|
68
68
|
}[]>;
|
|
@@ -179,13 +179,13 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
179
179
|
headers?: Record<string, string> | null;
|
|
180
180
|
};
|
|
181
181
|
}) => Promise<{
|
|
182
|
+
headers: Record<string, string> | null;
|
|
182
183
|
id: string;
|
|
184
|
+
createdAt: string;
|
|
185
|
+
updatedAt: string;
|
|
183
186
|
tenantId: string;
|
|
184
187
|
projectId: string;
|
|
185
188
|
agentId: string;
|
|
186
|
-
createdAt: string;
|
|
187
|
-
updatedAt: string;
|
|
188
|
-
headers: Record<string, string> | null;
|
|
189
189
|
externalAgentId: string;
|
|
190
190
|
subAgentId: string;
|
|
191
191
|
}>;
|
|
@@ -196,13 +196,13 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
|
|
|
196
196
|
scopes: SubAgentScopeConfig;
|
|
197
197
|
externalAgentId: string;
|
|
198
198
|
}) => Promise<{
|
|
199
|
+
headers: Record<string, string> | null;
|
|
199
200
|
id: string;
|
|
201
|
+
createdAt: string;
|
|
202
|
+
updatedAt: string;
|
|
200
203
|
tenantId: string;
|
|
201
204
|
projectId: string;
|
|
202
205
|
agentId: string;
|
|
203
|
-
createdAt: string;
|
|
204
|
-
updatedAt: string;
|
|
205
|
-
headers: Record<string, string> | null;
|
|
206
206
|
externalAgentId: string;
|
|
207
207
|
subAgentId: string;
|
|
208
208
|
} | undefined>;
|
|
@@ -217,13 +217,13 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
217
217
|
headers?: Record<string, string> | null;
|
|
218
218
|
};
|
|
219
219
|
}) => Promise<{
|
|
220
|
+
headers: Record<string, string> | null;
|
|
220
221
|
id: string;
|
|
222
|
+
createdAt: string;
|
|
223
|
+
updatedAt: string;
|
|
221
224
|
tenantId: string;
|
|
222
225
|
projectId: string;
|
|
223
226
|
agentId: string;
|
|
224
|
-
createdAt: string;
|
|
225
|
-
updatedAt: string;
|
|
226
|
-
headers: Record<string, string> | null;
|
|
227
227
|
externalAgentId: string;
|
|
228
228
|
subAgentId: string;
|
|
229
229
|
}>;
|