@namzu/cli 14.1.0 → 14.2.1
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 +20 -9
- package/dist/commands/login.d.ts +21 -3
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +33 -21
- package/dist/commands/login.js.map +1 -1
- package/dist/integrations/providers/discover.d.ts +4 -0
- package/dist/integrations/providers/discover.d.ts.map +1 -1
- package/dist/integrations/providers/discover.js +55 -37
- package/dist/integrations/providers/discover.js.map +1 -1
- package/dist/integrations/providers/harness-credentials.d.ts +44 -9
- package/dist/integrations/providers/harness-credentials.d.ts.map +1 -1
- package/dist/integrations/providers/harness-credentials.js +140 -11
- package/dist/integrations/providers/harness-credentials.js.map +1 -1
- package/dist/integrations/providers/identity.d.ts +20 -24
- package/dist/integrations/providers/identity.d.ts.map +1 -1
- package/dist/integrations/providers/identity.js +20 -24
- package/dist/integrations/providers/identity.js.map +1 -1
- package/dist/integrations/providers/index.d.ts +1 -1
- package/dist/integrations/providers/index.d.ts.map +1 -1
- package/dist/integrations/providers/index.js +1 -1
- package/dist/integrations/providers/index.js.map +1 -1
- package/dist/integrations/providers/oauth.d.ts +8 -3
- package/dist/integrations/providers/oauth.d.ts.map +1 -1
- package/dist/integrations/providers/oauth.js +37 -11
- package/dist/integrations/providers/oauth.js.map +1 -1
- package/dist/integrations/providers/subscription-login.d.ts +7 -41
- package/dist/integrations/providers/subscription-login.d.ts.map +1 -1
- package/dist/integrations/providers/subscription-login.js +26 -149
- package/dist/integrations/providers/subscription-login.js.map +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +316 -83
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/ChoicePicker.d.ts +14 -0
- package/dist/tui/ChoicePicker.d.ts.map +1 -0
- package/dist/tui/ChoicePicker.js +15 -0
- package/dist/tui/ChoicePicker.js.map +1 -0
- package/dist/tui/Picker.d.ts +4 -2
- package/dist/tui/Picker.d.ts.map +1 -1
- package/dist/tui/Picker.js +99 -10
- package/dist/tui/Picker.js.map +1 -1
- package/dist/tui/StatusBar.d.ts +24 -40
- package/dist/tui/StatusBar.d.ts.map +1 -1
- package/dist/tui/StatusBar.js +71 -106
- package/dist/tui/StatusBar.js.map +1 -1
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/agent.js +10 -8
- package/dist/tui/agent.js.map +1 -1
- package/dist/tui/login-prompt.d.ts +0 -1
- package/dist/tui/login-prompt.d.ts.map +1 -1
- package/dist/tui/login-prompt.js +1 -6
- package/dist/tui/login-prompt.js.map +1 -1
- package/dist/tui/slashCommands.d.ts +8 -0
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/slashCommands.js +20 -15
- package/dist/tui/slashCommands.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ description: >-
|
|
|
6
6
|
you get. Interactive sessions, headless runs that stream structured events,
|
|
7
7
|
and a doctor that reports what the host can actually do.
|
|
8
8
|
tags: [readme, package, cli, agent]
|
|
9
|
-
timestamp: 2026-08-
|
|
9
|
+
timestamp: 2026-08-23T00:00:00Z
|
|
10
10
|
status: active
|
|
11
11
|
diataxis: reference
|
|
12
12
|
-->
|
|
@@ -69,14 +69,25 @@ namzu login codex # create a Namzu-owned ChatGPT subscription session
|
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
On startup, Namzu first reuses usable `Claude` and `Codex` sessions already owned
|
|
72
|
-
by their installed command-line clients
|
|
73
|
-
subscription starts directly; if both
|
|
74
|
-
which one to use and proceeds with its
|
|
75
|
-
remain read-only
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
by their installed command-line clients, including the paired Windows home from
|
|
73
|
+
WSL. With no saved choice, one signed-in subscription starts directly; if both
|
|
74
|
+
are available, a narrowed picker asks which one to use and proceeds with its
|
|
75
|
+
default model. Codex credentials remain read-only. If an expired `Claude` session
|
|
76
|
+
must rotate its refresh grant, Namzu preserves the complete owner envelope and
|
|
77
|
+
publishes the successor pair back to that exact file so `Claude` is not logged
|
|
78
|
+
out. A Namzu-owned sign-in is needed only when no usable device session exists
|
|
79
|
+
or when you explicitly want a separate login; its `Claude` route uses direct
|
|
80
|
+
subscription authorization rather than API-usage billing, and its returned
|
|
81
|
+
authorization code can be pasted back into the same picker that started it.
|
|
82
|
+
API keys remain optional alternatives through environment variables or the
|
|
83
|
+
session-only credential picker, and detecting one does not hide the subscription
|
|
84
|
+
sign-in action.
|
|
85
|
+
|
|
86
|
+
Bare `/effort` and `/permissions` open finite keyboard choosers; their argument
|
|
87
|
+
forms remain available for scripts. The footer keeps `model effort · cwd` on the
|
|
88
|
+
left and reserves the right edge for a state-specific interaction or durable
|
|
89
|
+
goal state. Idle conversation leaves the key legend to `/help` instead of
|
|
90
|
+
repeating it on every frame.
|
|
80
91
|
|
|
81
92
|
Repository policy stays live for the whole session. The CLI starts with the
|
|
82
93
|
applicable `AGENTS.md` chain, discovers nested instruction files after
|
package/dist/commands/login.d.ts
CHANGED
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
* started. There is no `--code` flag for that reason: it would look like it
|
|
28
28
|
* should work and could not.
|
|
29
29
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* The registered browser callback shows a code rather than returning to a
|
|
31
|
+
* local listener. Standard input takes that code or the finished address;
|
|
32
|
+
* the timeout bounds an unattended terminal.
|
|
33
33
|
*/
|
|
34
34
|
import { type SubscriptionProviderId } from '../integrations/providers/index.js';
|
|
35
35
|
import type { CommandDef } from './types.js';
|
|
@@ -40,6 +40,24 @@ interface LoginFlags {
|
|
|
40
40
|
readonly unknown: readonly string[];
|
|
41
41
|
}
|
|
42
42
|
export declare function parseLoginFlags(argv: readonly string[]): LoginFlags;
|
|
43
|
+
/**
|
|
44
|
+
* Resolve with the first NON-BLANK line standard input offers, or never.
|
|
45
|
+
*
|
|
46
|
+
* Two deliberate choices, both found by running this rather than by reading it.
|
|
47
|
+
*
|
|
48
|
+
* **Blank lines are ignored, not answered.** `once('line')` took a bare Enter
|
|
49
|
+
* — the keystroke a person makes while waiting, and the one a piped empty
|
|
50
|
+
* stdin delivers immediately — and spent the sign-in on it: the empty string
|
|
51
|
+
* went to `completeWithPastedCode`, came back "that does not contain an
|
|
52
|
+
* authorization code", and the attempt was over before the browser had loaded
|
|
53
|
+
* the page.
|
|
54
|
+
*
|
|
55
|
+
* **A closed or absent stream resolves as absent, not as a blank code.** A
|
|
56
|
+
* pending promise with only an unref'd timeout does not keep Node alive, so
|
|
57
|
+
* `< /dev/null` otherwise exits zero before printing an outcome. The caller
|
|
58
|
+
* turns absence into an explicit failed login.
|
|
59
|
+
*/
|
|
60
|
+
export declare function firstStdinLine(signal: AbortSignal, input?: NodeJS.ReadableStream): Promise<string | null>;
|
|
43
61
|
export declare const loginCommand: CommandDef;
|
|
44
62
|
export declare const logoutCommand: CommandDef;
|
|
45
63
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAKH,OAAO,EAEN,KAAK,sBAAsB,EAO3B,MAAM,oCAAoC,CAAA;AAQ3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAsB5C,UAAU,UAAU;IACnB,QAAQ,CAAC,QAAQ,CAAC,EAAE,sBAAsB,CAAA;IAC1C,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CACnC;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,CAsCnE;
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAKH,OAAO,EAEN,KAAK,sBAAsB,EAO3B,MAAM,oCAAoC,CAAA;AAQ3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAsB5C,UAAU,UAAU;IACnB,QAAQ,CAAC,QAAQ,CAAC,EAAE,sBAAsB,CAAA;IAC1C,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CACnC;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,CAsCnE;AAED;;;;;;;;;;;;;;;;GAgBG;AAEH,wBAAgB,cAAc,CAC7B,MAAM,EAAE,WAAW,EACnB,KAAK,GAAE,MAAM,CAAC,cAA8B,GAC1C,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAuBxB;AAED,eAAO,MAAM,YAAY,EAAE,UA4G1B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,UAiB3B,CAAA"}
|
package/dist/commands/login.js
CHANGED
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
* started. There is no `--code` flag for that reason: it would look like it
|
|
28
28
|
* should work and could not.
|
|
29
29
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* The registered browser callback shows a code rather than returning to a
|
|
31
|
+
* local listener. Standard input takes that code or the finished address;
|
|
32
|
+
* the timeout bounds an unattended terminal.
|
|
33
33
|
*/
|
|
34
34
|
import { createInterface } from 'node:readline';
|
|
35
35
|
import { EXIT_FAIL, EXIT_OK, EXIT_USAGE } from '../exit-codes.js';
|
|
@@ -46,8 +46,8 @@ const LOGIN_HELP = [
|
|
|
46
46
|
' --timeout <seconds> Give up waiting after this long (default: 300).',
|
|
47
47
|
' -h, --help Show this help.',
|
|
48
48
|
'',
|
|
49
|
-
'Claude sign-in opens a browser
|
|
50
|
-
'
|
|
49
|
+
'Claude sign-in opens a registered browser flow; paste the returned code or',
|
|
50
|
+
'finished address into this terminal. Codex sign-in prints a device code and',
|
|
51
51
|
'polls while you approve it in the browser.',
|
|
52
52
|
'',
|
|
53
53
|
'The credential is written to ~/.namzu/credentials.json, readable only by your',
|
|
@@ -110,27 +110,36 @@ export function parseLoginFlags(argv) {
|
|
|
110
110
|
* authorization code", and the attempt was over before the browser had loaded
|
|
111
111
|
* the page.
|
|
112
112
|
*
|
|
113
|
-
* **A closed or absent stream
|
|
114
|
-
*
|
|
115
|
-
* `< /dev/null`
|
|
116
|
-
*
|
|
113
|
+
* **A closed or absent stream resolves as absent, not as a blank code.** A
|
|
114
|
+
* pending promise with only an unref'd timeout does not keep Node alive, so
|
|
115
|
+
* `< /dev/null` otherwise exits zero before printing an outcome. The caller
|
|
116
|
+
* turns absence into an explicit failed login.
|
|
117
117
|
*/
|
|
118
|
-
function firstStdinLine(signal) {
|
|
118
|
+
export function firstStdinLine(signal, input = process.stdin) {
|
|
119
|
+
if (!input.readable)
|
|
120
|
+
return Promise.resolve(null);
|
|
119
121
|
return new Promise((resolve) => {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const
|
|
123
|
-
|
|
122
|
+
const rl = createInterface({ input });
|
|
123
|
+
let settled = false;
|
|
124
|
+
const finish = (value) => {
|
|
125
|
+
if (settled)
|
|
126
|
+
return;
|
|
127
|
+
settled = true;
|
|
128
|
+
signal.removeEventListener('abort', onAbort);
|
|
129
|
+
resolve(value);
|
|
130
|
+
};
|
|
131
|
+
const onAbort = () => {
|
|
132
|
+
finish(null);
|
|
124
133
|
rl.close();
|
|
125
134
|
};
|
|
126
|
-
signal.addEventListener('abort',
|
|
135
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
127
136
|
rl.on('line', (line) => {
|
|
128
137
|
if (line.trim().length === 0)
|
|
129
138
|
return;
|
|
130
|
-
|
|
139
|
+
finish(line);
|
|
131
140
|
rl.close();
|
|
132
|
-
resolve(line);
|
|
133
141
|
});
|
|
142
|
+
rl.once('close', () => finish(null));
|
|
134
143
|
});
|
|
135
144
|
}
|
|
136
145
|
export const loginCommand = {
|
|
@@ -197,7 +206,6 @@ export const loginCommand = {
|
|
|
197
206
|
ctx.formatter.print({
|
|
198
207
|
text: describeLoginStart({
|
|
199
208
|
url: login.url,
|
|
200
|
-
loopback: login.loopback,
|
|
201
209
|
browserOpened: flags.noBrowser ? false : openInBrowser(login.url),
|
|
202
210
|
completionHint: 'paste it here and press enter',
|
|
203
211
|
}),
|
|
@@ -207,9 +215,13 @@ export const loginCommand = {
|
|
|
207
215
|
ok: false,
|
|
208
216
|
reason: 'Timed out waiting for the sign-in to finish. Nothing was stored.',
|
|
209
217
|
}), flags.timeoutMs).unref());
|
|
210
|
-
const pasted = firstStdinLine(stop.signal).then((line) =>
|
|
211
|
-
|
|
212
|
-
|
|
218
|
+
const pasted = firstStdinLine(stop.signal).then((line) => line === null
|
|
219
|
+
? {
|
|
220
|
+
ok: false,
|
|
221
|
+
reason: 'Standard input closed before an authorization code was pasted. Nothing was stored.',
|
|
222
|
+
}
|
|
223
|
+
: login.completeWithPastedCode(line));
|
|
224
|
+
const outcome = await Promise.race([pasted, timeout]);
|
|
213
225
|
stop.abort();
|
|
214
226
|
login.cancel();
|
|
215
227
|
ctx.formatter.print({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAGN,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,eAAe,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tB,CAAC;SACF,CAAC,CAAA;QACF,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAA;IACxC,CAAC;CACD,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAe;IACxC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,kEAAkE;IAC/E,OAAO,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;QAC1B,MAAM,IAAI,GAAG,eAAe,EAAE,CAAA;QAC9B,MAAM,GAAG,GAAG,gCAAgC,EAAE,KAAK,IAAI,IAAI,yBAAyB,EAAE,KAAK,IAAI,CAAA;QAC/F,IAAI,CAAC;YACJ,yBAAyB,EAAE,CAAA;QAC5B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC;gBACnB,IAAI,EAAE,oBAAoB,IAAI,KAAK,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;aACrF,CAAC,CAAA;YACF,OAAO,SAAS,CAAA;QACjB,CAAC;QACD,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,CAAA;QACxD,OAAO,OAAO,CAAA;IACf,CAAC;CACD,CAAA"}
|
|
@@ -120,6 +120,8 @@ export interface DetectedProvider {
|
|
|
120
120
|
readonly refreshToken?: string;
|
|
121
121
|
readonly expiresAt?: number;
|
|
122
122
|
readonly origin?: CredentialOrigin;
|
|
123
|
+
/** Exact Claude owner file admitted by discovery. */
|
|
124
|
+
readonly sourcePath?: string;
|
|
123
125
|
};
|
|
124
126
|
/** Account-routed OAuth metadata for the Codex Responses backend. */
|
|
125
127
|
readonly codex?: {
|
|
@@ -145,6 +147,8 @@ export interface DiscoverOptions {
|
|
|
145
147
|
readonly skipKeychain?: boolean;
|
|
146
148
|
/** Skip namzu's own credential store (tests, and `--no-stored-credential`). */
|
|
147
149
|
readonly skipStored?: boolean;
|
|
150
|
+
/** Explicit paired Windows home for a WSL credential fixture. */
|
|
151
|
+
readonly windowsHome?: string | null;
|
|
148
152
|
}
|
|
149
153
|
/**
|
|
150
154
|
* Providers backed by a subscription session that is already usable now.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../../src/integrations/providers/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;
|
|
1
|
+
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../../src/integrations/providers/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAeH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,EAAqB,KAAK,UAAU,EAAE,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAE9F,MAAM,MAAM,eAAe,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE;AACzD,sEAAsE;GACpE;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AACzD,uEAAuE;GACrE;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,C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,oEAAoE;IACpE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;IAC7B,0CAA0C;IAC1C,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAChC,0DAA0D;IAC1D,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,6DAA6D;IAC7D,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;IAC/B,+EAA+E;IAC/E,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,iEAAiE;IACjE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACpC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,6BAA6B,CAC5C,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GACnC,SAAS,gBAAgB,EAAE,CAY7B;AAID,wBAAsB,iBAAiB,CACtC,IAAI,GAAE,eAAoB,GACxB,OAAO,CAAC,SAAS,gBAAgB,EAAE,CAAC,CAiMtC;AAsBD,yEAAyE;AACzE,wBAAgB,YAAY,CAC3B,IAAI,EAAE,SAAS,gBAAgB,EAAE,EACjC,EAAE,EAAE,UAAU,GACZ,gBAAgB,GAAG,IAAI,CAEzB"}
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
*/
|
|
59
59
|
import { EnvCredentialProvider } from '@namzu/sdk';
|
|
60
60
|
import { credentialsPath, readStoredCodexCredential, readStoredSubscriptionCredential, } from './credential-store.js';
|
|
61
|
-
import {
|
|
61
|
+
import { preferFresherCredential, readClaudeFileCredentialCandidates, readCodexFileCredentialCandidates, } from './harness-credentials.js';
|
|
62
62
|
import { KEYCHAIN_SERVICE, readAgentKeychainCredential } from './keychain.js';
|
|
63
63
|
import { PROVIDER_REGISTRY } from './registry.js';
|
|
64
64
|
/**
|
|
@@ -130,12 +130,17 @@ export async function discoverProviders(opts = {}) {
|
|
|
130
130
|
// macOS-only: the OAuth credential a co-installed tool keeps in the login
|
|
131
131
|
// Keychain.
|
|
132
132
|
const keychainCredential = opts.skipKeychain ? null : readAgentKeychainCredential();
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
133
|
+
const claudeFileCredentials = readClaudeFileCredentialCandidates(opts.home, env, opts.windowsHome);
|
|
134
|
+
const codexFileCredentials = readCodexFileCredentialCandidates(opts.home, env, opts.windowsHome).filter((candidate) => candidate.credential.expiresAt === undefined ||
|
|
135
|
+
candidate.credential.expiresAt - Date.now() > 60_000);
|
|
136
|
+
const usableCodexFileCredential = codexFileCredentials.reduce((current, candidate) => {
|
|
137
|
+
if (!current)
|
|
138
|
+
return candidate;
|
|
139
|
+
return preferFresherCredential(current.credential, candidate.credential) ===
|
|
140
|
+
candidate.credential
|
|
141
|
+
? candidate
|
|
142
|
+
: current;
|
|
143
|
+
}, null);
|
|
139
144
|
for (const id of Object.keys(PROVIDER_REGISTRY)) {
|
|
140
145
|
const entry = PROVIDER_REGISTRY[id];
|
|
141
146
|
const sources = [];
|
|
@@ -143,39 +148,47 @@ export async function discoverProviders(opts = {}) {
|
|
|
143
148
|
let oauth;
|
|
144
149
|
let codex;
|
|
145
150
|
if (id === 'anthropic') {
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
151
|
+
const borrowedCandidates = [
|
|
152
|
+
...claudeFileCredentials.map(({ credential, path }) => ({
|
|
153
|
+
credential,
|
|
154
|
+
source: { kind: 'claude-file', path },
|
|
155
|
+
})),
|
|
156
|
+
...(keychainCredential
|
|
157
|
+
? [
|
|
158
|
+
{
|
|
159
|
+
credential: keychainCredential,
|
|
160
|
+
source: { kind: 'keychain', service: KEYCHAIN_SERVICE },
|
|
161
|
+
},
|
|
162
|
+
]
|
|
163
|
+
: []),
|
|
164
|
+
].filter((candidate) => candidate.credential.expiresAt === undefined ||
|
|
165
|
+
candidate.credential.expiresAt - Date.now() > 60_000 ||
|
|
166
|
+
(candidate.source.kind === 'claude-file' &&
|
|
167
|
+
candidate.credential.refreshToken !== undefined));
|
|
168
|
+
const borrowed = borrowedCandidates.reduce((current, candidate) => {
|
|
169
|
+
if (!current)
|
|
170
|
+
return candidate;
|
|
171
|
+
return preferFresherCredential(current.credential, candidate.credential) ===
|
|
172
|
+
candidate.credential
|
|
173
|
+
? candidate
|
|
174
|
+
: current;
|
|
175
|
+
}, null);
|
|
176
|
+
if (borrowed) {
|
|
159
177
|
if (apiKey === undefined) {
|
|
160
|
-
apiKey =
|
|
178
|
+
apiKey = borrowed.credential.accessToken;
|
|
161
179
|
oauth = {
|
|
162
|
-
refreshToken:
|
|
163
|
-
expiresAt:
|
|
164
|
-
origin:
|
|
180
|
+
refreshToken: borrowed.credential.refreshToken,
|
|
181
|
+
expiresAt: borrowed.credential.expiresAt,
|
|
182
|
+
origin: borrowed.source.kind === 'claude-file' ? 'claude-file' : 'keychain',
|
|
183
|
+
...(borrowed.source.kind === 'claude-file' ? { sourcePath: borrowed.source.path } : {}),
|
|
165
184
|
};
|
|
166
185
|
}
|
|
167
|
-
sources.push(
|
|
186
|
+
sources.push(borrowed.source);
|
|
187
|
+
}
|
|
188
|
+
for (const candidate of borrowedCandidates) {
|
|
189
|
+
if (candidate !== borrowed)
|
|
190
|
+
sources.push(candidate.source);
|
|
168
191
|
}
|
|
169
|
-
const otherBorrowedSource = usableBorrowed && usableBorrowed === claudeFileCredential && keychainCredential
|
|
170
|
-
? { kind: 'keychain', service: KEYCHAIN_SERVICE }
|
|
171
|
-
: usableBorrowed && usableBorrowed === keychainCredential && claudeFileCredential
|
|
172
|
-
? {
|
|
173
|
-
kind: 'claude-file',
|
|
174
|
-
path: claudeCredentialsPath(opts.home),
|
|
175
|
-
}
|
|
176
|
-
: undefined;
|
|
177
|
-
if (otherBorrowedSource)
|
|
178
|
-
sources.push(otherBorrowedSource);
|
|
179
192
|
if (storedCredential) {
|
|
180
193
|
if (apiKey === undefined) {
|
|
181
194
|
apiKey = storedCredential.accessToken;
|
|
@@ -192,14 +205,14 @@ export async function discoverProviders(opts = {}) {
|
|
|
192
205
|
}
|
|
193
206
|
}
|
|
194
207
|
if (id === 'codex' && (storedCodexCredential || usableCodexFileCredential)) {
|
|
195
|
-
const credential = usableCodexFileCredential ?? storedCodexCredential;
|
|
208
|
+
const credential = usableCodexFileCredential?.credential ?? storedCodexCredential;
|
|
196
209
|
if (!credential)
|
|
197
210
|
throw new Error('unreachable');
|
|
198
211
|
apiKey = credential.accessToken;
|
|
199
212
|
sources.push({
|
|
200
213
|
kind: usableCodexFileCredential ? 'codex-file' : 'stored',
|
|
201
214
|
path: usableCodexFileCredential
|
|
202
|
-
?
|
|
215
|
+
? usableCodexFileCredential.path
|
|
203
216
|
: credentialsPath(...(opts.home === undefined ? [] : [opts.home])),
|
|
204
217
|
});
|
|
205
218
|
codex = {
|
|
@@ -213,6 +226,11 @@ export async function discoverProviders(opts = {}) {
|
|
|
213
226
|
path: credentialsPath(...(opts.home === undefined ? [] : [opts.home])),
|
|
214
227
|
});
|
|
215
228
|
}
|
|
229
|
+
for (const candidate of codexFileCredentials) {
|
|
230
|
+
if (candidate !== usableCodexFileCredential) {
|
|
231
|
+
sources.push({ kind: 'codex-file', path: candidate.path });
|
|
232
|
+
}
|
|
233
|
+
}
|
|
216
234
|
}
|
|
217
235
|
for (const envName of entry.envVars) {
|
|
218
236
|
// Through the SDK's seam rather than a direct `env[envName]`. The
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../../src/integrations/providers/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAElD,OAAO,EACN,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CAAA;IAC9C,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAA;IACxC,MAAM,KAAK,GAAG,UAAU,CACvB,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EACxB,IAAI,CAAC,cAAc,IAAI,wBAAwB,CAC/C,CAAA;IACD,IAAI,CAAC;QACJ,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,GAAG,EAAE;YAC9B,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,UAAU,CAAC,MAAM;SACzB,CAAC,CAAA;QACF,OAAO,GAAG,CAAC,EAAE,CAAA;IACd,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAA;IACb,CAAC;YAAS,CAAC;QACV,YAAY,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC;AACF,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,YAAY,CAC3B,IAAiC,EACjC,EAAc;IAEd,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,IAAI,CAAA;AACnD,CAAC"}
|
|
@@ -1,21 +1,54 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* These files are authorities, not migration inputs. Namzu reads the whole
|
|
5
|
-
* record, validates only the fields its provider wire needs, and never writes
|
|
6
|
-
* either file. In particular, refresh tokens remain owned by the harness that
|
|
7
|
-
* obtained them; consuming a single-use refresh grant here would race that
|
|
8
|
-
* owner and could log it out.
|
|
9
|
-
*/
|
|
1
|
+
/** Adapters for credentials owned by co-installed agent harnesses. */
|
|
2
|
+
import { execFileSync } from 'node:child_process';
|
|
10
3
|
import type { AgentOAuthCredential } from './keychain.js';
|
|
11
4
|
export interface CodexOAuthCredential extends AgentOAuthCredential {
|
|
12
5
|
readonly accountId: string;
|
|
13
6
|
}
|
|
7
|
+
export interface HarnessCredentialCandidate<T extends AgentOAuthCredential> {
|
|
8
|
+
readonly path: string;
|
|
9
|
+
readonly credential: T;
|
|
10
|
+
}
|
|
11
|
+
export interface ClaudeCredentialReplaceResult {
|
|
12
|
+
readonly replaced: boolean;
|
|
13
|
+
readonly current: AgentOAuthCredential | null;
|
|
14
|
+
}
|
|
14
15
|
export declare function claudeCredentialsPath(home?: string): string;
|
|
16
|
+
/** Convert an absolute Windows path into the drive mount WSL exposes. */
|
|
17
|
+
export declare function windowsPathToWsl(path: string): string | null;
|
|
18
|
+
/**
|
|
19
|
+
* Resolve the Windows account paired with this WSL process.
|
|
20
|
+
*
|
|
21
|
+
* The Windows executable is pinned instead of searched through PATH: this
|
|
22
|
+
* lookup decides where a credential may be read, so a project-local `cmd.exe`
|
|
23
|
+
* must not be able to redirect it. Failure is an ordinary "no second home"
|
|
24
|
+
* result; native Linux never starts a process.
|
|
25
|
+
*/
|
|
26
|
+
export declare function wslWindowsHome(env?: NodeJS.ProcessEnv, run?: typeof execFileSync, command?: string): string | null;
|
|
27
|
+
/**
|
|
28
|
+
* Usable Claude sessions visible from this process, freshest first.
|
|
29
|
+
*
|
|
30
|
+
* WSL is one device with two home directories in practice. Claude may be
|
|
31
|
+
* installed and signed in on Windows while Namzu runs inside WSL; treating the
|
|
32
|
+
* Linux home as the whole device turns that valid subscription into a missing
|
|
33
|
+
* credential. An explicit `home` remains hermetic for embeds and tests.
|
|
34
|
+
*/
|
|
35
|
+
export declare function readClaudeFileCredentialCandidates(home: string | undefined, env?: NodeJS.ProcessEnv, windowsHome?: string | null | undefined): readonly HarnessCredentialCandidate<AgentOAuthCredential>[];
|
|
15
36
|
export declare function codexCredentialsPath(home?: string, env?: NodeJS.ProcessEnv): string;
|
|
16
37
|
export declare function readClaudeFileCredential(home?: string): AgentOAuthCredential | null;
|
|
17
38
|
/** Read a Claude-owned credential from the exact path discovery admitted. */
|
|
18
39
|
export declare function readClaudeCredentialFile(path: string): AgentOAuthCredential | null;
|
|
40
|
+
/**
|
|
41
|
+
* Publish a refreshed Claude session back to the exact owner file discovered.
|
|
42
|
+
*
|
|
43
|
+
* Claude refresh grants may rotate. Keeping the successor only in Namzu would
|
|
44
|
+
* consume the owner's grant and leave its file unusable, so this preserves the
|
|
45
|
+
* full envelope and atomically replaces only its OAuth fields. The final
|
|
46
|
+
* re-read lets an owner rotation that completed during the network request win.
|
|
47
|
+
* Claude does not participate in Namzu's lock, so this is intentionally not
|
|
48
|
+
* described as a cross-process CAS; it is the strongest owner-compatible
|
|
49
|
+
* publication available for this shared file format.
|
|
50
|
+
*/
|
|
51
|
+
export declare function replaceClaudeCredentialFile(path: string, expected: AgentOAuthCredential, replacement: AgentOAuthCredential): ClaudeCredentialReplaceResult;
|
|
19
52
|
export declare function codexCredentialFromTokens(tokens: {
|
|
20
53
|
readonly accessToken: string;
|
|
21
54
|
readonly refreshToken?: string;
|
|
@@ -29,6 +62,8 @@ export declare function codexCredentialFromTokens(tokens: {
|
|
|
29
62
|
* Codex Responses backend and requires the account id that backend routes on.
|
|
30
63
|
*/
|
|
31
64
|
export declare function readCodexFileCredential(home?: string, env?: NodeJS.ProcessEnv): CodexOAuthCredential | null;
|
|
65
|
+
/** Usable Codex sessions visible from this process, including a paired WSL host. */
|
|
66
|
+
export declare function readCodexFileCredentialCandidates(home: string | undefined, env?: NodeJS.ProcessEnv, windowsHome?: string | null | undefined): readonly HarnessCredentialCandidate<CodexOAuthCredential>[];
|
|
32
67
|
/** Read a Codex-owned credential from the exact path discovery admitted. */
|
|
33
68
|
export declare function readCodexCredentialFile(path: string): CodexOAuthCredential | null;
|
|
34
69
|
/** Prefer the credential whose access token remains valid for longer. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness-credentials.d.ts","sourceRoot":"","sources":["../../../src/integrations/providers/harness-credentials.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"harness-credentials.d.ts","sourceRoot":"","sources":["../../../src/integrations/providers/harness-credentials.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEt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