skalpel 3.1.5 → 3.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skalpel",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.6",
|
|
4
4
|
"description": "Skalpel — local proxy and TUI for coding agents (skalpel + skalpeld bundle).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://skalpel.ai",
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"x64"
|
|
56
56
|
],
|
|
57
57
|
"optionalDependencies": {
|
|
58
|
-
"@skalpelai/skalpel-darwin-arm64": "3.1.
|
|
59
|
-
"@skalpelai/skalpel-darwin-x64": "3.1.
|
|
60
|
-
"@skalpelai/skalpel-linux-arm64": "3.1.
|
|
61
|
-
"@skalpelai/skalpel-linux-x64": "3.1.
|
|
62
|
-
"@skalpelai/skalpel-win32-x64": "3.1.
|
|
58
|
+
"@skalpelai/skalpel-darwin-arm64": "3.1.6",
|
|
59
|
+
"@skalpelai/skalpel-darwin-x64": "3.1.6",
|
|
60
|
+
"@skalpelai/skalpel-linux-arm64": "3.1.6",
|
|
61
|
+
"@skalpelai/skalpel-linux-x64": "3.1.6",
|
|
62
|
+
"@skalpelai/skalpel-win32-x64": "3.1.6"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -45,8 +45,15 @@ function run({ dryRun, port }) {
|
|
|
45
45
|
for (const rc of rcs) {
|
|
46
46
|
const exists = fs.existsSync(rc.path);
|
|
47
47
|
if (!exists) {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
// BUG-0035: on Windows most users have no PowerShell $PROFILE yet,
|
|
49
|
+
// but the `claude` wrapper still must be installed — applyBlock
|
|
50
|
+
// creates the file (and parent dir). On POSIX, skip absent rc files
|
|
51
|
+
// (the present.length===0 fallback below bootstraps ~/.profile).
|
|
52
|
+
if (process.platform !== 'win32') {
|
|
53
|
+
log.info(`env-inject: ${rc.shell} rc absent (${rc.path}) — skip`);
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
log.info(`env-inject: ${rc.shell} rc absent (${rc.path}) — creating (Windows)`);
|
|
50
57
|
}
|
|
51
58
|
present.push(rc);
|
|
52
59
|
if (dryRun) {
|
|
@@ -47,11 +47,11 @@ end`,
|
|
|
47
47
|
powershell: `
|
|
48
48
|
# Pre-launch status hint + fail-open for Claude Code.
|
|
49
49
|
# Set $env:SKALPEL_NO_AGENT_WRAP=1 to disable.
|
|
50
|
-
$_skalpelOrigClaude = Get-Command claude
|
|
50
|
+
$_skalpelOrigClaude = Get-Command claude -CommandType Application -ErrorAction SilentlyContinue | Select-Object -First 1
|
|
51
51
|
$_skalpelStatusBin = Get-Command skalpel -CommandType Application -ErrorAction SilentlyContinue | Select-Object -First 1
|
|
52
52
|
if (-not $env:SKALPEL_NO_AGENT_WRAP -and $_skalpelOrigClaude -and $_skalpelStatusBin) {
|
|
53
53
|
function global:claude {
|
|
54
|
-
& $script:_skalpelStatusBin.Source status
|
|
54
|
+
& $script:_skalpelStatusBin.Source status | Out-Host
|
|
55
55
|
if ($LASTEXITCODE -eq 0) {
|
|
56
56
|
& $script:_skalpelStatusBin.Source claude-exec @args
|
|
57
57
|
} else {
|
|
@@ -134,11 +134,11 @@ end`,
|
|
|
134
134
|
powershell: `
|
|
135
135
|
# Codex CLI/App integration. Config overrides are native Codex -c knobs.
|
|
136
136
|
# Set $env:SKALPEL_NO_AGENT_WRAP=1 to disable.
|
|
137
|
-
$_skalpelOrigCodex = Get-Command codex
|
|
137
|
+
$_skalpelOrigCodex = Get-Command codex -CommandType Application -ErrorAction SilentlyContinue | Select-Object -First 1
|
|
138
138
|
$_skalpelStatusBin = Get-Command skalpel -CommandType Application -ErrorAction SilentlyContinue | Select-Object -First 1
|
|
139
139
|
if (-not $env:SKALPEL_NO_AGENT_WRAP -and $_skalpelOrigCodex -and $_skalpelStatusBin) {
|
|
140
140
|
function global:codex {
|
|
141
|
-
& $script:_skalpelStatusBin.Source status
|
|
141
|
+
& $script:_skalpelStatusBin.Source status | Out-Host
|
|
142
142
|
if ($LASTEXITCODE -eq 0) {
|
|
143
143
|
$_skalpelCodexHome = if ($env:CODEX_HOME) { $env:CODEX_HOME } else { Join-Path $HOME '.codex' }
|
|
144
144
|
$_skalpelCodexAuthMode = ''
|
|
@@ -198,6 +198,26 @@ function run() {
|
|
|
198
198
|
assert.ok(!block.includes('network.proxy_url'), 'Codex wrapper should not generic-proxy metadata routes');
|
|
199
199
|
});
|
|
200
200
|
|
|
201
|
+
test('TestRcEdit_PowerShell_Wrapper_Valid_Syntax', () => {
|
|
202
|
+
// BUG-0036 regression: the PowerShell wrappers must not use `1>&2`
|
|
203
|
+
// (a PowerShell parse error → the whole profile block fails to load
|
|
204
|
+
// → the claude/codex functions are never defined → bare `claude`
|
|
205
|
+
// bypasses skalpel on Windows). And the original-binary lookup must
|
|
206
|
+
// target `claude`/`codex` (npm installs claude.cmd/.ps1 on Windows),
|
|
207
|
+
// not `claude.exe`/`codex.exe` (which don't exist → null → wrapper
|
|
208
|
+
// never engages).
|
|
209
|
+
const env = rc.envBlockValues(7878);
|
|
210
|
+
const block = rc.buildBlock('powershell', env);
|
|
211
|
+
assert.ok(!block.includes('1>&2'), 'PowerShell wrapper uses unsupported 1>&2 redirect');
|
|
212
|
+
assert.ok(!block.includes('claude.exe'), 'PowerShell wrapper looks up claude.exe (absent on npm Windows)');
|
|
213
|
+
assert.ok(!block.includes('codex.exe'), 'PowerShell wrapper looks up codex.exe (absent on npm Windows)');
|
|
214
|
+
assert.ok(
|
|
215
|
+
block.includes('Get-Command claude -CommandType Application'),
|
|
216
|
+
'PowerShell wrapper should resolve claude via Get-Command claude'
|
|
217
|
+
);
|
|
218
|
+
assert.ok(block.includes('| Out-Host'), 'PowerShell wrapper should route status output via | Out-Host');
|
|
219
|
+
});
|
|
220
|
+
|
|
201
221
|
process.stdout.write(`\n pass=${pass} fail=${fail}\n`);
|
|
202
222
|
return fail === 0 ? 0 : 1;
|
|
203
223
|
}
|