@meet-ai/cli 0.0.21 → 0.0.23
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/dist/index.js +303 -36
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -14690,6 +14690,21 @@ function createClient(baseUrl, apiKey) {
|
|
|
14690
14690
|
return res.text();
|
|
14691
14691
|
});
|
|
14692
14692
|
},
|
|
14693
|
+
async sendCommands(roomId, payload) {
|
|
14694
|
+
return withRetry(async () => {
|
|
14695
|
+
const res = await fetch(`${baseUrl}/api/rooms/${roomId}/commands`, {
|
|
14696
|
+
method: "POST",
|
|
14697
|
+
headers: headers(),
|
|
14698
|
+
body: payload
|
|
14699
|
+
});
|
|
14700
|
+
if (!res.ok) {
|
|
14701
|
+
const err2 = await res.json().catch(() => ({}));
|
|
14702
|
+
const msg = err2.error;
|
|
14703
|
+
throw new Error(typeof msg === "string" ? msg : msg ? JSON.stringify(msg) : `HTTP ${res.status}`);
|
|
14704
|
+
}
|
|
14705
|
+
return res.text();
|
|
14706
|
+
});
|
|
14707
|
+
},
|
|
14693
14708
|
async sendTasks(roomId, payload) {
|
|
14694
14709
|
return withRetry(async () => {
|
|
14695
14710
|
const res = await fetch(`${baseUrl}/api/rooms/${roomId}/tasks`, {
|
|
@@ -17023,6 +17038,256 @@ var init_command16 = __esm(() => {
|
|
|
17023
17038
|
});
|
|
17024
17039
|
});
|
|
17025
17040
|
|
|
17041
|
+
// src/commands/list-commands/usecase.ts
|
|
17042
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
17043
|
+
import { readFile as readFile2, readdir } from "node:fs/promises";
|
|
17044
|
+
import { homedir as homedir3 } from "node:os";
|
|
17045
|
+
import { join as join3, resolve as resolve3 } from "node:path";
|
|
17046
|
+
function parseYamlFrontmatter(content) {
|
|
17047
|
+
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
17048
|
+
if (!match)
|
|
17049
|
+
return null;
|
|
17050
|
+
const body = match[1];
|
|
17051
|
+
const nameMatch = body.match(/^name:\s*(.+)$/m);
|
|
17052
|
+
const descMatch = body.match(/^description:\s*(.+)$/m);
|
|
17053
|
+
return {
|
|
17054
|
+
name: nameMatch?.[1]?.trim(),
|
|
17055
|
+
description: descMatch?.[1]?.trim()
|
|
17056
|
+
};
|
|
17057
|
+
}
|
|
17058
|
+
async function readSkillsFromDir(baseDir, source, scope) {
|
|
17059
|
+
const skillsDir = join3(baseDir, "skills");
|
|
17060
|
+
if (!existsSync3(skillsDir))
|
|
17061
|
+
return [];
|
|
17062
|
+
let entries;
|
|
17063
|
+
try {
|
|
17064
|
+
entries = await readdir(skillsDir);
|
|
17065
|
+
} catch {
|
|
17066
|
+
return [];
|
|
17067
|
+
}
|
|
17068
|
+
const results = [];
|
|
17069
|
+
for (const entry of entries) {
|
|
17070
|
+
const skillFile = join3(skillsDir, entry, "SKILL.md");
|
|
17071
|
+
if (!existsSync3(skillFile))
|
|
17072
|
+
continue;
|
|
17073
|
+
try {
|
|
17074
|
+
const content = await readFile2(skillFile, "utf-8");
|
|
17075
|
+
const fm = parseYamlFrontmatter(content);
|
|
17076
|
+
if (!fm)
|
|
17077
|
+
continue;
|
|
17078
|
+
if (!fm.description)
|
|
17079
|
+
continue;
|
|
17080
|
+
results.push({
|
|
17081
|
+
name: fm.name ?? entry,
|
|
17082
|
+
description: fm.description,
|
|
17083
|
+
type: "skill",
|
|
17084
|
+
source,
|
|
17085
|
+
scope
|
|
17086
|
+
});
|
|
17087
|
+
} catch {}
|
|
17088
|
+
}
|
|
17089
|
+
return results;
|
|
17090
|
+
}
|
|
17091
|
+
async function readCommandsFromDir(commandsDir, source, scope) {
|
|
17092
|
+
if (!existsSync3(commandsDir))
|
|
17093
|
+
return [];
|
|
17094
|
+
const results = [];
|
|
17095
|
+
async function scanDir(dir) {
|
|
17096
|
+
let entries;
|
|
17097
|
+
try {
|
|
17098
|
+
entries = await readdir(dir, { withFileTypes: true });
|
|
17099
|
+
} catch {
|
|
17100
|
+
return;
|
|
17101
|
+
}
|
|
17102
|
+
for (const entry of entries) {
|
|
17103
|
+
const fullPath = join3(dir, entry.name);
|
|
17104
|
+
if (entry.isDirectory()) {
|
|
17105
|
+
await scanDir(fullPath);
|
|
17106
|
+
} else if (entry.isFile() && entry.name.endsWith(".md")) {
|
|
17107
|
+
try {
|
|
17108
|
+
const content = await readFile2(fullPath, "utf-8");
|
|
17109
|
+
const fm = parseYamlFrontmatter(content);
|
|
17110
|
+
if (!fm || !fm.description)
|
|
17111
|
+
continue;
|
|
17112
|
+
const fallbackName = entry.name.slice(0, -3);
|
|
17113
|
+
results.push({
|
|
17114
|
+
name: fm.name ?? fallbackName,
|
|
17115
|
+
description: fm.description,
|
|
17116
|
+
type: "command",
|
|
17117
|
+
source,
|
|
17118
|
+
scope
|
|
17119
|
+
});
|
|
17120
|
+
} catch {}
|
|
17121
|
+
}
|
|
17122
|
+
}
|
|
17123
|
+
}
|
|
17124
|
+
await scanDir(commandsDir);
|
|
17125
|
+
return results;
|
|
17126
|
+
}
|
|
17127
|
+
async function readSettings2(settingsPath) {
|
|
17128
|
+
if (!existsSync3(settingsPath))
|
|
17129
|
+
return {};
|
|
17130
|
+
try {
|
|
17131
|
+
const raw = await readFile2(settingsPath, "utf-8");
|
|
17132
|
+
return JSON.parse(raw.trim() || "{}");
|
|
17133
|
+
} catch {
|
|
17134
|
+
return {};
|
|
17135
|
+
}
|
|
17136
|
+
}
|
|
17137
|
+
async function readInstalledPlugins(pluginsFile) {
|
|
17138
|
+
if (!existsSync3(pluginsFile))
|
|
17139
|
+
return {};
|
|
17140
|
+
try {
|
|
17141
|
+
const raw = await readFile2(pluginsFile, "utf-8");
|
|
17142
|
+
const parsed = JSON.parse(raw);
|
|
17143
|
+
return parsed.plugins ?? {};
|
|
17144
|
+
} catch {
|
|
17145
|
+
return {};
|
|
17146
|
+
}
|
|
17147
|
+
}
|
|
17148
|
+
async function listCommands(options) {
|
|
17149
|
+
const projectPath = resolve3(options.projectPath ?? process.cwd());
|
|
17150
|
+
const userClaudeDir = options._userClaudeDir ?? join3(homedir3(), ".claude");
|
|
17151
|
+
const pluginsFile = options._pluginsFile ?? join3(homedir3(), ".claude", "plugins", "installed_plugins.json");
|
|
17152
|
+
const results = [];
|
|
17153
|
+
for (const cmd of BUILT_IN_COMMANDS) {
|
|
17154
|
+
results.push({ ...cmd, type: "command", source: "built-in", scope: "user" });
|
|
17155
|
+
}
|
|
17156
|
+
const userSkills = await readSkillsFromDir(userClaudeDir, "standalone", "user");
|
|
17157
|
+
results.push(...userSkills);
|
|
17158
|
+
const projectClaudeDir = join3(projectPath, ".claude");
|
|
17159
|
+
const projectSkills = await readSkillsFromDir(projectClaudeDir, "standalone", "project");
|
|
17160
|
+
results.push(...projectSkills);
|
|
17161
|
+
const userSettings = await readSettings2(join3(userClaudeDir, "settings.json"));
|
|
17162
|
+
const projectSettings = await readSettings2(join3(projectClaudeDir, "settings.json"));
|
|
17163
|
+
const userEnabled = userSettings.enabledPlugins ?? {};
|
|
17164
|
+
const projectEnabled = projectSettings.enabledPlugins ?? {};
|
|
17165
|
+
const enabledPlugins = new Map;
|
|
17166
|
+
for (const scopeName of Object.keys(userEnabled)) {
|
|
17167
|
+
enabledPlugins.set(scopeName, "user");
|
|
17168
|
+
}
|
|
17169
|
+
for (const scopeName of Object.keys(projectEnabled)) {
|
|
17170
|
+
enabledPlugins.set(scopeName, "project");
|
|
17171
|
+
}
|
|
17172
|
+
if (enabledPlugins.size > 0) {
|
|
17173
|
+
const installedPlugins = await readInstalledPlugins(pluginsFile);
|
|
17174
|
+
for (const [scopeName, pluginScope] of enabledPlugins) {
|
|
17175
|
+
const installations = installedPlugins[scopeName];
|
|
17176
|
+
if (!installations || installations.length === 0)
|
|
17177
|
+
continue;
|
|
17178
|
+
const { installPath } = installations[0];
|
|
17179
|
+
const source = `plugin:${scopeName}`;
|
|
17180
|
+
const pluginCommands = await readCommandsFromDir(join3(installPath, "commands"), source, pluginScope);
|
|
17181
|
+
results.push(...pluginCommands);
|
|
17182
|
+
const pluginSkills = await readSkillsFromDir(installPath, source, pluginScope);
|
|
17183
|
+
results.push(...pluginSkills);
|
|
17184
|
+
}
|
|
17185
|
+
}
|
|
17186
|
+
return results;
|
|
17187
|
+
}
|
|
17188
|
+
var BUILT_IN_COMMANDS;
|
|
17189
|
+
var init_usecase15 = __esm(() => {
|
|
17190
|
+
BUILT_IN_COMMANDS = [
|
|
17191
|
+
{ name: "help", description: "Get help with using Claude Code" },
|
|
17192
|
+
{ name: "model", description: "Switch AI model" },
|
|
17193
|
+
{ name: "clear", description: "Clear conversation history" },
|
|
17194
|
+
{ name: "compact", description: "Compact conversation context" },
|
|
17195
|
+
{ name: "fast", description: "Toggle fast mode" },
|
|
17196
|
+
{ name: "cost", description: "Show usage costs" },
|
|
17197
|
+
{ name: "resume", description: "Resume previous session" }
|
|
17198
|
+
];
|
|
17199
|
+
});
|
|
17200
|
+
|
|
17201
|
+
// src/commands/list-commands/command.ts
|
|
17202
|
+
var exports_command17 = {};
|
|
17203
|
+
__export(exports_command17, {
|
|
17204
|
+
default: () => command_default17
|
|
17205
|
+
});
|
|
17206
|
+
var command_default17;
|
|
17207
|
+
var init_command17 = __esm(() => {
|
|
17208
|
+
init_dist();
|
|
17209
|
+
init_usecase15();
|
|
17210
|
+
init_output();
|
|
17211
|
+
command_default17 = defineCommand({
|
|
17212
|
+
meta: {
|
|
17213
|
+
name: "list-commands",
|
|
17214
|
+
description: "List all available Claude Code slash commands and skills as JSON"
|
|
17215
|
+
},
|
|
17216
|
+
args: {
|
|
17217
|
+
"project-path": {
|
|
17218
|
+
type: "string",
|
|
17219
|
+
description: "Path to the project root (defaults to cwd)"
|
|
17220
|
+
}
|
|
17221
|
+
},
|
|
17222
|
+
async run({ args }) {
|
|
17223
|
+
try {
|
|
17224
|
+
const commands = await listCommands({
|
|
17225
|
+
projectPath: args["project-path"]
|
|
17226
|
+
});
|
|
17227
|
+
console.log(JSON.stringify(commands, null, 2));
|
|
17228
|
+
} catch (error48) {
|
|
17229
|
+
err(error48 instanceof Error ? error48.message : String(error48));
|
|
17230
|
+
process.exit(1);
|
|
17231
|
+
}
|
|
17232
|
+
}
|
|
17233
|
+
});
|
|
17234
|
+
});
|
|
17235
|
+
|
|
17236
|
+
// src/commands/send-commands/usecase.ts
|
|
17237
|
+
async function sendCommands(client, input) {
|
|
17238
|
+
const entries = await listCommands({ projectPath: input.projectPath });
|
|
17239
|
+
const payload = JSON.stringify({ commands: entries });
|
|
17240
|
+
await client.sendCommands(input.roomId, payload);
|
|
17241
|
+
ok("Commands sent");
|
|
17242
|
+
}
|
|
17243
|
+
var init_usecase16 = __esm(() => {
|
|
17244
|
+
init_usecase15();
|
|
17245
|
+
init_output();
|
|
17246
|
+
});
|
|
17247
|
+
|
|
17248
|
+
// src/commands/send-commands/command.ts
|
|
17249
|
+
var exports_command18 = {};
|
|
17250
|
+
__export(exports_command18, {
|
|
17251
|
+
default: () => command_default18
|
|
17252
|
+
});
|
|
17253
|
+
var command_default18;
|
|
17254
|
+
var init_command18 = __esm(() => {
|
|
17255
|
+
init_dist();
|
|
17256
|
+
init_client_factory();
|
|
17257
|
+
init_usecase16();
|
|
17258
|
+
init_output();
|
|
17259
|
+
command_default18 = defineCommand({
|
|
17260
|
+
meta: {
|
|
17261
|
+
name: "send-commands",
|
|
17262
|
+
description: "Send commands list to a room"
|
|
17263
|
+
},
|
|
17264
|
+
args: {
|
|
17265
|
+
roomId: {
|
|
17266
|
+
type: "positional",
|
|
17267
|
+
description: "Room ID to send commands to",
|
|
17268
|
+
required: true
|
|
17269
|
+
},
|
|
17270
|
+
"project-path": {
|
|
17271
|
+
type: "string",
|
|
17272
|
+
description: "Path to the project (defaults to cwd)",
|
|
17273
|
+
required: false
|
|
17274
|
+
}
|
|
17275
|
+
},
|
|
17276
|
+
async run({ args }) {
|
|
17277
|
+
try {
|
|
17278
|
+
const client = getClient();
|
|
17279
|
+
await sendCommands(client, {
|
|
17280
|
+
roomId: args.roomId,
|
|
17281
|
+
projectPath: args["project-path"]
|
|
17282
|
+
});
|
|
17283
|
+
} catch (error48) {
|
|
17284
|
+
err(error48 instanceof Error ? error48.message : String(error48));
|
|
17285
|
+
process.exit(1);
|
|
17286
|
+
}
|
|
17287
|
+
}
|
|
17288
|
+
});
|
|
17289
|
+
});
|
|
17290
|
+
|
|
17026
17291
|
// ../../node_modules/.bun/react@19.2.4/node_modules/react/cjs/react.development.js
|
|
17027
17292
|
var require_react_development = __commonJS((exports, module) => {
|
|
17028
17293
|
(function() {
|
|
@@ -17380,14 +17645,14 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
17380
17645
|
prevActScopeDepth !== actScopeDepth - 1 && console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
|
|
17381
17646
|
actScopeDepth = prevActScopeDepth;
|
|
17382
17647
|
}
|
|
17383
|
-
function recursivelyFlushAsyncActWork(returnValue,
|
|
17648
|
+
function recursivelyFlushAsyncActWork(returnValue, resolve4, reject) {
|
|
17384
17649
|
var queue = ReactSharedInternals.actQueue;
|
|
17385
17650
|
if (queue !== null)
|
|
17386
17651
|
if (queue.length !== 0)
|
|
17387
17652
|
try {
|
|
17388
17653
|
flushActQueue(queue);
|
|
17389
17654
|
enqueueTask(function() {
|
|
17390
|
-
return recursivelyFlushAsyncActWork(returnValue,
|
|
17655
|
+
return recursivelyFlushAsyncActWork(returnValue, resolve4, reject);
|
|
17391
17656
|
});
|
|
17392
17657
|
return;
|
|
17393
17658
|
} catch (error48) {
|
|
@@ -17395,7 +17660,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
17395
17660
|
}
|
|
17396
17661
|
else
|
|
17397
17662
|
ReactSharedInternals.actQueue = null;
|
|
17398
|
-
0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) :
|
|
17663
|
+
0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve4(returnValue);
|
|
17399
17664
|
}
|
|
17400
17665
|
function flushActQueue(queue) {
|
|
17401
17666
|
if (!isFlushing) {
|
|
@@ -17571,14 +17836,14 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
17571
17836
|
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
|
|
17572
17837
|
});
|
|
17573
17838
|
return {
|
|
17574
|
-
then: function(
|
|
17839
|
+
then: function(resolve4, reject) {
|
|
17575
17840
|
didAwaitActCall = true;
|
|
17576
17841
|
thenable.then(function(returnValue) {
|
|
17577
17842
|
popActScope(prevActQueue, prevActScopeDepth);
|
|
17578
17843
|
if (prevActScopeDepth === 0) {
|
|
17579
17844
|
try {
|
|
17580
17845
|
flushActQueue(queue), enqueueTask(function() {
|
|
17581
|
-
return recursivelyFlushAsyncActWork(returnValue,
|
|
17846
|
+
return recursivelyFlushAsyncActWork(returnValue, resolve4, reject);
|
|
17582
17847
|
});
|
|
17583
17848
|
} catch (error$0) {
|
|
17584
17849
|
ReactSharedInternals.thrownErrors.push(error$0);
|
|
@@ -17589,7 +17854,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
17589
17854
|
reject(_thrownError);
|
|
17590
17855
|
}
|
|
17591
17856
|
} else
|
|
17592
|
-
|
|
17857
|
+
resolve4(returnValue);
|
|
17593
17858
|
}, function(error48) {
|
|
17594
17859
|
popActScope(prevActQueue, prevActScopeDepth);
|
|
17595
17860
|
0 < ReactSharedInternals.thrownErrors.length ? (error48 = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(error48)) : reject(error48);
|
|
@@ -17605,11 +17870,11 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
17605
17870
|
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
17606
17871
|
throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
|
17607
17872
|
return {
|
|
17608
|
-
then: function(
|
|
17873
|
+
then: function(resolve4, reject) {
|
|
17609
17874
|
didAwaitActCall = true;
|
|
17610
17875
|
prevActScopeDepth === 0 ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
|
|
17611
|
-
return recursivelyFlushAsyncActWork(returnValue$jscomp$0,
|
|
17612
|
-
})) :
|
|
17876
|
+
return recursivelyFlushAsyncActWork(returnValue$jscomp$0, resolve4, reject);
|
|
17877
|
+
})) : resolve4(returnValue$jscomp$0);
|
|
17613
17878
|
}
|
|
17614
17879
|
};
|
|
17615
17880
|
};
|
|
@@ -23106,8 +23371,8 @@ It can also happen if the client has a browser extension installed which messes
|
|
|
23106
23371
|
currentEntangledActionThenable = {
|
|
23107
23372
|
status: "pending",
|
|
23108
23373
|
value: undefined,
|
|
23109
|
-
then: function(
|
|
23110
|
-
entangledListeners.push(
|
|
23374
|
+
then: function(resolve4) {
|
|
23375
|
+
entangledListeners.push(resolve4);
|
|
23111
23376
|
}
|
|
23112
23377
|
};
|
|
23113
23378
|
}
|
|
@@ -23131,8 +23396,8 @@ It can also happen if the client has a browser extension installed which messes
|
|
|
23131
23396
|
status: "pending",
|
|
23132
23397
|
value: null,
|
|
23133
23398
|
reason: null,
|
|
23134
|
-
then: function(
|
|
23135
|
-
listeners.push(
|
|
23399
|
+
then: function(resolve4) {
|
|
23400
|
+
listeners.push(resolve4);
|
|
23136
23401
|
}
|
|
23137
23402
|
};
|
|
23138
23403
|
thenable.then(function() {
|
|
@@ -53539,8 +53804,8 @@ class Ink {
|
|
|
53539
53804
|
}
|
|
53540
53805
|
}
|
|
53541
53806
|
async waitUntilExit() {
|
|
53542
|
-
this.exitPromise ||= new Promise((
|
|
53543
|
-
this.resolveExitPromise =
|
|
53807
|
+
this.exitPromise ||= new Promise((resolve4, reject) => {
|
|
53808
|
+
this.resolveExitPromise = resolve4;
|
|
53544
53809
|
this.rejectExitPromise = reject;
|
|
53545
53810
|
});
|
|
53546
53811
|
if (!this.beforeExitHandler) {
|
|
@@ -54514,10 +54779,10 @@ class TmuxClient {
|
|
|
54514
54779
|
"-S",
|
|
54515
54780
|
`-${lines}`
|
|
54516
54781
|
];
|
|
54517
|
-
return new Promise((
|
|
54782
|
+
return new Promise((resolve4) => {
|
|
54518
54783
|
execFileCb("tmux", args, { encoding: "utf8", timeout: 5000 }, (error48, stdout) => {
|
|
54519
54784
|
if (error48) {
|
|
54520
|
-
|
|
54785
|
+
resolve4([]);
|
|
54521
54786
|
return;
|
|
54522
54787
|
}
|
|
54523
54788
|
const result = stdout.split(`
|
|
@@ -54525,7 +54790,7 @@ class TmuxClient {
|
|
|
54525
54790
|
while (result.length > 0 && result[result.length - 1] === "") {
|
|
54526
54791
|
result.pop();
|
|
54527
54792
|
}
|
|
54528
|
-
|
|
54793
|
+
resolve4(result);
|
|
54529
54794
|
});
|
|
54530
54795
|
});
|
|
54531
54796
|
}
|
|
@@ -54562,8 +54827,8 @@ var init_tmux_client = __esm(() => {
|
|
|
54562
54827
|
|
|
54563
54828
|
// src/lib/process-manager.ts
|
|
54564
54829
|
import { mkdirSync as mkdirSync2, readFileSync as readFileSync6, writeFileSync as writeFileSync3, renameSync, lstatSync } from "node:fs";
|
|
54565
|
-
import { homedir as
|
|
54566
|
-
import { join as
|
|
54830
|
+
import { homedir as homedir4 } from "node:os";
|
|
54831
|
+
import { join as join4 } from "node:path";
|
|
54567
54832
|
function readRegistry() {
|
|
54568
54833
|
try {
|
|
54569
54834
|
const data = readFileSync6(REGISTRY_PATH, "utf8");
|
|
@@ -54582,7 +54847,7 @@ function writeRegistry(entries) {
|
|
|
54582
54847
|
} catch {
|
|
54583
54848
|
return;
|
|
54584
54849
|
}
|
|
54585
|
-
const tmpPath =
|
|
54850
|
+
const tmpPath = join4(REGISTRY_DIR, `sessions.${process.pid}.${Date.now()}.tmp`);
|
|
54586
54851
|
writeFileSync3(tmpPath, JSON.stringify(entries, null, 2), { mode: 384 });
|
|
54587
54852
|
renameSync(tmpPath, REGISTRY_PATH);
|
|
54588
54853
|
}
|
|
@@ -54785,8 +55050,8 @@ var init_process_manager = __esm(() => {
|
|
|
54785
55050
|
roomName: exports_external.string(),
|
|
54786
55051
|
createdAt: exports_external.string()
|
|
54787
55052
|
});
|
|
54788
|
-
REGISTRY_DIR =
|
|
54789
|
-
REGISTRY_PATH =
|
|
55053
|
+
REGISTRY_DIR = join4(homedir4(), ".meet-ai");
|
|
55054
|
+
REGISTRY_PATH = join4(REGISTRY_DIR, "sessions.json");
|
|
54790
55055
|
ENV_ALLOWLIST = [
|
|
54791
55056
|
"HOME",
|
|
54792
55057
|
"USER",
|
|
@@ -54802,32 +55067,32 @@ var init_process_manager = __esm(() => {
|
|
|
54802
55067
|
|
|
54803
55068
|
// src/spawner.ts
|
|
54804
55069
|
import { execSync } from "node:child_process";
|
|
54805
|
-
import { existsSync as
|
|
54806
|
-
import { homedir as
|
|
54807
|
-
import { join as
|
|
55070
|
+
import { existsSync as existsSync5 } from "node:fs";
|
|
55071
|
+
import { homedir as homedir5, platform as platform2 } from "node:os";
|
|
55072
|
+
import { join as join5 } from "node:path";
|
|
54808
55073
|
function findClaudeCli() {
|
|
54809
55074
|
try {
|
|
54810
55075
|
const command = platform2() === "win32" ? "where claude" : "which claude";
|
|
54811
55076
|
const result = execSync(command, { encoding: "utf8", stdio: ["pipe", "pipe", "ignore"] }).trim();
|
|
54812
55077
|
const claudePath = result.split(`
|
|
54813
55078
|
`)[0].trim();
|
|
54814
|
-
if (claudePath &&
|
|
55079
|
+
if (claudePath && existsSync5(claudePath)) {
|
|
54815
55080
|
return claudePath;
|
|
54816
55081
|
}
|
|
54817
55082
|
} catch {}
|
|
54818
55083
|
const envPath = process.env.MEET_AI_CLAUDE_PATH;
|
|
54819
|
-
if (envPath &&
|
|
55084
|
+
if (envPath && existsSync5(envPath)) {
|
|
54820
55085
|
return envPath;
|
|
54821
55086
|
}
|
|
54822
|
-
const home =
|
|
55087
|
+
const home = homedir5();
|
|
54823
55088
|
const commonPaths = [
|
|
54824
|
-
|
|
55089
|
+
join5(home, ".bun", "bin", "claude"),
|
|
54825
55090
|
"/opt/homebrew/bin/claude",
|
|
54826
55091
|
"/usr/local/bin/claude",
|
|
54827
|
-
|
|
55092
|
+
join5(home, ".local", "bin", "claude")
|
|
54828
55093
|
];
|
|
54829
55094
|
for (const path of commonPaths) {
|
|
54830
|
-
if (
|
|
55095
|
+
if (existsSync5(path)) {
|
|
54831
55096
|
return path;
|
|
54832
55097
|
}
|
|
54833
55098
|
}
|
|
@@ -56033,7 +56298,7 @@ async function startDashboard(client, config2, options) {
|
|
|
56033
56298
|
cleanup();
|
|
56034
56299
|
}
|
|
56035
56300
|
var import_react31;
|
|
56036
|
-
var
|
|
56301
|
+
var init_usecase17 = __esm(async () => {
|
|
56037
56302
|
init_process_manager();
|
|
56038
56303
|
init_tmux_client();
|
|
56039
56304
|
init_spawner();
|
|
@@ -56050,7 +56315,7 @@ init_output();
|
|
|
56050
56315
|
var main = defineCommand({
|
|
56051
56316
|
meta: {
|
|
56052
56317
|
name: "meet-ai",
|
|
56053
|
-
version: "0.0.
|
|
56318
|
+
version: "0.0.23",
|
|
56054
56319
|
description: "CLI for meet-ai chat rooms — create rooms, send messages, and stream via WebSocket"
|
|
56055
56320
|
},
|
|
56056
56321
|
args: {
|
|
@@ -56072,7 +56337,9 @@ var main = defineCommand({
|
|
|
56072
56337
|
"download-attachment": () => Promise.resolve().then(() => (init_command9(), exports_command9)).then((m) => m.default),
|
|
56073
56338
|
"generate-key": () => Promise.resolve().then(() => (init_command10(), exports_command10)).then((m) => m.default),
|
|
56074
56339
|
hook: () => Promise.resolve().then(() => (init_command15(), exports_command15)).then((m) => m.default),
|
|
56075
|
-
"setup-hooks": () => Promise.resolve().then(() => (init_command16(), exports_command16)).then((m) => m.default)
|
|
56340
|
+
"setup-hooks": () => Promise.resolve().then(() => (init_command16(), exports_command16)).then((m) => m.default),
|
|
56341
|
+
"list-commands": () => Promise.resolve().then(() => (init_command17(), exports_command17)).then((m) => m.default),
|
|
56342
|
+
"send-commands": () => Promise.resolve().then(() => (init_command18(), exports_command18)).then((m) => m.default)
|
|
56076
56343
|
},
|
|
56077
56344
|
async run({ args }) {
|
|
56078
56345
|
const hasSubcommand = process.argv.length > 2;
|
|
@@ -56081,7 +56348,7 @@ var main = defineCommand({
|
|
|
56081
56348
|
try {
|
|
56082
56349
|
const { getClient: getClient2 } = await Promise.resolve().then(() => (init_client_factory(), exports_client_factory));
|
|
56083
56350
|
const { getMeetAiConfig: getMeetAiConfig2 } = await Promise.resolve().then(() => (init_config(), exports_config));
|
|
56084
|
-
const { startDashboard: startDashboard2 } = await
|
|
56351
|
+
const { startDashboard: startDashboard2 } = await init_usecase17().then(() => exports_usecase2);
|
|
56085
56352
|
const client = getClient2();
|
|
56086
56353
|
const config2 = getMeetAiConfig2();
|
|
56087
56354
|
await startDashboard2(client, config2, { debug: args.debug });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meet-ai/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "CLI for meet-ai chat rooms — create rooms, send messages, and stream via WebSocket",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chat",
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "https://github.com/SoftWare-A-G/meet-ai",
|
|
15
|
+
"url": "git+https://github.com/SoftWare-A-G/meet-ai.git",
|
|
16
16
|
"directory": "packages/cli"
|
|
17
17
|
},
|
|
18
18
|
"bin": {
|
|
19
|
-
"meet-ai": "
|
|
19
|
+
"meet-ai": "dist/index.js"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
22
|
"dist"
|