chore: Phase 0 scaffolding (issues #3 #4 #5 #7) - #22
Merged
Merged
Conversation
Sets up the polyglot monorepo for AF Stack:
- pnpm workspace for TypeScript packages (apps/dashboard, packages/sdk-ts,
packages/ui, packages/auth, packages/db, packages/gateway-client)
- uv workspace for Python packages (packages/sdk-py, apps/backend, examples)
- single Go module rooted at github.com/Agent-Field/backai
- Tool configs: golangci.yml, ruff (pyproject.toml), prettier, tsconfig.base
- Editor config
Directory layout matches TECH-SPEC §2:
- apps/{backend,dashboard}
- packages/{sdk-py,sdk-ts,sdk-go,auth,db,gateway-client,ui}
- services/{runtime,cli,sandbox-host}
- modules/ (14 suite modules)
- workload-modules/ (3 optional importable)
- examples/ (6 examples)
- deploy/{helm,nomad}
Package stubs (build + test green):
- @af-stack/sdk (TypeScript) — version stub with vitest test
- af-stack (Python) — version stub with pytest test
- github.com/.../packages/sdk-go/suite (Go) — version stub with go test
GitHub Actions CI:
- Path-filtered jobs: only run affected language pipelines
- Lint + test per language (Go, Python, TypeScript)
- docker-compose syntax validation
- Docs link check
- Caching for fast re-runs
- Single ci-success aggregate for branch protection
GitHub config:
- Issue templates (bug, feature)
- PR template
CLI distribution strategy documented (docs/cli-distribution.md):
- Single Go binary, install via curl install.sh (matches AgentField pattern)
- Distribution channels: install.sh, Homebrew, Scoop, GitHub Releases, Docker
- No npm/bunx/pipx fragmentation
Closes #3 #4 #7
While the project is in early build, CI workflows only trigger via workflow_dispatch. Add scripts/local-ci.sh that runs the equivalent checks locally (Go build+vet+test, Python ruff+pytest, TS pnpm+vitest, compose config). Use before every commit. Also: prettier-format files that had trailing whitespace issues.
santoshkumarradha
added a commit
that referenced
this pull request
Jun 8, 2026
Eight items dispatched across multiple parallel sub-agents: #14 Multimodal API — OpenAI-compat audio/image endpoints - POST /api/v1/audio/{speech,transcriptions,translations} - POST /api/v1/images/{generations,edits,variations} - 5 adapters: litellm (fallback), elevenlabs, cartesia, flux, fal - Cost tracking with new modality column (migration 00023) - Python + TS SDKs: suite.audio.*, suite.images.* #15 Realtime run subscriptions — live agent run events over WS - GET /api/v1/realtime/runs with server-side filtering - SSE→WS bridge through AgentField's per-execution event stream - SDK: suite.runs.subscribe() AsyncIterator - Dashboard live-runs-strip demo on Operate → Runs #16 Agent tool adapters — 6 tool types, 13 adapters - Browser (browseruse/steel/playwright) - Search (searxng/tavily/brave/exa/duckduckgo) - FS, Exec (sandbox-wrapping) - HTTP (safehttp), SQL (readonly) - MCP-callable via native:* namespace - Per-tenant enable via suite_tenant_tools (migration 00020) #18 OAuth-on-behalf-of-user — Composio-shape OAuth - Google + GitHub working; Notion/Slack/Linear stubbed - HMAC-signed state nonce (CSRF) - AES-256-GCM token storage via secrets vault - Migration 00021 with vault refs (no plaintext) - Customer-app /integrations page #22 LiteLLM virtual keys — per-key budgets + rate limits upstream - IssueAPIKey mints LiteLLM virtual key with budget/rpm/tpm - Atomic rollback on LiteLLM failure - Per-tenant key passed via context to LLM gateway calls - Dashboard: budget progress bars, RPM column, form fields - Migration 00022 #25 AgentField data in dashboard — link-out + summary - GetRunOverview, GetExecutionDetails, CancelAgentExecution, etc. - 5 new routes: GET /runs/{id}/agentfield + 4 control verbs - Dashboard: run-summary-card, run-actions, View in AgentField link - Graceful fallback when AgentField unreachable #31 internal/memory dedup audit — keep suite_memory canonical - AgentField memory NOT bridged to af-stack runtime - All examples use suite.memory.* → suite_memory table - Bridge requires AgentField repo changes; punt - #25 scope narrowed to runs/spans only (no memory work) #32 Kill internal/ratelimit — upstream enforcement via LiteLLM - Deleted internal/ratelimit/ package (~150 LoC) - 429 passthrough with Retry-After + X-RateLimit-* headers - Centralized in llmAPIErrorResponse; multimodal handlers inherit - Removed middleware from server.go + main.go wiring Quality gates: - go build ./... ✓ - go vet ./... ✓ - go test ./services/runtime/... → 745 tests pass in 76 packages - TS SDK + dashboard builds clean - Python SDK ruff clean Docs updated: STRATEGY.md, POSITIONING.md, EXTENSIBILITY.md, OSS-AUDIT.md, SKILL.md, rules/sdk.md, rules/primitives.md, MULTI-ITEM-PLAN.md. New docs: docs/oauth.md, docs/multimodal.md, docs/realtime-runs.md, docs/agentfield-integration.md. 393 files changed, 47341+ / 2688-. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bootstraps the AF Stack monorepo with language tooling, CI, and the repo skeleton.
Closes #3 (monorepo scaffolding) — pnpm + uv + Go workspaces, tool configs
Closes #4 (CI pipeline) — GitHub Actions with path-filtered language jobs
Closes #5 (pre-commit hooks) — deferred to follow-up; lefthook will be added before Phase 1
Closes #7 (repo skeleton dirs) — matches TECH-SPEC §2
Changes
package.json,pnpm-workspace.yaml,pyproject.toml,go.mod,.editorconfig,.prettierrc,.golangci.yml,tsconfig.base.jsonapps/,packages/,services/,modules/,workload-modules/,examples/,deploy/services/runtime/cmd/af-stack/main.goTest plan
go build ./...succeedsgo test ./...passes (sdk-go version test green)docker compose config --quietvalidates composeNote
Issue #5 (lefthook pre-commit) deferred — will add before Phase 1 closure so dev loop is tight.