{"record":{"id":"26e0e442215da821","repo":"ruvnet/ruflo","slug":"unknown-permissions-preset-name-valid-presets","errorCode":null,"errorMessage":"Unknown permissions preset: ${name}. Valid presets: ${valid}","messagePattern":"Unknown permissions preset: (.+?)\\. Valid presets: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/permission/permission-set.ts","lineNumber":138,"sourceCode":"      deniedTools: [],\n      allowedPaths: ['**/*'],\n      deniedPaths: [],\n      allowedNetworkHosts: ['*'],\n      notes: 'No restriction. Kept for opt-in compatibility; see #2768 for why this is not the default.',\n    },\n  ],\n};\n\nexport type PresetName = keyof typeof PRESETS;\n\n/**\n * Resolve a preset name to its per-role sets. Throws on unknown preset —\n * fail loud so a typo doesn't silently degrade to permissive.\n */\nexport function resolvePreset(name: string): PermissionSet[] {\n  if (!(name in PRESETS)) {\n    const valid = Object.keys(PRESETS).join(', ');\n    throw new Error(`Unknown permissions preset: ${name}. Valid presets: ${valid}`);\n  }\n  return PRESETS[name as PresetName];\n}\n\n/**\n * Sanity-check a permission set: role name shape, no null entries.\n * Path validation is deferred to the enforcement side (PathValidator)\n * so this module has no @claude-flow/security runtime dep beyond a\n * type-only import.\n */\nexport function validatePermissionSet(set: PermissionSet, _validator?: PathValidator): string[] {\n  const errors: string[] = [];\n  if (!set.role || typeof set.role !== 'string') errors.push('role must be a non-empty string');\n  const arrays: [keyof PermissionSet, unknown][] = [\n    ['allowedTools', set.allowedTools],\n    ['deniedTools', set.deniedTools],\n    ['allowedPaths', set.allowedPaths],\n    ['deniedPaths', set.deniedPaths],","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/ruvnet/ruflo/blob/6b01dc5a687b26b3e218f796de45ec51f8fa9e8c/v3/@claude-flow/cli/src/permission/permission-set.ts#L120-L156","documentation":"Error \"Unknown permissions preset: ${name}. Valid presets: ${valid}\" thrown in ruvnet/ruflo.","triggerScenarios":"Thrown at v3/@claude-flow/cli/src/permission/permission-set.ts:138 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6b01dc5a687b26b3e218f796de45ec51f8fa9e8c","analyzedAt":"2026-08-12T13:20:50.148Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}