@agimon-ai/doompi-notification 0.0.1-alpha.49 → 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.
Files changed (153) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +23 -1
  2. package/dist/api-contracts.cjs +7 -1
  3. package/dist/api-contracts.d.cts +1 -1
  4. package/dist/api-contracts.d.mts +1 -1
  5. package/dist/api-contracts.mjs +2 -1
  6. package/dist/extensions/pi.cjs +36 -1
  7. package/dist/extensions/pi.cjs.map +1 -1
  8. package/dist/extensions/pi.d.cts +4 -6
  9. package/dist/extensions/pi.d.cts.map +1 -1
  10. package/dist/extensions/pi.d.mts +4 -6
  11. package/dist/extensions/pi.d.mts.map +1 -1
  12. package/dist/extensions/pi.mjs +31 -1
  13. package/dist/extensions/pi.mjs.map +1 -1
  14. package/dist/extensions/server.cjs +22 -1
  15. package/dist/extensions/server.cjs.map +1 -1
  16. package/dist/extensions/server.d.cts +3 -3
  17. package/dist/extensions/server.d.cts.map +1 -1
  18. package/dist/extensions/server.d.mts +3 -3
  19. package/dist/extensions/server.d.mts.map +1 -1
  20. package/dist/extensions/server.mjs +17 -1
  21. package/dist/extensions/server.mjs.map +1 -1
  22. package/dist/index.cjs +17 -1
  23. package/dist/index.d.cts +5 -6
  24. package/dist/index.d.mts +5 -6
  25. package/dist/index.mjs +5 -1
  26. package/dist/src/extensions/workspaces/sessions/(backend)/_lib/notificationCommand.cjs +16 -0
  27. package/dist/src/extensions/workspaces/sessions/(backend)/_lib/notificationCommand.cjs.map +1 -0
  28. package/dist/src/extensions/workspaces/sessions/(backend)/_lib/notificationCommand.mjs +17 -0
  29. package/dist/src/extensions/workspaces/sessions/(backend)/_lib/notificationCommand.mjs.map +1 -0
  30. package/dist/src/extensions/workspaces/sessions/(backend)/command/notify.server.cjs +7 -0
  31. package/dist/src/extensions/workspaces/sessions/(backend)/command/notify.server.cjs.map +1 -0
  32. package/dist/src/extensions/workspaces/sessions/(backend)/command/notify.server.mjs +8 -0
  33. package/dist/src/extensions/workspaces/sessions/(backend)/command/notify.server.mjs.map +1 -0
  34. package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli.cjs +6 -0
  35. package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli.cjs.map +1 -0
  36. package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli.mjs +7 -0
  37. package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentSettled.cli.mjs.map +1 -0
  38. package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli.cjs +6 -0
  39. package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli.cjs.map +1 -0
  40. package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli.mjs +7 -0
  41. package/dist/src/extensions/workspaces/sessions/(backend)/hook/agentStart.cli.mjs.map +1 -0
  42. package/dist/src/extensions/workspaces/sessions/(backend)/hook/input.cli.cjs +6 -0
  43. package/dist/src/extensions/workspaces/sessions/(backend)/hook/input.cli.cjs.map +1 -0
  44. package/dist/src/extensions/workspaces/sessions/(backend)/hook/input.cli.mjs +7 -0
  45. package/dist/src/extensions/workspaces/sessions/(backend)/hook/input.cli.mjs.map +1 -0
  46. package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.cjs +6 -0
  47. package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.cjs.map +1 -0
  48. package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.mjs +7 -0
  49. package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.mjs.map +1 -0
  50. package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.cjs +23 -0
  51. package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.cjs.map +1 -0
  52. package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.mjs +23 -0
  53. package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.mjs.map +1 -0
  54. package/dist/src/schemas/apiContracts.cjs +13 -0
  55. package/dist/src/schemas/apiContracts.cjs.map +1 -0
  56. package/dist/{schemas → src/schemas}/apiContracts.d.cts.map +1 -1
  57. package/dist/{schemas → src/schemas}/apiContracts.d.mts.map +1 -1
  58. package/dist/src/schemas/apiContracts.mjs +13 -0
  59. package/dist/src/schemas/apiContracts.mjs.map +1 -0
  60. package/dist/src/services/notificationPolicy/index.cjs +32 -0
  61. package/dist/src/services/notificationPolicy/index.cjs.map +1 -0
  62. package/dist/src/services/notificationPolicy/index.d.cts.map +1 -0
  63. package/dist/src/services/notificationPolicy/index.d.mts.map +1 -0
  64. package/dist/src/services/notificationPolicy/index.mjs +29 -0
  65. package/dist/src/services/notificationPolicy/index.mjs.map +1 -0
  66. package/dist/src/services/notificationRouter/index.cjs +43 -0
  67. package/dist/{controllers/notificationRouter.mjs.map → src/services/notificationRouter/index.cjs.map} +1 -1
  68. package/dist/src/services/notificationRouter/index.mjs +41 -0
  69. package/dist/src/services/notificationRouter/index.mjs.map +1 -0
  70. package/dist/src/services/notificationRuntime/index.cjs +190 -0
  71. package/dist/src/services/notificationRuntime/index.cjs.map +1 -0
  72. package/dist/src/services/notificationRuntime/index.mjs +190 -0
  73. package/dist/src/services/notificationRuntime/index.mjs.map +1 -0
  74. package/dist/src/services/notificationText/index.cjs +63 -0
  75. package/dist/src/services/notificationText/index.cjs.map +1 -0
  76. package/dist/src/services/notificationText/index.d.cts.map +1 -0
  77. package/dist/src/services/notificationText/index.d.mts.map +1 -0
  78. package/dist/src/services/notificationText/index.mjs +57 -0
  79. package/dist/src/services/notificationText/index.mjs.map +1 -0
  80. package/dist/src/services/shellTitleController/index.cjs +149 -0
  81. package/dist/src/services/shellTitleController/index.cjs.map +1 -0
  82. package/dist/{controllers/shellTitleController.d.cts → src/services/shellTitleController/index.d.cts} +3 -3
  83. package/dist/src/services/shellTitleController/index.d.cts.map +1 -0
  84. package/dist/{controllers/shellTitleController.d.mts → src/services/shellTitleController/index.d.mts} +3 -3
  85. package/dist/src/services/shellTitleController/index.d.mts.map +1 -0
  86. package/dist/src/services/shellTitleController/index.mjs +148 -0
  87. package/dist/src/services/shellTitleController/index.mjs.map +1 -0
  88. package/dist/src/services/systemNotification/index.cjs +48 -0
  89. package/dist/src/services/systemNotification/index.cjs.map +1 -0
  90. package/dist/src/services/systemNotification/index.d.cts +12 -0
  91. package/dist/src/services/systemNotification/index.d.cts.map +1 -0
  92. package/dist/src/services/systemNotification/index.d.mts +12 -0
  93. package/dist/src/services/systemNotification/index.d.mts.map +1 -0
  94. package/dist/src/services/systemNotification/index.mjs +48 -0
  95. package/dist/src/services/systemNotification/index.mjs.map +1 -0
  96. package/dist/{types → src/types}/notifications.d.cts +12 -0
  97. package/dist/src/types/notifications.d.cts.map +1 -0
  98. package/dist/{types → src/types}/notifications.d.mts +12 -0
  99. package/dist/src/types/notifications.d.mts.map +1 -0
  100. package/package.json +13 -6
  101. package/dist/controllers/notificationCommand.cjs +0 -2
  102. package/dist/controllers/notificationCommand.cjs.map +0 -1
  103. package/dist/controllers/notificationCommand.mjs +0 -2
  104. package/dist/controllers/notificationCommand.mjs.map +0 -1
  105. package/dist/controllers/notificationRouter.cjs +0 -2
  106. package/dist/controllers/notificationRouter.cjs.map +0 -1
  107. package/dist/controllers/notificationRouter.mjs +0 -2
  108. package/dist/controllers/notificationRuntime.cjs +0 -2
  109. package/dist/controllers/notificationRuntime.cjs.map +0 -1
  110. package/dist/controllers/notificationRuntime.d.cts +0 -11
  111. package/dist/controllers/notificationRuntime.d.cts.map +0 -1
  112. package/dist/controllers/notificationRuntime.d.mts +0 -11
  113. package/dist/controllers/notificationRuntime.d.mts.map +0 -1
  114. package/dist/controllers/notificationRuntime.mjs +0 -2
  115. package/dist/controllers/notificationRuntime.mjs.map +0 -1
  116. package/dist/controllers/shellTitleController.cjs +0 -27
  117. package/dist/controllers/shellTitleController.cjs.map +0 -1
  118. package/dist/controllers/shellTitleController.d.cts.map +0 -1
  119. package/dist/controllers/shellTitleController.d.mts.map +0 -1
  120. package/dist/controllers/shellTitleController.mjs +0 -27
  121. package/dist/controllers/shellTitleController.mjs.map +0 -1
  122. package/dist/controllers/systemNotification.cjs +0 -2
  123. package/dist/controllers/systemNotification.cjs.map +0 -1
  124. package/dist/controllers/systemNotification.d.cts +0 -13
  125. package/dist/controllers/systemNotification.d.cts.map +0 -1
  126. package/dist/controllers/systemNotification.d.mts +0 -13
  127. package/dist/controllers/systemNotification.d.mts.map +0 -1
  128. package/dist/controllers/systemNotification.mjs +0 -2
  129. package/dist/controllers/systemNotification.mjs.map +0 -1
  130. package/dist/schemas/apiContracts.cjs +0 -2
  131. package/dist/schemas/apiContracts.cjs.map +0 -1
  132. package/dist/schemas/apiContracts.mjs +0 -2
  133. package/dist/schemas/apiContracts.mjs.map +0 -1
  134. package/dist/services/notificationPolicy/index.cjs +0 -2
  135. package/dist/services/notificationPolicy/index.cjs.map +0 -1
  136. package/dist/services/notificationPolicy/index.d.cts.map +0 -1
  137. package/dist/services/notificationPolicy/index.d.mts.map +0 -1
  138. package/dist/services/notificationPolicy/index.mjs +0 -2
  139. package/dist/services/notificationPolicy/index.mjs.map +0 -1
  140. package/dist/services/notificationText/index.cjs +0 -2
  141. package/dist/services/notificationText/index.cjs.map +0 -1
  142. package/dist/services/notificationText/index.d.cts.map +0 -1
  143. package/dist/services/notificationText/index.d.mts.map +0 -1
  144. package/dist/services/notificationText/index.mjs +0 -2
  145. package/dist/services/notificationText/index.mjs.map +0 -1
  146. package/dist/types/notifications.d.cts.map +0 -1
  147. package/dist/types/notifications.d.mts.map +0 -1
  148. /package/dist/{schemas → src/schemas}/apiContracts.d.cts +0 -0
  149. /package/dist/{schemas → src/schemas}/apiContracts.d.mts +0 -0
  150. /package/dist/{services → src/services}/notificationPolicy/index.d.cts +0 -0
  151. /package/dist/{services → src/services}/notificationPolicy/index.d.mts +0 -0
  152. /package/dist/{services → src/services}/notificationText/index.d.cts +0 -0
  153. /package/dist/{services → src/services}/notificationText/index.d.mts +0 -0
@@ -1 +1,23 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));exports.__toESM=s;
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;
@@ -1 +1,7 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./schemas/apiContracts.cjs");exports.apiContracts=e.apiContracts,exports.default=e.apiContracts;
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;
@@ -1,2 +1,2 @@
1
- import { apiContracts } from "./schemas/apiContracts.cjs";
1
+ import { apiContracts } from "./src/schemas/apiContracts.cjs";
2
2
  export { apiContracts, apiContracts as default };
@@ -1,2 +1,2 @@
1
- import { apiContracts } from "./schemas/apiContracts.mjs";
1
+ import { apiContracts } from "./src/schemas/apiContracts.mjs";
2
2
  export { apiContracts, apiContracts as default };
@@ -1 +1,2 @@
1
- import{apiContracts as e}from"./schemas/apiContracts.mjs";export{e as apiContracts,e as default};
1
+ import { apiContracts } from "./src/schemas/apiContracts.mjs";
2
+ export { apiContracts, apiContracts as default };
@@ -1,2 +1,37 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../controllers/notificationRuntime.cjs");let t=require("@agimon-ai/doompi-core/child-process");const n=(0,require("@agimon-ai/doompi-core/pi-extension").definePiExtension)(`@agimon-ai/doompi-notification`,({pi:t,options:n,runtime:r})=>{if(!r)throw Error(`This Pi extension requires the Cordis runtime metadata.`);return e.createNotificationRuntime({pi:t,options:n??{},generation:`${r.generation}:notification`})});async function r(e,r={}){(r.environment??process.env)[t.SUBAGENT_CHILD_ENV]||await n(e,r)}exports.default=r,exports.notificationExtension=r;
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
+
2
37
  //# sourceMappingURL=pi.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"pi.cjs","names":["definePiExtension","createNotificationRuntime","SUBAGENT_CHILD_ENV"],"sources":["../../src/extensions/pi.ts"],"sourcesContent":["import { SUBAGENT_CHILD_ENV } from '@agimon-ai/doompi-core/child-process';\nimport { definePiExtension } from '@agimon-ai/doompi-core/pi-extension';\nimport type { ExtensionAPI } from '@earendil-works/pi-coding-agent';\n\nimport { createNotificationRuntime, type NotificationExtensionOptions } from '../controllers/notificationRuntime';\n\nconst notificationPlugin = definePiExtension<NotificationExtensionOptions>(\n '@agimon-ai/doompi-notification',\n ({ pi, options, runtime }) => {\n if (!runtime) throw new Error('This Pi extension requires the Cordis runtime metadata.');\n return createNotificationRuntime({ pi, options: options ?? {}, generation: `${runtime.generation}:notification` });\n },\n);\n\n/** Detached children leave notification ownership with their parent session. */\nexport async function notificationExtension(\n pi: ExtensionAPI,\n options: NotificationExtensionOptions = {},\n): Promise<void> {\n if ((options.environment ?? process.env)[SUBAGENT_CHILD_ENV]) return;\n await notificationPlugin(pi, options);\n}\nexport default notificationExtension;\n"],"mappings":"+MAMA,MAAM,GAAA,+CAAqBA,CAAAA,CAAAA,kBAAAA,CACzB,kCACC,CAAE,KAAI,UAAS,aAAc,CAC5B,GAAI,CAAC,EAAS,MAAU,MAAM,yDAAyD,EACvF,OAAOC,EAAAA,0BAA0B,CAAE,KAAI,QAAS,GAAW,CAAC,EAAG,WAAY,GAAG,EAAQ,WAAW,cAAe,CAAC,CACnH,CACF,EAGA,eAAsB,EACpB,EACA,EAAwC,CAAC,EAC1B,EACV,EAAQ,aAAe,QAAQ,IAAA,CAAKC,EAAAA,qBACzC,MAAM,EAAmB,EAAI,CAAO,CACtC"}
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"}
@@ -1,8 +1,6 @@
1
- import { NotificationExtensionOptions } from "../controllers/notificationRuntime.cjs";
2
- import { ExtensionAPI } from "@earendil-works/pi-coding-agent";
3
- //#region src/extensions/pi.d.ts
4
- /** Detached children leave notification ownership with their parent session. */
5
- export declare function notificationExtension(pi: ExtensionAPI, options?: NotificationExtensionOptions): Promise<void>;
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>;
6
4
  //#endregion
7
- export { notificationExtension as default };
5
+ export { extension as default };
8
6
  //# sourceMappingURL=pi.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pi.d.cts","names":[],"sources":["../../src/extensions/pi.ts"],"mappings":";;;;wBAesB,sBACpB,IAAI,cACJ,UAAS,+BACR"}
1
+ {"version":3,"file":"pi.d.cts","names":[],"sources":["../../generated/pi.ts"],"mappings":";;qBAuBa,iEAAS,mBAAT"}
@@ -1,8 +1,6 @@
1
- import { NotificationExtensionOptions } from "../controllers/notificationRuntime.mjs";
2
- import { ExtensionAPI } from "@earendil-works/pi-coding-agent";
3
- //#region src/extensions/pi.d.ts
4
- /** Detached children leave notification ownership with their parent session. */
5
- export declare function notificationExtension(pi: ExtensionAPI, options?: NotificationExtensionOptions): Promise<void>;
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>;
6
4
  //#endregion
7
- export { notificationExtension as default };
5
+ export { extension as default };
8
6
  //# sourceMappingURL=pi.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pi.d.mts","names":[],"sources":["../../src/extensions/pi.ts"],"mappings":";;;;wBAesB,sBACpB,IAAI,cACJ,UAAS,+BACR"}
1
+ {"version":3,"file":"pi.d.mts","names":[],"sources":["../../generated/pi.ts"],"mappings":";;qBAuBa,iEAAS,mBAAT"}
@@ -1,2 +1,32 @@
1
- import{createNotificationRuntime as e}from"../controllers/notificationRuntime.mjs";import{SUBAGENT_CHILD_ENV as t}from"@agimon-ai/doompi-core/child-process";import{definePiExtension as n}from"@agimon-ai/doompi-core/pi-extension";const r=n(`@agimon-ai/doompi-notification`,({pi:t,options:n,runtime:r})=>{if(!r)throw Error(`This Pi extension requires the Cordis runtime metadata.`);return e({pi:t,options:n??{},generation:`${r.generation}:notification`})});async function i(e,n={}){(n.environment??process.env)[t]||await r(e,n)}export{i as default,i as notificationExtension};
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
+
2
32
  //# sourceMappingURL=pi.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"pi.mjs","names":[],"sources":["../../src/extensions/pi.ts"],"sourcesContent":["import { SUBAGENT_CHILD_ENV } from '@agimon-ai/doompi-core/child-process';\nimport { definePiExtension } from '@agimon-ai/doompi-core/pi-extension';\nimport type { ExtensionAPI } from '@earendil-works/pi-coding-agent';\n\nimport { createNotificationRuntime, type NotificationExtensionOptions } from '../controllers/notificationRuntime';\n\nconst notificationPlugin = definePiExtension<NotificationExtensionOptions>(\n '@agimon-ai/doompi-notification',\n ({ pi, options, runtime }) => {\n if (!runtime) throw new Error('This Pi extension requires the Cordis runtime metadata.');\n return createNotificationRuntime({ pi, options: options ?? {}, generation: `${runtime.generation}:notification` });\n },\n);\n\n/** Detached children leave notification ownership with their parent session. */\nexport async function notificationExtension(\n pi: ExtensionAPI,\n options: NotificationExtensionOptions = {},\n): Promise<void> {\n if ((options.environment ?? process.env)[SUBAGENT_CHILD_ENV]) return;\n await notificationPlugin(pi, options);\n}\nexport default notificationExtension;\n"],"mappings":"qOAMA,MAAM,EAAqB,EACzB,kCACC,CAAE,KAAI,UAAS,aAAc,CAC5B,GAAI,CAAC,EAAS,MAAU,MAAM,yDAAyD,EACvF,OAAO,EAA0B,CAAE,KAAI,QAAS,GAAW,CAAC,EAAG,WAAY,GAAG,EAAQ,WAAW,cAAe,CAAC,CACnH,CACF,EAGA,eAAsB,EACpB,EACA,EAAwC,CAAC,EAC1B,EACV,EAAQ,aAAe,QAAQ,IAAA,CAAK,IACzC,MAAM,EAAmB,EAAI,CAAO,CACtC"}
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"}
@@ -1,2 +1,23 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../controllers/notificationCommand.cjs"),t=(0,require("@agimon-ai/doompi-core/server-facet").defineServerPlugin)({name:`@agimon-ai/doompi-notification`,session:{commands:[e.notificationCommand]}});exports.default=t,exports.notificationServerFacet=t;
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
+
2
23
  //# sourceMappingURL=server.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.cjs","names":["defineServerPlugin","notificationCommand"],"sources":["../../src/extensions/server.ts"],"sourcesContent":["import { defineServerPlugin } from '@agimon-ai/doompi-core/server-facet';\n\nimport { notificationCommand } from '../controllers/notificationCommand';\n\nexport const notificationServerFacet = defineServerPlugin({\n name: '@agimon-ai/doompi-notification',\n session: { commands: [notificationCommand] },\n});\nexport default notificationServerFacet;\n"],"mappings":"yJAIa,GAAA,+CAA0BA,CAAAA,CAAAA,mBAAAA,CAAmB,CACxD,KAAM,iCACN,QAAS,CAAE,SAAU,CAACC,EAAAA,mBAAmB,CAAE,CAC7C,CAAC"}
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"}
@@ -1,5 +1,5 @@
1
- //#region src/extensions/server.d.ts
2
- export declare const notificationServerFacet: import("@agimon-ai/doompi-core/server-facet").DoomServerFacet;
1
+ //#region generated/server.d.ts
2
+ export declare const facet: import("@agimon-ai/doompi-core/server-facet").DoomServerFacet;
3
3
  //#endregion
4
- export { notificationServerFacet as default };
4
+ export { facet as default };
5
5
  //# sourceMappingURL=server.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.cts","names":[],"sources":["../../src/extensions/server.ts"],"mappings":";qBAIa,uEAAuB"}
1
+ {"version":3,"file":"server.d.cts","names":[],"sources":["../../generated/server.ts"],"mappings":";qBAUa,qDAAK"}
@@ -1,5 +1,5 @@
1
- //#region src/extensions/server.d.ts
2
- export declare const notificationServerFacet: import("@agimon-ai/doompi-core/server-facet").DoomServerFacet;
1
+ //#region generated/server.d.ts
2
+ export declare const facet: import("@agimon-ai/doompi-core/server-facet").DoomServerFacet;
3
3
  //#endregion
4
- export { notificationServerFacet as default };
4
+ export { facet as default };
5
5
  //# sourceMappingURL=server.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.mts","names":[],"sources":["../../src/extensions/server.ts"],"mappings":";qBAIa,uEAAuB"}
1
+ {"version":3,"file":"server.d.mts","names":[],"sources":["../../generated/server.ts"],"mappings":";qBAUa,qDAAK"}
@@ -1,2 +1,18 @@
1
- import{notificationCommand as e}from"../controllers/notificationCommand.mjs";import{defineServerPlugin as t}from"@agimon-ai/doompi-core/server-facet";const n=t({name:`@agimon-ai/doompi-notification`,session:{commands:[e]}});export{n as default,n as notificationServerFacet};
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
+
2
18
  //# sourceMappingURL=server.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.mjs","names":[],"sources":["../../src/extensions/server.ts"],"sourcesContent":["import { defineServerPlugin } from '@agimon-ai/doompi-core/server-facet';\n\nimport { notificationCommand } from '../controllers/notificationCommand';\n\nexport const notificationServerFacet = defineServerPlugin({\n name: '@agimon-ai/doompi-notification',\n session: { commands: [notificationCommand] },\n});\nexport default notificationServerFacet;\n"],"mappings":"sJAIA,MAAa,EAA0B,EAAmB,CACxD,KAAM,iCACN,QAAS,CAAE,SAAU,CAAC,CAAmB,CAAE,CAC7C,CAAC"}
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 CHANGED
@@ -1 +1,17 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./controllers/shellTitleController.cjs"),t=require("./services/notificationText/index.cjs"),n=require("./controllers/systemNotification.cjs"),r=require("./services/notificationPolicy/index.cjs");exports.askUserPromptBody=r.askUserPromptBody,exports.attentionNotification=t.attentionNotification,exports.createMainThreadTitleController=e.createMainThreadTitleController,exports.createWorkerTitleController=e.createWorkerTitleController,exports.notificationBody=t.notificationBody,exports.promptTitle=t.promptTitle,exports.sendSystemNotification=n.sendSystemNotification,exports.settledNotification=t.settledNotification,exports.shellTabTitle=t.shellTabTitle,exports.supportsShellTitle=r.supportsShellTitle,exports.warrantsAttentionNotification=r.warrantsAttentionNotification,exports.warrantsSettledNotification=r.warrantsSettledNotification;
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 CHANGED
@@ -1,7 +1,6 @@
1
- import { DesktopNotification, ShellTitleAction, ShellTitleCommand, ShellTitleController, WriteTitle } from "./types/notifications.cjs";
2
- import { NotificationExtensionOptions } from "./controllers/notificationRuntime.cjs";
3
- import { createMainThreadTitleController, createWorkerTitleController } from "./controllers/shellTitleController.cjs";
4
- import { sendSystemNotification } from "./controllers/systemNotification.cjs";
5
- import { AttentionState, ShellSurface, askUserPromptBody, supportsShellTitle, warrantsAttentionNotification, warrantsSettledNotification } from "./services/notificationPolicy/index.cjs";
6
- import { ShellTabTitleInput, attentionNotification, notificationBody, promptTitle, settledNotification, shellTabTitle } from "./services/notificationText/index.cjs";
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";
7
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 CHANGED
@@ -1,7 +1,6 @@
1
- import { DesktopNotification, ShellTitleAction, ShellTitleCommand, ShellTitleController, WriteTitle } from "./types/notifications.mjs";
2
- import { NotificationExtensionOptions } from "./controllers/notificationRuntime.mjs";
3
- import { createMainThreadTitleController, createWorkerTitleController } from "./controllers/shellTitleController.mjs";
4
- import { sendSystemNotification } from "./controllers/systemNotification.mjs";
5
- import { AttentionState, ShellSurface, askUserPromptBody, supportsShellTitle, warrantsAttentionNotification, warrantsSettledNotification } from "./services/notificationPolicy/index.mjs";
6
- import { ShellTabTitleInput, attentionNotification, notificationBody, promptTitle, settledNotification, shellTabTitle } from "./services/notificationText/index.mjs";
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";
7
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 CHANGED
@@ -1 +1,5 @@
1
- import{createMainThreadTitleController as e,createWorkerTitleController as t}from"./controllers/shellTitleController.mjs";import{attentionNotification as n,notificationBody as r,promptTitle as i,settledNotification as a,shellTabTitle as o}from"./services/notificationText/index.mjs";import{sendSystemNotification as s}from"./controllers/systemNotification.mjs";import{askUserPromptBody as c,supportsShellTitle as l,warrantsAttentionNotification as u,warrantsSettledNotification as d}from"./services/notificationPolicy/index.mjs";export{c as askUserPromptBody,n as attentionNotification,e as createMainThreadTitleController,t as createWorkerTitleController,r as notificationBody,i as promptTitle,s as sendSystemNotification,a as settledNotification,o as shellTabTitle,l as supportsShellTitle,u as warrantsAttentionNotification,d as warrantsSettledNotification};
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