agent-bios 0.9.1 → 0.9.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.
- package/package.json +2 -1
- package/scripts/agent-launch.py +26 -0
- package/scripts/check-parity.sh +25 -0
- package/scripts/install.sh +18 -0
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-bios",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
|
+
"releaseDate": "2026-07-23",
|
|
4
5
|
"description": "A thin, low-level instruction layer for LLM CLI agents: one set of principles and behavior whichever model you run. Deploys into $HOME by copy via an explicit `agent-bios install`.",
|
|
5
6
|
"bin": {
|
|
6
7
|
"agent-bios": "scripts/install.sh"
|
package/scripts/agent-launch.py
CHANGED
|
@@ -609,6 +609,9 @@ def _build_app_class():
|
|
|
609
609
|
def setup_panel(plan):
|
|
610
610
|
panel = Static("\n".join(setup_summary_lines(plan)), id="al-setup")
|
|
611
611
|
panel.border_title = "Current setup"
|
|
612
|
+
release = version_label()
|
|
613
|
+
if release:
|
|
614
|
+
panel.border_subtitle = release
|
|
612
615
|
return panel
|
|
613
616
|
|
|
614
617
|
class MenuScreen(ModalScreen):
|
|
@@ -1460,6 +1463,13 @@ CORPUS_STATUS_PATH = pathlib.Path(
|
|
|
1460
1463
|
)
|
|
1461
1464
|
)
|
|
1462
1465
|
|
|
1466
|
+
VERSION_INFO_PATH = pathlib.Path(
|
|
1467
|
+
os.environ.get(
|
|
1468
|
+
"AGENT_LAUNCH_VERSION_FILE",
|
|
1469
|
+
str(pathlib.Path.home() / ".local/share/agent-bios/version.json"),
|
|
1470
|
+
)
|
|
1471
|
+
)
|
|
1472
|
+
|
|
1463
1473
|
|
|
1464
1474
|
def load_corpus_status() -> dict[str, Any] | None:
|
|
1465
1475
|
try:
|
|
@@ -1468,6 +1478,22 @@ def load_corpus_status() -> dict[str, Any] | None:
|
|
|
1468
1478
|
return None
|
|
1469
1479
|
|
|
1470
1480
|
|
|
1481
|
+
def version_label() -> str | None:
|
|
1482
|
+
"""The deployed agent-bios version + release date for the TUI, or None when
|
|
1483
|
+
the marker is absent (uninstalled / dev checkout). `agent-bios install`
|
|
1484
|
+
writes it from package.json (version + releaseDate). This is the deploy /
|
|
1485
|
+
system version — distinct from the corpus content version in the distill hub."""
|
|
1486
|
+
try:
|
|
1487
|
+
info = json.loads(VERSION_INFO_PATH.read_text())
|
|
1488
|
+
except (OSError, ValueError):
|
|
1489
|
+
return None
|
|
1490
|
+
version = info.get("version") if isinstance(info, dict) else None
|
|
1491
|
+
if not version:
|
|
1492
|
+
return None
|
|
1493
|
+
released = info.get("releaseDate")
|
|
1494
|
+
return f"agent-bios v{version} · {released}" if released else f"agent-bios v{version}"
|
|
1495
|
+
|
|
1496
|
+
|
|
1471
1497
|
def corpus_summary_lines(status: dict[str, Any] | None) -> list[str]:
|
|
1472
1498
|
"""Panel body for the Session Distill area: which corpus content is
|
|
1473
1499
|
live, through which mechanisms, and whether the corpus is rolled back."""
|
package/scripts/check-parity.sh
CHANGED
|
@@ -764,6 +764,26 @@ if launcher.is_file() and launch_profile:
|
|
|
764
764
|
"project an applied setup (customization must not be silently discarded)"
|
|
765
765
|
)
|
|
766
766
|
|
|
767
|
+
# Version line: version_label reads the deployed version marker
|
|
768
|
+
# ($STATE_DIR/version.json) that install writes from package.json. A
|
|
769
|
+
# present marker yields "agent-bios v<version> · <releaseDate>"; an absent
|
|
770
|
+
# one yields None (uninstalled / dev checkout, so the panel shows no line).
|
|
771
|
+
saved_version_path = launcher_module.VERSION_INFO_PATH
|
|
772
|
+
try:
|
|
773
|
+
version_marker = pathlib.Path(tempfile.mkdtemp()) / "version.json"
|
|
774
|
+
version_marker.write_text('{"version": "9.9.9", "releaseDate": "2026-01-02"}')
|
|
775
|
+
launcher_module.VERSION_INFO_PATH = version_marker
|
|
776
|
+
if launcher_module.version_label() != "agent-bios v9.9.9 · 2026-01-02":
|
|
777
|
+
mark_fail(
|
|
778
|
+
"agent-launch version_label wrong with a marker present: "
|
|
779
|
+
f"{launcher_module.version_label()!r}"
|
|
780
|
+
)
|
|
781
|
+
launcher_module.VERSION_INFO_PATH = version_marker.parent / "absent.json"
|
|
782
|
+
if launcher_module.version_label() is not None:
|
|
783
|
+
mark_fail("agent-launch version_label must be None when the marker is absent")
|
|
784
|
+
finally:
|
|
785
|
+
launcher_module.VERSION_INFO_PATH = saved_version_path
|
|
786
|
+
|
|
767
787
|
with tempfile.TemporaryDirectory() as raw_tmp:
|
|
768
788
|
tmp = pathlib.Path(raw_tmp)
|
|
769
789
|
backend = tmp / "backend"
|
|
@@ -806,10 +826,13 @@ if launcher.is_file() and launch_profile:
|
|
|
806
826
|
mark_fail(f"fake launch profile did not replace every backend: {fake_commands!r}")
|
|
807
827
|
fake_profile = pathlib.Path("/nonexistent/unsafe-fixture")
|
|
808
828
|
env = os.environ.copy()
|
|
829
|
+
version_fixture = tmp / "version.json"
|
|
830
|
+
version_fixture.write_text('{"version": "9.9.9", "releaseDate": "2026-01-02"}')
|
|
809
831
|
env.update(
|
|
810
832
|
FAKE_LAUNCH_ARGV=str(argv_log),
|
|
811
833
|
AGENT_LAUNCH_CONFIG=str(fake_profile),
|
|
812
834
|
XDG_CACHE_HOME=str(tmp / "cache"),
|
|
835
|
+
AGENT_LAUNCH_VERSION_FILE=str(version_fixture),
|
|
813
836
|
)
|
|
814
837
|
|
|
815
838
|
pty_env = env.copy()
|
|
@@ -974,6 +997,8 @@ if launcher.is_file() and launch_profile:
|
|
|
974
997
|
< positions[b"Options ("]
|
|
975
998
|
):
|
|
976
999
|
mark_fail("agent-launch layout is not setup then description then options")
|
|
1000
|
+
if b"agent-bios v9.9.9" not in transcript:
|
|
1001
|
+
mark_fail("agent-launch does not show the deployed version line in the setup panel")
|
|
977
1002
|
|
|
978
1003
|
_, picker_status = run_picker_scenario(
|
|
979
1004
|
"root escape cancellation",
|
package/scripts/install.sh
CHANGED
|
@@ -476,6 +476,24 @@ cmd_install() {
|
|
|
476
476
|
else
|
|
477
477
|
log "note: corpus-status projection unavailable (versions.json/ledger missing?)"
|
|
478
478
|
fi
|
|
479
|
+
# Deploy/system version marker for the launcher's TUI version line, read from
|
|
480
|
+
# package.json (version + releaseDate) — distinct from the corpus content
|
|
481
|
+
# version. Best-effort: a failure here never fails the install.
|
|
482
|
+
if [ "$DRY_RUN" != 1 ]; then
|
|
483
|
+
if python3 - "$REPO/package.json" "$STATE_DIR/version.json" <<'PY' 2>/dev/null
|
|
484
|
+
import json, sys
|
|
485
|
+
pkg = json.load(open(sys.argv[1]))
|
|
486
|
+
with open(sys.argv[2], "w") as f:
|
|
487
|
+
json.dump({"version": pkg.get("version"), "releaseDate": pkg.get("releaseDate")}, f)
|
|
488
|
+
f.write("\n")
|
|
489
|
+
PY
|
|
490
|
+
then
|
|
491
|
+
printf '%s\n' "$STATE_DIR/version.json" >> "$MANIFEST"
|
|
492
|
+
info "version marker written ($STATE_DIR/version.json)"
|
|
493
|
+
else
|
|
494
|
+
log "note: version marker not written (package.json unreadable)"
|
|
495
|
+
fi
|
|
496
|
+
fi
|
|
479
497
|
log ""
|
|
480
498
|
log "Verifying deployment..."
|
|
481
499
|
if cmd_verify; then
|