@clagentic/console 1.0.3-beta.1 → 1.0.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/README.md +11 -6
- package/lib/project-connection.js +1 -1
- package/lib/project-sessions.js +9 -0
- package/lib/public/modules/app-messages.js +11 -3
- package/lib/public/modules/sidebar-mobile.js +15 -3
- package/lib/public/modules/sidebar-sessions.js +31 -4
- package/lib/sdk-bridge.js +7 -1
- package/lib/sessions.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
<a href="https://ko-fi.com/clagentic"><img src="https://img.shields.io/badge/Support-Ko--fi-FF5E5B?logo=ko-fi&logoColor=white" alt="Support on Ko-fi" /></a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
|
-
A self-hosted browser console for Claude Code and
|
|
14
|
+
A self-hosted browser console for Claude Code and ChatGPT Codex. Run AI sessions from any browser or phone — tool approvals, model selection, context management, session history — without leaving your own machine.
|
|
15
15
|
|
|
16
16
|
No extras bolted on. No opinionated workflows. The floor is solid; you build what you need on top.
|
|
17
17
|
|
|
18
18
|
## What it does
|
|
19
19
|
|
|
20
|
-
- **
|
|
21
|
-
- **Named agent sessions.** Talk directly to any agent defined in your Claude Code config. Agents get their own sessions, context, and history.
|
|
20
|
+
- **Browser access to your AI runtimes.** The goal is full parity with the CLI for both Claude Code and Codex — tool approvals, model selection, context management, session history. Most things work; see the FAQ for current gaps.
|
|
21
|
+
- **Named agent sessions (Claude Code).** Talk directly to any agent defined in your Claude Code config. Agents get their own sessions, context, and history. This feature is currently Claude Code only — see FAQ for details and what's planned for Codex.
|
|
22
22
|
- **Multi-project dashboard.** Every repo on your machine in one sidebar. Jump between projects, run sessions in parallel, see live status at a glance.
|
|
23
23
|
- **Mobile PWA + push notifications.** Installable on iOS and Android. Your phone buzzes when Claude needs approval or finishes a long task — tap to respond from anywhere.
|
|
24
24
|
- **Loop automation.** Write a `PROMPT.md`, hit go. Clagentic:Console iterates: run, evaluate, retry until done or capped. Schedule with standard cron.
|
|
25
|
-
- **Vendor flexibility.** Supports Claude Agent SDK and Codex app-server protocol. Switch per session.
|
|
25
|
+
- **Vendor flexibility.** Supports Claude Code (Claude Agent SDK) and ChatGPT Codex (codex app-server protocol). Switch per session.
|
|
26
26
|
- **Your data, your machine.** Sessions are JSONL, settings are JSON, knowledge is Markdown. No cloud relay, no proprietary database.
|
|
27
27
|
|
|
28
28
|
## Getting Started
|
|
@@ -100,10 +100,15 @@ For architecture details, sequence diagrams, and key design decisions, see [docs
|
|
|
100
100
|
No. Clagentic:Console drives Claude Code through the Claude Agent SDK and Codex through the Codex app-server protocol. It adds multi-session orchestration, named agent sessions, scheduled agents, multi-user support, built-in MCP servers, and a full browser UI on top.
|
|
101
101
|
|
|
102
102
|
**"What are named agents?"**
|
|
103
|
-
Agents defined in your Claude Code config (`.claude/agents/`) become first-class sessions. You talk to them directly — their own conversation history, context window, and session state.
|
|
103
|
+
Agents defined in your Claude Code config (`.claude/agents/`) become first-class sessions. You talk to them directly — their own conversation history, context window, and session state.
|
|
104
|
+
|
|
105
|
+
Named agents are **currently Claude Code only.** The Codex adapter has no equivalent API for per-session agent identity injection — the Claude Agent SDK exposes this directly, Codex does not. When you're in a Codex session, the Agent Chat entry point is hidden automatically. Partial Codex parity (system-prompt prepend) is planned; until then, agents only apply when the session vendor is Claude Code.
|
|
106
|
+
|
|
107
|
+
**"Is feature parity between Claude Code and Codex complete?"**
|
|
108
|
+
Not yet. The goal is full parity, but there are gaps. Named agents (above) are the main one. Claude Code has been the primary development target; Codex support covers sessions, tool approvals, model selection, MCP servers, loop, and most UI surfaces. Features that depend on Claude Agent SDK internals (agent identity, extended thinking, some beta flags) have no Codex equivalent today.
|
|
104
109
|
|
|
105
110
|
**"Can I run Claude Code and Codex in the same workspace?"**
|
|
106
|
-
Yes. Pick a vendor when you open a session. Switch per session.
|
|
111
|
+
Yes. Pick a vendor when you open a session. Switch per session — sessions remember their vendor.
|
|
107
112
|
|
|
108
113
|
**"Does my code leave my machine?"**
|
|
109
114
|
Only as model API calls — the same as using the CLI directly. Sessions, settings, and knowledge all stay on disk.
|
|
@@ -174,7 +174,7 @@ function attachConnection(ctx) {
|
|
|
174
174
|
}
|
|
175
175
|
ws._clayActiveSession = active.localId;
|
|
176
176
|
var _vendorCaps = (sm.capabilitiesByVendor && sm.capabilitiesByVendor[active.vendor || sm.defaultVendor || "claude"]) || {};
|
|
177
|
-
sendTo(ws, { type: "session_switched", id: active.localId, cliSessionId: active.cliSessionId || null, loop: active.loop || null, vendor: active.vendor || null, hasHistory: (active.history && active.history.length > 0), capabilities: _vendorCaps });
|
|
177
|
+
sendTo(ws, { type: "session_switched", id: active.localId, cliSessionId: active.cliSessionId || null, loop: active.loop || null, vendor: active.vendor || null, hasHistory: (active.history && active.history.length > 0), capabilities: _vendorCaps, agentName: active.agentName || null });
|
|
178
178
|
// Send per-session context sources
|
|
179
179
|
var sessionSources = loadContextSources(slug, active.localId);
|
|
180
180
|
sendTo(ws, { type: "context_sources_state", active: sessionSources });
|
package/lib/project-sessions.js
CHANGED
|
@@ -621,6 +621,15 @@ function attachSessions(ctx) {
|
|
|
621
621
|
if (sm.currentModel) {
|
|
622
622
|
sm.currentModel = "";
|
|
623
623
|
}
|
|
624
|
+
// Agent sessions are Claude Code-only. If the user somehow switches
|
|
625
|
+
// vendor to Codex on a session that carries agentName (e.g. via a
|
|
626
|
+
// direct WS message), clear the agent identity so the badge doesn't
|
|
627
|
+
// misrepresent an identity that Codex cannot apply.
|
|
628
|
+
if (msg.vendor === "codex" && vendorSession.agentName) {
|
|
629
|
+
console.warn("[project] set_vendor to codex on agent session " + vendorSession.localId +
|
|
630
|
+
" — clearing agentName '" + vendorSession.agentName + "'");
|
|
631
|
+
vendorSession.agentName = null;
|
|
632
|
+
}
|
|
624
633
|
sm.saveSessionFile(vendorSession);
|
|
625
634
|
sm.broadcastSessionList();
|
|
626
635
|
}
|
|
@@ -483,11 +483,19 @@ export function processMessage(msg) {
|
|
|
483
483
|
if (!msg.hasHistory && !msg.vendor) {
|
|
484
484
|
// Preserve explicit pre-message vendor choice on brand-new sessions.
|
|
485
485
|
}
|
|
486
|
-
// Show vendor toggle only for new sessions (no history)
|
|
486
|
+
// Show vendor toggle only for new sessions (no history).
|
|
487
|
+
// Agent sessions are Claude Code-only — hide the toggle entirely so
|
|
488
|
+
// the user cannot switch an agent session to Codex (which has no
|
|
489
|
+
// equivalent agent identity API and would silently drop the persona).
|
|
487
490
|
var _vtw = document.getElementById("vendor-toggle-wrap");
|
|
488
491
|
if (_vtw) {
|
|
489
|
-
if (msg.
|
|
490
|
-
|
|
492
|
+
if (msg.agentName) {
|
|
493
|
+
_vtw.classList.add("hidden");
|
|
494
|
+
} else if (msg.hasHistory) {
|
|
495
|
+
_vtw.classList.remove("hidden"); _vtw.classList.add("locked");
|
|
496
|
+
} else {
|
|
497
|
+
_vtw.classList.remove("locked"); _vtw.classList.remove("hidden");
|
|
498
|
+
}
|
|
491
499
|
}
|
|
492
500
|
// Session presence is now tracked server-side (user-presence.json)
|
|
493
501
|
clearRemoteCursors();
|
|
@@ -768,6 +768,9 @@ function renderMobileSessionsInto(container) {
|
|
|
768
768
|
actionGrid.className = "mobile-session-actions";
|
|
769
769
|
|
|
770
770
|
var isDmMode = store.get('dmMode');
|
|
771
|
+
// Agent Chat is Claude Code-only — the Codex adapter has no agent identity
|
|
772
|
+
// injection API (no equivalent of the Claude Agent SDK `agent` option).
|
|
773
|
+
var isCodexMode = (store.get('currentVendor') || 'claude') === 'codex';
|
|
771
774
|
|
|
772
775
|
// Row 1: New session
|
|
773
776
|
var newBtn = document.createElement("button");
|
|
@@ -781,8 +784,8 @@ function renderMobileSessionsInto(container) {
|
|
|
781
784
|
});
|
|
782
785
|
actionGrid.appendChild(newBtn);
|
|
783
786
|
|
|
784
|
-
// Row 2: Agent chat (full picker) — hidden in dmMode
|
|
785
|
-
if (!isDmMode) {
|
|
787
|
+
// Row 2: Agent chat (full picker) — hidden in dmMode and Codex mode
|
|
788
|
+
if (!isDmMode && !isCodexMode) {
|
|
786
789
|
var agentBtn = document.createElement("button");
|
|
787
790
|
agentBtn.className = "mobile-session-new";
|
|
788
791
|
agentBtn.innerHTML = '<i data-lucide="message-circle-plus" style="width:16px;height:16px"></i> Agent chat';
|
|
@@ -794,7 +797,7 @@ function renderMobileSessionsInto(container) {
|
|
|
794
797
|
}
|
|
795
798
|
|
|
796
799
|
// Row 3 (optional): preferred agent quick-launch — only when set, no placeholder
|
|
797
|
-
if (!isDmMode) {
|
|
800
|
+
if (!isDmMode && !isCodexMode) {
|
|
798
801
|
var currentSlugMobile = store.get('currentSlug');
|
|
799
802
|
var preferredAgentMobile = null;
|
|
800
803
|
if (currentSlugMobile) {
|
|
@@ -1405,6 +1408,15 @@ export function initSidebarMobile() {
|
|
|
1405
1408
|
showHomeHub();
|
|
1406
1409
|
});
|
|
1407
1410
|
}
|
|
1411
|
+
|
|
1412
|
+
// Re-render the mobile session action grid when vendor changes so the Agent
|
|
1413
|
+
// Chat button appears/disappears correctly when the user switches vendors
|
|
1414
|
+
// while the mobile sheet is already open.
|
|
1415
|
+
store.subscribe(['currentVendor'], function (state, prev) {
|
|
1416
|
+
if (state.currentVendor !== prev.currentVendor && mobileChatSheetOpen) {
|
|
1417
|
+
refreshMobileChatSheet();
|
|
1418
|
+
}
|
|
1419
|
+
});
|
|
1408
1420
|
}
|
|
1409
1421
|
|
|
1410
1422
|
// Update the Projects tab unread badge with total across all projects
|
|
@@ -312,11 +312,14 @@ function renderSessionTopActions() {
|
|
|
312
312
|
wrap.className = "session-top-actions";
|
|
313
313
|
|
|
314
314
|
var isDm = store.get('dmMode');
|
|
315
|
+
// Agent Chat is Claude Code-only — the Claude Agent SDK supports named-agent
|
|
316
|
+
// identity injection; the Codex adapter has no equivalent API surface.
|
|
317
|
+
var isCodex = (store.get('currentVendor') || 'claude') === 'codex';
|
|
315
318
|
|
|
316
319
|
// Resolve preferred agent for the current project
|
|
317
320
|
var currentSlug = store.get('currentSlug');
|
|
318
321
|
var preferredAgent = null;
|
|
319
|
-
if (currentSlug && !isDm) {
|
|
322
|
+
if (currentSlug && !isDm && !isCodex) {
|
|
320
323
|
var projects = getCachedProjects();
|
|
321
324
|
for (var pi = 0; pi < projects.length; pi++) {
|
|
322
325
|
if (projects[pi].slug === currentSlug) {
|
|
@@ -338,8 +341,9 @@ function renderSessionTopActions() {
|
|
|
338
341
|
});
|
|
339
342
|
wrap.appendChild(newBtn);
|
|
340
343
|
|
|
341
|
-
// Agent Chat (full picker) — hidden in dmMode
|
|
342
|
-
|
|
344
|
+
// Agent Chat (full picker) — hidden in dmMode and in Codex mode (no agent
|
|
345
|
+
// identity injection available in the Codex adapter).
|
|
346
|
+
if (!isDm && !isCodex) {
|
|
343
347
|
var agentBtn = document.createElement("button");
|
|
344
348
|
agentBtn.className = "session-top-action";
|
|
345
349
|
agentBtn.type = "button";
|
|
@@ -352,7 +356,7 @@ function renderSessionTopActions() {
|
|
|
352
356
|
|
|
353
357
|
// Row 2 (optional): preferred agent quick-launch — full width, only when set.
|
|
354
358
|
// Shows nothing when no preferred agent is configured (no placeholder clutter).
|
|
355
|
-
if (!isDm && preferredAgent) {
|
|
359
|
+
if (!isDm && !isCodex && preferredAgent) {
|
|
356
360
|
var favBtn = document.createElement("button");
|
|
357
361
|
favBtn.type = "button";
|
|
358
362
|
favBtn.className = "session-top-action session-top-action--preferred";
|
|
@@ -375,6 +379,19 @@ function renderSessionTopActions() {
|
|
|
375
379
|
return wrap;
|
|
376
380
|
}
|
|
377
381
|
|
|
382
|
+
// Swap just the top-actions node in-place so vendor-toggle changes take
|
|
383
|
+
// effect without a full session list re-render.
|
|
384
|
+
function refreshSessionTopActions() {
|
|
385
|
+
var listEl = getSessionListEl();
|
|
386
|
+
if (!listEl) return;
|
|
387
|
+
var stickyTop = listEl.querySelector('.session-list-sticky-top');
|
|
388
|
+
if (!stickyTop) return;
|
|
389
|
+
var oldActions = stickyTop.querySelector('.session-top-actions');
|
|
390
|
+
if (!oldActions) return;
|
|
391
|
+
var newActions = renderSessionTopActions();
|
|
392
|
+
stickyTop.replaceChild(newActions, oldActions);
|
|
393
|
+
}
|
|
394
|
+
|
|
378
395
|
function runSessionSearch(query) {
|
|
379
396
|
var normalizedQuery = query || "";
|
|
380
397
|
var trimmedQuery = normalizedQuery.trim();
|
|
@@ -545,6 +562,16 @@ export function initSidebarSessions() {
|
|
|
545
562
|
});
|
|
546
563
|
}
|
|
547
564
|
|
|
565
|
+
// --- Reactively update top-actions when vendor changes ---
|
|
566
|
+
// Agent Chat is hidden in Codex mode; the vendor toggle in app-panels
|
|
567
|
+
// updates the store without triggering a session_list, so we subscribe
|
|
568
|
+
// here and swap just the top-actions node to avoid a full list re-render.
|
|
569
|
+
store.subscribe(['currentVendor'], function (state, prev) {
|
|
570
|
+
if (state.currentVendor !== prev.currentVendor) {
|
|
571
|
+
refreshSessionTopActions();
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
|
|
548
575
|
// --- Schedule countdown timer ---
|
|
549
576
|
startCountdownTimer();
|
|
550
577
|
}
|
package/lib/sdk-bridge.js
CHANGED
|
@@ -1170,7 +1170,13 @@ function createSDKBridge(opts) {
|
|
|
1170
1170
|
// resolved (renamed, missing, parse failure) we fall through silently;
|
|
1171
1171
|
// the badge stays on the session for diagnosability but the session uses
|
|
1172
1172
|
// default identity.
|
|
1173
|
-
|
|
1173
|
+
//
|
|
1174
|
+
// Agent injection is Claude Code-only. The Codex adapter has no equivalent
|
|
1175
|
+
// API surface for in-band agent definition injection, so we skip this block
|
|
1176
|
+
// entirely for Codex sessions. The UI already hides the Agent Chat entry
|
|
1177
|
+
// point for Codex projects; this guard is belt-and-suspenders for sessions
|
|
1178
|
+
// that carry agentName from a prior vendor or from a direct ws message.
|
|
1179
|
+
if (session.agentName && sessionAdapter.vendor !== 'codex') {
|
|
1174
1180
|
var agentDef = null;
|
|
1175
1181
|
try { agentDef = agentsModule.getAgentDefinition(session.agentName); }
|
|
1176
1182
|
catch (e) {
|
package/lib/sessions.js
CHANGED
|
@@ -380,7 +380,7 @@ function createSessionManager(opts) {
|
|
|
380
380
|
var _capsByVendor = capabilitiesByVendor || {};
|
|
381
381
|
var _sessionVendor = session.vendor || defaultVendor || "claude";
|
|
382
382
|
var _vendorCaps = _capsByVendor[_sessionVendor] || {};
|
|
383
|
-
_send({ type: "session_switched", id: localId, cliSessionId: session.cliSessionId || null, loop: session.loop || null, vendor: session.vendor || null, hasHistory: (session.history && session.history.length > 0), capabilities: _vendorCaps, isProcessing: !!session.isProcessing });
|
|
383
|
+
_send({ type: "session_switched", id: localId, cliSessionId: session.cliSessionId || null, loop: session.loop || null, vendor: session.vendor || null, hasHistory: (session.history && session.history.length > 0), capabilities: _vendorCaps, isProcessing: !!session.isProcessing, agentName: session.agentName || null });
|
|
384
384
|
// Send vendor-specific slash commands
|
|
385
385
|
var _vendorCmds = slashCommandsByVendor[_sessionVendor] || slashCommands || [];
|
|
386
386
|
_send({ type: "slash_commands", commands: _vendorCmds, vendor: _sessionVendor });
|
package/package.json
CHANGED