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
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { Config } from '../../../core/types.js';
|
|
2
|
+
import { AccountLeases, ServiceAccountStore, type PcEnv } from '../../../host/accounts/index.js';
|
|
3
|
+
import { type ServiceKind } from '../../../shared/accounts/index.js';
|
|
4
|
+
import { type OperationIO } from '../../kernel/index.js';
|
|
5
|
+
import { type ServiceRow } from './services.def.js';
|
|
6
|
+
/** One service's row: never the sign-in, and the store's summary through safeText. */
|
|
7
|
+
export declare function serviceRow(kind: ServiceKind, config: Config, store: ServiceAccountStore, leases: AccountLeases): ServiceRow;
|
|
8
|
+
export interface ImportDeps {
|
|
9
|
+
readonly store: ServiceAccountStore;
|
|
10
|
+
readonly pc: PcEnv;
|
|
11
|
+
readonly share: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** Saves a kind's sign-in from this PC's program or from a file, after a confirmation (--yes answers it). */
|
|
14
|
+
export declare function importServiceFlow(io: OperationIO, kind: ServiceKind, from: string | undefined, deps: ImportDeps): Promise<{
|
|
15
|
+
message: string;
|
|
16
|
+
}>;
|
|
17
|
+
/** Saves what you type for a kind (a key, a token). */
|
|
18
|
+
export declare function loginServiceFlow(io: OperationIO, kind: ServiceKind, deps: Omit<ImportDeps, 'pc'>): Promise<{
|
|
19
|
+
message: string;
|
|
20
|
+
}>;
|
|
21
|
+
/** Forgets a kind's sign-in everywhere after asking (--yes answers it). */
|
|
22
|
+
export declare function logoutServiceFlow(io: OperationIO, kind: ServiceKind, storageRoot: string, store: ServiceAccountStore, leases: AccountLeases): Promise<{
|
|
23
|
+
deleted: boolean;
|
|
24
|
+
message: string;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const listServicesRun: import("../../kernel/define.js").Implementation<import("../../kernel/define.js").QueryDef<import("zod").ZodObject<{
|
|
27
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
28
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
29
|
+
services: import("zod").ZodArray<import("zod").ZodObject<{
|
|
30
|
+
kind: import("zod").ZodString;
|
|
31
|
+
label: import("zod").ZodString;
|
|
32
|
+
share: import("zod").ZodBoolean;
|
|
33
|
+
state: import("zod").ZodEnum<{
|
|
34
|
+
none: "none";
|
|
35
|
+
saved: "saved";
|
|
36
|
+
unreadable: "unreadable";
|
|
37
|
+
}>;
|
|
38
|
+
source: import("zod").ZodNullable<import("zod").ZodString>;
|
|
39
|
+
savedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
40
|
+
summary: import("zod").ZodNullable<import("zod").ZodString>;
|
|
41
|
+
heldBy: import("zod").ZodNullable<import("zod").ZodString>;
|
|
42
|
+
usedBy: import("zod").ZodArray<import("zod").ZodString>;
|
|
43
|
+
warnings: import("zod").ZodArray<import("zod").ZodString>;
|
|
44
|
+
canImport: import("zod").ZodBoolean;
|
|
45
|
+
canLogin: import("zod").ZodBoolean;
|
|
46
|
+
needsFile: import("zod").ZodBoolean;
|
|
47
|
+
}, import("zod/v4/core").$strip>>;
|
|
48
|
+
}, import("zod/v4/core").$strip>, "accounts.services">, import("../../../cli/commands/context.js").Context>;
|
|
49
|
+
export declare const serviceImportRun: import("../../kernel/define.js").Implementation<import("../../kernel/define.js").OperationDef<import("zod").ZodObject<{
|
|
50
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
51
|
+
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
52
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
53
|
+
message: import("zod").ZodString;
|
|
54
|
+
}, import("zod/v4/core").$strip>, "accounts.service.import">, import("../../../cli/commands/context.js").Context>;
|
|
55
|
+
export declare const serviceLoginRun: import("../../kernel/define.js").Implementation<import("../../kernel/define.js").OperationDef<import("zod").ZodObject<{
|
|
56
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
57
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
58
|
+
message: import("zod").ZodString;
|
|
59
|
+
}, import("zod/v4/core").$strip>, "accounts.service.login">, import("../../../cli/commands/context.js").Context>;
|
|
60
|
+
export declare const serviceLogoutRun: import("../../kernel/define.js").Implementation<import("../../kernel/define.js").OperationDef<import("zod").ZodObject<{
|
|
61
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
62
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
63
|
+
deleted: import("zod").ZodBoolean;
|
|
64
|
+
message: import("zod").ZodString;
|
|
65
|
+
}, import("zod/v4/core").$strip>, "accounts.service.logout">, import("../../../cli/commands/context.js").Context>;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
// The service sign-ins' work: their status, taking one from this PC or a file, typing one, and forgetting one
|
|
2
|
+
// everywhere. Talks only through io; the sign-in itself is never an output, a log line or part of a question. The
|
|
3
|
+
// flows take the store, the leases and this PC's folders, so the self-test runs them with its own.
|
|
4
|
+
import fs from 'node:fs';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { requireOnPc } from '../../../cli/commands/context.js';
|
|
7
|
+
import { fail, safeText } from '../../../core/util/index.js';
|
|
8
|
+
import { AccountLeases, forgetEverywhere, HOST_SOURCES, pcEnv, ServiceAccountStore, } from '../../../host/accounts/index.js';
|
|
9
|
+
import { isServiceKind, SERVICE_KINDS, SERVICE_SPECS, } from '../../../shared/accounts/index.js';
|
|
10
|
+
import { readBoundedFile } from '../../../shared/io/index.js';
|
|
11
|
+
import { implement } from '../../context.js';
|
|
12
|
+
import { cancelled } from '../../kernel/index.js';
|
|
13
|
+
import { listServices, serviceImport, serviceLogin, serviceLogout } from './services.def.js';
|
|
14
|
+
/** One service's row: never the sign-in, and the store's summary through safeText. */
|
|
15
|
+
export function serviceRow(kind, config, store, leases) {
|
|
16
|
+
const spec = SERVICE_SPECS[kind];
|
|
17
|
+
const source = HOST_SOURCES[kind];
|
|
18
|
+
const state = store.state(kind);
|
|
19
|
+
const info = state === 'none' ? null : store.info(kind);
|
|
20
|
+
const holder = spec.singleHolder ? leases.holder(kind) : null;
|
|
21
|
+
return {
|
|
22
|
+
kind,
|
|
23
|
+
label: spec.label,
|
|
24
|
+
share: config.accounts[kind].share,
|
|
25
|
+
state,
|
|
26
|
+
source: info?.source ?? null,
|
|
27
|
+
savedAt: info?.savedAt ?? null,
|
|
28
|
+
summary: info?.summary ? safeText(info.summary) : null,
|
|
29
|
+
heldBy: holder ? safeText(holder.dataSet) : null,
|
|
30
|
+
usedBy: [...spec.usedBy],
|
|
31
|
+
warnings: [...spec.warnings],
|
|
32
|
+
canImport: Boolean(source.fromPc || source.fromFile),
|
|
33
|
+
canLogin: Boolean(source.fromAnswers),
|
|
34
|
+
needsFile: Boolean(source.fromFile && !source.fromPc),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/** The kind an operation is about: the name given (checked), else asked. */
|
|
38
|
+
async function kindOf(io, given, verb, offered = () => true) {
|
|
39
|
+
if (given !== undefined) {
|
|
40
|
+
const name = given.trim().toLowerCase();
|
|
41
|
+
if (!isServiceKind(name))
|
|
42
|
+
fail('There is no service called "' + safeText(given) + '".', 'Use one of: ' + SERVICE_KINDS.join(', '));
|
|
43
|
+
return name;
|
|
44
|
+
}
|
|
45
|
+
const choices = SERVICE_KINDS.filter((k) => offered(SERVICE_SPECS[k])).map((k) => ({
|
|
46
|
+
value: k,
|
|
47
|
+
label: SERVICE_SPECS[k].label,
|
|
48
|
+
}));
|
|
49
|
+
if (!choices.length)
|
|
50
|
+
fail('No service can do that.');
|
|
51
|
+
const picked = await io.choose({ title: 'Which service do you want to ' + verb + '?', choices });
|
|
52
|
+
if (picked === undefined || !isServiceKind(picked))
|
|
53
|
+
cancelled();
|
|
54
|
+
return picked;
|
|
55
|
+
}
|
|
56
|
+
/** Asks for the kind's fields; optional ones may stay empty. */
|
|
57
|
+
async function askFields(io, spec) {
|
|
58
|
+
const answers = {};
|
|
59
|
+
for (const field of spec.fields) {
|
|
60
|
+
const validate = (value) => {
|
|
61
|
+
const v = value.trim();
|
|
62
|
+
if (!v)
|
|
63
|
+
return field.optional ? true : 'This one is needed.';
|
|
64
|
+
return !field.pattern || field.pattern.test(v) ? true : 'That does not look right for ' + field.label + '.';
|
|
65
|
+
};
|
|
66
|
+
const title = field.label + (field.optional ? ' (Enter to skip)' : '') + ':';
|
|
67
|
+
const answer = field.secret
|
|
68
|
+
? await io.secret({ title, validate })
|
|
69
|
+
: await io.text({ title, validate, allowEmpty: Boolean(field.optional) });
|
|
70
|
+
if (answer === undefined) {
|
|
71
|
+
if (field.optional)
|
|
72
|
+
continue;
|
|
73
|
+
cancelled();
|
|
74
|
+
}
|
|
75
|
+
if (answer.trim())
|
|
76
|
+
answers[field.name] = answer.trim();
|
|
77
|
+
}
|
|
78
|
+
return answers;
|
|
79
|
+
}
|
|
80
|
+
function savedMessage(kind, share) {
|
|
81
|
+
return ('Saved your ' +
|
|
82
|
+
SERVICE_SPECS[kind].label +
|
|
83
|
+
' sign-in (encrypted for your Windows user).' +
|
|
84
|
+
(share ? '' : ' Sandboxes get it once you share it: sandbox config set accounts.' + kind + '.share true'));
|
|
85
|
+
}
|
|
86
|
+
/** Saves a kind's sign-in from this PC's program or from a file, after a confirmation (--yes answers it). */
|
|
87
|
+
export async function importServiceFlow(io, kind, from, deps) {
|
|
88
|
+
const spec = SERVICE_SPECS[kind];
|
|
89
|
+
const source = HOST_SOURCES[kind];
|
|
90
|
+
if (!source.fromPc && !source.fromFile)
|
|
91
|
+
fail(spec.label + ' cannot be imported.', 'Type it instead: sandbox account login ' + kind);
|
|
92
|
+
let file = from === undefined ? undefined : path.resolve(from);
|
|
93
|
+
const isFile = (p) => {
|
|
94
|
+
try {
|
|
95
|
+
return fs.statSync(p).isFile();
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
const useFile = Boolean(source.fromFile && (file ? isFile(file) : !source.fromPc));
|
|
102
|
+
if (useFile && !file) {
|
|
103
|
+
const asked = await io.path({ title: 'The ' + spec.label + ' file:', pathKind: 'file' });
|
|
104
|
+
if (asked === undefined)
|
|
105
|
+
cancelled();
|
|
106
|
+
file = path.resolve(asked);
|
|
107
|
+
}
|
|
108
|
+
const yes = await io.confirm({
|
|
109
|
+
title: useFile
|
|
110
|
+
? 'Save the ' + spec.label + ' sign-in from this file for sandboxes?'
|
|
111
|
+
: "Take this PC's " + spec.label + ' sign-in for sandboxes?',
|
|
112
|
+
lines: [...spec.warnings],
|
|
113
|
+
yes: 'Save it',
|
|
114
|
+
noTerminal: { message: 'Cannot ask here (no terminal).', fix: 'Add --yes to save it without asking.' },
|
|
115
|
+
});
|
|
116
|
+
if (!yes)
|
|
117
|
+
cancelled('Nothing saved.');
|
|
118
|
+
let payload;
|
|
119
|
+
let saved;
|
|
120
|
+
if (useFile) {
|
|
121
|
+
const bytes = readBoundedFile(file, spec.maxBytes);
|
|
122
|
+
if (!bytes)
|
|
123
|
+
fail('Cannot read ' + file + ' (missing, a link, or bigger than ' + spec.maxBytes / 1024 + ' KB).');
|
|
124
|
+
payload = source.fromFile(bytes, await askFields(io, spec));
|
|
125
|
+
saved = 'file';
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
payload = source.fromPc(deps.pc, file);
|
|
129
|
+
saved = 'pc';
|
|
130
|
+
}
|
|
131
|
+
if (!payload)
|
|
132
|
+
return {
|
|
133
|
+
message: 'No saved ' +
|
|
134
|
+
spec.label +
|
|
135
|
+
' sign-in found on this PC' +
|
|
136
|
+
(file ? ' in ' + file : '') +
|
|
137
|
+
(spec.returns ? ' (sign in there first, or sign in once inside a sandbox).' : '.'),
|
|
138
|
+
};
|
|
139
|
+
deps.store.save(kind, payload, saved, source.summary(payload));
|
|
140
|
+
for (const w of spec.warnings)
|
|
141
|
+
io.log(w, 'warn');
|
|
142
|
+
return { message: savedMessage(kind, deps.share) };
|
|
143
|
+
}
|
|
144
|
+
/** Saves what you type for a kind (a key, a token). */
|
|
145
|
+
export async function loginServiceFlow(io, kind, deps) {
|
|
146
|
+
const spec = SERVICE_SPECS[kind];
|
|
147
|
+
const source = HOST_SOURCES[kind];
|
|
148
|
+
if (!source.fromAnswers)
|
|
149
|
+
fail(spec.label + ' has nothing to type.', spec.sources.includes('sandbox')
|
|
150
|
+
? 'Sign in once inside a sandbox (it is kept), or: sandbox account import ' + kind
|
|
151
|
+
: 'Run: sandbox account import ' + kind + ' --from <file>');
|
|
152
|
+
const payload = source.fromAnswers(await askFields(io, spec));
|
|
153
|
+
deps.store.save(kind, payload, 'typed', source.summary(payload));
|
|
154
|
+
for (const w of spec.warnings)
|
|
155
|
+
io.log(w, 'warn');
|
|
156
|
+
return { message: savedMessage(kind, deps.share) };
|
|
157
|
+
}
|
|
158
|
+
/** Forgets a kind's sign-in everywhere after asking (--yes answers it). */
|
|
159
|
+
export async function logoutServiceFlow(io, kind, storageRoot, store, leases) {
|
|
160
|
+
const label = SERVICE_SPECS[kind].label;
|
|
161
|
+
const yes = await io.confirm({
|
|
162
|
+
title: 'Forget the saved ' + label + ' sign-in?',
|
|
163
|
+
lines: ['The next sandboxes start signed out; a copy a sandbox left behind is deleted too.'],
|
|
164
|
+
yes: 'Forget',
|
|
165
|
+
danger: true,
|
|
166
|
+
noTerminal: { message: 'Cannot ask here (no terminal).', fix: 'Add --yes to forget it without asking.' },
|
|
167
|
+
});
|
|
168
|
+
if (!yes)
|
|
169
|
+
cancelled('Nothing changed.');
|
|
170
|
+
const { removed, pendingDeleted } = forgetEverywhere(kind, storageRoot, store, leases);
|
|
171
|
+
if (!removed && !pendingDeleted)
|
|
172
|
+
return { deleted: false, message: 'No ' + label + ' sign-in was saved.' };
|
|
173
|
+
return {
|
|
174
|
+
deleted: true,
|
|
175
|
+
message: 'The saved ' +
|
|
176
|
+
label +
|
|
177
|
+
' sign-in is deleted' +
|
|
178
|
+
(pendingDeleted ? ' (and ' + pendingDeleted + ' copy a sandbox left)' : '') +
|
|
179
|
+
'. The next sandboxes start signed out.',
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
export const listServicesRun = implement(listServices, async (ctx, input) => {
|
|
183
|
+
const store = new ServiceAccountStore(ctx.storageRoot);
|
|
184
|
+
const leases = new AccountLeases(ctx.storageRoot);
|
|
185
|
+
const name = input.name?.trim().toLowerCase();
|
|
186
|
+
if (name !== undefined && name !== '' && !isServiceKind(name))
|
|
187
|
+
fail('There is no service called "' + safeText(input.name ?? '') + '".', 'Use one of: ' + SERVICE_KINDS.join(', '));
|
|
188
|
+
const kinds = name ? [name] : [...SERVICE_KINDS];
|
|
189
|
+
return { services: kinds.map((k) => serviceRow(k, ctx.loaded.config, store, leases)) };
|
|
190
|
+
});
|
|
191
|
+
export const serviceImportRun = implement(serviceImport, async (ctx, input, io) => {
|
|
192
|
+
requireOnPc('account import');
|
|
193
|
+
const kind = await kindOf(io, input.name, 'import', (s) => Boolean(HOST_SOURCES[s.kind].fromPc || HOST_SOURCES[s.kind].fromFile));
|
|
194
|
+
return importServiceFlow(io, kind, input.from, {
|
|
195
|
+
store: new ServiceAccountStore(ctx.storageRoot),
|
|
196
|
+
pc: pcEnv(),
|
|
197
|
+
share: ctx.loaded.config.accounts[kind].share,
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
export const serviceLoginRun = implement(serviceLogin, async (ctx, input, io) => {
|
|
201
|
+
requireOnPc('account login');
|
|
202
|
+
const kind = await kindOf(io, input.name, 'sign in to', (s) => Boolean(HOST_SOURCES[s.kind].fromAnswers));
|
|
203
|
+
return loginServiceFlow(io, kind, {
|
|
204
|
+
store: new ServiceAccountStore(ctx.storageRoot),
|
|
205
|
+
share: ctx.loaded.config.accounts[kind].share,
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
export const serviceLogoutRun = implement(serviceLogout, async (ctx, input, io) => {
|
|
209
|
+
requireOnPc('account logout');
|
|
210
|
+
const kind = await kindOf(io, input.name, 'forget');
|
|
211
|
+
return logoutServiceFlow(io, kind, ctx.storageRoot, new ServiceAccountStore(ctx.storageRoot), new AccountLeases(ctx.storageRoot));
|
|
212
|
+
});
|
|
@@ -11,6 +11,7 @@ export type { SessionRow, SessionsList } from './sessions/sessions.def.js';
|
|
|
11
11
|
export type { SettingRow, SettingsList } from './settings/settings.def.js';
|
|
12
12
|
export type { VpnStatus } from './vpn/vpn.def.js';
|
|
13
13
|
export type { GithubStatus } from './github/github.def.js';
|
|
14
|
+
export type { ServiceRow, ServicesList } from './accounts/services.def.js';
|
|
14
15
|
export type { AccessStatus } from './access/access.def.js';
|
|
15
16
|
export declare const OPERATIONS: readonly [OperationDef<import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
16
17
|
available: import("zod").ZodBoolean;
|
|
@@ -99,6 +100,7 @@ export declare const OPERATIONS: readonly [OperationDef<import("zod").ZodObject<
|
|
|
99
100
|
agent: import("zod").ZodDefault<import("zod").ZodString>;
|
|
100
101
|
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
101
102
|
fromHost: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
103
|
+
apiKey: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
102
104
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
103
105
|
name: import("zod").ZodString;
|
|
104
106
|
message: import("zod").ZodString;
|
|
@@ -276,6 +278,20 @@ export declare const OPERATIONS: readonly [OperationDef<import("zod").ZodObject<
|
|
|
276
278
|
deleted: import("zod").ZodBoolean;
|
|
277
279
|
message: import("zod").ZodString;
|
|
278
280
|
}, import("zod/v4/core").$strip>, "github.logout">, OperationDef<import("zod").ZodObject<{
|
|
281
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
282
|
+
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
283
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
284
|
+
message: import("zod").ZodString;
|
|
285
|
+
}, import("zod/v4/core").$strip>, "accounts.service.import">, OperationDef<import("zod").ZodObject<{
|
|
286
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
287
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
288
|
+
message: import("zod").ZodString;
|
|
289
|
+
}, import("zod/v4/core").$strip>, "accounts.service.login">, OperationDef<import("zod").ZodObject<{
|
|
290
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
291
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
292
|
+
deleted: import("zod").ZodBoolean;
|
|
293
|
+
message: import("zod").ZodString;
|
|
294
|
+
}, import("zod/v4/core").$strip>, "accounts.service.logout">, OperationDef<import("zod").ZodObject<{
|
|
279
295
|
role: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
280
296
|
view: "view";
|
|
281
297
|
control: "control";
|
|
@@ -475,8 +491,33 @@ export declare const QUERIES: readonly [QueryDef<import("zod").ZodObject<{}, imp
|
|
|
475
491
|
isDefault: import("zod").ZodBoolean;
|
|
476
492
|
isActive: import("zod").ZodBoolean;
|
|
477
493
|
savedAt: import("zod").ZodString;
|
|
494
|
+
kind: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
495
|
+
subscription: "subscription";
|
|
496
|
+
console: "console";
|
|
497
|
+
"api-key": "api-key";
|
|
498
|
+
}>>;
|
|
499
|
+
keyHint: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
478
500
|
}, import("zod/v4/core").$strip>>;
|
|
479
501
|
}, import("zod/v4/core").$strip>>;
|
|
502
|
+
services: import("zod").ZodArray<import("zod").ZodObject<{
|
|
503
|
+
kind: import("zod").ZodString;
|
|
504
|
+
label: import("zod").ZodString;
|
|
505
|
+
share: import("zod").ZodBoolean;
|
|
506
|
+
state: import("zod").ZodEnum<{
|
|
507
|
+
none: "none";
|
|
508
|
+
saved: "saved";
|
|
509
|
+
unreadable: "unreadable";
|
|
510
|
+
}>;
|
|
511
|
+
source: import("zod").ZodNullable<import("zod").ZodString>;
|
|
512
|
+
savedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
513
|
+
summary: import("zod").ZodNullable<import("zod").ZodString>;
|
|
514
|
+
heldBy: import("zod").ZodNullable<import("zod").ZodString>;
|
|
515
|
+
usedBy: import("zod").ZodArray<import("zod").ZodString>;
|
|
516
|
+
warnings: import("zod").ZodArray<import("zod").ZodString>;
|
|
517
|
+
canImport: import("zod").ZodBoolean;
|
|
518
|
+
canLogin: import("zod").ZodBoolean;
|
|
519
|
+
needsFile: import("zod").ZodBoolean;
|
|
520
|
+
}, import("zod/v4/core").$strip>>;
|
|
480
521
|
}, import("zod/v4/core").$strip>, "accounts.list">, QueryDef<import("zod").ZodObject<{
|
|
481
522
|
scope: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
482
523
|
project: "project";
|
|
@@ -898,7 +939,29 @@ export declare const QUERIES: readonly [QueryDef<import("zod").ZodObject<{}, imp
|
|
|
898
939
|
classic: "classic";
|
|
899
940
|
}>>;
|
|
900
941
|
savedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
901
|
-
}, import("zod/v4/core").$strip>, "github.status">, QueryDef<import("zod").ZodObject<{
|
|
942
|
+
}, import("zod/v4/core").$strip>, "github.status">, QueryDef<import("zod").ZodObject<{
|
|
943
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
944
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
945
|
+
services: import("zod").ZodArray<import("zod").ZodObject<{
|
|
946
|
+
kind: import("zod").ZodString;
|
|
947
|
+
label: import("zod").ZodString;
|
|
948
|
+
share: import("zod").ZodBoolean;
|
|
949
|
+
state: import("zod").ZodEnum<{
|
|
950
|
+
none: "none";
|
|
951
|
+
saved: "saved";
|
|
952
|
+
unreadable: "unreadable";
|
|
953
|
+
}>;
|
|
954
|
+
source: import("zod").ZodNullable<import("zod").ZodString>;
|
|
955
|
+
savedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
956
|
+
summary: import("zod").ZodNullable<import("zod").ZodString>;
|
|
957
|
+
heldBy: import("zod").ZodNullable<import("zod").ZodString>;
|
|
958
|
+
usedBy: import("zod").ZodArray<import("zod").ZodString>;
|
|
959
|
+
warnings: import("zod").ZodArray<import("zod").ZodString>;
|
|
960
|
+
canImport: import("zod").ZodBoolean;
|
|
961
|
+
canLogin: import("zod").ZodBoolean;
|
|
962
|
+
needsFile: import("zod").ZodBoolean;
|
|
963
|
+
}, import("zod/v4/core").$strip>>;
|
|
964
|
+
}, import("zod/v4/core").$strip>, "accounts.services">, QueryDef<import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
902
965
|
lan: import("zod").ZodObject<{
|
|
903
966
|
enabled: import("zod").ZodBoolean;
|
|
904
967
|
running: import("zod").ZodBoolean;
|
|
@@ -1104,9 +1167,57 @@ export declare const VIEWS: readonly [import("../kernel/define.js").ViewDef<{
|
|
|
1104
1167
|
isDefault: import("zod").ZodBoolean;
|
|
1105
1168
|
isActive: import("zod").ZodBoolean;
|
|
1106
1169
|
savedAt: import("zod").ZodString;
|
|
1170
|
+
kind: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1171
|
+
subscription: "subscription";
|
|
1172
|
+
console: "console";
|
|
1173
|
+
"api-key": "api-key";
|
|
1174
|
+
}>>;
|
|
1175
|
+
keyHint: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1107
1176
|
}, import("zod/v4/core").$strip>>;
|
|
1108
1177
|
}, import("zod/v4/core").$strip>>;
|
|
1178
|
+
services: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1179
|
+
kind: import("zod").ZodString;
|
|
1180
|
+
label: import("zod").ZodString;
|
|
1181
|
+
share: import("zod").ZodBoolean;
|
|
1182
|
+
state: import("zod").ZodEnum<{
|
|
1183
|
+
none: "none";
|
|
1184
|
+
saved: "saved";
|
|
1185
|
+
unreadable: "unreadable";
|
|
1186
|
+
}>;
|
|
1187
|
+
source: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1188
|
+
savedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1189
|
+
summary: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1190
|
+
heldBy: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1191
|
+
usedBy: import("zod").ZodArray<import("zod").ZodString>;
|
|
1192
|
+
warnings: import("zod").ZodArray<import("zod").ZodString>;
|
|
1193
|
+
canImport: import("zod").ZodBoolean;
|
|
1194
|
+
canLogin: import("zod").ZodBoolean;
|
|
1195
|
+
needsFile: import("zod").ZodBoolean;
|
|
1196
|
+
}, import("zod/v4/core").$strip>>;
|
|
1109
1197
|
}, import("zod/v4/core").$strip>, "accounts.list">;
|
|
1198
|
+
services: QueryDef<import("zod").ZodObject<{
|
|
1199
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1200
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1201
|
+
services: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1202
|
+
kind: import("zod").ZodString;
|
|
1203
|
+
label: import("zod").ZodString;
|
|
1204
|
+
share: import("zod").ZodBoolean;
|
|
1205
|
+
state: import("zod").ZodEnum<{
|
|
1206
|
+
none: "none";
|
|
1207
|
+
saved: "saved";
|
|
1208
|
+
unreadable: "unreadable";
|
|
1209
|
+
}>;
|
|
1210
|
+
source: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1211
|
+
savedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1212
|
+
summary: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1213
|
+
heldBy: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1214
|
+
usedBy: import("zod").ZodArray<import("zod").ZodString>;
|
|
1215
|
+
warnings: import("zod").ZodArray<import("zod").ZodString>;
|
|
1216
|
+
canImport: import("zod").ZodBoolean;
|
|
1217
|
+
canLogin: import("zod").ZodBoolean;
|
|
1218
|
+
needsFile: import("zod").ZodBoolean;
|
|
1219
|
+
}, import("zod/v4/core").$strip>>;
|
|
1220
|
+
}, import("zod/v4/core").$strip>, "accounts.services">;
|
|
1110
1221
|
}, Record<string, never>, "accounts">, import("../kernel/define.js").ViewDef<{
|
|
1111
1222
|
apps: QueryDef<import("zod").ZodObject<{
|
|
1112
1223
|
scope: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { addAgent, agentsView, listAgents, makeDefaultAgent, removeAgent, startAgent } from './agents/agents.def.js';
|
|
2
2
|
import { accountsView, defaultAccount, listAccounts, removeAccount, renameAccount, saveAccount, useAccount, } from './accounts/accounts.def.js';
|
|
3
|
+
import { listServices, serviceImport, serviceLogin, serviceLogout } from './accounts/services.def.js';
|
|
3
4
|
import { appsView, listApps, requestApp, setCustomApps, toggleApp } from './apps/apps.def.js';
|
|
4
5
|
import { browseFolder } from './files/files.def.js';
|
|
5
6
|
import { checkEngine, cleanEngine, engineLeftovers, engineStatus, engineView } from './engine/engine.def.js';
|
|
@@ -67,6 +68,9 @@ export const OPERATIONS = [
|
|
|
67
68
|
vpnLogout,
|
|
68
69
|
githubLogin,
|
|
69
70
|
githubLogout,
|
|
71
|
+
serviceImport,
|
|
72
|
+
serviceLogin,
|
|
73
|
+
serviceLogout,
|
|
70
74
|
allowDevice,
|
|
71
75
|
revokeAccess,
|
|
72
76
|
revokeAllAccess,
|
|
@@ -97,6 +101,7 @@ export const QUERIES = [
|
|
|
97
101
|
webStatus,
|
|
98
102
|
vpnStatus,
|
|
99
103
|
githubStatus,
|
|
104
|
+
listServices,
|
|
100
105
|
accessStatus,
|
|
101
106
|
];
|
|
102
107
|
export const VIEWS = [
|
|
@@ -6,8 +6,8 @@ export const CATEGORIES = [
|
|
|
6
6
|
{
|
|
7
7
|
id: 'general',
|
|
8
8
|
label: 'General',
|
|
9
|
-
description: 'Which agent starts, where the project appears in the sandbox, extra folders from this PC, and where the sandbox keeps its data.',
|
|
10
|
-
keys: ['defaultHarness', 'harness', 'guestWorkspace', 'readOnly', 'mappings', 'scripts'],
|
|
9
|
+
description: 'Which agent starts, where the project appears in the sandbox, extra folders from this PC (and its games, engines and editors, read-only), and where the sandbox keeps its data.',
|
|
10
|
+
keys: ['defaultHarness', 'harness', 'guestWorkspace', 'readOnly', 'mappings', 'pcInstalls', 'scripts'],
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
id: 'machine',
|
|
@@ -42,8 +42,8 @@ export const CATEGORIES = [
|
|
|
42
42
|
{
|
|
43
43
|
id: 'security',
|
|
44
44
|
label: 'Security & privacy',
|
|
45
|
-
description: 'Git-ignored files kept out, secrets kept out of the sandbox, a GitHub token for sandboxes (with its login set here), download checks, what is kept on this PC, and sharing your sandbox with other Windows users.',
|
|
46
|
-
keys: ['workspaceFilter', 'audit', 'secrets', 'github', 'downloads', 'storage', 'sharing'],
|
|
45
|
+
description: 'Git-ignored files kept out, secrets kept out of the sandbox, a GitHub token for sandboxes (with its login set here), which service sign-ins sandboxes get (saved in Accounts), download checks, what is kept on this PC, and sharing your sandbox with other Windows users.',
|
|
46
|
+
keys: ['workspaceFilter', 'audit', 'secrets', 'github', 'accounts', 'downloads', 'storage', 'sharing'],
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
id: 'projects',
|
|
@@ -68,6 +68,23 @@ const NAMES = {
|
|
|
68
68
|
network: 'Network',
|
|
69
69
|
vpn: 'VPN',
|
|
70
70
|
github: 'GitHub',
|
|
71
|
+
accounts: 'Service sign-ins',
|
|
72
|
+
pcInstalls: 'Installs on this PC',
|
|
73
|
+
unreal: 'Unreal Engine',
|
|
74
|
+
unity: 'Unity',
|
|
75
|
+
godot: 'Godot',
|
|
76
|
+
steam: 'Steam (SteamCMD)',
|
|
77
|
+
fivem: 'FiveM / RedM server',
|
|
78
|
+
android: 'Android SDK',
|
|
79
|
+
flutter: 'Flutter',
|
|
80
|
+
dart: 'Dart',
|
|
81
|
+
reactNative: 'React Native / Expo',
|
|
82
|
+
epic: 'Epic Games',
|
|
83
|
+
cfx: 'Cfx.re',
|
|
84
|
+
keystore: 'Android upload keystore',
|
|
85
|
+
play: 'Google Play',
|
|
86
|
+
expo: 'Expo (EAS)',
|
|
87
|
+
appstore: 'App Store Connect',
|
|
71
88
|
hooks: 'Hooks',
|
|
72
89
|
personalization: 'Desktop look',
|
|
73
90
|
projects: 'Projects',
|
package/dist/app/registry.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fail } from '../core/util/errors.js';
|
|
2
2
|
import { accessNeeded, allows, invoke, OWNER, refusalText, NO_QUESTIONS, onSurface, } from './kernel/index.js';
|
|
3
3
|
import { addAgentRun, listAgentsRun, makeDefaultAgentRun, removeAgentRun, startAgentRun, } from './features/agents/index.js';
|
|
4
|
-
import { defaultAccountRun, listAccountsRun, removeAccountRun, renameAccountRun, saveAccountRun, useAccountRun, } from './features/accounts/index.js';
|
|
4
|
+
import { defaultAccountRun, listAccountsRun, removeAccountRun, renameAccountRun, saveAccountRun, useAccountRun, listServicesRun, serviceImportRun, serviceLoginRun, serviceLogoutRun, } from './features/accounts/index.js';
|
|
5
5
|
import { listAppsRun, requestAppRun, setCustomAppsRun, toggleAppRun } from './features/apps/index.js';
|
|
6
6
|
import { browseFolderRun } from './features/files/index.js';
|
|
7
7
|
import { cleanDataRun, pruneStorageRun, showDataRun } from './features/data/index.js';
|
|
@@ -91,6 +91,10 @@ export const IMPLEMENTATIONS = [
|
|
|
91
91
|
githubStatusRun,
|
|
92
92
|
githubLoginRun,
|
|
93
93
|
githubLogoutRun,
|
|
94
|
+
listServicesRun,
|
|
95
|
+
serviceImportRun,
|
|
96
|
+
serviceLoginRun,
|
|
97
|
+
serviceLogoutRun,
|
|
94
98
|
webStatusRun,
|
|
95
99
|
accessStatusRun,
|
|
96
100
|
allowDeviceRun,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
run
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-BKF43GJ3.js";
|
|
6
|
+
import "./chunk-YD3A67RS.js";
|
|
7
7
|
|
|
8
8
|
// src/bin/agent-sandbox.ts
|
|
9
9
|
run(process.argv.slice(2));
|