Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<a href="https://github.com/scrimshawlife-ctrl/Hyperlex/actions/workflows/hermes-evals.yml"><img src="https://img.shields.io/github/actions/workflow/status/scrimshawlife-ctrl/Hyperlex/hermes-evals.yml?branch=main&label=skill%20ci&logo=github" alt="Skill CI"></a>
<a href="https://github.com/scrimshawlife-ctrl/Hyperlex/actions/workflows/docs.yml"><img src="https://img.shields.io/github/actions/workflow/status/scrimshawlife-ctrl/Hyperlex/docs.yml?branch=main&label=docs&logo=github" alt="Docs CI"></a>
<a href="https://scrimshawlife-ctrl.github.io/Hyperlex/"><img src="https://img.shields.io/badge/docs-GitHub%20Pages-0d9488?logo=markdown" alt="Docs"></a>
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License: MIT"></a>
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-LicenseRef-Zero-State-Proprietary-1.0-blue.svg" alt="License: LicenseRef-Zero-State-Proprietary-1.0"></a>
<a href="./VERSION"><img src="https://img.shields.io/badge/version-0.4.1-informational" alt="Version 0.4.1"></a>
<img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-3776AB?logo=python&logoColor=white" alt="Python">
<img src="https://img.shields.io/badge/hermes-skill-7c3aed" alt="Hermes skill">
Expand Down Expand Up @@ -121,7 +121,7 @@ Phases **0–4** are production skill surface. **5.0–5.3** adds research simul
| | |
|--|--|
| **Version** | **0.4.1** |
| **Posture** | Hermes skill · Python package (≥3.10) · MIT |
| **Posture** | Hermes skill · Python package (≥3.10) · LicenseRef-Zero-State-Proprietary-1.0 |
| **Primary store** | `~/.hyperlex/` |
| **Public PyPI** | Not planned |
| **Abraxas** | Wire shapes only — Hyperlex never imports Abraxas |
Expand Down Expand Up @@ -367,7 +367,7 @@ bash install.sh --dry-run

## License

MIT — [LICENSE](./LICENSE).
LicenseRef-Zero-State-Proprietary-1.0 — [LICENSE](./LICENSE).

Built for operators who want memetic signal **with a receipt trail**, not a mood board.

Expand All @@ -377,3 +377,5 @@ Built for operators who want memetic signal **with a receipt trail**, not a mood
Copyright © 2026 Zero State LLC. All Rights Reserved. Licensed under the Zero State Proprietary License v1.0. See [`LICENSE`](LICENSE).

Third-party components remain subject to their respective licenses.

Source, profile, and migration rules: `references/source-and-upgrades.md`.
4 changes: 3 additions & 1 deletion SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: hyperlex
description: Catch slang while it is still becoming culture.
version: 0.4.1
author: Daniel Meyer (scrimshawlife-ctrl), Hermes Agent
license: MIT
license: LicenseRef-Zero-State-Proprietary-1.0
platforms: [linux, macos]
metadata:
hermes:
Expand Down Expand Up @@ -155,3 +155,5 @@ Successful packaging:
Design references: `DESIGN.md`, `docs/brier-calibration.md`, `docs/slang-lineages.md`, `docs/phase5.md`, `docs/modules/simulation.md`, `schemas/`, `examples/slang-families/`, `data/backfill/2026/`, `references/hermes-runtime-contract.md`.

Local stdlib-first CLI. Baseline (`mock`) needs no network. Real ingest may call public web APIs. Score log and receipts are local files under `~/.hyperlex/` or skill `out/`.

Source, profile, and migration rules: `references/source-and-upgrades.md`.
2 changes: 1 addition & 1 deletion hyperlex.manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: hermes-openclaw-skill
description: >
Standalone memetic emergence engine for slang detection, hyperstition
tracking, virality analysis, lineage matching, and settled Brier calibration.
license: MIT
license: LicenseRef-Zero-State-Proprietary-1.0
homepage: https://github.com/scrimshawlife-ctrl/Hyperlex
repository: https://github.com/scrimshawlife-ctrl/Hyperlex

Expand Down
40 changes: 23 additions & 17 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,18 @@ while [[ $# -gt 0 ]]; do
done

validate_target() {
python3 - "$TARGET" <<'PY'
import sys
from pathlib import Path
p = Path(sys.argv[1]).expanduser().absolute()
if not sys.argv[1].strip() or any(q.is_symlink() for q in (p, *p.parents)):
raise SystemExit("refusing empty or symlinked target path")
PY

local parent base resolved home_resolved
parent="$(dirname "$TARGET")"
base="$(basename "$TARGET")"
mkdir -p "$parent" 2>/dev/null || true
# Path resolution and dry-run must not create target parents.
resolved="$(resolve_path "$parent")/${base}"
TARGET="$resolved"

Expand Down Expand Up @@ -206,18 +214,13 @@ post_check() {

do_rollback() {
validate_target
local latest
latest="$(ls -1dt "${BACKUP_ROOT}"/*/ 2>/dev/null | head -1 || true)"
[[ -n "$latest" ]] || die "no backups under ${BACKUP_ROOT}"
log "Rolling back from ${latest}"
if [[ $DRY_RUN -eq 1 ]]; then
printf '[dry-run] restore %q → %q\n' "$latest" "$TARGET"
else
rm -rf "$TARGET"
mkdir -p "$(dirname "$TARGET")"
cp -a "$latest" "$TARGET"
log "DRY RUN: would validate and restore a backup bound to ${TARGET}"
return 0
fi
log "Rollback complete"
local check_args=()
[[ $SKIP_SMOKE -eq 1 ]] && check_args+=(--skip-checks)
python3 "${ROOT}/scripts/install_transaction.py" "$ROOT" "$TARGET" hyperlex --rollback "${check_args[@]}"
}

if [[ $ROLLBACK -eq 1 ]]; then
Expand All @@ -235,23 +238,26 @@ if [[ $DRY_RUN -eq 1 ]]; then
exit 0
fi

backup_existing
sync_tree "$TARGET"
post_check "$TARGET" || true
CHECK_ARGS=()
[[ $SKIP_SMOKE -eq 1 ]] && CHECK_ARGS+=(--skip-checks)
python3 "${ROOT}/scripts/install_transaction.py" "$ROOT" "$TARGET" hyperlex "${CHECK_ARGS[@]}"

if [[ $INSTALL_OPENCLAW -eq 1 ]]; then
mkdir -p "$(dirname "$OPENCLAW_TARGET")"
# reuse TARGET temporarily for openclaw path
_saved="$TARGET"
TARGET="$OPENCLAW_TARGET"
validate_target
sync_tree "$TARGET"
post_check "$TARGET" || true
python3 "${ROOT}/scripts/install_transaction.py" "$ROOT" "$TARGET" hyperlex "${CHECK_ARGS[@]}"
TARGET="$_saved"
fi

echo ""
log "Hyperlex v${VERSION} installed"
if [[ $SKIP_SMOKE -eq 1 ]]; then
log "Hyperlex v${VERSION} installed — UNVERIFIED (--skip-smoke)"
else
log "Hyperlex v${VERSION} installed"
fi
echo " Hermes: ${TARGET}"
[[ $INSTALL_OPENCLAW -eq 1 ]] && echo " OpenClaw: ${OPENCLAW_TARGET}"
echo ""
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ authors = [
{name = "Applied Alchemy Labs", email = "scrimshawlife@gmail.com"}
]
readme = "README.md"
license = {text = "MIT"}
license = {file = "LICENSE"}
requires-python = ">=3.10"
keywords = ["memetics", "slang", "hyperstition", "virality", "brier", "hermes", "forecasting"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"License :: Other/Proprietary License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down
58 changes: 58 additions & 0 deletions references/source-and-upgrades.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Source identity and upgrades

This distribution is `Zero-State-LLC/Hyperlex`, version `0.4.1`, based on commit
`5eaae2dee88d80b27415bf362a87924fb9c41c2e` before the local audit-fix commit. Record the actual installed commit
with `git rev-parse HEAD` before installation; do not use a version string alone
as a source identity. Root and hub packaging are distribution surfaces, not a
claim that organizational, personal, or legacy embedded variants are identical.
No personal version is deprecated by this change.

Before switching sources, stop runtime writers, record current source/commit,
review the destination under `${HERMES_HOME:-$HOME/.hermes}`, compare contracts,
and retain a separate backup of outputs, sessions, and local customization.
Do not install two different contracts with the same skill name into one profile.
A successful compatibility check does not grant deployment/publication authority.

The bundled LICENSE controls this distribution. No license grant is changed by
these fixes; earlier grants and third-party notices remain intact.

The installer validates a fresh stage on the target filesystem before replacement,
then reads back the activated contract/version/provenance receipt. Checks use an
isolated temporary home. Legacy `out` contents (including an out symlink) survive.
Backups are unique, keyed by canonical destination under the active Hermes home's
`backups/<skill>/<target-hash>/`; `.install-provenance.json` records source, base
commit, dirty status, version, destination, and skipped checks. Stop writers during
upgrades. Two renames have an absent-target window: this is NOT crash-atomic.
On a reported recovery failure, retain the printed recovery directory and backup;
do not delete it or retry blindly. Inspect the exact target and restore from the
named backup only after validating it. No automatic source migration is implied.

## Interrupted installs and stale locks

SIGKILL or power loss can leave `.<target-name>.install-lock` beside the target.
Locks are never automatically reclaimed: age, an empty directory, or a reused PID
cannot prove that no installer is active. To recover:

1. Stop install launchers and runtime writers. Confirm no installer is active on
this target (including other sessions/hosts sharing the filesystem).
2. Inspect the exact target, sibling `.<skill>-stage-*` recovery directories
(especially `previous` and `failed-package`), and target-keyed backups. Retain
all recovery data until the original installation and outputs are accounted
for. Restore/validate a complete package first if activation was interrupted.
3. Only then set `lock` to the exact path printed in the error and run
`rmdir -- "$lock"`. This removes only an empty lock; never use recursive
deletion or remove a lock whose owner/activity is uncertain. Keep launchers
stopped through inspection and removal to avoid races, then retry installation.

Backup copies are staged in `.backup-incomplete-*` outside the target's selectable
backup directory and published by rename after copying and writing the destination
record. Hard termination can leave these incomplete staging trees; never select
one for rollback. Inspect them manually after quiescing writers. Rollback skips
legacy partial entries without a valid matching destination record.

Git is optional. Archive sources, failed Git lookups, and unrelated enclosing
worktrees record unknown Git fields as JSON `null`, never a false clean claim.
A source-root worktree or the tracked `skills/neon-genie` hub with matching root
contract/version supplies Git provenance. Receipts distinguish
`source_repository_root` from `source_subdirectory` (`.` or `skills/neon-genie`).
A dirty status lookup failure remains `null` even in a recognized worktree.
Loading
Loading