WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit e57db39

Browse files
committed
release: II-Agent WebApp 19 Nov 2025
0 parents  commit e57db39

File tree

1,080 files changed

+159160
-0
lines changed

Some content is hidden

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

1,080 files changed

+159160
-0
lines changed

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
frontend/node_modules
2+
workspace/
3+
.env
4+
.venv
5+
*.db
6+
*.json
7+
*.xml

.github/workflows/build-dev.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build and Push Docker Images (Development)
2+
3+
on:
4+
workflow_dispatch: {}
5+
push:
6+
branches:
7+
- develop
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build-and-push-development:
14+
uses: ./.github/workflows/build-shared.yml
15+
with:
16+
environment: dev
17+
image_tag: ${{ github.sha }}
18+
secrets:
19+
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
20+
FRONTEND_ENV: ${{ secrets.FRONTEND_DEV }}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build and Push Docker Images (Production)
2+
3+
on:
4+
workflow_dispatch: {}
5+
push:
6+
tags:
7+
- 'release-*'
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
extract-tag:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
tag: ${{ steps.extract.outputs.tag }}
17+
steps:
18+
- name: Extract tag name
19+
id: extract
20+
run: |
21+
# Extract full tag name (refs/tags/release-0.1.0 -> release-0.1.0)
22+
TAG=${GITHUB_REF#refs/tags/}
23+
echo "tag=$TAG" >> $GITHUB_OUTPUT
24+
echo "Using release tag: $TAG"
25+
26+
build-and-push-production:
27+
needs: extract-tag
28+
uses: ./.github/workflows/build-shared.yml
29+
with:
30+
environment: prod
31+
image_tag: ${{ needs.extract-tag.outputs.tag }}
32+
secrets:
33+
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
34+
FRONTEND_ENV: ${{ secrets.FRONTEND_PROD }}

.github/workflows/build-shared.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: II agent build template
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
environment:
7+
description: 'Environment name (dev, prod, staging)'
8+
required: true
9+
type: string
10+
image_tag:
11+
description: 'Docker image tag'
12+
required: true
13+
type: string
14+
secrets:
15+
GCP_SA_KEY:
16+
required: true
17+
FRONTEND_ENV:
18+
required: true
19+
20+
env:
21+
REGION: us-central1
22+
REGISTRY: us-central1-docker.pkg.dev
23+
REPO_PATH: backend-alpha-97077/iirepo
24+
25+
jobs:
26+
build-and-push:
27+
runs-on: ubuntu-latest
28+
environment: ${{ inputs.environment }}
29+
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
34+
- name: Authenticate to Google Cloud
35+
uses: google-github-actions/auth@v2
36+
with:
37+
credentials_json: ${{ secrets.GCP_SA_KEY }}
38+
39+
- name: Set up gcloud SDK
40+
uses: google-github-actions/setup-gcloud@v2
41+
42+
- name: Set up Docker Buildx
43+
uses: docker/setup-buildx-action@v3
44+
45+
- name: Configure Docker for Artifact Registry
46+
run: |
47+
gcloud auth configure-docker $REGISTRY --quiet
48+
echo "Docker authentication configured for $REGISTRY"
49+
50+
- name: Create frontend .env file
51+
run: echo "${{ secrets.FRONTEND_ENV }}" > frontend/.env.local
52+
53+
- name: Build and push frontend image
54+
uses: docker/build-push-action@v5
55+
with:
56+
context: .
57+
file: ./docker/frontend/Dockerfile
58+
push: true
59+
provenance: false
60+
tags: |
61+
${{ env.REGISTRY }}/${{ env.REPO_PATH }}/ii-agent-${{ inputs.environment }}-fe:${{ inputs.image_tag }}
62+
${{ env.REGISTRY }}/${{ env.REPO_PATH }}/ii-agent-${{ inputs.environment }}-fe:latest
63+
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_PATH }}/ii-agent-${{ inputs.environment }}-fe:buildcache
64+
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_PATH }}/ii-agent-${{ inputs.environment }}-fe:buildcache,mode=max
65+
66+
- name: Clean up frontend .env file
67+
if: always()
68+
run: rm -f frontend/.env.local
69+
70+
- name: Build and push backend image
71+
uses: docker/build-push-action@v5
72+
with:
73+
context: .
74+
file: ./docker/backend/Dockerfile
75+
push: true
76+
provenance: false
77+
tags: |
78+
${{ env.REGISTRY }}/${{ env.REPO_PATH }}/ii-agent-${{ inputs.environment }}:${{ inputs.image_tag }}
79+
${{ env.REGISTRY }}/${{ env.REPO_PATH }}/ii-agent-${{ inputs.environment }}:latest
80+
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_PATH }}/ii-agent-${{ inputs.environment }}:buildcache
81+
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_PATH }}/ii-agent-${{ inputs.environment }}:buildcache,mode=max
82+
83+
- name: Output build information
84+
run: |
85+
echo "Environment: ${{ inputs.environment }}"
86+
echo "Image Tag: ${{ inputs.image_tag }}"
87+
echo "Images built:"
88+
echo " - ${{ env.REGISTRY }}/${{ env.REPO_PATH }}/ii-agent-${{ inputs.environment }}-fe:${{ inputs.image_tag }}"
89+
echo " - ${{ env.REGISTRY }}/${{ env.REPO_PATH }}/ii-agent-${{ inputs.environment }}-fe:latest"
90+
echo " - ${{ env.REGISTRY }}/${{ env.REPO_PATH }}/ii-agent-${{ inputs.environment }}:${{ inputs.image_tag }}"
91+
echo " - ${{ env.REGISTRY }}/${{ env.REPO_PATH }}/ii-agent-${{ inputs.environment }}:latest"

.github/workflows/gitleaks.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: gitleaks
2+
on:
3+
pull_request:
4+
push:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "0 4 * * *" # run once a day at 4 AM
8+
jobs:
9+
scan:
10+
name: gitleaks
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- uses: gitleaks/gitleaks-action@v2
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}

.gitignore

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
trace_logs/
2+
3+
docker/.stack.env
4+
docker/.stack.env.sh
5+
6+
# Python-generated files
7+
__pycache__/
8+
*.py[oc]
9+
build/
10+
dist/
11+
wheels/
12+
*.egg-info
13+
14+
# Virtual environments
15+
.venv
16+
17+
# Database files
18+
*.db
19+
*.sqlite
20+
*.sqlite3
21+
22+
# MacOS X gitignore
23+
# General
24+
.DS_Store
25+
.AppleDouble
26+
.LSOverride
27+
28+
# Icon must end with two \r
29+
Icon
30+
31+
32+
# Thumbnails
33+
._*
34+
35+
# Files that might appear in the root of a volume
36+
.DocumentRevisions-V100
37+
.fseventsd
38+
.Spotlight-V100
39+
.TemporaryItems
40+
.Trashes
41+
.VolumeIcon.icns
42+
.com.apple.timemachine.donotpresent
43+
44+
# Directories potentially created on remote AFP share
45+
.AppleDB
46+
.AppleDesktop
47+
Network Trash Folder
48+
Temporary Items
49+
.apdisk
50+
51+
# Logs
52+
logs
53+
*.log
54+
npm-debug.log*
55+
yarn-debug.log*
56+
yarn-error.log*
57+
lerna-debug.log*
58+
.pnpm-debug.log*
59+
60+
# Diagnostic reports (https://nodejs.org/api/report.html)
61+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
62+
63+
# Runtime data
64+
pids
65+
*.pid
66+
*.seed
67+
*.pid.lock
68+
69+
# Directory for instrumented libs generated by jscoverage/JSCover
70+
lib-cov
71+
72+
# Coverage directory used by tools like istanbul
73+
coverage
74+
*.lcov
75+
76+
# nyc test coverage
77+
.nyc_output
78+
79+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
80+
.grunt
81+
82+
# Bower dependency directory (https://bower.io/)
83+
bower_components
84+
85+
# node-waf configuration
86+
.lock-wscript
87+
88+
# Compiled binary addons (https://nodejs.org/api/addons.html)
89+
build/Release
90+
91+
# Dependency directories
92+
node_modules/
93+
jspm_packages/
94+
95+
# Snowpack dependency directory (https://snowpack.dev/)
96+
web_modules/
97+
98+
# TypeScript cache
99+
*.tsbuildinfo
100+
101+
# Optional npm cache directory
102+
.npm
103+
104+
# Optional eslint cache
105+
.eslintcache
106+
107+
# Optional stylelint cache
108+
.stylelintcache
109+
110+
# Microbundle cache
111+
.rpt2_cache/
112+
.rts2_cache_cjs/
113+
.rts2_cache_es/
114+
.rts2_cache_umd/
115+
116+
# Optional REPL history
117+
.node_repl_history
118+
119+
# Output of 'npm pack'
120+
*.tgz
121+
122+
# Yarn Integrity file
123+
.yarn-integrity
124+
125+
# dotenv environment variable files
126+
.env
127+
.env.development.local
128+
.env.test.local
129+
.env.production.local
130+
.env.local
131+
.env.tool
132+
133+
# parcel-bundler cache (https://parceljs.org/)
134+
.cache
135+
.parcel-cache
136+
137+
# Next.js build output
138+
.next
139+
out
140+
141+
# Nuxt.js build / generate output
142+
.nuxt
143+
dist
144+
145+
# Gatsby files
146+
.cache/
147+
# Comment in the public line in if your project uses Gatsby and not Next.js
148+
# https://nextjs.org/blog/next-9-1#public-directory-support
149+
# public
150+
151+
# vuepress build output
152+
.vuepress/dist
153+
154+
# vuepress v2.x temp and cache directory
155+
.temp
156+
.cache
157+
158+
# vitepress build output
159+
**/.vitepress/dist
160+
161+
# vitepress cache directory
162+
**/.vitepress/cache
163+
164+
# Docusaurus cache and generated files
165+
.docusaurus
166+
167+
# Serverless directories
168+
.serverless/
169+
170+
# FuseBox cache
171+
.fusebox/
172+
173+
# DynamoDB Local files
174+
.dynamodb/
175+
176+
# TernJS port file
177+
.tern-port
178+
179+
# Stores VSCode versions used for testing VSCode extensions
180+
.vscode-test
181+
182+
# yarn v2
183+
.yarn/cache
184+
.yarn/unplugged
185+
.yarn/build-state.yml
186+
.yarn/install-state.gz
187+
.pnp.*
188+
189+
agent_logs.txt
190+
workspace/
191+
tmp/
192+
data/file_store
193+
data/workspace
194+
data/logs
195+
data/events.db
196+
output/
197+
198+
.vscode/
199+
.envrc
200+
201+
# local only scripts
202+
start_tool_server.sh

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
# Ruff version.
4+
rev: v0.11.9
5+
hooks:
6+
# Run the linter.
7+
- id: ruff
8+
types_or: [ python, pyi ]
9+
args: [ --fix ]
10+
# Run the formatter.
11+
- id: ruff-format
12+
types_or: [ python, pyi ]

0 commit comments

Comments
 (0)