windows-development-sandbox 1.1.0 → 1.4.1
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/.sandbox-config.example.json +2 -1
- package/README.md +3 -2
- package/config.example.json +39 -5
- package/dist/cli/args.d.ts +3 -0
- package/dist/cli/args.js +3 -1
- package/dist/cli/boot-progress.d.ts +22 -0
- package/dist/cli/boot-progress.js +59 -0
- package/dist/cli/commands/accounts.js +2 -2
- package/dist/cli/commands/agent-commands.js +1 -1
- package/dist/cli/commands/context.js +2 -1
- package/dist/cli/commands/data/clean.js +6 -1
- package/dist/cli/commands/data/collect.js +3 -3
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.js +1 -1
- package/dist/cli/commands/launch.d.ts +5 -2
- package/dist/cli/commands/launch.js +113 -25
- package/dist/cli/commands/maintenance.d.ts +2 -0
- package/dist/cli/commands/maintenance.js +70 -4
- package/dist/cli/commands/project.d.ts +10 -6
- package/dist/cli/commands/project.js +42 -3
- package/dist/cli/commands/restart.js +17 -7
- package/dist/cli/commands/sessions.js +5 -4
- package/dist/cli/commands/user-config.js +1 -1
- package/dist/cli/index.js +6 -4
- package/dist/cli/manifest.js +6 -1
- package/dist/cli/menu/apps.d.ts +21 -0
- package/dist/cli/menu/apps.js +122 -0
- package/dist/cli/menu/command-form.d.ts +28 -0
- package/dist/cli/menu/command-form.js +219 -0
- package/dist/cli/menu/index.d.ts +26 -0
- package/dist/cli/menu/index.js +180 -0
- package/dist/cli/menu/settings/categories.d.ts +9 -0
- package/dist/cli/menu/settings/categories.js +28 -0
- package/dist/cli/menu/settings/config-file.d.ts +40 -0
- package/dist/cli/menu/settings/config-file.js +71 -0
- package/dist/cli/menu/settings/editors.d.ts +30 -0
- package/dist/cli/menu/settings/editors.js +305 -0
- package/dist/cli/menu/settings/index.d.ts +32 -0
- package/dist/cli/menu/settings/index.js +136 -0
- package/dist/cli/menu/settings/schema-node.d.ts +62 -0
- package/dist/cli/menu/settings/schema-node.js +104 -0
- package/dist/cli/{menu-multi.d.ts → menu/several.d.ts} +10 -2
- package/dist/cli/menu/several.js +102 -0
- package/dist/cli/progress.d.ts +15 -0
- package/dist/cli/progress.js +52 -0
- package/dist/cli/tui/app.d.ts +39 -0
- package/dist/cli/tui/app.js +52 -0
- package/dist/cli/tui/dialogs.d.ts +57 -0
- package/dist/cli/tui/dialogs.js +162 -0
- package/dist/cli/tui/frame.d.ts +18 -0
- package/dist/cli/tui/frame.js +27 -0
- package/dist/cli/tui/index.d.ts +7 -0
- package/dist/cli/tui/index.js +8 -0
- package/dist/cli/tui/list-screen.d.ts +101 -0
- package/dist/cli/tui/list-screen.js +299 -0
- package/dist/cli/tui/terminal.d.ts +37 -0
- package/dist/cli/tui/terminal.js +89 -0
- package/dist/cli/tui/text.d.ts +20 -0
- package/dist/cli/tui/text.js +105 -0
- package/dist/cli/tui/theme.d.ts +45 -0
- package/dist/cli/tui/theme.js +30 -0
- package/dist/core/config.js +10 -7
- package/dist/core/local-config.d.ts +31 -1
- package/dist/core/local-config.js +72 -7
- package/dist/core/project-policy.d.ts +50 -3
- package/dist/core/project-policy.js +90 -4
- package/dist/core/schema/apps.d.ts +40 -0
- package/dist/core/schema/apps.js +27 -0
- package/dist/core/schema/config.d.ts +69 -3
- package/dist/core/schema/config.js +18 -6
- package/dist/core/schema/profile.d.ts +5 -0
- package/dist/core/schema/profile.js +4 -2
- package/dist/core/schema/projects.d.ts +1 -0
- package/dist/core/schema/projects.js +1 -0
- package/dist/core/schema/sandbox.d.ts +29 -1
- package/dist/core/schema/sandbox.js +29 -1
- package/dist/core/schema/toolchains.d.ts +3 -0
- package/dist/core/schema/toolchains.js +6 -1
- package/dist/core/types.d.ts +24 -1
- package/dist/core/util.d.ts +2 -0
- package/dist/core/util.js +2 -0
- package/dist/core/workspace.d.ts +21 -4
- package/dist/core/workspace.js +99 -21
- package/dist/guest/apps/index.d.ts +10 -0
- package/dist/guest/apps/index.js +206 -0
- package/dist/guest/apps/resolvers.d.ts +8 -0
- package/dist/guest/apps/resolvers.js +90 -0
- package/dist/guest/audit-parse.d.ts +7 -0
- package/dist/guest/audit-parse.js +24 -0
- package/dist/guest/audit.d.ts +4 -0
- package/dist/guest/audit.js +47 -0
- package/dist/guest/daemon/relays.d.ts +1 -0
- package/dist/guest/daemon/relays.js +18 -0
- package/dist/guest/daemon.js +4 -0
- package/dist/guest/env.d.ts +7 -2
- package/dist/guest/env.js +17 -3
- package/dist/guest/helpers.d.ts +1 -1
- package/dist/guest/main.js +20 -3
- package/dist/guest/netproxy.d.ts +1 -0
- package/dist/guest/netproxy.js +100 -0
- package/dist/guest/ptyhost.js +14 -4
- package/dist/guest/setup/claude.d.ts +0 -4
- package/dist/guest/setup/claude.js +48 -2
- package/dist/guest/setup/network.d.ts +9 -0
- package/dist/guest/setup/network.js +97 -4
- package/dist/guest/setup/user.js +4 -0
- package/dist/guest/toolchains/index.js +29 -3
- package/dist/guest/toolchains/native/mesa.js +13 -3
- package/dist/guest/toolchains/plan.d.ts +3 -1
- package/dist/guest/toolchains/plan.js +53 -9
- package/dist/guest/toolchains/python.js +26 -2
- package/dist/guest/toolchains/vscode-profile.d.ts +30 -0
- package/dist/guest/toolchains/vscode-profile.js +69 -0
- package/dist/guest/toolchains/vscode.d.ts +17 -0
- package/dist/guest/toolchains/vscode.js +87 -1
- package/dist/host/attach.js +2 -1
- package/dist/host/audit/collect.d.ts +34 -0
- package/dist/host/audit/collect.js +126 -0
- package/dist/host/audit/log.d.ts +46 -0
- package/dist/host/audit/log.js +143 -0
- package/dist/host/channel.d.ts +2 -2
- package/dist/host/channel.js +3 -2
- package/dist/host/generate.d.ts +7 -1
- package/dist/host/generate.js +23 -6
- package/dist/host/join.d.ts +7 -0
- package/dist/host/join.js +23 -9
- package/dist/host/launch/mappings.d.ts +7 -2
- package/dist/host/launch/mappings.js +68 -18
- package/dist/host/launch/projects.d.ts +2 -0
- package/dist/host/launch/projects.js +11 -5
- package/dist/host/launch/stage.js +1 -1
- package/dist/host/motw.d.ts +17 -0
- package/dist/host/motw.js +74 -0
- package/dist/host/platform.js +3 -0
- package/dist/host/port-forward.d.ts +8 -0
- package/dist/host/port-forward.js +37 -0
- package/dist/host/projects.d.ts +25 -2
- package/dist/host/projects.js +54 -5
- package/dist/host/repo-guard.d.ts +10 -3
- package/dist/host/repo-guard.js +142 -14
- package/dist/host/stops.d.ts +67 -0
- package/dist/host/stops.js +126 -0
- package/dist/host/terminal.d.ts +8 -0
- package/dist/host/terminal.js +45 -1
- package/dist/host/workspace-view/index.d.ts +20 -0
- package/dist/host/workspace-view/index.js +53 -0
- package/dist/host/workspace-view/rules.d.ts +26 -0
- package/dist/host/workspace-view/rules.js +93 -0
- package/dist/host/workspace-view/view.d.ts +50 -0
- package/dist/host/workspace-view/view.js +281 -0
- package/dist/runtime/daemon.js +1387 -558
- package/dist/runtime/db.js +199 -14
- package/dist/runtime/main.js +3082 -631
- package/dist/runtime/netproxy.js +25948 -0
- package/dist/runtime/view.js +531 -148
- package/dist/selftest/audit.test.d.ts +2 -0
- package/dist/selftest/audit.test.js +57 -0
- package/dist/selftest/channel.test.js +45 -2
- package/dist/selftest/cli.test.js +47 -17
- package/dist/selftest/fixtures.d.ts +47 -1
- package/dist/selftest/fixtures.js +3 -1
- package/dist/selftest/generate.test.js +7 -2
- package/dist/selftest/index.js +6 -2
- package/dist/selftest/live-network.test.d.ts +2 -0
- package/dist/selftest/live-network.test.js +63 -0
- package/dist/selftest/live-terminal.test.d.ts +2 -0
- package/dist/selftest/live-terminal.test.js +169 -0
- package/dist/selftest/local-config.test.js +42 -4
- package/dist/selftest/mirror.test.js +36 -7
- package/dist/selftest/network.test.js +12 -0
- package/dist/selftest/projects.test.js +77 -8
- package/dist/selftest/repo-guard.test.js +59 -1
- package/dist/selftest/sync.test.js +50 -10
- package/dist/selftest/toolchains.test.js +30 -0
- package/dist/selftest/workspace-view.test.d.ts +2 -0
- package/dist/selftest/workspace-view.test.js +89 -0
- package/dist/shared/apps.d.ts +49 -0
- package/dist/shared/apps.js +114 -0
- package/dist/shared/console-input.d.ts +11 -0
- package/dist/shared/console-input.js +61 -0
- package/dist/shared/download.d.ts +3 -0
- package/dist/shared/download.js +25 -2
- package/dist/shared/guest-paths.d.ts +27 -0
- package/dist/shared/guest-paths.js +68 -0
- package/dist/shared/netpolicy.d.ts +27 -0
- package/dist/shared/netpolicy.js +51 -0
- package/dist/shared/projects.d.ts +27 -4
- package/dist/shared/projects.js +72 -13
- package/dist/shared/pty-client.d.ts +26 -4
- package/dist/shared/pty-client.js +204 -25
- package/dist/shared/rundir.d.ts +2 -0
- package/dist/shared/rundir.js +2 -0
- package/dist/shared/schema.d.ts +34 -0
- package/dist/shared/schema.js +14 -0
- package/dist/shared/system.d.ts +1 -0
- package/dist/shared/system.js +1 -0
- package/dist/sync/claude-mem.js +3 -2
- package/dist/sync/history.d.ts +6 -0
- package/dist/sync/history.js +26 -11
- package/dist/sync/watcher.js +78 -6
- package/package.json +2 -1
- package/sandbox/cargoshim.cs +56 -0
- package/sandbox/cpucap.cs +33 -0
- package/sandbox/cpucap.ps1 +4 -35
- package/sandbox/logon.cmd +6 -0
- package/sandbox/memlog.ps1 +34 -0
- package/sandbox/pagefile.cs +31 -0
- package/sandbox/pagefile.ps1 +21 -0
- package/sandbox/ptyhost.cs +162 -7
- package/schemas/config.schema.json +318 -3
- package/schemas/sandbox-config.schema.json +129 -14
- package/dist/cli/menu-multi.js +0 -82
- package/dist/cli/menu.d.ts +0 -14
- package/dist/cli/menu.js +0 -290
- package/dist/cli/settings/edit.d.ts +0 -13
- package/dist/cli/settings/edit.js +0 -19
- package/dist/cli/settings/index.d.ts +0 -8
- package/dist/cli/settings/index.js +0 -131
- package/dist/cli/settings/prompts.d.ts +0 -7
- package/dist/cli/settings/prompts.js +0 -48
- package/dist/cli/settings/schema.d.ts +0 -33
- package/dist/cli/settings/schema.js +0 -29
package/dist/runtime/view.js
CHANGED
|
@@ -1363,11 +1363,11 @@ var require_lodash = __commonJS({
|
|
|
1363
1363
|
return isFunction(object2[key]);
|
|
1364
1364
|
});
|
|
1365
1365
|
}
|
|
1366
|
-
function baseGet(object2,
|
|
1367
|
-
|
|
1368
|
-
var index = 0, length =
|
|
1366
|
+
function baseGet(object2, path4) {
|
|
1367
|
+
path4 = castPath(path4, object2);
|
|
1368
|
+
var index = 0, length = path4.length;
|
|
1369
1369
|
while (object2 != null && index < length) {
|
|
1370
|
-
object2 = object2[toKey(
|
|
1370
|
+
object2 = object2[toKey(path4[index++])];
|
|
1371
1371
|
}
|
|
1372
1372
|
return index && index == length ? object2 : undefined2;
|
|
1373
1373
|
}
|
|
@@ -1431,10 +1431,10 @@ var require_lodash = __commonJS({
|
|
|
1431
1431
|
});
|
|
1432
1432
|
return accumulator;
|
|
1433
1433
|
}
|
|
1434
|
-
function baseInvoke(object2,
|
|
1435
|
-
|
|
1436
|
-
object2 = parent(object2,
|
|
1437
|
-
var func = object2 == null ? object2 : object2[toKey(last(
|
|
1434
|
+
function baseInvoke(object2, path4, args) {
|
|
1435
|
+
path4 = castPath(path4, object2);
|
|
1436
|
+
object2 = parent(object2, path4);
|
|
1437
|
+
var func = object2 == null ? object2 : object2[toKey(last(path4))];
|
|
1438
1438
|
return func == null ? undefined2 : apply(func, object2, args);
|
|
1439
1439
|
}
|
|
1440
1440
|
function baseIsArguments(value) {
|
|
@@ -1590,13 +1590,13 @@ var require_lodash = __commonJS({
|
|
|
1590
1590
|
return object2 === source || baseIsMatch(object2, source, matchData);
|
|
1591
1591
|
};
|
|
1592
1592
|
}
|
|
1593
|
-
function baseMatchesProperty(
|
|
1594
|
-
if (isKey(
|
|
1595
|
-
return matchesStrictComparable(toKey(
|
|
1593
|
+
function baseMatchesProperty(path4, srcValue) {
|
|
1594
|
+
if (isKey(path4) && isStrictComparable(srcValue)) {
|
|
1595
|
+
return matchesStrictComparable(toKey(path4), srcValue);
|
|
1596
1596
|
}
|
|
1597
1597
|
return function(object2) {
|
|
1598
|
-
var objValue = get(object2,
|
|
1599
|
-
return objValue === undefined2 && objValue === srcValue ? hasIn(object2,
|
|
1598
|
+
var objValue = get(object2, path4);
|
|
1599
|
+
return objValue === undefined2 && objValue === srcValue ? hasIn(object2, path4) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
1600
1600
|
};
|
|
1601
1601
|
}
|
|
1602
1602
|
function baseMerge(object2, source, srcIndex, customizer, stack) {
|
|
@@ -1693,23 +1693,23 @@ var require_lodash = __commonJS({
|
|
|
1693
1693
|
});
|
|
1694
1694
|
}
|
|
1695
1695
|
function basePick(object2, paths) {
|
|
1696
|
-
return basePickBy(object2, paths, function(value,
|
|
1697
|
-
return hasIn(object2,
|
|
1696
|
+
return basePickBy(object2, paths, function(value, path4) {
|
|
1697
|
+
return hasIn(object2, path4);
|
|
1698
1698
|
});
|
|
1699
1699
|
}
|
|
1700
1700
|
function basePickBy(object2, paths, predicate) {
|
|
1701
1701
|
var index = -1, length = paths.length, result2 = {};
|
|
1702
1702
|
while (++index < length) {
|
|
1703
|
-
var
|
|
1704
|
-
if (predicate(value,
|
|
1705
|
-
baseSet(result2, castPath(
|
|
1703
|
+
var path4 = paths[index], value = baseGet(object2, path4);
|
|
1704
|
+
if (predicate(value, path4)) {
|
|
1705
|
+
baseSet(result2, castPath(path4, object2), value);
|
|
1706
1706
|
}
|
|
1707
1707
|
}
|
|
1708
1708
|
return result2;
|
|
1709
1709
|
}
|
|
1710
|
-
function basePropertyDeep(
|
|
1710
|
+
function basePropertyDeep(path4) {
|
|
1711
1711
|
return function(object2) {
|
|
1712
|
-
return baseGet(object2,
|
|
1712
|
+
return baseGet(object2, path4);
|
|
1713
1713
|
};
|
|
1714
1714
|
}
|
|
1715
1715
|
function basePullAll(array2, values2, iteratee2, comparator) {
|
|
@@ -1783,14 +1783,14 @@ var require_lodash = __commonJS({
|
|
|
1783
1783
|
var array2 = values(collection);
|
|
1784
1784
|
return shuffleSelf(array2, baseClamp(n, 0, array2.length));
|
|
1785
1785
|
}
|
|
1786
|
-
function baseSet(object2,
|
|
1786
|
+
function baseSet(object2, path4, value, customizer) {
|
|
1787
1787
|
if (!isObject2(object2)) {
|
|
1788
1788
|
return object2;
|
|
1789
1789
|
}
|
|
1790
|
-
|
|
1791
|
-
var index = -1, length =
|
|
1790
|
+
path4 = castPath(path4, object2);
|
|
1791
|
+
var index = -1, length = path4.length, lastIndex = length - 1, nested = object2;
|
|
1792
1792
|
while (nested != null && ++index < length) {
|
|
1793
|
-
var key = toKey(
|
|
1793
|
+
var key = toKey(path4[index]), newValue = value;
|
|
1794
1794
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
1795
1795
|
return object2;
|
|
1796
1796
|
}
|
|
@@ -1798,7 +1798,7 @@ var require_lodash = __commonJS({
|
|
|
1798
1798
|
var objValue = nested[key];
|
|
1799
1799
|
newValue = customizer ? customizer(objValue, key, nested) : undefined2;
|
|
1800
1800
|
if (newValue === undefined2) {
|
|
1801
|
-
newValue = isObject2(objValue) ? objValue : isIndex(
|
|
1801
|
+
newValue = isObject2(objValue) ? objValue : isIndex(path4[index + 1]) ? [] : {};
|
|
1802
1802
|
}
|
|
1803
1803
|
}
|
|
1804
1804
|
assignValue(nested, key, newValue);
|
|
@@ -1964,14 +1964,14 @@ var require_lodash = __commonJS({
|
|
|
1964
1964
|
}
|
|
1965
1965
|
return result2;
|
|
1966
1966
|
}
|
|
1967
|
-
function baseUnset(object2,
|
|
1968
|
-
|
|
1969
|
-
var index = -1, length =
|
|
1967
|
+
function baseUnset(object2, path4) {
|
|
1968
|
+
path4 = castPath(path4, object2);
|
|
1969
|
+
var index = -1, length = path4.length;
|
|
1970
1970
|
if (!length) {
|
|
1971
1971
|
return true;
|
|
1972
1972
|
}
|
|
1973
1973
|
while (++index < length) {
|
|
1974
|
-
var key = toKey(
|
|
1974
|
+
var key = toKey(path4[index]);
|
|
1975
1975
|
if (key === "__proto__" && !hasOwnProperty.call(object2, "__proto__")) {
|
|
1976
1976
|
return false;
|
|
1977
1977
|
}
|
|
@@ -1979,11 +1979,11 @@ var require_lodash = __commonJS({
|
|
|
1979
1979
|
return false;
|
|
1980
1980
|
}
|
|
1981
1981
|
}
|
|
1982
|
-
var obj = parent(object2,
|
|
1983
|
-
return obj == null || delete obj[toKey(last(
|
|
1982
|
+
var obj = parent(object2, path4);
|
|
1983
|
+
return obj == null || delete obj[toKey(last(path4))];
|
|
1984
1984
|
}
|
|
1985
|
-
function baseUpdate(object2,
|
|
1986
|
-
return baseSet(object2,
|
|
1985
|
+
function baseUpdate(object2, path4, updater, customizer) {
|
|
1986
|
+
return baseSet(object2, path4, updater(baseGet(object2, path4)), customizer);
|
|
1987
1987
|
}
|
|
1988
1988
|
function baseWhile(array2, predicate, isDrop, fromRight) {
|
|
1989
1989
|
var length = array2.length, index = fromRight ? length : -1;
|
|
@@ -2866,11 +2866,11 @@ var require_lodash = __commonJS({
|
|
|
2866
2866
|
var match = source.match(reWrapDetails);
|
|
2867
2867
|
return match ? match[1].split(reSplitDetails) : [];
|
|
2868
2868
|
}
|
|
2869
|
-
function hasPath(object2,
|
|
2870
|
-
|
|
2871
|
-
var index = -1, length =
|
|
2869
|
+
function hasPath(object2, path4, hasFunc) {
|
|
2870
|
+
path4 = castPath(path4, object2);
|
|
2871
|
+
var index = -1, length = path4.length, result2 = false;
|
|
2872
2872
|
while (++index < length) {
|
|
2873
|
-
var key = toKey(
|
|
2873
|
+
var key = toKey(path4[index]);
|
|
2874
2874
|
if (!(result2 = object2 != null && hasFunc(object2, key))) {
|
|
2875
2875
|
break;
|
|
2876
2876
|
}
|
|
@@ -3072,8 +3072,8 @@ var require_lodash = __commonJS({
|
|
|
3072
3072
|
return apply(func, this, otherArgs);
|
|
3073
3073
|
};
|
|
3074
3074
|
}
|
|
3075
|
-
function parent(object2,
|
|
3076
|
-
return
|
|
3075
|
+
function parent(object2, path4) {
|
|
3076
|
+
return path4.length < 2 ? object2 : baseGet(object2, baseSlice(path4, 0, -1));
|
|
3077
3077
|
}
|
|
3078
3078
|
function reorder(array2, indexes) {
|
|
3079
3079
|
var arrLength = array2.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array2);
|
|
@@ -3708,10 +3708,10 @@ var require_lodash = __commonJS({
|
|
|
3708
3708
|
}
|
|
3709
3709
|
return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
3710
3710
|
}
|
|
3711
|
-
var invokeMap = baseRest(function(collection,
|
|
3712
|
-
var index = -1, isFunc = typeof
|
|
3711
|
+
var invokeMap = baseRest(function(collection, path4, args) {
|
|
3712
|
+
var index = -1, isFunc = typeof path4 == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
3713
3713
|
baseEach(collection, function(value) {
|
|
3714
|
-
result2[++index] = isFunc ? apply(
|
|
3714
|
+
result2[++index] = isFunc ? apply(path4, value, args) : baseInvoke(value, path4, args);
|
|
3715
3715
|
});
|
|
3716
3716
|
return result2;
|
|
3717
3717
|
});
|
|
@@ -4363,15 +4363,15 @@ var require_lodash = __commonJS({
|
|
|
4363
4363
|
function functionsIn(object2) {
|
|
4364
4364
|
return object2 == null ? [] : baseFunctions(object2, keysIn(object2));
|
|
4365
4365
|
}
|
|
4366
|
-
function get(object2,
|
|
4367
|
-
var result2 = object2 == null ? undefined2 : baseGet(object2,
|
|
4366
|
+
function get(object2, path4, defaultValue) {
|
|
4367
|
+
var result2 = object2 == null ? undefined2 : baseGet(object2, path4);
|
|
4368
4368
|
return result2 === undefined2 ? defaultValue : result2;
|
|
4369
4369
|
}
|
|
4370
|
-
function has(object2,
|
|
4371
|
-
return object2 != null && hasPath(object2,
|
|
4370
|
+
function has(object2, path4) {
|
|
4371
|
+
return object2 != null && hasPath(object2, path4, baseHas);
|
|
4372
4372
|
}
|
|
4373
|
-
function hasIn(object2,
|
|
4374
|
-
return object2 != null && hasPath(object2,
|
|
4373
|
+
function hasIn(object2, path4) {
|
|
4374
|
+
return object2 != null && hasPath(object2, path4, baseHasIn);
|
|
4375
4375
|
}
|
|
4376
4376
|
var invert = createInverter(function(result2, value, key) {
|
|
4377
4377
|
if (value != null && typeof value.toString != "function") {
|
|
@@ -4424,10 +4424,10 @@ var require_lodash = __commonJS({
|
|
|
4424
4424
|
return result2;
|
|
4425
4425
|
}
|
|
4426
4426
|
var isDeep = false;
|
|
4427
|
-
paths = arrayMap(paths, function(
|
|
4428
|
-
|
|
4429
|
-
isDeep || (isDeep =
|
|
4430
|
-
return
|
|
4427
|
+
paths = arrayMap(paths, function(path4) {
|
|
4428
|
+
path4 = castPath(path4, object2);
|
|
4429
|
+
isDeep || (isDeep = path4.length > 1);
|
|
4430
|
+
return path4;
|
|
4431
4431
|
});
|
|
4432
4432
|
copyObject(object2, getAllKeysIn(object2), result2);
|
|
4433
4433
|
if (isDeep) {
|
|
@@ -4453,19 +4453,19 @@ var require_lodash = __commonJS({
|
|
|
4453
4453
|
return [prop];
|
|
4454
4454
|
});
|
|
4455
4455
|
predicate = getIteratee(predicate);
|
|
4456
|
-
return basePickBy(object2, props, function(value,
|
|
4457
|
-
return predicate(value,
|
|
4456
|
+
return basePickBy(object2, props, function(value, path4) {
|
|
4457
|
+
return predicate(value, path4[0]);
|
|
4458
4458
|
});
|
|
4459
4459
|
}
|
|
4460
|
-
function result(object2,
|
|
4461
|
-
|
|
4462
|
-
var index = -1, length =
|
|
4460
|
+
function result(object2, path4, defaultValue) {
|
|
4461
|
+
path4 = castPath(path4, object2);
|
|
4462
|
+
var index = -1, length = path4.length;
|
|
4463
4463
|
if (!length) {
|
|
4464
4464
|
length = 1;
|
|
4465
4465
|
object2 = undefined2;
|
|
4466
4466
|
}
|
|
4467
4467
|
while (++index < length) {
|
|
4468
|
-
var value = object2 == null ? undefined2 : object2[toKey(
|
|
4468
|
+
var value = object2 == null ? undefined2 : object2[toKey(path4[index])];
|
|
4469
4469
|
if (value === undefined2) {
|
|
4470
4470
|
index = length;
|
|
4471
4471
|
value = defaultValue;
|
|
@@ -4474,12 +4474,12 @@ var require_lodash = __commonJS({
|
|
|
4474
4474
|
}
|
|
4475
4475
|
return object2;
|
|
4476
4476
|
}
|
|
4477
|
-
function set2(object2,
|
|
4478
|
-
return object2 == null ? object2 : baseSet(object2,
|
|
4477
|
+
function set2(object2, path4, value) {
|
|
4478
|
+
return object2 == null ? object2 : baseSet(object2, path4, value);
|
|
4479
4479
|
}
|
|
4480
|
-
function setWith(object2,
|
|
4480
|
+
function setWith(object2, path4, value, customizer) {
|
|
4481
4481
|
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
4482
|
-
return object2 == null ? object2 : baseSet(object2,
|
|
4482
|
+
return object2 == null ? object2 : baseSet(object2, path4, value, customizer);
|
|
4483
4483
|
}
|
|
4484
4484
|
var toPairs = createToPairs(keys);
|
|
4485
4485
|
var toPairsIn = createToPairs(keysIn);
|
|
@@ -4501,15 +4501,15 @@ var require_lodash = __commonJS({
|
|
|
4501
4501
|
});
|
|
4502
4502
|
return accumulator;
|
|
4503
4503
|
}
|
|
4504
|
-
function unset(object2,
|
|
4505
|
-
return object2 == null ? true : baseUnset(object2,
|
|
4504
|
+
function unset(object2, path4) {
|
|
4505
|
+
return object2 == null ? true : baseUnset(object2, path4);
|
|
4506
4506
|
}
|
|
4507
|
-
function update(object2,
|
|
4508
|
-
return object2 == null ? object2 : baseUpdate(object2,
|
|
4507
|
+
function update(object2, path4, updater) {
|
|
4508
|
+
return object2 == null ? object2 : baseUpdate(object2, path4, castFunction(updater));
|
|
4509
4509
|
}
|
|
4510
|
-
function updateWith(object2,
|
|
4510
|
+
function updateWith(object2, path4, updater, customizer) {
|
|
4511
4511
|
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
4512
|
-
return object2 == null ? object2 : baseUpdate(object2,
|
|
4512
|
+
return object2 == null ? object2 : baseUpdate(object2, path4, castFunction(updater), customizer);
|
|
4513
4513
|
}
|
|
4514
4514
|
function values(object2) {
|
|
4515
4515
|
return object2 == null ? [] : baseValues(object2, keys(object2));
|
|
@@ -4895,17 +4895,17 @@ var require_lodash = __commonJS({
|
|
|
4895
4895
|
function matches(source) {
|
|
4896
4896
|
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
|
4897
4897
|
}
|
|
4898
|
-
function matchesProperty(
|
|
4899
|
-
return baseMatchesProperty(
|
|
4898
|
+
function matchesProperty(path4, srcValue) {
|
|
4899
|
+
return baseMatchesProperty(path4, baseClone(srcValue, CLONE_DEEP_FLAG));
|
|
4900
4900
|
}
|
|
4901
|
-
var method = baseRest(function(
|
|
4901
|
+
var method = baseRest(function(path4, args) {
|
|
4902
4902
|
return function(object2) {
|
|
4903
|
-
return baseInvoke(object2,
|
|
4903
|
+
return baseInvoke(object2, path4, args);
|
|
4904
4904
|
};
|
|
4905
4905
|
});
|
|
4906
4906
|
var methodOf = baseRest(function(object2, args) {
|
|
4907
|
-
return function(
|
|
4908
|
-
return baseInvoke(object2,
|
|
4907
|
+
return function(path4) {
|
|
4908
|
+
return baseInvoke(object2, path4, args);
|
|
4909
4909
|
};
|
|
4910
4910
|
});
|
|
4911
4911
|
function mixin(object2, source, options) {
|
|
@@ -4952,12 +4952,12 @@ var require_lodash = __commonJS({
|
|
|
4952
4952
|
var over = createOver(arrayMap);
|
|
4953
4953
|
var overEvery = createOver(arrayEvery);
|
|
4954
4954
|
var overSome = createOver(arraySome);
|
|
4955
|
-
function property(
|
|
4956
|
-
return isKey(
|
|
4955
|
+
function property(path4) {
|
|
4956
|
+
return isKey(path4) ? baseProperty(toKey(path4)) : basePropertyDeep(path4);
|
|
4957
4957
|
}
|
|
4958
4958
|
function propertyOf(object2) {
|
|
4959
|
-
return function(
|
|
4960
|
-
return object2 == null ? undefined2 : baseGet(object2,
|
|
4959
|
+
return function(path4) {
|
|
4960
|
+
return object2 == null ? undefined2 : baseGet(object2, path4);
|
|
4961
4961
|
};
|
|
4962
4962
|
}
|
|
4963
4963
|
var range = createRange();
|
|
@@ -5410,12 +5410,12 @@ var require_lodash = __commonJS({
|
|
|
5410
5410
|
LazyWrapper.prototype.findLast = function(predicate) {
|
|
5411
5411
|
return this.reverse().find(predicate);
|
|
5412
5412
|
};
|
|
5413
|
-
LazyWrapper.prototype.invokeMap = baseRest(function(
|
|
5414
|
-
if (typeof
|
|
5413
|
+
LazyWrapper.prototype.invokeMap = baseRest(function(path4, args) {
|
|
5414
|
+
if (typeof path4 == "function") {
|
|
5415
5415
|
return new LazyWrapper(this);
|
|
5416
5416
|
}
|
|
5417
5417
|
return this.map(function(value) {
|
|
5418
|
-
return baseInvoke(value,
|
|
5418
|
+
return baseInvoke(value, path4, args);
|
|
5419
5419
|
});
|
|
5420
5420
|
});
|
|
5421
5421
|
LazyWrapper.prototype.reject = function(predicate) {
|
|
@@ -5533,8 +5533,87 @@ var require_lodash = __commonJS({
|
|
|
5533
5533
|
|
|
5534
5534
|
// src/shared/pty-client.ts
|
|
5535
5535
|
import net from "node:net";
|
|
5536
|
-
|
|
5536
|
+
|
|
5537
|
+
// src/shared/console-input.ts
|
|
5538
|
+
import { spawn } from "node:child_process";
|
|
5539
|
+
|
|
5540
|
+
// src/shared/system.ts
|
|
5541
|
+
import path from "node:path";
|
|
5542
|
+
var systemRoot = () => process.env.SystemRoot ?? process.env.WINDIR ?? "C:\\Windows";
|
|
5543
|
+
var system32 = (exe) => path.join(systemRoot(), "System32", exe);
|
|
5544
|
+
var SYSTEM = {
|
|
5545
|
+
cmd: () => system32("cmd.exe"),
|
|
5546
|
+
powershell: () => system32("WindowsPowerShell\\v1.0\\powershell.exe"),
|
|
5547
|
+
tasklist: () => system32("tasklist.exe"),
|
|
5548
|
+
tar: () => system32("tar.exe"),
|
|
5549
|
+
reg: () => system32("reg.exe"),
|
|
5550
|
+
netsh: () => system32("netsh.exe"),
|
|
5551
|
+
netstat: () => system32("NETSTAT.EXE"),
|
|
5552
|
+
route: () => system32("ROUTE.EXE"),
|
|
5553
|
+
ipconfig: () => system32("ipconfig.exe"),
|
|
5554
|
+
robocopy: () => system32("Robocopy.exe"),
|
|
5555
|
+
shutdown: () => system32("shutdown.exe"),
|
|
5556
|
+
dism: () => system32("Dism.exe"),
|
|
5557
|
+
msiexec: () => system32("msiexec.exe")
|
|
5558
|
+
};
|
|
5559
|
+
|
|
5560
|
+
// src/shared/console-input.ts
|
|
5561
|
+
var script = (pid) => [
|
|
5562
|
+
'Add-Type -TypeDefinition @"',
|
|
5563
|
+
"using System; using System.Runtime.InteropServices;",
|
|
5564
|
+
"public static class SbxVtInput {",
|
|
5565
|
+
' [DllImport("kernel32.dll")] static extern bool FreeConsole();',
|
|
5566
|
+
' [DllImport("kernel32.dll")] static extern bool AttachConsole(uint pid);',
|
|
5567
|
+
' [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] static extern IntPtr CreateFileW(string name, uint access, uint share, IntPtr security, uint creation, uint flags, IntPtr template);',
|
|
5568
|
+
' [DllImport("kernel32.dll")] static extern bool GetConsoleMode(IntPtr handle, out uint mode);',
|
|
5569
|
+
' [DllImport("kernel32.dll")] static extern bool SetConsoleMode(IntPtr handle, uint mode);',
|
|
5570
|
+
' [DllImport("kernel32.dll")] static extern bool CloseHandle(IntPtr handle);',
|
|
5571
|
+
" public static int On(uint pid) {",
|
|
5572
|
+
" FreeConsole();",
|
|
5573
|
+
" if (!AttachConsole(pid)) return 2;",
|
|
5574
|
+
' IntPtr input = CreateFileW("CONIN$", 0xC0000000, 3, IntPtr.Zero, 3, 0, IntPtr.Zero);',
|
|
5575
|
+
" if (input == new IntPtr(-1)) return 3;",
|
|
5576
|
+
" uint mode; bool ok = GetConsoleMode(input, out mode) && SetConsoleMode(input, mode | 0x200);",
|
|
5577
|
+
" CloseHandle(input);",
|
|
5578
|
+
" FreeConsole();",
|
|
5579
|
+
" return ok ? 0 : 4;",
|
|
5580
|
+
" }",
|
|
5581
|
+
"}",
|
|
5582
|
+
'"@',
|
|
5583
|
+
"exit [SbxVtInput]::On(" + pid + ")"
|
|
5584
|
+
].join("\n");
|
|
5585
|
+
var enableVtInput = () => {
|
|
5586
|
+
if (process.platform !== "win32" || !process.stdin.isTTY) return { ready: Promise.resolve(false), stop: () => Promise.resolve() };
|
|
5587
|
+
let child = null;
|
|
5588
|
+
let exited = Promise.resolve();
|
|
5589
|
+
const ready = new Promise((resolve) => {
|
|
5590
|
+
try {
|
|
5591
|
+
child = spawn(SYSTEM.powershell(), ["-NoLogo", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-EncodedCommand", Buffer.from(script(process.pid), "utf16le").toString("base64")], { stdio: "ignore", windowsHide: true });
|
|
5592
|
+
} catch {
|
|
5593
|
+
resolve(false);
|
|
5594
|
+
return;
|
|
5595
|
+
}
|
|
5596
|
+
exited = new Promise((done) => {
|
|
5597
|
+
child?.on("exit", (code) => {
|
|
5598
|
+
resolve(code === 0);
|
|
5599
|
+
done();
|
|
5600
|
+
});
|
|
5601
|
+
child?.on("error", () => {
|
|
5602
|
+
resolve(false);
|
|
5603
|
+
done();
|
|
5604
|
+
});
|
|
5605
|
+
});
|
|
5606
|
+
});
|
|
5607
|
+
return { ready, stop: () => {
|
|
5608
|
+
if (child && child.exitCode === null && child.signalCode === null) child.kill();
|
|
5609
|
+
return exited;
|
|
5610
|
+
} };
|
|
5611
|
+
};
|
|
5612
|
+
|
|
5613
|
+
// src/shared/pty-client.ts
|
|
5614
|
+
var FrameType = { Hello: 1, Input: 2, Resize: 3, Restart: 4, Ping: 5, Output: 16, Exit: 17, Error: 18, Restarting: 19, Status: 20, Console: 21 };
|
|
5537
5615
|
var PING_INTERVAL_MS = 5e3;
|
|
5616
|
+
var MOUSE_OFF = "\x1B[?1000l\x1B[?1002l\x1B[?1003l\x1B[?1005l\x1B[?1006l\x1B[?1015l";
|
|
5538
5617
|
var encodeFrame = (type, payload = Buffer.alloc(0)) => {
|
|
5539
5618
|
const header = Buffer.alloc(5);
|
|
5540
5619
|
header.writeUInt8(type, 0);
|
|
@@ -5570,18 +5649,111 @@ var FrameReader = class {
|
|
|
5570
5649
|
return frames;
|
|
5571
5650
|
}
|
|
5572
5651
|
};
|
|
5652
|
+
var KEPT_OSC = (body) => {
|
|
5653
|
+
const number4 = /^(\d{1,4})(;|$)/.exec(body);
|
|
5654
|
+
if (!number4) return false;
|
|
5655
|
+
const n = Number(number4[1]);
|
|
5656
|
+
return n <= 2 || n === 8 || n === 133 || n === 9 && body.startsWith(number4[1] + ";4;");
|
|
5657
|
+
};
|
|
5658
|
+
var MAX_KEPT_STRING = 4096;
|
|
5573
5659
|
var OutputFilter = class {
|
|
5574
|
-
|
|
5660
|
+
/** text: normal output; esc: after ESC; c2: after a 0xC2 lead byte; string: inside an OSC/DCS/...; stringEsc / stringC2: a possible terminator inside one. */
|
|
5661
|
+
state = "text";
|
|
5662
|
+
/** The string being read: an OSC worth keeping is collected until its terminator; null = being dropped. */
|
|
5663
|
+
body = null;
|
|
5575
5664
|
push(chunk) {
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
const
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5665
|
+
const out = Buffer.allocUnsafe(chunk.length + MAX_KEPT_STRING + 8);
|
|
5666
|
+
let n = 0;
|
|
5667
|
+
const put = (...bytes) => {
|
|
5668
|
+
for (const b of bytes) out[n++] = b;
|
|
5669
|
+
};
|
|
5670
|
+
const opens = (b, c1) => {
|
|
5671
|
+
if (b === (c1 ? 157 : 93)) {
|
|
5672
|
+
this.body = c1 ? null : [];
|
|
5673
|
+
this.state = "string";
|
|
5674
|
+
return true;
|
|
5675
|
+
}
|
|
5676
|
+
if ((c1 ? [144, 152, 158, 159] : [80, 88, 94, 95]).includes(b)) {
|
|
5677
|
+
this.body = null;
|
|
5678
|
+
this.state = "string";
|
|
5679
|
+
return true;
|
|
5680
|
+
}
|
|
5681
|
+
return false;
|
|
5682
|
+
};
|
|
5683
|
+
const endString = (terminator) => {
|
|
5684
|
+
const body = this.body && Buffer.from(this.body).toString("latin1");
|
|
5685
|
+
if (body !== null && KEPT_OSC(body)) {
|
|
5686
|
+
put(27, 93);
|
|
5687
|
+
out.write(body, n, "latin1");
|
|
5688
|
+
n += body.length;
|
|
5689
|
+
put(...terminator);
|
|
5690
|
+
}
|
|
5691
|
+
this.body = null;
|
|
5692
|
+
this.state = "text";
|
|
5693
|
+
};
|
|
5694
|
+
const collect = (b) => {
|
|
5695
|
+
if (this.body && this.body.push(b) > MAX_KEPT_STRING) this.body = null;
|
|
5696
|
+
};
|
|
5697
|
+
for (const b of chunk) {
|
|
5698
|
+
switch (this.state) {
|
|
5699
|
+
case "text":
|
|
5700
|
+
if (b === 27) this.state = "esc";
|
|
5701
|
+
else if (b === 194) this.state = "c2";
|
|
5702
|
+
else put(b);
|
|
5703
|
+
break;
|
|
5704
|
+
case "esc":
|
|
5705
|
+
if (opens(b, false)) break;
|
|
5706
|
+
if (b !== 27) {
|
|
5707
|
+
put(27, b);
|
|
5708
|
+
this.state = "text";
|
|
5709
|
+
} else put(27);
|
|
5710
|
+
break;
|
|
5711
|
+
case "c2":
|
|
5712
|
+
if (opens(b, true)) break;
|
|
5713
|
+
if (b === 27) {
|
|
5714
|
+
put(194);
|
|
5715
|
+
this.state = "esc";
|
|
5716
|
+
} else if (b === 194) put(194);
|
|
5717
|
+
else {
|
|
5718
|
+
put(194, b);
|
|
5719
|
+
this.state = "text";
|
|
5720
|
+
}
|
|
5721
|
+
break;
|
|
5722
|
+
case "string":
|
|
5723
|
+
if (b === 7) endString([7]);
|
|
5724
|
+
else if (b === 27) this.state = "stringEsc";
|
|
5725
|
+
else if (b === 194) this.state = "stringC2";
|
|
5726
|
+
else if (b === 24 || b === 26) {
|
|
5727
|
+
this.body = null;
|
|
5728
|
+
this.state = "text";
|
|
5729
|
+
} else collect(b);
|
|
5730
|
+
break;
|
|
5731
|
+
case "stringC2":
|
|
5732
|
+
if (b === 156) endString([27, 92]);
|
|
5733
|
+
else {
|
|
5734
|
+
collect(194);
|
|
5735
|
+
this.state = "string";
|
|
5736
|
+
if (b === 7) endString([7]);
|
|
5737
|
+
else if (b === 27) this.state = "stringEsc";
|
|
5738
|
+
else if (b !== 194) collect(b);
|
|
5739
|
+
else this.state = "stringC2";
|
|
5740
|
+
}
|
|
5741
|
+
break;
|
|
5742
|
+
case "stringEsc":
|
|
5743
|
+
if (b === 92) {
|
|
5744
|
+
endString([27, 92]);
|
|
5745
|
+
break;
|
|
5746
|
+
}
|
|
5747
|
+
this.body = null;
|
|
5748
|
+
this.state = "esc";
|
|
5749
|
+
if (!opens(b, false) && b !== 27) {
|
|
5750
|
+
put(27, b);
|
|
5751
|
+
this.state = "text";
|
|
5752
|
+
}
|
|
5753
|
+
break;
|
|
5754
|
+
}
|
|
5583
5755
|
}
|
|
5584
|
-
return
|
|
5756
|
+
return out.subarray(0, n);
|
|
5585
5757
|
}
|
|
5586
5758
|
};
|
|
5587
5759
|
var connectOnce = (host, port, timeoutMs) => {
|
|
@@ -5617,6 +5789,34 @@ var fixWindowsKeys = (chunk) => {
|
|
|
5617
5789
|
if (!chunk.includes(8) && !chunk.includes(127)) return chunk;
|
|
5618
5790
|
return Buffer.from(chunk.map((b) => b === 8 ? 127 : b === 127 ? 8 : b));
|
|
5619
5791
|
};
|
|
5792
|
+
var JOIN_MS = 30;
|
|
5793
|
+
var MAX_HELD = 64;
|
|
5794
|
+
var InputJoiner = class {
|
|
5795
|
+
held = Buffer.alloc(0);
|
|
5796
|
+
/** The bytes to send now; an unfinished sequence at the end is kept for the next chunk. */
|
|
5797
|
+
push(chunk) {
|
|
5798
|
+
const data = this.held.length ? Buffer.concat([this.held, chunk]) : chunk;
|
|
5799
|
+
const cut = unfinishedSequence(data);
|
|
5800
|
+
this.held = Buffer.from(data.subarray(cut));
|
|
5801
|
+
return data.subarray(0, cut);
|
|
5802
|
+
}
|
|
5803
|
+
holding() {
|
|
5804
|
+
return this.held.length > 0;
|
|
5805
|
+
}
|
|
5806
|
+
flush() {
|
|
5807
|
+
const out = this.held;
|
|
5808
|
+
this.held = Buffer.alloc(0);
|
|
5809
|
+
return out;
|
|
5810
|
+
}
|
|
5811
|
+
};
|
|
5812
|
+
var unfinishedSequence = (data) => {
|
|
5813
|
+
const start = data.lastIndexOf(27, -1);
|
|
5814
|
+
if (start === -1 || data.length - start > MAX_HELD) return data.length;
|
|
5815
|
+
const rest = data.subarray(start + 1);
|
|
5816
|
+
if (rest.length === 0) return start;
|
|
5817
|
+
if (rest[0] === 91 || rest[0] === 79) return rest.subarray(1).every((b) => b >= 32 && b <= 63) && (rest[0] === 91 || rest.length === 1) ? start : data.length;
|
|
5818
|
+
return data.length;
|
|
5819
|
+
};
|
|
5620
5820
|
var runTerminalClient = (socket, token, options = {}) => {
|
|
5621
5821
|
const stdin = process.stdin;
|
|
5622
5822
|
const stdout = process.stdout;
|
|
@@ -5624,13 +5824,14 @@ var runTerminalClient = (socket, token, options = {}) => {
|
|
|
5624
5824
|
const [c, r] = stdout.isTTY ? stdout.getWindowSize() : [0, 0];
|
|
5625
5825
|
return [c || 120, r || 30];
|
|
5626
5826
|
};
|
|
5627
|
-
|
|
5827
|
+
let swapKeys = process.platform === "win32" && stdin.isTTY;
|
|
5628
5828
|
return new Promise((resolve) => {
|
|
5629
5829
|
let done = false;
|
|
5630
5830
|
const reader = new FrameReader();
|
|
5631
5831
|
const filter = new OutputFilter();
|
|
5632
5832
|
let sent = size();
|
|
5633
5833
|
let resizeTimer;
|
|
5834
|
+
let vtInput;
|
|
5634
5835
|
const finish = (result) => {
|
|
5635
5836
|
if (done) return;
|
|
5636
5837
|
done = true;
|
|
@@ -5639,24 +5840,35 @@ var runTerminalClient = (socket, token, options = {}) => {
|
|
|
5639
5840
|
clearTimeout(resizeTimer);
|
|
5640
5841
|
clearInterval(heartbeat);
|
|
5641
5842
|
clearInterval(sizeWatch);
|
|
5642
|
-
|
|
5643
|
-
stdin.pause();
|
|
5843
|
+
clearTimeout(joinTimer);
|
|
5644
5844
|
socket.destroy();
|
|
5645
|
-
stdout.write("\x1B[0m\x1B[?25h\r\n");
|
|
5646
|
-
resolve(
|
|
5845
|
+
stdout.write("\x1B[0m\x1B[?25h" + MOUSE_OFF + "\r\n");
|
|
5846
|
+
void (vtInput?.stop() ?? Promise.resolve()).then(() => {
|
|
5847
|
+
if (stdin.isTTY) stdin.setRawMode(false);
|
|
5848
|
+
stdin.pause();
|
|
5849
|
+
resolve(result);
|
|
5850
|
+
});
|
|
5851
|
+
};
|
|
5852
|
+
const joiner = new InputJoiner();
|
|
5853
|
+
let joinTimer;
|
|
5854
|
+
const sendInput = (data) => {
|
|
5855
|
+
if (data.length && !done) socket.write(encodeFrame(FrameType.Input, swapKeys ? fixWindowsKeys(data) : data));
|
|
5647
5856
|
};
|
|
5648
5857
|
const onInput = (chunk) => {
|
|
5649
5858
|
if (options.detachKey !== void 0 && chunk.includes(options.detachKey)) {
|
|
5650
5859
|
finish({ reason: "detach" });
|
|
5651
5860
|
return;
|
|
5652
5861
|
}
|
|
5653
|
-
|
|
5862
|
+
clearTimeout(joinTimer);
|
|
5863
|
+
sendInput(joiner.push(chunk));
|
|
5864
|
+
if (joiner.holding()) joinTimer = setTimeout(() => sendInput(joiner.flush()), JOIN_MS);
|
|
5654
5865
|
};
|
|
5866
|
+
let passthrough = false;
|
|
5655
5867
|
const sendSize = () => {
|
|
5656
5868
|
const [c2, r2] = size();
|
|
5657
5869
|
if (c2 === sent[0] && r2 === sent[1]) return;
|
|
5658
5870
|
sent = [c2, r2];
|
|
5659
|
-
stdout.write("\x1B[H\x1B[J");
|
|
5871
|
+
if (!passthrough) stdout.write("\x1B[H\x1B[J");
|
|
5660
5872
|
socket.write(resizeFrame(c2, r2));
|
|
5661
5873
|
};
|
|
5662
5874
|
const onResize = () => {
|
|
@@ -5680,7 +5892,8 @@ var runTerminalClient = (socket, token, options = {}) => {
|
|
|
5680
5892
|
}
|
|
5681
5893
|
for (const frame of frames) {
|
|
5682
5894
|
if (frame.type === FrameType.Output) stdout.write(filter.push(frame.payload));
|
|
5683
|
-
else if (frame.type === FrameType.
|
|
5895
|
+
else if (frame.type === FrameType.Console) passthrough = frame.payload.toString("latin1") === "conpty.dll";
|
|
5896
|
+
else if (frame.type === FrameType.Restarting) stdout.write(MOUSE_OFF + "\x1B[2J\x1B[3J\x1B[H");
|
|
5684
5897
|
else if (frame.type === FrameType.Exit) finish({ reason: "exit", exitCode: frame.payload.length >= 4 ? frame.payload.readInt32LE(0) : 1 });
|
|
5685
5898
|
else if (frame.type === FrameType.Error) finish({ reason: "error", message: frame.payload.toString("utf8").slice(0, 500).replace(/[\x00-\x1f\x7f]/g, " ") });
|
|
5686
5899
|
}
|
|
@@ -5691,6 +5904,10 @@ var runTerminalClient = (socket, token, options = {}) => {
|
|
|
5691
5904
|
stdout.write("\x1B[2J\x1B[3J\x1B[H");
|
|
5692
5905
|
socket.write(helloFrame(token, c, r));
|
|
5693
5906
|
if (stdin.isTTY) stdin.setRawMode(true);
|
|
5907
|
+
vtInput = enableVtInput();
|
|
5908
|
+
void vtInput.ready.then((on) => {
|
|
5909
|
+
if (on) swapKeys = false;
|
|
5910
|
+
});
|
|
5694
5911
|
stdin.on("data", onInput);
|
|
5695
5912
|
stdin.resume();
|
|
5696
5913
|
stdout.on("resize", onResize);
|
|
@@ -5699,7 +5916,7 @@ var runTerminalClient = (socket, token, options = {}) => {
|
|
|
5699
5916
|
|
|
5700
5917
|
// src/shared/rundir.ts
|
|
5701
5918
|
import fs from "node:fs";
|
|
5702
|
-
import
|
|
5919
|
+
import path2 from "node:path";
|
|
5703
5920
|
|
|
5704
5921
|
// node_modules/zod/v4/classic/external.js
|
|
5705
5922
|
var external_exports = {};
|
|
@@ -6517,10 +6734,10 @@ function mergeDefs(...defs) {
|
|
|
6517
6734
|
function cloneDef(schema) {
|
|
6518
6735
|
return mergeDefs(schema._zod.def);
|
|
6519
6736
|
}
|
|
6520
|
-
function getElementAtPath(obj,
|
|
6521
|
-
if (!
|
|
6737
|
+
function getElementAtPath(obj, path4) {
|
|
6738
|
+
if (!path4)
|
|
6522
6739
|
return obj;
|
|
6523
|
-
return
|
|
6740
|
+
return path4.reduce((acc, key) => acc?.[key], obj);
|
|
6524
6741
|
}
|
|
6525
6742
|
function promiseAllObject(promisesObj) {
|
|
6526
6743
|
const keys = Object.keys(promisesObj);
|
|
@@ -6860,11 +7077,11 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
6860
7077
|
}
|
|
6861
7078
|
return false;
|
|
6862
7079
|
}
|
|
6863
|
-
function prefixIssues(
|
|
7080
|
+
function prefixIssues(path4, issues) {
|
|
6864
7081
|
return issues.map((iss) => {
|
|
6865
7082
|
var _a3;
|
|
6866
7083
|
(_a3 = iss).path ?? (_a3.path = []);
|
|
6867
|
-
iss.path.unshift(
|
|
7084
|
+
iss.path.unshift(path4);
|
|
6868
7085
|
return iss;
|
|
6869
7086
|
});
|
|
6870
7087
|
}
|
|
@@ -7314,16 +7531,16 @@ function flattenError(error62, mapper = (issue2) => issue2.message) {
|
|
|
7314
7531
|
}
|
|
7315
7532
|
function formatError(error62, mapper = (issue2) => issue2.message) {
|
|
7316
7533
|
const fieldErrors = { _errors: [] };
|
|
7317
|
-
const processError = (error63,
|
|
7534
|
+
const processError = (error63, path4 = []) => {
|
|
7318
7535
|
for (const issue2 of error63.issues) {
|
|
7319
7536
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
7320
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
7537
|
+
issue2.errors.map((issues) => processError({ issues }, [...path4, ...issue2.path]));
|
|
7321
7538
|
} else if (issue2.code === "invalid_key") {
|
|
7322
|
-
processError({ issues: issue2.issues }, [...
|
|
7539
|
+
processError({ issues: issue2.issues }, [...path4, ...issue2.path]);
|
|
7323
7540
|
} else if (issue2.code === "invalid_element") {
|
|
7324
|
-
processError({ issues: issue2.issues }, [...
|
|
7541
|
+
processError({ issues: issue2.issues }, [...path4, ...issue2.path]);
|
|
7325
7542
|
} else {
|
|
7326
|
-
const fullpath = [...
|
|
7543
|
+
const fullpath = [...path4, ...issue2.path];
|
|
7327
7544
|
if (fullpath.length === 0) {
|
|
7328
7545
|
fieldErrors._errors.push(mapper(issue2));
|
|
7329
7546
|
} else {
|
|
@@ -7362,17 +7579,17 @@ function formatError(error62, mapper = (issue2) => issue2.message) {
|
|
|
7362
7579
|
}
|
|
7363
7580
|
function treeifyError(error62, mapper = (issue2) => issue2.message) {
|
|
7364
7581
|
const result = { errors: [] };
|
|
7365
|
-
const processError = (error63,
|
|
7582
|
+
const processError = (error63, path4 = []) => {
|
|
7366
7583
|
var _a3;
|
|
7367
7584
|
for (const issue2 of error63.issues) {
|
|
7368
7585
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
7369
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
7586
|
+
issue2.errors.map((issues) => processError({ issues }, [...path4, ...issue2.path]));
|
|
7370
7587
|
} else if (issue2.code === "invalid_key") {
|
|
7371
|
-
processError({ issues: issue2.issues }, [...
|
|
7588
|
+
processError({ issues: issue2.issues }, [...path4, ...issue2.path]);
|
|
7372
7589
|
} else if (issue2.code === "invalid_element") {
|
|
7373
|
-
processError({ issues: issue2.issues }, [...
|
|
7590
|
+
processError({ issues: issue2.issues }, [...path4, ...issue2.path]);
|
|
7374
7591
|
} else {
|
|
7375
|
-
const fullpath = [...
|
|
7592
|
+
const fullpath = [...path4, ...issue2.path];
|
|
7376
7593
|
if (fullpath.length === 0) {
|
|
7377
7594
|
result.errors.push(mapper(issue2));
|
|
7378
7595
|
continue;
|
|
@@ -7411,8 +7628,8 @@ function treeifyError(error62, mapper = (issue2) => issue2.message) {
|
|
|
7411
7628
|
}
|
|
7412
7629
|
function toDotPath(_path) {
|
|
7413
7630
|
const segs = [];
|
|
7414
|
-
const
|
|
7415
|
-
for (const seg of
|
|
7631
|
+
const path4 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
7632
|
+
for (const seg of path4) {
|
|
7416
7633
|
if (typeof seg === "number")
|
|
7417
7634
|
segs.push(`[${seg}]`);
|
|
7418
7635
|
else if (typeof seg === "symbol")
|
|
@@ -24514,13 +24731,13 @@ function resolveRef(ref, ctx) {
|
|
|
24514
24731
|
if (!ref.startsWith("#")) {
|
|
24515
24732
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
24516
24733
|
}
|
|
24517
|
-
const
|
|
24518
|
-
if (
|
|
24734
|
+
const path4 = ref.slice(1).split("/").filter(Boolean);
|
|
24735
|
+
if (path4.length === 0) {
|
|
24519
24736
|
return ctx.rootSchema;
|
|
24520
24737
|
}
|
|
24521
24738
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
24522
|
-
if (
|
|
24523
|
-
const key =
|
|
24739
|
+
if (path4[0] === defsKey) {
|
|
24740
|
+
const key = path4[1] === void 0 ? void 0 : decodeJSONPointerSegment(path4[1]);
|
|
24524
24741
|
if (!key || !ctx.defs[key]) {
|
|
24525
24742
|
throw new Error(`Reference not found: ${ref}`);
|
|
24526
24743
|
}
|
|
@@ -25473,15 +25690,17 @@ var ClaudeProfile = external_exports.strictObject({
|
|
|
25473
25690
|
globalStateFile: external_exports.string().describe('Your .claude.json, or "auto". Empty string = do not copy.'),
|
|
25474
25691
|
copyCredentials: external_exports.boolean().describe("Copy your Claude LOGIN into the sandbox. Prefer sandbox account instead."),
|
|
25475
25692
|
overwrite: external_exports.boolean().describe("Refresh these settings from this PC on every launch."),
|
|
25476
|
-
syncHistory: external_exports.boolean().describe("Bring
|
|
25477
|
-
|
|
25693
|
+
syncHistory: external_exports.boolean().describe("Bring conversation history in, and sync new history back (path-translated)."),
|
|
25694
|
+
historyScope: external_exports.enum(["project", "all"]).describe(`Which history comes in: "project" = only the projects in this sandbox (other projects' conversations, file backups and prompts stay on this PC), "all" = everything. Only this sandbox's projects ever sync back.`),
|
|
25695
|
+
syncClaudeMem: external_exports.boolean().describe("Bring claude-mem data into the sandbox (its settings and backups stay on this PC)."),
|
|
25696
|
+
syncClaudeMemBack: external_exports.boolean().describe("Also copy claude-mem's database back to this PC when the sandbox closes. Off by default: what is in it is loaded into every Claude session on this PC, so a compromised agent could plant instructions there.")
|
|
25478
25697
|
});
|
|
25479
25698
|
|
|
25480
25699
|
// src/core/schema/sandbox.ts
|
|
25481
25700
|
var GuestWorkspace = external_exports.union([external_exports.literal("auto"), external_exports.literal("mirror"), GuestPath]).describe('Where the workspace appears inside the sandbox. "auto" = C:\\Workspace\\<folder name>. "mirror" = the same path as on this PC, so absolute paths in configs and build caches match (another drive letter such as F: is a subst drive onto C:\\Mirror\\F); paths the sandbox reserves (C:\\Users\\..., C:\\Program Files\\...) fall back to "auto".');
|
|
25482
25701
|
var Mapping = external_exports.strictObject({
|
|
25483
25702
|
host: external_exports.string().min(1).describe("Folder on this PC (relative paths are relative to the config file)."),
|
|
25484
|
-
guest:
|
|
25703
|
+
guest: external_exports.string().min(1).max(1024).optional().describe("Where it appears inside the sandbox, e.g. C:\\Assets, or on another drive letter (D: to Z:) such as F:\\SteamLibrary\\steamapps\\common\\Game (shown as F: at boot). Leave it out to use the same path as on this PC (a folder inside the project stays where it is in the project). A path the sandbox cannot use (C:\\Windows\\..., C:\\Users\\..., one already in use) goes to C:\\Mapped\\<drive>\\<path> instead, and the launch says so."),
|
|
25485
25704
|
readOnly: external_exports.boolean().describe("true = the agent can only read it."),
|
|
25486
25705
|
optional: external_exports.boolean().optional().describe("true = skip it quietly when the host folder does not exist.")
|
|
25487
25706
|
});
|
|
@@ -25490,6 +25709,7 @@ var Sandbox = external_exports.strictObject({
|
|
|
25490
25709
|
maxMemoryMb: external_exports.number().int().positive().describe('Upper limit for memoryMb "auto".'),
|
|
25491
25710
|
maxMemoryPercent: external_exports.number().int().min(10).max(100).describe(`memoryMb "auto" never takes more than this share of this PC's total RAM (percent).`),
|
|
25492
25711
|
cpuLimit: external_exports.union([external_exports.literal("none"), external_exports.number().int().min(5).max(100)]).describe(`Most of this PC's CPU the sandbox may use, in percent (5-100), e.g. 50 keeps half free for you; "none" = no cap (Windows Sandbox would take every processor). Covers everything this tool starts in the sandbox (agents, installs, builds, its terminal).`),
|
|
25712
|
+
pageFileMb: external_exports.number().int().min(0).max(262144).describe(`Size of the sandbox's paging file in MB, created at full size when it starts so it never grows while builds run (8 GB of its disk always stays free). Windows Sandbox starts with about 1 GB: parallel builds then fail with "The paging file is too small", and Windows grows the file under load. 0 = leave Windows' own.`),
|
|
25493
25713
|
reserveHostMb: external_exports.number().int().nonnegative().describe('RAM always left for this PC when memoryMb is "auto".'),
|
|
25494
25714
|
vGpu: external_exports.boolean().describe("Virtual GPU. Off by default: Microsoft notes it widens the sandbox attack surface."),
|
|
25495
25715
|
networking: external_exports.boolean().describe("Internet access. false is the only hard network isolation Windows Sandbox offers."),
|
|
@@ -25498,7 +25718,33 @@ var Sandbox = external_exports.strictObject({
|
|
|
25498
25718
|
videoInput: external_exports.boolean().describe("Camera access."),
|
|
25499
25719
|
printerRedirection: external_exports.boolean().describe("Printers from this PC."),
|
|
25500
25720
|
protectedClient: external_exports.boolean().describe("Run the sandbox window in Protected Client mode (recommended)."),
|
|
25501
|
-
headless: external_exports.boolean().describe("Hide the sandbox window (sbx-show brings it back). A headless sandbox shuts down when its last session ends.")
|
|
25721
|
+
headless: external_exports.boolean().describe("Hide the sandbox window (sbx-show brings it back). A headless sandbox shuts down when its last session ends."),
|
|
25722
|
+
keepAwake: external_exports.boolean().describe("Keep this PC from sleeping while a sandbox runs, so agents left working overnight keep going (the screen may still turn off; closing a laptop lid still sleeps it).")
|
|
25723
|
+
});
|
|
25724
|
+
var Port2 = external_exports.number().int().min(1).max(65535);
|
|
25725
|
+
var HostEntry = external_exports.string().max(253).regex(/^(@developer|(\*\.)?([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+)$/, "a host name like example.com, *.example.com, or @developer");
|
|
25726
|
+
var Network = external_exports.strictObject({
|
|
25727
|
+
blockPrivateRanges: external_exports.boolean().describe("Block your LAN (10/8, 172.16/12, 192.168/16, SMB) from inside the sandbox."),
|
|
25728
|
+
allowOnly: external_exports.array(HostEntry).describe("Only these hosts can be reached once the sandbox is set up (tools still download first). *.example.com covers its subdomains; @developer adds package registries, GitHub, toolchain downloads and the AI providers. Programs go through a proxy in the sandbox (HTTP_PROXY); anything else is blocked by its firewall. Empty = no limit."),
|
|
25729
|
+
blockHosts: external_exports.array(external_exports.string().max(253).regex(/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/, "a host name like telemetry.example.com")).describe("Never reachable from the sandbox, e.g. production servers or telemetry (each exact name; the sandbox's hosts file sends them nowhere)."),
|
|
25730
|
+
forwardPorts: external_exports.array(external_exports.strictObject({
|
|
25731
|
+
pc: Port2.describe("The port on this PC (localhost only)."),
|
|
25732
|
+
sandbox: Port2.describe("The port inside the sandbox (a server there may listen on localhost only).")
|
|
25733
|
+
})).describe("Reach servers in the sandbox from this PC: http://localhost:<pc> here goes to <sandbox> inside, while it runs. Nothing else on your network can use them."),
|
|
25734
|
+
dns: external_exports.array(external_exports.string().regex(/^\d{1,3}(\.\d{1,3}){3}$/, "an IPv4 address like 1.1.1.1")).describe("DNS servers for the sandbox instead of your network's, e.g. 1.1.1.1 and 9.9.9.9."),
|
|
25735
|
+
proxy: external_exports.string().regex(/^(https?:\/\/[^\s]+)?$/, "http://host:port").describe("An HTTP proxy the sandbox uses to reach the internet (HTTP_PROXY / HTTPS_PROXY for everything in it), e.g. http://proxy.corp:8080. Empty = none.")
|
|
25736
|
+
});
|
|
25737
|
+
var Audit = external_exports.strictObject({
|
|
25738
|
+
enabled: external_exports.boolean().describe("Keep an audit log on this PC of what happened in your sandboxes: programs started (with their command lines), files changed in the project, sessions, and what the repo guard caught. The sandbox cannot change it. Read it with sandbox audit."),
|
|
25739
|
+
days: external_exports.number().int().min(1).max(365).describe("Days the audit log is kept."),
|
|
25740
|
+
maxMb: external_exports.number().int().min(5).max(5e3).describe("Most space the audit log may take, in MB (older days go first). Days before today are compressed."),
|
|
25741
|
+
processes: external_exports.boolean().describe("Record every program started in the sandbox with its command line (Windows process auditing; repeated runs are counted, not listed)."),
|
|
25742
|
+
files: external_exports.boolean().describe("Record the files changed in the project while the sandbox runs.")
|
|
25743
|
+
});
|
|
25744
|
+
var WorkspaceFilter = external_exports.strictObject({
|
|
25745
|
+
enabled: external_exports.boolean().describe("Keep what your .gitignore lists (.env files, node_modules, build output ...) out of the sandbox. The sandbox works on a copy of the project without those files, kept in step with it both ways within about a second; what it creates that is ignored (its own node_modules, builds) stays in the sandbox. Git works as usual. Off = the project folder itself is mapped."),
|
|
25746
|
+
exclude: external_exports.array(external_exports.string().max(500)).describe("Also keep these out, as .gitignore patterns, e.g. secrets/, *.pem, data/private/."),
|
|
25747
|
+
include: external_exports.array(external_exports.string().max(500)).describe("Let these in although .gitignore lists them, e.g. .env.example, data/fixtures/.")
|
|
25502
25748
|
});
|
|
25503
25749
|
var Git = external_exports.strictObject({ enabled: external_exports.boolean().describe("Provide Git for Windows (and Git Bash, which Claude Code needs)."), access: GitAccess });
|
|
25504
25750
|
var Provisioning = external_exports.strictObject({
|
|
@@ -25506,7 +25752,8 @@ var Provisioning = external_exports.strictObject({
|
|
|
25506
25752
|
fallbackToInstall: external_exports.boolean().describe("Download anything that cannot be copied from this PC."),
|
|
25507
25753
|
refresh: external_exports.boolean().describe("Re-copy / re-download everything on the next launch."),
|
|
25508
25754
|
git: Git,
|
|
25509
|
-
terminal: toggle("Windows Terminal as the sandbox window (downloaded once).")
|
|
25755
|
+
terminal: toggle("Windows Terminal as the sandbox window (downloaded once)."),
|
|
25756
|
+
conpty: toggle("Agent sessions use Microsoft's newer pseudo console (conpty.dll, downloaded once) instead of the one built into Windows: no garbled screen after resizing, real scrollback for the mouse wheel. Off = the one built into Windows.")
|
|
25510
25757
|
});
|
|
25511
25758
|
var Downloads = external_exports.strictObject({
|
|
25512
25759
|
requireChecksum: external_exports.boolean().describe("Refuse any toolchain, database or tool download that has no published checksum (SHA-256/SHA-512) to verify it against. false = allow those, as before. Downloads that do have a published checksum are always verified. A project's .sandbox-config.json can only turn this on.")
|
|
@@ -25590,10 +25837,119 @@ var Toolchains = external_exports.strictObject({
|
|
|
25590
25837
|
enabled: external_exports.boolean().describe("Mesa 3D (llvmpipe): OpenGL 4.5 in software for games and apps when there is no GPU (sandbox.vGpu off). Copy opengl32.dll and libgallium_wgl.dll from %MESA_DIR% next to the program's .exe."),
|
|
25591
25838
|
vulkan: external_exports.boolean().describe("Also software Vulkan 1.4 (Mesa lavapipe) with the Khronos loader, registered for every program; for wgpu set WGPU_BACKEND=vulkan.")
|
|
25592
25839
|
}),
|
|
25593
|
-
vscode:
|
|
25840
|
+
vscode: external_exports.strictObject({
|
|
25841
|
+
enabled: external_exports.boolean().describe("Portable VS Code inside the sandbox (code on PATH, desktop shortcut); its settings and extensions persist."),
|
|
25842
|
+
setup: external_exports.boolean().describe("Point VS Code at the sandbox's own tools (JDK, Python, Go, compilers, .NET, Git, PowerShell 7 and Git Bash terminals) and install the language extensions for the toolchains in use."),
|
|
25843
|
+
recommended: external_exports.boolean().describe("Also install the extensions a project recommends in its .vscode/extensions.json."),
|
|
25844
|
+
extensions: external_exports.array(external_exports.string().regex(/^[\w-]+\.[\w-]+$/, "publisher.name, e.g. eamodio.gitlens")).describe("More extensions to install in every sandbox, e.g. eamodio.gitlens, ms-azuretools.vscode-docker.")
|
|
25845
|
+
}),
|
|
25594
25846
|
environment: external_exports.record(external_exports.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/, "letters, digits and _ only"), external_exports.string()).describe('Extra environment variables for the agent and every terminal, e.g. registry mirrors: {"NPM_CONFIG_REGISTRY": "https://...", "PIP_INDEX_URL": "https://..."}.')
|
|
25595
25847
|
});
|
|
25596
25848
|
|
|
25849
|
+
// src/shared/apps.ts
|
|
25850
|
+
var gh = (github, asset) => ({ github, asset });
|
|
25851
|
+
var APPS = [
|
|
25852
|
+
// ---- editors
|
|
25853
|
+
{ id: "vscode", name: "Visual Studio Code", category: "editors", about: "Code editor with debugging, set up for the sandbox's languages.", size: "150 MB", source: { resolve: "setting" }, exe: "Code.exe", setting: "toolchains.vscode.enabled" },
|
|
25854
|
+
{ id: "windows-terminal", name: "Windows Terminal", category: "utilities", about: "The sandbox window: tabs, panes, PowerShell 7 profile.", size: "40 MB", source: { resolve: "setting" }, exe: "WindowsTerminal.exe", setting: "provisioning.terminal.enabled" },
|
|
25855
|
+
{ id: "notepadpp", name: "Notepad++", category: "editors", about: "Fast text and code editor.", size: "8 MB", source: gh("notepad-plus-plus/notepad-plus-plus", "^npp\\.[\\d.]+\\.portable\\.x64\\.zip$"), exe: "notepad++.exe" },
|
|
25856
|
+
{ id: "sublime", name: "Sublime Text", category: "editors", about: "Fast code editor (paid licence, free to evaluate).", size: "28 MB", source: { resolve: "sublime" }, exe: "sublime_text.exe" },
|
|
25857
|
+
{ id: "neovim", name: "Neovim", category: "editors", about: "Terminal text editor (nvim).", size: "12 MB", source: gh("neovim/neovim", "^nvim-win64\\.zip$"), exe: "nvim.exe", cli: true },
|
|
25858
|
+
// ---- database clients
|
|
25859
|
+
{ id: "dbeaver", name: "DBeaver Community", category: "databases", about: "Universal database client: PostgreSQL, MySQL, SQLite, SQL Server and more.", size: "120 MB", source: gh("dbeaver/dbeaver", "^dbeaver-ce-[\\d.]+-windows-x86_64\\.zip$"), exe: "dbeaver.exe" },
|
|
25860
|
+
{ id: "pgadmin", name: "pgAdmin 4", category: "databases", about: "The PostgreSQL admin GUI (from the PostgreSQL binaries zip).", size: "330 MB", source: { resolve: "pgadmin" }, exe: "pgAdmin4.exe" },
|
|
25861
|
+
{ id: "heidisql", name: "HeidiSQL", category: "databases", about: "Light client for MySQL, MariaDB, PostgreSQL and SQL Server.", size: "28 MB", source: gh("HeidiSQL/HeidiSQL", "^HeidiSQL_[\\d.]+_64_Portable\\.zip$"), exe: "heidisql.exe" },
|
|
25862
|
+
{ id: "sqlitebrowser", name: "DB Browser for SQLite", category: "databases", about: "Open, browse and edit SQLite files.", size: "21 MB", source: gh("sqlitebrowser/sqlitebrowser", "^DB\\.Browser\\.for\\.SQLite-v?[\\d.]+-win64\\.zip$"), exe: "DB Browser for SQLite.exe" },
|
|
25863
|
+
{ id: "compass", name: "MongoDB Compass", category: "databases", about: "The MongoDB GUI.", size: "220 MB", source: gh("mongodb-js/compass", "^mongodb-compass-[\\d.]+-win32-x64\\.zip$"), exe: "MongoDBCompass.exe" },
|
|
25864
|
+
{ id: "redisinsight", name: "Redis Insight", category: "databases", about: "The Redis GUI.", size: "110 MB", source: gh("redis/RedisInsight", "^Redis-Insight-win-installer\\.exe$"), unpack: "nsis", exe: "Redis Insight.exe", needs: ["7zip"] },
|
|
25865
|
+
{ id: "dbgate", name: "DbGate", category: "databases", about: "Database manager for SQL and NoSQL databases.", size: "180 MB", source: gh("dbgate/dbgate", "^dbgate-[\\d.]+-win_x64\\.zip$"), exe: "DbGate.exe" },
|
|
25866
|
+
{ id: "beekeeper", name: "Beekeeper Studio", category: "databases", about: "SQL editor and database manager.", size: "245 MB", source: gh("beekeeper-studio/beekeeper-studio", "^Beekeeper-Studio-[\\d.]+-portable\\.exe$"), unpack: "nsis", exe: "Beekeeper Studio.exe", needs: ["7zip"] },
|
|
25867
|
+
{ id: "dynamodb-admin", name: "dynamodb-admin", category: "databases", about: "Web GUI for DynamoDB Local: run dynamodb-admin, then open http://localhost:8001.", size: "5 MB", source: { npm: "dynamodb-admin" }, exe: "dynamodb-admin.cmd", cli: true },
|
|
25868
|
+
// ---- API clients
|
|
25869
|
+
{ id: "bruno", name: "Bruno", category: "api", about: "Offline, git-friendly API client (collections are files in your repo).", size: "175 MB", source: gh("usebruno/bruno", "^bruno_[\\d.]+_x64_win\\.zip$"), exe: "Bruno.exe" },
|
|
25870
|
+
{ id: "insomnia", name: "Insomnia", category: "api", about: "REST, GraphQL and gRPC client.", size: "590 MB", source: gh("Kong/insomnia", "^insomnia-[\\d.]+-full\\.nupkg$"), exe: "Insomnia.exe" },
|
|
25871
|
+
// ---- git
|
|
25872
|
+
{ id: "sourcegit", name: "SourceGit", category: "git", about: "Fast open-source Git GUI.", size: "26 MB", source: gh("sourcegit-scm/sourcegit", "^sourcegit_[\\d.]+\\.win-x64\\.zip$"), exe: "SourceGit.exe" },
|
|
25873
|
+
{ id: "githubdesktop", name: "GitHub Desktop", category: "git", about: 'Simple Git GUI from GitHub. It has its own git, so it needs provisioning.git.access "full".', size: "300 MB", source: gh("desktop/desktop", "^GitHubDesktop-[\\d.]+-x64-full\\.nupkg$"), exe: "GitHubDesktop.exe", fullGitOnly: true },
|
|
25874
|
+
{ id: "lazygit", name: "lazygit", category: "git", about: "Git in the terminal.", size: "7 MB", source: gh("jesseduffield/lazygit", "^lazygit_[\\d.]+_windows_x86_64\\.zip$"), exe: "lazygit.exe", cli: true },
|
|
25875
|
+
// ---- utilities
|
|
25876
|
+
{ id: "7zip", name: "7-Zip", category: "utilities", about: "Archive manager (7z, zip, rar, tar ...). Also unpacks installers for other apps.", size: "2 MB", source: { resolve: "7zip" }, exe: "7zFM.exe" },
|
|
25877
|
+
{ id: "winmerge", name: "WinMerge", category: "utilities", about: "Compare and merge files and folders.", size: "23 MB", source: gh("WinMerge/winmerge", "^winmerge-[\\d.]+-x64-exe\\.zip$"), exe: "WinMergeU.exe" },
|
|
25878
|
+
{ id: "everything", name: "Everything", category: "utilities", about: "Finds files by name instantly.", size: "2 MB", source: { resolve: "everything" }, exe: "Everything.exe" },
|
|
25879
|
+
{ id: "sysinternals", name: "Sysinternals Suite", category: "utilities", about: "Process Explorer, Process Monitor, Autoruns, TCPView and more (on PATH).", size: "200 MB", source: { url: "https://download.sysinternals.com/files/SysinternalsSuite.zip" }, exe: "procexp64.exe" },
|
|
25880
|
+
{ id: "imhex", name: "ImHex", category: "utilities", about: "Hex editor for reverse engineering and binary formats.", size: "80 MB", source: gh("WerWolv/ImHex", "^imhex-[\\d.]+-Windows-Portable-NoGPU-x86_64\\.zip$"), exe: "imhex-gui.exe" },
|
|
25881
|
+
// ---- browsers
|
|
25882
|
+
{ id: "chrome", name: "Chrome for Testing", category: "browsers", about: "Chrome build made for automated tests (with chromedriver on PATH).", size: "170 MB", source: { resolve: "chrome" }, exe: "chrome.exe" },
|
|
25883
|
+
{ id: "firefox", name: "Firefox", category: "browsers", about: "Firefox for testing.", size: "75 MB", source: { resolve: "firefox" }, unpack: "nsis", exe: "firefox.exe", needs: ["7zip"] },
|
|
25884
|
+
// ---- game development
|
|
25885
|
+
{ id: "godot", name: "Godot", category: "gamedev", about: "Open-source 2D and 3D game engine.", size: "80 MB", source: gh("godotengine/godot", "^Godot_v[\\d.]+-stable_win64\\.exe\\.zip$"), exe: "/^Godot_v[\\d.]+-stable_win64\\.exe$/", needs: ["mesa"] },
|
|
25886
|
+
{ id: "blender", name: "Blender", category: "gamedev", about: "3D modelling, animation and rendering.", size: "400 MB", source: { resolve: "blender" }, exe: "blender.exe", needs: ["mesa"] },
|
|
25887
|
+
{ id: "love", name: "L\xD6VE", category: "gamedev", about: "Lua framework for 2D games.", size: "4 MB", source: gh("love2d/love", "^love-[\\d.]+-win64\\.zip$"), exe: "love.exe", needs: ["mesa"] },
|
|
25888
|
+
{ id: "defold", name: "Defold", category: "gamedev", about: "Free 2D/3D game engine and editor.", size: "330 MB", source: gh("defold/defold", "^Defold-x86_64-win32\\.zip$"), exe: "Defold.exe", needs: ["mesa"] },
|
|
25889
|
+
{ id: "pixelorama", name: "Pixelorama", category: "gamedev", about: "Pixel-art and sprite editor.", size: "40 MB", source: gh("Orama-Interactive/Pixelorama", "^Pixelorama-Windows-64bit\\.zip$"), exe: "Pixelorama.exe", needs: ["mesa"] },
|
|
25890
|
+
{ id: "tiled", name: "Tiled", category: "gamedev", about: "Tile map editor.", size: "22 MB", source: gh("mapeditor/tiled", "^Tiled-[\\d.]+_Windows-10\\+_x86_64\\.msi$"), unpack: "msi", exe: "tiled.exe" },
|
|
25891
|
+
// ---- cloud
|
|
25892
|
+
{ id: "kubectl", name: "kubectl", category: "cloud", about: "Kubernetes command line.", size: "60 MB", source: { resolve: "kubectl" }, unpack: "file", exe: "kubectl.exe", cli: true },
|
|
25893
|
+
{ id: "helm", name: "Helm", category: "cloud", about: "Kubernetes package manager.", size: "20 MB", source: { resolve: "helm" }, exe: "helm.exe", cli: true },
|
|
25894
|
+
{ id: "k9s", name: "k9s", category: "cloud", about: "Kubernetes cluster UI in the terminal.", size: "40 MB", source: gh("derailed/k9s", "^k9s_Windows_amd64\\.zip$"), exe: "k9s.exe", cli: true },
|
|
25895
|
+
{ id: "terraform", name: "Terraform", category: "cloud", about: "Infrastructure as code.", size: "30 MB", source: { resolve: "terraform" }, exe: "terraform.exe", cli: true },
|
|
25896
|
+
{ id: "azure-cli", name: "Azure CLI", category: "cloud", about: "Manage Azure (az).", size: "90 MB", source: { url: "https://aka.ms/installazurecliwindowszipx64" }, exe: "az.cmd", cli: true },
|
|
25897
|
+
{ id: "gcloud", name: "Google Cloud CLI", category: "cloud", about: "Manage Google Cloud (gcloud, gsutil, bq).", size: "120 MB", source: { url: "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-windows-x86_64-bundled-python.zip" }, exe: "gcloud.cmd", cli: true },
|
|
25898
|
+
{ id: "aws-cli", name: "AWS CLI", category: "cloud", about: "Manage AWS (aws).", size: "50 MB", source: { url: "https://awscli.amazonaws.com/AWSCLIV2.msi" }, unpack: "msi", exe: "aws.exe", cli: true },
|
|
25899
|
+
// ---- diagrams and docs
|
|
25900
|
+
{ id: "drawio", name: "draw.io", category: "diagrams", about: "Diagram editor (flowcharts, architecture, UML).", size: "170 MB", source: gh("jgraph/drawio-desktop", "^draw\\.io-[\\d.]+-windows\\.zip$"), exe: "draw.io.exe" },
|
|
25901
|
+
{ id: "pandoc", name: "Pandoc", category: "diagrams", about: "Convert documents between Markdown, HTML, Word, PDF ...", size: "35 MB", source: gh("jgm/pandoc", "^pandoc-[\\d.]+-windows-x86_64\\.zip$"), exe: "pandoc.exe", cli: true },
|
|
25902
|
+
// ---- network
|
|
25903
|
+
{ id: "mitmproxy", name: "mitmproxy", category: "network", about: "Intercepting HTTPS proxy (mitmweb opens a web UI).", size: "90 MB", source: { resolve: "mitmproxy" }, exe: "mitmweb.exe", cli: true },
|
|
25904
|
+
{ id: "xh", name: "xh", category: "network", about: "Friendly HTTP requests from the terminal (like HTTPie).", size: "5 MB", source: gh("ducaale/xh", "^xh-v[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "xh.exe", cli: true },
|
|
25905
|
+
{ id: "grpcurl", name: "grpcurl", category: "network", about: "curl for gRPC servers.", size: "10 MB", source: gh("fullstorydev/grpcurl", "^grpcurl_[\\d.]+_windows_x86_64\\.zip$"), exe: "grpcurl.exe", cli: true },
|
|
25906
|
+
{ id: "k6", name: "k6", category: "network", about: "Load testing with JavaScript scripts.", size: "30 MB", source: gh("grafana/k6", "^k6-v[\\d.]+-windows-amd64\\.zip$"), exe: "k6.exe", cli: true },
|
|
25907
|
+
// ---- command-line tools
|
|
25908
|
+
{ id: "jq", name: "jq", category: "cli", about: "Query and reshape JSON.", size: "1 MB", source: gh("jqlang/jq", "^jq-windows-amd64\\.exe$"), unpack: "file", exe: "jq.exe", cli: true },
|
|
25909
|
+
{ id: "yq", name: "yq", category: "cli", about: "Query and edit YAML, JSON, XML and TOML.", size: "10 MB", source: gh("mikefarah/yq", "^yq_windows_amd64\\.exe$"), unpack: "file", exe: "yq.exe", cli: true },
|
|
25910
|
+
{ id: "ripgrep", name: "ripgrep", category: "cli", about: "Very fast recursive search (rg).", size: "2 MB", source: gh("BurntSushi/ripgrep", "^ripgrep-[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "rg.exe", cli: true },
|
|
25911
|
+
{ id: "fd", name: "fd", category: "cli", about: "Fast, friendly alternative to find.", size: "2 MB", source: gh("sharkdp/fd", "^fd-v[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "fd.exe", cli: true },
|
|
25912
|
+
{ id: "bat", name: "bat", category: "cli", about: "cat with syntax highlighting and git changes.", size: "3 MB", source: gh("sharkdp/bat", "^bat-v[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "bat.exe", cli: true },
|
|
25913
|
+
{ id: "fzf", name: "fzf", category: "cli", about: "Fuzzy finder for the terminal.", size: "2 MB", source: gh("junegunn/fzf", "^fzf-[\\d.]+-windows_amd64\\.zip$"), exe: "fzf.exe", cli: true },
|
|
25914
|
+
{ id: "delta", name: "delta", category: "cli", about: "Readable git diffs with syntax highlighting.", size: "3 MB", source: gh("dandavison/delta", "^delta-[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "delta.exe", cli: true },
|
|
25915
|
+
{ id: "just", name: "just", category: "cli", about: "Command runner (a simpler make for project tasks).", size: "2 MB", source: gh("casey/just", "^just-[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "just.exe", cli: true },
|
|
25916
|
+
{ id: "hyperfine", name: "hyperfine", category: "cli", about: "Benchmark commands.", size: "1 MB", source: gh("sharkdp/hyperfine", "^hyperfine-v[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "hyperfine.exe", cli: true },
|
|
25917
|
+
{ id: "watchexec", name: "watchexec", category: "cli", about: "Run a command when files change.", size: "5 MB", source: gh("watchexec/watchexec", "^watchexec-[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "watchexec.exe", cli: true },
|
|
25918
|
+
{ id: "protoc", name: "protoc", category: "cli", about: "Protocol Buffers compiler.", size: "3 MB", source: gh("protocolbuffers/protobuf", "^protoc-[\\d.]+-win64\\.zip$"), exe: "protoc.exe", cli: true },
|
|
25919
|
+
{ id: "ninja", name: "Ninja", category: "cli", about: "Small, fast build system (CMake's favourite generator).", size: "1 MB", source: gh("ninja-build/ninja", "^ninja-win\\.zip$"), exe: "ninja.exe", cli: true },
|
|
25920
|
+
{ id: "ffmpeg", name: "FFmpeg", category: "cli", about: "Convert and process audio and video.", size: "200 MB", source: gh("BtbN/FFmpeg-Builds", "^ffmpeg-master-latest-win64-gpl\\.zip$"), exe: "ffmpeg.exe", cli: true },
|
|
25921
|
+
{ id: "sqlite", name: "SQLite tools", category: "cli", about: "sqlite3 command-line shell.", size: "5 MB", source: { resolve: "sqlite" }, exe: "sqlite3.exe", cli: true },
|
|
25922
|
+
{ id: "shellcheck", name: "ShellCheck", category: "cli", about: "Finds bugs in shell scripts.", size: "10 MB", source: gh("koalaman/shellcheck", "^shellcheck-v[\\d.]+\\.zip$"), exe: "shellcheck.exe", cli: true },
|
|
25923
|
+
{ id: "gitleaks", name: "Gitleaks", category: "cli", about: "Finds secrets committed to git.", size: "8 MB", source: gh("gitleaks/gitleaks", "^gitleaks_[\\d.]+_windows_x64\\.zip$"), exe: "gitleaks.exe", cli: true }
|
|
25924
|
+
];
|
|
25925
|
+
|
|
25926
|
+
// src/core/schema/apps.ts
|
|
25927
|
+
var CATALOGUE_IDS = APPS.filter((a) => !a.setting).map((a) => a.id);
|
|
25928
|
+
var AppId = external_exports.enum(CATALOGUE_IDS);
|
|
25929
|
+
var CustomAppId = external_exports.string().regex(/^[a-z0-9][a-z0-9-]{0,40}$/, "lower-case letters, digits and - only");
|
|
25930
|
+
var compiles = (pattern) => {
|
|
25931
|
+
try {
|
|
25932
|
+
new RegExp(pattern);
|
|
25933
|
+
return true;
|
|
25934
|
+
} catch {
|
|
25935
|
+
return false;
|
|
25936
|
+
}
|
|
25937
|
+
};
|
|
25938
|
+
var CustomApp = external_exports.strictObject({
|
|
25939
|
+
name: external_exports.string().min(1).max(80).describe('The name on the desktop shortcut, e.g. "My Tool".'),
|
|
25940
|
+
github: external_exports.string().regex(/^[\w.-]+\/[\w.-]+$/, "owner/repo, e.g. sharkdp/bat").optional().describe("GitHub repository (owner/repo): the file comes from its latest release."),
|
|
25941
|
+
asset: external_exports.string().max(200).refine(compiles, "not a valid pattern").optional().describe("With github: a pattern (regular expression) matching the release file, e.g. windows.*x64\\.zip$"),
|
|
25942
|
+
url: external_exports.string().url().startsWith("https://", "https:// only").optional().describe("Or a direct https:// download link (zip, 7z, exe or msi)."),
|
|
25943
|
+
sha256: external_exports.string().regex(/^[0-9a-fA-F]{64}$/, "64 hex characters").optional().describe("SHA-256 of the download (GitHub releases usually publish one; then this is not needed)."),
|
|
25944
|
+
unpack: external_exports.enum(["archive", "file", "nsis", "msi"]).optional().describe("archive (zip, 7z, tar: the default), file (a single .exe), nsis (an installer 7-Zip can open) or msi."),
|
|
25945
|
+
exe: external_exports.string().min(1).max(200).describe("The program to start (found anywhere in the download), e.g. mytool.exe."),
|
|
25946
|
+
cli: external_exports.boolean().optional().describe("A command-line tool: its folder goes on PATH instead of getting a desktop shortcut.")
|
|
25947
|
+
}).refine((a) => a.github && a.asset ? !a.url : Boolean(a.url) && !a.github && !a.asset, { message: "give github + asset, or url (not both)" });
|
|
25948
|
+
var Apps = external_exports.strictObject({
|
|
25949
|
+
install: external_exports.array(AppId).describe("Apps from the catalogue to install in every sandbox (the Apps screen in the menu lists them by category). Each is downloaded once and kept."),
|
|
25950
|
+
custom: external_exports.record(CustomAppId, CustomApp).describe("Programs of your own: a GitHub release or a download link, and the program to start. Installed like the catalogue apps.")
|
|
25951
|
+
});
|
|
25952
|
+
|
|
25597
25953
|
// src/core/schema/projects.ts
|
|
25598
25954
|
var Projects = external_exports.strictObject({
|
|
25599
25955
|
all: external_exports.boolean().describe("Map every project you have started before (and every folder in your roots) at every start, except those in exclude, so all of them open in the running sandbox without a restart. Every agent in the sandbox can then see all of them. Each one is still only set up when you first use it."),
|
|
@@ -25601,6 +25957,7 @@ var Projects = external_exports.strictObject({
|
|
|
25601
25957
|
roots: external_exports.array(external_exports.string().min(1)).describe('Folders whose subfolders are your projects (e.g. "F:\\\\Code"), mapped read/write at every start. Any project inside one, including ones you create later, opens in the running sandbox at once, without a restart. Every agent in the sandbox can see all of them.'),
|
|
25602
25958
|
askToAddRoot: external_exports.boolean().describe("When you start a project whose parent folder is not a root yet, ask once whether to add it."),
|
|
25603
25959
|
declinedRoots: external_exports.array(external_exports.string().min(1)).describe("Parent folders you said no to (not asked again)."),
|
|
25960
|
+
allowOutsideMappings: external_exports.union([external_exports.literal("ask"), external_exports.boolean()]).describe(`A project's .sandbox-config.json may map folders from outside the project (e.g. a game folder on another drive). "ask" = an interactive launch asks once per project and set of folders, and remembers your answer; true = always allowed (still listed when you approve the file); false = never (the launch stops and says which folders). Only your own settings decide this, never a project file.`),
|
|
25604
25961
|
wsbShare: external_exports.boolean().describe("On Windows 11 24H2+ with the Windows Sandbox command line (wsb), add other folders to the running sandbox with `wsb share` (untested). Otherwise starting a project outside every root offers a restart.")
|
|
25605
25962
|
});
|
|
25606
25963
|
|
|
@@ -25610,14 +25967,18 @@ var Config = external_exports.strictObject({
|
|
|
25610
25967
|
defaultHarness: Name.describe("Agent started by `sandbox launch` (sandbox claude always runs claude)."),
|
|
25611
25968
|
guestWorkspace: GuestWorkspace,
|
|
25612
25969
|
readOnly: external_exports.boolean().describe("Map the workspace read-only."),
|
|
25970
|
+
workspaceFilter: WorkspaceFilter,
|
|
25971
|
+
audit: Audit,
|
|
25613
25972
|
mappings: external_exports.array(Mapping).describe("Extra folders from this PC."),
|
|
25614
25973
|
sandbox: Sandbox,
|
|
25615
25974
|
storage: external_exports.strictObject({
|
|
25616
25975
|
root: external_exports.string().min(1).describe("Where everything is kept on this PC (tools, databases, logins, launches)."),
|
|
25617
25976
|
persistAgentState: external_exports.boolean().describe("Keep agent logins and history between sandboxes."),
|
|
25618
|
-
dataName: Name.describe("Name of the persistent data set (C:\\AgentData) shared by all workspaces.")
|
|
25977
|
+
dataName: Name.describe("Name of the persistent data set (C:\\AgentData) shared by all workspaces."),
|
|
25978
|
+
markSandboxFiles: external_exports.boolean().describe(`Programs and scripts (.exe, .ps1, .bat, .cmd, .msi, .lnk ...) that appear or change in your project while a sandbox runs get Windows' "downloaded from the internet" mark, so SmartScreen and PowerShell ask before they run on this PC.`),
|
|
25979
|
+
warnDataGb: external_exports.number().min(0).describe("Say at launch when the persisted data (tools, databases, logins) is bigger than this many GB; 0 = never. sandbox data shows what takes the space.")
|
|
25619
25980
|
}),
|
|
25620
|
-
network:
|
|
25981
|
+
network: Network,
|
|
25621
25982
|
provisioning: Provisioning,
|
|
25622
25983
|
downloads: Downloads,
|
|
25623
25984
|
toolchains: Toolchains,
|
|
@@ -25626,6 +25987,7 @@ var Config = external_exports.strictObject({
|
|
|
25626
25987
|
agentCommands: AgentCommands,
|
|
25627
25988
|
secrets: Secrets,
|
|
25628
25989
|
personalization: toggle("Copy your desktop look (theme, accent, taskbar, wallpaper, ...) into the sandbox."),
|
|
25990
|
+
apps: Apps,
|
|
25629
25991
|
claudeProfile: ClaudeProfile,
|
|
25630
25992
|
harnesses: external_exports.record(Name, Harness).describe("Agents that can run in the sandbox."),
|
|
25631
25993
|
hooks: external_exports.strictObject({ failFast: external_exports.boolean().describe("Stop when a hook script fails.") }),
|
|
@@ -25636,10 +25998,14 @@ var LocalOverrides = external_exports.strictObject({
|
|
|
25636
25998
|
harness: Name.describe("Agent for this project."),
|
|
25637
25999
|
guestWorkspace: GuestWorkspace,
|
|
25638
26000
|
readOnly: external_exports.boolean().describe("Map this project read-only."),
|
|
25639
|
-
|
|
26001
|
+
// A project may turn the filter on and keep more out, never let ignored files in.
|
|
26002
|
+
workspaceFilter: WorkspaceFilter.pick({ enabled: true, exclude: true }).partial(),
|
|
26003
|
+
mappings: external_exports.array(Mapping).describe("Extra folders (relative paths are relative to this file), e.g. a read-only data folder at another place in the sandbox. Folders outside the project are used only as your projects.allowOutsideMappings setting allows (by default you are asked once)."),
|
|
25640
26004
|
scripts: Strings.describe("Scripts (.ps1 / .mjs / .cmd, relative to this file) run inside the sandbox before the agent."),
|
|
25641
|
-
|
|
25642
|
-
|
|
26005
|
+
// This PC's resources are yours to share: CPU and paging file (this PC's disk) are not a project's to set.
|
|
26006
|
+
sandbox: Sandbox.omit({ cpuLimit: true, pageFileMb: true }).partial(),
|
|
26007
|
+
// A project may block more (the LAN, hosts); it never opens hosts, ports, DNS or a proxy.
|
|
26008
|
+
network: Network.pick({ blockPrivateRanges: true, blockHosts: true }).partial(),
|
|
25643
26009
|
provisioning: Provisioning.pick({ copyFromHost: true, fallbackToInstall: true, refresh: true }).extend({ git: Git.partial(), terminal: toggle("Windows Terminal as the sandbox window.").partial() }).partial(),
|
|
25644
26010
|
downloads: Downloads.partial(),
|
|
25645
26011
|
// Every toolchain setting, each one optional (a project usually only switches languages on or pins a version).
|
|
@@ -25650,7 +26016,9 @@ var LocalOverrides = external_exports.strictObject({
|
|
|
25650
26016
|
databases: external_exports.strictObject(import_lodash.default.mapValues(Databases.shape, (shape) => shape.partial())).partial(),
|
|
25651
26017
|
attach: Attach.partial(),
|
|
25652
26018
|
personalization: toggle("Copy your desktop look into the sandbox.").partial(),
|
|
25653
|
-
|
|
26019
|
+
// Catalogue apps only (a vetted list): your own programs (apps.custom) download anything, so a repo cannot add them.
|
|
26020
|
+
apps: Apps.pick({ install: true }).partial(),
|
|
26021
|
+
claudeProfile: ClaudeProfile.pick({ enabled: true, overwrite: true, copyCredentials: true, syncHistory: true, syncClaudeMem: true }).partial(),
|
|
25654
26022
|
hooks: external_exports.strictObject({ failFast: external_exports.boolean() }).partial()
|
|
25655
26023
|
}).partial();
|
|
25656
26024
|
|
|
@@ -25663,6 +26031,15 @@ var AttachEndpoint = external_exports.strictObject({
|
|
|
25663
26031
|
port: external_exports.number().int().min(1024).max(65535),
|
|
25664
26032
|
token: Text(256)
|
|
25665
26033
|
});
|
|
26034
|
+
var BootProgress = external_exports.strictObject({
|
|
26035
|
+
step: external_exports.number().int().min(1).max(32),
|
|
26036
|
+
steps: external_exports.number().int().min(1).max(32),
|
|
26037
|
+
title: Text(120),
|
|
26038
|
+
/** Being set up now; percent while it downloads (when the size is known). */
|
|
26039
|
+
active: external_exports.array(external_exports.strictObject({ name: Text(64), percent: external_exports.number().int().min(0).max(100).optional() })).max(8),
|
|
26040
|
+
done: external_exports.number().int().min(0).max(1e3),
|
|
26041
|
+
total: external_exports.number().int().min(0).max(1e3)
|
|
26042
|
+
});
|
|
25666
26043
|
var SandboxStatus = external_exports.object({
|
|
25667
26044
|
launchId: Text(64),
|
|
25668
26045
|
phase: external_exports.enum(["booting", "provisioning", "ready", "failed"]),
|
|
@@ -25670,7 +26047,11 @@ var SandboxStatus = external_exports.object({
|
|
|
25670
26047
|
updatedAt: Time,
|
|
25671
26048
|
workspaceHost: Text(),
|
|
25672
26049
|
guestWorkspace: Text(),
|
|
25673
|
-
headless: external_exports.boolean()
|
|
26050
|
+
headless: external_exports.boolean(),
|
|
26051
|
+
/** The sandbox's IPv4 addresses (for network.forwardPorts; the host only uses ones on its Hyper-V network). */
|
|
26052
|
+
addresses: external_exports.array(external_exports.string().max(45)).max(8).optional(),
|
|
26053
|
+
/** A malformed progress is dropped, never the status (the phase still counts). */
|
|
26054
|
+
progress: BootProgress.optional().catch(void 0)
|
|
25674
26055
|
});
|
|
25675
26056
|
var Version = external_exports.strictObject({ spec: Text(128), source: Text(256) });
|
|
25676
26057
|
var DatabasePlan = external_exports.strictObject({
|
|
@@ -25739,15 +26120,17 @@ var ProjectStatus = external_exports.object({
|
|
|
25739
26120
|
var MAX_MESSAGE_BYTES = 8 * 1024 * 1024;
|
|
25740
26121
|
var safeId = (id) => Id.parse(id);
|
|
25741
26122
|
var runPaths = (dataDir2) => {
|
|
25742
|
-
const run2 =
|
|
25743
|
-
const file2 = (dir) => (id) =>
|
|
26123
|
+
const run2 = path2.join(dataDir2, "run");
|
|
26124
|
+
const file2 = (dir) => (id) => path2.join(run2, dir, safeId(id) + ".json");
|
|
25744
26125
|
return {
|
|
25745
26126
|
run: run2,
|
|
25746
|
-
sandbox:
|
|
25747
|
-
requests:
|
|
25748
|
-
responses:
|
|
25749
|
-
sessions:
|
|
25750
|
-
projects:
|
|
26127
|
+
sandbox: path2.join(run2, "sandbox.json"),
|
|
26128
|
+
requests: path2.join(run2, "requests"),
|
|
26129
|
+
responses: path2.join(run2, "responses"),
|
|
26130
|
+
sessions: path2.join(run2, "sessions"),
|
|
26131
|
+
projects: path2.join(run2, "projects"),
|
|
26132
|
+
/** audit.processes: programs the sandbox started, in small .jsonl files the host takes in and deletes. */
|
|
26133
|
+
audit: path2.join(run2, "audit"),
|
|
25751
26134
|
request: file2("requests"),
|
|
25752
26135
|
response: file2("responses"),
|
|
25753
26136
|
session: file2("sessions"),
|
|
@@ -25770,7 +26153,7 @@ var readSession = (dataDir2, id) => readValid(SessionStatus, runPaths(dataDir2).
|
|
|
25770
26153
|
|
|
25771
26154
|
// src/guest/env.ts
|
|
25772
26155
|
import fs2 from "node:fs";
|
|
25773
|
-
import
|
|
26156
|
+
import path3 from "node:path";
|
|
25774
26157
|
|
|
25775
26158
|
// src/shared/download.ts
|
|
25776
26159
|
var checksumRequired = false;
|
|
@@ -25786,16 +26169,16 @@ var launchDir = process.env.AGENT_LAUNCH_DIR ?? "C:\\AgentLaunch";
|
|
|
25786
26169
|
var dataDir = process.env.AGENT_DATA_DIR ?? "C:\\AgentData";
|
|
25787
26170
|
var hostToolsDir = process.env.AGENT_HOST_TOOLS_DIR ?? "C:\\HostTools";
|
|
25788
26171
|
var localDir = process.env.AGENT_LOCAL_DIR ?? "C:\\nvm";
|
|
25789
|
-
var toolsDir =
|
|
25790
|
-
var logsDir =
|
|
26172
|
+
var toolsDir = path3.join(dataDir, "tools");
|
|
26173
|
+
var logsDir = path3.join(dataDir, "logs");
|
|
25791
26174
|
var run = runPaths(dataDir);
|
|
25792
|
-
var session = JSON.parse(fs2.readFileSync(
|
|
26175
|
+
var session = JSON.parse(fs2.readFileSync(path3.join(launchDir, "session.json"), "utf8").replace(/^\uFEFF/, ""));
|
|
25793
26176
|
setChecksumRequired(session.downloads?.requireChecksum === true);
|
|
25794
26177
|
var workspace = process.env.AGENT_WORKSPACE ?? session.workspace;
|
|
25795
|
-
var stateDir =
|
|
25796
|
-
var claudeDir =
|
|
26178
|
+
var stateDir = path3.join(dataDir, session.persistAgentState ? "state" : "state-session");
|
|
26179
|
+
var claudeDir = path3.join(stateDir, "claude");
|
|
25797
26180
|
fs2.mkdirSync(logsDir, { recursive: true });
|
|
25798
|
-
var logFile =
|
|
26181
|
+
var logFile = path3.join(logsDir, (process.env.AGENT_LOG_PREFIX ?? "guest") + "-" + (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-") + ".log");
|
|
25799
26182
|
|
|
25800
26183
|
// src/guest/view.ts
|
|
25801
26184
|
var waitUntilStarted = async (id) => {
|