agentwheel 0.11.0 → 0.14.3

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/README.md CHANGED
@@ -26,7 +26,7 @@ forward explicitly; installs make the current declaration true.
26
26
  ```bash
27
27
  npm i -g agentwheel
28
28
  agentwheel init
29
- agentwheel add github:your-org/agent-pack --adapter codex --mode tracking
29
+ agentwheel add github:your-org/agent-pack --adapter codex --installation-type local --mode tracking
30
30
  agentwheel plan
31
31
  agentwheel install
32
32
  ```
@@ -34,23 +34,33 @@ agentwheel install
34
34
  No lock-in. No central gatekeeper. Packages live in plain git repos or local folders, customizations
35
35
  live in your workspace, and runtimes stay generated output.
36
36
 
37
- > **Status: early (v0.11).** The public CLI vocabulary is package-manager style:
37
+ > **Status: early (v0.12).** The public CLI vocabulary is package-manager style:
38
38
  > `add`, `install`, `update`, and `uninstall`. A hidden `sync` shim remains for old bootstrapped
39
39
  > skills; use `install` in all new docs and scripts.
40
40
 
41
41
  ## Supported runtimes & resources
42
42
 
43
- agentwheel installs OpenPack resources into five built-in runtimes and into custom harnesses:
43
+ agentwheel installs OpenPack resources into five built-in runtimes and into custom harnesses.
44
+ Every built-in target is scoped by `--installation-type <type>`; built-ins currently use `local`
45
+ for project/workspace installs and `user` for documented user-level installs. If a package can be
46
+ installed in more than one type, agentwheel requires `--installation-type` instead of guessing.
44
47
 
45
- - **OpenClaw** — `.openclaw/`
46
- - **Claude Code** — `.claude/`
47
- - **Codex CLI** — `.codex/`
48
- - **GitHub Copilot** — `.github/`
49
- - **Hermes** — `.hermes/`
48
+ - **OpenClaw** — workspace `skills/`, user `~/.openclaw/skills`
49
+ - **Claude Code** — `CLAUDE.md`, `.claude/`, and user `~/.claude/`
50
+ - **Codex CLI** — `AGENTS.md`, `.agents/skills`, `.codex/`, and user equivalents
51
+ - **GitHub Copilot CLI** — `.github/`, user `~/.copilot/`, and documented `.agents` skill alternatives
52
+ - **Hermes** — local instructions via `AGENTS.md`; skills are user-only at `~/.hermes/skills`
50
53
  - **Bring your own** — JSONC config adapters with `--adapter-config`, or programmatic adapters with `--adapter-module`
51
54
 
52
55
  Supported resource types include instructions, rules, skills, commands, subagents, MCP, hooks,
53
- settings, plugins, and fragments; see the full per-runtime target table below.
56
+ settings, plugins, and fragments. Runtime compatibility is per artifact and per installation type;
57
+ see [`docs/design/artifact-harness-compatibility.md`](docs/design/artifact-harness-compatibility.md).
58
+ Fragments are Agentwheel composition inputs, not runtime file-drop targets.
59
+
60
+ > `rules` is an OpenPack artifact kind, not a portable runtime concept. Codex rules are command
61
+ > execution policy, Claude rules are behavioral/path-scoped instructions, and Copilot rule-like
62
+ > installs map to path-specific custom instructions. Unsupported rule targets require an explicit
63
+ > custom adapter instead of an inferred folder.
54
64
 
55
65
  ## Core Commands
56
66
 
@@ -60,10 +70,10 @@ settings, plugins, and fragments; see the full per-runtime target table below.
60
70
  | `agentwheel plan [name-or-source]` | Preview what `install` would reconcile without writing. |
61
71
  | `agentwheel install` | Reconcile configured packages into the current target or selected fleet. Uses the graph lock as input by default. |
62
72
  | `agentwheel install <name-or-source>` | Ensure semantics: configured name/source scopes the install; a new source is added and installed. |
63
- | `agentwheel update [name]` | Re-resolve tracking packages, then apply. Pinned packages stay locked. |
73
+ | `agentwheel update [name]` | Re-resolve tracking packages, then apply. Pinned packages stay locked. Use `--profile <name>` for profile-managed fleets. |
64
74
  | `agentwheel uninstall <name-or-source>` | Remove a configured package from runtimes and config. |
65
75
  | `agentwheel uninstall <name> --keep-files` | Remove from config/manifest while leaving runtime files unmanaged. |
66
- | `agentwheel status` | Show configured packages, manifest/lock presence, and install state. |
76
+ | `agentwheel status` | Show configured packages, manifest/lock presence, and install state. Use `--profile <name>` for profile-managed fleets; `status --all` uses profile `all` when present. |
67
77
 
68
78
  Mental model: **`install` = make what is declared true. `update` = move tracking declarations forward,
69
79
  then make them true.**
@@ -76,7 +86,7 @@ to reconcile those removals.
76
86
  npm i -g agentwheel
77
87
 
78
88
  agentwheel init
79
- agentwheel add github:your-org/agent-pack --adapter openclaw --mode tracking
89
+ agentwheel add github:your-org/agent-pack --adapter openclaw --installation-type local --mode tracking
80
90
  agentwheel plan
81
91
  agentwheel install
82
92
  ```
@@ -111,10 +121,20 @@ cd ~/.openclaw
111
121
  agentwheel install
112
122
  ```
113
123
 
114
- If the current directory is already the runtime directory (`~/.openclaw`), agentwheel uses its
115
- parent as the root so output lands in `~/.openclaw/skills`, not `~/.openclaw/.openclaw/skills`.
116
- If the current directory contains a runtime directory (`./.openclaw`), that directory is used as
117
- the target under the current project.
124
+ Explicit source installs with an explicit adapter default to user-level artifacts, so this works as
125
+ a global install:
126
+
127
+ ```bash
128
+ agentwheel install github:your-org/agent-pack --adapter codex,claude
129
+ ```
130
+
131
+ Use `--local` for the current directory or `-t/--target-root <project>` for another
132
+ project/workspace. Use `--user`, `--local`, or `-i/--installation-type <type>` when you want the
133
+ scope to be explicit. For example, Codex local skills install into `.agents/skills`, while Codex user
134
+ skills install into `~/.agents/skills`.
135
+
136
+ When adding a new source this way, Agentwheel saves one package entry per adapter so later installs
137
+ do not collapse Codex and Claude state into the same config entry.
118
138
 
119
139
  For a control-plane setup, define named agents in config. Global config lives at
120
140
  `~/.agentwheel/config.json`; project config lives at `.agentwheel/config.json`; project values win.
@@ -122,10 +142,11 @@ For a control-plane setup, define named agents in config. Global config lives at
122
142
  ```jsonc
123
143
  {
124
144
  "agents": {
125
- "lab-openclaw": { "adapter": "openclaw", "root": "/Users/me/.openclaw-home", "transport": "local" },
145
+ "lab-openclaw": { "adapter": "openclaw", "installationType": "local", "root": "$HOME/.openclaw-home", "transport": "local" },
126
146
  "remote-codex": {
127
147
  "adapter": "codex",
128
- "root": "/home/agent/project",
148
+ "installationType": "local",
149
+ "root": "/workspace/project",
129
150
  "transport": "ssh",
130
151
  "host": "agent-host.example",
131
152
  "user": "agent",
@@ -147,7 +168,9 @@ For a control-plane setup, define named agents in config. Global config lives at
147
168
  ```bash
148
169
  agentwheel install --agent lab-openclaw
149
170
  agentwheel install --all
171
+ agentwheel update --profile daily --dry-run
150
172
  agentwheel install --profile daily
173
+ agentwheel status --profile daily
151
174
  agentwheel install --all-detected
152
175
  ```
153
176
 
@@ -201,7 +224,7 @@ Install only part of a package with `--select <type>/<name>`. `--skill <name>` i
201
224
  `update` runs.
202
225
 
203
226
  ```bash
204
- agentwheel add github:NestDevLab/agent-mesh --skill codex-tmux --adapter codex
227
+ agentwheel add github:NestDevLab/agent-mesh --skill codex-tmux --adapter codex --installation-type local
205
228
  agentwheel plan
206
229
  agentwheel install
207
230
  ```
@@ -287,21 +310,23 @@ pulled in by a meta-package. Overrides are explicit; package array order never d
287
310
  "source": "github:NestDevLab/agent-must-have#core",
288
311
  "driver": "git",
289
312
  "adapter": "codex",
313
+ "installationType": "local",
290
314
  "mode": "tracking"
291
315
  },
292
316
  {
293
317
  "name": "agent-toolkit-nestdev",
294
- "source": "github:Yehonal/agent-toolkit#main",
318
+ "source": "github:example-org/agent-toolkit#main",
295
319
  "driver": "git",
296
320
  "adapter": "codex",
321
+ "installationType": "local",
297
322
  "mode": "tracking",
298
323
  "select": [
299
324
  "rules/self-improve-on-correction.md",
300
325
  "skills/self-improve"
301
326
  ],
302
327
  "overrides": [
303
- "github:FrancescoBorzi/agent-toolkit::rules/self-improve-on-correction.md",
304
- "github:FrancescoBorzi/agent-toolkit::skills/self-improve"
328
+ "github:example-upstream/agent-toolkit::rules/self-improve-on-correction.md",
329
+ "github:example-upstream/agent-toolkit::skills/self-improve"
305
330
  ]
306
331
  }
307
332
  ]
@@ -316,9 +341,9 @@ losing artifact. Otherwise planning fails instead of hiding a collision.
316
341
  The same declaration can be created from the CLI:
317
342
 
318
343
  ```bash
319
- agentwheel add github:Yehonal/agent-toolkit#main \
344
+ agentwheel add github:example-org/agent-toolkit#main \
320
345
  --skill self-improve \
321
- --override 'github:FrancescoBorzi/agent-toolkit::skills/self-improve'
346
+ --override 'github:example-upstream/agent-toolkit::skills/self-improve'
322
347
  ```
323
348
 
324
349
  `agentwheel plan`, `agentwheel deps tree`, and `agentwheel deps why` print `OVERRIDE` lines for
@@ -351,9 +376,16 @@ published:
351
376
  {
352
377
  "name": "myco-internal",
353
378
  "targets": {
354
- "instructions": { "dest": ".myco/context/AGENTS.md" },
355
- "rules": { "dest": ".myco/policy/rules" },
356
- "skills": { "dest": ".myco/lib/skills" }
379
+ "instructions": {
380
+ "local": { "dest": ".myco/context/AGENTS.md" }
381
+ },
382
+ "rules": {
383
+ "local": { "dest": ".myco/policy/rules" }
384
+ },
385
+ "skills": {
386
+ "local": { "dest": ".myco/lib/skills" },
387
+ "user": { "root": "home", "dest": ".myco/skills" }
388
+ }
357
389
  }
358
390
  }
359
391
  ```
@@ -370,18 +402,19 @@ agentwheel install ./my-pack --adapter-module ./myco-adapter.js
370
402
 
371
403
  Built-in runtime targets:
372
404
 
373
- | Runtime | Main targets |
405
+ | Runtime | Native supported targets |
374
406
  |---|---|
375
- | **OpenClaw** | `.openclaw/AGENTS.md`, `.openclaw/skills`, `.openclaw/rules`, `.openclaw/commands`, `.openclaw/agents`, MCP/hooks/settings, semantic plugin planning |
376
- | **Claude Code** | `.claude/CLAUDE.md`, `.claude/skills`, `.claude/commands`, `.claude/agents`, `.claude/rules`, `.claude/.mcp.json`, `.claude/settings.json` |
377
- | **Codex CLI** | `.codex/AGENTS.md`, `.codex/skills`, `.codex/commands`, `.codex/agents`, `.codex/rules`, `.codex/config.toml`, `.codex/hooks.json` |
378
- | **Hermes** | `.hermes/AGENTS.md`, `.hermes/skills`, `.hermes/rules`, `.hermes/commands`, `.hermes/agents`, MCP/hooks/settings |
379
- | **GitHub Copilot** | `.github/copilot-instructions.md`, `.github/instructions`, `.github/prompts`, `.github/skills`, `.github/agents`, `.vscode/mcp.json` |
407
+ | **OpenClaw** | `local: skills/`; `user: ~/.openclaw/skills`; plugins require runtime-specific config |
408
+ | **Claude Code** | `local: CLAUDE.md, .claude/skills, .claude/rules, .claude/commands, .claude/agents, .mcp.json, .claude/settings.json`; `user: ~/.claude/...` except project MCP; rules are behavioral/path-scoped |
409
+ | **Codex CLI** | `local: AGENTS.md, .agents/skills, .codex/rules, .codex/agents, .codex/config.toml, .codex/hooks.json`; `user: ~/.agents/skills, ~/.codex/...`; rules are command execution policy; subagents are TOML custom agents |
410
+ | **Hermes** | `local: AGENTS.md`; `user: ~/.hermes/skills`; rules require explicit adapter config |
411
+ | **GitHub Copilot CLI** | `local: .github/copilot-instructions.md, .github/instructions, .github/prompts, .github/skills, .github/agents, .github/mcp.json, .github/hooks`; `user: ~/.copilot/copilot-instructions.md, ~/.copilot/instructions, ~/.copilot/skills, ~/.copilot/agents, ~/.copilot/mcp-config.json, ~/.copilot/hooks`; rule-like artifacts map to instructions |
380
412
 
381
413
  ## Docs
382
414
 
383
415
  - [`docs/spec/openpack.md`](docs/spec/openpack.md) — OpenPack package spec.
384
416
  - [`docs/fleet-config.md`](docs/fleet-config.md) — named agents, SSH targets, and profiles.
417
+ - [`docs/design/artifact-harness-compatibility.md`](docs/design/artifact-harness-compatibility.md) — artifact/harness compatibility matrix and rule semantics.
385
418
  - Resource catalogue: https://nestdevlab.github.io/agentwheel/catalogue.html.
386
419
  - [`DESIGN.md`](DESIGN.md) — architecture and module layout.
387
420
  - [`LIFECYCLE.md`](LIFECYCLE.md) — publish, install, update, and customization model.
@@ -18,6 +18,8 @@ import {
18
18
  writeFile
19
19
  } from "fs/promises";
20
20
  import { dirname, join, relative } from "path";
21
+ var IGNORED_ENTRY_NAMES = /* @__PURE__ */ new Set([".git", "node_modules", "__pycache__", ".DS_Store"]);
22
+ var IGNORED_SUFFIXES = [".pyc", ".pyo"];
21
23
  async function pathExists(path) {
22
24
  try {
23
25
  await stat(path);
@@ -48,7 +50,7 @@ async function listFiles(root) {
48
50
  async function walk(dir) {
49
51
  const entries = await readdir(dir, { withFileTypes: true });
50
52
  for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
51
- if (entry.name === ".git" || entry.name === "node_modules") continue;
53
+ if (isIgnoredGeneratedEntry(entry.name)) continue;
52
54
  const full = join(dir, entry.name);
53
55
  if (entry.isDirectory()) {
54
56
  await walk(full);
@@ -60,6 +62,9 @@ async function listFiles(root) {
60
62
  await walk(root);
61
63
  return out;
62
64
  }
65
+ function isIgnoredGeneratedEntry(name) {
66
+ return IGNORED_ENTRY_NAMES.has(name) || IGNORED_SUFFIXES.some((suffix) => name.endsWith(suffix));
67
+ }
63
68
  async function atomicCopy(source, dest, kind) {
64
69
  await mkdir(dirname(dest), { recursive: true });
65
70
  const temp = `${dest}.agentwheel-tmp-${process.pid}-${Date.now()}`;
@@ -67,7 +72,7 @@ async function atomicCopy(source, dest, kind) {
67
72
  if (kind === "file") {
68
73
  await copyFile(source, temp);
69
74
  } else {
70
- await cp(source, temp, { recursive: true, dereference: true });
75
+ await cp(source, temp, { recursive: true, dereference: true, filter: (path) => !isIgnoredGeneratedEntry(path.split(/[\\/]/).at(-1) ?? "") });
71
76
  }
72
77
  await rm(dest, { recursive: true, force: true });
73
78
  await rename(temp, dest);
@@ -104,6 +109,7 @@ function resolveLocalPath(source) {
104
109
  export {
105
110
  pathExists,
106
111
  hashPath,
112
+ isIgnoredGeneratedEntry,
107
113
  atomicCopy,
108
114
  writeJsonAtomic,
109
115
  inferSourceDriverName,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  inferSourceDriverName,
4
4
  isExplicitSource
5
- } from "./chunk-N2LZY7LO.js";
5
+ } from "./chunk-B3FMBTWC.js";
6
6
  export {
7
7
  inferSourceDriverName,
8
8
  isExplicitSource