@enruana/claude-orka 0.1.2 → 0.2.0
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/cli.js
CHANGED
|
@@ -8,6 +8,9 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
8
8
|
|
|
9
9
|
// src/cli/index.ts
|
|
10
10
|
import { Command } from "commander";
|
|
11
|
+
import { readFileSync } from "fs";
|
|
12
|
+
import { fileURLToPath } from "url";
|
|
13
|
+
import { dirname, join } from "path";
|
|
11
14
|
|
|
12
15
|
// src/core/StateManager.ts
|
|
13
16
|
import path2 from "path";
|
|
@@ -1749,6 +1752,40 @@ function statusCommand(program2) {
|
|
|
1749
1752
|
|
|
1750
1753
|
// src/cli/commands/session.ts
|
|
1751
1754
|
import ora from "ora";
|
|
1755
|
+
import chalk3 from "chalk";
|
|
1756
|
+
import readline from "readline";
|
|
1757
|
+
async function selectSession(sessions) {
|
|
1758
|
+
if (sessions.length === 0) {
|
|
1759
|
+
Output.warn("No sessions available.");
|
|
1760
|
+
return null;
|
|
1761
|
+
}
|
|
1762
|
+
console.log(chalk3.bold.cyan("\n\u{1F4CB} Select a session:\n"));
|
|
1763
|
+
sessions.forEach((session, index2) => {
|
|
1764
|
+
const statusColor = session.status === "active" ? chalk3.green : chalk3.yellow;
|
|
1765
|
+
const status = statusColor(`[${session.status}]`);
|
|
1766
|
+
const forkCount = session.forks.length > 0 ? chalk3.gray(` (${session.forks.length} forks)`) : "";
|
|
1767
|
+
console.log(` ${chalk3.bold(index2 + 1)}. ${session.name || "Unnamed"} ${status}${forkCount}`);
|
|
1768
|
+
console.log(chalk3.gray(` ID: ${session.id.slice(0, 8)}...`));
|
|
1769
|
+
console.log();
|
|
1770
|
+
});
|
|
1771
|
+
const rl = readline.createInterface({
|
|
1772
|
+
input: process.stdin,
|
|
1773
|
+
output: process.stdout
|
|
1774
|
+
});
|
|
1775
|
+
const answer = await new Promise((resolve) => {
|
|
1776
|
+
rl.question(chalk3.cyan("Enter number (or q to quit): "), resolve);
|
|
1777
|
+
});
|
|
1778
|
+
rl.close();
|
|
1779
|
+
if (answer.toLowerCase() === "q") {
|
|
1780
|
+
return null;
|
|
1781
|
+
}
|
|
1782
|
+
const index = parseInt(answer, 10) - 1;
|
|
1783
|
+
if (isNaN(index) || index < 0 || index >= sessions.length) {
|
|
1784
|
+
Output.error("Invalid selection");
|
|
1785
|
+
return null;
|
|
1786
|
+
}
|
|
1787
|
+
return sessions[index];
|
|
1788
|
+
}
|
|
1752
1789
|
function sessionCommand(program2) {
|
|
1753
1790
|
const session = program2.command("session").description("Manage Claude sessions");
|
|
1754
1791
|
session.command("create [name]").description("Create a new Claude session").option("--no-terminal", "Do not open terminal window").action(async (name, options) => {
|
|
@@ -1813,13 +1850,28 @@ function sessionCommand(program2) {
|
|
|
1813
1850
|
handleError(error);
|
|
1814
1851
|
}
|
|
1815
1852
|
});
|
|
1816
|
-
session.command("resume
|
|
1853
|
+
session.command("resume [session-id]").description("Resume a saved session (interactive if no ID provided)").option("--no-terminal", "Do not open terminal window").action(async (sessionId, options) => {
|
|
1817
1854
|
try {
|
|
1818
1855
|
const projectPath = process.cwd();
|
|
1819
1856
|
validateInitialized(projectPath);
|
|
1820
|
-
validateSessionId(sessionId);
|
|
1821
1857
|
const orka = new ClaudeOrka(projectPath);
|
|
1822
1858
|
await orka.initialize();
|
|
1859
|
+
if (!sessionId) {
|
|
1860
|
+
const sessions = await orka.listSessions({ status: "saved" });
|
|
1861
|
+
if (sessions.length === 0) {
|
|
1862
|
+
Output.warn("No saved sessions available to resume.");
|
|
1863
|
+
Output.info("Create a new session with: orka session create");
|
|
1864
|
+
process.exit(0);
|
|
1865
|
+
}
|
|
1866
|
+
const selectedSession = await selectSession(sessions);
|
|
1867
|
+
if (!selectedSession) {
|
|
1868
|
+
Output.info("Cancelled.");
|
|
1869
|
+
process.exit(0);
|
|
1870
|
+
}
|
|
1871
|
+
sessionId = selectedSession.id;
|
|
1872
|
+
} else {
|
|
1873
|
+
validateSessionId(sessionId);
|
|
1874
|
+
}
|
|
1823
1875
|
const spinner = ora("Resuming session...").start();
|
|
1824
1876
|
const resumedSession = await orka.resumeSession(sessionId, options.terminal);
|
|
1825
1877
|
spinner.succeed("Session resumed!");
|
|
@@ -2049,11 +2101,11 @@ function mergeCommand(program2) {
|
|
|
2049
2101
|
import execa2 from "execa";
|
|
2050
2102
|
import fs5 from "fs-extra";
|
|
2051
2103
|
import path5 from "path";
|
|
2052
|
-
import
|
|
2104
|
+
import chalk4 from "chalk";
|
|
2053
2105
|
function doctorCommand(program2) {
|
|
2054
2106
|
program2.command("doctor").description("Check system dependencies and configuration").action(async () => {
|
|
2055
2107
|
try {
|
|
2056
|
-
console.log(
|
|
2108
|
+
console.log(chalk4.bold.cyan("\n\u{1F50D} Claude-Orka Doctor\n"));
|
|
2057
2109
|
console.log("Checking system dependencies and configuration...\n");
|
|
2058
2110
|
const results = [];
|
|
2059
2111
|
results.push(await checkNodeVersion());
|
|
@@ -2074,19 +2126,19 @@ function doctorCommand(program2) {
|
|
|
2074
2126
|
}
|
|
2075
2127
|
async function checkNodeVersion() {
|
|
2076
2128
|
try {
|
|
2077
|
-
const
|
|
2078
|
-
const major = parseInt(
|
|
2129
|
+
const version2 = process.version;
|
|
2130
|
+
const major = parseInt(version2.slice(1).split(".")[0]);
|
|
2079
2131
|
if (major >= 18) {
|
|
2080
2132
|
return {
|
|
2081
2133
|
name: "Node.js",
|
|
2082
2134
|
status: "pass",
|
|
2083
|
-
message: `${
|
|
2135
|
+
message: `${version2} (>= 18.0.0)`
|
|
2084
2136
|
};
|
|
2085
2137
|
} else {
|
|
2086
2138
|
return {
|
|
2087
2139
|
name: "Node.js",
|
|
2088
2140
|
status: "fail",
|
|
2089
|
-
message: `${
|
|
2141
|
+
message: `${version2} (requires >= 18.0.0)`,
|
|
2090
2142
|
fix: "Install Node.js 18 or higher from https://nodejs.org"
|
|
2091
2143
|
};
|
|
2092
2144
|
}
|
|
@@ -2102,11 +2154,11 @@ async function checkNodeVersion() {
|
|
|
2102
2154
|
async function checkTmux() {
|
|
2103
2155
|
try {
|
|
2104
2156
|
const { stdout } = await execa2("tmux", ["-V"]);
|
|
2105
|
-
const
|
|
2157
|
+
const version2 = stdout.trim();
|
|
2106
2158
|
return {
|
|
2107
2159
|
name: "tmux",
|
|
2108
2160
|
status: "pass",
|
|
2109
|
-
message:
|
|
2161
|
+
message: version2
|
|
2110
2162
|
};
|
|
2111
2163
|
} catch (error) {
|
|
2112
2164
|
return {
|
|
@@ -2121,11 +2173,11 @@ async function checkTmux() {
|
|
|
2121
2173
|
async function checkClaude() {
|
|
2122
2174
|
try {
|
|
2123
2175
|
const { stdout } = await execa2("claude", ["--version"]);
|
|
2124
|
-
const
|
|
2176
|
+
const version2 = stdout.trim();
|
|
2125
2177
|
return {
|
|
2126
2178
|
name: "Claude CLI",
|
|
2127
2179
|
status: "pass",
|
|
2128
|
-
message:
|
|
2180
|
+
message: version2
|
|
2129
2181
|
};
|
|
2130
2182
|
} catch (error) {
|
|
2131
2183
|
return {
|
|
@@ -2240,42 +2292,42 @@ async function checkClaudeDir() {
|
|
|
2240
2292
|
}
|
|
2241
2293
|
}
|
|
2242
2294
|
function displayResults(results) {
|
|
2243
|
-
console.log(
|
|
2295
|
+
console.log(chalk4.bold("Results:\n"));
|
|
2244
2296
|
for (const result of results) {
|
|
2245
2297
|
let icon;
|
|
2246
2298
|
let color;
|
|
2247
2299
|
switch (result.status) {
|
|
2248
2300
|
case "pass":
|
|
2249
2301
|
icon = "\u2713";
|
|
2250
|
-
color =
|
|
2302
|
+
color = chalk4.green;
|
|
2251
2303
|
break;
|
|
2252
2304
|
case "warn":
|
|
2253
2305
|
icon = "\u26A0";
|
|
2254
|
-
color =
|
|
2306
|
+
color = chalk4.yellow;
|
|
2255
2307
|
break;
|
|
2256
2308
|
case "fail":
|
|
2257
2309
|
icon = "\u2717";
|
|
2258
|
-
color =
|
|
2310
|
+
color = chalk4.red;
|
|
2259
2311
|
break;
|
|
2260
2312
|
}
|
|
2261
2313
|
console.log(
|
|
2262
|
-
`${color(icon)} ${
|
|
2314
|
+
`${color(icon)} ${chalk4.bold(result.name)}: ${color(result.message)}`
|
|
2263
2315
|
);
|
|
2264
2316
|
if (result.details) {
|
|
2265
|
-
console.log(` ${
|
|
2317
|
+
console.log(` ${chalk4.gray(result.details)}`);
|
|
2266
2318
|
}
|
|
2267
2319
|
if (result.fix) {
|
|
2268
|
-
console.log(` ${
|
|
2320
|
+
console.log(` ${chalk4.cyan("Fix:")} ${result.fix}`);
|
|
2269
2321
|
}
|
|
2270
2322
|
console.log();
|
|
2271
2323
|
}
|
|
2272
2324
|
const passed = results.filter((r) => r.status === "pass").length;
|
|
2273
2325
|
const warned = results.filter((r) => r.status === "warn").length;
|
|
2274
2326
|
const failed = results.filter((r) => r.status === "fail").length;
|
|
2275
|
-
console.log(
|
|
2276
|
-
console.log(` ${
|
|
2277
|
-
console.log(` ${
|
|
2278
|
-
console.log(` ${
|
|
2327
|
+
console.log(chalk4.bold("Summary:"));
|
|
2328
|
+
console.log(` ${chalk4.green("\u2713")} Passed: ${passed}`);
|
|
2329
|
+
console.log(` ${chalk4.yellow("\u26A0")} Warnings: ${warned}`);
|
|
2330
|
+
console.log(` ${chalk4.red("\u2717")} Failed: ${failed}`);
|
|
2279
2331
|
console.log();
|
|
2280
2332
|
if (failed === 0 && warned === 0) {
|
|
2281
2333
|
Output.success("All checks passed! Claude-Orka is ready to use.");
|
|
@@ -2288,36 +2340,36 @@ function displayResults(results) {
|
|
|
2288
2340
|
|
|
2289
2341
|
// src/cli/commands/prepare.ts
|
|
2290
2342
|
import execa3 from "execa";
|
|
2291
|
-
import
|
|
2343
|
+
import chalk5 from "chalk";
|
|
2292
2344
|
import ora4 from "ora";
|
|
2293
2345
|
function prepareCommand(program2) {
|
|
2294
2346
|
program2.command("prepare").description("Install and configure system dependencies").option("-y, --yes", "Skip confirmation prompts").action(async (options) => {
|
|
2295
2347
|
try {
|
|
2296
|
-
console.log(
|
|
2348
|
+
console.log(chalk5.bold.cyan("\n\u{1F527} Claude-Orka Preparation\n"));
|
|
2297
2349
|
console.log("This will help you install required dependencies:\n");
|
|
2298
2350
|
console.log(" \u2022 tmux (terminal multiplexer)");
|
|
2299
2351
|
console.log(" \u2022 Claude CLI (if needed)\n");
|
|
2300
2352
|
if (!options.yes) {
|
|
2301
|
-
const
|
|
2353
|
+
const readline2 = __require("readline").createInterface({
|
|
2302
2354
|
input: process.stdin,
|
|
2303
2355
|
output: process.stdout
|
|
2304
2356
|
});
|
|
2305
2357
|
const answer = await new Promise((resolve) => {
|
|
2306
|
-
|
|
2358
|
+
readline2.question("Continue? (y/n): ", resolve);
|
|
2307
2359
|
});
|
|
2308
|
-
|
|
2360
|
+
readline2.close();
|
|
2309
2361
|
if (answer.toLowerCase() !== "y") {
|
|
2310
2362
|
Output.warn("Installation cancelled");
|
|
2311
2363
|
return;
|
|
2312
2364
|
}
|
|
2313
2365
|
}
|
|
2314
2366
|
const system = await detectSystem();
|
|
2315
|
-
console.log(
|
|
2367
|
+
console.log(chalk5.gray(`
|
|
2316
2368
|
Detected: ${system.platform}`));
|
|
2317
2369
|
await installTmux(system);
|
|
2318
2370
|
await checkClaudeCLI();
|
|
2319
|
-
console.log(
|
|
2320
|
-
console.log("Run " +
|
|
2371
|
+
console.log(chalk5.bold.green("\n\u2713 Preparation complete!\n"));
|
|
2372
|
+
console.log("Run " + chalk5.cyan("orka doctor") + " to verify everything is working.");
|
|
2321
2373
|
} catch (error) {
|
|
2322
2374
|
handleError(error);
|
|
2323
2375
|
}
|
|
@@ -2351,7 +2403,7 @@ async function detectSystem() {
|
|
|
2351
2403
|
return info;
|
|
2352
2404
|
}
|
|
2353
2405
|
async function installTmux(system) {
|
|
2354
|
-
console.log(
|
|
2406
|
+
console.log(chalk5.bold("\n\u{1F4E6} Installing tmux...\n"));
|
|
2355
2407
|
try {
|
|
2356
2408
|
await execa3("which", ["tmux"]);
|
|
2357
2409
|
const { stdout } = await execa3("tmux", ["-V"]);
|
|
@@ -2364,13 +2416,13 @@ async function installTmux(system) {
|
|
|
2364
2416
|
if (system.platform === "darwin") {
|
|
2365
2417
|
if (!system.hasHomebrew) {
|
|
2366
2418
|
spinner.fail("Homebrew is not installed");
|
|
2367
|
-
console.log(
|
|
2419
|
+
console.log(chalk5.yellow("\nPlease install Homebrew first:"));
|
|
2368
2420
|
console.log(
|
|
2369
|
-
|
|
2421
|
+
chalk5.cyan(
|
|
2370
2422
|
'/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'
|
|
2371
2423
|
)
|
|
2372
2424
|
);
|
|
2373
|
-
console.log("\nThen run: " +
|
|
2425
|
+
console.log("\nThen run: " + chalk5.cyan("brew install tmux"));
|
|
2374
2426
|
return;
|
|
2375
2427
|
}
|
|
2376
2428
|
await execa3("brew", ["install", "tmux"]);
|
|
@@ -2385,44 +2437,49 @@ async function installTmux(system) {
|
|
|
2385
2437
|
spinner.succeed("tmux installed via yum");
|
|
2386
2438
|
} else {
|
|
2387
2439
|
spinner.fail("Unknown package manager");
|
|
2388
|
-
console.log(
|
|
2389
|
-
console.log(
|
|
2440
|
+
console.log(chalk5.yellow("\nPlease install tmux manually:"));
|
|
2441
|
+
console.log(chalk5.cyan(" https://github.com/tmux/tmux/wiki/Installing"));
|
|
2390
2442
|
}
|
|
2391
2443
|
} else {
|
|
2392
2444
|
spinner.fail(`Unsupported platform: ${system.platform}`);
|
|
2393
|
-
console.log(
|
|
2394
|
-
console.log(
|
|
2445
|
+
console.log(chalk5.yellow("\nPlease install tmux manually:"));
|
|
2446
|
+
console.log(chalk5.cyan(" https://github.com/tmux/tmux/wiki/Installing"));
|
|
2395
2447
|
}
|
|
2396
2448
|
} catch (error) {
|
|
2397
2449
|
spinner.fail("Failed to install tmux");
|
|
2398
|
-
console.log(
|
|
2450
|
+
console.log(chalk5.red(`
|
|
2399
2451
|
Error: ${error.message}`));
|
|
2400
|
-
console.log(
|
|
2401
|
-
console.log(
|
|
2402
|
-
console.log(
|
|
2403
|
-
console.log(
|
|
2452
|
+
console.log(chalk5.yellow("\nPlease install tmux manually:"));
|
|
2453
|
+
console.log(chalk5.cyan(" macOS: brew install tmux"));
|
|
2454
|
+
console.log(chalk5.cyan(" Ubuntu: sudo apt-get install tmux"));
|
|
2455
|
+
console.log(chalk5.cyan(" CentOS: sudo yum install tmux"));
|
|
2404
2456
|
}
|
|
2405
2457
|
}
|
|
2406
2458
|
async function checkClaudeCLI() {
|
|
2407
|
-
console.log(
|
|
2459
|
+
console.log(chalk5.bold("\n\u{1F916} Checking Claude CLI...\n"));
|
|
2408
2460
|
try {
|
|
2409
2461
|
const { stdout } = await execa3("claude", ["--version"]);
|
|
2410
2462
|
Output.success(`Claude CLI is installed: ${stdout}`);
|
|
2411
2463
|
} catch {
|
|
2412
2464
|
Output.warn("Claude CLI is not installed");
|
|
2413
|
-
console.log(
|
|
2414
|
-
console.log(
|
|
2465
|
+
console.log(chalk5.yellow("\nClaude CLI is required for Claude-Orka to work."));
|
|
2466
|
+
console.log(chalk5.cyan("\nInstallation options:"));
|
|
2415
2467
|
console.log(" 1. Visit: https://claude.ai/download");
|
|
2416
2468
|
console.log(" 2. Or use npm: npm install -g @anthropic-ai/claude-cli");
|
|
2417
2469
|
console.log(
|
|
2418
|
-
|
|
2470
|
+
chalk5.gray("\nNote: You may need to restart your terminal after installation.")
|
|
2419
2471
|
);
|
|
2420
2472
|
}
|
|
2421
2473
|
}
|
|
2422
2474
|
|
|
2423
2475
|
// src/cli/index.ts
|
|
2476
|
+
var __filename = fileURLToPath(import.meta.url);
|
|
2477
|
+
var __dirname = dirname(__filename);
|
|
2478
|
+
var packageJsonPath = join(__dirname, "../package.json");
|
|
2479
|
+
var packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
|
|
2480
|
+
var version = packageJson.version;
|
|
2424
2481
|
var program = new Command();
|
|
2425
|
-
program.name("orka").description("Claude-Orka: Orchestrate Claude Code sessions with tmux").version(
|
|
2482
|
+
program.name("orka").description("Claude-Orka: Orchestrate Claude Code sessions with tmux").version(version);
|
|
2426
2483
|
prepareCommand(program);
|
|
2427
2484
|
initCommand(program);
|
|
2428
2485
|
doctorCommand(program);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAwDnC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,QAgN9C"}
|
|
@@ -1,7 +1,45 @@
|
|
|
1
1
|
import ora from 'ora';
|
|
2
|
+
import chalk from 'chalk';
|
|
2
3
|
import { ClaudeOrka } from '../../core/ClaudeOrka';
|
|
3
4
|
import { Output } from '../utils/output';
|
|
4
5
|
import { handleError, validateInitialized, validateSessionId } from '../utils/errors';
|
|
6
|
+
import readline from 'readline';
|
|
7
|
+
/**
|
|
8
|
+
* Interactive session selector
|
|
9
|
+
*/
|
|
10
|
+
async function selectSession(sessions) {
|
|
11
|
+
if (sessions.length === 0) {
|
|
12
|
+
Output.warn('No sessions available.');
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
console.log(chalk.bold.cyan('\n📋 Select a session:\n'));
|
|
16
|
+
// Display sessions with index
|
|
17
|
+
sessions.forEach((session, index) => {
|
|
18
|
+
const statusColor = session.status === 'active' ? chalk.green : chalk.yellow;
|
|
19
|
+
const status = statusColor(`[${session.status}]`);
|
|
20
|
+
const forkCount = session.forks.length > 0 ? chalk.gray(` (${session.forks.length} forks)`) : '';
|
|
21
|
+
console.log(` ${chalk.bold(index + 1)}. ${session.name || 'Unnamed'} ${status}${forkCount}`);
|
|
22
|
+
console.log(chalk.gray(` ID: ${session.id.slice(0, 8)}...`));
|
|
23
|
+
console.log();
|
|
24
|
+
});
|
|
25
|
+
const rl = readline.createInterface({
|
|
26
|
+
input: process.stdin,
|
|
27
|
+
output: process.stdout,
|
|
28
|
+
});
|
|
29
|
+
const answer = await new Promise((resolve) => {
|
|
30
|
+
rl.question(chalk.cyan('Enter number (or q to quit): '), resolve);
|
|
31
|
+
});
|
|
32
|
+
rl.close();
|
|
33
|
+
if (answer.toLowerCase() === 'q') {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
const index = parseInt(answer, 10) - 1;
|
|
37
|
+
if (isNaN(index) || index < 0 || index >= sessions.length) {
|
|
38
|
+
Output.error('Invalid selection');
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
return sessions[index];
|
|
42
|
+
}
|
|
5
43
|
export function sessionCommand(program) {
|
|
6
44
|
const session = program.command('session').description('Manage Claude sessions');
|
|
7
45
|
// Create session
|
|
@@ -89,16 +127,33 @@ export function sessionCommand(program) {
|
|
|
89
127
|
});
|
|
90
128
|
// Resume session
|
|
91
129
|
session
|
|
92
|
-
.command('resume
|
|
93
|
-
.description('Resume a saved session')
|
|
130
|
+
.command('resume [session-id]')
|
|
131
|
+
.description('Resume a saved session (interactive if no ID provided)')
|
|
94
132
|
.option('--no-terminal', 'Do not open terminal window')
|
|
95
133
|
.action(async (sessionId, options) => {
|
|
96
134
|
try {
|
|
97
135
|
const projectPath = process.cwd();
|
|
98
136
|
validateInitialized(projectPath);
|
|
99
|
-
validateSessionId(sessionId);
|
|
100
137
|
const orka = new ClaudeOrka(projectPath);
|
|
101
138
|
await orka.initialize();
|
|
139
|
+
// If no session ID provided, show interactive selector
|
|
140
|
+
if (!sessionId) {
|
|
141
|
+
const sessions = await orka.listSessions({ status: 'saved' });
|
|
142
|
+
if (sessions.length === 0) {
|
|
143
|
+
Output.warn('No saved sessions available to resume.');
|
|
144
|
+
Output.info('Create a new session with: orka session create');
|
|
145
|
+
process.exit(0);
|
|
146
|
+
}
|
|
147
|
+
const selectedSession = await selectSession(sessions);
|
|
148
|
+
if (!selectedSession) {
|
|
149
|
+
Output.info('Cancelled.');
|
|
150
|
+
process.exit(0);
|
|
151
|
+
}
|
|
152
|
+
sessionId = selectedSession.id;
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
validateSessionId(sessionId);
|
|
156
|
+
}
|
|
102
157
|
const spinner = ora('Resuming session...').start();
|
|
103
158
|
const resumedSession = await orka.resumeSession(sessionId, options.terminal);
|
|
104
159
|
spinner.succeed('Session resumed!');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../../src/cli/commands/session.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAErF,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAA;IAEhF,iBAAiB;IACjB,OAAO;SACJ,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,6BAA6B,CAAC;SAC1C,MAAM,CAAC,eAAe,EAAE,6BAA6B,CAAC;SACtD,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC9B,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;YACjC,mBAAmB,CAAC,WAAW,CAAC,CAAA;YAEhC,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAA;YACxC,MAAM,IAAI,CAAC,UAAU,E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AAS,CAAC,CAAA;YAElC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;YAElC,MAAM,CAAC,IAAI,CAAC,uDAAuD,CAAC,CAAA;YACpE,MAAM,CAAC,IAAI,CAAC,yBAAyB,SAAS,EAAE,CAAC,CAAA;QACnD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,WAAW,CAAC,KAAK,CAAC,CAAA;QACpB,CAAC;IACH,CAAC,CAAC,CAAA;IAEJ,iBAAiB;IACjB,OAAO;SACJ,OAAO,CAAC,qBAAqB,CAAC;SAC9B,WAAW,CAAC,8BAA8B,CAAC;SAC3C,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE;QAC1B,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;YACjC,mBAAmB,CAAC,WAAW,CAAC,CAAA;YAChC,iBAAiB,CAAC,SAAS,CAAC,CAAA;YAE5B,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAA;YACxC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAA;YAEvB,MAAM,OAAO,GAAG,GAAG,CAAC,qBAAqB,CAAC,CAAC,KAAK,EAAE,CAAA;YAElD,MAAM,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAA;YAEnC,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAA;YAEnC,MAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAA;QACtD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,WAAW,CAAC,KAAK,CAAC,CAAA;QACpB,CAAC;IACH,CAAC,CAAC,CAAA;AACN,CAAC"}
|
package/dist/src/cli/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from 'commander';
|
|
3
|
+
import { readFileSync } from 'fs';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { dirname, join } from 'path';
|
|
3
6
|
import { initCommand } from './commands/init';
|
|
4
7
|
import { statusCommand } from './commands/status';
|
|
5
8
|
import { sessionCommand } from './commands/session';
|
|
@@ -7,11 +10,18 @@ import { forkCommand } from './commands/fork';
|
|
|
7
10
|
import { mergeCommand } from './commands/merge';
|
|
8
11
|
import { doctorCommand } from './commands/doctor';
|
|
9
12
|
import { prepareCommand } from './commands/prepare';
|
|
13
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname = dirname(__filename);
|
|
15
|
+
// Read version from package.json
|
|
16
|
+
// When bundled, dist/cli.js -> ../package.json
|
|
17
|
+
const packageJsonPath = join(__dirname, '../package.json');
|
|
18
|
+
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
|
19
|
+
const version = packageJson.version;
|
|
10
20
|
const program = new Command();
|
|
11
21
|
program
|
|
12
22
|
.name('orka')
|
|
13
23
|
.description('Claude-Orka: Orchestrate Claude Code sessions with tmux')
|
|
14
|
-
.version(
|
|
24
|
+
.version(version);
|
|
15
25
|
// Register commands
|
|
16
26
|
prepareCommand(program);
|
|
17
27
|
initCommand(program);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEnD,MAAM,OAAO,GAA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