agentsmesh 0.18.1 → 0.19.1

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.
@@ -145,7 +145,17 @@ interface CanonicalFiles {
145
145
  ignore: IgnorePatterns;
146
146
  }
147
147
 
148
- /** Zod schema for agentsmesh.yaml config validation */
148
+ /**
149
+ * Zod schema for `agentsmesh.yaml` config validation.
150
+ *
151
+ * Every field except `version` uses `.default(...)` so the runtime parser
152
+ * substitutes a documented value when the user omits the key. The published
153
+ * JSON Schema removes these from the top-level `required` array via
154
+ * `stripRequiredFromDefaults()` in `src/schemas/schema-generator.ts`, so
155
+ * editors don't complain about valid minimal configs (a `version: 1`-only
156
+ * file is allowed). Runtime parser typing stays `T` (not `T | undefined`) —
157
+ * the post-process fix lives at the publishing layer only.
158
+ */
149
159
  declare const configSchema: z.ZodObject<{
150
160
  version: z.ZodLiteral<1>;
151
161
  targets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
@@ -226,6 +236,12 @@ declare const configSchema: z.ZodObject<{
226
236
  windsurf: "windsurf";
227
237
  zed: "zed";
228
238
  }>>;
239
+ as: z.ZodOptional<z.ZodEnum<{
240
+ rules: "rules";
241
+ commands: "commands";
242
+ agents: "agents";
243
+ skills: "skills";
244
+ }>>;
229
245
  features: z.ZodArray<z.ZodEnum<{
230
246
  rules: "rules";
231
247
  commands: "commands";
@@ -1,4 +1,4 @@
1
- import { b as CanonicalFiles, c as CanonicalRule, V as ValidatedConfig } from './schema-B4PYQrZH.js';
1
+ import { b as CanonicalFiles, c as CanonicalRule, V as ValidatedConfig } from './schema-CLmR2JOb.js';
2
2
 
3
3
  /** Result of generating files for a target */
4
4
  interface GenerateResult {
@@ -36,6 +36,14 @@ interface LintDiagnostic {
36
36
  /** Feature support level per target */
37
37
  type SupportLevel = 'native' | 'embedded' | 'partial' | 'none';
38
38
 
39
+ /**
40
+ * Generated catalog of builtin target IDs (directory names under `src/targets/`).
41
+ * No descriptor imports — keeps this module on the schema-safe side of the
42
+ * `schema.ts → descriptors → ValidatedConfig → schema.ts` cycle.
43
+ */
44
+ declare const BUILTIN_TARGET_IDS: readonly ["aider", "amazon-q", "amp", "antigravity", "augment-code", "claude-code", "cline", "codex-cli", "continue", "copilot", "crush", "cursor", "deepagents-cli", "factory-droid", "gemini-cli", "goose", "jules", "junie", "kilo-code", "kiro", "opencode", "pi-agent", "qwen-code", "replit-agent", "roo-code", "rovodev", "trae", "warp", "windsurf", "zed"];
45
+ type BuiltinTargetId = (typeof BUILTIN_TARGET_IDS)[number];
46
+
39
47
  /** Serialization / projection variant for a canonical feature (see architecture review §3.3). */
40
48
  type FeatureFlavor = 'standard' | 'workflows' | 'settings-embedded' | 'projected-skills' | 'gh-actions-lite' | string;
41
49
  /** Normalized capability entry: support level plus optional serialization flavor. */
@@ -49,6 +57,9 @@ type TargetCapabilityInput = SupportLevel | TargetCapabilityValue;
49
57
  /**
50
58
  * Capabilities of a target tool — each feature has a level and optional serialization flavor.
51
59
  * String levels are accepted for authoring; `getTargetCapabilities` normalizes to objects.
60
+ *
61
+ * The matching `SupportLevel` union lives in `core/types.ts` (`'native' | 'embedded' |
62
+ * 'partial' | 'none'`); every external consumer imports it from there.
52
63
  */
53
64
  type TargetCapabilities = Record<'rules' | 'additionalRules' | 'commands' | 'agents' | 'skills' | 'mcp' | 'hooks' | 'ignore' | 'permissions', TargetCapabilityInput>;
54
65
  /** Optional context passed to feature generators (flavor-aware targets). */
@@ -172,17 +183,6 @@ interface TargetImporterDescriptor {
172
183
  readonly ignore?: ImportFeatureSpec;
173
184
  }
174
185
 
175
- /**
176
- * Self-describing target descriptor interface.
177
- *
178
- * A new target exports one TargetDescriptor from its index.ts.
179
- * The catalog imports it and adds it to BUILTIN_TARGETS — that
180
- * is the only central registration step.
181
- *
182
- * Designed for future plugin support: plugins will export a
183
- * TargetDescriptor that gets registered at runtime.
184
- */
185
-
186
186
  /** Declared output families for reference rewriting and decoration (architecture P1-3). */
187
187
  interface TargetOutputFamily {
188
188
  readonly id: string;
@@ -206,8 +206,13 @@ type ExtraRuleOutputResolver = (rule: CanonicalFiles['rules'][number], context:
206
206
  * target-specific path logic after those guards pass.
207
207
  */
208
208
  interface TargetPathResolvers {
209
- /** Output path for a non-root, non-filtered rule. */
210
- rulePath(slug: string, rule: CanonicalRule): string;
209
+ /**
210
+ * Output path for a non-root, non-filtered rule, or `null` to suppress
211
+ * generation. Targets whose capability `rules === 'none'` for a given
212
+ * scope MUST return `null` so callers can drop the row rather than emit
213
+ * to a fabricated directory path.
214
+ */
215
+ rulePath(slug: string, rule: CanonicalRule): string | null;
211
216
  /** Output path for a command. Null suppresses generation. */
212
217
  commandPath(name: string, config: ValidatedConfig): string | null;
213
218
  /** Output path for an agent. Null suppresses generation. */
@@ -289,8 +294,14 @@ interface TargetMetadata {
289
294
  * Bundles everything needed to generate, import, lint, and detect a target.
290
295
  */
291
296
  interface TargetDescriptor {
292
- /** Unique target identifier, e.g. 'claude-code' */
293
- readonly id: string;
297
+ /**
298
+ * Unique target identifier, e.g. 'claude-code'. The `string & {}` widening
299
+ * keeps plugin ids assignable while still letting `BuiltinTargetId` literal
300
+ * checks (`if (id === 'claude-code')`) get autocomplete + typo protection
301
+ * in editor tooling. Runtime validation lives in
302
+ * `target-descriptor.schema.ts` (`/^[a-z][a-z0-9-]*$/`).
303
+ */
304
+ readonly id: BuiltinTargetId | (string & {});
294
305
  /** User-facing metadata (display name, category, URL, description) */
295
306
  readonly metadata: TargetMetadata;
296
307
  /** Feature generators (rules, commands, agents, etc.) */
@@ -361,6 +372,26 @@ interface TargetDescriptor {
361
372
  * this flag get a lint warning when canonical rules have `trigger: 'manual'`.
362
373
  */
363
374
  readonly preservesManualActivation?: boolean;
375
+ /**
376
+ * When true, `agentsmesh init` excludes this target from the default bulk
377
+ * starter scaffold. Used by codex-cli because its `AGENTS.md` index format
378
+ * collides with other AGENTS.md-first targets when multiple targets are
379
+ * scaffolded together. Explicit `--target codex-cli` still works.
380
+ */
381
+ readonly excludeFromStarterInit?: boolean;
382
+ /**
383
+ * Built-in default values for `commands_to_skills` / `agents_to_skills`
384
+ * conversion projections. A `true` value enables conversion by default; an
385
+ * explicit `false` disables it (still consults the user's per-target config
386
+ * override before honoring this default). When the field is `undefined`,
387
+ * `shouldConvert{Commands,Agents}ToSkills` falls back to the caller-supplied
388
+ * `defaultEnabled` argument (used by plugin targets that haven't declared
389
+ * a default).
390
+ */
391
+ readonly conversionDefaults?: {
392
+ readonly commandsToSkills?: boolean;
393
+ readonly agentsToSkills?: boolean;
394
+ };
364
395
  }
365
396
 
366
397
  export type { ContentNormalizer as C, ExtraRuleOutputContext as E, FeatureLinter as F, GenerateResult as G, ImportPathBuilder as I, LintDiagnostic as L, RuleLinter as R, ScopeExtrasFn as S, TargetCapabilities as T, ExtraRuleOutputResolver as a, GeneratedOutputMerger as b, GlobalTargetSupport as c, ImportResult as d, TargetDescriptor as e, TargetGenerators as f, TargetLayout as g, TargetLayoutScope as h, TargetLintHooks as i, TargetManagedOutputs as j, TargetOutputFamily as k, TargetPathResolvers as l };
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-XZEis_Js.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-XZEis_Js.js';
3
- import './schema-B4PYQrZH.js';
1
+ import { e as TargetDescriptor, h as TargetLayoutScope, C as ContentNormalizer, d as ImportResult } from './target-descriptor-CkLWz3Xk.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-CkLWz3Xk.js';
3
+ import './schema-CLmR2JOb.js';
4
4
  import 'zod';
5
5
 
6
6
  /** Register a full target descriptor (for plugins). */