Agent Workspace Mount After Config
This commit is contained in:
@@ -4427,6 +4427,17 @@ async function bareAgentRunSetupOnly(ctx, argv0) {
|
||||
const home = bareAgentResolveHome(ctx)
|
||||
const paths = bareAgentPaths(home)
|
||||
let { config } = await bareAgentLoadOrCreateConfig(ctx, paths)
|
||||
if (!bareAgentCanPlainSetup(ctx)) {
|
||||
bareAgentErr(
|
||||
ctx,
|
||||
argv0 +
|
||||
': --setup / --config needs an interactive TTY. Edit ' +
|
||||
paths.config +
|
||||
' manually.'
|
||||
)
|
||||
ctx.exitCode = 1
|
||||
return
|
||||
}
|
||||
let suspended = false
|
||||
try {
|
||||
if (typeof ctx.suspendReplForSubprocess === 'function') {
|
||||
@@ -4442,11 +4453,21 @@ async function bareAgentRunSetupOnly(ctx, argv0) {
|
||||
ctx.resumeReplAfterSubprocess()
|
||||
}
|
||||
}
|
||||
try {
|
||||
await bareAgentEnsureWorkspace(ctx, paths)
|
||||
await bareAgentEnsureSkillTemplates(ctx, paths)
|
||||
} catch {
|
||||
bareAgentErr(
|
||||
ctx,
|
||||
argv0 + ': could not seed ~/.agent/workspace from /share/agent-workspace (check system image)'
|
||||
)
|
||||
}
|
||||
try {
|
||||
if (ctx.vfs?.chmod) await ctx.vfs.chmod(paths.config, 0o600)
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
ctx.exitCode = 0
|
||||
void config
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schema": 2,
|
||||
"profileId": "bare-os-posix-like",
|
||||
"generatedAt": "2026-04-22T06:51:11.664Z",
|
||||
"generatedAt": "2026-04-22T06:56:57.931Z",
|
||||
"note": "Sparse POSIX Issue 7 coverage hints for /bin utilities. Omitted command names are not yet profiled here.",
|
||||
"commandIndex": [
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"atMs": 1776840671663,
|
||||
"atMs": 1776841017931,
|
||||
"commands": [
|
||||
"agent",
|
||||
"arch",
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user