Skip to content

refactor: migrate runtime configuration to TypeScript - #992

Merged
tomdps merged 5 commits into
mainfrom
codex/migrate-runtime-configuration-typescript
Aug 12, 2026
Merged

refactor: migrate runtime configuration to TypeScript#992
tomdps merged 5 commits into
mainfrom
codex/migrate-runtime-configuration-typescript

Conversation

@tomdps

@tomdps tomdps commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • migrate normal CLI message formatting to strict TypeScript and share lifecycle/criteria helpers with the CLI entrypoint
  • migrate nested model argument resolution to strict TypeScript with unknown-first provider boundaries
  • migrate the Claude worktree configuration overlay to strict TypeScript
  • migrate runtime name generation to strict TypeScript and deduplicate the task-library word lists behind a shared implementation

Each migration is a separate commit. Emitted CommonJS paths remain unchanged for runtime and package consumers.

Validation

  • npm run opcore:check
  • npm run typecheck
  • npm test — 2,897 passing, 18 pending
  • npm run prepack
  • npx mocha tests/package-smoke.test.js --timeout 120000
  • focused differential parity checks for formatter exports, model arguments, Claude overlay filesystem behavior, and both name-generator surfaces
  • native Opcore clone analysis on the shared name-generator implementation

@tomdps
tomdps marked this pull request as ready for review August 12, 2026 00:14
@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown

Greptile Summary

The PR migrates several runtime configuration and formatting modules to strict TypeScript while preserving their emitted CommonJS paths.

  • Shares lifecycle and validation-criteria formatting helpers across CLI rendering paths.
  • Migrates nested model-argument resolution and isolated provider-settings snapshots.
  • Migrates Claude worktree overlay creation, validation, and cleanup.
  • Deduplicates cluster and task name generation behind a shared implementation.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
cli/message-formatter-utils.ts Adds shared lifecycle-event formatting and validation-criteria partitioning helpers without changing established output behavior.
cli/message-formatters-normal.ts Replaces the normal-mode CommonJS source with strict TypeScript while retaining its formatter exports and rendering behavior.
src/task-run-model-args.ts Migrates nested model argument and isolated-settings resolution to unknown-first TypeScript validation while preserving emitted runtime behavior.
src/worktree-claude-config.ts Migrates Claude settings-overlay handling to TypeScript while retaining canonical-path, ownership, mode, and symlink guards.
src/name-generator-shared.ts Centralizes word lists and random-name primitives for runtime and task-lib consumers.
task-lib/name-generator.ts Delegates task and schedule name generation to the shared implementation while preserving task-lib fallbacks and ESM exports.
src/name-generator.ts Preserves the existing runtime name-generator CommonJS interface through a TypeScript wrapper.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  TS[Strict TypeScript sources] --> LR[build:legacy-runtime]
  TS --> TL[build:task-lib]
  LR --> CJS[Runtime CommonJS files]
  TL --> ESM[Task-lib ESM files]
  CJS --> CLI[CLI and orchestration consumers]
  CJS --> Claude[Claude overlay and nested-task consumers]
  ESM --> Tasks[Task store and scheduler consumers]
  TS --> Shared[Shared formatter and name-generator helpers]
  Shared --> CJS
  Shared --> ESM
Loading

Reviews (2): Last reviewed commit: "chore: ignore generated runtime JavaScri..." | Re-trigger Greptile

@tomdps
tomdps added this pull request to the merge queue Aug 12, 2026
Merged via the queue into main with commit b60c178 Aug 12, 2026
12 checks passed
@tomdps
tomdps deleted the codex/migrate-runtime-configuration-typescript branch August 12, 2026 00:55
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 6.39.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant