@agimon-ai/po-profile 0.0.0-alpha.13 → 0.0.0-alpha.15

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.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  //#region src/schemas/apiContracts.ts
6
- /** This facet contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */
6
+ /** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */
7
7
  const apiContracts = (0, require("@agimon-ai/po-core/apiContracts").defineApiContract)({
8
8
  version: 1,
9
9
  http: [],
@@ -1 +1 @@
1
- {"version":3,"file":"apiContracts.cjs","names":["defineApiContract"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\n\n/** This facet contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */\nexport const apiContracts = defineApiContract({ version: 1, http: [], sockets: [], dynamic: [] });\nexport default apiContracts;\n"],"mappings":";;;;;;AAGA,MAAa,gBAAA,4CAAeA,CAAAA,CAAAA,kBAAAA,CAAkB;CAAE,SAAS;CAAG,MAAM,CAAC;CAAG,SAAS,CAAC;CAAG,SAAS,CAAC;AAAE,CAAC"}
1
+ {"version":3,"file":"apiContracts.cjs","names":["defineApiContract"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\n\n/** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */\nexport const apiContracts = defineApiContract({ version: 1, http: [], sockets: [], dynamic: [] });\nexport default apiContracts;\n"],"mappings":";;;;;;AAGA,MAAa,gBAAA,4CAAeA,CAAAA,CAAAA,kBAAAA,CAAkB;CAAE,SAAS;CAAG,MAAM,CAAC;CAAG,SAAS,CAAC;CAAG,SAAS,CAAC;AAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  //#region src/schemas/apiContracts.d.ts
2
- /** This facet contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */
2
+ /** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */
3
3
  export declare const apiContracts: {
4
4
  version: 1;
5
5
  protocols?: Record<string, string> | undefined;
@@ -1,6 +1,6 @@
1
1
  import { defineApiContract } from "@agimon-ai/po-core/apiContracts";
2
2
  //#region src/schemas/apiContracts.ts
3
- /** This facet contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */
3
+ /** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */
4
4
  const apiContracts = defineApiContract({
5
5
  version: 1,
6
6
  http: [],
@@ -1 +1 @@
1
- {"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\n\n/** This facet contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */\nexport const apiContracts = defineApiContract({ version: 1, http: [], sockets: [], dynamic: [] });\nexport default apiContracts;\n"],"mappings":";;;AAGA,MAAa,eAAe,kBAAkB;CAAE,SAAS;CAAG,MAAM,CAAC;CAAG,SAAS,CAAC;CAAG,SAAS,CAAC;AAAE,CAAC"}
1
+ {"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\n\n/** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */\nexport const apiContracts = defineApiContract({ version: 1, http: [], sockets: [], dynamic: [] });\nexport default apiContracts;\n"],"mappings":";;;AAGA,MAAa,eAAe,kBAAkB;CAAE,SAAS;CAAG,MAAM,CAAC;CAAG,SAAS,CAAC;CAAG,SAAS,CAAC;AAAE,CAAC"}
@@ -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 _agimon_ai_po_core_serverFacet = require("@agimon-ai/po-core/serverFacet");
6
+ let _agimon_ai_po_core_serverPlugin = require("@agimon-ai/po-core/serverPlugin");
7
7
  //#region src/extensions/workspaces/sessions/(backend)/skill/po-author-profile.mcp.ts
8
8
  var po_author_profile_mcp_default = (0, _agimon_ai_po_core_mcpFacet.defineMcpSkill)({
9
9
  name: "po-author-profile",
10
10
  description: "Configure Po profile discovery, personas, environment defaults, and precedence in profiles.yaml. Use when creating or changing personal or repository profiles. Do not use for config.yaml runtime settings, modes.yaml, or domains.yaml.",
11
- read: () => (0, _agimon_ai_po_core_serverFacet.readPackageResource)(require("url").pathToFileURL(__filename).href, "src/prompts/po-author-profile/SKILL.md")
11
+ read: () => (0, _agimon_ai_po_core_serverPlugin.readPackageResource)(require("url").pathToFileURL(__filename).href, "src/prompts/po-author-profile/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","skillPoAuthorProfile"],"sources":["../../src/extensions/workspaces/sessions/(backend)/skill/po-author-profile.mcp.ts","../../generated/mcp.ts"],"sourcesContent":["import { defineMcpSkill } from '@agimon-ai/po-core/mcpFacet';\nimport { readPackageResource } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineMcpSkill({\n name: 'po-author-profile',\n description:\n 'Configure Po profile discovery, personas, environment defaults, and precedence in profiles.yaml. Use when creating or changing personal or repository profiles. Do not use for config.yaml runtime settings, modes.yaml, or domains.yaml.',\n read: () => readPackageResource(import.meta.url, 'src/prompts/po-author-profile/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 skillPoAuthorProfile from '../src/extensions/workspaces/sessions/(backend)/skill/po-author-profile.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-profile',\n session: (context) => ({\n get skills(): PoMcpSessionPlugin['skills'] { return [at(skillPoAuthorProfile, context)]; },\n }) satisfies PoMcpSessionPlugin,\n});\n\nexport default mcp;\n"],"mappings":";;;;;;;AAGA,IAAA,iCAAA,GAAeA,4BAAAA,eAAAA,CAAe;CAC5B,MAAM;CACN,aACE;CACF,aAAA,GAAYC,+BAAAA,oBAAAA,CAAAA,QAAAA,KAAAA,CAAAA,CAAAA,cAAAA,UAAAA,CAAAA,CAAAA,MAAqC,wCAAwC;AAC3F,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,+BAAsB,OAAO,CAAC;CAAG,EAC3F;AACF,CAAC"}
1
+ {"version":3,"file":"mcp.cjs","names":["defineMcpSkill","readPackageResource","defineMcpPlugin","skillPoAuthorProfile"],"sources":["../../src/extensions/workspaces/sessions/(backend)/skill/po-author-profile.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-profile',\n description:\n 'Configure Po profile discovery, personas, environment defaults, and precedence in profiles.yaml. Use when creating or changing personal or repository profiles. Do not use for config.yaml runtime settings, modes.yaml, or domains.yaml.',\n read: () => readPackageResource(import.meta.url, 'src/prompts/po-author-profile/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 skillPoAuthorProfile from '../src/extensions/workspaces/sessions/(backend)/skill/po-author-profile.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-profile',\n session: (context) => ({\n get skills(): PoMcpSessionPlugin['skills'] { return [at(skillPoAuthorProfile, context)]; },\n }) satisfies PoMcpSessionPlugin,\n});\n\nexport default mcp;\n"],"mappings":";;;;;;;AAGA,IAAA,iCAAA,GAAeA,4BAAAA,eAAAA,CAAe;CAC5B,MAAM;CACN,aACE;CACF,aAAA,GAAYC,gCAAAA,oBAAAA,CAAAA,QAAAA,KAAAA,CAAAA,CAAAA,cAAAA,UAAAA,CAAAA,CAAAA,MAAqC,wCAAwC;AAC3F,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,+BAAsB,OAAO,CAAC;CAAG,EAC3F;AACF,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { defineMcpPlugin, defineMcpSkill } from "@agimon-ai/po-core/mcpFacet";
2
- import { readPackageResource } from "@agimon-ai/po-core/serverFacet";
2
+ import { readPackageResource } from "@agimon-ai/po-core/serverPlugin";
3
3
  //#region src/extensions/workspaces/sessions/(backend)/skill/po-author-profile.mcp.ts
4
4
  var po_author_profile_mcp_default = defineMcpSkill({
5
5
  name: "po-author-profile",
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.mjs","names":["skillPoAuthorProfile"],"sources":["../../src/extensions/workspaces/sessions/(backend)/skill/po-author-profile.mcp.ts","../../generated/mcp.ts"],"sourcesContent":["import { defineMcpSkill } from '@agimon-ai/po-core/mcpFacet';\nimport { readPackageResource } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineMcpSkill({\n name: 'po-author-profile',\n description:\n 'Configure Po profile discovery, personas, environment defaults, and precedence in profiles.yaml. Use when creating or changing personal or repository profiles. Do not use for config.yaml runtime settings, modes.yaml, or domains.yaml.',\n read: () => readPackageResource(import.meta.url, 'src/prompts/po-author-profile/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 skillPoAuthorProfile from '../src/extensions/workspaces/sessions/(backend)/skill/po-author-profile.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-profile',\n session: (context) => ({\n get skills(): PoMcpSessionPlugin['skills'] { return [at(skillPoAuthorProfile, context)]; },\n }) satisfies PoMcpSessionPlugin,\n});\n\nexport default mcp;\n"],"mappings":";;;AAGA,IAAA,gCAAe,eAAe;CAC5B,MAAM;CACN,aACE;CACF,YAAY,oBAAoB,YAAY,KAAK,wCAAwC;AAC3F,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,+BAAsB,OAAO,CAAC;CAAG,EAC3F;AACF,CAAC"}
1
+ {"version":3,"file":"mcp.mjs","names":["skillPoAuthorProfile"],"sources":["../../src/extensions/workspaces/sessions/(backend)/skill/po-author-profile.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-profile',\n description:\n 'Configure Po profile discovery, personas, environment defaults, and precedence in profiles.yaml. Use when creating or changing personal or repository profiles. Do not use for config.yaml runtime settings, modes.yaml, or domains.yaml.',\n read: () => readPackageResource(import.meta.url, 'src/prompts/po-author-profile/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 skillPoAuthorProfile from '../src/extensions/workspaces/sessions/(backend)/skill/po-author-profile.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-profile',\n session: (context) => ({\n get skills(): PoMcpSessionPlugin['skills'] { return [at(skillPoAuthorProfile, context)]; },\n }) satisfies PoMcpSessionPlugin,\n});\n\nexport default mcp;\n"],"mappings":";;;AAGA,IAAA,gCAAe,eAAe;CAC5B,MAAM;CACN,aACE;CACF,YAAY,oBAAoB,YAAY,KAAK,wCAAwC;AAC3F,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,+BAAsB,OAAO,CAAC;CAAG,EAC3F;AACF,CAAC"}
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
4
4
  });
5
5
  const require_profileText = require("../profileText-B5b3tlUP.cjs");
6
6
  let _agimon_ai_po_config_profiles = require("@agimon-ai/po-config/profiles");
7
- let _agimon_ai_po_core_serverFacet = require("@agimon-ai/po-core/serverFacet");
7
+ let _agimon_ai_po_core_serverPlugin = require("@agimon-ai/po-core/serverPlugin");
8
8
  let _agimon_ai_po_core_extensionFile = require("@agimon-ai/po-core/extensionFile");
9
9
  let _agimon_ai_po_core_headless = require("@agimon-ai/po-core/headless");
10
10
  let _agimon_ai_po_core_platform = require("@agimon-ai/po-core/platform");
@@ -131,8 +131,8 @@ var poAuthorProfile_server_default = (0, _agimon_ai_po_core_extensionFile.define
131
131
  }
132
132
  },
133
133
  kind: "skill",
134
- path: (0, _agimon_ai_po_core_serverFacet.packageResourcePath)(require("url").pathToFileURL(__filename).href, "src/prompts/po-author-profile/SKILL.md"),
135
- read: () => (0, _agimon_ai_po_core_serverFacet.readPackageResource)(require("url").pathToFileURL(__filename).href, "src/prompts/po-author-profile/SKILL.md")
134
+ path: (0, _agimon_ai_po_core_serverPlugin.packageResourcePath)(require("url").pathToFileURL(__filename).href, "src/prompts/po-author-profile/SKILL.md"),
135
+ read: () => (0, _agimon_ai_po_core_serverPlugin.readPackageResource)(require("url").pathToFileURL(__filename).href, "src/prompts/po-author-profile/SKILL.md")
136
136
  });
137
137
  //#endregion
138
138
  //#region src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server.ts
@@ -150,11 +150,12 @@ const via = (identity, value) => value === void 0 ? void 0 : {
150
150
  ...identity,
151
151
  ...value
152
152
  };
153
- const facet = (0, _agimon_ai_po_core_serverFacet.defineServerPlugin)({
153
+ const serverPlugin = (0, _agimon_ai_po_core_serverPlugin.defineServerPlugin)({
154
154
  name: "@agimon-ai/po-profile",
155
- providerOverrides: (0, _agimon_ai_po_core_serverFacet.composeServerProviderOverrides)(root_server_default),
155
+ providerOverrides: (0, _agimon_ai_po_core_serverPlugin.composeServerProviderOverrides)(root_server_default),
156
+ injects: (0, _agimon_ai_po_core_extensionFile.composeRootInjects)({ session: [root_server_default] }),
156
157
  session: async (context) => {
157
- const scopeSession = await root_server_default(context);
158
+ const scopeSession = await context.scopeRoot("session", root_server_default, context);
158
159
  const contextSession = {
159
160
  ...context,
160
161
  root: scopeSession.value
@@ -178,7 +179,7 @@ const facet = (0, _agimon_ai_po_core_serverFacet.defineServerPlugin)({
178
179
  }
179
180
  });
180
181
  //#endregion
181
- exports.default = facet;
182
- exports.facet = facet;
182
+ exports.default = serverPlugin;
183
+ exports.serverPlugin = serverPlugin;
183
184
 
184
185
  //# sourceMappingURL=server.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.cjs","names":["defineRoot","createProfileRuntime","resolveProfile","nodeHost","PoHeadlessPromptAdmissionError","createProfileRuntimePlugin","resolveProfile","buildPersonaPrompt","PO_PROFILE_IDENTITY_ENTRY_TYPE","PROFILE_COMMAND","loadProfiles","profileTitle","profileItems","isPoHeadlessPromptAdmissionError","PoSessionSetupError","PoHeadlessPromptAdmissionError","defineRoutedContribution","defineHook","defineHook","defineResource","packageResourcePath","readPackageResource","defineResource","defineServerPlugin","composeServerProviderOverrides","rootSession","composeRootHooks","commandProfile","hookBeforeAgentStart","hookSessionStart","resourcePoAuthorProfile","resourceProfileConfig"],"sources":["../../src/extensions/workspaces/sessions/(backend)/root.server.ts","../../src/extensions/workspaces/sessions/(backend)/_lib/profileServer.ts","../../src/extensions/workspaces/sessions/(backend)/command/profile.server.ts","../../src/extensions/workspaces/sessions/(backend)/hook/beforeAgentStart.server.ts","../../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/poAuthorProfile.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server.ts","../../generated/server.ts"],"sourcesContent":["import { resolveProfile } from '@agimon-ai/po-config/profiles';\nimport { defineRoot } from '@agimon-ai/po-core/extensionFile';\nimport { PoHeadlessPromptAdmissionError } from '@agimon-ai/po-core/headless';\nimport { nodeHost } from '@agimon-ai/po-core/platform';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverFacet';\n\nimport { createProfileRuntime, createProfileRuntimePlugin } from '../../../../services/profileRuntime';\n\nexport default defineRoot(({ agent, signal }: PoServerPluginContext) => {\n if (!agent) return { value: undefined };\n const execution = agent.context;\n const runtime = createProfileRuntime({\n profileName: execution.selection.profile,\n readBinding: (profileName) =>\n resolveProfile(execution.repoRoot, profileName, execution.environment.HOME ?? nodeHost.homeDirectory())\n .integration,\n });\n const unsubscribe = agent.subscribeSelection(async (selection) => {\n try {\n await runtime.select(selection.profile);\n } catch (error) {\n throw new PoHeadlessPromptAdmissionError(error);\n }\n });\n const invalidate = () => runtime.invalidate();\n signal.addEventListener('abort', invalidate, { once: true });\n if (signal.aborted) runtime.invalidate();\n return {\n value: runtime,\n services: [createProfileRuntimePlugin(runtime)],\n async onDispose() {\n unsubscribe();\n signal.removeEventListener('abort', invalidate);\n await runtime.dispose();\n },\n };\n});\n","import { buildPersonaPrompt, loadProfiles, resolveProfile } from '@agimon-ai/po-config/profiles';\nimport {\n PoHeadlessPromptAdmissionError,\n PoSessionSetupError,\n isPoHeadlessPromptAdmissionError,\n type PoHeadlessCommand,\n type PoHeadlessExecutionContext,\n type PoHeadlessHostService,\n type PoHeadlessHook,\n} from '@agimon-ai/po-core/headless';\nimport { PO_PROFILE_IDENTITY_ENTRY_TYPE } from '@agimon-ai/po-core/profileIdentity';\n\nimport type { ProfileRuntime } from '../../../../../services/profileRuntime/type';\nimport { PROFILE_COMMAND, profileItems, profileTitle } from '../../../../../services/profileText';\n\nexport async function readSelectedPersona(execution: {\n readonly repoRoot: string;\n readonly selection: { readonly profile?: string };\n readonly environment?: Readonly<Record<string, string | undefined>>;\n}): Promise<string> {\n const name = execution.selection.profile;\n if (!name) return '(no active profile)';\n const profile = resolveProfile(execution.repoRoot, name, execution.environment?.HOME);\n const prompt = buildPersonaPrompt(profile.personaRoot, profile.persona);\n if (!prompt) throw new Error(`Profile \"${name}\" has no readable persona text`);\n return prompt;\n}\n\nasync function publishSelectedIdentity(execution: PoHeadlessExecutionContext, profile: string): Promise<void> {\n const identity = resolveProfile(execution.repoRoot, profile, execution.environment.HOME).identity;\n await execution.session.appendCustomEntry(PO_PROFILE_IDENTITY_ENTRY_TYPE, {\n profile,\n ...(identity?.name === undefined ? {} : { name: identity.name }),\n ...(identity?.icon === undefined ? {} : { icon: identity.icon }),\n });\n}\n\nexport function createProfileServerCommand(host: PoHeadlessHostService): PoHeadlessCommand {\n return {\n name: PROFILE_COMMAND,\n description: 'Show or change the active Po profile.',\n selectionRecovery: true,\n async execute(args, execution) {\n const profiles = loadProfiles(execution.repoRoot, execution.environment.HOME);\n let requested = args.trim();\n if (!requested) {\n const selected = await execution.client.request({\n kind: 'select',\n title: profileTitle(execution.selection.profile),\n options: profileItems(profiles),\n });\n if (typeof selected !== 'string' || !selected) return;\n requested = selected;\n }\n if (!profiles.some(({ name }) => name === requested)) throw new Error(`Unknown profile: ${requested}`);\n if (requested === execution.selection.profile && host.inspectCapabilities().ready) return;\n try {\n await host.changeSelection({ axis: 'profile', profile: requested });\n } catch (error) {\n if (isPoHeadlessPromptAdmissionError(error))\n throw new PoSessionSetupError(\n 'Profile integration is unavailable. Restore its credential or choose another profile.',\n );\n throw error;\n }\n await publishSelectedIdentity(execution, requested);\n },\n };\n}\nexport async function assertProfileReady(runtime: ProfileRuntime | undefined): Promise<void> {\n try {\n await runtime?.ready();\n } catch (error) {\n // Ordinary hook failures are advisory. This is a fail-closed admission boundary.\n throw new PoHeadlessPromptAdmissionError(error);\n }\n}\n\nexport const profileIdentityHook: PoHeadlessHook<'session_start'> = {\n event: 'session_start',\n async handle(_event, execution) {\n const profile = execution.selection.profile;\n if (profile !== undefined) await publishSelectedIdentity(execution, profile);\n },\n};\n","import { defineRoutedContribution } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverFacet';\n\nimport { createProfileServerCommand } from '../_lib/profileServer';\nexport default defineRoutedContribution(\n ({ agent }: PoServerPluginContext) => (agent ? createProfileServerCommand(agent) : undefined),\n { cardinality: 'optional' },\n);\n","import { defineHook, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverFacet';\n\nimport type { ProfileRuntime } from '../../../../../services/profileRuntime/type';\nimport { assertProfileReady } from '../_lib/profileServer';\n\nexport default defineHook(({ root }: WithRoot<PoServerPluginContext, ProfileRuntime | undefined>) => ({\n async handle() {\n await assertProfileReady(root);\n },\n}));\n","import { defineHook, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoHeadlessExecutionContext } from '@agimon-ai/po-core/headless';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverFacet';\n\nimport type { ProfileRuntime } from '../../../../../services/profileRuntime/type';\nimport { assertProfileReady, profileIdentityHook } from '../_lib/profileServer';\n\nexport default defineHook(({ root }: WithRoot<PoServerPluginContext, ProfileRuntime | undefined>) => ({\n ...profileIdentityHook,\n async handle(event: Readonly<Record<string, unknown>>, execution: PoHeadlessExecutionContext) {\n await assertProfileReady(root);\n await profileIdentityHook.handle(event, execution);\n },\n}));\n","import { defineResource } from '@agimon-ai/po-core/extensionFile';\nimport { packageResourcePath, readPackageResource } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineResource({\n name: 'po-author-profile',\n description:\n 'Configure Po profile discovery, personas, environment defaults, and precedence in profiles.yaml. Use when creating or changing personal or repository profiles. Do not use for config.yaml runtime settings, modes.yaml, or domains.yaml.',\n when: { state: { 'minor-mode': 'help' }, attribution: { kind: 'minor' as const, mode: 'help' } },\n kind: 'skill' as const,\n path: packageResourcePath(import.meta.url, 'src/prompts/po-author-profile/SKILL.md'),\n read: () => readPackageResource(import.meta.url, 'src/prompts/po-author-profile/SKILL.md'),\n});\n","import { defineResource } from '@agimon-ai/po-core/extensionFile';\n\nimport { readSelectedPersona } from '../_lib/profileServer';\nexport default defineResource({ name: 'po/profile-config', kind: 'context' as const, read: readSelectedPersona });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineServerPlugin, type PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\nimport { composeServerProviderOverrides } from '@agimon-ai/po-core/serverFacet';\nimport { composeRootHooks } from '@agimon-ai/po-core/extensionFile';\n\nimport rootSession from '../src/extensions/workspaces/sessions/(backend)/root.server';\nimport commandProfile from '../src/extensions/workspaces/sessions/(backend)/command/profile.server';\nimport hookBeforeAgentStart from '../src/extensions/workspaces/sessions/(backend)/hook/beforeAgentStart.server';\nimport hookSessionStart from '../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server';\nimport resourcePoAuthorProfile from '../src/extensions/workspaces/sessions/(backend)/resource/poAuthorProfile.server';\nimport resourceProfileConfig from '../src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server';\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\n/* v8 ignore next -- generated normalization branch */\nconst defined = <T>(values: readonly (T | undefined)[]): T[] =>\n values.filter((value): value is T => value !== undefined);\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const facet = defineServerPlugin({\n name: '@agimon-ai/po-profile',\n providerOverrides: composeServerProviderOverrides(rootSession),\n session: async (context) => {\n const scopeSession = await rootSession(context);\n const contextSession = { ...context, root: scopeSession.value };\n return {\n ...composeRootHooks(scopeSession),\n get commands(): PoServerSessionPlugin['commands'] { return defined([via({ name: 'profile' }, at(commandProfile, contextSession))]); },\n get hooks(): PoServerSessionPlugin['hooks'] { return [via({ event: 'before_agent_start' }, at(hookBeforeAgentStart, contextSession)), via({ event: 'session_start' }, at(hookSessionStart, contextSession))]; },\n get resources(): PoServerSessionPlugin['resources'] { return [at(resourcePoAuthorProfile, contextSession), at(resourceProfileConfig, contextSession)]; },\n services: [...(scopeSession.services ?? [])],\n get activities(): PoServerSessionPlugin['activities'] { return [...(scopeSession.activities ?? [])]; },\n };\n },\n});\n\nexport default facet;\n"],"mappings":";;;;;;;;;;;;AAQA,IAAA,uBAAA,GAAeA,iCAAAA,WAAAA,EAAY,EAAE,OAAO,aAAoC;CACtE,IAAI,CAAC,OAAO,OAAO,EAAE,OAAO,KAAA,EAAU;CACtC,MAAM,YAAY,MAAM;CACx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AAI;AAAiB;AAEzE,MAAa,SAAA,GAAQC,+BAAAA,mBAAAA,CAAmB;CACtC,MAAM;CACN,oBAAA,GAAmBC,+BAAAA,+BAAAA,CAA+BC,mBAAW;CAC7D,SAAS,OAAO,YAAY;EAC1B,MAAM,eAAe,MAAMA,oBAAY,OAAO;EAC9C,MAAM,iBAAiB;GAAE,GAAG;GAAS,MAAM,aAAa;EAAM;EAC9D,OAAO;GACL,IAAA,GAAGC,iCAAAA,iBAAAA,CAAiB,YAAY;GAChC,IAAI,WAA8C;IAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,MAAM,UAAU,GAAG,GAAGC,wBAAgB,cAAc,CAAC,CAAC,CAAC;GAAG;GACpI,IAAI,QAAwC;IAAE,OAAO,CAAC,IAAI,EAAE,OAAO,qBAAqB,GAAG,GAAGC,iCAAsB,cAAc,CAAC,GAAG,IAAI,EAAE,OAAO,gBAAgB,GAAG,GAAGC,6BAAkB,cAAc,CAAC,CAAC;GAAG;GAC9M,IAAI,YAAgD;IAAE,OAAO,CAAC,GAAGC,gCAAyB,cAAc,GAAG,GAAGC,8BAAuB,cAAc,CAAC;GAAG;GACvJ,UAAU,CAAC,GAAI,aAAa,YAAY,CAAC,CAAE;GAC3C,IAAI,aAAkD;IAAE,OAAO,CAAC,GAAI,aAAa,cAAc,CAAC,CAAE;GAAG;EACvG;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"server.cjs","names":["defineRoot","createProfileRuntime","resolveProfile","nodeHost","PoHeadlessPromptAdmissionError","createProfileRuntimePlugin","resolveProfile","buildPersonaPrompt","PO_PROFILE_IDENTITY_ENTRY_TYPE","PROFILE_COMMAND","loadProfiles","profileTitle","profileItems","isPoHeadlessPromptAdmissionError","PoSessionSetupError","PoHeadlessPromptAdmissionError","defineRoutedContribution","defineHook","defineHook","defineResource","packageResourcePath","readPackageResource","defineResource","defineServerPlugin","composeServerProviderOverrides","rootSession","composeRootInjects","composeRootHooks","commandProfile","hookBeforeAgentStart","hookSessionStart","resourcePoAuthorProfile","resourceProfileConfig"],"sources":["../../src/extensions/workspaces/sessions/(backend)/root.server.ts","../../src/extensions/workspaces/sessions/(backend)/_lib/profileServer.ts","../../src/extensions/workspaces/sessions/(backend)/command/profile.server.ts","../../src/extensions/workspaces/sessions/(backend)/hook/beforeAgentStart.server.ts","../../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/poAuthorProfile.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server.ts","../../generated/server.ts"],"sourcesContent":["import { resolveProfile } from '@agimon-ai/po-config/profiles';\nimport { defineRoot } from '@agimon-ai/po-core/extensionFile';\nimport { PoHeadlessPromptAdmissionError } from '@agimon-ai/po-core/headless';\nimport { nodeHost } from '@agimon-ai/po-core/platform';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverPlugin';\n\nimport { createProfileRuntime, createProfileRuntimePlugin } from '../../../../services/profileRuntime';\n\nexport default defineRoot(({ agent, signal }: PoServerPluginContext) => {\n if (!agent) return { value: undefined };\n const execution = agent.context;\n const runtime = createProfileRuntime({\n profileName: execution.selection.profile,\n readBinding: (profileName) =>\n resolveProfile(execution.repoRoot, profileName, execution.environment.HOME ?? nodeHost.homeDirectory())\n .integration,\n });\n const unsubscribe = agent.subscribeSelection(async (selection) => {\n try {\n await runtime.select(selection.profile);\n } catch (error) {\n throw new PoHeadlessPromptAdmissionError(error);\n }\n });\n const invalidate = () => runtime.invalidate();\n signal.addEventListener('abort', invalidate, { once: true });\n if (signal.aborted) runtime.invalidate();\n return {\n value: runtime,\n services: [createProfileRuntimePlugin(runtime)],\n async onDispose() {\n unsubscribe();\n signal.removeEventListener('abort', invalidate);\n await runtime.dispose();\n },\n };\n});\n","import { buildPersonaPrompt, loadProfiles, resolveProfile } from '@agimon-ai/po-config/profiles';\nimport {\n PoHeadlessPromptAdmissionError,\n PoSessionSetupError,\n isPoHeadlessPromptAdmissionError,\n type PoHeadlessCommand,\n type PoHeadlessExecutionContext,\n type PoHeadlessHostService,\n type PoHeadlessHook,\n} from '@agimon-ai/po-core/headless';\nimport { PO_PROFILE_IDENTITY_ENTRY_TYPE } from '@agimon-ai/po-core/profileIdentity';\n\nimport type { ProfileRuntime } from '../../../../../services/profileRuntime/type';\nimport { PROFILE_COMMAND, profileItems, profileTitle } from '../../../../../services/profileText';\n\nexport async function readSelectedPersona(execution: {\n readonly repoRoot: string;\n readonly selection: { readonly profile?: string };\n readonly environment?: Readonly<Record<string, string | undefined>>;\n}): Promise<string> {\n const name = execution.selection.profile;\n if (!name) return '(no active profile)';\n const profile = resolveProfile(execution.repoRoot, name, execution.environment?.HOME);\n const prompt = buildPersonaPrompt(profile.personaRoot, profile.persona);\n if (!prompt) throw new Error(`Profile \"${name}\" has no readable persona text`);\n return prompt;\n}\n\nasync function publishSelectedIdentity(execution: PoHeadlessExecutionContext, profile: string): Promise<void> {\n const identity = resolveProfile(execution.repoRoot, profile, execution.environment.HOME).identity;\n await execution.session.appendCustomEntry(PO_PROFILE_IDENTITY_ENTRY_TYPE, {\n profile,\n ...(identity?.name === undefined ? {} : { name: identity.name }),\n ...(identity?.icon === undefined ? {} : { icon: identity.icon }),\n });\n}\n\nexport function createProfileServerCommand(host: PoHeadlessHostService): PoHeadlessCommand {\n return {\n name: PROFILE_COMMAND,\n description: 'Show or change the active Po profile.',\n selectionRecovery: true,\n async execute(args, execution) {\n const profiles = loadProfiles(execution.repoRoot, execution.environment.HOME);\n let requested = args.trim();\n if (!requested) {\n const selected = await execution.client.request({\n kind: 'select',\n title: profileTitle(execution.selection.profile),\n options: profileItems(profiles),\n });\n if (typeof selected !== 'string' || !selected) return;\n requested = selected;\n }\n if (!profiles.some(({ name }) => name === requested)) throw new Error(`Unknown profile: ${requested}`);\n if (requested === execution.selection.profile && host.inspectCapabilities().ready) return;\n try {\n await host.changeSelection({ axis: 'profile', profile: requested });\n } catch (error) {\n if (isPoHeadlessPromptAdmissionError(error))\n throw new PoSessionSetupError(\n 'Profile integration is unavailable. Restore its credential or choose another profile.',\n );\n throw error;\n }\n await publishSelectedIdentity(execution, requested);\n },\n };\n}\nexport async function assertProfileReady(runtime: ProfileRuntime | undefined): Promise<void> {\n try {\n await runtime?.ready();\n } catch (error) {\n // Ordinary hook failures are advisory. This is a fail-closed admission boundary.\n throw new PoHeadlessPromptAdmissionError(error);\n }\n}\n\nexport const profileIdentityHook: PoHeadlessHook<'session_start'> = {\n event: 'session_start',\n async handle(_event, execution) {\n const profile = execution.selection.profile;\n if (profile !== undefined) await publishSelectedIdentity(execution, profile);\n },\n};\n","import { defineRoutedContribution } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverPlugin';\n\nimport { createProfileServerCommand } from '../_lib/profileServer';\nexport default defineRoutedContribution(\n ({ agent }: PoServerPluginContext) => (agent ? createProfileServerCommand(agent) : undefined),\n { cardinality: 'optional' },\n);\n","import { defineHook, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverPlugin';\n\nimport type { ProfileRuntime } from '../../../../../services/profileRuntime/type';\nimport { assertProfileReady } from '../_lib/profileServer';\n\nexport default defineHook(({ root }: WithRoot<PoServerPluginContext, ProfileRuntime | undefined>) => ({\n async handle() {\n await assertProfileReady(root);\n },\n}));\n","import { defineHook, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoHeadlessExecutionContext } from '@agimon-ai/po-core/headless';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverPlugin';\n\nimport type { ProfileRuntime } from '../../../../../services/profileRuntime/type';\nimport { assertProfileReady, profileIdentityHook } from '../_lib/profileServer';\n\nexport default defineHook(({ root }: WithRoot<PoServerPluginContext, ProfileRuntime | undefined>) => ({\n ...profileIdentityHook,\n async handle(event: Readonly<Record<string, unknown>>, execution: PoHeadlessExecutionContext) {\n await assertProfileReady(root);\n await profileIdentityHook.handle(event, execution);\n },\n}));\n","import { defineResource } from '@agimon-ai/po-core/extensionFile';\nimport { packageResourcePath, readPackageResource } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineResource({\n name: 'po-author-profile',\n description:\n 'Configure Po profile discovery, personas, environment defaults, and precedence in profiles.yaml. Use when creating or changing personal or repository profiles. Do not use for config.yaml runtime settings, modes.yaml, or domains.yaml.',\n when: { state: { 'minor-mode': 'help' }, attribution: { kind: 'minor' as const, mode: 'help' } },\n kind: 'skill' as const,\n path: packageResourcePath(import.meta.url, 'src/prompts/po-author-profile/SKILL.md'),\n read: () => readPackageResource(import.meta.url, 'src/prompts/po-author-profile/SKILL.md'),\n});\n","import { defineResource } from '@agimon-ai/po-core/extensionFile';\n\nimport { readSelectedPersona } from '../_lib/profileServer';\nexport default defineResource({ name: 'po/profile-config', kind: 'context' as const, read: readSelectedPersona });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineServerPlugin, type PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\nimport { composeServerProviderOverrides } from '@agimon-ai/po-core/serverPlugin';\nimport { composeRootHooks, composeRootInjects } from '@agimon-ai/po-core/extensionFile';\n\nimport rootSession from '../src/extensions/workspaces/sessions/(backend)/root.server';\nimport commandProfile from '../src/extensions/workspaces/sessions/(backend)/command/profile.server';\nimport hookBeforeAgentStart from '../src/extensions/workspaces/sessions/(backend)/hook/beforeAgentStart.server';\nimport hookSessionStart from '../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server';\nimport resourcePoAuthorProfile from '../src/extensions/workspaces/sessions/(backend)/resource/poAuthorProfile.server';\nimport resourceProfileConfig from '../src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server';\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\n/* v8 ignore next -- generated normalization branch */\nconst defined = <T>(values: readonly (T | undefined)[]): T[] =>\n values.filter((value): value is T => value !== undefined);\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const serverPlugin = defineServerPlugin({\n name: '@agimon-ai/po-profile',\n providerOverrides: composeServerProviderOverrides(rootSession),\n injects: composeRootInjects({ session: [rootSession] }),\n session: async (context) => {\n const scopeSession = await context.scopeRoot('session', rootSession, context);\n const contextSession = { ...context, root: scopeSession.value };\n return {\n ...composeRootHooks(scopeSession),\n get commands(): PoServerSessionPlugin['commands'] { return defined([via({ name: 'profile' }, at(commandProfile, contextSession))]); },\n get hooks(): PoServerSessionPlugin['hooks'] { return [via({ event: 'before_agent_start' }, at(hookBeforeAgentStart, contextSession)), via({ event: 'session_start' }, at(hookSessionStart, contextSession))]; },\n get resources(): PoServerSessionPlugin['resources'] { return [at(resourcePoAuthorProfile, contextSession), at(resourceProfileConfig, contextSession)]; },\n services: [...(scopeSession.services ?? [])],\n get activities(): PoServerSessionPlugin['activities'] { return [...(scopeSession.activities ?? [])]; },\n };\n },\n});\n\nexport default serverPlugin;\n"],"mappings":";;;;;;;;;;;;AAQA,IAAA,uBAAA,GAAeA,iCAAAA,WAAAA,EAAY,EAAE,OAAO,aAAoC;CACtE,IAAI,CAAC,OAAO,OAAO,EAAE,OAAO,KAAA,EAAU;CACtC,MAAM,YAAY,MAAM;CACxB,MAAM,UAAUC,oBAAAA,qBAAqB;EACnC,aAAa,UAAU,UAAU;EACjC,cAAc,iBAAA,GACZC,8BAAAA,eAAAA,CAAe,UAAU,UAAU,aAAa,UAAU,YAAY,QAAQC,4BAAAA,SAAS,cAAc,CAAC,CAAC,CACpG;CACP,CAAC;CACD,MAAM,cAAc,MAAM,mBAAmB,OAAO,cAAc;EAChE,IAAI;GACF,MAAM,QAAQ,OAAO,UAAU,OAAO;EACxC,SAAS,OAAO;GACd,MAAM,IAAIC,4BAAAA,+BAA+B,KAAK;EAChD;CACF,CAAC;CACD,MAAM,mBAAmB,QAAQ,WAAW;CAC5C,OAAO,iBAAiB,SAAS,Y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IAAI,WAA8C;IAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,MAAM,UAAU,GAAG,GAAGC,wBAAgB,cAAc,CAAC,CAAC,CAAC;GAAG;GACpI,IAAI,QAAwC;IAAE,OAAO,CAAC,IAAI,EAAE,OAAO,qBAAqB,GAAG,GAAGC,iCAAsB,cAAc,CAAC,GAAG,IAAI,EAAE,OAAO,gBAAgB,GAAG,GAAGC,6BAAkB,cAAc,CAAC,CAAC;GAAG;GAC9M,IAAI,YAAgD;IAAE,OAAO,CAAC,GAAGC,gCAAyB,cAAc,GAAG,GAAGC,8BAAuB,cAAc,CAAC;GAAG;GACvJ,UAAU,CAAC,GAAI,aAAa,YAAY,CAAC,CAAE;GAC3C,IAAI,aAAkD;IAAE,OAAO,CAAC,GAAI,aAAa,cAAc,CAAC,CAAE;GAAG;EACvG;CACF;AACF,CAAC"}
@@ -1,5 +1,5 @@
1
1
  //#region generated/server.d.ts
2
- export declare const facet: import("@agimon-ai/po-core/serverFacet").PoServerFacet;
2
+ export declare const serverPlugin: import("@agimon-ai/po-core/serverPlugin").PoServerPlugin;
3
3
  //#endregion
4
- export { facet as default };
4
+ export { serverPlugin as default };
5
5
  //# sourceMappingURL=server.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.mts","names":[],"sources":["../../generated/server.ts"],"mappings":";qBAqBa,gDAAK"}
1
+ {"version":3,"file":"server.d.mts","names":[],"sources":["../../generated/server.ts"],"mappings":";qBAqBa,wDAAY"}
@@ -1,7 +1,7 @@
1
1
  import { c as createProfileRuntime, i as profileItems, l as createProfileRuntimePlugin, s as profileTitle, t as PROFILE_COMMAND } from "../profileText-lvcGhQ4l.mjs";
2
2
  import { buildPersonaPrompt, loadProfiles, resolveProfile } from "@agimon-ai/po-config/profiles";
3
- import { composeServerProviderOverrides, defineServerPlugin, packageResourcePath, readPackageResource } from "@agimon-ai/po-core/serverFacet";
4
- import { composeRootHooks, defineHook, defineResource, defineRoot, defineRoutedContribution } from "@agimon-ai/po-core/extensionFile";
3
+ import { composeServerProviderOverrides, defineServerPlugin, packageResourcePath, readPackageResource } from "@agimon-ai/po-core/serverPlugin";
4
+ import { composeRootHooks, composeRootInjects, defineHook, defineResource, defineRoot, defineRoutedContribution } from "@agimon-ai/po-core/extensionFile";
5
5
  import { PoHeadlessPromptAdmissionError, PoSessionSetupError, isPoHeadlessPromptAdmissionError } from "@agimon-ai/po-core/headless";
6
6
  import { nodeHost } from "@agimon-ai/po-core/platform";
7
7
  import { PO_PROFILE_IDENTITY_ENTRY_TYPE } from "@agimon-ai/po-core/profileIdentity";
@@ -146,11 +146,12 @@ const via = (identity, value) => value === void 0 ? void 0 : {
146
146
  ...identity,
147
147
  ...value
148
148
  };
149
- const facet = defineServerPlugin({
149
+ const serverPlugin = defineServerPlugin({
150
150
  name: "@agimon-ai/po-profile",
151
151
  providerOverrides: composeServerProviderOverrides(root_server_default),
152
+ injects: composeRootInjects({ session: [root_server_default] }),
152
153
  session: async (context) => {
153
- const scopeSession = await root_server_default(context);
154
+ const scopeSession = await context.scopeRoot("session", root_server_default, context);
154
155
  const contextSession = {
155
156
  ...context,
156
157
  root: scopeSession.value
@@ -174,6 +175,6 @@ const facet = defineServerPlugin({
174
175
  }
175
176
  });
176
177
  //#endregion
177
- export { facet as default, facet };
178
+ export { serverPlugin as default, serverPlugin };
178
179
 
179
180
  //# sourceMappingURL=server.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.mjs","names":["rootSession","commandProfile","hookBeforeAgentStart","hookSessionStart","resourcePoAuthorProfile","resourceProfileConfig"],"sources":["../../src/extensions/workspaces/sessions/(backend)/root.server.ts","../../src/extensions/workspaces/sessions/(backend)/_lib/profileServer.ts","../../src/extensions/workspaces/sessions/(backend)/command/profile.server.ts","../../src/extensions/workspaces/sessions/(backend)/hook/beforeAgentStart.server.ts","../../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/poAuthorProfile.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server.ts","../../generated/server.ts"],"sourcesContent":["import { resolveProfile } from '@agimon-ai/po-config/profiles';\nimport { defineRoot } from '@agimon-ai/po-core/extensionFile';\nimport { PoHeadlessPromptAdmissionError } from '@agimon-ai/po-core/headless';\nimport { nodeHost } from '@agimon-ai/po-core/platform';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverFacet';\n\nimport { createProfileRuntime, createProfileRuntimePlugin } from '../../../../services/profileRuntime';\n\nexport default defineRoot(({ agent, signal }: PoServerPluginContext) => {\n if (!agent) return { value: undefined };\n const execution = agent.context;\n const runtime = createProfileRuntime({\n profileName: execution.selection.profile,\n readBinding: (profileName) =>\n resolveProfile(execution.repoRoot, profileName, execution.environment.HOME ?? nodeHost.homeDirectory())\n .integration,\n });\n const unsubscribe = agent.subscribeSelection(async (selection) => {\n try {\n await runtime.select(selection.profile);\n } catch (error) {\n throw new PoHeadlessPromptAdmissionError(error);\n }\n });\n const invalidate = () => runtime.invalidate();\n signal.addEventListener('abort', invalidate, { once: true });\n if (signal.aborted) runtime.invalidate();\n return {\n value: runtime,\n services: [createProfileRuntimePlugin(runtime)],\n async onDispose() {\n unsubscribe();\n signal.removeEventListener('abort', invalidate);\n await runtime.dispose();\n },\n };\n});\n","import { buildPersonaPrompt, loadProfiles, resolveProfile } from '@agimon-ai/po-config/profiles';\nimport {\n PoHeadlessPromptAdmissionError,\n PoSessionSetupError,\n isPoHeadlessPromptAdmissionError,\n type PoHeadlessCommand,\n type PoHeadlessExecutionContext,\n type PoHeadlessHostService,\n type PoHeadlessHook,\n} from '@agimon-ai/po-core/headless';\nimport { PO_PROFILE_IDENTITY_ENTRY_TYPE } from '@agimon-ai/po-core/profileIdentity';\n\nimport type { ProfileRuntime } from '../../../../../services/profileRuntime/type';\nimport { PROFILE_COMMAND, profileItems, profileTitle } from '../../../../../services/profileText';\n\nexport async function readSelectedPersona(execution: {\n readonly repoRoot: string;\n readonly selection: { readonly profile?: string };\n readonly environment?: Readonly<Record<string, string | undefined>>;\n}): Promise<string> {\n const name = execution.selection.profile;\n if (!name) return '(no active profile)';\n const profile = resolveProfile(execution.repoRoot, name, execution.environment?.HOME);\n const prompt = buildPersonaPrompt(profile.personaRoot, profile.persona);\n if (!prompt) throw new Error(`Profile \"${name}\" has no readable persona text`);\n return prompt;\n}\n\nasync function publishSelectedIdentity(execution: PoHeadlessExecutionContext, profile: string): Promise<void> {\n const identity = resolveProfile(execution.repoRoot, profile, execution.environment.HOME).identity;\n await execution.session.appendCustomEntry(PO_PROFILE_IDENTITY_ENTRY_TYPE, {\n profile,\n ...(identity?.name === undefined ? {} : { name: identity.name }),\n ...(identity?.icon === undefined ? {} : { icon: identity.icon }),\n });\n}\n\nexport function createProfileServerCommand(host: PoHeadlessHostService): PoHeadlessCommand {\n return {\n name: PROFILE_COMMAND,\n description: 'Show or change the active Po profile.',\n selectionRecovery: true,\n async execute(args, execution) {\n const profiles = loadProfiles(execution.repoRoot, execution.environment.HOME);\n let requested = args.trim();\n if (!requested) {\n const selected = await execution.client.request({\n kind: 'select',\n title: profileTitle(execution.selection.profile),\n options: profileItems(profiles),\n });\n if (typeof selected !== 'string' || !selected) return;\n requested = selected;\n }\n if (!profiles.some(({ name }) => name === requested)) throw new Error(`Unknown profile: ${requested}`);\n if (requested === execution.selection.profile && host.inspectCapabilities().ready) return;\n try {\n await host.changeSelection({ axis: 'profile', profile: requested });\n } catch (error) {\n if (isPoHeadlessPromptAdmissionError(error))\n throw new PoSessionSetupError(\n 'Profile integration is unavailable. Restore its credential or choose another profile.',\n );\n throw error;\n }\n await publishSelectedIdentity(execution, requested);\n },\n };\n}\nexport async function assertProfileReady(runtime: ProfileRuntime | undefined): Promise<void> {\n try {\n await runtime?.ready();\n } catch (error) {\n // Ordinary hook failures are advisory. This is a fail-closed admission boundary.\n throw new PoHeadlessPromptAdmissionError(error);\n }\n}\n\nexport const profileIdentityHook: PoHeadlessHook<'session_start'> = {\n event: 'session_start',\n async handle(_event, execution) {\n const profile = execution.selection.profile;\n if (profile !== undefined) await publishSelectedIdentity(execution, profile);\n },\n};\n","import { defineRoutedContribution } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverFacet';\n\nimport { createProfileServerCommand } from '../_lib/profileServer';\nexport default defineRoutedContribution(\n ({ agent }: PoServerPluginContext) => (agent ? createProfileServerCommand(agent) : undefined),\n { cardinality: 'optional' },\n);\n","import { defineHook, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverFacet';\n\nimport type { ProfileRuntime } from '../../../../../services/profileRuntime/type';\nimport { assertProfileReady } from '../_lib/profileServer';\n\nexport default defineHook(({ root }: WithRoot<PoServerPluginContext, ProfileRuntime | undefined>) => ({\n async handle() {\n await assertProfileReady(root);\n },\n}));\n","import { defineHook, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoHeadlessExecutionContext } from '@agimon-ai/po-core/headless';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverFacet';\n\nimport type { ProfileRuntime } from '../../../../../services/profileRuntime/type';\nimport { assertProfileReady, profileIdentityHook } from '../_lib/profileServer';\n\nexport default defineHook(({ root }: WithRoot<PoServerPluginContext, ProfileRuntime | undefined>) => ({\n ...profileIdentityHook,\n async handle(event: Readonly<Record<string, unknown>>, execution: PoHeadlessExecutionContext) {\n await assertProfileReady(root);\n await profileIdentityHook.handle(event, execution);\n },\n}));\n","import { defineResource } from '@agimon-ai/po-core/extensionFile';\nimport { packageResourcePath, readPackageResource } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineResource({\n name: 'po-author-profile',\n description:\n 'Configure Po profile discovery, personas, environment defaults, and precedence in profiles.yaml. Use when creating or changing personal or repository profiles. Do not use for config.yaml runtime settings, modes.yaml, or domains.yaml.',\n when: { state: { 'minor-mode': 'help' }, attribution: { kind: 'minor' as const, mode: 'help' } },\n kind: 'skill' as const,\n path: packageResourcePath(import.meta.url, 'src/prompts/po-author-profile/SKILL.md'),\n read: () => readPackageResource(import.meta.url, 'src/prompts/po-author-profile/SKILL.md'),\n});\n","import { defineResource } from '@agimon-ai/po-core/extensionFile';\n\nimport { readSelectedPersona } from '../_lib/profileServer';\nexport default defineResource({ name: 'po/profile-config', kind: 'context' as const, read: readSelectedPersona });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineServerPlugin, type PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\nimport { composeServerProviderOverrides } from '@agimon-ai/po-core/serverFacet';\nimport { composeRootHooks } from '@agimon-ai/po-core/extensionFile';\n\nimport rootSession from '../src/extensions/workspaces/sessions/(backend)/root.server';\nimport commandProfile from '../src/extensions/workspaces/sessions/(backend)/command/profile.server';\nimport hookBeforeAgentStart from '../src/extensions/workspaces/sessions/(backend)/hook/beforeAgentStart.server';\nimport hookSessionStart from '../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server';\nimport resourcePoAuthorProfile from '../src/extensions/workspaces/sessions/(backend)/resource/poAuthorProfile.server';\nimport resourceProfileConfig from '../src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server';\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\n/* v8 ignore next -- generated normalization branch */\nconst defined = <T>(values: readonly (T | undefined)[]): T[] =>\n values.filter((value): value is T => value !== undefined);\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const facet = defineServerPlugin({\n name: '@agimon-ai/po-profile',\n providerOverrides: composeServerProviderOverrides(rootSession),\n session: async (context) => {\n const scopeSession = await rootSession(context);\n const contextSession = { ...context, root: scopeSession.value };\n return {\n ...composeRootHooks(scopeSession),\n get commands(): PoServerSessionPlugin['commands'] { return defined([via({ name: 'profile' }, at(commandProfile, contextSession))]); },\n get hooks(): PoServerSessionPlugin['hooks'] { return [via({ event: 'before_agent_start' }, at(hookBeforeAgentStart, contextSession)), via({ event: 'session_start' }, at(hookSessionStart, contextSession))]; },\n get resources(): PoServerSessionPlugin['resources'] { return [at(resourcePoAuthorProfile, contextSession), at(resourceProfileConfig, contextSession)]; },\n services: [...(scopeSession.services ?? [])],\n get activities(): PoServerSessionPlugin['activities'] { return [...(scopeSession.activities ?? [])]; },\n };\n },\n});\n\nexport default facet;\n"],"mappings":";;;;;;;;AAQA,IAAA,sBAAe,YAAY,EAAE,OAAO,aAAoC;CACtE,IAAI,CAAC,OAAO,OAAO,EAAE,OAAO,KAAA,EAAU;CACtC,MAAM,YAAY,MAAM;CACxB,MAAM,UAAU,qBAAqB;EACnC,aAAa,UAAU,UAAU;EACjC,cAAc,gBACZ,eAAe,UAAU,UAAU,aAAa,UAAU,YAAY,QAAQ,SAAS,cAAc,CAAC,CAAC,CACpG;CACP,CAAC;CACD,MAAM,cAAc,MAAM,mBAAmB,OAAO,cAAc;EAChE,IAAI;GACF,MAAM,QAAQ,OAAO,UAAU,OAAO;EACxC,SAAS,OAAO;GACd,MAAM,IAAI,+BAA+B,KAAK;EAChD;CACF,CAAC;CACD,MAAM,mBAAmB,QAAQ,WAAW;CAC5C,OAAO,iBAAiB,SAAS,YAAY,EAAE,MAAM,KAAK,CAAC;CAC3D,IAAI,OAAO,SAAS,QAAQ,WAAW;CACvC,OAAO;EACL,OAAO;EACP,UAAU,CAAC,2BAA2B,OAAO,CAAC;EAC9C,MAAM,YAAY;GAChB,YAAY;GACZ,OAAO,oBAAoB,SAAS,UAAU;GAC9C,MAAM,QAAQ,QAAQ;EACxB;CACF;AACF,CAAC;;;ACrBD,eAAsB,oBAAoB,WAItB;CAClB,MAAM,OAAO,UAAU,UAAU;CACjC,IAAI,CAAC,MAAM,OAAO;CAClB,MAAM,UAAU,eAAe,UAAU,UAAU,MAAM,UAAU,aAAa,IAAI;CACpF,MAAM,SAAS,mBAAmB,QAAQ,aAAa,QAAQ,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A+BA,mBAAW;CAC7D,SAAS,OAAO,YAAY;EAC1B,MAAM,eAAe,MAAMA,oBAAY,OAAO;EAC9C,MAAM,iBAAiB;GAAE,GAAG;GAAS,MAAM,aAAa;EAAM;EAC9D,OAAO;GACL,GAAG,iBAAiB,YAAY;GAChC,IAAI,WAA8C;IAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,MAAM,UAAU,GAAG,GAAGC,wBAAgB,cAAc,CAAC,CAAC,CAAC;GAAG;GACpI,IAAI,QAAwC;IAAE,OAAO,CAAC,IAAI,EAAE,OAAO,qBAAqB,GAAG,GAAGC,iCAAsB,cAAc,CAAC,GAAG,IAAI,EAAE,OAAO,gBAAgB,GAAG,GAAGC,6BAAkB,cAAc,CAAC,CAAC;GAAG;GAC9M,IAAI,YAAgD;IAAE,OAAO,CAAC,GAAGC,gCAAyB,cAAc,GAAG,GAAGC,8BAAuB,cAAc,CAAC;GAAG;GACvJ,UAAU,CAAC,GAAI,aAAa,YAAY,CAAC,CAAE;GAC3C,IAAI,aAAkD;IAAE,OAAO,CAAC,GAAI,aAAa,cAAc,CAAC,CAAE;GAAG;EACvG;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"server.mjs","names":["rootSession","commandProfile","hookBeforeAgentStart","hookSessionStart","resourcePoAuthorProfile","resourceProfileConfig"],"sources":["../../src/extensions/workspaces/sessions/(backend)/root.server.ts","../../src/extensions/workspaces/sessions/(backend)/_lib/profileServer.ts","../../src/extensions/workspaces/sessions/(backend)/command/profile.server.ts","../../src/extensions/workspaces/sessions/(backend)/hook/beforeAgentStart.server.ts","../../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/poAuthorProfile.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server.ts","../../generated/server.ts"],"sourcesContent":["import { resolveProfile } from '@agimon-ai/po-config/profiles';\nimport { defineRoot } from '@agimon-ai/po-core/extensionFile';\nimport { PoHeadlessPromptAdmissionError } from '@agimon-ai/po-core/headless';\nimport { nodeHost } from '@agimon-ai/po-core/platform';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverPlugin';\n\nimport { createProfileRuntime, createProfileRuntimePlugin } from '../../../../services/profileRuntime';\n\nexport default defineRoot(({ agent, signal }: PoServerPluginContext) => {\n if (!agent) return { value: undefined };\n const execution = agent.context;\n const runtime = createProfileRuntime({\n profileName: execution.selection.profile,\n readBinding: (profileName) =>\n resolveProfile(execution.repoRoot, profileName, execution.environment.HOME ?? nodeHost.homeDirectory())\n .integration,\n });\n const unsubscribe = agent.subscribeSelection(async (selection) => {\n try {\n await runtime.select(selection.profile);\n } catch (error) {\n throw new PoHeadlessPromptAdmissionError(error);\n }\n });\n const invalidate = () => runtime.invalidate();\n signal.addEventListener('abort', invalidate, { once: true });\n if (signal.aborted) runtime.invalidate();\n return {\n value: runtime,\n services: [createProfileRuntimePlugin(runtime)],\n async onDispose() {\n unsubscribe();\n signal.removeEventListener('abort', invalidate);\n await runtime.dispose();\n },\n };\n});\n","import { buildPersonaPrompt, loadProfiles, resolveProfile } from '@agimon-ai/po-config/profiles';\nimport {\n PoHeadlessPromptAdmissionError,\n PoSessionSetupError,\n isPoHeadlessPromptAdmissionError,\n type PoHeadlessCommand,\n type PoHeadlessExecutionContext,\n type PoHeadlessHostService,\n type PoHeadlessHook,\n} from '@agimon-ai/po-core/headless';\nimport { PO_PROFILE_IDENTITY_ENTRY_TYPE } from '@agimon-ai/po-core/profileIdentity';\n\nimport type { ProfileRuntime } from '../../../../../services/profileRuntime/type';\nimport { PROFILE_COMMAND, profileItems, profileTitle } from '../../../../../services/profileText';\n\nexport async function readSelectedPersona(execution: {\n readonly repoRoot: string;\n readonly selection: { readonly profile?: string };\n readonly environment?: Readonly<Record<string, string | undefined>>;\n}): Promise<string> {\n const name = execution.selection.profile;\n if (!name) return '(no active profile)';\n const profile = resolveProfile(execution.repoRoot, name, execution.environment?.HOME);\n const prompt = buildPersonaPrompt(profile.personaRoot, profile.persona);\n if (!prompt) throw new Error(`Profile \"${name}\" has no readable persona text`);\n return prompt;\n}\n\nasync function publishSelectedIdentity(execution: PoHeadlessExecutionContext, profile: string): Promise<void> {\n const identity = resolveProfile(execution.repoRoot, profile, execution.environment.HOME).identity;\n await execution.session.appendCustomEntry(PO_PROFILE_IDENTITY_ENTRY_TYPE, {\n profile,\n ...(identity?.name === undefined ? {} : { name: identity.name }),\n ...(identity?.icon === undefined ? {} : { icon: identity.icon }),\n });\n}\n\nexport function createProfileServerCommand(host: PoHeadlessHostService): PoHeadlessCommand {\n return {\n name: PROFILE_COMMAND,\n description: 'Show or change the active Po profile.',\n selectionRecovery: true,\n async execute(args, execution) {\n const profiles = loadProfiles(execution.repoRoot, execution.environment.HOME);\n let requested = args.trim();\n if (!requested) {\n const selected = await execution.client.request({\n kind: 'select',\n title: profileTitle(execution.selection.profile),\n options: profileItems(profiles),\n });\n if (typeof selected !== 'string' || !selected) return;\n requested = selected;\n }\n if (!profiles.some(({ name }) => name === requested)) throw new Error(`Unknown profile: ${requested}`);\n if (requested === execution.selection.profile && host.inspectCapabilities().ready) return;\n try {\n await host.changeSelection({ axis: 'profile', profile: requested });\n } catch (error) {\n if (isPoHeadlessPromptAdmissionError(error))\n throw new PoSessionSetupError(\n 'Profile integration is unavailable. Restore its credential or choose another profile.',\n );\n throw error;\n }\n await publishSelectedIdentity(execution, requested);\n },\n };\n}\nexport async function assertProfileReady(runtime: ProfileRuntime | undefined): Promise<void> {\n try {\n await runtime?.ready();\n } catch (error) {\n // Ordinary hook failures are advisory. This is a fail-closed admission boundary.\n throw new PoHeadlessPromptAdmissionError(error);\n }\n}\n\nexport const profileIdentityHook: PoHeadlessHook<'session_start'> = {\n event: 'session_start',\n async handle(_event, execution) {\n const profile = execution.selection.profile;\n if (profile !== undefined) await publishSelectedIdentity(execution, profile);\n },\n};\n","import { defineRoutedContribution } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverPlugin';\n\nimport { createProfileServerCommand } from '../_lib/profileServer';\nexport default defineRoutedContribution(\n ({ agent }: PoServerPluginContext) => (agent ? createProfileServerCommand(agent) : undefined),\n { cardinality: 'optional' },\n);\n","import { defineHook, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverPlugin';\n\nimport type { ProfileRuntime } from '../../../../../services/profileRuntime/type';\nimport { assertProfileReady } from '../_lib/profileServer';\n\nexport default defineHook(({ root }: WithRoot<PoServerPluginContext, ProfileRuntime | undefined>) => ({\n async handle() {\n await assertProfileReady(root);\n },\n}));\n","import { defineHook, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoHeadlessExecutionContext } from '@agimon-ai/po-core/headless';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverPlugin';\n\nimport type { ProfileRuntime } from '../../../../../services/profileRuntime/type';\nimport { assertProfileReady, profileIdentityHook } from '../_lib/profileServer';\n\nexport default defineHook(({ root }: WithRoot<PoServerPluginContext, ProfileRuntime | undefined>) => ({\n ...profileIdentityHook,\n async handle(event: Readonly<Record<string, unknown>>, execution: PoHeadlessExecutionContext) {\n await assertProfileReady(root);\n await profileIdentityHook.handle(event, execution);\n },\n}));\n","import { defineResource } from '@agimon-ai/po-core/extensionFile';\nimport { packageResourcePath, readPackageResource } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineResource({\n name: 'po-author-profile',\n description:\n 'Configure Po profile discovery, personas, environment defaults, and precedence in profiles.yaml. Use when creating or changing personal or repository profiles. Do not use for config.yaml runtime settings, modes.yaml, or domains.yaml.',\n when: { state: { 'minor-mode': 'help' }, attribution: { kind: 'minor' as const, mode: 'help' } },\n kind: 'skill' as const,\n path: packageResourcePath(import.meta.url, 'src/prompts/po-author-profile/SKILL.md'),\n read: () => readPackageResource(import.meta.url, 'src/prompts/po-author-profile/SKILL.md'),\n});\n","import { defineResource } from '@agimon-ai/po-core/extensionFile';\n\nimport { readSelectedPersona } from '../_lib/profileServer';\nexport default defineResource({ name: 'po/profile-config', kind: 'context' as const, read: readSelectedPersona });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineServerPlugin, type PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\nimport { composeServerProviderOverrides } from '@agimon-ai/po-core/serverPlugin';\nimport { composeRootHooks, composeRootInjects } from '@agimon-ai/po-core/extensionFile';\n\nimport rootSession from '../src/extensions/workspaces/sessions/(backend)/root.server';\nimport commandProfile from '../src/extensions/workspaces/sessions/(backend)/command/profile.server';\nimport hookBeforeAgentStart from '../src/extensions/workspaces/sessions/(backend)/hook/beforeAgentStart.server';\nimport hookSessionStart from '../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server';\nimport resourcePoAuthorProfile from '../src/extensions/workspaces/sessions/(backend)/resource/poAuthorProfile.server';\nimport resourceProfileConfig from '../src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server';\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\n/* v8 ignore next -- generated normalization branch */\nconst defined = <T>(values: readonly (T | undefined)[]): T[] =>\n values.filter((value): value is T => value !== undefined);\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const serverPlugin = defineServerPlugin({\n name: '@agimon-ai/po-profile',\n providerOverrides: composeServerProviderOverrides(rootSession),\n injects: composeRootInjects({ session: [rootSession] }),\n session: async (context) => {\n const scopeSession = await context.scopeRoot('session', rootSession, context);\n const contextSession = { ...context, root: scopeSession.value };\n return {\n ...composeRootHooks(scopeSession),\n get commands(): PoServerSessionPlugin['commands'] { return defined([via({ name: 'profile' }, at(commandProfile, contextSession))]); },\n get hooks(): PoServerSessionPlugin['hooks'] { return [via({ event: 'before_agent_start' }, at(hookBeforeAgentStart, contextSession)), via({ event: 'session_start' }, at(hookSessionStart, contextSession))]; },\n get resources(): PoServerSessionPlugin['resources'] { return [at(resourcePoAuthorProfile, contextSession), at(resourceProfileConfig, contextSession)]; },\n services: [...(scopeSession.services ?? [])],\n get activities(): PoServerSessionPlugin['activities'] { return [...(scopeSession.activities ?? [])]; },\n };\n },\n});\n\nexport default serverPlugin;\n"],"mappings":";;;;;;;;AAQA,IAAA,sBAAe,YAAY,EAAE,OAAO,aAAoC;CACtE,IAAI,CAAC,OAAO,OAAO,EAAE,OAAO,KAAA,EAAU;CACtC,MAAM,YAAY,MAAM;CACxB,MAAM,UAAU,qBAAqB;EACnC,aAAa,UAAU,UAAU;EACjC,cAAc,gBACZ,eAAe,UAAU,UAAU,aAAa,UAAU,YAAY,QAAQ,SAAS,cAAc,CAAC,CAAC,CACpG;CACP,CAAC;CACD,MAAM,cAAc,MAAM,mBAAmB,OAAO,cAAc;EAChE,IAAI;GACF,MAAM,QAAQ,OAAO,UAAU,OAAO;EACxC,SAAS,OAAO;GACd,MAAM,IAAI,+BAA+B,KAAK;EAChD;CACF,CAAC;CACD,MAAM,mBAAmB,QAAQ,WAAW;CAC5C,OAAO,iBAAiB,SAAS,YAAY,EAAE,MAAM,KAAK,CAAC;CAC3D,IAAI,OAAO,SAAS,QAAQ,WAAW;CACvC,OAAO;EACL,OAAO;EACP,UAAU,CAAC,2BAA2B,OAAO,CAAC;EAC9C,MAAM,YAAY;GAChB,YAAY;GACZ,OAAO,oBAAoB,SAAS,UAAU;GAC9C,MAAM,QAAQ,QAAQ;EACxB;CACF;AACF,CAAC;;;ACrBD,eAAsB,oBAAoB,WAItB;CAClB,MAAM,OAAO,UAAU,UAAU;CACjC,IAAI,CAAC,MAAM,OAAO;CAClB,MAAM,UAAU,eAAe,UAAU,UAAU,MAAM,UAAU,aAAa,IAAI;CACpF,MAAM,SAAS,mBAAmB,QAAQ,aAAa,QAAQ,OAAO;CACtE,IAAI,CAAC,QAAQ,MAAM,IAAI,MAAM,YAAY,KAAK,+BAA+B;CAC7E,OAAO;AACT;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O,YAAY;EAC1B,MAAM,eAAe,MAAM,QAAQ,UAAU,WAAWA,qBAAa,OAAO;EAC5E,MAAM,iBAAiB;GAAE,GAAG;GAAS,MAAM,aAAa;EAAM;EAC9D,OAAO;GACL,GAAG,iBAAiB,YAAY;GAChC,IAAI,WAA8C;IAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,MAAM,UAAU,GAAG,GAAGC,wBAAgB,cAAc,CAAC,CAAC,CAAC;GAAG;GACpI,IAAI,QAAwC;IAAE,OAAO,CAAC,IAAI,EAAE,OAAO,qBAAqB,GAAG,GAAGC,iCAAsB,cAAc,CAAC,GAAG,IAAI,EAAE,OAAO,gBAAgB,GAAG,GAAGC,6BAAkB,cAAc,CAAC,CAAC;GAAG;GAC9M,IAAI,YAAgD;IAAE,OAAO,CAAC,GAAGC,gCAAyB,cAAc,GAAG,GAAGC,8BAAuB,cAAc,CAAC;GAAG;GACvJ,UAAU,CAAC,GAAI,aAAa,YAAY,CAAC,CAAE;GAC3C,IAAI,aAAkD;IAAE,OAAO,CAAC,GAAI,aAAa,cAAc,CAAC,CAAE;GAAG;EACvG;CACF;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/po-profile",
3
- "version": "0.0.0-alpha.13",
3
+ "version": "0.0.0-alpha.15",
4
4
  "description": "Persona and environment profile switching for Po sessions.",
5
5
  "keywords": [
6
6
  "agent-persona",
@@ -66,19 +66,19 @@
66
66
  "access": "public"
67
67
  },
68
68
  "dependencies": {
69
- "@agimon-ai/po-config": "0.0.0-alpha.13",
70
- "@agimon-ai/po-core": "0.0.0-alpha.13",
71
- "@agimon-ai/po-minor-mode": "0.0.0-alpha.13",
72
- "@agimon-ai/po-telemetry": "0.0.0-alpha.13",
73
- "@deepseek-ai/cordis": "4.0.4",
69
+ "@agimon-ai/po-config": "0.0.0-alpha.15",
70
+ "@agimon-ai/po-core": "0.0.0-alpha.15",
71
+ "@agimon-ai/po-minor-mode": "0.0.0-alpha.15",
72
+ "@agimon-ai/po-telemetry": "0.0.0-alpha.15",
73
+ "@deepseek-ai/cordis": "4.0.5",
74
74
  "typebox": "1.3.37"
75
75
  },
76
76
  "devDependencies": {
77
- "@agimon-ai/po-build": "0.0.0-alpha.13",
78
- "@agimon-ai/po-core": "0.0.0-alpha.13",
79
- "@agimon-ai/po-voice": "0.0.0-alpha.13",
80
- "@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.13",
81
- "@deepseek-ai/cordis": "4.0.4",
77
+ "@agimon-ai/po-build": "0.0.0-alpha.15",
78
+ "@agimon-ai/po-core": "0.0.0-alpha.15",
79
+ "@agimon-ai/po-voice": "0.0.0-alpha.15",
80
+ "@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.15",
81
+ "@deepseek-ai/cordis": "4.0.5",
82
82
  "@earendil-works/pi-coding-agent": "1.3.0",
83
83
  "@types/node": "26.6.5",
84
84
  "@vitest/coverage-v8": "5.0.4",
@@ -87,7 +87,7 @@
87
87
  "vitest": "5.0.4"
88
88
  },
89
89
  "peerDependencies": {
90
- "@agimon-ai/po-core": "0.0.0-alpha.13",
90
+ "@agimon-ai/po-core": "0.0.0-alpha.15",
91
91
  "@earendil-works/pi-coding-agent": "1.3.0"
92
92
  },
93
93
  "peerDependenciesMeta": {