deus-machine 0.3.8 → 0.3.11
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/bundles/agent-server.bundled.cjs +9994 -9514
- package/bundles/server.bundled.cjs +38225 -26928
- package/dist/cli.js +131 -10
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -19,7 +19,7 @@ var init_package = __esm({
|
|
|
19
19
|
"package.json"() {
|
|
20
20
|
package_default = {
|
|
21
21
|
name: "deus-machine",
|
|
22
|
-
version: "0.3.
|
|
22
|
+
version: "0.3.11",
|
|
23
23
|
description: "Run Deus IDE from the command line \u2014 headless server or desktop installer",
|
|
24
24
|
license: "MIT",
|
|
25
25
|
author: {
|
|
@@ -61,8 +61,8 @@ var init_package = __esm({
|
|
|
61
61
|
"@anthropic-ai/claude-agent-sdk": "0.2.131",
|
|
62
62
|
"@hono/node-server": "^1.19.9",
|
|
63
63
|
"@napi-rs/canvas": "^0.1.97",
|
|
64
|
-
"@openai/codex": "0.
|
|
65
|
-
"@openai/codex-sdk": "0.
|
|
64
|
+
"@openai/codex": "0.153.4",
|
|
65
|
+
"@openai/codex-sdk": "0.153.4",
|
|
66
66
|
"@sentry/node": "^10.40.0",
|
|
67
67
|
"agent-browser": "^0.21.4",
|
|
68
68
|
"better-sqlite3": "^12.4.1",
|
|
@@ -151,6 +151,7 @@ import { execFileSync, spawn, spawnSync } from "node:child_process";
|
|
|
151
151
|
import { createHash } from "node:crypto";
|
|
152
152
|
import {
|
|
153
153
|
chmodSync,
|
|
154
|
+
constants,
|
|
154
155
|
cpSync,
|
|
155
156
|
existsSync,
|
|
156
157
|
linkSync,
|
|
@@ -159,6 +160,7 @@ import {
|
|
|
159
160
|
readFileSync,
|
|
160
161
|
rmSync,
|
|
161
162
|
statSync,
|
|
163
|
+
symlinkSync,
|
|
162
164
|
writeFileSync
|
|
163
165
|
} from "node:fs";
|
|
164
166
|
import path2 from "node:path";
|
|
@@ -186,6 +188,21 @@ var VERSION_CHECK_ENV_DENYLIST = [
|
|
|
186
188
|
"NODE_PATH",
|
|
187
189
|
"PORT"
|
|
188
190
|
];
|
|
191
|
+
var CODEX_HELPERS = [
|
|
192
|
+
"codex-runtime/bin/codex-code-mode-host",
|
|
193
|
+
"codex-runtime/codex-resources/zsh/bin/zsh"
|
|
194
|
+
];
|
|
195
|
+
var CODEX_LINUX_HELPER = "codex-runtime/codex-resources/bwrap";
|
|
196
|
+
function bundledTools(runtimeKey) {
|
|
197
|
+
return [
|
|
198
|
+
"codex",
|
|
199
|
+
"claude",
|
|
200
|
+
"rg",
|
|
201
|
+
"agent-browser",
|
|
202
|
+
...CODEX_HELPERS,
|
|
203
|
+
...runtimeKey.startsWith("linux-") ? [CODEX_LINUX_HELPER] : []
|
|
204
|
+
];
|
|
205
|
+
}
|
|
189
206
|
var AGENT_CLI_TARGETS = [
|
|
190
207
|
{
|
|
191
208
|
runtimeKey: "darwin-arm64",
|
|
@@ -382,7 +399,7 @@ function assertExecutable(filePath, label) {
|
|
|
382
399
|
}
|
|
383
400
|
}
|
|
384
401
|
function getExecutableFileOutput(projectRoot, filePath, label, fileFormat, fileArch) {
|
|
385
|
-
const fileOutput = execFileSync("file", [relativeFromProjectRoot(projectRoot, filePath)], {
|
|
402
|
+
const fileOutput = execFileSync("file", ["-L", relativeFromProjectRoot(projectRoot, filePath)], {
|
|
386
403
|
cwd: projectRoot,
|
|
387
404
|
encoding: "utf8",
|
|
388
405
|
timeout: VERIFY_TIMEOUT_MS,
|
|
@@ -412,7 +429,8 @@ function validateStagedAgentClis(options = {}) {
|
|
|
412
429
|
throw new Error(`Agent CLI manifest is missing ${runtimeKey}/codex`);
|
|
413
430
|
}
|
|
414
431
|
assertCodexAppServerCompatible(codexEntry.source.version, `${runtimeKey}/codex`);
|
|
415
|
-
|
|
432
|
+
const tools = bundledTools(runtimeKey);
|
|
433
|
+
for (const tool of tools) {
|
|
416
434
|
const executablePath = resolveStagedAgentCliPath(projectRoot, runtimeKey, tool);
|
|
417
435
|
const inspection = inspectStaticExecutable(
|
|
418
436
|
projectRoot,
|
|
@@ -430,11 +448,20 @@ function validateStagedAgentClis(options = {}) {
|
|
|
430
448
|
inspection
|
|
431
449
|
);
|
|
432
450
|
}
|
|
433
|
-
if (manifestEntries.length !==
|
|
451
|
+
if (manifestEntries.length !== tools.length) {
|
|
434
452
|
throw new Error(
|
|
435
|
-
`Agent CLI manifest expected
|
|
453
|
+
`Agent CLI manifest expected ${tools.length} entries for ${runtimeKey}, found ${manifestEntries.length}`
|
|
436
454
|
);
|
|
437
455
|
}
|
|
456
|
+
if (!existsSync(
|
|
457
|
+
path2.join(
|
|
458
|
+
path2.dirname(resolveStagedAgentCliPath(projectRoot, runtimeKey, "codex")),
|
|
459
|
+
"codex-runtime",
|
|
460
|
+
"codex-package.json"
|
|
461
|
+
)
|
|
462
|
+
)) {
|
|
463
|
+
throw new Error(`Missing Codex package metadata for ${runtimeKey}`);
|
|
464
|
+
}
|
|
438
465
|
if (options.verifyRunnable === true && shouldVerifyRuntimeKey(runtimeKey)) {
|
|
439
466
|
for (const tool of ["codex", "claude"]) {
|
|
440
467
|
const executablePath = resolveStagedAgentCliPath(projectRoot, runtimeKey, tool);
|
|
@@ -728,7 +755,7 @@ function verifyMacRuntimeEntitlements(filePath) {
|
|
|
728
755
|
}
|
|
729
756
|
}
|
|
730
757
|
function verifyStagedDeusRuntimeVersion(executablePath) {
|
|
731
|
-
const helperPath = path3.join(runtimeDir2, "run-version-check.cjs");
|
|
758
|
+
const helperPath = path3.join(runtimeDir2, "smoke", "run-version-check.cjs");
|
|
732
759
|
const env = { ...process.env };
|
|
733
760
|
for (const key of VERSION_CHECK_ENV_DENYLIST2) {
|
|
734
761
|
delete env[key];
|
|
@@ -2916,7 +2943,8 @@ function getAssetPattern(os, cpuArch) {
|
|
|
2916
2943
|
case "darwin": {
|
|
2917
2944
|
const archSuffix = cpuArch === "arm64" ? "arm64" : "x64";
|
|
2918
2945
|
return {
|
|
2919
|
-
|
|
2946
|
+
// electron-builder names Intel DMGs without an architecture suffix.
|
|
2947
|
+
matcher: (name) => name.endsWith(".dmg") && (cpuArch === "arm64" ? name.includes("arm64") : !name.includes("arm64")),
|
|
2920
2948
|
description: `macOS DMG (${archSuffix})`
|
|
2921
2949
|
};
|
|
2922
2950
|
}
|
|
@@ -3158,6 +3186,81 @@ async function showStatus() {
|
|
|
3158
3186
|
blank();
|
|
3159
3187
|
}
|
|
3160
3188
|
|
|
3189
|
+
// src/feedback.ts
|
|
3190
|
+
import { randomUUID } from "node:crypto";
|
|
3191
|
+
var HIVENET_ENDPOINT = "https://hivenet.app/v1/feedback";
|
|
3192
|
+
function buildFeedbackPayload(message, version, opts = {}) {
|
|
3193
|
+
return {
|
|
3194
|
+
v: 1,
|
|
3195
|
+
to: "deus",
|
|
3196
|
+
category: opts.category ?? "cli",
|
|
3197
|
+
feedback: message,
|
|
3198
|
+
...opts.subject ? { subject: opts.subject } : {},
|
|
3199
|
+
thread: { id: opts.threadId ?? randomUUID().replaceAll("-", "") },
|
|
3200
|
+
client: { name: "deus-cli", version },
|
|
3201
|
+
consent: { telemetry: false }
|
|
3202
|
+
};
|
|
3203
|
+
}
|
|
3204
|
+
async function sendFeedback(message, version, opts = {}) {
|
|
3205
|
+
const trimmed = message.trim();
|
|
3206
|
+
if (!trimmed) {
|
|
3207
|
+
error("Feedback message is required.");
|
|
3208
|
+
blank();
|
|
3209
|
+
info("Tell the Deus team what you need \u2014 feature requests, confusing UX, broken flows:");
|
|
3210
|
+
hint(
|
|
3211
|
+
` ${c.cyan('deus feedback "feature request: let me pin a workspace to the top of the sidebar"')}`
|
|
3212
|
+
);
|
|
3213
|
+
hint(
|
|
3214
|
+
` ${c.cyan('deus feedback --subject "deus pair" "the QR code renders off-screen on small terminals"')}`
|
|
3215
|
+
);
|
|
3216
|
+
process.exitCode = 1;
|
|
3217
|
+
return;
|
|
3218
|
+
}
|
|
3219
|
+
const payload = buildFeedbackPayload(trimmed, version, opts);
|
|
3220
|
+
let response;
|
|
3221
|
+
try {
|
|
3222
|
+
response = await fetch(HIVENET_ENDPOINT, {
|
|
3223
|
+
method: "POST",
|
|
3224
|
+
headers: { "content-type": "application/json" },
|
|
3225
|
+
body: JSON.stringify(payload),
|
|
3226
|
+
signal: AbortSignal.timeout(1e4)
|
|
3227
|
+
});
|
|
3228
|
+
} catch {
|
|
3229
|
+
error("Could not reach hivenet.app \u2014 feedback not sent.");
|
|
3230
|
+
process.exitCode = 1;
|
|
3231
|
+
return;
|
|
3232
|
+
}
|
|
3233
|
+
if (!response.ok) {
|
|
3234
|
+
error(`Feedback submission failed (${response.status}).`);
|
|
3235
|
+
process.exitCode = 1;
|
|
3236
|
+
return;
|
|
3237
|
+
}
|
|
3238
|
+
const body = await response.json().catch(() => null) ?? {};
|
|
3239
|
+
success("Feedback sent to the Deus team.");
|
|
3240
|
+
const threadId = safe(body.thread?.id) || payload.thread.id;
|
|
3241
|
+
hint(
|
|
3242
|
+
`Thread: ${c.cyan(threadId)} \u2014 continue with ${c.cyan(`npx --yes hivenet@latest --to deus --resume ${threadId}`)}`
|
|
3243
|
+
);
|
|
3244
|
+
if (body.known_issue?.title) {
|
|
3245
|
+
blank();
|
|
3246
|
+
info(`Known issue: ${safe(body.known_issue.title)}`);
|
|
3247
|
+
if (body.known_issue.note) info(`Deus team: ${safe(body.known_issue.note)}`);
|
|
3248
|
+
}
|
|
3249
|
+
if (body.guidance) {
|
|
3250
|
+
blank();
|
|
3251
|
+
info(`Deus team: ${safe(body.guidance)}`);
|
|
3252
|
+
}
|
|
3253
|
+
if (body.ask?.prompt) {
|
|
3254
|
+
blank();
|
|
3255
|
+
info(`Deus asks: ${safe(body.ask.prompt)}`);
|
|
3256
|
+
if (body.ask.command) hint(`Answer (only if grounded): ${c.cyan(safe(body.ask.command))}`);
|
|
3257
|
+
}
|
|
3258
|
+
}
|
|
3259
|
+
function safe(value) {
|
|
3260
|
+
if (typeof value !== "string") return "";
|
|
3261
|
+
return value.replace(/[\u0000-\u001f\u007f-\u009f]/g, " ").trim();
|
|
3262
|
+
}
|
|
3263
|
+
|
|
3161
3264
|
// src/args.ts
|
|
3162
3265
|
function getCliCommandIndex(args) {
|
|
3163
3266
|
return args.findIndex((arg) => !arg.startsWith("-"));
|
|
@@ -3185,6 +3288,7 @@ function printHelp(version) {
|
|
|
3185
3288
|
console.log(` ${c.cyan("pair")} Generate a pairing code for remote access`);
|
|
3186
3289
|
console.log(` ${c.cyan("login")} Configure AI agent authentication`);
|
|
3187
3290
|
console.log(` ${c.cyan("status")} Show server info and connected devices`);
|
|
3291
|
+
console.log(` ${c.cyan("feedback")} Send feedback or a feature request to the Deus team`);
|
|
3188
3292
|
blank();
|
|
3189
3293
|
console.log(` ${c.bold("Options")} ${c.dim("(start):")}`);
|
|
3190
3294
|
console.log(` ${c.cyan("--data-dir")} Directory for database and data files`);
|
|
@@ -3223,7 +3327,7 @@ async function main() {
|
|
|
3223
3327
|
printHelp(version);
|
|
3224
3328
|
process.exit(0);
|
|
3225
3329
|
}
|
|
3226
|
-
const quickCommands = ["pair", "status", "login"];
|
|
3330
|
+
const quickCommands = ["pair", "status", "login", "feedback"];
|
|
3227
3331
|
if (!command || !quickCommands.includes(command)) {
|
|
3228
3332
|
await animatedBanner(version);
|
|
3229
3333
|
}
|
|
@@ -3283,6 +3387,23 @@ async function main() {
|
|
|
3283
3387
|
await showStatus();
|
|
3284
3388
|
break;
|
|
3285
3389
|
}
|
|
3390
|
+
// ── Feedback to the Deus team (Hivenet) ────────────────────────
|
|
3391
|
+
case "feedback": {
|
|
3392
|
+
const { values, positionals } = parseArgs({
|
|
3393
|
+
args: commandArgs,
|
|
3394
|
+
options: {
|
|
3395
|
+
subject: { type: "string" },
|
|
3396
|
+
category: { type: "string" }
|
|
3397
|
+
},
|
|
3398
|
+
allowPositionals: true,
|
|
3399
|
+
strict: false
|
|
3400
|
+
});
|
|
3401
|
+
await sendFeedback(positionals.join(" "), version, {
|
|
3402
|
+
subject: values.subject,
|
|
3403
|
+
category: values.category
|
|
3404
|
+
});
|
|
3405
|
+
break;
|
|
3406
|
+
}
|
|
3286
3407
|
default:
|
|
3287
3408
|
error(`Unknown command: ${c.bold(resolvedCommand)}`);
|
|
3288
3409
|
blank();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deus-machine",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.11",
|
|
4
4
|
"description": "Run Deus IDE from the command line — headless server or desktop installer",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"@anthropic-ai/claude-agent-sdk": "0.2.131",
|
|
43
43
|
"@hono/node-server": "^1.19.9",
|
|
44
44
|
"@napi-rs/canvas": "^0.1.97",
|
|
45
|
-
"@openai/codex": "0.
|
|
46
|
-
"@openai/codex-sdk": "0.
|
|
45
|
+
"@openai/codex": "0.153.4",
|
|
46
|
+
"@openai/codex-sdk": "0.153.4",
|
|
47
47
|
"@sentry/node": "^10.40.0",
|
|
48
48
|
"agent-browser": "^0.21.4",
|
|
49
49
|
"better-sqlite3": "^12.4.1",
|