@agentyx/core 0.7.0 → 0.8.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.d.mts +126 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +260 -25
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
- package/schema/agentyx.schema.json +187 -0
- package/templates/project-context.md +9 -0
package/dist/index.d.mts
CHANGED
|
@@ -50,6 +50,11 @@ declare class LocalSkillDirectoryError extends AgentyxError {
|
|
|
50
50
|
readonly directory: string;
|
|
51
51
|
constructor(directory: string, reason: string, options?: ErrorOptions);
|
|
52
52
|
}
|
|
53
|
+
/** Raised when a configured project-context path is missing or escapes the project. */
|
|
54
|
+
declare class ProjectContextPathError extends AgentyxError {
|
|
55
|
+
readonly path: string;
|
|
56
|
+
constructor(path: string, reason: string, options?: ErrorOptions);
|
|
57
|
+
}
|
|
53
58
|
//#endregion
|
|
54
59
|
//#region src/config/json-schema.d.ts
|
|
55
60
|
/** Canonical identifier of the published `.agentyx.json` schema. */
|
|
@@ -77,6 +82,48 @@ declare const enabledCapabilityNameSchema: z.ZodString;
|
|
|
77
82
|
* every supported platform.
|
|
78
83
|
*/
|
|
79
84
|
declare const skillDirectorySchema: z.ZodString;
|
|
85
|
+
declare const projectMetadataSchema: z.ZodObject<{
|
|
86
|
+
id: z.ZodString;
|
|
87
|
+
name: z.ZodString;
|
|
88
|
+
description: z.ZodOptional<z.ZodString>;
|
|
89
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
90
|
+
docs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
91
|
+
mcp: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
92
|
+
owns: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
93
|
+
}, z.core.$strict>;
|
|
94
|
+
declare const projectRelationTypeSchema: z.ZodEnum<{
|
|
95
|
+
uses: "uses";
|
|
96
|
+
integrates: "integrates";
|
|
97
|
+
consumes: "consumes";
|
|
98
|
+
extends: "extends";
|
|
99
|
+
}>;
|
|
100
|
+
declare const projectRelationSchema: z.ZodObject<{
|
|
101
|
+
id: z.ZodString;
|
|
102
|
+
name: z.ZodString;
|
|
103
|
+
type: z.ZodEnum<{
|
|
104
|
+
uses: "uses";
|
|
105
|
+
integrates: "integrates";
|
|
106
|
+
consumes: "consumes";
|
|
107
|
+
extends: "extends";
|
|
108
|
+
}>;
|
|
109
|
+
role: z.ZodString;
|
|
110
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
111
|
+
docs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
112
|
+
mcp: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
113
|
+
owns: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
114
|
+
guidance: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
115
|
+
}, z.core.$strict>;
|
|
116
|
+
declare const projectContextSchema: z.ZodObject<{
|
|
117
|
+
commands: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
118
|
+
command: z.ZodString;
|
|
119
|
+
cwd: z.ZodDefault<z.ZodString>;
|
|
120
|
+
}, z.core.$strict>>>;
|
|
121
|
+
areas: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
122
|
+
path: z.ZodString;
|
|
123
|
+
purpose: z.ZodString;
|
|
124
|
+
}, z.core.$strict>>>;
|
|
125
|
+
constraints: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
126
|
+
}, z.core.$strict>;
|
|
80
127
|
/** The `.agentyx.json` project configuration. */
|
|
81
128
|
declare const agentyxConfigSchema: z.ZodObject<{
|
|
82
129
|
$schema: z.ZodOptional<z.ZodString>;
|
|
@@ -158,11 +205,50 @@ declare const agentyxConfigSchema: z.ZodObject<{
|
|
|
158
205
|
path: z.ZodString;
|
|
159
206
|
ref: z.ZodString;
|
|
160
207
|
}, z.core.$strict>>>;
|
|
208
|
+
project: z.ZodOptional<z.ZodObject<{
|
|
209
|
+
id: z.ZodString;
|
|
210
|
+
name: z.ZodString;
|
|
211
|
+
description: z.ZodOptional<z.ZodString>;
|
|
212
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
213
|
+
docs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
214
|
+
mcp: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
215
|
+
owns: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
216
|
+
}, z.core.$strict>>;
|
|
217
|
+
relations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
218
|
+
id: z.ZodString;
|
|
219
|
+
name: z.ZodString;
|
|
220
|
+
type: z.ZodEnum<{
|
|
221
|
+
uses: "uses";
|
|
222
|
+
integrates: "integrates";
|
|
223
|
+
consumes: "consumes";
|
|
224
|
+
extends: "extends";
|
|
225
|
+
}>;
|
|
226
|
+
role: z.ZodString;
|
|
227
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
228
|
+
docs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
229
|
+
mcp: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
230
|
+
owns: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
231
|
+
guidance: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
232
|
+
}, z.core.$strict>>>;
|
|
233
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
234
|
+
commands: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
235
|
+
command: z.ZodString;
|
|
236
|
+
cwd: z.ZodDefault<z.ZodString>;
|
|
237
|
+
}, z.core.$strict>>>;
|
|
238
|
+
areas: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
239
|
+
path: z.ZodString;
|
|
240
|
+
purpose: z.ZodString;
|
|
241
|
+
}, z.core.$strict>>>;
|
|
242
|
+
constraints: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
243
|
+
}, z.core.$strict>>;
|
|
161
244
|
}, z.core.$strict>;
|
|
162
245
|
/** A validated configuration, with defaults applied. */
|
|
163
246
|
type AgentyxConfig = z.infer<typeof agentyxConfigSchema>;
|
|
164
247
|
/** The shape accepted in a `.agentyx.json` file. */
|
|
165
248
|
type AgentyxConfigInput = z.input<typeof agentyxConfigSchema>;
|
|
249
|
+
type ProjectMetadata = z.infer<typeof projectMetadataSchema>;
|
|
250
|
+
type ProjectRelation = z.infer<typeof projectRelationSchema>;
|
|
251
|
+
type ProjectContext = z.infer<typeof projectContextSchema>;
|
|
166
252
|
//#endregion
|
|
167
253
|
//#region src/config/loader.d.ts
|
|
168
254
|
declare const AGENTYX_CONFIG_FILENAME = ".agentyx.json";
|
|
@@ -186,6 +272,43 @@ declare function parseAgentyxConfig(value: unknown, filePath?: string): AgentyxC
|
|
|
186
272
|
*/
|
|
187
273
|
declare function loadAgentyxConfig(projectPath?: string): Promise<AgentyxConfig>;
|
|
188
274
|
//#endregion
|
|
275
|
+
//#region src/project-graph.d.ts
|
|
276
|
+
declare class ProjectGraphNotConfiguredError extends AgentyxError {
|
|
277
|
+
constructor();
|
|
278
|
+
}
|
|
279
|
+
interface ProjectGraph {
|
|
280
|
+
readonly project: ProjectMetadata;
|
|
281
|
+
readonly relations: readonly ProjectRelation[];
|
|
282
|
+
}
|
|
283
|
+
declare function createProjectGraph(project: ProjectMetadata, relations: readonly ProjectRelation[]): ProjectGraph;
|
|
284
|
+
declare function renderProjectGraphText(graph: ProjectGraph): string;
|
|
285
|
+
declare function renderProjectGraphJson(graph: ProjectGraph): string;
|
|
286
|
+
declare function renderProjectGraphMermaid(graph: ProjectGraph): string;
|
|
287
|
+
declare function renderProjectGraphSvg(graph: ProjectGraph): string;
|
|
288
|
+
declare function findProjectCapabilityOwners(graph: ProjectGraph, capability: string): {
|
|
289
|
+
capability: string;
|
|
290
|
+
currentProject: {
|
|
291
|
+
id: string;
|
|
292
|
+
name: string;
|
|
293
|
+
docs: string[];
|
|
294
|
+
mcp: string[];
|
|
295
|
+
owns: string[];
|
|
296
|
+
description?: string | undefined;
|
|
297
|
+
repository?: string | undefined;
|
|
298
|
+
} | undefined;
|
|
299
|
+
relatedProjects: {
|
|
300
|
+
id: string;
|
|
301
|
+
name: string;
|
|
302
|
+
type: "uses" | "integrates" | "consumes" | "extends";
|
|
303
|
+
role: string;
|
|
304
|
+
docs: string[];
|
|
305
|
+
mcp: string[];
|
|
306
|
+
owns: string[];
|
|
307
|
+
guidance: string[];
|
|
308
|
+
repository?: string | undefined;
|
|
309
|
+
}[];
|
|
310
|
+
};
|
|
311
|
+
//#endregion
|
|
189
312
|
//#region src/pack/schema.d.ts
|
|
190
313
|
declare const PACK_CATEGORIES: readonly ["engineering", "language", "framework", "efficiency", "workflow"];
|
|
191
314
|
declare const packCategorySchema: z.ZodEnum<{
|
|
@@ -352,6 +475,7 @@ interface AgentyxProject {
|
|
|
352
475
|
readonly config: AgentyxConfig;
|
|
353
476
|
readonly packRegistry: PackRegistry;
|
|
354
477
|
readonly skillRegistry: SkillRegistry;
|
|
478
|
+
readonly graph: ProjectGraph | undefined;
|
|
355
479
|
}
|
|
356
480
|
/**
|
|
357
481
|
* Loads `.agentyx.json` and any checked-in Agent Skills it declares.
|
|
@@ -892,6 +1016,7 @@ interface ProjectPackageJsonDetection {
|
|
|
892
1016
|
readonly path: string;
|
|
893
1017
|
readonly name: string | undefined;
|
|
894
1018
|
readonly packageManager: string | undefined;
|
|
1019
|
+
readonly scripts: Readonly<Record<string, string>>;
|
|
895
1020
|
readonly error: string | undefined;
|
|
896
1021
|
}
|
|
897
1022
|
type DependencyField = "dependencies" | "devDependencies" | "peerDependencies" | "optionalDependencies";
|
|
@@ -1222,5 +1347,5 @@ declare function filterEffectiveTools(tools: readonly ToolReference[], enabledCa
|
|
|
1222
1347
|
declare function resolvePackToolReferences(requestedPacks: readonly string[], packRegistry?: PackRegistry, toolRegistry?: ToolRegistry): ToolReference[];
|
|
1223
1348
|
declare function resolvePackTools(requestedPacks: readonly string[], packRegistry?: PackRegistry, toolRegistry?: ToolRegistry, enabledCapabilities?: readonly string[]): string[];
|
|
1224
1349
|
//#endregion
|
|
1225
|
-
export { AGENTYX_CONFIG_FILENAME, AGENTYX_CONFIG_SCHEMA_ID, AGENTYX_MANIFEST_FILENAME, type AgentyxConfig, type AgentyxConfigInput, type AgentyxConfigIssue, AgentyxConfigNotFoundError, AgentyxConfigParseError, AgentyxConfigValidationError, AgentyxError, type AgentyxIssue, AgentyxManifestParseError, AgentyxManifestValidationError, type AgentyxProject, CODEBASE_MEMORY_FILE_THRESHOLD, CODEBASE_MEMORY_MONOREPO_FILE_THRESHOLD, type CiFileSignals, CircularPackDependencyError, type CodexPluginManifest, type ContainerFileSignals, type DependencyField, DuplicateHookError, DuplicateMcpServerError, DuplicatePackError, DuplicateSkillError, DuplicateToolError, DuplicateTrustedSourceError, HOOK_ACTIVATION_LEVELS, HOOK_EVENTS, type HookActivationLevel, type HookDefinition, type HookDefinitionInput, type HookEvent, type HookManifestEntry, type HookMetadata, type HookReference, type HookReferenceInput, type HookRegistry, type HookSource, INSTALL_MANIFEST_VERSION, type InstallManifest, type InstallManifestEntry, type InstallManifestInput, InvalidHookError, InvalidMcpServerError, InvalidSkillError, InvalidToolError, LocalSkillDirectoryError, MCP_CAPABILITY_LEVELS, MCP_CONTEXT_COSTS, type McpCapabilityLevel, type McpContextCost, type McpEnvReference, type McpManifestEntry, type McpServerDefinition, type McpServerDefinitionInput, type McpServerMetadata, type McpServerReference, type McpServerReferenceInput, type McpServerRegistry, type McpServerSource, type MonorepoSignal, PACKAGE_MANAGERS, PACK_CATEGORIES, type PackCategory, type PackDefinition, type PackDefinitionInput, type PackRegistry, type PackageManagerDetection, type PackageManagerName, type ProjectDetection, type ProjectPackageJsonDetection, type ProjectSignals, RECOMMENDATION_CONFIDENCES, REPOSITORY_SCAN_ENTRY_LIMIT, type Recommendation, type RecommendationConfidence, type RecommendationKind, type RecommendationResult, type RepositorySizeSignal, type ResolvedAgentyxConfig, type SkillDefinition, type SkillDefinitionInput, type SkillManifestEntry, type SkillRegistry, type SkillSource, TOOL_ACTIVATION_LEVELS, type TechnologyMatch, type ToolActivationLevel, type ToolDefinition, type ToolDefinitionInput, type ToolMetadata, type ToolReference, type ToolReferenceInput, type ToolRegistry, type ToolSource, type TrustedSourceDefinition, TrustedSourceLoadError, type TrustedSourceReference, type TrustedSourceSkillSummary, UnknownEnabledCapabilityError, UnknownHookError, UnknownMcpServerError, UnknownPackError, UnknownSkillError, UnknownToolError, UnknownTrustedSourceError, agentyxConfigPath, agentyxConfigSchema, agentyxCoreName, agentyxManifestPath, agentyxTargetSchema, buildAgentyxConfig, buildAgentyxConfigJsonSchema, builtInHookNames, builtInHookRegistry, builtInMcpServerNames, builtInMcpServerRegistry, builtInPackRegistry, builtInPacks, builtInSkillNames, builtInSkillRegistry, builtInToolNames, builtInToolRegistry, codexPluginManifestSchema, collectPackHookReferences, collectPackHooks, collectPackMcpServerReferences, collectPackMcpServers, collectPackToolReferences, collectProjectSignals, createHookRegistry, createMcpServerRegistry, createPackRegistry, createSkillRegistry, createToolRegistry, createTrustedSourceRegistry, detectProject, emptyInstallManifest, enabledCapabilityNameSchema, filterEffectiveHooks, filterEffectiveMcpServers, filterEffectiveTools, formatAgentyxConfig, formatInstallManifest, formatSkillMarkdown, getCoreStatus, getTrustedSourceDefinition, hashContent, hookActivationLevelSchema, hookDefinitionSchema, hookEventSchema, hookManifestEntrySchema, hookNameSchema, hookReferenceSchema, inspectTrustedSource, installManifestEntrySchema, installManifestSchema, isExecutableOnPath, knownTrustedSourceRegistry, knownTrustedSources, loadAgentyxConfig, loadAgentyxProject, loadInstallManifest, manifestEntriesByPath, mcpCapabilityLevelSchema, mcpContextCostSchema, mcpEnvReferenceSchema, mcpManifestEntrySchema, mcpServerDefinitionSchema, mcpServerReferenceSchema, packCategorySchema, packDefinitionSchema, packNameSchema, parseAgentyxConfig, parseInstallManifest, parseSkillMarkdown, recommendCapabilities, resolveAgentyxConfig, resolvePackHookReferences, resolvePackHooks, resolvePackMcpServerReferences, resolvePackMcpServers, resolvePackSkills, resolvePackToolReferences, resolvePackTools, resolvePacks, scanRepositorySize, skillDefinitionSchema, skillDirectorySchema, skillManifestEntrySchema, toolActivationLevelSchema, toolDefinitionSchema, toolNameSchema, toolReferenceSchema, trustedSourceDefinitionSchema, trustedSourceNameSchema, trustedSourcePathSchema, trustedSourceReferenceSchema, trustedSourceSkillSummarySchema };
|
|
1350
|
+
export { AGENTYX_CONFIG_FILENAME, AGENTYX_CONFIG_SCHEMA_ID, AGENTYX_MANIFEST_FILENAME, type AgentyxConfig, type AgentyxConfigInput, type AgentyxConfigIssue, AgentyxConfigNotFoundError, AgentyxConfigParseError, AgentyxConfigValidationError, AgentyxError, type AgentyxIssue, AgentyxManifestParseError, AgentyxManifestValidationError, type AgentyxProject, CODEBASE_MEMORY_FILE_THRESHOLD, CODEBASE_MEMORY_MONOREPO_FILE_THRESHOLD, type CiFileSignals, CircularPackDependencyError, type CodexPluginManifest, type ContainerFileSignals, type DependencyField, DuplicateHookError, DuplicateMcpServerError, DuplicatePackError, DuplicateSkillError, DuplicateToolError, DuplicateTrustedSourceError, HOOK_ACTIVATION_LEVELS, HOOK_EVENTS, type HookActivationLevel, type HookDefinition, type HookDefinitionInput, type HookEvent, type HookManifestEntry, type HookMetadata, type HookReference, type HookReferenceInput, type HookRegistry, type HookSource, INSTALL_MANIFEST_VERSION, type InstallManifest, type InstallManifestEntry, type InstallManifestInput, InvalidHookError, InvalidMcpServerError, InvalidSkillError, InvalidToolError, LocalSkillDirectoryError, MCP_CAPABILITY_LEVELS, MCP_CONTEXT_COSTS, type McpCapabilityLevel, type McpContextCost, type McpEnvReference, type McpManifestEntry, type McpServerDefinition, type McpServerDefinitionInput, type McpServerMetadata, type McpServerReference, type McpServerReferenceInput, type McpServerRegistry, type McpServerSource, type MonorepoSignal, PACKAGE_MANAGERS, PACK_CATEGORIES, type PackCategory, type PackDefinition, type PackDefinitionInput, type PackRegistry, type PackageManagerDetection, type PackageManagerName, type ProjectContext, ProjectContextPathError, type ProjectDetection, type ProjectGraph, ProjectGraphNotConfiguredError, type ProjectMetadata, type ProjectPackageJsonDetection, type ProjectRelation, type ProjectSignals, RECOMMENDATION_CONFIDENCES, REPOSITORY_SCAN_ENTRY_LIMIT, type Recommendation, type RecommendationConfidence, type RecommendationKind, type RecommendationResult, type RepositorySizeSignal, type ResolvedAgentyxConfig, type SkillDefinition, type SkillDefinitionInput, type SkillManifestEntry, type SkillRegistry, type SkillSource, TOOL_ACTIVATION_LEVELS, type TechnologyMatch, type ToolActivationLevel, type ToolDefinition, type ToolDefinitionInput, type ToolMetadata, type ToolReference, type ToolReferenceInput, type ToolRegistry, type ToolSource, type TrustedSourceDefinition, TrustedSourceLoadError, type TrustedSourceReference, type TrustedSourceSkillSummary, UnknownEnabledCapabilityError, UnknownHookError, UnknownMcpServerError, UnknownPackError, UnknownSkillError, UnknownToolError, UnknownTrustedSourceError, agentyxConfigPath, agentyxConfigSchema, agentyxCoreName, agentyxManifestPath, agentyxTargetSchema, buildAgentyxConfig, buildAgentyxConfigJsonSchema, builtInHookNames, builtInHookRegistry, builtInMcpServerNames, builtInMcpServerRegistry, builtInPackRegistry, builtInPacks, builtInSkillNames, builtInSkillRegistry, builtInToolNames, builtInToolRegistry, codexPluginManifestSchema, collectPackHookReferences, collectPackHooks, collectPackMcpServerReferences, collectPackMcpServers, collectPackToolReferences, collectProjectSignals, createHookRegistry, createMcpServerRegistry, createPackRegistry, createProjectGraph, createSkillRegistry, createToolRegistry, createTrustedSourceRegistry, detectProject, emptyInstallManifest, enabledCapabilityNameSchema, filterEffectiveHooks, filterEffectiveMcpServers, filterEffectiveTools, findProjectCapabilityOwners, formatAgentyxConfig, formatInstallManifest, formatSkillMarkdown, getCoreStatus, getTrustedSourceDefinition, hashContent, hookActivationLevelSchema, hookDefinitionSchema, hookEventSchema, hookManifestEntrySchema, hookNameSchema, hookReferenceSchema, inspectTrustedSource, installManifestEntrySchema, installManifestSchema, isExecutableOnPath, knownTrustedSourceRegistry, knownTrustedSources, loadAgentyxConfig, loadAgentyxProject, loadInstallManifest, manifestEntriesByPath, mcpCapabilityLevelSchema, mcpContextCostSchema, mcpEnvReferenceSchema, mcpManifestEntrySchema, mcpServerDefinitionSchema, mcpServerReferenceSchema, packCategorySchema, packDefinitionSchema, packNameSchema, parseAgentyxConfig, parseInstallManifest, parseSkillMarkdown, projectContextSchema, projectMetadataSchema, projectRelationSchema, projectRelationTypeSchema, recommendCapabilities, renderProjectGraphJson, renderProjectGraphMermaid, renderProjectGraphSvg, renderProjectGraphText, resolveAgentyxConfig, resolvePackHookReferences, resolvePackHooks, resolvePackMcpServerReferences, resolvePackMcpServers, resolvePackSkills, resolvePackToolReferences, resolvePackTools, resolvePacks, scanRepositorySize, skillDefinitionSchema, skillDirectorySchema, skillManifestEntrySchema, toolActivationLevelSchema, toolDefinitionSchema, toolNameSchema, toolReferenceSchema, trustedSourceDefinitionSchema, trustedSourceNameSchema, trustedSourcePathSchema, trustedSourceReferenceSchema, trustedSourceSkillSummarySchema };
|
|
1226
1351
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/errors.ts","../src/issues.ts","../src/config/errors.ts","../src/config/json-schema.ts","../src/config/schema.ts","../src/config/loader.ts","../src/pack/schema.ts","../src/pack/registry.ts","../src/skill/schema.ts","../src/skill/registry.ts","../src/config/project.ts","../src/hook/schema.ts","../src/hook/registry.ts","../src/mcp/schema.ts","../src/mcp/registry.ts","../src/tool/schema.ts","../src/tool/registry.ts","../src/config/resolver.ts","../src/hook/built-in.ts","../src/hook/errors.ts","../src/hook/resolver.ts","../src/manifest/errors.ts","../src/manifest/schema.ts","../src/manifest/io.ts","../src/mcp/built-in.ts","../src/mcp/errors.ts","../src/mcp/resolver.ts","../src/meta.ts","../src/pack/errors.ts","../src/pack/resolver.ts","../src/project/signals.ts","../src/project/detector.ts","../src/project/executable.ts","../src/project/recommend.ts","../src/skill/built-in.ts","../src/skill/errors.ts","../src/skill/markdown.ts","../src/skill/resolver.ts","../src/source/errors.ts","../src/source/schema.ts","../src/source/inspection.ts","../src/source/registry.ts","../src/tool/built-in.ts","../src/tool/errors.ts","../src/tool/resolver.ts"],"mappings":";;;;;;;;;cAOa,qBAAqB;WACvB;EAEG,YAAA,cAAc,iBAAiB,UAAU;;;;;UCPtC;;WAEN;WACA;;;;;KCDC,qBAAqB;;cAGpB,mCAAmC;WACrC;EAEG,YAAA,kBAAkB,UAAU;;;cAQ7B,gCAAgC;WAClC;EAEG,YAAA,kBAAkB,gBAAgB,UAAU;;;cAQ7C,qCAAqC;WACvC,iBAAiB;;WAEjB;EAEG,YAAA,OAAO,UAAU;;cAYlB,sCAAsC;WACxC;WACA;EAEG,YAAA,wBAAwB;;;cAczB,iCAAiC;WACnC;EAEG,YAAA,mBAAmB,gBAAgB,UAAU;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/errors.ts","../src/issues.ts","../src/config/errors.ts","../src/config/json-schema.ts","../src/config/schema.ts","../src/config/loader.ts","../src/project-graph.ts","../src/pack/schema.ts","../src/pack/registry.ts","../src/skill/schema.ts","../src/skill/registry.ts","../src/config/project.ts","../src/hook/schema.ts","../src/hook/registry.ts","../src/mcp/schema.ts","../src/mcp/registry.ts","../src/tool/schema.ts","../src/tool/registry.ts","../src/config/resolver.ts","../src/hook/built-in.ts","../src/hook/errors.ts","../src/hook/resolver.ts","../src/manifest/errors.ts","../src/manifest/schema.ts","../src/manifest/io.ts","../src/mcp/built-in.ts","../src/mcp/errors.ts","../src/mcp/resolver.ts","../src/meta.ts","../src/pack/errors.ts","../src/pack/resolver.ts","../src/project/signals.ts","../src/project/detector.ts","../src/project/executable.ts","../src/project/recommend.ts","../src/skill/built-in.ts","../src/skill/errors.ts","../src/skill/markdown.ts","../src/skill/resolver.ts","../src/source/errors.ts","../src/source/schema.ts","../src/source/inspection.ts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AQvB,8BAA4B,EAAA;;;;GAQvC,EAAA,KAAA;cAEW,+BAA6B,EAAA;;;;;;;;;;;;;GAUxC,EAAA,KAAA;cAEW,2BAAyB,EAAA;;;;;;;GAStB,EAAA,KAAA;cAEH,iCAA+B,EAAA;;;;GAI1C,EAAA,KAAA;KAEU,yBAAyB,EAAE,aAAa;KACxC,0BAA0B,EAAE,aAAa;KACzC,sBAAsB,EAAE,aAAa;KACrC,4BAA4B,EAAE,aAAa;;;UC/CtC;WACN,YAAY;WACZ,WAAW;WACX;WACA,UAAU;WACV;WACA,iBAAiB;WACjB;WACA;;iBAGW,qBACpB,qBACA,WAAW,yBACV,QAAQ;;;KCrBC,wBAAwB,oBAAoB;cAE3C,8BAA8B;cAgB9B,4BAA4B;iBAGzB,4BACd,aAAa,SAAS,2BACrB;iBAgBa,2BACd,iBAAiB,wBACjB,WAAU,wBACT;;;cChCU,qBAAA;cAEA;;;cCjBA,yBAAyB;WAC3B;WACA;WACA;EAEG,YAAA,kBAAkB,gCAAgC;;cAYnD,2BAA2B;WAC7B;EAEG,YAAA;;cAOD,yBAAyB;EACxB,YAAA,gBAAgB,iBAAiB,UAAU;;;;iBCvBzC,0BACd,kCACA,cAAc,cACd,cAAc,eACb;iBAsBa,qBACd,gBAAgB,iBAChB;iBASc,0BACd,mCACA,eAAc,cACd,eAAc,eACb;iBAQa,iBACd,mCACA,eAAc,cACd,eAAc,cACd"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { access, readFile, readdir, realpath } from "node:fs/promises";
|
|
2
|
+
import { access, readFile, readdir, realpath, stat } from "node:fs/promises";
|
|
3
3
|
import { delimiter, dirname, extname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
4
4
|
import { constants, readFileSync } from "node:fs";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -96,6 +96,15 @@ var LocalSkillDirectoryError = class extends AgentyxError {
|
|
|
96
96
|
this.directory = directory;
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
+
/** Raised when a configured project-context path is missing or escapes the project. */
|
|
100
|
+
var ProjectContextPathError = class extends AgentyxError {
|
|
101
|
+
path;
|
|
102
|
+
constructor(path, reason, options) {
|
|
103
|
+
super("project_context_path_error", `Invalid project context path "${path}": ${reason}.`, options);
|
|
104
|
+
this.name = "ProjectContextPathError";
|
|
105
|
+
this.path = path;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
99
108
|
//#endregion
|
|
100
109
|
//#region src/hook/schema.ts
|
|
101
110
|
const HOOK_ACTIVATION_LEVELS = ["default", "optional"];
|
|
@@ -280,6 +289,53 @@ const enabledCapabilityNameSchema = z.string().min(1, "Enabled capability names
|
|
|
280
289
|
* every supported platform.
|
|
281
290
|
*/
|
|
282
291
|
const skillDirectorySchema = z.string().min(1, "Skill directories must be non-empty strings.").regex(/^(?!\/)(?![A-Za-z]:)(?!.*(?:^|\/)\.\.(?:\/|$))[^\\\0]+$/, "Skill directories must be portable project-relative paths without parent traversal.");
|
|
292
|
+
const projectIdSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, "Project ids must be lowercase kebab-case identifiers.");
|
|
293
|
+
const projectTextSchema = z.string().min(1, "Must not be blank.").refine((value) => value.trim().length > 0, "Must not be blank.").refine((value) => Array.from(value).every((character) => {
|
|
294
|
+
const codePoint = character.codePointAt(0) ?? 0;
|
|
295
|
+
return codePoint > 31 && (codePoint < 127 || codePoint > 159);
|
|
296
|
+
}), "Must be single-line text without control characters.");
|
|
297
|
+
const projectUrlSchema = z.string().url("Must be a valid URL.");
|
|
298
|
+
const projectResourceNames = z.array(projectTextSchema).refine((items) => new Set(items).size === items.length, "Entries must be unique.");
|
|
299
|
+
const projectDocsSchema = z.array(projectUrlSchema).refine((items) => new Set(items).size === items.length, "Documentation URLs must be unique.");
|
|
300
|
+
const projectOwnsSchema = z.array(projectIdSchema).refine((items) => new Set(items).size === items.length, "Ownership entries must be unique.");
|
|
301
|
+
const projectMetadataSchema = z.strictObject({
|
|
302
|
+
id: projectIdSchema.describe("Stable, human-authored project identifier in kebab-case."),
|
|
303
|
+
name: projectTextSchema.describe("Human-readable project name."),
|
|
304
|
+
description: projectTextSchema.optional().describe("Short description of this project."),
|
|
305
|
+
repository: projectUrlSchema.optional().describe("Repository URL; descriptive and never fetched."),
|
|
306
|
+
docs: projectDocsSchema.default([]).describe("Documentation URLs; descriptive only."),
|
|
307
|
+
mcp: projectResourceNames.default([]).describe("MCP server identifiers available to consult."),
|
|
308
|
+
owns: projectOwnsSchema.default([]).describe("Architectural capabilities owned by this project.")
|
|
309
|
+
});
|
|
310
|
+
const projectRelationTypeSchema = z.enum([
|
|
311
|
+
"uses",
|
|
312
|
+
"integrates",
|
|
313
|
+
"consumes",
|
|
314
|
+
"extends"
|
|
315
|
+
]);
|
|
316
|
+
const projectRelationSchema = z.strictObject({
|
|
317
|
+
id: projectIdSchema.describe("Stable identifier for the related project."),
|
|
318
|
+
name: projectTextSchema.describe("Human-readable related project name."),
|
|
319
|
+
type: projectRelationTypeSchema.describe("How the current project relates to this project."),
|
|
320
|
+
role: projectIdSchema.describe("Architectural role of the related project."),
|
|
321
|
+
repository: projectUrlSchema.optional().describe("Repository URL; descriptive and never fetched."),
|
|
322
|
+
docs: projectDocsSchema.default([]).describe("Documentation URLs; descriptive only."),
|
|
323
|
+
mcp: projectResourceNames.default([]).describe("MCP server identifiers available to consult."),
|
|
324
|
+
owns: projectOwnsSchema.default([]).describe("Architectural capabilities owned by this project."),
|
|
325
|
+
guidance: z.array(projectTextSchema).default([]).describe("Human-authored guidance for agents.")
|
|
326
|
+
});
|
|
327
|
+
const projectCommandSchema = z.strictObject({
|
|
328
|
+
command: projectTextSchema.describe("Suggested command; Agentyx never executes it."),
|
|
329
|
+
cwd: z.string().min(1).default(".").describe("Project-relative working directory.")
|
|
330
|
+
});
|
|
331
|
+
const projectContextSchema = z.strictObject({
|
|
332
|
+
commands: z.record(z.string().min(1).refine((name) => name.trim().length > 0, "Command names must not be blank."), projectCommandSchema).default({}),
|
|
333
|
+
areas: z.array(z.strictObject({
|
|
334
|
+
path: z.string().min(1),
|
|
335
|
+
purpose: projectTextSchema
|
|
336
|
+
})).default([]),
|
|
337
|
+
constraints: z.array(projectTextSchema).default([])
|
|
338
|
+
}).describe("Explicit repository-local facts for the generated project context Skill.");
|
|
283
339
|
/** The `.agentyx.json` project configuration. */
|
|
284
340
|
const agentyxConfigSchema = z.strictObject({
|
|
285
341
|
$schema: z.string().min(1, "$schema must be a non-empty string.").describe("Optional path or URL to the Agentyx JSON Schema.").optional(),
|
|
@@ -288,7 +344,45 @@ const agentyxConfigSchema = z.strictObject({
|
|
|
288
344
|
targets: z.array(agentyxTargetSchema).describe("Coding-agent providers this project targets.").default([]),
|
|
289
345
|
skillDirectories: z.array(skillDirectorySchema).describe("Project-relative roots containing local Agent Skills.").optional(),
|
|
290
346
|
localPacks: z.array(packDefinitionSchema).describe("Project-owned packs that can reference built-in or local Skills.").optional(),
|
|
291
|
-
trustedSources: z.array(trustedSourceReferenceSchema).describe("Pinned local checkouts of known external skill/plugin sources.").optional()
|
|
347
|
+
trustedSources: z.array(trustedSourceReferenceSchema).describe("Pinned local checkouts of known external skill/plugin sources.").optional(),
|
|
348
|
+
project: projectMetadataSchema.optional().describe("Identity and ownership for this project."),
|
|
349
|
+
relations: z.array(projectRelationSchema).optional().describe("Direct architectural relationships."),
|
|
350
|
+
context: projectContextSchema.optional()
|
|
351
|
+
}).superRefine((config, context) => {
|
|
352
|
+
const relations = config.relations ?? [];
|
|
353
|
+
if (relations.length > 0 && config.project === void 0) context.addIssue({
|
|
354
|
+
code: "custom",
|
|
355
|
+
path: ["project"],
|
|
356
|
+
message: "Project metadata is required when relations are configured."
|
|
357
|
+
});
|
|
358
|
+
const ids = /* @__PURE__ */ new Set();
|
|
359
|
+
for (const [index, relation] of relations.entries()) {
|
|
360
|
+
if (config.project?.id === relation.id) context.addIssue({
|
|
361
|
+
code: "custom",
|
|
362
|
+
path: [
|
|
363
|
+
"relations",
|
|
364
|
+
index,
|
|
365
|
+
"id"
|
|
366
|
+
],
|
|
367
|
+
message: "A project cannot relate to itself."
|
|
368
|
+
});
|
|
369
|
+
if (ids.has(relation.id)) context.addIssue({
|
|
370
|
+
code: "custom",
|
|
371
|
+
path: [
|
|
372
|
+
"relations",
|
|
373
|
+
index,
|
|
374
|
+
"id"
|
|
375
|
+
],
|
|
376
|
+
message: "Related project ids must be unique."
|
|
377
|
+
});
|
|
378
|
+
ids.add(relation.id);
|
|
379
|
+
}
|
|
380
|
+
const areaPaths = config.context?.areas.map((area) => area.path) ?? [];
|
|
381
|
+
if (new Set(areaPaths).size !== areaPaths.length) context.addIssue({
|
|
382
|
+
code: "custom",
|
|
383
|
+
path: ["context", "areas"],
|
|
384
|
+
message: "Area paths must be unique."
|
|
385
|
+
});
|
|
292
386
|
});
|
|
293
387
|
//#endregion
|
|
294
388
|
//#region src/config/json-schema.ts
|
|
@@ -359,6 +453,23 @@ function isFileNotFound(cause) {
|
|
|
359
453
|
return cause instanceof Error && cause.code === "ENOENT";
|
|
360
454
|
}
|
|
361
455
|
//#endregion
|
|
456
|
+
//#region src/assets.ts
|
|
457
|
+
/**
|
|
458
|
+
* Location of the non-code assets that ship with `@agentyx/core`.
|
|
459
|
+
*
|
|
460
|
+
* **This module must stay directly under `src/`.** The path is derived from
|
|
461
|
+
* `import.meta.url` rather than the working directory, and `src/assets.ts` and
|
|
462
|
+
* the bundled `dist/index.mjs` sit at the same depth below the package root, so
|
|
463
|
+
* one relative path is correct both in development and in the published
|
|
464
|
+
* package. Moving this file into a subdirectory breaks built-in skill loading;
|
|
465
|
+
* `packages/core/test/built-in-skills.test.ts` guards against that.
|
|
466
|
+
*
|
|
467
|
+
* `skills/` is listed in the package's `files`, so it is published alongside
|
|
468
|
+
* `dist/`.
|
|
469
|
+
*/
|
|
470
|
+
const BUILT_IN_SKILLS_PATH = fileURLToPath(new URL("../skills", import.meta.url));
|
|
471
|
+
const PROJECT_CONTEXT_TEMPLATE_PATH = fileURLToPath(new URL("../templates/project-context.md", import.meta.url));
|
|
472
|
+
//#endregion
|
|
362
473
|
//#region src/pack/errors.ts
|
|
363
474
|
/** Raised when a requested pack is not present in the registry. */
|
|
364
475
|
var UnknownPackError = class extends AgentyxError {
|
|
@@ -613,22 +724,6 @@ const builtInPacks = [
|
|
|
613
724
|
/** The registry used by default when no explicit registry is supplied. */
|
|
614
725
|
const builtInPackRegistry = createPackRegistry(builtInPacks);
|
|
615
726
|
//#endregion
|
|
616
|
-
//#region src/assets.ts
|
|
617
|
-
/**
|
|
618
|
-
* Location of the non-code assets that ship with `@agentyx/core`.
|
|
619
|
-
*
|
|
620
|
-
* **This module must stay directly under `src/`.** The path is derived from
|
|
621
|
-
* `import.meta.url` rather than the working directory, and `src/assets.ts` and
|
|
622
|
-
* the bundled `dist/index.mjs` sit at the same depth below the package root, so
|
|
623
|
-
* one relative path is correct both in development and in the published
|
|
624
|
-
* package. Moving this file into a subdirectory breaks built-in skill loading;
|
|
625
|
-
* `packages/core/test/built-in-skills.test.ts` guards against that.
|
|
626
|
-
*
|
|
627
|
-
* `skills/` is listed in the package's `files`, so it is published alongside
|
|
628
|
-
* `dist/`.
|
|
629
|
-
*/
|
|
630
|
-
const BUILT_IN_SKILLS_PATH = fileURLToPath(new URL("../skills", import.meta.url));
|
|
631
|
-
//#endregion
|
|
632
727
|
//#region src/skill/errors.ts
|
|
633
728
|
/**
|
|
634
729
|
* Raised when a pack references a skill the registry does not know.
|
|
@@ -967,18 +1062,70 @@ function getTrustedSourceDefinition(source, registry = knownTrustedSourceRegistr
|
|
|
967
1062
|
async function loadAgentyxProject(projectPath = process.cwd()) {
|
|
968
1063
|
const projectDir = resolve(projectPath);
|
|
969
1064
|
const config = await loadAgentyxConfig(projectDir);
|
|
1065
|
+
await validateContextPaths(projectDir, config.context);
|
|
970
1066
|
for (const source of config.trustedSources ?? []) getTrustedSourceDefinition(source);
|
|
971
1067
|
const localSources = await loadLocalSkillSources(projectDir, config.skillDirectories ?? []);
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
1068
|
+
if (localSources.some((source) => source.name === "agentyx-project-context")) throw new DuplicateSkillError("agentyx-project-context");
|
|
1069
|
+
const generatedSources = config.project !== void 0 || config.context !== void 0 && hasContext(config.context) ? [createProjectContextSkill(config.project, config.relations ?? [], config.context)] : [];
|
|
1070
|
+
const skillRegistry = createSkillRegistry([
|
|
1071
|
+
...builtInSkillRegistry.names.map((name) => ({
|
|
1072
|
+
name,
|
|
1073
|
+
load: () => builtInSkillRegistry.get(name)
|
|
1074
|
+
})),
|
|
1075
|
+
...localSources,
|
|
1076
|
+
...generatedSources
|
|
1077
|
+
]);
|
|
976
1078
|
return {
|
|
977
1079
|
config,
|
|
978
1080
|
packRegistry: config.localPacks === void 0 ? builtInPackRegistry : createPackRegistry([...builtInPacks, ...config.localPacks]),
|
|
979
|
-
skillRegistry
|
|
1081
|
+
skillRegistry,
|
|
1082
|
+
graph: config.project === void 0 ? void 0 : {
|
|
1083
|
+
project: config.project,
|
|
1084
|
+
relations: config.relations ?? []
|
|
1085
|
+
}
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
function createProjectContextSkill(project, relations, context) {
|
|
1089
|
+
return {
|
|
1090
|
+
name: "agentyx-project-context",
|
|
1091
|
+
load: () => {
|
|
1092
|
+
const template = readFileSync(PROJECT_CONTEXT_TEMPLATE_PATH, "utf8").trim();
|
|
1093
|
+
const data = JSON.stringify({
|
|
1094
|
+
project,
|
|
1095
|
+
relations,
|
|
1096
|
+
context
|
|
1097
|
+
}, null, 2);
|
|
1098
|
+
const longestFence = Math.max(0, ...Array.from(data.matchAll(/`+/g), (match) => match[0].length));
|
|
1099
|
+
const fence = "`".repeat(Math.max(3, longestFence + 1));
|
|
1100
|
+
return {
|
|
1101
|
+
name: "agentyx-project-context",
|
|
1102
|
+
description: "Repository facts and direct architectural relationships.",
|
|
1103
|
+
content: template.replace("{{PROJECT_FACTS}}", `${fence}json\n${data}\n${fence}`)
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
980
1106
|
};
|
|
981
1107
|
}
|
|
1108
|
+
function hasContext(context) {
|
|
1109
|
+
return Object.keys(context.commands).length > 0 || context.areas.length > 0 || context.constraints.length > 0;
|
|
1110
|
+
}
|
|
1111
|
+
async function validateContextPaths(projectDir, context) {
|
|
1112
|
+
if (context === void 0) return;
|
|
1113
|
+
const paths = [...Object.values(context.commands).map(({ cwd }) => cwd), ...context.areas.map(({ path }) => path)];
|
|
1114
|
+
const projectRealPath = await realpath(projectDir);
|
|
1115
|
+
for (const path of paths) {
|
|
1116
|
+
if (/^(?:\/|[A-Za-z]:)|\\|(?:^|\/)\.\.(?:\/|$)/.test(path)) throw new ProjectContextPathError(path, "it must be project-relative and cannot traverse parents");
|
|
1117
|
+
const resolvedPath = resolve(projectDir, path);
|
|
1118
|
+
let resolvedRealPath;
|
|
1119
|
+
try {
|
|
1120
|
+
resolvedRealPath = await realpath(resolvedPath);
|
|
1121
|
+
if (!(await stat(resolvedRealPath)).isDirectory()) throw new ProjectContextPathError(path, "it must name a directory");
|
|
1122
|
+
} catch (cause) {
|
|
1123
|
+
if (cause instanceof ProjectContextPathError) throw cause;
|
|
1124
|
+
throw new ProjectContextPathError(path, "it does not exist or cannot be read", cause instanceof Error ? { cause } : void 0);
|
|
1125
|
+
}
|
|
1126
|
+
if (!isInside$1(resolvedRealPath, projectRealPath)) throw new ProjectContextPathError(path, "it resolves outside the project");
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
982
1129
|
async function loadLocalSkillSources(projectDir, directories) {
|
|
983
1130
|
const projectRealPath = await realpath(projectDir);
|
|
984
1131
|
const sources = [];
|
|
@@ -1530,7 +1677,7 @@ function resolveAgentyxConfig(config, registry = builtInPackRegistry, skillRegis
|
|
|
1530
1677
|
return {
|
|
1531
1678
|
requestedPacks,
|
|
1532
1679
|
resolvedPacks,
|
|
1533
|
-
skills: collectPackSkills(resolvedPacks, registry, skillRegistry),
|
|
1680
|
+
skills: unique([...collectPackSkills(resolvedPacks, registry, skillRegistry), ...config.project !== void 0 || (config.relations?.length ?? 0) > 0 || hasProjectContext(config.context) ? ["agentyx-project-context"] : []]),
|
|
1534
1681
|
declaredMcpServers,
|
|
1535
1682
|
mcpServers: filterEffectiveMcpServers(declaredMcpServers, config.enable),
|
|
1536
1683
|
declaredTools,
|
|
@@ -1541,6 +1688,12 @@ function resolveAgentyxConfig(config, registry = builtInPackRegistry, skillRegis
|
|
|
1541
1688
|
targets: [...config.targets]
|
|
1542
1689
|
};
|
|
1543
1690
|
}
|
|
1691
|
+
function hasProjectContext(context) {
|
|
1692
|
+
return context !== void 0 && (Object.keys(context.commands).length > 0 || context.areas.length > 0 || context.constraints.length > 0);
|
|
1693
|
+
}
|
|
1694
|
+
function unique(values) {
|
|
1695
|
+
return [...new Set(values)];
|
|
1696
|
+
}
|
|
1544
1697
|
//#endregion
|
|
1545
1698
|
//#region src/manifest/errors.ts
|
|
1546
1699
|
/** Raised when `.agentyx.lock.json` is not valid JSON. */
|
|
@@ -1866,6 +2019,7 @@ async function collectProjectSignals(projectDir) {
|
|
|
1866
2019
|
path: packageJsonPath,
|
|
1867
2020
|
name: getString(packageJson?.name),
|
|
1868
2021
|
packageManager: getString(packageJson?.packageManager),
|
|
2022
|
+
scripts: getStringRecord(packageJson?.scripts),
|
|
1869
2023
|
error: packageJsonResult.error
|
|
1870
2024
|
},
|
|
1871
2025
|
packageManager,
|
|
@@ -2048,6 +2202,10 @@ function parsePackageManagerName(value) {
|
|
|
2048
2202
|
function getString(value) {
|
|
2049
2203
|
return typeof value === "string" ? value : void 0;
|
|
2050
2204
|
}
|
|
2205
|
+
function getStringRecord(value) {
|
|
2206
|
+
if (!isRecord(value)) return {};
|
|
2207
|
+
return Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[1] === "string"));
|
|
2208
|
+
}
|
|
2051
2209
|
function isRecord(value) {
|
|
2052
2210
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2053
2211
|
}
|
|
@@ -2186,6 +2344,83 @@ function dedupeMatches(matches) {
|
|
|
2186
2344
|
return result;
|
|
2187
2345
|
}
|
|
2188
2346
|
//#endregion
|
|
2347
|
+
//#region src/project-graph.ts
|
|
2348
|
+
var ProjectGraphNotConfiguredError = class extends AgentyxError {
|
|
2349
|
+
constructor() {
|
|
2350
|
+
super("project_graph_not_configured", "Project Graph requires a project object in .agentyx.json.");
|
|
2351
|
+
this.name = "ProjectGraphNotConfiguredError";
|
|
2352
|
+
}
|
|
2353
|
+
};
|
|
2354
|
+
function createProjectGraph(project, relations) {
|
|
2355
|
+
return {
|
|
2356
|
+
project,
|
|
2357
|
+
relations: [...relations]
|
|
2358
|
+
};
|
|
2359
|
+
}
|
|
2360
|
+
function renderProjectGraphText(graph) {
|
|
2361
|
+
const rows = graph.relations.map((relation, index) => {
|
|
2362
|
+
return `${index === graph.relations.length - 1 ? "└──" : "├──"} ${relation.type} [${relation.role}] → ${relation.name}`;
|
|
2363
|
+
});
|
|
2364
|
+
return [graph.project.name, ...rows].join("\n");
|
|
2365
|
+
}
|
|
2366
|
+
function renderProjectGraphJson(graph) {
|
|
2367
|
+
return `${JSON.stringify(graph, null, 2)}\n`;
|
|
2368
|
+
}
|
|
2369
|
+
function renderProjectGraphMermaid(graph) {
|
|
2370
|
+
const current = mermaidId(graph.project.id);
|
|
2371
|
+
return ["graph LR", ...graph.relations.map((relation) => ` ${current}["${mermaidText(graph.project.name)}"] -->|${mermaidText(`${relation.type}: ${relation.role}`)}| ${mermaidId(relation.id)}["${mermaidText(relation.name)}"]`)].join("\n");
|
|
2372
|
+
}
|
|
2373
|
+
function renderProjectGraphSvg(graph) {
|
|
2374
|
+
const width = 720;
|
|
2375
|
+
const rowHeight = 92;
|
|
2376
|
+
const height = Math.max(180, 100 + graph.relations.length * rowHeight);
|
|
2377
|
+
const centerX = 360;
|
|
2378
|
+
const centerY = height / 2;
|
|
2379
|
+
const svg = [
|
|
2380
|
+
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${width} ${height}" role="img" aria-labelledby="title desc">`,
|
|
2381
|
+
`<title id="title">${xml(graph.project.name)} project graph</title>`,
|
|
2382
|
+
`<desc id="desc">Direct architectural relationships from ${xml(graph.project.name)}.</desc>`,
|
|
2383
|
+
"<defs><marker id=\"arrow\" markerWidth=\"10\" markerHeight=\"8\" refX=\"9\" refY=\"4\" orient=\"auto\"><path d=\"M0,0 L10,4 L0,8 z\" fill=\"#526579\"/></marker></defs>"
|
|
2384
|
+
];
|
|
2385
|
+
graph.relations.forEach((relation, index) => {
|
|
2386
|
+
const y = 54 + index * rowHeight;
|
|
2387
|
+
const right = index % 2 === 0;
|
|
2388
|
+
const x = right ? 500 : 0;
|
|
2389
|
+
const edgeStart = right ? 488 : 232;
|
|
2390
|
+
const edgeEnd = right ? x : x + 220;
|
|
2391
|
+
svg.push(`<line x1="${edgeStart}" y1="${centerY}" x2="${edgeEnd}" y2="${y + 24}" stroke="#526579" stroke-width="2" marker-end="url(#arrow)"/>`);
|
|
2392
|
+
svg.push(`<text x="${right ? 494 : 226}" y="${Math.round((centerY + y + 24) / 2) - 7}" class="edge">${xml(truncate(`${relation.type} · ${relation.role}`, 34))}</text>`);
|
|
2393
|
+
svg.push(`<rect x="${x}" y="${y}" width="220" height="48" rx="10" class="node"/>`);
|
|
2394
|
+
svg.push(`<text x="${x + 110}" y="${y + 30}" class="label">${xml(truncate(relation.name, 22))}</text>`);
|
|
2395
|
+
});
|
|
2396
|
+
svg.push(`<rect x="232" y="${centerY - 34}" width="256" height="68" rx="14" class="current"/>`);
|
|
2397
|
+
svg.push(`<text x="${centerX}" y="${centerY + 6}" class="label">${xml(truncate(graph.project.name, 30))}</text>`);
|
|
2398
|
+
svg.push("<style>text{font-family:system-ui,sans-serif}.node{fill:#fff;stroke:#8da0b3;stroke-width:2}.current{fill:#e8f2ff;stroke:#2563a5;stroke-width:3}.label{text-anchor:middle;font-size:16px;font-weight:600;fill:#172536}.edge{text-anchor:middle;font-size:12px;fill:#34495e;paint-order:stroke;stroke:#fff;stroke-width:5px;stroke-linejoin:round}</style>");
|
|
2399
|
+
svg.push("</svg>");
|
|
2400
|
+
return `${svg.join("\n")}\n`;
|
|
2401
|
+
}
|
|
2402
|
+
function findProjectCapabilityOwners(graph, capability) {
|
|
2403
|
+
const owners = graph.relations.filter((relation) => relation.owns.includes(capability));
|
|
2404
|
+
return {
|
|
2405
|
+
capability,
|
|
2406
|
+
currentProject: graph.project.owns.includes(capability) ? graph.project : void 0,
|
|
2407
|
+
relatedProjects: owners
|
|
2408
|
+
};
|
|
2409
|
+
}
|
|
2410
|
+
function xml(value) {
|
|
2411
|
+
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
2412
|
+
}
|
|
2413
|
+
function mermaidText(value) {
|
|
2414
|
+
return value.replaceAll("&", "&").replaceAll("|", "|").replaceAll("[", "[").replaceAll("]", "]").replaceAll("\"", """).replaceAll("<", "<").replaceAll(">", ">");
|
|
2415
|
+
}
|
|
2416
|
+
function mermaidId(value) {
|
|
2417
|
+
return `node_${Array.from(value).map((char) => char.codePointAt(0)?.toString(16) ?? "0").join("")}`;
|
|
2418
|
+
}
|
|
2419
|
+
function truncate(value, limit) {
|
|
2420
|
+
const characters = Array.from(value);
|
|
2421
|
+
return characters.length > limit ? `${characters.slice(0, limit - 1).join("")}…` : value;
|
|
2422
|
+
}
|
|
2423
|
+
//#endregion
|
|
2189
2424
|
//#region src/source/inspection.ts
|
|
2190
2425
|
async function inspectTrustedSource(projectPath, reference) {
|
|
2191
2426
|
const definition = getTrustedSourceDefinition(reference);
|
|
@@ -2274,6 +2509,6 @@ function trustedSourceLoadError(sourceName, reason, cause) {
|
|
|
2274
2509
|
return new TrustedSourceLoadError(sourceName, reason, cause instanceof Error ? { cause } : void 0);
|
|
2275
2510
|
}
|
|
2276
2511
|
//#endregion
|
|
2277
|
-
export { AGENTYX_CONFIG_FILENAME, AGENTYX_CONFIG_SCHEMA_ID, AGENTYX_MANIFEST_FILENAME, AgentyxConfigNotFoundError, AgentyxConfigParseError, AgentyxConfigValidationError, AgentyxError, AgentyxManifestParseError, AgentyxManifestValidationError, CODEBASE_MEMORY_FILE_THRESHOLD, CODEBASE_MEMORY_MONOREPO_FILE_THRESHOLD, CircularPackDependencyError, DuplicateHookError, DuplicateMcpServerError, DuplicatePackError, DuplicateSkillError, DuplicateToolError, DuplicateTrustedSourceError, HOOK_ACTIVATION_LEVELS, HOOK_EVENTS, INSTALL_MANIFEST_VERSION, InvalidHookError, InvalidMcpServerError, InvalidSkillError, InvalidToolError, LocalSkillDirectoryError, MCP_CAPABILITY_LEVELS, MCP_CONTEXT_COSTS, PACKAGE_MANAGERS, PACK_CATEGORIES, RECOMMENDATION_CONFIDENCES, REPOSITORY_SCAN_ENTRY_LIMIT, TOOL_ACTIVATION_LEVELS, TrustedSourceLoadError, UnknownEnabledCapabilityError, UnknownHookError, UnknownMcpServerError, UnknownPackError, UnknownSkillError, UnknownToolError, UnknownTrustedSourceError, agentyxConfigPath, agentyxConfigSchema, agentyxCoreName, agentyxManifestPath, agentyxTargetSchema, buildAgentyxConfig, buildAgentyxConfigJsonSchema, builtInHookNames, builtInHookRegistry, builtInMcpServerNames, builtInMcpServerRegistry, builtInPackRegistry, builtInPacks, builtInSkillNames, builtInSkillRegistry, builtInToolNames, builtInToolRegistry, codexPluginManifestSchema, collectPackHookReferences, collectPackHooks, collectPackMcpServerReferences, collectPackMcpServers, collectPackToolReferences, collectProjectSignals, createHookRegistry, createMcpServerRegistry, createPackRegistry, createSkillRegistry, createToolRegistry, createTrustedSourceRegistry, detectProject, emptyInstallManifest, enabledCapabilityNameSchema, filterEffectiveHooks, filterEffectiveMcpServers, filterEffectiveTools, formatAgentyxConfig, formatInstallManifest, formatSkillMarkdown, getCoreStatus, getTrustedSourceDefinition, hashContent, hookActivationLevelSchema, hookDefinitionSchema, hookEventSchema, hookManifestEntrySchema, hookNameSchema, hookReferenceSchema, inspectTrustedSource, installManifestEntrySchema, installManifestSchema, isExecutableOnPath, knownTrustedSourceRegistry, knownTrustedSources, loadAgentyxConfig, loadAgentyxProject, loadInstallManifest, manifestEntriesByPath, mcpCapabilityLevelSchema, mcpContextCostSchema, mcpEnvReferenceSchema, mcpManifestEntrySchema, mcpServerDefinitionSchema, mcpServerReferenceSchema, packCategorySchema, packDefinitionSchema, packNameSchema, parseAgentyxConfig, parseInstallManifest, parseSkillMarkdown, recommendCapabilities, resolveAgentyxConfig, resolvePackHookReferences, resolvePackHooks, resolvePackMcpServerReferences, resolvePackMcpServers, resolvePackSkills, resolvePackToolReferences, resolvePackTools, resolvePacks, scanRepositorySize, skillDefinitionSchema, skillDirectorySchema, skillManifestEntrySchema, toolActivationLevelSchema, toolDefinitionSchema, toolNameSchema, toolReferenceSchema, trustedSourceDefinitionSchema, trustedSourceNameSchema, trustedSourcePathSchema, trustedSourceReferenceSchema, trustedSourceSkillSummarySchema };
|
|
2512
|
+
export { AGENTYX_CONFIG_FILENAME, AGENTYX_CONFIG_SCHEMA_ID, AGENTYX_MANIFEST_FILENAME, AgentyxConfigNotFoundError, AgentyxConfigParseError, AgentyxConfigValidationError, AgentyxError, AgentyxManifestParseError, AgentyxManifestValidationError, CODEBASE_MEMORY_FILE_THRESHOLD, CODEBASE_MEMORY_MONOREPO_FILE_THRESHOLD, CircularPackDependencyError, DuplicateHookError, DuplicateMcpServerError, DuplicatePackError, DuplicateSkillError, DuplicateToolError, DuplicateTrustedSourceError, HOOK_ACTIVATION_LEVELS, HOOK_EVENTS, INSTALL_MANIFEST_VERSION, InvalidHookError, InvalidMcpServerError, InvalidSkillError, InvalidToolError, LocalSkillDirectoryError, MCP_CAPABILITY_LEVELS, MCP_CONTEXT_COSTS, PACKAGE_MANAGERS, PACK_CATEGORIES, ProjectContextPathError, ProjectGraphNotConfiguredError, RECOMMENDATION_CONFIDENCES, REPOSITORY_SCAN_ENTRY_LIMIT, TOOL_ACTIVATION_LEVELS, TrustedSourceLoadError, UnknownEnabledCapabilityError, UnknownHookError, UnknownMcpServerError, UnknownPackError, UnknownSkillError, UnknownToolError, UnknownTrustedSourceError, agentyxConfigPath, agentyxConfigSchema, agentyxCoreName, agentyxManifestPath, agentyxTargetSchema, buildAgentyxConfig, buildAgentyxConfigJsonSchema, builtInHookNames, builtInHookRegistry, builtInMcpServerNames, builtInMcpServerRegistry, builtInPackRegistry, builtInPacks, builtInSkillNames, builtInSkillRegistry, builtInToolNames, builtInToolRegistry, codexPluginManifestSchema, collectPackHookReferences, collectPackHooks, collectPackMcpServerReferences, collectPackMcpServers, collectPackToolReferences, collectProjectSignals, createHookRegistry, createMcpServerRegistry, createPackRegistry, createProjectGraph, createSkillRegistry, createToolRegistry, createTrustedSourceRegistry, detectProject, emptyInstallManifest, enabledCapabilityNameSchema, filterEffectiveHooks, filterEffectiveMcpServers, filterEffectiveTools, findProjectCapabilityOwners, formatAgentyxConfig, formatInstallManifest, formatSkillMarkdown, getCoreStatus, getTrustedSourceDefinition, hashContent, hookActivationLevelSchema, hookDefinitionSchema, hookEventSchema, hookManifestEntrySchema, hookNameSchema, hookReferenceSchema, inspectTrustedSource, installManifestEntrySchema, installManifestSchema, isExecutableOnPath, knownTrustedSourceRegistry, knownTrustedSources, loadAgentyxConfig, loadAgentyxProject, loadInstallManifest, manifestEntriesByPath, mcpCapabilityLevelSchema, mcpContextCostSchema, mcpEnvReferenceSchema, mcpManifestEntrySchema, mcpServerDefinitionSchema, mcpServerReferenceSchema, packCategorySchema, packDefinitionSchema, packNameSchema, parseAgentyxConfig, parseInstallManifest, parseSkillMarkdown, projectContextSchema, projectMetadataSchema, projectRelationSchema, projectRelationTypeSchema, recommendCapabilities, renderProjectGraphJson, renderProjectGraphMermaid, renderProjectGraphSvg, renderProjectGraphText, resolveAgentyxConfig, resolvePackHookReferences, resolvePackHooks, resolvePackMcpServerReferences, resolvePackMcpServers, resolvePackSkills, resolvePackToolReferences, resolvePackTools, resolvePacks, scanRepositorySize, skillDefinitionSchema, skillDirectorySchema, skillManifestEntrySchema, toolActivationLevelSchema, toolDefinitionSchema, toolNameSchema, toolReferenceSchema, trustedSourceDefinitionSchema, trustedSourceNameSchema, trustedSourcePathSchema, trustedSourceReferenceSchema, trustedSourceSkillSummarySchema };
|
|
2278
2513
|
|
|
2279
2514
|
//# sourceMappingURL=index.mjs.map
|