feat!: move flows, integrations and utilities out of the package root (A1) - #387
Merged
Merged
Conversation
… (A1) The root exported 825 names; flows, the credentialed Jira/GitHub/Slack/email tools, encryption, StorageService and the validators were not agent functionality a new user needs there. They move to subpaths, nothing is removed: - './flows' now also re-exports the flow types (they leave './types') - new './integrations' re-exports email/jira/github/slack built-ins (they leave the root and './tools') - new './utils' holds crypto, security option types, StorageService, StorageServiceApprovalStore, LocalStorageCheckpointStore and the validators; the root keeps only utils/errors and utils/errorCodes - root exports drop './flows', './storage' (barrel deleted) and the two StorageService stores move with it Root exports: 825 -> 727 (98 fewer; isCreateAgentResult was added to the flows barrel after the audit's count of 97). New src/publicSurface.test.ts / .test-d.ts pin the split; later wave-4 tickets extend them. Closes #236
LinuxDevil
force-pushed
the
lou-a1-subpaths
branch
from
October 4, 2026 12:39
28e5d09 to
2342328
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #236
What
Moves flows, the credentialed Jira/GitHub/Slack/email tools, encryption,
StorageServiceand the validators out of the package root into subpaths. Nothing is removed../flowsnow also re-exportssrc/types/flow(the flow types leave the root and./types)../integrationsre-exportstools/built-in/{email,jira,github,slack};tools/built-in/index.tsdrops them, so they leave the root and./tools../utils(src/utils/index.tsbecomes the subpath barrel) exportssecurity/crypto, the threesecurity/typestypes,storage/StorageService,storage/types,StorageServiceApprovalStore,LocalStorageCheckpointStoreand./validators; it no longer re-exports./errors/./errorCodes(the root exports those two modules directly instead).src/storage/index.tsis deleted;ApprovalGate.ts/checkpoint.tsimport../storage/StorageServicedirectly.src/execution/index.tsexports explicit named lists fromApprovalGate/checkpointminus the two moved stores.package.jsonexports+tsup.config.tsentries added for./integrationsand./utils.specToAgent()'s credentials error now namescreateGitHubTools(config)/createJiraTools(config)from@lousho/build-ai-agent/integrations(codeLOUSHO_TOOL_NEEDS_CREDENTIALSunchanged).importGraph.test.tsENTRY_POINTSgains both entries;verify-docs-snippets.ts'sstorageplaceholder is now typed from/utils.@lousho/build-ai-agent/flows.docs/installation.mdgains the entry-point table at the end of the "Entry points share code" section (no new heading).src/publicSurface.test.ts/src/publicSurface.test-d.tspin the split (value names absent from root + present on the subpath; type names via@ts-expect-error/expectTypeOf). A2a/A2b/A2c/A3/A5 will append their names.### Breakingentry with the ticket's migration note.Export counts (TypeScript checker over
src/index.ts)isCreateAgentResult(LOU-R14, LOU-R14: reject createAgent() agents passed to flows #364) was added after the ticket'scc5ddb8measurement. Subpath counts:./flows52,./integrations24,./utils22../typeslost the 33 flow types (65→32);./toolslost the 24 integration names (136→112).Spec decisions exercised / ambiguities resolved
./integrationsand./utilsnames kept as decided in the ticket.src/flows/index.tsre-exports../types/flowafter its own barrels — no collision (FlowDefinitionNodestays distinct).docs/api-overview.mdwas split since the ticket's line numbers were written; the moved prose lives atapi-overview.md:50(stores row),:317(flows bullet),:343(utilities bullet) and was updated in place.docs/sessions.mdno longer mentions the two stores (G-wave rewrite removed the snippet), so nothing to change there.docs/streaming.md/docs/errors.mdmentioncreateGitHubTools(config); errors.md now names the/integrationsspecifier.apps/agent-forge/server/runRegistry.ts:599used an inlineimport('@lousho/build-ai-agent').AgentFlow; switched to the new/flowstype import (the ticket's grep only coveredimport { }statements).scripts/.tmp/helper script kept uncommitted viainfo/exclude.Verification
npm run build(ESM+CJS+DTS) ✓ —dist/integrations/index.*anddist/utils/index.*emitted.npx tsc --noEmit✓ ·npm run typecheck:tests✓ ·npm run test:types✓ (82 typecheck tests incl.publicSurface.test-d.ts) ·npm run lintzero warnings.npx vitest run src/publicSurface.test.ts src/providers/importGraph.test.ts src/providers/sharedChunks.test.ts src/spec/specToAgent.test.ts src/flows src/tools/built-in src/execution/ApprovalGate.test.ts src/execution/checkpoint.test.ts src/execution/checkpointHistory.contract.test.ts— 540 tests pass;importGraphcovers the two new entries in ESM and CJS.npm run docs:verify-snippets -- --skip-build✓ (258 snippets type-check, 8 run).typecheck✓,typecheck:server✓,test -- --run(119) ✓,test:server(133) ✓.npm run docs:llmsre-run,llms.txt/llms-full.txtcommitted.npm run pack-smoke: everyexportsentry loads from the packed tarball in ESM and CJS (19/19),createAgent+mockModelturn ok in both — but the tarball-size guards fail: 924 entries (cap 900), 16,996,312 B unpacked (cap 16 MiB), 4,625,773 B packed (cap 4.5 MiB). Pre-existing onmain: measured ~898 entries / ~16.99 MB / ~4.6 MB there too — alpha.9 growth already breaches all three caps; the in-flightfix/lou-s1-tarballPR slims the tarball (test-d.ts/testkit/cassettes exclusions,MAX_ENTRIES1050) and is the designated fix. This PR adds ~26 entries legitimately (two new dist subpath entries +src/integrations/index.ts).