@ai-ecoverse/slicc-bios 2.4.1 → 2.4.2

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.
Files changed (2) hide show
  1. package/README.md +1 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -185,6 +185,7 @@ The kernel runs with users on (slicc-kernel ≥ 1.81.0): files have owners and m
185
185
  - **Approvals panel and Run now** (spectrum ≥ 2.14.1, slicc-kernel ≥ 1.181.0, protocol 1.16; notices need slicc-agent ≥ 7.34.0): bios's ApprovalsPort keeps `history()` (pending and settled records, newest first) and emits `history` when any record changes, so spectrum offers the Approvals panel (`data-surface="approvals"`, right, closed by default). A timed-out sudo stays `unanswered` with `reason: 'timeout'`. **Run now** (`run(id)`) is only for those records: bios calls the kernel's `sudoRun` with the original request so the kernel re-checks policy, command hash and cwd at run time; bios never runs the command itself. `stopRun(id)` signals the run's process group while it is `running`. After a run actually starts, bios sends start and end facts through the owner-device control method `connectAgent().approvalRunNotice(notice)` (feature-detected; older agents log one warning and keep a debug buffer). The agent renders the `sudo-run` lick (`bios:<id>:start` / `:end`); a kernel refusal that runs nothing sends no notice.
186
186
  - **Who records:** ownership follows who held the ask. While the agent is up and `owner.approve` resolves (no `EAGAIN`), the item lives in the agent's approvals (`apr-…`); bios's `history()` has no row and stores no replay. bios records only asks its own dialog answered or that timed out there (agent down, released, restarting, an `EAGAIN` fallback, or no judge). History ids are `bios:<kernel id>`, so they stay disjoint from the agent's `apr-…` when the spectrum adapter merges both ports and routes `run`/`stopRun` by id. The notice `id` is that same `bios:<kernel id>`; the agent appends `:start` / `:end` when it renders the `sudo-run` lick, never using an `apr-…` id for a bios-held run.
187
187
  - **`runnable`:** `true` only for an unanswered (timed-out) agent sudo that has no run yet, on a kernel that supports `sudoRun` (protocol ≥ 1.16), and when the stored replay still has what `sudoRun` needs (`rootOnly`, absolute `path`/`cwd`, no `validate`, stdin not `pipe`/`file`, within the late-run age). Otherwise `{ reason }` (for example "Run it again in the terminal.", "Needs slicc-kernel protocol 1.16 or later.", "Its input is gone, so it must be asked again."). Spectrum trusts `runnable`: the panel enables Run now only for `true`.
188
+ - **Another tab takes over:** the owner's `history` broadcast carries the replay it stored for each record, and every other tab keeps it, dropping a replay whose command, directory, target or user differs from its record's. So when the owner tab closes, a timed-out row stays runnable in the tab that takes over. The kernel runs in the owner tab, so that tab starts a new one. Each record the closed tab had `starting` or `running` is looked up by its `sudo-run:<id>` tag, through a kernel client's `ps()` on that kernel, among the target user's processes, once a second until the process list answers. A run that's found is re-attached: `stopRun` signals its process group, and the row ends (`done`, its exit status unknown) when its leader exits. One that's gone ends at once: `done` with its exit status unknown and an end notice, or `failed` (*The tab that started it closed before it ran.*) if it hadn't started. Until the new kernel's process list answers, `stopRun` refuses with *The kernel's process list isn't available, so it can't be stopped.*
188
189
  - **Sudo timestamps** (slicc-kernel ≥ 1.177.0): as in sudo(8), a person's approval lets the same place run `sudo` again without asking for a few minutes. Seven keeps the kernel's defaults, 5 minutes (`timestamp_timeout`) per terminal (`timestamp_type=tty`), so several `sudo` lines typed in one terminal share the window, and seeds no `Defaults` line; an admin can write one in `/etc/sudoers.d` as root. An agent's bash call has no terminal, so it falls back to `ppid` and each call asks again. Only a person's approval opens the window:
189
190
  - **Through the agent** (slicc-agent ≥ 7.27.0), a person's *Allow once* or *Always allow* answers `{ answer, timestamp: true }` and the judge's approval a plain `once`; bios passes the kernel's request, `timestamp` and `validate` included, and the agent's answer through unchanged.
190
191
  - **In bios's dialog**, which only a person answers, *Allow once* answers `{ answer: 'once', timestamp: true }` when the request carries `timestamp: true`, and plain `once` for a kernel that doesn't; anything else is `deny`. A `sudo -v` reads *start a sudo timestamp for <user> (no command)*, with *Allow once* and *Deny* only.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-bios",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "Slim loader that boots SLICC into OPFS and serves the UI from there",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",