{"record":{"id":"12e62ae2291cd537","repo":"iOfficeAI/OfficeCLI","slug":"dump-reader-not-found","errorCode":"dump_reader_not_found","errorMessage":"No dump-reader plugin found for {sourceExt}.","messagePattern":"No dump-reader plugin found for (.+?)\\.","errorType":"exception","errorClass":"CliException","httpStatus":null,"severity":"error","filePath":"src/officecli/Core/Plugins/DumpReaderInvoker.cs","lineNumber":38,"sourceCode":"///\n/// The conversion is one-shot: edits to the returned file are not propagated\n/// back to the source file.\n/// </summary>\npublic static class DumpReaderInvoker\n{\n    public sealed record DumpResult(string ConvertedPath, ResolvedPlugin Plugin);\n\n    /// <summary>\n    /// Resolve a dump-reader plugin for <paramref name=\"sourceExt\"/>, invoke it\n    /// against <paramref name=\"sourceFullPath\"/>, and replay the resulting\n    /// JSONL stream into a fresh native file. Throws CliException on\n    /// resolution or invocation failure; otherwise the result references a\n    /// temp file the caller must dispose (or leave for OS tmp cleanup).\n    /// </summary>\n    public static DumpResult Run(string sourceFullPath, string sourceExt)\n    {\n        var plugin = PluginRegistry.FindFor(PluginKind.DumpReader, sourceExt)\n            ?? throw new CliException($\"No dump-reader plugin found for {sourceExt}.\")\n            {\n                Code = \"dump_reader_not_found\",\n                Suggestion = \"Install a dump-reader plugin (`officecli plugins list` to see installed; plugins/plugin-protocol.md for paths).\",\n            };\n\n        var targetExt = plugin.Manifest.ResolveTargetExtension();\n        var tmpOut = Path.Combine(Path.GetTempPath(),\n            $\"officecli-dumpread-{Guid.NewGuid():N}{targetExt}\");\n        // minimal: true gives a bare-skeleton native file (no default styles,\n        // theme, or docDefaults for docx; equivalent skeleton for xlsx/pptx).\n        // The plugin's batch is expected to define everything it references —\n        // round-trip dumps from `officecli dump` do exactly that.\n        BlankDocCreator.Create(tmpOut, locale: null, minimal: true);\n\n        int itemIndex = 0;\n        Exception? replayError = null;\n\n        // v6.4: open the handler AFTER the plugin process finishes streaming.","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/iOfficeAI/OfficeCLI/blob/1ced45e900782c5083ed550ddf328ee974e425e7/src/officecli/Core/Plugins/DumpReaderInvoker.cs#L20-L56","documentation":"CliException (code 'dump_reader_not_found') thrown when PluginRegistry.FindFor returns null for a DumpReader-kind plugin matching the source file's extension. Dump readers convert legacy/binary formats (e.g. .doc, .xls) into a JSONL batch replayed into a fresh native file.","triggerScenarios":"DumpReaderInvoker.Run is called for a source extension no installed dump-reader plugin declares support for. The suggestion text points users to `officecli plugins list` and plugins/plugin-protocol.md.","commonSituations":"First run on a machine where the .doc/.xls dump plugin was never installed; plugin manifest's extensions field does not list the source ext; plugin install path broken or uninstalled.","solutions":["Run `officecli plugins list` to confirm whether a dump-reader for the extension is installed.","Install the missing dump-reader plugin (see plugins/plugin-protocol.md for paths).","Verify the plugin manifest's extensions array includes the source extension and its kind is dump_reader."],"exampleFix":"// before: convert a .doc with no dump-reader installed\nofficecli convert report.doc report.docx\n\n// after: install the dump-reader plugin first\nofficecli plugins install doc-dumpreader\nofficecli convert report.doc report.docx","handlingStrategy":"validation","validationCode":"var ext = Path.GetExtension(sourcePath).ToLowerInvariant();\nvar ok = PluginRegistry.ListInstalled(PluginKind.DumpReader)\n    .Any(p => p.Manifest.Extensions.Contains(ext));\nif (!ok) throw new InvalidOperationException($\"No dump-reader for {ext}; install one first.\");","typeGuard":null,"tryCatchPattern":"try { DumpReaderInvoker.Run(source, ext); }\ncatch (CliException ex) when (ex.Code == \"dump_reader_not_found\")\n{ /* prompt user to install the plugin, abort gracefully */ }","preventionTips":["Check installed plugins at startup and warn if a needed dump-reader is missing.","Document required plugins per supported source format.","Surface the suggestion text (install hint) to end users verbatim."],"tags":["plugins","dump-reader","not-found","cli-exception"],"backgroundTag":null,"analyzedSha":"1ced45e900782c5083ed550ddf328ee974e425e7","analyzedAt":"2026-08-13T13:01:07.193Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}