@inkeep/agents-api 0.46.0 → 0.47.0

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 (59) hide show
  1. package/dist/.well-known/workflow/v1/manifest.debug.json +5 -5
  2. package/dist/.well-known/workflow/v1/step.cjs +41 -43
  3. package/dist/createApp.d.ts +2 -2
  4. package/dist/createApp.js +1 -3
  5. package/dist/domains/evals/routes/datasetTriggers.d.ts +2 -2
  6. package/dist/domains/evals/routes/index.d.ts +2 -2
  7. package/dist/domains/evals/services/EvaluationService.js +1 -2
  8. package/dist/domains/evals/workflow/routes.d.ts +2 -2
  9. package/dist/domains/manage/index.js +4 -2
  10. package/dist/domains/manage/routes/availableAgents.d.ts +2 -2
  11. package/dist/domains/manage/routes/availableAgents.js +2 -2
  12. package/dist/domains/manage/routes/conversations.d.ts +2 -2
  13. package/dist/domains/manage/routes/index.d.ts +2 -2
  14. package/dist/domains/manage/routes/invitations.d.ts +2 -2
  15. package/dist/domains/manage/routes/invitations.js +59 -0
  16. package/dist/domains/manage/routes/mcp.d.ts +2 -2
  17. package/dist/domains/manage/routes/{userOrganizations.d.ts → passwordResetLinks.d.ts} +3 -3
  18. package/dist/domains/manage/routes/passwordResetLinks.js +61 -0
  19. package/dist/domains/manage/routes/signoz.d.ts +2 -2
  20. package/dist/domains/manage/routes/users.d.ts +10 -0
  21. package/dist/domains/manage/routes/users.js +78 -0
  22. package/dist/domains/mcp/routes/mcp.d.ts +2 -2
  23. package/dist/domains/run/a2a/client.d.ts +0 -2
  24. package/dist/domains/run/a2a/client.js +5 -7
  25. package/dist/domains/run/agents/Agent.d.ts +41 -15
  26. package/dist/domains/run/agents/Agent.js +127 -281
  27. package/dist/domains/run/agents/generateTaskHandler.js +10 -5
  28. package/dist/domains/run/agents/relationTools.d.ts +2 -2
  29. package/dist/domains/run/agents/relationTools.js +1 -3
  30. package/dist/domains/run/agents/types.d.ts +2 -1
  31. package/dist/domains/run/agents/versions/v1/{Phase1Config.d.ts → PromptConfig.d.ts} +5 -4
  32. package/dist/domains/run/agents/versions/v1/{Phase1Config.js → PromptConfig.js} +36 -19
  33. package/dist/domains/run/handlers/executionHandler.js +8 -12
  34. package/dist/domains/run/utils/token-estimator.d.ts +2 -2
  35. package/dist/factory.d.ts +59 -25
  36. package/dist/index.d.ts +128 -94
  37. package/dist/middleware/evalsAuth.d.ts +2 -2
  38. package/dist/middleware/manageAuth.d.ts +2 -2
  39. package/dist/middleware/projectAccess.d.ts +2 -2
  40. package/dist/middleware/projectConfig.d.ts +3 -3
  41. package/dist/middleware/requirePermission.d.ts +2 -2
  42. package/dist/middleware/runAuth.d.ts +4 -4
  43. package/dist/middleware/sessionAuth.d.ts +3 -3
  44. package/dist/middleware/tenantAccess.d.ts +2 -2
  45. package/dist/middleware/tracing.d.ts +3 -3
  46. package/dist/templates/v1/prompt/system-prompt.js +5 -0
  47. package/dist/templates/v1/{phase1 → prompt}/tool.js +1 -1
  48. package/dist/templates/v1/shared/artifact-retrieval-guidance.js +1 -1
  49. package/dist/templates/v1/{phase2 → shared}/data-component.js +1 -1
  50. package/dist/templates/v1/{phase2 → shared}/data-components.js +1 -1
  51. package/package.json +6 -6
  52. package/dist/domains/manage/routes/userOrganizations.js +0 -29
  53. package/dist/domains/run/agents/versions/v1/Phase2Config.d.ts +0 -33
  54. package/dist/domains/run/agents/versions/v1/Phase2Config.js +0 -341
  55. package/dist/templates/v1/phase1/system-prompt.js +0 -5
  56. package/dist/templates/v1/phase1/thinking-preparation.js +0 -5
  57. package/dist/templates/v1/phase2/system-prompt.js +0 -5
  58. package/dist/utils/in-process-fetch.d.ts +0 -22
  59. package/dist/utils/in-process-fetch.js +0 -32
@@ -1,6 +1,6 @@
1
1
  import { AgentConfig, DelegateRelation } from "./Agent.js";
2
2
  import { InternalRelation } from "../utils/project.js";
3
- import * as _inkeep_agents_core1 from "@inkeep/agents-core";
3
+ import * as _inkeep_agents_core2 from "@inkeep/agents-core";
4
4
  import { CredentialStoreRegistry, FullExecutionContext } from "@inkeep/agents-core";
5
5
  import * as ai0 from "ai";
6
6
 
@@ -44,7 +44,7 @@ declare function createDelegateToAgentTool({
44
44
  message: string;
45
45
  }, {
46
46
  toolCallId: any;
47
- result: _inkeep_agents_core1.Message | _inkeep_agents_core1.Task;
47
+ result: _inkeep_agents_core2.Message | _inkeep_agents_core2.Task;
48
48
  }>;
49
49
  /**
50
50
  * Parameters for building a transfer relation config
@@ -1,7 +1,6 @@
1
1
  import { getLogger as getLogger$1 } from "../../../logger.js";
2
2
  import manageDbPool_default from "../../../data/db/manageDbPool.js";
3
3
  import runDbClient_default from "../../../data/db/runDbClient.js";
4
- import { getInProcessFetch } from "../../../utils/in-process-fetch.js";
5
4
  import { DELEGATION_TOOL_BACKOFF_EXPONENT, DELEGATION_TOOL_BACKOFF_INITIAL_INTERVAL_MS, DELEGATION_TOOL_BACKOFF_MAX_ELAPSED_TIME_MS, DELEGATION_TOOL_BACKOFF_MAX_INTERVAL_MS } from "../constants/execution-limits/index.js";
6
5
  import { toolSessionManager } from "./ToolSessionManager.js";
7
6
  import { saveA2AMessageResponse } from "../data/conversations.js";
@@ -207,8 +206,7 @@ function createDelegateToAgentTool({ delegateConfig, callingAgentId, executionCo
207
206
  exponent: DELEGATION_TOOL_BACKOFF_EXPONENT,
208
207
  maxElapsedTime: DELEGATION_TOOL_BACKOFF_MAX_ELAPSED_TIME_MS
209
208
  }
210
- },
211
- ...isInternal || isTeam ? { fetchFn: getInProcessFetch() } : {}
209
+ }
212
210
  });
213
211
  const messageToSend = {
214
212
  role: "agent",
@@ -16,10 +16,11 @@ interface SystemPromptV1 {
16
16
  dataComponents: DataComponentApiInsert[];
17
17
  artifactComponents?: ArtifactComponentApiInsert[];
18
18
  hasAgentArtifactComponents?: boolean;
19
- isThinkingPreparation?: boolean;
20
19
  hasTransferRelations?: boolean;
21
20
  hasDelegateRelations?: boolean;
21
+ includeDataComponents?: boolean;
22
22
  clientCurrentTime?: string;
23
+ includeSinglePhaseDataComponents?: boolean;
23
24
  }
24
25
  interface ToolData {
25
26
  name: string;
@@ -2,8 +2,8 @@ import { AssembleResult, BreakdownComponentDef } from "../../../utils/token-esti
2
2
  import { SystemPromptV1, ToolData, VersionConfig } from "../../types.js";
3
3
  import { McpTool, V1_BREAKDOWN_SCHEMA } from "@inkeep/agents-core";
4
4
 
5
- //#region src/domains/run/agents/versions/v1/Phase1Config.d.ts
6
- declare class Phase1Config implements VersionConfig<SystemPromptV1> {
5
+ //#region src/domains/run/agents/versions/v1/PromptConfig.d.ts
6
+ declare class PromptConfig implements VersionConfig<SystemPromptV1> {
7
7
  loadTemplates(): Map<string, string>;
8
8
  getBreakdownSchema(): BreakdownComponentDef[];
9
9
  static convertMcpToolsToToolData(mcpTools: McpTool[] | undefined): ToolData[];
@@ -12,7 +12,6 @@ declare class Phase1Config implements VersionConfig<SystemPromptV1> {
12
12
  assemble(templates: Map<string, string>, config: SystemPromptV1): AssembleResult;
13
13
  private generateAgentContextSection;
14
14
  private generateCurrentTimeSection;
15
- private generateThinkingPreparationSection;
16
15
  private generateTransferInstructions;
17
16
  private generateDelegationInstructions;
18
17
  private getArtifactInstructionsTokens;
@@ -24,6 +23,8 @@ declare class Phase1Config implements VersionConfig<SystemPromptV1> {
24
23
  private generateToolsSection;
25
24
  private generateToolXml;
26
25
  private generateParametersXml;
26
+ private generateDataComponentsSection;
27
+ private generateDataComponentXml;
27
28
  }
28
29
  //#endregion
29
- export { Phase1Config, V1_BREAKDOWN_SCHEMA };
30
+ export { PromptConfig, V1_BREAKDOWN_SCHEMA };
@@ -1,20 +1,22 @@
1
+ import { ArtifactCreateSchema } from "../../../utils/artifact-component-schema.js";
1
2
  import { calculateBreakdownTotal, createEmptyBreakdown, estimateTokens } from "../../../utils/token-estimator.js";
2
- import system_prompt_default from "../../../../../templates/v1/phase1/system-prompt.js";
3
- import thinking_preparation_default from "../../../../../templates/v1/phase1/thinking-preparation.js";
4
- import tool_default from "../../../../../templates/v1/phase1/tool.js";
3
+ import system_prompt_default from "../../../../../templates/v1/prompt/system-prompt.js";
4
+ import tool_default from "../../../../../templates/v1/prompt/tool.js";
5
5
  import artifact_default from "../../../../../templates/v1/shared/artifact.js";
6
6
  import artifact_retrieval_guidance_default from "../../../../../templates/v1/shared/artifact-retrieval-guidance.js";
7
- import { V1_BREAKDOWN_SCHEMA, convertZodToJsonSchema, isZodSchema } from "@inkeep/agents-core";
7
+ import data_component_default from "../../../../../templates/v1/shared/data-component.js";
8
+ import data_components_default from "../../../../../templates/v1/shared/data-components.js";
9
+ import { V1_BREAKDOWN_SCHEMA } from "@inkeep/agents-core";
10
+ import { convertZodToJsonSchema, isZodSchema } from "@inkeep/agents-core/utils/schema-conversion";
8
11
 
9
- //#region src/domains/run/agents/versions/v1/Phase1Config.ts
10
- var Phase1Config = class Phase1Config {
12
+ //#region src/domains/run/agents/versions/v1/PromptConfig.ts
13
+ var PromptConfig = class PromptConfig {
11
14
  loadTemplates() {
12
15
  const templates = /* @__PURE__ */ new Map();
13
16
  templates.set("system-prompt", system_prompt_default);
14
17
  templates.set("tool", tool_default);
15
18
  templates.set("artifact", artifact_default);
16
19
  templates.set("artifact-retrieval-guidance", artifact_retrieval_guidance_default);
17
- templates.set("thinking-preparation", thinking_preparation_default);
18
20
  return templates;
19
21
  }
20
22
  getBreakdownSchema() {
@@ -54,7 +56,7 @@ var Phase1Config = class Phase1Config {
54
56
  const breakdown = createEmptyBreakdown(this.getBreakdownSchema());
55
57
  const systemPromptTemplateContent = templates.get("system-prompt");
56
58
  if (!systemPromptTemplateContent) throw new Error("System prompt template not loaded");
57
- breakdown.components.systemPromptTemplate = estimateTokens(systemPromptTemplateContent.replace("{{CORE_INSTRUCTIONS}}", "").replace("{{CURRENT_TIME_SECTION}}", "").replace("{{AGENT_CONTEXT_SECTION}}", "").replace("{{ARTIFACTS_SECTION}}", "").replace("{{TOOLS_SECTION}}", "").replace("{{THINKING_PREPARATION_INSTRUCTIONS}}", "").replace("{{TRANSFER_INSTRUCTIONS}}", "").replace("{{DELEGATION_INSTRUCTIONS}}", ""));
59
+ breakdown.components.systemPromptTemplate = estimateTokens(systemPromptTemplateContent.replace("{{CORE_INSTRUCTIONS}}", "").replace("{{CURRENT_TIME_SECTION}}", "").replace("{{AGENT_CONTEXT_SECTION}}", "").replace("{{ARTIFACTS_SECTION}}", "").replace("{{TOOLS_SECTION}}", "").replace("{{TRANSFER_INSTRUCTIONS}}", "").replace("{{DELEGATION_INSTRUCTIONS}}", ""));
58
60
  let systemPrompt = systemPromptTemplateContent;
59
61
  if (config.corePrompt?.trim()) {
60
62
  breakdown.components.coreInstructions = estimateTokens(config.corePrompt);
@@ -66,7 +68,7 @@ var Phase1Config = class Phase1Config {
66
68
  const agentContextSection = this.generateAgentContextSection(config.prompt);
67
69
  breakdown.components.agentPrompt = estimateTokens(agentContextSection);
68
70
  systemPrompt = systemPrompt.replace("{{AGENT_CONTEXT_SECTION}}", agentContextSection);
69
- const toolData = (this.isToolDataArray(config.tools) ? config.tools : Phase1Config.convertMcpToolsToToolData(config.tools)).map((tool) => ({
71
+ const toolData = (this.isToolDataArray(config.tools) ? config.tools : PromptConfig.convertMcpToolsToToolData(config.tools)).map((tool) => ({
70
72
  ...tool,
71
73
  inputSchema: this.normalizeSchema(tool.inputSchema)
72
74
  }));
@@ -84,9 +86,9 @@ var Phase1Config = class Phase1Config {
84
86
  const toolsSection = this.generateToolsSection(templates, toolData);
85
87
  breakdown.components.toolsSection = estimateTokens(toolsSection);
86
88
  systemPrompt = systemPrompt.replace("{{TOOLS_SECTION}}", toolsSection);
87
- const thinkingPreparationSection = this.generateThinkingPreparationSection(templates, config.isThinkingPreparation);
88
- breakdown.components.thinkingPreparation = estimateTokens(thinkingPreparationSection);
89
- systemPrompt = systemPrompt.replace("{{THINKING_PREPARATION_INSTRUCTIONS}}", thinkingPreparationSection);
89
+ const dataComponentsSection = this.generateDataComponentsSection(config.dataComponents, config.includeDataComponents, hasArtifactComponents, config.artifactComponents);
90
+ breakdown.components.dataComponentsSection = estimateTokens(dataComponentsSection);
91
+ systemPrompt = systemPrompt.replace("{{DATA_COMPONENTS_SECTION}}", dataComponentsSection);
90
92
  const transferSection = this.generateTransferInstructions(config.hasTransferRelations);
91
93
  breakdown.components.transferInstructions = estimateTokens(transferSection);
92
94
  systemPrompt = systemPrompt.replace("{{TRANSFER_INSTRUCTIONS}}", transferSection);
@@ -115,12 +117,6 @@ var Phase1Config = class Phase1Config {
115
117
  IMPORTANT: You simply know what time it is for the user - don't mention "the current time" or reference this section in your responses.
116
118
  </current_time>`;
117
119
  }
118
- generateThinkingPreparationSection(templates, isThinkingPreparation) {
119
- if (!isThinkingPreparation) return "";
120
- const thinkingPreparationTemplate = templates.get("thinking-preparation");
121
- if (!thinkingPreparationTemplate) throw new Error("Thinking preparation template not loaded");
122
- return thinkingPreparationTemplate;
123
- }
124
120
  generateTransferInstructions(hasTransferRelations) {
125
121
  if (!hasTransferRelations) return "";
126
122
  return `You are part of a single unified assistant composed of specialized agents. To the user, you must always appear as one continuous, confident voice.
@@ -451,7 +447,28 @@ ${creationInstructions}
451
447
  return ` ${key}: {\n "type": "${value?.type || "string"}",\n "description": "${value?.description || "No description"}",\n "required": ${isRequired}\n }`;
452
448
  }).join("\n")}\n </properties>\n <required>${JSON.stringify(required)}</required>`;
453
449
  }
450
+ generateDataComponentsSection(dataComponents, includeDataComponents, hasArtifactComponents, artifactComponents) {
451
+ if (!includeDataComponents || dataComponents.length === 0) return "";
452
+ let allDataComponents = [...dataComponents];
453
+ if (hasArtifactComponents && artifactComponents) {
454
+ const artifactCreateComponents = ArtifactCreateSchema.getDataComponents("tenant", "", artifactComponents);
455
+ allDataComponents = [...dataComponents, ...artifactCreateComponents];
456
+ }
457
+ const dataComponentsDescription = allDataComponents.map((dc) => `${dc.name}: ${dc.description}`).join(", ");
458
+ const dataComponentsXml = allDataComponents.map((dataComponent) => this.generateDataComponentXml(dataComponent)).join("\n ");
459
+ let dataComponentsSection = data_components_default;
460
+ dataComponentsSection = dataComponentsSection.replace("{{DATA_COMPONENTS_LIST}}", dataComponentsDescription);
461
+ dataComponentsSection = dataComponentsSection.replace("{{DATA_COMPONENTS_XML}}", dataComponentsXml);
462
+ return dataComponentsSection;
463
+ }
464
+ generateDataComponentXml(dataComponent) {
465
+ let dataComponentXml = data_component_default;
466
+ dataComponentXml = dataComponentXml.replace("{{COMPONENT_NAME}}", dataComponent.name);
467
+ dataComponentXml = dataComponentXml.replace("{{COMPONENT_DESCRIPTION}}", dataComponent.description || "");
468
+ dataComponentXml = dataComponentXml.replace("{{COMPONENT_PROPS_SCHEMA}}", this.generateParametersXml(dataComponent.props));
469
+ return dataComponentXml;
470
+ }
454
471
  };
455
472
 
456
473
  //#endregion
457
- export { Phase1Config, V1_BREAKDOWN_SCHEMA };
474
+ export { PromptConfig, V1_BREAKDOWN_SCHEMA };
@@ -1,6 +1,5 @@
1
1
  import { getLogger as getLogger$1 } from "../../../logger.js";
2
2
  import runDbClient_default from "../../../data/db/runDbClient.js";
3
- import { getInProcessFetch } from "../../../utils/in-process-fetch.js";
4
3
  import { AGENT_EXECUTION_MAX_CONSECUTIVE_ERRORS } from "../constants/execution-limits/index.js";
5
4
  import { tracer } from "../utils/tracer.js";
6
5
  import { registerStreamHelper, unregisterStreamHelper } from "../utils/stream-registry.js";
@@ -165,17 +164,14 @@ var ExecutionHandler = class {
165
164
  currentAgentId = activeAgent.activeSubAgentId;
166
165
  logger.info({ currentAgentId }, `Updated current agent to: ${currentAgentId}`);
167
166
  }
168
- const a2aClient = new A2AClient(`${baseUrl}/run/agents`, {
169
- headers: {
170
- Authorization: `Bearer ${apiKey}`,
171
- "x-inkeep-tenant-id": tenantId,
172
- "x-inkeep-project-id": projectId,
173
- "x-inkeep-agent-id": agentId,
174
- "x-inkeep-sub-agent-id": currentAgentId,
175
- ...forwardedHeaders || {}
176
- },
177
- fetchFn: getInProcessFetch()
178
- });
167
+ const a2aClient = new A2AClient(`${baseUrl}/run/agents`, { headers: {
168
+ Authorization: `Bearer ${apiKey}`,
169
+ "x-inkeep-tenant-id": tenantId,
170
+ "x-inkeep-project-id": projectId,
171
+ "x-inkeep-agent-id": agentId,
172
+ "x-inkeep-sub-agent-id": currentAgentId,
173
+ ...forwardedHeaders || {}
174
+ } });
179
175
  let messageResponse = null;
180
176
  const messageMetadata = {
181
177
  stream_request_id: requestId,
@@ -1,4 +1,4 @@
1
- import * as _inkeep_agents_core3 from "@inkeep/agents-core";
1
+ import * as _inkeep_agents_core1 from "@inkeep/agents-core";
2
2
  import { BreakdownComponentDef, ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown } from "@inkeep/agents-core";
3
3
 
4
4
  //#region src/domains/run/utils/token-estimator.d.ts
@@ -17,7 +17,7 @@ interface AssembleResult {
17
17
  /** The assembled prompt string */
18
18
  prompt: string;
19
19
  /** Token breakdown for each component */
20
- breakdown: _inkeep_agents_core3.ContextBreakdown;
20
+ breakdown: _inkeep_agents_core1.ContextBreakdown;
21
21
  }
22
22
  //#endregion
23
23
  export { AssembleResult, type BreakdownComponentDef, type ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown, estimateTokens };
package/dist/factory.d.ts CHANGED
@@ -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 hono4 from "hono";
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 hono_types3 from "hono/types";
9
+ import * as hono_types1 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";
@@ -22,6 +22,16 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
22
22
  maxPasswordLength: number;
23
23
  requireEmailVerification: false;
24
24
  autoSignIn: true;
25
+ resetPasswordTokenExpiresIn: number;
26
+ sendResetPassword: ({
27
+ user,
28
+ url,
29
+ token
30
+ }: {
31
+ user: better_auth0.User;
32
+ url: string;
33
+ token: string;
34
+ }) => Promise<void>;
25
35
  };
26
36
  account: {
27
37
  accountLinking: {
@@ -794,25 +804,25 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
794
804
  ac: better_auth_plugins0.AccessControl;
795
805
  roles: {
796
806
  member: {
797
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
798
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
807
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
808
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
799
809
  connector: "OR" | "AND";
800
810
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
801
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
811
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
802
812
  };
803
813
  admin: {
804
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
805
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
814
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
815
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
806
816
  connector: "OR" | "AND";
807
817
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
808
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
818
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
809
819
  };
810
820
  owner: {
811
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
812
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
821
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
822
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
813
823
  connector: "OR" | "AND";
814
824
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
815
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
825
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
816
826
  };
817
827
  };
818
828
  creatorRole: "admin";
@@ -829,6 +839,17 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
829
839
  user: better_auth0.User;
830
840
  };
831
841
  }): Promise<void>;
842
+ schema: {
843
+ invitation: {
844
+ additionalFields: {
845
+ authMethod: {
846
+ type: "string";
847
+ input: true;
848
+ required: false;
849
+ };
850
+ };
851
+ };
852
+ };
832
853
  organizationHooks: {
833
854
  afterAcceptInvitation: ({
834
855
  member,
@@ -987,16 +1008,17 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
987
1008
  id: string;
988
1009
  organizationId: string;
989
1010
  email: string;
990
- role: "member" | "admin" | "owner";
1011
+ role: "member" | "owner" | "admin";
991
1012
  status: better_auth_plugins0.InvitationStatus;
992
1013
  inviterId: string;
993
1014
  expiresAt: Date;
994
1015
  createdAt: Date;
1016
+ authMethod?: string | undefined;
995
1017
  };
996
1018
  Member: {
997
1019
  id: string;
998
1020
  organizationId: string;
999
- role: "member" | "admin" | "owner";
1021
+ role: "member" | "owner" | "admin";
1000
1022
  createdAt: Date;
1001
1023
  userId: string;
1002
1024
  user: {
@@ -1012,7 +1034,7 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
1012
1034
  members: {
1013
1035
  id: string;
1014
1036
  organizationId: string;
1015
- role: "member" | "admin" | "owner";
1037
+ role: "member" | "owner" | "admin";
1016
1038
  createdAt: Date;
1017
1039
  userId: string;
1018
1040
  user: {
@@ -1026,11 +1048,12 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
1026
1048
  id: string;
1027
1049
  organizationId: string;
1028
1050
  email: string;
1029
- role: "member" | "admin" | "owner";
1051
+ role: "member" | "owner" | "admin";
1030
1052
  status: better_auth_plugins0.InvitationStatus;
1031
1053
  inviterId: string;
1032
1054
  expiresAt: Date;
1033
1055
  createdAt: Date;
1056
+ authMethod?: string | undefined;
1034
1057
  }[];
1035
1058
  } & {
1036
1059
  id: string;
@@ -1104,25 +1127,25 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
1104
1127
  ac: better_auth_plugins0.AccessControl;
1105
1128
  roles: {
1106
1129
  member: {
1107
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1108
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
1130
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
1131
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
1109
1132
  connector: "OR" | "AND";
1110
1133
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1111
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
1134
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
1112
1135
  };
1113
1136
  admin: {
1114
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1115
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
1137
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
1138
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
1116
1139
  connector: "OR" | "AND";
1117
1140
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1118
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
1141
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
1119
1142
  };
1120
1143
  owner: {
1121
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1122
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
1144
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
1145
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
1123
1146
  connector: "OR" | "AND";
1124
1147
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1125
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
1148
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
1126
1149
  };
1127
1150
  };
1128
1151
  creatorRole: "admin";
@@ -1139,6 +1162,17 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
1139
1162
  user: better_auth0.User;
1140
1163
  };
1141
1164
  }): Promise<void>;
1165
+ schema: {
1166
+ invitation: {
1167
+ additionalFields: {
1168
+ authMethod: {
1169
+ type: "string";
1170
+ input: true;
1171
+ required: false;
1172
+ };
1173
+ };
1174
+ };
1175
+ };
1142
1176
  organizationHooks: {
1143
1177
  afterAcceptInvitation: ({
1144
1178
  member,
@@ -1536,6 +1570,6 @@ declare function createAgentsApp(config?: {
1536
1570
  credentialStores?: CredentialStore[];
1537
1571
  auth?: UserAuthConfig;
1538
1572
  sandboxConfig?: SandboxConfig;
1539
- }): hono4.Hono<hono_types3.BlankEnv, hono_types3.BlankSchema, "/">;
1573
+ }): hono0.Hono<hono_types1.BlankEnv, hono_types1.BlankSchema, "/">;
1540
1574
  //#endregion
1541
1575
  export { type SSOProviderConfig, type UserAuthConfig, createAgentsApp, createAgentsAuth, createAgentsHono, createAuth0Provider, createOIDCProvider };