@agimon-ai/doompi-notification 0.0.1-alpha.5 → 0.0.1-alpha.50
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/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/api-contracts.cjs +7 -0
- package/dist/api-contracts.d.cts +2 -0
- package/dist/api-contracts.d.mts +2 -0
- package/dist/api-contracts.mjs +2 -0
- package/dist/extensions/pi.cjs +37 -0
- package/dist/extensions/pi.cjs.map +1 -0
- package/dist/extensions/pi.d.cts +6 -0
- package/dist/extensions/pi.d.cts.map +1 -0
- package/dist/extensions/pi.d.mts +6 -0
- package/dist/extensions/pi.d.mts.map +1 -0
- package/dist/extensions/pi.mjs +32 -0
- package/dist/extensions/pi.mjs.map +1 -0
- package/dist/extensions/server.cjs +23 -0
- package/dist/extensions/server.cjs.map +1 -0
- package/dist/extensions/server.d.cts +5 -0
- package/dist/extensions/server.d.cts.map +1 -0
- package/dist/extensions/server.d.mts +5 -0
- package/dist/extensions/server.d.mts.map +1 -0
- package/dist/extensions/server.mjs +18 -0
- package/dist/extensions/server.mjs.map +1 -0
- package/dist/index.cjs +17 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.mjs +5 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/notificationCommand.cjs +16 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/notificationCommand.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/notificationCommand.mjs +17 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/notificationCommand.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/notify.server.cjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/notify.server.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/notify.server.mjs +8 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/notify.server.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli.cjs +6 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli.mjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli.cjs +6 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli.mjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/input.cli.cjs +6 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/input.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/input.cli.mjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/input.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.cjs +6 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.mjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.cjs +23 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.mjs +23 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.mjs.map +1 -0
- package/dist/src/schemas/apiContracts.cjs +13 -0
- package/dist/src/schemas/apiContracts.cjs.map +1 -0
- package/dist/src/schemas/apiContracts.d.cts +53 -0
- package/dist/src/schemas/apiContracts.d.cts.map +1 -0
- package/dist/src/schemas/apiContracts.d.mts +53 -0
- package/dist/src/schemas/apiContracts.d.mts.map +1 -0
- package/dist/src/schemas/apiContracts.mjs +13 -0
- package/dist/src/schemas/apiContracts.mjs.map +1 -0
- package/dist/src/services/notificationPolicy/index.cjs +32 -0
- package/dist/src/services/notificationPolicy/index.cjs.map +1 -0
- package/dist/src/services/notificationPolicy/index.d.cts +27 -0
- package/dist/src/services/notificationPolicy/index.d.cts.map +1 -0
- package/dist/src/services/notificationPolicy/index.d.mts +27 -0
- package/dist/src/services/notificationPolicy/index.d.mts.map +1 -0
- package/dist/src/services/notificationPolicy/index.mjs +29 -0
- package/dist/src/services/notificationPolicy/index.mjs.map +1 -0
- package/dist/src/services/notificationRouter/index.cjs +43 -0
- package/dist/src/services/notificationRouter/index.cjs.map +1 -0
- package/dist/src/services/notificationRouter/index.mjs +41 -0
- package/dist/src/services/notificationRouter/index.mjs.map +1 -0
- package/dist/src/services/notificationRuntime/index.cjs +190 -0
- package/dist/src/services/notificationRuntime/index.cjs.map +1 -0
- package/dist/src/services/notificationRuntime/index.mjs +190 -0
- package/dist/src/services/notificationRuntime/index.mjs.map +1 -0
- package/dist/src/services/notificationText/index.cjs +63 -0
- package/dist/src/services/notificationText/index.cjs.map +1 -0
- package/dist/src/services/notificationText/index.d.cts +27 -0
- package/dist/src/services/notificationText/index.d.cts.map +1 -0
- package/dist/src/services/notificationText/index.d.mts +27 -0
- package/dist/src/services/notificationText/index.d.mts.map +1 -0
- package/dist/src/services/notificationText/index.mjs +57 -0
- package/dist/src/services/notificationText/index.mjs.map +1 -0
- package/dist/src/services/shellTitleController/index.cjs +149 -0
- package/dist/src/services/shellTitleController/index.cjs.map +1 -0
- package/dist/src/services/shellTitleController/index.d.cts +12 -0
- package/dist/src/services/shellTitleController/index.d.cts.map +1 -0
- package/dist/src/services/shellTitleController/index.d.mts +12 -0
- package/dist/src/services/shellTitleController/index.d.mts.map +1 -0
- package/dist/src/services/shellTitleController/index.mjs +148 -0
- package/dist/src/services/shellTitleController/index.mjs.map +1 -0
- package/dist/src/services/systemNotification/index.cjs +48 -0
- package/dist/src/services/systemNotification/index.cjs.map +1 -0
- package/dist/src/services/systemNotification/index.d.cts +12 -0
- package/dist/src/services/systemNotification/index.d.cts.map +1 -0
- package/dist/src/services/systemNotification/index.d.mts +12 -0
- package/dist/src/services/systemNotification/index.d.mts.map +1 -0
- package/dist/src/services/systemNotification/index.mjs +48 -0
- package/dist/src/services/systemNotification/index.mjs.map +1 -0
- package/dist/src/types/notifications.d.cts +44 -0
- package/dist/src/types/notifications.d.cts.map +1 -0
- package/dist/src/types/notifications.d.mts +44 -0
- package/dist/src/types/notifications.d.mts.map +1 -0
- 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
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.__toESM = __toESM;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_apiContracts = require("./src/schemas/apiContracts.cjs");
|
|
6
|
+
exports.apiContracts = require_apiContracts.apiContracts;
|
|
7
|
+
exports.default = require_apiContracts.apiContracts;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_root_cli = require("../src/extensions/workspaces/sessions/(backend)/root.cli.cjs");
|
|
6
|
+
const require_agentSettled_cli = require("../src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli.cjs");
|
|
7
|
+
const require_agentStart_cli = require("../src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli.cjs");
|
|
8
|
+
const require_input_cli = require("../src/extensions/workspaces/sessions/(backend)/hook/input.cli.cjs");
|
|
9
|
+
const require_sessionStart_cli = require("../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.cjs");
|
|
10
|
+
let _agimon_ai_doompi_core_pi_extension = require("@agimon-ai/doompi-core/pi-extension");
|
|
11
|
+
let _agimon_ai_doompi_core_extension_file = require("@agimon-ai/doompi-core/extension-file");
|
|
12
|
+
//#region generated/pi.ts
|
|
13
|
+
const at = (value, context) => typeof value === "function" ? value(context) : value;
|
|
14
|
+
/* v8 ignore next -- generated normalization branch */
|
|
15
|
+
const keyed = (key, value) => value === void 0 ? {} : { [key]: value };
|
|
16
|
+
const extension = (0, _agimon_ai_doompi_core_pi_extension.definePiExtension)("@agimon-ai/doompi-notification", async (context) => {
|
|
17
|
+
const scopeSession = await require_root_cli.default(context);
|
|
18
|
+
const contextSession = {
|
|
19
|
+
...context,
|
|
20
|
+
root: scopeSession.value
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
...(0, _agimon_ai_doompi_core_extension_file.composeRootHooks)(scopeSession),
|
|
24
|
+
events: {
|
|
25
|
+
...keyed("agent_settled", at(require_agentSettled_cli.default, contextSession)),
|
|
26
|
+
...keyed("agent_start", at(require_agentStart_cli.default, contextSession)),
|
|
27
|
+
...keyed("input", at(require_input_cli.default, contextSession)),
|
|
28
|
+
...keyed("session_start", at(require_sessionStart_cli.default, contextSession))
|
|
29
|
+
},
|
|
30
|
+
services: [...scopeSession.services ?? []]
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
//#endregion
|
|
34
|
+
exports.default = extension;
|
|
35
|
+
exports.extension = extension;
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=pi.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pi.cjs","names":["definePiExtension","rootSession","composeRootHooks","hookAgentSettled","hookAgentStart","hookInput","hookSessionStart"],"sources":["../../generated/pi.ts"],"sourcesContent":["// Generated by @agimon-ai/doompi-build. Do not edit by hand.\nimport { definePiExtension, type PiPluginContext, type PiPluginContributions } from '@agimon-ai/doompi-core/pi-extension';\nimport { composeRootHooks } from '@agimon-ai/doompi-core/extension-file';\n\nimport rootSession from '../src/extensions/workspaces/sessions/(backend)/root.cli';\nimport hookAgentSettled from '../src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli';\nimport hookAgentStart from '../src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli';\nimport hookInput from '../src/extensions/workspaces/sessions/(backend)/hook/input.cli';\nimport hookSessionStart from '../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli';\n\ntype OptionsOf<T> = T extends (context: PiPluginContext<infer Options>) => unknown ? Options : never;\ntype InferredOptions = Exclude<OptionsOf<typeof rootSession> | OptionsOf<typeof hookAgentSettled> | OptionsOf<typeof hookAgentStart> | OptionsOf<typeof hookInput> | OptionsOf<typeof hookSessionStart>, undefined>;\ntype Intersect<Union> =\n (Union extends unknown ? (value: Union) => void : never) extends (value: infer Value) => void ? Value : never;\ntype ExtensionOptions = [InferredOptions] extends [never] ? undefined : Intersect<InferredOptions>;\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\n/* v8 ignore next -- generated normalization branch */\nconst keyed = <T>(key: string, value: T | undefined): Record<string, T> =>\n value === undefined ? {} : { [key]: value };\n\nexport const extension = definePiExtension<ExtensionOptions>('@agimon-ai/doompi-notification', async (context) => {\n const scopeSession = await rootSession(context);\n const contextSession = { ...context, root: scopeSession.value };\n return {\n ...composeRootHooks(scopeSession),\n events: {\n ...keyed('agent_settled', at(hookAgentSettled, contextSession) as NonNullable<PiPluginContributions['events']>['agent_settled']),\n ...keyed('agent_start', at(hookAgentStart, contextSession) as NonNullable<PiPluginContributions['events']>['agent_start']),\n ...keyed('input', at(hookInput, contextSession) as NonNullable<PiPluginContributions['events']>['input']),\n ...keyed('session_start', at(hookSessionStart, contextSession) as NonNullable<PiPluginContributions['events']>['session_start']),\n },\n services: [...(scopeSession.services ?? [])],\n };\n});\n\nexport default extension;\n"],"mappings":";;;;;;;;;;;;AAiBA,MAAM,MAAY,OAA0B,YAC1C,OAAO,UAAU,aAAc,MAAwB,OAAO,IAAI;;AAEpE,MAAM,SAAY,KAAa,UAC7B,UAAU,KAAA,IAAY,CAAC,IAAI,GAAG,MAAM,MAAM;AAE5C,MAAa,aAAA,GAAYA,oCAAAA,kBAAAA,CAAoC,kCAAkC,OAAO,YAAY;CAChH,MAAM,eAAe,MAAMC,iBAAAA,QAAY,OAAO;CAC9C,MAAM,iBAAiB;EAAE,GAAG;EAAS,MAAM,aAAa;CAAM;CAC9D,OAAO;EACL,IAAA,GAAGC,sCAAAA,iBAAAA,CAAiB,YAAY;EAChC,QAAQ;GACN,GAAG,MAAM,iBAAiB,GAAGC,yBAAAA,SAAkB,cAAc,CAAkE;GAC/H,GAAG,MAAM,eAAe,GAAGC,uBAAAA,SAAgB,cAAc,CAAgE;GACzH,GAAG,MAAM,SAAS,GAAGC,kBAAAA,SAAW,cAAc,CAA0D;GACxG,GAAG,MAAM,iBAAiB,GAAGC,yBAAAA,SAAkB,cAAc,CAAkE;EACjI;EACA,UAAU,CAAC,GAAI,aAAa,YAAY,CAAC,CAAE;CAC7C;AACF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { NotificationExtensionOptions } from "../src/types/notifications.cjs";
|
|
2
|
+
//#region generated/pi.d.ts
|
|
3
|
+
export declare const extension: import("@agimon-ai/doompi-core/runtime-pi-extension").DefinedPiExtension<NotificationExtensionOptions>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { extension as default };
|
|
6
|
+
//# sourceMappingURL=pi.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pi.d.cts","names":[],"sources":["../../generated/pi.ts"],"mappings":";;qBAuBa,iEAAS,mBAAT"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { NotificationExtensionOptions } from "../src/types/notifications.mjs";
|
|
2
|
+
//#region generated/pi.d.ts
|
|
3
|
+
export declare const extension: import("@agimon-ai/doompi-core/runtime-pi-extension").DefinedPiExtension<NotificationExtensionOptions>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { extension as default };
|
|
6
|
+
//# sourceMappingURL=pi.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pi.d.mts","names":[],"sources":["../../generated/pi.ts"],"mappings":";;qBAuBa,iEAAS,mBAAT"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import root_cli_default from "../src/extensions/workspaces/sessions/(backend)/root.cli.mjs";
|
|
2
|
+
import agentSettled_cli_default from "../src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli.mjs";
|
|
3
|
+
import agentStart_cli_default from "../src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli.mjs";
|
|
4
|
+
import input_cli_default from "../src/extensions/workspaces/sessions/(backend)/hook/input.cli.mjs";
|
|
5
|
+
import sessionStart_cli_default from "../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.mjs";
|
|
6
|
+
import { definePiExtension } from "@agimon-ai/doompi-core/pi-extension";
|
|
7
|
+
import { composeRootHooks } from "@agimon-ai/doompi-core/extension-file";
|
|
8
|
+
//#region generated/pi.ts
|
|
9
|
+
const at = (value, context) => typeof value === "function" ? value(context) : value;
|
|
10
|
+
/* v8 ignore next -- generated normalization branch */
|
|
11
|
+
const keyed = (key, value) => value === void 0 ? {} : { [key]: value };
|
|
12
|
+
const extension = definePiExtension("@agimon-ai/doompi-notification", async (context) => {
|
|
13
|
+
const scopeSession = await root_cli_default(context);
|
|
14
|
+
const contextSession = {
|
|
15
|
+
...context,
|
|
16
|
+
root: scopeSession.value
|
|
17
|
+
};
|
|
18
|
+
return {
|
|
19
|
+
...composeRootHooks(scopeSession),
|
|
20
|
+
events: {
|
|
21
|
+
...keyed("agent_settled", at(agentSettled_cli_default, contextSession)),
|
|
22
|
+
...keyed("agent_start", at(agentStart_cli_default, contextSession)),
|
|
23
|
+
...keyed("input", at(input_cli_default, contextSession)),
|
|
24
|
+
...keyed("session_start", at(sessionStart_cli_default, contextSession))
|
|
25
|
+
},
|
|
26
|
+
services: [...scopeSession.services ?? []]
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
//#endregion
|
|
30
|
+
export { extension as default, extension };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=pi.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pi.mjs","names":["rootSession","hookAgentSettled","hookAgentStart","hookInput","hookSessionStart"],"sources":["../../generated/pi.ts"],"sourcesContent":["// Generated by @agimon-ai/doompi-build. Do not edit by hand.\nimport { definePiExtension, type PiPluginContext, type PiPluginContributions } from '@agimon-ai/doompi-core/pi-extension';\nimport { composeRootHooks } from '@agimon-ai/doompi-core/extension-file';\n\nimport rootSession from '../src/extensions/workspaces/sessions/(backend)/root.cli';\nimport hookAgentSettled from '../src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli';\nimport hookAgentStart from '../src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli';\nimport hookInput from '../src/extensions/workspaces/sessions/(backend)/hook/input.cli';\nimport hookSessionStart from '../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli';\n\ntype OptionsOf<T> = T extends (context: PiPluginContext<infer Options>) => unknown ? Options : never;\ntype InferredOptions = Exclude<OptionsOf<typeof rootSession> | OptionsOf<typeof hookAgentSettled> | OptionsOf<typeof hookAgentStart> | OptionsOf<typeof hookInput> | OptionsOf<typeof hookSessionStart>, undefined>;\ntype Intersect<Union> =\n (Union extends unknown ? (value: Union) => void : never) extends (value: infer Value) => void ? Value : never;\ntype ExtensionOptions = [InferredOptions] extends [never] ? undefined : Intersect<InferredOptions>;\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\n/* v8 ignore next -- generated normalization branch */\nconst keyed = <T>(key: string, value: T | undefined): Record<string, T> =>\n value === undefined ? {} : { [key]: value };\n\nexport const extension = definePiExtension<ExtensionOptions>('@agimon-ai/doompi-notification', async (context) => {\n const scopeSession = await rootSession(context);\n const contextSession = { ...context, root: scopeSession.value };\n return {\n ...composeRootHooks(scopeSession),\n events: {\n ...keyed('agent_settled', at(hookAgentSettled, contextSession) as NonNullable<PiPluginContributions['events']>['agent_settled']),\n ...keyed('agent_start', at(hookAgentStart, contextSession) as NonNullable<PiPluginContributions['events']>['agent_start']),\n ...keyed('input', at(hookInput, contextSession) as NonNullable<PiPluginContributions['events']>['input']),\n ...keyed('session_start', at(hookSessionStart, contextSession) as NonNullable<PiPluginContributions['events']>['session_start']),\n },\n services: [...(scopeSession.services ?? [])],\n };\n});\n\nexport default extension;\n"],"mappings":";;;;;;;;AAiBA,MAAM,MAAY,OAA0B,YAC1C,OAAO,UAAU,aAAc,MAAwB,OAAO,IAAI;;AAEpE,MAAM,SAAY,KAAa,UAC7B,UAAU,KAAA,IAAY,CAAC,IAAI,GAAG,MAAM,MAAM;AAE5C,MAAa,YAAY,kBAAoC,kCAAkC,OAAO,YAAY;CAChH,MAAM,eAAe,MAAMA,iBAAY,OAAO;CAC9C,MAAM,iBAAiB;EAAE,GAAG;EAAS,MAAM,aAAa;CAAM;CAC9D,OAAO;EACL,GAAG,iBAAiB,YAAY;EAChC,QAAQ;GACN,GAAG,MAAM,iBAAiB,GAAGC,0BAAkB,cAAc,CAAkE;GAC/H,GAAG,MAAM,eAAe,GAAGC,wBAAgB,cAAc,CAAgE;GACzH,GAAG,MAAM,SAAS,GAAGC,mBAAW,cAAc,CAA0D;GACxG,GAAG,MAAM,iBAAiB,GAAGC,0BAAkB,cAAc,CAAkE;EACjI;EACA,UAAU,CAAC,GAAI,aAAa,YAAY,CAAC,CAAE;CAC7C;AACF,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_notify_server = require("../src/extensions/workspaces/sessions/(backend)/command/notify.server.cjs");
|
|
6
|
+
let _agimon_ai_doompi_core_server_facet = require("@agimon-ai/doompi-core/server-facet");
|
|
7
|
+
//#region generated/server.ts
|
|
8
|
+
const at = (value, context) => typeof value === "function" ? value(context) : value;
|
|
9
|
+
const via = (identity, value) => ({
|
|
10
|
+
...identity,
|
|
11
|
+
...value
|
|
12
|
+
});
|
|
13
|
+
const facet = (0, _agimon_ai_doompi_core_server_facet.defineServerPlugin)({
|
|
14
|
+
name: "@agimon-ai/doompi-notification",
|
|
15
|
+
session: (context) => ({ get commands() {
|
|
16
|
+
return [via({ name: "notify" }, at(require_notify_server.default, context))];
|
|
17
|
+
} })
|
|
18
|
+
});
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.default = facet;
|
|
21
|
+
exports.facet = facet;
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=server.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.cjs","names":["defineServerPlugin","commandNotify"],"sources":["../../generated/server.ts"],"sourcesContent":["// Generated by @agimon-ai/doompi-build. Do not edit by hand.\nimport { defineServerPlugin, type DoomServerSessionPlugin } from '@agimon-ai/doompi-core/server-facet';\n\nimport commandNotify from '../src/extensions/workspaces/sessions/(backend)/command/notify.server';\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T => ({ ...identity, ...(value as object) }) as T;\n\nexport const facet = defineServerPlugin({\n name: '@agimon-ai/doompi-notification',\n session: (context) => ({\n get commands(): DoomServerSessionPlugin['commands'] { return [via({ name: 'notify' }, at(commandNotify, context))]; },\n }),\n});\n\nexport default facet;\n"],"mappings":";;;;;;;AAMA,MAAM,MAAY,OAA0B,YAC1C,OAAO,UAAU,aAAc,MAAwB,OAAO,IAAI;AACpE,MAAM,OAAU,UAAmC,WAAuB;CAAE,GAAG;CAAU,GAAI;AAAiB;AAE9G,MAAa,SAAA,GAAQA,oCAAAA,mBAAAA,CAAmB;CACtC,MAAM;CACN,UAAU,aAAa,EACrB,IAAI,WAAgD;EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,SAAS,GAAG,GAAGC,sBAAAA,SAAe,OAAO,CAAC,CAAC;CAAG,EACtH;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.cts","names":[],"sources":["../../generated/server.ts"],"mappings":";qBAUa,qDAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.mts","names":[],"sources":["../../generated/server.ts"],"mappings":";qBAUa,qDAAK"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import notify_server_default from "../src/extensions/workspaces/sessions/(backend)/command/notify.server.mjs";
|
|
2
|
+
import { defineServerPlugin } from "@agimon-ai/doompi-core/server-facet";
|
|
3
|
+
//#region generated/server.ts
|
|
4
|
+
const at = (value, context) => typeof value === "function" ? value(context) : value;
|
|
5
|
+
const via = (identity, value) => ({
|
|
6
|
+
...identity,
|
|
7
|
+
...value
|
|
8
|
+
});
|
|
9
|
+
const facet = defineServerPlugin({
|
|
10
|
+
name: "@agimon-ai/doompi-notification",
|
|
11
|
+
session: (context) => ({ get commands() {
|
|
12
|
+
return [via({ name: "notify" }, at(notify_server_default, context))];
|
|
13
|
+
} })
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { facet as default, facet };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=server.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.mjs","names":["commandNotify"],"sources":["../../generated/server.ts"],"sourcesContent":["// Generated by @agimon-ai/doompi-build. Do not edit by hand.\nimport { defineServerPlugin, type DoomServerSessionPlugin } from '@agimon-ai/doompi-core/server-facet';\n\nimport commandNotify from '../src/extensions/workspaces/sessions/(backend)/command/notify.server';\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T => ({ ...identity, ...(value as object) }) as T;\n\nexport const facet = defineServerPlugin({\n name: '@agimon-ai/doompi-notification',\n session: (context) => ({\n get commands(): DoomServerSessionPlugin['commands'] { return [via({ name: 'notify' }, at(commandNotify, context))]; },\n }),\n});\n\nexport default facet;\n"],"mappings":";;;AAMA,MAAM,MAAY,OAA0B,YAC1C,OAAO,UAAU,aAAc,MAAwB,OAAO,IAAI;AACpE,MAAM,OAAU,UAAmC,WAAuB;CAAE,GAAG;CAAU,GAAI;AAAiB;AAE9G,MAAa,QAAQ,mBAAmB;CACtC,MAAM;CACN,UAAU,aAAa,EACrB,IAAI,WAAgD;EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,SAAS,GAAG,GAAGA,uBAAe,OAAO,CAAC,CAAC;CAAG,EACtH;AACF,CAAC"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_index = require("./src/services/shellTitleController/index.cjs");
|
|
3
|
+
const require_index$1 = require("./src/services/notificationText/index.cjs");
|
|
4
|
+
const require_index$2 = require("./src/services/systemNotification/index.cjs");
|
|
5
|
+
const require_index$3 = require("./src/services/notificationPolicy/index.cjs");
|
|
6
|
+
exports.askUserPromptBody = require_index$3.askUserPromptBody;
|
|
7
|
+
exports.attentionNotification = require_index$1.attentionNotification;
|
|
8
|
+
exports.createMainThreadTitleController = require_index.createMainThreadTitleController;
|
|
9
|
+
exports.createWorkerTitleController = require_index.createWorkerTitleController;
|
|
10
|
+
exports.notificationBody = require_index$1.notificationBody;
|
|
11
|
+
exports.promptTitle = require_index$1.promptTitle;
|
|
12
|
+
exports.sendSystemNotification = require_index$2.sendSystemNotification;
|
|
13
|
+
exports.settledNotification = require_index$1.settledNotification;
|
|
14
|
+
exports.shellTabTitle = require_index$1.shellTabTitle;
|
|
15
|
+
exports.supportsShellTitle = require_index$3.supportsShellTitle;
|
|
16
|
+
exports.warrantsAttentionNotification = require_index$3.warrantsAttentionNotification;
|
|
17
|
+
exports.warrantsSettledNotification = require_index$3.warrantsSettledNotification;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DesktopNotification, NotificationExtensionOptions, ShellTitleAction, ShellTitleCommand, ShellTitleController, WriteTitle } from "./src/types/notifications.cjs";
|
|
2
|
+
import { createMainThreadTitleController, createWorkerTitleController } from "./src/services/shellTitleController/index.cjs";
|
|
3
|
+
import { sendSystemNotification } from "./src/services/systemNotification/index.cjs";
|
|
4
|
+
import { AttentionState, ShellSurface, askUserPromptBody, supportsShellTitle, warrantsAttentionNotification, warrantsSettledNotification } from "./src/services/notificationPolicy/index.cjs";
|
|
5
|
+
import { ShellTabTitleInput, attentionNotification, notificationBody, promptTitle, settledNotification, shellTabTitle } from "./src/services/notificationText/index.cjs";
|
|
6
|
+
export { type AttentionState, type DesktopNotification, type NotificationExtensionOptions, type ShellSurface, type ShellTabTitleInput, type ShellTitleAction, type ShellTitleCommand, type ShellTitleController, type WriteTitle, askUserPromptBody, attentionNotification, createMainThreadTitleController, createWorkerTitleController, notificationBody, promptTitle, sendSystemNotification, settledNotification, shellTabTitle, supportsShellTitle, warrantsAttentionNotification, warrantsSettledNotification };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DesktopNotification, NotificationExtensionOptions, ShellTitleAction, ShellTitleCommand, ShellTitleController, WriteTitle } from "./src/types/notifications.mjs";
|
|
2
|
+
import { createMainThreadTitleController, createWorkerTitleController } from "./src/services/shellTitleController/index.mjs";
|
|
3
|
+
import { sendSystemNotification } from "./src/services/systemNotification/index.mjs";
|
|
4
|
+
import { AttentionState, ShellSurface, askUserPromptBody, supportsShellTitle, warrantsAttentionNotification, warrantsSettledNotification } from "./src/services/notificationPolicy/index.mjs";
|
|
5
|
+
import { ShellTabTitleInput, attentionNotification, notificationBody, promptTitle, settledNotification, shellTabTitle } from "./src/services/notificationText/index.mjs";
|
|
6
|
+
export { type AttentionState, type DesktopNotification, type NotificationExtensionOptions, type ShellSurface, type ShellTabTitleInput, type ShellTitleAction, type ShellTitleCommand, type ShellTitleController, type WriteTitle, askUserPromptBody, attentionNotification, createMainThreadTitleController, createWorkerTitleController, notificationBody, promptTitle, sendSystemNotification, settledNotification, shellTabTitle, supportsShellTitle, warrantsAttentionNotification, warrantsSettledNotification };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createMainThreadTitleController, createWorkerTitleController } from "./src/services/shellTitleController/index.mjs";
|
|
2
|
+
import { attentionNotification, notificationBody, promptTitle, settledNotification, shellTabTitle } from "./src/services/notificationText/index.mjs";
|
|
3
|
+
import { sendSystemNotification } from "./src/services/systemNotification/index.mjs";
|
|
4
|
+
import { askUserPromptBody, supportsShellTitle, warrantsAttentionNotification, warrantsSettledNotification } from "./src/services/notificationPolicy/index.mjs";
|
|
5
|
+
export { askUserPromptBody, attentionNotification, createMainThreadTitleController, createWorkerTitleController, notificationBody, promptTitle, sendSystemNotification, settledNotification, shellTabTitle, supportsShellTitle, warrantsAttentionNotification, warrantsSettledNotification };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/extensions/workspaces/sessions/(backend)/_lib/notificationCommand.ts
|
|
2
|
+
const notificationCommand = (0, require("@agimon-ai/doompi-core/server-facet").defineCommand)({
|
|
3
|
+
name: "notify",
|
|
4
|
+
description: "Send a notification through the active headless client.",
|
|
5
|
+
async execute(args, execution) {
|
|
6
|
+
const body = args.trim();
|
|
7
|
+
if (body) await execution.notify({
|
|
8
|
+
body,
|
|
9
|
+
level: "info"
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
exports.notificationCommand = notificationCommand;
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=notificationCommand.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notificationCommand.cjs","names":["defineCommand"],"sources":["../../../../../../../src/extensions/workspaces/sessions/(backend)/_lib/notificationCommand.ts"],"sourcesContent":["import { defineCommand } from '@agimon-ai/doompi-core/server-facet';\n\nexport const notificationCommand = defineCommand({\n name: 'notify',\n description: 'Send a notification through the active headless client.',\n async execute(args, execution) {\n const body = args.trim();\n if (body) await execution.notify({ body, level: 'info' });\n },\n});\n"],"mappings":";AAEA,MAAa,uBAAA,gDAAsBA,CAAAA,CAAAA,cAAAA,CAAc;CAC/C,MAAM;CACN,aAAa;CACb,MAAM,QAAQ,MAAM,WAAW;EAC7B,MAAM,OAAO,KAAK,KAAK;EACvB,IAAI,MAAM,MAAM,UAAU,OAAO;GAAE;GAAM,OAAO;EAAO,CAAC;CAC1D;AACF,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineCommand } from "@agimon-ai/doompi-core/server-facet";
|
|
2
|
+
//#region src/extensions/workspaces/sessions/(backend)/_lib/notificationCommand.ts
|
|
3
|
+
const notificationCommand = defineCommand({
|
|
4
|
+
name: "notify",
|
|
5
|
+
description: "Send a notification through the active headless client.",
|
|
6
|
+
async execute(args, execution) {
|
|
7
|
+
const body = args.trim();
|
|
8
|
+
if (body) await execution.notify({
|
|
9
|
+
body,
|
|
10
|
+
level: "info"
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { notificationCommand };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=notificationCommand.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notificationCommand.mjs","names":[],"sources":["../../../../../../../src/extensions/workspaces/sessions/(backend)/_lib/notificationCommand.ts"],"sourcesContent":["import { defineCommand } from '@agimon-ai/doompi-core/server-facet';\n\nexport const notificationCommand = defineCommand({\n name: 'notify',\n description: 'Send a notification through the active headless client.',\n async execute(args, execution) {\n const body = args.trim();\n if (body) await execution.notify({ body, level: 'info' });\n },\n});\n"],"mappings":";;AAEA,MAAa,sBAAsB,cAAc;CAC/C,MAAM;CACN,aAAa;CACb,MAAM,QAAQ,MAAM,WAAW;EAC7B,MAAM,OAAO,KAAK,KAAK;EACvB,IAAI,MAAM,MAAM,UAAU,OAAO;GAAE;GAAM,OAAO;EAAO,CAAC;CAC1D;AACF,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const require_notificationCommand = require("../_lib/notificationCommand.cjs");
|
|
2
|
+
//#region src/extensions/workspaces/sessions/(backend)/command/notify.server.ts
|
|
3
|
+
var notify_server_default = (0, require("@agimon-ai/doompi-core/extension-file").defineServerCommand)(require_notificationCommand.notificationCommand);
|
|
4
|
+
//#endregion
|
|
5
|
+
exports.default = notify_server_default;
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=notify.server.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify.server.cjs","names":["defineServerCommand","notificationCommand"],"sources":["../../../../../../../src/extensions/workspaces/sessions/(backend)/command/notify.server.ts"],"sourcesContent":["import { defineServerCommand } from '@agimon-ai/doompi-core/extension-file';\n\nimport { notificationCommand } from '../_lib/notificationCommand';\n\nexport default defineServerCommand(notificationCommand);\n"],"mappings":";;AAIA,IAAA,yBAAA,kDAAeA,CAAAA,CAAAA,oBAAAA,CAAoBC,4BAAAA,mBAAmB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { notificationCommand } from "../_lib/notificationCommand.mjs";
|
|
2
|
+
import { defineServerCommand } from "@agimon-ai/doompi-core/extension-file";
|
|
3
|
+
//#region src/extensions/workspaces/sessions/(backend)/command/notify.server.ts
|
|
4
|
+
var notify_server_default = defineServerCommand(notificationCommand);
|
|
5
|
+
//#endregion
|
|
6
|
+
export { notify_server_default as default };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=notify.server.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify.server.mjs","names":[],"sources":["../../../../../../../src/extensions/workspaces/sessions/(backend)/command/notify.server.ts"],"sourcesContent":["import { defineServerCommand } from '@agimon-ai/doompi-core/extension-file';\n\nimport { notificationCommand } from '../_lib/notificationCommand';\n\nexport default defineServerCommand(notificationCommand);\n"],"mappings":";;;AAIA,IAAA,wBAAe,oBAAoB,mBAAmB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli.ts
|
|
2
|
+
var agentSettled_cli_default = (0, require("@agimon-ai/doompi-core/extension-file").defineRoutedContribution)((context) => context.root?.events?.agent_settled, { cardinality: "optional" });
|
|
3
|
+
//#endregion
|
|
4
|
+
exports.default = agentSettled_cli_default;
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=agentSettled.cli.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentSettled.cli.cjs","names":["defineRoutedContribution"],"sources":["../../../../../../../src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli.ts"],"sourcesContent":["import { defineRoutedContribution } from '@agimon-ai/doompi-core/extension-file';\nimport type { WithRoot } from '@agimon-ai/doompi-core/extension-file';\nimport type { PiPluginContext } from '@agimon-ai/doompi-core/pi-extension';\n\nimport { createNotificationRuntime } from '../../../../../services/notificationRuntime';\nexport default defineRoutedContribution(\n (context: WithRoot<PiPluginContext<unknown>, ReturnType<typeof createNotificationRuntime> | undefined>) =>\n context.root?.events?.agent_settled,\n { cardinality: 'optional' },\n);\n"],"mappings":";AAKA,IAAA,4BAAA,kDAAeA,CAAAA,CAAAA,yBAAAA,EACZ,YACC,QAAQ,MAAM,QAAQ,eACxB,EAAE,aAAa,WAAW,CAC5B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { defineRoutedContribution } from "@agimon-ai/doompi-core/extension-file";
|
|
2
|
+
//#region src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli.ts
|
|
3
|
+
var agentSettled_cli_default = defineRoutedContribution((context) => context.root?.events?.agent_settled, { cardinality: "optional" });
|
|
4
|
+
//#endregion
|
|
5
|
+
export { agentSettled_cli_default as default };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=agentSettled.cli.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentSettled.cli.mjs","names":[],"sources":["../../../../../../../src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli.ts"],"sourcesContent":["import { defineRoutedContribution } from '@agimon-ai/doompi-core/extension-file';\nimport type { WithRoot } from '@agimon-ai/doompi-core/extension-file';\nimport type { PiPluginContext } from '@agimon-ai/doompi-core/pi-extension';\n\nimport { createNotificationRuntime } from '../../../../../services/notificationRuntime';\nexport default defineRoutedContribution(\n (context: WithRoot<PiPluginContext<unknown>, ReturnType<typeof createNotificationRuntime> | undefined>) =>\n context.root?.events?.agent_settled,\n { cardinality: 'optional' },\n);\n"],"mappings":";;AAKA,IAAA,2BAAe,0BACZ,YACC,QAAQ,MAAM,QAAQ,eACxB,EAAE,aAAa,WAAW,CAC5B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli.ts
|
|
2
|
+
var agentStart_cli_default = (0, require("@agimon-ai/doompi-core/extension-file").defineRoutedContribution)((context) => context.root?.events?.agent_start, { cardinality: "optional" });
|
|
3
|
+
//#endregion
|
|
4
|
+
exports.default = agentStart_cli_default;
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=agentStart.cli.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentStart.cli.cjs","names":["defineRoutedContribution"],"sources":["../../../../../../../src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli.ts"],"sourcesContent":["import { defineRoutedContribution } from '@agimon-ai/doompi-core/extension-file';\nimport type { WithRoot } from '@agimon-ai/doompi-core/extension-file';\nimport type { PiPluginContext } from '@agimon-ai/doompi-core/pi-extension';\n\nimport { createNotificationRuntime } from '../../../../../services/notificationRuntime';\nexport default defineRoutedContribution(\n (context: WithRoot<PiPluginContext<unknown>, ReturnType<typeof createNotificationRuntime> | undefined>) =>\n context.root?.events?.agent_start,\n { cardinality: 'optional' },\n);\n"],"mappings":";AAKA,IAAA,0BAAA,kDAAeA,CAAAA,CAAAA,yBAAAA,EACZ,YACC,QAAQ,MAAM,QAAQ,aACxB,EAAE,aAAa,WAAW,CAC5B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { defineRoutedContribution } from "@agimon-ai/doompi-core/extension-file";
|
|
2
|
+
//#region src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli.ts
|
|
3
|
+
var agentStart_cli_default = defineRoutedContribution((context) => context.root?.events?.agent_start, { cardinality: "optional" });
|
|
4
|
+
//#endregion
|
|
5
|
+
export { agentStart_cli_default as default };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=agentStart.cli.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentStart.cli.mjs","names":[],"sources":["../../../../../../../src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli.ts"],"sourcesContent":["import { defineRoutedContribution } from '@agimon-ai/doompi-core/extension-file';\nimport type { WithRoot } from '@agimon-ai/doompi-core/extension-file';\nimport type { PiPluginContext } from '@agimon-ai/doompi-core/pi-extension';\n\nimport { createNotificationRuntime } from '../../../../../services/notificationRuntime';\nexport default defineRoutedContribution(\n (context: WithRoot<PiPluginContext<unknown>, ReturnType<typeof createNotificationRuntime> | undefined>) =>\n context.root?.events?.agent_start,\n { cardinality: 'optional' },\n);\n"],"mappings":";;AAKA,IAAA,yBAAe,0BACZ,YACC,QAAQ,MAAM,QAAQ,aACxB,EAAE,aAAa,WAAW,CAC5B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/extensions/workspaces/sessions/(backend)/hook/input.cli.ts
|
|
2
|
+
var input_cli_default = (0, require("@agimon-ai/doompi-core/extension-file").defineRoutedContribution)((context) => context.root?.events?.input, { cardinality: "optional" });
|
|
3
|
+
//#endregion
|
|
4
|
+
exports.default = input_cli_default;
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=input.cli.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.cli.cjs","names":["defineRoutedContribution"],"sources":["../../../../../../../src/extensions/workspaces/sessions/(backend)/hook/input.cli.ts"],"sourcesContent":["import { defineRoutedContribution } from '@agimon-ai/doompi-core/extension-file';\nimport type { WithRoot } from '@agimon-ai/doompi-core/extension-file';\nimport type { PiPluginContext } from '@agimon-ai/doompi-core/pi-extension';\n\nimport { createNotificationRuntime } from '../../../../../services/notificationRuntime';\nexport default defineRoutedContribution(\n (context: WithRoot<PiPluginContext<unknown>, ReturnType<typeof createNotificationRuntime> | undefined>) =>\n context.root?.events?.input,\n { cardinality: 'optional' },\n);\n"],"mappings":";AAKA,IAAA,qBAAA,kDAAeA,CAAAA,CAAAA,yBAAAA,EACZ,YACC,QAAQ,MAAM,QAAQ,OACxB,EAAE,aAAa,WAAW,CAC5B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { defineRoutedContribution } from "@agimon-ai/doompi-core/extension-file";
|
|
2
|
+
//#region src/extensions/workspaces/sessions/(backend)/hook/input.cli.ts
|
|
3
|
+
var input_cli_default = defineRoutedContribution((context) => context.root?.events?.input, { cardinality: "optional" });
|
|
4
|
+
//#endregion
|
|
5
|
+
export { input_cli_default as default };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=input.cli.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.cli.mjs","names":[],"sources":["../../../../../../../src/extensions/workspaces/sessions/(backend)/hook/input.cli.ts"],"sourcesContent":["import { defineRoutedContribution } from '@agimon-ai/doompi-core/extension-file';\nimport type { WithRoot } from '@agimon-ai/doompi-core/extension-file';\nimport type { PiPluginContext } from '@agimon-ai/doompi-core/pi-extension';\n\nimport { createNotificationRuntime } from '../../../../../services/notificationRuntime';\nexport default defineRoutedContribution(\n (context: WithRoot<PiPluginContext<unknown>, ReturnType<typeof createNotificationRuntime> | undefined>) =>\n context.root?.events?.input,\n { cardinality: 'optional' },\n);\n"],"mappings":";;AAKA,IAAA,oBAAe,0BACZ,YACC,QAAQ,MAAM,QAAQ,OACxB,EAAE,aAAa,WAAW,CAC5B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.ts
|
|
2
|
+
var sessionStart_cli_default = (0, require("@agimon-ai/doompi-core/extension-file").defineRoutedContribution)((context) => context.root?.events?.session_start, { cardinality: "optional" });
|
|
3
|
+
//#endregion
|
|
4
|
+
exports.default = sessionStart_cli_default;
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=sessionStart.cli.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionStart.cli.cjs","names":["defineRoutedContribution"],"sources":["../../../../../../../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.ts"],"sourcesContent":["import { defineRoutedContribution } from '@agimon-ai/doompi-core/extension-file';\nimport type { WithRoot } from '@agimon-ai/doompi-core/extension-file';\nimport type { PiPluginContext } from '@agimon-ai/doompi-core/pi-extension';\n\nimport { createNotificationRuntime } from '../../../../../services/notificationRuntime';\nexport default defineRoutedContribution(\n (context: WithRoot<PiPluginContext<unknown>, ReturnType<typeof createNotificationRuntime> | undefined>) =>\n context.root?.events?.session_start,\n { cardinality: 'optional' },\n);\n"],"mappings":";AAKA,IAAA,4BAAA,kDAAeA,CAAAA,CAAAA,yBAAAA,EACZ,YACC,QAAQ,MAAM,QAAQ,eACxB,EAAE,aAAa,WAAW,CAC5B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { defineRoutedContribution } from "@agimon-ai/doompi-core/extension-file";
|
|
2
|
+
//#region src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.ts
|
|
3
|
+
var sessionStart_cli_default = defineRoutedContribution((context) => context.root?.events?.session_start, { cardinality: "optional" });
|
|
4
|
+
//#endregion
|
|
5
|
+
export { sessionStart_cli_default as default };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=sessionStart.cli.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionStart.cli.mjs","names":[],"sources":["../../../../../../../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.ts"],"sourcesContent":["import { defineRoutedContribution } from '@agimon-ai/doompi-core/extension-file';\nimport type { WithRoot } from '@agimon-ai/doompi-core/extension-file';\nimport type { PiPluginContext } from '@agimon-ai/doompi-core/pi-extension';\n\nimport { createNotificationRuntime } from '../../../../../services/notificationRuntime';\nexport default defineRoutedContribution(\n (context: WithRoot<PiPluginContext<unknown>, ReturnType<typeof createNotificationRuntime> | undefined>) =>\n context.root?.events?.session_start,\n { cardinality: 'optional' },\n);\n"],"mappings":";;AAKA,IAAA,2BAAe,0BACZ,YACC,QAAQ,MAAM,QAAQ,eACxB,EAAE,aAAa,WAAW,CAC5B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const require_index = require("../../../../services/notificationRuntime/index.cjs");
|
|
2
|
+
let _agimon_ai_doompi_core_extension_file = require("@agimon-ai/doompi-core/extension-file");
|
|
3
|
+
let _agimon_ai_doompi_core_child_process = require("@agimon-ai/doompi-core/child-process");
|
|
4
|
+
//#region src/extensions/workspaces/sessions/(backend)/root.cli.ts
|
|
5
|
+
var root_cli_default = (0, _agimon_ai_doompi_core_extension_file.defineRoot)((context) => {
|
|
6
|
+
if ((context.options?.environment ?? process.env)[_agimon_ai_doompi_core_child_process.SUBAGENT_CHILD_ENV]) return { value: void 0 };
|
|
7
|
+
if (!context.runtime) throw new Error("This Pi extension requires the Cordis runtime metadata.");
|
|
8
|
+
const runtime = require_index.createNotificationRuntime({
|
|
9
|
+
pi: context.pi,
|
|
10
|
+
options: context.options ?? {},
|
|
11
|
+
generation: `${context.runtime.generation}:notification`
|
|
12
|
+
});
|
|
13
|
+
return {
|
|
14
|
+
value: runtime,
|
|
15
|
+
services: runtime.services,
|
|
16
|
+
onStop: runtime.onStop,
|
|
17
|
+
onDispose: runtime.onDispose
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
exports.default = root_cli_default;
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=root.cli.cjs.map
|