Skip to content

feat: add Devin Outposts on Daytona reference implementation#2

Open
mu-hashmi wants to merge 1 commit into
daytona:mainfrom
mu-hashmi:feat/devin-outposts
Open

feat: add Devin Outposts on Daytona reference implementation#2
mu-hashmi wants to merge 1 commit into
daytona:mainfrom
mu-hashmi:feat/devin-outposts

Conversation

@mu-hashmi

@mu-hashmi mu-hashmi commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

https://docs.devin.ai/cloud/outposts/overview

add reference implementation code for devin outposts guide


Open in Devin Review (Beta)

Summary by cubic

Adds a reference implementation to run Devin Outposts sessions on Daytona. Includes an orchestrator for Linux/Windows sandboxes and an outposts-connect CLI to link a pool and write .env.

  • New Features

    • Orchestrator reconciles the opbeta queue with Daytona sandboxes: claim/resume, launch checksum-pinned devin-remote, release on sleep/end, safe reattach via labels; persists event cursor and acceptor ID for stable restarts.
    • outposts-connect CLI uses a browser PKCE flow and writes DEVIN_OUTPOSTS_TOKEN, DEVIN_API_URL, and POOL_ID to .env.
    • Cross-platform workers: checksum-verified downloads, PID/log supervision; Windows bootstrap/provision scripts with SHA-verified Git/Chrome; Linux snapshot via packaged Dockerfile.
    • Snapshot builders for Linux and Windows (from windows-medium) with SHA-pinned dependencies and default resource sizes.
    • Typed opbeta queue client with watch/claim/release and tolerant field accessors; docs and tests included.
    • Console scripts: devin-outposts-orchestrator, outposts-connect, build-devin-outposts-snapshot, build-devin-outposts-windows-snapshot.
  • Migration

    • Install the package, then run outposts-connect to populate .env (or copy .env.example and fill values).
    • Build a snapshot: build-devin-outposts-snapshot (Linux) or build-devin-outposts-windows-snapshot (Windows), then set the snapshot name in .env.
    • Run devin-outposts-orchestrator for the target pool (one process per pool/platform).

Written for commit fcfcc1f. Summary will update on new commits.

Review in cubic

beta-devin-ai-integration[bot]

This comment was marked as resolved.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

2 issues found across 20 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="python/cognition/devin-outposts/devin_outposts/queue.py">

<violation number="1" location="python/cognition/devin-outposts/devin_outposts/queue.py:366">
P3: Valid SSE streams can produce incorrect `Event.cursor` values because no-colon fields are discarded and the last event ID is reset after every frame. Following the SSE field parsing and persistent last-event-ID rules avoids stale or missing replay cursors.</violation>
</file>

<file name="python/cognition/devin-outposts/devin_outposts/build_windows_snapshot.py">

<violation number="1" location="python/cognition/devin-outposts/devin_outposts/build_windows_snapshot.py:30">
P3: `LOGGER` is dead code, and it leaves `logging` imported solely for an unused module variable. Removing both would keep the new builder free of misleading logging scaffolding.</violation>
</file>

Tip: instead of fixing issues one by one fix them all with cubic
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Re-trigger cubic

Comment thread python/cognition/devin-outposts/devin_outposts/orchestrator.py Outdated
Comment thread python/cognition/devin-outposts/devin_outposts/orchestrator.py Outdated
Comment thread python/cognition/devin-outposts/devin_outposts/worker.py
Comment thread python/cognition/devin-outposts/devin_outposts/queue_shapes.py
Comment thread python/cognition/devin-outposts/devin_outposts/windows_bootstrap.ps1 Outdated
Comment thread python/cognition/devin-outposts/devin_outposts/config.py Outdated
Comment thread python/cognition/devin-outposts/devin_outposts/worker_linux.py Outdated
continue

field_name, separator, value = line.partition(":")
if not separator:

@cubic-dev-ai cubic-dev-ai Bot Jul 12, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: Valid SSE streams can produce incorrect Event.cursor values because no-colon fields are discarded and the last event ID is reset after every frame. Following the SSE field parsing and persistent last-event-ID rules avoids stale or missing replay cursors.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At python/cognition/devin-outposts/devin_outposts/queue.py, line 366:

<comment>Valid SSE streams can produce incorrect `Event.cursor` values because no-colon fields are discarded and the last event ID is reset after every frame. Following the SSE field parsing and persistent last-event-ID rules avoids stale or missing replay cursors.</comment>

<file context>
@@ -0,0 +1,508 @@
+                continue
+
+            field_name, separator, value = line.partition(":")
+            if not separator:
+                continue
+            if value.startswith(" "):
</file context>
Fix with cubic

from daytona_api_client.models.snapshot_dto import SnapshotDto
from dotenv import load_dotenv

LOGGER = logging.getLogger(__name__)

@cubic-dev-ai cubic-dev-ai Bot Jul 12, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: LOGGER is dead code, and it leaves logging imported solely for an unused module variable. Removing both would keep the new builder free of misleading logging scaffolding.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At python/cognition/devin-outposts/devin_outposts/build_windows_snapshot.py, line 30:

<comment>`LOGGER` is dead code, and it leaves `logging` imported solely for an unused module variable. Removing both would keep the new builder free of misleading logging scaffolding.</comment>

<file context>
@@ -0,0 +1,383 @@
+from daytona_api_client.models.snapshot_dto import SnapshotDto
+from dotenv import load_dotenv
+
+LOGGER = logging.getLogger(__name__)
+
+PROVISIONER = resources.files("devin_outposts").joinpath("provision_windows.ps1")
</file context>
Fix with cubic

Comment thread python/cognition/devin-outposts/devin_outposts/worker_windows.py Outdated
@mu-hashmi mu-hashmi force-pushed the feat/devin-outposts branch from d4bb1f9 to c93b29c Compare July 14, 2026 00:22
Signed-off-by: Muhammad Hashmi <mhashmi@berkeley.edu>
@mu-hashmi mu-hashmi force-pushed the feat/devin-outposts branch from c93b29c to fcfcc1f Compare July 14, 2026 01:27
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.

1 participant