{"_id":"@anionex/dsh-apply-patch","_rev":"9-faafb7f51ea2784de2a81d93f144e627","name":"@anionex/dsh-apply-patch","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@anionex/dsh-apply-patch","version":"0.1.0","keywords":["deepseek-harness","dsh","dsh-plugin","apply-patch","freeform-tool","codex"],"license":"MIT","_id":"@anionex/dsh-apply-patch@0.1.0","maintainers":[{"name":"anionex","email":"davidyang042@gmail.com"}],"homepage":"https://github.com/Anionex/dsh-apply-patch#readme","bugs":{"url":"https://github.com/Anionex/dsh-apply-patch/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"compatibility":{"dsh":">=0.1.1-rc.1 <0.2.0","profiles":["desktop","web","headless"]}},"dist":{"shasum":"6c623c890a2b743cc9d9d61fa97bcae3b1db2947","tarball":"https://registry.npmjs.org/@anionex/dsh-apply-patch/-/dsh-apply-patch-0.1.0.tgz","fileCount":37,"integrity":"sha512-r3k043Y0jnv+N8iDl0lqw7+UvgDO9ue+9Ngy74lJB9HEvw0zNyiXT9lImipL0k6nm1nbOBJYPu1QzZ3ZMfZZ6Q==","signatures":[{"sig":"MEUCIQC9LLTAlnJJWzqBjO35gsuVbg45y/2WYlS2tS3VLviCtwIgPCszkuadYfaBx2Z2kAjx2rC66pRHo94ckU/vkQD2Qhs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":143545},"main":"lib/index.js","type":"module","types":"lib/types/index.d.ts","engines":{"node":"^22.19.0 || >=24.0.0"},"exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./engine":{"types":"./lib/types/engine.d.ts","default":"./lib/engine.js"},"./parser":{"types":"./lib/types/parser.d.ts","default":"./lib/parser.js"},"./package.json":"./package.json","./cordis.patch.yml":"./cordis.patch.yml"},"gitHead":"5ee0ffe03dd80ffbbcaed3c42fbe45296905d0ed","scripts":{"test":"pnpm run build && node --test tests/*.test.mjs","build":"tsc -p tsconfig.build.json","check":"tsc -p tsconfig.json && pnpm run build && node --test tests/*.test.mjs && pnpm pack --dry-run","prepack":"pnpm run build"},"_npmUser":{"name":"anionex","email":"davidyang042@gmail.com"},"deprecated":"This package has moved to @anionex/dsh-smarter-edit. Install @anionex/dsh-smarter-edit instead.","repository":{"url":"git+https://github.com/Anionex/dsh-apply-patch.git","type":"git"},"_npmVersion":"11.19.0","description":"A better approach to editing files in DSH.","directories":{},"_nodeVersion":"26.8.1","dependencies":{"diff":"^8.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.7.0","devDependencies":{"typescript":"^5.9.2","@types/node":"^24.0.0","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-fs":"0.1.2-alpha.5","@deepseek-ai/dsh-llm":"0.1.2-alpha.5","@earendil-works/pi-ai":"0.84.4","@deepseek-ai/dsh-agent":"0.1.2-alpha.5","@deepseek-ai/dsh-scope":"0.1.2-alpha.5","@deepseek-ai/dsh-tools":"0.1.2-alpha.5","@deepseek-ai/dsh-sandbox":"0.1.2-alpha.5","@deepseek-ai/dsh-session":"0.1.2-alpha.5","@deepseek-ai/dsh-timeout":"0.1.2-alpha.5","@deepseek-ai/schemastery":"3.18.2","@deepseek-ai/dsh-settings":"0.1.2-alpha.5","@deepseek-ai/dsh-llm-pi-ai":"0.1.2-alpha.5","@deepseek-ai/dsh-attachment":"0.1.2-alpha.5","@deepseek-ai/dsh-invariants":"0.1.2-alpha.5","@deepseek-ai/dsh-credentials":"0.1.2-alpha.5","@deepseek-ai/dsh-code-runtime":"0.1.2-alpha.5","@deepseek-ai/dsh-authorization":"0.1.2-alpha.5","@deepseek-ai/dsh-system-prompt":"0.1.2-alpha.5","@deepseek-ai/dsh-user-approval":"0.1.2-alpha.5","@deepseek-ai/dsh-sandbox-policy":"0.1.2-alpha.5","@deepseek-ai/dsh-launch-environment":"0.1.2-alpha.5","@deepseek-ai/dsh-session-projection":"0.1.2-alpha.5"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-fs":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-llm":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-tools":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-sandbox":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/schemastery":"^3.18.1","@deepseek-ai/dsh-llm-pi-ai":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-system-prompt":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-sandbox-policy":">=0.1.1-rc.1 <0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dsh-apply-patch_0.1.0_1788532614807_0.01793771536385247","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@anionex/dsh-apply-patch","version":"0.1.1","keywords":["deepseek-harness","dsh","dsh-plugin","apply-patch","freeform-tool","codex"],"license":"MIT","_id":"@anionex/dsh-apply-patch@0.1.1","maintainers":[{"name":"anionex","email":"davidyang042@gmail.com"}],"homepage":"https://github.com/Anionex/dsh-apply-patch#readme","bugs":{"url":"https://github.com/Anionex/dsh-apply-patch/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"compatibility":{"dsh":">=0.1.1-rc.1 <0.2.0","profiles":["desktop","web","headless"]}},"dist":{"shasum":"f9c3be309c05d5ed05fdaed6df0c52551b5e7b34","tarball":"https://registry.npmjs.org/@anionex/dsh-apply-patch/-/dsh-apply-patch-0.1.1.tgz","fileCount":39,"integrity":"sha512-U17n0RRow6rJbBPRiZBzBzJH2AwrnbbyqLxU9UP9qDlKgAFf4w2fl4FeQimbUKiKfpbGUqZ4Lud0l8cgJPLxyg==","signatures":[{"sig":"MEYCIQDaLHb6efKJUHFZ6EvILpIWTwb8u+1mccZIBQpChCDV5gIhAMOnTFWmEe9yETXT4u7s1nTeamdahQY8EkpV0ZTAkwes","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":154907},"main":"lib/index.js","type":"module","types":"lib/types/index.d.ts","engines":{"node":"^22.19.0 || >=24.0.0"},"exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./engine":{"types":"./lib/types/engine.d.ts","default":"./lib/engine.js"},"./parser":{"types":"./lib/types/parser.d.ts","default":"./lib/parser.js"},"./package.json":"./package.json","./cordis.patch.yml":"./cordis.patch.yml"},"gitHead":"3a0fec8578e2503bd9d1228d35ebd7e6b4a74d71","scripts":{"test":"pnpm run build && node --test tests/*.test.mjs","build":"tsc -p tsconfig.build.json","check":"tsc -p tsconfig.json && pnpm run build && node --test tests/*.test.mjs && pnpm pack --dry-run","prepack":"pnpm run build"},"_npmUser":{"name":"anionex","email":"davidyang042@gmail.com"},"repository":{"url":"git+https://github.com/Anionex/dsh-apply-patch.git","type":"git"},"_npmVersion":"11.19.0","description":"A better approach to editing files in DSH.","directories":{},"_nodeVersion":"26.8.1","dependencies":{"diff":"^8.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.7.0","devDependencies":{"typescript":"^5.9.2","@types/node":"^24.0.0","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-fs":"0.1.2-alpha.5","@deepseek-ai/dsh-llm":"0.1.2-alpha.5","@earendil-works/pi-ai":"0.84.4","@deepseek-ai/dsh-agent":"0.1.2-alpha.5","@deepseek-ai/dsh-scope":"0.1.2-alpha.5","@deepseek-ai/dsh-tools":"0.1.2-alpha.5","@deepseek-ai/dsh-sandbox":"0.1.2-alpha.5","@deepseek-ai/dsh-session":"0.1.2-alpha.5","@deepseek-ai/dsh-timeout":"0.1.2-alpha.5","@deepseek-ai/schemastery":"3.18.2","@deepseek-ai/dsh-settings":"0.1.2-alpha.5","@deepseek-ai/dsh-llm-pi-ai":"0.1.2-alpha.5","@deepseek-ai/dsh-attachment":"0.1.2-alpha.5","@deepseek-ai/dsh-invariants":"0.1.2-alpha.5","@deepseek-ai/dsh-credentials":"0.1.2-alpha.5","@deepseek-ai/dsh-code-runtime":"0.1.2-alpha.5","@deepseek-ai/dsh-authorization":"0.1.2-alpha.5","@deepseek-ai/dsh-system-prompt":"0.1.2-alpha.5","@deepseek-ai/dsh-user-approval":"0.1.2-alpha.5","@deepseek-ai/dsh-sandbox-policy":"0.1.2-alpha.5","@deepseek-ai/dsh-launch-environment":"0.1.2-alpha.5","@deepseek-ai/dsh-session-projection":"0.1.2-alpha.5"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-fs":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-llm":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-tools":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-sandbox":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/schemastery":"^3.18.1","@deepseek-ai/dsh-llm-pi-ai":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-system-prompt":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-sandbox-policy":">=0.1.1-rc.1 <0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dsh-apply-patch_0.1.1_1788532926186_0.674979653567958","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has moved to @anionex/dsh-smarter-edit. Install @anionex/dsh-smarter-edit instead."},"0.1.2":{"name":"@anionex/dsh-apply-patch","version":"0.1.2","keywords":["deepseek-harness","dsh","dsh-plugin","apply-patch","freeform-tool","codex"],"license":"MIT","_id":"@anionex/dsh-apply-patch@0.1.2","maintainers":[{"name":"anionex","email":"davidyang042@gmail.com"}],"homepage":"https://github.com/Anionex/dsh-apply-patch#readme","bugs":{"url":"https://github.com/Anionex/dsh-apply-patch/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-ui-tool","@deepseek-ai/dsh-client-ui-primitives"],"platform":"web"},"compatibility":{"dsh":">=0.1.1-rc.1 <0.2.0","profiles":["desktop","web","headless"]}},"dist":{"shasum":"2bdc0d611c7972c1cd55648f6175dc664d624180","tarball":"https://registry.npmjs.org/@anionex/dsh-apply-patch/-/dsh-apply-patch-0.1.2.tgz","fileCount":43,"integrity":"sha512-b5A8qm8fNbDXAhRVx+TAQQjfdUzo969h42OmyqmQQWoQGJaFA5pDzQ0PqroVUV/J+ClUUDhM0iGPLRbhzK3w6Q==","signatures":[{"sig":"MEYCIQDoVrN/+PTnqepOu6n+gSyPbfGvEDJPR+s2AVnwEz1l0AIhAIVGxtI+AN5YecE6JnyB/XJgZR7M1d9Ujdtkpf1yBl23","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":181348},"main":"lib/index.js","type":"module","_from":"file:anionex-dsh-apply-patch-0.1.2.tgz","types":"lib/types/index.d.ts","engines":{"node":"^22.19.0 || >=24.0.0"},"exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./engine":{"types":"./lib/types/engine.d.ts","default":"./lib/engine.js"},"./parser":{"types":"./lib/types/parser.d.ts","default":"./lib/parser.js"},"./package.json":"./package.json","./cordis.patch.yml":"./cordis.patch.yml"},"scripts":{"test":"pnpm run build && node --test tests/*.test.mjs","build":"tsc -p tsconfig.build.json && tsc -p tsconfig.client.json && node scripts/build-client.mjs","check":"tsc -p tsconfig.json && pnpm run build && node --test tests/*.test.mjs && pnpm pack --dry-run"},"_npmUser":{"name":"anionex","email":"davidyang042@gmail.com"},"_resolved":"/Users/davidyang/dsh-plugins/dsh-apply-patch/anionex-dsh-apply-patch-0.1.2.tgz","_integrity":"sha512-b5A8qm8fNbDXAhRVx+TAQQjfdUzo969h42OmyqmQQWoQGJaFA5pDzQ0PqroVUV/J+ClUUDhM0iGPLRbhzK3w6Q==","deprecated":"This package has moved to @anionex/dsh-smarter-edit. Install @anionex/dsh-smarter-edit instead.","repository":{"url":"git+https://github.com/Anionex/dsh-apply-patch.git","type":"git"},"_npmVersion":"11.19.0","description":"A better approach to editing files in DSH.","directories":{},"_nodeVersion":"26.8.1","dependencies":{"diff":"^8.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"18.2.0","typescript":"^6.0.3","@types/node":"^24.0.0","@types/react":"18.3.1","@types/react-dom":"18.3.0","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-fs":"0.1.2-alpha.5","@deepseek-ai/dsh-llm":"0.1.2-alpha.5","@earendil-works/pi-ai":"0.84.4","@deepseek-ai/dsh-agent":"0.1.2-alpha.5","@deepseek-ai/dsh-scope":"0.1.2-alpha.5","@deepseek-ai/dsh-tools":"0.1.2-alpha.5","@deepseek-ai/dsh-sandbox":"0.1.2-alpha.5","@deepseek-ai/dsh-session":"0.1.2-alpha.5","@deepseek-ai/dsh-timeout":"0.1.2-alpha.5","@deepseek-ai/schemastery":"3.18.2","@deepseek-ai/dsh-settings":"0.1.2-alpha.5","@deepseek-ai/dsh-llm-pi-ai":"0.1.2-alpha.5","@deepseek-ai/dsh-attachment":"0.1.2-alpha.5","@deepseek-ai/dsh-invariants":"0.1.2-alpha.5","@deepseek-ai/dsh-credentials":"0.1.2-alpha.5","@deepseek-ai/dsh-code-runtime":"0.1.2-alpha.5","@deepseek-ai/dsh-authorization":"0.1.2-alpha.5","@deepseek-ai/dsh-client-locale":"0.1.2-alpha.5","@deepseek-ai/dsh-system-prompt":"0.1.2-alpha.5","@deepseek-ai/dsh-user-approval":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-chat":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-tool":"0.1.2-alpha.5","@deepseek-ai/dsh-sandbox-policy":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-slots":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-renderer":"0.1.2-alpha.5","@deepseek-ai/dsh-launch-environment":"0.1.2-alpha.5","@deepseek-ai/dsh-session-projection":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-primitives":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-conversation":"0.1.2-alpha.5"},"peerDependencies":{"react":"^18.2.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-fs":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-llm":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-tools":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-sandbox":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/schemastery":"^3.18.1","@deepseek-ai/dsh-llm-pi-ai":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-system-prompt":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-client-ui-tool":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-sandbox-policy":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-client-ui-slots":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-client-ui-primitives":">=0.1.1-rc.1 <0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dsh-apply-patch_0.1.2_1788536723854_0.28762361424003635","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@anionex/dsh-apply-patch","version":"0.1.3","keywords":["deepseek-harness","dsh","dsh-plugin","apply-patch","freeform-tool","codex"],"license":"MIT","_id":"@anionex/dsh-apply-patch@0.1.3","maintainers":[{"name":"anionex","email":"davidyang042@gmail.com"}],"homepage":"https://github.com/Anionex/dsh-apply-patch#readme","bugs":{"url":"https://github.com/Anionex/dsh-apply-patch/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-ui-tool","@deepseek-ai/dsh-client-ui-primitives"],"platform":"web"},"compatibility":{"dsh":">=0.1.1-rc.1 <0.2.0","profiles":["desktop","web","headless"]}},"dist":{"shasum":"2931b7e275159aed6cf9f3b2bd39feee013f1ff3","tarball":"https://registry.npmjs.org/@anionex/dsh-apply-patch/-/dsh-apply-patch-0.1.3.tgz","fileCount":43,"integrity":"sha512-KyLJfBb06vhF5eiS998MBM3fmiiViCNifpl3lJgW0hDs3sZknqLeL0nh7EWxfktouldCMCirG+PtlD7qfwtN2w==","signatures":[{"sig":"MEQCIFShSHkDybEVokxqhks1vseuBu9KChjyGGJighbSR+edAiBAEhWrcYL07LqG4+JGNib1sL9grdQ7UOZNyh/7dmHudw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":180982},"main":"lib/index.js","type":"module","_from":"file:anionex-dsh-apply-patch-0.1.3.tgz","types":"lib/types/index.d.ts","engines":{"node":"^22.19.0 || >=24.0.0"},"exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./engine":{"types":"./lib/types/engine.d.ts","default":"./lib/engine.js"},"./parser":{"types":"./lib/types/parser.d.ts","default":"./lib/parser.js"},"./package.json":"./package.json","./cordis.patch.yml":"./cordis.patch.yml"},"scripts":{"test":"pnpm run build && node --test tests/*.test.mjs","build":"tsc -p tsconfig.build.json && tsc -p tsconfig.client.json && node scripts/build-client.mjs","check":"tsc -p tsconfig.json && pnpm run build && node --test tests/*.test.mjs && pnpm pack --dry-run"},"_npmUser":{"name":"anionex","email":"davidyang042@gmail.com"},"_resolved":"/Users/davidyang/dsh-plugins/dsh-apply-patch/anionex-dsh-apply-patch-0.1.3.tgz","_integrity":"sha512-KyLJfBb06vhF5eiS998MBM3fmiiViCNifpl3lJgW0hDs3sZknqLeL0nh7EWxfktouldCMCirG+PtlD7qfwtN2w==","deprecated":"This package has moved to @anionex/dsh-smarter-edit. Install @anionex/dsh-smarter-edit instead.","repository":{"url":"git+https://github.com/Anionex/dsh-apply-patch.git","type":"git"},"_npmVersion":"11.19.0","description":"A better approach to editing files in DSH.","directories":{},"_nodeVersion":"26.8.1","dependencies":{"diff":"^8.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"18.2.0","typescript":"^6.0.3","@types/node":"^24.0.0","@types/react":"18.3.1","@types/react-dom":"18.3.0","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-fs":"0.1.2-alpha.5","@deepseek-ai/dsh-llm":"0.1.2-alpha.5","@earendil-works/pi-ai":"0.84.4","@deepseek-ai/dsh-agent":"0.1.2-alpha.5","@deepseek-ai/dsh-scope":"0.1.2-alpha.5","@deepseek-ai/dsh-tools":"0.1.2-alpha.5","@deepseek-ai/dsh-sandbox":"0.1.2-alpha.5","@deepseek-ai/dsh-session":"0.1.2-alpha.5","@deepseek-ai/dsh-timeout":"0.1.2-alpha.5","@deepseek-ai/schemastery":"3.18.2","@deepseek-ai/dsh-settings":"0.1.2-alpha.5","@deepseek-ai/dsh-llm-pi-ai":"0.1.2-alpha.5","@deepseek-ai/dsh-attachment":"0.1.2-alpha.5","@deepseek-ai/dsh-invariants":"0.1.2-alpha.5","@deepseek-ai/dsh-credentials":"0.1.2-alpha.5","@deepseek-ai/dsh-code-runtime":"0.1.2-alpha.5","@deepseek-ai/dsh-authorization":"0.1.2-alpha.5","@deepseek-ai/dsh-client-locale":"0.1.2-alpha.5","@deepseek-ai/dsh-system-prompt":"0.1.2-alpha.5","@deepseek-ai/dsh-user-approval":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-chat":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-tool":"0.1.2-alpha.5","@deepseek-ai/dsh-sandbox-policy":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-slots":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-renderer":"0.1.2-alpha.5","@deepseek-ai/dsh-launch-environment":"0.1.2-alpha.5","@deepseek-ai/dsh-session-projection":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-primitives":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-conversation":"0.1.2-alpha.5"},"peerDependencies":{"react":"^18.2.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-fs":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-llm":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-tools":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-sandbox":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/schemastery":"^3.18.1","@deepseek-ai/dsh-llm-pi-ai":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-system-prompt":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-client-ui-tool":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-sandbox-policy":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-client-ui-slots":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-client-ui-primitives":">=0.1.1-rc.1 <0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dsh-apply-patch_0.1.3_1788537050996_0.5321003476079651","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@anionex/dsh-apply-patch","version":"0.1.4","keywords":["deepseek-harness","dsh","dsh-plugin","apply-patch","freeform-tool","codex"],"license":"MIT","_id":"@anionex/dsh-apply-patch@0.1.4","maintainers":[{"name":"anionex","email":"davidyang042@gmail.com"}],"homepage":"https://github.com/Anionex/dsh-apply-patch#readme","bugs":{"url":"https://github.com/Anionex/dsh-apply-patch/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-ui-tool","@deepseek-ai/dsh-client-ui-primitives"],"platform":"web"},"compatibility":{"dsh":">=0.1.1-rc.1 <0.2.0","profiles":["desktop","web","headless"]}},"dist":{"shasum":"28d55ab77ec53a2dd4e581060826a3f802e3e60a","tarball":"https://registry.npmjs.org/@anionex/dsh-apply-patch/-/dsh-apply-patch-0.1.4.tgz","fileCount":50,"integrity":"sha512-TE8YHo29CxkiAX52EGboR2WFPh4PKOYySR3funHBDrCc00mp4c/IiMi+4UxAP/vM/F7a5YCLAaWLkwQnV0CnJA==","signatures":[{"sig":"MEYCIQCuff36CmftA6mghBAJgN8DW57zIzJmFu/ibr2IgJfUWwIhALKkovnD1dskwdrNY3+AF9OaYGHIVq452kjc/hUzugPb","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":349078},"main":"lib/index.js","type":"module","_from":"file:/tmp/dsh-apply-patch-release.lcz288/anionex-dsh-apply-patch-0.1.4.tgz","types":"lib/types/index.d.ts","engines":{"node":"^22.19.0 || >=24.0.0"},"exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./engine":{"types":"./lib/types/engine.d.ts","default":"./lib/engine.js"},"./parser":{"types":"./lib/types/parser.d.ts","default":"./lib/parser.js"},"./package.json":"./package.json","./cordis.patch.yml":"./cordis.patch.yml"},"scripts":{"test":"pnpm run build && node --test tests/*.test.mjs","build":"tsc -p tsconfig.build.json && tsc -p tsconfig.client.json && node scripts/build-client.mjs","check":"tsc -p tsconfig.json && pnpm run build && node --test tests/*.test.mjs && pnpm pack --dry-run"},"_npmUser":{"name":"anionex","email":"davidyang042@gmail.com"},"_resolved":"/tmp/dsh-apply-patch-release.lcz288/anionex-dsh-apply-patch-0.1.4.tgz","_integrity":"sha512-TE8YHo29CxkiAX52EGboR2WFPh4PKOYySR3funHBDrCc00mp4c/IiMi+4UxAP/vM/F7a5YCLAaWLkwQnV0CnJA==","repository":{"url":"git+https://github.com/Anionex/dsh-apply-patch.git","type":"git"},"_npmVersion":"11.19.0","description":"A better approach to editing files in DSH.","directories":{},"_nodeVersion":"26.8.1","dependencies":{"diff":"^8.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"18.2.0","typescript":"^6.0.3","@types/node":"^24.0.0","@types/react":"18.3.1","@types/react-dom":"18.3.0","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-fs":"0.1.2-alpha.5","@deepseek-ai/dsh-llm":"0.1.2-alpha.5","@earendil-works/pi-ai":"0.84.4","@deepseek-ai/dsh-agent":"0.1.2-alpha.5","@deepseek-ai/dsh-scope":"0.1.2-alpha.5","@deepseek-ai/dsh-tools":"0.1.2-alpha.5","@deepseek-ai/dsh-sandbox":"0.1.2-alpha.5","@deepseek-ai/dsh-session":"0.1.2-alpha.5","@deepseek-ai/dsh-timeout":"0.1.2-alpha.5","@deepseek-ai/schemastery":"3.18.2","@deepseek-ai/dsh-settings":"0.1.2-alpha.5","@deepseek-ai/dsh-llm-pi-ai":"0.1.2-alpha.5","@deepseek-ai/dsh-attachment":"0.1.2-alpha.5","@deepseek-ai/dsh-invariants":"0.1.2-alpha.5","@deepseek-ai/dsh-credentials":"0.1.2-alpha.5","@deepseek-ai/dsh-code-runtime":"0.1.2-alpha.5","@deepseek-ai/dsh-authorization":"0.1.2-alpha.5","@deepseek-ai/dsh-client-locale":"0.1.2-alpha.5","@deepseek-ai/dsh-system-prompt":"0.1.2-alpha.5","@deepseek-ai/dsh-user-approval":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-chat":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-tool":"0.1.2-alpha.5","@deepseek-ai/dsh-sandbox-policy":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-slots":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-renderer":"0.1.2-alpha.5","@deepseek-ai/dsh-launch-environment":"0.1.2-alpha.5","@deepseek-ai/dsh-session-projection":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-primitives":"0.1.2-alpha.5","@deepseek-ai/dsh-client-ui-conversation":"0.1.2-alpha.5"},"peerDependencies":{"react":"^18.2.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-fs":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-llm":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-tools":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-sandbox":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/schemastery":"^3.18.1","@deepseek-ai/dsh-llm-pi-ai":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-system-prompt":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-client-ui-tool":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-sandbox-policy":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-client-ui-slots":">=0.1.1-rc.1 <0.2.0","@deepseek-ai/dsh-client-ui-primitives":">=0.1.1-rc.1 <0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dsh-apply-patch_0.1.4_1788540602474_0.8022587795870391","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has moved to @anionex/dsh-smarter-edit. Install @anionex/dsh-smarter-edit instead."}},"time":{"created":"2026-09-04T14:36:54.586Z","modified":"2026-09-04T17:13:44.612Z","0.1.0":"2026-09-04T14:36:54.964Z","0.1.1":"2026-09-04T14:42:06.319Z","0.1.2":"2026-09-04T15:45:23.980Z","0.1.3":"2026-09-04T15:50:51.362Z","0.1.4":"2026-09-04T16:50:02.638Z"},"bugs":{"url":"https://github.com/Anionex/dsh-apply-patch/issues"},"license":"MIT","homepage":"https://github.com/Anionex/dsh-apply-patch#readme","keywords":["deepseek-harness","dsh","dsh-plugin","apply-patch","freeform-tool","codex"],"repository":{"url":"git+https://github.com/Anionex/dsh-apply-patch.git","type":"git"},"description":"A better approach to editing files in DSH.","maintainers":[{"name":"anionex","email":"davidyang042@gmail.com"}],"readme":"# DSH Apply Patch\n\n[English](README.md)\n\n[![npm version](https://img.shields.io/npm/v/@anionex/dsh-apply-patch?style=flat-square)](https://www.npmjs.com/package/@anionex/dsh-apply-patch)\n[![License](https://img.shields.io/github/license/Anionex/dsh-apply-patch?style=flat-square)](LICENSE)\n[![CI](https://img.shields.io/github/actions/workflow/status/Anionex/dsh-apply-patch/ci.yml?branch=main&style=flat-square&label=CI)](https://github.com/Anionex/dsh-apply-patch/actions/workflows/ci.yml)\n[![TypeScript](https://img.shields.io/npm/types/@anionex/dsh-apply-patch?style=flat-square)](https://www.npmjs.com/package/@anionex/dsh-apply-patch)\n[![GitHub release](https://img.shields.io/github/v/release/Anionex/dsh-apply-patch?style=flat-square&label=release)](https://github.com/Anionex/dsh-apply-patch/releases)\n\n**在 DeepSeek Harness 中，用一次有序、原子、可审查的 `apply_patch` 调用完成多文件修改。**\n\nDSH Apply Patch 会把模型可见的原生 `edit`、原生 `write` 与旧版 `str_replace_editor` 替换为兼容 Codex 的 `apply_patch` 工具。模型可以通过有序 hunk 新增、更新、移动和删除多个文件。插件会先预演完整 patch，在普通可处理失败时回滚，并用 DSH 原生 diff UI 展示结果。\n\n![DSH Apply Patch：一次有序、原子的 apply_patch 调用完成多文件修改](assets/hero.png)\n\n## 功能亮点\n\n- **一次修改相关文件。** 一个 patch 可以通过多个有序 hunk 新增、更新、移动和删除文件。\n- **普通失败保持原子性。** 引擎会解析、解析路径、预演、暂存、提交并复验全部操作；检测到失败后逆序回滚已经发布的目标。\n- **在 OpenAI Responses 上发送原始 patch。** 模型把 `*** Begin Patch` 内容作为 custom-tool 输入；Session 日志和 Trajectory 参数视图保留原始文本。\n- **在对话中审查修改。** 每次成功调用都会返回 unified diff 和结构化展示元数据；附带的 Web 客户端通过 DSH 官方 keyed toolview slot 注册，并使用原生 `DiffBlock`。\n- **匹配 Codex patch 行为。** Grammar 与固定的 Codex 版本逐字节一致；测试运行其 25 个可移植场景，并记录唯一的事务差异。\n- **作为标准 DSH bundle 安装。** 包支持 `desktop`、`web` 和 `headless` Profile；卸载后恢复原来的文件修改工具。\n\n## 快速开始\n\n把当前 npm 版本安装到 Desktop Profile：\n\n```sh\ndsh plugin --profile desktop add @anionex/dsh-apply-patch\n```\n\n安装到其他 Profile 时，把 `desktop` 换成 `web` 或 `headless`。安装后重启正在运行的 Profile，并新建 Session。\n\n模型随后直接发送原始 patch 文本：\n\n```diff\n*** Begin Patch\n*** Update File: src/app.ts\n@@\n-old code\n+new code\n*** Add File: src/utils.ts\n+export const ready = true\n*** Delete File: src/legacy.ts\n*** End Patch\n```\n\n确认 bundle 已挂载：\n\n```sh\ndsh --profile desktop --dump-config | grep tool-apply-patch\n```\n\n## 与原生 edit 对比\n\n| 能力 | `apply_patch` | 原生 `edit` |\n| --- | --- | --- |\n| 多文件、多 hunk 修改 | 一次调用内有序完成 | 每次调用完成一处精确替换 |\n| 匹配方式 | 有序上下文匹配，并支持空白及 Unicode 标点回退 | 精确匹配 `old_string` |\n| 审查输出 | Unified diff、操作摘要及 DSH 原生 diff 卡片 | DSH 原生 diff 卡片 |\n| 多文件普通失败 | 完整预演，失败后回滚 | 已完成的各次调用不会一起回滚 |\n| 模型 token 开销 | 相关修改往往更低，但 patch 语法有标记开销 | 单个很小的精确替换往往更低 |\n| 模型传输 | 通过 pi-ai 发送原始 OpenAI custom-tool 输入 | 普通 JSON function 参数 |\n| 主要代价 | 一个范围较大的 patch 可同时修改或删除多个文件 | 影响范围更窄；复杂修改需要更多调用 |\n\n## 使用场景\n\n- 一次完成必须共同成功或共同失败的跨文件修改。\n- 通过有序代码上下文定位修改，避开脆弱的整段精确字符串替换。\n- 在同一次编辑中新增、重命名和删除文件。\n- 保留可回放的原始 patch，同时在对话中查看原生 diff 卡片。\n\n## 工作原理\n\n1. 模型发送一个位于 `*** Begin Patch` 与 `*** End Patch` 之间的 patch。\n2. Parser 构建有序操作计划；host 通过当前 DSH sandbox 解析每个路径。\n3. 引擎预演完整计划、暂存替换内容、提交目标并复验结果；普通可处理失败会触发逆序回滚。\n4. 工具返回操作摘要、标准 unified diff 和按 hunk 组织的展示元数据。\n5. DSH 在 Session 历史中保存原始 patch；Web 客户端用展示元数据回放原生 diff 卡片。\n\n纯引擎从 `@anionex/dsh-apply-patch/engine` 导出，不依赖 Cordis。DSH 适配位于 `src/host.ts` 和 `src/index.ts`。\n\n## 保证\n\n- 修改目标前，先解析并验证完整 patch。\n- 按 Codex 的匹配顺序定位 hunk：精确匹配、忽略行尾空白、忽略两侧空白、统一 Unicode 标点与空格。\n- 使用 Codex 的 `PreserveLineEndings` 模式：上下文行保留原换行，插入行采用文件中首次出现的换行格式，更新仍遵循 Codex 历史上的末尾补换行行为。\n- 相对路径从 Session 工作目录解析，同时接受绝对路径并跟随符号链接；权限边界沿用 DSH 当前 sandbox。\n- 提交前先在同目录暂存全部新内容；发布不会覆盖最后检查后并发创建的路径；原文件被原子捕获为备份并复验；普通可检测失败会逆序恢复已经发布的目标。\n- 返回标准 unified diff 和操作摘要。\n- 通过 DSH 官方 keyed toolview slot 注册对话行，并用原生 `DiffBlock` 展示已应用的结构化 diff 元数据。\n- 插件生效时，从模型工具列表中移除原生 `edit`、原生 `write` 和旧版 `str_replace_editor`，并移除它们的提示区块；卸载插件后恢复原有表面。\n\n这里保证的是**失败原子性**，不是跨文件的崩溃安全事务。解析、预演、暂存、提交或复验发生普通可处理错误时，只要回滚成功，目标文件不会留下部分修改。进程被强制终止、内核或电源故障、回滚自身发生 I/O 错误时仍可能留下恢复文件；普通宿主文件系统没有通用的崩溃原子多文件事务。\n\n## 兼容性与状态\n\n- DSH `>=0.1.1-rc.1 <0.2.0`。\n- 包开发和直接调用引擎需要 Node.js `^22.19.0 || >=24.0.0`。\n- 支持 `desktop`、`web` 和 `headless` Profile。\n- 若要求 provider 线上的原始 custom-tool 输入，需要使用 pi-ai OpenAI Responses 路由；其他 adapter 保留自身的工具协议。\n- 需要当前 DSH sandbox 授权写入。`workspace-write` 保留已配置的边界；`danger-full-access` 可以允许工作区外的绝对路径和父级相对路径。\n- 项目仍处于 1.0 之前；兼容目标是声明的 DSH `0.1.x` 范围，发布验收会把 tarball 安装到干净 Profile。\n\n## 限制\n\n- 一个范围较大的 patch 可以修改或删除多个文件；修改范围较大时应审查请求 patch 和结果 diff。\n- 只有一个很小的精确替换时，原生 `edit` 可能使用更少 token。\n- Anthropic Messages 和 Google Generative AI 路由使用普通 JSON 工具传输，因为这些 pi-ai serializer 不提供 provider 线上的原始 custom-tool 输入。\n- 失败原子性只覆盖可检测错误和成功回滚；它不覆盖进程被终止、电源或内核故障、回滚 I/O 失败。\n- 缺少展示元数据的历史成功调用会降级为普通输出，不会从不受信任文本重新构造 diff。\n\n## Codex 对齐\n\nLark grammar 与 OpenAI Codex 提交 `8e6a44b428e31f91b21edc97904fcdf4f0931ade` 逐字节相同。解析状态机、有序 replacement 计算、四阶段序列匹配、context 行处理和 `PreserveLineEndings` 文件重建，均按该版本机制移植为 TypeScript。测试会执行官方完整的 25 个可移植场景：24 个与上游最终状态完全相同，scenario 015 用于断言下述事务差异。\n\n唯一有意不同的是失败处理：上游 scenario 015 规定后续操作失败时保留之前的写入；本插件为满足 DSH 所要求的失败原子性，在外层先预演全部操作并在失败时回滚。这个外层包装不改变 patch grammar，也不改变当前 DSH sandbox 允许范围内的成功结果。\n\n项目自身采用 MIT License。Codex 派生 grammar、fixture 与移植实现保留其 Apache-2.0 license 和 NOTICE 归因，位于 `third_party/codex/`；详见 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。\n\n## Freeform 传输\n\nDSH `0.1.x` 的公开工具定义只有 JSON Schema，并且到 provider adapter 之前会丢弃 custom-tool 元数据。本插件在受支持 alpha 与 rc 版本共有的请求冻结模型快照边界 `PiAiAdapter.current()` 安装一个范围严格、引用计数、可卸载的桥，只给结构完全匹配的 `apply_patch` 增加随包附带的 OpenAI Lark grammar。\n\n在 pi-ai OpenAI Responses 路由上，桥无需模型能力标志就会选择 grammar custom-tool 传输。provider 请求包含 OpenAI `type: \"custom\"` 工具及原始输入。没有 freeform custom-tool 原语的其他 provider 协议仍使用自身的普通 JSON 工具传输；插件不会因此禁用这些模型。\n\n插件通过 DSH 公开的 `llm/stream` middleware，在 DSH 组装、执行或持久化已完成工具调用之前移除 pi-ai 的临时单字段 envelope。后续模型步骤重放原始 Session 历史时，replay bridge 只在 adapter 内部临时恢复该 envelope。因此已完成调用的实时参数、Session 日志和 Trajectory 参数视图都是原始 patch 文本，且不会破坏下一模型步骤。\n\n## 语法\n\n支持的操作：\n\n```diff\n*** Add File: relative/path.ts\n+新增文件的每一行都以 + 开头\n*** Delete File: relative/obsolete.ts\n*** Update File: relative/current.ts\n*** Move to: relative/renamed.ts\n@@ 可选的函数或段落上下文\n 不变上下文\n-删除行\n+新增行\n*** End of File\n```\n\n`Move to` 可省略；`End of File` 会把 hunk 锚定到文件尾；只有新增行的 update hunk 会追加到文件尾。相对路径从 Session 工作目录解析；DSH 当前 sandbox 允许时，也接受绝对路径和父级相对路径。重复文件段按 patch 顺序求值，因此每个操作都能看到本次调用中之前操作的结果。Add 指向已存在文件时会替换该文件，与 Codex 行为一致。\n\n## 配置\n\nProfile patch 默认值：\n\n```yaml\n- id: tool-apply-patch\n  config:\n    replaceNativeEdit: true\n```\n\n只有在明确希望把 `edit`、`write` 和 `str_replace_editor` 与 `apply_patch` 同时暴露时才设置 `replaceNativeEdit: false`；它不影响 freeform 传输和事务语义。\n\n## 开发\n\n```sh\npnpm install --frozen-lockfile\npnpm peers check\npnpm run check\n```\n\n测试会运行 Codex 官方完整场景集、定向 parser 和 matcher 用例、sandbox 路径用例、预演隔离、故障注入后的回滚、清理、并发修改检测、工具注册、原生 edit 过滤、包结构、DSH 原始调用还原、原生 diff 卡片展示及捕获的 OpenAI 请求序列化。\n\n修改行为或打包前，请阅读 [CONTRIBUTING.md](CONTRIBUTING.md)。\n\n<details>\n<summary>A/B Benchmark 口径</summary>\n\n两个实验组应使用完全相同的任务 fixture、模型配置、sandbox 模式、提示文本、干净 workspace 快照和试验次数。原生 `edit` 与 `apply_patch` 对比以下指标：\n\n| 指标 | 定义 |\n| --- | --- |\n| Tool calls | 完成前调用修改工具的总次数 |\n| Failure rate | 被拒绝的修改调用数 / 修改调用总数 |\n| Output tokens | 完整任务的 assistant 输出 token |\n| Rounds | 最终回答前的模型请求 step 数 |\n| First-test pass | 第一次执行测试即退出 0 |\n| Final success | fixture 的所有验收检查通过 |\n| Wall time | 用户请求被接受到最终结果的时间 |\n\n如果记录到的 provider 请求把 `apply_patch` 描述为 `type: \"function\"`，该次试验不能计入 freeform 组；有效试验必须是 OpenAI `type: \"custom\"` 且 `format.syntax: \"lark\"`。\n\n</details>\n\n## 安全与社区\n\n- 通过 [SECURITY.md](SECURITY.md) 私下报告安全问题。\n- 通过 [SUPPORT.md](SUPPORT.md) 获取使用帮助。\n- 按 [CONTRIBUTING.md](CONTRIBUTING.md) 和 [issue tracker](https://github.com/Anionex/dsh-apply-patch/issues) 提交修改建议。\n- 在 [CHANGELOG.md](CHANGELOG.md) 查看版本历史。\n- 社区参与遵循 [Code of Conduct](CODE_OF_CONDUCT.md)。\n\n由 [Anionex](https://github.com/Anionex) 维护，采用 [MIT License](LICENSE)。\n","readmeFilename":"README.zh.md"}