{"version":3,"file":"capabilityCeiling-0YDyGeCI.cjs","names":["Buffer"],"sources":["../src/schemas/team/capabilityCeiling.ts"],"sourcesContent":["/**\n * Capability-ceiling values, intersection, and the child-process codec.\n *\n * Live extension contributions enter through Team's `doom/subagent-policy`\n * Cordis service. Only the resolved ceiling crosses a process boundary, through\n * the versioned environment value encoded here.\n */\n\nimport { Buffer } from 'node:buffer';\n\nimport type { SubagentPolicy } from '../../schemas/subagentPolicy';\nimport { SUBAGENT_CAPABILITY_CEILING_ENV } from '../../types/environment';\n\nexport const SUBAGENT_CAPABILITY_CEILING_VERSION = 2 as const;\nexport { SUBAGENT_CAPABILITY_CEILING_ENV };\n\nconst MAX_TEXT_BYTES = 256;\nconst MAX_TOOL_NAME_BYTES = 128;\nconst MAX_ALLOWED_TOOLS = 256;\nconst MAX_ALLOWED_EXTERNAL_PROFILES = 32;\nconst MAX_EXTERNAL_PROFILE_NAME_BYTES = 128;\nconst EXTERNAL_PROFILE_PATTERN = /^[A-Za-z0-9][A-Za-z0-9/_.:-]+$/u;\nconst TOOL_NAME_PATTERN = /^[A-Za-z0-9_.:-]+$/u;\nconst LAST_C0_CONTROL_CODE = 0x1f;\nconst DELETE_CODE = 0x7f;\n\n/**\n * Ceiling text crosses a process boundary and is rendered in the TUI, so control\n * characters are rejected. Scanning code points avoids a control-character\n * regex, which lints as a hazard even when the escapes are explicit.\n */\nfunction hasControlCharacter(value: string): boolean {\n  for (const character of value) {\n    const code = character.codePointAt(0);\n    if (code !== undefined && (code <= LAST_C0_CONTROL_CODE || code === DELETE_CODE)) return true;\n  }\n  return false;\n}\n\nexport type SubagentCapabilityCeiling = {\n  allowedTools?: readonly string[];\n  requiredTools?: readonly string[];\n  allowMcpTools?: boolean;\n  allowedExternalProfiles?: readonly string[];\n  denyExtensions?: boolean;\n};\n\nexport interface ResolvedSubagentCapabilityCeiling {\n  version: typeof SUBAGENT_CAPABILITY_CEILING_VERSION;\n  allowedTools?: string[];\n  requiredTools?: string[];\n  allowMcpTools?: boolean;\n  allowedExternalProfiles: string[];\n  denyExtensions: boolean;\n  sources: string[];\n}\n\nexport interface SubagentCapabilityAudit {\n  ceiling: ResolvedSubagentCapabilityCeiling;\n  requestedTools?: string[];\n  effectiveTools: string[];\n  removedTools: string[];\n  internalTools: string[];\n  extensionsDenied: boolean;\n  removedExtensionCount: number;\n  requestedMcpToolCount: number;\n  effectiveMcpTools: string[];\n}\n\ninterface TypedPolicyRegistration {\n  generation: string;\n  ceiling: ResolvedSubagentCapabilityCeiling;\n}\n\nexport class SubagentCapabilityPolicyStore {\n  private readonly policies = new Map<string, TypedPolicyRegistration>();\n\n  register(policy: SubagentPolicy, generation: string): void {\n    const ceiling = normalizeCeiling({\n      ...(policy.allowedTools ? { allowedTools: policy.allowedTools } : {}),\n      ...(policy.requiredTools ? { requiredTools: policy.requiredTools } : {}),\n      ...(policy.allowMcpTools === true ? { allowMcpTools: true } : {}),\n      ...(policy.allowedExternalProfiles ? { allowedExternalProfiles: policy.allowedExternalProfiles } : {}),\n      denyExtensions: policy.denyExtensions === true,\n    });\n    ceiling.sources = [policy.owner];\n    this.policies.set(policy.owner, { generation, ceiling });\n  }\n\n  update(policy: SubagentPolicy, generation: string): void {\n    if (this.policies.get(policy.owner)?.generation !== generation) return;\n    this.register(policy, generation);\n  }\n\n  remove(owner: string, generation: string): void {\n    if (this.policies.get(owner)?.generation === generation) this.policies.delete(owner);\n  }\n\n  clear(): void {\n    this.policies.clear();\n  }\n\n  resolve(inherited?: ResolvedSubagentCapabilityCeiling): ResolvedSubagentCapabilityCeiling | undefined {\n    return intersectSubagentCapabilityCeilings(inherited, ...[...this.policies.values()].map(({ ceiling }) => ceiling));\n  }\n}\n\nfunction validateText(value: unknown, field: string): string {\n  if (\n    typeof value !== 'string' ||\n    !value.trim() ||\n    hasControlCharacter(value) ||\n    Buffer.byteLength(value.trim(), 'utf8') > MAX_TEXT_BYTES\n  ) {\n    throw new Error(\n      `Invalid capability ceiling ${field}; expected a non-empty string without control characters (max ${MAX_TEXT_BYTES} UTF-8 bytes).`,\n    );\n  }\n  return value.trim();\n}\n\nfunction normalizeCeiling(ceiling: SubagentCapabilityCeiling): ResolvedSubagentCapabilityCeiling {\n  if (!ceiling || typeof ceiling !== 'object' || Array.isArray(ceiling)) {\n    throw new Error('Invalid capability ceiling; expected an object.');\n  }\n  const hasAllowedTools = Object.hasOwn(ceiling, 'allowedTools');\n  const hasRequiredTools = Object.hasOwn(ceiling, 'requiredTools');\n  const hasAllowMcpTools = Object.hasOwn(ceiling, 'allowMcpTools');\n  const hasAllowedExternalProfiles = Object.hasOwn(ceiling, 'allowedExternalProfiles');\n  const hasDenyExtensions = Object.hasOwn(ceiling, 'denyExtensions');\n  if (!hasAllowedTools && !hasRequiredTools && !hasAllowMcpTools && !hasAllowedExternalProfiles && !hasDenyExtensions) {\n    throw new Error(\n      'Invalid capability ceiling; expected allowedTools, requiredTools, allowMcpTools, allowedExternalProfiles, or denyExtensions.',\n    );\n  }\n  if (hasAllowMcpTools && typeof ceiling.allowMcpTools !== 'boolean') {\n    throw new Error('Invalid capability ceiling allowMcpTools; expected a boolean.');\n  }\n  if (hasDenyExtensions && typeof ceiling.denyExtensions !== 'boolean') {\n    throw new Error('Invalid capability ceiling denyExtensions; expected a boolean.');\n  }\n  const normalizeTools = (value: readonly string[] | undefined, field: 'allowedTools' | 'requiredTools') => {\n    if (!Array.isArray(value)) throw new Error(`Invalid capability ceiling ${field}; expected an array.`);\n    if (value.length > MAX_ALLOWED_TOOLS) {\n      throw new Error(`Invalid capability ceiling ${field}; expected at most ${MAX_ALLOWED_TOOLS} names.`);\n    }\n    return [\n      ...new Set(\n        value.map((tool) => {\n          const name = validateText(tool, `${field} entry`);\n          if (!TOOL_NAME_PATTERN.test(name)) {\n            throw new Error(`Invalid capability ceiling ${field} entry '${name}'.`);\n          }\n          if (Buffer.byteLength(name, 'utf8') > MAX_TOOL_NAME_BYTES) {\n            throw new Error(\n              `Invalid capability ceiling ${field} entry '${name}'; max ${MAX_TOOL_NAME_BYTES} UTF-8 bytes.`,\n            );\n          }\n          return name;\n        }),\n      ),\n    ].sort((left, right) => left.localeCompare(right));\n  };\n  const allowedTools = hasAllowedTools ? normalizeTools(ceiling.allowedTools, 'allowedTools') : undefined;\n  const requiredTools = hasRequiredTools ? normalizeTools(ceiling.requiredTools, 'requiredTools') : undefined;\n  let allowedExternalProfiles: string[] = [];\n  if (Object.hasOwn(ceiling, 'allowedExternalProfiles')) {\n    if (!Array.isArray(ceiling.allowedExternalProfiles)) {\n      throw new Error('Invalid capability ceiling allowedExternalProfiles; expected an array.');\n    }\n    if (ceiling.allowedExternalProfiles.length > MAX_ALLOWED_EXTERNAL_PROFILES) {\n      throw new Error(\n        `Invalid capability ceiling allowedExternalProfiles; expected at most ${MAX_ALLOWED_EXTERNAL_PROFILES} names.`,\n      );\n    }\n    allowedExternalProfiles = [\n      ...new Set(\n        ceiling.allowedExternalProfiles.map((profile) => {\n          const name = validateText(profile, 'allowedExternalProfiles entry');\n          if (\n            !EXTERNAL_PROFILE_PATTERN.test(name) ||\n            Buffer.byteLength(name, 'utf8') > MAX_EXTERNAL_PROFILE_NAME_BYTES\n          ) {\n            throw new Error(`Invalid capability ceiling allowedExternalProfiles entry '${name}'.`);\n          }\n          return name;\n        }),\n      ),\n    ].sort((left, right) => left.localeCompare(right));\n  }\n  return {\n    version: SUBAGENT_CAPABILITY_CEILING_VERSION,\n    ...(allowedTools ? { allowedTools } : {}),\n    ...(requiredTools?.length ? { requiredTools } : {}),\n    ...(ceiling.allowMcpTools === true ? { allowMcpTools: true } : {}),\n    allowedExternalProfiles,\n    denyExtensions: ceiling.denyExtensions === true,\n    sources: [],\n  };\n}\n\nexport function parseSubagentCapabilityCeiling(\n  value: unknown,\n  field = 'capability ceiling',\n): ResolvedSubagentCapabilityCeiling {\n  if (!value || typeof value !== 'object' || Array.isArray(value)) {\n    throw new Error(`Invalid ${field}; expected an object.`);\n  }\n  const record = value as Record<string, unknown>;\n  if (record.version !== SUBAGENT_CAPABILITY_CEILING_VERSION) throw new Error(`Invalid ${field} version.`);\n  const normalized = normalizeCeiling(record as SubagentCapabilityCeiling);\n  const sources = record.sources;\n  if (!Array.isArray(sources) || sources.some((source) => typeof source !== 'string')) {\n    throw new Error(`Invalid ${field} sources; expected an array of strings.`);\n  }\n  normalized.sources = [...new Set(sources.map((source) => validateText(source, `${field} source`)))].sort();\n  return normalized;\n}\n\nexport function intersectSubagentCapabilityCeilings(\n  ...ceilings: Array<ResolvedSubagentCapabilityCeiling | undefined>\n): ResolvedSubagentCapabilityCeiling | undefined {\n  const active = ceilings.filter((ceiling): ceiling is ResolvedSubagentCapabilityCeiling => ceiling !== undefined);\n  if (active.length === 0) return undefined;\n  const definedLists = active\n    .filter((ceiling) => ceiling.allowedTools !== undefined)\n    .map((ceiling) => new Set(ceiling.allowedTools));\n  let allowedTools: string[] | undefined;\n  if (definedLists.length > 0) {\n    allowedTools = [...definedLists[0]!].filter((tool) => definedLists.every((list) => list.has(tool))).sort();\n  }\n  const requiredTools = [...new Set(active.flatMap((ceiling) => ceiling.requiredTools ?? []))]\n    .filter((tool) => !allowedTools || allowedTools.includes(tool))\n    .sort((left, right) => left.localeCompare(right));\n  const profileSets = active.map((ceiling) => new Set(ceiling.allowedExternalProfiles));\n  const allowedExternalProfiles = [...profileSets[0]!]\n    .filter((profile) => profileSets.every((profiles) => profiles.has(profile)))\n    .sort((left, right) => left.localeCompare(right));\n  return {\n    version: SUBAGENT_CAPABILITY_CEILING_VERSION,\n    ...(allowedTools ? { allowedTools } : {}),\n    ...(requiredTools.length ? { requiredTools } : {}),\n    ...(active.every((ceiling) => ceiling.allowMcpTools === true) ? { allowMcpTools: true } : {}),\n    allowedExternalProfiles,\n    denyExtensions: active.some((ceiling) => ceiling.denyExtensions),\n    sources: [...new Set(active.flatMap((ceiling) => ceiling.sources))].sort(),\n  };\n}\n\nexport function encodeSubagentCapabilityCeiling(\n  ceiling: ResolvedSubagentCapabilityCeiling | undefined,\n): string | undefined {\n  if (!ceiling) return undefined;\n  return Buffer.from(JSON.stringify(ceiling), 'utf8').toString('base64url');\n}\n\nexport function decodeSubagentCapabilityCeiling(\n  value: string | undefined,\n): ResolvedSubagentCapabilityCeiling | undefined {\n  if (value === undefined || value === '') return undefined;\n  let parsed: unknown;\n  try {\n    parsed = JSON.parse(Buffer.from(value, 'base64url').toString('utf8'));\n  } catch (error) {\n    throw new Error(`Invalid inherited capability ceiling: ${error instanceof Error ? error.message : String(error)}`);\n  }\n  if (\n    !parsed ||\n    typeof parsed !== 'object' ||\n    Array.isArray(parsed) ||\n    (parsed as { version?: unknown }).version !== SUBAGENT_CAPABILITY_CEILING_VERSION\n  ) {\n    throw new Error('Invalid inherited capability ceiling version.');\n  }\n  return parseSubagentCapabilityCeiling(parsed, 'inherited capability ceiling');\n}\n"],"mappings":";;;;;;;;;;AAaA,MAAa,sCAAsC;AAGnD,MAAM,iBAAiB;AACvB,MAAM,sBAAsB;AAC5B,MAAM,oBAAoB;AAC1B,MAAM,gCAAgC;AACtC,MAAM,kCAAkC;AACxC,MAAM,2BAA2B;AACjC,MAAM,oBAAoB;AAC1B,MAAM,uBAAuB;AAC7B,MAAM,cAAc;;;;;;AAOpB,SAAS,oBAAoB,OAAwB;CACnD,KAAK,MAAM,aAAa,OAAO;EAC7B,MAAM,OAAO,UAAU,YAAY,CAAC;EACpC,IAAI,SAAS,KAAA,MAAc,QAAQ,wBAAwB,SAAS,cAAc,OAAO;CAC3F;CACA,OAAO;AACT;AAqCA,IAAa,gCAAb,MAA2C;CACzC,2BAA4B,IAAI,IAAqC;CAErE,SAAS,QAAwB,YAA0B;EACzD,MAAM,UAAU,iBAAiB;GAC/B,GAAI,OAAO,eAAe,EAAE,cAAc,OAAO,aAAa,IAAI,CAAC;GACnE,GAAI,OAAO,gBAAgB,EAAE,eAAe,OAAO,cAAc,IAAI,CAAC;GACtE,GAAI,OAAO,kBAAkB,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;GAC/D,GAAI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