Skip to content

Add the managed plugin CLI - #2158

Open
Aaronontheweb wants to merge 1 commit into
feat/git-skill-plugin-apifrom
feat/git-skill-plugin-cli
Open

Aaronontheweb wants to merge 1 commit into
feat/git-skill-plugin-apifrom
feat/git-skill-plugin-cli

Conversation

@Aaronontheweb

@Aaronontheweb Aaronontheweb commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Operators need one plugin-level lifecycle command.

This change adds netclaw plugin install|list|update|enable|disable|remove.

netclaw skill sync remains the complete external source sync command.

The CLI supports stable JSON list output and bounded daemon problem details.

The smoke scenarios cover lifecycle operations and a public repository package.

Validation:

  • The full stack passed 8,588 tests and skipped 23 environment-specific tests.
  • Both plugin smoke scenarios passed all eight checks before the final restack.
  • OpenSpec strict validation passed after the final restack.
  • Slopwatch found no issues.
  • The file-header and diff checks passed.
  • The behavioral eval lacks provider configuration.
  • The native tapes cannot use Chromium sandbox support in this container.

Depends on #2157.
Completes the operator path for #2134.

Pull request stack

Review and merge these pull requests in this order:

  1. Adopt plugin-neutral source and state contracts #2160: Adopt plugin-neutral source and state contracts.
  2. Add Agent Plugins and Codex package adapters #2161: Add Agent Plugins and Codex package adapters.
  3. Publish managed plugins during external sync #2162: Publish managed plugins during external sync.
  4. Add the managed plugin daemon API #2157: Add the managed plugin daemon API.
  5. Add the managed plugin CLI #2158: Add the managed plugin CLI.

This pull request is step 5.

Comment thread src/Netclaw.Cli.Tests/Skills/SkillCommandTests.cs Fixed
Comment thread src/Netclaw.Cli/Skills/PluginCommand.cs Fixed
@Aaronontheweb
Aaronontheweb marked this pull request as ready for review September 12, 2026 13:51
@Aaronontheweb
Aaronontheweb force-pushed the feat/git-skill-plugin-cli branch from 8c87c23 to ba2b7c5 Compare September 12, 2026 14:16
@Aaronontheweb
Aaronontheweb force-pushed the feat/git-skill-plugin-cli branch from ba2b7c5 to 055cb41 Compare September 12, 2026 14:21
@Aaronontheweb
Aaronontheweb force-pushed the feat/git-skill-plugin-cli branch from 055cb41 to 6417a03 Compare September 12, 2026 14:25

@Aaronontheweb Aaronontheweb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial review complete.

I found and fixed three CLI defects:

  • Feed names could collide with plugin names in sync results.
  • Usage errors returned the wrong exit code.
  • Help text described the wrong daemon requirement.

I also fixed the valid StringReader disposal comment. The full CLI test project passes. I found no remaining defect in this slice.

@Aaronontheweb
Aaronontheweb force-pushed the feat/git-skill-plugin-cli branch from 6417a03 to 15e6bb3 Compare September 12, 2026 16:22
@Aaronontheweb
Aaronontheweb force-pushed the feat/git-skill-plugin-cli branch from 15e6bb3 to 51bc9c8 Compare September 12, 2026 16:29
@Aaronontheweb
Aaronontheweb force-pushed the feat/git-skill-plugin-cli branch from 51bc9c8 to 6beeee5 Compare September 12, 2026 16:48
@Aaronontheweb
Aaronontheweb force-pushed the feat/git-skill-plugin-cli branch from 6beeee5 to cdffd16 Compare September 12, 2026 16:51
@Aaronontheweb
Aaronontheweb force-pushed the feat/git-skill-plugin-cli branch from cdffd16 to 8cb661d Compare September 12, 2026 17:11

@Aaronontheweb Aaronontheweb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stack review found two CLI defects. The public command family also needs a product decision before release. Current code imports Codex compatibility packages, not Agent Plugins packages. If #2135 makes the plugin the durable resource, prefer netclaw plugin now. Keep netclaw skill sync as the cross-source operation. Add plugin update as a clear command for a plugin refresh. The stack also lacks the required PRD and OpenSpec change. Please establish that contract before merge. The screenshot check also fails because an ONNX Runtime warning enters the TUI output.

Comment thread src/Netclaw.Cli/Daemon/DaemonApi.cs Outdated
request,
JsonDefaults.Api,
ct);
response.EnsureSuccessStatusCode();

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Preserve the daemon error detail. These endpoints return safe ProblemDetails for request, conflict, candidate, scanner, transport, and timeout failures. EnsureSuccessStatusCode() discards that body. GitSkillPluginCommand then prints only the HTTP status. An operator cannot distinguish a missing tag from an invalid format or duplicate name. Please parse and show the safe detail. Add error-path tests.

return action switch
{
"install" => await InstallAsync(args, daemonApi, timeProvider, input, output, cancellation.Token),
"list" => args.Length == 3

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Add machine-readable list output. This branch rejects netclaw skill plugin list --json with exit code 2. SPEC-004 requires optional JSON output for automation. The installed commit, version, and status need a stable machine contract. Please add --json and a result-shape test.

}

var sync = await api.SyncSkillsAsync(cancellationToken, retryRejected);
if (sync?.Sources is null || sync.Inventory.Succeeded != true)
Comment on lines +71 to +75
catch (Exception ex)
{
output.WriteLine($"Plugin command failed: {ex.Message}");
return 1;
}
@Aaronontheweb
Aaronontheweb force-pushed the feat/git-skill-plugin-cli branch from 5529c82 to b7eb433 Compare September 12, 2026 21:05
@Aaronontheweb Aaronontheweb changed the title Add CLI management for Git skill plugins Add the managed plugin CLI Sep 12, 2026

@Aaronontheweb Aaronontheweb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The top-level command family and JSON contract fit the approved product direction.

One required command-scope correction remains in the inline thread.

I reviewed commit b7eb433. Local checks passed with 8,588 tests, strict OpenSpec validation, Slopwatch, headers, and diff checks.

Local evals lacked provider credentials. Chromium lacked a usable sandbox for native tapes. GitHub checks are still active.

return updateAll ? 0 : 1;
}

var sync = await api.SyncSkillsAsync(cancellationToken, retryRejected);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Keep a named update within the confirmed scope.

The prompt confirms one plugin. This call starts the global external sync, which updates every enabled feed and plugin.

With --retry-rejected, the pass also retries every durable rejection. The command then hides unrelated results from the operator.

Add a target source to the shared request. Another valid option is to require --all and describe the global effect. Add a two-source regression test.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This finding remains open at ddc63d0. The shared sync actor needs a source-scoped request before this command can report a named update safely. Issue #2185 tracks that contract with catalog sync. Keep this PR open until the command touches only the named source.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same scope defect also affects install, enable, disable, and remove. PluginCommand calls SyncSkillsAsync for those mutations at lines 337 and 382. A plugin lifecycle action can start feed and unrelated plugin updates. A source-scoped sync must cover these commands too. Keep netclaw skill sync as the complete pass.

@Aaronontheweb Aaronontheweb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The direct Git stack uses a sound ownership split. The daemon validates and stores sources. The shared actor coordinates feeds and installed plugins. The CLI presents daemon results.

I reviewed the five restacked layers at ddc63d0. Each PR merges into its intended base. The portable root now wins whenever it exists, even when it is invalid. The API no longer returns local config paths. I confirmed both fixes with endpoint and acquisition tests.

The named update defect remains open in the existing #2158 thread. The command still runs a complete external pass and reports one plugin. It can update other plugins and retry other rejected commits. Do not merge the CLI layer until a source-scoped request resolves this defect.

The marketplace contract is separate in #2185. No catalog command or catalog sync exists in this revision. Do not describe this stack as marketplace support.

I ran 1,231 daemon tests, 1,547 CLI tests, six smoke LLM tests, and two native plugin smoke scenarios. Slopwatch and header checks passed. Current CI is still in progress. These checks do not prove a safe named update.

@Aaronontheweb
Aaronontheweb force-pushed the feat/git-skill-plugin-cli branch from ddc63d0 to 6feba43 Compare September 15, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request skills Skill loading, handling, authoring, indexing, and evals.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant