@clagentic/console 1.4.0-beta.2 → 1.4.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/lib/daemon.js +19 -0
- package/lib/project-sessions.js +19 -1
- package/lib/project.js +8 -0
- package/lib/public/app.js +17 -3
- package/lib/public/css/input.css +5 -0
- package/lib/public/modules/app-header.js +7 -1
- package/lib/public/modules/app-messages.js +10 -5
- package/lib/public/modules/command-palette.js +3 -0
- package/lib/public/modules/input.js +18 -2
- package/lib/public/modules/overlay-history.js +62 -0
- package/lib/public/modules/project-settings.js +3 -0
- package/lib/public/modules/scheduler.js +3 -0
- package/lib/public/modules/server-settings.js +4 -1
- package/lib/public/modules/session-search.js +3 -0
- package/lib/public/modules/sticky-notes.js +3 -0
- package/lib/sdk-bridge.js +72 -13
- package/lib/sdk-message-processor.js +21 -10
- package/lib/sdk-skill-discovery.js +199 -1
- package/lib/sdk-slash-enrichment.js +64 -0
- package/lib/sdk-worker.js +17 -0
- package/lib/sdk-workflow-discovery.js +151 -0
- package/lib/server.js +2 -0
- package/lib/sessions.js +2 -0
- package/lib/yoke/adapters/claude-worker.js +17 -0
- package/lib/yoke/adapters/claude.js +13 -3
- package/lib/yoke/adapters/codex.js +53 -4
- package/package.json +1 -1
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
var path = require("path");
|
|
7
7
|
var fs = require("fs");
|
|
8
8
|
var { CodexAppServer } = require("../codex-app-server");
|
|
9
|
+
var { discoverWorkflows } = require("../../sdk-workflow-discovery");
|
|
10
|
+
var { discoverSkillsWithMeta } = require("../../sdk-skill-discovery");
|
|
9
11
|
|
|
10
12
|
// --- Claude skill discovery ---
|
|
11
13
|
// Finds Claude skills in ~/.claude/skills/ and <cwd>/.claude/skills/
|
|
@@ -1151,12 +1153,59 @@ function createCodexAdapter(opts) {
|
|
|
1151
1153
|
updateLastActiveAt();
|
|
1152
1154
|
}
|
|
1153
1155
|
|
|
1154
|
-
|
|
1156
|
+
// Build the enriched slash_commands array from skill names and workflow discovery.
|
|
1157
|
+
// Returns {name, desc, type}[] with skills first (type:'skill'), then workflows
|
|
1158
|
+
// (type:'workflow'), deduplicated by name. This mirrors the enrichment done in
|
|
1159
|
+
// sdk-message-processor for the Claude adapter path.
|
|
1160
|
+
function buildEnrichedSlashCommands(skillNames, cwd) {
|
|
1161
|
+
var effectiveCwd = cwd || _cwd;
|
|
1162
|
+
var seen = {};
|
|
1163
|
+
var combined = [];
|
|
1164
|
+
|
|
1165
|
+
// Skills: enrich with descriptions from SKILL.md where available
|
|
1166
|
+
var fsSkillsMeta;
|
|
1167
|
+
try {
|
|
1168
|
+
fsSkillsMeta = discoverSkillsWithMeta(effectiveCwd);
|
|
1169
|
+
} catch (e) {
|
|
1170
|
+
fsSkillsMeta = [];
|
|
1171
|
+
}
|
|
1172
|
+
var skillMetaMap = {};
|
|
1173
|
+
for (var si = 0; si < fsSkillsMeta.length; si++) {
|
|
1174
|
+
skillMetaMap[fsSkillsMeta[si].name] = fsSkillsMeta[si];
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
var names = skillNames || [];
|
|
1178
|
+
for (var ni = 0; ni < names.length; ni++) {
|
|
1179
|
+
var name = names[ni];
|
|
1180
|
+
if (seen[name]) continue;
|
|
1181
|
+
seen[name] = true;
|
|
1182
|
+
var meta = skillMetaMap[name];
|
|
1183
|
+
combined.push({ name: name, desc: (meta && meta.description) || "", type: "skill" });
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
// Workflows: discovered from filesystem, deduplicated against skills by name
|
|
1187
|
+
var workflows;
|
|
1188
|
+
try {
|
|
1189
|
+
workflows = discoverWorkflows(effectiveCwd);
|
|
1190
|
+
} catch (e) {
|
|
1191
|
+
workflows = [];
|
|
1192
|
+
}
|
|
1193
|
+
for (var wi = 0; wi < workflows.length; wi++) {
|
|
1194
|
+
var wf = workflows[wi];
|
|
1195
|
+
if (seen[wf.name]) continue;
|
|
1196
|
+
seen[wf.name] = true;
|
|
1197
|
+
combined.push({ name: wf.name, desc: wf.description || "", type: "workflow" });
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
return combined;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
function buildReadyResponse(skillNames, cwd) {
|
|
1155
1204
|
return {
|
|
1156
1205
|
models: _cachedModels,
|
|
1157
1206
|
defaultModel: _defaultModel,
|
|
1158
1207
|
skills: skillNames || [],
|
|
1159
|
-
slashCommands: skillNames
|
|
1208
|
+
slashCommands: buildEnrichedSlashCommands(skillNames, cwd),
|
|
1160
1209
|
fastModeState: null,
|
|
1161
1210
|
capabilities: {
|
|
1162
1211
|
thinking: true,
|
|
@@ -1278,7 +1327,7 @@ function createCodexAdapter(opts) {
|
|
|
1278
1327
|
|
|
1279
1328
|
// Already initialized - return cached result
|
|
1280
1329
|
if (_appServer && _appServer.started && _cachedModels.length > 0) {
|
|
1281
|
-
return Promise.resolve(buildReadyResponse([]));
|
|
1330
|
+
return Promise.resolve(buildReadyResponse([], _cwd));
|
|
1282
1331
|
}
|
|
1283
1332
|
|
|
1284
1333
|
// Deduplicate concurrent init calls
|
|
@@ -1455,7 +1504,7 @@ function createCodexAdapter(opts) {
|
|
|
1455
1504
|
_initPromise = null;
|
|
1456
1505
|
updateLastActiveAt();
|
|
1457
1506
|
|
|
1458
|
-
return buildReadyResponse(skillNames);
|
|
1507
|
+
return buildReadyResponse(skillNames, _cwd);
|
|
1459
1508
|
})();
|
|
1460
1509
|
|
|
1461
1510
|
return _initPromise;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.4.0-beta.
|
|
6
|
+
"version": "1.4.0-beta.3",
|
|
7
7
|
"description": "Self-hosted console for Claude Code and Codex. Multi-user, browser-based, persistent AI sessions.",
|
|
8
8
|
"bin": {
|
|
9
9
|
"clagentic-console": "./bin/cli.js"
|