@rivet-dev/agentos-runtime-core 0.0.0-main.2f99c77 → 0.0.0-main.5ac5a14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/commands/[ +0 -0
- package/commands/_stubs +0 -0
- package/commands/acl_tools +0 -0
- package/commands/arch +0 -0
- package/commands/attr +0 -0
- package/commands/awk +0 -0
- package/commands/b2sum +0 -0
- package/commands/base32 +0 -0
- package/commands/base64 +0 -0
- package/commands/basename +0 -0
- package/commands/basenc +0 -0
- package/commands/bash +0 -0
- package/commands/bc +0 -0
- package/commands/cat +0 -0
- package/commands/chacl +0 -0
- package/commands/chcon +0 -0
- package/commands/chgrp +0 -0
- package/commands/chmod +0 -0
- package/commands/chown +0 -0
- package/commands/chroot +0 -0
- package/commands/cksum +0 -0
- package/commands/cmp +0 -0
- package/commands/column +0 -0
- package/commands/comm +0 -0
- package/commands/cp +0 -0
- package/commands/curl +0 -0
- package/commands/cut +0 -0
- package/commands/date +0 -0
- package/commands/dd +0 -0
- package/commands/df +0 -0
- package/commands/diff +0 -0
- package/commands/dir +0 -0
- package/commands/dircolors +0 -0
- package/commands/dirname +0 -0
- package/commands/du +0 -0
- package/commands/echo +0 -0
- package/commands/egrep +0 -0
- package/commands/env +0 -0
- package/commands/envsubst +0 -0
- package/commands/expand +0 -0
- package/commands/expr +0 -0
- package/commands/factor +0 -0
- package/commands/false +0 -0
- package/commands/fd +0 -0
- package/commands/fgrep +0 -0
- package/commands/file +0 -0
- package/commands/find +0 -0
- package/commands/findmnt +0 -0
- package/commands/fmt +0 -0
- package/commands/fold +0 -0
- package/commands/getent +0 -0
- package/commands/getfacl +0 -0
- package/commands/getfattr +0 -0
- package/commands/git +0 -0
- package/commands/git-receive-pack +0 -0
- package/commands/git-remote-http +0 -0
- package/commands/git-remote-https +0 -0
- package/commands/git-upload-archive +0 -0
- package/commands/git-upload-pack +0 -0
- package/commands/grep +0 -0
- package/commands/groups +0 -0
- package/commands/gunzip +0 -0
- package/commands/gzip +0 -0
- package/commands/head +0 -0
- package/commands/hostid +0 -0
- package/commands/hostname +0 -0
- package/commands/http-test +0 -0
- package/commands/id +0 -0
- package/commands/install +0 -0
- package/commands/join +0 -0
- package/commands/jq +0 -0
- package/commands/kill +0 -0
- package/commands/link +0 -0
- package/commands/ln +0 -0
- package/commands/logname +0 -0
- package/commands/ls +0 -0
- package/commands/md5sum +0 -0
- package/commands/mkdir +0 -0
- package/commands/mkfifo +0 -0
- package/commands/mknod +0 -0
- package/commands/mktemp +0 -0
- package/commands/more +0 -0
- package/commands/mount +0 -0
- package/commands/mv +0 -0
- package/commands/nice +0 -0
- package/commands/nl +0 -0
- package/commands/nohup +0 -0
- package/commands/nproc +0 -0
- package/commands/numfmt +0 -0
- package/commands/od +0 -0
- package/commands/paste +0 -0
- package/commands/pathchk +0 -0
- package/commands/pinky +0 -0
- package/commands/printenv +0 -0
- package/commands/printf +0 -0
- package/commands/ptx +0 -0
- package/commands/pwd +0 -0
- package/commands/readlink +0 -0
- package/commands/realpath +0 -0
- package/commands/rev +0 -0
- package/commands/rg +0 -0
- package/commands/rm +0 -0
- package/commands/rmdir +0 -0
- package/commands/runas +0 -0
- package/commands/runcon +0 -0
- package/commands/sed +0 -0
- package/commands/seq +0 -0
- package/commands/setfacl +0 -0
- package/commands/setfattr +0 -0
- package/commands/sh +0 -0
- package/commands/sha1sum +0 -0
- package/commands/sha224sum +0 -0
- package/commands/sha256sum +0 -0
- package/commands/sha384sum +0 -0
- package/commands/sha512sum +0 -0
- package/commands/shred +0 -0
- package/commands/shuf +0 -0
- package/commands/sleep +0 -0
- package/commands/sort +0 -0
- package/commands/spawn-test-host +0 -0
- package/commands/split +0 -0
- package/commands/sqlite3 +0 -0
- package/commands/ssh +0 -0
- package/commands/ssh-keysign +0 -0
- package/commands/ssh-sk-helper +0 -0
- package/commands/stat +0 -0
- package/commands/stdbuf +0 -0
- package/commands/strings +0 -0
- package/commands/stty +0 -0
- package/commands/su +0 -0
- package/commands/sum +0 -0
- package/commands/sync +0 -0
- package/commands/tac +0 -0
- package/commands/tail +0 -0
- package/commands/tar +0 -0
- package/commands/tee +0 -0
- package/commands/test +0 -0
- package/commands/timeout +0 -0
- package/commands/touch +0 -0
- package/commands/tr +0 -0
- package/commands/tree +0 -0
- package/commands/true +0 -0
- package/commands/truncate +0 -0
- package/commands/tsort +0 -0
- package/commands/tty +0 -0
- package/commands/uname +0 -0
- package/commands/unexpand +0 -0
- package/commands/uniq +0 -0
- package/commands/unlink +0 -0
- package/commands/unzip +0 -0
- package/commands/uptime +0 -0
- package/commands/users +0 -0
- package/commands/vdir +0 -0
- package/commands/wc +0 -0
- package/commands/wget +0 -0
- package/commands/which +0 -0
- package/commands/who +0 -0
- package/commands/whoami +0 -0
- package/commands/xargs +0 -0
- package/commands/xattr_tools +0 -0
- package/commands/xfs_io +0 -0
- package/commands/xu +0 -0
- package/commands/yes +0 -0
- package/commands/yq +0 -0
- package/commands/zcat +0 -0
- package/commands/zip +0 -0
- package/dist/binary.js +4 -3
- package/dist/descriptors.d.ts +2 -12
- package/dist/descriptors.js +10 -6
- package/dist/event-buffer.d.ts +14 -0
- package/dist/event-buffer.js +30 -1
- package/dist/frame-stream.d.ts +34 -0
- package/dist/frame-stream.js +121 -0
- package/dist/generated/AcpLimitsConfig.d.ts +16 -0
- package/dist/generated/BindingLimitsConfig.d.ts +10 -0
- package/dist/generated/CreateVmConfig.d.ts +4 -0
- package/dist/generated/ExecutionLimitsConfig.d.ts +5 -0
- package/dist/generated/ExecutionLimitsConfig.js +2 -0
- package/dist/generated/Http2LimitsConfig.d.ts +12 -0
- package/dist/generated/Http2LimitsConfig.js +2 -0
- package/dist/generated/JsRuntimeLimitsConfig.d.ts +1 -0
- package/dist/generated/MountPluginDescriptor.d.ts +1 -1
- package/dist/generated/ProcessLimitsConfig.d.ts +7 -0
- package/dist/generated/ProcessLimitsConfig.js +2 -0
- package/dist/generated/ReactorLimitsConfig.d.ts +23 -0
- package/dist/generated/ReactorLimitsConfig.js +2 -0
- package/dist/generated/SqliteLimitsConfig.d.ts +3 -0
- package/dist/generated/SqliteLimitsConfig.js +2 -0
- package/dist/generated/TlsLimitsConfig.d.ts +3 -0
- package/dist/generated/TlsLimitsConfig.js +2 -0
- package/dist/generated/UdpLimitsConfig.d.ts +4 -0
- package/dist/generated/UdpLimitsConfig.js +2 -0
- package/dist/generated/VmGroupConfig.d.ts +5 -0
- package/dist/generated/VmGroupConfig.js +2 -0
- package/dist/generated/VmLimitsConfig.d.ts +16 -2
- package/dist/generated/VmSqliteDescriptor.d.ts +10 -0
- package/dist/generated/VmSqliteDescriptor.js +2 -0
- package/dist/generated/VmUserAccountConfig.d.ts +9 -0
- package/dist/generated/VmUserAccountConfig.js +2 -0
- package/dist/generated/VmUserConfig.d.ts +19 -0
- package/dist/generated/VmUserConfig.js +1 -0
- package/dist/generated/WasmLimitsConfig.d.ts +1 -0
- package/dist/generated-protocol.d.ts +610 -2
- package/dist/generated-protocol.js +1534 -75
- package/dist/kernel-proxy.d.ts +4 -0
- package/dist/kernel-proxy.js +66 -34
- package/dist/native-client.d.ts +3 -3
- package/dist/native-client.js +43 -8
- package/dist/node-runtime-options-schema.d.ts +1 -1
- package/dist/node-runtime-options-schema.js +43 -1
- package/dist/node-runtime.d.ts +12 -3
- package/dist/node-runtime.js +13 -12
- package/dist/process.d.ts +5 -1
- package/dist/process.js +35 -8
- package/dist/protocol-client.d.ts +9 -2
- package/dist/protocol-client.js +127 -7
- package/dist/protocol-frames.d.ts +14 -3
- package/dist/protocol-frames.js +26 -1
- package/dist/protocol-schema.d.ts +1 -1
- package/dist/protocol-schema.js +1 -1
- package/dist/request-payloads.d.ts +100 -1
- package/dist/request-payloads.js +73 -2
- package/dist/response-payloads.d.ts +49 -1
- package/dist/response-payloads.js +51 -1
- package/dist/sidecar-errors.d.ts +22 -0
- package/dist/sidecar-errors.js +10 -0
- package/dist/sidecar-process.d.ts +20 -3
- package/dist/sidecar-process.js +104 -14
- package/dist/test-runtime.d.ts +25 -7
- package/dist/test-runtime.js +216 -69
- package/dist/vm-config.d.ts +5 -1
- package/package.json +16 -6
- package/commands/codex +0 -0
- package/commands/codex-exec +0 -0
- package/commands/http_get +0 -0
- package/dist/generated/ToolLimitsConfig.d.ts +0 -10
- /package/dist/generated/{ToolLimitsConfig.js → BindingLimitsConfig.js} +0 -0
|
@@ -784,15 +784,31 @@ export function writeMountPluginDescriptor(bc, x) {
|
|
|
784
784
|
export function readMountDescriptor(bc) {
|
|
785
785
|
return {
|
|
786
786
|
guestPath: bare.readString(bc),
|
|
787
|
+
guestSource: bare.readString(bc),
|
|
788
|
+
guestFstype: bare.readString(bc),
|
|
787
789
|
readOnly: bare.readBool(bc),
|
|
788
790
|
plugin: readMountPluginDescriptor(bc),
|
|
789
791
|
};
|
|
790
792
|
}
|
|
791
793
|
export function writeMountDescriptor(bc, x) {
|
|
792
794
|
bare.writeString(bc, x.guestPath);
|
|
795
|
+
bare.writeString(bc, x.guestSource);
|
|
796
|
+
bare.writeString(bc, x.guestFstype);
|
|
793
797
|
bare.writeBool(bc, x.readOnly);
|
|
794
798
|
writeMountPluginDescriptor(bc, x.plugin);
|
|
795
799
|
}
|
|
800
|
+
export function readMountInfo(bc) {
|
|
801
|
+
return {
|
|
802
|
+
path: bare.readString(bc),
|
|
803
|
+
kind: bare.readString(bc),
|
|
804
|
+
readOnly: bare.readBool(bc),
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
export function writeMountInfo(bc, x) {
|
|
808
|
+
bare.writeString(bc, x.path);
|
|
809
|
+
bare.writeString(bc, x.kind);
|
|
810
|
+
bare.writeBool(bc, x.readOnly);
|
|
811
|
+
}
|
|
796
812
|
export function readSoftwareDescriptor(bc) {
|
|
797
813
|
return {
|
|
798
814
|
packageName: bare.readString(bc),
|
|
@@ -1086,7 +1102,7 @@ export function readConfigureVmRequest(bc) {
|
|
|
1086
1102
|
packages: read20(bc),
|
|
1087
1103
|
packagesMountAt: bare.readString(bc),
|
|
1088
1104
|
bootstrapCommands: read6(bc),
|
|
1089
|
-
|
|
1105
|
+
bindingShimCommands: read6(bc),
|
|
1090
1106
|
};
|
|
1091
1107
|
}
|
|
1092
1108
|
export function writeConfigureVmRequest(bc, x) {
|
|
@@ -1101,7 +1117,7 @@ export function writeConfigureVmRequest(bc, x) {
|
|
|
1101
1117
|
write20(bc, x.packages);
|
|
1102
1118
|
bare.writeString(bc, x.packagesMountAt);
|
|
1103
1119
|
write6(bc, x.bootstrapCommands);
|
|
1104
|
-
write6(bc, x.
|
|
1120
|
+
write6(bc, x.bindingShimCommands);
|
|
1105
1121
|
}
|
|
1106
1122
|
export function readRegisteredHostCallbackExample(bc) {
|
|
1107
1123
|
return {
|
|
@@ -1466,6 +1482,14 @@ export function writeGuestKernelCallRequest(bc, x) {
|
|
|
1466
1482
|
bare.writeString(bc, x.operation);
|
|
1467
1483
|
bare.writeData(bc, x.payload);
|
|
1468
1484
|
}
|
|
1485
|
+
export function readSnapshotRootFilesystemRequest(bc) {
|
|
1486
|
+
return {
|
|
1487
|
+
maxBytes: bare.readU64(bc),
|
|
1488
|
+
};
|
|
1489
|
+
}
|
|
1490
|
+
export function writeSnapshotRootFilesystemRequest(bc, x) {
|
|
1491
|
+
bare.writeU64(bc, x.maxBytes);
|
|
1492
|
+
}
|
|
1469
1493
|
function read24(bc) {
|
|
1470
1494
|
return bare.readBool(bc) ? readGuestRuntimeKind(bc) : null;
|
|
1471
1495
|
}
|
|
@@ -1506,6 +1530,761 @@ export function writeExecuteRequest(bc, x) {
|
|
|
1506
1530
|
write0(bc, x.cwd);
|
|
1507
1531
|
write25(bc, x.wasmPermissionTier);
|
|
1508
1532
|
}
|
|
1533
|
+
/**
|
|
1534
|
+
* First-class execution lifecycle. The legacy process request above remains an
|
|
1535
|
+
* internal kernel transport while clients migrate in lockstep to these semantic
|
|
1536
|
+
* operations; language/package command construction belongs to the sidecar.
|
|
1537
|
+
*/
|
|
1538
|
+
export var ExecutionState;
|
|
1539
|
+
(function (ExecutionState) {
|
|
1540
|
+
ExecutionState["Creating"] = "Creating";
|
|
1541
|
+
ExecutionState["Idle"] = "Idle";
|
|
1542
|
+
ExecutionState["Running"] = "Running";
|
|
1543
|
+
ExecutionState["Resetting"] = "Resetting";
|
|
1544
|
+
ExecutionState["Deleting"] = "Deleting";
|
|
1545
|
+
ExecutionState["Failed"] = "Failed";
|
|
1546
|
+
})(ExecutionState || (ExecutionState = {}));
|
|
1547
|
+
export function readExecutionState(bc) {
|
|
1548
|
+
const offset = bc.offset;
|
|
1549
|
+
const tag = bare.readU8(bc);
|
|
1550
|
+
switch (tag) {
|
|
1551
|
+
case 0:
|
|
1552
|
+
return ExecutionState.Creating;
|
|
1553
|
+
case 1:
|
|
1554
|
+
return ExecutionState.Idle;
|
|
1555
|
+
case 2:
|
|
1556
|
+
return ExecutionState.Running;
|
|
1557
|
+
case 3:
|
|
1558
|
+
return ExecutionState.Resetting;
|
|
1559
|
+
case 4:
|
|
1560
|
+
return ExecutionState.Deleting;
|
|
1561
|
+
case 5:
|
|
1562
|
+
return ExecutionState.Failed;
|
|
1563
|
+
default: {
|
|
1564
|
+
bc.offset = offset;
|
|
1565
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
export function writeExecutionState(bc, x) {
|
|
1570
|
+
switch (x) {
|
|
1571
|
+
case ExecutionState.Creating: {
|
|
1572
|
+
bare.writeU8(bc, 0);
|
|
1573
|
+
break;
|
|
1574
|
+
}
|
|
1575
|
+
case ExecutionState.Idle: {
|
|
1576
|
+
bare.writeU8(bc, 1);
|
|
1577
|
+
break;
|
|
1578
|
+
}
|
|
1579
|
+
case ExecutionState.Running: {
|
|
1580
|
+
bare.writeU8(bc, 2);
|
|
1581
|
+
break;
|
|
1582
|
+
}
|
|
1583
|
+
case ExecutionState.Resetting: {
|
|
1584
|
+
bare.writeU8(bc, 3);
|
|
1585
|
+
break;
|
|
1586
|
+
}
|
|
1587
|
+
case ExecutionState.Deleting: {
|
|
1588
|
+
bare.writeU8(bc, 4);
|
|
1589
|
+
break;
|
|
1590
|
+
}
|
|
1591
|
+
case ExecutionState.Failed: {
|
|
1592
|
+
bare.writeU8(bc, 5);
|
|
1593
|
+
break;
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
export var ExecutionOutcome;
|
|
1598
|
+
(function (ExecutionOutcome) {
|
|
1599
|
+
ExecutionOutcome["Succeeded"] = "Succeeded";
|
|
1600
|
+
ExecutionOutcome["Failed"] = "Failed";
|
|
1601
|
+
ExecutionOutcome["Cancelled"] = "Cancelled";
|
|
1602
|
+
ExecutionOutcome["TimedOut"] = "TimedOut";
|
|
1603
|
+
})(ExecutionOutcome || (ExecutionOutcome = {}));
|
|
1604
|
+
export function readExecutionOutcome(bc) {
|
|
1605
|
+
const offset = bc.offset;
|
|
1606
|
+
const tag = bare.readU8(bc);
|
|
1607
|
+
switch (tag) {
|
|
1608
|
+
case 0:
|
|
1609
|
+
return ExecutionOutcome.Succeeded;
|
|
1610
|
+
case 1:
|
|
1611
|
+
return ExecutionOutcome.Failed;
|
|
1612
|
+
case 2:
|
|
1613
|
+
return ExecutionOutcome.Cancelled;
|
|
1614
|
+
case 3:
|
|
1615
|
+
return ExecutionOutcome.TimedOut;
|
|
1616
|
+
default: {
|
|
1617
|
+
bc.offset = offset;
|
|
1618
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
export function writeExecutionOutcome(bc, x) {
|
|
1623
|
+
switch (x) {
|
|
1624
|
+
case ExecutionOutcome.Succeeded: {
|
|
1625
|
+
bare.writeU8(bc, 0);
|
|
1626
|
+
break;
|
|
1627
|
+
}
|
|
1628
|
+
case ExecutionOutcome.Failed: {
|
|
1629
|
+
bare.writeU8(bc, 1);
|
|
1630
|
+
break;
|
|
1631
|
+
}
|
|
1632
|
+
case ExecutionOutcome.Cancelled: {
|
|
1633
|
+
bare.writeU8(bc, 2);
|
|
1634
|
+
break;
|
|
1635
|
+
}
|
|
1636
|
+
case ExecutionOutcome.TimedOut: {
|
|
1637
|
+
bare.writeU8(bc, 3);
|
|
1638
|
+
break;
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
export var RetainedExecutionLanguage;
|
|
1643
|
+
(function (RetainedExecutionLanguage) {
|
|
1644
|
+
RetainedExecutionLanguage["JavaScript"] = "JavaScript";
|
|
1645
|
+
RetainedExecutionLanguage["Python"] = "Python";
|
|
1646
|
+
})(RetainedExecutionLanguage || (RetainedExecutionLanguage = {}));
|
|
1647
|
+
export function readRetainedExecutionLanguage(bc) {
|
|
1648
|
+
const offset = bc.offset;
|
|
1649
|
+
const tag = bare.readU8(bc);
|
|
1650
|
+
switch (tag) {
|
|
1651
|
+
case 0:
|
|
1652
|
+
return RetainedExecutionLanguage.JavaScript;
|
|
1653
|
+
case 1:
|
|
1654
|
+
return RetainedExecutionLanguage.Python;
|
|
1655
|
+
default: {
|
|
1656
|
+
bc.offset = offset;
|
|
1657
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
export function writeRetainedExecutionLanguage(bc, x) {
|
|
1662
|
+
switch (x) {
|
|
1663
|
+
case RetainedExecutionLanguage.JavaScript: {
|
|
1664
|
+
bare.writeU8(bc, 0);
|
|
1665
|
+
break;
|
|
1666
|
+
}
|
|
1667
|
+
case RetainedExecutionLanguage.Python: {
|
|
1668
|
+
bare.writeU8(bc, 1);
|
|
1669
|
+
break;
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
export var ExecutionStreamChannel;
|
|
1674
|
+
(function (ExecutionStreamChannel) {
|
|
1675
|
+
ExecutionStreamChannel["Stdout"] = "Stdout";
|
|
1676
|
+
ExecutionStreamChannel["Stderr"] = "Stderr";
|
|
1677
|
+
ExecutionStreamChannel["Pty"] = "Pty";
|
|
1678
|
+
})(ExecutionStreamChannel || (ExecutionStreamChannel = {}));
|
|
1679
|
+
export function readExecutionStreamChannel(bc) {
|
|
1680
|
+
const offset = bc.offset;
|
|
1681
|
+
const tag = bare.readU8(bc);
|
|
1682
|
+
switch (tag) {
|
|
1683
|
+
case 0:
|
|
1684
|
+
return ExecutionStreamChannel.Stdout;
|
|
1685
|
+
case 1:
|
|
1686
|
+
return ExecutionStreamChannel.Stderr;
|
|
1687
|
+
case 2:
|
|
1688
|
+
return ExecutionStreamChannel.Pty;
|
|
1689
|
+
default: {
|
|
1690
|
+
bc.offset = offset;
|
|
1691
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
export function writeExecutionStreamChannel(bc, x) {
|
|
1696
|
+
switch (x) {
|
|
1697
|
+
case ExecutionStreamChannel.Stdout: {
|
|
1698
|
+
bare.writeU8(bc, 0);
|
|
1699
|
+
break;
|
|
1700
|
+
}
|
|
1701
|
+
case ExecutionStreamChannel.Stderr: {
|
|
1702
|
+
bare.writeU8(bc, 1);
|
|
1703
|
+
break;
|
|
1704
|
+
}
|
|
1705
|
+
case ExecutionStreamChannel.Pty: {
|
|
1706
|
+
bare.writeU8(bc, 2);
|
|
1707
|
+
break;
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
export var JavaScriptModuleFormat;
|
|
1712
|
+
(function (JavaScriptModuleFormat) {
|
|
1713
|
+
JavaScriptModuleFormat["Module"] = "Module";
|
|
1714
|
+
JavaScriptModuleFormat["CommonJs"] = "CommonJs";
|
|
1715
|
+
})(JavaScriptModuleFormat || (JavaScriptModuleFormat = {}));
|
|
1716
|
+
export function readJavaScriptModuleFormat(bc) {
|
|
1717
|
+
const offset = bc.offset;
|
|
1718
|
+
const tag = bare.readU8(bc);
|
|
1719
|
+
switch (tag) {
|
|
1720
|
+
case 0:
|
|
1721
|
+
return JavaScriptModuleFormat.Module;
|
|
1722
|
+
case 1:
|
|
1723
|
+
return JavaScriptModuleFormat.CommonJs;
|
|
1724
|
+
default: {
|
|
1725
|
+
bc.offset = offset;
|
|
1726
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
export function writeJavaScriptModuleFormat(bc, x) {
|
|
1731
|
+
switch (x) {
|
|
1732
|
+
case JavaScriptModuleFormat.Module: {
|
|
1733
|
+
bare.writeU8(bc, 0);
|
|
1734
|
+
break;
|
|
1735
|
+
}
|
|
1736
|
+
case JavaScriptModuleFormat.CommonJs: {
|
|
1737
|
+
bare.writeU8(bc, 1);
|
|
1738
|
+
break;
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
export function readExecutionIdentityOptions(bc) {
|
|
1743
|
+
return {
|
|
1744
|
+
contextId: read0(bc),
|
|
1745
|
+
};
|
|
1746
|
+
}
|
|
1747
|
+
export function writeExecutionIdentityOptions(bc, x) {
|
|
1748
|
+
write0(bc, x.contextId);
|
|
1749
|
+
}
|
|
1750
|
+
function read26(bc) {
|
|
1751
|
+
return bare.readBool(bc) ? bare.readU16(bc) : null;
|
|
1752
|
+
}
|
|
1753
|
+
function write26(bc, x) {
|
|
1754
|
+
bare.writeBool(bc, x != null);
|
|
1755
|
+
if (x != null) {
|
|
1756
|
+
bare.writeU16(bc, x);
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
export function readExecutionPtyOptions(bc) {
|
|
1760
|
+
return {
|
|
1761
|
+
cols: read26(bc),
|
|
1762
|
+
rows: read26(bc),
|
|
1763
|
+
};
|
|
1764
|
+
}
|
|
1765
|
+
export function writeExecutionPtyOptions(bc, x) {
|
|
1766
|
+
write26(bc, x.cols);
|
|
1767
|
+
write26(bc, x.rows);
|
|
1768
|
+
}
|
|
1769
|
+
export var ExecutionOutputCapture;
|
|
1770
|
+
(function (ExecutionOutputCapture) {
|
|
1771
|
+
ExecutionOutputCapture["None"] = "None";
|
|
1772
|
+
ExecutionOutputCapture["Stderr"] = "Stderr";
|
|
1773
|
+
ExecutionOutputCapture["All"] = "All";
|
|
1774
|
+
})(ExecutionOutputCapture || (ExecutionOutputCapture = {}));
|
|
1775
|
+
export function readExecutionOutputCapture(bc) {
|
|
1776
|
+
const offset = bc.offset;
|
|
1777
|
+
const tag = bare.readU8(bc);
|
|
1778
|
+
switch (tag) {
|
|
1779
|
+
case 0:
|
|
1780
|
+
return ExecutionOutputCapture.None;
|
|
1781
|
+
case 1:
|
|
1782
|
+
return ExecutionOutputCapture.Stderr;
|
|
1783
|
+
case 2:
|
|
1784
|
+
return ExecutionOutputCapture.All;
|
|
1785
|
+
default: {
|
|
1786
|
+
bc.offset = offset;
|
|
1787
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
export function writeExecutionOutputCapture(bc, x) {
|
|
1792
|
+
switch (x) {
|
|
1793
|
+
case ExecutionOutputCapture.None: {
|
|
1794
|
+
bare.writeU8(bc, 0);
|
|
1795
|
+
break;
|
|
1796
|
+
}
|
|
1797
|
+
case ExecutionOutputCapture.Stderr: {
|
|
1798
|
+
bare.writeU8(bc, 1);
|
|
1799
|
+
break;
|
|
1800
|
+
}
|
|
1801
|
+
case ExecutionOutputCapture.All: {
|
|
1802
|
+
bare.writeU8(bc, 2);
|
|
1803
|
+
break;
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
function read27(bc) {
|
|
1808
|
+
return bare.readBool(bc) ? readExecutionOutputCapture(bc) : null;
|
|
1809
|
+
}
|
|
1810
|
+
function write27(bc, x) {
|
|
1811
|
+
bare.writeBool(bc, x != null);
|
|
1812
|
+
if (x != null) {
|
|
1813
|
+
writeExecutionOutputCapture(bc, x);
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
function read28(bc) {
|
|
1817
|
+
return bare.readBool(bc) ? bare.readBool(bc) : null;
|
|
1818
|
+
}
|
|
1819
|
+
function write28(bc, x) {
|
|
1820
|
+
bare.writeBool(bc, x != null);
|
|
1821
|
+
if (x != null) {
|
|
1822
|
+
bare.writeBool(bc, x);
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
export function readExecutionOutputOptions(bc) {
|
|
1826
|
+
return {
|
|
1827
|
+
capture: read27(bc),
|
|
1828
|
+
retainEvents: read28(bc),
|
|
1829
|
+
};
|
|
1830
|
+
}
|
|
1831
|
+
export function writeExecutionOutputOptions(bc, x) {
|
|
1832
|
+
write27(bc, x.capture);
|
|
1833
|
+
write28(bc, x.retainEvents);
|
|
1834
|
+
}
|
|
1835
|
+
function read29(bc) {
|
|
1836
|
+
return bare.readBool(bc) ? read1(bc) : null;
|
|
1837
|
+
}
|
|
1838
|
+
function write29(bc, x) {
|
|
1839
|
+
bare.writeBool(bc, x != null);
|
|
1840
|
+
if (x != null) {
|
|
1841
|
+
write1(bc, x);
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
function read30(bc) {
|
|
1845
|
+
return bare.readBool(bc) ? bare.readData(bc) : null;
|
|
1846
|
+
}
|
|
1847
|
+
function write30(bc, x) {
|
|
1848
|
+
bare.writeBool(bc, x != null);
|
|
1849
|
+
if (x != null) {
|
|
1850
|
+
bare.writeData(bc, x);
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
function read31(bc) {
|
|
1854
|
+
return bare.readBool(bc) ? readExecutionPtyOptions(bc) : null;
|
|
1855
|
+
}
|
|
1856
|
+
function write31(bc, x) {
|
|
1857
|
+
bare.writeBool(bc, x != null);
|
|
1858
|
+
if (x != null) {
|
|
1859
|
+
writeExecutionPtyOptions(bc, x);
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
export function readProcessExecutionOptions(bc) {
|
|
1863
|
+
return {
|
|
1864
|
+
identity: readExecutionIdentityOptions(bc),
|
|
1865
|
+
output: readExecutionOutputOptions(bc),
|
|
1866
|
+
operationId: read0(bc),
|
|
1867
|
+
background: read28(bc),
|
|
1868
|
+
cwd: read0(bc),
|
|
1869
|
+
env: read29(bc),
|
|
1870
|
+
args: read6(bc),
|
|
1871
|
+
stdin: read30(bc),
|
|
1872
|
+
timeoutMs: read21(bc),
|
|
1873
|
+
pty: read31(bc),
|
|
1874
|
+
};
|
|
1875
|
+
}
|
|
1876
|
+
export function writeProcessExecutionOptions(bc, x) {
|
|
1877
|
+
writeExecutionIdentityOptions(bc, x.identity);
|
|
1878
|
+
writeExecutionOutputOptions(bc, x.output);
|
|
1879
|
+
write0(bc, x.operationId);
|
|
1880
|
+
write28(bc, x.background);
|
|
1881
|
+
write0(bc, x.cwd);
|
|
1882
|
+
write29(bc, x.env);
|
|
1883
|
+
write6(bc, x.args);
|
|
1884
|
+
write30(bc, x.stdin);
|
|
1885
|
+
write21(bc, x.timeoutMs);
|
|
1886
|
+
write31(bc, x.pty);
|
|
1887
|
+
}
|
|
1888
|
+
export function readShellExecutionRequest(bc) {
|
|
1889
|
+
return {
|
|
1890
|
+
process: readProcessExecutionOptions(bc),
|
|
1891
|
+
command: bare.readString(bc),
|
|
1892
|
+
};
|
|
1893
|
+
}
|
|
1894
|
+
export function writeShellExecutionRequest(bc, x) {
|
|
1895
|
+
writeProcessExecutionOptions(bc, x.process);
|
|
1896
|
+
bare.writeString(bc, x.command);
|
|
1897
|
+
}
|
|
1898
|
+
export function readArgvExecutionRequest(bc) {
|
|
1899
|
+
return {
|
|
1900
|
+
process: readProcessExecutionOptions(bc),
|
|
1901
|
+
command: bare.readString(bc),
|
|
1902
|
+
};
|
|
1903
|
+
}
|
|
1904
|
+
export function writeArgvExecutionRequest(bc, x) {
|
|
1905
|
+
writeProcessExecutionOptions(bc, x.process);
|
|
1906
|
+
bare.writeString(bc, x.command);
|
|
1907
|
+
}
|
|
1908
|
+
function read32(bc) {
|
|
1909
|
+
return bare.readBool(bc) ? readJavaScriptModuleFormat(bc) : null;
|
|
1910
|
+
}
|
|
1911
|
+
function write32(bc, x) {
|
|
1912
|
+
bare.writeBool(bc, x != null);
|
|
1913
|
+
if (x != null) {
|
|
1914
|
+
writeJavaScriptModuleFormat(bc, x);
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
function read33(bc) {
|
|
1918
|
+
return bare.readBool(bc) ? readJsonUtf8(bc) : null;
|
|
1919
|
+
}
|
|
1920
|
+
function write33(bc, x) {
|
|
1921
|
+
bare.writeBool(bc, x != null);
|
|
1922
|
+
if (x != null) {
|
|
1923
|
+
writeJsonUtf8(bc, x);
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
export function readJavaScriptExecutionRequest(bc) {
|
|
1927
|
+
return {
|
|
1928
|
+
process: readProcessExecutionOptions(bc),
|
|
1929
|
+
source: bare.readString(bc),
|
|
1930
|
+
format: read32(bc),
|
|
1931
|
+
filePath: read0(bc),
|
|
1932
|
+
inputs: read33(bc),
|
|
1933
|
+
};
|
|
1934
|
+
}
|
|
1935
|
+
export function writeJavaScriptExecutionRequest(bc, x) {
|
|
1936
|
+
writeProcessExecutionOptions(bc, x.process);
|
|
1937
|
+
bare.writeString(bc, x.source);
|
|
1938
|
+
write32(bc, x.format);
|
|
1939
|
+
write0(bc, x.filePath);
|
|
1940
|
+
write33(bc, x.inputs);
|
|
1941
|
+
}
|
|
1942
|
+
export function readJavaScriptEvaluationRequest(bc) {
|
|
1943
|
+
return {
|
|
1944
|
+
process: readProcessExecutionOptions(bc),
|
|
1945
|
+
expression: bare.readString(bc),
|
|
1946
|
+
format: read32(bc),
|
|
1947
|
+
filePath: read0(bc),
|
|
1948
|
+
inputs: read33(bc),
|
|
1949
|
+
};
|
|
1950
|
+
}
|
|
1951
|
+
export function writeJavaScriptEvaluationRequest(bc, x) {
|
|
1952
|
+
writeProcessExecutionOptions(bc, x.process);
|
|
1953
|
+
bare.writeString(bc, x.expression);
|
|
1954
|
+
write32(bc, x.format);
|
|
1955
|
+
write0(bc, x.filePath);
|
|
1956
|
+
write33(bc, x.inputs);
|
|
1957
|
+
}
|
|
1958
|
+
export function readJavaScriptFileExecutionRequest(bc) {
|
|
1959
|
+
return {
|
|
1960
|
+
process: readProcessExecutionOptions(bc),
|
|
1961
|
+
path: bare.readString(bc),
|
|
1962
|
+
};
|
|
1963
|
+
}
|
|
1964
|
+
export function writeJavaScriptFileExecutionRequest(bc, x) {
|
|
1965
|
+
writeProcessExecutionOptions(bc, x.process);
|
|
1966
|
+
bare.writeString(bc, x.path);
|
|
1967
|
+
}
|
|
1968
|
+
export function readTypeScriptExecutionRequest(bc) {
|
|
1969
|
+
return {
|
|
1970
|
+
process: readProcessExecutionOptions(bc),
|
|
1971
|
+
source: bare.readString(bc),
|
|
1972
|
+
filePath: read0(bc),
|
|
1973
|
+
tsconfigPath: read0(bc),
|
|
1974
|
+
compilerOptions: read33(bc),
|
|
1975
|
+
inputs: read33(bc),
|
|
1976
|
+
};
|
|
1977
|
+
}
|
|
1978
|
+
export function writeTypeScriptExecutionRequest(bc, x) {
|
|
1979
|
+
writeProcessExecutionOptions(bc, x.process);
|
|
1980
|
+
bare.writeString(bc, x.source);
|
|
1981
|
+
write0(bc, x.filePath);
|
|
1982
|
+
write0(bc, x.tsconfigPath);
|
|
1983
|
+
write33(bc, x.compilerOptions);
|
|
1984
|
+
write33(bc, x.inputs);
|
|
1985
|
+
}
|
|
1986
|
+
export function readTypeScriptEvaluationRequest(bc) {
|
|
1987
|
+
return {
|
|
1988
|
+
process: readProcessExecutionOptions(bc),
|
|
1989
|
+
expression: bare.readString(bc),
|
|
1990
|
+
filePath: read0(bc),
|
|
1991
|
+
tsconfigPath: read0(bc),
|
|
1992
|
+
compilerOptions: read33(bc),
|
|
1993
|
+
inputs: read33(bc),
|
|
1994
|
+
};
|
|
1995
|
+
}
|
|
1996
|
+
export function writeTypeScriptEvaluationRequest(bc, x) {
|
|
1997
|
+
writeProcessExecutionOptions(bc, x.process);
|
|
1998
|
+
bare.writeString(bc, x.expression);
|
|
1999
|
+
write0(bc, x.filePath);
|
|
2000
|
+
write0(bc, x.tsconfigPath);
|
|
2001
|
+
write33(bc, x.compilerOptions);
|
|
2002
|
+
write33(bc, x.inputs);
|
|
2003
|
+
}
|
|
2004
|
+
export function readTypeScriptFileExecutionRequest(bc) {
|
|
2005
|
+
return {
|
|
2006
|
+
process: readProcessExecutionOptions(bc),
|
|
2007
|
+
path: bare.readString(bc),
|
|
2008
|
+
tsconfigPath: read0(bc),
|
|
2009
|
+
compilerOptions: read33(bc),
|
|
2010
|
+
};
|
|
2011
|
+
}
|
|
2012
|
+
export function writeTypeScriptFileExecutionRequest(bc, x) {
|
|
2013
|
+
writeProcessExecutionOptions(bc, x.process);
|
|
2014
|
+
bare.writeString(bc, x.path);
|
|
2015
|
+
write0(bc, x.tsconfigPath);
|
|
2016
|
+
write33(bc, x.compilerOptions);
|
|
2017
|
+
}
|
|
2018
|
+
export function readTypeScriptCheckRequest(bc) {
|
|
2019
|
+
return {
|
|
2020
|
+
identity: readExecutionIdentityOptions(bc),
|
|
2021
|
+
output: readExecutionOutputOptions(bc),
|
|
2022
|
+
source: bare.readString(bc),
|
|
2023
|
+
cwd: read0(bc),
|
|
2024
|
+
filePath: read0(bc),
|
|
2025
|
+
tsconfigPath: read0(bc),
|
|
2026
|
+
compilerOptions: read33(bc),
|
|
2027
|
+
timeoutMs: read21(bc),
|
|
2028
|
+
};
|
|
2029
|
+
}
|
|
2030
|
+
export function writeTypeScriptCheckRequest(bc, x) {
|
|
2031
|
+
writeExecutionIdentityOptions(bc, x.identity);
|
|
2032
|
+
writeExecutionOutputOptions(bc, x.output);
|
|
2033
|
+
bare.writeString(bc, x.source);
|
|
2034
|
+
write0(bc, x.cwd);
|
|
2035
|
+
write0(bc, x.filePath);
|
|
2036
|
+
write0(bc, x.tsconfigPath);
|
|
2037
|
+
write33(bc, x.compilerOptions);
|
|
2038
|
+
write21(bc, x.timeoutMs);
|
|
2039
|
+
}
|
|
2040
|
+
export function readTypeScriptProjectCheckRequest(bc) {
|
|
2041
|
+
return {
|
|
2042
|
+
identity: readExecutionIdentityOptions(bc),
|
|
2043
|
+
output: readExecutionOutputOptions(bc),
|
|
2044
|
+
cwd: read0(bc),
|
|
2045
|
+
tsconfigPath: read0(bc),
|
|
2046
|
+
timeoutMs: read21(bc),
|
|
2047
|
+
};
|
|
2048
|
+
}
|
|
2049
|
+
export function writeTypeScriptProjectCheckRequest(bc, x) {
|
|
2050
|
+
writeExecutionIdentityOptions(bc, x.identity);
|
|
2051
|
+
writeExecutionOutputOptions(bc, x.output);
|
|
2052
|
+
write0(bc, x.cwd);
|
|
2053
|
+
write0(bc, x.tsconfigPath);
|
|
2054
|
+
write21(bc, x.timeoutMs);
|
|
2055
|
+
}
|
|
2056
|
+
export function readNpmProjectInstallRequest(bc) {
|
|
2057
|
+
return {
|
|
2058
|
+
identity: readExecutionIdentityOptions(bc),
|
|
2059
|
+
output: readExecutionOutputOptions(bc),
|
|
2060
|
+
cwd: read0(bc),
|
|
2061
|
+
env: read29(bc),
|
|
2062
|
+
timeoutMs: read21(bc),
|
|
2063
|
+
frozen: read28(bc),
|
|
2064
|
+
};
|
|
2065
|
+
}
|
|
2066
|
+
export function writeNpmProjectInstallRequest(bc, x) {
|
|
2067
|
+
writeExecutionIdentityOptions(bc, x.identity);
|
|
2068
|
+
writeExecutionOutputOptions(bc, x.output);
|
|
2069
|
+
write0(bc, x.cwd);
|
|
2070
|
+
write29(bc, x.env);
|
|
2071
|
+
write21(bc, x.timeoutMs);
|
|
2072
|
+
write28(bc, x.frozen);
|
|
2073
|
+
}
|
|
2074
|
+
export function readNpmPackageInstallRequest(bc) {
|
|
2075
|
+
return {
|
|
2076
|
+
identity: readExecutionIdentityOptions(bc),
|
|
2077
|
+
output: readExecutionOutputOptions(bc),
|
|
2078
|
+
cwd: read0(bc),
|
|
2079
|
+
env: read29(bc),
|
|
2080
|
+
timeoutMs: read21(bc),
|
|
2081
|
+
packages: read6(bc),
|
|
2082
|
+
dev: read28(bc),
|
|
2083
|
+
global: read28(bc),
|
|
2084
|
+
};
|
|
2085
|
+
}
|
|
2086
|
+
export function writeNpmPackageInstallRequest(bc, x) {
|
|
2087
|
+
writeExecutionIdentityOptions(bc, x.identity);
|
|
2088
|
+
writeExecutionOutputOptions(bc, x.output);
|
|
2089
|
+
write0(bc, x.cwd);
|
|
2090
|
+
write29(bc, x.env);
|
|
2091
|
+
write21(bc, x.timeoutMs);
|
|
2092
|
+
write6(bc, x.packages);
|
|
2093
|
+
write28(bc, x.dev);
|
|
2094
|
+
write28(bc, x.global);
|
|
2095
|
+
}
|
|
2096
|
+
export function readNpmScriptExecutionRequest(bc) {
|
|
2097
|
+
return {
|
|
2098
|
+
process: readProcessExecutionOptions(bc),
|
|
2099
|
+
script: bare.readString(bc),
|
|
2100
|
+
};
|
|
2101
|
+
}
|
|
2102
|
+
export function writeNpmScriptExecutionRequest(bc, x) {
|
|
2103
|
+
writeProcessExecutionOptions(bc, x.process);
|
|
2104
|
+
bare.writeString(bc, x.script);
|
|
2105
|
+
}
|
|
2106
|
+
export function readNpmPackageExecutionRequest(bc) {
|
|
2107
|
+
return {
|
|
2108
|
+
process: readProcessExecutionOptions(bc),
|
|
2109
|
+
packageSpec: bare.readString(bc),
|
|
2110
|
+
binary: read0(bc),
|
|
2111
|
+
};
|
|
2112
|
+
}
|
|
2113
|
+
export function writeNpmPackageExecutionRequest(bc, x) {
|
|
2114
|
+
writeProcessExecutionOptions(bc, x.process);
|
|
2115
|
+
bare.writeString(bc, x.packageSpec);
|
|
2116
|
+
write0(bc, x.binary);
|
|
2117
|
+
}
|
|
2118
|
+
export function readPythonExecutionRequest(bc) {
|
|
2119
|
+
return {
|
|
2120
|
+
process: readProcessExecutionOptions(bc),
|
|
2121
|
+
source: bare.readString(bc),
|
|
2122
|
+
inputs: read33(bc),
|
|
2123
|
+
};
|
|
2124
|
+
}
|
|
2125
|
+
export function writePythonExecutionRequest(bc, x) {
|
|
2126
|
+
writeProcessExecutionOptions(bc, x.process);
|
|
2127
|
+
bare.writeString(bc, x.source);
|
|
2128
|
+
write33(bc, x.inputs);
|
|
2129
|
+
}
|
|
2130
|
+
export function readPythonEvaluationRequest(bc) {
|
|
2131
|
+
return {
|
|
2132
|
+
process: readProcessExecutionOptions(bc),
|
|
2133
|
+
expression: bare.readString(bc),
|
|
2134
|
+
inputs: read33(bc),
|
|
2135
|
+
};
|
|
2136
|
+
}
|
|
2137
|
+
export function writePythonEvaluationRequest(bc, x) {
|
|
2138
|
+
writeProcessExecutionOptions(bc, x.process);
|
|
2139
|
+
bare.writeString(bc, x.expression);
|
|
2140
|
+
write33(bc, x.inputs);
|
|
2141
|
+
}
|
|
2142
|
+
export function readPythonFileExecutionRequest(bc) {
|
|
2143
|
+
return {
|
|
2144
|
+
process: readProcessExecutionOptions(bc),
|
|
2145
|
+
path: bare.readString(bc),
|
|
2146
|
+
};
|
|
2147
|
+
}
|
|
2148
|
+
export function writePythonFileExecutionRequest(bc, x) {
|
|
2149
|
+
writeProcessExecutionOptions(bc, x.process);
|
|
2150
|
+
bare.writeString(bc, x.path);
|
|
2151
|
+
}
|
|
2152
|
+
export function readPythonModuleExecutionRequest(bc) {
|
|
2153
|
+
return {
|
|
2154
|
+
process: readProcessExecutionOptions(bc),
|
|
2155
|
+
module: bare.readString(bc),
|
|
2156
|
+
};
|
|
2157
|
+
}
|
|
2158
|
+
export function writePythonModuleExecutionRequest(bc, x) {
|
|
2159
|
+
writeProcessExecutionOptions(bc, x.process);
|
|
2160
|
+
bare.writeString(bc, x.module);
|
|
2161
|
+
}
|
|
2162
|
+
export function readPythonInstallRequest(bc) {
|
|
2163
|
+
return {
|
|
2164
|
+
identity: readExecutionIdentityOptions(bc),
|
|
2165
|
+
output: readExecutionOutputOptions(bc),
|
|
2166
|
+
cwd: read0(bc),
|
|
2167
|
+
env: read29(bc),
|
|
2168
|
+
timeoutMs: read21(bc),
|
|
2169
|
+
packages: read6(bc),
|
|
2170
|
+
upgrade: read28(bc),
|
|
2171
|
+
requirementsFile: read0(bc),
|
|
2172
|
+
indexUrl: read0(bc),
|
|
2173
|
+
extraIndexUrls: read6(bc),
|
|
2174
|
+
};
|
|
2175
|
+
}
|
|
2176
|
+
export function writePythonInstallRequest(bc, x) {
|
|
2177
|
+
writeExecutionIdentityOptions(bc, x.identity);
|
|
2178
|
+
writeExecutionOutputOptions(bc, x.output);
|
|
2179
|
+
write0(bc, x.cwd);
|
|
2180
|
+
write29(bc, x.env);
|
|
2181
|
+
write21(bc, x.timeoutMs);
|
|
2182
|
+
write6(bc, x.packages);
|
|
2183
|
+
write28(bc, x.upgrade);
|
|
2184
|
+
write0(bc, x.requirementsFile);
|
|
2185
|
+
write0(bc, x.indexUrl);
|
|
2186
|
+
write6(bc, x.extraIndexUrls);
|
|
2187
|
+
}
|
|
2188
|
+
export function readCreateContextRequest(bc) {
|
|
2189
|
+
return {
|
|
2190
|
+
contextId: bare.readString(bc),
|
|
2191
|
+
};
|
|
2192
|
+
}
|
|
2193
|
+
export function writeCreateContextRequest(bc, x) {
|
|
2194
|
+
bare.writeString(bc, x.contextId);
|
|
2195
|
+
}
|
|
2196
|
+
export function readGetExecutionRequest(bc) {
|
|
2197
|
+
return {
|
|
2198
|
+
executionId: bare.readString(bc),
|
|
2199
|
+
};
|
|
2200
|
+
}
|
|
2201
|
+
export function writeGetExecutionRequest(bc, x) {
|
|
2202
|
+
bare.writeString(bc, x.executionId);
|
|
2203
|
+
}
|
|
2204
|
+
export function readWaitExecutionRequest(bc) {
|
|
2205
|
+
return {
|
|
2206
|
+
executionId: bare.readString(bc),
|
|
2207
|
+
};
|
|
2208
|
+
}
|
|
2209
|
+
export function writeWaitExecutionRequest(bc, x) {
|
|
2210
|
+
bare.writeString(bc, x.executionId);
|
|
2211
|
+
}
|
|
2212
|
+
export function readCancelExecutionRequest(bc) {
|
|
2213
|
+
return {
|
|
2214
|
+
executionId: bare.readString(bc),
|
|
2215
|
+
};
|
|
2216
|
+
}
|
|
2217
|
+
export function writeCancelExecutionRequest(bc, x) {
|
|
2218
|
+
bare.writeString(bc, x.executionId);
|
|
2219
|
+
}
|
|
2220
|
+
export function readSignalExecutionRequest(bc) {
|
|
2221
|
+
return {
|
|
2222
|
+
executionId: bare.readString(bc),
|
|
2223
|
+
signal: bare.readString(bc),
|
|
2224
|
+
};
|
|
2225
|
+
}
|
|
2226
|
+
export function writeSignalExecutionRequest(bc, x) {
|
|
2227
|
+
bare.writeString(bc, x.executionId);
|
|
2228
|
+
bare.writeString(bc, x.signal);
|
|
2229
|
+
}
|
|
2230
|
+
export function readResetExecutionRequest(bc) {
|
|
2231
|
+
return {
|
|
2232
|
+
executionId: bare.readString(bc),
|
|
2233
|
+
};
|
|
2234
|
+
}
|
|
2235
|
+
export function writeResetExecutionRequest(bc, x) {
|
|
2236
|
+
bare.writeString(bc, x.executionId);
|
|
2237
|
+
}
|
|
2238
|
+
export function readDeleteExecutionRequest(bc) {
|
|
2239
|
+
return {
|
|
2240
|
+
executionId: bare.readString(bc),
|
|
2241
|
+
};
|
|
2242
|
+
}
|
|
2243
|
+
export function writeDeleteExecutionRequest(bc, x) {
|
|
2244
|
+
bare.writeString(bc, x.executionId);
|
|
2245
|
+
}
|
|
2246
|
+
export function readWriteExecutionStdinRequest(bc) {
|
|
2247
|
+
return {
|
|
2248
|
+
executionId: bare.readString(bc),
|
|
2249
|
+
chunk: bare.readData(bc),
|
|
2250
|
+
};
|
|
2251
|
+
}
|
|
2252
|
+
export function writeWriteExecutionStdinRequest(bc, x) {
|
|
2253
|
+
bare.writeString(bc, x.executionId);
|
|
2254
|
+
bare.writeData(bc, x.chunk);
|
|
2255
|
+
}
|
|
2256
|
+
export function readCloseExecutionStdinRequest(bc) {
|
|
2257
|
+
return {
|
|
2258
|
+
executionId: bare.readString(bc),
|
|
2259
|
+
};
|
|
2260
|
+
}
|
|
2261
|
+
export function writeCloseExecutionStdinRequest(bc, x) {
|
|
2262
|
+
bare.writeString(bc, x.executionId);
|
|
2263
|
+
}
|
|
2264
|
+
export function readResizeExecutionPtyRequest(bc) {
|
|
2265
|
+
return {
|
|
2266
|
+
executionId: bare.readString(bc),
|
|
2267
|
+
cols: bare.readU16(bc),
|
|
2268
|
+
rows: bare.readU16(bc),
|
|
2269
|
+
};
|
|
2270
|
+
}
|
|
2271
|
+
export function writeResizeExecutionPtyRequest(bc, x) {
|
|
2272
|
+
bare.writeString(bc, x.executionId);
|
|
2273
|
+
bare.writeU16(bc, x.cols);
|
|
2274
|
+
bare.writeU16(bc, x.rows);
|
|
2275
|
+
}
|
|
2276
|
+
export function readReadExecutionOutputRequest(bc) {
|
|
2277
|
+
return {
|
|
2278
|
+
executionId: bare.readString(bc),
|
|
2279
|
+
cursor: read0(bc),
|
|
2280
|
+
limit: read2(bc),
|
|
2281
|
+
};
|
|
2282
|
+
}
|
|
2283
|
+
export function writeReadExecutionOutputRequest(bc, x) {
|
|
2284
|
+
bare.writeString(bc, x.executionId);
|
|
2285
|
+
write0(bc, x.cursor);
|
|
2286
|
+
write2(bc, x.limit);
|
|
2287
|
+
}
|
|
1509
2288
|
export function readWriteStdinRequest(bc) {
|
|
1510
2289
|
return {
|
|
1511
2290
|
processId: bare.readString(bc),
|
|
@@ -1546,15 +2325,6 @@ export function writeKillProcessRequest(bc, x) {
|
|
|
1546
2325
|
bare.writeString(bc, x.processId);
|
|
1547
2326
|
bare.writeString(bc, x.signal);
|
|
1548
2327
|
}
|
|
1549
|
-
function read26(bc) {
|
|
1550
|
-
return bare.readBool(bc) ? bare.readU16(bc) : null;
|
|
1551
|
-
}
|
|
1552
|
-
function write26(bc, x) {
|
|
1553
|
-
bare.writeBool(bc, x != null);
|
|
1554
|
-
if (x != null) {
|
|
1555
|
-
bare.writeU16(bc, x);
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
2328
|
export function readFindListenerRequest(bc) {
|
|
1559
2329
|
return {
|
|
1560
2330
|
host: read0(bc),
|
|
@@ -1688,6 +2458,10 @@ export function readVmFetchRequest(bc) {
|
|
|
1688
2458
|
path: bare.readString(bc),
|
|
1689
2459
|
headersJson: bare.readString(bc),
|
|
1690
2460
|
body: read0(bc),
|
|
2461
|
+
bodyBase64: read0(bc),
|
|
2462
|
+
streamOperation: read0(bc),
|
|
2463
|
+
streamId: read0(bc),
|
|
2464
|
+
maxBytes: read2(bc),
|
|
1691
2465
|
};
|
|
1692
2466
|
}
|
|
1693
2467
|
export function writeVmFetchRequest(bc, x) {
|
|
@@ -1696,6 +2470,10 @@ export function writeVmFetchRequest(bc, x) {
|
|
|
1696
2470
|
bare.writeString(bc, x.path);
|
|
1697
2471
|
bare.writeString(bc, x.headersJson);
|
|
1698
2472
|
write0(bc, x.body);
|
|
2473
|
+
write0(bc, x.bodyBase64);
|
|
2474
|
+
write0(bc, x.streamOperation);
|
|
2475
|
+
write0(bc, x.streamId);
|
|
2476
|
+
write2(bc, x.maxBytes);
|
|
1699
2477
|
}
|
|
1700
2478
|
export function readRequestPayload(bc) {
|
|
1701
2479
|
const offset = bc.offset;
|
|
@@ -1728,7 +2506,7 @@ export function readRequestPayload(bc) {
|
|
|
1728
2506
|
case 12:
|
|
1729
2507
|
return { tag: "GuestFilesystemCallRequest", val: readGuestFilesystemCallRequest(bc) };
|
|
1730
2508
|
case 13:
|
|
1731
|
-
return { tag: "SnapshotRootFilesystemRequest", val:
|
|
2509
|
+
return { tag: "SnapshotRootFilesystemRequest", val: readSnapshotRootFilesystemRequest(bc) };
|
|
1732
2510
|
case 14:
|
|
1733
2511
|
return { tag: "ExecuteRequest", val: readExecuteRequest(bc) };
|
|
1734
2512
|
case 15:
|
|
@@ -1767,6 +2545,70 @@ export function readRequestPayload(bc) {
|
|
|
1767
2545
|
return { tag: "LinkPackageRequest", val: readLinkPackageRequest(bc) };
|
|
1768
2546
|
case 32:
|
|
1769
2547
|
return { tag: "ProvidedCommandsRequest", val: null };
|
|
2548
|
+
case 33:
|
|
2549
|
+
return { tag: "ListMountsRequest", val: null };
|
|
2550
|
+
case 34:
|
|
2551
|
+
return { tag: "ShellExecutionRequest", val: readShellExecutionRequest(bc) };
|
|
2552
|
+
case 35:
|
|
2553
|
+
return { tag: "ArgvExecutionRequest", val: readArgvExecutionRequest(bc) };
|
|
2554
|
+
case 36:
|
|
2555
|
+
return { tag: "JavaScriptExecutionRequest", val: readJavaScriptExecutionRequest(bc) };
|
|
2556
|
+
case 37:
|
|
2557
|
+
return { tag: "JavaScriptEvaluationRequest", val: readJavaScriptEvaluationRequest(bc) };
|
|
2558
|
+
case 38:
|
|
2559
|
+
return { tag: "JavaScriptFileExecutionRequest", val: readJavaScriptFileExecutionRequest(bc) };
|
|
2560
|
+
case 39:
|
|
2561
|
+
return { tag: "TypeScriptExecutionRequest", val: readTypeScriptExecutionRequest(bc) };
|
|
2562
|
+
case 40:
|
|
2563
|
+
return { tag: "TypeScriptEvaluationRequest", val: readTypeScriptEvaluationRequest(bc) };
|
|
2564
|
+
case 41:
|
|
2565
|
+
return { tag: "TypeScriptFileExecutionRequest", val: readTypeScriptFileExecutionRequest(bc) };
|
|
2566
|
+
case 42:
|
|
2567
|
+
return { tag: "TypeScriptCheckRequest", val: readTypeScriptCheckRequest(bc) };
|
|
2568
|
+
case 43:
|
|
2569
|
+
return { tag: "TypeScriptProjectCheckRequest", val: readTypeScriptProjectCheckRequest(bc) };
|
|
2570
|
+
case 44:
|
|
2571
|
+
return { tag: "NpmProjectInstallRequest", val: readNpmProjectInstallRequest(bc) };
|
|
2572
|
+
case 45:
|
|
2573
|
+
return { tag: "NpmPackageInstallRequest", val: readNpmPackageInstallRequest(bc) };
|
|
2574
|
+
case 46:
|
|
2575
|
+
return { tag: "NpmScriptExecutionRequest", val: readNpmScriptExecutionRequest(bc) };
|
|
2576
|
+
case 47:
|
|
2577
|
+
return { tag: "NpmPackageExecutionRequest", val: readNpmPackageExecutionRequest(bc) };
|
|
2578
|
+
case 48:
|
|
2579
|
+
return { tag: "PythonExecutionRequest", val: readPythonExecutionRequest(bc) };
|
|
2580
|
+
case 49:
|
|
2581
|
+
return { tag: "PythonEvaluationRequest", val: readPythonEvaluationRequest(bc) };
|
|
2582
|
+
case 50:
|
|
2583
|
+
return { tag: "PythonFileExecutionRequest", val: readPythonFileExecutionRequest(bc) };
|
|
2584
|
+
case 51:
|
|
2585
|
+
return { tag: "PythonModuleExecutionRequest", val: readPythonModuleExecutionRequest(bc) };
|
|
2586
|
+
case 52:
|
|
2587
|
+
return { tag: "PythonInstallRequest", val: readPythonInstallRequest(bc) };
|
|
2588
|
+
case 53:
|
|
2589
|
+
return { tag: "CreateContextRequest", val: readCreateContextRequest(bc) };
|
|
2590
|
+
case 54:
|
|
2591
|
+
return { tag: "GetExecutionRequest", val: readGetExecutionRequest(bc) };
|
|
2592
|
+
case 55:
|
|
2593
|
+
return { tag: "ListExecutionsRequest", val: null };
|
|
2594
|
+
case 56:
|
|
2595
|
+
return { tag: "WaitExecutionRequest", val: readWaitExecutionRequest(bc) };
|
|
2596
|
+
case 57:
|
|
2597
|
+
return { tag: "CancelExecutionRequest", val: readCancelExecutionRequest(bc) };
|
|
2598
|
+
case 58:
|
|
2599
|
+
return { tag: "SignalExecutionRequest", val: readSignalExecutionRequest(bc) };
|
|
2600
|
+
case 59:
|
|
2601
|
+
return { tag: "ResetExecutionRequest", val: readResetExecutionRequest(bc) };
|
|
2602
|
+
case 60:
|
|
2603
|
+
return { tag: "DeleteExecutionRequest", val: readDeleteExecutionRequest(bc) };
|
|
2604
|
+
case 61:
|
|
2605
|
+
return { tag: "WriteExecutionStdinRequest", val: readWriteExecutionStdinRequest(bc) };
|
|
2606
|
+
case 62:
|
|
2607
|
+
return { tag: "CloseExecutionStdinRequest", val: readCloseExecutionStdinRequest(bc) };
|
|
2608
|
+
case 63:
|
|
2609
|
+
return { tag: "ResizeExecutionPtyRequest", val: readResizeExecutionPtyRequest(bc) };
|
|
2610
|
+
case 64:
|
|
2611
|
+
return { tag: "ReadExecutionOutputRequest", val: readReadExecutionOutputRequest(bc) };
|
|
1770
2612
|
default: {
|
|
1771
2613
|
bc.offset = offset;
|
|
1772
2614
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1841,6 +2683,7 @@ export function writeRequestPayload(bc, x) {
|
|
|
1841
2683
|
}
|
|
1842
2684
|
case "SnapshotRootFilesystemRequest": {
|
|
1843
2685
|
bare.writeU8(bc, 13);
|
|
2686
|
+
writeSnapshotRootFilesystemRequest(bc, x.val);
|
|
1844
2687
|
break;
|
|
1845
2688
|
}
|
|
1846
2689
|
case "ExecuteRequest": {
|
|
@@ -1925,13 +2768,171 @@ export function writeRequestPayload(bc, x) {
|
|
|
1925
2768
|
bare.writeU8(bc, 30);
|
|
1926
2769
|
break;
|
|
1927
2770
|
}
|
|
1928
|
-
case "LinkPackageRequest": {
|
|
1929
|
-
bare.writeU8(bc, 31);
|
|
1930
|
-
writeLinkPackageRequest(bc, x.val);
|
|
2771
|
+
case "LinkPackageRequest": {
|
|
2772
|
+
bare.writeU8(bc, 31);
|
|
2773
|
+
writeLinkPackageRequest(bc, x.val);
|
|
2774
|
+
break;
|
|
2775
|
+
}
|
|
2776
|
+
case "ProvidedCommandsRequest": {
|
|
2777
|
+
bare.writeU8(bc, 32);
|
|
2778
|
+
break;
|
|
2779
|
+
}
|
|
2780
|
+
case "ListMountsRequest": {
|
|
2781
|
+
bare.writeU8(bc, 33);
|
|
2782
|
+
break;
|
|
2783
|
+
}
|
|
2784
|
+
case "ShellExecutionRequest": {
|
|
2785
|
+
bare.writeU8(bc, 34);
|
|
2786
|
+
writeShellExecutionRequest(bc, x.val);
|
|
2787
|
+
break;
|
|
2788
|
+
}
|
|
2789
|
+
case "ArgvExecutionRequest": {
|
|
2790
|
+
bare.writeU8(bc, 35);
|
|
2791
|
+
writeArgvExecutionRequest(bc, x.val);
|
|
2792
|
+
break;
|
|
2793
|
+
}
|
|
2794
|
+
case "JavaScriptExecutionRequest": {
|
|
2795
|
+
bare.writeU8(bc, 36);
|
|
2796
|
+
writeJavaScriptExecutionRequest(bc, x.val);
|
|
2797
|
+
break;
|
|
2798
|
+
}
|
|
2799
|
+
case "JavaScriptEvaluationRequest": {
|
|
2800
|
+
bare.writeU8(bc, 37);
|
|
2801
|
+
writeJavaScriptEvaluationRequest(bc, x.val);
|
|
2802
|
+
break;
|
|
2803
|
+
}
|
|
2804
|
+
case "JavaScriptFileExecutionRequest": {
|
|
2805
|
+
bare.writeU8(bc, 38);
|
|
2806
|
+
writeJavaScriptFileExecutionRequest(bc, x.val);
|
|
2807
|
+
break;
|
|
2808
|
+
}
|
|
2809
|
+
case "TypeScriptExecutionRequest": {
|
|
2810
|
+
bare.writeU8(bc, 39);
|
|
2811
|
+
writeTypeScriptExecutionRequest(bc, x.val);
|
|
2812
|
+
break;
|
|
2813
|
+
}
|
|
2814
|
+
case "TypeScriptEvaluationRequest": {
|
|
2815
|
+
bare.writeU8(bc, 40);
|
|
2816
|
+
writeTypeScriptEvaluationRequest(bc, x.val);
|
|
2817
|
+
break;
|
|
2818
|
+
}
|
|
2819
|
+
case "TypeScriptFileExecutionRequest": {
|
|
2820
|
+
bare.writeU8(bc, 41);
|
|
2821
|
+
writeTypeScriptFileExecutionRequest(bc, x.val);
|
|
2822
|
+
break;
|
|
2823
|
+
}
|
|
2824
|
+
case "TypeScriptCheckRequest": {
|
|
2825
|
+
bare.writeU8(bc, 42);
|
|
2826
|
+
writeTypeScriptCheckRequest(bc, x.val);
|
|
2827
|
+
break;
|
|
2828
|
+
}
|
|
2829
|
+
case "TypeScriptProjectCheckRequest": {
|
|
2830
|
+
bare.writeU8(bc, 43);
|
|
2831
|
+
writeTypeScriptProjectCheckRequest(bc, x.val);
|
|
2832
|
+
break;
|
|
2833
|
+
}
|
|
2834
|
+
case "NpmProjectInstallRequest": {
|
|
2835
|
+
bare.writeU8(bc, 44);
|
|
2836
|
+
writeNpmProjectInstallRequest(bc, x.val);
|
|
2837
|
+
break;
|
|
2838
|
+
}
|
|
2839
|
+
case "NpmPackageInstallRequest": {
|
|
2840
|
+
bare.writeU8(bc, 45);
|
|
2841
|
+
writeNpmPackageInstallRequest(bc, x.val);
|
|
2842
|
+
break;
|
|
2843
|
+
}
|
|
2844
|
+
case "NpmScriptExecutionRequest": {
|
|
2845
|
+
bare.writeU8(bc, 46);
|
|
2846
|
+
writeNpmScriptExecutionRequest(bc, x.val);
|
|
2847
|
+
break;
|
|
2848
|
+
}
|
|
2849
|
+
case "NpmPackageExecutionRequest": {
|
|
2850
|
+
bare.writeU8(bc, 47);
|
|
2851
|
+
writeNpmPackageExecutionRequest(bc, x.val);
|
|
2852
|
+
break;
|
|
2853
|
+
}
|
|
2854
|
+
case "PythonExecutionRequest": {
|
|
2855
|
+
bare.writeU8(bc, 48);
|
|
2856
|
+
writePythonExecutionRequest(bc, x.val);
|
|
2857
|
+
break;
|
|
2858
|
+
}
|
|
2859
|
+
case "PythonEvaluationRequest": {
|
|
2860
|
+
bare.writeU8(bc, 49);
|
|
2861
|
+
writePythonEvaluationRequest(bc, x.val);
|
|
2862
|
+
break;
|
|
2863
|
+
}
|
|
2864
|
+
case "PythonFileExecutionRequest": {
|
|
2865
|
+
bare.writeU8(bc, 50);
|
|
2866
|
+
writePythonFileExecutionRequest(bc, x.val);
|
|
2867
|
+
break;
|
|
2868
|
+
}
|
|
2869
|
+
case "PythonModuleExecutionRequest": {
|
|
2870
|
+
bare.writeU8(bc, 51);
|
|
2871
|
+
writePythonModuleExecutionRequest(bc, x.val);
|
|
2872
|
+
break;
|
|
2873
|
+
}
|
|
2874
|
+
case "PythonInstallRequest": {
|
|
2875
|
+
bare.writeU8(bc, 52);
|
|
2876
|
+
writePythonInstallRequest(bc, x.val);
|
|
2877
|
+
break;
|
|
2878
|
+
}
|
|
2879
|
+
case "CreateContextRequest": {
|
|
2880
|
+
bare.writeU8(bc, 53);
|
|
2881
|
+
writeCreateContextRequest(bc, x.val);
|
|
2882
|
+
break;
|
|
2883
|
+
}
|
|
2884
|
+
case "GetExecutionRequest": {
|
|
2885
|
+
bare.writeU8(bc, 54);
|
|
2886
|
+
writeGetExecutionRequest(bc, x.val);
|
|
2887
|
+
break;
|
|
2888
|
+
}
|
|
2889
|
+
case "ListExecutionsRequest": {
|
|
2890
|
+
bare.writeU8(bc, 55);
|
|
2891
|
+
break;
|
|
2892
|
+
}
|
|
2893
|
+
case "WaitExecutionRequest": {
|
|
2894
|
+
bare.writeU8(bc, 56);
|
|
2895
|
+
writeWaitExecutionRequest(bc, x.val);
|
|
2896
|
+
break;
|
|
2897
|
+
}
|
|
2898
|
+
case "CancelExecutionRequest": {
|
|
2899
|
+
bare.writeU8(bc, 57);
|
|
2900
|
+
writeCancelExecutionRequest(bc, x.val);
|
|
2901
|
+
break;
|
|
2902
|
+
}
|
|
2903
|
+
case "SignalExecutionRequest": {
|
|
2904
|
+
bare.writeU8(bc, 58);
|
|
2905
|
+
writeSignalExecutionRequest(bc, x.val);
|
|
2906
|
+
break;
|
|
2907
|
+
}
|
|
2908
|
+
case "ResetExecutionRequest": {
|
|
2909
|
+
bare.writeU8(bc, 59);
|
|
2910
|
+
writeResetExecutionRequest(bc, x.val);
|
|
2911
|
+
break;
|
|
2912
|
+
}
|
|
2913
|
+
case "DeleteExecutionRequest": {
|
|
2914
|
+
bare.writeU8(bc, 60);
|
|
2915
|
+
writeDeleteExecutionRequest(bc, x.val);
|
|
2916
|
+
break;
|
|
2917
|
+
}
|
|
2918
|
+
case "WriteExecutionStdinRequest": {
|
|
2919
|
+
bare.writeU8(bc, 61);
|
|
2920
|
+
writeWriteExecutionStdinRequest(bc, x.val);
|
|
2921
|
+
break;
|
|
2922
|
+
}
|
|
2923
|
+
case "CloseExecutionStdinRequest": {
|
|
2924
|
+
bare.writeU8(bc, 62);
|
|
2925
|
+
writeCloseExecutionStdinRequest(bc, x.val);
|
|
2926
|
+
break;
|
|
2927
|
+
}
|
|
2928
|
+
case "ResizeExecutionPtyRequest": {
|
|
2929
|
+
bare.writeU8(bc, 63);
|
|
2930
|
+
writeResizeExecutionPtyRequest(bc, x.val);
|
|
1931
2931
|
break;
|
|
1932
2932
|
}
|
|
1933
|
-
case "
|
|
1934
|
-
bare.writeU8(bc,
|
|
2933
|
+
case "ReadExecutionOutputRequest": {
|
|
2934
|
+
bare.writeU8(bc, 64);
|
|
2935
|
+
writeReadExecutionOutputRequest(bc, x.val);
|
|
1935
2936
|
break;
|
|
1936
2937
|
}
|
|
1937
2938
|
}
|
|
@@ -2114,7 +3115,7 @@ export function writeGuestDirEntry(bc, x) {
|
|
|
2114
3115
|
bare.writeBool(bc, x.isSymbolicLink);
|
|
2115
3116
|
bare.writeU64(bc, x.size);
|
|
2116
3117
|
}
|
|
2117
|
-
function
|
|
3118
|
+
function read34(bc) {
|
|
2118
3119
|
const len = bare.readUintSafe(bc);
|
|
2119
3120
|
if (len === 0) {
|
|
2120
3121
|
return [];
|
|
@@ -2125,48 +3126,39 @@ function read27(bc) {
|
|
|
2125
3126
|
}
|
|
2126
3127
|
return result;
|
|
2127
3128
|
}
|
|
2128
|
-
function
|
|
3129
|
+
function write34(bc, x) {
|
|
2129
3130
|
bare.writeUintSafe(bc, x.length);
|
|
2130
3131
|
for (let i = 0; i < x.length; i++) {
|
|
2131
3132
|
writeGuestDirEntry(bc, x[i]);
|
|
2132
3133
|
}
|
|
2133
3134
|
}
|
|
2134
|
-
function
|
|
2135
|
-
return bare.readBool(bc) ?
|
|
3135
|
+
function read35(bc) {
|
|
3136
|
+
return bare.readBool(bc) ? read34(bc) : null;
|
|
2136
3137
|
}
|
|
2137
|
-
function
|
|
3138
|
+
function write35(bc, x) {
|
|
2138
3139
|
bare.writeBool(bc, x != null);
|
|
2139
3140
|
if (x != null) {
|
|
2140
|
-
|
|
3141
|
+
write34(bc, x);
|
|
2141
3142
|
}
|
|
2142
3143
|
}
|
|
2143
|
-
function
|
|
3144
|
+
function read36(bc) {
|
|
2144
3145
|
return bare.readBool(bc) ? readGuestFilesystemStat(bc) : null;
|
|
2145
3146
|
}
|
|
2146
|
-
function
|
|
3147
|
+
function write36(bc, x) {
|
|
2147
3148
|
bare.writeBool(bc, x != null);
|
|
2148
3149
|
if (x != null) {
|
|
2149
3150
|
writeGuestFilesystemStat(bc, x);
|
|
2150
3151
|
}
|
|
2151
3152
|
}
|
|
2152
|
-
function read30(bc) {
|
|
2153
|
-
return bare.readBool(bc) ? bare.readBool(bc) : null;
|
|
2154
|
-
}
|
|
2155
|
-
function write30(bc, x) {
|
|
2156
|
-
bare.writeBool(bc, x != null);
|
|
2157
|
-
if (x != null) {
|
|
2158
|
-
bare.writeBool(bc, x);
|
|
2159
|
-
}
|
|
2160
|
-
}
|
|
2161
3153
|
export function readGuestFilesystemResultResponse(bc) {
|
|
2162
3154
|
return {
|
|
2163
3155
|
operation: readGuestFilesystemOperation(bc),
|
|
2164
3156
|
path: bare.readString(bc),
|
|
2165
3157
|
content: read0(bc),
|
|
2166
3158
|
encoding: read3(bc),
|
|
2167
|
-
entries:
|
|
2168
|
-
stat:
|
|
2169
|
-
exists:
|
|
3159
|
+
entries: read35(bc),
|
|
3160
|
+
stat: read36(bc),
|
|
3161
|
+
exists: read28(bc),
|
|
2170
3162
|
target: read0(bc),
|
|
2171
3163
|
};
|
|
2172
3164
|
}
|
|
@@ -2175,9 +3167,9 @@ export function writeGuestFilesystemResultResponse(bc, x) {
|
|
|
2175
3167
|
bare.writeString(bc, x.path);
|
|
2176
3168
|
write0(bc, x.content);
|
|
2177
3169
|
write3(bc, x.encoding);
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
3170
|
+
write35(bc, x.entries);
|
|
3171
|
+
write36(bc, x.stat);
|
|
3172
|
+
write28(bc, x.exists);
|
|
2181
3173
|
write0(bc, x.target);
|
|
2182
3174
|
}
|
|
2183
3175
|
export function readGuestKernelResultResponse(bc) {
|
|
@@ -2196,6 +3188,31 @@ export function readRootFilesystemSnapshotResponse(bc) {
|
|
|
2196
3188
|
export function writeRootFilesystemSnapshotResponse(bc, x) {
|
|
2197
3189
|
write4(bc, x.entries);
|
|
2198
3190
|
}
|
|
3191
|
+
function read37(bc) {
|
|
3192
|
+
const len = bare.readUintSafe(bc);
|
|
3193
|
+
if (len === 0) {
|
|
3194
|
+
return [];
|
|
3195
|
+
}
|
|
3196
|
+
const result = [readMountInfo(bc)];
|
|
3197
|
+
for (let i = 1; i < len; i++) {
|
|
3198
|
+
result[i] = readMountInfo(bc);
|
|
3199
|
+
}
|
|
3200
|
+
return result;
|
|
3201
|
+
}
|
|
3202
|
+
function write37(bc, x) {
|
|
3203
|
+
bare.writeUintSafe(bc, x.length);
|
|
3204
|
+
for (let i = 0; i < x.length; i++) {
|
|
3205
|
+
writeMountInfo(bc, x[i]);
|
|
3206
|
+
}
|
|
3207
|
+
}
|
|
3208
|
+
export function readListMountsResponse(bc) {
|
|
3209
|
+
return {
|
|
3210
|
+
mounts: read37(bc),
|
|
3211
|
+
};
|
|
3212
|
+
}
|
|
3213
|
+
export function writeListMountsResponse(bc, x) {
|
|
3214
|
+
write37(bc, x.mounts);
|
|
3215
|
+
}
|
|
2199
3216
|
export function readProcessStartedResponse(bc) {
|
|
2200
3217
|
return {
|
|
2201
3218
|
processId: bare.readString(bc),
|
|
@@ -2282,10 +3299,10 @@ export function writeProcessSnapshotStatus(bc, x) {
|
|
|
2282
3299
|
}
|
|
2283
3300
|
}
|
|
2284
3301
|
}
|
|
2285
|
-
function
|
|
3302
|
+
function read38(bc) {
|
|
2286
3303
|
return bare.readBool(bc) ? bare.readI32(bc) : null;
|
|
2287
3304
|
}
|
|
2288
|
-
function
|
|
3305
|
+
function write38(bc, x) {
|
|
2289
3306
|
bare.writeBool(bc, x != null);
|
|
2290
3307
|
if (x != null) {
|
|
2291
3308
|
bare.writeI32(bc, x);
|
|
@@ -2303,7 +3320,7 @@ export function readProcessSnapshotEntry(bc) {
|
|
|
2303
3320
|
args: read6(bc),
|
|
2304
3321
|
cwd: bare.readString(bc),
|
|
2305
3322
|
status: readProcessSnapshotStatus(bc),
|
|
2306
|
-
exitCode:
|
|
3323
|
+
exitCode: read38(bc),
|
|
2307
3324
|
};
|
|
2308
3325
|
}
|
|
2309
3326
|
export function writeProcessSnapshotEntry(bc, x) {
|
|
@@ -2317,9 +3334,9 @@ export function writeProcessSnapshotEntry(bc, x) {
|
|
|
2317
3334
|
write6(bc, x.args);
|
|
2318
3335
|
bare.writeString(bc, x.cwd);
|
|
2319
3336
|
writeProcessSnapshotStatus(bc, x.status);
|
|
2320
|
-
|
|
3337
|
+
write38(bc, x.exitCode);
|
|
2321
3338
|
}
|
|
2322
|
-
function
|
|
3339
|
+
function read39(bc) {
|
|
2323
3340
|
const len = bare.readUintSafe(bc);
|
|
2324
3341
|
if (len === 0) {
|
|
2325
3342
|
return [];
|
|
@@ -2330,7 +3347,7 @@ function read32(bc) {
|
|
|
2330
3347
|
}
|
|
2331
3348
|
return result;
|
|
2332
3349
|
}
|
|
2333
|
-
function
|
|
3350
|
+
function write39(bc, x) {
|
|
2334
3351
|
bare.writeUintSafe(bc, x.length);
|
|
2335
3352
|
for (let i = 0; i < x.length; i++) {
|
|
2336
3353
|
writeProcessSnapshotEntry(bc, x[i]);
|
|
@@ -2338,11 +3355,11 @@ function write32(bc, x) {
|
|
|
2338
3355
|
}
|
|
2339
3356
|
export function readProcessSnapshotResponse(bc) {
|
|
2340
3357
|
return {
|
|
2341
|
-
processes:
|
|
3358
|
+
processes: read39(bc),
|
|
2342
3359
|
};
|
|
2343
3360
|
}
|
|
2344
3361
|
export function writeProcessSnapshotResponse(bc, x) {
|
|
2345
|
-
|
|
3362
|
+
write39(bc, x.processes);
|
|
2346
3363
|
}
|
|
2347
3364
|
export function readQueueSnapshotEntry(bc) {
|
|
2348
3365
|
return {
|
|
@@ -2362,7 +3379,7 @@ export function writeQueueSnapshotEntry(bc, x) {
|
|
|
2362
3379
|
bare.writeU64(bc, x.capacity);
|
|
2363
3380
|
bare.writeU64(bc, x.fillPercent);
|
|
2364
3381
|
}
|
|
2365
|
-
function
|
|
3382
|
+
function read40(bc) {
|
|
2366
3383
|
const len = bare.readUintSafe(bc);
|
|
2367
3384
|
if (len === 0) {
|
|
2368
3385
|
return [];
|
|
@@ -2373,7 +3390,7 @@ function read33(bc) {
|
|
|
2373
3390
|
}
|
|
2374
3391
|
return result;
|
|
2375
3392
|
}
|
|
2376
|
-
function
|
|
3393
|
+
function write40(bc, x) {
|
|
2377
3394
|
bare.writeUintSafe(bc, x.length);
|
|
2378
3395
|
for (let i = 0; i < x.length; i++) {
|
|
2379
3396
|
writeQueueSnapshotEntry(bc, x[i]);
|
|
@@ -2395,7 +3412,7 @@ export function readResourceSnapshotResponse(bc) {
|
|
|
2395
3412
|
socketConnections: bare.readU64(bc),
|
|
2396
3413
|
socketBufferedBytes: bare.readU64(bc),
|
|
2397
3414
|
socketDatagramQueueLen: bare.readU64(bc),
|
|
2398
|
-
queueSnapshots:
|
|
3415
|
+
queueSnapshots: read40(bc),
|
|
2399
3416
|
};
|
|
2400
3417
|
}
|
|
2401
3418
|
export function writeResourceSnapshotResponse(bc, x) {
|
|
@@ -2413,7 +3430,7 @@ export function writeResourceSnapshotResponse(bc, x) {
|
|
|
2413
3430
|
bare.writeU64(bc, x.socketConnections);
|
|
2414
3431
|
bare.writeU64(bc, x.socketBufferedBytes);
|
|
2415
3432
|
bare.writeU64(bc, x.socketDatagramQueueLen);
|
|
2416
|
-
|
|
3433
|
+
write40(bc, x.queueSnapshots);
|
|
2417
3434
|
}
|
|
2418
3435
|
export function readSocketStateEntry(bc) {
|
|
2419
3436
|
return {
|
|
@@ -2429,10 +3446,10 @@ export function writeSocketStateEntry(bc, x) {
|
|
|
2429
3446
|
write26(bc, x.port);
|
|
2430
3447
|
write0(bc, x.path);
|
|
2431
3448
|
}
|
|
2432
|
-
function
|
|
3449
|
+
function read41(bc) {
|
|
2433
3450
|
return bare.readBool(bc) ? readSocketStateEntry(bc) : null;
|
|
2434
3451
|
}
|
|
2435
|
-
function
|
|
3452
|
+
function write41(bc, x) {
|
|
2436
3453
|
bare.writeBool(bc, x != null);
|
|
2437
3454
|
if (x != null) {
|
|
2438
3455
|
writeSocketStateEntry(bc, x);
|
|
@@ -2440,19 +3457,19 @@ function write34(bc, x) {
|
|
|
2440
3457
|
}
|
|
2441
3458
|
export function readListenerSnapshotResponse(bc) {
|
|
2442
3459
|
return {
|
|
2443
|
-
listener:
|
|
3460
|
+
listener: read41(bc),
|
|
2444
3461
|
};
|
|
2445
3462
|
}
|
|
2446
3463
|
export function writeListenerSnapshotResponse(bc, x) {
|
|
2447
|
-
|
|
3464
|
+
write41(bc, x.listener);
|
|
2448
3465
|
}
|
|
2449
3466
|
export function readBoundUdpSnapshotResponse(bc) {
|
|
2450
3467
|
return {
|
|
2451
|
-
socket:
|
|
3468
|
+
socket: read41(bc),
|
|
2452
3469
|
};
|
|
2453
3470
|
}
|
|
2454
3471
|
export function writeBoundUdpSnapshotResponse(bc, x) {
|
|
2455
|
-
|
|
3472
|
+
write41(bc, x.socket);
|
|
2456
3473
|
}
|
|
2457
3474
|
export var SignalDispositionAction;
|
|
2458
3475
|
(function (SignalDispositionAction) {
|
|
@@ -2504,7 +3521,7 @@ export function writeSignalHandlerRegistration(bc, x) {
|
|
|
2504
3521
|
bare.writeU32Array(bc, x.mask);
|
|
2505
3522
|
bare.writeU32(bc, x.flags);
|
|
2506
3523
|
}
|
|
2507
|
-
function
|
|
3524
|
+
function read42(bc) {
|
|
2508
3525
|
const len = bare.readUintSafe(bc);
|
|
2509
3526
|
const result = new Map();
|
|
2510
3527
|
for (let i = 0; i < len; i++) {
|
|
@@ -2518,7 +3535,7 @@ function read35(bc) {
|
|
|
2518
3535
|
}
|
|
2519
3536
|
return result;
|
|
2520
3537
|
}
|
|
2521
|
-
function
|
|
3538
|
+
function write42(bc, x) {
|
|
2522
3539
|
bare.writeUintSafe(bc, x.size);
|
|
2523
3540
|
for (const kv of x) {
|
|
2524
3541
|
bare.writeU32(bc, kv[0]);
|
|
@@ -2528,12 +3545,12 @@ function write35(bc, x) {
|
|
|
2528
3545
|
export function readSignalStateResponse(bc) {
|
|
2529
3546
|
return {
|
|
2530
3547
|
processId: bare.readString(bc),
|
|
2531
|
-
handlers:
|
|
3548
|
+
handlers: read42(bc),
|
|
2532
3549
|
};
|
|
2533
3550
|
}
|
|
2534
3551
|
export function writeSignalStateResponse(bc, x) {
|
|
2535
3552
|
bare.writeString(bc, x.processId);
|
|
2536
|
-
|
|
3553
|
+
write42(bc, x.handlers);
|
|
2537
3554
|
}
|
|
2538
3555
|
export function readZombieTimerCountResponse(bc) {
|
|
2539
3556
|
return {
|
|
@@ -2591,11 +3608,37 @@ export function readRejectedResponse(bc) {
|
|
|
2591
3608
|
return {
|
|
2592
3609
|
code: bare.readString(bc),
|
|
2593
3610
|
message: bare.readString(bc),
|
|
3611
|
+
limitName: read0(bc),
|
|
3612
|
+
configuredLimit: read21(bc),
|
|
3613
|
+
currentUsage: read21(bc),
|
|
3614
|
+
requested: read21(bc),
|
|
3615
|
+
unit: read0(bc),
|
|
3616
|
+
scope: read0(bc),
|
|
3617
|
+
vmId: read0(bc),
|
|
3618
|
+
sessionGeneration: read21(bc),
|
|
3619
|
+
capabilityId: read21(bc),
|
|
3620
|
+
operation: read0(bc),
|
|
3621
|
+
configurationPath: read0(bc),
|
|
3622
|
+
retryable: read28(bc),
|
|
3623
|
+
errno: read0(bc),
|
|
2594
3624
|
};
|
|
2595
3625
|
}
|
|
2596
3626
|
export function writeRejectedResponse(bc, x) {
|
|
2597
3627
|
bare.writeString(bc, x.code);
|
|
2598
3628
|
bare.writeString(bc, x.message);
|
|
3629
|
+
write0(bc, x.limitName);
|
|
3630
|
+
write21(bc, x.configuredLimit);
|
|
3631
|
+
write21(bc, x.currentUsage);
|
|
3632
|
+
write21(bc, x.requested);
|
|
3633
|
+
write0(bc, x.unit);
|
|
3634
|
+
write0(bc, x.scope);
|
|
3635
|
+
write0(bc, x.vmId);
|
|
3636
|
+
write21(bc, x.sessionGeneration);
|
|
3637
|
+
write21(bc, x.capabilityId);
|
|
3638
|
+
write0(bc, x.operation);
|
|
3639
|
+
write0(bc, x.configurationPath);
|
|
3640
|
+
write28(bc, x.retryable);
|
|
3641
|
+
write0(bc, x.errno);
|
|
2599
3642
|
}
|
|
2600
3643
|
export function readVmFetchResponse(bc) {
|
|
2601
3644
|
return {
|
|
@@ -2605,6 +3648,285 @@ export function readVmFetchResponse(bc) {
|
|
|
2605
3648
|
export function writeVmFetchResponse(bc, x) {
|
|
2606
3649
|
bare.writeString(bc, x.responseJson);
|
|
2607
3650
|
}
|
|
3651
|
+
function read43(bc) {
|
|
3652
|
+
return bare.readBool(bc) ? readRetainedExecutionLanguage(bc) : null;
|
|
3653
|
+
}
|
|
3654
|
+
function write43(bc, x) {
|
|
3655
|
+
bare.writeBool(bc, x != null);
|
|
3656
|
+
if (x != null) {
|
|
3657
|
+
writeRetainedExecutionLanguage(bc, x);
|
|
3658
|
+
}
|
|
3659
|
+
}
|
|
3660
|
+
function read44(bc) {
|
|
3661
|
+
return bare.readBool(bc) ? readExecutionOutcome(bc) : null;
|
|
3662
|
+
}
|
|
3663
|
+
function write44(bc, x) {
|
|
3664
|
+
bare.writeBool(bc, x != null);
|
|
3665
|
+
if (x != null) {
|
|
3666
|
+
writeExecutionOutcome(bc, x);
|
|
3667
|
+
}
|
|
3668
|
+
}
|
|
3669
|
+
export function readExecutionDescriptor(bc) {
|
|
3670
|
+
return {
|
|
3671
|
+
executionId: bare.readString(bc),
|
|
3672
|
+
generation: bare.readU64(bc),
|
|
3673
|
+
state: readExecutionState(bc),
|
|
3674
|
+
retainedLanguage: read43(bc),
|
|
3675
|
+
processId: read0(bc),
|
|
3676
|
+
pid: read2(bc),
|
|
3677
|
+
createdAtMs: bare.readU64(bc),
|
|
3678
|
+
lastStartedAtMs: read21(bc),
|
|
3679
|
+
lastCompletedAtMs: read21(bc),
|
|
3680
|
+
lastOutcome: read44(bc),
|
|
3681
|
+
lastExitCode: read38(bc),
|
|
3682
|
+
};
|
|
3683
|
+
}
|
|
3684
|
+
export function writeExecutionDescriptor(bc, x) {
|
|
3685
|
+
bare.writeString(bc, x.executionId);
|
|
3686
|
+
bare.writeU64(bc, x.generation);
|
|
3687
|
+
writeExecutionState(bc, x.state);
|
|
3688
|
+
write43(bc, x.retainedLanguage);
|
|
3689
|
+
write0(bc, x.processId);
|
|
3690
|
+
write2(bc, x.pid);
|
|
3691
|
+
bare.writeU64(bc, x.createdAtMs);
|
|
3692
|
+
write21(bc, x.lastStartedAtMs);
|
|
3693
|
+
write21(bc, x.lastCompletedAtMs);
|
|
3694
|
+
write44(bc, x.lastOutcome);
|
|
3695
|
+
write38(bc, x.lastExitCode);
|
|
3696
|
+
}
|
|
3697
|
+
export function readExecutionErrorData(bc) {
|
|
3698
|
+
return {
|
|
3699
|
+
code: bare.readString(bc),
|
|
3700
|
+
name: bare.readString(bc),
|
|
3701
|
+
message: bare.readString(bc),
|
|
3702
|
+
stack: read0(bc),
|
|
3703
|
+
details: read33(bc),
|
|
3704
|
+
};
|
|
3705
|
+
}
|
|
3706
|
+
export function writeExecutionErrorData(bc, x) {
|
|
3707
|
+
bare.writeString(bc, x.code);
|
|
3708
|
+
bare.writeString(bc, x.name);
|
|
3709
|
+
bare.writeString(bc, x.message);
|
|
3710
|
+
write0(bc, x.stack);
|
|
3711
|
+
write33(bc, x.details);
|
|
3712
|
+
}
|
|
3713
|
+
function read45(bc) {
|
|
3714
|
+
return bare.readBool(bc) ? readExecutionDescriptor(bc) : null;
|
|
3715
|
+
}
|
|
3716
|
+
function write45(bc, x) {
|
|
3717
|
+
bare.writeBool(bc, x != null);
|
|
3718
|
+
if (x != null) {
|
|
3719
|
+
writeExecutionDescriptor(bc, x);
|
|
3720
|
+
}
|
|
3721
|
+
}
|
|
3722
|
+
export function readExecutionAcceptedResponse(bc) {
|
|
3723
|
+
return {
|
|
3724
|
+
operationId: bare.readString(bc),
|
|
3725
|
+
execution: read45(bc),
|
|
3726
|
+
};
|
|
3727
|
+
}
|
|
3728
|
+
export function writeExecutionAcceptedResponse(bc, x) {
|
|
3729
|
+
bare.writeString(bc, x.operationId);
|
|
3730
|
+
write45(bc, x.execution);
|
|
3731
|
+
}
|
|
3732
|
+
function read46(bc) {
|
|
3733
|
+
return bare.readBool(bc) ? readExecutionErrorData(bc) : null;
|
|
3734
|
+
}
|
|
3735
|
+
function write46(bc, x) {
|
|
3736
|
+
bare.writeBool(bc, x != null);
|
|
3737
|
+
if (x != null) {
|
|
3738
|
+
writeExecutionErrorData(bc, x);
|
|
3739
|
+
}
|
|
3740
|
+
}
|
|
3741
|
+
export function readExecutionCompletedResponse(bc) {
|
|
3742
|
+
return {
|
|
3743
|
+
execution: read45(bc),
|
|
3744
|
+
outcome: readExecutionOutcome(bc),
|
|
3745
|
+
exitCode: read38(bc),
|
|
3746
|
+
error: read46(bc),
|
|
3747
|
+
stdout: read30(bc),
|
|
3748
|
+
stderr: read30(bc),
|
|
3749
|
+
stdoutTruncated: read28(bc),
|
|
3750
|
+
stderrTruncated: read28(bc),
|
|
3751
|
+
evaluationValue: read33(bc),
|
|
3752
|
+
typeScriptCheckResult: read33(bc),
|
|
3753
|
+
};
|
|
3754
|
+
}
|
|
3755
|
+
export function writeExecutionCompletedResponse(bc, x) {
|
|
3756
|
+
write45(bc, x.execution);
|
|
3757
|
+
writeExecutionOutcome(bc, x.outcome);
|
|
3758
|
+
write38(bc, x.exitCode);
|
|
3759
|
+
write46(bc, x.error);
|
|
3760
|
+
write30(bc, x.stdout);
|
|
3761
|
+
write30(bc, x.stderr);
|
|
3762
|
+
write28(bc, x.stdoutTruncated);
|
|
3763
|
+
write28(bc, x.stderrTruncated);
|
|
3764
|
+
write33(bc, x.evaluationValue);
|
|
3765
|
+
write33(bc, x.typeScriptCheckResult);
|
|
3766
|
+
}
|
|
3767
|
+
export function readExecutionEvaluationResponse(bc) {
|
|
3768
|
+
return {
|
|
3769
|
+
result: readExecutionCompletedResponse(bc),
|
|
3770
|
+
value: read33(bc),
|
|
3771
|
+
};
|
|
3772
|
+
}
|
|
3773
|
+
export function writeExecutionEvaluationResponse(bc, x) {
|
|
3774
|
+
writeExecutionCompletedResponse(bc, x.result);
|
|
3775
|
+
write33(bc, x.value);
|
|
3776
|
+
}
|
|
3777
|
+
export function readTypeScriptDiagnostic(bc) {
|
|
3778
|
+
return {
|
|
3779
|
+
code: bare.readU32(bc),
|
|
3780
|
+
category: bare.readString(bc),
|
|
3781
|
+
message: bare.readString(bc),
|
|
3782
|
+
filePath: read0(bc),
|
|
3783
|
+
line: read2(bc),
|
|
3784
|
+
column: read2(bc),
|
|
3785
|
+
};
|
|
3786
|
+
}
|
|
3787
|
+
export function writeTypeScriptDiagnostic(bc, x) {
|
|
3788
|
+
bare.writeU32(bc, x.code);
|
|
3789
|
+
bare.writeString(bc, x.category);
|
|
3790
|
+
bare.writeString(bc, x.message);
|
|
3791
|
+
write0(bc, x.filePath);
|
|
3792
|
+
write2(bc, x.line);
|
|
3793
|
+
write2(bc, x.column);
|
|
3794
|
+
}
|
|
3795
|
+
function read47(bc) {
|
|
3796
|
+
const len = bare.readUintSafe(bc);
|
|
3797
|
+
if (len === 0) {
|
|
3798
|
+
return [];
|
|
3799
|
+
}
|
|
3800
|
+
const result = [readTypeScriptDiagnostic(bc)];
|
|
3801
|
+
for (let i = 1; i < len; i++) {
|
|
3802
|
+
result[i] = readTypeScriptDiagnostic(bc);
|
|
3803
|
+
}
|
|
3804
|
+
return result;
|
|
3805
|
+
}
|
|
3806
|
+
function write47(bc, x) {
|
|
3807
|
+
bare.writeUintSafe(bc, x.length);
|
|
3808
|
+
for (let i = 0; i < x.length; i++) {
|
|
3809
|
+
writeTypeScriptDiagnostic(bc, x[i]);
|
|
3810
|
+
}
|
|
3811
|
+
}
|
|
3812
|
+
export function readTypeScriptCheckResponse(bc) {
|
|
3813
|
+
return {
|
|
3814
|
+
result: readExecutionCompletedResponse(bc),
|
|
3815
|
+
hasErrors: read28(bc),
|
|
3816
|
+
diagnostics: read47(bc),
|
|
3817
|
+
};
|
|
3818
|
+
}
|
|
3819
|
+
export function writeTypeScriptCheckResponse(bc, x) {
|
|
3820
|
+
writeExecutionCompletedResponse(bc, x.result);
|
|
3821
|
+
write28(bc, x.hasErrors);
|
|
3822
|
+
write47(bc, x.diagnostics);
|
|
3823
|
+
}
|
|
3824
|
+
export function readExecutionDescriptorResponse(bc) {
|
|
3825
|
+
return {
|
|
3826
|
+
execution: readExecutionDescriptor(bc),
|
|
3827
|
+
};
|
|
3828
|
+
}
|
|
3829
|
+
export function writeExecutionDescriptorResponse(bc, x) {
|
|
3830
|
+
writeExecutionDescriptor(bc, x.execution);
|
|
3831
|
+
}
|
|
3832
|
+
function read48(bc) {
|
|
3833
|
+
const len = bare.readUintSafe(bc);
|
|
3834
|
+
if (len === 0) {
|
|
3835
|
+
return [];
|
|
3836
|
+
}
|
|
3837
|
+
const result = [readExecutionDescriptor(bc)];
|
|
3838
|
+
for (let i = 1; i < len; i++) {
|
|
3839
|
+
result[i] = readExecutionDescriptor(bc);
|
|
3840
|
+
}
|
|
3841
|
+
return result;
|
|
3842
|
+
}
|
|
3843
|
+
function write48(bc, x) {
|
|
3844
|
+
bare.writeUintSafe(bc, x.length);
|
|
3845
|
+
for (let i = 0; i < x.length; i++) {
|
|
3846
|
+
writeExecutionDescriptor(bc, x[i]);
|
|
3847
|
+
}
|
|
3848
|
+
}
|
|
3849
|
+
export function readExecutionListResponse(bc) {
|
|
3850
|
+
return {
|
|
3851
|
+
executions: read48(bc),
|
|
3852
|
+
};
|
|
3853
|
+
}
|
|
3854
|
+
export function writeExecutionListResponse(bc, x) {
|
|
3855
|
+
write48(bc, x.executions);
|
|
3856
|
+
}
|
|
3857
|
+
export function readExecutionDeletedResponse(bc) {
|
|
3858
|
+
return {
|
|
3859
|
+
executionId: bare.readString(bc),
|
|
3860
|
+
};
|
|
3861
|
+
}
|
|
3862
|
+
export function writeExecutionDeletedResponse(bc, x) {
|
|
3863
|
+
bare.writeString(bc, x.executionId);
|
|
3864
|
+
}
|
|
3865
|
+
export function readExecutionIoResponse(bc) {
|
|
3866
|
+
return {
|
|
3867
|
+
executionId: bare.readString(bc),
|
|
3868
|
+
acceptedBytes: read21(bc),
|
|
3869
|
+
};
|
|
3870
|
+
}
|
|
3871
|
+
export function writeExecutionIoResponse(bc, x) {
|
|
3872
|
+
bare.writeString(bc, x.executionId);
|
|
3873
|
+
write21(bc, x.acceptedBytes);
|
|
3874
|
+
}
|
|
3875
|
+
export function readExecutionOutputEvent(bc) {
|
|
3876
|
+
return {
|
|
3877
|
+
executionId: bare.readString(bc),
|
|
3878
|
+
generation: bare.readU64(bc),
|
|
3879
|
+
processId: read0(bc),
|
|
3880
|
+
sequence: bare.readU64(bc),
|
|
3881
|
+
channel: readExecutionStreamChannel(bc),
|
|
3882
|
+
chunk: bare.readData(bc),
|
|
3883
|
+
timestampMs: bare.readU64(bc),
|
|
3884
|
+
};
|
|
3885
|
+
}
|
|
3886
|
+
export function writeExecutionOutputEvent(bc, x) {
|
|
3887
|
+
bare.writeString(bc, x.executionId);
|
|
3888
|
+
bare.writeU64(bc, x.generation);
|
|
3889
|
+
write0(bc, x.processId);
|
|
3890
|
+
bare.writeU64(bc, x.sequence);
|
|
3891
|
+
writeExecutionStreamChannel(bc, x.channel);
|
|
3892
|
+
bare.writeData(bc, x.chunk);
|
|
3893
|
+
bare.writeU64(bc, x.timestampMs);
|
|
3894
|
+
}
|
|
3895
|
+
function read49(bc) {
|
|
3896
|
+
const len = bare.readUintSafe(bc);
|
|
3897
|
+
if (len === 0) {
|
|
3898
|
+
return [];
|
|
3899
|
+
}
|
|
3900
|
+
const result = [readExecutionOutputEvent(bc)];
|
|
3901
|
+
for (let i = 1; i < len; i++) {
|
|
3902
|
+
result[i] = readExecutionOutputEvent(bc);
|
|
3903
|
+
}
|
|
3904
|
+
return result;
|
|
3905
|
+
}
|
|
3906
|
+
function write49(bc, x) {
|
|
3907
|
+
bare.writeUintSafe(bc, x.length);
|
|
3908
|
+
for (let i = 0; i < x.length; i++) {
|
|
3909
|
+
writeExecutionOutputEvent(bc, x[i]);
|
|
3910
|
+
}
|
|
3911
|
+
}
|
|
3912
|
+
export function readExecutionOutputPageResponse(bc) {
|
|
3913
|
+
return {
|
|
3914
|
+
executionId: bare.readString(bc),
|
|
3915
|
+
generation: bare.readU64(bc),
|
|
3916
|
+
events: read49(bc),
|
|
3917
|
+
nextCursor: bare.readString(bc),
|
|
3918
|
+
hasMore: bare.readBool(bc),
|
|
3919
|
+
truncated: bare.readBool(bc),
|
|
3920
|
+
};
|
|
3921
|
+
}
|
|
3922
|
+
export function writeExecutionOutputPageResponse(bc, x) {
|
|
3923
|
+
bare.writeString(bc, x.executionId);
|
|
3924
|
+
bare.writeU64(bc, x.generation);
|
|
3925
|
+
write49(bc, x.events);
|
|
3926
|
+
bare.writeString(bc, x.nextCursor);
|
|
3927
|
+
bare.writeBool(bc, x.hasMore);
|
|
3928
|
+
bare.writeBool(bc, x.truncated);
|
|
3929
|
+
}
|
|
2608
3930
|
export function readResponsePayload(bc) {
|
|
2609
3931
|
const offset = bc.offset;
|
|
2610
3932
|
const tag = bare.readU8(bc);
|
|
@@ -2679,6 +4001,26 @@ export function readResponsePayload(bc) {
|
|
|
2679
4001
|
return { tag: "PackageLinkedResponse", val: readPackageLinkedResponse(bc) };
|
|
2680
4002
|
case 34:
|
|
2681
4003
|
return { tag: "ProvidedCommandsResponse", val: readProvidedCommandsResponse(bc) };
|
|
4004
|
+
case 35:
|
|
4005
|
+
return { tag: "ListMountsResponse", val: readListMountsResponse(bc) };
|
|
4006
|
+
case 36:
|
|
4007
|
+
return { tag: "ExecutionAcceptedResponse", val: readExecutionAcceptedResponse(bc) };
|
|
4008
|
+
case 37:
|
|
4009
|
+
return { tag: "ExecutionCompletedResponse", val: readExecutionCompletedResponse(bc) };
|
|
4010
|
+
case 38:
|
|
4011
|
+
return { tag: "ExecutionEvaluationResponse", val: readExecutionEvaluationResponse(bc) };
|
|
4012
|
+
case 39:
|
|
4013
|
+
return { tag: "TypeScriptCheckResponse", val: readTypeScriptCheckResponse(bc) };
|
|
4014
|
+
case 40:
|
|
4015
|
+
return { tag: "ExecutionDescriptorResponse", val: readExecutionDescriptorResponse(bc) };
|
|
4016
|
+
case 41:
|
|
4017
|
+
return { tag: "ExecutionListResponse", val: readExecutionListResponse(bc) };
|
|
4018
|
+
case 42:
|
|
4019
|
+
return { tag: "ExecutionDeletedResponse", val: readExecutionDeletedResponse(bc) };
|
|
4020
|
+
case 43:
|
|
4021
|
+
return { tag: "ExecutionIoResponse", val: readExecutionIoResponse(bc) };
|
|
4022
|
+
case 44:
|
|
4023
|
+
return { tag: "ExecutionOutputPageResponse", val: readExecutionOutputPageResponse(bc) };
|
|
2682
4024
|
default: {
|
|
2683
4025
|
bc.offset = offset;
|
|
2684
4026
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -2862,6 +4204,56 @@ export function writeResponsePayload(bc, x) {
|
|
|
2862
4204
|
writeProvidedCommandsResponse(bc, x.val);
|
|
2863
4205
|
break;
|
|
2864
4206
|
}
|
|
4207
|
+
case "ListMountsResponse": {
|
|
4208
|
+
bare.writeU8(bc, 35);
|
|
4209
|
+
writeListMountsResponse(bc, x.val);
|
|
4210
|
+
break;
|
|
4211
|
+
}
|
|
4212
|
+
case "ExecutionAcceptedResponse": {
|
|
4213
|
+
bare.writeU8(bc, 36);
|
|
4214
|
+
writeExecutionAcceptedResponse(bc, x.val);
|
|
4215
|
+
break;
|
|
4216
|
+
}
|
|
4217
|
+
case "ExecutionCompletedResponse": {
|
|
4218
|
+
bare.writeU8(bc, 37);
|
|
4219
|
+
writeExecutionCompletedResponse(bc, x.val);
|
|
4220
|
+
break;
|
|
4221
|
+
}
|
|
4222
|
+
case "ExecutionEvaluationResponse": {
|
|
4223
|
+
bare.writeU8(bc, 38);
|
|
4224
|
+
writeExecutionEvaluationResponse(bc, x.val);
|
|
4225
|
+
break;
|
|
4226
|
+
}
|
|
4227
|
+
case "TypeScriptCheckResponse": {
|
|
4228
|
+
bare.writeU8(bc, 39);
|
|
4229
|
+
writeTypeScriptCheckResponse(bc, x.val);
|
|
4230
|
+
break;
|
|
4231
|
+
}
|
|
4232
|
+
case "ExecutionDescriptorResponse": {
|
|
4233
|
+
bare.writeU8(bc, 40);
|
|
4234
|
+
writeExecutionDescriptorResponse(bc, x.val);
|
|
4235
|
+
break;
|
|
4236
|
+
}
|
|
4237
|
+
case "ExecutionListResponse": {
|
|
4238
|
+
bare.writeU8(bc, 41);
|
|
4239
|
+
writeExecutionListResponse(bc, x.val);
|
|
4240
|
+
break;
|
|
4241
|
+
}
|
|
4242
|
+
case "ExecutionDeletedResponse": {
|
|
4243
|
+
bare.writeU8(bc, 42);
|
|
4244
|
+
writeExecutionDeletedResponse(bc, x.val);
|
|
4245
|
+
break;
|
|
4246
|
+
}
|
|
4247
|
+
case "ExecutionIoResponse": {
|
|
4248
|
+
bare.writeU8(bc, 43);
|
|
4249
|
+
writeExecutionIoResponse(bc, x.val);
|
|
4250
|
+
break;
|
|
4251
|
+
}
|
|
4252
|
+
case "ExecutionOutputPageResponse": {
|
|
4253
|
+
bare.writeU8(bc, 44);
|
|
4254
|
+
writeExecutionOutputPageResponse(bc, x.val);
|
|
4255
|
+
break;
|
|
4256
|
+
}
|
|
2865
4257
|
}
|
|
2866
4258
|
}
|
|
2867
4259
|
export function readResponseFrame(bc) {
|
|
@@ -2991,6 +4383,22 @@ export function writeProcessExitedEvent(bc, x) {
|
|
|
2991
4383
|
bare.writeString(bc, x.processId);
|
|
2992
4384
|
bare.writeI32(bc, x.exitCode);
|
|
2993
4385
|
}
|
|
4386
|
+
export function readExecutionCompletedEvent(bc) {
|
|
4387
|
+
return {
|
|
4388
|
+
executionId: bare.readString(bc),
|
|
4389
|
+
generation: bare.readU64(bc),
|
|
4390
|
+
outcome: readExecutionOutcome(bc),
|
|
4391
|
+
exitCode: read38(bc),
|
|
4392
|
+
error: read46(bc),
|
|
4393
|
+
};
|
|
4394
|
+
}
|
|
4395
|
+
export function writeExecutionCompletedEvent(bc, x) {
|
|
4396
|
+
bare.writeString(bc, x.executionId);
|
|
4397
|
+
bare.writeU64(bc, x.generation);
|
|
4398
|
+
writeExecutionOutcome(bc, x.outcome);
|
|
4399
|
+
write38(bc, x.exitCode);
|
|
4400
|
+
write46(bc, x.error);
|
|
4401
|
+
}
|
|
2994
4402
|
export function readStructuredEvent(bc) {
|
|
2995
4403
|
return {
|
|
2996
4404
|
name: bare.readString(bc),
|
|
@@ -3015,6 +4423,10 @@ export function readEventPayload(bc) {
|
|
|
3015
4423
|
return { tag: "StructuredEvent", val: readStructuredEvent(bc) };
|
|
3016
4424
|
case 4:
|
|
3017
4425
|
return { tag: "ExtEnvelope", val: readExtEnvelope(bc) };
|
|
4426
|
+
case 5:
|
|
4427
|
+
return { tag: "ExecutionOutputEvent", val: readExecutionOutputEvent(bc) };
|
|
4428
|
+
case 6:
|
|
4429
|
+
return { tag: "ExecutionCompletedEvent", val: readExecutionCompletedEvent(bc) };
|
|
3018
4430
|
default: {
|
|
3019
4431
|
bc.offset = offset;
|
|
3020
4432
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -3048,6 +4460,16 @@ export function writeEventPayload(bc, x) {
|
|
|
3048
4460
|
writeExtEnvelope(bc, x.val);
|
|
3049
4461
|
break;
|
|
3050
4462
|
}
|
|
4463
|
+
case "ExecutionOutputEvent": {
|
|
4464
|
+
bare.writeU8(bc, 5);
|
|
4465
|
+
writeExecutionOutputEvent(bc, x.val);
|
|
4466
|
+
break;
|
|
4467
|
+
}
|
|
4468
|
+
case "ExecutionCompletedEvent": {
|
|
4469
|
+
bare.writeU8(bc, 6);
|
|
4470
|
+
writeExecutionCompletedEvent(bc, x.val);
|
|
4471
|
+
break;
|
|
4472
|
+
}
|
|
3051
4473
|
}
|
|
3052
4474
|
}
|
|
3053
4475
|
export function readEventFrame(bc) {
|
|
@@ -3139,37 +4561,28 @@ export function writeSidecarRequestFrame(bc, x) {
|
|
|
3139
4561
|
writeOwnershipScope(bc, x.ownership);
|
|
3140
4562
|
writeSidecarRequestPayload(bc, x.payload);
|
|
3141
4563
|
}
|
|
3142
|
-
function read36(bc) {
|
|
3143
|
-
return bare.readBool(bc) ? readJsonUtf8(bc) : null;
|
|
3144
|
-
}
|
|
3145
|
-
function write36(bc, x) {
|
|
3146
|
-
bare.writeBool(bc, x != null);
|
|
3147
|
-
if (x != null) {
|
|
3148
|
-
writeJsonUtf8(bc, x);
|
|
3149
|
-
}
|
|
3150
|
-
}
|
|
3151
4564
|
export function readHostCallbackResultResponse(bc) {
|
|
3152
4565
|
return {
|
|
3153
4566
|
invocationId: bare.readString(bc),
|
|
3154
|
-
result:
|
|
4567
|
+
result: read33(bc),
|
|
3155
4568
|
error: read0(bc),
|
|
3156
4569
|
};
|
|
3157
4570
|
}
|
|
3158
4571
|
export function writeHostCallbackResultResponse(bc, x) {
|
|
3159
4572
|
bare.writeString(bc, x.invocationId);
|
|
3160
|
-
|
|
4573
|
+
write33(bc, x.result);
|
|
3161
4574
|
write0(bc, x.error);
|
|
3162
4575
|
}
|
|
3163
4576
|
export function readJsBridgeResultResponse(bc) {
|
|
3164
4577
|
return {
|
|
3165
4578
|
callId: bare.readString(bc),
|
|
3166
|
-
result:
|
|
4579
|
+
result: read33(bc),
|
|
3167
4580
|
error: read0(bc),
|
|
3168
4581
|
};
|
|
3169
4582
|
}
|
|
3170
4583
|
export function writeJsBridgeResultResponse(bc, x) {
|
|
3171
4584
|
bare.writeString(bc, x.callId);
|
|
3172
|
-
|
|
4585
|
+
write33(bc, x.result);
|
|
3173
4586
|
write0(bc, x.error);
|
|
3174
4587
|
}
|
|
3175
4588
|
export function readSidecarResponsePayload(bc) {
|
|
@@ -3221,6 +4634,45 @@ export function writeSidecarResponseFrame(bc, x) {
|
|
|
3221
4634
|
writeOwnershipScope(bc, x.ownership);
|
|
3222
4635
|
writeSidecarResponsePayload(bc, x.payload);
|
|
3223
4636
|
}
|
|
4637
|
+
export function readShutdownControl(bc) {
|
|
4638
|
+
return {
|
|
4639
|
+
reason: bare.readString(bc),
|
|
4640
|
+
};
|
|
4641
|
+
}
|
|
4642
|
+
export function writeShutdownControl(bc, x) {
|
|
4643
|
+
bare.writeString(bc, x.reason);
|
|
4644
|
+
}
|
|
4645
|
+
export function readControlPayload(bc) {
|
|
4646
|
+
const offset = bc.offset;
|
|
4647
|
+
const tag = bare.readU8(bc);
|
|
4648
|
+
switch (tag) {
|
|
4649
|
+
case 0:
|
|
4650
|
+
return { tag: "ShutdownControl", val: readShutdownControl(bc) };
|
|
4651
|
+
default: {
|
|
4652
|
+
bc.offset = offset;
|
|
4653
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
4654
|
+
}
|
|
4655
|
+
}
|
|
4656
|
+
}
|
|
4657
|
+
export function writeControlPayload(bc, x) {
|
|
4658
|
+
switch (x.tag) {
|
|
4659
|
+
case "ShutdownControl": {
|
|
4660
|
+
bare.writeU8(bc, 0);
|
|
4661
|
+
writeShutdownControl(bc, x.val);
|
|
4662
|
+
break;
|
|
4663
|
+
}
|
|
4664
|
+
}
|
|
4665
|
+
}
|
|
4666
|
+
export function readControlFrame(bc) {
|
|
4667
|
+
return {
|
|
4668
|
+
schema: readProtocolSchema(bc),
|
|
4669
|
+
payload: readControlPayload(bc),
|
|
4670
|
+
};
|
|
4671
|
+
}
|
|
4672
|
+
export function writeControlFrame(bc, x) {
|
|
4673
|
+
writeProtocolSchema(bc, x.schema);
|
|
4674
|
+
writeControlPayload(bc, x.payload);
|
|
4675
|
+
}
|
|
3224
4676
|
export function readProtocolFrame(bc) {
|
|
3225
4677
|
const offset = bc.offset;
|
|
3226
4678
|
const tag = bare.readU8(bc);
|
|
@@ -3235,6 +4687,8 @@ export function readProtocolFrame(bc) {
|
|
|
3235
4687
|
return { tag: "SidecarRequestFrame", val: readSidecarRequestFrame(bc) };
|
|
3236
4688
|
case 4:
|
|
3237
4689
|
return { tag: "SidecarResponseFrame", val: readSidecarResponseFrame(bc) };
|
|
4690
|
+
case 5:
|
|
4691
|
+
return { tag: "ControlFrame", val: readControlFrame(bc) };
|
|
3238
4692
|
default: {
|
|
3239
4693
|
bc.offset = offset;
|
|
3240
4694
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -3268,6 +4722,11 @@ export function writeProtocolFrame(bc, x) {
|
|
|
3268
4722
|
writeSidecarResponseFrame(bc, x.val);
|
|
3269
4723
|
break;
|
|
3270
4724
|
}
|
|
4725
|
+
case "ControlFrame": {
|
|
4726
|
+
bare.writeU8(bc, 5);
|
|
4727
|
+
writeControlFrame(bc, x.val);
|
|
4728
|
+
break;
|
|
4729
|
+
}
|
|
3271
4730
|
}
|
|
3272
4731
|
}
|
|
3273
4732
|
export function encodeProtocolFrame(x, config) {
|