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.
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.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
transport | Transport | yes | Transport shared by the sub-clients of one client. |
NavinLibraryClient.activate
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
projectId | String | yes | Identifier (UUID) or slug of the project. | |
kind | String | yes | skill, plugin, command or agent. | |
name | String | yes | Name 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).
NavinLibraryClient.deactivate
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
projectId | String | yes | Identifier (UUID) or slug of the project. | |
activationId | String | yes | Identifier (UUID) of the activation. |
Returns: JsonNode. Decoded JSON answer of the operation "Deactivate a library item".
Raises: the typed errors of the transport (Errors).
NavinLibraryClient.deleteRule
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
projectId | String | yes | Identifier (UUID) or slug of the project. | |
name | String | yes | Name of the rule. |
Returns: void.
Raises: the typed errors of the transport (Errors).
NavinLibraryClient.importRules
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
projectId | String | yes | Identifier (UUID) or slug of the project. | |
body | Object | yes | The 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).
NavinLibraryClient.installChannel
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
projectId | String | yes | Identifier (UUID) or slug of the project. | |
channel | String | yes | Only the sessions opened on this channel. | |
body | Object | yes | Channel 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).
NavinLibraryClient.installChannel
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
projectId | String | yes | Identifier (UUID) or slug of the project. | |
channel | String | yes | Only the sessions opened on this channel. | |
body | Object | yes | Channel name, agent, settings, secret references, authentication, limits and DLP. | |
options | RequestOptions | yes | Per 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).
NavinLibraryClient.installMcpPreset
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
projectId | String | yes | Identifier (UUID) or slug of the project. | |
preset | String | yes | Name of the Navin library MCP preset to install, put in {name} of the path. | |
body | Object | yes | Server 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).
NavinLibraryClient.installMcpPreset
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
projectId | String | yes | Identifier (UUID) or slug of the project. | |
preset | String | yes | Name of the Navin library MCP preset to install, put in {name} of the path. | |
body | Object | yes | Server name, endpoint, transport, preset fields, secret references and allowed tools. | |
options | RequestOptions | yes | Per 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).
NavinLibraryClient.item
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
kind | String | yes | Kind of item: skills, plugins, commands, agents, mcp-presets or channels. | |
name | String | yes | Name of the item. |
Returns: JsonNode. Decoded JSON answer of the operation "Get a library item".
Raises: the typed errors of the transport (Errors).
NavinLibraryClient.items
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
kind | String | yes | Kind 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).
NavinLibraryClient.items
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
kind | String | yes | Kind of item: skills, plugins, commands, agents, mcp-presets or channels. | |
query | Map<String, ?> | yes | Query 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).
NavinLibraryClient.project
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
projectId | String | yes | Identifier (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).
NavinLibraryClient.putRule
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
projectId | String | yes | Identifier (UUID) or slug of the project. | |
name | String | yes | Name of the rule. | |
body | Object | yes | Content, 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).
NavinLibraryClient.rules
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
projectId | String | yes | Identifier (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).
NavinLibraryClient.rulesPrompt
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).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
projectId | String | yes | Identifier (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).
NavinLibraryClient.summary
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).