feat(packages): host @agentworkforce/daytona-runner in workforce#98
Conversation
Relocate @workforce/daytona-runner from the private cloud monorepo (where cloud#543 mistakenly placed it) into workforce — the canonical OSS publishing surface per the deploy-v1 codex spec. Sources copied verbatim from cloud/packages/daytona-runner/src/ (auth.ts, types.ts, runtime.ts, index.ts, runtime.test.ts). Zero @cloud/* leaks: the package was already extracted to be cloud-free. Package metadata aligned to workforce conventions: - Name preserved as @workforce/daytona-runner (cloud's pin still resolves once published) - Version reset to 0.1.0 (fresh major-zero, matches relay#844 policy) - ESM, tsconfig extends ../../tsconfig.base.json - publishConfig.provenance: true to match workforce's OSS posture - @daytonaio/sdk declared as a peer dep, ^0.148.0 (cloud parity) Mirrors AgentWorkforce/relay#844, which just relocated @agent-relay/events + @agent-relay/agent from cloud to relay for the same OSS/private split reason. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR introduces the ChangesDaytona Runtime Package
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
The package was originally drafted under `@workforce/*` per the deploy-v1 codex spec, but that scope is unclaimed on npm and does not match any other published surface in this repo. Every other workforce-published package uses `@agentworkforce/*` (persona-kit, workload-router, cli, agentworkforce umbrella). Rename `@workforce/daytona-runner` -> `@agentworkforce/daytona-runner` and slot it into the existing publish workflow's lockstep allow-list so it ships at the same cadence as the rest of the surface. No new scope, no new OIDC trusted-publisher registration, no separate workflow track. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/publish.yml (1)
692-696:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAdd
daytona-runnerto release-note sort order.Line 692’s
packageOrderomitsdaytona-runner, so Line 696 sorts it with index-1and places it out of intended order. Add it to keep release notes deterministic.Suggested patch
- const packageOrder = ['persona-kit', 'workload-router', 'cli', 'agentworkforce']; + const packageOrder = ['persona-kit', 'workload-router', 'cli', 'daytona-runner', 'agentworkforce'];🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/publish.yml around lines 692 - 696, The packageOrder array used to sort release-note entries (symbol packageOrder) is missing "daytona-runner", causing entries parsed from versionsRaw and processed into entries to get index -1 and be ordered incorrectly; update the packageOrder constant (the array literal assigned to packageOrder) to include "daytona-runner" in the desired position among ['persona-kit','workload-router','cli','agentworkforce'] so the sort((a,b)=>packageOrder.indexOf(a.pkg)-packageOrder.indexOf(b.pkg)) produces a deterministic order for entries.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/publish.yml:
- Around line 692-696: The packageOrder array used to sort release-note entries
(symbol packageOrder) is missing "daytona-runner", causing entries parsed from
versionsRaw and processed into entries to get index -1 and be ordered
incorrectly; update the packageOrder constant (the array literal assigned to
packageOrder) to include "daytona-runner" in the desired position among
['persona-kit','workload-router','cli','agentworkforce'] so the
sort((a,b)=>packageOrder.indexOf(a.pkg)-packageOrder.indexOf(b.pkg)) produces a
deterministic order for entries.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a19af361-9b8e-4ff8-9516-f276bba7045d
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
.github/workflows/publish.ymlpackages/daytona-runner/.gitignorepackages/daytona-runner/README.mdpackages/daytona-runner/package.jsonpackages/daytona-runner/src/auth.tspackages/daytona-runner/src/index.tspackages/daytona-runner/src/runtime.test.tspackages/daytona-runner/src/runtime.tspackages/daytona-runner/src/types.tspackages/daytona-runner/tsconfig.json
| # must publish first. The top-level `agentworkforce` wrapper depends on | ||
| # `@agentworkforce/cli`, so it must publish last. | ||
| echo "packages=persona-kit workload-router cli agentworkforce" >> "$GITHUB_OUTPUT" | ||
| echo "packages=persona-kit workload-router cli agentworkforce daytona-runner" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
🟡 daytona-runner missing from packageOrder causes incorrect release notes sorting
daytona-runner is added to the publish packages list at line 92, but the packageOrder array in the build-release-notes.mjs script at .github/workflows/publish.yml:692 is not updated to include it. Since packageOrder.indexOf('daytona-runner') returns -1, the .sort((a, b) => packageOrder.indexOf(a.pkg) - packageOrder.indexOf(b.pkg)) comparison will sort daytona-runner before all other packages (-1 - 0 = -1, -1 - 1 = -2, etc.), placing it first in the GitHub Release notes instead of at a logical position.
Prompt for agents
The packages list at line 92 now includes daytona-runner, but the packageOrder array in the build-release-notes.mjs script (around line 692 of .github/workflows/publish.yml) still only contains ['persona-kit', 'workload-router', 'cli', 'agentworkforce']. This array is used to sort entries in the GitHub Release notes. Since daytona-runner is not present, Array.indexOf returns -1, which sorts it before all other packages in the release notes.
To fix: add 'daytona-runner' to the packageOrder array at the appropriate position (e.g. after 'agentworkforce' or wherever it logically belongs). Also update the comment on lines 88-91 which states agentworkforce must publish last, since daytona-runner now publishes after it.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Addressed in dd25310 — moved daytona-runner before agentworkforce in the publish list and added it to packageOrder at the matching position. This preserves the existing "agentworkforce must publish last" invariant the comment on lines 88-91 already documents, and makes release-notes sort deterministic instead of falling to the front via indexOf -1.
… release-notes order Move daytona-runner ahead of the agentworkforce umbrella in the publish list so the existing "agentworkforce must publish last" invariant (documented on lines 88-91) still holds. Also add daytona-runner to the build-release-notes packageOrder array at the matching position so its release-note entry sorts deterministically instead of falling to the front via Array.indexOf returning -1. Addresses CodeRabbit and Devin review feedback on #98. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Relocate the Daytona runtime adapter from the private cloud monorepo (where cloud#543 mistakenly placed it) into workforce — the canonical OSS publishing surface per the deploy-v1 codex spec.
Today cloud's deploy is broken in part because cloud's workspace build order doesn't build
daytona-runnerbeforecore. The proper fix is to make workforce the canonical home + publishing surface so cloud can consume it as a published npm package instead of as a private workspace sibling.Why
Same OSS/private-monorepo split that AgentWorkforce/relay#844 just resolved for
@agent-relay/events+@agent-relay/agent. Platform-agnostic packages live in the OSS repo where they get provenance attestation; cloud-specific extensions stay in cloud.daytona-runneris platform-agnostic — it depends only on@daytonaio/sdk(peer dep) and has zero@cloud/*imports.Source
All files under
packages/daytona-runner/src/copied verbatim fromcloud/packages/daytona-runner/src/:auth.ts— Daytona auth helpers (apiKey vs JWT+org)types.ts—WorkflowRuntime,RuntimeHandle, etc.runtime.ts—DaytonaRuntimeclassindex.ts— public barrelruntime.test.ts— node:test smoke suiteZero
@cloud/*leaks confirmed — the package was already extracted clean for this exact transition.Test file got one minor type-narrowing tweak (
assert.ok('apiKey' in resolved, ...)before readingresolved.apiKey) because workforce's tsconfig builds*.test.tsintodist/whereas cloud's tsconfig excluded them. No behavior change.Changes since first push
@workforce/daytona-runner→@agentworkforce/daytona-runner. The original@workforce/*scope is unclaimed on npm and didn't match any other published surface in this repo. Aligning with@agentworkforce/*(persona-kit, workload-router, cli, runtime, deploy, agentworkforce umbrella) eliminates the platform-team coordination round-trip (new scope, OIDC registration, separate workflow track).daytona-runnerto the existing publish workflow's allow-list.Publish posture
@agentworkforce/daytona-runner— joins the existing@agentworkforce/*published surface..github/workflows/publish.yml's allow-list (packages=persona-kit workload-router cli agentworkforce daytona-runner). The umbrella lockstep heals its local version up to the published baseline at publish time, so the0.1.0field is just a placeholder.@agentworkforcescope. No new scope to claim, no new workflow track, no new trusted-publisher row.{ "access": "public", "provenance": true }— matches the rest of the surface.@daytonaio/sdk@^0.148.0(parity with cloud).The first npm release of
@agentworkforce/daytona-runnerwill happen on the next umbrella publish run after this merges.Companion PR (cloud)
A parallel agent is opening
chore/consume-published-daytona-runneron cloud to deletecloud/packages/daytona-runnerand bump the dep to@agentworkforce/daytona-runner. That cloud PR is blocked on this PR + the first publish landing.Verification
Run locally in the worktree:
Results:
DAYTONA_API_KEY)🤖 Generated with Claude Code