Files
spacesopsandCursor 073344d4d1
Build Service / BuildPackage (push) Canceled after 0s
0.3.0:1
Group Actions and Config by category (Space-CLI, Bitcoin, Spaced,
Subspaces, Certrelay, Nacho) and build x86 + arm only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 03:34:34 -04:00

39 lines
1.3 KiB
TypeScript

import { storeJson } from '../fileModels/storeJson'
import { actionGroups } from '../actionGroups'
import { i18n } from '../i18n'
import { sdk } from '../sdk'
export const enableSubspaces = sdk.Action.withoutInput(
// id
'enable-subspaces',
// metadata
async ({ effects }) => {
const current = await storeJson.read((s) => s.enableSubspaces).once()
return {
name: i18n('Enable Subspaces'),
description: i18n(
'Turn on the embedded Subspaces service (off-chain Bitcoin handles). Starts three prebuilt daemons — subs (Web UI), subs-prover, and registry-server — each on its own interface. Service restarts automatically. subs loads the existing `default` spaces wallet; create it first via the Space-CLI Web UI (`spaces createwallet`) if you have not already.',
),
warning: null,
allowedStatuses: 'any',
group: actionGroups.subspaces,
visibility: current === true ? 'hidden' : 'enabled',
}
},
// run
async ({ effects }) => {
await storeJson.merge(effects, { enableSubspaces: true })
return {
version: '1',
title: i18n('Success'),
message: i18n(
'Subspaces enabled. The service is restarting; the Subspaces Web UI (7777), Prover (8888), and Registry (8081) interfaces come up once their daemons are healthy.',
),
result: null,
}
},
)