From d8ed645e748fac2d480bf660eed50026cfbeec4d Mon Sep 17 00:00:00 2001 From: Xuepoo Date: Fri, 2 Oct 2026 16:15:10 +0800 Subject: [PATCH] docs: reframe stale citations of removed bitty-runtime palette.rs bitty PR #1611 (commit 67cdcc14) removed crates/bitty-runtime/src/palette.rs. Reword the filter/init/manifest/test comments, README, AGENTS, and CHANGELOG so this package is the authoritative realization of the palette envelope and the bundled Rust realization is historical. Numeric bounds unchanged; comments and prose only. Refs #28 --- AGENTS.md | 6 +++--- CHANGELOG.md | 8 +++++++- README.md | 30 +++++++++++++++++------------- bitty-plugin.toml | 7 ++++--- lua/palette/filter.lua | 14 ++++++++------ lua/palette/init.lua | 11 ++++++----- tests/spec/filter_spec.lua | 5 +++-- 7 files changed, 48 insertions(+), 33 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 9af96a5..f1b9b20 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -27,9 +27,9 @@ explicitly scoped task and a reviewed security note; never widen silently. - Origin: this package is the independent first-party realization created by the OQ-053 bundled-plugin split decision ([bitty](https://github.com/bitty-terminal/bitty) `CTX-0397`). The accepted - Lua overlay path requires `ui.rich` in addition to the bundled - realization's `ui.overlay`; that difference is recorded, not a capability - widening done silently. + Lua overlay path requires `ui.rich` in addition to the former bundled + realization's `ui.overlay` (removed from `bitty` by PR #1611); that + difference is recorded, not a capability widening done silently. ## CarryCtx and agents diff --git a/CHANGELOG.md b/CHANGELOG.md index 59fda11..bd90f43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,8 +38,14 @@ and the project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). (everything pre-1.0-stable stays on the `0.0.x` line). No behavior change; no published tag or release existed, so no published artifact is downgraded. - Requests `ui.rich` in addition to `ui.overlay`: the accepted Plugin API v1 - Lua overlay path (`bitty.ui.mount`) requires both, unlike the bundled Rust + Lua overlay path (`bitty.ui.mount`) requires both, unlike the former bundled Rust realization which used the lower-level Panel Runtime overlay path. +- Reframe the palette envelope citations (`lua/palette/filter.lua`, + `lua/palette/init.lua`, `README.md`, manifest and test comments): this + package is the authoritative realization, and the historical bundled Rust + realization (`crates/bitty-runtime/src/palette.rs`) was removed from `bitty` + by PR #1611 (commit `67cdcc14`). Comment and prose only; no behavior change + (`CTX-0008`). ### Removed diff --git a/README.md b/README.md index f2b32f1..03b0ea5 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,8 @@ manifest `[compat]` ranges. ## Behavior -The plugin keeps the bundled palette behavior and bounds: +The plugin keeps the behavior and bounds of the former bundled palette; this +package now defines them: - case-insensitive substring filtering over a bounded entry list, at most `128` displayed entries (`PALETTE_MAX_ENTRIES`); @@ -60,18 +61,21 @@ The plugin keeps the bundled palette behavior and bounds: matching the returned count; - refresh on `focus.changed` while the palette is open. -## Capability difference from the bundled realization - -The bundled Rust realization (`bitty` `crates/bitty-plugin-host/src/bundled.rs` -`palette_manifest`, `crates/bitty-runtime/src/palette.rs`) declared only -`ui.overlay` because it used the lower-level Panel Runtime overlay path. The -accepted Plugin API v1 Lua overlay path (`bitty.ui.mount` on the `overlay` -slot) requires **both** `ui.rich` and `ui.overlay` per ADR 0009 and the Plugin -API v1 Lua Surface RFC. This package therefore requests `ui.rich` as well. - -This is a recorded, intentional difference. Reconciling the bundled manifest or -introducing a `ui.overlay`-only plain-overlay Lua path is tracked as a -follow-up; see "Known gaps". +## Capability difference from the former bundled realization + +This package is now the only realization of the palette envelope and +behavior. The historical bundled Rust realization in `bitty` is gone: its +manifest left the bundled catalog (`crates/bitty-plugin-host/src/bundled.rs`) +when the palette migrated to this package (`CTX-0397`), and its runtime module +(`crates/bitty-runtime/src/palette.rs`) was removed by `bitty` PR #1611 +(commit `67cdcc14`). That realization declared only `ui.overlay` because it +used the lower-level Panel Runtime overlay path. The accepted Plugin API v1 Lua +overlay path (`bitty.ui.mount` on the `overlay` slot) requires **both** +`ui.rich` and `ui.overlay` per ADR 0009 and the Plugin API v1 Lua Surface RFC. +This package therefore requests `ui.rich` as well. + +This is a recorded, intentional difference. Introducing a `ui.overlay`-only +plain-overlay Lua path is tracked as a follow-up; see "Known gaps". ## Known gaps diff --git a/bitty-plugin.toml b/bitty-plugin.toml index 777ce79..d709b45 100644 --- a/bitty-plugin.toml +++ b/bitty-plugin.toml @@ -16,7 +16,7 @@ description = "Command palette and picker UI via overlay slot, declarative primi license = "MIT" [compat] -# Unchanged from the bundled `bitty-terminal.palette` realization. +# Unchanged from the former bundled `bitty-terminal.palette` realization. bitty = ">=0.1,<1.0" plugin-api = "^1.0" @@ -25,8 +25,9 @@ plugin-api = "^1.0" # Unknown identifiers fail validation and there is no allow-all identifier. # # `ui.rich` gates `bitty.ui.mount`/`bitty.ui.update`; the `overlay` slot -# additionally requires `ui.overlay`. The bundled Rust realization declared -# only `ui.overlay` because it used the lower-level Panel Runtime overlay path; +# additionally requires `ui.overlay`. The former bundled Rust realization +# (removed from `bitty`) declared only `ui.overlay` because it used the +# lower-level Panel Runtime overlay path; # the accepted Plugin API v1 Lua overlay path requires both (ADR 0009 / # Plugin API v1 Lua Surface RFC). Recorded intentional difference. ui.rich = true diff --git a/lua/palette/filter.lua b/lua/palette/filter.lua index 32a6241..6b6420d 100644 --- a/lua/palette/filter.lua +++ b/lua/palette/filter.lua @@ -2,14 +2,16 @@ -- (bitty-terminal.palette). -- -- Pure functions with no host dependency, so the palette policy is unit --- testable in plain Lua. The numeric bounds mirror the bundled Rust --- realization (`bitty-runtime/src/palette.rs`): at most `128` displayed --- entries, a `128`-character query, and `128`-character display text per --- entry (the host overlay text bound `MAX_OVERLAY_TEXT_LEN`). The input +-- testable in plain Lua. This module is the authoritative realization of +-- the palette envelope: at most `128` displayed entries, a `128`-character +-- query, and `128`-character display text per entry (the host overlay text +-- bound `MAX_OVERLAY_TEXT_LEN`). These values were carried over from the +-- historical bundled Rust realization, which was removed from `bitty` by +-- PR #1611 (commit `67cdcc14`); no Rust counterpart remains. The input -- bound `MAX_INPUT` is a palette-local policy: candidate tables supplied -- through settings are untrusted data, so a single filter pass examines at --- most `MAX_INPUT` candidates regardless of how large the table is. No Rust --- counterpart exists upstream (the bundled realization trusts its input). +-- most `MAX_INPUT` candidates regardless of how large the table is (the +-- historical bundled realization trusted its input). local M = {} diff --git a/lua/palette/init.lua b/lua/palette/init.lua index 0e3caaf..cb7d6cb 100644 --- a/lua/palette/init.lua +++ b/lua/palette/init.lua @@ -7,11 +7,12 @@ -- -- Accepted surface: Plugin API v1 Lua Surface RFC (ADR 0009). Capabilities -- requested in `bitty-plugin.toml` are `ui.rich` (declarative UI mount) and --- `ui.overlay` (the overlay slot). The bundled Rust realization declared only --- `ui.overlay` because it used the lower-level Panel Runtime overlay path; the --- accepted Lua overlay path (`bitty.ui.mount`) additionally requires --- `ui.rich`, so this independent package declares both. This is a recorded, --- intentional difference from the bundled manifest. +-- `ui.overlay` (the overlay slot). The historical bundled Rust realization +-- (since removed from `bitty`) declared only `ui.overlay` because it used the +-- lower-level Panel Runtime overlay path; the accepted Lua overlay path +-- (`bitty.ui.mount`) additionally requires `ui.rich`, so this independent +-- package declares both. This is a recorded, intentional difference from the +-- former bundled manifest. -- -- v1 data adapter: the accepted surface exposes no command-registry -- enumeration and no `PickerProvider` (the Plugin Reuse and Provider Ecology diff --git a/tests/spec/filter_spec.lua b/tests/spec/filter_spec.lua index 1547afd..bc36516 100644 --- a/tests/spec/filter_spec.lua +++ b/tests/spec/filter_spec.lua @@ -4,8 +4,9 @@ local function run(context) local tap = context.tap local filter = require("palette.filter") - -- Output/query/text bounds mirror the bundled Rust realization; the input - -- bound is the palette-local untrusted-input policy. + -- Output/query/text bounds are this plugin's envelope (carried over from + -- the removed bundled Rust realization); the input bound is the + -- palette-local untrusted-input policy. tap.equal(filter.MAX_ENTRIES, 128, "MAX_ENTRIES") tap.equal(filter.MAX_QUERY_CHARS, 128, "MAX_QUERY_CHARS") tap.equal(filter.MAX_TEXT_CHARS, 128, "MAX_TEXT_CHARS")