Skip to content

feat(bundle): opt-in session isolation via 'isolate: true'#13

Open
ivan-mihalic wants to merge 2 commits into
vessux:mainfrom
ivan-mihalic:fix/plugin-isolation
Open

feat(bundle): opt-in session isolation via 'isolate: true'#13
ivan-mihalic wants to merge 2 commits into
vessux:mainfrom
ivan-mihalic:fix/plugin-isolation

Conversation

@ivan-mihalic

Copy link
Copy Markdown

What & why

umbel run <bundle> launches claude --plugin-dir <cache>. In Claude Code 2.1.x --plugin-dir only adds the bundle plugin on top of normal discovery — it does not suppress the user's globally-enabled plugins (enabledPlugins in ~/.claude/settings.json) or ~/.claude/skills. So a bundle session still surfaces every globally-enabled skill/agent, even when the bundle declares its own narrow set.

This contradicted the README's "What's isolated, what leaks" table, which claimed ~/.claude/skills, agents, and plugins were "No — fully isolated".

Change

Opt-in isolate: true bundle field. When set, the launch prepends --bare — the documented Claude Code lever that loads only the --plugin-dir plugin (and its skills/agents), skipping user plugins, ~/.claude/skills, and project-scope auto-discovery — while still honouring the bundle's own --settings / --mcp-config.

---
name: thinking
isolate: true
skills: [local/brainstorming, local/tdd]
---

Default behaviour is unchanged (additive), so existing bundles are unaffected — honouring the additive-only constraint.

Details

  • Parsed + whitelisted in manifest.ts (boolean, rejects non-bool).
  • Composable via extends: (scalar, child wins) in compose.ts.
  • Folded into the cache hash and surfaced in umbel show + the self-describing bundle.md (compile.ts, claude-args.ts).
  • README "What's isolated, what leaks" corrected; isolate added to the spec frontmatter table, composition rules, and the Invocation-block contract.

Tests

  • TDD: RED reproduction in claude-args.test.ts (default = no isolation; isolate: true--bare; isolate still passes --settings).
  • Manifest parse/reject + compose inherit/override tests added.
  • Full suite green: 316 passed, tsc --noEmit clean, biome check clean.

A bundle launch passes 'claude --plugin-dir <cache>', but in Claude Code
2.1.x --plugin-dir only ADDS the bundle on top of normal discovery: the
user's globally-enabled plugins and ~/.claude skills still leak into the
session. Add an opt-in 'isolate: true' bundle field that appends --bare,
the documented lever that loads ONLY the --plugin-dir plugin (and its own
skills/agents) while still honouring the bundle's --settings / --mcp-config.

Default behaviour is unchanged (additive), so existing bundles are not
affected. isolate is parsed + whitelisted in the manifest, overridable
through extends (child wins), folded into the cache hash, and surfaced in
'umbel show' and the self-describing bundle.md.
The 'What's isolated, what leaks' README table claimed ~/.claude skills,
agents and plugins were 'fully isolated' under a bundle. That is false for
Claude Code 2.1.x: --plugin-dir only adds the bundle on top of normal
discovery, so globally-enabled plugins and ~/.claude/skills leak into the
session. Correct the table, document 'isolate: true' (→ --bare) as the lever
that loads only the bundle, and add the field + invocation rule to the spec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant