@namzu/cli 8.1.0 → 8.3.0

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.
Files changed (59) hide show
  1. package/dist/doctor/checks/credentials.d.ts.map +1 -1
  2. package/dist/doctor/checks/credentials.js +2 -0
  3. package/dist/doctor/checks/credentials.js.map +1 -1
  4. package/dist/integrations/providers/credential-store.d.ts +118 -0
  5. package/dist/integrations/providers/credential-store.d.ts.map +1 -0
  6. package/dist/integrations/providers/credential-store.js +322 -0
  7. package/dist/integrations/providers/credential-store.js.map +1 -0
  8. package/dist/integrations/providers/discover.d.ts +37 -10
  9. package/dist/integrations/providers/discover.d.ts.map +1 -1
  10. package/dist/integrations/providers/discover.js +43 -13
  11. package/dist/integrations/providers/discover.js.map +1 -1
  12. package/dist/integrations/providers/identity.d.ts +75 -0
  13. package/dist/integrations/providers/identity.d.ts.map +1 -0
  14. package/dist/integrations/providers/identity.js +75 -0
  15. package/dist/integrations/providers/identity.js.map +1 -0
  16. package/dist/integrations/providers/index.d.ts +5 -2
  17. package/dist/integrations/providers/index.d.ts.map +1 -1
  18. package/dist/integrations/providers/index.js +5 -2
  19. package/dist/integrations/providers/index.js.map +1 -1
  20. package/dist/integrations/providers/oauth.d.ts +37 -7
  21. package/dist/integrations/providers/oauth.d.ts.map +1 -1
  22. package/dist/integrations/providers/oauth.js +62 -17
  23. package/dist/integrations/providers/oauth.js.map +1 -1
  24. package/dist/integrations/providers/registry.d.ts +16 -0
  25. package/dist/integrations/providers/registry.d.ts.map +1 -1
  26. package/dist/integrations/providers/registry.js +19 -0
  27. package/dist/integrations/providers/registry.js.map +1 -1
  28. package/dist/integrations/providers/subscription-login.d.ts +123 -0
  29. package/dist/integrations/providers/subscription-login.d.ts.map +1 -0
  30. package/dist/integrations/providers/subscription-login.js +348 -0
  31. package/dist/integrations/providers/subscription-login.js.map +1 -0
  32. package/dist/tui/App.d.ts.map +1 -1
  33. package/dist/tui/App.js +166 -7
  34. package/dist/tui/App.js.map +1 -1
  35. package/dist/tui/Picker.d.ts +28 -1
  36. package/dist/tui/Picker.d.ts.map +1 -1
  37. package/dist/tui/Picker.js +71 -20
  38. package/dist/tui/Picker.js.map +1 -1
  39. package/dist/tui/agent.d.ts +24 -0
  40. package/dist/tui/agent.d.ts.map +1 -1
  41. package/dist/tui/agent.js +68 -11
  42. package/dist/tui/agent.js.map +1 -1
  43. package/dist/tui/credential-entry.d.ts +54 -18
  44. package/dist/tui/credential-entry.d.ts.map +1 -1
  45. package/dist/tui/credential-entry.js +67 -24
  46. package/dist/tui/credential-entry.js.map +1 -1
  47. package/dist/tui/login-prompt.d.ts +41 -0
  48. package/dist/tui/login-prompt.d.ts.map +1 -0
  49. package/dist/tui/login-prompt.js +69 -0
  50. package/dist/tui/login-prompt.js.map +1 -0
  51. package/dist/tui/open-browser.d.ts +24 -0
  52. package/dist/tui/open-browser.d.ts.map +1 -0
  53. package/dist/tui/open-browser.js +57 -0
  54. package/dist/tui/open-browser.js.map +1 -0
  55. package/dist/tui/slashCommands.d.ts +16 -0
  56. package/dist/tui/slashCommands.d.ts.map +1 -1
  57. package/dist/tui/slashCommands.js +13 -0
  58. package/dist/tui/slashCommands.js.map +1 -1
  59. package/package.json +3 -3
@@ -7,25 +7,50 @@
7
7
  *
8
8
  * ## Why session-only, stated as a decision rather than a limitation
9
9
  *
10
- * The obvious durable home is the OS keychain, and here it does not exist. The
11
- * keychain helper in this package is macOS-only, and it reads and writes a
12
- * DIFFERENT product's credential store — namzu borrows an OAuth token from it.
13
- * Writing a namzu key into that envelope would put our secret under their name.
14
- * On Windows, which is where this was asked for, there is no keychain path at
15
- * all.
10
+ * A durable store now exists next door (`credential-store.ts`), and this path
11
+ * still does not use it — which is the interesting part, because the original
12
+ * reason for session-only was that no such store had been written.
16
13
  *
17
- * So the durable options were a plaintext file or a per-platform credential
18
- * store nobody has written. Keeping the key in memory for the session is the
19
- * honest third answer: nothing lands on disk, it works everywhere, and the
20
- * screen names the environment variable that makes it durable. A secret at rest
21
- * should be something the operator chose, not something that arrived because
22
- * they typed into a text field.
14
+ * That reason is gone; the decision is not, and it rests on the one thing the
15
+ * two paths do not share. `/login` OBTAINS a credential: the operator asked for
16
+ * one, namzu got it, and namzu can refresh it, name where it came from, and
17
+ * remove it again. A key typed here arrived from somewhere namzu had no part
18
+ * in — there is nothing to refresh it with, no origin to report, and no
19
+ * meaningful way to revoke it on the operator's behalf. Writing that to disk
20
+ * uninvited would be namzu deciding, for someone else, that their secret should
21
+ * persist.
22
+ *
23
+ * So the key stays in memory: nothing lands on disk, it works everywhere, and
24
+ * the screen names the environment variable that makes it durable. A secret at
25
+ * rest should be something the operator chose, not something that arrived
26
+ * because they typed into a text field — and now there are two ways to choose.
23
27
  *
24
28
  * Everything decidable lives here rather than in the component, because this
25
29
  * package has no component tests and a secret is the worst thing to leave
26
30
  * unverifiable.
27
31
  */
28
- import type { DetectedProvider, ProviderRegistryEntry } from '../integrations/providers/index.js';
32
+ import { type DetectedProvider, type ProviderRegistryEntry } from '../integrations/providers/index.js';
33
+ /**
34
+ * Which kind of secret was pasted.
35
+ *
36
+ * The distinction is not cosmetic: the two travel differently on the wire —
37
+ * `constructProvider` sends one as `authToken` and the other as `apiKey` — and
38
+ * they expire differently. A subscription token is short-lived and is renewed
39
+ * from refresh metadata that only the discovered credential carries; a hand
40
+ * pasted one has none, so it lapses in hours with nothing to renew it. An
41
+ * operator who is not told that at the moment they paste discovers it as a 401
42
+ * mid-turn, which is the difference between a feature and a trap.
43
+ */
44
+ export type CredentialKind = 'api-key' | 'subscription-token';
45
+ /**
46
+ * Classify a pasted secret by its own shape.
47
+ *
48
+ * Reuses the classifier the session layer already decides the wire header with
49
+ * (`isAnthropicOAuthToken`), so the screen cannot say one thing while the
50
+ * request says another. Every other provider takes an API key and nothing else,
51
+ * so asking the question of them would invent a distinction they do not have.
52
+ */
53
+ export declare function classifyCredential(entry: ProviderRegistryEntry, key: string): CredentialKind;
29
54
  /**
30
55
  * What a key looks like on screen. Never the key.
31
56
  *
@@ -64,18 +89,29 @@ export type Verification = {
64
89
  /**
65
90
  * What namzu tells the operator it did with what they typed.
66
91
  *
67
- * Every branch says three things: that it worked or did not, that the key is
68
- * held for this session only, and the environment variable that persists it.
69
- * The middle one is the part a person is most likely to assume otherwise —
70
- * typing a credential into an application usually means it was saved.
92
+ * Every branch says four things: that it worked or did not, WHICH KIND of
93
+ * credential it took, that it is held for this session only, and the
94
+ * environment variable that persists it. The third is the part a person is most
95
+ * likely to assume otherwise — typing a credential into an application usually
96
+ * means it was saved.
97
+ *
98
+ * The kind is said out loud because the two behave differently after this
99
+ * screen, and only one of them can be renewed. See {@link CredentialKind}.
71
100
  */
72
- export declare function describeDisposition(entry: ProviderRegistryEntry, verification: Verification): string;
101
+ export declare function describeDisposition(entry: ProviderRegistryEntry, verification: Verification, kind?: CredentialKind): string;
73
102
  /**
74
103
  * The detected-provider record a typed key produces.
75
104
  *
76
105
  * Shaped exactly like a discovered one so every downstream path — session
77
106
  * construction, the model picker, `/provider` — treats it identically. The only
78
107
  * difference is `source`, so a surface can say where it came from.
108
+ *
109
+ * `oauth` is deliberately NOT set, for a subscription token as much as for an
110
+ * API key. That field means "this credential can be renewed from a refresh
111
+ * token", the session layer gates its refresh on it, and a hand-pasted token
112
+ * supplies no refresh token — so filling it in would claim a renewal path that
113
+ * does not exist and turn a disclosed expiry into a silent 401. The disclosure
114
+ * in `describeDisposition` is the substitute.
79
115
  */
80
116
  export declare function sessionCredential(entry: ProviderRegistryEntry, key: string): DetectedProvider;
81
117
  //# sourceMappingURL=credential-entry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"credential-entry.d.ts","sourceRoot":"","sources":["../../src/tui/credential-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAEjG;;;;;;;GAOG;AACH,wBA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ACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAmBxF;AAED,qDAAqD;AACrD,MAAM,MAAM,YAAY,GACrB;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;CAAE;AAC/B,oEAAoE;GAClE;IAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;CAAE,GACjC;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAEzD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,qBAAqB,EAC5B,YAAY,EAAE,YAAY,EAC1B,IAAI,GAAE,cAA0B,GAC9B,MAAM,CAmCR;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,qBAAqB,EAAE,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAQ7F"}
@@ -7,24 +7,42 @@
7
7
  *
8
8
  * ## Why session-only, stated as a decision rather than a limitation
9
9
  *
10
- * The obvious durable home is the OS keychain, and here it does not exist. The
11
- * keychain helper in this package is macOS-only, and it reads and writes a
12
- * DIFFERENT product's credential store — namzu borrows an OAuth token from it.
13
- * Writing a namzu key into that envelope would put our secret under their name.
14
- * On Windows, which is where this was asked for, there is no keychain path at
15
- * all.
10
+ * A durable store now exists next door (`credential-store.ts`), and this path
11
+ * still does not use it — which is the interesting part, because the original
12
+ * reason for session-only was that no such store had been written.
16
13
  *
17
- * So the durable options were a plaintext file or a per-platform credential
18
- * store nobody has written. Keeping the key in memory for the session is the
19
- * honest third answer: nothing lands on disk, it works everywhere, and the
20
- * screen names the environment variable that makes it durable. A secret at rest
21
- * should be something the operator chose, not something that arrived because
22
- * they typed into a text field.
14
+ * That reason is gone; the decision is not, and it rests on the one thing the
15
+ * two paths do not share. `/login` OBTAINS a credential: the operator asked for
16
+ * one, namzu got it, and namzu can refresh it, name where it came from, and
17
+ * remove it again. A key typed here arrived from somewhere namzu had no part
18
+ * in — there is nothing to refresh it with, no origin to report, and no
19
+ * meaningful way to revoke it on the operator's behalf. Writing that to disk
20
+ * uninvited would be namzu deciding, for someone else, that their secret should
21
+ * persist.
22
+ *
23
+ * So the key stays in memory: nothing lands on disk, it works everywhere, and
24
+ * the screen names the environment variable that makes it durable. A secret at
25
+ * rest should be something the operator chose, not something that arrived
26
+ * because they typed into a text field — and now there are two ways to choose.
23
27
  *
24
28
  * Everything decidable lives here rather than in the component, because this
25
29
  * package has no component tests and a secret is the worst thing to leave
26
30
  * unverifiable.
27
31
  */
32
+ import { isAnthropicOAuthToken, } from '../integrations/providers/index.js';
33
+ /**
34
+ * Classify a pasted secret by its own shape.
35
+ *
36
+ * Reuses the classifier the session layer already decides the wire header with
37
+ * (`isAnthropicOAuthToken`), so the screen cannot say one thing while the
38
+ * request says another. Every other provider takes an API key and nothing else,
39
+ * so asking the question of them would invent a distinction they do not have.
40
+ */
41
+ export function classifyCredential(entry, key) {
42
+ if (entry.id !== 'anthropic')
43
+ return 'api-key';
44
+ return isAnthropicOAuthToken(key.trim()) ? 'subscription-token' : 'api-key';
45
+ }
28
46
  /**
29
47
  * What a key looks like on screen. Never the key.
30
48
  *
@@ -56,11 +74,15 @@ export function keyLooksUsable(key) {
56
74
  if (/\s/.test(trimmed)) {
57
75
  return { ok: false, reason: 'That contains a space — check for a truncated or wrapped paste.' };
58
76
  }
59
- if (trimmed.startsWith('$') || trimmed.includes('=')) {
77
+ // Assignment-SHAPED, not "contains an equals sign". The old test rejected any
78
+ // `=` anywhere, which is fine for an API key and wrong for a subscription
79
+ // token: a JWT-shaped one is base64 and may carry `=` padding, so the screen
80
+ // refused a valid credential and blamed the operator's paste for it. This
81
+ // still catches the case the check exists for — `ANTHROPIC_API_KEY=sk-…`
82
+ // copied out of a shell profile — because that has a variable name in front.
83
+ if (trimmed.startsWith('$') || /^[A-Za-z_][A-Za-z0-9_]*=/.test(trimmed)) {
60
84
  return {
61
85
  ok: false,
62
- // The classic: pasting `ANTHROPIC_API_KEY=sk-…` or `$MY_KEY` from a
63
- // shell profile rather than the value.
64
86
  reason: 'That looks like a shell assignment or variable. Paste the key itself.',
65
87
  };
66
88
  }
@@ -69,21 +91,26 @@ export function keyLooksUsable(key) {
69
91
  /**
70
92
  * What namzu tells the operator it did with what they typed.
71
93
  *
72
- * Every branch says three things: that it worked or did not, that the key is
73
- * held for this session only, and the environment variable that persists it.
74
- * The middle one is the part a person is most likely to assume otherwise —
75
- * typing a credential into an application usually means it was saved.
94
+ * Every branch says four things: that it worked or did not, WHICH KIND of
95
+ * credential it took, that it is held for this session only, and the
96
+ * environment variable that persists it. The third is the part a person is most
97
+ * likely to assume otherwise — typing a credential into an application usually
98
+ * means it was saved.
99
+ *
100
+ * The kind is said out loud because the two behave differently after this
101
+ * screen, and only one of them can be renewed. See {@link CredentialKind}.
76
102
  */
77
- export function describeDisposition(entry, verification) {
103
+ export function describeDisposition(entry, verification, kind = 'api-key') {
104
+ const noun = kind === 'subscription-token' ? 'subscription token' : 'API key';
78
105
  const persist = entry.envVars[0];
79
106
  const durable = persist
80
107
  ? `To keep it, set ${persist} in your shell and restart.`
81
108
  : 'To keep it, configure the credential in your environment and restart.';
82
109
  if (verification.kind === 'rejected') {
83
- return `${entry.label} rejected that key: ${verification.reason}\nNothing was stored.`;
110
+ return `${entry.label} rejected that ${noun}: ${verification.reason}\nNothing was stored.`;
84
111
  }
85
112
  const checked = verification.kind === 'verified'
86
- ? `${entry.label} accepted the key.`
113
+ ? `${entry.label} accepted the ${noun}.`
87
114
  : // Said plainly rather than implied. Claiming a key is good would be
88
115
  // inventing a verification that did not happen — and this now covers
89
116
  // two ways of not happening: a driver that declares no credential
@@ -91,8 +118,17 @@ export function describeDisposition(entry, verification) {
91
118
  // wording asserted the first ("offers no way to check it"), which
92
119
  // would be false for a probe that timed out. Neither is a bad key,
93
120
  // and neither is a checked one.
94
- `Key accepted, but NOT checked — ${entry.label} could not confirm it just now, so the first message will be the test.`;
95
- return `${checked}\nHeld in memory for this session only — it is not written anywhere. ${durable}`;
121
+ `${noun.replace(/^./, (c) => c.toUpperCase())} accepted, but NOT checked — ${entry.label} could not confirm it just now, so the first message will be the test.`;
122
+ // Disclosed HERE, at the paste, and not left to be discovered as a 401 in the
123
+ // middle of a turn. A discovered subscription token arrives with a refresh
124
+ // token and an expiry, and the session layer renews it between turns; a
125
+ // pasted one carries neither, so there is nothing to renew it with. Saying
126
+ // "it lasts hours" is the honest form of a limitation we cannot remove
127
+ // without an authorization flow namzu does not have.
128
+ const expiry = kind === 'subscription-token'
129
+ ? '\nA pasted subscription token has no refresh data with it, so it expires in a few hours and namzu cannot renew it — expect to enter it again.'
130
+ : '';
131
+ return `${checked}\nHeld in memory for this session only — it is not written anywhere. ${durable}${expiry}`;
96
132
  }
97
133
  /**
98
134
  * The detected-provider record a typed key produces.
@@ -100,6 +136,13 @@ export function describeDisposition(entry, verification) {
100
136
  * Shaped exactly like a discovered one so every downstream path — session
101
137
  * construction, the model picker, `/provider` — treats it identically. The only
102
138
  * difference is `source`, so a surface can say where it came from.
139
+ *
140
+ * `oauth` is deliberately NOT set, for a subscription token as much as for an
141
+ * API key. That field means "this credential can be renewed from a refresh
142
+ * token", the session layer gates its refresh on it, and a hand-pasted token
143
+ * supplies no refresh token — so filling it in would claim a renewal path that
144
+ * does not exist and turn a disclosed expiry into a silent 401. The disclosure
145
+ * in `describeDisposition` is the substitute.
103
146
  */
104
147
  export function sessionCredential(entry, key) {
105
148
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"credential-entry.js","sourceRoot":"","sources":["../../src/tui/credential-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH;;;;;;;GAOG;AACH,MAAM,UAAU,OAAO,CAAC,GAAW;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,EAAE;QAClB,GAAG,CAAC,KAAK,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChF,YAAY,EAAE,EAAE;KAChB,CAAA;AACF,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * What namzu says while an operator signs in to their subscription.
3
+ *
4
+ * Every decidable thing lives here rather than in the component, for the
5
+ * reason `credential-entry.ts` gives next door: this package has no component
6
+ * tests, and wording that handles a credential is the worst thing to leave
7
+ * unverifiable. What the component does with these strings is print them.
8
+ *
9
+ * The one rule these functions exist to keep: **an outcome is described by
10
+ * what happened, never by quoting what came back.** A refusal from a token
11
+ * endpoint arrives in a document that can contain a token, so no function
12
+ * here ever receives one — `LoginOutcome.reason` is already sanitised at the
13
+ * protocol layer, and the success arm is handed a path, not a credential.
14
+ */
15
+ import type { LoginOutcome } from '../integrations/providers/index.js';
16
+ /**
17
+ * The screen the operator reads when a sign-in starts.
18
+ *
19
+ * The URL is printed WHATEVER happened with the browser. A launcher that
20
+ * started is not a browser that appeared — no platform reports that — and a
21
+ * message that says "your browser is opening" and nothing else leaves someone
22
+ * on a machine with no browser staring at a line that is simply false.
23
+ */
24
+ export declare function describeLoginStart(start: {
25
+ readonly url: string;
26
+ readonly loopback: boolean;
27
+ readonly browserOpened: boolean;
28
+ }): string;
29
+ /** What the operator reads when the attempt ends, either way. */
30
+ export declare function describeLoginOutcome(outcome: LoginOutcome): string;
31
+ /** What the operator reads after asking namzu to forget the credential. */
32
+ export declare function describeLogout(path: string, removed: boolean): string;
33
+ /**
34
+ * Whether a `/login` argument is an attempt to finish, rather than to start.
35
+ *
36
+ * Bare `/login` starts an attempt; `/login <something>` finishes one. Drawn
37
+ * here rather than in the command so the rule is testable and so the command
38
+ * cannot quietly grow a third meaning.
39
+ */
40
+ export declare function isCompletionArgument(args: readonly string[]): boolean;
41
+ //# sourceMappingURL=login-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login-prompt.d.ts","sourceRoot":"","sources":["../../src/tui/login-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AAEtE;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACzC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;CAC/B,GAAG,MAAM,CAmBT;AAED,iEAAiE;AACjE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAUlE;AAED,2EAA2E;AAC3E,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAIrE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAErE"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * What namzu says while an operator signs in to their subscription.
3
+ *
4
+ * Every decidable thing lives here rather than in the component, for the
5
+ * reason `credential-entry.ts` gives next door: this package has no component
6
+ * tests, and wording that handles a credential is the worst thing to leave
7
+ * unverifiable. What the component does with these strings is print them.
8
+ *
9
+ * The one rule these functions exist to keep: **an outcome is described by
10
+ * what happened, never by quoting what came back.** A refusal from a token
11
+ * endpoint arrives in a document that can contain a token, so no function
12
+ * here ever receives one — `LoginOutcome.reason` is already sanitised at the
13
+ * protocol layer, and the success arm is handed a path, not a credential.
14
+ */
15
+ /**
16
+ * The screen the operator reads when a sign-in starts.
17
+ *
18
+ * The URL is printed WHATEVER happened with the browser. A launcher that
19
+ * started is not a browser that appeared — no platform reports that — and a
20
+ * message that says "your browser is opening" and nothing else leaves someone
21
+ * on a machine with no browser staring at a line that is simply false.
22
+ */
23
+ export function describeLoginStart(start) {
24
+ const lines = [
25
+ start.browserOpened
26
+ ? 'Opening your browser to sign in. If nothing opened, or the browser is on another machine, use this address:'
27
+ : 'Open this address to sign in — on this machine, or on any machine you can reach it from:',
28
+ '',
29
+ start.url,
30
+ '',
31
+ ];
32
+ lines.push(start.loopback
33
+ ? 'When the page finishes, namzu will pick it up automatically. If your browser is somewhere this machine cannot be reached from — a container, a remote shell — copy the address it lands on and run:'
34
+ : // Said plainly. The listener is what makes the automatic path work,
35
+ // and an operator who is not told it is missing will sit waiting for
36
+ // something that is never going to happen.
37
+ 'The automatic hand-back is not available in this session (the port is in use, or this environment does not allow listening), so finish it by hand. Copy the address the browser lands on and run:');
38
+ lines.push('', ' /login <the address, or just the code>');
39
+ return lines.join('\n');
40
+ }
41
+ /** What the operator reads when the attempt ends, either way. */
42
+ export function describeLoginOutcome(outcome) {
43
+ if (!outcome.ok) {
44
+ return `${outcome.reason}\n\nRun /login to try again.`;
45
+ }
46
+ return [
47
+ 'Signed in. The credential is stored on this machine, readable only by your account:',
48
+ ` ${outcome.storedAt}`,
49
+ '',
50
+ 'namzu will refresh it as it expires, and will find it again next time it starts. Run /logout to remove it.',
51
+ ].join('\n');
52
+ }
53
+ /** What the operator reads after asking namzu to forget the credential. */
54
+ export function describeLogout(path, removed) {
55
+ return removed
56
+ ? `Removed the stored credential at ${path}. This session keeps working until it ends; the next one will ask you to sign in again.\n\nSigning out here does not revoke anything at the provider — do that in your account settings if you need to.`
57
+ : "There was no stored credential to remove. If namzu is using one, it came from your environment or from another tool on this machine, and neither is namzu's to delete.";
58
+ }
59
+ /**
60
+ * Whether a `/login` argument is an attempt to finish, rather than to start.
61
+ *
62
+ * Bare `/login` starts an attempt; `/login <something>` finishes one. Drawn
63
+ * here rather than in the command so the rule is testable and so the command
64
+ * cannot quietly grow a third meaning.
65
+ */
66
+ export function isCompletionArgument(args) {
67
+ return args.join(' ').trim().length > 0;
68
+ }
69
+ //# sourceMappingURL=login-prompt.js.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G,CAAC,CAAA;AACxC,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Hand a URL to whatever the machine opens URLs with, or say it could not.
3
+ *
4
+ * ## No shell, ever
5
+ *
6
+ * The URL this receives carries operator-visible parameters and is built from
7
+ * a template, so the tempting Windows spelling — `cmd /c start <url>` — is the
8
+ * one to avoid on principle rather than after an incident: `cmd.exe` re-parses
9
+ * `&`, `|`, `^` and friends BEFORE `start` sees them, which makes any URL a
10
+ * command line. `rundll32 url.dll,FileProtocolHandler` takes the address as an
11
+ * argument and nothing re-reads it, and the launcher is invoked by absolute
12
+ * path under the system directory so a same-named executable earlier on `PATH`
13
+ * cannot answer instead.
14
+ *
15
+ * ## Best effort, reported honestly
16
+ *
17
+ * Returns whether a launcher was even STARTED, not whether a browser appeared
18
+ * — nothing on any platform tells us that. A caller must therefore print the
19
+ * URL regardless: `true` means "a browser is probably opening", never "you can
20
+ * stop reading". On a machine with no graphical session there is nothing to
21
+ * start and this says so, which is the case the paste path exists for.
22
+ */
23
+ export declare function openInBrowser(url: string): boolean;
24
+ //# sourceMappingURL=open-browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-browser.d.ts","sourceRoot":"","sources":["../../src/tui/open-browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CA+BlD"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Hand a URL to whatever the machine opens URLs with, or say it could not.
3
+ *
4
+ * ## No shell, ever
5
+ *
6
+ * The URL this receives carries operator-visible parameters and is built from
7
+ * a template, so the tempting Windows spelling — `cmd /c start <url>` — is the
8
+ * one to avoid on principle rather than after an incident: `cmd.exe` re-parses
9
+ * `&`, `|`, `^` and friends BEFORE `start` sees them, which makes any URL a
10
+ * command line. `rundll32 url.dll,FileProtocolHandler` takes the address as an
11
+ * argument and nothing re-reads it, and the launcher is invoked by absolute
12
+ * path under the system directory so a same-named executable earlier on `PATH`
13
+ * cannot answer instead.
14
+ *
15
+ * ## Best effort, reported honestly
16
+ *
17
+ * Returns whether a launcher was even STARTED, not whether a browser appeared
18
+ * — nothing on any platform tells us that. A caller must therefore print the
19
+ * URL regardless: `true` means "a browser is probably opening", never "you can
20
+ * stop reading". On a machine with no graphical session there is nothing to
21
+ * start and this says so, which is the case the paste path exists for.
22
+ */
23
+ import { spawn } from 'node:child_process';
24
+ import { platform } from 'node:os';
25
+ import { join } from 'node:path';
26
+ export function openInBrowser(url) {
27
+ // Refuse anything that is not a web address. This is handed to the
28
+ // machine's protocol handler, and `file:` or a custom scheme reaching it
29
+ // would be this function opening something nobody named.
30
+ if (!/^https?:\/\//i.test(url))
31
+ return false;
32
+ const [command, args] = platform() === 'darwin'
33
+ ? ['open', [url]]
34
+ : platform() === 'win32'
35
+ ? [
36
+ join(process.env.SystemRoot ?? 'C:\\Windows', 'System32', 'rundll32.exe'),
37
+ ['url.dll,FileProtocolHandler', url],
38
+ ]
39
+ : ['xdg-open', [url]];
40
+ try {
41
+ const child = spawn(command, args, {
42
+ stdio: 'ignore',
43
+ detached: true,
44
+ });
45
+ // A missing launcher — no `xdg-open` in a container — arrives as an
46
+ // async error event, long after this function returned. Swallowing it
47
+ // keeps a headless machine from taking the process down over a browser
48
+ // nobody was going to see; the caller already printed the URL.
49
+ child.on('error', () => { });
50
+ child.unref();
51
+ return true;
52
+ }
53
+ catch {
54
+ return false;
55
+ }
56
+ }
57
+ //# sourceMappingURL=open-browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-browser.js","sourceRoot":"","sources":["../../src/tui/open-browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,MAAM,UAAU,aAAa,CAAC,GAAW;IACxC,mEAAmE;IACnE,yEAAyE;IACzE,yDAAyD;IACzD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAA;IAE5C,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,GACpB,QAAQ,EAAE,KAAK,QAAQ;QACtB,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;QACjB,CAAC,CAAC,QAAQ,EAAE,KAAK,OAAO;YACvB,CAAC,CAAC;gBACA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,aAAa,EAAE,UAAU,EAAE,cAAc,CAAC;gBACzE,CAAC,6BAA6B,EAAE,GAAG,CAAC;aACpC;YACF,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;IAExB,IAAI,CAAC;QACJ,MAAM,KAAK,GAAG,KAAK,CAAC,OAAiB,EAAE,IAAgB,EAAE;YACxD,KAAK,EAAE,QAAQ;YACf,QAAQ,EAAE,IAAI;SACd,CAAC,CAAA;QACF,oEAAoE;QACpE,sEAAsE;QACtE,uEAAuE;QACvE,+DAA+D;QAC/D,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;QAC3B,KAAK,CAAC,KAAK,EAAE,CAAA;QACb,OAAO,IAAI,CAAA;IACZ,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAA;IACb,CAAC;AACF,CAAC"}
@@ -70,6 +70,22 @@ export type SlashAction = {
70
70
  | {
71
71
  kind: 'prompt';
72
72
  text: string;
73
+ }
74
+ /**
75
+ * Sign in to a subscription without leaving namzu.
76
+ *
77
+ * Bare `/login` STARTS an attempt; `/login <address-or-code>` FINISHES the
78
+ * one in flight. Two verbs on one command because they are one act from
79
+ * where the operator sits, and because the second is the whole point on a
80
+ * machine whose browser is somewhere else — a container, a remote shell.
81
+ * The distinction is `pasted`, and this module decides it (see
82
+ * `isCompletionArgument`) so App never has to parse an argument.
83
+ */
84
+ | {
85
+ kind: 'login';
86
+ pasted?: string;
87
+ } | {
88
+ kind: 'logout';
73
89
  } | {
74
90
  kind: 'none';
75
91
  };
@@ -1 +1 @@
1
- {"version":3,"file":"slashCommands.d.ts","sourceRoot":"","sources":["../../src/tui/slashCommands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,OAAO,EAAE,KAAK,WAAW,EAAiB,MAAM,2BAA2B,CAAA;AAE3E,MAAM,MAAM,WAAW,GACpB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE;AACpB;;;;;;;GAOG;GACD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE;AAC5C;;;;;;;GAOG;GACD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEnB,MAAM,WAAW,YAAY;IAC5B;;;;;;;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EAAqE;AACrE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,YAAY,CAAC,aAAa,CAAC,GAAG,MAAM,CA2DlF;AAoDD,oEAAoE;AACpE,wBAAgB,YAAY,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAYhE;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,GAAG,WAAW,GAAG,IAAI,CAwB5E"}
@@ -23,6 +23,7 @@
23
23
  * to "does block 4 exist" in two places at once.
24
24
  */
25
25
  import { expandCommand } from '../user-commands/store.js';
26
+ import { isCompletionArgument } from './login-prompt.js';
26
27
  /**
27
28
  * Autocomplete matches for a composer value that is a command-in-progress
28
29
  * (`/`, `/me`, `/mo…` — slash + a partial name, no space yet). Returns []
@@ -187,6 +188,18 @@ export const SLASH_COMMANDS = [
187
188
  description: 'Re-open the provider picker to switch the primary provider.',
188
189
  action: () => ({ kind: 'repick' }),
189
190
  },
191
+ {
192
+ name: 'login',
193
+ description: 'Sign in with a subscription: /login, then /login <address> if asked.',
194
+ action: (_ctx, args) => isCompletionArgument(args)
195
+ ? { kind: 'login', pasted: args.join(' ').trim() }
196
+ : { kind: 'login' },
197
+ },
198
+ {
199
+ name: 'logout',
200
+ description: 'Remove the subscription credential namzu stored on this machine.',
201
+ action: () => ({ kind: 'logout' }),
202
+ },
190
203
  {
191
204
  name: 'cost',
192
205
  description: 'Show tokens and spend for this run.',
@@ -1 +1 @@
1
- {"version":3,"file":"slashCommands.js","sourceRoot":"","sources":["../../src/tui/slashCommands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,EAAoB,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAyH3E;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CACjC,KAAa,EACb,eAAuC,EAAE;IAEzC,MAAM,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACp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,IAAY,EAAE,GAAiB;IACvD,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;IAC/B,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IAExB,6EAA6E;IAC7E,6EAA6E;IAC7E,0EAA0E;IAC1E,0BAA0B;IAC1B,MAAM,GAAG,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,CAAA;IAC9D,IAAI,GAAG;QAAE,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;IAE5C,MAAM,IAAI,GAAG,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,CAAA;IACjE,IAAI,IAAI,EAAE,CAAC;QACV,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;QAC3D,OAAO,QAAQ,CAAC,EAAE;YACjB,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,MAAM,EAAE;YAC3C,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAA;IACjE,CAAC;IAED,OAAO;QACN,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,qBAAqB,MAAM,CAAC,IAAI,cAAc;KACvD,CAAA;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@namzu/cli",
3
- "version": "8.1.0",
3
+ "version": "8.3.0",
4
4
  "description": "Operator CLI for the Namzu agent platform — namzu doctor + future commands. Dual-purpose: standalone bin (`namzu doctor`) and library (`import { runDoctor } from '@namzu/cli'`).",
5
5
  "keywords": [
6
6
  "namzu",
@@ -44,11 +44,11 @@
44
44
  "ink": "^7.0.3",
45
45
  "react": "^19.2.6",
46
46
  "yaml": "^2.9.0",
47
- "@namzu/ollama": "2.1.0",
47
+ "@namzu/anthropic": "3.2.0",
48
48
  "@namzu/openai": "1.2.0",
49
49
  "@namzu/sdk": "^21.1.0",
50
50
  "@namzu/openrouter": "2.1.0",
51
- "@namzu/anthropic": "3.2.0"
51
+ "@namzu/ollama": "2.1.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@biomejs/biome": "^1.9.4",