yaaw-se 0.1.0-dev.35745937645.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +155 -0
- package/dist/cli/commands/doctor.d.ts +6 -0
- package/dist/cli/commands/doctor.js +21 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/install.d.ts +39 -0
- package/dist/cli/commands/install.js +209 -0
- package/dist/cli/commands/install.js.map +1 -0
- package/dist/cli/commands/status.d.ts +63 -0
- package/dist/cli/commands/status.js +23 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +40 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/installer/boundary.d.ts +4 -0
- package/dist/installer/boundary.js +75 -0
- package/dist/installer/boundary.js.map +1 -0
- package/dist/installer/context.d.ts +3 -0
- package/dist/installer/context.js +14 -0
- package/dist/installer/context.js.map +1 -0
- package/dist/installer/detect.d.ts +7 -0
- package/dist/installer/detect.js +40 -0
- package/dist/installer/detect.js.map +1 -0
- package/dist/installer/filesystem.d.ts +1 -0
- package/dist/installer/filesystem.js +23 -0
- package/dist/installer/filesystem.js.map +1 -0
- package/dist/installer/hashing.d.ts +1 -0
- package/dist/installer/hashing.js +5 -0
- package/dist/installer/hashing.js.map +1 -0
- package/dist/installer/managed-sections.d.ts +8 -0
- package/dist/installer/managed-sections.js +53 -0
- package/dist/installer/managed-sections.js.map +1 -0
- package/dist/installer/manifest.d.ts +5 -0
- package/dist/installer/manifest.js +40 -0
- package/dist/installer/manifest.js.map +1 -0
- package/dist/installer/migrations/index.d.ts +14 -0
- package/dist/installer/migrations/index.js +23 -0
- package/dist/installer/migrations/index.js.map +1 -0
- package/dist/installer/migrations/installation/index.d.ts +2 -0
- package/dist/installer/migrations/installation/index.js +3 -0
- package/dist/installer/migrations/installation/index.js.map +1 -0
- package/dist/installer/migrations/project/index.d.ts +2 -0
- package/dist/installer/migrations/project/index.js +3 -0
- package/dist/installer/migrations/project/index.js.map +1 -0
- package/dist/installer/plan.d.ts +10 -0
- package/dist/installer/plan.js +298 -0
- package/dist/installer/plan.js.map +1 -0
- package/dist/installer/project-state.d.ts +2 -0
- package/dist/installer/project-state.js +41 -0
- package/dist/installer/project-state.js.map +1 -0
- package/dist/installer/status.d.ts +61 -0
- package/dist/installer/status.js +146 -0
- package/dist/installer/status.js.map +1 -0
- package/dist/installer/transaction.d.ts +10 -0
- package/dist/installer/transaction.js +176 -0
- package/dist/installer/transaction.js.map +1 -0
- package/dist/installer/types.d.ts +98 -0
- package/dist/installer/types.js +2 -0
- package/dist/installer/types.js.map +1 -0
- package/dist/installer/verify.d.ts +2 -0
- package/dist/installer/verify.js +49 -0
- package/dist/installer/verify.js.map +1 -0
- package/dist/integrations/claude-code.d.ts +1 -0
- package/dist/integrations/claude-code.js +13 -0
- package/dist/integrations/claude-code.js.map +1 -0
- package/dist/integrations/cline.d.ts +1 -0
- package/dist/integrations/cline.js +13 -0
- package/dist/integrations/cline.js.map +1 -0
- package/dist/integrations/codex.d.ts +1 -0
- package/dist/integrations/codex.js +13 -0
- package/dist/integrations/codex.js.map +1 -0
- package/dist/integrations/gemini-cli.d.ts +1 -0
- package/dist/integrations/gemini-cli.js +13 -0
- package/dist/integrations/gemini-cli.js.map +1 -0
- package/dist/integrations/helpers.d.ts +14 -0
- package/dist/integrations/helpers.js +86 -0
- package/dist/integrations/helpers.js.map +1 -0
- package/dist/integrations/registry.d.ts +4 -0
- package/dist/integrations/registry.js +18 -0
- package/dist/integrations/registry.js.map +1 -0
- package/dist/integrations/types.d.ts +31 -0
- package/dist/integrations/types.js +2 -0
- package/dist/integrations/types.js.map +1 -0
- package/dist/payload/bootstrap/claude-code.md +10 -0
- package/dist/payload/bootstrap/cline.md +10 -0
- package/dist/payload/bootstrap/codex.md +10 -0
- package/dist/payload/bootstrap/gemini-cli.md +10 -0
- package/dist/payload/payload-files.json +505 -0
- package/dist/payload/payload.json +4 -0
- package/dist/payload/skills/yaaw-create-spec/SKILL.md +10 -0
- package/dist/payload/skills/yaaw-create-ticket/SKILL.md +10 -0
- package/dist/payload/skills/yaaw-create-tickets/SKILL.md +10 -0
- package/dist/payload/skills/yaaw-implement/SKILL.md +10 -0
- package/dist/payload/skills/yaaw-orchestrator/SKILL.md +10 -0
- package/dist/payload/skills/yaaw-planner/SKILL.md +10 -0
- package/dist/payload/skills/yaaw-planning-review/SKILL.md +10 -0
- package/dist/payload/skills/yaaw-prd/SKILL.md +10 -0
- package/dist/payload/skills/yaaw-refine-prd/SKILL.md +10 -0
- package/dist/payload/skills/yaaw-repair/SKILL.md +10 -0
- package/dist/payload/skills/yaaw-review/SKILL.md +10 -0
- package/dist/payload/skills/yaaw-revise-prd/SKILL.md +10 -0
- package/dist/payload/yaaw-core/core/artifact-model.md +35 -0
- package/dist/payload/yaaw-core/core/authority.md +15 -0
- package/dist/payload/yaaw-core/core/context-loading.md +23 -0
- package/dist/payload/yaaw-core/core/invalidation.md +20 -0
- package/dist/payload/yaaw-core/core/lifecycle.md +33 -0
- package/dist/payload/yaaw-core/core/recovery.md +20 -0
- package/dist/payload/yaaw-core/core/routing.md +30 -0
- package/dist/payload/yaaw-core/core/state-model.md +26 -0
- package/dist/payload/yaaw-core/core/transitions.md +34 -0
- package/dist/payload/yaaw-core/expertise/changeability/MODULE.md +58 -0
- package/dist/payload/yaaw-core/expertise/frontend-design/MODULE.md +16 -0
- package/dist/payload/yaaw-core/expertise/python/MODULE.md +16 -0
- package/dist/payload/yaaw-core/expertise/security/MODULE.md +16 -0
- package/dist/payload/yaaw-core/expertise/testing/MODULE.md +16 -0
- package/dist/payload/yaaw-core/registries/expertise.json +47 -0
- package/dist/payload/yaaw-core/registries/paths.json +15 -0
- package/dist/payload/yaaw-core/registries/routing-policy.json +16 -0
- package/dist/payload/yaaw-core/registries/skills.json +14 -0
- package/dist/payload/yaaw-core/registries/transitions.json +29 -0
- package/dist/payload/yaaw-core/registries/workflows.json +37 -0
- package/dist/payload/yaaw-core/roles/implementer.md +15 -0
- package/dist/payload/yaaw-core/roles/orchestrator.md +16 -0
- package/dist/payload/yaaw-core/roles/planner.md +19 -0
- package/dist/payload/yaaw-core/roles/prd.md +19 -0
- package/dist/payload/yaaw-core/roles/reviewer.md +20 -0
- package/dist/payload/yaaw-core/rules/artifact-writing.md +10 -0
- package/dist/payload/yaaw-core/rules/assumption-challenge.md +109 -0
- package/dist/payload/yaaw-core/rules/changeability.md +38 -0
- package/dist/payload/yaaw-core/rules/durable-memory.md +9 -0
- package/dist/payload/yaaw-core/rules/question-format.md +20 -0
- package/dist/payload/yaaw-core/rules/recovery-evidence.md +9 -0
- package/dist/payload/yaaw-core/rules/repository-identity.md +16 -0
- package/dist/payload/yaaw-core/rules/review-independence.md +9 -0
- package/dist/payload/yaaw-core/rules/ticket-sizing.md +9 -0
- package/dist/payload/yaaw-core/schemas/engineering.schema.json +15 -0
- package/dist/payload/yaaw-core/schemas/evidence.schema.json +36 -0
- package/dist/payload/yaaw-core/schemas/handoff.schema.json +28 -0
- package/dist/payload/yaaw-core/schemas/observed-state.schema.json +25 -0
- package/dist/payload/yaaw-core/schemas/product.schema.json +12 -0
- package/dist/payload/yaaw-core/schemas/project-state.schema.json +74 -0
- package/dist/payload/yaaw-core/schemas/review.schema.json +19 -0
- package/dist/payload/yaaw-core/schemas/spec.schema.json +17 -0
- package/dist/payload/yaaw-core/schemas/ticket.schema.json +20 -0
- package/dist/payload/yaaw-core/templates/engineering.md +33 -0
- package/dist/payload/yaaw-core/templates/evidence.json +12 -0
- package/dist/payload/yaaw-core/templates/handoff.json +12 -0
- package/dist/payload/yaaw-core/templates/observed-state.json +9 -0
- package/dist/payload/yaaw-core/templates/product.md +26 -0
- package/dist/payload/yaaw-core/templates/project-state.json +13 -0
- package/dist/payload/yaaw-core/templates/review.md +28 -0
- package/dist/payload/yaaw-core/templates/spec.md +29 -0
- package/dist/payload/yaaw-core/templates/ticket.md +28 -0
- package/dist/payload/yaaw-core/workflows/implementation/implement-ticket.md +21 -0
- package/dist/payload/yaaw-core/workflows/implementation/repair-ticket.md +18 -0
- package/dist/payload/yaaw-core/workflows/implementation/select-ticket.md +16 -0
- package/dist/payload/yaaw-core/workflows/implementation/verify-ticket.md +17 -0
- package/dist/payload/yaaw-core/workflows/orchestration/determine-next-action.md +16 -0
- package/dist/payload/yaaw-core/workflows/orchestration/dispatch.md +17 -0
- package/dist/payload/yaaw-core/workflows/orchestration/inspect-state.md +17 -0
- package/dist/payload/yaaw-core/workflows/orchestration/reconcile-state.md +16 -0
- package/dist/payload/yaaw-core/workflows/orchestration/recover-interruption.md +17 -0
- package/dist/payload/yaaw-core/workflows/orchestration/route.md +20 -0
- package/dist/payload/yaaw-core/workflows/planning/create-spec.md +18 -0
- package/dist/payload/yaaw-core/workflows/planning/create-tickets.md +19 -0
- package/dist/payload/yaaw-core/workflows/planning/decision-frontier.md +27 -0
- package/dist/payload/yaaw-core/workflows/planning/discover.md +17 -0
- package/dist/payload/yaaw-core/workflows/planning/question-round.md +22 -0
- package/dist/payload/yaaw-core/workflows/planning/readiness-review.md +32 -0
- package/dist/payload/yaaw-core/workflows/planning/record-decisions.md +20 -0
- package/dist/payload/yaaw-core/workflows/planning/replan.md +18 -0
- package/dist/payload/yaaw-core/workflows/planning/route.md +20 -0
- package/dist/payload/yaaw-core/workflows/planning/write-understanding.md +24 -0
- package/dist/payload/yaaw-core/workflows/prd/create.md +22 -0
- package/dist/payload/yaaw-core/workflows/prd/question-round.md +20 -0
- package/dist/payload/yaaw-core/workflows/prd/readiness.md +22 -0
- package/dist/payload/yaaw-core/workflows/prd/record-decisions.md +20 -0
- package/dist/payload/yaaw-core/workflows/prd/refine.md +15 -0
- package/dist/payload/yaaw-core/workflows/prd/revise.md +18 -0
- package/dist/payload/yaaw-core/workflows/prd/route.md +23 -0
- package/dist/payload/yaaw-core/workflows/review/classify-findings.md +17 -0
- package/dist/payload/yaaw-core/workflows/review/inspect-change.md +16 -0
- package/dist/payload/yaaw-core/workflows/review/record-review.md +18 -0
- package/dist/payload/yaaw-core/workflows/review/review-ticket.md +20 -0
- package/dist/renderers/agent-skill.d.ts +1 -0
- package/dist/renderers/agent-skill.js +14 -0
- package/dist/renderers/agent-skill.js.map +1 -0
- package/dist/renderers/bootstrap-block.d.ts +1 -0
- package/dist/renderers/bootstrap-block.js +10 -0
- package/dist/renderers/bootstrap-block.js.map +1 -0
- package/dist/tui/confirm-plan.d.ts +3 -0
- package/dist/tui/confirm-plan.js +23 -0
- package/dist/tui/confirm-plan.js.map +1 -0
- package/dist/tui/existing-install.d.ts +2 -0
- package/dist/tui/existing-install.js +17 -0
- package/dist/tui/existing-install.js.map +1 -0
- package/dist/tui/result.d.ts +2 -0
- package/dist/tui/result.js +8 -0
- package/dist/tui/result.js.map +1 -0
- package/dist/tui/select-directory.d.ts +1 -0
- package/dist/tui/select-directory.js +12 -0
- package/dist/tui/select-directory.js.map +1 -0
- package/dist/tui/select-skills.d.ts +1 -0
- package/dist/tui/select-skills.js +29 -0
- package/dist/tui/select-skills.js.map +1 -0
- package/dist/tui/select-tools.d.ts +2 -0
- package/dist/tui/select-tools.js +19 -0
- package/dist/tui/select-tools.js.map +1 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# YAAW-SE
|
|
2
|
+
|
|
3
|
+
YAAW-SE is an artifact-first autonomous software-engineering workflow with durable project memory and thin coding-tool entrypoints.
|
|
4
|
+
|
|
5
|
+
> **Agents are disposable. Artifacts are durable.**
|
|
6
|
+
|
|
7
|
+
## Install into any project
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
cd my-project
|
|
11
|
+
npx yaaw-se install
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The installer defaults to the current directory, lets you select coding tools and public skill entrypoints, previews filesystem changes, and keeps every permanent write inside the selected project.
|
|
15
|
+
|
|
16
|
+
Tier-1 integrations:
|
|
17
|
+
|
|
18
|
+
- Codex
|
|
19
|
+
- Claude Code
|
|
20
|
+
- Gemini CLI
|
|
21
|
+
- Cline
|
|
22
|
+
|
|
23
|
+
Headless example:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx yaaw-se install --directory . --tools codex,claude-code --skills standard --yes
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Preview without writing:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx yaaw-se install --tools codex --dry-run
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## What gets installed
|
|
36
|
+
|
|
37
|
+
A consuming project has exactly one canonical YAAW root:
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
.yaaw-core/
|
|
41
|
+
├── core/ package-managed workflow contracts
|
|
42
|
+
├── roles/
|
|
43
|
+
├── workflows/
|
|
44
|
+
├── expertise/
|
|
45
|
+
├── rules/
|
|
46
|
+
├── registries/
|
|
47
|
+
├── schemas/
|
|
48
|
+
├── templates/
|
|
49
|
+
├── project/ durable project-owned YAAW memory
|
|
50
|
+
│ ├── product.md
|
|
51
|
+
│ ├── engineering.md
|
|
52
|
+
│ ├── state.json
|
|
53
|
+
│ ├── specs/
|
|
54
|
+
│ ├── tickets/
|
|
55
|
+
│ ├── reviews/
|
|
56
|
+
│ ├── evidence/
|
|
57
|
+
│ └── rules/
|
|
58
|
+
├── runtime/ replaceable coordination state
|
|
59
|
+
└── install/ installer metadata
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Selected coding tools receive only adapters:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
.agents/skills/yaaw-*/ Codex
|
|
66
|
+
.claude/skills/yaaw-*/ Claude Code
|
|
67
|
+
.gemini/skills/yaaw-*/ Gemini CLI
|
|
68
|
+
.cline/skills/yaaw-*/ Cline
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Codex, Claude Code, and Gemini receive a small managed block in their project instruction file. Cline receives the namespaced `.cline/rules/yaaw-se.md`. Provider folders never contain a second YAAW workflow engine.
|
|
72
|
+
|
|
73
|
+
## Public YAAW entrypoints
|
|
74
|
+
|
|
75
|
+
Smart entrypoints:
|
|
76
|
+
|
|
77
|
+
- `@yaaw-orchestrator` — reconstruct project reality and choose the next valid workflow.
|
|
78
|
+
- `@yaaw-prd` — create/continue product definition.
|
|
79
|
+
- `@yaaw-planner` — continue repository-backed engineering planning.
|
|
80
|
+
- `@yaaw-implement` — implement one admitted ticket.
|
|
81
|
+
- `@yaaw-review` — independently review current work.
|
|
82
|
+
|
|
83
|
+
Direct shortcuts:
|
|
84
|
+
|
|
85
|
+
- `@yaaw-revise-prd`
|
|
86
|
+
- `@yaaw-refine-prd`
|
|
87
|
+
- `@yaaw-planning-review`
|
|
88
|
+
- `@yaaw-create-spec`
|
|
89
|
+
- `@yaaw-create-ticket`
|
|
90
|
+
- `@yaaw-create-tickets`
|
|
91
|
+
- `@yaaw-repair`
|
|
92
|
+
|
|
93
|
+
The Standard profile exposes all public entrypoints. Core exposes the five smart entrypoints. Custom changes only which shortcuts a coding tool discovers; it never removes canonical workflows from `.yaaw-core`.
|
|
94
|
+
|
|
95
|
+
## Update, modify, repair
|
|
96
|
+
|
|
97
|
+
Rerun the installer:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npx yaaw-se install
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Existing installations offer Quick Update, Modify Installation, Repair Installation, or safe Uninstall.
|
|
104
|
+
|
|
105
|
+
Headless examples:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npx yaaw-se install --action quick-update --yes
|
|
109
|
+
npx yaaw-se install --action modify --tools codex,gemini-cli --skills core --yes
|
|
110
|
+
npx yaaw-se doctor --repair
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Managed files are hashed. Local modifications block headless replacement unless `--force-managed` is explicit. That flag applies only to installer-managed files/sections and never authorizes overwriting `.yaaw-core/project`.
|
|
114
|
+
|
|
115
|
+
Safe uninstall removes package-managed framework files and adapters but preserves durable `.yaaw-core/project` data.
|
|
116
|
+
|
|
117
|
+
## Diagnostics
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npx yaaw-se status
|
|
121
|
+
npx yaaw-se doctor
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`status` reports installation health and managed-file drift. `doctor` performs read-only checks for manifest integrity, path ownership, missing/modified managed files, and the one-root path registry.
|
|
125
|
+
|
|
126
|
+
## Architecture
|
|
127
|
+
|
|
128
|
+
Each execution composes **Role** (authority) + **Workflow** (process) + applicable **Shared Rules** + relevant **Expertise**. Shared rules and expertise never grant authority.
|
|
129
|
+
|
|
130
|
+
The npm installer owns distribution mechanics. The YAAW Orchestrator owns semantic lifecycle continuity. Neither is a second implementation of the other.
|
|
131
|
+
|
|
132
|
+
See:
|
|
133
|
+
|
|
134
|
+
- `docs/distribution.md`
|
|
135
|
+
- `docs/integrations.md`
|
|
136
|
+
- `docs/releasing.md`
|
|
137
|
+
|
|
138
|
+
## Development
|
|
139
|
+
|
|
140
|
+
Python still validates the canonical semantic engine during the migration period. The published npm package does not require Python.
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
python scripts/validate_core.py
|
|
144
|
+
python scripts/validate_behavior.py
|
|
145
|
+
python scripts/behavior_oracle.py
|
|
146
|
+
python scripts/validate_distribution.py
|
|
147
|
+
python -m unittest discover -s tests -v
|
|
148
|
+
|
|
149
|
+
npm ci
|
|
150
|
+
npm test
|
|
151
|
+
npm run build
|
|
152
|
+
npm pack --dry-run
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
The dependency graph is committed in `package-lock.json`; CI and release verification use `npm ci`. The first npm release is intentionally published manually.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { resolveProjectRoot } from "../../installer/boundary.js";
|
|
2
|
+
import { doctor } from "../../installer/status.js";
|
|
3
|
+
import { runInstall } from "./install.js";
|
|
4
|
+
export async function runDoctor(options = {}) {
|
|
5
|
+
if (options.repair) {
|
|
6
|
+
return runInstall({ directory: options.directory, action: "repair", yes: true, forceManaged: options.forceManaged, json: options.json });
|
|
7
|
+
}
|
|
8
|
+
const root = await resolveProjectRoot(options.directory ?? process.cwd());
|
|
9
|
+
const report = await doctor(root);
|
|
10
|
+
if (options.json)
|
|
11
|
+
console.log(JSON.stringify(report, null, 2));
|
|
12
|
+
else {
|
|
13
|
+
console.log(`YAAW-SE doctor: ${report.healthy ? "healthy" : "issues found"}`);
|
|
14
|
+
for (const check of report.checks ?? [])
|
|
15
|
+
console.log(`${check.ok ? "✓" : "✗"} ${check.name}${check.detail ? `: ${check.detail}` : ""}`);
|
|
16
|
+
for (const issue of report.issues ?? [])
|
|
17
|
+
console.log(`- ${issue}`);
|
|
18
|
+
}
|
|
19
|
+
return report;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,OAAO,GAA4E,EAAE;IACnH,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,OAAO,UAAU,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3I,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,kBAAkB,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC1E,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,OAAO,CAAC,IAAI;QAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAC,IAAI,EAAC,CAAC,CAAC,CAAC,CAAC;SACxD,CAAC;QACJ,OAAO,CAAC,GAAG,CAAC,mBAAmB,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC;QAC9E,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,IAAI,EAAE;YAAE,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACxI,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,IAAI,EAAE;YAAE,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { IntegrationId } from "../../integrations/types.js";
|
|
2
|
+
import type { InstallAction } from "../../installer/types.js";
|
|
3
|
+
export interface InstallCommandOptions {
|
|
4
|
+
directory?: string;
|
|
5
|
+
tools?: string;
|
|
6
|
+
skills?: string;
|
|
7
|
+
yes?: boolean;
|
|
8
|
+
action?: InstallAction;
|
|
9
|
+
dryRun?: boolean;
|
|
10
|
+
listTools?: boolean;
|
|
11
|
+
listSkills?: boolean;
|
|
12
|
+
forceManaged?: boolean;
|
|
13
|
+
json?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function runInstall(options?: InstallCommandOptions): Promise<string[] | {
|
|
16
|
+
action: InstallAction;
|
|
17
|
+
projectRoot: string;
|
|
18
|
+
selectedIntegrations: IntegrationId[];
|
|
19
|
+
selectedSkills: string[];
|
|
20
|
+
warnings: string[];
|
|
21
|
+
operations: any[];
|
|
22
|
+
} | {
|
|
23
|
+
action: "fresh" | "modify" | "quick-update" | "repair";
|
|
24
|
+
projectRoot: string;
|
|
25
|
+
tools: IntegrationId[];
|
|
26
|
+
skills: string[];
|
|
27
|
+
operations: {
|
|
28
|
+
type: any;
|
|
29
|
+
path: any;
|
|
30
|
+
reason: any;
|
|
31
|
+
}[];
|
|
32
|
+
} | {
|
|
33
|
+
ok: boolean;
|
|
34
|
+
projectRoot: string;
|
|
35
|
+
version: string;
|
|
36
|
+
tools: IntegrationId[];
|
|
37
|
+
skills: string[];
|
|
38
|
+
changed: string[];
|
|
39
|
+
} | undefined>;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import * as p from "@clack/prompts";
|
|
2
|
+
import { access, readFile } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { detectExistingInstallation } from "../../installer/detect.js";
|
|
5
|
+
import { packageVersion, payloadRoot as getPayloadRoot } from "../../installer/context.js";
|
|
6
|
+
import { buildInstallPlan, ManagedConflictError, resolveSkillSelection } from "../../installer/plan.js";
|
|
7
|
+
import { MANIFEST_RELATIVE_PATH, serializeManifest } from "../../installer/manifest.js";
|
|
8
|
+
import { resolveProjectRoot } from "../../installer/boundary.js";
|
|
9
|
+
import { executePlan, preflightPlan } from "../../installer/transaction.js";
|
|
10
|
+
import { verifyInstalledState } from "../../installer/verify.js";
|
|
11
|
+
import { integrationIds } from "../../integrations/registry.js";
|
|
12
|
+
import semver from "semver";
|
|
13
|
+
import { selectDirectory } from "../../tui/select-directory.js";
|
|
14
|
+
import { selectTools } from "../../tui/select-tools.js";
|
|
15
|
+
import { selectSkills } from "../../tui/select-skills.js";
|
|
16
|
+
import { selectExistingAction } from "../../tui/existing-install.js";
|
|
17
|
+
import { confirmPlan, formatPlan } from "../../tui/confirm-plan.js";
|
|
18
|
+
import { showSuccess } from "../../tui/result.js";
|
|
19
|
+
function parseTools(raw) {
|
|
20
|
+
if (!raw)
|
|
21
|
+
return [];
|
|
22
|
+
const values = raw.split(",").map(x => x.trim()).filter(Boolean);
|
|
23
|
+
const unknown = values.filter(x => !integrationIds.includes(x));
|
|
24
|
+
if (unknown.length)
|
|
25
|
+
throw new Error(`Unknown tool IDs: ${unknown.join(", ")}`);
|
|
26
|
+
return [...new Set(values)];
|
|
27
|
+
}
|
|
28
|
+
async function legacyExists(root) {
|
|
29
|
+
try {
|
|
30
|
+
await access(join(root, ".yaaw"));
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async function chooseConflictPolicy(conflicts) {
|
|
38
|
+
p.note(conflicts.join("\n"), "Modified YAAW-managed files found");
|
|
39
|
+
const result = await p.select({
|
|
40
|
+
message: "How should these managed changes be handled?",
|
|
41
|
+
options: [
|
|
42
|
+
{ value: "keep", label: "Keep local files/sections" },
|
|
43
|
+
{ value: "replace", label: "Replace with package version" },
|
|
44
|
+
{ value: "backup-replace", label: "Backup local content and replace" },
|
|
45
|
+
{ value: "fail", label: "Abort update" }
|
|
46
|
+
]
|
|
47
|
+
});
|
|
48
|
+
if (p.isCancel(result))
|
|
49
|
+
return "fail";
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
export async function runInstall(options = {}) {
|
|
53
|
+
const payloadRoot = getPayloadRoot();
|
|
54
|
+
if (options.listTools) {
|
|
55
|
+
const result = integrationIds;
|
|
56
|
+
console.log(options.json ? JSON.stringify(result) : result.join("\n"));
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
if (options.listSkills) {
|
|
60
|
+
const registry = JSON.parse(await readFile(join(payloadRoot, "yaaw-core", "registries", "skills.json"), "utf8"));
|
|
61
|
+
const result = Object.keys(registry);
|
|
62
|
+
console.log(options.json ? JSON.stringify(result) : result.join("\n"));
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
65
|
+
const interactive = !options.yes;
|
|
66
|
+
if (interactive)
|
|
67
|
+
p.intro("YAAW-SE — Artifact-first autonomous software engineering");
|
|
68
|
+
const requested = interactive
|
|
69
|
+
? await selectDirectory(options.directory ?? process.cwd())
|
|
70
|
+
: (options.directory ?? process.cwd());
|
|
71
|
+
const projectRoot = await resolveProjectRoot(requested);
|
|
72
|
+
const existing = await detectExistingInstallation(projectRoot);
|
|
73
|
+
if (await legacyExists(projectRoot)) {
|
|
74
|
+
throw new Error("Legacy .yaaw project state detected. Automatic migration is intentionally not performed; move/validate it before installing the one-root distribution.");
|
|
75
|
+
}
|
|
76
|
+
const allowedActions = new Set(["fresh", "quick-update", "modify", "repair", "uninstall"]);
|
|
77
|
+
if (options.action && !allowedActions.has(options.action)) {
|
|
78
|
+
throw new Error(`Unknown install action: ${options.action}`);
|
|
79
|
+
}
|
|
80
|
+
let action;
|
|
81
|
+
if (options.action)
|
|
82
|
+
action = options.action;
|
|
83
|
+
else if (existing.kind === "valid") {
|
|
84
|
+
if (interactive) {
|
|
85
|
+
const selected = await selectExistingAction();
|
|
86
|
+
if (selected === "cancel")
|
|
87
|
+
return;
|
|
88
|
+
action = selected;
|
|
89
|
+
}
|
|
90
|
+
else
|
|
91
|
+
action = "quick-update";
|
|
92
|
+
}
|
|
93
|
+
else
|
|
94
|
+
action = "fresh";
|
|
95
|
+
if (existing.kind === "partial") {
|
|
96
|
+
throw new Error(`Partial YAAW/provider state exists without a valid manifest: ${existing.signals.join(", ")}. Ownership cannot be reconstructed safely; restore a valid manifest or clean the partial package-owned files explicitly before reinstalling.`);
|
|
97
|
+
}
|
|
98
|
+
if (action === "uninstall") {
|
|
99
|
+
let conflictPolicy = options.forceManaged ? "replace" : "fail";
|
|
100
|
+
const makeUninstallContext = async () => ({
|
|
101
|
+
packageVersion: await packageVersion(), payloadRoot, requestedDirectory: requested, projectRoot,
|
|
102
|
+
mode: interactive ? "interactive" : "headless", selectedIntegrations: [], selectedSkills: [],
|
|
103
|
+
action, dryRun: Boolean(options.dryRun), forceManaged: Boolean(options.forceManaged),
|
|
104
|
+
conflictPolicy
|
|
105
|
+
});
|
|
106
|
+
let ctx = await makeUninstallContext();
|
|
107
|
+
let uninstallBuilt;
|
|
108
|
+
try {
|
|
109
|
+
uninstallBuilt = await buildInstallPlan(ctx, existing.manifest);
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
if (!(error instanceof ManagedConflictError) || !interactive)
|
|
113
|
+
throw error;
|
|
114
|
+
conflictPolicy = await chooseConflictPolicy(error.conflicts);
|
|
115
|
+
if (conflictPolicy === "fail")
|
|
116
|
+
throw error;
|
|
117
|
+
ctx = await makeUninstallContext();
|
|
118
|
+
uninstallBuilt = await buildInstallPlan(ctx, existing.manifest);
|
|
119
|
+
}
|
|
120
|
+
const { plan } = uninstallBuilt;
|
|
121
|
+
if (options.dryRun) {
|
|
122
|
+
const result = { ...plan, operations: plan.operations.map(({ type, path, ...rest }) => ({ type, path: path ? path.replace(projectRoot, ".") : undefined, ...rest, content: undefined })) };
|
|
123
|
+
console.log(options.json ? JSON.stringify(result, null, 2) : formatPlan(plan));
|
|
124
|
+
return result;
|
|
125
|
+
}
|
|
126
|
+
if (interactive && !(await confirmPlan(plan)))
|
|
127
|
+
return;
|
|
128
|
+
await executePlan(plan);
|
|
129
|
+
if (interactive)
|
|
130
|
+
p.outro("YAAW-SE framework/adapters removed; .yaaw-core/project was preserved.");
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
let tools = parseTools(options.tools);
|
|
134
|
+
if (!tools.length && existing.manifest && ["quick-update", "repair"].includes(action)) {
|
|
135
|
+
tools = Object.keys(existing.manifest.integrations);
|
|
136
|
+
}
|
|
137
|
+
if (interactive && (action === "fresh" || action === "modify")) {
|
|
138
|
+
tools = await selectTools(projectRoot, tools.length ? tools : Object.keys(existing.manifest?.integrations ?? {}));
|
|
139
|
+
}
|
|
140
|
+
if (!tools.length) {
|
|
141
|
+
throw new Error("Fresh/headless installation requires --tools; no provider is guessed.");
|
|
142
|
+
}
|
|
143
|
+
let skills;
|
|
144
|
+
if (options.skills)
|
|
145
|
+
skills = await resolveSkillSelection(payloadRoot, options.skills);
|
|
146
|
+
else if (existing.manifest && ["quick-update", "repair"].includes(action))
|
|
147
|
+
skills = existing.manifest.skills;
|
|
148
|
+
else if (interactive)
|
|
149
|
+
skills = await selectSkills(payloadRoot, existing.manifest?.skills);
|
|
150
|
+
else
|
|
151
|
+
skills = await resolveSkillSelection(payloadRoot, "standard");
|
|
152
|
+
let conflictPolicy = options.forceManaged ? "replace" : "fail";
|
|
153
|
+
const makeContext = () => ({
|
|
154
|
+
packageVersion: "", payloadRoot, requestedDirectory: requested, projectRoot,
|
|
155
|
+
mode: interactive ? "interactive" : "headless", selectedIntegrations: tools, selectedSkills: skills,
|
|
156
|
+
action, dryRun: Boolean(options.dryRun), forceManaged: Boolean(options.forceManaged), conflictPolicy
|
|
157
|
+
});
|
|
158
|
+
const version = await packageVersion();
|
|
159
|
+
if (existing.manifest && semver.valid(existing.manifest.yaawVersion) && semver.valid(version) && semver.gt(existing.manifest.yaawVersion, version)) {
|
|
160
|
+
throw new Error(`Refusing implicit downgrade from ${existing.manifest.yaawVersion} to ${version}.`);
|
|
161
|
+
}
|
|
162
|
+
let ctx = makeContext();
|
|
163
|
+
ctx.packageVersion = version;
|
|
164
|
+
let built;
|
|
165
|
+
try {
|
|
166
|
+
built = await buildInstallPlan(ctx, existing.manifest);
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
if (!(error instanceof ManagedConflictError) || !interactive)
|
|
170
|
+
throw error;
|
|
171
|
+
conflictPolicy = await chooseConflictPolicy(error.conflicts);
|
|
172
|
+
if (conflictPolicy === "fail")
|
|
173
|
+
throw error;
|
|
174
|
+
ctx = makeContext();
|
|
175
|
+
ctx.packageVersion = version;
|
|
176
|
+
built = await buildInstallPlan(ctx, existing.manifest);
|
|
177
|
+
}
|
|
178
|
+
await preflightPlan(built.plan);
|
|
179
|
+
if (options.dryRun) {
|
|
180
|
+
const result = {
|
|
181
|
+
action,
|
|
182
|
+
projectRoot,
|
|
183
|
+
tools,
|
|
184
|
+
skills,
|
|
185
|
+
operations: built.plan.operations.map((op) => ({ type: op.type, path: op.path ? op.path.replace(projectRoot, ".") : undefined, reason: op.reason }))
|
|
186
|
+
};
|
|
187
|
+
console.log(options.json ? JSON.stringify(result, null, 2) : formatPlan(built.plan));
|
|
188
|
+
return result;
|
|
189
|
+
}
|
|
190
|
+
if (interactive && !(await confirmPlan(built.plan)))
|
|
191
|
+
return;
|
|
192
|
+
const spinner = interactive ? p.spinner() : null;
|
|
193
|
+
spinner?.start("Installing YAAW-SE");
|
|
194
|
+
const manifestPath = join(projectRoot, MANIFEST_RELATIVE_PATH);
|
|
195
|
+
const changed = await executePlan(built.plan, {
|
|
196
|
+
manifestPath,
|
|
197
|
+
manifestContent: serializeManifest(built.manifest),
|
|
198
|
+
beforeManifest: async () => verifyInstalledState(projectRoot, tools, skills)
|
|
199
|
+
});
|
|
200
|
+
spinner?.stop("Installation verified");
|
|
201
|
+
if (options.json)
|
|
202
|
+
console.log(JSON.stringify({ ok: true, projectRoot, version, tools, skills, changed }, null, 2));
|
|
203
|
+
else if (interactive)
|
|
204
|
+
showSuccess(projectRoot, tools);
|
|
205
|
+
else
|
|
206
|
+
console.log(`YAAW-SE ${version} installed in ${projectRoot}.`);
|
|
207
|
+
return { ok: true, projectRoot, version, tools, skills, changed };
|
|
208
|
+
}
|
|
209
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/cli/commands/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,MAAM,EAAS,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO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AG,CAAC,CAAC;IACpE,OAAO,EAAE,EAAE,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare function runStatus(options?: {
|
|
2
|
+
directory?: string;
|
|
3
|
+
json?: boolean;
|
|
4
|
+
}): Promise<{
|
|
5
|
+
installed: boolean;
|
|
6
|
+
manifestValid: boolean;
|
|
7
|
+
projectRoot: string;
|
|
8
|
+
version: null;
|
|
9
|
+
integrations: never[];
|
|
10
|
+
skills: never[];
|
|
11
|
+
projectMemory: boolean;
|
|
12
|
+
managedFiles: {
|
|
13
|
+
healthy: number;
|
|
14
|
+
modified: number;
|
|
15
|
+
missing: number;
|
|
16
|
+
localOverrides: number;
|
|
17
|
+
};
|
|
18
|
+
managedSections: {
|
|
19
|
+
healthy: number;
|
|
20
|
+
modified: number;
|
|
21
|
+
missing: number;
|
|
22
|
+
localOverrides: number;
|
|
23
|
+
};
|
|
24
|
+
healthy: boolean;
|
|
25
|
+
issues: string[];
|
|
26
|
+
message?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
installed: boolean;
|
|
29
|
+
manifestValid: boolean;
|
|
30
|
+
projectRoot: string;
|
|
31
|
+
healthy: boolean;
|
|
32
|
+
message: string;
|
|
33
|
+
version?: undefined;
|
|
34
|
+
integrations?: undefined;
|
|
35
|
+
skills?: undefined;
|
|
36
|
+
projectMemory?: undefined;
|
|
37
|
+
managedFiles?: undefined;
|
|
38
|
+
managedSections?: undefined;
|
|
39
|
+
issues?: undefined;
|
|
40
|
+
} | {
|
|
41
|
+
message?: undefined;
|
|
42
|
+
installed: boolean;
|
|
43
|
+
manifestValid: boolean;
|
|
44
|
+
projectRoot: string;
|
|
45
|
+
version: string;
|
|
46
|
+
integrations: string[];
|
|
47
|
+
skills: string[];
|
|
48
|
+
projectMemory: boolean;
|
|
49
|
+
managedFiles: {
|
|
50
|
+
healthy: number;
|
|
51
|
+
modified: number;
|
|
52
|
+
missing: number;
|
|
53
|
+
localOverrides: number;
|
|
54
|
+
};
|
|
55
|
+
managedSections: {
|
|
56
|
+
healthy: number;
|
|
57
|
+
modified: number;
|
|
58
|
+
missing: number;
|
|
59
|
+
localOverrides: number;
|
|
60
|
+
};
|
|
61
|
+
healthy: boolean;
|
|
62
|
+
issues: string[];
|
|
63
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { resolveProjectRoot } from "../../installer/boundary.js";
|
|
2
|
+
import { inspectStatus } from "../../installer/status.js";
|
|
3
|
+
export async function runStatus(options = {}) {
|
|
4
|
+
const root = await resolveProjectRoot(options.directory ?? process.cwd());
|
|
5
|
+
const status = await inspectStatus(root);
|
|
6
|
+
if (options.json)
|
|
7
|
+
console.log(JSON.stringify(status, null, 2));
|
|
8
|
+
else if (!status.installed)
|
|
9
|
+
console.log("YAAW-SE is not installed in this project.");
|
|
10
|
+
else {
|
|
11
|
+
console.log(`YAAW-SE ${status.version}`);
|
|
12
|
+
console.log(`Project: ${root}`);
|
|
13
|
+
console.log(`Core: ${status.healthy ? "healthy" : "needs attention"}`);
|
|
14
|
+
console.log(`Project memory: ${status.projectMemory ? "present" : "missing"}`);
|
|
15
|
+
console.log(`Integrations: ${status.integrations.join(", ") || "none"}`);
|
|
16
|
+
console.log(`Managed files: ${status.managedFiles.healthy} healthy, ${status.managedFiles.modified} modified, ${status.managedFiles.missing} missing, ${status.managedFiles.localOverrides} local overrides`);
|
|
17
|
+
if (status.issues.length)
|
|
18
|
+
for (const issue of status.issues)
|
|
19
|
+
console.log(`- ${issue}`);
|
|
20
|
+
}
|
|
21
|
+
return status;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/cli/commands/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EA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C9M,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM;YAAE,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM;gBAAE,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;IACzF,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/cli/main.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { packageVersion } from "../installer/context.js";
|
|
4
|
+
import { runInstall } from "./commands/install.js";
|
|
5
|
+
import { runStatus } from "./commands/status.js";
|
|
6
|
+
import { runDoctor } from "./commands/doctor.js";
|
|
7
|
+
const program = new Command();
|
|
8
|
+
program
|
|
9
|
+
.name("yaaw-se")
|
|
10
|
+
.description("Install and maintain project-local YAAW-SE workflows.")
|
|
11
|
+
.version(await packageVersion());
|
|
12
|
+
program.command("install")
|
|
13
|
+
.description("Install, update, modify, repair, or safely uninstall YAAW-SE.")
|
|
14
|
+
.option("--directory <path>", "target project directory")
|
|
15
|
+
.option("--tools <ids>", "comma-separated tool IDs")
|
|
16
|
+
.option("--skills <profile-or-list>", "standard, core, or comma-separated skills")
|
|
17
|
+
.option("--yes", "headless/noninteractive mode")
|
|
18
|
+
.option("--action <action>", "fresh|quick-update|modify|repair|uninstall")
|
|
19
|
+
.option("--dry-run", "plan and validate without writing")
|
|
20
|
+
.option("--list-tools", "list supported tool IDs")
|
|
21
|
+
.option("--list-skills", "list public YAAW skills")
|
|
22
|
+
.option("--force-managed", "replace locally modified managed files/sections; never affects project memory")
|
|
23
|
+
.option("--json", "emit JSON")
|
|
24
|
+
.action(async (options) => {
|
|
25
|
+
await runInstall(options);
|
|
26
|
+
});
|
|
27
|
+
program.command("status")
|
|
28
|
+
.description("Inspect the current YAAW-SE installation.")
|
|
29
|
+
.option("--directory <path>", "target project directory")
|
|
30
|
+
.option("--json", "emit JSON")
|
|
31
|
+
.action(runStatus);
|
|
32
|
+
program.command("doctor")
|
|
33
|
+
.description("Run read-only installation diagnostics.")
|
|
34
|
+
.option("--directory <path>", "target project directory")
|
|
35
|
+
.option("--repair", "repair installation infrastructure using the current manifest")
|
|
36
|
+
.option("--force-managed", "replace locally modified managed files during repair")
|
|
37
|
+
.option("--json", "emit JSON")
|
|
38
|
+
.action(runDoctor);
|
|
39
|
+
await program.parseAsync(process.argv);
|
|
40
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAC9B,OAAO;KACJ,IAAI,CAAC,SAAS,CAAC;KACf,WAAW,CAAC,uDAAuD,CAAC;KACpE,OAAO,CAAC,MAAM,cAAc,EAAE,CAAC,CAAC;AAEnC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;KACvB,WAAW,CAAC,+DAA+D,CAAC;KAC5E,MAAM,CAAC,oBAAoB,EAAE,0BAA0B,CAAC;KACxD,MAAM,CAAC,eAAe,EAAE,0BAA0B,CAAC;KACnD,MAAM,CAAC,4BAA4B,EAAE,2CAA2C,CAAC;KACjF,MAAM,CAAC,OAAO,EAAE,8BAA8B,CAAC;KAC/C,MAAM,CAAC,mBAAmB,EAAE,4CAA4C,CAAC;KACzE,MAAM,CAAC,WAAW,EAAE,mCAAmC,CAAC;KACxD,MAAM,CAAC,cAAc,EAAE,yBAAyB,CAAC;KACjD,MAAM,CAAC,eAAe,EAAE,yBAAyB,CAAC;KAClD,MAAM,CAAC,iBAAiB,EAAE,+EAA+E,CAAC;KAC1G,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC;KAC7B,MAAM,CAAC,KAAK,EAAC,OAAO,EAAC,EAAE;IACtB,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC;KACtB,WAAW,CAAC,2CAA2C,CAAC;KACxD,MAAM,CAAC,oBAAoB,EAAE,0BAA0B,CAAC;KACxD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC;KAC7B,MAAM,CAAC,SAAS,CAAC,CAAC;AAErB,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC;KACtB,WAAW,CAAC,yCAAyC,CAAC;KACtD,MAAM,CAAC,oBAAoB,EAAE,0BAA0B,CAAC;KACxD,MAAM,CAAC,UAAU,EAAE,+DAA+D,CAAC;KACnF,MAAM,CAAC,iBAAiB,EAAE,sDAAsD,CAAC;KACjF,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC;KAC7B,MAAM,CAAC,SAAS,CAAC,CAAC;AAErB,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function isWithin(root: string, target: string): boolean;
|
|
2
|
+
export declare function resolveProjectRoot(requested: string): Promise<string>;
|
|
3
|
+
export declare function assertSafeDestination(projectRoot: string, destination: string): Promise<void>;
|
|
4
|
+
export declare function assertRelativeManifestPath(projectRoot: string, relPath: string): Promise<string>;
|