@agimon-ai/po-core 0.0.0-alpha.15 → 0.0.0-alpha.16

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.
@@ -39,11 +39,16 @@ function compatibleUpm() {
39
39
  */
40
40
  /** Days a newly picked version must have been published, matching `pnpm-workspace.yaml`. */
41
41
  const RUNTIME_MIN_RELEASE_AGE_DAYS = 2;
42
- /** First-party scopes that are never held back, matching `pnpm-workspace.yaml`. */
42
+ /**
43
+ * Packages that are never held back: the first-party scopes and the pins `pnpm-workspace.yaml`
44
+ * excludes by version. upm only honours name or scope entries, so the pins are listed by name.
45
+ */
43
46
  const RUNTIME_MIN_RELEASE_AGE_EXCLUDE = [
44
47
  "@agimon-ai/*",
45
48
  "@agiflowai/*",
46
- "@earendil-works/*"
49
+ "@earendil-works/*",
50
+ "@deepseek-ai/cordis",
51
+ "@deepseek-ai/cosmokit"
47
52
  ];
48
53
  const STORE_DIRECTORY = "store";
49
54
  const ENV_PROXY_FLAG = "--use-env-proxy";
@@ -1 +1 @@
1
- {"version":3,"file":"runtimePackages.cjs","names":["path","fileURLToPath","fs","pathToFileURL","http"],"sources":["../src/services/runtimePackages/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport http from 'node:http';\nimport path from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\n\nimport {\n type Experimental,\n type InstallResult,\n type LogLevel,\n type PruneResult,\n type SpecOptions,\n type StoreAccess,\n} from 'upm';\n\n/** The build ships a pinned, scoped resolver correction inside the published dist. */\nfunction compatibleUpm(): Promise<typeof import('upm')> {\n let directory = path.dirname(fileURLToPath(import.meta.url));\n while (!fs.existsSync(path.join(directory, 'package.json'))) {\n const parent = path.dirname(directory);\n if (parent === directory) throw new Error('Cannot locate the Po core package.');\n directory = parent;\n }\n return import(pathToFileURL(path.join(directory, 'dist/vendor/upm/index.mjs')).href);\n}\n\n/**\n * Runtime packages: what Po installs at run time (layer packages, npm plugins)\n * goes through upm into a directory under Po's home, never through a spawned\n * package manager.\n *\n * Every call passes the store explicitly as `<po home>/store`; upm would\n * otherwise fall back to `UPM_STORE` and then `~/.upm/store`.\n *\n * Proxies: Node's env proxy (`NODE_USE_ENV_PROXY=1` or `--use-env-proxy`) only\n * covers upm's registry worker threads when it is present at process start.\n * When a proxy variable is set without it, this module installs the proxy at\n * run time with `http.setGlobalProxyFromEnv()`, which covers the main thread\n * only, and so asks upm to read the registry on the main thread\n * (`experimental.resolvePool: 0`).\n *\n * Certificates: a private CA is supplied the usual Node ways, with\n * `NODE_EXTRA_CA_CERTS` or `--use-system-ca`. Whether either reaches upm's\n * worker threads is not verified.\n */\n\n/** Days a newly picked version must have been published, matching `pnpm-workspace.yaml`. */\nexport const RUNTIME_MIN_RELEASE_AGE_DAYS = 2;\n/** First-party scopes that are never held back, matching `pnpm-workspace.yaml`. */\nexport const RUNTIME_MIN_RELEASE_AGE_EXCLUDE: readonly string[] = ['@agimon-ai/*', '@agiflowai/*', '@earendil-works/*'];\n\nconst STORE_DIRECTORY = 'store';\nconst ENV_PROXY_FLAG = '--use-env-proxy';\nconst ENV_PROXY_ENABLED = '1';\nconst PROXY_VARIABLES = ['HTTPS_PROXY', 'https_proxy', 'HTTP_PROXY', 'http_proxy'] as const;\nconst NO_PROXY_VARIABLES = ['NO_PROXY', 'no_proxy'] as const;\n\n/** Whether Node's env proxy was on when the process started, recorded once at module load. */\nconst startedWithEnvProxy =\n process.env.NODE_USE_ENV_PROXY === ENV_PROXY_ENABLED ||\n process.execArgv.includes(ENV_PROXY_FLAG) ||\n (process.env.NODE_OPTIONS ?? '').split(/\\s+/).includes(ENV_PROXY_FLAG);\n\n/** The proxy settings last installed with `setGlobalProxyFromEnv`, so a repeat call keeps the pool. */\nlet appliedProxySettings: string | undefined;\n\n/**\n * How runtime package traffic reaches a proxy:\n * - `startup`: Node's env proxy was on at process start and covers every thread;\n * - `runtime`: a proxy variable is set without it, so the main thread carries all registry traffic;\n * - `none`: no proxy variable is set.\n */\nexport type RuntimeProxyMode = 'startup' | 'runtime' | 'none';\n\nexport interface RuntimePackageOptions {\n /** The project upm works on: its `package.json`, `upm.lock` and `node_modules`. */\n dir: string;\n /** Po's home; the store is always `<poHome>/store`. */\n poHome: string;\n log?: (message: string, level: LogLevel) => void;\n}\n\nexport interface InstallRuntimePackagesOptions extends RuntimePackageOptions {\n /** Pick from kept registry documents however old; ask the registry only for what they cannot answer. */\n preferOffline?: boolean;\n /** Never use the network: install from `upm.lock` and the store. */\n offline?: boolean;\n /** Registry base url for this install, over `.npmrc` and `npm_config_registry`. */\n registry?: string;\n}\n\nfunction proxySettings(): string | undefined {\n const proxies = PROXY_VARIABLES.map((name) => process.env[name]?.trim() ?? '');\n if (!proxies.some(Boolean)) return undefined;\n return [...proxies, ...NO_PROXY_VARIABLES.map((name) => process.env[name]?.trim() ?? '')].join('\\n');\n}\n\nexport function runtimeProxyMode(): RuntimeProxyMode {\n if (startedWithEnvProxy) return 'startup';\n return proxySettings() === undefined ? 'none' : 'runtime';\n}\n\n/** Installs the runtime proxy when needed and returns the upm tuning that keeps traffic on it. */\nfunction proxyTuning(log: RuntimePackageOptions['log']): Experimental | undefined {\n if (startedWithEnvProxy) return undefined;\n const settings = proxySettings();\n if (settings === undefined) return undefined;\n if (settings !== appliedProxySettings) {\n if (typeof http.setGlobalProxyFromEnv === 'function') {\n http.setGlobalProxyFromEnv();\n appliedProxySettings = settings;\n } else {\n log?.('this Node.js has no http.setGlobalProxyFromEnv; start it with NODE_USE_ENV_PROXY=1', 'warn');\n }\n }\n return { resolvePool: 0 };\n}\n\nexport function runtimeStoreDirectory(poHome: string): string {\n return path.join(poHome, STORE_DIRECTORY);\n}\n\n/** Installs the dependency set `<dir>/package.json` declares. */\nexport async function installRuntimePackages(options: InstallRuntimePackagesOptions): Promise<InstallResult> {\n // upm treats an undefined option as an absent one (verified in upm 1.4.0's dist).\n const { install } = await compatibleUpm();\n return install({\n dir: options.dir,\n store: runtimeStoreDirectory(options.poHome),\n minReleaseAge: RUNTIME_MIN_RELEASE_AGE_DAYS,\n minReleaseAgeExclude: [...RUNTIME_MIN_RELEASE_AGE_EXCLUDE],\n preferOffline: options.preferOffline,\n offline: options.offline,\n registry: options.registry,\n log: options.log,\n experimental: proxyTuning(options.log),\n });\n}\n\n/** The newest version of a package that the release-age policy allows. */\nexport async function resolveNewest(name: string, options: RuntimePackageOptions): Promise<string> {\n // upm's resolve always reads the registry on the main thread, so the runtime proxy covers it.\n proxyTuning(options.log);\n // upm 1.4.0's resolve keeps registry documents in `options.store` although SpecOptions does not\n // declare it; without it they land in ~/.upm/store.\n const specOptions: SpecOptions & StoreAccess = {\n dir: options.dir,\n store: runtimeStoreDirectory(options.poHome),\n minReleaseAge: RUNTIME_MIN_RELEASE_AGE_DAYS,\n minReleaseAgeExclude: [...RUNTIME_MIN_RELEASE_AGE_EXCLUDE],\n log: options.log,\n };\n const { resolve } = await compatibleUpm();\n const [manifest] = await resolve([name], specOptions);\n if (!manifest?.version) throw new Error(`The registry reported no version for ${name}.`);\n return manifest.version;\n}\n\n/** Drops stale project entries under `dir` and store content no package index references. */\nexport async function pruneRuntimePackages(options: RuntimePackageOptions): Promise<PruneResult> {\n const { prune } = await compatibleUpm();\n return prune({ dir: options.dir, store: runtimeStoreDirectory(options.poHome), log: options.log });\n}\n"],"mappings":";;;;;;;;;;;AAeA,SAAS,gBAA+C;CACtD,IAAI,YAAYA,UAAAA,QAAK,SAAA,GAAQC,SAAAA,cAAAA,CAAAA,QAAAA,KAAAA,CAAAA,CAAAA,cAAAA,UAAAA,CAAAA,CAAAA,IAA6B,CAAC;CAC3D,OAAO,CAACC,QAAAA,QAAG,WAAWF,UAAAA,QAAK,KAAK,WAAW,cAAc,CAAC,GAAG;EAC3D,MAAM,SAASA,UAAAA,QAAK,QAAQ,SAAS;EACrC,IAAI,WAAW,WAAW,MAAM,IAAI,MAAM,oCAAoC;EAC9E,YAAY;CACd;CACA,OAAO,QAAA,GAAOG,SAAAA,cAAAA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OJ,UAAAA,QAAK,KAAK,QAAQ,eAAe;AAC1C;;AAGA,eAAsB,uBAAuB,SAAgE;CAE3G,MAAM,EAAE,YAAY,MAAM,cAAc;CACxC,OAAO,QAAQ;EACb,KAAK,QAAQ;EACb,OAAO,sBAAsB,QAAQ,MAAM;EAC3C,eAAA;EACA,sBAAsB,CAAC,GAAG,+BAA+B;EACzD,eAAe,QAAQ;EACvB,SAAS,QAAQ;EACjB,UAAU,QAAQ;EAClB,KAAK,QAAQ;EACb,cAAc,YAAY,QAAQ,GAAG;CACvC,CAAC;AACH;;AAGA,eAAsB,cAAc,MAAc,SAAiD;CAEjG,YAAY,QAAQ,GAAG;CAGvB,MAAM,cAAyC;EAC7C,KAAK,QAAQ;EACb,OAAO,sBAAsB,QAAQ,MAAM;EAC3C,eAAA;EACA,sBAAsB,CAAC,GAAG,+BAA+B;EACzD,KAAK,QAAQ;CACf;CACA,MAAM,EAAE,YAAY,MAAM,cAAc;CACxC,MAAM,CAAC,YAAY,MAAM,QAAQ,CAAC,IAAI,GAAG,WAAW;CACpD,IAAI,CAAC,UAAU,SAAS,MAAM,IAAI,MAAM,wCAAwC,KAAK,EAAE;CACvF,OAAO,SAAS;AAClB;;AAGA,eAAsB,qBAAqB,SAAsD;CAC/F,MAAM,EAAE,UAAU,MAAM,cAAc;CACtC,OAAO,MAAM;EAAE,KAAK,QAAQ;EAAK,OAAO,sBAAsB,QAAQ,MAAM;EAAG,KAAK,QAAQ;CAAI,CAAC;AACnG"}
1
+ {"version":3,"file":"runtimePackages.cjs","names":["path","fileURLToPath","fs","pathToFileURL","http"],"sources":["../src/services/runtimePackages/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport http from 'node:http';\nimport path from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\n\nimport {\n type Experimental,\n type InstallResult,\n type LogLevel,\n type PruneResult,\n type SpecOptions,\n type StoreAccess,\n} from 'upm';\n\n/** The build ships a pinned, scoped resolver correction inside the published dist. */\nfunction compatibleUpm(): Promise<typeof import('upm')> {\n let directory = path.dirname(fileURLToPath(import.meta.url));\n while (!fs.existsSync(path.join(directory, 'package.json'))) {\n const parent = path.dirname(directory);\n if (parent === directory) throw new Error('Cannot locate the Po core package.');\n directory = parent;\n }\n return import(pathToFileURL(path.join(directory, 'dist/vendor/upm/index.mjs')).href);\n}\n\n/**\n * Runtime packages: what Po installs at run time (layer packages, npm plugins)\n * goes through upm into a directory under Po's home, never through a spawned\n * package manager.\n *\n * Every call passes the store explicitly as `<po home>/store`; upm would\n * otherwise fall back to `UPM_STORE` and then `~/.upm/store`.\n *\n * Proxies: Node's env proxy (`NODE_USE_ENV_PROXY=1` or `--use-env-proxy`) only\n * covers upm's registry worker threads when it is present at process start.\n * When a proxy variable is set without it, this module installs the proxy at\n * run time with `http.setGlobalProxyFromEnv()`, which covers the main thread\n * only, and so asks upm to read the registry on the main thread\n * (`experimental.resolvePool: 0`).\n *\n * Certificates: a private CA is supplied the usual Node ways, with\n * `NODE_EXTRA_CA_CERTS` or `--use-system-ca`. Whether either reaches upm's\n * worker threads is not verified.\n */\n\n/** Days a newly picked version must have been published, matching `pnpm-workspace.yaml`. */\nexport const RUNTIME_MIN_RELEASE_AGE_DAYS = 2;\n/**\n * Packages that are never held back: the first-party scopes and the pins `pnpm-workspace.yaml`\n * excludes by version. upm only honours name or scope entries, so the pins are listed by name.\n */\nexport const RUNTIME_MIN_RELEASE_AGE_EXCLUDE: readonly string[] = [\n '@agimon-ai/*',\n '@agiflowai/*',\n '@earendil-works/*',\n '@deepseek-ai/cordis',\n '@deepseek-ai/cosmokit',\n];\n\nconst STORE_DIRECTORY = 'store';\nconst ENV_PROXY_FLAG = '--use-env-proxy';\nconst ENV_PROXY_ENABLED = '1';\nconst PROXY_VARIABLES = ['HTTPS_PROXY', 'https_proxy', 'HTTP_PROXY', 'http_proxy'] as const;\nconst NO_PROXY_VARIABLES = ['NO_PROXY', 'no_proxy'] as const;\n\n/** Whether Node's env proxy was on when the process started, recorded once at module load. */\nconst startedWithEnvProxy =\n process.env.NODE_USE_ENV_PROXY === ENV_PROXY_ENABLED ||\n process.execArgv.includes(ENV_PROXY_FLAG) ||\n (process.env.NODE_OPTIONS ?? '').split(/\\s+/).includes(ENV_PROXY_FLAG);\n\n/** The proxy settings last installed with `setGlobalProxyFromEnv`, so a repeat call keeps the pool. */\nlet appliedProxySettings: string | undefined;\n\n/**\n * How runtime package traffic reaches a proxy:\n * - `startup`: Node's env proxy was on at process start and covers every thread;\n * - `runtime`: a proxy variable is set without it, so the main thread carries all registry traffic;\n * - `none`: no proxy variable is set.\n */\nexport type RuntimeProxyMode = 'startup' | 'runtime' | 'none';\n\nexport interface RuntimePackageOptions {\n /** The project upm works on: its `package.json`, `upm.lock` and `node_modules`. */\n dir: string;\n /** Po's home; the store is always `<poHome>/store`. */\n poHome: string;\n log?: (message: string, level: LogLevel) => void;\n}\n\nexport interface InstallRuntimePackagesOptions extends RuntimePackageOptions {\n /** Pick from kept registry documents however old; ask the registry only for what they cannot answer. */\n preferOffline?: boolean;\n /** Never use the network: install from `upm.lock` and the store. */\n offline?: boolean;\n /** Registry base url for this install, over `.npmrc` and `npm_config_registry`. */\n registry?: string;\n}\n\nfunction proxySettings(): string | undefined {\n const proxies = PROXY_VARIABLES.map((name) => process.env[name]?.trim() ?? '');\n if (!proxies.some(Boolean)) return undefined;\n return [...proxies, ...NO_PROXY_VARIABLES.map((name) => process.env[name]?.trim() ?? '')].join('\\n');\n}\n\nexport function runtimeProxyMode(): RuntimeProxyMode {\n if (startedWithEnvProxy) return 'startup';\n return proxySettings() === undefined ? 'none' : 'runtime';\n}\n\n/** Installs the runtime proxy when needed and returns the upm tuning that keeps traffic on it. */\nfunction proxyTuning(log: RuntimePackageOptions['log']): Experimental | undefined {\n if (startedWithEnvProxy) return undefined;\n const settings = proxySettings();\n if (settings === undefined) return undefined;\n if (settings !== appliedProxySettings) {\n if (typeof http.setGlobalProxyFromEnv === 'function') {\n http.setGlobalProxyFromEnv();\n appliedProxySettings = settings;\n } else {\n log?.('this Node.js has no http.setGlobalProxyFromEnv; start it with NODE_USE_ENV_PROXY=1', 'warn');\n }\n }\n return { resolvePool: 0 };\n}\n\nexport function runtimeStoreDirectory(poHome: string): string {\n return path.join(poHome, STORE_DIRECTORY);\n}\n\n/** Installs the dependency set `<dir>/package.json` declares. */\nexport async function installRuntimePackages(options: InstallRuntimePackagesOptions): Promise<InstallResult> {\n // upm treats an undefined option as an absent one (verified in upm 1.4.0's dist).\n const { install } = await compatibleUpm();\n return install({\n dir: options.dir,\n store: runtimeStoreDirectory(options.poHome),\n minReleaseAge: RUNTIME_MIN_RELEASE_AGE_DAYS,\n minReleaseAgeExclude: [...RUNTIME_MIN_RELEASE_AGE_EXCLUDE],\n preferOffline: options.preferOffline,\n offline: options.offline,\n registry: options.registry,\n log: options.log,\n experimental: proxyTuning(options.log),\n });\n}\n\n/** The newest version of a package that the release-age policy allows. */\nexport async function resolveNewest(name: string, options: RuntimePackageOptions): Promise<string> {\n // upm's resolve always reads the registry on the main thread, so the runtime proxy covers it.\n proxyTuning(options.log);\n // upm 1.4.0's resolve keeps registry documents in `options.store` although SpecOptions does not\n // declare it; without it they land in ~/.upm/store.\n const specOptions: SpecOptions & StoreAccess = {\n dir: options.dir,\n store: runtimeStoreDirectory(options.poHome),\n minReleaseAge: RUNTIME_MIN_RELEASE_AGE_DAYS,\n minReleaseAgeExclude: [...RUNTIME_MIN_RELEASE_AGE_EXCLUDE],\n log: options.log,\n };\n const { resolve } = await compatibleUpm();\n const [manifest] = await resolve([name], specOptions);\n if (!manifest?.version) throw new Error(`The registry reported no version for ${name}.`);\n return manifest.version;\n}\n\n/** Drops stale project entries under `dir` and store content no package index references. */\nexport async function pruneRuntimePackages(options: RuntimePackageOptions): Promise<PruneResult> {\n const { prune } = await compatibleUpm();\n return prune({ dir: options.dir, store: runtimeStoreDirectory(options.poHome), log: options.log });\n}\n"],"mappings":";;;;;;;;;;;AAeA,SAAS,gBAA+C;CACtD,IAAI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AAsB,QAAQ,MAAM;EAAG,KAAK,QAAQ;CAAI,CAAC;AACnG"}
@@ -21,7 +21,10 @@ import { InstallResult, LogLevel, PruneResult } from "upm";
21
21
  */
22
22
  /** Days a newly picked version must have been published, matching `pnpm-workspace.yaml`. */
23
23
  export declare const RUNTIME_MIN_RELEASE_AGE_DAYS = 2;
24
- /** First-party scopes that are never held back, matching `pnpm-workspace.yaml`. */
24
+ /**
25
+ * Packages that are never held back: the first-party scopes and the pins `pnpm-workspace.yaml`
26
+ * excludes by version. upm only honours name or scope entries, so the pins are listed by name.
27
+ */
25
28
  export declare const RUNTIME_MIN_RELEASE_AGE_EXCLUDE: readonly string[];
26
29
  /**
27
30
  * How runtime package traffic reaches a proxy:
@@ -1 +1 @@
1
- {"version":3,"file":"runtimePackages.d.mts","names":[],"sources":["../src/services/runtimePackages/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;qBA8Ca;;qBAEA;;;;;;;YAuBD;iBAEK;;EAEf;;EAEA;EACA,OAAO,iBAAiB,OAAO;;iBAGhB,sCAAsC;;EAErD;;EAEA;;EAEA;;wBASc,oBAAoB;wBAqBpB,sBAAsB;;wBAKhB,uBAAuB,SAAS,gCAAgC,QAAQ;;wBAiBxE,cAAc,cAAc,SAAS,wBAAwB;;wBAmB7D,qBAAqB,SAAS,wBAAwB,QAAQ"}
1
+ {"version":3,"file":"runtimePackages.d.mts","names":[],"sources":["../src/services/runtimePackages/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;qBA8Ca;;;;;qBAKA;;;;;;;YA6BD;iBAEK;;EAEf;;EAEA;EACA,OAAO,iBAAiB,OAAO;;iBAGhB,sCAAsC;;EAErD;;EAEA;;EAEA;;wBASc,oBAAoB;wBAqBpB,sBAAsB;;wBAKhB,uBAAuB,SAAS,gCAAgC,QAAQ;;wBAiBxE,cAAc,cAAc,SAAS,wBAAwB;;wBAmB7D,qBAAqB,SAAS,wBAAwB,QAAQ"}
@@ -34,11 +34,16 @@ function compatibleUpm() {
34
34
  */
35
35
  /** Days a newly picked version must have been published, matching `pnpm-workspace.yaml`. */
36
36
  const RUNTIME_MIN_RELEASE_AGE_DAYS = 2;
37
- /** First-party scopes that are never held back, matching `pnpm-workspace.yaml`. */
37
+ /**
38
+ * Packages that are never held back: the first-party scopes and the pins `pnpm-workspace.yaml`
39
+ * excludes by version. upm only honours name or scope entries, so the pins are listed by name.
40
+ */
38
41
  const RUNTIME_MIN_RELEASE_AGE_EXCLUDE = [
39
42
  "@agimon-ai/*",
40
43
  "@agiflowai/*",
41
- "@earendil-works/*"
44
+ "@earendil-works/*",
45
+ "@deepseek-ai/cordis",
46
+ "@deepseek-ai/cosmokit"
42
47
  ];
43
48
  const STORE_DIRECTORY = "store";
44
49
  const ENV_PROXY_FLAG = "--use-env-proxy";
@@ -1 +1 @@
1
- {"version":3,"file":"runtimePackages.mjs","names":[],"sources":["../src/services/runtimePackages/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport http from 'node:http';\nimport path from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\n\nimport {\n type Experimental,\n type InstallResult,\n type LogLevel,\n type PruneResult,\n type SpecOptions,\n type StoreAccess,\n} from 'upm';\n\n/** The build ships a pinned, scoped resolver correction inside the published dist. */\nfunction compatibleUpm(): Promise<typeof import('upm')> {\n let directory = path.dirname(fileURLToPath(import.meta.url));\n while (!fs.existsSync(path.join(directory, 'package.json'))) {\n const parent = path.dirname(directory);\n if (parent === directory) throw new Error('Cannot locate the Po core package.');\n directory = parent;\n }\n return import(pathToFileURL(path.join(directory, 'dist/vendor/upm/index.mjs')).href);\n}\n\n/**\n * Runtime packages: what Po installs at run time (layer packages, npm plugins)\n * goes through upm into a directory under Po's home, never through a spawned\n * package manager.\n *\n * Every call passes the store explicitly as `<po home>/store`; upm would\n * otherwise fall back to `UPM_STORE` and then `~/.upm/store`.\n *\n * Proxies: Node's env proxy (`NODE_USE_ENV_PROXY=1` or `--use-env-proxy`) only\n * covers upm's registry worker threads when it is present at process start.\n * When a proxy variable is set without it, this module installs the proxy at\n * run time with `http.setGlobalProxyFromEnv()`, which covers the main thread\n * only, and so asks upm to read the registry on the main thread\n * (`experimental.resolvePool: 0`).\n *\n * Certificates: a private CA is supplied the usual Node ways, with\n * `NODE_EXTRA_CA_CERTS` or `--use-system-ca`. Whether either reaches upm's\n * worker threads is not verified.\n */\n\n/** Days a newly picked version must have been published, matching `pnpm-workspace.yaml`. */\nexport const RUNTIME_MIN_RELEASE_AGE_DAYS = 2;\n/** First-party scopes that are never held back, matching `pnpm-workspace.yaml`. */\nexport const RUNTIME_MIN_RELEASE_AGE_EXCLUDE: readonly string[] = ['@agimon-ai/*', '@agiflowai/*', '@earendil-works/*'];\n\nconst STORE_DIRECTORY = 'store';\nconst ENV_PROXY_FLAG = '--use-env-proxy';\nconst ENV_PROXY_ENABLED = '1';\nconst PROXY_VARIABLES = ['HTTPS_PROXY', 'https_proxy', 'HTTP_PROXY', 'http_proxy'] as const;\nconst NO_PROXY_VARIABLES = ['NO_PROXY', 'no_proxy'] as const;\n\n/** Whether Node's env proxy was on when the process started, recorded once at module load. */\nconst startedWithEnvProxy =\n process.env.NODE_USE_ENV_PROXY === ENV_PROXY_ENABLED ||\n process.execArgv.includes(ENV_PROXY_FLAG) ||\n (process.env.NODE_OPTIONS ?? '').split(/\\s+/).includes(ENV_PROXY_FLAG);\n\n/** The proxy settings last installed with `setGlobalProxyFromEnv`, so a repeat call keeps the pool. */\nlet appliedProxySettings: string | undefined;\n\n/**\n * How runtime package traffic reaches a proxy:\n * - `startup`: Node's env proxy was on at process start and covers every thread;\n * - `runtime`: a proxy variable is set without it, so the main thread carries all registry traffic;\n * - `none`: no proxy variable is set.\n */\nexport type RuntimeProxyMode = 'startup' | 'runtime' | 'none';\n\nexport interface RuntimePackageOptions {\n /** The project upm works on: its `package.json`, `upm.lock` and `node_modules`. */\n dir: string;\n /** Po's home; the store is always `<poHome>/store`. */\n poHome: string;\n log?: (message: string, level: LogLevel) => void;\n}\n\nexport interface InstallRuntimePackagesOptions extends RuntimePackageOptions {\n /** Pick from kept registry documents however old; ask the registry only for what they cannot answer. */\n preferOffline?: boolean;\n /** Never use the network: install from `upm.lock` and the store. */\n offline?: boolean;\n /** Registry base url for this install, over `.npmrc` and `npm_config_registry`. */\n registry?: string;\n}\n\nfunction proxySettings(): string | undefined {\n const proxies = PROXY_VARIABLES.map((name) => process.env[name]?.trim() ?? '');\n if (!proxies.some(Boolean)) return undefined;\n return [...proxies, ...NO_PROXY_VARIABLES.map((name) => process.env[name]?.trim() ?? '')].join('\\n');\n}\n\nexport function runtimeProxyMode(): RuntimeProxyMode {\n if (startedWithEnvProxy) return 'startup';\n return proxySettings() === undefined ? 'none' : 'runtime';\n}\n\n/** Installs the runtime proxy when needed and returns the upm tuning that keeps traffic on it. */\nfunction proxyTuning(log: RuntimePackageOptions['log']): Experimental | undefined {\n if (startedWithEnvProxy) return undefined;\n const settings = proxySettings();\n if (settings === undefined) return undefined;\n if (settings !== appliedProxySettings) {\n if (typeof http.setGlobalProxyFromEnv === 'function') {\n http.setGlobalProxyFromEnv();\n appliedProxySettings = settings;\n } else {\n log?.('this Node.js has no http.setGlobalProxyFromEnv; start it with NODE_USE_ENV_PROXY=1', 'warn');\n }\n }\n return { resolvePool: 0 };\n}\n\nexport function runtimeStoreDirectory(poHome: string): string {\n return path.join(poHome, STORE_DIRECTORY);\n}\n\n/** Installs the dependency set `<dir>/package.json` declares. */\nexport async function installRuntimePackages(options: InstallRuntimePackagesOptions): Promise<InstallResult> {\n // upm treats an undefined option as an absent one (verified in upm 1.4.0's dist).\n const { install } = await compatibleUpm();\n return install({\n dir: options.dir,\n store: runtimeStoreDirectory(options.poHome),\n minReleaseAge: RUNTIME_MIN_RELEASE_AGE_DAYS,\n minReleaseAgeExclude: [...RUNTIME_MIN_RELEASE_AGE_EXCLUDE],\n preferOffline: options.preferOffline,\n offline: options.offline,\n registry: options.registry,\n log: options.log,\n experimental: proxyTuning(options.log),\n });\n}\n\n/** The newest version of a package that the release-age policy allows. */\nexport async function resolveNewest(name: string, options: RuntimePackageOptions): Promise<string> {\n // upm's resolve always reads the registry on the main thread, so the runtime proxy covers it.\n proxyTuning(options.log);\n // upm 1.4.0's resolve keeps registry documents in `options.store` although SpecOptions does not\n // declare it; without it they land in ~/.upm/store.\n const specOptions: SpecOptions & StoreAccess = {\n dir: options.dir,\n store: runtimeStoreDirectory(options.poHome),\n minReleaseAge: RUNTIME_MIN_RELEASE_AGE_DAYS,\n minReleaseAgeExclude: [...RUNTIME_MIN_RELEASE_AGE_EXCLUDE],\n log: options.log,\n };\n const { resolve } = await compatibleUpm();\n const [manifest] = await resolve([name], specOptions);\n if (!manifest?.version) throw new Error(`The registry reported no version for ${name}.`);\n return manifest.version;\n}\n\n/** Drops stale project entries under `dir` and store content no package index references. */\nexport async function pruneRuntimePackages(options: RuntimePackageOptions): Promise<PruneResult> {\n const { prune } = await compatibleUpm();\n return prune({ dir: options.dir, store: runtimeStoreDirectory(options.poHome), log: options.log });\n}\n"],"mappings":";;;;;;AAeA,SAAS,gBAA+C;CACtD,IAAI,YAAY,KAAK,QAAQ,cAAc,YAAY,GAAG,CAAC;CAC3D,OAAO,CAAC,GAAG,WAAW,KAAK,KAAK,WAAW,cAAc,CAAC,GAAG;EAC3D,MAAM,SAAS,KAAK,QAAQ,SAAS;EACrC,IAAI,WAAW,WAAW,MAAM,IAAI,MAAM,oCAAoC;EAC9E,YAAY;CACd;CACA,OAAO,OAAO,cAAc,KAAK,KAAK,WAAW,2BAA2B,CAAC,CAAC,CAAC;AACjF;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,+BAA+B;;AAE5C,MAAa,kCAAqD;CAAC;CAAgB;CAAgB;AAAmB;AAEtH,MAAM,kBAAkB;AACxB,MAAM,iBAAiB;AACvB,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;CAAC;CAAe;CAAe;CAAc;AAAY;AACjF,MAAM,qBAAqB,CAAC,YAAY,UAAU;;AAGlD,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AACH;;AAGA,eAAsB,cAAc,MAAc,SAAiD;CAEjG,YAAY,QAAQ,GAAG;CAGvB,MAAM,cAAyC;EAC7C,KAAK,QAAQ;EACb,OAAO,sBAAsB,QAAQ,MAAM;EAC3C,eAAA;EACA,sBAAsB,CAAC,GAAG,+BAA+B;EACzD,KAAK,QAAQ;CACf;CACA,MAAM,EAAE,YAAY,MAAM,cAAc;CACxC,MAAM,CAAC,YAAY,MAAM,QAAQ,CAAC,IAAI,GAAG,WAAW;CACpD,IAAI,CAAC,UAAU,SAAS,MAAM,IAAI,MAAM,wCAAwC,KAAK,EAAE;CACvF,OAAO,SAAS;AAClB;;AAGA,eAAsB,qBAAqB,SAAsD;CAC/F,MAAM,EAAE,UAAU,MAAM,cAAc;CACtC,OAAO,MAAM;EAAE,KAAK,QAAQ;EAAK,OAAO,sBAAsB,QAAQ,MAAM;EAAG,KAAK,QAAQ;CAAI,CAAC;AACnG"}
1
+ {"version":3,"file":"runtimePackages.mjs","names":[],"sources":["../src/services/runtimePackages/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport http from 'node:http';\nimport path from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\n\nimport {\n type Experimental,\n type InstallResult,\n type LogLevel,\n type PruneResult,\n type SpecOptions,\n type StoreAccess,\n} from 'upm';\n\n/** The build ships a pinned, scoped resolver correction inside the published dist. */\nfunction compatibleUpm(): Promise<typeof import('upm')> {\n let directory = path.dirname(fileURLToPath(import.meta.url));\n while (!fs.existsSync(path.join(directory, 'package.json'))) {\n const parent = path.dirname(directory);\n if (parent === directory) throw new Error('Cannot locate the Po core package.');\n directory = parent;\n }\n return import(pathToFileURL(path.join(directory, 'dist/vendor/upm/index.mjs')).href);\n}\n\n/**\n * Runtime packages: what Po installs at run time (layer packages, npm plugins)\n * goes through upm into a directory under Po's home, never through a spawned\n * package manager.\n *\n * Every call passes the store explicitly as `<po home>/store`; upm would\n * otherwise fall back to `UPM_STORE` and then `~/.upm/store`.\n *\n * Proxies: Node's env proxy (`NODE_USE_ENV_PROXY=1` or `--use-env-proxy`) only\n * covers upm's registry worker threads when it is present at process start.\n * When a proxy variable is set without it, this module installs the proxy at\n * run time with `http.setGlobalProxyFromEnv()`, which covers the main thread\n * only, and so asks upm to read the registry on the main thread\n * (`experimental.resolvePool: 0`).\n *\n * Certificates: a private CA is supplied the usual Node ways, with\n * `NODE_EXTRA_CA_CERTS` or `--use-system-ca`. Whether either reaches upm's\n * worker threads is not verified.\n */\n\n/** Days a newly picked version must have been published, matching `pnpm-workspace.yaml`. */\nexport const RUNTIME_MIN_RELEASE_AGE_DAYS = 2;\n/**\n * Packages that are never held back: the first-party scopes and the pins `pnpm-workspace.yaml`\n * excludes by version. upm only honours name or scope entries, so the pins are listed by name.\n */\nexport const RUNTIME_MIN_RELEASE_AGE_EXCLUDE: readonly string[] = [\n '@agimon-ai/*',\n '@agiflowai/*',\n '@earendil-works/*',\n '@deepseek-ai/cordis',\n '@deepseek-ai/cosmokit',\n];\n\nconst STORE_DIRECTORY = 'store';\nconst ENV_PROXY_FLAG = '--use-env-proxy';\nconst ENV_PROXY_ENABLED = '1';\nconst PROXY_VARIABLES = ['HTTPS_PROXY', 'https_proxy', 'HTTP_PROXY', 'http_proxy'] as const;\nconst NO_PROXY_VARIABLES = ['NO_PROXY', 'no_proxy'] as const;\n\n/** Whether Node's env proxy was on when the process started, recorded once at module load. */\nconst startedWithEnvProxy =\n process.env.NODE_USE_ENV_PROXY === ENV_PROXY_ENABLED ||\n process.execArgv.includes(ENV_PROXY_FLAG) ||\n (process.env.NODE_OPTIONS ?? '').split(/\\s+/).includes(ENV_PROXY_FLAG);\n\n/** The proxy settings last installed with `setGlobalProxyFromEnv`, so a repeat call keeps the pool. */\nlet appliedProxySettings: string | undefined;\n\n/**\n * How runtime package traffic reaches a proxy:\n * - `startup`: Node's env proxy was on at process start and covers every thread;\n * - `runtime`: a proxy variable is set without it, so the main thread carries all registry traffic;\n * - `none`: no proxy variable is set.\n */\nexport type RuntimeProxyMode = 'startup' | 'runtime' | 'none';\n\nexport interface RuntimePackageOptions {\n /** The project upm works on: its `package.json`, `upm.lock` and `node_modules`. */\n dir: string;\n /** Po's home; the store is always `<poHome>/store`. */\n poHome: string;\n log?: (message: string, level: LogLevel) => void;\n}\n\nexport interface InstallRuntimePackagesOptions extends RuntimePackageOptions {\n /** Pick from kept registry documents however old; ask the registry only for what they cannot answer. */\n preferOffline?: boolean;\n /** Never use the network: install from `upm.lock` and the store. */\n offline?: boolean;\n /** Registry base url for this install, over `.npmrc` and `npm_config_registry`. */\n registry?: string;\n}\n\nfunction proxySettings(): string | undefined {\n const proxies = PROXY_VARIABLES.map((name) => process.env[name]?.trim() ?? '');\n if (!proxies.some(Boolean)) return undefined;\n return [...proxies, ...NO_PROXY_VARIABLES.map((name) => process.env[name]?.trim() ?? '')].join('\\n');\n}\n\nexport function runtimeProxyMode(): RuntimeProxyMode {\n if (startedWithEnvProxy) return 'startup';\n return proxySettings() === undefined ? 'none' : 'runtime';\n}\n\n/** Installs the runtime proxy when needed and returns the upm tuning that keeps traffic on it. */\nfunction proxyTuning(log: RuntimePackageOptions['log']): Experimental | undefined {\n if (startedWithEnvProxy) return undefined;\n const settings = proxySettings();\n if (settings === undefined) return undefined;\n if (settings !== appliedProxySettings) {\n if (typeof http.setGlobalProxyFromEnv === 'function') {\n http.setGlobalProxyFromEnv();\n appliedProxySettings = settings;\n } else {\n log?.('this Node.js has no http.setGlobalProxyFromEnv; start it with NODE_USE_ENV_PROXY=1', 'warn');\n }\n }\n return { resolvePool: 0 };\n}\n\nexport function runtimeStoreDirectory(poHome: string): string {\n return path.join(poHome, STORE_DIRECTORY);\n}\n\n/** Installs the dependency set `<dir>/package.json` declares. */\nexport async function installRuntimePackages(options: InstallRuntimePackagesOptions): Promise<InstallResult> {\n // upm treats an undefined option as an absent one (verified in upm 1.4.0's dist).\n const { install } = await compatibleUpm();\n return install({\n dir: options.dir,\n store: runtimeStoreDirectory(options.poHome),\n minReleaseAge: RUNTIME_MIN_RELEASE_AGE_DAYS,\n minReleaseAgeExclude: [...RUNTIME_MIN_RELEASE_AGE_EXCLUDE],\n preferOffline: options.preferOffline,\n offline: options.offline,\n registry: options.registry,\n log: options.log,\n experimental: proxyTuning(options.log),\n });\n}\n\n/** The newest version of a package that the release-age policy allows. */\nexport async function resolveNewest(name: string, options: RuntimePackageOptions): Promise<string> {\n // upm's resolve always reads the registry on the main thread, so the runtime proxy covers it.\n proxyTuning(options.log);\n // upm 1.4.0's resolve keeps registry documents in `options.store` although SpecOptions does not\n // declare it; without it they land in ~/.upm/store.\n const specOptions: SpecOptions & StoreAccess = {\n dir: options.dir,\n store: runtimeStoreDirectory(options.poHome),\n minReleaseAge: RUNTIME_MIN_RELEASE_AGE_DAYS,\n minReleaseAgeExclude: [...RUNTIME_MIN_RELEASE_AGE_EXCLUDE],\n log: options.log,\n };\n const { resolve } = await compatibleUpm();\n const [manifest] = await resolve([name], specOptions);\n if (!manifest?.version) throw new Error(`The registry reported no version for ${name}.`);\n return manifest.version;\n}\n\n/** Drops stale project entries under `dir` and store content no package index references. */\nexport async function pruneRuntimePackages(options: RuntimePackageOptions): Promise<PruneResult> {\n const { prune } = await compatibleUpm();\n return prune({ dir: options.dir, store: runtimeStoreDirectory(options.poHome), log: options.log });\n}\n"],"mappings":";;;;;;AAeA,SAAS,gBAA+C;CACtD,IAAI,YAAY,KAAK,QAAQ,cAAc,YAAY,GAAG,CAAC;CAC3D,OAAO,CAAC,GAAG,WAAW,KAAK,KAAK,WAAW,cAAc,CAAC,GAAG;EAC3D,MAAM,SAAS,KAAK,QAAQ,SAAS;EACrC,IAAI,WAAW,WAAW,MAAM,IAAI,MAAM,oCAAoC;EAC9E,YAAY;CACd;CACA,OAAO,OAAO,cAAc,KAAK,KAAK,WAAW,2BAA2B,CAAC,CAAC,CAAC;AACjF;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,+BAA+B;;;;;AAK5C,MAAa,kCAAqD;CAChE;CACA;CACA;C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,MAAM;EAC3C,eAAA;EACA,sBAAsB,CAAC,GAAG,+BAA+B;EACzD,eAAe,QAAQ;EACvB,SAAS,QAAQ;EACjB,UAAU,QAAQ;EAClB,KAAK,QAAQ;EACb,cAAc,YAAY,QAAQ,GAAG;CACvC,CAAC;AACH;;AAGA,eAAsB,cAAc,MAAc,SAAiD;CAEjG,YAAY,QAAQ,GAAG;CAGvB,MAAM,cAAyC;EAC7C,KAAK,QAAQ;EACb,OAAO,sBAAsB,QAAQ,MAAM;EAC3C,eAAA;EACA,sBAAsB,CAAC,GAAG,+BAA+B;EACzD,KAAK,QAAQ;CACf;CACA,MAAM,EAAE,YAAY,MAAM,cAAc;CACxC,MAAM,CAAC,YAAY,MAAM,QAAQ,CAAC,IAAI,GAAG,WAAW;CACpD,IAAI,CAAC,UAAU,SAAS,MAAM,IAAI,MAAM,wCAAwC,KAAK,EAAE;CACvF,OAAO,SAAS;AAClB;;AAGA,eAAsB,qBAAqB,SAAsD;CAC/F,MAAM,EAAE,UAAU,MAAM,cAAc;CACtC,OAAO,MAAM;EAAE,KAAK,QAAQ;EAAK,OAAO,sBAAsB,QAAQ,MAAM;EAAG,KAAK,QAAQ;CAAI,CAAC;AACnG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/po-core",
3
- "version": "0.0.0-alpha.15",
3
+ "version": "0.0.0-alpha.16",
4
4
  "description": "Po runtime systems and reusable core services.",
5
5
  "keywords": [
6
6
  "ai",
@@ -527,8 +527,8 @@
527
527
  "registry": "https://registry.npmjs.org/"
528
528
  },
529
529
  "dependencies": {
530
- "@agimon-ai/po-telemetry": "0.0.0-alpha.15",
531
- "@agimon-ai/po-web-security": "0.0.0-alpha.15",
530
+ "@agimon-ai/po-telemetry": "0.0.0-alpha.16",
531
+ "@agimon-ai/po-web-security": "0.0.0-alpha.16",
532
532
  "@deepseek-ai/cordis": "4.0.5",
533
533
  "@earendil-works/chord": "1.3.0",
534
534
  "@earendil-works/pi-agent-core": "1.3.0",
@@ -551,7 +551,7 @@
551
551
  "yaml": "2.9.1"
552
552
  },
553
553
  "devDependencies": {
554
- "@agimon-ai/vibe-lint-plugin-po-core": "0.0.0-alpha.15",
554
+ "@agimon-ai/vibe-lint-plugin-po-core": "0.0.0-alpha.16",
555
555
  "@apidevtools/swagger-parser": "^13.1.0",
556
556
  "@asyncapi/parser": "^3.6.4",
557
557
  "@earendil-works/pi-ai": "1.3.0",