feat: MarkBase initial version

Phase 1 (Infrastructure):
- Docs: README.md, AGENTS.md, CHANGELOG.md
- Tests: 26 tests (modes_test, filetree_api_test)
- Examples: examples/sample.md, sample.json
- CI/CD: .gitea/workflows/test.yml, release.yml
- Runner: configuration scripts and guides

Phase 2 (Quality):
- Code quality: rustfmt/clippy config
- Security: environment variables
- Test coverage: 62 tests (+36)
- Documentation: CONTRIBUTING.md, docs/api.yaml
- Showcase: demo_features.md, developer_quickstart.md

Test coverage: 75%
Test pass rate: 100%
This commit is contained in:
Warren
2026-05-16 15:37:37 +08:00
commit e3d6b60825
50 changed files with 7758 additions and 0 deletions

106
docs/runner_usage.md Normal file
View File

@@ -0,0 +1,106 @@
# Gitea Runner使用指南快速版
## Runner已配置完成
**Runner資訊**
-版本v1.0.3
- 名稱accusys-Mac-mini-M4-2.local
- ID1
-地址https://gitea.momentry.ddns.net
---
## 啟動 Runner
### 方式A前景執行測試用
```bash
cd /Users/accusys/markbase
./scripts/start_runner.sh
```
或直接執行:
```bash
cd /Users/accusys/markbase
~/.local/bin/gitea-runner daemon
```
### 方式B背景服務macOS launchd
```bash
#配置為系統服務
./scripts/setup_launchd.sh
#管理命令
launchctl load ~/Library/LaunchAgents/com.gitea.runner.plist #啟動
launchctl unload ~/Library/LaunchAgents/com.gitea.runner.plist #停止
launchctl list | grep gitea #狀態
tail -f /tmp/gitea-runner.log #日誌
```
---
##驗證 Runner狀態
```bash
./scripts/verify_runner.sh
```
---
##支持的Labels
- `macos-latest:host` -本機Mac執行bare-metal
- `macos-arm64:host` -本機Mac執行bare-metal
- `ubuntu-latest:docker` - Docker容器執行
---
##觸發Workflow測試
### Push觸發
```bash
git add .
git commit -m "test workflow"
git push origin main
```
### 在Gitea查看結果
1.登入https://gitea.momentry.ddns.net
2.進入專案 → Actions →查看workflow執行狀態
---
##常見問題
**Q: Runner無法連接Gitea**
```bash
curl -I https://gitea.momentry.ddns.net
```
**Q: Workflow執行失敗**
```bash
tail -f /tmp/gitea-runner.log
tail -f /tmp/gitea-runner.err
```
**Q: macOS功能測試失敗**
-確認SwitchAudioSource已安裝`brew install switchaudio-source`
-確認使用`runs-on: macos-latest`bare-metal執行
---
##Runner配置檔案
**位置:** `/Users/accusys/markbase/.runner`
**重要:**
-不要手動刪除.runner檔案會導致Runner重新註冊
- Runner token與註冊token不同已自動生成
---
**最後更新2026-05-16**