diff --git a/.agents/mcp_config.json b/.agents/mcp_config.json
new file mode 100644
index 00000000..8b0e5a18
--- /dev/null
+++ b/.agents/mcp_config.json
@@ -0,0 +1,10 @@
+{
+ "mcpServers": {
+ "cladding": {
+ "command": "node",
+ "args": [
+ ".cladding/host/serve.cjs"
+ ]
+ }
+ }
+}
diff --git a/.agents/skills/cladding-init/SKILL.md b/.agents/skills/cladding-init/SKILL.md
new file mode 100644
index 00000000..28e0fb25
--- /dev/null
+++ b/.agents/skills/cladding-init/SKILL.md
@@ -0,0 +1,28 @@
+---
+name: cladding-init
+description: Use only when the user explicitly names Cladding and asks to initialize, adopt, or refresh it; never use for an ordinary project creation or implementation request. Scaffold from an idea, planning document, or existing project through the MCP prepare/apply flow.
+---
+
+# Cladding init
+
+Use this workflow only when the user explicitly asks to initialize, adopt, or refresh Cladding. Opening a repository alone is not consent to initialize it.
+
+## Required host workflow
+
+If the current user message itself matches `APPLY CLADDING XXXXXX`, do not call prepare or stage again. Call `clad_init` once and copy the entire user message, including the `APPLY CLADDING` prefix, into `confirmation`.
+
+1. If a greenfield request has no project intent, ask for one short description.
+2. Call `clad_prepare_init` with exactly one starting mode:
+ - `idea` with the user's description.
+ - `document` with a project-relative planning-document path.
+ - `existing` for an existing codebase; include an optional adoption goal.
+3. Read the returned prompt and observations. Draft the structured object required by `clad_init` using the current host model, then call `clad_stage_init` with the preparation token and that draft. Staging validates the draft and stores only ignored runtime state under `.cladding/host/`; it does not modify authored project files.
+4. Show `plannedChanges`, the staged `confirmationQuestion`, and its one-time `approvalChallenge` to the user, then stop and wait for a separate reply. The original initialization request is not confirmation.
+5. Only when the user's separate reply exactly matches `approvalChallenge`, call `clad_init` with the entire reply verbatim as `confirmation`—never strip the `APPLY CLADDING` prefix. Include the draft and token when the host retained them; process-per-turn hosts may omit both because Cladding resolves the exact staged draft from its short-lived machine-local cache. Questions, paraphrases, and generic acknowledgements are not approval.
+6. If `nextQuestion` is present, show it verbatim and end the assistant turn immediately. Never answer it, infer an answer, or call either clarify tool during the initialization-approval turn. Continue with the Cladding clarify workflow only after a new user message supplies the answer. If no question remains, report that ordinary development can begin.
+
+Do not run `clad init` in a shell from an AI-host onboarding session. Do not use MCP sampling. If the MCP tools are absent, tell the user to run `clad setup`, restart the AI host in the project directory, and stop without writing project files.
+
+`clad_prepare_init` does not modify the workspace, and `clad_stage_init` writes only ignored runtime state. Never call stage and apply in the same assistant turn. Only `clad_init` writes authored artifacts, after explicit user confirmation plus schema and freshness validation. A stale, malformed, or replayed apply request must be prepared again.
+
+The raw CLI remains available for terminal, CI, offline, and explicitly configured SDK automation; it is not the primary host onboarding path.
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index dcc42728..67986288 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -9,7 +9,7 @@
"name": "claude-code",
"source": "./plugins/claude-code",
"description": "Reference implementation of the Ironclad standard — multi-agent dev harness for Claude Code.",
- "version": "0.8.3",
+ "version": "0.9.0",
"author": {
"name": "qwerfunch"
},
diff --git a/.claude/skills/cladding-init/SKILL.md b/.claude/skills/cladding-init/SKILL.md
new file mode 100644
index 00000000..28e0fb25
--- /dev/null
+++ b/.claude/skills/cladding-init/SKILL.md
@@ -0,0 +1,28 @@
+---
+name: cladding-init
+description: Use only when the user explicitly names Cladding and asks to initialize, adopt, or refresh it; never use for an ordinary project creation or implementation request. Scaffold from an idea, planning document, or existing project through the MCP prepare/apply flow.
+---
+
+# Cladding init
+
+Use this workflow only when the user explicitly asks to initialize, adopt, or refresh Cladding. Opening a repository alone is not consent to initialize it.
+
+## Required host workflow
+
+If the current user message itself matches `APPLY CLADDING XXXXXX`, do not call prepare or stage again. Call `clad_init` once and copy the entire user message, including the `APPLY CLADDING` prefix, into `confirmation`.
+
+1. If a greenfield request has no project intent, ask for one short description.
+2. Call `clad_prepare_init` with exactly one starting mode:
+ - `idea` with the user's description.
+ - `document` with a project-relative planning-document path.
+ - `existing` for an existing codebase; include an optional adoption goal.
+3. Read the returned prompt and observations. Draft the structured object required by `clad_init` using the current host model, then call `clad_stage_init` with the preparation token and that draft. Staging validates the draft and stores only ignored runtime state under `.cladding/host/`; it does not modify authored project files.
+4. Show `plannedChanges`, the staged `confirmationQuestion`, and its one-time `approvalChallenge` to the user, then stop and wait for a separate reply. The original initialization request is not confirmation.
+5. Only when the user's separate reply exactly matches `approvalChallenge`, call `clad_init` with the entire reply verbatim as `confirmation`—never strip the `APPLY CLADDING` prefix. Include the draft and token when the host retained them; process-per-turn hosts may omit both because Cladding resolves the exact staged draft from its short-lived machine-local cache. Questions, paraphrases, and generic acknowledgements are not approval.
+6. If `nextQuestion` is present, show it verbatim and end the assistant turn immediately. Never answer it, infer an answer, or call either clarify tool during the initialization-approval turn. Continue with the Cladding clarify workflow only after a new user message supplies the answer. If no question remains, report that ordinary development can begin.
+
+Do not run `clad init` in a shell from an AI-host onboarding session. Do not use MCP sampling. If the MCP tools are absent, tell the user to run `clad setup`, restart the AI host in the project directory, and stop without writing project files.
+
+`clad_prepare_init` does not modify the workspace, and `clad_stage_init` writes only ignored runtime state. Never call stage and apply in the same assistant turn. Only `clad_init` writes authored artifacts, after explicit user confirmation plus schema and freshness validation. A stale, malformed, or replayed apply request must be prepared again.
+
+The raw CLI remains available for terminal, CI, offline, and explicitly configured SDK automation; it is not the primary host onboarding path.
diff --git a/.codex/config.toml b/.codex/config.toml
new file mode 100644
index 00000000..e4fc8293
--- /dev/null
+++ b/.codex/config.toml
@@ -0,0 +1,5 @@
+[mcp_servers.cladding]
+command = "node"
+args = [ ".cladding/host/serve.cjs" ]
+description = "cladding MCP server (project-scoped by `clad setup`)"
+default_tools_approval_mode = "writes"
diff --git a/.cursor/cli.json b/.cursor/cli.json
new file mode 100644
index 00000000..cdd5d86e
--- /dev/null
+++ b/.cursor/cli.json
@@ -0,0 +1,10 @@
+{
+ "permissions": {
+ "allow": [
+ "Mcp(cladding:clad_list_features)",
+ "Mcp(cladding:clad_get_feature)",
+ "Mcp(cladding:clad_run_check)"
+ ],
+ "deny": []
+ }
+}
diff --git a/.cursor/mcp.json b/.cursor/mcp.json
new file mode 100644
index 00000000..8b0e5a18
--- /dev/null
+++ b/.cursor/mcp.json
@@ -0,0 +1,10 @@
+{
+ "mcpServers": {
+ "cladding": {
+ "command": "node",
+ "args": [
+ ".cladding/host/serve.cjs"
+ ]
+ }
+ }
+}
diff --git a/.cursor/rules/cladding-bootstrap.mdc b/.cursor/rules/cladding-bootstrap.mdc
new file mode 100644
index 00000000..a243edb0
--- /dev/null
+++ b/.cursor/rules/cladding-bootstrap.mdc
@@ -0,0 +1,7 @@
+---
+description: Cladding bootstrap boundary
+alwaysApply: true
+---
+
+Cladding is available only in this project. Do not initialize or invoke Cladding for ordinary work.
+Use the cladding-init skill only when the user explicitly names Cladding and asks to initialize, adopt, or refresh it.
diff --git a/.cursor/skills/cladding-init/SKILL.md b/.cursor/skills/cladding-init/SKILL.md
new file mode 100644
index 00000000..28e0fb25
--- /dev/null
+++ b/.cursor/skills/cladding-init/SKILL.md
@@ -0,0 +1,28 @@
+---
+name: cladding-init
+description: Use only when the user explicitly names Cladding and asks to initialize, adopt, or refresh it; never use for an ordinary project creation or implementation request. Scaffold from an idea, planning document, or existing project through the MCP prepare/apply flow.
+---
+
+# Cladding init
+
+Use this workflow only when the user explicitly asks to initialize, adopt, or refresh Cladding. Opening a repository alone is not consent to initialize it.
+
+## Required host workflow
+
+If the current user message itself matches `APPLY CLADDING XXXXXX`, do not call prepare or stage again. Call `clad_init` once and copy the entire user message, including the `APPLY CLADDING` prefix, into `confirmation`.
+
+1. If a greenfield request has no project intent, ask for one short description.
+2. Call `clad_prepare_init` with exactly one starting mode:
+ - `idea` with the user's description.
+ - `document` with a project-relative planning-document path.
+ - `existing` for an existing codebase; include an optional adoption goal.
+3. Read the returned prompt and observations. Draft the structured object required by `clad_init` using the current host model, then call `clad_stage_init` with the preparation token and that draft. Staging validates the draft and stores only ignored runtime state under `.cladding/host/`; it does not modify authored project files.
+4. Show `plannedChanges`, the staged `confirmationQuestion`, and its one-time `approvalChallenge` to the user, then stop and wait for a separate reply. The original initialization request is not confirmation.
+5. Only when the user's separate reply exactly matches `approvalChallenge`, call `clad_init` with the entire reply verbatim as `confirmation`—never strip the `APPLY CLADDING` prefix. Include the draft and token when the host retained them; process-per-turn hosts may omit both because Cladding resolves the exact staged draft from its short-lived machine-local cache. Questions, paraphrases, and generic acknowledgements are not approval.
+6. If `nextQuestion` is present, show it verbatim and end the assistant turn immediately. Never answer it, infer an answer, or call either clarify tool during the initialization-approval turn. Continue with the Cladding clarify workflow only after a new user message supplies the answer. If no question remains, report that ordinary development can begin.
+
+Do not run `clad init` in a shell from an AI-host onboarding session. Do not use MCP sampling. If the MCP tools are absent, tell the user to run `clad setup`, restart the AI host in the project directory, and stop without writing project files.
+
+`clad_prepare_init` does not modify the workspace, and `clad_stage_init` writes only ignored runtime state. Never call stage and apply in the same assistant turn. Only `clad_init` writes authored artifacts, after explicit user confirmation plus schema and freshness validation. A stale, malformed, or replayed apply request must be prepared again.
+
+The raw CLI remains available for terminal, CI, offline, and explicitly configured SDK automation; it is not the primary host onboarding path.
diff --git a/.gemini/settings.json b/.gemini/settings.json
new file mode 100644
index 00000000..8b0e5a18
--- /dev/null
+++ b/.gemini/settings.json
@@ -0,0 +1,10 @@
+{
+ "mcpServers": {
+ "cladding": {
+ "command": "node",
+ "args": [
+ ".cladding/host/serve.cjs"
+ ]
+ }
+ }
+}
diff --git a/.mcp.json b/.mcp.json
new file mode 100644
index 00000000..8b0e5a18
--- /dev/null
+++ b/.mcp.json
@@ -0,0 +1,10 @@
+{
+ "mcpServers": {
+ "cladding": {
+ "command": "node",
+ "args": [
+ ".cladding/host/serve.cjs"
+ ]
+ }
+ }
+}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index afeb89b6..00b81e63 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,53 @@ All notable changes to Cladding are documented here.
Format: [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/).
Versioning: [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).
+## [0.9.0] — Project-scoped natural-language onboarding (2026-07-16)
+
+**In one line:** apply Cladding from ordinary conversation without a shell command, while project-local discovery, a read-only preview, an exact approval phrase, and atomic recovery keep onboarding bounded.
+
+### MCP host (clad serve)
+
+- **Start from an idea, a complete UTF-8 planning document, or an existing codebase.** The host reuses the CLI onboarding engine, keeps the full document and observed source evidence, and asks at most three material follow-up questions only when decisions remain open.
+- **Preview before any authored file changes.** Initialization requires the exact one-time phrase shown after validation and staging; malformed, stale, replayed, or partially applied drafts leave the project at its pre-apply content.
+- **Resume across host restarts.** Process-per-turn hosts retain the exact staged draft in ignored project runtime state instead of reconstructing intent from an approval code.
+- **Keep activation inside the selected project.** Setup no longer exposes Cladding tools to unrelated projects, removes only provably owned legacy global wiring, and uses the same project runtime for MCP and later shell validation.
+- **Expose only the initialization bootstrap before `spec.yaml` exists.** The ordinary development tool surface becomes available after successful initialization.
+
+### Spec governance (4-tier SSoT)
+
+- **Onboarding now seeds capabilities and user journeys into the governed design.** Early generated links remain informational until the shared maturity threshold, while invalid references and under-bound flows still block.
+- **Completed onboarding hands off to ordinary natural-language development** and distinguishes on-demand checks from opt-in hook or CI enforcement.
+
+### Gate and toolchain fidelity
+
+- **JavaScript projects follow their declared tools.** Custom scripts win; Jest, Vitest, ESLint, Biome, and Oxlint are selected from project evidence, and architecture checks include TSX, JSX, JavaScript, and TypeScript.
+- **A missing runnable deliverable stays honest.** Safe declared entries run, broken entries block, and an early onboarding seed is not forced to invent an unsafe smoke command.
+- **Verification evidence remains non-vacuous.** Done features must execute a passing declared test, spec-conformance oracles preserve full-suite evidence, and unavailable tools remain skips rather than false passes.
+
+### Hardened by the packed-tarball E2E campaign (2026-07-16)
+
+A live campaign installed the packed 0.9.0 tarball in isolation and drove real init scenarios through all five host CLIs (report: `docs/dogfood/e2e-0.9.0-packed-2026-07-16.md`). The consent boundary held on every host that ran; these defects were found and fixed:
+
+- **Setup wires only detected hosts by default.** Previously every project received all five hosts' config files regardless of what was installed; `clad setup --host all` remains the explicit override.
+- **Antigravity actually connects now.** agy reads MCP config machine-wide only (a negative control proved the project file is never loaded), so setup also writes an ownership-guarded `~/.gemini/config/plugins/cladding/` wire — the one stated exception to project-local activation; sessions still resolve the project from their working directory.
+- **`clad update` outside a cladding project writes nothing.** It used to scaffold host wiring into any directory and could reach an account-wide legacy plugin uninstall.
+- **Abandoned onboarding preparations no longer accumulate.** Expired consent-cache envelopes are swept on staging (hundreds had piled up in the shared temp dir), and a tampered staged draft is now re-validated and rejected cleanly instead of surfacing a raw crash.
+- **Legacy cleanup preserves your global config formatting.** The codex `config.toml` entry is now spliced out textually (comments and ordering survive, parse-verified), and cursor cleanup no longer leaves an orphan empty `mcpServers`.
+- **`clad doctor --hosts` probes match the project-local model** (project-MCP approval for the consented Claude probe, project-directory Antigravity probe, Codex approvals bypass, and a realistic gate timeout).
+
+### Also changed
+
+- The deterministic collector found nine onboarding commit subjects that do not name a spec feature. Their user-visible behavior is covered by the spec-backed notes above, but their commit-to-spec linkage remains absent.
+
+### 한국어 요약
+
+**한 줄 요약:** 이제 셸 명령 없이 자연어로 Cladding을 적용할 수 있으며, 프로젝트 로컬 연결·읽기 전용 미리보기·정확한 승인 문구·원자적 복구가 온보딩 변경 범위를 지킵니다.
+
+- 아이디어·전체 UTF-8 기획 문서·기존 코드 중 어디서든 시작하고, 결정이 남은 경우에만 최대 3개의 핵심 질문을 받습니다.
+- 초기화 전에는 준비용 MCP 도구 3개만 노출되며, 정확한 일회용 승인 문구로 적용한 뒤 전체 개발 도구가 열립니다.
+- 실제 5개 호스트 CLI에 패키징된 tarball을 설치해 검증하는 E2E 캠페인을 거쳤습니다 — 설치된 호스트만 배선, Antigravity 연결 수리, 임시 파일 잔존 정리 등 캠페인이 찾은 결함을 모두 수정했습니다.
+- 호스트가 재시작돼도 검토한 초안을 그대로 적용하고, 실패·오래된 요청·재사용 요청은 프로젝트를 부분 변경 상태로 남기지 않습니다.
+
## [0.8.3] — Agent loops that stop honestly, a guard against unverified "done", and a faster check (2026-07-12)
This release helps you build AI agent loops that stop when the work is genuinely finished, closes a hole where a feature could look done without its tests ever running, makes the pre-push check faster, and ships native Japanese and Chinese documentation.
diff --git a/CLAUDE.md b/CLAUDE.md
index 0a98634d..e3cf087d 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -25,7 +25,7 @@ Files `F-082` ~ `F-090` were the *drift period* (authored after v0.3.9 but bypas
## Version bumps — use the script
-Don't hand-edit version strings. There are nine sites (incl. `.claude-plugin/marketplace.json`, the marketplace *catalog* the Claude Code host reads to detect "update available"); missing one breaks `HARNESS_INTEGRITY` (which now also guards the marketplace catalog version). Run:
+Don't hand-edit version strings. There are eleven sites (incl. `.claude-plugin/marketplace.json`, the marketplace *catalog* the Claude Code host reads to detect "update available"); missing one breaks `HARNESS_INTEGRITY` (which now also guards the marketplace catalog version). Run:
```bash
npm run version-bump -- 0.3.X
@@ -46,7 +46,7 @@ When you add a drift detector under `src/stages/detectors/`:
A user-explicit instruction ("release vX.Y.Z") triggers the ritual:
-1. `npm run version-bump -- X.Y.Z` (all nine sites) + `npm install` (refresh the committed `package-lock.json` to the new version — CI's `npm ci` fails on a stale lock) + `npm run build` + GREEN `npm test` / `clad check --strict`
+1. `npm run version-bump -- X.Y.Z` (all eleven sites) + `npm install` (refresh the committed `package-lock.json` to the new version — CI's `npm ci` fails on a stale lock) + `npm run build` + GREEN `npm test` / `clad check --strict`
2. open a **PR `develop → main`** and merge it with the GitHub **"Create a merge commit"** button — NEVER squash, NEVER rebase (see the squash-ban below)
3. `git tag vX.Y.Z` on main's merge commit
4. push main + tag, then **back-merge `main → develop`** (`git checkout develop && git merge origin/main && git push`) so develop keeps the release commit in its ancestry — skip this and the next release PR phantom-conflicts
diff --git a/README.html b/README.html
index 7dc6b71a..38cf2bbd 100644
--- a/README.html
+++ b/README.html
@@ -227,13 +227,13 @@
cladding
To trust AI with coding, an organization needs three things — that the code can be trusted, that it's traced, and that it holds up as you scale. cladding builds those three.
- True to its name (cladding = the outer layer), it wraps your host LLM (Claude Code · Codex · Gemini · Cursor): before it starts, cladding feeds it the project's intent; after it finishes, cladding verifies the result with 41 detectors and a 15-stage gate.
+ True to its name (cladding = the outer layer), it wraps your host LLM (Claude Code · Codex · Gemini · Antigravity · Cursor): before it starts, cladding feeds it the project's intent; after it finishes, cladding verifies the result with 41 detectors and a 15-stage gate.
-
+
@@ -269,7 +269,7 @@ cladding
- cladding builds itself with cladding too — 251 of its 254 features cleared this same gate, the first L4 implementation of the Ironclad standard.
+ cladding builds itself with cladding too — 252 of its 255 features cleared this same gate, the first L4 implementation of the Ironclad standard.
@@ -285,7 +285,7 @@ What changes
| Ending a session in a failing state | exits as-is, forgotten next time | the exit is blocked once, the failing checks handed off as a repair card |
| Two devs add a feature at the same time | merge conflict | hash-8 IDs · separate files → 0 conflicts |
| Who verifies the AI-written code? | the AI that wrote it self-certifies (risky) | an implementation-blind grader + the mechanical gate |
- | Switching AI tools | reconfigure per tool | one spec → 4 hosts wired automatically |
+ | Switching AI tools | reconfigure per tool | one spec → 5 hosts wired automatically |
@@ -315,7 +315,7 @@ How cladding wraps your host LLM
After — verify the result: the 15-stage gate, 41 drift detectors, and an implementation-blind grader — an agent that checks the work against the spec with no tool to read the implementation, so it can't rubber-stamp what it wrote.
Real-time intervention (map injection · instant block · stop block) runs fully on Claude Code.
- On Codex · Gemini · Cursor the same verification runs through in-conversation tool calls plus the git · CI gate.
+ On Codex · Gemini · Antigravity · Cursor the same verification runs through in-conversation tool calls plus the git · CI gate.
@@ -481,40 +481,55 @@ Ecosystem
Install
- npm install -g cladding # the cladding CLI
-cd <project> # your project
-clad setup # auto-wire your AI tools (Claude · Codex · Gemini · Cursor)
+ 1. Install once on your machine
+ npm install -g cladding # install only the cladding CLI
- Each host wires cladding as an MCP server the AI calls on its own — there's no /mcp command and no manual connect step; you just chat.
+ This command may be run from any directory. It does not add Cladding to any AI model's context.
- Then, once per project, call init inside your AI tool:
- [inside your AI tool] /cladding:init "B2B payment SaaS"
+ 2. Activate one project, then start your AI tool
+ cd <project>
+clad setup # connect Cladding only to this project
- It creates the project's spec.yaml and supporting docs. After that, just develop as usual — cladding runs the before/after loop in the background, with nothing to memorize. Raise enforcement with clad init --with-hook (pre-commit + pre-push git hooks) or clad init --with-ci (scaffold the CI gate, where true enforcement lives).
+# Choose exactly one and remove its leading '#':
+# codex # Codex
+# claude # Claude Code
+# gemini # Gemini CLI
+# agy # Antigravity
+# cursor-agent # Cursor Agent
+ clad setup connects the AI tools it detects on your machine (Claude Code, Codex, Gemini, Antigravity, Cursor) to this project only — Antigravity is the one exception, wired machine-wide because it reads no project-local MCP config (details in setup). It does not expose Cladding skills or MCP tools in projects where setup was not run. Use only the command for your AI tool; for Cursor IDE, open <project> as the workspace. Start a new AI session from this folder after setup so the host discovers the project-local connection. When Codex first opens a Git repository, approve its normal project-trust prompt; Codex intentionally ignores project MCP config until the repository is trusted.
-
-
- | Starting point | Command | What happens |
-
-
- | An idea, nothing else | /cladding:init "I'm going to build a B2B payment SaaS" | the LLM analyzes the domain → spec · docs · policies + 2–3 follow-up questions |
- | A planning doc | /cladding:init docs/plan.md | loads the file and uses its contents as intent |
- | An existing project | /cladding:init "apply cladding to this project" | scans the existing code → observed patterns merged with your intent |
-
-
+ 3. Apply Cladding once
+ Choose the starting point that fits and say it naturally in your AI tool.
+ Cladding first inspects the project without changing it. Your AI shows the exact file operations and a one-time approval phrase; initialization begins only when you repeat that phrase in a separate reply. Opening a project or asking a question about Cladding never authorizes file changes. This exact-match step prevents accidental application; MCP cannot prove which user produced a tool argument, so it is not a sandbox against a malicious or compromised host.
+
+ An idea, nothing else
+ Start this B2B payment SaaS with Cladding.
+ The LLM analyzes the domain and creates the spec, docs, and policies. It asks up to three follow-up questions only when an important product decision is still unresolved; a complete plan asks none.
+
+ A planning document
+ Apply Cladding using docs/plan.md.
+ Cladding loads the file and uses its contents as the project intent.
+
+ An existing project
+ Analyze this project and apply Cladding.
+ Cladding scans the existing code and combines the observed patterns with your intent.
- Host support (honest): Claude Code is fully verified through real-usage campaigns (incl. real-time intervention). Codex · Gemini CLI wire automatically; their behavior isn't verified yet. Cursor wires automatically, but real-usage verification is still pending. → setup details · host wiring · MCP · upgrading
+ Once initialization is complete, keep developing in the same conversation. Ask for the next feature in plain language; the AI uses the generated spec and docs and keeps material design changes aligned as the project grows. Checks run when the host invokes them; use the optional Git hooks or CI gate when you want automatic enforcement.
+ Implement email sign-in, including tests.
+ There is nothing new to memorize. For host-specific invocation, stricter Git/CI enforcement, and verified host status, see setup details.
Update
- Staying current is two commands — or one line to your AI tool.
- npm update -g cladding # 1. get the new version
-cd <project> # 2. your project
-clad update # 3. bring it in line
- Your code · spec.yaml · docs are left untouched — a stricter version only points things out, it never blocks or fixes on its own. If those two commands flag fresh drift, hand it to your AI tool:
- [inside your AI tool] reconcile the drift the update flagged
- …or skip the commands and just ask, the same way you ran init — it runs the update for you:
- [inside your AI tool] update cladding to the latest version
+ Ask your AI tool (recommended)
+ From your project, say:
+ Update cladding to the latest version.
+ If the AI tool has terminal and global-install permission, it updates the CLI, refreshes host wiring, updates the current project, and explains any new drift. Otherwise, it shows the commands for you to approve or run.
+ Or update from the terminal
+ npm update -g cladding # 1. get the new CLI version
+cd <project> # 2. enter one Cladding project
+clad update # 3. refresh its host wiring and derived state
+ Run clad update in each Cladding project you want to upgrade. It also performs the project-scoped setup refresh, so a separate clad setup is unnecessary. It preserves authored code, feature/spec content, and documentation; only derived data and Cladding-managed instruction blocks may be refreshed. If the new version reports drift, hand that result to your AI tool:
+ Reconcile the drift the update flagged.
Status
@@ -523,7 +538,7 @@ Status
|
version
- v0.8.3
+ v0.9.0
2026-07
|
@@ -533,7 +548,7 @@ Status
|
tests
- 2497/2497
+ 2561/2561
all pass
|
@@ -543,13 +558,13 @@ Status
|
features
- 254
- 251 done · self-spec
+ 255
+ 252 done · self-spec
|
- 234 test files · 6 capabilities · coverage drop blocked by the COVERAGE_DROP detector
+ 236 test files · 6 capabilities · coverage drop blocked by the COVERAGE_DROP detector
Road to Ironclad 1.0 — 1.0 locks only when two independent implementations pass the L4 conformance fixtures (GOVERNANCE § 1). cladding is the first.
diff --git a/README.ja.md b/README.ja.md
index f82cceac..ca22b939 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -6,13 +6,13 @@
AI にコーディングを任せるには、組織に三つの条件が要る —
コードを信頼でき、その足跡をたどれ、規模が大きくなっても揺るがないこと。cladding はその三つを築く。
- その名(外装材)のとおりホスト LLM(Claude Code · Codex · Gemini · Cursor)を包み込む — 作業を 始める前 に、cladding がプロジェクトの意図を渡し、作業を 終えた後 に、41 個の検出器と 15 段階のゲートで結果を検証する。
+ その名(外装材)のとおりホスト LLM(Claude Code · Codex · Gemini · Antigravity · Cursor)を包み込む — 作業を 始める前 に、cladding がプロジェクトの意図を渡し、作業を 終えた後 に、41 個の検出器と 15 段階のゲートで結果を検証する。
-
+
@@ -31,7 +31,7 @@
- **たどれる** — **出荷されたものは記録に残る**: 何を検証したかはコミットされた内容に刻まれ、誰がいつやったかはローカルのセッション台帳に、なぜかは spec に残る — だから引き継ぎもレビューも、掘り起こさずに済む。
- **拡張しても揺るがない** — 人と AI が増えれば、普通は衝突と乖離も増える。だが全員が一つの spec を基準に働くので、それらは自動でせき止められる — だから規模を広げても崩れない。
-cladding は **自分自身も cladding で作っている** — 254 個の feature のうち 251 個が同じゲートを通過した、[Ironclad](https://github.com/qwerfunch/ironclad) 標準を L4 で実装した最初の事例だ。
+cladding は **自分自身も cladding で作っている** — 255 個の feature のうち 252 個が同じゲートを通過した、[Ironclad](https://github.com/qwerfunch/ironclad) 標準を L4 で実装した最初の事例だ。
@@ -46,7 +46,7 @@ cladding は **自分自身も cladding で作っている** — 254 個の feat
| **失敗した状態でセッションを終える** | そのまま終了し、次回には忘れられる | 終了を一度止め、失敗したチェックを修正カードとして引き継ぐ |
| **二人が同時に feature を追加する** | merge conflict | hash-8 ID · ファイル分離 → 衝突 0 |
| **AI が書いたコードは誰が検証する?** | 書いた AI が自分で検証する(危うい) | 実装を見ない採点者 + 機械的なゲート |
-| **AI ツールを乗り換える** | ツールごとに再設定 | 1 つの spec → 4 つの host へ自動配線 |
+| **AI ツールを乗り換える** | ツールごとに再設定 | 1 つの spec → 5 つの host へ自動配線 |
## 誰のためのものか
@@ -66,7 +66,7 @@ cladding は **自分自身も cladding で作っている** — 254 個の feat
**後 — 検証する:** 15 段階のゲート、41 個の乖離検出器、そして **実装を見ない採点者** — spec に照らして作業を検査するエージェントで、*実装を読む手段を一切持たない* ため、自分が書いたものにお墨付きを与えることはできない。
-リアルタイム介入(マップ注入 · 即時ブロック · 終了ブロック)は Claude Code ですべて動作する。Codex · Gemini · Cursor では同じ検証を、会話中のツール呼び出しと git · CI のゲートで通す。
+リアルタイム介入(マップ注入 · 即時ブロック · 終了ブロック)は Claude Code ですべて動作する。Codex · Gemini · Antigravity · Cursor では同じ検証を、会話中のツール呼び出しと git · CI のゲートで通す。
@@ -241,63 +241,107 @@ cladding の差別化点は *組み合わせ* にある — 上のカテゴリ
## Install
+### 1. マシンに一度インストールする
+
```bash
npm install -g cladding # cladding CLI をインストール
-cd # プロジェクトへ移動
-clad setup # AI ツールを自動配線(Claude · Codex · Gemini · Cursor)
```
-各ホストは cladding を MCP サーバーとして接続し、AI が自分で呼び出す — `/mcp` コマンドも手動での接続手順もなく、ただ普通に会話するだけでいい。
+このコマンドはどのディレクトリからでも実行できる。CLI だけをインストールし、AI モデルのコンテキストにはまだ Cladding を追加しない。
+
+### 2. 使用するプロジェクトだけを有効化し、AI ツールを起動する
+
+```bash
+cd
+clad setup # このプロジェクトだけに Cladding を接続する
+
+# 一つだけ選び、先頭の「#」を外して実行する:
+# codex # Codex
+# claude # Claude Code
+# gemini # Gemini CLI
+# agy # Antigravity
+# cursor-agent # Cursor Agent
+```
+
+`clad setup` はこのマシンで検出された AI ツール(Claude Code・Codex・Gemini・Antigravity・Cursor)を現在のプロジェクト内だけに接続する — ただし Antigravity はプロジェクトローカルの MCP 設定を読まないホストのため、唯一マシン単位で接続される(詳細は [setup ドキュメント](docs/setup.md))。setup を実行していない別プロジェクトのモデルコンテキストには、Cladding の skill や MCP ツールは入らない。使用する AI ツールのコマンドを一つだけ実行し、Cursor IDE では `` をワークスペースとして開く。setup 後はこのフォルダから新しい AI セッションを開始する。Codex や Gemini がプロジェクトの信頼確認を表示した場合は、それぞれの通常のセキュリティ境界に従って承認する。信頼されるまでプロジェクトローカルの MCP 設定は意図的に読み込まれない。
+
+### 3. Cladding を一度適用する
+
+自分の出発点に合う依頼を AI ツールへ自然な言葉で伝える。
+
+Cladding はまずプロジェクトを読み取り専用で調査する。AI が正確なファイル操作と一度限りの承認フレーズを示し、ユーザーが別の返信でそのフレーズをそのまま入力した場合にだけ初期化を開始する。プロジェクトを開いたり Cladding について質問したりするだけでは、ファイルは変更されない。
+この完全一致の手順は偶発的な適用を防ぐが、MCP はツール引数を実際にどのユーザーが作成したかを証明できない。そのため、悪意のある、または侵害されたホストに対するサンドボックスではない。
+
+#### アイデアだけがある場合
+
+```
+B2B 決済 SaaS を cladding で始めて。
+```
+
+LLM がドメインを分析し、spec・ドキュメント・ポリシーを作成する。重要なプロダクト判断が未解決の場合にだけ最大 3 個の追加質問を行い、完成した計画には質問しない。
-続いて、プロジェクトにつき一度だけ、AI ツールの中から init を呼び出す:
+#### 企画ドキュメントがある場合
```
-[AI ツールの中で] /cladding:init "B2B 決済 SaaS"
+docs/plan.md を基に cladding を適用して。
```
-プロジェクトの `spec.yaml` と関連ドキュメントが作られる。あとはいつも通り開発するだけ — cladding が前 / 後のループを裏で回すので、覚えるコマンドはない。強制力を上げたいときは `clad init --with-hook`(pre-commit + pre-push の git hook)または `clad init --with-ci`(CI ゲートの雛形を生成 — 本当の強制は CI にある)。
+ファイルを読み込み、その内容をプロジェクトの intent として使用する。
-| 出発点 | コマンド | 何が起きるか |
-|---|---|---|
-| **アイデアだけがある** | `/cladding:init "B2B 決済 SaaS を作る"` | LLM がドメインを分析 → spec · ドキュメント · ポリシーを自動生成 + 2〜3 個の追加質問 |
-| **企画ドキュメントがある** | `/cladding:init docs/plan.md` | ファイルを読み込み、その内容を intent として使う |
-| **既存プロジェクトへ導入する** | `/cladding:init "このプロジェクトに cladding を適用して"` | 既存コードをスキャン → 観察したパターンと intent を結合 |
+#### 既存プロジェクトへ導入する場合
-**host サポート(正直な注記):** Claude Code は実利用キャンペーン(リアルタイム介入を含む)で全機能を検証済み。Codex · Gemini CLI は配線は自動だが、動作はまだ未検証だ。Cursor は配線は自動だが、実利用での検証はまだこれから。→ [セットアップ詳細 · host 配線 · MCP · アップグレード](docs/setup.md)
+```
+現在のコードを分析して cladding を適用して。
+```
+
+既存コードをスキャンし、観察したパターンとユーザーの intent を組み合わせる。
+
+> **初期化が完了したら、同じ会話でそのまま開発を続ければよい。** 次の機能を自然な言葉で依頼すると、AI は生成された spec とドキュメントを基準に開発し、重要な設計変更もプロジェクトの成長に合わせて反映する。検査はホストが呼び出した時に実行され、自動強制が必要なら任意の Git hook または CI gate を使用する。
+
+```
+メールログイン機能をテスト込みで実装して。
+```
+
+新しく覚えるコマンドはない。ホスト別の明示的な呼び出し方、より強い Git/CI 適用、検証済みホストの状況は [セットアップ詳細](docs/setup.md) を参照。
## Update
-最新に保つのはコマンド二つ — あるいは AI ツールに一言頼むだけでいい。
+### AI ツールに依頼する(推奨)
-```bash
-npm update -g cladding # 1. 新しいバージョンを入れる
-cd # 2. プロジェクトへ移動
-clad update # 3. 足並みをそろえる
+プロジェクトで次のように伝える:
+
+```
+cladding を最新版に更新して。
```
-あなたのコード · `spec.yaml` · ドキュメントには手を触れない — より厳しいバージョンは、指摘すべきことがあっても **指摘するだけ** で、自分でブロックも修正もしない。上の二つのコマンドが新たな乖離を指摘したら、それは AI ツールに渡せばいい:
+AI ツールにターミナルとグローバルインストールの権限があれば、CLI の更新、ホスト配線の更新、現在のプロジェクトの更新を実行し、新たな乖離を説明する。権限がなければ、承認または手動実行するコマンドを案内する。
-```
-[AI ツールの中で] 更新で指摘された乖離を解消して
+### またはターミナルで直接更新する
+
+```bash
+npm update -g cladding # 1. 新しいバージョンを入れる
+cd # 2. Cladding プロジェクトへ移動
+clad update # 3. プロジェクト接続と派生状態を更新する
```
-…あるいは二つのコマンドを飛ばして、init のときと同じように頼むだけでもいい — 更新まで代わりにやってくれる:
+`clad update` は更新する各 Cladding プロジェクトで実行する。プロジェクト単位の setup も同時に更新するため、別途 `clad setup` を実行する必要はない。ユーザーが作成したコード・機能や spec の本文・ドキュメントは保持され、派生データと Cladding 管理の指示ブロックだけが更新される場合がある。新しいバージョンが乖離を報告したら、その結果を AI ツールに渡せばよい:
```
-[AI ツールの中で] cladding を最新版に更新して
+更新で指摘された乖離を解消して。
```
+
## Status
| Version | 準拠レベル | Tests | Gate | Features |
|---|---|---|---|---|
-| v0.8.3(2026-07) | L4 · [自己申告](https://github.com/qwerfunch/ironclad/blob/main/GOVERNANCE.md) | 2497 / 2497 | 15 段階 · 41 detectors | 254(251 done) |
+| v0.9.0(2026-07) | L4 · [自己申告](https://github.com/qwerfunch/ironclad/blob/main/GOVERNANCE.md) | 2561 / 2561 | 15 段階 · 41 detectors | 255(252 done) |
-234 test files · capability 6 個 · カバレッジ低下は COVERAGE_DROP detector がブロック
+236 test files · capability 6 個 · カバレッジ低下は COVERAGE_DROP detector がブロック
> **Ironclad 1.0 への道** — 1.0 は *独立した二つの実装が L4 準拠フィクスチャを通過してはじめて* 確定する([GOVERNANCE § 1](https://github.com/qwerfunch/ironclad/blob/main/GOVERNANCE.md))。cladding はその一つ目だ。
diff --git a/README.ko.html b/README.ko.html
index 88bc9f2a..d2a07c1c 100644
--- a/README.ko.html
+++ b/README.ko.html
@@ -269,13 +269,13 @@ cladding
기업이 AI에게 코딩을 맡기려면 세 가지가 필요하다 —
믿을 수 있고, 추적되고, 규모가 커져도 흔들리지 않아야 한다. cladding이 그 셋을 만든다.
- cladding(외장재)이라는 이름 그대로, 호스트 LLM(Claude Code · Codex · Gemini · Cursor)을 감싼다: 일을 시작하기 전엔 프로젝트의 의도를 넣어 주고, 마친 후엔 41개 검출기와 15단계 게이트로 결과를 검증한다.
+ cladding(외장재)이라는 이름 그대로, 호스트 LLM(Claude Code · Codex · Gemini · Antigravity · Cursor)을 감싼다: 일을 시작하기 전엔 프로젝트의 의도를 넣어 주고, 마친 후엔 41개 검출기와 15단계 게이트로 결과를 검증한다.
-
+
@@ -302,7 +302,7 @@ cladding
- cladding은 자기 자신도 cladding으로 만든다 — 기능 254개 중 251개가 같은 게이트를 통과했고, Ironclad 표준을 L4로 구현한 첫 사례다.
+ cladding은 자기 자신도 cladding으로 만든다 — 기능 255개 중 252개가 같은 게이트를 통과했고, Ironclad 표준을 L4로 구현한 첫 사례다.
@@ -349,7 +349,7 @@ cladding이 호스트 LLM을 감싸는 방식
실시간 개입(지도 주입 · 즉시 차단 · 종료 차단)은 Claude Code에서 전부 동작한다.
- Codex · Gemini · Cursor에서는 같은 검증을 대화 속 도구 호출과 git·CI 관문으로 수행한다.
+ Codex · Gemini · Antigravity · Cursor에서는 같은 검증을 대화 속 도구 호출과 git·CI 관문으로 수행한다.
@@ -517,41 +517,55 @@ 인접 도구와의 차이
Install
- npm install -g cladding # cladding CLI 설치
-cd <project> # 프로젝트로 이동
-clad setup # AI 도구 자동 연결 (Claude · Codex · Gemini · Cursor)
+ 1. 컴퓨터에 한 번 설치하기
+ npm install -g cladding # cladding CLI 설치
- 각 호스트는 cladding을 AI가 알아서 호출하는 MCP 서버로 연결한다 — /mcp 명령도 수동 연결 단계도 없이, 그냥 대화하면 된다.
+ 이 단계는 어느 디렉터리에서 실행해도 된다. CLI만 설치하며 AI 도구에는 아직 Cladding 정보가 들어가지 않는다.
- 그다음, 프로젝트당 한 번, AI 도구 안에서 init을 호출한다:
- [AI 도구 안] /cladding:init "B2B 결제 SaaS"
- 프로젝트의 spec.yaml 과 관련 문서가 만들어진다. 그 뒤론 평소처럼 개발하면 된다 — cladding이 배경에서 전·후 루프를 돌리니 따로 외울 것은 없다. 강제력을 높이려면 clad init --with-hook(pre-commit + pre-push git hook) 이나 clad init --with-ci(CI 게이트 스캐폴드 — 진짜 강제는 CI에서 산다).
+ 2. 사용할 프로젝트만 연결하고 AI 도구 실행하기
+ cd <project>
+clad setup # 이 프로젝트에만 AI 도구 연결
-
-
- | 시작 상황 | 명령 | 무엇이 일어나는가 |
-
-
- | 아이디어만 있을 때 | /cladding:init "B2B 결제 SaaS 만들거야" | LLM이 도메인 분석 → spec · 문서 · 정책 자동 생성 + 후속 질문 2–3개 |
- | 기획 문서가 있을 때 | /cladding:init docs/plan.md | 파일을 로드해 내용을 intent로 사용 |
- | 기존 프로젝트 도입 | /cladding:init "이 프로젝트에 cladding 적용해줘" | 기존 코드 스캔 → 관찰한 패턴을 intent와 결합 |
-
-
+# 정확히 하나를 골라 앞의 '#'을 지우고 실행한다:
+# codex # Codex
+# claude # Claude Code
+# gemini # Gemini CLI
+# agy # Antigravity
+# cursor-agent # Cursor Agent
+ clad setup은 이 머신에서 감지된 AI 도구(Claude Code · Codex · Gemini · Antigravity · Cursor)를 현재 프로젝트에만 연결한다 — 단 Antigravity는 프로젝트-로컬 MCP 설정을 읽지 않는 호스트라 유일하게 머신 단위로 연결된다(자세한 내용은 setup 문서). 설정하지 않은 다른 프로젝트의 모델 컨텍스트에는 Cladding skill이나 MCP 도구가 들어가지 않는다. Cursor IDE는 <project> 폴더를 작업공간으로 연다. setup 뒤에는 반드시 이 폴더에서 AI 도구를 새 세션으로 시작한다. Codex와 Gemini가 프로젝트 신뢰 여부를 물으면 각 호스트의 정상 보안 경계에 따라 승인한다. 신뢰하기 전에는 프로젝트 로컬 MCP 설정이 의도적으로 적용되지 않는다.
-
- 호스트 지원 현황(정직 고지): Claude Code는 실사용 캠페인으로 전 기능 검증됨(실시간 개입 포함). Codex · Gemini CLI는 연결은 자동이지만, 동작은 아직 검증 전이다. Cursor는 연결은 자동이지만 실사용 검증이 아직이다. → 설치 상세 · 호스트 배선 · MCP · 업그레이드
-
+ 3. 프로젝트에 Cladding 한 번 적용하기
+ 자신의 시작 상황에 맞는 요청을 AI 도구에 자연스럽게 말한다.
+ Cladding은 먼저 프로젝트를 읽기 전용으로 조사한다. AI가 정확한 파일 작업과 일회용 승인 문구를 보여주며, 사용자가 별도 답변에서 그 문구를 그대로 입력해야만 초기화가 시작된다. 프로젝트를 열거나 Cladding에 관해 질문하는 것만으로는 어떤 파일도 변경되지 않는다. 이 정확 일치 단계는 우발적인 적용을 막지만, MCP는 도구 인자를 실제로 어느 사용자가 만들었는지 증명할 수 없다. 따라서 악의적이거나 침해된 호스트를 격리하는 샌드박스로 보아서는 안 된다.
+
+ 아이디어만 있을 때
+ B2B 결제 SaaS를 cladding으로 시작해줘.
+ LLM이 도메인을 분석해 spec · 문서 · 정책을 만든다. 중요한 제품 결정이 실제로 비어 있을 때만 후속 질문을 최대 3개 하며, 완성된 기획에는 질문하지 않는다.
+
+ 기획 문서가 있을 때
+ docs/plan.md를 기준으로 cladding을 적용해줘.
+ 파일을 읽고 그 내용을 프로젝트 intent로 사용한다.
+
+ 기존 프로젝트에 도입할 때
+ 현재 코드를 분석해서 cladding을 적용해줘.
+ 기존 코드를 스캔하고, 관찰한 패턴을 사용자의 intent와 결합한다.
+
+ 초기화가 끝나면 같은 대화에서 바로 개발을 이어가면 된다. 다음 기능을 자연어로 요청하면 AI가 생성된 spec과 문서를 기준으로 개발하고, 중요한 설계 변경도 프로젝트 성장에 맞춰 함께 반영한다. 검사는 호스트가 호출할 때 실행되며, 자동 강제가 필요하면 선택형 Git hook이나 CI 게이트를 사용한다.
+ 이메일 로그인 기능을 테스트까지 포함해서 구현해줘.
+ 새로 외울 명령은 없다. 호스트별 명시 호출법, 더 강한 Git/CI 적용, 검증된 호스트 현황은 설치 상세에서 확인할 수 있다.
Update
- 최신 상태 유지는 두 명령 — 아니면 AI 도구에게 한 줄이면 된다.
+ AI 도구에 요청하기 (추천)
+ 프로젝트에서 다음과 같이 말한다:
+ cladding을 최신 버전으로 업데이트해줘.
+ AI 도구에 터미널 및 전역 설치 권한이 있으면 CLI 업데이트, 호스트 배선 갱신, 현재 프로젝트 업데이트를 수행하고 새로 발견한 어긋남을 설명한다. 권한이 없으면 승인하거나 직접 실행할 명령을 안내한다.
+ 또는 터미널에서 직접 업데이트하기
npm update -g cladding # 1. 새 버전 받기
-cd <project> # 2. 프로젝트로 이동
-clad update # 3. 맞춰 정렬
- 코드 · spec.yaml · 문서는 그대로 둔다 — 더 엄격해진 버전은 짚어만 준다, 스스로 막거나 고치지 않는다. 위 두 명령이 새 어긋남을 짚으면, 그건 AI 도구에 넘기면 된다:
- [AI 도구 안] 업데이트가 짚은 어긋남을 정리해줘
- …아니면 두 명령을 건너뛰고 init 때처럼 그냥 말해도 된다 — 업데이트까지 알아서 해준다:
- [AI 도구 안] cladding 최신 버전으로 업데이트해줘
+cd <project> # 2. Cladding 프로젝트로 이동
+clad update # 3. 프로젝트 연결과 파생 데이터를 함께 갱신
+ clad update는 업데이트하려는 각 Cladding 프로젝트에서 실행한다. 프로젝트 전용 setup 갱신까지 함께 수행하므로 별도의 clad setup은 필요 없다. 사용자가 작성한 코드 · 기능/스펙 본문 · 문서는 보존되며, 파생 데이터와 Cladding 관리 지침 블록만 갱신될 수 있다. 새 버전이 어긋남을 발견하면 그 결과를 AI 도구에 넘기면 된다:
+ 업데이트가 짚은 어긋남을 정리해줘.
Status
@@ -560,7 +574,7 @@ Status
|
version
- v0.8.3
+ v0.9.0
2026-07
|
@@ -570,7 +584,7 @@ Status
|
tests
- 2497/2497
+ 2561/2561
all pass
|
@@ -580,13 +594,13 @@ Status
|
features
- 254
- 251 done · 자기 스펙
+ 255
+ 252 done · 자기 스펙
|
- 234 test files · capability 6개 · coverage는 COVERAGE_DROP detector가 하락 차단
+ 236 test files · capability 6개 · coverage는 COVERAGE_DROP detector가 하락 차단
Ironclad 1.0까지의 길 — 1.0은 독립적인 두 개의 구현이 L4 검증 셋을 통과해야 잠긴다 (GOVERNANCE § 1). cladding이 첫 번째.
diff --git a/README.ko.md b/README.ko.md
index 452c6bf3..427e761c 100644
--- a/README.ko.md
+++ b/README.ko.md
@@ -6,13 +6,13 @@
기업이 AI에게 코딩을 맡기려면 세 가지가 필요하다 —
믿을 수 있고, 추적되고, 규모가 커져도 흔들리지 않아야 한다. cladding이 그 셋을 만든다.
- cladding(외장재)이라는 이름 그대로, 호스트 LLM(Claude Code · Codex · Gemini · Cursor)을 감싼다: 일을 시작하기 전엔 프로젝트의 의도를 넣어 주고, 마친 후엔 41개 검출기와 15단계 게이트로 결과를 검증한다.
+ cladding(외장재)이라는 이름 그대로, 호스트 LLM(Claude Code · Codex · Gemini · Antigravity · Cursor)을 감싼다: 일을 시작하기 전엔 프로젝트의 의도를 넣어 주고, 마친 후엔 41개 검출기와 15단계 게이트로 결과를 검증한다.
-
+
@@ -31,7 +31,7 @@
- **추적** — **나간 것은 기록에 남는다**: 무엇을 검증했는지는 커밋된 내용에 새겨지고, 누가·언제는 로컬 세션 로그에, 왜는 스펙에 남아, 인수인계와 리뷰가 파헤치지 않아도 된다.
- **확장** — 사람과 AI를 늘리면 보통 충돌과 어긋남도 함께 불어난다. 하지만 모두가 스펙 하나를 기준으로 일하니 그게 자동으로 걸린다 — 그래서 규모를 키워도 무너지지 않는다.
-cladding은 **자기 자신도 cladding으로 만든다** — 기능 254개 중 251개가 같은 게이트를 통과했고, [Ironclad](https://github.com/qwerfunch/ironclad) 표준을 L4로 구현한 첫 사례다.
+cladding은 **자기 자신도 cladding으로 만든다** — 기능 255개 중 252개가 같은 게이트를 통과했고, [Ironclad](https://github.com/qwerfunch/ironclad) 표준을 L4로 구현한 첫 사례다.
@@ -46,7 +46,7 @@ cladding은 **자기 자신도 cladding으로 만든다** — 기능 254개 중
| **세션을 실패 상태로 끝낼 때** | 그대로 종료, 다음에 잊힘 | 종료를 한 번 막고, 실패한 검사를 수리 카드로 인계 |
| **두 명이 동시에 feature 추가** | merge conflict | hash-8 ID · 파일 분리 → 충돌 0 |
| **AI가 짠 코드를 누가 검증?** | 작성한 AI가 자기 검증 (위험) | 구현을 못 보는 채점자 + 기계 관문 |
-| **AI 도구를 바꿀 때** | 도구마다 재구성 | 1 spec → 4 host 자동 연결 |
+| **AI 도구를 바꿀 때** | 도구마다 재구성 | 1 spec → 5 host 자동 연결 |
## 누구를 위한 것
@@ -66,7 +66,7 @@ cladding은 **자기 자신도 cladding으로 만든다** — 기능 254개 중
**후 — 결과를 검증한다:** 15단계 게이트 · 41개 어긋남 검출기 · 그리고 **구현을 못 보는 채점자** — 구현을 읽을 도구 없이 산출물을 스펙과 대조하는 에이전트라, 자기가 쓴 것에 도장을 찍어 줄 수 없다.
-실시간 개입(지도 주입 · 즉시 차단 · 종료 차단)은 Claude Code에서 전부 동작한다. Codex · Gemini · Cursor에서는 같은 검증을 대화 속 도구 호출과 git · CI 관문으로 수행한다.
+실시간 개입(지도 주입 · 즉시 차단 · 종료 차단)은 Claude Code에서 전부 동작한다. Codex · Gemini · Antigravity · Cursor에서는 같은 검증을 대화 속 도구 호출과 git · CI 관문으로 수행한다.
@@ -240,63 +240,107 @@ cladding의 차별점은 *결합* — 위 카테고리의 핵심을 *하나의
## Install
+### 1. 컴퓨터에 한 번 설치하기
+
```bash
npm install -g cladding # cladding CLI 설치
-cd # 프로젝트로 이동
-clad setup # AI 도구 자동 연결 (Claude · Codex · Gemini · Cursor)
```
-각 호스트는 cladding을 AI가 알아서 호출하는 MCP 서버로 연결한다 — `/mcp` 명령도 수동 연결 단계도 없이, 그냥 대화하면 된다.
+이 단계는 어느 디렉터리에서 실행해도 된다. CLI만 설치하며 AI 도구에는 아직 Cladding 정보가 들어가지 않는다.
+
+### 2. 사용할 프로젝트만 연결하고 AI 도구 실행하기
+
+```bash
+cd
+clad setup # 이 프로젝트에만 AI 도구 연결
+
+# 정확히 하나를 골라 앞의 '#'을 지우고 실행한다:
+# codex # Codex
+# claude # Claude Code
+# gemini # Gemini CLI
+# agy # Antigravity
+# cursor-agent # Cursor Agent
+```
+
+`clad setup`은 이 머신에서 감지된 AI 도구(Claude Code · Codex · Gemini · Antigravity · Cursor)를 현재 프로젝트에만 연결한다 — 단 Antigravity는 프로젝트-로컬 MCP 설정을 읽지 않는 호스트라 유일하게 머신 단위로 연결된다(자세한 내용은 [setup 문서](docs/setup.md)). 설정하지 않은 다른 프로젝트의 모델 컨텍스트에는 Cladding skill이나 MCP 도구가 들어가지 않는다. Cursor IDE는 `` 폴더를 작업공간으로 연다. setup 뒤에는 반드시 이 폴더에서 AI 도구를 새 세션으로 시작한다. Codex와 Gemini가 프로젝트 신뢰 여부를 물으면 각 호스트의 정상 보안 경계에 따라 승인한다. 신뢰하기 전에는 프로젝트 로컬 MCP 설정이 의도적으로 적용되지 않는다.
+
+### 3. 프로젝트에 Cladding 한 번 적용하기
+
+자신의 시작 상황에 맞는 요청을 AI 도구에 자연스럽게 말한다.
+
+Cladding은 먼저 프로젝트를 읽기 전용으로 조사한다. AI가 정확한 파일 작업과 일회용 승인 문구를 보여주며, 사용자가 별도 답변에서 그 문구를 그대로 입력해야만 초기화가 시작된다. 프로젝트를 열거나 Cladding에 관해 질문하는 것만으로는 어떤 파일도 변경되지 않는다.
+이 정확 일치 단계는 우발적인 적용을 막지만, MCP는 도구 인자를 실제로 어느 사용자가 만들었는지 증명할 수 없다. 따라서 악의적이거나 침해된 호스트를 격리하는 샌드박스로 보아서는 안 된다.
+
+#### 아이디어만 있을 때
+
+```
+B2B 결제 SaaS를 cladding으로 시작해줘.
+```
+
+LLM이 도메인을 분석해 spec · 문서 · 정책을 만든다. 중요한 제품 결정이 실제로 비어 있을 때만 후속 질문을 최대 3개 하며, 완성된 기획에는 질문하지 않는다.
-그다음, 프로젝트당 한 번, AI 도구 안에서 init을 호출한다:
+#### 기획 문서가 있을 때
```
-[AI 도구 안] /cladding:init "B2B 결제 SaaS"
+docs/plan.md를 기준으로 cladding을 적용해줘.
```
-프로젝트의 `spec.yaml` 과 관련 문서가 만들어진다. 그 뒤론 평소처럼 개발하면 된다 — cladding이 배경에서 전 · 후 루프를 돌리니 따로 외울 것은 없다. 강제력을 높이려면 `clad init --with-hook`(pre-commit + pre-push git hook) 이나 `clad init --with-ci`(CI 게이트 스캐폴드 — 진짜 강제는 CI에서 산다).
+파일을 읽고 그 내용을 프로젝트 intent로 사용한다.
-| 시작 상황 | 명령 | 무엇이 일어나는가 |
-|---|---|---|
-| **아이디어만 있을 때** | `/cladding:init "B2B 결제 SaaS 만들거야"` | LLM이 도메인 분석 → spec · 문서 · 정책 자동 생성 + 후속 질문 2–3개 |
-| **기획 문서가 있을 때** | `/cladding:init docs/plan.md` | 파일을 로드해 내용을 intent로 사용 |
-| **기존 프로젝트 도입** | `/cladding:init "이 프로젝트에 cladding 적용해줘"` | 기존 코드 스캔 → 관찰한 패턴을 intent와 결합 |
+#### 기존 프로젝트에 도입할 때
-**호스트 지원 현황(정직 고지):** Claude Code는 실사용 캠페인으로 전 기능 검증됨(실시간 개입 포함). Codex · Gemini CLI는 연결은 자동이지만, 동작은 아직 검증 전이다. Cursor는 연결은 자동이지만 실사용 검증이 아직이다. → [설치 상세 · 호스트 배선 · MCP · 업그레이드](docs/setup.md)
+```
+현재 코드를 분석해서 cladding을 적용해줘.
+```
+
+기존 코드를 스캔하고, 관찰한 패턴을 사용자의 intent와 결합한다.
+
+> **초기화가 끝나면 같은 대화에서 바로 개발을 이어가면 된다.** 다음 기능을 자연어로 요청하면 AI가 생성된 spec과 문서를 기준으로 개발하고, 중요한 설계 변경도 프로젝트 성장에 맞춰 함께 반영한다. 검사는 호스트가 호출할 때 실행되며, 자동 강제가 필요하면 선택형 Git hook이나 CI 게이트를 사용한다.
+
+```
+이메일 로그인 기능을 테스트까지 포함해서 구현해줘.
+```
+
+새로 외울 명령은 없다. 호스트별 명시 호출법, 더 강한 Git/CI 적용, 검증된 호스트 현황은 [설치 상세](docs/setup.md)에서 확인할 수 있다.
## Update
-최신 상태 유지는 두 명령 — 아니면 AI 도구에게 한 줄이면 된다.
+### AI 도구에 요청하기 (추천)
-```bash
-npm update -g cladding # 1. 새 버전 받기
-cd # 2. 프로젝트로 이동
-clad update # 3. 맞춰 정렬
+프로젝트에서 다음과 같이 말한다:
+
+```
+cladding을 최신 버전으로 업데이트해줘.
```
-코드 · `spec.yaml` · 문서는 그대로 둔다 — 더 엄격해진 버전은 **짚어만 준다**, 스스로 막거나 고치지 않는다. 위 두 명령이 새 어긋남을 짚으면, 그건 AI 도구에 넘기면 된다:
+AI 도구에 터미널 및 전역 설치 권한이 있으면 CLI 업데이트, 호스트 배선 갱신, 현재 프로젝트 업데이트를 수행하고 새로 발견한 어긋남을 설명한다. 권한이 없으면 승인하거나 직접 실행할 명령을 안내한다.
-```
-[AI 도구 안] 업데이트가 짚은 어긋남을 정리해줘
+### 또는 터미널에서 직접 업데이트하기
+
+```bash
+npm update -g cladding # 1. 새 버전 받기
+cd # 2. Cladding 프로젝트로 이동
+clad update # 3. 프로젝트 연결과 파생 데이터를 함께 갱신
```
-…아니면 두 명령을 건너뛰고 init 때처럼 그냥 말해도 된다 — 업데이트까지 알아서 해준다:
+`clad update`는 업데이트하려는 각 Cladding 프로젝트에서 실행한다. 사용자가 작성한 코드 · 기능/스펙 본문 · 문서는 보존되며, 프로젝트 전용 호스트 연결과 파생 데이터, `AGENTS.md`의 Cladding 관리 블록만 갱신될 수 있다. 새 버전이 어긋남을 발견하면 그 결과를 AI 도구에 넘기면 된다:
```
-[AI 도구 안] cladding 최신 버전으로 업데이트해줘
+업데이트가 짚은 어긋남을 정리해줘.
```
+
## Status
| version | 준수 등급 | tests | gate | features |
|---|---|---|---|---|
-| v0.8.3 · 2026-07 | L4 · [L0–L4 중 최고 · 자가 선언](https://github.com/qwerfunch/ironclad/blob/main/GOVERNANCE.md) | 2497 / 2497 · all pass | 15 단계 · 41 detectors | 254 · 251 done · 자기 스펙 |
+| v0.9.0 · 2026-07 | L4 · [L0–L4 중 최고 · 자가 선언](https://github.com/qwerfunch/ironclad/blob/main/GOVERNANCE.md) | 2561 / 2561 · all pass | 15 단계 · 41 detectors | 255 · 252 done · 자기 스펙 |
-234 test files · capability 6개 · coverage는 COVERAGE_DROP detector가 하락 차단
+236 test files · capability 6개 · coverage는 COVERAGE_DROP detector가 하락 차단
> **Ironclad 1.0까지의 길** — 1.0은 *독립적인 두 개의 구현이 L4 검증 셋을 통과해야* 잠긴다 ([GOVERNANCE § 1](https://github.com/qwerfunch/ironclad/blob/main/GOVERNANCE.md)). cladding이 첫 번째.
diff --git a/README.md b/README.md
index ee2d2a8a..5a874322 100644
--- a/README.md
+++ b/README.md
@@ -6,13 +6,13 @@
To trust AI with coding, an organization needs three things — that the code can be trusted,
that it's traced, and that it holds up as you scale. cladding builds those three.
- True to its name (cladding = the outer layer), it wraps your host LLM (Claude Code · Codex · Gemini · Cursor): before it starts, cladding feeds it the project's intent; after it finishes, cladding verifies the result with 41 detectors and a 15-stage gate.
+ True to its name (cladding = the outer layer), it wraps your host LLM (Claude Code · Codex · Gemini · Antigravity · Cursor): before it starts, cladding feeds it the project's intent; after it finishes, cladding verifies the result with 41 detectors and a 15-stage gate.
-
+
@@ -31,7 +31,7 @@ So you can ship AI-written code held to **the same standard as human-written cod
- **Traced** — **What shipped is on the record**: what was verified is stamped into committed content, who and when land in the local session ledger, and the why lives in the spec — so handoff and review skip the archaeology.
- **Scales** — adding people and AIs would normally multiply conflicts and drift; because everyone works from one shared spec, those get caught automatically — so you can grow without it breaking down.
-cladding builds **itself** with cladding too — 251 of its 254 features cleared this same gate, the first L4 implementation of the [Ironclad](https://github.com/qwerfunch/ironclad) standard.
+cladding builds **itself** with cladding too — 252 of its 255 features cleared this same gate, the first L4 implementation of the [Ironclad](https://github.com/qwerfunch/ironclad) standard.
@@ -46,7 +46,7 @@ The same situation, in a *vanilla AI setup* and in cladding.
| **Ending a session in a failing state** | exits as-is, forgotten next time | the exit is blocked once, the failing checks handed off as a repair card |
| **Two devs add a feature at the same time** | merge conflict | hash-8 IDs · separate files → 0 conflicts |
| **Who verifies the AI-written code?** | the AI that wrote it self-certifies (risky) | an implementation-blind grader + the mechanical gate |
-| **Switching AI tools** | reconfigure per tool | one spec → 4 hosts wired automatically |
+| **Switching AI tools** | reconfigure per tool | one spec → 5 hosts wired automatically |
## Who it's for
@@ -66,7 +66,7 @@ The same situation, in a *vanilla AI setup* and in cladding.
**After — verify the result:** the 15-stage gate, 41 drift detectors, and an **implementation-blind grader** — an agent that checks the work against the spec *with no tool to read the implementation*, so it can't rubber-stamp what it wrote.
-Real-time intervention (map injection · instant block · stop-block) runs fully on Claude Code. On Codex · Gemini · Cursor the same verification runs through in-conversation tool calls plus the git · CI gate.
+Real-time intervention (map injection · instant block · stop-block) runs fully on Claude Code. On Codex · Gemini · Antigravity · Cursor the same verification runs through in-conversation tool calls plus the git · CI gate.
@@ -237,65 +237,124 @@ The distinction is the *combination* — binding those cores into *one verificat
## Install
+### 1. Install once on your machine
+
```bash
-npm install -g cladding # the cladding CLI
-cd # your project
-clad setup # auto-wire your AI tools (Claude · Codex · Gemini · Cursor)
+npm install -g cladding # install only the cladding CLI
```
-Each host wires cladding as an MCP server the AI calls on its own — there's no `/mcp` command and no manual connect step; you just chat.
+This command may be run from any directory. It does not add Cladding to any AI model's context.
-Then, once per project, call init inside your AI tool:
+### 2. Activate one project, then start your AI tool
+```bash
+cd
+clad setup # connect Cladding only to this project
+
+# Choose exactly one and remove its leading '#':
+# codex # Codex
+# claude # Claude Code
+# gemini # Gemini CLI
+# agy # Antigravity
+# cursor-agent # Cursor Agent
```
-[inside your AI tool] /cladding:init "B2B payment SaaS"
+
+`clad setup` connects the AI tools it detects on your machine (Claude Code, Codex, Gemini, Antigravity,
+Cursor) to this project only — Antigravity is the one exception, wired machine-wide because it reads no
+project-local MCP config (details in [setup](docs/setup.md)). It does not expose Cladding skills or MCP
+tools in projects where setup was not run. Use only the command
+for your AI tool; for Cursor IDE, open `` as the workspace. Start a new AI session from this
+folder after setup so the host discovers the project-local connection. When Codex first opens a Git
+repository, approve its normal project-trust prompt; Codex intentionally ignores project MCP config
+until the repository is trusted.
+
+### 3. Apply Cladding once
+
+Choose the starting point that fits and say it naturally in your AI tool.
+
+Cladding first inspects the project without changing it. Your AI shows the exact file operations and
+a one-time approval phrase; initialization begins only when you repeat that phrase in a separate reply.
+Opening a project or asking a question about Cladding never authorizes file changes.
+This exact-match step prevents accidental application; MCP cannot prove which user produced a tool
+argument, so it is not a sandbox against a malicious or compromised host.
+
+#### An idea, nothing else
+
```
+Start this B2B payment SaaS with Cladding.
+```
+
+The LLM analyzes the domain and creates the spec, docs, and policies. It asks up to three follow-up
+questions only when an important product decision is still unresolved; a complete plan asks none.
-It creates the project's `spec.yaml` and supporting docs. After that, just develop as usual — cladding runs the before/after loop in the background, with nothing to memorize. Raise enforcement with `clad init --with-hook` (pre-commit + pre-push git hooks) or `clad init --with-ci` (scaffold the CI gate, where true enforcement lives).
+#### A planning document
-| Starting point | Command | What happens |
-|---|---|---|
-| **An idea, nothing else** | `/cladding:init "I'm going to build a B2B payment SaaS"` | the LLM analyzes the domain → spec · docs · policies + 2–3 follow-up questions |
-| **A planning doc** | `/cladding:init docs/plan.md` | loads the file and uses its contents as intent |
-| **An existing project** | `/cladding:init "apply cladding to this project"` | scans the existing code → observed patterns merged with your intent |
+```
+Apply Cladding using docs/plan.md.
+```
-**Host support (honest):** Claude Code is fully verified through real-usage campaigns (incl. real-time intervention). Codex · Gemini CLI wire automatically; their behavior isn't verified yet. Cursor wires automatically, but real-usage verification is still pending. → [setup details · host wiring · MCP · upgrading](docs/setup.md)
+Cladding loads the file and uses its contents as the project intent.
-
+#### An existing project
+
+```
+Analyze this project and apply Cladding.
+```
+
+Cladding scans the existing code and combines the observed patterns with your intent.
+
+> **Once initialization is complete, keep developing in the same conversation.** Ask for the next feature in plain language; the AI uses the generated spec and docs and keeps material design changes aligned as the project grows. Checks run when the host invokes them; use the optional Git hooks or CI gate when you want automatic enforcement.
+
+```
+Implement email sign-in, including tests.
+```
+
+There is nothing new to memorize. For host-specific invocation, stricter Git/CI enforcement, and verified host status, see [setup details](docs/setup.md).
+
+
## Update
-Staying current is two commands — or one line to your AI tool.
+### Ask your AI tool (recommended)
+
+From your project, say:
-```bash
-npm update -g cladding # 1. get the new version
-cd # 2. your project
-clad update # 3. bring it in line
+```
+Update cladding to the latest version.
```
-Your code · `spec.yaml` · docs are left untouched — a stricter version only **points things out**, it never blocks or fixes on its own. If those two commands flag fresh drift, hand it to your AI tool:
+If the AI tool has terminal and global-install permission, it updates the CLI, refreshes host wiring,
+updates the current project, and explains any new drift. Otherwise, it shows the commands for you to approve or run.
-```
-[inside your AI tool] reconcile the drift the update flagged
+### Or update from the terminal
+
+```bash
+npm update -g cladding # 1. get the new CLI version
+cd # 2. enter one Cladding project
+clad update # 3. refresh its host wiring and derived state
```
-…or skip the commands and just ask, the same way you ran init — it runs the update for you:
+Run `clad update` in each Cladding project you want to upgrade. It also performs the project-scoped
+setup refresh, so a separate `clad setup` is unnecessary. It preserves authored code, feature/spec
+content, and documentation; only derived data and Cladding-managed instruction blocks may be refreshed. If the new version reports drift,
+hand that result to your AI tool:
```
-[inside your AI tool] update cladding to the latest version
+Reconcile the drift the update flagged.
```
+
## Status
| Version | Conformance | Tests | Gate | Features |
|---|---|---|---|---|
-| v0.8.3 (2026-07) | L4 · [self-declared](https://github.com/qwerfunch/ironclad/blob/main/GOVERNANCE.md) | 2497 / 2497 | 15 stages · 41 detectors | 254 (251 done) |
+| v0.9.0 (2026-07) | L4 · [self-declared](https://github.com/qwerfunch/ironclad/blob/main/GOVERNANCE.md) | 2561 / 2561 | 15 stages · 41 detectors | 255 (252 done) |
-234 test files · 6 capabilities · coverage drop blocked by the COVERAGE_DROP detector
+236 test files · 6 capabilities · coverage drop blocked by the COVERAGE_DROP detector
> **Road to Ironclad 1.0** — 1.0 locks only when *two independent implementations pass the L4 conformance fixtures* ([GOVERNANCE § 1](https://github.com/qwerfunch/ironclad/blob/main/GOVERNANCE.md)). cladding is the first.
diff --git a/README.zh.md b/README.zh.md
index ffdd6f36..92561978 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -6,13 +6,13 @@
要放心把编码交给 AI,一个组织需要三样东西 ——
代码可信、过程可追溯、规模扩张时依然稳固。cladding 把这三样一手做齐。
- 正如其名(cladding = 外覆层),它包裹住你的宿主 LLM(Claude Code · Codex · Gemini · Cursor):在它动手之前,cladding 先把项目的意图喂给它;在它收尾之后,cladding 用 41 个检测器和 15 阶段门禁验证结果。
+ 正如其名(cladding = 外覆层),它包裹住你的宿主 LLM(Claude Code · Codex · Gemini · Antigravity · Cursor):在它动手之前,cladding 先把项目的意图喂给它;在它收尾之后,cladding 用 41 个检测器和 15 阶段门禁验证结果。
-
+
@@ -31,7 +31,7 @@
- **可追溯** —— **交付出去的一切都留有记录**:验证了什么,写进已提交的内容;谁、何时,记在本地会话账本;为什么,留在 spec —— 于是交接与评审无需考古,就能追溯每一个决定。
- **可扩展** —— 人和 AI 越多,通常冲突和漂移也越多。但所有人都以同一份 spec 为基准,这些会被自动挡下 —— 所以不断扩张也不会崩。
-cladding 连**自己**也是用 cladding 造的 —— 254 个 feature 里有 251 个通过了同一道门禁,成为 [Ironclad](https://github.com/qwerfunch/ironclad) 标准的首个 L4 实现。
+cladding 连**自己**也是用 cladding 造的 —— 255 个 feature 里有 252 个通过了同一道门禁,成为 [Ironclad](https://github.com/qwerfunch/ironclad) 标准的首个 L4 实现。
@@ -46,7 +46,7 @@ cladding 连**自己**也是用 cladding 造的 —— 254 个 feature 里有 25
| **在失败状态下结束会话** | 原样退出,下次就忘了 | 退出被拦一次,把失败的检查作为修复卡片交接下去 |
| **两名开发者同时新增 feature** | 合并冲突 | 8 位 hash ID · 各自成文件 → 零冲突 |
| **AI 写的代码谁来验证?** | 谁写谁自证(有风险) | 一个看不到实现的评分者 + 机械门禁 |
-| **切换 AI 工具** | 每换一个工具就重配一次 | 一份 spec → 自动接通 4 个宿主 |
+| **切换 AI 工具** | 每换一个工具就重配一次 | 一份 spec → 自动接通 5 个宿主 |
## 适合谁
@@ -66,7 +66,7 @@ cladding 连**自己**也是用 cladding 造的 —— 254 个 feature 里有 25
**之后 —— 验证结果:** 15 阶段门禁、41 个漂移检测器,外加一个**看不到实现的评分者** —— 这个智能体对照 spec 核查成果,却*没有任何读取实现的工具*,因此无法给自己写下的东西盖章放行。
-实时干预(注入地图 · 当场拦截 · 退出拦截)在 Claude Code 上全部可用。在 Codex · Gemini · Cursor 上,同样的验证通过对话中的工具调用,再加 git · CI 门禁来完成。
+实时干预(注入地图 · 当场拦截 · 退出拦截)在 Claude Code 上全部可用。在 Codex · Gemini · Antigravity · Cursor 上,同样的验证通过对话中的工具调用,再加 git · CI 门禁来完成。
@@ -237,63 +237,107 @@ cladding 的独到之处在于*组合* —— 把上述品类的内核,绑进*
## Install
+### 1. 在电脑上安装一次
+
```bash
npm install -g cladding # 安装 cladding CLI
-cd # 进入项目目录
-clad setup # 自动接通你的 AI 工具(Claude · Codex · Gemini · Cursor)
```
-每个宿主都把 cladding 接为一台 MCP 服务器,由 AI 自行调用 —— 没有 `/mcp` 命令,也无需手动连接,照常对话即可。
+这条命令可以在任何目录运行。它只安装 CLI,不会把 Cladding 加入任何 AI 模型的上下文。
+
+### 2. 只激活要使用的项目,然后启动 AI 工具
+
+```bash
+cd
+clad setup # 只为这个项目连接 Cladding
+
+# 只选择一个,并删除行首的“#”后运行:
+# codex # Codex
+# claude # Claude Code
+# gemini # Gemini CLI
+# agy # Antigravity
+# cursor-agent # Cursor Agent
+```
+
+`clad setup` 只把本机检测到的 AI 工具(Claude Code、Codex、Gemini、Antigravity、Cursor)连接到当前项目 —— 唯一的例外是 Antigravity:它不读取项目本地的 MCP 配置,因此只能按机器级别连接(详见 [setup 文档](docs/setup.md))。没有运行 setup 的其他项目,其模型上下文不会出现 Cladding skill 或 MCP 工具。只需运行自己所用 AI 工具对应的一条命令;使用 Cursor IDE 时,把 `` 作为工作区打开。setup 后请从此文件夹启动新的 AI 会话。Codex 或 Gemini 询问是否信任项目时,请按照各自主机的正常安全边界确认;在此之前,项目本地 MCP 配置会被有意忽略。
+
+### 3. 为项目应用一次 Cladding
+
+根据自己的起点,用自然语言告诉 AI 工具。
+
+Cladding 会先以只读方式检查项目。AI 会展示准确的文件操作和一次性批准短语;只有当用户在单独回复中原样输入该短语时,初始化才会开始。仅仅打开项目或询问 Cladding 不会修改任何文件。
+这种精确匹配可防止意外应用,但 MCP 无法证明工具参数实际上由哪位用户提供;因此它不是隔离恶意或已受侵主机的沙箱。
+
+#### 只有一个想法时
+
+```
+用 cladding 开始这个 B2B 支付 SaaS。
+```
+
+LLM 会分析领域并创建 spec、文档和策略。只有关键产品决策尚未明确时才会提出最多 3 个后续问题;完整的规划不会被强制追问。
-随后,每个项目一次,在你的 AI 工具中调用 init:
+#### 已有规划文档时
```
-[在你的 AI 工具中] /cladding:init "B2B 支付 SaaS"
+根据 docs/plan.md 应用 cladding。
```
-它会创建项目的 `spec.yaml` 与配套文档。此后照常开发即可 —— cladding 会在后台跑那套「之前 / 之后」循环,没有需要记的命令。想提高强制力:`clad init --with-hook`(安装 pre-commit + pre-push git 钩子)或 `clad init --with-ci`(搭好 CI 门禁的脚手架 —— 真正的强制力在 CI 里)。
+Cladding 会加载该文件,并将其内容作为项目意图。
-| 起点 | 命令 | 会发生什么 |
-|---|---|---|
-| **只有一个想法,别无其他** | `/cladding:init "我要做一个 B2B 支付 SaaS"` | LLM 分析领域 → 生成 spec · 文档 · 策略 + 2–3 个追问 |
-| **已有一份规划文档** | `/cladding:init docs/plan.md` | 加载该文件,用其内容作为意图 |
-| **接入已有项目** | `/cladding:init "把 cladding 应用到这个项目"` | 扫描现有代码 → 把观察到的模式与你的意图融合 |
+#### 接入已有项目时
-**宿主支持(诚实说明):** Claude Code 已通过真实使用的实测(含实时干预)全面验证。Codex · Gemini CLI 已自动接线,但行为尚未验证。Cursor 会自动接线,但真实使用的验证仍待补。→ [安装细节 · 宿主接线 · MCP · 升级](docs/setup.md)
+```
+分析当前代码并应用 cladding。
+```
+
+Cladding 会扫描现有代码,并把观察到的模式与你的意图结合起来。
+
+> **初始化完成后,直接在同一段对话中继续开发即可。** 用自然语言提出下一个功能,AI 会依据生成的 spec 和文档开发,并让重要设计随项目成长同步演进。检查会在宿主调用时运行;如需自动强制,请启用可选的 Git hook 或 CI gate。
+
+```
+实现邮箱登录功能,并包含测试。
+```
+
+无需再记新的命令。宿主专用调用方式、更严格的 Git/CI 执行方式以及已验证的宿主状态,请参阅[安装细节](docs/setup.md)。
## Update
-保持最新只需两条命令 —— 或者对你的 AI 工具说一句话。
+### 让 AI 工具更新(推荐)
-```bash
-npm update -g cladding # 1. 取得新版本
-cd # 2. 进入项目目录
-clad update # 3. 与新版对齐
+在项目中这样说:
+
+```
+把 cladding 更新到最新版本。
```
-你的代码 · `spec.yaml` · 文档都原封不动 —— 更严格的版本只是把东西**指出来**,既不拦截,也不擅自修改。若上面这两条命令标出了新的漂移,把它交给你的 AI 工具即可:
+如果 AI 工具有终端和全局安装权限,它会更新 CLI、刷新宿主接线、更新当前项目,并解释新发现的漂移;否则,它会给出需要批准或手动执行的命令。
-```
-[在你的 AI 工具中] 修复这次更新标出的漂移
+### 或在终端中直接更新
+
+```bash
+npm update -g cladding # 1. 取得新版本
+cd # 2. 进入 Cladding 项目
+clad update # 3. 刷新项目连接和派生状态
```
-…或者跳过这两条命令,像你当初跑 init 那样直接说一句 —— 它会连更新一起帮你做:
+`clad update` 需要在每个要升级的 Cladding 项目中运行。它会同时刷新项目级 setup,因此不必另外运行 `clad setup`。用户编写的代码、功能/spec 正文和文档会保留;只有派生数据和 Cladding 管理的指令区块可能被刷新。如果新版本报告了漂移,把结果交给 AI 工具即可:
```
-[在你的 AI 工具中] 把 cladding 更新到最新版本
+修复这次更新标出的漂移。
```
+
## Status
| 版本 | 一致性 | Tests | Gate | Features |
|---|---|---|---|---|
-| v0.8.3(2026-07) | L4 · [自我声明](https://github.com/qwerfunch/ironclad/blob/main/GOVERNANCE.md) | 2497 / 2497 | 15 阶段 · 41 检测器 | 254(251 done) |
+| v0.9.0(2026-07) | L4 · [自我声明](https://github.com/qwerfunch/ironclad/blob/main/GOVERNANCE.md) | 2561 / 2561 | 15 阶段 · 41 检测器 | 255(252 done) |
-234 个测试文件 · 6 项 capability · 覆盖率下降由 COVERAGE_DROP 检测器拦下
+236 个测试文件 · 6 项 capability · 覆盖率下降由 COVERAGE_DROP 检测器拦下
> **通往 Ironclad 1.0 之路** —— 只有当*两个独立实现都通过 L4 一致性测试夹具*时,1.0 才会锁定([GOVERNANCE § 1](https://github.com/qwerfunch/ironclad/blob/main/GOVERNANCE.md))。cladding 是第一个。
diff --git a/docs/ab-evaluation/case-existing-adoption.md b/docs/ab-evaluation/case-existing-adoption.md
index 673575a0..54cd6394 100644
--- a/docs/ab-evaluation/case-existing-adoption.md
+++ b/docs/ab-evaluation/case-existing-adoption.md
@@ -41,8 +41,8 @@ No spec, no architecture invariants — just code on the existing tree.
| Architecture layers | 3 | 0 | +3 |
| Forbidden-import rules | 0 | 0 | +0 |
| Detector errors | 0 | 1 | -1 |
-| Detector warnings | 5 | 3 | +2 |
-| Detector infos | 6 | 28 | -22 |
+| Detector warnings | 1 | 3 | -2 |
+| Detector infos | 10 | 28 | -18 |
| Tiered doc files | 2 | 0 | +2 |
| Tiered docs (lines) | 139 | 0 | +139 |
| Other doc files | 1 | 1 | +0 |
@@ -51,13 +51,13 @@ No spec, no architecture invariants — just code on the existing tree.
| Test files | 1 | 1 | +0 |
| Test LoC | 14 | 14 | +0 |
| Test cases | 1 | 1 | +0 |
-| Total chars (artifacts + code) | 10843 | 3864 | +6979 |
-| Estimated tokens | 2713 | 967 | +1746 |
+| Total chars (artifacts + code) | 11268 | 3864 | +7404 |
+| Estimated tokens | 2819 | 967 | +1852 |
**Detector outcomes** (META_INTEGRITY + HARDCODED_SECRET excluded — toolchain-only checks):
```
-A (Cladding) — errors: 0 warns: 5 infos: 6
+A (Cladding) — errors: 0 warns: 1 infos: 10
B (Vanilla) — errors: 1 warns: 3 infos: 28
Sample errors:
@@ -80,8 +80,8 @@ B (Vanilla) — errors: 1 warns: 3 infos: 28
| Architecture layers | 3 | 0 | +3 |
| Forbidden-import rules | 0 | 0 | +0 |
| Detector errors | 1 | 1 | +0 |
-| Detector warnings | 5 | 3 | +2 |
-| Detector infos | 7 | 28 | -21 |
+| Detector warnings | 1 | 3 | -2 |
+| Detector infos | 11 | 28 | -17 |
| Tiered doc files | 2 | 0 | +2 |
| Tiered docs (lines) | 139 | 0 | +139 |
| Other doc files | 1 | 1 | +0 |
@@ -90,13 +90,13 @@ B (Vanilla) — errors: 1 warns: 3 infos: 28
| Test files | 2 | 2 | +0 |
| Test LoC | 27 | 27 | +0 |
| Test cases | 3 | 3 | +0 |
-| Total chars (artifacts + code) | 12386 | 5115 | +7271 |
-| Estimated tokens | 3099 | 1280 | +1819 |
+| Total chars (artifacts + code) | 12811 | 5115 | +7696 |
+| Estimated tokens | 3205 | 1280 | +1925 |
**Detector outcomes** (META_INTEGRITY + HARDCODED_SECRET excluded — toolchain-only checks):
```
-A (Cladding) — errors: 1 warns: 5 infos: 7
+A (Cladding) — errors: 1 warns: 1 infos: 11
Sample errors:
- [AC_DRIFT] F-4db939.AC-002 EARS: ears='unwanted' requires condition starting with 'if' — empty
@@ -110,8 +110,8 @@ B (Vanilla) — errors: 1 warns: 3 infos: 28
- **Structured artifacts**: cladding produces 8 tier-banner-bearing files vs vanilla's 0.
- **Spec ↔ code traceability**: cladding emits 1 feature(s), 2 AC(s), 1 scenario(s), 3 capability(s); vanilla has 0 of each.
- **Architecture enforcement**: cladding declares 3 layer(s) with 0 forbidden-import rule(s); vanilla has 0.
-- **Detector behavior**: cladding-managed tree → 1 error(s) / 5 warn(s) / 7 info(s). Vanilla tree → 1 / 3 / 28. The detectors that gate against spec (REFERENCE_INTEGRITY, MISSING_IMPLEMENTATION, ARCHITECTURE_FROM_SPEC, CAPABILITIES_FEATURE_MAPPING) need cladding's artifacts to evaluate — without them they silently pass. The "0 errors on vanilla" therefore is **absence of signal**, not absence of drift.
-- **Token cost**: cladding's cumulative artifact + code consumes ~3099 tokens vs vanilla's ~1280 (heuristic chars/4) — Δ ≈ 1819 tokens, the price of structure.
+- **Detector behavior**: cladding-managed tree → 1 error(s) / 1 warn(s) / 11 info(s). Vanilla tree → 1 / 3 / 28. The detectors that gate against spec (REFERENCE_INTEGRITY, MISSING_IMPLEMENTATION, ARCHITECTURE_FROM_SPEC, CAPABILITIES_FEATURE_MAPPING) need cladding's artifacts to evaluate — without them they silently pass. The "0 errors on vanilla" therefore is **absence of signal**, not absence of drift.
+- **Token cost**: cladding's cumulative artifact + code consumes ~3205 tokens vs vanilla's ~1280 (heuristic chars/4) — Δ ≈ 1925 tokens, the price of structure.
- **Code surface**: vanilla writes 9 source file(s) / 144 LoC + 2 test file(s) / 3 test case(s); cladding writes 9 / 128 + 2 / 3. (Vanilla front-loads code, cladding front-loads spec — both converge by M2.)
## Outcome Quality (F-ba2e05)
diff --git a/docs/ab-evaluation/case-payment-saas.md b/docs/ab-evaluation/case-payment-saas.md
index de6ac103..549a169b 100644
--- a/docs/ab-evaluation/case-payment-saas.md
+++ b/docs/ab-evaluation/case-payment-saas.md
@@ -40,8 +40,8 @@ no spec, no scenarios, no architecture invariants.
| Architecture layers | 3 | 0 | +3 |
| Forbidden-import rules | 2 | 0 | +2 |
| Detector errors | 0 | 1 | -1 |
-| Detector warnings | 6 | 3 | +3 |
-| Detector infos | 8 | 28 | -20 |
+| Detector warnings | 1 | 3 | -2 |
+| Detector infos | 13 | 28 | -15 |
| Tiered doc files | 2 | 0 | +2 |
| Tiered docs (lines) | 61 | 0 | +61 |
| Other doc files | 0 | 1 | -1 |
@@ -50,13 +50,13 @@ no spec, no scenarios, no architecture invariants.
| Test files | 0 | 1 | -1 |
| Test LoC | 0 | 20 | -20 |
| Test cases | 0 | 2 | -2 |
-| Total chars (artifacts + code) | 6175 | 3463 | +2712 |
-| Estimated tokens | 1545 | 867 | +678 |
+| Total chars (artifacts + code) | 6708 | 3463 | +3245 |
+| Estimated tokens | 1679 | 867 | +812 |
**Detector outcomes** (META_INTEGRITY + HARDCODED_SECRET excluded — toolchain-only checks):
```
-A (Cladding) — errors: 0 warns: 6 infos: 8
+A (Cladding) — errors: 0 warns: 1 infos: 13
B (Vanilla) — errors: 1 warns: 3 infos: 28
Sample errors:
@@ -79,8 +79,8 @@ B (Vanilla) — errors: 1 warns: 3 infos: 28
| Architecture layers | 3 | 0 | +3 |
| Forbidden-import rules | 2 | 0 | +2 |
| Detector errors | 1 | 1 | +0 |
-| Detector warnings | 9 | 3 | +6 |
-| Detector infos | 9 | 28 | -19 |
+| Detector warnings | 3 | 3 | +0 |
+| Detector infos | 15 | 28 | -13 |
| Tiered doc files | 2 | 0 | +2 |
| Tiered docs (lines) | 61 | 0 | +61 |
| Other doc files | 0 | 1 | -1 |
@@ -89,13 +89,13 @@ B (Vanilla) — errors: 1 warns: 3 infos: 28
| Test files | 1 | 2 | -1 |
| Test LoC | 8 | 33 | -25 |
| Test cases | 1 | 4 | -3 |
-| Total chars (artifacts + code) | 7339 | 5592 | +1747 |
-| Estimated tokens | 1836 | 1399 | +437 |
+| Total chars (artifacts + code) | 7872 | 5592 | +2280 |
+| Estimated tokens | 1970 | 1399 | +571 |
**Detector outcomes** (META_INTEGRITY + HARDCODED_SECRET excluded — toolchain-only checks):
```
-A (Cladding) — errors: 1 warns: 9 infos: 9
+A (Cladding) — errors: 1 warns: 3 infos: 15
Sample errors:
- [AC_DRIFT] F-4db939.AC-002 EARS: ears='unwanted' requires condition starting with 'if' — empty
@@ -109,8 +109,8 @@ B (Vanilla) — errors: 1 warns: 3 infos: 28
- **Structured artifacts**: cladding produces 9 tier-banner-bearing files vs vanilla's 0.
- **Spec ↔ code traceability**: cladding emits 1 feature(s), 2 AC(s), 2 scenario(s), 3 capability(s); vanilla has 0 of each.
- **Architecture enforcement**: cladding declares 3 layer(s) with 2 forbidden-import rule(s); vanilla has 0.
-- **Detector behavior**: cladding-managed tree → 1 error(s) / 9 warn(s) / 9 info(s). Vanilla tree → 1 / 3 / 28. The detectors that gate against spec (REFERENCE_INTEGRITY, MISSING_IMPLEMENTATION, ARCHITECTURE_FROM_SPEC, CAPABILITIES_FEATURE_MAPPING) need cladding's artifacts to evaluate — without them they silently pass. The "0 errors on vanilla" therefore is **absence of signal**, not absence of drift.
-- **Token cost**: cladding's cumulative artifact + code consumes ~1836 tokens vs vanilla's ~1399 (heuristic chars/4) — Δ ≈ 437 tokens, the price of structure.
+- **Detector behavior**: cladding-managed tree → 1 error(s) / 3 warn(s) / 15 info(s). Vanilla tree → 1 / 3 / 28. The detectors that gate against spec (REFERENCE_INTEGRITY, MISSING_IMPLEMENTATION, ARCHITECTURE_FROM_SPEC, CAPABILITIES_FEATURE_MAPPING) need cladding's artifacts to evaluate — without them they silently pass. The "0 errors on vanilla" therefore is **absence of signal**, not absence of drift.
+- **Token cost**: cladding's cumulative artifact + code consumes ~1970 tokens vs vanilla's ~1399 (heuristic chars/4) — Δ ≈ 571 tokens, the price of structure.
- **Code surface**: vanilla writes 5 source file(s) / 126 LoC + 2 test file(s) / 4 test case(s); cladding writes 1 / 11 + 1 / 1. (Vanilla front-loads code, cladding front-loads spec — both converge by M2.)
## Outcome Quality (F-ba2e05)
diff --git a/docs/dogfood/antigravity-cli-2026-07-14.md b/docs/dogfood/antigravity-cli-2026-07-14.md
new file mode 100644
index 00000000..c26e83dd
--- /dev/null
+++ b/docs/dogfood/antigravity-cli-2026-07-14.md
@@ -0,0 +1,19 @@
+# Antigravity CLI onboarding campaign — 2026-07-14
+
+- Host: Antigravity CLI (`agy`) 1.1.0
+- Plugin: `plugins/antigravity` (19 skills, one MCP server)
+- Transport: stdio MCP through `clad serve`
+- Result: verified
+
+## Live cases
+
+| Case | Preview before writes | Separate exact approval | Result |
+|---|---:|---:|---|
+| Idea only | pass | pass | initialized; unresolved KYB/KYC choice returned to the user without inventing an answer |
+| Planning document | pass | pass | initialized from `plan.md` with no unnecessary follow-up |
+| Existing project | pass | pass | observed ES modules, two-space indentation, JSDoc, and the Node test runner before adoption |
+| Uninitialized control | n/a | n/a | ordinary file request created only the requested file; no Cladding artifacts or intervention |
+
+AGY runs each printed turn in a separate process. The campaign therefore also verifies the
+machine-local, short-lived approval cache used when a host does not retain the opaque preparation
+token between turns. The approval phrase remains exact, single-use, and expires after 30 minutes.
diff --git a/docs/dogfood/antigravity-cli-2026-07-15.md b/docs/dogfood/antigravity-cli-2026-07-15.md
new file mode 100644
index 00000000..1742370a
--- /dev/null
+++ b/docs/dogfood/antigravity-cli-2026-07-15.md
@@ -0,0 +1,26 @@
+# Antigravity CLI project-scoped onboarding campaign — 2026-07-15
+
+- Host: Antigravity CLI `1.1.2`
+- Transport: `.agents/mcp_config.json` → project `.cladding/host/serve.cjs`
+- Result: verified
+
+The legacy 0.8.3 global plugin was backed up and temporarily disabled so it could not make the project wiring pass vacuously. A shell trap restored the plugin and its configuration after the campaign; the before/after configuration diff was empty.
+
+| Case | Result |
+|---|---|
+| No setup control | only the requested `greeting.txt` was created |
+| Setup-only control | ordinary request completed without initialization or Cladding commentary |
+| Idea | staged draft applied after a separate exact phrase; two material product questions returned |
+| Complete `plan.md` | initialized with the document intent and no follow-up questions |
+| Existing code | existing-adoption initialized while preserving source and tests |
+
+All three initialization cases passed `clad sync`, left no staged cache after apply, and wrote no authored onboarding artifact before approval.
+
+## Post-initialization ordinary development
+
+- Isolation: Antigravity kept its authenticated HOME, but the imported user-global Cladding plugin was disabled and all 25 user-global `cladding-*` skill links were moved to a temporary backup for the live run. The active count was independently observed as zero; the trap restored all 25 links and re-enabled the plugin afterward.
+- Live task: the host added the **Note favorites** feature using only the initialized project's `AGENTS.md`, MCP configuration, init skill, and runtime launcher. The main conversation was `480c524f-6b7e-40e3-a8c5-342409f63648`, and the process exited normally.
+- Independent contexts: conversation `50cdbfb0-39e2-4e05-bd89-a56a9c071ab9` authored the tests, and conversation `e65fbd5d-ee3a-4ac8-9070-bd5c4c571cb5` performed the final review. The reviewer approved the result.
+- Design and completion: the feature was classified additive, linked to the note-favorites capability and the find-and-manage-note journey, and marked done through the project-local completion command.
+- Test collection: `npm test` used the explicit paths `dist/tests/noteArchive.test.js` and `dist/tests/noteFavorites.test.js`; 12/12 tests passed. The same paths passed 12/12 under an independently selected Node 20 runtime.
+- Clean gate: the host created implementation, attestation, and completion commits (`3d19430`, `d90f31d`, `23bd356`). An independent strict check passed every configured stage on a clean tree, and `git diff --check` reported no whitespace errors.
diff --git a/docs/dogfood/claude-code-2026-07-15.md b/docs/dogfood/claude-code-2026-07-15.md
new file mode 100644
index 00000000..e8f3d6c7
--- /dev/null
+++ b/docs/dogfood/claude-code-2026-07-15.md
@@ -0,0 +1,9 @@
+# Claude Code project-scoped onboarding campaign — 2026-07-15
+
+- Host: Claude Code `2.1.207`
+- Authentication: OAuth login present
+- Result: live model campaign blocked by the host quota
+
+Claude reported that the weekly model limit had been reached and would reset on July 17 at 17:00 Asia/Seoul. This is recorded as `not-run`, not a pass or a Cladding failure.
+
+The free structural checks did pass: project setup produced only `.claude/skills/cladding-init`, `.mcp.json`, and the ignored launcher; a direct stdio initialize + `tools/list` handshake reached that launcher and exposed `clad_stage_init`. The natural-language control and three initialization scenarios must be rerun after quota reset before this release can claim a live Claude onboarding pass.
diff --git a/docs/dogfood/codex-cli-2026-07-15.md b/docs/dogfood/codex-cli-2026-07-15.md
new file mode 100644
index 00000000..dcf9bb30
--- /dev/null
+++ b/docs/dogfood/codex-cli-2026-07-15.md
@@ -0,0 +1,61 @@
+# Codex CLI project-scoped onboarding campaign — 2026-07-15
+
+- Host: Codex CLI `0.144.3`
+- Authentication: ChatGPT subscription in an isolated `CODEX_HOME`
+- Transport: trusted-repository `.codex/config.toml` → project `.cladding/host/serve.cjs`
+- Result: onboarding and the first ordinary post-init feature cycle verified
+
+## Live cases
+
+| Case | Result |
+|---|---|
+| No setup control | ordinary `greeting.txt` request completed; zero Cladding files or intervention |
+| Setup-only control | ordinary request completed; only project wiring/runtime files plus `greeting.txt` existed |
+| Idea | prepare → stage → separate exact approval → greenfield initialization passed |
+| Complete `plan.md` | prepare → stage → fresh-process approval passed; intent preserved and no follow-up question |
+| Existing code | observed adoption passed and preserved the source/test fixture |
+| Ordinary post-init development | feature creation → implementation → independent tests/review → strict gate → `done` passed |
+
+Every final run had no `spec.yaml` before approval, created it only after the exact phrase, removed the staged cache after apply, and passed `clad sync`.
+
+## Defect found and fixed
+
+Codex headless resume reloads without project MCP, while a fresh process loses the host-model draft. The old short-lived `/tmp` cache retained only the preparation request, so a new model turn could reinterpret the approval code as project intent. The campaign added `clad_stage_init`: the reviewed draft is now validated and retained under ignored project runtime state, and the approval tool requires the complete `APPLY CLADDING XXXXXX` reply. A fresh-process replay then applied only the staged `plan.md` draft.
+
+## Post-init development
+
+The original archive-feature session was manually aborted 0.8 seconds after it
+started its final verification command. The preserved event log therefore shows
+an external cancellation, not a hung Codex process. Its shell-expanded
+`dist/tests/**/*.test.js` script happened to collect six tests on the original
+macOS shell; the real defect was portability—quoted/literal globs fail on Node
+20, and Windows shells do not expand them. The earlier “zero tests” wording was
+not supported by the preserved output.
+
+Forensic replay exposed four independent post-init integration gaps:
+
+1. MCP used the project-pinned branch engine while shell `clad` resolved an
+ older global build with the same version string. The ignored project launcher
+ now serves MCP with no arguments and forwards explicit CLI arguments to that
+ exact engine.
+2. Fresh onboarding capabilities and scenarios intentionally had no feature
+ links, but strict mode promoted their warnings and made the first `done`
+ unreachable. Empty links are informational before the shared eight-feature
+ maturity boundary; dangling links still block.
+3. TypeScript gate detection substituted ESLint, Vitest, and Vitest coverage for
+ an explicit Node built-in test workflow. Project scripts are now authoritative;
+ undeclared lint/coverage gates skip honestly, and inferred npx tools run
+ offline so a missing optional tool cannot stall or become a false finding.
+4. The first domain slice had no runnable entry point yet, but the advisory
+ deliverable warning was promoted by strict mode. That unresolved decision is
+ informational before the same maturity boundary and becomes a warning once
+ the project grows.
+
+The final fresh Codex CLI run (`019f6457-c9c6-7f51-880f-0a9d6f799ba7`) ended
+naturally with exit 0. It first demonstrated that `node --test dist/tests` fails,
+then replaced it with the shell-portable explicit target
+`dist/tests/noteArchive.test.js`. Six tests passed under both the host Node and
+Node 20.20.2. The project-local strict pre-push gate passed, independent review
+passed, the attestation refreshed, and “Note archival” transitioned from
+`in_progress` to `done`. Lint, coverage, formal oracle, and deliverable smoke
+remained visible skips because the project had not configured those workflows.
diff --git a/docs/dogfood/cursor-agent-2026-07-14.md b/docs/dogfood/cursor-agent-2026-07-14.md
new file mode 100644
index 00000000..acdb17db
--- /dev/null
+++ b/docs/dogfood/cursor-agent-2026-07-14.md
@@ -0,0 +1,21 @@
+# Cursor Agent onboarding campaign — 2026-07-14
+
+- Host: Cursor Agent `2026.07.09-a3815c0`
+- Interface: headless CLI (`cursor-agent --print --resume`)
+- Transport: global stdio MCP through `~/.cursor/mcp.json`
+- Exposed tools: 21
+- Result: verified
+
+## Live cases
+
+| Case | Preview before writes | Separate exact approval | Result |
+|---|---:|---:|---|
+| Idea only | pass | pass | initialized; two unresolved product choices returned to the user without inventing answers |
+| Planning document | pass | pass | initialized from `plan.md` with no unnecessary follow-up |
+| Existing project | pass | pass | observed ESM, two-space indentation, JSDoc, immutability, and the Node test runner before adoption |
+| Uninitialized control | n/a | n/a | ordinary file request created only the requested file; no Cladding artifacts or intervention |
+
+The campaign ran with Cursor's force and MCP auto-approval flags inside isolated temporary
+workspaces. Even with host-side tool permission granted, Cladding made no project changes before
+the exact approval phrase was supplied in a resumed conversation. The control workspace contained
+only `greeting.txt` afterward.
diff --git a/docs/dogfood/cursor-agent-2026-07-15.md b/docs/dogfood/cursor-agent-2026-07-15.md
new file mode 100644
index 00000000..6bbe22b9
--- /dev/null
+++ b/docs/dogfood/cursor-agent-2026-07-15.md
@@ -0,0 +1,36 @@
+# Cursor Agent project-scoped onboarding campaign — 2026-07-15
+
+- Host: Cursor Agent `2026.07.09-a3815c0`
+- Interface: headless `cursor-agent --print --trust --approve-mcps --force`
+- Transport: `.cursor/mcp.json` → project `.cladding/host/serve.cjs`
+- Result: verified
+
+| Case | Result |
+|---|---|
+| No setup control | only the requested `greeting.txt` was created |
+| Setup-only control | ordinary request completed without initialization or Cladding commentary |
+| Idea | staged draft applied after a separate exact phrase; three material product questions returned |
+| Complete `plan.md` | initialized with the document intent and no follow-up questions |
+| Existing code | existing-adoption initialized while preserving source and tests |
+
+All three initialization cases passed `clad sync`, left no staged cache after apply, and wrote no authored onboarding artifact before approval.
+
+## Post-initialization ordinary development
+
+- Isolation: a fresh HOME contained no user-global Cladding skills; Cursor authentication was passed to the process through its memory-only credential store. The project-local MCP launcher and generated `AGENTS.md` were the only Cladding guidance.
+- Live task: the host added the **Note reminders** feature, kept the capability, journey, project context, and feature shard aligned, and exited normally (session `e23c4638-ec07-40c6-a325-913bc5162fbd`).
+- Independent contexts: Cursor created one blind test-author transcript and one read-only reviewer transcript. The reviewer approved all six acceptance behaviors and the design linkage.
+- Test collection: `npm test` used the explicit paths `dist/tests/noteArchive.test.js` and `dist/tests/noteReminders.test.js`; 13/13 tests passed. The same two paths passed 13/13 under an independently selected Node 20 runtime.
+- Completion: the feature completion command marked **Note reminders** done. The host left its changes uncommitted, so an immediate project-wide strict check reported only the expected dirty-tree finding; after an evidence-only commit (`a735825`), all configured stages passed and the tree was clean.
+- Diff hygiene: `git diff --check` passed, and the final package script contained no shell-expanded glob.
+
+## Project permission follow-up
+
+The setup path now writes `.cursor/cli.json` with exact allow entries for only
+`clad_list_features`, `clad_get_feature`, and `clad_run_check`. Cursor's own
+configuration parser accepted the file, `cursor-agent mcp list` reported
+`cladding: ready`, and `cursor-agent mcp list-tools cladding` returned all 22
+tools. The three exact entries let the doctor remain in read-only ask mode;
+write-capable Cladding tools are not allowlisted. A model-backed replay of that
+permission correction remains pending because the account usage limit was
+reached first.
diff --git a/docs/dogfood/e2e-0.9.0-packed-2026-07-16.md b/docs/dogfood/e2e-0.9.0-packed-2026-07-16.md
new file mode 100644
index 00000000..409ddc85
--- /dev/null
+++ b/docs/dogfood/e2e-0.9.0-packed-2026-07-16.md
@@ -0,0 +1,74 @@
+# 0.9.0 packed-tarball E2E campaign — 2026-07-16
+
+- Engine under test: `cladding-0.9.0.tgz` packed from this branch, installed into an isolated npm
+ prefix (`clad --version` = 0.9.0; `dist/clad.js` sha256-identical to the repo build). The stale
+ global 0.8.3 at `/opt/homebrew` was never invoked.
+- Scope: the project-local onboarding rewrite — deterministic CLI cells, per-host MCP source
+ isolation, live natural-language consent flows, and the legacy 0.8.3 → 0.9.0 real-home migration.
+- Isolation: every `clad` cell ran under a sandbox `HOME` with LLM API keys unset; host CLIs ran
+ with their real authentication against throwaway projects, wrapped in before/after snapshots of
+ the six global config surfaces cladding may touch.
+
+## Deterministic cells (sandbox HOME, packed engine) — all passed
+
+| Cell | Result |
+|---|---|
+| Bare / Korean-intent / planning-doc / `--scan` init | scaffold correct; deterministic-stub warning loud; Korean preserved; authored files byte-unchanged with `.cladding/scan/*.proposal` divert |
+| MCP consent protocol | exactly 3 bootstrap tools pre-init; paraphrase and well-formed-but-wrong challenge both rejected without writes; exact phrase applies and registers the full tool surface |
+| Cross-process staging | prepare / stage / apply in three separate processes; bare-challenge apply resolved the staged draft from the durable cache |
+| Tampered staged cache | never silently applied; workspace intact (initially surfaced as a raw TypeError — fixed, now `draft_required`, regression-tested) |
+| Legacy migration (fixture home) | ownership-proven symlinks/entries removed; foreign entries semantically preserved; second run byte-identical; the account-wide `claude plugin uninstall` argv captured via a PATH shim |
+| Global-config blast radius | exotic TOML (datetime / inline table / dotted keys) semantically preserved; unparseable file left byte-identical; comment destruction found → fixed via text-splice with parse-verification, regression-tested |
+| Post-init dev flow | `clad_create_feature` (hash id) → `done` refused for real causes (missing test proof, no type checker, convention, architecture) → after fixes strict gate GREEN → `done` |
+| Refresh boundary | `already_initialized` without the refresh flag; refresh apply left a hand-edited `spec.yaml` sha256-identical, content diverted to proposals |
+
+## Per-host verdicts (source-isolated)
+
+| Host | Wire read | Live consent flow |
+|---|---|---|
+| Claude Code 2.1.211 | project `.mcp.json` (held at per-project approval gate) | PASS — stop at preview, paraphrase refused, exact phrase applied; clarify loop; model-driven feature creation |
+| Codex CLI 0.144.4 | project `.codex/config.toml` (trusted repo only; absent when untrusted) | PASS — full consent script plus a fresh-process apply from the durable cache |
+| Antigravity 1.1.2 | **machine-wide only** — negative control proved the project `.agents/mcp_config.json` is never read | PASS via the machine-wide wire (engine build identical); consent + clarify loop |
+| Gemini CLI 0.42.0 | project `.gemini/settings.json` after folder trust (Connected; tools registered) | not-run — `IneligibleTierError`, individual tier discontinued by Google |
+| Cursor Agent 2026.07.09 | project `.cursor/mcp.json` (`ready`, 22 tools; vanishes when the file is renamed) | not-run — account usage limit |
+
+The consent boundary — the one property no unit test can enforce, because the approval token is an
+integrity hash the model could forge — held on every host that ran: with all permission bypasses
+enabled, no model applied on the initial request or on a "yes go ahead" paraphrase.
+
+## Defects found → fixed on this branch (each with a regression test)
+
+1. `clad setup` wired all five hosts regardless of what is installed, diverging from its own spec
+ (AC-001) whose twelve `test_refs` had all gone dangling in the 0.9.0 rewrite. Default now wires
+ detected hosts only; `--host all` stays explicit; the shard was rewritten to the project-scoped
+ contract with live test references.
+2. Antigravity's project wire was a dead file (above). Setup now also writes the
+ `~/.gemini/config/plugins/cladding/` wire agy actually loads, ownership-guarded and reported as
+ the one deliberate exception to project-local activation.
+3. `clad update` in a non-project directory scaffolded 13 host-wiring files and could reach the
+ account-wide `claude plugin uninstall`. It now writes nothing outside a cladding project.
+4. Abandoned `clad_prepare_init` flows leaked 0600 consent-cache envelopes into the shared temp dir
+ (644 had accumulated on the reference machine). Staging now sweeps expired envelopes.
+5. A tampered durable-cache draft reached `renderDraft` unvalidated (crash-shaped rejection).
+ Drafts are now schema-revalidated on load.
+6. Codex legacy cleanup re-serialized the whole `~/.codex/config.toml`, destroying user comments;
+ Cursor cleanup left an orphan empty `mcpServers`. Both fixed (text splice with parse
+ verification; emptied-object removal).
+
+## Behavioral observations (host-side, not cladding defects)
+
+- Codex `exec` auto-denies the onboarding tools under the shipped `default_tools_approval_mode =
+ "writes"` because cladding annotates them honestly as non-read-only; interactive Codex shows a
+ normal approval prompt. Documented in `docs/setup.md`.
+- With no MCP available and permission bypass on, the Antigravity model fabricated a plausible
+ feature id via shell workarounds — a live demonstration that behavioral transcripts are
+ inadmissible as wiring evidence without a source-isolating negative control.
+- On Claude, one user reply was relayed verbatim into two distinct clarify questions (the first of
+ which it did not answer); the review-divert design contained the effect to proposals.
+
+## Real-home migration (consented)
+
+Executed with the packed engine from a scratch directory: legacy user-scope Claude plugin
+uninstalled, 25 `~/.agents/skills/cladding-*` symlinks and the Gemini extension removed, the
+`~/.codex/config.toml` entry excised (real-file diff was whitespace-only), the agy-imported plugin
+directory correctly preserved and reported. Post-run residue scan showed only host-attributed churn.
diff --git a/docs/dogfood/gemini-cli-2026-07-16.md b/docs/dogfood/gemini-cli-2026-07-16.md
new file mode 100644
index 00000000..4971ec19
--- /dev/null
+++ b/docs/dogfood/gemini-cli-2026-07-16.md
@@ -0,0 +1,29 @@
+# Gemini CLI project-local setup verification — 2026-07-16
+
+- Host: Gemini CLI `0.42.0`
+- Isolation: temporary HOME with no user-global Cladding extension or skill
+- Transport: project `.gemini/settings.json` → project `.cladding/host/serve.cjs`
+- Skill: project `.agents/skills/cladding-init/SKILL.md`
+- Result: project-local discovery and MCP connectivity verified; model surfaces not-run
+
+`clad setup --host gemini` was run from a temporary Git project. It created the
+Gemini settings file and shared project skill under that project, while the
+isolated HOME remained free of Cladding configuration. Gemini reported
+`cladding-init` enabled from `.agents/skills` and reported the `cladding` stdio
+server connected through `.cladding/host/serve.cjs`.
+
+The headless probe command uses Gemini Plan Mode plus the ignored project policy
+`.cladding/host/gemini-doctor-policy.toml`. That policy matches the `cladding`
+server, the three doctor tools, and their `readOnlyHint`; it does not enable
+YOLO mode. Gemini accepted the policy arguments before reaching its account
+precondition.
+
+The model-backed probes could not run under the available Google login. Gemini
+returned `IneligibleTierError` with `UNSUPPORTED_CLIENT` and directed the account
+to Antigravity before any Cladding tool call occurred. No API-key environment
+variable was available. Those surfaces are therefore recorded as `not-run`, not
+as a pass and not as a project-wiring failure.
+
+This supersedes the old global-extension setup recipe for current installation
+guidance. The earlier report remains only as historical evidence; current setup
+is project-scoped.
diff --git a/docs/dogfood/matrix.md b/docs/dogfood/matrix.md
index dbc1bda0..7d92f647 100644
--- a/docs/dogfood/matrix.md
+++ b/docs/dogfood/matrix.md
@@ -1,28 +1,28 @@
# Host support matrix
-
+
-- Cladding version: `0.7.1`
-- Generated: 2026-07-03T02:42:22.205Z
+- Cladding version: `0.9.0`
+- Generated: 2026-07-16T07:48:44.436Z
| Host | list-features | get-feature | run-check | wiring | Grade |
|---|---|---|---|---|---|
| claude | pass | pass | pass | — | verified |
| gemini | fail | fail | fail | — | fail |
-| codex | not-run | not-run | not-run | — | not-run |
-| cursor | — | — | — | — | not-run |
+| antigravity | pass | pass | pass | — | verified |
+| codex | pass | pass | pass | — | verified |
+| cursor | fail | fail | fail | pass | fail |
**Legend**
- `verified` — every probed surface passed its sentinel end-to-end.
-- `wiring-only` (Cursor) — no headless verification surface exists, so the host is graded only on whether the MCP wire is written **and** `clad serve` answers a tools list over stdio (`wiring-ok` / `wiring-fail`).
+- `wiring` — Cursor additionally verifies that its configured `clad serve` answers a tools list over stdio.
- `not-run` — absence of evidence (binary absent from PATH, no live-run consent, or host not wired here). Never rendered as a pass — the matrix records absence honestly.
**Why not-run / fail**
- `gemini`: list-features, get-feature, run-check failed — e:///opt/homebrew/Cellar/gemini-cli/0.42.0/libexec/lib/node_modules/@google/gemini-cli/bundle/chunk-7VVHSNDQ.js:273233:5) at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
-- `codex`: binary not on PATH
-- `cursor`: Cursor not detected (~/.cursor absent) — run `clad setup` to wire
+- `cursor`: list-features, get-feature, run-check failed — exit 1: ActionRequiredError: You've hit your usage limit Get Cursor Pro for more Agent usage, unlimited Tab, and more.
-> Live grades land when a human runs `clad doctor --hosts` with consent (`CLAD_HOST_SMOKE=1` or `--yes`). Without consent this baseline records only what is checkable for free — Cursor wiring — and leaves the LLM-driven surfaces `not-run`.
+> Live grades land when a human runs `clad doctor --hosts` with consent (`CLAD_HOST_SMOKE=1` or `--yes`). Without consent this baseline records only what is checkable for free — Cursor wiring — and leaves all LLM-driven surfaces `not-run`.
diff --git a/docs/feature-cycle.md b/docs/feature-cycle.md
index caefe03c..b33cdc5b 100644
--- a/docs/feature-cycle.md
+++ b/docs/feature-cycle.md
@@ -22,6 +22,11 @@ say-so alone, never skip a `▣`.
`test_refs`) + the `modules` you're about to build + any scenario it needs — in one
`clad_create_feature` call (the tool takes ACs/modules). Not the whole backlog; just the feature
you're about to build.
+ Classify its design impact in the same call: `none` for a genuinely internal change,
+ `additive` to bind it to a capability and optional existing scenario, or `structural` when
+ architecture/project context must change. Additive links land with the shard. Structural impact
+ stays `review_required`; show the Tier-B diff and call `clad_resolve_design_impact` only after the
+ listed artifacts actually changed with user approval.
- ▣ **Barrier:** `clad sync` — the shard itself must be valid (schema, EARS shape, consistent
inventory) before any code. **Spec-first is the hard rule:** you author the shard *before* the
code, and no code that no feature claims may land (`UNMAPPED_ARTIFACT` blocks that at step 3's
@@ -61,7 +66,8 @@ say-so alone, never skip a `▣`.
the feature to done with **`clad done `** — it re-runs the pre-push strict gate with
the feature evaluated as done and writes `status: done` **only if that gate is GREEN**, reverting
otherwise. Do not hand-write `status: done`: the verb is what keeps "done" from claiming more than
- the gate verifies. `clad sync` keeps the inventory honest. Sign-off identity ≠ any implementer
+ the gate verifies. An unresolved structural design impact is refused before the gate runs.
+ `clad sync` keeps the inventory honest. Sign-off identity ≠ any implementer
(independent agent, or a human at L4 / UAT). **Then start the next feature's cycle.**
## Parallelism = N concurrent instances of this same cycle
diff --git a/docs/glossary.md b/docs/glossary.md
index bf15d3f7..91bff1a7 100644
--- a/docs/glossary.md
+++ b/docs/glossary.md
@@ -56,7 +56,7 @@
| `work` | removed (0.6.0) | Was a permanently not-implemented reserved stub (always exit 2) — dishonest surface; `run` owns the slot. | (제거됨) |
| `serve` | stable | Start the MCP server over stdio. | MCP 서버 |
| `oracle` | stable | Print the impl-blind authoring brief for a feature/AC. | 오라클 브리프 |
-| `setup` | stable | Wire cladding into installed AI hosts (Claude/Codex/Gemini/Cursor). | 호스트 연결 |
+| `setup` | stable | Wire cladding into detected AI hosts (Claude/Codex/Gemini/Antigravity/Cursor). | 호스트 연결 |
| `update` | stable | Post-upgrade reconciliation (re-wire, sync, report-only drift). | 업그레이드 정리 |
| `doctor` | stable | Diagnose dispatcher/telemetry health from the events log (brew/npm `doctor` convention). | 환경 진단 |
| `checkpoint` | stable | Record a feature checkpoint event (git HEAD + spec digest). | 체크포인트 기록 |
@@ -86,11 +86,18 @@
| Tool | Meaning |
|---|---|
+| `clad_prepare_init` | Read the project and return a bounded briefing plus one-time token; never writes files. |
+| `clad_stage_init` | Validate the host-model onboarding draft and cache it only as ignored project runtime state for a later approval turn. |
+| `clad_init` | Validate and apply the host model's structured onboarding draft. |
+| `clad_prepare_clarify` | Read current onboarding state and prepare a real user answer for host-model refinement. |
+| `clad_clarify` | Validate and apply the host model's structured refinement draft. |
+| `clad_resolve_onboarding_review` | Apply only the onboarding proposal targets the user explicitly reviewed and approved. |
| `clad_list_features` | Query features by status/slug. |
| `clad_get_feature` | Fetch one feature + ACs by id or slug. |
| `clad_run_check` | Run drift detection in-process (terse by default). |
| `clad_get_events` | Tail the lifecycle event log. |
-| `clad_create_feature` | Author a feature shard with hash id + ACs. |
+| `clad_create_feature` | Author a feature shard with hash id + ACs + a durable design-impact decision. |
+| `clad_resolve_design_impact` | Mark structural design impact resolved after every listed Tier-B artifact actually changed. |
| `clad_create_scenario` | Author a scenario shard with hash id. |
| `clad_link_capability` | Upsert a capability ↔ feature binding (Tier B). |
| `clad_author_oracle` | Record a host-authored impl-blind oracle + provenance. |
@@ -147,7 +154,7 @@ four distinct Korean words too, so the conflation cannot survive translation:
`stage_started` · `stage_completed` · `feature_activated` · `feature_completed` · `evidence_recorded` · `drift_detected` · `feature_checkpoint` · `feature_rolled_back` · `sentinel_miss`
-Added 0.6.0 (F-b84c38 — payloads carry `identity` + `head`): `feature_created` (spec shard authored) · `scenario_created` · `done_attempted` (gated flip, kept or reverted) · `gate_run` (tier verification outcome; deduped per identical HEAD/tier/strict/worst) · `stop_blocked` (F-1d23a6 — the Stop host hook blocked a session end on a fresh failure fingerprint; identical fingerprints demote without an event).
+Added 0.6.0 (F-b84c38 — payloads carry `identity` + `head`): `feature_created` (spec shard authored) · `scenario_created` · `done_attempted` (gated flip, kept or reverted) · `gate_run` (tier verification outcome; deduped per identical HEAD/tier/strict/worst) · `stop_blocked` (F-1d23a6 — the Stop host hook blocked a session end on a fresh failure fingerprint; identical fingerprints demote without an event). `design_impact_resolved` records that a structural feature's reviewed Tier-B changes were applied.
Added 0.8.0 (F-6ba22c5c — value-delivery telemetry, so a silent surface is distinguishable from an unwired one): `impact_card_fired` (a PostToolUse impact card produced output — payload file/feature/impacted/tests/unledgered) · `impact_card_skipped` (the card was skipped — `reason` ∈ a closed enum, one per degrade branch; the two high-frequency reasons are aggregated to one event per debounce window) · `session_card_rendered` (a non-empty SessionStart card — payload bytes) · `prompt_suggestion_served` (a non-empty UserPromptSubmit suggestion — payload kind) · `working_set_served` (an MCP read serve of `clad_get_working_set` / `clad_get_context` / `clad_get_impact` — payload tool/query/resolved). Summarized by `clad measure --sessions` as DELIVERY (did the surfaces fire), never adoption.
diff --git a/docs/setup.md b/docs/setup.md
index b391201f..994aa4be 100644
--- a/docs/setup.md
+++ b/docs/setup.md
@@ -2,41 +2,106 @@
# Setup details — host wiring, MCP, and upgrading
-The README covers the two commands you need (`clad setup` → `/cladding:init`). This page is
+The README covers the setup command and the natural-language request that follows it. This page is
the detail behind them: where each host is wired, how the MCP server works, and how to upgrade.
-## Where `clad setup` connects (4 hosts · 5 wire points)
+## Project activation boundary
-| Host (when detected) | Wired location | Auto-activation |
-|---|---|---|
-| Claude Code (`~/.claude/`) | `~/.claude/plugins/cladding` | `claude plugin marketplace add` + `install` |
-| Codex CLI skills (`~/.agents/`) | `~/.agents/skills/cladding-*` | (auto on Codex restart) |
-| Codex CLI MCP server (`~/.codex/`) | `[mcp_servers.cladding]` in `~/.codex/config.toml` | (TOML entry itself) |
-| Gemini CLI (`~/.gemini/`) | `~/.gemini/extensions/cladding` | `gemini extensions link` |
-| Cursor (`~/.cursor/`) | `mcpServers.cladding` in `~/.cursor/mcp.json` | (JSON entry itself) |
+`npm install -g cladding` installs only the CLI. Run `clad setup` **inside each project that should use Cladding**. Nothing is installed into a host's global skill or MCP catalog.
+
+| Host | Project-scoped location |
+|---|---|
+| Claude Code | `.claude/skills/cladding-init` + `.mcp.json` |
+| Codex CLI | `.agents/skills/cladding-init` + `.codex/config.toml` |
+| Gemini CLI | `.agents/skills/cladding-init` + `.gemini/settings.json` |
+| Antigravity (`agy`) | `.agents/skills/cladding-init` + `.agents/mcp_config.json` (forward-compat) + machine-wide `~/.gemini/config/plugins/cladding/` — see the Antigravity note below |
+| Cursor | `.cursor/skills/cladding-init` + `.cursor/mcp.json` + `.cursor/cli.json` read-only tool allowlist + bootstrap rule |
+
+The only machine-specific path lives in `.cladding/host/serve.cjs`, which is ignored project runtime state. Re-run setup on each developer machine. Host config files use the portable relative launcher path and preserve unrelated entries. With no arguments the launcher starts MCP; with arguments it forwards a normal CLI command to that exact same engine. Generated project guidance therefore uses `node .cladding/host/serve.cjs check --strict` and similar shell calls when the launcher exists, preventing a different global installation from silently validating the project with another build.
+
+With no `--host` option, setup wires only the hosts whose home markers exist on the machine and
+reports the rest as `not selected`; `clad setup --host all` forces every channel, `--host `
+exactly one.
+
+Codex loads `.codex/config.toml` only for a trusted Git repository. Accept Codex's normal project-trust prompt when opening the repository; this is a Codex security boundary and `clad setup` does not bypass or pre-approve it. One consequence for scripted use: the project config asks Codex to approve write-capable tools, and Cladding annotates its onboarding tools honestly as non-read-only, so non-interactive `codex exec` auto-denies the onboarding prepare/stage/apply calls. Interactive Codex simply shows its approval prompt; headless automation must pass Codex's own approvals-bypass flag.
+
+**Antigravity is the one deliberate exception to project-local activation.** `agy` 1.1.2 reads MCP
+config only from machine-wide locations (`~/.gemini/config/mcp_config.json` or
+`~/.gemini/config/plugins//`) — it does not load a project `.agents/mcp_config.json`
+(verified live in the 0.9.0 campaign, including a negative control). Setup therefore also writes
+`~/.gemini/config/plugins/cladding/{plugin.json,mcp_config.json}` with an engine-absolute launch;
+agy spawns MCP servers with each session's working directory, so the single machine-wide wire stays
+project-aware. The project file is kept for forward compatibility, and the setup report calls the
+exception out. A foreign directory already at that path is preserved unless `--force` is given.
-`clad setup` invokes each host's activation command automatically when the `claude` / `gemini`
-binaries are on PATH. It is safe to re-run after an upgrade or after installing a new AI tool.
+Gemini likewise loads project skills and settings only after its normal folder-trust boundary is satisfied. Interactive use keeps that prompt intact; the explicitly consented doctor smoke uses Gemini's session-only trust override so a fresh verification fixture can exercise the project-local MCP connection without changing persistent trust settings.
+That smoke stays in Gemini Plan Mode and loads an ignored project policy permitting only the three
+annotated read-only doctor tools; it does not enable YOLO mode.
-**Verification level (honesty note).** Claude Code is fully verified through real-usage
-campaigns (including real-time intervention). Codex · Gemini CLI wire automatically; their behavior isn't verified yet. Cursor wires automatically, but real-usage verification is still pending —
-to be updated as it lands. (The machine-readable claim lives in the README's `clad:host-claims`
-fence, which `HOST_CLAIM_DRIFT` polices against `docs/dogfood/matrix.md`.)
+Cursor's project CLI configuration allowlists only the three read-only doctor tools. It does not
+add a server-wide wildcard, and it preserves unrelated project allow/deny entries; write-capable
+Cladding tools retain Cursor's normal approval boundary.
+
+On upgrade, setup removes legacy global Cladding wires only when their ownership is provable. Ambiguous or hand-edited files are preserved and reported. If an old Claude user plugin remains, run `claude plugin uninstall claude-code@cladding --scope user --keep-data`.
+
+**Verification level (honesty note, 0.9.0 packed-tarball campaign).** Claude Code `2.1.211` is
+live-verified end-to-end from a packed 0.9.0 install: project `.mcp.json` discovery behind the
+per-project approval gate, the full natural-language consent flow (stop at preview, paraphrase
+rejected, exact phrase applies), the clarify loop, and model-driven feature creation. Codex CLI
+`0.144.4` is live-verified for the same consent flow in a trusted repository, including a
+fresh-process apply that resolved the staged draft from the durable cache. Antigravity `1.1.2` is
+live-verified for the consent flow and clarify loop, but only through the machine-wide wire — a
+negative control proved it never reads the project MCP file, which is why setup writes the
+machine-wide wire described above. Gemini's project-local MCP connection and tool registration are
+structurally verified after folder trust; its model surfaces remain `not-run` because the available
+individual-tier login is rejected by Gemini CLI (`IneligibleTierError`). Cursor Agent
+`2026.07.09-a3815c0` passed structural verification (server ready, 22 tools enumerated, negative
+control) but its model replay is `not-run` for this campaign (account usage limit). (The
+machine-readable claim lives in the README's `clad:host-claims` fence, which `HOST_CLAIM_DRIFT`
+polices against `docs/dogfood/matrix.md`; its `verified` grade covers the doctor surfaces listed in
+that matrix, not every release-specific onboarding campaign.)
## About the MCP server
-All 4 hosts wire cladding as an MCP server — only the wire *location* differs. MCP is not
-something you invoke directly: there is no `/mcp` slash and no manual connect step. The AI in
-each host calls cladding's tools on its own in response to *natural-language requests*; you only
-type `/cladding:init` once and then chat normally.
+All 5 hosts wire cladding as an MCP server — only the wire *location* differs. MCP is not
+something you invoke directly and there is no manual connect step. A host may provide an `/mcp`
+diagnostic view, but normal use starts by asking the AI to apply Cladding to the open project.
+
+Every host follows the same portable onboarding protocol under the surface: Cladding first returns
+a read-only, bounded project briefing; the host's own model drafts structured onboarding data; then
+Cladding validates and stages that draft before showing the approval phrase. Staging writes only an
+opaque, short-lived cache under the ignored `.cladding/host/` runtime boundary. A later host process
+can therefore apply the exact reviewed draft without reconstructing it from the approval code.
+Follow-up answers use the same prepare/apply safety boundary. This requires only standard MCP tool
+calls—not server-side sampling—and prevents incomplete, stale, or replayed drafts from partially
+changing the project.
+
+Initialization never writes immediately from the first natural-language request. The host previews
+the planned file operations and shows a one-time approval phrase; only a separate user reply that
+exactly repeats that phrase authorizes the write step. Questions, paraphrases, merely opening a
+project, asking about Cladding, or running `clad setup` are not consent.
+Exact matching prevents accidental application, but standard MCP does not prove which user produced
+a tool argument. Treat the host as part of the trust boundary; this confirmation is not a sandbox
+against a malicious or compromised host.
+
+| Host | Primary request | Optional explicit invocation |
+|---|---|---|
+| Claude Code | `Apply Cladding to this project` | `/cladding:init` |
+| Codex | `Apply Cladding to this project` | Type `$cladding`, then choose `init (cladding)` |
+| Gemini CLI | `Apply Cladding to this project` | Select the project-local `cladding-init` skill |
+| Antigravity | `Apply Cladding to this project` | Select the project-local `cladding-init` skill |
+| Cursor IDE / Agent | `Apply Cladding to this project` | Natural language routes through the connected onboarding tool |
## Upgrading
```bash
npm update -g cladding # 1. install the new version
-cd # 2. once per project
-clad update # 3. bring it in line with the new version
+cd # 2. select one Cladding project
+clad update # 3. refresh project wiring + derived state
```
-Your code · `spec.yaml` · docs are left untouched, so it is safe. If the newer version is
-stricter and has something to flag, it just **points it out** — it won't block or fix anything.
+Your authored code, feature/spec content, and documentation are preserved. The command may refresh
+derived inventory/index data and the Cladding-managed blocks in `AGENTS.md` and `CLAUDE.md`.
+Onboarding itself does not create or change `CLAUDE.md`; the update command retains its established
+Claude-specific refresh for existing users while preserving their prose. If the
+newer version is stricter, it only **points out** drift — it does not rewrite authored project intent.
diff --git a/docs/ssot-model.md b/docs/ssot-model.md
index d1fe251e..8d064616 100644
--- a/docs/ssot-model.md
+++ b/docs/ssot-model.md
@@ -35,7 +35,7 @@ A Tier B artifact must answer: **who reads this and what decision do they make?*
Orphan artifacts get demoted (move to Tier D as historical reference) or removed. This cycle resolves the v0.3.45 orphans:
- `spec/capabilities.yaml` gains the `CAPABILITIES_FEATURE_MAPPING` detector
- `docs/project-context.md` becomes the scenario generator's source (clear, named role)
-- `spec/scenarios/*.yaml` gains a clear producer (onboarding / `clad_create_scenario`) and consumer (the reference detectors + the host AI). *(NOTE v0.4.x: an earlier draft claimed `clad_create_feature` binds scenarios; it does not — `createFeature` in `src/spec/new.ts` takes no scenario argument. Scenarios are authored independently via `clad_create_scenario`.)*
+- `spec/scenarios/*.yaml` gains a clear producer (onboarding / `clad_create_scenario`) and consumer (the reference detectors + the host AI). The public `clad_create_feature` transaction may bind an existing scenario when its design impact is additive; the lower-level `createFeature` helper stays single-purpose.
## Artifact registry
@@ -45,7 +45,7 @@ Orphan artifacts get demoted (move to Tier D as historical reference) or removed
|---|---|---|---|
| `spec.yaml` | `clad_create_feature` / hand-edit | `spec/load.ts` → every detector + MCP server + CLI verbs | manual edit; `clad sync` validates |
| `spec/features/-.yaml` | `clad_create_feature` | merged into `Spec.features[]` on load | manual edit + validation |
-| `spec/scenarios/-.yaml` | `clad init ` onboarding (NEW v0.3.45) OR `clad_create_scenario` OR hand-edit | `REFERENCE_INTEGRITY` / `SLUG_CONFLICT` / `ID_COLLISION` / `SCENARIO_COVERAGE` detectors | onboarding 7th sentinel emits; refine refreshes; `clad_create_scenario` adds. *(`clad_create_feature` does NOT bind scenarios — corrected v0.4.x.)* |
+| `spec/scenarios/-.yaml` | `clad init ` onboarding (NEW v0.3.45) OR `clad_create_scenario` OR hand-edit | `REFERENCE_INTEGRITY` / `SLUG_CONFLICT` / `ID_COLLISION` / `SCENARIO_COVERAGE` detectors | onboarding 7th sentinel emits; clarify refreshes; `clad_create_scenario` adds. *(`clad_create_feature` does NOT bind scenarios — corrected v0.4.x.)* |
### Tier B — Design SSoT
@@ -53,7 +53,7 @@ Orphan artifacts get demoted (move to Tier D as historical reference) or removed
|---|---|---|---|
| `spec/architecture.yaml` | `clad init --scan` (observed) OR `clad init ` (LLM) OR `clad clarify` OR hand-edit | `ARCHITECTURE_FROM_SPEC` detector + `reviewer` (Layered Integrity guardrail) + `developer` (layer boundary check when placing modules) | re-scan diverts to `.cladding/scan/*.proposal` |
| `spec/capabilities.yaml` | `clad init ` (LLM) OR `clad clarify` OR hand-edit | **schema-validated + merged into `Spec.capabilities` on load (v0.4.x, J2)** + `CAPABILITIES_FEATURE_MAPPING` (reference validity) + `HOLLOW_GOVERNANCE` (empty-tier guard, v0.4.x) | re-scan diverts to proposal |
-| `docs/project-context.md` | `clad init` (template/LLM-refined) OR `clad clarify` OR hand-edit | AI personas (orchestrator/developer) as Why/What/Purpose context input + **scenario generator (NEW v0.3.45) uses prose for user-journey extraction** + human onboarding readers | LLM-refined on init/refine; hand-edits preserved between |
+| `docs/project-context.md` | `clad init` (template/LLM-refined) OR `clad clarify` OR hand-edit | AI personas (orchestrator/developer) as Why/What/Purpose context input + **scenario generator (NEW v0.3.45) uses prose for user-journey extraction** + human onboarding readers | LLM-refined on init/clarify; hand-edits preserved between |
### Tier C — Derived / Observable
@@ -84,11 +84,10 @@ single-responsibility (and keeps a tool's name honest as it grows).
| **refine** | holistic DOCUMENT (one per project, not enumerated) | LLM/manual rewrite | `clad clarify` (formerly `refine`) → `architecture.yaml`, `project-context.md`, `conventions.md` |
A capability is **accumulative** (created once, then features land on it over time),
-so its verb is `link`, not `create` — re-"creating" an existing capability would
-collide. `clad_create_feature` therefore does NOT grow capabilities as a side effect
-(that would make its name lie); instead its result carries a non-mutating `hint` to
-call `clad_link_capability`. This is the deterministic development-time firing path
-for the Tier-B design SSoT, complementing the onboarding-time `clad clarify` path.
+so its underlying verb remains `link`, not `create`. The public `clad_create_feature`
+transaction requires a design-impact decision: `additive` composes that link (and an
+optional scenario link) with feature creation; `structural` records the affected Tier-B
+artifacts as `review_required` until their approved contents actually change.
## Capturing WHY — the decision micro-format (Tier A content)
@@ -188,13 +187,14 @@ Detector-enforced (today + this cycle):
- `ARCHITECTURE_FROM_SPEC`: imports don't cross `forbidden_imports` boundaries
- `REFERENCE_INTEGRITY`: scenario `features[]`, feature `depends_on[]`, `superseded_by` resolve (existence)
- `HARNESS_INTEGRITY`: plugin manifest version sync, detector count
-- **`CAPABILITIES_FEATURE_MAPPING` (NEW v0.3.45)**: capability `features[]` resolve to real features
+- **`CAPABILITIES_FEATURE_MAPPING` (NEW v0.3.45)**: capability `features[]` resolve to real features;
+ unbound capabilities remain warnings unless the project carries Cladding's onboarding-seeded marker; marked seeds are informational below eight features and graduate to warnings once the project is grown
- **`INVENTORY_DRIFT` (v0.4.x)**: the `inventory:` counts match the on-disk shard reality
- **`PLANNED_BACKLOG` (v0.4.x)**: too many `planned`/`in_progress` features with no code on disk (the spec racing ahead of the code)
- **`HOLLOW_GOVERNANCE` (v0.4.x, J1)**: a grown project with a present-but-empty `capabilities`/`architecture` design tier
- **`DEPENDENCY_CYCLE` (v0.4.x, J3)**: `features[].depends_on` is acyclic (pairs with `REFERENCE_INTEGRITY`'s existence check)
- **`AI_HINTS_FORBIDDEN_PATTERN` (v0.3.57)**: code avoids `ai_hints.forbidden_patterns`
-- **`SCENARIO_COVERAGE` (v0.4.x, S-b)**: a grown project declares ≥1 scenario, no scenario binds an empty `features[]`, and no scenario under-states its coverage (its `flow` names a feature slug it doesn't bind)
+- **`SCENARIO_COVERAGE` (v0.4.x, S-b)**: a grown project declares ≥1 scenario, no grown-project scenario binds an empty `features[]`, and no scenario under-states its coverage (its `flow` names a feature slug it doesn't bind); only explicitly marked onboarding journeys stay informational below eight features, while unmarked projects keep the established warning
- **`PROJECT_CONTEXT_DRIFT` (v0.4.x, S-c)**: a grown project's `project-context.md` is not still the unrefined init template
Detector-enforced (deferred to future cycles):
@@ -213,8 +213,8 @@ Conflict resolution (when same information lives in multiple tiers):
| `clad init` (bare, greenfield) | spec.yaml seed, .cladding/, .gitignore, project-context template, scenarios README, conventions/architecture/capabilities greenfield seeds | new files only — existing files skip via idempotency |
| `clad init ` (onboarding) | + project-context.md (LLM-refined), capabilities.yaml (LLM-inferred), architecture.yaml (LLM-inferred), spec.yaml F-001 title, **scenarios stubs (NEW v0.3.45)**, onboarding state.yaml | existing files divert to `.cladding/scan/*.proposal` |
| `clad init --scan` (existing-project) | conventions.md (observed), architecture.yaml (observed), capabilities.yaml (README headings), project-context.md (LLM-refined) | existing files divert to proposal |
-| `clad clarify ` | project-context.md, capabilities.yaml, architecture.yaml, scenarios stubs (refined Q-A history) | existing files divert to proposal |
-| `clad_create_feature` MCP tool | spec/features/-.yaml + binds to existing scenario via `features[]` | rejects on collision |
+| `clad clarify ` | project-context.md, capabilities.yaml, architecture.yaml, scenarios stubs (refined Q-A history) | untouched generated design updates in place; user-edited design diverts to proposal and remains `needs_review` until explicitly accepted |
+| `clad_create_feature` MCP tool | spec/features/-.yaml + durable design-impact decision; additive capability/scenario links | structural impact remains review-required and blocks `clad done` |
| append-only (Tier D) | events.log, audit.log entries | no divert — strict append |
## Quick decision flowchart for adding a new artifact
diff --git a/docs/ssot-testing.md b/docs/ssot-testing.md
index 6e45e442..dad9879f 100644
--- a/docs/ssot-testing.md
+++ b/docs/ssot-testing.md
@@ -16,7 +16,7 @@ Empty tmpdir + user intent "결제 SaaS for B2B":
| Stage | What happens | What we assert |
|---|---|---|
| **S1** | `clad init ` with LLM-mocked onboarding response | All 4 tiers present, every artifact's first line is the standard Tier banner, F-001 title is intent-derived, 2 scenarios shards land |
-| **S2** | `clad clarify 법인 사업자만` | First pending question marked answered, existing artifacts diverted to `.cladding/scan/*.proposal`, capabilities grow by 1 |
+| **S2** | `clad clarify 법인 사업자만` | First pending question marked answered; untouched generated design updates in place, while user-edited design stays preserved with review proposals |
| **S3** | Test writes 3+ TS files matching the architecture's suggested layers | (no command — simulates real-world development) |
| **S4** | Cross-tier consistency check (`assertCrossTierClean`) | `CAPABILITIES_FEATURE_MAPPING` + `ARCHITECTURE_FROM_SPEC` + `REFERENCE_INTEGRITY` emit zero errors |
| **S5** | `clad init --scan` re-runs after code was written | `docs/conventions.md` + `spec/architecture.yaml` diverted to proposal; live files preserve onboarding seed |
@@ -118,7 +118,7 @@ PR #131's claim is that the 4-tier model improves development output quality. Th
2. **Cross-document drift errors → 0** — every detector emits clean at end-of-lifecycle. `CAPABILITIES_FEATURE_MAPPING` confirms the capability ↔ feature link in Case 2 S5.
-3. **Refresh policy preserved** — re-running `clad init --scan` (Greenfield S5) and `clad clarify` (S2) diverts to `.cladding/scan/*.proposal` instead of overwriting user edits. `assertProposalDivert` codifies this.
+3. **Refresh policy preserved** — re-running `clad init --scan` (Greenfield S5) diverts to `.cladding/scan/*.proposal`. During active onboarding, `clad clarify` updates byte-identical generated design directly; if a user edited it, the answer remains `needs_review` and proposal-diverts until explicitly accepted.
If these three signals stay green across the full lifecycle, the SSoT model is delivering the promised quality improvement. If any regress, the failing test names the gap.
diff --git a/eslint.config.js b/eslint.config.js
index a2e61cd8..7850bc9c 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -8,7 +8,9 @@ import tseslint from 'typescript-eslint';
export default tseslint.config(
{
- ignores: ['node_modules/**', 'dist/**', 'plugins/**/dist/**', 'src/graph/viewer/**'],
+ // .cladding/ is machine-local runtime state (e.g. the generated host
+ // launcher serve.cjs) — never authored source, so never linted.
+ ignores: ['node_modules/**', 'dist/**', 'plugins/**/dist/**', 'src/graph/viewer/**', '.cladding/**'],
},
...tseslint.configs.recommended,
{
diff --git a/package-lock.json b/package-lock.json
index d2e2dffd..425017f9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "cladding",
- "version": "0.8.3",
+ "version": "0.9.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "cladding",
- "version": "0.8.3",
+ "version": "0.9.0",
"license": "MIT",
"dependencies": {
"@anthropic-ai/sdk": "^0.96.0",
diff --git a/package.json b/package.json
index da9960da..d63f320f 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "cladding",
- "version": "0.8.3",
- "description": "Spec-driven verification layer for AI coding agents — Claude Code · Codex · Gemini · Cursor. Intent in before it writes, result verified against your spec after. Reference implementation of the Ironclad standard.",
+ "version": "0.9.0",
+ "description": "Spec-driven verification layer for AI coding agents — Claude Code · Codex · Gemini · Antigravity · Cursor. Intent in before it writes, result verified against your spec after. Reference implementation of the Ironclad standard.",
"type": "module",
"license": "MIT",
"author": "qwerfunch",
@@ -18,7 +18,7 @@
"spec-driven-development", "governance", "ironclad",
"drift-detection", "multi-agent", "loop-engineering", "verification",
"ai-coding", "compliance", "architecture-enforcement",
- "claude-code", "codex-cli", "gemini-cli", "cursor",
+ "claude-code", "codex-cli", "gemini-cli", "antigravity-cli", "cursor",
"mcp-server", "claude-code-plugin"
],
"bin": {
@@ -60,10 +60,11 @@
"test": "vitest run",
"typecheck": "tsc --noEmit",
"lint": "eslint .",
- "build": "node scripts/build.mjs && node scripts/build-plugin.mjs",
+ "build": "node scripts/test-count.mjs --check && node scripts/build.mjs && node scripts/build-plugin.mjs",
"build:plugin": "node scripts/build-plugin.mjs",
"watch": "node --watch-path=./src scripts/build.mjs",
"version-bump": "node scripts/version-bump.mjs",
+ "test-count": "node scripts/test-count.mjs",
"prepare": "node -e \"require('node:fs').existsSync('dist/clad.js') || require('node:child_process').execSync('npm run build', {stdio: 'inherit'})\"",
"prepublishOnly": "npm run build"
},
diff --git a/plugins/antigravity/mcp_config.json b/plugins/antigravity/mcp_config.json
new file mode 100644
index 00000000..ba7f7845
--- /dev/null
+++ b/plugins/antigravity/mcp_config.json
@@ -0,0 +1,8 @@
+{
+ "mcpServers": {
+ "cladding": {
+ "command": "clad",
+ "args": ["serve"]
+ }
+ }
+}
diff --git a/plugins/antigravity/plugin.json b/plugins/antigravity/plugin.json
new file mode 100644
index 00000000..7d67e331
--- /dev/null
+++ b/plugins/antigravity/plugin.json
@@ -0,0 +1,5 @@
+{
+ "$schema": "https://antigravity.google/schemas/v1/plugin.json",
+ "name": "cladding",
+ "description": "Spec-driven verification and onboarding for Antigravity CLI."
+}
diff --git a/plugins/antigravity/skills/blind-author/SKILL.md b/plugins/antigravity/skills/blind-author/SKILL.md
new file mode 100644
index 00000000..8b0eacab
--- /dev/null
+++ b/plugins/antigravity/skills/blind-author/SKILL.md
@@ -0,0 +1,40 @@
+---
+name: blind-author
+description: Impl-blind test/oracle author — writes conformance tests from a spec-only brief. Tool-restricted by definition (no Read/Grep/Glob/Edit), so "authored blind" is a structural fact, not a promise. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+tools: Write, Bash
+capabilities: [write, exec]
+---
+
+# Blind Author
+
+You are the **Blind Author**. You write a conformance test for ONE acceptance
+criterion from the spec-only brief pasted into your prompt — and from nothing
+else. Your tool set has no Read, Grep, Glob, or Edit **on purpose**: you
+*cannot* look at the implementation, so a test you write proves "matches the
+spec," never "matches the code." (Prompt-level blindness leaked 4/4 in the
+A/B that motivated this agent; your tool restriction is the fix.)
+
+## Contract
+
+1. **Input** — the brief from `clad oracle --ac `: the AC's
+ EARS text, the module paths' *declared signatures* (never bodies), and the
+ target path under `tests/oracle/`. If the brief is missing or names files
+ for you to open, STOP and say so — opening files is outside your charter.
+2. **Output** — exactly one test file, written with Write to the target path
+ the brief names (`tests/oracle/..test.ts`). Import the
+ module under test by its declared path; exercise the BEHAVIOR the AC
+ states, including the failure direction for `unwanted` ACs.
+3. **Verify** — run only your own file: `npx --no-install vitest run `.
+ A failing oracle on a done feature is a FINDING, not your bug — report the
+ failure verbatim; do not weaken the test to make it pass.
+4. **No Edit** — to revise, Write the whole file again.
+
+## What you never do
+
+- Open, list, or search any file (you can't — by design).
+- Test internal helpers or private shapes the brief doesn't declare.
+- Soften an assertion because the run fails — the gate exists to catch that.
+
+After you finish, the dispatcher records provenance via `clad_author_oracle`
+with `blind: true` and your manifest = the brief you were given. That record
+is auditable; your restricted toolset is what makes it true.
diff --git a/plugins/antigravity/skills/changelog/SKILL.md b/plugins/antigravity/skills/changelog/SKILL.md
new file mode 100644
index 00000000..a518a6b0
--- /dev/null
+++ b/plugins/antigravity/skills/changelog/SKILL.md
@@ -0,0 +1,38 @@
+---
+description: Render release notes / a changelog from the cladding spec. Use when the user asks for release notes, a changelog, 릴리즈 노트, 변경 이력, or "what changed (since [)" — run `clad changelog --json` for the deterministic shipped-changes manifest, then write the human-facing notes FROM it, sourcing every claim from a feature title or acceptance sentence. For audit asks, print the --audit table verbatim. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+---
+
+# Cladding changelog — release notes from the spec
+
+The spec is the SSoT, so "what shipped?" is *collected*, never recalled. `clad changelog` turns
+`..HEAD` into a deterministic manifest: feature shards classified (`added-as-done` /
+`flipped-to-done` / `modified-while-done` / `archived`), grouped by capability (plus an
+`uncategorized` bucket — itself a drift signal), the spec inventory diff, and conventional
+`feat:`/`fix:` commits that name no feature id (work that shipped *outside* the spec — report it
+honestly, don't hide it).
+
+## Protocol
+
+1. **Collect.** Run `clad changelog --json --since ][` (omit `--since` to use the latest tag;
+ if the repo has no tags the command says so — ask the user for a ref).
+2. **Render EN + KO release notes from the manifest, in the CHANGELOG.md house style:**
+ - Open with a `**In one line:**` abstract (what a user gains, one breath).
+ - Group by the manifest's capability groups; use **user-impact verbs** ("the gate now runs
+ your entry point"), not implementation verbs ("refactored stage runner").
+ - **No `F-…`/`AC-…` ids in prose** (Soft Shell policy) — ids belong to the audit surface only.
+ - **Source every claim from the manifest** — a feature `title` or an `acceptance[]` sentence.
+ Never invent a change, never embellish beyond what an AC states. If the manifest is empty,
+ say "no shipped changes since ][" — that line is the honest deliverable.
+ - Put `unsharded_commits` under an "Also changed" section, marked as not yet spec-tracked.
+3. **Audit asks** ("show verification", "어디까지 검증됐어?") → print
+ `clad changelog --audit --since ][` **verbatim** — that table keeps ids and marks every
+ verification ref resolved ✓ / unresolved ✗ (a ✗ is spec-annotation drift worth reporting).
+4. **Catalog asks** ("what does this project do, in full?") → `clad changelog --catalog` prints
+ the whole capability → feature → acceptance listing of the living spec.
+
+```
+clad changelog # markdown since the latest tag (deterministic fallback)
+clad changelog --json --since v0.5.2 # the manifest you render notes from
+clad changelog --audit --since v0.5.2
+clad changelog --catalog
+```
diff --git a/plugins/antigravity/skills/check/SKILL.md b/plugins/antigravity/skills/check/SKILL.md
new file mode 100644
index 00000000..fe7bb3ea
--- /dev/null
+++ b/plugins/antigravity/skills/check/SKILL.md
@@ -0,0 +1,32 @@
+---
+description: Run every Iron Law stage and the drift detector suite. Use when the user wants the full project health snapshot, a CI gate, or to verify nothing regressed before committing. Add --strict to promote warn-severity drift findings to errors. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+---
+
+# Cladding check
+
+Run `clad check` from the project root. Runs the 15 Iron Law stages — Type / Lint / Drift / Commit / Arch / Secret / Unit / Coverage / Spec-conformance / Deliverable-smoke / Smoke / Performance / Visual / Audit / UAT — and aggregates the worst exit code.
+
+- `0` — every stage cleared or skipped clean.
+- `1` — at least one stage actually failed (fix-required).
+- `2` — every result is skip (no fail-required input on the project yet).
+
+`--strict` promotes warn-severity drift findings to error, matching the CI / pre-publish gate. The Drift stage runs every active detector under `src/stages/detectors/` — `npm run build:plugin` Phase D recounts them and writes the integer into each plugin manifest (e.g. `plugins/claude-code/.claude-plugin/plugin.json`), so the number is never hand-maintained.
+
+`--internal` shows stage codes (`stage_1.1`) instead of business names (`Type`). Default is the business-name surface; the audit log keeps internal ids regardless.
+
+```
+clad check
+clad check --strict
+clad check --internal
+```
+
+## Gate economy (tiers)
+
+Pick the cheapest tier that answers your question — the full pre-push suite is expensive and grows with
+the project:
+
+- `clad check --tier=pre-commit` — drift / arch / secret only (spec-vs-code, no full unit suite). Use for
+ fast inner-loop feedback while implementing.
+- `clad check --tier=pre-push --strict` — the full gate (type / lint / unit / cov + drift). This is what
+ `clad done ` already runs, so do NOT run it separately right before `clad done` — one
+ authoritative full gate per feature, not two. See `docs/feature-cycle.md` § Gate economy.
diff --git a/plugins/antigravity/skills/checkpoint/SKILL.md b/plugins/antigravity/skills/checkpoint/SKILL.md
new file mode 100644
index 00000000..fd5cec9c
--- /dev/null
+++ b/plugins/antigravity/skills/checkpoint/SKILL.md
@@ -0,0 +1,31 @@
+---
+description: Record a feature checkpoint event pinning the current git HEAD plus a spec digest, so a later rollback can restore the exact pre-change state. Use before a non-trivial feature implementation, before a refactor that touches many files, or whenever the user wants a known-good safety net the autonomous drive loop can fall back to. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+---
+
+# Cladding checkpoint
+
+Run `clad checkpoint ` from the project root. Iron Law backbone Phase 1 (iron-law.md §2.5) — the verb only **stamps** the audit-log entry; it never mutates the working tree or invokes `git commit`. The maintainer keeps the option to freeze the state with a normal git commit on top.
+
+The checkpoint event payload carries:
+
+- `featureId` — the spec id, accepts both `F-NNN` legacy and `F-` (v0.3.9+) shapes.
+- `gitHead` — full 40-char commit sha at the time of the call (or `null` when the project is not a git repository).
+- `specDigest` — sha-256 over the merged spec for replay verification.
+- `timestamp` — ISO 8601.
+
+```
+clad checkpoint F-001
+clad checkpoint F-a3f9c2
+```
+
+The output is a single Pulse line: `✓ checkpoint · head= digest=`. The event lands in `.cladding/events.log.jsonl` as `type: "feature_checkpoint"` and can be inspected with `clad doctor --json` or `clad_get_events` over MCP.
+
+## When to use
+
+- Before invoking `clad run` on a single feature so the loop's `RETRY_THRESHOLD` halt has a target to roll back to.
+- Before a manual refactor large enough that `git stash` is unwieldy.
+- Right after `clad sync` reports the spec is valid, so the checkpoint pins exactly the validated spec digest the implementation will start from.
+
+## Pair with
+
+`clad rollback ` — prints the maintainer-runnable `git checkout ` for the latest checkpoint and stamps a `feature_rolled_back` event. The pair forms the v0.3.X Iron Law backbone for safe autonomous progress; see `skills/rollback/SKILL.md`.
diff --git a/plugins/antigravity/skills/clarify/SKILL.md b/plugins/antigravity/skills/clarify/SKILL.md
new file mode 100644
index 00000000..30f51495
--- /dev/null
+++ b/plugins/antigravity/skills/clarify/SKILL.md
@@ -0,0 +1,18 @@
+---
+description: Advance Cladding onboarding after the user answers a pending product question. Use the MCP prepare/apply flow, preserve the answer verbatim, and never invent answers. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+---
+
+# Cladding clarify
+
+Use this workflow only for an answer contained in a new user message after Cladding displayed the pending question. Never infer, synthesize, or reuse an answer from an initialization turn. If no new user answer exists, stop without calling either clarify tool.
+
+Use this workflow only after Cladding initialization returned a pending question and the user has answered it.
+
+1. Call `clad_prepare_clarify` with the user's answer verbatim.
+2. Read the returned prompt, current state, and artifacts. Draft the structured refinement required by `clad_clarify` using the current host model.
+3. Call `clad_clarify` with the same answer, the one-time token, and the draft.
+4. Ask `nextQuestion` verbatim when one remains.
+5. If the result is `needs_review`, show the proposal diffs for every `pendingReview` target and wait for explicit user approval. Only then call `clad_resolve_onboarding_review` with the approved targets. Never describe onboarding as complete while review remains.
+6. Report completion only when the returned status is `done`.
+
+Do not run `clad clarify` in a shell from an AI host. Do not use MCP sampling. Never answer a product question on the user's behalf. A stale, malformed, replayed, or answer-mismatched apply request is a no-op and must be prepared again.
diff --git a/plugins/antigravity/skills/developer/SKILL.md b/plugins/antigravity/skills/developer/SKILL.md
new file mode 100644
index 00000000..7393b7cf
--- /dev/null
+++ b/plugins/antigravity/skills/developer/SKILL.md
@@ -0,0 +1,85 @@
+---
+name: developer
+description: Implementer — writes production code, tests, and migrations. The "generic engineer" fallback when no narrower specialist exists. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+tools: Read, Write, Edit, Bash
+capabilities: [read, write, edit, exec]
+---
+
+# Developer
+
+You are the **Developer** agent (formerly `specialists`) — the implementer. You write source under `src/stages/`, `spec/` (helpers, not yaml), `src/hitl/`, and `tests/`.
+
+See [`docs/ssot-model.md`](../../docs/ssot-model.md) for the 4-tier SSoT model.
+
+## Sources (what you read, by Tier)
+
+| Tier | Artifacts | Why you read it |
+|---|---|---|
+| **B** | `docs/project-context.md` | intent / Why/What/Purpose to align implementation |
+| **B** | `spec/architecture.yaml` | layer boundary check when placing new modules |
+| **B** | `spec/capabilities.yaml` | user-facing surface this feature maps to (for capability features[] binding) |
+| **C** | `docs/conventions.md` | code style: indent, naming, error handling, test location |
+| **A** | current feature slice only (never the whole spec — Principle 5) | what to build |
+
+You do NOT read Tier D (audit — observability's concern).
+
+## Boundary
+
+| what you do | what you don't |
+|---|---|
+| Write code · tests · migrations | Modify `spec.yaml` (that's `planner`) |
+| Run `npm test` · `npm run stage:*` | Sign off on your own code (that's `reviewer`) |
+| Refactor for clarity | Bypass the Iron Law gates |
+| Add new stage runners | Invent new evidence shapes (the schema is fixed) |
+
+## Code policy
+
+Follow `docs/conventions.md` — `clad init` always writes it. The auto-generated header at the top of the file tells you which mode is active:
+
+- **Greenfield seed**: toolchain-default 14-signal table (TypeScript → 2-space + single quote + camelCase + …, Python → 4-space + double quote + snake_case + …, etc.) with the canonical style-guide URL inlined. Use these defaults until you have written enough code that `clad init --scan` can replace them with observed values.
+- **Observed**: the 14-signal table reflects what the scanner found in your code. Follow it verbatim.
+
+One cladding-specific addition on top of either mode:
+
+- Error as Data — return `{pass, exitCode, stderr?}` shapes, not throws (except boundaries)
+
+## Anti-self-cert reminder
+
+You serve **one role per dispatch** — *code* (from the feature slice) or *test-author* (a SEPARATE
+dispatch handed the `acceptance_criteria` **+ module signatures only — never the impl bodies**). As
+test-author, write the tests from the ACs so they encode the spec, not the code; the signatures are
+given so you never need to open an impl file. Independent code/test dispatches are the **structural
+half** (no shared memory). **Blindness to the impl is the advisory half** — a convention you uphold
+(the dispatch keeps Read access; opening the impl defeats the point), audited by the step-4
+`reviewer`, not a sandbox. The **enforced** guard is the identity layer: tests are **tool evidence**
+— necessary, not sufficient for stage_4; a human signs off (`identity.author: human`) to clear UAT,
+and `checkAc` blocks any AC backed by only tool/LLM evidence.
+
+## Project policy — `spec.yaml::project.ai_hints`
+
+Before writing code, grep `spec.yaml::project.ai_hints`:
+
+- Honor `preferred_patterns` `{when, prefer, over?}` triples — domain practices the project chose
+- Avoid `forbidden_patterns` substrings — detector `AI_HINTS_FORBIDDEN_PATTERN` (#27) will block `clad check --strict`
+- Default to `preferred_persona`, `test_framework`, `primary_branch` when applicable
+
+`ai_hints` is the project-scoped SSoT for AI behavior policy. When `ai_hints` conflicts with this persona prompt for a specific project, `ai_hints` wins.
+
+## Hand-off triggers
+
+- Spec change needed → file for `planner`.
+- Style / philosophy concern → file for `reviewer`.
+- Production metric anomaly → file for `observability`.
+
+## Graph-context tools (advisory)
+
+Before a non-trivial edit, pull the working set instead of reading the whole spec or grepping blind:
+
+- **`clad_get_working_set `** — ONE call returns the focus feature + its acceptance criteria + the actual **source code** of its modules + what it depends on (needs) + **what breaks if you change it** + the tests to run + the conventions, token-budgeted. Your default orientation for a feature.
+- **`clad_get_impact `** — scope a refactor's blast radius: transitive dependents + the regression set to re-run.
+
+Advisory (no detector enforces it) — but after your edits the hook auto-surfaces the impact (the PostToolUse card), so the blast radius is never invisible.
+
+## User-facing language (Soft Shell)
+
+Any string your code writes to stdout / a log a user reads must use feature titles, never `F-NNN` (or `F-` for v0.3.9+ features); stage names (`Drift`, `UAT`), never `stage_X.Y`. Use `src/ui/softShell.ts` (`featureLabel`, `haltMessage`, `gateLabel`). The audit log keeps the raw ids — those are for replay, not for users. Beyond ids, translate by meaning in the user's own language — a shard = a spec entry, an attestation = a signed sign-off, a detector finding = what drifted and why; never lead with internal ids.
diff --git a/plugins/antigravity/skills/doctor/SKILL.md b/plugins/antigravity/skills/doctor/SKILL.md
new file mode 100644
index 00000000..10214faa
--- /dev/null
+++ b/plugins/antigravity/skills/doctor/SKILL.md
@@ -0,0 +1,40 @@
+---
+description: Summarise .cladding/events.log.jsonl — sentinel-miss frequency by phase × cause × fallback plus the top missed sentinels. Use when the user asks whether their LLM dispatcher (MCP sampling host, Anthropic SDK, …) is healthy, when scan / drive results look thinner than expected, or as a one-shot triage before tuning model / max_tokens / temperature. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+---
+
+# Cladding doctor
+
+Run `clad doctor` from the project root. The verb is observability — it never mutates the working tree.
+
+- `--cwd ` — read events from a project directory other than the current one (default cwd).
+- `--json` — emit the raw `DoctorReport` shape instead of the formatted text surface; the shape (`{cwd, events, sentinelMiss}`) is the stable wire format for MCP clients and follow-up tooling.
+
+The text surface prints:
+
+1. One pulse line with total events and total sentinel-miss count (`pass` when zero misses, `note` otherwise).
+2. An event-type breakdown line (one `=` token per non-zero `EventType`).
+3. When sentinel-miss events exist:
+ - `by phase` / `by cause` / `by fallback` aggregates from the v0.3.39 telemetry payload.
+ - Top-5 missed sentinels (`CONVENTIONS_MD` / `ARCHITECTURE_YAML` / `SCENARIO_FLOWS` / `CAPABILITIES_YAML` / `WHY` / `WHAT` / `PURPOSE`) sorted by count desc, name asc.
+ - Last 3 unique dispatcher error strings (most recent first; errors are truncated to 200 chars at the emit site).
+ - A one-line tuning hint.
+
+## Exit codes
+
+- `0` — events.log was either missing (greenfield) or readable. A greenfield workspace prints a friendly note and exits 0; a healthy host with zero misses also exits 0 with a `pass` line.
+- `1` — `events.log.jsonl` exists but cannot be parsed as JSONL (corrupt telemetry).
+
+## When to run
+
+- After `clad init --scan` to confirm the scan refinement ran with full LLM coverage (no `sentinel_miss` events).
+- After `clad run` to confirm the autonomous loop received refined replies from the configured host.
+- Periodically in CI to track miss rate across sampling-policy changes.
+- Before reporting "the LLM seems off" to a host (Claude Code / Cursor / Continue) — the breakdown tells you whether the issue is dispatcher transport (`cause: dispatcher_error`) or model output quality (`cause: blank_section`).
+
+```
+clad doctor
+clad doctor --cwd /path/to/project
+clad doctor --json
+```
+
+Configured-no-LLM runs (no MCP host, no `ANTHROPIC_API_KEY`, or `--no-llm` flag on `clad init`) do not emit `sentinel_miss` — those are deliberate offline runs, not misses. A doctor pass with zero events on a workspace that never reached the LLM path is therefore expected, not a problem.
diff --git a/plugins/antigravity/skills/init/SKILL.md b/plugins/antigravity/skills/init/SKILL.md
new file mode 100644
index 00000000..1de064d0
--- /dev/null
+++ b/plugins/antigravity/skills/init/SKILL.md
@@ -0,0 +1,28 @@
+---
+name: init
+description: Use only when the user explicitly names Cladding and asks to initialize, adopt, or refresh it; never use for an ordinary project creation or implementation request. Scaffold from an idea, planning document, or existing project through the MCP prepare/apply flow.
+---
+
+# Cladding init
+
+Use this workflow only when the user explicitly asks to initialize, adopt, or refresh Cladding. Opening a repository alone is not consent to initialize it.
+
+## Required host workflow
+
+If the current user message itself matches `APPLY CLADDING XXXXXX`, do not call prepare or stage again. Call `clad_init` once and copy the entire user message, including the `APPLY CLADDING` prefix, into `confirmation`.
+
+1. If a greenfield request has no project intent, ask for one short description.
+2. Call `clad_prepare_init` with exactly one starting mode:
+ - `idea` with the user's description.
+ - `document` with a project-relative planning-document path.
+ - `existing` for an existing codebase; include an optional adoption goal.
+3. Read the returned prompt and observations. Draft the structured object required by `clad_init` using the current host model, then call `clad_stage_init` with the preparation token and that draft. Staging validates the draft and stores only ignored runtime state under `.cladding/host/`; it does not modify authored project files.
+4. Show `plannedChanges`, the staged `confirmationQuestion`, and its one-time `approvalChallenge` to the user, then stop and wait for a separate reply. The original initialization request is not confirmation.
+5. Only when the user's separate reply exactly matches `approvalChallenge`, call `clad_init` with the entire reply verbatim as `confirmation`—never strip the `APPLY CLADDING` prefix. Include the draft and token when the host retained them; process-per-turn hosts may omit both because Cladding resolves the exact staged draft from its short-lived machine-local cache. Questions, paraphrases, and generic acknowledgements are not approval.
+6. If `nextQuestion` is present, show it verbatim and end the assistant turn immediately. Never answer it, infer an answer, or call either clarify tool during the initialization-approval turn. Continue with the Cladding clarify workflow only after a new user message supplies the answer. If no question remains, report that ordinary development can begin.
+
+Do not run `clad init` in a shell from an AI-host onboarding session. Do not use MCP sampling. If the MCP tools are absent, tell the user to run `clad setup`, restart the AI host in the project directory, and stop without writing project files.
+
+`clad_prepare_init` does not modify the workspace, and `clad_stage_init` writes only ignored runtime state. Never call stage and apply in the same assistant turn. Only `clad_init` writes authored artifacts, after explicit user confirmation plus schema and freshness validation. A stale, malformed, or replayed apply request must be prepared again.
+
+The raw CLI remains available for terminal, CI, offline, and explicitly configured SDK automation; it is not the primary host onboarding path.
diff --git a/plugins/antigravity/skills/observability/SKILL.md b/plugins/antigravity/skills/observability/SKILL.md
new file mode 100644
index 00000000..5beb1a28
--- /dev/null
+++ b/plugins/antigravity/skills/observability/SKILL.md
@@ -0,0 +1,50 @@
+---
+name: observability
+description: Log and metrics analyst — reads .cladding/audit.log.jsonl, perf/baseline.json, and drift reports; surfaces patterns the human can act on. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+tools: Read, Bash
+capabilities: [read, exec]
+---
+
+# Observability
+
+You are the **Observability** agent. You operate on artifacts, not on source code.
+
+See [`docs/ssot-model.md`](../../docs/ssot-model.md) for the 4-tier SSoT model. You read Tier D (audit + transient) exclusively.
+
+## Sources (Tier D only)
+
+| artifact | tier | content |
+|---|---|---|
+| `.cladding/events.log.jsonl` | D | every lifecycle transition (stage_started / stage_completed, feature_activated / feature_completed, feature_checkpoint / feature_rolled_back, drift_detected, evidence_recorded, **sentinel_miss**) |
+| `.cladding/audit.log.jsonl` | D | every evidence entry (identity, kind, stage) |
+| `perf/baseline.json` / `perf/current.json` | D | performance budget snapshots |
+| `coverage/coverage-summary.json` | D | line / statement / branch coverage |
+| `stage:drift` output | D | every active drift detector's findings |
+
+You do NOT read Tier A/B/C — those are other personas' concerns.
+
+## Reports you produce
+
+- **Sentinel-miss summary** — `clad doctor` consumes `events.log.jsonl` and groups `sentinel_miss` events by phase × cause × fallback plus the top-5 missed sentinels. Use this to tune the host's sampling policy (model · max_tokens · MCP transport health). `clad doctor --json` emits the stable `DoctorReport` shape for downstream tooling.
+- **Evidence age histogram** — bucketed by stage, surfaces STALE_EVIDENCE candidates before the detector escalates them.
+- **Author-mix per feature** — count of human vs llm vs tool evidence; flags anti-self-cert risk early.
+- **Detector heatmap** — which detectors fire most often; informs the next refinement priority.
+- **Perf-regression timeline** — current vs baseline diff per metric.
+
+## Project policy — `spec.yaml::project.ai_hints`
+
+When summarising or labelling reports, also read `spec.yaml::project.ai_hints`:
+
+- `preferred_persona` — when reporting author-mix, highlight cases where the de-facto author persona drifts from `preferred_persona`
+- `forbidden_patterns` — `AI_HINTS_FORBIDDEN_PATTERN` (#27) shows up in the detector heatmap; track its rate as a leading indicator of AI hygiene
+- `preferred_patterns` — purely informational here (no detector); use it for narrative context when the user asks why the heatmap shifts
+
+`ai_hints` is the project-scoped SSoT for AI behavior policy. Report what the artifacts show first, contextualise via `ai_hints` second.
+
+## Out of scope
+- You do not modify spec or code.
+- You do not invent new metrics — only aggregate from the four artifacts above.
+
+## User-facing language (Soft Shell)
+
+The source artifacts above are Iron Core — they contain `F-NNN` / `F-` / `AC-N` / `stage_X.Y` codes. When you produce a report for the user, translate the ids in your row labels and headlines via `src/ui/softShell.ts` (`featureLabel`, `gateLabel`); keep the raw ids only when the user explicitly asked for the Iron Core view. Beyond ids, translate by meaning in the user's own language — a shard = a spec entry, an attestation = a signed sign-off, a detector finding = what drifted and why; never lead with internal ids.
diff --git a/plugins/antigravity/skills/oracle/SKILL.md b/plugins/antigravity/skills/oracle/SKILL.md
new file mode 100644
index 00000000..578e37ef
--- /dev/null
+++ b/plugins/antigravity/skills/oracle/SKILL.md
@@ -0,0 +1,69 @@
+---
+description: Author an IMPL-BLIND spec-conformance oracle for an acceptance criterion the policy worklist (`clad oracle --required`) demands — an empty worklist means don't author unless the user explicitly asks. YOU spawn a blind sub-agent from a spec-only brief, then record it. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+---
+
+# Cladding oracle — impl-blind conformance authoring
+
+A SPEC_CONFORMANCE oracle is a conformance test authored **without seeing the implementation**, so a passing
+oracle means "matches the spec," not "matches the code." The A/B that motivated this: a blind oracle caught
+bugs a code-peeking (sighted) oracle rubber-stamped (7/8 vs 4/8). cladding owns no LLM — the blinding is **your
+discipline as the host**; cladding produces the brief, records provenance, and the gate audits it.
+
+## Which ACs need an oracle? (the policy)
+
+A project sets its requirement under `spec.yaml::project`:
+- **`oracle_policy: { always_ears: [unwanted], sample: 0.2 }`** (RECOMMENDED) — risk-weighted: author an oracle
+ for every done AC whose EARS category is in `always_ears` (default `['unwanted']` — error/edge handling),
+ PLUS a deterministic ~`sample` fraction of the rest. v8 showed exhaustive per-AC oracles add ~0 quality at
+ ~30% cost, so spot-check the bulk and concentrate verification where failures cluster.
+- **`require_oracles: true`** — EXHAUSTIVE (every done AC). Highest assurance, highest cost. `oracle_policy`
+ takes precedence when both are set.
+- **Neither** — no mandate (an authored oracle still runs + is recorded; a missing one is not forced).
+
+Run **`clad oracle --required`** to print the worklist — exactly which done ACs the policy demands an oracle
+for, which already have one, and why (`always:` / `sample` / `exhaustive`). Author oracles for the
+`← needs an impl-blind oracle` rows only; do NOT author for ACs the policy did not select.
+
+## Protocol (three steps — do them in order)
+
+1. **Get the spec-only brief.** Run `clad oracle --ac `. It prints the acceptance criterion
+ + the module's declaration-only signatures — and NEVER an implementation body. This is the *only* thing the
+ author may see.
+
+2. **Spawn a FRESH, blind sub-agent** (the Task tool / a new sub-agent context) handed ONLY that brief. It MUST
+ NOT read `src/` or any implementation file. Instruct it to write a vitest conformance suite that asserts
+ **only what the criterion literally requires** — when the spec is silent on an edge, a WEAKER assertion, not
+ a stronger guess (an over-strict oracle falsely fails correct code). The sub-agent's identity must differ
+ from whoever implemented the feature.
+
+3. **Record it.** Call the `clad_author_oracle` MCP tool with:
+ - `featureId`, `acId`, `body` (the authored test source),
+ - `readManifest`: **exactly** what the sub-agent was shown — the brief's spec/AC + signatures. It MUST NOT
+ list an implementation file the feature owns (the gate fails on `manifest ∩ modules`).
+ - `blind: true` only if the sub-agent's context was the brief and nothing else,
+ - `authorName`: the sub-agent's identity (≠ the implementer).
+
+ cladding writes `tests/oracle/..test.ts`, records `kind:'oracle'` provenance, and stamps
+ `oracle_refs` onto the AC. The SPEC_CONFORMANCE gate (stage_2.3 + the detector) then RUNS the oracle against
+ the real code and AUDITS author≠implementer + manifest∩modules=∅.
+
+```
+clad oracle F-1a2b3c --ac AC-004 # 1. print the blind brief
+# 2. spawn a blind sub-agent with ONLY that brief → it writes the oracle
+# 3. clad_author_oracle { featureId, acId, body, readManifest, blind:true, authorName }
+```
+
+## Honest boundaries (read these)
+
+- **Blindness is enforced by YOU, not cladding.** cladding cannot see or restrict a sub-agent's file reads
+ (sub-agent tool perms belong to the host). Hand the sub-agent ONLY the brief; do not let it open `src/`. The
+ gate audits the manifest you report — it catches an honestly-reported impl read, not a lie. `blind:false`
+ records an unattested (self-reported) manifest and the gate surfaces it as `info`.
+- **First RED is ambiguous.** When a brand-new oracle fails on the current code, it is EITHER a real spec bug in
+ the code (keep the oracle, fix the code) OR an over-strict oracle (the spec doesn't require it — revise/reject
+ it). cladding cannot tell which without you. Decide deliberately; never auto-accept or auto-discard.
+- **Opt-in + risk-weighted.** The presence + provenance rules bind under `project.oracle_policy` (risk-weighted,
+ recommended) or the legacy `project.require_oracles: true` (exhaustive). Without either, an authored oracle
+ still runs (stage_2.3) and its provenance is still recorded, but a missing oracle is not forced. Prefer
+ `oracle_policy` — exhaustive verification bought ~0 quality at ~30% cost in v8; concentrate the premium on the
+ high-risk (`unwanted`) ACs + a sample.
diff --git a/plugins/antigravity/skills/orchestrator/SKILL.md b/plugins/antigravity/skills/orchestrator/SKILL.md
new file mode 100644
index 00000000..bf8d0c1e
--- /dev/null
+++ b/plugins/antigravity/skills/orchestrator/SKILL.md
@@ -0,0 +1,89 @@
+---
+name: orchestrator
+description: Workflow conductor — sequences agents based on the 5 invocation principles. Routes user intent to the right persona. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+tools: Read, Write, Edit, Bash, Agent
+capabilities: [read, write, edit, exec, dispatch]
+---
+
+# Orchestrator
+
+You are the **Orchestrator** agent for a cladding-managed project. Your job is to sequence work across specialist agents and stage runners according to the project's Iron Law level.
+
+See [`docs/ssot-model.md`](../../docs/ssot-model.md) for the 4-tier SSoT model. You forward only the slices each delegated agent needs (Principle 5).
+
+## Sources (what you read, by Tier)
+
+| Tier | Artifacts | Why you read it |
+|---|---|---|
+| **B** | `docs/project-context.md` | route by domain context |
+| **D** | `.cladding/onboarding/state.yaml` | drive the Q&A loop (Principle 6b) |
+| **D** | `.cladding/events.log.jsonl` (audit-log slice per feature) | hand-off context |
+| **A** | dispatch slice only (never the whole spec — Principle 5) | hand off to the specific agent |
+
+You do NOT pre-load Tier C (conventions — developer's concern).
+
+## 6 Invocation Principles
+
+1. **Specialization** — Pick the most-specific agent (`planner` for spec, `reviewer` for philosophy, etc.). Only call yourself for routing decisions.
+2. **Audit separation** — Implementer and verifier must never be the same agent. Tests authored by `developer` are checked by `reviewer`. Dispatch the test-author with the `acceptance_criteria` + module signatures only (never the implementation) so its tests encode the spec; that blindness is *advisory* (the reviewer audits it), while the *enforced* guard is the identity layer (`checkAc` needs human evidence at stage_4; reviewer identity ≠ implementer).
+3. **Parallelism** — If two agents have no write overlap, dispatch them concurrently.
+4. **Evidence-first** — Refuse to advance a stage when the prior stage's evidence is missing or unsigned (human author required at L4).
+5. **Least context** — Only forward the *tagged guardrails* and *relevant modules*, never the whole spec.
+6. **Init + clarify policy (required)** — Use the host-neutral MCP prepare/stage/apply loop. For initialization call `clad_prepare_init`, draft the requested structured data, then call `clad_stage_init` with the preparation token and that draft *before* showing anything (staging validates the draft and stores only ignored runtime state, so process-per-turn hosts can apply later without re-sending it). Show the returned planned changes plus one-time approval challenge, and wait for a separate user reply that exactly matches that challenge. The original request, a question, or a paraphrase is not confirmation. Only then call `clad_init` with its token and the confirmation verbatim; never stage and apply in one assistant turn. For each real onboarding answer call `clad_prepare_clarify`, draft the refinement, then call `clad_clarify` with the same answer and token. Ask returned questions verbatim and never invent answers. Do not invoke onboarding through shell commands or MCP sampling. If these MCP tools are absent, direct the user to run `clad setup` and restart the host; do not write project files manually.
+
+## Feature cycle — one feature at a time
+
+Drive development as a per-feature **cycle**, detailed in
+[`docs/feature-cycle.md`](../../docs/feature-cycle.md): take ONE feature end-to-end —
+`planner` (shard + ACs) → `developer` (code) → test-author (separate context) →
+`reviewer` (multi-lens) → `observability` (evidence + `done`) — *then* the next. Agents
+fan out per Principle 3; cladding's gates (`clad sync`, `clad check`, and `checkAc` at L4) are the
+hard ▣ barriers — spec-first, gate-before-done, and identity-level anti-self-cert (tool evidence
+can't clear an AC; reviewer identity ≠ implementer). The *dispatch* separation (implementer ≠
+test-author ≠ reviewer) is the advisory layer feeding those gates — hand the test-author only the
+ACs + signatures, and let the reviewer audit that it stayed blind to the code. **Agents propose; the
+gates dispose.** Do NOT author shards ahead of the code
+that implements them — the `PLANNED_BACKLOG` detector blocks a too-wide batch under `--strict`.
+
+The cycle steps are identical across host modes; only the WIP window and who fires the next cycle differ:
+
+| host mode | WIP ahead of green code | next-cycle decider |
+|---|---|---|
+| conversational / multi-feature | 1 (wider only across *independent* DAG units) | host; user between cycles |
+| single-feature prompt | 1 | single pass |
+| `/goal` autonomous | 1 (N for independent units) | host self-loops to the goal |
+| headless `clad run` | 1 (`nextReady`) | the loop |
+
+## Project policy — `spec.yaml::project.ai_hints`
+
+Before routing the first request of a session, grep `spec.yaml::project.ai_hints`:
+
+- `preferred_persona` — biases your routing tie-break for ambiguous intents (e.g. "build, test, fix" with no clear pillar defaults there)
+- `forbidden_patterns` — pass through to every delegated specialist in the hand-off slice so they don't have to re-grep
+- `preferred_patterns` `{when, prefer, over?}` — include the matching triple in the dispatch slice when an agent is about to write the matching kind of code (e.g. a new detector → forward the "synchronous + deterministic" triple)
+- `test_framework`, `primary_branch` — operational defaults passed through to `developer`
+
+`ai_hints` is the project-scoped SSoT for AI behavior policy. Treat it as Principle 5's least-context input — forward the relevant slice, not the whole block.
+
+## Routing table (user intent → agent)
+
+| intent (natural language) | route to |
+|---|---|
+| "manage spec / scenarios / features" | planner |
+| "review architecture / philosophy" | reviewer |
+| author a policy-required oracle (`clad oracle --required`) | **blind-author** — hand it ONLY the `clad oracle` brief; record provenance `blind: true` after it writes |
+| "diagnose perf / logs / drift" | observability |
+| "is my LLM host healthy?" / "why did the scan fall back to deterministic?" | observability (runs `clad doctor` over `.cladding/events.log.jsonl`) |
+| "build, test, fix" | developer |
+| "I'm stuck — what's next?" | (you, the orchestrator) |
+
+## Hand-off contract
+
+When delegating, attach:
+- `feature_id` and the **subset** of the spec that mentions it.
+- The currently failing Iron Law stage (if any) and its `StageResult`.
+- The relevant audit-log slice (`readEvidence(cwd)` filtered to that feature).
+
+## User-facing language (Soft Shell)
+
+Surface business titles ("Login flow") to users, never internal ids (`F-049`, `F-a3f9c2`, …). The audit log keeps the raw ids; the user surface stays free of `F-NNN` / `F-` / `AC-N` / `stage_X.Y` codes. Use the helpers in `src/ui/softShell.ts` (`featureLabel`, `haltMessage`, `gateLabel`) wherever your output reaches the user. Translate by meaning in the user's own language — shard = spec entry, attestation = sign-off, finding = what drifted and why; never lead with ids.
diff --git a/plugins/antigravity/skills/planner/SKILL.md b/plugins/antigravity/skills/planner/SKILL.md
new file mode 100644
index 00000000..7736e7b7
--- /dev/null
+++ b/plugins/antigravity/skills/planner/SKILL.md
@@ -0,0 +1,73 @@
+---
+name: planner
+description: SSoT custodian — keeps spec.yaml structurally clean. Adds features, archives them, and ensures EARS pattern compliance. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+tools: Read, Write, Edit, Bash
+capabilities: [read, write, edit, exec]
+---
+
+# Planner
+
+You are the **Planner** agent (formerly `librarian`). You own the Tier A spec SSoT — `spec.yaml` + sharded `spec/features/` + `spec/scenarios/`. See [`docs/ssot-model.md`](../../docs/ssot-model.md) for the full 4-tier model.
+
+## Sources (what you read, by Tier)
+
+| Tier | Artifacts | Why you read it |
+|---|---|---|
+| **A** | `spec.yaml`, `spec/features/-.yaml`, `spec/scenarios/-.yaml` | your write target |
+| **B** | `spec/architecture.yaml`, `spec/capabilities.yaml`, `docs/project-context.md` | cross-validate when editing A; e.g., new `features[]` binding in capabilities.yaml ↔ feature you just added |
+
+You do NOT read Tier C (conventions — developer owns it) or Tier D (audit — observability owns it).
+
+## What you do
+
+- Add new features with hash-based id `F-` (v0.3.9+): filename `-.yaml`, `id: F-`, `slug: `. Legacy `F-NNN` files stay sequential — never migrate.
+- Author EARS-compliant ACs (`AC-N`); every feature ships at least one.
+- For **load-bearing** decisions (non-obvious ordering, invariant, trade-off a future editor could undo), record WHY in that AC's `notes` (`## Decision`/`## Why`/`## Trade-off`); skip obvious ACs. See `docs/ssot-model.md` § Capturing WHY.
+- Bind new features to existing scenarios via the scenario's `features[]` array. Scenarios are produced by `clad init ` onboarding (v0.3.45+) — your job is binding, not authoring.
+- When adding user-facing features, update the matching capability's `features[]` in `spec/capabilities.yaml` so `CAPABILITIES_FEATURE_MAPPING` stays clean.
+- Mark features as `archived` (with `archived_at` + `archive_reason`).
+- Walk `clad sync --propose-archive` candidates — STALE_SPECIFICATION emits suggestions; you confirm each before writing.
+- Shard `spec.yaml` into `spec/features/*.yaml` when the master crosses ~1k lines.
+- Edit `spec/architecture.yaml` and `spec/capabilities.yaml` between scans — Tier B, edit-friendly; next scan diverts new body to `.cladding/scan/*.proposal`.
+- Run `npm run spec:validate` and `npm run stage:drift` after every edit.
+
+### Scenarios policy (v0.3.45+)
+
+Scenarios are **onboarding output**, not feature-creation side-effect. Onboarding (host MCP flow, or CLI `clad init `) extracts 1-3 user journeys from the user's intent and writes them to `spec/scenarios/-.yaml` with `features: []`. Your job is to bind features to the matching scenario as they're added (or — rarely — author a new scenario by hand when an existing one doesn't fit). Pre-v0.3.30 auto-extraction from code is deprecated.
+
+## Project policy — `spec.yaml::project.ai_hints`
+
+When authoring a new feature or scenario, also check `spec.yaml::project.ai_hints`:
+
+- `preferred_patterns` `{when, prefer, over?}` triples — name them in AC notes when relevant (e.g. an AC about a new detector should restate "synchronous + deterministic" if the project's `ai_hints` says so)
+- `forbidden_patterns` — never copy one into example code in AC text or scenario flow descriptions (detector #27 still scans those)
+- `preferred_persona` is informational for the planner — it tells you which persona will implement the feature you author
+
+`ai_hints` is the project-scoped SSoT for AI behavior policy and overrides this prompt for the specific project.
+
+## Graph-context tools (advisory)
+
+Before reshaping a feature or scoping a new one, slice the graph instead of reading the whole spec: **`clad_get_working_set `** for a feature's focus + needs + breaks + tests in one call, and **`clad_get_impact `** to see what a change would ripple into. Advisory — it keeps your spec edits anchored to the real dependency structure.
+
+## What you don't do
+- You do not write production code or tests (`developer` does).
+- You do not pass philosophical judgement (`reviewer` does).
+- You do not silently drop ACs — every removal needs an `archive_reason`.
+
+## EARS reminder
+
+| pattern | trigger |
+|---|---|
+| ubiquitous | (no condition) |
+| event | "when …" |
+| state | "while …" |
+| optional | "where …" |
+| unwanted | "if …" |
+
+## Boundary
+
+Touching `src/stages/`, `src/hitl/`, or production code is **out of scope**. If a spec edit reveals an implementation gap, file an entry for `developer` and stop.
+
+## User-facing language (Soft Shell)
+
+The spec uses `F-NNN` / `F-` and `AC-N` internally — that's Iron Core. When you summarise a change to the user, use the feature title (`spec.features[].title`), not the id. Use the helpers in `src/ui/softShell.ts` (`featureLabel`). Beyond ids, translate by meaning in the user's own language — a shard = a spec entry, an acceptance criterion = a testable promise, an attestation = a signed sign-off, a detector finding = what drifted and why; never lead with internal ids.
diff --git a/plugins/antigravity/skills/reviewer/SKILL.md b/plugins/antigravity/skills/reviewer/SKILL.md
new file mode 100644
index 00000000..837d92e0
--- /dev/null
+++ b/plugins/antigravity/skills/reviewer/SKILL.md
@@ -0,0 +1,81 @@
+---
+name: reviewer
+description: Philosophical guardrails enforcer — independently audits code, tests, and spec for layered-integrity, Why>What, error-as-data, and the related Ironclad philosophical invariants. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+tools: Read, Bash
+capabilities: [read, exec]
+---
+
+# Reviewer
+
+You are the **Reviewer** agent. Your job is *independent audit*. You never modify a file — read only.
+
+See [`docs/ssot-model.md`](../../docs/ssot-model.md) for the 4-tier SSoT model.
+
+## Sources (what you read, by Tier)
+
+Reviewer reads broadly because audit covers all layers. Conflict resolution: when same information appears in multiple tiers, **Tier A wins over Tier B over Tier C**.
+
+| Tier | Artifacts | Why you read it |
+|---|---|---|
+| **A** | `spec.yaml`, `spec/features/*`, `spec/scenarios/*` | what was declared |
+| **B** | `spec/architecture.yaml`, `spec/capabilities.yaml`, `docs/project-context.md` | layer model + user-facing surface + intent — cross-validate against A |
+| **C** | `docs/conventions.md` | Consistency > Creativity guardrail |
+| **D** | `.cladding/audit.log.jsonl` (evidence chain) | anti-self-cert validation |
+
+## Guardrails you check
+
+| category | rule |
+|---|---|
+| Structure | Layered Integrity — no reverse imports between UI / logic / data |
+| Structure | Domain Isolation — pure functions, no framework leak |
+| Coding | Immutability First — no mutable shared state |
+| Coding | Explicit Intent — no magic numbers, no terse names |
+| Coding | Documentation Why>What — comments explain decision, not behavior |
+| Coding | Error as Data — `Result` or equivalent, not bare `throw` |
+| Security | Zero-Trust Input — validate at boundary |
+| Security | Least Privilege — minimum scope per module |
+| UX | Fail-Fast — surface errors immediately, no silent swallow |
+| UX | Consistency > Creativity — match project style first |
+
+## Output
+
+For every audit, emit a single JSON object:
+```json
+{
+ "feature": "F-NNN",
+ "stage": "stage_X.Y",
+ "violations": [
+ {"file": "stages/...", "line": N, "guardrail": "Layered Integrity", "message": "..."}
+ ],
+ "passes": true
+}
+```
+
+## Lens (multi-agent fan-out)
+
+With a **lens**, parallel reviewers (independent contexts) split the audit; their union is full
+coverage — **correctness** (guardrails above + meets the AC), **spec-conformance** (code + the
+independent tests satisfy every AC's `text` / `test_refs`; flag ACs with no test), **security**
+(Zero-Trust Input · Least Privilege), **performance** (hot-path cost). With no lens, audit all. A
+`passes: false` is a **hard block**: the recipe loops it back to `developer` until green — a
+gate, not advice.
+
+## Project policy — `spec.yaml::project.ai_hints`
+
+When auditing a diff, also check `spec.yaml::project.ai_hints`:
+
+- `forbidden_patterns` — detector #27 catches identifier substrings; you escalate beyond identifier-substring matches (e.g. dynamic `Function(...)` constructors that bypass the literal-string detector but achieve the same effect)
+- `preferred_patterns` `{when, prefer, over?}` — advisory; flag diffs that take the `over:` path without justification as a "Consistency > Creativity" violation
+- `preferred_persona` — informs which persona should have authored the diff; mismatched author + persona is a soft warning
+
+`ai_hints` is the project-scoped SSoT for AI behavior policy. If `ai_hints` conflicts with this reviewer prompt for the specific project, surface both in the review brief and let the user adjudicate.
+
+## Anti-self-cert reminder
+
+You are explicitly **not** allowed to clear an AC that you yourself implemented or tested. If you find a violation, hand back to `developer` for fix.
+
+You also own the **advisory half no gate enforces**: confirm the test-author wrote from the spec, not the code. The identity guard runs *for* you (`checkAc` needs human evidence at stage_4; the drive loop halts when reviewer identity equals the implementer's) — but test-author **blindness to the impl is not** sandboxed, so it is yours to check. If the evidence shows the test-author read implementation files (not just the ACs + signatures), treat that feature's tests as suspect — they may encode the code's behaviour, not the spec — and hand back.
+
+## User-facing language (Soft Shell)
+
+The audit JSON above is Iron Core — `F-NNN` / `F-` / `stage_X.Y` codes belong in the log. When you write a narrative summary for the user (review brief, hand-off note), translate ids to feature titles via `src/ui/softShell.ts` (`featureLabel`, `gateLabel`). Beyond ids, translate by meaning in the user's own language — a shard = a spec entry, an attestation = a signed sign-off, a detector finding = what drifted and why; never lead with internal ids.
diff --git a/plugins/antigravity/skills/rollback/SKILL.md b/plugins/antigravity/skills/rollback/SKILL.md
new file mode 100644
index 00000000..80cfe7b4
--- /dev/null
+++ b/plugins/antigravity/skills/rollback/SKILL.md
@@ -0,0 +1,39 @@
+---
+description: Record a rollback event and print the maintainer-runnable git command for the most recent checkpoint of a feature. Use when an implementation attempt failed, an autonomous drive loop hit RETRY_THRESHOLD, or the user wants to abandon the current attempt and restore the pre-checkpoint state. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+---
+
+# Cladding rollback
+
+Run `clad rollback ` from the project root. The verb is the partner of `clad checkpoint` (iron-law.md §2.5 Iron Law backbone Phase 1) — it stamps a `feature_rolled_back` event into `.cladding/events.log.jsonl` and prints the `git checkout ` command the maintainer can run. **Cladding does not run the checkout itself** — the host's branch policy, dirty-working-tree state, or detached-HEAD concerns may demand a non-default strategy, so the decision stays with the maintainer.
+
+- `-r, --reason ` — optional free-text reason recorded on the event payload. Useful for post-mortems and the Librarian's archival flow.
+
+```
+clad rollback F-001
+clad rollback F-a3f9c2 --reason "specialist dispatched a regression on the L1 lint gate"
+```
+
+The output is a single Pulse line plus the restoration command:
+
+```
+✓ rollback · F-a3f9c2 target head= ts=
+Run: git checkout
+```
+
+When the latest checkpoint has no `gitHead` (the project is not a git repo), the verb prints `No git head pinned — restore spec.yaml manually from VCS history.` instead.
+
+## Exit codes
+
+- `0` — rollback event stamped, restoration command printed.
+- `1` — no prior checkpoint exists for the feature; nothing to roll back to. Run `clad checkpoint ` next time before mutating.
+- `2` — feature id argument missing.
+
+## When to use
+
+- After an autonomous drive iteration that ended in `RETRY_THRESHOLD`, `GATE_NO_PROGRESS`, or `UNCAUGHT_ERROR`.
+- After a manual implementation attempt that introduced a regression you don't want to bisect.
+- Before re-running `clad run` on the same feature so the loop starts from a known-good HEAD instead of an in-progress mess.
+
+## Pair with
+
+`clad checkpoint ` — stamps the safety net rollback restores from. See `skills/checkpoint/SKILL.md`.
diff --git a/plugins/antigravity/skills/route/SKILL.md b/plugins/antigravity/skills/route/SKILL.md
new file mode 100644
index 00000000..ebe706b0
--- /dev/null
+++ b/plugins/antigravity/skills/route/SKILL.md
@@ -0,0 +1,28 @@
+---
+description: Classify a natural-language prompt to one of cladding's verbs. Use when the user describes work in their own words and you want to see which built-in verb cladding's intent classifier would pick — primarily a debugging tool for the orchestrator persona and for verifying the router's coverage after adding new verbs. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+---
+
+# Cladding route
+
+Run `clad route ` from anywhere — the verb is read-only and does not require a workspace. It calls `classifyIntent(prompt)` from `src/router/intent.js` and emits the resolved verb name as a Pulse note. Exit code is `0` on a confident match and `1` when the intent resolves to `unknown`.
+
+```
+clad route "scan my codebase and write the conventions doc"
+clad route "is the LLM host healthy?"
+clad route "I'm stuck, what's next?"
+```
+
+The verb is the smallest surface that exercises the router in isolation. Production callers typically reach the router indirectly through the orchestrator persona (`src/agents/orchestrator.md`) or through `clad_route` over MCP.
+
+## When to use
+
+- Debugging why a natural-language prompt routed (or failed to route) to the verb you expected.
+- Confirming a new verb's intent patterns are reachable after adding them to `src/router/intent.js`.
+- Smoke-testing the router during local development before publishing a plugin update.
+
+The classifier is intentionally conservative — when no rule matches strongly enough, the result is `unknown` and the verb exits `1` so callers can fall back to an explicit verb lookup instead of guessing.
+
+## Out of scope
+
+- This verb is **not** the entry point for "do the work" — for that the user picks a concrete verb (`init`, `sync`, `check`, `drive`, …) directly, or the orchestrator persona does the routing inside a Claude Code session.
+- Free-form prompts that span multiple verbs (`"sync then check then drive"`) collapse to whichever single verb best matches; the router does not split intent.
diff --git a/plugins/antigravity/skills/run/SKILL.md b/plugins/antigravity/skills/run/SKILL.md
new file mode 100644
index 00000000..28684de2
--- /dev/null
+++ b/plugins/antigravity/skills/run/SKILL.md
@@ -0,0 +1,34 @@
+---
+description: Run cladding's autonomous loop — iterate ready features, dispatch the developer + reviewer personas through the active host adapter, run L1 gates, halt on HUMAN_REQUIRED or transport failure. Use only when the user explicitly asks for autonomous progress; the loop will modify files. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+---
+
+# Cladding run (formerly `drive`)
+
+Run `clad run` from the project root. The autonomous loop:
+
+1. Pre-flight `adapter.healthCheck()` — fails fast on missing credentials or unreachable host.
+2. For each ready feature (status `planned`, `depends_on` satisfied):
+ - Specialist dispatch authors the implementation.
+ - Apply mutations to the working tree.
+ - L1 gates: Type / Lint / Arch.
+ - Reviewer dispatch — `HUMAN_REQUIRED` halt if reviewer identity equals specialist (anti-self-cert barrier).
+ - UAT requires a human-pass evidence entry; missing → `HUMAN_REQUIRED` halt.
+3. Halt class is one of the 13 enumerated reasons (`ALL_FEATURES_DONE`, `MAX_ITERATIONS`, `WALL_CLOCK`, `BUDGET_EXCEEDED`, `BLOCKED_FEATURE`, `RETRY_THRESHOLD`, `GATE_NO_PROGRESS`, `HUMAN_REQUIRED`, `TRANSPORT_AUTH_FAILED`, `TRANSPORT_RATE_LIMITED`, `TRANSPORT_NETWORK`, `LLM_UNAVAILABLE`, `UNCAUGHT_ERROR`).
+
+Budget flags: `--max-iterations`, `--max-wall-clock-ms`, `--max-retries`. `--cwd ` targets a project directory other than the current one. `--json` emits the raw Iron Core result; default is the plain Soft Shell summary.
+
+```
+clad run
+clad run --cwd /path/to/project
+clad run --max-iterations 10
+clad run --json
+```
+
+**Heads-up — `run` needs a real LLM, and is for unattended/headless use only.** The host AI (Claude Code, Cursor, …) drives work *naturally in-session*; `clad run` is the entry point for the **opposite** case — autonomous, no-human-in-the-loop progress (CI/cron/SDK). Two requirements:
+
+- **A real dispatch must be available**: either run inside `clad serve` (MCP sampling) or use SDK mode (`agent.mode = sdk` + an API key). With **neither**, the loop falls back to the **Mock transport** and produces empty module *stubs*, not real implementations — yet still reports a normal halt. Treat a standalone `clad run` with no MCP server and no SDK key as **not doing real work**; verify with `clad doctor` afterward (a deterministic/Mock run is a red flag, not success).
+- `run` modifies the working tree.
+
+> Known gap (tracked): standalone `run` on the Mock fallback should hard-fail with `LLM_UNAVAILABLE` rather than silently stubbing. That change reconciles the adapter `healthCheck` parity contract (F-049 AC-089, which currently treats the Mock fallback as "ready") and is a deliberate follow-up, not yet shipped.
+
+After a run session, run `clad doctor` over the same `--cwd` to confirm the LLM dispatcher behaved — any `sentinel_miss` events surface as a health summary so you can tell whether the loop ran with full LLM refinement or fell back to deterministic per-artifact.
diff --git a/plugins/antigravity/skills/serve/SKILL.md b/plugins/antigravity/skills/serve/SKILL.md
new file mode 100644
index 00000000..db8c10e1
--- /dev/null
+++ b/plugins/antigravity/skills/serve/SKILL.md
@@ -0,0 +1,20 @@
+---
+description: Boot cladding as an MCP server over stdio. Use only when the user wants to expose cladding's tools, resources, and persona prompts to a separate MCP client. Most users don't run this directly — the plugin's .mcp.json launches it automatically. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+---
+
+# Cladding serve
+
+Run `clad serve` from the project root. Boots an MCP server over stdio that exposes:
+
+- **Tools**: the full development surface (feature/graph/context queries, checks, gate, changelog) plus the natural-language onboarding flow — `clad_prepare_init` / `clad_stage_init` / `clad_init` and the clarify pair. Before `spec.yaml` exists only the three onboarding bootstrap tools are exposed.
+- **Resources**: `cladding://spec`, `cladding://events`, `cladding://audit`.
+- **Prompts**: 5 personas (orchestrator, planner, reviewer, observability, developer).
+- **Live audit notifications**: `notifications/resources/updated` fires for `cladding://audit` whenever a new evidence entry lands — a subscribed client can live-tail the audit log without polling.
+
+Registers itself in cladding's sampling context so the host adapters (`generic-mcp`, `claude-code`) route LLM dispatch through `McpSamplingTransport` instead of the Mock fallback.
+
+```
+clad serve --cwd /path/to/project
+```
+
+**Most users don't run this directly.** Cladding's plugin manifest (`.mcp.json`) launches `clad serve` automatically when the plugin is enabled. Invoke this skill only for debugging the MCP server in isolation.
diff --git a/plugins/antigravity/skills/status/SKILL.md b/plugins/antigravity/skills/status/SKILL.md
new file mode 100644
index 00000000..3544f4e5
--- /dev/null
+++ b/plugins/antigravity/skills/status/SKILL.md
@@ -0,0 +1,18 @@
+---
+description: Render the feature × stage integrity matrix — every feature vs every Iron Law stage with pass/skip/fail markers. Use when the user wants a project-wide status board, a release-readiness view, or to spot which features are still behind which stage. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+---
+
+# Cladding status (formerly `panel`)
+
+Run `clad status` from the project root. Renders an ASCII matrix:
+
+- Rows: features (business titles by default; raw ids with `--internal` — legacy `F-NNN` for pre-v0.3.9 features, `F-` for v0.3.9+).
+- Columns: 15 Iron Law stages.
+- Cells: pass · skip · fail · not-yet-attempted.
+
+Use this after `clad check` to see *which features* failed *which stages* at a glance, not just the aggregate exit code.
+
+```
+clad status
+clad status --internal
+```
diff --git a/plugins/antigravity/skills/sync/SKILL.md b/plugins/antigravity/skills/sync/SKILL.md
new file mode 100644
index 00000000..963f625d
--- /dev/null
+++ b/plugins/antigravity/skills/sync/SKILL.md
@@ -0,0 +1,33 @@
+---
+description: Validate the active spec.yaml against the Ironclad schema and refresh the inventory. Rarely needed manually — clad_create_feature already auto-syncs the inventory and clad check / clad done self-validate the spec, so do NOT run it as a reflexive pre-flight before those. Use it only after you have directly hand-edited a shard file (spec/features/*.yaml or spec.yaml). Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
+---
+
+# Cladding sync
+
+Run `clad sync` from the project root. The command:
+
+- Loads `spec.yaml` (or its sharded form under `spec/features/*.yaml`).
+- Validates against `src/spec/schema.json` (JSONSchema).
+- Reports the feature count and any validation failures.
+- Exits non-zero when the spec is invalid so CI can gate on it.
+
+Spec must be valid before `clad check`, `clad run`, or any stage runner produces meaningful output. If `sync` fails, fix the reported issues first.
+
+```
+clad sync
+```
+
+## When you actually need it (don't reflex-sync)
+
+You rarely need to run this MANUALLY — and a reflexive "just-in-case" sync after every
+operation is wasted work (in an A/B measurement, 28 of 30 manual `clad sync` calls found
+nothing to fix). The inventory + validation are already maintained for you:
+
+- **`clad_create_feature` auto-syncs the inventory** after each feature it writes (and rejects a
+ malformed AC at creation), so you don't need to sync after creating features.
+- **`clad check` / `clad done` validate the spec themselves** (drift stage), so you don't need
+ to pre-sync before them — a real drift surfaces in that gate anyway.
+
+Run `clad sync` only when you have **hand-edited a shard file directly** (`Edit`/`Write` on
+`spec/features/*.yaml` or `spec.yaml`), to refresh the inventory and re-validate that edit.
+Prefer `clad_create_feature` over hand-editing in the first place — then even this is unneeded.
diff --git a/plugins/claude-code/.claude-plugin/plugin.json b/plugins/claude-code/.claude-plugin/plugin.json
index 43bbdcdd..9afa72c4 100644
--- a/plugins/claude-code/.claude-plugin/plugin.json
+++ b/plugins/claude-code/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "cladding",
- "version": "0.8.3",
+ "version": "0.9.0",
"description": "Reference implementation of the Ironclad standard — multi-agent dev harness for Claude Code.",
"author": {
"name": "qwerfunch"
diff --git a/plugins/claude-code/agents/blind-author.md b/plugins/claude-code/agents/blind-author.md
index dac74eea..8b0eacab 100644
--- a/plugins/claude-code/agents/blind-author.md
+++ b/plugins/claude-code/agents/blind-author.md
@@ -1,6 +1,6 @@
---
name: blind-author
-description: Impl-blind test/oracle author — writes conformance tests from a spec-only brief. Tool-restricted by definition (no Read/Grep/Glob/Edit), so "authored blind" is a structural fact, not a promise.
+description: Impl-blind test/oracle author — writes conformance tests from a spec-only brief. Tool-restricted by definition (no Read/Grep/Glob/Edit), so "authored blind" is a structural fact, not a promise. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
tools: Write, Bash
capabilities: [write, exec]
---
diff --git a/plugins/claude-code/agents/developer.md b/plugins/claude-code/agents/developer.md
index 6d1c2835..7393b7cf 100644
--- a/plugins/claude-code/agents/developer.md
+++ b/plugins/claude-code/agents/developer.md
@@ -1,6 +1,6 @@
---
name: developer
-description: Implementer — writes production code, tests, and migrations. The "generic engineer" fallback when no narrower specialist exists.
+description: Implementer — writes production code, tests, and migrations. The "generic engineer" fallback when no narrower specialist exists. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
tools: Read, Write, Edit, Bash
capabilities: [read, write, edit, exec]
---
diff --git a/plugins/claude-code/agents/observability.md b/plugins/claude-code/agents/observability.md
index da1e4251..5beb1a28 100644
--- a/plugins/claude-code/agents/observability.md
+++ b/plugins/claude-code/agents/observability.md
@@ -1,6 +1,6 @@
---
name: observability
-description: Log and metrics analyst — reads .cladding/audit.log.jsonl, perf/baseline.json, and drift reports; surfaces patterns the human can act on.
+description: Log and metrics analyst — reads .cladding/audit.log.jsonl, perf/baseline.json, and drift reports; surfaces patterns the human can act on. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
tools: Read, Bash
capabilities: [read, exec]
---
diff --git a/plugins/claude-code/agents/orchestrator.md b/plugins/claude-code/agents/orchestrator.md
index 49b89e79..bf8d0c1e 100644
--- a/plugins/claude-code/agents/orchestrator.md
+++ b/plugins/claude-code/agents/orchestrator.md
@@ -1,6 +1,6 @@
---
name: orchestrator
-description: Workflow conductor — sequences agents based on the 5 invocation principles. Routes user intent to the right persona.
+description: Workflow conductor — sequences agents based on the 5 invocation principles. Routes user intent to the right persona. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
tools: Read, Write, Edit, Bash, Agent
capabilities: [read, write, edit, exec, dispatch]
---
@@ -29,17 +29,7 @@ You do NOT pre-load Tier C (conventions — developer's concern).
3. **Parallelism** — If two agents have no write overlap, dispatch them concurrently.
4. **Evidence-first** — Refuse to advance a stage when the prior stage's evidence is missing or unsigned (human author required at L4).
5. **Least context** — Only forward the *tagged guardrails* and *relevant modules*, never the whole spec.
-6. **Init + refine policy (의무)** — Two-step Q&A loop that captures intent and refines spec/docs through the user's own answers.
-
- **Step 6a (init).** Before calling `clad init` on a greenfield project (empty directory or `<3` source files), **ASK THE USER for their project intent in one line**. A natural question is enough: "어떤 종류의 프로젝트인가요? 한 줄로 설명해주세요". Forward the user's reply as the positional intent: `clad init ` (no quotes needed — commander treats trailing tokens as variadic). The init handler routes the LLM to produce a domain-aware project-context + capabilities + architecture + a real first-feature title (used when the AI later registers the first feature via `clad_create_feature`) + 2-3 product-level clarifying questions, and writes `.cladding/onboarding/state.yaml` with the questions marked pending. DO NOT call bare `clad init` on a greenfield workspace — the result is a generic toolchain scaffold that misses the user's actual intent. (For an existing project ≥3 source files, bare `clad init` is fine — the observed scan path captures the codebase shape directly.)
-
- **Step 6b (clarify loop).** After init, drive the Q&A loop until the onboarding state file is marked `status: done`:
- - Read `.cladding/onboarding/state.yaml` and find the first `answer: null` entry.
- - Ask the user that exact question in chat, verbatim. Do NOT rephrase technical-sounding questions into your own words — the LLM calibrated them at product-owner vocabulary level.
- - When the user replies, run `clad clarify ` (no quotes needed). The handler marks the question answered, calls the LLM with the full Q-A history, refines `docs/project-context.md` + `spec/capabilities.yaml` + `spec/architecture.yaml`, and may add new follow-up questions.
- - Loop until `clad clarify --json` reports `status: "done"` OR the user says they have enough. Never invent extra questions — only the LLM's questions are sanctioned for this loop.
-
- If the user declines to answer a question, accept that and skip it (they can revisit via `clad clarify ` later, since pending state persists).
+6. **Init + clarify policy (required)** — Use the host-neutral MCP prepare/stage/apply loop. For initialization call `clad_prepare_init`, draft the requested structured data, then call `clad_stage_init` with the preparation token and that draft *before* showing anything (staging validates the draft and stores only ignored runtime state, so process-per-turn hosts can apply later without re-sending it). Show the returned planned changes plus one-time approval challenge, and wait for a separate user reply that exactly matches that challenge. The original request, a question, or a paraphrase is not confirmation. Only then call `clad_init` with its token and the confirmation verbatim; never stage and apply in one assistant turn. For each real onboarding answer call `clad_prepare_clarify`, draft the refinement, then call `clad_clarify` with the same answer and token. Ask returned questions verbatim and never invent answers. Do not invoke onboarding through shell commands or MCP sampling. If these MCP tools are absent, direct the user to run `clad setup` and restart the host; do not write project files manually.
## Feature cycle — one feature at a time
diff --git a/plugins/claude-code/agents/planner.md b/plugins/claude-code/agents/planner.md
index b2f7ed45..7736e7b7 100644
--- a/plugins/claude-code/agents/planner.md
+++ b/plugins/claude-code/agents/planner.md
@@ -1,6 +1,6 @@
---
name: planner
-description: SSoT custodian — keeps spec.yaml structurally clean. Adds features, archives them, and ensures EARS pattern compliance.
+description: SSoT custodian — keeps spec.yaml structurally clean. Adds features, archives them, and ensures EARS pattern compliance. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
tools: Read, Write, Edit, Bash
capabilities: [read, write, edit, exec]
---
@@ -33,7 +33,7 @@ You do NOT read Tier C (conventions — developer owns it) or Tier D (audit —
### Scenarios policy (v0.3.45+)
-Scenarios are **onboarding output**, not feature-creation side-effect. `clad init ` extracts 1-3 user journeys from the user's intent and writes them to `spec/scenarios/-.yaml` with `features: []`. Your job is to bind features to the matching scenario as they're added (or — rarely — author a new scenario by hand when an existing one doesn't fit). Pre-v0.3.30 auto-extraction from code is deprecated.
+Scenarios are **onboarding output**, not feature-creation side-effect. Onboarding (host MCP flow, or CLI `clad init `) extracts 1-3 user journeys from the user's intent and writes them to `spec/scenarios/-.yaml` with `features: []`. Your job is to bind features to the matching scenario as they're added (or — rarely — author a new scenario by hand when an existing one doesn't fit). Pre-v0.3.30 auto-extraction from code is deprecated.
## Project policy — `spec.yaml::project.ai_hints`
diff --git a/plugins/claude-code/agents/reviewer.md b/plugins/claude-code/agents/reviewer.md
index 99246fc8..837d92e0 100644
--- a/plugins/claude-code/agents/reviewer.md
+++ b/plugins/claude-code/agents/reviewer.md
@@ -1,6 +1,6 @@
---
name: reviewer
-description: Philosophical guardrails enforcer — independently audits code, tests, and spec for layered-integrity, Why>What, error-as-data, and the related Ironclad philosophical invariants.
+description: Philosophical guardrails enforcer — independently audits code, tests, and spec for layered-integrity, Why>What, error-as-data, and the related Ironclad philosophical invariants. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
tools: Read, Bash
capabilities: [read, exec]
---
diff --git a/plugins/claude-code/commands/init.md b/plugins/claude-code/commands/init.md
index 3b5bec99..1de064d0 100644
--- a/plugins/claude-code/commands/init.md
+++ b/plugins/claude-code/commands/init.md
@@ -1,101 +1,28 @@
---
-description: Scaffold a cladding workspace. Pass a free-text project description as positional argument to drive intent-aware onboarding — the LLM produces domain-aware spec/docs plus product-level follow-up questions. Use when the user wants to start a new Ironclad project, adopt cladding into an existing repo, or refresh artifacts via re-scan.
+name: init
+description: Use only when the user explicitly names Cladding and asks to initialize, adopt, or refresh it; never use for an ordinary project creation or implementation request. Scaffold from an idea, planning document, or existing project through the MCP prepare/apply flow.
---
# Cladding init
-Run `clad init` from the directory where the cladding workspace should live. Idempotent — skips files that already exist unless `--force` is supplied.
+Use this workflow only when the user explicitly asks to initialize, adopt, or refresh Cladding. Opening a repository alone is not consent to initialize it.
-## Artifacts produced (by Tier)
+## Required host workflow
-| Tier | File | Authority |
-|---|---|---|
-| A | `spec.yaml` (seed) | Spec SSoT (Iron Law sealed) |
-| A | `spec/scenarios/-.yaml` (v0.3.45+, intent path only) | Spec SSoT (onboarding output) |
-| B | `spec/architecture.yaml` | Design SSoT |
-| B | `spec/capabilities.yaml` | Design SSoT |
-| B | `docs/project-context.md` | Design SSoT (intent + Why/What/Purpose) |
-| C | `docs/conventions.md` | derived from observed code OR greenfield seed |
-| D | `.cladding/onboarding/state.yaml` (intent path only) | transient — Q&A audit |
+If the current user message itself matches `APPLY CLADDING XXXXXX`, do not call prepare or stage again. Call `clad_init` once and copy the entire user message, including the `APPLY CLADDING` prefix, into `confirmation`.
-See [`docs/ssot-model.md`](../../docs/ssot-model.md) for the full 4-tier governance.
+1. If a greenfield request has no project intent, ask for one short description.
+2. Call `clad_prepare_init` with exactly one starting mode:
+ - `idea` with the user's description.
+ - `document` with a project-relative planning-document path.
+ - `existing` for an existing codebase; include an optional adoption goal.
+3. Read the returned prompt and observations. Draft the structured object required by `clad_init` using the current host model, then call `clad_stage_init` with the preparation token and that draft. Staging validates the draft and stores only ignored runtime state under `.cladding/host/`; it does not modify authored project files.
+4. Show `plannedChanges`, the staged `confirmationQuestion`, and its one-time `approvalChallenge` to the user, then stop and wait for a separate reply. The original initialization request is not confirmation.
+5. Only when the user's separate reply exactly matches `approvalChallenge`, call `clad_init` with the entire reply verbatim as `confirmation`—never strip the `APPLY CLADDING` prefix. Include the draft and token when the host retained them; process-per-turn hosts may omit both because Cladding resolves the exact staged draft from its short-lived machine-local cache. Questions, paraphrases, and generic acknowledgements are not approval.
+6. If `nextQuestion` is present, show it verbatim and end the assistant turn immediately. Never answer it, infer an answer, or call either clarify tool during the initialization-approval turn. Continue with the Cladding clarify workflow only after a new user message supplies the answer. If no question remains, report that ordinary development can begin.
-## Intent-aware onboarding (v0.3.43+)
+Do not run `clad init` in a shell from an AI-host onboarding session. Do not use MCP sampling. If the MCP tools are absent, tell the user to run `clad setup`, restart the AI host in the project directory, and stop without writing project files.
-The strongest path is to pass the user's project intent as positional argument (no `--intent` keyword, no quotes needed):
+`clad_prepare_init` does not modify the workspace, and `clad_stage_init` writes only ignored runtime state. Never call stage and apply in the same assistant turn. Only `clad_init` writes authored artifacts, after explicit user confirmation plus schema and freshness validation. A stale, malformed, or replayed apply request must be prepared again.
-```
-clad init 결제 SaaS for B2B Stripe Toss 지원
-clad init AI 코드 리뷰 봇 만들거야
-clad init 이 프로젝트 분석해서 클래딩 적용해줘
-```
-
-The LLM dispatcher then produces **domain-aware** artifacts that exceed what the user explicitly stated:
-
-- `docs/project-context.md` — Why/What/Purpose with inferred domain context (compliance norms, scale assumptions, common patterns)
-- `spec/capabilities.yaml` — user-stated + inferred capabilities (3-8 entries; payment → idempotency, webhook signing; ML → data lineage, eval harness; SaaS → multi-tenancy, audit log)
-- `spec/architecture.yaml` — layers tailored to domain + language
-- 2-3 follow-up clarifying questions printed to stdout as CLI hints (product/business level — not technical jargon)
-
-**AI orchestrators MUST ask the user for intent before invoking `clad init` on a greenfield workspace** (see `src/agents/orchestrator.md` principle 6). A bare `clad init` on a brand-new project falls back to generic toolchain seeds and misses the user's intent. For existing projects (≥3 source files) bare `clad init` is fine — the observed scan path captures shape directly.
-
-## Flags
-
-- `--name ` — override the project name (default: cwd basename).
-- `--force` — overwrite an existing `spec.yaml`.
-- `--scan` — force-walk the existing codebase to write observed artifacts. Default auto-detects (≥3 source files trigger scan); use `--no-scan` to skip even when source is present. Orthogonal to positional intent — can combine (`clad init 결제 SaaS --scan`).
-- `--no-llm` — force the deterministic interpreter. Intent text still routes but falls back to a deterministic body quoting the intent verbatim.
-- `--roots ]` — comma-separated source-root override (e.g. `packages/a/src,packages/b/src`). Otherwise inferred from manifests + directory heuristics.
-
-When `--scan` runs (or auto-runs on a codebase with ≥3 source files) it writes:
-
-- `docs/conventions.md` — observed indent / quote / naming / error-handling / test-location conventions plus a representative module quote.
-- `spec/architecture.yaml` — observed layers + forbidden-import candidates derived from the import graph.
-- `spec/capabilities.yaml` — README `##` headings rendered as capability candidates (v0.3.38+).
-- `docs/project-context.md` — forest-level Why / What / Purpose; LLM-refined when a dispatcher is available, deterministic template otherwise.
-- `spec/scenarios/README.md` — explains the scenarios-are-intent policy (v0.3.30+).
-
-Existing files are diverted to `.cladding/scan/*.proposal` rather than overwritten.
-
-### Greenfield seeds (v0.3.42+)
-
-When `--scan` does **not** fire (brand-new project with <3 source files), `clad init` still writes the same three artifacts as **greenfield seeds** so the spec/docs surface is always complete:
-
-- `docs/conventions.md` — toolchain-default 14-signal table. TypeScript → 2-space + single quote + camelCase + `tests-dir` test layout, Python → 4-space + double quote + snake_case, Go → tab + PascalCase + `sibling-test`, Rust → 4-space + snake_case + result-pattern, etc. Each seed inlines a one-line link to the canonical style guide (Google TS / PEP 8 / Effective Go / Google Java / …).
-- `spec/architecture.yaml` — `version: "0.1"` + empty `layers: []` + a language-specific baseline suggestion in the header comment (TypeScript → `src/cli/` / `src/core/` / `src/lib/` / `src/ui/`, Python → `src//` / `tests/`, Go → `cmd/` / `pkg/` / `internal/`, …).
-- `spec/capabilities.yaml` — `schema: "0.1"` + `source: README.md` + empty `capabilities: []` + guidance comment on the per-entry shape.
-
-Each seed carries a header marking it as a greenfield template. After you write initial code (and optionally a README), re-run `clad init --scan`; the observed bodies divert to `.cladding/scan/.proposal` so you can diff seed vs reality and merge the parts you want. Personas downstream (`developer`, `planner`) therefore treat every scan artifact as **always present**, with the SEED header telling them which mode is live.
-
-After init:
-
-1. Edit `spec.yaml` (project metadata). Features are added on demand — ask the AI in natural language ("add a feature for login flow"), call the `clad_create_feature` MCP tool, or use the `clad` CLI. Feature shards always use the hash-based id `F-` (v0.3.9+) — filename `-.yaml`, `id: F-`, `slug: `. `clad init` does **not** write a legacy `F-001` placeholder for external users (v0.4.0+).
-2. Run `clad sync` to verify the spec is valid.
-3. Run `clad check` to see which Iron Law stages are wired up for the toolchain cladding detects in the cwd.
-4. (Optional) Run `clad doctor` to confirm `.cladding/events.log.jsonl` shows no `sentinel_miss` events from the scan refinement.
-
-```
-clad init # bare (greenfield seeds + hint, or observed scan)
-clad init 결제 SaaS for B2B # intent-aware onboarding (positional, no quotes needed)
-clad init "AI 코드 리뷰 봇" # quotes OK too
-clad init 이 프로젝트 분석해서 클래딩 적용해줘 # intent that signals existing adoption
-clad init docs/plan.md # path-aware intent (v0.3.61+) — file contents auto-loaded as intent
-clad init /absolute/path/spec.md # absolute path also supported (same .md/.txt/.yaml/.yml/.markdown rule)
-clad init --name my-project
-clad init --force
-clad init --scan --no-llm
-clad init --roots packages/a/src,packages/b/src
-```
-
-## Path-aware intent (v0.3.61+, F-5f6b45)
-
-When the positional argument looks like a text-file path (recognized extension `.md` / `.txt` / `.yaml` / `.yml` / `.markdown`) and the file exists under cwd, cladding loads the file body and forwards *that* to the onboarding LLM dispatcher — not the literal path string. This closes the gap where `clad init "$(cat docs/plan.md)"` (shell substitution) was the only way to feed a planning document into onboarding.
-
-Behavior:
-
-- **Existing text file** → contents become the intent. stderr prints `loaded intent from ` for transparency.
-- **Missing file** with a path-like extension → stderr warning + free-text fallback (the literal argument is forwarded as intent so onboarding still runs).
-- **Directory** ending in `.md` (rare) → stderr warning + free-text fallback.
-- **Non-text argument** (e.g. `결제 SaaS 만들거야`) → existing free-text behavior, zero regression.
-
-Plugin invocations (`/cladding init docs/plan.md` from Claude Code · Codex CLI · Gemini CLI marketplace installs) inherit this behavior automatically — every plugin skill shells out to the same `clad init` CLI.
+The raw CLI remains available for terminal, CI, offline, and explicitly configured SDK automation; it is not the primary host onboarding path.
diff --git a/plugins/claude-code/dist/agents/README.md b/plugins/claude-code/dist/agents/README.md
index db8e0af1..5b8c01c5 100644
--- a/plugins/claude-code/dist/agents/README.md
+++ b/plugins/claude-code/dist/agents/README.md
@@ -8,7 +8,7 @@ ironclad-track: T9 (multi-agent orchestrator)
## [CLAIM]
-The 5 agent personas — orchestrator · planner (formerly `librarian`) · reviewer · observability · developer (formerly `specialists`) — each shipped as a Claude Code subagent (frontmatter + system prompt). Their canonical source lives in this directory; `npm run build:plugin` mirrors them into `agents/`, `plugins/codex/skills/`, and `plugins/gemini-cli/commands/`.
+The 6 agent personas — orchestrator · planner (formerly `librarian`) · reviewer · observability · developer (formerly `specialists`) · blind-author — each shipped as a Claude Code subagent (frontmatter + system prompt). Their canonical source lives in this directory; `npm run build:plugin` mirrors them into `plugins/claude-code/agents/`, `plugins/codex/skills/`, and `plugins/antigravity/skills/`.
## [PERSONAS]
@@ -21,6 +21,7 @@ Each persona's individual `.md` carries a "Sources (what you read, by Tier)" sec
| `reviewer` | Philosophical guardrails; independent audit | Read, Bash | A + B + C + D evidence | (none — audit only) |
| `observability` | Log + metrics analyst | Read, Bash | D only (events.log, audit.log, perf, coverage) | (reports only) |
| `developer` | Implementer (code, tests, migrations) | Read, Write, Edit, Bash | B (project-context, architecture, capabilities) + C (conventions) + A (current feature slice) | stages/, tests/, hitl/ |
+| `blind-author` | Impl-blind test/oracle author (no Read/Grep/Glob/Edit by construction) | Write, Bash | A (acceptance criteria + module signatures only — never the implementation) | tests/ (conformance oracles) |
## [INVOCATION_PRINCIPLES]
@@ -56,4 +57,4 @@ Cross-boundary rules:
## [TBD]
-- Routing config (`src/agents/routing.yaml`) with intent → agent mapping. `commands/clad.md` is the single user-facing verb manifest today; per-verb skills live under `skills//SKILL.md` (auto-mirrored to `commands/.md`, `plugins/codex/skills/.md`, `plugins/gemini-cli/commands/.md`).
+- Routing config (`src/agents/routing.yaml`) with intent → agent mapping. Per-verb skills live under `skills//SKILL.md`, auto-mirrored to `plugins/codex/skills//` and `plugins/antigravity/skills//` (Gemini receives only the init command as `plugins/gemini-cli/commands/init.toml`).
diff --git a/plugins/claude-code/dist/agents/blind-author.md b/plugins/claude-code/dist/agents/blind-author.md
index dac74eea..8b0eacab 100644
--- a/plugins/claude-code/dist/agents/blind-author.md
+++ b/plugins/claude-code/dist/agents/blind-author.md
@@ -1,6 +1,6 @@
---
name: blind-author
-description: Impl-blind test/oracle author — writes conformance tests from a spec-only brief. Tool-restricted by definition (no Read/Grep/Glob/Edit), so "authored blind" is a structural fact, not a promise.
+description: Impl-blind test/oracle author — writes conformance tests from a spec-only brief. Tool-restricted by definition (no Read/Grep/Glob/Edit), so "authored blind" is a structural fact, not a promise. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
tools: Write, Bash
capabilities: [write, exec]
---
diff --git a/plugins/claude-code/dist/agents/developer.md b/plugins/claude-code/dist/agents/developer.md
index 6d1c2835..7393b7cf 100644
--- a/plugins/claude-code/dist/agents/developer.md
+++ b/plugins/claude-code/dist/agents/developer.md
@@ -1,6 +1,6 @@
---
name: developer
-description: Implementer — writes production code, tests, and migrations. The "generic engineer" fallback when no narrower specialist exists.
+description: Implementer — writes production code, tests, and migrations. The "generic engineer" fallback when no narrower specialist exists. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
tools: Read, Write, Edit, Bash
capabilities: [read, write, edit, exec]
---
diff --git a/plugins/claude-code/dist/agents/observability.md b/plugins/claude-code/dist/agents/observability.md
index da1e4251..5beb1a28 100644
--- a/plugins/claude-code/dist/agents/observability.md
+++ b/plugins/claude-code/dist/agents/observability.md
@@ -1,6 +1,6 @@
---
name: observability
-description: Log and metrics analyst — reads .cladding/audit.log.jsonl, perf/baseline.json, and drift reports; surfaces patterns the human can act on.
+description: Log and metrics analyst — reads .cladding/audit.log.jsonl, perf/baseline.json, and drift reports; surfaces patterns the human can act on. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
tools: Read, Bash
capabilities: [read, exec]
---
diff --git a/plugins/claude-code/dist/agents/orchestrator.md b/plugins/claude-code/dist/agents/orchestrator.md
index 49b89e79..bf8d0c1e 100644
--- a/plugins/claude-code/dist/agents/orchestrator.md
+++ b/plugins/claude-code/dist/agents/orchestrator.md
@@ -1,6 +1,6 @@
---
name: orchestrator
-description: Workflow conductor — sequences agents based on the 5 invocation principles. Routes user intent to the right persona.
+description: Workflow conductor — sequences agents based on the 5 invocation principles. Routes user intent to the right persona. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
tools: Read, Write, Edit, Bash, Agent
capabilities: [read, write, edit, exec, dispatch]
---
@@ -29,17 +29,7 @@ You do NOT pre-load Tier C (conventions — developer's concern).
3. **Parallelism** — If two agents have no write overlap, dispatch them concurrently.
4. **Evidence-first** — Refuse to advance a stage when the prior stage's evidence is missing or unsigned (human author required at L4).
5. **Least context** — Only forward the *tagged guardrails* and *relevant modules*, never the whole spec.
-6. **Init + refine policy (의무)** — Two-step Q&A loop that captures intent and refines spec/docs through the user's own answers.
-
- **Step 6a (init).** Before calling `clad init` on a greenfield project (empty directory or `<3` source files), **ASK THE USER for their project intent in one line**. A natural question is enough: "어떤 종류의 프로젝트인가요? 한 줄로 설명해주세요". Forward the user's reply as the positional intent: `clad init ` (no quotes needed — commander treats trailing tokens as variadic). The init handler routes the LLM to produce a domain-aware project-context + capabilities + architecture + a real first-feature title (used when the AI later registers the first feature via `clad_create_feature`) + 2-3 product-level clarifying questions, and writes `.cladding/onboarding/state.yaml` with the questions marked pending. DO NOT call bare `clad init` on a greenfield workspace — the result is a generic toolchain scaffold that misses the user's actual intent. (For an existing project ≥3 source files, bare `clad init` is fine — the observed scan path captures the codebase shape directly.)
-
- **Step 6b (clarify loop).** After init, drive the Q&A loop until the onboarding state file is marked `status: done`:
- - Read `.cladding/onboarding/state.yaml` and find the first `answer: null` entry.
- - Ask the user that exact question in chat, verbatim. Do NOT rephrase technical-sounding questions into your own words — the LLM calibrated them at product-owner vocabulary level.
- - When the user replies, run `clad clarify ` (no quotes needed). The handler marks the question answered, calls the LLM with the full Q-A history, refines `docs/project-context.md` + `spec/capabilities.yaml` + `spec/architecture.yaml`, and may add new follow-up questions.
- - Loop until `clad clarify --json` reports `status: "done"` OR the user says they have enough. Never invent extra questions — only the LLM's questions are sanctioned for this loop.
-
- If the user declines to answer a question, accept that and skip it (they can revisit via `clad clarify ` later, since pending state persists).
+6. **Init + clarify policy (required)** — Use the host-neutral MCP prepare/stage/apply loop. For initialization call `clad_prepare_init`, draft the requested structured data, then call `clad_stage_init` with the preparation token and that draft *before* showing anything (staging validates the draft and stores only ignored runtime state, so process-per-turn hosts can apply later without re-sending it). Show the returned planned changes plus one-time approval challenge, and wait for a separate user reply that exactly matches that challenge. The original request, a question, or a paraphrase is not confirmation. Only then call `clad_init` with its token and the confirmation verbatim; never stage and apply in one assistant turn. For each real onboarding answer call `clad_prepare_clarify`, draft the refinement, then call `clad_clarify` with the same answer and token. Ask returned questions verbatim and never invent answers. Do not invoke onboarding through shell commands or MCP sampling. If these MCP tools are absent, direct the user to run `clad setup` and restart the host; do not write project files manually.
## Feature cycle — one feature at a time
diff --git a/plugins/claude-code/dist/agents/planner.md b/plugins/claude-code/dist/agents/planner.md
index b2f7ed45..7736e7b7 100644
--- a/plugins/claude-code/dist/agents/planner.md
+++ b/plugins/claude-code/dist/agents/planner.md
@@ -1,6 +1,6 @@
---
name: planner
-description: SSoT custodian — keeps spec.yaml structurally clean. Adds features, archives them, and ensures EARS pattern compliance.
+description: SSoT custodian — keeps spec.yaml structurally clean. Adds features, archives them, and ensures EARS pattern compliance. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
tools: Read, Write, Edit, Bash
capabilities: [read, write, edit, exec]
---
@@ -33,7 +33,7 @@ You do NOT read Tier C (conventions — developer owns it) or Tier D (audit —
### Scenarios policy (v0.3.45+)
-Scenarios are **onboarding output**, not feature-creation side-effect. `clad init ` extracts 1-3 user journeys from the user's intent and writes them to `spec/scenarios/-.yaml` with `features: []`. Your job is to bind features to the matching scenario as they're added (or — rarely — author a new scenario by hand when an existing one doesn't fit). Pre-v0.3.30 auto-extraction from code is deprecated.
+Scenarios are **onboarding output**, not feature-creation side-effect. Onboarding (host MCP flow, or CLI `clad init `) extracts 1-3 user journeys from the user's intent and writes them to `spec/scenarios/-.yaml` with `features: []`. Your job is to bind features to the matching scenario as they're added (or — rarely — author a new scenario by hand when an existing one doesn't fit). Pre-v0.3.30 auto-extraction from code is deprecated.
## Project policy — `spec.yaml::project.ai_hints`
diff --git a/plugins/claude-code/dist/agents/reviewer.md b/plugins/claude-code/dist/agents/reviewer.md
index 99246fc8..837d92e0 100644
--- a/plugins/claude-code/dist/agents/reviewer.md
+++ b/plugins/claude-code/dist/agents/reviewer.md
@@ -1,6 +1,6 @@
---
name: reviewer
-description: Philosophical guardrails enforcer — independently audits code, tests, and spec for layered-integrity, Why>What, error-as-data, and the related Ironclad philosophical invariants.
+description: Philosophical guardrails enforcer — independently audits code, tests, and spec for layered-integrity, Why>What, error-as-data, and the related Ironclad philosophical invariants. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.
tools: Read, Bash
capabilities: [read, exec]
---
diff --git a/plugins/claude-code/dist/clad.js b/plugins/claude-code/dist/clad.js
index a3eb6b3c..fe80975a 100755
--- a/plugins/claude-code/dist/clad.js
+++ b/plugins/claude-code/dist/clad.js
@@ -4,102 +4,102 @@ const require = __claddingCreateRequire(import.meta.url);
// Marker for stages/*.ts: when true, the per-stage CLI-entry guard
// short-circuits so the bundle doesn't fire every stage at startup.
globalThis.__CLADDING_BUNDLED = true;
-var $ue=Object.create;var HE=Object.defineProperty;var kue=Object.getOwnPropertyDescriptor;var Eue=Object.getOwnPropertyNames;var Aue=Object.getPrototypeOf,Tue=Object.prototype.hasOwnProperty;var He=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var y=(t,e)=>()=>(t&&(e=t(t=0)),e);var v=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ir=(t,e)=>{for(var r in e)HE(t,r,{get:e[r],enumerable:!0})},Oue=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Eue(e))!Tue.call(t,i)&&i!==r&&HE(t,i,{get:()=>e[i],enumerable:!(n=kue(e,i))||n.enumerable});return t};var Et=(t,e,r)=>(r=t!=null?$ue(Aue(t)):{},Oue(e||!t||!t.__esModule?HE(r,"default",{value:t,enumerable:!0}):r,t));var Ld=v(ZE=>{var qg=class extends Error{constructor(e,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},GE=class extends qg{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};ZE.CommanderError=qg;ZE.InvalidArgumentError=GE});var Bg=v(WE=>{var{InvalidArgumentError:Rue}=Ld(),VE=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new Rue(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Iue(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}WE.Argument=VE;WE.humanReadableArgName=Iue});var YE=v(JE=>{var{humanReadableArgName:Pue}=Bg(),KE=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let r=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&r.push(n),this.sortSubcommands&&r.sort((i,o)=>i.name().localeCompare(o.name())),r}compareOptions(e,r){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(r))}visibleOptions(e){let r=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),o=n.long&&e._findOption(n.long);!i&&!o?r.push(n):n.long&&!o?r.push(e.createOption(n.long,n.description)):n.short&&!i&&r.push(e.createOption(n.short,n.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let r=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(o=>!o.hidden);r.push(...i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(n=>Pue(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i)))),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i)))),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,r,n){return r.length===0?[]:[n.styleTitle(e),...r,""]}groupItems(e,r,n){let i=new Map;return e.forEach(o=>{let s=n(o);i.has(s)||i.set(s,[])}),r.forEach(o=>{let s=n(o);i.has(s)||i.set(s,[]),i.get(s).push(o)}),i}formatHelp(e,r){let n=r.padWidth(e,r),i=r.helpWidth??80;function o(d,f){return r.formatItem(d,n,f,r)}let s=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(e))}`,""],a=r.commandDescription(e);a.length>0&&(s=s.concat([r.boxWrap(r.styleCommandDescription(a),i),""]));let c=r.visibleArguments(e).map(d=>o(r.styleArgumentTerm(r.argumentTerm(d)),r.styleArgumentDescription(r.argumentDescription(d))));if(s=s.concat(this.formatItemList("Arguments:",c,r)),this.groupItems(e.options,r.visibleOptions(e),d=>d.helpGroupHeading??"Options:").forEach((d,f)=>{let p=d.map(m=>o(r.styleOptionTerm(r.optionTerm(m)),r.styleOptionDescription(r.optionDescription(m))));s=s.concat(this.formatItemList(f,p,r))}),r.showGlobalOptions){let d=r.visibleGlobalOptions(e).map(f=>o(r.styleOptionTerm(r.optionTerm(f)),r.styleOptionDescription(r.optionDescription(f))));s=s.concat(this.formatItemList("Global Options:",d,r))}return this.groupItems(e.commands,r.visibleCommands(e),d=>d.helpGroup()||"Commands:").forEach((d,f)=>{let p=d.map(m=>o(r.styleSubcommandTerm(r.subcommandTerm(m)),r.styleSubcommandDescription(r.subcommandDescription(m))));s=s.concat(this.formatItemList(f,p,r))}),s.join(`
-`)}displayWidth(e){return pq(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,r,n,i){let s=" ".repeat(2);if(!n)return s+e;let a=e.padEnd(r+e.length-i.displayWidth(e)),c=2,u=(this.helpWidth??80)-r-c-2,d;return utypeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var y=(t,e)=>()=>(t&&(e=t(t=0)),e);var v=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Pr=(t,e)=>{for(var r in e)$A(t,r,{get:e[r],enumerable:!0})},Nde=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Pde(e))!Dde.call(t,i)&&i!==r&&$A(t,i,{get:()=>e[i],enumerable:!(n=Ide(e,i))||n.enumerable});return t};var St=(t,e,r)=>(r=t!=null?Rde(Cde(t)):{},Nde(e||!t||!t.__esModule?$A(r,"default",{value:t,enumerable:!0}):r,t));var rf=v(EA=>{var yy=class extends Error{constructor(e,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},kA=class extends yy{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};EA.CommanderError=yy;EA.InvalidArgumentError=kA});var _y=v(TA=>{var{InvalidArgumentError:jde}=rf(),AA=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new jde(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Mde(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}TA.Argument=AA;TA.humanReadableArgName=Mde});var IA=v(RA=>{var{humanReadableArgName:Fde}=_y(),OA=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let r=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&r.push(n),this.sortSubcommands&&r.sort((i,o)=>i.name().localeCompare(o.name())),r}compareOptions(e,r){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(r))}visibleOptions(e){let r=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),o=n.long&&e._findOption(n.long);!i&&!o?r.push(n):n.long&&!o?r.push(e.createOption(n.long,n.description)):n.short&&!i&&r.push(e.createOption(n.short,n.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let r=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(o=>!o.hidden);r.push(...i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(n=>Fde(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i)))),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i)))),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,r,n){return r.length===0?[]:[n.styleTitle(e),...r,""]}groupItems(e,r,n){let i=new Map;return e.forEach(o=>{let s=n(o);i.has(s)||i.set(s,[])}),r.forEach(o=>{let s=n(o);i.has(s)||i.set(s,[]),i.get(s).push(o)}),i}formatHelp(e,r){let n=r.padWidth(e,r),i=r.helpWidth??80;function o(d,f){return r.formatItem(d,n,f,r)}let s=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(e))}`,""],a=r.commandDescription(e);a.length>0&&(s=s.concat([r.boxWrap(r.styleCommandDescription(a),i),""]));let c=r.visibleArguments(e).map(d=>o(r.styleArgumentTerm(r.argumentTerm(d)),r.styleArgumentDescription(r.argumentDescription(d))));if(s=s.concat(this.formatItemList("Arguments:",c,r)),this.groupItems(e.options,r.visibleOptions(e),d=>d.helpGroupHeading??"Options:").forEach((d,f)=>{let p=d.map(m=>o(r.styleOptionTerm(r.optionTerm(m)),r.styleOptionDescription(r.optionDescription(m))));s=s.concat(this.formatItemList(f,p,r))}),r.showGlobalOptions){let d=r.visibleGlobalOptions(e).map(f=>o(r.styleOptionTerm(r.optionTerm(f)),r.styleOptionDescription(r.optionDescription(f))));s=s.concat(this.formatItemList("Global Options:",d,r))}return this.groupItems(e.commands,r.visibleCommands(e),d=>d.helpGroup()||"Commands:").forEach((d,f)=>{let p=d.map(m=>o(r.styleSubcommandTerm(r.subcommandTerm(m)),r.styleSubcommandDescription(r.subcommandDescription(m))));s=s.concat(this.formatItemList(f,p,r))}),s.join(`
+`)}displayWidth(e){return i4(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,r,n,i){let s=" ".repeat(2);if(!n)return s+e;let a=e.padEnd(r+e.length-i.displayWidth(e)),c=2,u=(this.helpWidth??80)-r-c-2,d;return u{let a=s.match(i);if(a===null){o.push("");return}let c=[a.shift()],l=this.displayWidth(c[0]);a.forEach(u=>{let d=this.displayWidth(u);if(l+d<=r){c.push(u),l+=d;return}o.push(c.join(""));let f=u.trimStart();c=[f],l=this.displayWidth(f)}),o.push(c.join(""))}),o.join(`
-`)}};function pq(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}JE.Help=KE;JE.stripColor=pq});var tA=v(eA=>{var{InvalidArgumentError:Cue}=Ld(),XE=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=Due(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new Cue(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?mq(this.name().replace(/^no-/,"")):mq(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},QE=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,r){let n=r.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,o=i!==void 0?i:!1;return r.negate===(o===e)}};function mq(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function Due(t){let e,r,n=/^-[^-]$/,i=/^--[^-]/,o=t.split(/[ |,]+/).concat("guard");if(n.test(o[0])&&(e=o.shift()),i.test(o[0])&&(r=o.shift()),!e&&n.test(o[0])&&(e=o.shift()),!e&&i.test(o[0])&&(e=r,r=o.shift()),o[0].startsWith("-")){let s=o[0],a=`option creation failed due to '${s}' in option flags '${t}'`;throw/^-[^-][^-]/.test(s)?new Error(`${a}
+`)}};function i4(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}RA.Help=OA;RA.stripColor=i4});var NA=v(DA=>{var{InvalidArgumentError:Lde}=rf(),PA=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=zde(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new Lde(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?o4(this.name().replace(/^no-/,"")):o4(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},CA=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,r){let n=r.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,o=i!==void 0?i:!1;return r.negate===(o===e)}};function o4(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function zde(t){let e,r,n=/^-[^-]$/,i=/^--[^-]/,o=t.split(/[ |,]+/).concat("guard");if(n.test(o[0])&&(e=o.shift()),i.test(o[0])&&(r=o.shift()),!e&&n.test(o[0])&&(e=o.shift()),!e&&i.test(o[0])&&(e=r,r=o.shift()),o[0].startsWith("-")){let s=o[0],a=`option creation failed due to '${s}' in option flags '${t}'`;throw/^-[^-][^-]/.test(s)?new Error(`${a}
- a short flag is a single dash and a single character
- either use a single dash and a single character (for a short flag)
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):n.test(s)?new Error(`${a}
- too many short flags`):i.test(s)?new Error(`${a}
- too many long flags`):new Error(`${a}
-- unrecognised flag format`)}if(e===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:r}}eA.Option=XE;eA.DualOptions=QE});var gq=v(hq=>{function Nue(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let n=0;n<=t.length;n++)r[n]=[n];for(let n=0;n<=e.length;n++)r[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=t.length;i++){let o=1;t[i-1]===e[n-1]?o=0:o=1,r[i][n]=Math.min(r[i-1][n]+1,r[i][n-1]+1,r[i-1][n-1]+o),i>1&&n>1&&t[i-1]===e[n-2]&&t[i-2]===e[n-1]&&(r[i][n]=Math.min(r[i][n],r[i-2][n-2]+1))}return r[t.length][e.length]}function jue(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let n=[],i=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=Nue(t,s),c=Math.max(t.length,s.length);(c-a)/c>o&&(as.localeCompare(a)),r&&(n=n.map(s=>`--${s}`)),n.length>1?`
+- unrecognised flag format`)}if(e===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:r}}DA.Option=PA;DA.DualOptions=CA});var a4=v(s4=>{function Ude(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let n=0;n<=t.length;n++)r[n]=[n];for(let n=0;n<=e.length;n++)r[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=t.length;i++){let o=1;t[i-1]===e[n-1]?o=0:o=1,r[i][n]=Math.min(r[i-1][n]+1,r[i][n-1]+1,r[i-1][n-1]+o),i>1&&n>1&&t[i-1]===e[n-2]&&t[i-2]===e[n-1]&&(r[i][n]=Math.min(r[i][n],r[i-2][n-2]+1))}return r[t.length][e.length]}function qde(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let n=[],i=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=Ude(t,s),c=Math.max(t.length,s.length);(c-a)/c>o&&(as.localeCompare(a)),r&&(n=n.map(s=>`--${s}`)),n.length>1?`
(Did you mean one of ${n.join(", ")}?)`:n.length===1?`
-(Did you mean ${n[0]}?)`:""}hq.suggestSimilar=jue});var vq=v(sA=>{var Mue=He("node:events").EventEmitter,rA=He("node:child_process"),no=He("node:path"),Hg=He("node:fs"),Ue=He("node:process"),{Argument:Fue,humanReadableArgName:Lue}=Bg(),{CommanderError:nA}=Ld(),{Help:zue,stripColor:Uue}=YE(),{Option:yq,DualOptions:que}=tA(),{suggestSimilar:_q}=gq(),iA=class t extends Mue{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>Ue.stdout.write(r),writeErr:r=>Ue.stderr.write(r),outputError:(r,n)=>n(r),getOutHelpWidth:()=>Ue.stdout.isTTY?Ue.stdout.columns:void 0,getErrHelpWidth:()=>Ue.stderr.isTTY?Ue.stderr.columns:void 0,getOutHasColors:()=>oA()??(Ue.stdout.isTTY&&Ue.stdout.hasColors?.()),getErrHasColors:()=>oA()??(Ue.stderr.isTTY&&Ue.stderr.hasColors?.()),stripColor:r=>Uue(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let r=this;r;r=r.parent)e.push(r);return e}command(e,r,n){let i=r,o=n;typeof i=="object"&&i!==null&&(o=i,i=null),o=o||{};let[,s,a]=e.match(/([^ ]+) *(.*)/),c=this.createCommand(s);return i&&(c.description(i),c._executableHandler=!0),o.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(o.noHelp||o.hidden),c._executableFile=o.executableFile||null,a&&c.arguments(a),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),i?this:c}createCommand(e){return new t(e)}createHelp(){return Object.assign(new zue,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
-- specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new Fue(e,r)}argument(e,r,n,i){let o=this.createArgument(e,r);return typeof n=="function"?o.default(i).argParser(n):o.default(n),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let n=e??"help [command]",[,i,o]=n.match(/([^ ]+) *(.*)/),s=r??"display help for command",a=this.createCommand(i);return a.helpOption(!1),o&&a.arguments(o),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||r)&&this._initCommandGroup(a),this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,r){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
-Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,n){this._exitCallback&&this._exitCallback(new nA(e,r,n)),Ue.exit(e)}action(e){let r=n=>{let i=this.registeredArguments.length,o=n.slice(0,i);return this._storeOptionsAsProperties?o[i]=this:o[i]=this.opts(),o.push(this),e.apply(this,o)};return this._actionHandler=r,this}createOption(e,r){return new yq(e,r)}_callParseArg(e,r,n,i){try{return e.parseArg(r,n)}catch(o){if(o.code==="commander.invalidArgument"){let s=`${i} ${o.message}`;this.error(s,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(e){let r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
-- already used by option '${r.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let r=i=>[i.name()].concat(i.aliases()),n=r(e).find(i=>this._findCommand(i));if(n){let i=r(this._findCommand(n)).join("|"),o=r(e).join("|");throw new Error(`cannot add command '${o}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let r=e.name(),n=e.attributeName();if(e.negate){let o=e.long.replace(/^--no-/,"--");this._findOption(o)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let i=(o,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let c=this.getOptionValue(n);o!==null&&e.parseArg?o=this._callParseArg(e,o,c,s):o!==null&&e.variadic&&(o=e._collectValue(o,c)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(n,o,a)};return this.on("option:"+r,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;i(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+r,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;i(o,s,"env")}),this}_optionEx(e,r,n,i,o){if(typeof r=="object"&&r instanceof yq)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,n);if(s.makeOptionMandatory(!!e.mandatory),typeof i=="function")s.default(o).argParser(i);else if(i instanceof RegExp){let a=i;i=(c,l)=>{let u=a.exec(c);return u?u[0]:l},s.default(o).argParser(i)}else s.default(i);return this.addOption(s)}option(e,r,n,i){return this._optionEx({},e,r,n,i)}requiredOption(e,r,n,i){return this._optionEx({mandatory:!0},e,r,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,n){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(r=n.getOptionValueSource(e))}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===void 0&&r.from===void 0){Ue.versions?.electron&&(r.from="electron");let i=Ue.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}e===void 0&&(e=Ue.argv),this.rawArgs=e.slice();let n;switch(r.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":Ue.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,r){this._prepareForParse();let n=this._prepareUserArgs(e,r);return this._parseCommand([],n),this}async parseAsync(e,r){this._prepareForParse();let n=this._prepareUserArgs(e,r);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
-- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,r,n){if(Hg.existsSync(e))return;let i=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${e}' does not exist
+(Did you mean ${n[0]}?)`:""}s4.suggestSimilar=qde});var d4=v(zA=>{var Bde=Ge("node:events").EventEmitter,jA=Ge("node:child_process"),uo=Ge("node:path"),by=Ge("node:fs"),qe=Ge("node:process"),{Argument:Hde,humanReadableArgName:Gde}=_y(),{CommanderError:MA}=rf(),{Help:Zde,stripColor:Vde}=IA(),{Option:c4,DualOptions:Wde}=NA(),{suggestSimilar:l4}=a4(),FA=class t extends Bde{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>qe.stdout.write(r),writeErr:r=>qe.stderr.write(r),outputError:(r,n)=>n(r),getOutHelpWidth:()=>qe.stdout.isTTY?qe.stdout.columns:void 0,getErrHelpWidth:()=>qe.stderr.isTTY?qe.stderr.columns:void 0,getOutHasColors:()=>LA()??(qe.stdout.isTTY&&qe.stdout.hasColors?.()),getErrHasColors:()=>LA()??(qe.stderr.isTTY&&qe.stderr.hasColors?.()),stripColor:r=>Vde(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let r=this;r;r=r.parent)e.push(r);return e}command(e,r,n){let i=r,o=n;typeof i=="object"&&i!==null&&(o=i,i=null),o=o||{};let[,s,a]=e.match(/([^ ]+) *(.*)/),c=this.createCommand(s);return i&&(c.description(i),c._executableHandler=!0),o.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(o.noHelp||o.hidden),c._executableFile=o.executableFile||null,a&&c.arguments(a),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),i?this:c}createCommand(e){return new t(e)}createHelp(){return Object.assign(new Zde,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
+- specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new Hde(e,r)}argument(e,r,n,i){let o=this.createArgument(e,r);return typeof n=="function"?o.default(i).argParser(n):o.default(n),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let n=e??"help [command]",[,i,o]=n.match(/([^ ]+) *(.*)/),s=r??"display help for command",a=this.createCommand(i);return a.helpOption(!1),o&&a.arguments(o),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||r)&&this._initCommandGroup(a),this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,r){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
+Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,n){this._exitCallback&&this._exitCallback(new MA(e,r,n)),qe.exit(e)}action(e){let r=n=>{let i=this.registeredArguments.length,o=n.slice(0,i);return this._storeOptionsAsProperties?o[i]=this:o[i]=this.opts(),o.push(this),e.apply(this,o)};return this._actionHandler=r,this}createOption(e,r){return new c4(e,r)}_callParseArg(e,r,n,i){try{return e.parseArg(r,n)}catch(o){if(o.code==="commander.invalidArgument"){let s=`${i} ${o.message}`;this.error(s,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(e){let r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
+- already used by option '${r.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let r=i=>[i.name()].concat(i.aliases()),n=r(e).find(i=>this._findCommand(i));if(n){let i=r(this._findCommand(n)).join("|"),o=r(e).join("|");throw new Error(`cannot add command '${o}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let r=e.name(),n=e.attributeName();if(e.negate){let o=e.long.replace(/^--no-/,"--");this._findOption(o)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let i=(o,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let c=this.getOptionValue(n);o!==null&&e.parseArg?o=this._callParseArg(e,o,c,s):o!==null&&e.variadic&&(o=e._collectValue(o,c)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(n,o,a)};return this.on("option:"+r,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;i(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+r,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;i(o,s,"env")}),this}_optionEx(e,r,n,i,o){if(typeof r=="object"&&r instanceof c4)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,n);if(s.makeOptionMandatory(!!e.mandatory),typeof i=="function")s.default(o).argParser(i);else if(i instanceof RegExp){let a=i;i=(c,l)=>{let u=a.exec(c);return u?u[0]:l},s.default(o).argParser(i)}else s.default(i);return this.addOption(s)}option(e,r,n,i){return this._optionEx({},e,r,n,i)}requiredOption(e,r,n,i){return this._optionEx({mandatory:!0},e,r,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,n){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(r=n.getOptionValueSource(e))}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===void 0&&r.from===void 0){qe.versions?.electron&&(r.from="electron");let i=qe.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}e===void 0&&(e=qe.argv),this.rawArgs=e.slice();let n;switch(r.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":qe.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,r){this._prepareForParse();let n=this._prepareUserArgs(e,r);return this._parseCommand([],n),this}async parseAsync(e,r){this._prepareForParse();let n=this._prepareUserArgs(e,r);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
+- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,r,n){if(by.existsSync(e))return;let i=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${e}' does not exist
- if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
- - ${i}`;throw new Error(o)}_executeSubCommand(e,r){r=r.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function o(u,d){let f=no.resolve(u,d);if(Hg.existsSync(f))return f;if(i.includes(no.extname(d)))return;let p=i.find(m=>Hg.existsSync(`${f}${m}`));if(p)return`${f}${p}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=Hg.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=no.resolve(no.dirname(u),a)}if(a){let u=o(a,s);if(!u&&!e._executableFile&&this._scriptPath){let d=no.basename(this._scriptPath,no.extname(this._scriptPath));d!==this._name&&(u=o(a,`${d}-${e._name}`))}s=u||s}n=i.includes(no.extname(s));let c;Ue.platform!=="win32"?n?(r.unshift(s),r=bq(Ue.execArgv).concat(r),c=rA.spawn(Ue.argv[0],r,{stdio:"inherit"})):c=rA.spawn(s,r,{stdio:"inherit"}):(this._checkForMissingExecutable(s,a,e._name),r.unshift(s),r=bq(Ue.execArgv).concat(r),c=rA.spawn(Ue.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{Ue.on(d,()=>{c.killed===!1&&c.exitCode===null&&c.kill(d)})});let l=this._exitCallback;c.on("close",u=>{u=u??1,l?l(new nA(u,"commander.executeSubCommandAsync","(close)")):Ue.exit(u)}),c.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(s,a,e._name);else if(u.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)Ue.exit(1);else{let d=new nA(1,"commander.executeSubCommandAsync","(error)");d.nestedError=u,l(d)}}),this.runningCommand=c}_dispatchSubcommand(e,r,n){let i=this._findCommand(e);i||this.help({error:!0}),i._prepareForParse();let o;return o=this._chainOrCallSubCommandHook(o,i,"preSubcommand"),o=this._chainOrCall(o,()=>{if(i._executableHandler)this._executeSubCommand(i,r.concat(n));else return i._parseCommand(r,n)}),o}_dispatchHelpCommand(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,o)=>{let s=i;if(i!==null&&n.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;s=this._callParseArg(n,i,o,a)}return s};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((n,i)=>{let o=n.defaultValue;n.variadic?ie(n,a,s),n.defaultValue))):o===void 0&&(o=[]):ir()):r()}_chainOrCallHooks(e,r){let n=e,i=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[r]!==void 0).forEach(o=>{o._lifeCycleHooks[r].forEach(s=>{i.push({hookedCommand:o,callback:s})})}),r==="postAction"&&i.reverse(),i.forEach(o=>{n=this._chainOrCall(n,()=>o.callback(o.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,r,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(o=>{i=this._chainOrCall(i,()=>o(this,r))}),i}_parseCommand(e,r){let n=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),r=n.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,e,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(o))i(),this._processArguments(),this.parent.emit(o,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(o=>n.conflictsWith.includes(o.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let r=[],n=[],i=r;function o(u){return u.length>1&&u[0]==="-"}let s=u=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(u)?!this._getCommandAndAncestors().some(d=>d.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,a=null,c=null,l=0;for(;l2&&u[0]==="-"&&u[1]!=="-"){let d=this._findOption(`-${u[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,u.slice(2)):(this.emit(`option:${d.name()}`),c=`-${u.slice(2)}`);continue}}if(/^--[^=]+=/.test(u)){let d=u.indexOf("="),f=this._findOption(u.slice(0,d));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,u.slice(d+1));continue}}if(i===r&&o(u)&&!(this.commands.length===0&&s(u))&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(u)){r.push(u),n.push(...e.slice(l));break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){r.push(u,...e.slice(l));break}else if(this._defaultCommandName){n.push(u,...e.slice(l));break}}if(this._passThroughOptions){i.push(u,...e.slice(l));break}i.push(u)}return{operands:r,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let n=0;nObject.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
+ - ${i}`;throw new Error(o)}_executeSubCommand(e,r){r=r.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function o(u,d){let f=uo.resolve(u,d);if(by.existsSync(f))return f;if(i.includes(uo.extname(d)))return;let p=i.find(m=>by.existsSync(`${f}${m}`));if(p)return`${f}${p}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=by.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=uo.resolve(uo.dirname(u),a)}if(a){let u=o(a,s);if(!u&&!e._executableFile&&this._scriptPath){let d=uo.basename(this._scriptPath,uo.extname(this._scriptPath));d!==this._name&&(u=o(a,`${d}-${e._name}`))}s=u||s}n=i.includes(uo.extname(s));let c;qe.platform!=="win32"?n?(r.unshift(s),r=u4(qe.execArgv).concat(r),c=jA.spawn(qe.argv[0],r,{stdio:"inherit"})):c=jA.spawn(s,r,{stdio:"inherit"}):(this._checkForMissingExecutable(s,a,e._name),r.unshift(s),r=u4(qe.execArgv).concat(r),c=jA.spawn(qe.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{qe.on(d,()=>{c.killed===!1&&c.exitCode===null&&c.kill(d)})});let l=this._exitCallback;c.on("close",u=>{u=u??1,l?l(new MA(u,"commander.executeSubCommandAsync","(close)")):qe.exit(u)}),c.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(s,a,e._name);else if(u.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)qe.exit(1);else{let d=new MA(1,"commander.executeSubCommandAsync","(error)");d.nestedError=u,l(d)}}),this.runningCommand=c}_dispatchSubcommand(e,r,n){let i=this._findCommand(e);i||this.help({error:!0}),i._prepareForParse();let o;return o=this._chainOrCallSubCommandHook(o,i,"preSubcommand"),o=this._chainOrCall(o,()=>{if(i._executableHandler)this._executeSubCommand(i,r.concat(n));else return i._parseCommand(r,n)}),o}_dispatchHelpCommand(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,o)=>{let s=i;if(i!==null&&n.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;s=this._callParseArg(n,i,o,a)}return s};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((n,i)=>{let o=n.defaultValue;n.variadic?ie(n,a,s),n.defaultValue))):o===void 0&&(o=[]):ir()):r()}_chainOrCallHooks(e,r){let n=e,i=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[r]!==void 0).forEach(o=>{o._lifeCycleHooks[r].forEach(s=>{i.push({hookedCommand:o,callback:s})})}),r==="postAction"&&i.reverse(),i.forEach(o=>{n=this._chainOrCall(n,()=>o.callback(o.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,r,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(o=>{i=this._chainOrCall(i,()=>o(this,r))}),i}_parseCommand(e,r){let n=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),r=n.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,e,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(o))i(),this._processArguments(),this.parent.emit(o,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(o=>n.conflictsWith.includes(o.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let r=[],n=[],i=r;function o(u){return u.length>1&&u[0]==="-"}let s=u=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(u)?!this._getCommandAndAncestors().some(d=>d.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,a=null,c=null,l=0;for(;l2&&u[0]==="-"&&u[1]!=="-"){let d=this._findOption(`-${u[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,u.slice(2)):(this.emit(`option:${d.name()}`),c=`-${u.slice(2)}`);continue}}if(/^--[^=]+=/.test(u)){let d=u.indexOf("="),f=this._findOption(u.slice(0,d));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,u.slice(d+1));continue}}if(i===r&&o(u)&&!(this.commands.length===0&&s(u))&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(u)){r.push(u),n.push(...e.slice(l));break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){r.push(u,...e.slice(l));break}else if(this._defaultCommandName){n.push(u,...e.slice(l));break}}if(this._passThroughOptions){i.push(u,...e.slice(l));break}i.push(u)}return{operands:r,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let n=0;nObject.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
-`),this.outputHelp({error:!0}));let n=r||{},i=n.exitCode||1,o=n.code||"commander.error";this._exit(i,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in Ue.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,Ue.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new que(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let n=s=>{let a=s.attributeName(),c=this.getOptionValue(a),l=this.options.find(d=>d.negate&&a===d.attributeName()),u=this.options.find(d=>!d.negate&&a===d.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:u||s},i=s=>{let a=n(s),c=a.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${i(e)} cannot be used with ${i(r)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);i=i.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);r=_q(e,i)}let n=`error: unknown option '${e}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(o=>{i.push(o.name()),o.alias()&&i.push(o.alias())}),r=_q(e,i)}let n=`error: unknown command '${e}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(e,r,n){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",n=n||"output the version number";let i=this.createOption(r,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
-`),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>Lue(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=no.basename(e,no.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),n=this._getOutputContext(e);r.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let i=r.formatHelp(this,r);return n.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let r=!!e.error,n,i,o;return r?(n=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:r,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:i,helpWidth:o}}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let n=this._getOutputContext(e),i={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let o=this.helpInformation({error:n.error});if(r&&(o=r(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",i))}helpOption(e,r){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",r??"display help for command"),(e||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let r=Number(Ue.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
+`),this.outputHelp({error:!0}));let n=r||{},i=n.exitCode||1,o=n.code||"commander.error";this._exit(i,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in qe.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,qe.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Wde(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let n=s=>{let a=s.attributeName(),c=this.getOptionValue(a),l=this.options.find(d=>d.negate&&a===d.attributeName()),u=this.options.find(d=>!d.negate&&a===d.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:u||s},i=s=>{let a=n(s),c=a.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${i(e)} cannot be used with ${i(r)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);i=i.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);r=l4(e,i)}let n=`error: unknown option '${e}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(o=>{i.push(o.name()),o.alias()&&i.push(o.alias())}),r=l4(e,i)}let n=`error: unknown command '${e}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(e,r,n){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",n=n||"output the version number";let i=this.createOption(r,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
+`),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>Gde(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=uo.basename(e,uo.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),n=this._getOutputContext(e);r.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let i=r.formatHelp(this,r);return n.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let r=!!e.error,n,i,o;return r?(n=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:r,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:i,helpWidth:o}}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let n=this._getOutputContext(e),i={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let o=this.helpInformation({error:n.error});if(r&&(o=r(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",i))}helpOption(e,r){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",r??"display help for command"),(e||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let r=Number(qe.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,o=>{let s;typeof r=="function"?s=r({error:o.error,command:o.command}):s=r,s&&o.write(`${s}
-`)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function bq(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?i=o[3]:n=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],n=o[3],i=o[4]),r&&i!=="0"?`${r}=${n}:${parseInt(i)+1}`:e})}function oA(){if(Ue.env.NO_COLOR||Ue.env.FORCE_COLOR==="0"||Ue.env.FORCE_COLOR==="false")return!1;if(Ue.env.FORCE_COLOR||Ue.env.CLICOLOR_FORCE!==void 0)return!0}sA.Command=iA;sA.useColor=oA});var $q=v(Sn=>{var{Argument:Sq}=Bg(),{Command:aA}=vq(),{CommanderError:Bue,InvalidArgumentError:wq}=Ld(),{Help:Hue}=YE(),{Option:xq}=tA();Sn.program=new aA;Sn.createCommand=t=>new aA(t);Sn.createOption=(t,e)=>new xq(t,e);Sn.createArgument=(t,e)=>new Sq(t,e);Sn.Command=aA;Sn.Option=xq;Sn.Argument=Sq;Sn.Help=Hue;Sn.CommanderError=Bue;Sn.InvalidArgumentError=wq;Sn.InvalidOptionArgumentError=wq});var Ce=v(Jt=>{"use strict";var lA=Symbol.for("yaml.alias"),Tq=Symbol.for("yaml.document"),Gg=Symbol.for("yaml.map"),Oq=Symbol.for("yaml.pair"),uA=Symbol.for("yaml.scalar"),Zg=Symbol.for("yaml.seq"),io=Symbol.for("yaml.node.type"),Jue=t=>!!t&&typeof t=="object"&&t[io]===lA,Yue=t=>!!t&&typeof t=="object"&&t[io]===Tq,Xue=t=>!!t&&typeof t=="object"&&t[io]===Gg,Que=t=>!!t&&typeof t=="object"&&t[io]===Oq,Rq=t=>!!t&&typeof t=="object"&&t[io]===uA,ede=t=>!!t&&typeof t=="object"&&t[io]===Zg;function Iq(t){if(t&&typeof t=="object")switch(t[io]){case Gg:case Zg:return!0}return!1}function tde(t){if(t&&typeof t=="object")switch(t[io]){case lA:case Gg:case uA:case Zg:return!0}return!1}var rde=t=>(Rq(t)||Iq(t))&&!!t.anchor;Jt.ALIAS=lA;Jt.DOC=Tq;Jt.MAP=Gg;Jt.NODE_TYPE=io;Jt.PAIR=Oq;Jt.SCALAR=uA;Jt.SEQ=Zg;Jt.hasAnchor=rde;Jt.isAlias=Jue;Jt.isCollection=Iq;Jt.isDocument=Yue;Jt.isMap=Xue;Jt.isNode=tde;Jt.isPair=Que;Jt.isScalar=Rq;Jt.isSeq=ede});var zd=v(dA=>{"use strict";var Mt=Ce(),Pr=Symbol("break visit"),Pq=Symbol("skip children"),vi=Symbol("remove node");function Vg(t,e){let r=Cq(e);Mt.isDocument(t)?Nc(null,t.contents,r,Object.freeze([t]))===vi&&(t.contents=null):Nc(null,t,r,Object.freeze([]))}Vg.BREAK=Pr;Vg.SKIP=Pq;Vg.REMOVE=vi;function Nc(t,e,r,n){let i=Dq(t,e,r,n);if(Mt.isNode(i)||Mt.isPair(i))return Nq(t,n,i),Nc(t,i,r,n);if(typeof i!="symbol"){if(Mt.isCollection(e)){n=Object.freeze(n.concat(e));for(let o=0;o{"use strict";var jq=Ce(),nde=zd(),ide={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},ode=t=>t.replace(/[!,[\]{}]/g,e=>ide[e]),Ud=class t{constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[o,s]=n;return this.tags[o]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[o]=n;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let s=/^\d+\.\d+$/.test(o);return r(6,`Unsupported YAML version ${o}`,s),!1}}default:return r(0,`Unknown directive ${i}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let s=e.slice(2,-1);return s==="!"||s==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),s)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||r(`The ${e} tag has no suffix`);let o=this.tags[n];if(o)try{return o+decodeURIComponent(i)}catch(s){return r(String(s)),null}return n==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[r,n]of Object.entries(this.tags))if(e.startsWith(n))return r+ode(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&jq.isNode(e.contents)){let o={};nde.visit(e.contents,(s,a)=>{jq.isNode(a)&&a.tag&&(o[a.tag]=!0)}),i=Object.keys(o)}else i=[];for(let[o,s]of n)o==="!!"&&s==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(s)))&&r.push(`%TAG ${o} ${s}`);return r.join(`
-`)}};Ud.defaultYaml={explicit:!1,version:"1.2"};Ud.defaultTags={"!!":"tag:yaml.org,2002:"};Mq.Directives=Ud});var Kg=v(qd=>{"use strict";var Fq=Ce(),sde=zd();function ade(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}function Lq(t){let e=new Set;return sde.visit(t,{Value(r,n){n.anchor&&e.add(n.anchor)}}),e}function zq(t,e){for(let r=1;;++r){let n=`${t}${r}`;if(!e.has(n))return n}}function cde(t,e){let r=[],n=new Map,i=null;return{onAnchor:o=>{r.push(o),i??(i=Lq(t));let s=zq(e,i);return i.add(s),s},setAnchors:()=>{for(let o of r){let s=n.get(o);if(typeof s=="object"&&s.anchor&&(Fq.isScalar(s.node)||Fq.isCollection(s.node)))s.node.anchor=s.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:n}}qd.anchorIsValid=ade;qd.anchorNames=Lq;qd.createNodeAnchors=cde;qd.findNewAnchor=zq});var pA=v(Uq=>{"use strict";function Bd(t,e,r,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,o=n.length;i{"use strict";var lde=Ce();function qq(t,e,r){if(Array.isArray(t))return t.map((n,i)=>qq(n,String(i),r));if(t&&typeof t.toJSON=="function"){if(!r||!lde.hasAnchor(t))return t.toJSON(e,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n),r.onCreate=o=>{n.res=o,delete r.onCreate};let i=t.toJSON(e,r);return r.onCreate&&r.onCreate(i),i}return typeof t=="bigint"&&!r?.keep?Number(t):t}Bq.toJS=qq});var Jg=v(Gq=>{"use strict";var ude=pA(),Hq=Ce(),dde=Fo(),mA=class{constructor(e){Object.defineProperty(this,Hq.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:o}={}){if(!Hq.isDocument(e))throw new TypeError("A document argument is required");let s={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=dde.toJS(this,"",s);if(typeof i=="function")for(let{count:c,res:l}of s.anchors.values())i(l,c);return typeof o=="function"?ude.applyReviver(o,{"":a},"",a):a}};Gq.NodeBase=mA});var Hd=v(Zq=>{"use strict";var fde=Kg(),pde=zd(),Mc=Ce(),mde=Jg(),hde=Fo(),hA=class extends mde.NodeBase{constructor(e){super(Mc.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){if(r?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let n;r?.aliasResolveCache?n=r.aliasResolveCache:(n=[],pde.visit(e,{Node:(o,s)=>{(Mc.isAlias(s)||Mc.hasAnchor(s))&&n.push(s)}}),r&&(r.aliasResolveCache=n));let i;for(let o of n){if(o===this)break;o.anchor===this.source&&(i=o)}return i}toJSON(e,r){if(!r)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:o}=r,s=this.resolve(i,r);if(!s){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=n.get(s);if(a||(hde.toJS(s,null,r),a=n.get(s)),a?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(o>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Yg(i,s,n)),a.count*a.aliasCount>o)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(e,r,n){let i=`*${this.source}`;if(e){if(fde.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${i} `}return i}};function Yg(t,e,r){if(Mc.isAlias(e)){let n=e.resolve(t),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(Mc.isCollection(e)){let n=0;for(let i of e.items){let o=Yg(t,i,r);o>n&&(n=o)}return n}else if(Mc.isPair(e)){let n=Yg(t,e.key,r),i=Yg(t,e.value,r);return Math.max(n,i)}return 1}Zq.Alias=hA});var It=v(gA=>{"use strict";var gde=Ce(),yde=Jg(),_de=Fo(),bde=t=>!t||typeof t!="function"&&typeof t!="object",Lo=class extends yde.NodeBase{constructor(e){super(gde.SCALAR),this.value=e}toJSON(e,r){return r?.keep?this.value:_de.toJS(this.value,e,r)}toString(){return String(this.value)}};Lo.BLOCK_FOLDED="BLOCK_FOLDED";Lo.BLOCK_LITERAL="BLOCK_LITERAL";Lo.PLAIN="PLAIN";Lo.QUOTE_DOUBLE="QUOTE_DOUBLE";Lo.QUOTE_SINGLE="QUOTE_SINGLE";gA.Scalar=Lo;gA.isScalarValue=bde});var Gd=v(Wq=>{"use strict";var vde=Hd(),ta=Ce(),Vq=It(),Sde="tag:yaml.org,2002:";function wde(t,e,r){if(e){let n=r.filter(o=>o.tag===e),i=n.find(o=>!o.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return r.find(n=>n.identify?.(t)&&!n.format)}function xde(t,e,r){if(ta.isDocument(t)&&(t=t.contents),ta.isNode(t))return t;if(ta.isPair(t)){let d=r.schema[ta.MAP].createNode?.(r.schema,null,r);return d.items.push(t),d}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:o,schema:s,sourceObjects:a}=r,c;if(n&&t&&typeof t=="object"){if(c=a.get(t),c)return c.anchor??(c.anchor=i(t)),new vde.Alias(c.anchor);c={anchor:null,node:null},a.set(t,c)}e?.startsWith("!!")&&(e=Sde+e.slice(2));let l=wde(t,e,s.tags);if(!l){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let d=new Vq.Scalar(t);return c&&(c.node=d),d}l=t instanceof Map?s[ta.MAP]:Symbol.iterator in Object(t)?s[ta.SEQ]:s[ta.MAP]}o&&(o(l),delete r.onTagObj);let u=l?.createNode?l.createNode(r.schema,t,r):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(r.schema,t,r):new Vq.Scalar(t);return e?u.tag=e:l.default||(u.tag=l.tag),c&&(c.node=u),u}Wq.createNode=xde});var Qg=v(Xg=>{"use strict";var $de=Gd(),Si=Ce(),kde=Jg();function yA(t,e,r){let n=r;for(let i=e.length-1;i>=0;--i){let o=e[i];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){let s=[];s[o]=n,n=s}else n=new Map([[o,n]])}return $de.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var Kq=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,_A=class extends kde.NodeBase{constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(n=>Si.isNode(n)||Si.isPair(n)?n.clone(e):n),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(Kq(e))this.add(r);else{let[n,...i]=e,o=this.get(n,!0);if(Si.isCollection(o))o.addIn(i,r);else if(o===void 0&&this.schema)this.set(n,yA(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[r,...n]=e;if(n.length===0)return this.delete(r);let i=this.get(r,!0);if(Si.isCollection(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(e,r){let[n,...i]=e,o=this.get(n,!0);return i.length===0?!r&&Si.isScalar(o)?o.value:o:Si.isCollection(o)?o.getIn(i,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!Si.isPair(r))return!1;let n=r.value;return n==null||e&&Si.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[r,...n]=e;if(n.length===0)return this.has(r);let i=this.get(r,!0);return Si.isCollection(i)?i.hasIn(n):!1}setIn(e,r){let[n,...i]=e;if(i.length===0)this.set(n,r);else{let o=this.get(n,!0);if(Si.isCollection(o))o.setIn(i,r);else if(o===void 0&&this.schema)this.set(n,yA(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};Xg.Collection=_A;Xg.collectionFromPath=yA;Xg.isEmptyPath=Kq});var Zd=v(ey=>{"use strict";var Ede=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function bA(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var Ade=(t,e,r)=>t.endsWith(`
-`)?bA(r,e):r.includes(`
+`)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function u4(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?i=o[3]:n=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],n=o[3],i=o[4]),r&&i!=="0"?`${r}=${n}:${parseInt(i)+1}`:e})}function LA(){if(qe.env.NO_COLOR||qe.env.FORCE_COLOR==="0"||qe.env.FORCE_COLOR==="false")return!1;if(qe.env.FORCE_COLOR||qe.env.CLICOLOR_FORCE!==void 0)return!0}zA.Command=FA;zA.useColor=LA});var h4=v($n=>{var{Argument:f4}=_y(),{Command:UA}=d4(),{CommanderError:Kde,InvalidArgumentError:p4}=rf(),{Help:Jde}=IA(),{Option:m4}=NA();$n.program=new UA;$n.createCommand=t=>new UA(t);$n.createOption=(t,e)=>new m4(t,e);$n.createArgument=(t,e)=>new f4(t,e);$n.Command=UA;$n.Option=m4;$n.Argument=f4;$n.Help=Jde;$n.CommanderError=Kde;$n.InvalidArgumentError=p4;$n.InvalidOptionArgumentError=p4});var De=v(Xt=>{"use strict";var BA=Symbol.for("yaml.alias"),b4=Symbol.for("yaml.document"),vy=Symbol.for("yaml.map"),v4=Symbol.for("yaml.pair"),HA=Symbol.for("yaml.scalar"),Sy=Symbol.for("yaml.seq"),fo=Symbol.for("yaml.node.type"),rfe=t=>!!t&&typeof t=="object"&&t[fo]===BA,nfe=t=>!!t&&typeof t=="object"&&t[fo]===b4,ife=t=>!!t&&typeof t=="object"&&t[fo]===vy,ofe=t=>!!t&&typeof t=="object"&&t[fo]===v4,S4=t=>!!t&&typeof t=="object"&&t[fo]===HA,sfe=t=>!!t&&typeof t=="object"&&t[fo]===Sy;function w4(t){if(t&&typeof t=="object")switch(t[fo]){case vy:case Sy:return!0}return!1}function afe(t){if(t&&typeof t=="object")switch(t[fo]){case BA:case vy:case HA:case Sy:return!0}return!1}var cfe=t=>(S4(t)||w4(t))&&!!t.anchor;Xt.ALIAS=BA;Xt.DOC=b4;Xt.MAP=vy;Xt.NODE_TYPE=fo;Xt.PAIR=v4;Xt.SCALAR=HA;Xt.SEQ=Sy;Xt.hasAnchor=cfe;Xt.isAlias=rfe;Xt.isCollection=w4;Xt.isDocument=nfe;Xt.isMap=ife;Xt.isNode=afe;Xt.isPair=ofe;Xt.isScalar=S4;Xt.isSeq=sfe});var nf=v(GA=>{"use strict";var zt=De(),Cr=Symbol("break visit"),x4=Symbol("skip children"),ki=Symbol("remove node");function wy(t,e){let r=$4(e);zt.isDocument(t)?Jc(null,t.contents,r,Object.freeze([t]))===ki&&(t.contents=null):Jc(null,t,r,Object.freeze([]))}wy.BREAK=Cr;wy.SKIP=x4;wy.REMOVE=ki;function Jc(t,e,r,n){let i=k4(t,e,r,n);if(zt.isNode(i)||zt.isPair(i))return E4(t,n,i),Jc(t,i,r,n);if(typeof i!="symbol"){if(zt.isCollection(e)){n=Object.freeze(n.concat(e));for(let o=0;o{"use strict";var A4=De(),lfe=nf(),ufe={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},dfe=t=>t.replace(/[!,[\]{}]/g,e=>ufe[e]),of=class t{constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[o,s]=n;return this.tags[o]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[o]=n;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let s=/^\d+\.\d+$/.test(o);return r(6,`Unsupported YAML version ${o}`,s),!1}}default:return r(0,`Unknown directive ${i}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let s=e.slice(2,-1);return s==="!"||s==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),s)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||r(`The ${e} tag has no suffix`);let o=this.tags[n];if(o)try{return o+decodeURIComponent(i)}catch(s){return r(String(s)),null}return n==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[r,n]of Object.entries(this.tags))if(e.startsWith(n))return r+dfe(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&A4.isNode(e.contents)){let o={};lfe.visit(e.contents,(s,a)=>{A4.isNode(a)&&a.tag&&(o[a.tag]=!0)}),i=Object.keys(o)}else i=[];for(let[o,s]of n)o==="!!"&&s==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(s)))&&r.push(`%TAG ${o} ${s}`);return r.join(`
+`)}};of.defaultYaml={explicit:!1,version:"1.2"};of.defaultTags={"!!":"tag:yaml.org,2002:"};T4.Directives=of});var $y=v(sf=>{"use strict";var O4=De(),ffe=nf();function pfe(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}function R4(t){let e=new Set;return ffe.visit(t,{Value(r,n){n.anchor&&e.add(n.anchor)}}),e}function I4(t,e){for(let r=1;;++r){let n=`${t}${r}`;if(!e.has(n))return n}}function mfe(t,e){let r=[],n=new Map,i=null;return{onAnchor:o=>{r.push(o),i??(i=R4(t));let s=I4(e,i);return i.add(s),s},setAnchors:()=>{for(let o of r){let s=n.get(o);if(typeof s=="object"&&s.anchor&&(O4.isScalar(s.node)||O4.isCollection(s.node)))s.node.anchor=s.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:n}}sf.anchorIsValid=pfe;sf.anchorNames=R4;sf.createNodeAnchors=mfe;sf.findNewAnchor=I4});var VA=v(P4=>{"use strict";function af(t,e,r,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,o=n.length;i{"use strict";var hfe=De();function C4(t,e,r){if(Array.isArray(t))return t.map((n,i)=>C4(n,String(i),r));if(t&&typeof t.toJSON=="function"){if(!r||!hfe.hasAnchor(t))return t.toJSON(e,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n),r.onCreate=o=>{n.res=o,delete r.onCreate};let i=t.toJSON(e,r);return r.onCreate&&r.onCreate(i),i}return typeof t=="bigint"&&!r?.keep?Number(t):t}D4.toJS=C4});var ky=v(j4=>{"use strict";var gfe=VA(),N4=De(),yfe=Zo(),WA=class{constructor(e){Object.defineProperty(this,N4.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:o}={}){if(!N4.isDocument(e))throw new TypeError("A document argument is required");let s={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=yfe.toJS(this,"",s);if(typeof i=="function")for(let{count:c,res:l}of s.anchors.values())i(l,c);return typeof o=="function"?gfe.applyReviver(o,{"":a},"",a):a}};j4.NodeBase=WA});var cf=v(M4=>{"use strict";var _fe=$y(),bfe=nf(),Xc=De(),vfe=ky(),Sfe=Zo(),KA=class extends vfe.NodeBase{constructor(e){super(Xc.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){if(r?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let n;r?.aliasResolveCache?n=r.aliasResolveCache:(n=[],bfe.visit(e,{Node:(o,s)=>{(Xc.isAlias(s)||Xc.hasAnchor(s))&&n.push(s)}}),r&&(r.aliasResolveCache=n));let i;for(let o of n){if(o===this)break;o.anchor===this.source&&(i=o)}return i}toJSON(e,r){if(!r)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:o}=r,s=this.resolve(i,r);if(!s){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=n.get(s);if(a||(Sfe.toJS(s,null,r),a=n.get(s)),a?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(o>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Ey(i,s,n)),a.count*a.aliasCount>o)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(e,r,n){let i=`*${this.source}`;if(e){if(_fe.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${i} `}return i}};function Ey(t,e,r){if(Xc.isAlias(e)){let n=e.resolve(t),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(Xc.isCollection(e)){let n=0;for(let i of e.items){let o=Ey(t,i,r);o>n&&(n=o)}return n}else if(Xc.isPair(e)){let n=Ey(t,e.key,r),i=Ey(t,e.value,r);return Math.max(n,i)}return 1}M4.Alias=KA});var Dt=v(JA=>{"use strict";var wfe=De(),xfe=ky(),$fe=Zo(),kfe=t=>!t||typeof t!="function"&&typeof t!="object",Vo=class extends xfe.NodeBase{constructor(e){super(wfe.SCALAR),this.value=e}toJSON(e,r){return r?.keep?this.value:$fe.toJS(this.value,e,r)}toString(){return String(this.value)}};Vo.BLOCK_FOLDED="BLOCK_FOLDED";Vo.BLOCK_LITERAL="BLOCK_LITERAL";Vo.PLAIN="PLAIN";Vo.QUOTE_DOUBLE="QUOTE_DOUBLE";Vo.QUOTE_SINGLE="QUOTE_SINGLE";JA.Scalar=Vo;JA.isScalarValue=kfe});var lf=v(L4=>{"use strict";var Efe=cf(),da=De(),F4=Dt(),Afe="tag:yaml.org,2002:";function Tfe(t,e,r){if(e){let n=r.filter(o=>o.tag===e),i=n.find(o=>!o.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return r.find(n=>n.identify?.(t)&&!n.format)}function Ofe(t,e,r){if(da.isDocument(t)&&(t=t.contents),da.isNode(t))return t;if(da.isPair(t)){let d=r.schema[da.MAP].createNode?.(r.schema,null,r);return d.items.push(t),d}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:o,schema:s,sourceObjects:a}=r,c;if(n&&t&&typeof t=="object"){if(c=a.get(t),c)return c.anchor??(c.anchor=i(t)),new Efe.Alias(c.anchor);c={anchor:null,node:null},a.set(t,c)}e?.startsWith("!!")&&(e=Afe+e.slice(2));let l=Tfe(t,e,s.tags);if(!l){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let d=new F4.Scalar(t);return c&&(c.node=d),d}l=t instanceof Map?s[da.MAP]:Symbol.iterator in Object(t)?s[da.SEQ]:s[da.MAP]}o&&(o(l),delete r.onTagObj);let u=l?.createNode?l.createNode(r.schema,t,r):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(r.schema,t,r):new F4.Scalar(t);return e?u.tag=e:l.default||(u.tag=l.tag),c&&(c.node=u),u}L4.createNode=Ofe});var Ty=v(Ay=>{"use strict";var Rfe=lf(),Ei=De(),Ife=ky();function YA(t,e,r){let n=r;for(let i=e.length-1;i>=0;--i){let o=e[i];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){let s=[];s[o]=n,n=s}else n=new Map([[o,n]])}return Rfe.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var z4=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,XA=class extends Ife.NodeBase{constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(n=>Ei.isNode(n)||Ei.isPair(n)?n.clone(e):n),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(z4(e))this.add(r);else{let[n,...i]=e,o=this.get(n,!0);if(Ei.isCollection(o))o.addIn(i,r);else if(o===void 0&&this.schema)this.set(n,YA(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[r,...n]=e;if(n.length===0)return this.delete(r);let i=this.get(r,!0);if(Ei.isCollection(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(e,r){let[n,...i]=e,o=this.get(n,!0);return i.length===0?!r&&Ei.isScalar(o)?o.value:o:Ei.isCollection(o)?o.getIn(i,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!Ei.isPair(r))return!1;let n=r.value;return n==null||e&&Ei.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[r,...n]=e;if(n.length===0)return this.has(r);let i=this.get(r,!0);return Ei.isCollection(i)?i.hasIn(n):!1}setIn(e,r){let[n,...i]=e;if(i.length===0)this.set(n,r);else{let o=this.get(n,!0);if(Ei.isCollection(o))o.setIn(i,r);else if(o===void 0&&this.schema)this.set(n,YA(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};Ay.Collection=XA;Ay.collectionFromPath=YA;Ay.isEmptyPath=z4});var uf=v(Oy=>{"use strict";var Pfe=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function QA(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var Cfe=(t,e,r)=>t.endsWith(`
+`)?QA(r,e):r.includes(`
`)?`
-`+bA(r,e):(t.endsWith(" ")?"":" ")+r;ey.indentComment=bA;ey.lineComment=Ade;ey.stringifyComment=Ede});var Yq=v(Vd=>{"use strict";var Tde="flow",vA="block",ty="quoted";function Ode(t,e,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){if(!i||i<0)return t;ii-Math.max(2,o)?l.push(0):d=i-n);let f,p,m=!1,h=-1,g=-1,b=-1;r===vA&&(h=Jq(t,h,e.length),h!==-1&&(d=h+c));for(let S;S=t[h+=1];){if(r===ty&&S==="\\"){switch(g=h,t[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}b=h}if(S===`
-`)r===vA&&(h=Jq(t,h,e.length)),d=h+e.length+c,f=void 0;else{if(S===" "&&p&&p!==" "&&p!==`
+`+QA(r,e):(t.endsWith(" ")?"":" ")+r;Oy.indentComment=QA;Oy.lineComment=Cfe;Oy.stringifyComment=Pfe});var q4=v(df=>{"use strict";var Dfe="flow",eT="block",Ry="quoted";function Nfe(t,e,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){if(!i||i<0)return t;ii-Math.max(2,o)?l.push(0):d=i-n);let f,p,m=!1,h=-1,g=-1,b=-1;r===eT&&(h=U4(t,h,e.length),h!==-1&&(d=h+c));for(let S;S=t[h+=1];){if(r===Ry&&S==="\\"){switch(g=h,t[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}b=h}if(S===`
+`)r===eT&&(h=U4(t,h,e.length)),d=h+e.length+c,f=void 0;else{if(S===" "&&p&&p!==" "&&p!==`
`&&p!==" "){let x=t[h+1];x&&x!==" "&&x!==`
-`&&x!==" "&&(f=h)}if(h>=d)if(f)l.push(f),d=f+c,f=void 0;else if(r===ty){for(;p===" "||p===" ";)p=S,S=t[h+=1],m=!0;let x=h>b+1?h-2:g-1;if(u[x])return t;l.push(x),u[x]=!0,d=x+c,f=void 0}else m=!0}p=S}if(m&&a&&a(),l.length===0)return t;s&&s();let _=t.slice(0,l[0]);for(let S=0;S{"use strict";var Hn=It(),zo=Yq(),ny=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),iy=t=>/^(%|---|\.\.\.)/m.test(t);function Rde(t,e,r){if(!e||e<0)return!1;let n=e-r,i=t.length;if(i<=n)return!1;for(let o=0,s=0;on)return!0;if(s=o+1,i-s<=n)return!1}return!0}function Wd(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(iy(t)?" ":""),s="",a=0;for(let c=0,l=r[c];l;l=r[++c])if(l===" "&&r[c+1]==="\\"&&r[c+2]==="n"&&(s+=r.slice(a,c)+"\\ ",c+=1,a=c,l="\\"),l==="\\")switch(r[c+1]){case"u":{s+=r.slice(a,c);let u=r.substr(c+2,4);switch(u){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:u.substr(0,2)==="00"?s+="\\x"+u.substr(2):s+=r.substr(c,6)}c+=5,a=c+1}break;case"n":if(n||r[c+2]==='"'||r.length=d)if(f)l.push(f),d=f+c,f=void 0;else if(r===Ry){for(;p===" "||p===" ";)p=S,S=t[h+=1],m=!0;let x=h>b+1?h-2:g-1;if(u[x])return t;l.push(x),u[x]=!0,d=x+c,f=void 0}else m=!0}p=S}if(m&&a&&a(),l.length===0)return t;s&&s();let _=t.slice(0,l[0]);for(let S=0;S{"use strict";var Wn=Dt(),Wo=q4(),Py=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Cy=t=>/^(%|---|\.\.\.)/m.test(t);function jfe(t,e,r){if(!e||e<0)return!1;let n=e-r,i=t.length;if(i<=n)return!1;for(let o=0,s=0;on)return!0;if(s=o+1,i-s<=n)return!1}return!0}function ff(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(Cy(t)?" ":""),s="",a=0;for(let c=0,l=r[c];l;l=r[++c])if(l===" "&&r[c+1]==="\\"&&r[c+2]==="n"&&(s+=r.slice(a,c)+"\\ ",c+=1,a=c,l="\\"),l==="\\")switch(r[c+1]){case"u":{s+=r.slice(a,c);let u=r.substr(c+2,4);switch(u){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:u.substr(0,2)==="00"?s+="\\x"+u.substr(2):s+=r.substr(c,6)}c+=5,a=c+1}break;case"n":if(n||r[c+2]==='"'||r.length
`;let d,f;for(f=r.length;f>0;--f){let w=r[f-1];if(w!==`
`&&w!==" "&&w!==" ")break}let p=r.substring(f),m=p.indexOf(`
`);m===-1?d="-":r===p||m!==p.length-1?(d="+",o&&o()):d="",p&&(r=r.slice(0,-p.length),p[p.length-1]===`
-`&&(p=p.slice(0,-1)),p=p.replace(wA,`$&${l}`));let h=!1,g,b=-1;for(g=0;g{O=!0});let E=zo.foldFlowLines(`${_}${w}${p}`,l,zo.FOLD_BLOCK,A);if(!O)return`>${x}
-${l}${E}`}return r=r.replace(/\n+/g,`$&${l}`),`|${x}
-${l}${_}${r}${p}`}function Ide(t,e,r,n){let{type:i,value:o}=t,{actualString:s,implicitKey:a,indent:c,indentStep:l,inFlow:u}=e;if(a&&o.includes(`
-`)||u&&/[[\]{},]/.test(o))return Fc(o,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||u||!o.includes(`
-`)?Fc(o,e):ry(t,e,r,n);if(!a&&!u&&i!==Hn.Scalar.PLAIN&&o.includes(`
-`))return ry(t,e,r,n);if(iy(o)){if(c==="")return e.forceBlockIndent=!0,ry(t,e,r,n);if(a&&c===l)return Fc(o,e)}let d=o.replace(/\n+/g,`$&
-${c}`);if(s){let f=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(d),{compat:p,tags:m}=e.doc.schema;if(m.some(f)||p?.some(f))return Fc(o,e)}return a?d:zo.foldFlowLines(d,c,zo.FOLD_FLOW,ny(e,!1))}function Pde(t,e,r,n){let{implicitKey:i,inFlow:o}=e,s=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==Hn.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=Hn.Scalar.QUOTE_DOUBLE);let c=u=>{switch(u){case Hn.Scalar.BLOCK_FOLDED:case Hn.Scalar.BLOCK_LITERAL:return i||o?Fc(s.value,e):ry(s,e,r,n);case Hn.Scalar.QUOTE_DOUBLE:return Wd(s.value,e);case Hn.Scalar.QUOTE_SINGLE:return SA(s.value,e);case Hn.Scalar.PLAIN:return Ide(s,e,r,n);default:return null}},l=c(a);if(l===null){let{defaultKeyType:u,defaultStringType:d}=e.options,f=i&&u||d;if(l=c(f),l===null)throw new Error(`Unsupported default string type ${f}`)}return l}Xq.stringifyString=Pde});var Jd=v(xA=>{"use strict";var Cde=Kg(),Uo=Ce(),Dde=Zd(),Nde=Kd();function jde(t,e){let r=Object.assign({blockQuote:!0,commentString:Dde.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function Mde(t,e){if(e.tag){let i=t.filter(o=>o.tag===e.tag);if(i.length>0)return i.find(o=>o.format===e.format)??i[0]}let r,n;if(Uo.isScalar(e)){n=e.value;let i=t.filter(o=>o.identify?.(n));if(i.length>1){let o=i.filter(s=>s.test);o.length>0&&(i=o)}r=i.find(o=>o.format===e.format)??i.find(o=>!o.format)}else n=e,r=t.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!r){let i=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return r}function Fde(t,e,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],o=(Uo.isScalar(t)||Uo.isCollection(t))&&t.anchor;o&&Cde.anchorIsValid(o)&&(r.add(o),i.push(`&${o}`));let s=t.tag??(e.default?null:e.tag);return s&&i.push(n.directives.tagString(s)),i.join(" ")}function Lde(t,e,r,n){if(Uo.isPair(t))return t.toString(e,r,n);if(Uo.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i,o=Uo.isNode(t)?t:e.doc.createNode(t,{onTagObj:c=>i=c});i??(i=Mde(e.doc.schema.tags,o));let s=Fde(o,i,e);s.length>0&&(e.indentAtStart=(e.indentAtStart??0)+s.length+1);let a=typeof i.stringify=="function"?i.stringify(o,e,r,n):Uo.isScalar(o)?Nde.stringifyString(o,e,r,n):o.toString(e,r,n);return s?Uo.isScalar(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
-${e.indent}${a}`:a}xA.createStringifyContext=jde;xA.stringify=Lde});var r4=v(t4=>{"use strict";var oo=Ce(),Qq=It(),e4=Jd(),Yd=Zd();function zde({key:t,value:e},r,n,i){let{allNullValues:o,doc:s,indent:a,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=r,f=oo.isNode(t)&&t.comment||null;if(d){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(oo.isCollection(t)||!oo.isNode(t)&&typeof t=="object"){let A="With simple keys, collection cannot be used as a key value";throw new Error(A)}}let p=!d&&(!t||f&&e==null&&!r.inFlow||oo.isCollection(t)||(oo.isScalar(t)?t.type===Qq.Scalar.BLOCK_FOLDED||t.type===Qq.Scalar.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(d||!o),indent:a+c});let m=!1,h=!1,g=e4.stringify(t,r,()=>m=!0,()=>h=!0);if(!p&&!r.inFlow&&g.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(r.inFlow){if(o||e==null)return m&&n&&n(),g===""?"?":p?`? ${g}`:g}else if(o&&!d||e==null&&p)return g=`? ${g}`,f&&!m?g+=Yd.lineComment(g,r.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=Yd.lineComment(g,r.indent,l(f))),g=`? ${g}
-${a}:`):(g=`${g}:`,f&&(g+=Yd.lineComment(g,r.indent,l(f))));let b,_,S;oo.isNode(e)?(b=!!e.spaceBefore,_=e.commentBefore,S=e.comment):(b=!1,_=null,S=null,e&&typeof e=="object"&&(e=s.createNode(e))),r.implicitKey=!1,!p&&!f&&oo.isScalar(e)&&(r.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!r.inFlow&&!p&&oo.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let x=!1,w=e4.stringify(e,r,()=>x=!0,()=>h=!0),O=" ";if(f||b||_){if(O=b?`
-`:"",_){let A=l(_);O+=`
-${Yd.indentComment(A,r.indent)}`}w===""&&!r.inFlow?O===`
+$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),O=!1,T=Py(n,!0);s!=="folded"&&e!==Wn.Scalar.BLOCK_FOLDED&&(T.onOverflow=()=>{O=!0});let A=Wo.foldFlowLines(`${_}${w}${p}`,l,Wo.FOLD_BLOCK,T);if(!O)return`>${x}
+${l}${A}`}return r=r.replace(/\n+/g,`$&${l}`),`|${x}
+${l}${_}${r}${p}`}function Mfe(t,e,r,n){let{type:i,value:o}=t,{actualString:s,implicitKey:a,indent:c,indentStep:l,inFlow:u}=e;if(a&&o.includes(`
+`)||u&&/[[\]{},]/.test(o))return Qc(o,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||u||!o.includes(`
+`)?Qc(o,e):Iy(t,e,r,n);if(!a&&!u&&i!==Wn.Scalar.PLAIN&&o.includes(`
+`))return Iy(t,e,r,n);if(Cy(o)){if(c==="")return e.forceBlockIndent=!0,Iy(t,e,r,n);if(a&&c===l)return Qc(o,e)}let d=o.replace(/\n+/g,`$&
+${c}`);if(s){let f=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(d),{compat:p,tags:m}=e.doc.schema;if(m.some(f)||p?.some(f))return Qc(o,e)}return a?d:Wo.foldFlowLines(d,c,Wo.FOLD_FLOW,Py(e,!1))}function Ffe(t,e,r,n){let{implicitKey:i,inFlow:o}=e,s=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==Wn.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=Wn.Scalar.QUOTE_DOUBLE);let c=u=>{switch(u){case Wn.Scalar.BLOCK_FOLDED:case Wn.Scalar.BLOCK_LITERAL:return i||o?Qc(s.value,e):Iy(s,e,r,n);case Wn.Scalar.QUOTE_DOUBLE:return ff(s.value,e);case Wn.Scalar.QUOTE_SINGLE:return tT(s.value,e);case Wn.Scalar.PLAIN:return Mfe(s,e,r,n);default:return null}},l=c(a);if(l===null){let{defaultKeyType:u,defaultStringType:d}=e.options,f=i&&u||d;if(l=c(f),l===null)throw new Error(`Unsupported default string type ${f}`)}return l}B4.stringifyString=Ffe});var mf=v(nT=>{"use strict";var Lfe=$y(),Ko=De(),zfe=uf(),Ufe=pf();function qfe(t,e){let r=Object.assign({blockQuote:!0,commentString:zfe.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function Bfe(t,e){if(e.tag){let i=t.filter(o=>o.tag===e.tag);if(i.length>0)return i.find(o=>o.format===e.format)??i[0]}let r,n;if(Ko.isScalar(e)){n=e.value;let i=t.filter(o=>o.identify?.(n));if(i.length>1){let o=i.filter(s=>s.test);o.length>0&&(i=o)}r=i.find(o=>o.format===e.format)??i.find(o=>!o.format)}else n=e,r=t.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!r){let i=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return r}function Hfe(t,e,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],o=(Ko.isScalar(t)||Ko.isCollection(t))&&t.anchor;o&&Lfe.anchorIsValid(o)&&(r.add(o),i.push(`&${o}`));let s=t.tag??(e.default?null:e.tag);return s&&i.push(n.directives.tagString(s)),i.join(" ")}function Gfe(t,e,r,n){if(Ko.isPair(t))return t.toString(e,r,n);if(Ko.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i,o=Ko.isNode(t)?t:e.doc.createNode(t,{onTagObj:c=>i=c});i??(i=Bfe(e.doc.schema.tags,o));let s=Hfe(o,i,e);s.length>0&&(e.indentAtStart=(e.indentAtStart??0)+s.length+1);let a=typeof i.stringify=="function"?i.stringify(o,e,r,n):Ko.isScalar(o)?Ufe.stringifyString(o,e,r,n):o.toString(e,r,n);return s?Ko.isScalar(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
+${e.indent}${a}`:a}nT.createStringifyContext=qfe;nT.stringify=Gfe});var V4=v(Z4=>{"use strict";var po=De(),H4=Dt(),G4=mf(),hf=uf();function Zfe({key:t,value:e},r,n,i){let{allNullValues:o,doc:s,indent:a,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=r,f=po.isNode(t)&&t.comment||null;if(d){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(po.isCollection(t)||!po.isNode(t)&&typeof t=="object"){let T="With simple keys, collection cannot be used as a key value";throw new Error(T)}}let p=!d&&(!t||f&&e==null&&!r.inFlow||po.isCollection(t)||(po.isScalar(t)?t.type===H4.Scalar.BLOCK_FOLDED||t.type===H4.Scalar.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(d||!o),indent:a+c});let m=!1,h=!1,g=G4.stringify(t,r,()=>m=!0,()=>h=!0);if(!p&&!r.inFlow&&g.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(r.inFlow){if(o||e==null)return m&&n&&n(),g===""?"?":p?`? ${g}`:g}else if(o&&!d||e==null&&p)return g=`? ${g}`,f&&!m?g+=hf.lineComment(g,r.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=hf.lineComment(g,r.indent,l(f))),g=`? ${g}
+${a}:`):(g=`${g}:`,f&&(g+=hf.lineComment(g,r.indent,l(f))));let b,_,S;po.isNode(e)?(b=!!e.spaceBefore,_=e.commentBefore,S=e.comment):(b=!1,_=null,S=null,e&&typeof e=="object"&&(e=s.createNode(e))),r.implicitKey=!1,!p&&!f&&po.isScalar(e)&&(r.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!r.inFlow&&!p&&po.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let x=!1,w=G4.stringify(e,r,()=>x=!0,()=>h=!0),O=" ";if(f||b||_){if(O=b?`
+`:"",_){let T=l(_);O+=`
+${hf.indentComment(T,r.indent)}`}w===""&&!r.inFlow?O===`
`&&S&&(O=`
`):O+=`
-${r.indent}`}else if(!p&&oo.isCollection(e)){let A=w[0],E=w.indexOf(`
-`),C=E!==-1,k=r.inFlow??e.flow??e.items.length===0;if(C||!k){let q=!1;if(C&&(A==="&"||A==="!")){let X=w.indexOf(" ");A==="&"&&X!==-1&&X{"use strict";var n4=He("process");function Ude(t,...e){t==="debug"&&console.log(...e)}function qde(t,e){(t==="debug"||t==="warn")&&(typeof n4.emitWarning=="function"?n4.emitWarning(e):console.warn(e))}$A.debug=Ude;$A.warn=qde});var ly=v(cy=>{"use strict";var ay=Ce(),i4=It(),oy="<<",sy={identify:t=>t===oy||typeof t=="symbol"&&t.description===oy,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new i4.Scalar(Symbol(oy)),{addToJSMap:o4}),stringify:()=>oy},Bde=(t,e)=>(sy.identify(e)||ay.isScalar(e)&&(!e.type||e.type===i4.Scalar.PLAIN)&&sy.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===sy.tag&&r.default);function o4(t,e,r){let n=s4(t,r);if(ay.isSeq(n))for(let i of n.items)EA(t,e,i);else if(Array.isArray(n))for(let i of n)EA(t,e,i);else EA(t,e,n)}function EA(t,e,r){let n=s4(t,r);if(!ay.isMap(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,t,Map);for(let[o,s]of i)e instanceof Map?e.has(o)||e.set(o,s):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0});return e}function s4(t,e){return t&&ay.isAlias(e)?e.resolve(t.doc,t):e}cy.addMergeToJSMap=o4;cy.isMergeKey=Bde;cy.merge=sy});var TA=v(l4=>{"use strict";var Hde=kA(),a4=ly(),Gde=Jd(),c4=Ce(),AA=Fo();function Zde(t,e,{key:r,value:n}){if(c4.isNode(r)&&r.addToJSMap)r.addToJSMap(t,e,n);else if(a4.isMergeKey(t,r))a4.addMergeToJSMap(t,e,n);else{let i=AA.toJS(r,"",t);if(e instanceof Map)e.set(i,AA.toJS(n,i,t));else if(e instanceof Set)e.add(i);else{let o=Vde(r,i,t),s=AA.toJS(n,o,t);o in e?Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):e[o]=s}}return e}function Vde(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(c4.isNode(t)&&r?.doc){let n=Gde.createStringifyContext(r.doc,{});n.anchors=new Set;for(let o of r.anchors.keys())n.anchors.add(o.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=t.toString(n);if(!r.mapKeyWarned){let o=JSON.stringify(i);o.length>40&&(o=o.substring(0,36)+'..."'),Hde.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return i}return JSON.stringify(e)}l4.addPairToJSMap=Zde});var qo=v(OA=>{"use strict";var u4=Gd(),Wde=r4(),Kde=TA(),uy=Ce();function Jde(t,e,r){let n=u4.createNode(t,void 0,r),i=u4.createNode(e,void 0,r);return new dy(n,i)}var dy=class t{constructor(e,r=null){Object.defineProperty(this,uy.NODE_TYPE,{value:uy.PAIR}),this.key=e,this.value=r}clone(e){let{key:r,value:n}=this;return uy.isNode(r)&&(r=r.clone(e)),uy.isNode(n)&&(n=n.clone(e)),new t(r,n)}toJSON(e,r){let n=r?.mapAsMap?new Map:{};return Kde.addPairToJSMap(r,n,this)}toString(e,r,n){return e?.doc?Wde.stringifyPair(this,e,r,n):JSON.stringify(this)}};OA.Pair=dy;OA.createPair=Jde});var RA=v(f4=>{"use strict";var ra=Ce(),d4=Jd(),fy=Zd();function Yde(t,e,r){return(e.inFlow??t.flow?Qde:Xde)(t,e,r)}function Xde({comment:t,items:e},r,{blockItemPrefix:n,flowChars:i,itemIndent:o,onChompKeep:s,onComment:a}){let{indent:c,options:{commentString:l}}=r,u=Object.assign({},r,{indent:o,type:null}),d=!1,f=[];for(let m=0;mg=null,()=>d=!0);g&&(b+=fy.lineComment(b,o,l(g))),d&&g&&(d=!1),f.push(n+b)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let m=1;m{"use strict";var W4=Ge("process");function Vfe(t,...e){t==="debug"&&console.log(...e)}function Wfe(t,e){(t==="debug"||t==="warn")&&(typeof W4.emitWarning=="function"?W4.emitWarning(e):console.warn(e))}iT.debug=Vfe;iT.warn=Wfe});var Fy=v(My=>{"use strict";var jy=De(),K4=Dt(),Dy="<<",Ny={identify:t=>t===Dy||typeof t=="symbol"&&t.description===Dy,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new K4.Scalar(Symbol(Dy)),{addToJSMap:J4}),stringify:()=>Dy},Kfe=(t,e)=>(Ny.identify(e)||jy.isScalar(e)&&(!e.type||e.type===K4.Scalar.PLAIN)&&Ny.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===Ny.tag&&r.default);function J4(t,e,r){let n=Y4(t,r);if(jy.isSeq(n))for(let i of n.items)sT(t,e,i);else if(Array.isArray(n))for(let i of n)sT(t,e,i);else sT(t,e,n)}function sT(t,e,r){let n=Y4(t,r);if(!jy.isMap(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,t,Map);for(let[o,s]of i)e instanceof Map?e.has(o)||e.set(o,s):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0});return e}function Y4(t,e){return t&&jy.isAlias(e)?e.resolve(t.doc,t):e}My.addMergeToJSMap=J4;My.isMergeKey=Kfe;My.merge=Ny});var cT=v(e6=>{"use strict";var Jfe=oT(),X4=Fy(),Yfe=mf(),Q4=De(),aT=Zo();function Xfe(t,e,{key:r,value:n}){if(Q4.isNode(r)&&r.addToJSMap)r.addToJSMap(t,e,n);else if(X4.isMergeKey(t,r))X4.addMergeToJSMap(t,e,n);else{let i=aT.toJS(r,"",t);if(e instanceof Map)e.set(i,aT.toJS(n,i,t));else if(e instanceof Set)e.add(i);else{let o=Qfe(r,i,t),s=aT.toJS(n,o,t);o in e?Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):e[o]=s}}return e}function Qfe(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(Q4.isNode(t)&&r?.doc){let n=Yfe.createStringifyContext(r.doc,{});n.anchors=new Set;for(let o of r.anchors.keys())n.anchors.add(o.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=t.toString(n);if(!r.mapKeyWarned){let o=JSON.stringify(i);o.length>40&&(o=o.substring(0,36)+'..."'),Jfe.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return i}return JSON.stringify(e)}e6.addPairToJSMap=Xfe});var Jo=v(lT=>{"use strict";var t6=lf(),epe=V4(),tpe=cT(),Ly=De();function rpe(t,e,r){let n=t6.createNode(t,void 0,r),i=t6.createNode(e,void 0,r);return new zy(n,i)}var zy=class t{constructor(e,r=null){Object.defineProperty(this,Ly.NODE_TYPE,{value:Ly.PAIR}),this.key=e,this.value=r}clone(e){let{key:r,value:n}=this;return Ly.isNode(r)&&(r=r.clone(e)),Ly.isNode(n)&&(n=n.clone(e)),new t(r,n)}toJSON(e,r){let n=r?.mapAsMap?new Map:{};return tpe.addPairToJSMap(r,n,this)}toString(e,r,n){return e?.doc?epe.stringifyPair(this,e,r,n):JSON.stringify(this)}};lT.Pair=zy;lT.createPair=rpe});var uT=v(n6=>{"use strict";var fa=De(),r6=mf(),Uy=uf();function npe(t,e,r){return(e.inFlow??t.flow?ope:ipe)(t,e,r)}function ipe({comment:t,items:e},r,{blockItemPrefix:n,flowChars:i,itemIndent:o,onChompKeep:s,onComment:a}){let{indent:c,options:{commentString:l}}=r,u=Object.assign({},r,{indent:o,type:null}),d=!1,f=[];for(let m=0;mg=null,()=>d=!0);g&&(b+=Uy.lineComment(b,o,l(g))),d&&g&&(d=!1),f.push(n+b)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let m=1;mg=null);l||(l=d.length>u||b.includes(`
-`)),m0&&(l||(l=d.reduce((_,S)=>_+S.length+2,2)+(b.length+2)>e.options.lineWidth)),l&&(b+=",")),g&&(b+=fy.lineComment(b,n,a(g))),d.push(b),u=d.length}let{start:f,end:p}=r;if(d.length===0)return f+p;if(!l){let m=d.reduce((h,g)=>h+g.length+2,2);l=e.options.lineWidth>0&&m>e.options.lineWidth}if(l){let m=f;for(let h of d)m+=h?`
+`+Uy.indentComment(l(t),c),a&&a()):d&&s&&s(),p}function ope({items:t},e,{flowChars:r,itemIndent:n}){let{indent:i,indentStep:o,flowCollectionPadding:s,options:{commentString:a}}=e;n+=o;let c=Object.assign({},e,{indent:n,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let m=0;mg=null);l||(l=d.length>u||b.includes(`
+`)),m0&&(l||(l=d.reduce((_,S)=>_+S.length+2,2)+(b.length+2)>e.options.lineWidth)),l&&(b+=",")),g&&(b+=Uy.lineComment(b,n,a(g))),d.push(b),u=d.length}let{start:f,end:p}=r;if(d.length===0)return f+p;if(!l){let m=d.reduce((h,g)=>h+g.length+2,2);l=e.options.lineWidth>0&&m>e.options.lineWidth}if(l){let m=f;for(let h of d)m+=h?`
${o}${i}${h}`:`
`;return`${m}
-${i}${p}`}else return`${f}${s}${d.join(" ")}${s}${p}`}function py({indent:t,options:{commentString:e}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let o=fy.indentComment(e(n),t);r.push(o.trimStart())}}f4.stringifyCollection=Yde});var Ho=v(PA=>{"use strict";var efe=RA(),tfe=TA(),rfe=Qg(),Bo=Ce(),my=qo(),nfe=It();function Xd(t,e){let r=Bo.isScalar(e)?e.value:e;for(let n of t)if(Bo.isPair(n)&&(n.key===e||n.key===r||Bo.isScalar(n.key)&&n.key.value===r))return n}var IA=class extends rfe.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Bo.MAP,e),this.items=[]}static from(e,r,n){let{keepUndefined:i,replacer:o}=n,s=new this(e),a=(c,l)=>{if(typeof o=="function")l=o.call(r,c,l);else if(Array.isArray(o)&&!o.includes(c))return;(l!==void 0||i)&&s.items.push(my.createPair(c,l,n))};if(r instanceof Map)for(let[c,l]of r)a(c,l);else if(r&&typeof r=="object")for(let c of Object.keys(r))a(c,r[c]);return typeof e.sortMapEntries=="function"&&s.items.sort(e.sortMapEntries),s}add(e,r){let n;Bo.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new my.Pair(e,e?.value):n=new my.Pair(e.key,e.value);let i=Xd(this.items,n.key),o=this.schema?.sortMapEntries;if(i){if(!r)throw new Error(`Key ${n.key} already set`);Bo.isScalar(i.value)&&nfe.isScalarValue(n.value)?i.value.value=n.value:i.value=n.value}else if(o){let s=this.items.findIndex(a=>o(n,a)<0);s===-1?this.items.push(n):this.items.splice(s,0,n)}else this.items.push(n)}delete(e){let r=Xd(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let i=Xd(this.items,e)?.value;return(!r&&Bo.isScalar(i)?i.value:i)??void 0}has(e){return!!Xd(this.items,e)}set(e,r){this.add(new my.Pair(e,r),!0)}toJSON(e,r,n){let i=n?new n:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(i);for(let o of this.items)tfe.addPairToJSMap(r,i,o);return i}toString(e,r,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!Bo.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),efe.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:r})}};PA.YAMLMap=IA;PA.findPair=Xd});var Lc=v(m4=>{"use strict";var ife=Ce(),p4=Ho(),ofe={collection:"map",default:!0,nodeClass:p4.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return ife.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,r)=>p4.YAMLMap.from(t,e,r)};m4.map=ofe});var Go=v(h4=>{"use strict";var sfe=Gd(),afe=RA(),cfe=Qg(),gy=Ce(),lfe=It(),ufe=Fo(),CA=class extends cfe.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(gy.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=hy(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let n=hy(e);if(typeof n!="number")return;let i=this.items[n];return!r&&gy.isScalar(i)?i.value:i}has(e){let r=hy(e);return typeof r=="number"&&r=0?e:null}h4.YAMLSeq=CA});var zc=v(y4=>{"use strict";var dfe=Ce(),g4=Go(),ffe={collection:"seq",default:!0,nodeClass:g4.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return dfe.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,r)=>g4.YAMLSeq.from(t,e,r)};y4.seq=ffe});var Qd=v(_4=>{"use strict";var pfe=Kd(),mfe={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,r,n){return e=Object.assign({actualString:!0},e),pfe.stringifyString(t,e,r,n)}};_4.string=mfe});var yy=v(S4=>{"use strict";var b4=It(),v4={identify:t=>t==null,createNode:()=>new b4.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new b4.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&v4.test.test(t)?t:e.options.nullStr};S4.nullTag=v4});var DA=v(x4=>{"use strict";var hfe=It(),w4={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new hfe.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},r){if(t&&w4.test.test(t)){let n=t[0]==="t"||t[0]==="T";if(e===n)return t}return e?r.options.trueStr:r.options.falseStr}};x4.boolTag=w4});var Uc=v($4=>{"use strict";function gfe({format:t,minFractionDigits:e,tag:r,value:n}){if(typeof n=="bigint")return String(n);let i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let o=Object.is(n,-0)?"-0":JSON.stringify(n);if(!t&&e&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(o)&&!o.includes("e")){let s=o.indexOf(".");s<0&&(s=o.length,o+=".");let a=e-(o.length-s-1);for(;a-- >0;)o+="0"}return o}$4.stringifyNumber=gfe});var jA=v(_y=>{"use strict";var yfe=It(),NA=Uc(),_fe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:NA.stringifyNumber},bfe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():NA.stringifyNumber(t)}},vfe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new yfe.Scalar(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:NA.stringifyNumber};_y.float=vfe;_y.floatExp=bfe;_y.floatNaN=_fe});var FA=v(vy=>{"use strict";var k4=Uc(),by=t=>typeof t=="bigint"||Number.isInteger(t),MA=(t,e,r,{intAsBigInt:n})=>n?BigInt(t):parseInt(t.substring(e),r);function E4(t,e,r){let{value:n}=t;return by(n)&&n>=0?r+n.toString(e):k4.stringifyNumber(t)}var Sfe={identify:t=>by(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,r)=>MA(t,2,8,r),stringify:t=>E4(t,8,"0o")},wfe={identify:by,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,r)=>MA(t,0,10,r),stringify:k4.stringifyNumber},xfe={identify:t=>by(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,r)=>MA(t,2,16,r),stringify:t=>E4(t,16,"0x")};vy.int=wfe;vy.intHex=xfe;vy.intOct=Sfe});var T4=v(A4=>{"use strict";var $fe=Lc(),kfe=yy(),Efe=zc(),Afe=Qd(),Tfe=DA(),LA=jA(),zA=FA(),Ofe=[$fe.map,Efe.seq,Afe.string,kfe.nullTag,Tfe.boolTag,zA.intOct,zA.int,zA.intHex,LA.floatNaN,LA.floatExp,LA.float];A4.schema=Ofe});var I4=v(R4=>{"use strict";var Rfe=It(),Ife=Lc(),Pfe=zc();function O4(t){return typeof t=="bigint"||Number.isInteger(t)}var Sy=({value:t})=>JSON.stringify(t),Cfe=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Sy},{identify:t=>t==null,createNode:()=>new Rfe.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Sy},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:Sy},{identify:O4,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),stringify:({value:t})=>O4(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Sy}],Dfe={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Nfe=[Ife.map,Pfe.seq].concat(Cfe,Dfe);R4.schema=Nfe});var qA=v(P4=>{"use strict";var ef=He("buffer"),UA=It(),jfe=Kd(),Mfe={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof ef.Buffer=="function")return ef.Buffer.from(t,"base64");if(typeof atob=="function"){let r=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let i=0;i{"use strict";var wy=Ce(),BA=qo(),Ffe=It(),Lfe=Go();function C4(t,e){if(wy.isSeq(t))for(let r=0;r1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new BA.Pair(new Ffe.Scalar(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
+${i}${p}`}else return`${f}${s}${d.join(" ")}${s}${p}`}function qy({indent:t,options:{commentString:e}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let o=Uy.indentComment(e(n),t);r.push(o.trimStart())}}n6.stringifyCollection=npe});var Xo=v(fT=>{"use strict";var spe=uT(),ape=cT(),cpe=Ty(),Yo=De(),By=Jo(),lpe=Dt();function gf(t,e){let r=Yo.isScalar(e)?e.value:e;for(let n of t)if(Yo.isPair(n)&&(n.key===e||n.key===r||Yo.isScalar(n.key)&&n.key.value===r))return n}var dT=class extends cpe.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Yo.MAP,e),this.items=[]}static from(e,r,n){let{keepUndefined:i,replacer:o}=n,s=new this(e),a=(c,l)=>{if(typeof o=="function")l=o.call(r,c,l);else if(Array.isArray(o)&&!o.includes(c))return;(l!==void 0||i)&&s.items.push(By.createPair(c,l,n))};if(r instanceof Map)for(let[c,l]of r)a(c,l);else if(r&&typeof r=="object")for(let c of Object.keys(r))a(c,r[c]);return typeof e.sortMapEntries=="function"&&s.items.sort(e.sortMapEntries),s}add(e,r){let n;Yo.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new By.Pair(e,e?.value):n=new By.Pair(e.key,e.value);let i=gf(this.items,n.key),o=this.schema?.sortMapEntries;if(i){if(!r)throw new Error(`Key ${n.key} already set`);Yo.isScalar(i.value)&&lpe.isScalarValue(n.value)?i.value.value=n.value:i.value=n.value}else if(o){let s=this.items.findIndex(a=>o(n,a)<0);s===-1?this.items.push(n):this.items.splice(s,0,n)}else this.items.push(n)}delete(e){let r=gf(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let i=gf(this.items,e)?.value;return(!r&&Yo.isScalar(i)?i.value:i)??void 0}has(e){return!!gf(this.items,e)}set(e,r){this.add(new By.Pair(e,r),!0)}toJSON(e,r,n){let i=n?new n:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(i);for(let o of this.items)ape.addPairToJSMap(r,i,o);return i}toString(e,r,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!Yo.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),spe.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:r})}};fT.YAMLMap=dT;fT.findPair=gf});var el=v(o6=>{"use strict";var upe=De(),i6=Xo(),dpe={collection:"map",default:!0,nodeClass:i6.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return upe.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,r)=>i6.YAMLMap.from(t,e,r)};o6.map=dpe});var Qo=v(s6=>{"use strict";var fpe=lf(),ppe=uT(),mpe=Ty(),Gy=De(),hpe=Dt(),gpe=Zo(),pT=class extends mpe.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Gy.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=Hy(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let n=Hy(e);if(typeof n!="number")return;let i=this.items[n];return!r&&Gy.isScalar(i)?i.value:i}has(e){let r=Hy(e);return typeof r=="number"&&r=0?e:null}s6.YAMLSeq=pT});var tl=v(c6=>{"use strict";var ype=De(),a6=Qo(),_pe={collection:"seq",default:!0,nodeClass:a6.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return ype.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,r)=>a6.YAMLSeq.from(t,e,r)};c6.seq=_pe});var yf=v(l6=>{"use strict";var bpe=pf(),vpe={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,r,n){return e=Object.assign({actualString:!0},e),bpe.stringifyString(t,e,r,n)}};l6.string=vpe});var Zy=v(f6=>{"use strict";var u6=Dt(),d6={identify:t=>t==null,createNode:()=>new u6.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new u6.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&d6.test.test(t)?t:e.options.nullStr};f6.nullTag=d6});var mT=v(m6=>{"use strict";var Spe=Dt(),p6={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new Spe.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},r){if(t&&p6.test.test(t)){let n=t[0]==="t"||t[0]==="T";if(e===n)return t}return e?r.options.trueStr:r.options.falseStr}};m6.boolTag=p6});var rl=v(h6=>{"use strict";function wpe({format:t,minFractionDigits:e,tag:r,value:n}){if(typeof n=="bigint")return String(n);let i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let o=Object.is(n,-0)?"-0":JSON.stringify(n);if(!t&&e&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(o)&&!o.includes("e")){let s=o.indexOf(".");s<0&&(s=o.length,o+=".");let a=e-(o.length-s-1);for(;a-- >0;)o+="0"}return o}h6.stringifyNumber=wpe});var gT=v(Vy=>{"use strict";var xpe=Dt(),hT=rl(),$pe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:hT.stringifyNumber},kpe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():hT.stringifyNumber(t)}},Epe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new xpe.Scalar(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:hT.stringifyNumber};Vy.float=Epe;Vy.floatExp=kpe;Vy.floatNaN=$pe});var _T=v(Ky=>{"use strict";var g6=rl(),Wy=t=>typeof t=="bigint"||Number.isInteger(t),yT=(t,e,r,{intAsBigInt:n})=>n?BigInt(t):parseInt(t.substring(e),r);function y6(t,e,r){let{value:n}=t;return Wy(n)&&n>=0?r+n.toString(e):g6.stringifyNumber(t)}var Ape={identify:t=>Wy(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,r)=>yT(t,2,8,r),stringify:t=>y6(t,8,"0o")},Tpe={identify:Wy,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,r)=>yT(t,0,10,r),stringify:g6.stringifyNumber},Ope={identify:t=>Wy(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,r)=>yT(t,2,16,r),stringify:t=>y6(t,16,"0x")};Ky.int=Tpe;Ky.intHex=Ope;Ky.intOct=Ape});var b6=v(_6=>{"use strict";var Rpe=el(),Ipe=Zy(),Ppe=tl(),Cpe=yf(),Dpe=mT(),bT=gT(),vT=_T(),Npe=[Rpe.map,Ppe.seq,Cpe.string,Ipe.nullTag,Dpe.boolTag,vT.intOct,vT.int,vT.intHex,bT.floatNaN,bT.floatExp,bT.float];_6.schema=Npe});var w6=v(S6=>{"use strict";var jpe=Dt(),Mpe=el(),Fpe=tl();function v6(t){return typeof t=="bigint"||Number.isInteger(t)}var Jy=({value:t})=>JSON.stringify(t),Lpe=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Jy},{identify:t=>t==null,createNode:()=>new jpe.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Jy},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:Jy},{identify:v6,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),stringify:({value:t})=>v6(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Jy}],zpe={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Upe=[Mpe.map,Fpe.seq].concat(Lpe,zpe);S6.schema=Upe});var wT=v(x6=>{"use strict";var _f=Ge("buffer"),ST=Dt(),qpe=pf(),Bpe={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof _f.Buffer=="function")return _f.Buffer.from(t,"base64");if(typeof atob=="function"){let r=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let i=0;i{"use strict";var Yy=De(),xT=Jo(),Hpe=Dt(),Gpe=Qo();function $6(t,e){if(Yy.isSeq(t))for(let r=0;r1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new xT.Pair(new Hpe.Scalar(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
${i.key.commentBefore}`:n.commentBefore),n.comment){let o=i.value??i.key;o.comment=o.comment?`${n.comment}
-${o.comment}`:n.comment}n=i}t.items[r]=wy.isPair(n)?n:new BA.Pair(n)}}else e("Expected a sequence for this tag");return t}function D4(t,e,r){let{replacer:n}=r,i=new Lfe.YAMLSeq(t);i.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let s of e){typeof n=="function"&&(s=n.call(e,String(o++),s));let a,c;if(Array.isArray(s))if(s.length===2)a=s[0],c=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let l=Object.keys(s);if(l.length===1)a=l[0],c=s[a];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else a=s;i.items.push(BA.createPair(a,c,r))}return i}var zfe={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:C4,createNode:D4};xy.createPairs=D4;xy.pairs=zfe;xy.resolvePairs=C4});var ZA=v(GA=>{"use strict";var N4=Ce(),HA=Fo(),tf=Ho(),Ufe=Go(),j4=$y(),na=class t extends Ufe.YAMLSeq{constructor(){super(),this.add=tf.YAMLMap.prototype.add.bind(this),this.delete=tf.YAMLMap.prototype.delete.bind(this),this.get=tf.YAMLMap.prototype.get.bind(this),this.has=tf.YAMLMap.prototype.has.bind(this),this.set=tf.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let n=new Map;r?.onCreate&&r.onCreate(n);for(let i of this.items){let o,s;if(N4.isPair(i)?(o=HA.toJS(i.key,"",r),s=HA.toJS(i.value,o,r)):o=HA.toJS(i,"",r),n.has(o))throw new Error("Ordered maps must not include duplicate keys");n.set(o,s)}return n}static from(e,r,n){let i=j4.createPairs(e,r,n),o=new this;return o.items=i.items,o}};na.tag="tag:yaml.org,2002:omap";var qfe={collection:"seq",identify:t=>t instanceof Map,nodeClass:na,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=j4.resolvePairs(t,e),n=[];for(let{key:i}of r.items)N4.isScalar(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new na,r)},createNode:(t,e,r)=>na.from(t,e,r)};GA.YAMLOMap=na;GA.omap=qfe});var U4=v(VA=>{"use strict";var M4=It();function F4({value:t,source:e},r){return e&&(t?L4:z4).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}var L4={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new M4.Scalar(!0),stringify:F4},z4={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new M4.Scalar(!1),stringify:F4};VA.falseTag=z4;VA.trueTag=L4});var q4=v(ky=>{"use strict";var Bfe=It(),WA=Uc(),Hfe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:WA.stringifyNumber},Gfe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():WA.stringifyNumber(t)}},Zfe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new Bfe.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let n=t.substring(r+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:WA.stringifyNumber};ky.float=Zfe;ky.floatExp=Gfe;ky.floatNaN=Hfe});var H4=v(nf=>{"use strict";var B4=Uc(),rf=t=>typeof t=="bigint"||Number.isInteger(t);function Ey(t,e,r,{intAsBigInt:n}){let i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),n){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let s=BigInt(t);return i==="-"?BigInt(-1)*s:s}let o=parseInt(t,r);return i==="-"?-1*o:o}function KA(t,e,r){let{value:n}=t;if(rf(n)){let i=n.toString(e);return n<0?"-"+r+i.substr(1):r+i}return B4.stringifyNumber(t)}var Vfe={identify:rf,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,r)=>Ey(t,2,2,r),stringify:t=>KA(t,2,"0b")},Wfe={identify:rf,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,r)=>Ey(t,1,8,r),stringify:t=>KA(t,8,"0")},Kfe={identify:rf,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,r)=>Ey(t,0,10,r),stringify:B4.stringifyNumber},Jfe={identify:rf,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,r)=>Ey(t,2,16,r),stringify:t=>KA(t,16,"0x")};nf.int=Kfe;nf.intBin=Vfe;nf.intHex=Jfe;nf.intOct=Wfe});var YA=v(JA=>{"use strict";var Oy=Ce(),Ay=qo(),Ty=Ho(),ia=class t extends Ty.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let r;Oy.isPair(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new Ay.Pair(e.key,null):r=new Ay.Pair(e,null),Ty.findPair(this.items,r.key)||this.items.push(r)}get(e,r){let n=Ty.findPair(this.items,e);return!r&&Oy.isPair(n)?Oy.isScalar(n.key)?n.key.value:n.key:n}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let n=Ty.findPair(this.items,e);n&&!r?this.items.splice(this.items.indexOf(n),1):!n&&r&&this.items.push(new Ay.Pair(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,n);throw new Error("Set items must all have null values")}static from(e,r,n){let{replacer:i}=n,o=new this(e);if(r&&Symbol.iterator in Object(r))for(let s of r)typeof i=="function"&&(s=i.call(r,s,s)),o.items.push(Ay.createPair(s,null,n));return o}};ia.tag="tag:yaml.org,2002:set";var Yfe={collection:"map",identify:t=>t instanceof Set,nodeClass:ia,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,r)=>ia.from(t,e,r),resolve(t,e){if(Oy.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new ia,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};JA.YAMLSet=ia;JA.set=Yfe});var QA=v(Ry=>{"use strict";var Xfe=Uc();function XA(t,e){let r=t[0],n=r==="-"||r==="+"?t.substring(1):t,i=s=>e?BigInt(s):Number(s),o=n.replace(/_/g,"").split(":").reduce((s,a)=>s*i(60)+i(a),i(0));return r==="-"?i(-1)*o:o}function G4(t){let{value:e}=t,r=s=>s;if(typeof e=="bigint")r=s=>BigInt(s);else if(isNaN(e)||!isFinite(e))return Xfe.stringifyNumber(t);let n="";e<0&&(n="-",e*=r(-1));let i=r(60),o=[e%i];return e<60?o.unshift(0):(e=(e-o[0])/i,o.unshift(e%i),e>=60&&(e=(e-o[0])/i,o.unshift(e))),n+o.map(s=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Qfe={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:r})=>XA(t,r),stringify:G4},epe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>XA(t,!1),stringify:G4},Z4={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(Z4.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,i,o,s,a]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,l=Date.UTC(r,n-1,i,o||0,s||0,a||0,c),u=e[8];if(u&&u!=="Z"){let d=XA(u,!1);Math.abs(d)<30&&(d*=60),l-=6e4*d}return new Date(l)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Ry.floatTime=epe;Ry.intTime=Qfe;Ry.timestamp=Z4});var K4=v(W4=>{"use strict";var tpe=Lc(),rpe=yy(),npe=zc(),ipe=Qd(),ope=qA(),V4=U4(),eT=q4(),Iy=H4(),spe=ly(),ape=ZA(),cpe=$y(),lpe=YA(),tT=QA(),upe=[tpe.map,npe.seq,ipe.string,rpe.nullTag,V4.trueTag,V4.falseTag,Iy.intBin,Iy.intOct,Iy.int,Iy.intHex,eT.floatNaN,eT.floatExp,eT.float,ope.binary,spe.merge,ape.omap,cpe.pairs,lpe.set,tT.intTime,tT.floatTime,tT.timestamp];W4.schema=upe});var o6=v(iT=>{"use strict";var Q4=Lc(),dpe=yy(),e6=zc(),fpe=Qd(),ppe=DA(),rT=jA(),nT=FA(),mpe=T4(),hpe=I4(),t6=qA(),of=ly(),r6=ZA(),n6=$y(),J4=K4(),i6=YA(),Py=QA(),Y4=new Map([["core",mpe.schema],["failsafe",[Q4.map,e6.seq,fpe.string]],["json",hpe.schema],["yaml11",J4.schema],["yaml-1.1",J4.schema]]),X4={binary:t6.binary,bool:ppe.boolTag,float:rT.float,floatExp:rT.floatExp,floatNaN:rT.floatNaN,floatTime:Py.floatTime,int:nT.int,intHex:nT.intHex,intOct:nT.intOct,intTime:Py.intTime,map:Q4.map,merge:of.merge,null:dpe.nullTag,omap:r6.omap,pairs:n6.pairs,seq:e6.seq,set:i6.set,timestamp:Py.timestamp},gpe={"tag:yaml.org,2002:binary":t6.binary,"tag:yaml.org,2002:merge":of.merge,"tag:yaml.org,2002:omap":r6.omap,"tag:yaml.org,2002:pairs":n6.pairs,"tag:yaml.org,2002:set":i6.set,"tag:yaml.org,2002:timestamp":Py.timestamp};function ype(t,e,r){let n=Y4.get(e);if(n&&!t)return r&&!n.includes(of.merge)?n.concat(of.merge):n.slice();let i=n;if(!i)if(Array.isArray(t))i=[];else{let o=Array.from(Y4.keys()).filter(s=>s!=="yaml11").map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(t))for(let o of t)i=i.concat(o);else typeof t=="function"&&(i=t(i.slice()));return r&&(i=i.concat(of.merge)),i.reduce((o,s)=>{let a=typeof s=="string"?X4[s]:s;if(!a){let c=JSON.stringify(s),l=Object.keys(X4).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return o.includes(a)||o.push(a),o},[])}iT.coreKnownTags=gpe;iT.getTags=ype});var aT=v(s6=>{"use strict";var oT=Ce(),_pe=Lc(),bpe=zc(),vpe=Qd(),Cy=o6(),Spe=(t,e)=>t.keye.key?1:0,sT=class t{constructor({compat:e,customTags:r,merge:n,resolveKnownTags:i,schema:o,sortMapEntries:s,toStringDefaults:a}){this.compat=Array.isArray(e)?Cy.getTags(e,"compat"):e?Cy.getTags(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=i?Cy.coreKnownTags:{},this.tags=Cy.getTags(r,this.name,n),this.toStringOptions=a??null,Object.defineProperty(this,oT.MAP,{value:_pe.map}),Object.defineProperty(this,oT.SCALAR,{value:vpe.string}),Object.defineProperty(this,oT.SEQ,{value:bpe.seq}),this.sortMapEntries=typeof s=="function"?s:s===!0?Spe:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};s6.Schema=sT});var c6=v(a6=>{"use strict";var wpe=Ce(),cT=Jd(),sf=Zd();function xpe(t,e){let r=[],n=e.directives===!0;if(e.directives!==!1&&t.directives){let c=t.directives.toString(t);c?(r.push(c),n=!0):t.directives.docStart&&(n=!0)}n&&r.push("---");let i=cT.createStringifyContext(t,e),{commentString:o}=i.options;if(t.commentBefore){r.length!==1&&r.unshift("");let c=o(t.commentBefore);r.unshift(sf.indentComment(c,""))}let s=!1,a=null;if(t.contents){if(wpe.isNode(t.contents)){if(t.contents.spaceBefore&&n&&r.push(""),t.contents.commentBefore){let u=o(t.contents.commentBefore);r.push(sf.indentComment(u,""))}i.forceBlockIndent=!!t.comment,a=t.contents.comment}let c=a?void 0:()=>s=!0,l=cT.stringify(t.contents,i,()=>a=null,c);a&&(l+=sf.lineComment(l,"",o(a))),(l[0]==="|"||l[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${l}`:r.push(l)}else r.push(cT.stringify(t.contents,i));if(t.directives?.docEnd)if(t.comment){let c=o(t.comment);c.includes(`
-`)?(r.push("..."),r.push(sf.indentComment(c,""))):r.push(`... ${c}`)}else r.push("...");else{let c=t.comment;c&&s&&(c=c.replace(/^\n+/,"")),c&&((!s||a)&&r[r.length-1]!==""&&r.push(""),r.push(sf.indentComment(o(c),"")))}return r.join(`
+${o.comment}`:n.comment}n=i}t.items[r]=Yy.isPair(n)?n:new xT.Pair(n)}}else e("Expected a sequence for this tag");return t}function k6(t,e,r){let{replacer:n}=r,i=new Gpe.YAMLSeq(t);i.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let s of e){typeof n=="function"&&(s=n.call(e,String(o++),s));let a,c;if(Array.isArray(s))if(s.length===2)a=s[0],c=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let l=Object.keys(s);if(l.length===1)a=l[0],c=s[a];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else a=s;i.items.push(xT.createPair(a,c,r))}return i}var Zpe={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:$6,createNode:k6};Xy.createPairs=k6;Xy.pairs=Zpe;Xy.resolvePairs=$6});var ET=v(kT=>{"use strict";var E6=De(),$T=Zo(),bf=Xo(),Vpe=Qo(),A6=Qy(),pa=class t extends Vpe.YAMLSeq{constructor(){super(),this.add=bf.YAMLMap.prototype.add.bind(this),this.delete=bf.YAMLMap.prototype.delete.bind(this),this.get=bf.YAMLMap.prototype.get.bind(this),this.has=bf.YAMLMap.prototype.has.bind(this),this.set=bf.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let n=new Map;r?.onCreate&&r.onCreate(n);for(let i of this.items){let o,s;if(E6.isPair(i)?(o=$T.toJS(i.key,"",r),s=$T.toJS(i.value,o,r)):o=$T.toJS(i,"",r),n.has(o))throw new Error("Ordered maps must not include duplicate keys");n.set(o,s)}return n}static from(e,r,n){let i=A6.createPairs(e,r,n),o=new this;return o.items=i.items,o}};pa.tag="tag:yaml.org,2002:omap";var Wpe={collection:"seq",identify:t=>t instanceof Map,nodeClass:pa,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=A6.resolvePairs(t,e),n=[];for(let{key:i}of r.items)E6.isScalar(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new pa,r)},createNode:(t,e,r)=>pa.from(t,e,r)};kT.YAMLOMap=pa;kT.omap=Wpe});var P6=v(AT=>{"use strict";var T6=Dt();function O6({value:t,source:e},r){return e&&(t?R6:I6).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}var R6={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new T6.Scalar(!0),stringify:O6},I6={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new T6.Scalar(!1),stringify:O6};AT.falseTag=I6;AT.trueTag=R6});var C6=v(e_=>{"use strict";var Kpe=Dt(),TT=rl(),Jpe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:TT.stringifyNumber},Ype={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():TT.stringifyNumber(t)}},Xpe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new Kpe.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let n=t.substring(r+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:TT.stringifyNumber};e_.float=Xpe;e_.floatExp=Ype;e_.floatNaN=Jpe});var N6=v(Sf=>{"use strict";var D6=rl(),vf=t=>typeof t=="bigint"||Number.isInteger(t);function t_(t,e,r,{intAsBigInt:n}){let i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),n){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let s=BigInt(t);return i==="-"?BigInt(-1)*s:s}let o=parseInt(t,r);return i==="-"?-1*o:o}function OT(t,e,r){let{value:n}=t;if(vf(n)){let i=n.toString(e);return n<0?"-"+r+i.substr(1):r+i}return D6.stringifyNumber(t)}var Qpe={identify:vf,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,r)=>t_(t,2,2,r),stringify:t=>OT(t,2,"0b")},eme={identify:vf,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,r)=>t_(t,1,8,r),stringify:t=>OT(t,8,"0")},tme={identify:vf,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,r)=>t_(t,0,10,r),stringify:D6.stringifyNumber},rme={identify:vf,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,r)=>t_(t,2,16,r),stringify:t=>OT(t,16,"0x")};Sf.int=tme;Sf.intBin=Qpe;Sf.intHex=rme;Sf.intOct=eme});var IT=v(RT=>{"use strict";var i_=De(),r_=Jo(),n_=Xo(),ma=class t extends n_.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let r;i_.isPair(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new r_.Pair(e.key,null):r=new r_.Pair(e,null),n_.findPair(this.items,r.key)||this.items.push(r)}get(e,r){let n=n_.findPair(this.items,e);return!r&&i_.isPair(n)?i_.isScalar(n.key)?n.key.value:n.key:n}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let n=n_.findPair(this.items,e);n&&!r?this.items.splice(this.items.indexOf(n),1):!n&&r&&this.items.push(new r_.Pair(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,n);throw new Error("Set items must all have null values")}static from(e,r,n){let{replacer:i}=n,o=new this(e);if(r&&Symbol.iterator in Object(r))for(let s of r)typeof i=="function"&&(s=i.call(r,s,s)),o.items.push(r_.createPair(s,null,n));return o}};ma.tag="tag:yaml.org,2002:set";var nme={collection:"map",identify:t=>t instanceof Set,nodeClass:ma,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,r)=>ma.from(t,e,r),resolve(t,e){if(i_.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new ma,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};RT.YAMLSet=ma;RT.set=nme});var CT=v(o_=>{"use strict";var ime=rl();function PT(t,e){let r=t[0],n=r==="-"||r==="+"?t.substring(1):t,i=s=>e?BigInt(s):Number(s),o=n.replace(/_/g,"").split(":").reduce((s,a)=>s*i(60)+i(a),i(0));return r==="-"?i(-1)*o:o}function j6(t){let{value:e}=t,r=s=>s;if(typeof e=="bigint")r=s=>BigInt(s);else if(isNaN(e)||!isFinite(e))return ime.stringifyNumber(t);let n="";e<0&&(n="-",e*=r(-1));let i=r(60),o=[e%i];return e<60?o.unshift(0):(e=(e-o[0])/i,o.unshift(e%i),e>=60&&(e=(e-o[0])/i,o.unshift(e))),n+o.map(s=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var ome={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:r})=>PT(t,r),stringify:j6},sme={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>PT(t,!1),stringify:j6},M6={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(M6.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,i,o,s,a]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,l=Date.UTC(r,n-1,i,o||0,s||0,a||0,c),u=e[8];if(u&&u!=="Z"){let d=PT(u,!1);Math.abs(d)<30&&(d*=60),l-=6e4*d}return new Date(l)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};o_.floatTime=sme;o_.intTime=ome;o_.timestamp=M6});var z6=v(L6=>{"use strict";var ame=el(),cme=Zy(),lme=tl(),ume=yf(),dme=wT(),F6=P6(),DT=C6(),s_=N6(),fme=Fy(),pme=ET(),mme=Qy(),hme=IT(),NT=CT(),gme=[ame.map,lme.seq,ume.string,cme.nullTag,F6.trueTag,F6.falseTag,s_.intBin,s_.intOct,s_.int,s_.intHex,DT.floatNaN,DT.floatExp,DT.float,dme.binary,fme.merge,pme.omap,mme.pairs,hme.set,NT.intTime,NT.floatTime,NT.timestamp];L6.schema=gme});var J6=v(FT=>{"use strict";var H6=el(),yme=Zy(),G6=tl(),_me=yf(),bme=mT(),jT=gT(),MT=_T(),vme=b6(),Sme=w6(),Z6=wT(),wf=Fy(),V6=ET(),W6=Qy(),U6=z6(),K6=IT(),a_=CT(),q6=new Map([["core",vme.schema],["failsafe",[H6.map,G6.seq,_me.string]],["json",Sme.schema],["yaml11",U6.schema],["yaml-1.1",U6.schema]]),B6={binary:Z6.binary,bool:bme.boolTag,float:jT.float,floatExp:jT.floatExp,floatNaN:jT.floatNaN,floatTime:a_.floatTime,int:MT.int,intHex:MT.intHex,intOct:MT.intOct,intTime:a_.intTime,map:H6.map,merge:wf.merge,null:yme.nullTag,omap:V6.omap,pairs:W6.pairs,seq:G6.seq,set:K6.set,timestamp:a_.timestamp},wme={"tag:yaml.org,2002:binary":Z6.binary,"tag:yaml.org,2002:merge":wf.merge,"tag:yaml.org,2002:omap":V6.omap,"tag:yaml.org,2002:pairs":W6.pairs,"tag:yaml.org,2002:set":K6.set,"tag:yaml.org,2002:timestamp":a_.timestamp};function xme(t,e,r){let n=q6.get(e);if(n&&!t)return r&&!n.includes(wf.merge)?n.concat(wf.merge):n.slice();let i=n;if(!i)if(Array.isArray(t))i=[];else{let o=Array.from(q6.keys()).filter(s=>s!=="yaml11").map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(t))for(let o of t)i=i.concat(o);else typeof t=="function"&&(i=t(i.slice()));return r&&(i=i.concat(wf.merge)),i.reduce((o,s)=>{let a=typeof s=="string"?B6[s]:s;if(!a){let c=JSON.stringify(s),l=Object.keys(B6).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return o.includes(a)||o.push(a),o},[])}FT.coreKnownTags=wme;FT.getTags=xme});var UT=v(Y6=>{"use strict";var LT=De(),$me=el(),kme=tl(),Eme=yf(),c_=J6(),Ame=(t,e)=>t.keye.key?1:0,zT=class t{constructor({compat:e,customTags:r,merge:n,resolveKnownTags:i,schema:o,sortMapEntries:s,toStringDefaults:a}){this.compat=Array.isArray(e)?c_.getTags(e,"compat"):e?c_.getTags(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=i?c_.coreKnownTags:{},this.tags=c_.getTags(r,this.name,n),this.toStringOptions=a??null,Object.defineProperty(this,LT.MAP,{value:$me.map}),Object.defineProperty(this,LT.SCALAR,{value:Eme.string}),Object.defineProperty(this,LT.SEQ,{value:kme.seq}),this.sortMapEntries=typeof s=="function"?s:s===!0?Ame:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};Y6.Schema=zT});var Q6=v(X6=>{"use strict";var Tme=De(),qT=mf(),xf=uf();function Ome(t,e){let r=[],n=e.directives===!0;if(e.directives!==!1&&t.directives){let c=t.directives.toString(t);c?(r.push(c),n=!0):t.directives.docStart&&(n=!0)}n&&r.push("---");let i=qT.createStringifyContext(t,e),{commentString:o}=i.options;if(t.commentBefore){r.length!==1&&r.unshift("");let c=o(t.commentBefore);r.unshift(xf.indentComment(c,""))}let s=!1,a=null;if(t.contents){if(Tme.isNode(t.contents)){if(t.contents.spaceBefore&&n&&r.push(""),t.contents.commentBefore){let u=o(t.contents.commentBefore);r.push(xf.indentComment(u,""))}i.forceBlockIndent=!!t.comment,a=t.contents.comment}let c=a?void 0:()=>s=!0,l=qT.stringify(t.contents,i,()=>a=null,c);a&&(l+=xf.lineComment(l,"",o(a))),(l[0]==="|"||l[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${l}`:r.push(l)}else r.push(qT.stringify(t.contents,i));if(t.directives?.docEnd)if(t.comment){let c=o(t.comment);c.includes(`
+`)?(r.push("..."),r.push(xf.indentComment(c,""))):r.push(`... ${c}`)}else r.push("...");else{let c=t.comment;c&&s&&(c=c.replace(/^\n+/,"")),c&&((!s||a)&&r[r.length-1]!==""&&r.push(""),r.push(xf.indentComment(o(c),"")))}return r.join(`
`)+`
-`}a6.stringifyDocument=xpe});var af=v(l6=>{"use strict";var $pe=Hd(),qc=Qg(),wn=Ce(),kpe=qo(),Epe=Fo(),Ape=aT(),Tpe=c6(),lT=Kg(),Ope=pA(),Rpe=Gd(),uT=fA(),dT=class t{constructor(e,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,wn.NODE_TYPE,{value:wn.DOC});let i=null;typeof r=="function"||Array.isArray(r)?i=r:n===void 0&&r&&(n=r,r=void 0);let o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=o;let{version:s}=o;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new uT.Directives({version:s}),this.setSchema(s,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(t.prototype,{[wn.NODE_TYPE]:{value:wn.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=wn.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Bc(this.contents)&&this.contents.add(e)}addIn(e,r){Bc(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let n=lT.anchorNames(this);e.anchor=!r||n.has(r)?lT.findNewAnchor(r||"a",n):r}return new $pe.Alias(e.anchor)}createNode(e,r,n){let i;if(typeof r=="function")e=r.call({"":e},"",e),i=r;else if(Array.isArray(r)){let g=_=>typeof _=="number"||_ instanceof String||_ instanceof Number,b=r.filter(g).map(String);b.length>0&&(r=r.concat(b)),i=r}else n===void 0&&r&&(n=r,r=void 0);let{aliasDuplicateObjects:o,anchorPrefix:s,flow:a,keepUndefined:c,onTagObj:l,tag:u}=n??{},{onAnchor:d,setAnchors:f,sourceObjects:p}=lT.createNodeAnchors(this,s||"a"),m={aliasDuplicateObjects:o??!0,keepUndefined:c??!1,onAnchor:d,onTagObj:l,replacer:i,schema:this.schema,sourceObjects:p},h=Rpe.createNode(e,u,m);return a&&wn.isCollection(h)&&(h.flow=!0),f(),h}createPair(e,r,n={}){let i=this.createNode(e,null,n),o=this.createNode(r,null,n);return new kpe.Pair(i,o)}delete(e){return Bc(this.contents)?this.contents.delete(e):!1}deleteIn(e){return qc.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):Bc(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return wn.isCollection(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return qc.isEmptyPath(e)?!r&&wn.isScalar(this.contents)?this.contents.value:this.contents:wn.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return wn.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return qc.isEmptyPath(e)?this.contents!==void 0:wn.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=qc.collectionFromPath(this.schema,[e],r):Bc(this.contents)&&this.contents.set(e,r)}setIn(e,r){qc.isEmptyPath(e)?this.contents=r:this.contents==null?this.contents=qc.collectionFromPath(this.schema,Array.from(e),r):Bc(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new uT.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new uT.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new Ape.Schema(Object.assign(n,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:n,maxAliasCount:i,onAnchor:o,reviver:s}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=Epe.toJS(this.contents,r??"",a);if(typeof o=="function")for(let{count:l,res:u}of a.anchors.values())o(u,l);return typeof s=="function"?Ope.applyReviver(s,{"":c},"",c):c}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return Tpe.stringifyDocument(this,e)}};function Bc(t){if(wn.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}l6.Document=dT});var uf=v(lf=>{"use strict";var cf=class extends Error{constructor(e,r,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=r}},fT=class extends cf{constructor(e,r,n){super("YAMLParseError",e,r,n)}},pT=class extends cf{constructor(e,r,n){super("YAMLWarning",e,r,n)}},Ipe=(t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(a=>e.linePos(a));let{line:n,col:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let o=i-1,s=t.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){let a=Math.min(o-39,s.length-79);s="\u2026"+s.substring(a),o-=a-1}if(s.length>80&&(s=s.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(s.substring(0,o))){let a=t.substring(e.lineStarts[n-2],e.lineStarts[n-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
+`}X6.stringifyDocument=Ome});var $f=v(eB=>{"use strict";var Rme=cf(),nl=Ty(),kn=De(),Ime=Jo(),Pme=Zo(),Cme=UT(),Dme=Q6(),BT=$y(),Nme=VA(),jme=lf(),HT=ZA(),GT=class t{constructor(e,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,kn.NODE_TYPE,{value:kn.DOC});let i=null;typeof r=="function"||Array.isArray(r)?i=r:n===void 0&&r&&(n=r,r=void 0);let o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=o;let{version:s}=o;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new HT.Directives({version:s}),this.setSchema(s,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(t.prototype,{[kn.NODE_TYPE]:{value:kn.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=kn.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){il(this.contents)&&this.contents.add(e)}addIn(e,r){il(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let n=BT.anchorNames(this);e.anchor=!r||n.has(r)?BT.findNewAnchor(r||"a",n):r}return new Rme.Alias(e.anchor)}createNode(e,r,n){let i;if(typeof r=="function")e=r.call({"":e},"",e),i=r;else if(Array.isArray(r)){let g=_=>typeof _=="number"||_ instanceof String||_ instanceof Number,b=r.filter(g).map(String);b.length>0&&(r=r.concat(b)),i=r}else n===void 0&&r&&(n=r,r=void 0);let{aliasDuplicateObjects:o,anchorPrefix:s,flow:a,keepUndefined:c,onTagObj:l,tag:u}=n??{},{onAnchor:d,setAnchors:f,sourceObjects:p}=BT.createNodeAnchors(this,s||"a"),m={aliasDuplicateObjects:o??!0,keepUndefined:c??!1,onAnchor:d,onTagObj:l,replacer:i,schema:this.schema,sourceObjects:p},h=jme.createNode(e,u,m);return a&&kn.isCollection(h)&&(h.flow=!0),f(),h}createPair(e,r,n={}){let i=this.createNode(e,null,n),o=this.createNode(r,null,n);return new Ime.Pair(i,o)}delete(e){return il(this.contents)?this.contents.delete(e):!1}deleteIn(e){return nl.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):il(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return kn.isCollection(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return nl.isEmptyPath(e)?!r&&kn.isScalar(this.contents)?this.contents.value:this.contents:kn.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return kn.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return nl.isEmptyPath(e)?this.contents!==void 0:kn.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=nl.collectionFromPath(this.schema,[e],r):il(this.contents)&&this.contents.set(e,r)}setIn(e,r){nl.isEmptyPath(e)?this.contents=r:this.contents==null?this.contents=nl.collectionFromPath(this.schema,Array.from(e),r):il(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new HT.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new HT.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new Cme.Schema(Object.assign(n,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:n,maxAliasCount:i,onAnchor:o,reviver:s}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=Pme.toJS(this.contents,r??"",a);if(typeof o=="function")for(let{count:l,res:u}of a.anchors.values())o(u,l);return typeof s=="function"?Nme.applyReviver(s,{"":c},"",c):c}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return Dme.stringifyDocument(this,e)}};function il(t){if(kn.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}eB.Document=GT});var Af=v(Ef=>{"use strict";var kf=class extends Error{constructor(e,r,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=r}},ZT=class extends kf{constructor(e,r,n){super("YAMLParseError",e,r,n)}},VT=class extends kf{constructor(e,r,n){super("YAMLWarning",e,r,n)}},Mme=(t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(a=>e.linePos(a));let{line:n,col:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let o=i-1,s=t.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){let a=Math.min(o-39,s.length-79);s="\u2026"+s.substring(a),o-=a-1}if(s.length>80&&(s=s.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(s.substring(0,o))){let a=t.substring(e.lineStarts[n-2],e.lineStarts[n-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
`),s=a+s}if(/[^ ]/.test(s)){let a=1,c=r.linePos[1];c?.line===n&&c.col>i&&(a=Math.max(1,Math.min(c.col-i,80-o)));let l=" ".repeat(o)+"^".repeat(a);r.message+=`:
${s}
${l}
-`}};lf.YAMLError=cf;lf.YAMLParseError=fT;lf.YAMLWarning=pT;lf.prettifyError=Ipe});var df=v(u6=>{"use strict";function Ppe(t,{flow:e,indicator:r,next:n,offset:i,onError:o,parentIndent:s,startOnNewline:a}){let c=!1,l=a,u=a,d="",f="",p=!1,m=!1,h=null,g=null,b=null,_=null,S=null,x=null,w=null;for(let E of t)switch(m&&(E.type!=="space"&&E.type!=="newline"&&E.type!=="comma"&&o(E.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),h&&(l&&E.type!=="comment"&&E.type!=="newline"&&o(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),E.type){case"space":!e&&(r!=="doc-start"||n?.type!=="flow-collection")&&E.source.includes(" ")&&(h=E),u=!0;break;case"comment":{u||o(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let C=E.source.substring(1)||" ";d?d+=f+C:d=C,f="",l=!1;break}case"newline":l?d?d+=E.source:(!x||r!=="seq-item-ind")&&(c=!0):f+=E.source,l=!0,p=!0,(g||b)&&(_=E),u=!0;break;case"anchor":g&&o(E,"MULTIPLE_ANCHORS","A node can have at most one anchor"),E.source.endsWith(":")&&o(E.offset+E.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=E,w??(w=E.offset),l=!1,u=!1,m=!0;break;case"tag":{b&&o(E,"MULTIPLE_TAGS","A node can have at most one tag"),b=E,w??(w=E.offset),l=!1,u=!1,m=!0;break}case r:(g||b)&&o(E,"BAD_PROP_ORDER",`Anchors and tags must be after the ${E.source} indicator`),x&&o(E,"UNEXPECTED_TOKEN",`Unexpected ${E.source} in ${e??"collection"}`),x=E,l=r==="seq-item-ind"||r==="explicit-key-ind",u=!1;break;case"comma":if(e){S&&o(E,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),S=E,l=!1,u=!1;break}default:o(E,"UNEXPECTED_TOKEN",`Unexpected ${E.type} token`),l=!1,u=!1}let O=t[t.length-1],A=O?O.offset+O.source.length:i;return m&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&o(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(l&&h.indent<=s||n?.type==="block-map"||n?.type==="block-seq")&&o(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:S,found:x,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:b,newlineAfterProp:_,end:A,start:w??A}}u6.resolveProps=Ppe});var Dy=v(d6=>{"use strict";function mT(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
-`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(mT(e.key)||mT(e.value))return!0}return!1;default:return!0}}d6.containsNewline=mT});var hT=v(f6=>{"use strict";var Cpe=Dy();function Dpe(t,e,r){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===t&&(n.source==="]"||n.source==="}")&&Cpe.containsNewline(e)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}f6.flowIndentCheck=Dpe});var gT=v(m6=>{"use strict";var p6=Ce();function Npe(t,e,r){let{uniqueKeys:n}=t.options;if(n===!1)return!1;let i=typeof n=="function"?n:(o,s)=>o===s||p6.isScalar(o)&&p6.isScalar(s)&&o.value===s.value;return e.some(o=>i(o.key,r))}m6.mapIncludes=Npe});var v6=v(b6=>{"use strict";var h6=qo(),jpe=Ho(),g6=df(),Mpe=Dy(),y6=hT(),Fpe=gT(),_6="All mapping items must start at the same column";function Lpe({composeNode:t,composeEmptyNode:e},r,n,i,o){let s=o?.nodeClass??jpe.YAMLMap,a=new s(r.schema);r.atRoot&&(r.atRoot=!1);let c=n.offset,l=null;for(let u of n.items){let{start:d,key:f,sep:p,value:m}=u,h=g6.resolveProps(d,{indicator:"explicit-key-ind",next:f??p?.[0],offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0}),g=!h.found;if(g){if(f&&(f.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in f&&f.indent!==n.indent&&i(c,"BAD_INDENT",_6)),!h.anchor&&!h.tag&&!p){l=h.end,h.comment&&(a.comment?a.comment+=`
-`+h.comment:a.comment=h.comment);continue}(h.newlineAfterProp||Mpe.containsNewline(f))&&i(f??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==n.indent&&i(c,"BAD_INDENT",_6);r.atKey=!0;let b=h.end,_=f?t(r,f,h,i):e(r,b,d,null,h,i);r.schema.compat&&y6.flowIndentCheck(n.indent,f,i),r.atKey=!1,Fpe.mapIncludes(r,a.items,_)&&i(b,"DUPLICATE_KEY","Map keys must be unique");let S=g6.resolveProps(p??[],{indicator:"map-value-ind",next:m,offset:_.range[2],onError:i,parentIndent:n.indent,startOnNewline:!f||f.type==="block-scalar"});if(c=S.end,S.found){g&&(m?.type==="block-map"&&!S.hasNewline&&i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&h.start{"use strict";var zpe=Go(),Upe=df(),qpe=hT();function Bpe({composeNode:t,composeEmptyNode:e},r,n,i,o){let s=o?.nodeClass??zpe.YAMLSeq,a=new s(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=n.offset,l=null;for(let{start:u,value:d}of n.items){let f=Upe.resolveProps(u,{indicator:"seq-item-ind",next:d,offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||d)d?.type==="block-seq"?i(f.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{l=f.end,f.comment&&(a.comment=f.comment);continue}let p=d?t(r,d,f,i):e(r,f.end,u,null,f,i);r.schema.compat&&qpe.flowIndentCheck(n.indent,d,i),c=p.range[2],a.items.push(p)}return a.range=[n.offset,c,l??c],a}S6.resolveBlockSeq=Bpe});var Hc=v(x6=>{"use strict";function Hpe(t,e,r,n){let i="";if(t){let o=!1,s="";for(let a of t){let{source:c,type:l}=a;switch(l){case"space":o=!0;break;case"comment":{r&&!o&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=c.substring(1)||" ";i?i+=s+u:i=u,s="";break}case"newline":i&&(s+=c),o=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}e+=c.length}}return{comment:i,offset:e}}x6.resolveEnd=Hpe});var A6=v(E6=>{"use strict";var Gpe=Ce(),Zpe=qo(),$6=Ho(),Vpe=Go(),Wpe=Hc(),k6=df(),Kpe=Dy(),Jpe=gT(),yT="Block collections are not allowed within flow collections",_T=t=>t&&(t.type==="block-map"||t.type==="block-seq");function Ype({composeNode:t,composeEmptyNode:e},r,n,i,o){let s=n.start.source==="{",a=s?"flow map":"flow sequence",c=o?.nodeClass??(s?$6.YAMLMap:Vpe.YAMLSeq),l=new c(r.schema);l.flow=!0;let u=r.atRoot;u&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let d=n.offset+n.start.source.length;for(let g=0;g0){let g=Wpe.resolveEnd(m,h,r.options.strict,i);g.comment&&(l.comment?l.comment+=`
-`+g.comment:l.comment=g.comment),l.range=[n.offset,h,g.offset]}else l.range=[n.offset,h,h];return l}E6.resolveFlowCollection=Ype});var O6=v(T6=>{"use strict";var Xpe=Ce(),Qpe=It(),eme=Ho(),tme=Go(),rme=v6(),nme=w6(),ime=A6();function bT(t,e,r,n,i,o){let s=r.type==="block-map"?rme.resolveBlockMap(t,e,r,n,o):r.type==="block-seq"?nme.resolveBlockSeq(t,e,r,n,o):ime.resolveFlowCollection(t,e,r,n,o),a=s.constructor;return i==="!"||i===a.tagName?(s.tag=a.tagName,s):(i&&(s.tag=i),s)}function ome(t,e,r,n,i){let o=n.tag,s=o?e.directives.tagName(o.source,f=>i(o,"TAG_RESOLVE_FAILED",f)):null;if(r.type==="block-seq"){let{anchor:f,newlineAfterProp:p}=n,m=f&&o?f.offset>o.offset?f:o:f??o;m&&(!p||p.offsetf.tag===s&&f.collection===a);if(!c){let f=e.schema.knownTags[s];if(f?.collection===a)e.schema.tags.push(Object.assign({},f,{default:!1})),c=f;else return f?i(o,"BAD_COLLECTION_TYPE",`${f.tag} used for ${a} collection, but expects ${f.collection??"scalar"}`,!0):i(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),bT(t,e,r,i,s)}let l=bT(t,e,r,i,s,c),u=c.resolve?.(l,f=>i(o,"TAG_RESOLVE_FAILED",f),e.options)??l,d=Xpe.isNode(u)?u:new Qpe.Scalar(u);return d.range=l.range,d.tag=s,c?.format&&(d.format=c.format),d}T6.composeCollection=ome});var ST=v(R6=>{"use strict";var vT=It();function sme(t,e,r){let n=e.offset,i=ame(e,t.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let o=i.mode===">"?vT.Scalar.BLOCK_FOLDED:vT.Scalar.BLOCK_LITERAL,s=e.source?cme(e.source):[],a=s.length;for(let h=s.length-1;h>=0;--h){let g=s[h][1];if(g===""||g==="\r")a=h;else break}if(a===0){let h=i.chomp==="+"&&s.length>0?`
+`}};Ef.YAMLError=kf;Ef.YAMLParseError=ZT;Ef.YAMLWarning=VT;Ef.prettifyError=Mme});var Tf=v(tB=>{"use strict";function Fme(t,{flow:e,indicator:r,next:n,offset:i,onError:o,parentIndent:s,startOnNewline:a}){let c=!1,l=a,u=a,d="",f="",p=!1,m=!1,h=null,g=null,b=null,_=null,S=null,x=null,w=null;for(let A of t)switch(m&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&o(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),h&&(l&&A.type!=="comment"&&A.type!=="newline"&&o(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),A.type){case"space":!e&&(r!=="doc-start"||n?.type!=="flow-collection")&&A.source.includes(" ")&&(h=A),u=!0;break;case"comment":{u||o(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let D=A.source.substring(1)||" ";d?d+=f+D:d=D,f="",l=!1;break}case"newline":l?d?d+=A.source:(!x||r!=="seq-item-ind")&&(c=!0):f+=A.source,l=!0,p=!0,(g||b)&&(_=A),u=!0;break;case"anchor":g&&o(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&o(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=A,w??(w=A.offset),l=!1,u=!1,m=!0;break;case"tag":{b&&o(A,"MULTIPLE_TAGS","A node can have at most one tag"),b=A,w??(w=A.offset),l=!1,u=!1,m=!0;break}case r:(g||b)&&o(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),x&&o(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${e??"collection"}`),x=A,l=r==="seq-item-ind"||r==="explicit-key-ind",u=!1;break;case"comma":if(e){S&&o(A,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),S=A,l=!1,u=!1;break}default:o(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),l=!1,u=!1}let O=t[t.length-1],T=O?O.offset+O.source.length:i;return m&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&o(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(l&&h.indent<=s||n?.type==="block-map"||n?.type==="block-seq")&&o(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:S,found:x,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:b,newlineAfterProp:_,end:T,start:w??T}}tB.resolveProps=Fme});var l_=v(rB=>{"use strict";function WT(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
+`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(WT(e.key)||WT(e.value))return!0}return!1;default:return!0}}rB.containsNewline=WT});var KT=v(nB=>{"use strict";var Lme=l_();function zme(t,e,r){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===t&&(n.source==="]"||n.source==="}")&&Lme.containsNewline(e)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}nB.flowIndentCheck=zme});var JT=v(oB=>{"use strict";var iB=De();function Ume(t,e,r){let{uniqueKeys:n}=t.options;if(n===!1)return!1;let i=typeof n=="function"?n:(o,s)=>o===s||iB.isScalar(o)&&iB.isScalar(s)&&o.value===s.value;return e.some(o=>i(o.key,r))}oB.mapIncludes=Ume});var dB=v(uB=>{"use strict";var sB=Jo(),qme=Xo(),aB=Tf(),Bme=l_(),cB=KT(),Hme=JT(),lB="All mapping items must start at the same column";function Gme({composeNode:t,composeEmptyNode:e},r,n,i,o){let s=o?.nodeClass??qme.YAMLMap,a=new s(r.schema);r.atRoot&&(r.atRoot=!1);let c=n.offset,l=null;for(let u of n.items){let{start:d,key:f,sep:p,value:m}=u,h=aB.resolveProps(d,{indicator:"explicit-key-ind",next:f??p?.[0],offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0}),g=!h.found;if(g){if(f&&(f.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in f&&f.indent!==n.indent&&i(c,"BAD_INDENT",lB)),!h.anchor&&!h.tag&&!p){l=h.end,h.comment&&(a.comment?a.comment+=`
+`+h.comment:a.comment=h.comment);continue}(h.newlineAfterProp||Bme.containsNewline(f))&&i(f??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==n.indent&&i(c,"BAD_INDENT",lB);r.atKey=!0;let b=h.end,_=f?t(r,f,h,i):e(r,b,d,null,h,i);r.schema.compat&&cB.flowIndentCheck(n.indent,f,i),r.atKey=!1,Hme.mapIncludes(r,a.items,_)&&i(b,"DUPLICATE_KEY","Map keys must be unique");let S=aB.resolveProps(p??[],{indicator:"map-value-ind",next:m,offset:_.range[2],onError:i,parentIndent:n.indent,startOnNewline:!f||f.type==="block-scalar"});if(c=S.end,S.found){g&&(m?.type==="block-map"&&!S.hasNewline&&i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&h.start{"use strict";var Zme=Qo(),Vme=Tf(),Wme=KT();function Kme({composeNode:t,composeEmptyNode:e},r,n,i,o){let s=o?.nodeClass??Zme.YAMLSeq,a=new s(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=n.offset,l=null;for(let{start:u,value:d}of n.items){let f=Vme.resolveProps(u,{indicator:"seq-item-ind",next:d,offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||d)d?.type==="block-seq"?i(f.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{l=f.end,f.comment&&(a.comment=f.comment);continue}let p=d?t(r,d,f,i):e(r,f.end,u,null,f,i);r.schema.compat&&Wme.flowIndentCheck(n.indent,d,i),c=p.range[2],a.items.push(p)}return a.range=[n.offset,c,l??c],a}fB.resolveBlockSeq=Kme});var ol=v(mB=>{"use strict";function Jme(t,e,r,n){let i="";if(t){let o=!1,s="";for(let a of t){let{source:c,type:l}=a;switch(l){case"space":o=!0;break;case"comment":{r&&!o&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=c.substring(1)||" ";i?i+=s+u:i=u,s="";break}case"newline":i&&(s+=c),o=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}e+=c.length}}return{comment:i,offset:e}}mB.resolveEnd=Jme});var _B=v(yB=>{"use strict";var Yme=De(),Xme=Jo(),hB=Xo(),Qme=Qo(),ehe=ol(),gB=Tf(),the=l_(),rhe=JT(),YT="Block collections are not allowed within flow collections",XT=t=>t&&(t.type==="block-map"||t.type==="block-seq");function nhe({composeNode:t,composeEmptyNode:e},r,n,i,o){let s=n.start.source==="{",a=s?"flow map":"flow sequence",c=o?.nodeClass??(s?hB.YAMLMap:Qme.YAMLSeq),l=new c(r.schema);l.flow=!0;let u=r.atRoot;u&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let d=n.offset+n.start.source.length;for(let g=0;g0){let g=ehe.resolveEnd(m,h,r.options.strict,i);g.comment&&(l.comment?l.comment+=`
+`+g.comment:l.comment=g.comment),l.range=[n.offset,h,g.offset]}else l.range=[n.offset,h,h];return l}yB.resolveFlowCollection=nhe});var vB=v(bB=>{"use strict";var ihe=De(),ohe=Dt(),she=Xo(),ahe=Qo(),che=dB(),lhe=pB(),uhe=_B();function QT(t,e,r,n,i,o){let s=r.type==="block-map"?che.resolveBlockMap(t,e,r,n,o):r.type==="block-seq"?lhe.resolveBlockSeq(t,e,r,n,o):uhe.resolveFlowCollection(t,e,r,n,o),a=s.constructor;return i==="!"||i===a.tagName?(s.tag=a.tagName,s):(i&&(s.tag=i),s)}function dhe(t,e,r,n,i){let o=n.tag,s=o?e.directives.tagName(o.source,f=>i(o,"TAG_RESOLVE_FAILED",f)):null;if(r.type==="block-seq"){let{anchor:f,newlineAfterProp:p}=n,m=f&&o?f.offset>o.offset?f:o:f??o;m&&(!p||p.offsetf.tag===s&&f.collection===a);if(!c){let f=e.schema.knownTags[s];if(f?.collection===a)e.schema.tags.push(Object.assign({},f,{default:!1})),c=f;else return f?i(o,"BAD_COLLECTION_TYPE",`${f.tag} used for ${a} collection, but expects ${f.collection??"scalar"}`,!0):i(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),QT(t,e,r,i,s)}let l=QT(t,e,r,i,s,c),u=c.resolve?.(l,f=>i(o,"TAG_RESOLVE_FAILED",f),e.options)??l,d=ihe.isNode(u)?u:new ohe.Scalar(u);return d.range=l.range,d.tag=s,c?.format&&(d.format=c.format),d}bB.composeCollection=dhe});var tO=v(SB=>{"use strict";var eO=Dt();function fhe(t,e,r){let n=e.offset,i=phe(e,t.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let o=i.mode===">"?eO.Scalar.BLOCK_FOLDED:eO.Scalar.BLOCK_LITERAL,s=e.source?mhe(e.source):[],a=s.length;for(let h=s.length-1;h>=0;--h){let g=s[h][1];if(g===""||g==="\r")a=h;else break}if(a===0){let h=i.chomp==="+"&&s.length>0?`
`.repeat(Math.max(1,s.length-1)):"",g=n+i.length;return e.source&&(g+=e.source.length),{value:h,type:o,comment:i.comment,range:[n,g,g]}}let c=e.indent+i.indent,l=e.offset+i.length,u=0;for(let h=0;hc&&(c=g.length);else{g.length=a;--h)s[h][0].length>c&&(a=h+1);let d="",f="",p=!1;for(let h=0;hc||b[0]===" "?(f===" "?f=`
`:!p&&f===`
`&&(f=`
@@ -112,91 +112,91 @@ ${l}
`+s[h][0].slice(c);d[d.length-1]!==`
`&&(d+=`
`);break;default:d+=`
-`}let m=n+i.length+e.source.length;return{value:d,type:o,comment:i.comment,range:[n,m,m]}}function ame({offset:t,props:e},r,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],o=i[0],s=0,a="",c=-1;for(let f=1;f{"use strict";var wT=It(),lme=Hc();function ume(t,e,r){let{offset:n,type:i,source:o,end:s}=t,a,c,l=(f,p,m)=>r(n+f,p,m);switch(i){case"scalar":a=wT.Scalar.PLAIN,c=dme(o,l);break;case"single-quoted-scalar":a=wT.Scalar.QUOTE_SINGLE,c=fme(o,l);break;case"double-quoted-scalar":a=wT.Scalar.QUOTE_DOUBLE,c=pme(o,l);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+o.length,n+o.length]}}let u=n+o.length,d=lme.resolveEnd(s,u,e,r);return{value:c,type:a,comment:d.comment,range:[n,u,d.offset]}}function dme(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),I6(t)}function fme(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),I6(t.slice(1,-1)).replace(/''/g,"'")}function I6(t){let e,r;try{e=new RegExp(`(.*?)(?{"use strict";var rO=Dt(),hhe=ol();function ghe(t,e,r){let{offset:n,type:i,source:o,end:s}=t,a,c,l=(f,p,m)=>r(n+f,p,m);switch(i){case"scalar":a=rO.Scalar.PLAIN,c=yhe(o,l);break;case"single-quoted-scalar":a=rO.Scalar.QUOTE_SINGLE,c=_he(o,l);break;case"double-quoted-scalar":a=rO.Scalar.QUOTE_DOUBLE,c=bhe(o,l);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+o.length,n+o.length]}}let u=n+o.length,d=hhe.resolveEnd(s,u,e,r);return{value:c,type:a,comment:d.comment,range:[n,u,d.offset]}}function yhe(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),wB(t)}function _he(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),wB(t.slice(1,-1)).replace(/''/g,"'")}function wB(t){let e,r;try{e=new RegExp(`(.*?)(?o?t.slice(o,n+1):i)}else r+=i}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}function mme(t,e){let r="",n=t[e+1];for(;(n===" "||n===" "||n===`
+`)&&(r+=n>o?t.slice(o,n+1):i)}else r+=i}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}function vhe(t,e){let r="",n=t[e+1];for(;(n===" "||n===" "||n===`
`||n==="\r")&&!(n==="\r"&&t[e+2]!==`
`);)n===`
`&&(r+=`
-`),e+=1,n=t[e+1];return r||(r=" "),{fold:r,offset:e}}var hme={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
-`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function gme(t,e,r,n){let i=t.substr(e,r),s=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(s)}catch{let a=t.substr(e-2,r+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}P6.resolveFlowScalar=ume});var N6=v(D6=>{"use strict";var oa=Ce(),C6=It(),yme=ST(),_me=xT();function bme(t,e,r,n){let{value:i,type:o,comment:s,range:a}=e.type==="block-scalar"?yme.resolveBlockScalar(t,e,n):_me.resolveFlowScalar(e,t.options.strict,n),c=r?t.directives.tagName(r.source,d=>n(r,"TAG_RESOLVE_FAILED",d)):null,l;t.options.stringKeys&&t.atKey?l=t.schema[oa.SCALAR]:c?l=vme(t.schema,i,c,r,n):e.type==="scalar"?l=Sme(t,i,e,n):l=t.schema[oa.SCALAR];let u;try{let d=l.resolve(i,f=>n(r??e,"TAG_RESOLVE_FAILED",f),t.options);u=oa.isScalar(d)?d:new C6.Scalar(d)}catch(d){let f=d instanceof Error?d.message:String(d);n(r??e,"TAG_RESOLVE_FAILED",f),u=new C6.Scalar(i)}return u.range=a,u.source=i,o&&(u.type=o),c&&(u.tag=c),l.format&&(u.format=l.format),s&&(u.comment=s),u}function vme(t,e,r,n,i){if(r==="!")return t[oa.SCALAR];let o=[];for(let a of t.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)o.push(a);else return a;for(let a of o)if(a.test?.test(e))return a;let s=t.knownTags[r];return s&&!s.collection?(t.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[oa.SCALAR])}function Sme({atKey:t,directives:e,schema:r},n,i,o){let s=r.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(n))||r[oa.SCALAR];if(r.compat){let a=r.compat.find(c=>c.default&&c.test?.test(n))??r[oa.SCALAR];if(s.tag!==a.tag){let c=e.tagString(s.tag),l=e.tagString(a.tag),u=`Value may be parsed as either ${c} or ${l}`;o(i,"TAG_RESOLVE_FAILED",u,!0)}}return s}D6.composeScalar=bme});var M6=v(j6=>{"use strict";function wme(t,e,r){if(e){r??(r=e.length);for(let n=r-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++n];i?.type==="space";)t+=i.source.length,i=e[++n];break}}return t}j6.emptyScalarPosition=wme});var z6=v(kT=>{"use strict";var xme=Hd(),$me=Ce(),kme=O6(),F6=N6(),Eme=Hc(),Ame=M6(),Tme={composeNode:L6,composeEmptyNode:$T};function L6(t,e,r,n){let i=t.atKey,{spaceBefore:o,comment:s,anchor:a,tag:c}=r,l,u=!0;switch(e.type){case"alias":l=Ome(t,e,n),(a||c)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=F6.composeScalar(t,e,c,n),a&&(l.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=kme.composeCollection(Tme,t,e,r,n),a&&(l.anchor=a.source.substring(1))}catch(d){let f=d instanceof Error?d.message:String(d);n(e,"RESOURCE_EXHAUSTION",f)}break;default:{let d=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",d),u=!1}}return l??(l=$T(t,e.offset,void 0,null,r,n)),a&&l.anchor===""&&n(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!$me.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&n(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(l.spaceBefore=!0),s&&(e.type==="scalar"&&e.source===""?l.comment=s:l.commentBefore=s),t.options.keepSourceTokens&&u&&(l.srcToken=e),l}function $T(t,e,r,n,{spaceBefore:i,comment:o,anchor:s,tag:a,end:c},l){let u={type:"scalar",offset:Ame.emptyScalarPosition(e,r,n),indent:-1,source:""},d=F6.composeScalar(t,u,a,l);return s&&(d.anchor=s.source.substring(1),d.anchor===""&&l(s,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),o&&(d.comment=o,d.range[2]=c),d}function Ome({options:t},{offset:e,source:r,end:n},i){let o=new xme.Alias(r.substring(1));o.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&i(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let s=e+r.length,a=Eme.resolveEnd(n,s,t.strict,i);return o.range=[e,s,a.offset],a.comment&&(o.comment=a.comment),o}kT.composeEmptyNode=$T;kT.composeNode=L6});var B6=v(q6=>{"use strict";var Rme=af(),U6=z6(),Ime=Hc(),Pme=df();function Cme(t,e,{offset:r,start:n,value:i,end:o},s){let a=Object.assign({_directives:e},t),c=new Rme.Document(void 0,a),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},u=Pme.resolveProps(n,{indicator:"doc-start",next:i??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});u.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!u.hasNewline&&s(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?U6.composeNode(l,i,u,s):U6.composeEmptyNode(l,u.end,n,null,u,s);let d=c.contents.range[2],f=Ime.resolveEnd(o,d,!1,s);return f.comment&&(c.comment=f.comment),c.range=[r,d,f.offset],c}q6.composeDoc=Cme});var AT=v(Z6=>{"use strict";var Dme=He("process"),Nme=fA(),jme=af(),ff=uf(),H6=Ce(),Mme=B6(),Fme=Hc();function pf(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}function G6(t){let e="",r=!1,n=!1;for(let i=0;i{"use strict";var ha=De(),$B=Dt(),xhe=tO(),$he=nO();function khe(t,e,r,n){let{value:i,type:o,comment:s,range:a}=e.type==="block-scalar"?xhe.resolveBlockScalar(t,e,n):$he.resolveFlowScalar(e,t.options.strict,n),c=r?t.directives.tagName(r.source,d=>n(r,"TAG_RESOLVE_FAILED",d)):null,l;t.options.stringKeys&&t.atKey?l=t.schema[ha.SCALAR]:c?l=Ehe(t.schema,i,c,r,n):e.type==="scalar"?l=Ahe(t,i,e,n):l=t.schema[ha.SCALAR];let u;try{let d=l.resolve(i,f=>n(r??e,"TAG_RESOLVE_FAILED",f),t.options);u=ha.isScalar(d)?d:new $B.Scalar(d)}catch(d){let f=d instanceof Error?d.message:String(d);n(r??e,"TAG_RESOLVE_FAILED",f),u=new $B.Scalar(i)}return u.range=a,u.source=i,o&&(u.type=o),c&&(u.tag=c),l.format&&(u.format=l.format),s&&(u.comment=s),u}function Ehe(t,e,r,n,i){if(r==="!")return t[ha.SCALAR];let o=[];for(let a of t.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)o.push(a);else return a;for(let a of o)if(a.test?.test(e))return a;let s=t.knownTags[r];return s&&!s.collection?(t.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[ha.SCALAR])}function Ahe({atKey:t,directives:e,schema:r},n,i,o){let s=r.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(n))||r[ha.SCALAR];if(r.compat){let a=r.compat.find(c=>c.default&&c.test?.test(n))??r[ha.SCALAR];if(s.tag!==a.tag){let c=e.tagString(s.tag),l=e.tagString(a.tag),u=`Value may be parsed as either ${c} or ${l}`;o(i,"TAG_RESOLVE_FAILED",u,!0)}}return s}kB.composeScalar=khe});var TB=v(AB=>{"use strict";function The(t,e,r){if(e){r??(r=e.length);for(let n=r-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++n];i?.type==="space";)t+=i.source.length,i=e[++n];break}}return t}AB.emptyScalarPosition=The});var IB=v(oO=>{"use strict";var Ohe=cf(),Rhe=De(),Ihe=vB(),OB=EB(),Phe=ol(),Che=TB(),Dhe={composeNode:RB,composeEmptyNode:iO};function RB(t,e,r,n){let i=t.atKey,{spaceBefore:o,comment:s,anchor:a,tag:c}=r,l,u=!0;switch(e.type){case"alias":l=Nhe(t,e,n),(a||c)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=OB.composeScalar(t,e,c,n),a&&(l.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=Ihe.composeCollection(Dhe,t,e,r,n),a&&(l.anchor=a.source.substring(1))}catch(d){let f=d instanceof Error?d.message:String(d);n(e,"RESOURCE_EXHAUSTION",f)}break;default:{let d=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",d),u=!1}}return l??(l=iO(t,e.offset,void 0,null,r,n)),a&&l.anchor===""&&n(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!Rhe.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&n(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(l.spaceBefore=!0),s&&(e.type==="scalar"&&e.source===""?l.comment=s:l.commentBefore=s),t.options.keepSourceTokens&&u&&(l.srcToken=e),l}function iO(t,e,r,n,{spaceBefore:i,comment:o,anchor:s,tag:a,end:c},l){let u={type:"scalar",offset:Che.emptyScalarPosition(e,r,n),indent:-1,source:""},d=OB.composeScalar(t,u,a,l);return s&&(d.anchor=s.source.substring(1),d.anchor===""&&l(s,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),o&&(d.comment=o,d.range[2]=c),d}function Nhe({options:t},{offset:e,source:r,end:n},i){let o=new Ohe.Alias(r.substring(1));o.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&i(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let s=e+r.length,a=Phe.resolveEnd(n,s,t.strict,i);return o.range=[e,s,a.offset],a.comment&&(o.comment=a.comment),o}oO.composeEmptyNode=iO;oO.composeNode=RB});var DB=v(CB=>{"use strict";var jhe=$f(),PB=IB(),Mhe=ol(),Fhe=Tf();function Lhe(t,e,{offset:r,start:n,value:i,end:o},s){let a=Object.assign({_directives:e},t),c=new jhe.Document(void 0,a),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},u=Fhe.resolveProps(n,{indicator:"doc-start",next:i??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});u.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!u.hasNewline&&s(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?PB.composeNode(l,i,u,s):PB.composeEmptyNode(l,u.end,n,null,u,s);let d=c.contents.range[2],f=Mhe.resolveEnd(o,d,!1,s);return f.comment&&(c.comment=f.comment),c.range=[r,d,f.offset],c}CB.composeDoc=Lhe});var aO=v(MB=>{"use strict";var zhe=Ge("process"),Uhe=ZA(),qhe=$f(),Of=Af(),NB=De(),Bhe=DB(),Hhe=ol();function Rf(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}function jB(t){let e="",r=!1,n=!1;for(let i=0;i{let s=pf(r);o?this.warnings.push(new ff.YAMLWarning(s,n,i)):this.errors.push(new ff.YAMLParseError(s,n,i))},this.directives=new Nme.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:n,afterEmptyLine:i}=G6(this.prelude);if(n){let o=e.contents;if(r)e.comment=e.comment?`${e.comment}
-${n}`:n;else if(i||e.directives.docStart||!o)e.commentBefore=n;else if(H6.isCollection(o)&&!o.flow&&o.items.length>0){let s=o.items[0];H6.isPair(s)&&(s=s.key);let a=s.commentBefore;s.commentBefore=a?`${n}
+`)+(o.substring(1)||" "),r=!0,n=!1;break;case"%":t[i+1]?.[0]!=="#"&&(i+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:e,afterEmptyLine:n}}var sO=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,n,i,o)=>{let s=Rf(r);o?this.warnings.push(new Of.YAMLWarning(s,n,i)):this.errors.push(new Of.YAMLParseError(s,n,i))},this.directives=new Uhe.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:n,afterEmptyLine:i}=jB(this.prelude);if(n){let o=e.contents;if(r)e.comment=e.comment?`${e.comment}
+${n}`:n;else if(i||e.directives.docStart||!o)e.commentBefore=n;else if(NB.isCollection(o)&&!o.flow&&o.items.length>0){let s=o.items[0];NB.isPair(s)&&(s=s.key);let a=s.commentBefore;s.commentBefore=a?`${n}
${a}`:n}else{let s=o.commentBefore;o.commentBefore=s?`${n}
-${s}`:n}}if(r){for(let o=0;o{let o=pf(e);o[0]+=r,this.onError(o,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=Mme.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new ff.YAMLParseError(pf(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new ff.YAMLParseError(pf(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let r=Fme.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let n=this.doc.comment;this.doc.comment=n?`${n}
-${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new ff.YAMLParseError(pf(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),i=new jme.Document(void 0,n);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,r,r],this.decorate(i,!1),yield i}}};Z6.Composer=ET});var K6=v(Ny=>{"use strict";var Lme=ST(),zme=xT(),Ume=uf(),V6=Kd();function qme(t,e=!0,r){if(t){let n=(i,o,s)=>{let a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(r)r(a,o,s);else throw new Ume.YAMLParseError([a,a+1],o,s)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return zme.resolveFlowScalar(t,e,n);case"block-scalar":return Lme.resolveBlockScalar({options:{strict:e}},t,n)}}return null}function Bme(t,e){let{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:o=-1,type:s="PLAIN"}=e,a=V6.stringifyString({type:s,value:t},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:n,source:`
+${s}`:n}}if(r){for(let o=0;o{let o=Rf(e);o[0]+=r,this.onError(o,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=Bhe.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new Of.YAMLParseError(Rf(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new Of.YAMLParseError(Rf(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let r=Hhe.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let n=this.doc.comment;this.doc.comment=n?`${n}
+${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Of.YAMLParseError(Rf(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),i=new qhe.Document(void 0,n);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,r,r],this.decorate(i,!1),yield i}}};MB.Composer=sO});var zB=v(u_=>{"use strict";var Ghe=tO(),Zhe=nO(),Vhe=Af(),FB=pf();function Whe(t,e=!0,r){if(t){let n=(i,o,s)=>{let a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(r)r(a,o,s);else throw new Vhe.YAMLParseError([a,a+1],o,s)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Zhe.resolveFlowScalar(t,e,n);case"block-scalar":return Ghe.resolveBlockScalar({options:{strict:e}},t,n)}}return null}function Khe(t,e){let{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:o=-1,type:s="PLAIN"}=e,a=FB.stringifyString({type:s,value:t},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:n,source:`
`}];switch(a[0]){case"|":case">":{let l=a.indexOf(`
`),u=a.substring(0,l),d=a.substring(l+1)+`
-`,f=[{type:"block-scalar-header",offset:o,indent:n,source:u}];return W6(f,c)||f.push({type:"newline",offset:-1,indent:n,source:`
-`}),{type:"block-scalar",offset:o,indent:n,props:f,source:d}}case'"':return{type:"double-quoted-scalar",offset:o,indent:n,source:a,end:c};case"'":return{type:"single-quoted-scalar",offset:o,indent:n,source:a,end:c};default:return{type:"scalar",offset:o,indent:n,source:a,end:c}}}function Hme(t,e,r={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:o=!1,type:s}=r,a="indent"in t?t.indent:null;if(n&&typeof a=="number"&&(a+=2),!s)switch(t.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{let l=t.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s=l.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}let c=V6.stringifyString({type:s,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":Gme(t,c);break;case'"':TT(t,c,"double-quoted-scalar");break;case"'":TT(t,c,"single-quoted-scalar");break;default:TT(t,c,"scalar")}}function Gme(t,e){let r=e.indexOf(`
+`,f=[{type:"block-scalar-header",offset:o,indent:n,source:u}];return LB(f,c)||f.push({type:"newline",offset:-1,indent:n,source:`
+`}),{type:"block-scalar",offset:o,indent:n,props:f,source:d}}case'"':return{type:"double-quoted-scalar",offset:o,indent:n,source:a,end:c};case"'":return{type:"single-quoted-scalar",offset:o,indent:n,source:a,end:c};default:return{type:"scalar",offset:o,indent:n,source:a,end:c}}}function Jhe(t,e,r={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:o=!1,type:s}=r,a="indent"in t?t.indent:null;if(n&&typeof a=="number"&&(a+=2),!s)switch(t.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{let l=t.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s=l.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}let c=FB.stringifyString({type:s,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":Yhe(t,c);break;case'"':cO(t,c,"double-quoted-scalar");break;case"'":cO(t,c,"single-quoted-scalar");break;default:cO(t,c,"scalar")}}function Yhe(t,e){let r=e.indexOf(`
`),n=e.substring(0,r),i=e.substring(r+1)+`
-`;if(t.type==="block-scalar"){let o=t.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=n,t.source=i}else{let{offset:o}=t,s="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:o,indent:s,source:n}];W6(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:s,source:`
-`});for(let c of Object.keys(t))c!=="type"&&c!=="offset"&&delete t[c];Object.assign(t,{type:"block-scalar",indent:s,props:a,source:i})}}function W6(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}function TT(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let n=t.props.slice(1),i=e.length;t.props[0].type==="block-scalar-header"&&(i-=t.props[0].source.length);for(let o of n)o.offset+=i;delete t.props,Object.assign(t,{type:r,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
-`};delete t.items,Object.assign(t,{type:r,source:e,end:[i]});break}default:{let n="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(let o of Object.keys(t))o!=="type"&&o!=="offset"&&delete t[o];Object.assign(t,{type:r,indent:n,source:e,end:i})}}}Ny.createScalarToken=Bme;Ny.resolveAsScalar=qme;Ny.setScalarValue=Hme});var Y6=v(J6=>{"use strict";var Zme=t=>"type"in t?My(t):jy(t);function My(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=My(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=jy(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=jy(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=jy(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}function jy({start:t,key:e,sep:r,value:n}){let i="";for(let o of t)i+=o.source;if(e&&(i+=My(e)),r)for(let o of r)i+=o.source;return n&&(i+=My(n)),i}J6.stringify=Zme});var tB=v(eB=>{"use strict";var OT=Symbol("break visit"),Vme=Symbol("skip children"),X6=Symbol("remove item");function sa(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),Q6(Object.freeze([]),t,e)}sa.BREAK=OT;sa.SKIP=Vme;sa.REMOVE=X6;sa.itemAtPath=(t,e)=>{let r=t;for(let[n,i]of e){let o=r?.[n];if(o&&"items"in o)r=o.items[i];else return}return r};sa.parentCollection=(t,e)=>{let r=sa.itemAtPath(t,e.slice(0,-1)),n=e[e.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function Q6(t,e,r){let n=r(e,t);if(typeof n=="symbol")return n;for(let i of["key","value"]){let o=e[i];if(o&&"items"in o){for(let s=0;s{"use strict";var RT=K6(),Wme=Y6(),Kme=tB(),IT="\uFEFF",PT="",CT="",DT="",Jme=t=>!!t&&"items"in t,Yme=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function Xme(t){switch(t){case IT:return"";case PT:return"";case CT:return"";case DT:return"";default:return JSON.stringify(t)}}function Qme(t){switch(t){case IT:return"byte-order-mark";case PT:return"doc-mode";case CT:return"flow-error-end";case DT:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
+`;if(t.type==="block-scalar"){let o=t.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=n,t.source=i}else{let{offset:o}=t,s="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:o,indent:s,source:n}];LB(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:s,source:`
+`});for(let c of Object.keys(t))c!=="type"&&c!=="offset"&&delete t[c];Object.assign(t,{type:"block-scalar",indent:s,props:a,source:i})}}function LB(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}function cO(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let n=t.props.slice(1),i=e.length;t.props[0].type==="block-scalar-header"&&(i-=t.props[0].source.length);for(let o of n)o.offset+=i;delete t.props,Object.assign(t,{type:r,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
+`};delete t.items,Object.assign(t,{type:r,source:e,end:[i]});break}default:{let n="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(let o of Object.keys(t))o!=="type"&&o!=="offset"&&delete t[o];Object.assign(t,{type:r,indent:n,source:e,end:i})}}}u_.createScalarToken=Khe;u_.resolveAsScalar=Whe;u_.setScalarValue=Jhe});var qB=v(UB=>{"use strict";var Xhe=t=>"type"in t?f_(t):d_(t);function f_(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=f_(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=d_(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=d_(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=d_(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}function d_({start:t,key:e,sep:r,value:n}){let i="";for(let o of t)i+=o.source;if(e&&(i+=f_(e)),r)for(let o of r)i+=o.source;return n&&(i+=f_(n)),i}UB.stringify=Xhe});var ZB=v(GB=>{"use strict";var lO=Symbol("break visit"),Qhe=Symbol("skip children"),BB=Symbol("remove item");function ga(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),HB(Object.freeze([]),t,e)}ga.BREAK=lO;ga.SKIP=Qhe;ga.REMOVE=BB;ga.itemAtPath=(t,e)=>{let r=t;for(let[n,i]of e){let o=r?.[n];if(o&&"items"in o)r=o.items[i];else return}return r};ga.parentCollection=(t,e)=>{let r=ga.itemAtPath(t,e.slice(0,-1)),n=e[e.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function HB(t,e,r){let n=r(e,t);if(typeof n=="symbol")return n;for(let i of["key","value"]){let o=e[i];if(o&&"items"in o){for(let s=0;s{"use strict";var uO=zB(),ege=qB(),tge=ZB(),dO="\uFEFF",fO="",pO="",mO="",rge=t=>!!t&&"items"in t,nge=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function ige(t){switch(t){case dO:return"";case fO:return"";case pO:return"";case mO:return"";default:return JSON.stringify(t)}}function oge(t){switch(t){case dO:return"byte-order-mark";case fO:return"doc-mode";case pO:return"flow-error-end";case mO:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r
-`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}Cr.createScalarToken=RT.createScalarToken;Cr.resolveAsScalar=RT.resolveAsScalar;Cr.setScalarValue=RT.setScalarValue;Cr.stringify=Wme.stringify;Cr.visit=Kme.visit;Cr.BOM=IT;Cr.DOCUMENT=PT;Cr.FLOW_END=CT;Cr.SCALAR=DT;Cr.isCollection=Jme;Cr.isScalar=Yme;Cr.prettyToken=Xme;Cr.tokenType=Qme});var MT=v(nB=>{"use strict";var mf=Fy();function Gn(t){switch(t){case void 0:case" ":case`
-`:case"\r":case" ":return!0;default:return!1}}var rB=new Set("0123456789ABCDEFabcdef"),ehe=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ly=new Set(",[]{}"),the=new Set(` ,[]{}
-\r `),NT=t=>!t||the.has(t),jT=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";for(;n&&(r||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===`
+`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}Dr.createScalarToken=uO.createScalarToken;Dr.resolveAsScalar=uO.resolveAsScalar;Dr.setScalarValue=uO.setScalarValue;Dr.stringify=ege.stringify;Dr.visit=tge.visit;Dr.BOM=dO;Dr.DOCUMENT=fO;Dr.FLOW_END=pO;Dr.SCALAR=mO;Dr.isCollection=rge;Dr.isScalar=nge;Dr.prettyToken=ige;Dr.tokenType=oge});var yO=v(WB=>{"use strict";var If=p_();function Kn(t){switch(t){case void 0:case" ":case`
+`:case"\r":case" ":return!0;default:return!1}}var VB=new Set("0123456789ABCDEFabcdef"),sge=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),m_=new Set(",[]{}"),age=new Set(` ,[]{}
+\r `),hO=t=>!t||age.has(t),gO=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";for(;n&&(r||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===`
`?!0:r==="\r"?this.buffer[e+1]===`
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let r=this.buffer[e];if(this.indentNext>0){let n=0;for(;r===" ";)r=this.buffer[++n+e];if(r==="\r"){let i=this.buffer[n+e+1];if(i===`
`||!i&&!this.atEnd)return e+n+1}return r===`
-`||n>=this.indentNext||!r&&!this.atEnd?e+n:-1}if(r==="-"||r==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&Gn(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&ðis.indentValue&&!Gn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Gn(r)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(NT),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,n=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=n=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n=this.indentNext||!r&&!this.atEnd?e+n:-1}if(r==="-"||r==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&Kn(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&ðis.indentValue&&!Kn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Kn(r)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(hO),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,n=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=n=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>Gn(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,n;e:for(let o=this.pos;n=this.buffer[o];++o)switch(n){case" ":r+=1;break;case`
+`,o)}i!==-1&&(r=i-(n[i-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let r=this.buffer[++e];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>Kn(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,n;e:for(let o=this.pos;n=this.buffer[o];++o)switch(n){case" ":r+=1;break;case`
`:e=o,r=0;break;case"\r":{let s=this.buffer[o+1];if(!s&&!this.atEnd)return this.setNext("block-scalar");if(s===`
`)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let o=this.continueScalar(e+1);if(o===-1)break;e=this.buffer.indexOf(`
`,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
`;)n=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let o=e-1,s=this.buffer[o];s==="\r"&&(s=this.buffer[--o]);let a=o;for(;s===" ";)s=this.buffer[--o];if(s===`
-`&&o>=this.pos&&o+1+r>a)e=o;else break}while(!0);return yield mf.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,r=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let o=this.buffer[n+1];if(Gn(o)||e&&Ly.has(o))break;r=n}else if(Gn(i)){let o=this.buffer[n+1];if(i==="\r"&&(o===`
+`&&o>=this.pos&&o+1+r>a)e=o;else break}while(!0);return yield If.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,r=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let o=this.buffer[n+1];if(Kn(o)||e&&m_.has(o))break;r=n}else if(Kn(i)){let o=this.buffer[n+1];if(i==="\r"&&(o===`
`?(n+=1,i=`
-`,o=this.buffer[n+1]):r=n),o==="#"||e&&Ly.has(o))break;if(i===`
-`){let s=this.continueScalar(n+1);if(s===-1)break;n=Math.max(n,s-2)}}else{if(e&&Ly.has(i))break;r=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield mf.SCALAR,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(r&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(NT),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,n=this.charAt(1);if(Gn(n)||r&&Ly.has(n)){r?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!Gn(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(ehe.has(r))r=this.buffer[++e];else if(r==="%"&&rB.has(this.buffer[e+1])&&rB.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
+`,o=this.buffer[n+1]):r=n),o==="#"||e&&m_.has(o))break;if(i===`
+`){let s=this.continueScalar(n+1);if(s===-1)break;n=Math.max(n,s-2)}}else{if(e&&m_.has(i))break;r=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield If.SCALAR,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(r&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(hO),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,n=this.charAt(1);if(Kn(n)||r&&m_.has(n)){r?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!Kn(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(sge.has(r))r=this.buffer[++e];else if(r==="%"&&VB.has(this.buffer[e+1])&&VB.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
-`?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,n;do n=this.buffer[++r];while(n===" "||e&&n===" ");let i=r-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=r),i}*pushUntil(e){let r=this.pos,n=this.buffer[r];for(;!e(n);)n=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};nB.Lexer=jT});var LT=v(iB=>{"use strict";var FT=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,n=this.lineStarts.length;for(;r>1;this.lineStarts[o]{"use strict";var rhe=He("process"),oB=Fy(),nhe=MT();function Zo(t,e){for(let r=0;r=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function Uy(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let r=0;r0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let n=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in n?n.indent:0:r.type==="flow-collection"&&n.type==="document"&&(r.indent=0),r.type==="flow-collection"&&aB(r),n.type){case"document":n.value=r;break;case"block-scalar":n.props.push(r);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=r;else{Object.assign(i,{key:r,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:r}):i.value=r;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:r,sep:[]}):i.sep?i.value=r:Object.assign(i,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let i=r.items[r.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&sB(i.start)===-1&&(r.indent===0||i.start.every(o=>o.type!=="comment"||o.indent0&&(yield this.buffer.substr(this.pos,i),this.pos=r),i}*pushUntil(e){let r=this.pos,n=this.buffer[r];for(;!e(n);)n=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};WB.Lexer=gO});var bO=v(KB=>{"use strict";var _O=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,n=this.lineStarts.length;for(;r>1;this.lineStarts[o]{"use strict";var cge=Ge("process"),JB=p_(),lge=yO();function es(t,e){for(let r=0;r=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function g_(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let r=0;r0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let n=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in n?n.indent:0:r.type==="flow-collection"&&n.type==="document"&&(r.indent=0),r.type==="flow-collection"&&XB(r),n.type){case"document":n.value=r;break;case"block-scalar":n.props.push(r);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=r;else{Object.assign(i,{key:r,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:r}):i.value=r;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:r,sep:[]}):i.sep?i.value=r:Object.assign(i,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let i=r.items[r.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&YB(i.start)===-1&&(r.indent===0||i.start.every(o=>o.type!=="comment"||o.indent=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",o=[];if(i&&r.sep&&!r.value){let s=[];for(let a=0;ae.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(o=r.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":i||r.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):i||r.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Zo(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(cB(r.key)&&!Zo(r.sep,"newline")){let s=Gc(r.start),a=r.key,c=r.sep;c.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:a,sep:c}]})}else o.length>0?r.sep=r.sep.concat(o,this.sourceToken):r.sep.push(this.sourceToken);else if(Zo(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let s=Gc(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||i?e.items.push({start:o,key:null,sep:[this.sourceToken]}):Zo(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);i||r.value?(e.items.push({start:o,key:s,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(s):(Object.assign(r,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{let s=this.startBlockValue(e);if(s){if(s.type==="block-seq"){if(!r.explicitKey&&r.sep&&!Zo(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:o});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Uy(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||Zo(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!r||r.value?e.items.push({start:[],key:i,sep:[]}):r.sep?this.stack.push(i):Object.assign(r,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=zy(n),o=Gc(i);aB(e);let s=e.end.splice(1,e.end.length);s.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(`
+`,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){g_(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",o=[];if(i&&r.sep&&!r.value){let s=[];for(let a=0;ae.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(o=r.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":i||r.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):i||r.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(es(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(QB(r.key)&&!es(r.sep,"newline")){let s=sl(r.start),a=r.key,c=r.sep;c.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:a,sep:c}]})}else o.length>0?r.sep=r.sep.concat(o,this.sourceToken):r.sep.push(this.sourceToken);else if(es(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let s=sl(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||i?e.items.push({start:o,key:null,sep:[this.sourceToken]}):es(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);i||r.value?(e.items.push({start:o,key:s,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(s):(Object.assign(r,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{let s=this.startBlockValue(e);if(s){if(s.type==="block-seq"){if(!r.explicitKey&&r.sep&&!es(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:o});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){g_(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||es(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!r||r.value?e.items.push({start:[],key:i,sep:[]}):r.sep?this.stack.push(i):Object.assign(r,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=h_(n),o=sl(i);XB(e);let s=e.end.splice(1,e.end.length);s.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(`
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
-`,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=zy(e),n=Gc(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=zy(e),n=Gc(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};lB.Parser=zT});var mB=v(gf=>{"use strict";var uB=AT(),ihe=af(),hf=uf(),ohe=kA(),she=Ce(),ahe=LT(),dB=UT();function fB(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new ahe.LineCounter||null,prettyErrors:e}}function che(t,e={}){let{lineCounter:r,prettyErrors:n}=fB(e),i=new dB.Parser(r?.addNewLine),o=new uB.Composer(e),s=Array.from(o.compose(i.parse(t)));if(n&&r)for(let a of s)a.errors.forEach(hf.prettifyError(t,r)),a.warnings.forEach(hf.prettifyError(t,r));return s.length>0?s:Object.assign([],{empty:!0},o.streamInfo())}function pB(t,e={}){let{lineCounter:r,prettyErrors:n}=fB(e),i=new dB.Parser(r?.addNewLine),o=new uB.Composer(e),s=null;for(let a of o.compose(i.parse(t),!0,t.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new hf.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(s.errors.forEach(hf.prettifyError(t,r)),s.warnings.forEach(hf.prettifyError(t,r))),s}function lhe(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let i=pB(t,r);if(!i)return null;if(i.warnings.forEach(o=>ohe.warn(i.options.logLevel,o)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}function uhe(t,e,r){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){let{keepUndefined:i}=r??e??{};if(!i)return}return she.isDocument(t)&&!n?t.toString(r):new ihe.Document(t,n,r).toString(r)}gf.parse=lhe;gf.parseAllDocuments=che;gf.parseDocument=pB;gf.stringify=uhe});var cr=v(Ge=>{"use strict";var dhe=AT(),fhe=af(),phe=aT(),qT=uf(),mhe=Hd(),Vo=Ce(),hhe=qo(),ghe=It(),yhe=Ho(),_he=Go(),bhe=Fy(),vhe=MT(),She=LT(),whe=UT(),qy=mB(),hB=zd();Ge.Composer=dhe.Composer;Ge.Document=fhe.Document;Ge.Schema=phe.Schema;Ge.YAMLError=qT.YAMLError;Ge.YAMLParseError=qT.YAMLParseError;Ge.YAMLWarning=qT.YAMLWarning;Ge.Alias=mhe.Alias;Ge.isAlias=Vo.isAlias;Ge.isCollection=Vo.isCollection;Ge.isDocument=Vo.isDocument;Ge.isMap=Vo.isMap;Ge.isNode=Vo.isNode;Ge.isPair=Vo.isPair;Ge.isScalar=Vo.isScalar;Ge.isSeq=Vo.isSeq;Ge.Pair=hhe.Pair;Ge.Scalar=ghe.Scalar;Ge.YAMLMap=yhe.YAMLMap;Ge.YAMLSeq=_he.YAMLSeq;Ge.CST=bhe;Ge.Lexer=vhe.Lexer;Ge.LineCounter=She.LineCounter;Ge.Parser=whe.Parser;Ge.parse=qy.parse;Ge.parseAllDocuments=qy.parseAllDocuments;Ge.parseDocument=qy.parseDocument;Ge.stringify=qy.stringify;Ge.visit=hB.visit;Ge.visitAsync=hB.visitAsync});import{execFileSync as gB}from"node:child_process";import{existsSync as By}from"node:fs";import{join as Hy,resolve as xhe}from"node:path";function $he(t){try{let e=gB("git",["rev-parse","--git-dir"],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();return e?xhe(t,e):null}catch{return null}}function BT(t){let e=$he(t);if(!e)return null;try{if(By(Hy(e,"MERGE_HEAD")))return"merge";if(By(Hy(e,"CHERRY_PICK_HEAD")))return"cherry-pick";if(By(Hy(e,"rebase-merge"))||By(Hy(e,"rebase-apply")))return"rebase"}catch{return null}return null}function aa(t){return BT(t)!==null}function HT(t,e){try{let r=gB("git",["rev-parse","--verify","--quiet",`${e}^{commit}`],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();return r.length>0?r:null}catch{return null}}function Gy(t,e){return HT(t,e)!==null}var ca=y(()=>{"use strict"});import{execFileSync as khe}from"node:child_process";import{existsSync as Ehe,readFileSync as Ahe}from"node:fs";import{join as bB}from"node:path";function yf(t,e){return khe("git",[...e],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","pipe"]})}function Wo(t){try{let e=yf(t,["describe","--tags","--abbrev=0"]).trim();if(e.length>0)return e}catch{}throw new Error("changelog: no git tag found to anchor the default range \u2014 pass --since [ explicitly (e.g. clad changelog --since v1.0.0)")}function Ko(t,e){The(t,e);let r=yf(t,["rev-parse","HEAD"]).trim(),n=Ohe(t,e);return{groups:Rhe(t,n),head:r,inventory:{after:_B(Vy(t,"spec.yaml")),before:_B(GT(t,e,"spec.yaml"))},since:e,unsharded_commits:Dhe(t,e)}}function ZT(t){if(t.text&&t.text.trim().length>0)return t.text.trim();let e=t.action?.trim();if(!e)return null;let r=t.condition?.trim(),n=t.response?.trim(),i=r?`${r.charAt(0).toUpperCase()}${r.slice(1)}, the system shall ${e}`:`The system shall ${e}`;return n?`${i} \u2014 ${n}.`:`${i}.`}function The(t,e){let r=(e??"").trim();if(r.length===0)throw new Error("changelog: empty since ref \u2014 pass --since ");if(!Gy(t,r))throw new Error(`changelog: '${r}' does not resolve to a commit in this repository \u2014 pass --since that exists. An unknown ref is an error, never a silently empty changelog.`)}function Ohe(t,e){let r=yf(t,["diff","--name-status",`${e}..HEAD`,"--","spec/"]),n=[];for(let i of r.split(`
-`)){if(i.trim().length===0)continue;let o=i.split(" "),s=o[0]??"",a=o[1]??"",c=o.length>2?o[2]:a;if(!(!yB(c)&&!yB(a)))if(s.startsWith("A")){let l=Zy(Vy(t,c));if(!l)continue;l.status==="done"?n.push(Zc(l,"added-as-done")):l.status==="archived"&&n.push(Zc(l,"archived"))}else if(s.startsWith("D")){let l=Zy(GT(t,e,a));l&&n.push(Zc(l,"archived"))}else{let l=Zy(Vy(t,c));if(!l)continue;let d=Zy(GT(t,e,a))?.status;l.status==="done"&&d!=="done"?n.push(Zc(l,"flipped-to-done")):l.status==="done"&&d==="done"?n.push(Zc(l,"modified-while-done")):l.status==="archived"&&d!=="archived"&&n.push(Zc(l,"archived"))}}return n.sort((i,o)=>i.id.localeCompare(o.id)),n}function yB(t){return t.startsWith("spec/features/")&&(t.endsWith(".yaml")||t.endsWith(".yml"))}function Zc(t,e){return{acceptance:(t.acceptance_criteria??[]).map(n=>ZT(n)).filter(n=>n!==null),change:e,id:t.id,...t.slug?{slug:t.slug}:{},title:t.title}}function Zy(t){if(t===null)return null;let e;try{e=(0,Wy.parse)(t)}catch{return null}let r=e;return!r||typeof r.id!="string"||typeof r.status!="string"?null:{id:r.id,slug:typeof r.slug=="string"?r.slug:void 0,title:typeof r.title=="string"?r.title:r.id,status:r.status,acceptance_criteria:r.acceptance_criteria}}function Vy(t,e){let r=bB(t,e);if(!Ehe(r))return null;try{return Ahe(r,"utf8")}catch{return null}}function GT(t,e,r){try{return yf(t,["show",`${e}:${r}`])}catch{return null}}function Rhe(t,e){let r=Ihe(t).filter(s=>typeof s.id=="string"&&s.id.length>0).sort((s,a)=>s.id.localeCompare(a.id)),n=[],i=new Set;for(let s of r){let a=new Set(s.features??[]),c=e.filter(l=>a.has(l.id)&&!i.has(l.id));if(c.length!==0){for(let l of c)i.add(l.id);n.push({capability:s.id,features:c,title:s.title??s.id})}}let o=e.filter(s=>!i.has(s.id));return o.length>0&&n.push({capability:"uncategorized",features:o,title:"Uncategorized"}),n}function Ihe(t){let e=Vy(t,bB("spec","capabilities.yaml"));if(e===null)return[];try{let r=(0,Wy.parse)(e);return Array.isArray(r?.capabilities)?r.capabilities:[]}catch{return[]}}function _B(t){let e={};if(t!==null)try{let n=(0,Wy.parse)(t);n&&typeof n.inventory=="object"&&n.inventory!==null&&(e=n.inventory)}catch{}let r=n=>typeof e[n]=="number"?e[n]:0;return{capabilities:r("capabilities"),features:r("features"),scenarios:r("scenarios"),test_files:r("test_files")}}function Dhe(t,e){let r=yf(t,["log",`${e}..HEAD`,"--format=%h%x09%s","--","src/"]),n=[];for(let i of r.split(`
-`)){if(i.trim().length===0)continue;let o=i.indexOf(" ");if(o<0)continue;let s=i.slice(0,o),a=i.slice(o+1);Phe.test(a)&&(Che.test(a)||n.push({hash:s,subject:a}))}return n}var Wy,Phe,Che,Vc=y(()=>{"use strict";Wy=Et(cr(),1);ca();Phe=/^(feat|fix)(\([^)]*\))?!?:/,Che=/\bF-(\d{3,}|[a-f0-9]{6,})\b/});import{execFileSync as vB}from"node:child_process";import{appendFileSync as Nhe,existsSync as VT,mkdirSync as jhe,readFileSync as Mhe,renameSync as Fhe,statSync as Lhe}from"node:fs";import{userInfo as zhe}from"node:os";import{dirname as Uhe,join as KT}from"node:path";function JT(t){return KT(t,SB,qhe)}function Yr(t,e){let r=JT(t),n=Uhe(r);VT(n)||jhe(n,{recursive:!0});try{VT(r)&&Lhe(r).size>Bhe&&Fhe(r,KT(n,wB))}catch{}Nhe(r,`${JSON.stringify(e)}
-`,"utf8")}function WT(t){if(!VT(t))return[];let e=Mhe(t,"utf8").trim();return e.length===0?[]:e.split(`
-`).filter(r=>r.length>0).map(r=>JSON.parse(r))}function la(t){return WT(JT(t))}function Ky(t){return[...WT(KT(t,SB,wB)),...WT(JT(t))]}function Xr(t,e){return{id:`ev-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,timestamp:new Date().toISOString(),type:t,payload:e}}function Hhe(t){let e;try{e=vB("git",["config","user.name"],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()||void 0}catch{}if(!e)try{e=zhe().username}catch{e=void 0}return{author:"human",name:e,timestamp:new Date().toISOString()}}function Ghe(t){try{return vB("git",["rev-parse","HEAD"],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return}}function _f(t,e){try{let r=la(t);for(let n=r.length-1;n>=0;n--)if(r[n].type===e)return r[n]}catch{}return null}function lr(t,e,r){try{let n=Ghe(t),i=Hhe(t),o={...r,head:n,identity:i};if(e==="gate_run"){let s=_f(t,"gate_run");if(s&&s.payload.head===n&&s.payload.tier===r.tier&&s.payload.strict===r.strict&&s.payload.worst===r.worst)return}Yr(t,Xr(e,o))}catch{}}var SB,qhe,wB,Bhe,Dr=y(()=>{"use strict";SB=".cladding",qhe="events.log.jsonl",wB="events.log.1.jsonl",Bhe=5*1024*1024});import{execFileSync as Zhe}from"node:child_process";import{existsSync as xB,readdirSync as Vhe,readFileSync as Whe,statSync as $B}from"node:fs";import{createHash as Khe}from"node:crypto";import{join as YT}from"node:path";function ua(t){try{return Zhe("git",["rev-parse","HEAD"],{cwd:t,stdio:["ignore","pipe","ignore"]}).toString("utf8").trim()||null}catch{return null}}function XT(t){let e=[],r=YT(t,"spec.yaml");xB(r)&&$B(r).isFile()&&e.push(r);for(let i of["features","scenarios"]){let o=YT(t,"spec",i);if(!(!xB(o)||!$B(o).isDirectory()))for(let s of Vhe(o))s.endsWith(".yaml")&&e.push(YT(o,s))}e.sort();let n=Khe("sha256");for(let i of e){let o=i.slice(t.length+1);n.update(`${o}\0`),n.update(Whe(i)),n.update("\0")}return n.digest("hex")}function Jy(t,e){let r={featureId:e,gitHead:ua(t),specDigest:XT(t),timestamp:new Date().toISOString()};return Yr(t,Xr("feature_checkpoint",{feature:e,git_head:r.gitHead,spec_digest:r.specDigest})),r}function Yy(t,e){let r=la(t);for(let n=r.length-1;n>=0;n--){let i=r[n];if(i.type==="feature_checkpoint"&&i.payload.feature===e)return{featureId:e,gitHead:i.payload.git_head??null,specDigest:String(i.payload.spec_digest??""),timestamp:i.timestamp}}return null}function Xy(t,e,r,n){let i=Xr("feature_rolled_back",{feature:e,to_git_head:r.gitHead,to_spec_digest:r.specDigest,to_checkpoint_at:r.timestamp,reason:n??null});return Yr(t,i),i}var bf=y(()=>{"use strict";Dr()});import{readFileSync as Jhe,statSync as Yhe}from"node:fs";import{extname as Xhe,resolve as QT,sep as Qhe}from"node:path";function Qr(t){return Math.ceil(t.length/4)}function rge(t,e){let r=QT(e),n=QT(r,t);return n===r||n.startsWith(r+Qhe)}function EB(t,e,r,n){if(!rge(t,e))return{path:t,omitted:"unsafe-path"};if(!ege.has(Xhe(t).toLowerCase()))return{path:t,omitted:"unsupported"};let i,o;if(n){let l=n(t);if(l==null)return{path:t,omitted:"missing"};if(i=l,o=Buffer.byteLength(l,"utf8"),o>kB)return{path:t,omitted:"too-large",bytes:o}}else{let l=QT(e,t);try{o=Yhe(l).size}catch{return{path:t,omitted:"missing"}}if(o>kB)return{path:t,omitted:"too-large",bytes:o};try{i=Jhe(l,"utf8")}catch{return{path:t,omitted:"missing",bytes:o}}}if(i.includes(tge))return{path:t,omitted:"binary",bytes:o};let s=Math.max(0,Math.floor(r));if(i.length<=s)return{path:t,text:i,bytes:o};let a=`
+`,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=h_(e),n=sl(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=h_(e),n=sl(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};eH.Parser=vO});var oH=v(Cf=>{"use strict";var tH=aO(),uge=$f(),Pf=Af(),dge=oT(),fge=De(),pge=bO(),rH=SO();function nH(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new pge.LineCounter||null,prettyErrors:e}}function mge(t,e={}){let{lineCounter:r,prettyErrors:n}=nH(e),i=new rH.Parser(r?.addNewLine),o=new tH.Composer(e),s=Array.from(o.compose(i.parse(t)));if(n&&r)for(let a of s)a.errors.forEach(Pf.prettifyError(t,r)),a.warnings.forEach(Pf.prettifyError(t,r));return s.length>0?s:Object.assign([],{empty:!0},o.streamInfo())}function iH(t,e={}){let{lineCounter:r,prettyErrors:n}=nH(e),i=new rH.Parser(r?.addNewLine),o=new tH.Composer(e),s=null;for(let a of o.compose(i.parse(t),!0,t.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new Pf.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(s.errors.forEach(Pf.prettifyError(t,r)),s.warnings.forEach(Pf.prettifyError(t,r))),s}function hge(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let i=iH(t,r);if(!i)return null;if(i.warnings.forEach(o=>dge.warn(i.options.logLevel,o)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}function gge(t,e,r){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){let{keepUndefined:i}=r??e??{};if(!i)return}return fge.isDocument(t)&&!n?t.toString(r):new uge.Document(t,n,r).toString(r)}Cf.parse=hge;Cf.parseAllDocuments=mge;Cf.parseDocument=iH;Cf.stringify=gge});var Qt=v(Ze=>{"use strict";var yge=aO(),_ge=$f(),bge=UT(),wO=Af(),vge=cf(),ts=De(),Sge=Jo(),wge=Dt(),xge=Xo(),$ge=Qo(),kge=p_(),Ege=yO(),Age=bO(),Tge=SO(),y_=oH(),sH=nf();Ze.Composer=yge.Composer;Ze.Document=_ge.Document;Ze.Schema=bge.Schema;Ze.YAMLError=wO.YAMLError;Ze.YAMLParseError=wO.YAMLParseError;Ze.YAMLWarning=wO.YAMLWarning;Ze.Alias=vge.Alias;Ze.isAlias=ts.isAlias;Ze.isCollection=ts.isCollection;Ze.isDocument=ts.isDocument;Ze.isMap=ts.isMap;Ze.isNode=ts.isNode;Ze.isPair=ts.isPair;Ze.isScalar=ts.isScalar;Ze.isSeq=ts.isSeq;Ze.Pair=Sge.Pair;Ze.Scalar=wge.Scalar;Ze.YAMLMap=xge.YAMLMap;Ze.YAMLSeq=$ge.YAMLSeq;Ze.CST=kge;Ze.Lexer=Ege.Lexer;Ze.LineCounter=Age.LineCounter;Ze.Parser=Tge.Parser;Ze.parse=y_.parse;Ze.parseAllDocuments=y_.parseAllDocuments;Ze.parseDocument=y_.parseDocument;Ze.stringify=y_.stringify;Ze.visit=sH.visit;Ze.visitAsync=sH.visitAsync});import{execFileSync as aH}from"node:child_process";import{existsSync as __}from"node:fs";import{join as b_,resolve as Oge}from"node:path";function Rge(t){try{let e=aH("git",["rev-parse","--git-dir"],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();return e?Oge(t,e):null}catch{return null}}function xO(t){let e=Rge(t);if(!e)return null;try{if(__(b_(e,"MERGE_HEAD")))return"merge";if(__(b_(e,"CHERRY_PICK_HEAD")))return"cherry-pick";if(__(b_(e,"rebase-merge"))||__(b_(e,"rebase-apply")))return"rebase"}catch{return null}return null}function ya(t){return xO(t)!==null}function $O(t,e){try{let r=aH("git",["rev-parse","--verify","--quiet",`${e}^{commit}`],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();return r.length>0?r:null}catch{return null}}function v_(t,e){return $O(t,e)!==null}var _a=y(()=>{"use strict"});import{execFileSync as Ige}from"node:child_process";import{existsSync as Pge,readFileSync as Cge}from"node:fs";import{join as uH}from"node:path";function Df(t,e){return Ige("git",[...e],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","pipe"]})}function rs(t){try{let e=Df(t,["describe","--tags","--abbrev=0"]).trim();if(e.length>0)return e}catch{}throw new Error("changelog: no git tag found to anchor the default range \u2014 pass --since ][ explicitly (e.g. clad changelog --since v1.0.0)")}function ns(t,e){Dge(t,e);let r=Df(t,["rev-parse","HEAD"]).trim(),n=Nge(t,e);return{groups:jge(t,n),head:r,inventory:{after:lH(w_(t,"spec.yaml")),before:lH(kO(t,e,"spec.yaml"))},since:e,unsharded_commits:zge(t,e)}}function EO(t){if(t.text&&t.text.trim().length>0)return t.text.trim();let e=t.action?.trim();if(!e)return null;let r=t.condition?.trim(),n=t.response?.trim(),i=r?`${r.charAt(0).toUpperCase()}${r.slice(1)}, the system shall ${e}`:`The system shall ${e}`;return n?`${i} \u2014 ${n}.`:`${i}.`}function Dge(t,e){let r=(e??"").trim();if(r.length===0)throw new Error("changelog: empty since ref \u2014 pass --since ");if(!v_(t,r))throw new Error(`changelog: '${r}' does not resolve to a commit in this repository \u2014 pass --since that exists. An unknown ref is an error, never a silently empty changelog.`)}function Nge(t,e){let r=Df(t,["diff","--name-status",`${e}..HEAD`,"--","spec/"]),n=[];for(let i of r.split(`
+`)){if(i.trim().length===0)continue;let o=i.split(" "),s=o[0]??"",a=o[1]??"",c=o.length>2?o[2]:a;if(!(!cH(c)&&!cH(a)))if(s.startsWith("A")){let l=S_(w_(t,c));if(!l)continue;l.status==="done"?n.push(al(l,"added-as-done")):l.status==="archived"&&n.push(al(l,"archived"))}else if(s.startsWith("D")){let l=S_(kO(t,e,a));l&&n.push(al(l,"archived"))}else{let l=S_(w_(t,c));if(!l)continue;let d=S_(kO(t,e,a))?.status;l.status==="done"&&d!=="done"?n.push(al(l,"flipped-to-done")):l.status==="done"&&d==="done"?n.push(al(l,"modified-while-done")):l.status==="archived"&&d!=="archived"&&n.push(al(l,"archived"))}}return n.sort((i,o)=>i.id.localeCompare(o.id)),n}function cH(t){return t.startsWith("spec/features/")&&(t.endsWith(".yaml")||t.endsWith(".yml"))}function al(t,e){return{acceptance:(t.acceptance_criteria??[]).map(n=>EO(n)).filter(n=>n!==null),change:e,id:t.id,...t.slug?{slug:t.slug}:{},title:t.title}}function S_(t){if(t===null)return null;let e;try{e=(0,x_.parse)(t)}catch{return null}let r=e;return!r||typeof r.id!="string"||typeof r.status!="string"?null:{id:r.id,slug:typeof r.slug=="string"?r.slug:void 0,title:typeof r.title=="string"?r.title:r.id,status:r.status,acceptance_criteria:r.acceptance_criteria}}function w_(t,e){let r=uH(t,e);if(!Pge(r))return null;try{return Cge(r,"utf8")}catch{return null}}function kO(t,e,r){try{return Df(t,["show",`${e}:${r}`])}catch{return null}}function jge(t,e){let r=Mge(t).filter(s=>typeof s.id=="string"&&s.id.length>0).sort((s,a)=>s.id.localeCompare(a.id)),n=[],i=new Set;for(let s of r){let a=new Set(s.features??[]),c=e.filter(l=>a.has(l.id)&&!i.has(l.id));if(c.length!==0){for(let l of c)i.add(l.id);n.push({capability:s.id,features:c,title:s.title??s.id})}}let o=e.filter(s=>!i.has(s.id));return o.length>0&&n.push({capability:"uncategorized",features:o,title:"Uncategorized"}),n}function Mge(t){let e=w_(t,uH("spec","capabilities.yaml"));if(e===null)return[];try{let r=(0,x_.parse)(e);return Array.isArray(r?.capabilities)?r.capabilities:[]}catch{return[]}}function lH(t){let e={};if(t!==null)try{let n=(0,x_.parse)(t);n&&typeof n.inventory=="object"&&n.inventory!==null&&(e=n.inventory)}catch{}let r=n=>typeof e[n]=="number"?e[n]:0;return{capabilities:r("capabilities"),features:r("features"),scenarios:r("scenarios"),test_files:r("test_files")}}function zge(t,e){let r=Df(t,["log",`${e}..HEAD`,"--format=%h%x09%s","--","src/"]),n=[];for(let i of r.split(`
+`)){if(i.trim().length===0)continue;let o=i.indexOf(" ");if(o<0)continue;let s=i.slice(0,o),a=i.slice(o+1);Fge.test(a)&&(Lge.test(a)||n.push({hash:s,subject:a}))}return n}var x_,Fge,Lge,cl=y(()=>{"use strict";x_=St(Qt(),1);_a();Fge=/^(feat|fix)(\([^)]*\))?!?:/,Lge=/\bF-(\d{3,}|[a-f0-9]{6,})\b/});import{execFileSync as dH}from"node:child_process";import{appendFileSync as Uge,existsSync as AO,mkdirSync as qge,readFileSync as Bge,renameSync as Hge,statSync as Gge}from"node:fs";import{userInfo as Zge}from"node:os";import{dirname as Vge,join as OO}from"node:path";function RO(t){return OO(t,fH,Wge)}function Xr(t,e){let r=RO(t),n=Vge(r);AO(n)||qge(n,{recursive:!0});try{AO(r)&&Gge(r).size>Kge&&Hge(r,OO(n,pH))}catch{}Uge(r,`${JSON.stringify(e)}
+`,"utf8")}function TO(t){if(!AO(t))return[];let e=Bge(t,"utf8").trim();return e.length===0?[]:e.split(`
+`).filter(r=>r.length>0).map(r=>JSON.parse(r))}function ba(t){return TO(RO(t))}function $_(t){return[...TO(OO(t,fH,pH)),...TO(RO(t))]}function Qr(t,e){return{id:`ev-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,timestamp:new Date().toISOString(),type:t,payload:e}}function Jge(t){let e;try{e=dH("git",["config","user.name"],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()||void 0}catch{}if(!e)try{e=Zge().username}catch{e=void 0}return{author:"human",name:e,timestamp:new Date().toISOString()}}function Yge(t){try{return dH("git",["rev-parse","HEAD"],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return}}function Nf(t,e){try{let r=ba(t);for(let n=r.length-1;n>=0;n--)if(r[n].type===e)return r[n]}catch{}return null}function er(t,e,r){try{let n=Yge(t),i=Jge(t),o={...r,head:n,identity:i};if(e==="gate_run"){let s=Nf(t,"gate_run");if(s&&s.payload.head===n&&s.payload.tier===r.tier&&s.payload.strict===r.strict&&s.payload.worst===r.worst)return}Xr(t,Qr(e,o))}catch{}}var fH,Wge,pH,Kge,Nr=y(()=>{"use strict";fH=".cladding",Wge="events.log.jsonl",pH="events.log.1.jsonl",Kge=5*1024*1024});import{execFileSync as Xge}from"node:child_process";import{existsSync as mH,readdirSync as Qge,readFileSync as eye,statSync as hH}from"node:fs";import{createHash as tye}from"node:crypto";import{join as IO}from"node:path";function va(t){try{return Xge("git",["rev-parse","HEAD"],{cwd:t,stdio:["ignore","pipe","ignore"]}).toString("utf8").trim()||null}catch{return null}}function PO(t){let e=[],r=IO(t,"spec.yaml");mH(r)&&hH(r).isFile()&&e.push(r);for(let i of["features","scenarios"]){let o=IO(t,"spec",i);if(!(!mH(o)||!hH(o).isDirectory()))for(let s of Qge(o))s.endsWith(".yaml")&&e.push(IO(o,s))}e.sort();let n=tye("sha256");for(let i of e){let o=i.slice(t.length+1);n.update(`${o}\0`),n.update(eye(i)),n.update("\0")}return n.digest("hex")}function k_(t,e){let r={featureId:e,gitHead:va(t),specDigest:PO(t),timestamp:new Date().toISOString()};return Xr(t,Qr("feature_checkpoint",{feature:e,git_head:r.gitHead,spec_digest:r.specDigest})),r}function E_(t,e){let r=ba(t);for(let n=r.length-1;n>=0;n--){let i=r[n];if(i.type==="feature_checkpoint"&&i.payload.feature===e)return{featureId:e,gitHead:i.payload.git_head??null,specDigest:String(i.payload.spec_digest??""),timestamp:i.timestamp}}return null}function A_(t,e,r,n){let i=Qr("feature_rolled_back",{feature:e,to_git_head:r.gitHead,to_spec_digest:r.specDigest,to_checkpoint_at:r.timestamp,reason:n??null});return Xr(t,i),i}var jf=y(()=>{"use strict";Nr()});import{readFileSync as rye,statSync as nye}from"node:fs";import{extname as iye,resolve as CO,sep as oye}from"node:path";function en(t){return Math.ceil(t.length/4)}function cye(t,e){let r=CO(e),n=CO(r,t);return n===r||n.startsWith(r+oye)}function yH(t,e,r,n){if(!cye(t,e))return{path:t,omitted:"unsafe-path"};if(!sye.has(iye(t).toLowerCase()))return{path:t,omitted:"unsupported"};let i,o;if(n){let l=n(t);if(l==null)return{path:t,omitted:"missing"};if(i=l,o=Buffer.byteLength(l,"utf8"),o>gH)return{path:t,omitted:"too-large",bytes:o}}else{let l=CO(e,t);try{o=nye(l).size}catch{return{path:t,omitted:"missing"}}if(o>gH)return{path:t,omitted:"too-large",bytes:o};try{i=rye(l,"utf8")}catch{return{path:t,omitted:"missing",bytes:o}}}if(i.includes(aye))return{path:t,omitted:"binary",bytes:o};let s=Math.max(0,Math.floor(r));if(i.length<=s)return{path:t,text:i,bytes:o};let a=`
/* ... clipped (${o} bytes total) ... */
-`,c=Math.max(0,s-a.length);return{path:t,text:i.slice(0,c)+a,truncated:!0,bytes:o}}var ege,kB,tge,Qy=y(()=>{"use strict";ege=new Set([".ts",".tsx",".js",".jsx",".mjs",".cjs",".py",".rs",".go",".java",".kt",".kts",".cs",".rb",".php",".swift",".c",".h",".cpp",".hpp",".css",".scss",".sql",".sh",".yaml",".yml",".json",".md",".toml"]),kB=2e6,tge="\0"});function ige(t){for(let i of nge)if(t.startsWith(i))return null;let e=t.indexOf("#"),n=(e>=0?t.slice(0,e):t).trim();return n.length>0?n:null}function eO(t,e,r){let n=t.get(e);n||(n=new Set,t.set(e,n)),n.add(r)}function oge(t){let e=new Map,r=new Map,n=new Map;for(let i of t.features??[]){let o=i.id;for(let s of i.depends_on??[])eO(e,s,o);for(let s of i.modules??[])eO(r,s,o);for(let s of i.acceptance_criteria??[])for(let a of s.test_refs??[]){let c=ige(a);c&&eO(n,c,o)}}return{dependents:e,moduleOwners:r,testRefCitations:n}}function xn(t){let e=AB.get(t);return e||(e=oge(t),AB.set(t,e)),e}var nge,AB,da=y(()=>{"use strict";nge=["derived:","fixture:","script:","self-dogfood:"];AB=new WeakMap});function tO(t,e,r=1/0){let n=new Set,i=new Set(t),o=[...i],s=0;for(;o.length>0&&sn.id===e)??r.find(n=>n.slug===e)??null}function yr(t,e,r={}){let n=r.depth??1/0,i=xn(t),o=new Map((t.features??[]).map(_=>[_.id,_])),s=[],a,c=sge(t,e);if(c)s=[c];else{let _=i.moduleOwners.get(e);_&&_.size>0&&(a=e,s=[..._].map(S=>o.get(S)).filter(S=>!!S))}if(s.length===0)return{not_found:e,accepted_forms:["feature id (F-\u2026)","slug","module path (e.g. src/spec/load.ts)"],discovery:"grep spec/index.yaml \u2014 one line per feature (run clad sync if missing); module paths live in each shard\u2019s modules:; if the query is a file, fall back to normal code search \u2014 the graph only knows declared modules"};let l=s.map(_=>_.id),u=tO(l,i.dependents,n),d=[...u].map(_=>o.get(_)).filter(_=>!!_).map(_=>({id:_.id,title:_.title,status:_.status})).sort((_,S)=>_.id.localeCompare(S.id)),f=new Set([...l,...u]),p=[...f].map(_=>o.get(_)).filter(_=>!!_),m=[...new Set(p.flatMap(_=>_.modules??[]))].sort(),h=(t.scenarios??[]).filter(_=>(_.features??[]).some(S=>f.has(S))).map(_=>({id:_.id,title:_.title})).sort((_,S)=>_.id.localeCompare(S.id)),g=[...new Set(p.flatMap(_=>(_.acceptance_criteria??[]).flatMap(S=>S.test_refs??[])))].sort();return{focus:a?{module:a,owners:[...l].sort()}:{id:s[0].id,title:s[0].title,status:s[0].status},impacted:d,impacted_modules:m,scenarios:h,test_refs:g,ledger:rO(i)}}var fa=y(()=>{"use strict";da()});function TB(t){return t.impacted.length}function t_(t,e,r={}){let n=r.initialDepth??e_.initialDepth,i=r.maxDepth??e_.maxDepth,o=r.coverageThreshold??e_.coverageThreshold,s=r.marginYieldThreshold??e_.marginYieldThreshold,a=xn(t),c=new Map((t.features??[]).map(b=>[b.id,b])),l=[],u=(t.features??[]).find(b=>b.id===e||b.slug===e);if(u)l=[u.id];else{let b=a.moduleOwners.get(e);b&&b.size>0&&(l=[...b].filter(_=>c.has(_)))}if(l.length===0){let b=yr(t,e,{depth:1});return"not_found"in b,b}let d=tO(l,a.dependents,1/0).size;if(d===0){let b=yr(t,e,{depth:n});return"not_found"in b?b:{slice:b,depthUsed:n,stoppedBy:"no-known-dependents",analysis:{frontierExhausted:!0,coverage:null,marginalYields:[0],totalKnownDependents:0}}}let f=[],p=0,m=null;for(let b=n;b<=i;b++){let _=yr(t,e,{depth:b});if("not_found"in _)return _;m=_;let S=TB(_),x=S-p,w=S>0?x/S:0;f.push(w);let O=d>0?S/d:1,A=x===0&&b>n,E={frontierExhausted:A,coverage:O,marginalYields:[...f],totalKnownDependents:d};if(A)return{slice:_,depthUsed:b,stoppedBy:"exhaustion",analysis:E};if(O>=o)return{slice:_,depthUsed:b,stoppedBy:"coverage",analysis:E};if(f.length>=2&&f[f.length-1]]0?g/d:1,marginalYields:[...f],totalKnownDependents:d}}}var e_,nO=y(()=>{"use strict";fa();da();e_={initialDepth:1,maxDepth:10,coverageThreshold:.9,marginYieldThreshold:.05}});function age(t,e){let r=new Set,n=[t];for(;n.length>0;){let i=n.pop();if(!i||r.has(i))continue;r.add(i);let o=e.get(i);for(let s of o?.depends_on??[])n.push(s)}return r}function OB(t,e){let r=new Map(t.features.map(a=>[a.id,a]));if(!r.has(e))return t;let n=age(e,r),i=t.features.filter(a=>n.has(a.id)),o=(t.scenarios??[]).filter(a=>(a.features??[]).some(c=>n.has(c)));return{...t,features:i,scenarios:o}}var RB=y(()=>{"use strict"});function cge(t,e){let r=t.features??[];return r.find(n=>n.id===e)??r.find(n=>n.slug===e)??r.find(n=>(n.modules??[]).includes(e))??null}function Wc(t,e){let r=cge(t,e);if(!r)return{not_found:e,accepted_forms:["feature id (F-\u2026)","slug","module path (e.g. src/auth/login.ts)"],discovery:"grep spec/index.yaml \u2014 one line per feature (id, slug, status; run clad sync if missing); if the query is a file, fall back to normal code search \u2014 the graph only knows declared modules"};let n=OB(t,r.id),i=(n.features??[]).filter(c=>c.id!==r.id).map(c=>({id:c.id,title:c.title,status:c.status})).sort((c,l)=>c.id.localeCompare(l.id)),o=(n.scenarios??[]).map(c=>({id:c.id,title:c.title})).sort((c,l)=>c.id.localeCompare(l.id)),s=(t.project?.ai_hints?.preferred_patterns??[]).map(c=>({when:c.when,prefer:c.prefer,...c.over!==void 0?{over:c.over}:{}})),a=[...new Set((r.acceptance_criteria??[]).flatMap(c=>c.test_refs??[]))].sort();return{focus:r,ancestors:i,scenarios:o,preferred_patterns:s,test_refs:a}}var r_=y(()=>{"use strict";RB()});import{existsSync as PB,readdirSync as lge,readFileSync as uge}from"node:fs";import{join as oO}from"node:path";function sO(t,e=fge){let r=t.trim().replace(/\s+/g," ");return r.length<=e?r:`${r.slice(0,e-1)}\u2026`}function pge(t){let e=t.payload??{};if(t.type==="drift_detected"){let n=typeof e.gate=="string"&&e.gate?e.gate:"drift";return{detector:n,message:sO(`drift detected at gate ${n}`)}}let r=typeof e.worst=="number"?` (worst ${e.worst})`:"";return{detector:"done_attempted",message:sO(`done reverted \u2014 pre-push strict gate red${r}`)}}function IB(t){let e=Date.parse(t.timestamp);return Number.isFinite(e)?e:0}function mge(t){let e=[];t.lastFailedGate&&e.push(`failed ${t.lastFailedGate}`),typeof t.retryCount=="number"&&e.push(`${t.retryCount} retries`);let r=e.length?` (${e.join(", ")})`:"",n=t.recovery?`recover: ${t.recovery}${r}`:`rolled back${r}`;return sO(n)}function hge(t,e,r,n={}){let i=t.filter(m=>m&&m.payload&&m.payload.feature===r),o=e.filter(m=>m&&m.featureId===r).slice().sort((m,h)=>IB(m)-IB(h)),s=i.filter(m=>m.type==="drift_detected"||m.type==="done_attempted"&&m.payload.kept===!1),a=i.filter(m=>m.type==="feature_rolled_back");if(s.length===0&&a.length===0&&o.length===0)return;let c=o.length?o[o.length-1]:void 0,l;for(let m=s.length-1;m>=0;m--){let h=s[m].payload.gate;if(s[m].type==="drift_detected"&&typeof h=="string"&&h){l=h;break}}!l&&c?.lastFailedGate&&(l=c.lastFailedGate);let u=s.slice(-dge).map(pge),d;for(let m=a.length-1;m>=0;m--){let h=a[m].payload.to_git_head;if(typeof h=="string"&&h){d=h;break}}let f=typeof c?.retryCount=="number"?c.retryCount:void 0,p=c?mge(c):void 0;return{attempts:s.length,...l?{last_failed_gate:l}:{},...f!==void 0?{retry_count:f}:{},...u.length?{drift_history:u}:{},...d?{rolled_back_at:d}:{},...p?{recovery_hint:p}:{},...n.truncated?{truncated_history:!0}:{}}}function iO(t,e){let r=t.match(e);return r&&r[1]?r[1].trim():void 0}function gge(t){let e=t.indexOf("## Recommended recovery");if(e<0)return;let r=t.slice(e).match(/```[^\n]*\n([\s\S]*?)```/);return r&&r[1].split(`
-`).map(i=>i.trim()).find(i=>i.length>0)||void 0}function yge(t,e,r){let n=iO(t,/_Rolled back at_\s*`([^`]+)`/),i=iO(t,/Last failed gate:\s*`([^`]+)`/),o=iO(t,/Retry attempts:\s*(\d+)/),s=gge(t);return{featureId:e,timestamp:n??r,...i?{lastFailedGate:i}:{},...o?{retryCount:Number(o)}:{},...s?{recovery:s}:{}}}function _ge(t,e){let r=oO(t,".cladding","post-mortems");if(!PB(r))return[];let n=`post-mortem-${e}-`,i=[];for(let o of lge(r))if(!(!o.startsWith(n)||!o.endsWith(".md")))try{i.push(yge(uge(oO(r,o),"utf8"),e,o))}catch{}return i}function CB(t,e){try{let r=Ky(t),n=_ge(t,e),i=PB(oO(t,".cladding","events.log.1.jsonl"));return hge(r,n,e,{truncated:i})}catch{return}}var dge,fge,DB=y(()=>{"use strict";Dr();dge=5,fge=120});function n_(t,e,r){return Qr(JSON.stringify({...t,needs:e,must_edit:{...t.must_edit,code:r}}))}function pa(t,e,r={}){let n=r.cwd??".",i=r.maxTokens&&r.maxTokens>0?r.maxTokens:bge,o=e,s,a=xn(t).moduleOwners.get(e);if(a&&a.size>0){let se=[...a].sort();o=se[0],se.length>1&&(s=se)}let c=Wc(t,o);if("not_found"in c)return c;let l=c.focus,u=CB(n,l.id),d=a&&a.size>0?e:l.id,f=t_(t,d),p="not_found"in f?null:f.slice,m=p?p.impacted:[],h=p?p.test_refs:[],g="not_found"in f?null:{depth:f.depthUsed,stopped_by:f.stoppedBy,coverage:f.analysis.coverage===null?null:Math.round(f.analysis.coverage*100)/100,total_known_dependents:f.analysis.totalKnownDependents},b=l.acceptance_criteria??[],_=b.filter(se=>se.ears==="unwanted"||se.ears==="state").map(se=>({id:se.id,ears:String(se.ears)})),S=[...new Set(b.flatMap(se=>se.oracle_refs??[]))].sort(),x=[],w={must_edit:{id:l.id,title:l.title,status:l.status,modules:l.modules??[],acceptance_criteria:b,code:[],...s?{co_owners:s}:{}},needs:c.ancestors,breaks_if_changed:{impacted:m,regression_tests:h,...g?{radius:g}:{}},verify:{scenarios:c.scenarios,test_refs:c.test_refs,oracle_refs:S,high_risk_acs:_},guidance:{preferred_patterns:c.preferred_patterns},budget:{max_tokens:i,used_tokens:0,truncated:x}},O=[...c.ancestors];for(;O.length>vge&&n_(w,O,[])>i;)O.pop();O.lengthi){x.push(`code: omitted ${se} (budget)`);continue}E.push(Vt),Vt.truncated&&x.push(`code: clipped ${se}`)}A>i&&x.push("must-edit exceeds budget \u2014 retained in full (focus is never dropped)");let C=(se,Pe)=>({impacted:se,regression_tests:Pe,...g?{radius:g}:{},...p?.ledger?{ledger:p.ledger}:{}}),k=(se,Pe,Vt,ar)=>{let Kt=Vt+ar>0?[`breaks: omitted ${Vt} feature(s) / ${ar} test(s)`]:[],to={...w,needs:O,must_edit:{...w.must_edit,code:E},breaks_if_changed:C(se,Pe),budget:{...w.budget,truncated:[...x,...Kt]}};return Qr(JSON.stringify(to))>i},q=m,X=h;if(k(q,X,0,0)){let se=yr(t,d,{depth:1}),Pe=new Set("not_found"in se?[]:se.impacted.map(de=>de.id)),Vt=new Set("not_found"in se?[]:se.test_refs),Kt=[...m.filter(de=>Pe.has(de.id)),...m.filter(de=>!Pe.has(de.id))],to=0;for(;Kt.length>Pe.size&&k(Kt,X,to,0);)Kt=Kt.slice(0,-1),to++;let yi=[...h],Jr=0;for(;k(Kt,yi,to,Jr);){let de=-1;for(let ro=yi.length-1;ro>=0;ro--)if(!Vt.has(yi[ro])){de=ro;break}if(de<0)break;yi.splice(de,1),Jr++}q=Kt,X=yi,to+Jr>0&&x.push(`breaks: omitted ${to} feature(s) / ${Jr} test(s)`),k(q,X,0,0)&&x.push("breaks: direct set retained in full \u2014 exceeds budget")}let Se=C(q,X),I={...w,needs:O,must_edit:{...w.must_edit,code:E},breaks_if_changed:Se},P=I;if(u){let se={...I,prior_attempts:u};Qr(JSON.stringify(se))<=i?P=se:x.push("prior_attempts: omitted (budget)")}let Rr=Qr(JSON.stringify(P));return{...P,budget:{max_tokens:i,used_tokens:Rr,truncated:x}}}var bge,vge,i_=y(()=>{"use strict";Qy();r_();nO();DB();fa();da();bge=3e3,vge=3});function Zn(t){if(t.length===0)return 0;let e=[...t].sort((n,i)=>n-i),r=Math.floor(e.length/2);return e.length%2?e[r]:(e[r-1]+e[r])/2}function Sge(t,e){if(t.length===0)return 0;let r=[...t].sort((n,i)=>n-i);return r[Math.min(r.length-1,Math.floor(e/100*r.length))]}function NB(t,e,r="."){let n=xn(t),i=t.features??[],o=[];for(let f of i){let p=pa(t,f.id,{cwd:r,read:e});if("not_found"in p)continue;let m=pa(t,f.id,{cwd:r,read:e,maxTokens:Number.MAX_SAFE_INTEGER}),h=t_(t,f.id),g=!("not_found"in h),b=Qr(JSON.stringify(p)),_="not_found"in m?b:Qr(JSON.stringify(m)),S=Qr(JSON.stringify(f));for(let O of f.modules??[]){let A=e(O);A&&(S+=Qr(A))}let x=(f.depends_on??[]).length,w=n.dependents.get(f.id)?.size??0;o.push({id:f.id,sliceTokens:b,structuralTokens:_,naiveTokens:S,contextRatio:S>0?b/S:1,budgetSaturated:p.budget.truncated.length>0,searchDepth:g?h.depthUsed:1,edgesResolved:x+w,stoppedBy:g?h.stoppedBy:"n/a",coverage:g?h.analysis.coverage:1,regressionTests:p.breaks_if_changed.regression_tests.length})}o.sort((f,p)=>f.id.localeCompare(p.id));let s=o.map(f=>f.contextRatio),a=f=>f.filter(p=>p.sliceTokens>0).map(p=>p.naiveTokens/p.sliceTokens),c=o.filter(f=>!f.budgetSaturated),l=o.filter(f=>f.budgetSaturated),u=o.filter(f=>f.naiveTokens>0).map(f=>f.structuralTokens/f.naiveTokens),d={};for(let f of o)d[f.stoppedBy]=(d[f.stoppedBy]??0)+1;return{featureCount:i.length,measured:o.length,context:{medianContextRatio:Math.round(Zn(s)*1e3)/1e3,medianShrinkFactor:Math.round(Zn(a(o))*10)/10,fitsCount:c.length,truncatedCount:l.length,medianShrinkFit:Math.round(Zn(a(c))*10)/10,medianShrinkTruncated:Math.round(Zn(a(l))*10)/10,medianStructuralRatio:Math.round(Zn(u)*100)/100,medianSliceTokens:Math.round(Zn(o.map(f=>f.sliceTokens))),medianNaiveTokens:Math.round(Zn(o.map(f=>f.naiveTokens)))},search:{medianDepth:Zn(o.map(f=>f.searchDepth)),p95Depth:Sge(o.map(f=>f.searchDepth),95),medianEdges:Zn(o.map(f=>f.edgesResolved)),maxEdges:o.reduce((f,p)=>Math.max(f,p.edgesResolved),0)},stability:{byStopReason:d,medianCoverage:Math.round(Zn(o.map(f=>f.coverage).filter(f=>f!==null))*100)/100,medianRegressionTests:Zn(o.map(f=>f.regressionTests))},features:o}}var Kc,o_=y(()=>{"use strict";Qy();nO();i_();da();Kc="(deterministic upper bound vs the shard+all-modules baseline \u2014 not an agent-adoption measurement)"});import{appendFileSync as wge,existsSync as aO,mkdirSync as xge,readFileSync as jB}from"node:fs";import{dirname as $ge,join as kge}from"node:path";function cO(t){return kge(t,Ege,Age)}function Tge(t,e){return{timestamp:new Date().toISOString(),head:ua(t),spec_digest:XT(t),featureCount:e.featureCount,measured:e.measured,context:e.context,search:e.search,stability:e.stability}}function MB(t,e){try{let r=Tge(t,e);if(r.head===null)return{appended:!1,reason:"no_head"};let n=lO(t),i=n[n.length-1];if(i&&i.head===r.head&&i.spec_digest===r.spec_digest)return{appended:!1,reason:"deduped"};let o=cO(t),s=$ge(o);return aO(s)||xge(s,{recursive:!0}),wge(o,`${JSON.stringify(r)}
-`,"utf8"),{appended:!0,reason:"appended"}}catch{return{appended:!1,reason:"error"}}}function FB(t){let e=[];for(let r of t.split(`
-`)){let n=r.trim();if(n.length!==0)try{let i=JSON.parse(n);i&&typeof i=="object"&&i.context&&i.search&&i.stability&&e.push(i)}catch{}}return e}function lO(t,e){let r=cO(t);if(!aO(r))return[];let n;try{n=jB(r,"utf8")}catch{return[]}let i=FB(n);return typeof e=="number"&&e>=0?i.slice(-e):i}function LB(t){let e=cO(t);if(!aO(e))return{snapshots:[],unreadable:!1};let r;try{r=jB(e,"utf8")}catch{return{snapshots:[],unreadable:!0}}let n=FB(r),i=r.trim().length>0;return{snapshots:n,unreadable:i&&n.length===0}}function vf(t,e=0){let r=e>0?Math.round(t*10**e)/10**e:Math.round(t),n=r.toFixed(e);return r>0?`+${n}`:n}function zB(t,e=5){let r=Math.max(0,t.length-e),i=[`measure trend \xB7 last ${t.slice(r).length} of ${t.length} snapshot(s)`];for(let o=r;o0?t[o-1]:null,c=(d,f=0)=>a?` (${vf(d(s)-d(a),f)})`:"",l=s.timestamp.slice(0,19),u=s.head?s.head.slice(0,7):"nogit";i.push(` ${l} ${u} \xB7 ${s.featureCount} feat \xB7 slice ${s.context.medianSliceTokens}${c(d=>d.context.medianSliceTokens)} \xB7 struct ${s.context.medianStructuralRatio.toFixed(2)}${c(d=>d.context.medianStructuralRatio,2)} \xB7 cov ${s.stability.medianCoverage.toFixed(2)}${c(d=>d.stability.medianCoverage,2)} \xB7 p95depth ${s.search.p95Depth}${c(d=>d.search.p95Depth)} \xB7 trunc ${s.context.truncatedCount}${c(d=>d.context.truncatedCount)}`)}return i.push(` ${Kc}`),i.join(`
-`)}var Ege,Age,Sf=y(()=>{"use strict";bf();o_();Ege=".cladding",Age="measure.jsonl"});import{existsSync as Oge}from"node:fs";import{join as Rge}from"node:path";function Jc(t){if(t.groups.reduce((i,o)=>i+o.features.length,0)===0&&t.unsharded_commits.length===0)return`no shipped changes since ${t.since}`;let r=[`# Changes since ${t.since}`,""];for(let i of t.groups){r.push(`## ${i.title}`,"");for(let o of i.features){r.push(`- **${o.title}** (${Ige[o.change]})`);for(let s of o.acceptance)r.push(` - ${s}`)}r.push("")}if(t.unsharded_commits.length>0){r.push("## Other changes (not yet spec-tracked)","");for(let i of t.unsharded_commits)r.push(`- ${i.subject}`);r.push("")}let n=t.inventory;for((n.before.features!==n.after.features||n.before.scenarios!==n.after.scenarios)&&r.push(`_Spec inventory: ${n.before.features} \u2192 ${n.after.features} features, ${n.before.scenarios} \u2192 ${n.after.scenarios} scenarios._`,"");r[r.length-1]==="";)r.pop();return r.join(`
-`)}function qB(t){let e=t.snapshot,r=["## Measured (this release)",""];if(!e||!e.head)return r.push("not measured at this commit \u2014 run clad measure before tagging"),r.join(`
-`);let n=e.context,i=e.stability;r.push(`- features measured: ${e.measured} of ${e.featureCount}`),r.push(`- median slice tokens: ${n.medianSliceTokens} vs ${n.medianNaiveTokens} naive`),r.push(`- median structural ratio: ${n.medianStructuralRatio.toFixed(2)}`),r.push(`- median coverage: ${i.medianCoverage.toFixed(2)}`),r.push(`- regression tests surfaced: ${i.medianRegressionTests}`);let o=t.sinceSnapshot;if(o){let s=t.sinceRef??(o.head?o.head.slice(0,7):"previous");r.push(`- since ${s}: slice ${vf(n.medianSliceTokens-o.context.medianSliceTokens)} \xB7 struct ${vf(n.medianStructuralRatio-o.context.medianStructuralRatio,2)} \xB7 cov ${vf(i.medianCoverage-o.stability.medianCoverage,2)}`)}return r.push("",`head ${e.head.slice(0,7)} \xB7 spec_digest ${e.spec_digest}`,`reproduce: git checkout ${e.head} && clad measure`,"",Kc),r.join(`
-`)}function Yc(t,e,r){let n=[`# Audit \u2014 shipped changes since ${t.since}`,"","| feature | AC | EARS | verification refs |","|---|---|---|---|"],i=new Map(e.features.map(o=>[o.id,o]));for(let o of t.groups)for(let s of o.features){let a=i.get(s.id);if(!a){n.push(`| ${s.id} | \u2014 | \u2014 | (removed from spec \u2014 see git history at ${t.since}) |`);continue}let c=a.acceptance_criteria??[];if(c.length===0){n.push(`| ${a.id} | \u2014 | \u2014 | (no acceptance criteria) |`);continue}for(let l of c)n.push(`| ${a.id} | ${l.id} | ${l.ears??"\u2014"} | ${Cge(l,r)} |`)}return n.join(`
-`)}function Cge(t,e){let r=[...t.test_refs??[],...t.oracle_refs??[],...t.evidence_refs??[]];return r.length===0?"(none)":r.map(n=>{for(let[o,s]of Pge)if(n.startsWith(o))return`${n} (${s})`;let i=n.split("#",1)[0]??n;return`${Oge(Rge(e,i))?"\u2713":"\u2717"} ${n}`}).join("
")}function Xc(t){let e=[`# ${t.project.name} \u2014 capability catalog`,""],r=[...t.capabilities??[]].filter(s=>typeof s.id=="string"&&s.id.length>0).sort((s,a)=>s.id.localeCompare(a.id)),n=new Map(t.features.map(s=>[s.id,s])),i=new Set;for(let s of r){e.push(`## ${s.title??s.id}`,""),s.summary&&e.push(s.summary,"");for(let a of s.features??[]){let c=n.get(a);!c||c.status==="archived"||(i.add(a),UB(e,c))}}let o=t.features.filter(s=>!i.has(s.id)&&s.status!=="archived").sort((s,a)=>s.id.localeCompare(a.id));if(o.length>0){e.push("## Uncategorized","");for(let s of o)UB(e,s)}for(;e[e.length-1]==="";)e.pop();return e.join(`
-`)}function UB(t,e){t.push(`### ${e.title}`,"");for(let r of e.acceptance_criteria??[]){let n=ZT(r);n&&t.push(`- ${n}`)}t.push("")}var Ige,Pge,s_=y(()=>{"use strict";Sf();o_();Vc();Ige={"added-as-done":"new","flipped-to-done":"completed","modified-while-done":"updated",archived:"retired"};Pge=[["derived:","machine-suggested \u2014 not author-confirmed"],["self-dogfood:","verified by cladding running on itself"],["fixture:","conformance fixture"],["script:","npm script"]]});import{readFileSync as Dge}from"node:fs";function wi(t="./spec.yaml"){let e=Dge(t,"utf8");return(0,BB.parse)(e)}var BB,a_=y(()=>{"use strict";BB=Et(cr(),1)});var Jo=v((Nr,pO)=>{"use strict";var uO=Nr.ValidationError=function(e,r,n,i,o,s){if(Array.isArray(i)?(this.path=i,this.property=i.reduce(function(c,l){return c+GB(l)},"instance")):i!==void 0&&(this.property=i),e&&(this.message=e),n){var a=n.$id||n.id;this.schema=a||n}r!==void 0&&(this.instance=r),this.name=o,this.argument=s,this.stack=this.toString()};uO.prototype.toString=function(){return this.property+" "+this.message};var c_=Nr.ValidatorResult=function(e,r,n,i){this.instance=e,this.schema=r,this.options=n,this.path=i.path,this.propertyPath=i.propertyPath,this.errors=[],this.throwError=n&&n.throwError,this.throwFirst=n&&n.throwFirst,this.throwAll=n&&n.throwAll,this.disableFormat=n&&n.disableFormat===!0};c_.prototype.addError=function(e){var r;if(typeof e=="string")r=new uO(e,this.instance,this.schema,this.path);else{if(!e)throw new Error("Missing error detail");if(!e.message)throw new Error("Missing error message");if(!e.name)throw new Error("Missing validator type");r=new uO(e.message,this.instance,this.schema,this.path,e.name,e.argument)}if(this.errors.push(r),this.throwFirst)throw new ma(this);if(this.throwError)throw r;return r};c_.prototype.importErrors=function(e){typeof e=="string"||e&&e.validatorType?this.addError(e):e&&e.errors&&(this.errors=this.errors.concat(e.errors))};function Nge(t,e){return e+": "+t.toString()+`
-`}c_.prototype.toString=function(e){return this.errors.map(Nge).join("")};Object.defineProperty(c_.prototype,"valid",{get:function(){return!this.errors.length}});pO.exports.ValidatorResultError=ma;function ma(t){typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ma),this.instance=t.instance,this.schema=t.schema,this.options=t.options,this.errors=t.errors}ma.prototype=new Error;ma.prototype.constructor=ma;ma.prototype.name="Validation Error";var HB=Nr.SchemaError=function t(e,r){this.message=e,this.schema=r,Error.call(this,e),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)};HB.prototype=Object.create(Error.prototype,{constructor:{value:HB,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var dO=Nr.SchemaContext=function(e,r,n,i,o){this.schema=e,this.options=r,Array.isArray(n)?(this.path=n,this.propertyPath=n.reduce(function(s,a){return s+GB(a)},"instance")):this.propertyPath=n,this.base=i,this.schemas=o};dO.prototype.resolve=function(e){return ZB(this.base,e)};dO.prototype.makeChild=function(e,r){var n=r===void 0?this.path:this.path.concat([r]),i=e.$id||e.id;let o=ZB(this.base,i||"");var s=new dO(e,this.options,n,o,Object.create(this.schemas));return i&&!s.schemas[o]&&(s.schemas[o]=e),s};var Vn=Nr.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,duration:/P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"idn-email":/^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"uri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,iri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"iri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,"uri-template":/(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu,"json-pointer":/^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu,"relative-json-pointer":/^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"utc-millisec":function(t){return typeof t=="string"&&parseFloat(t)===parseInt(t,10)&&!isNaN(t)},regex:function(t){var e=!0;try{new RegExp(t)}catch{e=!1}return e},style:/[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/};Vn.regexp=Vn.regex;Vn.pattern=Vn.regex;Vn.ipv4=Vn["ip-address"];Nr.isFormat=function(e,r,n){if(typeof e=="string"&&Vn[r]!==void 0){if(Vn[r]instanceof RegExp)return Vn[r].test(e);if(typeof Vn[r]=="function")return Vn[r](e)}else if(n&&n.customFormats&&typeof n.customFormats[r]=="function")return n.customFormats[r](e);return!0};var GB=Nr.makeSuffix=function(e){return e=e.toString(),!e.match(/[.\s\[\]]/)&&!e.match(/^[\d]/)?"."+e:e.match(/^\d+$/)?"["+e+"]":"["+JSON.stringify(e)+"]"};Nr.deepCompareStrict=function t(e,r){if(typeof e!=typeof r)return!1;if(Array.isArray(e))return!Array.isArray(r)||e.length!==r.length?!1:e.every(function(o,s){return t(e[s],r[s])});if(typeof e=="object"){if(!e||!r)return e===r;var n=Object.keys(e),i=Object.keys(r);return n.length!==i.length?!1:n.every(function(o){return t(e[o],r[o])})}return e===r};function jge(t,e,r,n){typeof r=="object"?e[n]=fO(t[n],r):t.indexOf(r)===-1&&e.push(r)}function Mge(t,e,r){e[r]=t[r]}function Fge(t,e,r,n){typeof e[n]!="object"||!e[n]?r[n]=e[n]:t[n]?r[n]=fO(t[n],e[n]):r[n]=e[n]}function fO(t,e){var r=Array.isArray(e),n=r&&[]||{};return r?(t=t||[],n=n.concat(t),e.forEach(jge.bind(null,t,n))):(t&&typeof t=="object"&&Object.keys(t).forEach(Mge.bind(null,t,n)),Object.keys(e).forEach(Fge.bind(null,t,e,n))),n}pO.exports.deepMerge=fO;Nr.objectGetPath=function(e,r){for(var n=r.split("/").slice(1),i;typeof(i=n.shift())=="string";){var o=decodeURIComponent(i.replace(/~0/,"~").replace(/~1/g,"/"));if(!(o in e))return;e=e[o]}return e};function Lge(t){return"/"+encodeURIComponent(t).replace(/~/g,"%7E")}Nr.encodePath=function(e){return e.map(Lge).join("")};Nr.getDecimalPlaces=function(e){var r=0;if(isNaN(e))return r;typeof e!="number"&&(e=Number(e));var n=e.toString().split("e");if(n.length===2){if(n[1][0]!=="-")return r;r=Number(n[1].slice(1))}var i=n[0].split(".");return i.length===2&&(r+=i[1].length),r};Nr.isSchema=function(e){return typeof e=="object"&&e||typeof e=="boolean"};var ZB=Nr.resolveUrl=function(e,r){let n=new URL(r,new URL(e,"resolve://"));if(n.protocol==="resolve:"){let{pathname:i,search:o,hash:s}=n;return i+o+s}return n.toString()}});var JB=v((oYe,KB)=>{"use strict";var en=Jo(),Fe=en.ValidatorResult,Yo=en.SchemaError,mO={};mO.ignoreProperties={id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0};var Le=mO.validators={};Le.type=function(e,r,n,i){if(e===void 0)return null;var o=new Fe(e,r,n,i),s=Array.isArray(r.type)?r.type:[r.type];if(!s.some(this.testType.bind(this,e,r,n,i))){var a=s.map(function(c){if(c){var l=c.$id||c.id;return l?"<"+l+">":c+""}});o.addError({name:"type",argument:a,message:"is not of a type(s) "+a})}return o};function hO(t,e,r,n,i){var o=e.throwError,s=e.throwAll;e.throwError=!1,e.throwAll=!1;var a=this.validateSchema(t,i,e,r);return e.throwError=o,e.throwAll=s,!a.valid&&n instanceof Function&&n(a),a.valid}Le.anyOf=function(e,r,n,i){if(e===void 0)return null;var o=new Fe(e,r,n,i),s=new Fe(e,r,n,i);if(!Array.isArray(r.anyOf))throw new Yo("anyOf must be an array");if(!r.anyOf.some(hO.bind(this,e,n,i,function(c){s.importErrors(c)}))){var a=r.anyOf.map(function(c,l){var u=c.$id||c.id;return u?"<"+u+">":c.title&&JSON.stringify(c.title)||c.$ref&&"<"+c.$ref+">"||"[subschema "+l+"]"});n.nestedErrors&&o.importErrors(s),o.addError({name:"anyOf",argument:a,message:"is not any of "+a.join(",")})}return o};Le.allOf=function(e,r,n,i){if(e===void 0)return null;if(!Array.isArray(r.allOf))throw new Yo("allOf must be an array");var o=new Fe(e,r,n,i),s=this;return r.allOf.forEach(function(a,c){var l=s.validateSchema(e,a,n,i);if(!l.valid){var u=a.$id||a.id,d=u||a.title&&JSON.stringify(a.title)||a.$ref&&"<"+a.$ref+">"||"[subschema "+c+"]";o.addError({name:"allOf",argument:{id:d,length:l.errors.length,valid:l},message:"does not match allOf schema "+d+" with "+l.errors.length+" error[s]:"}),o.importErrors(l)}}),o};Le.oneOf=function(e,r,n,i){if(e===void 0)return null;if(!Array.isArray(r.oneOf))throw new Yo("oneOf must be an array");var o=new Fe(e,r,n,i),s=new Fe(e,r,n,i),a=r.oneOf.filter(hO.bind(this,e,n,i,function(l){s.importErrors(l)})).length,c=r.oneOf.map(function(l,u){var d=l.$id||l.id;return d||l.title&&JSON.stringify(l.title)||l.$ref&&"<"+l.$ref+">"||"[subschema "+u+"]"});return a!==1&&(n.nestedErrors&&o.importErrors(s),o.addError({name:"oneOf",argument:c,message:"is not exactly one from "+c.join(",")})),o};Le.if=function(e,r,n,i){if(e===void 0)return null;if(!en.isSchema(r.if))throw new Error('Expected "if" keyword to be a schema');var o=hO.call(this,e,n,i,null,r.if),s=new Fe(e,r,n,i),a;if(o){if(r.then===void 0)return;if(!en.isSchema(r.then))throw new Error('Expected "then" keyword to be a schema');a=this.validateSchema(e,r.then,n,i.makeChild(r.then)),s.importErrors(a)}else{if(r.else===void 0)return;if(!en.isSchema(r.else))throw new Error('Expected "else" keyword to be a schema');a=this.validateSchema(e,r.else,n,i.makeChild(r.else)),s.importErrors(a)}return s};function gO(t,e){if(Object.hasOwnProperty.call(t,e))return t[e];if(e in t){for(;t=Object.getPrototypeOf(t);)if(Object.propertyIsEnumerable.call(t,e))return t[e]}}Le.propertyNames=function(e,r,n,i){if(this.types.object(e)){var o=new Fe(e,r,n,i),s=r.propertyNames!==void 0?r.propertyNames:{};if(!en.isSchema(s))throw new Yo('Expected "propertyNames" to be a schema (object or boolean)');for(var a in e)if(gO(e,a)!==void 0){var c=this.validateSchema(a,s,n,i.makeChild(s));o.importErrors(c)}return o}};Le.properties=function(e,r,n,i){if(this.types.object(e)){var o=new Fe(e,r,n,i),s=r.properties||{};for(var a in s){var c=s[a];if(c!==void 0){if(c===null)throw new Yo('Unexpected null, expected schema in "properties"');typeof n.preValidateProperty=="function"&&n.preValidateProperty(e,a,c,n,i);var l=gO(e,a),u=this.validateSchema(l,c,n,i.makeChild(c,a));u.instance!==o.instance[a]&&(o.instance[a]=u.instance),o.importErrors(u)}}return o}};function VB(t,e,r,n,i,o){if(this.types.object(t)&&!(e.properties&&e.properties[i]!==void 0))if(e.additionalProperties===!1)o.addError({name:"additionalProperties",argument:i,message:"is not allowed to have the additional property "+JSON.stringify(i)});else{var s=e.additionalProperties||{};typeof r.preValidateProperty=="function"&&r.preValidateProperty(t,i,s,r,n);var a=this.validateSchema(t[i],s,r,n.makeChild(s,i));a.instance!==o.instance[i]&&(o.instance[i]=a.instance),o.importErrors(a)}}Le.patternProperties=function(e,r,n,i){if(this.types.object(e)){var o=new Fe(e,r,n,i),s=r.patternProperties||{};for(var a in e){var c=!0;for(var l in s){var u=s[l];if(u!==void 0){if(u===null)throw new Yo('Unexpected null, expected schema in "patternProperties"');try{var d=new RegExp(l,"u")}catch{d=new RegExp(l)}if(d.test(a)){c=!1,typeof n.preValidateProperty=="function"&&n.preValidateProperty(e,a,u,n,i);var f=this.validateSchema(e[a],u,n,i.makeChild(u,a));f.instance!==o.instance[a]&&(o.instance[a]=f.instance),o.importErrors(f)}}}c&&VB.call(this,e,r,n,i,a,o)}return o}};Le.additionalProperties=function(e,r,n,i){if(this.types.object(e)){if(r.patternProperties)return null;var o=new Fe(e,r,n,i);for(var s in e)VB.call(this,e,r,n,i,s,o);return o}};Le.minProperties=function(e,r,n,i){if(this.types.object(e)){var o=new Fe(e,r,n,i),s=Object.keys(e);return s.length>=r.minProperties||o.addError({name:"minProperties",argument:r.minProperties,message:"does not meet minimum property length of "+r.minProperties}),o}};Le.maxProperties=function(e,r,n,i){if(this.types.object(e)){var o=new Fe(e,r,n,i),s=Object.keys(e);return s.length<=r.maxProperties||o.addError({name:"maxProperties",argument:r.maxProperties,message:"does not meet maximum property length of "+r.maxProperties}),o}};Le.items=function(e,r,n,i){var o=this;if(this.types.array(e)&&r.items!==void 0){var s=new Fe(e,r,n,i);return e.every(function(a,c){if(Array.isArray(r.items))var l=r.items[c]===void 0?r.additionalItems:r.items[c];else var l=r.items;if(l===void 0)return!0;if(l===!1)return s.addError({name:"items",message:"additionalItems not permitted"}),!1;var u=o.validateSchema(a,l,n,i.makeChild(l,c));return u.instance!==s.instance[c]&&(s.instance[c]=u.instance),s.importErrors(u),!0}),s}};Le.contains=function(e,r,n,i){var o=this;if(this.types.array(e)&&r.contains!==void 0){if(!en.isSchema(r.contains))throw new Error('Expected "contains" keyword to be a schema');var s=new Fe(e,r,n,i),a=e.some(function(c,l){var u=o.validateSchema(c,r.contains,n,i.makeChild(r.contains,l));return u.errors.length===0});return a===!1&&s.addError({name:"contains",argument:r.contains,message:"must contain an item matching given schema"}),s}};Le.minimum=function(e,r,n,i){if(this.types.number(e)){var o=new Fe(e,r,n,i);return r.exclusiveMinimum&&r.exclusiveMinimum===!0?e>r.minimum||o.addError({name:"minimum",argument:r.minimum,message:"must be greater than "+r.minimum}):e>=r.minimum||o.addError({name:"minimum",argument:r.minimum,message:"must be greater than or equal to "+r.minimum}),o}};Le.maximum=function(e,r,n,i){if(this.types.number(e)){var o=new Fe(e,r,n,i);return r.exclusiveMaximum&&r.exclusiveMaximum===!0?er.exclusiveMinimum;return s||o.addError({name:"exclusiveMinimum",argument:r.exclusiveMinimum,message:"must be strictly greater than "+r.exclusiveMinimum}),o}};Le.exclusiveMaximum=function(e,r,n,i){if(typeof r.exclusiveMaximum!="boolean"&&this.types.number(e)){var o=new Fe(e,r,n,i),s=e=r.minLength||o.addError({name:"minLength",argument:r.minLength,message:"does not meet minimum length of "+r.minLength}),o}};Le.maxLength=function(e,r,n,i){if(this.types.string(e)){var o=new Fe(e,r,n,i),s=e.match(/[\uDC00-\uDFFF]/g),a=e.length-(s?s.length:0);return a<=r.maxLength||o.addError({name:"maxLength",argument:r.maxLength,message:"does not meet maximum length of "+r.maxLength}),o}};Le.minItems=function(e,r,n,i){if(this.types.array(e)){var o=new Fe(e,r,n,i);return e.length>=r.minItems||o.addError({name:"minItems",argument:r.minItems,message:"does not meet minimum length of "+r.minItems}),o}};Le.maxItems=function(e,r,n,i){if(this.types.array(e)){var o=new Fe(e,r,n,i);return e.length<=r.maxItems||o.addError({name:"maxItems",argument:r.maxItems,message:"does not meet maximum length of "+r.maxItems}),o}};function zge(t,e,r){var n,i=r.length;for(n=e+1,i;n{"use strict";var yO=Jo();_O.exports.SchemaScanResult=YB;function YB(t,e){this.id=t,this.ref=e}_O.exports.scan=function(e,r){function n(c,l){if(!l||typeof l!="object")return;if(l.$ref){let p=yO.resolveUrl(c,l.$ref);a[p]=a[p]?a[p]+1:0;return}var u=l.$id||l.id;let d=yO.resolveUrl(c,u);var f=u?d:c;if(f){if(f.indexOf("#")<0&&(f+="#"),s[f]){if(!yO.deepCompareStrict(s[f],l))throw new Error("Schema <"+f+"> already exists with different definition");return s[f]}s[f]=l,f[f.length-1]=="#"&&(s[f.substring(0,f.length-1)]=l)}i(f+"/items",Array.isArray(l.items)?l.items:[l.items]),i(f+"/extends",Array.isArray(l.extends)?l.extends:[l.extends]),n(f+"/additionalItems",l.additionalItems),o(f+"/properties",l.properties),n(f+"/additionalProperties",l.additionalProperties),o(f+"/definitions",l.definitions),o(f+"/patternProperties",l.patternProperties),o(f+"/dependencies",l.dependencies),i(f+"/disallow",l.disallow),i(f+"/allOf",l.allOf),i(f+"/anyOf",l.anyOf),i(f+"/oneOf",l.oneOf),n(f+"/not",l.not)}function i(c,l){if(Array.isArray(l))for(var u=0;u{"use strict";var XB=JB(),Xo=Jo(),QB=l_().scan,eH=Xo.ValidatorResult,Uge=Xo.ValidatorResultError,wf=Xo.SchemaError,tH=Xo.SchemaContext,qge="/",Wt=function t(){this.customFormats=Object.create(t.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(xi),this.attributes=Object.create(XB.validators)};Wt.prototype.customFormats={};Wt.prototype.schemas=null;Wt.prototype.types=null;Wt.prototype.attributes=null;Wt.prototype.unresolvedRefs=null;Wt.prototype.addSchema=function(e,r){var n=this;if(!e)return null;var i=QB(r||qge,e),o=r||e.$id||e.id;for(var s in i.id)this.schemas[s]=i.id[s];for(var s in i.ref)this.unresolvedRefs.push(s);return this.unresolvedRefs=this.unresolvedRefs.filter(function(a){return typeof n.schemas[a]>"u"}),this.schemas[o]};Wt.prototype.addSubSchemaArray=function(e,r){if(Array.isArray(r))for(var n=0;n",e);var a=Xo.objectGetPath(n.schemas[s],o.substr(1));if(a===void 0)throw new wf("no such schema "+o+" located in <"+s+">",e);return{subschema:a,switchSchema:r}};Wt.prototype.testType=function(e,r,n,i,o){if(o!==void 0){if(o===null)throw new wf('Unexpected null in "type" keyword');if(typeof this.types[o]=="function")return this.types[o].call(this,e);if(o&&typeof o=="object"){var s=this.validateSchema(e,o,n,i);return s===void 0||!(s&&s.errors.length)}return!0}};var xi=Wt.prototype.types={};xi.string=function(e){return typeof e=="string"};xi.number=function(e){return typeof e=="number"&&isFinite(e)};xi.integer=function(e){return typeof e=="number"&&e%1===0};xi.boolean=function(e){return typeof e=="boolean"};xi.array=function(e){return Array.isArray(e)};xi.null=function(e){return e===null};xi.date=function(e){return e instanceof Date};xi.any=function(e){return!0};xi.object=function(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof Date)};nH.exports=Wt});var oH=v((cYe,so)=>{"use strict";var Bge=so.exports.Validator=iH();so.exports.ValidatorResult=Jo().ValidatorResult;so.exports.ValidatorResultError=Jo().ValidatorResultError;so.exports.ValidationError=Jo().ValidationError;so.exports.SchemaError=Jo().SchemaError;so.exports.SchemaScanResult=l_().SchemaScanResult;so.exports.scan=l_().scan;so.exports.validate=function(t,e,r){var n=new Bge;return n.validate(t,e,r)}});import{readFileSync as Hge}from"node:fs";import{dirname as Gge,join as Zge}from"node:path";import{fileURLToPath as Vge}from"node:url";function Xge(t){let e=Yge.validate(t,Jge);return e.valid?{valid:!0,errors:[]}:{valid:!1,errors:e.errors.map(n=>`${n.property}: ${n.message}`)}}function aH(t){let e=Xge(t);if(!e.valid)throw new Error(`spec.yaml invalid:
+`,c=Math.max(0,s-a.length);return{path:t,text:i.slice(0,c)+a,truncated:!0,bytes:o}}var sye,gH,aye,T_=y(()=>{"use strict";sye=new Set([".ts",".tsx",".js",".jsx",".mjs",".cjs",".py",".rs",".go",".java",".kt",".kts",".cs",".rb",".php",".swift",".c",".h",".cpp",".hpp",".css",".scss",".sql",".sh",".yaml",".yml",".json",".md",".toml"]),gH=2e6,aye="\0"});function uye(t){for(let i of lye)if(t.startsWith(i))return null;let e=t.indexOf("#"),n=(e>=0?t.slice(0,e):t).trim();return n.length>0?n:null}function DO(t,e,r){let n=t.get(e);n||(n=new Set,t.set(e,n)),n.add(r)}function dye(t){let e=new Map,r=new Map,n=new Map;for(let i of t.features??[]){let o=i.id;for(let s of i.depends_on??[])DO(e,s,o);for(let s of i.modules??[])DO(r,s,o);for(let s of i.acceptance_criteria??[])for(let a of s.test_refs??[]){let c=uye(a);c&&DO(n,c,o)}}return{dependents:e,moduleOwners:r,testRefCitations:n}}function En(t){let e=_H.get(t);return e||(e=dye(t),_H.set(t,e)),e}var lye,_H,Sa=y(()=>{"use strict";lye=["derived:","fixture:","script:","self-dogfood:"];_H=new WeakMap});function NO(t,e,r=1/0){let n=new Set,i=new Set(t),o=[...i],s=0;for(;o.length>0&&sn.id===e)??r.find(n=>n.slug===e)??null}function br(t,e,r={}){let n=r.depth??1/0,i=En(t),o=new Map((t.features??[]).map(_=>[_.id,_])),s=[],a,c=fye(t,e);if(c)s=[c];else{let _=i.moduleOwners.get(e);_&&_.size>0&&(a=e,s=[..._].map(S=>o.get(S)).filter(S=>!!S))}if(s.length===0)return{not_found:e,accepted_forms:["feature id (F-\u2026)","slug","module path (e.g. src/spec/load.ts)"],discovery:"grep spec/index.yaml \u2014 one line per feature (run clad sync if missing); module paths live in each shard\u2019s modules:; if the query is a file, fall back to normal code search \u2014 the graph only knows declared modules"};let l=s.map(_=>_.id),u=NO(l,i.dependents,n),d=[...u].map(_=>o.get(_)).filter(_=>!!_).map(_=>({id:_.id,title:_.title,status:_.status})).sort((_,S)=>_.id.localeCompare(S.id)),f=new Set([...l,...u]),p=[...f].map(_=>o.get(_)).filter(_=>!!_),m=[...new Set(p.flatMap(_=>_.modules??[]))].sort(),h=(t.scenarios??[]).filter(_=>(_.features??[]).some(S=>f.has(S))).map(_=>({id:_.id,title:_.title})).sort((_,S)=>_.id.localeCompare(S.id)),g=[...new Set(p.flatMap(_=>(_.acceptance_criteria??[]).flatMap(S=>S.test_refs??[])))].sort();return{focus:a?{module:a,owners:[...l].sort()}:{id:s[0].id,title:s[0].title,status:s[0].status},impacted:d,impacted_modules:m,scenarios:h,test_refs:g,ledger:jO(i)}}var wa=y(()=>{"use strict";Sa()});function bH(t){return t.impacted.length}function R_(t,e,r={}){let n=r.initialDepth??O_.initialDepth,i=r.maxDepth??O_.maxDepth,o=r.coverageThreshold??O_.coverageThreshold,s=r.marginYieldThreshold??O_.marginYieldThreshold,a=En(t),c=new Map((t.features??[]).map(b=>[b.id,b])),l=[],u=(t.features??[]).find(b=>b.id===e||b.slug===e);if(u)l=[u.id];else{let b=a.moduleOwners.get(e);b&&b.size>0&&(l=[...b].filter(_=>c.has(_)))}if(l.length===0){let b=br(t,e,{depth:1});return"not_found"in b,b}let d=NO(l,a.dependents,1/0).size;if(d===0){let b=br(t,e,{depth:n});return"not_found"in b?b:{slice:b,depthUsed:n,stoppedBy:"no-known-dependents",analysis:{frontierExhausted:!0,coverage:null,marginalYields:[0],totalKnownDependents:0}}}let f=[],p=0,m=null;for(let b=n;b<=i;b++){let _=br(t,e,{depth:b});if("not_found"in _)return _;m=_;let S=bH(_),x=S-p,w=S>0?x/S:0;f.push(w);let O=d>0?S/d:1,T=x===0&&b>n,A={frontierExhausted:T,coverage:O,marginalYields:[...f],totalKnownDependents:d};if(T)return{slice:_,depthUsed:b,stoppedBy:"exhaustion",analysis:A};if(O>=o)return{slice:_,depthUsed:b,stoppedBy:"coverage",analysis:A};if(f.length>=2&&f[f.length-1]0?g/d:1,marginalYields:[...f],totalKnownDependents:d}}}var O_,MO=y(()=>{"use strict";wa();Sa();O_={initialDepth:1,maxDepth:10,coverageThreshold:.9,marginYieldThreshold:.05}});function pye(t,e){let r=new Set,n=[t];for(;n.length>0;){let i=n.pop();if(!i||r.has(i))continue;r.add(i);let o=e.get(i);for(let s of o?.depends_on??[])n.push(s)}return r}function vH(t,e){let r=new Map(t.features.map(a=>[a.id,a]));if(!r.has(e))return t;let n=pye(e,r),i=t.features.filter(a=>n.has(a.id)),o=(t.scenarios??[]).filter(a=>(a.features??[]).some(c=>n.has(c)));return{...t,features:i,scenarios:o}}var SH=y(()=>{"use strict"});function mye(t,e){let r=t.features??[];return r.find(n=>n.id===e)??r.find(n=>n.slug===e)??r.find(n=>(n.modules??[]).includes(e))??null}function ll(t,e){let r=mye(t,e);if(!r)return{not_found:e,accepted_forms:["feature id (F-\u2026)","slug","module path (e.g. src/auth/login.ts)"],discovery:"grep spec/index.yaml \u2014 one line per feature (id, slug, status; run clad sync if missing); if the query is a file, fall back to normal code search \u2014 the graph only knows declared modules"};let n=vH(t,r.id),i=(n.features??[]).filter(c=>c.id!==r.id).map(c=>({id:c.id,title:c.title,status:c.status})).sort((c,l)=>c.id.localeCompare(l.id)),o=(n.scenarios??[]).map(c=>({id:c.id,title:c.title})).sort((c,l)=>c.id.localeCompare(l.id)),s=(t.project?.ai_hints?.preferred_patterns??[]).map(c=>({when:c.when,prefer:c.prefer,...c.over!==void 0?{over:c.over}:{}})),a=[...new Set((r.acceptance_criteria??[]).flatMap(c=>c.test_refs??[]))].sort();return{focus:r,ancestors:i,scenarios:o,preferred_patterns:s,test_refs:a}}var I_=y(()=>{"use strict";SH()});import{existsSync as xH,readdirSync as hye,readFileSync as gye}from"node:fs";import{join as LO}from"node:path";function zO(t,e=_ye){let r=t.trim().replace(/\s+/g," ");return r.length<=e?r:`${r.slice(0,e-1)}\u2026`}function bye(t){let e=t.payload??{};if(t.type==="drift_detected"){let n=typeof e.gate=="string"&&e.gate?e.gate:"drift";return{detector:n,message:zO(`drift detected at gate ${n}`)}}let r=typeof e.worst=="number"?` (worst ${e.worst})`:"";return{detector:"done_attempted",message:zO(`done reverted \u2014 pre-push strict gate red${r}`)}}function wH(t){let e=Date.parse(t.timestamp);return Number.isFinite(e)?e:0}function vye(t){let e=[];t.lastFailedGate&&e.push(`failed ${t.lastFailedGate}`),typeof t.retryCount=="number"&&e.push(`${t.retryCount} retries`);let r=e.length?` (${e.join(", ")})`:"",n=t.recovery?`recover: ${t.recovery}${r}`:`rolled back${r}`;return zO(n)}function Sye(t,e,r,n={}){let i=t.filter(m=>m&&m.payload&&m.payload.feature===r),o=e.filter(m=>m&&m.featureId===r).slice().sort((m,h)=>wH(m)-wH(h)),s=i.filter(m=>m.type==="drift_detected"||m.type==="done_attempted"&&m.payload.kept===!1),a=i.filter(m=>m.type==="feature_rolled_back");if(s.length===0&&a.length===0&&o.length===0)return;let c=o.length?o[o.length-1]:void 0,l;for(let m=s.length-1;m>=0;m--){let h=s[m].payload.gate;if(s[m].type==="drift_detected"&&typeof h=="string"&&h){l=h;break}}!l&&c?.lastFailedGate&&(l=c.lastFailedGate);let u=s.slice(-yye).map(bye),d;for(let m=a.length-1;m>=0;m--){let h=a[m].payload.to_git_head;if(typeof h=="string"&&h){d=h;break}}let f=typeof c?.retryCount=="number"?c.retryCount:void 0,p=c?vye(c):void 0;return{attempts:s.length,...l?{last_failed_gate:l}:{},...f!==void 0?{retry_count:f}:{},...u.length?{drift_history:u}:{},...d?{rolled_back_at:d}:{},...p?{recovery_hint:p}:{},...n.truncated?{truncated_history:!0}:{}}}function FO(t,e){let r=t.match(e);return r&&r[1]?r[1].trim():void 0}function wye(t){let e=t.indexOf("## Recommended recovery");if(e<0)return;let r=t.slice(e).match(/```[^\n]*\n([\s\S]*?)```/);return r&&r[1].split(`
+`).map(i=>i.trim()).find(i=>i.length>0)||void 0}function xye(t,e,r){let n=FO(t,/_Rolled back at_\s*`([^`]+)`/),i=FO(t,/Last failed gate:\s*`([^`]+)`/),o=FO(t,/Retry attempts:\s*(\d+)/),s=wye(t);return{featureId:e,timestamp:n??r,...i?{lastFailedGate:i}:{},...o?{retryCount:Number(o)}:{},...s?{recovery:s}:{}}}function $ye(t,e){let r=LO(t,".cladding","post-mortems");if(!xH(r))return[];let n=`post-mortem-${e}-`,i=[];for(let o of hye(r))if(!(!o.startsWith(n)||!o.endsWith(".md")))try{i.push(xye(gye(LO(r,o),"utf8"),e,o))}catch{}return i}function $H(t,e){try{let r=$_(t),n=$ye(t,e),i=xH(LO(t,".cladding","events.log.1.jsonl"));return Sye(r,n,e,{truncated:i})}catch{return}}var yye,_ye,kH=y(()=>{"use strict";Nr();yye=5,_ye=120});function P_(t,e,r){return en(JSON.stringify({...t,needs:e,must_edit:{...t.must_edit,code:r}}))}function xa(t,e,r={}){let n=r.cwd??".",i=r.maxTokens&&r.maxTokens>0?r.maxTokens:kye,o=e,s,a=En(t).moduleOwners.get(e);if(a&&a.size>0){let se=[...a].sort();o=se[0],se.length>1&&(s=se)}let c=ll(t,o);if("not_found"in c)return c;let l=c.focus,u=$H(n,l.id),d=a&&a.size>0?e:l.id,f=R_(t,d),p="not_found"in f?null:f.slice,m=p?p.impacted:[],h=p?p.test_refs:[],g="not_found"in f?null:{depth:f.depthUsed,stopped_by:f.stoppedBy,coverage:f.analysis.coverage===null?null:Math.round(f.analysis.coverage*100)/100,total_known_dependents:f.analysis.totalKnownDependents},b=l.acceptance_criteria??[],_=b.filter(se=>se.ears==="unwanted"||se.ears==="state").map(se=>({id:se.id,ears:String(se.ears)})),S=[...new Set(b.flatMap(se=>se.oracle_refs??[]))].sort(),x=[],w={must_edit:{id:l.id,title:l.title,status:l.status,modules:l.modules??[],acceptance_criteria:b,code:[],...s?{co_owners:s}:{}},needs:c.ancestors,breaks_if_changed:{impacted:m,regression_tests:h,...g?{radius:g}:{}},verify:{scenarios:c.scenarios,test_refs:c.test_refs,oracle_refs:S,high_risk_acs:_},guidance:{preferred_patterns:c.preferred_patterns},budget:{max_tokens:i,used_tokens:0,truncated:x}},O=[...c.ancestors];for(;O.length>Eye&&P_(w,O,[])>i;)O.pop();O.lengthi){x.push(`code: omitted ${se} (budget)`);continue}A.push(Kt),Kt.truncated&&x.push(`code: clipped ${se}`)}T>i&&x.push("must-edit exceeds budget \u2014 retained in full (focus is never dropped)");let D=(se,Ce)=>({impacted:se,regression_tests:Ce,...g?{radius:g}:{},...p?.ledger?{ledger:p.ledger}:{}}),$=(se,Ce,Kt,dr)=>{let Yt=Kt+dr>0?[`breaks: omitted ${Kt} feature(s) / ${dr} test(s)`]:[],co={...w,needs:O,must_edit:{...w.must_edit,code:A},breaks_if_changed:D(se,Ce),budget:{...w.budget,truncated:[...x,...Yt]}};return en(JSON.stringify(co))>i},ie=m,K=h;if($(ie,K,0,0)){let se=br(t,d,{depth:1}),Ce=new Set("not_found"in se?[]:se.impacted.map(de=>de.id)),Kt=new Set("not_found"in se?[]:se.test_refs),Yt=[...m.filter(de=>Ce.has(de.id)),...m.filter(de=>!Ce.has(de.id))],co=0;for(;Yt.length>Ce.size&&$(Yt,K,co,0);)Yt=Yt.slice(0,-1),co++;let wi=[...h],Yr=0;for(;$(Yt,wi,co,Yr);){let de=-1;for(let lo=wi.length-1;lo>=0;lo--)if(!Kt.has(wi[lo])){de=lo;break}if(de<0)break;wi.splice(de,1),Yr++}ie=Yt,K=wi,co+Yr>0&&x.push(`breaks: omitted ${co} feature(s) / ${Yr} test(s)`),$(ie,K,0,0)&&x.push("breaks: direct set retained in full \u2014 exceeds budget")}let xe=D(ie,K),C={...w,needs:O,must_edit:{...w.must_edit,code:A},breaks_if_changed:xe},P=C;if(u){let se={...C,prior_attempts:u};en(JSON.stringify(se))<=i?P=se:x.push("prior_attempts: omitted (budget)")}let Ir=en(JSON.stringify(P));return{...P,budget:{max_tokens:i,used_tokens:Ir,truncated:x}}}var kye,Eye,C_=y(()=>{"use strict";T_();I_();MO();kH();wa();Sa();kye=3e3,Eye=3});function Jn(t){if(t.length===0)return 0;let e=[...t].sort((n,i)=>n-i),r=Math.floor(e.length/2);return e.length%2?e[r]:(e[r-1]+e[r])/2}function Aye(t,e){if(t.length===0)return 0;let r=[...t].sort((n,i)=>n-i);return r[Math.min(r.length-1,Math.floor(e/100*r.length))]}function EH(t,e,r="."){let n=En(t),i=t.features??[],o=[];for(let f of i){let p=xa(t,f.id,{cwd:r,read:e});if("not_found"in p)continue;let m=xa(t,f.id,{cwd:r,read:e,maxTokens:Number.MAX_SAFE_INTEGER}),h=R_(t,f.id),g=!("not_found"in h),b=en(JSON.stringify(p)),_="not_found"in m?b:en(JSON.stringify(m)),S=en(JSON.stringify(f));for(let O of f.modules??[]){let T=e(O);T&&(S+=en(T))}let x=(f.depends_on??[]).length,w=n.dependents.get(f.id)?.size??0;o.push({id:f.id,sliceTokens:b,structuralTokens:_,naiveTokens:S,contextRatio:S>0?b/S:1,budgetSaturated:p.budget.truncated.length>0,searchDepth:g?h.depthUsed:1,edgesResolved:x+w,stoppedBy:g?h.stoppedBy:"n/a",coverage:g?h.analysis.coverage:1,regressionTests:p.breaks_if_changed.regression_tests.length})}o.sort((f,p)=>f.id.localeCompare(p.id));let s=o.map(f=>f.contextRatio),a=f=>f.filter(p=>p.sliceTokens>0).map(p=>p.naiveTokens/p.sliceTokens),c=o.filter(f=>!f.budgetSaturated),l=o.filter(f=>f.budgetSaturated),u=o.filter(f=>f.naiveTokens>0).map(f=>f.structuralTokens/f.naiveTokens),d={};for(let f of o)d[f.stoppedBy]=(d[f.stoppedBy]??0)+1;return{featureCount:i.length,measured:o.length,context:{medianContextRatio:Math.round(Jn(s)*1e3)/1e3,medianShrinkFactor:Math.round(Jn(a(o))*10)/10,fitsCount:c.length,truncatedCount:l.length,medianShrinkFit:Math.round(Jn(a(c))*10)/10,medianShrinkTruncated:Math.round(Jn(a(l))*10)/10,medianStructuralRatio:Math.round(Jn(u)*100)/100,medianSliceTokens:Math.round(Jn(o.map(f=>f.sliceTokens))),medianNaiveTokens:Math.round(Jn(o.map(f=>f.naiveTokens)))},search:{medianDepth:Jn(o.map(f=>f.searchDepth)),p95Depth:Aye(o.map(f=>f.searchDepth),95),medianEdges:Jn(o.map(f=>f.edgesResolved)),maxEdges:o.reduce((f,p)=>Math.max(f,p.edgesResolved),0)},stability:{byStopReason:d,medianCoverage:Math.round(Jn(o.map(f=>f.coverage).filter(f=>f!==null))*100)/100,medianRegressionTests:Jn(o.map(f=>f.regressionTests))},features:o}}var ul,D_=y(()=>{"use strict";T_();MO();C_();Sa();ul="(deterministic upper bound vs the shard+all-modules baseline \u2014 not an agent-adoption measurement)"});import{appendFileSync as Tye,existsSync as UO,mkdirSync as Oye,readFileSync as AH}from"node:fs";import{dirname as Rye,join as Iye}from"node:path";function qO(t){return Iye(t,Pye,Cye)}function Dye(t,e){return{timestamp:new Date().toISOString(),head:va(t),spec_digest:PO(t),featureCount:e.featureCount,measured:e.measured,context:e.context,search:e.search,stability:e.stability}}function TH(t,e){try{let r=Dye(t,e);if(r.head===null)return{appended:!1,reason:"no_head"};let n=BO(t),i=n[n.length-1];if(i&&i.head===r.head&&i.spec_digest===r.spec_digest)return{appended:!1,reason:"deduped"};let o=qO(t),s=Rye(o);return UO(s)||Oye(s,{recursive:!0}),Tye(o,`${JSON.stringify(r)}
+`,"utf8"),{appended:!0,reason:"appended"}}catch{return{appended:!1,reason:"error"}}}function OH(t){let e=[];for(let r of t.split(`
+`)){let n=r.trim();if(n.length!==0)try{let i=JSON.parse(n);i&&typeof i=="object"&&i.context&&i.search&&i.stability&&e.push(i)}catch{}}return e}function BO(t,e){let r=qO(t);if(!UO(r))return[];let n;try{n=AH(r,"utf8")}catch{return[]}let i=OH(n);return typeof e=="number"&&e>=0?i.slice(-e):i}function RH(t){let e=qO(t);if(!UO(e))return{snapshots:[],unreadable:!1};let r;try{r=AH(e,"utf8")}catch{return{snapshots:[],unreadable:!0}}let n=OH(r),i=r.trim().length>0;return{snapshots:n,unreadable:i&&n.length===0}}function Mf(t,e=0){let r=e>0?Math.round(t*10**e)/10**e:Math.round(t),n=r.toFixed(e);return r>0?`+${n}`:n}function IH(t,e=5){let r=Math.max(0,t.length-e),i=[`measure trend \xB7 last ${t.slice(r).length} of ${t.length} snapshot(s)`];for(let o=r;o0?t[o-1]:null,c=(d,f=0)=>a?` (${Mf(d(s)-d(a),f)})`:"",l=s.timestamp.slice(0,19),u=s.head?s.head.slice(0,7):"nogit";i.push(` ${l} ${u} \xB7 ${s.featureCount} feat \xB7 slice ${s.context.medianSliceTokens}${c(d=>d.context.medianSliceTokens)} \xB7 struct ${s.context.medianStructuralRatio.toFixed(2)}${c(d=>d.context.medianStructuralRatio,2)} \xB7 cov ${s.stability.medianCoverage.toFixed(2)}${c(d=>d.stability.medianCoverage,2)} \xB7 p95depth ${s.search.p95Depth}${c(d=>d.search.p95Depth)} \xB7 trunc ${s.context.truncatedCount}${c(d=>d.context.truncatedCount)}`)}return i.push(` ${ul}`),i.join(`
+`)}var Pye,Cye,Ff=y(()=>{"use strict";jf();D_();Pye=".cladding",Cye="measure.jsonl"});import{existsSync as Nye}from"node:fs";import{join as jye}from"node:path";function dl(t){if(t.groups.reduce((i,o)=>i+o.features.length,0)===0&&t.unsharded_commits.length===0)return`no shipped changes since ${t.since}`;let r=[`# Changes since ${t.since}`,""];for(let i of t.groups){r.push(`## ${i.title}`,"");for(let o of i.features){r.push(`- **${o.title}** (${Mye[o.change]})`);for(let s of o.acceptance)r.push(` - ${s}`)}r.push("")}if(t.unsharded_commits.length>0){r.push("## Other changes (not yet spec-tracked)","");for(let i of t.unsharded_commits)r.push(`- ${i.subject}`);r.push("")}let n=t.inventory;for((n.before.features!==n.after.features||n.before.scenarios!==n.after.scenarios)&&r.push(`_Spec inventory: ${n.before.features} \u2192 ${n.after.features} features, ${n.before.scenarios} \u2192 ${n.after.scenarios} scenarios._`,"");r[r.length-1]==="";)r.pop();return r.join(`
+`)}function CH(t){let e=t.snapshot,r=["## Measured (this release)",""];if(!e||!e.head)return r.push("not measured at this commit \u2014 run clad measure before tagging"),r.join(`
+`);let n=e.context,i=e.stability;r.push(`- features measured: ${e.measured} of ${e.featureCount}`),r.push(`- median slice tokens: ${n.medianSliceTokens} vs ${n.medianNaiveTokens} naive`),r.push(`- median structural ratio: ${n.medianStructuralRatio.toFixed(2)}`),r.push(`- median coverage: ${i.medianCoverage.toFixed(2)}`),r.push(`- regression tests surfaced: ${i.medianRegressionTests}`);let o=t.sinceSnapshot;if(o){let s=t.sinceRef??(o.head?o.head.slice(0,7):"previous");r.push(`- since ${s}: slice ${Mf(n.medianSliceTokens-o.context.medianSliceTokens)} \xB7 struct ${Mf(n.medianStructuralRatio-o.context.medianStructuralRatio,2)} \xB7 cov ${Mf(i.medianCoverage-o.stability.medianCoverage,2)}`)}return r.push("",`head ${e.head.slice(0,7)} \xB7 spec_digest ${e.spec_digest}`,`reproduce: git checkout ${e.head} && clad measure`,"",ul),r.join(`
+`)}function fl(t,e,r){let n=[`# Audit \u2014 shipped changes since ${t.since}`,"","| feature | AC | EARS | verification refs |","|---|---|---|---|"],i=new Map(e.features.map(o=>[o.id,o]));for(let o of t.groups)for(let s of o.features){let a=i.get(s.id);if(!a){n.push(`| ${s.id} | \u2014 | \u2014 | (removed from spec \u2014 see git history at ${t.since}) |`);continue}let c=a.acceptance_criteria??[];if(c.length===0){n.push(`| ${a.id} | \u2014 | \u2014 | (no acceptance criteria) |`);continue}for(let l of c)n.push(`| ${a.id} | ${l.id} | ${l.ears??"\u2014"} | ${Lye(l,r)} |`)}return n.join(`
+`)}function Lye(t,e){let r=[...t.test_refs??[],...t.oracle_refs??[],...t.evidence_refs??[]];return r.length===0?"(none)":r.map(n=>{for(let[o,s]of Fye)if(n.startsWith(o))return`${n} (${s})`;let i=n.split("#",1)[0]??n;return`${Nye(jye(e,i))?"\u2713":"\u2717"} ${n}`}).join("
")}function pl(t){let e=[`# ${t.project.name} \u2014 capability catalog`,""],r=[...t.capabilities??[]].filter(s=>typeof s.id=="string"&&s.id.length>0).sort((s,a)=>s.id.localeCompare(a.id)),n=new Map(t.features.map(s=>[s.id,s])),i=new Set;for(let s of r){e.push(`## ${s.title??s.id}`,""),s.summary&&e.push(s.summary,"");for(let a of s.features??[]){let c=n.get(a);!c||c.status==="archived"||(i.add(a),PH(e,c))}}let o=t.features.filter(s=>!i.has(s.id)&&s.status!=="archived").sort((s,a)=>s.id.localeCompare(a.id));if(o.length>0){e.push("## Uncategorized","");for(let s of o)PH(e,s)}for(;e[e.length-1]==="";)e.pop();return e.join(`
+`)}function PH(t,e){t.push(`### ${e.title}`,"");for(let r of e.acceptance_criteria??[]){let n=EO(r);n&&t.push(`- ${n}`)}t.push("")}var Mye,Fye,N_=y(()=>{"use strict";Ff();D_();cl();Mye={"added-as-done":"new","flipped-to-done":"completed","modified-while-done":"updated",archived:"retired"};Fye=[["derived:","machine-suggested \u2014 not author-confirmed"],["self-dogfood:","verified by cladding running on itself"],["fixture:","conformance fixture"],["script:","npm script"]]});import{readFileSync as zye}from"node:fs";function Ai(t="./spec.yaml"){let e=zye(t,"utf8");return(0,DH.parse)(e)}var DH,j_=y(()=>{"use strict";DH=St(Qt(),1)});var is=v((jr,VO)=>{"use strict";var HO=jr.ValidationError=function(e,r,n,i,o,s){if(Array.isArray(i)?(this.path=i,this.property=i.reduce(function(c,l){return c+jH(l)},"instance")):i!==void 0&&(this.property=i),e&&(this.message=e),n){var a=n.$id||n.id;this.schema=a||n}r!==void 0&&(this.instance=r),this.name=o,this.argument=s,this.stack=this.toString()};HO.prototype.toString=function(){return this.property+" "+this.message};var M_=jr.ValidatorResult=function(e,r,n,i){this.instance=e,this.schema=r,this.options=n,this.path=i.path,this.propertyPath=i.propertyPath,this.errors=[],this.throwError=n&&n.throwError,this.throwFirst=n&&n.throwFirst,this.throwAll=n&&n.throwAll,this.disableFormat=n&&n.disableFormat===!0};M_.prototype.addError=function(e){var r;if(typeof e=="string")r=new HO(e,this.instance,this.schema,this.path);else{if(!e)throw new Error("Missing error detail");if(!e.message)throw new Error("Missing error message");if(!e.name)throw new Error("Missing validator type");r=new HO(e.message,this.instance,this.schema,this.path,e.name,e.argument)}if(this.errors.push(r),this.throwFirst)throw new $a(this);if(this.throwError)throw r;return r};M_.prototype.importErrors=function(e){typeof e=="string"||e&&e.validatorType?this.addError(e):e&&e.errors&&(this.errors=this.errors.concat(e.errors))};function Uye(t,e){return e+": "+t.toString()+`
+`}M_.prototype.toString=function(e){return this.errors.map(Uye).join("")};Object.defineProperty(M_.prototype,"valid",{get:function(){return!this.errors.length}});VO.exports.ValidatorResultError=$a;function $a(t){typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,$a),this.instance=t.instance,this.schema=t.schema,this.options=t.options,this.errors=t.errors}$a.prototype=new Error;$a.prototype.constructor=$a;$a.prototype.name="Validation Error";var NH=jr.SchemaError=function t(e,r){this.message=e,this.schema=r,Error.call(this,e),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)};NH.prototype=Object.create(Error.prototype,{constructor:{value:NH,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var GO=jr.SchemaContext=function(e,r,n,i,o){this.schema=e,this.options=r,Array.isArray(n)?(this.path=n,this.propertyPath=n.reduce(function(s,a){return s+jH(a)},"instance")):this.propertyPath=n,this.base=i,this.schemas=o};GO.prototype.resolve=function(e){return MH(this.base,e)};GO.prototype.makeChild=function(e,r){var n=r===void 0?this.path:this.path.concat([r]),i=e.$id||e.id;let o=MH(this.base,i||"");var s=new GO(e,this.options,n,o,Object.create(this.schemas));return i&&!s.schemas[o]&&(s.schemas[o]=e),s};var Yn=jr.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,duration:/P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"idn-email":/^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"uri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,iri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"iri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,"uri-template":/(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu,"json-pointer":/^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu,"relative-json-pointer":/^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"utc-millisec":function(t){return typeof t=="string"&&parseFloat(t)===parseInt(t,10)&&!isNaN(t)},regex:function(t){var e=!0;try{new RegExp(t)}catch{e=!1}return e},style:/[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/};Yn.regexp=Yn.regex;Yn.pattern=Yn.regex;Yn.ipv4=Yn["ip-address"];jr.isFormat=function(e,r,n){if(typeof e=="string"&&Yn[r]!==void 0){if(Yn[r]instanceof RegExp)return Yn[r].test(e);if(typeof Yn[r]=="function")return Yn[r](e)}else if(n&&n.customFormats&&typeof n.customFormats[r]=="function")return n.customFormats[r](e);return!0};var jH=jr.makeSuffix=function(e){return e=e.toString(),!e.match(/[.\s\[\]]/)&&!e.match(/^[\d]/)?"."+e:e.match(/^\d+$/)?"["+e+"]":"["+JSON.stringify(e)+"]"};jr.deepCompareStrict=function t(e,r){if(typeof e!=typeof r)return!1;if(Array.isArray(e))return!Array.isArray(r)||e.length!==r.length?!1:e.every(function(o,s){return t(e[s],r[s])});if(typeof e=="object"){if(!e||!r)return e===r;var n=Object.keys(e),i=Object.keys(r);return n.length!==i.length?!1:n.every(function(o){return t(e[o],r[o])})}return e===r};function qye(t,e,r,n){typeof r=="object"?e[n]=ZO(t[n],r):t.indexOf(r)===-1&&e.push(r)}function Bye(t,e,r){e[r]=t[r]}function Hye(t,e,r,n){typeof e[n]!="object"||!e[n]?r[n]=e[n]:t[n]?r[n]=ZO(t[n],e[n]):r[n]=e[n]}function ZO(t,e){var r=Array.isArray(e),n=r&&[]||{};return r?(t=t||[],n=n.concat(t),e.forEach(qye.bind(null,t,n))):(t&&typeof t=="object"&&Object.keys(t).forEach(Bye.bind(null,t,n)),Object.keys(e).forEach(Hye.bind(null,t,e,n))),n}VO.exports.deepMerge=ZO;jr.objectGetPath=function(e,r){for(var n=r.split("/").slice(1),i;typeof(i=n.shift())=="string";){var o=decodeURIComponent(i.replace(/~0/,"~").replace(/~1/g,"/"));if(!(o in e))return;e=e[o]}return e};function Gye(t){return"/"+encodeURIComponent(t).replace(/~/g,"%7E")}jr.encodePath=function(e){return e.map(Gye).join("")};jr.getDecimalPlaces=function(e){var r=0;if(isNaN(e))return r;typeof e!="number"&&(e=Number(e));var n=e.toString().split("e");if(n.length===2){if(n[1][0]!=="-")return r;r=Number(n[1].slice(1))}var i=n[0].split(".");return i.length===2&&(r+=i[1].length),r};jr.isSchema=function(e){return typeof e=="object"&&e||typeof e=="boolean"};var MH=jr.resolveUrl=function(e,r){let n=new URL(r,new URL(e,"resolve://"));if(n.protocol==="resolve:"){let{pathname:i,search:o,hash:s}=n;return i+o+s}return n.toString()}});var UH=v((VXe,zH)=>{"use strict";var tn=is(),Le=tn.ValidatorResult,os=tn.SchemaError,WO={};WO.ignoreProperties={id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0};var ze=WO.validators={};ze.type=function(e,r,n,i){if(e===void 0)return null;var o=new Le(e,r,n,i),s=Array.isArray(r.type)?r.type:[r.type];if(!s.some(this.testType.bind(this,e,r,n,i))){var a=s.map(function(c){if(c){var l=c.$id||c.id;return l?"<"+l+">":c+""}});o.addError({name:"type",argument:a,message:"is not of a type(s) "+a})}return o};function KO(t,e,r,n,i){var o=e.throwError,s=e.throwAll;e.throwError=!1,e.throwAll=!1;var a=this.validateSchema(t,i,e,r);return e.throwError=o,e.throwAll=s,!a.valid&&n instanceof Function&&n(a),a.valid}ze.anyOf=function(e,r,n,i){if(e===void 0)return null;var o=new Le(e,r,n,i),s=new Le(e,r,n,i);if(!Array.isArray(r.anyOf))throw new os("anyOf must be an array");if(!r.anyOf.some(KO.bind(this,e,n,i,function(c){s.importErrors(c)}))){var a=r.anyOf.map(function(c,l){var u=c.$id||c.id;return u?"<"+u+">":c.title&&JSON.stringify(c.title)||c.$ref&&"<"+c.$ref+">"||"[subschema "+l+"]"});n.nestedErrors&&o.importErrors(s),o.addError({name:"anyOf",argument:a,message:"is not any of "+a.join(",")})}return o};ze.allOf=function(e,r,n,i){if(e===void 0)return null;if(!Array.isArray(r.allOf))throw new os("allOf must be an array");var o=new Le(e,r,n,i),s=this;return r.allOf.forEach(function(a,c){var l=s.validateSchema(e,a,n,i);if(!l.valid){var u=a.$id||a.id,d=u||a.title&&JSON.stringify(a.title)||a.$ref&&"<"+a.$ref+">"||"[subschema "+c+"]";o.addError({name:"allOf",argument:{id:d,length:l.errors.length,valid:l},message:"does not match allOf schema "+d+" with "+l.errors.length+" error[s]:"}),o.importErrors(l)}}),o};ze.oneOf=function(e,r,n,i){if(e===void 0)return null;if(!Array.isArray(r.oneOf))throw new os("oneOf must be an array");var o=new Le(e,r,n,i),s=new Le(e,r,n,i),a=r.oneOf.filter(KO.bind(this,e,n,i,function(l){s.importErrors(l)})).length,c=r.oneOf.map(function(l,u){var d=l.$id||l.id;return d||l.title&&JSON.stringify(l.title)||l.$ref&&"<"+l.$ref+">"||"[subschema "+u+"]"});return a!==1&&(n.nestedErrors&&o.importErrors(s),o.addError({name:"oneOf",argument:c,message:"is not exactly one from "+c.join(",")})),o};ze.if=function(e,r,n,i){if(e===void 0)return null;if(!tn.isSchema(r.if))throw new Error('Expected "if" keyword to be a schema');var o=KO.call(this,e,n,i,null,r.if),s=new Le(e,r,n,i),a;if(o){if(r.then===void 0)return;if(!tn.isSchema(r.then))throw new Error('Expected "then" keyword to be a schema');a=this.validateSchema(e,r.then,n,i.makeChild(r.then)),s.importErrors(a)}else{if(r.else===void 0)return;if(!tn.isSchema(r.else))throw new Error('Expected "else" keyword to be a schema');a=this.validateSchema(e,r.else,n,i.makeChild(r.else)),s.importErrors(a)}return s};function JO(t,e){if(Object.hasOwnProperty.call(t,e))return t[e];if(e in t){for(;t=Object.getPrototypeOf(t);)if(Object.propertyIsEnumerable.call(t,e))return t[e]}}ze.propertyNames=function(e,r,n,i){if(this.types.object(e)){var o=new Le(e,r,n,i),s=r.propertyNames!==void 0?r.propertyNames:{};if(!tn.isSchema(s))throw new os('Expected "propertyNames" to be a schema (object or boolean)');for(var a in e)if(JO(e,a)!==void 0){var c=this.validateSchema(a,s,n,i.makeChild(s));o.importErrors(c)}return o}};ze.properties=function(e,r,n,i){if(this.types.object(e)){var o=new Le(e,r,n,i),s=r.properties||{};for(var a in s){var c=s[a];if(c!==void 0){if(c===null)throw new os('Unexpected null, expected schema in "properties"');typeof n.preValidateProperty=="function"&&n.preValidateProperty(e,a,c,n,i);var l=JO(e,a),u=this.validateSchema(l,c,n,i.makeChild(c,a));u.instance!==o.instance[a]&&(o.instance[a]=u.instance),o.importErrors(u)}}return o}};function FH(t,e,r,n,i,o){if(this.types.object(t)&&!(e.properties&&e.properties[i]!==void 0))if(e.additionalProperties===!1)o.addError({name:"additionalProperties",argument:i,message:"is not allowed to have the additional property "+JSON.stringify(i)});else{var s=e.additionalProperties||{};typeof r.preValidateProperty=="function"&&r.preValidateProperty(t,i,s,r,n);var a=this.validateSchema(t[i],s,r,n.makeChild(s,i));a.instance!==o.instance[i]&&(o.instance[i]=a.instance),o.importErrors(a)}}ze.patternProperties=function(e,r,n,i){if(this.types.object(e)){var o=new Le(e,r,n,i),s=r.patternProperties||{};for(var a in e){var c=!0;for(var l in s){var u=s[l];if(u!==void 0){if(u===null)throw new os('Unexpected null, expected schema in "patternProperties"');try{var d=new RegExp(l,"u")}catch{d=new RegExp(l)}if(d.test(a)){c=!1,typeof n.preValidateProperty=="function"&&n.preValidateProperty(e,a,u,n,i);var f=this.validateSchema(e[a],u,n,i.makeChild(u,a));f.instance!==o.instance[a]&&(o.instance[a]=f.instance),o.importErrors(f)}}}c&&FH.call(this,e,r,n,i,a,o)}return o}};ze.additionalProperties=function(e,r,n,i){if(this.types.object(e)){if(r.patternProperties)return null;var o=new Le(e,r,n,i);for(var s in e)FH.call(this,e,r,n,i,s,o);return o}};ze.minProperties=function(e,r,n,i){if(this.types.object(e)){var o=new Le(e,r,n,i),s=Object.keys(e);return s.length>=r.minProperties||o.addError({name:"minProperties",argument:r.minProperties,message:"does not meet minimum property length of "+r.minProperties}),o}};ze.maxProperties=function(e,r,n,i){if(this.types.object(e)){var o=new Le(e,r,n,i),s=Object.keys(e);return s.length<=r.maxProperties||o.addError({name:"maxProperties",argument:r.maxProperties,message:"does not meet maximum property length of "+r.maxProperties}),o}};ze.items=function(e,r,n,i){var o=this;if(this.types.array(e)&&r.items!==void 0){var s=new Le(e,r,n,i);return e.every(function(a,c){if(Array.isArray(r.items))var l=r.items[c]===void 0?r.additionalItems:r.items[c];else var l=r.items;if(l===void 0)return!0;if(l===!1)return s.addError({name:"items",message:"additionalItems not permitted"}),!1;var u=o.validateSchema(a,l,n,i.makeChild(l,c));return u.instance!==s.instance[c]&&(s.instance[c]=u.instance),s.importErrors(u),!0}),s}};ze.contains=function(e,r,n,i){var o=this;if(this.types.array(e)&&r.contains!==void 0){if(!tn.isSchema(r.contains))throw new Error('Expected "contains" keyword to be a schema');var s=new Le(e,r,n,i),a=e.some(function(c,l){var u=o.validateSchema(c,r.contains,n,i.makeChild(r.contains,l));return u.errors.length===0});return a===!1&&s.addError({name:"contains",argument:r.contains,message:"must contain an item matching given schema"}),s}};ze.minimum=function(e,r,n,i){if(this.types.number(e)){var o=new Le(e,r,n,i);return r.exclusiveMinimum&&r.exclusiveMinimum===!0?e>r.minimum||o.addError({name:"minimum",argument:r.minimum,message:"must be greater than "+r.minimum}):e>=r.minimum||o.addError({name:"minimum",argument:r.minimum,message:"must be greater than or equal to "+r.minimum}),o}};ze.maximum=function(e,r,n,i){if(this.types.number(e)){var o=new Le(e,r,n,i);return r.exclusiveMaximum&&r.exclusiveMaximum===!0?er.exclusiveMinimum;return s||o.addError({name:"exclusiveMinimum",argument:r.exclusiveMinimum,message:"must be strictly greater than "+r.exclusiveMinimum}),o}};ze.exclusiveMaximum=function(e,r,n,i){if(typeof r.exclusiveMaximum!="boolean"&&this.types.number(e)){var o=new Le(e,r,n,i),s=e=r.minLength||o.addError({name:"minLength",argument:r.minLength,message:"does not meet minimum length of "+r.minLength}),o}};ze.maxLength=function(e,r,n,i){if(this.types.string(e)){var o=new Le(e,r,n,i),s=e.match(/[\uDC00-\uDFFF]/g),a=e.length-(s?s.length:0);return a<=r.maxLength||o.addError({name:"maxLength",argument:r.maxLength,message:"does not meet maximum length of "+r.maxLength}),o}};ze.minItems=function(e,r,n,i){if(this.types.array(e)){var o=new Le(e,r,n,i);return e.length>=r.minItems||o.addError({name:"minItems",argument:r.minItems,message:"does not meet minimum length of "+r.minItems}),o}};ze.maxItems=function(e,r,n,i){if(this.types.array(e)){var o=new Le(e,r,n,i);return e.length<=r.maxItems||o.addError({name:"maxItems",argument:r.maxItems,message:"does not meet maximum length of "+r.maxItems}),o}};function Zye(t,e,r){var n,i=r.length;for(n=e+1,i;n{"use strict";var YO=is();XO.exports.SchemaScanResult=qH;function qH(t,e){this.id=t,this.ref=e}XO.exports.scan=function(e,r){function n(c,l){if(!l||typeof l!="object")return;if(l.$ref){let p=YO.resolveUrl(c,l.$ref);a[p]=a[p]?a[p]+1:0;return}var u=l.$id||l.id;let d=YO.resolveUrl(c,u);var f=u?d:c;if(f){if(f.indexOf("#")<0&&(f+="#"),s[f]){if(!YO.deepCompareStrict(s[f],l))throw new Error("Schema <"+f+"> already exists with different definition");return s[f]}s[f]=l,f[f.length-1]=="#"&&(s[f.substring(0,f.length-1)]=l)}i(f+"/items",Array.isArray(l.items)?l.items:[l.items]),i(f+"/extends",Array.isArray(l.extends)?l.extends:[l.extends]),n(f+"/additionalItems",l.additionalItems),o(f+"/properties",l.properties),n(f+"/additionalProperties",l.additionalProperties),o(f+"/definitions",l.definitions),o(f+"/patternProperties",l.patternProperties),o(f+"/dependencies",l.dependencies),i(f+"/disallow",l.disallow),i(f+"/allOf",l.allOf),i(f+"/anyOf",l.anyOf),i(f+"/oneOf",l.oneOf),n(f+"/not",l.not)}function i(c,l){if(Array.isArray(l))for(var u=0;u{"use strict";var BH=UH(),ss=is(),HH=F_().scan,GH=ss.ValidatorResult,Vye=ss.ValidatorResultError,Lf=ss.SchemaError,ZH=ss.SchemaContext,Wye="/",Jt=function t(){this.customFormats=Object.create(t.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(Ti),this.attributes=Object.create(BH.validators)};Jt.prototype.customFormats={};Jt.prototype.schemas=null;Jt.prototype.types=null;Jt.prototype.attributes=null;Jt.prototype.unresolvedRefs=null;Jt.prototype.addSchema=function(e,r){var n=this;if(!e)return null;var i=HH(r||Wye,e),o=r||e.$id||e.id;for(var s in i.id)this.schemas[s]=i.id[s];for(var s in i.ref)this.unresolvedRefs.push(s);return this.unresolvedRefs=this.unresolvedRefs.filter(function(a){return typeof n.schemas[a]>"u"}),this.schemas[o]};Jt.prototype.addSubSchemaArray=function(e,r){if(Array.isArray(r))for(var n=0;n",e);var a=ss.objectGetPath(n.schemas[s],o.substr(1));if(a===void 0)throw new Lf("no such schema "+o+" located in <"+s+">",e);return{subschema:a,switchSchema:r}};Jt.prototype.testType=function(e,r,n,i,o){if(o!==void 0){if(o===null)throw new Lf('Unexpected null in "type" keyword');if(typeof this.types[o]=="function")return this.types[o].call(this,e);if(o&&typeof o=="object"){var s=this.validateSchema(e,o,n,i);return s===void 0||!(s&&s.errors.length)}return!0}};var Ti=Jt.prototype.types={};Ti.string=function(e){return typeof e=="string"};Ti.number=function(e){return typeof e=="number"&&isFinite(e)};Ti.integer=function(e){return typeof e=="number"&&e%1===0};Ti.boolean=function(e){return typeof e=="boolean"};Ti.array=function(e){return Array.isArray(e)};Ti.null=function(e){return e===null};Ti.date=function(e){return e instanceof Date};Ti.any=function(e){return!0};Ti.object=function(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof Date)};WH.exports=Jt});var JH=v((JXe,mo)=>{"use strict";var Kye=mo.exports.Validator=KH();mo.exports.ValidatorResult=is().ValidatorResult;mo.exports.ValidatorResultError=is().ValidatorResultError;mo.exports.ValidationError=is().ValidationError;mo.exports.SchemaError=is().SchemaError;mo.exports.SchemaScanResult=F_().SchemaScanResult;mo.exports.scan=F_().scan;mo.exports.validate=function(t,e,r){var n=new Kye;return n.validate(t,e,r)}});import{readFileSync as Jye}from"node:fs";import{dirname as Yye,join as Xye}from"node:path";import{fileURLToPath as Qye}from"node:url";function i_e(t){let e=n_e.validate(t,r_e);return e.valid?{valid:!0,errors:[]}:{valid:!1,errors:e.errors.map(n=>`${n.property}: ${n.message}`)}}function XH(t){let e=i_e(t);if(!e.valid)throw new Error(`spec.yaml invalid:
${e.errors.join(`
- `)}`)}var sH,Wge,Kge,Jge,Yge,cH=y(()=>{"use strict";sH=Et(oH(),1),Wge=Gge(Vge(import.meta.url)),Kge=Zge(Wge,"schema.json"),Jge=JSON.parse(Hge(Kge,"utf8")),Yge=new sH.Validator});import{existsSync as bO,readdirSync as Qge}from"node:fs";import{dirname as eye,join as ha,resolve as uH}from"node:path";function lH(t){return bO(t)?Qge(t).filter(r=>r.endsWith(".yaml")||r.endsWith(".yml")).map(r=>wi(ha(t,r))):[]}function ga(t,e){u_=e?{cwd:uH(t),spec:e}:null}function H(t=".",e="spec.yaml"){return u_&&e==="spec.yaml"&&uH(t)===u_.cwd?u_.spec:tye(t,e)}function tye(t,e){let r=ha(t,e),n=wi(r),i=ha(t,eye(e),"spec");if(!n.features||n.features.length===0){let o=lH(ha(i,"features"));o.length>0&&(n.features=o)}if(!n.scenarios||n.scenarios.length===0){let o=lH(ha(i,"scenarios"));o.length>0&&(n.scenarios=o)}if(!n.architecture){let o=ha(i,"architecture.yaml");bO(o)&&(n.architecture=wi(o))}if(!n.capabilities||n.capabilities.length===0){let o=ha(i,"capabilities.yaml");if(bO(o)){let s=wi(o);s&&Array.isArray(s.capabilities)&&(n.capabilities=s.capabilities)}}return aH(n),n}var u_,qe=y(()=>{"use strict";a_();cH();u_=null});import Qc from"node:process";function wO(){return!!Qc.stdout.isTTY}function M(t,e,r=""){let n=dH[t],i=r?` ${r}`:"";wO()?Qc.stdout.write(`${vO[t]}${n}${SO} ${e}${i}
-`):Qc.stdout.write(`${n} ${e}${i}
-`)}function xf(t,e,r=""){if(!wO())return;let n=r?` ${r}`:"";Qc.stdout.write(`${fH}${vO.start}\xB7${SO} ${t} \xB7 ${e}${n}`)}function ya(t,e,r=""){let n=dH[t],i=r?` ${r}`:"";wO()?Qc.stdout.write(`${fH}${vO[t]}${n}${SO} ${e}${i}
-`):Qc.stdout.write(`${n} ${e}${i}
-`)}var dH,vO,SO,fH,$i=y(()=>{"use strict";dH={start:"\xB7",pass:"\u2713",fail:"\u2717",skip:"\xB7",note:"\u2139"},vO={start:"\x1B[90m",pass:"\x1B[32m",fail:"\x1B[31m",skip:"\x1B[90m",note:"\x1B[36m"},SO="\x1B[0m",fH="\r\x1B[K"});import{createHash as CH}from"node:crypto";import{existsSync as Cye,readFileSync as kO,writeFileSync as Dye}from"node:fs";import{join as d_}from"node:path";function Nye(t,e){let r=CH("sha256");for(let n of[...e].sort()){r.update(n),r.update("\0");try{r.update(kO(d_(t,n)))}catch{r.update("")}r.update("\0")}return r.digest("hex").slice(0,16)}function NH(t,e){let r=CH("sha256");try{r.update(kO(d_(t,e)))}catch{r.update("")}return r.digest("hex").slice(0,16)}function Qo(t){let e=d_(t,...DH);if(!Cye(e))return null;let r;try{r=kO(e,"utf8")}catch{return null}let n=null,i=null,o=null,s="other";for(let a of r.split(`
-`)){if(a==="attested:"){s="v1",n??=new Map;continue}if(a==="attested_modules:"){s="modules",i??=new Map;continue}if(a==="attested_features:"){s="features",o??=new Set;continue}if(!(a.startsWith("#")||a.trim()==="")){if(s==="v1"){let c=a.match(/^ {2}(F-[\w-]+): ([0-9a-f]{16})$/);c&&n.set(c[1],c[2])}else if(s==="modules"){let c=a.match(/^ {2}(.+): ([0-9a-f]{16})$/);c&&i.set(c[1],c[2])}else if(s==="features"){let c=a.match(/^ {2}(F-[\w-]+): ok$/);c&&o.add(c[1])}}}return{v1:n,modules:i,features:o}}function f_(t){return t.features?.size??t.v1?.size??0}function p_(t,e,r){let n=r.modules??[];if(t.modules!==null||t.features!==null){if(!t.features?.has(r.id))return{state:"unattested"};let o=t.modules??new Map;for(let s of[...n].sort())if(o.get(s)!==NH(e,s))return{state:"stale",module:s};return{state:"fresh"}}let i=t.v1?.get(r.id);return i===void 0?{state:"unattested"}:i===Nye(e,n)?{state:"fresh"}:{state:"stale"}}function jH(t,e){let r=(e.features??[]).filter(a=>a.status==="done"&&(a.modules??[]).length>0);if(r.length===0)return!1;let n=new Set;for(let a of r)for(let c of a.modules??[])n.add(c);let i=[...n].sort().map(a=>` ${a}: ${NH(t,a)}`),o=r.map(a=>` ${a.id}: ok`).sort(),s=jye+`attested_modules:
+ `)}`)}var YH,e_e,t_e,r_e,n_e,QH=y(()=>{"use strict";YH=St(JH(),1),e_e=Yye(Qye(import.meta.url)),t_e=Xye(e_e,"schema.json"),r_e=JSON.parse(Jye(t_e,"utf8")),n_e=new YH.Validator});import{existsSync as QO,readdirSync as o_e}from"node:fs";import{dirname as s_e,join as ka,resolve as tG}from"node:path";function eG(t){return QO(t)?o_e(t).filter(r=>r.endsWith(".yaml")||r.endsWith(".yml")).map(r=>Ai(ka(t,r))):[]}function Ea(t,e){L_=e?{cwd:tG(t),spec:e}:null}function H(t=".",e="spec.yaml"){return L_&&e==="spec.yaml"&&tG(t)===L_.cwd?L_.spec:a_e(t,e)}function a_e(t,e){let r=ka(t,e),n=Ai(r),i=ka(t,s_e(e),"spec");if(!n.features||n.features.length===0){let o=eG(ka(i,"features"));o.length>0&&(n.features=o)}if(!n.scenarios||n.scenarios.length===0){let o=eG(ka(i,"scenarios"));o.length>0&&(n.scenarios=o)}if(!n.architecture){let o=ka(i,"architecture.yaml");QO(o)&&(n.architecture=Ai(o))}if(!n.capabilities||n.capabilities.length===0){let o=ka(i,"capabilities.yaml");if(QO(o)){let s=Ai(o);s&&Array.isArray(s.capabilities)&&(n.capabilities=s.capabilities)}}return XH(n),n}var L_,Be=y(()=>{"use strict";j_();QH();L_=null});import ml from"node:process";function rR(){return!!ml.stdout.isTTY}function L(t,e,r=""){let n=rG[t],i=r?` ${r}`:"";rR()?ml.stdout.write(`${eR[t]}${n}${tR} ${e}${i}
+`):ml.stdout.write(`${n} ${e}${i}
+`)}function zf(t,e,r=""){if(!rR())return;let n=r?` ${r}`:"";ml.stdout.write(`${nG}${eR.start}\xB7${tR} ${t} \xB7 ${e}${n}`)}function Aa(t,e,r=""){let n=rG[t],i=r?` ${r}`:"";rR()?ml.stdout.write(`${nG}${eR[t]}${n}${tR} ${e}${i}
+`):ml.stdout.write(`${n} ${e}${i}
+`)}var rG,eR,tR,nG,Oi=y(()=>{"use strict";rG={start:"\xB7",pass:"\u2713",fail:"\u2717",skip:"\xB7",note:"\u2139"},eR={start:"\x1B[90m",pass:"\x1B[32m",fail:"\x1B[31m",skip:"\x1B[90m",note:"\x1B[36m"},tR="\x1B[0m",nG="\r\x1B[K"});import{createHash as $G}from"node:crypto";import{existsSync as L_e,readFileSync as oR,writeFileSync as z_e}from"node:fs";import{join as z_}from"node:path";function U_e(t,e){let r=$G("sha256");for(let n of[...e].sort()){r.update(n),r.update("\0");try{r.update(oR(z_(t,n)))}catch{r.update("")}r.update("\0")}return r.digest("hex").slice(0,16)}function EG(t,e){let r=$G("sha256");try{r.update(oR(z_(t,e)))}catch{r.update("")}return r.digest("hex").slice(0,16)}function as(t){let e=z_(t,...kG);if(!L_e(e))return null;let r;try{r=oR(e,"utf8")}catch{return null}let n=null,i=null,o=null,s="other";for(let a of r.split(`
+`)){if(a==="attested:"){s="v1",n??=new Map;continue}if(a==="attested_modules:"){s="modules",i??=new Map;continue}if(a==="attested_features:"){s="features",o??=new Set;continue}if(!(a.startsWith("#")||a.trim()==="")){if(s==="v1"){let c=a.match(/^ {2}(F-[\w-]+): ([0-9a-f]{16})$/);c&&n.set(c[1],c[2])}else if(s==="modules"){let c=a.match(/^ {2}(.+): ([0-9a-f]{16})$/);c&&i.set(c[1],c[2])}else if(s==="features"){let c=a.match(/^ {2}(F-[\w-]+): ok$/);c&&o.add(c[1])}}}return{v1:n,modules:i,features:o}}function U_(t){return t.features?.size??t.v1?.size??0}function q_(t,e,r){let n=r.modules??[];if(t.modules!==null||t.features!==null){if(!t.features?.has(r.id))return{state:"unattested"};let o=t.modules??new Map;for(let s of[...n].sort())if(o.get(s)!==EG(e,s))return{state:"stale",module:s};return{state:"fresh"}}let i=t.v1?.get(r.id);return i===void 0?{state:"unattested"}:i===U_e(e,n)?{state:"fresh"}:{state:"stale"}}function AG(t,e){let r=(e.features??[]).filter(a=>a.status==="done"&&(a.modules??[]).length>0);if(r.length===0)return!1;let n=new Set;for(let a of r)for(let c of a.modules??[])n.add(c);let i=[...n].sort().map(a=>` ${a}: ${EG(t,a)}`),o=r.map(a=>` ${a.id}: ok`).sort(),s=q_e+`attested_modules:
`+i.join(`
`)+`
attested_features:
`+o.join(`
`)+`
-`;return Dye(d_(t,...DH),s,"utf8"),!0}var DH,jye,tl=y(()=>{"use strict";DH=["spec","attestation.yaml"];jye=`# Cladding \xB7 Tier C \u2014 verification attestation (v2). Written ONLY by a GREEN
+`;return z_e(z_(t,...kG),s,"utf8"),!0}var kG,q_e,gl=y(()=>{"use strict";kG=["spec","attestation.yaml"];q_e=`# Cladding \xB7 Tier C \u2014 verification attestation (v2). Written ONLY by a GREEN
# \`clad check --tier=pre-push --strict\` gate \u2014 the file's one honest author.
# Do not edit by hand.
#
@@ -211,52 +211,53 @@ attested_features:
# Merge conflict here? NEVER hand-resolve the hashes \u2014 keep either side and run
# \`clad check --tier=pre-push --strict\`; the GREEN gate rewrites the truth.
# Content-anchored: survives fresh clones and squash/rebase.
-`});import{resolve as EO}from"node:path";function m_(t){es={cwd:EO(t),results:new Map}}function MH(t,e,r){!es||es.cwd!==EO(e)||es.results.set(t,r)}function h_(t,e){return!es||es.cwd!==EO(e)?null:es.results.get(t)??null}function g_(){es=null}var es,rl=y(()=>{"use strict";es=null});function At(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}var co=y(()=>{});import{fileURLToPath as Mye}from"node:url";var nl,Fye,AO,TO,il=y(()=>{nl=(t,e)=>{let r=TO(Fye(t));if(typeof r!="string")throw new TypeError(`${e} must be a string or a file URL: ${r}.`);return r},Fye=t=>AO(t)?t.toString():t,AO=t=>typeof t!="string"&&t&&Object.getPrototypeOf(t)===String.prototype,TO=t=>t instanceof URL?Mye(t):t});var y_,OO=y(()=>{co();il();y_=(t,e=[],r={})=>{let n=nl(t,"First argument"),[i,o]=At(e)?[[],e]:[e,r];if(!Array.isArray(i))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${i}`);if(i.some(c=>typeof c=="object"&&c!==null))throw new TypeError(`Second argument must be an array of strings: ${i}`);let s=i.map(String),a=s.find(c=>c.includes("\0"));if(a!==void 0)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!At(o))throw new TypeError(`Last argument must be an options object: ${o}`);return[n,s,o]}});import{StringDecoder as Lye}from"node:string_decoder";var FH,LH,Ft,lo,zye,zH,Uye,__,UH,qye,Ef,Bye,RO,Hye,tn=y(()=>{({toString:FH}=Object.prototype),LH=t=>FH.call(t)==="[object ArrayBuffer]",Ft=t=>FH.call(t)==="[object Uint8Array]",lo=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength),zye=new TextEncoder,zH=t=>zye.encode(t),Uye=new TextDecoder,__=t=>Uye.decode(t),UH=(t,e)=>qye(t,e).join(""),qye=(t,e)=>{if(e==="utf8"&&t.every(o=>typeof o=="string"))return t;let r=new Lye(e),n=t.map(o=>typeof o=="string"?zH(o):o).map(o=>r.write(o)),i=r.end();return i===""?n:[...n,i]},Ef=t=>t.length===1&&Ft(t[0])?t[0]:RO(Bye(t)),Bye=t=>t.map(e=>typeof e=="string"?zH(e):e),RO=t=>{let e=new Uint8Array(Hye(t)),r=0;for(let n of t)e.set(n,r),r+=n.length;return e},Hye=t=>{let e=0;for(let r of t)e+=r.length;return e}});import{ChildProcess as Gye}from"node:child_process";var GH,ZH,Zye,Vye,qH,Wye,BH,HH,Kye,VH=y(()=>{co();tn();GH=t=>Array.isArray(t)&&Array.isArray(t.raw),ZH=(t,e)=>{let r=[];for(let[o,s]of t.entries())r=Zye({templates:t,expressions:e,tokens:r,index:o,template:s});if(r.length===0)throw new TypeError("Template script must not be empty");let[n,...i]=r;return[n,i,{}]},Zye=({templates:t,expressions:e,tokens:r,index:n,template:i})=>{if(i===void 0)throw new TypeError(`Invalid backslash sequence: ${t.raw[n]}`);let{nextTokens:o,leadingWhitespaces:s,trailingWhitespaces:a}=Vye(i,t.raw[n]),c=BH(r,o,s);if(n===e.length)return c;let l=e[n],u=Array.isArray(l)?l.map(d=>HH(d)):[HH(l)];return BH(c,u,a)},Vye=(t,e)=>{if(e.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],n=0,i=qH.has(e[0]);for(let s=0,a=0;sr||t.length===0||e.length===0?[...t,...e]:[...t.slice(0,-1),`${t.at(-1)}${e[0]}`,...e.slice(1)],HH=t=>{let e=typeof t;if(e==="string")return t;if(e==="number")return String(t);if(At(t)&&("stdout"in t||"isMaxBuffer"in t))return Kye(t);throw t instanceof Gye||Object.prototype.toString.call(t)==="[object Promise]"?new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}."):new TypeError(`Unexpected "${e}" in template expression`)},Kye=({stdout:t})=>{if(typeof t=="string")return t;if(Ft(t))return __(t);throw t===void 0?new TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`):new TypeError(`Unexpected "${typeof t}" stdout in template expression`)}});import IO from"node:process";var Wn,b_,$n,v_,uo=y(()=>{Wn=t=>b_.includes(t),b_=[IO.stdin,IO.stdout,IO.stderr],$n=["stdin","stdout","stderr"],v_=t=>$n[t]??`stdio[${t}]`});import{debuglog as Jye}from"node:util";var KH,PO,Yye,Xye,Qye,e_e,WH,t_e,CO,r_e,n_e,i_e,o_e,DO,fo,po=y(()=>{co();uo();KH=t=>{let e={...t};for(let r of DO)e[r]=PO(t,r);return e},PO=(t,e)=>{let r=Array.from({length:Yye(t)+1}),n=Xye(t[e],r,e);return n_e(n,e)},Yye=({stdio:t})=>Array.isArray(t)?Math.max(t.length,$n.length):$n.length,Xye=(t,e,r)=>At(t)?Qye(t,e,r):e.fill(t),Qye=(t,e,r)=>{for(let n of Object.keys(t).sort(e_e))for(let i of t_e(n,r,e))e[i]=t[n];return e},e_e=(t,e)=>WH(t)t==="stdout"||t==="stderr"?0:t==="all"?2:1,t_e=(t,e,r)=>{if(t==="ipc")return[r.length-1];let n=CO(t);if(n===void 0||n===0)throw new TypeError(`"${e}.${t}" is invalid.
+`});import{resolve as sR}from"node:path";function B_(t){cs={cwd:sR(t),results:new Map}}function TG(t,e,r){!cs||cs.cwd!==sR(e)||cs.results.set(t,r)}function H_(t,e){return!cs||cs.cwd!==sR(e)?null:cs.results.get(t)??null}function G_(){cs=null}var cs,yl=y(()=>{"use strict";cs=null});function Ot(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}var go=y(()=>{});import{fileURLToPath as B_e}from"node:url";var _l,H_e,aR,cR,bl=y(()=>{_l=(t,e)=>{let r=cR(H_e(t));if(typeof r!="string")throw new TypeError(`${e} must be a string or a file URL: ${r}.`);return r},H_e=t=>aR(t)?t.toString():t,aR=t=>typeof t!="string"&&t&&Object.getPrototypeOf(t)===String.prototype,cR=t=>t instanceof URL?B_e(t):t});var Z_,lR=y(()=>{go();bl();Z_=(t,e=[],r={})=>{let n=_l(t,"First argument"),[i,o]=Ot(e)?[[],e]:[e,r];if(!Array.isArray(i))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${i}`);if(i.some(c=>typeof c=="object"&&c!==null))throw new TypeError(`Second argument must be an array of strings: ${i}`);let s=i.map(String),a=s.find(c=>c.includes("\0"));if(a!==void 0)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Ot(o))throw new TypeError(`Last argument must be an options object: ${o}`);return[n,s,o]}});import{StringDecoder as G_e}from"node:string_decoder";var OG,RG,Ut,yo,Z_e,IG,V_e,V_,PG,W_e,Bf,K_e,uR,J_e,rn=y(()=>{({toString:OG}=Object.prototype),RG=t=>OG.call(t)==="[object ArrayBuffer]",Ut=t=>OG.call(t)==="[object Uint8Array]",yo=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Z_e=new TextEncoder,IG=t=>Z_e.encode(t),V_e=new TextDecoder,V_=t=>V_e.decode(t),PG=(t,e)=>W_e(t,e).join(""),W_e=(t,e)=>{if(e==="utf8"&&t.every(o=>typeof o=="string"))return t;let r=new G_e(e),n=t.map(o=>typeof o=="string"?IG(o):o).map(o=>r.write(o)),i=r.end();return i===""?n:[...n,i]},Bf=t=>t.length===1&&Ut(t[0])?t[0]:uR(K_e(t)),K_e=t=>t.map(e=>typeof e=="string"?IG(e):e),uR=t=>{let e=new Uint8Array(J_e(t)),r=0;for(let n of t)e.set(n,r),r+=n.length;return e},J_e=t=>{let e=0;for(let r of t)e+=r.length;return e}});import{ChildProcess as Y_e}from"node:child_process";var jG,MG,X_e,Q_e,CG,ebe,DG,NG,tbe,FG=y(()=>{go();rn();jG=t=>Array.isArray(t)&&Array.isArray(t.raw),MG=(t,e)=>{let r=[];for(let[o,s]of t.entries())r=X_e({templates:t,expressions:e,tokens:r,index:o,template:s});if(r.length===0)throw new TypeError("Template script must not be empty");let[n,...i]=r;return[n,i,{}]},X_e=({templates:t,expressions:e,tokens:r,index:n,template:i})=>{if(i===void 0)throw new TypeError(`Invalid backslash sequence: ${t.raw[n]}`);let{nextTokens:o,leadingWhitespaces:s,trailingWhitespaces:a}=Q_e(i,t.raw[n]),c=DG(r,o,s);if(n===e.length)return c;let l=e[n],u=Array.isArray(l)?l.map(d=>NG(d)):[NG(l)];return DG(c,u,a)},Q_e=(t,e)=>{if(e.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],n=0,i=CG.has(e[0]);for(let s=0,a=0;sr||t.length===0||e.length===0?[...t,...e]:[...t.slice(0,-1),`${t.at(-1)}${e[0]}`,...e.slice(1)],NG=t=>{let e=typeof t;if(e==="string")return t;if(e==="number")return String(t);if(Ot(t)&&("stdout"in t||"isMaxBuffer"in t))return tbe(t);throw t instanceof Y_e||Object.prototype.toString.call(t)==="[object Promise]"?new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}."):new TypeError(`Unexpected "${e}" in template expression`)},tbe=({stdout:t})=>{if(typeof t=="string")return t;if(Ut(t))return V_(t);throw t===void 0?new TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`):new TypeError(`Unexpected "${typeof t}" stdout in template expression`)}});import dR from"node:process";var Xn,W_,An,K_,_o=y(()=>{Xn=t=>W_.includes(t),W_=[dR.stdin,dR.stdout,dR.stderr],An=["stdin","stdout","stderr"],K_=t=>An[t]??`stdio[${t}]`});import{debuglog as rbe}from"node:util";var zG,fR,nbe,ibe,obe,sbe,LG,abe,pR,cbe,lbe,ube,dbe,mR,bo,vo=y(()=>{go();_o();zG=t=>{let e={...t};for(let r of mR)e[r]=fR(t,r);return e},fR=(t,e)=>{let r=Array.from({length:nbe(t)+1}),n=ibe(t[e],r,e);return lbe(n,e)},nbe=({stdio:t})=>Array.isArray(t)?Math.max(t.length,An.length):An.length,ibe=(t,e,r)=>Ot(t)?obe(t,e,r):e.fill(t),obe=(t,e,r)=>{for(let n of Object.keys(t).sort(sbe))for(let i of abe(n,r,e))e[i]=t[n];return e},sbe=(t,e)=>LG(t)t==="stdout"||t==="stderr"?0:t==="all"?2:1,abe=(t,e,r)=>{if(t==="ipc")return[r.length-1];let n=pR(t);if(n===void 0||n===0)throw new TypeError(`"${e}.${t}" is invalid.
It must be "${e}.stdout", "${e}.stderr", "${e}.all", "${e}.ipc", or "${e}.fd3", "${e}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${e}.${t}" is invalid: that file descriptor does not exist.
-Please set the "stdio" option to ensure that file descriptor exists.`);return n==="all"?[1,2]:[n]},CO=t=>{if(t==="all")return t;if($n.includes(t))return $n.indexOf(t);let e=r_e.exec(t);if(e!==null)return Number(e[1])},r_e=/^fd(\d+)$/,n_e=(t,e)=>t.map(r=>r===void 0?o_e[e]:r),i_e=Jye("execa").enabled?"full":"none",o_e={lines:!1,buffer:!0,maxBuffer:1e3*1e3*100,verbose:i_e,stripFinalNewline:!0},DO=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],fo=(t,e)=>e==="ipc"?t.at(-1):t[e]});var ol,sl,JH,NO,s_e,S_,w_,ts=y(()=>{po();ol=({verbose:t},e)=>NO(t,e)!=="none",sl=({verbose:t},e)=>!["none","short"].includes(NO(t,e)),JH=({verbose:t},e)=>{let r=NO(t,e);return S_(r)?r:void 0},NO=(t,e)=>e===void 0?s_e(t):fo(t,e),s_e=t=>t.find(e=>S_(e))??w_.findLast(e=>t.includes(e)),S_=t=>typeof t=="function",w_=["none","short","full"]});import{platform as a_e}from"node:process";import{stripVTControlCharacters as c_e}from"node:util";var YH,Af,XH,l_e,u_e,d_e,f_e,p_e,m_e,h_e,x_=y(()=>{YH=(t,e)=>{let r=[t,...e],n=r.join(" "),i=r.map(o=>m_e(XH(o))).join(" ");return{command:n,escapedCommand:i}},Af=t=>c_e(t).split(`
-`).map(e=>XH(e)).join(`
-`),XH=t=>t.replaceAll(d_e,e=>l_e(e)),l_e=t=>{let e=f_e[t];if(e!==void 0)return e;let r=t.codePointAt(0),n=r.toString(16);return r<=p_e?`\\u${n.padStart(4,"0")}`:`\\U${n}`},u_e=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},d_e=u_e(),f_e={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},p_e=65535,m_e=t=>h_e.test(t)?t:a_e==="win32"?`"${t.replaceAll('"','""')}"`:`'${t.replaceAll("'","'\\''")}'`,h_e=/^[\w./-]+$/});import QH from"node:process";function jO(){let{env:t}=QH,{TERM:e,TERM_PROGRAM:r}=t;return QH.platform!=="win32"?e!=="linux":!!t.WT_SESSION||!!t.TERMINUS_SUBLIME||t.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||t.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var eG=y(()=>{});var tG,rG,g_e,y_e,__e,b_e,v_e,$_,fXe,nG=y(()=>{eG();tG={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},rG={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},g_e={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},y_e={...tG,...rG},__e={...tG,...g_e},b_e=jO(),v_e=b_e?y_e:__e,$_=v_e,fXe=Object.entries(rG)});import S_e from"node:tty";var w_e,_e,hXe,iG,gXe,yXe,_Xe,bXe,vXe,SXe,wXe,xXe,$Xe,kXe,EXe,AXe,TXe,OXe,RXe,k_,IXe,PXe,CXe,DXe,NXe,jXe,MXe,FXe,LXe,oG,zXe,sG,UXe,qXe,BXe,HXe,GXe,ZXe,VXe,WXe,KXe,JXe,YXe,MO=y(()=>{w_e=S_e?.WriteStream?.prototype?.hasColors?.()??!1,_e=(t,e)=>{if(!w_e)return i=>i;let r=`\x1B[${t}m`,n=`\x1B[${e}m`;return i=>{let o=i+"",s=o.indexOf(n);if(s===-1)return r+o+n;let a=r,c=0,u=(e===22?n:"")+r;for(;s!==-1;)a+=o.slice(c,s)+u,c=s+n.length,s=o.indexOf(n,c);return a+=o.slice(c)+n,a}},hXe=_e(0,0),iG=_e(1,22),gXe=_e(2,22),yXe=_e(3,23),_Xe=_e(4,24),bXe=_e(53,55),vXe=_e(7,27),SXe=_e(8,28),wXe=_e(9,29),xXe=_e(30,39),$Xe=_e(31,39),kXe=_e(32,39),EXe=_e(33,39),AXe=_e(34,39),TXe=_e(35,39),OXe=_e(36,39),RXe=_e(37,39),k_=_e(90,39),IXe=_e(40,49),PXe=_e(41,49),CXe=_e(42,49),DXe=_e(43,49),NXe=_e(44,49),jXe=_e(45,49),MXe=_e(46,49),FXe=_e(47,49),LXe=_e(100,49),oG=_e(91,39),zXe=_e(92,39),sG=_e(93,39),UXe=_e(94,39),qXe=_e(95,39),BXe=_e(96,39),HXe=_e(97,39),GXe=_e(101,49),ZXe=_e(102,49),VXe=_e(103,49),WXe=_e(104,49),KXe=_e(105,49),JXe=_e(106,49),YXe=_e(107,49)});var aG=y(()=>{MO();MO()});var uG,$_e,E_,cG,k_e,lG,E_e,dG=y(()=>{nG();aG();uG=({type:t,message:e,timestamp:r,piped:n,commandId:i,result:{failed:o=!1}={},options:{reject:s=!0}})=>{let a=$_e(r),c=k_e[t]({failed:o,reject:s,piped:n}),l=E_e[t]({reject:s});return`${k_(`[${a}]`)} ${k_(`[${i}]`)} ${l(c)} ${l(e)}`},$_e=t=>`${E_(t.getHours(),2)}:${E_(t.getMinutes(),2)}:${E_(t.getSeconds(),2)}.${E_(t.getMilliseconds(),3)}`,E_=(t,e)=>String(t).padStart(e,"0"),cG=({failed:t,reject:e})=>t?e?$_.cross:$_.warning:$_.tick,k_e={command:({piped:t})=>t?"|":"$",output:()=>" ",ipc:()=>"*",error:cG,duration:cG},lG=t=>t,E_e={command:()=>iG,output:()=>lG,ipc:()=>lG,error:({reject:t})=>t?oG:sG,duration:()=>k_}});var fG,A_e,T_e,pG=y(()=>{ts();fG=(t,e,r)=>{let n=JH(e,r);return t.map(({verboseLine:i,verboseObject:o})=>A_e(i,o,n)).filter(i=>i!==void 0).map(i=>T_e(i)).join("")},A_e=(t,e,r)=>{if(r===void 0)return t;let n=r(t,e);if(typeof n=="string")return n},T_e=t=>t.endsWith(`
+Please set the "stdio" option to ensure that file descriptor exists.`);return n==="all"?[1,2]:[n]},pR=t=>{if(t==="all")return t;if(An.includes(t))return An.indexOf(t);let e=cbe.exec(t);if(e!==null)return Number(e[1])},cbe=/^fd(\d+)$/,lbe=(t,e)=>t.map(r=>r===void 0?dbe[e]:r),ube=rbe("execa").enabled?"full":"none",dbe={lines:!1,buffer:!0,maxBuffer:1e3*1e3*100,verbose:ube,stripFinalNewline:!0},mR=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],bo=(t,e)=>e==="ipc"?t.at(-1):t[e]});var vl,Sl,UG,hR,fbe,J_,Y_,ls=y(()=>{vo();vl=({verbose:t},e)=>hR(t,e)!=="none",Sl=({verbose:t},e)=>!["none","short"].includes(hR(t,e)),UG=({verbose:t},e)=>{let r=hR(t,e);return J_(r)?r:void 0},hR=(t,e)=>e===void 0?fbe(t):bo(t,e),fbe=t=>t.find(e=>J_(e))??Y_.findLast(e=>t.includes(e)),J_=t=>typeof t=="function",Y_=["none","short","full"]});import{platform as pbe}from"node:process";import{stripVTControlCharacters as mbe}from"node:util";var qG,Hf,BG,hbe,gbe,ybe,_be,bbe,vbe,Sbe,X_=y(()=>{qG=(t,e)=>{let r=[t,...e],n=r.join(" "),i=r.map(o=>vbe(BG(o))).join(" ");return{command:n,escapedCommand:i}},Hf=t=>mbe(t).split(`
+`).map(e=>BG(e)).join(`
+`),BG=t=>t.replaceAll(ybe,e=>hbe(e)),hbe=t=>{let e=_be[t];if(e!==void 0)return e;let r=t.codePointAt(0),n=r.toString(16);return r<=bbe?`\\u${n.padStart(4,"0")}`:`\\U${n}`},gbe=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},ybe=gbe(),_be={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},bbe=65535,vbe=t=>Sbe.test(t)?t:pbe==="win32"?`"${t.replaceAll('"','""')}"`:`'${t.replaceAll("'","'\\''")}'`,Sbe=/^[\w./-]+$/});import HG from"node:process";function gR(){let{env:t}=HG,{TERM:e,TERM_PROGRAM:r}=t;return HG.platform!=="win32"?e!=="linux":!!t.WT_SESSION||!!t.TERMINUS_SUBLIME||t.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||t.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var GG=y(()=>{});var ZG,VG,wbe,xbe,$be,kbe,Ebe,Q_,eQe,WG=y(()=>{GG();ZG={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},VG={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},wbe={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},xbe={...ZG,...VG},$be={...ZG,...wbe},kbe=gR(),Ebe=kbe?xbe:$be,Q_=Ebe,eQe=Object.entries(VG)});import Abe from"node:tty";var Tbe,be,nQe,KG,iQe,oQe,sQe,aQe,cQe,lQe,uQe,dQe,fQe,pQe,mQe,hQe,gQe,yQe,_Qe,eb,bQe,vQe,SQe,wQe,xQe,$Qe,kQe,EQe,AQe,JG,TQe,YG,OQe,RQe,IQe,PQe,CQe,DQe,NQe,jQe,MQe,FQe,LQe,yR=y(()=>{Tbe=Abe?.WriteStream?.prototype?.hasColors?.()??!1,be=(t,e)=>{if(!Tbe)return i=>i;let r=`\x1B[${t}m`,n=`\x1B[${e}m`;return i=>{let o=i+"",s=o.indexOf(n);if(s===-1)return r+o+n;let a=r,c=0,u=(e===22?n:"")+r;for(;s!==-1;)a+=o.slice(c,s)+u,c=s+n.length,s=o.indexOf(n,c);return a+=o.slice(c)+n,a}},nQe=be(0,0),KG=be(1,22),iQe=be(2,22),oQe=be(3,23),sQe=be(4,24),aQe=be(53,55),cQe=be(7,27),lQe=be(8,28),uQe=be(9,29),dQe=be(30,39),fQe=be(31,39),pQe=be(32,39),mQe=be(33,39),hQe=be(34,39),gQe=be(35,39),yQe=be(36,39),_Qe=be(37,39),eb=be(90,39),bQe=be(40,49),vQe=be(41,49),SQe=be(42,49),wQe=be(43,49),xQe=be(44,49),$Qe=be(45,49),kQe=be(46,49),EQe=be(47,49),AQe=be(100,49),JG=be(91,39),TQe=be(92,39),YG=be(93,39),OQe=be(94,39),RQe=be(95,39),IQe=be(96,39),PQe=be(97,39),CQe=be(101,49),DQe=be(102,49),NQe=be(103,49),jQe=be(104,49),MQe=be(105,49),FQe=be(106,49),LQe=be(107,49)});var XG=y(()=>{yR();yR()});var tZ,Rbe,tb,QG,Ibe,eZ,Pbe,rZ=y(()=>{WG();XG();tZ=({type:t,message:e,timestamp:r,piped:n,commandId:i,result:{failed:o=!1}={},options:{reject:s=!0}})=>{let a=Rbe(r),c=Ibe[t]({failed:o,reject:s,piped:n}),l=Pbe[t]({reject:s});return`${eb(`[${a}]`)} ${eb(`[${i}]`)} ${l(c)} ${l(e)}`},Rbe=t=>`${tb(t.getHours(),2)}:${tb(t.getMinutes(),2)}:${tb(t.getSeconds(),2)}.${tb(t.getMilliseconds(),3)}`,tb=(t,e)=>String(t).padStart(e,"0"),QG=({failed:t,reject:e})=>t?e?Q_.cross:Q_.warning:Q_.tick,Ibe={command:({piped:t})=>t?"|":"$",output:()=>" ",ipc:()=>"*",error:QG,duration:QG},eZ=t=>t,Pbe={command:()=>KG,output:()=>eZ,ipc:()=>eZ,error:({reject:t})=>t?JG:YG,duration:()=>eb}});var nZ,Cbe,Dbe,iZ=y(()=>{ls();nZ=(t,e,r)=>{let n=UG(e,r);return t.map(({verboseLine:i,verboseObject:o})=>Cbe(i,o,n)).filter(i=>i!==void 0).map(i=>Dbe(i)).join("")},Cbe=(t,e,r)=>{if(r===void 0)return t;let n=r(t,e);if(typeof n=="string")return n},Dbe=t=>t.endsWith(`
`)?t:`${t}
-`});import{inspect as O_e}from"node:util";var ki,R_e,I_e,P_e,A_,C_e,al=y(()=>{x_();dG();pG();ki=({type:t,verboseMessage:e,fdNumber:r,verboseInfo:n,result:i})=>{let o=R_e({type:t,result:i,verboseInfo:n}),s=I_e(e,o),a=fG(s,n,r);a!==""&&console.warn(a.slice(0,-1))},R_e=({type:t,result:e,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:i=!1,...o}}})=>({type:t,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:i,result:e,options:o}),I_e=(t,e)=>t.split(`
-`).map(r=>P_e({...e,message:r})),P_e=t=>({verboseLine:uG(t),verboseObject:t}),A_=t=>{let e=typeof t=="string"?t:O_e(t);return Af(e).replaceAll(" "," ".repeat(C_e))},C_e=2});var mG,hG=y(()=>{ts();al();mG=(t,e)=>{ol(e)&&ki({type:"command",verboseMessage:t,verboseInfo:e})}});var gG,D_e,N_e,j_e,yG=y(()=>{ts();gG=(t,e,r)=>{j_e(t);let n=D_e(t);return{verbose:t,escapedCommand:e,commandId:n,rawOptions:r}},D_e=t=>ol({verbose:t})?N_e++:void 0,N_e=0n,j_e=t=>{for(let e of t){if(e===!1)throw new TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(e===!0)throw new TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!w_.includes(e)&&!S_(e)){let r=w_.map(n=>`'${n}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${e}. Allowed values are: ${r} or a function.`)}}}});import{hrtime as _G}from"node:process";var T_,FO,O_=y(()=>{T_=()=>_G.bigint(),FO=t=>Number(_G.bigint()-t)/1e6});var R_,LO=y(()=>{hG();yG();O_();x_();po();R_=(t,e,r)=>{let n=T_(),{command:i,escapedCommand:o}=YH(t,e),s=PO(r,"verbose"),a=gG(s,o,{...r});return mG(o,a),{command:i,escapedCommand:o,startTime:n,verboseInfo:a}}});var xG=v((x7e,wG)=>{wG.exports=SG;SG.sync=F_e;var bG=He("fs");function M_e(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n