Skip to content

Convert agent boundary modules to TypeScript - #58

Merged
graphanov merged 1 commit into
mainfrom
forge/issue-50-phase-convert-agent-boundary-modules-typescript
Jun 29, 2026
Merged

Convert agent boundary modules to TypeScript#58
graphanov merged 1 commit into
mainfrom
forge/issue-50-phase-convert-agent-boundary-modules-typescript

Conversation

@graphanov

Copy link
Copy Markdown
Owner

Summary

  • Converts the Phase 2 agent boundary modules from checked JavaScript to TypeScript while preserving the existing runtime behavior and NodeNext .js import specifiers.

Scope

  • Renames provider/router/runtime/tools plus tool-errors/adaptive-router to .ts; replaces JSDoc typedefs with shared contracts and module-private wire types; updates boundary tests to import the compiled dist output; refreshes current TypeScript migration docs.

Out of scope

  • No version bump, merge, release, publish, workflow dispatch, build-pipeline change, or conversion of context/deadline/thinking, CLI, hooks, config, MCP, plugin, REPL, or test files.

Verification

  • npm run build -> passed; npm run typecheck -> passed; npm run build && node --test test/*.test.mjs -> passed (429 tests); npm run test -> passed (429 tests); node bin/lazyglm.js --version -> lazyglm 0.1.4; NPM_CONFIG_CACHE= npm pack --dry-run -> passed; git diff --check -> passed.

Risk

  • Moderate: provider streaming/SSE, runtime hook/tool execution, and tool-handler typing are boundary-sensitive. Mitigated by keeping behavior changes out of scope and running the full local test suite against dist.

Linked issue

Closes #50

Authority boundary

Draft PR only. No merge, release, publish, workflow dispatch, force-push, branch-protection, settings, or secret authority used.

Convert the provider/router/runtime/tools boundary to real TypeScript now that the compiled dist package boundary exists, while leaving support modules in JavaScript for the later migration phases.

Constraint: Issue #50 Phase 2 scope is limited to provider/router/runtime/tools plus tool-errors/adaptive-router.

Rejected: Convert context/deadline/thinking | outside the approved first slice and not required for strict typecheck.

Confidence: high

Scope-risk: moderate

Directive: Keep NodeNext source import specifiers ending in .js even when importing converted .ts modules.

Tested: npm run build; npm run typecheck; npm run build && node --test test/*.test.mjs; npm run test; node bin/lazyglm.js --version; NPM_CONFIG_CACHE=/private/tmp/lazyglm-npm-cache npm pack --dry-run; git diff --check

Not-tested: GitHub CI not observed locally.
@graphanov

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 73f6bc71b4

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

@graphanov

Copy link
Copy Markdown
Owner Author

Status: draft verified on latest head; ready for review.

Evidence:

  • PR Convert agent boundary modules to TypeScript #58 head 73f6bc7: GitHub ci → SUCCESS; no unresolved review threads; forbidden paths unchanged. Local verification: git diff --check origin/main...HEAD → clean; npm run build → passed; node --test test/*.test.mjs → 429 pass / 0 fail; npm run typecheck → passed. Codex normal PR comment reviewed commit 73f6bc7 and reported no major issues.

Next: Marking the PR ready for review. No merge, publish, release, or duplicate Codex-review trigger is authorized or needed for this head.

@graphanov
graphanov marked this pull request as ready for review June 29, 2026 02:48
@graphanov
graphanov merged commit bdd4033 into main Jun 29, 2026
1 check passed
@graphanov
graphanov deleted the forge/issue-50-phase-convert-agent-boundary-modules-typescript branch June 29, 2026 08:26
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.

Phase 2: Convert agent boundary modules to TypeScript (.js → .ts)

1 participant