@agentyx/core 0.1.0 → 0.2.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 CHANGED
@@ -1,60 +1,47 @@
1
1
  # @agentyx/core
2
2
 
3
- Domain foundations for [Agentyx](https://github.com/Andersseen/agentyx): the `.agentyx.json` configuration
4
- model, stack definitions, built-in stack/skill/MCP registries, optimization profiles, and
5
- resolution.
3
+ Domain foundations for Agentyx: `.agentyx.json` parsing, pack definitions, built-in Skill/MCP/tool
4
+ registries, project detection, JSON Schema generation, and provider-neutral resolution.
6
5
 
7
- This package has no dependency on Commander or any terminal UI — CLI concerns live in
8
- [`@agentyx/cli`](https://github.com/Andersseen/agentyx/tree/main/packages/cli).
6
+ This package has no dependency on Commander or terminal UI. CLI concerns live in `@agentyx/cli`, and
7
+ provider filesystem writes live in `@agentyx/adapters`.
9
8
 
10
9
  ```ts
11
10
  import {
12
- builtInSkillRegistry,
13
- builtInStacks,
11
+ builtInPacks,
14
12
  loadAgentyxConfig,
15
13
  resolveAgentyxConfig,
16
- resolveStackMcpServerReferences,
17
- resolveStacks,
18
- resolveStackSkills,
14
+ resolvePackSkills,
15
+ resolvePacks,
19
16
  } from "@agentyx/core";
20
17
 
21
- resolveStacks(["angular"]);
22
- // ["core", "typescript", "angular"]
18
+ builtInPacks.map((pack) => pack.name);
19
+ // ["technical", "typescript", "angular", "efficiency", "agentic"]
23
20
 
24
- resolveStackSkills(["angular"]);
25
- // ["planning", "systematic-debugging", "verification", "typescript-modern", "angular-modern"]
21
+ resolvePacks(["technical", "typescript", "angular"]);
22
+ // ["technical", "typescript", "angular"]
26
23
 
27
- resolveStackMcpServerReferences(["angular"]);
28
- // [{ name: "context7", level: "recommended" }]
24
+ resolvePackSkills(["typescript"]);
25
+ // ["typescript-strict", "typescript-modeling", "typescript-modern"]
29
26
 
30
27
  resolveAgentyxConfig(await loadAgentyxConfig(process.cwd()));
31
- // { requestedStacks, resolvedStacks, skills, declaredMcpServers, mcpServers, profile, targets }
28
+ // { requestedPacks, resolvedPacks, skills, declaredMcpServers, mcpServers, declaredTools, tools, enabled, targets }
32
29
  ```
33
30
 
34
- ## Skills
31
+ Packs are composable capability bundles. They can contribute default Skills, default MCP servers, and
32
+ optional MCP/tool capabilities. Optional capabilities are active only when their identifier appears
33
+ in `enable`.
35
34
 
36
- A skill is provider-independent instruction text: `{ name, description, content }` and nothing else.
37
- The built-in skills ship as `SKILL.md` files under `skills/`, with YAML frontmatter for the metadata
38
- and the Markdown body as the content, and are published alongside `dist/`.
39
-
40
- Resolution works on identifiers, and `SkillRegistry.get(name)` is what reads a body:
41
-
42
- ```ts
43
- builtInSkillRegistry.names; // identifiers, no file is read
44
- builtInSkillRegistry.has("planning"); // no file is read
45
- builtInSkillRegistry.get("planning"); // reads, validates and caches SKILL.md
35
+ ```json
36
+ {
37
+ "packs": ["technical", "typescript", "efficiency"],
38
+ "enable": ["rtk"],
39
+ "targets": ["codex"]
40
+ }
46
41
  ```
47
42
 
48
- `createSkillRegistry(sources)` builds an independent registry from `{ name, load }` sources — the
49
- seam an external registry would use later. `parseSkillMarkdown(markdown, origin)` parses one
50
- `SKILL.md`, and `formatSkillMarkdown(skill)` renders one deterministically. That serializer is the
51
- canonical form every provider installs, which is why it lives here: an adapter decides where a skill
52
- goes, never what it says.
53
-
54
- MCP resolution keeps both declared and effective capabilities visible. Profiles are provider-neutral:
55
- `lean` enables essential MCP only, `balanced` enables essential and recommended MCP, and
56
- `autonomous` enables essential, recommended and optional MCP. Skill identifiers are not filtered by
57
- profile.
43
+ Skills ship as `SKILL.md` assets under `skills/`. Resolution returns identifiers only; a Skill body
44
+ is read only when `SkillRegistry.get(name)` is called.
58
45
 
59
46
  The JSON Schema for `.agentyx.json` ships with the package:
60
47
 
@@ -64,14 +51,8 @@ The JSON Schema for `.agentyx.json` ships with the package:
64
51
  }
65
52
  ```
66
53
 
67
- Resolution failures throw domain errors — `UnknownStackError`, `CircularStackDependencyError`,
68
- `UnknownSkillError`, `DuplicateSkillError`, `InvalidSkillError`, `AgentyxConfigNotFoundError`,
69
- `AgentyxConfigParseError`, `AgentyxConfigValidationError` — all extending `AgentyxError` with a stable
70
- `code`.
71
-
72
- Installing skills and effective MCP capabilities into an agent is
73
- [`@agentyx/adapters`](https://github.com/Andersseen/agentyx/tree/main/packages/adapters); core knows
74
- nothing about providers. See the [main README](https://github.com/Andersseen/agentyx#readme) for the
75
- full picture.
54
+ Resolution failures throw domain errors extending `AgentyxError`, including `UnknownPackError`,
55
+ `UnknownEnabledCapabilityError`, `UnknownSkillError`, `UnknownMcpServerError`, and
56
+ `UnknownToolError`.
76
57
 
77
58
  MIT © Andersseen
package/dist/index.d.mts CHANGED
@@ -36,6 +36,11 @@ declare class AgentyxConfigValidationError extends AgentyxError {
36
36
  readonly filePath: string | undefined;
37
37
  constructor(error: ZodError, filePath?: string);
38
38
  }
39
+ declare class UnknownEnabledCapabilityError extends AgentyxError {
40
+ readonly capabilityName: string;
41
+ readonly knownCapabilities: readonly string[];
42
+ constructor(capabilityName: string, knownCapabilities: readonly string[]);
43
+ }
39
44
  //#endregion
40
45
  //#region src/config/json-schema.d.ts
41
46
  /** Canonical identifier of the published `.agentyx.json` schema. */
@@ -51,25 +56,17 @@ declare const AGENTYX_CONFIG_SCHEMA_ID = "https://agentyx.dev/schema/agentyx.sch
51
56
  declare function buildAgentyxConfigJsonSchema(): Record<string, unknown>;
52
57
  //#endregion
53
58
  //#region src/config/schema.d.ts
54
- /** How much autonomy the generated environment should grant an agent. */
55
- declare const AGENTYX_PROFILES: readonly ["lean", "balanced", "autonomous"];
56
- declare const agentyxProfileSchema: z.ZodEnum<{
57
- lean: "lean";
58
- balanced: "balanced";
59
- autonomous: "autonomous";
60
- }>;
61
- type AgentyxProfile = z.infer<typeof agentyxProfileSchema>;
62
- /** Applied when a configuration omits `profile`. */
63
- declare const DEFAULT_AGENTYX_PROFILE: AgentyxProfile;
59
+ /**
60
+ * Targets stay free-form strings on purpose: third-party adapters should be
61
+ * able to register providers without a change to this schema.
62
+ */
63
+ declare const agentyxTargetSchema: z.ZodString;
64
+ declare const enabledCapabilityNameSchema: z.ZodString;
64
65
  /** The `.agentyx.json` project configuration. */
65
66
  declare const agentyxConfigSchema: z.ZodObject<{
66
67
  $schema: z.ZodOptional<z.ZodString>;
67
- extends: z.ZodDefault<z.ZodArray<z.ZodString>>;
68
- profile: z.ZodDefault<z.ZodEnum<{
69
- lean: "lean";
70
- balanced: "balanced";
71
- autonomous: "autonomous";
72
- }>>;
68
+ packs: z.ZodDefault<z.ZodArray<z.ZodString>>;
69
+ enable: z.ZodDefault<z.ZodArray<z.ZodString>>;
73
70
  targets: z.ZodDefault<z.ZodArray<z.ZodString>>;
74
71
  }, z.core.$strict>;
75
72
  /** A validated configuration, with defaults applied. */
@@ -100,11 +97,10 @@ declare function parseAgentyxConfig(value: unknown, filePath?: string): AgentyxC
100
97
  declare function loadAgentyxConfig(projectPath?: string): Promise<AgentyxConfig>;
101
98
  //#endregion
102
99
  //#region src/mcp/schema.d.ts
103
- declare const MCP_CAPABILITY_LEVELS: readonly ["essential", "recommended", "optional"];
100
+ declare const MCP_CAPABILITY_LEVELS: readonly ["default", "optional"];
104
101
  declare const mcpCapabilityLevelSchema: z.ZodEnum<{
105
102
  optional: "optional";
106
- essential: "essential";
107
- recommended: "recommended";
103
+ default: "default";
108
104
  }>;
109
105
  declare const MCP_CONTEXT_COSTS: readonly ["low", "medium", "high"];
110
106
  declare const mcpContextCostSchema: z.ZodEnum<{
@@ -117,23 +113,21 @@ declare const mcpEnvReferenceSchema: z.ZodObject<{
117
113
  }, z.core.$strict>;
118
114
  declare const mcpServerReferenceSchema: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
119
115
  name: z.ZodString;
120
- level: z.ZodDefault<z.ZodEnum<{
116
+ activation: z.ZodDefault<z.ZodEnum<{
121
117
  optional: "optional";
122
- essential: "essential";
123
- recommended: "recommended";
118
+ default: "default";
124
119
  }>>;
125
120
  }, z.core.$strict>]>, z.ZodTransform<{
126
121
  name: string;
127
- level: "optional" | "essential" | "recommended";
122
+ activation: "optional" | "default";
128
123
  }, string | {
129
124
  name: string;
130
- level: "optional" | "essential" | "recommended";
125
+ activation: "optional" | "default";
131
126
  }>>, z.ZodObject<{
132
127
  name: z.ZodString;
133
- level: z.ZodEnum<{
128
+ activation: z.ZodEnum<{
134
129
  optional: "optional";
135
- essential: "essential";
136
- recommended: "recommended";
130
+ default: "default";
137
131
  }>;
138
132
  }, z.core.$strict>>;
139
133
  declare const mcpServerDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -191,6 +185,94 @@ interface McpServerRegistry {
191
185
  }
192
186
  declare function createMcpServerRegistry(sources: Iterable<McpServerSource>): McpServerRegistry;
193
187
  //#endregion
188
+ //#region src/pack/schema.d.ts
189
+ declare const PACK_CATEGORIES: readonly ["engineering", "language", "framework", "efficiency", "workflow"];
190
+ declare const packCategorySchema: z.ZodEnum<{
191
+ engineering: "engineering";
192
+ language: "language";
193
+ framework: "framework";
194
+ efficiency: "efficiency";
195
+ workflow: "workflow";
196
+ }>;
197
+ /**
198
+ * Pack names are plain identifiers. They are intentionally not constrained to
199
+ * a closed list so that external registries can contribute packs later.
200
+ */
201
+ declare const packNameSchema: z.ZodString;
202
+ /** A pack is a composable provider-neutral capability bundle. */
203
+ declare const packDefinitionSchema: z.ZodObject<{
204
+ name: z.ZodString;
205
+ category: z.ZodDefault<z.ZodEnum<{
206
+ engineering: "engineering";
207
+ language: "language";
208
+ framework: "framework";
209
+ efficiency: "efficiency";
210
+ workflow: "workflow";
211
+ }>>;
212
+ description: z.ZodOptional<z.ZodString>;
213
+ skills: z.ZodDefault<z.ZodArray<z.ZodString>>;
214
+ mcpServers: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
215
+ name: z.ZodString;
216
+ activation: z.ZodDefault<z.ZodEnum<{
217
+ optional: "optional";
218
+ default: "default";
219
+ }>>;
220
+ }, z.core.$strict>]>, z.ZodTransform<{
221
+ name: string;
222
+ activation: "optional" | "default";
223
+ }, string | {
224
+ name: string;
225
+ activation: "optional" | "default";
226
+ }>>, z.ZodObject<{
227
+ name: z.ZodString;
228
+ activation: z.ZodEnum<{
229
+ optional: "optional";
230
+ default: "default";
231
+ }>;
232
+ }, z.core.$strict>>>>;
233
+ tools: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
234
+ name: z.ZodString;
235
+ activation: z.ZodDefault<z.ZodEnum<{
236
+ optional: "optional";
237
+ default: "default";
238
+ }>>;
239
+ }, z.core.$strict>]>, z.ZodTransform<{
240
+ name: string;
241
+ activation: "optional" | "default";
242
+ }, string | {
243
+ name: string;
244
+ activation: "optional" | "default";
245
+ }>>, z.ZodObject<{
246
+ name: z.ZodString;
247
+ activation: z.ZodEnum<{
248
+ optional: "optional";
249
+ default: "default";
250
+ }>;
251
+ }, z.core.$strict>>>>;
252
+ }, z.core.$strict>;
253
+ /** A validated pack definition, with defaults always present. */
254
+ type PackDefinition = z.infer<typeof packDefinitionSchema>;
255
+ type PackCategory = z.infer<typeof packCategorySchema>;
256
+ /** The shape accepted when authoring a pack definition. */
257
+ type PackDefinitionInput = z.input<typeof packDefinitionSchema>;
258
+ //#endregion
259
+ //#region src/pack/registry.d.ts
260
+ /**
261
+ * A registry is a name lookup over pack definitions. Keeping it a plain map
262
+ * means the resolver stays independent of where definitions come from, so
263
+ * external registries can be added later without touching resolution.
264
+ */
265
+ type PackRegistry = ReadonlyMap<string, PackDefinition>;
266
+ /** Validates definitions and indexes them by name. */
267
+ declare function createPackRegistry(definitions: Iterable<PackDefinitionInput>): PackRegistry;
268
+ /**
269
+ * The packs Agentyx ships with, expressed as data. Relationships live here, not
270
+ * in the resolver.
271
+ */
272
+ declare const builtInPacks: readonly PackDefinitionInput[];
273
+ /** The registry used by default when no explicit registry is supplied. */
274
+ declare const builtInPackRegistry: PackRegistry;
275
+ //#endregion
194
276
  //#region src/skill/schema.d.ts
195
277
  /**
196
278
  * A Skill is reusable instruction text for a coding agent. It is deliberately
@@ -244,86 +326,94 @@ interface SkillRegistry {
244
326
  */
245
327
  declare function createSkillRegistry(sources: Iterable<SkillSource>): SkillRegistry;
246
328
  //#endregion
247
- //#region src/stack/schema.d.ts
248
- /**
249
- * A stack describes a development environment that can build on other stacks
250
- * and contribute provider-agnostic capabilities to them.
251
- */
252
- declare const stackDefinitionSchema: z.ZodObject<{
329
+ //#region src/tool/schema.d.ts
330
+ declare const TOOL_ACTIVATION_LEVELS: readonly ["default", "optional"];
331
+ declare const toolActivationLevelSchema: z.ZodEnum<{
332
+ optional: "optional";
333
+ default: "default";
334
+ }>;
335
+ declare const toolNameSchema: z.ZodString;
336
+ declare const toolReferenceSchema: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
253
337
  name: z.ZodString;
254
- description: z.ZodOptional<z.ZodString>;
255
- extends: z.ZodDefault<z.ZodArray<z.ZodString>>;
256
- skills: z.ZodDefault<z.ZodArray<z.ZodString>>;
257
- mcpServers: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
258
- name: z.ZodString;
259
- level: z.ZodDefault<z.ZodEnum<{
260
- optional: "optional";
261
- essential: "essential";
262
- recommended: "recommended";
263
- }>>;
264
- }, z.core.$strict>]>, z.ZodTransform<{
265
- name: string;
266
- level: "optional" | "essential" | "recommended";
267
- }, string | {
268
- name: string;
269
- level: "optional" | "essential" | "recommended";
270
- }>>, z.ZodObject<{
271
- name: z.ZodString;
272
- level: z.ZodEnum<{
273
- optional: "optional";
274
- essential: "essential";
275
- recommended: "recommended";
276
- }>;
277
- }, z.core.$strict>>>>;
338
+ activation: z.ZodDefault<z.ZodEnum<{
339
+ optional: "optional";
340
+ default: "default";
341
+ }>>;
342
+ }, z.core.$strict>]>, z.ZodTransform<{
343
+ name: string;
344
+ activation: "optional" | "default";
345
+ }, string | {
346
+ name: string;
347
+ activation: "optional" | "default";
348
+ }>>, z.ZodObject<{
349
+ name: z.ZodString;
350
+ activation: z.ZodEnum<{
351
+ optional: "optional";
352
+ default: "default";
353
+ }>;
354
+ }, z.core.$strict>>;
355
+ declare const toolDefinitionSchema: z.ZodObject<{
356
+ name: z.ZodString;
357
+ description: z.ZodString;
358
+ kind: z.ZodLiteral<"executable">;
359
+ command: z.ZodString;
360
+ optional: z.ZodDefault<z.ZodBoolean>;
361
+ installHint: z.ZodOptional<z.ZodString>;
278
362
  }, z.core.$strict>;
279
- /** A validated stack definition, with defaults always present. */
280
- type StackDefinition = z.infer<typeof stackDefinitionSchema>;
281
- /** The shape accepted when authoring a stack definition. */
282
- type StackDefinitionInput = z.input<typeof stackDefinitionSchema>;
363
+ type ToolActivationLevel = z.infer<typeof toolActivationLevelSchema>;
364
+ type ToolDefinition = z.infer<typeof toolDefinitionSchema>;
365
+ type ToolDefinitionInput = z.input<typeof toolDefinitionSchema>;
366
+ type ToolReference = z.infer<typeof toolReferenceSchema>;
367
+ type ToolReferenceInput = z.input<typeof toolReferenceSchema>;
283
368
  //#endregion
284
- //#region src/stack/registry.d.ts
285
- /**
286
- * A registry is a name lookup over stack definitions. Keeping it a plain map
287
- * means the resolver stays independent of where definitions come from, so
288
- * external registries can be added later without touching resolution.
289
- */
290
- type StackRegistry = ReadonlyMap<string, StackDefinition>;
291
- /** Validates definitions and indexes them by name. */
292
- declare function createStackRegistry(definitions: Iterable<StackDefinitionInput>): StackRegistry;
293
- /**
294
- * The stacks Agentyx ships with, expressed as data. Relationships live here, not
295
- * in the resolver.
296
- */
297
- declare const builtInStacks: readonly StackDefinitionInput[];
298
- /** The registry used by default when no explicit registry is supplied. */
299
- declare const builtInStackRegistry: StackRegistry;
369
+ //#region src/tool/registry.d.ts
370
+ interface ToolSource {
371
+ readonly name: string;
372
+ load(): ToolDefinitionInput;
373
+ }
374
+ interface ToolMetadata {
375
+ readonly name: string;
376
+ readonly description: string;
377
+ readonly kind: ToolDefinition["kind"];
378
+ readonly command: string;
379
+ readonly optional: boolean;
380
+ }
381
+ interface ToolRegistry {
382
+ readonly names: readonly string[];
383
+ has(name: string): boolean;
384
+ listMetadata(): readonly ToolMetadata[];
385
+ get(name: string): ToolDefinition;
386
+ }
387
+ declare function createToolRegistry(sources: Iterable<ToolSource>): ToolRegistry;
300
388
  //#endregion
301
389
  //#region src/config/resolver.d.ts
302
- /** A project configuration with its stack inheritance expanded. */
390
+ /** A project configuration with its pack inheritance expanded. */
303
391
  interface ResolvedAgentyxConfig {
304
- /** The stacks the project asked for, in configuration order. */
305
- readonly requestedStacks: readonly string[];
306
- /** The full inheritance chain, dependency-first and de-duplicated. */
307
- readonly resolvedStacks: readonly string[];
392
+ /** The packs the project asked for, in configuration order. */
393
+ readonly requestedPacks: readonly string[];
394
+ /** Selected packs, de-duplicated while preserving configuration order. */
395
+ readonly resolvedPacks: readonly string[];
308
396
  /**
309
- * Skill identifiers contributed by the resolved stacks, in resolution order.
397
+ * Skill identifiers contributed by the resolved packs, in resolution order.
310
398
  * Identifiers only — reading the instructions is a separate, explicit step.
311
399
  */
312
400
  readonly skills: readonly string[];
313
401
  readonly declaredMcpServers: readonly McpServerReference[];
314
402
  readonly mcpServers: readonly string[];
315
- readonly profile: AgentyxProfile;
403
+ readonly declaredTools: readonly ToolReference[];
404
+ readonly tools: readonly string[];
405
+ readonly enabled: readonly string[];
316
406
  readonly targets: readonly string[];
317
407
  }
318
408
  /**
319
- * Combines a validated project configuration with stack and skill resolution.
409
+ * Combines a validated project configuration with pack and skill resolution.
320
410
  * The input is never mutated.
321
411
  *
322
- * @throws {UnknownStackError} when a configured stack is missing.
323
- * @throws {CircularStackDependencyError} when inheritance forms a cycle.
324
- * @throws {UnknownSkillError} when a stack references an unknown skill.
412
+ * @throws {UnknownPackError} when a configured pack is missing.
413
+ * @throws {CircularPackDependencyError} when inheritance forms a cycle.
414
+ * @throws {UnknownSkillError} when a pack references an unknown skill.
325
415
  */
326
- declare function resolveAgentyxConfig(config: AgentyxConfig, registry?: StackRegistry, skillRegistry?: SkillRegistry, mcpRegistry?: McpServerRegistry): ResolvedAgentyxConfig;
416
+ declare function resolveAgentyxConfig(config: AgentyxConfig, registry?: PackRegistry, skillRegistry?: SkillRegistry, mcpRegistry?: McpServerRegistry, toolRegistry?: ToolRegistry): ResolvedAgentyxConfig;
327
417
  //#endregion
328
418
  //#region src/mcp/built-in.d.ts
329
419
  declare const builtInMcpServerRegistry: McpServerRegistry;
@@ -347,27 +437,46 @@ declare class InvalidMcpServerError extends AgentyxError {
347
437
  }
348
438
  //#endregion
349
439
  //#region src/mcp/resolver.d.ts
350
- declare function collectStackMcpServerReferences(resolvedStacks: readonly string[], stackRegistry: StackRegistry, mcpRegistry: McpServerRegistry): McpServerReference[];
351
- declare function filterEffectiveMcpServers(servers: readonly McpServerReference[], profile: AgentyxProfile): string[];
352
- declare function collectStackMcpServers(resolvedStacks: readonly string[], stackRegistry: StackRegistry, mcpRegistry: McpServerRegistry, profile?: AgentyxProfile): string[];
353
- declare function resolveStackMcpServerReferences(requestedStacks: readonly string[], stackRegistry?: StackRegistry, mcpRegistry?: McpServerRegistry): McpServerReference[];
354
- declare function resolveStackMcpServers(requestedStacks: readonly string[], stackRegistry?: StackRegistry, mcpRegistry?: McpServerRegistry, profile?: AgentyxProfile): string[];
440
+ declare function collectPackMcpServerReferences(resolvedPacks: readonly string[], packRegistry: PackRegistry, mcpRegistry: McpServerRegistry): McpServerReference[];
441
+ declare function filterEffectiveMcpServers(servers: readonly McpServerReference[], enabledCapabilities: readonly string[]): string[];
442
+ declare function collectPackMcpServers(resolvedPacks: readonly string[], packRegistry: PackRegistry, mcpRegistry: McpServerRegistry, enabledCapabilities?: readonly string[]): string[];
443
+ declare function resolvePackMcpServerReferences(requestedPacks: readonly string[], packRegistry?: PackRegistry, mcpRegistry?: McpServerRegistry): McpServerReference[];
444
+ declare function resolvePackMcpServers(requestedPacks: readonly string[], packRegistry?: PackRegistry, mcpRegistry?: McpServerRegistry, enabledCapabilities?: readonly string[]): string[];
355
445
  //#endregion
356
446
  //#region src/meta.d.ts
357
447
  declare const agentyxCoreName = "agentyx-core";
358
448
  declare function getCoreStatus(): string;
359
449
  //#endregion
360
- //#region src/optimization/profile.d.ts
361
- interface OptimizationProfileDefinition {
362
- readonly name: AgentyxProfile;
363
- readonly goal: string;
364
- readonly mcpLevels: readonly McpCapabilityLevel[];
365
- readonly notes: readonly string[];
450
+ //#region src/pack/errors.d.ts
451
+ /** Raised when a requested pack is not present in the registry. */
452
+ declare class UnknownPackError extends AgentyxError {
453
+ readonly packName: string;
454
+ readonly requiredBy: string | undefined;
455
+ readonly knownPacks: readonly string[];
456
+ constructor(packName: string, requiredBy: string | undefined, knownPacks: readonly string[]);
366
457
  }
367
- declare const optimizationProfiles: readonly OptimizationProfileDefinition[];
368
- declare const optimizationProfileNames: readonly AgentyxProfile[];
369
- declare function getOptimizationProfile(name: AgentyxProfile): OptimizationProfileDefinition;
370
- declare function isMcpLevelEnabled(profile: AgentyxProfile, level: McpCapabilityLevel): boolean;
458
+ /** @deprecated Packs no longer inherit from other packs. */
459
+ declare class CircularPackDependencyError extends AgentyxError {
460
+ /** The cycle path, starting and ending with the same pack. */
461
+ readonly cycle: readonly string[];
462
+ constructor(cycle: readonly string[]);
463
+ }
464
+ /** Raised when a registry is built from definitions that reuse a pack name. */
465
+ declare class DuplicatePackError extends AgentyxError {
466
+ readonly packName: string;
467
+ constructor(packName: string);
468
+ }
469
+ //#endregion
470
+ //#region src/pack/resolver.d.ts
471
+ /**
472
+ * Resolves selected packs without hidden inheritance.
473
+ *
474
+ * The result preserves configured order, removes duplicates by first
475
+ * occurrence, and validates every requested pack.
476
+ *
477
+ * @throws {UnknownPackError} when a requested pack is missing.
478
+ */
479
+ declare function resolvePacks(requestedPacks: readonly string[], registry?: PackRegistry): string[];
371
480
  //#endregion
372
481
  //#region src/project/detector.d.ts
373
482
  declare const PACKAGE_MANAGERS: readonly ["pnpm", "npm", "yarn", "bun"];
@@ -390,13 +499,13 @@ interface ProjectDetection {
390
499
  readonly projectDir: string;
391
500
  readonly packageJson: ProjectPackageJsonDetection;
392
501
  readonly packageManager: PackageManagerDetection;
393
- readonly detectedStacks: readonly string[];
394
- readonly recommendedStack: string | undefined;
502
+ readonly detectedPacks: readonly string[];
503
+ readonly recommendedPacks: readonly string[];
395
504
  }
396
505
  declare function detectProject(projectDir: string): Promise<ProjectDetection>;
397
506
  declare function buildAgentyxConfig(input: {
398
- readonly stack: string;
399
- readonly profile: AgentyxProfile;
507
+ readonly packs: readonly string[];
508
+ readonly enable?: readonly string[];
400
509
  readonly targets: readonly string[];
401
510
  }): AgentyxConfigInput;
402
511
  declare function formatAgentyxConfig(config: AgentyxConfigInput): string;
@@ -405,22 +514,22 @@ declare function formatAgentyxConfig(config: AgentyxConfigInput): string;
405
514
  /**
406
515
  * The skills Agentyx ships with. The names are the directory names under
407
516
  * `packages/core/skills`, and knowing them without touching the filesystem is
408
- * what lets stack resolution validate references without reading any body.
517
+ * what lets pack resolution validate references without reading any body.
409
518
  */
410
- declare const builtInSkillNames: readonly ["planning", "systematic-debugging", "verification", "typescript-modern", "angular-modern"];
519
+ 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"];
411
520
  /** The registry used by default when no explicit registry is supplied. */
412
521
  declare const builtInSkillRegistry: SkillRegistry;
413
522
  //#endregion
414
523
  //#region src/skill/errors.d.ts
415
524
  /**
416
- * Raised when a stack references a skill the registry does not know.
525
+ * Raised when a pack references a skill the registry does not know.
417
526
  *
418
- * The offending name is exposed as `skillName`; `stack` stays the JS stack
527
+ * The offending name is exposed as `skillName`; `pack` stays the JS pack
419
528
  * trace inherited from `Error`.
420
529
  */
421
530
  declare class UnknownSkillError extends AgentyxError {
422
531
  readonly skillName: string;
423
- /** The stack that declared the skill, when the failure came from resolution. */
532
+ /** The pack that declared the skill, when the failure came from resolution. */
424
533
  readonly requiredBy: string | undefined;
425
534
  readonly knownSkills: readonly string[];
426
535
  constructor(skillName: string, requiredBy: string | undefined, knownSkills: readonly string[]);
@@ -487,55 +596,41 @@ declare function formatSkillMarkdown(skill: SkillDefinitionInput): string;
487
596
  //#endregion
488
597
  //#region src/skill/resolver.d.ts
489
598
  /**
490
- * Expands the requested stacks and returns the skills they contribute.
599
+ * Resolves the requested packs and returns the skills they contribute.
491
600
  *
492
- * The result follows the resolved stack order, then each stack's declaration
601
+ * The result follows the resolved pack order, then each pack's declaration
493
602
  * order, and is de-duplicated by first occurrence. Skills do not extend other
494
603
  * skills, so there is nothing further to expand.
495
604
  *
496
- * @throws {UnknownStackError} when a requested or inherited stack is missing.
497
- * @throws {CircularStackDependencyError} when stack inheritance forms a cycle.
498
- * @throws {UnknownSkillError} when a stack references a skill the registry lacks.
605
+ * @throws {UnknownPackError} when a requested pack is missing.
606
+ * @throws {UnknownSkillError} when a pack references a skill the registry lacks.
499
607
  */
500
- declare function resolveStackSkills(requestedStacks: readonly string[], stackRegistry?: StackRegistry, skillRegistry?: SkillRegistry): string[];
608
+ declare function resolvePackSkills(requestedPacks: readonly string[], packRegistry?: PackRegistry, skillRegistry?: SkillRegistry): string[];
501
609
  //#endregion
502
- //#region src/stack/errors.d.ts
503
- /**
504
- * Raised when a requested or inherited stack is not present in the registry.
505
- *
506
- * The offending name is exposed as `stackName`; `stack` stays the JS stack
507
- * trace inherited from `Error`.
508
- */
509
- declare class UnknownStackError extends AgentyxError {
510
- readonly stackName: string;
610
+ //#region src/tool/built-in.d.ts
611
+ declare const builtInToolRegistry: ToolRegistry;
612
+ declare const builtInToolNames: readonly string[];
613
+ //#endregion
614
+ //#region src/tool/errors.d.ts
615
+ declare class UnknownToolError extends AgentyxError {
616
+ readonly toolName: string;
511
617
  readonly requiredBy: string | undefined;
512
- readonly knownStacks: readonly string[];
513
- constructor(stackName: string, requiredBy: string | undefined, knownStacks: readonly string[]);
618
+ readonly knownTools: readonly string[];
619
+ constructor(toolName: string, requiredBy: string | undefined, knownTools: readonly string[]);
514
620
  }
515
- /** Raised when stack inheritance forms a cycle. */
516
- declare class CircularStackDependencyError extends AgentyxError {
517
- /** The cycle path, starting and ending with the same stack. */
518
- readonly cycle: readonly string[];
519
- constructor(cycle: readonly string[]);
621
+ declare class DuplicateToolError extends AgentyxError {
622
+ readonly toolName: string;
623
+ constructor(toolName: string);
520
624
  }
521
- /** Raised when a registry is built from definitions that reuse a stack name. */
522
- declare class DuplicateStackError extends AgentyxError {
523
- readonly stackName: string;
524
- constructor(stackName: string);
625
+ declare class InvalidToolError extends AgentyxError {
626
+ constructor(origin: string, reason: unknown, options?: ErrorOptions);
525
627
  }
526
628
  //#endregion
527
- //#region src/stack/resolver.d.ts
528
- /**
529
- * Expands the requested stacks into the full inheritance chain.
530
- *
531
- * The result is dependency-first, de-duplicated and deterministic: stacks are
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[];
629
+ //#region src/tool/resolver.d.ts
630
+ declare function collectPackToolReferences(resolvedPacks: readonly string[], packRegistry: PackRegistry, toolRegistry: ToolRegistry): ToolReference[];
631
+ declare function filterEffectiveTools(tools: readonly ToolReference[], enabledCapabilities: readonly string[]): string[];
632
+ declare function resolvePackToolReferences(requestedPacks: readonly string[], packRegistry?: PackRegistry, toolRegistry?: ToolRegistry): ToolReference[];
633
+ declare function resolvePackTools(requestedPacks: readonly string[], packRegistry?: PackRegistry, toolRegistry?: ToolRegistry, enabledCapabilities?: readonly string[]): string[];
539
634
  //#endregion
540
- export { AGENTYX_CONFIG_FILENAME, AGENTYX_CONFIG_SCHEMA_ID, AGENTYX_PROFILES, type AgentyxConfig, type AgentyxConfigInput, type AgentyxConfigIssue, AgentyxConfigNotFoundError, AgentyxConfigParseError, AgentyxConfigValidationError, AgentyxError, type AgentyxProfile, CircularStackDependencyError, DEFAULT_AGENTYX_PROFILE, DuplicateMcpServerError, DuplicateSkillError, DuplicateStackError, InvalidMcpServerError, InvalidSkillError, MCP_CAPABILITY_LEVELS, MCP_CONTEXT_COSTS, type McpCapabilityLevel, type McpContextCost, type McpEnvReference, type McpServerDefinition, type McpServerDefinitionInput, type McpServerMetadata, type McpServerReference, type McpServerReferenceInput, type McpServerRegistry, type McpServerSource, type OptimizationProfileDefinition, PACKAGE_MANAGERS, type PackageManagerDetection, type PackageManagerName, type ProjectDetection, type ProjectPackageJsonDetection, type ResolvedAgentyxConfig, type SkillDefinition, type SkillDefinitionInput, type SkillRegistry, type SkillSource, type StackDefinition, type StackDefinitionInput, type StackRegistry, UnknownMcpServerError, UnknownSkillError, UnknownStackError, agentyxConfigPath, agentyxConfigSchema, agentyxCoreName, agentyxProfileSchema, buildAgentyxConfig, buildAgentyxConfigJsonSchema, builtInMcpServerNames, builtInMcpServerRegistry, builtInSkillNames, builtInSkillRegistry, builtInStackRegistry, builtInStacks, collectStackMcpServerReferences, collectStackMcpServers, createMcpServerRegistry, createSkillRegistry, createStackRegistry, detectProject, filterEffectiveMcpServers, formatAgentyxConfig, formatSkillMarkdown, getCoreStatus, getOptimizationProfile, isMcpLevelEnabled, loadAgentyxConfig, mcpCapabilityLevelSchema, mcpContextCostSchema, mcpEnvReferenceSchema, mcpServerDefinitionSchema, mcpServerReferenceSchema, optimizationProfileNames, optimizationProfiles, parseAgentyxConfig, parseSkillMarkdown, resolveAgentyxConfig, resolveStackMcpServerReferences, resolveStackMcpServers, resolveStackSkills, resolveStacks, skillDefinitionSchema, stackDefinitionSchema };
635
+ export { AGENTYX_CONFIG_FILENAME, AGENTYX_CONFIG_SCHEMA_ID, type AgentyxConfig, type AgentyxConfigInput, type AgentyxConfigIssue, AgentyxConfigNotFoundError, AgentyxConfigParseError, AgentyxConfigValidationError, AgentyxError, CircularPackDependencyError, DuplicateMcpServerError, DuplicatePackError, DuplicateSkillError, DuplicateToolError, InvalidMcpServerError, InvalidSkillError, InvalidToolError, MCP_CAPABILITY_LEVELS, MCP_CONTEXT_COSTS, type McpCapabilityLevel, type McpContextCost, type McpEnvReference, 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 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, agentyxTargetSchema, buildAgentyxConfig, buildAgentyxConfigJsonSchema, builtInMcpServerNames, builtInMcpServerRegistry, builtInPackRegistry, builtInPacks, builtInSkillNames, builtInSkillRegistry, builtInToolNames, builtInToolRegistry, collectPackMcpServerReferences, collectPackMcpServers, collectPackToolReferences, createMcpServerRegistry, createPackRegistry, createSkillRegistry, createToolRegistry, detectProject, enabledCapabilityNameSchema, filterEffectiveMcpServers, filterEffectiveTools, formatAgentyxConfig, formatSkillMarkdown, getCoreStatus, loadAgentyxConfig, mcpCapabilityLevelSchema, mcpContextCostSchema, mcpEnvReferenceSchema, mcpServerDefinitionSchema, mcpServerReferenceSchema, packCategorySchema, packDefinitionSchema, packNameSchema, parseAgentyxConfig, parseSkillMarkdown, resolveAgentyxConfig, resolvePackMcpServerReferences, resolvePackMcpServers, resolvePackSkills, resolvePackToolReferences, resolvePackTools, resolvePacks, skillDefinitionSchema, toolActivationLevelSchema, toolDefinitionSchema, toolNameSchema, toolReferenceSchema };
541
636
  //# sourceMappingURL=index.d.mts.map