@@ -473,17 +473,12 @@ impl DefaultSecurityProvider {
473473 }
474474}
475475
476- /// Document parser registry.
476+ /// Document parser registry (reserved for future use) .
477477///
478- /// Enables custom document format support (PDF, Excel, Word, etc.) for
479- /// plugin tools such as `AgenticSearch` and `AgenticParse`.
480- ///
481- /// ```js
482- /// const registry = new DocumentParserRegistry();
483- /// agent.session('.', {
484- /// plugins: [new AgenticSearch({ documentParserRegistry: registry })],
485- /// });
486- /// ```
478+ /// Currently only plain-text formats (source code, Markdown, JSON, TOML, YAML, CSV, etc.)
479+ /// are supported without additional configuration. Binary formats such as PDF, Excel, or
480+ /// Word require a custom `DocumentParser` implementation, which is not yet exposed in the
481+ /// Node.js SDK.
487482#[ napi]
488483pub struct DocumentParserRegistry {
489484 pub kind : String ,
@@ -513,22 +508,12 @@ impl DocumentParserRegistry {
513508pub struct JsPlugin {
514509 /// Plugin kind: `"agentic_search"`, `"agentic_parse"`, or `"skill_plugin"`.
515510 pub kind : String ,
516- /// Optional document parser registry for this plugin.
517- pub document_parser_registry : Option < JsDocumentParserRegistry > ,
518511 /// Plugin name (used by SkillPlugin).
519512 pub plugin_name : Option < String > ,
520513 /// Skill YAML/markdown content strings (used by SkillPlugin).
521514 pub skills : Option < Vec < String > > ,
522515}
523516
524- /// Options for the AgenticSearch plugin.
525- #[ napi( object) ]
526- #[ derive( Clone , Default ) ]
527- pub struct AgenticSearchOptions {
528- /// Pass a `DocumentParserRegistry` to enable PDF, Excel, Word, etc. support.
529- pub document_parser_registry : Option < JsDocumentParserRegistry > ,
530- }
531-
532517/// Multi-phase semantic code search plugin.
533518///
534519/// Mounts the `agentic_search` tool onto the session. Not registered by default.
@@ -537,38 +522,22 @@ pub struct AgenticSearchOptions {
537522/// agent.session('.', {
538523/// plugins: [new AgenticSearch()],
539524/// });
540- ///
541- /// // With document parser support:
542- /// agent.session('.', {
543- /// plugins: [new AgenticSearch({ documentParserRegistry: new DocumentParserRegistry() })],
544- /// });
545525/// ```
546526#[ napi]
547527pub struct AgenticSearch {
548528 pub kind : String ,
549- pub document_parser_registry : Option < JsDocumentParserRegistry > ,
550529}
551530
552531#[ napi]
553532impl AgenticSearch {
554533 #[ napi( constructor) ]
555- pub fn new ( options : Option < AgenticSearchOptions > ) -> Self {
556- let opts = options. unwrap_or_default ( ) ;
534+ pub fn new ( ) -> Self {
557535 Self {
558536 kind : "agentic_search" . to_string ( ) ,
559- document_parser_registry : opts. document_parser_registry ,
560537 }
561538 }
562539}
563540
564- /// Options for the AgenticParse plugin.
565- #[ napi( object) ]
566- #[ derive( Clone , Default ) ]
567- pub struct AgenticParseOptions {
568- /// Pass a `DocumentParserRegistry` to enable PDF, Excel, Word, etc. support.
569- pub document_parser_registry : Option < JsDocumentParserRegistry > ,
570- }
571-
572541/// LLM-enhanced document parsing plugin.
573542///
574543/// Mounts the `agentic_parse` tool onto the session. Not registered by default.
@@ -578,28 +547,18 @@ pub struct AgenticParseOptions {
578547/// agent.session('.', {
579548/// plugins: [new AgenticParse()],
580549/// });
581- ///
582- /// // With document parser support:
583- /// agent.session('.', {
584- /// plugins: [
585- /// new AgenticParse({ documentParserRegistry: new DocumentParserRegistry() }),
586- /// ],
587- /// });
588550/// ```
589551#[ napi]
590552pub struct AgenticParse {
591553 pub kind : String ,
592- pub document_parser_registry : Option < JsDocumentParserRegistry > ,
593554}
594555
595556#[ napi]
596557impl AgenticParse {
597558 #[ napi( constructor) ]
598- pub fn new ( options : Option < AgenticParseOptions > ) -> Self {
599- let opts = options. unwrap_or_default ( ) ;
559+ pub fn new ( ) -> Self {
600560 Self {
601561 kind : "agentic_parse" . to_string ( ) ,
602- document_parser_registry : opts. document_parser_registry ,
603562 }
604563 }
605564}
@@ -629,7 +588,6 @@ impl AgenticParse {
629588#[ napi]
630589pub struct SkillPlugin {
631590 pub kind : String ,
632- pub document_parser_registry : Option < JsDocumentParserRegistry > ,
633591 pub plugin_name : Option < String > ,
634592 pub skills : Option < Vec < String > > ,
635593}
@@ -640,7 +598,6 @@ impl SkillPlugin {
640598 pub fn new ( name : String , skills : Vec < String > ) -> Self {
641599 Self {
642600 kind : "skill_plugin" . to_string ( ) ,
643- document_parser_registry : None ,
644601 plugin_name : Some ( name) ,
645602 skills : Some ( skills) ,
646603 }
@@ -865,16 +822,8 @@ pub struct SessionOptions {
865822 /// Pass instances of plugin classes to enable optional tools:
866823 ///
867824 /// ```js
868- /// // Semantic code search
869825 /// agent.session('.', { plugins: [new AgenticSearch()] });
870- ///
871- /// // Document parsing with PDF support
872- /// agent.session('.', {
873- /// plugins: [
874- /// new AgenticSearch({ documentParserRegistry: new DocumentParserRegistry() }),
875- /// new AgenticParse({ documentParserRegistry: new DocumentParserRegistry() }),
876- /// ],
877- /// });
826+ /// agent.session('.', { plugins: [new AgenticSearch(), new AgenticParse()] });
878827 /// ```
879828 pub plugins : Option < Vec < JsPlugin > > ,
880829 /// Custom role/identity prepended before the core agentic prompt.
@@ -1197,12 +1146,8 @@ fn js_session_options_to_rust(options: Option<SessionOptions>) -> RustSessionOpt
11971146 opts = opts. with_default_security ( ) ;
11981147 }
11991148 }
1200- // Mount plugins — also enable document parsing if any plugin requests it
1149+ // Mount plugins
12011150 for plugin in o. plugins . iter ( ) . flatten ( ) {
1202- if plugin. document_parser_registry . is_some ( ) && opts. document_parser_registry . is_none ( ) {
1203- opts. document_parser_registry =
1204- Some ( std:: sync:: Arc :: new ( a3s_code_core:: DocumentParserRegistry :: new ( ) ) ) ;
1205- }
12061151 match plugin. kind . as_str ( ) {
12071152 "agentic_search" | "agentic-search" => {
12081153 opts. plugins . push ( std:: sync:: Arc :: new (
0 commit comments