@agimon-ai/po 0.0.0-alpha.196 → 0.0.0-alpha.198

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/dist/bin/cli.cjs +1 -1
  2. package/dist/bin/cli.mjs +1 -1
  3. package/dist/bin/poRunner.cjs +1 -1
  4. package/dist/bin/poRunner.mjs +1 -1
  5. package/dist/bin/serve.cjs +2 -0
  6. package/dist/bin/serve.cjs.map +1 -1
  7. package/dist/bin/serve.mjs +2 -0
  8. package/dist/bin/serve.mjs.map +1 -1
  9. package/dist/builders/cli/extensionAssembler/index.cjs +1 -1
  10. package/dist/builders/cli/extensionAssembler/index.mjs +1 -1
  11. package/dist/catalog/index.json +129 -124
  12. package/dist/extensions/server.cjs +25 -19
  13. package/dist/extensions/server.cjs.map +1 -1
  14. package/dist/extensions/server.d.mts.map +1 -1
  15. package/dist/extensions/server.mjs +25 -19
  16. package/dist/extensions/server.mjs.map +1 -1
  17. package/dist/package.cjs +1 -1
  18. package/dist/package.mjs +1 -1
  19. package/dist/src/bin/agentDirectory.cjs +1 -1
  20. package/dist/src/bin/agentDirectory.mjs +1 -1
  21. package/dist/src/builders/apiContractExport/index.cjs +1 -1
  22. package/dist/src/builders/apiContractExport/index.mjs +1 -1
  23. package/dist/src/builders/cli/entryResolution.cjs +1 -1
  24. package/dist/src/builders/cli/entryResolution.mjs +1 -1
  25. package/dist/src/builders/npm/index.cjs +1 -1
  26. package/dist/src/builders/npm/index.mjs +1 -1
  27. package/dist/src/builders/server/capabilities.cjs +1 -1
  28. package/dist/src/builders/server/capabilities.mjs +1 -1
  29. package/dist/src/builders/server/computerUseBinding.cjs +4 -2
  30. package/dist/src/builders/server/computerUseBinding.cjs.map +1 -1
  31. package/dist/src/builders/server/computerUseBinding.mjs +4 -2
  32. package/dist/src/builders/server/computerUseBinding.mjs.map +1 -1
  33. package/dist/src/builders/server/nativePush.cjs +6 -2
  34. package/dist/src/builders/server/nativePush.cjs.map +1 -1
  35. package/dist/src/builders/server/nativePush.mjs +6 -2
  36. package/dist/src/builders/server/nativePush.mjs.map +1 -1
  37. package/dist/src/builders/server/orgPluginLibraryBinding.cjs +72 -0
  38. package/dist/src/builders/server/orgPluginLibraryBinding.cjs.map +1 -0
  39. package/dist/src/builders/server/orgPluginLibraryBinding.mjs +72 -0
  40. package/dist/src/builders/server/orgPluginLibraryBinding.mjs.map +1 -0
  41. package/dist/src/builders/server/packageUrl.cjs +1 -1
  42. package/dist/src/builders/server/packageUrl.mjs +1 -1
  43. package/dist/src/builders/server/runtime.cjs +60 -32
  44. package/dist/src/builders/server/runtime.cjs.map +1 -1
  45. package/dist/src/builders/server/runtime.mjs +54 -26
  46. package/dist/src/builders/server/runtime.mjs.map +1 -1
  47. package/dist/src/builders/web/webPluginGenerate.cjs +1 -1
  48. package/dist/src/builders/web/webPluginGenerate.mjs +1 -1
  49. package/dist/src/cli/cliApp.cjs +5 -5
  50. package/dist/src/cli/cliApp.cjs.map +1 -1
  51. package/dist/src/cli/cliApp.d.mts.map +1 -1
  52. package/dist/src/cli/cliApp.mjs +5 -5
  53. package/dist/src/cli/cliApp.mjs.map +1 -1
  54. package/dist/src/cli/commands/api-export/index.cjs +8 -7
  55. package/dist/src/cli/commands/api-export/index.cjs.map +1 -1
  56. package/dist/src/cli/commands/api-export/index.mjs +8 -7
  57. package/dist/src/cli/commands/api-export/index.mjs.map +1 -1
  58. package/dist/src/cli/commands/doctor/index.cjs +12 -6
  59. package/dist/src/cli/commands/doctor/index.cjs.map +1 -1
  60. package/dist/src/cli/commands/doctor/index.d.mts.map +1 -1
  61. package/dist/src/cli/commands/doctor/index.mjs +12 -6
  62. package/dist/src/cli/commands/doctor/index.mjs.map +1 -1
  63. package/dist/src/cli/commands/emit-mcp/index.cjs +3 -2
  64. package/dist/src/cli/commands/emit-mcp/index.cjs.map +1 -1
  65. package/dist/src/cli/commands/emit-mcp/index.d.mts.map +1 -1
  66. package/dist/src/cli/commands/emit-mcp/index.mjs +3 -2
  67. package/dist/src/cli/commands/emit-mcp/index.mjs.map +1 -1
  68. package/dist/src/cli/commands/explain/index.cjs +41 -27
  69. package/dist/src/cli/commands/explain/index.cjs.map +1 -1
  70. package/dist/src/cli/commands/explain/index.d.mts.map +1 -1
  71. package/dist/src/cli/commands/explain/index.mjs +41 -27
  72. package/dist/src/cli/commands/explain/index.mjs.map +1 -1
  73. package/dist/src/cli/commands/init/index.cjs +15 -10
  74. package/dist/src/cli/commands/init/index.cjs.map +1 -1
  75. package/dist/src/cli/commands/init/index.d.mts.map +1 -1
  76. package/dist/src/cli/commands/init/index.mjs +15 -10
  77. package/dist/src/cli/commands/init/index.mjs.map +1 -1
  78. package/dist/src/cli/commands/init/presenter.cjs +29 -21
  79. package/dist/src/cli/commands/init/presenter.cjs.map +1 -1
  80. package/dist/src/cli/commands/init/presenter.mjs +29 -21
  81. package/dist/src/cli/commands/init/presenter.mjs.map +1 -1
  82. package/dist/src/cli/commands/sync/index.cjs +26 -14
  83. package/dist/src/cli/commands/sync/index.cjs.map +1 -1
  84. package/dist/src/cli/commands/sync/index.d.mts.map +1 -1
  85. package/dist/src/cli/commands/sync/index.mjs +26 -14
  86. package/dist/src/cli/commands/sync/index.mjs.map +1 -1
  87. package/dist/src/cli/commands/sync/presenter.cjs +10 -1
  88. package/dist/src/cli/commands/sync/presenter.cjs.map +1 -1
  89. package/dist/src/cli/commands/sync/presenter.d.mts +0 -9
  90. package/dist/src/cli/commands/sync/presenter.d.mts.map +1 -1
  91. package/dist/src/cli/commands/sync/presenter.mjs +10 -1
  92. package/dist/src/cli/commands/sync/presenter.mjs.map +1 -1
  93. package/dist/src/cli/commands/web/index.cjs +5 -4
  94. package/dist/src/cli/commands/web/index.cjs.map +1 -1
  95. package/dist/src/cli/commands/web/index.mjs +5 -4
  96. package/dist/src/cli/commands/web/index.mjs.map +1 -1
  97. package/dist/src/cli/locale.cjs +4 -20
  98. package/dist/src/cli/locale.cjs.map +1 -1
  99. package/dist/src/cli/locale.mjs +6 -21
  100. package/dist/src/cli/locale.mjs.map +1 -1
  101. package/dist/src/cli/matrixOptions.cjs +31 -13
  102. package/dist/src/cli/matrixOptions.cjs.map +1 -1
  103. package/dist/src/cli/matrixOptions.d.mts.map +1 -1
  104. package/dist/src/cli/matrixOptions.mjs +31 -13
  105. package/dist/src/cli/matrixOptions.mjs.map +1 -1
  106. package/dist/src/cli/options.cjs +29 -10
  107. package/dist/src/cli/options.cjs.map +1 -1
  108. package/dist/src/cli/options.d.mts.map +1 -1
  109. package/dist/src/cli/options.mjs +29 -10
  110. package/dist/src/cli/options.mjs.map +1 -1
  111. package/dist/src/cli/server/options.cjs +20 -6
  112. package/dist/src/cli/server/options.cjs.map +1 -1
  113. package/dist/src/cli/server/options.mjs +20 -6
  114. package/dist/src/cli/server/options.mjs.map +1 -1
  115. package/dist/src/cli/server/processGuards.cjs +1 -1
  116. package/dist/src/cli/server/processGuards.mjs +1 -1
  117. package/dist/src/composition/layerPackageInstaller/index.cjs +56 -27
  118. package/dist/src/composition/layerPackageInstaller/index.cjs.map +1 -1
  119. package/dist/src/composition/layerPackageInstaller/index.d.mts +3 -0
  120. package/dist/src/composition/layerPackageInstaller/index.d.mts.map +1 -1
  121. package/dist/src/composition/layerPackageInstaller/index.mjs +57 -29
  122. package/dist/src/composition/layerPackageInstaller/index.mjs.map +1 -1
  123. package/dist/src/composition/orgPluginActivation/index.cjs +179 -0
  124. package/dist/src/composition/orgPluginActivation/index.cjs.map +1 -0
  125. package/dist/src/composition/orgPluginActivation/index.mjs +177 -0
  126. package/dist/src/composition/orgPluginActivation/index.mjs.map +1 -0
  127. package/dist/src/composition/orgPluginLibrary/index.cjs +203 -0
  128. package/dist/src/composition/orgPluginLibrary/index.cjs.map +1 -0
  129. package/dist/src/composition/orgPluginLibrary/index.mjs +198 -0
  130. package/dist/src/composition/orgPluginLibrary/index.mjs.map +1 -0
  131. package/dist/src/composition/pluginMarketplace/index.cjs +14 -2
  132. package/dist/src/composition/pluginMarketplace/index.cjs.map +1 -1
  133. package/dist/src/composition/pluginMarketplace/index.mjs +14 -2
  134. package/dist/src/composition/pluginMarketplace/index.mjs.map +1 -1
  135. package/dist/src/composition/syncPrune/index.cjs +1 -1
  136. package/dist/src/composition/syncPrune/index.mjs +1 -1
  137. package/dist/src/composition/syncService/index.cjs +114 -60
  138. package/dist/src/composition/syncService/index.cjs.map +1 -1
  139. package/dist/src/composition/syncService/index.d.mts +4 -1
  140. package/dist/src/composition/syncService/index.d.mts.map +1 -1
  141. package/dist/src/composition/syncService/index.mjs +114 -60
  142. package/dist/src/composition/syncService/index.mjs.map +1 -1
  143. package/dist/src/composition/syncService/localBuilds.cjs +2 -1
  144. package/dist/src/composition/syncService/localBuilds.cjs.map +1 -1
  145. package/dist/src/composition/syncService/localBuilds.mjs +2 -1
  146. package/dist/src/composition/syncService/localBuilds.mjs.map +1 -1
  147. package/package.json +34 -34
  148. package/dist/src/cli/commands/init/constants.cjs +0 -11
  149. package/dist/src/cli/commands/init/constants.cjs.map +0 -1
  150. package/dist/src/cli/commands/init/constants.mjs +0 -11
  151. package/dist/src/cli/commands/init/constants.mjs.map +0 -1
package/dist/bin/cli.cjs CHANGED
@@ -3,9 +3,9 @@ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
3
3
  const require_agentDirectory = require("../src/bin/agentDirectory.cjs");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_runtime.__toESM(node_path, 1);
6
- let node_url = require("node:url");
7
6
  let node_fs_promises = require("node:fs/promises");
8
7
  node_fs_promises = require_runtime.__toESM(node_fs_promises, 1);
8
+ let node_url = require("node:url");
9
9
  //#region src/bin/cli.ts
10
10
  /**
11
11
  * CLI Entry Point for po
package/dist/bin/cli.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { initializeAgentDirectory, testRoot } from "../src/bin/agentDirectory.mjs";
3
3
  import path from "node:path";
4
- import { fileURLToPath, pathToFileURL } from "node:url";
5
4
  import fs from "node:fs/promises";
5
+ import { fileURLToPath, pathToFileURL } from "node:url";
6
6
  //#region src/bin/cli.ts
7
7
  /**
8
8
  * CLI Entry Point for po
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const require_index = require("../src/composition/repository/index.cjs");
4
4
  const require_agentDirectory = require("../src/bin/agentDirectory.cjs");
5
- let node_url = require("node:url");
6
5
  let node_fs_promises = require("node:fs/promises");
6
+ let node_url = require("node:url");
7
7
  let _agimon_ai_po_core_moduleResolution = require("@agimon-ai/po-core/moduleResolution");
8
8
  //#region src/bin/poRunner.ts
9
9
  /**
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { findRepositoryRoot } from "../src/composition/repository/index.mjs";
3
3
  import { initializeAgentDirectory } from "../src/bin/agentDirectory.mjs";
4
- import { fileURLToPath, pathToFileURL } from "node:url";
5
4
  import { realpath } from "node:fs/promises";
5
+ import { fileURLToPath, pathToFileURL } from "node:url";
6
6
  import { consumerPackageEntry } from "@agimon-ai/po-core/moduleResolution";
7
7
  //#region src/bin/poRunner.ts
8
8
  /**
@@ -15,6 +15,8 @@ async function main() {
15
15
  });
16
16
  const { initializeAgentDirectory } = await Promise.resolve().then(() => require("../src/bin/agentDirectory.cjs"));
17
17
  await initializeAgentDirectory();
18
+ const { loadCliLocale } = await Promise.resolve().then(() => require("../src/cli/locale.cjs"));
19
+ await loadCliLocale(process.env);
18
20
  const { runServer } = await Promise.resolve().then(() => require("../src/cli/server/run.cjs"));
19
21
  const stopController = new AbortController();
20
22
  let stopped;
@@ -1 +1 @@
1
- {"version":3,"file":"serve.cjs","names":["superviseServer"],"sources":["../../src/bin/serve.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { installProcessGuards } from '../cli/server/processGuards';\nimport { superviseServer } from '../cli/server/supervise';\n\n// The library finishes bounded cleanup first. A stale handle must not keep this\n// standalone CLI alive forever; an unreferenced deadline still lets output drain.\nfunction finish(code: number): void {\n process.exitCode = code;\n setTimeout(() => process.exit(code), 2_000).unref();\n}\n\nasync function main(): Promise<number> {\n if (process.env.PO_SERVER_SUPERVISED !== '1') {\n return superviseServer({\n entry: process.argv[1]!,\n args: process.argv.slice(2),\n environment: process.env,\n notice: (message) => void process.stderr.write(`[po-server] ${message}\\n`),\n });\n }\n\n // Only the worker initializes configuration and imports the runtime.\n const { initializeAgentDirectory } = await import('./agentDirectory');\n await initializeAgentDirectory();\n const { runServer } = await import('../cli/server/run');\n const stopController = new AbortController();\n let stopped: Promise<unknown> | undefined;\n const server = runServer(process.argv.slice(2), stopController.signal);\n installProcessGuards({\n write: (message) => void process.stderr.write(message),\n stop: (reason) => {\n stopController.abort(reason);\n // The failure itself is reported by the handler below; here it only ends the stop.\n stopped ??= server.catch(() => undefined);\n return stopped;\n },\n exit: (code) => process.exit(code),\n });\n return server;\n}\n\nmain().then(finish, (error: unknown) => {\n process.stderr.write(`[po-server] ${error instanceof Error ? error.message : String(error)}\\n`);\n finish(1);\n});\n"],"mappings":";;;;AAMA,SAAS,OAAO,MAAoB;CAClC,QAAQ,WAAW;CACnB,iBAAiB,QAAQ,KAAK,IAAI,GAAG,GAAK,CAAC,CAAC,MAAM;AACpD;AAEA,eAAe,OAAwB;CACrC,IAAI,QAAQ,IAAI,yBAAyB,KACvC,OAAOA,kBAAAA,gBAAgB;EACrB,OAAO,QAAQ,KAAK;EACpB,MAAM,QAAQ,KAAK,MAAM,CAAC;EAC1B,aAAa,QAAQ;EACrB,SAAS,YAAY,KAAK,QAAQ,OAAO,MAAM,eAAe,QAAQ,GAAG;CAC3E,CAAC;CAIH,MAAM,EAAE,6BAA6B,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,+BAAA,CAAA;CAC3C,MAAM,yBAAyB;CAC/B,MAAM,EAAE,cAAc,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,2BAAA,CAAA;CAC5B,MAAM,iBAAiB,IAAI,gBAAgB;CAC3C,IAAI;CACJ,MAAM,SAAS,UAAU,QAAQ,KAAK,MAAM,CAAC,GAAG,eAAe,MAAM;CACrE,sBAAA,qBAAqB;EACnB,QAAQ,YAAY,KAAK,QAAQ,OAAO,MAAM,OAAO;EACrD,OAAO,WAAW;GAChB,eAAe,MAAM,MAAM;GAE3B,YAAY,OAAO,YAAY,KAAA,CAAS;GACxC,OAAO;EACT;EACA,OAAO,SAAS,QAAQ,KAAK,IAAI;CACnC,CAAC;CACD,OAAO;AACT;AAEA,KAAK,CAAC,CAAC,KAAK,SAAS,UAAmB;CACtC,QAAQ,OAAO,MAAM,eAAe,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAE,GAAG;CAC9F,OAAO,CAAC;AACV,CAAC"}
1
+ {"version":3,"file":"serve.cjs","names":["superviseServer"],"sources":["../../src/bin/serve.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { installProcessGuards } from '../cli/server/processGuards';\nimport { superviseServer } from '../cli/server/supervise';\n\n// The library finishes bounded cleanup first. A stale handle must not keep this\n// standalone CLI alive forever; an unreferenced deadline still lets output drain.\nfunction finish(code: number): void {\n process.exitCode = code;\n setTimeout(() => process.exit(code), 2_000).unref();\n}\n\nasync function main(): Promise<number> {\n if (process.env.PO_SERVER_SUPERVISED !== '1') {\n return superviseServer({\n entry: process.argv[1]!,\n args: process.argv.slice(2),\n environment: process.env,\n notice: (message) => void process.stderr.write(`[po-server] ${message}\\n`),\n });\n }\n\n // Only the worker initializes configuration and imports the runtime.\n const { initializeAgentDirectory } = await import('./agentDirectory');\n await initializeAgentDirectory();\n const { loadCliLocale } = await import('../cli/locale');\n await loadCliLocale(process.env);\n const { runServer } = await import('../cli/server/run');\n const stopController = new AbortController();\n let stopped: Promise<unknown> | undefined;\n const server = runServer(process.argv.slice(2), stopController.signal);\n installProcessGuards({\n write: (message) => void process.stderr.write(message),\n stop: (reason) => {\n stopController.abort(reason);\n // The failure itself is reported by the handler below; here it only ends the stop.\n stopped ??= server.catch(() => undefined);\n return stopped;\n },\n exit: (code) => process.exit(code),\n });\n return server;\n}\n\nmain().then(finish, (error: unknown) => {\n process.stderr.write(`[po-server] ${error instanceof Error ? error.message : String(error)}\\n`);\n finish(1);\n});\n"],"mappings":";;;;AAMA,SAAS,OAAO,MAAoB;CAClC,QAAQ,WAAW;CACnB,iBAAiB,QAAQ,KAAK,IAAI,GAAG,GAAK,CAAC,CAAC,MAAM;AACpD;AAEA,eAAe,OAAwB;CACrC,IAAI,QAAQ,IAAI,yBAAyB,KACvC,OAAOA,kBAAAA,gBAAgB;EACrB,OAAO,QAAQ,KAAK;EACpB,MAAM,QAAQ,KAAK,MAAM,CAAC;EAC1B,aAAa,QAAQ;EACrB,SAAS,YAAY,KAAK,QAAQ,OAAO,MAAM,eAAe,QAAQ,GAAG;CAC3E,CAAC;CAIH,MAAM,EAAE,6BAA6B,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,+BAAA,CAAA;CAC3C,MAAM,yBAAyB;CAC/B,MAAM,EAAE,kBAAkB,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,uBAAA,CAAA;CAChC,MAAM,cAAc,QAAQ,GAAG;CAC/B,MAAM,EAAE,cAAc,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,2BAAA,CAAA;CAC5B,MAAM,iBAAiB,IAAI,gBAAgB;CAC3C,IAAI;CACJ,MAAM,SAAS,UAAU,QAAQ,KAAK,MAAM,CAAC,GAAG,eAAe,MAAM;CACrE,sBAAA,qBAAqB;EACnB,QAAQ,YAAY,KAAK,QAAQ,OAAO,MAAM,OAAO;EACrD,OAAO,WAAW;GAChB,eAAe,MAAM,MAAM;GAE3B,YAAY,OAAO,YAAY,KAAA,CAAS;GACxC,OAAO;EACT;EACA,OAAO,SAAS,QAAQ,KAAK,IAAI;CACnC,CAAC;CACD,OAAO;AACT;AAEA,KAAK,CAAC,CAAC,KAAK,SAAS,UAAmB;CACtC,QAAQ,OAAO,MAAM,eAAe,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAE,GAAG;CAC9F,OAAO,CAAC;AACV,CAAC"}
@@ -15,6 +15,8 @@ async function main() {
15
15
  });
16
16
  const { initializeAgentDirectory } = await import("../src/bin/agentDirectory.mjs");
17
17
  await initializeAgentDirectory();
18
+ const { loadCliLocale } = await import("../src/cli/locale.mjs");
19
+ await loadCliLocale(process.env);
18
20
  const { runServer } = await import("../src/cli/server/run.mjs");
19
21
  const stopController = new AbortController();
20
22
  let stopped;
@@ -1 +1 @@
1
- {"version":3,"file":"serve.mjs","names":[],"sources":["../../src/bin/serve.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { installProcessGuards } from '../cli/server/processGuards';\nimport { superviseServer } from '../cli/server/supervise';\n\n// The library finishes bounded cleanup first. A stale handle must not keep this\n// standalone CLI alive forever; an unreferenced deadline still lets output drain.\nfunction finish(code: number): void {\n process.exitCode = code;\n setTimeout(() => process.exit(code), 2_000).unref();\n}\n\nasync function main(): Promise<number> {\n if (process.env.PO_SERVER_SUPERVISED !== '1') {\n return superviseServer({\n entry: process.argv[1]!,\n args: process.argv.slice(2),\n environment: process.env,\n notice: (message) => void process.stderr.write(`[po-server] ${message}\\n`),\n });\n }\n\n // Only the worker initializes configuration and imports the runtime.\n const { initializeAgentDirectory } = await import('./agentDirectory');\n await initializeAgentDirectory();\n const { runServer } = await import('../cli/server/run');\n const stopController = new AbortController();\n let stopped: Promise<unknown> | undefined;\n const server = runServer(process.argv.slice(2), stopController.signal);\n installProcessGuards({\n write: (message) => void process.stderr.write(message),\n stop: (reason) => {\n stopController.abort(reason);\n // The failure itself is reported by the handler below; here it only ends the stop.\n stopped ??= server.catch(() => undefined);\n return stopped;\n },\n exit: (code) => process.exit(code),\n });\n return server;\n}\n\nmain().then(finish, (error: unknown) => {\n process.stderr.write(`[po-server] ${error instanceof Error ? error.message : String(error)}\\n`);\n finish(1);\n});\n"],"mappings":";;;;AAMA,SAAS,OAAO,MAAoB;CAClC,QAAQ,WAAW;CACnB,iBAAiB,QAAQ,KAAK,IAAI,GAAG,GAAK,CAAC,CAAC,MAAM;AACpD;AAEA,eAAe,OAAwB;CACrC,IAAI,QAAQ,IAAI,yBAAyB,KACvC,OAAO,gBAAgB;EACrB,OAAO,QAAQ,KAAK;EACpB,MAAM,QAAQ,KAAK,MAAM,CAAC;EAC1B,aAAa,QAAQ;EACrB,SAAS,YAAY,KAAK,QAAQ,OAAO,MAAM,eAAe,QAAQ,GAAG;CAC3E,CAAC;CAIH,MAAM,EAAE,6BAA6B,MAAM,OAAO;CAClD,MAAM,yBAAyB;CAC/B,MAAM,EAAE,cAAc,MAAM,OAAO;CACnC,MAAM,iBAAiB,IAAI,gBAAgB;CAC3C,IAAI;CACJ,MAAM,SAAS,UAAU,QAAQ,KAAK,MAAM,CAAC,GAAG,eAAe,MAAM;CACrE,qBAAqB;EACnB,QAAQ,YAAY,KAAK,QAAQ,OAAO,MAAM,OAAO;EACrD,OAAO,WAAW;GAChB,eAAe,MAAM,MAAM;GAE3B,YAAY,OAAO,YAAY,KAAA,CAAS;GACxC,OAAO;EACT;EACA,OAAO,SAAS,QAAQ,KAAK,IAAI;CACnC,CAAC;CACD,OAAO;AACT;AAEA,KAAK,CAAC,CAAC,KAAK,SAAS,UAAmB;CACtC,QAAQ,OAAO,MAAM,eAAe,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAE,GAAG;CAC9F,OAAO,CAAC;AACV,CAAC"}
1
+ {"version":3,"file":"serve.mjs","names":[],"sources":["../../src/bin/serve.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { installProcessGuards } from '../cli/server/processGuards';\nimport { superviseServer } from '../cli/server/supervise';\n\n// The library finishes bounded cleanup first. A stale handle must not keep this\n// standalone CLI alive forever; an unreferenced deadline still lets output drain.\nfunction finish(code: number): void {\n process.exitCode = code;\n setTimeout(() => process.exit(code), 2_000).unref();\n}\n\nasync function main(): Promise<number> {\n if (process.env.PO_SERVER_SUPERVISED !== '1') {\n return superviseServer({\n entry: process.argv[1]!,\n args: process.argv.slice(2),\n environment: process.env,\n notice: (message) => void process.stderr.write(`[po-server] ${message}\\n`),\n });\n }\n\n // Only the worker initializes configuration and imports the runtime.\n const { initializeAgentDirectory } = await import('./agentDirectory');\n await initializeAgentDirectory();\n const { loadCliLocale } = await import('../cli/locale');\n await loadCliLocale(process.env);\n const { runServer } = await import('../cli/server/run');\n const stopController = new AbortController();\n let stopped: Promise<unknown> | undefined;\n const server = runServer(process.argv.slice(2), stopController.signal);\n installProcessGuards({\n write: (message) => void process.stderr.write(message),\n stop: (reason) => {\n stopController.abort(reason);\n // The failure itself is reported by the handler below; here it only ends the stop.\n stopped ??= server.catch(() => undefined);\n return stopped;\n },\n exit: (code) => process.exit(code),\n });\n return server;\n}\n\nmain().then(finish, (error: unknown) => {\n process.stderr.write(`[po-server] ${error instanceof Error ? error.message : String(error)}\\n`);\n finish(1);\n});\n"],"mappings":";;;;AAMA,SAAS,OAAO,MAAoB;CAClC,QAAQ,WAAW;CACnB,iBAAiB,QAAQ,KAAK,IAAI,GAAG,GAAK,CAAC,CAAC,MAAM;AACpD;AAEA,eAAe,OAAwB;CACrC,IAAI,QAAQ,IAAI,yBAAyB,KACvC,OAAO,gBAAgB;EACrB,OAAO,QAAQ,KAAK;EACpB,MAAM,QAAQ,KAAK,MAAM,CAAC;EAC1B,aAAa,QAAQ;EACrB,SAAS,YAAY,KAAK,QAAQ,OAAO,MAAM,eAAe,QAAQ,GAAG;CAC3E,CAAC;CAIH,MAAM,EAAE,6BAA6B,MAAM,OAAO;CAClD,MAAM,yBAAyB;CAC/B,MAAM,EAAE,kBAAkB,MAAM,OAAO;CACvC,MAAM,cAAc,QAAQ,GAAG;CAC/B,MAAM,EAAE,cAAc,MAAM,OAAO;CACnC,MAAM,iBAAiB,IAAI,gBAAgB;CAC3C,IAAI;CACJ,MAAM,SAAS,UAAU,QAAQ,KAAK,MAAM,CAAC,GAAG,eAAe,MAAM;CACrE,qBAAqB;EACnB,QAAQ,YAAY,KAAK,QAAQ,OAAO,MAAM,OAAO;EACrD,OAAO,WAAW;GAChB,eAAe,MAAM,MAAM;GAE3B,YAAY,OAAO,YAAY,KAAA,CAAS;GACxC,OAAO;EACT;EACA,OAAO,SAAS,QAAQ,KAAK,IAAI;CACnC,CAAC;CACD,OAAO;AACT;AAEA,KAAK,CAAC,CAAC,KAAK,SAAS,UAAmB;CACtC,QAAQ,OAAO,MAAM,eAAe,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAE,GAAG;CAC9F,OAAO,CAAC;AACV,CAAC"}
@@ -3,9 +3,9 @@ const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
3
3
  const require_entryResolution = require("../../../src/builders/cli/entryResolution.cjs");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_runtime.__toESM(node_path, 1);
6
- let node_url = require("node:url");
7
6
  let node_fs = require("node:fs");
8
7
  node_fs = require_runtime.__toESM(node_fs, 1);
8
+ let node_url = require("node:url");
9
9
  let _agimon_ai_po_config_presets = require("@agimon-ai/po-config/presets");
10
10
  let _agimon_ai_po_core_moduleResolution = require("@agimon-ai/po-core/moduleResolution");
11
11
  let _agimon_ai_po_core_runtimeIdentity = require("@agimon-ai/po-core/runtimeIdentity");
@@ -1,7 +1,7 @@
1
1
  import { ownEntry } from "../../../src/builders/cli/entryResolution.mjs";
2
2
  import path from "node:path";
3
- import { fileURLToPath } from "node:url";
4
3
  import fs from "node:fs";
4
+ import { fileURLToPath } from "node:url";
5
5
  import { isLocalPackageSpecifier } from "@agimon-ai/po-config/presets";
6
6
  import { checkoutPackageEntry, consumerPackageEntry, localEntries, localEntry, localPackageEntries, localPackageExport, localPackageName, optionalPackageEntry, packageEntry, splitPackageSpecifier } from "@agimon-ai/po-core/moduleResolution";
7
7
  import { canonicalModulePath, sha256 } from "@agimon-ai/po-core/runtimeIdentity";