@badliveware/pi-footer-framework 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +60 -60
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,10 +1,8 @@
1
1
  # pi-footer-framework
2
2
 
3
- A configurable footer framework extension that intentionally owns/hijacks the footer and lets users control layout sections.
3
+ Configurable footer replacement for Pi. It gives you a stable two-line footer and lets you choose which status items appear where.
4
4
 
5
- This is designed to pair with primitive-emitting extensions (for example `pr-upstream-status` via `pr-upstream:state`).
6
-
7
- It ships with a bundled skill (`footer-framework-config`) and advertises it via package metadata + `resources_discover`, so Pi can apply footer tuning commands automatically when this extension is active.
5
+ Use it when the default footer is too cramped, when you want context/model/branch/PR state in predictable places, or when other extensions need a shared place to publish compact status items.
8
6
 
9
7
  ## Install
10
8
 
@@ -12,66 +10,85 @@ It ships with a bundled skill (`footer-framework-config`) and advertises it via
12
10
  pi install npm:@badliveware/pi-footer-framework
13
11
  ```
14
12
 
15
- For local testing from this repository:
13
+ No external services or credentials are required.
16
14
 
17
- ```bash
18
- pi -e /path/to/pi/agent/extensions/public/footer-framework
15
+ ## Quick use
16
+
17
+ ```text
18
+ /footerfx on
19
+ /footerfx item context line 1
20
+ /footerfx item context after model
21
+ /footerfx gap 1 10
22
+ /footerfx save user
23
+ ```
24
+
25
+ The extension replaces the default footer only while enabled. Disable it with:
26
+
27
+ ```text
28
+ /footerfx off
19
29
  ```
20
30
 
21
- ## Behavior
31
+ ## What it shows
22
32
 
23
- - Replaces the default footer when enabled.
24
- - Keeps a stable 2-line footer layout.
25
- - Composes built-in footer items:
26
- - `cwd`, `model`, `branch`, `stats`, `context`, `pr`, `ext`
27
- - the `model` item includes the active thinking level as `<model-id>:<thinking-level>`
28
- - the `context` item shows current context-window usage as percent plus humanized `tokens/max` counts, for example `ctx 52.2% 142K/272K`
29
- - Supports extension-provided dynamic items via the event bus.
30
- - Lets users position each item independently by line, left/right zone, relative order, or absolute column.
33
+ Built-in items include:
31
34
 
32
- ## Persistence
35
+ - `cwd`
36
+ - `model` with thinking level
37
+ - `branch`
38
+ - `stats`
39
+ - `context` usage, such as `ctx 52.2% 142K/272K`
40
+ - `pr` state from compatible PR extensions
41
+ - `ext` status text from other extensions
33
42
 
34
- Footer settings automatically persist to the user config file by default:
43
+ Items can be shown/hidden and positioned by line, left/right zone, relative order, or fixed column.
44
+
45
+ ## Configuration
46
+
47
+ User settings persist to:
35
48
 
36
49
  ```text
37
50
  ~/.pi/agent/footer-framework.json
38
51
  ```
39
52
 
40
- If a project config exists, it overrides user settings for that project:
53
+ Project settings can override them:
41
54
 
42
55
  ```text
43
56
  <project>/.pi/footer-framework.json
44
57
  ```
45
58
 
46
- Use `/footerfx save project` to intentionally create/update the project config.
59
+ Use `/footerfx save project` only when you intentionally want a project-specific footer layout.
47
60
 
48
61
  ## Commands
49
62
 
50
- - `/footerfx` show current config and source
51
- - `/footerfx config` show user/project config paths and loaded source
52
- - `/footerfx load` reload user/project config files
53
- - `/footerfx save user` save current settings to user config
54
- - `/footerfx save project` save current settings to project config
55
- - `/footerfx on` enable framework footer
56
- - `/footerfx off` disable and restore default footer
57
- - `/footerfx reset` restore defaults and persist to user config
58
- - `/footerfx section <cwd|stats|context|model|branch|pr|ext> <on|off>` legacy section toggles
59
- - `/footerfx item <id> <show|hide|reset>`
60
- - `/footerfx item <id> line <1|2>`
61
- - `/footerfx item <id> zone <left|right>`
62
- - `/footerfx item <id> order <n>`
63
- - `/footerfx item <id> before <other-id>` / `/footerfx item <id> after <other-id>`
64
- - `/footerfx item <id> column <n|off>` absolute column placement
65
- - `/footerfx anchor <line1|line2|all> <gap|left|center|right|spread>` line-level right-zone anchoring
66
- - `/footerfx gap <min> <max>` spacing controls used by `gap`/`center`/`left` modes
67
- - `/footerfx branch-width <n>` max branch label width
68
- - `/footerfx mcp-zero <hide|show>` — hide/show `MCP: 0/x servers`
69
- - `/footerfx-debug` — dump latest footer snapshot and settings
70
- - includes per-line layout telemetry: left/right widths, pad width, right start/end columns, truncation
63
+ | Command | What it does |
64
+ | --- | --- |
65
+ | `/footerfx` | Show current config and source. |
66
+ | `/footerfx on` / `/footerfx off` | Enable or disable the replacement footer. |
67
+ | `/footerfx load` | Reload user/project config files. |
68
+ | `/footerfx save user` | Save current settings as the user default. |
69
+ | `/footerfx save project` | Save current settings for the current project. |
70
+ | `/footerfx reset` | Restore defaults and persist them to user config. |
71
+ | `/footerfx item <id> <show|hide|reset>` | Control item visibility. |
72
+ | `/footerfx item <id> line <1|2>` | Move an item to a footer line. |
73
+ | `/footerfx item <id> zone <left|right>` | Move an item between left/right zones. |
74
+ | `/footerfx item <id> before <other-id>` | Place an item before another item. |
75
+ | `/footerfx item <id> after <other-id>` | Place an item after another item. |
76
+ | `/footerfx item <id> column <n|off>` | Pin or unpin an item column. |
77
+ | `/footerfx anchor <line1|line2|all> <gap|left|center|right|spread>` | Control line alignment. |
78
+ | `/footerfx gap <min> <max>` | Set spacing bounds. |
79
+ | `/footerfx branch-width <n>` | Set max branch label width. |
80
+ | `/footerfx-debug` | Show render snapshot, settings, and layout telemetry. |
81
+
82
+ ## Agent tools
83
+
84
+ The extension exposes two tools so agents can inspect and adjust the footer without asking you to run commands:
85
+
86
+ - `footer_framework_state`
87
+ - `footer_framework_config`
71
88
 
72
89
  ## Extension item API
73
90
 
74
- Other extensions can contribute footer items by emitting:
91
+ Other extensions can publish footer items through Pi's event bus:
75
92
 
76
93
  ```ts
77
94
  pi.events.emit("footer-framework:item", {
@@ -81,25 +98,8 @@ pi.events.emit("footer-framework:item", {
81
98
  });
82
99
  ```
83
100
 
84
- Remove an item:
101
+ Remove an item with:
85
102
 
86
103
  ```ts
87
104
  pi.events.emit("footer-framework:item", { id: "my-extension:status", remove: true });
88
105
  ```
89
-
90
- Users can then reposition the item with `/footerfx item my-extension:status ...` and those overrides persist automatically.
91
-
92
- ## Agent automation primitives
93
-
94
- The extension exposes tools so the agent can introspect and tune the footer without asking the user to run commands:
95
-
96
- - `footer_framework_state` — returns settings + latest rendered footer snapshot + layout telemetry
97
- - `footer_framework_config` — applies the same syntax as `/footerfx ...`
98
-
99
- ## Notes
100
-
101
- - The extension stores latest settings in session custom entries (`footer-framework-state`).
102
- - It listens to event bus topic `pr-upstream:state` for PR primitives.
103
- - Extension statuses with empty rendered text are ignored so transient or
104
- intentionally-cleared status providers do not leave phantom separators in the
105
- footer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@badliveware/pi-footer-framework",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Configurable footer framework extension for Pi.",
5
5
  "type": "module",
6
6
  "keywords": [