@agimon-ai/doompi-domain 0.0.1-alpha.2

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 (173) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +73 -0
  3. package/dist/_virtual/_rolldown/runtime.cjs +1 -0
  4. package/dist/adapters/applyDomains.cjs +2 -0
  5. package/dist/adapters/applyDomains.cjs.map +1 -0
  6. package/dist/adapters/applyDomains.d.cts +24 -0
  7. package/dist/adapters/applyDomains.d.cts.map +1 -0
  8. package/dist/adapters/applyDomains.d.mts +24 -0
  9. package/dist/adapters/applyDomains.d.mts.map +1 -0
  10. package/dist/adapters/applyDomains.mjs +2 -0
  11. package/dist/adapters/applyDomains.mjs.map +1 -0
  12. package/dist/adapters/domainCatalog.cjs +2 -0
  13. package/dist/adapters/domainCatalog.cjs.map +1 -0
  14. package/dist/adapters/domainCatalog.d.cts +20 -0
  15. package/dist/adapters/domainCatalog.d.cts.map +1 -0
  16. package/dist/adapters/domainCatalog.d.mts +20 -0
  17. package/dist/adapters/domainCatalog.d.mts.map +1 -0
  18. package/dist/adapters/domainCatalog.mjs +2 -0
  19. package/dist/adapters/domainCatalog.mjs.map +1 -0
  20. package/dist/adapters/domainSwitchHandoff.cjs +2 -0
  21. package/dist/adapters/domainSwitchHandoff.cjs.map +1 -0
  22. package/dist/adapters/domainSwitchHandoff.d.cts +10 -0
  23. package/dist/adapters/domainSwitchHandoff.d.cts.map +1 -0
  24. package/dist/adapters/domainSwitchHandoff.d.mts +10 -0
  25. package/dist/adapters/domainSwitchHandoff.d.mts.map +1 -0
  26. package/dist/adapters/domainSwitchHandoff.mjs +2 -0
  27. package/dist/adapters/domainSwitchHandoff.mjs.map +1 -0
  28. package/dist/adapters/mcpFilter.cjs +3 -0
  29. package/dist/adapters/mcpFilter.cjs.map +1 -0
  30. package/dist/adapters/mcpFilter.d.cts +39 -0
  31. package/dist/adapters/mcpFilter.d.cts.map +1 -0
  32. package/dist/adapters/mcpFilter.d.mts +39 -0
  33. package/dist/adapters/mcpFilter.d.mts.map +1 -0
  34. package/dist/adapters/mcpFilter.mjs +3 -0
  35. package/dist/adapters/mcpFilter.mjs.map +1 -0
  36. package/dist/adapters/mcpSessionEnvironment.cjs +2 -0
  37. package/dist/adapters/mcpSessionEnvironment.cjs.map +1 -0
  38. package/dist/adapters/mcpSessionEnvironment.d.cts +14 -0
  39. package/dist/adapters/mcpSessionEnvironment.d.cts.map +1 -0
  40. package/dist/adapters/mcpSessionEnvironment.d.mts +14 -0
  41. package/dist/adapters/mcpSessionEnvironment.d.mts.map +1 -0
  42. package/dist/adapters/mcpSessionEnvironment.mjs +2 -0
  43. package/dist/adapters/mcpSessionEnvironment.mjs.map +1 -0
  44. package/dist/adapters/pi/extension.cjs +2 -0
  45. package/dist/adapters/pi/extension.cjs.map +1 -0
  46. package/dist/adapters/pi/extension.d.cts +13 -0
  47. package/dist/adapters/pi/extension.d.cts.map +1 -0
  48. package/dist/adapters/pi/extension.d.mts +13 -0
  49. package/dist/adapters/pi/extension.d.mts.map +1 -0
  50. package/dist/adapters/pi/extension.mjs +2 -0
  51. package/dist/adapters/pi/extension.mjs.map +1 -0
  52. package/dist/adapters/pi/voiceTool.cjs +2 -0
  53. package/dist/adapters/pi/voiceTool.cjs.map +1 -0
  54. package/dist/adapters/pi/voiceTool.d.cts +16 -0
  55. package/dist/adapters/pi/voiceTool.d.cts.map +1 -0
  56. package/dist/adapters/pi/voiceTool.d.mts +16 -0
  57. package/dist/adapters/pi/voiceTool.d.mts.map +1 -0
  58. package/dist/adapters/pi/voiceTool.mjs +2 -0
  59. package/dist/adapters/pi/voiceTool.mjs.map +1 -0
  60. package/dist/adapters/pluginMaterializer.cjs +2 -0
  61. package/dist/adapters/pluginMaterializer.cjs.map +1 -0
  62. package/dist/adapters/pluginMaterializer.d.cts +14 -0
  63. package/dist/adapters/pluginMaterializer.d.cts.map +1 -0
  64. package/dist/adapters/pluginMaterializer.d.mts +14 -0
  65. package/dist/adapters/pluginMaterializer.d.mts.map +1 -0
  66. package/dist/adapters/pluginMaterializer.mjs +2 -0
  67. package/dist/adapters/pluginMaterializer.mjs.map +1 -0
  68. package/dist/adapters/resourceCollector.cjs +3 -0
  69. package/dist/adapters/resourceCollector.cjs.map +1 -0
  70. package/dist/adapters/resourceCollector.d.cts +25 -0
  71. package/dist/adapters/resourceCollector.d.cts.map +1 -0
  72. package/dist/adapters/resourceCollector.d.mts +25 -0
  73. package/dist/adapters/resourceCollector.d.mts.map +1 -0
  74. package/dist/adapters/resourceCollector.mjs +3 -0
  75. package/dist/adapters/resourceCollector.mjs.map +1 -0
  76. package/dist/adapters/skillCacheLocation.cjs +2 -0
  77. package/dist/adapters/skillCacheLocation.cjs.map +1 -0
  78. package/dist/adapters/skillCacheLocation.d.cts +16 -0
  79. package/dist/adapters/skillCacheLocation.d.cts.map +1 -0
  80. package/dist/adapters/skillCacheLocation.d.mts +16 -0
  81. package/dist/adapters/skillCacheLocation.d.mts.map +1 -0
  82. package/dist/adapters/skillCacheLocation.mjs +2 -0
  83. package/dist/adapters/skillCacheLocation.mjs.map +1 -0
  84. package/dist/adapters/telemetry/logSinkTelemetry.cjs +2 -0
  85. package/dist/adapters/telemetry/logSinkTelemetry.cjs.map +1 -0
  86. package/dist/adapters/telemetry/logSinkTelemetry.d.cts +14 -0
  87. package/dist/adapters/telemetry/logSinkTelemetry.d.cts.map +1 -0
  88. package/dist/adapters/telemetry/logSinkTelemetry.d.mts +14 -0
  89. package/dist/adapters/telemetry/logSinkTelemetry.d.mts.map +1 -0
  90. package/dist/adapters/telemetry/logSinkTelemetry.mjs +2 -0
  91. package/dist/adapters/telemetry/logSinkTelemetry.mjs.map +1 -0
  92. package/dist/apply.cjs +1 -0
  93. package/dist/apply.d.cts +2 -0
  94. package/dist/apply.d.mts +2 -0
  95. package/dist/apply.mjs +1 -0
  96. package/dist/commands/domainsCommand.cjs +2 -0
  97. package/dist/commands/domainsCommand.cjs.map +1 -0
  98. package/dist/commands/domainsCommand.d.cts +24 -0
  99. package/dist/commands/domainsCommand.d.cts.map +1 -0
  100. package/dist/commands/domainsCommand.d.mts +24 -0
  101. package/dist/commands/domainsCommand.d.mts.map +1 -0
  102. package/dist/commands/domainsCommand.mjs +2 -0
  103. package/dist/commands/domainsCommand.mjs.map +1 -0
  104. package/dist/extensions/pi.cjs +1 -0
  105. package/dist/extensions/pi.d.cts +2 -0
  106. package/dist/extensions/pi.d.mts +2 -0
  107. package/dist/extensions/pi.mjs +1 -0
  108. package/dist/index.cjs +1 -0
  109. package/dist/index.d.cts +13 -0
  110. package/dist/index.d.mts +13 -0
  111. package/dist/index.mjs +1 -0
  112. package/dist/mcp.cjs +1 -0
  113. package/dist/mcp.d.cts +3 -0
  114. package/dist/mcp.d.mts +3 -0
  115. package/dist/mcp.mjs +1 -0
  116. package/dist/plugins.cjs +1 -0
  117. package/dist/plugins.d.cts +2 -0
  118. package/dist/plugins.d.mts +2 -0
  119. package/dist/plugins.mjs +1 -0
  120. package/dist/resources.cjs +1 -0
  121. package/dist/resources.d.cts +4 -0
  122. package/dist/resources.d.mts +4 -0
  123. package/dist/resources.mjs +1 -0
  124. package/dist/schemas/domainVoiceTools.cjs +2 -0
  125. package/dist/schemas/domainVoiceTools.cjs.map +1 -0
  126. package/dist/schemas/domainVoiceTools.d.cts +22 -0
  127. package/dist/schemas/domainVoiceTools.d.cts.map +1 -0
  128. package/dist/schemas/domainVoiceTools.d.mts +22 -0
  129. package/dist/schemas/domainVoiceTools.d.mts.map +1 -0
  130. package/dist/schemas/domainVoiceTools.mjs +2 -0
  131. package/dist/schemas/domainVoiceTools.mjs.map +1 -0
  132. package/dist/services/domainText.cjs +2 -0
  133. package/dist/services/domainText.cjs.map +1 -0
  134. package/dist/services/domainText.d.cts +30 -0
  135. package/dist/services/domainText.d.cts.map +1 -0
  136. package/dist/services/domainText.d.mts +30 -0
  137. package/dist/services/domainText.d.mts.map +1 -0
  138. package/dist/services/domainText.mjs +2 -0
  139. package/dist/services/domainText.mjs.map +1 -0
  140. package/dist/services/toolNames.cjs +2 -0
  141. package/dist/services/toolNames.cjs.map +1 -0
  142. package/dist/services/toolNames.d.cts +21 -0
  143. package/dist/services/toolNames.d.cts.map +1 -0
  144. package/dist/services/toolNames.d.mts +21 -0
  145. package/dist/services/toolNames.d.mts.map +1 -0
  146. package/dist/services/toolNames.mjs +2 -0
  147. package/dist/services/toolNames.mjs.map +1 -0
  148. package/dist/types/domains.cjs +2 -0
  149. package/dist/types/domains.cjs.map +1 -0
  150. package/dist/types/domains.d.cts +33 -0
  151. package/dist/types/domains.d.cts.map +1 -0
  152. package/dist/types/domains.d.mts +33 -0
  153. package/dist/types/domains.d.mts.map +1 -0
  154. package/dist/types/domains.mjs +2 -0
  155. package/dist/types/domains.mjs.map +1 -0
  156. package/dist/types/handoff.d.cts +35 -0
  157. package/dist/types/handoff.d.cts.map +1 -0
  158. package/dist/types/handoff.d.mts +35 -0
  159. package/dist/types/handoff.d.mts.map +1 -0
  160. package/dist/types/resources.d.cts +46 -0
  161. package/dist/types/resources.d.cts.map +1 -0
  162. package/dist/types/resources.d.mts +46 -0
  163. package/dist/types/resources.d.mts.map +1 -0
  164. package/dist/types/telemetry.cjs +2 -0
  165. package/dist/types/telemetry.cjs.map +1 -0
  166. package/dist/types/telemetry.d.cts +15 -0
  167. package/dist/types/telemetry.d.cts.map +1 -0
  168. package/dist/types/telemetry.d.mts +15 -0
  169. package/dist/types/telemetry.d.mts.map +1 -0
  170. package/dist/types/telemetry.mjs +2 -0
  171. package/dist/types/telemetry.mjs.map +1 -0
  172. package/llms.txt +7 -0
  173. package/package.json +117 -0
@@ -0,0 +1,22 @@
1
+ import { Static, Type } from "typebox";
2
+ //#region src/schemas/domainVoiceTools.d.ts
3
+ declare const DOMAIN_NAMES_SCHEMA: Type.TArray<Type.TString>;
4
+ declare const EMPTY_DOMAIN_INPUT_SCHEMA: Type.TObject<{}>;
5
+ declare const LIST_DOMAINS_RESULT_SCHEMA: Type.TObject<{
6
+ active: Type.TArray<Type.TString>;
7
+ effective: Type.TArray<Type.TString>;
8
+ available: Type.TArray<Type.TString>;
9
+ }>;
10
+ declare const SWITCH_DOMAINS_INPUT_SCHEMA: Type.TObject<{
11
+ domains: Type.TArray<Type.TString>;
12
+ }>;
13
+ declare const SWITCH_DOMAINS_RESULT_SCHEMA: Type.TObject<{
14
+ status: Type.TLiteral<"queued">;
15
+ stopBatch: Type.TLiteral<"session-reload">;
16
+ }>;
17
+ type ListDomainsResult = Static<typeof LIST_DOMAINS_RESULT_SCHEMA>;
18
+ type SwitchDomainsInput = Static<typeof SWITCH_DOMAINS_INPUT_SCHEMA>;
19
+ type SwitchDomainsResult = Static<typeof SWITCH_DOMAINS_RESULT_SCHEMA>;
20
+ //#endregion
21
+ export { DOMAIN_NAMES_SCHEMA, EMPTY_DOMAIN_INPUT_SCHEMA, LIST_DOMAINS_RESULT_SCHEMA, ListDomainsResult, SWITCH_DOMAINS_INPUT_SCHEMA, SWITCH_DOMAINS_RESULT_SCHEMA, SwitchDomainsInput, SwitchDomainsResult };
22
+ //# sourceMappingURL=domainVoiceTools.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domainVoiceTools.d.mts","names":[],"sources":["../../src/schemas/domainVoiceTools.ts"],"mappings":";;cAOa,qBAAmB,KAAA,OAAA,KAAA;cAKnB,2BAAyB,KAAA;cAEzB,4BAA0B,KAAA;;;;;cAS1B,6BAA2B,KAAA;;;cAO3B,8BAA4B,KAAA;;;;KAQ7B,oBAAoB,cAAc;KAClC,qBAAqB,cAAc;KACnC,sBAAsB,cAAc"}
@@ -0,0 +1,2 @@
1
+ import{SAFE_DOMAIN_NAME as e}from"../types/domains.mjs";import{VOICE_TOOL_MAX_DOMAIN_COUNT as t,VOICE_TOOL_MAX_IDENTIFIER_LENGTH as n}from"@agimon-ai/doompi-extension-contracts/voice-tools";import{Type as r}from"typebox";const i=r.Array(r.String({minLength:1,maxLength:n,pattern:e.source}),{maxItems:t}),a=r.Object({},{additionalProperties:!1}),o=r.Object({active:i,effective:i,available:i},{additionalProperties:!1}),s=r.Object({domains:i},{additionalProperties:!1}),c=r.Object({status:r.Literal(`queued`),stopBatch:r.Literal(`session-reload`)},{additionalProperties:!1});export{i as DOMAIN_NAMES_SCHEMA,a as EMPTY_DOMAIN_INPUT_SCHEMA,o as LIST_DOMAINS_RESULT_SCHEMA,s as SWITCH_DOMAINS_INPUT_SCHEMA,c as SWITCH_DOMAINS_RESULT_SCHEMA};
2
+ //# sourceMappingURL=domainVoiceTools.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domainVoiceTools.mjs","names":[],"sources":["../../src/schemas/domainVoiceTools.ts"],"sourcesContent":["import {\n VOICE_TOOL_MAX_DOMAIN_COUNT,\n VOICE_TOOL_MAX_IDENTIFIER_LENGTH,\n} from '@agimon-ai/doompi-extension-contracts/voice-tools';\nimport { type Static, Type } from 'typebox';\nimport { SAFE_DOMAIN_NAME } from '../types/domains.ts';\n\nexport const DOMAIN_NAMES_SCHEMA = Type.Array(\n Type.String({ minLength: 1, maxLength: VOICE_TOOL_MAX_IDENTIFIER_LENGTH, pattern: SAFE_DOMAIN_NAME.source }),\n { maxItems: VOICE_TOOL_MAX_DOMAIN_COUNT },\n);\n\nexport const EMPTY_DOMAIN_INPUT_SCHEMA = Type.Object({}, { additionalProperties: false });\n\nexport const LIST_DOMAINS_RESULT_SCHEMA = Type.Object(\n {\n active: DOMAIN_NAMES_SCHEMA,\n effective: DOMAIN_NAMES_SCHEMA,\n available: DOMAIN_NAMES_SCHEMA,\n },\n { additionalProperties: false },\n);\n\nexport const SWITCH_DOMAINS_INPUT_SCHEMA = Type.Object(\n {\n domains: DOMAIN_NAMES_SCHEMA,\n },\n { additionalProperties: false },\n);\n\nexport const SWITCH_DOMAINS_RESULT_SCHEMA = Type.Object(\n {\n status: Type.Literal('queued'),\n stopBatch: Type.Literal('session-reload'),\n },\n { additionalProperties: false },\n);\n\nexport type ListDomainsResult = Static<typeof LIST_DOMAINS_RESULT_SCHEMA>;\nexport type SwitchDomainsInput = Static<typeof SWITCH_DOMAINS_INPUT_SCHEMA>;\nexport type SwitchDomainsResult = Static<typeof SWITCH_DOMAINS_RESULT_SCHEMA>;\n"],"mappings":"6NAOA,MAAa,EAAsB,EAAK,MACtC,EAAK,OAAO,CAAE,UAAW,EAAG,UAAW,EAAkC,QAAS,EAAiB,MAAO,CAAC,EAC3G,CAAE,SAAU,CAA4B,CAC1C,EAEa,EAA4B,EAAK,OAAO,CAAC,EAAG,CAAE,qBAAsB,EAAM,CAAC,EAE3E,EAA6B,EAAK,OAC7C,CACE,OAAQ,EACR,UAAW,EACX,UAAW,CACb,EACA,CAAE,qBAAsB,EAAM,CAChC,EAEa,EAA8B,EAAK,OAC9C,CACE,QAAS,CACX,EACA,CAAE,qBAAsB,EAAM,CAChC,EAEa,EAA+B,EAAK,OAC/C,CACE,OAAQ,EAAK,QAAQ,QAAQ,EAC7B,UAAW,EAAK,QAAQ,gBAAgB,CAC1C,EACA,CAAE,qBAAsB,EAAM,CAChC"}
@@ -0,0 +1,2 @@
1
+ const e=require("../types/domains.cjs");let t=require("@agimon-ai/doompi-extension-contracts/voice-tools");const n=`domains`;function r(e){return e.split(`,`).map(e=>e.trim()).filter(Boolean)}function i(e,t={}){return e.map(e=>({value:e,label:e,...t[e]?{description:t[e]}:{}}))}function a(e){return`Active domains: ${e.effective.join(`, `)||`(none)`}\nAvailable domains: ${e.available.join(`, `)}\nUse /${n} <name[,name...]> to switch.`}function o(e){return`Switched domains to: ${e.join(`, `)||`(none)`}`}function s(e){return`Domains already active: ${e.join(`, `)||`(none)`}`}function c(e){return`Domains (active: ${e.effective.join(`, `)||`(none)`})`}function l(n){if(n.length>t.VOICE_TOOL_MAX_DOMAIN_COUNT)throw Error(`A maximum of ${t.VOICE_TOOL_MAX_DOMAIN_COUNT} domains may be selected.`);let r=[],i=new Set;for(let a of n){let n=a.trim();if(!n||n.length>t.VOICE_TOOL_MAX_IDENTIFIER_LENGTH||!e.SAFE_DOMAIN_NAME.test(n))throw Error(`Invalid domain name: ${a}`);i.has(n)||(i.add(n),r.push(n))}return r}function u(e){let t=e.trim();if(!t.startsWith(`--voice-switch-token=`))return;let n=t.split(/\s+/u);if(n.length!==1)throw Error(`The voice domain switch token must be the only command argument.`);let r=n[0]?.slice(21).trim();if(!r)throw Error(`The voice domain switch token is missing.`);return r}function d(e){return e instanceof Error?e.message:String(e)}function f(e){return Error(`Domain transition was ${e.outcome}: ${e.diagnostics.join(`, `)}`)}exports.DOMAIN_COMMAND=n,exports.NONE=`(none)`,exports.VOICE_SWITCH_TOKEN_PREFIX=`--voice-switch-token=`,exports.domainItems=i,exports.domainSummary=a,exports.errorMessage=d,exports.normalizeDomainNames=l,exports.pickerTitle=c,exports.splitDomains=r,exports.switchedSummary=o,exports.transitionError=f,exports.unchangedSummary=s,exports.voiceSwitchToken=u;
2
+ //# sourceMappingURL=domainText.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domainText.cjs","names":["VOICE_TOOL_MAX_DOMAIN_COUNT","VOICE_TOOL_MAX_IDENTIFIER_LENGTH","SAFE_DOMAIN_NAME"],"sources":["../../src/services/domainText.ts"],"sourcesContent":["import type { DoomTransitionResult } from '@agimon-ai/doompi-extension-contracts/transition';\nimport {\n VOICE_TOOL_MAX_DOMAIN_COUNT,\n VOICE_TOOL_MAX_IDENTIFIER_LENGTH,\n} from '@agimon-ai/doompi-extension-contracts/voice-tools';\nimport type { SelectItem } from '@earendil-works/pi-tui';\nimport { type DomainListing, SAFE_DOMAIN_NAME } from '../types/domains.ts';\n\nconst DOMAIN_SEPARATOR = ',';\nexport const DOMAIN_COMMAND = 'domains';\nexport const VOICE_SWITCH_TOKEN_PREFIX = '--voice-switch-token=';\n/** What an empty selection reads as, which is a real state rather than an error. */\nexport const NONE = '(none)';\n\n/** Splits the comma-separated argument the command and the autocomplete share. */\nexport function splitDomains(value: string): string[] {\n return value\n .split(DOMAIN_SEPARATOR)\n .map((item) => item.trim())\n .filter(Boolean);\n}\n\n/** Picker rows for the domain multi-select. */\nexport function domainItems(\n names: string[],\n descriptions: Readonly<Record<string, string | undefined>> = {},\n): SelectItem[] {\n return names.map((name) => ({\n value: name,\n label: name,\n ...(descriptions[name] ? { description: descriptions[name] } : {}),\n }));\n}\n\nexport function domainSummary(listing: DomainListing): string {\n const active = listing.effective.join(', ') || NONE;\n return `Active domains: ${active}\\nAvailable domains: ${listing.available.join(', ')}\\nUse /${DOMAIN_COMMAND} <name[,name...]> to switch.`;\n}\n\nexport function switchedSummary(domains: readonly string[]): string {\n return `Switched domains to: ${domains.join(', ') || NONE}`;\n}\n\nexport function unchangedSummary(domains: readonly string[]): string {\n return `Domains already active: ${domains.join(', ') || NONE}`;\n}\n\nexport function pickerTitle(listing: DomainListing): string {\n return `Domains (active: ${listing.effective.join(', ') || NONE})`;\n}\n\n/**\n * Deduplicates a requested selection and rejects anything unsafe.\n *\n * Bounded before the manifest is read, because a selection large enough to\n * matter comes from the model rather than from a person typing the command.\n */\nexport function normalizeDomainNames(values: readonly string[]): string[] {\n if (values.length > VOICE_TOOL_MAX_DOMAIN_COUNT) {\n throw new Error(`A maximum of ${VOICE_TOOL_MAX_DOMAIN_COUNT} domains may be selected.`);\n }\n const result: string[] = [];\n const seen = new Set<string>();\n for (const value of values) {\n const name = value.trim();\n if (!name || name.length > VOICE_TOOL_MAX_IDENTIFIER_LENGTH || !SAFE_DOMAIN_NAME.test(name)) {\n throw new Error(`Invalid domain name: ${value}`);\n }\n if (seen.has(name)) continue;\n seen.add(name);\n result.push(name);\n }\n return result;\n}\n\n/** The opaque token a voice switch hands to the follow-up command invocation. */\nexport function voiceSwitchToken(args: string): string | undefined {\n const trimmed = args.trim();\n if (!trimmed.startsWith(VOICE_SWITCH_TOKEN_PREFIX)) return undefined;\n const parts = trimmed.split(/\\s+/u);\n if (parts.length !== 1) throw new Error('The voice domain switch token must be the only command argument.');\n const token = parts[0]?.slice(VOICE_SWITCH_TOKEN_PREFIX.length).trim();\n if (!token) throw new Error('The voice domain switch token is missing.');\n return token;\n}\n\nexport function errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\nexport function transitionError(result: DoomTransitionResult): Error {\n return new Error(`Domain transition was ${result.outcome}: ${result.diagnostics.join(', ')}`);\n}\n"],"mappings":"2GAQA,MACa,EAAiB,UAM9B,SAAgB,EAAa,EAAyB,CACpD,OAAO,EACJ,MAAM,GAAgB,CAAC,CACvB,IAAK,GAAS,EAAK,KAAK,CAAC,CAAC,CAC1B,OAAO,OAAO,CACnB,CAGA,SAAgB,EACd,EACA,EAA6D,CAAC,EAChD,CACd,OAAO,EAAM,IAAK,IAAU,CAC1B,MAAO,EACP,MAAO,EACP,GAAI,EAAa,GAAQ,CAAE,YAAa,EAAa,EAAM,EAAI,CAAC,CAClE,EAAE,CACJ,CAEA,SAAgB,EAAc,EAAgC,CAE5D,MAAO,mBADQ,EAAQ,UAAU,KAAK,IAAI,GAAA,SACT,uBAAuB,EAAQ,UAAU,KAAK,IAAI,EAAE,SAAS,EAAe,6BAC/G,CAEA,SAAgB,EAAgB,EAAoC,CAClE,MAAO,wBAAwB,EAAQ,KAAK,IAAI,GAAA,UAClD,CAEA,SAAgB,EAAiB,EAAoC,CACnE,MAAO,2BAA2B,EAAQ,KAAK,IAAI,GAAA,UACrD,CAEA,SAAgB,EAAY,EAAgC,CAC1D,MAAO,oBAAoB,EAAQ,UAAU,KAAK,IAAI,GAAA,SAAU,EAClE,CAQA,SAAgB,EAAqB,EAAqC,CACxE,GAAI,EAAO,OAASA,EAAAA,4BAClB,MAAU,MAAM,gBAAgBA,EAAAA,4BAA4B,0BAA0B,EAExF,IAAM,EAAmB,CAAC,EACpB,EAAO,IAAI,IACjB,IAAK,IAAM,KAAS,EAAQ,CAC1B,IAAM,EAAO,EAAM,KAAK,EACxB,GAAI,CAAC,GAAQ,EAAK,OAASC,EAAAA,kCAAoC,CAACC,EAAAA,iBAAiB,KAAK,CAAI,EACxF,MAAU,MAAM,wBAAwB,GAAO,EAE7C,EAAK,IAAI,CAAI,IACjB,EAAK,IAAI,CAAI,EACb,EAAO,KAAK,CAAI,EAClB,CACA,OAAO,CACT,CAGA,SAAgB,EAAiB,EAAkC,CACjE,IAAM,EAAU,EAAK,KAAK,EAC1B,GAAI,CAAC,EAAQ,WAAA,uBAAoC,EAAG,OACpD,IAAM,EAAQ,EAAQ,MAAM,MAAM,EAClC,GAAI,EAAM,SAAW,EAAG,MAAU,MAAM,kEAAkE,EAC1G,IAAM,EAAQ,EAAM,EAAE,EAAE,MAAM,EAAgC,CAAC,CAAC,KAAK,EACrE,GAAI,CAAC,EAAO,MAAU,MAAM,2CAA2C,EACvE,OAAO,CACT,CAEA,SAAgB,EAAa,EAAwB,CACnD,OAAO,aAAiB,MAAQ,EAAM,QAAU,OAAO,CAAK,CAC9D,CAEA,SAAgB,EAAgB,EAAqC,CACnE,OAAW,MAAM,yBAAyB,EAAO,QAAQ,IAAI,EAAO,YAAY,KAAK,IAAI,GAAG,CAC9F"}
@@ -0,0 +1,30 @@
1
+ import { DomainListing } from "../types/domains.cjs";
2
+ import { DoomTransitionResult } from "@agimon-ai/doompi-extension-contracts/transition";
3
+ import { SelectItem } from "@earendil-works/pi-tui";
4
+ //#region src/services/domainText.d.ts
5
+ declare const DOMAIN_COMMAND = "domains";
6
+ declare const VOICE_SWITCH_TOKEN_PREFIX = "--voice-switch-token=";
7
+ /** What an empty selection reads as, which is a real state rather than an error. */
8
+ declare const NONE = "(none)";
9
+ /** Splits the comma-separated argument the command and the autocomplete share. */
10
+ declare function splitDomains(value: string): string[];
11
+ /** Picker rows for the domain multi-select. */
12
+ declare function domainItems(names: string[], descriptions?: Readonly<Record<string, string | undefined>>): SelectItem[];
13
+ declare function domainSummary(listing: DomainListing): string;
14
+ declare function switchedSummary(domains: readonly string[]): string;
15
+ declare function unchangedSummary(domains: readonly string[]): string;
16
+ declare function pickerTitle(listing: DomainListing): string;
17
+ /**
18
+ * Deduplicates a requested selection and rejects anything unsafe.
19
+ *
20
+ * Bounded before the manifest is read, because a selection large enough to
21
+ * matter comes from the model rather than from a person typing the command.
22
+ */
23
+ declare function normalizeDomainNames(values: readonly string[]): string[];
24
+ /** The opaque token a voice switch hands to the follow-up command invocation. */
25
+ declare function voiceSwitchToken(args: string): string | undefined;
26
+ declare function errorMessage(error: unknown): string;
27
+ declare function transitionError(result: DoomTransitionResult): Error;
28
+ //#endregion
29
+ export { DOMAIN_COMMAND, NONE, VOICE_SWITCH_TOKEN_PREFIX, domainItems, domainSummary, errorMessage, normalizeDomainNames, pickerTitle, splitDomains, switchedSummary, transitionError, unchangedSummary, voiceSwitchToken };
30
+ //# sourceMappingURL=domainText.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domainText.d.cts","names":[],"sources":["../../src/services/domainText.ts"],"mappings":";;;;cASa;cACA;;cAEA;;iBAGG,aAAa;;iBAQb,YACd,iBACA,eAAc,SAAS,sCACtB;iBAQa,cAAc,SAAS;iBAKvB,gBAAgB;iBAIhB,iBAAiB;iBAIjB,YAAY,SAAS;;;;;;;iBAUrB,qBAAqB;;iBAmBrB,iBAAiB;iBAUjB,aAAa;iBAIb,gBAAgB,QAAQ,uBAAuB"}
@@ -0,0 +1,30 @@
1
+ import { DomainListing } from "../types/domains.mjs";
2
+ import { DoomTransitionResult } from "@agimon-ai/doompi-extension-contracts/transition";
3
+ import { SelectItem } from "@earendil-works/pi-tui";
4
+ //#region src/services/domainText.d.ts
5
+ declare const DOMAIN_COMMAND = "domains";
6
+ declare const VOICE_SWITCH_TOKEN_PREFIX = "--voice-switch-token=";
7
+ /** What an empty selection reads as, which is a real state rather than an error. */
8
+ declare const NONE = "(none)";
9
+ /** Splits the comma-separated argument the command and the autocomplete share. */
10
+ declare function splitDomains(value: string): string[];
11
+ /** Picker rows for the domain multi-select. */
12
+ declare function domainItems(names: string[], descriptions?: Readonly<Record<string, string | undefined>>): SelectItem[];
13
+ declare function domainSummary(listing: DomainListing): string;
14
+ declare function switchedSummary(domains: readonly string[]): string;
15
+ declare function unchangedSummary(domains: readonly string[]): string;
16
+ declare function pickerTitle(listing: DomainListing): string;
17
+ /**
18
+ * Deduplicates a requested selection and rejects anything unsafe.
19
+ *
20
+ * Bounded before the manifest is read, because a selection large enough to
21
+ * matter comes from the model rather than from a person typing the command.
22
+ */
23
+ declare function normalizeDomainNames(values: readonly string[]): string[];
24
+ /** The opaque token a voice switch hands to the follow-up command invocation. */
25
+ declare function voiceSwitchToken(args: string): string | undefined;
26
+ declare function errorMessage(error: unknown): string;
27
+ declare function transitionError(result: DoomTransitionResult): Error;
28
+ //#endregion
29
+ export { DOMAIN_COMMAND, NONE, VOICE_SWITCH_TOKEN_PREFIX, domainItems, domainSummary, errorMessage, normalizeDomainNames, pickerTitle, splitDomains, switchedSummary, transitionError, unchangedSummary, voiceSwitchToken };
30
+ //# sourceMappingURL=domainText.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domainText.d.mts","names":[],"sources":["../../src/services/domainText.ts"],"mappings":";;;;cASa;cACA;;cAEA;;iBAGG,aAAa;;iBAQb,YACd,iBACA,eAAc,SAAS,sCACtB;iBAQa,cAAc,SAAS;iBAKvB,gBAAgB;iBAIhB,iBAAiB;iBAIjB,YAAY,SAAS;;;;;;;iBAUrB,qBAAqB;;iBAmBrB,iBAAiB;iBAUjB,aAAa;iBAIb,gBAAgB,QAAQ,uBAAuB"}
@@ -0,0 +1,2 @@
1
+ import{SAFE_DOMAIN_NAME as e}from"../types/domains.mjs";import{VOICE_TOOL_MAX_DOMAIN_COUNT as t,VOICE_TOOL_MAX_IDENTIFIER_LENGTH as n}from"@agimon-ai/doompi-extension-contracts/voice-tools";const r=`domains`,i=`--voice-switch-token=`,a=`(none)`;function o(e){return e.split(`,`).map(e=>e.trim()).filter(Boolean)}function s(e,t={}){return e.map(e=>({value:e,label:e,...t[e]?{description:t[e]}:{}}))}function c(e){return`Active domains: ${e.effective.join(`, `)||`(none)`}\nAvailable domains: ${e.available.join(`, `)}\nUse /${r} <name[,name...]> to switch.`}function l(e){return`Switched domains to: ${e.join(`, `)||`(none)`}`}function u(e){return`Domains already active: ${e.join(`, `)||`(none)`}`}function d(e){return`Domains (active: ${e.effective.join(`, `)||`(none)`})`}function f(r){if(r.length>t)throw Error(`A maximum of ${t} domains may be selected.`);let i=[],a=new Set;for(let t of r){let r=t.trim();if(!r||r.length>n||!e.test(r))throw Error(`Invalid domain name: ${t}`);a.has(r)||(a.add(r),i.push(r))}return i}function p(e){let t=e.trim();if(!t.startsWith(`--voice-switch-token=`))return;let n=t.split(/\s+/u);if(n.length!==1)throw Error(`The voice domain switch token must be the only command argument.`);let r=n[0]?.slice(21).trim();if(!r)throw Error(`The voice domain switch token is missing.`);return r}function m(e){return e instanceof Error?e.message:String(e)}function h(e){return Error(`Domain transition was ${e.outcome}: ${e.diagnostics.join(`, `)}`)}export{r as DOMAIN_COMMAND,a as NONE,i as VOICE_SWITCH_TOKEN_PREFIX,s as domainItems,c as domainSummary,m as errorMessage,f as normalizeDomainNames,d as pickerTitle,o as splitDomains,l as switchedSummary,h as transitionError,u as unchangedSummary,p as voiceSwitchToken};
2
+ //# sourceMappingURL=domainText.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domainText.mjs","names":[],"sources":["../../src/services/domainText.ts"],"sourcesContent":["import type { DoomTransitionResult } from '@agimon-ai/doompi-extension-contracts/transition';\nimport {\n VOICE_TOOL_MAX_DOMAIN_COUNT,\n VOICE_TOOL_MAX_IDENTIFIER_LENGTH,\n} from '@agimon-ai/doompi-extension-contracts/voice-tools';\nimport type { SelectItem } from '@earendil-works/pi-tui';\nimport { type DomainListing, SAFE_DOMAIN_NAME } from '../types/domains.ts';\n\nconst DOMAIN_SEPARATOR = ',';\nexport const DOMAIN_COMMAND = 'domains';\nexport const VOICE_SWITCH_TOKEN_PREFIX = '--voice-switch-token=';\n/** What an empty selection reads as, which is a real state rather than an error. */\nexport const NONE = '(none)';\n\n/** Splits the comma-separated argument the command and the autocomplete share. */\nexport function splitDomains(value: string): string[] {\n return value\n .split(DOMAIN_SEPARATOR)\n .map((item) => item.trim())\n .filter(Boolean);\n}\n\n/** Picker rows for the domain multi-select. */\nexport function domainItems(\n names: string[],\n descriptions: Readonly<Record<string, string | undefined>> = {},\n): SelectItem[] {\n return names.map((name) => ({\n value: name,\n label: name,\n ...(descriptions[name] ? { description: descriptions[name] } : {}),\n }));\n}\n\nexport function domainSummary(listing: DomainListing): string {\n const active = listing.effective.join(', ') || NONE;\n return `Active domains: ${active}\\nAvailable domains: ${listing.available.join(', ')}\\nUse /${DOMAIN_COMMAND} <name[,name...]> to switch.`;\n}\n\nexport function switchedSummary(domains: readonly string[]): string {\n return `Switched domains to: ${domains.join(', ') || NONE}`;\n}\n\nexport function unchangedSummary(domains: readonly string[]): string {\n return `Domains already active: ${domains.join(', ') || NONE}`;\n}\n\nexport function pickerTitle(listing: DomainListing): string {\n return `Domains (active: ${listing.effective.join(', ') || NONE})`;\n}\n\n/**\n * Deduplicates a requested selection and rejects anything unsafe.\n *\n * Bounded before the manifest is read, because a selection large enough to\n * matter comes from the model rather than from a person typing the command.\n */\nexport function normalizeDomainNames(values: readonly string[]): string[] {\n if (values.length > VOICE_TOOL_MAX_DOMAIN_COUNT) {\n throw new Error(`A maximum of ${VOICE_TOOL_MAX_DOMAIN_COUNT} domains may be selected.`);\n }\n const result: string[] = [];\n const seen = new Set<string>();\n for (const value of values) {\n const name = value.trim();\n if (!name || name.length > VOICE_TOOL_MAX_IDENTIFIER_LENGTH || !SAFE_DOMAIN_NAME.test(name)) {\n throw new Error(`Invalid domain name: ${value}`);\n }\n if (seen.has(name)) continue;\n seen.add(name);\n result.push(name);\n }\n return result;\n}\n\n/** The opaque token a voice switch hands to the follow-up command invocation. */\nexport function voiceSwitchToken(args: string): string | undefined {\n const trimmed = args.trim();\n if (!trimmed.startsWith(VOICE_SWITCH_TOKEN_PREFIX)) return undefined;\n const parts = trimmed.split(/\\s+/u);\n if (parts.length !== 1) throw new Error('The voice domain switch token must be the only command argument.');\n const token = parts[0]?.slice(VOICE_SWITCH_TOKEN_PREFIX.length).trim();\n if (!token) throw new Error('The voice domain switch token is missing.');\n return token;\n}\n\nexport function errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\nexport function transitionError(result: DoomTransitionResult): Error {\n return new Error(`Domain transition was ${result.outcome}: ${result.diagnostics.join(', ')}`);\n}\n"],"mappings":"8LAQA,MACa,EAAiB,UACjB,EAA4B,wBAE5B,EAAO,SAGpB,SAAgB,EAAa,EAAyB,CACpD,OAAO,EACJ,MAAM,GAAgB,CAAC,CACvB,IAAK,GAAS,EAAK,KAAK,CAAC,CAAC,CAC1B,OAAO,OAAO,CACnB,CAGA,SAAgB,EACd,EACA,EAA6D,CAAC,EAChD,CACd,OAAO,EAAM,IAAK,IAAU,CAC1B,MAAO,EACP,MAAO,EACP,GAAI,EAAa,GAAQ,CAAE,YAAa,EAAa,EAAM,EAAI,CAAC,CAClE,EAAE,CACJ,CAEA,SAAgB,EAAc,EAAgC,CAE5D,MAAO,mBADQ,EAAQ,UAAU,KAAK,IAAI,GAAA,SACT,uBAAuB,EAAQ,UAAU,KAAK,IAAI,EAAE,SAAS,EAAe,6BAC/G,CAEA,SAAgB,EAAgB,EAAoC,CAClE,MAAO,wBAAwB,EAAQ,KAAK,IAAI,GAAA,UAClD,CAEA,SAAgB,EAAiB,EAAoC,CACnE,MAAO,2BAA2B,EAAQ,KAAK,IAAI,GAAA,UACrD,CAEA,SAAgB,EAAY,EAAgC,CAC1D,MAAO,oBAAoB,EAAQ,UAAU,KAAK,IAAI,GAAA,SAAU,EAClE,CAQA,SAAgB,EAAqB,EAAqC,CACxE,GAAI,EAAO,OAAS,EAClB,MAAU,MAAM,gBAAgB,EAA4B,0BAA0B,EAExF,IAAM,EAAmB,CAAC,EACpB,EAAO,IAAI,IACjB,IAAK,IAAM,KAAS,EAAQ,CAC1B,IAAM,EAAO,EAAM,KAAK,EACxB,GAAI,CAAC,GAAQ,EAAK,OAAS,GAAoC,CAAC,EAAiB,KAAK,CAAI,EACxF,MAAU,MAAM,wBAAwB,GAAO,EAE7C,EAAK,IAAI,CAAI,IACjB,EAAK,IAAI,CAAI,EACb,EAAO,KAAK,CAAI,EAClB,CACA,OAAO,CACT,CAGA,SAAgB,EAAiB,EAAkC,CACjE,IAAM,EAAU,EAAK,KAAK,EAC1B,GAAI,CAAC,EAAQ,WAAA,uBAAoC,EAAG,OACpD,IAAM,EAAQ,EAAQ,MAAM,MAAM,EAClC,GAAI,EAAM,SAAW,EAAG,MAAU,MAAM,kEAAkE,EAC1G,IAAM,EAAQ,EAAM,EAAE,EAAE,MAAM,EAAgC,CAAC,CAAC,KAAK,EACrE,GAAI,CAAC,EAAO,MAAU,MAAM,2CAA2C,EACvE,OAAO,CACT,CAEA,SAAgB,EAAa,EAAwB,CACnD,OAAO,aAAiB,MAAQ,EAAM,QAAU,OAAO,CAAK,CAC9D,CAEA,SAAgB,EAAgB,EAAqC,CACnE,OAAW,MAAM,yBAAyB,EAAO,QAAQ,IAAI,EAAO,YAAY,KAAK,IAAI,GAAG,CAC9F"}
@@ -0,0 +1,2 @@
1
+ const e=new Map([[`Read`,`read`],[`Edit`,`edit`],[`Write`,`write`],[`Bash`,`bash`],[`Glob`,`find`],[`Grep`,`grep`],[`Agent`,`subagent`]]),t=new Set(e.values()),n=new Set([`WebFetch`,`WebSearch`]);function r(r){if(r===`Skill`)return;if(n.has(r)||r.startsWith(`mcp__`))return`mcp`;let i=e.get(r);if(i)return i;if(r===`mcp`||t.has(r))return r;throw Error(`Unsupported agent tool: ${r}`)}exports.toPiToolName=r;
2
+ //# sourceMappingURL=toolNames.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolNames.cjs","names":[],"sources":["../../src/services/toolNames.ts"],"sourcesContent":["/**\n * Translation from Claude tool names to Pi tool names.\n *\n * Agent definitions inside a domain's plugins are authored with Claude names and\n * have to be rewritten before Pi loads them. The reverse map is derived from the\n * forward one so a name that is already written for Pi passes through without a\n * second hand-maintained table to keep in step.\n */\n\nconst CLAUDE_TO_PI = new Map([\n ['Read', 'read'],\n ['Edit', 'edit'],\n ['Write', 'write'],\n ['Bash', 'bash'],\n ['Glob', 'find'],\n ['Grep', 'grep'],\n ['Agent', 'subagent'],\n]);\n\nconst PI_TOOL_NAMES = new Set(CLAUDE_TO_PI.values());\n\nconst MCP_TOOL = 'mcp';\nconst SKILL_TOOL = 'Skill';\nconst MCP_TOOL_PREFIX = 'mcp__';\nconst WEB_TOOLS = new Set(['WebFetch', 'WebSearch']);\n\n/**\n * Pi's name for a tool named in an agent definition.\n *\n * Returns undefined for Skill, which Pi discovers rather than declares. Web and\n * MCP tools all collapse onto Pi's single `mcp` tool. Definitions already\n * written against Pi pass through unchanged, and an unrecognised name throws\n * rather than reaching Pi as a tool it will silently ignore.\n */\nexport function toPiToolName(tool: string): string | undefined {\n if (tool === SKILL_TOOL) return undefined;\n if (WEB_TOOLS.has(tool) || tool.startsWith(MCP_TOOL_PREFIX)) return MCP_TOOL;\n const mapped = CLAUDE_TO_PI.get(tool);\n if (mapped) return mapped;\n if (tool === MCP_TOOL || PI_TOOL_NAMES.has(tool)) return tool;\n throw new Error(`Unsupported agent tool: ${tool}`);\n}\n"],"mappings":"AASA,MAAM,EAAe,IAAI,IAAI,CAC3B,CAAC,OAAQ,MAAM,EACf,CAAC,OAAQ,MAAM,EACf,CAAC,QAAS,OAAO,EACjB,CAAC,OAAQ,MAAM,EACf,CAAC,OAAQ,MAAM,EACf,CAAC,OAAQ,MAAM,EACf,CAAC,QAAS,UAAU,CACtB,CAAC,EAEK,EAAgB,IAAI,IAAI,EAAa,OAAO,CAAC,EAK7C,EAAY,IAAI,IAAI,CAAC,WAAY,WAAW,CAAC,EAUnD,SAAgB,EAAa,EAAkC,CAC7D,GAAI,IAAS,QAAY,OACzB,GAAI,EAAU,IAAI,CAAI,GAAK,EAAK,WAAW,OAAe,EAAG,MAAO,MACpE,IAAM,EAAS,EAAa,IAAI,CAAI,EACpC,GAAI,EAAQ,OAAO,EACnB,GAAI,IAAS,OAAY,EAAc,IAAI,CAAI,EAAG,OAAO,EACzD,MAAU,MAAM,2BAA2B,GAAM,CACnD"}
@@ -0,0 +1,21 @@
1
+ //#region src/services/toolNames.d.ts
2
+ /**
3
+ * Translation from Claude tool names to Pi tool names.
4
+ *
5
+ * Agent definitions inside a domain's plugins are authored with Claude names and
6
+ * have to be rewritten before Pi loads them. The reverse map is derived from the
7
+ * forward one so a name that is already written for Pi passes through without a
8
+ * second hand-maintained table to keep in step.
9
+ */
10
+ /**
11
+ * Pi's name for a tool named in an agent definition.
12
+ *
13
+ * Returns undefined for Skill, which Pi discovers rather than declares. Web and
14
+ * MCP tools all collapse onto Pi's single `mcp` tool. Definitions already
15
+ * written against Pi pass through unchanged, and an unrecognised name throws
16
+ * rather than reaching Pi as a tool it will silently ignore.
17
+ */
18
+ declare function toPiToolName(tool: string): string | undefined;
19
+ //#endregion
20
+ export { toPiToolName };
21
+ //# sourceMappingURL=toolNames.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolNames.d.cts","names":[],"sources":["../../src/services/toolNames.ts"],"mappings":";;;;;;;;;;;;;;;;;iBAkCgB,aAAa"}
@@ -0,0 +1,21 @@
1
+ //#region src/services/toolNames.d.ts
2
+ /**
3
+ * Translation from Claude tool names to Pi tool names.
4
+ *
5
+ * Agent definitions inside a domain's plugins are authored with Claude names and
6
+ * have to be rewritten before Pi loads them. The reverse map is derived from the
7
+ * forward one so a name that is already written for Pi passes through without a
8
+ * second hand-maintained table to keep in step.
9
+ */
10
+ /**
11
+ * Pi's name for a tool named in an agent definition.
12
+ *
13
+ * Returns undefined for Skill, which Pi discovers rather than declares. Web and
14
+ * MCP tools all collapse onto Pi's single `mcp` tool. Definitions already
15
+ * written against Pi pass through unchanged, and an unrecognised name throws
16
+ * rather than reaching Pi as a tool it will silently ignore.
17
+ */
18
+ declare function toPiToolName(tool: string): string | undefined;
19
+ //#endregion
20
+ export { toPiToolName };
21
+ //# sourceMappingURL=toolNames.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolNames.d.mts","names":[],"sources":["../../src/services/toolNames.ts"],"mappings":";;;;;;;;;;;;;;;;;iBAkCgB,aAAa"}
@@ -0,0 +1,2 @@
1
+ const e=new Map([[`Read`,`read`],[`Edit`,`edit`],[`Write`,`write`],[`Bash`,`bash`],[`Glob`,`find`],[`Grep`,`grep`],[`Agent`,`subagent`]]),t=new Set(e.values()),n=new Set([`WebFetch`,`WebSearch`]);function r(r){if(r===`Skill`)return;if(n.has(r)||r.startsWith(`mcp__`))return`mcp`;let i=e.get(r);if(i)return i;if(r===`mcp`||t.has(r))return r;throw Error(`Unsupported agent tool: ${r}`)}export{r as toPiToolName};
2
+ //# sourceMappingURL=toolNames.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolNames.mjs","names":[],"sources":["../../src/services/toolNames.ts"],"sourcesContent":["/**\n * Translation from Claude tool names to Pi tool names.\n *\n * Agent definitions inside a domain's plugins are authored with Claude names and\n * have to be rewritten before Pi loads them. The reverse map is derived from the\n * forward one so a name that is already written for Pi passes through without a\n * second hand-maintained table to keep in step.\n */\n\nconst CLAUDE_TO_PI = new Map([\n ['Read', 'read'],\n ['Edit', 'edit'],\n ['Write', 'write'],\n ['Bash', 'bash'],\n ['Glob', 'find'],\n ['Grep', 'grep'],\n ['Agent', 'subagent'],\n]);\n\nconst PI_TOOL_NAMES = new Set(CLAUDE_TO_PI.values());\n\nconst MCP_TOOL = 'mcp';\nconst SKILL_TOOL = 'Skill';\nconst MCP_TOOL_PREFIX = 'mcp__';\nconst WEB_TOOLS = new Set(['WebFetch', 'WebSearch']);\n\n/**\n * Pi's name for a tool named in an agent definition.\n *\n * Returns undefined for Skill, which Pi discovers rather than declares. Web and\n * MCP tools all collapse onto Pi's single `mcp` tool. Definitions already\n * written against Pi pass through unchanged, and an unrecognised name throws\n * rather than reaching Pi as a tool it will silently ignore.\n */\nexport function toPiToolName(tool: string): string | undefined {\n if (tool === SKILL_TOOL) return undefined;\n if (WEB_TOOLS.has(tool) || tool.startsWith(MCP_TOOL_PREFIX)) return MCP_TOOL;\n const mapped = CLAUDE_TO_PI.get(tool);\n if (mapped) return mapped;\n if (tool === MCP_TOOL || PI_TOOL_NAMES.has(tool)) return tool;\n throw new Error(`Unsupported agent tool: ${tool}`);\n}\n"],"mappings":"AASA,MAAM,EAAe,IAAI,IAAI,CAC3B,CAAC,OAAQ,MAAM,EACf,CAAC,OAAQ,MAAM,EACf,CAAC,QAAS,OAAO,EACjB,CAAC,OAAQ,MAAM,EACf,CAAC,OAAQ,MAAM,EACf,CAAC,OAAQ,MAAM,EACf,CAAC,QAAS,UAAU,CACtB,CAAC,EAEK,EAAgB,IAAI,IAAI,EAAa,OAAO,CAAC,EAK7C,EAAY,IAAI,IAAI,CAAC,WAAY,WAAW,CAAC,EAUnD,SAAgB,EAAa,EAAkC,CAC7D,GAAI,IAAS,QAAY,OACzB,GAAI,EAAU,IAAI,CAAI,GAAK,EAAK,WAAW,OAAe,EAAG,MAAO,MACpE,IAAM,EAAS,EAAa,IAAI,CAAI,EACpC,GAAI,EAAQ,OAAO,EACnB,GAAI,IAAS,OAAY,EAAc,IAAI,CAAI,EAAG,OAAO,EACzD,MAAU,MAAM,2BAA2B,GAAM,CACnD"}
@@ -0,0 +1,2 @@
1
+ const e=/^[A-Za-z0-9@][A-Za-z0-9@/._:-]*$/u;exports.DOMAIN_SOURCE=`@agimon-ai/doompi-domain`,exports.SAFE_DOMAIN_NAME=e;
2
+ //# sourceMappingURL=domains.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domains.cjs","names":[],"sources":["../../src/types/domains.ts"],"sourcesContent":["/** The npm name this package registers its voice tools and contributions under. */\nexport const DOMAIN_SOURCE = '@agimon-ai/doompi-domain';\n\n/**\n * The only names a domain, an operation or a handoff token may carry.\n *\n * Selections arrive from the model and from the command line, and every one of\n * them ends up in a filesystem path or a process environment variable, so the\n * shape is constrained once here and reused by the schema and the validator.\n */\nexport const SAFE_DOMAIN_NAME = /^[A-Za-z0-9@][A-Za-z0-9@/._:-]*$/u;\n\n/**\n * The selection as the command, the picker and the voice tool all need to see it.\n *\n * `active` is what the session persisted and `effective` is what it is running\n * with, which differ while a major mode contributes its default domains.\n */\nexport interface DomainListing {\n readonly active: string[];\n readonly effective: string[];\n readonly available: string[];\n}\n\n/** One comma-triggered autocomplete response for the `/domains` argument. */\nexport interface DomainCompletion {\n readonly prefix: string;\n readonly items: Array<{ value: string; label: string }>;\n}\n"],"mappings":"AACA,MASa,EAAmB"}
@@ -0,0 +1,33 @@
1
+ //#region src/types/domains.d.ts
2
+ /** The npm name this package registers its voice tools and contributions under. */
3
+ declare const DOMAIN_SOURCE = "@agimon-ai/doompi-domain";
4
+ /**
5
+ * The only names a domain, an operation or a handoff token may carry.
6
+ *
7
+ * Selections arrive from the model and from the command line, and every one of
8
+ * them ends up in a filesystem path or a process environment variable, so the
9
+ * shape is constrained once here and reused by the schema and the validator.
10
+ */
11
+ declare const SAFE_DOMAIN_NAME: RegExp;
12
+ /**
13
+ * The selection as the command, the picker and the voice tool all need to see it.
14
+ *
15
+ * `active` is what the session persisted and `effective` is what it is running
16
+ * with, which differ while a major mode contributes its default domains.
17
+ */
18
+ interface DomainListing {
19
+ readonly active: string[];
20
+ readonly effective: string[];
21
+ readonly available: string[];
22
+ }
23
+ /** One comma-triggered autocomplete response for the `/domains` argument. */
24
+ interface DomainCompletion {
25
+ readonly prefix: string;
26
+ readonly items: Array<{
27
+ value: string;
28
+ label: string;
29
+ }>;
30
+ }
31
+ //#endregion
32
+ export { DOMAIN_SOURCE, DomainCompletion, DomainListing, SAFE_DOMAIN_NAME };
33
+ //# sourceMappingURL=domains.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domains.d.cts","names":[],"sources":["../../src/types/domains.ts"],"mappings":";;cACa;;;;;;;;cASA,kBAAgB;;;;;;;UAQZ;WACN;WACA;WACA;;;UAIM;WACN;WACA,OAAO;IAAQ;IAAe"}
@@ -0,0 +1,33 @@
1
+ //#region src/types/domains.d.ts
2
+ /** The npm name this package registers its voice tools and contributions under. */
3
+ declare const DOMAIN_SOURCE = "@agimon-ai/doompi-domain";
4
+ /**
5
+ * The only names a domain, an operation or a handoff token may carry.
6
+ *
7
+ * Selections arrive from the model and from the command line, and every one of
8
+ * them ends up in a filesystem path or a process environment variable, so the
9
+ * shape is constrained once here and reused by the schema and the validator.
10
+ */
11
+ declare const SAFE_DOMAIN_NAME: RegExp;
12
+ /**
13
+ * The selection as the command, the picker and the voice tool all need to see it.
14
+ *
15
+ * `active` is what the session persisted and `effective` is what it is running
16
+ * with, which differ while a major mode contributes its default domains.
17
+ */
18
+ interface DomainListing {
19
+ readonly active: string[];
20
+ readonly effective: string[];
21
+ readonly available: string[];
22
+ }
23
+ /** One comma-triggered autocomplete response for the `/domains` argument. */
24
+ interface DomainCompletion {
25
+ readonly prefix: string;
26
+ readonly items: Array<{
27
+ value: string;
28
+ label: string;
29
+ }>;
30
+ }
31
+ //#endregion
32
+ export { DOMAIN_SOURCE, DomainCompletion, DomainListing, SAFE_DOMAIN_NAME };
33
+ //# sourceMappingURL=domains.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domains.d.mts","names":[],"sources":["../../src/types/domains.ts"],"mappings":";;cACa;;;;;;;;cASA,kBAAgB;;;;;;;UAQZ;WACN;WACA;WACA;;;UAIM;WACN;WACA,OAAO;IAAQ;IAAe"}
@@ -0,0 +1,2 @@
1
+ const e=`@agimon-ai/doompi-domain`,t=/^[A-Za-z0-9@][A-Za-z0-9@/._:-]*$/u;export{e as DOMAIN_SOURCE,t as SAFE_DOMAIN_NAME};
2
+ //# sourceMappingURL=domains.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domains.mjs","names":[],"sources":["../../src/types/domains.ts"],"sourcesContent":["/** The npm name this package registers its voice tools and contributions under. */\nexport const DOMAIN_SOURCE = '@agimon-ai/doompi-domain';\n\n/**\n * The only names a domain, an operation or a handoff token may carry.\n *\n * Selections arrive from the model and from the command line, and every one of\n * them ends up in a filesystem path or a process environment variable, so the\n * shape is constrained once here and reused by the schema and the validator.\n */\nexport const SAFE_DOMAIN_NAME = /^[A-Za-z0-9@][A-Za-z0-9@/._:-]*$/u;\n\n/**\n * The selection as the command, the picker and the voice tool all need to see it.\n *\n * `active` is what the session persisted and `effective` is what it is running\n * with, which differ while a major mode contributes its default domains.\n */\nexport interface DomainListing {\n readonly active: string[];\n readonly effective: string[];\n readonly available: string[];\n}\n\n/** One comma-triggered autocomplete response for the `/domains` argument. */\nexport interface DomainCompletion {\n readonly prefix: string;\n readonly items: Array<{ value: string; label: string }>;\n}\n"],"mappings":"AACA,MAAa,EAAgB,2BAShB,EAAmB"}
@@ -0,0 +1,35 @@
1
+ //#region src/types/handoff.d.ts
2
+ interface DomainSwitchHandoffIdentity {
3
+ readonly sessionId: string;
4
+ readonly hostGeneration?: string;
5
+ }
6
+ interface DomainSwitchHandoffRequest extends DomainSwitchHandoffIdentity {
7
+ readonly hostGeneration: string;
8
+ readonly operationId: string;
9
+ readonly domains: readonly string[];
10
+ readonly reloadHandoffToken: string;
11
+ }
12
+ interface DomainSwitchHandoff extends DomainSwitchHandoffRequest {
13
+ readonly token: string;
14
+ readonly createdAt: number;
15
+ readonly expiresAt: number;
16
+ }
17
+ /**
18
+ * The TTL-bounded store standing between the voice tool and the command.
19
+ *
20
+ * The voice tool cannot reload the session itself, so it parks the validated
21
+ * selection here and sends the command an opaque token. Every owner gets its own
22
+ * generation so two stores sharing the process registry cannot read each other's
23
+ * records.
24
+ */
25
+ interface DomainSwitchHandoffStore {
26
+ readonly ownerGeneration: string;
27
+ issue(request: DomainSwitchHandoffRequest): DomainSwitchHandoff;
28
+ consume(token: string, identity: DomainSwitchHandoffIdentity): DomainSwitchHandoff | undefined;
29
+ discard(token: string, identity: DomainSwitchHandoffIdentity): boolean;
30
+ clearSession(sessionId: string): number;
31
+ dispose(): number;
32
+ }
33
+ //#endregion
34
+ export { DomainSwitchHandoff, DomainSwitchHandoffIdentity, DomainSwitchHandoffRequest, DomainSwitchHandoffStore };
35
+ //# sourceMappingURL=handoff.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handoff.d.cts","names":[],"sources":["../../src/types/handoff.ts"],"mappings":";UAAiB;WACN;WACA;;UAGM,mCAAmC;WACzC;WACA;WACA;WACA;;UAGM,4BAA4B;WAClC;WACA;WACA;;;;;;;;;;UAWM;WACN;EACT,MAAM,SAAS,6BAA6B;EAC5C,QAAQ,eAAe,UAAU,8BAA8B;EAC/D,QAAQ,eAAe,UAAU;EACjC,aAAa;EACb"}
@@ -0,0 +1,35 @@
1
+ //#region src/types/handoff.d.ts
2
+ interface DomainSwitchHandoffIdentity {
3
+ readonly sessionId: string;
4
+ readonly hostGeneration?: string;
5
+ }
6
+ interface DomainSwitchHandoffRequest extends DomainSwitchHandoffIdentity {
7
+ readonly hostGeneration: string;
8
+ readonly operationId: string;
9
+ readonly domains: readonly string[];
10
+ readonly reloadHandoffToken: string;
11
+ }
12
+ interface DomainSwitchHandoff extends DomainSwitchHandoffRequest {
13
+ readonly token: string;
14
+ readonly createdAt: number;
15
+ readonly expiresAt: number;
16
+ }
17
+ /**
18
+ * The TTL-bounded store standing between the voice tool and the command.
19
+ *
20
+ * The voice tool cannot reload the session itself, so it parks the validated
21
+ * selection here and sends the command an opaque token. Every owner gets its own
22
+ * generation so two stores sharing the process registry cannot read each other's
23
+ * records.
24
+ */
25
+ interface DomainSwitchHandoffStore {
26
+ readonly ownerGeneration: string;
27
+ issue(request: DomainSwitchHandoffRequest): DomainSwitchHandoff;
28
+ consume(token: string, identity: DomainSwitchHandoffIdentity): DomainSwitchHandoff | undefined;
29
+ discard(token: string, identity: DomainSwitchHandoffIdentity): boolean;
30
+ clearSession(sessionId: string): number;
31
+ dispose(): number;
32
+ }
33
+ //#endregion
34
+ export { DomainSwitchHandoff, DomainSwitchHandoffIdentity, DomainSwitchHandoffRequest, DomainSwitchHandoffStore };
35
+ //# sourceMappingURL=handoff.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handoff.d.mts","names":[],"sources":["../../src/types/handoff.ts"],"mappings":";UAAiB;WACN;WACA;;UAGM,mCAAmC;WACzC;WACA;WACA;WACA;;UAGM,4BAA4B;WAClC;WACA;WACA;;;;;;;;;;UAWM;WACN;EACT,MAAM,SAAS,6BAA6B;EAC5C,QAAQ,eAAe,UAAU,8BAA8B;EAC/D,QAAQ,eAAe,UAAU;EACjC,aAAa;EACb"}
@@ -0,0 +1,46 @@
1
+ import { PluginHookSource } from "@agimon-ai/doompi-config/types";
2
+ //#region src/types/resources.d.ts
3
+ /** A JSON document the harness owns on disk, before it is given a shape. */
4
+ type JsonObject = Record<string, unknown>;
5
+ /** A skill or agent that has been located and named, but not yet staged. */
6
+ interface NamedResource {
7
+ name: string;
8
+ path: string;
9
+ digest?: string;
10
+ }
11
+ interface HarnessResourceOptions {
12
+ agents: boolean;
13
+ mcp: boolean;
14
+ temporaryDirectory?: string;
15
+ /** Persistent metadata cache; defaults to the home-scoped worktree cache. */
16
+ skillCacheDirectory?: string;
17
+ /** Domain MCP allowlist. Omit to keep every configured server. */
18
+ mcpAllowlist?: {
19
+ servers?: string[];
20
+ proxy?: string[];
21
+ };
22
+ /** Include .claude/skills as fallbacks after selected plugin skills. Defaults to true. */
23
+ sharedSkills?: boolean;
24
+ }
25
+ interface HarnessResources {
26
+ temporaryDirectory: string;
27
+ /** Exact SKILL.md paths compiled from the selected discovery roots. */
28
+ skillDirectories: string[];
29
+ /** Number of discovered SKILL.md files, which is what reaches the model. */
30
+ skillCount: number;
31
+ agentCount: number;
32
+ agentDirectories: string[];
33
+ pluginHooks: PluginHookSource[];
34
+ mcpConfigPath?: string;
35
+ /**
36
+ * The plugin `.mcp.json` files this run selected, in precedence order.
37
+ *
38
+ * The merged `mcpConfigPath` above is for external frontends; doom-mcp reads
39
+ * these layers itself so mcp-proxy owns the merge for the in-process path.
40
+ */
41
+ pluginMcpConfigPaths: string[];
42
+ cleanup(): Promise<void>;
43
+ }
44
+ //#endregion
45
+ export { HarnessResourceOptions, HarnessResources, JsonObject, NamedResource };
46
+ //# sourceMappingURL=resources.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.d.cts","names":[],"sources":["../../src/types/resources.ts"],"mappings":";;;KAGY,aAAa;;UAGR;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA;;EAEA;;EAEA;IAAiB;IAAoB;;;EAErC;;UAGe;EACf;;EAEA;;EAEA;EACA;EACA;EACA,aAAa;EACb;;;;;;;EAOA;EACA,WAAW"}
@@ -0,0 +1,46 @@
1
+ import { PluginHookSource } from "@agimon-ai/doompi-config/types";
2
+ //#region src/types/resources.d.ts
3
+ /** A JSON document the harness owns on disk, before it is given a shape. */
4
+ type JsonObject = Record<string, unknown>;
5
+ /** A skill or agent that has been located and named, but not yet staged. */
6
+ interface NamedResource {
7
+ name: string;
8
+ path: string;
9
+ digest?: string;
10
+ }
11
+ interface HarnessResourceOptions {
12
+ agents: boolean;
13
+ mcp: boolean;
14
+ temporaryDirectory?: string;
15
+ /** Persistent metadata cache; defaults to the home-scoped worktree cache. */
16
+ skillCacheDirectory?: string;
17
+ /** Domain MCP allowlist. Omit to keep every configured server. */
18
+ mcpAllowlist?: {
19
+ servers?: string[];
20
+ proxy?: string[];
21
+ };
22
+ /** Include .claude/skills as fallbacks after selected plugin skills. Defaults to true. */
23
+ sharedSkills?: boolean;
24
+ }
25
+ interface HarnessResources {
26
+ temporaryDirectory: string;
27
+ /** Exact SKILL.md paths compiled from the selected discovery roots. */
28
+ skillDirectories: string[];
29
+ /** Number of discovered SKILL.md files, which is what reaches the model. */
30
+ skillCount: number;
31
+ agentCount: number;
32
+ agentDirectories: string[];
33
+ pluginHooks: PluginHookSource[];
34
+ mcpConfigPath?: string;
35
+ /**
36
+ * The plugin `.mcp.json` files this run selected, in precedence order.
37
+ *
38
+ * The merged `mcpConfigPath` above is for external frontends; doom-mcp reads
39
+ * these layers itself so mcp-proxy owns the merge for the in-process path.
40
+ */
41
+ pluginMcpConfigPaths: string[];
42
+ cleanup(): Promise<void>;
43
+ }
44
+ //#endregion
45
+ export { HarnessResourceOptions, HarnessResources, JsonObject, NamedResource };
46
+ //# sourceMappingURL=resources.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.d.mts","names":[],"sources":["../../src/types/resources.ts"],"mappings":";;;KAGY,aAAa;;UAGR;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA;;EAEA;;EAEA;IAAiB;IAAoB;;;EAErC;;UAGe;EACf;;EAEA;;EAEA;EACA;EACA;EACA,aAAa;EACb;;;;;;;EAOA;EACA,WAAW"}
@@ -0,0 +1,2 @@
1
+ const e={domainsSwitched:`doom_pi_domains.switched`,domainsSwitchFailed:`doom_pi_domains.switch_failed`};exports.DOMAIN_EVENT=e;
2
+ //# sourceMappingURL=telemetry.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.cjs","names":[],"sources":["../../src/types/telemetry.ts"],"sourcesContent":["/** Telemetry events this package reports, and the port that records them. */\nexport const DOMAIN_EVENT = {\n domainsSwitched: 'doom_pi_domains.switched',\n domainsSwitchFailed: 'doom_pi_domains.switch_failed',\n} as const;\n\nexport type DomainEventName = (typeof DOMAIN_EVENT)[keyof typeof DOMAIN_EVENT];\nexport type DomainEventAttributes = Record<string, string | number | boolean>;\n\nexport interface DomainTelemetry {\n recordError(event: DomainEventName, error: unknown, attributes?: DomainEventAttributes): Promise<void>;\n recordEvent(event: DomainEventName, attributes?: DomainEventAttributes): Promise<void>;\n}\n"],"mappings":"AACA,MAAa,EAAe,CAC1B,gBAAiB,2BACjB,oBAAqB,+BACvB"}
@@ -0,0 +1,15 @@
1
+ //#region src/types/telemetry.d.ts
2
+ /** Telemetry events this package reports, and the port that records them. */
3
+ declare const DOMAIN_EVENT: {
4
+ readonly domainsSwitched: "doom_pi_domains.switched";
5
+ readonly domainsSwitchFailed: "doom_pi_domains.switch_failed";
6
+ };
7
+ type DomainEventName = (typeof DOMAIN_EVENT)[keyof typeof DOMAIN_EVENT];
8
+ type DomainEventAttributes = Record<string, string | number | boolean>;
9
+ interface DomainTelemetry {
10
+ recordError(event: DomainEventName, error: unknown, attributes?: DomainEventAttributes): Promise<void>;
11
+ recordEvent(event: DomainEventName, attributes?: DomainEventAttributes): Promise<void>;
12
+ }
13
+ //#endregion
14
+ export { DOMAIN_EVENT, DomainEventAttributes, DomainEventName, DomainTelemetry };
15
+ //# sourceMappingURL=telemetry.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.d.cts","names":[],"sources":["../../src/types/telemetry.ts"],"mappings":";;cACa;WAAA;WAAA;;KAKD,0BAA0B,2BAA2B;KACrD,wBAAwB;UAEnB;EACf,YAAY,OAAO,iBAAiB,gBAAgB,aAAa,wBAAwB;EACzF,YAAY,OAAO,iBAAiB,aAAa,wBAAwB"}
@@ -0,0 +1,15 @@
1
+ //#region src/types/telemetry.d.ts
2
+ /** Telemetry events this package reports, and the port that records them. */
3
+ declare const DOMAIN_EVENT: {
4
+ readonly domainsSwitched: "doom_pi_domains.switched";
5
+ readonly domainsSwitchFailed: "doom_pi_domains.switch_failed";
6
+ };
7
+ type DomainEventName = (typeof DOMAIN_EVENT)[keyof typeof DOMAIN_EVENT];
8
+ type DomainEventAttributes = Record<string, string | number | boolean>;
9
+ interface DomainTelemetry {
10
+ recordError(event: DomainEventName, error: unknown, attributes?: DomainEventAttributes): Promise<void>;
11
+ recordEvent(event: DomainEventName, attributes?: DomainEventAttributes): Promise<void>;
12
+ }
13
+ //#endregion
14
+ export { DOMAIN_EVENT, DomainEventAttributes, DomainEventName, DomainTelemetry };
15
+ //# sourceMappingURL=telemetry.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.d.mts","names":[],"sources":["../../src/types/telemetry.ts"],"mappings":";;cACa;WAAA;WAAA;;KAKD,0BAA0B,2BAA2B;KACrD,wBAAwB;UAEnB;EACf,YAAY,OAAO,iBAAiB,gBAAgB,aAAa,wBAAwB;EACzF,YAAY,OAAO,iBAAiB,aAAa,wBAAwB"}
@@ -0,0 +1,2 @@
1
+ const e={domainsSwitched:`doom_pi_domains.switched`,domainsSwitchFailed:`doom_pi_domains.switch_failed`};export{e as DOMAIN_EVENT};
2
+ //# sourceMappingURL=telemetry.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.mjs","names":[],"sources":["../../src/types/telemetry.ts"],"sourcesContent":["/** Telemetry events this package reports, and the port that records them. */\nexport const DOMAIN_EVENT = {\n domainsSwitched: 'doom_pi_domains.switched',\n domainsSwitchFailed: 'doom_pi_domains.switch_failed',\n} as const;\n\nexport type DomainEventName = (typeof DOMAIN_EVENT)[keyof typeof DOMAIN_EVENT];\nexport type DomainEventAttributes = Record<string, string | number | boolean>;\n\nexport interface DomainTelemetry {\n recordError(event: DomainEventName, error: unknown, attributes?: DomainEventAttributes): Promise<void>;\n recordEvent(event: DomainEventName, attributes?: DomainEventAttributes): Promise<void>;\n}\n"],"mappings":"AACA,MAAa,EAAe,CAC1B,gBAAiB,2BACjB,oBAAqB,+BACvB"}
package/llms.txt ADDED
@@ -0,0 +1,7 @@
1
+ # Doom Pi Domain
2
+
3
+ Domain selection and resource staging for Doom Pi sessions.
4
+
5
+ ## Resources
6
+
7
+ - [Package README](./README.md): the `/domains` command, the `list_domains` and `switch_domains` voice tools, and what a domain switch stages.