@llblab/pi-kit 0.11.3 → 0.11.4

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/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to `@llblab/pi-kit` are documented here.
4
4
 
5
+ ## 0.11.4 - 2026-09-14
6
+
7
+ - `State Flow Inspection Hierarchy`: Advances the exact State Flow pin to `0.11.1`, placing Show state below Start/Stop, presenting Back and the four scope choices as one vertical composition axis, and rendering a fixed scope heading above four top-level disclosures.
8
+ - `Companion Ownership`: Advances the exact Telegram pin to `0.45.11`, retaining generic Rich Message headings while removing State Flow-specific scope semantics from the transport-owned UI registry. The package set, resource inventory, and explicit load order remain unchanged.
9
+
5
10
  ## 0.11.3 - 2026-09-14
6
11
 
7
12
  - `Telegram Rich Sections And Queue Continuation`: Advances the exact Telegram pin to `0.45.9`, adding callback-targeted Native Rich Messages for companion sections and binding `/next` notices to the exact dispatchable queue item across concurrent readiness, admission, mutation, reordering, clearing, and transport changes.
package/README.md CHANGED
@@ -14,8 +14,8 @@ Package links lead to the owning repositories for usage, documentation, issues,
14
14
  | [`@llblab/pi-clean-room`](https://github.com/llblab/pi-clean-room) | `0.1.1` | Isolated nested Pi TUI with explicitly selected extensions |
15
15
  | [`@llblab/pi-codex-usage`](https://github.com/llblab/pi-codex-usage) | `0.9.4` | Compact Codex/Spark subscription-limit status |
16
16
  | [`@llblab/pi-grow-loop`](https://github.com/llblab/pi-grow-loop) | `0.8.1` | Visible continuation scheduling and bounded worker Skills |
17
- | [`@llblab/pi-state-flow`](https://github.com/llblab/pi-state-flow) | `0.11.0` | Durable scoped state with native session compaction, exact publication, and read-only Telegram inspection |
18
- | [`@llblab/pi-telegram`](https://github.com/llblab/pi-telegram) | `0.45.9` | Telegram companion with exact queues, Rich section messages, files, voice, controls, and Generative Apps guidance |
17
+ | [`@llblab/pi-state-flow`](https://github.com/llblab/pi-state-flow) | `0.11.1` | Durable scoped state with native session compaction, exact publication, and read-only Telegram inspection |
18
+ | [`@llblab/pi-telegram`](https://github.com/llblab/pi-telegram) | `0.45.11` | Telegram companion with exact queues, generic Rich section messages, files, voice, controls, and Generative Apps guidance |
19
19
  | [`@llblab/skills`](https://github.com/llblab/skills) | `1.15.0` | Portable workflows for engineering, review, design, context maintenance, and other focused tasks |
20
20
 
21
21
  Versions are exact by design. An upstream release does not change an installed kit until this repository explicitly advances the dependency and publishes a new kit version. Runtime defects and package-specific feature requests belong in the linked repository; package selection and kit installation issues belong here.
@@ -4,6 +4,10 @@
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.11.1: Telegram inspection hierarchy
8
+
9
+ - `Telegram inspection`: `👁 Show state` now follows Start/Stop, and its Back, 🌐 Global, 📂 CWD, 💬 Session, and 🧬 Effective controls form one vertical composition axis. A selected scope opens with a fixed emoji-bearing heading followed directly by the four top-level collapsible semantic fields, removing the redundant outer disclosure.
10
+
7
11
  ## 0.11.0: Telegram state inspection
8
12
 
9
13
  - `Telegram inspection`: The State Flow submenu now offers `👁 Show state` with Global, CWD, Session, and Effective choices. Selecting one scope sends exactly that projected materialized slice as a standalone Telegram Native Rich Message whose semantic fields use collapsible `details` and JSON `pre` blocks; inspection is read-only and the optional adapter remains fail-open without a compatible pi-telegram membrane.
@@ -53,7 +53,7 @@ Continue working normally. The agent receives the state protocol and uses `patch
53
53
 
54
54
  State Flow is **opt-in**. Starting in an existing conversation keeps its active context for one migration run. To enable genuinely new sessions automatically, set `"autoStart": true` in the optional [configuration](docs/usage.md#configuration).
55
55
 
56
- With a compatible `pi-telegram` installed, its main menu also exposes the same Start/Stop controls and a `👁 Show state` chooser for Global, CWD, Session, or Effective memory. Selecting one scope sends exactly that materialized slice as a standalone native Rich Message with collapsible semantic fields; inspection is read-only and does not create a State Flow transition.
56
+ With a compatible `pi-telegram` installed, its main menu exposes the same Start/Stop controls followed by `👁 Show state`. The chooser presents Back, 🌐 Global, 📂 CWD, 💬 Session, and 🧬 Effective as one vertical composition axis. Selecting a scope sends exactly that materialized slice as a standalone native Rich Message with a fixed scope heading and four top-level collapsible semantic fields; inspection is read-only and does not create a State Flow transition.
57
57
 
58
58
  ## What carries forward
59
59
 
@@ -26,6 +26,7 @@ export interface StateFlowTelegramState {
26
26
  }
27
27
 
28
28
  export type StateFlowTelegramRichBlock =
29
+ | { type: "heading"; text: string; size: 2 }
29
30
  | { type: "pre"; text: string; language?: string }
30
31
  | { type: "details"; summary: string | { type: "bold" | "code"; text: string }; blocks: StateFlowTelegramRichBlock[]; is_open?: true };
31
32
 
@@ -124,19 +125,28 @@ export function buildStateFlowSectionView(
124
125
  text: [formatStateFlowSectionHeader(snapshot), "", STATE_FLOW_SECTION_HELP].join("\n"),
125
126
  parseMode: "html",
126
127
  replyMarkup: { inline_keyboard: [
127
- [{ text: "👁 Show state", callback_data: callbackData("show-state") }],
128
128
  [action],
129
+ [{ text: "👁 Show state", callback_data: callbackData("show-state") }],
129
130
  ] },
130
131
  };
131
132
  }
132
133
 
134
+ const STATE_FLOW_SCOPE_LABELS: Record<StateFlowTelegramScope, string> = {
135
+ global: "🌐 Global",
136
+ cwd: "📂 CWD",
137
+ session: "💬 Session",
138
+ effective: "🧬 Effective",
139
+ };
140
+
133
141
  export function buildStateFlowScopeChooser(callbackData: (action: string, payload?: string) => string): StateFlowTelegramView {
134
142
  return {
135
143
  text: "<b>👁 Show state:</b>",
136
144
  parseMode: "html",
137
145
  replyMarkup: { inline_keyboard: [
138
- ["global", "cwd"].map((scope) => ({ text: scope === "global" ? "Global" : "CWD", callback_data: callbackData("inspect", scope) })),
139
- ["session", "effective"].map((scope) => ({ text: scope === "session" ? "Session" : "Effective", callback_data: callbackData("inspect", scope) })),
146
+ [{ text: "⬅️ Back", callback_data: callbackData("back") }],
147
+ ...(["global", "cwd", "session", "effective"] as const).map((scope) => [
148
+ { text: STATE_FLOW_SCOPE_LABELS[scope], callback_data: callbackData("inspect", scope) },
149
+ ]),
140
150
  ] },
141
151
  };
142
152
  }
@@ -169,18 +179,16 @@ function renderStateFlowTelegramField(value: unknown): string {
169
179
  }
170
180
 
171
181
  export function renderStateFlowRichState(scope: StateFlowTelegramScope, state: StateFlowTelegramState): StateFlowTelegramRichMessage {
172
- const title = scope === "cwd" ? "CWD" : `${scope[0].toUpperCase()}${scope.slice(1)}`;
173
182
  const fields = ["artifacts", "contract", "working", "response"] as const;
174
183
  return {
175
- blocks: [{
176
- type: "details",
177
- summary: { type: "bold", text: title },
178
- blocks: fields.map((field) => ({
179
- type: "details",
180
- summary: { type: "code", text: field },
181
- blocks: [{ type: "pre", language: "json", text: renderStateFlowTelegramField(state[field]) }],
184
+ blocks: [
185
+ { type: "heading", text: STATE_FLOW_SCOPE_LABELS[scope], size: 2 },
186
+ ...fields.map((field) => ({
187
+ type: "details" as const,
188
+ summary: { type: "code" as const, text: field },
189
+ blocks: [{ type: "pre" as const, language: "json", text: renderStateFlowTelegramField(state[field]) }],
182
190
  })),
183
- }],
191
+ ],
184
192
  skip_entity_detection: true,
185
193
  };
186
194
  }
@@ -198,7 +206,7 @@ function buildStateFlowTelegramSection(port: StateFlowTelegramPort) {
198
206
  buildStateFlowSectionView(port.snapshot(), (action) => ctx.callbackData(action)),
199
207
  handleCallback: async (ctx: StateFlowTelegramCallbackContext) => {
200
208
  // cancel/refresh remain routable for keyboards sent by earlier versions.
201
- if (ctx.action !== "start" && ctx.action !== "stop" && ctx.action !== "cancel" && ctx.action !== "refresh" && ctx.action !== "show-state" && ctx.action !== "inspect") return "pass" as const;
209
+ if (ctx.action !== "start" && ctx.action !== "stop" && ctx.action !== "cancel" && ctx.action !== "refresh" && ctx.action !== "show-state" && ctx.action !== "inspect" && ctx.action !== "back") return "pass" as const;
202
210
  let notice: string | undefined;
203
211
  try {
204
212
  if (ctx.action === "show-state") {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llblab/pi-state-flow",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "private": false,
5
5
  "description": "Incremental scoped state/context compiler for Pi, inspired by SKILL.state",
6
6
  "keywords": [
@@ -4,6 +4,15 @@
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.45.11: Consumer-owned companion semantics
8
+
9
+ - `Extension boundaries`: Removes consumer-specific state-scope emoji from the Telegram UI registry. The bridge continues to own generic Rich Message headings and inspection semantics, while companion extensions independently own their domain labels, composition rules, and presentation through the public section API.
10
+
11
+ ## 0.45.10: Rich headings and state-scope markers
12
+
13
+ - `Rich section headings`: Public Rich Message block types now include native headings, allowing companion sections to place a fixed title above sibling disclosures instead of wrapping the entire view in another collapsible block.
14
+ - `State-scope markers`: Registers 🌐 Global, 📂 CWD, 💬 Session, and 🧬 Effective as canonical state-scope semantics for chooser buttons and selected-scope headings, with composition flowing Global → CWD → Session → Effective.
15
+
7
16
  ## 0.45.9: Rich sections and exact queue continuation
8
17
 
9
18
  - `Extension Sections`: Public section contexts now expose `openRich(message)` for one standalone Telegram Native Rich Message routed to the exact callback chat/thread with normal message-ownership recording and scoped callback diagnostics. Companion extensions can reuse native `details`/`pre` disclosure without raw bot access; `👁` is the canonical read-only inspection marker.
@@ -292,6 +292,7 @@ export type TelegramRichText =
292
292
  | { type: "bold" | "code"; text: TelegramRichText };
293
293
 
294
294
  export type TelegramInputRichBlock =
295
+ | { type: "heading"; text: TelegramRichText; size?: 1 | 2 | 3 }
295
296
  | { type: "pre"; text: TelegramRichText; language?: string }
296
297
  | {
297
298
  type: "details";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llblab/pi-telegram",
3
- "version": "0.45.9",
3
+ "version": "0.45.11",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llblab/pi-kit",
3
- "version": "0.11.3",
3
+ "version": "0.11.4",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -44,8 +44,8 @@
44
44
  "@llblab/pi-clean-room": "0.1.1",
45
45
  "@llblab/pi-codex-usage": "0.9.4",
46
46
  "@llblab/pi-grow-loop": "0.8.1",
47
- "@llblab/pi-state-flow": "0.11.0",
48
- "@llblab/pi-telegram": "0.45.9",
47
+ "@llblab/pi-state-flow": "0.11.1",
48
+ "@llblab/pi-telegram": "0.45.11",
49
49
  "@llblab/skills": "1.15.0"
50
50
  },
51
51
  "bundledDependencies": [