@inkeep/agents-core 0.0.0-dev-20260207223415 → 0.0.0-dev-20260209072547

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/auth/auth-schema.d.ts +83 -83
  2. package/dist/auth/auth.d.ts +53 -53
  3. package/dist/auth/auth.js +1 -1
  4. package/dist/auth/authz/client.js +1 -1
  5. package/dist/auth/authz/config.d.ts +1 -86
  6. package/dist/auth/authz/config.js +6 -72
  7. package/dist/auth/authz/index.d.ts +2 -1
  8. package/dist/auth/authz/index.js +2 -1
  9. package/dist/auth/authz/permissions.d.ts +1 -1
  10. package/dist/auth/authz/permissions.js +1 -1
  11. package/dist/auth/authz/sync.d.ts +1 -1
  12. package/dist/auth/authz/sync.js +1 -1
  13. package/dist/auth/authz/types.d.ts +92 -0
  14. package/dist/auth/authz/types.js +76 -0
  15. package/dist/auth/init.js +1 -1
  16. package/dist/auth/permissions.d.ts +13 -13
  17. package/dist/auth/spicedb-schema.js +2 -2
  18. package/dist/client-exports.d.ts +3 -3
  19. package/dist/client-exports.js +1 -1
  20. package/dist/data-access/manage/agents.d.ts +10 -10
  21. package/dist/data-access/manage/artifactComponents.d.ts +4 -4
  22. package/dist/data-access/manage/dataComponents.d.ts +2 -2
  23. package/dist/data-access/manage/functionTools.d.ts +8 -8
  24. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +6 -6
  25. package/dist/data-access/manage/subAgentRelations.d.ts +2 -2
  26. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +6 -6
  27. package/dist/data-access/manage/subAgents.d.ts +6 -6
  28. package/dist/data-access/manage/tools.d.ts +9 -9
  29. package/dist/data-access/manage/triggers.d.ts +2 -2
  30. package/dist/data-access/runtime/apiKeys.d.ts +4 -4
  31. package/dist/data-access/runtime/conversations.d.ts +11 -11
  32. package/dist/data-access/runtime/tasks.d.ts +2 -2
  33. package/dist/db/manage/manage-schema.d.ts +4 -4
  34. package/dist/db/runtime/runtime-schema.d.ts +6 -6
  35. package/dist/env.d.ts +6 -0
  36. package/dist/env.js +4 -1
  37. package/dist/index.d.ts +2 -1
  38. package/dist/index.js +2 -1
  39. package/dist/validation/dolt-schemas.d.ts +1 -1
  40. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  41. package/dist/validation/schemas.d.ts +1649 -1649
  42. 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/config.js";
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";
@@ -1,29 +1,29 @@
1
- import * as better_auth_plugins0 from "better-auth/plugins";
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 "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
9
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
8
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
9
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
10
10
  connector: "OR" | "AND";
11
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
12
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
11
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
12
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
13
13
  };
14
14
  declare const adminRole: {
15
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
16
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
15
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
16
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
17
17
  connector: "OR" | "AND";
18
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
19
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
18
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
19
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
20
20
  };
21
21
  declare const ownerRole: {
22
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
23
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
22
+ authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
23
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
24
24
  connector: "OR" | "AND";
25
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
26
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
25
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
26
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
27
27
  };
28
28
  //#endregion
29
29
  export { ac, adminRole, memberRole, organizationClient, ownerRole };
@@ -1,4 +1,4 @@
1
- import { getSpiceDbConfig, isLocalhostEndpoint } from "./authz/config.js";
1
+ import { getSpiceDbConfig } from "./authz/config.js";
2
2
  import { readFileSync } from "node:fs";
3
3
  import { resolve } from "node:path";
4
4
  import { v1 } from "@authzed/authzed-node";
@@ -8,7 +8,7 @@ async function writeSpiceDbSchema(options) {
8
8
  const config = getSpiceDbConfig();
9
9
  const { endpoint = config.endpoint, token = config.token, schemaPath = resolve(import.meta.dirname, "../../spicedb/schema.zed"), maxRetries = 30 } = options ?? {};
10
10
  const schema = readFileSync(schemaPath, "utf-8");
11
- const client = v1.NewClient(token, endpoint, isLocalhostEndpoint(endpoint) ? v1.ClientSecurity.INSECURE_LOCALHOST_ALLOWED : v1.ClientSecurity.SECURE);
11
+ const client = v1.NewClient(token, endpoint, config.tlsEnabled ? v1.ClientSecurity.SECURE : v1.ClientSecurity.INSECURE_PLAINTEXT_CREDENTIALS);
12
12
  let lastError;
13
13
  for (let attempt = 1; attempt <= maxRetries; attempt++) try {
14
14
  await client.promises.writeSchema(v1.WriteSchemaRequest.create({ schema }));
@@ -1,4 +1,4 @@
1
- import { OrgRole, OrgRoles, ProjectRole, ProjectRoles } from "./auth/authz/config.js";
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";
@@ -16,11 +16,11 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
16
16
  description: z.ZodOptional<z.ZodString>;
17
17
  defaultSubAgentId: z.ZodOptional<z.ZodString>;
18
18
  subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
19
- name: z.ZodString;
20
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
19
  id: z.ZodString;
20
+ name: z.ZodString;
22
21
  createdAt: z.ZodOptional<z.ZodString>;
23
22
  updatedAt: z.ZodOptional<z.ZodString>;
23
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
24
  models: z.ZodOptional<z.ZodObject<{
25
25
  base: z.ZodOptional<z.ZodObject<{
26
26
  model: z.ZodOptional<z.ZodString>;
@@ -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/config.js";
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";
@@ -8,11 +8,11 @@ import { PgTable } from "drizzle-orm/pg-core";
8
8
  declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
9
9
  scopes: AgentScopeConfig;
10
10
  }) => Promise<{
11
- name: string;
12
- description: string | null;
13
11
  id: string;
12
+ name: string;
14
13
  createdAt: string;
15
14
  updatedAt: string;
15
+ description: string | null;
16
16
  projectId: string;
17
17
  tenantId: string;
18
18
  defaultSubAgentId: string | null;
@@ -54,11 +54,11 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
54
54
  declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
55
55
  scopes: AgentScopeConfig;
56
56
  }) => Promise<{
57
- name: string;
58
- description: string | null;
59
57
  id: string;
58
+ name: string;
60
59
  createdAt: string;
61
60
  updatedAt: string;
61
+ description: string | null;
62
62
  projectId: string;
63
63
  tenantId: string;
64
64
  defaultSubAgentId: string | null;
@@ -97,11 +97,11 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
97
97
  transferCountIs?: number | undefined;
98
98
  } | null;
99
99
  defaultSubAgent: {
100
- name: string;
101
- description: string | null;
102
100
  id: string;
101
+ name: string;
103
102
  createdAt: string;
104
103
  updatedAt: string;
104
+ description: string | null;
105
105
  agentId: string;
106
106
  projectId: string;
107
107
  tenantId: string;
@@ -129,11 +129,11 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
129
129
  declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
130
130
  scopes: ProjectScopeConfig;
131
131
  }) => Promise<{
132
- name: string;
133
- description: string | null;
134
132
  id: string;
133
+ name: string;
135
134
  createdAt: string;
136
135
  updatedAt: string;
136
+ description: string | null;
137
137
  projectId: string;
138
138
  tenantId: string;
139
139
  defaultSubAgentId: string | null;
@@ -245,11 +245,11 @@ declare function listAgentsAcrossProjectMainBranches(db: AgentsManageDatabaseCli
245
245
  projectIds: string[];
246
246
  }): Promise<AvailableAgentInfo[]>;
247
247
  declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
248
- name: string;
249
- description: string | null;
250
248
  id: string;
249
+ name: string;
251
250
  createdAt: string;
252
251
  updatedAt: string;
252
+ description: string | null;
253
253
  projectId: string;
254
254
  tenantId: string;
255
255
  defaultSubAgentId: string | null;
@@ -7,11 +7,11 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
7
7
  scopes: ProjectScopeConfig;
8
8
  id: string;
9
9
  }) => Promise<{
10
- name: string;
11
- description: string | null;
12
10
  id: string;
11
+ name: string;
13
12
  createdAt: string;
14
13
  updatedAt: string;
14
+ description: string | null;
15
15
  projectId: string;
16
16
  tenantId: string;
17
17
  props: Record<string, unknown> | null;
@@ -49,11 +49,11 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
49
49
  };
50
50
  }>;
51
51
  declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
52
- name: string;
53
- description: string | null;
54
52
  id: string;
53
+ name: string;
55
54
  createdAt: string;
56
55
  updatedAt: string;
56
+ description: string | null;
57
57
  projectId: string;
58
58
  tenantId: string;
59
59
  props: Record<string, unknown> | null;
@@ -69,8 +69,8 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
69
69
  agentId: string;
70
70
  projectId: string;
71
71
  tenantId: string;
72
- subAgentId: string;
73
72
  dataComponentId: string;
73
+ subAgentId: string;
74
74
  }>;
75
75
  /**
76
76
  * Remove association between data component and agent
@@ -111,8 +111,8 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
111
111
  agentId: string;
112
112
  projectId: string;
113
113
  tenantId: string;
114
- subAgentId: string;
115
114
  dataComponentId: string;
115
+ subAgentId: string;
116
116
  } | null>;
117
117
  /**
118
118
  * Count data components for a tenant/project
@@ -53,11 +53,11 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
53
53
  data: FunctionToolApiInsert;
54
54
  scopes: AgentScopeConfig;
55
55
  }) => Promise<{
56
- name: string;
57
- description: string | null;
58
56
  id: string;
57
+ name: string;
59
58
  createdAt: string;
60
59
  updatedAt: string;
60
+ description: string | null;
61
61
  agentId: string;
62
62
  projectId: string;
63
63
  tenantId: string;
@@ -95,11 +95,11 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
95
95
  data: FunctionToolApiInsert;
96
96
  scopes: AgentScopeConfig;
97
97
  }) => Promise<{
98
- name: string;
99
- description: string | null;
100
98
  id: string;
99
+ name: string;
101
100
  createdAt: string;
102
101
  updatedAt: string;
102
+ description: string | null;
103
103
  agentId: string;
104
104
  projectId: string;
105
105
  tenantId: string;
@@ -167,11 +167,11 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
167
167
  agentId: string;
168
168
  projectId: string;
169
169
  tenantId: string;
170
- subAgentId: string;
171
- functionToolId: string;
172
170
  toolPolicies: Record<string, {
173
171
  needsApproval?: boolean;
174
172
  }> | null;
173
+ subAgentId: string;
174
+ functionToolId: string;
175
175
  }>;
176
176
  /**
177
177
  * Update an agent-function tool relation
@@ -232,11 +232,11 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
232
232
  agentId: string;
233
233
  projectId: string;
234
234
  tenantId: string;
235
- subAgentId: string;
236
- functionToolId: string;
237
235
  toolPolicies: Record<string, {
238
236
  needsApproval?: boolean;
239
237
  }> | null;
238
+ subAgentId: string;
239
+ functionToolId: string;
240
240
  }>;
241
241
  //#endregion
242
242
  export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
@@ -14,9 +14,9 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
14
14
  agentId: string;
15
15
  projectId: string;
16
16
  tenantId: string;
17
- subAgentId: string;
18
17
  headers: Record<string, string> | null;
19
18
  externalAgentId: string;
19
+ subAgentId: string;
20
20
  } | undefined>;
21
21
  declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
22
22
  scopes: SubAgentScopeConfig;
@@ -49,9 +49,9 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
49
49
  agentId: string;
50
50
  projectId: string;
51
51
  tenantId: string;
52
- subAgentId: string;
53
52
  headers: Record<string, string> | null;
54
53
  externalAgentId: string;
54
+ subAgentId: string;
55
55
  }[]>;
56
56
  declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
57
57
  scopes: AgentScopeConfig;
@@ -62,9 +62,9 @@ declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabas
62
62
  agentId: string;
63
63
  projectId: string;
64
64
  tenantId: string;
65
- subAgentId: string;
66
65
  headers: Record<string, string> | null;
67
66
  externalAgentId: string;
67
+ subAgentId: string;
68
68
  }[]>;
69
69
  declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
70
70
  scopes: AgentScopeConfig;
@@ -185,9 +185,9 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
185
185
  agentId: string;
186
186
  projectId: string;
187
187
  tenantId: string;
188
- subAgentId: string;
189
188
  headers: Record<string, string> | null;
190
189
  externalAgentId: string;
190
+ subAgentId: string;
191
191
  }>;
192
192
  /**
193
193
  * Check if sub-agent external agent relation exists by params
@@ -202,9 +202,9 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
202
202
  agentId: string;
203
203
  projectId: string;
204
204
  tenantId: string;
205
- subAgentId: string;
206
205
  headers: Record<string, string> | null;
207
206
  externalAgentId: string;
207
+ subAgentId: string;
208
208
  } | undefined>;
209
209
  /**
210
210
  * Upsert sub-agent external agent relation (create if it doesn't exist, update if it does)
@@ -223,9 +223,9 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
223
223
  agentId: string;
224
224
  projectId: string;
225
225
  tenantId: string;
226
- subAgentId: string;
227
226
  headers: Record<string, string> | null;
228
227
  externalAgentId: string;
228
+ subAgentId: string;
229
229
  }>;
230
230
  declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
231
231
  scopes: SubAgentScopeConfig;
@@ -209,12 +209,12 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
209
209
  agentId: string;
210
210
  projectId: string;
211
211
  tenantId: string;
212
- subAgentId: string;
213
212
  headers: Record<string, string> | null;
214
213
  toolId: string;
215
214
  toolPolicies: Record<string, {
216
215
  needsApproval?: boolean;
217
216
  }> | null;
217
+ subAgentId: string;
218
218
  selectedTools: string[] | null;
219
219
  }>;
220
220
  declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
@@ -253,12 +253,12 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
253
253
  agentId: string;
254
254
  projectId: string;
255
255
  tenantId: string;
256
- subAgentId: string;
257
256
  headers: Record<string, string> | null;
258
257
  toolId: string;
259
258
  toolPolicies: Record<string, {
260
259
  needsApproval?: boolean;
261
260
  }> | null;
261
+ subAgentId: string;
262
262
  selectedTools: string[] | null;
263
263
  } | undefined>;
264
264
  declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -14,8 +14,8 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
14
14
  agentId: string;
15
15
  projectId: string;
16
16
  tenantId: string;
17
- subAgentId: string;
18
17
  headers: Record<string, string> | null;
18
+ subAgentId: string;
19
19
  targetAgentId: string;
20
20
  } | undefined>;
21
21
  declare const listSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
@@ -49,8 +49,8 @@ declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =>
49
49
  agentId: string;
50
50
  projectId: string;
51
51
  tenantId: string;
52
- subAgentId: string;
53
52
  headers: Record<string, string> | null;
53
+ subAgentId: string;
54
54
  targetAgentId: string;
55
55
  }[]>;
56
56
  declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -62,8 +62,8 @@ declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseCli
62
62
  agentId: string;
63
63
  projectId: string;
64
64
  tenantId: string;
65
- subAgentId: string;
66
65
  headers: Record<string, string> | null;
66
+ subAgentId: string;
67
67
  targetAgentId: string;
68
68
  }[]>;
69
69
  declare const getSubAgentTeamAgentRelationsByTeamAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -215,8 +215,8 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
215
215
  agentId: string;
216
216
  projectId: string;
217
217
  tenantId: string;
218
- subAgentId: string;
219
218
  headers: Record<string, string> | null;
219
+ subAgentId: string;
220
220
  targetAgentId: string;
221
221
  }>;
222
222
  /**
@@ -232,8 +232,8 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
232
232
  agentId: string;
233
233
  projectId: string;
234
234
  tenantId: string;
235
- subAgentId: string;
236
235
  headers: Record<string, string> | null;
236
+ subAgentId: string;
237
237
  targetAgentId: string;
238
238
  } | undefined>;
239
239
  /**
@@ -253,8 +253,8 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
253
253
  agentId: string;
254
254
  projectId: string;
255
255
  tenantId: string;
256
- subAgentId: string;
257
256
  headers: Record<string, string> | null;
257
+ subAgentId: string;
258
258
  targetAgentId: string;
259
259
  }>;
260
260
  declare const updateSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
@@ -8,11 +8,11 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
8
8
  scopes: AgentScopeConfig;
9
9
  subAgentId: string;
10
10
  }) => Promise<{
11
- name: string;
12
- description: string | null;
13
11
  id: string;
12
+ name: string;
14
13
  createdAt: string;
15
14
  updatedAt: string;
15
+ description: string | null;
16
16
  agentId: string;
17
17
  projectId: string;
18
18
  tenantId: string;
@@ -39,11 +39,11 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
39
39
  declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
40
40
  scopes: AgentScopeConfig;
41
41
  }) => Promise<{
42
- name: string;
43
- description: string | null;
44
42
  id: string;
43
+ name: string;
45
44
  createdAt: string;
46
45
  updatedAt: string;
46
+ description: string | null;
47
47
  agentId: string;
48
48
  projectId: string;
49
49
  tenantId: string;
@@ -108,11 +108,11 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
108
108
  };
109
109
  }>;
110
110
  declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
111
- name: string;
112
- description: string | null;
113
111
  id: string;
112
+ name: string;
114
113
  createdAt: string;
115
114
  updatedAt: string;
115
+ description: string | null;
116
116
  agentId: string;
117
117
  projectId: string;
118
118
  tenantId: string;
@@ -18,11 +18,11 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
18
18
  scopes: ProjectScopeConfig;
19
19
  toolId: string;
20
20
  }) => Promise<{
21
- name: string;
22
- description: string | null;
23
21
  id: string;
22
+ name: string;
24
23
  createdAt: string;
25
24
  updatedAt: string;
25
+ description: string | null;
26
26
  projectId: string;
27
27
  tenantId: string;
28
28
  headers: Record<string, string> | null;
@@ -76,11 +76,11 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
76
76
  };
77
77
  }>;
78
78
  declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
79
- name: string;
80
- description: string | null;
81
79
  id: string;
80
+ name: string;
82
81
  createdAt: string;
83
82
  updatedAt: string;
83
+ description: string | null;
84
84
  projectId: string;
85
85
  tenantId: string;
86
86
  headers: Record<string, string> | null;
@@ -139,12 +139,12 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
139
139
  agentId: string;
140
140
  projectId: string;
141
141
  tenantId: string;
142
- subAgentId: string;
143
142
  headers: Record<string, string> | null;
144
143
  toolId: string;
145
144
  toolPolicies: Record<string, {
146
145
  needsApproval?: boolean;
147
146
  }> | null;
147
+ subAgentId: string;
148
148
  selectedTools: string[] | null;
149
149
  }>;
150
150
  declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -158,12 +158,12 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
158
158
  agentId: string;
159
159
  projectId: string;
160
160
  tenantId: string;
161
- subAgentId: string;
162
161
  headers: Record<string, string> | null;
163
162
  toolId: string;
164
163
  toolPolicies: Record<string, {
165
164
  needsApproval?: boolean;
166
165
  }> | null;
166
+ subAgentId: string;
167
167
  selectedTools: string[] | null;
168
168
  }>;
169
169
  /**
@@ -186,12 +186,12 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
186
186
  agentId: string;
187
187
  projectId: string;
188
188
  tenantId: string;
189
- subAgentId: string;
190
189
  headers: Record<string, string> | null;
191
190
  toolId: string;
192
191
  toolPolicies: Record<string, {
193
192
  needsApproval?: boolean;
194
193
  }> | null;
194
+ subAgentId: string;
195
195
  selectedTools: string[] | null;
196
196
  }>;
197
197
  /**
@@ -200,11 +200,11 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
200
200
  declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
201
201
  data: ToolInsert;
202
202
  }) => Promise<{
203
- name: string;
204
- description: string | null;
205
203
  id: string;
204
+ name: string;
206
205
  createdAt: string;
207
206
  updatedAt: string;
207
+ description: string | null;
208
208
  projectId: string;
209
209
  tenantId: string;
210
210
  headers: Record<string, string> | null;
@@ -40,13 +40,13 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
40
40
  algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
41
41
  encoding: "hex" | "base64";
42
42
  signature: {
43
- source: "query" | "header" | "body";
43
+ source: "query" | "body" | "header";
44
44
  key: string;
45
45
  prefix?: string | undefined;
46
46
  regex?: string | undefined;
47
47
  };
48
48
  signedComponents: {
49
- source: "literal" | "header" | "body";
49
+ source: "literal" | "body" | "header";
50
50
  required: boolean;
51
51
  key?: string | undefined;
52
52
  value?: string | undefined;