Skip to content

feat(claude): emit experimental themes and monitors (#187) - #302

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
feat/187-s2-themes-monitors
Sep 2, 2026
Merged

feat(claude): emit experimental themes and monitors (#187)#302
ScriptedAlchemy merged 1 commit into
mainfrom
feat/187-s2-themes-monitors

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

Slice 2 (4/4) of the #187 Claude parity pass: experimental theme and monitor declarations.

  • Adds themes and monitors to ClaudeHostConfig; the adapter validates declarations and emits themes/<name>.json and monitors/monitors.json documents at the documented default locations (Claude Code docs, retrieved 2026-09-02, mark both surfaces experimental).
  • New closed schemas theme.schema.json and monitors.schema.json, pinned in PROVENANCE.json with recorded tightenings (monitor command rejects ${user_config.*} interpolation since the CLI does not resolve it in monitor context; theme base is a closed enum).
  • validate-artifact.ts gains single-wildcard document patterns (themes/*.json) so dynamically named theme documents are schema-validated and owned.
  • Capability rows experimentalThemes and monitors (Claude: supported-experimental with dated evidence; unified plugin adapter: unavailable, following the lsp precedent).
  • Dotted diagnostics claude.themes.* / claude.monitors.*; native proofs run claude plugin validate --strict against emitted artifacts and record that the CLI does not inspect theme/monitor contents (honest gap noted in PROVENANCE).
  • adapterRevision: claude 1.12.0 -> 1.13.0, plugin 1.11.0 -> 1.12.0.

Test plan

  • Scoped suites: host-adapters, host-adapters.native (AGENT_BUNDLE_NATIVE_HOST_CONTRACTS=1), adapter-metadata, adapter-capability-states, plugin-bundle, artifact-validator — 336/336 pass, 0 skipped
  • pnpm -w typecheck and pnpm -w lint clean
  • Rebased on origin/main (e613e00) with all gates re-run post-rebase

@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 723d043

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
agent-bundle Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T12:04:53.244839Z 723d043 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Sep 2, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle@302
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/create-agent-bundle@302
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@302

commit: 723d043

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 723d043e17

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

`Claude monitors[${index}] command cannot reference \`\${user_config.*}\`; Claude Code runs monitor commands through a shell and rejects them instead of substituting the value, and monitor processes do not receive CLAUDE_PLUGIN_OPTION_ environment variables.`,
));
} else {
planned['command'] = command;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Translate bundle path tokens in monitor commands

When a monitor command uses the package's public pathTokens.pluginRoot, pathTokens.pluginData, or pathTokens.workspaceRoot values, this assignment writes the opaque agent-bundle:path:* token directly into monitors.json. Unlike the existing MCP and LSP planners, it never calls expandClaudeToken, so a normal command such as node ${pathTokens.pluginRoot}/watch.mjs points at a nonexistent runtime path and the monitor cannot start.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2530cc32. planClaudeMonitors now lowers its command through expandClaudeToken, with regression coverage proving agent-bundle:path:plugin-root emits ${CLAUDE_PLUGIN_ROOT}.

"$id": "https://agent-bundle.dev/schemas/claude/2.1.250/theme.schema.json",
"additionalProperties": false,
"properties": {
"base": { "minLength": 1, "type": "string" },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict theme bases to the documented presets

The experimental theme contract treats base as a preset selector, but this schema accepts every nonempty string, and planClaudeThemes performs the same permissive check. Consequently a typo such as base: "drak" passes compilation and artifact validation even though native strict validation does not inspect theme contents, leaving the user with a shipped theme whose base cannot be resolved; encode the supported base values as an enum and mirror that narrowing in ClaudeThemeConfig.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2530cc32. ClaudeThemeConfig.base, the planner, and theme.schema.json now accept only the documented dark and light presets; typo coverage and the re-pinned schema hash are included.

@ScriptedAlchemy
ScriptedAlchemy merged commit 8a38720 into main Sep 2, 2026
15 of 17 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the feat/187-s2-themes-monitors branch September 2, 2026 12:12
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