@indy2kro/agentenv 0.4.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/README.md +62 -355
- package/dist/adapters/base.d.ts +9 -0
- package/dist/adapters/base.d.ts.map +1 -1
- package/dist/adapters/base.js +12 -0
- package/dist/adapters/base.js.map +1 -1
- package/dist/adapters/claude.d.ts +1 -0
- package/dist/adapters/claude.d.ts.map +1 -1
- package/dist/adapters/claude.js +15 -4
- package/dist/adapters/claude.js.map +1 -1
- package/dist/adapters/copilot.d.ts +1 -0
- package/dist/adapters/copilot.d.ts.map +1 -1
- package/dist/adapters/copilot.js +4 -0
- package/dist/adapters/copilot.js.map +1 -1
- package/dist/adapters/opencode.d.ts.map +1 -1
- package/dist/adapters/opencode.js +5 -8
- package/dist/adapters/opencode.js.map +1 -1
- package/dist/commands/apply.d.ts +8 -0
- package/dist/commands/apply.d.ts.map +1 -1
- package/dist/commands/apply.js +32 -6
- package/dist/commands/apply.js.map +1 -1
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +15 -1
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +21 -8
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/setup.d.ts +2 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +9 -4
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/shell-fix.d.ts.map +1 -1
- package/dist/commands/shell-fix.js +4 -0
- package/dist/commands/shell-fix.js.map +1 -1
- package/dist/commands/status.d.ts +5 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +31 -9
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/uninstall.d.ts +2 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +11 -5
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +11 -5
- package/dist/commands/update.js.map +1 -1
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +54 -5
- package/dist/config/schema.js.map +1 -1
- package/dist/config/scopes.d.ts +13 -0
- package/dist/config/scopes.d.ts.map +1 -1
- package/dist/config/scopes.js +15 -0
- package/dist/config/scopes.js.map +1 -1
- package/dist/generate/agentsmd.d.ts.map +1 -1
- package/dist/generate/agentsmd.js +15 -2
- package/dist/generate/agentsmd.js.map +1 -1
- package/dist/integrations/base.d.ts +1 -1
- package/dist/integrations/base.js +1 -1
- package/dist/shell/detector.d.ts +10 -0
- package/dist/shell/detector.d.ts.map +1 -1
- package/dist/shell/detector.js +44 -46
- package/dist/shell/detector.js.map +1 -1
- package/dist/toolchain/fallbacks.d.ts +2 -2
- package/dist/toolchain/fallbacks.js +2 -2
- package/dist/toolchain/gh.d.ts +12 -3
- package/dist/toolchain/gh.d.ts.map +1 -1
- package/dist/toolchain/gh.js +23 -8
- package/dist/toolchain/gh.js.map +1 -1
- package/dist/toolchain/mise.d.ts +21 -3
- package/dist/toolchain/mise.d.ts.map +1 -1
- package/dist/toolchain/mise.js +39 -20
- package/dist/toolchain/mise.js.map +1 -1
- package/dist/toolchain/rtk.d.ts.map +1 -1
- package/dist/toolchain/rtk.js +1 -1
- package/dist/toolchain/rtk.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,83 +1,28 @@
|
|
|
1
|
-
# agentenv
|
|
1
|
+
# agentenv (CLI source)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
This directory is the active implementation of `agentenv`: a TypeScript CLI
|
|
4
|
+
that gives AI coding agents (Claude Code, Codex CLI, GitHub Copilot, OpenCode,
|
|
5
|
+
Gemini CLI, Cursor, Windsurf, Cline CLI, Mistral Vibe) a consistent shell
|
|
6
|
+
environment. It drives [mise](https://mise.jdx.dev) for tool installation,
|
|
7
|
+
[rtk](https://github.com/rtk-ai/rtk) for command rewriting + hooks, and
|
|
8
|
+
generates `AGENTS.md`/`CLAUDE.md` from one `agentenv.toml`.
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
[
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
It supports nine AI coding agents: **Claude Code**, **OpenAI Codex CLI**,
|
|
14
|
-
**GitHub Copilot** (CLI/Chat), **OpenCode**, **Gemini CLI**, **Cursor**,
|
|
15
|
-
**Windsurf**, **Cline CLI**, and **Mistral Vibe**. Claude Code and Codex CLI
|
|
16
|
-
are enabled by default; the remaining agents are opt-in.
|
|
17
|
-
|
|
18
|
-
> **📦 Published as `@indy2kro/agentenv`.** The npm package name is scoped
|
|
19
|
-
> (`agentenv` was already taken) — install with
|
|
20
|
-
> `npm install -g @indy2kro/agentenv`. The command it installs is still
|
|
21
|
-
> plain `agentenv`. See [Install](#install) below.
|
|
22
|
-
|
|
23
|
-
## Contents
|
|
24
|
-
|
|
25
|
-
- [Why agentenv](#why-agentenv)
|
|
26
|
-
- [Requirements](#requirements)
|
|
27
|
-
- [Install](#install)
|
|
28
|
-
- [Quick start](#quick-start)
|
|
29
|
-
- [Commands](#commands)
|
|
30
|
-
- [Configuration (`agentenv.toml`)](#configuration-agentenvtoml)
|
|
31
|
-
- [Tool catalog](#tool-catalog)
|
|
32
|
-
- [Custom tools](#custom-tools)
|
|
33
|
-
- [Optional integrations](#optional-integrations)
|
|
34
|
-
- [Troubleshooting](#troubleshooting)
|
|
35
|
-
- [Development](#development)
|
|
36
|
-
|
|
37
|
-
## Why agentenv
|
|
38
|
-
|
|
39
|
-
If you've ever had an AI coding agent fumble because `grep`/`fd`/`jq` weren't
|
|
40
|
-
on PATH, or watched every agent redo the same hook-wiring dance for a
|
|
41
|
-
different config file format, that's what this fixes:
|
|
42
|
-
|
|
43
|
-
- **One command** (`agentenv setup`) gets a fresh machine — Windows included
|
|
44
|
-
— to a working state for whichever supported agents you have installed.
|
|
45
|
-
- **A single source of truth** (`agentenv.toml`) drives everything else:
|
|
46
|
-
`mise.toml`, `AGENTS.md`/`CLAUDE.md`, and each agent's own hook files are
|
|
47
|
-
all generated from it, never hand-maintained.
|
|
48
|
-
- **Nothing is reinstalled or reinvented.** Tool installation is 100% mise;
|
|
49
|
-
command rewriting/hooks are 100% rtk. agentenv only ever calls out to them
|
|
50
|
-
and writes config.
|
|
51
|
-
- **Safe to re-run.** `agentenv apply` is idempotent — run it as often as you
|
|
52
|
-
like; with no config change it touches nothing and reinstalls nothing.
|
|
53
|
-
|
|
54
|
-
## Requirements
|
|
55
|
-
|
|
56
|
-
- **Node.js >= 22.13** to run the CLI itself.
|
|
57
|
-
- **[mise](https://mise.jdx.dev)** installed and on PATH — a hard
|
|
58
|
-
prerequisite. agentenv never installs tools itself: it generates a
|
|
59
|
-
`mise.toml` and delegates 100% of tool installation to mise (whose shims dir
|
|
60
|
-
is where agent PATH stays consistent). `agentenv apply`/`setup` fail fast
|
|
61
|
-
with install instructions when mise is missing; the only exception is
|
|
62
|
-
`apply --skip-mise-install`, which generates files without installing
|
|
63
|
-
(advanced/CI). See [`../../docs/guides/installing.md`](../../docs/guides/installing.md).
|
|
64
|
-
- **Git for Windows**, if you're on Windows — agentenv's Tier 0 shell fix
|
|
65
|
-
relies on the POSIX toolchain it bundles.
|
|
66
|
-
- Optionally, whichever supported agents you want configured already
|
|
67
|
-
installed (agentenv detects what's present; it doesn't install the agents
|
|
68
|
-
themselves).
|
|
10
|
+
- **User guide** (install, every command, exit codes, troubleshooting):
|
|
11
|
+
[`../../docs/usage.md`](../../docs/usage.md)
|
|
12
|
+
- **Config reference** (all of `agentenv.toml`, the tool catalog, custom
|
|
13
|
+
tools, integrations): [`../../docs/configuration.md`](../../docs/configuration.md)
|
|
14
|
+
- **Docs index**: [`../../docs/README.md`](../../docs/README.md)
|
|
69
15
|
|
|
70
16
|
## Install
|
|
71
17
|
|
|
72
|
-
### From npm
|
|
18
|
+
### From npm
|
|
73
19
|
|
|
74
20
|
```sh
|
|
75
21
|
npm install -g @indy2kro/agentenv
|
|
76
22
|
```
|
|
77
23
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
already taken on the registry).
|
|
24
|
+
The package is scoped (plain `agentenv` was taken); the installed command is
|
|
25
|
+
still plain `agentenv`.
|
|
81
26
|
|
|
82
27
|
### From source
|
|
83
28
|
|
|
@@ -90,301 +35,63 @@ npm link # makes `agentenv` available globally on PATH
|
|
|
90
35
|
```
|
|
91
36
|
|
|
92
37
|
`npm link` symlinks this checkout's `dist/index.js` as the global `agentenv`
|
|
93
|
-
binary — rerun `npm run build` after pulling
|
|
94
|
-
|
|
38
|
+
binary — rerun `npm run build` after pulling, no need to link again. Prefer
|
|
39
|
+
not to touch global state? Run in place:
|
|
95
40
|
|
|
96
41
|
```sh
|
|
97
42
|
node dist/index.js setup
|
|
98
43
|
```
|
|
99
44
|
|
|
100
|
-
Releases are one button: run the `Release` GitHub Actions workflow from the
|
|
101
|
-
repo's Actions tab (patch/minor/major or an exact version). It bumps the
|
|
102
|
-
version in `package.json` + `package-lock.json`, gates the tree, publishes
|
|
103
|
-
with npm provenance, tags the release, and creates the GitHub release.
|
|
104
|
-
Maintainers: see [`docs/guides/releasing.md`](../../docs/guides/releasing.md).
|
|
105
|
-
|
|
106
|
-
## Quick start
|
|
107
|
-
|
|
108
|
-
```sh
|
|
109
|
-
agentenv setup
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
The wizard walks you through agents, the full tool picker (Tiers 1–3 on one
|
|
113
|
-
page; Tier 1 and Tier 2 pre-checked, Tier 3 off), optional custom binaries,
|
|
114
|
-
scope, rtk, and the optional Superpowers integration, then shows you a diff
|
|
115
|
-
and applies in one pass — including the Windows shell fix if you're on
|
|
116
|
-
Windows. It pre-fills every prompt from an existing `agentenv.toml`, so it's
|
|
117
|
-
safe to re-run any time.
|
|
118
|
-
|
|
119
|
-
The same flow is also reached via `agentenv configure` (an alias of `setup`;
|
|
120
|
-
see [Commands](#commands)).
|
|
121
|
-
|
|
122
|
-
Not in an interactive terminal (CI, a script)? The interactive
|
|
123
|
-
`setup`/`configure` wizard requires a TTY and refuses to run without one —
|
|
124
|
-
instead use unattended `agentenv setup --yes` (defaults from detected agents,
|
|
125
|
-
or re-applies your existing `agentenv.toml`) or `agentenv apply` against a
|
|
126
|
-
hand-written or previously-saved config.
|
|
127
|
-
|
|
128
|
-
## Commands
|
|
129
|
-
|
|
130
|
-
| Command | What it does |
|
|
131
|
-
|---|---|
|
|
132
|
-
| `agentenv setup` (alias `configure`) | Interactive wizard: pick agents, the full Tier 1–3 tool picker (one page, Tier 1+2 pre-checked), add custom binaries, choose scope, toggle rtk, optionally opt into Superpowers, review a diff of what will change, then confirm before applying. Re-run any time — it pre-fills every prompt from your current `agentenv.toml`. |
|
|
133
|
-
| `agentenv apply [--skip-mise-install]` | Non-interactive: read `agentenv.toml` and (re)generate everything — `mise.toml`, `AGENTS.md`/`CLAUDE.md`, per-agent hook files, the Tier 0 shell fix. Safe to run in CI or a script. `--skip-mise-install` generates files only, without running `mise install` (useful for a fast dry-run or when mise isn't available). |
|
|
134
|
-
| `agentenv status` | Read-only report: what's configured, what's actually installed, and where the two disagree (drift) — per agent, per tool, per generated file. |
|
|
135
|
-
| `agentenv uninstall` | Remove mise-managed tools in your config from the mise store (cleanup); `agentenv apply` reinstalls them. `--dry-run` previews the plan without changing anything, `--yes` skips the confirmation prompt. |
|
|
136
|
-
| `agentenv shell-fix` | Inspect (or `--revert`) the per-user Tier 0 shell changes `apply` records on Windows. `--json` prints the manifest; `--revert [--dry-run]` restores the values agentenv overwrote (skipping files you changed since). |
|
|
137
|
-
| `agentenv --version` / `agentenv --help` | Standard `commander`-generated version/help output; every subcommand also takes `--help`. |
|
|
138
|
-
|
|
139
|
-
`setup` (alias `configure`) writes `agentenv.toml` and then calls the same
|
|
140
|
-
`apply` logic internally, so a hand-run `apply` reaches the same end state.
|
|
141
|
-
|
|
142
|
-
Output is colorized when your terminal supports it (auto-detected, honors
|
|
143
|
-
`NO_COLOR`/`FORCE_COLOR`); pass `--no-color` (before or after the subcommand)
|
|
144
|
-
to force it off.
|
|
145
|
-
|
|
146
|
-
## Configuration (`agentenv.toml`)
|
|
147
|
-
|
|
148
|
-
Everything flows from one file. It lives either in the project root
|
|
149
|
-
(`./agentenv.toml`, scope = `"project"`, committed to the repo so your whole
|
|
150
|
-
team shares it) or in your user config dir
|
|
151
|
-
(`~/.config/agentenv/agentenv.toml` — or the Windows equivalent via
|
|
152
|
-
`%USERPROFILE%`, scope = `"user"`). `agentenv apply`/`status` look in the
|
|
153
|
-
project directory first, then fall back to the user-scope file.
|
|
154
|
-
|
|
155
|
-
`mise.toml`, `AGENTS.md`, `CLAUDE.md`, and the per-agent hook files are all
|
|
156
|
-
**generated outputs** of `agentenv apply` — never hand-edit them; edit
|
|
157
|
-
`agentenv.toml` and re-run `apply` instead (or run the `setup` wizard to
|
|
158
|
-
edit interactively). Regeneration
|
|
159
|
-
only touches a marker-block section of `AGENTS.md`/`CLAUDE.md`, so any
|
|
160
|
-
content you've added outside that block survives.
|
|
161
|
-
|
|
162
|
-
Full annotated example:
|
|
163
|
-
|
|
164
|
-
```toml
|
|
165
|
-
# "project" (default, committed to the repo) or "user" (global, ~/.config/agentenv/)
|
|
166
|
-
scope = "project"
|
|
167
|
-
|
|
168
|
-
[agents]
|
|
169
|
-
claude_code = true
|
|
170
|
-
codex_cli = true
|
|
171
|
-
copilot = true
|
|
172
|
-
opencode = true
|
|
173
|
-
gemini_cli = false
|
|
174
|
-
cursor = false
|
|
175
|
-
windsurf = false
|
|
176
|
-
cline = false
|
|
177
|
-
vibe = false
|
|
178
|
-
|
|
179
|
-
[tools]
|
|
180
|
-
# Tier 1 (essential, on by default)
|
|
181
|
-
ripgrep = true
|
|
182
|
-
fd = true
|
|
183
|
-
jq = true
|
|
184
|
-
rtk = true
|
|
185
|
-
# Tier 2 (AI-coding value-add, on by default)
|
|
186
|
-
ast_grep = true
|
|
187
|
-
git_delta = true
|
|
188
|
-
gh = true
|
|
189
|
-
difftastic = true
|
|
190
|
-
# Tier 3 (power-user, off by default) — see the Tool catalog below for the full list
|
|
191
|
-
yq = false
|
|
192
|
-
bat = false
|
|
193
|
-
eza = false
|
|
194
|
-
miller = false
|
|
195
|
-
tokei = false
|
|
196
|
-
hyperfine = false
|
|
197
|
-
fzf = false
|
|
198
|
-
just = false
|
|
199
|
-
watchexec = false
|
|
200
|
-
direnv = false
|
|
201
|
-
ripgrep_all = false
|
|
202
|
-
zoxide = false
|
|
203
|
-
shellcheck = false
|
|
204
|
-
uv = false
|
|
205
|
-
xh = false
|
|
206
|
-
actionlint = false
|
|
207
|
-
gitleaks = false
|
|
208
|
-
gum = false
|
|
209
|
-
glow = false
|
|
210
|
-
jless = false
|
|
211
|
-
sd = false
|
|
212
|
-
tealdeer = false
|
|
213
|
-
duckdb = false
|
|
214
|
-
qsv = false
|
|
215
|
-
|
|
216
|
-
# Your own tool, already installed somewhere on the machine
|
|
217
|
-
[[custom_tools]]
|
|
218
|
-
name = "mytool"
|
|
219
|
-
description = "Internal linter wrapper"
|
|
220
|
-
already_installed = true
|
|
221
|
-
path_windows = "C:\\tools\\mytool.exe"
|
|
222
|
-
path_macos = "/usr/local/bin/mytool"
|
|
223
|
-
path_linux = "/usr/local/bin/mytool"
|
|
224
|
-
|
|
225
|
-
# Your own tool, installable via mise (e.g. it publishes GitHub releases)
|
|
226
|
-
[[custom_tools]]
|
|
227
|
-
name = "otherthing"
|
|
228
|
-
mise_source = "github:someorg/otherthing"
|
|
229
|
-
version = "latest"
|
|
230
|
-
|
|
231
|
-
[rtk]
|
|
232
|
-
enabled = true
|
|
233
|
-
[rtk.init]
|
|
234
|
-
claude_code = true
|
|
235
|
-
codex_cli = true
|
|
236
|
-
copilot = true
|
|
237
|
-
opencode = true
|
|
238
|
-
|
|
239
|
-
[tier0]
|
|
240
|
-
check_enabled = true # Windows POSIX-shell fix; set false to skip it
|
|
241
|
-
|
|
242
|
-
[generate]
|
|
243
|
-
marker_start = "<!-- agentenv-managed-start -->"
|
|
244
|
-
marker_end = "<!-- agentenv-managed-end -->"
|
|
245
|
-
files = ["AGENTS.md", "CLAUDE.md"]
|
|
246
|
-
|
|
247
|
-
# See "Optional integrations" below.
|
|
248
|
-
[integrations.superpowers]
|
|
249
|
-
enabled = false
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
Every field is optional — omit anything and it falls back to the documented
|
|
253
|
-
default. Run `agentenv setup` if you'd rather build this file
|
|
254
|
-
interactively than hand-write it; the review screen at the end shows you the
|
|
255
|
-
exact diff before anything is written.
|
|
256
|
-
|
|
257
|
-
## Supported agents
|
|
258
|
-
|
|
259
|
-
| Agent | Config key | Default |
|
|
260
|
-
|---|---|---|
|
|
261
|
-
| Claude Code | `claude_code` | on |
|
|
262
|
-
| OpenAI Codex CLI | `codex_cli` | on |
|
|
263
|
-
| GitHub Copilot | `copilot` | off |
|
|
264
|
-
| OpenCode | `opencode` | off |
|
|
265
|
-
| Gemini CLI | `gemini_cli` | off |
|
|
266
|
-
| Cursor | `cursor` | off |
|
|
267
|
-
| Windsurf | `windsurf` | off |
|
|
268
|
-
| Cline CLI | `cline` | off |
|
|
269
|
-
| Mistral Vibe | `vibe` | off |
|
|
270
|
-
|
|
271
|
-
`agentenv setup` detects installed agents and pre-checks them in the wizard.
|
|
272
|
-
Use `--agents` (with unattended `setup --yes`) when you need to select the
|
|
273
|
-
supported set explicitly without the wizard.
|
|
274
|
-
|
|
275
|
-
## Tool catalog
|
|
276
|
-
|
|
277
|
-
| Tier | Tools | Default |
|
|
278
|
-
|---|---|---|
|
|
279
|
-
| **1 — essential** | `ripgrep` (rg), `fd`, `jq`, `rtk` | always on |
|
|
280
|
-
| **2 — AI-coding value-add** | `ast_grep` (sg), `git_delta` (delta), `gh`, `difftastic` (difft) | on by default (pre-checked in the wizard) |
|
|
281
|
-
| **3 — power-user** | `yq`, `bat`, `eza`, `miller` (mlr), `tokei`, `hyperfine`, `fzf`, `just`, `watchexec`, `direnv`, `ripgrep_all` (rga), `zoxide`, `shellcheck`, `uv`, `xh`, `actionlint`, `gitleaks`, `gum`, `glow`, `jless`, `sd`, `tealdeer` (tldr), `duckdb`, `qsv` | off by default — toggle any in the wizard |
|
|
282
|
-
|
|
283
|
-
All of Tiers 1–3 install through mise the same way — no separate mechanism.
|
|
284
|
-
One tool (`tokei`) isn't in mise's registry on every platform; enabling it
|
|
285
|
-
prints a validation warning suggesting a `custom_tools` fallback entry
|
|
286
|
-
instead.
|
|
287
|
-
|
|
288
|
-
## Custom tools
|
|
289
|
-
|
|
290
|
-
Anything not in the catalog — an internal CLI, a niche tool, anything you
|
|
291
|
-
already have — goes in `[[custom_tools]]` (see the example above). Two
|
|
292
|
-
supported shapes:
|
|
293
|
-
|
|
294
|
-
- **Already installed:** `already_installed = true` plus whichever of
|
|
295
|
-
`path_windows`/`path_macos`/`path_linux` apply. `agentenv status` checks
|
|
296
|
-
the path for your current OS and flags it if missing.
|
|
297
|
-
- **Installable via mise:** `mise_source = "github:owner/repo"` (mise's
|
|
298
|
-
generic backend, works for most tools that publish GitHub release
|
|
299
|
-
archives) plus an optional `version` (defaults to `"latest"`).
|
|
300
|
-
|
|
301
|
-
Custom tools flow through the exact same "config changed → regenerate
|
|
302
|
-
`AGENTS.md`/hooks" pipeline as catalog tools.
|
|
303
|
-
|
|
304
|
-
## Optional integrations
|
|
305
|
-
|
|
306
|
-
Agentenv can optionally install third-party skill/methodology integrations
|
|
307
|
-
through their own documented native installers — never bundled, never
|
|
308
|
-
forked. The first is [Superpowers](https://github.com/obra/superpowers).
|
|
309
|
-
Superpowers itself now supports a long list of coding agents/harnesses, but
|
|
310
|
-
of agentenv's original four v1 targets, only Claude Code has a documented,
|
|
311
|
-
non-interactive, ref-pinnable installer today
|
|
312
|
-
(`claude plugin marketplace add` / `claude plugin install`). Copilot
|
|
313
|
-
documents a command of the same shape but no way to pin a ref, and Codex
|
|
314
|
-
CLI/OpenCode have no fixed non-interactive command at all — so those three
|
|
315
|
-
are always reported as `unsupported` in `agentenv status`, with manual
|
|
316
|
-
install hints, rather than run unpinned or unreviewed. See
|
|
317
|
-
[`docs/research/superpowers-install-mechanisms.md`](../../docs/research/superpowers-install-mechanisms.md)
|
|
318
|
-
for the per-agent findings and why.
|
|
319
|
-
|
|
320
|
-
Disabled by default. To opt in:
|
|
321
|
-
|
|
322
|
-
```toml
|
|
323
|
-
[integrations.superpowers]
|
|
324
|
-
enabled = true
|
|
325
|
-
source = "github:obra/superpowers"
|
|
326
|
-
ref = "v6.3.0"
|
|
327
|
-
scope = "user"
|
|
328
|
-
agents = ["claude_code"]
|
|
329
|
-
allow_hooks = true # Superpowers registers a SessionStart hook
|
|
330
|
-
allow_external_requests = false
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
`agentenv apply` installs/updates it idempotently for Claude Code (skipping
|
|
334
|
-
and warning if `allow_hooks` isn't explicitly `true`, since Superpowers
|
|
335
|
-
registers a `SessionStart` hook), and `agentenv status` reports an
|
|
336
|
-
**Integrations** section with enabled/disabled, source, ref, scope, and each
|
|
337
|
-
agent's installed/missing/unsupported/drifted state. The `setup` wizard
|
|
338
|
-
offers this as an explicit opt-in step (Step 6), showing the full
|
|
339
|
-
source/ref/scope/agents/hooks/external-request summary before installing
|
|
340
|
-
anything. Outside the wizard, `apply`/`status` always preserve whatever is
|
|
341
|
-
already configured.
|
|
342
|
-
|
|
343
|
-
`agentenv` also never touches GitHub credentials: `agentenv status` reports
|
|
344
|
-
`gh` authentication (authenticated/unauthenticated/unknown) via a read-only
|
|
345
|
-
`gh auth status --hostname github.com` probe; agentenv never runs
|
|
346
|
-
`gh auth login` or reads token values.
|
|
347
|
-
|
|
348
|
-
## Troubleshooting
|
|
349
|
-
|
|
350
|
-
- **`agentenv setup` exits immediately saying it's interactive** — you're
|
|
351
|
-
running it in a non-TTY context (CI, a piped script). Use `agentenv apply`
|
|
352
|
-
against a config file instead (or unattended `agentenv setup --yes`).
|
|
353
|
-
- **A tool shows as enabled in `agentenv status` but not found on PATH** —
|
|
354
|
-
run `agentenv apply` (it calls `mise install`), or check that mise itself
|
|
355
|
-
is installed and on PATH. `--skip-mise-install` intentionally leaves tools
|
|
356
|
-
uninstalled; don't use it for your real run.
|
|
357
|
-
- **Windows: agents aren't picking up ripgrep/fd/etc.** — check the "Tier 0
|
|
358
|
-
(shell)" block in `agentenv status`. It lists each enabled agent's shell
|
|
359
|
-
override state; if any show `✗` or it says "Fix: run `agentenv apply`",
|
|
360
|
-
re-run `agentenv apply`. If Git Bash truly isn't installed, install
|
|
361
|
-
[Git for Windows](https://gitforwindows.org) first.
|
|
362
|
-
- **A hook file has content you added by hand, and you're worried `apply`
|
|
363
|
-
will clobber it** — it won't. Regeneration only replaces the marker-block
|
|
364
|
-
section (`<!-- agentenv-managed-start -->` … `<!-- agentenv-managed-end
|
|
365
|
-
-->`); everything else in the file is left alone.
|
|
366
|
-
- **`agentenv apply` reports a validation error and refuses to run** — fix
|
|
367
|
-
the listed field in `agentenv.toml`; errors block `apply` deliberately
|
|
368
|
-
(warnings don't).
|
|
369
|
-
|
|
370
45
|
## Development
|
|
371
46
|
|
|
47
|
+
All commands run from this directory.
|
|
48
|
+
|
|
372
49
|
```sh
|
|
373
|
-
npm
|
|
374
|
-
npm
|
|
375
|
-
npm
|
|
376
|
-
npm run
|
|
377
|
-
npm run
|
|
378
|
-
npm run smoke
|
|
379
|
-
|
|
50
|
+
npm run build # tsc -> dist/
|
|
51
|
+
npm test # build + run every dist/**/*.test.js via node:test
|
|
52
|
+
npm run lint # eslint src --max-warnings 0
|
|
53
|
+
npm run format:check # prettier --check src
|
|
54
|
+
npm run smoke # stub mode — deterministic, no real mise/rtk
|
|
55
|
+
npm run smoke:real # real mise + rtk; installs the full catalog and runs the
|
|
56
|
+
# install -> uninstall roundtrip (destructive — removes
|
|
57
|
+
# every installed version of each catalog tool)
|
|
380
58
|
```
|
|
381
59
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
60
|
+
To target a single test file: `npm run build && node --test dist/config/schema.test.js`.
|
|
61
|
+
|
|
62
|
+
A new `*.test.ts` alongside the module it covers (mirroring `foo.ts` →
|
|
63
|
+
`foo.test.ts`) is picked up automatically by Node's recursive test discovery.
|
|
64
|
+
Tests use injectable dependencies for anything that would hit the real world
|
|
65
|
+
(e.g. `rtkInit`, `superpowersDeps`, `resolveBinary` — see `ApplyOptions` in
|
|
66
|
+
`src/commands/apply.ts`).
|
|
67
|
+
|
|
68
|
+
CI (`.github/workflows/ci.yml`) runs build/lint/format/test/smoke on a
|
|
69
|
+
windows/macos/ubuntu matrix, then a real-mise acceptance job on PRs and
|
|
70
|
+
`main`.
|
|
71
|
+
|
|
72
|
+
## Architecture
|
|
73
|
+
|
|
74
|
+
- `agentenv.toml` (schema: `src/config/schema.ts`) resolved from the project
|
|
75
|
+
root or `~/.config/agentenv/` (`src/config/scopes.ts`).
|
|
76
|
+
- `agentenv apply` (`src/commands/apply.ts`) is the single pipeline
|
|
77
|
+
`setup`/`configure`/`apply` funnel into: prerequisite check → Tier 0 Windows
|
|
78
|
+
shell fix → `mise.toml` + `mise install` + verify → marker-block
|
|
79
|
+
`AGENTS.md`/`CLAUDE.md` regeneration → per-agent adapters → optional
|
|
80
|
+
integrations.
|
|
81
|
+
- Per-agent adapters in `src/adapters/`: a hand-written `claude.ts` plus
|
|
82
|
+
rtk-delegating adapters for the rest (see
|
|
83
|
+
[`../../docs/research/rtk-init-delegation.md`](../../docs/research/rtk-init-delegation.md)).
|
|
84
|
+
- `src/integrations/` holds the second, parallel adapter contract for
|
|
85
|
+
third-party installers agentenv invokes but doesn't own (Superpowers).
|
|
86
|
+
- `agentenv status` (`src/commands/status.ts`) reports drift using the same
|
|
87
|
+
per-tool classification as `apply`'s verify step
|
|
88
|
+
(`toolAvailabilityClassification` in `src/toolchain/mise.ts`), so a tool
|
|
89
|
+
`apply` deliberately skips is never flagged as drift elsewhere.
|
|
90
|
+
|
|
91
|
+
For wiring in a new agent, see
|
|
92
|
+
[`../../docs/guides/adding-an-adapter.md`](../../docs/guides/adding-an-adapter.md);
|
|
93
|
+
for the docs index, [`../../docs/README.md`](../../docs/README.md).
|
|
387
94
|
|
|
388
95
|
## License
|
|
389
96
|
|
|
390
|
-
MIT
|
|
97
|
+
MIT
|
package/dist/adapters/base.d.ts
CHANGED
|
@@ -46,6 +46,15 @@ export declare abstract class BaseAdapter {
|
|
|
46
46
|
* Get the agent's configuration directory
|
|
47
47
|
*/
|
|
48
48
|
abstract getConfigDir(): string;
|
|
49
|
+
/**
|
|
50
|
+
* Absolute path of the user-level instruction file this agent reads (e.g.
|
|
51
|
+
* Claude Code reads ~/.claude/CLAUDE.md, most others ~/.config/<agent>/
|
|
52
|
+
* AGENTS.md). Used in user/global scope, where a project-root AGENTS.md
|
|
53
|
+
* would never be discovered. Subclasses override when the agent reads a
|
|
54
|
+
* differently-named file (Claude Code) or a non-configDir location
|
|
55
|
+
* (Copilot's ~/.copilot/copilot-instructions.md).
|
|
56
|
+
*/
|
|
57
|
+
getUserInstructionFile(): string;
|
|
49
58
|
/**
|
|
50
59
|
* Clean up any generated files
|
|
51
60
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/adapters/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/adapters/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qEAAqE;IACrE,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,8BAAsB,WAAW;IAC/B,SAAS,CAAC,MAAM,EAAE,aAAa,CAAC;gBAEpB,MAAM,EAAE,aAAa;IAIjC;;OAEG;IACH,QAAQ,CAAC,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC;IAE7C;;OAEG;IACH,QAAQ,CAAC,cAAc,IAAI,OAAO,CAAC,aAAa,CAAC;IAEjD;;OAEG;IACH,QAAQ,CAAC,OAAO,IAAI,MAAM;IAE1B;;OAEG;IACH,QAAQ,CAAC,WAAW,IAAI,OAAO;IAE/B;;OAEG;IACH,QAAQ,CAAC,YAAY,IAAI,MAAM;IAE/B;;;;;;;OAOG;IACH,sBAAsB,IAAI,MAAM;IAIhC;;OAEG;IACH,QAAQ,CAAC,OAAO,IAAI,OAAO,CAAC,aAAa,CAAC;IAE1C;;OAEG;IACH,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAGrC"}
|
package/dist/adapters/base.js
CHANGED
|
@@ -2,10 +2,22 @@
|
|
|
2
2
|
* Base Adapter Interface
|
|
3
3
|
* Defines the common interface for all agent adapters
|
|
4
4
|
*/
|
|
5
|
+
import * as path from 'path';
|
|
5
6
|
export class BaseAdapter {
|
|
6
7
|
constructor(config) {
|
|
7
8
|
this.config = config;
|
|
8
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Absolute path of the user-level instruction file this agent reads (e.g.
|
|
12
|
+
* Claude Code reads ~/.claude/CLAUDE.md, most others ~/.config/<agent>/
|
|
13
|
+
* AGENTS.md). Used in user/global scope, where a project-root AGENTS.md
|
|
14
|
+
* would never be discovered. Subclasses override when the agent reads a
|
|
15
|
+
* differently-named file (Claude Code) or a non-configDir location
|
|
16
|
+
* (Copilot's ~/.copilot/copilot-instructions.md).
|
|
17
|
+
*/
|
|
18
|
+
getUserInstructionFile() {
|
|
19
|
+
return path.join(this.getConfigDir(), 'AGENTS.md');
|
|
20
|
+
}
|
|
9
21
|
/**
|
|
10
22
|
* Get agent-specific environment variables
|
|
11
23
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/adapters/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/adapters/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AA0B7B,MAAM,OAAgB,WAAW;IAG/B,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IA2BD;;;;;;;OAOG;IACH,sBAAsB;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,WAAW,CAAC,CAAC;IACrD,CAAC;IAOD;;OAEG;IACH,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}
|
|
@@ -8,6 +8,7 @@ export declare class ClaudeCodeAdapter extends BaseAdapter {
|
|
|
8
8
|
constructor(config: AdapterConfig);
|
|
9
9
|
getName(): string;
|
|
10
10
|
getConfigDir(): string;
|
|
11
|
+
getUserInstructionFile(): string;
|
|
11
12
|
isInstalled(): boolean;
|
|
12
13
|
initialize(): Promise<AdapterResult>;
|
|
13
14
|
configureHooks(): Promise<AdapterResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/adapters/claude.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/adapters/claude.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAItE,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,OAAO,CAAC,SAAS,CAAS;gBAEd,MAAM,EAAE,aAAa;IAMjC,OAAO,IAAI,MAAM;IAIjB,YAAY,IAAI,MAAM;IAItB,sBAAsB,IAAI,MAAM;IAIhC,WAAW,IAAI,OAAO;IAIhB,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC;IA2CpC,cAAc,IAAI,OAAO,CAAC,aAAa,CAAC;IAqFxC,OAAO,IAAI,OAAO,CAAC,aAAa,CAAC;IAsDvC,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAWpC;;OAEG;IACH,OAAO,CAAC,uBAAuB;CAmBhC"}
|
package/dist/adapters/claude.js
CHANGED
|
@@ -6,6 +6,7 @@ import * as fs from 'fs';
|
|
|
6
6
|
import * as path from 'path';
|
|
7
7
|
import { BaseAdapter } from './base.js';
|
|
8
8
|
import { isAgentInstalled } from './detect.js';
|
|
9
|
+
import { writeFileWithRetry } from '../utils/fs-retry.js';
|
|
9
10
|
export class ClaudeCodeAdapter extends BaseAdapter {
|
|
10
11
|
constructor(config) {
|
|
11
12
|
super(config);
|
|
@@ -18,6 +19,9 @@ export class ClaudeCodeAdapter extends BaseAdapter {
|
|
|
18
19
|
getConfigDir() {
|
|
19
20
|
return this.configDir;
|
|
20
21
|
}
|
|
22
|
+
getUserInstructionFile() {
|
|
23
|
+
return path.join(this.configDir, 'CLAUDE.md');
|
|
24
|
+
}
|
|
21
25
|
isInstalled() {
|
|
22
26
|
return isAgentInstalled('claude_code');
|
|
23
27
|
}
|
|
@@ -140,20 +144,27 @@ export class ClaudeCodeAdapter extends BaseAdapter {
|
|
|
140
144
|
const settingsPath = path.join(this.configDir, 'settings.json');
|
|
141
145
|
try {
|
|
142
146
|
if (fs.existsSync(settingsPath)) {
|
|
143
|
-
let settings
|
|
147
|
+
let settings;
|
|
144
148
|
const content = fs.readFileSync(settingsPath, 'utf-8');
|
|
145
149
|
try {
|
|
146
150
|
settings = JSON.parse(content);
|
|
147
151
|
}
|
|
148
152
|
catch {
|
|
153
|
+
result.success = false;
|
|
154
|
+
result.errors.push(`Failed to cleanup Claude Code: settings.json is not valid JSON at ${settingsPath}`);
|
|
155
|
+
result.message = 'Claude Code adapter cleanup failed';
|
|
149
156
|
return result;
|
|
150
157
|
}
|
|
151
|
-
// Remove RTK hooks
|
|
158
|
+
// Remove RTK hooks, but only rewrite when the filter actually removed
|
|
159
|
+
// something (a second cleanup is a no-op and must not churn the file).
|
|
152
160
|
if (Array.isArray(settings.hooks?.PreToolUse)) {
|
|
161
|
+
const before = settings.hooks.PreToolUse.length;
|
|
153
162
|
settings.hooks.PreToolUse = settings.hooks.PreToolUse.filter((entry) => !(entry.matcher === 'Bash' &&
|
|
154
163
|
entry.hooks?.some((hook) => hook.command === 'rtk hook claude')));
|
|
155
|
-
|
|
156
|
-
|
|
164
|
+
if (settings.hooks.PreToolUse.length !== before) {
|
|
165
|
+
writeFileWithRetry(settingsPath, JSON.stringify(settings, null, 2));
|
|
166
|
+
result.filesModified.push(settingsPath);
|
|
167
|
+
}
|
|
157
168
|
}
|
|
158
169
|
}
|
|
159
170
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/adapters/claude.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAgC,MAAM,WAAW,CAAC;AACtE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AAC;QACzB,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;OAEG;IACK,uBAAuB;QAC7B,OAAO;;;;;;;;;;;;;;;;CAgBV,CAAC;IACA,CAAC;CACF"}
|
|
@@ -10,6 +10,7 @@ export declare class CopilotAdapter extends BaseAdapter {
|
|
|
10
10
|
constructor(config: AdapterConfig);
|
|
11
11
|
getName(): string;
|
|
12
12
|
getConfigDir(): string;
|
|
13
|
+
getUserInstructionFile(): string;
|
|
13
14
|
isInstalled(): boolean;
|
|
14
15
|
initialize(): Promise<AdapterResult>;
|
|
15
16
|
configureHooks(): Promise<AdapterResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copilot.d.ts","sourceRoot":"","sources":["../../src/adapters/copilot.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAItE,qBAAa,cAAe,SAAQ,WAAW;IAC7C,OAAO,CAAC,SAAS,CAAS;gBAEd,MAAM,EAAE,aAAa;IAMjC,OAAO,IAAI,MAAM;IAIjB,YAAY,IAAI,MAAM;IAItB,WAAW,IAAI,OAAO;IAIhB,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC;IAgCpC,cAAc,IAAI,OAAO,CAAC,aAAa,CAAC;IA+BxC,OAAO,IAAI,OAAO,CAAC,aAAa,CAAC;IAWvC,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAUpC,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,kBAAkB;CAG3B"}
|
|
1
|
+
{"version":3,"file":"copilot.d.ts","sourceRoot":"","sources":["../../src/adapters/copilot.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAItE,qBAAa,cAAe,SAAQ,WAAW;IAC7C,OAAO,CAAC,SAAS,CAAS;gBAEd,MAAM,EAAE,aAAa;IAMjC,OAAO,IAAI,MAAM;IAIjB,YAAY,IAAI,MAAM;IAItB,sBAAsB,IAAI,MAAM;IAKhC,WAAW,IAAI,OAAO;IAIhB,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC;IAgCpC,cAAc,IAAI,OAAO,CAAC,aAAa,CAAC;IA+BxC,OAAO,IAAI,OAAO,CAAC,aAAa,CAAC;IAWvC,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAUpC,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,kBAAkB;CAG3B"}
|
package/dist/adapters/copilot.js
CHANGED
|
@@ -21,6 +21,10 @@ export class CopilotAdapter extends BaseAdapter {
|
|
|
21
21
|
getConfigDir() {
|
|
22
22
|
return this.configDir;
|
|
23
23
|
}
|
|
24
|
+
getUserInstructionFile() {
|
|
25
|
+
const home = process.env.HOME || process.env.USERPROFILE || '';
|
|
26
|
+
return path.join(home, '.copilot', 'copilot-instructions.md');
|
|
27
|
+
}
|
|
24
28
|
isInstalled() {
|
|
25
29
|
return isAgentInstalled('copilot');
|
|
26
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copilot.js","sourceRoot":"","sources":["../../src/adapters/copilot.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAgC,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjF,MAAM,OAAO,cAAe,SAAQ,WAAW;IAG7C,YAAY,MAAqB;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAA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