@clagentic/console 1.9.0 → 1.10.0-beta.2
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/LICENSE +117 -12
- package/LICENSES/MIT-legacy.txt +22 -0
- package/LICENSES/README.md +15 -0
- package/README.md +9 -3
- package/bin/cli.js +40 -5
- package/deploy/clagentic-console.service +10 -6
- package/lib/agent-dispatch-tool.js +20 -0
- package/lib/audit.js +3 -2
- package/lib/build-changes.js +79 -0
- package/lib/build-identity.js +192 -0
- package/lib/build-monitor.js +125 -0
- package/lib/build-sha.json +2 -2
- package/lib/build-update-check.js +138 -0
- package/lib/build-update-offer.js +141 -0
- package/lib/build-update-restart.js +142 -0
- package/lib/build-update-standing.js +184 -0
- package/lib/cli/daemon-launch.js +25 -22
- package/lib/cli/ipc-subcommands.js +6 -0
- package/lib/cli/session-subcommands.js +122 -0
- package/lib/cli-sessions.js +8 -1
- package/lib/codex-defaults.js +8 -2
- package/lib/config.js +32 -20
- package/lib/daemon-env-settings.js +84 -0
- package/lib/daemon-projects.js +57 -0
- package/lib/daemon.js +288 -205
- package/lib/drain.js +74 -17
- package/lib/env-compat.js +61 -0
- package/lib/extension-commands.js +45 -0
- package/lib/history-visibility.js +4 -0
- package/lib/idle-adapter-reaper.js +71 -0
- package/lib/link-trap.js +78 -0
- package/lib/mcp-local.js +8 -6
- package/lib/mcp-tool-input.js +116 -0
- package/lib/mcp-tool-schema.js +179 -0
- package/lib/memory-limits.js +61 -5
- package/lib/memory-setting-validate.js +65 -0
- package/lib/memory-shed.js +13 -32
- package/lib/new-work-gate.js +47 -0
- package/lib/os-users.js +5 -3
- package/lib/project-access.js +139 -0
- package/lib/project-connection.js +37 -22
- package/lib/project-external-trigger.js +166 -105
- package/lib/project-file-scope.js +172 -0
- package/lib/project-file-watch.js +86 -61
- package/lib/project-filesystem.js +144 -128
- package/lib/project-git.js +119 -0
- package/lib/project-http.js +44 -28
- package/lib/project-loop.js +17 -9
- package/lib/project-mcp.js +53 -72
- package/lib/project-message-gate.js +70 -0
- package/lib/project-notifications.js +31 -4
- package/lib/project-prompt-responses.js +217 -0
- package/lib/project-sessions.js +192 -355
- package/lib/project-user-message.js +27 -15
- package/lib/project.js +212 -147
- package/lib/projects-dir.js +90 -0
- package/lib/prompt-access.js +22 -0
- package/lib/prompt-kinds/answer-limits.js +15 -0
- package/lib/prompt-kinds/ask-user.js +58 -0
- package/lib/prompt-kinds/codecs.js +97 -0
- package/lib/prompt-kinds/elicitation.js +77 -0
- package/lib/prompt-kinds/extension.js +39 -0
- package/lib/prompt-kinds/index.js +68 -0
- package/lib/prompt-kinds/permission.js +114 -0
- package/lib/prompt-kinds/plan.js +79 -0
- package/lib/prompt-kinds/tool-call.js +38 -0
- package/lib/prompt-registry.js +680 -0
- package/lib/public/app.js +1 -1
- package/lib/public/css/diagnostics.css +80 -0
- package/lib/public/css/input.css +17 -3
- package/lib/public/css/menus.css +10 -0
- package/lib/public/css/messages.css +5 -0
- package/lib/public/css/rewind.css +22 -0
- package/lib/public/index.html +4 -12
- package/lib/public/modules/agent-dispatch-tool.js +9 -0
- package/lib/public/modules/app-connection.js +7 -0
- package/lib/public/modules/app-cursors.js +7 -5
- package/lib/public/modules/app-messages.js +52 -47
- package/lib/public/modules/app-notifications.js +47 -71
- package/lib/public/modules/app-panels.js +61 -59
- package/lib/public/modules/app-projects.js +2 -1
- package/lib/public/modules/app-rendering.js +4 -10
- package/lib/public/modules/build-update-detail.js +54 -0
- package/lib/public/modules/diagnostics.js +170 -20
- package/lib/public/modules/filebrowser.js +18 -16
- package/lib/public/modules/history-visibility.js +4 -0
- package/lib/public/modules/mention.js +3 -2
- package/lib/public/modules/mode-options.js +38 -0
- package/lib/public/modules/project-settings.js +19 -8
- package/lib/public/modules/prompt-banner.js +78 -0
- package/lib/public/modules/prompt-card.js +201 -0
- package/lib/public/modules/prompt-kinds/ask-user-codec.js +131 -0
- package/lib/public/modules/prompt-kinds/ask-user.js +213 -0
- package/lib/public/modules/prompt-kinds/elicitation-codec.js +343 -0
- package/lib/public/modules/prompt-kinds/elicitation.js +176 -0
- package/lib/public/modules/prompt-kinds/index.js +18 -0
- package/lib/public/modules/prompt-kinds/own-key.js +29 -0
- package/lib/public/modules/prompt-kinds/package.json +3 -0
- package/lib/public/modules/prompt-kinds/permission-choices.js +31 -0
- package/lib/public/modules/prompt-kinds/permission.js +209 -0
- package/lib/public/modules/prompt-kinds/plan.js +102 -0
- package/lib/public/modules/prompt-state.js +142 -0
- package/lib/public/modules/prompts.js +134 -0
- package/lib/public/modules/rewind.js +4 -1
- package/lib/public/modules/server-settings.js +2 -4
- package/lib/public/modules/sidebar-mobile.js +19 -9
- package/lib/public/modules/sidebar-sessions.js +21 -14
- package/lib/public/modules/sticky-notes.js +3 -2
- package/lib/public/modules/team-panel.js +5 -4
- package/lib/public/modules/tools.js +81 -906
- package/lib/public/modules/vendor-picker.js +53 -0
- package/lib/public/modules/vendor-registry.js +142 -0
- package/lib/public/sw.js +3 -1
- package/lib/rc-migrate.js +44 -0
- package/lib/runtime-env-keys.js +109 -0
- package/lib/runtime-env.js +236 -0
- package/lib/sdk-bridge.js +348 -284
- package/lib/sdk-message-processor.js +117 -146
- package/lib/sdk-skill-discovery.js +65 -60
- package/lib/server-hub-sessions.js +13 -10
- package/lib/server-palette.js +28 -19
- package/lib/server.js +156 -115
- package/lib/service-install.js +96 -0
- package/lib/session-capabilities.js +76 -0
- package/lib/session-id.js +33 -0
- package/lib/session-input-ipc.js +32 -0
- package/lib/session-input.js +379 -0
- package/lib/session-reclaim.js +284 -0
- package/lib/session-resume.js +172 -0
- package/lib/sessions.js +61 -30
- package/lib/supervisor.js +39 -0
- package/lib/turn-initiator.js +108 -0
- package/lib/users-permissions.js +9 -6
- package/lib/users.js +9 -0
- package/lib/utils.js +4 -2
- package/lib/vendor-auth.js +22 -0
- package/lib/vendor-registry-message.js +66 -0
- package/lib/ws-origin.js +99 -0
- package/lib/ws-schema.js +36 -23
- package/lib/yoke/adapters/claude-capabilities.js +38 -0
- package/lib/yoke/adapters/claude-vendor.js +34 -0
- package/lib/yoke/adapters/claude-worker.js +57 -87
- package/lib/yoke/adapters/claude.js +182 -88
- package/lib/yoke/adapters/codex-capabilities.js +40 -0
- package/lib/yoke/adapters/codex-vendor.js +46 -0
- package/lib/yoke/adapters/codex.js +462 -211
- package/lib/yoke/adapters/effort-control.js +34 -0
- package/lib/yoke/adapters/permission-relay.js +58 -0
- package/lib/yoke/adapters/worker-mcp-servers.js +81 -0
- package/lib/yoke/auth-checks.js +91 -0
- package/lib/yoke/capabilities.js +49 -0
- package/lib/yoke/codex-app-server.js +30 -56
- package/lib/yoke/codex-binary.js +254 -0
- package/lib/yoke/codex-command.js +122 -0
- package/lib/yoke/codex-protocol.js +96 -0
- package/lib/yoke/codex-version.js +135 -0
- package/lib/yoke/env-ownership.js +40 -0
- package/lib/yoke/index.js +84 -174
- package/lib/yoke/install-probe.js +136 -0
- package/lib/yoke/instructions.js +7 -11
- package/lib/yoke/interface.js +206 -4
- package/lib/yoke/package.json +1 -1
- package/lib/yoke/provider-credentials.js +96 -0
- package/lib/yoke/registry.js +377 -0
- package/package.json +12 -9
- package/scripts/check-sdk-lock-drift.js +160 -0
- package/scripts/check-test-count.js +76 -1
- package/scripts/postinstall.js +218 -136
- package/scripts/prompt-harness-history.js +202 -0
- package/scripts/verify-installed-build.js +59 -17
- package/scripts/verify-installed.js +67 -0
- package/lib/sdk-permission-ownership.js +0 -136
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
import { sessionActivity, rollupActivity, indicatorClass } from './activity-state.js';
|
|
38
38
|
|
|
39
39
|
import { store } from './store.js';
|
|
40
|
+
import { capabilityGate } from './vendor-registry.js';
|
|
40
41
|
import { getWs } from './ws-ref.js';
|
|
41
42
|
import { dismissOverlayPanels, closeSidebar } from './sidebar.js';
|
|
42
43
|
import { switchProject, getCachedProjects, openAddProjectModal } from './app-projects.js';
|
|
@@ -786,9 +787,9 @@ function renderMobileSessionsInto(container) {
|
|
|
786
787
|
actionGrid.className = "mobile-session-actions";
|
|
787
788
|
|
|
788
789
|
var isDmMode = store.get('dmMode');
|
|
789
|
-
// Agent Chat
|
|
790
|
-
//
|
|
791
|
-
var
|
|
790
|
+
// Agent Chat needs the agent to take a named identity (the agentInjection
|
|
791
|
+
// capability); otherwise the entry stays visible, disabled, with the reason.
|
|
792
|
+
var agentGate = capabilityGate('agentInjection');
|
|
792
793
|
|
|
793
794
|
// Row 1: New session
|
|
794
795
|
var newBtn = document.createElement("button");
|
|
@@ -802,11 +803,16 @@ function renderMobileSessionsInto(container) {
|
|
|
802
803
|
});
|
|
803
804
|
actionGrid.appendChild(newBtn);
|
|
804
805
|
|
|
805
|
-
// Row 2: Agent chat (full picker) — hidden in dmMode
|
|
806
|
-
|
|
806
|
+
// Row 2: Agent chat (full picker) — hidden in dmMode, disabled when the
|
|
807
|
+
// agent cannot take a named identity
|
|
808
|
+
if (!isDmMode) {
|
|
807
809
|
var agentBtn = document.createElement("button");
|
|
808
810
|
agentBtn.className = "mobile-session-new";
|
|
809
811
|
agentBtn.innerHTML = '<i data-lucide="message-circle-plus" style="width:16px;height:16px"></i> Agent chat';
|
|
812
|
+
if (!agentGate.enabled) {
|
|
813
|
+
agentBtn.disabled = true;
|
|
814
|
+
agentBtn.title = agentGate.reason;
|
|
815
|
+
}
|
|
810
816
|
agentBtn.addEventListener("click", function () {
|
|
811
817
|
closeMobileSheet();
|
|
812
818
|
setTimeout(function () { openAgentPicker(); }, 250);
|
|
@@ -815,7 +821,7 @@ function renderMobileSessionsInto(container) {
|
|
|
815
821
|
}
|
|
816
822
|
|
|
817
823
|
// Row 3 (optional): preferred agent quick-launch — only when set, no placeholder
|
|
818
|
-
if (!isDmMode
|
|
824
|
+
if (!isDmMode) {
|
|
819
825
|
var currentSlugMobile = store.get('currentSlug');
|
|
820
826
|
var preferredAgentMobile = null;
|
|
821
827
|
if (currentSlugMobile) {
|
|
@@ -831,6 +837,10 @@ function renderMobileSessionsInto(container) {
|
|
|
831
837
|
var prefBtn = document.createElement("button");
|
|
832
838
|
prefBtn.className = "mobile-session-new";
|
|
833
839
|
prefBtn.innerHTML = '<i data-lucide="bot" style="width:16px;height:16px"></i> ' + escapeHtml(preferredAgentMobile.name);
|
|
840
|
+
if (!agentGate.enabled) {
|
|
841
|
+
prefBtn.disabled = true;
|
|
842
|
+
prefBtn.title = agentGate.reason;
|
|
843
|
+
}
|
|
834
844
|
prefBtn.addEventListener("click", function () {
|
|
835
845
|
closeMobileSheet();
|
|
836
846
|
setTimeout(function () {
|
|
@@ -1299,10 +1309,10 @@ export function initSidebarMobile() {
|
|
|
1299
1309
|
}
|
|
1300
1310
|
|
|
1301
1311
|
// Re-render the mobile session action grid when vendor changes so the Agent
|
|
1302
|
-
// Chat button
|
|
1312
|
+
// Chat button enables/disables correctly when the user switches vendors
|
|
1303
1313
|
// while the mobile sheet is already open.
|
|
1304
|
-
store.subscribe(['currentVendor'], function (state, prev) {
|
|
1305
|
-
if (state.currentVendor !== prev.currentVendor && mobileChatSheetOpen) {
|
|
1314
|
+
store.subscribe(['currentVendor', 'vendorRegistry'], function (state, prev) {
|
|
1315
|
+
if ((state.currentVendor !== prev.currentVendor || state.vendorRegistry !== prev.vendorRegistry) && mobileChatSheetOpen) {
|
|
1306
1316
|
refreshMobileChatSheet();
|
|
1307
1317
|
}
|
|
1308
1318
|
});
|
|
@@ -6,6 +6,7 @@ import { escapeHtml, relativeTime } from './utils.js';
|
|
|
6
6
|
import { iconHtml, refreshIcons } from './icons.js';
|
|
7
7
|
import { openSearch as openSessionSearch } from './session-search.js';
|
|
8
8
|
import { store } from './store.js';
|
|
9
|
+
import { capabilityGate } from './vendor-registry.js';
|
|
9
10
|
import { getWs } from './ws-ref.js';
|
|
10
11
|
import { getSessionListEl } from './dom-refs.js';
|
|
11
12
|
import { dismissOverlayPanels, closeSidebar, updatePageTitle, spawnDustParticles } from './sidebar.js';
|
|
@@ -334,14 +335,14 @@ function renderSessionTopActions() {
|
|
|
334
335
|
wrap.className = "session-top-actions";
|
|
335
336
|
|
|
336
337
|
var isDm = store.get('dmMode');
|
|
337
|
-
// Agent Chat
|
|
338
|
-
//
|
|
339
|
-
var
|
|
338
|
+
// Agent Chat needs the agent to take a named identity (the agentInjection
|
|
339
|
+
// capability); otherwise the entry stays visible, disabled, with the reason.
|
|
340
|
+
var agentGate = capabilityGate('agentInjection');
|
|
340
341
|
|
|
341
342
|
// Resolve preferred agent for the current project
|
|
342
343
|
var currentSlug = store.get('currentSlug');
|
|
343
344
|
var preferredAgent = null;
|
|
344
|
-
if (currentSlug && !isDm
|
|
345
|
+
if (currentSlug && !isDm) {
|
|
345
346
|
var projects = getCachedProjects();
|
|
346
347
|
for (var pi = 0; pi < projects.length; pi++) {
|
|
347
348
|
if (projects[pi].slug === currentSlug) {
|
|
@@ -363,13 +364,17 @@ function renderSessionTopActions() {
|
|
|
363
364
|
});
|
|
364
365
|
wrap.appendChild(newBtn);
|
|
365
366
|
|
|
366
|
-
// Agent Chat (full picker) — hidden in dmMode
|
|
367
|
-
//
|
|
368
|
-
if (!isDm
|
|
367
|
+
// Agent Chat (full picker) — hidden in dmMode, disabled when the agent
|
|
368
|
+
// cannot take a named identity.
|
|
369
|
+
if (!isDm) {
|
|
369
370
|
var agentBtn = document.createElement("button");
|
|
370
371
|
agentBtn.className = "session-top-action";
|
|
371
372
|
agentBtn.type = "button";
|
|
372
373
|
agentBtn.innerHTML = iconHtml("message-circle-plus") + '<span>Agent Chat</span>';
|
|
374
|
+
if (!agentGate.enabled) {
|
|
375
|
+
agentBtn.disabled = true;
|
|
376
|
+
agentBtn.title = agentGate.reason;
|
|
377
|
+
}
|
|
373
378
|
agentBtn.addEventListener("click", function () {
|
|
374
379
|
openAgentPicker();
|
|
375
380
|
});
|
|
@@ -378,12 +383,13 @@ function renderSessionTopActions() {
|
|
|
378
383
|
|
|
379
384
|
// Row 2 (optional): preferred agent quick-launch — full width, only when set.
|
|
380
385
|
// Shows nothing when no preferred agent is configured (no placeholder clutter).
|
|
381
|
-
if (!isDm &&
|
|
386
|
+
if (!isDm && preferredAgent) {
|
|
382
387
|
var favBtn = document.createElement("button");
|
|
383
388
|
favBtn.type = "button";
|
|
384
389
|
favBtn.className = "session-top-action session-top-action--preferred";
|
|
385
390
|
favBtn.innerHTML = iconHtml("bot") + '<span>' + escapeHtml(preferredAgent.name) + '</span>';
|
|
386
|
-
favBtn.title = 'Start chat with ' + preferredAgent.name;
|
|
391
|
+
favBtn.title = agentGate.enabled ? 'Start chat with ' + preferredAgent.name : agentGate.reason;
|
|
392
|
+
favBtn.disabled = !agentGate.enabled;
|
|
387
393
|
favBtn.addEventListener("click", function () {
|
|
388
394
|
var ws = getWs();
|
|
389
395
|
if (ws && store.get('connected')) {
|
|
@@ -586,11 +592,12 @@ export function initSidebarSessions() {
|
|
|
586
592
|
}
|
|
587
593
|
|
|
588
594
|
// --- Reactively update top-actions when vendor changes ---
|
|
589
|
-
// Agent Chat is
|
|
590
|
-
// updates the store without triggering a session_list,
|
|
591
|
-
// here and swap just the top-actions node to avoid a full
|
|
592
|
-
|
|
593
|
-
|
|
595
|
+
// Agent Chat is disabled for an agent without named identities; the agent
|
|
596
|
+
// picker in app-panels updates the store without triggering a session_list,
|
|
597
|
+
// so we subscribe here and swap just the top-actions node to avoid a full
|
|
598
|
+
// list re-render.
|
|
599
|
+
store.subscribe(['currentVendor', 'vendorRegistry'], function (state, prev) {
|
|
600
|
+
if (state.currentVendor !== prev.currentVendor || state.vendorRegistry !== prev.vendorRegistry) {
|
|
594
601
|
refreshSessionTopActions();
|
|
595
602
|
}
|
|
596
603
|
});
|
|
@@ -6,8 +6,9 @@ var ctx;
|
|
|
6
6
|
var notes = new Map(); // id -> { data, el }
|
|
7
7
|
var notesVisible = false;
|
|
8
8
|
var archiveOpen = false;
|
|
9
|
-
|
|
10
|
-
var
|
|
9
|
+
// Keyed by note ids from the server: no prototype to answer for them.
|
|
10
|
+
var updateTimers = Object.create(null);
|
|
11
|
+
var textTimers = Object.create(null);
|
|
11
12
|
var colorPickerEl = null;
|
|
12
13
|
var formatToolbarEl = null;
|
|
13
14
|
|
|
@@ -223,8 +223,9 @@ export function initTeamPanel() {
|
|
|
223
223
|
export function handleTeamState(msg) {
|
|
224
224
|
currentTeam = msg.team || null;
|
|
225
225
|
if (currentTeam) {
|
|
226
|
-
|
|
227
|
-
currentTeam.
|
|
226
|
+
// Keyed by agent ids from the server: no prototype to answer for them.
|
|
227
|
+
currentTeam._memberStatuses = currentTeam._memberStatuses || Object.create(null);
|
|
228
|
+
currentTeam._memberActivities = currentTeam._memberActivities || Object.create(null);
|
|
228
229
|
}
|
|
229
230
|
teamMessages = msg.messages || [];
|
|
230
231
|
|
|
@@ -248,8 +249,8 @@ export function handleTeamMemberUpdate(msg) {
|
|
|
248
249
|
|
|
249
250
|
// Single member status/activity update
|
|
250
251
|
if (msg.agentId) {
|
|
251
|
-
currentTeam._memberStatuses = currentTeam._memberStatuses ||
|
|
252
|
-
currentTeam._memberActivities = currentTeam._memberActivities ||
|
|
252
|
+
currentTeam._memberStatuses = currentTeam._memberStatuses || Object.create(null);
|
|
253
|
+
currentTeam._memberActivities = currentTeam._memberActivities || Object.create(null);
|
|
253
254
|
if (msg.status) {
|
|
254
255
|
currentTeam._memberStatuses[msg.agentId] = msg.status;
|
|
255
256
|
}
|