agentsmesh 0.8.0 → 0.10.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 +66 -0
- package/README.md +192 -107
- package/dist/canonical.d.ts +2 -2
- package/dist/canonical.js +1121 -390
- package/dist/canonical.js.map +1 -1
- package/dist/cli.js +126 -121
- package/dist/engine.d.ts +2 -2
- package/dist/engine.js +1241 -509
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1254 -521
- package/dist/index.js.map +1 -1
- package/dist/{schema-BeGiBqbB.d.ts → schema-qelg8gw8.d.ts} +2 -0
- package/dist/{target-descriptor-Cb9PXaxr.d.ts → target-descriptor-Dhdg8s2o.d.ts} +3 -2
- package/dist/targets.d.ts +22 -4
- package/dist/targets.js +1091 -389
- package/dist/targets.js.map +1 -1
- package/package.json +3 -3
- package/schemas/agentsmesh.json +3 -0
- package/schemas/pack.json +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c4fb261: Add `kilo-code` as a new built-in target. Kilo Code is a multi-surface AI coding platform (VS Code extension, JetBrains plugin, CLI, cloud agent) and a fork of Roo Code (which is a fork of Cline).
|
|
8
|
+
|
|
9
|
+
Generation always uses Kilo's new layout: `AGENTS.md` (root), `.kilo/rules/`, `.kilo/commands/`, `.kilo/agents/` (first-class subagents), `.kilo/skills/`, `.kilo/mcp.json`, and `.kilocodeignore`. Import covers BOTH the new layout and Kilo's legacy layout (`.kilocode/`, `.kilocodemodes`) so existing kilo / Roo-era projects round-trip cleanly.
|
|
10
|
+
|
|
11
|
+
Capabilities (project + global):
|
|
12
|
+
- `rules`, `additionalRules`, `commands`, `agents`, `skills`, `mcp`, `ignore`: native
|
|
13
|
+
- `hooks`: none — Kilo Code has no user-facing lifecycle hook system; canonical hooks emit a lint warning.
|
|
14
|
+
- `permissions`: none — Kilo permissions live in `kilo.jsonc`, which agentsmesh does not generate in v1; canonical permissions emit a lint warning.
|
|
15
|
+
|
|
16
|
+
Global mode generates under `~/.kilo/` (`AGENTS.md`, `rules/`, `commands/`, `agents/`, `skills/`, `mcp.json`) plus `~/.kilocodeignore`, and mirrors skills into `~/.agents/skills/` for cross-tool compatibility (suppressed when `codex-cli` is also active).
|
|
17
|
+
|
|
18
|
+
Use `agentsmesh import --from kilo-code` to migrate existing Kilo projects (new or legacy layout) into canonical `.agentsmesh/`, then `agentsmesh generate --targets kilo-code` to project them back as the documented new layout.
|
|
19
|
+
|
|
20
|
+
- 5d6cfbb: Sequential `agentsmesh import --from <target>` runs now merge MCP servers by name into `.agentsmesh/mcp.json` instead of replacing the whole file. Existing canonical entries are preserved and the imported set wins on name collision, so a `claude-code` import followed by a `cursor` import keeps both targets' servers in canonical state.
|
|
21
|
+
|
|
22
|
+
Affects every importer that writes `mcp.json`: `claude-code` (`.claude/settings.json` + `.mcp.json` + `~/.claude/.mcp.json`), `codex-cli` (`config.toml`), `continue`, `cursor`, and any descriptor-driven importer using `mode: 'mcpJson'`. The previous behavior — last import overwrites the file and silently drops earlier servers — is gone.
|
|
23
|
+
|
|
24
|
+
Also fixed: a build-time regression where `writeMcpWithMerge` was referenced by five importers without the backing module being shipped, breaking `tsc --noEmit` for consumers building from source.
|
|
25
|
+
|
|
26
|
+
## 0.9.0
|
|
27
|
+
|
|
28
|
+
### Minor Changes
|
|
29
|
+
|
|
30
|
+
- b3f702d: Adds three new `agentsmesh lint` diagnostics, a recommended `.gitignore` policy for materialized packs, and a one-step `agentsmesh target-scaffold` workflow.
|
|
31
|
+
|
|
32
|
+
Added:
|
|
33
|
+
- New lint diagnostics, all emitted as warnings (do not change `lint`'s exit code):
|
|
34
|
+
- `silent-drop-guard` flags canonical content a target would otherwise drop without trace based on its capability map.
|
|
35
|
+
- `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.
|
|
36
|
+
- `rule-scope-inversion` catches manual-activation rules whose scope contradicts the target's projection rules.
|
|
37
|
+
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.
|
|
38
|
+
- `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.
|
|
39
|
+
- `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).
|
|
40
|
+
|
|
41
|
+
Changed:
|
|
42
|
+
- 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.
|
|
43
|
+
- README documents the commit-vs-gitignore convention for generated tool folders and clarifies native Windows support (no WSL).
|
|
44
|
+
|
|
45
|
+
Internal:
|
|
46
|
+
- 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.
|
|
47
|
+
- New shared link-format registry (`src/core/reference/link-format-registry.ts`) consolidates per-target link rendering rules.
|
|
48
|
+
- `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).
|
|
49
|
+
- `agentsmesh plugin add` now warns that plugins load as trusted Node.js modules with full process privileges.
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- 08ef1b0: Security hardening and correctness fixes across install, generate, reference rewriting, plugin loading, and caching subsystems.
|
|
54
|
+
|
|
55
|
+
Fixed:
|
|
56
|
+
- `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.
|
|
57
|
+
- Pack names are validated as single directory segments before materialization — values containing path separators (e.g. `../../escape`) are rejected, preventing writes outside `.agentsmesh/packs/`.
|
|
58
|
+
- `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.
|
|
59
|
+
- `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.
|
|
60
|
+
- 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.
|
|
61
|
+
- 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.
|
|
62
|
+
- `runDescriptorImport` is now exported from `agentsmesh/targets` as documented in the plugin guide.
|
|
63
|
+
- Importer fallback sources are now tried when configured primary files are absent on disk, not only when the primary source list is empty.
|
|
64
|
+
- `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.
|
|
65
|
+
- 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.
|
|
66
|
+
- Relative `file:` plugin sources now resolve against `projectRoot` instead of the filesystem root.
|
|
67
|
+
- 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.
|
|
68
|
+
|
|
3
69
|
## 0.8.0
|
|
4
70
|
|
|
5
71
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
# AgentsMesh —
|
|
3
|
+
# AgentsMesh — One `.agentsmesh/` Directory for Every AI Coding Tool
|
|
4
|
+
|
|
5
|
+
<img src="https://raw.githubusercontent.com/sampleXbro/agentsmesh/master/assets/agentsmesh-banner.jpeg" alt="AgentsMesh — One source. Every AI coding tool. Always in sync." width="100%" />
|
|
4
6
|
|
|
5
7
|
[](https://github.com/sampleXbro/agentsmesh/actions/workflows/ci.yml)
|
|
6
8
|
[](https://www.npmjs.com/package/agentsmesh)
|
|
@@ -12,99 +14,189 @@
|
|
|
12
14
|
[](https://samplexbro.github.io/agentsmesh)
|
|
13
15
|
[](https://github.com/sampleXbro/agentsmesh/pulls)
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
</div>
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
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.
|
|
18
20
|
|
|
19
|
-
**
|
|
20
|
-
|
|
21
|
-
</div>
|
|
21
|
+
**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
22
|
|
|
23
23
|
> **Full documentation: [samplexbro.github.io/agentsmesh](https://samplexbro.github.io/agentsmesh)**
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Before / After
|
|
28
|
+
|
|
29
|
+
**Before — fragmented assistant-native config in one repo:**
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
CLAUDE.md
|
|
33
|
+
AGENTS.md
|
|
34
|
+
.cursor/rules/*.mdc
|
|
35
|
+
.github/copilot-instructions.md
|
|
36
|
+
.gemini/settings.json
|
|
37
|
+
.windsurf/rules/*.md
|
|
38
|
+
.codex/config.toml
|
|
39
|
+
.kiro/steering/*.md
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**After — one canonical source, generated everywhere:**
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
.agentsmesh/
|
|
46
|
+
rules/
|
|
47
|
+
_root.md
|
|
48
|
+
commands/
|
|
49
|
+
agents/
|
|
50
|
+
skills/
|
|
51
|
+
mcp.json
|
|
52
|
+
hooks.yaml
|
|
53
|
+
permissions.yaml
|
|
54
|
+
ignore
|
|
55
|
+
```
|
|
28
56
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- **Share and extend configuration** with community packs, remote `extends`, runtime plugins, and a typed programmatic API.
|
|
57
|
+
```bash
|
|
58
|
+
npx agentsmesh generate
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The native files above are still emitted — AgentsMesh writes them for you from `.agentsmesh/`. Edit canonical sources, regenerate, and every tool stays in sync.
|
|
35
62
|
|
|
36
63
|
---
|
|
37
64
|
|
|
38
|
-
##
|
|
65
|
+
## 60-second quickstart
|
|
39
66
|
|
|
40
|
-
Requires
|
|
67
|
+
Requires Node.js 20+. Works on Linux, macOS, and Windows (native, not WSL).
|
|
41
68
|
|
|
42
69
|
```bash
|
|
43
|
-
|
|
44
|
-
npx agentsmesh
|
|
70
|
+
npx agentsmesh init # scaffold .agentsmesh/ + agentsmesh.yaml
|
|
71
|
+
npx agentsmesh generate # produce native configs for every enabled tool
|
|
72
|
+
npx agentsmesh check # CI-friendly drift gate against .agentsmesh/.lock
|
|
45
73
|
```
|
|
46
74
|
|
|
47
|
-
|
|
75
|
+
- **`init`** — creates `agentsmesh.yaml`, `agentsmesh.local.yaml`, and the canonical `.agentsmesh/` directory.
|
|
76
|
+
- **`generate`** — writes `CLAUDE.md`, `AGENTS.md`, `.cursor/`, `.github/copilot-instructions.md`, etc. from canonical sources.
|
|
77
|
+
- **`check`** — exits non-zero if generated files have drifted from `.agentsmesh/.lock`. Drop into CI.
|
|
48
78
|
|
|
49
|
-
|
|
79
|
+
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`.
|
|
50
80
|
|
|
51
81
|
---
|
|
52
82
|
|
|
53
|
-
##
|
|
83
|
+
## Safe adoption in an existing repository
|
|
54
84
|
|
|
55
|
-
|
|
85
|
+
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`.
|
|
56
86
|
|
|
57
87
|
```bash
|
|
58
|
-
agentsmesh
|
|
59
|
-
#
|
|
60
|
-
agentsmesh generate
|
|
88
|
+
npx agentsmesh import --from cursor # or claude-code, copilot, codex-cli, gemini-cli, windsurf, ...
|
|
89
|
+
npx agentsmesh diff # patch-style preview of what generate would change
|
|
90
|
+
npx agentsmesh generate # write native configs (back) from canonical
|
|
91
|
+
npx agentsmesh check # add to CI to detect drift
|
|
61
92
|
```
|
|
62
93
|
|
|
63
|
-
|
|
94
|
+
What this gets you:
|
|
64
95
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
agentsmesh
|
|
68
|
-
|
|
96
|
+
- `import` reads existing tool configs and writes equivalent canonical files into `.agentsmesh/` — round-trip metadata is preserved so re-import doesn't lose information.
|
|
97
|
+
- `diff` shows the unified patch every output file would receive, so you can review before any write.
|
|
98
|
+
- `check` reads `.agentsmesh/.lock` and fails the build if the canonical sources and the generated files disagree.
|
|
99
|
+
|
|
100
|
+
`import --from` accepts the built-in target IDs: `claude-code`, `cursor`, `copilot`, `codex-cli`, `gemini-cli`, `windsurf`, `continue`, `cline`, `kiro`, `kilo-code`, `junie`, `roo-code`, `antigravity`. Plugin targets are valid too.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Demo
|
|
105
|
+
|
|
106
|
+
<!-- TODO: Add terminal demo GIF showing init → generate → diff → check. -->
|
|
69
107
|
|
|
70
|
-
|
|
108
|
+
A quick sample of the canonical → native projection:
|
|
71
109
|
|
|
72
110
|
```bash
|
|
73
|
-
agentsmesh init
|
|
74
|
-
agentsmesh
|
|
75
|
-
agentsmesh generate
|
|
111
|
+
npx agentsmesh init
|
|
112
|
+
find .agentsmesh -maxdepth 2 -type f # see the canonical scaffold
|
|
113
|
+
npx agentsmesh generate
|
|
114
|
+
npx agentsmesh diff # preview future changes
|
|
115
|
+
npx agentsmesh check # CI-style drift gate
|
|
76
116
|
```
|
|
77
117
|
|
|
118
|
+
On macOS/Linux you can also run `tree .agentsmesh` if you have `tree` installed.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Supported AI coding tools
|
|
123
|
+
|
|
124
|
+
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).
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Why developers use AgentsMesh
|
|
129
|
+
|
|
130
|
+
- **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.
|
|
131
|
+
- **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.
|
|
132
|
+
- **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/).
|
|
133
|
+
- **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.
|
|
134
|
+
- **Global mode** — `~/.agentsmesh/` syncs personal AI config to `~/.claude/`, `~/.cursor/`, `~/.codex/`, `~/.windsurf/`, and other user-level folders. Every CLI command accepts `--global`.
|
|
135
|
+
- **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.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Why not just `AGENTS.md`?
|
|
140
|
+
|
|
141
|
+
[`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.
|
|
142
|
+
|
|
143
|
+
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.
|
|
144
|
+
|
|
145
|
+
- **Cursor** has `.cursor/rules/*.mdc` (with frontmatter scopes), `.cursorignore`, MCP config, and hooks.
|
|
146
|
+
- **Claude Code** has `CLAUDE.md`, `.claude/agents/`, `.claude/skills/`, `.claude/commands/`, `.claude/settings.json`, hooks, and permissions.
|
|
147
|
+
- **GitHub Copilot** has `.github/copilot-instructions.md`, `.github/instructions/*.instructions.md`, agents, prompts, and (partial) hooks.
|
|
148
|
+
- **Gemini CLI** has `GEMINI.md`, `.gemini/settings.json` (MCP + hooks), `.gemini/commands/*.toml`, and agents.
|
|
149
|
+
- **Codex CLI** has `AGENTS.md` plus `.codex/config.toml`, `.codex/agents/*.toml`, and `.codex/rules/`.
|
|
150
|
+
- **Windsurf**, **Continue**, **Cline**, **Kiro**, **Junie**, **Roo Code**, **Antigravity** each have their own native rules, workflows, MCP servers, skills, and ignore files.
|
|
151
|
+
|
|
152
|
+
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.
|
|
153
|
+
|
|
78
154
|
---
|
|
79
155
|
|
|
80
|
-
##
|
|
156
|
+
## Core concepts
|
|
157
|
+
|
|
158
|
+
`.agentsmesh/` is the canonical source of truth. Generated tool files are artifacts. The directory contains:
|
|
81
159
|
|
|
82
|
-
|
|
160
|
+
- `rules/_root.md` — the root rule every target projects (typically becomes `CLAUDE.md`, `AGENTS.md`, `.cursor/rules/_root.mdc`, etc.).
|
|
161
|
+
- `rules/*.md` — additional scoped rules.
|
|
162
|
+
- `commands/*.md` — reusable slash-style prompts/commands.
|
|
163
|
+
- `agents/*.md` — agent definitions (where the target supports them).
|
|
164
|
+
- `skills/<name>/SKILL.md` (+ supporting files) — composable skills.
|
|
165
|
+
- `mcp.json` — MCP server definitions.
|
|
166
|
+
- `hooks.yaml` — pre/post tool hooks.
|
|
167
|
+
- `permissions.yaml` — allow/deny rules where the target supports them.
|
|
168
|
+
- `ignore` — paths the assistant should not read or modify.
|
|
83
169
|
|
|
84
|
-
|
|
170
|
+
Configuration:
|
|
85
171
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
| **Cursor** | `.cursor/rules/*.mdc`, `AGENTS.md`, `.cursor/mcp.json`, `.cursor/hooks.json`, `.cursorignore` |
|
|
90
|
-
| **GitHub Copilot** | `.github/copilot-instructions.md`, `.github/instructions/*.instructions.md`, `.github/agents/`, `.github/prompts/` |
|
|
91
|
-
| **Gemini CLI** | `GEMINI.md`, `.gemini/settings.json` (MCP + hooks), `.gemini/commands/*.toml`, `.gemini/agents/` |
|
|
92
|
-
| **Windsurf** | `.windsurf/rules/*.md`, `.windsurf/workflows/`, `.windsurf/mcp_config.json`, `.windsurf/hooks.json` |
|
|
93
|
-
| **Continue** | `.continue/rules/`, `.continue/prompts/`, `.continue/mcpServers/`, `.continue/config.yaml` |
|
|
94
|
-
| **Cline** | `.clinerules/`, `.cline/skills/`, `.cline/cline_mcp_settings.json`, hooks |
|
|
95
|
-
| **Kiro** | `.kiro/steering/`, `.kiro/skills/`, `.kiro/hooks/*.kiro.hook`, `.kiro/settings/mcp.json` |
|
|
96
|
-
| **Codex CLI** | `AGENTS.md`, `.codex/config.toml`, `.codex/agents/*.toml`, `.codex/rules/` |
|
|
97
|
-
| **Junie** | `AGENTS.md`, `.junie/agents/`, `.junie/commands/`, `.junie/skills/`, `.junie/mcp/mcp.json` |
|
|
98
|
-
| **Roo Code** | `.roo/rules/`, `.roomodes` (agents → custom modes), `.roo/commands/`, `.roo/skills/` |
|
|
99
|
-
| **Antigravity** | `.agents/rules/general.md`, `.agents/skills/`, `.agents/workflows/`, `.agents/mcp_config.json` |
|
|
172
|
+
- `agentsmesh.yaml` — selects which targets and features are enabled.
|
|
173
|
+
- `agentsmesh.local.yaml` — per-developer overrides (gitignored by default).
|
|
174
|
+
- `.agentsmesh/.lock` — drift-detection lock file consumed by `agentsmesh check`.
|
|
100
175
|
|
|
101
|
-
|
|
176
|
+
Detailed contracts: [Canonical Config](https://samplexbro.github.io/agentsmesh/canonical-config/) · [Generation pipeline](https://samplexbro.github.io/agentsmesh/reference/generation-pipeline/).
|
|
102
177
|
|
|
103
|
-
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## CLI usage
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
agentsmesh init [--global] [--yes]
|
|
184
|
+
agentsmesh generate [--global] [--targets <csv>] [--check] [--dry-run] [--force] [--refresh-cache]
|
|
185
|
+
agentsmesh import --from <target> [--global]
|
|
186
|
+
agentsmesh diff [--global] [--targets <csv>]
|
|
187
|
+
agentsmesh lint [--global] [--targets <csv>]
|
|
188
|
+
agentsmesh watch [--global] [--targets <csv>]
|
|
189
|
+
agentsmesh check [--global]
|
|
190
|
+
agentsmesh merge [--global]
|
|
191
|
+
agentsmesh matrix [--global] [--targets <csv>] [--verbose]
|
|
192
|
+
agentsmesh install <source> [--sync] [--path <dir>] [--target <id>] [--as <kind>] [--name <id>] [--extends] [--dry-run] [--global] [--force]
|
|
193
|
+
agentsmesh plugin add|list|remove|info [--version <v>] [--id <id>]
|
|
194
|
+
agentsmesh target scaffold <id> [--name <displayName>] [--force]
|
|
195
|
+
```
|
|
104
196
|
|
|
105
|
-
|
|
197
|
+
`agentsmesh --help` prints the same surface; `agentsmesh <cmd> --help` is also supported.
|
|
106
198
|
|
|
107
|
-
### Global mode
|
|
199
|
+
### Global mode (personal AI assistant config)
|
|
108
200
|
|
|
109
201
|
`.agentsmesh/` at the project level is for teams. `~/.agentsmesh/` at the home level is for personal setup across every repo you touch:
|
|
110
202
|
|
|
@@ -114,7 +206,7 @@ agentsmesh import --global --from claude-code
|
|
|
114
206
|
agentsmesh generate --global # writes ~/.claude/CLAUDE.md, ~/.cursor/, ~/.codex/, ~/.windsurf/, etc.
|
|
115
207
|
```
|
|
116
208
|
|
|
117
|
-
Every built-in target
|
|
209
|
+
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)
|
|
118
210
|
|
|
119
211
|
### Plugins for new AI coding tools
|
|
120
212
|
|
|
@@ -130,12 +222,12 @@ Plugins have full parity with built-in targets: project + global layouts, featur
|
|
|
130
222
|
|
|
131
223
|
### Team-safe collaboration & CI drift detection
|
|
132
224
|
|
|
133
|
-
- **`agentsmesh check`** — CI gate that exits 1 if generated files drifted from the lock
|
|
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
|
|
137
|
-
- **`agentsmesh merge`** — recover from three-way `.lock` conflicts after `git merge
|
|
138
|
-
- **Collaboration config** — `lock_features` and `strategy` prevent accidental overrides
|
|
225
|
+
- **`agentsmesh check`** — CI gate that exits 1 if generated files drifted from the lock.
|
|
226
|
+
- **`agentsmesh diff`** — preview what the next `generate` would change.
|
|
227
|
+
- **`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/)
|
|
228
|
+
- **`agentsmesh watch`** — regenerate target files on save during local editing.
|
|
229
|
+
- **`agentsmesh merge`** — recover from three-way `.lock` conflicts after `git merge`.
|
|
230
|
+
- **Collaboration config** — `lock_features` and `strategy` prevent accidental overrides.
|
|
139
231
|
|
|
140
232
|
### Community packs and shared config
|
|
141
233
|
|
|
@@ -167,13 +259,6 @@ Why generated configs stay committed: the same reason `package-lock.json` does.
|
|
|
167
259
|
|
|
168
260
|
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
261
|
|
|
170
|
-
### Extending AgentsMesh
|
|
171
|
-
|
|
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`.
|
|
174
|
-
|
|
175
|
-
[Extending guide →](https://samplexbro.github.io/agentsmesh/guides/extending/) · [Building plugins →](https://samplexbro.github.io/agentsmesh/guides/building-plugins/)
|
|
176
|
-
|
|
177
262
|
### Schema-validated configs (IDE autocomplete)
|
|
178
263
|
|
|
179
264
|
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:
|
|
@@ -190,45 +275,7 @@ Every config file ships with a generated JSON Schema, so VS Code, JetBrains, and
|
|
|
190
275
|
|
|
191
276
|
---
|
|
192
277
|
|
|
193
|
-
##
|
|
194
|
-
|
|
195
|
-
### Project scope (`agentsmesh generate`)
|
|
196
|
-
|
|
197
|
-
<!-- agentsmesh:support-matrix:project -->
|
|
198
|
-
| Feature | Antigravity | Claude Code | Cline | Codex CLI | Continue | Copilot | Cursor | Gemini CLI | Junie | Kiro | Roo Code | Windsurf |
|
|
199
|
-
|---|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|
|
|
200
|
-
| Rules | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native |
|
|
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 | — | — | — | — |
|
|
209
|
-
<!-- /agentsmesh:support-matrix:project -->
|
|
210
|
-
|
|
211
|
-
### Global scope (`agentsmesh generate --global`)
|
|
212
|
-
|
|
213
|
-
<!-- agentsmesh:support-matrix:global -->
|
|
214
|
-
| Feature | Antigravity | Claude Code | Cline | Codex CLI | Continue | Copilot | Cursor | Gemini CLI | Junie | Kiro | Roo Code | Windsurf |
|
|
215
|
-
|---|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|
|
|
216
|
-
| Rules | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native |
|
|
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 |
|
|
220
|
-
| Skills | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | 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 | — | — | — | — | — | — | — | — | — | — |
|
|
225
|
-
<!-- /agentsmesh:support-matrix:global -->
|
|
226
|
-
|
|
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.
|
|
228
|
-
|
|
229
|
-
---
|
|
230
|
-
|
|
231
|
-
## Programmatic API
|
|
278
|
+
## TypeScript / Programmatic API
|
|
232
279
|
|
|
233
280
|
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`.
|
|
234
281
|
|
|
@@ -286,6 +333,44 @@ Every public symbol resolves to a real `.d.ts` under strict TypeScript. Full ref
|
|
|
286
333
|
|
|
287
334
|
---
|
|
288
335
|
|
|
336
|
+
## Supported tools — feature matrix
|
|
337
|
+
|
|
338
|
+
### Project scope (`agentsmesh generate`)
|
|
339
|
+
|
|
340
|
+
<!-- agentsmesh:support-matrix:project -->
|
|
341
|
+
| Feature | Antigravity | Claude Code | Cline | Codex CLI | Continue | Copilot | Cursor | Gemini CLI | Junie | Kilo Code | Kiro | Roo Code | Windsurf |
|
|
342
|
+
|---|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|
|
|
343
|
+
| Rules | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native |
|
|
344
|
+
| Additional Rules | Native | Native | Native | Native | Native | Native | Embedded | Embedded | Native | Native | Native | Native | Native |
|
|
345
|
+
| Commands | Partial (workflows) | Native | Native (workflows) | Embedded | Embedded | Native | Native | Native | Native | Native | — | Native | Native (workflows) |
|
|
346
|
+
| Agents | — | Native | Embedded | Native | — | Native | Native | Native | Native | Native | Native | Partial | Embedded |
|
|
347
|
+
| Skills | Native | Native | Native | Native | Embedded | Native | Native | Native | Native | Native | Native | Native | Native |
|
|
348
|
+
| MCP Servers | — | Native | Native | Native | Native | — | Native | Native | Native | Native | Native | Native | Partial |
|
|
349
|
+
| Hooks | — | Native | Native | — | — | Partial | Native | Partial | — | — | Native | — | Native |
|
|
350
|
+
| Ignore | — | Native | Native | — | — | — | Native | Native (settings-embedded) | Native | Native | Native | Native | Native |
|
|
351
|
+
| Permissions | — | Native | — | — | — | — | Partial | Partial | — | — | — | — | — |
|
|
352
|
+
<!-- /agentsmesh:support-matrix:project -->
|
|
353
|
+
|
|
354
|
+
### Global scope (`agentsmesh generate --global`)
|
|
355
|
+
|
|
356
|
+
<!-- agentsmesh:support-matrix:global -->
|
|
357
|
+
| Feature | Antigravity | Claude Code | Cline | Codex CLI | Continue | Copilot | Cursor | Gemini CLI | Junie | Kilo Code | Kiro | Roo Code | Windsurf |
|
|
358
|
+
|---|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|
|
|
359
|
+
| Rules | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native |
|
|
360
|
+
| Additional Rules | Embedded | Native | Native | Embedded | Native | Native | Embedded | Embedded | Embedded | Native | Native | Native | Partial |
|
|
361
|
+
| Commands | Partial (workflows) | Native | Native (workflows) | Embedded | Native | Native | Native | Native | Native | Native | — | Native | Native (workflows) |
|
|
362
|
+
| Agents | — | Native | Embedded | Native | — | Native | Native | Native | Native | Native | Native | Partial | Embedded |
|
|
363
|
+
| Skills | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native |
|
|
364
|
+
| MCP Servers | Native | Native | Native | Native | Native | — | Native | Native | Native | Native | Native | Native | Partial |
|
|
365
|
+
| Hooks | — | Native | Native | — | — | — | Native | Partial | — | — | — | — | Native |
|
|
366
|
+
| Ignore | — | Native | Native | — | — | — | Native | — | — | Native | Native | Native | Native |
|
|
367
|
+
| Permissions | — | Native | — | — | — | — | — | — | — | — | — | — | — |
|
|
368
|
+
<!-- /agentsmesh:support-matrix:global -->
|
|
369
|
+
|
|
370
|
+
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.
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
289
374
|
## Documentation
|
|
290
375
|
|
|
291
376
|
- **[Getting Started](https://samplexbro.github.io/agentsmesh/getting-started/installation/)** — installation, quick start
|
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-qelg8gw8.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-qelg8gw8.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|