@rubytech/create-maxy-code 0.1.394 → 0.1.396
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/dist/__tests__/darwin-service-env-path.test.js +29 -0
- package/dist/index.js +14 -3
- package/dist/port-resolution.js +16 -1
- package/package.json +1 -1
- package/payload/platform/services/claude-session-manager/dist/claude-host-creds.d.ts +7 -10
- package/payload/platform/services/claude-session-manager/dist/claude-host-creds.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/claude-host-creds.js +58 -29
- package/payload/platform/services/claude-session-manager/dist/claude-host-creds.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.js +10 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/index.js +10 -0
- package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/jsonl-path.d.ts +10 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-path.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/jsonl-path.js +13 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-path.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +7 -6
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts +5 -0
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.js +7 -3
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/resolve-on-path.d.ts +11 -0
- package/payload/platform/services/claude-session-manager/dist/resolve-on-path.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/resolve-on-path.js +36 -0
- package/payload/platform/services/claude-session-manager/dist/resolve-on-path.js.map +1 -0
- package/payload/server/public/assets/AdminLoginScreens-BDDD-HbA.js +1 -0
- package/payload/server/public/assets/AdminShell-FunIPK6B.js +1 -0
- package/payload/server/public/assets/{Checkbox-DRIcYN9r.js → Checkbox-Bg3c92mS.js} +1 -1
- package/payload/server/public/assets/{Transcript-CRc72hkG.js → Transcript-BSDNtv9m.js} +1 -1
- package/payload/server/public/assets/{admin-iKYYnv3w.js → admin-3L5Oij8A.js} +1 -1
- package/payload/server/public/assets/{browser--8gzAe-E.js → browser-CaxZz5KF.js} +1 -1
- package/payload/server/public/assets/calendar-CSr142Qp.js +1 -0
- package/payload/server/public/assets/chat-CCpRlx-p.js +1 -0
- package/payload/server/public/assets/chevron-left-DK7DiplE.js +1 -0
- package/payload/server/public/assets/data-8JsHmqe5.js +1 -0
- package/payload/server/public/assets/{graph-B3haz2DN.js → graph-dXBNnc0i.js} +2 -2
- package/payload/server/public/assets/{graph-labels-Ba_fyw6I.js → graph-labels-BVWK6Q1j.js} +1 -1
- package/payload/server/public/assets/{operator-BYL1IFz9.js → operator-BuzsVW2t.js} +1 -1
- package/payload/server/public/assets/page--K5B-BjV.js +32 -0
- package/payload/server/public/assets/{page-CLKVCquw.js → page-CupdkyEv.js} +1 -1
- package/payload/server/public/assets/{public-BKJUKC76.js → public-D5gy2is8.js} +1 -1
- package/payload/server/public/assets/{rotate-ccw-BypBbSI4.js → rotate-ccw-BIZdAy6X.js} +1 -1
- package/payload/server/public/assets/useSubAccountSwitcher-CaZ76MFM.js +9 -0
- package/payload/server/public/browser.html +3 -3
- package/payload/server/public/calendar.html +4 -4
- package/payload/server/public/chat.html +7 -7
- package/payload/server/public/data.html +6 -6
- package/payload/server/public/graph.html +7 -7
- package/payload/server/public/index.html +9 -9
- package/payload/server/public/operator.html +9 -9
- package/payload/server/public/public.html +7 -7
- package/payload/server/public/assets/AdminLoginScreens-CL27ZV86.js +0 -1
- package/payload/server/public/assets/AdminShell-CBcSh9Yd.js +0 -1
- package/payload/server/public/assets/calendar-7xAT81N_.js +0 -1
- package/payload/server/public/assets/chat-B8Z9W42Z.js +0 -1
- package/payload/server/public/assets/chevron-left-DDselYau.js +0 -1
- package/payload/server/public/assets/data-Ece320dZ.js +0 -1
- package/payload/server/public/assets/page-Bj6lB07z.js +0 -32
- package/payload/server/public/assets/useSubAccountSwitcher-CsRv6MEd.js +0 -9
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Acceptance gate for the darwin `.env` PATH line.
|
|
2
|
+
//
|
|
3
|
+
// The launchd wrapper sources `.env` and every MCP child (including the ones
|
|
4
|
+
// `claude` spawns itself from a plugin `PLUGIN.md` `mcp: command: node`)
|
|
5
|
+
// inherits this PATH. On the migrated Mac the only `node` is nvm's, off the
|
|
6
|
+
// bare launchd PATH, so a bare `node server.js` fails ENOENT and the plugin's
|
|
7
|
+
// graph-write tools never register. buildDarwinServiceEnvPath prepends the
|
|
8
|
+
// resolved node bin dir and `~/.local/bin` (uv) so `node` and `uvx` both
|
|
9
|
+
// resolve at runtime. The channel MCPs (Task 1402) pin NODE_BIN directly;
|
|
10
|
+
// this covers the plugin/graph half of the same PATH root cause.
|
|
11
|
+
import test from "node:test";
|
|
12
|
+
import assert from "node:assert/strict";
|
|
13
|
+
import { buildDarwinServiceEnvPath } from "../port-resolution.js";
|
|
14
|
+
test("prepends the nvm node dir and ~/.local/bin ahead of the Homebrew prefixes, ending in $PATH", () => {
|
|
15
|
+
const path = buildDarwinServiceEnvPath("/Users/neo/.nvm/versions/node/v20.11.0/bin/node", "/Users/neo");
|
|
16
|
+
assert.equal(path, "/Users/neo/.nvm/versions/node/v20.11.0/bin:/Users/neo/.local/bin:/opt/homebrew/bin:/usr/local/bin:$PATH");
|
|
17
|
+
});
|
|
18
|
+
test("node dir is the first segment so a bare `node` resolves to the pinned interpreter first", () => {
|
|
19
|
+
const path = buildDarwinServiceEnvPath("/opt/homebrew/bin/node", "/Users/me");
|
|
20
|
+
assert.equal(path.split(":")[0], "/opt/homebrew/bin");
|
|
21
|
+
});
|
|
22
|
+
test("includes the account home's ~/.local/bin so the graph-cypher `uvx` resolves", () => {
|
|
23
|
+
const path = buildDarwinServiceEnvPath("/usr/local/bin/node", "/Users/alice");
|
|
24
|
+
assert.ok(path.includes(":/Users/alice/.local/bin:"), path);
|
|
25
|
+
});
|
|
26
|
+
test("keeps the existing $PATH expansion as the final segment", () => {
|
|
27
|
+
const path = buildDarwinServiceEnvPath("/usr/local/bin/node", "/Users/me");
|
|
28
|
+
assert.ok(path.endsWith(":$PATH"), path);
|
|
29
|
+
});
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { registerSpecialistAgentsAt, SpecialistSymlinkCollision } from "./specia
|
|
|
5
5
|
import { seedBypassPermissionsSettings, assertBypassPermissionsSeed } from "./permissions-seed.js";
|
|
6
6
|
import { resolve, join, dirname } from "node:path";
|
|
7
7
|
import { randomBytes } from "node:crypto";
|
|
8
|
-
import { resolveInstallPortFromFs, buildMaxyUnitFile, buildClaudeSessionManagerUnitFile, buildClaudePtysSliceUnitFile, buildCloudflaredSliceUnitFile } from "./port-resolution.js";
|
|
8
|
+
import { resolveInstallPortFromFs, buildMaxyUnitFile, buildClaudeSessionManagerUnitFile, buildClaudePtysSliceUnitFile, buildCloudflaredSliceUnitFile, buildDarwinServiceEnvPath } from "./port-resolution.js";
|
|
9
9
|
import { buildHeartbeatCronBlock, mergeHeartbeatBlock } from "./cron-registration.js";
|
|
10
10
|
import { validateTierFlag, validateEntitlementBase64, applyTierToAccountConfig, entitlementPath } from "./tier-flag.js";
|
|
11
11
|
import { parseOsRelease, isUbuntuLike as isUbuntuLikePure, parseAptCacheCandidate, decideAptResolution, } from "./apt-resolve.js";
|
|
@@ -3319,6 +3319,9 @@ function installServiceDarwin() {
|
|
|
3319
3319
|
// installer's own shell resolves.
|
|
3320
3320
|
const nodeProbe = spawnSync("command", ["-v", "node"], { encoding: "utf-8", shell: true });
|
|
3321
3321
|
const nodeBin = (nodeProbe.stdout ?? "").trim() || "/usr/local/bin/node";
|
|
3322
|
+
// Task 1404 — the darwin `.env` PATH, computed once and reused for both the
|
|
3323
|
+
// PATH env value and the install log so the two can never drift.
|
|
3324
|
+
const darwinServiceEnvPath = buildDarwinServiceEnvPath(nodeBin, process.env.HOME ?? "/");
|
|
3322
3325
|
const envPath = join(persistDir, ".env");
|
|
3323
3326
|
try {
|
|
3324
3327
|
let envContent = "";
|
|
@@ -3347,7 +3350,15 @@ function installServiceDarwin() {
|
|
|
3347
3350
|
// against the bare launchd PATH and Homebrew prefixes get prepended for
|
|
3348
3351
|
// every spawned descendant (claude-session-manager, MCP plugin spawns,
|
|
3349
3352
|
// route-level spawn('claude', ...)). Task 386.
|
|
3350
|
-
|
|
3353
|
+
//
|
|
3354
|
+
// Task 1404 — also prepend the resolved node bin dir and ~/.local/bin.
|
|
3355
|
+
// The plugin MCP servers `claude` spawns itself from a PLUGIN.md
|
|
3356
|
+
// `mcp: command: node` inherit this PATH; when the only node is nvm's
|
|
3357
|
+
// (off the Homebrew prefixes) a bare `node server.js` fails ENOENT and
|
|
3358
|
+
// the graph-write tools never register. buildDarwinServiceEnvPath makes
|
|
3359
|
+
// `node` resolve (node bin dir) and the graph-cypher `uvx` resolve
|
|
3360
|
+
// (~/.local/bin). Channel MCPs pin NODE_BIN separately (Task 1402).
|
|
3361
|
+
["PATH", darwinServiceEnvPath],
|
|
3351
3362
|
]) {
|
|
3352
3363
|
const re = new RegExp(`^${key}=.*$`, "m");
|
|
3353
3364
|
if (re.test(envContent)) {
|
|
@@ -3381,7 +3392,7 @@ function installServiceDarwin() {
|
|
|
3381
3392
|
envContent = envContent.trimEnd() + (envContent.length > 0 ? "\n" : "") + `NODE_BIN=${nodeBin}\n`;
|
|
3382
3393
|
}
|
|
3383
3394
|
writeFileSync(envPath, envContent);
|
|
3384
|
-
logFile(` .env: DISPLAY_MODE=${DISPLAY_MODE}, EMBED_MODEL=${EMBED_MODEL}, EMBED_DIMENSIONS=${EMBED_DIMS}, NEO4J_URI=bolt://localhost:${NEO4J_PORT}, PORT=${PORT}, MAXY_UI_INTERNAL_PORT=${PORT} (darwin-collapsed), CLAUDE_SESSION_MANAGER_PORT=${BRAND.claudeSessionManagerPort}, HOSTNAME=0.0.0.0, ACCOUNT_ID=${installAccountId.slice(0, 8)}…, CLAUDE_CONFIG_DIR=${persistDir}/.claude, CLAUDE_BIN=${canonicalClaude ?? "unresolved(PATH)"}, NODE_BIN=${nodeBin}`);
|
|
3395
|
+
logFile(` .env: DISPLAY_MODE=${DISPLAY_MODE}, EMBED_MODEL=${EMBED_MODEL}, EMBED_DIMENSIONS=${EMBED_DIMS}, NEO4J_URI=bolt://localhost:${NEO4J_PORT}, PORT=${PORT}, MAXY_UI_INTERNAL_PORT=${PORT} (darwin-collapsed), CLAUDE_SESSION_MANAGER_PORT=${BRAND.claudeSessionManagerPort}, HOSTNAME=0.0.0.0, ACCOUNT_ID=${installAccountId.slice(0, 8)}…, CLAUDE_CONFIG_DIR=${persistDir}/.claude, CLAUDE_BIN=${canonicalClaude ?? "unresolved(PATH)"}, NODE_BIN=${nodeBin}, PATH=${darwinServiceEnvPath}`);
|
|
3385
3396
|
}
|
|
3386
3397
|
catch (err) {
|
|
3387
3398
|
console.error(` WARNING: failed to write .env to ${envPath}: ${err instanceof Error ? err.message : String(err)}`);
|
package/dist/port-resolution.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
const PORT_RE = /^PORT=(\d+)/m;
|
|
5
5
|
const ENV_PORT_RE = /^Environment=PORT=(\d+)/m;
|
|
@@ -224,3 +224,18 @@ Before=shutdown.target
|
|
|
224
224
|
WantedBy=default.target
|
|
225
225
|
`;
|
|
226
226
|
}
|
|
227
|
+
/** The darwin `.env` PATH line. launchd hands the brand server a bare PATH
|
|
228
|
+
* (`/usr/bin:/bin:/usr/sbin:/sbin`) and the wrapper sources `.env` so every
|
|
229
|
+
* descendant inherits this value — including the plugin MCP servers `claude`
|
|
230
|
+
* spawns itself from a `PLUGIN.md` `mcp: command: node`. When the only `node`
|
|
231
|
+
* is nvm's (off the Homebrew prefixes), a bare `node server.js` fails ENOENT
|
|
232
|
+
* and the plugin's graph-write tools never register. Prepending the resolved
|
|
233
|
+
* node bin dir makes bare `node` resolve; prepending `~/.local/bin` makes the
|
|
234
|
+
* graph-cypher `uvx` resolve. The Homebrew prefixes and the sourced-time
|
|
235
|
+
* `$PATH` expansion are retained. Channel MCPs pin NODE_BIN separately
|
|
236
|
+
* (Task 1402); this covers the plugin/graph half of the same root cause. */
|
|
237
|
+
export function buildDarwinServiceEnvPath(nodeBin, home) {
|
|
238
|
+
const nodeDir = dirname(nodeBin);
|
|
239
|
+
const localBin = join(home, ".local", "bin");
|
|
240
|
+
return `${nodeDir}:${localBin}:/opt/homebrew/bin:/usr/local/bin:$PATH`;
|
|
241
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* `claudeConfigDir` is the brand's `.claude` dir; the credentials file is its
|
|
9
|
-
* `.credentials.json` child. */
|
|
10
|
-
export declare function applyHostCredsEnv(env: NodeJS.ProcessEnv, claudeConfigDir: string, platform?: NodeJS.Platform): NodeJS.ProcessEnv;
|
|
1
|
+
/** Mutate `env` in place to authenticate a darwin-spawned claude against the
|
|
2
|
+
* platform's credentials FILE, then return it. No-op on every other platform and
|
|
3
|
+
* when `claudeConfigDir` is empty. `claudeConfigDir` is the brand's `.claude`
|
|
4
|
+
* dir; the credentials file is its `.credentials.json` child (the same path
|
|
5
|
+
* auth-health reads). When `logger` is passed, emits one `op=spawn-hostcreds`
|
|
6
|
+
* line recording what was resolved and whether a token was applied. */
|
|
7
|
+
export declare function applyHostCredsEnv(env: NodeJS.ProcessEnv, claudeConfigDir: string, platform?: NodeJS.Platform, logger?: (line: string) => void): NodeJS.ProcessEnv;
|
|
11
8
|
//# sourceMappingURL=claude-host-creds.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-host-creds.d.ts","sourceRoot":"","sources":["../src/claude-host-creds.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"claude-host-creds.d.ts","sourceRoot":"","sources":["../src/claude-host-creds.ts"],"names":[],"mappings":"AAmCA;;;;;wEAKwE;AACxE,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,eAAe,EAAE,MAAM,EACvB,QAAQ,GAAE,MAAM,CAAC,QAA2B,EAC5C,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC9B,MAAM,CAAC,UAAU,CA4BnB"}
|
|
@@ -1,37 +1,66 @@
|
|
|
1
|
-
// Task
|
|
1
|
+
// Task 1406 — macOS credential-store bridge (supersedes the Task 1395 gap-1
|
|
2
|
+
// wiring, which was inert on CLI v2.1.201).
|
|
2
3
|
//
|
|
3
|
-
// On macOS the `claude` CLI stores its OAuth token in the login Keychain,
|
|
4
|
-
//
|
|
5
|
-
// (`<CLAUDE_CONFIG_DIR>/.credentials.json`, the
|
|
6
|
-
// readCredentials()/writeOAuthCredentials() own). Left alone the two never
|
|
7
|
-
//
|
|
4
|
+
// On macOS the `claude` CLI stores its OAuth token in the login Keychain, while
|
|
5
|
+
// this platform reads and refreshes the token from a FILE
|
|
6
|
+
// (`<CLAUDE_CONFIG_DIR>/.credentials.json`, the path the UI server's
|
|
7
|
+
// readCredentials()/writeOAuthCredentials() own). Left alone the two never meet:
|
|
8
|
+
// the child authenticates against a stale/empty Keychain and its first API turn
|
|
9
|
+
// prints `Not logged in · Please run /login`, even though platform auth-health
|
|
10
|
+
// reads the FILE and reports `ok`.
|
|
8
11
|
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
12
|
+
// Task 1395 tried to bridge this by pointing CLAUDE_CODE_HOST_CREDS_FILE at the
|
|
13
|
+
// credentials file. Reading the shipped CLI v2.1.201, that env var does NOT mean
|
|
14
|
+
// "read OAuth creds from here". It engages a host-orchestration handoff only when
|
|
15
|
+
// CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST is also truthy, and it expects the file to
|
|
16
|
+
// be the CLI's internal `{procStart:<number>, env:{…}}` shape — not the
|
|
17
|
+
// `{claudeAiOauth:{…}}` OAuth blob. The platform set neither the companion flag
|
|
18
|
+
// nor that shape, so the CLI ignored the file and fell back to the Keychain. The
|
|
19
|
+
// wiring was a no-op.
|
|
15
20
|
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
21
|
+
// The correct darwin bridge injects the access token directly. CLAUDE_CODE_OAUTH_TOKEN
|
|
22
|
+
// is a first-class auth source ("ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN,
|
|
23
|
+
// CLAUDE_CODE_OAUTH_TOKEN, or WIF env vars … required") and is honoured on the
|
|
24
|
+
// `--remote-control` session path (only the background-task spawn path scrubs it
|
|
25
|
+
// on macOS). Read at spawn time from the same file auth-health keeps fresh, so
|
|
26
|
+
// the child always carries the current token and the host stays the single
|
|
27
|
+
// refresh owner — the intent Task 1395 aimed for.
|
|
28
|
+
//
|
|
29
|
+
// Darwin-only. On Linux `claude` already reads/refreshes the same file under
|
|
30
|
+
// CLAUDE_CONFIG_DIR, so no env change is needed there; the regression boundary is
|
|
31
|
+
// that the Linux env is byte-for-byte unchanged and no extra file read happens.
|
|
32
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
20
33
|
import { join } from 'node:path';
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
/** Mutate `env` in place to authenticate a darwin-spawned claude against the
|
|
35
|
+
* platform's credentials FILE, then return it. No-op on every other platform and
|
|
36
|
+
* when `claudeConfigDir` is empty. `claudeConfigDir` is the brand's `.claude`
|
|
37
|
+
* dir; the credentials file is its `.credentials.json` child (the same path
|
|
38
|
+
* auth-health reads). When `logger` is passed, emits one `op=spawn-hostcreds`
|
|
39
|
+
* line recording what was resolved and whether a token was applied. */
|
|
40
|
+
export function applyHostCredsEnv(env, claudeConfigDir, platform = process.platform, logger) {
|
|
41
|
+
if (platform !== 'darwin' || !claudeConfigDir)
|
|
42
|
+
return env;
|
|
43
|
+
const credsFile = join(claudeConfigDir, '.credentials.json');
|
|
44
|
+
const fileExists = existsSync(credsFile);
|
|
45
|
+
let expiresAt = null;
|
|
46
|
+
let tokenApplied = false;
|
|
47
|
+
if (fileExists) {
|
|
48
|
+
try {
|
|
49
|
+
const parsed = JSON.parse(readFileSync(credsFile, 'utf8'));
|
|
50
|
+
const oauth = parsed.claudeAiOauth;
|
|
51
|
+
if (typeof oauth?.expiresAt === 'number')
|
|
52
|
+
expiresAt = oauth.expiresAt;
|
|
53
|
+
if (typeof oauth?.accessToken === 'string' && oauth.accessToken.length > 0) {
|
|
54
|
+
env.CLAUDE_CODE_OAUTH_TOKEN = oauth.accessToken;
|
|
55
|
+
tokenApplied = true;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
// Malformed/unreadable file: leave the child unauthenticated rather than
|
|
60
|
+
// throw and wedge the spawn. tokenApplied stays false; the logger records it.
|
|
61
|
+
}
|
|
34
62
|
}
|
|
63
|
+
logger?.(`[spawn] op=spawn-hostcreds platform=darwin credsFile=${credsFile} fileExists=${fileExists} expiresAt=${expiresAt ?? 'none'} configDir=${claudeConfigDir} tokenApplied=${tokenApplied}`);
|
|
35
64
|
return env;
|
|
36
65
|
}
|
|
37
66
|
//# sourceMappingURL=claude-host-creds.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-host-creds.js","sourceRoot":"","sources":["../src/claude-host-creds.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"claude-host-creds.js","sourceRoot":"","sources":["../src/claude-host-creds.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,4CAA4C;AAC5C,EAAE;AACF,gFAAgF;AAChF,0DAA0D;AAC1D,qEAAqE;AACrE,iFAAiF;AACjF,gFAAgF;AAChF,+EAA+E;AAC/E,mCAAmC;AACnC,EAAE;AACF,gFAAgF;AAChF,iFAAiF;AACjF,kFAAkF;AAClF,kFAAkF;AAClF,wEAAwE;AACxE,gFAAgF;AAChF,iFAAiF;AACjF,sBAAsB;AACtB,EAAE;AACF,uFAAuF;AACvF,0EAA0E;AAC1E,+EAA+E;AAC/E,iFAAiF;AACjF,+EAA+E;AAC/E,2EAA2E;AAC3E,kDAAkD;AAClD,EAAE;AACF,6EAA6E;AAC7E,kFAAkF;AAClF,gFAAgF;AAEhF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC;;;;;wEAKwE;AACxE,MAAM,UAAU,iBAAiB,CAC/B,GAAsB,EACtB,eAAuB,EACvB,WAA4B,OAAO,CAAC,QAAQ,EAC5C,MAA+B;IAE/B,IAAI,QAAQ,KAAK,QAAQ,IAAI,CAAC,eAAe;QAAE,OAAO,GAAG,CAAA;IAEzD,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAA;IAC5D,MAAM,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC,CAAA;IACxC,IAAI,SAAS,GAAkB,IAAI,CAAA;IACnC,IAAI,YAAY,GAAG,KAAK,CAAA;IACxB,IAAI,UAAU,EAAE,CAAC;QACf,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,CAExD,CAAA;YACD,MAAM,KAAK,GAAG,MAAM,CAAC,aAAa,CAAA;YAClC,IAAI,OAAO,KAAK,EAAE,SAAS,KAAK,QAAQ;gBAAE,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;YACrE,IAAI,OAAO,KAAK,EAAE,WAAW,KAAK,QAAQ,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC3E,GAAG,CAAC,uBAAuB,GAAG,KAAK,CAAC,WAAW,CAAA;gBAC/C,YAAY,GAAG,IAAI,CAAA;YACrB,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,yEAAyE;YACzE,8EAA8E;QAChF,CAAC;IACH,CAAC;IAED,MAAM,EAAE,CACN,wDAAwD,SAAS,eAAe,UAAU,cAAc,SAAS,IAAI,MAAM,cAAc,eAAe,iBAAiB,YAAY,EAAE,CACxL,CAAA;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-server.d.ts","sourceRoot":"","sources":["../src/http-server.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAe3B,OAAO,EAkBL,KAAK,SAAS,EAEf,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"http-server.d.ts","sourceRoot":"","sources":["../src/http-server.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAe3B,OAAO,EAkBL,KAAK,SAAS,EAEf,MAAM,kBAAkB,CAAA;AA8BzB,OAAO,KAAK,EAAE,SAAS,EAAyB,MAAM,iBAAiB,CAAA;AAEvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAyFlE,eAAO,MAAM,kBAAkB,QAA2B,CAAA;AAS1D,eAAO,MAAM,4BAA4B,QAAS,CAAA;AAIlD,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,SAAS,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC7E;;qEAEiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,SAAS,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,MAAM,CAAA;IACzB,kBAAkB,EAAE,WAAW,CAAA;IAC/B,eAAe,EAAE,aAAa,CAAA;IAC9B;kFAC8E;IAC9E,WAAW,EAAE,kBAAkB,CAAA;IAC/B;;gFAE4E;IAC5E,cAAc,EAAE,cAAc,CAAA;IAC9B;;;6BAGyB;IACzB,mBAAmB,CAAC,EAAE,mBAAmB,CAAA;IACzC;;;sCAGkC;IAClC,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;IAC3C;;gFAE4E;IAC5E,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAsFD;;;;;;mEAMmE;AACnE,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAiC9D;AAMD;;;;;;iBAMiB;AACjB,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAmCvF;AAID;;;;;;yBAMyB;AACzB,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAiCzD;AAkCD,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAEpG;AAgBD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE1D;AAUD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAMvE;AAMD,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,MAAM,CAER;AAkCD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAe5F;AAwJD;;;kEAGkE;AAClE,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG;IAC3B,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACpD;;;+CAG2C;IAC3C,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAChD,CAAA;AA8CD,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAoxFpD"}
|
|
@@ -45,7 +45,7 @@ import { createRcChildLog } from './rc-child-log.js';
|
|
|
45
45
|
import { extractVoiceSection } from './system-prompt.js';
|
|
46
46
|
import { readJsonlSession } from './jsonl-enumerator.js';
|
|
47
47
|
import { computeMetering } from './session-metering.js';
|
|
48
|
-
import { claudeStateRoot, projectSlugForCwd, jsonlPathForSessionId, sidecarPathForSessionId, permissionModeLogPathForSessionId, findExistingJsonlForSessionId, slugForExistingJsonl, jsonlPathForSlug, sidecarPathForSlug, detectRemoteControlSlug, classifyBindBlocker, } from './jsonl-path.js';
|
|
48
|
+
import { claudeStateRoot, projectSlugForCwd, jsonlPathForSessionId, sidecarPathForSessionId, permissionModeLogPathForSessionId, findExistingJsonlForSessionId, slugForExistingJsonl, jsonlPathForSlug, sidecarPathForSlug, detectRemoteControlSlug, classifyBindBlocker, classifyChildAuth, } from './jsonl-path.js';
|
|
49
49
|
import { basename, dirname, join } from 'node:path';
|
|
50
50
|
import { validateUserTitle } from './user-title-store.js';
|
|
51
51
|
import { credentialsPathForConfigDir, snapshotAuthForFailureReason } from './auth-snapshot.js';
|
|
@@ -2773,6 +2773,8 @@ export function buildHttpApp(deps) {
|
|
|
2773
2773
|
brandedNeo4jUri: process.env.NEO4J_URI ?? '',
|
|
2774
2774
|
brandedNeo4jPassword: process.env.NEO4J_PASSWORD ?? '',
|
|
2775
2775
|
sliceToken,
|
|
2776
|
+
// Task 1406 — surface this child's darwin host-creds resolution (op=spawn-hostcreds).
|
|
2777
|
+
logger: deps.logger,
|
|
2776
2778
|
});
|
|
2777
2779
|
// Task 983 — account-resolved lifeline, emitted before the child starts so a
|
|
2778
2780
|
// grep on one sessionId shows where the spawn landed. requested==resolved
|
|
@@ -3232,6 +3234,13 @@ export function buildHttpApp(deps) {
|
|
|
3232
3234
|
const waitedMs = Date.now() - start;
|
|
3233
3235
|
const outcome = bridgeSessionId ? 'bound' : 'timeout';
|
|
3234
3236
|
const reason = outcome === 'bound' ? null : 'pid-bind-timeout';
|
|
3237
|
+
// Task 1406 — derive the child's first-turn auth verdict. A bound child
|
|
3238
|
+
// authenticated; an unbound child that printed `Not logged in` is the
|
|
3239
|
+
// file-healthy-but-child-unauthenticated signature this task closes. Emitted
|
|
3240
|
+
// for both outcomes so a grep on one sessionId shows the child-side result
|
|
3241
|
+
// next to the platform-side auth-health, making the divergence visible.
|
|
3242
|
+
const childAuth = outcome === 'bound' ? 'bound' : classifyChildAuth(bindBuf);
|
|
3243
|
+
deps.logger(`[rc-spawn] op=child-auth result=${childAuth} sessionId=${sessionId ?? 'none'}`);
|
|
3235
3244
|
if (outcome === 'bound') {
|
|
3236
3245
|
deps.logger(`[rc-spawn] op=resume-bound sessionId=${sessionId ?? 'none'} slug=${bridgeSessionId} via=${via} ms=${waitedMs}`);
|
|
3237
3246
|
}
|