@agimon-ai/doompi-notification 0.0.1-alpha.5 → 0.0.1-alpha.52
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 +62 -13
- package/llms.txt +2 -2
- package/package.json +43 -12
package/README.md
CHANGED
|
@@ -1,22 +1,62 @@
|
|
|
1
1
|
# @agimon-ai/doompi-notification
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
System and browser notifications, plus an animated shell-tab title, for
|
|
4
4
|
[DoomPi](https://www.npmjs.com/package/@agimon-ai/doompi) sessions.
|
|
5
5
|
|
|
6
|
-
Long agent runs are worth walking away from. This package
|
|
7
|
-
|
|
6
|
+
Long agent runs are worth walking away from. This package owns the shared `doom/notification` service,
|
|
7
|
+
routes each request for the active session, and announces when the agent needs attention.
|
|
8
8
|
|
|
9
9
|
## What it does
|
|
10
10
|
|
|
11
|
-
| Surface |
|
|
12
|
-
| ---------------- |
|
|
13
|
-
| Shell tab title | `π - <session or first prompt> - <repository>`, with a braille spinner while the agent works
|
|
14
|
-
|
|
|
15
|
-
|
|
|
11
|
+
| Surface | Behavior |
|
|
12
|
+
| ---------------- | -------------------------------------------------------------------------------------------- |
|
|
13
|
+
| Shell tab title | `π - <session or first prompt> - <repository>`, with a braille spinner while the agent works |
|
|
14
|
+
| Notification API | caller-authored notices through the shared `doom/notification` Cordis service |
|
|
15
|
+
| Mid-run | one notification for each agent-initiated dialog and each `ask_user_question` prompt |
|
|
16
|
+
| At rest | one notification when a run settles with nothing queued behind it |
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
In an interactive terminal session, requests use `cmux notify` first because it routes them back to
|
|
19
|
+
the session window. On macOS, a missing `cmux` falls back to `osascript`. In RPC mode, requests become
|
|
20
|
+
versioned `doom-notification` session entries for a live client such as `doompi-web`. An RPC append
|
|
21
|
+
failure stays silent and never falls back to a host notifier. Hosts without a supported notifier also
|
|
22
|
+
stay silent.
|
|
23
|
+
|
|
24
|
+
## Service usage
|
|
25
|
+
|
|
26
|
+
Callers should discover the optional service through Cordis and request delivery without depending on
|
|
27
|
+
a particular host:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { DOOM_NOTIFICATION_SERVICE, readDoomNotificationService } from '@agimon-ai/doompi-core/notification';
|
|
31
|
+
|
|
32
|
+
ctx.inject([DOOM_NOTIFICATION_SERVICE], (notificationContext) => {
|
|
33
|
+
void readDoomNotificationService(notificationContext)?.request({
|
|
34
|
+
body: 'Deployment needs approval',
|
|
35
|
+
level: 'warning',
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`body` is required. `title`, `subtitle`, and `level` are optional, and `level` accepts `info`,
|
|
41
|
+
`warning`, or `error`. The router defaults the title to `Pi`, the subtitle to the session name or
|
|
42
|
+
working-directory basename, and the level to `info`. Invalid requests, missing active sessions,
|
|
43
|
+
unavailable providers, and delivery failures are silent so notifications cannot fail an agent turn.
|
|
44
|
+
|
|
45
|
+
The package also wraps Pi's broad `ui.notify(message, level)` API while active, so existing extensions
|
|
46
|
+
use the same route without changing their calls. If this package is muted or the process is a detached
|
|
47
|
+
subagent child, it does not install that wrapper and Pi's original `ui.notify` behavior remains.
|
|
48
|
+
|
|
49
|
+
## Browser delivery
|
|
50
|
+
|
|
51
|
+
`doompi-web` shows full notification text only for entries received by a currently open page. Every connected
|
|
52
|
+
page receives live notification entries for every attached session, not only the focused session. Permission
|
|
53
|
+
is requested only from an explicit settings action.
|
|
54
|
+
|
|
55
|
+
A paired installed PWA may also opt into live Web Push while closed. That payload is fixed generic copy with
|
|
56
|
+
`TTL: 0`; it contains no session, prompt, response, or file data. The host keeps subscriptions only in memory,
|
|
57
|
+
so there is no durable database, outbox, replay, or delivery of historical entries. The open app re-registers
|
|
58
|
+
a browser-held subscription after a host restart. Device revocation or expiry, remote shutdown, browser
|
|
59
|
+
disable, and expired provider endpoints remove the live subscription.
|
|
20
60
|
|
|
21
61
|
## The shell title
|
|
22
62
|
|
|
@@ -29,8 +69,8 @@ escape sequences never end up in machine-read output.
|
|
|
29
69
|
|
|
30
70
|
## Quiet by design
|
|
31
71
|
|
|
32
|
-
- A detached subagent (`PI_SUBAGENT_CHILD`)
|
|
33
|
-
desktop, and a second voice reporting the same run is noise.
|
|
72
|
+
- A detached subagent (`PI_SUBAGENT_CHILD`) does not register this package's service or wrappers. It
|
|
73
|
+
shares its parent's terminal and desktop, and a second voice reporting the same run is noise.
|
|
34
74
|
- Dialogs only notify while the agent holds the turn. A dialog the user opened is already in front
|
|
35
75
|
of them.
|
|
36
76
|
- An `ask_user_question` prompt notifies from its own event, and the dialog it then opens stays
|
|
@@ -42,6 +82,15 @@ escape sequences never end up in machine-read output.
|
|
|
42
82
|
DoomPi depends on this package and activates it as fixed host core, so a DoomPi install already has
|
|
43
83
|
it. It is not selectable from `.doom/modes.yaml`.
|
|
44
84
|
|
|
85
|
+
The Pi and server loaders use `/extensions/pi` and `/extensions/server`, built directly from
|
|
86
|
+
`src/extensions`. The root export contains reusable notification helpers and types.
|
|
87
|
+
Controllers own delivery and UI integration; policy and text services live in named service folders.
|
|
88
|
+
|
|
89
|
+
The Pi declaration installs its router and optional session binding before handling events.
|
|
90
|
+
`onStop` restores the original UI methods and shell title before service registrations are removed.
|
|
91
|
+
`onDispose` provides the same cleanup after partial startup. Detached children return before
|
|
92
|
+
acquiring a Cordis connection, leaving notification ownership with the parent.
|
|
93
|
+
|
|
45
94
|
## License
|
|
46
95
|
|
|
47
96
|
MIT
|
package/llms.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Doom Pi Notification
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Shared notification routing, browser and system delivery, and an animated shell-tab title for Doom Pi sessions.
|
|
4
4
|
|
|
5
5
|
## Resources
|
|
6
6
|
|
|
7
|
-
- [Package README](./README.md):
|
|
7
|
+
- [Package README](./README.md): public `doom/notification` service usage, request defaults, RPC and interactive delivery, live-page browser permission behavior, shell-title animation, and silent fallback rules.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/doompi-notification",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.52",
|
|
4
4
|
"description": "Desktop notifications and an animated shell-tab title for DoomPi sessions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -16,8 +16,16 @@
|
|
|
16
16
|
"terminal-title"
|
|
17
17
|
],
|
|
18
18
|
"homepage": "https://agimon.ai",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/AgiFlow/doompi/issues"
|
|
21
|
+
},
|
|
19
22
|
"license": "MIT",
|
|
20
23
|
"author": "Vuong Ngo",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/AgiFlow/doompi.git",
|
|
27
|
+
"directory": "packages/foundations/doompi-notification"
|
|
28
|
+
},
|
|
21
29
|
"files": [
|
|
22
30
|
"dist",
|
|
23
31
|
"llms.txt",
|
|
@@ -27,7 +35,8 @@
|
|
|
27
35
|
],
|
|
28
36
|
"type": "module",
|
|
29
37
|
"main": "./dist/index.cjs",
|
|
30
|
-
"
|
|
38
|
+
"module": "./dist/index.mjs",
|
|
39
|
+
"types": "./dist/index.d.cts",
|
|
31
40
|
"jsnext:main": "./dist/index.mjs",
|
|
32
41
|
"exports": {
|
|
33
42
|
".": {
|
|
@@ -35,31 +44,42 @@
|
|
|
35
44
|
"import": "./dist/index.mjs",
|
|
36
45
|
"require": "./dist/index.cjs"
|
|
37
46
|
},
|
|
47
|
+
"./api-contracts": {
|
|
48
|
+
"types": "./dist/api-contracts.d.mts",
|
|
49
|
+
"import": "./dist/api-contracts.mjs",
|
|
50
|
+
"require": "./dist/api-contracts.cjs"
|
|
51
|
+
},
|
|
38
52
|
"./extensions/pi": {
|
|
39
53
|
"types": "./dist/extensions/pi.d.mts",
|
|
40
54
|
"import": "./dist/extensions/pi.mjs",
|
|
41
55
|
"require": "./dist/extensions/pi.cjs"
|
|
42
56
|
},
|
|
57
|
+
"./extensions/server": {
|
|
58
|
+
"types": "./dist/extensions/server.d.mts",
|
|
59
|
+
"import": "./dist/extensions/server.mjs",
|
|
60
|
+
"require": "./dist/extensions/server.cjs"
|
|
61
|
+
},
|
|
43
62
|
"./package.json": "./package.json"
|
|
44
63
|
},
|
|
45
64
|
"publishConfig": {
|
|
46
65
|
"access": "public"
|
|
47
66
|
},
|
|
48
67
|
"dependencies": {
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
68
|
+
"@agimon-ai/doompi-core": "0.0.1-alpha.75",
|
|
69
|
+
"@deepseek-ai/cordis": "4.0.2"
|
|
51
70
|
},
|
|
52
71
|
"devDependencies": {
|
|
53
|
-
"@agimon-ai/
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
72
|
+
"@agimon-ai/doompi-build": "0.0.1-alpha.4",
|
|
73
|
+
"@agimon-ai/vibe-lint-plugin-doom-extension": "0.0.1-alpha.70",
|
|
74
|
+
"@earendil-works/pi-coding-agent": "0.85.1",
|
|
75
|
+
"@types/node": "26.5.1",
|
|
76
|
+
"@vitest/coverage-v8": "5.0.0",
|
|
77
|
+
"tsdown": "0.23.0",
|
|
78
|
+
"typescript": "7.0.2",
|
|
79
|
+
"vitest": "5.0.0"
|
|
60
80
|
},
|
|
61
81
|
"peerDependencies": {
|
|
62
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
82
|
+
"@earendil-works/pi-coding-agent": "0.85.1"
|
|
63
83
|
},
|
|
64
84
|
"peerDependenciesMeta": {
|
|
65
85
|
"@earendil-works/pi-coding-agent": {
|
|
@@ -69,6 +89,17 @@
|
|
|
69
89
|
"engines": {
|
|
70
90
|
"node": ">=22.19.0"
|
|
71
91
|
},
|
|
92
|
+
"doompiServer": {
|
|
93
|
+
"entry": "./generated/server.ts",
|
|
94
|
+
"dist": "./dist/extensions/server.mjs",
|
|
95
|
+
"scopes": [
|
|
96
|
+
"session"
|
|
97
|
+
],
|
|
98
|
+
"contracts": {
|
|
99
|
+
"entry": "./src/exports/apiContracts.ts",
|
|
100
|
+
"dist": "./dist/api-contracts.mjs"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
72
103
|
"pi": {
|
|
73
104
|
"extensions": [
|
|
74
105
|
"./dist/extensions/pi.mjs"
|