create-ironclaws 1.0.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.
Files changed (80) hide show
  1. package/README.md +101 -0
  2. package/bin/create.js +394 -0
  3. package/package.json +33 -0
  4. package/template/.env.example +38 -0
  5. package/template/CLAUDE.md +104 -0
  6. package/template/agent-credentials.yaml +33 -0
  7. package/template/agents.yaml +22 -0
  8. package/template/container/Dockerfile +70 -0
  9. package/template/container/Dockerfile.argus +34 -0
  10. package/template/container/agent-runner/package-lock.json +1524 -0
  11. package/template/container/agent-runner/package.json +23 -0
  12. package/template/container/agent-runner/src/index.ts +630 -0
  13. package/template/container/agent-runner/src/ipc-mcp-stdio.ts +339 -0
  14. package/template/container/agent-runner/tsconfig.json +15 -0
  15. package/template/container/build-argus.sh +25 -0
  16. package/template/container/build.sh +23 -0
  17. package/template/container/skills/agent-browser/SKILL.md +159 -0
  18. package/template/container/skills/agent-status/SKILL.md +69 -0
  19. package/template/container/skills/capabilities/SKILL.md +100 -0
  20. package/template/container/skills/edit-agent/SKILL.md +93 -0
  21. package/template/container/skills/slack-formatting/SKILL.md +92 -0
  22. package/template/container/skills/status/SKILL.md +104 -0
  23. package/template/container/tools/elastic_query.py +161 -0
  24. package/template/container/tools/gdrive_tool.py +185 -0
  25. package/template/container/tools/jira_tool.py +433 -0
  26. package/template/container/tools/slack_history_tool.py +144 -0
  27. package/template/container/tools/youtube_tool.py +174 -0
  28. package/template/docker-compose.yml +54 -0
  29. package/template/docs/how-it-works.md +496 -0
  30. package/template/eslint.config.js +32 -0
  31. package/template/groups/forge/CLAUDE.md +107 -0
  32. package/template/package-lock.json +5278 -0
  33. package/template/package.json +52 -0
  34. package/template/scripts/github-app-token.py +58 -0
  35. package/template/scripts/register-expense-agent.sh +121 -0
  36. package/template/scripts/run-migrations.ts +105 -0
  37. package/template/scripts/setup-onecli-secrets.sh +252 -0
  38. package/template/setup-agents.sh +142 -0
  39. package/template/src/channels/index.ts +13 -0
  40. package/template/src/channels/registry.test.ts +42 -0
  41. package/template/src/channels/registry.ts +28 -0
  42. package/template/src/channels/slack.test.ts +859 -0
  43. package/template/src/channels/slack.ts +373 -0
  44. package/template/src/claw-skill.test.ts +45 -0
  45. package/template/src/config.ts +94 -0
  46. package/template/src/container-runner.test.ts +221 -0
  47. package/template/src/container-runner.ts +1029 -0
  48. package/template/src/container-runtime.test.ts +149 -0
  49. package/template/src/container-runtime.ts +124 -0
  50. package/template/src/db-migration.test.ts +67 -0
  51. package/template/src/db.test.ts +484 -0
  52. package/template/src/db.ts +837 -0
  53. package/template/src/env.ts +42 -0
  54. package/template/src/formatting.test.ts +294 -0
  55. package/template/src/github-token.ts +48 -0
  56. package/template/src/google-token.ts +75 -0
  57. package/template/src/group-folder.test.ts +43 -0
  58. package/template/src/group-folder.ts +44 -0
  59. package/template/src/group-queue.test.ts +484 -0
  60. package/template/src/group-queue.ts +363 -0
  61. package/template/src/http-server.ts +343 -0
  62. package/template/src/index.ts +960 -0
  63. package/template/src/ipc-auth.test.ts +679 -0
  64. package/template/src/ipc.ts +548 -0
  65. package/template/src/logger.ts +16 -0
  66. package/template/src/mount-security.ts +421 -0
  67. package/template/src/network-policy.ts +119 -0
  68. package/template/src/remote-control.test.ts +397 -0
  69. package/template/src/remote-control.ts +224 -0
  70. package/template/src/router.ts +52 -0
  71. package/template/src/routing.test.ts +170 -0
  72. package/template/src/sender-allowlist.test.ts +216 -0
  73. package/template/src/sender-allowlist.ts +128 -0
  74. package/template/src/task-scheduler.test.ts +129 -0
  75. package/template/src/task-scheduler.ts +290 -0
  76. package/template/src/timezone.test.ts +73 -0
  77. package/template/src/timezone.ts +37 -0
  78. package/template/src/types.ts +114 -0
  79. package/template/src/worktree.ts +206 -0
  80. package/template/tsconfig.json +20 -0
@@ -0,0 +1,33 @@
1
+ # agent-credentials.yaml — Security scope for each agent.
2
+ #
3
+ # Controls what each agent is allowed to see inside its container:
4
+ # config: env vars forwarded from .env (no secrets by default)
5
+ # skills: SKILL.md files available (dangerous skills must be explicitly opted in)
6
+ # tools: Python scripts mounted at /workspace/extra/tools/
7
+ #
8
+ # Dangerous skills (edit-agent, agent-browser, agent-status) are NOT in common —
9
+ # they must be explicitly listed per-agent.
10
+
11
+ common:
12
+ skills:
13
+ - capabilities
14
+ - status
15
+ - slack-formatting
16
+ tools: []
17
+ config:
18
+ - ANTHROPIC_BASE_URL
19
+ - ANTHROPIC_BEDROCK_BASE_URL
20
+ - ANTHROPIC_MODEL
21
+ - ANTHROPIC_SMALL_FAST_MODEL
22
+ - ANTHROPIC_DEFAULT_SONNET_MODEL
23
+ - ANTHROPIC_DEFAULT_HAIKU_MODEL
24
+ - ANTHROPIC_DEFAULT_OPUS_MODEL
25
+ - CLAUDE_CODE_USE_BEDROCK
26
+ - CLAUDE_CODE_SKIP_BEDROCK_AUTH
27
+ - CLAUDE_CODE_API_KEY_HELPER_TTL_MS
28
+
29
+ agents:
30
+ forge:
31
+ skills: []
32
+ tools: []
33
+ config: []
@@ -0,0 +1,22 @@
1
+ # agents.yaml — Your agent fleet.
2
+ #
3
+ # Add an entry here for each agent. Set the corresponding channel ID env var
4
+ # in .env — IronClaws auto-registers agents on startup.
5
+ #
6
+ # Fields:
7
+ # folder: Group folder name (under groups/)
8
+ # name: Display name shown in Slack
9
+ # trigger: Trigger word (e.g. "@Argus")
10
+ # channel_env: Env var holding the Slack channel ID (set in .env)
11
+ # requires_trigger: Whether the agent waits for the trigger word (default: false)
12
+ # onecli_secrets: Secrets to link in OneCLI (auto-registered on startup)
13
+ # onecli_id: Stable UUID — generate with: python3 -c "import uuid; print(uuid.uuid4())"
14
+
15
+ agents:
16
+ - folder: forge
17
+ name: "Forge"
18
+ trigger: "@Forge"
19
+ channel_env: FORGE_CHANNEL_ID
20
+ requires_trigger: false
21
+ onecli_secrets: [litellm]
22
+ onecli_id: 00000000-0000-0000-0000-000000000001
@@ -0,0 +1,70 @@
1
+ # NanoClaw Agent Container
2
+ # Runs Claude Agent SDK in isolated Linux VM with browser automation
3
+
4
+ FROM node:22-slim
5
+
6
+ # Install system dependencies for Chromium
7
+ RUN apt-get update && apt-get install -y \
8
+ chromium \
9
+ fonts-liberation \
10
+ fonts-noto-cjk \
11
+ fonts-noto-color-emoji \
12
+ libgbm1 \
13
+ libnss3 \
14
+ libatk-bridge2.0-0 \
15
+ libgtk-3-0 \
16
+ libx11-xcb1 \
17
+ libxcomposite1 \
18
+ libxdamage1 \
19
+ libxrandr2 \
20
+ libasound2 \
21
+ libpangocairo-1.0-0 \
22
+ libcups2 \
23
+ libdrm2 \
24
+ libxshmfence1 \
25
+ curl \
26
+ git \
27
+ && rm -rf /var/lib/apt/lists/*
28
+
29
+ # Set Chromium path for agent-browser
30
+ ENV AGENT_BROWSER_EXECUTABLE_PATH=/usr/bin/chromium
31
+ ENV PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium
32
+
33
+ # Install agent-browser and claude-code globally
34
+ RUN npm install -g agent-browser @anthropic-ai/claude-code
35
+
36
+ # Create app directory
37
+ WORKDIR /app
38
+
39
+ # Copy package files first for better caching
40
+ COPY agent-runner/package*.json ./
41
+
42
+ # Install dependencies
43
+ RUN npm install
44
+
45
+ # Copy source code
46
+ COPY agent-runner/ ./
47
+
48
+ # Build TypeScript
49
+ RUN npm run build
50
+
51
+ # Create workspace directories
52
+ RUN mkdir -p /workspace/group /workspace/global /workspace/extra /workspace/ipc/messages /workspace/ipc/tasks /workspace/ipc/input
53
+
54
+ # Create entrypoint script
55
+ # Container input (prompt, group info) is passed via stdin JSON.
56
+ # Credentials are injected by the host's credential proxy — never passed here.
57
+ # Follow-up messages arrive via IPC files in /workspace/ipc/input/
58
+ RUN printf '#!/bin/bash\nset -e\ncd /app && npx tsc --outDir /tmp/dist 2>&1 >&2\nln -s /app/node_modules /tmp/dist/node_modules\nchmod -R a-w /tmp/dist\ncat > /tmp/input.json\nnode /tmp/dist/index.js < /tmp/input.json\n' > /app/entrypoint.sh && chmod +x /app/entrypoint.sh
59
+
60
+ # Set ownership to node user (non-root) for writable directories
61
+ RUN chown -R node:node /workspace && chmod 777 /home/node
62
+
63
+ # Switch to non-root user (required for --dangerously-skip-permissions)
64
+ USER node
65
+
66
+ # Set working directory to group workspace
67
+ WORKDIR /workspace/group
68
+
69
+ # Entry point reads JSON from stdin, outputs JSON to stdout
70
+ ENTRYPOINT ["/app/entrypoint.sh"]
@@ -0,0 +1,34 @@
1
+ # Argus Claude Agent Container
2
+ # Extends the NanoClaw agent image with Python, Poetry, gh CLI, and moon
3
+ # so Claude's Bash tool can run poetry lock, gh pr create, moon lint, etc.
4
+ #
5
+ # Build the base image first: ./container/build.sh
6
+ # Then build this image: ./container/build-argus.sh
7
+
8
+ FROM nanoclaw-agent:latest
9
+
10
+ USER root
11
+
12
+ # Python 3 + pip (requests needed by elastic_query.py)
13
+ RUN apt-get update && apt-get install -y python3 python3-pip && rm -rf /var/lib/apt/lists/*
14
+ RUN pip3 install requests youtube-transcript-api markdownify --break-system-packages
15
+
16
+ # Poetry
17
+ RUN pip3 install poetry --break-system-packages
18
+
19
+ # gh CLI
20
+ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
21
+ | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg 2>/dev/null && \
22
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] \
23
+ https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \
24
+ apt-get update && apt-get install -y gh && rm -rf /var/lib/apt/lists/*
25
+
26
+ # moon task runner
27
+ RUN npm install -g @moonrepo/cli
28
+
29
+ # Argus tools — baked into the image, no repo mount needed
30
+ COPY tools/ /workspace/extra/tools/
31
+ RUN chown -R node:node /workspace/extra/tools && chmod -R 755 /workspace/extra/tools
32
+
33
+ USER node
34
+ WORKDIR /workspace/group