agentsmesh 0.7.0 → 0.8.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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b3f702d: Adds three new `agentsmesh lint` diagnostics, a recommended `.gitignore` policy for materialized packs, and a one-step `agentsmesh target-scaffold` workflow.
8
+
9
+ Added:
10
+ - New lint diagnostics: `silent-drop-guard` flags canonical content a target would otherwise drop without trace, `hook-script-references` reports hook commands pointing at missing wrapper scripts, and `rule-scope-inversion` catches manual-activation rules whose scope contradicts the target's projection rules. They are wired into `runLint` for every target via descriptor capabilities, so existing configs may surface new warnings; no rule has been removed.
11
+ - `agentsmesh init` now writes `.agentsmesh/packs/` into `.gitignore` alongside `agentsmesh.local.yaml`, `.agentsmeshcache`, and `.agentsmesh/.lock.tmp`. Materialized packs are treated like `node_modules` — `installs.yaml` is committed and `agentsmesh install --sync` reproduces the tree deterministically post-clone.
12
+ - `agentsmesh target-scaffold` post-steps collapse the previous three-edit sequence into one `pnpm catalog:generate` invocation, backed by a new auto-discovered builtin-target catalog (`scripts/generate-target-catalog.ts` + `pnpm catalog:verify` drift guard in CI).
13
+
14
+ Changed:
15
+ - The `agentsmesh.json` and `pack.json` schemas now list `targets` enums alphabetically. Schema consumers that pin order will see a one-time diff; values are unchanged.
16
+ - README documents the commit-vs-gitignore convention for generated tool folders and clarifies native Windows support (no WSL).
17
+
18
+ Internal:
19
+ - Per-target importers (`antigravity`, `claude-code`, `continue`, `copilot`, `cursor`, `gemini-cli`, `junie`, `kiro`, `roo-code`) migrated to the descriptor-driven import runner with mapper functions extracted into `import-mappers.ts` to keep `index.ts` ↔ `importer.ts` cycles out of the TDZ.
20
+ - New shared link-format registry (`src/core/reference/link-format-registry.ts`) consolidates per-target link rendering rules.
21
+
3
22
  ## 0.7.0
4
23
 
5
24
  ### Minor Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <div align="center">
2
2
 
3
- # AgentsMesh — One AI Coding Config for Every Tool
3
+ # AgentsMesh — AI Coding Config Sync for Every Tool
4
4
 
5
5
  [![CI](https://github.com/sampleXbro/agentsmesh/actions/workflows/ci.yml/badge.svg)](https://github.com/sampleXbro/agentsmesh/actions/workflows/ci.yml)
6
6
  [![npm version](https://img.shields.io/npm/v/agentsmesh.svg)](https://www.npmjs.com/package/agentsmesh)
@@ -12,11 +12,11 @@
12
12
  [![Docs](https://img.shields.io/badge/docs-website-brightgreen.svg)](https://samplexbro.github.io/agentsmesh)
13
13
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/sampleXbro/agentsmesh/pulls)
14
14
 
15
- **One canonical `.agentsmesh/` directory replaces scattered rules, prompts, agents, skills, MCP servers, hooks, ignore files, and permissions across every major AI coding tool.**
15
+ **AgentsMesh is an open-source CLI and TypeScript library for AI coding configuration sync. One canonical `.agentsmesh/` directory manages rules, prompts, commands, agents, skills, MCP servers, hooks, ignore files, and permissions across every major AI coding tool.**
16
16
 
17
- Edit once generate `CLAUDE.md`, `AGENTS.md`, `.cursor/rules`, `.github/copilot-instructions.md`, `.gemini/settings.json`, `.windsurf/rules`, `.codex/config.toml`, `.kiro/steering`, and more from the same source. Bidirectional import so you can adopt it on existing projects with one command.
17
+ Edit once and generate `CLAUDE.md`, `AGENTS.md`, `.cursor/rules`, `.github/copilot-instructions.md`, `.gemini/settings.json`, `.windsurf/rules`, `.codex/config.toml`, `.kiro/steering`, and more from the same source. Import existing Claude Code, Cursor, Copilot, Gemini CLI, Windsurf, Codex CLI, and other configs back into canonical form without losing round-trip metadata.
18
18
 
19
- **Works with** Claude Code · Cursor · GitHub Copilot · Gemini CLI · Windsurf · Continue · Cline · Kiro · Codex CLI · Junie · Roo Code · Antigravity — and new tools as the ecosystem grows. See the [full feature matrix](https://samplexbro.github.io/agentsmesh/reference/supported-tools/).
19
+ **Works with** Claude Code · Cursor · GitHub Copilot · Gemini CLI · Windsurf · Continue · Cline · Kiro · Codex CLI · Junie · Roo Code · Antigravity — plus plugin targets. See the [full feature matrix](https://samplexbro.github.io/agentsmesh/reference/supported-tools/).
20
20
 
21
21
  </div>
22
22
 
@@ -24,21 +24,20 @@ Edit once — generate `CLAUDE.md`, `AGENTS.md`, `.cursor/rules`, `.github/copil
24
24
 
25
25
  ---
26
26
 
27
- ## Why AgentsMesh
27
+ ## Why developers use AgentsMesh
28
28
 
29
- - **One source of truth** edit `.agentsmesh/`, generate everywhere. No more copy-pasting rules between tool directories.
30
- - **Bidirectional sync** import existing configs into canonical form and generate back out. Lossless round-trip, no manual reformatting.
31
- - **Project + Global modes** sync team config via project-local `.agentsmesh/` *and* personal config via user-level `~/.agentsmesh/`.
32
- - **Plugin system** add support for any AI coding tool via an npm package. No fork, no core PR.
33
- - **Team-safe collaboration** lock files track generated state, `check` catches drift in CI, `merge` resolves conflicts after `git merge`.
34
- - **Community packs** install shared skills, rules, agents, and commands from GitHub / GitLab / git URLs.
35
- - **Growing tool coverage** — new AI coding tools are added as the ecosystem evolves. See the [matrix](https://samplexbro.github.io/agentsmesh/reference/supported-tools/).
29
+ - **Unify AI coding rules** across Claude Code, Cursor, Copilot, Gemini CLI, Windsurf, Codex CLI, and mixed-tool teams.
30
+ - **Adopt existing projects safely** with bidirectional `import` and `generate` instead of rewriting every tool config by hand.
31
+ - **Sync personal global config** from `~/.agentsmesh/` to user-level assistant folders such as `~/.claude/`, `~/.cursor/`, and `~/.codex/`.
32
+ - **Standardize MCP, hooks, permissions, skills, and agents** where tools support them natively, with metadata-backed projections where they do not.
33
+ - **Catch config drift in CI** with lock-file checks, diffs, linting, and merge recovery built for team workflows.
34
+ - **Share and extend configuration** with community packs, remote `extends`, runtime plugins, and a typed programmatic API.
36
35
 
37
36
  ---
38
37
 
39
38
  ## Install
40
39
 
41
- Requires **Node.js 20+**. Supported platforms: **Linux**, **macOS**, and **Windows**.
40
+ Requires **Node.js 20+**. Supported platforms: **Linux**, **macOS**, and **Windows** (native, not WSL).
42
41
 
43
42
  ```bash
44
43
  npm install -D agentsmesh # or: pnpm add -D / yarn add -D
@@ -47,6 +46,8 @@ npx agentsmesh --help # run without installing
47
46
 
48
47
  CLI aliases: `agentsmesh` and `amsh`.
49
48
 
49
+ > **Windows notes:** All paths are normalized internally so generated configs and `installs.yaml` are portable across platforms. Watch mode uses polling on Windows because `ReadDirectoryChangesW` can miss just-created files in tmpdirs. CI runs the full test suite on Linux, macOS, and Windows.
50
+
50
51
  ---
51
52
 
52
53
  ## Quick start
@@ -76,9 +77,9 @@ agentsmesh generate --global # writes to ~/.claude/, ~/.cursor/, etc.
76
77
 
77
78
  ---
78
79
 
79
- ## Features
80
+ ## High-demand features
80
81
 
81
- ### One config, every AI coding tool
82
+ ### AI coding config sync for every tool
82
83
 
83
84
  AgentsMesh generates native configuration for every major AI coding assistant. Each tool's files are produced from a single `.agentsmesh/` directory with support for **rules, commands, agents, skills, MCP servers, hooks, ignore patterns, and permissions**:
84
85
 
@@ -99,7 +100,11 @@ AgentsMesh generates native configuration for every major AI coding assistant. E
99
100
 
100
101
  When a tool lacks native support for a feature, AgentsMesh embeds it with round-trip metadata — no data loss on re-import. See the [supported tools matrix](https://samplexbro.github.io/agentsmesh/reference/supported-tools/) for per-tool native vs. embedded breakdown.
101
102
 
102
- ### Global mode personal setup, same workflow
103
+ ### Bidirectional import and lossless generate
104
+
105
+ Use `agentsmesh import --from <tool>` to migrate existing AI tool configs into canonical `.agentsmesh/` files, then `agentsmesh generate` to project them back out. Managed embedding, reference rewriting, and lock metadata preserve projected features so commands, agents, and skills can round-trip even when a target stores them differently.
106
+
107
+ ### Global mode for personal AI assistant config
103
108
 
104
109
  `.agentsmesh/` at the project level is for teams. `~/.agentsmesh/` at the home level is for personal setup across every repo you touch:
105
110
 
@@ -111,7 +116,7 @@ agentsmesh generate --global # writes ~/.claude/CLAUDE.md, ~/.cursor/, ~/.code
111
116
 
112
117
  Every built-in target and every plugin supports global mode. Every CLI command (`diff`, `lint`, `watch`, `check`, `merge`, `matrix`) accepts `--global`. [Global mode paths per tool →](https://samplexbro.github.io/agentsmesh/reference/supported-tools/#global-mode)
113
118
 
114
- ### Plugins add any AI tool
119
+ ### Plugins for new AI coding tools
115
120
 
116
121
  Ship new target support as a standalone npm package — no fork, no core PR:
117
122
 
@@ -127,10 +132,12 @@ Plugins have full parity with built-in targets: project + global layouts, featur
127
132
 
128
133
  - **`agentsmesh check`** — CI gate that exits 1 if generated files drifted from the lock
129
134
  - **`agentsmesh diff`** — preview what the next `generate` would change
135
+ - **`agentsmesh lint`** — validate canonical config against target-specific constraints
136
+ - **`agentsmesh watch`** — regenerate target files on save during local editing
130
137
  - **`agentsmesh merge`** — recover from three-way `.lock` conflicts after `git merge`
131
138
  - **Collaboration config** — `lock_features` and `strategy` prevent accidental overrides
132
139
 
133
- ### Community packs
140
+ ### Community packs and shared config
134
141
 
135
142
  Install shared skills, rules, agents, and commands from any git repo:
136
143
 
@@ -142,13 +149,45 @@ agentsmesh install --sync # restore all packs after clone
142
149
 
143
150
  Packs live in `.agentsmesh/packs/`, track in `installs.yaml`, and merge into canonical config on every `generate`.
144
151
 
152
+ ### What to commit and what to gitignore
153
+
154
+ `agentsmesh init` writes a `.gitignore` that follows the recommended convention. The defaults are deliberate:
155
+
156
+ | Path | In git? | Why |
157
+ |---|---|---|
158
+ | `.agentsmesh/` (canonical) | **commit** | The source of truth — must be in git. |
159
+ | `.agentsmesh/.lock` | **commit** | Drift detection contract. `agentsmesh check` compares against this. |
160
+ | `.agentsmesh/packs/` | **gitignore** | Materialized from `installs.yaml`. Same model as `node_modules` — `agentsmesh install --sync` reproduces them deterministically post-clone. |
161
+ | `agentsmesh.local.yaml` | **gitignore** | Per-developer overrides. |
162
+ | `.agentsmesh/.lock.tmp` | **gitignore** | Transient. |
163
+ | `.agentsmeshcache` | **gitignore** | Remote-extends cache. |
164
+ | Generated tool folders (`.claude/`, `.cursor/`, `.github/`, `.gemini/`, `CLAUDE.md`, `AGENTS.md`, etc.) | **commit** | AI tools read these at runtime. Committing means a fresh clone has working AI configs without a build step. `agentsmesh check` in CI catches drift between canonical and generated. |
165
+
166
+ Why generated configs stay committed: the same reason `package-lock.json` does. They're deterministic build output that downstream consumers (in this case, the AI tool itself) read directly. Gitignoring them breaks fresh-clone UX and makes `agentsmesh check` meaningless. PR reviewers also benefit from seeing the projected diff in the format Claude/Cursor/Copilot will actually consume.
167
+
168
+ If your team has a strong reason to gitignore generated configs (e.g., monorepo size concerns, regenerate-on-checkout hooks), add the target-specific entries manually — but expect to wire `agentsmesh generate` into your post-checkout flow.
169
+
145
170
  ### Extending AgentsMesh
146
171
 
147
- - **`agentsmesh target scaffold foo-ide`** — generate a built-in target skeleton (10 files, ready to contribute upstream) with global mode, conversion support, and lint hooks pre-wired
148
- - **`agentsmesh plugin add <pkg>`** — load third-party npm packages as runtime targets with full built-in parity
172
+ - **`agentsmesh target scaffold foo-ide`** — generate a built-in target skeleton (10 files: descriptor, generators, importer, linter, tests, fixtures) with global mode, conversion support, and lint hooks pre-wired. The catalog is auto-discovered at build time (`pnpm catalog:generate`) — no manual edits to `target-ids.ts`, `builtin-targets.ts`, or the import-map barrel.
173
+ - **`agentsmesh plugin add <pkg>`** — load third-party npm packages as runtime targets with full built-in parity. Supports `agentsmesh plugin list`, `info`, and `remove`.
149
174
 
150
175
  [Extending guide →](https://samplexbro.github.io/agentsmesh/guides/extending/) · [Building plugins →](https://samplexbro.github.io/agentsmesh/guides/building-plugins/)
151
176
 
177
+ ### Schema-validated configs (IDE autocomplete)
178
+
179
+ Every config file ships with a generated JSON Schema, so VS Code, JetBrains, and other editors give you autocomplete and validation out of the box:
180
+
181
+ | Config file | JSON Schema |
182
+ |---|---|
183
+ | `agentsmesh.yaml` / `.local.yaml` | `node_modules/agentsmesh/schemas/agentsmesh.json` |
184
+ | `.agentsmesh/hooks.yaml` | `schemas/hooks.json` |
185
+ | `.agentsmesh/permissions.yaml` | `schemas/permissions.json` |
186
+ | `.agentsmesh/mcp.json` | `schemas/mcp.json` |
187
+ | `.agentsmesh/packs/*/pack.json` | `schemas/pack.json` |
188
+
189
+ `agentsmesh init` writes the appropriate `# yaml-language-server: $schema=...` directive (or `$schema` field for JSON) into each canonical file, so editors pick up validation immediately.
190
+
152
191
  ---
153
192
 
154
193
  ## Supported tools — feature matrix
@@ -156,33 +195,33 @@ Packs live in `.agentsmesh/packs/`, track in `installs.yaml`, and merge into can
156
195
  ### Project scope (`agentsmesh generate`)
157
196
 
158
197
  <!-- agentsmesh:support-matrix:project -->
159
- | Feature | Claude Code | Cursor | Copilot | Continue | Junie | Kiro | Gemini CLI | Cline | Codex CLI | Windsurf | Antigravity | Roo Code |
198
+ | Feature | Antigravity | Claude Code | Cline | Codex CLI | Continue | Copilot | Cursor | Gemini CLI | Junie | Kiro | Roo Code | Windsurf |
160
199
  |---|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|
161
200
  | Rules | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native |
162
- | Additional Rules | Native | Embedded | Native | Native | Native | Native | Embedded | Native | Native | Native | Native | Native |
163
- | Commands | Native | Native | Native | Embedded | Native | | Native | Native (workflows) | Embedded | Native (workflows) | Partial (workflows) | Native |
164
- | Agents | Native | Native | Native | — | Native | Native | Native | Embedded | Native | Embedded | | Partial |
165
- | Skills | Native | Native | Native | Embedded | Native | Native | Native | Native | Native | Native | Native | Native |
166
- | MCP Servers | Native | Native | | Native | Native | Native | Native | Native | Native | Partial | | Native |
167
- | Hooks | Native | Native | Partial | — | — | Native | Partial | Native | — | Native | — | |
168
- | Ignore | Native | Native | — | — | Native | Native | Native (settings-embedded) | Native | | Native | — | Native |
169
- | Permissions | Native | Partial | — | — | — | — | Partial | | — | — | — | — |
201
+ | Additional Rules | Native | Native | Native | Native | Native | Native | Embedded | Embedded | Native | Native | Native | Native |
202
+ | Commands | Partial (workflows) | Native | Native (workflows) | Embedded | Embedded | Native | Native | Native | Native | | Native | Native (workflows) |
203
+ | Agents | | Native | Embedded | Native | — | Native | Native | Native | Native | Native | Partial | Embedded |
204
+ | Skills | Native | Native | Native | Native | Embedded | Native | Native | Native | Native | Native | Native | Native |
205
+ | MCP Servers | | Native | Native | Native | Native | | Native | Native | Native | Native | Native | Partial |
206
+ | Hooks | | Native | Native | — | — | Partial | Native | Partial | — | Native | — | Native |
207
+ | Ignore | — | Native | Native | — | — | | Native | Native (settings-embedded) | Native | Native | Native | Native |
208
+ | Permissions | | Native | — | — | — | — | Partial | Partial | — | — | — | — |
170
209
  <!-- /agentsmesh:support-matrix:project -->
171
210
 
172
211
  ### Global scope (`agentsmesh generate --global`)
173
212
 
174
213
  <!-- agentsmesh:support-matrix:global -->
175
- | Feature | Claude Code | Cursor | Copilot | Continue | Junie | Kiro | Gemini CLI | Cline | Codex CLI | Windsurf | Antigravity | Roo Code |
214
+ | Feature | Antigravity | Claude Code | Cline | Codex CLI | Continue | Copilot | Cursor | Gemini CLI | Junie | Kiro | Roo Code | Windsurf |
176
215
  |---|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|
177
216
  | Rules | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native |
178
- | Additional Rules | Native | Embedded | Native | Native | Embedded | Native | Embedded | Native | Embedded | Partial | Embedded | Native |
179
- | Commands | Native | Native | Native | Native | Native | | Native | Native (workflows) | Embedded | Native (workflows) | Partial (workflows) | Native |
180
- | Agents | Native | Native | Native | — | Native | Native | Native | Embedded | Native | Embedded | | Partial |
217
+ | Additional Rules | Embedded | Native | Native | Embedded | Native | Native | Embedded | Embedded | Embedded | Native | Native | Partial |
218
+ | Commands | Partial (workflows) | Native | Native (workflows) | Embedded | Native | Native | Native | Native | Native | | Native | Native (workflows) |
219
+ | Agents | | Native | Embedded | Native | — | Native | Native | Native | Native | Native | Partial | Embedded |
181
220
  | Skills | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native |
182
- | MCP Servers | Native | Native | | Native | Native | Native | Native | Native | Native | Partial | Native | Native |
183
- | Hooks | Native | Native | | — | — | — | Partial | Native | — | Native | — | |
184
- | Ignore | Native | Native | — | — | — | Native | — | Native | — | Native | | Native |
185
- | Permissions | Native | | — | — | — | — | — | — | — | — | — | — |
221
+ | MCP Servers | Native | Native | Native | Native | Native | | Native | Native | Native | Native | Native | Partial |
222
+ | Hooks | | Native | Native | — | — | — | Native | Partial | — | | — | Native |
223
+ | Ignore | — | Native | Native | — | — | — | Native | — | — | Native | Native | Native |
224
+ | Permissions | | Native | — | — | — | — | — | — | — | — | — | — |
186
225
  <!-- /agentsmesh:support-matrix:global -->
187
226
 
188
227
  See the [full feature matrix docs](https://samplexbro.github.io/agentsmesh/reference/supported-tools/) for native vs. embedded support details and per-tool global paths.
@@ -193,6 +232,8 @@ See the [full feature matrix docs](https://samplexbro.github.io/agentsmesh/refer
193
232
 
194
233
  AgentsMesh is also importable as a typed ESM library, so you can drive every CLI capability — `generate`, `import`, `lint`, `diff`, `check` — from scripts, IDE extensions, MCP servers, or CI without spawning the CLI. Public entrypoints: `agentsmesh` (full surface), `agentsmesh/engine`, `agentsmesh/canonical`, `agentsmesh/targets`.
195
234
 
235
+ `loadProjectContext()` mirrors what the CLI does on startup: resolves config, applies local overrides, loads plugins, materializes `extends` and installed packs, and reads the canonical directory. The result is a single context value you can pass to `generate`, `lint`, or `diff` — the same surface the CLI uses.
236
+
196
237
  ```ts
197
238
  import {
198
239
  loadProjectContext,
@@ -241,7 +282,7 @@ import { loadCanonical, loadCanonicalFiles } from 'agentsmesh/canonical';
241
282
  import { getAllDescriptors } from 'agentsmesh/targets';
242
283
  ```
243
284
 
244
- Every public symbol resolves to a real `.d.ts` under strict TypeScript. Full reference at [agentsmesh.dev/reference/programmatic-api](https://samplexbro.github.io/agentsmesh/reference/programmatic-api/) — entrypoint table, every function signature, the typed error taxonomy, and the canonical/target type lists. ESM-only; requires Node.js 20+.
285
+ Every public symbol resolves to a real `.d.ts` under strict TypeScript. Full reference in the [programmatic API docs](https://samplexbro.github.io/agentsmesh/reference/programmatic-api/) — entrypoint table, every function signature, the typed error taxonomy, and the canonical/target type lists. ESM-only; requires Node.js 20+.
245
286
 
246
287
  ---
247
288
 
@@ -1,5 +1,5 @@
1
- import { b as CanonicalFiles, V as ValidatedConfig } from './schema-B7ZSqkrS.js';
2
- export { C as CanonicalAgent, a as CanonicalCommand, c as CanonicalRule, d as CanonicalSkill, H as HookEntry, e as Hooks, I as IgnorePatterns, M as McpConfig, f as McpServer, P as Permissions, S as SkillSupportingFile, g as StdioMcpServer, U as UrlMcpServer } from './schema-B7ZSqkrS.js';
1
+ import { b as CanonicalFiles, V as ValidatedConfig } from './schema-BeGiBqbB.js';
2
+ export { C as CanonicalAgent, a as CanonicalCommand, c as CanonicalRule, d as CanonicalSkill, H as HookEntry, e as Hooks, I as IgnorePatterns, M as McpConfig, f as McpServer, P as Permissions, S as SkillSupportingFile, g as StdioMcpServer, U as UrlMcpServer } from './schema-BeGiBqbB.js';
3
3
  import 'zod';
4
4
 
5
5
  /**