Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

console-deploy

БесплатноБез исполняемых скриптовНе проверен

Deploy Mission Control (console-ui) to Cloudflare Pages (normally auto-deployed by harness-sync on the hub; this is the check and the fallback) and the…

cromford-aiот cromford-ai★ 29 звёзд на GitHub

Об этом скилле

console-deploy

Mission Control is a static Vite/preact SPA on Cloudflare Pages (project mission-control, https://console.example.pages.dev) with Pages Functions that proxy /api/* to the harness-console worker and read D1 directly for the IDEAS / NOW / HISTORY / NEEDS screens. worker/jobs (the harness-jobs worker + its own D1) is a separate deploy that ships in the same pass because the JOBS screen depends on it.

Repo layout: console-ui/ (SPA + functions/), worker/jobs/ (worker + schema.sql), worker/watchdog/. console-ui/README.md is the contract for what each Pages Function needs.

What deploys what, and what does NOT

  • bin/harness-sync.sh already deploys worker/* automatically on any box that has env/cloudflare.env, sha-gated per worker, alerting when a wrangler deploy fails. Check that first — a worker change may already be live.
  • Cloudflare Pages is auto-deployed too, on the hub (BH-3563). On any box with cloudflare.env, harness-sync launches bin/console-pages-deploy.sh detached. It is sha-gated on the settings row deploy.console-ui.sha, which holds main's last first-parent console-ui/ commit that went live. It runs npm ci, npm test, vite build and wrangler@3 pages deploy in a snapshot under state/, stamps the row, then runs the step 4 probes.
  • A red npm test refuses the deploy with a console-pages-deploy-red alert naming the failing tests and their test files (full log in logs/console-pages-deploy-test-<sha7>.log). A drift warning in pipeline-health (Pages more than 2h behind main) is BH-3564, not yet on main.
  • Look here first: logs/console-pages-deploy.log and bin/jobs-client.sh setting-get deploy.console-ui.sha. To force a redeploy: bin/jobs-client.sh setting-set deploy.console-ui.sha none. To switch it off: the fleet-propagate knob CONSOLE_PAGES_DEPLOY=0.

Credentials and identifiers

set -a; . /root/harness/env/cloudflare.env; set +a      # CLOUDFLARE_API_TOKEN (chmod 600, never echoed)
export CLOUDFLARE_API_TOKEN
export CLOUDFLARE_ACCOUNT_ID=00000000000000000000000000000000

The account id is not a secret (it is already committed in worker/jobs/wrangler.jsonc). The API token is — never print it, never put it in a log line, a commit or a PR body. If env/cloudflare.env is absent, this box cannot deploy Cloudflare: say so and stop.

thing identifier
Pages project mission-control → console.example.pages.dev
Pages D1 binding CONSOLE_DB → D1 harness-console-db (00000000-0000-0000-0000-000000000001)
Pages secret HARNESS_SECRET (same value as the boxes' env/global.env)
jobs worker harness-jobs → D1 DB → harness-jobs (00000000-0000-0000-0000-000000000000)

Confirm any of these rather than trusting this table: npx --yes wrangler@3 d1 list and the project GET in step 1.

Wrangler is pinned to wrangler@3 (npx --yes wrangler@3 …). It prints an "out-of-date, update to wrangler@4" warning on every command — that warning is expected and is not a failure. Do not silently move this pipeline to v4 while deploying; that is its own change, tested on its own.

1. Pages project config — env vars and D1 bindings

A Pages Function that needs a binding fails closed with a 503 naming the missing binding, by design. So a 503 on /api/coord/*, /api/ideas/* or /api/cockpit/* is a config gap, not a code bug. Read the current config first (never a blind PATCH — the config object is replace-semantics per environment):

curl -s "https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/pages/projects/mission-control" \
  -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  | jq '.result.deployment_configs | {production: {env_vars: (.production.env_vars|keys), d1: .production.d1_databases},
                                       preview:    {env_vars: (.preview.env_vars|keys),    d1: .preview.d1_databases}}'

secret_text values never come back from the API — you see the key, not the value. Set or repair production only:

# HARNESS_SECRET is read from env, never typed into the command line or a file.
set -a; . /root/harness/env/global.env; set +a
curl -s -X PATCH "https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/pages/projects/mission-control" \
  -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" -H 'Content-Type: application/json' \
  -d "$(jq -nc --arg s "$HARNESS_SECRET" --arg db 00000000-0000-0000-0000-000000000001 '
    {deployment_configs: {
      production: {env_vars: {HARNESS_SECRET: {type:"secret_text", value:$s}}, d1_databases: {CONSOLE_DB: {id:$db}}}}}')" \
  | jq '.success, [.errors[]?.message]'

The preview environment binds nothing (BH-6923). Never add HARNESS_SECRET, CONSOLE_DB or any other binding or secret to preview: a preview runs unreviewed PR code. The console-preview lane (bin/console-preview-deploy.sh) refuses a preview envir

Полный SKILL.md на GitHub

Установить console-deploy в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл console-deploy?

Deploy Mission Control (console-ui) to Cloudflare Pages (normally auto-deployed by harness-sync on the hub; this is the check and the fallback) and the harness-jobs worker/D1 that back it — Pages project env + D1 bindings via the Cloudflare API, npm ci + vite build, wrangler@3 pages deploy, and fail-closed anonymous probes as the verification. Use when console-ui or worker/ changed and the live console must be updated, or a console screen answers 503.

Как установить скилл console-deploy?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл console-deploy запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить console-deploy с