agentsmesh 0.7.0 → 0.9.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 +62 -0
- package/README.md +221 -97
- package/dist/canonical.d.ts +2 -2
- package/dist/canonical.js +8755 -8588
- package/dist/canonical.js.map +1 -1
- package/dist/cli.js +135 -134
- package/dist/engine.d.ts +2 -2
- package/dist/engine.js +8708 -8367
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8580 -8238
- package/dist/index.js.map +1 -1
- package/dist/{target-descriptor-COp3nil6.d.ts → target-descriptor-CkH4Z43u.d.ts} +105 -2
- package/dist/targets.d.ts +22 -4
- package/dist/targets.js +8579 -8424
- package/dist/targets.js.map +1 -1
- package/package.json +6 -3
- package/schemas/agentsmesh.json +24 -24
- package/schemas/pack.json +8 -8
- package/dist/{schema-B7ZSqkrS.d.ts → schema-BeGiBqbB.d.ts} +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,67 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.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, all emitted as warnings (do not change `lint`'s exit code):
|
|
11
|
+
- `silent-drop-guard` flags canonical content a target would otherwise drop without trace based on its capability map.
|
|
12
|
+
- `hook-script-references` warns when a hook command references a script path for any target whose generator does not copy hook scripts into its output. **All built-in targets except Copilot fall under this rule today.** Existing hook configs that reference local script paths (e.g. `./scripts/pre-commit.sh`) will surface a new warning per matching target on the first lint after upgrade. The script must already exist relative to the hook execution directory or the generated config will fail at runtime — the diagnostic just makes the gap visible.
|
|
13
|
+
- `rule-scope-inversion` catches manual-activation rules whose scope contradicts the target's projection rules.
|
|
14
|
+
All three are wired into `runLint` for every target via descriptor capabilities; no existing rule has been removed and no diagnostic is upgraded to error severity.
|
|
15
|
+
- `agentsmesh init` now writes `.agentsmesh/packs/` into `.gitignore` alongside `agentsmesh.local.yaml`, `.agentsmeshcache`, and `.agentsmesh/.lock.tmp`, and skips entries already covered by a broader pre-existing pattern (e.g. an existing `.agentsmesh/` line covers `.agentsmesh/packs/`). Materialized packs are treated like `node_modules` — `installs.yaml` is committed and `agentsmesh install --sync` reproduces the tree deterministically post-clone.
|
|
16
|
+
- `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).
|
|
17
|
+
|
|
18
|
+
Changed:
|
|
19
|
+
- 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.
|
|
20
|
+
- README documents the commit-vs-gitignore convention for generated tool folders and clarifies native Windows support (no WSL).
|
|
21
|
+
|
|
22
|
+
Internal:
|
|
23
|
+
- 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.
|
|
24
|
+
- New shared link-format registry (`src/core/reference/link-format-registry.ts`) consolidates per-target link rendering rules.
|
|
25
|
+
- `writeFileAtomic` now refuses to follow a pre-existing symlink at the target path (closes a TOCTOU window where a swapped symlink could redirect writes outside the project tree).
|
|
26
|
+
- `agentsmesh plugin add` now warns that plugins load as trusted Node.js modules with full process privileges.
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- 08ef1b0: Security hardening and correctness fixes across install, generate, reference rewriting, plugin loading, and caching subsystems.
|
|
31
|
+
|
|
32
|
+
Fixed:
|
|
33
|
+
- `agentsmesh install --path` now rejects paths that traverse outside the install source root, closing a directory-escape vulnerability where `--path ../../outside` could read files outside the fetched source.
|
|
34
|
+
- Pack names are validated as single directory segments before materialization — values containing path separators (e.g. `../../escape`) are rejected, preventing writes outside `.agentsmesh/packs/`.
|
|
35
|
+
- `writeFileAtomic` now checks the `.tmp` staging path for symlinks before writing, closing a TOCTOU window where a symlink at `${path}.tmp` could redirect writes to an attacker-controlled location.
|
|
36
|
+
- `agentsmesh generate --targets` now validates filter values against configured targets and errors on unknown names. Previously a misspelled target silently produced zero outputs and `--check` reported success, allowing CI to pass while checking nothing.
|
|
37
|
+
- Project-scope skill mirrors now receive source-map entries for reference rewriting. Previously only global-scope mirrors were mapped, leaving Markdown links inside project-mirrored skill files unrewritten.
|
|
38
|
+
- Plugin targets declaring `sharedArtifacts` are now recognized during global reference rewriting. Previously only builtin target descriptors were consulted, so plugin-owned shared paths could be rebased through the wrong artifact map.
|
|
39
|
+
- `runDescriptorImport` is now exported from `agentsmesh/targets` as documented in the plugin guide.
|
|
40
|
+
- Importer fallback sources are now tried when configured primary files are absent on disk, not only when the primary source list is empty.
|
|
41
|
+
- `flatFile` and `mcpJson` import modes now honor `canonicalDir` when `canonicalFilename` is a bare filename, matching the documented directory-plus-filename contract for plugin descriptor authors.
|
|
42
|
+
- Rule path mapping uses POSIX `basename` with backslash normalization instead of host `node:path`, preventing broken slugs when Windows-shaped canonical paths appear on a POSIX host.
|
|
43
|
+
- Relative `file:` plugin sources now resolve against `projectRoot` instead of the filesystem root.
|
|
44
|
+
- Remote cache keys now preserve dots and use double-separator delimiters so distinct refs like `v1.0.0` and `v1_0_0` no longer collide. Existing cached entries will be re-fetched once after upgrade.
|
|
45
|
+
|
|
46
|
+
## 0.8.0
|
|
47
|
+
|
|
48
|
+
### Minor Changes
|
|
49
|
+
|
|
50
|
+
- b3f702d: Adds three new `agentsmesh lint` diagnostics, a recommended `.gitignore` policy for materialized packs, and a one-step `agentsmesh target-scaffold` workflow.
|
|
51
|
+
|
|
52
|
+
Added:
|
|
53
|
+
- 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.
|
|
54
|
+
- `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.
|
|
55
|
+
- `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).
|
|
56
|
+
|
|
57
|
+
Changed:
|
|
58
|
+
- 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.
|
|
59
|
+
- README documents the commit-vs-gitignore convention for generated tool folders and clarifies native Windows support (no WSL).
|
|
60
|
+
|
|
61
|
+
Internal:
|
|
62
|
+
- 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.
|
|
63
|
+
- New shared link-format registry (`src/core/reference/link-format-registry.ts`) consolidates per-target link rendering rules.
|
|
64
|
+
|
|
3
65
|
## 0.7.0
|
|
4
66
|
|
|
5
67
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
# AgentsMesh — One
|
|
3
|
+
# AgentsMesh — One `.agentsmesh/` Directory for Every AI Coding Tool
|
|
4
4
|
|
|
5
5
|
[](https://github.com/sampleXbro/agentsmesh/actions/workflows/ci.yml)
|
|
6
6
|
[](https://www.npmjs.com/package/agentsmesh)
|
|
@@ -12,94 +12,189 @@
|
|
|
12
12
|
[](https://samplexbro.github.io/agentsmesh)
|
|
13
13
|
[](https://github.com/sampleXbro/agentsmesh/pulls)
|
|
14
14
|
|
|
15
|
-
|
|
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.
|
|
15
|
+
</div>
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
AI coding assistants now ship with their own configuration formats — `CLAUDE.md`, `AGENTS.md`, `.cursor/rules/*.mdc`, `.github/copilot-instructions.md`, `.gemini/settings.json`, `.windsurf/rules/*.md`, `.codex/config.toml`, `.kiro/steering/*.md`, and more. Maintaining the same rules, prompts, MCP servers, hooks, and permissions across all of them by hand causes config drift fast.
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
**AgentsMesh** is an open-source CLI and TypeScript library that fixes this. You write canonical rules, commands, agents, skills, MCP, hooks, ignore files, and permissions once in `.agentsmesh/`, then `agentsmesh generate` projects them out as native config for every supported assistant. `agentsmesh import` brings existing tool configs back into canonical form, and `agentsmesh check` catches drift in CI.
|
|
22
20
|
|
|
23
21
|
> **Full documentation: [samplexbro.github.io/agentsmesh](https://samplexbro.github.io/agentsmesh)**
|
|
24
22
|
|
|
25
23
|
---
|
|
26
24
|
|
|
27
|
-
##
|
|
25
|
+
## Before / After
|
|
28
26
|
|
|
29
|
-
|
|
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/).
|
|
27
|
+
**Before — fragmented assistant-native config in one repo:**
|
|
36
28
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
```text
|
|
30
|
+
CLAUDE.md
|
|
31
|
+
AGENTS.md
|
|
32
|
+
.cursor/rules/*.mdc
|
|
33
|
+
.github/copilot-instructions.md
|
|
34
|
+
.gemini/settings.json
|
|
35
|
+
.windsurf/rules/*.md
|
|
36
|
+
.codex/config.toml
|
|
37
|
+
.kiro/steering/*.md
|
|
38
|
+
```
|
|
40
39
|
|
|
41
|
-
|
|
40
|
+
**After — one canonical source, generated everywhere:**
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
.agentsmesh/
|
|
44
|
+
rules/
|
|
45
|
+
_root.md
|
|
46
|
+
commands/
|
|
47
|
+
agents/
|
|
48
|
+
skills/
|
|
49
|
+
mcp.json
|
|
50
|
+
hooks.yaml
|
|
51
|
+
permissions.yaml
|
|
52
|
+
ignore
|
|
53
|
+
```
|
|
42
54
|
|
|
43
55
|
```bash
|
|
44
|
-
|
|
45
|
-
npx agentsmesh --help # run without installing
|
|
56
|
+
npx agentsmesh generate
|
|
46
57
|
```
|
|
47
58
|
|
|
48
|
-
|
|
59
|
+
The native files above are still emitted — AgentsMesh writes them for you from `.agentsmesh/`. Edit canonical sources, regenerate, and every tool stays in sync.
|
|
49
60
|
|
|
50
61
|
---
|
|
51
62
|
|
|
52
|
-
##
|
|
63
|
+
## 60-second quickstart
|
|
53
64
|
|
|
54
|
-
|
|
65
|
+
Requires Node.js 20+. Works on Linux, macOS, and Windows (native, not WSL).
|
|
55
66
|
|
|
56
67
|
```bash
|
|
57
|
-
agentsmesh init
|
|
58
|
-
#
|
|
59
|
-
agentsmesh
|
|
68
|
+
npx agentsmesh init # scaffold .agentsmesh/ + agentsmesh.yaml
|
|
69
|
+
npx agentsmesh generate # produce native configs for every enabled tool
|
|
70
|
+
npx agentsmesh check # CI-friendly drift gate against .agentsmesh/.lock
|
|
60
71
|
```
|
|
61
72
|
|
|
62
|
-
|
|
73
|
+
- **`init`** — creates `agentsmesh.yaml`, `agentsmesh.local.yaml`, and the canonical `.agentsmesh/` directory.
|
|
74
|
+
- **`generate`** — writes `CLAUDE.md`, `AGENTS.md`, `.cursor/`, `.github/copilot-instructions.md`, etc. from canonical sources.
|
|
75
|
+
- **`check`** — exits non-zero if generated files have drifted from `.agentsmesh/.lock`. Drop into CI.
|
|
76
|
+
|
|
77
|
+
Prefer a local install? `npm install -D agentsmesh` (also `pnpm add -D` / `yarn add -D`). The CLI ships as `agentsmesh` and the shorter alias `amsh`.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Safe adoption in an existing repository
|
|
82
|
+
|
|
83
|
+
If your repo already has `.cursor/`, `.claude/`, `.github/copilot-instructions.md`, or other native files, you don't have to delete them. The recommended flow imports them into `.agentsmesh/` first, lets you preview the projection, and only then trusts `generate`.
|
|
63
84
|
|
|
64
85
|
```bash
|
|
65
|
-
agentsmesh import --from cursor
|
|
66
|
-
agentsmesh generate
|
|
86
|
+
npx agentsmesh import --from cursor # or claude-code, copilot, codex-cli, gemini-cli, windsurf, ...
|
|
87
|
+
npx agentsmesh diff # patch-style preview of what generate would change
|
|
88
|
+
npx agentsmesh generate # write native configs (back) from canonical
|
|
89
|
+
npx agentsmesh check # add to CI to detect drift
|
|
67
90
|
```
|
|
68
91
|
|
|
69
|
-
|
|
92
|
+
What this gets you:
|
|
93
|
+
|
|
94
|
+
- `import` reads existing tool configs and writes equivalent canonical files into `.agentsmesh/` — round-trip metadata is preserved so re-import doesn't lose information.
|
|
95
|
+
- `diff` shows the unified patch every output file would receive, so you can review before any write.
|
|
96
|
+
- `check` reads `.agentsmesh/.lock` and fails the build if the canonical sources and the generated files disagree.
|
|
97
|
+
|
|
98
|
+
`import --from` accepts the built-in target IDs: `claude-code`, `cursor`, `copilot`, `codex-cli`, `gemini-cli`, `windsurf`, `continue`, `cline`, `kiro`, `junie`, `roo-code`, `antigravity`. Plugin targets are valid too.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Demo
|
|
103
|
+
|
|
104
|
+
<!-- TODO: Add terminal demo GIF showing init → generate → diff → check. -->
|
|
105
|
+
|
|
106
|
+
A quick sample of the canonical → native projection:
|
|
70
107
|
|
|
71
108
|
```bash
|
|
72
|
-
agentsmesh init
|
|
73
|
-
agentsmesh
|
|
74
|
-
agentsmesh generate
|
|
109
|
+
npx agentsmesh init
|
|
110
|
+
find .agentsmesh -maxdepth 2 -type f # see the canonical scaffold
|
|
111
|
+
npx agentsmesh generate
|
|
112
|
+
npx agentsmesh diff # preview future changes
|
|
113
|
+
npx agentsmesh check # CI-style drift gate
|
|
75
114
|
```
|
|
76
115
|
|
|
116
|
+
On macOS/Linux you can also run `tree .agentsmesh` if you have `tree` installed.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Supported AI coding tools
|
|
121
|
+
|
|
122
|
+
AgentsMesh currently generates native config for every major AI coding assistant — Claude Code, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Continue, Cline, Kiro, Codex CLI, Junie, Roo Code, Antigravity — plus plugin targets you can ship as standalone npm packages. Each tool's native vs. embedded support per feature is tracked in the [supported tools matrix](https://samplexbro.github.io/agentsmesh/reference/supported-tools/). The full matrix table is also embedded [further down this README](#supported-tools--feature-matrix).
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Why developers use AgentsMesh
|
|
127
|
+
|
|
128
|
+
- **Bidirectional sync** — `import` reads existing tool configs into `.agentsmesh/`; `generate` projects them back out. Round-trips are loss-free, so adopting AgentsMesh in an existing repo never throws away data.
|
|
129
|
+
- **Automatic link rebasing** — references like `.agentsmesh/skills/foo/SKILL.md` are rewritten to target-relative paths in every generated artifact, so cross-file links stay valid from `.claude/`, `.cursor/`, `.github/`, `.codex/`, and the rest.
|
|
130
|
+
- **Managed embedding with round-trip metadata** — when a target has no native slot for a feature (e.g. commands in Codex CLI, agents in Cline), AgentsMesh embeds it with frontmatter that survives the next `import`. No silent data loss; the full feature-by-feature breakdown lives in the [supported tools matrix](https://samplexbro.github.io/agentsmesh/reference/supported-tools/).
|
|
131
|
+
- **Team-safe collaboration** — `agentsmesh check` is a CI drift gate against `.agentsmesh/.lock`, `agentsmesh diff` previews changes, `agentsmesh merge` rebuilds the lock after three-way Git conflicts, and `lock_features` + per-feature `strategy` prevent accidental overrides.
|
|
132
|
+
- **Global mode** — `~/.agentsmesh/` syncs personal AI config to `~/.claude/`, `~/.cursor/`, `~/.codex/`, `~/.windsurf/`, and other user-level folders. Every CLI command accepts `--global`.
|
|
133
|
+
- **Extensible** — community packs (`agentsmesh install ...`), remote `extends`, runtime plugins (`agentsmesh plugin add`), schema-validated config files, and a typed programmatic API for scripts, IDE extensions, and CI.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Why not just `AGENTS.md`?
|
|
138
|
+
|
|
139
|
+
[`AGENTS.md`](https://agents.md) is great as a shared, human-readable instruction file. AgentsMesh uses `AGENTS.md` natively where the target supports it (Codex CLI, Cursor, Copilot, Junie, Windsurf, …) and treats it as a first-class output, not a competitor.
|
|
140
|
+
|
|
141
|
+
The reason `AGENTS.md` alone is not enough: most AI coding assistants expose configuration surfaces beyond a single instruction markdown file, and those surfaces don't all overlap.
|
|
142
|
+
|
|
143
|
+
- **Cursor** has `.cursor/rules/*.mdc` (with frontmatter scopes), `.cursorignore`, MCP config, and hooks.
|
|
144
|
+
- **Claude Code** has `CLAUDE.md`, `.claude/agents/`, `.claude/skills/`, `.claude/commands/`, `.claude/settings.json`, hooks, and permissions.
|
|
145
|
+
- **GitHub Copilot** has `.github/copilot-instructions.md`, `.github/instructions/*.instructions.md`, agents, prompts, and (partial) hooks.
|
|
146
|
+
- **Gemini CLI** has `GEMINI.md`, `.gemini/settings.json` (MCP + hooks), `.gemini/commands/*.toml`, and agents.
|
|
147
|
+
- **Codex CLI** has `AGENTS.md` plus `.codex/config.toml`, `.codex/agents/*.toml`, and `.codex/rules/`.
|
|
148
|
+
- **Windsurf**, **Continue**, **Cline**, **Kiro**, **Junie**, **Roo Code**, **Antigravity** each have their own native rules, workflows, MCP servers, skills, and ignore files.
|
|
149
|
+
|
|
150
|
+
AgentsMesh canonicalizes all of these — rules, commands, agents, skills, MCP servers, hooks, ignore patterns, permissions — so you don't pick one tool's surface as the lowest common denominator. When a tool has no native slot for a feature, AgentsMesh embeds it with round-trip metadata instead of dropping it.
|
|
151
|
+
|
|
77
152
|
---
|
|
78
153
|
|
|
79
|
-
##
|
|
154
|
+
## Core concepts
|
|
155
|
+
|
|
156
|
+
`.agentsmesh/` is the canonical source of truth. Generated tool files are artifacts. The directory contains:
|
|
157
|
+
|
|
158
|
+
- `rules/_root.md` — the root rule every target projects (typically becomes `CLAUDE.md`, `AGENTS.md`, `.cursor/rules/_root.mdc`, etc.).
|
|
159
|
+
- `rules/*.md` — additional scoped rules.
|
|
160
|
+
- `commands/*.md` — reusable slash-style prompts/commands.
|
|
161
|
+
- `agents/*.md` — agent definitions (where the target supports them).
|
|
162
|
+
- `skills/<name>/SKILL.md` (+ supporting files) — composable skills.
|
|
163
|
+
- `mcp.json` — MCP server definitions.
|
|
164
|
+
- `hooks.yaml` — pre/post tool hooks.
|
|
165
|
+
- `permissions.yaml` — allow/deny rules where the target supports them.
|
|
166
|
+
- `ignore` — paths the assistant should not read or modify.
|
|
167
|
+
|
|
168
|
+
Configuration:
|
|
169
|
+
|
|
170
|
+
- `agentsmesh.yaml` — selects which targets and features are enabled.
|
|
171
|
+
- `agentsmesh.local.yaml` — per-developer overrides (gitignored by default).
|
|
172
|
+
- `.agentsmesh/.lock` — drift-detection lock file consumed by `agentsmesh check`.
|
|
80
173
|
|
|
81
|
-
|
|
174
|
+
Detailed contracts: [Canonical Config](https://samplexbro.github.io/agentsmesh/canonical-config/) · [Generation pipeline](https://samplexbro.github.io/agentsmesh/reference/generation-pipeline/).
|
|
82
175
|
|
|
83
|
-
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## CLI usage
|
|
84
179
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
180
|
+
```bash
|
|
181
|
+
agentsmesh init [--global] [--yes]
|
|
182
|
+
agentsmesh generate [--global] [--targets <csv>] [--check] [--dry-run] [--force] [--refresh-cache]
|
|
183
|
+
agentsmesh import --from <target> [--global]
|
|
184
|
+
agentsmesh diff [--global] [--targets <csv>]
|
|
185
|
+
agentsmesh lint [--global] [--targets <csv>]
|
|
186
|
+
agentsmesh watch [--global] [--targets <csv>]
|
|
187
|
+
agentsmesh check [--global]
|
|
188
|
+
agentsmesh merge [--global]
|
|
189
|
+
agentsmesh matrix [--global] [--targets <csv>] [--verbose]
|
|
190
|
+
agentsmesh install <source> [--sync] [--path <dir>] [--target <id>] [--as <kind>] [--name <id>] [--extends] [--dry-run] [--global] [--force]
|
|
191
|
+
agentsmesh plugin add|list|remove|info [--version <v>] [--id <id>]
|
|
192
|
+
agentsmesh target scaffold <id> [--name <displayName>] [--force]
|
|
193
|
+
```
|
|
99
194
|
|
|
100
|
-
|
|
195
|
+
`agentsmesh --help` prints the same surface; `agentsmesh <cmd> --help` is also supported.
|
|
101
196
|
|
|
102
|
-
### Global mode
|
|
197
|
+
### Global mode (personal AI assistant config)
|
|
103
198
|
|
|
104
199
|
`.agentsmesh/` at the project level is for teams. `~/.agentsmesh/` at the home level is for personal setup across every repo you touch:
|
|
105
200
|
|
|
@@ -109,9 +204,9 @@ agentsmesh import --global --from claude-code
|
|
|
109
204
|
agentsmesh generate --global # writes ~/.claude/CLAUDE.md, ~/.cursor/, ~/.codex/, ~/.windsurf/, etc.
|
|
110
205
|
```
|
|
111
206
|
|
|
112
|
-
Every built-in target
|
|
207
|
+
Every built-in target with a global layout 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
208
|
|
|
114
|
-
### Plugins
|
|
209
|
+
### Plugins for new AI coding tools
|
|
115
210
|
|
|
116
211
|
Ship new target support as a standalone npm package — no fork, no core PR:
|
|
117
212
|
|
|
@@ -125,12 +220,14 @@ Plugins have full parity with built-in targets: project + global layouts, featur
|
|
|
125
220
|
|
|
126
221
|
### Team-safe collaboration & CI drift detection
|
|
127
222
|
|
|
128
|
-
- **`agentsmesh check`** — CI gate that exits 1 if generated files drifted from the lock
|
|
129
|
-
- **`agentsmesh diff`** — preview what the next `generate` would change
|
|
130
|
-
- **`agentsmesh
|
|
131
|
-
-
|
|
223
|
+
- **`agentsmesh check`** — CI gate that exits 1 if generated files drifted from the lock.
|
|
224
|
+
- **`agentsmesh diff`** — preview what the next `generate` would change.
|
|
225
|
+
- **`agentsmesh lint`** — validate canonical config against target-specific constraints; also surfaces cross-target warnings (`silent-drop-guard`, `hook-script-references`, `rule-scope-inversion`) for content a target would silently drop or mishandle. [Lint reference →](https://samplexbro.github.io/agentsmesh/cli/lint/)
|
|
226
|
+
- **`agentsmesh watch`** — regenerate target files on save during local editing.
|
|
227
|
+
- **`agentsmesh merge`** — recover from three-way `.lock` conflicts after `git merge`.
|
|
228
|
+
- **Collaboration config** — `lock_features` and `strategy` prevent accidental overrides.
|
|
132
229
|
|
|
133
|
-
### Community packs
|
|
230
|
+
### Community packs and shared config
|
|
134
231
|
|
|
135
232
|
Install shared skills, rules, agents, and commands from any git repo:
|
|
136
233
|
|
|
@@ -142,57 +239,46 @@ agentsmesh install --sync # restore all packs after clone
|
|
|
142
239
|
|
|
143
240
|
Packs live in `.agentsmesh/packs/`, track in `installs.yaml`, and merge into canonical config on every `generate`.
|
|
144
241
|
|
|
145
|
-
###
|
|
242
|
+
### What to commit and what to gitignore
|
|
146
243
|
|
|
147
|
-
|
|
148
|
-
- **`agentsmesh plugin add <pkg>`** — load third-party npm packages as runtime targets with full built-in parity
|
|
244
|
+
`agentsmesh init` writes a `.gitignore` that follows the recommended convention. The defaults are deliberate:
|
|
149
245
|
|
|
150
|
-
|
|
246
|
+
| Path | In git? | Why |
|
|
247
|
+
|---|---|---|
|
|
248
|
+
| `.agentsmesh/` (canonical) | **commit** | The source of truth — must be in git. |
|
|
249
|
+
| `.agentsmesh/.lock` | **commit** | Drift detection contract. `agentsmesh check` compares against this. |
|
|
250
|
+
| `.agentsmesh/packs/` | **gitignore** | Materialized from `installs.yaml`. Same model as `node_modules` — `agentsmesh install --sync` reproduces them deterministically post-clone. |
|
|
251
|
+
| `agentsmesh.local.yaml` | **gitignore** | Per-developer overrides. |
|
|
252
|
+
| `.agentsmesh/.lock.tmp` | **gitignore** | Transient. |
|
|
253
|
+
| `.agentsmeshcache` | **gitignore** | Remote-extends cache. |
|
|
254
|
+
| 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. |
|
|
151
255
|
|
|
152
|
-
|
|
256
|
+
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.
|
|
153
257
|
|
|
154
|
-
|
|
258
|
+
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.
|
|
155
259
|
|
|
156
|
-
###
|
|
260
|
+
### Schema-validated configs (IDE autocomplete)
|
|
157
261
|
|
|
158
|
-
|
|
159
|
-
| Feature | Claude Code | Cursor | Copilot | Continue | Junie | Kiro | Gemini CLI | Cline | Codex CLI | Windsurf | Antigravity | Roo Code |
|
|
160
|
-
|---|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|
|
|
161
|
-
| 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 | — | — | — | — | — |
|
|
170
|
-
<!-- /agentsmesh:support-matrix:project -->
|
|
262
|
+
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:
|
|
171
263
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
|
176
|
-
|
|
177
|
-
|
|
|
178
|
-
|
|
|
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 |
|
|
181
|
-
| 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 | — | — | — | — | — | — | — | — | — | — | — |
|
|
186
|
-
<!-- /agentsmesh:support-matrix:global -->
|
|
264
|
+
| Config file | JSON Schema |
|
|
265
|
+
|---|---|
|
|
266
|
+
| `agentsmesh.yaml` / `.local.yaml` | `node_modules/agentsmesh/schemas/agentsmesh.json` |
|
|
267
|
+
| `.agentsmesh/hooks.yaml` | `schemas/hooks.json` |
|
|
268
|
+
| `.agentsmesh/permissions.yaml` | `schemas/permissions.json` |
|
|
269
|
+
| `.agentsmesh/mcp.json` | `schemas/mcp.json` |
|
|
270
|
+
| `.agentsmesh/packs/*/pack.json` | `schemas/pack.json` |
|
|
187
271
|
|
|
188
|
-
|
|
272
|
+
`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.
|
|
189
273
|
|
|
190
274
|
---
|
|
191
275
|
|
|
192
|
-
## Programmatic API
|
|
276
|
+
## TypeScript / Programmatic API
|
|
193
277
|
|
|
194
278
|
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
279
|
|
|
280
|
+
`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.
|
|
281
|
+
|
|
196
282
|
```ts
|
|
197
283
|
import {
|
|
198
284
|
loadProjectContext,
|
|
@@ -241,7 +327,45 @@ import { loadCanonical, loadCanonicalFiles } from 'agentsmesh/canonical';
|
|
|
241
327
|
import { getAllDescriptors } from 'agentsmesh/targets';
|
|
242
328
|
```
|
|
243
329
|
|
|
244
|
-
Every public symbol resolves to a real `.d.ts` under strict TypeScript. Full reference
|
|
330
|
+
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+.
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## Supported tools — feature matrix
|
|
335
|
+
|
|
336
|
+
### Project scope (`agentsmesh generate`)
|
|
337
|
+
|
|
338
|
+
<!-- agentsmesh:support-matrix:project -->
|
|
339
|
+
| Feature | Antigravity | Claude Code | Cline | Codex CLI | Continue | Copilot | Cursor | Gemini CLI | Junie | Kiro | Roo Code | Windsurf |
|
|
340
|
+
|---|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|
|
|
341
|
+
| Rules | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native |
|
|
342
|
+
| Additional Rules | Native | Native | Native | Native | Native | Native | Embedded | Embedded | Native | Native | Native | Native |
|
|
343
|
+
| Commands | Partial (workflows) | Native | Native (workflows) | Embedded | Embedded | Native | Native | Native | Native | — | Native | Native (workflows) |
|
|
344
|
+
| Agents | — | Native | Embedded | Native | — | Native | Native | Native | Native | Native | Partial | Embedded |
|
|
345
|
+
| Skills | Native | Native | Native | Native | Embedded | Native | Native | Native | Native | Native | Native | Native |
|
|
346
|
+
| MCP Servers | — | Native | Native | Native | Native | — | Native | Native | Native | Native | Native | Partial |
|
|
347
|
+
| Hooks | — | Native | Native | — | — | Partial | Native | Partial | — | Native | — | Native |
|
|
348
|
+
| Ignore | — | Native | Native | — | — | — | Native | Native (settings-embedded) | Native | Native | Native | Native |
|
|
349
|
+
| Permissions | — | Native | — | — | — | — | Partial | Partial | — | — | — | — |
|
|
350
|
+
<!-- /agentsmesh:support-matrix:project -->
|
|
351
|
+
|
|
352
|
+
### Global scope (`agentsmesh generate --global`)
|
|
353
|
+
|
|
354
|
+
<!-- agentsmesh:support-matrix:global -->
|
|
355
|
+
| Feature | Antigravity | Claude Code | Cline | Codex CLI | Continue | Copilot | Cursor | Gemini CLI | Junie | Kiro | Roo Code | Windsurf |
|
|
356
|
+
|---|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|
|
|
357
|
+
| Rules | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native |
|
|
358
|
+
| Additional Rules | Embedded | Native | Native | Embedded | Native | Native | Embedded | Embedded | Embedded | Native | Native | Partial |
|
|
359
|
+
| Commands | Partial (workflows) | Native | Native (workflows) | Embedded | Native | Native | Native | Native | Native | — | Native | Native (workflows) |
|
|
360
|
+
| Agents | — | Native | Embedded | Native | — | Native | Native | Native | Native | Native | Partial | Embedded |
|
|
361
|
+
| Skills | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native |
|
|
362
|
+
| MCP Servers | Native | Native | Native | Native | Native | — | Native | Native | Native | Native | Native | Partial |
|
|
363
|
+
| Hooks | — | Native | Native | — | — | — | Native | Partial | — | — | — | Native |
|
|
364
|
+
| Ignore | — | Native | Native | — | — | — | Native | — | — | Native | Native | Native |
|
|
365
|
+
| Permissions | — | Native | — | — | — | — | — | — | — | — | — | — |
|
|
366
|
+
<!-- /agentsmesh:support-matrix:global -->
|
|
367
|
+
|
|
368
|
+
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.
|
|
245
369
|
|
|
246
370
|
---
|
|
247
371
|
|
package/dist/canonical.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as CanonicalFiles, V as ValidatedConfig } from './schema-
|
|
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-
|
|
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
|
/**
|