lastlight 0.5.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/.claude-plugin/marketplace.json +14 -0
  2. package/README.md +39 -0
  3. package/agent-context/rules.md +0 -38
  4. package/agent-context/soul.md +0 -11
  5. package/dist/cli.js +24 -0
  6. package/dist/cli.js.map +1 -1
  7. package/dist/config.d.ts +1 -1
  8. package/dist/config.js +3 -3
  9. package/dist/config.js.map +1 -1
  10. package/dist/engine/agent-executor.d.ts +2 -139
  11. package/dist/engine/agent-executor.js +76 -996
  12. package/dist/engine/agent-executor.js.map +1 -1
  13. package/dist/engine/executors/backends.d.ts +41 -0
  14. package/dist/engine/executors/backends.js +541 -0
  15. package/dist/engine/executors/backends.js.map +1 -0
  16. package/dist/engine/executors/shared.d.ts +189 -0
  17. package/dist/engine/executors/shared.js +612 -0
  18. package/dist/engine/executors/shared.js.map +1 -0
  19. package/dist/sandbox/index.d.ts +1 -1
  20. package/dist/sandbox/index.js +1 -1
  21. package/dist/sandbox/index.js.map +1 -1
  22. package/dist/sandbox/smol.d.ts +162 -0
  23. package/dist/sandbox/smol.integration.test.d.ts +1 -0
  24. package/dist/sandbox/smol.integration.test.js +130 -0
  25. package/dist/sandbox/smol.integration.test.js.map +1 -0
  26. package/dist/sandbox/smol.js +485 -0
  27. package/dist/sandbox/smol.js.map +1 -0
  28. package/dist/skills-install.d.ts +12 -0
  29. package/dist/skills-install.js +179 -0
  30. package/dist/skills-install.js.map +1 -0
  31. package/package.json +4 -2
  32. package/plugins/lastlight/.claude-plugin/plugin.json +12 -0
  33. package/plugins/lastlight/README.md +44 -0
  34. package/plugins/lastlight/skills/lastlight-client/SKILL.md +82 -0
  35. package/plugins/lastlight/skills/lastlight-evals/SKILL.md +130 -0
  36. package/plugins/lastlight/skills/lastlight-evals/references/instance-schema.md +84 -0
  37. package/plugins/lastlight/skills/lastlight-evals/references/models-json.md +42 -0
  38. package/plugins/lastlight/skills/lastlight-overlay/SKILL.md +72 -0
  39. package/plugins/lastlight/skills/lastlight-overlay/references/forking.md +55 -0
  40. package/plugins/lastlight/skills/lastlight-overlay/references/overlay-layout.md +52 -0
  41. package/plugins/lastlight/skills/lastlight-server/SKILL.md +124 -0
  42. package/plugins/lastlight/skills/lastlight-server/references/env-schema.md +103 -0
  43. package/plugins/lastlight/skills/lastlight-server/references/operations.md +60 -0
@@ -0,0 +1,541 @@
1
+ import { basename, join, relative } from "path";
2
+ import { writeFileSync } from "fs";
3
+ import { createTaskSandbox, setupTaskWorktree, prePopulateWorkspace, SANDBOX_IMAGE_QA, } from "../../sandbox/index.js";
4
+ import { SmolSandbox, smolAvailable, SMOL_WORKSPACE_DIR } from "../../sandbox/smol.js";
5
+ import { AGENTIC_PROFILE_FOR, loadAgentContext, } from "../profiles.js";
6
+ import { AgenticShim } from "../event-shim.js";
7
+ import { projectSlugForCwd } from "../../session-log.js";
8
+ import { ALLOW_ALL_SENTINEL, DEFAULT_ALLOWLIST, mergeAllowlist } from "../../sandbox/egress-allowlist.js";
9
+ import { getDockerSandboxOtelEnv, getOtelEnvForSandbox, recordError, recordExecutionMetrics } from "../../telemetry/index.js";
10
+ import { recordPiEvent } from "../../telemetry/pi-events.js";
11
+ import { DEFAULT_MODEL, DOCKER_WORKSPACE_DIR, SKILL_BUNDLE_ROOT, stageSkillBundle, skillBundleKey, excludeFromGit, serverArtifacts, stageArtifactsIn, harvestArtifactsOut, RunResultAccumulator, finalizeFromRunResult, coerceThinking, resolveSessionsDir, emptyResult, applyEnv, } from "./shared.js";
12
+ // ── In-process path (gondolin / none) ───────────────────────────────
13
+ export async function executeInProcess(prompt, config, ctx) {
14
+ const startTime = Date.now();
15
+ console.log(` [executor] Running in-process (task: ${ctx.taskId}, sandbox: ${ctx.backend})`);
16
+ const model = config.model || DEFAULT_MODEL;
17
+ const thinking = coerceThinking(config.variant);
18
+ const profile = ctx.access ? AGENTIC_PROFILE_FOR[ctx.access.profile] : undefined;
19
+ const sessionsDir = resolveSessionsDir(config);
20
+ // When the harness pre-cloned the target repo, cwd is the checkout
21
+ // (`<workDir>/<repo>/`) so the agent's commands run inside the repo with no
22
+ // `cd` preamble; otherwise cwd is the workspace root and the agent clones in.
23
+ const agentCwd = ctx.access?.prePopulateBranch
24
+ ? join(ctx.workDir, ctx.access.repo)
25
+ : ctx.workDir;
26
+ // Stage this phase's skills into its own bundle and point pi at the staged
27
+ // dirs explicitly via `skillPaths` below. The bundle lives at the workspace
28
+ // root — a sibling of the repo, outside its git tree — for `none` (the host
29
+ // FS is fully visible in-process). gondolin mounts only cwd, so its bundle
30
+ // is staged under the repo and added to the checkout's local
31
+ // `.git/info/exclude` so the agent can't commit it.
32
+ const gondolin = ctx.backend === "gondolin";
33
+ const skillRoot = gondolin ? agentCwd : ctx.workDir;
34
+ let stagedSkillDirs;
35
+ try {
36
+ stagedSkillDirs = stageSkillBundle(skillRoot, skillBundleKey(config), config.skillPaths, "symlink");
37
+ if (stagedSkillDirs && gondolin)
38
+ excludeFromGit(agentCwd, SKILL_BUNDLE_ROOT);
39
+ }
40
+ catch (err) {
41
+ const msg = err instanceof Error ? err.message : String(err);
42
+ console.warn(`[executor] Could not stage skills: ${msg}`);
43
+ }
44
+ // Server-mode build assets: agentCwd is the host-visible repo checkout for
45
+ // the in-process backends (gondolin's cwd mount / none's host FS), so stage
46
+ // and harvest operate on it directly.
47
+ const artifacts = serverArtifacts(config, agentCwd);
48
+ stageArtifactsIn(artifacts);
49
+ const shim = new AgenticShim({
50
+ homeDir: sessionsDir,
51
+ projectSlug: projectSlugForCwd(agentCwd),
52
+ model,
53
+ initialPrompt: prompt,
54
+ });
55
+ // agentic-pi reads its own env (provider keys, App PEM, etc.) from
56
+ // process.env. Splice in our scoped values for the duration of the call,
57
+ // then restore.
58
+ const restore = applyEnv(ctx.env);
59
+ // Env forwarded INTO the sandbox so the agent's `bash` calls see it.
60
+ // agentic-pi auto-injects GITHUB_TOKEN/GH_TOKEN when --profile is set;
61
+ // git identity is set here so `git commit` works without extra setup.
62
+ //
63
+ // Notes per backend:
64
+ // - gondolin: the VM's user inherits HOME from the agentic-pi process
65
+ // (so the host's HOME — e.g. /Users/clifton — leaks in). We force
66
+ // HOME=/root so `git config --global` and `gh auth status` write
67
+ // to a real path inside the VM.
68
+ // - none: agent runs on the host; do NOT override HOME (would mess
69
+ // with the harness user's real config).
70
+ // - docker (handled separately): the container's `agent` user has
71
+ // its own HOME=/home/agent baked in by the image; no override.
72
+ const baseSandboxEnv = {
73
+ GIT_AUTHOR_NAME: "last-light[bot]",
74
+ GIT_AUTHOR_EMAIL: "last-light[bot]@users.noreply.github.com",
75
+ GIT_COMMITTER_NAME: "last-light[bot]",
76
+ GIT_COMMITTER_EMAIL: "last-light[bot]@users.noreply.github.com",
77
+ // /workspace is a bind mount from the host (host UID) into a VM running
78
+ // as a different UID; git refuses to operate without an explicit
79
+ // safe-directory. Setting it via GIT_CONFIG_* avoids needing HOME and
80
+ // a writeable ~/.gitconfig.
81
+ GIT_CONFIG_COUNT: "1",
82
+ GIT_CONFIG_KEY_0: "safe.directory",
83
+ GIT_CONFIG_VALUE_0: "*",
84
+ };
85
+ const otelSandboxEnv = config.otel?.enabled && config.otel.forwardToSandbox ? getOtelEnvForSandbox() : {};
86
+ const sandboxEnv = ctx.backend === "gondolin"
87
+ ? { ...otelSandboxEnv, ...baseSandboxEnv, HOME: "/root", USER: "root", LOGNAME: "root" }
88
+ : { ...otelSandboxEnv, ...baseSandboxEnv };
89
+ let notifiedSessionId = false;
90
+ let result;
91
+ const acc = new RunResultAccumulator();
92
+ try {
93
+ // HTTP egress allowlist. lastlight owns the policy (rather than relying
94
+ // on agentic-pi's bundled default) so a single source — `egress-allowlist.ts`
95
+ // — covers both backends. `unrestrictedEgress` opts a phase out via the
96
+ // `"*"` sentinel; gondolin (post the upstream allow-all patch) treats it
97
+ // as "allow every host".
98
+ const extraHosts = config.otel?.enabled && config.otel.forwardToSandbox ? config.otel.collectorHosts : [];
99
+ const allowedHttpHosts = config.unrestrictedEgress
100
+ ? [ALLOW_ALL_SENTINEL]
101
+ : mergeAllowlist(DEFAULT_ALLOWLIST, extraHosts);
102
+ // Loaded lazily: agentic-pi transitively imports pi-coding-agent, whose
103
+ // bundled undici writes a v8 Agent onto `Symbol.for('undici.globalDispatcher.1')`
104
+ // the moment its `lib/global.js` evaluates. Node's built-in fetch reads
105
+ // from the same symbol, so eager-loading here would poison every fetch
106
+ // in the harness — breaking arctic's OAuth code exchange (strict
107
+ // content-length validation). Dynamic import keeps the harness on
108
+ // Node's clean dispatcher unless an in-process sandbox actually runs.
109
+ const { run: agenticRun } = await import("agentic-pi");
110
+ result = await agenticRun({
111
+ model,
112
+ prompt,
113
+ thinking,
114
+ profile,
115
+ // Test/eval escape hatch: when set (by the eval harness), agentic-pi's
116
+ // built-in github_* tools talk to a local fake GitHub instead of
117
+ // api.github.com. Unset in production.
118
+ githubApiBaseUrl: config.githubApiBaseUrl,
119
+ sandbox: ctx.backend === "gondolin" ? "gondolin" : "none",
120
+ sandboxEnv,
121
+ cwd: agentCwd,
122
+ noSession: true,
123
+ // Explicit per-phase skill bundle (staged above). pi loads these
124
+ // additively; nothing is written into the repo for the agent to commit.
125
+ skillPaths: stagedSkillDirs,
126
+ allowedHttpHosts,
127
+ // Explicit boolean — without it, agentic-pi auto-enables web search
128
+ // when any provider key is in process.env. We forwarded those keys
129
+ // above only for opted-in workflows, but `process.env` on the harness
130
+ // host carries them regardless, so we must opt-out explicitly.
131
+ webSearch: config.webSearch === true,
132
+ webSearchProvider: config.webSearchProvider,
133
+ onEvent: (record) => {
134
+ acc.feed(record);
135
+ shim.feed(record);
136
+ recordPiEvent(record, {
137
+ includeContent: config.otel?.includeContent === true,
138
+ surface: "agent",
139
+ workflowName: config.telemetry?.workflowName,
140
+ phaseName: config.telemetry?.phaseName,
141
+ model,
142
+ });
143
+ if (!notifiedSessionId && ctx.onSessionId && record.type === "session" && typeof record.id === "string") {
144
+ notifiedSessionId = true;
145
+ ctx.onSessionId(record.id);
146
+ }
147
+ },
148
+ onWarn: (msg) => console.warn(`[agentic] ${msg}`),
149
+ });
150
+ }
151
+ catch (err) {
152
+ restore();
153
+ // Harvest even on failure so a partial plan/summary still reaches the store.
154
+ harvestArtifactsOut(artifacts);
155
+ const msg = err instanceof Error ? err.message : String(err);
156
+ const durationMs = Date.now() - startTime;
157
+ recordError("agent", err, { "sandbox.backend": ctx.backend, model, success: false, stop_reason: "error_executor", "workflow.name": config.telemetry?.workflowName, "phase.name": config.telemetry?.phaseName });
158
+ recordExecutionMetrics("agent", { "sandbox.backend": ctx.backend, model, success: false, stop_reason: "error_executor", durationMs });
159
+ const fallbackId = `exec-${basename(ctx.taskId)}`;
160
+ const synthesizedId = await shim
161
+ .finalizeWithFallback(emptyResult("error_executor", durationMs), fallbackId, msg)
162
+ .catch(() => null);
163
+ return {
164
+ success: false,
165
+ output: "",
166
+ turns: 0,
167
+ error: msg,
168
+ durationMs,
169
+ sessionId: synthesizedId ?? undefined,
170
+ stopReason: "error_executor",
171
+ };
172
+ }
173
+ restore();
174
+ harvestArtifactsOut(artifacts);
175
+ // agentic-pi's in-process `stats` is the same compaction-blind
176
+ // `usage_snapshot`. Prefer our per-message accumulation when it carries
177
+ // token data (see RunResultAccumulator.bestStats).
178
+ const better = acc.bestStats();
179
+ if (better && (better.tokens?.total ?? 0) > 0)
180
+ result.stats = better;
181
+ const finalResult = await finalizeFromRunResult(result, prompt, shim, startTime, acc.extensions(), acc.skills(), acc.toolError(), acc.endedOnToolCall());
182
+ recordExecutionMetrics("agent", {
183
+ "sandbox.backend": ctx.backend,
184
+ model,
185
+ success: finalResult.success,
186
+ stop_reason: finalResult.stopReason,
187
+ durationMs: finalResult.durationMs,
188
+ costUsd: finalResult.costUsd,
189
+ inputTokens: finalResult.inputTokens,
190
+ outputTokens: finalResult.outputTokens,
191
+ "workflow.name": config.telemetry?.workflowName,
192
+ "phase.name": config.telemetry?.phaseName,
193
+ });
194
+ return finalResult;
195
+ }
196
+ // ── Docker path ─────────────────────────────────────────────────────
197
+ export async function executeDocker(prompt, config, ctx) {
198
+ // HTTP egress routing — docker analog of the gondolin allowlist.
199
+ // Sandbox is wired to coredns-strict by default (allowlist enforced via
200
+ // DNS sinkhole + nginx ssl_preread); a phase that set
201
+ // `unrestricted_egress: true` points at coredns-open instead.
202
+ // The IPs here match the static assignments in docker-compose.yml
203
+ // (see src/sandbox/egress-firewall-config.ts for the constants).
204
+ const dnsIp = config.unrestrictedEgress
205
+ ? (process.env.LASTLIGHT_DNS_OPEN || "172.30.0.11")
206
+ : (process.env.LASTLIGHT_DNS_STRICT || "172.30.0.10");
207
+ // A phase can opt into the browser-QA image (Playwright + Chromium baked in)
208
+ // with `sandbox_image: qa`. The runner only schedules such a phase when the
209
+ // image is actually present (see `qaImageAvailable`), so by here it's safe to
210
+ // request; pass undefined otherwise to use the lean default image.
211
+ const imageName = config.sandboxImage === "qa" ? SANDBOX_IMAGE_QA : undefined;
212
+ const sbx = await createTaskSandbox({
213
+ taskId: ctx.taskId,
214
+ stateDir: ctx.stateDir,
215
+ sandboxDir: config.sandboxDir,
216
+ env: ctx.env,
217
+ prePopulate: ctx.prePopulate,
218
+ dnsIp,
219
+ imageName,
220
+ });
221
+ if (!sbx) {
222
+ throw new Error("LASTLIGHT_SANDBOX=docker but no docker sandbox was available. " +
223
+ "Install Docker and build the sandbox image, or set LASTLIGHT_SANDBOX=gondolin / none.");
224
+ }
225
+ try {
226
+ const md = loadAgentContext(config.agentContextDir);
227
+ if (md)
228
+ writeFileSync(join(sbx.workDir, "AGENTS.md"), md);
229
+ }
230
+ catch (err) {
231
+ const msg = err instanceof Error ? err.message : String(err);
232
+ console.warn(`[executor] Could not write docker AGENTS.md: ${msg}`);
233
+ }
234
+ const startTime = Date.now();
235
+ console.log(` [executor] Running in docker sandbox (task: ${ctx.taskId})`);
236
+ const model = config.model || DEFAULT_MODEL;
237
+ const thinking = coerceThinking(config.variant);
238
+ const profile = ctx.access ? AGENTIC_PROFILE_FOR[ctx.access.profile] : undefined;
239
+ const sessionsDir = resolveSessionsDir(config);
240
+ // When the harness pre-cloned the repo, cwd is the checkout
241
+ // (`<workspace>/<repo>/`) so the agent runs inside the repo with no `cd`
242
+ // preamble; otherwise it's the workspace root.
243
+ const agentCwd = ctx.prePopulate
244
+ ? `${DOCKER_WORKSPACE_DIR}/${ctx.prePopulate.repo}`
245
+ : DOCKER_WORKSPACE_DIR;
246
+ // Stage this phase's skills into its own bundle at the workspace ROOT — a
247
+ // sibling of any repo subdir, never inside its git tree. docker bind-mounts
248
+ // the WHOLE workspace, so the agent reaches the bundle by an absolute
249
+ // `--skill` path even though cwd is the repo. Copy (not symlink) because the
250
+ // agent's tools run inside the container and host symlink targets don't
251
+ // resolve there. Map the host dests to their in-container paths for `--skill`.
252
+ let skillDirsInContainer = [];
253
+ try {
254
+ const staged = stageSkillBundle(sbx.workDir, skillBundleKey(config), config.skillPaths, "copy");
255
+ if (staged) {
256
+ skillDirsInContainer = staged.map((d) => `${DOCKER_WORKSPACE_DIR}/${relative(sbx.workDir, d)}`);
257
+ }
258
+ }
259
+ catch (err) {
260
+ const msg = err instanceof Error ? err.message : String(err);
261
+ console.warn(`[executor] Could not stage skills in docker workspace: ${msg}`);
262
+ }
263
+ // Server-mode build assets. The host-visible repo checkout is the
264
+ // bind-mounted workspace path (`sbx.workDir[/<repo>]`), NOT the in-container
265
+ // `agentCwd`. Stage now; harvest before each `sbx.cleanup()` below (cleanup
266
+ // removes the workspace, taking the docs with it).
267
+ const hostRepoDir = ctx.prePopulate ? join(sbx.workDir, ctx.prePopulate.repo) : sbx.workDir;
268
+ const artifacts = serverArtifacts(config, hostRepoDir);
269
+ stageArtifactsIn(artifacts);
270
+ // The dashboard reads from <sessionsDir>/projects/<slug>/. Use the same
271
+ // resolved cwd for the slug so live tails land in the right project dir.
272
+ const shim = new AgenticShim({
273
+ homeDir: sessionsDir,
274
+ projectSlug: projectSlugForCwd(agentCwd),
275
+ model,
276
+ initialPrompt: prompt,
277
+ });
278
+ const acc = new RunResultAccumulator();
279
+ let notifiedSessionId = false;
280
+ // Identity forwarded into the sandboxed agentic-pi run inside the container.
281
+ // The container's `agent` user already has HOME=/home/agent set up, so we
282
+ // do NOT override HOME here — only git identity + safe.directory (for the
283
+ // host-UID bind mount). GITHUB_TOKEN/GH_TOKEN are auto-injected by
284
+ // agentic-pi when --profile is set.
285
+ const sandboxEnv = {
286
+ // Inner-run env for the agent's child shells. Points at the in-network
287
+ // collector (IP-only, no secret headers) so any OTLP a script emits is
288
+ // tunnelled the same way the agent's own telemetry is.
289
+ ...(config.otel?.enabled && config.otel.forwardToSandbox ? getDockerSandboxOtelEnv() : {}),
290
+ GIT_AUTHOR_NAME: "last-light[bot]",
291
+ GIT_AUTHOR_EMAIL: "last-light[bot]@users.noreply.github.com",
292
+ GIT_COMMITTER_NAME: "last-light[bot]",
293
+ GIT_COMMITTER_EMAIL: "last-light[bot]@users.noreply.github.com",
294
+ GIT_CONFIG_COUNT: "1",
295
+ GIT_CONFIG_KEY_0: "safe.directory",
296
+ GIT_CONFIG_VALUE_0: "*",
297
+ };
298
+ try {
299
+ await sbx.sandbox.runAgent(ctx.taskId, prompt, {
300
+ model,
301
+ thinking,
302
+ profile,
303
+ sandboxEnv,
304
+ agentCwd,
305
+ skillDirs: skillDirsInContainer,
306
+ webSearch: config.webSearch === true,
307
+ webSearchProvider: config.webSearchProvider,
308
+ onLine: (line) => {
309
+ if (!line.startsWith("{"))
310
+ return;
311
+ let record;
312
+ try {
313
+ record = JSON.parse(line);
314
+ }
315
+ catch {
316
+ return;
317
+ }
318
+ acc.feed(record);
319
+ shim.feed(record);
320
+ recordPiEvent(record, {
321
+ includeContent: config.otel?.includeContent === true,
322
+ surface: "agent",
323
+ workflowName: config.telemetry?.workflowName,
324
+ phaseName: config.telemetry?.phaseName,
325
+ model,
326
+ });
327
+ if (!notifiedSessionId && ctx.onSessionId && record.type === "session" && typeof record.id === "string") {
328
+ notifiedSessionId = true;
329
+ ctx.onSessionId(record.id);
330
+ }
331
+ },
332
+ });
333
+ }
334
+ catch (err) {
335
+ const msg = err instanceof Error ? err.message : String(err);
336
+ const durationMs = Date.now() - startTime;
337
+ recordError("agent", err, { "sandbox.backend": "docker", model, success: false, stop_reason: "error_sandbox", "workflow.name": config.telemetry?.workflowName, "phase.name": config.telemetry?.phaseName });
338
+ recordExecutionMetrics("agent", { "sandbox.backend": "docker", model, success: false, stop_reason: "error_sandbox", durationMs });
339
+ const fallbackId = `exec-${basename(ctx.taskId)}`;
340
+ const synthesizedId = await shim
341
+ .finalizeWithFallback(emptyResult("error_sandbox", durationMs), fallbackId, msg)
342
+ .catch(() => null);
343
+ harvestArtifactsOut(artifacts);
344
+ await sbx.cleanup();
345
+ return {
346
+ success: false,
347
+ output: "",
348
+ turns: 0,
349
+ error: msg,
350
+ durationMs,
351
+ sessionId: synthesizedId ?? undefined,
352
+ stopReason: "error_sandbox",
353
+ };
354
+ }
355
+ harvestArtifactsOut(artifacts);
356
+ await sbx.cleanup();
357
+ const finalResult = await finalizeFromRunResult(acc.build(0), prompt, shim, startTime, acc.extensions(), acc.skills(), acc.toolError(), acc.endedOnToolCall());
358
+ recordExecutionMetrics("agent", {
359
+ "sandbox.backend": "docker",
360
+ model,
361
+ success: finalResult.success,
362
+ stop_reason: finalResult.stopReason,
363
+ durationMs: finalResult.durationMs,
364
+ costUsd: finalResult.costUsd,
365
+ inputTokens: finalResult.inputTokens,
366
+ outputTokens: finalResult.outputTokens,
367
+ "workflow.name": config.telemetry?.workflowName,
368
+ "phase.name": config.telemetry?.phaseName,
369
+ });
370
+ return finalResult;
371
+ }
372
+ // ── smolvm path (local micro-VM) ────────────────────────────────────
373
+ //
374
+ // Structural peer of executeDocker: Last Light owns the boundary, mounts the
375
+ // workspace, runs `agentic-pi run --sandbox none` inside the VM, parses the
376
+ // stream, destroys the machine. Differences from docker: a real micro-VM
377
+ // (own kernel) and NATIVE per-machine egress via smolvm's `--allow-host`
378
+ // (sourced from egress-allowlist.ts) instead of the coredns/nginx sidecars.
379
+ export async function executeSmol(prompt, config, ctx) {
380
+ if (!smolAvailable()) {
381
+ throw new Error("LASTLIGHT_SANDBOX=smol but the smolvm CLI is not available. " +
382
+ "Install smolvm (https://smolmachines.com) and start `smolvm serve`, " +
383
+ "or set LASTLIGHT_SANDBOX=docker / gondolin / none.");
384
+ }
385
+ // Native egress allowlist — the docker/gondolin policy expressed as
386
+ // per-machine `--allow-host` flags. `unrestrictedEgress` → null (open, but
387
+ // still `--net`). NOTE: unlike docker's coredns-open, this has no SSRF
388
+ // metadata floor — a spike gap, documented in smol.ts. The allowlist does
389
+ // NOT include docker-registry hosts, so the image must already be in smolvm's
390
+ // store (pre-pull / `smolvm pack`) — `start` won't reach a registry here.
391
+ const extraHosts = config.otel?.enabled && config.otel.forwardToSandbox ? config.otel.collectorHosts : [];
392
+ const allowHosts = config.unrestrictedEgress
393
+ ? null
394
+ : mergeAllowlist(DEFAULT_ALLOWLIST, extraHosts);
395
+ // Workspace dir on the host. We boot the VM FIRST (with the dir mounted),
396
+ // then probe where the share actually lands and clone/stage into that — see
397
+ // SmolSandbox.resolveHostWorkspace for why the mount source isn't always the
398
+ // share root. So no pre-clone here; just the dir.
399
+ const workDir = setupTaskWorktree({
400
+ taskId: ctx.taskId,
401
+ stateDir: ctx.stateDir,
402
+ sandboxDir: config.sandboxDir,
403
+ });
404
+ const sandbox = new SmolSandbox({ env: ctx.env, allowHosts });
405
+ const machine = await sandbox.create({ taskId: ctx.taskId, worktreePath: workDir });
406
+ const hostWs = machine.hostWorkspace;
407
+ // Now that we know the share-backed host dir, provision it: clone the repo,
408
+ // drop AGENTS.md, stage skills — all where the guest will see them at
409
+ // SMOL_WORKSPACE_DIR.
410
+ if (ctx.prePopulate)
411
+ prePopulateWorkspace(hostWs, ctx.prePopulate);
412
+ try {
413
+ const md = loadAgentContext(config.agentContextDir);
414
+ if (md)
415
+ writeFileSync(join(hostWs, "AGENTS.md"), md);
416
+ }
417
+ catch (err) {
418
+ const msg = err instanceof Error ? err.message : String(err);
419
+ console.warn(`[executor] Could not write smol AGENTS.md: ${msg}`);
420
+ }
421
+ const startTime = Date.now();
422
+ console.log(` [executor] Running in smol micro-VM (task: ${ctx.taskId})`);
423
+ const model = config.model || DEFAULT_MODEL;
424
+ const thinking = coerceThinking(config.variant);
425
+ const profile = ctx.access ? AGENTIC_PROFILE_FOR[ctx.access.profile] : undefined;
426
+ const sessionsDir = resolveSessionsDir(config);
427
+ const agentCwd = ctx.prePopulate
428
+ ? `${SMOL_WORKSPACE_DIR}/${ctx.prePopulate.repo}`
429
+ : SMOL_WORKSPACE_DIR;
430
+ // Skills copied (not symlinked) into the share-backed workspace root — host
431
+ // symlink targets wouldn't resolve across the VM mount — then mapped to their
432
+ // in-guest paths for `--skill`. Same rationale as the docker path.
433
+ let skillDirsInGuest = [];
434
+ try {
435
+ const staged = stageSkillBundle(hostWs, skillBundleKey(config), config.skillPaths, "copy");
436
+ if (staged) {
437
+ skillDirsInGuest = staged.map((d) => `${SMOL_WORKSPACE_DIR}/${relative(hostWs, d)}`);
438
+ }
439
+ }
440
+ catch (err) {
441
+ const msg = err instanceof Error ? err.message : String(err);
442
+ console.warn(`[executor] Could not stage skills in smol workspace: ${msg}`);
443
+ }
444
+ const hostRepoDir = ctx.prePopulate ? join(hostWs, ctx.prePopulate.repo) : hostWs;
445
+ const artifacts = serverArtifacts(config, hostRepoDir);
446
+ stageArtifactsIn(artifacts);
447
+ const shim = new AgenticShim({
448
+ homeDir: sessionsDir,
449
+ projectSlug: projectSlugForCwd(agentCwd),
450
+ model,
451
+ initialPrompt: prompt,
452
+ });
453
+ const acc = new RunResultAccumulator();
454
+ let notifiedSessionId = false;
455
+ // Git identity for the inner agentic-pi run. No HOME override — the sandbox
456
+ // image's `agent` user has its own HOME. GITHUB_TOKEN/GH_TOKEN are
457
+ // auto-injected by agentic-pi from the machine env when --profile is set.
458
+ const sandboxEnv = {
459
+ GIT_AUTHOR_NAME: "last-light[bot]",
460
+ GIT_AUTHOR_EMAIL: "last-light[bot]@users.noreply.github.com",
461
+ GIT_COMMITTER_NAME: "last-light[bot]",
462
+ GIT_COMMITTER_EMAIL: "last-light[bot]@users.noreply.github.com",
463
+ GIT_CONFIG_COUNT: "1",
464
+ GIT_CONFIG_KEY_0: "safe.directory",
465
+ GIT_CONFIG_VALUE_0: "*",
466
+ };
467
+ try {
468
+ await sandbox.runAgent(ctx.taskId, prompt, {
469
+ model,
470
+ thinking,
471
+ profile,
472
+ sandboxEnv,
473
+ agentCwd,
474
+ skillDirs: skillDirsInGuest,
475
+ webSearch: config.webSearch === true,
476
+ webSearchProvider: config.webSearchProvider,
477
+ onLine: (line) => {
478
+ if (!line.startsWith("{"))
479
+ return;
480
+ let record;
481
+ try {
482
+ record = JSON.parse(line);
483
+ }
484
+ catch {
485
+ return;
486
+ }
487
+ acc.feed(record);
488
+ shim.feed(record);
489
+ recordPiEvent(record, {
490
+ includeContent: config.otel?.includeContent === true,
491
+ surface: "agent",
492
+ workflowName: config.telemetry?.workflowName,
493
+ phaseName: config.telemetry?.phaseName,
494
+ model,
495
+ });
496
+ if (!notifiedSessionId && ctx.onSessionId && record.type === "session" && typeof record.id === "string") {
497
+ notifiedSessionId = true;
498
+ ctx.onSessionId(record.id);
499
+ }
500
+ },
501
+ });
502
+ }
503
+ catch (err) {
504
+ const msg = err instanceof Error ? err.message : String(err);
505
+ const durationMs = Date.now() - startTime;
506
+ recordError("agent", err, { "sandbox.backend": "smol", model, success: false, stop_reason: "error_sandbox", "workflow.name": config.telemetry?.workflowName, "phase.name": config.telemetry?.phaseName });
507
+ recordExecutionMetrics("agent", { "sandbox.backend": "smol", model, success: false, stop_reason: "error_sandbox", durationMs });
508
+ const fallbackId = `exec-${basename(ctx.taskId)}`;
509
+ const synthesizedId = await shim
510
+ .finalizeWithFallback(emptyResult("error_sandbox", durationMs), fallbackId, msg)
511
+ .catch(() => null);
512
+ harvestArtifactsOut(artifacts);
513
+ await sandbox.destroy(ctx.taskId);
514
+ return {
515
+ success: false,
516
+ output: "",
517
+ turns: 0,
518
+ error: msg,
519
+ durationMs,
520
+ sessionId: synthesizedId ?? undefined,
521
+ stopReason: "error_sandbox",
522
+ };
523
+ }
524
+ harvestArtifactsOut(artifacts);
525
+ await sandbox.destroy(ctx.taskId);
526
+ const finalResult = await finalizeFromRunResult(acc.build(0), prompt, shim, startTime, acc.extensions(), acc.skills(), acc.toolError(), acc.endedOnToolCall());
527
+ recordExecutionMetrics("agent", {
528
+ "sandbox.backend": "smol",
529
+ model,
530
+ success: finalResult.success,
531
+ stop_reason: finalResult.stopReason,
532
+ durationMs: finalResult.durationMs,
533
+ costUsd: finalResult.costUsd,
534
+ inputTokens: finalResult.inputTokens,
535
+ outputTokens: finalResult.outputTokens,
536
+ "workflow.name": config.telemetry?.workflowName,
537
+ "phase.name": config.telemetry?.phaseName,
538
+ });
539
+ return finalResult;
540
+ }
541
+ //# sourceMappingURL=backends.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backends.js","sourceRoot":"","sources":["../../../src/engine/executors/backends.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAGnC,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GAIjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MA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