@m14i/sith 1.18.0 → 1.19.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.
@@ -1 +1 @@
1
- {"version":3,"file":"TerminalUI.d.ts","sourceRoot":"","sources":["file:///home/runner/work/sith/sith/src/components/TerminalUI.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAiIrD,wBAAgB,UAAU,IAAI,KAAK,CAAC,YAAY,CA2Q/C;AAED,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"}
1
+ {"version":3,"file":"TerminalUI.d.ts","sourceRoot":"","sources":["file:///home/runner/work/sith/sith/src/components/TerminalUI.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgC,MAAM,OAAO,CAAC;AA0JrD,wBAAgB,UAAU,IAAI,KAAK,CAAC,YAAY,CAmR/C;AAED,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"}
package/dist/index.js CHANGED
@@ -43825,7 +43825,11 @@ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([ink_
43825
43825
 
43826
43826
 
43827
43827
  const TOOLS = [
43828
- { value: "opencode", label: "OpenCode", description: "github-copilot/claude-sonnet-4.6" },
43828
+ {
43829
+ value: "opencode",
43830
+ label: "OpenCode",
43831
+ description: "github-copilot/claude-sonnet-4.6",
43832
+ },
43829
43833
  { value: "claude", label: "Claude Code", description: "Anthropic Claude" },
43830
43834
  ];
43831
43835
  function ToolPicker({ selectedIndex }) {
@@ -43846,7 +43850,7 @@ function ToolPicker({ selectedIndex }) {
43846
43850
  " ",
43847
43851
  tool.description)))),
43848
43852
  react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Box */ .az, { marginTop: 1 },
43849
- react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Text */ .EY, { dimColor: true }, "\u2191\u2193 navigate \u21B5 select")))));
43853
+ react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Text */ .EY, { dimColor: true }, "\u2191\u2193 navigate \u21B5 select")))));
43850
43854
  }
43851
43855
  function WelcomeScreen({ tool }) {
43852
43856
  const toolLabel = TOOLS.find((t) => t.value === tool)?.label ?? tool;
@@ -43864,11 +43868,11 @@ function WelcomeScreen({ tool }) {
43864
43868
  react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Text */ .EY, { dimColor: true }, "or use slash commands:")),
43865
43869
  react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Box */ .az, { flexDirection: "column", marginTop: 1, marginLeft: 2 },
43866
43870
  react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Text */ .EY, { dimColor: true }, " /opencode - Switch to OpenCode"),
43867
- react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Text */ .EY, { dimColor: true }, " /claude - Switch to Claude Code"),
43868
- react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Text */ .EY, { dimColor: true }, " /shell - Start Docker shell"),
43869
- react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Text */ .EY, { dimColor: true }, " /skills - Install/uninstall skills"),
43870
- react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Text */ .EY, { dimColor: true }, " /config - Configuration"),
43871
- react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Text */ .EY, { dimColor: true }, " /help - Show help"))));
43871
+ react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Text */ .EY, { dimColor: true }, " /claude - Switch to Claude Code"),
43872
+ react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Text */ .EY, { dimColor: true }, " /shell - Start Docker shell"),
43873
+ react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Text */ .EY, { dimColor: true }, " /skills - Install/uninstall skills"),
43874
+ react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Text */ .EY, { dimColor: true }, " /config - Configuration"),
43875
+ react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ink__WEBPACK_IMPORTED_MODULE_0__/* .Text */ .EY, { dimColor: true }, " /help - Show help"))));
43872
43876
  }
43873
43877
  function MessageItem({ message }) {
43874
43878
  const color = (0,_utils_messageUtils_js__WEBPACK_IMPORTED_MODULE_7__/* .getMessageColor */ .l)(message.type);
@@ -43945,7 +43949,9 @@ function TerminalUI() {
43945
43949
  console.log("✅ Exited Claude Code");
43946
43950
  }
43947
43951
  catch (error) {
43948
- const errorMessage = error instanceof Error ? error.message : "Failed to start Claude Code";
43952
+ const errorMessage = error instanceof Error
43953
+ ? error.message
43954
+ : "Failed to start Claude Code";
43949
43955
  console.error(`❌ ${errorMessage}`);
43950
43956
  process.exit(1);
43951
43957
  }
@@ -44007,7 +44013,13 @@ function TerminalUI() {
44007
44013
  await handleOpenCode(trimmedValue);
44008
44014
  }
44009
44015
  }
44010
- }, [addMessage, handleOpenCode, handleClaudeCode, handleSlashCommand, selectedTool]);
44016
+ }, [
44017
+ addMessage,
44018
+ handleOpenCode,
44019
+ handleClaudeCode,
44020
+ handleSlashCommand,
44021
+ selectedTool,
44022
+ ]);
44011
44023
  const handleConfigModalClose = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(() => {
44012
44024
  setShowConfigModal(false);
44013
44025
  }, []);
@@ -44162,23 +44174,23 @@ const ASCII_LOGO = [
44162
44174
  /***/ ((module, __unused_webpack___webpack_exports__, __nccwpck_require__) => {
44163
44175
 
44164
44176
  __nccwpck_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
44165
- /* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(3024);
44166
- /* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(node_fs__WEBPACK_IMPORTED_MODULE_0__);
44167
- /* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(6760);
44168
- /* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nccwpck_require__.n(node_path__WEBPACK_IMPORTED_MODULE_1__);
44169
- /* harmony import */ var node_url__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(3136);
44170
- /* harmony import */ var node_url__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__nccwpck_require__.n(node_url__WEBPACK_IMPORTED_MODULE_2__);
44177
+ /* harmony import */ var node_child_process__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(1421);
44178
+ /* harmony import */ var node_child_process__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(node_child_process__WEBPACK_IMPORTED_MODULE_0__);
44179
+ /* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(3024);
44180
+ /* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nccwpck_require__.n(node_fs__WEBPACK_IMPORTED_MODULE_1__);
44181
+ /* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(6760);
44182
+ /* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__nccwpck_require__.n(node_path__WEBPACK_IMPORTED_MODULE_2__);
44183
+ /* harmony import */ var node_url__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(3136);
44184
+ /* harmony import */ var node_url__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__nccwpck_require__.n(node_url__WEBPACK_IMPORTED_MODULE_3__);
44171
44185
  /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(9611);
44172
- /* harmony import */ var commander__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(2202);
44186
+ /* harmony import */ var commander__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(2202);
44173
44187
  /* harmony import */ var update_notifier__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(6213);
44174
- /* harmony import */ var node_child_process__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(1421);
44175
- /* harmony import */ var node_child_process__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__nccwpck_require__.n(node_child_process__WEBPACK_IMPORTED_MODULE_4__);
44176
44188
  /* harmony import */ var _commands_docker_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(5515);
44177
44189
  /* harmony import */ var _commands_nix_js__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(9922);
44178
44190
  /* harmony import */ var _commands_skills_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(9805);
44179
44191
  /* harmony import */ var _components_TerminalUI_js__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(3535);
44180
- /* harmony import */ var _utils_githubToken_js__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(1460);
44181
44192
  /* harmony import */ var _utils_dockerArgs_js__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(4495);
44193
+ /* harmony import */ var _utils_githubToken_js__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(1460);
44182
44194
  var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_commands_docker_js__WEBPACK_IMPORTED_MODULE_5__, _commands_skills_js__WEBPACK_IMPORTED_MODULE_7__, _components_TerminalUI_js__WEBPACK_IMPORTED_MODULE_8__]);
44183
44195
  ([_commands_docker_js__WEBPACK_IMPORTED_MODULE_5__, _commands_skills_js__WEBPACK_IMPORTED_MODULE_7__, _components_TerminalUI_js__WEBPACK_IMPORTED_MODULE_8__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
44184
44196
 
@@ -44195,9 +44207,9 @@ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_com
44195
44207
 
44196
44208
 
44197
44209
  // Import package.json for version and update checks
44198
- const __filename = (0,node_url__WEBPACK_IMPORTED_MODULE_2__.fileURLToPath)(import.meta.url);
44199
- const __dirname = (0,node_path__WEBPACK_IMPORTED_MODULE_1__.dirname)(__filename);
44200
- const pkg = JSON.parse((0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync)((0,node_path__WEBPACK_IMPORTED_MODULE_1__.join)(__dirname, "../package.json"), "utf-8"));
44210
+ const __filename = (0,node_url__WEBPACK_IMPORTED_MODULE_3__.fileURLToPath)(import.meta.url);
44211
+ const __dirname = (0,node_path__WEBPACK_IMPORTED_MODULE_2__.dirname)(__filename);
44212
+ const pkg = JSON.parse((0,node_fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync)((0,node_path__WEBPACK_IMPORTED_MODULE_2__.join)(__dirname, "../package.json"), "utf-8"));
44201
44213
  const PROGRAM_NAME = "sith";
44202
44214
  const PROGRAM_VERSION = pkg.version;
44203
44215
  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.";
@@ -44225,7 +44237,7 @@ async function checkForUpdates() {
44225
44237
  }
44226
44238
  }
44227
44239
  function createProgram() {
44228
- const program = new commander__WEBPACK_IMPORTED_MODULE_3__/* .Command */ .uB();
44240
+ const program = new commander__WEBPACK_IMPORTED_MODULE_4__/* .Command */ .uB();
44229
44241
  program
44230
44242
  .name(PROGRAM_NAME)
44231
44243
  .description(PROGRAM_DESCRIPTION)
@@ -44300,7 +44312,7 @@ function createProgram() {
44300
44312
  .action(async (options) => {
44301
44313
  const token = await (0,_utils_githubToken_js__WEBPACK_IMPORTED_MODULE_12__/* .getGitHubToken */ .l)();
44302
44314
  const args = (0,_utils_dockerArgs_js__WEBPACK_IMPORTED_MODULE_9__/* .buildDockerOpencodeCommand */ .Xs)(token, options.prompt);
44303
- (0,node_child_process__WEBPACK_IMPORTED_MODULE_4__.spawnSync)("docker", args, { stdio: "inherit" });
44315
+ (0,node_child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync)("docker", args, { stdio: "inherit" });
44304
44316
  });
44305
44317
  // Claude command - launch Claude Code in Docker
44306
44318
  program
@@ -44310,7 +44322,7 @@ function createProgram() {
44310
44322
  .action(async (options) => {
44311
44323
  const token = await (0,_utils_githubToken_js__WEBPACK_IMPORTED_MODULE_12__/* .getGitHubToken */ .l)();
44312
44324
  const args = (0,_utils_dockerArgs_js__WEBPACK_IMPORTED_MODULE_9__/* .buildDockerClaudeCodeCommand */ .fn)(token, options.prompt);
44313
- (0,node_child_process__WEBPACK_IMPORTED_MODULE_4__.spawnSync)("docker", args, { stdio: "inherit" });
44325
+ (0,node_child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync)("docker", args, { stdio: "inherit" });
44314
44326
  });
44315
44327
  return program;
44316
44328
  }
package/docker/Dockerfile CHANGED
@@ -2,7 +2,7 @@
2
2
  # Version 2.3.0 - Multi-stage build with non-root user and improved security
3
3
  #
4
4
  # Build: docker build -t sith:latest .
5
- # Run: docker run -v $(pwd):/workspace -e GITHUB_TOKEN=$GITHUB_TOKEN sith:latest analyze
5
+ # Run: docker run -v $(pwd):/workspace -e GITHUB_TOKEN=$GITHUB_TOKEN -e CLAUDE_CODE_OAUTH_TOKEN=$CLAUDE_CODE_OAUTH_TOKEN sith:latest analyze
6
6
 
7
7
  # ============================================================================
8
8
  # Stage 1: Builder - Setup environment and install dependencies
@@ -85,6 +85,7 @@ RUN echo "registry=https://registry.npmjs.org/" > /home/sith/.npmrc && \
85
85
  ENV OPENCODE_MODEL=github-copilot/claude-sonnet-4.5
86
86
  ENV OPENCODE_LOG_LEVEL=INFO
87
87
  ENV NODE_ENV=production
88
+ ENV CLAUDE_CODE_OAUTH_TOKEN=""
88
89
  ENV PATH="/root/.opencode/bin:/root/.local/bin:/root/.npm-global/bin:${PATH}"
89
90
  ENV NPM_CONFIG_PREFIX=/root/.npm-global
90
91
  ENV HOME=/root
@@ -4,6 +4,7 @@
4
4
  export OPENCODE_MODEL="${OPENCODE_MODEL:-github-copilot/claude-sonnet-4.5}"
5
5
  export OPENCODE_LOG_LEVEL="${OPENCODE_LOG_LEVEL:-INFO}"
6
6
  export NODE_ENV="${NODE_ENV:-production}"
7
+ export CLAUDE_CODE_OAUTH_TOKEN="${CLAUDE_CODE_OAUTH_TOKEN:-}"
7
8
 
8
9
  # Chemins personnalisés
9
10
  export PATH="/root/.opencode/bin:$PATH"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m14i/sith",
3
- "version": "1.18.0",
3
+ "version": "1.19.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": {