@mnemom/mnemom 0.17.4-next.2 → 0.17.4-next.3
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.
|
@@ -196,6 +196,21 @@ function deleteKey(cfg, key) {
|
|
|
196
196
|
case "context_profile":
|
|
197
197
|
delete cfg.contextProfile;
|
|
198
198
|
break;
|
|
199
|
+
case "auth":
|
|
200
|
+
delete cfg.auth;
|
|
201
|
+
break;
|
|
202
|
+
case "context":
|
|
203
|
+
delete cfg.context;
|
|
204
|
+
break;
|
|
205
|
+
case "slack_channel":
|
|
206
|
+
delete cfg.slackChannel;
|
|
207
|
+
break;
|
|
208
|
+
case "slack_listen":
|
|
209
|
+
delete cfg.slackListen;
|
|
210
|
+
break;
|
|
211
|
+
case "slack_allow":
|
|
212
|
+
delete cfg.slackAllow;
|
|
213
|
+
break;
|
|
199
214
|
default:
|
|
200
215
|
requireSpec(key); // throws the known-keys message for anything unknown
|
|
201
216
|
}
|
|
@@ -46,8 +46,6 @@ export type UnsupportedLogin = Extract<ClaudeLogin, {
|
|
|
46
46
|
/** Why a detected login can't be used through the gateway. */
|
|
47
47
|
export declare function unsupportedReason(login: UnsupportedLogin): string;
|
|
48
48
|
export declare const MENU_SUBSCRIPTION = "Claude subscription \u2014 Team or Enterprise (your claude.ai login)";
|
|
49
|
-
export declare const MENU_CONSOLE = "Anthropic Console login (not supported yet)";
|
|
50
|
-
export declare const MENU_THIRD_PARTY = "Amazon Bedrock / Google Vertex AI / Microsoft Foundry (not supported yet)";
|
|
51
49
|
export declare const MENU_API_KEY = "Anthropic API key";
|
|
52
50
|
export interface ChooseAuthDeps {
|
|
53
51
|
login: ClaudeLogin;
|
|
@@ -61,7 +59,7 @@ export interface ChooseAuthDeps {
|
|
|
61
59
|
* - No Claude login detected → api-key, silently, nothing saved (today's behaviour).
|
|
62
60
|
* - A login we can't use → api-key, say why once, save it so the note isn't repeated.
|
|
63
61
|
* - Team/Enterprise and non-interactive → api-key, nothing saved (never switch a script's
|
|
64
|
-
* auth without asking); interactive →
|
|
62
|
+
* auth without asking); interactive → a two-option menu (subscription or API key), answer saved.
|
|
65
63
|
*/
|
|
66
64
|
export declare function chooseAuth(deps: ChooseAuthDeps): Promise<AgentAuth>;
|
|
67
65
|
/** True when `auth` is already decided: `--auth`, or MNEMOM_AGENT_AUTH (launcher.toml folds in). */
|
package/dist/lib/login-detect.js
CHANGED
|
@@ -66,8 +66,6 @@ export function unsupportedReason(login) {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
export const MENU_SUBSCRIPTION = "Claude subscription — Team or Enterprise (your claude.ai login)";
|
|
69
|
-
export const MENU_CONSOLE = "Anthropic Console login (not supported yet)";
|
|
70
|
-
export const MENU_THIRD_PARTY = "Amazon Bedrock / Google Vertex AI / Microsoft Foundry (not supported yet)";
|
|
71
69
|
export const MENU_API_KEY = "Anthropic API key";
|
|
72
70
|
const SAVED_HINT = "change it any time with `mnemom agent config set auth api-key|subscription`";
|
|
73
71
|
function save(deps, auth, line) {
|
|
@@ -85,7 +83,7 @@ function save(deps, auth, line) {
|
|
|
85
83
|
* - No Claude login detected → api-key, silently, nothing saved (today's behaviour).
|
|
86
84
|
* - A login we can't use → api-key, say why once, save it so the note isn't repeated.
|
|
87
85
|
* - Team/Enterprise and non-interactive → api-key, nothing saved (never switch a script's
|
|
88
|
-
* auth without asking); interactive →
|
|
86
|
+
* auth without asking); interactive → a two-option menu (subscription or API key), answer saved.
|
|
89
87
|
*/
|
|
90
88
|
export async function chooseAuth(deps) {
|
|
91
89
|
const { login } = deps;
|
|
@@ -96,21 +94,19 @@ export async function chooseAuth(deps) {
|
|
|
96
94
|
}
|
|
97
95
|
if (!deps.interactive)
|
|
98
96
|
return "api-key";
|
|
99
|
-
|
|
97
|
+
// Only options that work. The earlier menu also listed Console and Bedrock/Vertex/Foundry
|
|
98
|
+
// as "(not supported yet)" entries that re-asked when picked: a dead end. Operator ruling
|
|
99
|
+
// (2026-10-01): the product never offers a choice it can't fulfil, and never advertises
|
|
100
|
+
// what's coming. A login type comes back here only once it works end to end. Those logins
|
|
101
|
+
// already skip this menu above with a one-line reason.
|
|
102
|
+
const options = [MENU_SUBSCRIPTION, MENU_API_KEY];
|
|
100
103
|
const question = `mnemom agent: Claude Code is signed in with your Claude ${login.plan} plan. How should it sign in through Mnemom?`;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return save(deps, "api-key", "mnemom agent: using an Anthropic API key.");
|
|
108
|
-
}
|
|
109
|
-
if (picked === MENU_CONSOLE || picked === MENU_THIRD_PARTY) {
|
|
110
|
-
deps.say("mnemom agent: that one isn't supported yet — pick 1 or 4.");
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
break; // no answer (EOF / out of range): don't loop forever
|
|
104
|
+
const picked = await deps.select(question, options);
|
|
105
|
+
if (picked === MENU_SUBSCRIPTION) {
|
|
106
|
+
return save(deps, "subscription", "mnemom agent: using your Claude subscription login.");
|
|
107
|
+
}
|
|
108
|
+
if (picked === MENU_API_KEY) {
|
|
109
|
+
return save(deps, "api-key", "mnemom agent: using an Anthropic API key.");
|
|
114
110
|
}
|
|
115
111
|
deps.say("mnemom agent: no choice made — using an Anthropic API key for this launch.");
|
|
116
112
|
return "api-key";
|