Skip to content

feat: align studio surfaces and add signals workspace#414

Merged
jerry609 merged 121 commits intodevfrom
test/milestone-v1.2
Mar 19, 2026
Merged

feat: align studio surfaces and add signals workspace#414
jerry609 merged 121 commits intodevfrom
test/milestone-v1.2

Conversation

@jerry609
Copy link
Copy Markdown
Owner

Summary

  • add a dedicated signals workspace and compress the dashboard into preview-style signals and daily brief entry points
  • remove the standalone workflows surface, add Daily Brief settings management, and enrich saved-paper provenance
  • continue the studio UX alignment work across auth, slash/chat density, monitor, worker navigation, and signals hydration/layout fixes

Validation

  • cd web && npm run build
  • targeted Playwright verification on /dashboard, /settings?tab=daily-brief, and /signals

Notes

  • closed the remaining MCP-related issue threads to reflect the current CLI-first direction
  • left existing MCP-era code in place for now; this PR focuses on product/UI direction and incremental cleanup

jerry609 and others added 30 commits March 15, 2026 16:04
…igrate _audit.py

- Add EventType class to message_schema.py with 7 new constants (4 lifecycle + 3 tool)
  and 7 documented existing-type aliases (job_start, insight, etc.)
- Create agent_events.py with make_lifecycle_event() and make_tool_call_event() helpers
- Migrate _audit.py: replace raw 'error'/'tool_result' strings with EventType constants
- types.ts: 7 exported types mirroring Python EventType vocabulary (AgentStatus, AgentLifecycleEvent, ToolCallEvent, AgentEventEnvelopeRaw, ActivityFeedItem, AgentStatusEntry, ToolCallEntry)
- parsers.ts: 3 parser functions (parseActivityItem, parseAgentStatus, parseToolCall) with human summary derivation
- store.ts: useAgentEventStore with feed cap at 200, tool timeline cap at 100, per-agent status map
- parsers.test.ts: 15 vitest tests covering all parser behavior cases
- store.test.ts: 12 vitest tests covering store actions, caps, and status tracking
- Add 08-01-SUMMARY.md for EventType constants and helpers plan
- STATE.md: advance position, add 3 decisions, update progress to 93%
- ROADMAP.md: mark phase 08 plan 1/2 in-progress
- REQUIREMENTS.md: mark EVNT-01, EVNT-02, EVNT-03 complete

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- useAgentEvents.ts: SSE consumer hook connecting to /api/events/stream with 3s reconnect
- ActivityFeed.tsx: scrolling event list with color-coded agent/type badges using Radix ScrollArea
- AgentStatusPanel.tsx: per-agent status badge grid with idle/working/completed/errored icons (lucide-react)
- ToolCallTimeline.tsx: tool call rows showing name, duration, args (collapsed), result summary, error badge
- agent-events/page.tsx: test harness page mounting all three components with SSE hook at root
- Next.js build: zero type errors or server component violations
- 08-02-SUMMARY.md: documents types/parsers/store/hook/components delivery
- STATE.md: advance to plan 2 complete, add Phase 08 P02 decisions
- ROADMAP.md: mark both 08-01 and 08-02 plans complete
…store file tracking

- Add FileChangeStatus and FileTouchedEntry types to types.ts
- Add parseFileTouched() to parsers.ts (handles file_change and write_file tool_result)
- Extend useAgentEventStore with filesTouched (dedup+20-run eviction), selectedRunId, selectedFile
- 12 new TDD tests (6 parser + 6 store), all 39 tests pass
…hook to parseFileTouched

- Add FILE_CHANGE = "file_change" constant to EventType class in message_schema.py
- Add test_file_change_event_type() test (8 total, all pass)
- Import parseFileTouched in useAgentEvents.ts and dispatch to addFileTouched in for-await loop
- Add addFileTouched to useEffect dependency array
- SUMMARY.md: FileTouchedEntry types, parseFileTouched parser, store file tracking
- STATE.md: advanced progress, recorded metrics and decisions
- ROADMAP.md: phase 09 updated to 1/2 plans complete
- REQUIREMENTS.md: DASH-01, FILE-01, FILE-02 marked complete
…atusPanel compact prop

- Add optional compact prop to AgentStatusPanel: hides heading/connection indicator, uses grid-cols-1, truncates name to 12 chars
- Create TasksPanel with compact AgentStatusPanel + run selector derived from feed
- Create FileListPanel with created/modified file icons and run-id filtering
- Create InlineDiffPanel wrapping DiffViewer in read-only mode with back navigation
…debar nav link

- Create /agent-dashboard page with three-panel layout using SplitPanels (storageKey=agent-dashboard)
- Mount useAgentEvents() once at page root for SSE connection
- Compose TasksPanel (rail), ActivityFeed (list), FileListPanel (detail)
- Add Agent Dashboard nav entry in Sidebar with Monitor icon after DeepCode Studio
- SUMMARY.md: IDE-style three-panel /agent-dashboard with SplitPanels, TasksPanel, FileListPanel, InlineDiffPanel
- STATE.md: advance to phase 9/plan 2, record decisions and session
- ROADMAP.md: update phase 9 plan progress (2/2 plans complete)
…mary

- Updated 09-02-SUMMARY.md: all 3 tasks complete (checkpoint APPROVED)
- STATE.md: updated progress, recorded session completion
- ROADMAP.md: phase 9 marked Complete (2/2 plans)
- Requirements DASH-01, DASH-04, FILE-01, FILE-02 noted complete

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…low stub, and emit helper

- Add four codex delegation constant tests to test_agent_events_vocab.py
- Create test_codex_overflow.py for _should_overflow_to_codex env var logic
- Create test_agent_board_codex_events.py for _emit_codex_event helper
Copilot AI review requested due to automatic review settings March 19, 2026 08:47
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
paper-bot Ready Ready Preview, Comment Mar 19, 2026 10:03am

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 19, 2026

Important

Review skipped

Too many files!

This PR contains 188 files, which is 38 over the limit of 150.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c5472863-6f52-4127-bd27-d6be35394b30

📥 Commits

Reviewing files that changed from the base of the PR and between d4bd6f1 and 38260e1.

⛔ Files ignored due to path filters (1)
  • web/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (188)
  • .claude/agents/codex-worker.md
  • .planning/PROJECT.md
  • .planning/REQUIREMENTS.md
  • .planning/ROADMAP.md
  • .planning/STATE.md
  • .planning/codebase/ARCHITECTURE.md
  • .planning/codebase/CONCERNS.md
  • .planning/codebase/CONVENTIONS.md
  • .planning/codebase/INTEGRATIONS.md
  • .planning/codebase/STACK.md
  • .planning/codebase/STRUCTURE.md
  • .planning/codebase/TESTING.md
  • .planning/phases/08-agent-event-vocabulary/08-01-PLAN.md
  • .planning/phases/08-agent-event-vocabulary/08-01-SUMMARY.md
  • .planning/phases/08-agent-event-vocabulary/08-02-PLAN.md
  • .planning/phases/08-agent-event-vocabulary/08-02-SUMMARY.md
  • .planning/phases/08-agent-event-vocabulary/08-RESEARCH.md
  • .planning/phases/08-agent-event-vocabulary/08-VALIDATION.md
  • .planning/phases/08-agent-event-vocabulary/08-VERIFICATION.md
  • .planning/phases/09-three-panel-dashboard/09-01-PLAN.md
  • .planning/phases/09-three-panel-dashboard/09-01-SUMMARY.md
  • .planning/phases/09-three-panel-dashboard/09-02-PLAN.md
  • .planning/phases/09-three-panel-dashboard/09-02-SUMMARY.md
  • .planning/phases/09-three-panel-dashboard/09-RESEARCH.md
  • .planning/phases/09-three-panel-dashboard/09-VALIDATION.md
  • .planning/phases/09-three-panel-dashboard/09-VERIFICATION.md
  • .planning/phases/10-agent-board-codex-bridge/10-01-PLAN.md
  • .planning/phases/10-agent-board-codex-bridge/10-01-SUMMARY.md
  • .planning/phases/10-agent-board-codex-bridge/10-02-PLAN.md
  • .planning/phases/10-agent-board-codex-bridge/10-02-SUMMARY.md
  • .planning/phases/10-agent-board-codex-bridge/10-03-PLAN.md
  • .planning/phases/10-agent-board-codex-bridge/10-03-SUMMARY.md
  • .planning/phases/10-agent-board-codex-bridge/10-RESEARCH.md
  • .planning/phases/10-agent-board-codex-bridge/10-VALIDATION.md
  • .planning/phases/11-dag-visualization/11-01-PLAN.md
  • .planning/phases/11-dag-visualization/11-01-SUMMARY.md
  • .planning/phases/11-dag-visualization/11-02-PLAN.md
  • .planning/phases/11-dag-visualization/11-RESEARCH.md
  • .planning/phases/11-dag-visualization/11-VALIDATION.md
  • .planning/research/ARCHITECTURE.md
  • .planning/research/FEATURES.md
  • .planning/research/PITFALLS.md
  • .planning/research/STACK.md
  • .planning/research/SUMMARY.md
  • src/paperbot/api/main.py
  • src/paperbot/api/middleware/auth.py
  • src/paperbot/api/routes/__init__.py
  • src/paperbot/api/routes/agent_board.py
  • src/paperbot/api/routes/harvest.py
  • src/paperbot/api/routes/runbook.py
  • src/paperbot/api/routes/studio_chat.py
  • src/paperbot/api/routes/studio_skills.py
  • src/paperbot/application/collaboration/agent_events.py
  • src/paperbot/application/collaboration/message_schema.py
  • src/paperbot/application/services/studio_skill_catalog.py
  • src/paperbot/application/services/studio_skill_registry.py
  • src/paperbot/infrastructure/stores/research_store.py
  • src/paperbot/mcp/tools/_audit.py
  • src/paperbot/repro/orchestrator.py
  • tests/unit/test_agent_board_codex_events.py
  • tests/unit/test_agent_board_route.py
  • tests/unit/test_agent_events_vocab.py
  • tests/unit/test_api_security_middleware.py
  • tests/unit/test_codex_overflow.py
  • tests/unit/test_research_feedback_state.py
  • tests/unit/test_runbook_project_dir_prepare_route.py
  • tests/unit/test_studio_chat_cli_commands.py
  • tests/unit/test_studio_chat_path_validation.py
  • tests/unit/test_studio_chat_telemetry.py
  • tests/unit/test_studio_skill_catalog.py
  • tests/unit/test_studio_skill_registry.py
  • web/package.json
  • web/src/app/agent-dashboard/page.tsx
  • web/src/app/agent-events/page.tsx
  • web/src/app/api/_utils/stream-route-contracts.test.ts
  • web/src/app/api/intelligence/feed/route.ts
  • web/src/app/api/runbook/project-dir/prepare/route.test.ts
  • web/src/app/api/runbook/project-dir/prepare/route.ts
  • web/src/app/api/studio/chat/route.ts
  • web/src/app/api/studio/command/route.ts
  • web/src/app/api/studio/cwd/route.test.ts
  • web/src/app/api/studio/cwd/route.ts
  • web/src/app/api/studio/skills/[skillKey]/route.ts
  • web/src/app/api/studio/skills/install/route.ts
  • web/src/app/api/studio/skills/repos/[repoSlug]/update/route.ts
  • web/src/app/api/studio/skills/route.ts
  • web/src/app/api/studio/status/route.test.ts
  • web/src/app/api/studio/status/route.ts
  • web/src/app/dashboard/page.tsx
  • web/src/app/forgot-password/page.tsx
  • web/src/app/layout.tsx
  • web/src/app/login/page.tsx
  • web/src/app/papers/page.tsx
  • web/src/app/register/page.tsx
  • web/src/app/reset-password/page.tsx
  • web/src/app/scholars/[id]/page.tsx
  • web/src/app/settings/page.tsx
  • web/src/app/signals/page.tsx
  • web/src/app/skills/[skillKey]/page.tsx
  • web/src/app/skills/[skillKey]/setup/page.tsx
  • web/src/app/skills/page.tsx
  • web/src/app/studio/agent-board/[paperId]/page.tsx
  • web/src/app/studio/agent-board/page.tsx
  • web/src/app/studio/page.tsx
  • web/src/app/workflows/page.tsx
  • web/src/components/agent-dashboard/AgentDagPanel.tsx
  • web/src/components/agent-dashboard/FileListPanel.tsx
  • web/src/components/agent-dashboard/InlineDiffPanel.tsx
  • web/src/components/agent-dashboard/KanbanBoard.test.tsx
  • web/src/components/agent-dashboard/KanbanBoard.tsx
  • web/src/components/agent-dashboard/TasksPanel.tsx
  • web/src/components/agent-events/ActivityFeed.tsx
  • web/src/components/agent-events/AgentStatusPanel.tsx
  • web/src/components/agent-events/SubagentActivityPanel.tsx
  • web/src/components/agent-events/ToolCallTimeline.tsx
  • web/src/components/auth/AuthSplitLayout.tsx
  • web/src/components/dashboard/DashboardCommandCenter.tsx
  • web/src/components/dashboard/DashboardReadingQueuePanel.tsx
  • web/src/components/dashboard/QuickActions.tsx
  • web/src/components/dashboard/WorkflowDockCard.tsx
  • web/src/components/layout/LayoutShell.tsx
  • web/src/components/layout/Sidebar.tsx
  • web/src/components/research/ResearchPageNew.tsx
  • web/src/components/research/SavedPapersList.test.tsx
  • web/src/components/research/SavedPapersList.tsx
  • web/src/components/research/TopicWorkflowDashboard.tsx
  • web/src/components/scholars/ScholarsWatchlist.tsx
  • web/src/components/signals/SignalsWorkspace.tsx
  • web/src/components/skills/SkillsExperience.tsx
  • web/src/components/studio/AgentBoard.tsx
  • web/src/components/studio/AgentBoardNodes.tsx
  • web/src/components/studio/AgentBoardSidebar.tsx
  • web/src/components/studio/AgentWorkspace.tsx
  • web/src/components/studio/ChatHistoryPanel.tsx
  • web/src/components/studio/CliCommandRunner.tsx
  • web/src/components/studio/ContextDialogPanel.test.tsx
  • web/src/components/studio/ContextDialogPanel.tsx
  • web/src/components/studio/ContextPackPanel.tsx
  • web/src/components/studio/ExecutionLog.tsx
  • web/src/components/studio/FilesPanel.tsx
  • web/src/components/studio/PaperGallery.tsx
  • web/src/components/studio/ReproductionLog.tsx
  • web/src/components/studio/StudioMonitorWorkspace.tsx
  • web/src/components/studio/StudioPermissionSelector.tsx
  • web/src/components/studio/TaskDetailPanel.tsx
  • web/src/components/studio/WorkspaceSetupDialog.tsx
  • web/src/hooks/useContextPackGeneration.ts
  • web/src/hooks/useStudioRuntime.ts
  • web/src/hooks/useStudioSkillsCatalog.ts
  • web/src/lib/agent-events/dag.test.ts
  • web/src/lib/agent-events/dag.ts
  • web/src/lib/agent-events/parsers.test.ts
  • web/src/lib/agent-events/parsers.ts
  • web/src/lib/agent-events/store.test.ts
  • web/src/lib/agent-events/store.ts
  • web/src/lib/agent-events/subagent-groups.test.ts
  • web/src/lib/agent-events/subagent-groups.ts
  • web/src/lib/agent-events/types.ts
  • web/src/lib/agent-events/useAgentEvents.ts
  • web/src/lib/agent-events/worker-focus.test.ts
  • web/src/lib/agent-events/worker-focus.ts
  • web/src/lib/agent-runtime.ts
  • web/src/lib/auth-flow.ts
  • web/src/lib/dashboard-brief.ts
  • web/src/lib/dashboard-intelligence.test.ts
  • web/src/lib/dashboard-intelligence.ts
  • web/src/lib/store/studio-store.test.ts
  • web/src/lib/store/studio-store.ts
  • web/src/lib/studio-approval.test.ts
  • web/src/lib/studio-approval.ts
  • web/src/lib/studio-bridge-result.test.ts
  • web/src/lib/studio-bridge-result.ts
  • web/src/lib/studio-chat-activity.test.ts
  • web/src/lib/studio-chat-activity.ts
  • web/src/lib/studio-errors.test.ts
  • web/src/lib/studio-errors.ts
  • web/src/lib/studio-runtime.test.ts
  • web/src/lib/studio-runtime.ts
  • web/src/lib/studio-skill-catalog.test.ts
  • web/src/lib/studio-skill-catalog.ts
  • web/src/lib/studio-skills.test.ts
  • web/src/lib/studio-skills.ts
  • web/src/lib/studio-slash.test.ts
  • web/src/lib/studio-slash.ts
  • web/src/lib/studio-task-log-groups.test.ts
  • web/src/lib/studio-task-log-groups.ts
  • web/src/lib/studio-worker-links.test.ts
  • web/src/lib/studio-worker-links.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/milestone-v1.2
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

Flake8 can be used to improve the quality of Python code reviews.

Flake8 is a Python linter that wraps PyFlakes, pycodestyle and Ned Batchelder's McCabe script.

To configure Flake8, add a '.flake8' or 'setup.cfg' file to your project root.

See Flake8 Documentation for more details.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR continues the Studio/Dashboard alignment by introducing a Studio Skills surface (discovery + install/update flows), expanding agent event vocabulary (including Codex delegation events), and enriching backend provenance/allowlisting behavior to support the updated UX.

Changes:

  • Add Studio skills registry/catalog plumbing + a new FastAPI surface for listing, installing, updating, and fetching skill details.
  • Extend agent event vocabulary/helpers and emit Codex delegation lifecycle events; add an env-var-based Codex overflow flag.
  • Improve saved-paper payloads with provenance/workflow summary and adjust runbook directory allowlist defaults/mutation behavior.

Reviewed changes

Copilot reviewed 71 out of 189 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tests/unit/test_studio_skill_registry.py Adds unit coverage for skill discovery and ecosystem merging.
tests/unit/test_studio_skill_catalog.py Adds unit coverage for installing/updating/listing installed skill repos (git-backed).
tests/unit/test_studio_chat_path_validation.py Adds tests for model-id mapping and Studio CWD allowlist behavior.
tests/unit/test_runbook_project_dir_prepare_route.py Extends runbook route tests for HOME/Documents defaults and mutation error messaging.
tests/unit/test_research_feedback_state.py Extends feedback tests for provenance/judge summary and adjusts saved-paper shape expectations.
tests/unit/test_codex_overflow.py Adds unit tests for Codex overflow env-var flag parsing.
tests/unit/test_api_security_middleware.py Adds unit test for “full_access” mode flags.
tests/unit/test_agent_events_vocab.py Adds TDD tests for EventType constants + Codex delegation event types.
tests/unit/test_agent_board_route.py Adds tests for creating Studio ad-hoc tasks and latest-session “found=false” payload.
tests/unit/test_agent_board_codex_events.py Adds TDD tests for Codex delegation event emission helper.
src/paperbot/repro/orchestrator.py Implements _should_overflow_to_codex() env-var flag parsing.
src/paperbot/mcp/tools/_audit.py Migrates tool audit event types to EventType constants.
src/paperbot/infrastructure/stores/research_store.py Adds provenance normalization/labels and enriches saved-paper payloads.
src/paperbot/application/services/studio_skill_registry.py Introduces skill discovery/manifest parsing + summary/merge logic.
src/paperbot/application/collaboration/message_schema.py Adds EventType string constants (lifecycle/tool/file/Codex + existing types).
src/paperbot/application/collaboration/agent_events.py Adds helper constructors for lifecycle and tool-call event envelopes.
src/paperbot/api/routes/studio_skills.py Adds Studio Skills API routes for catalog/install/update/detail.
src/paperbot/api/routes/runbook.py Adds HOME/Documents default prefix, refactors normalization, and adds mutation-root checks.
src/paperbot/api/routes/harvest.py Adds metadata to save requests and routes “save” feedback via add_paper_feedback.
src/paperbot/api/routes/agent_board.py Adds Codex event emission helpers, latest-session “found” payload, and Studio task creation endpoint.
src/paperbot/api/routes/init.py Exposes studio_skills router.
src/paperbot/api/middleware/auth.py Adds localhost:3010 to allowed origins.
src/paperbot/api/main.py Registers Studio Skills router.
.planning/phases/11-dag-visualization/11-VALIDATION.md Adds Phase 11 validation strategy doc.
.planning/phases/11-dag-visualization/11-01-SUMMARY.md Adds Phase 11 plan summary doc.
.planning/phases/10-agent-board-codex-bridge/10-VALIDATION.md Adds Phase 10 validation strategy doc.
.planning/phases/10-agent-board-codex-bridge/10-03-SUMMARY.md Adds Phase 10 plan summary doc (Plan 03).
.planning/phases/10-agent-board-codex-bridge/10-03-PLAN.md Adds Phase 10 execution plan doc (Plan 03).
.planning/phases/10-agent-board-codex-bridge/10-02-SUMMARY.md Adds Phase 10 plan summary doc (Plan 02).
.planning/phases/10-agent-board-codex-bridge/10-01-SUMMARY.md Adds Phase 10 plan summary doc (Plan 01).
.planning/phases/10-agent-board-codex-bridge/10-01-PLAN.md Adds Phase 10 execution plan doc (Plan 01).
.planning/phases/09-three-panel-dashboard/09-VERIFICATION.md Adds verification report doc for Phase 09.
.planning/phases/09-three-panel-dashboard/09-VALIDATION.md Adds Phase 09 validation strategy doc.
.planning/phases/09-three-panel-dashboard/09-02-SUMMARY.md Adds Phase 09 plan summary doc (Plan 02).
.planning/phases/09-three-panel-dashboard/09-01-SUMMARY.md Adds Phase 09 plan summary doc (Plan 01).
.planning/phases/08-agent-event-vocabulary/08-VERIFICATION.md Adds verification report doc for Phase 08.
.planning/phases/08-agent-event-vocabulary/08-VALIDATION.md Adds Phase 08 validation strategy doc.
.planning/phases/08-agent-event-vocabulary/08-02-SUMMARY.md Adds Phase 08 plan summary doc (Plan 02).
.planning/phases/08-agent-event-vocabulary/08-01-SUMMARY.md Adds Phase 08 plan summary doc (Plan 01).
.planning/phases/08-agent-event-vocabulary/08-01-PLAN.md Adds Phase 08 execution plan doc (Plan 01).
.planning/codebase/TESTING.md Adds codebase testing patterns doc.
.planning/codebase/STACK.md Adds stack inventory doc.
.planning/codebase/INTEGRATIONS.md Adds integrations inventory doc.
.planning/codebase/CONVENTIONS.md Adds conventions doc.
.planning/codebase/ARCHITECTURE.md Adds architecture doc.
.planning/STATE.md Updates project state (milestone focus + progress).
.planning/REQUIREMENTS.md Updates requirements statuses and adds v1.2 requirements.
.planning/PROJECT.md Updates project framing toward agent-agnostic dashboard + v1.2 milestone.
.claude/agents/codex-worker.md Adds Claude Code sub-agent definition for Codex delegation (JSON-only output contract).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +913 to +918
await _emit_codex_event(
"codex_dispatched",
task,
session,
{"assignee": task.assignee},
)
Comment on lines +402 to +407
class CreateTaskRequest(BaseModel):
title: str
description: str
workspace_dir: Optional[str] = None
assignee: Literal["codex", "opencode"] = "codex"
tags: List[str] = Field(default_factory=list)
Comment on lines +224 to +226
try:
roots.append(Path.home().resolve())
except Exception:
Comment on lines +9 to +16
def _git(cwd: Path, *args: str) -> str:
result = subprocess.run(
["git", *args],
cwd=str(cwd),
capture_output=True,
text=True,
check=True,
)
Comment on lines +11 to +12
import types
from typing import Any, List, Optional
Comment on lines +65 to +68
import paperbot.api.routes.agent_board as ab_mod

def _fake_container_instance():
return fake_container
Comment on lines +44 to +47
Checks the PAPERBOT_CODEX_OVERFLOW_THRESHOLD environment variable:
- Unset or empty -> False
- "1", "true", "yes", "on" (case-insensitive) -> True
- Any other value -> False
Comment on lines +47 to +55
- Any other value -> False

Wraps in try/except so any unexpected error returns False safely.
"""
try:
value = os.getenv("PAPERBOT_CODEX_OVERFLOW_THRESHOLD", "").strip()
if not value:
return False
return value.lower() in {"1", "true", "yes", "on"}
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly advances the PaperBot project's strategic direction by refining the Studio user experience and laying foundational architectural groundwork for a more versatile agent interaction model. It focuses on consolidating existing features, introducing new dedicated workspaces, and updating core planning documents to reflect a shift towards an agent-agnostic dashboard capable of visualizing and controlling various code agents. The changes aim to enhance usability, provide clearer insights into agent activities, and prepare the platform for future multi-agent capabilities.

Highlights

  • Signals Workspace and Dashboard Compression: A dedicated signals workspace has been introduced, and the existing dashboard has been compressed into preview-style signals and daily brief entry points for a more streamlined experience.
  • Workflows Surface Removal and Daily Brief Management: The standalone workflows surface has been removed, Daily Brief settings management has been added, and the provenance tracking for saved papers has been enriched.
  • Studio UX Alignment and Architectural Evolution: Ongoing efforts to align the Studio UX across various surfaces including authentication, chat density, monitoring, worker navigation, and signals hydration/layout have been continued, reflecting a strategic pivot towards an agent-agnostic dashboard (DeepCode).

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a significant set of features and refactorings, primarily focused on creating a "signals" workspace and aligning various UI surfaces. Key changes include adding a codex-worker agent, extensive updates to project planning documents, and a major refactoring of the studio chat functionality to support more complex interactions and telemetry. New services for managing "studio skills" have been added, and paper provenance tracking has been enriched.

My review focuses on a few key areas. I've identified a critical performance issue in the new studio_skills API where blocking I/O calls are made from async routes, which could stall the server under load. I've also suggested a refactoring in the research_store to improve the maintainability of the new provenance logic. Overall, the changes are extensive and well-tested, but the blocking I/O issue should be addressed before merging.

Comment on lines +34 to +46
async def studio_skill_install(request: InstallStudioSkillRepoRequest):
try:
return install_studio_skill_repo(request.repo_url, repo_ref=request.repo_ref)
except StudioSkillCatalogError as exc:
raise HTTPException(status_code=400, detail=str(exc)) from exc


@router.post("/studio/skills/repos/{repo_slug}/update")
async def studio_skill_repo_update(repo_slug: str, request: UpdateStudioSkillRepoRequest):
try:
return update_studio_skill_repo(repo_slug, repo_ref=request.repo_ref)
except StudioSkillCatalogError as exc:
raise HTTPException(status_code=400, detail=str(exc)) from exc
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The install_studio_skill_repo and update_studio_skill_repo functions are synchronous but perform blocking I/O operations (git commands via subprocess.run). Calling them directly from async FastAPI routes will block the event loop, impacting server performance and responsiveness.

To fix this, the service functions in studio_skill_catalog.py should be converted to async functions, and their blocking _run_git calls should be wrapped with await asyncio.to_thread(). Consequently, you should await the calls here.

Suggested change
async def studio_skill_install(request: InstallStudioSkillRepoRequest):
try:
return install_studio_skill_repo(request.repo_url, repo_ref=request.repo_ref)
except StudioSkillCatalogError as exc:
raise HTTPException(status_code=400, detail=str(exc)) from exc
@router.post("/studio/skills/repos/{repo_slug}/update")
async def studio_skill_repo_update(repo_slug: str, request: UpdateStudioSkillRepoRequest):
try:
return update_studio_skill_repo(repo_slug, repo_ref=request.repo_ref)
except StudioSkillCatalogError as exc:
raise HTTPException(status_code=400, detail=str(exc)) from exc
@router.post("/studio/skills/install")
async def studio_skill_install(request: InstallStudioSkillRepoRequest):
try:
return await install_studio_skill_repo(request.repo_url, repo_ref=request.repo_ref)
except StudioSkillCatalogError as exc:
raise HTTPException(status_code=400, detail=str(exc)) from exc
@router.post("/studio/skills/repos/{repo_slug}/update")
async def studio_skill_repo_update(repo_slug: str, request: UpdateStudioSkillRepoRequest):
try:
return await update_studio_skill_repo(repo_slug, repo_ref=request.repo_ref)
except StudioSkillCatalogError as exc:
raise HTTPException(status_code=400, detail=str(exc)) from exc

Comment on lines +2197 to +2212
primary = _normalize_saved_paper_provenance(metadata.get("import_source"))
if not primary:
if metadata.get("context_run_id") is not None or metadata.get("context_rank") is not None:
primary = "research_context"
else:
retrieval_sources = metadata.get("retrieval_sources")
if isinstance(retrieval_sources, list) and any(
str(source).strip() for source in retrieval_sources
):
primary = "research_search"
else:
anchor_mode = _normalize_saved_paper_provenance(metadata.get("anchor_mode"))
if anchor_mode in {"personalized", "global"}:
primary = f"{anchor_mode}_routing"
else:
primary = "manual_save"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This nested if/else block for determining the primary provenance is becoming complex and hard to follow. As more provenance sources are added, this logic will become even more difficult to maintain.

Consider refactoring this into a more declarative pattern, such as a list of check functions. This would improve readability and make it easier to add or reorder provenance checks in the future.

For example:

def _get_primary_provenance(metadata: dict) -> str:
    provenance_checks = [
        lambda m: _normalize_saved_paper_provenance(m.get("import_source")),
        lambda m: "research_context" if m.get("context_run_id") is not None or m.get("context_rank") is not None else None,
        lambda m: "research_search" if isinstance(m.get("retrieval_sources"), list) and any(str(s).strip() for s in m["retrieval_sources"]) else None,
        # ... and so on
    ]
    for check in provenance_checks:
        if result := check(metadata):
            return result
    return "manual_save"

# In _build_saved_paper_provenance:
primary = _get_primary_provenance(metadata)

Copilot AI review requested due to automatic review settings March 19, 2026 09:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the Studio/agent-dashboard backend capabilities by adding skill catalog endpoints and Codex delegation observability, while tightening/adjusting workspace allowlisting and enriching saved-paper provenance metadata.

Changes:

  • Add Studio skills discovery/installation/update API surface and supporting skill registry/service logic.
  • Introduce Codex delegation event vocab + emission helpers, plus overflow flag plumbing and new agent-board endpoints/behaviors.
  • Enrich research “saved papers” response with provenance/workflow data and adjust runbook allowlist defaults/mutation rules.

Reviewed changes

Copilot reviewed 70 out of 189 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
tests/unit/test_studio_skill_catalog.py Adds unit coverage for installing/updating Studio skill repos via local git.
tests/unit/test_studio_chat_path_validation.py Adds tests for model-id mapping and Studio CWD allowlist behavior.
tests/unit/test_runbook_project_dir_prepare_route.py Adds tests for HOME/Documents default allowlist and allowlist mutation rules.
tests/unit/test_research_feedback_state.py Updates saved-papers assertions and adds provenance/workflow summary coverage.
tests/unit/test_codex_overflow.py Adds tests defining _should_overflow_to_codex env-var behavior.
tests/unit/test_api_security_middleware.py Extends tests for full-access code-mode flags.
tests/unit/test_agent_events_vocab.py Adds EventType coverage including Codex delegation constants.
tests/unit/test_agent_board_route.py Extends agent-board route tests for ad-hoc tasks and latest-session semantics.
tests/unit/test_agent_board_codex_events.py Adds tests defining _emit_codex_event behavior.
src/paperbot/repro/orchestrator.py Adds _should_overflow_to_codex env-var based routing stub.
src/paperbot/mcp/tools/_audit.py Switches tool-call audit event types to EventType constants.
src/paperbot/infrastructure/stores/research_store.py Adds saved-paper provenance labeling and track/workflow summary enrichment.
src/paperbot/application/services/studio_skill_registry.py Implements skill discovery + manifest/frontmatter parsing and normalization.
src/paperbot/application/collaboration/message_schema.py Introduces EventType constants including Codex delegation types.
src/paperbot/application/collaboration/agent_events.py Adds helpers to create lifecycle/tool-call event envelopes.
src/paperbot/api/routes/studio_skills.py Adds Studio Skills API routes for catalog/install/update/detail.
src/paperbot/api/routes/runbook.py Adjusts allowlist defaults; refactors path normalization; adds mutation roots.
src/paperbot/api/routes/harvest.py Extends save-paper request with metadata; routes to add_paper_feedback.
src/paperbot/api/routes/agent_board.py Adds Codex delegation event emission helper + task creation + latest-session response change.
src/paperbot/api/routes/init.py Exposes studio_skills routes module.
src/paperbot/api/middleware/auth.py Extends localhost CORS allowlist to include port 3010.
src/paperbot/api/main.py Registers Studio Skills router.
.planning/phases/11-dag-visualization/11-VALIDATION.md Adds Phase 11 validation strategy doc.
.planning/phases/11-dag-visualization/11-01-SUMMARY.md Adds Phase 11 Plan 01 summary.
.planning/phases/10-agent-board-codex-bridge/10-VALIDATION.md Adds Phase 10 validation strategy doc.
.planning/phases/10-agent-board-codex-bridge/10-03-SUMMARY.md Adds Phase 10 Plan 03 summary.
.planning/phases/10-agent-board-codex-bridge/10-03-PLAN.md Adds Phase 10 Plan 03 execution plan.
.planning/phases/10-agent-board-codex-bridge/10-02-SUMMARY.md Adds Phase 10 Plan 02 summary.
.planning/phases/10-agent-board-codex-bridge/10-01-SUMMARY.md Adds Phase 10 Plan 01 summary.
.planning/phases/10-agent-board-codex-bridge/10-01-PLAN.md Adds Phase 10 Plan 01 execution plan.
.planning/phases/09-three-panel-dashboard/09-VERIFICATION.md Adds Phase 09 verification report.
.planning/phases/09-three-panel-dashboard/09-VALIDATION.md Adds Phase 09 validation strategy doc.
.planning/phases/09-three-panel-dashboard/09-02-SUMMARY.md Adds Phase 09 Plan 02 summary.
.planning/phases/09-three-panel-dashboard/09-01-SUMMARY.md Adds Phase 09 Plan 01 summary.
.planning/phases/08-agent-event-vocabulary/08-VERIFICATION.md Adds Phase 08 verification report.
.planning/phases/08-agent-event-vocabulary/08-VALIDATION.md Adds Phase 08 validation strategy doc.
.planning/phases/08-agent-event-vocabulary/08-02-SUMMARY.md Adds Phase 08 Plan 02 summary.
.planning/phases/08-agent-event-vocabulary/08-01-SUMMARY.md Adds Phase 08 Plan 01 summary.
.planning/phases/08-agent-event-vocabulary/08-01-PLAN.md Adds Phase 08 Plan 01 execution plan.
.planning/codebase/TESTING.md Adds documentation of repo testing patterns/conventions.
.planning/codebase/STACK.md Adds documentation of repo technology stack.
.planning/codebase/INTEGRATIONS.md Adds documentation of external integrations.
.planning/codebase/CONVENTIONS.md Adds documentation of coding conventions.
.planning/codebase/ARCHITECTURE.md Adds documentation of system architecture.
.planning/STATE.md Updates project state/milestone metadata.
.planning/REQUIREMENTS.md Updates requirements state and expands v1.2 requirements.
.planning/PROJECT.md Updates project description/milestones to agent-agnostic dashboard direction.
.claude/agents/codex-worker.md Adds Codex worker sub-agent definition and strict JSON output contract.
Comments suppressed due to low confidence (1)

src/paperbot/api/routes/agent_board.py:496

  • This endpoint changes behavior from raising a 404 to returning HTTP 200 with a sentinel payload (found: False). That’s an API-breaking change for any clients relying on status code semantics for control-flow. If you need the softer contract, consider preserving the previous 404 behavior by default and gating the 200/empty response behind an explicit query param (or a separate endpoint), or document/version the change clearly.
async def get_latest_session(paper_id: Optional[str] = None):

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 175 to 178
def _normalize_path_input(raw_path: str, field_name: str) -> Path:
raw = raw_path.strip()
if not raw:
raise HTTPException(status_code=400, detail=f"{field_name} cannot be empty")
Comment on lines +191 to +193
if not os.path.isabs(normalized):
normalized = str((Path.cwd() / normalized).resolve(strict=False))
normalized_real = os.path.realpath(normalized)
return Path(os.path.realpath(normalized)).resolve(strict=False)
Comment on lines +224 to +226
try:
roots.append(Path.home().resolve())
except Exception:
Comment on lines 912 to +918
task.updated_at = datetime.utcnow().isoformat()
await _emit_codex_event(
"codex_dispatched",
task,
session,
{"assignee": task.assignee},
)
Comment on lines +527 to +543
return {
"found": False,
"session_id": None,
"paper_id": paper_id,
"context_pack_id": None,
"workspace_dir": None,
"user_id": None,
"sandbox_id": None,
"sandbox_executor": None,
"paper_slug_name": None,
"tasks": [],
"status": "idle",
"checkpoint": "",
"updated_at": None,
"control_state": None,
"session": None,
}
Comment on lines 995 to +1002
rows.append(
{
"paper": self._paper_to_dict(paper),
"track_id": (
min(saved_track_membership.get(pid, set()))
if saved_track_membership.get(pid)
else None
),
Comment on lines +41 to +50
def _should_overflow_to_codex() -> bool:
"""Return True if the Paper2Code CODING stage should overflow to Codex.

Checks the PAPERBOT_CODEX_OVERFLOW_THRESHOLD environment variable:
- Unset or empty -> False
- "1", "true", "yes", "on" (case-insensitive) -> True
- Any other value -> False

Wraps in try/except so any unexpected error returns False safely.
"""
Comment on lines +9 to +16
def _git(cwd: Path, *args: str) -> str:
result = subprocess.run(
["git", *args],
cwd=str(cwd),
capture_output=True,
text=True,
check=True,
)
Comment on lines +11 to +13
import types
from typing import Any, List, Optional
from unittest.mock import MagicMock
Copilot AI review requested due to automatic review settings March 19, 2026 10:01
@github-actions
Copy link
Copy Markdown

Vercel Preview

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the Studio/Agent Board backend surface area by adding Codex delegation event vocabulary + emission hooks, a Studio skills catalog API, and richer saved-paper provenance data, alongside substantial planning/validation documentation updates.

Changes:

  • Add Codex delegation EventType constants + event helpers/emission points (agent-board + MCP audit typing).
  • Introduce Studio skills discovery/registry + REST endpoints and tests for skill repo install/update.
  • Enrich saved-papers responses with provenance/workflow labels and track summary; broaden runbook allowed directory defaults and mutation policy.

Reviewed changes

Copilot reviewed 69 out of 189 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
tests/unit/test_studio_skill_catalog.py Adds unit tests covering install/list/update/detail of Studio skill repos.
tests/unit/test_studio_chat_path_validation.py Extends tests for model-id mapping and studio_cwd allowlist behaviors.
tests/unit/test_runbook_project_dir_prepare_route.py Adds tests for home/Documents default acceptance and allowlist mutation rules.
tests/unit/test_research_feedback_state.py Updates feedback tests for new saved-paper payload shape + adds provenance/judge summary coverage.
tests/unit/test_codex_overflow.py Adds unit tests for _should_overflow_to_codex env-var behavior.
tests/unit/test_api_security_middleware.py Adds test coverage for “full_access” code mode flags.
tests/unit/test_agent_events_vocab.py Defines TDD contract for EventType constants and event helper APIs (incl. Codex types).
tests/unit/test_agent_board_route.py Expands Agent Board tests for task creation and “latest session” empty payload behavior.
tests/unit/test_agent_board_codex_events.py Adds async tests for _emit_codex_event behavior and payload merging.
src/paperbot/repro/orchestrator.py Adds _should_overflow_to_codex env-var gate helper.
src/paperbot/mcp/tools/_audit.py Migrates tool audit type strings to EventType constants.
src/paperbot/infrastructure/stores/research_store.py Adds provenance labeling + track name lookup to saved-paper listing.
src/paperbot/application/services/studio_skill_registry.py Implements skill discovery/parsing from multiple ecosystems and manifests.
src/paperbot/application/collaboration/message_schema.py Introduces EventType constants (incl. file + codex delegation types).
src/paperbot/application/collaboration/agent_events.py Adds helper builders for lifecycle and tool-call envelopes.
src/paperbot/api/routes/studio_skills.py Adds Studio skills catalog/install/update/detail API routes.
src/paperbot/api/routes/runbook.py Expands allowed prefixes to include home/Documents; adds allowlist-mutation root checks.
src/paperbot/api/routes/harvest.py Extends save request with metadata and records save feedback via add_paper_feedback.
src/paperbot/api/routes/agent_board.py Adds codex event emission helper + task creation endpoint + latest-session payload tweak.
src/paperbot/api/routes/init.py Exposes new studio_skills router module.
src/paperbot/api/middleware/auth.py Adds localhost:3010 to allowed origins.
src/paperbot/api/main.py Registers Studio skills router in FastAPI app.
.planning/phases/11-dag-visualization/11-VALIDATION.md Adds Phase 11 validation strategy doc.
.planning/phases/11-dag-visualization/11-01-SUMMARY.md Adds Phase 11 plan summary doc.
.planning/phases/10-agent-board-codex-bridge/10-VALIDATION.md Adds Phase 10 validation strategy doc.
.planning/phases/10-agent-board-codex-bridge/10-03-SUMMARY.md Adds Phase 10-03 execution summary doc.
.planning/phases/10-agent-board-codex-bridge/10-03-PLAN.md Adds Phase 10-03 execution plan doc.
.planning/phases/10-agent-board-codex-bridge/10-02-SUMMARY.md Adds Phase 10-02 execution summary doc.
.planning/phases/10-agent-board-codex-bridge/10-01-SUMMARY.md Adds Phase 10-01 execution summary doc.
.planning/phases/10-agent-board-codex-bridge/10-01-PLAN.md Adds Phase 10-01 execution plan doc.
.planning/phases/09-three-panel-dashboard/09-VERIFICATION.md Adds Phase 09 verification report doc.
.planning/phases/09-three-panel-dashboard/09-VALIDATION.md Adds Phase 09 validation strategy doc.
.planning/phases/09-three-panel-dashboard/09-02-SUMMARY.md Adds Phase 09-02 summary doc.
.planning/phases/09-three-panel-dashboard/09-01-SUMMARY.md Adds Phase 09-01 summary doc.
.planning/phases/08-agent-event-vocabulary/08-VERIFICATION.md Adds Phase 08 verification report doc.
.planning/phases/08-agent-event-vocabulary/08-VALIDATION.md Adds Phase 08 validation strategy doc.
.planning/phases/08-agent-event-vocabulary/08-02-SUMMARY.md Adds Phase 08-02 summary doc.
.planning/phases/08-agent-event-vocabulary/08-01-SUMMARY.md Adds Phase 08-01 summary doc.
.planning/phases/08-agent-event-vocabulary/08-01-PLAN.md Adds Phase 08-01 execution plan doc.
.planning/codebase/TESTING.md Adds repository testing conventions reference.
.planning/codebase/STACK.md Adds technology stack reference.
.planning/codebase/INTEGRATIONS.md Adds integrations inventory reference.
.planning/codebase/CONVENTIONS.md Adds coding conventions reference.
.planning/codebase/ARCHITECTURE.md Adds high-level architecture reference.
.planning/STATE.md Updates program state/milestones and recent decision log.
.planning/REQUIREMENTS.md Updates v1.1 requirement status and adds v1.2 requirements mapping.
.planning/PROJECT.md Updates project framing to agent-agnostic dashboard direction.
.claude/agents/codex-worker.md Adds Claude Code sub-agent definition for Codex delegation workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +913 to +918
await _emit_codex_event(
"codex_dispatched",
task,
session,
{"assignee": task.assignee},
)
Comment on lines +671 to +707
async def create_task(session_id: str, request: CreateTaskRequest):
"""Create an ad-hoc task in an existing session for Studio-triggered delegation."""
session = _load_session(session_id)
if not session:
raise HTTPException(status_code=404, detail="Session not found")

title = request.title.strip()
description = request.description.strip()
if not title:
raise HTTPException(status_code=400, detail="title is required")
if not description:
raise HTTPException(status_code=400, detail="description is required")
if request.assignee != "codex":
raise HTTPException(
status_code=400,
detail="Only Codex delegation is wired right now; OpenCode runtime is not available yet.",
)

if request.workspace_dir and request.workspace_dir.strip():
session.workspace_dir = str(_sanitize_workspace_dir(request.workspace_dir))

tags = [tag.strip() for tag in request.tags if isinstance(tag, str) and tag.strip()]
if "studio" not in tags:
tags.append("studio")
if "ad_hoc" not in tags:
tags.append("ad_hoc")

task = AgentTask(
id=f"task-{uuid.uuid4().hex[:12]}",
title=title,
description=description,
status="planning",
assignee="claude",
progress=0,
tags=tags,
paper_id=session.paper_id or None,
)
Comment on lines +53 to +55
return Path(__file__).resolve().parents[4]


Comment on lines +61 to +69
fake_container = MagicMock()
fake_container.event_log = fake_log

# Patch Container inside agent_board module
import paperbot.api.routes.agent_board as ab_mod

def _fake_container_instance():
return fake_container

Comment on lines +44 to +52
Checks the PAPERBOT_CODEX_OVERFLOW_THRESHOLD environment variable:
- Unset or empty -> False
- "1", "true", "yes", "on" (case-insensitive) -> True
- Any other value -> False

Wraps in try/except so any unexpected error returns False safely.
"""
try:
value = os.getenv("PAPERBOT_CODEX_OVERFLOW_THRESHOLD", "").strip()
Comment on lines +28 to +63
@router.get("/studio/skills")
async def studio_skills_catalog():
return list_studio_skill_catalog()


_SKILL_CATALOG_BAD_REQUEST_RESPONSE = {
400: {"description": "Invalid skill catalog request or repository metadata."}
}


@router.post("/studio/skills/install", responses=_SKILL_CATALOG_BAD_REQUEST_RESPONSE)
async def studio_skill_install(request: InstallStudioSkillRepoRequest):
try:
return install_studio_skill_repo(request.repo_url, repo_ref=request.repo_ref)
except StudioSkillCatalogError as exc:
raise HTTPException(status_code=400, detail=str(exc)) from exc


@router.post(
"/studio/skills/repos/{repo_slug}/update",
responses=_SKILL_CATALOG_BAD_REQUEST_RESPONSE,
)
async def studio_skill_repo_update(repo_slug: str, request: UpdateStudioSkillRepoRequest):
try:
return update_studio_skill_repo(repo_slug, repo_ref=request.repo_ref)
except StudioSkillCatalogError as exc:
raise HTTPException(status_code=400, detail=str(exc)) from exc


@router.get("/studio/skills/{skill_key}")
async def studio_skill_detail(skill_key: str):
try:
detail = get_studio_skill_detail(skill_key)
except StudioSkillCatalogError as exc:
raise HTTPException(status_code=404, detail=str(exc)) from exc
return detail.to_payload()
Comment on lines +224 to +228
"""
normalized_real = _normalize_path_input(raw_path, field_name)
return _resolve_real_path_within_prefixes(
normalized_real,
_allowed_workdir_prefixes(),
Comment on lines +990 to +1002
track_names = [
track_name_by_id[track_ref]
for track_ref in sorted(saved_track_membership.get(pid, set()))
if track_name_by_id.get(track_ref)
]
rows.append(
{
"paper": self._paper_to_dict(paper),
"track_id": (
min(saved_track_membership.get(pid, set()))
if saved_track_membership.get(pid)
else None
),
app.include_router(model_endpoints.router, prefix="/api", tags=["Model Endpoints"])
app.include_router(embedding_settings.router, prefix="/api", tags=["Embedding Settings"])
app.include_router(studio_chat.router, prefix="/api", tags=["Studio Chat"])
app.include_router(studio_skills.router, prefix="/api", tags=["Studio Skills"])
@jerry609 jerry609 merged commit 8c6bb88 into dev Mar 19, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants