@m14i/sith 1.11.0 → 1.12.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.
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface ConfigModalProps {
3
+ onClose: () => void;
4
+ onMessage: (message: string, type?: "success" | "error" | "info") => void;
5
+ }
6
+ export declare function ConfigModal({ onClose, onMessage }: ConfigModalProps): React.ReactElement;
7
+ export {};
8
+ //# sourceMappingURL=ConfigModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfigModal.d.ts","sourceRoot":"","sources":["file:///home/runner/work/sith/sith/src/components/ConfigModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAuCxC,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,KAAK,IAAI,CAAC;CAC3E;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAkHxF"}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ export declare function TerminalUI(): React.ReactElement;
3
+ export declare function renderTerminalUI(): void;
4
+ //# sourceMappingURL=TerminalUI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TerminalUI.d.ts","sourceRoot":"","sources":["file:///home/runner/work/sith/sith/src/components/TerminalUI.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AA0IrD,wBAAgB,UAAU,IAAI,KAAK,CAAC,YAAY,CA6J/C;AAED,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"}
package/dist/index.js CHANGED
@@ -43306,6 +43306,381 @@ __webpack_async_result__();
43306
43306
 
43307
43307
  /***/ }),
43308
43308
 
43309
+ /***/ 3636:
43310
+ /***/ ((module, __webpack_exports__, __nccwpck_require__) => {
43311
+
43312
+ __nccwpck_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
43313
+ /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
43314
+ /* harmony export */ y: () => (/* binding */ ConfigModal)
43315
+ /* harmony export */ });
43316
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(2864);
43317
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
43318
+ /* harmony import */ var ink__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(3816);
43319
+ /* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(6181);
43320
+ /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(9896);
43321
+ /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__nccwpck_require__.n(fs__WEBPACK_IMPORTED_MODULE_2__);
43322
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(6928);
43323
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__nccwpck_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);
43324
+ /* harmony import */ var url__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(7016);
43325
+ /* harmony import */ var url__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__nccwpck_require__.n(url__WEBPACK_IMPORTED_MODULE_4__);
43326
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(6878);
43327
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([ink__WEBPACK_IMPORTED_MODULE_1__]);
43328
+ ink__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
43329
+
43330
+
43331
+
43332
+
43333
+
43334
+
43335
+
43336
+ const __dirname = path__WEBPACK_IMPORTED_MODULE_3___default().dirname((0,url__WEBPACK_IMPORTED_MODULE_4__.fileURLToPath)(import.meta.url));
43337
+ function findProjectRoot(startDir) {
43338
+ let currentDir = startDir;
43339
+ const rootPath = path__WEBPACK_IMPORTED_MODULE_3___default().parse(currentDir).root;
43340
+ while (currentDir !== rootPath) {
43341
+ const dockerPath = path__WEBPACK_IMPORTED_MODULE_3___default().join(currentDir, _config_js__WEBPACK_IMPORTED_MODULE_5__/* .DOCKER_CONFIG */ .e6.folderName);
43342
+ if (fs__WEBPACK_IMPORTED_MODULE_2___default().existsSync(dockerPath) && fs__WEBPACK_IMPORTED_MODULE_2___default().statSync(dockerPath).isDirectory()) {
43343
+ return currentDir;
43344
+ }
43345
+ currentDir = path__WEBPACK_IMPORTED_MODULE_3___default().dirname(currentDir);
43346
+ }
43347
+ throw new Error(`Could not find project root (${_config_js__WEBPACK_IMPORTED_MODULE_5__/* .DOCKER_CONFIG */ .e6.folderName}/ folder not found)`);
43348
+ }
43349
+ const rootDir = findProjectRoot(__dirname);
43350
+ const configOptions = [
43351
+ { label: "Pull prebuilt image (recommended)", value: "pull", icon: "📦" },
43352
+ { label: "Build Docker image from scratch", value: "build", icon: "🔨" },
43353
+ { label: "Back", value: "back", icon: "◀️" },
43354
+ ];
43355
+ function ConfigModal({ onClose, onMessage }) {
43356
+ const [selectedIndex, setSelectedIndex] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
43357
+ const [isProcessing, setIsProcessing] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
43358
+ const [processStep, setProcessStep] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("");
43359
+ (0,ink__WEBPACK_IMPORTED_MODULE_1__/* .useInput */ .Ge)((_input, key) => {
43360
+ if (isProcessing) {
43361
+ return;
43362
+ }
43363
+ if (key.upArrow) {
43364
+ setSelectedIndex((prev) => (prev > 0 ? prev - 1 : configOptions.length - 1));
43365
+ }
43366
+ else if (key.downArrow) {
43367
+ setSelectedIndex((prev) => (prev < configOptions.length - 1 ? prev + 1 : 0));
43368
+ }
43369
+ else if (key.return) {
43370
+ handleSelection(configOptions[selectedIndex].value);
43371
+ }
43372
+ else if (key.escape) {
43373
+ onClose();
43374
+ }
43375
+ });
43376
+ async function handleSelection(value) {
43377
+ switch (value) {
43378
+ case "back":
43379
+ onClose();
43380
+ break;
43381
+ case "pull":
43382
+ await handlePull();
43383
+ break;
43384
+ case "build":
43385
+ await handleBuild();
43386
+ break;
43387
+ }
43388
+ }
43389
+ async function handlePull() {
43390
+ setIsProcessing(true);
43391
+ setProcessStep("Pulling prebuilt Docker image...");
43392
+ try {
43393
+ await (0,execa__WEBPACK_IMPORTED_MODULE_6__/* .execa */ .Ho)("docker", ["pull", _config_js__WEBPACK_IMPORTED_MODULE_5__/* .DOCKER_CONFIG */ .e6.prebuiltImage], { stdio: "inherit" });
43394
+ await (0,execa__WEBPACK_IMPORTED_MODULE_6__/* .execa */ .Ho)("docker", ["tag", _config_js__WEBPACK_IMPORTED_MODULE_5__/* .DOCKER_CONFIG */ .e6.prebuiltImage, _config_js__WEBPACK_IMPORTED_MODULE_5__/* .DOCKER_CONFIG */ .e6.imageName], {
43395
+ stdio: "inherit",
43396
+ });
43397
+ onMessage(`✅ Docker image ready: ${_config_js__WEBPACK_IMPORTED_MODULE_5__/* .DOCKER_CONFIG */ .e6.imageName}`, "success");
43398
+ onClose();
43399
+ }
43400
+ catch (error) {
43401
+ const message = error instanceof Error ? error.message : "Pull failed";
43402
+ onMessage(`❌ ${message}`, "error");
43403
+ setIsProcessing(false);
43404
+ }
43405
+ }
43406
+ async function handleBuild() {
43407
+ setIsProcessing(true);
43408
+ setProcessStep("Building Docker image from scratch...");
43409
+ try {
43410
+ const dockerfilePath = path__WEBPACK_IMPORTED_MODULE_3___default().join(rootDir, _config_js__WEBPACK_IMPORTED_MODULE_5__/* .DOCKER_CONFIG */ .e6.folderName, _config_js__WEBPACK_IMPORTED_MODULE_5__/* .DOCKER_CONFIG */ .e6.dockerfileName);
43411
+ if (!fs__WEBPACK_IMPORTED_MODULE_2___default().existsSync(dockerfilePath)) {
43412
+ throw new Error(`Dockerfile not found at: ${dockerfilePath}`);
43413
+ }
43414
+ await (0,execa__WEBPACK_IMPORTED_MODULE_6__/* .execa */ .Ho)("docker", ["build", "-f", dockerfilePath, "-t", _config_js__WEBPACK_IMPORTED_MODULE_5__/* .DOCKER_CONFIG */ .e6.imageName, rootDir], {
43415
+ stdio: "inherit",
43416
+ });
43417
+ onMessage(`✅ Docker image built: ${_config_js__WEBPACK_IMPORTED_MODULE_5__/* .DOCKER_CONFIG */ .e6.imageName}`, "success");
43418
+ onClose();
43419
+ }
43420
+ catch (error) {
43421
+ const message = error instanceof Error ? error.message : "Build failed";
43422
+ onMessage(`❌ ${message}`, "error");
43423
+ setIsProcessing(false);
43424
+ }
43425
+ }
43426
+ if (isProcessing) {
43427
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", padding: 1 },
43428
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { color: "cyan", bold: true }, "\u2699\uFE0F Configuration"),
43429
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { marginTop: 1 },
43430
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { color: "yellow" }, processStep))));
43431
+ }
43432
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", padding: 1 },
43433
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { color: "cyan", bold: true }, "\u2699\uFE0F Configuration"),
43434
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { flexDirection: "column", marginTop: 1 }, configOptions.map((option, index) => {
43435
+ const isSelected = index === selectedIndex;
43436
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { key: option.value, marginY: 0 },
43437
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { color: isSelected ? "cyan" : undefined },
43438
+ isSelected ? "❯ " : " ",
43439
+ option.icon,
43440
+ " ",
43441
+ option.label)));
43442
+ })),
43443
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { marginTop: 1 },
43444
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { dimColor: true }, "Use arrow keys to navigate, Enter to select, Esc to close"))));
43445
+ }
43446
+
43447
+ __webpack_async_result__();
43448
+ } catch(e) { __webpack_async_result__(e); } });
43449
+
43450
+ /***/ }),
43451
+
43452
+ /***/ 3535:
43453
+ /***/ ((module, __webpack_exports__, __nccwpck_require__) => {
43454
+
43455
+ __nccwpck_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
43456
+ /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
43457
+ /* harmony export */ t: () => (/* binding */ renderTerminalUI)
43458
+ /* harmony export */ });
43459
+ /* unused harmony export TerminalUI */
43460
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(2864);
43461
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
43462
+ /* harmony import */ var ink__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(3816);
43463
+ /* harmony import */ var ink_text_input__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(9046);
43464
+ /* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(6181);
43465
+ /* harmony import */ var _ConfigModal_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(3636);
43466
+ /* harmony import */ var _utils_slashCommands_js__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(9987);
43467
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(6878);
43468
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([ink__WEBPACK_IMPORTED_MODULE_1__, ink_text_input__WEBPACK_IMPORTED_MODULE_2__, _ConfigModal_js__WEBPACK_IMPORTED_MODULE_3__]);
43469
+ ([ink__WEBPACK_IMPORTED_MODULE_1__, ink_text_input__WEBPACK_IMPORTED_MODULE_2__, _ConfigModal_js__WEBPACK_IMPORTED_MODULE_3__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
43470
+
43471
+
43472
+
43473
+
43474
+
43475
+
43476
+
43477
+ function WelcomeScreen() {
43478
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { flexDirection: "column", justifyContent: "center", alignItems: "center", paddingY: 2 },
43479
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { flexDirection: "column", marginBottom: 2 }, _config_js__WEBPACK_IMPORTED_MODULE_4__/* .ASCII_LOGO */ .mF.map((line, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { key: index, color: "red", bold: true }, line)))),
43480
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { flexDirection: "column", alignItems: "center", marginTop: 1 },
43481
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { dimColor: true }, "Turn your context to the dark side"),
43482
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { dimColor: true }, "Dockerized OpenCode environment")),
43483
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { marginTop: 2, flexDirection: "column", alignItems: "center" },
43484
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { color: "cyan" }, "Type your prompt to start coding"),
43485
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { dimColor: true }, "or use slash commands:")),
43486
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { flexDirection: "column", marginTop: 1, marginLeft: 2 },
43487
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { dimColor: true }, " /shell - Start OpenCode shell"),
43488
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { dimColor: true }, " /config - Configuration"),
43489
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { dimColor: true }, " /help - Show help"))));
43490
+ }
43491
+ function getMessageColor(messageType) {
43492
+ switch (messageType) {
43493
+ case "success":
43494
+ return "green";
43495
+ case "error":
43496
+ return "red";
43497
+ case "info":
43498
+ return "cyan";
43499
+ case "user":
43500
+ return "white";
43501
+ case "system":
43502
+ return "gray";
43503
+ default:
43504
+ return undefined;
43505
+ }
43506
+ }
43507
+ function getMessagePrefix(messageType) {
43508
+ switch (messageType) {
43509
+ case "user":
43510
+ return "› ";
43511
+ case "system":
43512
+ return "⚡ ";
43513
+ default:
43514
+ return "";
43515
+ }
43516
+ }
43517
+ function MessageItem({ message }) {
43518
+ const color = getMessageColor(message.type);
43519
+ const prefix = getMessagePrefix(message.type);
43520
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { marginBottom: 0 },
43521
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { color: color },
43522
+ prefix,
43523
+ message.text)));
43524
+ }
43525
+ async function getGitHubToken() {
43526
+ // Check environment variable first
43527
+ const envToken = process.env.GITHUB_TOKEN;
43528
+ if (envToken) {
43529
+ return envToken;
43530
+ }
43531
+ // Try to get token from gh CLI
43532
+ try {
43533
+ const { stdout } = await (0,execa__WEBPACK_IMPORTED_MODULE_5__/* .execa */ .Ho)("gh", ["auth", "token"]);
43534
+ return stdout.trim();
43535
+ }
43536
+ catch {
43537
+ // Return empty string if gh CLI is not available
43538
+ return "";
43539
+ }
43540
+ }
43541
+ function buildDockerCommand(githubToken, prompt) {
43542
+ const dockerArgs = [
43543
+ "run",
43544
+ "--rm",
43545
+ "-it",
43546
+ "-v",
43547
+ `${process.cwd()}:${_config_js__WEBPACK_IMPORTED_MODULE_4__/* .DOCKER_CONFIG */ .e6.workspaceMount}`,
43548
+ "-e",
43549
+ `GITHUB_TOKEN=${githubToken}`,
43550
+ "--entrypoint",
43551
+ "bash",
43552
+ _config_js__WEBPACK_IMPORTED_MODULE_4__/* .DOCKER_CONFIG */ .e6.imageName,
43553
+ "-c",
43554
+ ];
43555
+ // Build opencode command - always interactive, use Sonnet 4.6
43556
+ let opencodeCommand = "source /opt/sith/nix/nix-scripts/setup.sh && cd /workspace && opencode -m github-copilot/claude-sonnet-4.6";
43557
+ if (prompt) {
43558
+ // Escape single quotes in prompt and use --prompt flag for interactive mode
43559
+ const escapedPrompt = prompt.replace(/'/g, "'\\''");
43560
+ opencodeCommand += ` --prompt '${escapedPrompt}'`;
43561
+ }
43562
+ dockerArgs.push(opencodeCommand);
43563
+ return dockerArgs;
43564
+ }
43565
+ function TerminalUI() {
43566
+ const { exit } = (0,ink__WEBPACK_IMPORTED_MODULE_1__/* .useApp */ .nm)();
43567
+ const [input, setInput] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("");
43568
+ const [messages, setMessages] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
43569
+ const [showConfigModal, setShowConfigModal] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
43570
+ const [nextMessageId, setNextMessageId] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(1);
43571
+ const addMessage = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((text, type = "system") => {
43572
+ const newMessage = {
43573
+ id: nextMessageId,
43574
+ text,
43575
+ type,
43576
+ timestamp: new Date(),
43577
+ };
43578
+ setMessages((previousMessages) => [...previousMessages, newMessage]);
43579
+ setNextMessageId((previousId) => previousId + 1);
43580
+ }, [nextMessageId]);
43581
+ const handleShellCommand = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async (prompt) => {
43582
+ // Exit Ink UI before launching shell (it takes over stdio)
43583
+ exit();
43584
+ console.log("🚀 Starting OpenCode...");
43585
+ console.log(`Mounting current directory to ${_config_js__WEBPACK_IMPORTED_MODULE_4__/* .DOCKER_CONFIG */ .e6.workspaceMount}`);
43586
+ if (prompt) {
43587
+ console.log(`Prompt: ${prompt}`);
43588
+ }
43589
+ console.log();
43590
+ const githubToken = await getGitHubToken();
43591
+ const dockerArgs = buildDockerCommand(githubToken, prompt);
43592
+ try {
43593
+ await (0,execa__WEBPACK_IMPORTED_MODULE_5__/* .execa */ .Ho)("docker", dockerArgs, { stdio: "inherit" });
43594
+ console.log();
43595
+ console.log("✅ Exited OpenCode");
43596
+ }
43597
+ catch (error) {
43598
+ const errorMessage = error instanceof Error ? error.message : "Failed to start OpenCode";
43599
+ console.error(`❌ ${errorMessage}`);
43600
+ process.exit(1);
43601
+ }
43602
+ }, [exit]);
43603
+ const handleSlashCommand = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async (command, userInput) => {
43604
+ if (!command) {
43605
+ return;
43606
+ }
43607
+ addMessage(userInput, "user");
43608
+ switch (command.type) {
43609
+ case "shell":
43610
+ await handleShellCommand();
43611
+ break;
43612
+ case "config":
43613
+ setShowConfigModal(true);
43614
+ break;
43615
+ case "help":
43616
+ addMessage("Available commands:", "info");
43617
+ const availableCommands = (0,_utils_slashCommands_js__WEBPACK_IMPORTED_MODULE_6__/* .getAvailableCommands */ .K)();
43618
+ for (const cmd of availableCommands) {
43619
+ addMessage(` ${cmd.command} - ${cmd.description}`, "info");
43620
+ }
43621
+ break;
43622
+ }
43623
+ }, [addMessage, handleShellCommand]);
43624
+ const handleSubmit = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async (value) => {
43625
+ const trimmedValue = value.trim();
43626
+ if (!trimmedValue) {
43627
+ return;
43628
+ }
43629
+ setInput("");
43630
+ const command = (0,_utils_slashCommands_js__WEBPACK_IMPORTED_MODULE_6__/* .parseSlashCommand */ .M)(trimmedValue);
43631
+ if (command) {
43632
+ await handleSlashCommand(command, trimmedValue);
43633
+ }
43634
+ else if (trimmedValue.startsWith("/")) {
43635
+ addMessage(trimmedValue, "user");
43636
+ addMessage(`Unknown command: ${trimmedValue}. Type /help for available commands.`, "error");
43637
+ }
43638
+ else {
43639
+ // Regular text input - start OpenCode with this prompt
43640
+ await handleShellCommand(trimmedValue);
43641
+ }
43642
+ }, [addMessage, handleShellCommand, handleSlashCommand]);
43643
+ const handleConfigModalClose = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
43644
+ setShowConfigModal(false);
43645
+ }, []);
43646
+ const handleConfigModalMessage = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((text, type) => {
43647
+ addMessage(text, type || "system");
43648
+ }, [addMessage]);
43649
+ (0,ink__WEBPACK_IMPORTED_MODULE_1__/* .useInput */ .Ge)((input, key) => {
43650
+ if (showConfigModal) {
43651
+ // Let modal handle input
43652
+ return;
43653
+ }
43654
+ const shouldExit = key.escape || (key.ctrl && input === "c");
43655
+ if (shouldExit) {
43656
+ exit();
43657
+ }
43658
+ });
43659
+ if (showConfigModal) {
43660
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { flexDirection: "column" },
43661
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ConfigModal_js__WEBPACK_IMPORTED_MODULE_3__/* .ConfigModal */ .y, { onClose: handleConfigModalClose, onMessage: handleConfigModalMessage })));
43662
+ }
43663
+ const shouldShowWelcome = messages.length === 0;
43664
+ const recentMessages = messages.slice(-10);
43665
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { flexDirection: "column", height: "100%" },
43666
+ shouldShowWelcome ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(WelcomeScreen, null)) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { flexDirection: "column", flexGrow: 1, marginBottom: 1 }, recentMessages.map((message) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MessageItem, { key: message.id, message: message }))))),
43667
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { flexDirection: "column" },
43668
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { borderStyle: "single", borderColor: "gray", paddingX: 1 },
43669
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { color: "cyan", bold: true }, "\u203A"),
43670
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, null, " "),
43671
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink_text_input__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A, { value: input, onChange: setInput, onSubmit: handleSubmit, placeholder: "Enter your prompt..." })),
43672
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Box */ .az, { marginTop: 1, paddingX: 1 },
43673
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, { dimColor: true }, "Ctrl+C to exit")))));
43674
+ }
43675
+ function renderTerminalUI() {
43676
+ (0,ink__WEBPACK_IMPORTED_MODULE_1__/* .render */ .XX)(react__WEBPACK_IMPORTED_MODULE_0___default().createElement(TerminalUI, null));
43677
+ }
43678
+
43679
+ __webpack_async_result__();
43680
+ } catch(e) { __webpack_async_result__(e); } });
43681
+
43682
+ /***/ }),
43683
+
43309
43684
  /***/ 6878:
43310
43685
  /***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
43311
43686
 
@@ -43352,11 +43727,13 @@ __nccwpck_require__.a(module, async (__webpack_handle_async_dependencies__, __we
43352
43727
  /* harmony import */ var url__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__nccwpck_require__.n(url__WEBPACK_IMPORTED_MODULE_2__);
43353
43728
  /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(6928);
43354
43729
  /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__nccwpck_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);
43355
- /* harmony import */ var update_notifier__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(6213);
43356
- /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(9611);
43730
+ /* harmony import */ var update_notifier__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(6213);
43731
+ /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(9611);
43357
43732
  /* harmony import */ var _commands_docker_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(5515);
43358
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_commands_docker_js__WEBPACK_IMPORTED_MODULE_4__]);
43359
- _commands_docker_js__WEBPACK_IMPORTED_MODULE_4__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
43733
+ /* harmony import */ var _components_TerminalUI_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(3535);
43734
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_commands_docker_js__WEBPACK_IMPORTED_MODULE_4__, _components_TerminalUI_js__WEBPACK_IMPORTED_MODULE_5__]);
43735
+ ([_commands_docker_js__WEBPACK_IMPORTED_MODULE_4__, _components_TerminalUI_js__WEBPACK_IMPORTED_MODULE_5__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
43736
+
43360
43737
 
43361
43738
 
43362
43739
 
@@ -43372,12 +43749,12 @@ const PROGRAM_NAME = 'sith';
43372
43749
  const PROGRAM_VERSION = pkg.version;
43373
43750
  const PROGRAM_DESCRIPTION = 'Turn your context to the dark side. Standardize and share your OpenCode setup with a fully dockerized environment, designed for seamless collaboration and CI integration.';
43374
43751
  // Check for updates (automatic background check)
43375
- const notifier = (0,update_notifier__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({ pkg });
43752
+ const notifier = (0,update_notifier__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)({ pkg });
43376
43753
  notifier.notify();
43377
43754
  async function checkForUpdates() {
43378
- console.log(chalk__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.cyan('Checking for updates...'));
43755
+ console.log(chalk__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Ay.cyan('Checking for updates...'));
43379
43756
  // Force update check by setting updateCheckInterval to 0
43380
- const notifier = (0,update_notifier__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({
43757
+ const notifier = (0,update_notifier__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)({
43381
43758
  pkg,
43382
43759
  updateCheckInterval: 0
43383
43760
  });
@@ -43386,12 +43763,12 @@ async function checkForUpdates() {
43386
43763
  const update = notifier.update;
43387
43764
  if (update && update.latest !== pkg.version) {
43388
43765
  console.log();
43389
- console.log(chalk__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.green(`Update available: ${chalk__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.dim(pkg.version)} → ${chalk__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.bold(update.latest)}`));
43390
- console.log(chalk__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.cyan(`Run ${chalk__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.bold(`npm install -g ${pkg.name}`)} to update`));
43766
+ console.log(chalk__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Ay.green(`Update available: ${chalk__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Ay.dim(pkg.version)} → ${chalk__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Ay.bold(update.latest)}`));
43767
+ console.log(chalk__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Ay.cyan(`Run ${chalk__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Ay.bold(`npm install -g ${pkg.name}`)} to update`));
43391
43768
  console.log();
43392
43769
  }
43393
43770
  else {
43394
- console.log(chalk__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.green(`✓ You're on the latest version (${pkg.version})`));
43771
+ console.log(chalk__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Ay.green(`✓ You're on the latest version (${pkg.version})`));
43395
43772
  }
43396
43773
  }
43397
43774
  function createProgram() {
@@ -43403,8 +43780,9 @@ function createProgram() {
43403
43780
  .option('--pull', 'Pull prebuilt Docker image (recommended)')
43404
43781
  .option('--build', 'Build the Docker image from scratch')
43405
43782
  .option('--it', 'Launch interactive shell in Docker container')
43406
- .option('--update', 'Check for updates');
43407
- // Default action - show interactive menu or run shell with --it
43783
+ .option('--update', 'Check for updates')
43784
+ .option('--legacy', 'Use legacy menu interface');
43785
+ // Default action - show terminal UI or legacy menu
43408
43786
  program
43409
43787
  .action(async (options) => {
43410
43788
  if (options.update) {
@@ -43413,9 +43791,14 @@ function createProgram() {
43413
43791
  else if (options.it) {
43414
43792
  await (0,_commands_docker_js__WEBPACK_IMPORTED_MODULE_4__/* .runShellDirect */ .l)();
43415
43793
  }
43416
- else {
43794
+ else if (options.legacy || options.pull || options.build) {
43795
+ // Use legacy menu for explicit pull/build or --legacy flag
43417
43796
  await (0,_commands_docker_js__WEBPACK_IMPORTED_MODULE_4__/* .dockerCommand */ .Q)(options);
43418
43797
  }
43798
+ else {
43799
+ // Default: show new terminal UI
43800
+ (0,_components_TerminalUI_js__WEBPACK_IMPORTED_MODULE_5__/* .renderTerminalUI */ .t)();
43801
+ }
43419
43802
  });
43420
43803
  // Docker command - explicit Docker management
43421
43804
  program
@@ -43442,6 +43825,41 @@ program.parse();
43442
43825
  __webpack_async_result__();
43443
43826
  } catch(e) { __webpack_async_result__(e); } });
43444
43827
 
43828
+ /***/ }),
43829
+
43830
+ /***/ 9987:
43831
+ /***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
43832
+
43833
+ /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
43834
+ /* harmony export */ K: () => (/* binding */ getAvailableCommands),
43835
+ /* harmony export */ M: () => (/* binding */ parseSlashCommand)
43836
+ /* harmony export */ });
43837
+ function parseSlashCommand(input) {
43838
+ const trimmed = input.trim();
43839
+ if (!trimmed.startsWith("/")) {
43840
+ return null;
43841
+ }
43842
+ const command = trimmed.slice(1).toLowerCase();
43843
+ switch (command) {
43844
+ case "shell":
43845
+ return { type: "shell", raw: trimmed };
43846
+ case "config":
43847
+ return { type: "config", raw: trimmed };
43848
+ case "help":
43849
+ return { type: "help", raw: trimmed };
43850
+ default:
43851
+ return null;
43852
+ }
43853
+ }
43854
+ function getAvailableCommands() {
43855
+ return [
43856
+ { command: "/shell", description: "Enter interactive shell in Docker container" },
43857
+ { command: "/config", description: "Open configuration menu" },
43858
+ { command: "/help", description: "Show available commands" },
43859
+ ];
43860
+ }
43861
+
43862
+
43445
43863
  /***/ }),
43446
43864
 
43447
43865
  /***/ 2613:
@@ -58268,6 +58686,142 @@ function indentString(string, count = 1, options = {}) {
58268
58686
  }
58269
58687
 
58270
58688
 
58689
+ /***/ }),
58690
+
58691
+ /***/ 9046:
58692
+ /***/ ((__webpack_module__, __webpack_exports__, __nccwpck_require__) => {
58693
+
58694
+ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
58695
+ /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
58696
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
58697
+ /* harmony export */ });
58698
+ /* unused harmony export UncontrolledTextInput */
58699
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(2864);
58700
+ /* harmony import */ var ink__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(3816);
58701
+ /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(9611);
58702
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([ink__WEBPACK_IMPORTED_MODULE_1__]);
58703
+ ink__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
58704
+
58705
+
58706
+
58707
+ function TextInput({ value: originalValue, placeholder = '', focus = true, mask, highlightPastedText = false, showCursor = true, onChange, onSubmit, }) {
58708
+ const [state, setState] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
58709
+ cursorOffset: (originalValue || '').length,
58710
+ cursorWidth: 0,
58711
+ });
58712
+ const { cursorOffset, cursorWidth } = state;
58713
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
58714
+ setState(previousState => {
58715
+ if (!focus || !showCursor) {
58716
+ return previousState;
58717
+ }
58718
+ const newValue = originalValue || '';
58719
+ if (previousState.cursorOffset > newValue.length - 1) {
58720
+ return {
58721
+ cursorOffset: newValue.length,
58722
+ cursorWidth: 0,
58723
+ };
58724
+ }
58725
+ return previousState;
58726
+ });
58727
+ }, [originalValue, focus, showCursor]);
58728
+ const cursorActualWidth = highlightPastedText ? cursorWidth : 0;
58729
+ const value = mask ? mask.repeat(originalValue.length) : originalValue;
58730
+ let renderedValue = value;
58731
+ let renderedPlaceholder = placeholder ? chalk__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Ay.grey(placeholder) : undefined;
58732
+ // Fake mouse cursor, because it's too inconvenient to deal with actual cursor and ansi escapes
58733
+ if (showCursor && focus) {
58734
+ renderedPlaceholder =
58735
+ placeholder.length > 0
58736
+ ? chalk__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Ay.inverse(placeholder[0]) + chalk__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Ay.grey(placeholder.slice(1))
58737
+ : chalk__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Ay.inverse(' ');
58738
+ renderedValue = value.length > 0 ? '' : chalk__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Ay.inverse(' ');
58739
+ let i = 0;
58740
+ for (const char of value) {
58741
+ renderedValue +=
58742
+ i >= cursorOffset - cursorActualWidth && i <= cursorOffset
58743
+ ? chalk__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Ay.inverse(char)
58744
+ : char;
58745
+ i++;
58746
+ }
58747
+ if (value.length > 0 && cursorOffset === value.length) {
58748
+ renderedValue += chalk__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Ay.inverse(' ');
58749
+ }
58750
+ }
58751
+ (0,ink__WEBPACK_IMPORTED_MODULE_1__/* .useInput */ .Ge)((input, key) => {
58752
+ if (key.upArrow ||
58753
+ key.downArrow ||
58754
+ (key.ctrl && input === 'c') ||
58755
+ key.tab ||
58756
+ (key.shift && key.tab)) {
58757
+ return;
58758
+ }
58759
+ if (key.return) {
58760
+ if (onSubmit) {
58761
+ onSubmit(originalValue);
58762
+ }
58763
+ return;
58764
+ }
58765
+ let nextCursorOffset = cursorOffset;
58766
+ let nextValue = originalValue;
58767
+ let nextCursorWidth = 0;
58768
+ if (key.leftArrow) {
58769
+ if (showCursor) {
58770
+ nextCursorOffset--;
58771
+ }
58772
+ }
58773
+ else if (key.rightArrow) {
58774
+ if (showCursor) {
58775
+ nextCursorOffset++;
58776
+ }
58777
+ }
58778
+ else if (key.backspace || key.delete) {
58779
+ if (cursorOffset > 0) {
58780
+ nextValue =
58781
+ originalValue.slice(0, cursorOffset - 1) +
58782
+ originalValue.slice(cursorOffset, originalValue.length);
58783
+ nextCursorOffset--;
58784
+ }
58785
+ }
58786
+ else {
58787
+ nextValue =
58788
+ originalValue.slice(0, cursorOffset) +
58789
+ input +
58790
+ originalValue.slice(cursorOffset, originalValue.length);
58791
+ nextCursorOffset += input.length;
58792
+ if (input.length > 1) {
58793
+ nextCursorWidth = input.length;
58794
+ }
58795
+ }
58796
+ if (cursorOffset < 0) {
58797
+ nextCursorOffset = 0;
58798
+ }
58799
+ if (cursorOffset > originalValue.length) {
58800
+ nextCursorOffset = originalValue.length;
58801
+ }
58802
+ setState({
58803
+ cursorOffset: nextCursorOffset,
58804
+ cursorWidth: nextCursorWidth,
58805
+ });
58806
+ if (nextValue !== originalValue) {
58807
+ onChange(nextValue);
58808
+ }
58809
+ }, { isActive: focus });
58810
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(ink__WEBPACK_IMPORTED_MODULE_1__/* .Text */ .EY, null, placeholder
58811
+ ? value.length > 0
58812
+ ? renderedValue
58813
+ : renderedPlaceholder
58814
+ : renderedValue));
58815
+ }
58816
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TextInput);
58817
+ function UncontrolledTextInput({ initialValue = '', ...props }) {
58818
+ const [value, setValue] = useState(initialValue);
58819
+ return React.createElement(TextInput, { ...props, value: value, onChange: setValue });
58820
+ }
58821
+ //# sourceMappingURL=index.js.map
58822
+ __webpack_async_result__();
58823
+ } catch(e) { __webpack_async_result__(e); } });
58824
+
58271
58825
  /***/ }),
58272
58826
 
58273
58827
  /***/ 3061:
package/dist/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@m14i/sith","version":"1.11.0","description":"Turn your context to the dark side. Standardize and share your OpenCode setup with a fully dockerized environment, designed for seamless collaboration and CI integration.","type":"module","repository":{"type":"git","url":"https://github.com/MerzoukeMansouri/sith.git"},"bin":{"sith":"./dist/index.js"},"scripts":{"build":"ncc build src/index.ts -o dist && rm -rf dist/assets && cp -r assets dist/","dev":"tsx src/index.ts","dev:build":"pnpm build && node dist/index.js","dev:shell":"pnpm build && node dist/index.js shell","typecheck":"tsc --noEmit","clean":"rm -rf dist","prepublishOnly":"pnpm build"},"files":["dist","assets","docker"],"keywords":["opencode","docker","ci","automation","cli","nix"],"author":"","license":"MIT","dependencies":{"@inquirer/prompts":"^5.0.0","chalk":"^5.3.0","commander":"^12.1.0","execa":"^9.0.0","ink":"^7.0.3","react":"^19.2.6","update-notifier":"^7.3.1"},"devDependencies":{"@semantic-release/changelog":"^6.0.3","@semantic-release/git":"^10.0.1","@semantic-release/github":"^11.0.1","@semantic-release/npm":"^12.0.1","@types/node":"^20.12.7","@types/react":"^19.2.14","@types/update-notifier":"^6.0.8","@vercel/ncc":"^0.38.1","semantic-release":"^24.2.0","tsx":"^4.7.2","typescript":"^5.4.5"},"engines":{"node":">=18"}}
1
+ {"name":"@m14i/sith","version":"1.12.0","description":"Turn your context to the dark side. Standardize and share your OpenCode setup with a fully dockerized environment, designed for seamless collaboration and CI integration.","type":"module","repository":{"type":"git","url":"https://github.com/MerzoukeMansouri/sith.git"},"bin":{"sith":"./dist/index.js"},"scripts":{"build":"ncc build src/index.ts -o dist && rm -rf dist/assets && cp -r assets dist/","dev":"tsx src/index.ts","dev:build":"pnpm build && node dist/index.js","dev:shell":"pnpm build && node dist/index.js shell","typecheck":"tsc --noEmit","clean":"rm -rf dist","prepublishOnly":"pnpm build"},"files":["dist","assets","docker"],"keywords":["opencode","docker","ci","automation","cli","nix"],"author":"","license":"MIT","dependencies":{"@inquirer/prompts":"^5.0.0","chalk":"^5.3.0","commander":"^12.1.0","execa":"^9.0.0","ink":"^7.0.3","ink-text-input":"^6.0.0","react":"^19.2.6","update-notifier":"^7.3.1"},"devDependencies":{"@semantic-release/changelog":"^6.0.3","@semantic-release/git":"^10.0.1","@semantic-release/github":"^11.0.1","@semantic-release/npm":"^12.0.1","@types/node":"^20.12.7","@types/react":"^19.2.14","@types/update-notifier":"^6.0.8","@vercel/ncc":"^0.38.1","semantic-release":"^24.2.0","tsx":"^4.7.2","typescript":"^5.4.5"},"engines":{"node":">=18"}}
@@ -0,0 +1,11 @@
1
+ export type SlashCommandType = "shell" | "config" | "help";
2
+ export interface SlashCommand {
3
+ type: SlashCommandType;
4
+ raw: string;
5
+ }
6
+ export declare function parseSlashCommand(input: string): SlashCommand | null;
7
+ export declare function getAvailableCommands(): Array<{
8
+ command: string;
9
+ description: string;
10
+ }>;
11
+ //# sourceMappingURL=slashCommands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slashCommands.d.ts","sourceRoot":"","sources":["file:///home/runner/work/sith/sith/src/utils/slashCommands.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE3D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,gBAAgB,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAmBpE;AAED,wBAAgB,oBAAoB,IAAI,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAMtF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m14i/sith",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "description": "Turn your context to the dark side. Standardize and share your OpenCode setup with a fully dockerized environment, designed for seamless collaboration and CI integration.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -40,6 +40,7 @@
40
40
  "commander": "^12.1.0",
41
41
  "execa": "^9.0.0",
42
42
  "ink": "^7.0.3",
43
+ "ink-text-input": "^6.0.0",
43
44
  "react": "^19.2.6",
44
45
  "update-notifier": "^7.3.1"
45
46
  },