Skip to content

Commit f7e0913

Browse files
author
Symbiont OSS Sync
committed
Sync OSS code
0 parents  commit f7e0913

File tree

142 files changed

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

142 files changed

+61569
-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: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
env:
10+
REGISTRY: ghcr.io
11+
IMAGE_NAME: thirdkeyai/symbi
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Log in to Container Registry
25+
uses: docker/login-action@v3
26+
with:
27+
registry: ${{ env.REGISTRY }}
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Extract metadata
32+
id: meta
33+
uses: docker/metadata-action@v5
34+
with:
35+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
36+
tags: |
37+
type=ref,event=branch
38+
type=ref,event=pr
39+
type=sha
40+
type=raw,value=latest,enable={{is_default_branch}}
41+
42+
- name: Build and push Docker image
43+
uses: docker/build-push-action@v5
44+
with:
45+
context: .
46+
push: true
47+
tags: ${{ steps.meta.outputs.tags }}
48+
labels: ${{ steps.meta.outputs.labels }}

.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 }}"
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Security Check
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
env:
10+
REGISTRY: ghcr.io
11+
IMAGE_NAME: thirdkeyai/symbi
12+
13+
jobs:
14+
security-check:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: read
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Log in to Container Registry
25+
uses: docker/login-action@v3
26+
with:
27+
registry: ${{ env.REGISTRY }}
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Extract metadata
32+
id: meta
33+
uses: docker/metadata-action@v5
34+
with:
35+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
36+
tags: |
37+
type=ref,event=branch
38+
type=ref,event=pr
39+
type=sha,prefix={{branch}}-
40+
41+
- name: Run security check
42+
run: |
43+
# Get the current commit SHA
44+
COMMIT_SHA=$(git rev-parse HEAD)
45+
46+
# Try to pull and run the image with version check
47+
if docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${COMMIT_SHA} 2>/dev/null; then
48+
echo "Found existing image for commit ${COMMIT_SHA}"
49+
docker run --rm ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${COMMIT_SHA} --version
50+
else
51+
echo "Image not found for commit ${COMMIT_SHA}, building locally..."
52+
docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${COMMIT_SHA} .
53+
docker run --rm ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${COMMIT_SHA} --version
54+
fi

0 commit comments

Comments
 (0)