@radnine/claude-session-daemon 0.2.7 → 0.2.9

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/.dockerignore ADDED
@@ -0,0 +1,6 @@
1
+ node_modules/
2
+ test/
3
+ .git/
4
+ .env*
5
+ .dockerignore
6
+ Dockerfile
package/Dockerfile ADDED
@@ -0,0 +1,34 @@
1
+ FROM node:20-slim
2
+
3
+ # Install Claude CLI globally (unpinned — always latest)
4
+ RUN npm install -g @anthropic-ai/claude-code
5
+
6
+ # Create workspace mount point
7
+ RUN mkdir -p /workspace
8
+
9
+ WORKDIR /app
10
+
11
+ # Copy dependency manifest first for layer caching
12
+ COPY package.json ./
13
+ RUN npm install --omit=dev
14
+
15
+ # Copy daemon source
16
+ COPY src/ ./src/
17
+
18
+ # Copy entrypoint
19
+ COPY docker-entrypoint.sh /usr/local/bin/
20
+ RUN chmod +x /usr/local/bin/docker-entrypoint.sh
21
+
22
+ # Default environment for standalone Docker usage
23
+ ENV CLAUDE_DAEMON_MODE=standalone \
24
+ CLAUDE_WORKING_DIR=/workspace \
25
+ CLAUDE_DAEMON_PORT=3001
26
+
27
+ EXPOSE 3001
28
+
29
+ # Health check using Node.js TCP probe (no curl in slim image)
30
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
31
+ CMD node -e "const s=require('net').createConnection({port:process.env.CLAUDE_DAEMON_PORT||3001},()=>{s.end();process.exit(0)});s.on('error',()=>process.exit(1))"
32
+
33
+ ENTRYPOINT ["docker-entrypoint.sh"]
34
+ CMD ["node", "src/index.js"]
package/README.md CHANGED
@@ -32,7 +32,6 @@ Docker runs Claude inside a container with filesystem isolation. Claude can only
32
32
  ```yaml
33
33
  services:
34
34
  claude-daemon:
35
- image: ghcr.io/radixhound/claude-daemon:latest
36
35
  build:
37
36
  context: ./node_modules/@radnine/claude-session-daemon
38
37
  ports:
@@ -0,0 +1,24 @@
1
+ #!/bin/sh
2
+ set -e
3
+
4
+ # Validate required environment
5
+ if [ -z "$ANTHROPIC_API_KEY" ]; then
6
+ echo "ERROR: ANTHROPIC_API_KEY is required but not set." >&2
7
+ echo "Set it in .env or pass via: docker compose run -e ANTHROPIC_API_KEY=sk-... claude-daemon" >&2
8
+ exit 1
9
+ fi
10
+
11
+ # Validate workspace directory exists
12
+ if [ ! -d "$CLAUDE_WORKING_DIR" ] && [ ! -d "/workspace" ]; then
13
+ echo "ERROR: Workspace directory not found. Mount your project with -v .:/workspace" >&2
14
+ exit 1
15
+ fi
16
+
17
+ # Validate claude CLI is available
18
+ if ! command -v claude >/dev/null 2>&1; then
19
+ echo "ERROR: claude CLI not found in PATH." >&2
20
+ exit 1
21
+ fi
22
+
23
+ # Use exec so signals propagate directly to the Node process
24
+ exec "$@"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radnine/claude-session-daemon",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "Node.js daemon for managing Claude CLI sessions",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -14,7 +14,10 @@
14
14
  },
15
15
  "files": [
16
16
  "src/**",
17
- "LICENSE"
17
+ "LICENSE",
18
+ "Dockerfile",
19
+ "docker-entrypoint.sh",
20
+ ".dockerignore"
18
21
  ],
19
22
  "scripts": {
20
23
  "start": "node src/index.js",