@ai-ecoverse/slicc-kernel 1.196.51 → 1.196.53
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 +3 -1
- package/dist/async-process.js +1 -1
- package/dist/cloudflare-sources.js +1 -1
- package/dist/cloudflare.js +189 -91
- package/dist/cloudflare.js.map +4 -4
- package/dist/kernel-worker.js +181 -83
- package/dist/kernel-worker.js.map +4 -4
- package/dist/node-process-worker.cjs +1 -1
- package/dist/node-process-worker.js +1 -1
- package/dist/node.js +186 -88
- package/dist/node.js.map +4 -4
- package/dist/process-worker.js +1 -1
- package/dist/types/fs/opfs.d.ts +3 -0
- package/dist/types/sudo-argv.d.ts +2 -0
- package/dist/types/sudo.d.ts +2 -2
- package/dist/types/sudoers.d.ts +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1417,7 +1417,7 @@ With `users: 'enforce'` the kernel checks every file call that reaches it agains
|
|
|
1417
1417
|
```
|
|
1418
1418
|
Defaults env_keep += "GH_TOKEN GITHUB_TOKEN"
|
|
1419
1419
|
```
|
|
1420
|
-
- **Request limits:** `proc-sudo` accepts up to 4096 arguments and 4096 caller environment entries. They share a 1 MiB UTF-8 byte budget: each argument and each `NAME=value` entry costs its encoded length plus one terminating NUL, even for an empty argument. These limits apply before `env_keep` or approval, including entries that would be discarded. A separately supplied `TERM` is also budgeted if it is not already present with the same value. An oversized request fails with `E2BIG`; the kernel does not truncate it.
|
|
1420
|
+
- **Request limits:** `proc-sudo` accepts up to 4096 arguments and 4096 caller environment entries. They share a 1 MiB UTF-8 byte budget: each argument and each `NAME=value` entry costs its encoded length plus one terminating NUL, even for an empty argument. These limits apply before `env_keep` or approval, including entries that would be discarded. A separately supplied `TERM` is also budgeted if it is not already present with the same value. An argument that is not a string or contains a NUL is invalid (`EINVAL`), even if the vector is also too large. Otherwise an oversized request fails with `E2BIG`; the kernel does not truncate it. `sudoRun` validates replay arguments with the same UTF-8 count, including each terminator; a malformed saved request returns `EINVAL`. Timestamp and replay log lines and command-policy denials are capped at 4096 UTF-8 bytes of displayed text. `PWD` is quoted and capped separately at 768 bytes, so it cannot displace `USER`, `TIMESTAMP` or `REPLAY`, or `COMMAND`. A clipped command or diagnostic command name ends in `… [sha256=<hex>]` before any reason text; the digest is SHA-256 of the UTF-8 JSON array of the complete arguments (resolved argv for audit logs, typed argv for caller diagnostics). A shortened metadata field alone has an ellipsis, not a command digest. These limits also apply to changed-command and command-not-found messages. This affects display only: matching, approval, replay and execution use the complete arguments.
|
|
1421
1421
|
- **The line:** `env_keep` takes a double-quoted list of names separated by spaces or tabs, or one name without quotes. `+=` adds to the list, `-=` removes the entries written exactly so, `=` replaces the list and `!env_keep` empties it. `Defaults:<user|%group|ALL>[,…] env_keep …` does the same for those callers, and a line may set several things (`Defaults:cone env_keep += "GH_TOKEN", timestamp_timeout=10`). The order is the one of the [timestamp settings](#sudo-timestamps): the lines for everyone first, then the caller's, each in file order. The list starts empty: sudo's built-in list (`DISPLAY`, `PS1`, `LS_COLORS`, …) and its `env_check` list (`LANG`, `LC_*`, `TZ`, …) aren't there, and `env_check`, `env_delete`, `env_reset`, `secure_path`, the `SETENV:` tag and `sudo -E` or `--preserve-env` aren't supported.
|
|
1422
1422
|
- **What matches:** a name matches the variable of that name. A `*` matches any run of characters, none included, and an entry may have several (`GH_*`, `*_TOKEN`); it is the only wildcard. The matching is sudo's own, which looks for the text after a `*` once, where it first occurs: `*_TOKEN` matches `GH_TOKEN` and not `MY_GH_TOKEN`, so name a prefix (`MY_*`) for such names. An entry with `=` must match the name and the value (`MODE=dry*`). As in sudo, a variable whose value starts with `() ` (an exported bash function) is dropped unless an entry matched its value as well (`BASH_FUNC_x%%=()*`), and `LOGNAME` and `USER` go together: keeping one keeps both original values, even if they differ. If only one is present, its value fills the missing name, as in sudoers’ `rebuild_env`.
|
|
1423
1423
|
- **What a kept variable replaces:** the value the kernel would have set, so keeping `HOME` or `SHELL` gives the command the caller's, with what that means for a program that reads its configuration from there, as sudoers(5) warns. `PATH` stays the fixed one (sudo's `secure_path`), `TERM` keeps its own check (sudo's `env_check`), and `PWD` and the four `SUDO_*` variables are always the kernel's.
|
|
@@ -1725,6 +1725,8 @@ OPFS stores names, bytes, sizes and modification times, nothing else. Everything
|
|
|
1725
1725
|
|
|
1726
1726
|
OPFS stays authoritative: an entry is consulted only for a path that exists in OPFS (symlinks only for paths that don't), so files written straight to OPFS, for example by the BIOS installer or a page, get the defaults: directories `0755`, files `0644`, and files under `node_modules/*/bin/` `0755`. A file deleted through the OPFS API disappears at once; its leftover entry is ignored and removed when the next kernel starts. Changes go to OPFS first and then to the sidecar, so a crash in between at worst loses the metadata of that one change. Each change is a read-modify-write inside one IndexedDB transaction, so two kernels (two tabs) on the same origin don't lose each other's updates.
|
|
1727
1727
|
|
|
1728
|
+
**Recovering an interrupted older copy rename:** An older intent may identify its source by pathname even though the physical directory was created at a previously vacated name. For a direct rename, reconciliation can finish the copy when the source directory still exists and the destination has neither a physical entry nor any sidecar metadata. It copies from the old directory before committing its inode and cleanup manifest. It does not merge into an existing directory, overwrite a replacement file, or revive a destination with a vacated marker. An ambiguous partial destination stays untouched; its contents are not proof of ownership.
|
|
1729
|
+
|
|
1728
1730
|
**Stamping files written to OPFS:** `import { writeMetadata } from '@ai-ecoverse/slicc-kernel/meta'` and `await writeMetadata(root, [{ path, mode?, uid?, gid? }], { metadata?, indexedDB? })` is the supported way for an embedder to give files it wrote straight to OPFS a mode and an owner, also while no kernel runs (an installer before the first boot). `root` is the directory handle that becomes `/`, each `path` is absolute (`EINVAL` otherwise) and must exist there (`ENOENT` otherwise), `mode` is the permission bits (`0` to `0o7777`), and `uid` and `gid` come together or not at all (`EINVAL` otherwise). Entries for the same path (after normalization) are merged in order, a later field winning. All entries are written in one IndexedDB transaction, to the database a kernel on that root reads (`metadata`, default `slicc-kernel`), keeping what else a record holds and setting its change time (`ctime`) to now, and a running kernel on the same origin drops what it cached of them. The record format is the kernel's own and changes with it, so use this rather than writing the database. The kernel gives its layout paths (see [Permissions](#permissions)) an owner and mode only when they have no owner yet, so a path stamped here with `uid` and `gid` keeps them.
|
|
1729
1731
|
|
|
1730
1732
|
**Telling running kernels about files written to OPFS:** a writer outside the kernel (an installer worker, a service worker, the page) that changes files on a root a kernel may be running on calls `import { postFsNotice } from '@ai-ecoverse/slicc-kernel/meta'` and `postFsNotice({ paths?, trees? }, { metadata? })` **after** each write has committed: after `close()` of its writable, `removeEntry` or `move()` has resolved. `paths` are absolute paths written, created or removed. List a created or removed name's parent directory too, so listings refresh. `trees` are absolute directories whose whole subtree changed, for a recursive replace or a sweep. The notice goes on the BroadcastChannel `slicc-kernel-dirs:<metadata>` (default `slicc-kernel-dirs:slicc-kernel`), the one kernels on that root already use between themselves, as `{ paths, trees }`. One notice per batch of writes is enough, if it's posted after the last of them. A kernel that receives it drops its cached lookups, handles and misses for those paths (for a tree, everything under it), tells its open files to reread, and publishes the paths to its programs' caches. If one of them is at or under a command root (`/node_modules`, `PNPM_HOME`, a `commands.append` root) or names a `node_modules` directory, the kernel also reads its command catalog (the packages' `package.json` files) again before its next exec, so a running shell's next command sees a command a manifest added or changed ([#1703](https://github.com/ai-ecoverse/slicc-kernel/issues/1703)). A tree marks every path changed for them, so a running program's next look at any path goes to the kernel. **The residual window:** a reader can still see the old state between the write's commit and the notice's delivery (a message, usually well under a millisecond, but not bounded). A writer that runs while no kernel is up needs no notice: a kernel's caches start empty when it boots. A notice for a path that exists as a regular file, listed in `paths` (a `trees` entry refreshes caches but stamps no times, since a tree can hold thousands of files), also gives it a new modification time, before running programs are told of the change: the notice's arrival, with the change time along, unless its modification time is already later (an explicit future one is kept, with its change time), as a write does on Linux, recorded once per burst of notices for the same file ([#1275](https://github.com/ai-ecoverse/slicc-kernel/issues/1275)). That matters because Chrome can keep a file's OPFS `lastModified` across an append through `createWritable({ keepExistingData: true })`, and the kernel reports `lastModified` for files it didn't write, so `-nt` and make wouldn't see the change. A notice without a real change still moves the time, so a make may rebuild once. An outside write that posts no notice keeps OPFS's time. Notices between kernels (the array form they post for their own writes) don't stamp: those kernels record their times themselves. That's part of the channel's contract: kernels post their own change notices on the dirs channel as a plain array of paths, and only the `{ paths, trees }` object form that `postFsNotice` sends counts as an outside writer's. A kernel must keep posting arrays there, which `fs-notice-page.test.mjs`'s peer row checks. **Without a notice** a kernel that is alone on its root keeps what it cached: a running program's stats of a path stay as they were for as long as the program runs, and the kernel's own directory handles for up to a second. So a writer that doesn't post notices must not change files a running kernel uses ([#1156](https://github.com/ai-ecoverse/slicc-kernel/issues/1156)).
|
package/dist/async-process.js
CHANGED
|
@@ -1601,7 +1601,7 @@ var EMSCRIPTEN_FIXED_DIRS = [
|
|
|
1601
1601
|
var EARLY_WHOLE_FILE = 64 * 1024;
|
|
1602
1602
|
|
|
1603
1603
|
// src/version.ts
|
|
1604
|
-
var KERNEL_VERSION = true ? "1.196.
|
|
1604
|
+
var KERNEL_VERSION = true ? "1.196.53" : "0.0.0-dev";
|
|
1605
1605
|
var OS_RELEASE = "6.0.0-slicc";
|
|
1606
1606
|
function procVersion() {
|
|
1607
1607
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|