@clagentic/console 1.12.0-beta.1 → 1.12.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSES/README.md +5 -0
- package/README.md +1 -0
- package/bin/cli.js +5 -2
- package/lib/agent-roster-ws.js +84 -0
- package/lib/agent-roster.js +312 -0
- package/lib/auth-required-notify.js +42 -0
- package/lib/build-changes.js +8 -2
- package/lib/build-sha.json +2 -2
- package/lib/build-update-notify.js +45 -0
- package/lib/build-update-offer.js +34 -11
- package/lib/build-update-standing.js +34 -14
- package/lib/claude-settings-env.js +142 -0
- package/lib/cli/duration.js +27 -0
- package/lib/cli/schedule-input-subcommands.js +1 -22
- package/lib/cli/session-subcommands.js +60 -11
- package/lib/client-address.js +44 -0
- package/lib/daemon.js +31 -10
- package/lib/idle-compaction-setting.js +203 -0
- package/lib/mcp-bridge-credential.js +41 -0
- package/lib/notification-prefs.js +18 -22
- package/lib/notify/core.js +210 -0
- package/lib/notify/index.js +31 -0
- package/lib/notify/live-prompts.js +36 -0
- package/lib/notify/payload.js +62 -0
- package/lib/notify/target.js +5 -0
- package/lib/notify/type-registry.js +81 -0
- package/lib/notify/types.js +57 -0
- package/lib/open-sockets.js +27 -0
- package/lib/outbound-access.js +85 -0
- package/lib/outbound-entry.js +116 -0
- package/lib/outbound-ledger.js +306 -0
- package/lib/outbound-query.js +153 -0
- package/lib/pending-prompts.js +31 -16
- package/lib/project-connection.js +48 -8
- package/lib/project-filesystem.js +43 -5
- package/lib/project-http.js +9 -1
- package/lib/project-loop.js +38 -26
- package/lib/project-notifications.js +122 -39
- package/lib/project-prompt-responses.js +1 -1
- package/lib/project-sessions.js +11 -1
- package/lib/project-user-mention.js +22 -34
- package/lib/project-user-message.js +208 -4
- package/lib/project-user-shell.js +298 -0
- package/lib/project.js +41 -5
- package/lib/prompt-answer.js +145 -0
- package/lib/prompt-expiry.js +50 -0
- package/lib/prompt-registry.js +98 -25
- package/lib/prompt-reminders.js +38 -33
- package/lib/prompt-source.js +59 -8
- package/lib/public/app.js +32 -2
- package/lib/public/css/agent-messages.css +96 -0
- package/lib/public/css/agent-roster.css +93 -0
- package/lib/public/css/diagnostics.css +29 -1
- package/lib/public/css/home-hub.css +12 -0
- package/lib/public/css/icon-strip.css +9 -0
- package/lib/public/css/input.css +20 -141
- package/lib/public/css/login-panel.css +73 -0
- package/lib/public/css/menus.css +2 -2
- package/lib/public/css/mobile-nav.css +11 -0
- package/lib/public/css/sidebar.css +18 -0
- package/lib/public/css/team-panel.css +1 -6
- package/lib/public/css/team-view.css +101 -0
- package/lib/public/css/title-bar.css +10 -0
- package/lib/public/css/user-shell.css +144 -0
- package/lib/public/index.html +44 -7
- package/lib/public/modules/activity-state.js +20 -4
- package/lib/public/modules/agent-avatar-picker.js +162 -0
- package/lib/public/modules/agent-avatar.js +153 -0
- package/lib/public/modules/agent-messages.js +285 -0
- package/lib/public/modules/agent-roster.js +157 -0
- package/lib/public/modules/app-connection.js +34 -5
- package/lib/public/modules/app-messages.js +55 -16
- package/lib/public/modules/app-notifications.js +104 -75
- package/lib/public/modules/app-panels.js +26 -3
- package/lib/public/modules/app-projects.js +3 -1
- package/lib/public/modules/app-rate-limit.js +8 -165
- package/lib/public/modules/app-rendering.js +32 -7
- package/lib/public/modules/build-update-sessions.js +81 -0
- package/lib/public/modules/collapsible-text.js +33 -18
- package/lib/public/modules/compaction-state.js +34 -0
- package/lib/public/modules/custom-icons.js +23 -5
- package/lib/public/modules/diagnostics.js +61 -57
- package/lib/public/modules/env-shadow-notice.js +34 -0
- package/lib/public/modules/injected-identity.js +24 -21
- package/lib/public/modules/input.js +176 -15
- package/lib/public/modules/login-panel.js +136 -0
- package/lib/public/modules/login-parser.js +73 -0
- package/lib/public/modules/login-tab.js +66 -0
- package/lib/public/modules/notifications.js +9 -1
- package/lib/public/modules/notify-client.js +246 -0
- package/lib/public/modules/pending-term-request.js +30 -0
- package/lib/public/modules/project-icon.js +22 -2
- package/lib/public/modules/project-settings.js +5 -0
- package/lib/public/modules/prompt-state.js +3 -3
- package/lib/public/modules/prompts.js +1 -1
- package/lib/public/modules/queued-button.js +11 -0
- package/lib/public/modules/scheduled-input-actions.js +12 -4
- package/lib/public/modules/scheduled-outbox.js +230 -0
- package/lib/public/modules/send-now.js +200 -0
- package/lib/public/modules/server-settings.js +50 -1
- package/lib/public/modules/shell-card.js +76 -0
- package/lib/public/modules/shell-line.js +49 -0
- package/lib/public/modules/shell-queue.js +253 -0
- package/lib/public/modules/shell-settings-controls.js +76 -0
- package/lib/public/modules/sidebar-mobile.js +3 -3
- package/lib/public/modules/sidebar-sessions.js +8 -0
- package/lib/public/modules/sidebar-users.js +5 -7
- package/lib/public/modules/team-panel.js +30 -88
- package/lib/public/modules/team-view.js +211 -0
- package/lib/public/modules/terminal-links.js +193 -0
- package/lib/public/modules/terminal.js +84 -107
- package/lib/public/modules/tools.js +19 -0
- package/lib/public/modules/user-shell.js +824 -0
- package/lib/public/notify-sw-logic.js +252 -0
- package/lib/public/notify-target.js +157 -0
- package/lib/public/style.css +5 -0
- package/lib/public/sw.js +20 -69
- package/lib/push.js +63 -19
- package/lib/queued-chat.js +392 -0
- package/lib/runtime-env.js +1 -0
- package/lib/scheduled-input/ws.js +67 -9
- package/lib/sdk-bridge.js +184 -73
- package/lib/sdk-message-processor.js +124 -76
- package/lib/server-auth.js +6 -4
- package/lib/server-dm.js +11 -20
- package/lib/server-settings.js +39 -1
- package/lib/server.js +112 -16
- package/lib/session-directory.js +39 -12
- package/lib/session-end.js +97 -0
- package/lib/session-input-ipc.js +37 -1
- package/lib/session-input.js +263 -21
- package/lib/session-liveness.js +53 -0
- package/lib/session-reclaim.js +37 -2
- package/lib/session-resume.js +1 -0
- package/lib/session-settings-file.js +53 -0
- package/lib/sessions.js +80 -9
- package/lib/team-traffic-ws.js +68 -0
- package/lib/team-traffic.js +318 -0
- package/lib/usage-store.js +36 -7
- package/lib/user-shell-settings.js +105 -0
- package/lib/vendor-auth.js +33 -2
- package/lib/ws-schema.js +33 -5
- package/lib/yoke/adapters/claude-capabilities.js +2 -0
- package/lib/yoke/adapters/claude-vendor.js +17 -1
- package/lib/yoke/adapters/claude-worker.js +39 -11
- package/lib/yoke/adapters/claude.js +225 -6
- package/lib/yoke/adapters/codex-capabilities.js +6 -1
- package/lib/yoke/adapters/codex-user-shell.js +265 -0
- package/lib/yoke/adapters/codex-vendor.js +7 -0
- package/lib/yoke/adapters/codex.js +186 -52
- package/lib/yoke/auth-checks.js +17 -2
- package/lib/yoke/codex-app-server.js +8 -2
- package/lib/yoke/index.js +21 -3
- package/lib/yoke/interface.js +54 -1
- package/lib/yoke/mcp-bridge-server.js +12 -8
- package/lib/yoke/provider-credentials.js +24 -0
- package/lib/yoke/registry.js +40 -1
- package/lib/yoke/user-shell.js +224 -0
- package/package.json +2 -2
- package/scripts/check-test-count.js +14 -0
- package/lib/public/modules/build-notice-gate.js +0 -73
package/lib/prompt-reminders.js
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
// from a config file is a value that can be set to nothing. A `tickSeconds` key
|
|
31
31
|
// left in daemon.json is ignored.
|
|
32
32
|
|
|
33
|
-
var {
|
|
33
|
+
var { notifyFor } = require("./notify");
|
|
34
34
|
|
|
35
35
|
var DEFAULT_SCHEDULE_MINUTES = [5, 15, 30];
|
|
36
36
|
var DEFAULT_REPEAT_MINUTES = 60;
|
|
@@ -143,8 +143,8 @@ function describe(s) {
|
|
|
143
143
|
* @param {object} deps
|
|
144
144
|
* @param {function(): Array<{slug: string, project: string, session: object, prompts: object}>} deps.listSessions
|
|
145
145
|
* every session of every project with its prompt registry.
|
|
146
|
-
* @param {object} deps.notifications the
|
|
147
|
-
*
|
|
146
|
+
* @param {object} deps.notifications the in-app banner store (show, dismissKeys,
|
|
147
|
+
* setReminderReconciler).
|
|
148
148
|
* @param {?object} [deps.push] the push module.
|
|
149
149
|
* @param {function(): ?object} [deps.getConfig] daemon.json `promptReminders`.
|
|
150
150
|
* @param {function(): boolean} [deps.isMultiUser] true when the daemon has
|
|
@@ -174,46 +174,47 @@ function createPromptReminders(deps) {
|
|
|
174
174
|
return slug + ":" + session.localId;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
function
|
|
178
|
-
|
|
179
|
-
var payload = {
|
|
180
|
-
type: "permission_reminder",
|
|
181
|
-
slug: entry.slug,
|
|
182
|
-
requestId: entry.requestId,
|
|
183
|
-
title: text.title,
|
|
184
|
-
body: text.body,
|
|
185
|
-
tag: "prompt-reminder-" + key,
|
|
186
|
-
};
|
|
187
|
-
pushForSession(push, entry.session.ownerId, payload, isMultiUser, listAdmins);
|
|
177
|
+
function audienceOf(session) {
|
|
178
|
+
return { ownerId: session.ownerId, isMultiUser: isMultiUser, listAdmins: listAdmins };
|
|
188
179
|
}
|
|
189
180
|
|
|
181
|
+
function core() {
|
|
182
|
+
return notifyFor(push, notifications);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// One notify() delivers the banner and, when due, the push, and the core
|
|
186
|
+
// collapses a repeat under the session's key: no reminder is replaced here.
|
|
190
187
|
function raise(entry, infos, ageMs, key, withPush) {
|
|
191
188
|
states[key].sig = signature(infos);
|
|
189
|
+
var target = { slug: entry.slug, sessionId: entry.session.localId };
|
|
190
|
+
var audience = audienceOf(entry.session);
|
|
191
|
+
states[key].scope = { target: target, audience: audience };
|
|
192
192
|
var text = describe({ project: entry.project, session: entry.session.title, infos: infos, ageMs: ageMs });
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
193
|
+
core().notify("permission_reminder", Object.assign({ requestId: infos[0].requestId }, target),
|
|
194
|
+
{
|
|
195
|
+
push: withPush ? { title: text.title, body: text.body } : null,
|
|
196
|
+
banner: {
|
|
197
|
+
title: text.title,
|
|
198
|
+
body: text.body,
|
|
199
|
+
requestIds: infos.map(function (i) { return i.requestId; }),
|
|
200
|
+
count: infos.length,
|
|
201
|
+
ageMs: ageMs,
|
|
202
|
+
agents: text.agents,
|
|
203
|
+
tools: text.tools,
|
|
204
|
+
},
|
|
205
|
+
}, audience);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// Closes the session's reminder, banner and push alike, if one was raised.
|
|
209
|
+
function close(key) {
|
|
210
|
+
var scope = states[key] && states[key].scope;
|
|
211
|
+
if (scope) core().resolve(scope.target, scope.audience);
|
|
211
212
|
}
|
|
212
213
|
|
|
213
214
|
function clear(key) {
|
|
214
215
|
if (states[key]) {
|
|
216
|
+
close(key);
|
|
215
217
|
delete states[key];
|
|
216
|
-
notifications.dismissReminder(key);
|
|
217
218
|
}
|
|
218
219
|
}
|
|
219
220
|
|
|
@@ -260,7 +261,11 @@ function createPromptReminders(deps) {
|
|
|
260
261
|
if (timer.unref) timer.unref();
|
|
261
262
|
}
|
|
262
263
|
|
|
264
|
+
// The daemon is going away: a reminder still shown would outlive the prompt
|
|
265
|
+
// it nags about, and the reconciler below is detached before the prompts
|
|
266
|
+
// settle, so the reminder pushes are closed here.
|
|
263
267
|
function stop() {
|
|
268
|
+
Object.keys(states).forEach(close);
|
|
264
269
|
if (timer) { clearInterval(timer); timer = null; }
|
|
265
270
|
notifications.setReminderReconciler(null);
|
|
266
271
|
}
|
package/lib/prompt-source.js
CHANGED
|
@@ -7,8 +7,24 @@
|
|
|
7
7
|
//
|
|
8
8
|
// { kind: "ws", clientId, user } an answer from a browser connection
|
|
9
9
|
// { kind: "push", action, user } an answer from a push notification
|
|
10
|
-
//
|
|
11
|
-
//
|
|
10
|
+
// user | caller:<name> an answer from the answer-prompt verb: the
|
|
11
|
+
// same strings a cancel's source uses
|
|
12
|
+
//
|
|
13
|
+
// A prompt that ends without an answer carries a cancel source instead: one
|
|
14
|
+
// string from a stable vocabulary, recorded on the prompt_cancel event, in the
|
|
15
|
+
// journal line and in the replayed promptState.
|
|
16
|
+
//
|
|
17
|
+
// user the operator ended it (a rewind, a context clear)
|
|
18
|
+
// timeout the prompt's own timer ran out
|
|
19
|
+
// session_end the scope that owned it ended (turn, query, session abort
|
|
20
|
+
// or close, session deletion)
|
|
21
|
+
// daemon_restart the daemon is going away
|
|
22
|
+
// worker the worker or app-server process stopped waiting for it
|
|
23
|
+
// caller:<name> an outside caller ended it; <name> is the caller's own
|
|
24
|
+
// string (1-64 of A-Z a-z 0-9 . _ @ / + -), never interpreted
|
|
25
|
+
// unspecified the fallback for a cancel that named no valid source (it is
|
|
26
|
+
// logged as a warning); also what a replay reports for an
|
|
27
|
+
// ending recorded before cancels carried a source
|
|
12
28
|
//
|
|
13
29
|
// clientId is a per-connection label made here, not a credential; user is the
|
|
14
30
|
// authenticated user's id, or null in single-user mode. Prompt content never
|
|
@@ -36,18 +52,51 @@ function fromPush(req, action) {
|
|
|
36
52
|
return { kind: "push", action: action, user: userIdOf(req && req._clagenticUser) };
|
|
37
53
|
}
|
|
38
54
|
|
|
39
|
-
|
|
40
|
-
|
|
55
|
+
var CANCEL = Object.freeze({
|
|
56
|
+
USER: "user",
|
|
57
|
+
TIMEOUT: "timeout",
|
|
58
|
+
SESSION_END: "session_end",
|
|
59
|
+
DAEMON_RESTART: "daemon_restart",
|
|
60
|
+
WORKER: "worker",
|
|
61
|
+
UNSPECIFIED: "unspecified",
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
var FIXED_CANCEL_SOURCES = Object.keys(CANCEL).map(function (k) { return CANCEL[k]; });
|
|
65
|
+
var CALLER_SOURCE = /^caller:[A-Za-z0-9._@\/+-]{1,64}$/;
|
|
66
|
+
|
|
67
|
+
function isCancelSource(value) {
|
|
68
|
+
return typeof value === "string" && (FIXED_CANCEL_SOURCES.indexOf(value) !== -1 || CALLER_SOURCE.test(value));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// The source of an act by an outside caller: caller:<from> when the caller named
|
|
72
|
+
// itself, else user (the operator's own CLI). Returns { source } or { error };
|
|
73
|
+
// what names the act in the error ("an end", "an answer"). The name is the
|
|
74
|
+
// caller's own label under OS-user trust, never interpreted.
|
|
75
|
+
function callerSource(from, what) {
|
|
76
|
+
if (from === undefined || from === null || from === "") return { source: CANCEL.USER };
|
|
77
|
+
var source = "caller:" + from;
|
|
78
|
+
if (!isCancelSource(source)) {
|
|
79
|
+
return { error: "from " + JSON.stringify(String(from).slice(0, 64)) + " cannot name " + what + ": use 1 to 64 of letters, digits and . _ @ / + -" };
|
|
80
|
+
}
|
|
81
|
+
return { source: source };
|
|
41
82
|
}
|
|
42
83
|
|
|
43
|
-
|
|
44
|
-
|
|
84
|
+
// The one rule for a cancel's source: a value from the vocabulary is kept; a
|
|
85
|
+
// missing or unknown one becomes "unspecified" and is warned about, so a
|
|
86
|
+
// settle always carries a source and never an undefined one.
|
|
87
|
+
function cancelSource(value, reason) {
|
|
88
|
+
if (isCancelSource(value)) return value;
|
|
89
|
+
console.warn("[prompt-source] cancel (reason=" + logField(reason) + ") named "
|
|
90
|
+
+ (value === undefined || value === null ? "no source" : "an unknown source " + logField(value))
|
|
91
|
+
+ "; recorded as " + CANCEL.UNSPECIFIED);
|
|
92
|
+
return CANCEL.UNSPECIFIED;
|
|
45
93
|
}
|
|
46
94
|
|
|
47
95
|
// The source as log fields, "source=ws client=c-1a2b user=u1". A cancel's
|
|
48
96
|
// reason is its own field on the settle line, not repeated here.
|
|
49
97
|
function describe(source) {
|
|
50
98
|
if (!source) return "source=unspecified";
|
|
99
|
+
if (typeof source === "string") return "source=" + logField(source);
|
|
51
100
|
var out = "source=" + logField(source.kind);
|
|
52
101
|
if (source.clientId) out += " client=" + logField(source.clientId);
|
|
53
102
|
if (source.action) out += " action=" + logField(source.action);
|
|
@@ -58,8 +107,10 @@ function describe(source) {
|
|
|
58
107
|
module.exports = {
|
|
59
108
|
fromWs: fromWs,
|
|
60
109
|
fromPush: fromPush,
|
|
61
|
-
|
|
62
|
-
|
|
110
|
+
CANCEL: CANCEL,
|
|
111
|
+
isCancelSource: isCancelSource,
|
|
112
|
+
cancelSource: cancelSource,
|
|
113
|
+
callerSource: callerSource,
|
|
63
114
|
describe: describe,
|
|
64
115
|
clientIdOf: clientIdOf,
|
|
65
116
|
};
|
package/lib/public/app.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
updateDmBadge, renderSidebarPresence, setMentionActive, clearAllMentionActive,
|
|
16
16
|
initSidebarUsers
|
|
17
17
|
} from './modules/sidebar-users.js';
|
|
18
|
-
import { openMobileSheet, updateMobileProjectsTabBadge } from './modules/sidebar-mobile.js';
|
|
18
|
+
import { openMobileSheet, closeMobileSheetThen, updateMobileProjectsTabBadge } from './modules/sidebar-mobile.js';
|
|
19
19
|
import { initRewind, setRewindMode, showRewindModal, clearPendingRewindUuid, addRewindButton, onRewindComplete, onRewindError } from './modules/rewind.js';
|
|
20
20
|
import { initNotifications, showDoneNotification, playDoneSound, isNotifAlertEnabled, isNotifSoundEnabled } from './modules/notifications.js';
|
|
21
21
|
import { initInput, clearPendingImages, handleInputSync, autoResize, builtinCommands, sendMessage, hasSendableContent, setScheduleDelayMs, clearScheduleDelay } from './modules/input.js';
|
|
@@ -66,6 +66,9 @@ import { initRendering, addToMessages as _renAddToMessages, scrollToBottom as _r
|
|
|
66
66
|
import { initDm, openDm as _dmOpenDm, enterDmMode as _dmEnterDmMode, exitDmMode as _dmExitDmMode, appendDmMessage as _dmAppendDmMessage, showDmTypingIndicator as _dmShowDmTypingIndicator, handleDmSend as _dmHandleDmSend } from './modules/app-dm.js';
|
|
67
67
|
import { initMention, handleMentionStart, handleMentionStream, handleMentionDone, handleMentionError, handleMentionActivity, renderMentionUser, renderMentionResponse } from './modules/mention.js';
|
|
68
68
|
import { initTeamPanel } from './modules/team-panel.js';
|
|
69
|
+
import { initTeamView } from './modules/team-view.js';
|
|
70
|
+
import { initAgentMessages } from './modules/agent-messages.js';
|
|
71
|
+
import { getProjectAgents } from './modules/at-agents.js';
|
|
69
72
|
import { initDiagnostics } from './modules/diagnostics.js';
|
|
70
73
|
|
|
71
74
|
// --- Base path for multi-project routing ---
|
|
@@ -267,6 +270,8 @@ import { initDiagnostics } from './modules/diagnostics.js';
|
|
|
267
270
|
dmKey: null,
|
|
268
271
|
cachedDmFavorites: [],
|
|
269
272
|
pendingTermCommand: null,
|
|
273
|
+
pendingLoginVendor: "",
|
|
274
|
+
pendingTermRequestId: "",
|
|
270
275
|
myUserId: null,
|
|
271
276
|
isMultiUserMode: true,
|
|
272
277
|
dmUnread: {},
|
|
@@ -279,6 +284,7 @@ import { initDiagnostics } from './modules/diagnostics.js';
|
|
|
279
284
|
// rendering
|
|
280
285
|
currentMsgTs: null,
|
|
281
286
|
richContextUsage: null,
|
|
287
|
+
sessionCompacting: false,
|
|
282
288
|
currentMsgEl: null,
|
|
283
289
|
currentFullText: "",
|
|
284
290
|
// panels
|
|
@@ -375,7 +381,30 @@ import { initDiagnostics } from './modules/diagnostics.js';
|
|
|
375
381
|
initToolPalettes();
|
|
376
382
|
initSidebar(sidebarCtx);
|
|
377
383
|
initSidebarUsers();
|
|
384
|
+
initTeamView();
|
|
378
385
|
initTeamPanel();
|
|
386
|
+
initAgentMessages({
|
|
387
|
+
knownAgents: getProjectAgents,
|
|
388
|
+
// The same two paths the Home Hub uses: another project is switched to with
|
|
389
|
+
// the session id parked for the new connection, this project switches in place.
|
|
390
|
+
openSession: function (slug, id) {
|
|
391
|
+
closeMobileSheetThen(function () {
|
|
392
|
+
if (slug !== store.get('currentSlug')) {
|
|
393
|
+
try {
|
|
394
|
+
sessionStorage.setItem("pending-hub-session", String(id));
|
|
395
|
+
} catch (e) {
|
|
396
|
+
// Storage can be unavailable (private mode, quota). The project still
|
|
397
|
+
// switches; only the jump to that one session is lost.
|
|
398
|
+
console.warn("[agent-messages] could not park the session to open after the project switch:", e && e.message ? e.message : e);
|
|
399
|
+
}
|
|
400
|
+
switchProject(slug);
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
var _ws = _getWsRef();
|
|
404
|
+
if (_ws && _ws.readyState === 1) _ws.send(JSON.stringify({ type: "switch_session", id: id }));
|
|
405
|
+
});
|
|
406
|
+
},
|
|
407
|
+
});
|
|
379
408
|
|
|
380
409
|
initCommandPalette({
|
|
381
410
|
switchProject: function (slug) { switchProject(slug); },
|
|
@@ -587,7 +616,7 @@ import { initDiagnostics } from './modules/diagnostics.js';
|
|
|
587
616
|
// AskUserQuestion, PermissionRequest, Plan, Todo, Thinking, Tool items -> modules/tools.js
|
|
588
617
|
|
|
589
618
|
// --- DOM: Messages (delegated to app-rendering.js) ---
|
|
590
|
-
function addUserMessage(text, images, pastes, fromUserId, fromUserName, injected) { _renAddUserMessage(text, images, pastes, fromUserId, fromUserName, injected); }
|
|
619
|
+
function addUserMessage(text, images, pastes, fromUserId, fromUserName, injected, sentMidTurn) { _renAddUserMessage(text, images, pastes, fromUserId, fromUserName, injected, sentMidTurn); }
|
|
591
620
|
function getMsgTime() { return _renGetMsgTime(); }
|
|
592
621
|
function shouldGroupMessage(senderClass) { return _renShouldGroupMessage(senderClass); }
|
|
593
622
|
function ensureAssistantBlock() { return _renEnsureAssistantBlock(); }
|
|
@@ -648,6 +677,7 @@ import { initDiagnostics } from './modules/diagnostics.js';
|
|
|
648
677
|
// session_switched where the list must be preserved.
|
|
649
678
|
resetSessionList();
|
|
650
679
|
resetClientState();
|
|
680
|
+
_connCancelReconnect();
|
|
651
681
|
connect();
|
|
652
682
|
}
|
|
653
683
|
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/* agent-messages.css - the agent-messages section of the Team view: a map of
|
|
2
|
+
sender and target pairs, and the thread of the selected pair. Drawn in the
|
|
3
|
+
desktop view and the phone sheet alike; the phone shows the map or the
|
|
4
|
+
thread, one at a time. */
|
|
5
|
+
|
|
6
|
+
.am-layout {
|
|
7
|
+
display: grid;
|
|
8
|
+
grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr);
|
|
9
|
+
gap: 16px;
|
|
10
|
+
align-items: start;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.am-layout.phone { grid-template-columns: minmax(0, 1fr); }
|
|
14
|
+
|
|
15
|
+
.am-map { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
|
|
16
|
+
|
|
17
|
+
.am-pair {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 6px;
|
|
22
|
+
width: 100%;
|
|
23
|
+
padding: 8px 10px;
|
|
24
|
+
text-align: left;
|
|
25
|
+
font: inherit;
|
|
26
|
+
font-size: 13px;
|
|
27
|
+
color: var(--text);
|
|
28
|
+
background: none;
|
|
29
|
+
border: 1px solid var(--border-subtle);
|
|
30
|
+
border-radius: 8px;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
min-height: 44px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.am-pair:hover { background: rgba(var(--overlay-rgb), 0.05); }
|
|
36
|
+
.am-pair.selected { border-color: var(--accent, var(--text)); }
|
|
37
|
+
|
|
38
|
+
.am-pair-name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
|
|
39
|
+
.am-arrow { color: var(--text-dimmer); }
|
|
40
|
+
.am-count { margin-left: auto; font-weight: 700; }
|
|
41
|
+
.am-last { color: var(--text-dim); font-size: 12px; }
|
|
42
|
+
|
|
43
|
+
.am-avatar { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; }
|
|
44
|
+
|
|
45
|
+
.am-thread { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
|
|
46
|
+
.am-thread-head { display: flex; align-items: center; gap: 10px; font-weight: 700; }
|
|
47
|
+
.am-thread-title { overflow-wrap: anywhere; }
|
|
48
|
+
|
|
49
|
+
.am-back, .am-link {
|
|
50
|
+
font: inherit;
|
|
51
|
+
font-size: 12px;
|
|
52
|
+
color: var(--text-muted);
|
|
53
|
+
background: none;
|
|
54
|
+
border: 1px solid var(--border-subtle);
|
|
55
|
+
border-radius: 6px;
|
|
56
|
+
padding: 6px 10px;
|
|
57
|
+
min-height: 32px;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.am-back:hover, .am-link:hover { color: var(--text); background: rgba(var(--overlay-rgb), 0.06); }
|
|
62
|
+
|
|
63
|
+
.am-message {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
gap: 6px;
|
|
67
|
+
padding: 10px 12px;
|
|
68
|
+
border: 1px solid var(--border-subtle);
|
|
69
|
+
border-radius: 8px;
|
|
70
|
+
min-width: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.am-message.pending { border-style: dashed; }
|
|
74
|
+
|
|
75
|
+
.am-message-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
|
|
76
|
+
.am-sender { font-weight: 600; overflow-wrap: anywhere; }
|
|
77
|
+
.am-time { color: var(--text-dim); }
|
|
78
|
+
.am-note { color: var(--text-dim); font-size: 12px; overflow-wrap: anywhere; }
|
|
79
|
+
.am-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; max-height: 240px; overflow-y: auto; }
|
|
80
|
+
.am-links { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
81
|
+
|
|
82
|
+
.am-chip {
|
|
83
|
+
font-size: 10px;
|
|
84
|
+
font-weight: 600;
|
|
85
|
+
letter-spacing: 0.04em;
|
|
86
|
+
text-transform: uppercase;
|
|
87
|
+
padding: 2px 6px;
|
|
88
|
+
border-radius: 4px;
|
|
89
|
+
background: rgba(var(--overlay-rgb), 0.08);
|
|
90
|
+
color: var(--text-muted);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.am-chip.pending { color: var(--text); border: 1px dashed var(--text-dimmer); background: none; }
|
|
94
|
+
|
|
95
|
+
.am-empty, .am-hint { color: var(--text-dim); font-size: 13px; padding: 12px 0; }
|
|
96
|
+
.am-footnote { color: var(--text-dimmer); font-size: 12px; margin-top: 10px; }
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* agent-roster.css - the agent roster section of the Team view, the avatar
|
|
2
|
+
picker, and the sub-agent label in the transcript. Drawn in the desktop view
|
|
3
|
+
and the phone sheet alike; the phone stacks each row's parts. */
|
|
4
|
+
|
|
5
|
+
.ar-list { display: flex; flex-direction: column; gap: 8px; }
|
|
6
|
+
|
|
7
|
+
.ar-row {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: 10px;
|
|
11
|
+
padding: 10px 12px;
|
|
12
|
+
border: 1px solid var(--border-subtle);
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
min-width: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ar-row.open { border-color: var(--accent, var(--text)); }
|
|
18
|
+
|
|
19
|
+
.ar-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
|
|
20
|
+
|
|
21
|
+
.ar-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
|
|
22
|
+
|
|
23
|
+
.ar-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
|
|
24
|
+
.ar-name { font-weight: 700; overflow-wrap: anywhere; }
|
|
25
|
+
.ar-seen { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--text-dim); font-size: 12px; }
|
|
26
|
+
.ar-places { display: flex; flex-wrap: wrap; gap: 4px 6px; }
|
|
27
|
+
|
|
28
|
+
.ar-place {
|
|
29
|
+
font-size: 11px;
|
|
30
|
+
padding: 2px 6px;
|
|
31
|
+
border-radius: 4px;
|
|
32
|
+
background: rgba(var(--overlay-rgb), 0.08);
|
|
33
|
+
color: var(--text-muted);
|
|
34
|
+
overflow-wrap: anywhere;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ar-change, .ar-reset {
|
|
38
|
+
font: inherit;
|
|
39
|
+
font-size: 12px;
|
|
40
|
+
color: var(--text-muted);
|
|
41
|
+
background: none;
|
|
42
|
+
border: 1px solid var(--border-subtle);
|
|
43
|
+
border-radius: 6px;
|
|
44
|
+
padding: 6px 10px;
|
|
45
|
+
min-height: 44px;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
flex-shrink: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ar-change:hover, .ar-reset:hover { color: var(--text); background: rgba(var(--overlay-rgb), 0.06); }
|
|
51
|
+
|
|
52
|
+
.ar-picker { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
|
|
53
|
+
.ar-picker-title { font-size: 12px; font-weight: 700; color: var(--text-muted); }
|
|
54
|
+
|
|
55
|
+
.ar-seed-row, .ar-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
|
|
56
|
+
.ar-seed { flex: 1; min-width: 120px; min-height: 36px; font: inherit; font-size: 16px; }
|
|
57
|
+
|
|
58
|
+
.ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
|
|
59
|
+
|
|
60
|
+
.ar-choice {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: 4px;
|
|
65
|
+
min-height: 44px;
|
|
66
|
+
padding: 6px;
|
|
67
|
+
font: inherit;
|
|
68
|
+
font-size: 11px;
|
|
69
|
+
color: var(--text);
|
|
70
|
+
background: none;
|
|
71
|
+
border: 1px solid var(--border-subtle);
|
|
72
|
+
border-radius: 8px;
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
min-width: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.ar-choice:hover { background: rgba(var(--overlay-rgb), 0.06); }
|
|
78
|
+
.ar-choice.selected { border-color: var(--accent, var(--text)); }
|
|
79
|
+
.ar-choice-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
80
|
+
.ar-preview { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
|
|
81
|
+
|
|
82
|
+
.ar-note, .ar-failure, .ar-empty { color: var(--text-dim); font-size: 12px; }
|
|
83
|
+
.ar-failure { color: var(--text); }
|
|
84
|
+
.ar-empty { font-size: 13px; padding: 12px 0; }
|
|
85
|
+
|
|
86
|
+
.tool-agent { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; margin-right: 6px; }
|
|
87
|
+
.tool-agent-avatar { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
|
|
88
|
+
.tool-agent-name { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
|
|
89
|
+
|
|
90
|
+
@media (max-width: 768px) {
|
|
91
|
+
.ar-head { flex-wrap: wrap; }
|
|
92
|
+
.ar-change { width: 100%; }
|
|
93
|
+
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
/* --------------------------------------------------------
|
|
41
41
|
Diagnostics panel (inside #info-panels)
|
|
42
|
-
Follows the usage-panel
|
|
42
|
+
Follows the usage-panel pattern.
|
|
43
43
|
-------------------------------------------------------- */
|
|
44
44
|
#diagnostics-panel {
|
|
45
45
|
display: flex;
|
|
@@ -259,6 +259,31 @@
|
|
|
259
259
|
margin-left: 6px;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
+
/* The sessions a restart would end: a count line and an expand control above the
|
|
263
|
+
card's actions. Collapsed by default; expanded, the list scrolls in a bounded
|
|
264
|
+
region, so the card's height does not depend on the session count. */
|
|
265
|
+
.build-update-sessions {
|
|
266
|
+
display: flex;
|
|
267
|
+
flex-direction: column;
|
|
268
|
+
gap: 2px;
|
|
269
|
+
margin-top: 4px;
|
|
270
|
+
font-size: 11px;
|
|
271
|
+
color: var(--text-secondary);
|
|
272
|
+
}
|
|
273
|
+
.build-update-sessions-head {
|
|
274
|
+
display: flex;
|
|
275
|
+
align-items: center;
|
|
276
|
+
gap: 8px;
|
|
277
|
+
}
|
|
278
|
+
.build-update-sessions.is-collapsed .build-update-session-list { display: none; }
|
|
279
|
+
.build-update-session-list {
|
|
280
|
+
margin: 0;
|
|
281
|
+
padding-left: 16px;
|
|
282
|
+
max-height: 160px;
|
|
283
|
+
overflow-y: auto;
|
|
284
|
+
overflow-wrap: anywhere;
|
|
285
|
+
}
|
|
286
|
+
|
|
262
287
|
/* Shown beside a restart button whose click could not be sent. */
|
|
263
288
|
.build-update-send-failed {
|
|
264
289
|
margin-top: 4px;
|
|
@@ -480,6 +505,9 @@
|
|
|
480
505
|
.toast-diagnostic.visible {
|
|
481
506
|
transform: translateY(0);
|
|
482
507
|
}
|
|
508
|
+
.build-update-session-list {
|
|
509
|
+
max-height: 25vh;
|
|
510
|
+
}
|
|
483
511
|
.toast-diagnostic-msg {
|
|
484
512
|
/* Long unbreakable identifiers (e.g. "PostToolUse", absolute paths)
|
|
485
513
|
must wrap instead of forcing the flex child's intrinsic width
|
|
@@ -303,6 +303,13 @@
|
|
|
303
303
|
border: 1.5px solid var(--activity-other, #B77BF3);
|
|
304
304
|
box-shadow: 0 0 4px rgba(183, 123, 243, 0.4);
|
|
305
305
|
}
|
|
306
|
+
/* Waiting on a prompt: dashed ring in the warning hue, so it is
|
|
307
|
+
told from running (filled) and another user's activity (solid ring) by
|
|
308
|
+
shape as well as color. */
|
|
309
|
+
.hub-project-dot.waiting {
|
|
310
|
+
background: transparent;
|
|
311
|
+
border: 1.5px dashed var(--warning);
|
|
312
|
+
}
|
|
306
313
|
.hub-project-icon {
|
|
307
314
|
font-size: 14px;
|
|
308
315
|
width: 20px;
|
|
@@ -523,6 +530,11 @@
|
|
|
523
530
|
border: 1.5px solid var(--activity-other, #B77BF3);
|
|
524
531
|
box-shadow: 0 0 4px rgba(183, 123, 243, 0.4);
|
|
525
532
|
}
|
|
533
|
+
.hub-recent-dot.waiting {
|
|
534
|
+
background: transparent;
|
|
535
|
+
opacity: 1;
|
|
536
|
+
border: 1.5px dashed var(--warning);
|
|
537
|
+
}
|
|
526
538
|
.hub-recent-project-icon {
|
|
527
539
|
font-size: 14px;
|
|
528
540
|
width: 20px;
|
|
@@ -248,6 +248,15 @@
|
|
|
248
248
|
border-color: var(--activity-other, #B77BF3);
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
+
/* Waiting on a prompt: dashed ring, warning hue. */
|
|
252
|
+
.icon-strip-status.waiting {
|
|
253
|
+
opacity: 1;
|
|
254
|
+
background: transparent;
|
|
255
|
+
border-width: 2px;
|
|
256
|
+
border-style: dashed;
|
|
257
|
+
border-color: var(--warning);
|
|
258
|
+
}
|
|
259
|
+
|
|
251
260
|
/* Alert tone (lr-66c118): unread activity wins over processing green. */
|
|
252
261
|
.icon-strip-status.alert {
|
|
253
262
|
opacity: 1;
|