Implementation:3641397194 wq Gpt6 Astra beginner install
| Knowledge Sources | |
|---|---|
| Domains | Desktop_App, Configuration_Management, Orchestration |
| Last Updated | 2026-10-26 12:00 GMT |
Overview
Concrete tool for orchestrating one-click install, verify, uninstall, and REA preparation across all AI model seats, provided by the ColdBrew Zero desktop library.
Description
The beginner-install module is the orchestrator for the beginner one-click flow. It ties together seat detection, pack rendering, transaction lifecycle, IDA MCP connection, upstream REA runtime, and concurrency locking into a small set of high-level functions:
- scanAll: detect config directories for all 11 seats.
- selectOne: create a SeatTransactions instance for a single seat, with IDA MCP writes merged into the plan.
- statusOne: verify installation state and merge upstream REA status.
- installOne: preview → deploy → verify in sequence.
- uninstallOne: iterate up to 20 rounds of history-based restore.
- prepareOne: gate on install verification, acquire concurrency lock, call `prepareRea`, re-verify.
The module-level `activePreparations` Set (a `Set<string>`) prevents install/uninstall during REA preparation — one preparation per normalized root path at a time.
Usage
- One-click install: `installOne(seat, {confirm: true})` — called when user clicks "一键破甲".
- One-click uninstall: `uninstallOne(seat, {confirm: true})` — called when user clicks "一键卸载".
- Status check: `statusOne(seat)` — called to populate the install/verify status UI.
- REA prepare: `prepareOne(seat, {confirm: true})` — called when user clicks "准备 REA 依赖".
- Scan: `scanAll()` — called on page load to populate the seat list.
Code Reference
Source Location
- Repository: ColdBrew Zero
- File: desktop/src/lib/beginner-install.js
Signature
function scanAll({ detect = detectDirectory, seats = PACK_IDS } = {}) -> Array<{
ok: boolean, seat: string, name: string, line: string,
root?: string, exists?: boolean, source?: string, layout?: string,
error?: string
}>
function selectOne(seat, { detect = detectDirectory, createTx, plan = runtime.plan } = {}) ->
{ found, tx: SeatTransactions, toolbox }
function statusOne(seat, options = {}) -> {
ok: boolean, seat, root, layout, verified: boolean, files: number,
upstream: { verified, skillCount, fileCount, mcp: {configured, message}, runtime }
}
async function prepareOne(seat, { confirm, prepare = prepareRea, runtimeOptions, ...options }) ->
{ ok, seat, root, layout, upstream: { runtime: { preparation, ... } }, code?, message? }
function installOne(seat, { confirm, ...options }) -> {
ok, seat, root, existed, changed, verified, files, toolbox, toolboxFile,
upstream, message
}
function uninstallOne(seat, { confirm, ...options }) -> {
ok, seat, root, restored, files, stillThere, toolbox, toolboxFile, message
}
Import
const { scanAll, selectOne, statusOne, prepareOne, installOne, uninstallOne } = require('./beginner-install');
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| seat | string | Yes | One of PACK_IDS (11 seat IDs) |
| confirm | boolean | Yes | Must be `true` for install/uninstall/prepare (UI confirmation gate) |
| options.detect | function | No | Injectable detectDirectory override |
| options.createTx | function | No | Injectable SeatTransactions factory |
| options.prepare | function | No | Injectable prepareRea override |
| options.readRuntime | function | No | Injectable statusRea override |
Outputs
| Name | Type | Description |
|---|---|---|
| scanAll() returns | Array | Per-seat detection result with ok/root/exists/error |
| statusOne() returns | object | Install verification + upstream REA runtime status |
| installOne() returns | object | Deploy result with changed count, verified flag, toolbox code |
| uninstallOne() returns | object | Restore result with restored count, stillThere flag |
| prepareOne() returns | object | REA prepare result with code and upstream.runtime.preparation |
Usage Examples
Scan All Seats
const { scanAll } = require('./beginner-install');
const results = scanAll();
for (const result of results) {
if (result.ok) {
console.log(`${result.name}: ${result.root} (exists: ${result.exists})`);
} else {
console.log(`${result.name}: ${result.error}`);
}
}
Install One Seat
const { installOne } = require('./beginner-install');
const result = installOne('claude', { confirm: true });
if (result.ok) {
console.log(`Installed ${result.seat}: ${result.changed} files changed, verified: ${result.verified}`);
console.log(`Toolbox: ${result.toolbox}, upstream: ${result.upstream.verified}`);
} else {
console.log(`Install failed: ${result.message}`);
}
Uninstall with REA Lock Check
const { uninstallOne } = require('./beginner-install');
// Throws if REA preparation is in progress for this root
const result = uninstallOne('codex', { confirm: true });
console.log(`Restored ${result.restored} files, still there: ${result.stillThere}`);
Prepare REA Dependencies
const { prepareOne } = require('./beginner-install');
// Requires confirm; gates on statusOne().upstream.verified
const result = await prepareOne('codex', { confirm: true });
if (!result.ok) {
console.log(`Prepare failed: ${result.code} - ${result.message}`);
// Common codes: REA_INSTALL_UNVERIFIED, REA_NOT_READY, REA_PREPARE_FAILED
}
Related Pages
Implements Principle
- Principle:3641397194_wq_Gpt6_Astra_Seat_Detection
- Principle:3641397194_wq_Gpt6_Astra_Atomic_File_Transaction
- Principle:3641397194_wq_Gpt6_Astra_Supply_Chain_Isolation