@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.
- package/README.md +60 -60
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
# pi-footer-framework
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
13
|
+
No external services or credentials are required.
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
##
|
|
31
|
+
## What it shows
|
|
22
32
|
|
|
23
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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`
|
|
59
|
+
Use `/footerfx save project` only when you intentionally want a project-specific footer layout.
|
|
47
60
|
|
|
48
61
|
## Commands
|
|
49
62
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
|
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.
|