Agent Skillsdifferent-ai/openwork › daytona-electron-den

daytona-electron-den

GitHub

验证 Electron 桌面应用与 Daytona Den 云沙箱的端到端集成,涵盖云认证、组织策略及桌面握手流程。

.opencode/skills/daytona-electron-den/SKILL.md different-ai/openwork

触发场景

需要验证 Electron 客户端与云端服务的交互 测试云认证和桌面应用握手流程 检查云环境下的功能集成

安装

npx skills add different-ai/openwork --skill daytona-electron-den -g -y
更多选项

非标准路径

npx skills add https://github.com/different-ai/openwork/tree/dev/.opencode/skills/daytona-electron-den -g -y

不安装直接使用

npx skills use different-ai/openwork@daytona-electron-den

指定 Agent (Claude Code)

npx skills add different-ai/openwork --skill daytona-electron-den -a claude-code -g -y

安装 repo 全部 skill

npx skills add different-ai/openwork --all -g -y

预览 repo 内 skill

npx skills add different-ai/openwork --list

SKILL.md

Frontmatter
{
    "name": "daytona-electron-den",
    "description": "Electron and Den, desktop plus cloud, two-sandbox e2e, cloud auth, marketplace, org policy, signed preview routing, provider sync, desktop handoff. Validate Electron against a Daytona Den server with unified proof."
}

Daytona Electron Against Den

Use this skill for full-stack cloud behavior: one Daytona sandbox runs Den, and a separate Daytona sandbox runs the real Electron app pointed at that Den server.

Start The Server Sandbox

Use the server skill first:

bash .devcontainer/test-server-on-daytona.sh <branch-or-commit>

Record the printed values:

  • SERVER_SANDBOX
  • DEN_WEB_URL
  • DEN_API_URL

Validate server health:

curl -sf "$DEN_WEB_URL/api/den/health"
curl -sf "$DEN_API_URL/health"

Start Electron Against Den

bash .devcontainer/test-on-daytona.sh <branch-or-commit> \
  --den-base-url "$DEN_WEB_URL" \
  --den-api-base-url "$DEN_API_URL" \
  --artifacts-volume

Add --require-signin when the expected behavior must be signed-out until cloud auth completes. Add --record-video --recording-name <name> when PR evidence is needed.

Validate Bootstrap

Before testing cloud behavior, prove Electron is using the Daytona Den server:

JSON.stringify({ hash: location.hash, text: document.body.innerText.slice(0, 1000) })

Then inspect the desktop bootstrap file:

daytona exec "$SANDBOX" -- 'cat /workspace/.openwork-daytona/desktop-bootstrap.json'

Expected: baseUrl is DEN_WEB_URL and apiBaseUrl is DEN_API_URL, not production.

Desktop Handoff Pattern

For seeded/demo auth, create the handoff URL from the Den API, then paste it into Electron's Cloud Account sign-in code field. Do not rely on browser navigation alone as proof that desktop auth completed.

Fully automated variant (no paste UI): as a signed-in web user call POST /api/den/v1/auth/desktop-handoff (body {}) to get a grant (single-use, 5-minute TTL), then dispatch the deep link directly in the Electron renderer via CDP — the auth provider consumes it:

window.dispatchEvent(new CustomEvent("openwork:deep-link", {
  detail: { urls: ["openwork://den-auth?grant=" + grant +
    "&denBaseUrl=" + encodeURIComponent(DEN_WEB_URL)] },
}));

Build denBaseUrl yourself from the public Den Web URL — the server-resolved one in the handoff response can be an internal host. Afterwards the app shows "Choose your organization" → "Continue with organization".

Validate all of these:

  • Electron Cloud Account shows signed-in user/org state.
  • Den API logs show handoff exchange or /v1/me/orgs.
  • Electron UI can refresh cloud providers/workers/marketplace without production URLs.

Renderer navigation cheat-sheet (hash routes work when buttons are flaky):

  • Org marketplace extensions live at #/workspace/<ws>/settings/cloud-marketplaces (the standalone view; the "Marketplace" tab inside Extensions (Legacy) renders the embedded variant which HIDES cloud org plugin rows by design). Expect org plugins as "Active · runs in cloud".
  • Insert composer prompts with editor.focus() + document.execCommand("insertText", false, text) on [contenteditable="true"][data-lexical-editor="true"]. Do not dispatch synthetic paste events — Lexical converts them into a "Pasted · N lines" attachment chip. Then click Run task (exact text match) and wait for the "Ready for new tasks" status before capturing results.

Marketplace, Policy, Provider Sync

For each cloud feature, use the daytona-flow-validator loop:

  1. Assert server seed or API state.
  2. Act in Electron UI.
  3. Assert Electron visible state.
  4. Assert Den logs/API state if relevant.
  5. Capture screenshot or recording evidence.

Minimum assertions:

  • Marketplace: package appears, install/remove changes local extension state.
  • Org policy: restriction appears in Electron and persists after reload.
  • Provider sync: Den-managed provider appears as imported/credential-ready, model can be selected, and task metadata uses the Den provider id.
  • Worker proxy: worker/proxy failures affect only worker UI and recover after proxy restart.

Evidence

Report both server and Electron proof:

  • Den Web/API health checks.
  • Relevant /tmp/den-*.log snippets.
  • Electron CDP assertions and screenshots.
  • Recording URL if requested.

版本历史

  • 757601b 当前 2026-08-28 23:00

    重构:移除遗留的 worker proxy 路径,统一为单一 Cloud runtime 访问入口。

  • ff5d298 2026-08-20 11:35

同 Skill 集合

.opencode/skills/agent-first-screenshots/SKILL.md
.opencode/skills/browser-automation/SKILL.md
.opencode/skills/build-a-witness/SKILL.md
.opencode/skills/cloud-dashboard-walkthrough/SKILL.md
.opencode/skills/create-plugin/SKILL.md
.opencode/skills/daytona-chrome-cdp/SKILL.md
.opencode/skills/daytona-cloud-instance/SKILL.md
.opencode/skills/daytona-cloud-server/SKILL.md
.opencode/skills/daytona-dev/SKILL.md
.opencode/skills/daytona-electron-test/SKILL.md
.opencode/skills/daytona-flow-validator/SKILL.md
.opencode/skills/daytona-recording-artifacts/SKILL.md
.opencode/skills/daytona-secrets-volume/SKILL.md
.opencode/skills/daytona-seeded-cloud-demo/SKILL.md
.opencode/skills/daytona-windows-cert/SKILL.md
.opencode/skills/diagnose-a-red-run/SKILL.md
.opencode/skills/fraimz/SKILL.md
.opencode/skills/get-env-var/SKILL.md
.opencode/skills/openwork-models/SKILL.md
.opencode/skills/product-tutorial-pipeline/SKILL.md
.opencode/skills/prove-a-pr/SKILL.md
.opencode/skills/publish-evidence/SKILL.md
.opencode/skills/run-evals/SKILL.md
.opencode/skills/run-tests/SKILL.md
.opencode/skills/shadcn/SKILL.md
.opencode/skills/upload-photo/SKILL.md
.opencode/skills/write-a-spec/SKILL.md
.warden/skills/desktop-den-sync-review/SKILL.md
.warden/skills/diff-security-review/SKILL.md

元信息

文件数
0
版本
757601b
Hash
ff5e877c
收录时间
2026-08-20 11:35

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-17 00:15
浙ICP备14020137号-1