orc-hestrator-server 2.0.0__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 (176) hide show
  1. orc_hestrator_server-2.0.0/.github/dependabot.yml +12 -0
  2. orc_hestrator_server-2.0.0/.github/pull_request_template.md +15 -0
  3. orc_hestrator_server-2.0.0/.github/workflows/ci.yml +64 -0
  4. orc_hestrator_server-2.0.0/.github/workflows/codeql.yml +17 -0
  5. orc_hestrator_server-2.0.0/.github/workflows/links.yml +49 -0
  6. orc_hestrator_server-2.0.0/.github/workflows/publish.yml +20 -0
  7. orc_hestrator_server-2.0.0/.github/workflows/stale.yml +14 -0
  8. orc_hestrator_server-2.0.0/.gitignore +16 -0
  9. orc_hestrator_server-2.0.0/AGENTS.md +102 -0
  10. orc_hestrator_server-2.0.0/CHANGELOG.md +247 -0
  11. orc_hestrator_server-2.0.0/LICENSE +21 -0
  12. orc_hestrator_server-2.0.0/PKG-INFO +302 -0
  13. orc_hestrator_server-2.0.0/README.md +273 -0
  14. orc_hestrator_server-2.0.0/deploy/nginx/orc-hestrator.dev.conf +69 -0
  15. orc_hestrator_server-2.0.0/deploy/orc.env.example +42 -0
  16. orc_hestrator_server-2.0.0/deploy/orc.service +36 -0
  17. orc_hestrator_server-2.0.0/docs/ARCHITECTURE.md +120 -0
  18. orc_hestrator_server-2.0.0/docs/BRING-YOUR-AGENT.md +140 -0
  19. orc_hestrator_server-2.0.0/docs/CONFIGURATION.md +125 -0
  20. orc_hestrator_server-2.0.0/docs/PRD.md +123 -0
  21. orc_hestrator_server-2.0.0/docs/SITE.md +141 -0
  22. orc_hestrator_server-2.0.0/docs/TOOLS.md +224 -0
  23. orc_hestrator_server-2.0.0/docs/WEB-UI.md +56 -0
  24. orc_hestrator_server-2.0.0/docs/WORKSPACE-GUIDE.md +73 -0
  25. orc_hestrator_server-2.0.0/docs/adr/ADR-001-servico-central-vps.md +43 -0
  26. orc_hestrator_server-2.0.0/docs/adr/ADR-002-incorporar-session-registry.md +49 -0
  27. orc_hestrator_server-2.0.0/docs/adr/ADR-003-fonte-unica-depois-hibrido.md +45 -0
  28. orc_hestrator_server-2.0.0/docs/adr/ADR-004-seguranca-nginx-oauth2.md +39 -0
  29. orc_hestrator_server-2.0.0/docs/adr/ADR-005-agent-id-per-request.md +42 -0
  30. orc_hestrator_server-2.0.0/docs/adr/ADR-006-rename-orc-hestrator.md +69 -0
  31. orc_hestrator_server-2.0.0/docs/adr/ADR-007-transport-by-entry-point.md +51 -0
  32. orc_hestrator_server-2.0.0/docs/assets/orc-logo-256.png +0 -0
  33. orc_hestrator_server-2.0.0/docs/assets/orc-logo.png +0 -0
  34. orc_hestrator_server-2.0.0/docs/research/agentic-factory-feats.md +72 -0
  35. orc_hestrator_server-2.0.0/docs/rfc/RFC-001-orquestracao-visual-colaborativa.md +463 -0
  36. orc_hestrator_server-2.0.0/docs/rfc/matriz-decisao-oss-2026-10-14.md +92 -0
  37. orc_hestrator_server-2.0.0/docs/specs/SPEC-agent-ergonomics.md +149 -0
  38. orc_hestrator_server-2.0.0/docs/specs/SPEC-agent-id-per-request.md +72 -0
  39. orc_hestrator_server-2.0.0/docs/specs/SPEC-bring-your-agent-onboarding.md +156 -0
  40. orc_hestrator_server-2.0.0/docs/specs/SPEC-http-api.md +79 -0
  41. orc_hestrator_server-2.0.0/docs/specs/SPEC-oauth2-resource-server.md +72 -0
  42. orc_hestrator_server-2.0.0/docs/specs/SPEC-rename-orc-hestrator.md +236 -0
  43. orc_hestrator_server-2.0.0/docs/specs/SPEC-session-registry.md +94 -0
  44. orc_hestrator_server-2.0.0/docs/specs/SPEC-user-auth-rbac.md +106 -0
  45. orc_hestrator_server-2.0.0/frontend/.env.example +7 -0
  46. orc_hestrator_server-2.0.0/frontend/.gitignore +17 -0
  47. orc_hestrator_server-2.0.0/frontend/README.md +82 -0
  48. orc_hestrator_server-2.0.0/frontend/e2e/admin.yaml +50 -0
  49. orc_hestrator_server-2.0.0/frontend/e2e/arcs.yaml +50 -0
  50. orc_hestrator_server-2.0.0/frontend/e2e/board.yaml +54 -0
  51. orc_hestrator_server-2.0.0/frontend/e2e/config.yaml +5 -0
  52. orc_hestrator_server-2.0.0/frontend/e2e/dashboard.yaml +68 -0
  53. orc_hestrator_server-2.0.0/frontend/e2e/graph.yaml +56 -0
  54. orc_hestrator_server-2.0.0/frontend/e2e/live.yaml +90 -0
  55. orc_hestrator_server-2.0.0/frontend/e2e/login.yaml +52 -0
  56. orc_hestrator_server-2.0.0/frontend/e2e/profile.yaml +41 -0
  57. orc_hestrator_server-2.0.0/frontend/e2e/run-ci.cjs +66 -0
  58. orc_hestrator_server-2.0.0/frontend/e2e/run.cjs +57 -0
  59. orc_hestrator_server-2.0.0/frontend/e2e/task-detail.yaml +49 -0
  60. orc_hestrator_server-2.0.0/frontend/eslint.config.js +25 -0
  61. orc_hestrator_server-2.0.0/frontend/index.html +23 -0
  62. orc_hestrator_server-2.0.0/frontend/package-lock.json +4149 -0
  63. orc_hestrator_server-2.0.0/frontend/package.json +39 -0
  64. orc_hestrator_server-2.0.0/frontend/postcss.config.js +6 -0
  65. orc_hestrator_server-2.0.0/frontend/public/mascote.png +0 -0
  66. orc_hestrator_server-2.0.0/frontend/screenshots/orc-admin.png +0 -0
  67. orc_hestrator_server-2.0.0/frontend/screenshots/orc-arcs.png +0 -0
  68. orc_hestrator_server-2.0.0/frontend/screenshots/orc-auth-login.png +0 -0
  69. orc_hestrator_server-2.0.0/frontend/screenshots/orc-board.png +0 -0
  70. orc_hestrator_server-2.0.0/frontend/screenshots/orc-dashboard.png +0 -0
  71. orc_hestrator_server-2.0.0/frontend/screenshots/orc-graph.png +0 -0
  72. orc_hestrator_server-2.0.0/frontend/screenshots/orc-live.png +0 -0
  73. orc_hestrator_server-2.0.0/frontend/screenshots/orc-login.png +0 -0
  74. orc_hestrator_server-2.0.0/frontend/screenshots/orc-profile.png +0 -0
  75. orc_hestrator_server-2.0.0/frontend/screenshots/orc-task-detail.png +0 -0
  76. orc_hestrator_server-2.0.0/frontend/src/App.tsx +62 -0
  77. orc_hestrator_server-2.0.0/frontend/src/api/client.ts +287 -0
  78. orc_hestrator_server-2.0.0/frontend/src/api/types.ts +325 -0
  79. orc_hestrator_server-2.0.0/frontend/src/auth/AuthContext.tsx +77 -0
  80. orc_hestrator_server-2.0.0/frontend/src/auth/context.ts +26 -0
  81. orc_hestrator_server-2.0.0/frontend/src/components/Layout.tsx +124 -0
  82. orc_hestrator_server-2.0.0/frontend/src/components/Placeholder.tsx +14 -0
  83. orc_hestrator_server-2.0.0/frontend/src/components/ProtectedRoute.tsx +35 -0
  84. orc_hestrator_server-2.0.0/frontend/src/hooks/useTheme.ts +33 -0
  85. orc_hestrator_server-2.0.0/frontend/src/index.css +34 -0
  86. orc_hestrator_server-2.0.0/frontend/src/main.tsx +23 -0
  87. orc_hestrator_server-2.0.0/frontend/src/nav.ts +20 -0
  88. orc_hestrator_server-2.0.0/frontend/src/pages/Admin.tsx +505 -0
  89. orc_hestrator_server-2.0.0/frontend/src/pages/Arcs.tsx +334 -0
  90. orc_hestrator_server-2.0.0/frontend/src/pages/Board.tsx +417 -0
  91. orc_hestrator_server-2.0.0/frontend/src/pages/Graph.tsx +366 -0
  92. orc_hestrator_server-2.0.0/frontend/src/pages/LiveTeam.tsx +395 -0
  93. orc_hestrator_server-2.0.0/frontend/src/pages/Login.tsx +245 -0
  94. orc_hestrator_server-2.0.0/frontend/src/pages/Overview.tsx +473 -0
  95. orc_hestrator_server-2.0.0/frontend/src/pages/Profile.tsx +245 -0
  96. orc_hestrator_server-2.0.0/frontend/src/pages/TaskDetail.tsx +641 -0
  97. orc_hestrator_server-2.0.0/frontend/src/vite-env.d.ts +9 -0
  98. orc_hestrator_server-2.0.0/frontend/tailwind.config.js +99 -0
  99. orc_hestrator_server-2.0.0/frontend/tsconfig.app.json +28 -0
  100. orc_hestrator_server-2.0.0/frontend/tsconfig.json +7 -0
  101. orc_hestrator_server-2.0.0/frontend/tsconfig.node.json +22 -0
  102. orc_hestrator_server-2.0.0/frontend/vite.config.ts +25 -0
  103. orc_hestrator_server-2.0.0/llms.txt +59 -0
  104. orc_hestrator_server-2.0.0/pyproject.toml +82 -0
  105. orc_hestrator_server-2.0.0/scripts/generate_tools_doc.py +131 -0
  106. orc_hestrator_server-2.0.0/site/assets/orc-board-crop.png +0 -0
  107. orc_hestrator_server-2.0.0/site/assets/orc-board.png +0 -0
  108. orc_hestrator_server-2.0.0/site/assets/orc-logo-256.png +0 -0
  109. orc_hestrator_server-2.0.0/site/index.html +203 -0
  110. orc_hestrator_server-2.0.0/site/styles.css +502 -0
  111. orc_hestrator_server-2.0.0/src/task_orchestrator/__init__.py +3 -0
  112. orc_hestrator_server-2.0.0/src/task_orchestrator/auth.py +92 -0
  113. orc_hestrator_server-2.0.0/src/task_orchestrator/checkpoints.py +63 -0
  114. orc_hestrator_server-2.0.0/src/task_orchestrator/db.py +324 -0
  115. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/__init__.py +188 -0
  116. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/archive.py +74 -0
  117. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/base.py +163 -0
  118. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/claims.py +189 -0
  119. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/dependencies.py +195 -0
  120. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/items.py +391 -0
  121. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/metrics.py +296 -0
  122. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/notes.py +75 -0
  123. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/portability.py +224 -0
  124. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/presence.py +145 -0
  125. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/queries.py +233 -0
  126. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/transitions.py +292 -0
  127. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/trees.py +106 -0
  128. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/users.py +334 -0
  129. orc_hestrator_server-2.0.0/src/task_orchestrator/engine/workspace_view.py +122 -0
  130. orc_hestrator_server-2.0.0/src/task_orchestrator/onboarding.py +476 -0
  131. orc_hestrator_server-2.0.0/src/task_orchestrator/prompts.py +146 -0
  132. orc_hestrator_server-2.0.0/src/task_orchestrator/schemas.py +184 -0
  133. orc_hestrator_server-2.0.0/src/task_orchestrator/server.py +1135 -0
  134. orc_hestrator_server-2.0.0/src/task_orchestrator/ui/__init__.py +1 -0
  135. orc_hestrator_server-2.0.0/src/task_orchestrator/ui/app.py +567 -0
  136. orc_hestrator_server-2.0.0/src/task_orchestrator/ui/templates/arc_detail.html +179 -0
  137. orc_hestrator_server-2.0.0/src/task_orchestrator/ui/templates/arcs.html +56 -0
  138. orc_hestrator_server-2.0.0/src/task_orchestrator/ui/templates/base.html +18 -0
  139. orc_hestrator_server-2.0.0/src/task_orchestrator/ui/templates/board.html +186 -0
  140. orc_hestrator_server-2.0.0/src/task_orchestrator/ui/templates/partials/card.html +16 -0
  141. orc_hestrator_server-2.0.0/src/task_orchestrator/ui/templates/partials/column.html +8 -0
  142. orc_hestrator_server-2.0.0/src/task_orchestrator/ui/templates/partials/item_detail.html +41 -0
  143. orc_hestrator_server-2.0.0/src/task_orchestrator/ui/templates/partials/tree_node.html +41 -0
  144. orc_hestrator_server-2.0.0/src/task_orchestrator/ui/templates/timeline.html +161 -0
  145. orc_hestrator_server-2.0.0/src/task_orchestrator/web/__init__.py +4 -0
  146. orc_hestrator_server-2.0.0/src/task_orchestrator/web/api.py +410 -0
  147. orc_hestrator_server-2.0.0/src/task_orchestrator/web/graph.py +109 -0
  148. orc_hestrator_server-2.0.0/src/task_orchestrator/workspace.py +111 -0
  149. orc_hestrator_server-2.0.0/tests/__init__.py +0 -0
  150. orc_hestrator_server-2.0.0/tests/conftest.py +22 -0
  151. orc_hestrator_server-2.0.0/tests/test_agent_id.py +260 -0
  152. orc_hestrator_server-2.0.0/tests/test_agent_id_boundary.py +247 -0
  153. orc_hestrator_server-2.0.0/tests/test_archive.py +180 -0
  154. orc_hestrator_server-2.0.0/tests/test_characterization.py +115 -0
  155. orc_hestrator_server-2.0.0/tests/test_cli_entry_points.py +290 -0
  156. orc_hestrator_server-2.0.0/tests/test_dependency_pins.py +114 -0
  157. orc_hestrator_server-2.0.0/tests/test_engine.py +663 -0
  158. orc_hestrator_server-2.0.0/tests/test_env_precedence.py +202 -0
  159. orc_hestrator_server-2.0.0/tests/test_execution_stack.py +94 -0
  160. orc_hestrator_server-2.0.0/tests/test_graph_metrics.py +160 -0
  161. orc_hestrator_server-2.0.0/tests/test_http_api.py +325 -0
  162. orc_hestrator_server-2.0.0/tests/test_import_graph_topological.py +223 -0
  163. orc_hestrator_server-2.0.0/tests/test_oauth_auth.py +332 -0
  164. orc_hestrator_server-2.0.0/tests/test_onboarding.py +803 -0
  165. orc_hestrator_server-2.0.0/tests/test_onboarding_commands.py +59 -0
  166. orc_hestrator_server-2.0.0/tests/test_resilience.py +116 -0
  167. orc_hestrator_server-2.0.0/tests/test_server_identity.py +184 -0
  168. orc_hestrator_server-2.0.0/tests/test_session_registry.py +349 -0
  169. orc_hestrator_server-2.0.0/tests/test_session_registry_e2e.py +221 -0
  170. orc_hestrator_server-2.0.0/tests/test_tools_doc.py +103 -0
  171. orc_hestrator_server-2.0.0/tests/test_ui_swimlanes.py +157 -0
  172. orc_hestrator_server-2.0.0/tests/test_user_auth.py +321 -0
  173. orc_hestrator_server-2.0.0/tests/test_users_api.py +156 -0
  174. orc_hestrator_server-2.0.0/tests/test_workspace.py +108 -0
  175. orc_hestrator_server-2.0.0/tests/test_workspace_context.py +117 -0
  176. orc_hestrator_server-2.0.0/uv.lock +1318 -0
@@ -0,0 +1,12 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: pip
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ open-pull-requests-limit: 5
8
+ - package-ecosystem: github-actions
9
+ directory: /
10
+ schedule:
11
+ interval: weekly
12
+ open-pull-requests-limit: 3
@@ -0,0 +1,15 @@
1
+ ## Description
2
+ <!-- What does this PR do? -->
3
+
4
+ ## Type
5
+ - [ ] Bug fix
6
+ - [ ] New feature
7
+ - [ ] Documentation
8
+ - [ ] CI/Infrastructure
9
+
10
+ ## Testing
11
+ - [ ] Tests added/updated
12
+ - [ ] All tests pass
13
+
14
+ ## Related Issues
15
+ Closes #
@@ -0,0 +1,64 @@
1
+ name: CI
2
+
3
+ # Actions are SHA-pinned (not moving tags) for supply-chain safety, mirroring the
4
+ # convention established in mcp-memory-service. Dependabot (github-actions group)
5
+ # proposes bumps; the trailing comment records the human-readable version.
6
+ # paths-ignore on push skips CI for docs-only changes; pull_request has no filter
7
+ # so required checks still report (same reasoning as mcp-memory-service ci.yml).
8
+
9
+ on:
10
+ push:
11
+ branches: [main]
12
+ paths-ignore: ['docs/**', '*.md', 'LICENSE', '.gitignore']
13
+ pull_request:
14
+ branches: [main]
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ lint:
21
+ runs-on: ubuntu-latest
22
+ timeout-minutes: 5
23
+ steps:
24
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25
+ - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
26
+ with:
27
+ version: "0.9.18" # pinned so `uv lock` regeneration is reproducible (F7 R13)
28
+ # Pin ruff so a new release with new rules can't turn CI red without a code
29
+ # change. Bump this version deliberately. Config lives in pyproject [tool.ruff].
30
+ - run: uv tool run ruff@0.17.0 check src/ tests/
31
+ - run: uv tool run ruff@0.17.0 format --check src/ tests/
32
+
33
+ test:
34
+ runs-on: ubuntu-latest
35
+ needs: lint
36
+ timeout-minutes: 15
37
+ strategy:
38
+ fail-fast: false
39
+ matrix:
40
+ python-version: ["3.11", "3.12", "3.13"]
41
+ steps:
42
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
43
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
44
+ with:
45
+ python-version: ${{ matrix.python-version }}
46
+ - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
47
+ with:
48
+ version: "0.9.18" # pinned so `uv lock` regeneration is reproducible (F7 R13)
49
+ - name: Install
50
+ run: uv sync --extra test --extra ui
51
+ - name: Test with coverage
52
+ run: |
53
+ uv pip install pytest-cov
54
+ uv run pytest tests/ -v --tb=short --cov=src/task_orchestrator --cov-report=term --cov-fail-under=50
55
+
56
+ security:
57
+ runs-on: ubuntu-latest
58
+ timeout-minutes: 5
59
+ steps:
60
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
61
+ - name: Security check (bandit)
62
+ run: |
63
+ pip install bandit
64
+ bandit -r src/ -ll -ii --skip B608
@@ -0,0 +1,17 @@
1
+ name: CodeQL
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ pull_request:
6
+ branches: [main]
7
+ jobs:
8
+ analyze:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ security-events: write
12
+ steps:
13
+ - uses: actions/checkout@v7
14
+ - uses: github/codeql-action/init@v4
15
+ with:
16
+ languages: python
17
+ - uses: github/codeql-action/analyze@v4
@@ -0,0 +1,49 @@
1
+ name: Links
2
+
3
+ # Markdown link checking. Pattern mirrored from mcp-memory-service's links.yml:
4
+ # internal links checked on every push/PR (fast, offline); external links only on
5
+ # a weekly schedule (third-party sites answer unreliably — a red PR caused by
6
+ # someone else's server is noise). Uses lychee rather than porting the project's
7
+ # 197-line checker: the Orc has ~20 markdown files, so an off-the-shelf, pinned
8
+ # action is the right size.
9
+
10
+ on:
11
+ pull_request:
12
+ branches: [main]
13
+ push:
14
+ branches: [main]
15
+ schedule:
16
+ - cron: '17 5 * * 1' # Mondays 05:17 UTC — external pass
17
+ workflow_dispatch:
18
+
19
+ permissions:
20
+ contents: read
21
+
22
+ jobs:
23
+ internal:
24
+ if: github.event_name == 'pull_request' || github.event_name == 'push'
25
+ runs-on: ubuntu-latest
26
+ name: Internal links (offline)
27
+ timeout-minutes: 5
28
+ steps:
29
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
30
+ - uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
31
+ with:
32
+ # --offline: internal/relative links only; no network. Exclude the venv
33
+ # and git internals.
34
+ args: --offline --no-progress './**/*.md' --exclude-path .venv --exclude-path .git
35
+ fail: true
36
+
37
+ external:
38
+ if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
39
+ runs-on: ubuntu-latest
40
+ name: External links (weekly)
41
+ timeout-minutes: 15
42
+ steps:
43
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
44
+ - uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
45
+ with:
46
+ args: --no-progress './**/*.md' --exclude-path .venv --exclude-path .git
47
+ # Weekly external pass does not fail the build on flaky third-party
48
+ # responses; results surface in the job summary.
49
+ fail: false
@@ -0,0 +1,20 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ id-token: write
13
+ steps:
14
+ # SHA-pinned, mirroring ci.yml (supply-chain safety; F7 R9).
15
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
16
+ - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
17
+ with:
18
+ version: "0.9.18" # pinned so `uv lock` regeneration is reproducible (F7 R13)
19
+ - run: uv build
20
+ - run: uv publish --trusted-publishing always
@@ -0,0 +1,14 @@
1
+ name: Stale
2
+ on:
3
+ schedule:
4
+ - cron: "0 10 * * 1"
5
+ jobs:
6
+ stale:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/stale@v10
10
+ with:
11
+ days-before-stale: 90
12
+ days-before-close: 30
13
+ stale-issue-message: "Esta issue está inativa há 90 dias"
14
+ stale-pr-message: "Este PR está inativo há 90 dias"
@@ -0,0 +1,16 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .venv/
7
+ .node_modules/
8
+ node_modules/
9
+
10
+ # Local databases and test artifacts
11
+ *.db
12
+ *.db-wal
13
+ *.db-shm
14
+ .ruff_cache/
15
+ .pytest_cache/
16
+ frontend/dist/
@@ -0,0 +1,102 @@
1
+ # AGENTS.md
2
+
3
+ Instructions for agents working **in this repository**. For the product itself, read the
4
+ [README](README.md); for requirements, [docs/PRD.md](docs/PRD.md).
5
+
6
+ ## Project overview
7
+
8
+ Orc[hestrator] — an MCP server that keeps work items, dependencies, gates, agent presence and
9
+ claims in one place, with an optional web UI. Python 3.11+, FastMCP, SQLite (WAL + FTS5).
10
+ Entry point: `src/task_orchestrator/server.py`.
11
+
12
+ Distribution name: `orc-hestrator` (formerly `task-orchestrator-py`). Commands: `orc`, `orc-ui`.
13
+ The Python import package stays `task_orchestrator` — see `docs/adr/ADR-006-rename-orc-hestrator.md`.
14
+
15
+ ## Architecture
16
+
17
+ ```
18
+ src/task_orchestrator/
19
+ ├── server.py ← FastMCP tools (thin layer), agent identity resolution, /health
20
+ ├── onboarding.py ← orc_onboarding tool + static resources (self-teaching surface)
21
+ ├── prompts.py ← MCP workflow prompts
22
+ ├── engine/ ← domain logic, one module per concern
23
+ │ ├── __init__.py ← facade: re-exports the public API as `engine.X` (back-compat)
24
+ │ ├── base.py ← ToolError, constants, helpers, resolve_short_id
25
+ │ ├── items.py ← WorkItem CRUD, hierarchy, FTS search
26
+ │ ├── transitions.py ← state machine, gates, unblock logic
27
+ │ ├── dependencies.py ← graph, BFS, cycle detection
28
+ │ ├── notes.py ← per-phase notes, auto-reopen
29
+ │ ├── queries.py ← next item, blocked, context, scheduling
30
+ │ ├── trees.py ← create_work_tree, complete_tree
31
+ │ ├── metrics.py ← throughput, lead time, critical path, impact
32
+ │ ├── archive.py ← auto-archive of done items
33
+ │ ├── portability.py ← export_graph / import_graph
34
+ │ ├── workspace_view.py← workspace context, execution stack
35
+ │ ├── presence.py ← sessions (hostname/agent_id/session_id), heartbeat, reaping
36
+ │ ├── claims.py ← work items and free-form resources, conflict detection
37
+ │ └── users.py ← accounts, roles, web sessions
38
+ ├── db.py ← schema + additive migrations + FTS5
39
+ ├── schemas.py ← note-gate schemas and gate enforcement
40
+ ├── workspace.py ← workspace configs, scoped tag queries
41
+ ├── checkpoints.py ← checkpoint snapshots
42
+ ├── web/ ← REST API over the engine (/api), graph endpoints
43
+ └── ui/ ← optional server-rendered board (FastAPI + HTMX)
44
+ frontend/ ← React management UI (Vite + TS + Tailwind), isolated from Python
45
+ ```
46
+
47
+ **Import rule:** `engine/` is a DAG — `base` ← feature modules ← aggregators. No module imports an
48
+ aggregator back. External code (`server.py`, `web/`, `checkpoints.py`, tests) uses `engine.X` via
49
+ the facade; do not import submodules directly from outside the package.
50
+
51
+ **Data flow:** tool call → validate → engine function → DB → transition → structured result.
52
+
53
+ ## Conventions that bite
54
+
55
+ - **Storage:** one SQLite file. `ORC_DB` (fallback `TASK_ORCHESTRATOR_DB`), default
56
+ `~/.orc/tasks.db`. WAL mode.
57
+ - **Transport default is stdio.** `MCP_TRANSPORT=streamable-http` is what deployments use, not the
58
+ default: `os.environ.get("MCP_TRANSPORT", "stdio")`. Port comes from `MCP_PORT` (default 3201;
59
+ the reference deployment uses 8005 behind a proxy).
60
+ - **The web extra is optional.** `fastapi` lives in the `ui` extra: after any plain `uv sync` the
61
+ streamable-http path dies with `ModuleNotFoundError: fastapi`. Always
62
+ `uv sync --extra test --extra ui` in a dev environment.
63
+ - **State machine:** queue → work → review → done; triggers start, complete, block/hold, resume,
64
+ cancel, reopen. The engine rejects anything else — never bypass it from an adapter.
65
+ - **Dependencies:** `from_id` blocks `to_id`, with `unblock_at` ∈ {done, review, work}. Max
66
+ hierarchy depth is 4.
67
+ - **Identity:** `agent_id` resolves per request (argument → `X-Agent-ID` → `MCP_AGENT_ID` → OAuth
68
+ client id) through a contextvar that must be reset. Never cache it across requests.
69
+ - **Two audiences, two auth paths:** humans use cookie sessions with RBAC on `/api/*`; agents use
70
+ the proxy's basic auth and optionally OAuth2 (`MCP_OAUTH_ENABLED`).
71
+
72
+ ## Adding a tool
73
+
74
+ 1. Implement the domain rule in `engine/` first. The tool is an adapter.
75
+ 2. Register in `server.py` with a docstring that states the operations and constraints; annotate
76
+ `-> str` for consistency with the other tools.
77
+ 3. Decorate with `@with_agent_id` if the tool writes state.
78
+ 4. Add tests at three levels: engine, MCP surface, and a real client call when the contract is
79
+ about the wire.
80
+ 5. Regenerate `docs/TOOLS.md` — it is derived from the server, never hand-written.
81
+
82
+ ## Tests
83
+
84
+ ```bash
85
+ uv sync --extra test --extra ui
86
+ uv run pytest tests/ -q # full suite
87
+ uv run pytest tests/test_engine.py -q # one module
88
+ uv run ruff check . && uv run ruff format --check .
89
+ ```
90
+
91
+ - Tests use temporary SQLite databases; never touch a real database.
92
+ - A green suite does not close a gate by itself: measure the acceptance criterion against the real
93
+ execution path (spawn the server, speak MCP to it) before claiming done.
94
+ - `tests/test_onboarding.py` includes a subprocess test that boots the server on a free port; it
95
+ must leave no `.db` artifact behind.
96
+
97
+ ## Where things are decided
98
+
99
+ - `docs/adr/` — architecture decisions, one file per decision, immutable once accepted.
100
+ - `docs/specs/` — per-slice requirements with verifiable acceptance criteria.
101
+ - `docs/BRING-YOUR-AGENT.md` — how an agent connects and what it gets.
102
+ - `CHANGELOG.md` — what shipped and when. Product requirements are never tracked here.
@@ -0,0 +1,247 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [2.0.0] - 2026-10-18
11
+
12
+ ### Changed (breaking)
13
+
14
+ - **Distribution renamed to `orc-hestrator-server`.** The name `orc-hestrator` is impossible on
15
+ PyPI: its ultra-normalized form (`0rchestrat0r`) collides with the existing `orchestrator`
16
+ project. The GitHub repository and the brand remain `orc-hestrator`.
17
+ - **MCP server identity:** `initialize` now reports `serverInfo.name = "orc"`; the version comes
18
+ from `importlib.metadata` for the new distribution.
19
+ - **Environment variable precedence:** `ORC_DB`, `ORC_CONFIG` and `ORC_LANG` are the primary
20
+ variables. `TASK_ORCHESTRATOR_DB` / `TASK_ORCHESTRATOR_CONFIG` still work as a fallback with a
21
+ single deprecation warning; when both are set, the `ORC_*` variable wins.
22
+ - **Default database path** is now `~/.orc/tasks.db`. Continuity guard: if the old
23
+ `~/.task-orchestrator/tasks.db` exists and the new path does not, the old file is used (with a
24
+ one-time warning) instead of starting an empty database.
25
+ - **New console scripts:** `orc` (stdio MCP server), `orc-mcp` (explicit stdio alias), `orc-serve`
26
+ (streamable-http server on `MCP_HOST`/`MCP_PORT`), `orc-ui` (lightweight board) and
27
+ `orc-hestrator` (distribution-homonym script, so `uvx orc-hestrator-server` works). The legacy
28
+ `task-orchestrator-py` / `task-orchestrator-ui` scripts remain as aliases that print a
29
+ deprecation warning on stderr.
30
+ - **Transport is chosen by the entry point** (ADR-007), not by an environment variable: `orc`
31
+ opens stdio, `orc-serve` opens `streamable-http`. `MCP_TRANSPORT` remains as an override for
32
+ tests and edge cases.
33
+ - **`mcp` dependency capped at `<2`.** A clean install without this cap resolved `mcp 2.x`, where
34
+ `mcp.server.fastmcp` no longer exists (FastMCP was renamed to MCPServer) and every entry point
35
+ died at import. The cap now ships in the wheel metadata, not only in `uv.lock`.
36
+ - **`orc-serve` requires the `ui` extra.** The streamable-http transport needs `fastapi` +
37
+ `uvicorn`, which live in the optional `ui` extra — not core. A core-only install now exits with
38
+ code 2 and a clear pointer to `uvx --from 'orc-hestrator-server[ui]' orc-serve` (or
39
+ `uv tool install 'orc-hestrator-server[ui]'`) instead of a raw import traceback.
40
+
41
+ ## [1.5.1] - 2026-10-18
42
+
43
+ > 1.5.1 is the last release published under the old name (`task-orchestrator-py`). It carries the
44
+ > same code as 2.0.0 without the rename — only the metadata (version and a description pointing to
45
+ > `orc-hestrator-server`) differs.
46
+
47
+ ### Fixed
48
+ - **UI assets/routes under a base path.** Absolute references (`src="/mascote.png"`, router
49
+ `basename`) ignored Vite's `base`, resolving to the domain root and 404-ing when the SPA is
50
+ served under a subpath (e.g. `/orc/ui/`). Now use `import.meta.env.BASE_URL` for the mascot
51
+ logo (`Layout`, `Login`, `Overview`) and the `BrowserRouter` basename, and the favicon points
52
+ to `mascote.png` (the removed `.svg` left the icon broken).
53
+
54
+ ### Deployment notes
55
+ - The web extra (`fastapi`) is **optional** (`[project.optional-dependencies] ui`). Deploys must
56
+ run `uv sync --extra ui`; a plain `uv sync` omits `fastapi` and the service restart-loops with
57
+ `ModuleNotFoundError: fastapi`.
58
+ - Serving the SPA under a subpath: build with `vite build --base=/orc/ui/ (VITE_API_BASE=/orc/api)`
59
+ and reverse-proxy `/orc/api/` to the backend. The initial admin is seeded from
60
+ `ORC_ADMIN_USER`/`ORC_ADMIN_PASSWORD` on first boot when no user exists.
61
+ - First production deploy of the management UI + real auth validated live at
62
+ `https://cfnarede.dev/orc/ui/` (login, session cookie, RBAC, real dashboard data).
63
+
64
+ ## [1.5.0] - 2026-10-16
65
+
66
+ ### Added
67
+ - **Decoupled React management UI** (`frontend/`, Vite + React 18 + TypeScript + Tailwind):
68
+ 9 screens consuming the REST API — login, dashboard/overview, live team presence
69
+ (host/agent/session triple), kanban board, arcs tree, DAG graph (Cytoscape), task detail,
70
+ admin/RBAC, profile. Design from Stitch (`docs/design/stitch/`). Dark/light theme.
71
+ E2E navigation tests via playwright-with-yaml (`frontend/e2e/`).
72
+ - **REST API over the engine** (`web/api.py`, mounted at `/api` on the streamable-http app):
73
+ reads (items, items/{id}, arcs, context, sessions, claims, metrics, graph, workspaces) and
74
+ writes (advance, claims). Thin layer reusing the engine — see `docs/specs/SPEC-http-api.md`.
75
+ - **User authentication + RBAC** (`engine/users.py`, `docs/specs/SPEC-user-auth-rbac.md`):
76
+ `POST /api/auth/login|logout`, `GET /api/auth/me`; scrypt password hashing (stdlib, per-user
77
+ salt, constant-time compare); opaque session token in an HTTP-only cookie with server-side
78
+ revocation; roles `admin`/`user`; `require_admin` guard; `GET/POST /api/users` (admin-only,
79
+ never leaks the hash); initial admin seeded from `ORC_ADMIN_USER`/`ORC_ADMIN_PASSWORD`.
80
+ `get_current_user` now validates the session cookie (the SPEC-http-api R10 extension point),
81
+ without changing existing route signatures. Login is constant-time (no user enumeration) and
82
+ the cookie honors `X-Forwarded-Proto`/`ORC_COOKIE_SECURE` behind a TLS proxy.
83
+
84
+ ### Security
85
+ - All `/api/*` routes except `/api/auth/login`, `/api/auth/logout` and `/health` require a
86
+ valid user session (401 otherwise).
87
+
88
+ ## [1.4.0] - 2026-10-16
89
+
90
+ ### Added
91
+ - **Central session registry / presence** incorporated into the Orc: triple identity
92
+ (hostname, agent_id, session_id), heartbeat-based liveness, and claims — resolving
93
+ cross-session conflicts by session_id.
94
+
95
+ ## [1.3.0] - 2026-10-15
96
+
97
+ ### Added
98
+ - **OAuth2 resource-server authentication** (opt-in, `MCP_OAUTH_ENABLED`, default off):
99
+ opaque pre-shared tokens verified via FastMCP's native `TokenVerifier`. Second barrier
100
+ behind the nginx edge basic auth (ADR-004). `/health` stays public. Pluggable verifier so a
101
+ future JWT/IdP (corporate SSO) can replace it without touching the rest of the service.
102
+ - **Per-request agent attribution (`agent_id`)** (ADR-005): writes record who performed them
103
+ via `created_by`/`updated_by` on `work_items`, `created_by` on `notes` and `dependencies`.
104
+ Resolution precedence: explicit arg → `X-Agent-ID` header → `MCP_AGENT_ID` env → OAuth
105
+ client_id → null. Resolved per request via a contextvar with mandatory reset (no leakage
106
+ between requests). Additive, nullable migration — anonymous writes still succeed.
107
+ - `get_project_graph_metrics` tool — critical path, impact scores, and bottleneck detection
108
+ over the dependency graph (previously planned).
109
+
110
+ ### Changed
111
+ - **Internal refactor:** the monolithic `engine.py` (~1960 LOC) was split into an `engine/`
112
+ package of 11 cohesive modules (`base`, `items`, `transitions`, `dependencies`, `notes`,
113
+ `queries`, `trees`, `metrics`, `archive`, `portability`, `workspace_view`) behind a
114
+ re-export facade. **No public API change** — all tools, signatures, and the `engine.X`
115
+ import surface are preserved. Improves maintainability and navigation.
116
+ - CI hardening: ruff config pinned (`[tool.ruff]`), actions SHA-pinned, per-job timeouts,
117
+ docs-only `paths-ignore`, and a markdown link-check workflow.
118
+
119
+ ### Fixed
120
+ - `import_graph` now orders items topologically (parent-before-child at any depth), fixing a
121
+ `FOREIGN KEY constraint failed` crash on hierarchies ≥3 levels deep. Orphan parents are
122
+ normalized to roots instead of crashing. Removes the FK-off workaround used during the
123
+ cutover.
124
+ - `AGENTS.md` architecture section now reflects the real module layout (it described modules
125
+ that never existed).
126
+
127
+ ## [1.2.1] - 2026-06-23
128
+
129
+ ### Added
130
+ - `parent_id` is now updatable via `manage_items(update)` — enables reparenting items between ARCs
131
+ - Validation: parent exists, no self-parent, max depth 4. Set to `""` to unparent.
132
+
133
+ ## [1.2.0] - 2026-06-23
134
+
135
+ ### Added
136
+ - `/health` endpoint via `@mcp.custom_route` (GET, returns status/version/uptime)
137
+
138
+ ## [1.1.0] - 2026-06-08
139
+
140
+ ### Added
141
+ - `get_execution_stack` tool — context stack for session resume after interruptions
142
+ - `manage_archive` tool — auto-archive done items older than N days
143
+ - `manage_checkpoints` tool — create/list/restore/verify JSON snapshots
144
+ - `get_workspace_context` tool — workspace payload at 3 verbosity levels (minimal/standard/full)
145
+ - Workspace `repos` and `conventions` fields
146
+
147
+ ### Changed
148
+ - Test suite expanded to 114+ tests
149
+
150
+ ## [1.0.0] - 2026-05-28
151
+
152
+ ### Added
153
+ - **StreamableHTTP transport** on port 3201 (`MCP_TRANSPORT=streamable-http`)
154
+ - systemd service support (task-orchestrator.service)
155
+ - `manage_workspaces` tool — create/update/delete/list workspace configs
156
+ - Workspace-scoped queries in `get_context`, `get_next_item`, `get_metrics`
157
+ - `export_graph` and `import_graph` tools with workspace/tag filtering
158
+ - Kanban Web UI skeleton (FastAPI + HTMX + Tailwind)
159
+
160
+ ### Changed
161
+ - Default transport remains stdio for backward compatibility
162
+
163
+ ## [0.9.0] - 2026-05-18
164
+
165
+ ### Added
166
+ - Workspace entity — tag mapping, memory_tags, description
167
+ - Workspace-filtered `get_context`, `get_next_item`, `get_metrics`
168
+ - Memory tag bridge (2 levels: inline + reference via memory service)
169
+ - Auto-checkpoint JSON resilience (corruption recovery)
170
+
171
+ ## [0.8.0] - 2026-05-10
172
+
173
+ ### Added
174
+ - Scheduling support (cron expressions, `next_run_at`)
175
+ - `due_at` field on work items with deadline alerts
176
+
177
+ ### Fixed
178
+ - croniter naive/aware datetime handling
179
+ - CI pipeline stabilization
180
+
181
+ ## [0.7.0] - 2026-05-06
182
+
183
+ ### Added
184
+ - `get_metrics` tool — throughput per week, lead time, WIP, stale ratio
185
+ - Priority and tag breakdowns in metrics
186
+ - Configurable lookback period (days param)
187
+ - `complete_tree` tool — batch-complete descendants in topological order
188
+ - `create_work_tree` — atomically create root + children + dependencies
189
+
190
+ ## [0.6.1] - 2026-05-02
191
+
192
+ ### Added
193
+ - Comprehensive test suite with 35+ tests (#9)
194
+
195
+ ### Changed
196
+ - Comprehensive README rewrite (#11)
197
+
198
+ ## [0.6.0] - 2026-05-02
199
+
200
+ ### Added
201
+ - Stale item detection in get_context (#4)
202
+ - Structured ToolError responses (#3)
203
+ - Filter query_items by tags (#2)
204
+ - Short hex ID resolution (4+ chars) (#1)
205
+
206
+ ## [0.5.0] - 2026-04-10
207
+
208
+ ### Added
209
+ - Full feature parity with original Kotlin task-orchestrator
210
+
211
+ ## [0.4.0] - 2026-04-10
212
+
213
+ ### Added
214
+ - Auto-reopen parent items from terminal status
215
+ - `unblock_at` threshold for dependencies
216
+ - README documentation
217
+
218
+ ## [0.3.0] - 2026-04-10
219
+
220
+ ### Added
221
+ - MCP prompts (workflow skills)
222
+ - Note schema gates
223
+
224
+ ## [0.2.0] - 2026-04-10
225
+
226
+ ### Added
227
+ - Full feature parity with original task-orchestrator
228
+ - Note schemas with gate enforcement
229
+ - Lifecycle modes
230
+ - GitHub Actions workflow for PyPI trusted publishing
231
+ - Initial Python port of task-orchestrator
232
+
233
+ [Unreleased]: https://github.com/filhocf/task-orchestrator-py/compare/v1.3.0...HEAD
234
+ [1.3.0]: https://github.com/filhocf/task-orchestrator-py/compare/v1.2.1...v1.3.0
235
+ [1.2.1]: https://github.com/filhocf/task-orchestrator-py/compare/v1.2.0...v1.2.1
236
+ [1.2.0]: https://github.com/filhocf/task-orchestrator-py/compare/v1.1.0...v1.2.0
237
+ [1.1.0]: https://github.com/filhocf/task-orchestrator-py/compare/v1.0.0...v1.1.0
238
+ [1.0.0]: https://github.com/filhocf/task-orchestrator-py/compare/v0.9.0...v1.0.0
239
+ [0.9.0]: https://github.com/filhocf/task-orchestrator-py/compare/v0.8.0...v0.9.0
240
+ [0.8.0]: https://github.com/filhocf/task-orchestrator-py/compare/v0.7.0...v0.8.0
241
+ [0.7.0]: https://github.com/filhocf/task-orchestrator-py/compare/v0.6.1...v0.7.0
242
+ [0.6.1]: https://github.com/filhocf/task-orchestrator-py/compare/v0.6.0...v0.6.1
243
+ [0.6.0]: https://github.com/filhocf/task-orchestrator-py/compare/v0.5.0...v0.6.0
244
+ [0.5.0]: https://github.com/filhocf/task-orchestrator-py/compare/v0.4.0...v0.5.0
245
+ [0.4.0]: https://github.com/filhocf/task-orchestrator-py/compare/v0.3.0...v0.4.0
246
+ [0.3.0]: https://github.com/filhocf/task-orchestrator-py/compare/v0.2.0...v0.3.0
247
+ [0.2.0]: https://github.com/filhocf/task-orchestrator-py/releases/tag/v0.2.0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Claudio Ferreira Filho
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.