@ezychat/web 0.1.84 → 0.1.85
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-lib/assets/font-9f04f14429bb.woff2 +0 -0
- package/dist-lib/chunks/{admin-T9Qs91WR.js → admin-BDciacjd.js} +55 -59
- package/dist-lib/chunks/{admin-BSIc8-DD.js → admin-Bcel7ZqO.js} +55 -59
- package/dist-lib/chunks/{common-CBTam36M.js → common-BAoxGts5.js} +36 -3
- package/dist-lib/chunks/{common-BE996sRJ.js → common-C3KIPASu.js} +36 -3
- package/dist-lib/chunks/{inbox-BRsRaRZn.js → inbox-HnJhomm8.js} +71 -59
- package/dist-lib/chunks/{inbox-C2IIv9Z3.js → inbox-wUMY4TKD.js} +71 -59
- package/dist-lib/ezychat-web.css +1 -1
- package/dist-lib/index.js +10112 -8036
- package/dist-lib/types/admin/AdminLayout.d.ts +21 -5
- package/dist-lib/types/admin/AgentDreamCard.d.ts +9 -0
- package/dist-lib/types/admin/AgentResolutionCard.d.ts +1 -1
- package/dist-lib/types/admin/DreamChangeDialog.d.ts +14 -0
- package/dist-lib/types/admin/HiddenChats.d.ts +16 -0
- package/dist-lib/types/admin/connectors/ConnectorDetailPage.d.ts +1 -1
- package/dist-lib/types/admin/connectors/GitHubAccountCard.d.ts +8 -0
- package/dist-lib/types/admin/connectors/GitHubSettingsCard.d.ts +4 -0
- package/dist-lib/types/admin/connectors/catalog.d.ts +6 -6
- package/dist-lib/types/api/chat-delete.d.ts +16 -0
- package/dist-lib/types/api/chat-hide.d.ts +21 -0
- package/dist-lib/types/api/connectors.d.ts +128 -0
- package/dist-lib/types/api/dream.d.ts +91 -0
- package/dist-lib/types/api/queries.d.ts +5 -0
- package/dist-lib/types/api/scheduled-tasks.d.ts +6 -6
- package/dist-lib/types/askezy/api.d.ts +2 -2
- package/dist-lib/types/auth/LoginPage.d.ts +1 -0
- package/dist-lib/types/auth/UserMenu.d.ts +2 -0
- package/dist-lib/types/extensions/index.d.ts +1 -1
- package/dist-lib/types/extensions/routes.d.ts +3 -1
- package/dist-lib/types/i18n/resources.d.ts +280 -8
- package/dist-lib/types/inbox/ConversationHeader.d.ts +3 -1
- package/dist-lib/types/inbox/DeleteChatDialog.d.ts +12 -0
- package/dist-lib/types/lib/tips.d.ts +1 -1
- package/dist-lib/types/lib/version.d.ts +4 -0
- package/dist-lib/types/lite-import/steps.d.ts +7 -2
- package/dist-lib/types/nav/AccountPage.d.ts +2 -0
- package/dist-lib/types/nav/AppNav.d.ts +10 -0
- package/dist-lib/types/nav/PhoneBar.d.ts +14 -0
- package/dist-lib/types/nav/attention.d.ts +4 -0
- package/package.json +11 -10
- package/dist-lib/types/askezy/AskEzyButton.d.ts +0 -8
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type LucideIcon } from 'lucide-react';
|
|
2
|
-
import { type WebExtension, type WebExtensionAdminSection } from '../extensions';
|
|
3
2
|
/**
|
|
4
3
|
* Every core admin section. `labelKey` is a translation key in the `admin` namespace. WhatsApp and
|
|
5
4
|
* Inboxes never show together: see `visibleAdminNav`.
|
|
@@ -51,11 +50,28 @@ export type AdminNavItem = (typeof ADMIN_NAV)[number];
|
|
|
51
50
|
* one WhatsApp number (Lite allows one, so it keeps WhatsApp).
|
|
52
51
|
*/
|
|
53
52
|
export declare function visibleAdminNav(multiInbox: boolean): AdminNavItem[];
|
|
54
|
-
/** The core section an extension admin route declares for this path (e.g. `members`). */
|
|
55
|
-
export declare function extensionSectionOf(extensions: readonly WebExtension[], pathname: string): WebExtensionAdminSection | undefined;
|
|
56
53
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
54
|
+
* The groups of the phone Settings list. A section in no group (a new `ADMIN_NAV` entry) is returned as
|
|
55
|
+
* `ungrouped` and shows under More: phones have no other menu. Reports is left out (it has its own tab).
|
|
56
|
+
*/
|
|
57
|
+
export declare function settingsHomeGroups<T extends {
|
|
58
|
+
to: string;
|
|
59
|
+
}>(nav: readonly T[]): {
|
|
60
|
+
groups: readonly [{
|
|
61
|
+
readonly titleKey: "common:appNav.team";
|
|
62
|
+
readonly items: T[];
|
|
63
|
+
}, {
|
|
64
|
+
readonly titleKey: "common:appNav.business";
|
|
65
|
+
readonly items: T[];
|
|
66
|
+
}, {
|
|
67
|
+
readonly titleKey: "common:appNav.app";
|
|
68
|
+
readonly items: T[];
|
|
69
|
+
}];
|
|
70
|
+
ungrouped: T[];
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Admin area inside the app shell (rail on desktop, bottom tabs on phones). Reports and Members are full-width rail
|
|
74
|
+
* places; every other admin page keeps the Settings side menu on desktop. Non-admins are redirected to `/`.
|
|
59
75
|
*/
|
|
60
76
|
export declare function AdminLayout(): import("react").JSX.Element;
|
|
61
77
|
export default AdminLayout;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent page → Dream mode (design docs/superpowers/specs/2026-11-14-dream-mode-design.md, confirmed quick mock
|
|
3
|
+
* docs/features/dream-mode/mock): the switch, the nightly time, Apply by itself, and the history of nights with each
|
|
4
|
+
* change's state and actions. Settings save at once, like the other agent switches.
|
|
5
|
+
*/
|
|
6
|
+
export declare function AgentDreamCard({ agentId, name }: Readonly<{
|
|
7
|
+
agentId: number;
|
|
8
|
+
name: string;
|
|
9
|
+
}>): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent page → "Ask if the question is answered": on, the agent ends an answer with a resolution
|
|
3
3
|
* question and may close the chat on a clear "yes"; off (sales default), it adds no check-in line
|
|
4
|
-
* and
|
|
4
|
+
* and closes a chat only on a plain "thanks" (with a 👍). Saves at once, like the Groups switch.
|
|
5
5
|
*/
|
|
6
6
|
export declare function AgentResolutionCard({ agentId, name, enabled, }: Readonly<{
|
|
7
7
|
agentId: number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DreamChange } from '@ezychat/shared';
|
|
2
|
+
import { type DreamAction } from '../api/dream';
|
|
3
|
+
/**
|
|
4
|
+
* Dream mode → See change: the old and the new text, the team replies (and the customer questions) it came from,
|
|
5
|
+
* read live from the chat, and the checks it passed. A waiting change can be applied or dismissed here.
|
|
6
|
+
*/
|
|
7
|
+
export declare function DreamChangeDialog({ agentId, change, when, busy, onAction, onClose, }: Readonly<{
|
|
8
|
+
agentId: number;
|
|
9
|
+
change: DreamChange;
|
|
10
|
+
when: string;
|
|
11
|
+
busy: boolean;
|
|
12
|
+
onAction: (action: DreamAction) => void;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HiddenChatsInfo } from '@ezychat/shared';
|
|
2
|
+
/**
|
|
3
|
+
* Hide chats on Log out (docs/features/chat-hide-delete/design.md Part A): the texts Admin → WhatsApp
|
|
4
|
+
* and Admin → Inboxes show around a Log out.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The Log out (or Link again) confirmation's line: how many chats leave the inbox. Without counts yet
|
|
8
|
+
* it says so without a number; with no chat to hide it says nothing.
|
|
9
|
+
*/
|
|
10
|
+
export declare function HidesLine({ info }: Readonly<{
|
|
11
|
+
info: HiddenChatsInfo | undefined;
|
|
12
|
+
}>): import("react").JSX.Element | null;
|
|
13
|
+
/** The logged-out note: the chats of the old number are hidden until that number links again. */
|
|
14
|
+
export declare function HiddenChatsNote({ info }: Readonly<{
|
|
15
|
+
info: HiddenChatsInfo | undefined;
|
|
16
|
+
}>): import("react").JSX.Element | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `/admin/connectors/:id`: one page per connector. The app's own connectors come first: Google
|
|
3
3
|
* Calendar has Overview (what it does, the Google account, your data), Settings (per AI agent),
|
|
4
|
-
* Activity and Bookings tabs (`?tab=`, `&agent=`); Google Sheets
|
|
4
|
+
* Activity and Bookings tabs (`?tab=`, `&agent=`); Google Sheets, Google Drive and GitHub (Lite only) the same without Bookings;
|
|
5
5
|
* SQL Account has Overview, Connection, Settings, Customers and Activity; the custom connector needs Enterprise. Every
|
|
6
6
|
* other page is built from the connector's entry in the connector list. A connector an extension
|
|
7
7
|
* provides opens the extension's page.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GitHub sign-in (one per install, design docs/features/github/design.md): Sign in with
|
|
3
|
+
* GitHub (Anchor Sprint's GitHub App, through GitHub's device flow) or a fine-grained token; the
|
|
4
|
+
* install step, the token expiry, problems and Disconnect. Repositories per agent are on Settings.
|
|
5
|
+
*/
|
|
6
|
+
export declare function GitHubAccountCard({ onOpenSettings }: Readonly<{
|
|
7
|
+
onOpenSettings?: () => void;
|
|
8
|
+
}>): import("react").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type LucideIcon } from 'lucide-react';
|
|
2
|
-
import type { ConnectorEntry, GoogleCalendarState, SqlAccountState } from '@ezychat/shared';
|
|
2
|
+
import type { ConnectorEntry, GitHubState, GoogleCalendarState, SqlAccountState } from '@ezychat/shared';
|
|
3
3
|
/**
|
|
4
4
|
* Admin → Connectors: what the app itself provides next to the connector list (design
|
|
5
5
|
* docs/features/connector-list/design.md). The list (server, `GET /api/connectors/list`) gives
|
|
6
6
|
* every partner and coming-soon connector; the app keeps only its own features here: the built-in
|
|
7
|
-
* Google Calendar, Google Sheets, Google Drive
|
|
7
|
+
* Google Calendar, Google Sheets, Google Drive, SQL Account and GitHub (their pages and tabs live in the app) and the custom MCP connector (Enterprise,
|
|
8
8
|
* linked by its web extension through `connectorLinks`). Texts are catalog keys under
|
|
9
9
|
* `connectors.items.<id>` and `connectors.tools.<tool>` (admin namespace).
|
|
10
10
|
*/
|
|
@@ -14,9 +14,9 @@ export type ConnectorCategory = (typeof CONNECTOR_CATEGORIES)[number];
|
|
|
14
14
|
export declare const LIST_CATEGORY: Record<ConnectorEntry['category'], ConnectorCategory>;
|
|
15
15
|
/** The icon of a list entry without its own icon file. */
|
|
16
16
|
export declare const CATEGORY_ICON: Record<ConnectorCategory, LucideIcon>;
|
|
17
|
-
/** What the AI may do with the built-in Google Calendar, Google Sheets
|
|
18
|
-
export type ConnectorTool = 'checkFree' | 'book' | 'readRows' | 'addLead' | 'save' | 'find' | 'read';
|
|
19
|
-
export declare const CONNECTOR_IDS: readonly ["google-calendar", "google-sheets", "sql-account", "google-drive", "custom-mcp"];
|
|
17
|
+
/** What the AI may do with the built-in Google Calendar, Google Sheets, Google Drive and GitHub. */
|
|
18
|
+
export type ConnectorTool = 'checkFree' | 'book' | 'readRows' | 'addLead' | 'save' | 'find' | 'read' | 'searchIssues' | 'listIssues' | 'readIssue' | 'searchPulls';
|
|
19
|
+
export declare const CONNECTOR_IDS: readonly ["google-calendar", "google-sheets", "sql-account", "google-drive", "github", "custom-mcp"];
|
|
20
20
|
export type ConnectorId = (typeof CONNECTOR_IDS)[number];
|
|
21
21
|
export interface CatalogConnector {
|
|
22
22
|
id: ConnectorId;
|
|
@@ -42,4 +42,4 @@ export type ConnectorStatus = 'connected' | 'attention' | 'notConnected' | 'comi
|
|
|
42
42
|
* `state`: the connection state of this connector (Google Calendar's, Sheets' or Drive's sign-in, or
|
|
43
43
|
* SQL Account's connection).
|
|
44
44
|
*/
|
|
45
|
-
export declare function connectorStatus(c: CatalogConnector, state: GoogleCalendarState | SqlAccountState | undefined, extensionLink: string | undefined): ConnectorStatus;
|
|
45
|
+
export declare function connectorStatus(c: CatalogConnector, state: GoogleCalendarState | SqlAccountState | GitHubState | undefined, extensionLink: string | undefined): ConnectorStatus;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type QueryClient } from '@tanstack/react-query';
|
|
2
|
+
/**
|
|
3
|
+
* Delete chat (admins, docs/features/chat-hide-delete/design.md Part B): the chat, its messages,
|
|
4
|
+
* notes and files go for good in EzyChat; the WhatsApp phone keeps its copy.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Drops a deleted chat from every cache: the chat lists (the saved copy on this device follows on
|
|
8
|
+
* its next save), the chat, its messages, notes, profile and group members.
|
|
9
|
+
*/
|
|
10
|
+
export declare function removeChatFromCache(qc: QueryClient, jid: string): void;
|
|
11
|
+
/** What a delete removes (messages and files), for the confirmation; admins only. */
|
|
12
|
+
export declare function useChatDeletePreview(jid: string, enabled: boolean): import("@tanstack/react-query").UseQueryResult<{
|
|
13
|
+
messages: number;
|
|
14
|
+
files: number;
|
|
15
|
+
}, Error>;
|
|
16
|
+
export declare function useDeleteChat(): import("@tanstack/react-query").UseMutationResult<undefined, Error, string, unknown>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type QueryClient } from '@tanstack/react-query';
|
|
2
|
+
/**
|
|
3
|
+
* Hide chats on Log out (docs/features/chat-hide-delete/design.md Part A): when a linked phone logs
|
|
4
|
+
* out, every chat of its inbox is hidden (never deleted) until the same number links again.
|
|
5
|
+
*/
|
|
6
|
+
/** Every read of one inbox's hidden-chat counts (any connection state). */
|
|
7
|
+
export declare const hiddenChatsKey: (inboxId: number) => readonly ["hidden-chats", number];
|
|
8
|
+
/**
|
|
9
|
+
* Admins: how many chats Log out hides (`visible`) and how many are hidden for the inbox's number.
|
|
10
|
+
* `state` (the connection state) is part of the key, so the counts are read again when it changes.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useHiddenChats(inboxId: number, state: string, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
|
|
13
|
+
visible: number;
|
|
14
|
+
hidden: number;
|
|
15
|
+
number: string | null;
|
|
16
|
+
}, Error>;
|
|
17
|
+
/**
|
|
18
|
+
* The inbox's phone logged out: its chats leave every cache (the chat lists, each chat and its
|
|
19
|
+
* messages; the saved copy on this device follows on its next save), and the lists load again.
|
|
20
|
+
*/
|
|
21
|
+
export declare function removeInboxChatsFromCache(qc: QueryClient, inboxId: number): void;
|
|
@@ -341,3 +341,131 @@ export declare function useDrivePickerProgress(requestId: string | null): import
|
|
|
341
341
|
kind: "text" | "pdf" | "other" | "sheet" | "word" | "doc";
|
|
342
342
|
}[];
|
|
343
343
|
}, Error>;
|
|
344
|
+
/** Admin → Connectors → GitHub (admins only, Lite). Tokens never reach the browser. */
|
|
345
|
+
export declare const githubKey: readonly ["connectors", "github"];
|
|
346
|
+
export declare const githubAgentKey: (agentId: number) => readonly ["connectors", "github", "agent", number];
|
|
347
|
+
export declare const githubReposKey: readonly ["connectors", "github", "repos"];
|
|
348
|
+
export declare const githubActivityKey: readonly ["connectors", "github", "activity"];
|
|
349
|
+
export declare function useGitHub(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
|
|
350
|
+
state: "unavailable" | "connected" | "expired" | "not_connected" | "no_installation" | "expiring";
|
|
351
|
+
method: "app" | "token" | null;
|
|
352
|
+
login: string | null;
|
|
353
|
+
connectedAt: number | null;
|
|
354
|
+
tokenExpiresAt: number | null;
|
|
355
|
+
problemSince: number | null;
|
|
356
|
+
manageUrl: string | null;
|
|
357
|
+
}, Error>;
|
|
358
|
+
/** Starts the GitHub App sign-in (device flow): the page shows `userCode` and polls the request. */
|
|
359
|
+
export declare function useGitHubDeviceStart(): import("@tanstack/react-query").UseMutationResult<{
|
|
360
|
+
requestId: string;
|
|
361
|
+
userCode: string;
|
|
362
|
+
verificationUri: string;
|
|
363
|
+
expiresAt: number;
|
|
364
|
+
}, Error, void, unknown>;
|
|
365
|
+
/** Polls a device sign-in every 3 s until the admin approved, cancelled or the code expired. */
|
|
366
|
+
export declare function useGitHubDeviceProgress(requestId: string | null): import("@tanstack/react-query").UseQueryResult<{
|
|
367
|
+
status: "expired" | "denied" | "pending" | "failed" | "done";
|
|
368
|
+
github: {
|
|
369
|
+
state: "unavailable" | "connected" | "expired" | "not_connected" | "no_installation" | "expiring";
|
|
370
|
+
method: "app" | "token" | null;
|
|
371
|
+
login: string | null;
|
|
372
|
+
connectedAt: number | null;
|
|
373
|
+
tokenExpiresAt: number | null;
|
|
374
|
+
problemSince: number | null;
|
|
375
|
+
manageUrl: string | null;
|
|
376
|
+
} | null;
|
|
377
|
+
}, Error>;
|
|
378
|
+
/** Stops the server polling GitHub for a code nobody waits for any more. */
|
|
379
|
+
export declare function cancelGitHubDevice(requestId: string): Promise<unknown>;
|
|
380
|
+
/** Signs in with a fine-grained token; 400 `classic` / `invalid` / `no_repos` when refused. */
|
|
381
|
+
export declare function useGitHubToken(): import("@tanstack/react-query").UseMutationResult<{
|
|
382
|
+
state: "unavailable" | "connected" | "expired" | "not_connected" | "no_installation" | "expiring";
|
|
383
|
+
method: "app" | "token" | null;
|
|
384
|
+
login: string | null;
|
|
385
|
+
connectedAt: number | null;
|
|
386
|
+
tokenExpiresAt: number | null;
|
|
387
|
+
problemSince: number | null;
|
|
388
|
+
manageUrl: string | null;
|
|
389
|
+
}, Error, string, unknown>;
|
|
390
|
+
/** "Check again" after installing the App on GitHub. */
|
|
391
|
+
export declare function useGitHubCheck(): import("@tanstack/react-query").UseMutationResult<{
|
|
392
|
+
state: "unavailable" | "connected" | "expired" | "not_connected" | "no_installation" | "expiring";
|
|
393
|
+
method: "app" | "token" | null;
|
|
394
|
+
login: string | null;
|
|
395
|
+
connectedAt: number | null;
|
|
396
|
+
tokenExpiresAt: number | null;
|
|
397
|
+
problemSince: number | null;
|
|
398
|
+
manageUrl: string | null;
|
|
399
|
+
}, Error, void, unknown>;
|
|
400
|
+
export declare function useGitHubDisconnect(): import("@tanstack/react-query").UseMutationResult<{
|
|
401
|
+
state: "unavailable" | "connected" | "expired" | "not_connected" | "no_installation" | "expiring";
|
|
402
|
+
method: "app" | "token" | null;
|
|
403
|
+
login: string | null;
|
|
404
|
+
connectedAt: number | null;
|
|
405
|
+
tokenExpiresAt: number | null;
|
|
406
|
+
problemSince: number | null;
|
|
407
|
+
manageUrl: string | null;
|
|
408
|
+
}, Error, void, unknown>;
|
|
409
|
+
/** The repositories GitHub lets EzyChat reach (the server caches them). */
|
|
410
|
+
export declare function useGitHubRepos(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
|
|
411
|
+
repos: {
|
|
412
|
+
id: number;
|
|
413
|
+
fullName: string;
|
|
414
|
+
private: boolean;
|
|
415
|
+
}[];
|
|
416
|
+
checkedAt: number;
|
|
417
|
+
}, Error>;
|
|
418
|
+
/** Reads the list again from GitHub ("Refresh"). */
|
|
419
|
+
export declare function useRefreshGitHubRepos(): import("@tanstack/react-query").UseMutationResult<{
|
|
420
|
+
repos: {
|
|
421
|
+
id: number;
|
|
422
|
+
fullName: string;
|
|
423
|
+
private: boolean;
|
|
424
|
+
}[];
|
|
425
|
+
checkedAt: number;
|
|
426
|
+
}, Error, void, unknown>;
|
|
427
|
+
/** One AI agent's GitHub settings and which of its repos GitHub no longer shares. */
|
|
428
|
+
export declare function useGitHubAgent(agentId: number | null, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
|
|
429
|
+
settings: {
|
|
430
|
+
repos: {
|
|
431
|
+
id: number;
|
|
432
|
+
fullName: string;
|
|
433
|
+
private: boolean;
|
|
434
|
+
}[];
|
|
435
|
+
issues: boolean;
|
|
436
|
+
pulls: boolean;
|
|
437
|
+
};
|
|
438
|
+
unavailableRepoIds: number[];
|
|
439
|
+
}, Error>;
|
|
440
|
+
export declare function useSaveGitHubAgent(agentId: number): import("@tanstack/react-query").UseMutationResult<{
|
|
441
|
+
settings: {
|
|
442
|
+
repos: {
|
|
443
|
+
id: number;
|
|
444
|
+
fullName: string;
|
|
445
|
+
private: boolean;
|
|
446
|
+
}[];
|
|
447
|
+
issues: boolean;
|
|
448
|
+
pulls: boolean;
|
|
449
|
+
};
|
|
450
|
+
unavailableRepoIds: number[];
|
|
451
|
+
}, Error, {
|
|
452
|
+
repos: {
|
|
453
|
+
id: number;
|
|
454
|
+
fullName: string;
|
|
455
|
+
private: boolean;
|
|
456
|
+
}[];
|
|
457
|
+
issues: boolean;
|
|
458
|
+
pulls: boolean;
|
|
459
|
+
}, unknown>;
|
|
460
|
+
export declare function useGitHubActivity(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
|
|
461
|
+
activity: {
|
|
462
|
+
id: number;
|
|
463
|
+
at: number;
|
|
464
|
+
kind: "failed" | "read" | "refused" | "searched";
|
|
465
|
+
agentId: number | null;
|
|
466
|
+
agentName: string;
|
|
467
|
+
chatJid: string | null;
|
|
468
|
+
customer: string;
|
|
469
|
+
group: string | null;
|
|
470
|
+
}[];
|
|
471
|
+
}, Error>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dream mode of one AI agent (design docs/superpowers/specs/2026-11-14-dream-mode-design.md, admins only): settings,
|
|
3
|
+
* the nightly history, one change and Apply / Dismiss / Undo. Every change reads the history (and the agent) again.
|
|
4
|
+
*/
|
|
5
|
+
export declare const dreamKey: (agentId: number) => readonly ["dream", number];
|
|
6
|
+
export declare const dreamChangeKey: (agentId: number, id: number) => readonly ["dream", number, "change", number];
|
|
7
|
+
export declare function useDream(agentId: number): import("@tanstack/react-query").UseQueryResult<{
|
|
8
|
+
settings: {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
runTime: string;
|
|
11
|
+
autoApply: boolean;
|
|
12
|
+
};
|
|
13
|
+
runs: {
|
|
14
|
+
id: number;
|
|
15
|
+
slot: number;
|
|
16
|
+
status: "failed" | "skipped" | "running" | "done" | "missed";
|
|
17
|
+
reason: "ai_unavailable" | "agent_off" | "access_closed" | null;
|
|
18
|
+
chatsRead: number;
|
|
19
|
+
takeovers: number;
|
|
20
|
+
saved: number;
|
|
21
|
+
dropped: number;
|
|
22
|
+
changes: {
|
|
23
|
+
id: number;
|
|
24
|
+
runId: number;
|
|
25
|
+
target: "instructions" | "handoff_rules" | "context_text";
|
|
26
|
+
itemId: number | null;
|
|
27
|
+
itemName: string | null;
|
|
28
|
+
summary: string;
|
|
29
|
+
status: "expired" | "waiting" | "applied" | "dismissed" | "undone" | "stale";
|
|
30
|
+
auto: boolean;
|
|
31
|
+
sourceCount: number;
|
|
32
|
+
createdAt: number;
|
|
33
|
+
decidedAt: number | null;
|
|
34
|
+
}[];
|
|
35
|
+
}[];
|
|
36
|
+
nextBefore: number | null;
|
|
37
|
+
aiReady: boolean;
|
|
38
|
+
}, Error>;
|
|
39
|
+
export declare function useSaveDream(agentId: number): import("@tanstack/react-query").UseMutationResult<{
|
|
40
|
+
enabled: boolean;
|
|
41
|
+
runTime: string;
|
|
42
|
+
autoApply: boolean;
|
|
43
|
+
}, Error, {
|
|
44
|
+
enabled?: boolean | undefined;
|
|
45
|
+
runTime?: string | undefined;
|
|
46
|
+
autoApply?: boolean | undefined;
|
|
47
|
+
}, unknown>;
|
|
48
|
+
export declare function useDreamChange(agentId: number, id: number): import("@tanstack/react-query").UseQueryResult<{
|
|
49
|
+
id: number;
|
|
50
|
+
runId: number;
|
|
51
|
+
target: "instructions" | "handoff_rules" | "context_text";
|
|
52
|
+
itemId: number | null;
|
|
53
|
+
itemName: string | null;
|
|
54
|
+
summary: string;
|
|
55
|
+
status: "expired" | "waiting" | "applied" | "dismissed" | "undone" | "stale";
|
|
56
|
+
auto: boolean;
|
|
57
|
+
sourceCount: number;
|
|
58
|
+
createdAt: number;
|
|
59
|
+
decidedAt: number | null;
|
|
60
|
+
before: string;
|
|
61
|
+
after: string;
|
|
62
|
+
checks: {
|
|
63
|
+
name: "privacy" | "leak" | "grounding" | "replay" | "regression";
|
|
64
|
+
ok: boolean;
|
|
65
|
+
detail?: string | undefined;
|
|
66
|
+
}[];
|
|
67
|
+
sources: {
|
|
68
|
+
role: "team" | "customer";
|
|
69
|
+
name: string | null;
|
|
70
|
+
at: number;
|
|
71
|
+
text: string;
|
|
72
|
+
}[];
|
|
73
|
+
}, Error>;
|
|
74
|
+
export type DreamAction = 'apply' | 'dismiss' | 'undo';
|
|
75
|
+
/** Apply / Dismiss / Undo (409 `setup_changed`: the text changed since the night, the change is outdated). */
|
|
76
|
+
export declare function useDreamAction(agentId: number): import("@tanstack/react-query").UseMutationResult<{
|
|
77
|
+
id: number;
|
|
78
|
+
runId: number;
|
|
79
|
+
target: "instructions" | "handoff_rules" | "context_text";
|
|
80
|
+
itemId: number | null;
|
|
81
|
+
itemName: string | null;
|
|
82
|
+
summary: string;
|
|
83
|
+
status: "expired" | "waiting" | "applied" | "dismissed" | "undone" | "stale";
|
|
84
|
+
auto: boolean;
|
|
85
|
+
sourceCount: number;
|
|
86
|
+
createdAt: number;
|
|
87
|
+
decidedAt: number | null;
|
|
88
|
+
}, Error, {
|
|
89
|
+
id: number;
|
|
90
|
+
action: DreamAction;
|
|
91
|
+
}, unknown>;
|
|
@@ -15,6 +15,7 @@ export declare const qk: {
|
|
|
15
15
|
chats: (f: ChatFilters) => readonly ["chats", ChatFilters];
|
|
16
16
|
chatsAll: readonly ["chats"];
|
|
17
17
|
openChatCount: readonly ["open-chat-count"];
|
|
18
|
+
unreadChatCount: readonly ["unread-chat-count"];
|
|
18
19
|
report: (days: number, inbox?: number | null) => readonly ["report", number, number | null];
|
|
19
20
|
chat: (jid: string) => readonly ["chat", string];
|
|
20
21
|
messages: (jid: string) => readonly ["messages", string];
|
|
@@ -262,6 +263,10 @@ export declare function useReport(days: ReportPeriod, inbox?: number | null): im
|
|
|
262
263
|
export declare function useOpenChatCount(): import("@tanstack/react-query").UseQueryResult<{
|
|
263
264
|
openCount: number;
|
|
264
265
|
}, Error>;
|
|
266
|
+
/** App navigation: open chats with unread messages the user may open (kept live by the chat socket events). */
|
|
267
|
+
export declare function useUnreadChatCount(): import("@tanstack/react-query").UseQueryResult<{
|
|
268
|
+
count: number;
|
|
269
|
+
}, Error>;
|
|
265
270
|
export declare function useResolveAllChats(): import("@tanstack/react-query").UseMutationResult<{
|
|
266
271
|
resolvedCount: number;
|
|
267
272
|
}, Error, void, unknown>;
|
|
@@ -22,7 +22,7 @@ export declare function useScheduledTasks(agentId: number): import("@tanstack/re
|
|
|
22
22
|
trigger: "schedule" | "run_now";
|
|
23
23
|
byUserName: string | null;
|
|
24
24
|
result: "failed" | "sent" | "skipped" | null;
|
|
25
|
-
reason: "window_closed" | "confidential_leak" | "ai_unavailable" | "lookup_failed" | "agent_off" | "ai_disconnected" | "wa_disconnected" | "access_closed" | "nothing_to_say" | "needs_team" | "missed" | "chat_gone" | "send_failed" | "interrupted" | null;
|
|
25
|
+
reason: "window_closed" | "confidential_leak" | "ai_unavailable" | "lookup_failed" | "agent_off" | "ai_disconnected" | "wa_disconnected" | "access_closed" | "nothing_to_say" | "needs_team" | "missed" | "chat_gone" | "chat_hidden" | "send_failed" | "interrupted" | null;
|
|
26
26
|
messageId: string | null;
|
|
27
27
|
} | null;
|
|
28
28
|
name: string;
|
|
@@ -54,7 +54,7 @@ export declare function useCreateScheduledTask(agentId: number): import("@tansta
|
|
|
54
54
|
trigger: "schedule" | "run_now";
|
|
55
55
|
byUserName: string | null;
|
|
56
56
|
result: "failed" | "sent" | "skipped" | null;
|
|
57
|
-
reason: "window_closed" | "confidential_leak" | "ai_unavailable" | "lookup_failed" | "agent_off" | "ai_disconnected" | "wa_disconnected" | "access_closed" | "nothing_to_say" | "needs_team" | "missed" | "chat_gone" | "send_failed" | "interrupted" | null;
|
|
57
|
+
reason: "window_closed" | "confidential_leak" | "ai_unavailable" | "lookup_failed" | "agent_off" | "ai_disconnected" | "wa_disconnected" | "access_closed" | "nothing_to_say" | "needs_team" | "missed" | "chat_gone" | "chat_hidden" | "send_failed" | "interrupted" | null;
|
|
58
58
|
messageId: string | null;
|
|
59
59
|
} | null;
|
|
60
60
|
name: string;
|
|
@@ -89,7 +89,7 @@ export declare function useUpdateScheduledTask(agentId: number): import("@tansta
|
|
|
89
89
|
trigger: "schedule" | "run_now";
|
|
90
90
|
byUserName: string | null;
|
|
91
91
|
result: "failed" | "sent" | "skipped" | null;
|
|
92
|
-
reason: "window_closed" | "confidential_leak" | "ai_unavailable" | "lookup_failed" | "agent_off" | "ai_disconnected" | "wa_disconnected" | "access_closed" | "nothing_to_say" | "needs_team" | "missed" | "chat_gone" | "send_failed" | "interrupted" | null;
|
|
92
|
+
reason: "window_closed" | "confidential_leak" | "ai_unavailable" | "lookup_failed" | "agent_off" | "ai_disconnected" | "wa_disconnected" | "access_closed" | "nothing_to_say" | "needs_team" | "missed" | "chat_gone" | "chat_hidden" | "send_failed" | "interrupted" | null;
|
|
93
93
|
messageId: string | null;
|
|
94
94
|
} | null;
|
|
95
95
|
name: string;
|
|
@@ -114,7 +114,7 @@ export declare function useScheduledRuns(agentId: number, taskId: number): impor
|
|
|
114
114
|
trigger: "schedule" | "run_now";
|
|
115
115
|
byUserName: string | null;
|
|
116
116
|
result: "failed" | "sent" | "skipped" | null;
|
|
117
|
-
reason: "window_closed" | "confidential_leak" | "ai_unavailable" | "lookup_failed" | "agent_off" | "ai_disconnected" | "wa_disconnected" | "access_closed" | "nothing_to_say" | "needs_team" | "missed" | "chat_gone" | "send_failed" | "interrupted" | null;
|
|
117
|
+
reason: "window_closed" | "confidential_leak" | "ai_unavailable" | "lookup_failed" | "agent_off" | "ai_disconnected" | "wa_disconnected" | "access_closed" | "nothing_to_say" | "needs_team" | "missed" | "chat_gone" | "chat_hidden" | "send_failed" | "interrupted" | null;
|
|
118
118
|
messageId: string | null;
|
|
119
119
|
}[];
|
|
120
120
|
}, Error>;
|
|
@@ -126,7 +126,7 @@ export declare function useRunScheduledTask(agentId: number): import("@tanstack/
|
|
|
126
126
|
trigger: "schedule" | "run_now";
|
|
127
127
|
byUserName: string | null;
|
|
128
128
|
result: "failed" | "sent" | "skipped" | null;
|
|
129
|
-
reason: "window_closed" | "confidential_leak" | "ai_unavailable" | "lookup_failed" | "agent_off" | "ai_disconnected" | "wa_disconnected" | "access_closed" | "nothing_to_say" | "needs_team" | "missed" | "chat_gone" | "send_failed" | "interrupted" | null;
|
|
129
|
+
reason: "window_closed" | "confidential_leak" | "ai_unavailable" | "lookup_failed" | "agent_off" | "ai_disconnected" | "wa_disconnected" | "access_closed" | "nothing_to_say" | "needs_team" | "missed" | "chat_gone" | "chat_hidden" | "send_failed" | "interrupted" | null;
|
|
130
130
|
messageId: string | null;
|
|
131
131
|
};
|
|
132
132
|
}, Error, number, unknown>;
|
|
@@ -134,7 +134,7 @@ export declare function useRunScheduledTask(agentId: number): import("@tanstack/
|
|
|
134
134
|
export declare function usePreviewScheduledTask(agentId: number): import("@tanstack/react-query").UseMutationResult<{
|
|
135
135
|
result: "sent" | "skipped";
|
|
136
136
|
text: string | null;
|
|
137
|
-
reason: "window_closed" | "confidential_leak" | "ai_unavailable" | "lookup_failed" | "agent_off" | "ai_disconnected" | "wa_disconnected" | "access_closed" | "nothing_to_say" | "needs_team" | "missed" | "chat_gone" | "send_failed" | "interrupted" | null;
|
|
137
|
+
reason: "window_closed" | "confidential_leak" | "ai_unavailable" | "lookup_failed" | "agent_off" | "ai_disconnected" | "wa_disconnected" | "access_closed" | "nothing_to_say" | "needs_team" | "missed" | "chat_gone" | "chat_hidden" | "send_failed" | "interrupted" | null;
|
|
138
138
|
lookups: {
|
|
139
139
|
title: string;
|
|
140
140
|
sourceLabel: string;
|
|
@@ -4,11 +4,11 @@ export declare const getAskEzyStatus: () => Promise<{
|
|
|
4
4
|
}>;
|
|
5
5
|
export type AskEzyChangeAction = 'apply' | 'discard' | 'undo';
|
|
6
6
|
export declare const askEzyChange: (id: string, action: AskEzyChangeAction) => Promise<{
|
|
7
|
-
status: "
|
|
7
|
+
status: "applied" | "proposed" | "discarded";
|
|
8
8
|
version?: number | undefined;
|
|
9
9
|
related?: {
|
|
10
10
|
id: string;
|
|
11
|
-
status: "
|
|
11
|
+
status: "applied" | "proposed" | "discarded";
|
|
12
12
|
}[] | undefined;
|
|
13
13
|
agentId?: number | undefined;
|
|
14
14
|
taskId?: number | undefined;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Also used by the Account page (nav/AccountPage.tsx), so a new language is added once. */
|
|
2
|
+
export declare function shortLocaleLabel(code: string, nativeName: string): string;
|
|
1
3
|
export declare function UserMenu({ className, align, }: {
|
|
2
4
|
className?: string;
|
|
3
5
|
align?: 'start' | 'center' | 'end';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './types';
|
|
2
2
|
export { WebExtensionsProvider, useWebExtensions } from './context';
|
|
3
3
|
export { registerExtensionCatalogs, useExtensionTranslation, type ExtensionTranslate, } from './i18n';
|
|
4
|
-
export { ExtensionBoundary, extensionRoutes } from './routes';
|
|
4
|
+
export { ExtensionBoundary, extensionRoutes, extensionSectionOf } from './routes';
|
|
5
5
|
export { inboxTypesOf, useInboxTypes } from './inbox-types';
|
|
6
6
|
export { AgentSectionProvider, useAgentSection, type AgentSectionInfo } from './agent-section';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type WebExtension, type WebExtensionAdminSection } from './types';
|
|
3
|
+
/** The core section an extension admin route declares for this path (e.g. `members`). */
|
|
4
|
+
export declare function extensionSectionOf(extensions: readonly WebExtension[], pathname: string): WebExtensionAdminSection | undefined;
|
|
3
5
|
/** Wraps one extension element so a crash inside it never blanks the rest of the app. */
|
|
4
6
|
export declare function ExtensionBoundary({ children }: {
|
|
5
7
|
children: ReactNode;
|