Skip to content

Commit 01f1edb

Browse files
committed
Initial release: Phantom v0.16.2 - an AI co-worker with its own computer
0 parents  commit 01f1edb

240 files changed

Lines changed: 34084 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules
2+
.git
3+
.env
4+
.env.*
5+
!.env.example
6+
data/
7+
repos/
8+
local/
9+
*.log
10+
*.db
11+
*.db-wal
12+
*.db-shm
13+
.DS_Store
14+
bun.lockb

.env.example

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Phantom Configuration
2+
# Copy this file to .env and fill in your values:
3+
# cp .env.example .env
4+
5+
# ========================
6+
# REQUIRED
7+
# ========================
8+
9+
# Your Anthropic API key (starts with sk-ant-)
10+
ANTHROPIC_API_KEY=
11+
12+
# ========================
13+
# OPTIONAL: Slack
14+
# ========================
15+
# Create a Slack app: see docs/slack-setup.md or use the manifest at slack-app-manifest.yaml
16+
17+
# Slack bot token (starts with xoxb-)
18+
# SLACK_BOT_TOKEN=
19+
20+
# Slack app token for Socket Mode (starts with xapp-)
21+
# SLACK_APP_TOKEN=
22+
23+
# Default Slack channel ID for intro messages (starts with C)
24+
# SLACK_CHANNEL_ID=
25+
26+
# Owner's Slack user ID (starts with U) - only this user can talk to Phantom
27+
# SLACK_USER_ID=
28+
29+
# ========================
30+
# OPTIONAL: Identity
31+
# ========================
32+
33+
# Agent name (default: phantom)
34+
# PHANTOM_NAME=phantom
35+
36+
# Agent role (default: swe). Options: swe, base
37+
# PHANTOM_ROLE=swe
38+
39+
# Claude model for the agent brain.
40+
# Options:
41+
# claude-sonnet-4-6 - Fast, capable, lower cost (default, recommended)
42+
# claude-opus-4-6 - Most capable, higher cost
43+
# PHANTOM_MODEL=claude-sonnet-4-6
44+
45+
# Domain for public URL (e.g., ghostwright.dev)
46+
# PHANTOM_DOMAIN=
47+
48+
# ========================
49+
# OPTIONAL: Ports
50+
# ========================
51+
52+
# HTTP server port (default: 3100)
53+
# PORT=3100
54+
55+
# ========================
56+
# OPTIONAL: Memory
57+
# ========================
58+
59+
# Qdrant URL (default: http://qdrant:6333 in Docker, http://localhost:6333 on bare metal)
60+
# QDRANT_URL=http://qdrant:6333
61+
62+
# Ollama URL (default: http://ollama:11434 in Docker, http://localhost:11434 on bare metal)
63+
# OLLAMA_URL=http://ollama:11434
64+
65+
# Embedding model (default: nomic-embed-text)
66+
# EMBEDDING_MODEL=nomic-embed-text
67+
68+
# ========================
69+
# OPTIONAL: Docker
70+
# ========================
71+
72+
# Docker group ID on the host. The Phantom container needs this to access
73+
# the Docker socket for creating sibling containers.
74+
# Find yours with:
75+
# Linux: stat -c '%g' /var/run/docker.sock
76+
# macOS: stat -f '%g' /var/run/docker.sock
77+
# Default 988 works for most Hetzner and cloud VMs.
78+
# DOCKER_GID=988
79+
80+
# ========================
81+
# OPTIONAL: Email (Resend)
82+
# ========================
83+
# Resend API key for sending email. If set, the agent can send email as
84+
# {PHANTOM_NAME}@ghostwright.dev (or {PHANTOM_NAME}@{PHANTOM_DOMAIN}).
85+
# Get a key at: https://resend.com/api-keys
86+
# RESEND_API_KEY=
87+
88+
# Maximum emails per day (default: 50)
89+
# PHANTOM_EMAIL_DAILY_LIMIT=50
90+
91+
# ========================
92+
# OPTIONAL: Secret Encryption
93+
# ========================
94+
# 64-character hex string (32 bytes) for encrypting stored credentials.
95+
# If not set, a key is auto-generated and saved to data/secret-encryption-key.
96+
# Generate one with: openssl rand -hex 32
97+
# SECRET_ENCRYPTION_KEY=
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Bug Report
3+
about: Something is broken or not working as expected
4+
title: ""
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
## Description
10+
11+
A clear description of the bug.
12+
13+
## Steps to Reproduce
14+
15+
1. ...
16+
2. ...
17+
3. ...
18+
19+
## Expected Behavior
20+
21+
What you expected to happen.
22+
23+
## Actual Behavior
24+
25+
What actually happened.
26+
27+
## Environment
28+
29+
- **OS:** (e.g., Ubuntu 24.04, macOS 15)
30+
- **Docker version:** (run `docker --version`)
31+
- **Phantom version:** (check `http://localhost:3100/health` or `package.json`)
32+
- **Deployment method:** Docker / bare metal
33+
- **Model:** (e.g., Opus 4.6)
34+
35+
## Logs
36+
37+
Paste relevant log output. For Docker deployments:
38+
39+
```bash
40+
docker logs phantom --tail 50
41+
```
42+
43+
For bare metal:
44+
45+
```bash
46+
# Check the process output or journalctl if using systemd
47+
```
48+
49+
## Additional Context
50+
51+
Any other information that might help: screenshots, config snippets (with secrets removed), or links to related issues.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an improvement or new capability
4+
title: ""
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
## Description
10+
11+
A clear description of the feature you would like.
12+
13+
## Use Case
14+
15+
Why do you need this? What problem does it solve? What workflow does it improve?
16+
17+
The more context you give about your situation, the better we can design a solution that works.
18+
19+
## Proposed Solution
20+
21+
If you have a specific approach in mind, describe it here. This is optional. We are happy to figure out the implementation together.
22+
23+
## Alternatives Considered
24+
25+
Have you tried other approaches or workarounds? What worked, what did not?
26+
27+
## Additional Context
28+
29+
Any other information: screenshots, links to related projects, examples from other tools.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## What Changed
2+
3+
Describe what this PR does. Be specific.
4+
5+
## Why
6+
7+
What problem does this solve? Link to an issue if there is one.
8+
9+
## How I Tested
10+
11+
Describe how you verified this works. Include commands you ran, scenarios you tested, or screenshots if relevant.
12+
13+
## Checklist
14+
15+
- [ ] Tests pass (`bun test`)
16+
- [ ] Lint passes (`bun run lint`)
17+
- [ ] Typecheck passes (`bun run typecheck`)
18+
- [ ] No secrets or `.env` files included
19+
- [ ] Files stay under 300 lines
20+
- [ ] No Cardinal Rule violations (TypeScript does plumbing only, the Agent SDK does reasoning)
21+
- [ ] No default exports or barrel files added
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Build and Publish Docker Image
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
concurrency:
9+
group: docker-publish
10+
cancel-in-progress: false
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build-and-push:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Set up QEMU
24+
uses: docker/setup-qemu-action@v3
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
29+
- name: Login to Docker Hub
30+
uses: docker/login-action@v3
31+
with:
32+
username: ${{ secrets.DOCKERHUB_USERNAME }}
33+
password: ${{ secrets.DOCKERHUB_TOKEN }}
34+
35+
- name: Extract metadata
36+
id: meta
37+
uses: docker/metadata-action@v5
38+
with:
39+
images: ghostwright/phantom
40+
# latest=auto only applies "latest" for stable semver (not prereleases)
41+
flavor: |
42+
latest=auto
43+
tags: |
44+
type=semver,pattern={{version}}
45+
type=semver,pattern={{major}}.{{minor}}
46+
type=sha,prefix=sha-
47+
48+
- name: Build and push
49+
id: build
50+
uses: docker/build-push-action@v6
51+
with:
52+
context: .
53+
push: true
54+
platforms: linux/amd64,linux/arm64
55+
tags: ${{ steps.meta.outputs.tags }}
56+
labels: ${{ steps.meta.outputs.labels }}
57+
provenance: false
58+
cache-from: type=gha
59+
cache-to: type=gha,mode=max
60+
61+
- name: Verify image
62+
run: |
63+
# Pull and run a basic sanity check on the amd64 image.
64+
# Multi-arch manifests are already pushed, so the default
65+
# platform (amd64 on ubuntu-latest) will be selected.
66+
VERSION="${GITHUB_REF_NAME#v}"
67+
docker pull --quiet ghostwright/phantom:${VERSION}
68+
docker run --rm ghostwright/phantom:${VERSION} bun --version
69+
echo "Verification passed for ghostwright/phantom:${VERSION}"

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules/
2+
dist/
3+
data/
4+
.env.*
5+
.env.local
6+
.env
7+
local/
8+
*.log
9+
*.db
10+
*.db-wal
11+
*.db-shm
12+
.DS_Store
13+
bun.lockb
14+
HANDOFFS.md

0 commit comments

Comments
 (0)