@agimon-ai/doompi-ui 0.0.1-alpha.21 → 0.0.1-alpha.22

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 +65 -23
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,43 +1,85 @@
1
1
  # @agimon-ai/doompi-ui
2
2
 
3
- **Space is a menu only when you are not writing.**
3
+ DoomPi's shared terminal interface, Leader Space host, theme, overlays, and UI registries.
4
4
 
5
- This is Doompi's TUI: editor, header, modeline, footer, overlays, theme, and the leader-key
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
- This is part of [Doompi](https://www.npmjs.com/package/@agimon-ai/doompi). Most users get
11
- it with the distribution; install it directly when building a Pi extension against the
12
- Doom UI contracts.
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
- npm install @agimon-ai/doompi-ui
20
+ pi install npm:@agimon-ai/doompi-ui
18
21
  ```
19
22
 
20
- ## How it loads
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 |
21
33
 
22
- Doompi loads the UI as core. It is not a layer and does not appear in `.doom/modes.yaml`.
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.
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
+ }
54
+ ```
25
55
 
26
- ## Leader
56
+ Dispose the returned registration during shutdown so reloads cannot retain stale bindings.
27
57
 
28
- - `SPC` opens the leader map when the draft is empty.
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.
58
+ ## TUI and headless sessions
32
59
 
33
- Conflicts are handled by the registry, so two packages cannot silently claim the same
34
- chord.
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.
61
+
62
+ ## Theme
63
+
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
- The package exposes the leader registry, shared UI state, rendering helpers, tool chrome,
39
- header/footer/editor components, and the Doom Pi dark theme. Use declared exports rather
40
- than reaching into `dist/`; `package.json` carries the complete list.
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
+ ```
41
83
 
42
84
  ## License
43
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/doompi-ui",
3
- "version": "0.0.1-alpha.21",
3
+ "version": "0.0.1-alpha.22",
4
4
  "description": "Doom-inspired interactive UI extension for Pi",
5
5
  "keywords": [
6
6
  "ai",
@@ -144,8 +144,8 @@
144
144
  },
145
145
  "dependencies": {
146
146
  "yaml": "2.9.0",
147
- "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.21",
148
- "@agimon-ai/doompi-telemetry": "0.0.1-alpha.21"
147
+ "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.22",
148
+ "@agimon-ai/doompi-telemetry": "0.0.1-alpha.22"
149
149
  },
150
150
  "devDependencies": {
151
151
  "@earendil-works/pi-coding-agent": "0.84.2",