Repository navigation
Releases: hyein-cbio/pi-codemode-diff
Release list
v0.1.4-pig
Native Go release 0.1.4-pig
Native Go source release corresponding to the JavaScript/npm release 0.1.4, from commit 30b0ab9b24ab01d238e612fd0f3d64196f9fdcc1.
Changes
- Show distinct recorded file-path counts alongside per-call changes.
- Summarize unavailable diffs across the whole call, including changes outside the preview, without treating empty diffs as unavailable.
- Add an installable native package wrapper:
native/package.jsondeclaresextensions: ["pig"], with version0.1.4-pig. - Correct persistent installation to target
native, notnative/pig. PiG rejects the individual Go extension directory as an installable package; direct-e native/pigloading remains supported.
Native-only attachments
pi-codemode-diff-0.1.4-pig-source.tar.gzpi-codemode-diff-0.1.4-pig-source.zipSHA256SUMS
The archives include the native/pig Go module, its tests/fixtures/docs/licenses/notices, native/package.json, native/piglet.yaml, and the root license. They contain no JavaScript/TypeScript implementation or Node dependencies. GitHub's automatic Source code downloads contain the full repository; use the named attachments for the native-only distribution.
No npm package is published by this native release. No compiled binaries are attached; fused builds are not rebuilt or recertified for this patch. Full development scripts remain in the repository.
Install
After verifying the selected archive against SHA256SUMS:
tar -xzf pi-codemode-diff-0.1.4-pig-source.tar.gz
cd pi-codemode-diff-0.1.4-pig
pig install "$PWD/native"Requires PiG 0.4.1 and Go >=1.26 for source compilation; tested with PiG 0.4.1+1.0.3 and Go 1.27.2. Keep the extracted package at its installed location, enable codemode separately, and run /reload in an existing session. Load only one implementation.
Validation
- Go race tests and
go vetpass in the extracted release archive on macOS/arm64. - Actual PiG installs the extracted package, auto-loads it from isolated settings without a direct extension flag, and captures nested write/edit calls with model-context isolation.
- Actual PiG TypeScript and Go-source PTYs pass summary counts, expansion/collapse, reload, and session resume.
- TypeScript type checking and 92 tests pass; one optional actual Node-loader fixture is skipped.
Existing PiG host input-rewrite limitations documented in COMPATIBILITY.md are unchanged. Historical full-parity/fused validation in that report is not a fresh validation claim for this patch.
v0.1.4
Clearer codemode diff summaries
- Distinguish per-call changes from distinct recorded file paths:
File changes (5) · 2 files. - Summarize missing retained diffs with
· N diffs unavailable, including changes outside the collapsed preview. Per-change notices retain the reason; expanding cannot recover these diffs. - Do not count empty diffs or diffs merely folded by the preview as unavailable. Repeated-path changes remain separate, and paths are compared exactly as recorded.
- Preserve file mutation behavior, model-facing results, and saved display metadata format.
Distribution
This is the JavaScript/TypeScript release. The attached pi-codemode-diff-0.1.4.tgz contains only src/, README.md, LICENSE, and package.json; it contains no native/ directory, Go source, Go module files, or native package metadata. Runtime dependencies are declared, not bundled.
The native Go source package is distributed separately in v0.1.4-pig. Do not load both implementations in one PiG session.
Validation
- Type checking passed; 92 TypeScript tests passed. One optional PiG Node-runtime loader fixture was skipped because its source runtime directory was not supplied.
- The exact attached npm artifact was extracted and loaded through real Pi integration, including nested write/edit capture.
- Actual PiG 0.4.1+1.0.3 TypeScript and Go-source paths passed JSON and PTY checks for summaries, Ctrl+O expansion/collapse, reload, and session resume.
- Native Go race tests and
go vetpassed with Go 1.27.2 on macOS/arm64. git diff --checkpassed. This patch does not claim a fresh fused-binary or full cross-host parity run.
Install
pi install npm:pi-codemode-diff@0.1.4
# Or install the GitHub tag:
pi install git:github.com/hyein-cbio/pi-codemode-diff@v0.1.4Run /reload in an existing session. The attached npm tarball is the artifact selected for npm registry publication.
Commit: 30b0ab9b24ab01d238e612fd0f3d64196f9fdcc1.
v0.1.3-pig
Native Go release corresponding to pi-codemode-diff 0.1.3.
This release distributes only the native/pig Go extension module from commit c739c1d7a7e9d2b180bd9022d99b718d9b3565a5. No npm package is published by this release.
pi-codemode-diff-0.1.3-pig-source.tar.gzpi-codemode-diff-0.1.3-pig-source.zipSHA256SUMS
The attached archives contain only native/pig, including its Go module, tests, fixtures, README, license, notices, and compatibility reports. GitHub's automatically generated Source code downloads contain the whole repository; use the named attachments for the native-only distribution.
Requires PiG 0.4.1 and a Go toolchain. Validated with Go 1.27.2; the module language floor is 1.26.
sha256sum --ignore-missing -c SHA256SUMS
tar -xzf pi-codemode-diff-0.1.3-pig-source.tar.gz
cd pi-codemode-diff-0.1.3-pig
pig -e "$PWD/native/pig" --tools read,bash,edit,write,codemodeEnable codemode if it is not already selected. Load one implementation: this Go factory and the TypeScript extension register the same write/edit tools and PiG display entry.
- One
Extension() *sdk.Extensionfactory supports Go source subprocess and fused Piglet builds. - Write and edit share a per-file queue, including dependent concurrent operations.
- Completed nested changes display as persisted PiG entries, with bounded previews and expansion, without adding diffs to model-facing tool content.
- Reload and session resume restore saved entries.
The source archive contains the Go factory. For fused builds, use native/piglet.yaml from this tag in the full repository checkout. This release does not attach compiled binaries.
Validated on Linux/amd64 with PiG 0.4.1+1.0.3 and Go SDK 0.4.1. The extracted release archive passes Go race tests, go vet, PiG factory validation, and an actual nested write/edit execution.
Latest-version validation ran 25 scenarios twice across six paths (300 invocations), with no extension-on/off regressions and matching PiG TypeScript/source/fused results. Sequential and dependent parallel write/edit pass 20/20; overwritten successful edits occur 0/20; queued write batches pass 3/3. TUI expansion, reload, resume, and Node-free Go execution pass.
The official PiG 0.4.1 release ignores tool_call input path rewrites made by other extensions, including when this extension is disabled. Consequently, strict Pi 1.3.0/PiG release parity remains 23/25. The two cases pass against the corrected PiG main revision. See the compatibility report for exact scope and evidence.
v0.1.3
Bounded codemode diffs
This patch release bounds the extension's snapshot, diff-storage, and rendering costs for large writes and edits without changing file mutations or model-facing tool results.
Safety budgets
| Stage | UTF-8 bytes | Logical lines |
|---|---|---|
| Each previous/new write input, before diff generation | 256 KiB | 2,000 |
| Each retained write/edit diff | 64 KiB | 2,000 |
| Total retained diffs per parent codemode call | 256 KiB | 8,000 |
- Omit an entire diff when either limit is exceeded; show an explicit reason and available previous/new file byte sizes instead of a partial diff.
- Bound actual snapshot reads to 256 KiB plus one overflow-detection byte, even when a file grows after its size is checked. Skip reading the previous content when the new content is already over budget.
- Apply shared storage budgets to both writes and edits, with separate budgets for parallel parent codemode calls.
- Apply the same display limits to oversized diffs in older resumed sessions without rewriting those session files.
- Keep exact written bytes, tool success/failure, model-facing results, and direct write behavior unchanged. The edit tool's own diff computation is not modified.
These limits bound the extension's retained diff payloads, not all tool arguments, metadata, or the total size of a long session. Omitted diffs cannot be recovered by expanding the view. No full-content hash or backup is generated for an omitted write.
cwd regression protection
Add a regression test proving that the same direct-write wrapper follows a changed execution-context cwd without reloading the extension, while preserving the old workspace and native results. No cwd implementation change is included.
Validation
npm run typecheckpassed.- 88 tests passed; 1 optional actual-PiG-runtime loader test was skipped because
PIG_NODE_RUNTIME_DIRwas not provided. - Tests cover byte/line boundaries, multibyte text, short reads, file growth after stat, per-diff and parent budgets, write/edit budget sharing, omission rendering, unchanged tool outcomes, session persistence/resume, and loading the packed npm artifact through real Pi.
git diff --checkpassed.- PiG compatibility unit tests passed; the actual PiG executable was not revalidated for this release.
Install
pi install git:github.com/hyein-cbio/pi-codemode-diff@v0.1.3
pig install git:github.com/hyein-cbio/pi-codemode-diff@v0.1.3Run /reload in an existing session after upgrading.
The attached npm tarball contains source, README, license, and the manifest; dependencies are declared rather than bundled. npm registry publication is a separate manual step and has not been performed as part of this GitHub release.
v0.1.2
Word-level diff highlighting
- Highlight changed words in single-line codemode edit/write replacements using red/green inverse video, matching Pi's native edit rendering.
- Apply highlighting in collapsed previews and expanded views, including persisted PiG entries.
- Use the renderer-provided theme rather than Pi's global theme; retain colors after theme changes, session resume, and reload.
- Preserve terminal-control sanitization and keep ANSI styling out of stored diffs and model-facing results.
- Preserve each original line's whitespace. If word diffing cannot reconstruct both inputs exactly, display the original lines without word highlighting.
- Bound large or complex word comparisons and fall back to ordinary line colors.
Scope and dependencies
Like Pi's native edit diff, word highlighting applies only to a consecutive block containing exactly one removed line and one added line. Multi-line replacements and standalone additions/deletions retain line colors.
The package now declares diff as a runtime dependency. Pi installs it for npm/git sources. For local checkouts, install dependencies before loading:
npm install --omit=dev --omit=peer --ignore-scripts
# Or npm ci for development.PiG still uses the existing Node compatibility path and separate completion-time entries; this release does not include a native Go port.
Validation
npm run typecheckpassed.- 73 tests passed; 1 optional actual-PiG-runtime loader test was skipped because
PIG_NODE_RUNTIME_DIRwas not provided. - Tests cover parity with Pi's native word highlighting in dark/light themes, previews, Unicode/wrapping, control-character sanitization, whitespace preservation, model-context isolation, real Pi tool-component rendering, theme changes, session resume, and npm artifact loading.
- PiG entry rendering is covered by unit tests; this release's new highlighting was not revalidated in the actual PiG executable.
git diff --checkandnpm publish --dry-run --ignore-scriptspassed.
Install
pi install git:github.com/hyein-cbio/pi-codemode-diff@v0.1.2
pig install git:github.com/hyein-cbio/pi-codemode-diff@v0.1.2Run /reload in an existing session after upgrading.
The attached npm tarball contains source, README, license, and the manifest; dependencies are declared rather than bundled. npm registry publication is a separate manual step and has not been performed as part of this GitHub release.
v0.1.1
PiG compatibility
- Add a PiG-only display path for codemode file changes without replacing the native codemode renderer (D89).
- Load the PiG display module only after confirming the actual PiG Node runtime API identity. Pi keeps the existing synchronous renderer-composition path.
- Persist completed changes in non-model-facing custom transcript entries, using the same previews, diff styling, sanitization, and expansion as Pi.
- Preserve script output, success/error status, and written file bytes. New PiG entries remain visible after session resume and extension reload.
- Strengthen packaging regression checks for both new runtime modules and document upgrade revalidation.
Limitations
PiG displays diffs in separate entries after the parent call completes, not as live partial inline diffs. Existing PiG sessions without these entries are not backfilled. Host detection uses PiG's private SDK shim contract and must be revalidated after PiG upgrades.
Validation
- TypeScript typecheck and all 61 tests passed, including the actual PiG Node SDK/jiti loader and package smoke tests.
- The release tarball also passed the PiG loader fixture.
- Installed Pi 1.0.3 and PiG 0.4.1+1.0.3 executables were checked with isolated offline scripted sessions. Model-facing output (excluding elapsed time), statuses, and written bytes matched before/after the change.
- PiG interactive PTY checks passed for completed diff display, preview, Ctrl+O expand/collapse, session resume, and
/reload.
Install
Install the pinned GitHub release:
pi install git:github.com/hyein-cbio/pi-codemode-diff@v0.1.1
pig install git:github.com/hyein-cbio/pi-codemode-diff@v0.1.1Run /reload in an existing session after upgrading.
The attached npm tarball contains the extension source, README, license, and package manifest only. npm registry publication of 0.1.1 is pending npm two-factor authentication; this GitHub release and its attached tarball are available independently.
v0.1.0
Initial release
- Display per-call edit and write diffs inside Pi codemode without adding diffs to model-facing content.
- Collapsed previews and expandable full diff rendering.
- Preserve display metadata across session resume and extension reload.
- Declare Pi >=1.0.1 host requirements and report a clear upgrade error on unsupported hosts.
Requirements
- Pi 1.0.1 or later.
- Node.js 22.19 or later.
- Codemode must be enabled.
Install from GitHub
pi install git:github.com/hyein-cbio/pi-codemode-diff@v0.1.0The attached npm tarball contains the extension source, README, license, and package manifest only. npm registry publication is a separate manual step.
Validation
TypeScript typecheck and all 55 tests passed, including real-Pi integration and packed-package smoke tests.