{"version":3,"file":"sessionConfig-BYa9F5o9.mjs","names":["deepFreeze"],"sources":["../src/services/poConfigService/index.ts","../src/services/sessionConfig/index.ts"],"sourcesContent":["import { type Context, Service } from '@deepseek-ai/cordis';\n\nimport {\n  PO_CONFIG_SERVICE,\n  type DeepReadonly,\n  type PoConfig,\n  type PoConfigContext,\n  type PoConfigLoader,\n  type IPoConfigService,\n} from '../../types/config';\n\nfunction deepFreeze<TValue>(value: TValue): DeepReadonly<TValue> {\n  if (typeof value !== 'object' || value === null || Object.isFrozen(value)) {\n    return value as DeepReadonly<TValue>;\n  }\n  for (const child of Object.values(value)) deepFreeze(child);\n  return Object.freeze(value) as DeepReadonly<TValue>;\n}\n\n/**\n * Po configuration published on the shared cordis Context.\n *\n * Every extension resolves the same instance by name, so configuration stays\n * one read per session instead of one per consumer, and the registration is\n * removed with the fiber that created it. The loader is injected so this stays\n * free of filesystem access.\n */\nexport class PoConfigService extends Service implements IPoConfigService {\n  readonly generation: string;\n  private snapshot: PoConfigContext;\n\n  constructor(\n    ctx: Context,\n    snapshot: PoConfigContext,\n    private readonly loadConfig: PoConfigLoader,\n    generation = `po-config:${crypto.randomUUID()}`,\n  ) {\n    super(ctx, PO_CONFIG_SERVICE);\n    this.snapshot = deepFreeze(snapshot) as PoConfigContext;\n    this.generation = generation;\n  }\n\n  getSnapshot(): PoConfigContext {\n    return this.snapshot;\n  }\n\n  replaceSnapshot(context: PoConfigContext): PoConfigContext {\n    this.snapshot = deepFreeze(context) as PoConfigContext;\n    return this.snapshot;\n  }\n\n  load(repoRoot: string, homeDirectory?: string): PoConfig {\n    return this.loadConfig(repoRoot, homeDirectory);\n  }\n}\n","import { PO_CONFIG_ENTRY_TYPE, PO_CONFIG_TRANSITION_ENTRY_TYPE } from '@agimon-ai/po-core/contextProjection';\nimport type { PoHeadlessExecutionContext } from '@agimon-ai/po-core/headless';\nimport { BACKGROUND_CONTEXT, type FileSystem } from '@agimon-ai/po-core/platform';\nimport type { Context } from '@deepseek-ai/cordis';\nimport type { ExtensionAPI, ExtensionContext } from '@earendil-works/pi-coding-agent';\n\nimport type {\n  PoConfigSelection as ConfigSelection,\n  DeepReadonly,\n  PoConfigContext,\n  PoConfigPendingSelection,\n  PoConfigTransitionRecord,\n  PoConfigTransitionStrategy,\n  HarnessState,\n  IPoConfigService,\n} from '../../types/config';\nimport { PO_CONFIG_SERVICE } from '../../types/config';\nimport { loadPoConfig, readPoConfig } from '../config';\nimport { getHarnessState, getSessionHarnessState, loadHarnessStateAsync } from '../harnessStore';\nimport { PoConfigService } from '../poConfigService';\n\ntype IoContext = Parameters<FileSystem['readTextFile']>[1];\n\nexport { PO_CONFIG_ENTRY_TYPE, PO_CONFIG_TRANSITION_ENTRY_TYPE } from '@agimon-ai/po-core/contextProjection';\n\nexport type PoConfigSelection = ConfigSelection;\n\ntype PoConfigTransitionEntry = PoConfigTransitionRecord;\n\nfunction isSelection(value: unknown): value is PoConfigSelection {\n  if (typeof value !== 'object' || value === null) return false;\n  const selection = value as Partial<PoConfigSelection>;\n  return (\n    selection.version === 1 &&\n    typeof selection.preset === 'string' &&\n    Array.isArray(selection.domains) &&\n    selection.domains.every((domain) => typeof domain === 'string') &&\n    (selection.profile === undefined || typeof selection.profile === 'string') &&\n    (selection.compositionFingerprint === undefined || typeof selection.compositionFingerprint === 'string')\n  );\n}\n\nfunction branchSelection(\n  entries: readonly { type: string; customType?: string; data?: unknown }[],\n): PoConfigSelection | undefined {\n  for (let index = entries.length - 1; index >= 0; index -= 1) {\n    const entry = entries[index];\n    if (entry?.type === 'custom' && entry.customType === PO_CONFIG_ENTRY_TYPE && isSelection(entry.data)) {\n      return entry.data;\n    }\n  }\n  return undefined;\n}\n\nfunction isTransitionStrategy(value: unknown): value is PoConfigTransitionStrategy {\n  return value === 'pi-reload' || value === 'process-relaunch';\n}\n\nfunction isTransition(value: unknown): value is PoConfigTransitionEntry {\n  if (typeof value !== 'object' || value === null) return false;\n  const transition = value as Partial<PoConfigTransitionEntry>;\n  return (\n    transition.version === 1 &&\n    typeof transition.operationId === 'string' &&\n    isSelection(transition.active) &&\n    isSelection(transition.target) &&\n    isTransitionStrategy(transition.strategy) &&\n    (transition.phase === 'pending' ||\n      transition.phase === 'applied' ||\n      transition.phase === 'aborted' ||\n      transition.phase === 'superseded')\n  );\n}\n\nfunction branchTransition(\n  entries: readonly { type: string; customType?: string; data?: unknown }[],\n): PoConfigTransitionEntry | undefined {\n  for (let index = entries.length - 1; index >= 0; index -= 1) {\n    const entry = entries[index];\n    if (entry?.type === 'custom' && entry.customType === PO_CONFIG_TRANSITION_ENTRY_TYPE && isTransition(entry.data)) {\n      return entry.data;\n    }\n  }\n  return undefined;\n}\n\nfunction sameSelection(left: PoConfigSelection, state: HarnessState): boolean {\n  return (\n    left.preset === state.preset &&\n    left.profile === state.profile &&\n    (left.compositionFingerprint === undefined || left.compositionFingerprint === state.compositionFingerprint) &&\n    left.domains.length === state.domains.length &&\n    left.domains.every((domain, index) => domain === state.domains[index])\n  );\n}\n\nfunction isActiveTransitionTarget(target: PoConfigSelection, state: HarnessState): boolean {\n  return (\n    target.compositionFingerprint !== undefined &&\n    target.compositionFingerprint === state.compositionFingerprint &&\n    sameSelection(target, state)\n  );\n}\n\nfunction pendingFromTransition(transition: PoConfigTransitionEntry): PoConfigPendingSelection | undefined {\n  if (transition.phase !== 'pending') return undefined;\n  return { ...transition, phase: 'pending' };\n}\n\nfunction pendingFromLegacySelection(\n  selection: PoConfigSelection,\n  bootstrap: HarnessState,\n): PoConfigPendingSelection | undefined {\n  if (sameSelection(selection, bootstrap)) return undefined;\n  const active: PoConfigSelection = {\n    version: 1,\n    preset: bootstrap.preset,\n    domains: [...bootstrap.domains],\n    profile: bootstrap.profile,\n    compositionFingerprint: bootstrap.compositionFingerprint,\n  };\n  return {\n    version: 1,\n    operationId: 'legacy-config-selection',\n    active,\n    target: selection,\n    strategy: 'process-relaunch',\n    phase: 'pending',\n  };\n}\n\nfunction deepFreeze<TValue>(value: TValue): DeepReadonly<TValue> {\n  if (typeof value !== 'object' || value === null || Object.isFrozen(value)) {\n    return value as DeepReadonly<TValue>;\n  }\n  for (const child of Object.values(value)) deepFreeze(child);\n  return Object.freeze(value) as DeepReadonly<TValue>;\n}\n\nexport function readPoConfigSelection(ctx: Pick<ExtensionContext, 'sessionManager'>): PoConfigSelection | undefined {\n  return branchSelection(ctx.sessionManager.getBranch());\n}\n\nfunction resolveContextState(ctx: Pick<ExtensionContext, 'sessionManager'>): {\n  harness: HarnessState;\n  pendingSelection: PoConfigPendingSelection | undefined;\n  requiresRelaunch: boolean;\n  root: string | undefined;\n} {\n  const bootstrap = getSessionHarnessState(ctx.sessionManager.getSessionId());\n  return resolveBranchState(ctx.sessionManager.getBranch(), bootstrap);\n}\n\nfunction resolveBranchState(\n  entries: readonly { type: string; customType?: string; data?: unknown }[],\n  bootstrap: HarnessState,\n): {\n  harness: HarnessState;\n  pendingSelection: PoConfigPendingSelection | undefined;\n  requiresRelaunch: boolean;\n  root: string | undefined;\n} {\n  const selection = branchSelection(entries);\n  const transition = branchTransition(entries);\n  const transitionPending = transition ? pendingFromTransition(transition) : undefined;\n  const pendingSelection = transition\n    ? transitionPending\n    : selection\n      ? pendingFromLegacySelection(selection, bootstrap)\n      : undefined;\n  return {\n    harness: bootstrap,\n    pendingSelection,\n    requiresRelaunch:\n      pendingSelection !== undefined &&\n      (transitionPending === undefined || !isActiveTransitionTarget(pendingSelection.target, bootstrap)),\n    root: bootstrap.root,\n  };\n}\n\nexport function createPoConfigContext(ctx: Pick<ExtensionContext, 'cwd' | 'sessionManager'>): PoConfigContext {\n  const { harness, pendingSelection, requiresRelaunch, root } = resolveContextState(ctx);\n  return deepFreeze({ settings: loadPoConfig(root ?? ctx.cwd), harness, pendingSelection, requiresRelaunch });\n}\n\n/** Reads the settings through the host's FileSystem, so it runs wherever the session does. */\nexport async function createPoConfigContextAsync(\n  ctx: Pick<ExtensionContext, 'cwd' | 'sessionManager'>,\n  fs: FileSystem,\n  context: IoContext = BACKGROUND_CONTEXT,\n  options: { environment?: Readonly<Record<string, string | undefined>>; homeDirectory?: string } = {},\n): Promise<PoConfigContext> {\n  const { harness, pendingSelection, requiresRelaunch, root } = resolveContextState(ctx);\n  const settings = await readPoConfig(fs, root ?? ctx.cwd, context, options);\n  return deepFreeze({ settings, harness, pendingSelection, requiresRelaunch });\n}\n\n/** Initializes from this native session's branch, awaiting durable transition acknowledgement. */\nexport async function createNativePoConfigContext(\n  execution: PoHeadlessExecutionContext,\n  fs: FileSystem,\n  context: IoContext = BACKGROUND_CONTEXT,\n): Promise<PoConfigContext> {\n  // Through the host FileSystem and this session's admitted environment, so it runs on the edge too.\n  const bootstrap = (await loadHarnessStateAsync(fs, execution.environment ?? {}, context)).state;\n  const branch: { type: string; customType: string; data: unknown }[] = [];\n  for (const customType of [PO_CONFIG_ENTRY_TYPE, PO_CONFIG_TRANSITION_ENTRY_TYPE]) {\n    // Bump schemaId whenever these pure acceptance semantics change.\n    const accepts = customType === PO_CONFIG_ENTRY_TYPE ? isSelection : isTransition;\n    const snapshot = await execution.session.customSnapshot?.(customType, {\n      schemaId: `${customType}:valid:v1`,\n      accepts,\n    });\n    if (snapshot?.available && snapshot.entry && accepts(snapshot.entry.data)) {\n      branch.push({ type: 'custom', customType, data: snapshot.entry.data });\n    }\n  }\n  const transition = branchTransition(branch);\n  if (transition?.phase === 'pending' && isActiveTransitionTarget(transition.target, bootstrap)) {\n    const data = { ...transition, phase: 'applied' as const };\n    await execution.session.appendCustomEntry(PO_CONFIG_TRANSITION_ENTRY_TYPE, data);\n    branch.push({ type: 'custom', customType: PO_CONFIG_TRANSITION_ENTRY_TYPE, data });\n  }\n  const { harness, pendingSelection, requiresRelaunch, root } = resolveBranchState(branch, bootstrap);\n  const settings = await readPoConfig(fs, root ?? execution.cwd, context, { environment: execution.environment });\n  return deepFreeze({ settings, harness, pendingSelection, requiresRelaunch });\n}\n\nexport function appendPoConfigSelection(pi: Pick<ExtensionAPI, 'appendEntry'>, selection: PoConfigSelection): void {\n  pi.appendEntry(PO_CONFIG_ENTRY_TYPE, selection);\n}\n\n/** Journals the live selection, defaulting to whatever the harness store holds. */\nexport function persistHarnessSelection(\n  pi: Pick<ExtensionAPI, 'appendEntry'>,\n  state: {\n    readonly preset: string;\n    readonly domains: readonly string[];\n    readonly profile?: string;\n    readonly compositionFingerprint?: string;\n  } = getHarnessState(),\n): void {\n  appendPoConfigSelection(pi, {\n    version: 1,\n    preset: state.preset,\n    domains: state.domains,\n    profile: state.profile,\n    compositionFingerprint: state.compositionFingerprint,\n  });\n}\n\nexport function appendPoConfigTransition(\n  pi: Pick<ExtensionAPI, 'appendEntry'>,\n  transition: PoConfigTransitionRecord,\n): void {\n  pi.appendEntry(PO_CONFIG_TRANSITION_ENTRY_TYPE, transition);\n}\n\nexport function supersedePoConfigTransition(\n  pi: Pick<ExtensionAPI, 'appendEntry'>,\n  transition: PoConfigPendingSelection,\n): void {\n  pi.appendEntry(PO_CONFIG_TRANSITION_ENTRY_TYPE, { ...transition, phase: 'superseded' });\n}\n\n/** Acknowledges the latest pending transition from a fresh session that owns its exact target composition. */\nexport function acknowledgePoConfigTransition(\n  pi: Pick<ExtensionAPI, 'appendEntry'>,\n  ctx: Pick<ExtensionContext, 'sessionManager'>,\n  harness: HarnessState,\n): boolean {\n  const transition = branchTransition(ctx.sessionManager.getBranch());\n  if (!transition || transition.phase !== 'pending' || !isActiveTransitionTarget(transition.target, harness)) {\n    return false;\n  }\n  appendPoConfigTransition(pi, { ...transition, phase: 'applied' });\n  return true;\n}\n\nexport function readPoConfigPendingSelection(\n  ctx: Pick<ExtensionContext, 'sessionManager'>,\n): PoConfigPendingSelection | undefined {\n  const bootstrap = getSessionHarnessState(ctx.sessionManager.getSessionId());\n  const transition = branchTransition(ctx.sessionManager.getBranch());\n  const transitionPending = transition ? pendingFromTransition(transition) : undefined;\n  if (transition) return transitionPending;\n  const selection = branchSelection(ctx.sessionManager.getBranch());\n  return selection ? pendingFromLegacySelection(selection, bootstrap) : undefined;\n}\n\nexport function providePoConfigContext(\n  ctx: Context,\n  context: PoConfigContext,\n  generation = `po-config:${crypto.randomUUID()}`,\n): IPoConfigService {\n  return new PoConfigService(ctx, deepFreeze(context) as PoConfigContext, loadPoConfig, generation);\n}\n\n/** Returns the binding identity used to fence in-flight transitions. */\nexport function readPoConfigContextGeneration(ctx: Context): string | undefined {\n  return readPoConfigService(ctx)?.generation;\n}\n\n/** Precomputes an immutable context before a transaction reaches publication. */\nexport function freezePoConfigContext(context: PoConfigContext): PoConfigContext {\n  return deepFreeze(context);\n}\n\n/** Replaces a live binding with a deeply frozen context after publication. */\nexport function replacePoConfigContext(ctx: Context, context: PoConfigContext): PoConfigContext {\n  const next = deepFreeze(context);\n  return requirePoConfigService(ctx).replaceSnapshot(next as PoConfigContext);\n}\n\nexport function readPoConfigService(ctx: Context): IPoConfigService | undefined {\n  return ctx.get(PO_CONFIG_SERVICE) as IPoConfigService | undefined;\n}\n\nexport function requirePoConfigService(ctx: Context): IPoConfigService {\n  const service = readPoConfigService(ctx);\n  if (!service) throw new Error('Po config service is unavailable. Load @agimon-ai/po-config/extensions/server.');\n  return service;\n}\n\nexport function requirePoConfigContext(ctx: Context): PoConfigContext {\n  return requirePoConfigService(ctx).getSnapshot();\n}\n"],"mappings":";;;;;;;AAWA,SAASA,aAAmB,OAAqC;CAC/D,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,OAAO,SAAS,KAAK,GACtE,OAAO;CAET,KAAK,MAAM,SAAS,OAAO,OAAO,KAAK,GAAG,aAAW,KAAK;CAC1D,OAAO,OAAO,OAAO,KAAK;AAC5B;;;;;;;;;AAUA,IAAa,kBAAb,cAAqC,QAAoC;CAOpD;CANnB;CACA;CAEA,YACE,KACA,UACA,YACA,aAAa,aAAa,OAAO,WAAW,KAC5C;EACA,MAAM,KAAK,iBAAiB;EAHX,KAAA,aAAA;EAIjB,KAAK,WAAWA,aAAW,QAAQ;EACnC,KAAK,aAAa;CACpB;CAEA,cAA+B;EAC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