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

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 (175) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +85 -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 +21 -0
  15. package/dist/adapters/domainCatalog.d.cts.map +1 -0
  16. package/dist/adapters/domainCatalog.d.mts +21 -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 +8 -0
  47. package/dist/adapters/pi/extension.d.cts.map +1 -0
  48. package/dist/adapters/pi/extension.d.mts +8 -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 +19 -0
  55. package/dist/adapters/pi/voiceTool.d.cts.map +1 -0
  56. package/dist/adapters/pi/voiceTool.d.mts +19 -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 +27 -0
  71. package/dist/adapters/resourceCollector.d.cts.map +1 -0
  72. package/dist/adapters/resourceCollector.d.mts +27 -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 +28 -0
  99. package/dist/commands/domainsCommand.d.cts.map +1 -0
  100. package/dist/commands/domainsCommand.d.mts +28 -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 +4 -0
  114. package/dist/mcp.d.mts +4 -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 +65 -0
  161. package/dist/types/resources.d.cts.map +1 -0
  162. package/dist/types/resources.d.mts +65 -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 +12 -0
  173. package/package.json +117 -0
  174. package/src/prompts/doompi-author-domain/SKILL.md +16 -0
  175. package/src/prompts/doompi-author-domain/references/domains-contract.md +165 -0
@@ -0,0 +1,65 @@
1
+ import { PluginHookSource } from "@agimon-ai/doompi-config/types";
2
+ import { DoomMcpProjection, DoomMcpProjectionSource } from "@agimon-ai/doompi-extension-contracts/mcp-projection";
3
+ //#region src/types/resources.d.ts
4
+ /** A JSON document the harness owns on disk, before it is given a shape. */
5
+ type JsonObject = Record<string, unknown>;
6
+ /** A skill or agent that has been located and named, but not yet staged. */
7
+ interface NamedResource {
8
+ name: string;
9
+ path: string;
10
+ digest?: string;
11
+ }
12
+ interface HarnessResourceOptions {
13
+ agents: boolean;
14
+ mcp: boolean;
15
+ temporaryDirectory?: string;
16
+ /** Persistent metadata cache; defaults to the home-scoped worktree cache. */
17
+ skillCacheDirectory?: string;
18
+ /** Domain MCP allowlist. Omit to keep every configured server. */
19
+ mcpAllowlist?: {
20
+ servers?: string[];
21
+ proxy?: string[];
22
+ };
23
+ /** Include .claude/skills as fallbacks after selected plugin skills. Defaults to true. */
24
+ sharedSkills?: boolean;
25
+ /** Persistent root for Agent Plugin data; defaults to the user's Doom config directory. */
26
+ pluginDataRoot?: string;
27
+ }
28
+ interface McpResourceOptions {
29
+ enabled: boolean;
30
+ temporaryDirectory: string;
31
+ /** Domain MCP allowlist. Omit to keep every configured server. */
32
+ mcpAllowlist?: {
33
+ servers?: string[];
34
+ proxy?: string[];
35
+ };
36
+ /** Persistent root for Agent Plugin data; defaults to the user's Doom config directory. */
37
+ pluginDataRoot?: string;
38
+ }
39
+ interface StagedMcpResources {
40
+ mcpConfigPath?: string;
41
+ mcpProjection: DoomMcpProjection;
42
+ pluginMcpSources: DoomMcpProjectionSource[];
43
+ pluginMcpConfigPaths: string[];
44
+ }
45
+ interface HarnessResources {
46
+ temporaryDirectory: string;
47
+ /** Exact SKILL.md paths compiled from the selected discovery roots. */
48
+ skillDirectories: string[];
49
+ /** Number of discovered SKILL.md files, which is what reaches the model. */
50
+ skillCount: number;
51
+ agentCount: number;
52
+ agentDirectories: string[];
53
+ pluginHooks: PluginHookSource[];
54
+ mcpConfigPath?: string;
55
+ /** Immutable source snapshot published through the replacement session's Cordis registry. */
56
+ mcpProjection: DoomMcpProjection;
57
+ /** Ordered plugin descriptors retained for focused resource diagnostics. */
58
+ pluginMcpSources: DoomMcpProjectionSource[];
59
+ /** Legacy path-only view of the selected plugin MCP sources, in precedence order. */
60
+ pluginMcpConfigPaths: string[];
61
+ cleanup(): Promise<void>;
62
+ }
63
+ //#endregion
64
+ export { HarnessResourceOptions, HarnessResources, JsonObject, McpResourceOptions, NamedResource, StagedMcpResources };
65
+ //# sourceMappingURL=resources.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.d.cts","names":[],"sources":["../../src/types/resources.ts"],"mappings":";;;;KAIY,aAAa;;UAGR;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA;;EAEA;;EAEA;IAAiB;IAAoB;;;EAErC;;EAEA;;UAGe;EACf;EACA;;EAEA;IAAiB;IAAoB;;;EAErC;;UAGe;EACf;EACA,eAAe;EACf,kBAAkB;EAClB;;UAGe;EACf;;EAEA;;EAEA;EACA;EACA;EACA,aAAa;EACb;;EAEA,eAAe;;EAEf,kBAAkB;;EAElB;EACA,WAAW"}
@@ -0,0 +1,65 @@
1
+ import { DoomMcpProjection, DoomMcpProjectionSource } from "@agimon-ai/doompi-extension-contracts/mcp-projection";
2
+ import { PluginHookSource } from "@agimon-ai/doompi-config/types";
3
+ //#region src/types/resources.d.ts
4
+ /** A JSON document the harness owns on disk, before it is given a shape. */
5
+ type JsonObject = Record<string, unknown>;
6
+ /** A skill or agent that has been located and named, but not yet staged. */
7
+ interface NamedResource {
8
+ name: string;
9
+ path: string;
10
+ digest?: string;
11
+ }
12
+ interface HarnessResourceOptions {
13
+ agents: boolean;
14
+ mcp: boolean;
15
+ temporaryDirectory?: string;
16
+ /** Persistent metadata cache; defaults to the home-scoped worktree cache. */
17
+ skillCacheDirectory?: string;
18
+ /** Domain MCP allowlist. Omit to keep every configured server. */
19
+ mcpAllowlist?: {
20
+ servers?: string[];
21
+ proxy?: string[];
22
+ };
23
+ /** Include .claude/skills as fallbacks after selected plugin skills. Defaults to true. */
24
+ sharedSkills?: boolean;
25
+ /** Persistent root for Agent Plugin data; defaults to the user's Doom config directory. */
26
+ pluginDataRoot?: string;
27
+ }
28
+ interface McpResourceOptions {
29
+ enabled: boolean;
30
+ temporaryDirectory: string;
31
+ /** Domain MCP allowlist. Omit to keep every configured server. */
32
+ mcpAllowlist?: {
33
+ servers?: string[];
34
+ proxy?: string[];
35
+ };
36
+ /** Persistent root for Agent Plugin data; defaults to the user's Doom config directory. */
37
+ pluginDataRoot?: string;
38
+ }
39
+ interface StagedMcpResources {
40
+ mcpConfigPath?: string;
41
+ mcpProjection: DoomMcpProjection;
42
+ pluginMcpSources: DoomMcpProjectionSource[];
43
+ pluginMcpConfigPaths: string[];
44
+ }
45
+ interface HarnessResources {
46
+ temporaryDirectory: string;
47
+ /** Exact SKILL.md paths compiled from the selected discovery roots. */
48
+ skillDirectories: string[];
49
+ /** Number of discovered SKILL.md files, which is what reaches the model. */
50
+ skillCount: number;
51
+ agentCount: number;
52
+ agentDirectories: string[];
53
+ pluginHooks: PluginHookSource[];
54
+ mcpConfigPath?: string;
55
+ /** Immutable source snapshot published through the replacement session's Cordis registry. */
56
+ mcpProjection: DoomMcpProjection;
57
+ /** Ordered plugin descriptors retained for focused resource diagnostics. */
58
+ pluginMcpSources: DoomMcpProjectionSource[];
59
+ /** Legacy path-only view of the selected plugin MCP sources, in precedence order. */
60
+ pluginMcpConfigPaths: string[];
61
+ cleanup(): Promise<void>;
62
+ }
63
+ //#endregion
64
+ export { HarnessResourceOptions, HarnessResources, JsonObject, McpResourceOptions, NamedResource, StagedMcpResources };
65
+ //# sourceMappingURL=resources.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.d.mts","names":[],"sources":["../../src/types/resources.ts"],"mappings":";;;;KAIY,aAAa;;UAGR;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA;;EAEA;;EAEA;IAAiB;IAAoB;;;EAErC;;EAEA;;UAGe;EACf;EACA;;EAEA;IAAiB;IAAoB;;;EAErC;;UAGe;EACf;EACA,eAAe;EACf,kBAAkB;EAClB;;UAGe;EACf;;EAEA;;EAEA;EACA;EACA;EACA,aAAa;EACb;;EAEA,eAAe;;EAEf,kBAAkB;;EAElB;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;WACX;WACA;;KAGU,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;WACX;WACA;;KAGU,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,12 @@
1
+ # Doom Pi Domain
2
+
3
+ Domain selection and resource staging for Doom Pi sessions.
4
+
5
+ ## How to author
6
+
7
+ - [Author DoomPi domains](./src/prompts/doompi-author-domain/SKILL.md): Routing and safeguards for editing domain configuration.
8
+ - [`domains.yaml` authoring contract](./src/prompts/doompi-author-domain/references/domains-contract.md): Schemas, source forms, layering, filtering, pinning, and verification.
9
+
10
+ ## Package reference
11
+
12
+ - [Package README](./README.md): The `/domains` command, voice tools, and what a domain switch stages.
package/package.json ADDED
@@ -0,0 +1,117 @@
1
+ {
2
+ "name": "@agimon-ai/doompi-domain",
3
+ "version": "0.0.1-alpha.10",
4
+ "description": "Domain selection, resource staging, and MCP scoping for DoomPi sessions.",
5
+ "keywords": [
6
+ "ai",
7
+ "coding-agent",
8
+ "developer-tools",
9
+ "domains",
10
+ "doompi",
11
+ "mcp",
12
+ "pi-coding-agent",
13
+ "pi-extension",
14
+ "pi-package",
15
+ "plugins",
16
+ "session-reload",
17
+ "skills"
18
+ ],
19
+ "homepage": "https://agimon.ai",
20
+ "license": "MIT",
21
+ "author": "Vuong Ngo",
22
+ "files": [
23
+ "dist",
24
+ "llms.txt",
25
+ "src/prompts",
26
+ "README.md",
27
+ "LICENSE",
28
+ "package.json"
29
+ ],
30
+ "type": "module",
31
+ "main": "./dist/index.cjs",
32
+ "types": "./dist/index.d.mts",
33
+ "jsnext:main": "./dist/index.mjs",
34
+ "exports": {
35
+ ".": {
36
+ "types": "./dist/index.d.mts",
37
+ "import": "./dist/index.mjs",
38
+ "require": "./dist/index.cjs"
39
+ },
40
+ "./apply": {
41
+ "types": "./dist/apply.d.mts",
42
+ "import": "./dist/apply.mjs",
43
+ "require": "./dist/apply.cjs"
44
+ },
45
+ "./extensions/pi": {
46
+ "types": "./dist/extensions/pi.d.mts",
47
+ "import": "./dist/extensions/pi.mjs",
48
+ "require": "./dist/extensions/pi.cjs"
49
+ },
50
+ "./mcp": {
51
+ "types": "./dist/mcp.d.mts",
52
+ "import": "./dist/mcp.mjs",
53
+ "require": "./dist/mcp.cjs"
54
+ },
55
+ "./plugins": {
56
+ "types": "./dist/plugins.d.mts",
57
+ "import": "./dist/plugins.mjs",
58
+ "require": "./dist/plugins.cjs"
59
+ },
60
+ "./resources": {
61
+ "types": "./dist/resources.d.mts",
62
+ "import": "./dist/resources.mjs",
63
+ "require": "./dist/resources.cjs"
64
+ },
65
+ "./package.json": "./package.json"
66
+ },
67
+ "publishConfig": {
68
+ "access": "public"
69
+ },
70
+ "dependencies": {
71
+ "@deepseek-ai/cordis": "4.0.1",
72
+ "typebox": "1.3.16",
73
+ "yaml": "2.9.0",
74
+ "@agimon-ai/doompi-config": "0.0.1-alpha.32",
75
+ "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.32",
76
+ "@agimon-ai/doompi-telemetry": "0.0.1-alpha.32",
77
+ "@agimon-ai/doompi-ui": "0.0.1-alpha.32"
78
+ },
79
+ "devDependencies": {
80
+ "@deepseek-ai/cordis": "4.0.1",
81
+ "@earendil-works/pi-coding-agent": "0.84.2",
82
+ "@earendil-works/pi-tui": "0.84.2",
83
+ "@types/node": "26.2.0",
84
+ "@vitest/coverage-v8": "4.1.11",
85
+ "tsdown": "0.22.14",
86
+ "typescript": "7.0.2",
87
+ "vitest": "4.1.11",
88
+ "@agimon-ai/vibe-lint-plugin-doom-extension": "0.0.1-alpha.30"
89
+ },
90
+ "peerDependencies": {
91
+ "@earendil-works/pi-coding-agent": "0.84.2",
92
+ "@earendil-works/pi-tui": "0.84.2"
93
+ },
94
+ "peerDependenciesMeta": {
95
+ "@earendil-works/pi-coding-agent": {
96
+ "optional": true
97
+ },
98
+ "@earendil-works/pi-tui": {
99
+ "optional": true
100
+ }
101
+ },
102
+ "engines": {
103
+ "node": ">=22.19.0"
104
+ },
105
+ "pi": {
106
+ "extensions": [
107
+ "./dist/extensions/pi.mjs"
108
+ ]
109
+ },
110
+ "scripts": {
111
+ "build": "tsdown",
112
+ "test": "vitest --run",
113
+ "typecheck": "tsc --noEmit",
114
+ "lint": "oxlint . && oxfmt . --check",
115
+ "fixcode": "oxlint . --fix && oxfmt ."
116
+ }
117
+ }
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: doompi-author-domain
3
+ description: Configure DoomPi plugin catalogs and domain resource selections in domains.yaml. Use when creating or editing .doom/domains.yaml or ~/.pi/.doom/domains.yaml, choosing local, Git, or npm plugins, filtering plugin resources, setting aliases or defaults, or verifying resolved domain composition.
4
+ ---
5
+
6
+ # Author DoomPi domain configuration
7
+
8
+ Keep plugin locations in `plugins` and make domains refer to catalog IDs. Do not put filesystem paths directly in a domain's `plugins` list.
9
+
10
+ Before editing, read both `~/.pi/.doom/domains.yaml` and the repository's `.doom/domains.yaml` when they exist. Preserve their layered ownership and resolve every relative path from the file that declares it.
11
+
12
+ Use the smallest source form that preserves intent. Pin Git sources with `sha` and npm sources with an exact `version` when reproducibility matters. Use a domain plugin mapping only when the domain needs resource filters or must disable plugin hooks or MCP.
13
+
14
+ After editing, validate the intended selection with `doompi --domains <name[,name...]> --explain`, then run `doompi sync --check`. Run mutating `doompi sync` only when the user intends to materialize or refresh synchronized artifacts.
15
+
16
+ Read [references/domains-contract.md](references/domains-contract.md) for the complete schema, precedence rules, source forms, filters, and verification checks.
@@ -0,0 +1,165 @@
1
+ # `domains.yaml` authoring contract
2
+
3
+ ## Files and precedence
4
+
5
+ DoomPi reads `~/.pi/.doom/domains.yaml` first and `<repo>/.doom/domains.yaml` second. The document accepts only these top-level keys:
6
+
7
+ - `plugins`: plugin discovery roots and explicit catalog entries.
8
+ - `domains`: named resource selections.
9
+ - `aliases`: names that expand to arrays of concrete domain names.
10
+ - `defaultDomains`: the selection used when no higher-precedence source names domains.
11
+
12
+ Relative paths in the personal file resolve from `~/.pi/.doom`. Relative paths in the repository file resolve from the repository root.
13
+
14
+ Plugin roots from both files accumulate in source order and exact duplicate roots are removed. Explicit plugin entries, domains, and aliases merge by name. A repository definition replaces the complete personal definition with the same name, rather than deep-merging it. A repository `defaultDomains` replaces the personal value when present; omitting it inherits the personal value. `defaultDomains: []` is an explicit empty default.
15
+
16
+ At selection time, a present `DOOMPI_DOMAINS` value outranks `defaultDomains`, including an explicitly empty environment value. When neither exists, the compatibility fallback is `marketing` for the marketing major mode and `default` otherwise. Command-line or persisted session selections are applied by their caller before this fallback is needed.
17
+
18
+ ## Complete example
19
+
20
+ ```yaml
21
+ defaultDomains: [work]
22
+
23
+ plugins:
24
+ roots: [plugins]
25
+ entries:
26
+ repository-tools:
27
+ source: local
28
+ path: tools/repository-plugin
29
+ description: Repository implementation tools.
30
+ review-tools:
31
+ source: url
32
+ url: https://github.com/acme/review-tools.git
33
+ path: plugins/review
34
+ ref: v2
35
+ sha: 0123456789abcdef0123456789abcdef01234567
36
+ incident-tools:
37
+ source: npm
38
+ package: '@acme/incident-tools'
39
+ version: 3.1.0
40
+
41
+ domains:
42
+ development:
43
+ description: Implementation and review resources.
44
+ plugins:
45
+ - repository-tools
46
+ - name: review-tools
47
+ skills: [typescript, review-*]
48
+ agents: [reviewer]
49
+ hooks: false
50
+ mcp: true
51
+ sharedSkills: true
52
+ mcp:
53
+ servers: [code-intel, agiflow-proxy]
54
+ proxy: [repository-search]
55
+ operations:
56
+ description: Incident response resources.
57
+ plugins: [incident-tools]
58
+ mcp:
59
+ servers: [agiflow-proxy]
60
+ proxy: [production-observability]
61
+
62
+ aliases:
63
+ work: [development, operations]
64
+ ```
65
+
66
+ ## Plugin discovery roots
67
+
68
+ `plugins.roots` is an array. Each path can identify:
69
+
70
+ - a supported marketplace root or its manifest;
71
+ - one plugin root; or
72
+ - a container whose direct-child directories are plugins.
73
+
74
+ Discovery does not recurse beyond direct children. Use another root or an explicit entry for a deeper plugin. DoomPi recognizes schema-gated Agent Plugins v1 `plugin.json` files and the legacy `.codex-plugin/plugin.json`, `.claude-plugin/plugin.json`, and `.cursor-plugin/plugin.json` locations. A discovered plugin uses its manifest `name`, or its directory name when the manifest omits one.
75
+
76
+ DoomPi also inspects supported personal and repository marketplace locations automatically. Marketplace IDs are qualified as `plugin@marketplace`. When the same marketplace ID appears more than once, the first discovered marketplace entry wins. Explicit `plugins.entries` are applied last and may intentionally replace discovered IDs.
77
+
78
+ ## Explicit plugin sources
79
+
80
+ Every `plugins.entries` key is the stable ID that domains reference.
81
+
82
+ Local plugins can use a path shorthand or the canonical mapping:
83
+
84
+ ```yaml
85
+ plugins:
86
+ entries:
87
+ short-local: plugins/short-local
88
+ local-tool:
89
+ source: local
90
+ path: plugins/local-tool
91
+ ```
92
+
93
+ Git repositories use `source: url`. Use `source: git-subdir` when `path` is required by the declaration:
94
+
95
+ ```yaml
96
+ plugins:
97
+ entries:
98
+ whole-repository:
99
+ source: url
100
+ url: acme/whole-plugin
101
+ sha: 0123456789abcdef0123456789abcdef01234567
102
+ monorepo-plugin:
103
+ source: git-subdir
104
+ url: ssh://git@example.com/acme/plugins.git
105
+ path: packages/doom-plugin
106
+ ref: main
107
+ sha: fedcba9876543210fedcba9876543210fedcba98
108
+ ```
109
+
110
+ Git URLs may be HTTP, HTTPS, SSH, `file:`, scp-like `git@host:path`, absolute paths, declaring-root-relative `./` paths, or `owner/repository` GitHub shorthand. A remote `path` must remain inside the checkout. `git-subdir` requires it. When `sha` is present, DoomPi checks out and verifies that commit; otherwise it uses `ref` when supplied.
111
+
112
+ npm plugins use a valid package name, plus optional version and registry:
113
+
114
+ ```yaml
115
+ plugins:
116
+ entries:
117
+ published-tool:
118
+ source: npm
119
+ package: '@acme/published-tool'
120
+ version: 1.4.2
121
+ registry: https://registry.npmjs.org
122
+ ```
123
+
124
+ Git and npm sources materialize under `~/.pi/.doom/plugin-cache`. Cache identity includes the complete source descriptor. An existing cache is reused and does not refresh a mutable branch, tag, npm range, or unversioned package automatically. Prefer a full Git `sha` or exact npm `version`. Change the descriptor to produce a new cache identity when updating deliberately.
125
+
126
+ ## Domains and resource filters
127
+
128
+ A domain accepts only `description`, `plugins`, `mcp`, and `sharedSkills`.
129
+
130
+ A string in `plugins` selects every supported resource from that catalog entry. The mapping form selects the same plugin with optional controls:
131
+
132
+ - `skills`: skill frontmatter names to retain. Exact names and `*` wildcards are supported.
133
+ - `agents`: agent frontmatter names to retain. Exact names and `*` wildcards are supported.
134
+ - `hooks`: set `false` to omit the plugin's `hooks/hooks.json`; omission keeps it.
135
+ - `mcp`: set `false` to omit the plugin's MCP source; omission keeps it.
136
+
137
+ `sharedSkills: false` opts out of repository `.claude/skills`. Shared skills remain enabled unless every selected concrete domain sets it to `false`.
138
+
139
+ The domain-level `mcp.servers` list keeps named servers from the merged repository and plugin MCP configuration. `mcp.proxy` keeps named upstreams from the `agiflow-proxy` configuration. Allowlist values from selected domains are unioned, but filtering activates only when every selected concrete domain declares `mcp`. If any selected domain omits `mcp`, the selection remains unfiltered. An omitted or empty `servers` or `proxy` list also leaves that slice unfiltered; an empty array is not a deny-all policy.
140
+
141
+ Aliases expand once to their listed concrete domain names. Keep alias targets concrete rather than chaining aliases. Domain and alias names both appear in `/domains` discovery. Plugin directories are deduplicated by resolved directory in first-selection order.
142
+
143
+ ## Verification
144
+
145
+ From the repository root:
146
+
147
+ ```sh
148
+ doompi --domains development --explain
149
+ doompi --domains development,operations --explain
150
+ doompi sync --check
151
+ ```
152
+
153
+ Confirm the explanation lists the expected domains, plugin names, skill paths, agents, MCP servers, and proxy upstreams. Start a session and use `/domains` or `list_domains` to confirm the active and available names. A live switch uses `/domains <name[,name...]>` and reloads the session after validation and resource staging.
154
+
155
+ Run mutating `doompi sync` only when the user intends to materialize remote sources or refresh
156
+ synchronized runtime artifacts.
157
+
158
+ For source changes in this repository, run:
159
+
160
+ ```sh
161
+ pnpm nx lint @agimon-ai/doompi-domain
162
+ pnpm nx typecheck @agimon-ai/doompi-domain
163
+ pnpm nx build @agimon-ai/doompi-domain
164
+ pnpm nx test @agimon-ai/doompi-domain
165
+ ```