Commit Graph
306 Commits
Author SHA1 Message Date
59b74901c4 fix(install): preserve user files and honor uninstall previews
Generalize PR #2981 ownership protection to every managed target. Reject mismatched target state and preserve files that appear during writes or failed-install checkpoints. Keep prior hashes for managed files a failed attempt never writes.

Integrate PR #2980 preview wording and global dry-run propagation, with PR #2956 fail-closed environment validation and CLI/legacy regression coverage.

Fixes #2964. Fixes #2952.

Co-authored-by: ilkmajans-cpu <ilkmajans-cpu@users.noreply.github.com>

Co-authored-by: wellkilo <wellkilo@foxmail.com>
2026-09-07 16:40:47 -04:00
haelyra 967a5fa4ba Merge reviewed Claude hook registration and settings containment fixes 2026-09-07 16:38:41 -04:00
wakqasahmedandhaelyra fe3d82e280 fix(install): derive dependency versions from package.json, harden fixture isolation (#2822)
Addresses Greptile's review on #2994:

- missing-dependency.js no longer hardcodes a second copy of the four
  runtime dependency versions; it reads them from package.json's
  dependencies field instead, so the two can't silently drift apart.
  describeMissingDependencyError() still recognizes a tracked
  dependency even if package.json can't be read for some reason,
  just without a version-pinned install command in that case.
- The regression test now asserts no ancestor directory of its
  temp fixture has a node_modules, so a stray one wouldn't let
  Node resolve ajv/sql.js from there and mask what the test is
  actually meant to exercise. Also copies package.json into the
  fixture, matching a real plugin-marketplace git clone and what
  the version-lookup above now needs.
2026-09-07 16:26:10 -04:00
wakqasahmedandhaelyra ce11e8f690 fix(install): ship ajv/sql.js with the plugin install bundle (#2822)
install-plan.js and install-apply.js both require ./lib/install/config at
load time, and that module required ajv unconditionally at the top of the
file even though ajv is only actually used when validating an
ecc-install.json. When ECC is installed via the Claude Code plugin
marketplace, the marketplace directory is a bare git clone with no
node_modules, so requiring ajv crashes commands like --list-profiles that
never touch install-config validation at all.

Same root cause in scripts/lib/control-pane/state.js: sql.js and
@iarna/toml were required at module scope even though they are only used
inside openSqlDatabase() and readTomlConfig(), so control-pane.js --help
crashed too.

Make both requires lazy so they only load when the feature that actually
needs them runs. For the case where ajv/sql.js/js-yaml/@iarna-toml is
genuinely needed and still missing, add a small helper that turns the raw
MODULE_NOT_FOUND into an actionable message naming the package and the
install command, instead of a stack trace (install-apply.js) or, worse, an
unhandled crash with a usage banner tacked on that reads like a bad
argument (install-plan.js, control-pane.js). Applied the same helper to
memory-mcp.mjs, where ajv is genuinely load-bearing (it compiles every MCP
tool's JSON schema up front) so it can't be made lazy the same way.

Added a regression test that copies just scripts/, schemas/, and
manifests/ into a directory with no node_modules anywhere above it in the
filesystem, which reproduces the plugin-marketplace install exactly, and
asserts install-plan.js and control-pane.js still work.
2026-09-07 16:26:10 -04:00
wellkilo f59cfd57c2 fix(install): harden Claude settings lifecycle 2026-09-07 01:57:04 +08:00
wellkilo 569e5a36bb feat(install): register manual Claude hooks 2026-09-07 00:53:13 +08:00
haelyraandGitHub 22e8cf01d0 test(ci): scale repair timeout on Windows (#2942) 2026-09-02 20:48:57 -04:00
haelyraandGitHub 005eff40fd fix(install): harden universal setup release path (#2888)
* fix(install): harden universal setup release path

* docs(adal): use ecc-universal doctor command
2026-08-30 18:54:00 -04:00
haelyraandClaude Fable 5 bdbd90a47f test(install): scale uninstall CLI timeout for Windows CI
The uninstall cases run two full CLI passes (install, then uninstall)
over several hundred files under a flat 30s timeout, which is tight
enough on Windows CI to fail intermittently with spawnSync ETIMEDOUT.
install-apply.test.js already scales its timeout by platform for the
same reason; match that precedent rather than re-running past the flake.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-30 15:09:34 -04:00
6aaa41e028 feat(install): require an explicit hook decision at the apply layer
The guided installer asks how ECC hooks should run, but that consent
lived only in the wizard path. Running install-apply directly with a
profile that includes hooks-runtime still materialized the hook runtime
with no disclosure and no decision.

Gate the apply layer instead, so every entry point is covered:

- disclose the six hook capability groups when a plan would materialize
  the hook runtime, and refuse to apply until the caller decides
- --enable-hooks confirms the hook runtime; --no-hooks installs the rest
  of the selection without it and records the reduced module closure in
  install-state
- surface the pending decision as a dry-run warning
- show the same capability disclosure in the guided installer's plan
  preview, so the wizard's hook question states what it is asking about

Plans that never materialize hooks (Kimi, --profile minimal,
--without baseline:hooks) are unaffected and need no flag. Repair and
uninstall operate on already-recorded state and stay unchanged.

The capability taxonomy and the held-materialization behavior come from
Samarjeet Singh Tomar's PR #2634, reworked to fit the single-decision
consent model that shipped with the guided installer in #2649.

Co-Authored-By: Samarjeet Singh Tomar <samar_tomar@hotmail.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-30 15:09:34 -04:00
haelyra 299544e680 fix: count observations for whitespace paths 2026-08-29 16:07:00 -04:00
haelyra 1bdda4bdac fix: close validator and path edge cases 2026-08-29 15:36:59 -04:00
haelyra 703163275d test: honor per-invocation Bash overrides 2026-08-29 15:11:38 -04:00
haelyra 30c41a9bde fix: close truth and portability review gaps 2026-08-29 14:55:14 -04:00
haelyraandLKL-ZREO 9542c33454 test(skill-stocktake): cover canonical symlink discovery
Co-authored-by: LKL-ZREO <891878708@qq.com>
2026-08-29 14:55:13 -04:00
haelyra e82e477034 test(pack): tolerate slow Windows extraction 2026-08-29 14:53:54 -04:00
haelyra 4c7e965209 fix(gan): distinguish scores from verdict thresholds 2026-08-29 14:24:16 -04:00
van3hardyandhaelyra b2a8091440 test(opencode): guard plugin.tool existence before shape assertion 2026-08-29 13:40:57 -04:00
van3hardyandhaelyra e72f1e6824 test(opencode): assert init does not call shell and root plugin tools 2026-08-29 13:40:56 -04:00
van3hardyandhaelyra f932e63b0a test(opencode): assert built entry is a working plugin, not just an export shape 2026-08-29 13:40:56 -04:00
van3hardyandhaelyra f0684fda32 test(opencode): assert built entry exports only the plugin function 2026-08-29 13:40:56 -04:00
benno0oandhaelyra 7c2bc54be2 test: verify Corepack uses the pinned pnpm version 2026-08-29 13:40:56 -04:00
benno0oandhaelyra b48f22f08c fix: address pre-push pnpm review findings 2026-08-29 13:40:53 -04:00
benno0oandhaelyra 03b441792e fix: resolve pnpm in Git Bash pre-push hook 2026-08-29 13:40:53 -04:00
haelyraandGitHub 656d4b5746 Merge pull request #2869 from actus7/consolidate/mcp-health-v3
fix(hooks): consolidate MCP health-check fixes (3 PRs)
2026-08-29 00:22:27 -04:00
haelyraandGitHub 2aebdd3408 Merge pull request #2870 from actus7/consolidate/hooks-observer-v3
fix(hooks): consolidate hooks and observer fixes (5 PRs)
2026-08-28 18:29:03 -04:00
haelyra 70f42102fc test(evolve): support Windows line endings 2026-08-28 16:25:30 -04:00
haelyra 950caaaae1 fix(hooks): preserve short sessions and quote evolved metadata 2026-08-28 16:08:19 -04:00
haelyra b7d6c61b1e Merge remote-tracking branch 'origin/main' into maint/pr-2870-current 2026-08-28 16:03:10 -04:00
haelyra 1953a749a2 Merge remote-tracking branch 'origin/main' into maint/pr-2873-current 2026-08-28 15:59:31 -04:00
haelyra 204cc2d2a3 fix(release): stage ECC 2.2 launch safely 2026-08-25 17:19:45 -04:00
haelyra 856733263c test(opencode): cover legacy upgrade edge cases 2026-08-25 12:28:23 -04:00
aorightandAlex Schmitt 4d8893f607 fix(ci): add tool cache directories to check-unicode-safety ignore list
Signed-off-by: aoright <102943475+aoright@users.noreply.github.com>
2026-08-24 22:27:39 -03:00
cadenliandAlex Schmitt c5ea82f6bf fix: accept standard tools list metadata 2026-08-24 22:27:31 -03:00
7aa071c5e9 fix(continuous-learning-v2): emit loadable frontmatter from evolve --generate
Artifacts written by `evolve --generate` are inert: Claude Code (and every
spec-compliant Agent Skills client) injects only `name` + `description` at
startup and will not load an artifact missing them.

Today the generator writes:
  - skills:   `# {name}` with no frontmatter block at all
  - commands: `# {cmd_name}` with no frontmatter block at all
  - agents:   `model`/`tools` only, no `name`, no `description`

So the whole evolve pipeline terminates in files that can never load. I hit
this on a real install: 12 generated artifacts across two projects, none of
which Claude Code had ever seen.

This adds a `_evolved_description()` helper and emits proper frontmatter for
all three artifact kinds. The description is sanitised for the two things that
break loaders: `: ` in an unquoted scalar (rejected by strict YAML parsers)
and `<`/`>` (system-prompt injection risk).

Adds two tests to tests/scripts/instinct-cli-evolve-generate.test.js. Both
fail against current main and pass with this change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 22:26:22 -03:00
haelyra 01779a4a2b test(release): cover final review blockers 2026-08-24 21:14:29 -04:00
haelyra 7d9f70c501 test(release): enforce release-note filename convention 2026-08-24 21:08:51 -04:00
haelyra 17ab179ecc test(release): enforce versioned notes contract 2026-08-24 20:40:35 -04:00
dajiaohuangandhaelyra 6d42f32ca8 fix(tests): support npm pack object output 2026-08-24 20:09:12 -04:00
56dafcc5e3 fix(scripts): require legacy ownership manifest for auto fallback
Restrict the automatic `uninstall` legacy Codex sync fallback to homes
that have a legacy ownership manifest (`~/.codex/ecc/legacy-sync-state.json`).
Marker-only AGENTS.md files are no longer auto-detected as legacy installs,
so a normal `uninstall` will not silently modify user-owned instructions.
The explicit `--legacy-codex-sync` flag still handles marker-only and
manifest-backed cleanup.

Also:
- Track the AGENTS.md path in removedPaths when a marker block is removed.
- Refactor codex home resolution into a helper.
- Add regression tests for marker-only auto vs. explicit behavior.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-08-24 20:09:12 -04:00
f4f5cf9027 fix(scripts): avoid false-positive legacy Codex sync detection
Tighten uninstall auto-detection so it only falls back to the legacy
sync-ecc-to-codex.sh path when there is an ownership manifest
(~/.codex/ecc/legacy-sync-state.json) or an ECC marker block in
~/.codex/AGENTS.md. Previously a clean Codex home with unrelated prompt
files could be misclassified as a legacy install, causing uninstall to
skip normal install-state reconciliation and exit with a partial warning.

Also make the no-state fallback return 'not-found' when there is no
marker to remove and no candidate files to clean, and make explicit
--legacy-codex-sync report the same on a clean home.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-08-24 20:09:12 -04:00
09d6d22c09 fix(scripts): auto-detect legacy sync-ecc-to-codex.sh installs in uninstall
When no install-state is found for the current context, `ecc uninstall`
now checks for the legacy `sync-ecc-to-codex.sh` ownership manifest under
`~/.codex/ecc/legacy-sync-state.json` and, if present, rolls back the
managed Codex artifacts it recorded. It restores previous `config.toml`
and `AGENTS.md` content instead of deleting them, removes generated
prompts/docs/copies, and leaves unrelated Codex conversation history and
user config keys untouched. A fallback `--legacy-codex-sync` flag still
forces the legacy path explicitly, and `--dry-run` previews the cleanup.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-08-24 20:09:12 -04:00
haelyra 6e66dfbae8 test(release): add ECC 2.2 readiness regressions 2026-08-24 20:08:41 -04:00
Affaan MustafaandGitHub d0366ea8e8 Merge pull request #2800 from affaan-m/affaan/nasiko-control-plane-integration
feat: add opt-in Nasiko control-plane bridge
2026-08-15 21:48:12 -04:00
haelyra 73e9a44c0b test(install): compare canonical PowerShell install roots 2026-08-15 14:20:01 -04:00
haelyra ffe5edc47c test(install): normalize PowerShell project path assertion 2026-08-15 13:40:59 -04:00
haelyra 21accf1726 docs(antigravity): clarify project-root installation 2026-08-15 13:16:41 -04:00
Affaan Mustafa 9ba25b9360 fix: harden Nasiko artifact lifecycle 2026-08-15 02:22:29 -04:00
haelyra 0a7d2787c4 fix(install): arm rollback before legacy sync 2026-08-13 18:30:39 -04:00
haelyra 9bec31faf7 test(uninstall): record managed copy digest 2026-08-13 18:10:00 -04:00