Skip to content

feat(claude): emit userConfig manifest options (#187 slice 1) - #287

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
feat/187-s1-userconfig
Sep 2, 2026
Merged

feat(claude): emit userConfig manifest options (#187 slice 1)#287
ScriptedAlchemy merged 1 commit into
mainfrom
feat/187-s1-userconfig

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Adds the host-scoped claude.userConfig config surface: typed enable-time options (string/number/boolean/directory/file) validated at plan time and allowlist-copied into the generated .claude-plugin/plugin.json userConfig field, wired through additionalPluginSourceInputs.
  • Fifteen fresh claude.userConfig.* diagnostics with recovery text, including two recorded tightenings beyond the documented text (in PROVENANCE notes): option keys pinned to ^[A-Za-z_][A-Za-z0-9_]*$ with rejection of keys that collide after uppercasing (both would export as the same CLAUDE_PLUGIN_OPTION_<KEY> env var), and rejection of sensitive: true combined with default (a baked-in secure-storage default would ship a secret in the manifest). Type-directed default validation (string/array-with-multiple, bounded numbers, booleans) and multiple/min/max per-type constraints.
  • Closed userConfigOption definition added to the pinned plugin schema (rehashed in PROVENANCE + adapter-metadata pins); option-declaration validation kept factored for the later channels slice. Doc comments carry the sensitive-storage semantics (~2 KB Keychain budget shared with OAuth tokens) and the shell-substitution prohibition.
  • Capability row userConfig driven by a new pinned plugin.userConfig facts block with six dated 2026-09-01 evidence lines (option contract, ${user_config.KEY} substitution surfaces + CLAUDE_PLUGIN_OPTION_ export, shell-substitution rejections with documented alternatives and the v2.1.207 boundary, storage/precedence incl. project-settings-ignored, claude plugin install --config, and the local 2.1.257 host proof); honest unavailable mirror on the unified bundle. Substitution/rejection enforcement inside hook/MCP planning is deliberately out of scope (hooks-fidelity slice) and recorded as evidence only.
  • Adapter revisions adjudicated on rebase over feat(claude): emit plugin-root settings.json defaults (#187 slice 1) #284: claude 1.8.0, unified plugin 1.7.0.

Part of #187 slice 1 (systematic Claude host-parity pass).

Test plan

  • Scoped suites incl. native host proofs for userConfig, settings, and bin (post-rebase): 229 passed, 0 failed, 0 skipped against the installed Claude Code 2.1.257
  • pnpm typecheck
  • pnpm lint (0 errors, 0 warnings, 977 files)

Validate Claude enable-time options before adding them to native and unified plugin manifests, with pinned schema and host evidence.
@ScriptedAlchemy
ScriptedAlchemy merged commit 4500114 into main Sep 2, 2026
@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e3172ec

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-02T06:11:24.485080Z e3172ec 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.

@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: e3172ecde3

ℹ️ 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".

Comment on lines +54 to +56
"if": { "properties": { "type": { "const": "number" } }, "required": ["type"] },
"then": { "properties": { "default": { "type": "number" } } },
"else": { "not": { "anyOf": [{ "required": ["min"] }, { "required": ["max"] }] } }

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 Validate numeric defaults against their declared bounds

When validating an independently assembled or rehashed artifact, this schema only verifies that a number option's default is numeric; it accepts contradictory declarations such as min: 10, max: 5 or default: 11, max: 10. The planner explicitly rejects both cases, but validateArtifact relies on this schema and therefore reports such artifacts as valid. Add equivalent relational validation to the artifact-validation contract so externally supplied manifests cannot bypass the planner's numeric-bound guarantees.

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 on main in #354 (merge bb0754f).

@ScriptedAlchemy
ScriptedAlchemy deleted the feat/187-s1-userconfig branch September 2, 2026 06:18
ScriptedAlchemy added a commit that referenced this pull request Sep 3, 2026
* fix(claude): validate numeric config bounds in artifacts (#287 r3911238592)

* fix(claude): reject marketplace backslash traversal (#314 r3918535243)

* fix(claude): validate authority-only archive hosts (#314 r3918535249)

* fix(replay): preserve invocation provenance in renderers (#322 r3919341927)

* fix(replay): derive workspace from cursor roots (#322 r3919341940)

* fix(dev): invalidate watcher on chmod changes (#329 r3919499846)

* chore: add framework review fixes changeset
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