Skip to content

feat: unify apps and agents in projects - #150

Draft
biersoeckli wants to merge 23 commits into
mainfrom
feat/unify-project-workloads
Draft

biersoeckli wants to merge 23 commits into
mainfrom
feat/unify-project-workloads

Conversation

@biersoeckli

Copy link
Copy Markdown
Owner

Summary

Unify Project Workloads so a Project can host Apps and Agents in one workspace.

<Project>
  <Project Network Graph>
    <App Workload Node>   -> App Details Drawer
    <Agent Workload Node> -> Agent Sandbox Drawer
                              -> start / suspend / resume / stop
  <Workloads Table>

Agent Volume
  ALL
  PER_SANDBOX
  PER_CUSTOM_TAG

Removes the Project type split and standalone Agent detail pages. Adds Agent Sandbox API support, tagged sandbox resolution, per-custom-tag storage, and bidirectional Internet access controls in the Project Network Graph.

Evidence

  • Before: Projects separated Apps and Agents by projectType; Agent workflows lived on standalone detail pages.
    After: Projects render both as Project Workloads in the graph, table, and drawers; migrations remove Project.projectType and add Agent Volume type/access mode.
  • Check: git diff --check 32bca570..HEAD -> passed.
    Test: yarn test -> 123 files passed, 1 failed, 1 skipped; 1,022 tests passed, 5 skipped. The failure is build.service integration > fails to build a docker image from an SSH repository without ssh key auth: the build resolved instead of rejecting with Git: SSH host key verification failed.

Merge Danger

Door: Two-way

Database migrations and removed routes can be rolled back with a follow-up migration/release, but active Project Workload data and Agent Sandbox resources need migration verification.

Blast Radius: workloads

Projects, Agent Sandboxes, persistent volume claims, Project Network Graph interactions, and API consumers.

aperolschpritz and others added 23 commits October 9, 2026 12:54
Remove Project Type so every Project can contain both Apps and Agents.

- drop projectType column, enum, guards, and generated zod field
- remove projectType from REST project write/response (breaking)
- combine project workloads into one table and show Agents as graph nodes
- gate Agent creation on Agent Sandbox add-on availability
- update CONTEXT.md and add ADR-0010
Give Agent Sandboxes a right-side drawer like Apps, reusing existing components.

- new AgentSandboxDrawer with Sandboxes, Builds, Configuration tabs
- compact deploy/rebuild/delete header actions and nested configuration drawers
- drawer session supports AGENT nodes via drawerAgentId
- route table, sidebar, graph and post-create entry points to the drawer
- UI terminology: Agent Sandbox and Sandbox Instance
- update 18 existing skills from upstream
- add pr, implement-spec, retro skills
- remove resolving-merge-conflicts (dropped upstream)
- rename CONTEXT.md/CONTEXT-FORMAT.md to GLOSSARY.md/GLOSSARY-FORMAT.md
- refresh skills-lock.json hashes and entries
- spec: ALL vs PER_SANDBOX agent volumes in .scratch/agent-volume-types/PRD.md
- ADR 0011: per-sandbox volumes via native SandboxClaim volumeClaimTemplates
- glossary: Volume Type, Shared Agent Volume, Per-Sandbox Agent Volume, Custom Tag
…ns; modify tdd skill to clarify seam testing
- AgentVolume gains volumeType (ALL default) and accessMode (ReadWriteMany default)
- validate ALL requires ReadWriteMany and keep type/access mode/storage class immutable
- build per-sandbox volumeClaimTemplates on the SandboxTemplate with Overrides policy
- send tagged claim-template overrides from startSandbox and reject invalid Custom Tags
- restrict shared-claim cleanup to ALL volumes and QuickStack-owned claims
- expose volume type and access mode in the agent volume editor and table
…mprove environment variable handling for agent sandboxes
- add SUSPENDED status resolved from the Sandbox operatingMode
- add suspend/resume/resume-by-tag methods and REST endpoints
- reject duplicate Custom Tags on start with a conflict error
- reject exec, file and access-URL operations on suspended sandboxes
- add suspend/resume actions, Custom Tag column and SUSPENDED badge
- document the decision in ADR 0012 and the glossary
* docs: add per-custom-tag agent volume spec and ADR 0013

Refine the PER_CUSTOM_TAG Agent Volume design and record the chosen Variante 3: a stable per-Custom-Tag PersistentVolumeClaim attached to a directly created Sandbox, with no S3. Adds the variant specs, controller research, glossary terms, and ADR 0013.

* docs: drop rejected per-custom-tag volume variants, keep variant 3

* feat: per-custom-tag agent volumes with direct sandboxes

Add a third Agent Volume type PER_CUSTOM_TAG whose data lives in a
QuickStack-managed per-Custom-Tag PersistentVolumeClaim. Agents that carry
such a volume are started by creating a Sandbox directly (not a
SandboxClaim/template) with the per-tag PVC attached statically, so the
workspace survives Stop, deletion, and idle expiry.

- Shared model: PER_CUSTOM_TAG volume type; RWO/RWX access modes
- Agent Volume service: PER_SANDBOX/PER_CUSTOM_TAG exclusivity; delete
  volume also deletes its per-tag PVCs
- PVC management: ensureAgentTagPvc (create/grow-only), delete by tag and
  by volume, retain tag PVCs on deploy
- Adapter: direct Sandbox create/list/delete/ready-wait/status
- Builder: buildSandboxResource with static ALL + per-tag PVCs
- Runtime: forked start/stop/list/status/suspend/resume/resumeByTag and a
  new deleteTag operation; no warm pool for these Agents
- Exec/file/access URL and the SSE watch gain a direct-Sandbox branch
- REST DELETE /api/v1/agents/:agentId/tags/:customTag
- Frontend: Per Custom Tag volume type, label, and delete-tag action

* refactor: address code-review findings for per-custom-tag volumes

- Extract AgentVolumeUtils.usesPerCustomTagVolume and reuse it across the
  runtime, agent service, sandbox service, access service, and SSE route
- Collapse the volume-type exclusivity check
- Extract shared agent PVC definition and delete-by-predicate helpers
- Build SSE watch paths from the adapter's group/plural constants
- Reconcile a standalone NetworkPolicy for direct Sandbox Agents (the base
  Sandbox CRD carries no network policy) and delete it with the Agent
- Add qs-agent-* labels alongside annotations on per-Custom-Tag PVCs
- Name the AgentSandboxInfo DTO shared by both sandbox mappers

* refactor: agent volume handling and sandbox utilities

* refactor: agent sandbox services and tests for better code structure

* fix: update prefix from 'aw-' to 'av-' for agent volume naming conventions

---------

Co-authored-by: aperolschpritz <[email protected]>
Co-authored-by: biersoeckli <[email protected]>

This branch has not been deployed

No deployments
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.

2 participants