@agimon-ai/po-config 0.0.0-alpha.185 → 0.0.0-alpha.186
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/dist/{completion-CNDR-uUX.d.mts → completion-DZhC4pxn.d.mts} +6 -6
- package/dist/{completion-CNDR-uUX.d.mts.map → completion-DZhC4pxn.d.mts.map} +1 -1
- package/dist/{config-BsCPggC2.mjs → config-CSH8Yppc.mjs} +2 -2
- package/dist/config-CSH8Yppc.mjs.map +1 -0
- package/dist/{config-CPP-cjYk.cjs → config-DW_CHY1I.cjs} +2 -2
- package/dist/config-DW_CHY1I.cjs.map +1 -0
- package/dist/config.cjs +1 -5
- package/dist/config.d.mts +3 -2
- package/dist/config.mjs +2 -2
- package/dist/{domains-D3RXena9.mjs → domains-DjAzI7KX.mjs} +10 -10
- package/dist/{domains-D3RXena9.mjs.map → domains-DjAzI7KX.mjs.map} +1 -1
- package/dist/{domains-B0oVNcZn.cjs → domains-YPi8FP02.cjs} +10 -10
- package/dist/{domains-B0oVNcZn.cjs.map → domains-YPi8FP02.cjs.map} +1 -1
- package/dist/domains.cjs +1 -1
- package/dist/domains.d.mts +1 -1
- package/dist/domains.mjs +1 -1
- package/dist/extensions/server.cjs +2 -2
- package/dist/extensions/server.mjs +2 -2
- package/dist/{harnessState-BhZtI9iI.cjs → harnessState-BpJcKc7A.cjs} +3 -3
- package/dist/harnessState-BpJcKc7A.cjs.map +1 -0
- package/dist/{harnessState-D4nlkbPb.mjs → harnessState-XYW0Kxrp.mjs} +3 -3
- package/dist/harnessState-XYW0Kxrp.mjs.map +1 -0
- package/dist/harnessState.cjs +1 -1
- package/dist/harnessState.d.mts +1 -1
- package/dist/harnessState.mjs +1 -1
- package/dist/{harnessStore-DeVw6keW.mjs → harnessStore-C3slJmA6.mjs} +2 -2
- package/dist/{harnessStore-DeVw6keW.mjs.map → harnessStore-C3slJmA6.mjs.map} +1 -1
- package/dist/{harnessStore-p-gGvY4E.cjs → harnessStore-CEGS2XsW.cjs} +2 -2
- package/dist/{harnessStore-p-gGvY4E.cjs.map → harnessStore-CEGS2XsW.cjs.map} +1 -1
- package/dist/harnessStore.cjs +1 -3
- package/dist/harnessStore.d.mts +2 -2
- package/dist/harnessStore.mjs +1 -1
- package/dist/{index-B-4wwva7.d.mts → index-BKyHO4CA.d.mts} +2 -2
- package/dist/{index-B-4wwva7.d.mts.map → index-BKyHO4CA.d.mts.map} +1 -1
- package/dist/{index-CXhxlXc-.d.mts → index-BR3sOzlc.d.mts} +2 -2
- package/dist/{index-CXhxlXc-.d.mts.map → index-BR3sOzlc.d.mts.map} +1 -1
- package/dist/index-C6h9we_P.d.mts +69 -0
- package/dist/index-C6h9we_P.d.mts.map +1 -0
- package/dist/{index-BnZTDP8o.d.mts → index-CGShZTV0.d.mts} +3 -69
- package/dist/index-CGShZTV0.d.mts.map +1 -0
- package/dist/{index-Cu7Nmbwo.d.mts → index-DUcy3Wl9.d.mts} +2 -2
- package/dist/{index-Cu7Nmbwo.d.mts.map → index-DUcy3Wl9.d.mts.map} +1 -1
- package/dist/{index-DmXVq8LE.d.mts → index-DpxGiwkt.d.mts} +5 -2
- package/dist/index-DpxGiwkt.d.mts.map +1 -0
- package/dist/index.cjs +8 -16
- package/dist/index.d.mts +8 -7
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/{init-BAqajJs_.mjs → init-DQ8Z06UF.mjs} +2 -2
- package/dist/{init-BAqajJs_.mjs.map → init-DQ8Z06UF.mjs.map} +1 -1
- package/dist/{init-CMm9qDwc.cjs → init-N38Ekmtu.cjs} +2 -2
- package/dist/{init-CMm9qDwc.cjs.map → init-N38Ekmtu.cjs.map} +1 -1
- package/dist/init.cjs +1 -1
- package/dist/init.mjs +1 -1
- package/dist/piContext.cjs +1 -1
- package/dist/piContext.d.mts +1 -1
- package/dist/piContext.mjs +1 -1
- package/dist/po-runtime-identity.json +1 -1
- package/dist/{presetConfig-CcEcJmF5.cjs → presetConfig-BfRgKkGm.cjs} +9 -3
- package/dist/presetConfig-BfRgKkGm.cjs.map +1 -0
- package/dist/{presetConfig-BQU00nHY.mjs → presetConfig-Wi5GSZNF.mjs} +9 -3
- package/dist/presetConfig-Wi5GSZNF.mjs.map +1 -0
- package/dist/{presets-DLaKzqF5.mjs → presets-DkKRHy2D.mjs} +3 -3
- package/dist/{presets-DLaKzqF5.mjs.map → presets-DkKRHy2D.mjs.map} +1 -1
- package/dist/{presets-htCD7CRs.cjs → presets-rwK19q80.cjs} +3 -3
- package/dist/{presets-htCD7CRs.cjs.map → presets-rwK19q80.cjs.map} +1 -1
- package/dist/presets.cjs +2 -4
- package/dist/presets.d.mts +2 -2
- package/dist/presets.mjs +3 -3
- package/dist/selectionSwitch.cjs +5 -5
- package/dist/selectionSwitch.cjs.map +1 -1
- package/dist/selectionSwitch.d.mts +2 -2
- package/dist/selectionSwitch.mjs +5 -5
- package/dist/selectionSwitch.mjs.map +1 -1
- package/dist/{sessionConfig-D4qLLeNo.mjs → sessionConfig-Bs088kJp.mjs} +5 -5
- package/dist/sessionConfig-Bs088kJp.mjs.map +1 -0
- package/dist/{sessionConfig-DCD0FnrG.cjs → sessionConfig-DRRjeTzY.cjs} +5 -5
- package/dist/sessionConfig-DRRjeTzY.cjs.map +1 -0
- package/dist/{settingsApi-C_rwgAlR.mjs → settingsApi-CgS8iKI2.mjs} +7 -7
- package/dist/settingsApi-CgS8iKI2.mjs.map +1 -0
- package/dist/{settingsApi-CN8lZ0g9.cjs → settingsApi-Cto-qj5s.cjs} +7 -7
- package/dist/settingsApi-Cto-qj5s.cjs.map +1 -0
- package/dist/sync.cjs +18 -0
- package/dist/sync.d.mts +4 -0
- package/dist/sync.mjs +4 -0
- package/package.json +9 -4
- package/dist/config-BsCPggC2.mjs.map +0 -1
- package/dist/config-CPP-cjYk.cjs.map +0 -1
- package/dist/harnessState-BhZtI9iI.cjs.map +0 -1
- package/dist/harnessState-D4nlkbPb.mjs.map +0 -1
- package/dist/index-BnZTDP8o.d.mts.map +0 -1
- package/dist/index-DmXVq8LE.d.mts.map +0 -1
- package/dist/presetConfig-BQU00nHY.mjs.map +0 -1
- package/dist/presetConfig-CcEcJmF5.cjs.map +0 -1
- package/dist/sessionConfig-D4qLLeNo.mjs.map +0 -1
- package/dist/sessionConfig-DCD0FnrG.cjs.map +0 -1
- package/dist/settingsApi-CN8lZ0g9.cjs.map +0 -1
- package/dist/settingsApi-C_rwgAlR.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as GitPluginSource, n as DomainManifest, p as PluginSource, u as PluginEntry } from "./domains-DQBJLW8S.mjs";
|
|
2
|
-
import "./index-CFRLvei6.mjs";
|
|
2
|
+
import { t as readPoConfigSourcesAsync } from "./index-CFRLvei6.mjs";
|
|
3
3
|
import { FileSystem } from "@agimon-ai/po-core/platform";
|
|
4
4
|
//#region src/services/pluginCatalog/parse.d.ts
|
|
5
5
|
declare const MARKETPLACE_MANIFEST_RELATIVE_PATHS: readonly ['.agents/plugins/marketplace.json', '.agents/plugins/api_marketplace.json', '.claude-plugin/marketplace.json', '.cursor-plugin/marketplace.json'];
|
|
@@ -57,17 +57,17 @@ type IoContext = Parameters<FileSystem['readTextFile']>[1];
|
|
|
57
57
|
* definitions. Configured roots accumulate, with exact marketplace manifests
|
|
58
58
|
* deduplicated in discovery order. Explicit entries override discovered IDs.
|
|
59
59
|
*/
|
|
60
|
-
declare function loadDomainsAsync(fs: FileSystem, repoRoot: string, context: IoContext, homeDirectory?: string): Promise<DomainManifest>;
|
|
61
|
-
declare function listDomainNamesAsync(fs: FileSystem, repoRoot: string, context: IoContext, homeDirectory?: string): Promise<string[]>;
|
|
60
|
+
declare function loadDomainsAsync(fs: FileSystem, repoRoot: string, context: IoContext, homeDirectory?: string, environment?: Parameters<typeof readPoConfigSourcesAsync>[5]): Promise<DomainManifest>;
|
|
61
|
+
declare function listDomainNamesAsync(fs: FileSystem, repoRoot: string, context: IoContext, homeDirectory?: string, environment?: Parameters<typeof readPoConfigSourcesAsync>[5]): Promise<string[]>;
|
|
62
62
|
/**
|
|
63
63
|
* Whether to include .claude/skills as shared fallbacks.
|
|
64
64
|
*
|
|
65
65
|
* Shared skills are included unless every selected domain opts out, so mixing a
|
|
66
66
|
* trimmed domain with an untrimmed one cannot strip the untrimmed one's skills.
|
|
67
67
|
*/
|
|
68
|
-
declare function resolveSharedSkillsAsync(fs: FileSystem, repoRoot: string, domainNames: string[], context: IoContext, homeDirectory?: string): Promise<boolean>;
|
|
68
|
+
declare function resolveSharedSkillsAsync(fs: FileSystem, repoRoot: string, domainNames: string[], context: IoContext, homeDirectory?: string, environment?: Parameters<typeof readPoConfigSourcesAsync>[5]): Promise<boolean>;
|
|
69
69
|
/** Resolves named domain plugins while preserving each subset filter. */
|
|
70
|
-
declare function resolvePluginEntriesAsync(fs: FileSystem, repoRoot: string, domainNames: string[], explicitDirectories: string[], context: IoContext, homeDirectory?: string): Promise<PluginEntry[]>;
|
|
70
|
+
declare function resolvePluginEntriesAsync(fs: FileSystem, repoRoot: string, domainNames: string[], explicitDirectories: string[], context: IoContext, homeDirectory?: string, environment?: Parameters<typeof readPoConfigSourcesAsync>[5]): Promise<PluginEntry[]>;
|
|
71
71
|
declare function resolvePluginDirectoriesAsync(fs: FileSystem, repoRoot: string, domainNames: string[], explicitDirectories: string[], context: IoContext, homeDirectory?: string): Promise<string[]>;
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region src/services/domains/completion.d.ts
|
|
@@ -80,4 +80,4 @@ declare function domainCompletionItems(domainNames: string[], query: string): Ar
|
|
|
80
80
|
}>;
|
|
81
81
|
//#endregion
|
|
82
82
|
export { findPluginManifestPathAsync as _, loadDomainsAsync as a, isRemotePluginSource as b, resolveSharedSkillsAsync as c, resolvePluginDirectories as d, resolvePluginEntries as f, defaultDomainsForPreset as g, PO_DOMAINS_ENV as h, listDomainNamesAsync as i, listDomainNames as l, DEFAULT_DOMAIN as m, domainCompletionPrefix as n, resolvePluginDirectoriesAsync as o, resolveSharedSkills as p, expandDomainNames as r, resolvePluginEntriesAsync as s, domainCompletionItems as t, loadDomains as u, findPluginManifestPath as v, pluginDirectoryForSource as x, MARKETPLACE_MANIFEST_RELATIVE_PATHS as y };
|
|
83
|
-
//# sourceMappingURL=completion-
|
|
83
|
+
//# sourceMappingURL=completion-DZhC4pxn.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion-
|
|
1
|
+
{"version":3,"file":"completion-DZhC4pxn.d.mts","names":[],"sources":["../src/services/pluginCatalog/parse.ts","../src/services/pluginCatalog/sync.ts","../src/services/pluginCatalog/index.ts","../src/services/domains/core.ts","../src/services/domains/sync.ts","../src/services/domains/index.ts","../src/services/domains/completion.ts"],"mappings":";;;;cAgBa;iBA6WG,yBAAyB,QAAQ,cAAc;iBAU/C,qBACd,QAAQ,eACP,UAAU,kBAAkB,QAAQ;EAAgB;;;;;;;;iBC/VvC,uBAAuB;;;KCpBlC,UAAU,WAAW;;iBAyDJ,4BACpB,IAAI,YACJ,oBACA,SAAS,UACR;;;cCgNU;cACA;;;;;;;;iBAiBG,wBACd,gBACA,aAAa,OAAO,YACpB;;;;;;;;iBCjSc,YAAY,kBAAkB,yBAAmD;;iBAMjF,gBAAgB,kBAAkB;;iBAKlC,oBAAoB,kBAAkB,uBAAuB;;iBAK7D,qBACd,kBACA,uBACA,+BACA,yBACC;;iBAkBa,yBACd,kBACA,uBACA,+BACA;;;KCnDG,YAAY,WAAW;;;;;;;;iBAkCN,iBACpB,IAAI,YACJ,kBACA,SAAS,WACT,wBACA,cAAc,kBAAkB,+BAC/B,QAAQ;iBAcW,qBACpB,IAAI,YACJ,kBACA,SAAS,WACT,wBACA,cAAc,kBAAkB,+BAC/B;;;;;;;iBAUmB,yBACpB,IAAI,YACJ,kBACA,uBACA,SAAS,WACT,wBACA,cAAc,kBAAkB,+BAC/B;;iBAKmB,0BACpB,IAAI,YACJ,kBACA,uBACA,+BACA,SAAS,WACT,wBACA,cAAc,kBAAkB,+BAC/B,QAAQ;iBAiBW,8BACpB,IAAI,YACJ,kBACA,uBACA,+BACA,SAAS,WACT,yBACC;;;;iBC5Ha,kBAAkB,UAAU,gBAAgB;iBAW5C,uBAAuB;iBAKvB,sBAAsB,uBAAuB,gBAAgB;EAAQ;EAAe"}
|
|
@@ -137,7 +137,7 @@ async function readWorkspaceDeclarations({ fs, repositoryRoot, context }) {
|
|
|
137
137
|
function resolved(options) {
|
|
138
138
|
return {
|
|
139
139
|
homeDirectory: options.homeDirectory ?? nodeHost.homeDirectory(),
|
|
140
|
-
environment: options.environment ??
|
|
140
|
+
environment: options.environment ?? {}
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
const readText = (fs, filePath, context) => filePath === void 0 ? Promise.resolve(void 0) : readTextIfExists(fs, filePath, context);
|
|
@@ -220,4 +220,4 @@ async function readPoConfigLayers(fs, repoRoot, context, options = {}) {
|
|
|
220
220
|
//#endregion
|
|
221
221
|
export { refreshGlobalSettingsCache as a, loadPoConfigLayers as c, readWorkspaceDeclarations as i, loadPoConfigLenient as l, readPoConfigLayers as n, loadPoConfig as o, readPoConfigLenient as r, loadPoConfigAsync as s, readPoConfig as t };
|
|
222
222
|
|
|
223
|
-
//# sourceMappingURL=config-
|
|
223
|
+
//# sourceMappingURL=config-CSH8Yppc.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-CSH8Yppc.mjs","names":["readText","parseYaml"],"sources":["../src/services/config/sync.ts","../src/services/config/index.ts"],"sourcesContent":["// sync: readTextSync supports exported Node-only synchronous config readers retained for phase 2.\nimport fs from 'node:fs';\n\nimport { nodeHost } from '@agimon-ai/po-core/platform';\n\nimport type { PoConfig, PoConfigLayers, LenientParseResult } from '../../types/config';\nimport {\n absentRepositoryLayer,\n composeConfigLayers,\n configFromText,\n defaultPoConfig,\n globalPoConfigPath,\n globalSettingsCachePath,\n globalSettingsMember,\n globalSettingsOwnerPath,\n layerFromText,\n lenientConfigFromText,\n mergeConfigLayers,\n mergeLenientLayers,\n repositoryConfigFor,\n withGlobalLayer,\n} from './core';\n\nfunction readTextSync(filePath: string | undefined): string | undefined {\n if (filePath === undefined) return undefined;\n try {\n return fs.readFileSync(filePath, 'utf8');\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') return undefined;\n throw error;\n }\n}\n\nasync function readText(filePath: string): Promise<string | undefined> {\n try {\n return await fs.promises.readFile(filePath, 'utf8');\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') return undefined;\n throw error;\n }\n}\n\n/** @deprecated Node-only sync shim; use readPoConfig. Removed in M2. Applies the global layer as readPoConfig does. */\nexport function loadPoConfig(\n repoRoot: string,\n homeDirectory = nodeHost.homeDirectory(),\n environment: NodeJS.ProcessEnv = process.env,\n): PoConfig {\n const globalPath = globalPoConfigPath(homeDirectory, environment);\n const repositoryPath = repositoryConfigFor(repoRoot, homeDirectory, environment);\n return mergeConfigLayers(\n configFromText(\n withGlobalLayer(\n readTextSync(globalSettingsCachePath(homeDirectory, environment)),\n readTextSync(globalPath),\n globalSettingsMember(environment, readTextSync(globalSettingsOwnerPath(homeDirectory, environment))),\n ),\n globalPath,\n ),\n repositoryPath === undefined ? defaultPoConfig() : configFromText(readTextSync(repositoryPath), repositoryPath),\n environment,\n );\n}\n\n/**\n * Loads the merged config, tolerating unknown keys in either file.\n *\n * Only `po sync` uses this. Everything that runs during a session keeps\n * `loadPoConfig`, because a key a running extension cannot understand is\n * better reported than silently ignored; a build that refuses to start over\n * the same key is not.\n *\n * @deprecated Node-only sync shim; use readPoConfigLenient. Removed in M2.\n */\nexport function loadPoConfigLenient(\n repoRoot: string,\n homeDirectory = nodeHost.homeDirectory(),\n environment: NodeJS.ProcessEnv = process.env,\n): LenientParseResult {\n const globalPath = globalPoConfigPath(homeDirectory, environment);\n const repositoryPath = repositoryConfigFor(repoRoot, homeDirectory, environment);\n return mergeLenientLayers(\n lenientConfigFromText(readTextSync(globalPath), globalPath),\n lenientConfigFromText(readTextSync(repositoryPath), repositoryPath ?? ''),\n environment,\n );\n}\n\n/** @deprecated Node-only shim over node:fs; use readPoConfig. Removed in M2. */\nexport async function loadPoConfigAsync(\n repoRoot: string,\n homeDirectory = nodeHost.homeDirectory(),\n environment: NodeJS.ProcessEnv = process.env,\n): Promise<PoConfig> {\n const globalPath = globalPoConfigPath(homeDirectory, environment);\n const repositoryPath = repositoryConfigFor(repoRoot, homeDirectory, environment);\n const globalConfig = configFromText(\n withGlobalLayer(\n await readText(globalSettingsCachePath(homeDirectory, environment)),\n await readText(globalPath),\n globalSettingsMember(environment, await readText(globalSettingsOwnerPath(homeDirectory, environment))),\n ),\n globalPath,\n );\n const repositoryConfig =\n repositoryPath === undefined ? defaultPoConfig() : configFromText(await readText(repositoryPath), repositoryPath);\n return mergeConfigLayers(globalConfig, repositoryConfig, environment);\n}\n\n/** @deprecated Node-only sync shim; use readPoConfigLayers. Removed in M2. */\nexport function loadPoConfigLayers(\n repoRoot: string | undefined,\n homeDirectory = nodeHost.homeDirectory(),\n environment: NodeJS.ProcessEnv = process.env,\n): PoConfigLayers {\n const globalPath = globalPoConfigPath(homeDirectory, environment);\n const repositoryPath = repoRoot === undefined ? undefined : repositoryConfigFor(repoRoot, homeDirectory, environment);\n const globalText = readTextSync(globalPath);\n const repositoryText = readTextSync(repositoryPath);\n const repositoryConfig =\n repositoryPath === undefined ? defaultPoConfig() : configFromText(repositoryText, repositoryPath);\n return composeConfigLayers(\n layerFromText(globalPath, globalText),\n repositoryPath === undefined ? absentRepositoryLayer() : layerFromText(repositoryPath, repositoryText),\n mergeConfigLayers(configFromText(globalText, globalPath), repositoryConfig, environment),\n );\n}\n","import path from 'node:path';\n\nimport { GLOBAL_SETTINGS_READ_OPERATION } from '@agimon-ai/po-core';\nimport { nodeHost, readTextIfExists, writeFileAtomic, type FileSystem } from '@agimon-ai/po-core/platform';\nimport { parse as parseYaml } from 'yaml';\n\nimport type { PoConfig, PoConfigLayers, LenientParseResult, WorkspaceDeclaration } from '../../types/config';\nimport { parsePoConfig } from '../configPolicy';\nimport {\n absentRepositoryLayer,\n composeConfigLayers,\n configFromText,\n defaultPoConfig,\n globalPoConfigPath,\n globalSettingsCachePath,\n globalSettingsMember,\n isGlobalSettingsBinding,\n globalSettingsOwnerPath,\n layerFromText,\n lenientConfigFromText,\n mergeConfigLayers,\n mergeLenientLayers,\n repositoryConfigFor,\n sameGlobalSettingsBinding,\n globalSettingsRecords,\n withGlobalLayer,\n type ConfigEnvironment,\n type GlobalSettingsRecord,\n} from './core';\n\ntype IoContext = Parameters<FileSystem['readTextFile']>[1];\n\nexport interface ReadWorkspaceDeclarationsOptions {\n fs: FileSystem;\n repositoryRoot: string;\n context: IoContext;\n}\n\nexport interface WorkspaceDeclarationsResult {\n declarations: WorkspaceDeclaration[];\n source: 'workspaces.yaml' | 'config.yaml' | undefined;\n notices: string[];\n}\n\nconst object = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' &&\n value !== null &&\n (Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null);\n\nfunction jsonValue(value: unknown, seen = new Set<object>()): boolean {\n if (value === null || typeof value === 'string' || typeof value === 'boolean') return true;\n if (typeof value === 'number') return Number.isFinite(value);\n if (typeof value !== 'object' || (!Array.isArray(value) && !object(value)) || seen.has(value)) return false;\n seen.add(value);\n const valid = (Array.isArray(value) ? value : Object.values(value)).every((entry) => jsonValue(entry, seen));\n seen.delete(value);\n return valid;\n}\n\n/** Repository-only declarations. An existing new document is authoritative, even when empty. */\nexport async function readWorkspaceDeclarations({\n fs,\n repositoryRoot,\n context,\n}: ReadWorkspaceDeclarationsOptions): Promise<WorkspaceDeclarationsResult> {\n const filePath = path.join(repositoryRoot, '.po', 'workspaces.yaml');\n const text = await readTextIfExists(fs, filePath, context);\n if (text === undefined) {\n const legacyPath = path.join(repositoryRoot, '.po', 'config.yaml');\n const legacy = await readTextIfExists(fs, legacyPath, context);\n const declarations = legacy === undefined ? undefined : configFromText(legacy, legacyPath).workspaces;\n return {\n declarations: declarations ?? [],\n source: declarations === undefined ? undefined : 'config.yaml',\n notices:\n declarations === undefined\n ? []\n : [`Move workspaces from ${legacyPath} to ${filePath}; config.yaml workspaces is deprecated.`],\n };\n }\n let document: unknown;\n try {\n document = parseYaml(text);\n } catch (error) {\n throw new Error(`Could not parse workspace declarations at ${filePath}`, { cause: error });\n }\n if (\n !object(document) ||\n Object.keys(document).some((key) => key !== 'workspaces') ||\n !Array.isArray(document.workspaces)\n )\n throw new Error(`Workspace declarations at ${filePath} must be an object containing a workspaces list`);\n const aliases = new Set<string>();\n const declarations = document.workspaces.map((entry: unknown, index): WorkspaceDeclaration => {\n const location = `workspaces[${String(index)}]`;\n if (\n !object(entry) ||\n Object.keys(entry).some((key) => !['name', 'path', 'alias', 'instructions', 'metadata'].includes(key))\n )\n throw new Error(\n `Workspace declarations at ${filePath} require ${location} to contain only name, path, alias, instructions, metadata`,\n );\n // Reuse the established declaration name/instructions parser, without changing the legacy config contract.\n const base = parsePoConfig(\n JSON.stringify({ workspaces: [{ name: entry.name, instructions: entry.instructions }] }),\n filePath,\n ).workspaces![0]!;\n if (base.name.length > 80 || !/^[A-Za-z0-9][A-Za-z0-9 ._-]*$/u.test(base.name) || base.name.includes('..'))\n throw new Error(\n `Workspace declarations at ${filePath} require ${location}.name to use letters, numbers, spaces, dots, dashes, or underscores (up to 80 characters)`,\n );\n if (\n entry.path !== undefined &&\n (typeof entry.path !== 'string' || entry.path.trim() === '' || entry.path.includes('\\0'))\n )\n throw new Error(`Workspace declarations at ${filePath} require ${location}.path to be a non-empty path`);\n if (entry.alias !== undefined && (typeof entry.alias !== 'string' || entry.alias.trim() === ''))\n throw new Error(`Workspace declarations at ${filePath} require ${location}.alias to be a non-empty string`);\n const alias = typeof entry.alias === 'string' ? entry.alias.trim() : undefined;\n if (alias !== undefined) {\n if (aliases.has(alias)) throw new Error(`Workspace declarations at ${filePath} have duplicate alias: ${alias}`);\n aliases.add(alias);\n }\n if (entry.metadata !== undefined && (!object(entry.metadata) || !jsonValue(entry.metadata)))\n throw new Error(`Workspace declarations at ${filePath} require ${location}.metadata to be a JSON object`);\n return {\n ...base,\n ...(entry.path === undefined ? {} : { path: entry.path as string }),\n ...(alias === undefined ? {} : { alias }),\n ...(entry.metadata === undefined ? {} : { metadata: entry.metadata as Record<string, unknown> }),\n };\n });\n // Retain the legacy parser's case-insensitive duplicate-name rule across the entire document.\n parsePoConfig(\n JSON.stringify({ workspaces: declarations.map(({ name, instructions }) => ({ name, instructions })) }),\n filePath,\n );\n return { declarations, source: 'workspaces.yaml', notices: [] };\n}\n\nexport interface ReadPoConfigOptions {\n /** Defaults to the host's home directory. */\n readonly homeDirectory?: string;\n /** Admitted environment for locating Po home and member overrides. Defaults to empty. */\n readonly environment?: ConfigEnvironment;\n}\n\nfunction resolved(options: ReadPoConfigOptions): { homeDirectory: string; environment: ConfigEnvironment } {\n return {\n homeDirectory: options.homeDirectory ?? nodeHost.homeDirectory(),\n environment: options.environment ?? {},\n };\n}\n\nconst readText = (fs: FileSystem, filePath: string | undefined, context: IoContext) =>\n filePath === undefined ? Promise.resolve(undefined) : readTextIfExists(fs, filePath, context);\n\n/**\n * Loads the merged global and repository config over a FileSystem. A missing\n * file contributes the defaults, so a host with neither file, such as a fresh\n * Durable Object filesystem, reads the same config as an empty Node home.\n * One person's cached global settings sit beneath the host file, portable keys only: the session starter's\n * when the environment names one, else the host owner's.\n */\nexport async function readPoConfig(\n fs: FileSystem,\n repoRoot: string,\n context: IoContext,\n options: ReadPoConfigOptions = {},\n): Promise<PoConfig> {\n const { homeDirectory, environment } = resolved(options);\n const globalPath = globalPoConfigPath(homeDirectory, environment);\n const repositoryPath = repositoryConfigFor(repoRoot, homeDirectory, environment);\n const hostText = await readText(fs, globalPath, context);\n const cacheText = await readText(fs, globalSettingsCachePath(homeDirectory, environment), context);\n const member = globalSettingsMember(\n environment,\n await readText(fs, globalSettingsOwnerPath(homeDirectory, environment), context),\n );\n const globalConfig = configFromText(withGlobalLayer(cacheText, hostText, member), globalPath);\n const repositoryConfig =\n repositoryPath === undefined\n ? defaultPoConfig()\n : configFromText(await readText(fs, repositoryPath, context), repositoryPath);\n return mergeConfigLayers(globalConfig, repositoryConfig, environment);\n}\n\n/**\n * Refreshes the global settings cache from what the host's federation answers: one entry for each person\n * whose grant it holds. `ok` replaces that person's copy and `removed` (they left the team, or took the\n * grant back) drops it, as does having no entry at all. Any other refusal keeps their last copy, and no\n * answer, such as no network, keeps the whole cache.\n */\nexport async function refreshGlobalSettingsCache(\n fs: FileSystem,\n accountCall: (operation: string, input: unknown) => Promise<unknown>,\n context: IoContext,\n options: Required<ReadPoConfigOptions>,\n): Promise<'written' | 'removed' | 'kept'> {\n const answers = await accountCall(GLOBAL_SETTINGS_READ_OPERATION, {}).catch(() => undefined);\n if (!Array.isArray(answers)) return 'kept';\n const cachePath = globalSettingsCachePath(options.homeDirectory, options.environment);\n const before = globalSettingsRecords(await readText(fs, cachePath, context));\n const after: GlobalSettingsRecord[] = [];\n for (const answer of answers as ({ ok?: unknown; yaml?: unknown; code?: unknown; binding?: unknown } | null)[]) {\n const binding = answer?.binding;\n // An answer that names nobody is about nobody, so it is never written.\n if (!answer || !isGlobalSettingsBinding(binding)) continue;\n const last = before.find((record) => sameGlobalSettingsBinding(record.binding, binding));\n if (answer.ok === true && typeof answer.yaml === 'string') after.push({ binding, yaml: answer.yaml });\n else if (answer.code !== 'removed' && last) after.push(last);\n }\n if (JSON.stringify(after) === JSON.stringify(before)) return 'kept';\n if (after.length) {\n await writeFileAtomic(fs, cachePath, JSON.stringify({ members: after }), context);\n return 'written';\n }\n const removed = await fs.remove(cachePath, { force: true }, context);\n if (!removed.ok) throw new Error(`Could not remove ${cachePath}`, { cause: removed.error });\n return 'removed';\n}\n\n/** As `readPoConfig`, tolerating unknown keys in either file and reporting them. */\nexport async function readPoConfigLenient(\n fs: FileSystem,\n repoRoot: string,\n context: IoContext,\n options: ReadPoConfigOptions = {},\n): Promise<LenientParseResult> {\n const { homeDirectory, environment } = resolved(options);\n const globalPath = globalPoConfigPath(homeDirectory, environment);\n const repositoryPath = repositoryConfigFor(repoRoot, homeDirectory, environment);\n const globalConfig = lenientConfigFromText(await readText(fs, globalPath, context), globalPath);\n const repositoryConfig =\n repositoryPath === undefined\n ? lenientConfigFromText(undefined, '')\n : lenientConfigFromText(await readText(fs, repositoryPath, context), repositoryPath);\n return mergeLenientLayers(globalConfig, repositoryConfig, environment);\n}\n\n/**\n * The two config files kept apart, with the merge alongside them.\n *\n * `repoRoot` is optional because the global file is complete on its own: a\n * settings surface with no repository in view still has settings to show.\n */\nexport async function readPoConfigLayers(\n fs: FileSystem,\n repoRoot: string | undefined,\n context: IoContext,\n options: ReadPoConfigOptions = {},\n): Promise<PoConfigLayers> {\n const { homeDirectory, environment } = resolved(options);\n const globalPath = globalPoConfigPath(homeDirectory, environment);\n const repositoryPath = repoRoot === undefined ? undefined : repositoryConfigFor(repoRoot, homeDirectory, environment);\n const globalText = await readText(fs, globalPath, context);\n const repositoryText = await readText(fs, repositoryPath, context);\n const globalLayer = layerFromText(globalPath, globalText);\n const repositoryLayer =\n repositoryPath === undefined ? absentRepositoryLayer() : layerFromText(repositoryPath, repositoryText);\n const repositoryConfig =\n repositoryPath === undefined ? defaultPoConfig() : configFromText(repositoryText, repositoryPath);\n const effective = mergeConfigLayers(configFromText(globalText, globalPath), repositoryConfig, environment);\n return composeConfigLayers(globalLayer, repositoryLayer, effective);\n}\n\nexport {\n globalPoConfigDirectory,\n globalPoConfigPath,\n globalSettingsCachePath,\n isGlobalPoConfigRoot,\n SESSION_MEMBER_ENVIRONMENT,\n repositoryPoConfigPath,\n resolvePlanningPlansDirectory,\n} from './core';\nexport type { ConfigEnvironment } from './core';\nexport { loadPoConfig, loadPoConfigAsync, loadPoConfigLayers, loadPoConfigLenient } from './sync';\n"],"mappings":";;;;;;;;AAuBA,SAAS,aAAa,UAAkD;CACtE,IAAI,aA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AG,cAAc;CACvF,OAAO,mBAAmB,cAAc,kBAAkB,WAAW;AACvE;;;;;;;AAQA,eAAsB,mBACpB,IACA,UACA,SACA,UAA+B,CAAC,GACP;CACzB,MAAM,EAAE,eAAe,gBAAgB,SAAS,OAAO;CACvD,MAAM,aAAa,mBAAmB,eAAe,WAAW;CAChE,MAAM,iBAAiB,aAAa,KAAA,IAAY,KAAA,IAAY,oBAAoB,UAAU,eAAe,WAAW;CACpH,MAAM,aAAa,MAAM,SAAS,IAAI,YAAY,OAAO;CACzD,MAAM,iBAAiB,MAAM,SAAS,IAAI,gBAAgB,OAAO;CACjE,MAAM,cAAc,cAAc,YAAY,UAAU;CACxD,MAAM,kBACJ,mBAAmB,KAAA,IAAY,sBAAsB,IAAI,cAAc,gBAAgB,cAAc;CACvG,MAAM,mBACJ,mBAAmB,KAAA,IAAY,gBAAgB,IAAI,eAAe,gBAAgB,cAAc;CAClG,MAAM,YAAY,kBAAkB,eAAe,YAAY,UAAU,GAAG,kBAAkB,WAAW;CACzG,OAAO,oBAAoB,aAAa,iBAAiB,SAAS;AACpE"}
|
|
@@ -140,7 +140,7 @@ async function readWorkspaceDeclarations({ fs, repositoryRoot, context }) {
|
|
|
140
140
|
function resolved(options) {
|
|
141
141
|
return {
|
|
142
142
|
homeDirectory: options.homeDirectory ?? _agimon_ai_po_core_platform.nodeHost.homeDirectory(),
|
|
143
|
-
environment: options.environment ??
|
|
143
|
+
environment: options.environment ?? {}
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
146
|
const readText = (fs, filePath, context) => filePath === void 0 ? Promise.resolve(void 0) : (0, _agimon_ai_po_core_platform.readTextIfExists)(fs, filePath, context);
|
|
@@ -276,4 +276,4 @@ Object.defineProperty(exports, "refreshGlobalSettingsCache", {
|
|
|
276
276
|
}
|
|
277
277
|
});
|
|
278
278
|
|
|
279
|
-
//# sourceMappingURL=config-
|
|
279
|
+
//# sourceMappingURL=config-DW_CHY1I.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-DW_CHY1I.cjs","names":["fs","readText","nodeHost","globalPoConfigPath","repositoryConfigFor","mergeConfigLayers","configFromText","withGlobalLayer","globalSettingsCachePath","globalSettingsMember","globalSettingsOwnerPath","defaultPoConfig","mergeLenientLayers","lenientConfigFromText","composeConfigLayers","layerFromText","absentRepositoryLayer","path","readTextIfExists","configFromText","parseYaml","parsePoConfig","nodeHost","globalPoConfigPath","repositoryConfigFor","globalSettingsCachePath","globalSettingsMember","globalSettingsOwnerPath","withGlobalLayer","defaultPoConfig","mergeConfigLayers","GLOBAL_SETTINGS_READ_OPERATION","globalSettingsRecords","isGlobalSettingsBinding","sameGlobalSettingsBinding","writeFileAtomic","lenientConfigFromText","mergeLenientLayers","layerFromText","absentRepositoryLayer","composeConfigLayers"],"sources":["../src/services/config/sync.ts","../src/services/config/index.ts"],"sourcesContent":["// sync: readTextSync supports exported Node-only synchronous config readers retained for phase 2.\nimport fs from 'node:fs';\n\nimport { nodeHost } from '@agimon-ai/po-core/platform';\n\nimport type { PoConfig, PoConfigLayers, LenientParseResult } from '../../types/config';\nimport {\n absentRepositoryLayer,\n composeConfigLayers,\n configFromText,\n defaultPoConfig,\n globalPoConfigPath,\n globalSettingsCachePath,\n globalSettingsMember,\n globalSettingsOwnerPath,\n layerFromText,\n lenientConfigFromText,\n mergeConfigLayers,\n mergeLenientLayers,\n repositoryConfigFor,\n withGlobalLayer,\n} from './core';\n\nfunction readTextSync(filePath: string | undefined): string | undefined {\n if (filePath === undefined) return undefined;\n try {\n return fs.readFileSync(filePath, 'utf8');\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') return undefined;\n throw error;\n }\n}\n\nasync function readText(filePath: string): Promise<string | undefined> {\n try {\n return await fs.promises.readFile(filePath, 'utf8');\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') return undefined;\n throw error;\n }\n}\n\n/** @deprecated Node-only sync shim; use readPoConfig. Removed in M2. Applies the global layer as readPoConfig does. */\nexport function loadPoConfig(\n repoRoot: string,\n homeDirectory = nodeHost.homeDirectory(),\n environment: NodeJS.ProcessEnv = process.env,\n): PoConfig {\n const globalPath = globalPoConfigPath(homeDirectory, environment);\n const repositoryPath = repositoryConfigFor(repoRoot, homeDirectory, environment);\n return mergeConfigLayers(\n configFromText(\n withGlobalLayer(\n readTextSync(globalSettingsCachePath(homeDirectory, environment)),\n readTextSync(globalPath),\n globalSettingsMember(environment, readTextSync(globalSettingsOwnerPath(homeDirectory, environment))),\n ),\n globalPath,\n ),\n repositoryPath === undefined ? defaultPoConfig() : configFromText(readTextSync(repositoryPath), repositoryPath),\n environment,\n );\n}\n\n/**\n * Loads the merged config, tolerating unknown keys in either file.\n *\n * Only `po sync` uses this. Everything that runs during a session keeps\n * `loadPoConfig`, because a key a running extension cannot understand is\n * better reported than silently ignored; a build that refuses to start over\n * the same key is not.\n *\n * @deprecated Node-only sync shim; use readPoConfigLenient. Removed in M2.\n */\nexport function loadPoConfigLenient(\n repoRoot: string,\n homeDirectory = nodeHost.homeDirectory(),\n environment: NodeJS.ProcessEnv = process.env,\n): LenientParseResult {\n const globalPath = globalPoConfigPath(homeDirectory, environment);\n const repositoryPath = repositoryConfigFor(repoRoot, homeDirectory, environment);\n return mergeLenientLayers(\n lenientConfigFromText(readTextSync(globalPath), globalPath),\n lenientConfigFromText(readTextSync(repositoryPath), repositoryPath ?? ''),\n environment,\n );\n}\n\n/** @deprecated Node-only shim over node:fs; use readPoConfig. Removed in M2. */\nexport async function loadPoConfigAsync(\n repoRoot: string,\n homeDirectory = nodeHost.homeDirectory(),\n environment: NodeJS.ProcessEnv = process.env,\n): Promise<PoConfig> {\n const globalPath = globalPoConfigPath(homeDirectory, environment);\n const repositoryPath = repositoryConfigFor(repoRoot, homeDirectory, environment);\n const globalConfig = configFromText(\n withGlobalLayer(\n await readText(globalSettingsCachePath(homeDirectory, environment)),\n await readText(globalPath),\n globalSettingsMember(environment, await readText(globalSettingsOwnerPath(homeDirectory, environment))),\n ),\n globalPath,\n );\n const repositoryConfig =\n repositoryPath === undefined ? defaultPoConfig() : configFromText(await readText(repositoryPath), repositoryPath);\n return mergeConfigLayers(globalConfig, repositoryConfig, environment);\n}\n\n/** @deprecated Node-only sync shim; use readPoConfigLayers. Removed in M2. */\nexport function loadPoConfigLayers(\n repoRoot: string | undefined,\n homeDirectory = nodeHost.homeDirectory(),\n environment: NodeJS.ProcessEnv = process.env,\n): PoConfigLayers {\n const globalPath = globalPoConfigPath(homeDirectory, environment);\n const repositoryPath = repoRoot === undefined ? undefined : repositoryConfigFor(repoRoot, homeDirectory, environment);\n const globalText = readTextSync(globalPath);\n const repositoryText = readTextSync(repositoryPath);\n const repositoryConfig =\n repositoryPath === undefined ? defaultPoConfig() : configFromText(repositoryText, repositoryPath);\n return composeConfigLayers(\n layerFromText(globalPath, globalText),\n repositoryPath === undefined ? absentRepositoryLayer() : layerFromText(repositoryPath, repositoryText),\n mergeConfigLayers(configFromText(globalText, globalPath), repositoryConfig, environment),\n );\n}\n","import path from 'node:path';\n\nimport { GLOBAL_SETTINGS_READ_OPERATION } from '@agimon-ai/po-core';\nimport { nodeHost, readTextIfExists, writeFileAtomic, type FileSystem } from '@agimon-ai/po-core/platform';\nimport { parse as parseYaml } from 'yaml';\n\nimport type { PoConfig, PoConfigLayers, LenientParseResult, WorkspaceDeclaration } from '../../types/config';\nimport { parsePoConfig } from '../configPolicy';\nimport {\n absentRepositoryLayer,\n composeConfigLayers,\n configFromText,\n defaultPoConfig,\n globalPoConfigPath,\n globalSettingsCachePath,\n globalSettingsMember,\n isGlobalSettingsBinding,\n globalSettingsOwnerPath,\n layerFromText,\n lenientConfigFromText,\n mergeConfigLayers,\n mergeLenientLayers,\n repositoryConfigFor,\n sameGlobalSettingsBinding,\n globalSettingsRecords,\n withGlobalLayer,\n type ConfigEnvironment,\n type GlobalSettingsRecord,\n} from './core';\n\ntype IoContext = Parameters<FileSystem['readTextFile']>[1];\n\nexport interface ReadWorkspaceDeclarationsOptions {\n fs: FileSystem;\n repositoryRoot: string;\n context: IoContext;\n}\n\nexport interface WorkspaceDeclarationsResult {\n declarations: WorkspaceDeclaration[];\n source: 'workspaces.yaml' | 'config.yaml' | undefined;\n notices: string[];\n}\n\nconst object = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' &&\n value !== null &&\n (Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null);\n\nfunction jsonValue(value: unknown, seen = new Set<object>()): boolean {\n if (value === null || typeof value === 'string' || typeof value === 'boolean') return true;\n if (typeof value === 'number') return Number.isFinite(value);\n if (typeof value !== 'object' || (!Array.isArray(value) && !object(value)) || seen.has(value)) return false;\n seen.add(value);\n const valid = (Array.isArray(value) ? value : Object.values(value)).every((entry) => jsonValue(entry, seen));\n seen.delete(value);\n return valid;\n}\n\n/** Repository-only declarations. An existing new document is authoritative, even when empty. */\nexport async function readWorkspaceDeclarations({\n fs,\n repositoryRoot,\n context,\n}: ReadWorkspaceDeclarationsOptions): Promise<WorkspaceDeclarationsResult> {\n const filePath = path.join(repositoryRoot, '.po', 'workspaces.yaml');\n const text = await readTextIfExists(fs, filePath, context);\n if (text === undefined) {\n const legacyPath = path.join(repositoryRoot, '.po', 'config.yaml');\n const legacy = await readTextIfExists(fs, legacyPath, context);\n const declarations = legacy === undefined ? undefined : configFromText(legacy, legacyPath).workspaces;\n return {\n declarations: declarations ?? [],\n source: declarations === undefined ? undefined : 'config.yaml',\n notices:\n declarations === undefined\n ? []\n : [`Move workspaces from ${legacyPath} to ${filePath}; config.yaml workspaces is deprecated.`],\n };\n }\n let document: unknown;\n try {\n document = parseYaml(text);\n } catch (error) {\n throw new Error(`Could not parse workspace declarations at ${filePath}`, { cause: error });\n }\n if (\n !object(document) ||\n Object.keys(document).some((key) => key !== 'workspaces') ||\n !Array.isArray(document.workspaces)\n )\n throw new Error(`Workspace declarations at ${filePath} must be an object containing a workspaces list`);\n const aliases = new Set<string>();\n const declarations = document.workspaces.map((entry: unknown, index): WorkspaceDeclaration => {\n const location = `workspaces[${String(index)}]`;\n if (\n !object(entry) ||\n Object.keys(entry).some((key) => !['name', 'path', 'alias', 'instructions', 'metadata'].includes(key))\n )\n throw new Error(\n `Workspace declarations at ${filePath} require ${location} to contain only name, path, alias, instructions, metadata`,\n );\n // Reuse the established declaration name/instructions parser, without changing the legacy config contract.\n const base = parsePoConfig(\n JSON.stringify({ workspaces: [{ name: entry.name, instructions: entry.instructions }] }),\n filePath,\n ).workspaces![0]!;\n if (base.name.length > 80 || !/^[A-Za-z0-9][A-Za-z0-9 ._-]*$/u.test(base.name) || base.name.includes('..'))\n throw new Error(\n `Workspace declarations at ${filePath} require ${location}.name to use letters, numbers, spaces, dots, dashes, or underscores (up to 80 characters)`,\n );\n if (\n entry.path !== undefined &&\n (typeof entry.path !== 'string' || entry.path.trim() === '' || entry.path.includes('\\0'))\n )\n throw new Error(`Workspace declarations at ${filePath} require ${location}.path to be a non-empty path`);\n if (entry.alias !== undefined && (typeof entry.alias !== 'string' || entry.alias.trim() === ''))\n throw new Error(`Workspace declarations at ${filePath} require ${location}.alias to be a non-empty string`);\n const alias = typeof entry.alias === 'string' ? entry.alias.trim() : undefined;\n if (alias !== undefined) {\n if (aliases.has(alias)) throw new Error(`Workspace declarations at ${filePath} have duplicate alias: ${alias}`);\n aliases.add(alias);\n }\n if (entry.metadata !== undefined && (!object(entry.metadata) || !jsonValue(entry.metadata)))\n throw new Error(`Workspace declarations at ${filePath} require ${location}.metadata to be a JSON object`);\n return {\n ...base,\n ...(entry.path === undefined ? {} : { path: entry.path as string }),\n ...(alias === undefined ? {} : { alias }),\n ...(entry.metadata === undefined ? {} : { metadata: entry.metadata as Record<string, unknown> }),\n };\n });\n // Retain the legacy parser's case-insensitive duplicate-name rule across the entire document.\n parsePoConfig(\n JSON.stringify({ workspaces: declarations.map(({ name, instructions }) => ({ name, instructions })) }),\n filePath,\n );\n return { declarations, source: 'workspaces.yaml', notices: [] };\n}\n\nexport interface ReadPoConfigOptions {\n /** Defaults to the host's home directory. */\n readonly homeDirectory?: string;\n /** Admitted environment for locating Po home and member overrides. Defaults to empty. */\n readonly environment?: ConfigEnvironment;\n}\n\nfunction resolved(options: ReadPoConfigOptions): { homeDirectory: string; environment: ConfigEnvironment } {\n return {\n homeDirectory: options.homeDirectory ?? nodeHost.homeDirectory(),\n environment: options.environment ?? {},\n };\n}\n\nconst readText = (fs: FileSystem, filePath: string | undefined, context: IoContext) =>\n filePath === undefined ? Promise.resolve(undefined) : readTextIfExists(fs, filePath, context);\n\n/**\n * Loads the merged global and repository config over a FileSystem. A missing\n * file contributes the defaults, so a host with neither file, such as a fresh\n * Durable Object filesystem, reads the same config as an empty Node home.\n * One person's cached global settings sit beneath the host file, portable keys only: the session starter's\n * when the environment names one, else the host owner's.\n */\nexport async function readPoConfig(\n fs: FileSystem,\n repoRoot: string,\n context: IoContext,\n options: ReadPoConfigOptions = {},\n): Promise<PoConfig> {\n const { homeDirectory, environment } = resolved(options);\n const globalPath = globalPoConfigPath(homeDirectory, environment);\n const repositoryPath = repositoryConfigFor(repoRoot, homeDirectory, environment);\n const hostText = await readText(fs, globalPath, context);\n const cacheText = await readText(fs, globalSettingsCachePath(homeDirectory, environment), context);\n const member = globalSettingsMember(\n environment,\n await readText(fs, globalSettingsOwnerPath(homeDirectory, environment), context),\n );\n const globalConfig = configFromText(withGlobalLayer(cacheText, hostText, member), globalPath);\n const repositoryConfig =\n repositoryPath === undefined\n ? defaultPoConfig()\n : configFromText(await readText(fs, repositoryPath, context), repositoryPath);\n return mergeConfigLayers(globalConfig, repositoryConfig, environment);\n}\n\n/**\n * Refreshes the global settings cache from what the host's federation answers: one entry for each person\n * whose grant it holds. `ok` replaces that person's copy and `removed` (they left the team, or took the\n * grant back) drops it, as does having no entry at all. Any other refusal keeps their last copy, and no\n * answer, such as no network, keeps the whole cache.\n */\nexport async function refreshGlobalSettingsCache(\n fs: FileSystem,\n accountCall: (operation: string, input: unknown) => Promise<unknown>,\n context: IoContext,\n options: Required<ReadPoConfigOptions>,\n): Promise<'written' | 'removed' | 'kept'> {\n const answers = await accountCall(GLOBAL_SETTINGS_READ_OPERATION, {}).catch(() => undefined);\n if (!Array.isArray(answers)) return 'kept';\n const cachePath = globalSettingsCachePath(options.homeDirectory, options.environment);\n const before = globalSettingsRecords(await readText(fs, cachePath, context));\n const after: GlobalSettingsRecord[] = [];\n for (const answer of answers as ({ ok?: unknown; yaml?: unknown; code?: unknown; binding?: unknown } | null)[]) {\n const binding = answer?.binding;\n // An answer that names nobody is about nobody, so it is never written.\n if (!answer || !isGlobalSettingsBinding(binding)) continue;\n const last = before.find((record) => sameGlobalSettingsBinding(record.binding, binding));\n if (answer.ok === true && typeof answer.yaml === 'string') after.push({ binding, yaml: answer.yaml });\n else if (answer.code !== 'removed' && last) after.push(last);\n }\n if (JSON.stringify(after) === JSON.stringify(before)) return 'kept';\n if (after.length) {\n await writeFileAtomic(fs, cachePath, JSON.stringify({ members: after }), context);\n return 'written';\n }\n const removed = await fs.remove(cachePath, { force: true }, context);\n if (!removed.ok) throw new Error(`Could not remove ${cachePath}`, { cause: removed.error });\n return 'removed';\n}\n\n/** As `readPoConfig`, tolerating unknown keys in either file and reporting them. */\nexport async function readPoConfigLenient(\n fs: FileSystem,\n repoRoot: string,\n context: IoContext,\n options: ReadPoConfigOptions = {},\n): Promise<LenientParseResult> {\n const { homeDirectory, environment } = resolved(options);\n const globalPath = globalPoConfigPath(homeDirectory, environment);\n const repositoryPath = repositoryConfigFor(repoRoot, homeDirectory, environment);\n const globalConfig = lenientConfigFromText(await readText(fs, globalPath, context), globalPath);\n const repositoryConfig =\n repositoryPath === undefined\n ? lenientConfigFromText(undefined, '')\n : lenientConfigFromText(await readText(fs, repositoryPath, context), repositoryPath);\n return mergeLenientLayers(globalConfig, repositoryConfig, environment);\n}\n\n/**\n * The two config files kept apart, with the merge alongside them.\n *\n * `repoRoot` is optional because the global file is complete on its own: a\n * settings surface with no repository in view still has settings to show.\n */\nexport async function readPoConfigLayers(\n fs: FileSystem,\n repoRoot: string | undefined,\n context: IoContext,\n options: ReadPoConfigOptions = {},\n): Promise<PoConfigLayers> {\n const { homeDirectory, environment } = resolved(options);\n const globalPath = globalPoConfigPath(homeDirectory, environment);\n const repositoryPath = repoRoot === undefined ? undefined : repositoryConfigFor(repoRoot, homeDirectory, environment);\n const globalText = await readText(fs, globalPath, context);\n const repositoryText = await readText(fs, repositoryPath, context);\n const globalLayer = layerFromText(globalPath, globalText);\n const repositoryLayer =\n repositoryPath === undefined ? absentRepositoryLayer() : layerFromText(repositoryPath, repositoryText);\n const repositoryConfig =\n repositoryPath === undefined ? defaultPoConfig() : configFromText(repositoryText, repositoryPath);\n const effective = mergeConfigLayers(configFromText(globalText, globalPath), repositoryConfig, environment);\n return composeConfigLayers(globalLayer, repositoryLayer, effective);\n}\n\nexport {\n globalPoConfigDirectory,\n globalPoConfigPath,\n globalSettingsCachePath,\n isGlobalPoConfigRoot,\n SESSION_MEMBER_ENVIRONMENT,\n repositoryPoConfigPath,\n resolvePlanningPlansDirectory,\n} from './core';\nexport type { ConfigEnvironment } from './core';\nexport { loadPoConfig, loadPoConfigAsync, loadPoConfigLayers, loadPoConfigLenient } from './sync';\n"],"mappings":";;;;;;;;;;;AAuBA,SAAS,aAAa,UAAkD;CACtE,IAAI,aAAa,KAAA,GAAW,OAAO,KAAA;CACnC,IAAI;EACF,OAAOA,QAAAA,QAAG,aAAa,UAAU,MAAM;CACzC,SAAS,OAAO;EACd,IAAK,MAAgC,SAAS,UAAU,OAAO,KAAA;EAC/D,MAAM;CACR;AACF;AAEA,eAAeC,WAAS,UAA+C;CACrE,IAAI;EACF,OAAO,MAAMD,QAAAA,QAAG,SAAS,SAAS,UAAU,MAAM;CACpD,SAAS,OAAO;EACd,IAAK,MAAgC,SAAS,UAAU,OAAO,KAAA;EAC/D,MAAM;CACR;AACF;;AAGA,SAAgB,aACd,UACA,gBAAgBE,4BAAAA,SAAS,cAAc,GACvC,cAAiC,QAAQ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CAChE,MAAM,iBAAiBC,aAAAA,oBAAoB,UAAU,eAAe,WAAW;CAC/E,MAAM,eAAeY,aAAAA,sBAAsB,MAAM,SAAS,IAAI,YAAY,OAAO,GAAG,UAAU;CAC9F,MAAM,mBACJ,mBAAmB,KAAA,IACfA,aAAAA,sBAAsB,KAAA,GAAW,EAAE,IACnCA,aAAAA,sBAAsB,MAAM,SAAS,IAAI,gBAAgB,OAAO,GAAG,cAAc;CACvF,OAAOC,aAAAA,mBAAmB,cAAc,kBAAkB,WAAW;AACvE;;;;;;;AAQA,eAAsB,mBACpB,IACA,UACA,SACA,UAA+B,CAAC,GACP;CACzB,MAAM,EAAE,eAAe,gBAAgB,SAAS,OAAO;CACvD,MAAM,aAAad,aAAAA,mBAAmB,eAAe,WAAW;CAChE,MAAM,iBAAiB,aAAa,KAAA,IAAY,KAAA,IAAYC,aAAAA,oBAAoB,UAAU,eAAe,WAAW;CACpH,MAAM,aAAa,MAAM,SAAS,IAAI,YAAY,OAAO;CACzD,MAAM,iBAAiB,MAAM,SAAS,IAAI,gBAAgB,OAAO;CACjE,MAAM,cAAcc,aAAAA,cAAc,YAAY,UAAU;CACxD,MAAM,kBACJ,mBAAmB,KAAA,IAAYC,aAAAA,sBAAsB,IAAID,aAAAA,cAAc,gBAAgB,cAAc;CACvG,MAAM,mBACJ,mBAAmB,KAAA,IAAYT,aAAAA,gBAAgB,IAAIV,aAAAA,eAAe,gBAAgB,cAAc;CAClG,MAAM,YAAYW,aAAAA,kBAAkBX,aAAAA,eAAe,YAAY,UAAU,GAAG,kBAAkB,WAAW;CACzG,OAAOqB,aAAAA,oBAAoB,aAAa,iBAAiB,SAAS;AACpE"}
|
package/dist/config.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_configPolicy = require("./configPolicy-qHa-YSgy.cjs");
|
|
3
3
|
const require_core = require("./core-DE0lnpbG.cjs");
|
|
4
|
-
const require_config = require("./config-
|
|
4
|
+
const require_config = require("./config-DW_CHY1I.cjs");
|
|
5
5
|
let _agimon_ai_po_core = require("@agimon-ai/po-core");
|
|
6
6
|
exports.PO_PLANNING_THINKING_LEVELS = require_configPolicy.PO_PLANNING_THINKING_LEVELS;
|
|
7
7
|
exports.PO_VOICE_ENGINES = require_configPolicy.PO_VOICE_ENGINES;
|
|
@@ -21,10 +21,6 @@ Object.defineProperty(exports, "isPortableConfigKey", {
|
|
|
21
21
|
return _agimon_ai_po_core.isPortableConfigKey;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
exports.loadPoConfig = require_config.loadPoConfig;
|
|
25
|
-
exports.loadPoConfigAsync = require_config.loadPoConfigAsync;
|
|
26
|
-
exports.loadPoConfigLayers = require_config.loadPoConfigLayers;
|
|
27
|
-
exports.loadPoConfigLenient = require_config.loadPoConfigLenient;
|
|
28
24
|
exports.mergeGlobalConfigLayer = require_configPolicy.mergeGlobalConfigLayer;
|
|
29
25
|
exports.mergePoConfigs = require_configPolicy.mergePoConfigs;
|
|
30
26
|
Object.defineProperty(exports, "nonPortableConfigKeys", {
|
package/dist/config.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { C as PoConfigLayers, S as PoConfigLayer, a as ConfigDiagnostic, m as LenientParseResult, o as ConfigValueOrigin, p as LenientParseOptions } from "./config-C-1WcZmy.mjs";
|
|
2
2
|
import { a as globalSettingsCachePath, i as globalPoConfigPath, n as SESSION_MEMBER_ENVIRONMENT, o as repositoryPoConfigPath, r as globalPoConfigDirectory, s as resolvePlanningPlansDirectory } from "./core-CtN0Hxs4.mjs";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { a as readPoConfigLayers, c as refreshGlobalSettingsCache, i as readPoConfig, n as ReadWorkspaceDeclarationsOptions, o as readPoConfigLenient, r as WorkspaceDeclarationsResult, s as readWorkspaceDeclarations, t as ReadPoConfigOptions } from "./index-C6h9we_P.mjs";
|
|
4
|
+
import { _ as parsePoConfig, a as PO_VOICE_MODES, c as configRootKeys, d as mergeGlobalConfigLayer, f as mergePoConfigs, g as parsePlanningModeConfig, h as parseAutocompactModeConfig, i as PO_VOICE_LIVE_VOICES, l as configScopeOf, m as nonPortableConfigText, n as PO_PLANNING_THINKING_LEVELS, o as PO_VOICE_TTS_ENGINES, p as nonPortableConfigKeys, r as PO_VOICE_ENGINES, s as configLeafKeys, t as ConfigKeyScope, u as isPortableConfigKey, v as resolveVoiceConfig, y as valueAtKeyPath } from "./index-CGShZTV0.mjs";
|
|
5
|
+
export { type ConfigDiagnostic, type ConfigKeyScope, type ConfigValueOrigin, type LenientParseOptions, type LenientParseResult, PO_PLANNING_THINKING_LEVELS, PO_VOICE_ENGINES, PO_VOICE_LIVE_VOICES, PO_VOICE_MODES, PO_VOICE_TTS_ENGINES, type PoConfigLayer, type PoConfigLayers, type ReadPoConfigOptions, type ReadWorkspaceDeclarationsOptions, SESSION_MEMBER_ENVIRONMENT, type WorkspaceDeclarationsResult, configLeafKeys, configRootKeys, configScopeOf, globalPoConfigDirectory, globalPoConfigPath, globalSettingsCachePath, isPortableConfigKey, mergeGlobalConfigLayer, mergePoConfigs, nonPortableConfigKeys, nonPortableConfigText, parseAutocompactModeConfig, parsePlanningModeConfig, parsePoConfig, readPoConfig, readPoConfigLayers, readPoConfigLenient, readWorkspaceDeclarations, refreshGlobalSettingsCache, repositoryPoConfigPath, resolvePlanningPlansDirectory, resolveVoiceConfig, valueAtKeyPath };
|
package/dist/config.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { _ as resolveVoiceConfig, a as PO_VOICE_TTS_ENGINES, c as configScopeOf, d as mergePoConfigs, f as nonPortableConfigKeys, g as parsePoConfig, h as parsePlanningModeConfig, i as PO_VOICE_MODES, l as isPortableConfigKey, m as parseAutocompactModeConfig, n as PO_VOICE_ENGINES, o as configLeafKeys, p as nonPortableConfigText, r as PO_VOICE_LIVE_VOICES, s as configRootKeys, t as PO_PLANNING_THINKING_LEVELS, u as mergeGlobalConfigLayer, v as valueAtKeyPath } from "./configPolicy-Cr8glfeR.mjs";
|
|
2
2
|
import { b as resolvePlanningPlansDirectory, c as globalSettingsCachePath, o as globalPoConfigDirectory, s as globalPoConfigPath, t as SESSION_MEMBER_ENVIRONMENT, y as repositoryPoConfigPath } from "./core-CVyMjata.mjs";
|
|
3
|
-
import { a as refreshGlobalSettingsCache,
|
|
4
|
-
export { PO_PLANNING_THINKING_LEVELS, PO_VOICE_ENGINES, PO_VOICE_LIVE_VOICES, PO_VOICE_MODES, PO_VOICE_TTS_ENGINES, SESSION_MEMBER_ENVIRONMENT, configLeafKeys, configRootKeys, configScopeOf, globalPoConfigDirectory, globalPoConfigPath, globalSettingsCachePath, isPortableConfigKey,
|
|
3
|
+
import { a as refreshGlobalSettingsCache, i as readWorkspaceDeclarations, n as readPoConfigLayers, r as readPoConfigLenient, t as readPoConfig } from "./config-CSH8Yppc.mjs";
|
|
4
|
+
export { PO_PLANNING_THINKING_LEVELS, PO_VOICE_ENGINES, PO_VOICE_LIVE_VOICES, PO_VOICE_MODES, PO_VOICE_TTS_ENGINES, SESSION_MEMBER_ENVIRONMENT, configLeafKeys, configRootKeys, configScopeOf, globalPoConfigDirectory, globalPoConfigPath, globalSettingsCachePath, isPortableConfigKey, mergeGlobalConfigLayer, mergePoConfigs, nonPortableConfigKeys, nonPortableConfigText, parseAutocompactModeConfig, parsePlanningModeConfig, parsePoConfig, readPoConfig, readPoConfigLayers, readPoConfigLenient, readWorkspaceDeclarations, refreshGlobalSettingsCache, repositoryPoConfigPath, resolvePlanningPlansDirectory, resolveVoiceConfig, valueAtKeyPath };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as globalPoConfigDirectory } from "./core-CVyMjata.mjs";
|
|
2
|
-
import "./config-
|
|
2
|
+
import "./config-CSH8Yppc.mjs";
|
|
3
3
|
import { n as readPoConfigSources, t as readPoConfigSourcesAsync } from "./layeredConfig-C4ke9Vyb.mjs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { getOrThrow, nodeHost } from "@agimon-ai/po-core/platform";
|
|
@@ -896,12 +896,12 @@ async function isDirectory(fs, filePath, context) {
|
|
|
896
896
|
* definitions. Configured roots accumulate, with exact marketplace manifests
|
|
897
897
|
* deduplicated in discovery order. Explicit entries override discovered IDs.
|
|
898
898
|
*/
|
|
899
|
-
async function loadDomainsAsync(fs, repoRoot, context, homeDirectory = nodeHost.homeDirectory()) {
|
|
900
|
-
const summary = summarizeDomainSources(await readPoConfigSourcesAsync(fs, DOMAINS_FILE, repoRoot, context, homeDirectory));
|
|
899
|
+
async function loadDomainsAsync(fs, repoRoot, context, homeDirectory = nodeHost.homeDirectory(), environment) {
|
|
900
|
+
const summary = summarizeDomainSources(await readPoConfigSourcesAsync(fs, DOMAINS_FILE, repoRoot, context, homeDirectory, environment));
|
|
901
901
|
return completeDomainManifest(summary, await loadPluginCatalogAsync(fs, summary.catalogSources, repoRoot, homeDirectory, context));
|
|
902
902
|
}
|
|
903
|
-
async function listDomainNamesAsync(fs, repoRoot, context, homeDirectory) {
|
|
904
|
-
return domainNamesOf(await loadDomainsAsync(fs, repoRoot, context, homeDirectory));
|
|
903
|
+
async function listDomainNamesAsync(fs, repoRoot, context, homeDirectory, environment) {
|
|
904
|
+
return domainNamesOf(await loadDomainsAsync(fs, repoRoot, context, homeDirectory, environment));
|
|
905
905
|
}
|
|
906
906
|
/**
|
|
907
907
|
* Whether to include .claude/skills as shared fallbacks.
|
|
@@ -909,12 +909,12 @@ async function listDomainNamesAsync(fs, repoRoot, context, homeDirectory) {
|
|
|
909
909
|
* Shared skills are included unless every selected domain opts out, so mixing a
|
|
910
910
|
* trimmed domain with an untrimmed one cannot strip the untrimmed one's skills.
|
|
911
911
|
*/
|
|
912
|
-
async function resolveSharedSkillsAsync(fs, repoRoot, domainNames, context, homeDirectory) {
|
|
913
|
-
return sharedSkillsFor(await loadDomainsAsync(fs, repoRoot, context, homeDirectory), domainNames);
|
|
912
|
+
async function resolveSharedSkillsAsync(fs, repoRoot, domainNames, context, homeDirectory, environment) {
|
|
913
|
+
return sharedSkillsFor(await loadDomainsAsync(fs, repoRoot, context, homeDirectory, environment), domainNames);
|
|
914
914
|
}
|
|
915
915
|
/** Resolves named domain plugins while preserving each subset filter. */
|
|
916
|
-
async function resolvePluginEntriesAsync(fs, repoRoot, domainNames, explicitDirectories, context, homeDirectory = nodeHost.homeDirectory()) {
|
|
917
|
-
const manifest = await loadDomainsAsync(fs, repoRoot, context, homeDirectory);
|
|
916
|
+
async function resolvePluginEntriesAsync(fs, repoRoot, domainNames, explicitDirectories, context, homeDirectory = nodeHost.homeDirectory(), environment) {
|
|
917
|
+
const manifest = await loadDomainsAsync(fs, repoRoot, context, homeDirectory, environment);
|
|
918
918
|
const entries = [];
|
|
919
919
|
const seen = /* @__PURE__ */ new Set();
|
|
920
920
|
for (const step of pluginEntrySteps(manifest, domainNames, explicitDirectories, homeDirectory)) {
|
|
@@ -933,4 +933,4 @@ async function resolvePluginDirectoriesAsync(fs, repoRoot, domainNames, explicit
|
|
|
933
933
|
//#endregion
|
|
934
934
|
export { findPluginManifestPathAsync as _, resolveSharedSkillsAsync as a, isRemotePluginSource as b, resolvePluginDirectories as c, DEFAULT_DOMAIN as d, PO_DOMAINS_ENV as f, expandDomainNames as g, domainCompletionPrefix as h, resolvePluginEntriesAsync as i, resolvePluginEntries as l, domainCompletionItems as m, loadDomainsAsync as n, listDomainNames as o, defaultDomainsForPreset as p, resolvePluginDirectoriesAsync as r, loadDomains as s, listDomainNamesAsync as t, resolveSharedSkills as u, findPluginManifestPath as v, pluginDirectoryForSource as x, MARKETPLACE_MANIFEST_RELATIVE_PATHS as y };
|
|
935
935
|
|
|
936
|
-
//# sourceMappingURL=domains-
|
|
936
|
+
//# sourceMappingURL=domains-DjAzI7KX.mjs.map
|