{"version":3,"file":"core-C91QYmOA.cjs","names":["nodeHost","poHomeDirectory","path","parseYaml","mergeGlobalConfigLayer","parsePoConfig","mergePoConfigs","createHash","configLeafKeys","configScopeOf","valueAtKeyPath"],"sources":["../src/services/config/core.ts"],"sourcesContent":["import { createHash } from 'node:crypto';\nimport path from 'node:path';\n\nimport { poHomeDirectory } from '@agimon-ai/po-core/piSettings';\nimport { nodeHost } from '@agimon-ai/po-core/platform';\nimport { parse as parseYaml } from 'yaml';\n\nimport type {\n  ConfigDiagnostic,\n  ConfigValueOrigin,\n  PoConfig,\n  PoConfigLayer,\n  PoConfigLayers,\n  LenientParseResult,\n} from '../../types/config';\nimport {\n  configLeafKeys,\n  configScopeOf,\n  mergeGlobalConfigLayer,\n  mergePoConfigs,\n  parsePoConfig,\n  valueAtKeyPath,\n} from '../configPolicy';\n\n/**\n * Paths and pure parse/merge steps for the two Po config files. The readers\n * in `read.ts` (async, over a FileSystem) and `sync.ts` (Node-only shims) only\n * fetch file text and hand it here, so both produce identical results.\n */\n\nconst PO_DIR = '.po';\nconst CONFIG_FILE = 'config.yaml';\nconst PLANS_DIR = 'plans';\n\nexport type ConfigEnvironment = Readonly<Record<string, string | undefined>>;\n\n/** Runtime callers pass admitted environment; omission retains the legacy host lookup. */\nexport function globalPoConfigDirectory(\n  homeDirectory = nodeHost.homeDirectory(),\n  environment?: ConfigEnvironment,\n): string {\n  return poHomeDirectory(homeDirectory, environment);\n}\n\nexport function globalPoConfigPath(homeDirectory = nodeHost.homeDirectory(), environment?: ConfigEnvironment): string {\n  return path.join(globalPoConfigDirectory(homeDirectory, environment), CONFIG_FILE);\n}\n\n/** The global settings of each person who granted them to this host, as the issuer last answered. Written by the host only. */\nexport function globalSettingsCachePath(homeDirectory: string, environment?: ConfigEnvironment): string {\n  return path.join(globalPoConfigDirectory(homeDirectory, environment), 'global-settings.yaml');\n}\n\nexport function globalSettingsOwnerPath(homeDirectory: string, environment?: ConfigEnvironment): string {\n  return path.join(globalPoConfigDirectory(homeDirectory, environment), 'web', 'hub-trust.json');\n}\n\n/** The host's owner, who is the member of every session that names no starter. */\nexport function globalSettingsOwner(text: string | undefined): GlobalSettingsBinding | undefined {\n  try {\n    const state = JSON.parse(text ?? 'null') as {\n      owner?: { issuer?: unknown; subject?: unknown };\n      ownerNetworkId?: unknown;\n      issuers?: { issuer: string }[];\n    } | null;\n    const owner = state?.owner;\n    if (\n      !owner ||\n      typeof owner.issuer !== 'string' ||\n      !owner.issuer ||\n      typeof owner.subject !== 'string' ||\n      !owner.subject ||\n      typeof state?.ownerNetworkId !== 'string' ||\n      !state.ownerNetworkId ||\n      !state.issuers?.some((pin) => pin.issuer === owner.issuer)\n    )\n      return undefined;\n    return { issuer: owner.issuer, subject: owner.subject, org: state.ownerNetworkId };\n  } catch {\n    return undefined;\n  }\n}\n\nfunction parsedYaml(text: string): { ok: true; value: unknown } | { ok: false } {\n  try {\n    return { ok: true, value: parseYaml(text) };\n  } catch {\n    return { ok: false };\n  }\n}\n\nexport interface GlobalSettingsBinding {\n  issuer: string;\n  org: string;\n  subject: string;\n}\n\n/** One person's settings in the cache. */\nexport interface GlobalSettingsRecord {\n  binding: GlobalSettingsBinding;\n  yaml: string;\n}\n\n/** The session variable naming the person who started a session. The host sets it, from a verified caller only. */\nexport const SESSION_MEMBER_ENVIRONMENT = 'PO_SESSION_MEMBER';\n\nexport function isGlobalSettingsBinding(value: unknown): value is GlobalSettingsBinding {\n  const binding = value as Partial<GlobalSettingsBinding> | null;\n  return (\n    typeof binding === 'object' &&\n    binding !== null &&\n    typeof binding.issuer === 'string' &&\n    !!binding.issuer &&\n    typeof binding.org === 'string' &&\n    !!binding.org &&\n    typeof binding.subject === 'string' &&\n    !!binding.subject\n  );\n}\n\nexport function sameGlobalSettingsBinding(left: GlobalSettingsBinding, right: GlobalSettingsBinding): boolean {\n  return left.issuer === right.issuer && left.org === right.org && left.subject === right.subject;\n}\n\n/**\n * Whose global settings a read applies: the session's starter when the environment names one, else the\n * host's owner. A starter that cannot be read applies nobody's, never the owner's.\n */\nexport function globalSettingsMember(\n  environment: ConfigEnvironment | undefined,\n  ownerText: string | undefined,\n): GlobalSettingsBinding | undefined {\n  const starter = environment?.[SESSION_MEMBER_ENVIRONMENT];\n  if (starter === undefined) return globalSettingsOwner(ownerText);\n  const parsed = parsedYaml(starter);\n  if (!parsed.ok || !isGlobalSettingsBinding(parsed.value)) return undefined;\n  const { issuer, org, subject } = parsed.value;\n  return { issuer, org, subject };\n}\n\n/** The well-formed records of a cache file. An unreadable file holds none. */\nexport function globalSettingsRecords(cacheText: string | undefined): GlobalSettingsRecord[] {\n  const cached = parsedYaml(cacheText ?? '');\n  if (!cached.ok || !cached.value || typeof cached.value !== 'object') return [];\n  const { members } = cached.value as { members?: unknown };\n  // A cache written before teammates could grant holds the owner's record alone.\n  return (Array.isArray(members) ? members : [cached.value]).filter(\n    (record: Partial<GlobalSettingsRecord> | null): record is GlobalSettingsRecord =>\n      !!record && isGlobalSettingsBinding(record.binding) && typeof record.yaml === 'string',\n  );\n}\n\n/** One cached member's `person` profile: its string fields only, as that member saved them. */\nexport interface GlobalSettingsPerson {\n  binding: GlobalSettingsBinding;\n  person: Readonly<Record<string, string>>;\n}\n\n/** The `person` section of each cached member's settings. A member without one, or an unreadable document, has none. */\nexport function globalSettingsPeople(cacheText: string | undefined): GlobalSettingsPerson[] {\n  return globalSettingsRecords(cacheText).flatMap(({ binding, yaml }) => {\n    const parsed = parsedYaml(yaml);\n    const person = parsed.ok ? (parsed.value as { person?: unknown } | null)?.person : undefined;\n    if (typeof person !== 'object' || person === null || Array.isArray(person)) return [];\n    const fields = Object.entries(person).filter((entry): entry is [string, string] => typeof entry[1] === 'string');\n    return [{ binding, person: Object.fromEntries(fields) }];\n  });\n}\n\n/**\n * The host file's text with one person's cached global layer beneath it. A missing or unreadable cache, or a\n * host file that does not parse, leaves the host text untouched so its own errors still surface.\n */\nexport function withGlobalLayer(\n  cacheText: string | undefined,\n  hostText: string | undefined,\n  binding?: GlobalSettingsBinding,\n): string | undefined {\n  if (cacheText === undefined || !binding) return hostText;\n  const host = parsedYaml(hostText ?? '');\n  const record = globalSettingsRecords(cacheText).find((entry) => sameGlobalSettingsBinding(entry.binding, binding));\n  if (!host.ok || !record) return hostText;\n  const settings = parsedYaml(record.yaml);\n  if (!settings.ok) return hostText;\n  // JSON is YAML, so the merged document parses like any host file.\n  return JSON.stringify(mergeGlobalConfigLayer(settings.value, host.value));\n}\n\nexport function resolvePlanningPlansDirectory(\n  configured: string | undefined,\n  repoRoot: string,\n  homeDirectory = nodeHost.homeDirectory(),\n): string {\n  // Under Po's home, so Po writes nothing into ~/.pi.\n  if (!configured) return path.join(globalPoConfigDirectory(homeDirectory), PLANS_DIR);\n  if (configured === '~') return homeDirectory;\n  if (configured.startsWith('~/')) return path.resolve(homeDirectory, configured.slice(2));\n  if (configured.startsWith('~')) {\n    throw new Error(\"Po planning plansDirectory supports only '~' or '~/' home aliases\");\n  }\n  return path.isAbsolute(configured) ? path.normalize(configured) : path.resolve(repoRoot, configured);\n}\n\nexport function repositoryPoConfigPath(repoRoot: string): string {\n  return path.join(repoRoot, PO_DIR, CONFIG_FILE);\n}\n\n/**\n * True when a repository's `.po` folder is Po's home itself, as it is for a\n * session rooted at home. That folder is already the global layer; reading it\n * again as the repository layer would apply global-only keys at repository scope.\n */\nexport function isGlobalPoConfigRoot(\n  repoRoot: string,\n  homeDirectory = nodeHost.homeDirectory(),\n  environment?: ConfigEnvironment,\n): boolean {\n  return path.resolve(repoRoot, PO_DIR) === path.resolve(globalPoConfigDirectory(homeDirectory, environment));\n}\n\nexport function repositoryConfigFor(\n  repoRoot: string,\n  homeDirectory: string,\n  environment?: ConfigEnvironment,\n): string | undefined {\n  return isGlobalPoConfigRoot(repoRoot, homeDirectory, environment) ? undefined : repositoryPoConfigPath(repoRoot);\n}\n\n/** The config a missing file stands for. */\nexport function defaultPoConfig(): PoConfig {\n  return { projectTrust: 'ask' };\n}\n\n/** Parses one file's text strictly; `undefined` text means the file is absent. */\nexport function configFromText(text: string | undefined, filePath: string): PoConfig {\n  return text === undefined ? defaultPoConfig() : parsePoConfig(text, filePath);\n}\n\n/** Parses one file's text leniently; `undefined` text means the file is absent. */\nexport function lenientConfigFromText(text: string | undefined, filePath: string): LenientParseResult {\n  return text === undefined\n    ? { config: defaultPoConfig(), diagnostics: [] }\n    : parsePoConfig(text, filePath, { lenient: true });\n}\n\n/** Process-local distribution defaults never grant native authority or modify user files. */\nexport function distributionDefaults(config: PoConfig, environment: ConfigEnvironment): PoConfig {\n  if (environment.PO_DISTRIBUTION !== 'desktop') return config;\n  return { ...config, computerUse: { ...config.computerUse, enabled: config.computerUse?.enabled ?? true } };\n}\n\n/** Merges the global and repository files, then applies distribution defaults. */\nexport function mergeConfigLayers(\n  globalConfig: PoConfig,\n  repositoryConfig: PoConfig,\n  environment: ConfigEnvironment,\n): PoConfig {\n  return distributionDefaults(mergePoConfigs(globalConfig, repositoryConfig), environment);\n}\n\n/** Merges lenient parses; the merge itself stays strict about cross-file scope. */\nexport function mergeLenientLayers(\n  globalConfig: LenientParseResult,\n  repositoryConfig: LenientParseResult,\n  environment: ConfigEnvironment,\n): LenientParseResult {\n  const diagnostics: ConfigDiagnostic[] = [...globalConfig.diagnostics, ...repositoryConfig.diagnostics];\n  // mergePoConfigs stays strict on purpose: its errors are cross-file scope\n  // violations on known keys, which is a different fault from an unknown key.\n  return { config: mergeConfigLayers(globalConfig.config, repositoryConfig.config, environment), diagnostics };\n}\n\n/**\n * One config file as a layer: what it is, what it sets, and the bytes it held.\n * A file that does not exist is a layer that sets nothing, which is a normal\n * state rather than an error.\n */\nexport function layerFromText(filePath: string, text: string | undefined): PoConfigLayer {\n  if (text === undefined) return { filePath, exists: false, hash: '', keys: [] };\n  // The raw document, not the parsed config: this is the one read that has to\n  // distinguish a key the file set from a key the parser defaulted.\n  const document = (parseYaml(text) ?? {}) as unknown;\n  return {\n    filePath,\n    exists: true,\n    hash: createHash('sha256').update(text, 'utf8').digest('hex'),\n    keys: configLeafKeys(document),\n  };\n}\n\nexport function absentRepositoryLayer(): PoConfigLayer {\n  return { filePath: '', exists: false, hash: '', keys: [] };\n}\n\n/**\n * The two config files kept apart, with the merge alongside them.\n *\n * The origin answer respects the merge's own per-field rules rather than simply\n * preferring the repository: `editor` is read from the global side whatever the\n * repository says, and `projectTrust` from the repository side whatever the\n * global one says. Reporting a file as the source of a value the merge discards\n * is the exact confusion this exists to remove.\n */\nexport function composeConfigLayers(\n  globalLayer: PoConfigLayer,\n  repositoryLayer: PoConfigLayer,\n  effective: PoConfig,\n): PoConfigLayers {\n  const sets = (layer: PoConfigLayer, keyPath: readonly string[]): boolean => {\n    const dotted = keyPath.join('.');\n    return layer.keys.some((key) => key === dotted || key.startsWith(`${dotted}.`));\n  };\n  return {\n    globalFile: globalLayer,\n    repositoryFile: repositoryLayer,\n    effective,\n    originOf(keyPath: readonly string[]): ConfigValueOrigin {\n      const scope = configScopeOf(keyPath);\n      if (scope !== 'host' && sets(repositoryLayer, keyPath)) return 'repository';\n      if (scope !== 'repository' && sets(globalLayer, keyPath)) return 'host';\n      return 'default';\n    },\n    valueAt: (keyPath: readonly string[]) => valueAtKeyPath(effective, keyPath),\n  };\n}\n"],"mappings":";;;;;;;;;;;;;;AA8BA,MAAM,SAAS;AACf,MAAM,cAAc;AACpB,MAAM,YAAY;;AAKlB,SAAgB,wBACd,gBAAgBA,4BAAAA,SAAS,cAAc,GACvC,aACQ;CACR,QAAA,GAAOC,8BAAAA,gBAAAA,CAAgB,eAAe,WAAW;AACnD;AAEA,SAAgB,mBAAmB,gBAAgBD,4BAAAA,SAAS,cAAc,GAAG,aAAyC;CACpH,OAAOE,UAAAA,QAAK,KAAK,wBAAwB,eAAe,WAAW,GAAG,WAAW;AACnF;;AAGA,SAAgB,wBAAwB,eAAuB,aAAyC;CACtG,OAAOA,UAAAA,QAAK,KAAK,wBAAwB,eAAe,WAAW,GAAG,sBAAsB;AAC9F;AAEA,SAAgB,wBAAwB,eA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