agnes-the-ai-analyst/cli/commands
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
..
__init__.py feat: add Docker, CLI tool, scheduler, and agent skills 2026-03-27 15:30:03 +01:00
admin.py Activity Center: audit log + telemetry + sessions + agnes_* tables (#278) 2026-05-12 22:41:19 +02:00
admin_activity.py Activity Center: audit log + telemetry + sessions + agnes_* tables (#278) 2026-05-12 22:41:19 +02:00
admin_ask.py Activity Center: audit log + telemetry + sessions + agnes_* tables (#278) 2026-05-12 22:41:19 +02:00
admin_metrics.py feat(cli): agnes admin metrics {import,export,validate} 2026-05-04 18:39:05 +02:00
admin_news.py feat(home): state-aware /home + /setup-advanced + schema v26 (#228) 2026-05-08 18:28:47 +02:00
admin_sessions.py Activity Center: audit log + telemetry + sessions + agnes_* tables (#278) 2026-05-12 22:41:19 +02:00
admin_store.py refactor(cli-store): pull/info → agnes admin store; add agnes store mine 2026-05-05 13:49:18 +02:00
admin_usage.py Activity Center: audit log + telemetry + sessions + agnes_* tables (#278) 2026-05-12 22:41:19 +02:00
auth.py fix: address Devin Review findings — incomplete renames + estimate guard 2026-05-04 20:05:06 +02:00
capture_session.py Session capture queue, private session, and setup-prompt fixes (#242) 2026-05-11 13:31:16 +00:00
catalog.py hygiene: BQ error hint dispatch + catalog ENTITY column (#274) 2026-05-12 18:32:29 +00:00
describe.py release: 0.46.5 — agnes describe -n parses, server sanitizes NaN (#224) 2026-05-07 18:16:21 +02:00
diagnose.py release: 0.53.2 — diagnose silent-capture check + urllib3 2.7.0 + flaky-test fix (#270) 2026-05-12 18:28:04 +02:00
disk_info.py chore(cli-rename): replace stale da verbs in active code paths 2026-05-04 21:10:43 +02:00
explore.py fix(cli): hint text 'Run: da sync' → 'Run: agnes pull' 2026-05-04 18:42:21 +02:00
init.py feat(initial-workspace): per-instance agnes init override (#292) 2026-05-13 20:35:01 +00:00
mark_private.py Session capture queue, private session, and setup-prompt fixes (#242) 2026-05-11 13:31:16 +00:00
marketplace.py feat(cli): agnes marketplace search/detail/add/remove + retire stale subcommands (#280) 2026-05-13 05:20:56 +00:00
memory_admin.py refactor(cli): hard-cutover env vars + config dir to AGNES_* 2026-05-04 16:35:44 +02:00
my_stack.py feat(cli): agnes marketplace search/detail/add/remove + retire stale subcommands (#280) 2026-05-13 05:20:56 +00:00
onboarded.py feat(home): state-aware /home + /setup-advanced + schema v26 (#228) 2026-05-08 18:28:47 +02:00
pull.py feat: clean CLI errors + init progress + skip-materialize + claude.md catalog pointer 2026-05-05 18:11:59 +02:00
push.py Session capture queue, private session, and setup-prompt fixes (#242) 2026-05-11 13:31:16 +00:00
query.py remove agnes query --register-bq from client CLI 2026-05-12 18:18:13 +02:00
refresh_marketplace.py fix: refresh-marketplace enables stack plugins; override sentinel is init-time only (#307) 2026-05-14 18:43:32 +02:00
sample.py release: 0.52.0 — UX/hygiene round (5 fixes from 0.51.0 retro) 2026-05-12 15:09:14 +02:00
schema.py refactor(cli): hard-cutover env vars + config dir to AGNES_* 2026-05-04 16:35:44 +02:00
self_upgrade.py Session capture queue, private session, and setup-prompt fixes (#242) 2026-05-11 13:31:16 +00:00
server.py refactor(cli): hard-cutover env vars + config dir to AGNES_* 2026-05-04 16:35:44 +02:00
setup.py fix(cli): Windows console crash on cs-CZ codepage (port + broaden #172) 2026-05-04 20:45:29 +02:00
skills.py fix(cli): Windows console crash on cs-CZ codepage (port + broaden #172) 2026-05-04 20:45:29 +02:00
snapshot.py fix(snapshot): catch httpx transport errors in --estimate path 2026-05-04 20:36:30 +02:00
status.py fix(devin-review): stale-token override + status sessions counter + lock comment 2026-05-04 21:26:30 +02:00
statusline.py Session capture queue, private session, and setup-prompt fixes (#242) 2026-05-11 13:31:16 +00:00
store.py feat(cli): agnes marketplace search/detail/add/remove + retire stale subcommands (#280) 2026-05-13 05:20:56 +00:00
tokens.py fix: address Devin Review findings — incomplete renames + estimate guard 2026-05-04 20:05:06 +02:00