@agimon-ai/po-help 0.0.0-alpha.13 → 0.0.0-alpha.14
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 +1 -1
- package/dist/apiContracts.cjs.map +1 -1
- package/dist/apiContracts.d.mts +1 -1
- package/dist/apiContracts.mjs +1 -1
- package/dist/apiContracts.mjs.map +1 -1
- package/dist/extensions/server.cjs +14 -13
- 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 +6 -5
- package/dist/extensions/server.mjs.map +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ import { PO_HELP_WHEN as HELP_WHEN } from '@agimon-ai/po-core/help';
|
|
|
46
46
|
|
|
47
47
|
Contributor packages import the shared contract from Core, not the optional Help package, so the distribution does not acquire an unconditional minor-mode dependency.
|
|
48
48
|
|
|
49
|
-
A server tool uses `when: HELP_WHEN`, remains owned by its normal
|
|
49
|
+
A server tool uses `when: HELP_WHEN`, remains owned by its normal server plugin, and checks the active host and Help selection at execution boundaries. Domain conditions can be combined with Help when both are required. Help does not bypass other restrictions.
|
|
50
50
|
|
|
51
51
|
The Log package's `diagnose_agent` routes are a first-party example. Provider replacement, late arrival, withdrawal, cancellation, and package shutdown must preserve owner cleanup. Adding Help never grants filesystem, shell, network, or remote MCP access.
|
|
52
52
|
|
package/dist/apiContracts.cjs
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
//#region src/schemas/apiContracts.ts
|
|
6
|
-
/** This
|
|
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
|
|
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"}
|
package/dist/apiContracts.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/schemas/apiContracts.d.ts
|
|
2
|
-
/** This
|
|
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;
|
package/dist/apiContracts.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineApiContract } from "@agimon-ai/po-core/apiContracts";
|
|
2
2
|
//#region src/schemas/apiContracts.ts
|
|
3
|
-
/** This
|
|
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
|
|
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,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
let _agimon_ai_po_core_help = require("@agimon-ai/po-core/help");
|
|
6
|
-
let
|
|
6
|
+
let _agimon_ai_po_core_serverPlugin = require("@agimon-ai/po-core/serverPlugin");
|
|
7
7
|
let _agimon_ai_po_core_extensionFile = require("@agimon-ai/po-core/extensionFile");
|
|
8
8
|
let _agimon_ai_po_minor_mode = require("@agimon-ai/po-minor-mode");
|
|
9
9
|
let typebox = require("typebox");
|
|
@@ -69,7 +69,7 @@ function helpStatusDetail(report) {
|
|
|
69
69
|
return `${report.counts.skills ?? "pending"} Help skills, ${report.counts.tools} diagnostic tools${report.diagnostics.length ? " (diagnostics available)" : ""}`;
|
|
70
70
|
}
|
|
71
71
|
function createHelpStatusTool(inspect, authorize) {
|
|
72
|
-
return (0,
|
|
72
|
+
return (0, _agimon_ai_po_core_serverPlugin.defineTool)({
|
|
73
73
|
name: HELP_STATUS_TOOL_NAME,
|
|
74
74
|
description: HELP_STATUS_TOOL_DESCRIPTION,
|
|
75
75
|
parameters: helpStatusParameters,
|
|
@@ -128,9 +128,9 @@ function createHelpServerSession(host) {
|
|
|
128
128
|
when: _agimon_ai_po_core_help.PO_HELP_WHEN,
|
|
129
129
|
...HELP_SKILL,
|
|
130
130
|
kind: "skill",
|
|
131
|
-
path: (0,
|
|
131
|
+
path: (0, _agimon_ai_po_core_serverPlugin.packageResourcePath)(require("url").pathToFileURL(__filename).href, "src/prompts/po-use-help/SKILL.md"),
|
|
132
132
|
read: async () => {
|
|
133
|
-
const text = await (0,
|
|
133
|
+
const text = await (0, _agimon_ai_po_core_serverPlugin.readPackageResource)(require("url").pathToFileURL(__filename).href, "src/prompts/po-use-help/SKILL.md");
|
|
134
134
|
if (!text.trim()) throw new Error("The installed Help skill is missing or unreadable.");
|
|
135
135
|
return text;
|
|
136
136
|
}
|
|
@@ -139,9 +139,9 @@ function createHelpServerSession(host) {
|
|
|
139
139
|
when: _agimon_ai_po_core_help.PO_HELP_WHEN,
|
|
140
140
|
...HELP_CHATGPT_SKILL,
|
|
141
141
|
kind: "skill",
|
|
142
|
-
path: (0,
|
|
142
|
+
path: (0, _agimon_ai_po_core_serverPlugin.packageResourcePath)(require("url").pathToFileURL(__filename).href, "src/prompts/po-use-chatgpt-instructions/SKILL.md"),
|
|
143
143
|
read: async () => {
|
|
144
|
-
const text = await (0,
|
|
144
|
+
const text = await (0, _agimon_ai_po_core_serverPlugin.readPackageResource)(require("url").pathToFileURL(__filename).href, "src/prompts/po-use-chatgpt-instructions/SKILL.md");
|
|
145
145
|
if (!text.trim()) throw new Error("The installed ChatGPT instruction skill is missing or unreadable.");
|
|
146
146
|
return text;
|
|
147
147
|
}
|
|
@@ -150,9 +150,9 @@ function createHelpServerSession(host) {
|
|
|
150
150
|
when: _agimon_ai_po_core_help.PO_HELP_WHEN,
|
|
151
151
|
...HELP_NATIVE_SKILL,
|
|
152
152
|
kind: "skill",
|
|
153
|
-
path: (0,
|
|
153
|
+
path: (0, _agimon_ai_po_core_serverPlugin.packageResourcePath)(require("url").pathToFileURL(__filename).href, "src/prompts/po-develop-native-extension/SKILL.md"),
|
|
154
154
|
read: async () => {
|
|
155
|
-
const text = await (0,
|
|
155
|
+
const text = await (0, _agimon_ai_po_core_serverPlugin.readPackageResource)(require("url").pathToFileURL(__filename).href, "src/prompts/po-develop-native-extension/SKILL.md");
|
|
156
156
|
if (!text.trim()) throw new Error("The installed native extension skill is missing or unreadable.");
|
|
157
157
|
return text;
|
|
158
158
|
}
|
|
@@ -284,11 +284,12 @@ const via = (identity, value) => value === void 0 ? void 0 : {
|
|
|
284
284
|
...identity,
|
|
285
285
|
...value
|
|
286
286
|
};
|
|
287
|
-
const
|
|
287
|
+
const serverPlugin = (0, _agimon_ai_po_core_serverPlugin.defineServerPlugin)({
|
|
288
288
|
name: "@agimon-ai/po-help",
|
|
289
|
-
providerOverrides: (0,
|
|
289
|
+
providerOverrides: (0, _agimon_ai_po_core_serverPlugin.composeServerProviderOverrides)(root_server_default),
|
|
290
|
+
injects: (0, _agimon_ai_po_core_extensionFile.composeRootInjects)({ session: [root_server_default] }),
|
|
290
291
|
session: async (context) => {
|
|
291
|
-
const scopeSession = await root_server_default
|
|
292
|
+
const scopeSession = await context.scopeRoot("session", root_server_default, context);
|
|
292
293
|
const contextSession = {
|
|
293
294
|
...context,
|
|
294
295
|
root: scopeSession.value
|
|
@@ -317,7 +318,7 @@ const facet = (0, _agimon_ai_po_core_serverFacet.defineServerPlugin)({
|
|
|
317
318
|
}
|
|
318
319
|
});
|
|
319
320
|
//#endregion
|
|
320
|
-
exports.default =
|
|
321
|
-
exports.
|
|
321
|
+
exports.default = serverPlugin;
|
|
322
|
+
exports.serverPlugin = serverPlugin;
|
|
322
323
|
|
|
323
324
|
//# sourceMappingURL=server.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.cjs","names":["Type","defineTool","HELP_WHEN","HELP_WHEN","packageResourcePath","readPackageResource","defineMinorMode","serverMinorModes","defineRoot","runtime","defineRoutedContribution","defineRoutedContribution","defineRoutedContribution","defineRoutedContribution","defineRoutedContribution","defineRoutedContribution","defineServerPlugin","composeServerProviderOverrides","rootSession","composeRootHooks","commandPoHelp","resourcePoDevelopNativeExtension","resourcePoHelp","resourcePoUseChatgptInstructions","resourcePoUseHelp","toolHelpStatus"],"sources":["../../src/constants/help.ts","../../src/schemas/diagnostics.ts","../../src/services/helpStatus/index.ts","../../src/services/helpServerSession/index.ts","../../src/extensions/workspaces/sessions/(backend)/_lib/runtime.server.ts","../../src/extensions/workspaces/sessions/(backend)/root.server.ts","../../src/extensions/workspaces/sessions/(backend)/command/po-help.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-develop-native-extension.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-help.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-use-chatgpt-instructions.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-use-help.server.ts","../../src/extensions/workspaces/sessions/(backend)/tool/help_status.server.ts","../../generated/server.ts"],"sourcesContent":["export const HELP_COMMAND_NAME = 'po-help';\nexport const HELP_COMMAND_DESCRIPTION = 'Toggle Help guidance and read-only support diagnostics';\nexport const HELP_MODE_ID = 'help';\nexport const HELP_PACKAGE_SOURCE = '@agimon-ai/po-help';\nexport const HELP_SKILL = {\n name: 'po-use-help',\n description:\n 'Set up and debug Po agents using installed package guidance and scoped, read-only diagnostics. Diagnose missing capabilities before proposing authorized repairs.',\n} as const;\nexport const HELP_GUIDANCE =\n 'Help mode is active. Read po-use-help, inspect the available diagnostics, and use the narrowest package guidance for the task. Diagnose before proposing changes. Help does not grant additional permissions.';\nexport const HELP_STATUS_TOOL_NAME = 'help_status';\nexport const HELP_STATUS_TOOL_DESCRIPTION =\n 'Inspect active Help skills, diagnostic tools, contributor ownership, and unavailable contributions in this session. Read-only; does not change selection or permissions.';\nexport const HELP_STATUS_LIMIT = 128;\n\nexport const HELP_CHATGPT_SKILL = {\n name: 'po-use-chatgpt-instructions',\n description:\n \"Print a paste-ready ChatGPT project instruction (at most 8,000 characters) that routes code-mode work through this session's MCP tools and condenses every AGENTS.md rule. Writes no files.\",\n} as const;\n\nexport const HELP_NATIVE_SKILL = {\n name: 'po-develop-native-extension',\n description:\n \"Add or change a Po package's phone UI (.native files, native templates) so it mirrors the cockpit, passes the native build, and is approved and verified before it ships.\",\n} as const;\n","import { Type } from 'typebox';\n\nexport const helpStatusParameters = Type.Object({}, { additionalProperties: false });\n","import type { PoHeadlessCapabilitySnapshot } from '@agimon-ai/po-core/headless';\nimport { PO_HELP_WHEN as HELP_WHEN } from '@agimon-ai/po-core/help';\nimport { defineTool } from '@agimon-ai/po-core/serverFacet';\n\nimport {\n HELP_GUIDANCE,\n HELP_MODE_ID,\n HELP_STATUS_LIMIT,\n HELP_STATUS_TOOL_DESCRIPTION,\n HELP_STATUS_TOOL_NAME,\n} from '../../constants/help';\nimport { helpStatusParameters } from '../../schemas/diagnostics';\nimport type { HelpStatusReport } from './type';\n\nexport function serverHelpStatus(snapshot: PoHeadlessCapabilitySnapshot, enabled: boolean): HelpStatusReport {\n const entries = snapshot.capabilities.filter((entry) => entry.when?.state?.['minor-mode'] === HELP_MODE_ID);\n const skills = entries.filter((entry) => entry.kind === 'skill');\n const tools = entries.filter((entry) => entry.kind === 'tool');\n const diagnostics = entries\n .filter((entry) => enabled && entry.reason && entry.reason !== 'inactive')\n .map((entry) => ({ source: entry.source, code: `HELP_${entry.reason!.replaceAll('-', '_').toUpperCase()}` }));\n const ready = snapshot.ready;\n return {\n activation: !enabled ? 'inactive' : !ready ? 'activating' : diagnostics.length ? 'degraded' : 'active',\n ready,\n revision: snapshot.revision,\n counts: {\n skills: ready ? skills.filter((entry) => entry.active && entry.discoverable).length : null,\n tools: tools.filter((entry) => entry.active).length,\n },\n skills: skills.slice(0, HELP_STATUS_LIMIT).map(({ name, source, active, discoverable, reason }) => ({\n name,\n source,\n active: active && discoverable,\n ...(reason ? { reason } : {}),\n })),\n tools: tools\n .slice(0, HELP_STATUS_LIMIT)\n .map(({ name, source, active, reason }) => ({ name, source, active, ...(reason ? { reason } : {}) })),\n diagnostics: diagnostics.slice(0, HELP_STATUS_LIMIT),\n truncated:\n skills.length > HELP_STATUS_LIMIT || tools.length > HELP_STATUS_LIMIT || diagnostics.length > HELP_STATUS_LIMIT,\n };\n}\n\nexport function helpStatusDetail(report: HelpStatusReport): string {\n return `${report.counts.skills ?? 'pending'} Help skills, ${report.counts.tools} diagnostic tools${report.diagnostics.length ? ' (diagnostics available)' : ''}`;\n}\n\nexport function createHelpStatusTool(\n inspect: () => HelpStatusReport | Promise<HelpStatusReport>,\n authorize: (signal?: AbortSignal) => AbortSignal,\n) {\n return defineTool({\n name: HELP_STATUS_TOOL_NAME,\n description: HELP_STATUS_TOOL_DESCRIPTION,\n parameters: helpStatusParameters,\n when: HELP_WHEN,\n promptGuidelines: [HELP_GUIDANCE],\n async execute(_input, execution) {\n const signal = authorize(execution.signal);\n const report = await inspect();\n signal.throwIfAborted();\n authorize(execution.signal);\n return { content: [{ type: 'text', text: JSON.stringify(report, null, 2) }], details: report };\n },\n });\n}\n","import type { PoHeadlessCommand, PoHeadlessHostService, PoHeadlessResource } from '@agimon-ai/po-core/headless';\nimport { PO_HELP_WHEN as HELP_WHEN } from '@agimon-ai/po-core/help';\nimport { type PoServerSessionPlugin, packageResourcePath, readPackageResource } from '@agimon-ai/po-core/serverFacet';\nimport { defineMinorMode, serverMinorModes, type MinorModeOwner, type MinorModeState } from '@agimon-ai/po-minor-mode';\n\nimport {\n HELP_COMMAND_DESCRIPTION,\n HELP_COMMAND_NAME,\n HELP_GUIDANCE,\n HELP_MODE_ID,\n HELP_PACKAGE_SOURCE,\n HELP_CHATGPT_SKILL,\n HELP_NATIVE_SKILL,\n HELP_SKILL,\n} from '../../constants/help';\nimport { createHelpStatusTool, helpStatusDetail, serverHelpStatus } from '../helpStatus';\nexport function createHelpServerSession(host: PoHeadlessHostService): PoServerSessionPlugin {\n let modeOwner: MinorModeOwner | undefined;\n let pending: boolean | undefined;\n let failure: string | undefined;\n let generation = 0;\n let disposed = false;\n const active = () => (host.context.selection.state?.['minor-mode'] ?? []).includes(HELP_MODE_ID);\n const inspect = () => serverHelpStatus(host.inspectCapabilities(), active());\n const modeState = (): MinorModeState => {\n const report = inspect();\n return {\n activation: pending === true ? 'activating' : active() ? 'active' : 'inactive',\n condition:\n pending !== undefined || !report.ready\n ? 'queued'\n : failure\n ? 'failed'\n : report.activation === 'degraded'\n ? 'degraded'\n : 'ready',\n ...(pending !== undefined\n ? { detail: 'applying Help capabilities' }\n : failure\n ? { detail: failure }\n : active()\n ? { detail: helpStatusDetail(report) }\n : {}),\n actions: [\n {\n id: 'activate',\n enabled: !active() && pending === undefined,\n ...(!active() && pending === undefined ? {} : { disabledReason: 'Help is active or changing.' }),\n },\n {\n id: 'deactivate',\n enabled: active() || pending === true,\n ...(active() || pending === true ? {} : { disabledReason: 'Help mode is not active.' }),\n },\n ],\n };\n };\n const resources: PoHeadlessResource[] = [\n { when: HELP_WHEN, name: 'po-help', kind: 'context', read: () => HELP_GUIDANCE },\n {\n when: HELP_WHEN,\n ...HELP_SKILL,\n kind: 'skill',\n path: packageResourcePath(import.meta.url, 'src/prompts/po-use-help/SKILL.md'),\n read: async () => {\n const text = await readPackageResource(import.meta.url, 'src/prompts/po-use-help/SKILL.md');\n if (!text.trim()) throw new Error('The installed Help skill is missing or unreadable.');\n return text;\n },\n },\n {\n when: HELP_WHEN,\n ...HELP_CHATGPT_SKILL,\n kind: 'skill',\n path: packageResourcePath(import.meta.url, 'src/prompts/po-use-chatgpt-instructions/SKILL.md'),\n read: async () => {\n const text = await readPackageResource(import.meta.url, 'src/prompts/po-use-chatgpt-instructions/SKILL.md');\n if (!text.trim()) throw new Error('The installed ChatGPT instruction skill is missing or unreadable.');\n return text;\n },\n },\n {\n when: HELP_WHEN,\n ...HELP_NATIVE_SKILL,\n kind: 'skill',\n path: packageResourcePath(import.meta.url, 'src/prompts/po-develop-native-extension/SKILL.md'),\n read: async () => {\n const text = await readPackageResource(import.meta.url, 'src/prompts/po-develop-native-extension/SKILL.md');\n if (!text.trim()) throw new Error('The installed native extension skill is missing or unreadable.');\n return text;\n },\n },\n ];\n const selectMode = async (enabled: boolean, signal?: AbortSignal): Promise<void> => {\n if (disposed) throw new Error('Help runtime is disposed.');\n signal?.throwIfAborted();\n const operation = ++generation;\n pending = enabled;\n failure = undefined;\n modeOwner?.publish();\n try {\n if (enabled) await resources[1]!.read(host.context);\n signal?.throwIfAborted();\n if (operation !== generation || disposed) throw new Error('Help activation was cancelled.');\n const modes = (host.context.selection.state?.['minor-mode'] ?? []).filter((mode) => mode !== HELP_MODE_ID);\n await host.changeSelection({\n axis: 'state',\n key: 'minor-mode',\n values: enabled ? [...modes, HELP_MODE_ID] : modes,\n });\n } catch (error) {\n if (operation === generation) failure = (error instanceof Error ? error.message : String(error)).slice(0, 160);\n throw error;\n } finally {\n if (operation === generation) {\n pending = undefined;\n modeOwner?.publish();\n }\n }\n };\n const command: PoHeadlessCommand = {\n name: HELP_COMMAND_NAME,\n description: HELP_COMMAND_DESCRIPTION,\n async execute(_args, execution) {\n await selectMode(!(pending ?? active()));\n await execution.client.notify({\n title: 'Po Help',\n body: active() ? 'Help mode activated.' : 'Help mode deactivated.',\n level: 'info',\n });\n },\n };\n modeOwner = defineMinorMode({\n descriptor: {\n source: HELP_PACKAGE_SOURCE,\n id: HELP_MODE_ID,\n label: 'Help',\n description: 'Package guidance and read-only diagnostics for agent setup and debugging.',\n order: 50,\n actions: [\n {\n id: 'activate',\n label: 'Activate',\n description: 'Expose Help guidance and diagnostic tools.',\n contexts: ['headless'],\n parameters: [],\n },\n {\n id: 'deactivate',\n label: 'Deactivate',\n description: 'Withdraw Help-only guidance and diagnostic tools.',\n contexts: ['headless'],\n parameters: [],\n },\n ],\n },\n state: modeState,\n async handleAction(_runtime, actionId, _argumentsValue, { signal }) {\n if (actionId !== 'activate' && actionId !== 'deactivate')\n throw new Error(`Unknown Help mode action: ${actionId}`);\n await selectMode(actionId === 'activate', signal);\n return { message: active() ? 'Help mode activated.' : 'Help mode deactivated.' };\n },\n }).createOwner(undefined);\n return {\n services: [serverMinorModes([modeOwner])],\n resources,\n commands: [command],\n tools: [\n createHelpStatusTool(inspect, (signal) => {\n signal?.throwIfAborted();\n host.assertActive(HELP_PACKAGE_SOURCE);\n if (disposed || !active()) throw new Error('Help mode is not active.');\n return signal ?? new AbortController().signal;\n }),\n ],\n onDispose() {\n disposed = true;\n generation += 1;\n },\n };\n}\n","import type { PoServerPluginDefinition, PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\n\nimport { createHelpServerSession } from '../../../../../services/helpServerSession';\n\nexport default (({ agent }): Partial<PoServerSessionPlugin> =>\n agent ? createHelpServerSession(agent) : {}) satisfies NonNullable<PoServerPluginDefinition['session']>;\n","import { defineRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverFacet';\n\nimport runtime from './_lib/runtime.server';\n\nexport default defineRoot((context: PoServerPluginContext) => {\n const value = runtime(context);\n return {\n value,\n services: value.services,\n activities: value.activities,\n onStart: value.onStart,\n onStop: value.onStop,\n onDispose: value.onDispose,\n };\n});\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.commands?.[0],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[3],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[0],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[2],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[1],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.tools?.[0],\n { cardinality: 'optional' },\n);\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 commandPoHelp from '../src/extensions/workspaces/sessions/(backend)/command/po-help.server';\nimport resourcePoDevelopNativeExtension from '../src/extensions/workspaces/sessions/(backend)/resource/po-develop-native-extension.server';\nimport resourcePoHelp from '../src/extensions/workspaces/sessions/(backend)/resource/po-help.server';\nimport resourcePoUseChatgptInstructions from '../src/extensions/workspaces/sessions/(backend)/resource/po-use-chatgpt-instructions.server';\nimport resourcePoUseHelp from '../src/extensions/workspaces/sessions/(backend)/resource/po-use-help.server';\nimport toolHelpStatus from '../src/extensions/workspaces/sessions/(backend)/tool/help_status.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-help',\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: 'po-help' }, at(commandPoHelp, contextSession))]); },\n get resources(): PoServerSessionPlugin['resources'] { return defined([at(resourcePoDevelopNativeExtension, contextSession), at(resourcePoHelp, contextSession), at(resourcePoUseChatgptInstructions, contextSession), at(resourcePoUseHelp, contextSession)]); },\n get tools(): PoServerSessionPlugin['tools'] { return defined([via({ name: 'help_status' }, at(toolHelpStatus, contextSession))]); },\n services: [...(scopeSession.services ?? [])],\n get activities(): PoServerSessionPlugin['activities'] { return [...(scopeSession.activities ?? [])]; },\n };\n },\n});\n\nexport default facet;\n"],"mappings":";;;;;;;;;;AAAA,MAAa,oBAAoB;AACjC,MAAa,2BAA2B;AACxC,MAAa,eAAe;AAC5B,MAAa,sBAAsB;AACnC,MAAa,aAAa;CACxB,MAAM;CACN,aACE;AACJ;AACA,MAAa,gBACX;AACF,MAAa,wBAAwB;AACrC,MAAa,+BACX;AAGF,MAAa,qBAAqB;CAChC,MAAM;CACN,aACE;AACJ;AAEA,MAAa,oBAAoB;CAC/B,MAAM;CACN,aACE;AACJ;;;ACxBA,MAAa,uBAAuBA,QAAAA,KAAK,OAAO,CAAC,GAAG,EAAE,sBAAsB,MAAM,CAAC;;;ACYnF,SAAgB,iBAAiB,UAAwC,SAAoC;CAC3G,MAAM,UAAU,SAAS,aAAa,Q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Ac;KAAG,GAAGC,wBAAgB,cAAc;KAAG,GAAGC,4CAAkC,cAAc;KAAG,GAAGC,4BAAmB,cAAc;IAAC,CAAC;GAAG;GAC/P,IAAI,QAAwC;IAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,MAAM,cAAc,GAAG,GAAGC,4BAAgB,cAAc,CAAC,CAAC,CAAC;GAAG;GAClI,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":["Type","defineTool","HELP_WHEN","HELP_WHEN","packageResourcePath","readPackageResource","defineMinorMode","serverMinorModes","defineRoot","runtime","defineRoutedContribution","defineRoutedContribution","defineRoutedContribution","defineRoutedContribution","defineRoutedContribution","defineRoutedContribution","defineServerPlugin","composeServerProviderOverrides","rootSession","composeRootInjects","composeRootHooks","commandPoHelp","resourcePoDevelopNativeExtension","resourcePoHelp","resourcePoUseChatgptInstructions","resourcePoUseHelp","toolHelpStatus"],"sources":["../../src/constants/help.ts","../../src/schemas/diagnostics.ts","../../src/services/helpStatus/index.ts","../../src/services/helpServerSession/index.ts","../../src/extensions/workspaces/sessions/(backend)/_lib/runtime.server.ts","../../src/extensions/workspaces/sessions/(backend)/root.server.ts","../../src/extensions/workspaces/sessions/(backend)/command/po-help.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-develop-native-extension.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-help.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-use-chatgpt-instructions.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-use-help.server.ts","../../src/extensions/workspaces/sessions/(backend)/tool/help_status.server.ts","../../generated/server.ts"],"sourcesContent":["export const HELP_COMMAND_NAME = 'po-help';\nexport const HELP_COMMAND_DESCRIPTION = 'Toggle Help guidance and read-only support diagnostics';\nexport const HELP_MODE_ID = 'help';\nexport const HELP_PACKAGE_SOURCE = '@agimon-ai/po-help';\nexport const HELP_SKILL = {\n name: 'po-use-help',\n description:\n 'Set up and debug Po agents using installed package guidance and scoped, read-only diagnostics. Diagnose missing capabilities before proposing authorized repairs.',\n} as const;\nexport const HELP_GUIDANCE =\n 'Help mode is active. Read po-use-help, inspect the available diagnostics, and use the narrowest package guidance for the task. Diagnose before proposing changes. Help does not grant additional permissions.';\nexport const HELP_STATUS_TOOL_NAME = 'help_status';\nexport const HELP_STATUS_TOOL_DESCRIPTION =\n 'Inspect active Help skills, diagnostic tools, contributor ownership, and unavailable contributions in this session. Read-only; does not change selection or permissions.';\nexport const HELP_STATUS_LIMIT = 128;\n\nexport const HELP_CHATGPT_SKILL = {\n name: 'po-use-chatgpt-instructions',\n description:\n \"Print a paste-ready ChatGPT project instruction (at most 8,000 characters) that routes code-mode work through this session's MCP tools and condenses every AGENTS.md rule. Writes no files.\",\n} as const;\n\nexport const HELP_NATIVE_SKILL = {\n name: 'po-develop-native-extension',\n description:\n \"Add or change a Po package's phone UI (.native files, native templates) so it mirrors the cockpit, passes the native build, and is approved and verified before it ships.\",\n} as const;\n","import { Type } from 'typebox';\n\nexport const helpStatusParameters = Type.Object({}, { additionalProperties: false });\n","import type { PoHeadlessCapabilitySnapshot } from '@agimon-ai/po-core/headless';\nimport { PO_HELP_WHEN as HELP_WHEN } from '@agimon-ai/po-core/help';\nimport { defineTool } from '@agimon-ai/po-core/serverPlugin';\n\nimport {\n HELP_GUIDANCE,\n HELP_MODE_ID,\n HELP_STATUS_LIMIT,\n HELP_STATUS_TOOL_DESCRIPTION,\n HELP_STATUS_TOOL_NAME,\n} from '../../constants/help';\nimport { helpStatusParameters } from '../../schemas/diagnostics';\nimport type { HelpStatusReport } from './type';\n\nexport function serverHelpStatus(snapshot: PoHeadlessCapabilitySnapshot, enabled: boolean): HelpStatusReport {\n const entries = snapshot.capabilities.filter((entry) => entry.when?.state?.['minor-mode'] === HELP_MODE_ID);\n const skills = entries.filter((entry) => entry.kind === 'skill');\n const tools = entries.filter((entry) => entry.kind === 'tool');\n const diagnostics = entries\n .filter((entry) => enabled && entry.reason && entry.reason !== 'inactive')\n .map((entry) => ({ source: entry.source, code: `HELP_${entry.reason!.replaceAll('-', '_').toUpperCase()}` }));\n const ready = snapshot.ready;\n return {\n activation: !enabled ? 'inactive' : !ready ? 'activating' : diagnostics.length ? 'degraded' : 'active',\n ready,\n revision: snapshot.revision,\n counts: {\n skills: ready ? skills.filter((entry) => entry.active && entry.discoverable).length : null,\n tools: tools.filter((entry) => entry.active).length,\n },\n skills: skills.slice(0, HELP_STATUS_LIMIT).map(({ name, source, active, discoverable, reason }) => ({\n name,\n source,\n active: active && discoverable,\n ...(reason ? { reason } : {}),\n })),\n tools: tools\n .slice(0, HELP_STATUS_LIMIT)\n .map(({ name, source, active, reason }) => ({ name, source, active, ...(reason ? { reason } : {}) })),\n diagnostics: diagnostics.slice(0, HELP_STATUS_LIMIT),\n truncated:\n skills.length > HELP_STATUS_LIMIT || tools.length > HELP_STATUS_LIMIT || diagnostics.length > HELP_STATUS_LIMIT,\n };\n}\n\nexport function helpStatusDetail(report: HelpStatusReport): string {\n return `${report.counts.skills ?? 'pending'} Help skills, ${report.counts.tools} diagnostic tools${report.diagnostics.length ? ' (diagnostics available)' : ''}`;\n}\n\nexport function createHelpStatusTool(\n inspect: () => HelpStatusReport | Promise<HelpStatusReport>,\n authorize: (signal?: AbortSignal) => AbortSignal,\n) {\n return defineTool({\n name: HELP_STATUS_TOOL_NAME,\n description: HELP_STATUS_TOOL_DESCRIPTION,\n parameters: helpStatusParameters,\n when: HELP_WHEN,\n promptGuidelines: [HELP_GUIDANCE],\n async execute(_input, execution) {\n const signal = authorize(execution.signal);\n const report = await inspect();\n signal.throwIfAborted();\n authorize(execution.signal);\n return { content: [{ type: 'text', text: JSON.stringify(report, null, 2) }], details: report };\n },\n });\n}\n","import type { PoHeadlessCommand, PoHeadlessHostService, PoHeadlessResource } from '@agimon-ai/po-core/headless';\nimport { PO_HELP_WHEN as HELP_WHEN } from '@agimon-ai/po-core/help';\nimport { type PoServerSessionPlugin, packageResourcePath, readPackageResource } from '@agimon-ai/po-core/serverPlugin';\nimport { defineMinorMode, serverMinorModes, type MinorModeOwner, type MinorModeState } from '@agimon-ai/po-minor-mode';\n\nimport {\n HELP_COMMAND_DESCRIPTION,\n HELP_COMMAND_NAME,\n HELP_GUIDANCE,\n HELP_MODE_ID,\n HELP_PACKAGE_SOURCE,\n HELP_CHATGPT_SKILL,\n HELP_NATIVE_SKILL,\n HELP_SKILL,\n} from '../../constants/help';\nimport { createHelpStatusTool, helpStatusDetail, serverHelpStatus } from '../helpStatus';\nexport function createHelpServerSession(host: PoHeadlessHostService): PoServerSessionPlugin {\n let modeOwner: MinorModeOwner | undefined;\n let pending: boolean | undefined;\n let failure: string | undefined;\n let generation = 0;\n let disposed = false;\n const active = () => (host.context.selection.state?.['minor-mode'] ?? []).includes(HELP_MODE_ID);\n const inspect = () => serverHelpStatus(host.inspectCapabilities(), active());\n const modeState = (): MinorModeState => {\n const report = inspect();\n return {\n activation: pending === true ? 'activating' : active() ? 'active' : 'inactive',\n condition:\n pending !== undefined || !report.ready\n ? 'queued'\n : failure\n ? 'failed'\n : report.activation === 'degraded'\n ? 'degraded'\n : 'ready',\n ...(pending !== undefined\n ? { detail: 'applying Help capabilities' }\n : failure\n ? { detail: failure }\n : active()\n ? { detail: helpStatusDetail(report) }\n : {}),\n actions: [\n {\n id: 'activate',\n enabled: !active() && pending === undefined,\n ...(!active() && pending === undefined ? {} : { disabledReason: 'Help is active or changing.' }),\n },\n {\n id: 'deactivate',\n enabled: active() || pending === true,\n ...(active() || pending === true ? {} : { disabledReason: 'Help mode is not active.' }),\n },\n ],\n };\n };\n const resources: PoHeadlessResource[] = [\n { when: HELP_WHEN, name: 'po-help', kind: 'context', read: () => HELP_GUIDANCE },\n {\n when: HELP_WHEN,\n ...HELP_SKILL,\n kind: 'skill',\n path: packageResourcePath(import.meta.url, 'src/prompts/po-use-help/SKILL.md'),\n read: async () => {\n const text = await readPackageResource(import.meta.url, 'src/prompts/po-use-help/SKILL.md');\n if (!text.trim()) throw new Error('The installed Help skill is missing or unreadable.');\n return text;\n },\n },\n {\n when: HELP_WHEN,\n ...HELP_CHATGPT_SKILL,\n kind: 'skill',\n path: packageResourcePath(import.meta.url, 'src/prompts/po-use-chatgpt-instructions/SKILL.md'),\n read: async () => {\n const text = await readPackageResource(import.meta.url, 'src/prompts/po-use-chatgpt-instructions/SKILL.md');\n if (!text.trim()) throw new Error('The installed ChatGPT instruction skill is missing or unreadable.');\n return text;\n },\n },\n {\n when: HELP_WHEN,\n ...HELP_NATIVE_SKILL,\n kind: 'skill',\n path: packageResourcePath(import.meta.url, 'src/prompts/po-develop-native-extension/SKILL.md'),\n read: async () => {\n const text = await readPackageResource(import.meta.url, 'src/prompts/po-develop-native-extension/SKILL.md');\n if (!text.trim()) throw new Error('The installed native extension skill is missing or unreadable.');\n return text;\n },\n },\n ];\n const selectMode = async (enabled: boolean, signal?: AbortSignal): Promise<void> => {\n if (disposed) throw new Error('Help runtime is disposed.');\n signal?.throwIfAborted();\n const operation = ++generation;\n pending = enabled;\n failure = undefined;\n modeOwner?.publish();\n try {\n if (enabled) await resources[1]!.read(host.context);\n signal?.throwIfAborted();\n if (operation !== generation || disposed) throw new Error('Help activation was cancelled.');\n const modes = (host.context.selection.state?.['minor-mode'] ?? []).filter((mode) => mode !== HELP_MODE_ID);\n await host.changeSelection({\n axis: 'state',\n key: 'minor-mode',\n values: enabled ? [...modes, HELP_MODE_ID] : modes,\n });\n } catch (error) {\n if (operation === generation) failure = (error instanceof Error ? error.message : String(error)).slice(0, 160);\n throw error;\n } finally {\n if (operation === generation) {\n pending = undefined;\n modeOwner?.publish();\n }\n }\n };\n const command: PoHeadlessCommand = {\n name: HELP_COMMAND_NAME,\n description: HELP_COMMAND_DESCRIPTION,\n async execute(_args, execution) {\n await selectMode(!(pending ?? active()));\n await execution.client.notify({\n title: 'Po Help',\n body: active() ? 'Help mode activated.' : 'Help mode deactivated.',\n level: 'info',\n });\n },\n };\n modeOwner = defineMinorMode({\n descriptor: {\n source: HELP_PACKAGE_SOURCE,\n id: HELP_MODE_ID,\n label: 'Help',\n description: 'Package guidance and read-only diagnostics for agent setup and debugging.',\n order: 50,\n actions: [\n {\n id: 'activate',\n label: 'Activate',\n description: 'Expose Help guidance and diagnostic tools.',\n contexts: ['headless'],\n parameters: [],\n },\n {\n id: 'deactivate',\n label: 'Deactivate',\n description: 'Withdraw Help-only guidance and diagnostic tools.',\n contexts: ['headless'],\n parameters: [],\n },\n ],\n },\n state: modeState,\n async handleAction(_runtime, actionId, _argumentsValue, { signal }) {\n if (actionId !== 'activate' && actionId !== 'deactivate')\n throw new Error(`Unknown Help mode action: ${actionId}`);\n await selectMode(actionId === 'activate', signal);\n return { message: active() ? 'Help mode activated.' : 'Help mode deactivated.' };\n },\n }).createOwner(undefined);\n return {\n services: [serverMinorModes([modeOwner])],\n resources,\n commands: [command],\n tools: [\n createHelpStatusTool(inspect, (signal) => {\n signal?.throwIfAborted();\n host.assertActive(HELP_PACKAGE_SOURCE);\n if (disposed || !active()) throw new Error('Help mode is not active.');\n return signal ?? new AbortController().signal;\n }),\n ],\n onDispose() {\n disposed = true;\n generation += 1;\n },\n };\n}\n","import type { PoServerPluginDefinition, PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\n\nimport { createHelpServerSession } from '../../../../../services/helpServerSession';\n\nexport default (({ agent }): Partial<PoServerSessionPlugin> =>\n agent ? createHelpServerSession(agent) : {}) satisfies NonNullable<PoServerPluginDefinition['session']>;\n","import { defineRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverPlugin';\n\nimport runtime from './_lib/runtime.server';\n\nexport default defineRoot((context: PoServerPluginContext) => {\n const value = runtime(context);\n return {\n value,\n services: value.services,\n activities: value.activities,\n onStart: value.onStart,\n onStop: value.onStop,\n onDispose: value.onDispose,\n };\n});\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.commands?.[0],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[3],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[0],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[2],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[1],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.tools?.[0],\n { cardinality: 'optional' },\n);\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 commandPoHelp from '../src/extensions/workspaces/sessions/(backend)/command/po-help.server';\nimport resourcePoDevelopNativeExtension from '../src/extensions/workspaces/sessions/(backend)/resource/po-develop-native-extension.server';\nimport resourcePoHelp from '../src/extensions/workspaces/sessions/(backend)/resource/po-help.server';\nimport resourcePoUseChatgptInstructions from '../src/extensions/workspaces/sessions/(backend)/resource/po-use-chatgpt-instructions.server';\nimport resourcePoUseHelp from '../src/extensions/workspaces/sessions/(backend)/resource/po-use-help.server';\nimport toolHelpStatus from '../src/extensions/workspaces/sessions/(backend)/tool/help_status.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-help',\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: 'po-help' }, at(commandPoHelp, contextSession))]); },\n get resources(): PoServerSessionPlugin['resources'] { return defined([at(resourcePoDevelopNativeExtension, contextSession), at(resourcePoHelp, contextSession), at(resourcePoUseChatgptInstructions, contextSession), at(resourcePoUseHelp, contextSession)]); },\n get tools(): PoServerSessionPlugin['tools'] { return defined([via({ name: 'help_status' }, at(toolHelpStatus, contextSession))]); },\n services: [...(scopeSession.services ?? [])],\n get activities(): PoServerSessionPlugin['activities'] { return [...(scopeSession.activities ?? [])]; },\n };\n },\n});\n\nexport default serverPlugin;\n"],"mappings":";;;;;;;;;;AAAA,MAAa,oBAAoB;AACjC,MAAa,2BAA2B;AACxC,MAAa,eAAe;AAC5B,MAAa,sBAAsB;AACnC,MAAa,aAAa;CACxB,MAAM;CACN,aACE;AACJ;AACA,MAAa,gBACX;AACF,MAAa,wBAAwB;AACrC,MAAa,+BACX;AAGF,MAAa,qBAAqB;CAChC,MAAM;CACN,aACE;AACJ;AAEA,MAAa,oBAAoB;CAC/B,MAAM;CACN,aACE;AACJ;;;ACxBA,MAAa,uBAAuBA,QAAAA,KAAK,OAAO,CAAC,GAAG,EAAE,sBAAsB,MAAM,CAAC;;;ACYnF,SAAgB,iBAAiB,UAAwC,SAAoC;CAC3G,MAAM,UAAU,SAAS,aAAa,QAAQ,UAAU,MAAM,MAAM,QAAQ,kBAAkB,YAAY;CAC1G,MAAM,SAAS,QAAQ,QAAQ,UAAU,MAAM,SAAS,OAAO;CAC/D,MAAM,QAAQ,QAAQ,QAAQ,UAAU,MAAM,SAAS,MAAM;CAC7D,MAAM,cAAc,QACjB,QAAQ,UAAU,WAAW,MAAM,UAAU,MAAM,WAAW,UAAU,CAAC,CACzE,KAAK,WAAW;EAAE,QAAQ,MAAM;EAAQ,MAAM,QAAQ,MAAM,OAAQ,WAAW,KAAK,GAAG,CAAC,CAAC,YAAY;CAAI,EAAE;CAC9G,MAAM,QAAQ,SAAS;CACvB,OAAO;EACL,YAAY,CAAC,UAAU,aAAa,CAAC,QAAQ,eAAe,YAAY,SAAS,aAAa;EAC9F;EACA,UAAU,SAAS;EACnB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@
|
|
|
1
1
|
//#region generated/server.d.ts
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const serverPlugin: import("@agimon-ai/po-core/serverPlugin").PoServerPlugin;
|
|
3
3
|
//#endregion
|
|
4
|
-
export {
|
|
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":";qBAsBa,
|
|
1
|
+
{"version":3,"file":"server.d.mts","names":[],"sources":["../../generated/server.ts"],"mappings":";qBAsBa,wDAAY"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PO_HELP_WHEN } from "@agimon-ai/po-core/help";
|
|
2
|
-
import { composeServerProviderOverrides, defineServerPlugin, defineTool, packageResourcePath, readPackageResource } from "@agimon-ai/po-core/
|
|
3
|
-
import { composeRootHooks, defineRoot, defineRoutedContribution } from "@agimon-ai/po-core/extensionFile";
|
|
2
|
+
import { composeServerProviderOverrides, defineServerPlugin, defineTool, packageResourcePath, readPackageResource } from "@agimon-ai/po-core/serverPlugin";
|
|
3
|
+
import { composeRootHooks, composeRootInjects, defineRoot, defineRoutedContribution } from "@agimon-ai/po-core/extensionFile";
|
|
4
4
|
import { defineMinorMode, serverMinorModes } from "@agimon-ai/po-minor-mode";
|
|
5
5
|
import { Type } from "typebox";
|
|
6
6
|
//#region src/constants/help.ts
|
|
@@ -280,11 +280,12 @@ const via = (identity, value) => value === void 0 ? void 0 : {
|
|
|
280
280
|
...identity,
|
|
281
281
|
...value
|
|
282
282
|
};
|
|
283
|
-
const
|
|
283
|
+
const serverPlugin = defineServerPlugin({
|
|
284
284
|
name: "@agimon-ai/po-help",
|
|
285
285
|
providerOverrides: composeServerProviderOverrides(root_server_default),
|
|
286
|
+
injects: composeRootInjects({ session: [root_server_default] }),
|
|
286
287
|
session: async (context) => {
|
|
287
|
-
const scopeSession = await root_server_default
|
|
288
|
+
const scopeSession = await context.scopeRoot("session", root_server_default, context);
|
|
288
289
|
const contextSession = {
|
|
289
290
|
...context,
|
|
290
291
|
root: scopeSession.value
|
|
@@ -313,6 +314,6 @@ const facet = defineServerPlugin({
|
|
|
313
314
|
}
|
|
314
315
|
});
|
|
315
316
|
//#endregion
|
|
316
|
-
export {
|
|
317
|
+
export { serverPlugin as default, serverPlugin };
|
|
317
318
|
|
|
318
319
|
//# sourceMappingURL=server.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.mjs","names":["HELP_WHEN","HELP_WHEN","runtime","rootSession","commandPoHelp","resourcePoDevelopNativeExtension","resourcePoHelp","resourcePoUseChatgptInstructions","resourcePoUseHelp","toolHelpStatus"],"sources":["../../src/constants/help.ts","../../src/schemas/diagnostics.ts","../../src/services/helpStatus/index.ts","../../src/services/helpServerSession/index.ts","../../src/extensions/workspaces/sessions/(backend)/_lib/runtime.server.ts","../../src/extensions/workspaces/sessions/(backend)/root.server.ts","../../src/extensions/workspaces/sessions/(backend)/command/po-help.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-develop-native-extension.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-help.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-use-chatgpt-instructions.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-use-help.server.ts","../../src/extensions/workspaces/sessions/(backend)/tool/help_status.server.ts","../../generated/server.ts"],"sourcesContent":["export const HELP_COMMAND_NAME = 'po-help';\nexport const HELP_COMMAND_DESCRIPTION = 'Toggle Help guidance and read-only support diagnostics';\nexport const HELP_MODE_ID = 'help';\nexport const HELP_PACKAGE_SOURCE = '@agimon-ai/po-help';\nexport const HELP_SKILL = {\n name: 'po-use-help',\n description:\n 'Set up and debug Po agents using installed package guidance and scoped, read-only diagnostics. Diagnose missing capabilities before proposing authorized repairs.',\n} as const;\nexport const HELP_GUIDANCE =\n 'Help mode is active. Read po-use-help, inspect the available diagnostics, and use the narrowest package guidance for the task. Diagnose before proposing changes. Help does not grant additional permissions.';\nexport const HELP_STATUS_TOOL_NAME = 'help_status';\nexport const HELP_STATUS_TOOL_DESCRIPTION =\n 'Inspect active Help skills, diagnostic tools, contributor ownership, and unavailable contributions in this session. Read-only; does not change selection or permissions.';\nexport const HELP_STATUS_LIMIT = 128;\n\nexport const HELP_CHATGPT_SKILL = {\n name: 'po-use-chatgpt-instructions',\n description:\n \"Print a paste-ready ChatGPT project instruction (at most 8,000 characters) that routes code-mode work through this session's MCP tools and condenses every AGENTS.md rule. Writes no files.\",\n} as const;\n\nexport const HELP_NATIVE_SKILL = {\n name: 'po-develop-native-extension',\n description:\n \"Add or change a Po package's phone UI (.native files, native templates) so it mirrors the cockpit, passes the native build, and is approved and verified before it ships.\",\n} as const;\n","import { Type } from 'typebox';\n\nexport const helpStatusParameters = Type.Object({}, { additionalProperties: false });\n","import type { PoHeadlessCapabilitySnapshot } from '@agimon-ai/po-core/headless';\nimport { PO_HELP_WHEN as HELP_WHEN } from '@agimon-ai/po-core/help';\nimport { defineTool } from '@agimon-ai/po-core/serverFacet';\n\nimport {\n HELP_GUIDANCE,\n HELP_MODE_ID,\n HELP_STATUS_LIMIT,\n HELP_STATUS_TOOL_DESCRIPTION,\n HELP_STATUS_TOOL_NAME,\n} from '../../constants/help';\nimport { helpStatusParameters } from '../../schemas/diagnostics';\nimport type { HelpStatusReport } from './type';\n\nexport function serverHelpStatus(snapshot: PoHeadlessCapabilitySnapshot, enabled: boolean): HelpStatusReport {\n const entries = snapshot.capabilities.filter((entry) => entry.when?.state?.['minor-mode'] === HELP_MODE_ID);\n const skills = entries.filter((entry) => entry.kind === 'skill');\n const tools = entries.filter((entry) => entry.kind === 'tool');\n const diagnostics = entries\n .filter((entry) => enabled && entry.reason && entry.reason !== 'inactive')\n .map((entry) => ({ source: entry.source, code: `HELP_${entry.reason!.replaceAll('-', '_').toUpperCase()}` }));\n const ready = snapshot.ready;\n return {\n activation: !enabled ? 'inactive' : !ready ? 'activating' : diagnostics.length ? 'degraded' : 'active',\n ready,\n revision: snapshot.revision,\n counts: {\n skills: ready ? skills.filter((entry) => entry.active && entry.discoverable).length : null,\n tools: tools.filter((entry) => entry.active).length,\n },\n skills: skills.slice(0, HELP_STATUS_LIMIT).map(({ name, source, active, discoverable, reason }) => ({\n name,\n source,\n active: active && discoverable,\n ...(reason ? { reason } : {}),\n })),\n tools: tools\n .slice(0, HELP_STATUS_LIMIT)\n .map(({ name, source, active, reason }) => ({ name, source, active, ...(reason ? { reason } : {}) })),\n diagnostics: diagnostics.slice(0, HELP_STATUS_LIMIT),\n truncated:\n skills.length > HELP_STATUS_LIMIT || tools.length > HELP_STATUS_LIMIT || diagnostics.length > HELP_STATUS_LIMIT,\n };\n}\n\nexport function helpStatusDetail(report: HelpStatusReport): string {\n return `${report.counts.skills ?? 'pending'} Help skills, ${report.counts.tools} diagnostic tools${report.diagnostics.length ? ' (diagnostics available)' : ''}`;\n}\n\nexport function createHelpStatusTool(\n inspect: () => HelpStatusReport | Promise<HelpStatusReport>,\n authorize: (signal?: AbortSignal) => AbortSignal,\n) {\n return defineTool({\n name: HELP_STATUS_TOOL_NAME,\n description: HELP_STATUS_TOOL_DESCRIPTION,\n parameters: helpStatusParameters,\n when: HELP_WHEN,\n promptGuidelines: [HELP_GUIDANCE],\n async execute(_input, execution) {\n const signal = authorize(execution.signal);\n const report = await inspect();\n signal.throwIfAborted();\n authorize(execution.signal);\n return { content: [{ type: 'text', text: JSON.stringify(report, null, 2) }], details: report };\n },\n });\n}\n","import type { PoHeadlessCommand, PoHeadlessHostService, PoHeadlessResource } from '@agimon-ai/po-core/headless';\nimport { PO_HELP_WHEN as HELP_WHEN } from '@agimon-ai/po-core/help';\nimport { type PoServerSessionPlugin, packageResourcePath, readPackageResource } from '@agimon-ai/po-core/serverFacet';\nimport { defineMinorMode, serverMinorModes, type MinorModeOwner, type MinorModeState } from '@agimon-ai/po-minor-mode';\n\nimport {\n HELP_COMMAND_DESCRIPTION,\n HELP_COMMAND_NAME,\n HELP_GUIDANCE,\n HELP_MODE_ID,\n HELP_PACKAGE_SOURCE,\n HELP_CHATGPT_SKILL,\n HELP_NATIVE_SKILL,\n HELP_SKILL,\n} from '../../constants/help';\nimport { createHelpStatusTool, helpStatusDetail, serverHelpStatus } from '../helpStatus';\nexport function createHelpServerSession(host: PoHeadlessHostService): PoServerSessionPlugin {\n let modeOwner: MinorModeOwner | undefined;\n let pending: boolean | undefined;\n let failure: string | undefined;\n let generation = 0;\n let disposed = false;\n const active = () => (host.context.selection.state?.['minor-mode'] ?? []).includes(HELP_MODE_ID);\n const inspect = () => serverHelpStatus(host.inspectCapabilities(), active());\n const modeState = (): MinorModeState => {\n const report = inspect();\n return {\n activation: pending === true ? 'activating' : active() ? 'active' : 'inactive',\n condition:\n pending !== undefined || !report.ready\n ? 'queued'\n : failure\n ? 'failed'\n : report.activation === 'degraded'\n ? 'degraded'\n : 'ready',\n ...(pending !== undefined\n ? { detail: 'applying Help capabilities' }\n : failure\n ? { detail: failure }\n : active()\n ? { detail: helpStatusDetail(report) }\n : {}),\n actions: [\n {\n id: 'activate',\n enabled: !active() && pending === undefined,\n ...(!active() && pending === undefined ? {} : { disabledReason: 'Help is active or changing.' }),\n },\n {\n id: 'deactivate',\n enabled: active() || pending === true,\n ...(active() || pending === true ? {} : { disabledReason: 'Help mode is not active.' }),\n },\n ],\n };\n };\n const resources: PoHeadlessResource[] = [\n { when: HELP_WHEN, name: 'po-help', kind: 'context', read: () => HELP_GUIDANCE },\n {\n when: HELP_WHEN,\n ...HELP_SKILL,\n kind: 'skill',\n path: packageResourcePath(import.meta.url, 'src/prompts/po-use-help/SKILL.md'),\n read: async () => {\n const text = await readPackageResource(import.meta.url, 'src/prompts/po-use-help/SKILL.md');\n if (!text.trim()) throw new Error('The installed Help skill is missing or unreadable.');\n return text;\n },\n },\n {\n when: HELP_WHEN,\n ...HELP_CHATGPT_SKILL,\n kind: 'skill',\n path: packageResourcePath(import.meta.url, 'src/prompts/po-use-chatgpt-instructions/SKILL.md'),\n read: async () => {\n const text = await readPackageResource(import.meta.url, 'src/prompts/po-use-chatgpt-instructions/SKILL.md');\n if (!text.trim()) throw new Error('The installed ChatGPT instruction skill is missing or unreadable.');\n return text;\n },\n },\n {\n when: HELP_WHEN,\n ...HELP_NATIVE_SKILL,\n kind: 'skill',\n path: packageResourcePath(import.meta.url, 'src/prompts/po-develop-native-extension/SKILL.md'),\n read: async () => {\n const text = await readPackageResource(import.meta.url, 'src/prompts/po-develop-native-extension/SKILL.md');\n if (!text.trim()) throw new Error('The installed native extension skill is missing or unreadable.');\n return text;\n },\n },\n ];\n const selectMode = async (enabled: boolean, signal?: AbortSignal): Promise<void> => {\n if (disposed) throw new Error('Help runtime is disposed.');\n signal?.throwIfAborted();\n const operation = ++generation;\n pending = enabled;\n failure = undefined;\n modeOwner?.publish();\n try {\n if (enabled) await resources[1]!.read(host.context);\n signal?.throwIfAborted();\n if (operation !== generation || disposed) throw new Error('Help activation was cancelled.');\n const modes = (host.context.selection.state?.['minor-mode'] ?? []).filter((mode) => mode !== HELP_MODE_ID);\n await host.changeSelection({\n axis: 'state',\n key: 'minor-mode',\n values: enabled ? [...modes, HELP_MODE_ID] : modes,\n });\n } catch (error) {\n if (operation === generation) failure = (error instanceof Error ? error.message : String(error)).slice(0, 160);\n throw error;\n } finally {\n if (operation === generation) {\n pending = undefined;\n modeOwner?.publish();\n }\n }\n };\n const command: PoHeadlessCommand = {\n name: HELP_COMMAND_NAME,\n description: HELP_COMMAND_DESCRIPTION,\n async execute(_args, execution) {\n await selectMode(!(pending ?? active()));\n await execution.client.notify({\n title: 'Po Help',\n body: active() ? 'Help mode activated.' : 'Help mode deactivated.',\n level: 'info',\n });\n },\n };\n modeOwner = defineMinorMode({\n descriptor: {\n source: HELP_PACKAGE_SOURCE,\n id: HELP_MODE_ID,\n label: 'Help',\n description: 'Package guidance and read-only diagnostics for agent setup and debugging.',\n order: 50,\n actions: [\n {\n id: 'activate',\n label: 'Activate',\n description: 'Expose Help guidance and diagnostic tools.',\n contexts: ['headless'],\n parameters: [],\n },\n {\n id: 'deactivate',\n label: 'Deactivate',\n description: 'Withdraw Help-only guidance and diagnostic tools.',\n contexts: ['headless'],\n parameters: [],\n },\n ],\n },\n state: modeState,\n async handleAction(_runtime, actionId, _argumentsValue, { signal }) {\n if (actionId !== 'activate' && actionId !== 'deactivate')\n throw new Error(`Unknown Help mode action: ${actionId}`);\n await selectMode(actionId === 'activate', signal);\n return { message: active() ? 'Help mode activated.' : 'Help mode deactivated.' };\n },\n }).createOwner(undefined);\n return {\n services: [serverMinorModes([modeOwner])],\n resources,\n commands: [command],\n tools: [\n createHelpStatusTool(inspect, (signal) => {\n signal?.throwIfAborted();\n host.assertActive(HELP_PACKAGE_SOURCE);\n if (disposed || !active()) throw new Error('Help mode is not active.');\n return signal ?? new AbortController().signal;\n }),\n ],\n onDispose() {\n disposed = true;\n generation += 1;\n },\n };\n}\n","import type { PoServerPluginDefinition, PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\n\nimport { createHelpServerSession } from '../../../../../services/helpServerSession';\n\nexport default (({ agent }): Partial<PoServerSessionPlugin> =>\n agent ? createHelpServerSession(agent) : {}) satisfies NonNullable<PoServerPluginDefinition['session']>;\n","import { defineRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverFacet';\n\nimport runtime from './_lib/runtime.server';\n\nexport default defineRoot((context: PoServerPluginContext) => {\n const value = runtime(context);\n return {\n value,\n services: value.services,\n activities: value.activities,\n onStart: value.onStart,\n onStop: value.onStop,\n onDispose: value.onDispose,\n };\n});\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.commands?.[0],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[3],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[0],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[2],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[1],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverFacet';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.tools?.[0],\n { cardinality: 'optional' },\n);\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 commandPoHelp from '../src/extensions/workspaces/sessions/(backend)/command/po-help.server';\nimport resourcePoDevelopNativeExtension from '../src/extensions/workspaces/sessions/(backend)/resource/po-develop-native-extension.server';\nimport resourcePoHelp from '../src/extensions/workspaces/sessions/(backend)/resource/po-help.server';\nimport resourcePoUseChatgptInstructions from '../src/extensions/workspaces/sessions/(backend)/resource/po-use-chatgpt-instructions.server';\nimport resourcePoUseHelp from '../src/extensions/workspaces/sessions/(backend)/resource/po-use-help.server';\nimport toolHelpStatus from '../src/extensions/workspaces/sessions/(backend)/tool/help_status.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-help',\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: 'po-help' }, at(commandPoHelp, contextSession))]); },\n get resources(): PoServerSessionPlugin['resources'] { return defined([at(resourcePoDevelopNativeExtension, contextSession), at(resourcePoHelp, contextSession), at(resourcePoUseChatgptInstructions, contextSession), at(resourcePoUseHelp, contextSession)]); },\n get tools(): PoServerSessionPlugin['tools'] { return defined([via({ name: 'help_status' }, at(toolHelpStatus, contextSession))]); },\n services: [...(scopeSession.services ?? [])],\n get activities(): PoServerSessionPlugin['activities'] { return [...(scopeSession.activities ?? [])]; },\n };\n },\n});\n\nexport default facet;\n"],"mappings":";;;;;;AAAA,MAAa,oBAAoB;A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":3,"file":"server.mjs","names":["HELP_WHEN","HELP_WHEN","runtime","rootSession","commandPoHelp","resourcePoDevelopNativeExtension","resourcePoHelp","resourcePoUseChatgptInstructions","resourcePoUseHelp","toolHelpStatus"],"sources":["../../src/constants/help.ts","../../src/schemas/diagnostics.ts","../../src/services/helpStatus/index.ts","../../src/services/helpServerSession/index.ts","../../src/extensions/workspaces/sessions/(backend)/_lib/runtime.server.ts","../../src/extensions/workspaces/sessions/(backend)/root.server.ts","../../src/extensions/workspaces/sessions/(backend)/command/po-help.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-develop-native-extension.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-help.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-use-chatgpt-instructions.server.ts","../../src/extensions/workspaces/sessions/(backend)/resource/po-use-help.server.ts","../../src/extensions/workspaces/sessions/(backend)/tool/help_status.server.ts","../../generated/server.ts"],"sourcesContent":["export const HELP_COMMAND_NAME = 'po-help';\nexport const HELP_COMMAND_DESCRIPTION = 'Toggle Help guidance and read-only support diagnostics';\nexport const HELP_MODE_ID = 'help';\nexport const HELP_PACKAGE_SOURCE = '@agimon-ai/po-help';\nexport const HELP_SKILL = {\n name: 'po-use-help',\n description:\n 'Set up and debug Po agents using installed package guidance and scoped, read-only diagnostics. Diagnose missing capabilities before proposing authorized repairs.',\n} as const;\nexport const HELP_GUIDANCE =\n 'Help mode is active. Read po-use-help, inspect the available diagnostics, and use the narrowest package guidance for the task. Diagnose before proposing changes. Help does not grant additional permissions.';\nexport const HELP_STATUS_TOOL_NAME = 'help_status';\nexport const HELP_STATUS_TOOL_DESCRIPTION =\n 'Inspect active Help skills, diagnostic tools, contributor ownership, and unavailable contributions in this session. Read-only; does not change selection or permissions.';\nexport const HELP_STATUS_LIMIT = 128;\n\nexport const HELP_CHATGPT_SKILL = {\n name: 'po-use-chatgpt-instructions',\n description:\n \"Print a paste-ready ChatGPT project instruction (at most 8,000 characters) that routes code-mode work through this session's MCP tools and condenses every AGENTS.md rule. Writes no files.\",\n} as const;\n\nexport const HELP_NATIVE_SKILL = {\n name: 'po-develop-native-extension',\n description:\n \"Add or change a Po package's phone UI (.native files, native templates) so it mirrors the cockpit, passes the native build, and is approved and verified before it ships.\",\n} as const;\n","import { Type } from 'typebox';\n\nexport const helpStatusParameters = Type.Object({}, { additionalProperties: false });\n","import type { PoHeadlessCapabilitySnapshot } from '@agimon-ai/po-core/headless';\nimport { PO_HELP_WHEN as HELP_WHEN } from '@agimon-ai/po-core/help';\nimport { defineTool } from '@agimon-ai/po-core/serverPlugin';\n\nimport {\n HELP_GUIDANCE,\n HELP_MODE_ID,\n HELP_STATUS_LIMIT,\n HELP_STATUS_TOOL_DESCRIPTION,\n HELP_STATUS_TOOL_NAME,\n} from '../../constants/help';\nimport { helpStatusParameters } from '../../schemas/diagnostics';\nimport type { HelpStatusReport } from './type';\n\nexport function serverHelpStatus(snapshot: PoHeadlessCapabilitySnapshot, enabled: boolean): HelpStatusReport {\n const entries = snapshot.capabilities.filter((entry) => entry.when?.state?.['minor-mode'] === HELP_MODE_ID);\n const skills = entries.filter((entry) => entry.kind === 'skill');\n const tools = entries.filter((entry) => entry.kind === 'tool');\n const diagnostics = entries\n .filter((entry) => enabled && entry.reason && entry.reason !== 'inactive')\n .map((entry) => ({ source: entry.source, code: `HELP_${entry.reason!.replaceAll('-', '_').toUpperCase()}` }));\n const ready = snapshot.ready;\n return {\n activation: !enabled ? 'inactive' : !ready ? 'activating' : diagnostics.length ? 'degraded' : 'active',\n ready,\n revision: snapshot.revision,\n counts: {\n skills: ready ? skills.filter((entry) => entry.active && entry.discoverable).length : null,\n tools: tools.filter((entry) => entry.active).length,\n },\n skills: skills.slice(0, HELP_STATUS_LIMIT).map(({ name, source, active, discoverable, reason }) => ({\n name,\n source,\n active: active && discoverable,\n ...(reason ? { reason } : {}),\n })),\n tools: tools\n .slice(0, HELP_STATUS_LIMIT)\n .map(({ name, source, active, reason }) => ({ name, source, active, ...(reason ? { reason } : {}) })),\n diagnostics: diagnostics.slice(0, HELP_STATUS_LIMIT),\n truncated:\n skills.length > HELP_STATUS_LIMIT || tools.length > HELP_STATUS_LIMIT || diagnostics.length > HELP_STATUS_LIMIT,\n };\n}\n\nexport function helpStatusDetail(report: HelpStatusReport): string {\n return `${report.counts.skills ?? 'pending'} Help skills, ${report.counts.tools} diagnostic tools${report.diagnostics.length ? ' (diagnostics available)' : ''}`;\n}\n\nexport function createHelpStatusTool(\n inspect: () => HelpStatusReport | Promise<HelpStatusReport>,\n authorize: (signal?: AbortSignal) => AbortSignal,\n) {\n return defineTool({\n name: HELP_STATUS_TOOL_NAME,\n description: HELP_STATUS_TOOL_DESCRIPTION,\n parameters: helpStatusParameters,\n when: HELP_WHEN,\n promptGuidelines: [HELP_GUIDANCE],\n async execute(_input, execution) {\n const signal = authorize(execution.signal);\n const report = await inspect();\n signal.throwIfAborted();\n authorize(execution.signal);\n return { content: [{ type: 'text', text: JSON.stringify(report, null, 2) }], details: report };\n },\n });\n}\n","import type { PoHeadlessCommand, PoHeadlessHostService, PoHeadlessResource } from '@agimon-ai/po-core/headless';\nimport { PO_HELP_WHEN as HELP_WHEN } from '@agimon-ai/po-core/help';\nimport { type PoServerSessionPlugin, packageResourcePath, readPackageResource } from '@agimon-ai/po-core/serverPlugin';\nimport { defineMinorMode, serverMinorModes, type MinorModeOwner, type MinorModeState } from '@agimon-ai/po-minor-mode';\n\nimport {\n HELP_COMMAND_DESCRIPTION,\n HELP_COMMAND_NAME,\n HELP_GUIDANCE,\n HELP_MODE_ID,\n HELP_PACKAGE_SOURCE,\n HELP_CHATGPT_SKILL,\n HELP_NATIVE_SKILL,\n HELP_SKILL,\n} from '../../constants/help';\nimport { createHelpStatusTool, helpStatusDetail, serverHelpStatus } from '../helpStatus';\nexport function createHelpServerSession(host: PoHeadlessHostService): PoServerSessionPlugin {\n let modeOwner: MinorModeOwner | undefined;\n let pending: boolean | undefined;\n let failure: string | undefined;\n let generation = 0;\n let disposed = false;\n const active = () => (host.context.selection.state?.['minor-mode'] ?? []).includes(HELP_MODE_ID);\n const inspect = () => serverHelpStatus(host.inspectCapabilities(), active());\n const modeState = (): MinorModeState => {\n const report = inspect();\n return {\n activation: pending === true ? 'activating' : active() ? 'active' : 'inactive',\n condition:\n pending !== undefined || !report.ready\n ? 'queued'\n : failure\n ? 'failed'\n : report.activation === 'degraded'\n ? 'degraded'\n : 'ready',\n ...(pending !== undefined\n ? { detail: 'applying Help capabilities' }\n : failure\n ? { detail: failure }\n : active()\n ? { detail: helpStatusDetail(report) }\n : {}),\n actions: [\n {\n id: 'activate',\n enabled: !active() && pending === undefined,\n ...(!active() && pending === undefined ? {} : { disabledReason: 'Help is active or changing.' }),\n },\n {\n id: 'deactivate',\n enabled: active() || pending === true,\n ...(active() || pending === true ? {} : { disabledReason: 'Help mode is not active.' }),\n },\n ],\n };\n };\n const resources: PoHeadlessResource[] = [\n { when: HELP_WHEN, name: 'po-help', kind: 'context', read: () => HELP_GUIDANCE },\n {\n when: HELP_WHEN,\n ...HELP_SKILL,\n kind: 'skill',\n path: packageResourcePath(import.meta.url, 'src/prompts/po-use-help/SKILL.md'),\n read: async () => {\n const text = await readPackageResource(import.meta.url, 'src/prompts/po-use-help/SKILL.md');\n if (!text.trim()) throw new Error('The installed Help skill is missing or unreadable.');\n return text;\n },\n },\n {\n when: HELP_WHEN,\n ...HELP_CHATGPT_SKILL,\n kind: 'skill',\n path: packageResourcePath(import.meta.url, 'src/prompts/po-use-chatgpt-instructions/SKILL.md'),\n read: async () => {\n const text = await readPackageResource(import.meta.url, 'src/prompts/po-use-chatgpt-instructions/SKILL.md');\n if (!text.trim()) throw new Error('The installed ChatGPT instruction skill is missing or unreadable.');\n return text;\n },\n },\n {\n when: HELP_WHEN,\n ...HELP_NATIVE_SKILL,\n kind: 'skill',\n path: packageResourcePath(import.meta.url, 'src/prompts/po-develop-native-extension/SKILL.md'),\n read: async () => {\n const text = await readPackageResource(import.meta.url, 'src/prompts/po-develop-native-extension/SKILL.md');\n if (!text.trim()) throw new Error('The installed native extension skill is missing or unreadable.');\n return text;\n },\n },\n ];\n const selectMode = async (enabled: boolean, signal?: AbortSignal): Promise<void> => {\n if (disposed) throw new Error('Help runtime is disposed.');\n signal?.throwIfAborted();\n const operation = ++generation;\n pending = enabled;\n failure = undefined;\n modeOwner?.publish();\n try {\n if (enabled) await resources[1]!.read(host.context);\n signal?.throwIfAborted();\n if (operation !== generation || disposed) throw new Error('Help activation was cancelled.');\n const modes = (host.context.selection.state?.['minor-mode'] ?? []).filter((mode) => mode !== HELP_MODE_ID);\n await host.changeSelection({\n axis: 'state',\n key: 'minor-mode',\n values: enabled ? [...modes, HELP_MODE_ID] : modes,\n });\n } catch (error) {\n if (operation === generation) failure = (error instanceof Error ? error.message : String(error)).slice(0, 160);\n throw error;\n } finally {\n if (operation === generation) {\n pending = undefined;\n modeOwner?.publish();\n }\n }\n };\n const command: PoHeadlessCommand = {\n name: HELP_COMMAND_NAME,\n description: HELP_COMMAND_DESCRIPTION,\n async execute(_args, execution) {\n await selectMode(!(pending ?? active()));\n await execution.client.notify({\n title: 'Po Help',\n body: active() ? 'Help mode activated.' : 'Help mode deactivated.',\n level: 'info',\n });\n },\n };\n modeOwner = defineMinorMode({\n descriptor: {\n source: HELP_PACKAGE_SOURCE,\n id: HELP_MODE_ID,\n label: 'Help',\n description: 'Package guidance and read-only diagnostics for agent setup and debugging.',\n order: 50,\n actions: [\n {\n id: 'activate',\n label: 'Activate',\n description: 'Expose Help guidance and diagnostic tools.',\n contexts: ['headless'],\n parameters: [],\n },\n {\n id: 'deactivate',\n label: 'Deactivate',\n description: 'Withdraw Help-only guidance and diagnostic tools.',\n contexts: ['headless'],\n parameters: [],\n },\n ],\n },\n state: modeState,\n async handleAction(_runtime, actionId, _argumentsValue, { signal }) {\n if (actionId !== 'activate' && actionId !== 'deactivate')\n throw new Error(`Unknown Help mode action: ${actionId}`);\n await selectMode(actionId === 'activate', signal);\n return { message: active() ? 'Help mode activated.' : 'Help mode deactivated.' };\n },\n }).createOwner(undefined);\n return {\n services: [serverMinorModes([modeOwner])],\n resources,\n commands: [command],\n tools: [\n createHelpStatusTool(inspect, (signal) => {\n signal?.throwIfAborted();\n host.assertActive(HELP_PACKAGE_SOURCE);\n if (disposed || !active()) throw new Error('Help mode is not active.');\n return signal ?? new AbortController().signal;\n }),\n ],\n onDispose() {\n disposed = true;\n generation += 1;\n },\n };\n}\n","import type { PoServerPluginDefinition, PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\n\nimport { createHelpServerSession } from '../../../../../services/helpServerSession';\n\nexport default (({ agent }): Partial<PoServerSessionPlugin> =>\n agent ? createHelpServerSession(agent) : {}) satisfies NonNullable<PoServerPluginDefinition['session']>;\n","import { defineRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext } from '@agimon-ai/po-core/serverPlugin';\n\nimport runtime from './_lib/runtime.server';\n\nexport default defineRoot((context: PoServerPluginContext) => {\n const value = runtime(context);\n return {\n value,\n services: value.services,\n activities: value.activities,\n onStart: value.onStart,\n onStop: value.onStop,\n onDispose: value.onDispose,\n };\n});\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.commands?.[0],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[3],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[0],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[2],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.resources?.[1],\n { cardinality: 'optional' },\n);\n","import { defineRoutedContribution, type WithRoot } from '@agimon-ai/po-core/extensionFile';\nimport type { PoServerPluginContext, PoServerSessionPlugin } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineRoutedContribution(\n (context: WithRoot<PoServerPluginContext, Partial<PoServerSessionPlugin>>) => context.root.tools?.[0],\n { cardinality: 'optional' },\n);\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 commandPoHelp from '../src/extensions/workspaces/sessions/(backend)/command/po-help.server';\nimport resourcePoDevelopNativeExtension from '../src/extensions/workspaces/sessions/(backend)/resource/po-develop-native-extension.server';\nimport resourcePoHelp from '../src/extensions/workspaces/sessions/(backend)/resource/po-help.server';\nimport resourcePoUseChatgptInstructions from '../src/extensions/workspaces/sessions/(backend)/resource/po-use-chatgpt-instructions.server';\nimport resourcePoUseHelp from '../src/extensions/workspaces/sessions/(backend)/resource/po-use-help.server';\nimport toolHelpStatus from '../src/extensions/workspaces/sessions/(backend)/tool/help_status.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-help',\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: 'po-help' }, at(commandPoHelp, contextSession))]); },\n get resources(): PoServerSessionPlugin['resources'] { return defined([at(resourcePoDevelopNativeExtension, contextSession), at(resourcePoHelp, contextSession), at(resourcePoUseChatgptInstructions, contextSession), at(resourcePoUseHelp, contextSession)]); },\n get tools(): PoServerSessionPlugin['tools'] { return defined([via({ name: 'help_status' }, at(toolHelpStatus, contextSession))]); },\n services: [...(scopeSession.services ?? [])],\n get activities(): PoServerSessionPlugin['activities'] { return [...(scopeSession.activities ?? [])]; },\n };\n },\n});\n\nexport default serverPlugin;\n"],"mappings":";;;;;;AAAA,MAAa,oBAAoB;AACjC,MAAa,2BAA2B;AACxC,MAAa,eAAe;AAC5B,MAAa,sBAAsB;AACnC,MAAa,aAAa;CACxB,MAAM;CACN,aACE;AACJ;AACA,MAAa,gBACX;AACF,MAAa,wBAAwB;AACrC,MAAa,+BACX;AAGF,MAAa,qBAAqB;CAChC,MAAM;CACN,aACE;AACJ;AAEA,MAAa,oBAAoB;CAC/B,MAAM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ance and help skills for Po and Pi extensions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-documentation",
|
|
@@ -58,15 +58,15 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@agimon-ai/po-core": "0.0.0-alpha.
|
|
62
|
-
"@agimon-ai/po-minor-mode": "0.0.0-alpha.
|
|
63
|
-
"@agimon-ai/po-web-components": "0.0.0-alpha.
|
|
64
|
-
"@deepseek-ai/cordis": "4.0.
|
|
61
|
+
"@agimon-ai/po-core": "0.0.0-alpha.14",
|
|
62
|
+
"@agimon-ai/po-minor-mode": "0.0.0-alpha.14",
|
|
63
|
+
"@agimon-ai/po-web-components": "0.0.0-alpha.14",
|
|
64
|
+
"@deepseek-ai/cordis": "4.0.5",
|
|
65
65
|
"typebox": "1.3.37"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@agimon-ai/po-build": "0.0.0-alpha.
|
|
69
|
-
"@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.
|
|
68
|
+
"@agimon-ai/po-build": "0.0.0-alpha.14",
|
|
69
|
+
"@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.14",
|
|
70
70
|
"@earendil-works/pi-coding-agent": "1.3.0",
|
|
71
71
|
"@types/node": "26.6.5",
|
|
72
72
|
"@types/react": "19.3.0",
|