Extract session readers into @liwala/agent-sessions workspace package#18
Merged
Conversation
Moves src/entire/ into packages/agent-sessions/ as a standalone npm
workspace package; sheal now consumes session-reading via the package
barrel instead of internal imports.
- New package: @liwala/agent-sessions@0.0.1 (MIT, Node >=22)
- Renames drop the misleading "Entire.io" framing now that the package
also houses native readers for Claude, Codex, Amp, and Gemini:
claude-native.ts → claude.ts
codex-native.ts → codex.ts
amp-native.ts → amp.ts
gemini-native.ts → gemini.ts
reader.ts → entire-reader.ts
- Barrel expanded to re-export everything sheal previously deep-imported
(amp/codex/gemini functions and types) so all consumers reach for
@liwala/agent-sessions only — no subpath imports.
- exec helper copied into the package so it has zero internal deps on
sheal; sheal keeps src/utils/exec.ts for its other callers.
- npm workspace wires everything up: root build runs the workspace
build first, then sheal.
All 254 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add LICENSE to the package (was declared in files[] but missing).
- Pin sheal -> agent-sessions dep to ^0.0.1 instead of "*".
- Move NativeProject from claude.ts to types.ts so amp/codex/gemini
don't depend on a Claude-specific module.
- Inline exec helper into entire-reader.ts as a private runGit and
drop packages/agent-sessions/src/exec.ts (was byte-identical to
src/utils/exec.ts).
- Remove dead totalFiles in amp.ts.
- Coalesce per-file imports from @liwala/agent-sessions and replace
inline import("...") types in retro.ts with bare references.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI was running `npx tsc` then `npx vitest run` after `npm ci`, but `packages/agent-sessions/dist/` is gitignored and never built — every test that imports `@liwala/agent-sessions` would fail to resolve. Switch CI to `npm run build`, which already builds workspaces first. Also: tsc never removes outputs for deleted sources, so removing src/exec.ts left dist/exec.* lingering in the package tarball. Add a `clean` step to the workspace build and a `prepublishOnly` guard so a stale dist can't ship. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
src/entire/into a new@liwala/agent-sessionsworkspace package, so the parsers can be consumed standalone (npm install @liwala/agent-sessions).^0.0.1); all consumers updated to import from@liwala/agent-sessions.NativeProjectmoved to sharedtypes.ts(no Claude-specific module ownership),runGithelper inlined privately intoentire-reader.ts(drops a duplicate ofsrc/utils/exec.ts), deadtotalFilesremoved inamp.ts, multi-line same-package imports coalesced across consumers.cleanstep wipesdist/before eachtsc(so a deleted source can't ship as a stale output),prepublishOnlyenforces a fresh build, and CI now runsnpm run buildinstead ofnpx tscso workspace dist exists before vitest runs.files: [..., "LICENSE"]claim.Test plan
npm run buildfrom a clean state (bothdist/dirs removed) — succeeds, workspace cleaned + rebuilt before roottscnpx vitest run— 254/254 passnpx tsc --noEmit— cleancd packages/agent-sessions && npm pack --dry-run— tarball includes LICENSE, no staleexec.*files, 19 entries total🤖 Generated with Claude Code