@agentyx/core 0.1.1 → 0.3.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/README.md +28 -47
- package/dist/index.d.mts +396 -155
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +777 -226
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/agentyx.schema.json +11 -7
- package/skills/angular-architecture/SKILL.md +29 -0
- package/skills/angular-modern/SKILL.md +12 -30
- package/skills/angular-signals/SKILL.md +23 -0
- package/skills/angular-testing/SKILL.md +24 -0
- package/skills/api-design/SKILL.md +29 -0
- package/skills/api-documentation/SKILL.md +34 -0
- package/skills/aria-patterns/SKILL.md +36 -0
- package/skills/auth-patterns/SKILL.md +35 -0
- package/skills/brainstorming/SKILL.md +12 -0
- package/skills/branching-strategy/SKILL.md +34 -0
- package/skills/ci-pipelines/SKILL.md +34 -0
- package/skills/code-quality/SKILL.md +28 -0
- package/skills/code-review/SKILL.md +23 -0
- package/skills/commit-hygiene/SKILL.md +34 -0
- package/skills/concise-output/SKILL.md +24 -0
- package/skills/containerization/SKILL.md +38 -0
- package/skills/context-efficient-development/SKILL.md +24 -0
- package/skills/data-modeling/SKILL.md +34 -0
- package/skills/decision-records/SKILL.md +34 -0
- package/skills/dependency-hygiene/SKILL.md +34 -0
- package/skills/dependency-security/SKILL.md +35 -0
- package/skills/deployment-safety/SKILL.md +33 -0
- package/skills/e2e-testing/SKILL.md +34 -0
- package/skills/engineering-principles/SKILL.md +34 -0
- package/skills/flaky-tests/SKILL.md +29 -0
- package/skills/focused-verification/SKILL.md +22 -0
- package/skills/incident-response/SKILL.md +34 -0
- package/skills/infrastructure-as-code/SKILL.md +34 -0
- package/skills/keyboard-navigation/SKILL.md +34 -0
- package/skills/legacy-code/SKILL.md +34 -0
- package/skills/metrics-and-tracing/SKILL.md +33 -0
- package/skills/parallel-work/SKILL.md +12 -0
- package/skills/performance-profiling/SKILL.md +34 -0
- package/skills/pull-requests/SKILL.md +34 -0
- package/skills/query-performance/SKILL.md +34 -0
- package/skills/refactoring-safely/SKILL.md +34 -0
- package/skills/requesting-code-review/SKILL.md +13 -0
- package/skills/schema-migrations/SKILL.md +34 -0
- package/skills/secrets-handling/SKILL.md +34 -0
- package/skills/secure-coding/SKILL.md +33 -0
- package/skills/semantic-html/SKILL.md +34 -0
- package/skills/structured-logging/SKILL.md +34 -0
- package/skills/subagent-driven-development/SKILL.md +13 -0
- package/skills/targeted-exploration/SKILL.md +24 -0
- package/skills/technical-writing/SKILL.md +34 -0
- package/skills/test-doubles/SKILL.md +30 -0
- package/skills/test-strategy/SKILL.md +35 -0
- package/skills/transactions-and-consistency/SKILL.md +34 -0
- package/skills/typescript-modeling/SKILL.md +23 -0
- package/skills/typescript-modern/SKILL.md +15 -27
- package/skills/typescript-strict/SKILL.md +23 -0
- package/skills/web-vitals/SKILL.md +34 -0
- package/skills/worktree-workflow/SKILL.md +12 -0
package/dist/index.d.mts
CHANGED
|
@@ -12,13 +12,17 @@ declare class AgentyxError extends Error {
|
|
|
12
12
|
constructor(code: string, message: string, options?: ErrorOptions);
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
|
-
//#region src/
|
|
16
|
-
/** A single
|
|
17
|
-
interface
|
|
15
|
+
//#region src/issues.d.ts
|
|
16
|
+
/** A single problem in an Agentyx document, addressed by its location in it. */
|
|
17
|
+
interface AgentyxIssue {
|
|
18
18
|
/** Dotted path to the offending value, or `(root)` for the document itself. */
|
|
19
19
|
readonly path: string;
|
|
20
20
|
readonly message: string;
|
|
21
21
|
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/config/errors.d.ts
|
|
24
|
+
/** A single configuration problem, addressed by its location in the document. */
|
|
25
|
+
type AgentyxConfigIssue = AgentyxIssue;
|
|
22
26
|
/** Raised when the supplied directory has no `.agentyx.json`. */
|
|
23
27
|
declare class AgentyxConfigNotFoundError extends AgentyxError {
|
|
24
28
|
readonly filePath: string;
|
|
@@ -36,6 +40,11 @@ declare class AgentyxConfigValidationError extends AgentyxError {
|
|
|
36
40
|
readonly filePath: string | undefined;
|
|
37
41
|
constructor(error: ZodError, filePath?: string);
|
|
38
42
|
}
|
|
43
|
+
declare class UnknownEnabledCapabilityError extends AgentyxError {
|
|
44
|
+
readonly capabilityName: string;
|
|
45
|
+
readonly knownCapabilities: readonly string[];
|
|
46
|
+
constructor(capabilityName: string, knownCapabilities: readonly string[]);
|
|
47
|
+
}
|
|
39
48
|
//#endregion
|
|
40
49
|
//#region src/config/json-schema.d.ts
|
|
41
50
|
/** Canonical identifier of the published `.agentyx.json` schema. */
|
|
@@ -51,25 +60,17 @@ declare const AGENTYX_CONFIG_SCHEMA_ID = "https://agentyx.dev/schema/agentyx.sch
|
|
|
51
60
|
declare function buildAgentyxConfigJsonSchema(): Record<string, unknown>;
|
|
52
61
|
//#endregion
|
|
53
62
|
//#region src/config/schema.d.ts
|
|
54
|
-
/**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}>;
|
|
61
|
-
type AgentyxProfile = z.infer<typeof agentyxProfileSchema>;
|
|
62
|
-
/** Applied when a configuration omits `profile`. */
|
|
63
|
-
declare const DEFAULT_AGENTYX_PROFILE: AgentyxProfile;
|
|
63
|
+
/**
|
|
64
|
+
* Targets stay free-form strings on purpose: third-party adapters should be
|
|
65
|
+
* able to register providers without a change to this schema.
|
|
66
|
+
*/
|
|
67
|
+
declare const agentyxTargetSchema: z.ZodString;
|
|
68
|
+
declare const enabledCapabilityNameSchema: z.ZodString;
|
|
64
69
|
/** The `.agentyx.json` project configuration. */
|
|
65
70
|
declare const agentyxConfigSchema: z.ZodObject<{
|
|
66
71
|
$schema: z.ZodOptional<z.ZodString>;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
lean: "lean";
|
|
70
|
-
balanced: "balanced";
|
|
71
|
-
autonomous: "autonomous";
|
|
72
|
-
}>>;
|
|
72
|
+
packs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
73
|
+
enable: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
73
74
|
targets: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
74
75
|
}, z.core.$strict>;
|
|
75
76
|
/** A validated configuration, with defaults applied. */
|
|
@@ -100,11 +101,10 @@ declare function parseAgentyxConfig(value: unknown, filePath?: string): AgentyxC
|
|
|
100
101
|
declare function loadAgentyxConfig(projectPath?: string): Promise<AgentyxConfig>;
|
|
101
102
|
//#endregion
|
|
102
103
|
//#region src/mcp/schema.d.ts
|
|
103
|
-
declare const MCP_CAPABILITY_LEVELS: readonly ["
|
|
104
|
+
declare const MCP_CAPABILITY_LEVELS: readonly ["default", "optional"];
|
|
104
105
|
declare const mcpCapabilityLevelSchema: z.ZodEnum<{
|
|
105
106
|
optional: "optional";
|
|
106
|
-
|
|
107
|
-
recommended: "recommended";
|
|
107
|
+
default: "default";
|
|
108
108
|
}>;
|
|
109
109
|
declare const MCP_CONTEXT_COSTS: readonly ["low", "medium", "high"];
|
|
110
110
|
declare const mcpContextCostSchema: z.ZodEnum<{
|
|
@@ -117,23 +117,21 @@ declare const mcpEnvReferenceSchema: z.ZodObject<{
|
|
|
117
117
|
}, z.core.$strict>;
|
|
118
118
|
declare const mcpServerReferenceSchema: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
119
119
|
name: z.ZodString;
|
|
120
|
-
|
|
120
|
+
activation: z.ZodDefault<z.ZodEnum<{
|
|
121
121
|
optional: "optional";
|
|
122
|
-
|
|
123
|
-
recommended: "recommended";
|
|
122
|
+
default: "default";
|
|
124
123
|
}>>;
|
|
125
124
|
}, z.core.$strict>]>, z.ZodTransform<{
|
|
126
125
|
name: string;
|
|
127
|
-
|
|
126
|
+
activation: "optional" | "default";
|
|
128
127
|
}, string | {
|
|
129
128
|
name: string;
|
|
130
|
-
|
|
129
|
+
activation: "optional" | "default";
|
|
131
130
|
}>>, z.ZodObject<{
|
|
132
131
|
name: z.ZodString;
|
|
133
|
-
|
|
132
|
+
activation: z.ZodEnum<{
|
|
134
133
|
optional: "optional";
|
|
135
|
-
|
|
136
|
-
recommended: "recommended";
|
|
134
|
+
default: "default";
|
|
137
135
|
}>;
|
|
138
136
|
}, z.core.$strict>>;
|
|
139
137
|
declare const mcpServerDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -191,6 +189,94 @@ interface McpServerRegistry {
|
|
|
191
189
|
}
|
|
192
190
|
declare function createMcpServerRegistry(sources: Iterable<McpServerSource>): McpServerRegistry;
|
|
193
191
|
//#endregion
|
|
192
|
+
//#region src/pack/schema.d.ts
|
|
193
|
+
declare const PACK_CATEGORIES: readonly ["engineering", "language", "framework", "efficiency", "workflow"];
|
|
194
|
+
declare const packCategorySchema: z.ZodEnum<{
|
|
195
|
+
engineering: "engineering";
|
|
196
|
+
language: "language";
|
|
197
|
+
framework: "framework";
|
|
198
|
+
efficiency: "efficiency";
|
|
199
|
+
workflow: "workflow";
|
|
200
|
+
}>;
|
|
201
|
+
/**
|
|
202
|
+
* Pack names are plain identifiers. They are intentionally not constrained to
|
|
203
|
+
* a closed list so that external registries can contribute packs later.
|
|
204
|
+
*/
|
|
205
|
+
declare const packNameSchema: z.ZodString;
|
|
206
|
+
/** A pack is a composable provider-neutral capability bundle. */
|
|
207
|
+
declare const packDefinitionSchema: z.ZodObject<{
|
|
208
|
+
name: z.ZodString;
|
|
209
|
+
category: z.ZodDefault<z.ZodEnum<{
|
|
210
|
+
engineering: "engineering";
|
|
211
|
+
language: "language";
|
|
212
|
+
framework: "framework";
|
|
213
|
+
efficiency: "efficiency";
|
|
214
|
+
workflow: "workflow";
|
|
215
|
+
}>>;
|
|
216
|
+
description: z.ZodOptional<z.ZodString>;
|
|
217
|
+
skills: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
218
|
+
mcpServers: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
219
|
+
name: z.ZodString;
|
|
220
|
+
activation: z.ZodDefault<z.ZodEnum<{
|
|
221
|
+
optional: "optional";
|
|
222
|
+
default: "default";
|
|
223
|
+
}>>;
|
|
224
|
+
}, z.core.$strict>]>, z.ZodTransform<{
|
|
225
|
+
name: string;
|
|
226
|
+
activation: "optional" | "default";
|
|
227
|
+
}, string | {
|
|
228
|
+
name: string;
|
|
229
|
+
activation: "optional" | "default";
|
|
230
|
+
}>>, z.ZodObject<{
|
|
231
|
+
name: z.ZodString;
|
|
232
|
+
activation: z.ZodEnum<{
|
|
233
|
+
optional: "optional";
|
|
234
|
+
default: "default";
|
|
235
|
+
}>;
|
|
236
|
+
}, z.core.$strict>>>>;
|
|
237
|
+
tools: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
238
|
+
name: z.ZodString;
|
|
239
|
+
activation: z.ZodDefault<z.ZodEnum<{
|
|
240
|
+
optional: "optional";
|
|
241
|
+
default: "default";
|
|
242
|
+
}>>;
|
|
243
|
+
}, z.core.$strict>]>, z.ZodTransform<{
|
|
244
|
+
name: string;
|
|
245
|
+
activation: "optional" | "default";
|
|
246
|
+
}, string | {
|
|
247
|
+
name: string;
|
|
248
|
+
activation: "optional" | "default";
|
|
249
|
+
}>>, z.ZodObject<{
|
|
250
|
+
name: z.ZodString;
|
|
251
|
+
activation: z.ZodEnum<{
|
|
252
|
+
optional: "optional";
|
|
253
|
+
default: "default";
|
|
254
|
+
}>;
|
|
255
|
+
}, z.core.$strict>>>>;
|
|
256
|
+
}, z.core.$strict>;
|
|
257
|
+
/** A validated pack definition, with defaults always present. */
|
|
258
|
+
type PackDefinition = z.infer<typeof packDefinitionSchema>;
|
|
259
|
+
type PackCategory = z.infer<typeof packCategorySchema>;
|
|
260
|
+
/** The shape accepted when authoring a pack definition. */
|
|
261
|
+
type PackDefinitionInput = z.input<typeof packDefinitionSchema>;
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region src/pack/registry.d.ts
|
|
264
|
+
/**
|
|
265
|
+
* A registry is a name lookup over pack definitions. Keeping it a plain map
|
|
266
|
+
* means the resolver stays independent of where definitions come from, so
|
|
267
|
+
* external registries can be added later without touching resolution.
|
|
268
|
+
*/
|
|
269
|
+
type PackRegistry = ReadonlyMap<string, PackDefinition>;
|
|
270
|
+
/** Validates definitions and indexes them by name. */
|
|
271
|
+
declare function createPackRegistry(definitions: Iterable<PackDefinitionInput>): PackRegistry;
|
|
272
|
+
/**
|
|
273
|
+
* The packs Agentyx ships with, expressed as data. Relationships live here, not
|
|
274
|
+
* in the resolver.
|
|
275
|
+
*/
|
|
276
|
+
declare const builtInPacks: readonly PackDefinitionInput[];
|
|
277
|
+
/** The registry used by default when no explicit registry is supplied. */
|
|
278
|
+
declare const builtInPackRegistry: PackRegistry;
|
|
279
|
+
//#endregion
|
|
194
280
|
//#region src/skill/schema.d.ts
|
|
195
281
|
/**
|
|
196
282
|
* A Skill is reusable instruction text for a coding agent. It is deliberately
|
|
@@ -244,86 +330,236 @@ interface SkillRegistry {
|
|
|
244
330
|
*/
|
|
245
331
|
declare function createSkillRegistry(sources: Iterable<SkillSource>): SkillRegistry;
|
|
246
332
|
//#endregion
|
|
247
|
-
//#region src/
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
333
|
+
//#region src/tool/schema.d.ts
|
|
334
|
+
declare const TOOL_ACTIVATION_LEVELS: readonly ["default", "optional"];
|
|
335
|
+
declare const toolActivationLevelSchema: z.ZodEnum<{
|
|
336
|
+
optional: "optional";
|
|
337
|
+
default: "default";
|
|
338
|
+
}>;
|
|
339
|
+
declare const toolNameSchema: z.ZodString;
|
|
340
|
+
declare const toolReferenceSchema: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
253
341
|
name: z.ZodString;
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
342
|
+
activation: z.ZodDefault<z.ZodEnum<{
|
|
343
|
+
optional: "optional";
|
|
344
|
+
default: "default";
|
|
345
|
+
}>>;
|
|
346
|
+
}, z.core.$strict>]>, z.ZodTransform<{
|
|
347
|
+
name: string;
|
|
348
|
+
activation: "optional" | "default";
|
|
349
|
+
}, string | {
|
|
350
|
+
name: string;
|
|
351
|
+
activation: "optional" | "default";
|
|
352
|
+
}>>, z.ZodObject<{
|
|
353
|
+
name: z.ZodString;
|
|
354
|
+
activation: z.ZodEnum<{
|
|
355
|
+
optional: "optional";
|
|
356
|
+
default: "default";
|
|
357
|
+
}>;
|
|
358
|
+
}, z.core.$strict>>;
|
|
359
|
+
declare const toolDefinitionSchema: z.ZodObject<{
|
|
360
|
+
name: z.ZodString;
|
|
361
|
+
description: z.ZodString;
|
|
362
|
+
kind: z.ZodLiteral<"executable">;
|
|
363
|
+
command: z.ZodString;
|
|
364
|
+
optional: z.ZodDefault<z.ZodBoolean>;
|
|
365
|
+
installHint: z.ZodOptional<z.ZodString>;
|
|
278
366
|
}, z.core.$strict>;
|
|
279
|
-
|
|
280
|
-
type
|
|
281
|
-
|
|
282
|
-
type
|
|
367
|
+
type ToolActivationLevel = z.infer<typeof toolActivationLevelSchema>;
|
|
368
|
+
type ToolDefinition = z.infer<typeof toolDefinitionSchema>;
|
|
369
|
+
type ToolDefinitionInput = z.input<typeof toolDefinitionSchema>;
|
|
370
|
+
type ToolReference = z.infer<typeof toolReferenceSchema>;
|
|
371
|
+
type ToolReferenceInput = z.input<typeof toolReferenceSchema>;
|
|
283
372
|
//#endregion
|
|
284
|
-
//#region src/
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
373
|
+
//#region src/tool/registry.d.ts
|
|
374
|
+
interface ToolSource {
|
|
375
|
+
readonly name: string;
|
|
376
|
+
load(): ToolDefinitionInput;
|
|
377
|
+
}
|
|
378
|
+
interface ToolMetadata {
|
|
379
|
+
readonly name: string;
|
|
380
|
+
readonly description: string;
|
|
381
|
+
readonly kind: ToolDefinition["kind"];
|
|
382
|
+
readonly command: string;
|
|
383
|
+
readonly optional: boolean;
|
|
384
|
+
}
|
|
385
|
+
interface ToolRegistry {
|
|
386
|
+
readonly names: readonly string[];
|
|
387
|
+
has(name: string): boolean;
|
|
388
|
+
listMetadata(): readonly ToolMetadata[];
|
|
389
|
+
get(name: string): ToolDefinition;
|
|
390
|
+
}
|
|
391
|
+
declare function createToolRegistry(sources: Iterable<ToolSource>): ToolRegistry;
|
|
300
392
|
//#endregion
|
|
301
393
|
//#region src/config/resolver.d.ts
|
|
302
|
-
/** A project configuration with its
|
|
394
|
+
/** A project configuration with its pack inheritance expanded. */
|
|
303
395
|
interface ResolvedAgentyxConfig {
|
|
304
|
-
/** The
|
|
305
|
-
readonly
|
|
306
|
-
/**
|
|
307
|
-
readonly
|
|
396
|
+
/** The packs the project asked for, in configuration order. */
|
|
397
|
+
readonly requestedPacks: readonly string[];
|
|
398
|
+
/** Selected packs, de-duplicated while preserving configuration order. */
|
|
399
|
+
readonly resolvedPacks: readonly string[];
|
|
308
400
|
/**
|
|
309
|
-
* Skill identifiers contributed by the resolved
|
|
401
|
+
* Skill identifiers contributed by the resolved packs, in resolution order.
|
|
310
402
|
* Identifiers only — reading the instructions is a separate, explicit step.
|
|
311
403
|
*/
|
|
312
404
|
readonly skills: readonly string[];
|
|
313
405
|
readonly declaredMcpServers: readonly McpServerReference[];
|
|
314
406
|
readonly mcpServers: readonly string[];
|
|
315
|
-
readonly
|
|
407
|
+
readonly declaredTools: readonly ToolReference[];
|
|
408
|
+
readonly tools: readonly string[];
|
|
409
|
+
readonly enabled: readonly string[];
|
|
316
410
|
readonly targets: readonly string[];
|
|
317
411
|
}
|
|
318
412
|
/**
|
|
319
|
-
* Combines a validated project configuration with
|
|
413
|
+
* Combines a validated project configuration with pack and skill resolution.
|
|
320
414
|
* The input is never mutated.
|
|
321
415
|
*
|
|
322
|
-
* @throws {
|
|
323
|
-
* @throws {
|
|
324
|
-
* @throws {UnknownSkillError} when a
|
|
416
|
+
* @throws {UnknownPackError} when a configured pack is missing.
|
|
417
|
+
* @throws {CircularPackDependencyError} when inheritance forms a cycle.
|
|
418
|
+
* @throws {UnknownSkillError} when a pack references an unknown skill.
|
|
419
|
+
*/
|
|
420
|
+
declare function resolveAgentyxConfig(config: AgentyxConfig, registry?: PackRegistry, skillRegistry?: SkillRegistry, mcpRegistry?: McpServerRegistry, toolRegistry?: ToolRegistry): ResolvedAgentyxConfig;
|
|
421
|
+
//#endregion
|
|
422
|
+
//#region src/manifest/errors.d.ts
|
|
423
|
+
/** Raised when `.agentyx.lock.json` is not valid JSON. */
|
|
424
|
+
declare class AgentyxManifestParseError extends AgentyxError {
|
|
425
|
+
readonly filePath: string;
|
|
426
|
+
constructor(filePath: string, reason: string, options?: ErrorOptions);
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Raised when the manifest parses as JSON but is not a manifest Agentyx
|
|
430
|
+
* understands.
|
|
431
|
+
*
|
|
432
|
+
* This is never repaired. The manifest is what tells Agentyx which files it is
|
|
433
|
+
* allowed to overwrite and delete, so guessing at a damaged one would be
|
|
434
|
+
* guessing about destructive operations.
|
|
325
435
|
*/
|
|
326
|
-
declare
|
|
436
|
+
declare class AgentyxManifestValidationError extends AgentyxError {
|
|
437
|
+
readonly issues: readonly AgentyxIssue[];
|
|
438
|
+
readonly filePath: string | undefined;
|
|
439
|
+
constructor(error: ZodError, filePath?: string);
|
|
440
|
+
}
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region src/manifest/schema.d.ts
|
|
443
|
+
/**
|
|
444
|
+
* The manifest format version.
|
|
445
|
+
*
|
|
446
|
+
* A manifest written by a newer Agentyx fails validation instead of being
|
|
447
|
+
* reinterpreted, because acting on a half-understood record of managed files is
|
|
448
|
+
* how an installer deletes something it should not.
|
|
449
|
+
*/
|
|
450
|
+
declare const INSTALL_MANIFEST_VERSION = 1;
|
|
451
|
+
/** A `SKILL.md` file Agentyx wrote, owned entirely by Agentyx. */
|
|
452
|
+
declare const skillManifestEntrySchema: z.ZodObject<{
|
|
453
|
+
kind: z.ZodLiteral<"skill">;
|
|
454
|
+
path: z.ZodString;
|
|
455
|
+
skill: z.ZodString;
|
|
456
|
+
targets: z.ZodArray<z.ZodString>;
|
|
457
|
+
hash: z.ZodString;
|
|
458
|
+
}, z.core.$strict>;
|
|
459
|
+
/**
|
|
460
|
+
* A provider MCP configuration file Agentyx contributed entries to.
|
|
461
|
+
*
|
|
462
|
+
* Unlike a skill file this one is shared with the user, so the entry records
|
|
463
|
+
* the server keys Agentyx added rather than claiming the whole document.
|
|
464
|
+
* `created` says whether the file existed before Agentyx first wrote it, which
|
|
465
|
+
* is the only thing that makes removing the file itself safe.
|
|
466
|
+
*/
|
|
467
|
+
declare const mcpManifestEntrySchema: z.ZodObject<{
|
|
468
|
+
kind: z.ZodLiteral<"mcp">;
|
|
469
|
+
path: z.ZodString;
|
|
470
|
+
servers: z.ZodArray<z.ZodString>;
|
|
471
|
+
targets: z.ZodArray<z.ZodString>;
|
|
472
|
+
hash: z.ZodString;
|
|
473
|
+
created: z.ZodBoolean;
|
|
474
|
+
}, z.core.$strict>;
|
|
475
|
+
declare const installManifestEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
476
|
+
kind: z.ZodLiteral<"skill">;
|
|
477
|
+
path: z.ZodString;
|
|
478
|
+
skill: z.ZodString;
|
|
479
|
+
targets: z.ZodArray<z.ZodString>;
|
|
480
|
+
hash: z.ZodString;
|
|
481
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
482
|
+
kind: z.ZodLiteral<"mcp">;
|
|
483
|
+
path: z.ZodString;
|
|
484
|
+
servers: z.ZodArray<z.ZodString>;
|
|
485
|
+
targets: z.ZodArray<z.ZodString>;
|
|
486
|
+
hash: z.ZodString;
|
|
487
|
+
created: z.ZodBoolean;
|
|
488
|
+
}, z.core.$strict>], "kind">;
|
|
489
|
+
/** The `.agentyx.lock.json` record of everything Agentyx installed into a project. */
|
|
490
|
+
declare const installManifestSchema: z.ZodObject<{
|
|
491
|
+
version: z.ZodLiteral<1>;
|
|
492
|
+
entries: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
493
|
+
kind: z.ZodLiteral<"skill">;
|
|
494
|
+
path: z.ZodString;
|
|
495
|
+
skill: z.ZodString;
|
|
496
|
+
targets: z.ZodArray<z.ZodString>;
|
|
497
|
+
hash: z.ZodString;
|
|
498
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
499
|
+
kind: z.ZodLiteral<"mcp">;
|
|
500
|
+
path: z.ZodString;
|
|
501
|
+
servers: z.ZodArray<z.ZodString>;
|
|
502
|
+
targets: z.ZodArray<z.ZodString>;
|
|
503
|
+
hash: z.ZodString;
|
|
504
|
+
created: z.ZodBoolean;
|
|
505
|
+
}, z.core.$strict>], "kind">>>;
|
|
506
|
+
}, z.core.$strict>;
|
|
507
|
+
type SkillManifestEntry = z.infer<typeof skillManifestEntrySchema>;
|
|
508
|
+
type McpManifestEntry = z.infer<typeof mcpManifestEntrySchema>;
|
|
509
|
+
type InstallManifestEntry = z.infer<typeof installManifestEntrySchema>;
|
|
510
|
+
/** A validated manifest, with defaults applied. */
|
|
511
|
+
type InstallManifest = z.infer<typeof installManifestSchema>;
|
|
512
|
+
/** The shape accepted in a `.agentyx.lock.json` file. */
|
|
513
|
+
type InstallManifestInput = z.input<typeof installManifestSchema>;
|
|
514
|
+
//#endregion
|
|
515
|
+
//#region src/manifest/io.d.ts
|
|
516
|
+
declare const AGENTYX_MANIFEST_FILENAME = ".agentyx.lock.json";
|
|
517
|
+
/** The absolute path `.agentyx.lock.json` is read from for a given project. */
|
|
518
|
+
declare function agentyxManifestPath(projectPath?: string): string;
|
|
519
|
+
/** A manifest that claims nothing — what a project has before its first install. */
|
|
520
|
+
declare function emptyInstallManifest(): InstallManifest;
|
|
521
|
+
/**
|
|
522
|
+
* The SHA-256 digest Agentyx records for managed content.
|
|
523
|
+
*
|
|
524
|
+
* Comparing this digest with the file on disk is what separates "Agentyx wrote
|
|
525
|
+
* this and may replace it" from "someone else owns this file", so it is
|
|
526
|
+
* computed over the exact bytes written, never over a normalised form.
|
|
527
|
+
*/
|
|
528
|
+
declare function hashContent(content: string): string;
|
|
529
|
+
/**
|
|
530
|
+
* Validates an already-parsed manifest document.
|
|
531
|
+
*
|
|
532
|
+
* @throws {AgentyxManifestValidationError} when the document violates the schema.
|
|
533
|
+
*/
|
|
534
|
+
declare function parseInstallManifest(value: unknown, filePath?: string): InstallManifest;
|
|
535
|
+
/**
|
|
536
|
+
* Reads `.agentyx.lock.json` from `projectPath`.
|
|
537
|
+
*
|
|
538
|
+
* A missing manifest is a legitimate state — the project has simply never been
|
|
539
|
+
* installed into — and yields an empty manifest. A manifest that exists but
|
|
540
|
+
* cannot be understood is a hard failure: it governs which files Agentyx may
|
|
541
|
+
* overwrite and delete, and a damaged one is never guessed at.
|
|
542
|
+
*
|
|
543
|
+
* @throws {AgentyxManifestParseError} when the file is not valid JSON.
|
|
544
|
+
* @throws {AgentyxManifestValidationError} when the document violates the schema.
|
|
545
|
+
*/
|
|
546
|
+
declare function loadInstallManifest(projectPath?: string): Promise<InstallManifest>;
|
|
547
|
+
/**
|
|
548
|
+
* Serialises a manifest for writing.
|
|
549
|
+
*
|
|
550
|
+
* Entries and their lists are sorted so that reinstalling an unchanged project
|
|
551
|
+
* produces a byte-identical file and the manifest never shows up as noise in a
|
|
552
|
+
* diff. Writing is deliberately not done here — only the install executor
|
|
553
|
+
* touches the filesystem.
|
|
554
|
+
*/
|
|
555
|
+
declare function formatInstallManifest(manifest: InstallManifest): string;
|
|
556
|
+
/**
|
|
557
|
+
* Indexes manifest entries by managed path.
|
|
558
|
+
*
|
|
559
|
+
* Every ownership question — may this file be overwritten, may it be deleted —
|
|
560
|
+
* is a lookup by path, so callers do not scan the list themselves.
|
|
561
|
+
*/
|
|
562
|
+
declare function manifestEntriesByPath(manifest: InstallManifest): ReadonlyMap<string, InstallManifestEntry>;
|
|
327
563
|
//#endregion
|
|
328
564
|
//#region src/mcp/built-in.d.ts
|
|
329
565
|
declare const builtInMcpServerRegistry: McpServerRegistry;
|
|
@@ -347,27 +583,46 @@ declare class InvalidMcpServerError extends AgentyxError {
|
|
|
347
583
|
}
|
|
348
584
|
//#endregion
|
|
349
585
|
//#region src/mcp/resolver.d.ts
|
|
350
|
-
declare function
|
|
351
|
-
declare function filterEffectiveMcpServers(servers: readonly McpServerReference[],
|
|
352
|
-
declare function
|
|
353
|
-
declare function
|
|
354
|
-
declare function
|
|
586
|
+
declare function collectPackMcpServerReferences(resolvedPacks: readonly string[], packRegistry: PackRegistry, mcpRegistry: McpServerRegistry): McpServerReference[];
|
|
587
|
+
declare function filterEffectiveMcpServers(servers: readonly McpServerReference[], enabledCapabilities: readonly string[]): string[];
|
|
588
|
+
declare function collectPackMcpServers(resolvedPacks: readonly string[], packRegistry: PackRegistry, mcpRegistry: McpServerRegistry, enabledCapabilities?: readonly string[]): string[];
|
|
589
|
+
declare function resolvePackMcpServerReferences(requestedPacks: readonly string[], packRegistry?: PackRegistry, mcpRegistry?: McpServerRegistry): McpServerReference[];
|
|
590
|
+
declare function resolvePackMcpServers(requestedPacks: readonly string[], packRegistry?: PackRegistry, mcpRegistry?: McpServerRegistry, enabledCapabilities?: readonly string[]): string[];
|
|
355
591
|
//#endregion
|
|
356
592
|
//#region src/meta.d.ts
|
|
357
593
|
declare const agentyxCoreName = "agentyx-core";
|
|
358
594
|
declare function getCoreStatus(): string;
|
|
359
595
|
//#endregion
|
|
360
|
-
//#region src/
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
readonly
|
|
364
|
-
readonly
|
|
365
|
-
readonly
|
|
596
|
+
//#region src/pack/errors.d.ts
|
|
597
|
+
/** Raised when a requested pack is not present in the registry. */
|
|
598
|
+
declare class UnknownPackError extends AgentyxError {
|
|
599
|
+
readonly packName: string;
|
|
600
|
+
readonly requiredBy: string | undefined;
|
|
601
|
+
readonly knownPacks: readonly string[];
|
|
602
|
+
constructor(packName: string, requiredBy: string | undefined, knownPacks: readonly string[]);
|
|
366
603
|
}
|
|
367
|
-
|
|
368
|
-
declare
|
|
369
|
-
|
|
370
|
-
|
|
604
|
+
/** @deprecated Packs no longer inherit from other packs. */
|
|
605
|
+
declare class CircularPackDependencyError extends AgentyxError {
|
|
606
|
+
/** The cycle path, starting and ending with the same pack. */
|
|
607
|
+
readonly cycle: readonly string[];
|
|
608
|
+
constructor(cycle: readonly string[]);
|
|
609
|
+
}
|
|
610
|
+
/** Raised when a registry is built from definitions that reuse a pack name. */
|
|
611
|
+
declare class DuplicatePackError extends AgentyxError {
|
|
612
|
+
readonly packName: string;
|
|
613
|
+
constructor(packName: string);
|
|
614
|
+
}
|
|
615
|
+
//#endregion
|
|
616
|
+
//#region src/pack/resolver.d.ts
|
|
617
|
+
/**
|
|
618
|
+
* Resolves selected packs without hidden inheritance.
|
|
619
|
+
*
|
|
620
|
+
* The result preserves configured order, removes duplicates by first
|
|
621
|
+
* occurrence, and validates every requested pack.
|
|
622
|
+
*
|
|
623
|
+
* @throws {UnknownPackError} when a requested pack is missing.
|
|
624
|
+
*/
|
|
625
|
+
declare function resolvePacks(requestedPacks: readonly string[], registry?: PackRegistry): string[];
|
|
371
626
|
//#endregion
|
|
372
627
|
//#region src/project/detector.d.ts
|
|
373
628
|
declare const PACKAGE_MANAGERS: readonly ["pnpm", "npm", "yarn", "bun"];
|
|
@@ -390,13 +645,13 @@ interface ProjectDetection {
|
|
|
390
645
|
readonly projectDir: string;
|
|
391
646
|
readonly packageJson: ProjectPackageJsonDetection;
|
|
392
647
|
readonly packageManager: PackageManagerDetection;
|
|
393
|
-
readonly
|
|
394
|
-
readonly
|
|
648
|
+
readonly detectedPacks: readonly string[];
|
|
649
|
+
readonly recommendedPacks: readonly string[];
|
|
395
650
|
}
|
|
396
651
|
declare function detectProject(projectDir: string): Promise<ProjectDetection>;
|
|
397
652
|
declare function buildAgentyxConfig(input: {
|
|
398
|
-
readonly
|
|
399
|
-
readonly
|
|
653
|
+
readonly packs: readonly string[];
|
|
654
|
+
readonly enable?: readonly string[];
|
|
400
655
|
readonly targets: readonly string[];
|
|
401
656
|
}): AgentyxConfigInput;
|
|
402
657
|
declare function formatAgentyxConfig(config: AgentyxConfigInput): string;
|
|
@@ -405,22 +660,22 @@ declare function formatAgentyxConfig(config: AgentyxConfigInput): string;
|
|
|
405
660
|
/**
|
|
406
661
|
* The skills Agentyx ships with. The names are the directory names under
|
|
407
662
|
* `packages/core/skills`, and knowing them without touching the filesystem is
|
|
408
|
-
* what lets
|
|
663
|
+
* what lets pack resolution validate references without reading any body.
|
|
409
664
|
*/
|
|
410
|
-
declare const builtInSkillNames: readonly ["planning", "systematic-debugging", "verification", "typescript-modern", "angular-modern"];
|
|
665
|
+
declare const builtInSkillNames: readonly ["engineering-principles", "code-quality", "api-design", "code-review", "planning", "systematic-debugging", "verification", "brainstorming", "parallel-work", "worktree-workflow", "subagent-driven-development", "requesting-code-review", "typescript-strict", "typescript-modeling", "typescript-modern", "angular-modern", "angular-signals", "angular-architecture", "angular-testing", "context-efficient-development", "concise-output", "targeted-exploration", "focused-verification", "test-strategy", "test-doubles", "e2e-testing", "flaky-tests", "secure-coding", "secrets-handling", "dependency-security", "auth-patterns", "performance-profiling", "web-vitals", "query-performance", "semantic-html", "aria-patterns", "keyboard-navigation", "refactoring-safely", "legacy-code", "dependency-hygiene", "technical-writing", "api-documentation", "decision-records", "structured-logging", "metrics-and-tracing", "incident-response", "data-modeling", "schema-migrations", "transactions-and-consistency", "commit-hygiene", "branching-strategy", "pull-requests", "ci-pipelines", "containerization", "deployment-safety", "infrastructure-as-code"];
|
|
411
666
|
/** The registry used by default when no explicit registry is supplied. */
|
|
412
667
|
declare const builtInSkillRegistry: SkillRegistry;
|
|
413
668
|
//#endregion
|
|
414
669
|
//#region src/skill/errors.d.ts
|
|
415
670
|
/**
|
|
416
|
-
* Raised when a
|
|
671
|
+
* Raised when a pack references a skill the registry does not know.
|
|
417
672
|
*
|
|
418
|
-
* The offending name is exposed as `skillName`; `
|
|
673
|
+
* The offending name is exposed as `skillName`; `pack` stays the JS pack
|
|
419
674
|
* trace inherited from `Error`.
|
|
420
675
|
*/
|
|
421
676
|
declare class UnknownSkillError extends AgentyxError {
|
|
422
677
|
readonly skillName: string;
|
|
423
|
-
/** The
|
|
678
|
+
/** The pack that declared the skill, when the failure came from resolution. */
|
|
424
679
|
readonly requiredBy: string | undefined;
|
|
425
680
|
readonly knownSkills: readonly string[];
|
|
426
681
|
constructor(skillName: string, requiredBy: string | undefined, knownSkills: readonly string[]);
|
|
@@ -487,55 +742,41 @@ declare function formatSkillMarkdown(skill: SkillDefinitionInput): string;
|
|
|
487
742
|
//#endregion
|
|
488
743
|
//#region src/skill/resolver.d.ts
|
|
489
744
|
/**
|
|
490
|
-
*
|
|
745
|
+
* Resolves the requested packs and returns the skills they contribute.
|
|
491
746
|
*
|
|
492
|
-
* The result follows the resolved
|
|
747
|
+
* The result follows the resolved pack order, then each pack's declaration
|
|
493
748
|
* order, and is de-duplicated by first occurrence. Skills do not extend other
|
|
494
749
|
* skills, so there is nothing further to expand.
|
|
495
750
|
*
|
|
496
|
-
* @throws {
|
|
497
|
-
* @throws {
|
|
498
|
-
* @throws {UnknownSkillError} when a stack references a skill the registry lacks.
|
|
751
|
+
* @throws {UnknownPackError} when a requested pack is missing.
|
|
752
|
+
* @throws {UnknownSkillError} when a pack references a skill the registry lacks.
|
|
499
753
|
*/
|
|
500
|
-
declare function
|
|
754
|
+
declare function resolvePackSkills(requestedPacks: readonly string[], packRegistry?: PackRegistry, skillRegistry?: SkillRegistry): string[];
|
|
501
755
|
//#endregion
|
|
502
|
-
//#region src/
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
declare class UnknownStackError extends AgentyxError {
|
|
510
|
-
readonly stackName: string;
|
|
756
|
+
//#region src/tool/built-in.d.ts
|
|
757
|
+
declare const builtInToolRegistry: ToolRegistry;
|
|
758
|
+
declare const builtInToolNames: readonly string[];
|
|
759
|
+
//#endregion
|
|
760
|
+
//#region src/tool/errors.d.ts
|
|
761
|
+
declare class UnknownToolError extends AgentyxError {
|
|
762
|
+
readonly toolName: string;
|
|
511
763
|
readonly requiredBy: string | undefined;
|
|
512
|
-
readonly
|
|
513
|
-
constructor(
|
|
764
|
+
readonly knownTools: readonly string[];
|
|
765
|
+
constructor(toolName: string, requiredBy: string | undefined, knownTools: readonly string[]);
|
|
514
766
|
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
readonly cycle: readonly string[];
|
|
519
|
-
constructor(cycle: readonly string[]);
|
|
767
|
+
declare class DuplicateToolError extends AgentyxError {
|
|
768
|
+
readonly toolName: string;
|
|
769
|
+
constructor(toolName: string);
|
|
520
770
|
}
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
readonly stackName: string;
|
|
524
|
-
constructor(stackName: string);
|
|
771
|
+
declare class InvalidToolError extends AgentyxError {
|
|
772
|
+
constructor(origin: string, reason: unknown, options?: ErrorOptions);
|
|
525
773
|
}
|
|
526
774
|
//#endregion
|
|
527
|
-
//#region src/
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
* visited in the order they are requested, and each stack's parents are visited
|
|
533
|
-
* in declaration order before the stack itself.
|
|
534
|
-
*
|
|
535
|
-
* @throws {UnknownStackError} when a requested or inherited stack is missing.
|
|
536
|
-
* @throws {CircularStackDependencyError} when inheritance forms a cycle.
|
|
537
|
-
*/
|
|
538
|
-
declare function resolveStacks(requestedStacks: readonly string[], registry?: StackRegistry): string[];
|
|
775
|
+
//#region src/tool/resolver.d.ts
|
|
776
|
+
declare function collectPackToolReferences(resolvedPacks: readonly string[], packRegistry: PackRegistry, toolRegistry: ToolRegistry): ToolReference[];
|
|
777
|
+
declare function filterEffectiveTools(tools: readonly ToolReference[], enabledCapabilities: readonly string[]): string[];
|
|
778
|
+
declare function resolvePackToolReferences(requestedPacks: readonly string[], packRegistry?: PackRegistry, toolRegistry?: ToolRegistry): ToolReference[];
|
|
779
|
+
declare function resolvePackTools(requestedPacks: readonly string[], packRegistry?: PackRegistry, toolRegistry?: ToolRegistry, enabledCapabilities?: readonly string[]): string[];
|
|
539
780
|
//#endregion
|
|
540
|
-
export { AGENTYX_CONFIG_FILENAME, AGENTYX_CONFIG_SCHEMA_ID,
|
|
781
|
+
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, CircularPackDependencyError, DuplicateMcpServerError, DuplicatePackError, DuplicateSkillError, DuplicateToolError, INSTALL_MANIFEST_VERSION, type InstallManifest, type InstallManifestEntry, type InstallManifestInput, InvalidMcpServerError, InvalidSkillError, InvalidToolError, 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, PACKAGE_MANAGERS, PACK_CATEGORIES, type PackCategory, type PackDefinition, type PackDefinitionInput, type PackRegistry, type PackageManagerDetection, type PackageManagerName, type ProjectDetection, type ProjectPackageJsonDetection, type ResolvedAgentyxConfig, type SkillDefinition, type SkillDefinitionInput, type SkillManifestEntry, type SkillRegistry, type SkillSource, TOOL_ACTIVATION_LEVELS, type ToolActivationLevel, type ToolDefinition, type ToolDefinitionInput, type ToolMetadata, type ToolReference, type ToolReferenceInput, type ToolRegistry, type ToolSource, UnknownEnabledCapabilityError, UnknownMcpServerError, UnknownPackError, UnknownSkillError, UnknownToolError, agentyxConfigPath, agentyxConfigSchema, agentyxCoreName, agentyxManifestPath, agentyxTargetSchema, buildAgentyxConfig, buildAgentyxConfigJsonSchema, builtInMcpServerNames, builtInMcpServerRegistry, builtInPackRegistry, builtInPacks, builtInSkillNames, builtInSkillRegistry, builtInToolNames, builtInToolRegistry, collectPackMcpServerReferences, collectPackMcpServers, collectPackToolReferences, createMcpServerRegistry, createPackRegistry, createSkillRegistry, createToolRegistry, detectProject, emptyInstallManifest, enabledCapabilityNameSchema, filterEffectiveMcpServers, filterEffectiveTools, formatAgentyxConfig, formatInstallManifest, formatSkillMarkdown, getCoreStatus, hashContent, installManifestEntrySchema, installManifestSchema, loadAgentyxConfig, loadInstallManifest, manifestEntriesByPath, mcpCapabilityLevelSchema, mcpContextCostSchema, mcpEnvReferenceSchema, mcpManifestEntrySchema, mcpServerDefinitionSchema, mcpServerReferenceSchema, packCategorySchema, packDefinitionSchema, packNameSchema, parseAgentyxConfig, parseInstallManifest, parseSkillMarkdown, resolveAgentyxConfig, resolvePackMcpServerReferences, resolvePackMcpServers, resolvePackSkills, resolvePackToolReferences, resolvePackTools, resolvePacks, skillDefinitionSchema, skillManifestEntrySchema, toolActivationLevelSchema, toolDefinitionSchema, toolNameSchema, toolReferenceSchema };
|
|
541
782
|
//# sourceMappingURL=index.d.mts.map
|