@inkeep/agents-cli 0.26.2 → 0.27.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.
- package/dist/index.js +521 -399
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -21,11 +21,11 @@ var __export = (target, all) => {
|
|
|
21
21
|
for (var name in all)
|
|
22
22
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
23
23
|
};
|
|
24
|
-
var __copyProps = (to, from, except,
|
|
24
|
+
var __copyProps = (to, from, except, desc17) => {
|
|
25
25
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
26
|
for (let key of __getOwnPropNames(from))
|
|
27
27
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(
|
|
28
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc17 = __getOwnPropDesc(from, key)) || desc17.enumerable });
|
|
29
29
|
}
|
|
30
30
|
return to;
|
|
31
31
|
};
|
|
@@ -375,22 +375,22 @@ var init_logger = __esm({
|
|
|
375
375
|
*/
|
|
376
376
|
getLogger(name) {
|
|
377
377
|
if (this.loggers.has(name)) {
|
|
378
|
-
const
|
|
379
|
-
if (!
|
|
378
|
+
const logger17 = this.loggers.get(name);
|
|
379
|
+
if (!logger17) {
|
|
380
380
|
throw new Error(`Logger '${name}' not found in cache`);
|
|
381
381
|
}
|
|
382
|
-
return
|
|
382
|
+
return logger17;
|
|
383
383
|
}
|
|
384
|
-
let
|
|
384
|
+
let logger16;
|
|
385
385
|
if (this.config.loggerFactory) {
|
|
386
|
-
|
|
386
|
+
logger16 = this.config.loggerFactory(name);
|
|
387
387
|
} else if (this.config.defaultLogger) {
|
|
388
|
-
|
|
388
|
+
logger16 = this.config.defaultLogger;
|
|
389
389
|
} else {
|
|
390
|
-
|
|
390
|
+
logger16 = new PinoLogger(name, this.config.pinoConfig);
|
|
391
391
|
}
|
|
392
|
-
this.loggers.set(name,
|
|
393
|
-
return
|
|
392
|
+
this.loggers.set(name, logger16);
|
|
393
|
+
return logger16;
|
|
394
394
|
}
|
|
395
395
|
/**
|
|
396
396
|
* Reset factory to default state
|
|
@@ -1607,7 +1607,7 @@ import {
|
|
|
1607
1607
|
text,
|
|
1608
1608
|
unique
|
|
1609
1609
|
} from "drizzle-orm/sqlite-core";
|
|
1610
|
-
var tenantScoped, projectScoped, agentScoped, subAgentScoped, uiProperties, timestamps, projects, agents, contextConfigs, contextCache, subAgents, subAgentRelations, externalAgents, tasks, taskRelations, dataComponents, subAgentDataComponents, artifactComponents, subAgentArtifactComponents, tools, functionTools, functions, subAgentToolRelations, subAgentExternalAgentRelations, subAgentFunctionToolRelations, conversations, messages, ledgerArtifacts, apiKeys, credentialReferences, tasksRelations, projectsRelations, taskRelationsRelations, contextConfigsRelations, contextCacheRelations, subAgentsRelations, agentRelations, externalAgentsRelations, apiKeysRelations, agentToolRelationsRelations, credentialReferencesRelations, toolsRelations, conversationsRelations, messagesRelations, artifactComponentsRelations, subAgentArtifactComponentsRelations, dataComponentsRelations, subAgentDataComponentsRelations, ledgerArtifactsRelations, functionsRelations, subAgentRelationsRelations, functionToolsRelations, subAgentFunctionToolRelationsRelations, subAgentExternalAgentRelationsRelations;
|
|
1610
|
+
var tenantScoped, projectScoped, agentScoped, subAgentScoped, uiProperties, timestamps, projects, agents, contextConfigs, contextCache, subAgents, subAgentRelations, externalAgents, tasks, taskRelations, dataComponents, subAgentDataComponents, artifactComponents, subAgentArtifactComponents, tools, functionTools, functions, subAgentToolRelations, subAgentExternalAgentRelations, subAgentTeamAgentRelations, subAgentFunctionToolRelations, conversations, messages, ledgerArtifacts, apiKeys, credentialReferences, tasksRelations, projectsRelations, taskRelationsRelations, contextConfigsRelations, contextCacheRelations, subAgentsRelations, agentRelations, externalAgentsRelations, apiKeysRelations, agentToolRelationsRelations, credentialReferencesRelations, toolsRelations, conversationsRelations, messagesRelations, artifactComponentsRelations, subAgentArtifactComponentsRelations, dataComponentsRelations, subAgentDataComponentsRelations, ledgerArtifactsRelations, functionsRelations, subAgentRelationsRelations, functionToolsRelations, subAgentFunctionToolRelationsRelations, subAgentExternalAgentRelationsRelations, subAgentTeamAgentRelationsRelations;
|
|
1611
1611
|
var init_schema = __esm({
|
|
1612
1612
|
"../packages/agents-core/src/db/schema.ts"() {
|
|
1613
1613
|
"use strict";
|
|
@@ -2010,6 +2010,28 @@ var init_schema = __esm({
|
|
|
2010
2010
|
}).onDelete("cascade")
|
|
2011
2011
|
]
|
|
2012
2012
|
);
|
|
2013
|
+
subAgentTeamAgentRelations = sqliteTable(
|
|
2014
|
+
"sub_agent_team_agent_relations",
|
|
2015
|
+
{
|
|
2016
|
+
...subAgentScoped,
|
|
2017
|
+
targetAgentId: text("target_agent_id").notNull(),
|
|
2018
|
+
headers: blob("headers", { mode: "json" }).$type(),
|
|
2019
|
+
...timestamps
|
|
2020
|
+
},
|
|
2021
|
+
(table) => [
|
|
2022
|
+
primaryKey({ columns: [table.tenantId, table.projectId, table.agentId, table.id] }),
|
|
2023
|
+
foreignKey({
|
|
2024
|
+
columns: [table.tenantId, table.projectId, table.agentId, table.subAgentId],
|
|
2025
|
+
foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.agentId, subAgents.id],
|
|
2026
|
+
name: "sub_agent_team_agent_relations_sub_agent_fk"
|
|
2027
|
+
}).onDelete("cascade"),
|
|
2028
|
+
foreignKey({
|
|
2029
|
+
columns: [table.tenantId, table.projectId, table.targetAgentId],
|
|
2030
|
+
foreignColumns: [agents.tenantId, agents.projectId, agents.id],
|
|
2031
|
+
name: "sub_agent_team_agent_relations_target_agent_fk"
|
|
2032
|
+
}).onDelete("cascade")
|
|
2033
|
+
]
|
|
2034
|
+
);
|
|
2013
2035
|
subAgentFunctionToolRelations = sqliteTable(
|
|
2014
2036
|
"sub_agent_function_tool_relations",
|
|
2015
2037
|
{
|
|
@@ -2066,6 +2088,8 @@ var init_schema = __esm({
|
|
|
2066
2088
|
toSubAgentId: text("to_sub_agent_id"),
|
|
2067
2089
|
fromExternalAgentId: text("from_external_sub_agent_id"),
|
|
2068
2090
|
toExternalAgentId: text("to_external_sub_agent_id"),
|
|
2091
|
+
fromTeamAgentId: text("from_team_agent_id"),
|
|
2092
|
+
toTeamAgentId: text("to_team_agent_id"),
|
|
2069
2093
|
content: blob("content", { mode: "json" }).$type().notNull(),
|
|
2070
2094
|
visibility: text("visibility").notNull().default("user-facing"),
|
|
2071
2095
|
messageType: text("message_type").notNull().default("chat"),
|
|
@@ -2342,6 +2366,16 @@ var init_schema = __esm({
|
|
|
2342
2366
|
references: [subAgents.id],
|
|
2343
2367
|
relationName: "receivedMessages"
|
|
2344
2368
|
}),
|
|
2369
|
+
fromTeamAgent: one(agents, {
|
|
2370
|
+
fields: [messages.fromTeamAgentId],
|
|
2371
|
+
references: [agents.id],
|
|
2372
|
+
relationName: "receivedTeamMessages"
|
|
2373
|
+
}),
|
|
2374
|
+
toTeamAgent: one(agents, {
|
|
2375
|
+
fields: [messages.toTeamAgentId],
|
|
2376
|
+
references: [agents.id],
|
|
2377
|
+
relationName: "sentTeamMessages"
|
|
2378
|
+
}),
|
|
2345
2379
|
fromExternalAgent: one(externalAgents, {
|
|
2346
2380
|
fields: [messages.tenantId, messages.projectId, messages.fromExternalAgentId],
|
|
2347
2381
|
references: [externalAgents.tenantId, externalAgents.projectId, externalAgents.id],
|
|
@@ -2485,6 +2519,28 @@ var init_schema = __esm({
|
|
|
2485
2519
|
})
|
|
2486
2520
|
})
|
|
2487
2521
|
);
|
|
2522
|
+
subAgentTeamAgentRelationsRelations = relations(
|
|
2523
|
+
subAgentTeamAgentRelations,
|
|
2524
|
+
({ one }) => ({
|
|
2525
|
+
subAgent: one(subAgents, {
|
|
2526
|
+
fields: [
|
|
2527
|
+
subAgentTeamAgentRelations.tenantId,
|
|
2528
|
+
subAgentTeamAgentRelations.projectId,
|
|
2529
|
+
subAgentTeamAgentRelations.agentId,
|
|
2530
|
+
subAgentTeamAgentRelations.subAgentId
|
|
2531
|
+
],
|
|
2532
|
+
references: [subAgents.tenantId, subAgents.projectId, subAgents.agentId, subAgents.id]
|
|
2533
|
+
}),
|
|
2534
|
+
targetAgent: one(agents, {
|
|
2535
|
+
fields: [
|
|
2536
|
+
subAgentTeamAgentRelations.tenantId,
|
|
2537
|
+
subAgentTeamAgentRelations.projectId,
|
|
2538
|
+
subAgentTeamAgentRelations.targetAgentId
|
|
2539
|
+
],
|
|
2540
|
+
references: [agents.tenantId, agents.projectId, agents.id]
|
|
2541
|
+
})
|
|
2542
|
+
})
|
|
2543
|
+
);
|
|
2488
2544
|
}
|
|
2489
2545
|
});
|
|
2490
2546
|
|
|
@@ -2513,7 +2569,7 @@ var init_utility = __esm({
|
|
|
2513
2569
|
});
|
|
2514
2570
|
|
|
2515
2571
|
// ../packages/agents-core/src/validation/schemas.ts
|
|
2516
|
-
var StopWhenSchema, AgentStopWhenSchema, SubAgentStopWhenSchema, MIN_ID_LENGTH, MAX_ID_LENGTH, URL_SAFE_ID_PATTERN, resourceIdSchema, ModelSettingsSchema, ModelSchema, ProjectModelSchema, FunctionToolConfigSchema, createApiSchema, createApiInsertSchema, createApiUpdateSchema, createAgentScopedApiSchema, createAgentScopedApiInsertSchema, createAgentScopedApiUpdateSchema, SubAgentSelectSchema, SubAgentInsertSchema, SubAgentUpdateSchema, SubAgentApiSelectSchema, SubAgentApiInsertSchema, SubAgentApiUpdateSchema, SubAgentRelationSelectSchema, SubAgentRelationInsertSchema, SubAgentRelationUpdateSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiInsertSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationQuerySchema, ExternalSubAgentRelationInsertSchema, ExternalSubAgentRelationApiInsertSchema, AgentSelectSchema, AgentInsertSchema, AgentUpdateSchema, AgentApiSelectSchema, AgentApiInsertSchema, AgentApiUpdateSchema, TaskSelectSchema, TaskInsertSchema, TaskUpdateSchema, TaskApiSelectSchema, TaskApiInsertSchema, TaskApiUpdateSchema, TaskRelationSelectSchema, TaskRelationInsertSchema, TaskRelationUpdateSchema, TaskRelationApiSelectSchema, TaskRelationApiInsertSchema, TaskRelationApiUpdateSchema, imageUrlSchema, McpTransportConfigSchema, ToolStatusSchema, McpToolDefinitionSchema, ToolSelectSchema, ToolInsertSchema, ConversationSelectSchema, ConversationInsertSchema, ConversationUpdateSchema, ConversationApiSelectSchema, ConversationApiInsertSchema, ConversationApiUpdateSchema, MessageSelectSchema, MessageInsertSchema, MessageUpdateSchema, MessageApiSelectSchema, MessageApiInsertSchema, MessageApiUpdateSchema, ContextCacheSelectSchema, ContextCacheInsertSchema, ContextCacheUpdateSchema, ContextCacheApiSelectSchema, ContextCacheApiInsertSchema, ContextCacheApiUpdateSchema, DataComponentSelectSchema, DataComponentInsertSchema, DataComponentBaseSchema, DataComponentUpdateSchema, DataComponentApiSelectSchema, DataComponentApiInsertSchema, DataComponentApiUpdateSchema, SubAgentDataComponentSelectSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentUpdateSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiUpdateSchema, ArtifactComponentSelectSchema, ArtifactComponentInsertSchema, ArtifactComponentUpdateSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiUpdateSchema, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentUpdateSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiUpdateSchema, ExternalAgentSelectSchema, ExternalAgentInsertSchema, ExternalAgentUpdateSchema, ExternalAgentApiSelectSchema, ExternalAgentApiInsertSchema, ExternalAgentApiUpdateSchema, AllAgentSchema, ApiKeySelectSchema, ApiKeyInsertSchema, ApiKeyUpdateSchema, ApiKeyApiSelectSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiUpdateSchema, CredentialReferenceSelectSchema, CredentialReferenceInsertSchema, CredentialReferenceUpdateSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiUpdateSchema, McpToolSchema, MCPToolConfigSchema, ToolUpdateSchema, ToolApiSelectSchema, ToolApiInsertSchema, ToolApiUpdateSchema, FunctionToolSelectSchema, FunctionToolInsertSchema, FunctionToolUpdateSchema, FunctionToolApiSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiUpdateSchema, FunctionSelectSchema, FunctionInsertSchema, FunctionUpdateSchema, FunctionApiSelectSchema, FunctionApiInsertSchema, FunctionApiUpdateSchema, FetchConfigSchema, FetchDefinitionSchema, ContextConfigSelectSchema, ContextConfigInsertSchema, ContextConfigUpdateSchema, ContextConfigApiSelectSchema, ContextConfigApiInsertSchema, ContextConfigApiUpdateSchema, SubAgentToolRelationSelectSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationUpdateSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiUpdateSchema, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiUpdateSchema, LedgerArtifactSelectSchema, LedgerArtifactInsertSchema, LedgerArtifactUpdateSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiUpdateSchema, StatusComponentSchema, StatusUpdateSchema, CanUseItemSchema, canDelegateToExternalAgentSchema, FullAgentAgentInsertSchema, AgentWithinContextOfProjectSchema, PaginationSchema, ErrorResponseSchema, ExistsResponseSchema, RemovedResponseSchema, ProjectSelectSchema, ProjectInsertSchema, ProjectUpdateSchema, ProjectApiSelectSchema, ProjectApiInsertSchema, ProjectApiUpdateSchema, FullProjectDefinitionSchema, ProjectResponse, SubAgentResponse, AgentResponse, ToolResponse, ExternalAgentResponse, ContextConfigResponse, ApiKeyResponse, CredentialReferenceResponse, FunctionResponse, FunctionToolResponse, DataComponentResponse, ArtifactComponentResponse, SubAgentRelationResponse, SubAgentToolRelationResponse, ConversationResponse, MessageResponse, ProjectListResponse, SubAgentListResponse, AgentListResponse, ToolListResponse, ExternalAgentListResponse, ContextConfigListResponse, ApiKeyListResponse, CredentialReferenceListResponse, FunctionListResponse, FunctionToolListResponse, DataComponentListResponse, ArtifactComponentListResponse, SubAgentRelationListResponse, SubAgentToolRelationListResponse, ConversationListResponse, MessageListResponse, SubAgentDataComponentResponse, SubAgentArtifactComponentResponse, SubAgentDataComponentListResponse, SubAgentArtifactComponentListResponse, HeadersScopeSchema, TenantId, ProjectId, AgentId, SubAgentId, TenantParamsSchema, TenantIdParamsSchema, TenantProjectParamsSchema, TenantProjectIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, PaginationQueryParamsSchema;
|
|
2572
|
+
var StopWhenSchema, AgentStopWhenSchema, SubAgentStopWhenSchema, MIN_ID_LENGTH, MAX_ID_LENGTH, URL_SAFE_ID_PATTERN, resourceIdSchema, ModelSettingsSchema, ModelSchema, ProjectModelSchema, FunctionToolConfigSchema, createApiSchema, createApiInsertSchema, createApiUpdateSchema, createAgentScopedApiSchema, createAgentScopedApiInsertSchema, createAgentScopedApiUpdateSchema, SubAgentSelectSchema, SubAgentInsertSchema, SubAgentUpdateSchema, SubAgentApiSelectSchema, SubAgentApiInsertSchema, SubAgentApiUpdateSchema, SubAgentRelationSelectSchema, SubAgentRelationInsertSchema, SubAgentRelationUpdateSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiInsertSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationQuerySchema, ExternalSubAgentRelationInsertSchema, ExternalSubAgentRelationApiInsertSchema, AgentSelectSchema, AgentInsertSchema, AgentUpdateSchema, AgentApiSelectSchema, AgentApiInsertSchema, AgentApiUpdateSchema, TaskSelectSchema, TaskInsertSchema, TaskUpdateSchema, TaskApiSelectSchema, TaskApiInsertSchema, TaskApiUpdateSchema, TaskRelationSelectSchema, TaskRelationInsertSchema, TaskRelationUpdateSchema, TaskRelationApiSelectSchema, TaskRelationApiInsertSchema, TaskRelationApiUpdateSchema, imageUrlSchema, McpTransportConfigSchema, ToolStatusSchema, McpToolDefinitionSchema, ToolSelectSchema, ToolInsertSchema, ConversationSelectSchema, ConversationInsertSchema, ConversationUpdateSchema, ConversationApiSelectSchema, ConversationApiInsertSchema, ConversationApiUpdateSchema, MessageSelectSchema, MessageInsertSchema, MessageUpdateSchema, MessageApiSelectSchema, MessageApiInsertSchema, MessageApiUpdateSchema, ContextCacheSelectSchema, ContextCacheInsertSchema, ContextCacheUpdateSchema, ContextCacheApiSelectSchema, ContextCacheApiInsertSchema, ContextCacheApiUpdateSchema, DataComponentSelectSchema, DataComponentInsertSchema, DataComponentBaseSchema, DataComponentUpdateSchema, DataComponentApiSelectSchema, DataComponentApiInsertSchema, DataComponentApiUpdateSchema, SubAgentDataComponentSelectSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentUpdateSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiUpdateSchema, ArtifactComponentSelectSchema, ArtifactComponentInsertSchema, ArtifactComponentUpdateSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiUpdateSchema, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentUpdateSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiUpdateSchema, ExternalAgentSelectSchema, ExternalAgentInsertSchema, ExternalAgentUpdateSchema, ExternalAgentApiSelectSchema, ExternalAgentApiInsertSchema, ExternalAgentApiUpdateSchema, AllAgentSchema, ApiKeySelectSchema, ApiKeyInsertSchema, ApiKeyUpdateSchema, ApiKeyApiSelectSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiUpdateSchema, CredentialReferenceSelectSchema, CredentialReferenceInsertSchema, CredentialReferenceUpdateSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiUpdateSchema, McpToolSchema, MCPToolConfigSchema, ToolUpdateSchema, ToolApiSelectSchema, ToolApiInsertSchema, ToolApiUpdateSchema, FunctionToolSelectSchema, FunctionToolInsertSchema, FunctionToolUpdateSchema, FunctionToolApiSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiUpdateSchema, FunctionSelectSchema, FunctionInsertSchema, FunctionUpdateSchema, FunctionApiSelectSchema, FunctionApiInsertSchema, FunctionApiUpdateSchema, FetchConfigSchema, FetchDefinitionSchema, ContextConfigSelectSchema, ContextConfigInsertSchema, ContextConfigUpdateSchema, ContextConfigApiSelectSchema, ContextConfigApiInsertSchema, ContextConfigApiUpdateSchema, SubAgentToolRelationSelectSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationUpdateSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiUpdateSchema, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiUpdateSchema, LedgerArtifactSelectSchema, LedgerArtifactInsertSchema, LedgerArtifactUpdateSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiUpdateSchema, StatusComponentSchema, StatusUpdateSchema, CanUseItemSchema, canDelegateToExternalAgentSchema, canDelegateToTeamAgentSchema, TeamAgentSchema, FullAgentAgentInsertSchema, AgentWithinContextOfProjectSchema, PaginationSchema, ErrorResponseSchema, ExistsResponseSchema, RemovedResponseSchema, ProjectSelectSchema, ProjectInsertSchema, ProjectUpdateSchema, ProjectApiSelectSchema, ProjectApiInsertSchema, ProjectApiUpdateSchema, FullProjectDefinitionSchema, ProjectResponse, SubAgentResponse, AgentResponse, ToolResponse, ExternalAgentResponse, ContextConfigResponse, ApiKeyResponse, CredentialReferenceResponse, FunctionResponse, FunctionToolResponse, DataComponentResponse, ArtifactComponentResponse, SubAgentRelationResponse, SubAgentToolRelationResponse, ConversationResponse, MessageResponse, ProjectListResponse, SubAgentListResponse, AgentListResponse, ToolListResponse, ExternalAgentListResponse, ContextConfigListResponse, ApiKeyListResponse, CredentialReferenceListResponse, FunctionListResponse, FunctionToolListResponse, DataComponentListResponse, ArtifactComponentListResponse, SubAgentRelationListResponse, SubAgentToolRelationListResponse, ConversationListResponse, MessageListResponse, SubAgentDataComponentResponse, SubAgentArtifactComponentResponse, SubAgentDataComponentListResponse, SubAgentArtifactComponentListResponse, HeadersScopeSchema, TenantId, ProjectId, AgentId, SubAgentId, TenantParamsSchema, TenantIdParamsSchema, TenantProjectParamsSchema, TenantProjectIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, PaginationQueryParamsSchema;
|
|
2517
2573
|
var init_schemas = __esm({
|
|
2518
2574
|
"../packages/agents-core/src/validation/schemas.ts"() {
|
|
2519
2575
|
"use strict";
|
|
@@ -2583,7 +2639,8 @@ var init_schemas = __esm({
|
|
|
2583
2639
|
agentId: resourceIdSchema,
|
|
2584
2640
|
sourceSubAgentId: resourceIdSchema,
|
|
2585
2641
|
targetSubAgentId: resourceIdSchema.optional(),
|
|
2586
|
-
externalSubAgentId: resourceIdSchema.optional()
|
|
2642
|
+
externalSubAgentId: resourceIdSchema.optional(),
|
|
2643
|
+
teamSubAgentId: resourceIdSchema.optional()
|
|
2587
2644
|
});
|
|
2588
2645
|
SubAgentRelationUpdateSchema = SubAgentRelationInsertSchema.partial();
|
|
2589
2646
|
SubAgentRelationApiSelectSchema = createAgentScopedApiSchema(
|
|
@@ -2597,11 +2654,13 @@ var init_schemas = __esm({
|
|
|
2597
2654
|
(data) => {
|
|
2598
2655
|
const hasTarget = data.targetSubAgentId != null;
|
|
2599
2656
|
const hasExternal = data.externalSubAgentId != null;
|
|
2600
|
-
|
|
2657
|
+
const hasTeam = data.teamSubAgentId != null;
|
|
2658
|
+
const count18 = [hasTarget, hasExternal, hasTeam].filter(Boolean).length;
|
|
2659
|
+
return count18 === 1;
|
|
2601
2660
|
},
|
|
2602
2661
|
{
|
|
2603
|
-
message: "Must specify exactly one of targetSubAgentId or
|
|
2604
|
-
path: ["targetSubAgentId", "externalSubAgentId"]
|
|
2662
|
+
message: "Must specify exactly one of targetSubAgentId, externalSubAgentId, or teamSubAgentId",
|
|
2663
|
+
path: ["targetSubAgentId", "externalSubAgentId", "teamSubAgentId"]
|
|
2605
2664
|
}
|
|
2606
2665
|
).openapi("SubAgentRelationCreate");
|
|
2607
2666
|
SubAgentRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(
|
|
@@ -2612,20 +2671,23 @@ var init_schemas = __esm({
|
|
|
2612
2671
|
(data) => {
|
|
2613
2672
|
const hasTarget = data.targetSubAgentId != null;
|
|
2614
2673
|
const hasExternal = data.externalSubAgentId != null;
|
|
2615
|
-
|
|
2674
|
+
const hasTeam = data.teamSubAgentId != null;
|
|
2675
|
+
const count18 = [hasTarget, hasExternal, hasTeam].filter(Boolean).length;
|
|
2676
|
+
if (count18 === 0) {
|
|
2616
2677
|
return true;
|
|
2617
2678
|
}
|
|
2618
|
-
return
|
|
2679
|
+
return count18 === 1;
|
|
2619
2680
|
},
|
|
2620
2681
|
{
|
|
2621
|
-
message: "Must specify exactly one of targetSubAgentId or
|
|
2622
|
-
path: ["targetSubAgentId", "externalSubAgentId"]
|
|
2682
|
+
message: "Must specify exactly one of targetSubAgentId, externalSubAgentId, or teamSubAgentId when updating sub-agent relationships",
|
|
2683
|
+
path: ["targetSubAgentId", "externalSubAgentId", "teamSubAgentId"]
|
|
2623
2684
|
}
|
|
2624
2685
|
).openapi("SubAgentRelationUpdate");
|
|
2625
2686
|
SubAgentRelationQuerySchema = z2.object({
|
|
2626
2687
|
sourceSubAgentId: z2.string().optional(),
|
|
2627
2688
|
targetSubAgentId: z2.string().optional(),
|
|
2628
|
-
externalSubAgentId: z2.string().optional()
|
|
2689
|
+
externalSubAgentId: z2.string().optional(),
|
|
2690
|
+
teamSubAgentId: z2.string().optional()
|
|
2629
2691
|
});
|
|
2630
2692
|
ExternalSubAgentRelationInsertSchema = createInsertSchema(subAgentRelations).extend({
|
|
2631
2693
|
id: resourceIdSchema,
|
|
@@ -3039,6 +3101,25 @@ var init_schemas = __esm({
|
|
|
3039
3101
|
SubAgentExternalAgentRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(
|
|
3040
3102
|
SubAgentExternalAgentRelationUpdateSchema
|
|
3041
3103
|
).openapi("SubAgentExternalAgentRelationUpdate");
|
|
3104
|
+
SubAgentTeamAgentRelationSelectSchema = createSelectSchema(subAgentTeamAgentRelations);
|
|
3105
|
+
SubAgentTeamAgentRelationInsertSchema = createInsertSchema(
|
|
3106
|
+
subAgentTeamAgentRelations
|
|
3107
|
+
).extend({
|
|
3108
|
+
id: resourceIdSchema,
|
|
3109
|
+
subAgentId: resourceIdSchema,
|
|
3110
|
+
targetAgentId: resourceIdSchema,
|
|
3111
|
+
headers: z2.record(z2.string(), z2.string()).nullish()
|
|
3112
|
+
});
|
|
3113
|
+
SubAgentTeamAgentRelationUpdateSchema = SubAgentTeamAgentRelationInsertSchema.partial();
|
|
3114
|
+
SubAgentTeamAgentRelationApiSelectSchema = createAgentScopedApiSchema(
|
|
3115
|
+
SubAgentTeamAgentRelationSelectSchema
|
|
3116
|
+
).openapi("SubAgentTeamAgentRelation");
|
|
3117
|
+
SubAgentTeamAgentRelationApiInsertSchema = createAgentScopedApiInsertSchema(
|
|
3118
|
+
SubAgentTeamAgentRelationInsertSchema
|
|
3119
|
+
).omit({ id: true, subAgentId: true }).openapi("SubAgentTeamAgentRelationCreate");
|
|
3120
|
+
SubAgentTeamAgentRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(
|
|
3121
|
+
SubAgentTeamAgentRelationUpdateSchema
|
|
3122
|
+
).openapi("SubAgentTeamAgentRelationUpdate");
|
|
3042
3123
|
LedgerArtifactSelectSchema = createSelectSchema(ledgerArtifacts);
|
|
3043
3124
|
LedgerArtifactInsertSchema = createInsertSchema(ledgerArtifacts);
|
|
3044
3125
|
LedgerArtifactUpdateSchema = LedgerArtifactInsertSchema.partial();
|
|
@@ -3072,6 +3153,16 @@ var init_schemas = __esm({
|
|
|
3072
3153
|
subAgentExternalAgentRelationId: z2.string().optional(),
|
|
3073
3154
|
headers: z2.record(z2.string(), z2.string()).nullish()
|
|
3074
3155
|
});
|
|
3156
|
+
canDelegateToTeamAgentSchema = z2.object({
|
|
3157
|
+
agentId: z2.string(),
|
|
3158
|
+
subAgentTeamAgentRelationId: z2.string().optional(),
|
|
3159
|
+
headers: z2.record(z2.string(), z2.string()).nullish()
|
|
3160
|
+
});
|
|
3161
|
+
TeamAgentSchema = z2.object({
|
|
3162
|
+
id: z2.string(),
|
|
3163
|
+
name: z2.string(),
|
|
3164
|
+
description: z2.string()
|
|
3165
|
+
});
|
|
3075
3166
|
FullAgentAgentInsertSchema = SubAgentApiInsertSchema.extend({
|
|
3076
3167
|
type: z2.literal("internal"),
|
|
3077
3168
|
canUse: z2.array(CanUseItemSchema),
|
|
@@ -3083,8 +3174,10 @@ var init_schemas = __esm({
|
|
|
3083
3174
|
z2.union([
|
|
3084
3175
|
z2.string(),
|
|
3085
3176
|
// Internal subAgent ID
|
|
3086
|
-
canDelegateToExternalAgentSchema
|
|
3177
|
+
canDelegateToExternalAgentSchema,
|
|
3087
3178
|
// External agent with headers
|
|
3179
|
+
canDelegateToTeamAgentSchema
|
|
3180
|
+
// Team agent with headers
|
|
3088
3181
|
])
|
|
3089
3182
|
).optional()
|
|
3090
3183
|
});
|
|
@@ -3095,6 +3188,8 @@ var init_schemas = __esm({
|
|
|
3095
3188
|
// MCP tools (project-scoped)
|
|
3096
3189
|
externalAgents: z2.record(z2.string(), ExternalAgentApiInsertSchema).optional(),
|
|
3097
3190
|
// External agents (project-scoped)
|
|
3191
|
+
teamAgents: z2.record(z2.string(), TeamAgentSchema).optional(),
|
|
3192
|
+
// Team agents contain basic metadata for the agent to be delegated to
|
|
3098
3193
|
functionTools: z2.record(z2.string(), FunctionToolApiInsertSchema).optional(),
|
|
3099
3194
|
// Function tools (agent-scoped)
|
|
3100
3195
|
functions: z2.record(z2.string(), FunctionApiInsertSchema).optional(),
|
|
@@ -4912,6 +5007,15 @@ var init_client = __esm({
|
|
|
4912
5007
|
}
|
|
4913
5008
|
});
|
|
4914
5009
|
|
|
5010
|
+
// ../packages/agents-core/src/validation/agentFull.ts
|
|
5011
|
+
var init_agentFull = __esm({
|
|
5012
|
+
"../packages/agents-core/src/validation/agentFull.ts"() {
|
|
5013
|
+
"use strict";
|
|
5014
|
+
init_esm_shims();
|
|
5015
|
+
init_schemas();
|
|
5016
|
+
}
|
|
5017
|
+
});
|
|
5018
|
+
|
|
4915
5019
|
// ../packages/agents-core/src/data-access/contextConfigs.ts
|
|
4916
5020
|
import { and, count, desc, eq, sql as sql2 } from "drizzle-orm";
|
|
4917
5021
|
var init_contextConfigs = __esm({
|
|
@@ -7241,11 +7345,11 @@ var require_typescript = __commonJS({
|
|
|
7241
7345
|
for (var name in all)
|
|
7242
7346
|
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
7243
7347
|
};
|
|
7244
|
-
var __copyProps2 = (to, from, except,
|
|
7348
|
+
var __copyProps2 = (to, from, except, desc17) => {
|
|
7245
7349
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
7246
7350
|
for (let key of __getOwnPropNames2(from))
|
|
7247
7351
|
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
7248
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(
|
|
7352
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc17 = __getOwnPropDesc2(from, key)) || desc17.enumerable });
|
|
7249
7353
|
}
|
|
7250
7354
|
return to;
|
|
7251
7355
|
};
|
|
@@ -7429,7 +7533,7 @@ var require_typescript = __commonJS({
|
|
|
7429
7533
|
affectsEmitOptionDeclarations: () => affectsEmitOptionDeclarations,
|
|
7430
7534
|
allKeysStartWithDot: () => allKeysStartWithDot,
|
|
7431
7535
|
altDirectorySeparator: () => altDirectorySeparator,
|
|
7432
|
-
and: () =>
|
|
7536
|
+
and: () => and22,
|
|
7433
7537
|
append: () => append,
|
|
7434
7538
|
appendIfUnique: () => appendIfUnique,
|
|
7435
7539
|
arrayFrom: () => arrayFrom,
|
|
@@ -9651,16 +9755,16 @@ var require_typescript = __commonJS({
|
|
|
9651
9755
|
return -1;
|
|
9652
9756
|
}
|
|
9653
9757
|
function countWhere(array, predicate) {
|
|
9654
|
-
let
|
|
9758
|
+
let count18 = 0;
|
|
9655
9759
|
if (array !== void 0) {
|
|
9656
9760
|
for (let i2 = 0; i2 < array.length; i2++) {
|
|
9657
9761
|
const v2 = array[i2];
|
|
9658
9762
|
if (predicate(v2, i2)) {
|
|
9659
|
-
|
|
9763
|
+
count18++;
|
|
9660
9764
|
}
|
|
9661
9765
|
}
|
|
9662
9766
|
}
|
|
9663
|
-
return
|
|
9767
|
+
return count18;
|
|
9664
9768
|
}
|
|
9665
9769
|
function filter(array, f) {
|
|
9666
9770
|
if (array !== void 0) {
|
|
@@ -10213,12 +10317,12 @@ var require_typescript = __commonJS({
|
|
|
10213
10317
|
}
|
|
10214
10318
|
return ~low;
|
|
10215
10319
|
}
|
|
10216
|
-
function reduceLeft(array, f, initial, start,
|
|
10320
|
+
function reduceLeft(array, f, initial, start, count18) {
|
|
10217
10321
|
if (array && array.length > 0) {
|
|
10218
10322
|
const size = array.length;
|
|
10219
10323
|
if (size > 0) {
|
|
10220
10324
|
let pos = start === void 0 || start < 0 ? 0 : start;
|
|
10221
|
-
const end =
|
|
10325
|
+
const end = count18 === void 0 || pos + count18 > size - 1 ? size - 1 : pos + count18;
|
|
10222
10326
|
let result;
|
|
10223
10327
|
if (arguments.length <= 2) {
|
|
10224
10328
|
result = array[pos];
|
|
@@ -10270,9 +10374,9 @@ var require_typescript = __commonJS({
|
|
|
10270
10374
|
}
|
|
10271
10375
|
return values;
|
|
10272
10376
|
}
|
|
10273
|
-
function arrayOf(
|
|
10274
|
-
const result = new Array(
|
|
10275
|
-
for (let i2 = 0; i2 <
|
|
10377
|
+
function arrayOf(count18, f) {
|
|
10378
|
+
const result = new Array(count18);
|
|
10379
|
+
for (let i2 = 0; i2 < count18; i2++) {
|
|
10276
10380
|
result[i2] = f(i2);
|
|
10277
10381
|
}
|
|
10278
10382
|
return result;
|
|
@@ -10880,7 +10984,7 @@ var require_typescript = __commonJS({
|
|
|
10880
10984
|
function isPatternMatch({ prefix, suffix }, candidate) {
|
|
10881
10985
|
return candidate.length >= prefix.length + suffix.length && startsWith(candidate, prefix) && endsWith(candidate, suffix);
|
|
10882
10986
|
}
|
|
10883
|
-
function
|
|
10987
|
+
function and22(f, g) {
|
|
10884
10988
|
return (arg) => f(arg) && g(arg);
|
|
10885
10989
|
}
|
|
10886
10990
|
function or(...fs5) {
|
|
@@ -12387,8 +12491,8 @@ ${lanes.join("\n")}
|
|
|
12387
12491
|
var durations = /* @__PURE__ */ new Map();
|
|
12388
12492
|
function mark(markName) {
|
|
12389
12493
|
if (enabled) {
|
|
12390
|
-
const
|
|
12391
|
-
counts.set(markName,
|
|
12494
|
+
const count18 = counts.get(markName) ?? 0;
|
|
12495
|
+
counts.set(markName, count18 + 1);
|
|
12392
12496
|
marks.set(markName, timestamp());
|
|
12393
12497
|
performanceImpl == null ? void 0 : performanceImpl.mark(markName);
|
|
12394
12498
|
if (typeof onProfilerEvent === "function") {
|
|
@@ -15145,8 +15249,8 @@ ${lanes.join("\n")}
|
|
|
15145
15249
|
function sysLog(s2) {
|
|
15146
15250
|
return curSysLog(s2);
|
|
15147
15251
|
}
|
|
15148
|
-
function setSysLog(
|
|
15149
|
-
curSysLog =
|
|
15252
|
+
function setSysLog(logger16) {
|
|
15253
|
+
curSysLog = logger16;
|
|
15150
15254
|
}
|
|
15151
15255
|
function createDirectoryWatcherSupportingRecursive({
|
|
15152
15256
|
watchDirectory,
|
|
@@ -19899,20 +20003,20 @@ ${lanes.join("\n")}
|
|
|
19899
20003
|
tokenValue = text4.substring(start2, pos);
|
|
19900
20004
|
return isOctal;
|
|
19901
20005
|
}
|
|
19902
|
-
function scanExactNumberOfHexDigits(
|
|
20006
|
+
function scanExactNumberOfHexDigits(count18, canHaveSeparators) {
|
|
19903
20007
|
const valueString = scanHexDigits(
|
|
19904
20008
|
/*minCount*/
|
|
19905
|
-
|
|
20009
|
+
count18,
|
|
19906
20010
|
/*scanAsManyAsPossible*/
|
|
19907
20011
|
false,
|
|
19908
20012
|
canHaveSeparators
|
|
19909
20013
|
);
|
|
19910
20014
|
return valueString ? parseInt(valueString, 16) : -1;
|
|
19911
20015
|
}
|
|
19912
|
-
function scanMinimumNumberOfHexDigits(
|
|
20016
|
+
function scanMinimumNumberOfHexDigits(count18, canHaveSeparators) {
|
|
19913
20017
|
return scanHexDigits(
|
|
19914
20018
|
/*minCount*/
|
|
19915
|
-
|
|
20019
|
+
count18,
|
|
19916
20020
|
/*scanAsManyAsPossible*/
|
|
19917
20021
|
true,
|
|
19918
20022
|
canHaveSeparators
|
|
@@ -38738,13 +38842,13 @@ ${lanes.join("\n")}
|
|
|
38738
38842
|
[expression]
|
|
38739
38843
|
);
|
|
38740
38844
|
}
|
|
38741
|
-
function createReadHelper(iteratorRecord,
|
|
38845
|
+
function createReadHelper(iteratorRecord, count18) {
|
|
38742
38846
|
context.requestEmitHelper(readHelper);
|
|
38743
38847
|
return factory2.createCallExpression(
|
|
38744
38848
|
getUnscopedHelperName("__read"),
|
|
38745
38849
|
/*typeArguments*/
|
|
38746
38850
|
void 0,
|
|
38747
|
-
|
|
38851
|
+
count18 !== void 0 ? [iteratorRecord, factory2.createNumericLiteral(count18 + "")] : [iteratorRecord]
|
|
38748
38852
|
);
|
|
38749
38853
|
}
|
|
38750
38854
|
function createGeneratorHelper(body) {
|
|
@@ -61054,11 +61158,11 @@ ${lanes.join("\n")}
|
|
|
61054
61158
|
return comparePaths(a, b2, ignoreCase) === 0;
|
|
61055
61159
|
}
|
|
61056
61160
|
function countPathComponents(path4) {
|
|
61057
|
-
let
|
|
61161
|
+
let count18 = 0;
|
|
61058
61162
|
for (let i2 = startsWith(path4, "./") ? 2 : 0; i2 < path4.length; i2++) {
|
|
61059
|
-
if (path4.charCodeAt(i2) === 47)
|
|
61163
|
+
if (path4.charCodeAt(i2) === 47) count18++;
|
|
61060
61164
|
}
|
|
61061
|
-
return
|
|
61165
|
+
return count18;
|
|
61062
61166
|
}
|
|
61063
61167
|
function comparePathsByRedirectAndNumberOfDirectorySeparators(a, b2) {
|
|
61064
61168
|
return compareBooleans(b2.isRedirect, a.isRedirect) || compareNumberOfDirectorySeparators(a.path, b2.path);
|
|
@@ -61893,7 +61997,7 @@ ${lanes.join("\n")}
|
|
|
61893
61997
|
SignatureCheckMode3[SignatureCheckMode3["Callback"] = 3] = "Callback";
|
|
61894
61998
|
return SignatureCheckMode3;
|
|
61895
61999
|
})(SignatureCheckMode || {});
|
|
61896
|
-
var isNotOverloadAndNotAccessor =
|
|
62000
|
+
var isNotOverloadAndNotAccessor = and22(isNotOverload, isNotAccessor);
|
|
61897
62001
|
var intrinsicTypeKinds = new Map(Object.entries({
|
|
61898
62002
|
Uppercase: 0,
|
|
61899
62003
|
Lowercase: 1,
|
|
@@ -67633,7 +67737,7 @@ ${lanes.join("\n")}
|
|
|
67633
67737
|
deepCloneOrReuseNode
|
|
67634
67738
|
)), node);
|
|
67635
67739
|
}
|
|
67636
|
-
function deepCloneOrReuseNodes(nodes, visitor, test, start,
|
|
67740
|
+
function deepCloneOrReuseNodes(nodes, visitor, test, start, count18) {
|
|
67637
67741
|
if (nodes && nodes.length === 0) {
|
|
67638
67742
|
return setTextRange(factory.createNodeArray(
|
|
67639
67743
|
/*elements*/
|
|
@@ -67641,7 +67745,7 @@ ${lanes.join("\n")}
|
|
|
67641
67745
|
nodes.hasTrailingComma
|
|
67642
67746
|
), nodes);
|
|
67643
67747
|
}
|
|
67644
|
-
return visitNodes2(nodes, visitor, test, start,
|
|
67748
|
+
return visitNodes2(nodes, visitor, test, start, count18);
|
|
67645
67749
|
}
|
|
67646
67750
|
}
|
|
67647
67751
|
function createTypeNodeFromObjectType(type2) {
|
|
@@ -71598,10 +71702,10 @@ ${lanes.join("\n")}
|
|
|
71598
71702
|
if (t2.flags & 512 || !expandingEnum && t2.flags | 1056) {
|
|
71599
71703
|
const baseType = t2.flags & 512 ? booleanType : getBaseTypeOfEnumLikeType(t2);
|
|
71600
71704
|
if (baseType.flags & 1048576) {
|
|
71601
|
-
const
|
|
71602
|
-
if (i2 +
|
|
71705
|
+
const count18 = baseType.types.length;
|
|
71706
|
+
if (i2 + count18 <= types.length && getRegularTypeOfLiteralType(types[i2 + count18 - 1]) === getRegularTypeOfLiteralType(baseType.types[count18 - 1])) {
|
|
71603
71707
|
result.push(baseType);
|
|
71604
|
-
i2 +=
|
|
71708
|
+
i2 += count18 - 1;
|
|
71605
71709
|
continue;
|
|
71606
71710
|
}
|
|
71607
71711
|
}
|
|
@@ -76567,18 +76671,18 @@ ${lanes.join("\n")}
|
|
|
76567
76671
|
let i2 = 0;
|
|
76568
76672
|
while (i2 < length2) {
|
|
76569
76673
|
const startId = types[i2].id;
|
|
76570
|
-
let
|
|
76571
|
-
while (i2 +
|
|
76572
|
-
|
|
76674
|
+
let count18 = 1;
|
|
76675
|
+
while (i2 + count18 < length2 && types[i2 + count18].id === startId + count18) {
|
|
76676
|
+
count18++;
|
|
76573
76677
|
}
|
|
76574
76678
|
if (result.length) {
|
|
76575
76679
|
result += ",";
|
|
76576
76680
|
}
|
|
76577
76681
|
result += startId;
|
|
76578
|
-
if (
|
|
76579
|
-
result += ":" +
|
|
76682
|
+
if (count18 > 1) {
|
|
76683
|
+
result += ":" + count18;
|
|
76580
76684
|
}
|
|
76581
|
-
i2 +=
|
|
76685
|
+
i2 += count18;
|
|
76582
76686
|
}
|
|
76583
76687
|
}
|
|
76584
76688
|
return result;
|
|
@@ -77858,7 +77962,7 @@ ${lanes.join("\n")}
|
|
|
77858
77962
|
const hasEmptyObject = hasObjectTypes && some(types, (t2) => !!(t2.flags & 524288) && !isGenericMappedType(t2) && isEmptyResolvedType(resolveStructuredTypeMembers(t2)));
|
|
77859
77963
|
const len = types.length;
|
|
77860
77964
|
let i2 = len;
|
|
77861
|
-
let
|
|
77965
|
+
let count18 = 0;
|
|
77862
77966
|
while (i2 > 0) {
|
|
77863
77967
|
i2--;
|
|
77864
77968
|
const source = types[i2];
|
|
@@ -77873,15 +77977,15 @@ ${lanes.join("\n")}
|
|
|
77873
77977
|
const keyPropertyType = keyProperty && getRegularTypeOfLiteralType(getTypeOfSymbol(keyProperty));
|
|
77874
77978
|
for (const target of types) {
|
|
77875
77979
|
if (source !== target) {
|
|
77876
|
-
if (
|
|
77877
|
-
const estimatedCount =
|
|
77980
|
+
if (count18 === 1e5) {
|
|
77981
|
+
const estimatedCount = count18 / (len - i2) * len;
|
|
77878
77982
|
if (estimatedCount > 1e6) {
|
|
77879
77983
|
(_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "removeSubtypes_DepthLimit", { typeIds: types.map((t2) => t2.id) });
|
|
77880
77984
|
error2(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent);
|
|
77881
77985
|
return void 0;
|
|
77882
77986
|
}
|
|
77883
77987
|
}
|
|
77884
|
-
|
|
77988
|
+
count18++;
|
|
77885
77989
|
if (keyProperty && target.flags & (524288 | 2097152 | 58982400)) {
|
|
77886
77990
|
const t2 = getTypeOfPropertyOfType(target, keyProperty.escapedName);
|
|
77887
77991
|
if (t2 && isUnitType(t2) && getRegularTypeOfLiteralType(t2) !== keyPropertyType) {
|
|
@@ -78382,9 +78486,9 @@ ${lanes.join("\n")}
|
|
|
78382
78486
|
return true;
|
|
78383
78487
|
}
|
|
78384
78488
|
function getCrossProductIntersections(types, flags) {
|
|
78385
|
-
const
|
|
78489
|
+
const count18 = getCrossProductUnionSize(types);
|
|
78386
78490
|
const intersections = [];
|
|
78387
|
-
for (let i2 = 0; i2 <
|
|
78491
|
+
for (let i2 = 0; i2 < count18; i2++) {
|
|
78388
78492
|
const constituents = types.slice();
|
|
78389
78493
|
let n2 = i2;
|
|
78390
78494
|
for (let j2 = types.length - 1; j2 >= 0; j2--) {
|
|
@@ -84251,14 +84355,14 @@ ${lanes.join("\n")}
|
|
|
84251
84355
|
return some(type.types, (t2) => isDeeplyNestedType(t2, stack, depth, maxDepth));
|
|
84252
84356
|
}
|
|
84253
84357
|
const identity2 = getRecursionIdentity(type);
|
|
84254
|
-
let
|
|
84358
|
+
let count18 = 0;
|
|
84255
84359
|
let lastTypeId = 0;
|
|
84256
84360
|
for (let i2 = 0; i2 < depth; i2++) {
|
|
84257
84361
|
const t2 = stack[i2];
|
|
84258
84362
|
if (hasMatchingRecursionIdentity(t2, identity2)) {
|
|
84259
84363
|
if (t2.id >= lastTypeId) {
|
|
84260
|
-
|
|
84261
|
-
if (
|
|
84364
|
+
count18++;
|
|
84365
|
+
if (count18 >= maxDepth) {
|
|
84262
84366
|
return true;
|
|
84263
84367
|
}
|
|
84264
84368
|
}
|
|
@@ -85718,8 +85822,8 @@ ${lanes.join("\n")}
|
|
|
85718
85822
|
];
|
|
85719
85823
|
}
|
|
85720
85824
|
function inferFromTypeArguments(sourceTypes, targetTypes, variances) {
|
|
85721
|
-
const
|
|
85722
|
-
for (let i2 = 0; i2 <
|
|
85825
|
+
const count18 = sourceTypes.length < targetTypes.length ? sourceTypes.length : targetTypes.length;
|
|
85826
|
+
for (let i2 = 0; i2 < count18; i2++) {
|
|
85723
85827
|
if (i2 < variances.length && (variances[i2] & 7) === 2) {
|
|
85724
85828
|
inferFromContravariantTypes(sourceTypes[i2], targetTypes[i2]);
|
|
85725
85829
|
} else {
|
|
@@ -86463,7 +86567,7 @@ ${lanes.join("\n")}
|
|
|
86463
86567
|
}
|
|
86464
86568
|
function mapTypesByKeyProperty(types, name) {
|
|
86465
86569
|
const map2 = /* @__PURE__ */ new Map();
|
|
86466
|
-
let
|
|
86570
|
+
let count18 = 0;
|
|
86467
86571
|
for (const type of types) {
|
|
86468
86572
|
if (type.flags & (524288 | 2097152 | 58982400)) {
|
|
86469
86573
|
const discriminant = getTypeOfPropertyOfType(type, name);
|
|
@@ -86482,11 +86586,11 @@ ${lanes.join("\n")}
|
|
|
86482
86586
|
duplicate = true;
|
|
86483
86587
|
}
|
|
86484
86588
|
});
|
|
86485
|
-
if (!duplicate)
|
|
86589
|
+
if (!duplicate) count18++;
|
|
86486
86590
|
}
|
|
86487
86591
|
}
|
|
86488
86592
|
}
|
|
86489
|
-
return
|
|
86593
|
+
return count18 >= 10 && count18 * 2 >= types.length ? map2 : void 0;
|
|
86490
86594
|
}
|
|
86491
86595
|
function getKeyPropertyName(unionType) {
|
|
86492
86596
|
const types = unionType.types;
|
|
@@ -104713,7 +104817,7 @@ ${lanes.join("\n")}
|
|
|
104713
104817
|
if (flags & (1920 | 384)) {
|
|
104714
104818
|
return;
|
|
104715
104819
|
}
|
|
104716
|
-
const exportedDeclarationsCount = countWhere(declarations,
|
|
104820
|
+
const exportedDeclarationsCount = countWhere(declarations, and22(isNotOverloadAndNotAccessor, not2(isInterfaceDeclaration)));
|
|
104717
104821
|
if (flags & 524288 && exportedDeclarationsCount <= 2) {
|
|
104718
104822
|
return;
|
|
104719
104823
|
}
|
|
@@ -109102,7 +109206,7 @@ ${lanes.join("\n")}
|
|
|
109102
109206
|
Debug.assertNode(visitedNode, test);
|
|
109103
109207
|
return visitedNode;
|
|
109104
109208
|
}
|
|
109105
|
-
function visitNodes2(nodes, visitor, test, start,
|
|
109209
|
+
function visitNodes2(nodes, visitor, test, start, count18) {
|
|
109106
109210
|
if (nodes === void 0) {
|
|
109107
109211
|
return nodes;
|
|
109108
109212
|
}
|
|
@@ -109110,20 +109214,20 @@ ${lanes.join("\n")}
|
|
|
109110
109214
|
if (start === void 0 || start < 0) {
|
|
109111
109215
|
start = 0;
|
|
109112
109216
|
}
|
|
109113
|
-
if (
|
|
109114
|
-
|
|
109217
|
+
if (count18 === void 0 || count18 > length2 - start) {
|
|
109218
|
+
count18 = length2 - start;
|
|
109115
109219
|
}
|
|
109116
109220
|
let hasTrailingComma;
|
|
109117
109221
|
let pos = -1;
|
|
109118
109222
|
let end = -1;
|
|
109119
|
-
if (start > 0 ||
|
|
109120
|
-
hasTrailingComma = nodes.hasTrailingComma && start +
|
|
109223
|
+
if (start > 0 || count18 < length2) {
|
|
109224
|
+
hasTrailingComma = nodes.hasTrailingComma && start + count18 === length2;
|
|
109121
109225
|
} else {
|
|
109122
109226
|
pos = nodes.pos;
|
|
109123
109227
|
end = nodes.end;
|
|
109124
109228
|
hasTrailingComma = nodes.hasTrailingComma;
|
|
109125
109229
|
}
|
|
109126
|
-
const updated = visitArrayWorker(nodes, visitor, test, start,
|
|
109230
|
+
const updated = visitArrayWorker(nodes, visitor, test, start, count18);
|
|
109127
109231
|
if (updated !== nodes) {
|
|
109128
109232
|
const updatedArray = factory.createNodeArray(updated, hasTrailingComma);
|
|
109129
109233
|
setTextRangePosEnd(updatedArray, pos, end);
|
|
@@ -109131,7 +109235,7 @@ ${lanes.join("\n")}
|
|
|
109131
109235
|
}
|
|
109132
109236
|
return nodes;
|
|
109133
109237
|
}
|
|
109134
|
-
function visitArray(nodes, visitor, test, start,
|
|
109238
|
+
function visitArray(nodes, visitor, test, start, count18) {
|
|
109135
109239
|
if (nodes === void 0) {
|
|
109136
109240
|
return nodes;
|
|
109137
109241
|
}
|
|
@@ -109139,18 +109243,18 @@ ${lanes.join("\n")}
|
|
|
109139
109243
|
if (start === void 0 || start < 0) {
|
|
109140
109244
|
start = 0;
|
|
109141
109245
|
}
|
|
109142
|
-
if (
|
|
109143
|
-
|
|
109246
|
+
if (count18 === void 0 || count18 > length2 - start) {
|
|
109247
|
+
count18 = length2 - start;
|
|
109144
109248
|
}
|
|
109145
|
-
return visitArrayWorker(nodes, visitor, test, start,
|
|
109249
|
+
return visitArrayWorker(nodes, visitor, test, start, count18);
|
|
109146
109250
|
}
|
|
109147
|
-
function visitArrayWorker(nodes, visitor, test, start,
|
|
109251
|
+
function visitArrayWorker(nodes, visitor, test, start, count18) {
|
|
109148
109252
|
let updated;
|
|
109149
109253
|
const length2 = nodes.length;
|
|
109150
|
-
if (start > 0 ||
|
|
109254
|
+
if (start > 0 || count18 < length2) {
|
|
109151
109255
|
updated = [];
|
|
109152
109256
|
}
|
|
109153
|
-
for (let i2 = 0; i2 <
|
|
109257
|
+
for (let i2 = 0; i2 < count18; i2++) {
|
|
109154
109258
|
const node = nodes[i2 + start];
|
|
109155
109259
|
const visited = node !== void 0 ? visitor ? visitor(node) : node : void 0;
|
|
109156
109260
|
if (updated !== void 0 || visited === void 0 || visited !== node) {
|
|
@@ -140526,7 +140630,7 @@ ${lanes.join("\n")}
|
|
|
140526
140630
|
break;
|
|
140527
140631
|
}
|
|
140528
140632
|
}
|
|
140529
|
-
function emitList(parentNode, children, format, parenthesizerRule, start,
|
|
140633
|
+
function emitList(parentNode, children, format, parenthesizerRule, start, count18) {
|
|
140530
140634
|
emitNodeList(
|
|
140531
140635
|
emit,
|
|
140532
140636
|
parentNode,
|
|
@@ -140534,18 +140638,18 @@ ${lanes.join("\n")}
|
|
|
140534
140638
|
format | (parentNode && getEmitFlags(parentNode) & 2 ? 65536 : 0),
|
|
140535
140639
|
parenthesizerRule,
|
|
140536
140640
|
start,
|
|
140537
|
-
|
|
140641
|
+
count18
|
|
140538
140642
|
);
|
|
140539
140643
|
}
|
|
140540
|
-
function emitExpressionList(parentNode, children, format, parenthesizerRule, start,
|
|
140541
|
-
emitNodeList(emitExpression, parentNode, children, format, parenthesizerRule, start,
|
|
140644
|
+
function emitExpressionList(parentNode, children, format, parenthesizerRule, start, count18) {
|
|
140645
|
+
emitNodeList(emitExpression, parentNode, children, format, parenthesizerRule, start, count18);
|
|
140542
140646
|
}
|
|
140543
|
-
function emitNodeList(emit2, parentNode, children, format, parenthesizerRule, start = 0,
|
|
140647
|
+
function emitNodeList(emit2, parentNode, children, format, parenthesizerRule, start = 0, count18 = children ? children.length - start : 0) {
|
|
140544
140648
|
const isUndefined2 = children === void 0;
|
|
140545
140649
|
if (isUndefined2 && format & 16384) {
|
|
140546
140650
|
return;
|
|
140547
140651
|
}
|
|
140548
|
-
const isEmpty = children === void 0 || start >= children.length ||
|
|
140652
|
+
const isEmpty = children === void 0 || start >= children.length || count18 === 0;
|
|
140549
140653
|
if (isEmpty && format & 32768) {
|
|
140550
140654
|
onBeforeEmitNodeArray == null ? void 0 : onBeforeEmitNodeArray(children);
|
|
140551
140655
|
onAfterEmitNodeArray == null ? void 0 : onAfterEmitNodeArray(children);
|
|
@@ -140569,7 +140673,7 @@ ${lanes.join("\n")}
|
|
|
140569
140673
|
writeSpace();
|
|
140570
140674
|
}
|
|
140571
140675
|
} else {
|
|
140572
|
-
emitNodeListItems(emit2, parentNode, children, format, parenthesizerRule, start,
|
|
140676
|
+
emitNodeListItems(emit2, parentNode, children, format, parenthesizerRule, start, count18, children.hasTrailingComma, children);
|
|
140573
140677
|
}
|
|
140574
140678
|
onAfterEmitNodeArray == null ? void 0 : onAfterEmitNodeArray(children);
|
|
140575
140679
|
if (format & 15360) {
|
|
@@ -140579,7 +140683,7 @@ ${lanes.join("\n")}
|
|
|
140579
140683
|
writePunctuation(getClosingBracket(format));
|
|
140580
140684
|
}
|
|
140581
140685
|
}
|
|
140582
|
-
function emitNodeListItems(emit2, parentNode, children, format, parenthesizerRule, start,
|
|
140686
|
+
function emitNodeListItems(emit2, parentNode, children, format, parenthesizerRule, start, count18, hasTrailingComma, childrenTextRange) {
|
|
140583
140687
|
const mayEmitInterveningComments = (format & 262144) === 0;
|
|
140584
140688
|
let shouldEmitInterveningComments = mayEmitInterveningComments;
|
|
140585
140689
|
const leadingLineTerminatorCount = getLeadingLineTerminatorCount(parentNode, children[start], format);
|
|
@@ -140595,7 +140699,7 @@ ${lanes.join("\n")}
|
|
|
140595
140699
|
const emitListItem = getEmitListItem(emit2, parenthesizerRule);
|
|
140596
140700
|
let previousSibling;
|
|
140597
140701
|
let shouldDecreaseIndentAfterEmit = false;
|
|
140598
|
-
for (let i2 = 0; i2 <
|
|
140702
|
+
for (let i2 = 0; i2 < count18; i2++) {
|
|
140599
140703
|
const child = children[start + i2];
|
|
140600
140704
|
if (format & 32) {
|
|
140601
140705
|
writeLine();
|
|
@@ -140660,7 +140764,7 @@ ${lanes.join("\n")}
|
|
|
140660
140764
|
if (format & 128) {
|
|
140661
140765
|
decreaseIndent();
|
|
140662
140766
|
}
|
|
140663
|
-
const closingLineTerminatorCount = getClosingLineTerminatorCount(parentNode, children[start +
|
|
140767
|
+
const closingLineTerminatorCount = getClosingLineTerminatorCount(parentNode, children[start + count18 - 1], format, childrenTextRange);
|
|
140664
140768
|
if (closingLineTerminatorCount) {
|
|
140665
140769
|
writeLine(closingLineTerminatorCount);
|
|
140666
140770
|
} else if (format & (2097152 | 256)) {
|
|
@@ -140710,8 +140814,8 @@ ${lanes.join("\n")}
|
|
|
140710
140814
|
writer.write(s2);
|
|
140711
140815
|
}
|
|
140712
140816
|
}
|
|
140713
|
-
function writeLine(
|
|
140714
|
-
for (let i2 = 0; i2 <
|
|
140817
|
+
function writeLine(count18 = 1) {
|
|
140818
|
+
for (let i2 = 0; i2 < count18; i2++) {
|
|
140715
140819
|
writer.writeLine(i2 > 0);
|
|
140716
140820
|
}
|
|
140717
140821
|
}
|
|
@@ -141240,10 +141344,10 @@ ${lanes.join("\n")}
|
|
|
141240
141344
|
}
|
|
141241
141345
|
}
|
|
141242
141346
|
while (true) {
|
|
141243
|
-
const
|
|
141347
|
+
const count18 = tempFlags2 & 268435455;
|
|
141244
141348
|
tempFlags2++;
|
|
141245
|
-
if (
|
|
141246
|
-
const name =
|
|
141349
|
+
if (count18 !== 8 && count18 !== 13) {
|
|
141350
|
+
const name = count18 < 26 ? "_" + String.fromCharCode(97 + count18) : "_" + (count18 - 26);
|
|
141247
141351
|
const fullName = formatGeneratedName(privateName, prefix, name, suffix);
|
|
141248
141352
|
if (isUniqueName(fullName, privateName)) {
|
|
141249
141353
|
if (privateName) {
|
|
@@ -153326,12 +153430,12 @@ ${lanes.join("\n")}
|
|
|
153326
153430
|
for (const line of output) {
|
|
153327
153431
|
sys2.write(line);
|
|
153328
153432
|
}
|
|
153329
|
-
function example(ex,
|
|
153433
|
+
function example(ex, desc17) {
|
|
153330
153434
|
const examples = typeof ex === "string" ? [ex] : ex;
|
|
153331
153435
|
for (const example2 of examples) {
|
|
153332
153436
|
output.push(" " + colors.blue(example2) + sys2.newLine);
|
|
153333
153437
|
}
|
|
153334
|
-
output.push(" " + getDiagnosticText(
|
|
153438
|
+
output.push(" " + getDiagnosticText(desc17) + sys2.newLine + sys2.newLine);
|
|
153335
153439
|
}
|
|
153336
153440
|
}
|
|
153337
153441
|
function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) {
|
|
@@ -153983,7 +154087,7 @@ ${lanes.join("\n")}
|
|
|
153983
154087
|
reportCountStatistic("Lines of " + key, value);
|
|
153984
154088
|
}
|
|
153985
154089
|
} else {
|
|
153986
|
-
reportCountStatistic("Lines", reduceLeftIterator(lineCounts.values(), (sum,
|
|
154090
|
+
reportCountStatistic("Lines", reduceLeftIterator(lineCounts.values(), (sum, count18) => sum + count18, 0));
|
|
153987
154091
|
}
|
|
153988
154092
|
reportCountStatistic("Identifiers", program2.getIdentifierCount());
|
|
153989
154093
|
reportCountStatistic("Symbols", program2.getSymbolCount());
|
|
@@ -154088,11 +154192,11 @@ ${lanes.join("\n")}
|
|
|
154088
154192
|
statistics.push(s2);
|
|
154089
154193
|
if (aggregate) solutionPerformance == null ? void 0 : solutionPerformance.addAggregateStatistic(s2);
|
|
154090
154194
|
}
|
|
154091
|
-
function reportCountStatistic(name,
|
|
154195
|
+
function reportCountStatistic(name, count18) {
|
|
154092
154196
|
reportStatisticalValue(
|
|
154093
154197
|
{
|
|
154094
154198
|
name,
|
|
154095
|
-
value:
|
|
154199
|
+
value: count18,
|
|
154096
154200
|
type: 1
|
|
154097
154201
|
/* count */
|
|
154098
154202
|
},
|
|
@@ -154593,8 +154697,8 @@ ${lanes.join("\n")}
|
|
|
154593
154697
|
nonlocalNode ? visitNodesWithoutCopyingPositions : void 0
|
|
154594
154698
|
);
|
|
154595
154699
|
}
|
|
154596
|
-
function visitNodesWithoutCopyingPositions(nodes, visitor, test, start,
|
|
154597
|
-
let result = visitNodes2(nodes, visitor, test, start,
|
|
154700
|
+
function visitNodesWithoutCopyingPositions(nodes, visitor, test, start, count18) {
|
|
154701
|
+
let result = visitNodes2(nodes, visitor, test, start, count18);
|
|
154598
154702
|
if (result) {
|
|
154599
154703
|
if (result.pos !== -1 || result.end !== -1) {
|
|
154600
154704
|
if (result === nodes) {
|
|
@@ -157488,9 +157592,9 @@ ${lanes.join("\n")}
|
|
|
157488
157592
|
function getSnapshotText(snap) {
|
|
157489
157593
|
return snap.getText(0, snap.getLength());
|
|
157490
157594
|
}
|
|
157491
|
-
function repeatString(str,
|
|
157595
|
+
function repeatString(str, count18) {
|
|
157492
157596
|
let result = "";
|
|
157493
|
-
for (let i2 = 0; i2 <
|
|
157597
|
+
for (let i2 = 0; i2 < count18; i2++) {
|
|
157494
157598
|
result += str;
|
|
157495
157599
|
}
|
|
157496
157600
|
return result;
|
|
@@ -175622,7 +175726,7 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
175622
175726
|
const maybeHeritageClauseSymbol = getHeritageClauseSymbolTable(classDeclaration, checker);
|
|
175623
175727
|
const implementedType = checker.getTypeAtLocation(implementedTypeNode);
|
|
175624
175728
|
const implementedTypeSymbols = checker.getPropertiesOfType(implementedType);
|
|
175625
|
-
const nonPrivateAndNotExistedInHeritageClauseMembers = implementedTypeSymbols.filter(
|
|
175729
|
+
const nonPrivateAndNotExistedInHeritageClauseMembers = implementedTypeSymbols.filter(and22(symbolPointsToNonPrivateMember, (symbol) => !maybeHeritageClauseSymbol.has(symbol.escapedName)));
|
|
175626
175730
|
const classType = checker.getTypeAtLocation(classDeclaration);
|
|
175627
175731
|
const constructor = find(classDeclaration.members, (m2) => isConstructorDeclaration(m2));
|
|
175628
175732
|
if (!classType.getNumberIndexType()) {
|
|
@@ -190297,8 +190401,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
|
|
|
190297
190401
|
function isAmbientModuleDeclaration(node) {
|
|
190298
190402
|
return node.kind === 268 && node.name.kind === 11;
|
|
190299
190403
|
}
|
|
190300
|
-
function isExternalModuleImportEquals(
|
|
190301
|
-
return
|
|
190404
|
+
function isExternalModuleImportEquals(eq22) {
|
|
190405
|
+
return eq22.moduleReference.kind === 284 && eq22.moduleReference.expression.kind === 11;
|
|
190302
190406
|
}
|
|
190303
190407
|
var DefinitionKind = /* @__PURE__ */ ((DefinitionKind2) => {
|
|
190304
190408
|
DefinitionKind2[DefinitionKind2["Symbol"] = 0] = "Symbol";
|
|
@@ -195947,13 +196051,13 @@ ${content}
|
|
|
195947
196051
|
if (candidates[i2] === resolvedSignature) {
|
|
195948
196052
|
selectedItemIndex = itemsSeen;
|
|
195949
196053
|
if (item.length > 1) {
|
|
195950
|
-
let
|
|
196054
|
+
let count18 = 0;
|
|
195951
196055
|
for (const i22 of item) {
|
|
195952
196056
|
if (i22.isVariadic || i22.parameters.length >= argumentCount) {
|
|
195953
|
-
selectedItemIndex = itemsSeen +
|
|
196057
|
+
selectedItemIndex = itemsSeen + count18;
|
|
195954
196058
|
break;
|
|
195955
196059
|
}
|
|
195956
|
-
|
|
196060
|
+
count18++;
|
|
195957
196061
|
}
|
|
195958
196062
|
}
|
|
195959
196063
|
}
|
|
@@ -198254,8 +198358,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198254
198358
|
setTextRangePosEnd(newNode, getPos2(node), getEnd(node));
|
|
198255
198359
|
return newNode;
|
|
198256
198360
|
}
|
|
198257
|
-
function assignPositionsToNodeArray(nodes, visitor, test, start,
|
|
198258
|
-
const visited = visitNodes2(nodes, visitor, test, start,
|
|
198361
|
+
function assignPositionsToNodeArray(nodes, visitor, test, start, count18) {
|
|
198362
|
+
const visited = visitNodes2(nodes, visitor, test, start, count18);
|
|
198259
198363
|
if (!visited) {
|
|
198260
198364
|
return visited;
|
|
198261
198365
|
}
|
|
@@ -202932,7 +203036,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202932
203036
|
affectsEmitOptionDeclarations: () => affectsEmitOptionDeclarations,
|
|
202933
203037
|
allKeysStartWithDot: () => allKeysStartWithDot,
|
|
202934
203038
|
altDirectorySeparator: () => altDirectorySeparator,
|
|
202935
|
-
and: () =>
|
|
203039
|
+
and: () => and22,
|
|
202936
203040
|
append: () => append,
|
|
202937
203041
|
appendIfUnique: () => appendIfUnique,
|
|
202938
203042
|
arrayFrom: () => arrayFrom,
|
|
@@ -205701,13 +205805,13 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
205701
205805
|
return [];
|
|
205702
205806
|
}
|
|
205703
205807
|
var ThrottledOperations = class _ThrottledOperations {
|
|
205704
|
-
constructor(host,
|
|
205808
|
+
constructor(host, logger16) {
|
|
205705
205809
|
this.host = host;
|
|
205706
205810
|
this.pendingTimeouts = /* @__PURE__ */ new Map();
|
|
205707
|
-
this.logger =
|
|
205811
|
+
this.logger = logger16.hasLevel(
|
|
205708
205812
|
3
|
|
205709
205813
|
/* verbose */
|
|
205710
|
-
) ?
|
|
205814
|
+
) ? logger16 : void 0;
|
|
205711
205815
|
}
|
|
205712
205816
|
/**
|
|
205713
205817
|
* Wait `number` milliseconds and then invoke `cb`. If, while waiting, schedule
|
|
@@ -205740,10 +205844,10 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
205740
205844
|
}
|
|
205741
205845
|
};
|
|
205742
205846
|
var GcTimer = class _GcTimer {
|
|
205743
|
-
constructor(host, delay,
|
|
205847
|
+
constructor(host, delay, logger16) {
|
|
205744
205848
|
this.host = host;
|
|
205745
205849
|
this.delay = delay;
|
|
205746
|
-
this.logger =
|
|
205850
|
+
this.logger = logger16;
|
|
205747
205851
|
}
|
|
205748
205852
|
scheduleCollect() {
|
|
205749
205853
|
if (!this.host.gc || this.timerId !== void 0) {
|
|
@@ -213105,14 +213209,14 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
213105
213209
|
return edits.every((edit) => textSpanEnd(edit.span) < pos);
|
|
213106
213210
|
}
|
|
213107
213211
|
var CommandNames = CommandTypes;
|
|
213108
|
-
function formatMessage2(msg,
|
|
213109
|
-
const verboseLogging =
|
|
213212
|
+
function formatMessage2(msg, logger16, byteLength, newLine) {
|
|
213213
|
+
const verboseLogging = logger16.hasLevel(
|
|
213110
213214
|
3
|
|
213111
213215
|
/* verbose */
|
|
213112
213216
|
);
|
|
213113
213217
|
const json = JSON.stringify(msg);
|
|
213114
213218
|
if (verboseLogging) {
|
|
213115
|
-
|
|
213219
|
+
logger16.info(`${msg.type}:${stringifyIndented(msg)}`);
|
|
213116
213220
|
}
|
|
213117
213221
|
const len = byteLength(json, "utf8");
|
|
213118
213222
|
return `Content-Length: ${1 + len}\r
|
|
@@ -213267,7 +213371,7 @@ ${json}${newLine}`;
|
|
|
213267
213371
|
const info = infos && firstOrUndefined(infos);
|
|
213268
213372
|
return info && !info.isLocal ? { fileName: info.fileName, pos: info.textSpan.start } : void 0;
|
|
213269
213373
|
}
|
|
213270
|
-
function getReferencesWorker(projects2, defaultProject, initialLocation, useCaseSensitiveFileNames2,
|
|
213374
|
+
function getReferencesWorker(projects2, defaultProject, initialLocation, useCaseSensitiveFileNames2, logger16) {
|
|
213271
213375
|
var _a, _b;
|
|
213272
213376
|
const perProjectResults = getPerProjectReferences(
|
|
213273
213377
|
projects2,
|
|
@@ -213281,7 +213385,7 @@ ${json}${newLine}`;
|
|
|
213281
213385
|
),
|
|
213282
213386
|
mapDefinitionInProject,
|
|
213283
213387
|
(project, position) => {
|
|
213284
|
-
|
|
213388
|
+
logger16.info(`Finding references to ${position.fileName} position ${position.pos} in project ${project.getProjectName()}`);
|
|
213285
213389
|
return project.getLanguageService().findReferences(position.fileName, position.pos);
|
|
213286
213390
|
},
|
|
213287
213391
|
(referencedSymbol, cb) => {
|
|
@@ -217657,9 +217761,9 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
217657
217761
|
}
|
|
217658
217762
|
};
|
|
217659
217763
|
var _TypingsInstallerAdapter = class _TypingsInstallerAdapter2 {
|
|
217660
|
-
constructor(telemetryEnabled,
|
|
217764
|
+
constructor(telemetryEnabled, logger16, host, globalTypingsCacheLocation, event, maxActiveRequestCount) {
|
|
217661
217765
|
this.telemetryEnabled = telemetryEnabled;
|
|
217662
|
-
this.logger =
|
|
217766
|
+
this.logger = logger16;
|
|
217663
217767
|
this.host = host;
|
|
217664
217768
|
this.globalTypingsCacheLocation = globalTypingsCacheLocation;
|
|
217665
217769
|
this.event = event;
|
|
@@ -218041,6 +218145,16 @@ var init_subAgents = __esm({
|
|
|
218041
218145
|
}
|
|
218042
218146
|
});
|
|
218043
218147
|
|
|
218148
|
+
// ../packages/agents-core/src/data-access/subAgentTeamAgentRelations.ts
|
|
218149
|
+
import { and as and8, count as count7, desc as desc7, eq as eq8 } from "drizzle-orm";
|
|
218150
|
+
var init_subAgentTeamAgentRelations = __esm({
|
|
218151
|
+
"../packages/agents-core/src/data-access/subAgentTeamAgentRelations.ts"() {
|
|
218152
|
+
"use strict";
|
|
218153
|
+
init_esm_shims();
|
|
218154
|
+
init_schema();
|
|
218155
|
+
}
|
|
218156
|
+
});
|
|
218157
|
+
|
|
218044
218158
|
// ../packages/agents-core/src/credential-stuffer/index.ts
|
|
218045
218159
|
var init_credential_stuffer = __esm({
|
|
218046
218160
|
"../packages/agents-core/src/credential-stuffer/index.ts"() {
|
|
@@ -220984,26 +221098,26 @@ var require_resolve = __commonJS({
|
|
|
220984
221098
|
return true;
|
|
220985
221099
|
}
|
|
220986
221100
|
function countKeys(schema) {
|
|
220987
|
-
var
|
|
221101
|
+
var count18 = 0, item;
|
|
220988
221102
|
if (Array.isArray(schema)) {
|
|
220989
221103
|
for (var i2 = 0; i2 < schema.length; i2++) {
|
|
220990
221104
|
item = schema[i2];
|
|
220991
|
-
if (typeof item == "object")
|
|
220992
|
-
if (
|
|
221105
|
+
if (typeof item == "object") count18 += countKeys(item);
|
|
221106
|
+
if (count18 == Infinity) return Infinity;
|
|
220993
221107
|
}
|
|
220994
221108
|
} else {
|
|
220995
221109
|
for (var key in schema) {
|
|
220996
221110
|
if (key == "$ref") return Infinity;
|
|
220997
221111
|
if (SIMPLE_INLINED[key]) {
|
|
220998
|
-
|
|
221112
|
+
count18++;
|
|
220999
221113
|
} else {
|
|
221000
221114
|
item = schema[key];
|
|
221001
|
-
if (typeof item == "object")
|
|
221002
|
-
if (
|
|
221115
|
+
if (typeof item == "object") count18 += countKeys(item) + 1;
|
|
221116
|
+
if (count18 == Infinity) return Infinity;
|
|
221003
221117
|
}
|
|
221004
221118
|
}
|
|
221005
221119
|
}
|
|
221006
|
-
return
|
|
221120
|
+
return count18;
|
|
221007
221121
|
}
|
|
221008
221122
|
function getFullPath(id, normalize) {
|
|
221009
221123
|
if (normalize !== false) id = normalizeId(id);
|
|
@@ -225725,14 +225839,14 @@ var require_ajv = __commonJS({
|
|
|
225725
225839
|
return metaOpts;
|
|
225726
225840
|
}
|
|
225727
225841
|
function setLogger(self) {
|
|
225728
|
-
var
|
|
225729
|
-
if (
|
|
225842
|
+
var logger16 = self._opts.logger;
|
|
225843
|
+
if (logger16 === false) {
|
|
225730
225844
|
self.logger = { log: noop, warn: noop, error: noop };
|
|
225731
225845
|
} else {
|
|
225732
|
-
if (
|
|
225733
|
-
if (!(typeof
|
|
225846
|
+
if (logger16 === void 0) logger16 = console;
|
|
225847
|
+
if (!(typeof logger16 == "object" && logger16.log && logger16.warn && logger16.error))
|
|
225734
225848
|
throw new Error("logger must implement log, warn and error methods");
|
|
225735
|
-
self.logger =
|
|
225849
|
+
self.logger = logger16;
|
|
225736
225850
|
}
|
|
225737
225851
|
}
|
|
225738
225852
|
function noop() {
|
|
@@ -225932,6 +226046,156 @@ var init_mcp_client = __esm({
|
|
|
225932
226046
|
}
|
|
225933
226047
|
});
|
|
225934
226048
|
|
|
226049
|
+
// ../node_modules/.pnpm/dotenv-expand@12.0.3/node_modules/dotenv-expand/lib/main.js
|
|
226050
|
+
var require_main = __commonJS({
|
|
226051
|
+
"../node_modules/.pnpm/dotenv-expand@12.0.3/node_modules/dotenv-expand/lib/main.js"(exports, module) {
|
|
226052
|
+
"use strict";
|
|
226053
|
+
init_esm_shims();
|
|
226054
|
+
function _resolveEscapeSequences(value) {
|
|
226055
|
+
return value.replace(/\\\$/g, "$");
|
|
226056
|
+
}
|
|
226057
|
+
function expandValue(value, processEnv, runningParsed) {
|
|
226058
|
+
const env3 = { ...runningParsed, ...processEnv };
|
|
226059
|
+
const regex = /(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g;
|
|
226060
|
+
let result = value;
|
|
226061
|
+
let match2;
|
|
226062
|
+
const seen = /* @__PURE__ */ new Set();
|
|
226063
|
+
while ((match2 = regex.exec(result)) !== null) {
|
|
226064
|
+
seen.add(result);
|
|
226065
|
+
const [template, bracedExpression, unbracedExpression] = match2;
|
|
226066
|
+
const expression = bracedExpression || unbracedExpression;
|
|
226067
|
+
const opRegex = /(:\+|\+|:-|-)/;
|
|
226068
|
+
const opMatch = expression.match(opRegex);
|
|
226069
|
+
const splitter = opMatch ? opMatch[0] : null;
|
|
226070
|
+
const r2 = expression.split(splitter);
|
|
226071
|
+
let defaultValue;
|
|
226072
|
+
let value2;
|
|
226073
|
+
const key = r2.shift();
|
|
226074
|
+
if ([":+", "+"].includes(splitter)) {
|
|
226075
|
+
defaultValue = env3[key] ? r2.join(splitter) : "";
|
|
226076
|
+
value2 = null;
|
|
226077
|
+
} else {
|
|
226078
|
+
defaultValue = r2.join(splitter);
|
|
226079
|
+
value2 = env3[key];
|
|
226080
|
+
}
|
|
226081
|
+
if (value2) {
|
|
226082
|
+
if (seen.has(value2)) {
|
|
226083
|
+
result = result.replace(template, defaultValue);
|
|
226084
|
+
} else {
|
|
226085
|
+
result = result.replace(template, value2);
|
|
226086
|
+
}
|
|
226087
|
+
} else {
|
|
226088
|
+
result = result.replace(template, defaultValue);
|
|
226089
|
+
}
|
|
226090
|
+
if (result === runningParsed[key]) {
|
|
226091
|
+
break;
|
|
226092
|
+
}
|
|
226093
|
+
regex.lastIndex = 0;
|
|
226094
|
+
}
|
|
226095
|
+
return result;
|
|
226096
|
+
}
|
|
226097
|
+
function expand2(options) {
|
|
226098
|
+
const runningParsed = {};
|
|
226099
|
+
let processEnv = process.env;
|
|
226100
|
+
if (options && options.processEnv != null) {
|
|
226101
|
+
processEnv = options.processEnv;
|
|
226102
|
+
}
|
|
226103
|
+
for (const key in options.parsed) {
|
|
226104
|
+
let value = options.parsed[key];
|
|
226105
|
+
if (processEnv[key] && processEnv[key] !== value) {
|
|
226106
|
+
value = processEnv[key];
|
|
226107
|
+
} else {
|
|
226108
|
+
value = expandValue(value, processEnv, runningParsed);
|
|
226109
|
+
}
|
|
226110
|
+
options.parsed[key] = _resolveEscapeSequences(value);
|
|
226111
|
+
runningParsed[key] = _resolveEscapeSequences(value);
|
|
226112
|
+
}
|
|
226113
|
+
for (const processKey in options.parsed) {
|
|
226114
|
+
processEnv[processKey] = options.parsed[processKey];
|
|
226115
|
+
}
|
|
226116
|
+
return options;
|
|
226117
|
+
}
|
|
226118
|
+
module.exports.expand = expand2;
|
|
226119
|
+
}
|
|
226120
|
+
});
|
|
226121
|
+
|
|
226122
|
+
// ../packages/agents-core/src/env.ts
|
|
226123
|
+
import fs from "fs";
|
|
226124
|
+
import os from "os";
|
|
226125
|
+
import path2 from "path";
|
|
226126
|
+
import dotenv from "dotenv";
|
|
226127
|
+
import { findUpSync } from "find-up";
|
|
226128
|
+
import { z as z9 } from "zod";
|
|
226129
|
+
var import_dotenv_expand, loadEnvironmentFiles, envSchema, parseEnv, env;
|
|
226130
|
+
var init_env = __esm({
|
|
226131
|
+
"../packages/agents-core/src/env.ts"() {
|
|
226132
|
+
"use strict";
|
|
226133
|
+
init_esm_shims();
|
|
226134
|
+
import_dotenv_expand = __toESM(require_main(), 1);
|
|
226135
|
+
loadEnvironmentFiles = () => {
|
|
226136
|
+
const environmentFiles = [];
|
|
226137
|
+
const currentEnv = path2.resolve(process.cwd(), ".env");
|
|
226138
|
+
if (fs.existsSync(currentEnv)) {
|
|
226139
|
+
environmentFiles.push(currentEnv);
|
|
226140
|
+
}
|
|
226141
|
+
const rootEnv = findUpSync(".env", { cwd: path2.dirname(process.cwd()) });
|
|
226142
|
+
if (rootEnv) {
|
|
226143
|
+
if (rootEnv !== currentEnv) {
|
|
226144
|
+
environmentFiles.push(rootEnv);
|
|
226145
|
+
}
|
|
226146
|
+
}
|
|
226147
|
+
const userConfigPath = path2.join(os.homedir(), ".inkeep", "config");
|
|
226148
|
+
if (fs.existsSync(userConfigPath)) {
|
|
226149
|
+
dotenv.config({ path: userConfigPath, override: true, quiet: true });
|
|
226150
|
+
}
|
|
226151
|
+
if (environmentFiles.length > 0) {
|
|
226152
|
+
dotenv.config({
|
|
226153
|
+
path: environmentFiles,
|
|
226154
|
+
override: false,
|
|
226155
|
+
quiet: true
|
|
226156
|
+
});
|
|
226157
|
+
(0, import_dotenv_expand.expand)({ processEnv: process.env });
|
|
226158
|
+
}
|
|
226159
|
+
};
|
|
226160
|
+
loadEnvironmentFiles();
|
|
226161
|
+
envSchema = z9.object({
|
|
226162
|
+
ENVIRONMENT: z9.enum(["development", "production", "pentest", "test"]).optional(),
|
|
226163
|
+
DB_FILE_NAME: z9.string().optional(),
|
|
226164
|
+
TURSO_DATABASE_URL: z9.string().optional(),
|
|
226165
|
+
TURSO_AUTH_TOKEN: z9.string().optional(),
|
|
226166
|
+
INKEEP_AGENTS_JWT_SIGNING_SECRET: z9.string().min(32, "INKEEP_AGENTS_JWT_SIGNING_SECRET must be at least 32 characters").optional()
|
|
226167
|
+
});
|
|
226168
|
+
parseEnv = () => {
|
|
226169
|
+
try {
|
|
226170
|
+
const parsedEnv = envSchema.parse(process.env);
|
|
226171
|
+
return parsedEnv;
|
|
226172
|
+
} catch (error) {
|
|
226173
|
+
if (error instanceof z9.ZodError) {
|
|
226174
|
+
const missingVars = error.issues.map((issue) => issue.path.join("."));
|
|
226175
|
+
throw new Error(
|
|
226176
|
+
`\u274C Invalid environment variables: ${missingVars.join(", ")}
|
|
226177
|
+
${error.message}`
|
|
226178
|
+
);
|
|
226179
|
+
}
|
|
226180
|
+
throw error;
|
|
226181
|
+
}
|
|
226182
|
+
};
|
|
226183
|
+
env = parseEnv();
|
|
226184
|
+
}
|
|
226185
|
+
});
|
|
226186
|
+
|
|
226187
|
+
// ../packages/agents-core/src/utils/service-token-auth.ts
|
|
226188
|
+
var logger6;
|
|
226189
|
+
var init_service_token_auth = __esm({
|
|
226190
|
+
"../packages/agents-core/src/utils/service-token-auth.ts"() {
|
|
226191
|
+
"use strict";
|
|
226192
|
+
init_esm_shims();
|
|
226193
|
+
init_env();
|
|
226194
|
+
init_logger();
|
|
226195
|
+
logger6 = getLogger("service-token-auth");
|
|
226196
|
+
}
|
|
226197
|
+
});
|
|
226198
|
+
|
|
225935
226199
|
// ../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/platform/node/globalThis.js
|
|
225936
226200
|
var _globalThis;
|
|
225937
226201
|
var init_globalThis = __esm({
|
|
@@ -226099,12 +226363,12 @@ var init_global_utils = __esm({
|
|
|
226099
226363
|
|
|
226100
226364
|
// ../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js
|
|
226101
226365
|
function logProxy(funcName, namespace, args) {
|
|
226102
|
-
var
|
|
226103
|
-
if (!
|
|
226366
|
+
var logger16 = getGlobal("diag");
|
|
226367
|
+
if (!logger16) {
|
|
226104
226368
|
return;
|
|
226105
226369
|
}
|
|
226106
226370
|
args.unshift(namespace);
|
|
226107
|
-
return
|
|
226371
|
+
return logger16[funcName].apply(logger16, __spreadArray([], __read(args), false));
|
|
226108
226372
|
}
|
|
226109
226373
|
var __read, __spreadArray, DiagComponentLogger;
|
|
226110
226374
|
var init_ComponentLogger = __esm({
|
|
@@ -226202,17 +226466,17 @@ var init_types3 = __esm({
|
|
|
226202
226466
|
});
|
|
226203
226467
|
|
|
226204
226468
|
// ../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js
|
|
226205
|
-
function createLogLevelDiagLogger(maxLevel,
|
|
226469
|
+
function createLogLevelDiagLogger(maxLevel, logger16) {
|
|
226206
226470
|
if (maxLevel < DiagLogLevel.NONE) {
|
|
226207
226471
|
maxLevel = DiagLogLevel.NONE;
|
|
226208
226472
|
} else if (maxLevel > DiagLogLevel.ALL) {
|
|
226209
226473
|
maxLevel = DiagLogLevel.ALL;
|
|
226210
226474
|
}
|
|
226211
|
-
|
|
226475
|
+
logger16 = logger16 || {};
|
|
226212
226476
|
function _filterFunc(funcName, theLevel) {
|
|
226213
|
-
var theFunc =
|
|
226477
|
+
var theFunc = logger16[funcName];
|
|
226214
226478
|
if (typeof theFunc === "function" && maxLevel >= theLevel) {
|
|
226215
|
-
return theFunc.bind(
|
|
226479
|
+
return theFunc.bind(logger16);
|
|
226216
226480
|
}
|
|
226217
226481
|
return function() {
|
|
226218
226482
|
};
|
|
@@ -226279,19 +226543,19 @@ var init_diag = __esm({
|
|
|
226279
226543
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
226280
226544
|
args[_i] = arguments[_i];
|
|
226281
226545
|
}
|
|
226282
|
-
var
|
|
226283
|
-
if (!
|
|
226546
|
+
var logger16 = getGlobal("diag");
|
|
226547
|
+
if (!logger16)
|
|
226284
226548
|
return;
|
|
226285
|
-
return
|
|
226549
|
+
return logger16[funcName].apply(logger16, __spreadArray2([], __read2(args), false));
|
|
226286
226550
|
};
|
|
226287
226551
|
}
|
|
226288
226552
|
var self = this;
|
|
226289
|
-
var setLogger = function(
|
|
226553
|
+
var setLogger = function(logger16, optionsOrLogLevel) {
|
|
226290
226554
|
var _a, _b, _c;
|
|
226291
226555
|
if (optionsOrLogLevel === void 0) {
|
|
226292
226556
|
optionsOrLogLevel = { logLevel: DiagLogLevel.INFO };
|
|
226293
226557
|
}
|
|
226294
|
-
if (
|
|
226558
|
+
if (logger16 === self) {
|
|
226295
226559
|
var err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
226296
226560
|
self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
|
|
226297
226561
|
return false;
|
|
@@ -226302,7 +226566,7 @@ var init_diag = __esm({
|
|
|
226302
226566
|
};
|
|
226303
226567
|
}
|
|
226304
226568
|
var oldLogger = getGlobal("diag");
|
|
226305
|
-
var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO,
|
|
226569
|
+
var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger16);
|
|
226306
226570
|
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
226307
226571
|
var stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : "<failed to generate stacktrace>";
|
|
226308
226572
|
oldLogger.warn("Current logger will be overwritten from " + stack);
|
|
@@ -226871,18 +227135,18 @@ function getTracer(serviceName, serviceVersion) {
|
|
|
226871
227135
|
try {
|
|
226872
227136
|
return trace.getTracer(serviceName, serviceVersion);
|
|
226873
227137
|
} catch (_error) {
|
|
226874
|
-
|
|
227138
|
+
logger7.debug({}, "OpenTelemetry tracer not available, using no-op tracer");
|
|
226875
227139
|
return noopTracer;
|
|
226876
227140
|
}
|
|
226877
227141
|
}
|
|
226878
|
-
var
|
|
227142
|
+
var logger7, createNoOpSpan, noopTracer;
|
|
226879
227143
|
var init_tracer_factory = __esm({
|
|
226880
227144
|
"../packages/agents-core/src/utils/tracer-factory.ts"() {
|
|
226881
227145
|
"use strict";
|
|
226882
227146
|
init_esm_shims();
|
|
226883
227147
|
init_esm();
|
|
226884
227148
|
init_utils();
|
|
226885
|
-
|
|
227149
|
+
logger7 = getLogger("tracer");
|
|
226886
227150
|
createNoOpSpan = () => ({
|
|
226887
227151
|
setAttributes: () => ({}),
|
|
226888
227152
|
recordException: () => ({}),
|
|
@@ -226928,12 +227192,13 @@ var init_utils = __esm({
|
|
|
226928
227192
|
init_logger();
|
|
226929
227193
|
init_mcp_client();
|
|
226930
227194
|
init_schema_conversion();
|
|
227195
|
+
init_service_token_auth();
|
|
226931
227196
|
init_tracer_factory();
|
|
226932
227197
|
}
|
|
226933
227198
|
});
|
|
226934
227199
|
|
|
226935
227200
|
// ../packages/agents-core/src/data-access/credentialReferences.ts
|
|
226936
|
-
import { and as
|
|
227201
|
+
import { and as and9, count as count8, desc as desc8, eq as eq9, sql as sql3 } from "drizzle-orm";
|
|
226937
227202
|
var init_credentialReferences = __esm({
|
|
226938
227203
|
"../packages/agents-core/src/data-access/credentialReferences.ts"() {
|
|
226939
227204
|
"use strict";
|
|
@@ -226943,8 +227208,8 @@ var init_credentialReferences = __esm({
|
|
|
226943
227208
|
});
|
|
226944
227209
|
|
|
226945
227210
|
// ../packages/agents-core/src/data-access/tools.ts
|
|
226946
|
-
import { and as
|
|
226947
|
-
var
|
|
227211
|
+
import { and as and10, count as count9, desc as desc9, eq as eq10 } from "drizzle-orm";
|
|
227212
|
+
var logger8;
|
|
226948
227213
|
var init_tools = __esm({
|
|
226949
227214
|
"../packages/agents-core/src/data-access/tools.ts"() {
|
|
226950
227215
|
"use strict";
|
|
@@ -226959,18 +227224,18 @@ var init_tools = __esm({
|
|
|
226959
227224
|
init_mcp_client();
|
|
226960
227225
|
init_credentialReferences();
|
|
226961
227226
|
init_subAgentRelations();
|
|
226962
|
-
|
|
227227
|
+
logger8 = getLogger("tools");
|
|
226963
227228
|
}
|
|
226964
227229
|
});
|
|
226965
227230
|
|
|
226966
227231
|
// ../packages/agents-core/src/data-access/agents.ts
|
|
226967
|
-
import { and as
|
|
227232
|
+
import { and as and11, count as count10, desc as desc10, eq as eq11, inArray as inArray2 } from "drizzle-orm";
|
|
226968
227233
|
var init_agents = __esm({
|
|
226969
227234
|
"../packages/agents-core/src/data-access/agents.ts"() {
|
|
226970
227235
|
"use strict";
|
|
226971
227236
|
init_esm_shims();
|
|
226972
|
-
init_conversations();
|
|
226973
227237
|
init_schema();
|
|
227238
|
+
init_conversations();
|
|
226974
227239
|
init_contextConfigs();
|
|
226975
227240
|
init_externalAgents();
|
|
226976
227241
|
init_functions();
|
|
@@ -226978,21 +227243,11 @@ var init_agents = __esm({
|
|
|
226978
227243
|
init_subAgentExternalAgentRelations();
|
|
226979
227244
|
init_subAgentRelations();
|
|
226980
227245
|
init_subAgents();
|
|
227246
|
+
init_subAgentTeamAgentRelations();
|
|
226981
227247
|
init_tools();
|
|
226982
227248
|
}
|
|
226983
227249
|
});
|
|
226984
227250
|
|
|
226985
|
-
// ../packages/agents-core/src/data-access/apiKeys.ts
|
|
226986
|
-
import { and as and11, count as count10, desc as desc10, eq as eq11 } from "drizzle-orm";
|
|
226987
|
-
var init_apiKeys2 = __esm({
|
|
226988
|
-
"../packages/agents-core/src/data-access/apiKeys.ts"() {
|
|
226989
|
-
"use strict";
|
|
226990
|
-
init_esm_shims();
|
|
226991
|
-
init_schema();
|
|
226992
|
-
init_apiKeys();
|
|
226993
|
-
}
|
|
226994
|
-
});
|
|
226995
|
-
|
|
226996
227251
|
// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/code.js
|
|
226997
227252
|
var require_code = __commonJS({
|
|
226998
227253
|
"../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/code.js"(exports) {
|
|
@@ -227997,10 +228252,10 @@ var require_codegen = __commonJS({
|
|
|
227997
228252
|
}
|
|
227998
228253
|
exports.not = not2;
|
|
227999
228254
|
var andCode = mappend(exports.operators.AND);
|
|
228000
|
-
function
|
|
228255
|
+
function and22(...args) {
|
|
228001
228256
|
return args.reduce(andCode);
|
|
228002
228257
|
}
|
|
228003
|
-
exports.and =
|
|
228258
|
+
exports.and = and22;
|
|
228004
228259
|
var orCode = mappend(exports.operators.OR);
|
|
228005
228260
|
function or(...args) {
|
|
228006
228261
|
return args.reduce(orCode);
|
|
@@ -229161,20 +229416,20 @@ var require_resolve2 = __commonJS({
|
|
|
229161
229416
|
return false;
|
|
229162
229417
|
}
|
|
229163
229418
|
function countKeys(schema) {
|
|
229164
|
-
let
|
|
229419
|
+
let count18 = 0;
|
|
229165
229420
|
for (const key in schema) {
|
|
229166
229421
|
if (key === "$ref")
|
|
229167
229422
|
return Infinity;
|
|
229168
|
-
|
|
229423
|
+
count18++;
|
|
229169
229424
|
if (SIMPLE_INLINED.has(key))
|
|
229170
229425
|
continue;
|
|
229171
229426
|
if (typeof schema[key] == "object") {
|
|
229172
|
-
(0, util_1.eachItem)(schema[key], (sch) =>
|
|
229427
|
+
(0, util_1.eachItem)(schema[key], (sch) => count18 += countKeys(sch));
|
|
229173
229428
|
}
|
|
229174
|
-
if (
|
|
229429
|
+
if (count18 === Infinity)
|
|
229175
229430
|
return Infinity;
|
|
229176
229431
|
}
|
|
229177
|
-
return
|
|
229432
|
+
return count18;
|
|
229178
229433
|
}
|
|
229179
229434
|
function getFullPath(resolver, id = "", normalize) {
|
|
229180
229435
|
if (normalize !== false)
|
|
@@ -231318,13 +231573,13 @@ var require_core = __commonJS({
|
|
|
231318
231573
|
}, warn() {
|
|
231319
231574
|
}, error() {
|
|
231320
231575
|
} };
|
|
231321
|
-
function getLogger2(
|
|
231322
|
-
if (
|
|
231576
|
+
function getLogger2(logger16) {
|
|
231577
|
+
if (logger16 === false)
|
|
231323
231578
|
return noLogs;
|
|
231324
|
-
if (
|
|
231579
|
+
if (logger16 === void 0)
|
|
231325
231580
|
return console;
|
|
231326
|
-
if (
|
|
231327
|
-
return
|
|
231581
|
+
if (logger16.log && logger16.warn && logger16.error)
|
|
231582
|
+
return logger16;
|
|
231328
231583
|
throw new Error("logger must implement log, warn and error methods");
|
|
231329
231584
|
}
|
|
231330
231585
|
var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;
|
|
@@ -232280,8 +232535,8 @@ var require_contains2 = __commonJS({
|
|
|
232280
232535
|
cxt.result(valid, () => cxt.reset());
|
|
232281
232536
|
function validateItemsWithCount() {
|
|
232282
232537
|
const schValid = gen.name("_valid");
|
|
232283
|
-
const
|
|
232284
|
-
validateItems(schValid, () => gen.if(schValid, () => checkLimits(
|
|
232538
|
+
const count18 = gen.let("count", 0);
|
|
232539
|
+
validateItems(schValid, () => gen.if(schValid, () => checkLimits(count18)));
|
|
232285
232540
|
}
|
|
232286
232541
|
function validateItems(_valid, block) {
|
|
232287
232542
|
gen.forRange("i", 0, len, (i2) => {
|
|
@@ -232294,16 +232549,16 @@ var require_contains2 = __commonJS({
|
|
|
232294
232549
|
block();
|
|
232295
232550
|
});
|
|
232296
232551
|
}
|
|
232297
|
-
function checkLimits(
|
|
232298
|
-
gen.code((0, codegen_1._)`${
|
|
232552
|
+
function checkLimits(count18) {
|
|
232553
|
+
gen.code((0, codegen_1._)`${count18}++`);
|
|
232299
232554
|
if (max === void 0) {
|
|
232300
|
-
gen.if((0, codegen_1._)`${
|
|
232555
|
+
gen.if((0, codegen_1._)`${count18} >= ${min}`, () => gen.assign(valid, true).break());
|
|
232301
232556
|
} else {
|
|
232302
|
-
gen.if((0, codegen_1._)`${
|
|
232557
|
+
gen.if((0, codegen_1._)`${count18} > ${max}`, () => gen.assign(valid, false).break());
|
|
232303
232558
|
if (min === 1)
|
|
232304
232559
|
gen.assign(valid, true);
|
|
232305
232560
|
else
|
|
232306
|
-
gen.if((0, codegen_1._)`${
|
|
232561
|
+
gen.if((0, codegen_1._)`${count18} >= ${min}`, () => gen.assign(valid, true));
|
|
232307
232562
|
}
|
|
232308
232563
|
}
|
|
232309
232564
|
}
|
|
@@ -233488,28 +233743,6 @@ var init_artifactComponents = __esm({
|
|
|
233488
233743
|
}
|
|
233489
233744
|
});
|
|
233490
233745
|
|
|
233491
|
-
// ../packages/agents-core/src/data-access/contextCache.ts
|
|
233492
|
-
import { and as and13, eq as eq13 } from "drizzle-orm";
|
|
233493
|
-
var init_contextCache = __esm({
|
|
233494
|
-
"../packages/agents-core/src/data-access/contextCache.ts"() {
|
|
233495
|
-
"use strict";
|
|
233496
|
-
init_esm_shims();
|
|
233497
|
-
init_conversations();
|
|
233498
|
-
init_schema();
|
|
233499
|
-
}
|
|
233500
|
-
});
|
|
233501
|
-
|
|
233502
|
-
// ../packages/agents-core/src/data-access/conversations.ts
|
|
233503
|
-
import { and as and14, count as count12, desc as desc12, eq as eq14 } from "drizzle-orm";
|
|
233504
|
-
var init_conversations2 = __esm({
|
|
233505
|
-
"../packages/agents-core/src/data-access/conversations.ts"() {
|
|
233506
|
-
"use strict";
|
|
233507
|
-
init_esm_shims();
|
|
233508
|
-
init_schema();
|
|
233509
|
-
init_conversations();
|
|
233510
|
-
}
|
|
233511
|
-
});
|
|
233512
|
-
|
|
233513
233746
|
// ../packages/agents-core/src/validation/preview-validation.ts
|
|
233514
233747
|
var init_preview_validation = __esm({
|
|
233515
233748
|
"../packages/agents-core/src/validation/preview-validation.ts"() {
|
|
@@ -233519,7 +233752,7 @@ var init_preview_validation = __esm({
|
|
|
233519
233752
|
});
|
|
233520
233753
|
|
|
233521
233754
|
// ../packages/agents-core/src/data-access/dataComponents.ts
|
|
233522
|
-
import { and as
|
|
233755
|
+
import { and as and13, count as count12, desc as desc12, eq as eq13 } from "drizzle-orm";
|
|
233523
233756
|
var init_dataComponents = __esm({
|
|
233524
233757
|
"../packages/agents-core/src/data-access/dataComponents.ts"() {
|
|
233525
233758
|
"use strict";
|
|
@@ -233531,17 +233764,8 @@ var init_dataComponents = __esm({
|
|
|
233531
233764
|
}
|
|
233532
233765
|
});
|
|
233533
233766
|
|
|
233534
|
-
// ../packages/agents-core/src/validation/agentFull.ts
|
|
233535
|
-
var init_agentFull = __esm({
|
|
233536
|
-
"../packages/agents-core/src/validation/agentFull.ts"() {
|
|
233537
|
-
"use strict";
|
|
233538
|
-
init_esm_shims();
|
|
233539
|
-
init_schemas();
|
|
233540
|
-
}
|
|
233541
|
-
});
|
|
233542
|
-
|
|
233543
233767
|
// ../packages/agents-core/src/data-access/agentFull.ts
|
|
233544
|
-
import { and as
|
|
233768
|
+
import { and as and14, eq as eq14, inArray as inArray3, not } from "drizzle-orm";
|
|
233545
233769
|
var init_agentFull2 = __esm({
|
|
233546
233770
|
"../packages/agents-core/src/data-access/agentFull.ts"() {
|
|
233547
233771
|
"use strict";
|
|
@@ -233558,12 +233782,46 @@ var init_agentFull2 = __esm({
|
|
|
233558
233782
|
init_subAgentExternalAgentRelations();
|
|
233559
233783
|
init_subAgentRelations();
|
|
233560
233784
|
init_subAgents();
|
|
233785
|
+
init_subAgentTeamAgentRelations();
|
|
233561
233786
|
init_tools();
|
|
233562
233787
|
}
|
|
233563
233788
|
});
|
|
233564
233789
|
|
|
233790
|
+
// ../packages/agents-core/src/data-access/apiKeys.ts
|
|
233791
|
+
import { and as and15, count as count13, desc as desc13, eq as eq15 } from "drizzle-orm";
|
|
233792
|
+
var init_apiKeys2 = __esm({
|
|
233793
|
+
"../packages/agents-core/src/data-access/apiKeys.ts"() {
|
|
233794
|
+
"use strict";
|
|
233795
|
+
init_esm_shims();
|
|
233796
|
+
init_schema();
|
|
233797
|
+
init_apiKeys();
|
|
233798
|
+
}
|
|
233799
|
+
});
|
|
233800
|
+
|
|
233801
|
+
// ../packages/agents-core/src/data-access/contextCache.ts
|
|
233802
|
+
import { and as and16, eq as eq16 } from "drizzle-orm";
|
|
233803
|
+
var init_contextCache = __esm({
|
|
233804
|
+
"../packages/agents-core/src/data-access/contextCache.ts"() {
|
|
233805
|
+
"use strict";
|
|
233806
|
+
init_esm_shims();
|
|
233807
|
+
init_conversations();
|
|
233808
|
+
init_schema();
|
|
233809
|
+
}
|
|
233810
|
+
});
|
|
233811
|
+
|
|
233812
|
+
// ../packages/agents-core/src/data-access/conversations.ts
|
|
233813
|
+
import { and as and17, count as count14, desc as desc14, eq as eq17 } from "drizzle-orm";
|
|
233814
|
+
var init_conversations2 = __esm({
|
|
233815
|
+
"../packages/agents-core/src/data-access/conversations.ts"() {
|
|
233816
|
+
"use strict";
|
|
233817
|
+
init_esm_shims();
|
|
233818
|
+
init_schema();
|
|
233819
|
+
init_conversations();
|
|
233820
|
+
}
|
|
233821
|
+
});
|
|
233822
|
+
|
|
233565
233823
|
// ../packages/agents-core/src/data-access/ledgerArtifacts.ts
|
|
233566
|
-
import { and as
|
|
233824
|
+
import { and as and18, count as count15, eq as eq18 } from "drizzle-orm";
|
|
233567
233825
|
var init_ledgerArtifacts = __esm({
|
|
233568
233826
|
"../packages/agents-core/src/data-access/ledgerArtifacts.ts"() {
|
|
233569
233827
|
"use strict";
|
|
@@ -233574,7 +233832,7 @@ var init_ledgerArtifacts = __esm({
|
|
|
233574
233832
|
});
|
|
233575
233833
|
|
|
233576
233834
|
// ../packages/agents-core/src/data-access/messages.ts
|
|
233577
|
-
import { and as
|
|
233835
|
+
import { and as and19, asc as asc2, count as count16, desc as desc15, eq as eq19, inArray as inArray4 } from "drizzle-orm";
|
|
233578
233836
|
var init_messages = __esm({
|
|
233579
233837
|
"../packages/agents-core/src/data-access/messages.ts"() {
|
|
233580
233838
|
"use strict";
|
|
@@ -233584,7 +233842,7 @@ var init_messages = __esm({
|
|
|
233584
233842
|
});
|
|
233585
233843
|
|
|
233586
233844
|
// ../packages/agents-core/src/data-access/projects.ts
|
|
233587
|
-
import { and as
|
|
233845
|
+
import { and as and20, count as count17, desc as desc16, eq as eq20 } from "drizzle-orm";
|
|
233588
233846
|
var init_projects = __esm({
|
|
233589
233847
|
"../packages/agents-core/src/data-access/projects.ts"() {
|
|
233590
233848
|
"use strict";
|
|
@@ -233614,7 +233872,7 @@ var init_projectFull = __esm({
|
|
|
233614
233872
|
});
|
|
233615
233873
|
|
|
233616
233874
|
// ../packages/agents-core/src/data-access/tasks.ts
|
|
233617
|
-
import { and as
|
|
233875
|
+
import { and as and21, eq as eq21 } from "drizzle-orm";
|
|
233618
233876
|
var init_tasks = __esm({
|
|
233619
233877
|
"../packages/agents-core/src/data-access/tasks.ts"() {
|
|
233620
233878
|
"use strict";
|
|
@@ -233638,6 +233896,7 @@ var init_data_access = __esm({
|
|
|
233638
233896
|
"use strict";
|
|
233639
233897
|
init_esm_shims();
|
|
233640
233898
|
init_client();
|
|
233899
|
+
init_agentFull2();
|
|
233641
233900
|
init_agents();
|
|
233642
233901
|
init_apiKeys2();
|
|
233643
233902
|
init_artifactComponents();
|
|
@@ -233649,7 +233908,6 @@ var init_data_access = __esm({
|
|
|
233649
233908
|
init_externalAgents();
|
|
233650
233909
|
init_functions();
|
|
233651
233910
|
init_functionTools();
|
|
233652
|
-
init_agentFull2();
|
|
233653
233911
|
init_ledgerArtifacts();
|
|
233654
233912
|
init_messages();
|
|
233655
233913
|
init_projectFull();
|
|
@@ -233657,6 +233915,7 @@ var init_data_access = __esm({
|
|
|
233657
233915
|
init_subAgentExternalAgentRelations();
|
|
233658
233916
|
init_subAgentRelations();
|
|
233659
233917
|
init_subAgents();
|
|
233918
|
+
init_subAgentTeamAgentRelations();
|
|
233660
233919
|
init_tasks();
|
|
233661
233920
|
init_tools();
|
|
233662
233921
|
init_validation();
|
|
@@ -233676,7 +233935,7 @@ var init_tracer = __esm({
|
|
|
233676
233935
|
});
|
|
233677
233936
|
|
|
233678
233937
|
// ../packages/agents-core/src/context/contextCache.ts
|
|
233679
|
-
var
|
|
233938
|
+
var logger9;
|
|
233680
233939
|
var init_contextCache2 = __esm({
|
|
233681
233940
|
"../packages/agents-core/src/context/contextCache.ts"() {
|
|
233682
233941
|
"use strict";
|
|
@@ -233684,13 +233943,13 @@ var init_contextCache2 = __esm({
|
|
|
233684
233943
|
init_data_access();
|
|
233685
233944
|
init_conversations();
|
|
233686
233945
|
init_logger();
|
|
233687
|
-
|
|
233946
|
+
logger9 = getLogger("context-cache");
|
|
233688
233947
|
}
|
|
233689
233948
|
});
|
|
233690
233949
|
|
|
233691
233950
|
// ../packages/agents-core/src/context/ContextResolver.ts
|
|
233692
233951
|
import crypto4 from "crypto";
|
|
233693
|
-
var
|
|
233952
|
+
var logger10;
|
|
233694
233953
|
var init_ContextResolver = __esm({
|
|
233695
233954
|
"../packages/agents-core/src/context/ContextResolver.ts"() {
|
|
233696
233955
|
"use strict";
|
|
@@ -233699,12 +233958,12 @@ var init_ContextResolver = __esm({
|
|
|
233699
233958
|
init_tracer();
|
|
233700
233959
|
init_ContextFetcher();
|
|
233701
233960
|
init_contextCache2();
|
|
233702
|
-
|
|
233961
|
+
logger10 = getLogger("context-resolver");
|
|
233703
233962
|
}
|
|
233704
233963
|
});
|
|
233705
233964
|
|
|
233706
233965
|
// ../packages/agents-core/src/middleware/contextValidation.ts
|
|
233707
|
-
var import_ajv3,
|
|
233966
|
+
var import_ajv3, logger11, ajv;
|
|
233708
233967
|
var init_contextValidation = __esm({
|
|
233709
233968
|
"../packages/agents-core/src/middleware/contextValidation.ts"() {
|
|
233710
233969
|
"use strict";
|
|
@@ -233716,7 +233975,7 @@ var init_contextValidation = __esm({
|
|
|
233716
233975
|
init_error();
|
|
233717
233976
|
init_execution();
|
|
233718
233977
|
init_logger();
|
|
233719
|
-
|
|
233978
|
+
logger11 = getLogger("context-validation");
|
|
233720
233979
|
ajv = new import_ajv3.default({ allErrors: true, strict: false });
|
|
233721
233980
|
}
|
|
233722
233981
|
});
|
|
@@ -233731,7 +233990,7 @@ var init_middleware = __esm({
|
|
|
233731
233990
|
});
|
|
233732
233991
|
|
|
233733
233992
|
// ../packages/agents-core/src/context/ContextFetcher.ts
|
|
233734
|
-
var import_jmespath2,
|
|
233993
|
+
var import_jmespath2, logger12;
|
|
233735
233994
|
var init_ContextFetcher = __esm({
|
|
233736
233995
|
"../packages/agents-core/src/context/ContextFetcher.ts"() {
|
|
233737
233996
|
"use strict";
|
|
@@ -233742,12 +234001,12 @@ var init_ContextFetcher = __esm({
|
|
|
233742
234001
|
init_middleware();
|
|
233743
234002
|
init_logger();
|
|
233744
234003
|
init_TemplateEngine();
|
|
233745
|
-
|
|
234004
|
+
logger12 = getLogger("context-fetcher");
|
|
233746
234005
|
}
|
|
233747
234006
|
});
|
|
233748
234007
|
|
|
233749
234008
|
// ../packages/agents-core/src/context/context.ts
|
|
233750
|
-
var
|
|
234009
|
+
var logger13;
|
|
233751
234010
|
var init_context4 = __esm({
|
|
233752
234011
|
"../packages/agents-core/src/context/context.ts"() {
|
|
233753
234012
|
"use strict";
|
|
@@ -233756,7 +234015,7 @@ var init_context4 = __esm({
|
|
|
233756
234015
|
init_utils();
|
|
233757
234016
|
init_tracer();
|
|
233758
234017
|
init_ContextResolver();
|
|
233759
|
-
|
|
234018
|
+
logger13 = getLogger("context");
|
|
233760
234019
|
}
|
|
233761
234020
|
});
|
|
233762
234021
|
|
|
@@ -233848,8 +234107,8 @@ var init_dist6 = __esm({
|
|
|
233848
234107
|
});
|
|
233849
234108
|
|
|
233850
234109
|
// ../packages/agents-core/src/credential-stores/nango-store.ts
|
|
233851
|
-
import { z as
|
|
233852
|
-
var
|
|
234110
|
+
import { z as z10 } from "zod";
|
|
234111
|
+
var logger14, CredentialKeySchema;
|
|
233853
234112
|
var init_nango_store = __esm({
|
|
233854
234113
|
"../packages/agents-core/src/credential-stores/nango-store.ts"() {
|
|
233855
234114
|
"use strict";
|
|
@@ -233857,10 +234116,10 @@ var init_nango_store = __esm({
|
|
|
233857
234116
|
init_dist6();
|
|
233858
234117
|
init_types();
|
|
233859
234118
|
init_logger();
|
|
233860
|
-
|
|
233861
|
-
CredentialKeySchema =
|
|
233862
|
-
connectionId:
|
|
233863
|
-
providerConfigKey:
|
|
234119
|
+
logger14 = getLogger("nango-credential-store");
|
|
234120
|
+
CredentialKeySchema = z10.object({
|
|
234121
|
+
connectionId: z10.string().min(1, "connectionId must be a non-empty string"),
|
|
234122
|
+
providerConfigKey: z10.string().min(1, "providerConfigKey must be a non-empty string")
|
|
233864
234123
|
});
|
|
233865
234124
|
}
|
|
233866
234125
|
});
|
|
@@ -233889,143 +234148,6 @@ var init_credential_stores = __esm({
|
|
|
233889
234148
|
}
|
|
233890
234149
|
});
|
|
233891
234150
|
|
|
233892
|
-
// ../node_modules/.pnpm/dotenv-expand@12.0.3/node_modules/dotenv-expand/lib/main.js
|
|
233893
|
-
var require_main = __commonJS({
|
|
233894
|
-
"../node_modules/.pnpm/dotenv-expand@12.0.3/node_modules/dotenv-expand/lib/main.js"(exports, module) {
|
|
233895
|
-
"use strict";
|
|
233896
|
-
init_esm_shims();
|
|
233897
|
-
function _resolveEscapeSequences(value) {
|
|
233898
|
-
return value.replace(/\\\$/g, "$");
|
|
233899
|
-
}
|
|
233900
|
-
function expandValue(value, processEnv, runningParsed) {
|
|
233901
|
-
const env3 = { ...runningParsed, ...processEnv };
|
|
233902
|
-
const regex = /(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g;
|
|
233903
|
-
let result = value;
|
|
233904
|
-
let match2;
|
|
233905
|
-
const seen = /* @__PURE__ */ new Set();
|
|
233906
|
-
while ((match2 = regex.exec(result)) !== null) {
|
|
233907
|
-
seen.add(result);
|
|
233908
|
-
const [template, bracedExpression, unbracedExpression] = match2;
|
|
233909
|
-
const expression = bracedExpression || unbracedExpression;
|
|
233910
|
-
const opRegex = /(:\+|\+|:-|-)/;
|
|
233911
|
-
const opMatch = expression.match(opRegex);
|
|
233912
|
-
const splitter = opMatch ? opMatch[0] : null;
|
|
233913
|
-
const r2 = expression.split(splitter);
|
|
233914
|
-
let defaultValue;
|
|
233915
|
-
let value2;
|
|
233916
|
-
const key = r2.shift();
|
|
233917
|
-
if ([":+", "+"].includes(splitter)) {
|
|
233918
|
-
defaultValue = env3[key] ? r2.join(splitter) : "";
|
|
233919
|
-
value2 = null;
|
|
233920
|
-
} else {
|
|
233921
|
-
defaultValue = r2.join(splitter);
|
|
233922
|
-
value2 = env3[key];
|
|
233923
|
-
}
|
|
233924
|
-
if (value2) {
|
|
233925
|
-
if (seen.has(value2)) {
|
|
233926
|
-
result = result.replace(template, defaultValue);
|
|
233927
|
-
} else {
|
|
233928
|
-
result = result.replace(template, value2);
|
|
233929
|
-
}
|
|
233930
|
-
} else {
|
|
233931
|
-
result = result.replace(template, defaultValue);
|
|
233932
|
-
}
|
|
233933
|
-
if (result === runningParsed[key]) {
|
|
233934
|
-
break;
|
|
233935
|
-
}
|
|
233936
|
-
regex.lastIndex = 0;
|
|
233937
|
-
}
|
|
233938
|
-
return result;
|
|
233939
|
-
}
|
|
233940
|
-
function expand2(options) {
|
|
233941
|
-
const runningParsed = {};
|
|
233942
|
-
let processEnv = process.env;
|
|
233943
|
-
if (options && options.processEnv != null) {
|
|
233944
|
-
processEnv = options.processEnv;
|
|
233945
|
-
}
|
|
233946
|
-
for (const key in options.parsed) {
|
|
233947
|
-
let value = options.parsed[key];
|
|
233948
|
-
if (processEnv[key] && processEnv[key] !== value) {
|
|
233949
|
-
value = processEnv[key];
|
|
233950
|
-
} else {
|
|
233951
|
-
value = expandValue(value, processEnv, runningParsed);
|
|
233952
|
-
}
|
|
233953
|
-
options.parsed[key] = _resolveEscapeSequences(value);
|
|
233954
|
-
runningParsed[key] = _resolveEscapeSequences(value);
|
|
233955
|
-
}
|
|
233956
|
-
for (const processKey in options.parsed) {
|
|
233957
|
-
processEnv[processKey] = options.parsed[processKey];
|
|
233958
|
-
}
|
|
233959
|
-
return options;
|
|
233960
|
-
}
|
|
233961
|
-
module.exports.expand = expand2;
|
|
233962
|
-
}
|
|
233963
|
-
});
|
|
233964
|
-
|
|
233965
|
-
// ../packages/agents-core/src/env.ts
|
|
233966
|
-
import fs from "fs";
|
|
233967
|
-
import os from "os";
|
|
233968
|
-
import path2 from "path";
|
|
233969
|
-
import dotenv from "dotenv";
|
|
233970
|
-
import { findUpSync } from "find-up";
|
|
233971
|
-
import { z as z10 } from "zod";
|
|
233972
|
-
var import_dotenv_expand, loadEnvironmentFiles, envSchema, parseEnv, env;
|
|
233973
|
-
var init_env = __esm({
|
|
233974
|
-
"../packages/agents-core/src/env.ts"() {
|
|
233975
|
-
"use strict";
|
|
233976
|
-
init_esm_shims();
|
|
233977
|
-
import_dotenv_expand = __toESM(require_main(), 1);
|
|
233978
|
-
loadEnvironmentFiles = () => {
|
|
233979
|
-
const environmentFiles = [];
|
|
233980
|
-
const currentEnv = path2.resolve(process.cwd(), ".env");
|
|
233981
|
-
if (fs.existsSync(currentEnv)) {
|
|
233982
|
-
environmentFiles.push(currentEnv);
|
|
233983
|
-
}
|
|
233984
|
-
const rootEnv = findUpSync(".env", { cwd: path2.dirname(process.cwd()) });
|
|
233985
|
-
if (rootEnv) {
|
|
233986
|
-
if (rootEnv !== currentEnv) {
|
|
233987
|
-
environmentFiles.push(rootEnv);
|
|
233988
|
-
}
|
|
233989
|
-
}
|
|
233990
|
-
const userConfigPath = path2.join(os.homedir(), ".inkeep", "config");
|
|
233991
|
-
if (fs.existsSync(userConfigPath)) {
|
|
233992
|
-
dotenv.config({ path: userConfigPath, override: true, quiet: true });
|
|
233993
|
-
}
|
|
233994
|
-
if (environmentFiles.length > 0) {
|
|
233995
|
-
dotenv.config({
|
|
233996
|
-
path: environmentFiles,
|
|
233997
|
-
override: false,
|
|
233998
|
-
quiet: true
|
|
233999
|
-
});
|
|
234000
|
-
(0, import_dotenv_expand.expand)({ processEnv: process.env });
|
|
234001
|
-
}
|
|
234002
|
-
};
|
|
234003
|
-
loadEnvironmentFiles();
|
|
234004
|
-
envSchema = z10.object({
|
|
234005
|
-
ENVIRONMENT: z10.enum(["development", "production", "pentest", "test"]).optional(),
|
|
234006
|
-
DB_FILE_NAME: z10.string().optional(),
|
|
234007
|
-
TURSO_DATABASE_URL: z10.string().optional(),
|
|
234008
|
-
TURSO_AUTH_TOKEN: z10.string().optional()
|
|
234009
|
-
});
|
|
234010
|
-
parseEnv = () => {
|
|
234011
|
-
try {
|
|
234012
|
-
const parsedEnv = envSchema.parse(process.env);
|
|
234013
|
-
return parsedEnv;
|
|
234014
|
-
} catch (error) {
|
|
234015
|
-
if (error instanceof z10.ZodError) {
|
|
234016
|
-
const missingVars = error.issues.map((issue) => issue.path.join("."));
|
|
234017
|
-
throw new Error(
|
|
234018
|
-
`\u274C Invalid environment variables: ${missingVars.join(", ")}
|
|
234019
|
-
${error.message}`
|
|
234020
|
-
);
|
|
234021
|
-
}
|
|
234022
|
-
throw error;
|
|
234023
|
-
}
|
|
234024
|
-
};
|
|
234025
|
-
env = parseEnv();
|
|
234026
|
-
}
|
|
234027
|
-
});
|
|
234028
|
-
|
|
234029
234151
|
// ../packages/agents-core/src/validation/event-schemas.ts
|
|
234030
234152
|
import { z as z11 } from "zod";
|
|
234031
234153
|
var TransferDataSchema, DelegationSentDataSchema, DelegationReturnedDataSchema, DataOperationDetailsSchema, DataOperationEventSchema, A2AMessageMetadataSchema;
|
|
@@ -234303,7 +234425,7 @@ function findConfigFile(startPath = process.cwd()) {
|
|
|
234303
234425
|
return null;
|
|
234304
234426
|
}
|
|
234305
234427
|
async function loadConfigFromFile(configPath) {
|
|
234306
|
-
|
|
234428
|
+
logger15.info({ fromPath: configPath }, `Loading config file`);
|
|
234307
234429
|
let resolvedPath;
|
|
234308
234430
|
if (configPath) {
|
|
234309
234431
|
resolvedPath = resolve2(process.cwd(), configPath);
|
|
@@ -234323,7 +234445,7 @@ async function loadConfigFromFile(configPath) {
|
|
|
234323
234445
|
throw new Error(`No config exported from ${resolvedPath}`);
|
|
234324
234446
|
}
|
|
234325
234447
|
const config = normalizeConfig(rawConfig);
|
|
234326
|
-
|
|
234448
|
+
logger15.info({ config: maskSensitiveConfig(config) }, `Loaded config values`);
|
|
234327
234449
|
return config;
|
|
234328
234450
|
} catch (error) {
|
|
234329
234451
|
console.warn(`Warning: Failed to load config file ${resolvedPath}:`, error);
|
|
@@ -234344,9 +234466,9 @@ async function loadConfig(configPath) {
|
|
|
234344
234466
|
config[key] = value;
|
|
234345
234467
|
}
|
|
234346
234468
|
});
|
|
234347
|
-
|
|
234469
|
+
logger15.info({ mergedConfig: maskSensitiveConfig(config) }, `Config loaded from file`);
|
|
234348
234470
|
} else {
|
|
234349
|
-
|
|
234471
|
+
logger15.info(
|
|
234350
234472
|
{ config: maskSensitiveConfig(config) },
|
|
234351
234473
|
`Using default config (no config file found)`
|
|
234352
234474
|
);
|
|
@@ -234398,14 +234520,14 @@ Please add agentsRunApiUrl to your configuration file`
|
|
|
234398
234520
|
sources
|
|
234399
234521
|
};
|
|
234400
234522
|
}
|
|
234401
|
-
var
|
|
234523
|
+
var logger15;
|
|
234402
234524
|
var init_config = __esm({
|
|
234403
234525
|
"src/utils/config.ts"() {
|
|
234404
234526
|
"use strict";
|
|
234405
234527
|
init_esm_shims();
|
|
234406
234528
|
init_src();
|
|
234407
234529
|
init_tsx_loader();
|
|
234408
|
-
|
|
234530
|
+
logger15 = getLogger("config");
|
|
234409
234531
|
}
|
|
234410
234532
|
});
|
|
234411
234533
|
|
|
@@ -237061,9 +237183,9 @@ function mostCommon(arr) {
|
|
|
237061
237183
|
}
|
|
237062
237184
|
let maxCount = 0;
|
|
237063
237185
|
let mostCommonItem = null;
|
|
237064
|
-
for (const [item,
|
|
237065
|
-
if (
|
|
237066
|
-
maxCount =
|
|
237186
|
+
for (const [item, count18] of counts.entries()) {
|
|
237187
|
+
if (count18 > maxCount) {
|
|
237188
|
+
maxCount = count18;
|
|
237067
237189
|
mostCommonItem = item;
|
|
237068
237190
|
}
|
|
237069
237191
|
}
|
|
@@ -240114,7 +240236,7 @@ async function pullProjectCommand(options) {
|
|
|
240114
240236
|
for (const usage of usageInfo) {
|
|
240115
240237
|
usageByType[usage.type] = (usageByType[usage.type] || 0) + 1;
|
|
240116
240238
|
}
|
|
240117
|
-
const usageSummary = Object.entries(usageByType).map(([type,
|
|
240239
|
+
const usageSummary = Object.entries(usageByType).map(([type, count18]) => `${count18} ${type}${count18 > 1 ? "s" : ""}`).join(", ");
|
|
240118
240240
|
console.log(chalk9.gray(` Used by: ${usageSummary}`));
|
|
240119
240241
|
}
|
|
240120
240242
|
}
|
|
@@ -240554,7 +240676,7 @@ async function pushCommand(options) {
|
|
|
240554
240676
|
for (const usage of usageInfo) {
|
|
240555
240677
|
usageByType[usage.type] = (usageByType[usage.type] || 0) + 1;
|
|
240556
240678
|
}
|
|
240557
|
-
const usageSummary = Object.entries(usageByType).map(([type,
|
|
240679
|
+
const usageSummary = Object.entries(usageByType).map(([type, count18]) => `${count18} ${type}${count18 > 1 ? "s" : ""}`).join(", ");
|
|
240558
240680
|
console.log(chalk10.gray(` Used by: ${usageSummary}`));
|
|
240559
240681
|
}
|
|
240560
240682
|
}
|