fix(web): allow profiles without native bash env
This commit is contained in:
@@ -82,14 +82,6 @@ export function prepareWebRuntimeContext(ctx: Context, sourceRoot: string, mode:
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Fail a settled Web boot whose composition omitted the managed Bash environment registry.
|
|
||||||
* @param ctx - settled Web application context.
|
|
||||||
*/
|
|
||||||
export function assertWebRuntimeContext(ctx: Context): void {
|
|
||||||
if (ctx.get('bashEnv') === undefined) throw new Error('dsh web: bashEnv service missing after settled boot')
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Serve the browser UI from the shipped config tree. `host`/`port` are passed
|
* Serve the browser UI from the shipped config tree. `host`/`port` are passed
|
||||||
* through only when the flag was given; absent, the shipped Web overlay value stands.
|
* through only when the flag was given; absent, the shipped Web overlay value stands.
|
||||||
@@ -123,7 +115,6 @@ export async function runWeb(
|
|||||||
...trustedHosts !== undefined && { trustedHosts },
|
...trustedHosts !== undefined && { trustedHosts },
|
||||||
})
|
})
|
||||||
const { ctx, port: boundPort } = await entry.run()
|
const { ctx, port: boundPort } = await entry.run()
|
||||||
assertWebRuntimeContext(ctx)
|
|
||||||
const resolvedLocalWebUrl = localWebUrl(ctx)
|
const resolvedLocalWebUrl = localWebUrl(ctx)
|
||||||
|
|
||||||
let exiting = false
|
let exiting = false
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ import * as ToolCordis from '@deepseek-ai/dsh-tool-cordis'
|
|||||||
// Empty type imports carry the httpServer/agents/sessionPersistence Context merges.
|
// Empty type imports carry the httpServer/agents/sessionPersistence Context merges.
|
||||||
import type {} from '@deepseek-ai/dsh-host-webserver'
|
import type {} from '@deepseek-ai/dsh-host-webserver'
|
||||||
import type {} from '@deepseek-ai/dsh-agent'
|
import type {} from '@deepseek-ai/dsh-agent'
|
||||||
import { assertWebRuntimeContext, prepareWebRuntimeContext } from '../../cli/src/web.ts'
|
import { prepareWebRuntimeContext } from '../../cli/src/web.ts'
|
||||||
import { DIST_INDEX, REPO_ROOT, requireDist } from './support.ts'
|
import { DIST_INDEX, REPO_ROOT, requireDist } from './support.ts'
|
||||||
|
|
||||||
/** Snapshot mode for the lane, from $DSH_SNAPSHOT (same vocabulary as the ACP/TUI suites). */
|
/** Snapshot mode for the lane, from $DSH_SNAPSHOT (same vocabulary as the ACP/TUI suites). */
|
||||||
@@ -318,7 +318,6 @@ export async function launchWebScaffold(options: LaunchOptions = {}): Promise<We
|
|||||||
throw new Error('web e2e scaffold: httpServer service missing after settled boot')
|
throw new Error('web e2e scaffold: httpServer service missing after settled boot')
|
||||||
}
|
}
|
||||||
port = boundPort
|
port = boundPort
|
||||||
assertWebRuntimeContext(ctx)
|
|
||||||
|
|
||||||
// Fill the open llm seam on the settled root ctx. Ordinary keyless modes
|
// Fill the open llm seam on the settled root ctx. Ordinary keyless modes
|
||||||
// disable llm-deepseek; the first-run lane keeps it mounted but has no
|
// disable llm-deepseek; the first-run lane keeps it mounted but has no
|
||||||
|
|||||||
Reference in New Issue
Block a user