agentsmesh 0.3.0 → 0.5.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 +61 -1
- package/README.md +80 -12
- package/dist/canonical-types-gdrUi3bD.d.ts +146 -0
- package/dist/canonical.d.ts +23 -0
- package/dist/canonical.js +497 -0
- package/dist/canonical.js.map +1 -0
- package/dist/cli.js +8227 -4858
- package/dist/cli.js.map +1 -1
- package/dist/engine.d.ts +56 -0
- package/dist/engine.js +11155 -0
- package/dist/engine.js.map +1 -0
- package/dist/target-descriptor-D64xD0C2.d.ts +343 -0
- package/dist/targets.d.ts +17 -0
- package/dist/targets.js +10070 -0
- package/dist/targets.js.map +1 -0
- package/package.json +38 -15
- package/schemas/agentsmesh.json +248 -0
- package/schemas/hooks.json +47 -0
- package/schemas/mcp.json +119 -0
- package/schemas/pack.json +131 -0
- package/schemas/permissions.json +38 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,66 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ec5e3a6: **Breaking (descriptor authors):** Built-in targets now declare global mode under `globalSupport` (capabilities, detection paths, layout, optional `scopeExtras`) instead of separate `global`, `globalCapabilities`, and `globalDetectionPaths` fields. Command/workflow and Gemini settings generation are modeled with capability **flavors** on the canonical generators; Copilot/Cursor root mirrors use `layout.outputFamilies` for rewrite cache keys.
|
|
8
|
+
|
|
9
|
+
**CLI / docs:** `pnpm matrix:generate` refreshes README and website support-matrix blocks from the catalog; `pnpm matrix:verify` fails on drift (also runs in CI). Init detection uses `collectDetectionPaths` from the catalog.
|
|
10
|
+
|
|
11
|
+
- ec5e3a6: Add public library entry points (`./engine`, `./canonical`, `./targets`) for programmatic use, introduce the parametrized target contract matrix under `tests/contract/`, and document coverage exclusions in `tasks/coverage-gaps.md`.
|
|
12
|
+
|
|
13
|
+
## 0.4.1 - 2026-04-23
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **JSON Schema for all config files** — `agentsmesh.yaml`, `agentsmesh.local.yaml`, `.agentsmesh/permissions.yaml`, `.agentsmesh/hooks.yaml`, `.agentsmesh/mcp.json`, and `.agentsmesh/packs/*/pack.yaml` now ship with JSON Schemas derived directly from Zod source schemas. Enables full IDE autocomplete, enum validation, and hover docs in VS Code, JetBrains, and any YAML/JSON Language Server with zero user configuration. Schemas are published to `schemas/` in the npm package and accessible at `https://unpkg.com/agentsmesh/schemas/*.json`. Run `pnpm schemas:generate` to regenerate after schema changes.
|
|
18
|
+
- **`$schema` comment in generated config files** — `agentsmesh init` now writes a `# yaml-language-server: $schema=...` comment as the first line of both `agentsmesh.yaml` and `agentsmesh.local.yaml`, activating IDE validation without any manual setup.
|
|
19
|
+
- **Global mode** (`--global`, canonical `~/.agentsmesh/`) for **all** built-in targets — Claude Code, Cursor, Copilot, Continue, Junie, Kiro, Gemini CLI, Cline, Codex CLI, Windsurf, Antigravity, and Roo Code. Each target has a `descriptor.global` layout with project→user path rewriting, import/generate alignment, optional `~/.agents/skills/` mirroring when Codex CLI is not a global target, reference/link rewriting, and comprehensive test coverage.
|
|
20
|
+
- **Roo Code agents → custom modes**: canonical agents now generate `.roomodes` (project) and `settings/custom_modes.yaml` (global) with a `customModes` YAML structure. Roo Code agents capability upgraded from `—` to `partial`.
|
|
21
|
+
- **Copilot global extras**: `~/.copilot/AGENTS.md` is now generated in global mode as a root-instructions compat file.
|
|
22
|
+
- **Continue global config**: global mode generates `~/.continue/config.yaml` (aggregating rules as `rules:`, commands as `prompts:`, MCP as `mcpServers:`) and `~/.continue/AGENTS.md`.
|
|
23
|
+
- **Copilot global skill mirror**: skills are now mirrored to both `~/.agents/skills/` and `~/.claude/skills/` in global mode.
|
|
24
|
+
- **Cline global hooks round-trip**: `agentsmesh import --from cline` now reads hook scripts from `~/Documents/Cline/Hooks/` (global mode) and `.clinerules/hooks/` (project mode). Hook scripts embed a `# agentsmesh-event: <event>` metadata comment for lossless round-trip; the generator also includes this comment going forward.
|
|
25
|
+
- `sharedArtifacts` field added to target descriptor — enables collision-free generation when multiple targets share an output path (e.g. `.agents/skills/`).
|
|
26
|
+
- Lint hooks wired to all target descriptors.
|
|
27
|
+
- Contributor skill **`add-global-mode-target`** for scoped work when extending or validating one target’s global-mode behavior.
|
|
28
|
+
- Comprehensive structure validation test coverage for all 12 targets in both project and global modes.
|
|
29
|
+
- Shared validation helpers library (`tests/unit/targets/validation-helpers.ts`) with reusable helpers for JSON, Markdown, YAML, frontmatter, and file structure validation.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- **Claude Code output-styles**: generated output-style files no longer carry `agent-` / `command-` filename prefixes — now `{name}.md` as documented.
|
|
34
|
+
- **Windsurf**: `src/AGENTS.md` removed from `managedOutputs` (was incorrectly tracked as a managed file).
|
|
35
|
+
- **Cline**: `.clinerules/` directory added to `managedOutputs.dirs` for correct stale-artifact cleanup after `generate`.
|
|
36
|
+
- **Copilot global instructions**: path-specific instructions now aggregate into `~/.copilot/copilot-instructions.md` in global mode (previously suppressed).
|
|
37
|
+
- **Windsurf MCP capability**: both project and global scopes now consistently `partial` (global was incorrectly `native`).
|
|
38
|
+
- **Codex CLI detection**: detection paths expanded to include `AGENTS.md`, `AGENTS.override.md`, `.codex/config.toml`, `.codex/agents`, and `.codex/rules`.
|
|
39
|
+
- **Link rebaser**: `.agentsmesh/` anchor preserved correctly in generated prose.
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- **Init scaffold:** example files created by `agentsmesh init` are now prefixed with `_` (`_example.md`, `skills/_example/SKILL.md`). Files and directories with a `_` prefix are excluded from generation, so the starter templates serve as visible reference only and do not produce tool-specific output. `_root.md` remains the sole `_`-prefixed file that is always included in generation.
|
|
44
|
+
- **Documentation:** README and website updated to reflect Roo Code agents support, Copilot and Continue global extras, and the new `schemas/` package contents. `generate.mdx` documents global mode path resolution (how `--global` maps to `homedir()` as `projectRoot`).
|
|
45
|
+
|
|
46
|
+
### Refactored
|
|
47
|
+
|
|
48
|
+
- Extracted `mirrorSkillsToAgents()` shared helper (`src/targets/catalog/skill-mirror.ts`) — replaces repeated `!activeTargets.includes(‘codex-cli’)` guards inline across 8 target files.
|
|
49
|
+
- Consolidated import map builders; removed duplicate validation tests.
|
|
50
|
+
- Extracted shared skill-import pipeline; deleted obsolete `skills-helpers` files.
|
|
51
|
+
- Improved link rebaser resolution and managed embedding.
|
|
52
|
+
- Removed unused `COPILOT_GLOBAL_MCP` / `COPILOT_GLOBAL_CONFIG` constants.
|
|
53
|
+
|
|
54
|
+
## 0.3.1 - 2026-04-12
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
|
|
58
|
+
- Refresh direct and transitive dependencies to patched releases, including guarded `pnpm` overrides for vulnerable `vite`, `picomatch`, and `brace-expansion` ranges pulled in through the toolchain.
|
|
59
|
+
|
|
60
|
+
### Fixed
|
|
61
|
+
|
|
62
|
+
- Remove the brittle `npm install -g npm@latest` step from the npm trusted-publishing workflow and run the publish job on Node 24 so release automation uses a bundled npm that already satisfies trusted-publishing requirements.
|
|
63
|
+
- Harden `watch` command unit-test wait budgets after the Vitest upgrade so the full suite stays stable under slower CI and coverage runs.
|
|
4
64
|
|
|
5
65
|
## 0.3.0 - 2026-04-12
|
|
6
66
|
|
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# AgentsMesh
|
|
2
4
|
|
|
3
5
|
[](https://github.com/sampleXbro/agentsmesh/actions/workflows/ci.yml)
|
|
@@ -10,8 +12,11 @@
|
|
|
10
12
|
[](https://samplexbro.github.io/agentsmesh)
|
|
11
13
|
[](https://github.com/sampleXbro/agentsmesh/pulls)
|
|
12
14
|
|
|
15
|
+
|
|
13
16
|
AgentsMesh maintains a single canonical configuration in `.agentsmesh/` and syncs it bidirectionally to Claude Code, Cursor, Copilot, Continue, Junie, Kiro, Gemini CLI, Cline, Codex CLI, Windsurf, Antigravity, and Roo Code. Rules, commands, agents, skills, MCP servers, hooks, ignore patterns, and permissions -- all from one source of truth.
|
|
14
17
|
|
|
18
|
+
</div>
|
|
19
|
+
|
|
15
20
|
> **Full documentation: [samplexbro.github.io/agentsmesh](https://samplexbro.github.io/agentsmesh)**
|
|
16
21
|
|
|
17
22
|
---
|
|
@@ -72,24 +77,87 @@ agentsmesh import --from cursor
|
|
|
72
77
|
agentsmesh generate
|
|
73
78
|
```
|
|
74
79
|
|
|
80
|
+
### Personal global config (user home)
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Initialize canonical home config
|
|
84
|
+
agentsmesh init --global
|
|
85
|
+
|
|
86
|
+
# Import a user-level tool setup into ~/.agentsmesh/
|
|
87
|
+
agentsmesh import --global --from claude-code
|
|
88
|
+
agentsmesh import --global --from antigravity
|
|
89
|
+
agentsmesh import --global --from codex-cli
|
|
90
|
+
agentsmesh import --global --from cursor
|
|
91
|
+
|
|
92
|
+
# Install shared packs into ~/.agentsmesh/
|
|
93
|
+
agentsmesh install --global github:org/shared-rules
|
|
94
|
+
|
|
95
|
+
# Work against home-level canonical config
|
|
96
|
+
agentsmesh diff --global
|
|
97
|
+
agentsmesh lint --global
|
|
98
|
+
agentsmesh watch --global
|
|
99
|
+
agentsmesh check --global
|
|
100
|
+
agentsmesh merge --global
|
|
101
|
+
agentsmesh matrix --global
|
|
102
|
+
agentsmesh generate --global
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Global mode uses `~/.agentsmesh/` as the canonical source of truth instead of a project-local `.agentsmesh/`. **All** built-in targets support `--global`; `agentsmesh generate --global` writes user-level outputs for whichever targets are enabled in `agentsmesh.yaml`. Typical paths include:
|
|
106
|
+
|
|
107
|
+
- **Claude Code** — `~/.claude/CLAUDE.md` (with `# Global Instructions` framing), `~/.claude/settings.json` (permissions), `~/.claude/hooks.json` (hooks), `~/.claude/agents/`, `~/.claude/skills/`, optional mirror to `~/.agents/skills/` when Codex is **not** also a global target (otherwise Codex owns `~/.agents/skills/`), `~/.claude/commands/`, optional `~/.claude/output-styles/` when `outputStyle: true` on an agent or command, `~/.claudeignore`, and `~/.claude.json` for MCP
|
|
108
|
+
- **Cursor** — `~/.cursor/rules/*.mdc`, `~/.cursor/AGENTS.md` (aggregate), `~/.cursor/mcp.json`, `~/.cursor/hooks.json`, `~/.cursorignore`, plus skills, agents, and commands under `~/.cursor/`; legacy `~/.agentsmesh-exports/cursor/user-rules.md` is still read on import when present; `agentsmesh import --global --from cursor` maps those paths back into `~/.agentsmesh/`
|
|
109
|
+
- **Copilot** — `~/.copilot/copilot-instructions.md` (all rules merged, including glob-scoped instructions), `~/.copilot/AGENTS.md` (compat mirror), `~/.copilot/agents/*.agent.md`, `~/.copilot/skills/`, `~/.copilot/prompts/*.prompt.md`, skills mirrored to `~/.agents/skills/` and `~/.claude/skills/` when Codex is **not** also a global target
|
|
110
|
+
- **Continue** — `~/.continue/rules/`, `~/.continue/prompts/`, `~/.continue/skills/`, `~/.continue/mcpServers/agentsmesh.json`, `~/.continue/AGENTS.md` (compat mirror), `~/.continue/config.yaml` (global config)
|
|
111
|
+
- **Junie** — `~/.junie/AGENTS.md` (aggregate), `~/.junie/skills/`, `~/.junie/agents/*.md`, `~/.junie/commands/*.md`, `~/.junie/mcp/mcp.json`, optional mirror to `~/.agents/skills/` when Codex is **not** also a global target
|
|
112
|
+
- **Kiro** — `~/.kiro/steering/AGENTS.md` (aggregate), `~/.kiro/steering/*.md` (per-rule files), `~/.kiro/agents/*.md`, `~/.kiro/skills/`, `~/.kiro/settings/mcp.json`, `~/.kiro/settings/kiroignore`, optional mirror to `~/.agents/skills/` when Codex is **not** also a global target
|
|
113
|
+
- **Gemini CLI** — `~/.gemini/GEMINI.md`, `~/.gemini/AGENTS.md` (compatibility aggregate), `~/.gemini/settings.json` (includes MCP and hooks), `~/.gemini/commands/*.toml`, `~/.gemini/skills/`, `~/.gemini/agents/*.md` (experimental), optional mirror to `~/.agents/skills/` when Codex is **not** also a global target
|
|
114
|
+
- **Cline** — `~/Documents/Cline/Rules/`, `~/Documents/Cline/Workflows/`, `~/Documents/Cline/Hooks/`, `~/.cline/skills/`, `~/.cline/cline_mcp_settings.json`, `~/.clineignore`, optional mirror to `~/.agents/skills/`
|
|
115
|
+
- **Codex CLI** — `~/.codex/AGENTS.md`, `~/.codex/config.toml`, `~/.codex/agents/*.toml`, `~/.codex/rules/*.rules` when rules use execution semantics, and `~/.agents/skills/` for skills
|
|
116
|
+
- **Windsurf** — `~/.codeium/windsurf/memories/global_rules.md`, `~/.codeium/windsurf/skills/`, `~/.codeium/windsurf/global_workflows/`, `~/.codeium/windsurf/hooks.json`, `~/.codeium/windsurf/mcp_config.json`, `~/.codeium/.codeiumignore`, optional mirror to `~/.agents/skills/` when Codex is **not** also a global target
|
|
117
|
+
- **Antigravity** — `~/.gemini/antigravity/GEMINI.md`, `~/.gemini/antigravity/skills/`, `~/.gemini/antigravity/workflows/`, and `~/.gemini/antigravity/mcp_config.json`
|
|
118
|
+
- **Roo Code** — `~/.roo/AGENTS.md` (compatibility aggregate), `~/.roo/rules/*.md`, `~/.roo/commands/*.md`, `~/.roo/skills/`, `~/mcp_settings.json`, `~/.rooignore`, `~/.roo/settings/custom_modes.yaml` (agents → custom modes), optional mirror to `~/.agents/skills/` when Codex is **not** also a global target
|
|
119
|
+
|
|
120
|
+
See the [supported tools matrix](https://samplexbro.github.io/agentsmesh/reference/supported-tools/#global-mode) for project vs global capability notes per target.
|
|
121
|
+
|
|
75
122
|
That's it. Your `.agentsmesh/` directory is now the single source of truth, and the generated files for each tool stay in sync with it.
|
|
76
123
|
|
|
77
124
|
---
|
|
78
125
|
|
|
79
126
|
## Supported Tools
|
|
80
127
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
|
85
|
-
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
92
|
-
|
|
128
|
+
### Project scope (`agentsmesh generate`)
|
|
129
|
+
|
|
130
|
+
<!-- agentsmesh:support-matrix:project -->
|
|
131
|
+
| Feature | Claude Code | Cursor | Copilot | Continue | Junie | Kiro | Gemini CLI | Cline | Codex CLI | Windsurf | Antigravity | Roo Code |
|
|
132
|
+
|---|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|
|
|
133
|
+
| Rules | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native |
|
|
134
|
+
| Additional Rules | Native | Embedded | Native | Native | Native | Native | Embedded | Native | Native | Native | Native | Native |
|
|
135
|
+
| Commands | Native | Native | Native | Embedded | Native | — | Native | Native (workflows) | Embedded | Native (workflows) | Partial (workflows) | Native |
|
|
136
|
+
| Agents | Native | Native | Native | — | Native | Native | Native | Embedded | Native | Embedded | — | Partial |
|
|
137
|
+
| Skills | Native | Native | Native | Embedded | Native | Native | Native | Native | Native | Native | Native | Native |
|
|
138
|
+
| MCP Servers | Native | Native | — | Native | Native | Native | Native | Native | Native | Partial | — | Native |
|
|
139
|
+
| Hooks | Native | Native | Partial | — | — | Native | Partial | Native | — | Native | — | — |
|
|
140
|
+
| Ignore | Native | Native | — | — | Native | Native | Native (settings-embedded) | Native | — | Native | — | Native |
|
|
141
|
+
| Permissions | Native | Partial | — | — | — | — | Partial | — | — | — | — | — |
|
|
142
|
+
<!-- /agentsmesh:support-matrix:project -->
|
|
143
|
+
|
|
144
|
+
### Global scope (`agentsmesh matrix --global`)
|
|
145
|
+
|
|
146
|
+
<!-- agentsmesh:support-matrix:global -->
|
|
147
|
+
| Feature | Claude Code | Cursor | Copilot | Continue | Junie | Kiro | Gemini CLI | Cline | Codex CLI | Windsurf | Antigravity | Roo Code |
|
|
148
|
+
|---|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|
|
|
149
|
+
| Rules | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native |
|
|
150
|
+
| Additional Rules | Native | Embedded | Native | Native | Embedded | Native | Embedded | Native | Embedded | Partial | Embedded | Native |
|
|
151
|
+
| Commands | Native | Native | Native | Native | Native | — | Native | Native (workflows) | Embedded | Native (workflows) | Partial (workflows) | Native |
|
|
152
|
+
| Agents | Native | Native | Native | — | Native | Native | Native | Embedded | Native | Embedded | — | Partial |
|
|
153
|
+
| Skills | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native | Native |
|
|
154
|
+
| MCP Servers | Native | Native | — | Native | Native | Native | Native | Native | Native | Partial | Native | Native |
|
|
155
|
+
| Hooks | Native | Native | — | — | — | — | Partial | Native | — | Native | — | — |
|
|
156
|
+
| Ignore | Native | Native | — | — | — | Native | — | Native | — | Native | — | Native |
|
|
157
|
+
| Permissions | Native | — | — | — | — | — | — | — | — | — | — | — |
|
|
158
|
+
<!-- /agentsmesh:support-matrix:global -->
|
|
159
|
+
|
|
160
|
+
See the [full feature matrix docs](https://samplexbro.github.io/agentsmesh/reference/supported-tools/) for details on native vs. embedded support and global paths.
|
|
93
161
|
|
|
94
162
|
**Note:** The canonical root rule always lives at `.agentsmesh/rules/_root.md`. Some targets write that content to a tool-specific main file named `general` (for example `.continue/rules/general.md` and `.agents/rules/general.md` for Antigravity) instead of `_root.md` on disk.
|
|
95
163
|
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/** Hook definition */
|
|
2
|
+
interface HookEntry {
|
|
3
|
+
matcher: string;
|
|
4
|
+
command: string;
|
|
5
|
+
timeout?: number;
|
|
6
|
+
type?: 'command' | 'prompt';
|
|
7
|
+
prompt?: string;
|
|
8
|
+
}
|
|
9
|
+
interface Hooks {
|
|
10
|
+
PreToolUse?: HookEntry[];
|
|
11
|
+
PostToolUse?: HookEntry[];
|
|
12
|
+
Notification?: HookEntry[];
|
|
13
|
+
UserPromptSubmit?: HookEntry[];
|
|
14
|
+
SubagentStart?: HookEntry[];
|
|
15
|
+
SubagentStop?: HookEntry[];
|
|
16
|
+
[key: string]: HookEntry[] | undefined;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface BaseMcpServer {
|
|
20
|
+
description?: string;
|
|
21
|
+
type: string;
|
|
22
|
+
env: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
/** Stdio MCP server configuration */
|
|
25
|
+
interface StdioMcpServer extends BaseMcpServer {
|
|
26
|
+
command: string;
|
|
27
|
+
args: string[];
|
|
28
|
+
}
|
|
29
|
+
/** URL-based MCP server configuration (HTTP/SSE/streamable HTTP) */
|
|
30
|
+
interface UrlMcpServer extends BaseMcpServer {
|
|
31
|
+
url: string;
|
|
32
|
+
headers: Record<string, string>;
|
|
33
|
+
}
|
|
34
|
+
/** MCP server configuration */
|
|
35
|
+
type McpServer = StdioMcpServer | UrlMcpServer;
|
|
36
|
+
interface McpConfig {
|
|
37
|
+
mcpServers: Record<string, McpServer>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** A parsed rule from .agentsmesh/rules/ (glob: *.md) */
|
|
41
|
+
interface CanonicalRule {
|
|
42
|
+
/** Source file path (for error reporting) */
|
|
43
|
+
source: string;
|
|
44
|
+
/** If true, this is the root/always-applied rule */
|
|
45
|
+
root: boolean;
|
|
46
|
+
/** Which targets receive this rule. Empty = all */
|
|
47
|
+
targets: string[];
|
|
48
|
+
/** Human description for AI context */
|
|
49
|
+
description: string;
|
|
50
|
+
/** Glob patterns for file scoping */
|
|
51
|
+
globs: string[];
|
|
52
|
+
/** Markdown body content */
|
|
53
|
+
body: string;
|
|
54
|
+
/** Activation mode hint for tools that support it (e.g. Windsurf) */
|
|
55
|
+
trigger?: 'always_on' | 'model_decision' | 'glob' | 'manual';
|
|
56
|
+
/**
|
|
57
|
+
* Codex CLI: `advisory` (default) → nested `AGENTS.md` / `AGENTS.override.md`.
|
|
58
|
+
* `execution` → `.codex/rules/{slug}.rules` body must be Starlark (`prefix_rule`, …).
|
|
59
|
+
* @see docs/agent-structures/codex-cli-project-level-advanced.md §6.2, §6.10
|
|
60
|
+
*/
|
|
61
|
+
codexEmit?: 'advisory' | 'execution';
|
|
62
|
+
/**
|
|
63
|
+
* Codex nested instruction filename: `override` → `AGENTS.override.md` (advisory only).
|
|
64
|
+
*/
|
|
65
|
+
codexInstructionVariant?: 'default' | 'override';
|
|
66
|
+
}
|
|
67
|
+
/** A parsed command from .agentsmesh/commands/ (glob: *.md) */
|
|
68
|
+
interface CanonicalCommand {
|
|
69
|
+
source: string;
|
|
70
|
+
/** Command name (derived from filename) */
|
|
71
|
+
name: string;
|
|
72
|
+
description: string;
|
|
73
|
+
/** Tool permissions: ["Read", "Grep", "Bash(git diff)"] */
|
|
74
|
+
allowedTools: string[];
|
|
75
|
+
/** When true, also emit ~/.claude/output-styles/{name}.md in Claude global mode */
|
|
76
|
+
outputStyle?: boolean;
|
|
77
|
+
body: string;
|
|
78
|
+
}
|
|
79
|
+
/** A parsed subagent from .agentsmesh/agents/ (glob: *.md) */
|
|
80
|
+
interface CanonicalAgent {
|
|
81
|
+
source: string;
|
|
82
|
+
name: string;
|
|
83
|
+
description: string;
|
|
84
|
+
/** Tools this agent can use */
|
|
85
|
+
tools: string[];
|
|
86
|
+
/** Tools explicitly denied */
|
|
87
|
+
disallowedTools: string[];
|
|
88
|
+
/** AI model preference */
|
|
89
|
+
model: string;
|
|
90
|
+
/** Permission mode */
|
|
91
|
+
permissionMode: string;
|
|
92
|
+
/** Max conversation turns */
|
|
93
|
+
maxTurns: number;
|
|
94
|
+
/** MCP servers available to this agent */
|
|
95
|
+
mcpServers: string[];
|
|
96
|
+
/** Hooks specific to this agent */
|
|
97
|
+
hooks: Hooks;
|
|
98
|
+
/** Skills available to this agent */
|
|
99
|
+
skills: string[];
|
|
100
|
+
/** Memory file path */
|
|
101
|
+
memory: string;
|
|
102
|
+
/** System prompt (markdown body) */
|
|
103
|
+
body: string;
|
|
104
|
+
/** When true, also emit ~/.claude/output-styles/{name}.md in Claude global mode */
|
|
105
|
+
outputStyle?: boolean;
|
|
106
|
+
}
|
|
107
|
+
/** Supporting file for a skill */
|
|
108
|
+
interface SkillSupportingFile {
|
|
109
|
+
relativePath: string;
|
|
110
|
+
absolutePath: string;
|
|
111
|
+
/** File content (utf-8) for generation; empty if unreadable */
|
|
112
|
+
content: string;
|
|
113
|
+
}
|
|
114
|
+
/** A parsed skill from .agentsmesh/skills/{name}/SKILL.md */
|
|
115
|
+
interface CanonicalSkill {
|
|
116
|
+
source: string;
|
|
117
|
+
/** Skill name (derived from directory name) */
|
|
118
|
+
name: string;
|
|
119
|
+
description: string;
|
|
120
|
+
/** SKILL.md content */
|
|
121
|
+
body: string;
|
|
122
|
+
/** Paths to supporting files (relative to skill dir) */
|
|
123
|
+
supportingFiles: SkillSupportingFile[];
|
|
124
|
+
}
|
|
125
|
+
/** Permission allow/deny/ask lists */
|
|
126
|
+
interface Permissions {
|
|
127
|
+
allow: string[];
|
|
128
|
+
deny: string[];
|
|
129
|
+
/** Present in parsed YAML; omitted in some legacy fixtures */
|
|
130
|
+
ask?: string[];
|
|
131
|
+
}
|
|
132
|
+
/** Ignore patterns (gitignore syntax lines) */
|
|
133
|
+
type IgnorePatterns = string[];
|
|
134
|
+
/** All canonical files loaded from .agentsmesh/ */
|
|
135
|
+
interface CanonicalFiles {
|
|
136
|
+
rules: CanonicalRule[];
|
|
137
|
+
commands: CanonicalCommand[];
|
|
138
|
+
agents: CanonicalAgent[];
|
|
139
|
+
skills: CanonicalSkill[];
|
|
140
|
+
mcp: McpConfig | null;
|
|
141
|
+
permissions: Permissions | null;
|
|
142
|
+
hooks: Hooks | null;
|
|
143
|
+
ignore: IgnorePatterns;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export type { CanonicalFiles as C, CanonicalRule as a };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { C as CanonicalFiles } from './canonical-types-gdrUi3bD.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Load all canonical files from a canonical directory into CanonicalFiles.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Load all canonical files from a canonical directory or project root.
|
|
9
|
+
* Missing directories/files yield empty arrays or null as per each parser.
|
|
10
|
+
*
|
|
11
|
+
* @param canonicalDirOrProjectRoot - Absolute path to canonical directory or project root
|
|
12
|
+
* @returns CanonicalFiles with all parsed data
|
|
13
|
+
*/
|
|
14
|
+
declare function loadCanonicalFiles(canonicalDirOrProjectRoot: string): Promise<CanonicalFiles>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Public API — canonical loading (package.json "exports"."./canonical").
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/** Load `.agentsmesh/` from a project root (or an explicit canonical directory). */
|
|
21
|
+
declare function loadCanonical(projectRoot: string): Promise<CanonicalFiles>;
|
|
22
|
+
|
|
23
|
+
export { loadCanonical, loadCanonicalFiles };
|