@ai-ecoverse/slicc-kernel 1.180.0 → 1.182.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -6
- package/dist/driver-worker.js +15 -1
- package/dist/driver-worker.js.map +2 -2
- package/dist/index.js +26 -1
- package/dist/index.js.map +3 -3
- package/dist/kernel-worker.js +373 -96
- package/dist/kernel-worker.js.map +3 -3
- package/dist/node-driver-worker.js +15 -1
- package/dist/node-driver-worker.js.map +2 -2
- package/dist/node-process-worker.cjs +1 -1
- package/dist/node-process-worker.js +1 -1
- package/dist/node.js +389 -95
- package/dist/node.js.map +3 -3
- package/dist/process-worker.js +1 -1
- package/dist/types/cdp/types.d.ts +2 -0
- package/dist/types/client/attach.d.ts +12 -0
- package/dist/types/client/protocol.d.ts +9 -0
- package/dist/types/index.d.ts +5 -3
- package/dist/types/kernel/children.d.ts +2 -1
- package/dist/types/kernel/socket.d.ts +2 -0
- package/dist/types/launcher.d.ts +22 -0
- package/dist/types/node.d.ts +5 -3
- package/dist/types/serve.d.ts +11 -1
- package/dist/types/sudo.d.ts +15 -1
- package/package.json +2 -2
|
@@ -827,7 +827,7 @@ async function loopbackFetch(dial, input, options) {
|
|
|
827
827
|
}
|
|
828
828
|
|
|
829
829
|
// src/client/protocol.ts
|
|
830
|
-
var PROTOCOL = [1,
|
|
830
|
+
var PROTOCOL = [1, 17];
|
|
831
831
|
function locksOf(scope = globalThis) {
|
|
832
832
|
const locks = scope.navigator?.locks;
|
|
833
833
|
return typeof locks?.request === "function" ? locks : void 0;
|
|
@@ -1133,6 +1133,19 @@ async function spawnOn(channel, argv, opts) {
|
|
|
1133
1133
|
signal: async (name = "SIGTERM") => void await channel.call({ op: "kill", pid: -pgid, signal: name })
|
|
1134
1134
|
};
|
|
1135
1135
|
}
|
|
1136
|
+
async function sudoRunOn(channel, replay, { stdout, stderr, tag }) {
|
|
1137
|
+
await since(channel, 16, "sudoRun", async () => {
|
|
1138
|
+
});
|
|
1139
|
+
const started = Promise.withResolvers();
|
|
1140
|
+
let endedBy;
|
|
1141
|
+
const { done } = channel.request(
|
|
1142
|
+
{ op: "sudo-run", replay, options: { stdout, stderr, tag } },
|
|
1143
|
+
{ started: started.resolve, ended: (signal) => endedBy = signal }
|
|
1144
|
+
);
|
|
1145
|
+
done.catch(started.reject);
|
|
1146
|
+
const pid = await started.promise;
|
|
1147
|
+
return { pid, pgid: pid, ended: endedOf(done, () => endedBy) };
|
|
1148
|
+
}
|
|
1136
1149
|
function endedOf(done, signal) {
|
|
1137
1150
|
return quiet(
|
|
1138
1151
|
done.then((status) => {
|
|
@@ -1334,6 +1347,7 @@ async function attachKernel(port, options = {}) {
|
|
|
1334
1347
|
return () => channel.traitsListeners.delete(listener);
|
|
1335
1348
|
},
|
|
1336
1349
|
trace: (tag, onEvents, options2 = {}) => traceOn(channel, tag, onEvents, options2),
|
|
1350
|
+
sudoRun: (replay, options2 = {}) => sudoRunOn(channel, replay, options2),
|
|
1337
1351
|
async close(o = {}) {
|
|
1338
1352
|
if (channel.failure) return;
|
|
1339
1353
|
await channel.call({ op: "detach", ...o.kill ? { kill: true } : {} }).catch(() => void 0);
|