Files
spark-control/package/startos/actions/configureSparks.ts
T
Grant 51804b2e5e 0.1.0:2 - remove '<spark-user>' default everywhere (it's Alice's username, not factory)
Per user correction: '<spark-user>' is not the DGX Spark factory default. Generic-ize:
- configureSparks: no default user; placeholder 'your SSH username'
- sparkConfig schema: empty string defaults
- main.ts env fallback: empty
- showPublicKey: drop the '<spark-user>' fallback; skip Spark if user not configured
- Update feedback memory with the correction
2026-05-12 10:39:57 -05:00

65 lines
1.9 KiB
TypeScript

import { sdk } from '../sdk'
import { sparkConfigYaml } from '../fileModels/sparkConfig.yaml'
const { InputSpec, Value } = sdk
const inputSpec = InputSpec.of({
spark1_host: Value.text({
name: 'Spark 1 hostname or IP',
description:
'The head node of your DGX Spark cluster — the one that has ~/spark-vllm-docker cloned and runs the vLLM container. Enter its LAN IP (recommended) or hostname.',
required: true,
default: null,
placeholder: 'e.g. 192.168.1.10',
masked: false,
}),
spark1_user: Value.text({
name: 'Spark 1 SSH user',
description:
'The user account on Spark 1 to SSH in as — whatever you log in as when you ssh into it manually.',
required: true,
default: null,
placeholder: 'your SSH username',
masked: false,
}),
spark2_host: Value.text({
name: 'Spark 2 hostname or IP',
description:
'The worker node of your DGX Spark cluster (also runs always-on services like Parakeet/Magpie). Enter its LAN IP or hostname.',
required: true,
default: null,
placeholder: 'e.g. 192.168.1.11',
masked: false,
}),
spark2_user: Value.text({
name: 'Spark 2 SSH user',
description:
'The user account on Spark 2 to SSH in as. Usually the same as Spark 1.',
required: true,
default: null,
placeholder: 'your SSH username',
masked: false,
}),
})
export const configureSparks = sdk.Action.withInput(
'configure-sparks',
async () => ({
name: 'Configure Sparks',
description: 'Set the hostnames and SSH users for your two Spark nodes.',
warning: null,
visibility: 'enabled',
allowedStatuses: 'any',
group: null,
}),
async () => inputSpec,
async ({ effects }) => {
const cfg = await sparkConfigYaml.read().once()
return cfg ?? null
},
async ({ effects, input }) => {
await sparkConfigYaml.merge(effects, input)
return null
},
)