dev3000 0.0.188 → 0.0.191
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.
- package/README.md +84 -12
- package/dist/cdp-monitor.d.ts +10 -0
- package/dist/cdp-monitor.d.ts.map +1 -1
- package/dist/cdp-monitor.js +28 -4
- package/dist/cdp-monitor.js.map +1 -1
- package/dist/runtime/bridge.d.ts +2 -0
- package/dist/runtime/bridge.d.ts.map +1 -1
- package/dist/runtime/bridge.js +74 -0
- package/dist/runtime/bridge.js.map +1 -1
- package/dist/runtime/browser-events.d.ts +3 -2
- package/dist/runtime/browser-events.d.ts.map +1 -1
- package/dist/runtime/browser-events.js +11 -53
- package/dist/runtime/browser-events.js.map +1 -1
- package/dist/runtime/browser-metrics.d.ts +147 -0
- package/dist/runtime/browser-metrics.d.ts.map +1 -0
- package/dist/runtime/browser-metrics.js +243 -0
- package/dist/runtime/browser-metrics.js.map +1 -0
- package/dist/runtime/chrome-isolation.d.ts +3 -2
- package/dist/runtime/chrome-isolation.d.ts.map +1 -1
- package/dist/runtime/chrome-isolation.js +23 -35
- package/dist/runtime/chrome-isolation.js.map +1 -1
- package/dist/runtime/cli.js +63 -2
- package/dist/runtime/cli.js.map +1 -1
- package/dist/runtime/desktop-mcp.d.ts +216 -0
- package/dist/runtime/desktop-mcp.d.ts.map +1 -0
- package/dist/runtime/desktop-mcp.js +258 -0
- package/dist/runtime/desktop-mcp.js.map +1 -0
- package/dist/runtime/git-identity.d.ts +17 -0
- package/dist/runtime/git-identity.d.ts.map +1 -0
- package/dist/runtime/git-identity.js +41 -0
- package/dist/runtime/git-identity.js.map +1 -0
- package/dist/runtime/github-publish.d.ts +31 -0
- package/dist/runtime/github-publish.d.ts.map +1 -0
- package/dist/runtime/github-publish.js +237 -0
- package/dist/runtime/github-publish.js.map +1 -0
- package/dist/runtime/harness.d.ts +14 -3
- package/dist/runtime/harness.d.ts.map +1 -1
- package/dist/runtime/harness.js +55 -7
- package/dist/runtime/harness.js.map +1 -1
- package/dist/runtime/mcp-stdio.d.ts +17 -0
- package/dist/runtime/mcp-stdio.d.ts.map +1 -0
- package/dist/runtime/mcp-stdio.js +99 -0
- package/dist/runtime/mcp-stdio.js.map +1 -0
- package/dist/runtime/network-evidence.d.ts +28 -0
- package/dist/runtime/network-evidence.d.ts.map +1 -0
- package/dist/runtime/network-evidence.js +291 -0
- package/dist/runtime/network-evidence.js.map +1 -0
- package/dist/runtime/runtime.d.ts +4 -0
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +48 -17
- package/dist/runtime/runtime.js.map +1 -1
- package/dist/runtime/sandbox-agent.d.ts +5 -0
- package/dist/runtime/sandbox-agent.d.ts.map +1 -1
- package/dist/runtime/sandbox-agent.js +32 -0
- package/dist/runtime/sandbox-agent.js.map +1 -1
- package/dist/runtime/sandbox-cleanup.d.ts +14 -0
- package/dist/runtime/sandbox-cleanup.d.ts.map +1 -0
- package/dist/runtime/sandbox-cleanup.js +49 -0
- package/dist/runtime/sandbox-cleanup.js.map +1 -0
- package/dist/runtime/sandbox-command.d.ts +1 -0
- package/dist/runtime/sandbox-command.d.ts.map +1 -1
- package/dist/runtime/sandbox-command.js +38 -8
- package/dist/runtime/sandbox-command.js.map +1 -1
- package/dist/runtime/sandbox-context.d.ts +5 -0
- package/dist/runtime/sandbox-context.d.ts.map +1 -0
- package/dist/runtime/sandbox-context.js +42 -0
- package/dist/runtime/sandbox-context.js.map +1 -0
- package/dist/runtime/sandbox-fx-resume.d.ts +11 -0
- package/dist/runtime/sandbox-fx-resume.d.ts.map +1 -0
- package/dist/runtime/sandbox-fx-resume.js +45 -0
- package/dist/runtime/sandbox-fx-resume.js.map +1 -0
- package/dist/runtime/sandbox-gateway.d.ts +17 -0
- package/dist/runtime/sandbox-gateway.d.ts.map +1 -0
- package/dist/runtime/sandbox-gateway.js +34 -0
- package/dist/runtime/sandbox-gateway.js.map +1 -0
- package/dist/runtime/sandbox-github.d.ts +10 -0
- package/dist/runtime/sandbox-github.d.ts.map +1 -0
- package/dist/runtime/sandbox-github.js +35 -0
- package/dist/runtime/sandbox-github.js.map +1 -0
- package/dist/runtime/sandbox-local-harness.d.ts +34 -0
- package/dist/runtime/sandbox-local-harness.d.ts.map +1 -0
- package/dist/runtime/sandbox-local-harness.js +138 -0
- package/dist/runtime/sandbox-local-harness.js.map +1 -0
- package/dist/runtime/sandbox-preview.d.ts +14 -0
- package/dist/runtime/sandbox-preview.d.ts.map +1 -0
- package/dist/runtime/sandbox-preview.js +96 -0
- package/dist/runtime/sandbox-preview.js.map +1 -0
- package/dist/runtime/sandbox-process.d.ts +11 -0
- package/dist/runtime/sandbox-process.d.ts.map +1 -0
- package/dist/runtime/sandbox-process.js +77 -0
- package/dist/runtime/sandbox-process.js.map +1 -0
- package/dist/runtime/sandbox-proxy.d.ts +2 -0
- package/dist/runtime/sandbox-proxy.d.ts.map +1 -1
- package/dist/runtime/sandbox-proxy.js +75 -20
- package/dist/runtime/sandbox-proxy.js.map +1 -1
- package/dist/runtime/sandbox-recovery.d.ts +4 -0
- package/dist/runtime/sandbox-recovery.d.ts.map +1 -0
- package/dist/runtime/sandbox-recovery.js +36 -0
- package/dist/runtime/sandbox-recovery.js.map +1 -0
- package/dist/runtime/sandbox-sessions.d.ts +8 -1
- package/dist/runtime/sandbox-sessions.d.ts.map +1 -1
- package/dist/runtime/sandbox-sessions.js +20 -2
- package/dist/runtime/sandbox-sessions.js.map +1 -1
- package/dist/runtime/sandbox-setup.d.ts +4 -0
- package/dist/runtime/sandbox-setup.d.ts.map +1 -0
- package/dist/runtime/sandbox-setup.js +56 -0
- package/dist/runtime/sandbox-setup.js.map +1 -0
- package/dist/runtime/sandbox-shell.d.ts +27 -0
- package/dist/runtime/sandbox-shell.d.ts.map +1 -0
- package/dist/runtime/sandbox-shell.js +169 -0
- package/dist/runtime/sandbox-shell.js.map +1 -0
- package/dist/runtime/sandbox-watch.d.ts +11 -0
- package/dist/runtime/sandbox-watch.d.ts.map +1 -0
- package/dist/runtime/sandbox-watch.js +30 -0
- package/dist/runtime/sandbox-watch.js.map +1 -0
- package/dist/runtime/sandbox-workspace.d.ts +125 -0
- package/dist/runtime/sandbox-workspace.d.ts.map +1 -0
- package/dist/runtime/sandbox-workspace.js +205 -0
- package/dist/runtime/sandbox-workspace.js.map +1 -0
- package/dist/runtime/sandbox.d.ts +21 -2
- package/dist/runtime/sandbox.d.ts.map +1 -1
- package/dist/runtime/sandbox.js +435 -198
- package/dist/runtime/sandbox.js.map +1 -1
- package/dist/runtime/session.d.ts +1 -1
- package/dist/runtime/session.d.ts.map +1 -1
- package/dist/runtime/session.js +3 -3
- package/dist/runtime/session.js.map +1 -1
- package/dist/runtime/terminal.d.ts +19 -0
- package/dist/runtime/terminal.d.ts.map +1 -0
- package/dist/runtime/terminal.js +60 -0
- package/dist/runtime/terminal.js.map +1 -0
- package/dist/runtime/workspace-client.d.ts +2 -0
- package/dist/runtime/workspace-client.d.ts.map +1 -0
- package/dist/runtime/workspace-client.js +42 -0
- package/dist/runtime/workspace-client.js.map +1 -0
- package/package.json +2 -1
- package/scripts/eve/README.md +341 -0
- package/scripts/eve/agent/agent.ts +12 -0
- package/scripts/eve/agent/channels/eve.ts +23 -0
- package/scripts/eve/agent/instructions.md +53 -0
- package/scripts/eve/agent/sandbox.ts +34 -0
- package/scripts/eve/build-cache.mjs +18 -0
- package/scripts/eve/build-cache.test.mjs +32 -0
- package/scripts/eve/client.mjs +229 -0
- package/scripts/eve/connection.mjs +89 -0
- package/scripts/eve/conversation.mjs +91 -0
- package/scripts/eve/conversation.test.mjs +113 -0
- package/scripts/eve/fixture-agent.ts +101 -0
- package/scripts/eve/images.mjs +84 -0
- package/scripts/eve/launch.mjs +277 -0
- package/scripts/eve/model-command.mjs +21 -0
- package/scripts/eve/reconnect.mjs +22 -0
- package/scripts/eve/reconnect.test.mjs +41 -0
- package/scripts/eve/settings.mjs +33 -0
- package/scripts/eve/supervisor.mjs +41 -0
- package/scripts/eve/tui-client.mjs +234 -0
- package/scripts/eve/tui-input.mjs +114 -0
- package/scripts/eve/verify.mjs +575 -0
- package/skills/d3k/SKILL.md +48 -5
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
import assert from "node:assert/strict"
|
|
2
|
+
import { spawn } from "node:child_process"
|
|
3
|
+
import { randomBytes } from "node:crypto"
|
|
4
|
+
import { cp, mkdir, mkdtemp, readFile, rm, symlink, writeFile } from "node:fs/promises"
|
|
5
|
+
import { createServer } from "node:net"
|
|
6
|
+
import { tmpdir } from "node:os"
|
|
7
|
+
import { dirname, join } from "node:path"
|
|
8
|
+
import { setTimeout as delay } from "node:timers/promises"
|
|
9
|
+
import { fileURLToPath, pathToFileURL } from "node:url"
|
|
10
|
+
import { eveClient, imageAttachment, pendingInteractions } from "./client.mjs"
|
|
11
|
+
import { connect } from "./connection.mjs"
|
|
12
|
+
import { openEveConversation, saveEveConversationScript } from "./conversation.mjs"
|
|
13
|
+
import { EVE_INSTALL_CONFIG, EVE_MODEL, EVE_VERSION, MODEL_HEADER } from "./settings.mjs"
|
|
14
|
+
|
|
15
|
+
const source = dirname(fileURLToPath(import.meta.url))
|
|
16
|
+
const root = await mkdtemp(join(tmpdir(), "d3k-eve-proof-"))
|
|
17
|
+
const workspace = join(root, "checkout")
|
|
18
|
+
const token = randomBytes(32).toString("hex")
|
|
19
|
+
let server
|
|
20
|
+
const output = []
|
|
21
|
+
const env = {
|
|
22
|
+
...process.env,
|
|
23
|
+
D3K_EVE_WORKDIR: workspace,
|
|
24
|
+
D3K_EVE_MODEL_ID: EVE_MODEL,
|
|
25
|
+
// The fixture is deliberately allowed to operate on its temporary local checkout.
|
|
26
|
+
D3K_EVE_ISOLATED_HOST: "1",
|
|
27
|
+
D3K_EVE_TOKEN: token,
|
|
28
|
+
D3K_EVE_EXPIRES_AT: String(Date.now() + 10 * 60000),
|
|
29
|
+
EVE_SCHEDULES_DISABLED: "1"
|
|
30
|
+
}
|
|
31
|
+
for (const key of ["AI_GATEWAY_API_KEY", "VERCEL_TOKEN", "VERCEL_AUTH_TOKEN", "VERCEL_OIDC_TOKEN"]) delete env[key]
|
|
32
|
+
|
|
33
|
+
async function run(command, args, options = {}) {
|
|
34
|
+
const child = spawn(command, args, { cwd: root, env, stdio: ["ignore", "pipe", "pipe"], ...options })
|
|
35
|
+
let text = ""
|
|
36
|
+
child.stdout?.on("data", (chunk) => {
|
|
37
|
+
text += chunk
|
|
38
|
+
})
|
|
39
|
+
child.stderr?.on("data", (chunk) => {
|
|
40
|
+
text += chunk
|
|
41
|
+
})
|
|
42
|
+
const timer = setTimeout(() => child.kill("SIGKILL"), 120000)
|
|
43
|
+
try {
|
|
44
|
+
await new Promise((resolve, reject) => {
|
|
45
|
+
child.once("error", reject)
|
|
46
|
+
child.once("exit", (code) =>
|
|
47
|
+
code === 0 ? resolve() : reject(new Error(`${command} failed (${code}): ${text.slice(-4000)}`))
|
|
48
|
+
)
|
|
49
|
+
})
|
|
50
|
+
return text
|
|
51
|
+
} finally {
|
|
52
|
+
clearTimeout(timer)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function stopServer() {
|
|
57
|
+
if (!server || server.exitCode !== null) return
|
|
58
|
+
const stopped = new Promise((resolve) => server.once("exit", resolve))
|
|
59
|
+
// eve start supervises a child; terminate the entire fixture process group.
|
|
60
|
+
process.kill(-server.pid, "SIGTERM")
|
|
61
|
+
await Promise.race([stopped, delay(5000)])
|
|
62
|
+
try {
|
|
63
|
+
process.kill(-server.pid, "SIGKILL")
|
|
64
|
+
} catch (error) {
|
|
65
|
+
if (error.code !== "ESRCH") throw error
|
|
66
|
+
}
|
|
67
|
+
server = undefined
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
try {
|
|
71
|
+
await mkdir(workspace)
|
|
72
|
+
await cp(join(source, "agent"), join(root, "agent"), { recursive: true })
|
|
73
|
+
// Use the launcher's shared connected-session skill, generated from source.
|
|
74
|
+
const connected = await run("bun", [
|
|
75
|
+
"-e",
|
|
76
|
+
`
|
|
77
|
+
import {harnessStartupContext} from ${JSON.stringify(join(source, "../../src/runtime/harness.ts"))};
|
|
78
|
+
console.log(harnessStartupContext(${JSON.stringify({ workdir: workspace, appUrl: "https://fixture.d3k.localhost" })}));
|
|
79
|
+
`
|
|
80
|
+
])
|
|
81
|
+
const instructionsFile = join(root, "agent/instructions.md")
|
|
82
|
+
await writeFile(instructionsFile, `${await readFile(instructionsFile, "utf8")}\n\n${connected}`)
|
|
83
|
+
await cp(join(source, "connection.mjs"), join(root, "connection.mjs"))
|
|
84
|
+
await cp(join(source, "settings.mjs"), join(root, "settings.mjs"))
|
|
85
|
+
await writeFile(
|
|
86
|
+
join(root, "package.json"),
|
|
87
|
+
JSON.stringify({
|
|
88
|
+
private: true,
|
|
89
|
+
type: "module",
|
|
90
|
+
engines: { node: ">=24" },
|
|
91
|
+
dependencies: { eve: EVE_VERSION, ai: "7.0.159", zod: "4.6.7" }
|
|
92
|
+
})
|
|
93
|
+
)
|
|
94
|
+
if (process.env.D3K_EVE_PACKAGE_ROOT) {
|
|
95
|
+
await symlink(dirname(process.env.D3K_EVE_PACKAGE_ROOT), join(root, "node_modules"))
|
|
96
|
+
} else {
|
|
97
|
+
console.log("Installing pinned Eve fixture dependencies in a temporary directory…")
|
|
98
|
+
await writeFile(join(root, "bunfig.toml"), EVE_INSTALL_CONFIG)
|
|
99
|
+
await run("bun", ["add", "--exact", `eve@${EVE_VERSION}`, "ai@7.0.159", "zod@4.6.7"])
|
|
100
|
+
process.env.D3K_EVE_PACKAGE_ROOT = join(root, "node_modules/eve")
|
|
101
|
+
}
|
|
102
|
+
const { version } = JSON.parse(await readFile(join(root, "node_modules/eve/package.json"), "utf8"))
|
|
103
|
+
assert.equal(version, EVE_VERSION, "Revalidate the contract before upgrading Eve")
|
|
104
|
+
const eve = join(root, "node_modules/eve/bin/eve.js")
|
|
105
|
+
console.log("Checking the real-agent scaffold builds without model credentials…")
|
|
106
|
+
await run(process.execPath, [eve, "build"])
|
|
107
|
+
await cp(join(source, "fixture-agent.ts"), join(root, "agent/agent.ts"))
|
|
108
|
+
console.log("Building the real Eve service with the existing-checkout provider…")
|
|
109
|
+
await run(process.execPath, [eve, "build"])
|
|
110
|
+
const portServer = createServer()
|
|
111
|
+
await new Promise((resolve) => portServer.listen(0, "127.0.0.1", resolve))
|
|
112
|
+
const port = portServer.address().port
|
|
113
|
+
await new Promise((resolve) => portServer.close(resolve))
|
|
114
|
+
const baseUrl = `http://127.0.0.1:${port}`
|
|
115
|
+
async function startServer() {
|
|
116
|
+
server = spawn(process.execPath, [eve, "start", "--host", "127.0.0.1", "--port", String(port), "--no-schedules"], {
|
|
117
|
+
cwd: root,
|
|
118
|
+
env,
|
|
119
|
+
detached: true,
|
|
120
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
121
|
+
})
|
|
122
|
+
server.stdout.on("data", (chunk) => output.push(chunk.toString()))
|
|
123
|
+
server.stderr.on("data", (chunk) => output.push(chunk.toString()))
|
|
124
|
+
for (let attempt = 0; attempt < 100; attempt++) {
|
|
125
|
+
if (
|
|
126
|
+
await fetch(`${baseUrl}/eve/v1/health`)
|
|
127
|
+
.then((response) => response.ok)
|
|
128
|
+
.catch(() => false)
|
|
129
|
+
)
|
|
130
|
+
return
|
|
131
|
+
if (server.exitCode !== null) throw new Error(output.join("").slice(-5000))
|
|
132
|
+
await delay(100)
|
|
133
|
+
}
|
|
134
|
+
throw new Error("Eve service did not become healthy")
|
|
135
|
+
}
|
|
136
|
+
await startServer()
|
|
137
|
+
const { Client, SessionStore } = await eveClient()
|
|
138
|
+
const client = new Client({ baseUrl, auth: { bearer: token } })
|
|
139
|
+
const request = {
|
|
140
|
+
method: "POST",
|
|
141
|
+
headers: { "content-type": "application/json" },
|
|
142
|
+
body: JSON.stringify({ message: "denied" })
|
|
143
|
+
}
|
|
144
|
+
assert.equal((await fetch(`${baseUrl}/eve/v1/session`, request)).status, 401)
|
|
145
|
+
console.log("PASS: unauthenticated session creation rejected")
|
|
146
|
+
|
|
147
|
+
const context = await client.sessions.create({ message: "context-case" })
|
|
148
|
+
const contextResult = await context.delivery.result({ signal: AbortSignal.timeout(20000) })
|
|
149
|
+
assert.equal(contextResult.status, "completed")
|
|
150
|
+
assert.equal(contextResult.reply, "CONTEXT_READY")
|
|
151
|
+
console.log(
|
|
152
|
+
"PASS: Eve's model receives the shared d3k skill, exact remote checkout/URL, and UI verification instructions"
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
// A real separate client process exits while the tool is running.
|
|
156
|
+
const detachCode = `
|
|
157
|
+
import {Client} from ${JSON.stringify(pathToFileURL(join(root, "node_modules/eve/dist/src/client/index.js")).href)};
|
|
158
|
+
const client=new Client({baseUrl:process.env.PROOF_URL,auth:{bearer:process.env.D3K_EVE_TOKEN}});
|
|
159
|
+
const {session}=await client.sessions.create({message:'disconnect-case'});
|
|
160
|
+
const signal=new AbortController();
|
|
161
|
+
for await(const event of session.stream({signal:signal.signal})) {
|
|
162
|
+
if(event.type==='call.started') { console.log(session.id);signal.abort();break; }
|
|
163
|
+
}
|
|
164
|
+
`
|
|
165
|
+
const sessionId = (
|
|
166
|
+
await run(process.execPath, ["--input-type=module", "-e", detachCode], { env: { ...env, PROOF_URL: baseUrl } })
|
|
167
|
+
).trim()
|
|
168
|
+
assert.ok(sessionId.startsWith("wrun_"))
|
|
169
|
+
// There is no client observing this period. Poll the filesystem, not the session stream.
|
|
170
|
+
for (let attempt = 0; attempt < 100; attempt++) {
|
|
171
|
+
if ((await readFile(join(workspace, "proof.txt"), "utf8").catch(() => "")) === "completed") break
|
|
172
|
+
await delay(100)
|
|
173
|
+
}
|
|
174
|
+
assert.equal(await readFile(join(workspace, "proof.txt"), "utf8"), "completed")
|
|
175
|
+
const store = new SessionStore({ client, initialSession: { sessionId, streamIndex: 0 } })
|
|
176
|
+
const release = store.observe()
|
|
177
|
+
try {
|
|
178
|
+
await store.resume()
|
|
179
|
+
assert.equal(store.snapshot.session.sessionId, sessionId)
|
|
180
|
+
assert.equal(store.snapshot.events.filter((event) => event.type === "delivery.admitted").length, 1)
|
|
181
|
+
assert.ok(store.snapshot.messages.some((message) => message.role === "assistant"))
|
|
182
|
+
// No unauthenticated history reads or continuation, either.
|
|
183
|
+
for (const [method, suffix] of [
|
|
184
|
+
["GET", "/stream"],
|
|
185
|
+
["POST", ""]
|
|
186
|
+
])
|
|
187
|
+
assert.equal(
|
|
188
|
+
(
|
|
189
|
+
await fetch(`${baseUrl}/eve/v1/session/${sessionId}${suffix}`, {
|
|
190
|
+
...request,
|
|
191
|
+
method,
|
|
192
|
+
body: method === "GET" ? undefined : request.body
|
|
193
|
+
})
|
|
194
|
+
).status,
|
|
195
|
+
401
|
|
196
|
+
)
|
|
197
|
+
} finally {
|
|
198
|
+
release()
|
|
199
|
+
}
|
|
200
|
+
console.log("PASS: command finished after client exit; same conversation replayed with one admitted prompt")
|
|
201
|
+
|
|
202
|
+
const savedConversationFile = join(root, ".d3k-conversation.json")
|
|
203
|
+
const remembered = await openEveConversation({
|
|
204
|
+
client,
|
|
205
|
+
owner: "fixture",
|
|
206
|
+
workdir: workspace,
|
|
207
|
+
save: async (state) => {
|
|
208
|
+
await run(process.execPath, ["-e", saveEveConversationScript, root, JSON.stringify(state)])
|
|
209
|
+
}
|
|
210
|
+
})
|
|
211
|
+
const remember = await remembered.send("remember-case: keep the Education rewrite in mind")
|
|
212
|
+
assert.equal((await remember.result({ signal: AbortSignal.timeout(20000) })).reply, "HISTORY_PRESENT")
|
|
213
|
+
// A full launcher exit stops the service. Rebuild too, as a CLI upgrade would.
|
|
214
|
+
await stopServer()
|
|
215
|
+
await run(process.execPath, [eve, "build"])
|
|
216
|
+
await startServer()
|
|
217
|
+
const savedConversation = JSON.parse(await readFile(savedConversationFile, "utf8"))
|
|
218
|
+
const reopened = await openEveConversation({
|
|
219
|
+
client: new Client({ baseUrl, auth: { bearer: token } }),
|
|
220
|
+
state: savedConversation,
|
|
221
|
+
owner: "fixture",
|
|
222
|
+
workdir: workspace,
|
|
223
|
+
save: () => {
|
|
224
|
+
throw new Error("Resume must not create a conversation")
|
|
225
|
+
},
|
|
226
|
+
signal: AbortSignal.timeout(20000)
|
|
227
|
+
})
|
|
228
|
+
assert.equal(reopened.id, remembered.id)
|
|
229
|
+
const recall = await reopened.send("recall-case: what were we working on?")
|
|
230
|
+
assert.equal((await recall.result({ signal: AbortSignal.timeout(20000) })).reply, "HISTORY_PRESENT")
|
|
231
|
+
const emptyRecall = await client.sessions.create({ message: "recall-case: what were we working on?" })
|
|
232
|
+
assert.equal((await emptyRecall.delivery.result({ signal: AbortSignal.timeout(20000) })).reply, "HISTORY_MISSING")
|
|
233
|
+
console.log("PASS: saved conversation survived service stop, rebuild and restart; model sees earlier history")
|
|
234
|
+
|
|
235
|
+
const approval = await client.sessions.create({ message: "approval-case" })
|
|
236
|
+
const waiting = await approval.delivery.result({ signal: AbortSignal.timeout(20000) })
|
|
237
|
+
assert.equal(waiting.status, "awaiting-input")
|
|
238
|
+
const waitingId = approval.session.id
|
|
239
|
+
assert.equal(await readFile(join(workspace, "approval.txt"), "utf8").catch(() => "missing"), "missing")
|
|
240
|
+
if (process.env.D3K_EVE_TEST_RESTART === "1") {
|
|
241
|
+
await stopServer()
|
|
242
|
+
await startServer()
|
|
243
|
+
console.log("Replaying the pending approval after server restart…")
|
|
244
|
+
}
|
|
245
|
+
const resumed = new SessionStore({ client, initialSession: { sessionId: waitingId, streamIndex: 0 } })
|
|
246
|
+
const releaseApproval = resumed.observe()
|
|
247
|
+
try {
|
|
248
|
+
await resumed.resume()
|
|
249
|
+
const pending = pendingInteractions(resumed.snapshot)
|
|
250
|
+
assert.equal(pending.length, 1)
|
|
251
|
+
assert.equal(pending[0].request.kind, "approval")
|
|
252
|
+
const approve = pending[0].request.options.find((option) => option.id === "approve")
|
|
253
|
+
assert.ok(approve)
|
|
254
|
+
const accepted = await resumed.send({
|
|
255
|
+
answers: [{ interactionId: pending[0].interactionId, optionId: approve.id }]
|
|
256
|
+
})
|
|
257
|
+
console.log("Approval answer accepted; waiting for the tool…")
|
|
258
|
+
assert.equal((await accepted.result({ signal: AbortSignal.timeout(60000) })).status, "completed")
|
|
259
|
+
assert.equal(await readFile(join(workspace, "approval.txt"), "utf8"), "approved")
|
|
260
|
+
} finally {
|
|
261
|
+
releaseApproval()
|
|
262
|
+
}
|
|
263
|
+
console.log("PASS: new client recovered the pending approval; answering ran its tool once")
|
|
264
|
+
|
|
265
|
+
const imagePath = join(root, "pixel.png")
|
|
266
|
+
const png = Buffer.from(
|
|
267
|
+
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+jRZkAAAAASUVORK5CYII=",
|
|
268
|
+
"base64"
|
|
269
|
+
)
|
|
270
|
+
await writeFile(imagePath, png)
|
|
271
|
+
const image = await client.sessions.create({
|
|
272
|
+
message: [{ type: "text", text: "Inspect this local image" }, await imageAttachment(imagePath)]
|
|
273
|
+
})
|
|
274
|
+
const imageResult = await image.delivery.result({ signal: AbortSignal.timeout(20000) })
|
|
275
|
+
assert.equal(imageResult.status, "completed")
|
|
276
|
+
assert.match(imageResult.reply, /IMAGE_RECEIVED/)
|
|
277
|
+
console.log("PASS: local PNG uploaded and reached Eve's model as image content")
|
|
278
|
+
|
|
279
|
+
const terminal = spawn(process.execPath, [join(source, "client.mjs"), "--session", image.session.id], {
|
|
280
|
+
cwd: root,
|
|
281
|
+
env: { ...env, D3K_EVE_URL: baseUrl, D3K_EVE_PACKAGE_ROOT: process.env.D3K_EVE_PACKAGE_ROOT },
|
|
282
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
283
|
+
})
|
|
284
|
+
let terminalOutput = ""
|
|
285
|
+
terminal.stdout.on("data", (chunk) => {
|
|
286
|
+
terminalOutput += chunk
|
|
287
|
+
})
|
|
288
|
+
terminal.stderr.on("data", (chunk) => {
|
|
289
|
+
terminalOutput += chunk
|
|
290
|
+
})
|
|
291
|
+
const terminalExited = new Promise((resolve) => terminal.once("exit", resolve))
|
|
292
|
+
async function terminalShows(predicate) {
|
|
293
|
+
for (let attempt = 0; attempt < 200; attempt++) {
|
|
294
|
+
if (predicate(terminalOutput)) return
|
|
295
|
+
if (terminal.exitCode !== null) break
|
|
296
|
+
await delay(50)
|
|
297
|
+
}
|
|
298
|
+
throw new Error(`Local client did not reach the expected state: ${terminalOutput.slice(-3000)}`)
|
|
299
|
+
}
|
|
300
|
+
try {
|
|
301
|
+
await terminalShows((text) => text.includes("eve> "))
|
|
302
|
+
terminal.stdin.write("/model\n")
|
|
303
|
+
await terminalShows((text) => text.includes(`Configured model: ${EVE_MODEL}`))
|
|
304
|
+
terminal.stdin.write(`/attach ${imagePath}\nInspect this second image\n`)
|
|
305
|
+
await terminalShows((text) => text.split("IMAGE_RECEIVED").length >= 3)
|
|
306
|
+
terminal.stdin.write("/detach\n")
|
|
307
|
+
assert.equal(await Promise.race([terminalExited, delay(5000).then(() => "timeout")]), 0)
|
|
308
|
+
const history = await image.session.snapshot()
|
|
309
|
+
assert.equal(history.events.filter((event) => event.type === "delivery.admitted").length, 2)
|
|
310
|
+
} finally {
|
|
311
|
+
terminal.stdin.end()
|
|
312
|
+
if (terminal.exitCode === null) terminal.kill("SIGKILL")
|
|
313
|
+
}
|
|
314
|
+
console.log("PASS: local terminal reattached, uploaded an image, and detached without a new conversation")
|
|
315
|
+
|
|
316
|
+
// Exercise readline's real terminal key parser without reading or changing the
|
|
317
|
+
// user's clipboard. A delayed synthetic clipboard also checks paste/Enter order.
|
|
318
|
+
const keyboard = await client.sessions.create()
|
|
319
|
+
const keyboardCode = `
|
|
320
|
+
import {runClient,imageAttachment} from ${JSON.stringify(pathToFileURL(join(source, "client.mjs")).href)};
|
|
321
|
+
Object.defineProperty(process.stdin,'isTTY',{value:true});
|
|
322
|
+
Object.defineProperty(process.stdout,'isTTY',{value:true});
|
|
323
|
+
await runClient({baseUrl:process.env.PROOF_URL,token:process.env.D3K_EVE_TOKEN,sessionId:process.env.PROOF_SESSION,
|
|
324
|
+
readClipboard:async()=>{await new Promise(resolve=>setTimeout(resolve,100));return imageAttachment(process.env.PROOF_IMAGE);}});
|
|
325
|
+
`
|
|
326
|
+
const keyboardTerminal = spawn(process.execPath, ["--input-type=module", "-e", keyboardCode], {
|
|
327
|
+
cwd: root,
|
|
328
|
+
env: {
|
|
329
|
+
...env,
|
|
330
|
+
D3K_EVE_PACKAGE_ROOT: process.env.D3K_EVE_PACKAGE_ROOT,
|
|
331
|
+
D3K_EVE_PLAIN_CLIENT: "1",
|
|
332
|
+
PROOF_URL: baseUrl,
|
|
333
|
+
PROOF_SESSION: keyboard.session.id,
|
|
334
|
+
PROOF_IMAGE: imagePath
|
|
335
|
+
},
|
|
336
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
337
|
+
})
|
|
338
|
+
let keyboardOutput = ""
|
|
339
|
+
keyboardTerminal.stdout.on("data", (chunk) => {
|
|
340
|
+
keyboardOutput += chunk
|
|
341
|
+
})
|
|
342
|
+
keyboardTerminal.stderr.on("data", (chunk) => {
|
|
343
|
+
keyboardOutput += chunk
|
|
344
|
+
})
|
|
345
|
+
const keyboardExited = new Promise((resolve) => keyboardTerminal.once("exit", resolve))
|
|
346
|
+
async function keyboardShows(text) {
|
|
347
|
+
for (let attempt = 0; attempt < 200; attempt++) {
|
|
348
|
+
if (keyboardOutput.includes(text)) return
|
|
349
|
+
if (keyboardTerminal.exitCode !== null) break
|
|
350
|
+
await delay(50)
|
|
351
|
+
}
|
|
352
|
+
throw new Error(`Keyboard paste did not reach ${text}: ${keyboardOutput.slice(-3000)}`)
|
|
353
|
+
}
|
|
354
|
+
try {
|
|
355
|
+
await keyboardShows("eve> ")
|
|
356
|
+
// Draft text exists before the paste, and Enter arrives before clipboard read completes.
|
|
357
|
+
keyboardTerminal.stdin.write("Inspect this \u0016keyboard image\r")
|
|
358
|
+
await keyboardShows("Attached pixel.png")
|
|
359
|
+
await keyboardShows("IMAGE_RECEIVED")
|
|
360
|
+
keyboardTerminal.stdin.write("/detach\r")
|
|
361
|
+
assert.equal(await Promise.race([keyboardExited, delay(5000).then(() => "timeout")]), 0)
|
|
362
|
+
const keyboardStore = new SessionStore({
|
|
363
|
+
client,
|
|
364
|
+
initialSession: { sessionId: keyboard.session.id, streamIndex: 0 }
|
|
365
|
+
})
|
|
366
|
+
const releaseKeyboard = keyboardStore.observe()
|
|
367
|
+
try {
|
|
368
|
+
await keyboardStore.resume()
|
|
369
|
+
assert.equal(keyboardStore.snapshot.events.filter((event) => event.type === "delivery.admitted").length, 1)
|
|
370
|
+
const draft = keyboardStore.snapshot.messages.find((message) => message.role === "user")
|
|
371
|
+
assert.equal(draft.parts.find((part) => part.type === "text").text.split("\n")[0], "Inspect this keyboard image")
|
|
372
|
+
} finally {
|
|
373
|
+
releaseKeyboard()
|
|
374
|
+
}
|
|
375
|
+
} finally {
|
|
376
|
+
keyboardTerminal.stdin.end()
|
|
377
|
+
if (keyboardTerminal.exitCode === null) keyboardTerminal.kill("SIGKILL")
|
|
378
|
+
}
|
|
379
|
+
console.log("PASS: Ctrl+V attached an image, preserved the draft, and included it when Enter arrived immediately")
|
|
380
|
+
|
|
381
|
+
// Run Eve's real renderer and key parser, with synthetic terminal/clipboard IO.
|
|
382
|
+
const cleanShotPath = join(root, "Application Support", "CleanShot 2026-11-05 at 09.52.33@2x.png")
|
|
383
|
+
await mkdir(dirname(cleanShotPath))
|
|
384
|
+
await writeFile(cleanShotPath, png)
|
|
385
|
+
const { imagePaths } = await import("./images.mjs")
|
|
386
|
+
const escapedPath = cleanShotPath.replaceAll(" ", "\\ ")
|
|
387
|
+
assert.equal(imagePaths(escapedPath)[0].path, cleanShotPath)
|
|
388
|
+
assert.equal(imagePaths(`"${cleanShotPath}"`)[0].path, cleanShotPath)
|
|
389
|
+
assert.equal(imagePaths(pathToFileURL(cleanShotPath).href)[0].path, cleanShotPath)
|
|
390
|
+
const nativeCode = `
|
|
391
|
+
import {runTuiClient} from ${JSON.stringify(pathToFileURL(join(source, "tui-client.mjs")).href)};
|
|
392
|
+
import {imageAttachment} from ${JSON.stringify(pathToFileURL(join(source, "client.mjs")).href)};
|
|
393
|
+
Object.defineProperty(process.stdin,'isTTY',{value:true});
|
|
394
|
+
Object.defineProperty(process.stdout,'isTTY',{value:true});
|
|
395
|
+
process.stdout.columns=100;process.stdout.rows=30;
|
|
396
|
+
await runTuiClient({baseUrl:process.env.PROOF_URL,token:process.env.D3K_EVE_TOKEN,sessionId:process.env.PROOF_SESSION,
|
|
397
|
+
signal:process.env.PROOF_EXPIRE_MS ? AbortSignal.timeout(Number(process.env.PROOF_EXPIRE_MS)) : undefined,
|
|
398
|
+
readClipboard:async()=>{await new Promise(resolve=>setTimeout(resolve,100));return imageAttachment(process.env.PROOF_IMAGE);}});
|
|
399
|
+
console.log('NATIVE_CLIENT_CLOSED');
|
|
400
|
+
`
|
|
401
|
+
async function nativeTerminal(sessionId, expireMs) {
|
|
402
|
+
const child = spawn(process.execPath, ["--input-type=module", "-e", nativeCode], {
|
|
403
|
+
cwd: root,
|
|
404
|
+
env: {
|
|
405
|
+
...env,
|
|
406
|
+
TERM: "xterm-256color",
|
|
407
|
+
D3K_EVE_PACKAGE_ROOT: process.env.D3K_EVE_PACKAGE_ROOT,
|
|
408
|
+
PROOF_URL: baseUrl,
|
|
409
|
+
PROOF_SESSION: sessionId,
|
|
410
|
+
...(expireMs ? { PROOF_EXPIRE_MS: String(expireMs) } : {}),
|
|
411
|
+
PROOF_IMAGE: imagePath
|
|
412
|
+
},
|
|
413
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
414
|
+
})
|
|
415
|
+
let output = ""
|
|
416
|
+
child.stdout.on("data", (chunk) => {
|
|
417
|
+
output += chunk
|
|
418
|
+
})
|
|
419
|
+
child.stderr.on("data", (chunk) => {
|
|
420
|
+
output += chunk
|
|
421
|
+
})
|
|
422
|
+
const exited = new Promise((resolve) => child.once("exit", resolve))
|
|
423
|
+
async function shows(text) {
|
|
424
|
+
for (let attempt = 0; attempt < 300; attempt++) {
|
|
425
|
+
if (output.includes(text)) return
|
|
426
|
+
if (child.exitCode !== null) break
|
|
427
|
+
await delay(50)
|
|
428
|
+
}
|
|
429
|
+
throw new Error(`Native Eve UI did not show ${text}: ${output.slice(-5000)}`)
|
|
430
|
+
}
|
|
431
|
+
return { child, shows, exited }
|
|
432
|
+
}
|
|
433
|
+
for (const mode of ["composer", "model picker"]) {
|
|
434
|
+
const { session } = await client.sessions.create()
|
|
435
|
+
const ui = await nativeTerminal(session.id, 2500)
|
|
436
|
+
try {
|
|
437
|
+
await ui.shows("Paste an image")
|
|
438
|
+
if (mode === "model picker") {
|
|
439
|
+
await delay(150)
|
|
440
|
+
ui.child.stdin.write("/model\r")
|
|
441
|
+
await ui.shows("Choose model")
|
|
442
|
+
}
|
|
443
|
+
assert.equal(await Promise.race([ui.exited, delay(5000).then(() => "timeout")]), 0)
|
|
444
|
+
await ui.shows("NATIVE_CLIENT_CLOSED")
|
|
445
|
+
const history = await session.snapshot()
|
|
446
|
+
assert.equal(history.events.filter((event) => event.type === "delivery.admitted").length, 0)
|
|
447
|
+
} finally {
|
|
448
|
+
if (ui.child.exitCode === null) ui.child.kill("SIGKILL")
|
|
449
|
+
}
|
|
450
|
+
console.log(`PASS: expiry closed native Eve's ${mode} without admitting any prompt`)
|
|
451
|
+
}
|
|
452
|
+
for (const paste of ["path", "clipboard", "unframed"]) {
|
|
453
|
+
const { session } = await client.sessions.create()
|
|
454
|
+
const ui = await nativeTerminal(session.id)
|
|
455
|
+
try {
|
|
456
|
+
await ui.shows("Paste an image")
|
|
457
|
+
await delay(150)
|
|
458
|
+
ui.child.stdin.write("/model current\r")
|
|
459
|
+
await ui.shows(`Configured model: ${EVE_MODEL}`)
|
|
460
|
+
await delay(50)
|
|
461
|
+
if (paste === "path") {
|
|
462
|
+
ui.child.stdin.write("Inspect this \x1b[20")
|
|
463
|
+
await delay(5)
|
|
464
|
+
ui.child.stdin.write(`0~${escapedPath}\x1b[201~`)
|
|
465
|
+
await ui.shows("[Image #1]")
|
|
466
|
+
ui.child.stdin.write("\r")
|
|
467
|
+
} else if (paste === "clipboard") {
|
|
468
|
+
ui.child.stdin.write("Inspect this \x16keyboard image\r")
|
|
469
|
+
} else {
|
|
470
|
+
ui.child.stdin.write(`Inspect this ${escapedPath}\r`)
|
|
471
|
+
}
|
|
472
|
+
await ui.shows("IMAGE_RECEIVED")
|
|
473
|
+
ui.child.stdin.write("/detach\r")
|
|
474
|
+
assert.equal(await Promise.race([ui.exited, delay(5000).then(() => "timeout")]), 0)
|
|
475
|
+
const replay = new SessionStore({ client, initialSession: { sessionId: session.id, streamIndex: 0 } })
|
|
476
|
+
const releaseReplay = replay.observe()
|
|
477
|
+
try {
|
|
478
|
+
await replay.resume()
|
|
479
|
+
assert.equal(replay.snapshot.events.filter((event) => event.type === "delivery.admitted").length, 1)
|
|
480
|
+
const message = replay.snapshot.messages.find((message) => message.role === "user")
|
|
481
|
+
const prompt = message.parts.find((part) => part.type === "text").text
|
|
482
|
+
assert.ok(prompt.includes("[Image #1]"))
|
|
483
|
+
assert.ok(!prompt.includes(root), "Laptop path must not reach the remote agent")
|
|
484
|
+
} finally {
|
|
485
|
+
releaseReplay()
|
|
486
|
+
}
|
|
487
|
+
// Reattach the native UI to the same conversation and see its prior result.
|
|
488
|
+
const reconnect = await nativeTerminal(session.id)
|
|
489
|
+
try {
|
|
490
|
+
await reconnect.shows("IMAGE_RECEIVED")
|
|
491
|
+
await delay(150)
|
|
492
|
+
reconnect.child.stdin.write("/detach\r")
|
|
493
|
+
assert.equal(await Promise.race([reconnect.exited, delay(5000).then(() => "timeout")]), 0)
|
|
494
|
+
} finally {
|
|
495
|
+
if (reconnect.child.exitCode === null) reconnect.child.kill("SIGKILL")
|
|
496
|
+
}
|
|
497
|
+
} finally {
|
|
498
|
+
if (ui.child.exitCode === null) ui.child.kill("SIGKILL")
|
|
499
|
+
}
|
|
500
|
+
console.log(
|
|
501
|
+
`PASS: native Eve UI ${paste} paste delivered image bytes, hid the laptop path, and replayed the same session`
|
|
502
|
+
)
|
|
503
|
+
}
|
|
504
|
+
// Switching is authenticated request metadata, never model-interpreted text.
|
|
505
|
+
const switched = await client.sessions.create()
|
|
506
|
+
const switchUi = await nativeTerminal(switched.session.id)
|
|
507
|
+
try {
|
|
508
|
+
await switchUi.shows("Paste an image")
|
|
509
|
+
await delay(150)
|
|
510
|
+
switchUi.child.stdin.write("/model\r")
|
|
511
|
+
await switchUi.shows("Choose model")
|
|
512
|
+
switchUi.child.stdin.write("\x1b[B\x1b[B\r") // Mini, the third picker entry.
|
|
513
|
+
await switchUi.shows("Configured model: openai/gpt-5.4-mini")
|
|
514
|
+
await delay(50)
|
|
515
|
+
switchUi.child.stdin.write("model-case\r")
|
|
516
|
+
await switchUi.shows("MODEL_USED:openai/gpt-5.4-mini")
|
|
517
|
+
switchUi.child.stdin.write("/model haiku\r")
|
|
518
|
+
await switchUi.shows("Configured model: anthropic/claude-haiku-5.5")
|
|
519
|
+
await delay(50)
|
|
520
|
+
switchUi.child.stdin.write("model-case again\r")
|
|
521
|
+
await switchUi.shows("MODEL_USED:anthropic/claude-haiku-5.5")
|
|
522
|
+
switchUi.child.stdin.write("/detach\r")
|
|
523
|
+
assert.equal(await Promise.race([switchUi.exited, delay(5000).then(() => "timeout")]), 0)
|
|
524
|
+
const history = await switched.session.snapshot()
|
|
525
|
+
assert.equal(history.events.filter((event) => event.type === "delivery.admitted").length, 2)
|
|
526
|
+
const invalid = new Client({ baseUrl, auth: { bearer: token }, headers: { [MODEL_HEADER]: "unlisted/model" } })
|
|
527
|
+
await assert.rejects(() => invalid.sessions.create())
|
|
528
|
+
} finally {
|
|
529
|
+
if (switchUi.child.exitCode === null) switchUi.child.kill("SIGKILL")
|
|
530
|
+
}
|
|
531
|
+
console.log(
|
|
532
|
+
"PASS: native picker and /model alias changed the remote model in the same conversation; unlisted models rejected"
|
|
533
|
+
)
|
|
534
|
+
|
|
535
|
+
const nativeApproval = await client.sessions.create({ message: "approval-case" })
|
|
536
|
+
assert.equal((await nativeApproval.delivery.result({ signal: AbortSignal.timeout(20000) })).status, "awaiting-input")
|
|
537
|
+
const approvalUi = await nativeTerminal(nativeApproval.session.id)
|
|
538
|
+
try {
|
|
539
|
+
await approvalUi.shows("y yes")
|
|
540
|
+
approvalUi.child.stdin.write("y")
|
|
541
|
+
await approvalUi.shows("The remote task finished.")
|
|
542
|
+
await delay(150)
|
|
543
|
+
approvalUi.child.stdin.write("/detach\r")
|
|
544
|
+
assert.equal(await Promise.race([approvalUi.exited, delay(5000).then(() => "timeout")]), 0)
|
|
545
|
+
assert.equal(await readFile(join(workspace, "approval.txt"), "utf8"), "approvedapproved")
|
|
546
|
+
} finally {
|
|
547
|
+
if (approvalUi.child.exitCode === null) approvalUi.child.kill("SIGKILL")
|
|
548
|
+
}
|
|
549
|
+
console.log("PASS: Eve's native approval panel authorized the pending tool exactly once")
|
|
550
|
+
|
|
551
|
+
// Exercise the byte-level provider's process cancellation, including a child that ignores TERM.
|
|
552
|
+
const connection = connect(workspace)
|
|
553
|
+
const controller = new AbortController()
|
|
554
|
+
const processHandle = await connection.spawn({
|
|
555
|
+
command: "trap '' TERM; printf ready; sleep 60",
|
|
556
|
+
env: {},
|
|
557
|
+
workingDirectory: workspace,
|
|
558
|
+
signal: controller.signal
|
|
559
|
+
})
|
|
560
|
+
const reader = processHandle.stdout.getReader()
|
|
561
|
+
await reader.read()
|
|
562
|
+
controller.abort()
|
|
563
|
+
await assert.rejects(async () => await processHandle.wait(), /terminated/)
|
|
564
|
+
console.log("PASS: cancellation terminates the command process group")
|
|
565
|
+
console.log(
|
|
566
|
+
"Verified Eve's transport, provider, client reconnect, approval and image paths. No model credentials, browser, or Vercel resources used."
|
|
567
|
+
)
|
|
568
|
+
} catch (error) {
|
|
569
|
+
console.error(output.join("").slice(-6000))
|
|
570
|
+
throw error
|
|
571
|
+
} finally {
|
|
572
|
+
await stopServer()
|
|
573
|
+
if (process.env.D3K_EVE_KEEP_FIXTURE === "1") console.log(`Fixture retained: ${root}`)
|
|
574
|
+
else await rm(root, { recursive: true, force: true })
|
|
575
|
+
}
|