agentsmesh 0.21.0 → 0.23.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/CHANGELOG.md +244 -0
- package/README.md +71 -9
- package/dist/canonical.d.ts +2 -2
- package/dist/canonical.js +339 -46
- package/dist/canonical.js.map +1 -1
- package/dist/cli.js +276 -223
- package/dist/engine.d.ts +5 -2
- package/dist/engine.js +1350 -87
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2993 -439
- package/dist/index.js.map +1 -1
- package/dist/init-YKxF2zpQ.d.ts +494 -0
- package/dist/lessons.d.ts +106 -0
- package/dist/lessons.js +2764 -0
- package/dist/lessons.js.map +1 -0
- package/dist/{schema-CLmR2JOb.d.ts → schema-CzaoYJlG.d.ts} +9 -1
- package/dist/{target-descriptor-CkLWz3Xk.d.ts → target-descriptor-D6vLDI1w.d.ts} +62 -2
- package/dist/targets.d.ts +3 -3
- package/dist/targets.js +293 -32
- package/dist/targets.js.map +1 -1
- package/package.json +9 -2
- package/schemas/installs.json +12 -0
|
@@ -145,6 +145,14 @@ interface CanonicalFiles {
|
|
|
145
145
|
ignore: IgnorePatterns;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
/** Cherry-pick resource names within array features (extends.install + merge). */
|
|
149
|
+
declare const extendPickSchema: z.ZodObject<{
|
|
150
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
151
|
+
commands: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
152
|
+
rules: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
153
|
+
agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
154
|
+
}, z.core.$strict>;
|
|
155
|
+
type ExtendPick = z.infer<typeof extendPickSchema>;
|
|
148
156
|
/**
|
|
149
157
|
* Zod schema for `agentsmesh.yaml` config validation.
|
|
150
158
|
*
|
|
@@ -305,4 +313,4 @@ declare const configSchema: z.ZodObject<{
|
|
|
305
313
|
}, z.core.$strip>;
|
|
306
314
|
type ValidatedConfig = z.infer<typeof configSchema>;
|
|
307
315
|
|
|
308
|
-
export type { CanonicalAgent as C, HookEntry as H, IgnorePatterns as I, McpConfig as M, Permissions as P, SkillSupportingFile as S, UrlMcpServer as U, ValidatedConfig as V, CanonicalCommand as a, CanonicalFiles as b, CanonicalRule as c, CanonicalSkill as d, Hooks as e, McpServer as f, StdioMcpServer as g };
|
|
316
|
+
export type { CanonicalAgent as C, ExtendPick as E, HookEntry as H, IgnorePatterns as I, McpConfig as M, Permissions as P, SkillSupportingFile as S, UrlMcpServer as U, ValidatedConfig as V, CanonicalCommand as a, CanonicalFiles as b, CanonicalRule as c, CanonicalSkill as d, Hooks as e, McpServer as f, StdioMcpServer as g };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as CanonicalFiles, c as CanonicalRule, V as ValidatedConfig } from './schema-
|
|
1
|
+
import { b as CanonicalFiles, c as CanonicalRule, V as ValidatedConfig, E as ExtendPick } from './schema-CzaoYJlG.js';
|
|
2
2
|
|
|
3
3
|
/** Result of generating files for a target */
|
|
4
4
|
interface GenerateResult {
|
|
@@ -289,6 +289,54 @@ interface TargetMetadata {
|
|
|
289
289
|
/** One-line description used in tool lists and tables. */
|
|
290
290
|
readonly shortDescription: string;
|
|
291
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
* How a native-install pick rule derives canonical entity names from the files
|
|
294
|
+
* found under its directory.
|
|
295
|
+
* - `basename`: recursively collect files ending in `suffix`; name = basename
|
|
296
|
+
* minus `suffix` (e.g. `.md`, `.mdc`).
|
|
297
|
+
* - `skillDir`: skill tree — `{name}/SKILL.md` plus flat top-level `*.md`.
|
|
298
|
+
* - `firstSegment`: the single segment after the rule prefix is the name
|
|
299
|
+
* (e.g. `.claude/skills/{name}/...`).
|
|
300
|
+
*/
|
|
301
|
+
type NativePickStrategy = {
|
|
302
|
+
readonly kind: 'basename';
|
|
303
|
+
readonly suffix: string;
|
|
304
|
+
} | {
|
|
305
|
+
readonly kind: 'skillDir';
|
|
306
|
+
} | {
|
|
307
|
+
readonly kind: 'firstSegment';
|
|
308
|
+
};
|
|
309
|
+
/** Maps a native directory prefix to a canonical feature + name strategy. */
|
|
310
|
+
interface NativePickRule {
|
|
311
|
+
/** POSIX path prefix under the repo root; matches the dir or any subpath. */
|
|
312
|
+
readonly prefix: string;
|
|
313
|
+
/** Canonical feature the matched files contribute to. */
|
|
314
|
+
readonly feature: 'commands' | 'rules' | 'agents' | 'skills';
|
|
315
|
+
/** How to derive entity names from the matched directory. */
|
|
316
|
+
readonly strategy: NativePickStrategy;
|
|
317
|
+
}
|
|
318
|
+
/** Frontmatter-dialect hint for `.mdc` flat-file target inference. */
|
|
319
|
+
interface NativeDialectHint {
|
|
320
|
+
/** Frontmatter key whose presence identifies this target. */
|
|
321
|
+
readonly frontmatterKey: string;
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Descriptor-driven data for the install subsystem's native-path inference.
|
|
325
|
+
* Replaces the per-target `if (target === '…')` ladders (arch §3.1): each
|
|
326
|
+
* target declares its own pick paths / dialect hints instead.
|
|
327
|
+
*/
|
|
328
|
+
interface NativeInstallSupport {
|
|
329
|
+
/** Ordered pick-path rules; the first matching prefix wins. */
|
|
330
|
+
readonly pickPaths?: readonly NativePickRule[];
|
|
331
|
+
/**
|
|
332
|
+
* Escape hatch for irreducibly custom inference (e.g. Gemini's `:`-namespaced
|
|
333
|
+
* command names, Copilot's overlapping `.github/*` dirs). When present it
|
|
334
|
+
* fully owns inference for this target and `pickPaths` is ignored.
|
|
335
|
+
*/
|
|
336
|
+
readonly inferPick?: (repoRoot: string, posixPath: string) => Promise<ExtendPick>;
|
|
337
|
+
/** Frontmatter-dialect hints for `.mdc` flat-file target inference. */
|
|
338
|
+
readonly dialectHints?: readonly NativeDialectHint[];
|
|
339
|
+
}
|
|
292
340
|
/**
|
|
293
341
|
* Full self-describing target descriptor.
|
|
294
342
|
* Bundles everything needed to generate, import, lint, and detect a target.
|
|
@@ -347,10 +395,22 @@ interface TargetDescriptor {
|
|
|
347
395
|
readonly sharedArtifacts?: {
|
|
348
396
|
readonly [pathPrefix: string]: 'owner' | 'consumer';
|
|
349
397
|
};
|
|
398
|
+
/**
|
|
399
|
+
* Descriptor-driven native-install inference data (extends.pick from native
|
|
400
|
+
* files, `.mdc` dialect hints). Consumed by `src/install/native` and
|
|
401
|
+
* `src/install/manual` so those modules carry no target-id literals.
|
|
402
|
+
*/
|
|
403
|
+
readonly nativeInstall?: NativeInstallSupport;
|
|
350
404
|
/**
|
|
351
405
|
* Optional native settings sidecar (e.g. Gemini `.gemini/settings.json` when embedded features are on).
|
|
406
|
+
*
|
|
407
|
+
* `enabledFeatures` is the active feature set for this generate run. Emitters
|
|
408
|
+
* MUST gate every settings key on its corresponding feature (mcpServers ->
|
|
409
|
+
* `mcp`, hooks -> `hooks`, agents -> `agents`, permissions -> `permissions`,
|
|
410
|
+
* ignore-derived keys -> `ignore`) so a disabled feature never leaks into the
|
|
411
|
+
* sidecar.
|
|
352
412
|
*/
|
|
353
|
-
readonly emitScopedSettings?: (canonical: CanonicalFiles, scope: TargetLayoutScope) => readonly {
|
|
413
|
+
readonly emitScopedSettings?: (canonical: CanonicalFiles, scope: TargetLayoutScope, enabledFeatures: ReadonlySet<string>) => readonly {
|
|
354
414
|
readonly path: string;
|
|
355
415
|
readonly content: string;
|
|
356
416
|
}[];
|
package/dist/targets.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { e as TargetDescriptor, h as TargetLayoutScope, C as ContentNormalizer, d as ImportResult } from './target-descriptor-
|
|
2
|
-
export { E as ExtraRuleOutputContext, a as ExtraRuleOutputResolver, F as FeatureLinter, b as GeneratedOutputMerger, c as GlobalTargetSupport, I as ImportPathBuilder, R as RuleLinter, S as ScopeExtrasFn, T as TargetCapabilities, f as TargetGenerators, g as TargetLayout, i as TargetLintHooks, j as TargetManagedOutputs, k as TargetOutputFamily, l as TargetPathResolvers } from './target-descriptor-
|
|
3
|
-
import './schema-
|
|
1
|
+
import { e as TargetDescriptor, h as TargetLayoutScope, C as ContentNormalizer, d as ImportResult } from './target-descriptor-D6vLDI1w.js';
|
|
2
|
+
export { E as ExtraRuleOutputContext, a as ExtraRuleOutputResolver, F as FeatureLinter, b as GeneratedOutputMerger, c as GlobalTargetSupport, I as ImportPathBuilder, R as RuleLinter, S as ScopeExtrasFn, T as TargetCapabilities, f as TargetGenerators, g as TargetLayout, i as TargetLintHooks, j as TargetManagedOutputs, k as TargetOutputFamily, l as TargetPathResolvers } from './target-descriptor-D6vLDI1w.js';
|
|
3
|
+
import './schema-CzaoYJlG.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
/** Register a full target descriptor (for plugins). */
|