Repository navigation
[EPIC-D][LOU-D35] Remove flows-ai converters and the nanoid dependency - #82
Merged
Merged
Conversation
Delete src/flows/converters.ts (+ test): it targeted a flows-ai engine that was never a dependency and FlowExecutor never used it. Replace every nanoid() call with a tiny newId() built on globalThis.crypto.randomUUID() (Node 22 and Cloudflare Workers both provide it) and drop nanoid from package.json and the lockfile. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016bY29ibQgv3MDdjAbUT4YR
…rs-nanoid # Conflicts: # CHANGELOG.md
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.
What
src/flows/converters.ts(convertToFlowDefinition/convertFromFlowDefinition) and its test, and removes theexport * from './converters're-export (it was part of the root and./flowspublic export).src/utils/id.tswithnewId(prefix?)built onglobalThis.crypto.randomUUID()(plusid.test.ts), and replaces everynanoid()call (10 files: FlowBuilder, sessionStream, data/mocks, AgentBuilder, json-path, errors, tracing, agentRun, MemoryManager, AgentExecutor, import swap only).nanoidfrompackage.jsonandpackage-lock.json(lockfile edited by hand to the singlenode_modules/nanoidentry plus the root dependency line; 19 deletions, no npm-versionlibcchurn). Transitive nanoid 3.x copies used byai/postcssare untouched.Removedentries with migration notes; two doc comments insrc/types/flow.tsno longer mention the converters.Why
The converters targeted a flows-ai engine that was never a dependency and
FlowExecutornever used them (donor-project residue, AUDIT section 4). nanoid is a runtime dependency used only to make opaque ids; Node 22 and Cloudflare Workers both providecrypto.randomUUID(), so no dependency ornode:cryptoimport is needed (the Workers bundle stays Node-builtin free). No code in apps/agent-forge, examples or packages/create-loushy-agent imported the converters or nanoid.Acceptance criteria
src/flows/converters.tsand its test deleted; re-export removed; CHANGELOGRemovedentry with migration note (no replacement)src/utils/id.tsexportsnewId(prefix?)onglobalThis.crypto.randomUUID(); nonode:cryptofallback needednanoidimport replaced; no test asserted the old id format (session test regex^[A-Za-z0-9_-]+$still matches)nanoidremoved from package.json and package-lock.json; no workspace depends on it;npm ci --dry-runsucceedsnpm run build(incl.src/deploy/runtime.worker.tsbundle) and cloudflare adapter tests pass.fallowrc.jsonunchangedHow verified
npx tsc --noEmit: no errorsnpm run lint: 0 errors, 420 warnings (main: 433, so down 13)npm run test:types: no type errorsnpx vitest run(after build): 140 files passed, 2044 tests passed, 3 skippednpm run build && npm run build --workspace=packages/create-loushy-agent: successnpx vitest run src/deploy: 5 files, 36 passed, 1 skippednpm run test:coverage: 140 files, 2044 passednpm run fallow: exit 0, 0 above thresholdnpm run docs:llms:check: passes (no README/docs changes)🤖 Generated with Claude Code
https://claude.ai/code/session_016bY29ibQgv3MDdjAbUT4YR
Generated by Claude Code