Skip to content

feat!: move the executor API to ./executor, drop ./core (A3) - #397

Merged
LinuxDevil merged 1 commit into
mainfrom
lou-a3-executor-subpath
Oct 4, 2026
Merged

LinuxDevil merged 1 commit into
mainfrom
lou-a3-executor-subpath

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

Closes #240

What

Moves the lower-level executor API out of the package root to a new @lousho/build-ai-agent/executor entry point, so the import path says what the docs already teach: createAgent() is the default, the executor is advanced.

Moved off the root (10 names):

  • AgentExecutor, type ExecuteOptions
  • AgentBuilder
  • resumeAfterApproval, streamResumeAfterApproval, resumeRequest
  • type ResumeExecuteOptions, type ResumeRequest
  • ToolRegistry, globalToolRegistry

Still exported where expected:

  • ExecutionResult and ExecutionFinishReason stay on the root (createAgent()'s public types use them) and are re-exported from ./executor.
  • ToolRegistry / globalToolRegistry stay on @lousho/build-ai-agent/tools; ./executor and ./tools share one binding (verified by sharedChunks.test.ts for both ESM and CJS).
  • ./core is removed from exports, tsup entries and dist/; src/core/ stays for internal imports/tests.

Root export count

696 -> 686 (-10, measured via the TypeScript compiler API over src/index.ts). ./executor exports the 12 listed names.

Verified

  • npm run typecheck, npm run lint clean
  • npm run build: dist/executor/index.{js,mjs,d.ts,d.mts} emitted; dist/core/ gone
  • npx vitest run: 294 files, 4268 tests pass (incl. importGraph, sharedChunks, publicSurface)
  • npm run test:types: 18 files, 88 type tests, no errors
  • npm run docs:verify-snippets -- --skip-build: 257 snippets, all type-check; 8 runnable pass
  • npm run pack-smoke: all functional checks pass (19/19 ESM + CJS entries, tsc resolution under bundler and node16)
  • Agent Forge: typecheck, lint (0 errors), test (119), test:server (133), build all pass
  • npm run docs:llms regenerated; acceptance grep for root executor imports is clean

Deviations

  • pack-smoke reports two pre-existing threshold failures (tarball 921 entries > 900, 16.87 MB > 16 MB). A3's file delta is net zero in dist (dist/core -> dist/executor) and +2 files in src/; the limits were already exceeded before this change.
  • npm run build needed NODE_OPTIONS=--max-old-space-size=12288 locally for the tsup DTS worker (heap OOM at the default limit).

Migration note added to CHANGELOG under Unreleased > Breaking.

@LinuxDevil
LinuxDevil force-pushed the lou-a2c-remove-delegate branch from 80ef674 to d64750e Compare October 4, 2026 12:44
@LinuxDevil
LinuxDevil changed the base branch from lou-a2c-remove-delegate to main October 4, 2026 12:45
@LinuxDevil
LinuxDevil force-pushed the lou-a3-executor-subpath branch from 8e5c44f to a32fc57 Compare October 4, 2026 12:47
AgentBuilder, AgentExecutor, ExecuteOptions, resumeAfterApproval,
streamResumeAfterApproval, resumeRequest, ResumeExecuteOptions,
ResumeRequest, ToolRegistry and globalToolRegistry moved out of the
package root to the new '@lousho/build-ai-agent/executor' entry point.
ToolRegistry stays on '@lousho/build-ai-agent/tools' too; the two
entries share one binding. The './core' subpath is removed (src/core/
stays for internal imports). ExecutionResult and ExecutionFinishReason
stay on the root - createAgent()'s public types use them.

Root exports: 696 -> 686 (-10).

Closes #240
@LinuxDevil
LinuxDevil force-pushed the lou-a3-executor-subpath branch from a32fc57 to 35dd8b4 Compare October 4, 2026 12:49
@LinuxDevil
LinuxDevil merged commit 79cfa84 into main Oct 4, 2026
1 of 8 checks passed
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.

[A3] Move AgentBuilder, AgentExecutor and resumeAfterApproval to ./executor

1 participant