@nowcrew/daemon 0.5.31 → 0.5.32
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 +53 -0
- package/dist/agent-memory/bridge.js +37 -0
- package/dist/agent-memory/client.js +94 -0
- package/dist/agent-memory/config.js +64 -0
- package/dist/agent-memory/policy.js +98 -0
- package/dist/config.js +2 -0
- package/dist/execution-journal-lock.js +21 -4
- package/dist/execution-protocol.js +1 -0
- package/dist/execution-runner.js +32 -2
- package/dist/local-executor.js +6 -1
- package/dist/machine-info.js +1 -0
- package/dist/runtimes/codex-app-server-runner.js +60 -16
- package/dist/serve.js +4 -0
- package/package.json +1 -1
- package/dist/remote/claude-bridge.js +0 -402
- package/dist/remote/claude-channel.js +0 -164
- package/dist/remote/codex-client.js +0 -408
- package/dist/remote/codex-runtime.js +0 -77
- package/dist/remote/config.js +0 -83
- package/dist/remote/gateway.js +0 -572
- package/dist/remote/protocol.js +0 -178
- package/dist/remote/remote-cli.js +0 -233
- package/dist/remote/session-discovery.js +0 -249
- package/dist/remote/wrapper.js +0 -40
package/dist/remote/wrapper.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { randomUUID } from "node:crypto";
|
|
2
|
-
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
3
|
-
function optionValue(args, long, short) {
|
|
4
|
-
for (let index = 0; index < args.length; index += 1) {
|
|
5
|
-
const value = args[index];
|
|
6
|
-
if (value.startsWith(`${long}=`))
|
|
7
|
-
return value.slice(long.length + 1);
|
|
8
|
-
if (value === long || (short && value === short)) {
|
|
9
|
-
const next = args[index + 1];
|
|
10
|
-
return next && !next.startsWith("-") ? next : null;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
export function resolveClaudeWrapperSession(args, createId = randomUUID) {
|
|
16
|
-
if (args.includes("--continue") || args.includes("-c")) {
|
|
17
|
-
throw new Error("NowCrew remote requires an explicit session ID; use --resume <session-id> instead of --continue");
|
|
18
|
-
}
|
|
19
|
-
if (args.includes("--fork-session")) {
|
|
20
|
-
throw new Error("NowCrew remote cannot identify a fork chosen inside Claude; start a new session or resume without --fork-session");
|
|
21
|
-
}
|
|
22
|
-
const sessionId = optionValue(args, "--session-id") ?? optionValue(args, "--resume", "-r") ?? createId();
|
|
23
|
-
if (!UUID.test(sessionId)) {
|
|
24
|
-
throw new Error("Claude remote sessions require a UUID in --session-id or --resume");
|
|
25
|
-
}
|
|
26
|
-
const hasSessionSelector = args.some((value) => value === "--session-id" || value.startsWith("--session-id=")
|
|
27
|
-
|| value === "--resume" || value.startsWith("--resume=") || value === "-r");
|
|
28
|
-
return {
|
|
29
|
-
sessionId,
|
|
30
|
-
args: hasSessionSelector ? [...args] : ["--session-id", sessionId, ...args],
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export function buildCodexWrappedInvocation(userArgs, socketPath = "") {
|
|
34
|
-
const hasRemote = userArgs.some((value) => value === "--remote" || value.startsWith("--remote="));
|
|
35
|
-
return {
|
|
36
|
-
bin: "codex",
|
|
37
|
-
args: hasRemote ? [...userArgs] : ["--remote", socketPath ? `unix://${socketPath}` : "unix://", ...userArgs],
|
|
38
|
-
env: process.env,
|
|
39
|
-
};
|
|
40
|
-
}
|