Skip to content

Load TypeScript components from their selected source - #983

Merged
taras merged 5 commits into
mainfrom
agent/repl-components-896-codex-20261022
Oct 22, 2026
Merged

taras merged 5 commits into
mainfrom
agent/repl-components-896-codex-20261022

Conversation

@taras

@taras taras commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Why

TypeScript component edits could execute stale native module bytes, and retained execution could depend on the current direct file. Refs #896.

What changes

Ordinary imports execute selected or retained direct source through a captured ComponentModuleLoader. CLI hosts install their adapter automatically. Programmatic TypeScript callers explicitly install one; absence produces an actionable error. Existing permissions, module namespace behavior, logical origin and invocation-owned cleanup remain required.

How to verify it

The focused Deno, Node/tsx and Bun evidence covers same-path edits and fresh-process retained continuation. Additional focused evidence covers loader installation/capture/absence, native cleanup, denied-write preservation, source CLI hosts, emitted package consumers and the compiled binary. Both original reviewers PASS signed feedback 54b93ea.

Scope

This is the loader prerequisite for the separate REPL.Test delivery. It adds Babel standalone 8.0.7 for in-memory TypeScript transformation and runtime-specific installers.

Risks and limitations

This draft is undergoing delivery verification. Required CI, runner-measured test weights and final Planner metadata/independent verification are still pending. Feedback approval does not establish merge readiness. No merge is requested here.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

PR #983: Load TypeScript components from their selected source

44 files, +1925 / -177

Scope

🔴 PR has 2102 lines changed. Split into focused PRs.

🟡 2102 lines changed. PRs under 400 receive more thorough review.

🟡 44 files changed. Are all changes related?

🟡 Changes span 8 directories.

🟡 PR mixes config and source changes.

🟡 package.json changed without dependency justification.

Structural

🟡 2 console statements.

Oxlint structural signals:

  • no-unused-vars ×11: packages/core/src/execute.ts, packages/cli/src/cli.ts
  • no-unnecessary-type-assertion ×5: packages/core/src/execute.ts
  • no-empty-function ×4: packages/cli/src/testing-host.ts, packages/test-support/launch.ts, packages/core/src/execute.ts (+1)
  • no-redundant-type-constituents ×2: packages/core/component-modules/hooks.ts, packages/test-support/launch.ts

Slop

Oxlint slop signals:

  • no-console ×3: packages/cli/src/cli.ts

Static Analysis

Oxlint: 65 diagnostics across 9 files (15 rules)
Density: 0.034 violations/added-line

no-unused-vars (11): packages/core/src/execute.ts, packages/cli/src/cli.ts
unbound-method (9): packages/cli/src/testing-host.ts, packages/cli/src/cli.ts, packages/core/src/execute.ts
no-shadow (7): packages/core/component-modules/hooks.ts, packages/core/component-modules/deno.ts, packages/core/src/execute.ts
no-unsafe-type-assertion (7): packages/cli/src/cli.ts, packages/core/src/execute.ts, packages/cli/src/deno.ts
no-floating-promises (6): packages/core/tests/fixtures/component-module-readonly.ts, packages/core/tests/fixtures/typescript-materialization.ts, packages/test-support/launch.ts (+2)
no-unnecessary-type-assertion (5): packages/core/src/execute.ts
no-empty-function (4): packages/cli/src/testing-host.ts, packages/test-support/launch.ts, packages/core/src/execute.ts (+1)
consistent-return (4): packages/core/src/execute.ts, packages/cli/src/cli.ts
no-console (3): packages/cli/src/cli.ts
consistent-function-scoping (2): packages/test-support/launch.ts, packages/core/src/execute.ts
no-redundant-type-constituents (2): packages/core/component-modules/hooks.ts, packages/test-support/launch.ts
no-duplicate-type-constituents (2): packages/core/src/execute.ts
no-array-sort (1): packages/core/src/execute.ts
no-unmodified-loop-condition (1): packages/cli/src/cli.ts
no-useless-spread (1): packages/cli/src/cli.ts

Correctness

No extraneous code patterns detected.

Comment thread packages/core/component-modules/transform.ts
Comment thread packages/core/src/typescript-module.ts
Comment thread packages/core/tests/fixtures/component-module-readonly.ts
Comment thread packages/core/deno.json
Comment thread packages/core/deno.json Outdated
Comment thread deno.json Outdated
Comment thread package.json Outdated
@taras
taras marked this pull request as ready for review October 22, 2026 20:42
@taras
taras merged commit 83f920b into main Oct 22, 2026
45 checks passed
@taras
taras deleted the agent/repl-components-896-codex-20261022 branch October 22, 2026 20:54
@taras taras mentioned this pull request Oct 22, 2026
3 tasks
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