@agimon-ai/po-domain 0.0.0-alpha.2 → 0.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/apiContracts.cjs +13 -3
- package/dist/apiContracts.cjs.map +1 -1
- package/dist/apiContracts.d.mts +0 -1
- package/dist/apiContracts.d.mts.map +1 -1
- package/dist/apiContracts.mjs +12 -3
- package/dist/apiContracts.mjs.map +1 -1
- package/dist/apply.cjs +2 -2
- package/dist/apply.cjs.map +1 -1
- package/dist/apply.d.mts +2 -2
- package/dist/apply.d.mts.map +1 -1
- package/dist/apply.mjs +2 -2
- package/dist/apply.mjs.map +1 -1
- package/dist/{domainText-UIRIz6-_.cjs → domainText-CbpBLX_M.cjs} +2 -2
- package/dist/domainText-CbpBLX_M.cjs.map +1 -0
- package/dist/{domainText-Dm8k7p4z.mjs → domainText-D0iurn8D.mjs} +2 -2
- package/dist/domainText-D0iurn8D.mjs.map +1 -0
- package/dist/extensions/mcp.cjs +2 -2
- package/dist/extensions/mcp.cjs.map +1 -1
- package/dist/extensions/mcp.d.mts +1 -1
- package/dist/extensions/mcp.mjs +1 -1
- package/dist/extensions/mcp.mjs.map +1 -1
- package/dist/extensions/native.mjs +1 -1
- package/dist/extensions/native.mjs.map +1 -1
- package/dist/extensions/server.cjs +77 -65
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.d.mts +2 -2
- package/dist/extensions/server.d.mts.map +1 -1
- package/dist/extensions/server.mjs +78 -63
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/extensions/web.mjs +1 -1
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/mcp.cjs +2 -2
- package/dist/mcp.cjs.map +1 -1
- package/dist/mcp.d.mts +13 -12
- package/dist/mcp.d.mts.map +1 -1
- package/dist/mcp.mjs +3 -3
- package/dist/mcp.mjs.map +1 -1
- package/dist/{mcpFilter-Cf-czy8O.mjs → mcpFilter-CKUbKmxz.mjs} +41 -28
- package/dist/mcpFilter-CKUbKmxz.mjs.map +1 -0
- package/dist/{mcpFilter-CZNmU_VF.cjs → mcpFilter-CghXZ2K-.cjs} +45 -26
- package/dist/mcpFilter-CghXZ2K-.cjs.map +1 -0
- package/dist/plugins.mjs +1 -2
- package/dist/{resourceCollector-CRY5cmeY.mjs → resourceCollector-CLxre4tE.mjs} +71 -67
- package/dist/resourceCollector-CLxre4tE.mjs.map +1 -0
- package/dist/{resourceCollector-Cu-lp5hJ.cjs → resourceCollector-YOEwhNIR.cjs} +68 -64
- package/dist/resourceCollector-YOEwhNIR.cjs.map +1 -0
- package/dist/{resources-BEjxE3Zn.d.mts → resources-COT3OnLs.d.mts} +8 -8
- package/dist/{resources-BEjxE3Zn.d.mts.map → resources-COT3OnLs.d.mts.map} +1 -1
- package/dist/resources.cjs +1 -1
- package/dist/resources.d.mts +8 -4
- package/dist/resources.d.mts.map +1 -1
- package/dist/resources.mjs +1 -2
- package/llms.txt +2 -2
- package/package.json +19 -19
- package/src/prompts/po-author-domain/references/domains-contract.md +1 -1
- package/dist/domainText-Dm8k7p4z.mjs.map +0 -1
- package/dist/domainText-UIRIz6-_.cjs.map +0 -1
- package/dist/mcpFilter-CZNmU_VF.cjs.map +0 -1
- package/dist/mcpFilter-Cf-czy8O.mjs.map +0 -1
- package/dist/resourceCollector-CRY5cmeY.mjs.map +0 -1
- package/dist/resourceCollector-Cu-lp5hJ.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ aliases:
|
|
|
34
34
|
When the `@agimon-ai/po-help` minor mode is active, this package contributes the
|
|
35
35
|
`po-author-domain` skill. It provides package-owned guidance for plugin catalogs, domain
|
|
36
36
|
filters, aliases, defaults, shared skills, and MCP scopes in `domains.yaml`. The contribution is
|
|
37
|
-
registered through the session's `
|
|
37
|
+
registered through the session's `po/help` Cordis service and is withdrawn with this package's
|
|
38
38
|
plugin fiber.
|
|
39
39
|
|
|
40
40
|
## What a switch stages
|
package/dist/apiContracts.cjs
CHANGED
|
@@ -2,11 +2,21 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
+
let _agimon_ai_po_core_apiContracts = require("@agimon-ai/po-core/apiContracts");
|
|
6
|
+
let typebox = require("typebox");
|
|
5
7
|
//#region src/schemas/apiContracts.ts
|
|
6
|
-
|
|
7
|
-
const apiContracts = (0, require("@agimon-ai/po-core/apiContracts").defineApiContract)({
|
|
8
|
+
const apiContracts = (0, _agimon_ai_po_core_apiContracts.defineApiContract)({
|
|
8
9
|
version: 1,
|
|
9
|
-
http: [
|
|
10
|
+
http: [{
|
|
11
|
+
id: "domains.current",
|
|
12
|
+
scope: "session",
|
|
13
|
+
basePath: "domains",
|
|
14
|
+
path: "/current",
|
|
15
|
+
method: "GET",
|
|
16
|
+
authentication: "owner",
|
|
17
|
+
description: "Read the current session selection.",
|
|
18
|
+
responses: (0, _agimon_ai_po_core_apiContracts.jsonApiResponses)(typebox.Type.Object({ domains: typebox.Type.Array(typebox.Type.String()) }))
|
|
19
|
+
}],
|
|
10
20
|
sockets: [],
|
|
11
21
|
dynamic: []
|
|
12
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.cjs","names":["defineApiContract"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\
|
|
1
|
+
{"version":3,"file":"apiContracts.cjs","names":["defineApiContract","jsonApiResponses","Type"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract, jsonApiResponses } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nexport const apiContracts = defineApiContract({\n version: 1,\n http: [\n {\n id: 'domains.current',\n scope: 'session',\n basePath: 'domains',\n path: '/current',\n method: 'GET',\n authentication: 'owner',\n description: 'Read the current session selection.',\n responses: jsonApiResponses(Type.Object({ domains: Type.Array(Type.String()) })),\n },\n ],\n sockets: [],\n dynamic: [],\n});\nexport default apiContracts;\n"],"mappings":";;;;;;;AAGA,MAAa,gBAAA,GAAeA,gCAAAA,kBAAAA,CAAkB;CAC5C,SAAS;CACT,MAAM,CACJ;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,MAAM;EACN,QAAQ;EACR,gBAAgB;EAChB,aAAa;EACb,YAAA,GAAWC,gCAAAA,iBAAAA,CAAiBC,QAAAA,KAAK,OAAO,EAAE,SAASA,QAAAA,KAAK,MAAMA,QAAAA,KAAK,OAAO,CAAC,EAAE,CAAC,CAAC;CACjF,CACF;CACA,SAAS,CAAC;CACV,SAAS,CAAC;AACZ,CAAC"}
|
package/dist/apiContracts.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.d.mts","names":[],"sources":["../src/schemas/apiContracts.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"apiContracts.d.mts","names":[],"sources":["../src/schemas/apiContracts.ts"],"mappings":";qBAGa"}
|
package/dist/apiContracts.mjs
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import { defineApiContract } from "@agimon-ai/po-core/apiContracts";
|
|
1
|
+
import { defineApiContract, jsonApiResponses } from "@agimon-ai/po-core/apiContracts";
|
|
2
|
+
import { Type } from "typebox";
|
|
2
3
|
//#region src/schemas/apiContracts.ts
|
|
3
|
-
/** This facet contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */
|
|
4
4
|
const apiContracts = defineApiContract({
|
|
5
5
|
version: 1,
|
|
6
|
-
http: [
|
|
6
|
+
http: [{
|
|
7
|
+
id: "domains.current",
|
|
8
|
+
scope: "session",
|
|
9
|
+
basePath: "domains",
|
|
10
|
+
path: "/current",
|
|
11
|
+
method: "GET",
|
|
12
|
+
authentication: "owner",
|
|
13
|
+
description: "Read the current session selection.",
|
|
14
|
+
responses: jsonApiResponses(Type.Object({ domains: Type.Array(Type.String()) }))
|
|
15
|
+
}],
|
|
7
16
|
sockets: [],
|
|
8
17
|
dynamic: []
|
|
9
18
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\
|
|
1
|
+
{"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract, jsonApiResponses } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nexport const apiContracts = defineApiContract({\n version: 1,\n http: [\n {\n id: 'domains.current',\n scope: 'session',\n basePath: 'domains',\n path: '/current',\n method: 'GET',\n authentication: 'owner',\n description: 'Read the current session selection.',\n responses: jsonApiResponses(Type.Object({ domains: Type.Array(Type.String()) })),\n },\n ],\n sockets: [],\n dynamic: [],\n});\nexport default apiContracts;\n"],"mappings":";;;AAGA,MAAa,eAAe,kBAAkB;CAC5C,SAAS;CACT,MAAM,CACJ;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,MAAM;EACN,QAAQ;EACR,gBAAgB;EAChB,aAAa;EACb,WAAW,iBAAiB,KAAK,OAAO,EAAE,SAAS,KAAK,MAAM,KAAK,OAAO,CAAC,EAAE,CAAC,CAAC;CACjF,CACF;CACA,SAAS,CAAC;CACV,SAAS,CAAC;AACZ,CAAC"}
|
package/dist/apply.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
|
|
3
|
-
const require_mcpFilter = require("./mcpFilter-
|
|
3
|
+
const require_mcpFilter = require("./mcpFilter-CghXZ2K-.cjs");
|
|
4
4
|
const require_pluginMaterializer = require("./pluginMaterializer-C8IZ1PSY.cjs");
|
|
5
|
-
const require_resourceCollector = require("./resourceCollector-
|
|
5
|
+
const require_resourceCollector = require("./resourceCollector-YOEwhNIR.cjs");
|
|
6
6
|
let node_fs = require("node:fs");
|
|
7
7
|
node_fs = require_rolldown_runtime.__toESM(node_fs, 1);
|
|
8
8
|
let node_path = require("node:path");
|
package/dist/apply.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.cjs","names":["requireHarnessPaths","materializePluginEntries","resolvePluginEntries","resolveMcpAllowlist","fs","path","collectResources","resolveSharedSkills","updateHarnessState"],"sources":["../src/services/applyDomains/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { resolvePluginEntries, resolveSharedSkills } from '@agimon-ai/po-config/domains';\nimport { requireHarnessPaths, updateHarnessState } from '@agimon-ai/po-config/harnessStore';\nimport type {
|
|
1
|
+
{"version":3,"file":"apply.cjs","names":["requireHarnessPaths","materializePluginEntries","resolvePluginEntries","resolveMcpAllowlist","fs","path","collectResources","resolveSharedSkills","updateHarnessState"],"sources":["../src/services/applyDomains/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { resolvePluginEntries, resolveSharedSkills } from '@agimon-ai/po-config/domains';\nimport { requireHarnessPaths, updateHarnessState } from '@agimon-ai/po-config/harnessStore';\nimport type { PoHarnessContext, HarnessState } from '@agimon-ai/po-config/types';\n\nimport { resolveMcpAllowlist } from '../mcpFilter';\nimport { materializePluginEntries } from '../pluginMaterializer';\nimport { collectResources } from '../resourceCollector';\n\n/**\n * Live domain switching: skills, plugin hooks, MCP config and subagent directories.\n *\n * Writes through the harness state module and relies on Pi's reload\n * re-executing extension modules. The replacement Config factory publishes the\n * persisted MCP projection on the new session's Cordis root.\n *\n * What reload cannot do is change the SET of loaded extensions: Pi freezes the\n * CLI --extension list at construction and re-resolves that same array on every\n * reload. Callers report those parts as needing a relaunch instead of pretending\n * they applied.\n *\n * The major-mode and profile switches live in\n * @agimon-ai/po-config/selectionSwitch: they are config writes with no\n * resource staging, and the synced startup path applies them before any command\n * exists to run. Domains stays here because it stages plugins, skills and MCP\n * config.\n */\nexport async function applyDomains(domainNames: string[], state: PoHarnessContext): Promise<HarnessState> {\n const { root, temporaryDirectory } = requireHarnessPaths(state);\n\n const pluginEntries = await materializePluginEntries(\n resolvePluginEntries(root, domainNames, [...state.pluginDirectories]),\n );\n const mcpAllowlist = resolveMcpAllowlist(root, domainNames);\n // Keep the active generation untouched while the candidate is parsed and\n // normalized. Pi's reload later removes the whole process-owned run root, so\n // retired generations need no eager destructive cleanup here.\n const candidateDirectory = await fs.promises.mkdtemp(path.join(temporaryDirectory, 'domains-'));\n let resources: Awaited<ReturnType<typeof collectResources>>;\n try {\n resources = await collectResources(root, pluginEntries, {\n agents: state.agents,\n mcp: state.mcp,\n temporaryDirectory: candidateDirectory,\n sharedSkills: resolveSharedSkills(root, domainNames),\n mcpAllowlist,\n });\n } catch (error) {\n await fs.promises.rm(candidateDirectory, { recursive: true, force: true });\n throw error;\n }\n\n let updated: HarnessState;\n try {\n updated = updateHarnessState({\n domains: domainNames,\n skillDirectories: resources.skillDirectories,\n agentDirectories: resources.agentDirectories,\n pluginHooks: resources.pluginHooks,\n mcpConfigPath: resources.mcpConfigPath,\n mcpProjection: resources.mcpProjection,\n });\n } catch (error) {\n await fs.promises.rm(candidateDirectory, { recursive: true, force: true });\n throw error;\n }\n process.env.PI_SUBAGENT_EXTRA_AGENT_DIRS = resources.agentDirectories.join(path.delimiter);\n process.env.PI_SUBAGENT_EXTRA_SKILL_DIRS = resources.skillDirectories.join(path.delimiter);\n return updated;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,eAAsB,aAAa,aAAuB,OAAgD;CACxG,MAAM,EAAE,MAAM,wBAAA,GAAuBA,kCAAAA,oBAAAA,CAAoB,KAAK;CAE9D,MAAM,gBAAgB,MAAMC,2BAAAA,0BAAAA,GAC1BC,6BAAAA,qBAAAA,CAAqB,MAAM,aAAa,CAAC,GAAG,MAAM,iBAAiB,CAAC,CACtE;CACA,MAAM,eAAeC,kBAAAA,oBAAoB,MAAM,WAAW;CAI1D,MAAM,qBAAqB,MAAMC,QAAAA,QAAG,SAAS,QAAQC,UAAAA,QAAK,KAAK,oBAAoB,UAAU,CAAC;CAC9F,IAAI;CACJ,IAAI;EACF,YAAY,MAAMC,0BAAAA,iBAAiB,MAAM,eAAe;GACtD,QAAQ,MAAM;GACd,KAAK,MAAM;GACX,oBAAoB;GACpB,eAAA,GAAcC,6BAAAA,oBAAAA,CAAoB,MAAM,WAAW;GACnD;EACF,CAAC;CACH,SAAS,OAAO;EACd,MAAMH,QAAAA,QAAG,SAAS,GAAG,oBAAoB;GAAE,WAAW;GAAM,OAAO;EAAK,CAAC;EACzE,MAAM;CACR;CAEA,IAAI;CACJ,IAAI;EACF,WAAA,GAAUI,kCAAAA,mBAAAA,CAAmB;GAC3B,SAAS;GACT,kBAAkB,UAAU;GAC5B,kBAAkB,UAAU;GAC5B,aAAa,UAAU;GACvB,eAAe,UAAU;GACzB,eAAe,UAAU;EAC3B,CAAC;CACH,SAAS,OAAO;EACd,MAAMJ,QAAAA,QAAG,SAAS,GAAG,oBAAoB;GAAE,WAAW;GAAM,OAAO;EAAK,CAAC;EACzE,MAAM;CACR;CACA,QAAQ,IAAI,+BAA+B,UAAU,iBAAiB,KAAKC,UAAAA,QAAK,SAAS;CACzF,QAAQ,IAAI,+BAA+B,UAAU,iBAAiB,KAAKA,UAAAA,QAAK,SAAS;CACzF,OAAO;AACT"}
|
package/dist/apply.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HarnessState, PoHarnessContext } from "@agimon-ai/po-config/types";
|
|
2
2
|
//#region src/services/applyDomains/index.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Live domain switching: skills, plugin hooks, MCP config and subagent directories.
|
|
@@ -18,6 +18,6 @@ import { DoomHarnessContext, HarnessState } from "@agimon-ai/po-config/types";
|
|
|
18
18
|
* exists to run. Domains stays here because it stages plugins, skills and MCP
|
|
19
19
|
* config.
|
|
20
20
|
*/
|
|
21
|
-
export declare function applyDomains(domainNames: string[], state:
|
|
21
|
+
export declare function applyDomains(domainNames: string[], state: PoHarnessContext): Promise<HarnessState>;
|
|
22
22
|
//#endregion
|
|
23
23
|
//# sourceMappingURL=apply.d.mts.map
|
package/dist/apply.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.mts","names":[],"sources":["../src/services/applyDomains/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;wBA6BsB,aAAa,uBAAuB,OAAO,
|
|
1
|
+
{"version":3,"file":"apply.d.mts","names":[],"sources":["../src/services/applyDomains/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;wBA6BsB,aAAa,uBAAuB,OAAO,mBAAmB,QAAQ"}
|
package/dist/apply.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as resolveMcpAllowlist } from "./mcpFilter-CKUbKmxz.mjs";
|
|
2
2
|
import { t as materializePluginEntries } from "./pluginMaterializer-D9-oDF-b.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { t as collectResources } from "./resourceCollector-CLxre4tE.mjs";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { resolvePluginEntries, resolveSharedSkills } from "@agimon-ai/po-config/domains";
|
package/dist/apply.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.mjs","names":[],"sources":["../src/services/applyDomains/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { resolvePluginEntries, resolveSharedSkills } from '@agimon-ai/po-config/domains';\nimport { requireHarnessPaths, updateHarnessState } from '@agimon-ai/po-config/harnessStore';\nimport type {
|
|
1
|
+
{"version":3,"file":"apply.mjs","names":[],"sources":["../src/services/applyDomains/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { resolvePluginEntries, resolveSharedSkills } from '@agimon-ai/po-config/domains';\nimport { requireHarnessPaths, updateHarnessState } from '@agimon-ai/po-config/harnessStore';\nimport type { PoHarnessContext, HarnessState } from '@agimon-ai/po-config/types';\n\nimport { resolveMcpAllowlist } from '../mcpFilter';\nimport { materializePluginEntries } from '../pluginMaterializer';\nimport { collectResources } from '../resourceCollector';\n\n/**\n * Live domain switching: skills, plugin hooks, MCP config and subagent directories.\n *\n * Writes through the harness state module and relies on Pi's reload\n * re-executing extension modules. The replacement Config factory publishes the\n * persisted MCP projection on the new session's Cordis root.\n *\n * What reload cannot do is change the SET of loaded extensions: Pi freezes the\n * CLI --extension list at construction and re-resolves that same array on every\n * reload. Callers report those parts as needing a relaunch instead of pretending\n * they applied.\n *\n * The major-mode and profile switches live in\n * @agimon-ai/po-config/selectionSwitch: they are config writes with no\n * resource staging, and the synced startup path applies them before any command\n * exists to run. Domains stays here because it stages plugins, skills and MCP\n * config.\n */\nexport async function applyDomains(domainNames: string[], state: PoHarnessContext): Promise<HarnessState> {\n const { root, temporaryDirectory } = requireHarnessPaths(state);\n\n const pluginEntries = await materializePluginEntries(\n resolvePluginEntries(root, domainNames, [...state.pluginDirectories]),\n );\n const mcpAllowlist = resolveMcpAllowlist(root, domainNames);\n // Keep the active generation untouched while the candidate is parsed and\n // normalized. Pi's reload later removes the whole process-owned run root, so\n // retired generations need no eager destructive cleanup here.\n const candidateDirectory = await fs.promises.mkdtemp(path.join(temporaryDirectory, 'domains-'));\n let resources: Awaited<ReturnType<typeof collectResources>>;\n try {\n resources = await collectResources(root, pluginEntries, {\n agents: state.agents,\n mcp: state.mcp,\n temporaryDirectory: candidateDirectory,\n sharedSkills: resolveSharedSkills(root, domainNames),\n mcpAllowlist,\n });\n } catch (error) {\n await fs.promises.rm(candidateDirectory, { recursive: true, force: true });\n throw error;\n }\n\n let updated: HarnessState;\n try {\n updated = updateHarnessState({\n domains: domainNames,\n skillDirectories: resources.skillDirectories,\n agentDirectories: resources.agentDirectories,\n pluginHooks: resources.pluginHooks,\n mcpConfigPath: resources.mcpConfigPath,\n mcpProjection: resources.mcpProjection,\n });\n } catch (error) {\n await fs.promises.rm(candidateDirectory, { recursive: true, force: true });\n throw error;\n }\n process.env.PI_SUBAGENT_EXTRA_AGENT_DIRS = resources.agentDirectories.join(path.delimiter);\n process.env.PI_SUBAGENT_EXTRA_SKILL_DIRS = resources.skillDirectories.join(path.delimiter);\n return updated;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,eAAsB,aAAa,aAAuB,OAAgD;CACxG,MAAM,EAAE,MAAM,uBAAuB,oBAAoB,KAAK;CAE9D,MAAM,gBAAgB,MAAM,yBAC1B,qBAAqB,MAAM,aAAa,CAAC,GAAG,MAAM,iBAAiB,CAAC,CACtE;CACA,MAAM,eAAe,oBAAoB,MAAM,WAAW;CAI1D,MAAM,qBAAqB,MAAM,GAAG,SAAS,QAAQ,KAAK,KAAK,oBAAoB,UAAU,CAAC;CAC9F,IAAI;CACJ,IAAI;EACF,YAAY,MAAM,iBAAiB,MAAM,eAAe;GACtD,QAAQ,MAAM;GACd,KAAK,MAAM;GACX,oBAAoB;GACpB,cAAc,oBAAoB,MAAM,WAAW;GACnD;EACF,CAAC;CACH,SAAS,OAAO;EACd,MAAM,GAAG,SAAS,GAAG,oBAAoB;GAAE,WAAW;GAAM,OAAO;EAAK,CAAC;EACzE,MAAM;CACR;CAEA,IAAI;CACJ,IAAI;EACF,UAAU,mBAAmB;GAC3B,SAAS;GACT,kBAAkB,UAAU;GAC5B,kBAAkB,UAAU;GAC5B,aAAa,UAAU;GACvB,eAAe,UAAU;GACzB,eAAe,UAAU;EAC3B,CAAC;CACH,SAAS,OAAO;EACd,MAAM,GAAG,SAAS,GAAG,oBAAoB;GAAE,WAAW;GAAM,OAAO;EAAK,CAAC;EACzE,MAAM;CACR;CACA,QAAQ,IAAI,+BAA+B,UAAU,iBAAiB,KAAK,KAAK,SAAS;CACzF,QAAQ,IAAI,+BAA+B,UAAU,iBAAiB,KAAK,KAAK,SAAS;CACzF,OAAO;AACT"}
|
|
@@ -15,7 +15,7 @@ const SAFE_DOMAIN_NAME = /^[A-Za-z0-9@][A-Za-z0-9@/._:-]*$/u;
|
|
|
15
15
|
const DOMAIN_SEPARATOR = ",";
|
|
16
16
|
const DOMAIN_COMMAND = "domains";
|
|
17
17
|
/** Footer status key the cockpit's domains axis reads. */
|
|
18
|
-
const DOMAIN_STATUS_KEY = "
|
|
18
|
+
const DOMAIN_STATUS_KEY = "po-domain";
|
|
19
19
|
/** What an empty selection reads as, which is a real state rather than an error. */
|
|
20
20
|
const NONE = "(none)";
|
|
21
21
|
/** Splits the comma-separated argument the command and the autocomplete share. */
|
|
@@ -201,4 +201,4 @@ Object.defineProperty(exports, "unchangedSummary", {
|
|
|
201
201
|
}
|
|
202
202
|
});
|
|
203
203
|
|
|
204
|
-
//# sourceMappingURL=domainText-
|
|
204
|
+
//# sourceMappingURL=domainText-CbpBLX_M.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domainText-CbpBLX_M.cjs","names":["VOICE_TOOL_MAX_DOMAIN_COUNT","VOICE_TOOL_MAX_IDENTIFIER_LENGTH"],"sources":["../src/types/domains.ts","../src/services/domainText/index.ts"],"sourcesContent":["/** The npm name this package registers its voice tools and contributions under. */\nexport const DOMAIN_SOURCE = '@agimon-ai/po-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","import type { PoTransitionResult } from '@agimon-ai/po-core/transition';\nimport { VOICE_TOOL_MAX_DOMAIN_COUNT, VOICE_TOOL_MAX_IDENTIFIER_LENGTH } from '@agimon-ai/po-core/voiceTools';\n\nimport { type DomainListing, SAFE_DOMAIN_NAME } from '../../types/domains';\n\ninterface SelectItem {\n value: string;\n label: string;\n description?: string;\n}\n\nconst DOMAIN_SEPARATOR = ',';\nexport const DOMAIN_COMMAND = 'domains';\n/** Footer status key the cockpit's domains axis reads. */\nexport const DOMAIN_STATUS_KEY = 'po-domain';\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/** The published axis content: the active domains in the same comma-separated shape splitDomains reads. */\nexport function domainStatus(domains: readonly string[]): string {\n return domains.join(DOMAIN_SEPARATOR);\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\nconst MARK_ON = '[x]';\nconst MARK_OFF = '[ ]';\nconst OPTION_PREFIX = /^\\[[ x]\\] /;\n\n/**\n * Rows for a single-pick select where domains compose: each row shows the\n * membership it would flip, so a client without a multi-select still reaches\n * every set one toggle at a time.\n */\nexport function domainToggleOptions(listing: DomainListing): string[] {\n const active = new Set(listing.effective);\n return listing.available.map((name) => `${active.has(name) ? MARK_ON : MARK_OFF} ${name}`);\n}\n\n/** The domain a toggle row names. */\nexport function toggleOptionDomain(option: string): string {\n return option.replace(OPTION_PREFIX, '').trim();\n}\n\n/** The effective set with one domain flipped, order preserved for the rest. */\nexport function toggledDomains(effective: readonly string[], name: string): string[] {\n return effective.includes(name) ? effective.filter((domain) => domain !== name) : [...effective, name];\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\nexport function errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\nexport function transitionError(result: PoTransitionResult): Error {\n return new Error(`Domain transition was ${result.outcome}: ${result.diagnostics.join(', ')}`);\n}\n"],"mappings":";;;AACA,MAAa,gBAAgB;;;;;;;;AAS7B,MAAa,mBAAmB;;;ACChC,MAAM,mBAAmB;AACzB,MAAa,iBAAiB;;AAE9B,MAAa,oBAAoB;;AAEjC,MAAa,OAAO;;AAGpB,SAAgB,aAAa,OAAyB;CACpD,OAAO,MACJ,MAAM,gBAAgB,CAAC,CACvB,KAAK,SAAS,KAAK,KAAK,CAAC,CAAC,CAC1B,OAAO,OAAO;AACnB;;AAGA,SAAgB,aAAa,SAAoC;CAC/D,OAAO,QAAQ,KAAK,gBAAgB;AACtC;;AAGA,SAAgB,YACd,OACA,eAA6D,CAAC,GAChD;CACd,OAAO,MAAM,KAAK,UAAU;EAC1B,OAAO;EACP,OAAO;EACP,GAAI,aAAa,QAAQ,EAAE,aAAa,aAAa,MAAM,IAAI,CAAC;CAClE,EAAE;AACJ;AAEA,SAAgB,cAAc,SAAgC;CAE5D,OAAO,mBADQ,QAAQ,UAAU,KAAK,IAAI,KAAA,SACT,uBAAuB,QAAQ,UAAU,KAAK,IAAI,EAAE,SAAS,eAAe;AAC/G;AAEA,SAAgB,gBAAgB,SAAoC;CAClE,OAAO,wBAAwB,QAAQ,KAAK,IAAI,KAAA;AAClD;AAEA,SAAgB,iBAAiB,SAAoC;CACnE,OAAO,2BAA2B,QAAQ,KAAK,IAAI,KAAA;AACrD;AAEA,SAAgB,YAAY,SAAgC;CAC1D,OAAO,oBAAoB,QAAQ,UAAU,KAAK,IAAI,KAAA,SAAU;AAClE;AAEA,MAAM,UAAU;AAChB,MAAM,WAAW;AACjB,MAAM,gBAAgB;;;;;;AAOtB,SAAgB,oBAAoB,SAAkC;CACpE,MAAM,SAAS,IAAI,IAAI,QAAQ,SAAS;CACxC,OAAO,QAAQ,UAAU,KAAK,SAAS,GAAG,OAAO,IAAI,IAAI,IAAI,UAAU,SAAS,GAAG,MAAM;AAC3F;;AAGA,SAAgB,mBAAmB,QAAwB;CACzD,OAAO,OAAO,QAAQ,eAAe,EAAE,CAAC,CAAC,KAAK;AAChD;;AAGA,SAAgB,eAAe,WAA8B,MAAwB;CACnF,OAAO,UAAU,SAAS,IAAI,IAAI,UAAU,QAAQ,WAAW,WAAW,IAAI,IAAI,CAAC,GAAG,WAAW,IAAI;AACvG;;;;;;;AAQA,SAAgB,qBAAqB,QAAqC;CACxE,IAAI,OAAO,SAASA,8BAAAA,6BAClB,MAAM,IAAI,MAAM,gBAAgBA,8BAAAA,4BAA4B,0BAA0B;CAExF,MAAM,SAAmB,CAAC;CAC1B,MAAM,uBAAO,IAAI,IAAY;CAC7B,KAAK,MAAM,SAAS,QAAQ;EAC1B,MAAM,OAAO,MAAM,KAAK;EACxB,IAAI,CAAC,QAAQ,KAAK,SAASC,8BAAAA,oCAAoC,CAAC,iBAAiB,KAAK,IAAI,GACxF,MAAM,IAAI,MAAM,wBAAwB,OAAO;EAEjD,IAAI,KAAK,IAAI,IAAI,GAAG;EACpB,KAAK,IAAI,IAAI;EACb,OAAO,KAAK,IAAI;CAClB;CACA,OAAO;AACT;AAEA,SAAgB,aAAa,OAAwB;CACnD,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC9D;AAEA,SAAgB,gBAAgB,QAAmC;CACjE,uBAAO,IAAI,MAAM,yBAAyB,OAAO,QAAQ,IAAI,OAAO,YAAY,KAAK,IAAI,GAAG;AAC9F"}
|
|
@@ -15,7 +15,7 @@ const SAFE_DOMAIN_NAME = /^[A-Za-z0-9@][A-Za-z0-9@/._:-]*$/u;
|
|
|
15
15
|
const DOMAIN_SEPARATOR = ",";
|
|
16
16
|
const DOMAIN_COMMAND = "domains";
|
|
17
17
|
/** Footer status key the cockpit's domains axis reads. */
|
|
18
|
-
const DOMAIN_STATUS_KEY = "
|
|
18
|
+
const DOMAIN_STATUS_KEY = "po-domain";
|
|
19
19
|
/** What an empty selection reads as, which is a real state rather than an error. */
|
|
20
20
|
const NONE = "(none)";
|
|
21
21
|
/** Splits the comma-separated argument the command and the autocomplete share. */
|
|
@@ -94,4 +94,4 @@ function transitionError(result) {
|
|
|
94
94
|
//#endregion
|
|
95
95
|
export { DOMAIN_SOURCE as _, domainStatus as a, errorMessage as c, splitDomains as d, switchedSummary as f, unchangedSummary as g, transitionError as h, domainItems as i, normalizeDomainNames as l, toggledDomains as m, DOMAIN_STATUS_KEY as n, domainSummary as o, toggleOptionDomain as p, NONE as r, domainToggleOptions as s, DOMAIN_COMMAND as t, pickerTitle as u, SAFE_DOMAIN_NAME as v };
|
|
96
96
|
|
|
97
|
-
//# sourceMappingURL=domainText-
|
|
97
|
+
//# sourceMappingURL=domainText-D0iurn8D.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domainText-D0iurn8D.mjs","names":[],"sources":["../src/types/domains.ts","../src/services/domainText/index.ts"],"sourcesContent":["/** The npm name this package registers its voice tools and contributions under. */\nexport const DOMAIN_SOURCE = '@agimon-ai/po-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","import type { PoTransitionResult } from '@agimon-ai/po-core/transition';\nimport { VOICE_TOOL_MAX_DOMAIN_COUNT, VOICE_TOOL_MAX_IDENTIFIER_LENGTH } from '@agimon-ai/po-core/voiceTools';\n\nimport { type DomainListing, SAFE_DOMAIN_NAME } from '../../types/domains';\n\ninterface SelectItem {\n value: string;\n label: string;\n description?: string;\n}\n\nconst DOMAIN_SEPARATOR = ',';\nexport const DOMAIN_COMMAND = 'domains';\n/** Footer status key the cockpit's domains axis reads. */\nexport const DOMAIN_STATUS_KEY = 'po-domain';\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/** The published axis content: the active domains in the same comma-separated shape splitDomains reads. */\nexport function domainStatus(domains: readonly string[]): string {\n return domains.join(DOMAIN_SEPARATOR);\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\nconst MARK_ON = '[x]';\nconst MARK_OFF = '[ ]';\nconst OPTION_PREFIX = /^\\[[ x]\\] /;\n\n/**\n * Rows for a single-pick select where domains compose: each row shows the\n * membership it would flip, so a client without a multi-select still reaches\n * every set one toggle at a time.\n */\nexport function domainToggleOptions(listing: DomainListing): string[] {\n const active = new Set(listing.effective);\n return listing.available.map((name) => `${active.has(name) ? MARK_ON : MARK_OFF} ${name}`);\n}\n\n/** The domain a toggle row names. */\nexport function toggleOptionDomain(option: string): string {\n return option.replace(OPTION_PREFIX, '').trim();\n}\n\n/** The effective set with one domain flipped, order preserved for the rest. */\nexport function toggledDomains(effective: readonly string[], name: string): string[] {\n return effective.includes(name) ? effective.filter((domain) => domain !== name) : [...effective, name];\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\nexport function errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\nexport function transitionError(result: PoTransitionResult): Error {\n return new Error(`Domain transition was ${result.outcome}: ${result.diagnostics.join(', ')}`);\n}\n"],"mappings":";;;AACA,MAAa,gBAAgB;;;;;;;;AAS7B,MAAa,mBAAmB;;;ACChC,MAAM,mBAAmB;AACzB,MAAa,iBAAiB;;AAE9B,MAAa,oBAAoB;;AAEjC,MAAa,OAAO;;AAGpB,SAAgB,aAAa,OAAyB;CACpD,OAAO,MACJ,MAAM,gBAAgB,CAAC,CACvB,KAAK,SAAS,KAAK,KAAK,CAAC,CAAC,CAC1B,OAAO,OAAO;AACnB;;AAGA,SAAgB,aAAa,SAAoC;CAC/D,OAAO,QAAQ,KAAK,gBAAgB;AACtC;;AAGA,SAAgB,YACd,OACA,eAA6D,CAAC,GAChD;CACd,OAAO,MAAM,KAAK,UAAU;EAC1B,OAAO;EACP,OAAO;EACP,GAAI,aAAa,QAAQ,EAAE,aAAa,aAAa,MAAM,IAAI,CAAC;CAClE,EAAE;AACJ;AAEA,SAAgB,cAAc,SAAgC;CAE5D,OAAO,mBADQ,QAAQ,UAAU,KAAK,IAAI,KAAA,SACT,uBAAuB,QAAQ,UAAU,KAAK,IAAI,EAAE,SAAS,eAAe;AAC/G;AAEA,SAAgB,gBAAgB,SAAoC;CAClE,OAAO,wBAAwB,QAAQ,KAAK,IAAI,KAAA;AAClD;AAEA,SAAgB,iBAAiB,SAAoC;CACnE,OAAO,2BAA2B,QAAQ,KAAK,IAAI,KAAA;AACrD;AAEA,SAAgB,YAAY,SAAgC;CAC1D,OAAO,oBAAoB,QAAQ,UAAU,KAAK,IAAI,KAAA,SAAU;AAClE;AAEA,MAAM,UAAU;AAChB,MAAM,WAAW;AACjB,MAAM,gBAAgB;;;;;;AAOtB,SAAgB,oBAAoB,SAAkC;CACpE,MAAM,SAAS,IAAI,IAAI,QAAQ,SAAS;CACxC,OAAO,QAAQ,UAAU,KAAK,SAAS,GAAG,OAAO,IAAI,IAAI,IAAI,UAAU,SAAS,GAAG,MAAM;AAC3F;;AAGA,SAAgB,mBAAmB,QAAwB;CACzD,OAAO,OAAO,QAAQ,eAAe,EAAE,CAAC,CAAC,KAAK;AAChD;;AAGA,SAAgB,eAAe,WAA8B,MAAwB;CACnF,OAAO,UAAU,SAAS,IAAI,IAAI,UAAU,QAAQ,WAAW,WAAW,IAAI,IAAI,CAAC,GAAG,WAAW,IAAI;AACvG;;;;;;;AAQA,SAAgB,qBAAqB,QAAqC;CACxE,IAAI,OAAO,SAAS,6BAClB,MAAM,IAAI,MAAM,gBAAgB,4BAA4B,0BAA0B;CAExF,MAAM,SAAmB,CAAC;CAC1B,MAAM,uBAAO,IAAI,IAAY;CAC7B,KAAK,MAAM,SAAS,QAAQ;EAC1B,MAAM,OAAO,MAAM,KAAK;EACxB,IAAI,CAAC,QAAQ,KAAK,SAAS,oCAAoC,CAAC,iBAAiB,KAAK,IAAI,GACxF,MAAM,IAAI,MAAM,wBAAwB,OAAO;EAEjD,IAAI,KAAK,IAAI,IAAI,GAAG;EACpB,KAAK,IAAI,IAAI;EACb,OAAO,KAAK,IAAI;CAClB;CACA,OAAO;AACT;AAEA,SAAgB,aAAa,OAAwB;CACnD,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC9D;AAEA,SAAgB,gBAAgB,QAAmC;CACjE,uBAAO,IAAI,MAAM,yBAAyB,OAAO,QAAQ,IAAI,OAAO,YAAY,KAAK,IAAI,GAAG;AAC9F"}
|
package/dist/extensions/mcp.cjs
CHANGED
|
@@ -3,12 +3,12 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
let _agimon_ai_po_core_mcpFacet = require("@agimon-ai/po-core/mcpFacet");
|
|
6
|
-
let
|
|
6
|
+
let _agimon_ai_po_core_serverPlugin = require("@agimon-ai/po-core/serverPlugin");
|
|
7
7
|
//#region src/extensions/workspaces/sessions/(backend)/skill/po-author-domain.mcp.ts
|
|
8
8
|
var po_author_domain_mcp_default = (0, _agimon_ai_po_core_mcpFacet.defineMcpSkill)({
|
|
9
9
|
name: "po-author-domain",
|
|
10
10
|
description: "Configure Po plugin catalogs and domain resource selections in domains.yaml. Use when creating or editing .po/domains.yaml or ~/.po/domains.yaml, choosing local, Git, or npm plugins, filtering plugin resources, setting aliases or defaults, or verifying resolved domain composition.",
|
|
11
|
-
read: () => (0,
|
|
11
|
+
read: () => (0, _agimon_ai_po_core_serverPlugin.readPackageResource)(require("url").pathToFileURL(__filename).href, "src/prompts/po-author-domain/SKILL.md")
|
|
12
12
|
});
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region generated/mcp.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.cjs","names":["defineMcpSkill","readPackageResource","defineMcpPlugin","skillPoAuthorDomain"],"sources":["../../src/extensions/workspaces/sessions/(backend)/skill/po-author-domain.mcp.ts","../../generated/mcp.ts"],"sourcesContent":["import { defineMcpSkill } from '@agimon-ai/po-core/mcpFacet';\nimport { readPackageResource } from '@agimon-ai/po-core/
|
|
1
|
+
{"version":3,"file":"mcp.cjs","names":["defineMcpSkill","readPackageResource","defineMcpPlugin","skillPoAuthorDomain"],"sources":["../../src/extensions/workspaces/sessions/(backend)/skill/po-author-domain.mcp.ts","../../generated/mcp.ts"],"sourcesContent":["import { defineMcpSkill } from '@agimon-ai/po-core/mcpFacet';\nimport { readPackageResource } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineMcpSkill({\n name: 'po-author-domain',\n description:\n 'Configure Po plugin catalogs and domain resource selections in domains.yaml. Use when creating or editing .po/domains.yaml or ~/.po/domains.yaml, choosing local, Git, or npm plugins, filtering plugin resources, setting aliases or defaults, or verifying resolved domain composition.',\n read: () => readPackageResource(import.meta.url, 'src/prompts/po-author-domain/SKILL.md'),\n});\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineMcpPlugin, type PoMcpSessionPlugin } from '@agimon-ai/po-core/mcpFacet';\n\nimport skillPoAuthorDomain from '../src/extensions/workspaces/sessions/(backend)/skill/po-author-domain.mcp';\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\n\nexport const mcp = defineMcpPlugin({\n name: '@agimon-ai/po-domain',\n session: (context) => ({\n get skills(): PoMcpSessionPlugin['skills'] { return [at(skillPoAuthorDomain, context)]; },\n }) satisfies PoMcpSessionPlugin,\n});\n\nexport default mcp;\n"],"mappings":";;;;;;;AAGA,IAAA,gCAAA,GAAeA,4BAAAA,eAAAA,CAAe;CAC5B,MAAM;CACN,aACE;CACF,aAAA,GAAYC,gCAAAA,oBAAAA,CAAAA,QAAAA,KAAAA,CAAAA,CAAAA,cAAAA,UAAAA,CAAAA,CAAAA,MAAqC,uCAAuC;AAC1F,CAAC;;;ACFD,MAAM,MAAY,OAA0B,YAC1C,OAAO,UAAU,aAAc,MAAwB,OAAO,IAAI;AAEpE,MAAa,OAAA,GAAMC,4BAAAA,gBAAAA,CAAgB;CACjC,MAAM;CACN,UAAU,aAAa,EACrB,IAAI,SAAuC;EAAE,OAAO,CAAC,GAAGC,8BAAqB,OAAO,CAAC;CAAG,EAC1F;AACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region generated/mcp.d.ts
|
|
2
|
-
export declare const mcp: import("@agimon-ai/po-core/mcpFacet").
|
|
2
|
+
export declare const mcp: import("@agimon-ai/po-core/mcpFacet").PoMcpPluginDefinition;
|
|
3
3
|
//#endregion
|
|
4
4
|
export { mcp as default };
|
|
5
5
|
//# sourceMappingURL=mcp.d.mts.map
|
package/dist/extensions/mcp.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineMcpPlugin, defineMcpSkill } from "@agimon-ai/po-core/mcpFacet";
|
|
2
|
-
import { readPackageResource } from "@agimon-ai/po-core/
|
|
2
|
+
import { readPackageResource } from "@agimon-ai/po-core/serverPlugin";
|
|
3
3
|
//#region src/extensions/workspaces/sessions/(backend)/skill/po-author-domain.mcp.ts
|
|
4
4
|
var po_author_domain_mcp_default = defineMcpSkill({
|
|
5
5
|
name: "po-author-domain",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.mjs","names":["skillPoAuthorDomain"],"sources":["../../src/extensions/workspaces/sessions/(backend)/skill/po-author-domain.mcp.ts","../../generated/mcp.ts"],"sourcesContent":["import { defineMcpSkill } from '@agimon-ai/po-core/mcpFacet';\nimport { readPackageResource } from '@agimon-ai/po-core/
|
|
1
|
+
{"version":3,"file":"mcp.mjs","names":["skillPoAuthorDomain"],"sources":["../../src/extensions/workspaces/sessions/(backend)/skill/po-author-domain.mcp.ts","../../generated/mcp.ts"],"sourcesContent":["import { defineMcpSkill } from '@agimon-ai/po-core/mcpFacet';\nimport { readPackageResource } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineMcpSkill({\n name: 'po-author-domain',\n description:\n 'Configure Po plugin catalogs and domain resource selections in domains.yaml. Use when creating or editing .po/domains.yaml or ~/.po/domains.yaml, choosing local, Git, or npm plugins, filtering plugin resources, setting aliases or defaults, or verifying resolved domain composition.',\n read: () => readPackageResource(import.meta.url, 'src/prompts/po-author-domain/SKILL.md'),\n});\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineMcpPlugin, type PoMcpSessionPlugin } from '@agimon-ai/po-core/mcpFacet';\n\nimport skillPoAuthorDomain from '../src/extensions/workspaces/sessions/(backend)/skill/po-author-domain.mcp';\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\n\nexport const mcp = defineMcpPlugin({\n name: '@agimon-ai/po-domain',\n session: (context) => ({\n get skills(): PoMcpSessionPlugin['skills'] { return [at(skillPoAuthorDomain, context)]; },\n }) satisfies PoMcpSessionPlugin,\n});\n\nexport default mcp;\n"],"mappings":";;;AAGA,IAAA,+BAAe,eAAe;CAC5B,MAAM;CACN,aACE;CACF,YAAY,oBAAoB,YAAY,KAAK,uCAAuC;AAC1F,CAAC;;;ACFD,MAAM,MAAY,OAA0B,YAC1C,OAAO,UAAU,aAAc,MAAwB,OAAO,IAAI;AAEpE,MAAa,MAAM,gBAAgB;CACjC,MAAM;CACN,UAAU,aAAa,EACrB,IAAI,SAAuC;EAAE,OAAO,CAAC,GAAGA,8BAAqB,OAAO,CAAC;CAAG,EAC1F;AACF,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { defineNativePlugin, defineSelectionAxis } from "@agimon-ai/po-core/nati
|
|
|
3
3
|
var domains_native_default = defineSelectionAxis({
|
|
4
4
|
name: "domains",
|
|
5
5
|
command: "domains",
|
|
6
|
-
statusKey: "
|
|
6
|
+
statusKey: "po-domain",
|
|
7
7
|
emptyLabel: "no domains",
|
|
8
8
|
multi: true,
|
|
9
9
|
order: 20
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.mjs","names":["selectionAxisDomains"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/selection-axis/domains.native.ts","../../generated/native.ts"],"sourcesContent":["import { defineSelectionAxis } from '@agimon-ai/po-core/native';\n\nexport default defineSelectionAxis({\n name: 'domains',\n command: 'domains',\n statusKey: '
|
|
1
|
+
{"version":3,"file":"native.mjs","names":["selectionAxisDomains"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/selection-axis/domains.native.ts","../../generated/native.ts"],"sourcesContent":["import { defineSelectionAxis } from '@agimon-ai/po-core/native';\n\nexport default defineSelectionAxis({\n name: 'domains',\n command: 'domains',\n statusKey: 'po-domain',\n emptyLabel: 'no domains',\n multi: true,\n order: 20,\n});\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport selectionAxisDomains from '../src/extensions/workspaces/sessions/(frontend)/selection-axis/domains.native';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const nativePlugin = defineNativePlugin({\n id: 'domain',\n session: {\n get selectionAxes(): WebPluginContributions['selectionAxes'] { return [via({ name: 'domains' }, selectionAxisDomains)]; },\n },\n});\n"],"mappings":";;AAEA,IAAA,yBAAe,oBAAoB;CACjC,MAAM;CACN,SAAS;CACT,WAAW;CACX,YAAY;CACZ,OAAO;CACP,OAAO;AACT,CAAC;;;ACJD,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,eAAe,mBAAmB;CAC7C,IAAI;CACJ,SAAS,EACP,IAAI,gBAAyD;EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,UAAU,GAAGA,sBAAoB,CAAC;CAAG,EAC1H;AACF,CAAC"}
|
|
@@ -2,31 +2,26 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const
|
|
6
|
-
const require_mcpFilter = require("../mcpFilter-CZNmU_VF.cjs");
|
|
5
|
+
const require_mcpFilter = require("../mcpFilter-CghXZ2K-.cjs");
|
|
7
6
|
const require_pluginMaterializer = require("../pluginMaterializer-C8IZ1PSY.cjs");
|
|
8
|
-
const require_resourceCollector = require("../resourceCollector-
|
|
9
|
-
const require_domainText = require("../domainText-
|
|
10
|
-
let node_path = require("node:path");
|
|
11
|
-
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
7
|
+
const require_resourceCollector = require("../resourceCollector-YOEwhNIR.cjs");
|
|
8
|
+
const require_domainText = require("../domainText-CbpBLX_M.cjs");
|
|
12
9
|
let _agimon_ai_po_config_domains = require("@agimon-ai/po-config/domains");
|
|
13
10
|
let _agimon_ai_po_config_harnessStore = require("@agimon-ai/po-config/harnessStore");
|
|
14
|
-
let node_os = require("node:os");
|
|
15
|
-
node_os = require_rolldown_runtime.__toESM(node_os, 1);
|
|
16
11
|
let _agimon_ai_po_core_mcpProjection = require("@agimon-ai/po-core/mcpProjection");
|
|
17
|
-
let
|
|
12
|
+
let _agimon_ai_po_core_serverPlugin = require("@agimon-ai/po-core/serverPlugin");
|
|
18
13
|
let _agimon_ai_po_core_extensionFile = require("@agimon-ai/po-core/extensionFile");
|
|
19
|
-
let
|
|
14
|
+
let _agimon_ai_po_core_platform = require("@agimon-ai/po-core/platform");
|
|
20
15
|
let _agimon_ai_po_core_skills = require("@agimon-ai/po-core/skills");
|
|
21
16
|
//#region src/extensions/workspaces/sessions/(backend)/_lib/domainServerResources.ts
|
|
22
17
|
/** Retain valid domains behind selection conditions; a broken neighbor must not prevent startup. */
|
|
23
|
-
async function domainServerResources(context) {
|
|
18
|
+
async function domainServerResources(context, fs, io) {
|
|
24
19
|
const resources = [];
|
|
25
|
-
const home = context.environment.HOME ??
|
|
26
|
-
for (const domain of (0, _agimon_ai_po_config_domains.
|
|
27
|
-
const temporaryDirectory =
|
|
20
|
+
const home = context.environment.HOME ?? _agimon_ai_po_core_platform.nodeHost.homeDirectory();
|
|
21
|
+
for (const domain of await (0, _agimon_ai_po_config_domains.listDomainNamesAsync)(fs, context.repoRoot, io, home)) {
|
|
22
|
+
const temporaryDirectory = (0, _agimon_ai_po_core_platform.getOrThrow)(await fs.createTempDir("po-domain-", io));
|
|
28
23
|
try {
|
|
29
|
-
const plugins = await require_pluginMaterializer.materializePluginEntries((0, _agimon_ai_po_config_domains.
|
|
24
|
+
const plugins = await require_pluginMaterializer.materializePluginEntries(await (0, _agimon_ai_po_config_domains.resolvePluginEntriesAsync)(fs, context.repoRoot, [domain], [], io, home));
|
|
30
25
|
const collected = await require_resourceCollector.collectResources(context.repoRoot, plugins, {
|
|
31
26
|
agents: false,
|
|
32
27
|
mcp: false,
|
|
@@ -45,7 +40,7 @@ async function domainServerResources(context) {
|
|
|
45
40
|
mode: domain
|
|
46
41
|
}
|
|
47
42
|
},
|
|
48
|
-
read: () => (0,
|
|
43
|
+
read: async () => (0, _agimon_ai_po_core_platform.getOrThrow)(await fs.readTextFile(skill.path, _agimon_ai_po_core_platform.BACKGROUND_CONTEXT))
|
|
49
44
|
});
|
|
50
45
|
} catch (error) {
|
|
51
46
|
await context.client.notify({
|
|
@@ -54,57 +49,70 @@ async function domainServerResources(context) {
|
|
|
54
49
|
level: "warning"
|
|
55
50
|
});
|
|
56
51
|
} finally {
|
|
57
|
-
await (0,
|
|
58
|
-
recursive: true,
|
|
59
|
-
force: true
|
|
60
|
-
});
|
|
52
|
+
await (0, _agimon_ai_po_core_platform.removePath)(fs, temporaryDirectory, _agimon_ai_po_core_platform.BACKGROUND_CONTEXT);
|
|
61
53
|
}
|
|
62
54
|
}
|
|
63
55
|
return resources;
|
|
64
56
|
}
|
|
65
57
|
//#endregion
|
|
66
58
|
//#region src/extensions/workspaces/sessions/(backend)/root.server.ts
|
|
67
|
-
var root_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoot)(async ({ agent }) => {
|
|
59
|
+
var root_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoot)(async ({ agent, context: root, signal }) => {
|
|
68
60
|
const services = [];
|
|
69
|
-
if (agent) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
provider.provide(_agimon_ai_po_core_mcpProjection.DOOM_MCP_PROJECTION_RESOLVER_SERVICE, resolver);
|
|
99
|
-
});
|
|
61
|
+
if (!agent) return {
|
|
62
|
+
value: { resources: [] },
|
|
63
|
+
services
|
|
64
|
+
};
|
|
65
|
+
const fs = (0, _agimon_ai_po_core_platform.requirePoFs)(root);
|
|
66
|
+
const io = (0, _agimon_ai_po_core_platform.withAbortSignal)(signal, _agimon_ai_po_core_platform.BACKGROUND_CONTEXT);
|
|
67
|
+
const execution = agent.context;
|
|
68
|
+
const home = execution.environment.HOME ?? _agimon_ai_po_core_platform.nodeHost.homeDirectory();
|
|
69
|
+
const resolver = { async resolve(domains) {
|
|
70
|
+
const { state } = await (0, _agimon_ai_po_config_harnessStore.loadHarnessStateAsync)(fs, { ...execution.environment }, io);
|
|
71
|
+
const directory = (0, _agimon_ai_po_core_platform.getOrThrow)(await fs.createTempDir("po-domain-mcp-", io));
|
|
72
|
+
try {
|
|
73
|
+
const plugins = await require_pluginMaterializer.materializePluginEntries(await (0, _agimon_ai_po_config_domains.resolvePluginEntriesAsync)(fs, execution.repoRoot, [...domains], [...state.pluginDirectories], io, home));
|
|
74
|
+
return {
|
|
75
|
+
projection: (await require_resourceCollector.stageMcpResources(execution.repoRoot, plugins, {
|
|
76
|
+
enabled: true,
|
|
77
|
+
temporaryDirectory: directory,
|
|
78
|
+
mcpAllowlist: await require_mcpFilter.resolveMcpAllowlistAsync(fs, execution.repoRoot, [...domains], io)
|
|
79
|
+
})).mcpProjection,
|
|
80
|
+
cleanup: () => (0, _agimon_ai_po_core_platform.removePath)(fs, directory, _agimon_ai_po_core_platform.BACKGROUND_CONTEXT)
|
|
81
|
+
};
|
|
82
|
+
} catch (error) {
|
|
83
|
+
await (0, _agimon_ai_po_core_platform.removePath)(fs, directory, _agimon_ai_po_core_platform.BACKGROUND_CONTEXT);
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
} };
|
|
87
|
+
services.push((cordis) => {
|
|
88
|
+
cordis.plugin((provider) => {
|
|
89
|
+
provider.provide(_agimon_ai_po_core_mcpProjection.PO_MCP_PROJECTION_RESOLVER_SERVICE, resolver);
|
|
100
90
|
});
|
|
101
|
-
}
|
|
91
|
+
});
|
|
102
92
|
return {
|
|
103
|
-
value: { resources:
|
|
93
|
+
value: { resources: await domainServerResources(agent.context, fs, io) },
|
|
104
94
|
services
|
|
105
95
|
};
|
|
106
96
|
});
|
|
107
97
|
//#endregion
|
|
98
|
+
//#region src/extensions/workspaces/sessions/(backend)/api/domains/route.server.ts
|
|
99
|
+
var route_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoute)(({ agent }) => ({
|
|
100
|
+
basePath: "domains",
|
|
101
|
+
start: () => ({
|
|
102
|
+
fetch(request) {
|
|
103
|
+
if (new URL(request.url).pathname !== "/current") return Response.json({ error: "Not found" }, { status: 404 });
|
|
104
|
+
if (request.method !== "GET") return Response.json({ error: "Method not allowed" }, {
|
|
105
|
+
status: 405,
|
|
106
|
+
headers: { Allow: "GET" }
|
|
107
|
+
});
|
|
108
|
+
if (!agent) return Response.json({ error: "Session agent unavailable" }, { status: 404 });
|
|
109
|
+
const selection = agent.context.selection;
|
|
110
|
+
return Response.json({ domains: selection.domains });
|
|
111
|
+
},
|
|
112
|
+
close() {}
|
|
113
|
+
})
|
|
114
|
+
}));
|
|
115
|
+
//#endregion
|
|
108
116
|
//#region src/extensions/workspaces/sessions/(backend)/_lib/domainServerCommand.ts
|
|
109
117
|
const DOMAIN_SELECTION_KIND = "po-domains-selection";
|
|
110
118
|
const DOMAIN_SELECTION_VERSION = 1;
|
|
@@ -115,12 +123,12 @@ function domainSelectionReply(answer) {
|
|
|
115
123
|
if (typeof reply !== "object" || reply === null || !("kind" in reply) || reply.kind !== DOMAIN_SELECTION_KIND || !("version" in reply) || reply.version !== DOMAIN_SELECTION_VERSION || !("domains" in reply) || !Array.isArray(reply.domains) || !reply.domains.every((name) => typeof name === "string")) throw new Error("Invalid domains selection reply");
|
|
116
124
|
return reply.domains;
|
|
117
125
|
}
|
|
118
|
-
function createDomainServerCommand(host) {
|
|
126
|
+
function createDomainServerCommand(host, fs) {
|
|
119
127
|
return {
|
|
120
128
|
name: require_domainText.DOMAIN_COMMAND,
|
|
121
129
|
description: "Show or change the active Po domains.",
|
|
122
130
|
async execute(args, execution) {
|
|
123
|
-
const available = (0, _agimon_ai_po_config_domains.
|
|
131
|
+
const available = await (0, _agimon_ai_po_config_domains.listDomainNamesAsync)(fs, execution.repoRoot, _agimon_ai_po_core_platform.BACKGROUND_CONTEXT);
|
|
124
132
|
let requested = require_domainText.splitDomains(args);
|
|
125
133
|
let fullSet = false;
|
|
126
134
|
if (requested.length === 0) {
|
|
@@ -159,13 +167,13 @@ function createDomainServerCommand(host) {
|
|
|
159
167
|
version: 1,
|
|
160
168
|
revision: Date.now()
|
|
161
169
|
};
|
|
162
|
-
await execution.session.appendCustomEntry(_agimon_ai_po_core_skills.
|
|
170
|
+
await execution.session.appendCustomEntry(_agimon_ai_po_core_skills.PO_RESOURCE_CATALOG_ENTRY_TYPE, projection);
|
|
163
171
|
}
|
|
164
172
|
};
|
|
165
173
|
}
|
|
166
174
|
//#endregion
|
|
167
175
|
//#region src/extensions/workspaces/sessions/(backend)/command/domains.server.ts
|
|
168
|
-
var domains_server_default$1 = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)(({ agent }) => agent ? createDomainServerCommand(agent) : void 0, { cardinality: "optional" });
|
|
176
|
+
var domains_server_default$1 = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)(({ agent, context }) => agent ? createDomainServerCommand(agent, (0, _agimon_ai_po_core_platform.requirePoFs)(context)) : void 0, { cardinality: "optional" });
|
|
169
177
|
//#endregion
|
|
170
178
|
//#region src/extensions/workspaces/sessions/(backend)/resource/domains.server.ts
|
|
171
179
|
var domains_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)((context) => context.root.resources, { cardinality: "many" });
|
|
@@ -182,8 +190,8 @@ var poAuthorDomain_server_default = (0, _agimon_ai_po_core_extensionFile.defineR
|
|
|
182
190
|
}
|
|
183
191
|
},
|
|
184
192
|
kind: "skill",
|
|
185
|
-
path: (0,
|
|
186
|
-
read: () => (0,
|
|
193
|
+
path: (0, _agimon_ai_po_core_serverPlugin.packageResourcePath)(require("url").pathToFileURL(__filename).href, "src/prompts/po-author-domain/SKILL.md"),
|
|
194
|
+
read: () => (0, _agimon_ai_po_core_serverPlugin.readPackageResource)(require("url").pathToFileURL(__filename).href, "src/prompts/po-author-domain/SKILL.md")
|
|
187
195
|
});
|
|
188
196
|
//#endregion
|
|
189
197
|
//#region generated/server.ts
|
|
@@ -198,17 +206,21 @@ const via = (identity, value) => value === void 0 ? void 0 : {
|
|
|
198
206
|
...identity,
|
|
199
207
|
...value
|
|
200
208
|
};
|
|
201
|
-
const
|
|
209
|
+
const serverPlugin = (0, _agimon_ai_po_core_serverPlugin.defineServerPlugin)({
|
|
202
210
|
name: "@agimon-ai/po-domain",
|
|
203
|
-
providerOverrides: (0,
|
|
211
|
+
providerOverrides: (0, _agimon_ai_po_core_serverPlugin.composeServerProviderOverrides)(root_server_default),
|
|
212
|
+
injects: (0, _agimon_ai_po_core_extensionFile.composeRootInjects)({ session: [root_server_default] }),
|
|
204
213
|
session: async (context) => {
|
|
205
|
-
const scopeSession = await root_server_default
|
|
214
|
+
const scopeSession = await context.scopeRoot("session", root_server_default, context);
|
|
206
215
|
const contextSession = {
|
|
207
216
|
...context,
|
|
208
217
|
root: scopeSession.value
|
|
209
218
|
};
|
|
210
219
|
return {
|
|
211
220
|
...(0, _agimon_ai_po_core_extensionFile.composeRootHooks)(scopeSession),
|
|
221
|
+
get api() {
|
|
222
|
+
return [at(route_server_default, contextSession)];
|
|
223
|
+
},
|
|
212
224
|
get commands() {
|
|
213
225
|
return defined([via({ name: "domains" }, at(domains_server_default$1, contextSession))]);
|
|
214
226
|
},
|
|
@@ -223,7 +235,7 @@ const facet = (0, _agimon_ai_po_core_serverFacet.defineServerPlugin)({
|
|
|
223
235
|
}
|
|
224
236
|
});
|
|
225
237
|
//#endregion
|
|
226
|
-
exports.default =
|
|
227
|
-
exports.
|
|
238
|
+
exports.default = serverPlugin;
|
|
239
|
+
exports.serverPlugin = serverPlugin;
|
|
228
240
|
|
|
229
241
|
//# sourceMappingURL=server.cjs.map
|