Skip to content

feat(config): ship conventional src/scripts/ modules through the scripts pipeline (#102 stage 1) - #143

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
wave2/102-plain-scripts
Sep 1, 2026
Merged

feat(config): ship conventional src/scripts/ modules through the scripts pipeline (#102 stage 1)#143
ScriptedAlchemy merged 1 commit into
mainfrom
wave2/102-plain-scripts

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

Wave 2 Lane D — #102 stage 1 (plan: #107 rev 2). Plain src/scripts/ discovery now feeds the existing entry machinery.

  • The seam: normalizeScripts (config/normalize.ts) now consumes the compiled route graph's scripts surface (feat: compile route-graph IR and inspect focus (#93) #119's discovery — no second discovery pass) beside explicit scripts config. Shippable conventional routes become ordinary NormalizedScripts with provenance.kind: 'conventional' and flow through the untouched planCompiledEntries/compileEntries pipeline to scripts/<name>.mjs per selected target — identical layout, envelope (main export), and validation as explicitly configured scripts.
  • One shared judgment (config/script-routes.ts): normalize ships exactly the shippable routes; source validation reports every other state as a hard error, so no discovered script route ever drops silently: AB4807 rendered (.tsx/.jsxGenerate CLI, MCPorter, and script projections from the compiled route graph #102 stage 3, honest "not supported yet"), AB4808 nested below the scripts root (the flat scripts artifact layout ships direct children only), AB4809 identity conflict with a configured script name (config claims by file stay authoritative per the route graph; same-identity-different-file never picks a side).
  • Config-claimed scripts keep working identically (they never become routes); the src/cli.ts-vs-src/cli/ conflict diagnostics (AB4801) stay untouched and authoritative.
  • Example proof: examples/hooks-and-scripts moves verify-release to conventional discovery and keeps detect-risk explicitly configured (it restricts targets), so both modes stay covered. Explicit-vs-conventional artifact diff: scripts/*.mjs byte-identical across all three targets; the only manifest delta is agent-bundle.config.ts dropping out of the conventional script's sourceInputs (honest provenance).
  • Docs: entry-conventions table row + diagnostics registry (AB4800–AB4809); patch changeset. No wire-DTO changes (inspect script DTO unchanged), no public API surface changes.

Scoped results (rebased on c9206d0)

  • pnpm typecheckpnpm lint ✓ (0 errors, 693 files)
  • unit: normalization + route-graph — 47/47 ✓
  • integration: api + examples-contract — 34/34 ✓ (includes new conventional-build and unshippable-diagnostics tests; the hooks example contract executes verify-release.mjs from conventional discovery)
  • pnpm --filter @agent-bundle-example/hooks-and-scripts check

Closes nothing; advances #102 (stage 1 of 4).

@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: aeeab2e

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 Patch

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-01T07:02:30.510171Z 56336b1 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.

…pts pipeline (#102 stage 1)

Unclaimed plain .ts modules directly under src/scripts/ now normalize from
the compiled route graph into the existing explicit-scripts build pipeline
(scripts/<name>.mjs per selected target, provenance.kind 'conventional').
Explicit scripts config keeps claiming its files; rendered (.tsx), nested,
and identity-conflicting script routes fail source validation with the new
AB4807-AB4809 diagnostics instead of shipping silently. The hooks-and-scripts
example moves verify-release to conventional discovery and keeps detect-risk
explicitly configured, covering both modes.
@pkg-pr-new

pkg-pr-new Bot commented Sep 1, 2026

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

commit: 56336b1

@ScriptedAlchemy
ScriptedAlchemy merged commit 9ae79c3 into main Sep 1, 2026
1 check passed
@ScriptedAlchemy
ScriptedAlchemy deleted the wave2/102-plain-scripts branch September 1, 2026 07:01

@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: 56336b15fe

ℹ️ 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 thread packages/agent-bundle/src/config/script-routes.ts
ScriptedAlchemy added a commit that referenced this pull request Sep 1, 2026
Codex review follow-ups on the static route-config extractor and script
route discovery:

- reject non-finite numeric literals (`1e999`, `-1e999`) with the AB4806
  dynamic-config diagnostic instead of serializing Infinity as null
- carry extracted object literals on a null prototype so a literal
  `__proto__` key stays an own property instead of invoking the legacy
  prototype setter
- discover `.jsx` under src/scripts/ so rendered .jsx scripts reach the
  AB4807 gate instead of vanishing, and parse .jsx modules as JSX during
  config extraction
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