@llblab/pi-state-flow 0.13.2 → 0.13.3

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
@@ -4,6 +4,10 @@
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.13.3: Telegram section discovery hotfix
8
+
9
+ - `Telegram section discovery`: The compiled extension now resolves the sibling pi-telegram public sections membrane from its compiled layout as well as the package export, restoring the State Flow control in the Telegram main menu without making Telegram a core dependency.
10
+
7
11
  ## 0.13.2: Benign compaction readiness
8
12
 
9
13
  - `Benign compaction readiness`: Automatic State Flow compaction now requires enough persisted message history as well as high total context usage, so a short session enlarged only by its system prompt remains a quiet non-action instead of surfacing Pi's native `Nothing to compact` failure.
@@ -1,4 +1,6 @@
1
1
  export declare const STATE_FLOW_TELEGRAM_ID = "@llblab/pi-state-flow";
2
+ /** Resolve the package export or the compiled sibling-extension layout used in local development. */
3
+ export declare function stateFlowTelegramSectionSpecifiers(moduleUrl?: string): string[];
2
4
  export interface StateFlowTelegramSnapshot {
3
5
  enabled: boolean;
4
6
  step: number;
@@ -11,10 +11,13 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
11
11
  return path;
12
12
  };
13
13
  export const STATE_FLOW_TELEGRAM_ID = "@llblab/pi-state-flow";
14
- const SECTIONS_IMPORT_SPECIFIERS = [
15
- "@llblab/pi-telegram/sections",
16
- new URL("../../pi-telegram/api/sections.ts", import.meta.url).href,
17
- ];
14
+ /** Resolve the package export or the compiled sibling-extension layout used in local development. */
15
+ export function stateFlowTelegramSectionSpecifiers(moduleUrl = import.meta.url) {
16
+ return [
17
+ "@llblab/pi-telegram/sections",
18
+ new URL("../../../pi-telegram/dist/api/sections.js", moduleUrl).href,
19
+ ];
20
+ }
18
21
  /** Main-menu section label doubles as the live status value: the spiral identity is constant, the value is not. */
19
22
  export function formatStateFlowSectionLabel(snapshot) {
20
23
  return `🌀 State Flow: ${stateFlowLabelValue(snapshot)}`;
@@ -168,7 +171,7 @@ async function importTelegramModule(specifiers, guard) {
168
171
  }
169
172
  /** Default loader; injectable so tests and embedded hosts can control transport presence. */
170
173
  export async function loadStateFlowTelegramModules() {
171
- const sections = await importTelegramModule(SECTIONS_IMPORT_SPECIFIERS, (module) => typeof module?.registerTelegramSection === "function");
174
+ const sections = await importTelegramModule(stateFlowTelegramSectionSpecifiers(), (module) => typeof module?.registerTelegramSection === "function");
172
175
  return { ...(sections === undefined ? {} : { sections }) };
173
176
  }
174
177
  export function createStateFlowTelegramAdapter(options) {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llblab/pi-state-flow",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "private": false,
5
5
  "description": "Incremental scoped state/context/memory compiler for Pi, inspired by SKILL.state",
6
6
  "keywords": [
package/lib/telegram.ts CHANGED
@@ -4,10 +4,14 @@
4
4
  // pi-telegram is absent or its registry is not ready, registration fails open and retries.
5
5
 
6
6
  export const STATE_FLOW_TELEGRAM_ID = "@llblab/pi-state-flow";
7
- const SECTIONS_IMPORT_SPECIFIERS = [
8
- "@llblab/pi-telegram/sections",
9
- new URL("../../pi-telegram/api/sections.ts", import.meta.url).href,
10
- ];
7
+
8
+ /** Resolve the package export or the compiled sibling-extension layout used in local development. */
9
+ export function stateFlowTelegramSectionSpecifiers(moduleUrl = import.meta.url): string[] {
10
+ return [
11
+ "@llblab/pi-telegram/sections",
12
+ new URL("../../../pi-telegram/dist/api/sections.js", moduleUrl).href,
13
+ ];
14
+ }
11
15
 
12
16
  export interface StateFlowTelegramSnapshot {
13
17
  enabled: boolean;
@@ -259,7 +263,7 @@ async function importTelegramModule<TModule>(
259
263
  /** Default loader; injectable so tests and embedded hosts can control transport presence. */
260
264
  export async function loadStateFlowTelegramModules(): Promise<StateFlowTelegramModules> {
261
265
  const sections = await importTelegramModule<StateFlowTelegramSectionModule>(
262
- SECTIONS_IMPORT_SPECIFIERS,
266
+ stateFlowTelegramSectionSpecifiers(),
263
267
  (module): module is StateFlowTelegramSectionModule =>
264
268
  typeof (module as StateFlowTelegramSectionModule | undefined)?.registerTelegramSection === "function",
265
269
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llblab/pi-state-flow",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "private": false,
5
5
  "description": "Incremental scoped state/context/memory compiler for Pi, inspired by SKILL.state",
6
6
  "keywords": [