@m14i/sith 1.20.0 → 1.21.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/index.js CHANGED
@@ -44432,7 +44432,7 @@ function buildDockerClaudeCodeCommand(githubToken, prompt, claudeOauthToken) {
44432
44432
  let claudeCommand = "source /opt/sith/nix/nix-scripts/setup.sh && cd /workspace && /root/.npm-global/bin/claude";
44433
44433
  if (prompt) {
44434
44434
  const escapedPrompt = prompt.replace(/'/g, "'\\''");
44435
- claudeCommand += ` -p '${escapedPrompt}'`;
44435
+ claudeCommand += ` '${escapedPrompt}'`;
44436
44436
  }
44437
44437
  args.push(claudeCommand);
44438
44438
  return args;
package/docker/Dockerfile CHANGED
@@ -67,6 +67,13 @@ COPY --from=builder /root/.opencode /root/.opencode
67
67
  COPY --from=builder /root/.npm-global /root/.npm-global
68
68
  COPY --from=builder /root/.npmrc /root/.npmrc
69
69
 
70
+ # Bake default Claude Code config (theme, permissions, caveman mode)
71
+ COPY docker/claude-defaults/ /root/.claude/
72
+
73
+ # Entrypoint script: generates .credentials.json from CLAUDE_CODE_OAUTH_TOKEN before nix-shell
74
+ COPY docker/entrypoint.sh /opt/sith/entrypoint.sh
75
+ RUN chmod +x /opt/sith/entrypoint.sh
76
+
70
77
  # Créer un utilisateur non-root pour l'exécution
71
78
  RUN mkdir -p /home/sith && \
72
79
  echo "sith:x:1000:1000:Sith User:/home/sith:/bin/sh" >> /etc/passwd && \
@@ -86,6 +93,8 @@ ENV OPENCODE_MODEL=github-copilot/claude-sonnet-4.5
86
93
  ENV OPENCODE_LOG_LEVEL=INFO
87
94
  ENV NODE_ENV=production
88
95
  ENV CLAUDE_CODE_OAUTH_TOKEN=""
96
+ ENV IS_DEMO=1
97
+ ENV CLAUDE_CONFIG_DIR=/root/.claude
89
98
  ENV PATH="/root/.opencode/bin:/root/.local/bin:/root/.npm-global/bin:${PATH}"
90
99
  ENV NPM_CONFIG_PREFIX=/root/.npm-global
91
100
  ENV HOME=/root
@@ -106,8 +115,8 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
106
115
  # Répertoire de travail pour les projets
107
116
  WORKDIR /workspace
108
117
 
109
- # Point d'entrée via nix-shell
110
- ENTRYPOINT ["nix-shell", "/opt/sith/nix/shell.nix", "--run"]
118
+ # Point d'entrée: génère .credentials.json puis lance nix-shell
119
+ ENTRYPOINT ["/opt/sith/entrypoint.sh"]
111
120
 
112
121
  # Commande par défaut
113
122
  CMD ["opencode --help"]
@@ -0,0 +1,10 @@
1
+ {
2
+ "firstStartTime": "2025-01-01T00:00:00.000Z",
3
+ "opusProMigrationComplete": true,
4
+ "sonnet1m45MigrationComplete": true,
5
+ "seenNotifications": {},
6
+ "migrationVersion": 13,
7
+ "hasCompletedOnboarding": true,
8
+ "theme": "dark",
9
+ "userID": "069fb867041624d227d787be4b08e8c6c165f945083ffdcc91a933153e9bc18e"
10
+ }
@@ -0,0 +1,25 @@
1
+ CAVEMAN MODE ACTIVE — level: ultra
2
+
3
+ Respond terse like smart caveman. All technical substance stay. Only fluff die.
4
+
5
+ ## Persistence
6
+
7
+ ACTIVE EVERY RESPONSE. No revert after many turns. No filler drift. Still active if unsure. Off only: "stop caveman" / "normal mode".
8
+
9
+ ## Rules
10
+
11
+ Drop: articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries (sure/certainly/of course/happy to), hedging. Fragments OK. Short synonyms (big not extensive, fix not "implement a solution for"). Technical terms exact. Code blocks unchanged. Errors quoted exact.
12
+
13
+ Pattern: `[thing] [action] [reason]. [next step].`
14
+
15
+ ## Ultra level
16
+
17
+ Abbreviate (DB/auth/config/req/res/fn/impl), strip conjunctions, arrows for causality (X → Y), one word when one word enough.
18
+
19
+ ## Auto-Clarity
20
+
21
+ Drop caveman for: security warnings, irreversible action confirmations, multi-step sequences where fragment order risks misread. Resume caveman after clear part done.
22
+
23
+ ## Boundaries
24
+
25
+ Code/commits/PRs: write normal. "stop caveman" or "normal mode": revert.
@@ -0,0 +1,10 @@
1
+ {
2
+ "theme": "dark",
3
+ "verbose": true,
4
+ "dangerouslySkipPermissions": true,
5
+ "skipDangerousModePermissionPrompt": true,
6
+ "hasCompletedOnboarding": true,
7
+ "permissions": {
8
+ "allow": ["Bash(*)", "Read(*)", "Write(*)", "Edit(*)", "WebFetch(*)", "WebSearch(*)", "Agent(*)"]
9
+ }
10
+ }
@@ -0,0 +1,10 @@
1
+ #!/bin/sh
2
+ # Generate .credentials.json from CLAUDE_CODE_OAUTH_TOKEN if present and not already authenticated
3
+ if [ -n "$CLAUDE_CODE_OAUTH_TOKEN" ] && [ ! -f /root/.claude/.credentials.json ]; then
4
+ mkdir -p /root/.claude
5
+ printf '{"claudeAiOauth":{"accessToken":"%s","expiresAt":4102444800000}}\n' "$CLAUDE_CODE_OAUTH_TOKEN" \
6
+ > /root/.claude/.credentials.json
7
+ chmod 600 /root/.claude/.credentials.json
8
+ fi
9
+
10
+ exec nix-shell /opt/sith/nix/shell.nix --run "$@"
@@ -5,6 +5,15 @@ 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
7
  export CLAUDE_CODE_OAUTH_TOKEN="${CLAUDE_CODE_OAUTH_TOKEN:-}"
8
+ export IS_DEMO="${IS_DEMO:-1}"
9
+
10
+ # Generate .credentials.json from token so interactive claude skips login wizard
11
+ if [ -n "$CLAUDE_CODE_OAUTH_TOKEN" ] && [ ! -f /root/.claude/.credentials.json ]; then
12
+ mkdir -p /root/.claude
13
+ printf '{"claudeAiOauth":{"accessToken":"%s","expiresAt":4102444800000}}\n' "$CLAUDE_CODE_OAUTH_TOKEN" \
14
+ > /root/.claude/.credentials.json
15
+ chmod 600 /root/.claude/.credentials.json
16
+ fi
8
17
 
9
18
  # Chemins personnalisés
10
19
  export PATH="/root/.opencode/bin:$PATH"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m14i/sith",
3
- "version": "1.20.0",
3
+ "version": "1.21.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": {