@antomanc/aginit 0.2.0 → 0.4.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 +21 -0
- package/README.md +94 -67
- package/THIRD_PARTY_NOTICES.md +6 -0
- package/dist/adapters/agent-browser.d.ts +54 -0
- package/dist/adapters/agent-browser.d.ts.map +1 -0
- package/dist/adapters/agent-browser.js +122 -0
- package/dist/adapters/agent-browser.js.map +1 -0
- package/dist/adapters/agents-md.d.ts +12 -0
- package/dist/adapters/agents-md.d.ts.map +1 -1
- package/dist/adapters/agents-md.js +31 -1
- package/dist/adapters/agents-md.js.map +1 -1
- package/dist/adapters/graft.d.ts +1 -0
- package/dist/adapters/graft.d.ts.map +1 -1
- package/dist/adapters/graft.js +5 -3
- package/dist/adapters/graft.js.map +1 -1
- package/dist/adapters/skills.d.ts +20 -1
- package/dist/adapters/skills.d.ts.map +1 -1
- package/dist/adapters/skills.js +38 -1
- package/dist/adapters/skills.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +108 -2
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +8 -4
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/new.d.ts.map +1 -1
- package/dist/cli/new.js +25 -6
- package/dist/cli/new.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +18 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/schema.d.ts +5 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/config/validation.d.ts.map +1 -1
- package/dist/config/validation.js +2 -0
- package/dist/config/validation.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +14 -7
- package/src/adapters/agent-browser.ts +162 -0
- package/src/adapters/agents-md.ts +37 -1
- package/src/adapters/graft.ts +6 -4
- package/src/adapters/skills.ts +46 -2
- package/src/cli/doctor.ts +128 -2
- package/src/cli/main.ts +8 -4
- package/src/cli/new.ts +28 -6
- package/src/config/defaults.ts +18 -3
- package/src/config/schema.ts +5 -0
- package/src/config/validation.ts +2 -0
- package/src/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0 — 2026-10-11
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Claude Code support. Skills are now installed for the `claude-code` agent too, so the Skills CLI links each one from `.agents/skills/` into `.claude/skills/`, where Claude Code finds it as `/name`. aginit writes a one-line `CLAUDE.md` (`@AGENTS.md`) when none exists, and wires Graft for Claude Code (`graft init --agents ... claude`). See `docs/adr/0002-claude-code-skills-and-instructions.md`.
|
|
8
|
+
- New `agents.claudeCode` config flag, `true` by default. Configs without the flag keep loading and count as enabled. Set it to `false` to opt out.
|
|
9
|
+
- `aginit update` links already-installed skills for Claude Code when they're missing from `.claude/skills/`, and adds the `CLAUDE.md` import.
|
|
10
|
+
- `aginit doctor` reports skills missing from `.claude/skills/` and a `CLAUDE.md` that doesn't import `AGENTS.md`.
|
|
11
|
+
|
|
12
|
+
## 0.3.0 — 2026-10-10
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Web projects no longer ship an agent-browser skill stub without its runtime: `aginit init` now installs the `agent-browser` CLI (`npm i -g agent-browser`) and its browser binaries (`agent-browser install`) when the skill is configured or already on disk, and reports a failed provisioning as an incomplete setup (#4).
|
|
17
|
+
- `aginit init` and `aginit doctor` detect the Linux restriction that blocks Chrome's sandbox (`kernel.apparmor_restrict_unprivileged_userns=1`) and report the persisted sysctl fix plus the narrower `--no-sandbox` alternative instead of failing later with `No usable sandbox!`.
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- The [ponytail](https://github.com/DietrichGebert/ponytail) skill installs by default in every preset, and AGENTS.md points agents to it for the smallest complete change (#5). Existing configs keep their skill sources as written; add `dietrichgebert/ponytail` to `skills.sources` to opt in.
|
|
22
|
+
- `aginit doctor` verifies the agent-browser runtime when the project ships the skill: CLI presence, upstream `agent-browser doctor --quick --offline --json` findings, and Chrome sandbox prerequisites.
|
|
23
|
+
|
|
3
24
|
## 0.2.0 — 2026-10-09
|
|
4
25
|
|
|
5
26
|
### Breaking
|
package/README.md
CHANGED
|
@@ -1,103 +1,130 @@
|
|
|
1
|
-
#
|
|
1
|
+
# aginit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Set up a new or existing project for AI coding agents with one command.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
aginit gives a repo what agents need to do good work from the first session: an `AGENTS.md`
|
|
6
|
+
that explains the project, a curated set of engineering skills, a codebase graph so agents
|
|
7
|
+
read less and understand more, and a test harness they can actually run. It wires up
|
|
8
|
+
upstream tools instead of reimplementing them.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx @antomanc/aginit
|
|
12
|
+
```
|
|
6
13
|
|
|
7
14
|
[](https://github.com/antomanc/aginit/actions)
|
|
8
|
-
[](LICENSE)
|
|
9
15
|
[](https://www.npmjs.com/package/@antomanc/aginit)
|
|
16
|
+
[](LICENSE)
|
|
10
17
|
|
|
11
|
-
|
|
18
|
+
<p align="center"><img src="docs/assets/demo.gif" alt="aginit wizard creating a CLI project with AGENTS.md, skills and a Graft codebase graph" width="720"></p>
|
|
12
19
|
|
|
13
|
-
|
|
20
|
+
> **Beta.** Expect flags and defaults to change before 1.0.
|
|
14
21
|
|
|
15
|
-
|
|
22
|
+
## Why
|
|
16
23
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
Agents in a fresh repo usually start out blind:
|
|
25
|
+
- no instructions, so they guess at the build, test and package manager commands
|
|
26
|
+
- no shared workflow for specs, TDD, code review or bug hunting
|
|
27
|
+
- grep-and-read-everything to find their way around the code
|
|
28
|
+
- no test runner, so "it works" is never checked
|
|
29
|
+
- a different setup in every repo, done by hand
|
|
30
|
+
|
|
31
|
+
aginit sets all of this up the same way every time, and you can re-run it whenever you want.
|
|
32
|
+
|
|
33
|
+
## What you get
|
|
22
34
|
|
|
23
|
-
|
|
35
|
+
| | |
|
|
36
|
+
|---|---|
|
|
37
|
+
| **Instructions** | `AGENTS.md` with the project's real commands, invariants and a first-session playbook, shared by Antigravity, Codex and any agent that reads `AGENTS.md`, plus a one-line `CLAUDE.md` (`@AGENTS.md`) so Claude Code loads it too |
|
|
38
|
+
| **Skills** | All 27 stable [Matt Pocock skills](https://github.com/mattpocock/skills) (`tdd`, `code-review`, `diagnosing-bugs`, `to-spec`, `to-tickets`, `implement-spec`, `pr`...) plus [humanizer](https://github.com/blader/humanizer) and [ponytail](https://github.com/DietrichGebert/ponytail), installed in `.agents/skills/` via the [Skills CLI](https://github.com/vercel-labs/skills) and linked into `.claude/skills/` for Claude Code |
|
|
39
|
+
| **Codebase graph** | [Graft](https://www.npmjs.com/package/@nanonets/graft): `graft map` and `graft ask` give agents the relevant code spans before they grep |
|
|
40
|
+
| **Test tooling** | Vitest for TypeScript projects, plus Playwright when a web framework is selected |
|
|
41
|
+
| **Web extras** | [Impeccable](https://github.com/pbakaus/impeccable) for UI design and [agent-browser](https://github.com/vercel-labs/agent-browser) for visual QA, with its CLI and browser binaries installed so it works out of the box |
|
|
42
|
+
| **Scaffolding** | Official Vite and Next.js scaffolders, or a Commander-based TypeScript CLI |
|
|
43
|
+
| **Maintenance** | `aginit doctor` checks readiness; `aginit update` refreshes skills and the graph |
|
|
44
|
+
|
|
45
|
+
## Quick start
|
|
46
|
+
|
|
47
|
+
Requires Node.js 22.12+, Git and internet access.
|
|
24
48
|
|
|
25
49
|
```bash
|
|
26
|
-
|
|
27
|
-
aginit
|
|
50
|
+
npx @antomanc/aginit # interactive wizard
|
|
51
|
+
pnpm dlx @antomanc/aginit # same, with pnpm
|
|
52
|
+
npm install -g @antomanc/aginit # or install globally and run `aginit`
|
|
28
53
|
```
|
|
29
54
|
|
|
30
|
-
The wizard
|
|
55
|
+
The wizard creates a new project or initializes the current directory, then asks for a
|
|
56
|
+
preset, framework and package manager. Existing projects keep the package manager they
|
|
57
|
+
already use.
|
|
31
58
|
|
|
32
|
-
Graft
|
|
59
|
+
Graft is installed separately (or skip it with `--no-graft`):
|
|
33
60
|
|
|
34
61
|
```bash
|
|
35
62
|
npm install -g @nanonets/graft
|
|
36
63
|
```
|
|
37
64
|
|
|
38
|
-
##
|
|
65
|
+
## Commands
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
aginit new [name] Create a new project
|
|
69
|
+
aginit init Add or update agent setup in the current directory
|
|
70
|
+
aginit doctor Check Node.js, package manager, Git, Graft, Codex, Skills CLI, agent-browser, Claude Code wiring and config
|
|
71
|
+
aginit update Update installed skills and rebuild the Graft index
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Useful flags: `--preset web|cli|generic`, `--framework none|vite|next|existing`,
|
|
75
|
+
`--package-manager pnpm|npm|yarn|bun`, `--dry-run`, `--no-skills`, `--no-graft`, `--no-git`.
|
|
39
76
|
|
|
40
77
|
```bash
|
|
41
78
|
aginit new my-app --preset web --framework vite
|
|
42
79
|
aginit new my-app --preset web --framework next --package-manager npm
|
|
43
80
|
aginit new my-cli --preset cli
|
|
44
|
-
aginit
|
|
45
|
-
|
|
46
|
-
# Run inside an existing project
|
|
47
|
-
aginit init --preset web
|
|
48
|
-
|
|
49
|
-
# Preview changes
|
|
50
|
-
aginit init --dry-run
|
|
51
|
-
aginit new my-app --preset web --dry-run
|
|
81
|
+
aginit init --preset generic --dry-run
|
|
52
82
|
```
|
|
53
83
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### Presets
|
|
84
|
+
## Presets
|
|
57
85
|
|
|
58
86
|
| Preset | Setup |
|
|
59
87
|
| --- | --- |
|
|
60
88
|
| `web` | TypeScript and Vitest, with optional Vite or Next.js scaffolding. Playwright is added when a web framework is selected. |
|
|
61
|
-
| `cli` | Node.js/TypeScript CLI with Commander, Picocolors
|
|
62
|
-
| `generic` | Git,
|
|
63
|
-
|
|
64
|
-
The web preset supports `--framework none` (default), `vite`, `next`, or `existing`. Vite and Next.js use their official scaffolders. `none` creates a TypeScript baseline without a bundler or browser test configuration.
|
|
89
|
+
| `cli` | Node.js/TypeScript CLI with Commander, Picocolors and Vitest. |
|
|
90
|
+
| `generic` | Git, `AGENTS.md`, skills and Graft. Leaves an existing `package.json` untouched. |
|
|
65
91
|
|
|
66
|
-
|
|
92
|
+
The web preset's `--framework none` (default) creates a TypeScript baseline without a bundler
|
|
93
|
+
or browser tests. `existing` keeps the framework you already have.
|
|
67
94
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
- `aginit.config.json`: saved preset, framework, package manager, agents, and skill sources.
|
|
72
|
-
|
|
73
|
-
The standard skill set includes the spec and tickets workflow (`to-spec`, `to-tickets`, `implement-spec`); there is no workflow selector to run. Skills from Matt Pocock's `misc` and `in-progress` buckets are left out. Use `--no-skills` to skip skill installation.
|
|
95
|
+
Your choices (preset, framework, package manager, agents, skill sources) are saved in
|
|
96
|
+
`aginit.config.json`, so the next run starts from them. The package manager is also passed
|
|
97
|
+
to framework scaffolders.
|
|
74
98
|
|
|
75
99
|
## Existing projects
|
|
76
100
|
|
|
77
|
-
`aginit init`
|
|
78
|
-
|
|
79
|
-
|
|
101
|
+
`aginit init` never replaces application code. It keeps your source, custom scripts,
|
|
102
|
+
dependency versions and test configs, and only adds what's missing. If you already use a
|
|
103
|
+
different test runner, aginit adds a separate `test:unit` script instead of touching yours.
|
|
80
104
|
|
|
81
|
-
|
|
105
|
+
An existing `AGENTS.md` is preserved; aginit only appends its bootstrap section. Configs from
|
|
106
|
+
older versions that used the retired default skill selection are upgraded to the current
|
|
107
|
+
set, while a skill list you narrowed by hand stays as written.
|
|
82
108
|
|
|
83
|
-
##
|
|
109
|
+
## Design
|
|
84
110
|
|
|
85
|
-
|
|
86
|
-
aginit
|
|
87
|
-
|
|
88
|
-
|
|
111
|
+
- **Orchestrates, doesn't vendor.** Skills, Graft, Vite, Next.js and Playwright come from
|
|
112
|
+
their upstream tools. aginit picks good defaults and runs them.
|
|
113
|
+
- **Idempotent.** Re-running the same init is safe; explicit options override saved settings.
|
|
114
|
+
- **Honest dry-run.** `--dry-run` lists every planned operation without writing files or
|
|
115
|
+
downloading tools. (Files produced by upstream scaffolders are only known after they run.)
|
|
116
|
+
- **Fails loudly.** Invalid config is reported before any file changes. A failed scaffold
|
|
117
|
+
stops the command; missing Graft, a failed skill install or a failed agent-browser setup
|
|
118
|
+
exits nonzero and keeps the scaffold, so you can fix it and re-run `aginit init`.
|
|
119
|
+
- **Hands off your system.** If the Linux kernel blocks Chrome's sandbox (`No usable
|
|
120
|
+
sandbox!`), aginit tells you the sysctl fix and the narrower `--no-sandbox` option. It
|
|
121
|
+
never changes system settings for you.
|
|
89
122
|
|
|
90
|
-
|
|
123
|
+
## Related
|
|
91
124
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
- Rerunning the same initialization is idempotent. Manifest additions and explicit configuration changes are applied without replacing application code.
|
|
97
|
-
- Framework scaffold failures stop the command.
|
|
98
|
-
- Missing Graft or failed skill installation returns a nonzero exit status. The scaffold is retained so you can fix the prerequisite and rerun `aginit init`.
|
|
99
|
-
- `--dry-run` lists planned operations without writing files or downloading framework tools. Files produced by upstream scaffolders are only known after they run.
|
|
100
|
-
- Playwright's starter test is skipped until you add an application URL and assertions. Generated test harnesses still need application-specific tests.
|
|
125
|
+
[agbox](https://github.com/antomanc/agbox) prepares the *machine* for AI agents (toolchains,
|
|
126
|
+
Docker, Playwright, Tailscale, snapshots). aginit prepares the *project*. Use them together:
|
|
127
|
+
`agbox setup`, then `npx @antomanc/aginit` in a new project.
|
|
101
128
|
|
|
102
129
|
## Development
|
|
103
130
|
|
|
@@ -106,17 +133,17 @@ pnpm install --frozen-lockfile
|
|
|
106
133
|
pnpm check # typecheck (src + tests), tests, build, dependency audit
|
|
107
134
|
pnpm check:skills # compare the standard skill set with upstream (after pnpm build)
|
|
108
135
|
pnpm smoke # verify projects generated from the packed tarball
|
|
109
|
-
pnpm smoke --frameworks # also scaffold, test, build
|
|
110
|
-
pnpm smoke --package-managers # verify pnpm, Yarn
|
|
111
|
-
npm pack --dry-run
|
|
136
|
+
pnpm smoke --frameworks # also scaffold, test, build and serve Vite and Next.js
|
|
137
|
+
pnpm smoke --package-managers # verify pnpm, Yarn and Bun consumer commands
|
|
112
138
|
```
|
|
113
139
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
140
|
+
`npm publish` runs `pnpm check` and the base smoke test first. See
|
|
141
|
+
[CHANGELOG.md](CHANGELOG.md), [CONTRIBUTING.md](CONTRIBUTING.md) and
|
|
142
|
+
[SECURITY.md](SECURITY.md).
|
|
117
143
|
|
|
118
144
|
## License
|
|
119
145
|
|
|
120
|
-
[MIT](LICENSE) © 2026 Antonio
|
|
146
|
+
[MIT](LICENSE) © 2026 Antonio Mancini
|
|
121
147
|
|
|
122
|
-
Upstream tools and skills
|
|
148
|
+
Upstream tools and skills keep their own licenses; aginit does not vendor or relicense them.
|
|
149
|
+
See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -24,6 +24,12 @@ Each integrated upstream tool is governed by its respective authors and licenses
|
|
|
24
24
|
- Author: Blake Robbins / Humanizer contributors
|
|
25
25
|
- Repository: https://github.com/blader/humanizer
|
|
26
26
|
|
|
27
|
+
- **Ponytail**
|
|
28
|
+
- Project: Agent skill for the smallest complete change and less over-engineering
|
|
29
|
+
- Author: Dietrich Gebert
|
|
30
|
+
- License: MIT
|
|
31
|
+
- Repository: https://github.com/DietrichGebert/ponytail
|
|
32
|
+
|
|
27
33
|
- **Impeccable**
|
|
28
34
|
- Project: Frontend craft & design system review skill
|
|
29
35
|
- Author: Peter Bak-Hansen
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { SkillSourceConfig } from '../config/schema.js';
|
|
2
|
+
/**
|
|
3
|
+
* Whether a configured skill source will install the agent-browser skill stub
|
|
4
|
+
* whose instructions assume the `agent-browser` CLI exists.
|
|
5
|
+
*/
|
|
6
|
+
export declare function agentBrowserConfigured(sources: SkillSourceConfig[]): boolean;
|
|
7
|
+
/** Whether the agent-browser skill stub is already on disk. */
|
|
8
|
+
export declare function agentBrowserStubInstalled(targetDir: string): boolean;
|
|
9
|
+
export interface UsernsRestriction {
|
|
10
|
+
sysctl: string;
|
|
11
|
+
value: string;
|
|
12
|
+
fixValue: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Detect the Linux sysctls that block Chrome's sandbox when set to their
|
|
16
|
+
* restrictive value: Chrome's renderer sandbox runs on unprivileged user
|
|
17
|
+
* namespaces, so agent-browser launches die with "No usable sandbox!".
|
|
18
|
+
*
|
|
19
|
+
* Returns null when the kernel does not expose the knobs (other distros,
|
|
20
|
+
* macOS, Windows) or none of them is restrictive.
|
|
21
|
+
*/
|
|
22
|
+
export declare function findUsernsRestriction(procRoot?: string): UsernsRestriction | null;
|
|
23
|
+
export interface AgentBrowserSetupOptions {
|
|
24
|
+
dryRun?: boolean;
|
|
25
|
+
silent?: boolean;
|
|
26
|
+
/** Working directory for the provisioning commands (defaults to cwd). */
|
|
27
|
+
cwd?: string;
|
|
28
|
+
/** Root of the proc filesystem; overridable for tests. */
|
|
29
|
+
procRoot?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Provision the runtime the agent-browser skill stub depends on: the globally
|
|
33
|
+
* installed CLI (`npm i -g agent-browser`, matching the skill's own install
|
|
34
|
+
* line — npm ships with Node and works regardless of the project's package
|
|
35
|
+
* manager) and its browser binaries (`agent-browser install`, idempotent).
|
|
36
|
+
*
|
|
37
|
+
* A blocked Chrome sandbox is reported as a warning only: it needs a system
|
|
38
|
+
* change aginit must not make on the user's behalf. Returns false when the
|
|
39
|
+
* CLI or the browser binaries could not be provisioned.
|
|
40
|
+
*/
|
|
41
|
+
export declare function setupAgentBrowser(options?: AgentBrowserSetupOptions): Promise<boolean>;
|
|
42
|
+
export interface AgentBrowserDiagnostic {
|
|
43
|
+
message: string;
|
|
44
|
+
fix?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Run upstream's own diagnostics (`agent-browser doctor --quick --offline
|
|
48
|
+
* --json`) and return the failing checks, so aginit reports browser health
|
|
49
|
+
* instead of reimplementing it. Returns null when the report cannot be
|
|
50
|
+
* parsed (older CLI, unexpected output) — callers should then skip the check
|
|
51
|
+
* rather than guess.
|
|
52
|
+
*/
|
|
53
|
+
export declare function runAgentBrowserDiagnostics(): Promise<AgentBrowserDiagnostic[] | null>;
|
|
54
|
+
//# sourceMappingURL=agent-browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-browser.d.ts","sourceRoot":"","sources":["../../src/adapters/agent-browser.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAMxD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAO5E;AAED,+DAA+D;AAC/D,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEpE;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,SAAU,GAAG,iBAAiB,GAAG,IAAI,CAYlF;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,GAAE,wBAA6B,GAAG,OAAO,CAAC,OAAO,CAAC,CAiDhG;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;GAMG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,sBAAsB,EAAE,GAAG,IAAI,CAAC,CAuB3F"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { fileExists, readTextFile } from '../utils/fs.js';
|
|
3
|
+
import { commandExists, runExecutable } from '../utils/shell.js';
|
|
4
|
+
import { logger } from '../utils/logger.js';
|
|
5
|
+
const AGENT_BROWSER_SKILL = 'agent-browser';
|
|
6
|
+
const AGENT_BROWSER_CLI = 'agent-browser';
|
|
7
|
+
const AGENT_BROWSER_PACKAGE = 'vercel-labs/agent-browser';
|
|
8
|
+
/**
|
|
9
|
+
* Whether a configured skill source will install the agent-browser skill stub
|
|
10
|
+
* whose instructions assume the `agent-browser` CLI exists.
|
|
11
|
+
*/
|
|
12
|
+
export function agentBrowserConfigured(sources) {
|
|
13
|
+
return sources.some((source) => source.skills.includes(AGENT_BROWSER_SKILL) ||
|
|
14
|
+
(source.package === AGENT_BROWSER_PACKAGE &&
|
|
15
|
+
(source.skills.length === 0 || source.skills.includes('*'))));
|
|
16
|
+
}
|
|
17
|
+
/** Whether the agent-browser skill stub is already on disk. */
|
|
18
|
+
export function agentBrowserStubInstalled(targetDir) {
|
|
19
|
+
return fileExists(path.join(targetDir, '.agents', 'skills', AGENT_BROWSER_SKILL, 'SKILL.md'));
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Detect the Linux sysctls that block Chrome's sandbox when set to their
|
|
23
|
+
* restrictive value: Chrome's renderer sandbox runs on unprivileged user
|
|
24
|
+
* namespaces, so agent-browser launches die with "No usable sandbox!".
|
|
25
|
+
*
|
|
26
|
+
* Returns null when the kernel does not expose the knobs (other distros,
|
|
27
|
+
* macOS, Windows) or none of them is restrictive.
|
|
28
|
+
*/
|
|
29
|
+
export function findUsernsRestriction(procRoot = '/proc') {
|
|
30
|
+
const knobs = [
|
|
31
|
+
['kernel.apparmor_restrict_unprivileged_userns', '1', '0'],
|
|
32
|
+
['kernel.unprivileged_userns_clone', '0', '1']
|
|
33
|
+
];
|
|
34
|
+
for (const [sysctl, blockingValue, fixValue] of knobs) {
|
|
35
|
+
const raw = readTextFile(path.join(procRoot, 'sys', ...sysctl.split('.')));
|
|
36
|
+
if (raw !== null && raw.trim() === blockingValue) {
|
|
37
|
+
return { sysctl, value: raw.trim(), fixValue };
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Provision the runtime the agent-browser skill stub depends on: the globally
|
|
44
|
+
* installed CLI (`npm i -g agent-browser`, matching the skill's own install
|
|
45
|
+
* line — npm ships with Node and works regardless of the project's package
|
|
46
|
+
* manager) and its browser binaries (`agent-browser install`, idempotent).
|
|
47
|
+
*
|
|
48
|
+
* A blocked Chrome sandbox is reported as a warning only: it needs a system
|
|
49
|
+
* change aginit must not make on the user's behalf. Returns false when the
|
|
50
|
+
* CLI or the browser binaries could not be provisioned.
|
|
51
|
+
*/
|
|
52
|
+
export async function setupAgentBrowser(options = {}) {
|
|
53
|
+
const { dryRun = false, silent = false, cwd = process.cwd(), procRoot = '/proc' } = options;
|
|
54
|
+
const cliPresent = await commandExists('agent-browser');
|
|
55
|
+
if (!cliPresent) {
|
|
56
|
+
if (!silent)
|
|
57
|
+
logger.dim('Installing agent-browser CLI globally (npm -g)...');
|
|
58
|
+
const cli = await runExecutable('npm', ['install', '-g', AGENT_BROWSER_SKILL], {
|
|
59
|
+
cwd,
|
|
60
|
+
dryRun,
|
|
61
|
+
silent: true,
|
|
62
|
+
timeout: 600_000
|
|
63
|
+
});
|
|
64
|
+
if (!cli.ok && !dryRun) {
|
|
65
|
+
if (!silent) {
|
|
66
|
+
logger.warn(`Failed installing agent-browser CLI: ${cli.stderr || cli.stdout}`);
|
|
67
|
+
logger.dim(' Install it manually: npm i -g agent-browser && agent-browser install');
|
|
68
|
+
}
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (!silent)
|
|
73
|
+
logger.dim('Ensuring agent-browser browser binaries...');
|
|
74
|
+
const browser = await runExecutable(AGENT_BROWSER_CLI, ['install'], {
|
|
75
|
+
cwd,
|
|
76
|
+
dryRun,
|
|
77
|
+
silent: true,
|
|
78
|
+
timeout: 600_000
|
|
79
|
+
});
|
|
80
|
+
if (!browser.ok && !dryRun) {
|
|
81
|
+
if (!silent) {
|
|
82
|
+
logger.warn(`Failed downloading agent-browser browsers: ${browser.stderr || browser.stdout}`);
|
|
83
|
+
logger.dim(' Retry manually: agent-browser install');
|
|
84
|
+
}
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
const restriction = findUsernsRestriction(procRoot);
|
|
88
|
+
if (restriction && !silent) {
|
|
89
|
+
logger.warn(`Chrome's sandbox is blocked: ${restriction.sysctl}=${restriction.value} restricts unprivileged user namespaces, so agent-browser launches fail with "No usable sandbox!".`);
|
|
90
|
+
logger.dim(` → Fix (machine-wide): echo '${restriction.sysctl}=${restriction.fixValue}' | sudo tee /etc/sysctl.d/99-agent-browser-userns.conf && sudo sysctl --system`);
|
|
91
|
+
logger.dim(' → Narrower option: pass --args "--no-sandbox" to agent-browser for that launch (Chrome sandbox disabled for that session)');
|
|
92
|
+
}
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Run upstream's own diagnostics (`agent-browser doctor --quick --offline
|
|
97
|
+
* --json`) and return the failing checks, so aginit reports browser health
|
|
98
|
+
* instead of reimplementing it. Returns null when the report cannot be
|
|
99
|
+
* parsed (older CLI, unexpected output) — callers should then skip the check
|
|
100
|
+
* rather than guess.
|
|
101
|
+
*/
|
|
102
|
+
export async function runAgentBrowserDiagnostics() {
|
|
103
|
+
const res = await runExecutable(AGENT_BROWSER_CLI, ['doctor', '--quick', '--offline', '--json'], {
|
|
104
|
+
silent: true,
|
|
105
|
+
timeout: 60_000
|
|
106
|
+
});
|
|
107
|
+
try {
|
|
108
|
+
const parsed = JSON.parse(res.stdout);
|
|
109
|
+
if (!Array.isArray(parsed.checks))
|
|
110
|
+
return null;
|
|
111
|
+
return parsed.checks
|
|
112
|
+
.filter((check) => check?.status === 'fail')
|
|
113
|
+
.map((check) => ({
|
|
114
|
+
message: String(check?.message || 'check failed'),
|
|
115
|
+
...(check?.fix ? { fix: String(check.fix) } : {})
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=agent-browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-browser.js","sourceRoot":"","sources":["../../src/adapters/agent-browser.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG5C,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAC5C,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAC1C,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AAE1D;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAA4B;IACjE,OAAO,OAAO,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EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAClD,CAAC,CAAC,CAAC;IACR,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -5,4 +5,16 @@ export declare function setupAgentsMarkdown(targetDir: string, config: AginitCon
|
|
|
5
5
|
dryRun?: boolean;
|
|
6
6
|
silent?: boolean;
|
|
7
7
|
}): boolean;
|
|
8
|
+
export declare const CLAUDE_AGENTS_IMPORT = "@AGENTS.md";
|
|
9
|
+
/**
|
|
10
|
+
* Point Claude Code at AGENTS.md through a one-line `@AGENTS.md` import. Recent
|
|
11
|
+
* Claude Code reads AGENTS.md on its own, but only without a CLAUDE.md and not
|
|
12
|
+
* in every session; the import works everywhere and never loads it twice.
|
|
13
|
+
* An existing CLAUDE.md is left alone (doctor reports a missing import).
|
|
14
|
+
*/
|
|
15
|
+
export declare function setupClaudeMarkdown(targetDir: string, options?: {
|
|
16
|
+
dryRun?: boolean;
|
|
17
|
+
silent?: boolean;
|
|
18
|
+
}): boolean;
|
|
19
|
+
export declare function claudeMarkdownImportsAgents(content: string): boolean;
|
|
8
20
|
//# sourceMappingURL=agents-md.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-md.d.ts","sourceRoot":"","sources":["../../src/adapters/agents-md.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAKnD,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,MAAM,
|
|
1
|
+
{"version":3,"file":"agents-md.d.ts","sourceRoot":"","sources":["../../src/adapters/agents-md.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAKnD,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,MAAM,CAmIR;AAED,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,EACpB,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACxE,OAAO,CA+BT;AAED,eAAO,MAAM,oBAAoB,eAAe,CAAC;AAEjD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACnD,OAAO,CAQT;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAIpE"}
|
|
@@ -48,6 +48,11 @@ export function generateAgentsMarkdown(config, scripts) {
|
|
|
48
48
|
proseCapability =
|
|
49
49
|
'- **Prose & Copy**: Use `humanizer` skill to eliminate AI writing tells and refine documentation.';
|
|
50
50
|
}
|
|
51
|
+
let simplicityCapability = '';
|
|
52
|
+
if (skillInstalled('ponytail')) {
|
|
53
|
+
simplicityCapability =
|
|
54
|
+
'- **Simplicity**: Use `ponytail` skill for the smallest complete change and to cut over-engineering.';
|
|
55
|
+
}
|
|
51
56
|
let uiCapability = '';
|
|
52
57
|
if (isWeb && skillInstalled('impeccable')) {
|
|
53
58
|
uiCapability =
|
|
@@ -87,10 +92,13 @@ export function generateAgentsMarkdown(config, scripts) {
|
|
|
87
92
|
'',
|
|
88
93
|
'## AI Capabilities & Skills',
|
|
89
94
|
hasSkills
|
|
90
|
-
?
|
|
95
|
+
? config.agents.claudeCode === false
|
|
96
|
+
? 'Configured skills install into `.agents/skills/` (shared by Antigravity and Codex):'
|
|
97
|
+
: 'Configured skills install into `.agents/skills/` (shared by Antigravity and Codex, linked into `.claude/skills/` for Claude Code):'
|
|
91
98
|
: 'Skills installation is disabled in this configuration.',
|
|
92
99
|
engineeringCapability || undefined,
|
|
93
100
|
proseCapability || undefined,
|
|
101
|
+
simplicityCapability || undefined,
|
|
94
102
|
specCapability || undefined,
|
|
95
103
|
uiCapability || undefined,
|
|
96
104
|
browserCapability || undefined,
|
|
@@ -142,4 +150,26 @@ export function setupAgentsMarkdown(targetDir, config, options = {}) {
|
|
|
142
150
|
const content = generateAgentsMarkdown(config, readPackageManifest(targetDir)?.scripts);
|
|
143
151
|
return safeWriteFile(filePath, content, { overwrite: true, dryRun, silent });
|
|
144
152
|
}
|
|
153
|
+
export const CLAUDE_AGENTS_IMPORT = '@AGENTS.md';
|
|
154
|
+
/**
|
|
155
|
+
* Point Claude Code at AGENTS.md through a one-line `@AGENTS.md` import. Recent
|
|
156
|
+
* Claude Code reads AGENTS.md on its own, but only without a CLAUDE.md and not
|
|
157
|
+
* in every session; the import works everywhere and never loads it twice.
|
|
158
|
+
* An existing CLAUDE.md is left alone (doctor reports a missing import).
|
|
159
|
+
*/
|
|
160
|
+
export function setupClaudeMarkdown(targetDir, options = {}) {
|
|
161
|
+
const { dryRun = false, silent = false } = options;
|
|
162
|
+
const filePath = path.join(targetDir, 'CLAUDE.md');
|
|
163
|
+
if (fileExists(filePath)) {
|
|
164
|
+
if (!silent)
|
|
165
|
+
logger.dim('CLAUDE.md already exists, preserving content.');
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
return safeWriteFile(filePath, CLAUDE_AGENTS_IMPORT + '\n', { overwrite: false, dryRun, silent });
|
|
169
|
+
}
|
|
170
|
+
export function claudeMarkdownImportsAgents(content) {
|
|
171
|
+
return content
|
|
172
|
+
.split(/\r?\n/)
|
|
173
|
+
.some((line) => ['@AGENTS.md', '@./AGENTS.md'].includes(line.trim()));
|
|
174
|
+
}
|
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A2C,EAAE;IAEpD,MAAM,EAAE,MAAM,GAAG,KAAK,EAAE,MAAM,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;IACnD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IACnD,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzB,IAAI,CAAC,MAAM;YAAE,MAAM,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC;QACzE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,aAAa,CAAC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;AACpG,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,OAAe;IACzD,OAAO,OAAO;SACX,KAAK,CAAC,OAAO,CAAC;SACd,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAC1E,CAAC"}
|
package/dist/adapters/graft.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export declare function isGraftInstalled(): Promise<boolean>;
|
|
|
2
2
|
export declare function initGraft(targetDir: string, options?: {
|
|
3
3
|
dryRun?: boolean;
|
|
4
4
|
silent?: boolean;
|
|
5
|
+
claude?: boolean;
|
|
5
6
|
}): Promise<boolean>;
|
|
6
7
|
export declare function buildGraft(targetDir: string, options?: {
|
|
7
8
|
dryRun?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graft.d.ts","sourceRoot":"","sources":["../../src/adapters/graft.ts"],"names":[],"mappings":"AAKA,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAEzD;AAED,wBAAsB,SAAS,CAC7B,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,
|
|
1
|
+
{"version":3,"file":"graft.d.ts","sourceRoot":"","sources":["../../src/adapters/graft.ts"],"names":[],"mappings":"AAKA,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAEzD;AAED,wBAAsB,SAAS,CAC7B,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACrE,OAAO,CAAC,OAAO,CAAC,CAkClB;AAED,wBAAsB,UAAU,CAC9B,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACnD,OAAO,CAAC,OAAO,CAAC,CAOlB;AAED,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACnD,OAAO,CAAC,OAAO,CAAC,CAkBlB"}
|
package/dist/adapters/graft.js
CHANGED
|
@@ -6,7 +6,7 @@ export async function isGraftInstalled() {
|
|
|
6
6
|
return await commandExists('graft');
|
|
7
7
|
}
|
|
8
8
|
export async function initGraft(targetDir, options = {}) {
|
|
9
|
-
const { dryRun = false, silent = false } = options;
|
|
9
|
+
const { dryRun = false, silent = false, claude = true } = options;
|
|
10
10
|
const installed = dryRun || (await isGraftInstalled());
|
|
11
11
|
if (!installed) {
|
|
12
12
|
if (!silent) {
|
|
@@ -16,8 +16,10 @@ export async function initGraft(targetDir, options = {}) {
|
|
|
16
16
|
}
|
|
17
17
|
if (!silent)
|
|
18
18
|
logger.dim('Initializing Graft context graph...');
|
|
19
|
-
//
|
|
20
|
-
|
|
19
|
+
// Wire Antigravity, AGENTS.md readers and (optionally) Claude Code's in-repo
|
|
20
|
+
// .claude/ + .mcp.json, without touching global system files (--no-global)
|
|
21
|
+
const agents = ['antigravity', 'agents', ...(claude ? ['claude'] : [])];
|
|
22
|
+
const res = await runExecutable('graft', ['init', '--no-global', '--agents', ...agents, '-y'], {
|
|
21
23
|
cwd: targetDir,
|
|
22
24
|
dryRun,
|
|
23
25
|
silent: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graft.js","sourceRoot":"","sources":["../../src/adapters/graft.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,OAAO,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,SAAiB,EACjB,OAAO,
|
|
1
|
+
{"version":3,"file":"graft.js","sourceRoot":"","sources":["../../src/adapters/graft.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,OAAO,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,SAAiB,EACjB,OAAO,GAA6D,EAAE;IA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