runtrace-ai 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. runtrace_ai-0.1.2/.agents/plugins/marketplace.json +20 -0
  2. runtrace_ai-0.1.2/.claude-plugin/marketplace.json +17 -0
  3. runtrace_ai-0.1.2/.dockerignore +20 -0
  4. runtrace_ai-0.1.2/.env.example +21 -0
  5. runtrace_ai-0.1.2/.github/workflows/ci.yml +49 -0
  6. runtrace_ai-0.1.2/.github/workflows/containers.yml +92 -0
  7. runtrace_ai-0.1.2/.github/workflows/publish-pypi.yml +20 -0
  8. runtrace_ai-0.1.2/.github/workflows/release.yml +30 -0
  9. runtrace_ai-0.1.2/.gitignore +41 -0
  10. runtrace_ai-0.1.2/Dockerfile.api +25 -0
  11. runtrace_ai-0.1.2/LICENSE +661 -0
  12. runtrace_ai-0.1.2/PKG-INFO +235 -0
  13. runtrace_ai-0.1.2/README.md +193 -0
  14. runtrace_ai-0.1.2/alembic.ini +39 -0
  15. runtrace_ai-0.1.2/apps/api/migrations/env.py +33 -0
  16. runtrace_ai-0.1.2/apps/api/migrations/script.py.mako +25 -0
  17. runtrace_ai-0.1.2/apps/api/migrations/versions/0001_initial.py +26 -0
  18. runtrace_ai-0.1.2/apps/api/migrations/versions/0002_project_progress_metric.py +30 -0
  19. runtrace_ai-0.1.2/apps/api/migrations/versions/0003_vector_search.py +47 -0
  20. runtrace_ai-0.1.2/apps/api/migrations/versions/0004_tag_registry.py +50 -0
  21. runtrace_ai-0.1.2/apps/api/migrations/versions/0005_instance_auth.py +104 -0
  22. runtrace_ai-0.1.2/apps/api/migrations/versions/0006_api_tokens.py +42 -0
  23. runtrace_ai-0.1.2/apps/api/migrations/versions/0007_password_auth.py +24 -0
  24. runtrace_ai-0.1.2/apps/api/migrations/versions/0008_identity_usernames.py +58 -0
  25. runtrace_ai-0.1.2/apps/api/runtrace_api/__init__.py +2 -0
  26. runtrace_ai-0.1.2/apps/api/runtrace_api/auth.py +481 -0
  27. runtrace_ai-0.1.2/apps/api/runtrace_api/config.py +34 -0
  28. runtrace_ai-0.1.2/apps/api/runtrace_api/database.py +21 -0
  29. runtrace_ai-0.1.2/apps/api/runtrace_api/embeddings.py +82 -0
  30. runtrace_ai-0.1.2/apps/api/runtrace_api/main.py +1152 -0
  31. runtrace_ai-0.1.2/apps/api/runtrace_api/models.py +341 -0
  32. runtrace_ai-0.1.2/apps/api/runtrace_api/schemas.py +217 -0
  33. runtrace_ai-0.1.2/apps/api/runtrace_api/seed.py +145 -0
  34. runtrace_ai-0.1.2/apps/mcp/runtrace_mcp/__init__.py +2 -0
  35. runtrace_ai-0.1.2/apps/mcp/runtrace_mcp/server.py +117 -0
  36. runtrace_ai-0.1.2/apps/web/.dockerignore +3 -0
  37. runtrace_ai-0.1.2/apps/web/.gitignore +41 -0
  38. runtrace_ai-0.1.2/apps/web/AGENTS.md +5 -0
  39. runtrace_ai-0.1.2/apps/web/CLAUDE.md +1 -0
  40. runtrace_ai-0.1.2/apps/web/Dockerfile +27 -0
  41. runtrace_ai-0.1.2/apps/web/README.md +28 -0
  42. runtrace_ai-0.1.2/apps/web/components.json +25 -0
  43. runtrace_ai-0.1.2/apps/web/eslint.config.mjs +18 -0
  44. runtrace_ai-0.1.2/apps/web/next.config.ts +16 -0
  45. runtrace_ai-0.1.2/apps/web/package-lock.json +9617 -0
  46. runtrace_ai-0.1.2/apps/web/package.json +35 -0
  47. runtrace_ai-0.1.2/apps/web/postcss.config.mjs +7 -0
  48. runtrace_ai-0.1.2/apps/web/public/.gitkeep +1 -0
  49. runtrace_ai-0.1.2/apps/web/src/app/access/page.tsx +9 -0
  50. runtrace_ai-0.1.2/apps/web/src/app/account/page.tsx +9 -0
  51. runtrace_ai-0.1.2/apps/web/src/app/docs/page.tsx +139 -0
  52. runtrace_ai-0.1.2/apps/web/src/app/favicon.ico +0 -0
  53. runtrace_ai-0.1.2/apps/web/src/app/globals.css +163 -0
  54. runtrace_ai-0.1.2/apps/web/src/app/layout.tsx +31 -0
  55. runtrace_ai-0.1.2/apps/web/src/app/page.tsx +5 -0
  56. runtrace_ai-0.1.2/apps/web/src/app/projects/[slug]/archive/page.tsx +6 -0
  57. runtrace_ai-0.1.2/apps/web/src/app/projects/[slug]/page.tsx +6 -0
  58. runtrace_ai-0.1.2/apps/web/src/app/projects/[slug]/search/page.tsx +6 -0
  59. runtrace_ai-0.1.2/apps/web/src/app/projects/[slug]/settings/page.tsx +6 -0
  60. runtrace_ai-0.1.2/apps/web/src/components/access-admin.tsx +136 -0
  61. runtrace_ai-0.1.2/apps/web/src/components/account-menu.tsx +34 -0
  62. runtrace_ai-0.1.2/apps/web/src/components/account-settings.tsx +46 -0
  63. runtrace_ai-0.1.2/apps/web/src/components/app-settings-dialog.tsx +92 -0
  64. runtrace_ai-0.1.2/apps/web/src/components/appearance-provider.tsx +82 -0
  65. runtrace_ai-0.1.2/apps/web/src/components/artifact-files.tsx +94 -0
  66. runtrace_ai-0.1.2/apps/web/src/components/auth-provider.tsx +120 -0
  67. runtrace_ai-0.1.2/apps/web/src/components/create-experiment-dialog.tsx +61 -0
  68. runtrace_ai-0.1.2/apps/web/src/components/create-project-dialog.tsx +83 -0
  69. runtrace_ai-0.1.2/apps/web/src/components/edit-experiment-dialog.tsx +98 -0
  70. runtrace_ai-0.1.2/apps/web/src/components/progress-chart.tsx +106 -0
  71. runtrace_ai-0.1.2/apps/web/src/components/project-shell.tsx +69 -0
  72. runtrace_ai-0.1.2/apps/web/src/components/project-workspace.tsx +254 -0
  73. runtrace_ai-0.1.2/apps/web/src/components/projects-screen.tsx +123 -0
  74. runtrace_ai-0.1.2/apps/web/src/components/record-actions.tsx +58 -0
  75. runtrace_ai-0.1.2/apps/web/src/components/record-detail-dialog.tsx +124 -0
  76. runtrace_ai-0.1.2/apps/web/src/components/run-curve-chart.tsx +79 -0
  77. runtrace_ai-0.1.2/apps/web/src/components/runtrace-logo.tsx +12 -0
  78. runtrace_ai-0.1.2/apps/web/src/components/status-badge.tsx +17 -0
  79. runtrace_ai-0.1.2/apps/web/src/components/tag-filter.tsx +56 -0
  80. runtrace_ai-0.1.2/apps/web/src/components/ui/alert-dialog.tsx +187 -0
  81. runtrace_ai-0.1.2/apps/web/src/components/ui/badge.tsx +52 -0
  82. runtrace_ai-0.1.2/apps/web/src/components/ui/button.tsx +58 -0
  83. runtrace_ai-0.1.2/apps/web/src/components/ui/card.tsx +103 -0
  84. runtrace_ai-0.1.2/apps/web/src/components/ui/dialog.tsx +160 -0
  85. runtrace_ai-0.1.2/apps/web/src/components/ui/dropdown-menu.tsx +268 -0
  86. runtrace_ai-0.1.2/apps/web/src/components/ui/empty.tsx +104 -0
  87. runtrace_ai-0.1.2/apps/web/src/components/ui/field.tsx +238 -0
  88. runtrace_ai-0.1.2/apps/web/src/components/ui/input-group.tsx +158 -0
  89. runtrace_ai-0.1.2/apps/web/src/components/ui/input.tsx +20 -0
  90. runtrace_ai-0.1.2/apps/web/src/components/ui/label.tsx +20 -0
  91. runtrace_ai-0.1.2/apps/web/src/components/ui/scroll-area.tsx +55 -0
  92. runtrace_ai-0.1.2/apps/web/src/components/ui/select.tsx +201 -0
  93. runtrace_ai-0.1.2/apps/web/src/components/ui/separator.tsx +25 -0
  94. runtrace_ai-0.1.2/apps/web/src/components/ui/sheet.tsx +138 -0
  95. runtrace_ai-0.1.2/apps/web/src/components/ui/skeleton.tsx +13 -0
  96. runtrace_ai-0.1.2/apps/web/src/components/ui/sonner.tsx +49 -0
  97. runtrace_ai-0.1.2/apps/web/src/components/ui/switch.tsx +32 -0
  98. runtrace_ai-0.1.2/apps/web/src/components/ui/table.tsx +116 -0
  99. runtrace_ai-0.1.2/apps/web/src/components/ui/textarea.tsx +18 -0
  100. runtrace_ai-0.1.2/apps/web/src/components/ui/toggle-group.tsx +89 -0
  101. runtrace_ai-0.1.2/apps/web/src/components/ui/toggle.tsx +45 -0
  102. runtrace_ai-0.1.2/apps/web/src/components/ui/tooltip.tsx +66 -0
  103. runtrace_ai-0.1.2/apps/web/src/lib/api.ts +78 -0
  104. runtrace_ai-0.1.2/apps/web/src/lib/auth.ts +58 -0
  105. runtrace_ai-0.1.2/apps/web/src/lib/types.ts +160 -0
  106. runtrace_ai-0.1.2/apps/web/src/lib/utils.ts +6 -0
  107. runtrace_ai-0.1.2/apps/web/tsconfig.json +34 -0
  108. runtrace_ai-0.1.2/docker-compose.ghcr.yml +12 -0
  109. runtrace_ai-0.1.2/docker-compose.yml +90 -0
  110. runtrace_ai-0.1.2/docs/README.md +95 -0
  111. runtrace_ai-0.1.2/docs/auth.md +65 -0
  112. runtrace_ai-0.1.2/docs/integrations.md +91 -0
  113. runtrace_ai-0.1.2/docs/plugin-terms.md +7 -0
  114. runtrace_ai-0.1.2/docs/privacy.md +9 -0
  115. runtrace_ai-0.1.2/examples/metric_demo.py +9 -0
  116. runtrace_ai-0.1.2/packages/python_sdk/runtrace/__init__.py +4 -0
  117. runtrace_ai-0.1.2/packages/python_sdk/runtrace/cli.py +140 -0
  118. runtrace_ai-0.1.2/packages/python_sdk/runtrace/client.py +260 -0
  119. runtrace_ai-0.1.2/packages/python_sdk/runtrace/credentials.py +85 -0
  120. runtrace_ai-0.1.2/plugins/runtrace/.claude-plugin/plugin.json +24 -0
  121. runtrace_ai-0.1.2/plugins/runtrace/.codex-plugin/plugin.json +30 -0
  122. runtrace_ai-0.1.2/plugins/runtrace/.mcp.json +15 -0
  123. runtrace_ai-0.1.2/plugins/runtrace/skills/runtrace/SKILL.md +26 -0
  124. runtrace_ai-0.1.2/plugins/runtrace/skills/runtrace/agents/openai.yaml +4 -0
  125. runtrace_ai-0.1.2/plugins/runtrace/skills/runtrace/references/connection.md +22 -0
  126. runtrace_ai-0.1.2/program.md +394 -0
  127. runtrace_ai-0.1.2/pyproject.toml +68 -0
  128. runtrace_ai-0.1.2/scripts/reset-demo.sh +19 -0
  129. runtrace_ai-0.1.2/scripts/sync_autoresearch_results.py +211 -0
  130. runtrace_ai-0.1.2/tests/conftest.py +25 -0
  131. runtrace_ai-0.1.2/tests/test_api.py +231 -0
  132. runtrace_ai-0.1.2/tests/test_api_full.py +158 -0
  133. runtrace_ai-0.1.2/tests/test_auth.py +185 -0
  134. runtrace_ai-0.1.2/tests/test_cli.py +135 -0
  135. runtrace_ai-0.1.2/tests/test_credentials.py +39 -0
  136. runtrace_ai-0.1.2/tests/test_mcp.py +85 -0
  137. runtrace_ai-0.1.2/tests/test_migrations.py +67 -0
  138. runtrace_ai-0.1.2/tests/test_sdk.py +60 -0
  139. runtrace_ai-0.1.2/uv.lock +2434 -0
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "runtrace",
3
+ "interface": {
4
+ "displayName": "RunTrace"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "runtrace",
9
+ "source": {
10
+ "source": "local",
11
+ "path": "./plugins/runtrace"
12
+ },
13
+ "policy": {
14
+ "installation": "AVAILABLE",
15
+ "authentication": "ON_INSTALL"
16
+ },
17
+ "category": "Productivity"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3
+ "name": "runtrace",
4
+ "description": "Official RunTrace plugins for research agents.",
5
+ "owner": {
6
+ "name": "RunTrace contributors"
7
+ },
8
+ "plugins": [
9
+ {
10
+ "name": "runtrace",
11
+ "description": "Persistent experiment memory and run tracking for autonomous research agents.",
12
+ "source": "./plugins/runtrace",
13
+ "category": "development",
14
+ "homepage": "https://github.com/vano04/RunTrace"
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,20 @@
1
+ .git
2
+ .github
3
+ .DS_Store
4
+ .env
5
+ .env.*
6
+ .venv
7
+ .uv-cache
8
+ __pycache__
9
+ *.py[cod]
10
+ *.db
11
+ data
12
+ apps/web/node_modules
13
+ apps/web/.next
14
+ tests/.runtime
15
+ .pytest_cache
16
+ .coverage
17
+ htmlcov
18
+ docs
19
+ examples
20
+ tests
@@ -0,0 +1,21 @@
1
+ # Native development defaults. Docker Compose supplies service-local values for
2
+ # the database, API, and artifact paths.
3
+ RUNTRACE_DATABASE_URL=postgresql+psycopg://runtrace:runtrace@localhost:5432/runtrace
4
+ RUNTRACE_BASE_URL=http://localhost:8000
5
+ # Client-only bearer token. Create it in Access -> Your agent tokens; never commit it.
6
+ RUNTRACE_API_TOKEN=
7
+ RUNTRACE_ARTIFACT_PATH=./data/artifacts
8
+ RUNTRACE_CORS_ORIGINS=http://localhost:3000
9
+ RUNTRACE_SEED_DEMO=false
10
+ RUNTRACE_DEV=false
11
+ RUNTRACE_AUTO_MIGRATE=true
12
+ RUNTRACE_MAX_ARTIFACT_SIZE=10485760
13
+ RUNTRACE_CLAIM_TIMEOUT_SECONDS=300
14
+ RUNTRACE_EMBEDDINGS_ENABLED=true
15
+ RUNTRACE_EMBEDDING_MODEL=BAAI/bge-small-en-v1.5
16
+ RUNTRACE_EMBEDDING_CACHE_PATH=./data/models
17
+ RUNTRACE_SECURE_SESSION_COOKIE=false
18
+ # One-time migration aid for a passkey-era owner. Remove after the first start.
19
+ RUNTRACE_OWNER_RECOVERY_PASSWORD=
20
+ RUNTRACE_SESSION_TTL_HOURS=168
21
+ RUNTRACE_SETUP_LINK_TTL_HOURS=24
@@ -0,0 +1,49 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master, main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ concurrency:
12
+ group: ci-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ python:
17
+ name: Python tests
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v7
21
+ - name: Install uv
22
+ uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
23
+ with:
24
+ version: "0.11.28"
25
+ enable-cache: true
26
+ - name: Install Python dependencies
27
+ run: uv sync --locked --all-extras
28
+ - name: Run tests
29
+ run: uv run pytest
30
+
31
+ web:
32
+ name: Web lint and build
33
+ runs-on: ubuntu-latest
34
+ steps:
35
+ - uses: actions/checkout@v7
36
+ - name: Set up Node.js
37
+ uses: actions/setup-node@v6
38
+ with:
39
+ node-version: 22
40
+ cache: npm
41
+ cache-dependency-path: apps/web/package-lock.json
42
+ - name: Install dependencies
43
+ run: npm --prefix apps/web ci
44
+ - name: Lint
45
+ run: npm --prefix apps/web run lint
46
+ - name: Build
47
+ run: npm --prefix apps/web run build
48
+ - name: Validate Compose configuration
49
+ run: docker compose config --quiet
@@ -0,0 +1,92 @@
1
+ name: Publish containers
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+ inputs:
8
+ ref:
9
+ description: Git ref to build
10
+ required: true
11
+ default: v0.1.2
12
+ version:
13
+ description: Container version tag without the v prefix
14
+ required: true
15
+ default: 0.1.2
16
+
17
+ permissions:
18
+ contents: read
19
+ packages: write
20
+ id-token: write
21
+ attestations: write
22
+
23
+ concurrency:
24
+ group: containers-${{ github.event.release.tag_name || inputs.version }}
25
+ cancel-in-progress: false
26
+
27
+ jobs:
28
+ publish:
29
+ name: Publish ${{ matrix.title }}
30
+ runs-on: ubuntu-latest
31
+ strategy:
32
+ fail-fast: false
33
+ matrix:
34
+ include:
35
+ - title: RunTrace runtime
36
+ image: ghcr.io/vano04/runtrace
37
+ context: .
38
+ file: ./Dockerfile.api
39
+ cache: runtime
40
+ - title: RunTrace web
41
+ image: ghcr.io/vano04/runtrace-web
42
+ context: ./apps/web
43
+ file: ./apps/web/Dockerfile
44
+ cache: web
45
+ steps:
46
+ - uses: actions/checkout@v7
47
+ with:
48
+ ref: ${{ github.event.release.tag_name || inputs.ref }}
49
+ - uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
50
+ - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
51
+ - name: Log in to GHCR
52
+ uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
53
+ with:
54
+ registry: ghcr.io
55
+ username: ${{ github.actor }}
56
+ password: ${{ secrets.GITHUB_TOKEN }}
57
+ - name: Resolve version
58
+ id: version
59
+ env:
60
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
61
+ INPUT_VERSION: ${{ inputs.version }}
62
+ run: echo "version=${RELEASE_TAG#v}${INPUT_VERSION}" >> "$GITHUB_OUTPUT"
63
+ - name: Generate image metadata
64
+ id: meta
65
+ uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
66
+ with:
67
+ images: ${{ matrix.image }}
68
+ tags: |
69
+ type=raw,value=${{ steps.version.outputs.version }}
70
+ type=raw,value=latest
71
+ labels: |
72
+ org.opencontainers.image.title=${{ matrix.title }}
73
+ org.opencontainers.image.source=https://github.com/vano04/RunTrace
74
+ org.opencontainers.image.version=${{ steps.version.outputs.version }}
75
+ - name: Build and publish
76
+ id: push
77
+ uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
78
+ with:
79
+ context: ${{ matrix.context }}
80
+ file: ${{ matrix.file }}
81
+ platforms: linux/amd64
82
+ push: true
83
+ tags: ${{ steps.meta.outputs.tags }}
84
+ labels: ${{ steps.meta.outputs.labels }}
85
+ cache-from: type=gha,scope=${{ matrix.cache }}
86
+ cache-to: type=gha,mode=max,scope=${{ matrix.cache }}
87
+ - name: Attest image provenance
88
+ uses: actions/attest@a1948c3f048ba23858d222213b7c278aabede763 # v4
89
+ with:
90
+ subject-name: ${{ matrix.image }}
91
+ subject-digest: ${{ steps.push.outputs.digest }}
92
+ push-to-registry: true
@@ -0,0 +1,20 @@
1
+ name: Publish Python package
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ permissions:
7
+ contents: read
8
+ id-token: write
9
+
10
+ jobs:
11
+ publish:
12
+ runs-on: ubuntu-latest
13
+ environment: pypi
14
+ steps:
15
+ - uses: actions/checkout@v7
16
+ - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
17
+ with:
18
+ version: "0.11.28"
19
+ - run: uv build
20
+ - run: uv publish --trusted-publishing always
@@ -0,0 +1,30 @@
1
+ name: Release artifacts
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+
7
+ permissions:
8
+ contents: write
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v7
15
+ - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
16
+ with:
17
+ version: "0.11.28"
18
+ - name: Build wheel and source distribution
19
+ run: uv build
20
+ - name: Verify distributions
21
+ run: uv run --with twine twine check dist/*
22
+ - uses: actions/upload-artifact@v6
23
+ with:
24
+ name: python-distributions
25
+ path: dist/*
26
+ if-no-files-found: error
27
+ - name: Create GitHub release
28
+ env:
29
+ GH_TOKEN: ${{ github.token }}
30
+ run: gh release create "${{ github.ref_name }}" dist/* --generate-notes --verify-tag
@@ -0,0 +1,41 @@
1
+ # Operating systems and editors
2
+ .DS_Store
3
+ Thumbs.db
4
+ .idea/
5
+ .vscode/
6
+ *.swp
7
+
8
+ # Local configuration and secrets
9
+ .env
10
+ .env.*
11
+ !.env.example
12
+ *.pem
13
+
14
+ # Python
15
+ .venv/
16
+ .uv-cache/
17
+ __pycache__/
18
+ *.py[cod]
19
+ *.egg-info/
20
+ build/
21
+ dist/
22
+ *.db
23
+ .pytest_cache/
24
+ .coverage
25
+ .coverage.*
26
+ htmlcov/
27
+
28
+ # Node.js and Next.js
29
+ node_modules/
30
+ .next/
31
+ out/
32
+ coverage/
33
+ *.tsbuildinfo
34
+ npm-debug.log*
35
+ yarn-debug.log*
36
+ yarn-error.log*
37
+ .pnpm-debug.log*
38
+
39
+ # Runtime data
40
+ data/
41
+ tests/.runtime/
@@ -0,0 +1,25 @@
1
+ FROM python:3.13-slim AS builder
2
+ WORKDIR /app
3
+ COPY pyproject.toml README.md uv.lock ./
4
+ COPY alembic.ini ./
5
+ COPY apps/api ./apps/api
6
+ COPY apps/mcp ./apps/mcp
7
+ COPY packages ./packages
8
+ RUN pip wheel --no-cache-dir --wheel-dir /wheels '.[server,mcp,embeddings]'
9
+
10
+ FROM python:3.13-slim AS runtime
11
+ WORKDIR /app
12
+ LABEL org.opencontainers.image.source="https://github.com/vano04/RunTrace"
13
+ LABEL org.opencontainers.image.description="RunTrace API, CLI, SDK, and MCP runtime"
14
+ COPY --from=builder /wheels /wheels
15
+ RUN pip install --no-cache-dir /wheels/* \
16
+ && rm -rf /wheels \
17
+ && useradd --create-home --uid 10001 runtrace \
18
+ && mkdir -p /data/artifacts /data/models \
19
+ && chown -R runtrace:runtrace /data
20
+ COPY alembic.ini ./
21
+ COPY apps/api/migrations ./apps/api/migrations
22
+ ENV RUNTRACE_ARTIFACT_PATH=/data/artifacts
23
+ EXPOSE 8000
24
+ USER runtrace
25
+ CMD ["sh", "-c", "alembic upgrade head && exec uvicorn runtrace_api.main:app --host 0.0.0.0 --port 8000"]