AICoderNetBeansPlugin

agent
Guvenlik Denetimi
Uyari
Health Uyari
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Uyari
  • Code scan incomplete — No supported source files were scanned during light audit
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

Netbeand IDE Plugin to provide a general Plugin for AI models to the netbeand tool.

README.md

AI Coder for NetBeans

Version compatibility: Version 1.2.21 supports Claude, GitHub Copilot, and Grok only. If you are running a released version review the documentation at that git tag.

AI Coder is a NetBeans IDE plugin that provides dockable, multi-session AI coding chats with IDE-aware context, project-scoped tools, configurable permissions, and reviewable file changes. It can work with local, CLI-based, SDK-based, ACP, app-server, and OpenAI-compatible backends through one shared chat and tool experience.

Supported backends

Backend Connection Configuration Default status
Claude Long-lived claude CLI stream session Executable and model Enabled
GitHub Copilot Copilot SDK session Executable and model Enabled
Grok Headless grok CLI prompt sessions Executable and model Enabled
OpenCode Long-lived opencode acp session Executable, editable/discovered model, and Build or Plan agent mode Enabled
Codex Long-lived Codex app-server session Executable, editable model, reasoning effort, and sandbox/approval options Enabled
Ollama (Local) OpenAI-compatible HTTP API Base URL, editable/discovered model, and context-management options Implemented; enable in Options. Note: Not as live tested as the other implementations, feel free to send me some hardware I can thrash :)

Each session has its own backend, model, settings, working project, chat history, session instructions, and optional persisted backend session/thread state. Multiple sessions and backends can run at the same time, though their file-, build- and Git-changing work is serialised across the whole plugin — see Concurrency and limits.

What it provides

  • Streaming Markdown chat with syntax-highlighted code, tool activity, status messages, and dockable session tabs.
  • Paste clipboard images into chat when the selected backend supports image input.
  • AI Manager for creating, opening, and deleting sessions, with reusable configuration and instruction templates.
  • Per-session session instructions, with delivery on the first user request or automatically at startup.
  • Reusable configuration templates and instruction templates; built-in configuration templates include Coordinator, CoderPeer, and ReviewerPeer.
  • IDE context delivery: open projects, active file, session identity, and later project/file changes are supplied to the assistant. OpenAI-compatible sessions also support managed conversation context.
  • Persistent sessions, conversation history, and context recovery across IDE restarts when enabled.
  • Shared account usage gauges where a backend reports them: Claude rolling limits, GitHub Copilot quota, and Codex account rate limits. Context gauges show the active context against the backend-reported window where available.
  • Inter-AI messaging between opted-in sessions, including inbox notifications and important-message interruption controls.
  • NetBeans-aware search, navigation, diagnostics, formatting, build, test, refactoring, VCS, file, database, and web-request tools.
  • Diff review for AI-proposed content writes, and explicit confirmation for destructive or location-changing file actions.

Requirements

  • NetBeans IDE 22 or newer.
  • Java 17 or newer.
  • Maven to build this plugin and to use its Maven build/test tools; Gradle or Ant when using their corresponding tools.
  • At least one configured backend:
    • Claude: the claude CLI, authenticated with claude login.
    • GitHub Copilot: the copilot CLI and a Copilot-enabled GitHub account.
    • Grok: the grok CLI, authenticated with grok login.
    • OpenCode: the opencode CLI. Raise OpenCode's MCP execution timeout before using long-running tools — see the note below.
    • Codex: the codex CLI/app-server, authenticated with codex login.
    • Ollama (Local): a reachable OpenAI-compatible Ollama endpoint; no CLI is required by the plugin.

NetBeans must be able to launch configured CLIs and use loopback networking. Sandboxed installations that block process creation, the host PATH, or local HTTP connections can prevent CLI/ACP/app-server backends and the MCP tool server from working.

OpenCode: raising the MCP tool timeout

OpenCode applies its own timeout to MCP tool calls and ends longer ones with MCP error -32001: Request timed out. Tools that legitimately run for minutes — full test runs, clean builds (the plugin allows a build up to 10 minutes), or any prompt that waits on your approval — will fail against the default.

The plugin cannot set this for you: it supplies its MCP server to OpenCode over ACP, whose transport definition has no timeout field. Add it to your own OpenCode config (~/.config/opencode/opencode.json or a project opencode.json):

{
  "experimental": {
    "mcp_timeout": 3600000
  }
}

The value is in milliseconds — the example above is one hour. OpenCode's config schema defines experimental.mcp_timeout as "Timeout in milliseconds for model context protocol (MCP) requests". Beware that anomalyco/opencode#8212 quotes 3600, which is 3.6 seconds and shorter than the default — it will make the problem worse, not better.

Note also that the per-server timeout field documented for MCP servers does not help here: it applies to tool discovery, not execution.

Other backends are less affected: Grok already allows a long tool timeout, and Codex accepts a per-server tool_timeout_sec. Claude's HTTP transport currently has an upstream limit that its configuration does not override.

Installation

Build the NetBeans module:

mvn package

Install the generated .nbm from target/ using Tools > Plugins > Downloaded > Add Plugins.

Getting started

  1. Configure one or more backend tabs in Tools > Options > AI Coder.
  2. Open Tools > AI Manager.
  3. Create a session, choose its backend and project, then select Create & Open.
  4. Use the dockable chat tab to ask for analysis, changes, tests, or IDE operations.
  5. Review every proposed content diff in the NetBeans Accept/Reject panel before it is saved — unless you enable Auto-accept, which applies changes without asking. See Change review and safety.

You can set session-specific options from its configuration UI. An unset session option inherits its global default. For step-by-step use of the AI Manager, session tabs, reviews, and templates, see the UI guide.

Configuration

Global and per-session options

The General options tab establishes defaults. Sessions can override the following controls:

Area Controls
Conversation Maximum history, save history, chat font size, and diff-context lines
Project scope Restrict file access to session project directories
Change review Auto-accept policy and diff presentation
Session instructions Session instructions and startup/first-request delivery behavior
Inter-AI Enable inter-AI messaging, automatic inbox notices, and important-message interruption
Web requests Master switch plus independent permissions for GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, request headers, and request bodies, and for reaching localhost or private-network destinations
Database Master switch, read-only sub-permissions, and database row limit
Git Master switch plus separate Read and Write permissions for the Git tools
Clipboard Explicit opt-in for clipboard reads
Infrastructure MCP loopback port, save-session-on-close prompt behavior, inbox retention/size, debug JSON, debug context, and tool-use logging

The default posture restricts file tools to project directories, disables auto-accept and clipboard access, and disables inter-AI messaging and automatic inbox notices. Important-message interruption is enabled when messaging is enabled. Database access is disabled by default with a row limit of 25; inbox entries are retained for 60 minutes with a maximum of 1,000 entries.

Web requests allow GET by default when web access is enabled. Methods that can change remote state, custom headers, and request bodies are disabled by default and must be enabled globally or for the session.

Where a request may go is controlled separately from what it may do. Destinations that resolve to loopback, link-local, private or site-local, carrier-grade NAT, IPv6 unique-local, multicast, or any-local addresses are refused — on the entered URL and on every redirect hop, so a public address cannot redirect into your network. Two options relax this, both off by default: Allow localhost destinations covers loopback and any-local (wildcard) addresses, for a local model server or dev server on your own machine, and Allow private network destinations covers the rest — private and site-local ranges, link-local, carrier-grade NAT, and IPv6 unique-local. Multicast is never permitted. A refusal names the setting that would allow it, so the assistant can tell you which one to turn on. Note that enabling localhost also makes this plugin's own tool server reachable over HTTP, though a request still cannot authenticate to it, and that 169.254.169.254 — the cloud metadata endpoint — falls under private networks, which matters if you run the IDE on a cloud VM.

Git access is enabled by default, with both Read and Write on, so existing behaviour is unchanged. Turning Write off leaves a session able to inspect the repository — GetGitStatus, GetGitDiff, GitLog, GitShow, GitBlame — while refusing the sixteen tools that alter it. The split follows each tool's own mutating flag rather than a separate list, so GitBranch, GitTag, GitRemote and GitStash need Write even when only listing, and GitFetch needs it despite not touching the working tree. A refusal names the setting that would allow it.

Database access is opt-in and read-only. A query must be a single SELECT — anything chained after a ; is refused — and the JDBC connection is set read-only while it runs, which some drivers treat only as a hint. The configured row limit is enforced. Queries share the IDE's own connection, so they run one at a time and are cut off after five minutes rather than holding it indefinitely.

Backend options

Backend tabs supply executable locations and default backend settings. Session settings preserve the selected backend-specific configuration.

Backend Notable options
Claude CLI executable and model; models are discovered and cached when available
GitHub Copilot CLI executable and SDK-discovered model list with fallback choices
Grok CLI executable and discovered/fallback model list
OpenCode CLI executable, model, and ACP-provided agent/mode configuration
Codex CLI executable, model, reasoning effort, and app-server session options
Ollama (Local) OpenAI-compatible base URL (default http://localhost:11434), model, context window, and context-management settings

OpenCode’s mode is Build for normal agent work or Plan for read-only planning. Codex provides known model choices including gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, and gpt-5.4-mini, while keeping the model field editable. Ollama needs no API key; its model and base URL can be changed for an individual session.

For OpenAI-compatible sessions, context management can trim by message count, estimated tokens, or reported tokens. Available strategies are no trimming, dropping older messages, dropping marked messages, or summarising; configure the trigger threshold, post-trim target, message limit, and context persistence in the Ollama/OpenAI context settings.

Sessions, history, and context

Session definitions are saved in the NetBeans user area and include their name, description, backend-specific settings, associated project, timestamps, and instruction-delivery state. Opening a saved session restores its recorded history and working directory where valid. Persisted timestamps remain machine-readable and unchanged. Dates displayed to an AI — including inbox server, sent, and read times, file metadata, and Git commit dates — use the machine's local timezone, for example 2026-08-22 21:28:48 +12:00 (Pacific/Auckland). Corrupt history/context data is ignored and rebuilt rather than blocking a session.

On initial delivery, the assistant receives session identity, open project locations, and active-editor context. Later requests generally contain only changes to the active file/project state; stateless backends receive the required baseline again. Saved history and model-facing context are independent, allowing the chat transcript and backend context to recover safely.

AI Manager and templates

Tools > AI Manager lets you create, open, and delete sessions; session settings are changed afterwards from the session's own gear button. A session can be associated with an open project and can use a reusable configuration template. Configuration templates preserve common non-backend settings; session-instruction templates provide reusable prompts without overwriting backend selection or credentials.

Deleting a session removes its saved history and associated local backend configuration for that session.

The Manager's Help tab holds generated MCP tool documentation and an About page showing the plugin name, installed version, and the project homepage and this version's release page as clickable links.

MCP and IDE tool reference

The local MCP server exposes the following NetBeans-aware capabilities to compatible backends. Tool availability varies by backend — some tools are registered only for certain AI types. Tools gated by a session permission (web requests, database access, git) are always listed and are refused at call time when the permission is off. For the complete tool list, usage rules, permission model, and backend/session settings, see the tool and settings reference; the same tool documentation is browsable in the IDE under Tools > AI Manager > Help > MCP Tools.

Build and test

Tool Description
BuildProject, CleanProject, CleanAndBuildProject Invoke NetBeans build actions for the active project type
BuildMavenProject, CleanAndBuildMavenProject, RunMavenTests Maven package/clean/test operations
BuildGradleProject, RunGradleTests Gradle build and test operations
BuildAntProject, RunAntTests Ant build and test operations
DownloadMavenSources, DownloadMavenJavadoc Download dependency sources or Javadoc

Search, code intelligence, and refactoring

Tool Description
SearchInFiles, SearchTypes, SearchSymbols IDE-aware text, type, and member search; all three search every open project when no file is supplied, and report the true total when results are truncated
FilterFileContent Pattern-match lines within a single named file, with optional context per match; reaches files off the source classpath that project search cannot see
FindFile Locate files or directories by name below a permitted directory, with depth limiting and hidden-entry filtering; reaches paths off the source classpath that project search cannot see
FindDeclaration, FindImplementations, FindUsages Navigate relationships in Java source
GetProjectStructure, GetClassMembers, GetTypeHierarchy, GetJavadoc Inspect project and classpath information
RenameSymbol, MoveClass, MoveFile, InlineVariable, ChangeMethodSignature IDE refactorings that update references where applicable
GetDiagnostics, NavigateToLine, FixImports, OrganiseImports, OrganiseMembers, ReformatFile Diagnostics, navigation, and source maintenance

Files, VCS, and system access

Tool Description
GetFileContent, GetFileInfo, GetCurrentFile, GetCurrentFileContent, GetOpenFiles, GetSelectedText Read editor and filesystem context, including unsaved editor content where applicable. GetFileInfo describes files, directories and symbolic links
WriteFile, ApplyEdit, SaveFile Propose or save content changes through the review gate
CopyFile, MoveFile, DeleteFile Copy, relocate, or remove files with explicit confirmation
CloseFile, RefreshFileStatus Manage open files and refresh NetBeans/VCS state
GetGitStatus, GetGitDiff, GitAdd, GitCommit, GitLog, GitPush, GitPull, GitCheckout, GitBranch, GitDeleteBranch, GitStash, GitFetch, GitReset, GitMerge, GitShow, GitBlame, GitRebase, GitCherryPick, GitTag, GitRemote, GitRevert Git inspection and repository operations
GetClipboard Read clipboard text when clipboard access is enabled
WebRequest Make permitted HTTP/HTTPS requests

Database and collaboration

Tool Description
ListDatabaseConnections, ListTables, GetTableSchema, GetTableData, ExecuteSqlQuery Read-only Database Explorer access
ListAiSessions, SendAiMessage, GetAiMessages, ReadAiMessage, DeleteAiMessage, IsAiSessionActive, UpdateSessionDescription Inter-AI session discovery and messaging
GetPluginVersion, GetInstructions, AskUserQuestion, RunInspect Plugin guidance, user input, and static-analysis entry points

Change review and safety

The plugin provides gates, not guarantees. It mediates what passes through its own tool and approval layer, and it constrains backends where it can. It cannot make an assistant safe. Backends run as real processes with your credentials and your filesystem access, and one that can run shell commands can act in ways no dialog fully describes. Read what you are approving, and keep your work under version control so an unwanted change is recoverable.

Content-changing operations such as WriteFile, ApplyEdit, and content-bearing SaveFile are shown in the NetBeans diff review panel, and are not saved until you accept them.

CopyFile, MoveFile, and DeleteFile have no content diff, so they are confirmed as actions before proceeding. Shell commands proposed by a backend are confirmed the same way, showing the command that would run. Refactorings use NetBeans refactoring APIs so project references are updated consistently.

Auto-accept removes the review step by design. With it enabled, content writes and file actions are approved automatically and reported to the transcript after the fact rather than before. It does not extend to everything: shell commands, and any request whose subject the plugin could not identify, are still prompted every time regardless of the setting — approving those unseen is the one thing the gate exists to prevent. Auto-accept is off by default, can be set globally or per session, and is worth leaving off for anything you would not want applied unseen.

The local tool server binds only to loopback addresses. Every call is authenticated with the caller's session ID and per-session secret, and sessions cannot act as each other. Project scoping, database access, clipboard access, web permissions, inter-AI messaging, and auto-accept are all separately configurable.

Architecture

NetBeans IDE
  └── AI Coder dockable sessions
        ├── Claude / Grok CLI sessions
        ├── GitHub Copilot SDK session
        ├── OpenCode ACP session
        ├── Codex app-server session
        ├── Ollama OpenAI-compatible HTTP client
        └── Local MCP/IDE tool server and review bridge

The plugin keeps backend integration behind a common session/UI model. Backend-specific process managers and settings creators handle protocol details while shared components provide message rendering, persistence, IDE context, permissions, tools, and change review.

Development

mvn package
mvn test
mvn nbm:run-ide

Tests are under src/test/java and cover protocol handling, tool registration, session settings, context management, persistence, and UI behavior.

License

Copyright (c) 2026 Chris Quin.

This project is licensed under the MIT License — see LICENSE for details.

Yorumlar (0)

Sonuc bulunamadi