agnes-the-ai-analyst/cli
minasarustamyan 17159bfad9
fix: refresh-marketplace enables stack plugins; override sentinel is init-time only (#307)
* fix(refresh-marketplace): also enable stack plugins in workspace settings

Reconcile previously stopped at `claude plugin install --scope project`,
which only writes the global plugin registry. Without an entry in the
workspace `.claude/settings.json` `enabledPlugins` map, Claude Code
treats every plugin as disabled — `/plugins` doesn't list them and
their slash commands, skills, and agents are unreachable.

Refresh now writes the enable map after install/update, treating the
user's marketplace stack as the source of truth (re-enables anything a
prior `claude plugin disable` locally turned off). Override workspaces
are skipped via `is_override_workspace`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(override): sentinel governs init only, not runtime CLI

Sentinel `.claude/init-complete` with `override: true` was meant to
let admins ship INITIAL workspace content. The implementation was
over-scoped — `is_override_workspace` check sat inside every Agnes
writer (`install_claude_hooks`, `install_claude_commands`,
`maybe_refresh_claude_hooks`, `_enable_plugins_in_workspace_settings`),
which blocked runtime commands too. Operators on override workspaces
got trapped at the template snapshot: no `enabledPlugins` map from
`agnes refresh-marketplace`, no hook auto-migration from
`agnes self-upgrade`.

Move the check to the init-time call site (cli/commands/init.py,
`if not override_active:`) — the single place where init-time skip
is the right behavior. Writers themselves become unconditional;
runtime CLI now updates `.claude/` regardless of the sentinel.

Admin custom hooks survive — refresh only rewrites entries matching
`_OUR_COMMAND_MARKERS` (foreign commands fall through unchanged,
same contract as default workspaces).

Existing override workspaces auto-converge on next
`agnes self-upgrade` (fires from every SessionStart). No manual
migration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Minas Arustamyan <arustamyan.minas@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 18:43:32 +02:00
..
commands fix: refresh-marketplace enables stack plugins; override sentinel is init-time only (#307) 2026-05-14 18:43:32 +02:00
lib fix: refresh-marketplace enables stack plugins; override sentinel is init-time only (#307) 2026-05-14 18:43:32 +02:00
skills remove agnes query --register-bq from client CLI 2026-05-12 18:18:13 +02:00
templates/commands Session capture queue, private session, and setup-prompt fixes (#242) 2026-05-11 13:31:16 +00:00
__init__.py feat: add Docker, CLI tool, scheduler, and agent skills 2026-03-27 15:30:03 +01:00
client.py release: 0.45.0 — easy-wins bundle (#84 #164 #177 #178 #203 #204) 2026-05-07 11:43:16 +02:00
config.py fix(devin-review): stale-token override + status sessions counter + lock comment 2026-05-04 21:26:30 +02:00
error_render.py address Devin Review on PR #264 2026-05-12 18:18:13 +02:00
main.py feat(cli): agnes marketplace search/detail/add/remove + retire stale subcommands (#280) 2026-05-13 05:20:56 +00:00
snapshot_meta.py chore(cli-rename): replace stale da verbs in active code paths 2026-05-04 21:10:43 +02:00
update_check.py chore: rename stale 'da' references to 'agnes' + CHANGELOG 2026-05-06 23:23:59 +02:00
v2_client.py feat(store): bundle export/import + agnes store update + agnes admin store push 2026-05-05 11:51:31 +02:00