fix: align controller with OpenShell and NemoClaw
Merged verified controller compatibility, terminal, and inference UX fixes.
This commit is contained in:
@@ -47,6 +47,83 @@ assert.match(
|
||||
/dashboardSessionId: session\.dashboardSessionId/,
|
||||
'terminal server responses must expose dashboardSessionId metadata'
|
||||
)
|
||||
assert.match(
|
||||
terminalSource,
|
||||
/falling back to stream transport/,
|
||||
'terminal server must fall back to stream transport when auto PTY spawn fails'
|
||||
)
|
||||
assert.match(
|
||||
terminalSource,
|
||||
/transport: session\.transport\.kind/,
|
||||
'terminal server must report the actual per-session transport after fallback'
|
||||
)
|
||||
assert.match(
|
||||
terminalSource,
|
||||
/function buildSessionCommand\(sandboxId\)/,
|
||||
'terminal server must resolve the real command it will execute for each session'
|
||||
)
|
||||
assert.match(
|
||||
terminalSource,
|
||||
/function normalizeSandboxId\(value\)/,
|
||||
'terminal server must validate request-controlled sandbox IDs before using them in shell templates'
|
||||
)
|
||||
assert.match(
|
||||
terminalSource,
|
||||
/\^\[A-Za-z0-9\]\[A-Za-z0-9_\.-\]/,
|
||||
'terminal server sandbox ID validation must reject shell metacharacters and whitespace'
|
||||
)
|
||||
assert.match(
|
||||
terminalSource,
|
||||
/OPENSHELL_TERMINAL_ATTACH_TEMPLATE[\s\S]*return buildAttachCommand\(sandboxId\)/,
|
||||
'terminal server must honor OPENSHELL_TERMINAL_ATTACH_TEMPLATE for sandbox sessions instead of only displaying it'
|
||||
)
|
||||
assert.match(
|
||||
terminalSource,
|
||||
/replaceAll\('\{sandboxId\}', safeSandboxId\)/,
|
||||
'terminal server must shell-escape sandboxId before substituting it into attach templates'
|
||||
)
|
||||
assert.match(
|
||||
terminalSource,
|
||||
/replaceAll\('\{alias\}', safeAlias\)/,
|
||||
'terminal server must shell-escape aliases before substituting them into attach templates'
|
||||
)
|
||||
assert.match(
|
||||
terminalSource,
|
||||
/attachCommand: buildSessionCommand\(identity\.sandboxId\)/,
|
||||
'terminal server attachCommand metadata must match the command family it executes for the session'
|
||||
)
|
||||
assert.match(
|
||||
terminalSource,
|
||||
/statusCode = message\.startsWith\('Invalid sandboxId'\) \? 400 : 500/,
|
||||
'terminal server should report invalid sandbox IDs as client errors'
|
||||
)
|
||||
assert.match(
|
||||
terminalSource,
|
||||
/function buildSessionExec\(sandboxId\)/,
|
||||
'terminal server must build an executable shell command for each session'
|
||||
)
|
||||
assert.match(
|
||||
terminalSource,
|
||||
/shellForPlatform\(\)} -lc \$\{shellEscape\(sessionCommand\)\}/,
|
||||
'terminal server must run attach templates through a shell so compound commands are preserved'
|
||||
)
|
||||
assert.match(
|
||||
terminalSource,
|
||||
/sessionExec/,
|
||||
'terminal bootstrap must execute the resolved session command'
|
||||
)
|
||||
|
||||
const operatorTerminalSource = await readFile(path.join(root, 'app/operator-terminal/page.tsx'), 'utf8')
|
||||
assert.match(
|
||||
operatorTerminalSource,
|
||||
/transport\?: string/,
|
||||
'operator terminal UI must track actual transport metadata'
|
||||
)
|
||||
assert.match(
|
||||
operatorTerminalSource,
|
||||
/via \$\{liveSession\.transport\}/,
|
||||
'operator terminal status must disclose the actual live transport to avoid misleading readiness copy'
|
||||
)
|
||||
|
||||
const buildOperatorTerminalRoute = ({ sandboxId, dashboardSessionId, launch }) => {
|
||||
const searchParams = new URLSearchParams()
|
||||
|
||||
Reference in New Issue
Block a user