@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 +28 -47
- package/dist/index.d.mts +247 -152
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +377 -214
- 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/brainstorming/SKILL.md +12 -0
- package/skills/code-quality/SKILL.md +28 -0
- package/skills/code-review/SKILL.md +23 -0
- package/skills/concise-output/SKILL.md +24 -0
- package/skills/context-efficient-development/SKILL.md +24 -0
- package/skills/engineering-principles/SKILL.md +34 -0
- package/skills/focused-verification/SKILL.md +22 -0
- package/skills/parallel-work/SKILL.md +12 -0
- package/skills/requesting-code-review/SKILL.md +13 -0
- package/skills/subagent-driven-development/SKILL.md +13 -0
- package/skills/targeted-exploration/SKILL.md +24 -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/worktree-workflow/SKILL.md +12 -0
package/README.md
CHANGED
|
@@ -1,60 +1,47 @@
|
|
|
1
1
|
# @agentyx/core
|
|
2
2
|
|
|
3
|
-
Domain foundations for
|
|
4
|
-
|
|
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
|
|
8
|
-
|
|
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
|
-
|
|
13
|
-
builtInStacks,
|
|
11
|
+
builtInPacks,
|
|
14
12
|
loadAgentyxConfig,
|
|
15
13
|
resolveAgentyxConfig,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
resolveStackSkills,
|
|
14
|
+
resolvePackSkills,
|
|
15
|
+
resolvePacks,
|
|
19
16
|
} from "@agentyx/core";
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
// ["
|
|
18
|
+
builtInPacks.map((pack) => pack.name);
|
|
19
|
+
// ["technical", "typescript", "angular", "efficiency", "agentic"]
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
// ["
|
|
21
|
+
resolvePacks(["technical", "typescript", "angular"]);
|
|
22
|
+
// ["technical", "typescript", "angular"]
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
// [
|
|
24
|
+
resolvePackSkills(["typescript"]);
|
|
25
|
+
// ["typescript-strict", "typescript-modeling", "typescript-modern"]
|
|
29
26
|
|
|
30
27
|
resolveAgentyxConfig(await loadAgentyxConfig(process.cwd()));
|
|
31
|
-
// {
|
|
28
|
+
// { requestedPacks, resolvedPacks, skills, declaredMcpServers, mcpServers, declaredTools, tools, enabled, targets }
|
|
32
29
|
```
|
|
33
30
|
|
|
34
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
49
|
-
|
|
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
|
|
68
|
-
`
|
|
69
|
-
`
|
|
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
|
-
/**
|
|
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;
|
|
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
|
-
|
|
68
|
-
|
|
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 ["
|
|
100
|
+
declare const MCP_CAPABILITY_LEVELS: readonly ["default", "optional"];
|
|
104
101
|
declare const mcpCapabilityLevelSchema: z.ZodEnum<{
|
|
105
102
|
optional: "optional";
|
|
106
|
-
|
|
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
|
-
|
|
116
|
+
activation: z.ZodDefault<z.ZodEnum<{
|
|
121
117
|
optional: "optional";
|
|
122
|
-
|
|
123
|
-
recommended: "recommended";
|
|
118
|
+
default: "default";
|
|
124
119
|
}>>;
|
|
125
120
|
}, z.core.$strict>]>, z.ZodTransform<{
|
|
126
121
|
name: string;
|
|
127
|
-
|
|
122
|
+
activation: "optional" | "default";
|
|
128
123
|
}, string | {
|
|
129
124
|
name: string;
|
|
130
|
-
|
|
125
|
+
activation: "optional" | "default";
|
|
131
126
|
}>>, z.ZodObject<{
|
|
132
127
|
name: z.ZodString;
|
|
133
|
-
|
|
128
|
+
activation: z.ZodEnum<{
|
|
134
129
|
optional: "optional";
|
|
135
|
-
|
|
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/
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
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
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
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
|
-
|
|
280
|
-
type
|
|
281
|
-
|
|
282
|
-
type
|
|
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/
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
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
|
|
390
|
+
/** A project configuration with its pack inheritance expanded. */
|
|
303
391
|
interface ResolvedAgentyxConfig {
|
|
304
|
-
/** The
|
|
305
|
-
readonly
|
|
306
|
-
/**
|
|
307
|
-
readonly
|
|
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
|
|
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
|
|
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
|
|
409
|
+
* Combines a validated project configuration with pack and skill resolution.
|
|
320
410
|
* The input is never mutated.
|
|
321
411
|
*
|
|
322
|
-
* @throws {
|
|
323
|
-
* @throws {
|
|
324
|
-
* @throws {UnknownSkillError} when a
|
|
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?:
|
|
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
|
|
351
|
-
declare function filterEffectiveMcpServers(servers: readonly McpServerReference[],
|
|
352
|
-
declare function
|
|
353
|
-
declare function
|
|
354
|
-
declare function
|
|
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/
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
readonly
|
|
364
|
-
readonly
|
|
365
|
-
readonly
|
|
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
|
-
|
|
368
|
-
declare
|
|
369
|
-
|
|
370
|
-
|
|
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
|
|
394
|
-
readonly
|
|
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
|
|
399
|
-
readonly
|
|
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
|
|
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
|
|
525
|
+
* Raised when a pack references a skill the registry does not know.
|
|
417
526
|
*
|
|
418
|
-
* The offending name is exposed as `skillName`; `
|
|
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
|
|
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
|
-
*
|
|
599
|
+
* Resolves the requested packs and returns the skills they contribute.
|
|
491
600
|
*
|
|
492
|
-
* The result follows the resolved
|
|
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 {
|
|
497
|
-
* @throws {
|
|
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
|
|
608
|
+
declare function resolvePackSkills(requestedPacks: readonly string[], packRegistry?: PackRegistry, skillRegistry?: SkillRegistry): string[];
|
|
501
609
|
//#endregion
|
|
502
|
-
//#region src/
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
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
|
|
513
|
-
constructor(
|
|
618
|
+
readonly knownTools: readonly string[];
|
|
619
|
+
constructor(toolName: string, requiredBy: string | undefined, knownTools: readonly string[]);
|
|
514
620
|
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
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
|
-
|
|
522
|
-
|
|
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/
|
|
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[];
|
|
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,
|
|
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
|