@delegance/claude-autopilot 7.2.0 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,92 @@
2
2
 
3
3
  - v5.6 Phase 7 (docs reconciliation) — pending.
4
4
 
5
+ ## 7.3.0 (2026-05-10)
6
+
7
+ **v7.3.0 — library export surface for v8 daemon.** Minor bump
8
+ (new public API surface). The v8 daemon spec needs to call into
9
+ the autopilot pipeline without spawning the CLI as a subprocess
10
+ — subprocess boundaries lose error context, double up dependency
11
+ resolution, and make sandbox enforcement harder. This PR exposes
12
+ a curated set of `run*` functions as a stable library API.
13
+
14
+ **New exports** at `@delegance/claude-autopilot`:
15
+
16
+ * Pipeline read-only / discovery: `runScan`, `runScaffold`,
17
+ `runValidate`, `runFix`, `runCosts`, `runReport`, `runDoctor`,
18
+ `runSetup`.
19
+ * Pipeline side-effecting: `runDeploy`, `runDeployStatus`,
20
+ `runDeployRollback` (daemon callers must wrap in policy gates
21
+ per v8 spec C3).
22
+ * Helpers: `detectProject`.
23
+ * Types: `DetectionResult`, `ScaffoldOptions`, `ScaffoldResult`,
24
+ `SetupOptions`, `ProfileName`.
25
+
26
+ **Stability contract** documented in `docs/library-api.md`. Anything
27
+ in that doc is SemVer-stable; deep imports
28
+ (`@delegance/claude-autopilot/dist/...`) are unsupported.
29
+
30
+ **`package.json` `exports` map** gains a `default` entry pointing
31
+ at `./dist/src/index.js` so consumers can
32
+ `import { runScaffold } from '@delegance/claude-autopilot'`
33
+ instead of deep-importing.
34
+
35
+ **Deliberate non-exports** (still callable via deep imports, no
36
+ guarantee): JSON-envelope wrappers, internal `_*` helpers, the
37
+ `runs` engine-introspection group (separate v8 prerequisite).
38
+
39
+ 4 new tests verify (a) all declared exports resolve at runtime,
40
+ (b) `detectProject` returns the documented shape on the autopilot
41
+ repo itself, (c) `package.json` `exports` map shape is locked.
42
+ 1559 → 1563 CLI tests; tsc clean; build clean.
43
+
44
+ Version 7.2.1 → 7.3.0 (minor bump for new library surface).
45
+
46
+ ## 7.2.1 (2026-05-10)
47
+
48
+ **v7.2.1 — v8 spec codex pass-2 amendment.** Docs-only PR. Folds
49
+ the codex pass on the merged v8 spec (PR #152) into a new
50
+ "Codex pass 2 amendment" section. 3 CRITICAL + 6 WARNING + 1 NOTE
51
+ all surfaced real productization gaps; all locked into the spec
52
+ rather than left as open questions.
53
+
54
+ **Key trust-model decisions now locked in the spec** (were
55
+ open-questions before):
56
+
57
+ * **C1 — Policy pinning.** `.autopilot/policy.yaml` loaded only from
58
+ default branch at run-start SHA; frozen for the run; daemon's own
59
+ PRs cannot mutate active permissions. `.autopilot/**`,
60
+ `.github/workflows/**`, lockfiles in default `protected_paths`.
61
+ * **C2 — Auth scope.** Default to fine-grained PAT (issues +
62
+ PRs + branch-prefixed contents-write only); `gh` CLI labeled
63
+ "unsafe/dev mode"; hosted uses per-org GitHub App.
64
+ * **C3 — Sandboxed phase execution.** Per-phase Docker/Podman
65
+ container locally; per-run isolated worker hosted; credential
66
+ mounts blocked; egress allowlist (GitHub + Anthropic + OpenAI +
67
+ package registries).
68
+ * **W3 — Auto-merge.** Requires distinct `automerge.*` policy
69
+ block with `required_checks`, `require_codeowner_approval`,
70
+ `max_risk_level`, `allowed_paths`, `rollback_plan_required`.
71
+ * **W4 — Phase-level idempotency.** Operation IDs + side-effect
72
+ markers; restart reconciles GitHub state before resuming.
73
+ * **N1 — OS keychain** for local secrets (macOS Keychain / Linux
74
+ Secret Service / Windows Credential Manager via `keytar`);
75
+ fallback to `~/.claude-autopilot/keys.json` 0600 with warning.
76
+
77
+ **Updated stabilization criteria** add:
78
+ * Sandbox-escape attempt suite (planted-payload tests verify
79
+ malicious `npm test` cannot read `~/.ssh/`, `~/.aws/`, host
80
+ `gh` token).
81
+ * Phase-level idempotency suite (kill daemon mid-phase × 100;
82
+ restart produces zero duplicate side-effects).
83
+
84
+ 3 smaller open questions remain for v8.0-beta lock (container
85
+ runtime fallback, hosted worker latency, sandbox network
86
+ allowlist customization).
87
+
88
+ No code change; bumping to 7.2.1 to keep CHANGELOG/version in
89
+ lockstep with master HEAD.
90
+
5
91
  ## 7.2.0 (2026-05-10)
6
92
 
7
93
  **v7.2.0 — `claude-autopilot scaffold --from-spec <path>`.** Closes
@@ -1,4 +1,17 @@
1
1
  export type { Finding, Severity, FindingSource } from './core/findings/types.js';
2
2
  export type { RunResult, RunInput, PhaseResult } from './core/pipeline/run.js';
3
3
  export type { GuardrailConfig, AdapterRef, AdapterReference } from './core/config/types.js';
4
+ export { runScan } from './cli/scan.js';
5
+ export { runScaffold } from './cli/scaffold.js';
6
+ export { runValidate } from './cli/validate.js';
7
+ export { runFix } from './cli/fix.js';
8
+ export { runCosts } from './cli/costs.js';
9
+ export { runReport } from './cli/report.js';
10
+ export { runDoctor } from './cli/preflight.js';
11
+ export { runSetup } from './cli/setup.js';
12
+ export { runDeploy, runDeployStatus, runDeployRollback } from './cli/deploy.js';
13
+ export { detectProject } from './cli/detector.js';
14
+ export type { DetectionResult } from './cli/detector.js';
15
+ export type { ScaffoldOptions, ScaffoldResult } from './cli/scaffold.js';
16
+ export type { SetupOptions, ProfileName } from './cli/setup.js';
4
17
  //# sourceMappingURL=index.d.ts.map
package/dist/src/index.js CHANGED
@@ -1,2 +1,34 @@
1
- export {};
1
+ // v7.3.0 — Curated library API for in-process consumers (notably the v8
2
+ // daemon, which imports these instead of spawning the CLI subprocess).
3
+ //
4
+ // ## Stability contract
5
+ //
6
+ // Anything re-exported below is part of the supported library API. Changes
7
+ // to function signatures here are SemVer-major. Internal refactors that
8
+ // don't change the exported shape are SemVer-minor or patch.
9
+ //
10
+ // Functions deliberately NOT re-exported (still callable via direct
11
+ // `@delegance/claude-autopilot/cli/*` imports if you really need them, but
12
+ // no compatibility guarantee):
13
+ // - JSON-envelope wrappers (`runUnderJsonMode`, `runAutopilotWithJsonEnvelope`)
14
+ // — those are CLI-shape helpers, not library shape.
15
+ // - Internal `_*` helpers and test seams.
16
+ // - The `runs` / `runs-watch` group — engine introspection is a separate
17
+ // v8 prerequisite (`@delegance/claude-autopilot/run-state` will export
18
+ // it once it's stable).
19
+ //
20
+ // See docs/library-api.md for the full surface + usage examples.
21
+ // Pipeline verbs (read-only / discovery).
22
+ export { runScan } from './cli/scan.js';
23
+ export { runScaffold } from './cli/scaffold.js';
24
+ export { runValidate } from './cli/validate.js';
25
+ export { runFix } from './cli/fix.js';
26
+ export { runCosts } from './cli/costs.js';
27
+ export { runReport } from './cli/report.js';
28
+ export { runDoctor } from './cli/preflight.js';
29
+ export { runSetup } from './cli/setup.js';
30
+ // Pipeline verbs (side-effecting — daemon must wrap these in policy gates).
31
+ export { runDeploy, runDeployStatus, runDeployRollback } from './cli/deploy.js';
32
+ // Helpers.
33
+ export { detectProject } from './cli/detector.js';
2
34
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delegance/claude-autopilot",
3
- "version": "7.2.0",
3
+ "version": "7.3.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "tag": "next"
@@ -36,7 +36,8 @@
36
36
  "types": "./dist/src/index.d.ts",
37
37
  "exports": {
38
38
  ".": {
39
- "types": "./dist/src/index.d.ts"
39
+ "types": "./dist/src/index.d.ts",
40
+ "default": "./dist/src/index.js"
40
41
  },
41
42
  "./bin/claude-autopilot.js": "./bin/claude-autopilot.js",
42
43
  "./bin/guardrail.js": "./bin/guardrail.js",