@agimon-ai/doompi-ui 0.0.1-alpha.21 → 0.0.1-alpha.23
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 +67 -23
- package/package.json +9 -7
package/README.md
CHANGED
|
@@ -1,43 +1,87 @@
|
|
|
1
1
|
# @agimon-ai/doompi-ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
DoomPi's shared terminal interface, Leader Space host, theme, overlays, and UI registries.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
registry that ties its packages together. Pressing `SPC` on an empty draft opens the map;
|
|
7
|
-
pressing it inside a prompt still types a space. No stolen keystrokes and no pile of slash
|
|
8
|
-
commands to memorize.
|
|
5
|
+
The [DoomPi distribution](https://www.npmjs.com/package/@agimon-ai/doompi) loads this package as core. Extension authors can depend on its public contracts without adopting the full distribution.
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
> **Alpha:** UI and contribution contracts may change between releases.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
|
|
11
|
+
- Node.js 22.19.0 or newer
|
|
12
|
+
- Pi 0.84.2
|
|
13
|
+
- Pi TUI 0.84.2
|
|
13
14
|
|
|
14
15
|
## Install
|
|
15
16
|
|
|
17
|
+
To load the UI directly in Pi:
|
|
18
|
+
|
|
16
19
|
```bash
|
|
17
|
-
|
|
20
|
+
pi install npm:@agimon-ai/doompi-ui
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
DoomPi users should not add it to a layer; the distribution loads it before layer contributions.
|
|
24
|
+
|
|
25
|
+
## Commands and keys
|
|
26
|
+
|
|
27
|
+
| Input | Behavior |
|
|
28
|
+
| ------------ | ---------------------------------------------------------------------------------- |
|
|
29
|
+
| `Ctrl+Space` | Opens Leader Space from anywhere in the editor |
|
|
30
|
+
| `SPC` | Opens Leader Space only when the current draft is empty; otherwise inserts a space |
|
|
31
|
+
| `/tools` | Opens the current tool and MCP inventory |
|
|
32
|
+
| `/config` | Opens settings contributed by active extensions |
|
|
33
|
+
|
|
34
|
+
The registry rejects or diagnoses conflicting Leader contributions instead of silently replacing an existing binding. Diagnostics are recorded through telemetry and shown as TUI warnings when a UI is attached.
|
|
35
|
+
|
|
36
|
+
## Contribute to Leader Space
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import { registerDoomLeaderContribution } from '@agimon-ai/doompi-ui/leader';
|
|
40
|
+
import type { ExtensionAPI } from '@earendil-works/pi-coding-agent';
|
|
41
|
+
|
|
42
|
+
export function registerReviewLeader(pi: ExtensionAPI): () => void {
|
|
43
|
+
return registerDoomLeaderContribution(pi, {
|
|
44
|
+
source: '@example/review-extension',
|
|
45
|
+
bindings: [
|
|
46
|
+
{
|
|
47
|
+
id: 'review.open',
|
|
48
|
+
path: [{ key: 'r', label: 'review', detail: 'open review tools' }],
|
|
49
|
+
command: { name: 'review' },
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
});
|
|
53
|
+
}
|
|
18
54
|
```
|
|
19
55
|
|
|
20
|
-
|
|
56
|
+
Dispose the returned registration during shutdown so reloads cannot retain stale bindings.
|
|
21
57
|
|
|
22
|
-
|
|
23
|
-
The bare package name follows its Pi manifest and loads the Pi adapter; the explicit
|
|
24
|
-
`/extensions/pi` subpath does the same job when an adapter path is required.
|
|
58
|
+
## TUI and headless sessions
|
|
25
59
|
|
|
26
|
-
|
|
60
|
+
The editor, header, footer, overlays, Leader menu, and notifications require an interactive TUI. The underlying typed contribution registries can still be installed and queried in headless sessions, but UI-only commands have no panel to render. Provide a tool, RPC, or CLI route when a capability must also work headlessly.
|
|
27
61
|
|
|
28
|
-
|
|
29
|
-
- `SPC e c` opens the Doompi config panel.
|
|
30
|
-
- Other extensions contribute bindings through `@agimon-ai/doompi-ui/leader` instead of
|
|
31
|
-
hardcoding their own key trees.
|
|
62
|
+
## Theme
|
|
32
63
|
|
|
33
|
-
|
|
34
|
-
chord.
|
|
64
|
+
The package publishes `@agimon-ai/doompi-ui/themes/doom-pi-dark.json`. DoomPi synchronizes that resource and selects it by default. Set `DOOMPI_THEME` to select another available Pi theme for the UI adapter.
|
|
35
65
|
|
|
36
66
|
## Public API
|
|
37
67
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
68
|
+
Declared exports cover Leader registration, UI state, rendering, tool chrome, header/footer/editor components, configuration and tools overlays, telemetry integration, and theme helpers. Use these exports rather than importing generated `dist` paths.
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
import { registerDoomLeaderContribution } from '@agimon-ai/doompi-ui/leader';
|
|
72
|
+
import { DEFAULT_THEME_NAME } from '@agimon-ai/doompi-ui/theme';
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Development
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pnpm build
|
|
79
|
+
pnpm typecheck
|
|
80
|
+
pnpm test
|
|
81
|
+
pnpm lint
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Maintained by [Agimon](https://agimon.ai/about).
|
|
41
85
|
|
|
42
86
|
## License
|
|
43
87
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/doompi-ui",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.1-alpha.23",
|
|
4
|
+
"description": "Leader-key menus, themes, and TUI components for DoomPi and Pi extensions.",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"ai",
|
|
7
6
|
"coding-agent",
|
|
8
|
-
"developer-tools",
|
|
9
7
|
"doompi",
|
|
10
|
-
"
|
|
8
|
+
"leader-key",
|
|
9
|
+
"pi-extension",
|
|
10
|
+
"pi-tui",
|
|
11
|
+
"terminal-ui",
|
|
12
|
+
"tui"
|
|
11
13
|
],
|
|
12
14
|
"homepage": "https://agimon.ai",
|
|
13
15
|
"license": "MIT",
|
|
@@ -144,8 +146,8 @@
|
|
|
144
146
|
},
|
|
145
147
|
"dependencies": {
|
|
146
148
|
"yaml": "2.9.0",
|
|
147
|
-
"@agimon-ai/doompi-
|
|
148
|
-
"@agimon-ai/doompi-
|
|
149
|
+
"@agimon-ai/doompi-telemetry": "0.0.1-alpha.23",
|
|
150
|
+
"@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.23"
|
|
149
151
|
},
|
|
150
152
|
"devDependencies": {
|
|
151
153
|
"@earendil-works/pi-coding-agent": "0.84.2",
|