droidsembly 0.4.0-beta.4 → 0.4.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.it.md +16 -5
- package/README.md +15 -5
- package/bin/cubefarm.js +2 -296
- package/bin/droidsembly.js +304 -0
- package/bin/environment.d.ts +3 -0
- package/bin/environment.js +48 -0
- package/dist/assets/AccessibilitySettings-BLUQhCir.js +32 -0
- package/dist/assets/{AccessibilitySettings-HrzBDUTN.css → AccessibilitySettings-DGcxiTfe.css} +1 -1
- package/dist/assets/{AppViewer-CqGa1r0z.js → AppViewer-CkRhHzAg.js} +2 -2
- package/dist/assets/{Balloon-dO9J4khp.js → Balloon-CyA9jx7L.js} +1 -1
- package/dist/assets/{Batched-CmXZtCvQ.js → Batched-BnwN-jIb.js} +1 -1
- package/dist/assets/{Birds-D51xGT0l.js → Birds-T-cAlNXa.js} +1 -1
- package/dist/assets/{Blimp-C2c_AKRR.js → Blimp-D5lM1i8g.js} +1 -1
- package/dist/assets/{BufferGeometryUtils-Dcu0heeS.js → BufferGeometryUtils-BQuR3FyE.js} +1 -1
- package/dist/assets/{Duck-CzFiUF6U.js → Duck-Df57hNLp.js} +1 -1
- package/dist/assets/{Effects-DwOi-gSQ.js → Effects-BkJu9eYu.js} +1 -1
- package/dist/assets/{Fireworks-Cc2mGzPJ.js → Fireworks-BB1Mfdb3.js} +1 -1
- package/dist/assets/{Helicopter-ltB-x8hG.js → Helicopter-B5NObfW4.js} +1 -1
- package/dist/assets/{Hurricane-C2qHsRw4.js → Hurricane-CGsnFbNg.js} +1 -1
- package/dist/assets/{Kaiju-DPHVjFjg.js → Kaiju-5SPvHn_6.js} +1 -1
- package/dist/assets/{Meteors-CxcguXTJ.js → Meteors-rA1sR1A3.js} +1 -1
- package/dist/assets/{MissionConsole-BUE2mijT.js → MissionConsole-zJYkK_M1.js} +1 -1
- package/dist/assets/{Office-NV5zlSnK.js → Office-fRdJ34l-.js} +44 -44
- package/dist/assets/{PhotoPanel-CDqgU99Z.js → PhotoPanel-DiplEiL_.js} +1 -1
- package/dist/assets/{PhotoScene-RRXC4_Jv.js → PhotoScene-DG1ui0Av.js} +3 -3
- package/dist/assets/{Plane-BQB72TWZ.js → Plane-CtJDMF4A.js} +1 -1
- package/dist/assets/Pocket-x37KplGU.js +2 -0
- package/dist/assets/{Rainbow-DIpZi5-z.js → Rainbow-Bbqcvhxa.js} +1 -1
- package/dist/assets/{Roof-Cd9I0jtG.js → Roof-DP8gTSp6.js} +1 -1
- package/dist/assets/{Shell-DCqHgrm_.js → Shell-BzhH2Tnv.js} +2 -2
- package/dist/assets/{Skywriting-BH6FCdEl.js → Skywriting-CDweiNEJ.js} +1 -1
- package/dist/assets/TerminalView-CZkLeOi6.js +17 -0
- package/dist/assets/{ToyWorld--k4uqi9k.js → ToyWorld-ZLc2l8lQ.js} +1 -1
- package/dist/assets/{Ufo-C5cYunS9.js → Ufo-CQvPbWUN.js} +1 -1
- package/dist/assets/{Whale-BAXeezd8.js → Whale-Mz6Mfxvb.js} +1 -1
- package/dist/assets/all-AJNOOWx8.js +11 -0
- package/dist/assets/{bloomMarks-JYeAmd4d.js → bloomMarks-CWsszTY1.js} +1 -1
- package/dist/assets/{cheerRules-DvM2z9Qg.js → cheerRules-Bs7u6fhI.js} +1 -1
- package/dist/assets/{cityLayout-VU-ug-r6.js → cityLayout-1I0cF38a.js} +1 -1
- package/dist/assets/{dogState-Bm3YZHwy.js → dogState-DSYyIK7C.js} +1 -1
- package/dist/assets/{doors-D7Z3s-7W.js → doors-BUM4Izj_.js} +1 -1
- package/dist/assets/{gallery-CSWmy4Tf.js → gallery-BntMgHVx.js} +1 -1
- package/dist/assets/gate-B4Yyimy5.js +2 -0
- package/dist/assets/{index-COpmc42S.css → index-0ut5ekje.css} +1 -1
- package/dist/assets/index-BoDJkaEF.js +10 -0
- package/dist/assets/{instantReplay-FXf2kJ7B.js → instantReplay-D8hjR3t4.js} +1 -1
- package/dist/assets/{interact-BatJVhca.js → interact-Bj1zja21.js} +1 -1
- package/dist/assets/{jsx-runtime-CXW0f58S.js → jsx-runtime-CZP6s5wa.js} +1 -1
- package/dist/assets/{kit-D3twk12W.js → kit-iArIGJf-.js} +1 -1
- package/dist/assets/mic-B-UxYaQY.js +1 -0
- package/dist/assets/{photoMode-B8pRCF0O.js → photoMode-CRSRNKrX.js} +1 -1
- package/dist/assets/{pipeline-BgOS9JnJ.js → pipeline-DvDJ46O5.js} +1 -1
- package/dist/assets/{rapier-BvQbKz0M.js → rapier-Dtx9m4Xq.js} +1 -1
- package/dist/assets/{rig-BgSxc8mA.js → rig-Bs_tw8rH.js} +1 -1
- package/dist/assets/{speechLanguage-Cak8tdL0.js → speechLanguage-CSuv5EYa.js} +1 -1
- package/dist/assets/store-D1ymxjG0.js +5 -0
- package/dist/assets/useDayTime-Cn8OOG-d.js +1 -0
- package/dist/assets/useGraphics-CnMUzm0p.js +1 -0
- package/dist/assets/voiceMessages-CvKdLaYv.js +1 -0
- package/dist/assets/{weatherState-BQ3UU4vU.js → weatherState-BGsd5Mzz.js} +1 -1
- package/dist/index.html +4 -4
- package/dist-server/index.js +1668 -730
- package/dist-server/index.js.map +4 -4
- package/dist-server/ptyHost.js +6 -2
- package/dist-server/ptyHost.js.map +2 -2
- package/dist-server/skills/ceo-app-starter.md +53 -0
- package/docs/app-starter-provenance.md +25 -0
- package/docs/app-starter.md +107 -0
- package/package.json +5 -3
- package/dist/assets/AccessibilitySettings-6ZCswq5I.js +0 -30
- package/dist/assets/Pocket-CjK6fv97.js +0 -2
- package/dist/assets/TerminalView-CoH1yh6r.js +0 -17
- package/dist/assets/all-BsJ98bWd.js +0 -11
- package/dist/assets/gate-DwsbbSNS.js +0 -2
- package/dist/assets/index-D_Et7Vx8.js +0 -10
- package/dist/assets/mic-BJ0eYLIj.js +0 -1
- package/dist/assets/store-Buxt6UcJ.js +0 -5
- package/dist/assets/useDayTime-0ms3va3h.js +0 -1
- package/dist/assets/useGraphics-p7LAuvYj.js +0 -1
- package/dist/assets/voiceMessages-hO1SDnOS.js +0 -1
package/README.it.md
CHANGED
|
@@ -12,7 +12,9 @@ Uno spazio visuale per lo sviluppo software assistito dall'AI: collega i tuoi re
|
|
|
12
12
|
|
|
13
13
|
[Sito](https://droidsembly.com) · [npm](https://www.npmjs.com/package/droidsembly) · [Release](https://github.com/rosariomoscato/droidsembly/releases) · [Segnala un problema](https://github.com/rosariomoscato/droidsembly/issues) · [Contribuire](CONTRIBUTING.it.md) · [Documentazione](#documentazione) · [Sostieni il progetto](#sostieni-il-progetto)
|
|
14
14
|
|
|
15
|
-
**Beta
|
|
15
|
+
**Beta pubblicata:** [0.4.0-beta.5](https://github.com/rosariomoscato/droidsembly/releases/tag/droidsembly-v0.4.0-beta.5), disponibile su npm `next`; `latest` resta beta.1. Vedi [storico delle verifiche e limiti accettati](https://github.com/rosariomoscato/droidsembly/blob/dev/docs/RELEASE_NOTES_0.4.0-beta.5.md). Visita [droidsembly.com](https://droidsembly.com) per la presentazione e le istruzioni demo; questo repository contiene i sorgenti e la documentazione tecnica.
|
|
16
|
+
|
|
17
|
+
**Candidata sorgente, non pubblicata:** questo branch prepara `0.4.0-beta.6` per `next`, con ripresa delle issue interrotte e correzione degli exit status Box. [Note della candidata e limiti di validazione](https://github.com/rosariomoscato/droidsembly/blob/release/beta6-candidate-20261117/docs/RELEASE_NOTES_0.4.0-beta.6.md). Compilare questi sorgenti non installa i byte pubblici della beta.5 né aggiorna un ufficio esistente.
|
|
16
18
|
|
|
17
19
|
**Gratuito e open source, con licenza MIT.** Nessuna attivazione a pagamento o sblocco commerciale degli agenti. Il sostegno volontario aiuta lo sviluppo; abbonamenti AI, consumi API e servizi cloud opzionali hanno costi e limiti propri.
|
|
18
20
|
|
|
@@ -41,7 +43,14 @@ Il piano di progetto e il Kanban sono catture reali della beta 0.4.0-beta.1 in u
|
|
|
41
43
|
|
|
42
44
|
## Cosa puoi fare
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
**Nuove app (sorgenti dev, non beta.5 pubblicata):** “Qualcosa di nuovo” con CEO
|
|
47
|
+
avvia intervista per progetto → piano completo revisionabile → **Approva piano e
|
|
48
|
+
crea issue** → workflow standard. Nessuna issue del piano o preparazione worker/Box
|
|
49
|
+
prima dell’approvazione e della pubblicazione confermata. Stack e database sono
|
|
50
|
+
scelte motivate, non obblighi; SQLite/Docker non implicano worker locali.
|
|
51
|
+
Vedi [guida A5, dati/ambienti e ripresa](docs/app-starter.md).
|
|
52
|
+
|
|
53
|
+
- **Coordinare agenti di coding:** Claude Code, Codex e OpenCode V2, con selezione dei modelli e delle varianti di ragionamento supportate. La disponibilità dipende dal runtime: Agent SDK resta esclusivamente Claude. OpenCode supporta terminali locali e worker su Upstash Box; ufficio e CEO restano locali. Vedi [limiti della validazione Box](https://github.com/rosariomoscato/droidsembly/blob/dev/docs/OPENCODE_BOX_VALIDATION.md).
|
|
45
54
|
- **Seguire il workflow completo:** issue → sviluppo e controlli iniziali → pull request → sessione QA separata → correzioni → merge quando le condizioni configurate sono soddisfatte.
|
|
46
55
|
- **Mantenere il controllo:** assegnazione manuale o automatica, onboarding CEO facoltativo, approvazione dei cambi team e interruttore distinto per il merge automatico.
|
|
47
56
|
- **Osservare il lavoro reale:** terminali live, piani dei progetti, Kanban e console del manager. Clone e worktree locali separano le copie di lavoro degli agenti; non sono sandbox di sicurezza.
|
|
@@ -52,9 +61,9 @@ Il piano di progetto e il Kanban sono catture reali della beta 0.4.0-beta.1 in u
|
|
|
52
61
|
|
|
53
62
|
## Installa questo fork
|
|
54
63
|
|
|
55
|
-
**
|
|
64
|
+
**Pacchetto pubblicato:** [droidsembly@0.4.0-beta.5 su npm](https://www.npmjs.com/package/droidsembly). Avvia con `npx droidsembly@next` (`npx.cmd droidsembly@next` in PowerShell), oppure compila dai sorgenti come indicato sotto. Per scegliere esattamente beta.5 usa `npx droidsembly@0.4.0-beta.5`; compilare un checkout usa la sua versione, non necessariamente i byte pubblicati. Queste sono istruzioni di avvio, non un aggiornamento automatico dell'ufficio esistente: segui prima la [procedura di aggiornamento controllato](https://github.com/rosariomoscato/droidsembly/blob/dev/docs/QUICKSTART_PC.md). Non è ancora disponibile un installer desktop. `npx cubefarm` installa il pacchetto originale, non Droidsembly.
|
|
56
65
|
|
|
57
|
-
**È una beta, non una versione stabile.** Usa il canale esplicito `next`:
|
|
66
|
+
**È una beta, non una versione stabile.** Usa il canale esplicito `next`: `latest` seleziona ancora beta.1, non beta.5. Una futura stabile subentrerà su `latest`; le beta verificano gli aggiornamenti su `next`. Il pacchetto non espone un alias globale `cubefarm`. Il file interno `bin/cubefarm.js` e i launcher dei checkout esistenti restano compatibili. Le home legacy esistenti sono adottate; `DROIDSEMBLY_HOME` prevale su `SWARM_HOME` e una doppia home ambigua richiede scelta esplicita. Per l'uso affiancato scegli una home separata e porte libere come descritto sotto.
|
|
58
67
|
|
|
59
68
|
### Requisiti
|
|
60
69
|
|
|
@@ -63,6 +72,8 @@ Il piano di progetto e il Kanban sono catture reali della beta 0.4.0-beta.1 in u
|
|
|
63
72
|
- Claude Code è incluso tramite Agent SDK. OpenCode **2.x** e Codex si installano separatamente quando selezionati. Le sessioni terminale esclusivamente OpenCode non richiedono un abbonamento Claude.
|
|
64
73
|
- Google Chrome per gli agenti che verificano i progetti nel browser.
|
|
65
74
|
|
|
75
|
+
**Browser consigliato per l'ufficio:** Google Chrome aggiornato è il nostro browser di riferimento per i collaudi desktop isolati. Altri browser moderni potrebbero funzionare, ma non sono stati validati in questo ciclo di test; non è una politica di supporto esclusivo a Chrome. Clic sulle notifiche native e focus delle finestre restano non verificati. Vedi [ambito e limiti del collaudo della candidata](https://github.com/rosariomoscato/droidsembly/blob/dev/docs/RELEASE_NOTES_0.4.0-beta.5.md).
|
|
76
|
+
|
|
66
77
|
Il progetto è destinato a Windows, macOS e Linux. La demo senza AI descritta sotto non richiede credenziali dei provider o login GitHub.
|
|
67
78
|
|
|
68
79
|
### 1. Scarica e compila
|
|
@@ -131,7 +142,7 @@ node dist-server/index.js
|
|
|
131
142
|
SWARM_HOME="$HOME/.droidsembly" SWARM_PORT=4419 SWARM_HOST=127.0.0.1 SWARM_PREVIEW_PORT=9600 SWARM_DEMO=0 node dist-server/index.js
|
|
132
143
|
```
|
|
133
144
|
|
|
134
|
-
Apri **http://127.0.0.1:4419/**. Le cartelle degli esempi sono una scelta esplicita per una nuova installazione, non una migrazione: percorsi dati e launcher esistenti restano validi.
|
|
145
|
+
Apri **http://127.0.0.1:4419/**. Le cartelle degli esempi sono una scelta esplicita per una nuova installazione, non una migrazione: percorsi dati e launcher esistenti restano validi. `DROIDSEMBLY_HOME` è l'alias canonico di `SWARM_HOME`. Senza una scelta esplicita, i dati esistenti in `~/.cubefarm` restano al loro posto; i nuovi uffici usano `~/.droidsembly`. Se entrambe le cartelle predefinite esistono, l'avvio richiede una scelta esplicita, senza unire o spostare dati. Le variabili canoniche `DROIDSEMBLY_*` hanno la precedenza sulle equivalenti legacy. Vedi [compatibilità ambiente/cartella dati e rollback](docs/ENV_HOME_MIGRATION.md).
|
|
135
146
|
|
|
136
147
|
Prima di collegare un progetto, seleziona il coding agent del CEO se non vuoi usare il predefinito Claude Code. Per saltare l'analisi AI iniziale, disattiva l'opzione che permette al CEO di studiare il repository e pianificare dal brief. Assegnazione automatica, merge automatico e revisioni periodiche CEO sono impostazioni distinte. Vedi [Agenti](https://github.com/rosariomoscato/droidsembly/blob/main/docs/agents.md) per configurazione dei provider e limiti dei runtime.
|
|
137
148
|
|
package/README.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Droidsembly
|
|
2
2
|
|
|
3
|
+
**New-app planning (development sources, not published beta.5):** Something new
|
|
4
|
+
with the CEO enabled now follows project interview → complete revisable plan →
|
|
5
|
+
**Approve plan and create issues** → normal workflow. No plan issue or worker/Box
|
|
6
|
+
preparation before approval and confirmed publication. See the
|
|
7
|
+
[A5 guide, environment/data FAQ and recovery limits](docs/app-starter.md).
|
|
8
|
+
|
|
3
9
|
<p align="center">
|
|
4
10
|
<img src="https://raw.githubusercontent.com/rosariomoscato/droidsembly/main/docs/branding/logo-readme.svg" alt="Droidsembly — Software, assembled by agents." width="360">
|
|
5
11
|
</p>
|
|
@@ -12,7 +18,9 @@ A visual workspace for AI-assisted software development: connect your GitHub rep
|
|
|
12
18
|
|
|
13
19
|
[Website](https://droidsembly.com) · [npm](https://www.npmjs.com/package/droidsembly) · [Releases](https://github.com/rosariomoscato/droidsembly/releases) · [Report an issue](https://github.com/rosariomoscato/droidsembly/issues) · [Contributing](CONTRIBUTING.md) · [Documentation](#documentation) · [Support the project](#support-the-project)
|
|
14
20
|
|
|
15
|
-
**
|
|
21
|
+
**Published beta:** [0.4.0-beta.5](https://github.com/rosariomoscato/droidsembly/releases/tag/droidsembly-v0.4.0-beta.5), available on npm `next`; `latest` remains beta.1. See [verification history and accepted limits](https://github.com/rosariomoscato/droidsembly/blob/dev/docs/RELEASE_NOTES_0.4.0-beta.5.md). Visit [droidsembly.com](https://droidsembly.com) for an introduction and demo instructions; this repository contains the source and technical documentation.
|
|
22
|
+
|
|
23
|
+
**Source candidate, not published:** this branch prepares `0.4.0-beta.6` for `next`, adding interrupted-issue recovery and Box exit-status fixes. [Candidate notes and validation limits](https://github.com/rosariomoscato/droidsembly/blob/release/beta6-candidate-20261117/docs/RELEASE_NOTES_0.4.0-beta.6.md). Building these sources does not install the public beta.5 bytes or update an existing office.
|
|
16
24
|
|
|
17
25
|
**Free and open source, under the MIT license.** No paid activation or commercial agent unlocks. Voluntary support helps development; your AI subscriptions, API usage and optional cloud services have their own costs and limits.
|
|
18
26
|
|
|
@@ -41,7 +49,7 @@ The project floor and Kanban are actual captures of beta 0.4.0-beta.1 in an isol
|
|
|
41
49
|
|
|
42
50
|
## What you can do
|
|
43
51
|
|
|
44
|
-
- **Coordinate coding agents:** Claude Code, Codex and OpenCode V2, with model selection and supported reasoning variants. Provider availability depends on the runtime; the Agent SDK runtime is Claude-only
|
|
52
|
+
- **Coordinate coding agents:** Claude Code, Codex and OpenCode V2, with model selection and supported reasoning variants. Provider availability depends on the runtime; the Agent SDK runtime is Claude-only. OpenCode supports local terminals and Upstash Box workers; the office and CEO remain local. See [Box validation limits](https://github.com/rosariomoscato/droidsembly/blob/dev/docs/OPENCODE_BOX_VALIDATION.md).
|
|
45
53
|
- **Follow the full workflow:** issue → development and initial checks → pull request → separate QA session → corrections → merge when the configured conditions pass.
|
|
46
54
|
- **Keep control:** manual or automatic assignment, optional CEO onboarding, team-change approvals and a separate auto-merge switch.
|
|
47
55
|
- **Watch real work:** live terminals, project floors, a Kanban board and the manager console. Local clones and worktrees separate agents' working copies; they are not security sandboxes.
|
|
@@ -52,9 +60,9 @@ The project floor and Kanban are actual captures of beta 0.4.0-beta.1 in an isol
|
|
|
52
60
|
|
|
53
61
|
## Install this fork
|
|
54
62
|
|
|
55
|
-
**
|
|
63
|
+
**Published package:** [droidsembly@0.4.0-beta.5 on npm](https://www.npmjs.com/package/droidsembly). Run `npx droidsembly@next` (`npx.cmd droidsembly@next` in PowerShell), or build from source below. To select beta.5 exactly, use `npx droidsembly@0.4.0-beta.5`; building a checkout uses that checkout's version, not necessarily the published bytes. These are launch instructions, not an automatic update of an existing office: first follow the [controlled update guidance](https://github.com/rosariomoscato/droidsembly/blob/dev/docs/QUICKSTART_PC.md). There is no desktop installer yet. `npx cubefarm` installs the original package, not Droidsembly.
|
|
56
64
|
|
|
57
|
-
**This is a beta, not a stable release.** Use the explicit `next` channel:
|
|
65
|
+
**This is a beta, not a stable release.** Use the explicit `next` channel: `latest` still selects beta.1, not beta.5. A future stable release will take over `latest`; beta versions check `next` for updates. The package exposes no global `cubefarm` alias. The internal entry file `bin/cubefarm.js` and existing checkout launchers remain compatible. Existing legacy homes are adopted; `DROIDSEMBLY_HOME` takes precedence over `SWARM_HOME`, and ambiguous dual homes require an explicit choice. For side-by-side use, select a separate home and free ports as described below.
|
|
58
66
|
|
|
59
67
|
### Requirements
|
|
60
68
|
|
|
@@ -63,6 +71,8 @@ The project floor and Kanban are actual captures of beta 0.4.0-beta.1 in an isol
|
|
|
63
71
|
- Claude Code is bundled through the Agent SDK. OpenCode **2.x** and Codex are installed separately when selected. OpenCode-only terminal sessions do not require a Claude subscription.
|
|
64
72
|
- Google Chrome for agents that test projects in a browser.
|
|
65
73
|
|
|
74
|
+
**Recommended office browser:** up-to-date Google Chrome is our reference browser for the isolated desktop checks. Other modern browsers may work, but were not validated in this test cycle; this is not a Chrome-only support policy. Native notification clicks and window focus remain unverified. See [candidate validation scope and limits](https://github.com/rosariomoscato/droidsembly/blob/dev/docs/RELEASE_NOTES_0.4.0-beta.5.md).
|
|
75
|
+
|
|
66
76
|
The project targets Windows, macOS and Linux. The no-AI demo below does not require provider credentials or a GitHub login.
|
|
67
77
|
|
|
68
78
|
### 1. Download and build
|
|
@@ -131,7 +141,7 @@ node dist-server/index.js
|
|
|
131
141
|
SWARM_HOME="$HOME/.droidsembly" SWARM_PORT=4419 SWARM_HOST=127.0.0.1 SWARM_PREVIEW_PORT=9600 SWARM_DEMO=0 node dist-server/index.js
|
|
132
142
|
```
|
|
133
143
|
|
|
134
|
-
Open **http://127.0.0.1:4419/**. These example folders are an explicit choice for a new installation, not a migration: existing data paths and launchers remain valid.
|
|
144
|
+
Open **http://127.0.0.1:4419/**. These example folders are an explicit choice for a new installation, not a migration: existing data paths and launchers remain valid. `DROIDSEMBLY_HOME` is the canonical alias for `SWARM_HOME`. With neither set, existing `~/.cubefarm` data stays in place; new offices use `~/.droidsembly`. If both default folders exist, startup requires an explicit choice, without merging/moving data. Canonical `DROIDSEMBLY_*` settings take precedence over the legacy equivalents. See [environment/home compatibility and rollback](docs/ENV_HOME_MIGRATION.md).
|
|
135
145
|
|
|
136
146
|
Before connecting a project, select the CEO's coding agent if you do not want the default Claude Code. To skip the initial AI analysis, turn off **Let the CEO study this repository and plan from the brief**. Auto-assignment, auto-merge and periodic CEO reviews are separate settings. See [Agents](https://github.com/rosariomoscato/droidsembly/blob/main/docs/agents.md) for provider setup and runtime limitations.
|
|
137
147
|
|
package/bin/cubefarm.js
CHANGED
|
@@ -1,297 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
//
|
|
3
|
-
import
|
|
4
|
-
import fs from 'node:fs';
|
|
5
|
-
import { createRequire } from 'node:module';
|
|
6
|
-
import net from 'node:net';
|
|
7
|
-
import os from 'node:os';
|
|
8
|
-
import path from 'node:path';
|
|
9
|
-
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
10
|
-
import { parseArgs } from 'node:util';
|
|
11
|
-
import { isNewer, updateInfo } from './distribution.js';
|
|
12
|
-
|
|
13
|
-
const MIN_NODE = 22;
|
|
14
|
-
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
15
|
-
const pkg = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8'));
|
|
16
|
-
const update = updateInfo(pkg.name, pkg.version);
|
|
17
|
-
|
|
18
|
-
const HELP = `
|
|
19
|
-
Droidsembly ${pkg.version}: a cartoon 3D office where a team of AI coding agents works through your GitHub issues.
|
|
20
|
-
|
|
21
|
-
Usage
|
|
22
|
-
${update.command} start the office and open it in your browser
|
|
23
|
-
${update.command} login sign in to Claude Code, the built-in coding agent
|
|
24
|
-
${update.command} doctor check that this machine is ready
|
|
25
|
-
|
|
26
|
-
Options
|
|
27
|
-
--port <n> port for the office (default 4317)
|
|
28
|
-
--host <address>
|
|
29
|
-
address to listen on (default 127.0.0.1, this machine only). 0.0.0.0 opens the office to your
|
|
30
|
-
network with no sign-in: anyone who reaches it can run your agents. Only on a network you trust
|
|
31
|
-
--demo fake GitHub and fake agents: look around without spending any usage
|
|
32
|
-
--floors <n> --agents <n>
|
|
33
|
-
with --demo: a bigger company, n floors with n people each (up to 20 and 15)
|
|
34
|
-
--no-open don't open the browser
|
|
35
|
-
-v, --version
|
|
36
|
-
-h, --help
|
|
37
|
-
|
|
38
|
-
The office keeps its state and workspaces in ~/.cubefarm (set SWARM_HOME to use another folder).
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
const color = process.stdout.isTTY && !process.env.NO_COLOR;
|
|
42
|
-
const paint = (open, close) => (s) => (color ? `\x1b[${open}m${s}\x1b[${close}m` : s);
|
|
43
|
-
const green = paint(32, 39);
|
|
44
|
-
const red = paint(31, 39);
|
|
45
|
-
const dim = paint(2, 22);
|
|
46
|
-
const fail = (msg) => {
|
|
47
|
-
console.error(`\n ${red('✗')} ${msg}\n`);
|
|
48
|
-
process.exit(1);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
if (Number(process.versions.node.split('.')[0]) < MIN_NODE) fail(`Droidsembly needs Node.js ${MIN_NODE} or newer (this is ${process.version}). Get it from https://nodejs.org`);
|
|
52
|
-
|
|
53
|
-
let args;
|
|
54
|
-
try {
|
|
55
|
-
args = parseArgs({
|
|
56
|
-
allowPositionals: true,
|
|
57
|
-
options: {
|
|
58
|
-
port: { type: 'string', short: 'p' },
|
|
59
|
-
host: { type: 'string' },
|
|
60
|
-
bind: { type: 'string' },
|
|
61
|
-
demo: { type: 'boolean' },
|
|
62
|
-
floors: { type: 'string' },
|
|
63
|
-
agents: { type: 'string' },
|
|
64
|
-
'no-open': { type: 'boolean' },
|
|
65
|
-
version: { type: 'boolean', short: 'v' },
|
|
66
|
-
help: { type: 'boolean', short: 'h' },
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
} catch (err) {
|
|
70
|
-
fail(`${err.message}\n Run ${update.command} --help for the options.`);
|
|
71
|
-
}
|
|
72
|
-
const { values, positionals } = args;
|
|
73
|
-
const command = positionals[0] ?? 'start';
|
|
74
|
-
|
|
75
|
-
if (values.help) {
|
|
76
|
-
console.log(HELP);
|
|
77
|
-
process.exit(0);
|
|
78
|
-
}
|
|
79
|
-
if (values.version) {
|
|
80
|
-
console.log(pkg.version);
|
|
81
|
-
process.exit(0);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// ---------- Claude Code ----------
|
|
85
|
-
|
|
86
|
-
// The Agent SDK ships Claude Code as a per-platform package. The office runs its agents on it, so logging in with it
|
|
87
|
-
// is logging the agents in. Same lookup as the SDK's own.
|
|
88
|
-
function claudeBinary() {
|
|
89
|
-
let sdk;
|
|
90
|
-
try {
|
|
91
|
-
sdk = createRequire(import.meta.url).resolve('@anthropic-ai/claude-agent-sdk');
|
|
92
|
-
} catch {
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
const { platform, arch } = process;
|
|
96
|
-
const musl = platform === 'linux' && !process.report?.getReport?.()?.header?.glibcVersionRuntime;
|
|
97
|
-
const targets = platform === 'linux' ? (musl ? [`linux-${arch}-musl`, `linux-${arch}`] : [`linux-${arch}`, `linux-${arch}-musl`]) : [`${platform}-${arch}`];
|
|
98
|
-
const fromSdk = createRequire(sdk);
|
|
99
|
-
for (const target of targets) {
|
|
100
|
-
try {
|
|
101
|
-
return fromSdk.resolve(`@anthropic-ai/claude-agent-sdk-${target}/claude${platform === 'win32' ? '.exe' : ''}`);
|
|
102
|
-
} catch {
|
|
103
|
-
// not installed for this target
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return null;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Like the agents: no API keys or settings inherited from a Claude Code session this was started from.
|
|
110
|
-
function claudeEnv() {
|
|
111
|
-
const env = {};
|
|
112
|
-
for (const [k, v] of Object.entries(process.env)) if (!/^(ANTHROPIC_|CLAUDE)/i.test(k) || k === 'CLAUDE_CONFIG_DIR') env[k] = v;
|
|
113
|
-
return env;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// ---------- checks ----------
|
|
117
|
-
|
|
118
|
-
const sh = (cmd, cmdArgs, env) => spawnSync(cmd, cmdArgs, { encoding: 'utf8', windowsHide: true, timeout: 30_000, env });
|
|
119
|
-
|
|
120
|
-
/** What the office needs: { name, ok, detail, fix, required }. */
|
|
121
|
-
function checks() {
|
|
122
|
-
const out = [{ name: 'Node.js', ok: true, detail: process.version }];
|
|
123
|
-
|
|
124
|
-
const git = sh('git', ['--version']);
|
|
125
|
-
out.push({ name: 'git', ok: git.status === 0, detail: git.stdout?.trim().replace(/^git version /, ''), fix: 'install git: https://git-scm.com/downloads', required: true });
|
|
126
|
-
|
|
127
|
-
if (sh('gh', ['--version']).status !== 0) {
|
|
128
|
-
out.push({ name: 'GitHub CLI', ok: false, fix: 'install it from https://cli.github.com, then run: gh auth login' });
|
|
129
|
-
} else {
|
|
130
|
-
const ok = sh('gh', ['auth', 'status']).status === 0;
|
|
131
|
-
out.push({ name: 'GitHub CLI', ok, detail: ok ? 'signed in' : 'not signed in', fix: 'run: gh auth login' });
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const claude = claudeBinary();
|
|
135
|
-
if (!claude) {
|
|
136
|
-
out.push({ name: 'Claude Code', ok: false, fix: `if using Claude, reinstall ${pkg.name}: Claude Code for ${process.platform}-${process.arch} is missing` });
|
|
137
|
-
} else {
|
|
138
|
-
let status = null;
|
|
139
|
-
try {
|
|
140
|
-
status = JSON.parse(sh(claude, ['auth', 'status', '--json'], claudeEnv()).stdout);
|
|
141
|
-
} catch {
|
|
142
|
-
// unreadable: treated as signed out
|
|
143
|
-
}
|
|
144
|
-
const ok = status?.loggedIn === true;
|
|
145
|
-
out.push({ name: 'Claude', ok, detail: ok ? `signed in${status.subscriptionType ? ` (${status.subscriptionType})` : ''}` : 'not signed in (only needed for Claude sessions)', fix: `if using Claude, run: ${update.command} login` });
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// Agents test in a browser through Playwright, which drives Google Chrome by default.
|
|
149
|
-
const chrome = chromePaths().some((p) => fs.existsSync(p));
|
|
150
|
-
out.push({ name: 'Chrome', ok: chrome, detail: chrome ? 'for browser testing' : 'Google Chrome not found', fix: 'install Google Chrome so agents can test in a browser' });
|
|
151
|
-
// The pinned Playwright MCP server the agents' browser runs on (server/browser.ts), installed with cubefarm.
|
|
152
|
-
let mcp = null;
|
|
153
|
-
try {
|
|
154
|
-
mcp = JSON.parse(fs.readFileSync(createRequire(import.meta.url).resolve('@playwright/mcp/package.json'), 'utf8')).version;
|
|
155
|
-
} catch {
|
|
156
|
-
// not installed
|
|
157
|
-
}
|
|
158
|
-
out.push({ name: 'Browser tool', ok: !!mcp, detail: mcp ? `@playwright/mcp ${mcp}` : 'not installed', fix: `reinstall ${pkg.name}: ${update.command}` });
|
|
159
|
-
return out;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function chromePaths() {
|
|
163
|
-
const env = process.env;
|
|
164
|
-
if (process.platform === 'win32') {
|
|
165
|
-
return [env.PROGRAMFILES, env['PROGRAMFILES(X86)'], env.LOCALAPPDATA].filter(Boolean).map((d) => path.join(d, 'Google', 'Chrome', 'Application', 'chrome.exe'));
|
|
166
|
-
}
|
|
167
|
-
if (process.platform === 'darwin') return ['/Applications/Google Chrome.app', path.join(os.homedir(), 'Applications', 'Google Chrome.app')];
|
|
168
|
-
return ['/opt/google/chrome/chrome', '/usr/bin/google-chrome', '/usr/bin/google-chrome-stable'];
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
const printCheck = (c) => console.log(` ${c.ok ? green('✓') : red('✗')} ${c.name.padEnd(12)} ${c.detail ? dim(c.detail) : ''}${c.ok ? '' : ` → ${c.fix}`}`);
|
|
172
|
-
|
|
173
|
-
// ---------- helpers ----------
|
|
174
|
-
|
|
175
|
-
// Where this machine reaches an office listening on `host`: loopback for the any-address, else that address (as
|
|
176
|
-
// server/config.ts's localAddress, which also brackets IPv6 for URLs).
|
|
177
|
-
const localHost = (host) => (['0.0.0.0', '::', ''].includes(host) ? '127.0.0.1' : host);
|
|
178
|
-
|
|
179
|
-
function portOpen(port, host) {
|
|
180
|
-
return new Promise((resolve) => {
|
|
181
|
-
const socket = net.connect({ port, host });
|
|
182
|
-
const done = (open) => {
|
|
183
|
-
socket.destroy();
|
|
184
|
-
resolve(open);
|
|
185
|
-
};
|
|
186
|
-
socket.once('connect', () => done(true));
|
|
187
|
-
socket.once('error', () => done(false));
|
|
188
|
-
socket.setTimeout(1000, () => done(false));
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
async function isOffice(url) {
|
|
193
|
-
try {
|
|
194
|
-
const res = await fetch(`${url}/api/state`, { signal: AbortSignal.timeout(3000) });
|
|
195
|
-
const data = await res.json();
|
|
196
|
-
return Array.isArray(data?.repos) && Array.isArray(data?.agents);
|
|
197
|
-
} catch {
|
|
198
|
-
return false;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
function openBrowser(url) {
|
|
203
|
-
const [cmd, cmdArgs, opts] =
|
|
204
|
-
process.platform === 'win32'
|
|
205
|
-
? ['cmd.exe', ['/d', '/s', '/c', `"start "" "${url}""`], { windowsVerbatimArguments: true }]
|
|
206
|
-
: process.platform === 'darwin'
|
|
207
|
-
? ['open', [url], {}]
|
|
208
|
-
: ['xdg-open', [url], {}];
|
|
209
|
-
try {
|
|
210
|
-
spawn(cmd, cmdArgs, { ...opts, stdio: 'ignore', detached: true, windowsHide: true })
|
|
211
|
-
.on('error', () => undefined)
|
|
212
|
-
.unref();
|
|
213
|
-
} catch {
|
|
214
|
-
// no browser to open: the URL is printed anyway
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
async function checkForUpdate() {
|
|
219
|
-
// A checkout's `npm start` runs this under scripts/office.mjs, which updates the office from its origin instead.
|
|
220
|
-
if (process.env.CI || process.env.SWARM_LAUNCHER === '1') return;
|
|
221
|
-
try {
|
|
222
|
-
const res = await fetch(update.url, { signal: AbortSignal.timeout(4000) });
|
|
223
|
-
if (!res.ok) return;
|
|
224
|
-
const { version } = await res.json();
|
|
225
|
-
if (typeof version === 'string' && isNewer(version, pkg.version)) {
|
|
226
|
-
console.log(`\n Droidsembly ${version} is out (this is ${pkg.version}). Start it with ${green(update.command)} to update.\n`);
|
|
227
|
-
}
|
|
228
|
-
} catch {
|
|
229
|
-
// offline, or the registry is slow: try again next time
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// ---------- commands ----------
|
|
234
|
-
|
|
235
|
-
if (command === 'doctor') {
|
|
236
|
-
console.log(`\n Droidsembly ${pkg.version}\n`);
|
|
237
|
-
const results = checks();
|
|
238
|
-
results.forEach(printCheck);
|
|
239
|
-
const ok = results.every((c) => c.ok);
|
|
240
|
-
console.log(ok ? `\n All set. Start the office with: ${update.command}\n` : '\n Claude checks apply only to Claude sessions; OpenCode and Codex use their own setup.\n');
|
|
241
|
-
process.exit(ok ? 0 : 1);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
if (command === 'login') {
|
|
245
|
-
const claude = claudeBinary();
|
|
246
|
-
if (!claude) fail(`Claude Code for ${process.platform}-${process.arch} is missing. Reinstall ${pkg.name}.`);
|
|
247
|
-
console.log('\n Signing in to Claude. Your agents use this login and your subscription.\n');
|
|
248
|
-
const res = spawnSync(claude, ['auth', 'login'], { stdio: 'inherit', env: claudeEnv() });
|
|
249
|
-
process.exit(res.status ?? 1);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
if (command !== 'start') fail(`Unknown command "${command}". Run ${update.command} --help for the options.`);
|
|
253
|
-
|
|
254
|
-
const port = Number(values.port ?? process.env.SWARM_PORT ?? 4317);
|
|
255
|
-
if (!Number.isInteger(port) || port < 0 || port > 65535) fail(`"${values.port ?? process.env.SWARM_PORT}" isn't a port number.`);
|
|
256
|
-
const host = (values.host ?? values.bind ?? process.env.SWARM_HOST ?? '').trim().replace(/^\[|\]$/g, '') || '127.0.0.1';
|
|
257
|
-
if (/[\s/]/.test(host)) fail(`"${host}" isn't an address to listen on. Try 0.0.0.0 (every network) or one of this machine's IPs.`);
|
|
258
|
-
const local = localHost(host);
|
|
259
|
-
const hostUrl = local.includes(':') ? `[${local}]` : local;
|
|
260
|
-
const url = `http://${local === '127.0.0.1' ? 'localhost' : hostUrl}:${port}`;
|
|
261
|
-
const demo = values.demo || process.env.SWARM_DEMO === '1' || process.env.SWARM_DEMO === 'true';
|
|
262
|
-
|
|
263
|
-
// A second office on the same state would resume every agent's session a second time.
|
|
264
|
-
if (port !== 0 && (await portOpen(port, local))) {
|
|
265
|
-
if (!(await isOffice(`http://${hostUrl}:${port}`))) fail(`Something else is using port ${port}. Start Droidsembly on another one: ${update.command} --port 4400`);
|
|
266
|
-
console.log(`\n Droidsembly is already running: ${url}\n`);
|
|
267
|
-
if (!values['no-open']) openBrowser(url);
|
|
268
|
-
process.exit(0);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
if (!demo) {
|
|
272
|
-
const problems = checks().filter((c) => !c.ok);
|
|
273
|
-
if (problems.length) {
|
|
274
|
-
console.log('');
|
|
275
|
-
problems.forEach(printCheck);
|
|
276
|
-
if (problems.some((c) => c.required)) fail('Droidsembly can’t run without these.');
|
|
277
|
-
console.log(dim(`\n Starting anyway. Check your selected provider setup, then run: ${update.command} doctor`));
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
const entry = path.join(root, 'dist-server', 'index.js');
|
|
282
|
-
if (!fs.existsSync(entry)) fail(`${path.relative(process.cwd(), entry) || entry} is missing. In a checkout of the repo, run npm run build first.`);
|
|
283
|
-
|
|
284
|
-
process.env.SWARM_PORT = String(port);
|
|
285
|
-
process.env.SWARM_HOST = host;
|
|
286
|
-
if (demo) process.env.SWARM_DEMO = '1';
|
|
287
|
-
if (values.floors) process.env.SWARM_DEMO_FLOORS = values.floors;
|
|
288
|
-
if (values.agents) process.env.SWARM_DEMO_AGENTS = values.agents;
|
|
289
|
-
process.setSourceMapsEnabled(true);
|
|
290
|
-
// The server loads its state, then listens.
|
|
291
|
-
await import(pathToFileURL(entry).href);
|
|
292
|
-
|
|
293
|
-
if (!values['no-open'] && port !== 0) {
|
|
294
|
-
for (let i = 0; i < 100 && !(await portOpen(port, local)); i++) await new Promise((r) => setTimeout(r, 200));
|
|
295
|
-
openBrowser(url);
|
|
296
|
-
}
|
|
297
|
-
void checkForUpdate();
|
|
2
|
+
// Compatibility for existing checkout launchers; keep arguments and exit status unchanged.
|
|
3
|
+
import './droidsembly.js';
|