@posthog/wizard 2.3.0 → 2.4.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.
- package/dist/src/lib/__tests__/agent-interface.test.js +22 -0
- package/dist/src/lib/__tests__/agent-interface.test.js.map +1 -1
- package/dist/src/lib/agent-interface.d.ts +20 -2
- package/dist/src/lib/agent-interface.js +97 -14
- package/dist/src/lib/agent-interface.js.map +1 -1
- package/dist/src/lib/agent-runner.js +17 -5
- package/dist/src/lib/agent-runner.js.map +1 -1
- package/dist/src/lib/api.d.ts +4 -4
- package/dist/src/lib/constants.d.ts +1 -1
- package/dist/src/lib/version.d.ts +1 -1
- package/dist/src/lib/version.js +1 -1
- package/dist/src/lib/version.js.map +1 -1
- package/dist/src/lib/wizard-session.d.ts +2 -0
- package/dist/src/lib/wizard-session.js +1 -0
- package/dist/src/lib/wizard-session.js.map +1 -1
- package/dist/src/steps/add-mcp-server-to-clients/clients/zed.d.ts +6 -6
- package/dist/src/ui/logging-ui.d.ts +3 -1
- package/dist/src/ui/logging-ui.js +6 -6
- package/dist/src/ui/logging-ui.js.map +1 -1
- package/dist/src/ui/tui/ink-ui.d.ts +3 -1
- package/dist/src/ui/tui/ink-ui.js +5 -2
- package/dist/src/ui/tui/ink-ui.js.map +1 -1
- package/dist/src/ui/tui/router.d.ts +3 -1
- package/dist/src/ui/tui/router.js +2 -0
- package/dist/src/ui/tui/router.js.map +1 -1
- package/dist/src/ui/tui/screen-registry.js +4 -0
- package/dist/src/ui/tui/screen-registry.js.map +1 -1
- package/dist/src/ui/tui/screens/AuthErrorScreen.d.ts +7 -0
- package/dist/src/ui/tui/screens/AuthErrorScreen.js +16 -0
- package/dist/src/ui/tui/screens/AuthErrorScreen.js.map +1 -0
- package/dist/src/ui/tui/screens/ManagedSettingsScreen.d.ts +13 -0
- package/dist/src/ui/tui/screens/ManagedSettingsScreen.js +32 -0
- package/dist/src/ui/tui/screens/ManagedSettingsScreen.js.map +1 -0
- package/dist/src/ui/tui/screens/SettingsOverrideScreen.d.ts +0 -4
- package/dist/src/ui/tui/screens/SettingsOverrideScreen.js +13 -7
- package/dist/src/ui/tui/screens/SettingsOverrideScreen.js.map +1 -1
- package/dist/src/ui/tui/store.d.ts +4 -1
- package/dist/src/ui/tui/store.js +16 -3
- package/dist/src/ui/tui/store.js.map +1 -1
- package/dist/src/ui/wizard-ui.d.ts +4 -2
- package/dist/src/ui/wizard-ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wizard-session.js","sourceRoot":"","sources":["../../../src/lib/wizard-session.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;
|
|
1
|
+
{"version":3,"file":"wizard-session.js","sourceRoot":"","sources":["../../../src/lib/wizard-session.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AA+IH,oCAoDC;AA5LD,SAAS,iBAAiB,CAAC,KAAyB;IAClD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IAC1D,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACxB,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACtD,CAAC;AAID,sEAAsE;AACtE,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,mDAAmD;IACnD,yBAAa,CAAA;IACb,+BAA+B;IAC/B,+BAAmB,CAAA;IACnB,sCAAsC;IACtC,mCAAuB,CAAA;IACvB,uCAAuC;IACvC,2BAAe,CAAA;AACjB,CAAC,EATW,QAAQ,wBAAR,QAAQ,QASnB;AAED,4DAA4D;AAC5D,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,gCAAW,CAAA;AACb,CAAC,EAHW,iBAAiB,iCAAjB,iBAA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SAAS,EAAE,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC;QAE5C,cAAc,EAAE,KAAK;QACrB,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,IAAI;QACrC,gBAAgB,EAAE,EAAE;QACpB,UAAU,EAAE,KAAK;QACjB,sBAAsB,EAAE,IAAI;QAC5B,iBAAiB,EAAE,KAAK;QACxB,kBAAkB,EAAE,IAAI;QAExB,QAAQ,EAAE,QAAQ,CAAC,IAAI;QACvB,kBAAkB,EAAE,EAAE;QACtB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,KAAK;QAClB,UAAU,EAAE,IAAI;QAChB,mBAAmB,EAAE,EAAE;QACvB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,IAAI;QACjB,eAAe,EAAE,IAAI;QACrB,eAAe,EAAE,KAAK;QACtB,oBAAoB,EAAE,IAAI;QAC1B,iBAAiB,EAAE,IAAI;QACvB,mBAAmB,EAAE,IAAI;QACzB,SAAS,EAAE,IAAI;QACf,sBAAsB,EAAE,EAAE;QAC1B,eAAe,EAAE,IAAI;KACtB,CAAC;AACJ,CAAC","sourcesContent":["/**\n * WizardSession — single source of truth for every decision the wizard needs.\n *\n * Populated in layers:\n * CLI args / env vars → populate fields directly\n * Auto-detection → framework, typescript, package manager\n * TUI screens → region, framework disambiguation, etc.\n * OAuth → credentials\n *\n * Business logic reads from the session. Never calls a prompt.\n */\n\nimport type { Integration } from './constants';\nimport type { FrameworkConfig } from './framework-config';\nimport type { WizardReadinessResult } from './health-checks/readiness';\nimport type { SettingsConflict } from './agent-interface';\n\nfunction parseProjectIdArg(value: string | undefined): number | undefined {\n if (value === undefined || value === '') return undefined;\n const n = Number(value);\n return Number.isInteger(n) && n > 0 ? n : undefined;\n}\n\nexport type CloudRegion = 'us' | 'eu';\n\n/** Lifecycle phase of the main work (agent run, MCP install, etc.) */\nexport enum RunPhase {\n /** Still gathering input (intro, setup screens) */\n Idle = 'idle',\n /** Main work is in progress */\n Running = 'running',\n /** Main work finished successfully */\n Completed = 'completed',\n /** Main work finished with an error */\n Error = 'error',\n}\n\n/** Features discovered by the feature-discovery subagent */\nexport enum DiscoveredFeature {\n Stripe = 'stripe',\n LLM = 'llm',\n}\n\n/** Additional features the agent can integrate after the main setup */\nexport enum AdditionalFeature {\n LLM = 'llm',\n}\n\n/** Human-readable labels for additional features (used in TUI progress) */\nexport const ADDITIONAL_FEATURE_LABELS: Record<AdditionalFeature, string> = {\n [AdditionalFeature.LLM]: 'LLM analytics',\n};\n\n/** Agent prompts for each additional feature, injected via the stop hook */\nexport const ADDITIONAL_FEATURE_PROMPTS: Record<AdditionalFeature, string> = {\n [AdditionalFeature.LLM]: `Now integrate LLM analytics with PostHog. Use the PostHog MCP server to find the appropriate LLM analytics skill, install it, and follow its workflow. PostHog basics are already installed. Update the setup report markdown file when complete with additions from this task. `,\n};\n\n/** Outcome of the MCP server installation step */\nexport enum McpOutcome {\n NoClients = 'no_clients',\n Skipped = 'skipped',\n Installed = 'installed',\n Failed = 'failed',\n}\n\n/** Outcome kind for the outro screen */\nexport enum OutroKind {\n Success = 'success',\n Error = 'error',\n Cancel = 'cancel',\n}\n\nexport interface OutroData {\n kind: OutroKind;\n message?: string;\n changes?: string[];\n docsUrl?: string;\n continueUrl?: string;\n}\n\nexport interface WizardSession {\n // From CLI args\n debug: boolean;\n forceInstall: boolean;\n installDir: string;\n ci: boolean;\n signup: boolean;\n localMcp: boolean;\n apiKey?: string;\n menu: boolean;\n benchmark: boolean;\n yaraReport: boolean;\n projectId?: number;\n\n // From detection + screens\n setupConfirmed: boolean;\n integration: Integration | null;\n frameworkContext: Record<string, unknown>;\n typescript: boolean;\n\n /** Human-readable label for the detected framework variant (e.g., \"Django with Wagtail CMS\") */\n detectedFrameworkLabel: string | null;\n\n /** True once framework detection has run (whether it found something or not) */\n detectionComplete: boolean;\n\n /** Set when the detected framework version is too old for the wizard */\n unsupportedVersion: {\n current: string;\n minimum: string;\n docsUrl: string;\n } | null;\n\n // From OAuth\n credentials: {\n accessToken: string;\n projectApiKey: string;\n host: string;\n projectId: number;\n } | null;\n\n // Lifecycle\n runPhase: RunPhase;\n loginUrl: string | null;\n\n // Feature discovery\n discoveredFeatures: DiscoveredFeature[];\n llmOptIn: boolean;\n\n // Screen completion\n mcpComplete: boolean;\n mcpOutcome: McpOutcome | null;\n mcpInstalledClients: string[];\n\n // Runtime\n readinessResult: WizardReadinessResult | null;\n outageDismissed: boolean;\n settingsOverrideKeys: string[] | null;\n settingsConflicts: SettingsConflict[] | null;\n portConflictProcess: { command: string; pid: string; user: string } | null;\n outroData: OutroData | null;\n\n // Additional features queue (drained via stop hook after main integration)\n additionalFeatureQueue: AdditionalFeature[];\n\n // Resolved framework config (set after integration is known)\n frameworkConfig: FrameworkConfig | null;\n}\n\n/**\n * Build a WizardSession from CLI args, pre-populating whatever is known.\n */\nexport function buildSession(args: {\n debug?: boolean;\n forceInstall?: boolean;\n installDir?: string;\n ci?: boolean;\n signup?: boolean;\n localMcp?: boolean;\n apiKey?: string;\n menu?: boolean;\n integration?: Integration;\n benchmark?: boolean;\n yaraReport?: boolean;\n projectId?: string;\n}): WizardSession {\n return {\n debug: args.debug ?? false,\n forceInstall: args.forceInstall ?? false,\n installDir: args.installDir ?? process.cwd(),\n ci: args.ci ?? false,\n signup: args.signup ?? false,\n localMcp: args.localMcp ?? false,\n apiKey: args.apiKey,\n menu: args.menu ?? false,\n benchmark: args.benchmark ?? false,\n yaraReport: args.yaraReport ?? false,\n projectId: parseProjectIdArg(args.projectId),\n\n setupConfirmed: false,\n integration: args.integration ?? null,\n frameworkContext: {},\n typescript: false,\n detectedFrameworkLabel: null,\n detectionComplete: false,\n unsupportedVersion: null,\n\n runPhase: RunPhase.Idle,\n discoveredFeatures: [],\n llmOptIn: false,\n mcpComplete: false,\n mcpOutcome: null,\n mcpInstalledClients: [],\n loginUrl: null,\n credentials: null,\n readinessResult: null,\n outageDismissed: false,\n settingsOverrideKeys: null,\n settingsConflicts: null,\n portConflictProcess: null,\n outroData: null,\n additionalFeatureQueue: [],\n frameworkConfig: null,\n };\n}\n"]}
|
|
@@ -9,16 +9,16 @@ export declare const ZedMCPConfig: z.ZodObject<{
|
|
|
9
9
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
11
|
command?: string | undefined;
|
|
12
|
+
source?: string | undefined;
|
|
12
13
|
args?: string[] | undefined;
|
|
13
14
|
env?: Record<string, string> | undefined;
|
|
14
15
|
enabled?: boolean | undefined;
|
|
15
|
-
source?: string | undefined;
|
|
16
16
|
}, {
|
|
17
17
|
command?: string | undefined;
|
|
18
|
+
source?: string | undefined;
|
|
18
19
|
args?: string[] | undefined;
|
|
19
20
|
env?: Record<string, string> | undefined;
|
|
20
21
|
enabled?: boolean | undefined;
|
|
21
|
-
source?: string | undefined;
|
|
22
22
|
}>, z.ZodObject<{
|
|
23
23
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
24
24
|
url: z.ZodString;
|
|
@@ -41,16 +41,16 @@ export declare const ZedMCPConfig: z.ZodObject<{
|
|
|
41
41
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
42
42
|
}, "strip", z.ZodTypeAny, {
|
|
43
43
|
command?: string | undefined;
|
|
44
|
+
source?: string | undefined;
|
|
44
45
|
args?: string[] | undefined;
|
|
45
46
|
env?: Record<string, string> | undefined;
|
|
46
47
|
enabled?: boolean | undefined;
|
|
47
|
-
source?: string | undefined;
|
|
48
48
|
}, {
|
|
49
49
|
command?: string | undefined;
|
|
50
|
+
source?: string | undefined;
|
|
50
51
|
args?: string[] | undefined;
|
|
51
52
|
env?: Record<string, string> | undefined;
|
|
52
53
|
enabled?: boolean | undefined;
|
|
53
|
-
source?: string | undefined;
|
|
54
54
|
}>, z.ZodObject<{
|
|
55
55
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
56
56
|
url: z.ZodString;
|
|
@@ -73,16 +73,16 @@ export declare const ZedMCPConfig: z.ZodObject<{
|
|
|
73
73
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
74
74
|
}, "strip", z.ZodTypeAny, {
|
|
75
75
|
command?: string | undefined;
|
|
76
|
+
source?: string | undefined;
|
|
76
77
|
args?: string[] | undefined;
|
|
77
78
|
env?: Record<string, string> | undefined;
|
|
78
79
|
enabled?: boolean | undefined;
|
|
79
|
-
source?: string | undefined;
|
|
80
80
|
}, {
|
|
81
81
|
command?: string | undefined;
|
|
82
|
+
source?: string | undefined;
|
|
82
83
|
args?: string[] | undefined;
|
|
83
84
|
env?: Record<string, string> | undefined;
|
|
84
85
|
enabled?: boolean | undefined;
|
|
85
|
-
source?: string | undefined;
|
|
86
86
|
}>, z.ZodObject<{
|
|
87
87
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
88
88
|
url: z.ZodString;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* No prompts, no TUI, no interactivity. Just console output.
|
|
4
4
|
*/
|
|
5
5
|
import { type WizardUI, type SpinnerHandle } from './wizard-ui';
|
|
6
|
+
import type { SettingsConflict } from '../lib/agent-interface';
|
|
6
7
|
export declare class LoggingUI implements WizardUI {
|
|
7
8
|
intro(message: string): void;
|
|
8
9
|
outro(message: string): void;
|
|
@@ -27,7 +28,8 @@ export declare class LoggingUI implements WizardUI {
|
|
|
27
28
|
pid: string;
|
|
28
29
|
user: string;
|
|
29
30
|
}): Promise<void>;
|
|
30
|
-
showSettingsOverride(
|
|
31
|
+
showSettingsOverride(_conflicts: SettingsConflict[], _backupAndFix: () => boolean): Promise<void>;
|
|
32
|
+
showAuthError(): void;
|
|
31
33
|
startRun(): void;
|
|
32
34
|
setCredentials(_credentials: {
|
|
33
35
|
accessToken: string;
|
|
@@ -85,14 +85,14 @@ class LoggingUI {
|
|
|
85
85
|
showPortConflict(_processInfo) {
|
|
86
86
|
return Promise.resolve();
|
|
87
87
|
}
|
|
88
|
-
showSettingsOverride(
|
|
89
|
-
console.log(`▲ Security warning: .claude/settings.json overrides detected`);
|
|
90
|
-
for (const key of keys) {
|
|
91
|
-
console.log(`│ • ${key}`);
|
|
92
|
-
}
|
|
93
|
-
console.log(`│ These overrides prevent the Wizard from accessing the PostHog LLM Gateway.`);
|
|
88
|
+
showSettingsOverride(_conflicts, _backupAndFix) {
|
|
94
89
|
return Promise.resolve();
|
|
95
90
|
}
|
|
91
|
+
showAuthError() {
|
|
92
|
+
console.log(`✖ Authentication failed (401)`);
|
|
93
|
+
console.log(`│ Claude Code auth is conflicting with the wizard. Please try again after logging out:`);
|
|
94
|
+
console.log(`│ claude auth logout`);
|
|
95
|
+
}
|
|
96
96
|
startRun() {
|
|
97
97
|
// No-op in CI mode
|
|
98
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging-ui.js","sourceRoot":"","sources":["../../../src/ui/logging-ui.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B;;;GAGG;;;AAEH,2CAA4E;
|
|
1
|
+
{"version":3,"file":"logging-ui.js","sourceRoot":"","sources":["../../../src/ui/logging-ui.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B;;;GAGG;;;AAEH,2CAA4E;AAG5E,MAAa,SAAS;IACpB,KAAK,CAAC,OAAe;QACnB,OAAO,CAAC,GAAG,CAAC,MAAM,OAAO,EAAE,CAAC,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,OAAe;QACnB,OAAO,CAAC,GAAG,CAAC,MAAM,OAAO,EAAE,CAAC,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,OAAe;QACpB,OAAO,CAAC,GAAG,CAAC,MAAM,OAAO,EAAE,CAAC,CAAC;IAC/B,CAAC;IAED,GAAG,GAAG;QACJ,IAAI,CAAC,OAAe;YAClB,OAAO,CAAC,GAAG,CAAC,MAAM,OAAO,EAAE,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,CAAC,OAAe;YAClB,OAAO,CAAC,GAAG,C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C,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,sBAAU,CAAC,UAAU,CAAC,CAAC;QACzE,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CACT,OAAO,SAAS,IAAI,KAAK,CAAC,MAAM,KAC9B,UAAU,CAAC,UAAU,IAAI,UAAU,CAAC,OACtC,EAAE,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IAED,YAAY,CAAC,OAAqD;QAChE,mBAAmB;IACrB,CAAC;CACF;AAnJD,8BAmJC","sourcesContent":["/* eslint-disable no-console */\n/**\n * LoggingUI — Logging-only implementation for CI mode.\n * No prompts, no TUI, no interactivity. Just console output.\n */\n\nimport { TaskStatus, type WizardUI, type SpinnerHandle } from './wizard-ui';\nimport type { SettingsConflict } from '../lib/agent-interface';\n\nexport class LoggingUI implements WizardUI {\n intro(message: string): void {\n console.log(`┌ ${message}`);\n }\n\n outro(message: string): void {\n console.log(`└ ${message}`);\n }\n\n cancel(message: string): void {\n console.log(`■ ${message}`);\n }\n\n log = {\n info(message: string): void {\n console.log(`│ ${message}`);\n },\n warn(message: string): void {\n console.log(`▲ ${message}`);\n },\n error(message: string): void {\n console.log(`✖ ${message}`);\n },\n success(message: string): void {\n console.log(`✔ ${message}`);\n },\n step(message: string): void {\n console.log(`◇ ${message}`);\n },\n };\n\n note(message: string): void {\n console.log(`│ ${message}`);\n }\n\n spinner(): SpinnerHandle {\n return {\n start(message?: string) {\n if (message) console.log(`◌ ${message}`);\n },\n stop(message?: string) {\n if (message) console.log(`● ${message}`);\n },\n message(msg?: string) {\n if (msg) console.log(`◌ ${msg}`);\n },\n };\n }\n\n pushStatus(message: string): void {\n console.log(`◇ ${message}`);\n }\n\n setDetectedFramework(label: string): void {\n console.log(`✔ Framework: ${label}`);\n }\n\n onEnterScreen(_screen: string, _fn: () => void): void {\n // No screen transitions in CI\n }\n\n setLoginUrl(url: string | null): void {\n if (url) {\n console.log(\n `│ If the browser didn't open automatically, use this link:`,\n );\n console.log(`│ ${url}`);\n }\n }\n\n showBlockingOutage(\n result: import('../lib/health-checks/readiness.js').WizardReadinessResult,\n ): Promise<void> {\n console.log(`▲ Service health issues detected — blocking outage.`);\n for (const reason of result.reasons) {\n console.log(`│ ${reason}`);\n }\n console.log(\n `│ The wizard may not work reliably while services are affected.`,\n );\n return Promise.resolve();\n }\n\n setReadinessWarnings(\n result: import('../lib/health-checks/readiness.js').WizardReadinessResult,\n ): void {\n console.log(`▲ Service health warnings detected.`);\n for (const reason of result.reasons) {\n console.log(`│ ${reason}`);\n }\n }\n\n showPortConflict(_processInfo: {\n command: string;\n pid: string;\n user: string;\n }): Promise<void> {\n return Promise.resolve();\n }\n\n showSettingsOverride(\n _conflicts: SettingsConflict[],\n _backupAndFix: () => boolean,\n ): Promise<void> {\n return Promise.resolve();\n }\n\n showAuthError(): void {\n console.log(`✖ Authentication failed (401)`);\n console.log(\n `│ Claude Code auth is conflicting with the wizard. Please try again after logging out:`,\n );\n console.log(`│ claude auth logout`);\n }\n\n startRun(): void {\n // No-op in CI mode\n }\n\n setCredentials(_credentials: {\n accessToken: string;\n projectApiKey: string;\n host: string;\n projectId: number;\n }): void {\n // No-op in CI mode — credentials are handled directly\n }\n\n syncTodos(\n todos: Array<{ content: string; status: string; activeForm?: string }>,\n ): void {\n const completed = todos.filter(\n (t) => t.status === TaskStatus.Completed,\n ).length;\n const inProgress = todos.find((t) => t.status === TaskStatus.InProgress);\n if (inProgress) {\n console.log(\n `◌ [${completed}/${todos.length}] ${\n inProgress.activeForm || inProgress.content\n }`,\n );\n }\n }\n\n setEventPlan(_events: Array<{ name: string; description: string }>): void {\n // No-op in CI mode\n }\n}\n"]}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { WizardUI, SpinnerHandle } from '../wizard-ui.js';
|
|
9
9
|
import type { WizardStore } from './store.js';
|
|
10
|
+
import type { SettingsConflict } from '../../lib/agent-interface.js';
|
|
10
11
|
export declare class InkUI implements WizardUI {
|
|
11
12
|
private store;
|
|
12
13
|
constructor(store: WizardStore);
|
|
@@ -28,7 +29,8 @@ export declare class InkUI implements WizardUI {
|
|
|
28
29
|
pid: string;
|
|
29
30
|
user: string;
|
|
30
31
|
}): Promise<void>;
|
|
31
|
-
showSettingsOverride(
|
|
32
|
+
showSettingsOverride(conflicts: SettingsConflict[], backupAndFix: () => boolean): Promise<void>;
|
|
33
|
+
showAuthError(): void;
|
|
32
34
|
startRun(): void;
|
|
33
35
|
cancel(message: string): void;
|
|
34
36
|
log: {
|
|
@@ -57,8 +57,11 @@ export class InkUI {
|
|
|
57
57
|
showPortConflict(processInfo) {
|
|
58
58
|
return this.store.showPortConflict(processInfo);
|
|
59
59
|
}
|
|
60
|
-
showSettingsOverride(
|
|
61
|
-
return this.store.showSettingsOverride(
|
|
60
|
+
showSettingsOverride(conflicts, backupAndFix) {
|
|
61
|
+
return this.store.showSettingsOverride(conflicts, backupAndFix);
|
|
62
|
+
}
|
|
63
|
+
showAuthError() {
|
|
64
|
+
this.store.showAuthError();
|
|
62
65
|
}
|
|
63
66
|
startRun() {
|
|
64
67
|
this.store.setRunPhase(RunPhase.Running);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ink-ui.js","sourceRoot":"","sources":["../../../../src/ui/tui/ink-ui.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"ink-ui.js","sourceRoot":"","sources":["../../../../src/ui/tui/ink-ui.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAElE,0DAA0D;AAC1D,4CAA4C;AAC5C,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAClC,SAAS,SAAS,CAAC,CAAS;IAC1B,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,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AC,OAAO,CAAC,CAAC;QACjC,CAAC;KACF,CAAC;IAEF,IAAI,CAAC,OAAe;QAClB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IAED,OAAO;QACL,OAAO;YACL,KAAK,EAAE,CAAC,OAAgB,EAAE,EAAE;gBAC1B,IAAI,OAAO;oBAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YAC9C,CAAC;YACD,IAAI,EAAE,CAAC,OAAgB,EAAE,EAAE;gBACzB,IAAI,OAAO;oBAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YAC9C,CAAC;YACD,OAAO,EAAE,CAAC,GAAY,EAAE,EAAE;gBACxB,IAAI,GAAG;oBAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YACtC,CAAC;SACF,CAAC;IACJ,CAAC;IAED,UAAU,CAAC,OAAe;QACxB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,CACP,KAAsE;QAEtE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,YAAY,CAAC,MAAoD;QAC/D,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;CACF","sourcesContent":["/**\n * InkUI — Ink-backed implementation of WizardUI.\n *\n * Translates business logic calls into store setter calls.\n * No direct session mutation. No imperative screen transitions.\n * The router derives the active screen from session state.\n */\n\nimport type { WizardUI, SpinnerHandle } from '../wizard-ui.js';\nimport type { WizardStore } from './store.js';\nimport type { SettingsConflict } from '../../lib/agent-interface.js';\nimport { RunPhase, OutroKind } from '../../lib/wizard-session.js';\n\n// Strip ANSI escape codes (chalk formatting) from strings\n// eslint-disable-next-line no-control-regex\nconst ANSI_RE = /\\x1b\\[[0-9;]*m/g;\nfunction stripAnsi(s: string): string {\n return s.replace(ANSI_RE, '');\n}\n\nexport class InkUI implements WizardUI {\n constructor(private store: WizardStore) {}\n\n intro(message: string): void {\n this.store.pushStatus(message);\n }\n\n outro(message: string): void {\n this.store.pushStatus(stripAnsi(message));\n\n if (!this.store.session.outroData) {\n this.store.setOutroData({\n kind: OutroKind.Success,\n message: stripAnsi(message),\n });\n }\n\n // Signal that the main work is done — router resolves to mcp or outro\n if (this.store.session.runPhase === RunPhase.Running) {\n this.store.setRunPhase(RunPhase.Completed);\n }\n }\n\n setCredentials(credentials: {\n accessToken: string;\n projectApiKey: string;\n host: string;\n projectId: number;\n }): void {\n this.store.setCredentials(credentials);\n }\n\n setDetectedFramework(label: string): void {\n this.store.setDetectedFramework(label);\n }\n\n onEnterScreen(screen: string, fn: () => void): void {\n this.store.onEnterScreen(\n screen as Parameters<WizardStore['onEnterScreen']>[0],\n fn,\n );\n }\n\n setLoginUrl(url: string | null): void {\n this.store.setLoginUrl(url);\n }\n\n showBlockingOutage(\n result: import('../../lib/health-checks/readiness.js').WizardReadinessResult,\n ): Promise<void> {\n // In the TUI, the HealthCheckScreen handles outage display.\n // This is only called from agent-runner for the CI fallback path.\n this.store.setReadinessResult(result);\n return Promise.resolve();\n }\n\n setReadinessWarnings(\n result: import('../../lib/health-checks/readiness.js').WizardReadinessResult,\n ): void {\n this.store.setReadinessResult(result);\n }\n\n showPortConflict(processInfo: {\n command: string;\n pid: string;\n user: string;\n }): Promise<void> {\n return this.store.showPortConflict(processInfo);\n }\n\n showSettingsOverride(\n conflicts: SettingsConflict[],\n backupAndFix: () => boolean,\n ): Promise<void> {\n return this.store.showSettingsOverride(conflicts, backupAndFix);\n }\n\n showAuthError(): void {\n this.store.showAuthError();\n }\n\n startRun(): void {\n this.store.setRunPhase(RunPhase.Running);\n }\n\n cancel(message: string): void {\n this.store.pushStatus(message);\n }\n\n log = {\n info: (message: string): void => {\n this.store.pushStatus(message);\n },\n warn: (message: string): void => {\n this.store.pushStatus(message);\n },\n error: (message: string): void => {\n this.store.pushStatus(message);\n },\n success: (message: string): void => {\n this.store.pushStatus(message);\n },\n step: (message: string): void => {\n this.store.pushStatus(message);\n },\n };\n\n note(message: string): void {\n this.store.pushStatus(message);\n }\n\n spinner(): SpinnerHandle {\n return {\n start: (message?: string) => {\n if (message) this.store.pushStatus(message);\n },\n stop: (message?: string) => {\n if (message) this.store.pushStatus(message);\n },\n message: (msg?: string) => {\n if (msg) this.store.pushStatus(msg);\n },\n };\n }\n\n pushStatus(message: string): void {\n this.store.pushStatus(message);\n }\n\n syncTodos(\n todos: Array<{ content: string; status: string; activeForm?: string }>,\n ): void {\n this.store.syncTodos(todos);\n }\n\n setEventPlan(events: Array<{ name: string; description: string }>): void {\n this.store.setEventPlan(events);\n }\n}\n"]}
|
|
@@ -18,7 +18,9 @@ export type { FlowEntry };
|
|
|
18
18
|
/** Screens that interrupt flows as overlays */
|
|
19
19
|
export declare enum Overlay {
|
|
20
20
|
SettingsOverride = "settings-override",
|
|
21
|
-
|
|
21
|
+
ManagedSettings = "managed-settings",
|
|
22
|
+
PortConflict = "port-conflict",
|
|
23
|
+
AuthError = "auth-error"
|
|
22
24
|
}
|
|
23
25
|
/** Union of all screen names */
|
|
24
26
|
export type ScreenName = Screen | Overlay;
|
|
@@ -19,7 +19,9 @@ export { Screen, Flow };
|
|
|
19
19
|
export var Overlay;
|
|
20
20
|
(function (Overlay) {
|
|
21
21
|
Overlay["SettingsOverride"] = "settings-override";
|
|
22
|
+
Overlay["ManagedSettings"] = "managed-settings";
|
|
22
23
|
Overlay["PortConflict"] = "port-conflict";
|
|
24
|
+
Overlay["AuthError"] = "auth-error";
|
|
23
25
|
})(Overlay || (Overlay = {}));
|
|
24
26
|
// ── Router ────────────────────────────────────────────────────────────
|
|
25
27
|
export class WizardRouter {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../../../src/ui/tui/router.ts"],"names":[],"mappings":"AAAA;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":["/**\n * WizardRouter — declarative flow pipelines + overlay stack.\n *\n * Two layers:\n * Flow cursor — linear pipeline of screens, advanced with next()\n * Overlay stack — interrupts (outage, auth-expired, etc.) that push/pop\n *\n * The visible screen is: top of overlay stack if non-empty, otherwise the flow cursor.\n *\n * Adding a flow screen = append to a pipeline array.\n * Adding an overlay = call pushOverlay() from anywhere.\n * No switch statements, no hardcoded transitions in business logic.\n */\n\nimport type { WizardSession } from '../../lib/wizard-session.js';\nimport { FLOWS, Screen, Flow, type FlowEntry } from './flows.js';\n\n// Re-export so existing imports from './router.js' keep working\nexport { Screen, Flow };\nexport type { FlowEntry };\n\n// ── Screen name taxonomy ──────────────────────────────────────────────\n\n/** Screens that interrupt flows as overlays */\nexport enum Overlay {\n SettingsOverride = 'settings-override',\n ManagedSettings = 'managed-settings',\n PortConflict = 'port-conflict',\n AuthError = 'auth-error',\n}\n\n/** Union of all screen names */\nexport type ScreenName = Screen | Overlay;\n\n// ── Router ────────────────────────────────────────────────────────────\n\nexport class WizardRouter {\n private flow: FlowEntry[];\n private flowName: Flow;\n private overlays: Overlay[] = [];\n\n constructor(flowName: Flow = Flow.Wizard) {\n this.flowName = flowName;\n this.flow = FLOWS[flowName];\n }\n\n /**\n * Resolve which screen should be active based on session state.\n * Walks the flow pipeline, skipping hidden entries and completed entries,\n * returns the first incomplete screen.\n */\n resolve(session: WizardSession): ScreenName {\n if (this.overlays.length > 0) {\n return this.overlays[this.overlays.length - 1];\n }\n\n for (const entry of this.flow) {\n if (entry.show && !entry.show(session)) continue;\n if (entry.isComplete && entry.isComplete(session)) continue;\n return entry.screen;\n }\n\n // All entries complete — show the last screen (outro)\n return this.flow[this.flow.length - 1].screen;\n }\n\n /** The screen that should be rendered right now. */\n get activeScreen(): ScreenName {\n // Overlays take priority — resolve() handles this too,\n // but activeScreen is called before session is available in some paths\n if (this.overlays.length > 0) {\n return this.overlays[this.overlays.length - 1];\n }\n return this.flow[0].screen;\n }\n\n /** The name of the active flow. */\n get activeFlow(): Flow {\n return this.flowName;\n }\n\n /** Whether an overlay is currently active. */\n get hasOverlay(): boolean {\n return this.overlays.length > 0;\n }\n\n /**\n * Push an overlay that interrupts the current flow.\n * The flow resumes when the overlay is dismissed via popOverlay().\n */\n pushOverlay(overlay: Overlay): void {\n this.overlays.push(overlay);\n }\n\n /**\n * Dismiss the topmost overlay. The flow screen underneath resumes.\n */\n popOverlay(): void {\n this.overlays.pop();\n }\n\n /**\n * Direction hint for screen transitions.\n */\n private _lastDirection: 'push' | 'pop' | null = null;\n\n get lastNavDirection(): 'push' | 'pop' | null {\n return this._lastDirection;\n }\n\n /** @internal — called by store wrapper to track direction */\n _setDirection(dir: 'push' | 'pop' | null): void {\n this._lastDirection = dir;\n }\n}\n"]}
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Screen, Overlay } from './router.js';
|
|
3
3
|
import { HealthCheckScreen } from './screens/health/HealthCheckScreen.js';
|
|
4
4
|
import { SettingsOverrideScreen } from './screens/SettingsOverrideScreen.js';
|
|
5
|
+
import { ManagedSettingsScreen } from './screens/ManagedSettingsScreen.js';
|
|
5
6
|
import { PortConflictScreen } from './screens/PortConflictScreen.js';
|
|
6
7
|
import { IntroScreen } from './screens/IntroScreen.js';
|
|
7
8
|
import { SetupScreen } from './screens/SetupScreen.js';
|
|
@@ -9,6 +10,7 @@ import { AuthScreen } from './screens/AuthScreen.js';
|
|
|
9
10
|
import { RunScreen } from './screens/RunScreen.js';
|
|
10
11
|
import { McpScreen } from './screens/McpScreen.js';
|
|
11
12
|
import { OutroScreen } from './screens/OutroScreen.js';
|
|
13
|
+
import { AuthErrorScreen } from './screens/AuthErrorScreen.js';
|
|
12
14
|
import { createMcpInstaller } from './services/mcp-installer.js';
|
|
13
15
|
export function createServices() {
|
|
14
16
|
return {
|
|
@@ -19,7 +21,9 @@ export function createScreens(store, services) {
|
|
|
19
21
|
return {
|
|
20
22
|
// Overlays
|
|
21
23
|
[Overlay.SettingsOverride]: _jsx(SettingsOverrideScreen, { store: store }),
|
|
24
|
+
[Overlay.ManagedSettings]: _jsx(ManagedSettingsScreen, { store: store }),
|
|
22
25
|
[Overlay.PortConflict]: _jsx(PortConflictScreen, { store: store }),
|
|
26
|
+
[Overlay.AuthError]: _jsx(AuthErrorScreen, {}),
|
|
23
27
|
// Wizard flow
|
|
24
28
|
[Screen.Intro]: _jsx(IntroScreen, { store: store }),
|
|
25
29
|
[Screen.HealthCheck]: _jsx(HealthCheckScreen, { store: store }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen-registry.js","sourceRoot":"","sources":["../../../../src/ui/tui/screen-registry.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAmB,MAAM,aAAa,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAOjE,MAAM,UAAU,cAAc;IAC5B,OAAO;QACL,YAAY,EAAE,kBAAkB,EAAE;KACnC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,KAAkB,EAClB,QAAwB;IAExB,OAAO;QACL,WAAW;QACX,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,KAAC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,KAAK,GAAI;QAClE,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,KAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,GAAI;QAC5D,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,KAAC,eAAe,KAAG;QAExC,cAAc;QACd,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,GAAI;QAC7C,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,GAAI;QACzD,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,GAAI;QAC7C,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,GAAI;QAC3C,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,GAAI;QACzC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,YAAY,GAAI;QAC3E,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,GAAI;QAE7C,uBAAuB;QACvB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CACf,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,YAAY,EAAE,UAAU,SAAG,CACzE;QACD,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAClB,KAAC,SAAS,IACR,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,QAAQ,CAAC,YAAY,EAChC,IAAI,EAAC,QAAQ,EACb,UAAU,SACV,CACH;KACF,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Screen registry — maps screen names to React components.\n *\n * Adding a new screen:\n * 1. Create the component in screens/\n * 2. Add an entry here\n * 3. Add the screen name to the router flow (router.ts)\n *\n * App.tsx never needs to change.\n */\n\nimport type { ReactNode } from 'react';\nimport type { WizardStore } from './store.js';\nimport { Screen, Overlay, type ScreenName } from './router.js';\n\nimport { HealthCheckScreen } from './screens/health/HealthCheckScreen.js';\nimport { SettingsOverrideScreen } from './screens/SettingsOverrideScreen.js';\nimport { ManagedSettingsScreen } from './screens/ManagedSettingsScreen.js';\nimport { PortConflictScreen } from './screens/PortConflictScreen.js';\nimport { IntroScreen } from './screens/IntroScreen.js';\nimport { SetupScreen } from './screens/SetupScreen.js';\nimport { AuthScreen } from './screens/AuthScreen.js';\nimport { RunScreen } from './screens/RunScreen.js';\nimport { McpScreen } from './screens/McpScreen.js';\nimport { OutroScreen } from './screens/OutroScreen.js';\nimport { AuthErrorScreen } from './screens/AuthErrorScreen.js';\nimport { createMcpInstaller } from './services/mcp-installer.js';\nimport type { McpInstaller } from './services/mcp-installer.js';\n\nexport interface ScreenServices {\n mcpInstaller: McpInstaller;\n}\n\nexport function createServices(): ScreenServices {\n return {\n mcpInstaller: createMcpInstaller(),\n };\n}\n\nexport function createScreens(\n store: WizardStore,\n services: ScreenServices,\n): Record<ScreenName, ReactNode> {\n return {\n // Overlays\n [Overlay.SettingsOverride]: <SettingsOverrideScreen store={store} />,\n [Overlay.ManagedSettings]: <ManagedSettingsScreen store={store} />,\n [Overlay.PortConflict]: <PortConflictScreen store={store} />,\n [Overlay.AuthError]: <AuthErrorScreen />,\n\n // Wizard flow\n [Screen.Intro]: <IntroScreen store={store} />,\n [Screen.HealthCheck]: <HealthCheckScreen store={store} />,\n [Screen.Setup]: <SetupScreen store={store} />,\n [Screen.Auth]: <AuthScreen store={store} />,\n [Screen.Run]: <RunScreen store={store} />,\n [Screen.Mcp]: <McpScreen store={store} installer={services.mcpInstaller} />,\n [Screen.Outro]: <OutroScreen store={store} />,\n\n // Standalone MCP flows\n [Screen.McpAdd]: (\n <McpScreen store={store} installer={services.mcpInstaller} standalone />\n ),\n [Screen.McpRemove]: (\n <McpScreen\n store={store}\n installer={services.mcpInstaller}\n mode=\"remove\"\n standalone\n />\n ),\n };\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AuthErrorScreen — Shown when the Anthropic API returns a 401.
|
|
3
|
+
*
|
|
4
|
+
* Claude Code's own auth can conflict with the wizard's OAuth token.
|
|
5
|
+
* This overlay tells the user to log out of Claude Code and retry.
|
|
6
|
+
*/
|
|
7
|
+
export declare const AuthErrorScreen: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* AuthErrorScreen — Shown when the Anthropic API returns a 401.
|
|
4
|
+
*
|
|
5
|
+
* Claude Code's own auth can conflict with the wizard's OAuth token.
|
|
6
|
+
* This overlay tells the user to log out of Claude Code and retry.
|
|
7
|
+
*/
|
|
8
|
+
import { Box, Text, useInput } from 'ink';
|
|
9
|
+
import { Colors } from '../styles.js';
|
|
10
|
+
export const AuthErrorScreen = () => {
|
|
11
|
+
useInput(() => {
|
|
12
|
+
process.exit(1);
|
|
13
|
+
});
|
|
14
|
+
return (_jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [_jsxs(Text, { color: "red", bold: true, children: ['\u2718', " Authentication error"] }), _jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(Text, { children: "The Wizard couldn't connect to the PostHog LLM Gateway. If you use Claude Code, its credentials might conflict with the Wizard." }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Try logging out of Claude Code temporarily and re-running the Wizard by running:" }) }), _jsx(Box, { flexDirection: "column", marginTop: 1, paddingLeft: 2, children: _jsx(Text, { color: "cyan", children: "claude auth logout" }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: Colors.muted, children: "Press any key to exit" }) })] }));
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=AuthErrorScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthErrorScreen.js","sourceRoot":"","sources":["../../../../../src/ui/tui/screens/AuthErrorScreen.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,QAAQ,CAAC,GAAG,EAAE;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,aACrC,MAAC,IAAI,IAAC,KAAK,EAAC,KAAK,EAAC,IAAI,mBACnB,QAAQ,6BACJ,EAEP,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,YACtC,KAAC,IAAI,kJAIE,GACH,EAEN,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,QAAQ,uGAGP,GACH,EAEN,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,YACtD,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,mCAA0B,GACxC,EAEN,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,sCAA8B,GACnD,IACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * AuthErrorScreen — Shown when the Anthropic API returns a 401.\n *\n * Claude Code's own auth can conflict with the wizard's OAuth token.\n * This overlay tells the user to log out of Claude Code and retry.\n */\n\nimport { Box, Text, useInput } from 'ink';\nimport { Colors } from '../styles.js';\n\nexport const AuthErrorScreen = () => {\n useInput(() => {\n process.exit(1);\n });\n\n return (\n <Box flexDirection=\"column\" flexGrow={1}>\n <Text color=\"red\" bold>\n {'\\u2718'} Authentication error\n </Text>\n\n <Box flexDirection=\"column\" marginTop={1}>\n <Text>\n The Wizard couldn't connect to the PostHog LLM Gateway. If\n you use Claude Code, its credentials might conflict with the\n Wizard.\n </Text>\n </Box>\n\n <Box marginTop={1}>\n <Text dimColor>\n Try logging out of Claude Code temporarily and re-running the Wizard\n by running:\n </Text>\n </Box>\n\n <Box flexDirection=\"column\" marginTop={1} paddingLeft={2}>\n <Text color=\"cyan\">claude auth logout</Text>\n </Box>\n\n <Box marginTop={1}>\n <Text color={Colors.muted}>Press any key to exit</Text>\n </Box>\n </Box>\n );\n};\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ManagedSettingsScreen — Modal when IT/org-managed settings contain overrides
|
|
3
|
+
* that block the Wizard from reaching the PostHog LLM Gateway.
|
|
4
|
+
*
|
|
5
|
+
* Unlike SettingsOverrideScreen, the wizard cannot back up or modify these files.
|
|
6
|
+
* The user must contact their IT administrator to resolve the conflict.
|
|
7
|
+
*/
|
|
8
|
+
import type { WizardStore } from '../store.js';
|
|
9
|
+
interface ManagedSettingsScreenProps {
|
|
10
|
+
store: WizardStore;
|
|
11
|
+
}
|
|
12
|
+
export declare const ManagedSettingsScreen: ({ store, }: ManagedSettingsScreenProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* ManagedSettingsScreen — Modal when IT/org-managed settings contain overrides
|
|
4
|
+
* that block the Wizard from reaching the PostHog LLM Gateway.
|
|
5
|
+
*
|
|
6
|
+
* Unlike SettingsOverrideScreen, the wizard cannot back up or modify these files.
|
|
7
|
+
* The user must contact their IT administrator to resolve the conflict.
|
|
8
|
+
*/
|
|
9
|
+
import { Box, Text } from 'ink';
|
|
10
|
+
import { useSyncExternalStore } from 'react';
|
|
11
|
+
import { ConfirmationInput, ModalOverlay } from '../primitives/index.js';
|
|
12
|
+
import { Icons } from '../styles.js';
|
|
13
|
+
function sourceLabel(source) {
|
|
14
|
+
switch (source) {
|
|
15
|
+
case 'managed':
|
|
16
|
+
return 'Managed settings (IT/org-managed)';
|
|
17
|
+
case 'project':
|
|
18
|
+
return '.claude/settings.json';
|
|
19
|
+
default:
|
|
20
|
+
return source;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export const ManagedSettingsScreen = ({ store, }) => {
|
|
24
|
+
useSyncExternalStore((cb) => store.subscribe(cb), () => store.getSnapshot());
|
|
25
|
+
const conflicts = store.session.settingsConflicts;
|
|
26
|
+
const readOnlyConflicts = conflicts?.filter((c) => !c.writable);
|
|
27
|
+
if (!readOnlyConflicts || readOnlyConflicts.length === 0) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
return (_jsxs(ModalOverlay, { borderColor: "red", title: `${Icons.warning} Organization settings conflict`, width: 68, footer: _jsx(ConfirmationInput, { message: "Contact your IT administrator to resolve this.", confirmLabel: "", cancelLabel: "Exit [Esc]", onConfirm: () => process.exit(1), onCancel: () => process.exit(1) }), children: [_jsx(Text, { dimColor: true, children: "Your organization's managed settings contain overrides that prevent the Wizard from reaching the PostHog LLM Gateway." }), readOnlyConflicts.map((conflict) => (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { bold: true, children: sourceLabel(conflict.source) }), _jsx(Box, { flexDirection: "column", paddingLeft: 2, children: conflict.keys.map((key) => (_jsxs(Text, { children: [Icons.bullet, ' ', _jsx(Text, { color: "yellow", bold: true, children: key })] }, key))) })] }, conflict.source))), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Try running \"claude auth logout\" or contact your IT administrator to resolve this." }) })] }));
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=ManagedSettingsScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManagedSettingsScreen.js","sourceRoot":"","sources":["../../../../../src/ui/tui/screens/ManagedSettingsScreen.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAGrC,SAAS,WAAW,CAAC,MAAkC;IACrD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,SAAS;YACZ,OAAO,mCAAmC,CAAC;QAC7C,KAAK,SAAS;YACZ,OAAO,uBAAuB,CAAC;QACjC;YACE,OAAO,MAAM,CAAC;IAClB,CAAC;AACH,CAAC;AAMD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,KAAK,GACsB,EAAE,EAAE;IAC/B,oBAAoB,CAClB,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,EAC3B,GAAG,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAC1B,CAAC;IAEF,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC;IAClD,MAAM,iBAAiB,GAAG,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAEhE,IAAI,CAAC,iBAAiB,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,MAAC,YAAY,IACX,WAAW,EAAC,KAAK,EACjB,KAAK,EAAE,GAAG,KAAK,CAAC,OAAO,iCAAiC,EACxD,KAAK,EAAE,EAAE,EACT,MAAM,EACJ,KAAC,iBAAiB,IAChB,OAAO,EAAC,gDAAgD,EACxD,YAAY,EAAC,EAAE,EACf,WAAW,EAAC,YAAY,EACxB,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAChC,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAC/B,aAGJ,KAAC,IAAI,IAAC,QAAQ,4IAGP,EACN,iBAAiB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CACnC,MAAC,GAAG,IAAuB,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,aAC5D,KAAC,IAAI,IAAC,IAAI,kBAAE,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAQ,EAChD,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,WAAW,EAAE,CAAC,YACvC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAC1B,MAAC,IAAI,eACF,KAAK,CAAC,MAAM,EAAE,GAAG,EAClB,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,kBACtB,GAAG,GACC,KAJE,GAAG,CAKP,CACR,CAAC,GACE,KAXE,QAAQ,CAAC,MAAM,CAYnB,CACP,CAAC,EACF,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,QAAQ,2GAGP,GACH,IACO,CAChB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * ManagedSettingsScreen — Modal when IT/org-managed settings contain overrides\n * that block the Wizard from reaching the PostHog LLM Gateway.\n *\n * Unlike SettingsOverrideScreen, the wizard cannot back up or modify these files.\n * The user must contact their IT administrator to resolve the conflict.\n */\n\nimport { Box, Text } from 'ink';\nimport { useSyncExternalStore } from 'react';\nimport type { WizardStore } from '../store.js';\nimport { ConfirmationInput, ModalOverlay } from '../primitives/index.js';\nimport { Icons } from '../styles.js';\nimport type { SettingsConflict } from '../../../lib/agent-interface.js';\n\nfunction sourceLabel(source: SettingsConflict['source']): string {\n switch (source) {\n case 'managed':\n return 'Managed settings (IT/org-managed)';\n case 'project':\n return '.claude/settings.json';\n default:\n return source;\n }\n}\n\ninterface ManagedSettingsScreenProps {\n store: WizardStore;\n}\n\nexport const ManagedSettingsScreen = ({\n store,\n}: ManagedSettingsScreenProps) => {\n useSyncExternalStore(\n (cb) => store.subscribe(cb),\n () => store.getSnapshot(),\n );\n\n const conflicts = store.session.settingsConflicts;\n const readOnlyConflicts = conflicts?.filter((c) => !c.writable);\n\n if (!readOnlyConflicts || readOnlyConflicts.length === 0) {\n return null;\n }\n\n return (\n <ModalOverlay\n borderColor=\"red\"\n title={`${Icons.warning} Organization settings conflict`}\n width={68}\n footer={\n <ConfirmationInput\n message=\"Contact your IT administrator to resolve this.\"\n confirmLabel=\"\"\n cancelLabel=\"Exit [Esc]\"\n onConfirm={() => process.exit(1)}\n onCancel={() => process.exit(1)}\n />\n }\n >\n <Text dimColor>\n Your organization's managed settings contain overrides that prevent\n the Wizard from reaching the PostHog LLM Gateway.\n </Text>\n {readOnlyConflicts.map((conflict) => (\n <Box key={conflict.source} flexDirection=\"column\" marginTop={1}>\n <Text bold>{sourceLabel(conflict.source)}</Text>\n <Box flexDirection=\"column\" paddingLeft={2}>\n {conflict.keys.map((key) => (\n <Text key={key}>\n {Icons.bullet}{' '}\n <Text color=\"yellow\" bold>\n {key}\n </Text>\n </Text>\n ))}\n </Box>\n </Box>\n ))}\n <Box marginTop={1}>\n <Text dimColor>\n Try running \"claude auth logout\" or contact your IT administrator to\n resolve this.\n </Text>\n </Box>\n </ModalOverlay>\n );\n};\n"]}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SettingsOverrideScreen — Modal when .claude/settings.json contains env overrides
|
|
3
|
-
* that block the Wizard from reaching the PostHog LLM Gateway.
|
|
4
|
-
*/
|
|
5
1
|
import type { WizardStore } from '../store.js';
|
|
6
2
|
interface SettingsOverrideScreenProps {
|
|
7
3
|
store: WizardStore;
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* SettingsOverrideScreen — Modal when .claude/settings.json contains env overrides
|
|
4
|
-
* that block the Wizard from reaching the PostHog LLM Gateway.
|
|
5
|
-
*/
|
|
6
2
|
import { Box, Text } from 'ink';
|
|
7
3
|
import { useState, useSyncExternalStore } from 'react';
|
|
8
4
|
import { ConfirmationInput, ModalOverlay } from '../primitives/index.js';
|
|
9
5
|
import { Icons } from '../styles.js';
|
|
6
|
+
function sourcePath(source) {
|
|
7
|
+
switch (source) {
|
|
8
|
+
case 'project':
|
|
9
|
+
return '.claude/settings.json';
|
|
10
|
+
case 'managed':
|
|
11
|
+
return '/Library/Application Support/ClaudeCode/managed-settings.json';
|
|
12
|
+
default:
|
|
13
|
+
return source;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
10
16
|
export const SettingsOverrideScreen = ({ store, }) => {
|
|
11
17
|
useSyncExternalStore((cb) => store.subscribe(cb), () => store.getSnapshot());
|
|
12
18
|
const [feedback, setFeedback] = useState(null);
|
|
13
|
-
const
|
|
14
|
-
if (!
|
|
19
|
+
const conflicts = store.session.settingsConflicts?.filter((c) => c.writable);
|
|
20
|
+
if (!conflicts || conflicts.length === 0) {
|
|
15
21
|
return null;
|
|
16
22
|
}
|
|
17
23
|
return (_jsxs(ModalOverlay, { borderColor: "red", title: `${Icons.warning} Settings conflict`, width: 64, feedback: feedback ? `${Icons.warning} ${feedback}` : null, footer: _jsx(ConfirmationInput, { message: "Back up to .wizard-backup and continue?", confirmLabel: "Backup & continue [Enter]", cancelLabel: "Exit [Esc]", onConfirm: () => {
|
|
@@ -19,6 +25,6 @@ export const SettingsOverrideScreen = ({ store, }) => {
|
|
|
19
25
|
if (!ok) {
|
|
20
26
|
setFeedback('Could not back up the settings file.');
|
|
21
27
|
}
|
|
22
|
-
}, onCancel: () => process.exit(1) }), children: [_jsxs(Text, { children: ["Your
|
|
28
|
+
}, onCancel: () => process.exit(1) }), children: [conflicts.map((conflict) => (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { children: ["Your settings file at", ' ', _jsx(Text, { bold: true, children: sourcePath(conflict.source) }), " sets:"] }), _jsx(Box, { flexDirection: "column", paddingLeft: 2, children: conflict.keys.map((key) => (_jsxs(Text, { children: [Icons.bullet, ' ', _jsx(Text, { color: "yellow", bold: true, children: key })] }, key))) })] }, conflict.source))), _jsx(Text, { dimColor: true, children: "These settings override credentials and prevent the Wizard from reaching the PostHog LLM Gateway. We can back up the file and continue." })] }));
|
|
23
29
|
};
|
|
24
30
|
//# sourceMappingURL=SettingsOverrideScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsOverrideScreen.js","sourceRoot":"","sources":["../../../../../src/ui/tui/screens/SettingsOverrideScreen.tsx"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"SettingsOverrideScreen.js","sourceRoot":"","sources":["../../../../../src/ui/tui/screens/SettingsOverrideScreen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAGrC,SAAS,UAAU,CAAC,MAA8B;IAChD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,SAAS;YACZ,OAAO,uBAAuB,CAAC;QACjC,KAAK,SAAS;YACZ,OAAO,+DAA+D,CAAC;QACzE;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G,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAC3B,MAAC,GAAG,IAAuB,aAAa,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,aAC/D,MAAC,IAAI,wCACmB,GAAG,EACzB,KAAC,IAAI,IAAC,IAAI,kBAAE,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAQ,cAC1C,EACP,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,WAAW,EAAE,CAAC,YACvC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAC1B,MAAC,IAAI,eACF,KAAK,CAAC,MAAM,EAAE,GAAG,EAClB,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,kBACtB,GAAG,GACC,KAJE,GAAG,CAKP,CACR,CAAC,GACE,KAdE,QAAQ,CAAC,MAAM,CAenB,CACP,CAAC,EACF,KAAC,IAAI,IAAC,QAAQ,8JAGP,IACM,CAChB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Box, Text } from 'ink';\nimport { useState, useSyncExternalStore } from 'react';\nimport type { WizardStore } from '../store.js';\nimport { ConfirmationInput, ModalOverlay } from '../primitives/index.js';\nimport { Icons } from '../styles.js';\nimport type { SettingsConflictSource } from '../../../lib/agent-interface.js';\n\nfunction sourcePath(source: SettingsConflictSource): string {\n switch (source) {\n case 'project':\n return '.claude/settings.json';\n case 'managed':\n return '/Library/Application Support/ClaudeCode/managed-settings.json';\n default:\n return source;\n }\n}\n\ninterface SettingsOverrideScreenProps {\n store: WizardStore;\n}\n\nexport const SettingsOverrideScreen = ({\n store,\n}: SettingsOverrideScreenProps) => {\n useSyncExternalStore(\n (cb) => store.subscribe(cb),\n () => store.getSnapshot(),\n );\n\n const [feedback, setFeedback] = useState<string | null>(null);\n const conflicts = store.session.settingsConflicts?.filter((c) => c.writable);\n\n if (!conflicts || conflicts.length === 0) {\n return null;\n }\n\n return (\n <ModalOverlay\n borderColor=\"red\"\n title={`${Icons.warning} Settings conflict`}\n width={64}\n feedback={feedback ? `${Icons.warning} ${feedback}` : null}\n footer={\n <ConfirmationInput\n message=\"Back up to .wizard-backup and continue?\"\n confirmLabel=\"Backup & continue [Enter]\"\n cancelLabel=\"Exit [Esc]\"\n onConfirm={() => {\n const ok = store.backupAndFixSettingsOverride();\n if (!ok) {\n setFeedback('Could not back up the settings file.');\n }\n }}\n onCancel={() => process.exit(1)}\n />\n }\n >\n {conflicts.map((conflict) => (\n <Box key={conflict.source} flexDirection=\"column\" marginBottom={1}>\n <Text>\n Your settings file at{' '}\n <Text bold>{sourcePath(conflict.source)}</Text> sets:\n </Text>\n <Box flexDirection=\"column\" paddingLeft={2}>\n {conflict.keys.map((key) => (\n <Text key={key}>\n {Icons.bullet}{' '}\n <Text color=\"yellow\" bold>\n {key}\n </Text>\n </Text>\n ))}\n </Box>\n </Box>\n ))}\n <Text dimColor>\n These settings override credentials and prevent the Wizard from reaching\n the PostHog LLM Gateway. We can back up the file and continue.\n </Text>\n </ModalOverlay>\n );\n};\n"]}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { TaskStatus } from '../wizard-ui.js';
|
|
13
13
|
import { type WizardSession, type OutroData, type DiscoveredFeature, AdditionalFeature, McpOutcome, RunPhase } from '../../lib/wizard-session.js';
|
|
14
|
+
import type { SettingsConflict } from '../../lib/agent-interface.js';
|
|
14
15
|
import { WizardRouter, type ScreenName, Screen, Overlay, Flow } from './router.js';
|
|
15
16
|
export { TaskStatus, Screen, Overlay, Flow, RunPhase, McpOutcome };
|
|
16
17
|
export type { ScreenName, OutroData, WizardSession };
|
|
@@ -92,7 +93,7 @@ export declare class WizardStore {
|
|
|
92
93
|
* Push the settings-override overlay and return a promise that blocks
|
|
93
94
|
* until the user dismisses it via backupAndFixSettingsOverride().
|
|
94
95
|
*/
|
|
95
|
-
showSettingsOverride(
|
|
96
|
+
showSettingsOverride(conflicts: SettingsConflict[], backupAndFix: () => boolean): Promise<void>;
|
|
96
97
|
/**
|
|
97
98
|
* Push the port-conflict overlay and return a promise that blocks
|
|
98
99
|
* until the user kills the blocking process or exits.
|
|
@@ -108,6 +109,8 @@ export declare class WizardStore {
|
|
|
108
109
|
* Back up .claude/settings.json. Dismisses the overlay on success.
|
|
109
110
|
*/
|
|
110
111
|
backupAndFixSettingsOverride(): boolean;
|
|
112
|
+
/** Push the auth-error overlay (no dismiss — user must exit). */
|
|
113
|
+
showAuthError(): void;
|
|
111
114
|
addDiscoveredFeature(feature: DiscoveredFeature): void;
|
|
112
115
|
/**
|
|
113
116
|
* Enable an additional feature: enqueue it for the stop hook
|
package/dist/src/ui/tui/store.js
CHANGED
|
@@ -172,10 +172,18 @@ export class WizardStore {
|
|
|
172
172
|
* Push the settings-override overlay and return a promise that blocks
|
|
173
173
|
* until the user dismisses it via backupAndFixSettingsOverride().
|
|
174
174
|
*/
|
|
175
|
-
showSettingsOverride(
|
|
176
|
-
|
|
175
|
+
showSettingsOverride(conflicts, backupAndFix) {
|
|
176
|
+
const allKeys = conflicts.flatMap((c) => c.keys);
|
|
177
|
+
this.$session.setKey('settingsOverrideKeys', allKeys);
|
|
178
|
+
this.$session.setKey('settingsConflicts', conflicts);
|
|
177
179
|
this._backupAndFixSettings = backupAndFix;
|
|
178
|
-
|
|
180
|
+
const hasReadOnly = conflicts.some((c) => !c.writable);
|
|
181
|
+
if (hasReadOnly) {
|
|
182
|
+
this.pushOverlay(Overlay.ManagedSettings);
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
this.pushOverlay(Overlay.SettingsOverride);
|
|
186
|
+
}
|
|
179
187
|
return new Promise((resolve) => {
|
|
180
188
|
this._resolveSettingsOverride = resolve;
|
|
181
189
|
});
|
|
@@ -205,6 +213,7 @@ export class WizardStore {
|
|
|
205
213
|
const ok = this._backupAndFixSettings?.() ?? false;
|
|
206
214
|
if (ok) {
|
|
207
215
|
this.$session.setKey('settingsOverrideKeys', null);
|
|
216
|
+
this.$session.setKey('settingsConflicts', null);
|
|
208
217
|
this.popOverlay();
|
|
209
218
|
this._resolveSettingsOverride?.();
|
|
210
219
|
this._resolveSettingsOverride = null;
|
|
@@ -212,6 +221,10 @@ export class WizardStore {
|
|
|
212
221
|
}
|
|
213
222
|
return ok;
|
|
214
223
|
}
|
|
224
|
+
/** Push the auth-error overlay (no dismiss — user must exit). */
|
|
225
|
+
showAuthError() {
|
|
226
|
+
this.pushOverlay(Overlay.AuthError);
|
|
227
|
+
}
|
|
215
228
|
addDiscoveredFeature(feature) {
|
|
216
229
|
if (!this.session.discoveredFeatures.includes(feature)) {
|
|
217
230
|
this.session.discoveredFeatures.push(feature);
|