agentsite 0.0.1__tar.gz
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.
- agentsite-0.0.1/.dockerignore +14 -0
- agentsite-0.0.1/.env.copy +29 -0
- agentsite-0.0.1/.github/workflows/dev.yml +101 -0
- agentsite-0.0.1/.github/workflows/publish.yml +148 -0
- agentsite-0.0.1/.gitignore +214 -0
- agentsite-0.0.1/CLAUDE.md +105 -0
- agentsite-0.0.1/Dockerfile +13 -0
- agentsite-0.0.1/PKG-INFO +309 -0
- agentsite-0.0.1/PROMPTURE_FIX.md +95 -0
- agentsite-0.0.1/PROMPTURE_FIX_PLAN.md +116 -0
- agentsite-0.0.1/README.md +280 -0
- agentsite-0.0.1/VERSION +1 -0
- agentsite-0.0.1/agentsite/__init__.py +3 -0
- agentsite-0.0.1/agentsite/_version.py +34 -0
- agentsite-0.0.1/agentsite/agents/__init__.py +20 -0
- agentsite-0.0.1/agentsite/agents/designer.py +20 -0
- agentsite-0.0.1/agentsite/agents/developer.py +27 -0
- agentsite-0.0.1/agentsite/agents/orchestrator.py +228 -0
- agentsite-0.0.1/agentsite/agents/personas.py +115 -0
- agentsite-0.0.1/agentsite/agents/pm.py +20 -0
- agentsite-0.0.1/agentsite/agents/reviewer.py +22 -0
- agentsite-0.0.1/agentsite/agents/tools.py +75 -0
- agentsite-0.0.1/agentsite/api/__init__.py +1 -0
- agentsite-0.0.1/agentsite/api/app.py +103 -0
- agentsite-0.0.1/agentsite/api/deps.py +74 -0
- agentsite-0.0.1/agentsite/api/routes/__init__.py +1 -0
- agentsite-0.0.1/agentsite/api/routes/agents.py +61 -0
- agentsite-0.0.1/agentsite/api/routes/assets.py +33 -0
- agentsite-0.0.1/agentsite/api/routes/generate.py +205 -0
- agentsite-0.0.1/agentsite/api/routes/models.py +97 -0
- agentsite-0.0.1/agentsite/api/routes/preview.py +139 -0
- agentsite-0.0.1/agentsite/api/routes/projects.py +236 -0
- agentsite-0.0.1/agentsite/api/routes/providers.py +140 -0
- agentsite-0.0.1/agentsite/api/websocket.py +67 -0
- agentsite-0.0.1/agentsite/cli.py +151 -0
- agentsite-0.0.1/agentsite/config.py +43 -0
- agentsite-0.0.1/agentsite/engine/__init__.py +7 -0
- agentsite-0.0.1/agentsite/engine/asset_handler.py +52 -0
- agentsite-0.0.1/agentsite/engine/gemini_patch.py +169 -0
- agentsite-0.0.1/agentsite/engine/pipeline.py +562 -0
- agentsite-0.0.1/agentsite/engine/project_manager.py +181 -0
- agentsite-0.0.1/agentsite/models.py +209 -0
- agentsite-0.0.1/agentsite/storage/__init__.py +6 -0
- agentsite-0.0.1/agentsite/storage/database.py +193 -0
- agentsite-0.0.1/agentsite/storage/repository.py +507 -0
- agentsite-0.0.1/agentsite.egg-info/PKG-INFO +309 -0
- agentsite-0.0.1/agentsite.egg-info/SOURCES.txt +121 -0
- agentsite-0.0.1/agentsite.egg-info/dependency_links.txt +1 -0
- agentsite-0.0.1/agentsite.egg-info/entry_points.txt +2 -0
- agentsite-0.0.1/agentsite.egg-info/requires.txt +20 -0
- agentsite-0.0.1/agentsite.egg-info/top_level.txt +1 -0
- agentsite-0.0.1/docker-compose.yml +14 -0
- agentsite-0.0.1/frontend/index.html +18 -0
- agentsite-0.0.1/frontend/package-lock.json +2481 -0
- agentsite-0.0.1/frontend/package.json +25 -0
- agentsite-0.0.1/frontend/src/App.jsx +39 -0
- agentsite-0.0.1/frontend/src/api/agents.js +20 -0
- agentsite-0.0.1/frontend/src/api/assets.js +17 -0
- agentsite-0.0.1/frontend/src/api/client.js +29 -0
- agentsite-0.0.1/frontend/src/api/generate.js +7 -0
- agentsite-0.0.1/frontend/src/api/models.js +18 -0
- agentsite-0.0.1/frontend/src/api/projects.js +46 -0
- agentsite-0.0.1/frontend/src/api/providers.js +12 -0
- agentsite-0.0.1/frontend/src/components/agents/AgentActivityPanel.jsx +81 -0
- agentsite-0.0.1/frontend/src/components/agents/AgentCard.jsx +107 -0
- agentsite-0.0.1/frontend/src/components/agents/AgentMetricsBar.jsx +69 -0
- agentsite-0.0.1/frontend/src/components/analytics/ActivityTable.jsx +126 -0
- agentsite-0.0.1/frontend/src/components/analytics/CostByAgentChart.jsx +35 -0
- agentsite-0.0.1/frontend/src/components/analytics/MetricCard.jsx +33 -0
- agentsite-0.0.1/frontend/src/components/analytics/TokenChart.jsx +66 -0
- agentsite-0.0.1/frontend/src/components/builder/ChatInput.jsx +78 -0
- agentsite-0.0.1/frontend/src/components/builder/ChatMessage.jsx +214 -0
- agentsite-0.0.1/frontend/src/components/builder/ChatSidebar.jsx +44 -0
- agentsite-0.0.1/frontend/src/components/builder/DeviceSwitcher.jsx +28 -0
- agentsite-0.0.1/frontend/src/components/builder/PreviewFrame.jsx +39 -0
- agentsite-0.0.1/frontend/src/components/builder/ProgressPipeline.jsx +108 -0
- agentsite-0.0.1/frontend/src/components/builder/VersionSelector.jsx +38 -0
- agentsite-0.0.1/frontend/src/components/builder/ZoomControls.jsx +29 -0
- agentsite-0.0.1/frontend/src/components/dashboard/CreateProjectCard.jsx +18 -0
- agentsite-0.0.1/frontend/src/components/dashboard/ProjectCard.jsx +125 -0
- agentsite-0.0.1/frontend/src/components/dashboard/ProjectFilterBar.jsx +21 -0
- agentsite-0.0.1/frontend/src/components/layout/AppSidebar.jsx +69 -0
- agentsite-0.0.1/frontend/src/components/layout/PageBuilderHeader.jsx +59 -0
- agentsite-0.0.1/frontend/src/components/layout/ProjectSidebar.jsx +74 -0
- agentsite-0.0.1/frontend/src/components/layout/TopHeader.jsx +49 -0
- agentsite-0.0.1/frontend/src/components/project/BrandIdentityPanel.jsx +132 -0
- agentsite-0.0.1/frontend/src/components/project/CreatePageCard.jsx +15 -0
- agentsite-0.0.1/frontend/src/components/project/PageCard.jsx +94 -0
- agentsite-0.0.1/frontend/src/components/project/ProjectSettingsPanel.jsx +204 -0
- agentsite-0.0.1/frontend/src/components/shared/Badge.jsx +19 -0
- agentsite-0.0.1/frontend/src/components/shared/Button.jsx +25 -0
- agentsite-0.0.1/frontend/src/components/shared/Modal.jsx +24 -0
- agentsite-0.0.1/frontend/src/components/shared/ModelSelect.jsx +337 -0
- agentsite-0.0.1/frontend/src/components/shared/SettingsModal.jsx +119 -0
- agentsite-0.0.1/frontend/src/components/shared/Spinner.jsx +10 -0
- agentsite-0.0.1/frontend/src/context/AppContext.jsx +33 -0
- agentsite-0.0.1/frontend/src/hooks/useAgents.js +44 -0
- agentsite-0.0.1/frontend/src/hooks/useGeneration.js +92 -0
- agentsite-0.0.1/frontend/src/hooks/useModels.js +35 -0
- agentsite-0.0.1/frontend/src/hooks/useProject.js +50 -0
- agentsite-0.0.1/frontend/src/hooks/useProjects.js +44 -0
- agentsite-0.0.1/frontend/src/hooks/useProviders.js +41 -0
- agentsite-0.0.1/frontend/src/hooks/useVersions.js +26 -0
- agentsite-0.0.1/frontend/src/hooks/useWebSocket.js +60 -0
- agentsite-0.0.1/frontend/src/index.css +65 -0
- agentsite-0.0.1/frontend/src/main.jsx +34 -0
- agentsite-0.0.1/frontend/src/pages/AgentsPage.jsx +112 -0
- agentsite-0.0.1/frontend/src/pages/AnalyticsPage.jsx +113 -0
- agentsite-0.0.1/frontend/src/pages/DashboardPage.jsx +139 -0
- agentsite-0.0.1/frontend/src/pages/PageBuilderPage.jsx +260 -0
- agentsite-0.0.1/frontend/src/pages/ProjectPage.jsx +166 -0
- agentsite-0.0.1/frontend/src/pages/ProjectSettingsPage.jsx +513 -0
- agentsite-0.0.1/frontend/vite.config.js +27 -0
- agentsite-0.0.1/pyproject.toml +57 -0
- agentsite-0.0.1/requirements.txt +9 -0
- agentsite-0.0.1/setup.cfg +4 -0
- agentsite-0.0.1/tests/__init__.py +0 -0
- agentsite-0.0.1/tests/conftest.py +34 -0
- agentsite-0.0.1/tests/test_agents.py +69 -0
- agentsite-0.0.1/tests/test_api.py +170 -0
- agentsite-0.0.1/tests/test_models.py +139 -0
- agentsite-0.0.1/tests/test_project_manager.py +100 -0
- agentsite-0.0.1/tests/test_storage.py +202 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# AgentSite Configuration
|
|
2
|
+
# Copy this to .env and fill in your values
|
|
3
|
+
|
|
4
|
+
# Default model for all agents (provider/model format)
|
|
5
|
+
AGENTSITE_DEFAULT_MODEL=openai/gpt-4o
|
|
6
|
+
|
|
7
|
+
# Project storage directory (defaults to ~/.agentsite)
|
|
8
|
+
# AGENTSITE_DATA_DIR=~/.agentsite
|
|
9
|
+
|
|
10
|
+
# Server settings
|
|
11
|
+
AGENTSITE_HOST=127.0.0.1
|
|
12
|
+
AGENTSITE_PORT=6391
|
|
13
|
+
|
|
14
|
+
# Provider API keys (inherited from Prompture)
|
|
15
|
+
# OPENAI_API_KEY=sk-...
|
|
16
|
+
# CLAUDE_API_KEY=sk-ant-...
|
|
17
|
+
# GOOGLE_API_KEY=...
|
|
18
|
+
# GROQ_API_KEY=...
|
|
19
|
+
# GROK_API_KEY=...
|
|
20
|
+
# OPENROUTER_API_KEY=...
|
|
21
|
+
|
|
22
|
+
# Local providers (auto-detected)
|
|
23
|
+
# For Docker: use host.docker.internal instead of localhost
|
|
24
|
+
# OLLAMA_ENDPOINT=http://host.docker.internal:11434/api/generate
|
|
25
|
+
# LMSTUDIO_ENDPOINT=http://host.docker.internal:1234/v1
|
|
26
|
+
#
|
|
27
|
+
# For local development (no Docker):
|
|
28
|
+
# OLLAMA_ENDPOINT=http://localhost:11434/api/generate
|
|
29
|
+
# LMSTUDIO_ENDPOINT=http://localhost:1234/v1/chat/completions
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
name: Publish Dev Version to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ dev ]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
dev-pre-release:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
with: { fetch-depth: 0 }
|
|
17
|
+
|
|
18
|
+
- name: Ignore bot
|
|
19
|
+
if: github.actor == 'github-actions[bot]'
|
|
20
|
+
run: |
|
|
21
|
+
echo "Commit made by GitHub Actions. Exiting."
|
|
22
|
+
exit 0
|
|
23
|
+
|
|
24
|
+
- name: Fetch tags
|
|
25
|
+
run: |
|
|
26
|
+
git fetch --tags --prune
|
|
27
|
+
git tag --list | sort -V
|
|
28
|
+
|
|
29
|
+
- name: Compute next dev version (next patch base)
|
|
30
|
+
id: ver
|
|
31
|
+
shell: bash
|
|
32
|
+
run: |
|
|
33
|
+
set -euo pipefail
|
|
34
|
+
# latest release tag (no pre-release), e.g. v1.0.1
|
|
35
|
+
last_release="$(git tag -l 'v[0-9]*.[0-9]*.[0-9]*' | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -1)" || true
|
|
36
|
+
if [[ -z "${last_release}" ]]; then
|
|
37
|
+
base="0.1.0" # bootstrap if no tags yet
|
|
38
|
+
else
|
|
39
|
+
v="${last_release#v}"
|
|
40
|
+
IFS=. read -r MA MI PA <<< "${v}"
|
|
41
|
+
PA=$((PA+1))
|
|
42
|
+
base="${MA}.${MI}.${PA}"
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# find last dev tag for this base: v1.0.1.dev*
|
|
46
|
+
last_dev="$(git tag -l "v${base}.dev*" | sort -V | tail -1)"
|
|
47
|
+
if [[ -z "${last_dev}" ]]; then
|
|
48
|
+
dev_n=1
|
|
49
|
+
else
|
|
50
|
+
suffix="${last_dev##*.dev}"
|
|
51
|
+
dev_n=$((suffix+1))
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
new="${base}.dev${dev_n}"
|
|
55
|
+
echo "base=${base}" >> $GITHUB_OUTPUT
|
|
56
|
+
echo "new=${new}" >> $GITHUB_OUTPUT
|
|
57
|
+
echo "tag=v${new}" >> $GITHUB_OUTPUT
|
|
58
|
+
echo "Computed dev version: ${new}"
|
|
59
|
+
|
|
60
|
+
- name: Configure Git
|
|
61
|
+
run: |
|
|
62
|
+
git config --global user.name "github-actions[bot]"
|
|
63
|
+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
64
|
+
|
|
65
|
+
- name: Create and push dev tag
|
|
66
|
+
run: |
|
|
67
|
+
git tag -a "${{ steps.ver.outputs.tag }}" -m "pre: ${{ steps.ver.outputs.new }}"
|
|
68
|
+
git push origin "${{ steps.ver.outputs.tag }}"
|
|
69
|
+
|
|
70
|
+
- name: Setup Python
|
|
71
|
+
uses: actions/setup-python@v4
|
|
72
|
+
with: { python-version: '3.x' }
|
|
73
|
+
|
|
74
|
+
- name: Set up Node.js
|
|
75
|
+
uses: actions/setup-node@v4
|
|
76
|
+
with:
|
|
77
|
+
node-version: '20'
|
|
78
|
+
|
|
79
|
+
- name: Build frontend
|
|
80
|
+
working-directory: frontend
|
|
81
|
+
run: |
|
|
82
|
+
npm ci
|
|
83
|
+
npm run build
|
|
84
|
+
|
|
85
|
+
- name: Install build deps
|
|
86
|
+
run: |
|
|
87
|
+
python -m pip install --upgrade pip
|
|
88
|
+
pip install setuptools_scm build twine
|
|
89
|
+
|
|
90
|
+
- name: Build (dev)
|
|
91
|
+
env:
|
|
92
|
+
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ steps.ver.outputs.new }}
|
|
93
|
+
run: |
|
|
94
|
+
python -m build
|
|
95
|
+
|
|
96
|
+
- name: Publish to PyPI (dev)
|
|
97
|
+
env:
|
|
98
|
+
TWINE_USERNAME: __token__
|
|
99
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
100
|
+
run: |
|
|
101
|
+
python -m twine upload dist/* --non-interactive
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
name: Publish to PyPI and GitHub Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
with: { fetch-depth: 0 }
|
|
19
|
+
|
|
20
|
+
- name: Ignore bot
|
|
21
|
+
if: github.actor == 'github-actions[bot]'
|
|
22
|
+
run: |
|
|
23
|
+
echo "Commit made by GitHub Actions. Exiting."
|
|
24
|
+
exit 0
|
|
25
|
+
|
|
26
|
+
- name: Bump Version and Push Tag
|
|
27
|
+
id: bump_version
|
|
28
|
+
uses: mathieudutour/github-tag-action@v6.0
|
|
29
|
+
with:
|
|
30
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
31
|
+
release_branches: main
|
|
32
|
+
default_bump: patch
|
|
33
|
+
tag_prefix: 'v'
|
|
34
|
+
|
|
35
|
+
- name: Update VERSION (main only)
|
|
36
|
+
run: |
|
|
37
|
+
echo "${{ steps.bump_version.outputs.new_version }}" > VERSION
|
|
38
|
+
git config user.name "github-actions[bot]"
|
|
39
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
40
|
+
git add -f VERSION
|
|
41
|
+
git commit -m "🔖 Version v${{ steps.bump_version.outputs.new_version }} [skip ci]" || true
|
|
42
|
+
git push origin main || true
|
|
43
|
+
|
|
44
|
+
- name: Fetch Latest Pull Request Info
|
|
45
|
+
id: fetch_pr
|
|
46
|
+
uses: actions/github-script@v6
|
|
47
|
+
with:
|
|
48
|
+
script: |
|
|
49
|
+
const prs = await github.rest.pulls.list({
|
|
50
|
+
owner: context.repo.owner,
|
|
51
|
+
repo: context.repo.repo,
|
|
52
|
+
state: 'closed',
|
|
53
|
+
base: 'main',
|
|
54
|
+
head: 'dev',
|
|
55
|
+
sort: 'updated',
|
|
56
|
+
direction: 'desc',
|
|
57
|
+
per_page: 1
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
if (prs.data.length > 0) {
|
|
61
|
+
const pr = prs.data[0];
|
|
62
|
+
const prTitle = pr.title;
|
|
63
|
+
const prBody = pr.body || 'No description provided';
|
|
64
|
+
const prNumber = pr.number;
|
|
65
|
+
const prUrl = pr.html_url;
|
|
66
|
+
const prAuthor = pr.user.login;
|
|
67
|
+
|
|
68
|
+
const formattedBody = prBody.replace(/\r\n/g, '\n');
|
|
69
|
+
|
|
70
|
+
const releaseInfo = {
|
|
71
|
+
title: prTitle,
|
|
72
|
+
body: formattedBody,
|
|
73
|
+
number: prNumber,
|
|
74
|
+
url: prUrl,
|
|
75
|
+
author: prAuthor
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
console.log('Latest PR Info:', releaseInfo);
|
|
79
|
+
return releaseInfo;
|
|
80
|
+
} else {
|
|
81
|
+
console.log('No recent PRs from dev to main found');
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
- name: Create GitHub Release
|
|
86
|
+
uses: actions/create-release@v1
|
|
87
|
+
env:
|
|
88
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
89
|
+
with:
|
|
90
|
+
tag_name: v${{ steps.bump_version.outputs.new_version }}
|
|
91
|
+
release_name: v${{ steps.bump_version.outputs.new_version }}
|
|
92
|
+
body: |
|
|
93
|
+
## Changes
|
|
94
|
+
${{ steps.fetch_pr.outputs.result != 'null' && fromJSON(steps.fetch_pr.outputs.result).body || 'Version update' }}
|
|
95
|
+
|
|
96
|
+
## Details
|
|
97
|
+
- Version: v${{ steps.bump_version.outputs.new_version }}
|
|
98
|
+
${{ steps.fetch_pr.outputs.result != 'null' && format('- PR: #{0} by @{1}', fromJSON(steps.fetch_pr.outputs.result).number, fromJSON(steps.fetch_pr.outputs.result).author) || '' }}
|
|
99
|
+
${{ steps.fetch_pr.outputs.result != 'null' && format('- PR URL: {0}', fromJSON(steps.fetch_pr.outputs.result).url) || '' }}
|
|
100
|
+
draft: false
|
|
101
|
+
prerelease: false
|
|
102
|
+
|
|
103
|
+
- name: Fetch all tags so setuptools_scm can detect the tag
|
|
104
|
+
run: |
|
|
105
|
+
git fetch --all --tags --prune
|
|
106
|
+
git tag --list
|
|
107
|
+
git describe --tags --long || true
|
|
108
|
+
|
|
109
|
+
- name: Setup Python
|
|
110
|
+
uses: actions/setup-python@v4
|
|
111
|
+
with: { python-version: '3.x' }
|
|
112
|
+
|
|
113
|
+
- name: Set up Node.js
|
|
114
|
+
uses: actions/setup-node@v4
|
|
115
|
+
with:
|
|
116
|
+
node-version: '20'
|
|
117
|
+
|
|
118
|
+
- name: Build frontend
|
|
119
|
+
working-directory: frontend
|
|
120
|
+
run: |
|
|
121
|
+
npm ci
|
|
122
|
+
npm run build
|
|
123
|
+
|
|
124
|
+
- name: Cache pip
|
|
125
|
+
uses: actions/cache@v3
|
|
126
|
+
with:
|
|
127
|
+
path: ~/.cache/pip
|
|
128
|
+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
129
|
+
restore-keys: |
|
|
130
|
+
${{ runner.os }}-pip-
|
|
131
|
+
|
|
132
|
+
- name: Install build deps
|
|
133
|
+
run: |
|
|
134
|
+
python -m pip install --upgrade pip
|
|
135
|
+
pip install setuptools_scm build twine
|
|
136
|
+
|
|
137
|
+
- name: Build package
|
|
138
|
+
env:
|
|
139
|
+
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ steps.bump_version.outputs.new_version }}
|
|
140
|
+
run: |
|
|
141
|
+
python -m build
|
|
142
|
+
|
|
143
|
+
- name: Publish to PyPI
|
|
144
|
+
env:
|
|
145
|
+
TWINE_USERNAME: __token__
|
|
146
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
147
|
+
run: |
|
|
148
|
+
python -m twine upload dist/* --non-interactive
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
208
|
+
nul
|
|
209
|
+
/.vscode
|
|
210
|
+
new_templates/
|
|
211
|
+
|
|
212
|
+
# Frontend build output and dependencies
|
|
213
|
+
frontend/dist/
|
|
214
|
+
frontend/node_modules/
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
AgentSite is an AI-powered website builder using multi-agent orchestration. Four specialized AI agents (PM, Designer, Developer, Reviewer) collaborate in a pipeline to generate production-ready websites from text prompts.
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Install (with dev/test extras)
|
|
13
|
+
pip install -e ".[dev]"
|
|
14
|
+
|
|
15
|
+
# Run web UI server (http://127.0.0.1:6391)
|
|
16
|
+
agentsite serve
|
|
17
|
+
agentsite serve --reload # with hot-reload
|
|
18
|
+
|
|
19
|
+
# Generate via CLI
|
|
20
|
+
agentsite generate "A portfolio site" -m openai/gpt-4o -o ./output
|
|
21
|
+
|
|
22
|
+
# List available LLM models
|
|
23
|
+
agentsite models
|
|
24
|
+
|
|
25
|
+
# Frontend development
|
|
26
|
+
cd frontend && npm install # install deps
|
|
27
|
+
cd frontend && npm run dev # dev server on port 5173 (proxies to backend)
|
|
28
|
+
cd frontend && npm run build # production build to frontend/dist/
|
|
29
|
+
|
|
30
|
+
# Tests
|
|
31
|
+
pytest # all tests
|
|
32
|
+
pytest tests/test_api.py # single test file
|
|
33
|
+
pytest -k "test_name" # single test by name
|
|
34
|
+
|
|
35
|
+
# Lint and format
|
|
36
|
+
ruff check .
|
|
37
|
+
ruff format .
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Architecture
|
|
41
|
+
|
|
42
|
+
**Backend** (`agentsite/`): Python 3.10+, FastAPI, Uvicorn, SQLite via aiosqlite. CLI via Click.
|
|
43
|
+
|
|
44
|
+
**Frontend** (`frontend/`): React 19 + Vite 6 + Tailwind CSS 4 SPA. Built to `frontend/dist/` and served by FastAPI with SPA catch-all fallback.
|
|
45
|
+
|
|
46
|
+
- **Routing**: React Router 7 with 5 routes: `/` (Dashboard), `/project/:id` (Project), `/project/:id/page/:slug` (Page Builder), `/agents`, `/analytics`
|
|
47
|
+
- **State**: React Context (`AppContext`) for global state (models, providers, settings). Custom hooks (`useProjects`, `useProject`, `useVersions`, `useGeneration`, `useWebSocket`) for data fetching.
|
|
48
|
+
- **API layer**: Modular fetch wrappers in `frontend/src/api/` (client.js, projects.js, providers.js, models.js, generate.js, assets.js)
|
|
49
|
+
- **Icons**: `@phosphor-icons/react` — use `weight="fill"` prop for filled variants
|
|
50
|
+
- **Fonts**: Inter (body), JetBrains Mono (code), Space Grotesk (display) via Google Fonts CDN
|
|
51
|
+
|
|
52
|
+
**Dev workflow**: Run backend (`agentsite serve --reload` on port 6391) and frontend (`npm run dev` on port 5173) simultaneously. Vite proxies `/api/*`, `/ws/*`, `/preview/*` to the backend.
|
|
53
|
+
|
|
54
|
+
**Production**: `npm run build` in `frontend/`, then `agentsite serve` serves everything from `frontend/dist/`.
|
|
55
|
+
|
|
56
|
+
**Agent orchestration** uses the **Prompture** library (`prompture>=0.0.40`). The pipeline is defined in `agentsite/engine/pipeline.py`:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
Sequential:
|
|
60
|
+
1. PM Agent → SitePlan (structure, pages, sections)
|
|
61
|
+
2. Designer Agent → StyleSpec (colors, typography, spacing)
|
|
62
|
+
3. Loop (max 2 iterations):
|
|
63
|
+
a. Developer Agent → PageOutput (HTML/CSS/JS files)
|
|
64
|
+
b. Reviewer Agent → ReviewFeedback (score ≥ 7 = approved)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Agent personas/system prompts live in `agentsite/agents/personas.py`. Each agent has a factory module (`pm.py`, `designer.py`, `developer.py`, `reviewer.py`). The orchestrator wires them together in `agentsite/agents/orchestrator.py`.
|
|
68
|
+
|
|
69
|
+
**Real-time updates**: Generation progress flows via WebSocket from `agentsite/api/websocket.py` to `useWebSocket` / `useGeneration` hooks. The Page Builder updates ChatSidebar, PreviewFrame, and ProgressPipeline components in response.
|
|
70
|
+
|
|
71
|
+
**Storage**: SQLite database (projects + generations tables) managed in `agentsite/storage/`. Generated site files are written to `~/.agentsite/projects/{id}/site/` via agent tools defined in `agentsite/agents/tools.py`.
|
|
72
|
+
|
|
73
|
+
**API routes** are in `agentsite/api/routes/` — generation, projects CRUD, model listing, file/asset management, preview, and provider configuration.
|
|
74
|
+
|
|
75
|
+
## Frontend File Structure
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
frontend/
|
|
79
|
+
src/
|
|
80
|
+
main.jsx # Router setup
|
|
81
|
+
App.jsx # Layout shell (sidebar + outlet)
|
|
82
|
+
index.css # Tailwind directives + custom utilities
|
|
83
|
+
api/ # Fetch wrappers per resource
|
|
84
|
+
hooks/ # React hooks for data + WebSocket
|
|
85
|
+
context/AppContext.jsx # Global state provider
|
|
86
|
+
pages/ # Route-level page components
|
|
87
|
+
components/
|
|
88
|
+
layout/ # AppSidebar, ProjectSidebar, TopHeader, PageBuilderHeader
|
|
89
|
+
dashboard/ # ProjectCard, CreateProjectCard, ProjectFilterBar
|
|
90
|
+
project/ # PageCard, CreatePageCard, BrandIdentityPanel
|
|
91
|
+
builder/ # ChatSidebar, ChatMessage, ChatInput, PreviewFrame, DeviceSwitcher, VersionSelector, ZoomControls, ProgressPipeline
|
|
92
|
+
agents/ # AgentCard, AgentMetricsBar, AgentActivityPanel
|
|
93
|
+
analytics/ # MetricCard, TokenChart, CostByAgentChart, ActivityTable
|
|
94
|
+
shared/ # Badge, Button, Modal, Spinner, SettingsModal
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Configuration
|
|
98
|
+
|
|
99
|
+
Copy `.env.copy` to `.env` and set provider API keys (`OPENAI_API_KEY`, `CLAUDE_API_KEY`, `GOOGLE_API_KEY`, etc.). Key settings prefixed with `AGENTSITE_` are defined in `agentsite/config.py` using Pydantic Settings.
|
|
100
|
+
|
|
101
|
+
Default model: `openai/gpt-4o`. Default port: `6391`. Data directory: `~/.agentsite`.
|
|
102
|
+
|
|
103
|
+
## Domain Models
|
|
104
|
+
|
|
105
|
+
Core data models in `agentsite/models.py`: `SitePlan`, `StyleSpec`, `PageOutput`, `ReviewFeedback`, `Project`, `WSEvent`. These are the structured outputs passed between agents and stored in the database.
|