diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..b1f817f9b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +What changed in each release of LLeMbas TTY. WezTerm's own changes are in +`docs/changelog.md`, as upstream keeps them. + +## 1.0.0-beta.1 — unreleased + +### Added + +- Forked from WezTerm (`wezterm/wezterm`, `main` at `1026152aa`), with its full + history, so that upstream can be merged in; `UPSTREAM` names the upstream + commit last merged. Nothing changed in the terminal yet. diff --git a/LICENSE.md b/LICENSE.md index cf22ae0b4..135dc9e61 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,7 @@ MIT License Copyright (c) 2018-Present Wez Furlong +Copyright (c) 2026 Jaroslav Beneš (LLeMbas TTY) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index c9857d663..cbf71a5f6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,28 @@ +# LLeMbas TTY + +**A terminal that is also an agent.** LLeMbas TTY is a fork of +[WezTerm](https://github.com/wezterm/wezterm) with LLeMbas built in. By default +it is an ordinary terminal and nothing leaves the machine. When you ask, it +can attach a LLeMbas session to a pane: + +- **Ask the model** from a key, without the line reaching your shell; the + answer shows in a side display. +- **The model sees what is happening**: the commands you ran, their exit + status and the end of their output, and where you are — as you allow it. +- **It can act in the terminal**: run a command in your pane, asked first. +- **Autocomplete in the prompt**, as ghost text, with its own switch and model. +- **Session bars and displays** — files, commands, changes and pictures — and + inline images. + +The agent is the [LLeMbas CLI](https://github.com/LLeMbas/LLeMbas-CLI), +unchanged; the package installs it, with Neovim and the LLeMbas editor plugin. +It logs in to your own LLeMbas server and uses that server's models. + +**State:** just forked; nothing above is built yet. Version in `VERSION`, +changes in `CHANGELOG.md`. MIT, like WezTerm — see `LICENSE.md`. + +--- + # Wez's Terminal WezTerm Icon *A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust* diff --git a/UPSTREAM b/UPSTREAM new file mode 100644 index 000000000..d419902b9 --- /dev/null +++ b/UPSTREAM @@ -0,0 +1 @@ +1026152aa1e6ed6f98e6dc73eda2a98a5c0ef575 diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..ffbc99398 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.0.0-beta.1 diff --git a/scripts/hygiene.sh b/scripts/hygiene.sh new file mode 100755 index 000000000..21aa55481 --- /dev/null +++ b/scripts/hygiene.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +# Nothing we add may name the private estate it was written on (the LLeMbas section rule: +# "everything public is current-state and estate-free"), as a check that runs on every push. +# +# This is a fork: WezTerm's own tree has example addresses of its own (ssh tests, docs), and those +# are upstream's, not ours. So the check reads only what this fork adds: every line added since the +# upstream commit named in `UPSTREAM` (moved on each merge from upstream). This file is the one place +# that may spell the patterns, and is skipped. +set -euo pipefail +cd "$(dirname "$0")/.." + +base=$(tr -d '[:space:]' < UPSTREAM) +git cat-file -e "$base^{commit}" 2>/dev/null || { echo "hygiene: UPSTREAM names $base, which this clone does not have" >&2; exit 2; } + +patterns=( + 'houmeres' + '\b[a-z0-9-]+\.lan\b' + '\bCT ?2[0-9]{2}\b' + '\b10\.0\.0\.[0-9]+' + '\b192\.168\.[0-9]+\.[0-9]+' + '\bgamebox\b' + '\bthor\b' +) + +# Added lines only, with their file, from the fork point to the working tree (staged or not). +added=$(git diff --no-color --unified=0 "$base" -- . ':(exclude)scripts/hygiene.sh' \ + | awk '/^\+\+\+ b\//{file=substr($0,7); next} /^\+/ && !/^\+\+\+/{print file": "substr($0,2)}') +# And files not yet tracked, which a diff does not show. +while IFS= read -r -d '' f; do + [ "$f" = scripts/hygiene.sh ] && continue + [ -f "$f" ] || continue + added+=$'\n'$(awk -v f="$f" '{print f": "$0}' "$f") +done < <(git ls-files -z --others --exclude-standard) + +found=0 +for pattern in "${patterns[@]}"; do + # grep: 0 = matched, 1 = no match, anything else is an error and must not read as "clean". + set +e + hits=$(printf '%s\n' "$added" | grep -IEi -- "$pattern") + rc=$? + set -e + if [ "$rc" -eq 0 ]; then + printf '%s\n' "$hits" + echo "hygiene: the lines above match /$pattern/" >&2 + found=1 + elif [ "$rc" -ne 1 ]; then + echo "hygiene: grep failed on /$pattern/" >&2 + exit 2 + fi +done +[ "$found" -eq 0 ] && echo "hygiene: nothing private in what this fork adds (since ${base:0:9})" +exit "$found"