@clagentic/console 1.12.0 → 1.13.0-beta.1
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/README.md +7 -1
- package/bin/cli.js +18 -15
- package/lib/agent-roster-ws.js +38 -13
- package/lib/agent-roster.js +111 -12
- package/lib/agents.js +68 -33
- package/lib/atomic-install.js +334 -0
- package/lib/build-changes.js +33 -4
- package/lib/build-sha.json +2 -2
- package/lib/build-update-offer.js +12 -0
- package/lib/chat-width.js +31 -0
- package/lib/cli/agent-usage.js +126 -0
- package/lib/cli/arg-validation.js +1 -1
- package/lib/cli/compact-output.js +69 -0
- package/lib/cli/ipc-subcommands.js +92 -67
- package/lib/cli/output.js +28 -0
- package/lib/cli/restart-verb.js +132 -0
- package/lib/cli/schedule-input-subcommands.js +45 -8
- package/lib/cli/session-subcommands.js +37 -11
- package/lib/cli/settings-subcommands.js +74 -0
- package/lib/cli-transcript-title.js +56 -3
- package/lib/client-files.js +79 -0
- package/lib/daemon.js +100 -28
- package/lib/default-avatar-color.js +4 -0
- package/lib/drain.js +58 -10
- package/lib/mcp-tool-input.js +2 -2
- package/lib/model-families.js +49 -1
- package/lib/notify/type-registry.js +4 -0
- package/lib/notify/types.js +7 -4
- package/lib/pages.js +13 -63
- package/lib/permission-summary.js +12 -16
- package/lib/plan-usage-reader.js +70 -0
- package/lib/project-connection.js +4 -2
- package/lib/project-filesystem.js +6 -7
- package/lib/project-notifications.js +55 -8
- package/lib/project-prompt-expiry-settings.js +42 -0
- package/lib/project-sessions.js +52 -0
- package/lib/project-settings-gate.js +98 -0
- package/lib/project-user-mention.js +3 -2
- package/lib/project.js +1 -1
- package/lib/prompt-expiry-settings.js +49 -0
- package/lib/prompt-expiry.js +24 -3
- package/lib/prompt-kinds/codecs.js +6 -2
- package/lib/public/app.js +36 -36
- package/lib/public/css/admin.css +156 -170
- package/lib/public/css/agent-messages.css +24 -24
- package/lib/public/css/agent-picker.css +90 -38
- package/lib/public/css/agent-roster.css +61 -27
- package/lib/public/css/at-agents.css +10 -10
- package/lib/public/css/base.css +207 -184
- package/lib/public/css/chat-layout.css +228 -0
- package/lib/public/css/command-palette.css +86 -88
- package/lib/public/css/diagnostics.css +78 -204
- package/lib/public/css/diff.css +10 -10
- package/lib/public/css/filebrowser.css +32 -60
- package/lib/public/css/home-hub.css +100 -100
- package/lib/public/css/icon-strip.css +195 -238
- package/lib/public/css/input.css +191 -212
- package/lib/public/css/login-panel.css +16 -16
- package/lib/public/css/loop.css +96 -187
- package/lib/public/css/mention.css +49 -110
- package/lib/public/css/menus.css +162 -169
- package/lib/public/css/messages.css +49 -123
- package/lib/public/css/mobile-nav.css +207 -264
- package/lib/public/css/notifications-center.css +45 -124
- package/lib/public/css/overlay.css +269 -0
- package/lib/public/css/overlays.css +134 -156
- package/lib/public/css/playbook.css +41 -41
- package/lib/public/css/profile.css +43 -112
- package/lib/public/css/rewind.css +112 -112
- package/lib/public/css/scheduler-modal.css +27 -135
- package/lib/public/css/scheduler.css +204 -210
- package/lib/public/css/server-settings.css +173 -239
- package/lib/public/css/session-search.css +20 -20
- package/lib/public/css/settings-nav.css +197 -0
- package/lib/public/css/sidebar.css +213 -304
- package/lib/public/css/skills.css +121 -135
- package/lib/public/css/sticky-notes.css +114 -200
- package/lib/public/css/stt.css +17 -26
- package/lib/public/css/team-panel.css +36 -36
- package/lib/public/css/team-view.css +9 -9
- package/lib/public/css/title-bar.css +83 -100
- package/lib/public/css/tooltip.css +10 -10
- package/lib/public/css/user-settings.css +78 -131
- package/lib/public/css/user-shell.css +125 -29
- package/lib/public/index.html +178 -177
- package/lib/public/manifest.json +0 -2
- package/lib/public/modules/admin.js +54 -92
- package/lib/public/modules/agent-avatar.js +134 -3
- package/lib/public/modules/agent-messages.js +2 -1
- package/lib/public/modules/agent-picker.js +23 -21
- package/lib/public/modules/agent-roster-groups.js +128 -0
- package/lib/public/modules/agent-roster.js +40 -11
- package/lib/public/modules/app-connection.js +13 -1
- package/lib/public/modules/app-cursors.js +9 -9
- package/lib/public/modules/app-favicon.js +8 -16
- package/lib/public/modules/app-header.js +28 -19
- package/lib/public/modules/app-history-replay.js +67 -4
- package/lib/public/modules/app-home-hub.js +15 -0
- package/lib/public/modules/app-loop-ui.js +41 -47
- package/lib/public/modules/app-loop-wizard.js +9 -10
- package/lib/public/modules/app-messages.js +32 -36
- package/lib/public/modules/app-misc.js +22 -92
- package/lib/public/modules/app-modals.js +98 -0
- package/lib/public/modules/app-notifications.js +124 -135
- package/lib/public/modules/app-panels.js +28 -32
- package/lib/public/modules/app-projects.js +30 -40
- package/lib/public/modules/app-rate-limit.js +26 -9
- package/lib/public/modules/app-rendering.js +128 -110
- package/lib/public/modules/app-skills-install.js +6 -4
- package/lib/public/modules/assistant-identity.js +55 -0
- package/lib/public/modules/at-agents.js +3 -0
- package/lib/public/modules/build-guard.js +25 -11
- package/lib/public/modules/chat-width-choice.js +75 -0
- package/lib/public/modules/chat-width-prefs.js +52 -0
- package/lib/public/modules/chat-width.js +102 -0
- package/lib/public/modules/collapsible-text.js +36 -4
- package/lib/public/modules/command-palette.js +28 -34
- package/lib/public/modules/context-sources.js +3 -5
- package/lib/public/modules/diagnostics.js +130 -129
- package/lib/public/modules/info-panel.js +31 -0
- package/lib/public/modules/injected-identity.js +8 -8
- package/lib/public/modules/input-list-menu.js +39 -0
- package/lib/public/modules/input.js +22 -21
- package/lib/public/modules/markdown.js +10 -11
- package/lib/public/modules/mcp-ui.js +4 -14
- package/lib/public/modules/mention.js +100 -229
- package/lib/public/modules/message-header.js +80 -0
- package/lib/public/modules/message-participants.js +39 -0
- package/lib/public/modules/mobile-action-sheet.js +46 -0
- package/lib/public/modules/mobile-nav-sheet.js +104 -0
- package/lib/public/modules/model-families.js +41 -4
- package/lib/public/modules/note-order.js +39 -0
- package/lib/public/modules/notifications.js +35 -52
- package/lib/public/modules/overlay-history.js +73 -19
- package/lib/public/modules/overlay-menu.js +123 -0
- package/lib/public/modules/overlay-modal.js +186 -0
- package/lib/public/modules/overlay-registry.js +392 -0
- package/lib/public/modules/overlay-stack.js +110 -0
- package/lib/public/modules/overlay.js +117 -0
- package/lib/public/modules/popover-position.js +18 -2
- package/lib/public/modules/preference-sync.js +28 -0
- package/lib/public/modules/profile.js +24 -49
- package/lib/public/modules/project-settings.js +27 -172
- package/lib/public/modules/prompt-expiry-controls.js +46 -0
- package/lib/public/modules/prompt-kinds/command-summary.js +149 -0
- package/lib/public/modules/prompt-kinds/permission.js +70 -92
- package/lib/public/modules/prompts.js +1 -2
- package/lib/public/modules/qrcode.js +6 -21
- package/lib/public/modules/queued-button.js +15 -2
- package/lib/public/modules/rewind.js +9 -3
- package/lib/public/modules/schedule-time.js +32 -7
- package/lib/public/modules/scheduled-outbox.js +51 -18
- package/lib/public/modules/scheduler-config.js +87 -127
- package/lib/public/modules/scheduler.js +29 -26
- package/lib/public/modules/serialized-save.js +79 -0
- package/lib/public/modules/server-settings.js +75 -65
- package/lib/public/modules/session-grants.js +16 -19
- package/lib/public/modules/session-list-avatars.js +98 -0
- package/lib/public/modules/session-vendor-state.js +86 -0
- package/lib/public/modules/settings-access.js +35 -0
- package/lib/public/modules/settings-hub.js +125 -0
- package/lib/public/modules/settings-nav.js +182 -0
- package/lib/public/modules/shell-line.js +24 -0
- package/lib/public/modules/sidebar-mobile.js +151 -195
- package/lib/public/modules/sidebar-projects.js +88 -129
- package/lib/public/modules/sidebar-sessions.js +66 -34
- package/lib/public/modules/sidebar.js +2 -2
- package/lib/public/modules/skills.js +11 -26
- package/lib/public/modules/sticky-notes.js +19 -16
- package/lib/public/modules/stt.js +9 -23
- package/lib/public/modules/terminal.js +86 -90
- package/lib/public/modules/theme-choice.js +126 -0
- package/lib/public/modules/theme-colors.js +19 -0
- package/lib/public/modules/theme-prefs.js +121 -0
- package/lib/public/modules/theme.js +227 -605
- package/lib/public/modules/tool-palette.js +7 -17
- package/lib/public/modules/tools.js +8 -10
- package/lib/public/modules/user-settings.js +59 -115
- package/lib/public/modules/user-shell.js +9 -2
- package/lib/public/modules/utils.js +10 -12
- package/lib/public/modules/vendor-picker.js +4 -2
- package/lib/public/modules/vendor-registry.js +1 -2
- package/lib/public/style.css +3 -1
- package/lib/public/sw.js +9 -2
- package/lib/public/theme-core.js +411 -0
- package/lib/request-body.js +70 -0
- package/lib/sdk-bridge.js +227 -88
- package/lib/sdk-message-processor.js +44 -16
- package/lib/server-admin.js +198 -200
- package/lib/server-auth.js +16 -13
- package/lib/server-dm.js +4 -3
- package/lib/server-settings.js +177 -130
- package/lib/server.js +87 -36
- package/lib/session-background-tasks.js +79 -0
- package/lib/session-directory.js +138 -13
- package/lib/session-input-ipc.js +2 -0
- package/lib/session-input.js +39 -5
- package/lib/session-list-avatars.js +16 -0
- package/lib/session-reclaim.js +37 -25
- package/lib/session-vendor.js +37 -0
- package/lib/sessions.js +99 -34
- package/lib/settings-ipc.js +60 -0
- package/lib/settings-registry.js +86 -0
- package/lib/terminal-manager.js +17 -5
- package/lib/theme-files.js +132 -0
- package/lib/theme-seed.js +136 -0
- package/lib/themes/clagentic-dark.json +13 -6
- package/lib/themes/clagentic-light.json +12 -5
- package/lib/updater.js +6 -4
- package/lib/usage-store.js +97 -10
- package/lib/users-preferences.js +118 -19
- package/lib/users.js +19 -10
- package/lib/vendor-catalog.js +130 -0
- package/lib/ws-schema.js +4 -2
- package/lib/yoke/adapters/claude.js +81 -1
- package/lib/yoke/adapters/codex-user-shell.js +87 -23
- package/lib/yoke/adapters/codex.js +89 -5
- package/lib/yoke/codex-binary.js +59 -0
- package/package.json +1 -1
- package/scripts/check-test-count.js +5 -0
- package/scripts/install-local-test.js +50 -9
- package/scripts/write-build-sha.js +18 -2
- package/lib/public/css/channel-layout.css +0 -329
- package/lib/themes/ayu-light.json +0 -9
- package/lib/themes/catppuccin-latte.json +0 -9
- package/lib/themes/catppuccin-mocha.json +0 -9
- package/lib/themes/dracula.json +0 -9
- package/lib/themes/everforest-light.json +0 -9
- package/lib/themes/everforest.json +0 -9
- package/lib/themes/github-light.json +0 -9
- package/lib/themes/gruvbox-dark.json +0 -9
- package/lib/themes/gruvbox-light.json +0 -9
- package/lib/themes/monokai.json +0 -9
- package/lib/themes/nord-light.json +0 -9
- package/lib/themes/nord.json +0 -9
- package/lib/themes/one-dark.json +0 -9
- package/lib/themes/one-light.json +0 -9
- package/lib/themes/rose-pine-dawn.json +0 -9
- package/lib/themes/rose-pine.json +0 -9
- package/lib/themes/solarized-dark.json +0 -9
- package/lib/themes/solarized-light.json +0 -9
- package/lib/themes/tokyo-night-light.json +0 -9
- package/lib/themes/tokyo-night.json +0 -9
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// Pure rules for which theme the console shows. No DOM and no imports, so the
|
|
2
|
+
// same code runs in the browser (theme.js) and under node:test.
|
|
3
|
+
//
|
|
4
|
+
// The console ships two themes, Clagentic Dark and Clagentic Light. A user can
|
|
5
|
+
// also pick a custom theme file from the console's themes folder. Anything
|
|
6
|
+
// else, including every theme the console shipped before it kept only its own
|
|
7
|
+
// two, is never applied: it migrates once, or falls back to the Clagentic
|
|
8
|
+
// theme of the user's mode.
|
|
9
|
+
|
|
10
|
+
export var DARK_ID = "clagentic-dark";
|
|
11
|
+
export var LIGHT_ID = "clagentic-light";
|
|
12
|
+
|
|
13
|
+
// Same rule as isValidThemeId in lib/theme-files.js; a test holds them together.
|
|
14
|
+
export var THEME_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
|
|
15
|
+
|
|
16
|
+
export function isValidThemeId(id) {
|
|
17
|
+
return typeof id === "string" && THEME_ID_PATTERN.test(id);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Ids stored by earlier builds: the 20 themes that used to ship in
|
|
21
|
+
// lib/themes/, plus the clay and claude ids older versions stored. The value
|
|
22
|
+
// is the variant they map to.
|
|
23
|
+
var INHERITED_VARIANT = {
|
|
24
|
+
"dracula": "dark", "monokai": "dark", "nord": "dark", "one-dark": "dark",
|
|
25
|
+
"tokyo-night": "dark", "rose-pine": "dark", "everforest": "dark",
|
|
26
|
+
"catppuccin-mocha": "dark", "gruvbox-dark": "dark", "solarized-dark": "dark",
|
|
27
|
+
"clay": "dark", "claude": "dark",
|
|
28
|
+
"ayu-light": "light", "github-light": "light", "solarized-light": "light",
|
|
29
|
+
"everforest-light": "light", "one-light": "light", "rose-pine-dawn": "light",
|
|
30
|
+
"tokyo-night-light": "light", "nord-light": "light", "catppuccin-latte": "light",
|
|
31
|
+
"gruvbox-light": "light", "clay-light": "light", "claude-light": "light"
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** "dark" or "light" when `id` is a retired inherited theme id, else null. */
|
|
35
|
+
export function inheritedVariant(id) {
|
|
36
|
+
if (typeof id !== "string") return null;
|
|
37
|
+
return Object.prototype.hasOwnProperty.call(INHERITED_VARIANT, id) ? INHERITED_VARIANT[id] : null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function clagenticIdForVariant(variant) {
|
|
41
|
+
return variant === "light" ? LIGHT_ID : DARK_ID;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The one-time browser migration of stored theme state.
|
|
46
|
+
* in: { id, variant, brand, mode } raw stored values, each a string or null
|
|
47
|
+
* out: { id, variant, changed }
|
|
48
|
+
* An inherited id maps to the Clagentic theme of its variant (dark ones and
|
|
49
|
+
* the Classic dark theme to Clagentic Dark, light ones to Clagentic Light;
|
|
50
|
+
* clay and claude by their variant). With no stored id, the Classic brand
|
|
51
|
+
* maps by the stored mode. A Clagentic id, a custom id or an id that matches
|
|
52
|
+
* nothing is returned as it is: later resolution applies the custom theme if
|
|
53
|
+
* it exists and the Clagentic theme of the mode if it does not.
|
|
54
|
+
*/
|
|
55
|
+
export function migrateStoredTheme(stored) {
|
|
56
|
+
var id = stored && stored.id ? stored.id : null;
|
|
57
|
+
var inherited = inheritedVariant(id);
|
|
58
|
+
if (inherited) {
|
|
59
|
+
return { id: clagenticIdForVariant(inherited), variant: inherited, changed: true };
|
|
60
|
+
}
|
|
61
|
+
if (!id && stored && stored.brand === "classic" && (stored.mode === "light" || stored.mode === "dark")) {
|
|
62
|
+
return { id: clagenticIdForVariant(stored.mode), variant: stored.mode, changed: true };
|
|
63
|
+
}
|
|
64
|
+
var variant = stored && (stored.variant === "light" || stored.variant === "dark") ? stored.variant : null;
|
|
65
|
+
return { id: id, variant: variant, changed: false };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The theme id to apply.
|
|
70
|
+
* customId the user's chosen custom theme, or null
|
|
71
|
+
* mode "light", "dark", or null to follow the system
|
|
72
|
+
* systemMode "light" or "dark", what the system asks for now
|
|
73
|
+
* isCustom function(id) true when that custom theme is loaded and valid
|
|
74
|
+
* A custom theme that is not loaded falls back to the Clagentic theme of the
|
|
75
|
+
* mode; nothing else is ever returned.
|
|
76
|
+
*/
|
|
77
|
+
export function resolveThemeId(args) {
|
|
78
|
+
if (args.customId && args.isCustom && args.isCustom(args.customId)) return args.customId;
|
|
79
|
+
var mode = args.mode === "light" || args.mode === "dark" ? args.mode : args.systemMode;
|
|
80
|
+
return clagenticIdForVariant(mode);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Normalises what the server reports into the local preference. The server is
|
|
85
|
+
* authoritative once the profile loads, so a choice made on another device
|
|
86
|
+
* (including Follow system, which is a null mode) wins.
|
|
87
|
+
*/
|
|
88
|
+
export function reconcileServerPrefs(server) {
|
|
89
|
+
var mode = server && (server.themeMode === "light" || server.themeMode === "dark") ? server.themeMode : null;
|
|
90
|
+
var customId = server && isValidThemeId(server.themeId) ? server.themeId : null;
|
|
91
|
+
return { mode: mode, customId: customId };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** The option key that is selected: "dark", "light", "system" or "custom:<id>". */
|
|
95
|
+
export function selectionKey(selection) {
|
|
96
|
+
if (selection.customId) return "custom:" + selection.customId;
|
|
97
|
+
return selection.mode === "light" || selection.mode === "dark" ? selection.mode : "system";
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The options Appearance offers: Dark, Light, Follow system, then one per
|
|
102
|
+
* custom theme in name order. `customThemes` is [{ id, name, variant, swatches }].
|
|
103
|
+
*/
|
|
104
|
+
export function buildThemeOptions(customThemes) {
|
|
105
|
+
var options = [
|
|
106
|
+
{ key: "dark", kind: "mode", mode: "dark", label: "Dark", description: "Dark theme", icon: "moon" },
|
|
107
|
+
{ key: "light", kind: "mode", mode: "light", label: "Light", description: "Light theme", icon: "sun" },
|
|
108
|
+
{ key: "system", kind: "mode", mode: null, label: "Follow system", description: "Match the system setting, including when it changes", icon: "monitor" }
|
|
109
|
+
];
|
|
110
|
+
var sorted = (customThemes || []).slice().sort(function (a, b) {
|
|
111
|
+
return a.name.localeCompare(b.name) || (a.id < b.id ? -1 : a.id > b.id ? 1 : 0);
|
|
112
|
+
});
|
|
113
|
+
for (var i = 0; i < sorted.length; i++) {
|
|
114
|
+
options.push({
|
|
115
|
+
key: "custom:" + sorted[i].id, kind: "custom", id: sorted[i].id,
|
|
116
|
+
label: sorted[i].name, description: "Custom theme", icon: "palette",
|
|
117
|
+
swatches: sorted[i].swatches || []
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
return options;
|
|
121
|
+
}
|