windows-development-sandbox 1.25.1 → 1.27.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/config.example.json +12 -3
- package/dist/app/features/accounts/services.def.d.ts +1 -1
- package/dist/app/features/accounts/services.def.js +1 -1
- package/dist/app/features/defs.d.ts +198 -3
- package/dist/app/features/defs.js +8 -0
- package/dist/app/features/settings/categories.def.js +1 -0
- package/dist/app/features/unity/index.d.ts +2 -0
- package/dist/app/features/unity/index.js +3 -0
- package/dist/app/features/unity/unity.def.d.ts +294 -0
- package/dist/app/features/unity/unity.def.js +471 -0
- package/dist/app/features/unity/unity.run.d.ts +142 -0
- package/dist/app/features/unity/unity.run.js +363 -0
- package/dist/app/registry.js +6 -0
- package/dist/bin/agent-sandbox.js +2 -2
- package/dist/bin/{chunk-F4PVBN23.js → chunk-6WWMBCT2.js} +3580 -1962
- package/dist/bin/{chunk-3GAXLATK.js → chunk-JXL6ZOO3.js} +72 -5
- package/dist/bin/{chunk-G3TG4ZT7.js → chunk-ZXCAVVS4.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 +12 -0
- package/dist/cli/commands/registry.js +3 -0
- package/dist/cli/manifest.d.ts +33 -1
- package/dist/cli/manifest.js +32 -1
- package/dist/cli/menu/coverage-exempt.js +1 -0
- package/dist/cli/menu/pages/sandbox-page.d.ts +3 -0
- package/dist/cli/menu/pages/sandbox-page.js +40 -3
- package/dist/cli/menu/views.js +2 -0
- package/dist/core/config/defaults.js +16 -3
- package/dist/core/schema/accounts.d.ts +3 -0
- package/dist/core/schema/accounts.js +1 -0
- package/dist/core/schema/config.d.ts +29 -13
- package/dist/core/schema/github.d.ts +1 -0
- package/dist/core/schema/github.js +3 -0
- package/dist/core/schema/pc-installs.d.ts +2 -1
- package/dist/core/schema/pc-installs.js +6 -1
- package/dist/core/schema/toolchains.d.ts +8 -0
- package/dist/core/schema/toolchains.js +19 -4
- package/dist/guest/accounts/adapters.js +2 -0
- package/dist/guest/accounts/apply.d.ts +4 -2
- package/dist/guest/accounts/kinds/perplexityapp.d.ts +7 -0
- package/dist/guest/accounts/kinds/perplexityapp.js +53 -0
- package/dist/guest/accounts/kinds/unity.d.ts +27 -0
- package/dist/guest/accounts/kinds/unity.js +164 -7
- package/dist/guest/apps/app-installer.js +18 -0
- package/dist/guest/apps/store-app.d.ts +4 -0
- package/dist/guest/apps/store-app.js +19 -0
- package/dist/guest/apps/store-check.d.ts +8 -0
- package/dist/guest/apps/store-check.js +33 -0
- package/dist/guest/boot/boot.js +1 -1
- package/dist/guest/boot/guide.js +18 -0
- package/dist/guest/browser/comet.d.ts +3 -1
- package/dist/guest/browser/comet.js +1 -1
- package/dist/guest/browser/perplexity-app.d.ts +12 -0
- package/dist/guest/browser/perplexity-app.js +60 -0
- package/dist/guest/daemon/daemon.js +2 -0
- package/dist/guest/devtools/devtool.d.ts +1 -1
- package/dist/guest/devtools/registry.js +1 -2
- package/dist/guest/entries/tool.js +1 -1
- package/dist/guest/setup/addon-mcp.d.ts +7 -2
- package/dist/guest/setup/addon-mcp.js +19 -9
- package/dist/guest/setup/github-token.js +4 -4
- package/dist/guest/setup/unity-agent.d.ts +11 -0
- package/dist/guest/setup/unity-agent.js +36 -0
- package/dist/guest/toolchains/engines/unity-cli.d.ts +24 -0
- package/dist/guest/toolchains/engines/unity-cli.js +74 -0
- package/dist/guest/toolchains/engines/unity-hub.d.ts +2 -0
- package/dist/guest/toolchains/engines/unity-hub.js +27 -0
- package/dist/guest/toolchains/engines/unity-release.d.ts +4 -15
- package/dist/guest/toolchains/engines/unity-release.js +17 -5
- package/dist/guest/toolchains/engines/unity-status.d.ts +11 -0
- package/dist/guest/toolchains/engines/unity-status.js +39 -0
- package/dist/guest/toolchains/engines/unity.d.ts +20 -1
- package/dist/guest/toolchains/engines/unity.js +250 -3
- package/dist/guest/toolchains/plan.js +5 -1
- package/dist/guest/toolchains/tools/cli.js +2 -2
- package/dist/host/accounts/deliver.js +4 -0
- package/dist/host/accounts/kinds/perplexityapp.d.ts +2 -0
- package/dist/host/accounts/kinds/perplexityapp.js +8 -0
- package/dist/host/accounts/kinds/unity.d.ts +1 -1
- package/dist/host/accounts/kinds/unity.js +60 -8
- package/dist/host/accounts/leases.d.ts +2 -1
- package/dist/host/accounts/sources.js +2 -0
- package/dist/host/apps/index.d.ts +1 -0
- package/dist/host/apps/index.js +2 -0
- package/dist/host/apps/store-package.d.ts +51 -0
- package/dist/host/apps/store-package.js +209 -0
- package/dist/host/github/deliver.d.ts +8 -3
- package/dist/host/github/deliver.js +42 -29
- package/dist/host/github/index.d.ts +1 -0
- package/dist/host/github/index.js +1 -0
- package/dist/host/github/pc-login.d.ts +27 -0
- package/dist/host/github/pc-login.js +129 -0
- package/dist/host/pc-installs/discover.d.ts +4 -0
- package/dist/host/pc-installs/discover.js +16 -4
- package/dist/host/pc-installs/source.d.ts +1 -1
- package/dist/host/pc-installs/unity-assets.d.ts +5 -0
- package/dist/host/pc-installs/unity-assets.js +18 -0
- package/dist/host/pc-installs/unity.d.ts +20 -0
- package/dist/host/pc-installs/unity.js +135 -2
- package/dist/runtime/agent.js +116 -11
- package/dist/runtime/daemon.js +2170 -976
- package/dist/runtime/db.js +116 -11
- package/dist/runtime/main.js +2543 -1364
- package/dist/runtime/netproxy.js +116 -11
- package/dist/runtime/tool.js +133 -31
- package/dist/runtime/view.js +116 -11
- package/dist/selftest/agents-web.test.js +2 -1
- package/dist/selftest/engines.test.js +2 -2
- package/dist/selftest/github.test.js +64 -1
- package/dist/selftest/index.js +10 -0
- package/dist/selftest/menu-screens.js +3 -1
- package/dist/selftest/persisted-installs.test.js +1 -1
- package/dist/selftest/service-accounts.test.js +1 -1
- package/dist/selftest/store-app.test.d.ts +2 -0
- package/dist/selftest/store-app.test.js +162 -0
- package/dist/selftest/support/engine-golden.js +7 -0
- package/dist/selftest/support/fixtures.d.ts +10 -1
- package/dist/selftest/support/unity-sample.d.ts +2 -0
- package/dist/selftest/support/unity-sample.js +80 -0
- package/dist/selftest/unity-accounts.test.d.ts +2 -0
- package/dist/selftest/unity-accounts.test.js +106 -0
- package/dist/selftest/unity-agent.test.d.ts +2 -0
- package/dist/selftest/unity-agent.test.js +47 -0
- package/dist/selftest/unity-page.test.d.ts +2 -0
- package/dist/selftest/unity-page.test.js +177 -0
- package/dist/selftest/unity-setup.test.d.ts +2 -0
- package/dist/selftest/unity-setup.test.js +49 -0
- package/dist/selftest/unity.test.js +238 -3
- package/dist/shared/accounts/index.d.ts +1 -0
- package/dist/shared/accounts/index.js +1 -0
- package/dist/shared/accounts/kinds/unity.d.ts +28 -0
- package/dist/shared/accounts/kinds/unity.js +88 -0
- package/dist/shared/accounts/kinds.d.ts +2 -2
- package/dist/shared/accounts/kinds.js +23 -1
- package/dist/shared/accounts/payloads.d.ts +52 -0
- package/dist/shared/accounts/payloads.js +14 -2
- package/dist/shared/apps/catalogue-agents-web.d.ts +7 -0
- package/dist/shared/apps/catalogue-agents-web.js +23 -0
- package/dist/shared/apps/catalogue-gamedev.d.ts +3 -0
- package/dist/shared/apps/catalogue-gamedev.js +31 -0
- package/dist/shared/apps/catalogue.d.ts +8 -0
- package/dist/shared/apps/index.d.ts +3 -2
- package/dist/shared/apps/index.js +3 -2
- package/dist/shared/apps/selection.d.ts +6 -0
- package/dist/shared/apps/selection.js +9 -0
- package/dist/shared/apps/store-package.d.ts +31 -0
- package/dist/shared/apps/store-package.js +34 -0
- package/dist/shared/channel/schema.d.ts +24 -0
- package/dist/shared/channel/secrets.d.ts +17 -0
- package/dist/shared/paths/pc-installs.d.ts +1 -1
- package/dist/shared/paths/pc-installs.js +1 -0
- package/dist/shared/readiness.d.ts +2 -2
- package/dist/shared/readiness.js +2 -2
- package/dist/shared/unity/asset-cache.d.ts +20 -0
- package/dist/shared/unity/asset-cache.js +44 -0
- package/dist/shared/unity/cli.d.ts +40 -0
- package/dist/shared/unity/cli.js +77 -0
- package/dist/shared/unity/editors.d.ts +46 -0
- package/dist/shared/unity/editors.js +89 -0
- package/dist/shared/unity/guide.d.ts +9 -0
- package/dist/shared/unity/guide.js +84 -0
- package/dist/shared/unity/index.d.ts +9 -0
- package/dist/shared/unity/index.js +11 -0
- package/dist/shared/unity/manifest.d.ts +10 -0
- package/dist/shared/unity/manifest.js +53 -0
- package/dist/shared/unity/mcp.d.ts +8 -0
- package/dist/shared/unity/mcp.js +12 -0
- package/dist/shared/unity/release.d.ts +28 -0
- package/dist/shared/unity/release.js +83 -0
- package/dist/shared/unity/status.d.ts +59 -0
- package/dist/shared/unity/status.js +45 -0
- package/dist/shared/unity/version.d.ts +27 -0
- package/dist/shared/unity/version.js +75 -0
- package/dist/web/index.html +1 -1
- package/dist/web/{main-FNE6XEHA.js → main-VPMYTSUL.js} +67 -67
- 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/native/scripts/get-store-package.ps1 +58 -0
- package/package.json +1 -1
- package/sandbox/addons/openupm-cli/package-lock.json +2921 -0
- package/sandbox/addons/openupm-cli/package.json +7 -0
- package/sandbox/addons/unity-mcp/requirements.in +1 -0
- package/sandbox/addons/unity-mcp/requirements.txt +1165 -0
- package/sandbox/csharp/AppActivation.cs +38 -0
- package/sandbox/scripts/install-store-package.ps1 +28 -0
- package/sandbox/scripts/start-store-app.ps1 +29 -0
- package/schemas/config.schema.json +61 -6
- package/schemas/sandbox-config.schema.json +38 -5
- package/dist/guest/devtools/unity.d.ts +0 -2
- package/dist/guest/devtools/unity.js +0 -7
|
@@ -15,6 +15,13 @@ export const COMET_SIGNER = {
|
|
|
15
15
|
subject: ['(^|, )CN="?PERPLEXITY AI, INC\\.?"?(,|$)', '(^|, )O="?PERPLEXITY AI, INC\\.?"?(,|$)'],
|
|
16
16
|
issuer: ['^CN=GlobalSign GCC R45 EV CodeSigning CA 2020(,|$)'],
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* The Perplexity desktop app is Store-only (its old installer is gone): product 9P9XG917PWCJ, an MSIX of about 300 MB.
|
|
20
|
+
* The package is fetched on this PC with your own Store tooling and installed in the sandbox with Add-AppxPackage.
|
|
21
|
+
*/
|
|
22
|
+
export const PERPLEXITY_DESKTOP_PRODUCT_ID = '9P9XG917PWCJ';
|
|
23
|
+
export const PERPLEXITY_DESKTOP_PACKAGE = 'PerplexityAI.PerplexityApp';
|
|
24
|
+
export const PERPLEXITY_DESKTOP_FAMILY = 'PerplexityAI.PerplexityApp_3jh4kjrg4dzr2';
|
|
18
25
|
/** Microsoft Edge, already in every sandbox: the browser Chrome DevTools MCP starts. */
|
|
19
26
|
const EDGE_EXE = 'C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe';
|
|
20
27
|
export const AGENTS_WEB_APPS = [
|
|
@@ -62,6 +69,22 @@ export const AGENTS_WEB_APPS = [
|
|
|
62
69
|
signer: COMET_SIGNER,
|
|
63
70
|
userOnly: true,
|
|
64
71
|
},
|
|
72
|
+
{
|
|
73
|
+
id: 'perplexity-desktop',
|
|
74
|
+
name: 'Perplexity (desktop app)',
|
|
75
|
+
category: 'agents',
|
|
76
|
+
about: "Perplexity's desktop app, with Perplexity Computer, from the Microsoft Store. The package comes from this PC (winget with your own Microsoft Store access) and is kept on the data disk; the sandbox installs it on every boot. With accounts.perplexityapp.share on, your sign-in made in a sandbox is kept for the next ones (it cannot be copied from this PC). It acts on what it reads: use it only on what you would let it act on.",
|
|
77
|
+
size: '300 MB',
|
|
78
|
+
source: {
|
|
79
|
+
store: {
|
|
80
|
+
productId: PERPLEXITY_DESKTOP_PRODUCT_ID,
|
|
81
|
+
packageName: PERPLEXITY_DESKTOP_PACKAGE,
|
|
82
|
+
family: PERPLEXITY_DESKTOP_FAMILY,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
exe: '',
|
|
86
|
+
userOnly: true,
|
|
87
|
+
},
|
|
65
88
|
{
|
|
66
89
|
id: 'comet-mcp',
|
|
67
90
|
name: 'Comet MCP',
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import type { AppEntry } from './catalogue.js';
|
|
2
|
+
/** Pinned packages, installed from the lock files in sandbox\addons\<id> (renewing them: docs/toolchains.md). */
|
|
3
|
+
export declare const UNITY_MCP_VERSION = "10.3.0";
|
|
4
|
+
export declare const OPENUPM_CLI_VERSION = "4.5.3";
|
|
2
5
|
export declare const GAMEDEV_APPS: readonly AppEntry[];
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/** Pinned packages, installed from the lock files in sandbox\addons\<id> (renewing them: docs/toolchains.md). */
|
|
2
|
+
export const UNITY_MCP_VERSION = '10.3.0';
|
|
3
|
+
export const OPENUPM_CLI_VERSION = '4.5.3';
|
|
1
4
|
export const GAMEDEV_APPS = [
|
|
2
5
|
{
|
|
3
6
|
id: 'krita',
|
|
@@ -68,4 +71,32 @@ export const GAMEDEV_APPS = [
|
|
|
68
71
|
source: { github: 'nomacs/nomacs', asset: '^nomacs-portable-win\\.zip$' },
|
|
69
72
|
exe: 'nomacs.exe',
|
|
70
73
|
},
|
|
74
|
+
{
|
|
75
|
+
id: 'unity-mcp',
|
|
76
|
+
name: 'MCP for Unity',
|
|
77
|
+
category: 'agents',
|
|
78
|
+
about: 'Lets Claude Code and Codex work in an open Unity editor (CoplayDev/unity-mcp 10.3.0, MIT; Unity 2021.3 to 6.x). Your project needs its package (Unity page: Add the editor bridge). Telemetry is off.',
|
|
79
|
+
size: '60 MB',
|
|
80
|
+
source: { locked: 'uv', package: 'mcpforunityserver', version: UNITY_MCP_VERSION },
|
|
81
|
+
exe: 'mcp-for-unity.exe',
|
|
82
|
+
service: true,
|
|
83
|
+
mcp: {
|
|
84
|
+
name: 'sbx-unity-mcp',
|
|
85
|
+
program: true,
|
|
86
|
+
args: ['--transport', 'stdio'],
|
|
87
|
+
env: { DISABLE_TELEMETRY: '1', UNITY_MCP_DISABLE_TELEMETRY: '1', MCP_DISABLE_TELEMETRY: '1' },
|
|
88
|
+
codex: true,
|
|
89
|
+
},
|
|
90
|
+
plugsInto: 'Claude Code and Codex as the MCP server sbx-unity-mcp',
|
|
91
|
+
userOnly: true,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: 'openupm-cli',
|
|
95
|
+
name: 'openupm-cli',
|
|
96
|
+
category: 'gamedev',
|
|
97
|
+
about: 'Adds OpenUPM packages to Unity projects from the command line (openupm 4.5.3, BSD-3-Clause).',
|
|
98
|
+
size: '15 MB',
|
|
99
|
+
source: { locked: 'npm', package: 'openupm-cli', version: OPENUPM_CLI_VERSION },
|
|
100
|
+
exe: 'openupm.cmd',
|
|
101
|
+
},
|
|
71
102
|
];
|
|
@@ -28,6 +28,14 @@ export type AppSource = {
|
|
|
28
28
|
/** Nothing to download: a remote MCP server (AddonMcp.url). */
|
|
29
29
|
| {
|
|
30
30
|
remote: true;
|
|
31
|
+
}
|
|
32
|
+
/** A Microsoft Store app: this PC fetches the package with its own Store tooling; the sandbox installs it. */
|
|
33
|
+
| {
|
|
34
|
+
store: {
|
|
35
|
+
productId: string;
|
|
36
|
+
packageName: string;
|
|
37
|
+
family: string;
|
|
38
|
+
};
|
|
31
39
|
};
|
|
32
40
|
/**
|
|
33
41
|
* An MCP server an add-on adds to the sandbox's Claude Code (and Codex, with `codex`): `node <its folder>\<script>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { type AddonMcp, type AppCategory, APP_CATEGORIES, type AppSource, type AppEntry, APPS, appById, CCUSAGE_VERSION, CONTEXT7_MCP_VERSION, HEADROOM_VERSION, PLAYWRIGHT_MCP_VERSION, RTK_VERSION, } from './catalogue.js';
|
|
2
2
|
export { ASSOCIATIONS, associationPlan } from './associations.js';
|
|
3
3
|
export { previewGuideLine } from './preview.js';
|
|
4
|
-
export { exeMatcher, appsToInstall, appsNeedMesa, appsNeedUv } from './selection.js';
|
|
4
|
+
export { exeMatcher, appsToInstall, appsNeedMesa, appsNeedUv, storeApps } from './selection.js';
|
|
5
5
|
export { signerMatches, type AppSigner, type Signature } from '../signer.js';
|
|
6
|
-
export { AGENTS_WEB_APPS, BROWSER_USE_VERSION, CHROME_DEVTOOLS_MCP_VERSION, COMET_DOWNLOAD_URL, COMET_MCP_VERSION, COMET_SIGNER, PERPLEXITY_COMPUTER_MCP_URL, PERPLEXITY_MCP_VERSION, } from './catalogue-agents-web.js';
|
|
6
|
+
export { AGENTS_WEB_APPS, BROWSER_USE_VERSION, CHROME_DEVTOOLS_MCP_VERSION, COMET_DOWNLOAD_URL, PERPLEXITY_DESKTOP_FAMILY, PERPLEXITY_DESKTOP_PACKAGE, PERPLEXITY_DESKTOP_PRODUCT_ID, COMET_MCP_VERSION, COMET_SIGNER, PERPLEXITY_COMPUTER_MCP_URL, PERPLEXITY_MCP_VERSION, } from './catalogue-agents-web.js';
|
|
7
7
|
export { ADDON_MCP_PREFIX, addonGuideLine, addonMcpServer, type AddonPlace, claudeManagedSettings, codexWithAddonMcpServers, type CodexMcpServer, HEADROOM_ENV, HEADROOM_PORT, HEADROOM_UPSTREAM, headroomArgs, headroomEnv, headroomGuideLine, headroomUrl, type ManagedSettings, type McpServerConfig, rtkHookCommand, RTK_GUIDE_LINE, withAddonMcpServers, } from './agent-addons.js';
|
|
8
|
+
export { isStorePackageFile, STORE_PACKAGE_MANIFEST, StorePackageFileSchema, StorePackageManifestSchema, storePackageRole, type StorePackageFile, type StorePackageManifest, } from './store-package.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { APP_CATEGORIES, APPS, appById, CCUSAGE_VERSION, CONTEXT7_MCP_VERSION, HEADROOM_VERSION, PLAYWRIGHT_MCP_VERSION, RTK_VERSION, } from './catalogue.js';
|
|
2
2
|
export { ASSOCIATIONS, associationPlan } from './associations.js';
|
|
3
3
|
export { previewGuideLine } from './preview.js';
|
|
4
|
-
export { exeMatcher, appsToInstall, appsNeedMesa, appsNeedUv } from './selection.js';
|
|
4
|
+
export { exeMatcher, appsToInstall, appsNeedMesa, appsNeedUv, storeApps } from './selection.js';
|
|
5
5
|
export { signerMatches } from '../signer.js';
|
|
6
|
-
export { AGENTS_WEB_APPS, BROWSER_USE_VERSION, CHROME_DEVTOOLS_MCP_VERSION, COMET_DOWNLOAD_URL, COMET_MCP_VERSION, COMET_SIGNER, PERPLEXITY_COMPUTER_MCP_URL, PERPLEXITY_MCP_VERSION, } from './catalogue-agents-web.js';
|
|
6
|
+
export { AGENTS_WEB_APPS, BROWSER_USE_VERSION, CHROME_DEVTOOLS_MCP_VERSION, COMET_DOWNLOAD_URL, PERPLEXITY_DESKTOP_FAMILY, PERPLEXITY_DESKTOP_PACKAGE, PERPLEXITY_DESKTOP_PRODUCT_ID, COMET_MCP_VERSION, COMET_SIGNER, PERPLEXITY_COMPUTER_MCP_URL, PERPLEXITY_MCP_VERSION, } from './catalogue-agents-web.js';
|
|
7
7
|
export { ADDON_MCP_PREFIX, addonGuideLine, addonMcpServer, claudeManagedSettings, codexWithAddonMcpServers, HEADROOM_ENV, HEADROOM_PORT, HEADROOM_UPSTREAM, headroomArgs, headroomEnv, headroomGuideLine, headroomUrl, rtkHookCommand, RTK_GUIDE_LINE, withAddonMcpServers, } from './agent-addons.js';
|
|
8
|
+
export { isStorePackageFile, STORE_PACKAGE_MANIFEST, StorePackageFileSchema, StorePackageManifestSchema, storePackageRole, } from './store-package.js';
|
|
@@ -11,3 +11,9 @@ export declare function appsToInstall(apps: Config['apps'], gitAccess: GitAccess
|
|
|
11
11
|
export declare function appsNeedUv(apps: Config['apps'] | undefined): boolean;
|
|
12
12
|
/** Does any chosen app draw with OpenGL (so the Mesa step must run first)? */
|
|
13
13
|
export declare function appsNeedMesa(apps: Config['apps'] | undefined): boolean;
|
|
14
|
+
/** The chosen apps that come from the Microsoft Store: what this PC has to fetch for them. */
|
|
15
|
+
export declare function storeApps(install: readonly string[]): {
|
|
16
|
+
id: string;
|
|
17
|
+
productId: string;
|
|
18
|
+
packageName: string;
|
|
19
|
+
}[];
|
|
@@ -47,3 +47,12 @@ export function appsNeedUv(apps) {
|
|
|
47
47
|
export function appsNeedMesa(apps) {
|
|
48
48
|
return Boolean(apps?.install.some((id) => appById(id)?.needs?.includes('mesa')));
|
|
49
49
|
}
|
|
50
|
+
/** The chosen apps that come from the Microsoft Store: what this PC has to fetch for them. */
|
|
51
|
+
export function storeApps(install) {
|
|
52
|
+
return install.flatMap((id) => {
|
|
53
|
+
const source = appById(id)?.source;
|
|
54
|
+
return source !== undefined && 'store' in source
|
|
55
|
+
? [{ id, productId: source.store.productId, packageName: source.store.packageName }]
|
|
56
|
+
: [];
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const StorePackageFileSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
role: z.ZodEnum<{
|
|
5
|
+
main: "main";
|
|
6
|
+
dependency: "dependency";
|
|
7
|
+
}>;
|
|
8
|
+
sha256: z.ZodString;
|
|
9
|
+
bytes: z.ZodNumber;
|
|
10
|
+
}, z.core.$strict>;
|
|
11
|
+
export type StorePackageFile = z.output<typeof StorePackageFileSchema>;
|
|
12
|
+
/** store-package.json: next to the package files, on this PC's cache and in the sandbox's data folder. */
|
|
13
|
+
export declare const StorePackageManifestSchema: z.ZodObject<{
|
|
14
|
+
productId: z.ZodString;
|
|
15
|
+
fetchedAt: z.ZodString;
|
|
16
|
+
files: z.ZodArray<z.ZodObject<{
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
role: z.ZodEnum<{
|
|
19
|
+
main: "main";
|
|
20
|
+
dependency: "dependency";
|
|
21
|
+
}>;
|
|
22
|
+
sha256: z.ZodString;
|
|
23
|
+
bytes: z.ZodNumber;
|
|
24
|
+
}, z.core.$strict>>;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
export type StorePackageManifest = z.output<typeof StorePackageManifestSchema>;
|
|
27
|
+
export declare const STORE_PACKAGE_MANIFEST = "store-package.json";
|
|
28
|
+
/** Whether a file name is a package file this feature handles. */
|
|
29
|
+
export declare function isStorePackageFile(name: string): boolean;
|
|
30
|
+
/** The app itself (named <package name>_<version>_...), as opposed to a framework it depends on (VCLibs ...). */
|
|
31
|
+
export declare function storePackageRole(fileName: string, packageName: string): 'main' | 'dependency';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// A Microsoft Store app handed to the sandbox as package files (.msix and its dependencies). The PC fetches them with
|
|
2
|
+
// its own Store tooling (host/apps/store-package.ts) and the sandbox installs them with Add-AppxPackage.
|
|
3
|
+
// Pure, web-safe: the shape of the manifest that travels with the files, and which file is the app itself.
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
const GB = 1024 * 1024 * 1024;
|
|
6
|
+
const FILE_NAME = /^[A-Za-z0-9._~+-]{1,200}\.(msix|appx|msixbundle|appxbundle)$/i;
|
|
7
|
+
export const StorePackageFileSchema = z.strictObject({
|
|
8
|
+
name: z.string().regex(FILE_NAME),
|
|
9
|
+
role: z.enum(['main', 'dependency']),
|
|
10
|
+
sha256: z.string().regex(/^[0-9a-f]{64}$/),
|
|
11
|
+
bytes: z
|
|
12
|
+
.number()
|
|
13
|
+
.int()
|
|
14
|
+
.positive()
|
|
15
|
+
.max(2 * GB),
|
|
16
|
+
});
|
|
17
|
+
/** store-package.json: next to the package files, on this PC's cache and in the sandbox's data folder. */
|
|
18
|
+
export const StorePackageManifestSchema = z
|
|
19
|
+
.strictObject({
|
|
20
|
+
productId: z.string().regex(/^[A-Z0-9]{12}$/),
|
|
21
|
+
fetchedAt: z.string().max(40),
|
|
22
|
+
files: z.array(StorePackageFileSchema).min(1).max(24),
|
|
23
|
+
})
|
|
24
|
+
.refine((m) => m.files.filter((f) => f.role === 'main').length === 1, 'exactly one file must be the app itself')
|
|
25
|
+
.refine((m) => new Set(m.files.map((f) => f.name.toLowerCase())).size === m.files.length, 'file names repeat');
|
|
26
|
+
export const STORE_PACKAGE_MANIFEST = 'store-package.json';
|
|
27
|
+
/** Whether a file name is a package file this feature handles. */
|
|
28
|
+
export function isStorePackageFile(name) {
|
|
29
|
+
return FILE_NAME.test(name);
|
|
30
|
+
}
|
|
31
|
+
/** The app itself (named <package name>_<version>_...), as opposed to a framework it depends on (VCLibs ...). */
|
|
32
|
+
export function storePackageRole(fileName, packageName) {
|
|
33
|
+
return fileName.toLowerCase().startsWith(packageName.toLowerCase() + '_') ? 'main' : 'dependency';
|
|
34
|
+
}
|
|
@@ -126,6 +126,14 @@ export declare const ProjectSpecSchema: z.ZodObject<{
|
|
|
126
126
|
modules: z.ZodArray<z.ZodString>;
|
|
127
127
|
hub: z.ZodBoolean;
|
|
128
128
|
keepVersions: z.ZodNumber;
|
|
129
|
+
mcp: z.ZodBoolean;
|
|
130
|
+
agentSkills: z.ZodBoolean;
|
|
131
|
+
cliVersion: z.ZodString;
|
|
132
|
+
assetCache: z.ZodEnum<{
|
|
133
|
+
pc: "pc";
|
|
134
|
+
persisted: "persisted";
|
|
135
|
+
local: "local";
|
|
136
|
+
}>;
|
|
129
137
|
}, z.core.$strict>;
|
|
130
138
|
godot: z.ZodObject<{
|
|
131
139
|
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
@@ -362,6 +370,14 @@ export declare const GuestRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
362
370
|
modules: z.ZodArray<z.ZodString>;
|
|
363
371
|
hub: z.ZodBoolean;
|
|
364
372
|
keepVersions: z.ZodNumber;
|
|
373
|
+
mcp: z.ZodBoolean;
|
|
374
|
+
agentSkills: z.ZodBoolean;
|
|
375
|
+
cliVersion: z.ZodString;
|
|
376
|
+
assetCache: z.ZodEnum<{
|
|
377
|
+
pc: "pc";
|
|
378
|
+
persisted: "persisted";
|
|
379
|
+
local: "local";
|
|
380
|
+
}>;
|
|
365
381
|
}, z.core.$strict>;
|
|
366
382
|
godot: z.ZodObject<{
|
|
367
383
|
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
@@ -618,6 +634,14 @@ export declare const GuestRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
618
634
|
modules: z.ZodArray<z.ZodString>;
|
|
619
635
|
hub: z.ZodBoolean;
|
|
620
636
|
keepVersions: z.ZodNumber;
|
|
637
|
+
mcp: z.ZodBoolean;
|
|
638
|
+
agentSkills: z.ZodBoolean;
|
|
639
|
+
cliVersion: z.ZodString;
|
|
640
|
+
assetCache: z.ZodEnum<{
|
|
641
|
+
pc: "pc";
|
|
642
|
+
persisted: "persisted";
|
|
643
|
+
local: "local";
|
|
644
|
+
}>;
|
|
621
645
|
}, z.core.$strict>;
|
|
622
646
|
godot: z.ZodObject<{
|
|
623
647
|
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
@@ -25,6 +25,7 @@ export declare const SecretsFileSchema: z.ZodObject<{
|
|
|
25
25
|
}, z.core.$strict>>;
|
|
26
26
|
unity: z.ZodOptional<z.ZodObject<{
|
|
27
27
|
ulf: z.ZodOptional<z.ZodString>;
|
|
28
|
+
entitlement: z.ZodOptional<z.ZodString>;
|
|
28
29
|
email: z.ZodOptional<z.ZodString>;
|
|
29
30
|
password: z.ZodOptional<z.ZodString>;
|
|
30
31
|
serial: z.ZodOptional<z.ZodString>;
|
|
@@ -70,6 +71,22 @@ export declare const SecretsFileSchema: z.ZodObject<{
|
|
|
70
71
|
}>>;
|
|
71
72
|
}, z.core.$strict>>;
|
|
72
73
|
}, z.core.$strict>>;
|
|
74
|
+
perplexityapp: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
cookies: z.ZodArray<z.ZodObject<{
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
value: z.ZodString;
|
|
78
|
+
domain: z.ZodString;
|
|
79
|
+
path: z.ZodString;
|
|
80
|
+
expires: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
secure: z.ZodBoolean;
|
|
82
|
+
httpOnly: z.ZodBoolean;
|
|
83
|
+
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
84
|
+
Strict: "Strict";
|
|
85
|
+
Lax: "Lax";
|
|
86
|
+
None: "None";
|
|
87
|
+
}>>;
|
|
88
|
+
}, z.core.$strict>>;
|
|
89
|
+
}, z.core.$strict>>;
|
|
73
90
|
}, z.core.$strict>>;
|
|
74
91
|
liveFoldersKey: z.ZodOptional<z.ZodString>;
|
|
75
92
|
}, z.core.$strict>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Where this PC's installs appear in the sandbox (reserved: RESERVED_GUEST). */
|
|
2
2
|
export declare const PC_INSTALLS_GUEST = "C:\\PcInstalls";
|
|
3
|
-
export type PcInstallKind = 'steam-game' | 'steam-library' | 'epic-game' | 'unreal' | 'unreal-vault' | 'unity';
|
|
3
|
+
export type PcInstallKind = 'steam-game' | 'steam-library' | 'epic-game' | 'unreal' | 'unreal-vault' | 'unity' | 'unity-assets';
|
|
4
4
|
export interface PcInstall {
|
|
5
5
|
readonly kind: PcInstallKind;
|
|
6
6
|
/** The Steam app ID or library (library1), the Epic app name, the engine (UE_5.4) or editor version. */
|
|
@@ -11,6 +11,7 @@ const AREA = {
|
|
|
11
11
|
unreal: 'unreal',
|
|
12
12
|
'unreal-vault': 'unreal',
|
|
13
13
|
unity: 'unity',
|
|
14
|
+
'unity-assets': 'unity',
|
|
14
15
|
};
|
|
15
16
|
/** The guest folder of one install: C:\PcInstalls\steam\<appid>, \epic\<AppName>, \unreal\UE_5.4, \unity\<ver>. */
|
|
16
17
|
export function pcInstallGuest(kind, id) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const NOT_READY: {
|
|
2
2
|
/** Toolchains whose step is a stub: their settings rows are hidden and "auto" never turns them on. */
|
|
3
|
-
readonly toolchains: readonly ["
|
|
3
|
+
readonly toolchains: readonly ["godot", "android", "flutter", "dart", "reactNative"];
|
|
4
4
|
/** Service sign-ins whose host or guest side is a stub: the menu and the web do not list them. */
|
|
5
|
-
readonly kinds: readonly ["
|
|
5
|
+
readonly kinds: readonly ["keystore", "play", "expo", "appstore"];
|
|
6
6
|
};
|
|
7
7
|
export declare const isToolchainReady: (name: string) => boolean;
|
|
8
8
|
export declare const isKindReady: (kind: string) => boolean;
|
package/dist/shared/readiness.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// entries here (the end of round 2 leaves it empty). Pure.
|
|
3
3
|
export const NOT_READY = {
|
|
4
4
|
/** Toolchains whose step is a stub: their settings rows are hidden and "auto" never turns them on. */
|
|
5
|
-
toolchains: ['
|
|
5
|
+
toolchains: ['godot', 'android', 'flutter', 'dart', 'reactNative'],
|
|
6
6
|
/** Service sign-ins whose host or guest side is a stub: the menu and the web do not list them. */
|
|
7
|
-
kinds: ['
|
|
7
|
+
kinds: ['keystore', 'play', 'expo', 'appstore'],
|
|
8
8
|
};
|
|
9
9
|
export const isToolchainReady = (name) => !NOT_READY.toolchains.includes(name);
|
|
10
10
|
export const isKindReady = (kind) => !NOT_READY.kinds.includes(kind);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare function assetStoreDir(root: string): string;
|
|
2
|
+
/** The cache roots of this PC that hold an Asset Store-5.x folder: the environment's first, then %APPDATA%\Unity. */
|
|
3
|
+
export declare function pcAssetCacheDirs(pc: {
|
|
4
|
+
readonly appData: string;
|
|
5
|
+
readonly envValue?: string | undefined;
|
|
6
|
+
}, isDir: (dir: string) => boolean): string[];
|
|
7
|
+
export interface AssetFs {
|
|
8
|
+
list(dir: string): string[];
|
|
9
|
+
isDir(dir: string): boolean;
|
|
10
|
+
/** A file's size, or null when it is a folder or missing. */
|
|
11
|
+
size(file: string): number | null;
|
|
12
|
+
}
|
|
13
|
+
export interface AssetPackage {
|
|
14
|
+
readonly publisher: string;
|
|
15
|
+
readonly category: string;
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly sizeBytes: number;
|
|
18
|
+
}
|
|
19
|
+
/** The .unitypackage files in an Asset Store-5.x folder (three levels deep), sorted, at most 2000. */
|
|
20
|
+
export declare function assetPackages(dir: string, fs: AssetFs): AssetPackage[];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// The Unity Asset Store's download cache: <root>\Asset Store-5.x\<publisher>\<category>\<name>.unitypackage. The root
|
|
2
|
+
// is ASSETSTORE_CACHE_PATH, else %APPDATA%\Unity. Pure apart from the reads it is given; every walk is bounded.
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
const win = path.win32;
|
|
5
|
+
const MAX_PACKAGES = 2000;
|
|
6
|
+
const MAX_ROOTS = 2;
|
|
7
|
+
export function assetStoreDir(root) {
|
|
8
|
+
return root + '\\Asset Store-5.x';
|
|
9
|
+
}
|
|
10
|
+
/** The cache roots of this PC that hold an Asset Store-5.x folder: the environment's first, then %APPDATA%\Unity. */
|
|
11
|
+
export function pcAssetCacheDirs(pc, isDir) {
|
|
12
|
+
const all = [pc.envValue?.trim() ?? '', pc.appData ? win.join(pc.appData, 'Unity') : ''].filter(Boolean);
|
|
13
|
+
return all
|
|
14
|
+
.map((d) => win.normalize(d).replace(/\\+$/, ''))
|
|
15
|
+
.filter((d, i, a) => a.findIndex((o) => o.toLowerCase() === d.toLowerCase()) === i)
|
|
16
|
+
.filter((d) => isDir(assetStoreDir(d)))
|
|
17
|
+
.slice(0, MAX_ROOTS);
|
|
18
|
+
}
|
|
19
|
+
/** The .unitypackage files in an Asset Store-5.x folder (three levels deep), sorted, at most 2000. */
|
|
20
|
+
export function assetPackages(dir, fs) {
|
|
21
|
+
const found = [];
|
|
22
|
+
const sorted = (d) => fs.list(d).sort((a, b) => a.localeCompare(b));
|
|
23
|
+
for (const publisher of sorted(dir)) {
|
|
24
|
+
const pdir = win.join(dir, publisher);
|
|
25
|
+
if (!fs.isDir(pdir))
|
|
26
|
+
continue;
|
|
27
|
+
for (const category of sorted(pdir)) {
|
|
28
|
+
const cdir = win.join(pdir, category);
|
|
29
|
+
if (!fs.isDir(cdir))
|
|
30
|
+
continue;
|
|
31
|
+
for (const file of sorted(cdir)) {
|
|
32
|
+
if (!/\.unitypackage$/i.test(file))
|
|
33
|
+
continue;
|
|
34
|
+
const size = fs.size(win.join(cdir, file));
|
|
35
|
+
if (size === null)
|
|
36
|
+
continue;
|
|
37
|
+
found.push({ publisher, category, name: file.replace(/\.unitypackage$/i, ''), sizeBytes: size });
|
|
38
|
+
if (found.length >= MAX_PACKAGES)
|
|
39
|
+
return found;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return found;
|
|
44
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const UNITY_CLI_CDN = "https://public-cdn.cloud.unity3d.com/hub/prod/cli";
|
|
3
|
+
export declare const DEFAULT_UNITY_CLI = "1.0.0-beta.16";
|
|
4
|
+
/** The manifest of a CLI version: "latest" is the newest beta, else that version's own latest.json. */
|
|
5
|
+
export declare function cliManifestUrl(version: string): string;
|
|
6
|
+
export declare const CliManifestSchema: z.ZodObject<{
|
|
7
|
+
version: z.ZodString;
|
|
8
|
+
binaries: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
9
|
+
filename: z.ZodString;
|
|
10
|
+
sha256: z.ZodString;
|
|
11
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type CliManifest = z.infer<typeof CliManifestSchema>;
|
|
15
|
+
export interface CliBinary {
|
|
16
|
+
readonly version: string;
|
|
17
|
+
readonly url: string;
|
|
18
|
+
readonly sha256: string;
|
|
19
|
+
readonly size: number;
|
|
20
|
+
}
|
|
21
|
+
/** The Windows build for this CPU, or null when the manifest has none or its file name or hash is unexpected. */
|
|
22
|
+
export declare function pickCliBinary(m: CliManifest, arch: 'x64' | 'arm64'): CliBinary | null;
|
|
23
|
+
/** No telemetry, hints, pager, elevation prompt or first-run set-up (the skills are synced by us when asked). */
|
|
24
|
+
export declare const UNITY_CLI_ENV: {
|
|
25
|
+
readonly UNITY_NO_CLI_INVOKED_TELEMETRY: "1";
|
|
26
|
+
readonly UNITY_NO_AGENT_HINTS: "1";
|
|
27
|
+
readonly UNITY_CLI_SKIP_SETUP: "1";
|
|
28
|
+
readonly UNITY_NO_PAGER: "1";
|
|
29
|
+
readonly UNITY_NO_ELEVATE: "1";
|
|
30
|
+
};
|
|
31
|
+
/** `unity install <version> -c <changeset> -m <ids> --cm`. --download-directory is not in the docs: from the plan. */
|
|
32
|
+
export declare function installArgs(version: string, changeset: string | null, modules: readonly string[], dir: string): string[];
|
|
33
|
+
/** `unity install-modules -e <version> -m <ids> --cm`. --download-directory is not in the docs: from the plan. */
|
|
34
|
+
export declare function installModulesArgs(version: string, modules: readonly string[], dir: string): string[];
|
|
35
|
+
/** Where the CLI installs editors. `--set` is not in the docs (they say "run install-path --help"): from the plan. */
|
|
36
|
+
export declare function installPathArgs(dir: string): string[];
|
|
37
|
+
/** `unity editors add <path...>` registers editors installed outside the Hub (the docs pass their folders). */
|
|
38
|
+
export declare function editorsAddArgs(exes: readonly string[]): string[];
|
|
39
|
+
/** `unity license status` is not in the docs; --format json is the global output option. */
|
|
40
|
+
export declare function licenceStatusArgs(): string[];
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// The Unity CLI (`unity`): where its pinned build is published, how a download is checked, the environment it runs in
|
|
2
|
+
// and the argument lists we pass it. The flags below are checked against the docs
|
|
3
|
+
// (docs.unity.com/en-us/unity-cli/reference), not a live run; the ones the docs do not settle are marked.
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
export const UNITY_CLI_CDN = 'https://public-cdn.cloud.unity3d.com/hub/prod/cli';
|
|
6
|
+
export const DEFAULT_UNITY_CLI = '1.0.0-beta.16';
|
|
7
|
+
const CLI_VERSION = /^\d+\.\d+\.\d+(-[A-Za-z0-9.]+)?$/;
|
|
8
|
+
const CLI_FILE = /^unity-windows-(x64|arm64)\.exe$/;
|
|
9
|
+
const SHA256 = /^[0-9a-f]{64}$/i;
|
|
10
|
+
/** The manifest of a CLI version: "latest" is the newest beta, else that version's own latest.json. */
|
|
11
|
+
export function cliManifestUrl(version) {
|
|
12
|
+
if (version === 'latest')
|
|
13
|
+
return UNITY_CLI_CDN + '/latest-beta.json';
|
|
14
|
+
if (!CLI_VERSION.test(version))
|
|
15
|
+
throw new Error('not a Unity CLI version: ' + version);
|
|
16
|
+
return UNITY_CLI_CDN + '/' + version + '/latest.json';
|
|
17
|
+
}
|
|
18
|
+
export const CliManifestSchema = z.object({
|
|
19
|
+
version: z.string().regex(CLI_VERSION),
|
|
20
|
+
binaries: z
|
|
21
|
+
.record(z.string().max(40), z.object({
|
|
22
|
+
filename: z.string().max(80),
|
|
23
|
+
sha256: z.string().max(80),
|
|
24
|
+
size: z.number().int().min(0).optional(),
|
|
25
|
+
}))
|
|
26
|
+
.refine((r) => Object.keys(r).length <= 20),
|
|
27
|
+
});
|
|
28
|
+
/** The Windows build for this CPU, or null when the manifest has none or its file name or hash is unexpected. */
|
|
29
|
+
export function pickCliBinary(m, arch) {
|
|
30
|
+
const b = m.binaries['win32-' + arch];
|
|
31
|
+
if (!b)
|
|
32
|
+
return null;
|
|
33
|
+
const file = CLI_FILE.exec(b.filename);
|
|
34
|
+
if (!file || file[1] !== arch || !SHA256.test(b.sha256))
|
|
35
|
+
return null;
|
|
36
|
+
return {
|
|
37
|
+
version: m.version,
|
|
38
|
+
url: UNITY_CLI_CDN + '/' + m.version + '/' + b.filename,
|
|
39
|
+
sha256: b.sha256.toLowerCase(),
|
|
40
|
+
size: b.size ?? 0,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** No telemetry, hints, pager, elevation prompt or first-run set-up (the skills are synced by us when asked). */
|
|
44
|
+
export const UNITY_CLI_ENV = {
|
|
45
|
+
UNITY_NO_CLI_INVOKED_TELEMETRY: '1',
|
|
46
|
+
UNITY_NO_AGENT_HINTS: '1',
|
|
47
|
+
UNITY_CLI_SKIP_SETUP: '1',
|
|
48
|
+
UNITY_NO_PAGER: '1',
|
|
49
|
+
UNITY_NO_ELEVATE: '1',
|
|
50
|
+
};
|
|
51
|
+
/** `unity install <version> -c <changeset> -m <ids> --cm`. --download-directory is not in the docs: from the plan. */
|
|
52
|
+
export function installArgs(version, changeset, modules, dir) {
|
|
53
|
+
return [
|
|
54
|
+
'install',
|
|
55
|
+
version,
|
|
56
|
+
...(changeset ? ['-c', changeset] : []),
|
|
57
|
+
...(modules.length ? ['-m', ...modules, '--cm'] : []),
|
|
58
|
+
'--download-directory',
|
|
59
|
+
dir,
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
/** `unity install-modules -e <version> -m <ids> --cm`. --download-directory is not in the docs: from the plan. */
|
|
63
|
+
export function installModulesArgs(version, modules, dir) {
|
|
64
|
+
return ['install-modules', '-e', version, '-m', ...modules, '--cm', '--download-directory', dir];
|
|
65
|
+
}
|
|
66
|
+
/** Where the CLI installs editors. `--set` is not in the docs (they say "run install-path --help"): from the plan. */
|
|
67
|
+
export function installPathArgs(dir) {
|
|
68
|
+
return ['install-path', '--set', dir];
|
|
69
|
+
}
|
|
70
|
+
/** `unity editors add <path...>` registers editors installed outside the Hub (the docs pass their folders). */
|
|
71
|
+
export function editorsAddArgs(exes) {
|
|
72
|
+
return ['editors', 'add', ...exes];
|
|
73
|
+
}
|
|
74
|
+
/** `unity license status` is not in the docs; --format json is the global output option. */
|
|
75
|
+
export function licenceStatusArgs() {
|
|
76
|
+
return ['license', 'status', '--format', 'json'];
|
|
77
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface UnityFs {
|
|
2
|
+
exists(file: string): boolean;
|
|
3
|
+
list(dir: string): string[];
|
|
4
|
+
}
|
|
5
|
+
export interface UnityEditor {
|
|
6
|
+
readonly version: string;
|
|
7
|
+
/** The folder that holds Editor\Unity.exe. */
|
|
8
|
+
readonly root: string;
|
|
9
|
+
readonly exe: string;
|
|
10
|
+
readonly origin: 'pc' | 'data';
|
|
11
|
+
readonly writable: boolean;
|
|
12
|
+
/** Module ids found installed (android, webgl, ios, windows-il2cpp). */
|
|
13
|
+
readonly modules: readonly string[];
|
|
14
|
+
}
|
|
15
|
+
export declare const ORIGIN_LABELS: {
|
|
16
|
+
readonly pc: "this PC, read-only";
|
|
17
|
+
readonly data: "the data disk, kept between sandboxes";
|
|
18
|
+
};
|
|
19
|
+
/** The modules installed in an editor folder. */
|
|
20
|
+
export declare function editorModules(root: string, fs: UnityFs): string[];
|
|
21
|
+
export interface EditorSearch {
|
|
22
|
+
/** This PC's editors as mapped read-only (id = the version). */
|
|
23
|
+
readonly mapped: readonly {
|
|
24
|
+
readonly guest: string;
|
|
25
|
+
readonly id: string;
|
|
26
|
+
}[];
|
|
27
|
+
/** tools\unity\editors on the data disk. */
|
|
28
|
+
readonly dataRoot: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function findEditors(search: EditorSearch, fs: UnityFs): UnityEditor[];
|
|
31
|
+
export interface WantedEditor {
|
|
32
|
+
readonly version: string;
|
|
33
|
+
readonly changeset: string | null;
|
|
34
|
+
}
|
|
35
|
+
export interface EditorChoice {
|
|
36
|
+
readonly editor: UnityEditor | null;
|
|
37
|
+
/** What to install on the data disk, when nothing usable is there. */
|
|
38
|
+
readonly install: WantedEditor | null;
|
|
39
|
+
readonly reason: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The editor for a project: exactly the version it asks for. This PC's (read-only) when it has every module, then the
|
|
43
|
+
* data disk's, else install it when the licence is accepted. A PC editor that lacks modules is still used when nothing
|
|
44
|
+
* can be installed.
|
|
45
|
+
*/
|
|
46
|
+
export declare function chooseEditor(editors: readonly UnityEditor[], wanted: WantedEditor | null, modules: readonly string[], canInstall: boolean): EditorChoice;
|