Skip to content

Commit 5476a9c

Browse files
author
Symbiont OSS Sync
committed
Sync OSS code
0 parents  commit 5476a9c

File tree

141 files changed

+61597
-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.

141 files changed

+61597
-0
lines changed

.dockerignore

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Git and GitHub files
2+
.git/
3+
.github/
4+
5+
# Rust build artifacts - be very explicit
6+
**/target/
7+
target/
8+
crates/runtime/target/
9+
crates/dsl/target/
10+
debug/
11+
release/
12+
13+
# Examples and documentation not needed for build
14+
crates/runtime/examples/
15+
examples/
16+
crates/runtime/docs/
17+
docs/
18+
*.md
19+
README*
20+
CHANGELOG*
21+
LICENSE*
22+
23+
# Test files
24+
tests/
25+
crates/runtime/tests/
26+
crates/dsl/tests/
27+
28+
# IDE and editor files
29+
.vscode/
30+
.idea/
31+
*.swp
32+
*.swo
33+
*.vim
34+
35+
# OS files
36+
.DS_Store
37+
Thumbs.db
38+
._*
39+
40+
# Logs and temporary files
41+
*.log
42+
*.tmp
43+
*.temp
44+
*.bak
45+
46+
# Environment files
47+
.env
48+
.env.*
49+
!/.env.example
50+
51+
# Cache directories
52+
.cache/
53+
tmp/
54+
temp/
55+
56+
# Large data files
57+
*.db
58+
*.sqlite
59+
*.sqlite3
60+
data/
61+
62+
# Compiled binaries and libraries
63+
*.exe
64+
*.dll
65+
*.so
66+
*.dylib
67+
68+
# Archive files
69+
*.zip
70+
*.tar.gz
71+
*.tgz
72+
*.rar
73+
74+
# Tree-sitter generated files (keep only what's needed)
75+
crates/dsl/tree-sitter-symbiont/node_modules/
76+
crates/dsl/tree-sitter-symbiont/package-lock.json
77+
78+
# Roo mode files
79+
.roomodes
80+
.roo
81+
82+
# Enterprise (excluded for OSS builds)
83+
enterprise/
84+
85+
# Additional Rust-specific exclusions
86+
**/*.orig
87+
**/*.rej
88+
**/Cargo.lock.bak
89+
**/.cargo/
90+
.rustup/
91+
**/coverage/
92+
**/flamegraph.svg
93+
**/*.profraw

.github/workflows/docker-build.yml

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: Build and Publish Symbi Docker Image
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags: [ 'v*' ]
7+
paths:
8+
- 'Cargo.toml'
9+
- 'Cargo.lock'
10+
- 'crates/**'
11+
- 'src/**'
12+
- 'Dockerfile'
13+
- '.dockerignore'
14+
- '.github/workflows/docker-build.yml'
15+
pull_request:
16+
branches: [ main ]
17+
paths:
18+
- 'Cargo.toml'
19+
- 'Cargo.lock'
20+
- 'crates/**'
21+
- 'src/**'
22+
- 'Dockerfile'
23+
- '.dockerignore'
24+
- '.github/workflows/docker-build.yml'
25+
workflow_dispatch:
26+
inputs:
27+
force_rebuild:
28+
description: 'Force complete rebuild'
29+
required: false
30+
default: 'false'
31+
32+
env:
33+
REGISTRY: ghcr.io
34+
IMAGE_NAME: thirdkeyai/symbi
35+
36+
jobs:
37+
build-symbi:
38+
runs-on: ubuntu-latest
39+
permissions:
40+
contents: read
41+
packages: write
42+
43+
steps:
44+
- name: Checkout repository
45+
uses: actions/checkout@v4
46+
47+
- name: Set up Docker Buildx
48+
uses: docker/setup-buildx-action@v3
49+
50+
- name: Log in to Container Registry
51+
if: github.event_name != 'pull_request'
52+
uses: docker/login-action@v3
53+
with:
54+
registry: ${{ env.REGISTRY }}
55+
username: ${{ github.actor }}
56+
password: ${{ secrets.GITHUB_TOKEN }}
57+
58+
- name: Extract metadata for Symbi
59+
id: meta
60+
uses: docker/metadata-action@v5
61+
with:
62+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
63+
tags: |
64+
type=ref,event=branch
65+
type=ref,event=pr
66+
type=semver,pattern={{version}}
67+
type=semver,pattern={{major}}.{{minor}}
68+
type=semver,pattern={{major}}
69+
type=sha
70+
71+
- name: Build and push Symbi image
72+
uses: docker/build-push-action@v5
73+
with:
74+
context: .
75+
file: ./Dockerfile
76+
platforms: linux/amd64,linux/arm64
77+
push: ${{ github.event_name != 'pull_request' }}
78+
tags: ${{ steps.meta.outputs.tags }}
79+
labels: ${{ steps.meta.outputs.labels }}
80+
cache-from: |
81+
type=gha
82+
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
83+
cache-to: |
84+
type=gha,mode=max
85+
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
86+
build-args: |
87+
BUILDKIT_INLINE_CACHE=1
88+
89+
security-scan:
90+
runs-on: ubuntu-latest
91+
needs: [build-symbi]
92+
if: github.event_name != 'pull_request'
93+
permissions:
94+
contents: read
95+
packages: read
96+
security-events: write
97+
98+
steps:
99+
- name: Log in to Container Registry
100+
uses: docker/login-action@v3
101+
with:
102+
registry: ${{ env.REGISTRY }}
103+
username: ${{ github.actor }}
104+
password: ${{ secrets.GITHUB_TOKEN }}
105+
106+
- name: Run Trivy vulnerability scanner
107+
uses: aquasecurity/trivy-action@master
108+
with:
109+
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
110+
format: 'sarif'
111+
output: 'trivy-results.sarif'
112+
113+
- name: Upload Trivy scan results to GitHub Security tab
114+
uses: github/codeql-action/upload-sarif@v3
115+
with:
116+
sarif_file: 'trivy-results.sarif'
117+
118+
test-container:
119+
runs-on: ubuntu-latest
120+
needs: [build-symbi]
121+
if: github.event_name != 'pull_request'
122+
123+
steps:
124+
- name: Test unified Symbi binary
125+
run: |
126+
docker run --rm ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} --version
127+
docker run --rm ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} --help
128+
docker run --rm ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} dsl --help
129+
docker run --rm ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} runtime --help
130+
docker run --rm ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} mcp --help

.github/workflows/docs.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Deploy OSS Documentation
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'docs/**'
8+
- '.github/workflows/docs.yml'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
security-check:
22+
name: Security Check
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Verify no enterprise content
29+
run: |
30+
echo "🔍 Verifying documentation contains no enterprise content..."
31+
32+
# Check for enterprise folder
33+
if [[ -d "enterprise" ]]; then
34+
echo "❌ ERROR: Enterprise folder found in public repo!"
35+
exit 1
36+
fi
37+
38+
# Check for sensitive patterns in docs
39+
sensitive_patterns=("password" "secret" "private_key" "api_key")
40+
for pattern in "${sensitive_patterns[@]}"; do
41+
if grep -r -i "$pattern" docs/ --exclude-dir=_site 2>/dev/null | grep -v "example" | grep -v "placeholder"; then
42+
echo "⚠️ WARNING: Potential sensitive content found for pattern: $pattern"
43+
grep -r -i "$pattern" docs/ --exclude-dir=_site | grep -v "example" | grep -v "placeholder"
44+
fi
45+
done
46+
47+
echo "✅ Documentation security check passed"
48+
49+
build:
50+
name: Build Documentation
51+
runs-on: ubuntu-latest
52+
needs: security-check
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
57+
- name: Setup Ruby
58+
uses: ruby/setup-ruby@v1
59+
with:
60+
ruby-version: '3.1'
61+
bundler-cache: true
62+
working-directory: docs
63+
64+
- name: Setup Pages
65+
id: pages
66+
uses: actions/configure-pages@v4
67+
68+
- name: Install dependencies
69+
run: |
70+
cd docs
71+
bundle install
72+
73+
- name: Build with Jekyll
74+
run: |
75+
cd docs
76+
bundle exec jekyll build
77+
env:
78+
JEKYLL_ENV: production
79+
80+
- name: Upload artifact
81+
uses: actions/upload-pages-artifact@v3
82+
with:
83+
path: docs/_site
84+
85+
deploy:
86+
name: Deploy to GitHub Pages
87+
environment:
88+
name: github-pages
89+
url: ${{ steps.deployment.outputs.page_url }}
90+
runs-on: ubuntu-latest
91+
needs: build
92+
outputs:
93+
page_url: ${{ steps.deployment.outputs.page_url }}
94+
steps:
95+
- name: Deploy to GitHub Pages
96+
id: deployment
97+
uses: actions/deploy-pages@v4
98+
99+
validate-deployment:
100+
name: Validate Deployment
101+
runs-on: ubuntu-latest
102+
needs: deploy
103+
if: success()
104+
steps:
105+
- name: Check deployment
106+
run: |
107+
echo "🌐 Validating deployed documentation..."
108+
109+
# Wait for deployment to be available
110+
sleep 30
111+
112+
# Basic connectivity check
113+
if curl -s -f "${{ needs.deploy.outputs.page_url }}" > /dev/null; then
114+
echo "✅ Documentation site is accessible"
115+
else
116+
echo "❌ Documentation site is not accessible"
117+
exit 1
118+
fi
119+
120+
echo "📖 Documentation deployed successfully"
121+
echo "URL: ${{ needs.deploy.outputs.page_url }}"

0 commit comments

Comments
 (0)