Package org.machanism.machai.bindex.ai.tools


package org.machanism.machai.bindex.ai.tools
Provides the AI-facing integration layer for Bindex (bundle index) metadata.

The package has two cooperating parts. BindexFunctionTools is the FunctionTools implementation: its @Tool-annotated methods expose Functional AI Tools named get_bindex (retrieves Bindex metadata for a project or library), pick_libraries (recommends libraries from project requirements), register_bindex (registers metadata from a project file or URL), and register_bindex_json (registers a supplied metadata object). These tools retrieve, recommend, and register descriptors through a configured BindexRepository. Its @Resource-annotated method exposes the file:///schema/bindex-schema-v2.json Contextual Resource, containing the JSON Schema used to validate Bindex structure, rules, and property metadata. Its @Prompt-annotated method exposes the generate-bindex Prompt Template, which loads Markdown instructions and contextual prompts for generating Bindex files. These annotations allow an AI host to discover the operations, contextual resource, and prompt template without coupling the host to implementation details.

GraphqlJsonFilter is the payload-projection support component used by the retrieval operation. It parses a GraphQL selection document and copies the requested top-level fields from serialized Bindex data. Nested selections are accepted by the parser but are not recursively projected; for example, { name version classification { languages } } selects the top-level name, version, and classification fields.

A typical integration supplies a project directory and Configurator, invokes a discovered tool method, and optionally provides a GraphQL selection when a smaller response is preferred. Registration delegates persistence and recommendation to Picker, keeping repository access and AI-facing method metadata separate.

See Also:
  • Classes
    Class
    Description
    An AI tool set implementation of FunctionTools that provides discovery, resolution, and registration actions for Bindex components to large language models (LLMs).
    Internal support component for projecting serialized tool results according to a GraphQL selection document.