Skip to main content

io.enterpriseai.resources.NavinLibraryClient

Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/NavinLibraryClient.java. Back to the Java SDK reference index.

note

This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.

Class NavinLibraryClient​

Navin library vendored with the platform (skills, plugins, commands, agents, MCP presets, channels), its activation per project, and the rules of a project (ADR-0164). Secrets of presets and channels are only openbao:// or env:// references.

Constructor NavinLibraryClient​

NavinLibraryClient(Transport transport)

Creates the client on the shared transport; EnterpriseAIClient builds it and exposes it through the accessor of the same name.

NameTypeDefaultRequiredDescription
transportTransportyesTransport shared by the sub-clients of one client.
JsonNode activate(String projectId, String kind, String name)

Activate a library item. Activates a skill, a plugin (with its skills, commands and agents), a command or an agent for the project (201). A skill is registered in the Skill Registry, verified by its library digest; a skill name already used by a skill not from the library answers 409 navin_skill_name_taken. Needs tenant_admin, developer or application_owner and the ReBAC relation editor. 422 navin_library_kind_not_activable; 404 navin_library_item_not_found. Audited as navin_library.activate.

Route: /v1/projects/{project_id}/navin-library/activations (POST).

NameTypeDefaultRequiredDescription
projectIdStringyesIdentifier (UUID) or slug of the project.
kindStringyesskill, plugin, command or agent.
nameStringyesName of the item in the library (1 to 128 characters).

Returns: JsonNode. Decoded JSON answer of the operation "Activate a library item".

Raises: the typed errors of the transport (Errors).

JsonNode deactivate(String projectId, String activationId)

Deactivate a library item. Removes an activation from the project; a plugin takes the skills, commands and agents it brought with it. Needs tenant_admin, developer or application_owner and the ReBAC relation editor. 404 navin_library_activation_not_found. Audited as navin_library.deactivate.

Route: /v1/projects/{project_id}/navin-library/activations/{activation_id} (DELETE).

NameTypeDefaultRequiredDescription
projectIdStringyesIdentifier (UUID) or slug of the project.
activationIdStringyesIdentifier (UUID) of the activation.

Returns: JsonNode. Decoded JSON answer of the operation "Deactivate a library item".

Raises: the typed errors of the transport (Errors).

void deleteRule(String projectId, String name)

Delete a project rule. Deletes the rule; runs of the project no longer receive it. Needs tenant_admin, developer or application_owner and the ReBAC relation editor. 404 rule_not_found. Audited as project.rule.delete.

Route: /v1/projects/{project_id}/rules/{name} (DELETE).

NameTypeDefaultRequiredDescription
projectIdStringyesIdentifier (UUID) or slug of the project.
nameStringyesName of the rule.

Returns: void.

Raises: the typed errors of the transport (Errors).

JsonNode importRules(String projectId, Object body)

Import the rule files of a repository. Imports the rule files of a repository (.navin/rules, .cursor/rules/*.mdc with their frontmatter, .cursorrules, .clinerules, .windsurfrules, .github/copilot-instructions.md); each recognised file creates or replaces a rule. Other files are reported in skipped with a reason (not_a_rule_file, empty, too_large). At most 200 files (400 invalid_request). Needs tenant_admin, developer or application_owner and the ReBAC relation editor.

Route: /v1/projects/{project_id}/rules/import (POST).

NameTypeDefaultRequiredDescription
projectIdStringyesIdentifier (UUID) or slug of the project.
bodyObjectyesThe files to import, path and content.

Returns: JsonNode. Decoded JSON answer of the operation "Import the rule files of a repository".

Raises: the typed errors of the transport (Errors).

JsonNode installChannel(String projectId, String channel, Object body)

Install a channel from the library. Creates a channel of the project from a Navin channel adapter (201). The setup contract of the adapter is checked: unknown, secret or read-only fields in settings and non secret fields in secret_refs answer 422 channel_field_invalid, a wrong value kind also, missing requirements 422 channel_field_missing; secrets are openbao:// or env:// references only (422 channel_secret_ref_required). Defaults: auth api_key, limits 65536 bytes per message and 60 per minute, DLP detect inbound and mask outbound. Needs tenant_admin, developer or application_owner and the ReBAC relation editor. Audited as navin_library.channel_install.

Route: /v1/projects/{project_id}/navin-library/channels/{name}/install (POST).

NameTypeDefaultRequiredDescription
projectIdStringyesIdentifier (UUID) or slug of the project.
channelStringyesOnly the sessions opened on this channel.
bodyObjectyesChannel name, agent, settings, secret references, authentication, limits and DLP.

Returns: JsonNode. Decoded JSON answer of the operation "Install a channel from the library".

Raises: the typed errors of the transport (Errors).

JsonNode installChannel(String projectId, String channel, Object body, RequestOptions options)

Install a channel from the library. Creates a channel of the project from a Navin channel adapter (201). The setup contract of the adapter is checked: unknown, secret or read-only fields in settings and non secret fields in secret_refs answer 422 channel_field_invalid, a wrong value kind also, missing requirements 422 channel_field_missing; secrets are openbao:// or env:// references only (422 channel_secret_ref_required). Defaults: auth api_key, limits 65536 bytes per message and 60 per minute, DLP detect inbound and mask outbound. Needs tenant_admin, developer or application_owner and the ReBAC relation editor. Audited as navin_library.channel_install.

Route: /v1/projects/{project_id}/navin-library/channels/{name}/install (POST).

NameTypeDefaultRequiredDescription
projectIdStringyesIdentifier (UUID) or slug of the project.
channelStringyesOnly the sessions opened on this channel.
bodyObjectyesChannel name, agent, settings, secret references, authentication, limits and DLP.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Install a channel from the library".

Raises: the typed errors of the transport (Errors).

JsonNode installMcpPreset(String projectId, String preset, Object body)

Install an MCP server from a preset. Registers an MCP server of the project in the MCP gateway from a Navin preset (201), over streamable HTTP or SSE. A stdio preset runs where its command runs (the MCP page of the Navin Manager): give its HTTP endpoint in url; its environment and argument fields are returned in bridge_fields. Errors: 409 mcp_preset_not_installable, 409 mcp_preset_needs_endpoint, 422 mcp_preset_field_unknown, 422 mcp_preset_field_missing, 422 mcp_preset_secret_ref_required (a secret field must be an openbao:// or env:// reference), 422 mcp_preset_unsupported. Needs tenant_admin, developer or application_owner and the ReBAC relation editor. Audited as navin_library.mcp_install.

Route: /v1/projects/{project_id}/navin-library/mcp-presets/{name}/install (POST).

NameTypeDefaultRequiredDescription
projectIdStringyesIdentifier (UUID) or slug of the project.
presetStringyesName of the Navin library MCP preset to install, put in {name} of the path.
bodyObjectyesServer name, endpoint, transport, preset fields, secret references and allowed tools.

Returns: JsonNode. Decoded JSON answer of the operation "Install an MCP server from a preset".

Raises: the typed errors of the transport (Errors).

JsonNode installMcpPreset(String projectId, String preset, Object body, RequestOptions options)

Install an MCP server from a preset. Registers an MCP server of the project in the MCP gateway from a Navin preset (201), over streamable HTTP or SSE. A stdio preset runs where its command runs (the MCP page of the Navin Manager): give its HTTP endpoint in url; its environment and argument fields are returned in bridge_fields. Errors: 409 mcp_preset_not_installable, 409 mcp_preset_needs_endpoint, 422 mcp_preset_field_unknown, 422 mcp_preset_field_missing, 422 mcp_preset_secret_ref_required (a secret field must be an openbao:// or env:// reference), 422 mcp_preset_unsupported. Needs tenant_admin, developer or application_owner and the ReBAC relation editor. Audited as navin_library.mcp_install.

Route: /v1/projects/{project_id}/navin-library/mcp-presets/{name}/install (POST).

NameTypeDefaultRequiredDescription
projectIdStringyesIdentifier (UUID) or slug of the project.
presetStringyesName of the Navin library MCP preset to install, put in {name} of the path.
bodyObjectyesServer name, endpoint, transport, preset fields, secret references and allowed tools.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Install an MCP server from a preset".

Raises: the typed errors of the transport (Errors).

JsonNode item(String kind, String name)

Get a library item. One item with its content (SKILL.md and files of a skill, plugin.json and README of a plugin, Markdown of a command or an agent, full MCP preset or channel contract). 404 navin_library_item_not_found.

Route: /v1/navin-library/{kind}/{name} (GET).

NameTypeDefaultRequiredDescription
kindStringyesKind of item: skills, plugins, commands, agents, mcp-presets or channels.
nameStringyesName of the item.

Returns: JsonNode. Decoded JSON answer of the operation "Get a library item".

Raises: the typed errors of the transport (Errors).

JsonNode items(String kind)

List the library items of a kind. Items of one kind: skills, plugins, commands, agents, mcp-presets or channels (q searches name and description, category filters skills, plugins and MCP presets). An unknown kind answers 404 navin_library_kind_unknown.

Route: /v1/navin-library/{kind} (GET).

NameTypeDefaultRequiredDescription
kindStringyesKind of item: skills, plugins, commands, agents, mcp-presets or channels.

Returns: JsonNode. Decoded JSON answer of the operation "List the library items of a kind".

Raises: the typed errors of the transport (Errors).

JsonNode items(String kind, Map<String, ?> query)

List the library items of a kind. Items of one kind: skills, plugins, commands, agents, mcp-presets or channels (q searches name and description, category filters skills, plugins and MCP presets). An unknown kind answers 404 navin_library_kind_unknown.

Route: /v1/navin-library/{kind} (GET).

NameTypeDefaultRequiredDescription
kindStringyesKind of item: skills, plugins, commands, agents, mcp-presets or channels.
queryMap<String, ?>yesQuery string parameters of the route.

Returns: JsonNode. Decoded JSON answer of the operation "List the library items of a kind".

Raises: the typed errors of the transport (Errors).

JsonNode project(String projectId)

Get what a project uses from the library. Library version, activations of the project with counts per kind, and the MCP servers and channels of the project (with the preset they come from). Needs the ReBAC relation viewer on the project.

Route: /v1/projects/{project_id}/navin-library (GET).

NameTypeDefaultRequiredDescription
projectIdStringyesIdentifier (UUID) or slug of the project.

Returns: JsonNode. Decoded JSON answer of the operation "Get what a project uses from the library".

Raises: the typed errors of the transport (Errors).

JsonNode putRule(String projectId, String name, Object body)

Create or replace a project rule. Creates (201) or replaces (200) a rule of the project. The name has 1 to 64 letters, digits, ., _ or - (a .md suffix is dropped, readme is refused; 422 rule_name_invalid). Empty content answers 422 rule_empty, more than 64 KiB 413 rule_too_large; a conditional rule needs globs or a description (422 rule_scope_required). Needs tenant_admin, developer or application_owner and the ReBAC relation editor. Audited as project.rule.put.

Route: /v1/projects/{project_id}/rules/{name} (PUT).

NameTypeDefaultRequiredDescription
projectIdStringyesIdentifier (UUID) or slug of the project.
nameStringyesName of the rule.
bodyObjectyesContent, mode, description, globs and source of the rule.

Returns: JsonNode. Decoded JSON answer of the operation "Create or replace a project rule".

Raises: the typed errors of the transport (Errors).

JsonNode rules(String projectId)

List the project rules. Rules of the project by mode then name, each with source, source path, description, globs, content, digest and size in bytes. Needs the ReBAC relation viewer.

Route: /v1/projects/{project_id}/rules (GET).

NameTypeDefaultRequiredDescription
projectIdStringyesIdentifier (UUID) or slug of the project.

Returns: JsonNode. Decoded JSON answer of the operation "List the project rules".

Raises: the typed errors of the transport (Errors).

JsonNode rulesPrompt(String projectId)

Get the rules prompt section. The prompt section every run of the project receives: always on rules inlined (each clipped at 8000 characters), conditional ones listed with their description and globs. Returns prompt, the always and conditional counts and the digest of the text (empty when the project has no rule). Needs the ReBAC relation viewer.

Route: /v1/projects/{project_id}/rules/prompt (GET).

NameTypeDefaultRequiredDescription
projectIdStringyesIdentifier (UUID) or slug of the project.

Returns: JsonNode. Decoded JSON answer of the operation "Get the rules prompt section".

Raises: the typed errors of the transport (Errors).

JsonNode summary()

Get the library summary. Version of the vendored navin package, counts per kind and the rule files read from a repository. 503 navin_library_unavailable when the catalogue is not packaged.

Route: /v1/navin-library (GET).

This element takes no parameter.

Returns: JsonNode. Decoded JSON answer of the operation "Get the library summary".

Raises: the typed errors of the transport (Errors).