{"record":{"id":"feab1408a9050905","repo":"affaan-m/ECC","slug":"invalid-kimi-install-profile-profile","errorCode":null,"errorMessage":"Invalid Kimi install profile: ${profile}","messagePattern":"Invalid Kimi install profile: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/multi-harness-setup.js","lineNumber":45,"sourceCode":"  const includesKimi = harnesses.includes('kimi');\n  if (!includesClaude && (input.claudeScope !== undefined || input.claudeHooks !== undefined)) {\n    throw new Error('Claude scope and hook options require Claude to be selected.');\n  }\n  if (!includesKimi && input.profile !== undefined) {\n    throw new Error('The managed install profile requires Kimi to be selected.');\n  }\n\n  const claudeScope = includesClaude ? (input.claudeScope || 'user') : undefined;\n  const claudeHooks = includesClaude ? (input.claudeHooks || 'standard') : undefined;\n  const profile = includesKimi ? (input.profile || 'core') : undefined;\n  if (claudeScope && !VALID_CLAUDE_SCOPES.has(claudeScope)) {\n    throw new Error(`Invalid Claude scope: ${claudeScope}`);\n  }\n  if (claudeHooks && !VALID_CLAUDE_HOOKS.has(claudeHooks)) {\n    throw new Error(`Invalid Claude hooks preference: ${claudeHooks}`);\n  }\n  if (profile && !VALID_PROFILES.has(profile)) {\n    throw new Error(`Invalid Kimi install profile: ${profile}`);\n  }\n\n  return {\n    harnesses,\n    ...(claudeHooks ? { claudeHooks } : {}),\n    ...(claudeScope ? { claudeScope } : {}),\n    dryRun: Boolean(input.dryRun),\n    json: Boolean(input.json),\n    ...(profile ? { profile } : {}),\n    yes: Boolean(input.yes),\n  };\n}\n\nfunction canonicalPath(filePath) {\n  return realpathNearestExisting(filePath);\n}\n\nfunction pathsMatch(left, right) {","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/multi-harness-setup.js#L27-L63","documentation":"When Kimi is selected, the managed install profile must be one of minimal, core, developer, security, research, or full (VALID_PROFILES). The profile selects which module bundle the managed installer lays down. Any other value is rejected because there is no module set defined for it. The check only fires when Kimi is selected; otherwise profile is undefined.","triggerScenarios":"Calling normalizeGuidedInstallRequest with harnesses including 'kimi' and a profile outside {minimal, core, developer, security, research, full}. Examples: 'basic', 'complete', 'enterprise', an empty string, or a typo like 'dev'.","commonSituations":"Typing the profile name; assuming 'basic' or 'complete' are valid; passing a custom profile id; stale naming from a prior version; a UI dropdown with the wrong value list; copy-paste from outdated docs.","solutions":["Use one of the six valid profiles: 'minimal', 'core' (default), 'developer', 'security', 'research', or 'full'.","Omit profile to accept the default ('core').","If you need a custom module set, that is not supported via profile — drive the installer's request layer directly with a custom module list instead.","Verify spelling and case — values are matched exactly against the lowercase set."],"exampleFix":"// before\nnormalizeGuidedInstallRequest({ harnesses: ['kimi'], profile: 'basic' }); // throws\n// after\nnormalizeGuidedInstallRequest({ harnesses: ['kimi'], profile: 'minimal' });\n// or omit for the default\nnormalizeGuidedInstallRequest({ harnesses: ['kimi'] }); // profile = 'core'","handlingStrategy":"validation","validationCode":"const { VALID_PROFILES } = require('./scripts/lib/multi-harness-setup');\nfunction assertProfile(value) {\n  if (value !== undefined && !VALID_PROFILES.has(value)) {\n    throw new Error(`Invalid Kimi install profile: ${value}`);\n  }\n  return value;\n}","typeGuard":"function isValidProfile(v) {\n  return v === undefined || new Set(['minimal','core','developer','security','research','full']).has(v);\n}","tryCatchPattern":"try { normalizeGuidedInstallRequest(input); }\ncatch (error) {\n  if (/Invalid Kimi install profile/i.test(error.message)) {\n    console.error('profile must be one of: minimal, core, developer, security, research, full.');\n    return;\n  }\n  throw error;\n}","preventionTips":["Use only minimal, core, developer, security, research, or full for profile.","Omit profile to accept the default ('core').","Watch for synonyms: 'basic' -> 'minimal', 'complete' -> 'full'.","Drive dropdowns from VALID_PROFILES."],"tags":["multi-harness-setup","validation","configuration","installer","kimi"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}