@dexto/tui 1.14.4 → 1.15.0-beta.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 (36) hide show
  1. package/dist/components/Footer.cjs +31 -0
  2. package/dist/components/Footer.d.ts.map +1 -1
  3. package/dist/components/Footer.js +31 -0
  4. package/dist/components/Footer.test.cjs +44 -0
  5. package/dist/components/Footer.test.js +44 -0
  6. package/dist/components/overlays/InsufficientCreditsOverlay.cjs +19 -4
  7. package/dist/components/overlays/InsufficientCreditsOverlay.d.ts +2 -0
  8. package/dist/components/overlays/InsufficientCreditsOverlay.d.ts.map +1 -1
  9. package/dist/components/overlays/InsufficientCreditsOverlay.js +19 -4
  10. package/dist/components/overlays/LoginOverlay.cjs +25 -61
  11. package/dist/components/overlays/LoginOverlay.d.ts +1 -3
  12. package/dist/components/overlays/LoginOverlay.d.ts.map +1 -1
  13. package/dist/components/overlays/LoginOverlay.js +26 -66
  14. package/dist/components/overlays/LogoutOverlay.cjs +8 -17
  15. package/dist/components/overlays/LogoutOverlay.d.ts +1 -0
  16. package/dist/components/overlays/LogoutOverlay.d.ts.map +1 -1
  17. package/dist/components/overlays/LogoutOverlay.js +10 -31
  18. package/dist/components/overlays/custom-model-wizard/provider-config.cjs +4 -4
  19. package/dist/components/overlays/custom-model-wizard/provider-config.js +4 -4
  20. package/dist/containers/OverlayContainer.cjs +30 -40
  21. package/dist/containers/OverlayContainer.d.ts.map +1 -1
  22. package/dist/containers/OverlayContainer.js +30 -40
  23. package/dist/host/index.cjs +22 -49
  24. package/dist/host/index.d.ts +18 -72
  25. package/dist/host/index.d.ts.map +1 -1
  26. package/dist/host/index.js +18 -42
  27. package/dist/host/index.test.cjs +21 -35
  28. package/dist/host/index.test.js +22 -40
  29. package/dist/index.d.cts +13 -52
  30. package/dist/services/processStream.cjs +2 -2
  31. package/dist/services/processStream.js +2 -2
  32. package/dist/services/processStream.test.cjs +1 -1
  33. package/dist/services/processStream.test.js +1 -1
  34. package/dist/utils/llm-provider-display.cjs +1 -1
  35. package/dist/utils/llm-provider-display.js +1 -1
  36. package/package.json +3 -3
@@ -22,21 +22,18 @@ __export(host_exports, {
22
22
  buildDextoBillingUrl: () => buildDextoBillingUrl,
23
23
  canUseDextoProvider: () => canUseDextoProvider,
24
24
  captureAnalytics: () => captureAnalytics,
25
- ensureDextoApiKeyForAuthToken: () => ensureDextoApiKeyForAuthToken,
25
+ currentSignIn: () => currentSignIn,
26
+ dextoCreditBalance: () => dextoCreditBalance,
26
27
  getProviderDisplayName: () => getProviderDisplayName,
27
28
  getProviderInstructions: () => getProviderInstructions,
28
29
  getTuiRuntimeServices: () => getTuiRuntimeServices,
29
30
  isUsingDextoCredits: () => isUsingDextoCredits,
30
31
  isValidApiKeyFormat: () => isValidApiKeyFormat,
31
- loadAuth: () => loadAuth,
32
32
  openDextoBillingPage: () => openDextoBillingPage,
33
- performDeviceCodeLogin: () => performDeviceCodeLogin,
34
- persistDeviceApiKeyLoginResult: () => persistDeviceApiKeyLoginResult,
35
33
  registerGracefulShutdown: () => registerGracefulShutdown,
36
- removeAuth: () => removeAuth,
37
- removeDextoApiKeyFromEnv: () => removeDextoApiKeyFromEnv,
38
34
  setTuiRuntimeServices: () => setTuiRuntimeServices,
39
- storeAuth: () => storeAuth
35
+ signIn: () => signIn,
36
+ signOut: () => signOut
40
37
  });
41
38
  module.exports = __toCommonJS(host_exports);
42
39
  let runtimeServices = {};
@@ -69,47 +66,26 @@ function isValidApiKeyFormat(apiKey, provider) {
69
66
  function getProviderInstructions(provider) {
70
67
  return runtimeServices.getProviderInstructions?.(provider) ?? null;
71
68
  }
72
- async function performDeviceCodeLogin(options) {
73
- if (!runtimeServices.performDeviceCodeLogin) {
74
- throw missingHostMethod("performDeviceCodeLogin");
69
+ async function currentSignIn() {
70
+ if (!runtimeServices.currentSignIn) {
71
+ throw missingHostMethod("currentSignIn");
75
72
  }
76
- return runtimeServices.performDeviceCodeLogin(options);
73
+ return runtimeServices.currentSignIn();
77
74
  }
78
- async function persistDeviceApiKeyLoginResult(result) {
79
- if (!runtimeServices.persistDeviceApiKeyLoginResult) {
80
- throw missingHostMethod("persistDeviceApiKeyLoginResult");
75
+ async function signIn(options) {
76
+ if (!runtimeServices.signIn) {
77
+ throw missingHostMethod("signIn");
81
78
  }
82
- return runtimeServices.persistDeviceApiKeyLoginResult(result);
79
+ return runtimeServices.signIn(options);
83
80
  }
84
- async function ensureDextoApiKeyForAuthToken(authToken, options) {
85
- if (!runtimeServices.ensureDextoApiKeyForAuthToken) {
86
- throw missingHostMethod("ensureDextoApiKeyForAuthToken");
87
- }
88
- return runtimeServices.ensureDextoApiKeyForAuthToken(authToken, options);
89
- }
90
- async function loadAuth() {
91
- if (!runtimeServices.loadAuth) {
92
- throw missingHostMethod("loadAuth");
93
- }
94
- return runtimeServices.loadAuth();
95
- }
96
- async function storeAuth(config) {
97
- if (!runtimeServices.storeAuth) {
98
- throw missingHostMethod("storeAuth");
99
- }
100
- await runtimeServices.storeAuth(config);
101
- }
102
- async function removeAuth() {
103
- if (!runtimeServices.removeAuth) {
104
- throw missingHostMethod("removeAuth");
105
- }
106
- await runtimeServices.removeAuth();
81
+ async function dextoCreditBalance() {
82
+ return await runtimeServices.dextoCreditBalance?.() ?? null;
107
83
  }
108
- async function removeDextoApiKeyFromEnv(options) {
109
- if (!runtimeServices.removeDextoApiKeyFromEnv) {
110
- throw missingHostMethod("removeDextoApiKeyFromEnv");
84
+ async function signOut() {
85
+ if (!runtimeServices.signOut) {
86
+ throw missingHostMethod("signOut");
111
87
  }
112
- return runtimeServices.removeDextoApiKeyFromEnv(options);
88
+ return runtimeServices.signOut();
113
89
  }
114
90
  async function isUsingDextoCredits() {
115
91
  if (!runtimeServices.isUsingDextoCredits) {
@@ -141,19 +117,16 @@ async function openDextoBillingPage(options) {
141
117
  buildDextoBillingUrl,
142
118
  canUseDextoProvider,
143
119
  captureAnalytics,
144
- ensureDextoApiKeyForAuthToken,
120
+ currentSignIn,
121
+ dextoCreditBalance,
145
122
  getProviderDisplayName,
146
123
  getProviderInstructions,
147
124
  getTuiRuntimeServices,
148
125
  isUsingDextoCredits,
149
126
  isValidApiKeyFormat,
150
- loadAuth,
151
127
  openDextoBillingPage,
152
- performDeviceCodeLogin,
153
- persistDeviceApiKeyLoginResult,
154
128
  registerGracefulShutdown,
155
- removeAuth,
156
- removeDextoApiKeyFromEnv,
157
129
  setTuiRuntimeServices,
158
- storeAuth
130
+ signIn,
131
+ signOut
159
132
  });
@@ -3,38 +3,11 @@ import type { TuiAgentBackend } from '../agent-backend.js';
3
3
  export interface TuiShutdownHandle {
4
4
  stop?: (() => Promise<void>) | undefined;
5
5
  }
6
- export interface TuiAuthConfig {
7
- token?: string | undefined;
8
- refreshToken?: string | undefined;
9
- userId?: string | undefined;
10
- email?: string | undefined;
11
- expiresAt?: number | undefined;
12
- createdAt: number;
13
- dextoApiKey?: string | undefined;
14
- dextoKeyId?: string | undefined;
15
- dextoApiKeySource?: 'provisioned' | 'user-supplied' | undefined;
16
- }
17
- export interface TuiDeviceApiKeyLoginResult {
18
- dextoApiKey: string;
19
- dextoKeyId: string;
20
- dextoKeyDisplay: string;
21
- }
22
- export interface TuiDeviceLoginPrompt {
23
- userCode: string;
24
- verificationUrl: string;
25
- verificationUrlComplete: string | null;
26
- expiresIn: number;
27
- }
28
- export type TuiDextoApiKeyProvisionStatusLevel = 'info' | 'success' | 'warning' | 'error';
29
- export interface TuiDextoApiKeyProvisionStatus {
30
- level: TuiDextoApiKeyProvisionStatusLevel;
31
- message: string;
32
- }
33
- export interface TuiPersistedLoginResult {
34
- email?: string | undefined;
35
- userId?: string | undefined;
36
- keyId?: string | undefined;
37
- hasDextoApiKey: boolean;
6
+ export interface TuiSignInOptions {
7
+ /** Aborts the sign-in, such as when the person presses Esc. */
8
+ signal: AbortSignal;
9
+ /** What to show while signing in: the link, or the code to check. */
10
+ onNote: (text: string) => void;
38
11
  }
39
12
  export interface TuiRuntimeServices {
40
13
  registerGracefulShutdown?: (getAgent: () => TuiShutdownHandle, options: {
@@ -49,26 +22,14 @@ export interface TuiRuntimeServices {
49
22
  content: string;
50
23
  url?: string | undefined;
51
24
  } | null;
52
- performDeviceCodeLogin?: (options?: {
53
- signal?: AbortSignal | undefined;
54
- onPrompt?: ((prompt: TuiDeviceLoginPrompt) => void) | undefined;
55
- }) => Promise<TuiDeviceApiKeyLoginResult>;
56
- persistDeviceApiKeyLoginResult?: (result: TuiDeviceApiKeyLoginResult) => Promise<TuiPersistedLoginResult>;
57
- ensureDextoApiKeyForAuthToken?: (authToken: string, options?: {
58
- onStatus?: ((status: TuiDextoApiKeyProvisionStatus) => void) | undefined;
59
- }) => Promise<{
60
- dextoApiKey: string;
61
- keyId: string | null;
62
- } | null>;
63
- loadAuth?: () => Promise<TuiAuthConfig | null>;
64
- storeAuth?: (config: TuiAuthConfig) => Promise<void>;
65
- removeAuth?: () => Promise<void>;
66
- removeDextoApiKeyFromEnv?: (options?: {
67
- expectedValue?: string;
68
- }) => Promise<{
69
- removed: boolean;
70
- targetEnvPath: string;
71
- }>;
25
+ /** Who the current profile acts as, in a few words, or null when signed out. */
26
+ currentSignIn?: () => Promise<string | null>;
27
+ /** Signs the current profile in to Dexto, resolving with what to say once signed in. */
28
+ signIn?: (options: TuiSignInOptions) => Promise<string>;
29
+ /** Ends the current profile's sign-in, resolving with what to say. */
30
+ signOut?: () => Promise<string>;
31
+ /** The organization's Dexto credit balance in USD; null when signed out. */
32
+ dextoCreditBalance?: () => Promise<number | null>;
72
33
  isUsingDextoCredits?: () => Promise<boolean>;
73
34
  canUseDextoProvider?: () => Promise<boolean>;
74
35
  buildDextoBillingUrl?: (options: {
@@ -92,26 +53,11 @@ export declare function getProviderInstructions(provider: LLMProvider): {
92
53
  content: string;
93
54
  url?: string | undefined;
94
55
  } | null;
95
- export declare function performDeviceCodeLogin(options?: {
96
- signal?: AbortSignal | undefined;
97
- onPrompt?: ((prompt: TuiDeviceLoginPrompt) => void) | undefined;
98
- }): Promise<TuiDeviceApiKeyLoginResult>;
99
- export declare function persistDeviceApiKeyLoginResult(result: TuiDeviceApiKeyLoginResult): Promise<TuiPersistedLoginResult>;
100
- export declare function ensureDextoApiKeyForAuthToken(authToken: string, options?: {
101
- onStatus?: ((status: TuiDextoApiKeyProvisionStatus) => void) | undefined;
102
- }): Promise<{
103
- dextoApiKey: string;
104
- keyId: string | null;
105
- } | null>;
106
- export declare function loadAuth(): Promise<TuiAuthConfig | null>;
107
- export declare function storeAuth(config: TuiAuthConfig): Promise<void>;
108
- export declare function removeAuth(): Promise<void>;
109
- export declare function removeDextoApiKeyFromEnv(options?: {
110
- expectedValue?: string;
111
- }): Promise<{
112
- removed: boolean;
113
- targetEnvPath: string;
114
- }>;
56
+ export declare function currentSignIn(): Promise<string | null>;
57
+ export declare function signIn(options: TuiSignInOptions): Promise<string>;
58
+ /** The Dexto credit balance, or null when the host can't say. */
59
+ export declare function dextoCreditBalance(): Promise<number | null>;
60
+ export declare function signOut(): Promise<string>;
115
61
  export declare function isUsingDextoCredits(): Promise<boolean>;
116
62
  export declare function canUseDextoProvider(): Promise<boolean>;
117
63
  export declare function buildDextoBillingUrl(options: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/host/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,WAAW,iBAAiB;IAC9B,IAAI,CAAC,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;CAC5C;AAED,MAAM,WAAW,aAAa;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,CAAC,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EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAE1F;AAED,wBAAsB,8BAA8B,IAAI,OAAO,CAAC,IAAI,CAAC,CAIpE;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,CAE7E;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,OAAO,CAElF;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,WAAW,GAAG;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,GAAG,IAAI,CAEP;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAK5D;AAED,wBAAsB,MAAM,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAKvE;AAED,iEAAiE;AACjE,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAEjE;AAED,wBAAsB,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAK/C;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC,CAK5D;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC,CAK5D;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAK5E;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAK/F"}
@@ -28,47 +28,26 @@ function isValidApiKeyFormat(apiKey, provider) {
28
28
  function getProviderInstructions(provider) {
29
29
  return runtimeServices.getProviderInstructions?.(provider) ?? null;
30
30
  }
31
- async function performDeviceCodeLogin(options) {
32
- if (!runtimeServices.performDeviceCodeLogin) {
33
- throw missingHostMethod("performDeviceCodeLogin");
31
+ async function currentSignIn() {
32
+ if (!runtimeServices.currentSignIn) {
33
+ throw missingHostMethod("currentSignIn");
34
34
  }
35
- return runtimeServices.performDeviceCodeLogin(options);
35
+ return runtimeServices.currentSignIn();
36
36
  }
37
- async function persistDeviceApiKeyLoginResult(result) {
38
- if (!runtimeServices.persistDeviceApiKeyLoginResult) {
39
- throw missingHostMethod("persistDeviceApiKeyLoginResult");
37
+ async function signIn(options) {
38
+ if (!runtimeServices.signIn) {
39
+ throw missingHostMethod("signIn");
40
40
  }
41
- return runtimeServices.persistDeviceApiKeyLoginResult(result);
41
+ return runtimeServices.signIn(options);
42
42
  }
43
- async function ensureDextoApiKeyForAuthToken(authToken, options) {
44
- if (!runtimeServices.ensureDextoApiKeyForAuthToken) {
45
- throw missingHostMethod("ensureDextoApiKeyForAuthToken");
46
- }
47
- return runtimeServices.ensureDextoApiKeyForAuthToken(authToken, options);
48
- }
49
- async function loadAuth() {
50
- if (!runtimeServices.loadAuth) {
51
- throw missingHostMethod("loadAuth");
52
- }
53
- return runtimeServices.loadAuth();
54
- }
55
- async function storeAuth(config) {
56
- if (!runtimeServices.storeAuth) {
57
- throw missingHostMethod("storeAuth");
58
- }
59
- await runtimeServices.storeAuth(config);
60
- }
61
- async function removeAuth() {
62
- if (!runtimeServices.removeAuth) {
63
- throw missingHostMethod("removeAuth");
64
- }
65
- await runtimeServices.removeAuth();
43
+ async function dextoCreditBalance() {
44
+ return await runtimeServices.dextoCreditBalance?.() ?? null;
66
45
  }
67
- async function removeDextoApiKeyFromEnv(options) {
68
- if (!runtimeServices.removeDextoApiKeyFromEnv) {
69
- throw missingHostMethod("removeDextoApiKeyFromEnv");
46
+ async function signOut() {
47
+ if (!runtimeServices.signOut) {
48
+ throw missingHostMethod("signOut");
70
49
  }
71
- return runtimeServices.removeDextoApiKeyFromEnv(options);
50
+ return runtimeServices.signOut();
72
51
  }
73
52
  async function isUsingDextoCredits() {
74
53
  if (!runtimeServices.isUsingDextoCredits) {
@@ -99,19 +78,16 @@ export {
99
78
  buildDextoBillingUrl,
100
79
  canUseDextoProvider,
101
80
  captureAnalytics,
102
- ensureDextoApiKeyForAuthToken,
81
+ currentSignIn,
82
+ dextoCreditBalance,
103
83
  getProviderDisplayName,
104
84
  getProviderInstructions,
105
85
  getTuiRuntimeServices,
106
86
  isUsingDextoCredits,
107
87
  isValidApiKeyFormat,
108
- loadAuth,
109
88
  openDextoBillingPage,
110
- performDeviceCodeLogin,
111
- persistDeviceApiKeyLoginResult,
112
89
  registerGracefulShutdown,
113
- removeAuth,
114
- removeDextoApiKeyFromEnv,
115
90
  setTuiRuntimeServices,
116
- storeAuth
91
+ signIn,
92
+ signOut
117
93
  };
@@ -1,47 +1,33 @@
1
1
  "use strict";
2
2
  var import_vitest = require("vitest");
3
3
  var import_index = require("./index.js");
4
- (0, import_vitest.describe)("TUI auth runtime services", () => {
4
+ (0, import_vitest.describe)("TUI sign-in runtime services", () => {
5
5
  (0, import_vitest.afterEach)(() => {
6
6
  (0, import_index.setTuiRuntimeServices)({});
7
7
  });
8
- (0, import_vitest.it)("uses host-provided API-key device login and persistence services", async () => {
9
- const prompt = import_vitest.vi.fn();
10
- const perform = import_vitest.vi.fn().mockResolvedValue({
11
- dextoApiKey: "dxt_full_key",
12
- dextoKeyDisplay: "dxt_abc...",
13
- dextoKeyId: "key-id"
14
- });
15
- const persist = import_vitest.vi.fn().mockResolvedValue({
16
- keyId: "key-id",
17
- hasDextoApiKey: true
18
- });
8
+ (0, import_vitest.it)("signs in, says who, and signs out through the host", async () => {
9
+ const signal = new AbortController().signal;
10
+ const onNote = import_vitest.vi.fn();
11
+ const hostSignIn = import_vitest.vi.fn().mockResolvedValue("Signed in as ada@example.com in Acme.");
19
12
  (0, import_index.setTuiRuntimeServices)({
20
- performDeviceCodeLogin: perform,
21
- persistDeviceApiKeyLoginResult: persist
22
- });
23
- const loginResult = await (0, import_index.performDeviceCodeLogin)({
24
- onPrompt: prompt
25
- });
26
- const persisted = await (0, import_index.persistDeviceApiKeyLoginResult)(loginResult);
27
- (0, import_vitest.expect)(perform).toHaveBeenCalledWith({ onPrompt: prompt });
28
- (0, import_vitest.expect)(persist).toHaveBeenCalledWith({
29
- dextoApiKey: "dxt_full_key",
30
- dextoKeyDisplay: "dxt_abc...",
31
- dextoKeyId: "key-id"
32
- });
33
- (0, import_vitest.expect)(persisted).toEqual({
34
- keyId: "key-id",
35
- hasDextoApiKey: true
13
+ currentSignIn: async () => "ada@example.com in Acme",
14
+ signIn: hostSignIn,
15
+ signOut: async () => "Logged out."
36
16
  });
17
+ (0, import_vitest.expect)(await (0, import_index.currentSignIn)()).toBe("ada@example.com in Acme");
18
+ (0, import_vitest.expect)(await (0, import_index.signIn)({ signal, onNote })).toBe("Signed in as ada@example.com in Acme.");
19
+ (0, import_vitest.expect)(hostSignIn).toHaveBeenCalledWith({ signal, onNote });
20
+ (0, import_vitest.expect)(await (0, import_index.signOut)()).toBe("Logged out.");
37
21
  });
38
- (0, import_vitest.it)("fails fast when API-key device login persistence is not provided by the host", async () => {
22
+ (0, import_vitest.it)("fails fast when the host provides no sign-in", async () => {
23
+ await (0, import_vitest.expect)((0, import_index.currentSignIn)()).rejects.toThrow(
24
+ "TUI runtime services missing required method: currentSignIn"
25
+ );
39
26
  await (0, import_vitest.expect)(
40
- (0, import_index.persistDeviceApiKeyLoginResult)({
41
- dextoApiKey: "dxt_full_key",
42
- dextoKeyDisplay: "dxt_abc...",
43
- dextoKeyId: "key-id"
44
- })
45
- ).rejects.toThrow("TUI runtime services missing required method");
27
+ (0, import_index.signIn)({ signal: new AbortController().signal, onNote: () => void 0 })
28
+ ).rejects.toThrow("TUI runtime services missing required method: signIn");
29
+ await (0, import_vitest.expect)((0, import_index.signOut)()).rejects.toThrow(
30
+ "TUI runtime services missing required method: signOut"
31
+ );
46
32
  });
47
33
  });
@@ -1,50 +1,32 @@
1
1
  import { afterEach, describe, expect, it, vi } from "vitest";
2
- import {
3
- performDeviceCodeLogin,
4
- persistDeviceApiKeyLoginResult,
5
- setTuiRuntimeServices
6
- } from "./index.js";
7
- describe("TUI auth runtime services", () => {
2
+ import { currentSignIn, setTuiRuntimeServices, signIn, signOut } from "./index.js";
3
+ describe("TUI sign-in runtime services", () => {
8
4
  afterEach(() => {
9
5
  setTuiRuntimeServices({});
10
6
  });
11
- it("uses host-provided API-key device login and persistence services", async () => {
12
- const prompt = vi.fn();
13
- const perform = vi.fn().mockResolvedValue({
14
- dextoApiKey: "dxt_full_key",
15
- dextoKeyDisplay: "dxt_abc...",
16
- dextoKeyId: "key-id"
17
- });
18
- const persist = vi.fn().mockResolvedValue({
19
- keyId: "key-id",
20
- hasDextoApiKey: true
21
- });
7
+ it("signs in, says who, and signs out through the host", async () => {
8
+ const signal = new AbortController().signal;
9
+ const onNote = vi.fn();
10
+ const hostSignIn = vi.fn().mockResolvedValue("Signed in as ada@example.com in Acme.");
22
11
  setTuiRuntimeServices({
23
- performDeviceCodeLogin: perform,
24
- persistDeviceApiKeyLoginResult: persist
25
- });
26
- const loginResult = await performDeviceCodeLogin({
27
- onPrompt: prompt
28
- });
29
- const persisted = await persistDeviceApiKeyLoginResult(loginResult);
30
- expect(perform).toHaveBeenCalledWith({ onPrompt: prompt });
31
- expect(persist).toHaveBeenCalledWith({
32
- dextoApiKey: "dxt_full_key",
33
- dextoKeyDisplay: "dxt_abc...",
34
- dextoKeyId: "key-id"
35
- });
36
- expect(persisted).toEqual({
37
- keyId: "key-id",
38
- hasDextoApiKey: true
12
+ currentSignIn: async () => "ada@example.com in Acme",
13
+ signIn: hostSignIn,
14
+ signOut: async () => "Logged out."
39
15
  });
16
+ expect(await currentSignIn()).toBe("ada@example.com in Acme");
17
+ expect(await signIn({ signal, onNote })).toBe("Signed in as ada@example.com in Acme.");
18
+ expect(hostSignIn).toHaveBeenCalledWith({ signal, onNote });
19
+ expect(await signOut()).toBe("Logged out.");
40
20
  });
41
- it("fails fast when API-key device login persistence is not provided by the host", async () => {
21
+ it("fails fast when the host provides no sign-in", async () => {
22
+ await expect(currentSignIn()).rejects.toThrow(
23
+ "TUI runtime services missing required method: currentSignIn"
24
+ );
42
25
  await expect(
43
- persistDeviceApiKeyLoginResult({
44
- dextoApiKey: "dxt_full_key",
45
- dextoKeyDisplay: "dxt_abc...",
46
- dextoKeyId: "key-id"
47
- })
48
- ).rejects.toThrow("TUI runtime services missing required method");
26
+ signIn({ signal: new AbortController().signal, onNote: () => void 0 })
27
+ ).rejects.toThrow("TUI runtime services missing required method: signIn");
28
+ await expect(signOut()).rejects.toThrow(
29
+ "TUI runtime services missing required method: signOut"
30
+ );
49
31
  });
50
32
  });
package/dist/index.d.cts CHANGED
@@ -362,38 +362,11 @@ declare function startInkCliRefactored(agent: TuiAgentBackend, initialSessionId:
362
362
  interface TuiShutdownHandle {
363
363
  stop?: (() => Promise<void>) | undefined;
364
364
  }
365
- interface TuiAuthConfig {
366
- token?: string | undefined;
367
- refreshToken?: string | undefined;
368
- userId?: string | undefined;
369
- email?: string | undefined;
370
- expiresAt?: number | undefined;
371
- createdAt: number;
372
- dextoApiKey?: string | undefined;
373
- dextoKeyId?: string | undefined;
374
- dextoApiKeySource?: 'provisioned' | 'user-supplied' | undefined;
375
- }
376
- interface TuiDeviceApiKeyLoginResult {
377
- dextoApiKey: string;
378
- dextoKeyId: string;
379
- dextoKeyDisplay: string;
380
- }
381
- interface TuiDeviceLoginPrompt {
382
- userCode: string;
383
- verificationUrl: string;
384
- verificationUrlComplete: string | null;
385
- expiresIn: number;
386
- }
387
- type TuiDextoApiKeyProvisionStatusLevel = 'info' | 'success' | 'warning' | 'error';
388
- interface TuiDextoApiKeyProvisionStatus {
389
- level: TuiDextoApiKeyProvisionStatusLevel;
390
- message: string;
391
- }
392
- interface TuiPersistedLoginResult {
393
- email?: string | undefined;
394
- userId?: string | undefined;
395
- keyId?: string | undefined;
396
- hasDextoApiKey: boolean;
365
+ interface TuiSignInOptions {
366
+ /** Aborts the sign-in, such as when the person presses Esc. */
367
+ signal: AbortSignal;
368
+ /** What to show while signing in: the link, or the code to check. */
369
+ onNote: (text: string) => void;
397
370
  }
398
371
  interface TuiRuntimeServices {
399
372
  registerGracefulShutdown?: (getAgent: () => TuiShutdownHandle, options: {
@@ -408,26 +381,14 @@ interface TuiRuntimeServices {
408
381
  content: string;
409
382
  url?: string | undefined;
410
383
  } | null;
411
- performDeviceCodeLogin?: (options?: {
412
- signal?: AbortSignal | undefined;
413
- onPrompt?: ((prompt: TuiDeviceLoginPrompt) => void) | undefined;
414
- }) => Promise<TuiDeviceApiKeyLoginResult>;
415
- persistDeviceApiKeyLoginResult?: (result: TuiDeviceApiKeyLoginResult) => Promise<TuiPersistedLoginResult>;
416
- ensureDextoApiKeyForAuthToken?: (authToken: string, options?: {
417
- onStatus?: ((status: TuiDextoApiKeyProvisionStatus) => void) | undefined;
418
- }) => Promise<{
419
- dextoApiKey: string;
420
- keyId: string | null;
421
- } | null>;
422
- loadAuth?: () => Promise<TuiAuthConfig | null>;
423
- storeAuth?: (config: TuiAuthConfig) => Promise<void>;
424
- removeAuth?: () => Promise<void>;
425
- removeDextoApiKeyFromEnv?: (options?: {
426
- expectedValue?: string;
427
- }) => Promise<{
428
- removed: boolean;
429
- targetEnvPath: string;
430
- }>;
384
+ /** Who the current profile acts as, in a few words, or null when signed out. */
385
+ currentSignIn?: () => Promise<string | null>;
386
+ /** Signs the current profile in to Dexto, resolving with what to say once signed in. */
387
+ signIn?: (options: TuiSignInOptions) => Promise<string>;
388
+ /** Ends the current profile's sign-in, resolving with what to say. */
389
+ signOut?: () => Promise<string>;
390
+ /** The organization's Dexto credit balance in USD; null when signed out. */
391
+ dextoCreditBalance?: () => Promise<number | null>;
431
392
  isUsingDextoCredits?: () => Promise<boolean>;
432
393
  canUseDextoProvider?: () => Promise<boolean>;
433
394
  buildDextoBillingUrl?: (options: {
@@ -81,9 +81,9 @@ function extractInsufficientCreditsBalance(error) {
81
81
  }
82
82
  function buildInsufficientCreditsContent(balance) {
83
83
  if (balance === null) {
84
- return "Out of Dexto Nova credits.\nUse the billing prompt to top up and retry your request.";
84
+ return "Out of Dexto credits.\nUse the billing prompt to top up and retry your request.";
85
85
  }
86
- return `Out of Dexto Nova credits. Current balance: $${balance.toFixed(2)}.
86
+ return `Out of Dexto credits. Current balance: $${balance.toFixed(2)}.
87
87
  Use the billing prompt to top up and retry your request.`;
88
88
  }
89
89
  function hasMeaningfulTokenUsageForAnalytics(tokenUsage, estimatedCost) {
@@ -48,9 +48,9 @@ function extractInsufficientCreditsBalance(error) {
48
48
  }
49
49
  function buildInsufficientCreditsContent(balance) {
50
50
  if (balance === null) {
51
- return "Out of Dexto Nova credits.\nUse the billing prompt to top up and retry your request.";
51
+ return "Out of Dexto credits.\nUse the billing prompt to top up and retry your request.";
52
52
  }
53
- return `Out of Dexto Nova credits. Current balance: $${balance.toFixed(2)}.
53
+ return `Out of Dexto credits. Current balance: $${balance.toFixed(2)}.
54
54
  Use the billing prompt to top up and retry your request.`;
55
55
  }
56
56
  function hasMeaningfulTokenUsageForAnalytics(tokenUsage, estimatedCost) {
@@ -504,7 +504,7 @@ function createSetters({
504
504
  (0, import_vitest.expect)(ui.insufficientCredits).toEqual({ balanceUsd: 0 });
505
505
  (0, import_vitest.expect)(ui.isProcessing).toBe(false);
506
506
  const latestMessage = getMessages().at(-1);
507
- (0, import_vitest.expect)(latestMessage?.content).toContain("Out of Dexto Nova credits");
507
+ (0, import_vitest.expect)(latestMessage?.content).toContain("Out of Dexto credits");
508
508
  (0, import_vitest.expect)(latestMessage?.content).not.toContain("Error:");
509
509
  });
510
510
  (0, import_vitest.it)("captures analytics cost fields for priced llm responses", async () => {
@@ -503,7 +503,7 @@ describe("processStream (reasoning)", () => {
503
503
  expect(ui.insufficientCredits).toEqual({ balanceUsd: 0 });
504
504
  expect(ui.isProcessing).toBe(false);
505
505
  const latestMessage = getMessages().at(-1);
506
- expect(latestMessage?.content).toContain("Out of Dexto Nova credits");
506
+ expect(latestMessage?.content).toContain("Out of Dexto credits");
507
507
  expect(latestMessage?.content).not.toContain("Error:");
508
508
  });
509
509
  it("captures analytics cost fields for priced llm responses", async () => {
@@ -39,7 +39,7 @@ const LLM_PROVIDER_DISPLAY_NAMES = {
39
39
  bedrock: "Bedrock",
40
40
  local: "Local",
41
41
  ollama: "Ollama",
42
- "dexto-nova": "Dexto Nova"
42
+ "dexto-nova": "Dexto"
43
43
  };
44
44
  function getLLMProviderDisplayName(provider, baseURL) {
45
45
  if (provider === "openai-compatible") {
@@ -16,7 +16,7 @@ const LLM_PROVIDER_DISPLAY_NAMES = {
16
16
  bedrock: "Bedrock",
17
17
  local: "Local",
18
18
  ollama: "Ollama",
19
- "dexto-nova": "Dexto Nova"
19
+ "dexto-nova": "Dexto"
20
20
  };
21
21
  function getLLMProviderDisplayName(provider, baseURL) {
22
22
  if (provider === "openai-compatible") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexto/tui",
3
- "version": "1.14.4",
3
+ "version": "1.15.0-beta.0",
4
4
  "description": "Interactive terminal UI for Dexto CLI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,10 +28,10 @@
28
28
  "string-width": "^8.1.0",
29
29
  "strip-ansi": "^7.1.2",
30
30
  "wrap-ansi": "^9.0.2",
31
- "@dexto/agent-management": "1.14.4",
32
31
  "@dexto/core": "1.14.4",
33
32
  "@dexto/llm": "1.14.4",
34
- "@dexto/registry": "1.14.4"
33
+ "@dexto/registry": "1.14.4",
34
+ "@dexto/agent-management": "1.15.0-beta.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/react": "^19.0.0",