@ai-ecoverse/slicc-kernel 1.188.0 → 1.188.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/README.md +1 -6
- package/dist/async-process.js +1 -1
- package/dist/cloudflare-sources.js +1 -1
- package/dist/cloudflare.js +35 -34
- package/dist/cloudflare.js.map +4 -4
- package/dist/kernel-worker.js +1 -1
- package/dist/node-process-worker.cjs +1 -1
- package/dist/node-process-worker.js +1 -1
- package/dist/node.js +1 -1
- package/dist/process-worker.js +1 -1
- package/dist/types/cloudflare/clock-skew.d.ts +1 -0
- package/package.json +1 -1
package/dist/cloudflare.js
CHANGED
|
@@ -4818,7 +4818,7 @@ function satisfies(version, range2) {
|
|
|
4818
4818
|
}
|
|
4819
4819
|
|
|
4820
4820
|
// src/version.ts
|
|
4821
|
-
var KERNEL_VERSION = true ? "1.188.
|
|
4821
|
+
var KERNEL_VERSION = true ? "1.188.1" : "0.0.0-dev";
|
|
4822
4822
|
var OS_RELEASE = "6.0.0-slicc";
|
|
4823
4823
|
function procVersion() {
|
|
4824
4824
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
@@ -19103,15 +19103,15 @@ function repeating(first, every, fire) {
|
|
|
19103
19103
|
let next3 = performance.now() + first;
|
|
19104
19104
|
let cancel = () => {
|
|
19105
19105
|
};
|
|
19106
|
-
const
|
|
19106
|
+
const tick2 = () => {
|
|
19107
19107
|
fire();
|
|
19108
19108
|
if (every <= 0) return;
|
|
19109
19109
|
next3 += every;
|
|
19110
19110
|
const now = performance.now();
|
|
19111
19111
|
if (next3 <= now) next3 += (Math.floor((now - next3) / every) + 1) * every;
|
|
19112
|
-
cancel = timerAt(next3,
|
|
19112
|
+
cancel = timerAt(next3, tick2);
|
|
19113
19113
|
};
|
|
19114
|
-
cancel = timerAt(next3,
|
|
19114
|
+
cancel = timerAt(next3, tick2);
|
|
19115
19115
|
return () => cancel();
|
|
19116
19116
|
}
|
|
19117
19117
|
|
|
@@ -38873,6 +38873,36 @@ function serveClient(port, host) {
|
|
|
38873
38873
|
return { detach, closed: ended.promise };
|
|
38874
38874
|
}
|
|
38875
38875
|
|
|
38876
|
+
// src/cloudflare/clock-skew.ts
|
|
38877
|
+
var ASYNC_SYSCALL2 = "async-syscall";
|
|
38878
|
+
function later(req, lag) {
|
|
38879
|
+
if (typeof req.timeoutMs === "number" && req.timeoutMs > 0) {
|
|
38880
|
+
return { ...req, timeoutMs: req.timeoutMs + lag };
|
|
38881
|
+
}
|
|
38882
|
+
if (req.op === "proc-alarm" && typeof req.ms === "number") {
|
|
38883
|
+
const first = typeof req.firstMs === "number" ? req.firstMs : req.ms;
|
|
38884
|
+
return first > 0 ? { ...req, firstMs: first + lag } : req;
|
|
38885
|
+
}
|
|
38886
|
+
return req;
|
|
38887
|
+
}
|
|
38888
|
+
function tick() {
|
|
38889
|
+
return new Promise((resolve2) => setTimeout(resolve2, 0));
|
|
38890
|
+
}
|
|
38891
|
+
function behindProcess(message3, sent, now = Date.now()) {
|
|
38892
|
+
const call = unthreaded(message3);
|
|
38893
|
+
if (call?.type !== ASYNC_SYSCALL2 || !call.req || typeof call.req !== "object") return message3;
|
|
38894
|
+
if (typeof sent !== "number" || !(sent > now)) return message3;
|
|
38895
|
+
const req = later(call.req, sent - now);
|
|
38896
|
+
return req === call.req ? message3 : rethreaded(message3, { ...call, req });
|
|
38897
|
+
}
|
|
38898
|
+
function timed2(message3) {
|
|
38899
|
+
const call = unthreaded(message3);
|
|
38900
|
+
if (call?.type !== ASYNC_SYSCALL2 || !call.req) return false;
|
|
38901
|
+
const { req } = call;
|
|
38902
|
+
if (typeof req.timeoutMs === "number") return req.timeoutMs > 0;
|
|
38903
|
+
return req.op === "proc-alarm" && typeof req.ms === "number" && req.ms > 0;
|
|
38904
|
+
}
|
|
38905
|
+
|
|
38876
38906
|
// src/cloudflare/images.ts
|
|
38877
38907
|
var hex4 = (buffer) => Array.from(new Uint8Array(buffer), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
38878
38908
|
async function digest(data) {
|
|
@@ -39354,35 +39384,6 @@ var ForkTokens = class {
|
|
|
39354
39384
|
|
|
39355
39385
|
// src/cloudflare/kernel-end.ts
|
|
39356
39386
|
import { RpcTarget } from "cloudflare:workers";
|
|
39357
|
-
|
|
39358
|
-
// src/cloudflare/clock-skew.ts
|
|
39359
|
-
var ASYNC_SYSCALL2 = "async-syscall";
|
|
39360
|
-
function later(req, lag) {
|
|
39361
|
-
if (typeof req.timeoutMs === "number" && req.timeoutMs > 0) {
|
|
39362
|
-
return { ...req, timeoutMs: req.timeoutMs + lag };
|
|
39363
|
-
}
|
|
39364
|
-
if (req.op === "proc-alarm" && typeof req.ms === "number") {
|
|
39365
|
-
const first = typeof req.firstMs === "number" ? req.firstMs : req.ms;
|
|
39366
|
-
return first > 0 ? { ...req, firstMs: first + lag } : req;
|
|
39367
|
-
}
|
|
39368
|
-
return req;
|
|
39369
|
-
}
|
|
39370
|
-
function behindProcess(message3, sent, now = Date.now()) {
|
|
39371
|
-
const call = unthreaded(message3);
|
|
39372
|
-
if (call?.type !== ASYNC_SYSCALL2 || !call.req || typeof call.req !== "object") return message3;
|
|
39373
|
-
if (typeof sent !== "number" || !(sent > now)) return message3;
|
|
39374
|
-
const req = later(call.req, sent - now);
|
|
39375
|
-
return req === call.req ? message3 : rethreaded(message3, { ...call, req });
|
|
39376
|
-
}
|
|
39377
|
-
function timed2(message3) {
|
|
39378
|
-
const call = unthreaded(message3);
|
|
39379
|
-
if (call?.type !== ASYNC_SYSCALL2 || !call.req) return false;
|
|
39380
|
-
const { req } = call;
|
|
39381
|
-
if (typeof req.timeoutMs === "number") return req.timeoutMs > 0;
|
|
39382
|
-
return req.op === "proc-alarm" && typeof req.ms === "number" && req.ms > 0;
|
|
39383
|
-
}
|
|
39384
|
-
|
|
39385
|
-
// src/cloudflare/kernel-end.ts
|
|
39386
39387
|
var WASM_PAGE = 65536;
|
|
39387
39388
|
var CLOSED_BY_KERNEL = "the kernel closed the process";
|
|
39388
39389
|
var KernelState = class {
|
|
@@ -42955,7 +42956,7 @@ function isolateMemory(options) {
|
|
|
42955
42956
|
return {
|
|
42956
42957
|
...memory !== void 0 ? { budget: memory } : {},
|
|
42957
42958
|
...perInstance !== void 0 ? { perInstance } : {},
|
|
42958
|
-
|
|
42959
|
+
clock: options.clock ?? tick
|
|
42959
42960
|
};
|
|
42960
42961
|
}
|
|
42961
42962
|
function trackedWorker(processes2, live2, terminated) {
|