mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-28 20:04:26 +00:00
feat(cli): add runner start with bundled SRT sandboxing (#535)
* refactor(agent): expose runner bash without skill gating * feat(cli): add runner start with optional SRT sandboxing * refactor(cli): remove runner Python dependency * feat(cli): bundle SRT and use platform-native runner shells * refactor(cli): delegate runner processes to Execa
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
RunnerFileStatResultMessage,
|
||||
RunnerFileUploadResultMessage,
|
||||
RunnerInfo,
|
||||
RunnerEnvironment,
|
||||
RunnerToServerMessage,
|
||||
runnerToServerMessageSchema,
|
||||
ServerToRunnerMessage,
|
||||
@@ -42,6 +43,7 @@ interface ActiveRunnerSession {
|
||||
lastPongAt: number
|
||||
stagedSkills: Map<string, string>
|
||||
stagedGeneratedFiles: Set<string>
|
||||
environment?: RunnerEnvironment
|
||||
}
|
||||
|
||||
interface PendingExecOperation {
|
||||
@@ -174,6 +176,10 @@ export class RunnerService {
|
||||
return this.sessions.has(runnerId)
|
||||
}
|
||||
|
||||
getRunnerEnvironment(runnerId: string): RunnerEnvironment | undefined {
|
||||
return this.sessions.get(runnerId)?.environment
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Runner CRUD & Default Runner Invariant
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -428,11 +434,11 @@ export class RunnerService {
|
||||
if (!this.isRunnerConnected(resolved.runner.id)) {
|
||||
if (resolved.isBoundToAgent) {
|
||||
throw new Error(
|
||||
`Runner "${resolved.runner.name}" is currently offline. Please start the runner ("shumai runner start") and try again.`,
|
||||
`Runner "${resolved.runner.name}" is currently offline. Please start the runner ("shumai-cli runner start") and try again.`,
|
||||
)
|
||||
}
|
||||
throw new Error(
|
||||
`Default runner "${resolved.runner.name}" is currently offline. Please start the runner ("shumai runner start") and try again.`,
|
||||
`Default runner "${resolved.runner.name}" is currently offline. Please start the runner ("shumai-cli runner start") and try again.`,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -559,6 +565,7 @@ export class RunnerService {
|
||||
case 'pong':
|
||||
break
|
||||
case 'reconcile':
|
||||
session.environment = msg.environment
|
||||
this.handleReconcileMessage(session, msg)
|
||||
break
|
||||
case 'exec.output':
|
||||
|
||||
Reference in New Issue
Block a user