Skip to content

feat(claude): validate artifacts with host devtools - #193

Merged
ScriptedAlchemy merged 3 commits into
mainfrom
feat/claude-devtools-validation
Sep 1, 2026
Merged

feat(claude): validate artifacts with host devtools#193
ScriptedAlchemy merged 3 commits into
mainfrom
feat/claude-devtools-validation

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • run claude plugin validate <bundle-dir> --strict through the shared bounded process runner for built Claude and unified plugin targets
  • map host warnings/errors to stable AB diagnostics, preserve warnings unless Agent Bundle --strict is selected, and report missing Claude as an explicit unavailable state
  • add a binary-gated packed proof for strict validation plus --plugin-dir registration, public test-helper coverage, docs, capability evidence, and a minor changeset

Test plan

  • pnpm build
  • pnpm typecheck
  • pnpm lint
  • focused host-validation and metadata unit tests (11 passed)
  • artifact-validator and CLI integration tests (91 passed)
  • AGENT_BUNDLE_PACKAGE_PREBUILT=1 pnpm test:packed:native with Claude Code 2.1.251 (real strict validation and inline registration observed; 6 passed, subscription eval intentionally skipped)

Tracking

@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ef0fe49

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 1, 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-01T20:29:11.510890Z 36e7340 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 1, 2026

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

commit: ef0fe49

@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: 36e73400e3

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

let version: string | undefined;
try {
const probe = await run(Object.freeze({ args: Object.freeze(['--version']), cwd, executable }));
if (probe.exitCode !== 0 || probe.termination !== undefined) {

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 Fail validation when the Claude version probe fails

When an installed claude --version invocation times out, exceeds the output limit, or exits nonzero, this returns only an informational AB6019 and skips the actual validator. Consequently, agent-bundle validate --artifact … --strict still exits successfully even though host validation did not run. Reserve the unavailable/info result for a genuinely missing executable and report bounded or nonzero probe failures as AB6022 errors.

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 #215. A version probe that times out, exceeds the output limit, exits nonzero, or fails to spawn for any non-ENOENT reason now returns status 'failed' with an AB6022 error diagnostic, so validate --artifact --strict no longer succeeds when host validation never ran. The informational AB6019/'unavailable' result is reserved for a genuinely missing executable (ENOENT). Covered by four new regression tests.

): Promise<ClaudePluginValidationReport> => {
const executable = options.executable ?? 'claude';
const run = options.run ?? runClaudeCommand;
const cwd = dirname(options.pluginDirectory);

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 Resolve relative plugin paths before changing cwd

For the newly exported test helper, a multi-segment relative path such as fixtures/plugin sets the child cwd to fixtures while still passing fixtures/plugin to Claude, so the host resolves it as fixtures/fixtures/plugin. Resolve the plugin directory to an absolute path before deriving cwd and constructing the validation arguments.

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 #215. The plugin directory is resolved to an absolute path before deriving the child cwd and the plugin validate arguments, so a multi-segment relative path such as fixtures/plugin no longer resolves as fixtures/fixtures/plugin. Regression test asserts absolute args and correct cwd through the injectable run seam.

Run Claude's strict plugin validator through a bounded process so built bundles carry real-host evidence while missing CLIs remain explicit unavailable states.
Describe the developer-tool invocation as artifact validation so the pinned evidence matches the exposed CLI surface.
Keep the deleted-source consumer proof strict while accepting either observed Claude validation or the explicit unavailable diagnostic on hosts without the CLI.
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