From a08d854d52cf5492a7763bccc1ce475dcc057cba Mon Sep 17 00:00:00 2001 From: t Date: Thu, 20 Aug 2026 12:49:36 -0600 Subject: Replace lyaml with api7-lua-tinyyaml and prepare the 0.1.0 release lyaml binds the system libyaml, which luarocks does not vendor, so installing the rock failed wherever that library was absent, taking the whole extension down on a stock macOS machine. api7-lua-tinyyaml is pure Lua and matches lyaml on every quoting, escaping and block-scalar form profiles use. What the subset costs: anchors and aliases are not resolved, and plain multi-line scalars raise. The raise surfaces through the existing parse warning, but an unresolved alias came back as the literal "*alias" string and would have become a profile name, so frontmatter.parse now detects those keys, drops them, and warns. Point source.url at code.tjp.lol with a v0.1.0 tag, replacing a GitHub URL that never existed. Add a LICENSE file and mise release tasks, and fix the README dependency-install command, which called a luarocks.cmd function that does not exist. --- README.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index aadf719..b462053 100644 --- a/README.md +++ b/README.md @@ -16,18 +16,26 @@ For a local checkout, use `paths = ["/path/to/panto-subagents"]` instead. A in panto's own rocks tree first: ```sh -panto lua -e 'require("luarocks.cmd").run("install", "toml2lua")' -panto lua -e 'require("luarocks.cmd").run("install", "lyaml")' +TREE="$(echo ~/.local/share/panto/rocks/lua-*)" +luarocks --lua-version 5.4 --tree "$TREE" install toml2lua +luarocks --lua-version 5.4 --tree "$TREE" install api7-lua-tinyyaml ``` +(Every rock here is pure Lua, so any LuaRocks targeting Lua 5.4 can populate +panto's tree. A `rocks` entry needs none of this — panto installs dependencies +with the rock.) + ### Dependencies Panto installs the rock's dependencies with it: -- **lyaml** parses profile frontmatter. It binds the system libyaml, which - LuaRocks does not vendor — install it first (`brew install libyaml`, or - `apt install libyaml-dev`), otherwise the rock fails to build and panto - quietly starts without the `subagents.*` tools. +- **api7-lua-tinyyaml** parses profile frontmatter. Pure Lua, nothing to + install alongside it. It covers a subset of YAML — every quoting, escaping + and block-scalar form profiles use, but not anchors/aliases (flagged with a + warning rather than silently misread) and not plain multi-line scalars + (a parse warning). Full-spec `lyaml` was the alternative, rejected because + binding the system libyaml makes the rock fail to build wherever that + library is absent. - **toml2lua** reads the layered `config.toml` at activation and TOML workflows afterwards. Pure Lua, nothing to install; without it activation fails. - **luv** backs profile and workflow discovery. Panto already ships it. @@ -151,8 +159,7 @@ mise run deps # install the rocks into ./.rocks (gitignored) mise run check # run the specs against that tree ``` -`mise run deps` passes Homebrew's libyaml prefix to lyaml when brew is -available. Without mise, install the same rocks with any LuaRocks targeting Lua +Without mise, install the same rocks with any LuaRocks targeting Lua 5.4 and run `lua spec/run.lua` from the repo root. `panto lua spec/run.lua` runs the suite inside panto's own interpreter and rocks tree, skipping whatever cases that tree has no rock for. -- cgit v1.3