diff --git a/bun.lock b/bun.lock index 6cb6c1e6e..42d2fc44c 100644 --- a/bun.lock +++ b/bun.lock @@ -22,7 +22,7 @@ }, "packages/agent": { "name": "@oh-my-pi/pi-agent-core", - "version": "6.2.0", + "version": "6.7.0", "dependencies": { "@oh-my-pi/pi-ai": "workspace:*", "@oh-my-pi/pi-tui": "workspace:*", @@ -34,7 +34,7 @@ }, "packages/ai": { "name": "@oh-my-pi/pi-ai", - "version": "6.2.0", + "version": "6.7.0", "bin": { "pi-ai": "./src/cli.ts", }, @@ -61,7 +61,7 @@ }, "packages/coding-agent": { "name": "@oh-my-pi/pi-coding-agent", - "version": "6.2.0", + "version": "6.7.0", "bin": { "omp": "src/cli.ts", }, @@ -101,7 +101,7 @@ }, "packages/git-tool": { "name": "@oh-my-pi/pi-git-tool", - "version": "6.2.0", + "version": "6.7.0", "devDependencies": { "@types/node": "^24.3.0", "vitest": "^3.2.4", @@ -125,7 +125,7 @@ }, "packages/tui": { "name": "@oh-my-pi/pi-tui", - "version": "6.2.0", + "version": "6.7.0", "dependencies": { "@types/mime-types": "^2.1.4", "chalk": "^5.5.0", @@ -336,55 +336,55 @@ "@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="], - "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.55.1", "", { "os": "android", "cpu": "arm" }, "sha512-9R0DM/ykwfGIlNu6+2U09ga0WXeZ9MRC2Ter8jnz8415VbuIykVuc6bhdrbORFZANDmTDvq26mJrEVTl8TdnDg=="], + "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.55.2", "", { "os": "android", "cpu": "arm" }, "sha512-21J6xzayjy3O6NdnlO6aXi/urvSRjm6nCI6+nF6ra2YofKruGixN9kfT+dt55HVNwfDmpDHJcaS3JuP/boNnlA=="], - "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.55.1", "", { "os": "android", "cpu": "arm64" }, "sha512-eFZCb1YUqhTysgW3sj/55du5cG57S7UTNtdMjCW7LwVcj3dTTcowCsC8p7uBdzKsZYa8J7IDE8lhMI+HX1vQvg=="], + "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.55.2", "", { "os": "android", "cpu": "arm64" }, "sha512-eXBg7ibkNUZ+sTwbFiDKou0BAckeV6kIigK7y5Ko4mB/5A1KLhuzEKovsmfvsL8mQorkoincMFGnQuIT92SKqA=="], - "@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.55.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-p3grE2PHcQm2e8PSGZdzIhCKbMCw/xi9XvMPErPhwO17vxtvCN5FEA2mSLgmKlCjHGMQTP6phuQTYWUnKewwGg=="], + "@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.55.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-UCbaTklREjrc5U47ypLulAgg4njaqfOVLU18VrCrI+6E5MQjuG0lSWaqLlAJwsD7NpFV249XgB0Bi37Zh5Sz4g=="], - "@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.55.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-rDUjG25C9qoTm+e02Esi+aqTKSBYwVTaoS1wxcN47/Luqef57Vgp96xNANwt5npq9GDxsH7kXxNkJVEsWEOEaQ=="], + "@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.55.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-dP67MA0cCMHFT2g5XyjtpVOtp7y4UyUxN3dhLdt11at5cPKnSm4lY+EhwNvDXIMzAMIo2KU+mc9wxaAQJTn7sQ=="], - "@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.55.1", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-+JiU7Jbp5cdxekIgdte0jfcu5oqw4GCKr6i3PJTlXTCU5H5Fvtkpbs4XJHRmWNXF+hKmn4v7ogI5OQPaupJgOg=="], + "@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.55.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-WDUPLUwfYV9G1yxNRJdXcvISW15mpvod1Wv3ok+Ws93w1HjIVmCIFxsG2DquO+3usMNCpJQ0wqO+3GhFdl6Fow=="], - "@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.55.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-V5xC1tOVWtLLmr3YUk2f6EJK4qksksOYiz/TCsFHu/R+woubcLWdC9nZQmwjOAbmExBIVKsm1/wKmEy4z4u4Bw=="], + "@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.55.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-Ng95wtHVEulRwn7R0tMrlUuiLVL/HXA8Lt/MYVpy88+s5ikpntzZba1qEulTuPnPIZuOPcW9wNEiqvZxZmgmqQ=="], - "@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.55.1", "", { "os": "linux", "cpu": "arm" }, "sha512-Rn3n+FUk2J5VWx+ywrG/HGPTD9jXNbicRtTM11e/uorplArnXZYsVifnPPqNNP5BsO3roI4n8332ukpY/zN7rQ=="], + "@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.55.2", "", { "os": "linux", "cpu": "arm" }, "sha512-AEXMESUDWWGqD6LwO/HkqCZgUE1VCJ1OhbvYGsfqX2Y6w5quSXuyoy/Fg3nRqiwro+cJYFxiw5v4kB2ZDLhxrw=="], - "@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.55.1", "", { "os": "linux", "cpu": "arm" }, "sha512-grPNWydeKtc1aEdrJDWk4opD7nFtQbMmV7769hiAaYyUKCT1faPRm2av8CX1YJsZ4TLAZcg9gTR1KvEzoLjXkg=="], + "@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.55.2", "", { "os": "linux", "cpu": "arm" }, "sha512-ZV7EljjBDwBBBSv570VWj0hiNTdHt9uGznDtznBB4Caj3ch5rgD4I2K1GQrtbvJ/QiB+663lLgOdcADMNVC29Q=="], - "@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.55.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-a59mwd1k6x8tXKcUxSyISiquLwB5pX+fJW9TkWU46lCqD/GRDe9uDN31jrMmVP3feI3mhAdvcCClhV8V5MhJFQ=="], + "@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.55.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-uvjwc8NtQVPAJtq4Tt7Q49FOodjfbf6NpqXyW/rjXoV+iZ3EJAHLNAnKT5UJBc6ffQVgmXTUL2ifYiLABlGFqA=="], - "@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.55.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-puS1MEgWX5GsHSoiAsF0TYrpomdvkaXm0CofIMG5uVkP6IBV+ZO9xhC5YEN49nsgYo1DuuMquF9+7EDBVYu4uA=="], + "@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.55.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-s3KoWVNnye9mm/2WpOZ3JeUiediUVw6AvY/H7jNA6qgKA2V2aM25lMkVarTDfiicn/DLq3O0a81jncXszoyCFA=="], - "@rollup/rollup-linux-loong64-gnu": ["@rollup/rollup-linux-loong64-gnu@4.55.1", "", { "os": "linux", "cpu": "none" }, "sha512-r3Wv40in+lTsULSb6nnoudVbARdOwb2u5fpeoOAZjFLznp6tDU8kd+GTHmJoqZ9lt6/Sys33KdIHUaQihFcu7g=="], + "@rollup/rollup-linux-loong64-gnu": ["@rollup/rollup-linux-loong64-gnu@4.55.2", "", { "os": "linux", "cpu": "none" }, "sha512-gi21faacK+J8aVSyAUptML9VQN26JRxe484IbF+h3hpG+sNVoMXPduhREz2CcYr5my0NE3MjVvQ5bMKX71pfVA=="], - "@rollup/rollup-linux-loong64-musl": ["@rollup/rollup-linux-loong64-musl@4.55.1", "", { "os": "linux", "cpu": "none" }, "sha512-MR8c0+UxAlB22Fq4R+aQSPBayvYa3+9DrwG/i1TKQXFYEaoW3B5b/rkSRIypcZDdWjWnpcvxbNaAJDcSbJU3Lw=="], + "@rollup/rollup-linux-loong64-musl": ["@rollup/rollup-linux-loong64-musl@4.55.2", "", { "os": "linux", "cpu": "none" }, "sha512-qSlWiXnVaS/ceqXNfnoFZh4IiCA0EwvCivivTGbEu1qv2o+WTHpn1zNmCTAoOG5QaVr2/yhCoLScQtc/7RxshA=="], - "@rollup/rollup-linux-ppc64-gnu": ["@rollup/rollup-linux-ppc64-gnu@4.55.1", "", { "os": "linux", "cpu": "ppc64" }, "sha512-3KhoECe1BRlSYpMTeVrD4sh2Pw2xgt4jzNSZIIPLFEsnQn9gAnZagW9+VqDqAHgm1Xc77LzJOo2LdigS5qZ+gw=="], + "@rollup/rollup-linux-ppc64-gnu": ["@rollup/rollup-linux-ppc64-gnu@4.55.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-rPyuLFNoF1B0+wolH277E780NUKf+KoEDb3OyoLbAO18BbeKi++YN6gC/zuJoPPDlQRL3fIxHxCxVEWiem2yXw=="], - "@rollup/rollup-linux-ppc64-musl": ["@rollup/rollup-linux-ppc64-musl@4.55.1", "", { "os": "linux", "cpu": "ppc64" }, "sha512-ziR1OuZx0vdYZZ30vueNZTg73alF59DicYrPViG0NEgDVN8/Jl87zkAPu4u6VjZST2llgEUjaiNl9JM6HH1Vdw=="], + "@rollup/rollup-linux-ppc64-musl": ["@rollup/rollup-linux-ppc64-musl@4.55.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-g+0ZLMook31iWV4PvqKU0i9E78gaZgYpSrYPed/4Bu+nGTgfOPtfs1h11tSSRPXSjC5EzLTjV/1A7L2Vr8pJoQ=="], - "@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.55.1", "", { "os": "linux", "cpu": "none" }, "sha512-uW0Y12ih2XJRERZ4jAfKamTyIHVMPQnTZcQjme2HMVDAHY4amf5u414OqNYC+x+LzRdRcnIG1YodLrrtA8xsxw=="], + "@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.55.2", "", { "os": "linux", "cpu": "none" }, "sha512-i+sGeRGsjKZcQRh3BRfpLsM3LX3bi4AoEVqmGDyc50L6KfYsN45wVCSz70iQMwPWr3E5opSiLOwsC9WB4/1pqg=="], - "@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.55.1", "", { "os": "linux", "cpu": "none" }, "sha512-u9yZ0jUkOED1BFrqu3BwMQoixvGHGZ+JhJNkNKY/hyoEgOwlqKb62qu+7UjbPSHYjiVy8kKJHvXKv5coH4wDeg=="], + "@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.55.2", "", { "os": "linux", "cpu": "none" }, "sha512-C1vLcKc4MfFV6I0aWsC7B2Y9QcsiEcvKkfxprwkPfLaN8hQf0/fKHwSF2lcYzA9g4imqnhic729VB9Fo70HO3Q=="], - "@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.55.1", "", { "os": "linux", "cpu": "s390x" }, "sha512-/0PenBCmqM4ZUd0190j7J0UsQ/1nsi735iPRakO8iPciE7BQ495Y6msPzaOmvx0/pn+eJVVlZrNrSh4WSYLxNg=="], + "@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.55.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-68gHUK/howpQjh7g7hlD9DvTTt4sNLp1Bb+Yzw2Ki0xvscm2cOdCLZNJNhd2jW8lsTPrHAHuF751BygifW4bkQ=="], - "@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.55.1", "", { "os": "linux", "cpu": "x64" }, "sha512-a8G4wiQxQG2BAvo+gU6XrReRRqj+pLS2NGXKm8io19goR+K8lw269eTrPkSdDTALwMmJp4th2Uh0D8J9bEV1vg=="], + "@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.55.2", "", { "os": "linux", "cpu": "x64" }, "sha512-1e30XAuaBP1MAizaOBApsgeGZge2/Byd6wV4a8oa6jPdHELbRHBiw7wvo4dp7Ie2PE8TZT4pj9RLGZv9N4qwlw=="], - "@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.55.1", "", { "os": "linux", "cpu": "x64" }, "sha512-bD+zjpFrMpP/hqkfEcnjXWHMw5BIghGisOKPj+2NaNDuVT+8Ds4mPf3XcPHuat1tz89WRL+1wbcxKY3WSbiT7w=="], + "@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.55.2", "", { "os": "linux", "cpu": "x64" }, "sha512-4BJucJBGbuGnH6q7kpPqGJGzZnYrpAzRd60HQSt3OpX/6/YVgSsJnNzR8Ot74io50SeVT4CtCWe/RYIAymFPwA=="], - "@rollup/rollup-openbsd-x64": ["@rollup/rollup-openbsd-x64@4.55.1", "", { "os": "openbsd", "cpu": "x64" }, "sha512-eLXw0dOiqE4QmvikfQ6yjgkg/xDM+MdU9YJuP4ySTibXU0oAvnEWXt7UDJmD4UkYialMfOGFPJnIHSe/kdzPxg=="], + "@rollup/rollup-openbsd-x64": ["@rollup/rollup-openbsd-x64@4.55.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-cT2MmXySMo58ENv8p6/O6wI/h/gLnD3D6JoajwXFZH6X9jz4hARqUhWpGuQhOgLNXscfZYRQMJvZDtWNzMAIDw=="], - "@rollup/rollup-openharmony-arm64": ["@rollup/rollup-openharmony-arm64@4.55.1", "", { "os": "none", "cpu": "arm64" }, "sha512-xzm44KgEP11te3S2HCSyYf5zIzWmx3n8HDCc7EE59+lTcswEWNpvMLfd9uJvVX8LCg9QWG67Xt75AuHn4vgsXw=="], + "@rollup/rollup-openharmony-arm64": ["@rollup/rollup-openharmony-arm64@4.55.2", "", { "os": "none", "cpu": "arm64" }, "sha512-sZnyUgGkuzIXaK3jNMPmUIyJrxu/PjmATQrocpGA1WbCPX8H5tfGgRSuYtqBYAvLuIGp8SPRb1O4d1Fkb5fXaQ=="], - "@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.55.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-yR6Bl3tMC/gBok5cz/Qi0xYnVbIxGx5Fcf/ca0eB6/6JwOY+SRUcJfI0OpeTpPls7f194as62thCt/2BjxYN8g=="], + "@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.55.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-sDpFbenhmWjNcEbBcoTV0PWvW5rPJFvu+P7XoTY0YLGRupgLbFY0XPfwIbJOObzO7QgkRDANh65RjhPmgSaAjQ=="], - "@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.55.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-3fZBidchE0eY0oFZBnekYCfg+5wAB0mbpCBuofh5mZuzIU/4jIVkbESmd2dOsFNS78b53CYv3OAtwqkZZmU5nA=="], + "@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.55.2", "", { "os": "win32", "cpu": "ia32" }, "sha512-GvJ03TqqaweWCigtKQVBErw2bEhu1tyfNQbarwr94wCGnczA9HF8wqEe3U/Lfu6EdeNP0p6R+APeHVwEqVxpUQ=="], - "@rollup/rollup-win32-x64-gnu": ["@rollup/rollup-win32-x64-gnu@4.55.1", "", { "os": "win32", "cpu": "x64" }, "sha512-xGGY5pXj69IxKb4yv/POoocPy/qmEGhimy/FoTpTSVju3FYXUQQMFCaZZXJVidsmGxRioZAwpThl/4zX41gRKg=="], + "@rollup/rollup-win32-x64-gnu": ["@rollup/rollup-win32-x64-gnu@4.55.2", "", { "os": "win32", "cpu": "x64" }, "sha512-KvXsBvp13oZz9JGe5NYS7FNizLe99Ny+W8ETsuCyjXiKdiGrcz2/J/N8qxZ/RSwivqjQguug07NLHqrIHrqfYw=="], - "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.55.1", "", { "os": "win32", "cpu": "x64" }, "sha512-SPEpaL6DX4rmcXtnhdrQYgzQ5W2uW3SCJch88lB2zImhJRhIIK44fkUrgIV/Q8yUNfw5oyZ5vkeQsZLhCb06lw=="], + "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.55.2", "", { "os": "win32", "cpu": "x64" }, "sha512-xNO+fksQhsAckRtDSPWaMeT1uIM+JrDRXlerpnWNXhn1TdB3YZ6uKBMBTKP0eX9XtYEP978hHk1f8332i2AW8Q=="], "@sinclair/typebox": ["@sinclair/typebox@0.34.47", "", {}, "sha512-ZGIBQ+XDvO5JQku9wmwtabcVTHJsgSWAHYtVuM9pBNNR5E88v6Jcj/llpmsjivig5X8A8HHOb4/mbEKPS5EvAw=="], @@ -508,21 +508,21 @@ "@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="], - "@typescript/native-preview": ["@typescript/native-preview@7.0.0-dev.20260118.1", "", { "optionalDependencies": { "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20260118.1", "@typescript/native-preview-darwin-x64": "7.0.0-dev.20260118.1", "@typescript/native-preview-linux-arm": "7.0.0-dev.20260118.1", "@typescript/native-preview-linux-arm64": "7.0.0-dev.20260118.1", "@typescript/native-preview-linux-x64": "7.0.0-dev.20260118.1", "@typescript/native-preview-win32-arm64": "7.0.0-dev.20260118.1", "@typescript/native-preview-win32-x64": "7.0.0-dev.20260118.1" }, "bin": { "tsgo": "bin/tsgo.js" } }, "sha512-A+anwzt5RsbCWglYUCAgrolHO9iWLFl2NtRIwDU2IaIxTt0GsFcvaDe+IjswJGHknE0nJ7TS6DeAwjkDD/14og=="], + "@typescript/native-preview": ["@typescript/native-preview@7.0.0-dev.20260119.1", "", { "optionalDependencies": { "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20260119.1", "@typescript/native-preview-darwin-x64": "7.0.0-dev.20260119.1", "@typescript/native-preview-linux-arm": "7.0.0-dev.20260119.1", "@typescript/native-preview-linux-arm64": "7.0.0-dev.20260119.1", "@typescript/native-preview-linux-x64": "7.0.0-dev.20260119.1", "@typescript/native-preview-win32-arm64": "7.0.0-dev.20260119.1", "@typescript/native-preview-win32-x64": "7.0.0-dev.20260119.1" }, "bin": { "tsgo": "bin/tsgo.js" } }, "sha512-Tf74TdJVJlLRMN0W9VXK8jc0Gor9+wFRm40qTLt2JeHiPpSF5TEN/pHPjlf4Id1wDSJXH9p5/U1wFS3s5TS2PQ=="], - "@typescript/native-preview-darwin-arm64": ["@typescript/native-preview-darwin-arm64@7.0.0-dev.20260118.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Rr9xUWiT3g104hFgMoVbVSmqK1rQd7VhxwHgNNiPLkznGSc3zewIZ5uBCA93VV2BwC1/ksodwmA1ZYW7Ae2IIg=="], + "@typescript/native-preview-darwin-arm64": ["@typescript/native-preview-darwin-arm64@7.0.0-dev.20260119.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-siuRD9Shh5gVrgYG5HEWxFxG/dkZa4ndupGWKMfM4DwMG7zLeFayi6sB9yiwpD0d203ts01D7uTnTCALdiWXmQ=="], - "@typescript/native-preview-darwin-x64": ["@typescript/native-preview-darwin-x64@7.0.0-dev.20260118.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-vtpp39vH6wbp/ONJigF6KM7v3TTu8BAZo7ntXPgpV0YQ5cpXlnh6gQaQyXDjzlZRl/jdr+DS/76easoXeRpsFA=="], + "@typescript/native-preview-darwin-x64": ["@typescript/native-preview-darwin-x64@7.0.0-dev.20260119.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-ivqxCrbLXUqZU1OMojVRCnVx5gC/twgi7gKzBXMBLGOgfTkhajbHk/71J3OQhJwzR3T2ISG6FTfXKHhQMtgkkg=="], - "@typescript/native-preview-linux-arm": ["@typescript/native-preview-linux-arm@7.0.0-dev.20260118.1", "", { "os": "linux", "cpu": "arm" }, "sha512-JpYWxan5wwdZsiZJLWvDr/8gbIThnR1orOZ9Wb8Oc6cHFpYolwnXxAoCPLVnEcAfjnC6cY7WZvY5Dn0gSQ2Asw=="], + "@typescript/native-preview-linux-arm": ["@typescript/native-preview-linux-arm@7.0.0-dev.20260119.1", "", { "os": "linux", "cpu": "arm" }, "sha512-Bev1d6NCgCmcGOgmdFG514tWRt2lNUSFjQ9RVnN86tSm+bl5p9Lv6TQjc38Ow9vY11J71IZs9HNN1AKWfBCj2Q=="], - "@typescript/native-preview-linux-arm64": ["@typescript/native-preview-linux-arm64@7.0.0-dev.20260118.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-w32ohkkaBbotPHQttMwzn2l3CO139aTSmIAbDJ1GdbzacDfu1eRHyDaqJ9FpXXF9rkmQxWPIxz8OjpFGoHejQw=="], + "@typescript/native-preview-linux-arm64": ["@typescript/native-preview-linux-arm64@7.0.0-dev.20260119.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-ttNri2Ui1CzlLnPJN0sQ4XBgrCMq4jjtxouitRGh7+YlToG561diLERjOwIhNfTzPDKRMS7XO090WoepbvzFpA=="], - "@typescript/native-preview-linux-x64": ["@typescript/native-preview-linux-x64@7.0.0-dev.20260118.1", "", { "os": "linux", "cpu": "x64" }, "sha512-tJuaHEFnKB+V8dkMp9quOjcYs4sbNqwocFyStUN6D6khyYyYDKoKNI68APO4WM0WJ84zMWTyvBDms5uZojftEw=="], + "@typescript/native-preview-linux-x64": ["@typescript/native-preview-linux-x64@7.0.0-dev.20260119.1", "", { "os": "linux", "cpu": "x64" }, "sha512-mwsjGZqUKju3SKPzlDuKhKgt9Ht8seA5OBhorvRZk2B5lwlH0gDsApGK4t50TcnzjpbWI85FVxI6wTq1T36dMg=="], - "@typescript/native-preview-win32-arm64": ["@typescript/native-preview-win32-arm64@7.0.0-dev.20260118.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-MhLmNq0OYDRIcWui1g1XaY6tcN4GTzD2rABxwMIpdB+sOtl6YBicoSFk0fToZ+2OOUjjeGwlFzW/LDq540n3HQ=="], + "@typescript/native-preview-win32-arm64": ["@typescript/native-preview-win32-arm64@7.0.0-dev.20260119.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-463QnUaRCUhY/Flj/XinORTbBYuxoMthgJiBU1vu7mipLo2Yaipkkgn1ArGHkV9mjWBa7QIPCWg/V2KIEoVdcA=="], - "@typescript/native-preview-win32-x64": ["@typescript/native-preview-win32-x64@7.0.0-dev.20260118.1", "", { "os": "win32", "cpu": "x64" }, "sha512-NkXwyQHr/DKbp3BP8CzS4zhOIAY4CmUTYtadr5yyNsTJvuavBH9A4BKjqE/83ZRYB7O5O+n/2z1C5yl7IJp/qQ=="], + "@typescript/native-preview-win32-x64": ["@typescript/native-preview-win32-x64@7.0.0-dev.20260119.1", "", { "os": "win32", "cpu": "x64" }, "sha512-039WAg5xJjqrRYVHMR9Y2y83dYSLofbyx/22Gc6ur3b/nR8u1wdErK9uwrguL3lxpKDo6qdhnkGlbX8FP0Bz+g=="], "@typescript/vfs": ["@typescript/vfs@1.6.2", "", { "dependencies": { "debug": "^4.1.1" }, "peerDependencies": { "typescript": "*" } }, "sha512-hoBwJwcbKHmvd2QVebiytN1aELvpk9B74B4L1mFm/XT1Q/VOYAWl2vQ9AWRFtQq8zmz6enTpfTV8WRc4ATjW/g=="], @@ -690,7 +690,7 @@ "etag": ["etag@1.8.1", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="], - "eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], + "eventemitter3": ["eventemitter3@5.0.4", "", {}, "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw=="], "eventsource": ["eventsource@3.0.7", "", { "dependencies": { "eventsource-parser": "^3.0.1" } }, "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA=="], @@ -948,7 +948,7 @@ "rimraf": ["rimraf@5.0.10", "", { "dependencies": { "glob": "^10.3.7" }, "bin": { "rimraf": "dist/esm/bin.mjs" } }, "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ=="], - "rollup": ["rollup@4.55.1", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.55.1", "@rollup/rollup-android-arm64": "4.55.1", "@rollup/rollup-darwin-arm64": "4.55.1", "@rollup/rollup-darwin-x64": "4.55.1", "@rollup/rollup-freebsd-arm64": "4.55.1", "@rollup/rollup-freebsd-x64": "4.55.1", "@rollup/rollup-linux-arm-gnueabihf": "4.55.1", "@rollup/rollup-linux-arm-musleabihf": "4.55.1", "@rollup/rollup-linux-arm64-gnu": "4.55.1", "@rollup/rollup-linux-arm64-musl": "4.55.1", "@rollup/rollup-linux-loong64-gnu": "4.55.1", "@rollup/rollup-linux-loong64-musl": "4.55.1", "@rollup/rollup-linux-ppc64-gnu": "4.55.1", "@rollup/rollup-linux-ppc64-musl": "4.55.1", "@rollup/rollup-linux-riscv64-gnu": "4.55.1", "@rollup/rollup-linux-riscv64-musl": "4.55.1", "@rollup/rollup-linux-s390x-gnu": "4.55.1", "@rollup/rollup-linux-x64-gnu": "4.55.1", "@rollup/rollup-linux-x64-musl": "4.55.1", "@rollup/rollup-openbsd-x64": "4.55.1", "@rollup/rollup-openharmony-arm64": "4.55.1", "@rollup/rollup-win32-arm64-msvc": "4.55.1", "@rollup/rollup-win32-ia32-msvc": "4.55.1", "@rollup/rollup-win32-x64-gnu": "4.55.1", "@rollup/rollup-win32-x64-msvc": "4.55.1", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-wDv/Ht1BNHB4upNbK74s9usvl7hObDnvVzknxqY/E/O3X6rW1U1rV1aENEfJ54eFZDTNo7zv1f5N4edCluH7+A=="], + "rollup": ["rollup@4.55.2", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.55.2", "@rollup/rollup-android-arm64": "4.55.2", "@rollup/rollup-darwin-arm64": "4.55.2", "@rollup/rollup-darwin-x64": "4.55.2", "@rollup/rollup-freebsd-arm64": "4.55.2", "@rollup/rollup-freebsd-x64": "4.55.2", "@rollup/rollup-linux-arm-gnueabihf": "4.55.2", "@rollup/rollup-linux-arm-musleabihf": "4.55.2", "@rollup/rollup-linux-arm64-gnu": "4.55.2", "@rollup/rollup-linux-arm64-musl": "4.55.2", "@rollup/rollup-linux-loong64-gnu": "4.55.2", "@rollup/rollup-linux-loong64-musl": "4.55.2", "@rollup/rollup-linux-ppc64-gnu": "4.55.2", "@rollup/rollup-linux-ppc64-musl": "4.55.2", "@rollup/rollup-linux-riscv64-gnu": "4.55.2", "@rollup/rollup-linux-riscv64-musl": "4.55.2", "@rollup/rollup-linux-s390x-gnu": "4.55.2", "@rollup/rollup-linux-x64-gnu": "4.55.2", "@rollup/rollup-linux-x64-musl": "4.55.2", "@rollup/rollup-openbsd-x64": "4.55.2", "@rollup/rollup-openharmony-arm64": "4.55.2", "@rollup/rollup-win32-arm64-msvc": "4.55.2", "@rollup/rollup-win32-ia32-msvc": "4.55.2", "@rollup/rollup-win32-x64-gnu": "4.55.2", "@rollup/rollup-win32-x64-msvc": "4.55.2", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-PggGy4dhwx5qaW+CKBilA/98Ql9keyfnb7lh4SR6shQ91QQQi1ORJ1v4UinkdP2i87OBs9AQFooQylcrrRfIcg=="], "router": ["router@2.2.0", "", { "dependencies": { "debug": "^4.4.0", "depd": "^2.0.0", "is-promise": "^4.0.0", "parseurl": "^1.3.3", "path-to-regexp": "^8.0.0" } }, "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ=="], diff --git a/packages/agent/package.json b/packages/agent/package.json index fbb592669..ca660cd5d 100644 --- a/packages/agent/package.json +++ b/packages/agent/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-agent-core", - "version": "6.2.0", + "version": "6.7.0", "description": "General-purpose agent with transport abstraction, state management, and attachment support", "type": "module", "main": "./src/index.ts", diff --git a/packages/ai/package.json b/packages/ai/package.json index 1e6ce00b0..8a426246c 100644 --- a/packages/ai/package.json +++ b/packages/ai/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-ai", - "version": "6.2.0", + "version": "6.7.0", "description": "Unified LLM API with automatic model discovery and provider configuration", "type": "module", "main": "./src/index.ts", diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index a6f8ee78a..75f54d52e 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -1,117 +1,50 @@ # Changelog ## [Unreleased] + +## [6.7.0] - 2026-01-19 + ### Added -- Added normative patch generation to canonicalize edit tool output -- Added tool call argument rewriting for session history persistence -- Added comprehensive test coverage for tool call argument rewriting -- Added fallback variant generation for patch matching with trimmed context, collapsed duplicates, and single-line reduction -- Added comment-prefix normalization for improved fuzzy matching across different comment styles -- Added support for ellipsis (...) and ellipsis character (…) as context placeholders in patch hunks -- Added line number prefix stripping from diff content when sequential numbering is detected -- Added support for 'top of file' and 'start of file' anchors in patch headers -- Added function signature fallback matching for context anchors with empty parentheses -- Added relaxed fuzzy threshold fallback when initial matching fails -- Added context-relative matching for duplicate lines with preference for second forward match +- Normative patch generation to canonicalize edit tool output with tool call argument rewriting for session history +- Patch matching fallback variants: trimmed context, collapsed duplicates, single-line reduction, comment-prefix normalization +- Extended anchor syntax: ellipsis placeholders, `top of file`/`start of file`, `@@ line N`, nested `@@` anchors, space-separated hierarchical contexts +- Relaxed fuzzy threshold fallback and unique substring acceptance for context matching - Added `--no-title` flag to disable automatic session title generation -- Added environment variable support for edit tool configuration (OMP_EDIT_VARIANT, OMP_EDIT_FUZZY, OMP_EDIT_FUZZY_THRESHOLD) -- Added `allowFuzzy` option to control fuzzy matching behavior in patch operations -- Added validation for line numbers to ensure they are >= 1 in patch headers and hints -- Added unique substring acceptance for context matching - single matches are now accepted regardless of line length ratio -- Added support for `@@ line N` syntax to use line numbers as positioning hints -- Added support for nested `@@` anchors on multiple lines for hierarchical context matching -- Added support for space-separated hierarchical anchors like `@@ class PatchTool constructor` -- Enhanced context matching to handle hierarchical searches with nested anchors -- Added comprehensive regression tests for model-generated patch formats -- Added configurable fuzzy matching threshold for edit operations -- Added edit fuzzy threshold setting with options from 0.85 (lenient) to 0.98 (strict) -- Added binary file reading support for improved BOM detection in patch operations -- Added comprehensive apply-patch mode for edit tool with support for create, update, delete, and rename operations +- Environment variables for edit tool configuration (OMP_EDIT_VARIANT, OMP_EDIT_FUZZY, OMP_EDIT_FUZZY_THRESHOLD) +- Configurable fuzzy matching threshold setting (0.85 lenient to 0.98 strict) +- Apply-patch mode for edit tool (`edit.patchMode` setting) with create, update, delete, and rename operations - Added MCP tool caching for faster startup with cached tool definitions -- Added deferred MCP tool loading to improve startup performance -- Added apply-patch mode for edit tool (`edit.patchMode` setting) with support for adding, deleting, updating, and renaming files in a single patch operation ### Changed -- Enhanced patch applicator to support normalized patch input processing -- Updated edit tool to include normative patch data in tool results -- Improved session manager with tool call argument rewriting capabilities -- Improved indentation adjustment to preserve original file context while fixing new lines -- Enhanced patch parser to handle implicit context lines without space prefixes -- Updated patch operation schema to use 'op' instead of 'operation' and 'rename' instead of 'moveTo' -- Improved ambiguous context resolution by falling back to unique old lines when multiple matches occur -- Enhanced fuzzy matching to try comment-prefix normalized matches before unicode normalization -- Updated patch prompts with clearer anchor selection rules and context requirements +- Patch applicator now supports normalized input, implicit context lines, and improved indentation adjustment +- Patch operation schema uses 'op' instead of 'operation' and 'rename' instead of 'moveTo' +- Fuzzy matching tries comment-prefix normalized matches before unicode normalization +- Updated patch prompts with clearer anchor selection rules and verbatim context requirements - Changed default behavior of read tool to omit line numbers by default -- Updated patch tool prompts to clarify verbatim context requirements and hunk formatting rules -- Enhanced fuzzy matching algorithms to respect the `allowFuzzy` setting for more precise control -- Improved hierarchical context matching to better handle ambiguous matches with line hints -- Updated diff rendering to correctly count lines without trailing empty lines -- Enhanced patch parser to better handle nested @@ anchors and multi-file patch markers -- Improved error messages for out-of-range line hints and invalid line numbers -- Improved diff rendering to handle optional line numbers in diff lines -- Enhanced patch parser to accumulate multiple `@@` context lines for nested matching -- Updated context search to treat hierarchical matching as single unique match -- Improved error messages to display hierarchical context with `>` separator for clarity -- Refactored output sanitization logic into centralized streaming-output module -- Converted voice recording from factory function to class-based implementation -- Converted RPC extension UI context from factory function to class-based implementation -- Converted task worker run state from object to class-based implementation -- Updated SSH executor to use shared output streaming infrastructure -- Improved text sanitization across Python executor and tool execution components - Changed default edit tool mode to use apply-patch format instead of oldText/newText -- Converted tool implementations from factory functions to class-based architecture for better modularity -- Updated tool exports to expose classes instead of factory functions -- Refactored tool instantiation patterns across all built-in tools -- Updated test files to use new class-based tool constructors -- Modified SDK exports to provide tool classes for custom usage -- Enhanced patch application with better ambiguity detection and clearer error messages -- Improved diff truncation algorithm to preserve context around changes more intelligently -- Updated patch mode prompts to prefer larger semantic blocks over single-line edits -- Enhanced fuzzy matching to track and report multiple high-confidence matches -- Improved line ending and BOM preservation when applying patches -- Converted edit tool from factory function to class-based implementation -- Improved patch application with better ambiguity detection and error handling -- Enhanced fuzzy matching algorithms to track multiple matches for disambiguation -- Improved line ending preservation and BOM handling in patch operations -- Added support for out-of-order hunk processing with fallback search strategies -- Enhanced context line matching with ambiguity rejection for non-unique matches -- Improved diff parsing to preserve context lines that resemble metadata -- Added validation for multi-file patch markers in single-file operations -- Enhanced trailing newline policy to preserve original file behavior -- Added validation for out-of-range line hints in insertion operations -- Refactored edit tool implementation with modular patch architecture -- Moved edit tool implementation from `edit/` to `patch/` module -- Updated import paths for EditToolDetails across core modules -- Enhanced patch parsing with support for unified diff format and Codex-style patches -- Improved fuzzy matching algorithms for more robust text location -- Added comprehensive regression tests for patch application behaviors -- Improved edit tool architecture with modular diff and apply-patch implementations -- Enhanced MCP connection handling with waitForConnection for better reliability -- Improved MCP startup by falling back to cached tool definitions after a short wait while connections complete in the background +- Converted tool implementations from factory functions to class-based architecture +- Refactored edit tool with modular patch architecture (moved from `edit/` to `patch/` module) +- Enhanced patch parsing: unified diff format, Codex-style patches, nested anchors, multi-file markers +- Improved fuzzy matching with multiple match tracking, ambiguity detection, and out-of-order hunk processing +- Better diff rendering: smarter truncation, optional line numbers, trailing newline preservation +- Improved error messages with hierarchical context display using `>` separator +- Centralized output sanitization in streaming-output module +- Enhanced MCP startup with deferred tool loading and cached fallback ### Fixed -- Fixed patch application to handle repeated context blocks by collapsing duplicates during matching -- Fixed context line preservation to maintain original file indentation when fuzzy matched -- Fixed ambiguous context matching to resolve duplicates using adjacent @@ anchor positioning -- Fixed patch parser to correctly handle bare *** terminators and model hallucination markers -- Fixed line hint parsing to support ranges (lines 3-5) and various format variations -- Fixed function context matching to handle signatures with and without empty parentheses +- Patch application handles repeated context blocks, preserves original indentation on fuzzy match +- Ambiguous context matching resolves duplicates using adjacent @@ anchor positioning +- Patch parser handles bare *** terminators, model hallucination markers, line hint ranges +- Function context matching handles signatures with and without empty parentheses - Fixed session title generation to respect OMP_NO_TITLE environment variable - Fixed Python module discovery to use import.meta.dir for ES module compatibility - Fixed LSP writethrough batching to flush when delete operations complete a batch -- Fixed patch application to prefer actual diff over cached preview when displaying results -- Fixed line number validation to properly reject zero and negative values in patch headers -- Fixed hierarchical context matching to correctly handle space-separated contexts with signature characters +- Fixed line number validation, BOM detection, and trailing newline preservation in patches +- Fixed hierarchical context matching and space-separated anchor parsing - Fixed fuzzy matching to avoid infinite loops when `allowFuzzy` is disabled -- Fixed patch parser to correctly interpret `@@ line 125` as line hint instead of literal context -- Fixed hierarchical context matching to properly disambiguate between similar code structures -- Fixed space-separated anchor parsing to handle multi-word contexts correctly -- Fixed BOM detection to check binary content when text-based detection fails -- Fixed patch preview to use configured fuzzy threshold for consistent behavior -- Fixed trailing newline preservation to maintain original file behavior - Fixed tool completion logic to only mark tools as complete when streaming is not aborted or in error state - Fixed MCP tool path formatting to correctly display provider information diff --git a/packages/coding-agent/package.json b/packages/coding-agent/package.json index 2803ad63a..c2bd655bc 100644 --- a/packages/coding-agent/package.json +++ b/packages/coding-agent/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-coding-agent", - "version": "6.2.0", + "version": "6.7.0", "description": "Coding agent CLI with read, bash, edit, write tools and session management", "type": "module", "ompConfig": { diff --git a/packages/coding-agent/test/tools.test.ts b/packages/coding-agent/test/tools.test.ts index e4f22ef08..e585198a5 100644 --- a/packages/coding-agent/test/tools.test.ts +++ b/packages/coding-agent/test/tools.test.ts @@ -41,8 +41,13 @@ describe("Coding Agent Tools", () => { let grepTool: GrepTool; let findTool: FindTool; let lsTool: LsTool; + let originalEditVariant: string | undefined; beforeEach(() => { + // Force replace mode for edit tool tests using oldText/newText + originalEditVariant = process.env.OMP_EDIT_VARIANT; + process.env.OMP_EDIT_VARIANT = "replace"; + // Create a unique temporary directory for each test testDir = join(tmpdir(), `coding-agent-test-${nanoid()}`); mkdirSync(testDir, { recursive: true }); @@ -61,6 +66,13 @@ describe("Coding Agent Tools", () => { afterEach(() => { // Clean up test directory rmSync(testDir, { recursive: true, force: true }); + + // Restore original edit variant + if (originalEditVariant === undefined) { + delete process.env.OMP_EDIT_VARIANT; + } else { + process.env.OMP_EDIT_VARIANT = originalEditVariant; + } }); describe("read tool", () => { @@ -301,7 +313,7 @@ describe("Coding Agent Tools", () => { expect(content).toBe("qux bar qux baz qux"); }); - it("should replace all with fuzzy matching for multiline whitespace differences", async () => { + it("should reject all: true when multiple fuzzy matches are ambiguous", async () => { const testFile = join(testDir, "edit-all-fuzzy.txt"); // File has two similar blocks with different indentation writeFileSync( @@ -319,17 +331,15 @@ function b() { `, ); - const result = await editTool.execute("test-all-fuzzy", { - path: testFile, - oldText: "if (x) {\n doThing();\n}", - newText: "if (y) {\n doOther();\n}", - all: true, - }); - - expect(getTextOutput(result)).toContain("Successfully replaced 2 occurrences"); - const content = readFileSync(testFile, "utf-8"); - expect(content).toContain("doOther"); - expect(content).not.toContain("doThing"); + // With multiple fuzzy matches, the tool rejects for safety to avoid ambiguous replacements + await expect( + editTool.execute("test-all-fuzzy", { + path: testFile, + oldText: "if (x) {\n doThing();\n}", + newText: "if (y) {\n doOther();\n}", + all: true, + }), + ).rejects.toThrow(/Found 2 high-confidence matches/); }); it("should fail with all: true if no matches found", async () => { @@ -516,8 +526,13 @@ function b() { describe("edit tool CRLF handling", () => { let testDir: string; let editTool: EditTool; + let originalEditVariant: string | undefined; beforeEach(() => { + // Force replace mode for edit tool tests using oldText/newText + originalEditVariant = process.env.OMP_EDIT_VARIANT; + process.env.OMP_EDIT_VARIANT = "replace"; + testDir = join(tmpdir(), `coding-agent-crlf-test-${nanoid()}`); mkdirSync(testDir, { recursive: true }); editTool = new EditTool(createTestToolSession(testDir)); @@ -525,6 +540,13 @@ describe("edit tool CRLF handling", () => { afterEach(() => { rmSync(testDir, { recursive: true, force: true }); + + // Restore original edit variant + if (originalEditVariant === undefined) { + delete process.env.OMP_EDIT_VARIANT; + } else { + process.env.OMP_EDIT_VARIANT = originalEditVariant; + } }); it("should match LF oldText against CRLF file content", async () => { diff --git a/packages/git-tool/package.json b/packages/git-tool/package.json index d93ccc3f6..e9e987bdb 100644 --- a/packages/git-tool/package.json +++ b/packages/git-tool/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-git-tool", - "version": "6.2.0", + "version": "6.7.0", "description": "Structured Git tool with safety guards and typed output", "type": "module", "main": "./src/index.ts", diff --git a/packages/react-edit-benchmark/test/verify.test.ts b/packages/react-edit-benchmark/test/verify.test.ts index ae6a86561..9eba9aa42 100644 --- a/packages/react-edit-benchmark/test/verify.test.ts +++ b/packages/react-edit-benchmark/test/verify.test.ts @@ -56,26 +56,25 @@ describe("verifyExpectedFiles", () => { } }); - it("includes diff output and stats for mismatched content", async () => { + it("fails with diff output when formatted content differs", async () => { const { expectedDir, actualDir, cleanup } = await createTempDirs(); try { - await Bun.write(join(expectedDir, "index.ts"), " const value = 1;\n"); - await Bun.write(join(actualDir, "index.ts"), "const value = 1;\n"); + await Bun.write(join(expectedDir, "index.ts"), "const value = 1;\n"); + await Bun.write(join(actualDir, "index.ts"), "const value = 2;\n"); const result = await verifyExpectedFiles(expectedDir, actualDir); expect(result.success).toBe(false); - expect(result.diff).toContain("- const value = 1;"); - expect(result.diff).toContain("+const value = 1;"); - expect(result.diffStats?.linesChanged).toBe(2); + expect(result.diff).toContain("-const value = 1;"); + expect(result.diff).toContain("+const value = 2;"); + expect(result.diffStats?.linesChanged).toBeGreaterThan(0); expect(result.diffStats?.charsChanged).toBeGreaterThan(0); - expect(result.indentScore).toBe(2); } finally { await cleanup(); } }); - it("does not mutate files and reports formatted equivalence", async () => { + it("succeeds when formatted content matches despite whitespace differences", async () => { const { expectedDir, actualDir, cleanup } = await createTempDirs(); try { const expected = "function test() {\n return 1;\n}\n"; @@ -86,7 +85,7 @@ describe("verifyExpectedFiles", () => { const result = await verifyExpectedFiles(expectedDir, actualDir); const actualAfter = await Bun.file(join(actualDir, "index.ts")).text(); - expect(result.success).toBe(false); + expect(result.success).toBe(true); expect(result.formattedEquivalent).toBe(true); expect(actualAfter).toBe(actual); } finally { diff --git a/packages/tui/package.json b/packages/tui/package.json index 0c571ebc4..eec53bb5d 100644 --- a/packages/tui/package.json +++ b/packages/tui/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-tui", - "version": "6.2.0", + "version": "6.7.0", "description": "Terminal User Interface library with differential rendering for efficient text-based applications", "type": "module", "main": "src/index.ts",