Skip to content

Commit 991f047

Browse files
committed
update param visibility
1 parent 8ff71e4 commit 991f047

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

apps/sim/blocks/blocks/pi.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export const PiBlock: BlockConfig<PiResponse> = {
121121
title: 'GitHub Token',
122122
type: 'short-input',
123123
password: true,
124+
paramVisibility: 'user-only',
124125
placeholder: 'GitHub personal access token (repo scope)',
125126
tooltip: 'Personal access token with repo scope, used to clone, push, and open the PR.',
126127
required: true,
@@ -201,6 +202,7 @@ export const PiBlock: BlockConfig<PiResponse> = {
201202
title: 'Password',
202203
type: 'short-input',
203204
password: true,
205+
paramVisibility: 'user-only',
204206
placeholder: 'Your SSH password',
205207
required: { field: 'mode', value: 'local', and: { field: 'authMethod', value: 'password' } },
206208
condition: { field: 'mode', value: 'local', and: { field: 'authMethod', value: 'password' } },
@@ -210,6 +212,7 @@ export const PiBlock: BlockConfig<PiResponse> = {
210212
id: 'privateKey',
211213
title: 'Private Key',
212214
type: 'code',
215+
paramVisibility: 'user-only',
213216
placeholder: '-----BEGIN OPENSSH PRIVATE KEY-----\n...',
214217
required: {
215218
field: 'mode',
@@ -246,6 +249,7 @@ export const PiBlock: BlockConfig<PiResponse> = {
246249
title: 'Passphrase',
247250
type: 'short-input',
248251
password: true,
252+
paramVisibility: 'user-only',
249253
placeholder: 'Passphrase for encrypted key (optional)',
250254
mode: 'advanced',
251255
condition: {

apps/sim/executor/handlers/pi/local-backend.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,13 @@ export const runLocalPi: PiBackendRun<PiLocalRunParams> = async (params, context
8888
// Isolate Pi resource discovery: an empty cwd/agentDir keeps DefaultResourceLoader
8989
// from loading the Sim server's own .agents/skills, AGENTS.md, extensions, or settings.
9090
const isolatedDir = await mkdtemp(join(tmpdir(), 'sim-pi-'))
91-
const session = await openSshSession(params.ssh)
91+
// Clean up the scratch dir if the SSH connection fails — the try/finally below
92+
// is only entered once the session is open, so an early handshake failure would
93+
// otherwise orphan the directory.
94+
const session = await openSshSession(params.ssh).catch(async (error) => {
95+
await rm(isolatedDir, { recursive: true, force: true }).catch(() => {})
96+
throw error
97+
})
9298

9399
try {
94100
const sdk = await loadPiSdk()

0 commit comments

Comments
 (0)