windows-development-sandbox 1.17.0 → 1.18.0
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.md +92 -92
- package/config.example.json +97 -4
- package/dist/app/features/accounts/accounts.def.d.ts +116 -2
- package/dist/app/features/accounts/accounts.def.js +80 -12
- package/dist/app/features/accounts/accounts.run.d.ts +29 -0
- package/dist/app/features/accounts/accounts.run.js +36 -6
- package/dist/app/features/accounts/index.d.ts +2 -0
- package/dist/app/features/accounts/index.js +4 -1
- package/dist/app/features/accounts/services.def.d.ts +111 -0
- package/dist/app/features/accounts/services.def.js +187 -0
- package/dist/app/features/accounts/services.run.d.ts +65 -0
- package/dist/app/features/accounts/services.run.js +212 -0
- package/dist/app/features/defs.d.ts +112 -1
- package/dist/app/features/defs.js +5 -0
- package/dist/app/features/settings/categories.def.js +21 -4
- package/dist/app/registry.js +5 -1
- package/dist/bin/agent-sandbox.js +2 -2
- package/dist/bin/{chunk-QLGGAG3D.js → chunk-BKF43GJ3.js} +51 -16
- package/dist/bin/{chunk-REE3EMHD.js → chunk-YD3A67RS.js} +3812 -1702
- package/dist/bin/{chunk-XYUVIVJT.js → chunk-Z5D32FN3.js} +1 -1
- package/dist/bin/claude-host.js +2 -2
- package/dist/bin/claude-sbx.js +2 -2
- package/dist/bin/codex-sbx.js +2 -2
- package/dist/bin/gemini-sbx.js +2 -2
- package/dist/bin/sandbox.js +2 -2
- package/dist/bin/sbx-hide.js +2 -2
- package/dist/bin/sbx-show.js +2 -2
- package/dist/cli/commands/launch/launch.js +30 -1
- package/dist/cli/manifest.d.ts +93 -65
- package/dist/cli/manifest.js +23 -5
- package/dist/cli/menu/pages/accounts-page.js +31 -16
- package/dist/cli/services/accounts-service.d.ts +14 -4
- package/dist/cli/services/accounts-service.js +19 -6
- package/dist/cli/services/data-collect.js +26 -1
- package/dist/core/config/defaults.js +47 -4
- package/dist/core/detect/toolchains.d.ts +15 -1
- package/dist/core/detect/toolchains.js +45 -12
- package/dist/core/local-config/overrides.js +6 -0
- package/dist/core/schema/accounts.d.ts +27 -0
- package/dist/core/schema/accounts.js +32 -0
- package/dist/core/schema/config.d.ts +239 -0
- package/dist/core/schema/config.js +6 -0
- package/dist/core/schema/pc-installs.d.ts +7 -0
- package/dist/core/schema/pc-installs.js +17 -0
- package/dist/core/schema/toolchains.d.ts +61 -0
- package/dist/core/schema/toolchains.js +106 -0
- package/dist/core/types.d.ts +18 -0
- package/dist/guest/accounts/adapter.d.ts +25 -0
- package/dist/guest/accounts/adapter.js +21 -0
- package/dist/guest/accounts/adapters.d.ts +5 -0
- package/dist/guest/accounts/adapters.js +18 -0
- package/dist/guest/accounts/apply.d.ts +41 -0
- package/dist/guest/accounts/apply.js +47 -0
- package/dist/guest/accounts/kinds/appstore.d.ts +2 -0
- package/dist/guest/accounts/kinds/appstore.js +7 -0
- package/dist/guest/accounts/kinds/cfx.d.ts +2 -0
- package/dist/guest/accounts/kinds/cfx.js +7 -0
- package/dist/guest/accounts/kinds/epic.d.ts +2 -0
- package/dist/guest/accounts/kinds/epic.js +26 -0
- package/dist/guest/accounts/kinds/expo.d.ts +2 -0
- package/dist/guest/accounts/kinds/expo.js +7 -0
- package/dist/guest/accounts/kinds/keystore.d.ts +2 -0
- package/dist/guest/accounts/kinds/keystore.js +7 -0
- package/dist/guest/accounts/kinds/play.d.ts +2 -0
- package/dist/guest/accounts/kinds/play.js +7 -0
- package/dist/guest/accounts/kinds/steam.d.ts +4 -0
- package/dist/guest/accounts/kinds/steam.js +17 -0
- package/dist/guest/accounts/kinds/unity.d.ts +2 -0
- package/dist/guest/accounts/kinds/unity.js +7 -0
- package/dist/guest/accounts/watch.d.ts +28 -0
- package/dist/guest/accounts/watch.js +78 -0
- package/dist/guest/agents/agent-files.d.ts +6 -0
- package/dist/guest/agents/agent-files.js +14 -0
- package/dist/guest/agents/local-state.d.ts +2 -0
- package/dist/guest/agents/local-state.js +13 -1
- package/dist/guest/apps/resolvers-gamedev.d.ts +2 -0
- package/dist/guest/apps/resolvers-gamedev.js +1 -0
- package/dist/guest/apps/resolvers-mobile.d.ts +2 -0
- package/dist/guest/apps/resolvers-mobile.js +1 -0
- package/dist/guest/apps/resolvers.js +4 -0
- package/dist/guest/boot/boot.d.ts +5 -0
- package/dist/guest/boot/boot.js +36 -1
- package/dist/guest/daemon/accounts.d.ts +3 -0
- package/dist/guest/daemon/accounts.js +25 -0
- package/dist/guest/daemon/daemon.js +2 -0
- package/dist/guest/daemon/idle-shutdown.js +3 -1
- package/dist/guest/daemon/sessions.js +2 -0
- package/dist/guest/devtools/android.d.ts +2 -0
- package/dist/guest/devtools/android.js +7 -0
- package/dist/guest/devtools/devtool.d.ts +9 -0
- package/dist/guest/devtools/devtool.js +5 -0
- package/dist/guest/devtools/fivem.d.ts +2 -0
- package/dist/guest/devtools/fivem.js +7 -0
- package/dist/guest/devtools/registry.d.ts +6 -0
- package/dist/guest/devtools/registry.js +12 -0
- package/dist/guest/devtools/steam.d.ts +2 -0
- package/dist/guest/devtools/steam.js +228 -0
- package/dist/guest/devtools/unity.d.ts +2 -0
- package/dist/guest/devtools/unity.js +7 -0
- package/dist/guest/entries/daemon.js +2 -0
- package/dist/guest/entries/tool.d.ts +1 -0
- package/dist/guest/entries/tool.js +17 -0
- package/dist/guest/toolchains/engines/godot.d.ts +4 -0
- package/dist/guest/toolchains/engines/godot.js +4 -0
- package/dist/guest/toolchains/engines/unity-release.d.ts +15 -0
- package/dist/guest/toolchains/engines/unity-release.js +6 -0
- package/dist/guest/toolchains/engines/unity.d.ts +4 -0
- package/dist/guest/toolchains/engines/unity.js +4 -0
- package/dist/guest/toolchains/engines/unreal-engines.d.ts +4 -0
- package/dist/guest/toolchains/engines/unreal-engines.js +4 -0
- package/dist/guest/toolchains/fivem/artifacts.d.ts +6 -0
- package/dist/guest/toolchains/fivem/artifacts.js +7 -0
- package/dist/guest/toolchains/fivem/fivem.d.ts +4 -0
- package/dist/guest/toolchains/fivem/fivem.js +4 -0
- package/dist/guest/toolchains/installers.d.ts +12 -0
- package/dist/guest/toolchains/installers.js +39 -0
- package/dist/guest/toolchains/languages/java.js +1 -1
- package/dist/guest/toolchains/languages/kotlin.d.ts +3 -0
- package/dist/guest/toolchains/languages/kotlin.js +6 -0
- package/dist/guest/toolchains/mobile/android-repo.d.ts +11 -0
- package/dist/guest/toolchains/mobile/android-repo.js +10 -0
- package/dist/guest/toolchains/mobile/android.d.ts +17 -0
- package/dist/guest/toolchains/mobile/android.js +16 -0
- package/dist/guest/toolchains/mobile/dart.d.ts +4 -0
- package/dist/guest/toolchains/mobile/dart.js +4 -0
- package/dist/guest/toolchains/mobile/flutter.d.ts +4 -0
- package/dist/guest/toolchains/mobile/flutter.js +4 -0
- package/dist/guest/toolchains/mobile/react-native.d.ts +4 -0
- package/dist/guest/toolchains/mobile/react-native.js +4 -0
- package/dist/guest/toolchains/native/unreal.d.ts +3 -7
- package/dist/guest/toolchains/native/unreal.js +16 -155
- package/dist/guest/toolchains/native/visual-studio.d.ts +15 -0
- package/dist/guest/toolchains/native/visual-studio.js +159 -0
- package/dist/guest/toolchains/native/vs-request.d.ts +19 -0
- package/dist/guest/toolchains/native/vs-request.js +46 -0
- package/dist/guest/toolchains/not-yet.d.ts +2 -0
- package/dist/guest/toolchains/not-yet.js +6 -0
- package/dist/guest/toolchains/persisted.d.ts +48 -0
- package/dist/guest/toolchains/persisted.js +159 -0
- package/dist/guest/toolchains/plan.js +80 -4
- package/dist/guest/toolchains/steam/apps.d.ts +27 -0
- package/dist/guest/toolchains/steam/apps.js +112 -0
- package/dist/guest/toolchains/steam/client.d.ts +5 -0
- package/dist/guest/toolchains/steam/client.js +67 -0
- package/dist/guest/toolchains/steam/commands.d.ts +58 -0
- package/dist/guest/toolchains/steam/commands.js +155 -0
- package/dist/guest/toolchains/steam/steam.d.ts +4 -0
- package/dist/guest/toolchains/steam/steam.js +61 -0
- package/dist/guest/toolchains/steam/steamcmd-install.d.ts +29 -0
- package/dist/guest/toolchains/steam/steamcmd-install.js +177 -0
- package/dist/guest/toolchains/steam/steamcmd.d.ts +6 -0
- package/dist/guest/toolchains/steam/steamcmd.js +23 -0
- package/dist/guest/toolchains/step.d.ts +10 -0
- package/dist/host/accounts/deliver.d.ts +26 -0
- package/dist/host/accounts/deliver.js +80 -0
- package/dist/host/accounts/handoff.d.ts +17 -0
- package/dist/host/accounts/handoff.js +110 -0
- package/dist/host/accounts/index.d.ts +6 -0
- package/dist/host/accounts/index.js +8 -0
- package/dist/host/accounts/kinds/appstore.d.ts +2 -0
- package/dist/host/accounts/kinds/appstore.js +10 -0
- package/dist/host/accounts/kinds/cfx.d.ts +2 -0
- package/dist/host/accounts/kinds/cfx.js +7 -0
- package/dist/host/accounts/kinds/epic.d.ts +2 -0
- package/dist/host/accounts/kinds/epic.js +15 -0
- package/dist/host/accounts/kinds/expo.d.ts +2 -0
- package/dist/host/accounts/kinds/expo.js +7 -0
- package/dist/host/accounts/kinds/keystore.d.ts +2 -0
- package/dist/host/accounts/kinds/keystore.js +7 -0
- package/dist/host/accounts/kinds/play.d.ts +2 -0
- package/dist/host/accounts/kinds/play.js +7 -0
- package/dist/host/accounts/kinds/steam.d.ts +6 -0
- package/dist/host/accounts/kinds/steam.js +31 -0
- package/dist/host/accounts/kinds/unity.d.ts +2 -0
- package/dist/host/accounts/kinds/unity.js +13 -0
- package/dist/host/accounts/leases.d.ts +40 -0
- package/dist/host/accounts/leases.js +62 -0
- package/dist/host/accounts/source.d.ts +21 -0
- package/dist/host/accounts/source.js +15 -0
- package/dist/host/accounts/sources.d.ts +5 -0
- package/dist/host/accounts/sources.js +18 -0
- package/dist/host/accounts/store.d.ts +23 -0
- package/dist/host/accounts/store.js +74 -0
- package/dist/host/audit/log.d.ts +1 -1
- package/dist/host/launch/generate.d.ts +2 -0
- package/dist/host/launch/generate.js +16 -1
- package/dist/host/launch/hints/android.d.ts +3 -0
- package/dist/host/launch/hints/android.js +3 -0
- package/dist/host/launch/hints/engines.d.ts +3 -0
- package/dist/host/launch/hints/engines.js +3 -0
- package/dist/host/launch/hints/fivem.d.ts +3 -0
- package/dist/host/launch/hints/fivem.js +3 -0
- package/dist/host/launch/hints/hint.d.ts +2 -0
- package/dist/host/launch/hints/hint.js +1 -0
- package/dist/host/launch/hints/index.d.ts +5 -0
- package/dist/host/launch/hints/index.js +29 -0
- package/dist/host/launch/hints/mobile.d.ts +3 -0
- package/dist/host/launch/hints/mobile.js +3 -0
- package/dist/host/launch/hints/steam.d.ts +7 -0
- package/dist/host/launch/hints/steam.js +59 -0
- package/dist/host/launch/index.d.ts +2 -2
- package/dist/host/launch/index.js +2 -2
- package/dist/host/launch/mappings.js +2 -0
- package/dist/host/launch/session-file.js +2 -0
- package/dist/host/launch/stage.js +10 -1
- package/dist/host/launch/toolchains.d.ts +7 -0
- package/dist/host/launch/toolchains.js +11 -0
- package/dist/host/pc-installs/discover.d.ts +19 -0
- package/dist/host/pc-installs/discover.js +59 -0
- package/dist/host/pc-installs/epic.d.ts +2 -0
- package/dist/host/pc-installs/epic.js +7 -0
- package/dist/host/pc-installs/index.d.ts +3 -0
- package/dist/host/pc-installs/index.js +2 -0
- package/dist/host/pc-installs/source.d.ts +9 -0
- package/dist/host/pc-installs/source.js +1 -0
- package/dist/host/pc-installs/steam.d.ts +16 -0
- package/dist/host/pc-installs/steam.js +143 -0
- package/dist/host/pc-installs/unity.d.ts +2 -0
- package/dist/host/pc-installs/unity.js +7 -0
- package/dist/host/pc-installs/unreal.d.ts +2 -0
- package/dist/host/pc-installs/unreal.js +7 -0
- package/dist/host/profile/accounts.d.ts +21 -6
- package/dist/host/profile/accounts.js +108 -28
- package/dist/host/profile/claude-login.d.ts +32 -2
- package/dist/host/profile/claude-login.js +100 -8
- package/dist/host/profile/index.d.ts +1 -1
- package/dist/host/profile/index.js +1 -1
- package/dist/host/secrets/launch-secrets.js +1 -0
- package/dist/runtime/agent.js +321 -9
- package/dist/runtime/daemon.js +1987 -595
- package/dist/runtime/db.js +334 -11
- package/dist/runtime/main.js +2530 -709
- package/dist/runtime/netproxy.js +321 -9
- package/dist/runtime/tool.js +28549 -0
- package/dist/runtime/view.js +321 -9
- package/dist/selftest/accounts.test.js +172 -1
- package/dist/selftest/agent-paths.test.js +13 -1
- package/dist/selftest/android.test.d.ts +2 -0
- package/dist/selftest/android.test.js +7 -0
- package/dist/selftest/app.test.js +1 -1
- package/dist/selftest/engines.test.d.ts +2 -0
- package/dist/selftest/engines.test.js +7 -0
- package/dist/selftest/fivem.test.d.ts +2 -0
- package/dist/selftest/fivem.test.js +7 -0
- package/dist/selftest/generate.test.js +1 -1
- package/dist/selftest/index.js +18 -0
- package/dist/selftest/menu-screens.js +1 -0
- package/dist/selftest/menu.test.js +2 -1
- package/dist/selftest/mobile.test.d.ts +2 -0
- package/dist/selftest/mobile.test.js +7 -0
- package/dist/selftest/pc-installs.test.d.ts +2 -0
- package/dist/selftest/pc-installs.test.js +111 -0
- package/dist/selftest/persisted-installs.test.d.ts +2 -0
- package/dist/selftest/persisted-installs.test.js +107 -0
- package/dist/selftest/projects.test.js +6 -4
- package/dist/selftest/service-accounts.test.d.ts +2 -0
- package/dist/selftest/service-accounts.test.js +320 -0
- package/dist/selftest/steam.test.d.ts +2 -0
- package/dist/selftest/steam.test.js +316 -0
- package/dist/selftest/storage-helper.test.js +31 -8
- package/dist/selftest/support/engine-golden.js +3 -0
- package/dist/selftest/support/fixtures.d.ts +87 -0
- package/dist/selftest/support/fixtures.js +4 -3
- package/dist/selftest/support/pc-memory.d.ts +2 -0
- package/dist/selftest/support/pc-memory.js +17 -0
- package/dist/selftest/support/web-preview.js +20 -1
- package/dist/selftest/unity.test.d.ts +2 -0
- package/dist/selftest/unity.test.js +7 -0
- package/dist/shared/accounts/fingerprint.d.ts +1 -0
- package/dist/shared/accounts/fingerprint.js +20 -0
- package/dist/shared/accounts/index.d.ts +5 -0
- package/dist/shared/accounts/index.js +7 -0
- package/dist/shared/accounts/kinds/epic.d.ts +10 -0
- package/dist/shared/accounts/kinds/epic.js +56 -0
- package/dist/shared/accounts/kinds/steam.d.ts +28 -0
- package/dist/shared/accounts/kinds/steam.js +99 -0
- package/dist/shared/accounts/kinds.d.ts +41 -0
- package/dist/shared/accounts/kinds.js +154 -0
- package/dist/shared/accounts/payloads.d.ts +151 -0
- package/dist/shared/accounts/payloads.js +128 -0
- package/dist/shared/apps/catalogue-gamedev.d.ts +2 -0
- package/dist/shared/apps/catalogue-gamedev.js +1 -0
- package/dist/shared/apps/catalogue-mobile.d.ts +2 -0
- package/dist/shared/apps/catalogue-mobile.js +1 -0
- package/dist/shared/apps/catalogue-modding.d.ts +2 -0
- package/dist/shared/apps/catalogue-modding.js +1 -0
- package/dist/shared/apps/catalogue.d.ts +1 -0
- package/dist/shared/apps/catalogue.js +6 -1
- package/dist/shared/channel/schema.d.ts +183 -0
- package/dist/shared/channel/secrets.d.ts +42 -0
- package/dist/shared/channel/secrets.js +3 -0
- package/dist/shared/download/downloader.d.ts +7 -0
- package/dist/shared/download/downloader.js +10 -3
- package/dist/shared/installs.d.ts +19 -0
- package/dist/shared/installs.js +13 -0
- package/dist/shared/io/bounded.d.ts +6 -0
- package/dist/shared/io/bounded.js +38 -0
- package/dist/shared/io/index.d.ts +2 -0
- package/dist/shared/io/index.js +2 -0
- package/dist/shared/io/text.d.ts +9 -0
- package/dist/shared/io/text.js +18 -0
- package/dist/shared/paths/guest-paths.js +1 -1
- package/dist/shared/paths/index.d.ts +1 -0
- package/dist/shared/paths/index.js +1 -0
- package/dist/shared/paths/pc-installs.d.ts +20 -0
- package/dist/shared/paths/pc-installs.js +19 -0
- package/dist/shared/vdf.d.ts +25 -0
- package/dist/shared/vdf.js +151 -0
- package/dist/sync/sync-cycle.js +9 -0
- package/dist/web/index.html +1 -1
- package/dist/web/{main-JTH3FT4O.js → main-CWIF4VQI.js} +63 -61
- package/native/csharp/HcsHost/AssemblyInfo.cs +3 -3
- package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
- package/native/csharp/StorageHelper/AssemblyInfo.cs +3 -3
- package/package.json +1 -1
- package/sandbox/scripts/add-firewall-port.ps1 +13 -0
- package/sandbox/templates/fivem/README.txt +2 -0
- package/schemas/config.schema.json +485 -0
- package/schemas/sandbox-config.schema.json +416 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
// Section 6: the saved logins of every agent, as the accounts view shows them
|
|
2
|
-
// per agent
|
|
3
|
-
|
|
1
|
+
// Section 6: the saved logins of every agent and the service sign-ins, as the accounts view shows them
|
|
2
|
+
// (src/app/features/accounts). One category per agent (its save rows and its logins), then one per service (its
|
|
3
|
+
// state, its warnings, share / import / sign in / forget). Keys and Enter act on the open category only; what they do
|
|
4
|
+
// is the operation's.
|
|
5
|
+
import { agentPage, listAccounts, serviceCategory, servicePage, } from '../../../app/features/accounts/index.js';
|
|
4
6
|
import { readQuery } from '../../../app/registry.js';
|
|
5
7
|
import { MenuOperations } from '../io-menu.js';
|
|
6
8
|
import { menuView } from '../render-view.js';
|
|
@@ -8,23 +10,36 @@ import { ListPage } from './list-page.js';
|
|
|
8
10
|
/** The menu's rows, keys and Enter labels of one agent's category. */
|
|
9
11
|
function viewOf(m, category) {
|
|
10
12
|
const agent = m.agents.find((a) => a.name === category);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
if (agent)
|
|
14
|
+
return menuView(agentPage(agent), { category: agent.name, refresh: false });
|
|
15
|
+
const service = m.services.find((s) => serviceCategory(s.kind) === category);
|
|
16
|
+
if (service)
|
|
17
|
+
return menuView(servicePage(service), { category: serviceCategory(service.kind), refresh: false });
|
|
18
|
+
return menuView({ title: 'Accounts', sections: [] }, { refresh: false });
|
|
14
19
|
}
|
|
15
20
|
/** The list for the accounts tab. Pure. */
|
|
16
21
|
export function accountsOptions(m) {
|
|
17
22
|
return {
|
|
18
23
|
path: [],
|
|
19
|
-
intro: 'Logins saved on this PC, per agent
|
|
20
|
-
categories:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
intro: 'Logins saved on this PC, per agent (Use puts one into the sandbox; new launches start with the default), and the service sign-ins sandboxes may get.',
|
|
25
|
+
categories: [
|
|
26
|
+
...m.agents.map((a) => ({
|
|
27
|
+
id: a.name,
|
|
28
|
+
label: a.name,
|
|
29
|
+
description: a.kept
|
|
30
|
+
? 'Saved ' + a.name + ' logins.'
|
|
31
|
+
: "This agent's login is not kept between sandboxes: it cannot be pointed at a folder we control.",
|
|
32
|
+
})),
|
|
33
|
+
...m.services.map((s) => ({
|
|
34
|
+
id: serviceCategory(s.kind),
|
|
35
|
+
label: s.label,
|
|
36
|
+
description: 'Your ' + s.label + ' sign-in for sandboxes that use ' + s.usedBy.join(' or ') + '.',
|
|
37
|
+
})),
|
|
38
|
+
],
|
|
39
|
+
items: [
|
|
40
|
+
...m.agents.flatMap((a) => menuView(agentPage(a), { category: a.name, refresh: false }).items),
|
|
41
|
+
...m.services.flatMap((s) => menuView(servicePage(s), { category: serviceCategory(s.kind), refresh: false }).items),
|
|
42
|
+
],
|
|
28
43
|
empty: 'No agents.',
|
|
29
44
|
actions: (category) => viewOf(m, category).actions,
|
|
30
45
|
enterLabel: (category, id) => viewOf(m, category).enterLabel(category, id),
|
|
@@ -33,7 +48,7 @@ export function accountsOptions(m) {
|
|
|
33
48
|
export class AccountsPage extends ListPage {
|
|
34
49
|
ctx;
|
|
35
50
|
label = 'Accounts';
|
|
36
|
-
model = { agent: 'claude', agents: [] };
|
|
51
|
+
model = { agent: 'claude', agents: [], services: [] };
|
|
37
52
|
operations;
|
|
38
53
|
constructor(app, ctx) {
|
|
39
54
|
super(app);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AccountRow } from '../../host/profile/index.js';
|
|
1
|
+
import { type AccountRow, type LoginKind } from '../../host/profile/index.js';
|
|
2
2
|
import type { Context } from '../commands/context.js';
|
|
3
3
|
export type AccountsContext = Pick<Context, 'storageRoot' | 'dataPath' | 'loaded'>;
|
|
4
4
|
/** An agent in the Accounts tab. */
|
|
@@ -15,11 +15,16 @@ export interface AccountRef {
|
|
|
15
15
|
readonly email: string | null;
|
|
16
16
|
/** Something worth telling after a switch (e.g. plugins were copied, or could not be). */
|
|
17
17
|
readonly note?: string;
|
|
18
|
+
/** Claude: which kind of login, and sk-ant-...abcd for a key. */
|
|
19
|
+
readonly kind?: LoginKind;
|
|
20
|
+
readonly keyHint?: string | null;
|
|
18
21
|
}
|
|
19
22
|
export declare class AccountsService {
|
|
20
23
|
private readonly ctx;
|
|
24
|
+
private readonly env;
|
|
21
25
|
private readonly claude;
|
|
22
|
-
|
|
26
|
+
/** @param env where this PC's ANTHROPIC_API_KEY is read (save --from-host) */
|
|
27
|
+
constructor(ctx: AccountsContext, env?: Readonly<Record<string, string | undefined>>);
|
|
23
28
|
/** Claude first, then the other agents that keep a login, then the ones that cannot. */
|
|
24
29
|
agents(): AgentAccounts[];
|
|
25
30
|
/** The store, the sandbox folder of the agent's login, and its login files (non-Claude agents). */
|
|
@@ -27,8 +32,13 @@ export declare class AccountsService {
|
|
|
27
32
|
list(agent?: string): AccountRow[];
|
|
28
33
|
/** Name of the login the sandbox uses now for this agent, if any. */
|
|
29
34
|
activeName(agent?: string): string | null;
|
|
30
|
-
/**
|
|
31
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Saves the sandbox's login, or this PC's when fromHost (its subscription, else its Console key, else
|
|
37
|
+
* ANTHROPIC_API_KEY of this PC). `keyOnly` (Claude): only an API key, never a subscription found next to it.
|
|
38
|
+
*/
|
|
39
|
+
save(name: string, fromHost: boolean, agent?: string, keyOnly?: boolean): AccountRef;
|
|
40
|
+
/** Saves an Anthropic API key you typed as a Claude account (it is checked, never shown). */
|
|
41
|
+
saveApiKey(name: string, apiKey: string): AccountRef;
|
|
32
42
|
/** Makes the sandbox use a saved login. Running sessions keep the old one until restart(). */
|
|
33
43
|
activate(name: string, agent?: string): AccountRef;
|
|
34
44
|
/** The agent's default login, if it keeps logins and one is set. */
|
|
@@ -7,11 +7,17 @@ import { SandboxChannel } from '../../host/channel/index.js';
|
|
|
7
7
|
import { isSandboxRunning } from '../../host/sandbox/index.js';
|
|
8
8
|
import { expandPath, fail } from '../../core/util/index.js';
|
|
9
9
|
const CLAUDE = 'claude';
|
|
10
|
+
function claudeRef(a) {
|
|
11
|
+
return { name: a.name, email: a.email, kind: a.kind, keyHint: a.keyHint };
|
|
12
|
+
}
|
|
10
13
|
export class AccountsService {
|
|
11
14
|
ctx;
|
|
15
|
+
env;
|
|
12
16
|
claude;
|
|
13
|
-
|
|
17
|
+
/** @param env where this PC's ANTHROPIC_API_KEY is read (save --from-host) */
|
|
18
|
+
constructor(ctx, env = process.env) {
|
|
14
19
|
this.ctx = ctx;
|
|
20
|
+
this.env = env;
|
|
15
21
|
this.claude = new AccountStore(ctx.storageRoot, ctx.loaded.config.claudeProfile.sharePluginsAcrossAccounts);
|
|
16
22
|
}
|
|
17
23
|
/** Claude first, then the other agents that keep a login, then the ones that cannot. */
|
|
@@ -52,11 +58,14 @@ export class AccountsService {
|
|
|
52
58
|
? this.claude.activeFor(this.ctx.dataPath)
|
|
53
59
|
: this.other(agent).store.activeFor(this.ctx.dataPath);
|
|
54
60
|
}
|
|
55
|
-
/**
|
|
56
|
-
|
|
61
|
+
/**
|
|
62
|
+
* Saves the sandbox's login, or this PC's when fromHost (its subscription, else its Console key, else
|
|
63
|
+
* ANTHROPIC_API_KEY of this PC). `keyOnly` (Claude): only an API key, never a subscription found next to it.
|
|
64
|
+
*/
|
|
65
|
+
save(name, fromHost, agent = CLAUDE, keyOnly = false) {
|
|
57
66
|
if (agent === CLAUDE) {
|
|
58
|
-
const saved = this.claude.save(this.ctx.dataPath, name, fromHost ? this.hostLogin() : null);
|
|
59
|
-
return
|
|
67
|
+
const saved = this.claude.save(this.ctx.dataPath, name, fromHost ? this.hostLogin() : null, fromHost ? { keyOnly, envKey: this.env.ANTHROPIC_API_KEY ?? null } : { keyOnly });
|
|
68
|
+
return claudeRef(saved);
|
|
60
69
|
}
|
|
61
70
|
const { store, stateDir, hostDir } = this.other(agent);
|
|
62
71
|
if (fromHost && !hostDir)
|
|
@@ -64,11 +73,15 @@ export class AccountsService {
|
|
|
64
73
|
store.save(this.ctx.dataPath, name, fromHost && hostDir ? hostDir : stateDir, !fromHost);
|
|
65
74
|
return { name, email: null };
|
|
66
75
|
}
|
|
76
|
+
/** Saves an Anthropic API key you typed as a Claude account (it is checked, never shown). */
|
|
77
|
+
saveApiKey(name, apiKey) {
|
|
78
|
+
return claudeRef(this.claude.saveApiKey(this.ctx.dataPath, name, apiKey));
|
|
79
|
+
}
|
|
67
80
|
/** Makes the sandbox use a saved login. Running sessions keep the old one until restart(). */
|
|
68
81
|
activate(name, agent = CLAUDE) {
|
|
69
82
|
if (agent === CLAUDE) {
|
|
70
83
|
const a = this.claude.activate(this.ctx.dataPath, name);
|
|
71
|
-
return {
|
|
84
|
+
return { ...claudeRef(a), note: this.claude.pluginNote ?? undefined };
|
|
72
85
|
}
|
|
73
86
|
const { store, stateDir } = this.other(agent);
|
|
74
87
|
store.activate(this.ctx.dataPath, name, stateDir);
|
|
@@ -4,6 +4,8 @@ import path from 'node:path';
|
|
|
4
4
|
import _ from 'lodash';
|
|
5
5
|
import { sizeOf } from '../../core/disk.js';
|
|
6
6
|
import { dirExists, isLink } from '../../core/util/index.js';
|
|
7
|
+
import { readValid } from '../../shared/io/index.js';
|
|
8
|
+
import { INSTALL_RECORDS_FILE, InstallRecordsSchema } from '../../shared/installs.js';
|
|
7
9
|
const AREA_ORDER = ['tools', 'databases', 'state', 'logs', 'data', 'host'];
|
|
8
10
|
/** Folders of the data folder that get one row per child; anything else at the top level is listed as itself. */
|
|
9
11
|
const PER_CHILD = ['tools', 'databases', 'state'];
|
|
@@ -13,11 +15,34 @@ function entriesOf(dir) {
|
|
|
13
15
|
? fs.readdirSync(dir, { withFileTypes: true }).filter((d) => !d.isSymbolicLink())
|
|
14
16
|
: [];
|
|
15
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* A tool folder's size from tools\installs.json, when every version folder in it has a recorded size (engines and
|
|
20
|
+
* editors of 60 GB are then not walked); null otherwise. The sandbox wrote the file: it only ever stands in for a walk.
|
|
21
|
+
*/
|
|
22
|
+
function recordedSize(dir, name, records) {
|
|
23
|
+
const versions = entriesOf(dir).filter((d) => d.isDirectory() && !d.name.startsWith('.'));
|
|
24
|
+
if (!versions.length)
|
|
25
|
+
return null;
|
|
26
|
+
let total = 0;
|
|
27
|
+
for (const v of versions) {
|
|
28
|
+
const known = records.find((r) => r.name === name && r.version === v.name);
|
|
29
|
+
if (known?.sizeBytes === null || known === undefined)
|
|
30
|
+
return null;
|
|
31
|
+
total += known.sizeBytes;
|
|
32
|
+
}
|
|
33
|
+
return total;
|
|
34
|
+
}
|
|
16
35
|
function toolRows(toolsDir) {
|
|
17
36
|
const entries = entriesOf(toolsDir);
|
|
18
37
|
const folders = entries.filter((d) => d.isDirectory());
|
|
19
38
|
const files = entries.filter((d) => !d.isDirectory());
|
|
20
|
-
const
|
|
39
|
+
const records = readValid(InstallRecordsSchema, path.join(toolsDir, INSTALL_RECORDS_FILE))?.installs ?? [];
|
|
40
|
+
const row = (name, p) => ({
|
|
41
|
+
area: 'tools',
|
|
42
|
+
name,
|
|
43
|
+
path: p,
|
|
44
|
+
bytes: recordedSize(p, name, records) ?? sizeOf(p),
|
|
45
|
+
});
|
|
21
46
|
return [
|
|
22
47
|
...folders.flatMap((d) => d.name.toLowerCase() === 'agents'
|
|
23
48
|
? entriesOf(path.join(toolsDir, d.name)).map((a) => row('agents/' + a.name, path.join(toolsDir, d.name, a.name)))
|
|
@@ -38,6 +38,17 @@ export const DEFAULTS = {
|
|
|
38
38
|
network: { blockPrivateRanges: true, allowOnly: [], blockHosts: [], forwardPorts: [], dns: [], proxy: '' },
|
|
39
39
|
vpn: { enabled: false, provider: 'nordvpn', protocol: 'udp', country: '', configFile: '', killSwitch: true },
|
|
40
40
|
github: { shareToken: false },
|
|
41
|
+
accounts: {
|
|
42
|
+
epic: { share: false },
|
|
43
|
+
steam: { share: false },
|
|
44
|
+
unity: { share: false },
|
|
45
|
+
cfx: { share: false },
|
|
46
|
+
keystore: { share: false },
|
|
47
|
+
play: { share: false },
|
|
48
|
+
expo: { share: false },
|
|
49
|
+
appstore: { share: false },
|
|
50
|
+
},
|
|
51
|
+
pcInstalls: { steamGames: false, epicGames: false, unrealEngines: false, unityEditors: false },
|
|
41
52
|
provisioning: {
|
|
42
53
|
copyFromHost: true,
|
|
43
54
|
fallbackToInstall: true,
|
|
@@ -62,7 +73,37 @@ export const DEFAULTS = {
|
|
|
62
73
|
linkSlots: 'auto',
|
|
63
74
|
},
|
|
64
75
|
msvc: { enabled: 'auto', acceptLicense: false, msvcVersion: 'latest', sdkVersion: 'latest' },
|
|
65
|
-
unreal: {
|
|
76
|
+
unreal: {
|
|
77
|
+
enabled: 'auto',
|
|
78
|
+
acceptLicense: false,
|
|
79
|
+
components: [],
|
|
80
|
+
keepInstallFiles: true,
|
|
81
|
+
persistEngines: true,
|
|
82
|
+
derivedDataCache: 'persisted',
|
|
83
|
+
},
|
|
84
|
+
unity: { enabled: 'auto', acceptLicense: false, version: 'project', modules: [], hub: false, keepVersions: 2 },
|
|
85
|
+
godot: { enabled: 'auto', version: 'project', dotnet: 'auto', exportTemplates: true, keepVersions: 2 },
|
|
86
|
+
steam: { enabled: 'auto', client: false, sdkFolder: '' },
|
|
87
|
+
fivem: {
|
|
88
|
+
enabled: 'auto',
|
|
89
|
+
acceptLicense: false,
|
|
90
|
+
game: 'gta5',
|
|
91
|
+
artifact: 'recommended',
|
|
92
|
+
txAdmin: true,
|
|
93
|
+
keepVersions: 2,
|
|
94
|
+
},
|
|
95
|
+
android: {
|
|
96
|
+
enabled: 'auto',
|
|
97
|
+
acceptLicense: false,
|
|
98
|
+
platforms: ['project'],
|
|
99
|
+
buildTools: 'latest',
|
|
100
|
+
ndk: 'auto',
|
|
101
|
+
cmake: 'auto',
|
|
102
|
+
packages: [],
|
|
103
|
+
},
|
|
104
|
+
flutter: { enabled: 'auto', version: 'project', windowsDesktop: false, precache: ['android', 'web'] },
|
|
105
|
+
dart: { enabled: 'auto', version: 'stable' },
|
|
106
|
+
reactNative: { enabled: 'auto', easCli: true },
|
|
66
107
|
cpp: { enabled: 'auto', flexBison: true },
|
|
67
108
|
dotnet: {
|
|
68
109
|
enabled: 'auto',
|
|
@@ -71,10 +112,11 @@ export const DEFAULTS = {
|
|
|
71
112
|
workloads: [],
|
|
72
113
|
frameworkTargets: ['net48', 'net472'],
|
|
73
114
|
netfx35: false,
|
|
115
|
+
templates: [],
|
|
74
116
|
},
|
|
75
117
|
// Bigger downloads only for projects that use them.
|
|
76
118
|
go: { enabled: 'auto', version: 'stable', tools: [] },
|
|
77
|
-
java: { enabled: 'auto', version: 'lts', maven: true, gradle: true },
|
|
119
|
+
java: { enabled: 'auto', version: 'lts', maven: true, gradle: true, kotlin: false },
|
|
78
120
|
ruby: { enabled: 'auto', version: '3', gems: [] },
|
|
79
121
|
php: { enabled: 'auto', version: '8', composer: true },
|
|
80
122
|
deno: { enabled: 'auto' },
|
|
@@ -144,8 +186,9 @@ export const DEFAULTS = {
|
|
|
144
186
|
home: { env: { CODEX_HOME: 'codex' }, loginFiles: ['auth.json'], hostDir: '~/.codex' },
|
|
145
187
|
localState: { CODEX_SQLITE_HOME: 'sqlite' },
|
|
146
188
|
// Its own command sandbox keeps local users' passwords sealed with DPAPI: unreadable in the next sandbox
|
|
147
|
-
// ("CryptUnprotectData" on every command), so it sets that sandbox up again at each boot.
|
|
148
|
-
|
|
189
|
+
// ("CryptUnprotectData" on every command), so it sets that sandbox up again at each boot. tmp\arg0: folders
|
|
190
|
+
// Codex cannot remove in a mapped folder (os error 145, a warning at every start); nothing holds them at boot.
|
|
191
|
+
bootReset: ['.sandbox-secrets', '.sandbox\\setup_marker.json', '.sandbox\\deny_read_acl_state.json', 'tmp\\arg0'],
|
|
149
192
|
resumeArguments: ['resume', '--last'],
|
|
150
193
|
},
|
|
151
194
|
gemini: {
|
|
@@ -5,10 +5,18 @@ export declare const MARKERS: {
|
|
|
5
5
|
readonly rust: readonly ["Cargo.toml", "rust-toolchain", "rust-toolchain.toml"];
|
|
6
6
|
readonly msvc: readonly ["*.vcxproj", "CMakePresets.json", "CMakeUserPresets.json"];
|
|
7
7
|
readonly unreal: readonly ["*.uproject", "*.uplugin"];
|
|
8
|
+
readonly unity: readonly ["ProjectVersion.txt"];
|
|
9
|
+
readonly godot: readonly ["project.godot"];
|
|
10
|
+
readonly steam: readonly ["steam_appid.txt", "steam_api64.dll", "steam_api.dll"];
|
|
11
|
+
readonly fivem: readonly ["fxmanifest.lua", "__resource.lua"];
|
|
12
|
+
readonly android: readonly [];
|
|
13
|
+
readonly flutter: readonly [];
|
|
14
|
+
readonly dart: readonly [];
|
|
15
|
+
readonly reactNative: readonly [];
|
|
8
16
|
readonly cpp: readonly ["CMakeLists.txt", "Makefile", "meson.build", "premake5.lua", "Cargo.toml", "*.vcxproj", "*.c", "*.cpp", "*.cc", "*.h", "*.hpp"];
|
|
9
17
|
readonly dotnet: readonly ["*.sln", "*.slnx", "*.csproj", "*.fsproj", "*.vbproj", "global.json", "*.cs"];
|
|
10
18
|
readonly go: readonly ["go.mod", "go.work", "*.go"];
|
|
11
|
-
readonly java: readonly ["pom.xml", "build.gradle", "build.gradle.kts", "settings.gradle", "settings.gradle.kts", "mvnw", "gradlew", ".java-version", ".sdkmanrc", "*.java"];
|
|
19
|
+
readonly java: readonly ["pom.xml", "build.gradle", "build.gradle.kts", "settings.gradle", "settings.gradle.kts", "mvnw", "gradlew", ".java-version", ".sdkmanrc", "*.java", "*.kt"];
|
|
12
20
|
readonly ruby: readonly ["Gemfile", "*.gemspec", ".ruby-version", "*.rb"];
|
|
13
21
|
readonly php: readonly ["composer.json", "artisan", ".php-version", "*.php"];
|
|
14
22
|
readonly deno: readonly ["deno.json", "deno.jsonc", "deno.lock"];
|
|
@@ -19,6 +27,12 @@ export declare const MARKERS: {
|
|
|
19
27
|
};
|
|
20
28
|
export type AutoToolchain = keyof typeof MARKERS;
|
|
21
29
|
export declare const AUTO_TOOLCHAINS: AutoToolchain[];
|
|
30
|
+
/**
|
|
31
|
+
* Toolchains that come under licence terms and are big downloads (1-60 GB): "auto" installs them only once you accept
|
|
32
|
+
* the licence (toolchains.<name>.acceptLicense). A project file can never accept one for you (local-config policy).
|
|
33
|
+
*/
|
|
34
|
+
export declare const LICENSED_TOOLCHAINS: readonly ["msvc", "unreal", "unity", "fivem", "android"];
|
|
35
|
+
export type LicensedToolchain = (typeof LICENSED_TOOLCHAINS)[number];
|
|
22
36
|
export interface ToolchainDecision {
|
|
23
37
|
on: boolean;
|
|
24
38
|
reason: string;
|
|
@@ -16,6 +16,16 @@ export const MARKERS = {
|
|
|
16
16
|
rust: ['Cargo.toml', 'rust-toolchain', 'rust-toolchain.toml'],
|
|
17
17
|
msvc: ['*.vcxproj', 'CMakePresets.json', 'CMakeUserPresets.json'],
|
|
18
18
|
unreal: ['*.uproject', '*.uplugin'],
|
|
19
|
+
unity: ['ProjectVersion.txt'],
|
|
20
|
+
godot: ['project.godot'],
|
|
21
|
+
steam: ['steam_appid.txt', 'steam_api64.dll', 'steam_api.dll'],
|
|
22
|
+
fivem: ['fxmanifest.lua', '__resource.lua'],
|
|
23
|
+
// Decided from file contents (host/launch/hints): Gradle's com.android plugin, an AndroidManifest.xml deeper down,
|
|
24
|
+
// <UseMaui>, a pubspec's flutter: section, react-native / expo in package.json.
|
|
25
|
+
android: [],
|
|
26
|
+
flutter: [],
|
|
27
|
+
dart: [],
|
|
28
|
+
reactNative: [],
|
|
19
29
|
cpp: [
|
|
20
30
|
'CMakeLists.txt',
|
|
21
31
|
'Makefile',
|
|
@@ -42,6 +52,7 @@ export const MARKERS = {
|
|
|
42
52
|
'.java-version',
|
|
43
53
|
'.sdkmanrc',
|
|
44
54
|
'*.java',
|
|
55
|
+
'*.kt',
|
|
45
56
|
],
|
|
46
57
|
ruby: ['Gemfile', '*.gemspec', '.ruby-version', '*.rb'],
|
|
47
58
|
php: ['composer.json', 'artisan', '.php-version', '*.php'],
|
|
@@ -54,6 +65,11 @@ export const MARKERS = {
|
|
|
54
65
|
pwsh: [],
|
|
55
66
|
};
|
|
56
67
|
export const AUTO_TOOLCHAINS = Object.keys(MARKERS);
|
|
68
|
+
/**
|
|
69
|
+
* Toolchains that come under licence terms and are big downloads (1-60 GB): "auto" installs them only once you accept
|
|
70
|
+
* the licence (toolchains.<name>.acceptLicense). A project file can never accept one for you (local-config policy).
|
|
71
|
+
*/
|
|
72
|
+
export const LICENSED_TOOLCHAINS = ['msvc', 'unreal', 'unity', 'fivem', 'android'];
|
|
57
73
|
/** Files of any ecosystem: a folder with none of them is no project yet. */
|
|
58
74
|
const PROJECT_FILES = [...new Set([...Object.values(MARKERS).flat(), 'package.json', 'deno.json', '*.ts', '*.js'])];
|
|
59
75
|
/**
|
|
@@ -81,18 +97,7 @@ export function decideToolchains(settings, entries, pcHas, hints = {}) {
|
|
|
81
97
|
// Rust links with MSVC when this PC does (its rustup host is *-msvc), otherwise with MinGW's gcc.
|
|
82
98
|
if (result.rust.on && settings.msvc.enabled === 'auto' && !result.msvc.on && pcHas.includes('msvc'))
|
|
83
99
|
result.msvc = { on: true, reason: 'Rust on this PC builds with MSVC' };
|
|
84
|
-
|
|
85
|
-
if (settings.msvc.enabled === 'auto' && result.msvc.on && !settings.msvc.acceptLicense)
|
|
86
|
-
result.msvc = {
|
|
87
|
-
on: false,
|
|
88
|
-
reason: 'would be used (' + result.msvc.reason + '); set toolchains.msvc.acceptLicense to install it',
|
|
89
|
-
};
|
|
90
|
-
// Unreal is a ~10 GB licensed install every boot: "auto" only installs it once its licence is accepted.
|
|
91
|
-
if (settings.unreal.enabled === 'auto' && result.unreal.on && !settings.unreal.acceptLicense)
|
|
92
|
-
result.unreal = {
|
|
93
|
-
on: false,
|
|
94
|
-
reason: 'would be used (' + result.unreal.reason + '); set toolchains.unreal.acceptLicense to install it',
|
|
95
|
-
};
|
|
100
|
+
applyImplications(settings, result);
|
|
96
101
|
if (result.rust.on && !result.msvc.on && !result.cpp.on && settings.cpp.enabled !== false)
|
|
97
102
|
result.cpp = { on: true, reason: 'the linker for Rust' };
|
|
98
103
|
// uv installs the Python tools (`uv tool install`), so Python tools turn an "auto" uv on.
|
|
@@ -102,6 +107,34 @@ export function decideToolchains(settings, entries, pcHas, hints = {}) {
|
|
|
102
107
|
result.vscode = { on: true, reason: 'installed on this PC' };
|
|
103
108
|
return result;
|
|
104
109
|
}
|
|
110
|
+
/** An "auto" toolchain another one needs is turned on (with the reason), unless you turned it off. */
|
|
111
|
+
function imply(settings, result, name, reason) {
|
|
112
|
+
if (settings[name].enabled === 'auto' && !result[name].on)
|
|
113
|
+
result[name] = { on: true, reason };
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* What one toolchain brings along (Android for Flutter and React Native, a JDK for Android, .NET for Godot's C#
|
|
117
|
+
* build), and the licence gates: a licensed "auto" toolchain is off until its licence is accepted. Android is implied
|
|
118
|
+
* before its gate (Flutter alone never accepts the Android licence) and the JDK after it.
|
|
119
|
+
*/
|
|
120
|
+
function applyImplications(settings, result) {
|
|
121
|
+
if (result.flutter.on)
|
|
122
|
+
imply(settings, result, 'android', 'Flutter builds for Android');
|
|
123
|
+
if (result.reactNative.on)
|
|
124
|
+
imply(settings, result, 'android', 'React Native builds for Android');
|
|
125
|
+
if (result.godot.on && settings.godot.dotnet === true)
|
|
126
|
+
imply(settings, result, 'dotnet', "Godot's .NET build");
|
|
127
|
+
for (const name of LICENSED_TOOLCHAINS) {
|
|
128
|
+
if (settings[name].enabled !== 'auto' || !result[name].on || settings[name].acceptLicense)
|
|
129
|
+
continue;
|
|
130
|
+
result[name] = {
|
|
131
|
+
on: false,
|
|
132
|
+
reason: 'would be used (' + result[name].reason + '); set toolchains.' + name + '.acceptLicense to install it',
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
if (result.android.on)
|
|
136
|
+
imply(settings, result, 'java', 'the Android SDK needs a JDK (17 or newer)');
|
|
137
|
+
}
|
|
105
138
|
/** The settings with every "auto" replaced by the decision (what the sandbox receives). */
|
|
106
139
|
export function resolveToolchains(settings, decisions) {
|
|
107
140
|
const out = structuredClone(settings);
|
|
@@ -4,6 +4,8 @@ import _ from 'lodash';
|
|
|
4
4
|
import { mergeConfig } from '../config/index.js';
|
|
5
5
|
import { describeIssues, LocalOverridesSchema } from '../schema/index.js';
|
|
6
6
|
import { expandPath, fail, fileExists, isInsideOrEqual } from '../util/index.js';
|
|
7
|
+
import { SERVICE_KINDS } from '../../shared/accounts/kinds.js';
|
|
8
|
+
import { LICENSED_TOOLCHAINS } from '../detect/toolchains.js';
|
|
7
9
|
/** Validates a folder's settings and resolves its relative paths against that folder. */
|
|
8
10
|
export function normalizeOverrides(data, dir, source) {
|
|
9
11
|
const parsed = LocalOverridesSchema.safeParse(data);
|
|
@@ -64,6 +66,10 @@ export const OFF_IS_SAFER = [
|
|
|
64
66
|
'sandbox.printerRedirection',
|
|
65
67
|
'sandbox.vGpu',
|
|
66
68
|
'claudeProfile.copyCredentials',
|
|
69
|
+
// Hands your saved service sign-ins (Epic, Steam, signing keys ...) to the sandbox.
|
|
70
|
+
...SERVICE_KINDS.map((kind) => 'accounts.' + kind + '.share'),
|
|
71
|
+
// A licence (and a 10-60 GB install) is yours to accept, never a repo's.
|
|
72
|
+
...LICENSED_TOOLCHAINS.map((name) => 'toolchains.' + name + '.acceptLicense'),
|
|
67
73
|
'claudeProfile.enabled',
|
|
68
74
|
'claudeProfile.syncHistory',
|
|
69
75
|
'claudeProfile.syncClaudeMem',
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AccountsSchema: z.ZodObject<{
|
|
3
|
+
epic: z.ZodObject<{
|
|
4
|
+
share: z.ZodBoolean;
|
|
5
|
+
}, z.core.$strict>;
|
|
6
|
+
steam: z.ZodObject<{
|
|
7
|
+
share: z.ZodBoolean;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
unity: z.ZodObject<{
|
|
10
|
+
share: z.ZodBoolean;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
cfx: z.ZodObject<{
|
|
13
|
+
share: z.ZodBoolean;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
keystore: z.ZodObject<{
|
|
16
|
+
share: z.ZodBoolean;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
play: z.ZodObject<{
|
|
19
|
+
share: z.ZodBoolean;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
expo: z.ZodObject<{
|
|
22
|
+
share: z.ZodBoolean;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
appstore: z.ZodObject<{
|
|
25
|
+
share: z.ZodBoolean;
|
|
26
|
+
}, z.core.$strict>;
|
|
27
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// accounts: which saved service sign-ins sandboxes get (the sign-ins themselves are not settings: they are kept
|
|
2
|
+
// encrypted by `sandbox account import|login`, or come back from a sandbox you signed in in).
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { SERVICE_SPECS } from '../../shared/accounts/kinds.js';
|
|
5
|
+
function share(kind, how) {
|
|
6
|
+
const spec = SERVICE_SPECS[kind];
|
|
7
|
+
return z.strictObject({
|
|
8
|
+
share: z
|
|
9
|
+
.boolean()
|
|
10
|
+
.describe('Hand your saved ' +
|
|
11
|
+
spec.label +
|
|
12
|
+
' sign-in to sandboxes that use ' +
|
|
13
|
+
spec.usedBy.join(' or ') +
|
|
14
|
+
' (' +
|
|
15
|
+
how +
|
|
16
|
+
'). Kept encrypted on this PC; ' +
|
|
17
|
+
spec.warnings.join(' ') +
|
|
18
|
+
' Yours only: a project file can only turn it off.'),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export const AccountsSchema = z
|
|
22
|
+
.strictObject({
|
|
23
|
+
epic: share('epic', "sign in to the launcher once in a sandbox, or take this PC's: sandbox account import epic"),
|
|
24
|
+
steam: share('steam', 'sign in once with sbx-steam login, or: sandbox account import steam --from <steamcmd folder>'),
|
|
25
|
+
unity: share('unity', "sign in once in a sandbox, or take this PC's licence: sandbox account import unity"),
|
|
26
|
+
cfx: share('cfx', 'sandbox account login cfx'),
|
|
27
|
+
keystore: share('keystore', 'sandbox account import keystore --from <upload.jks>'),
|
|
28
|
+
play: share('play', 'sandbox account import play --from <service-account.json>'),
|
|
29
|
+
expo: share('expo', 'sandbox account login expo'),
|
|
30
|
+
appstore: share('appstore', 'sandbox account import appstore --from <AuthKey.p8>'),
|
|
31
|
+
})
|
|
32
|
+
.describe('Service sign-ins for sandboxes (game stores, engines, app signing). Manage them in Accounts: sandbox account status.');
|