Skip to content

Add Agent Plugins and Codex package adapters - #2161

Open
Aaronontheweb wants to merge 3 commits into
feat/git-skill-plugin-foundationfrom
feat/git-skill-plugins
Open

Aaronontheweb wants to merge 3 commits into
feat/git-skill-plugin-foundationfrom
feat/git-skill-plugins

Conversation

@Aaronontheweb

@Aaronontheweb Aaronontheweb commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Netclaw needs one secure Git transport with separate package rules.

This change adds an Agent Plugins 1.0.0 adapter and a Codex compatibility adapter.

The Agent Plugins adapter reads root plugin.json. It discovers immediate skill children under skills/.

The Codex adapter reads .codex-plugin/plugin.json. It preserves the prior declared-path behavior.

Auto selection prefers a recognized Agent Plugins manifest. It does not fall through after that manifest fails validation.

The Git acquirer retains archive limits, path checks, selected extraction, content scans, and immutable candidate creation.

Validation:

  • This branch builds against the preceding PR.
  • The full stack passed 8,588 tests and skipped 23 environment-specific tests.
  • Slopwatch found no issues.
  • The file-header and diff checks passed.
  • The behavioral eval needs provider configuration in an eligible environment.

Depends on #2160.
Part of #2134 and #2135.

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 2.

Comment thread src/Netclaw.Daemon.Tests/Services/GitSkillPluginAcquirerTests.cs
Comment thread src/Netclaw.Daemon.Tests/Services/GitSkillPluginAcquirerTests.cs
Comment thread src/Netclaw.Daemon.Tests/Services/GitSkillPluginAcquirerTests.cs Fixed
Comment thread src/Netclaw.Daemon/Services/GitSkillPluginAcquirer.cs Fixed
Comment thread src/Netclaw.Daemon/Services/GitSkillPluginAcquirer.cs
Comment thread src/Netclaw.Configuration/NetclawPaths.cs
Comment thread src/Netclaw.Daemon/Services/GitSkillPluginAcquirer.cs Fixed
Comment thread src/Netclaw.Daemon/Services/GitSkillPluginAcquirer.cs Fixed
@Aaronontheweb
Aaronontheweb marked this pull request as ready for review September 12, 2026 13:51

@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 candidate rejection defects:

  • Windows-unsafe archive paths.
  • Invalid UTF-8 skill files.
  • Overlapping declared skill roots.

Each case now produces a durable candidate rejection. The focused acquisition tests pass. I found no remaining defect in this slice.

Comment thread src/Netclaw.Daemon.Tests/Services/GitSkillPluginAcquirerTests.cs
Comment thread src/Netclaw.Daemon.Tests/Services/GitSkillPluginAcquirerTests.cs
Comment thread src/Netclaw.Daemon.Tests/Services/GitSkillPluginAcquirerTests.cs
@Aaronontheweb
Aaronontheweb force-pushed the feat/git-skill-plugins branch 2 times, most recently from abf1c86 to 5799503 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.

I found no acquisition defect in the Codex compatibility scope. The archive checks, resource bounds, and immutable paths match #2134. One merge gate remains. This PR changes the skill-authoring system skill. AGENTS.md requires ./evals/run-evals.sh for that change. The PR states that the suite did not start. Run the behavioral suite before merge, or revise the approved acceptance contract.

var token = linked.Token;
try
{
var archivePath = Path.Combine(_paths.CacheDirectory, "git-skill-archives", $"{Guid.NewGuid():N}.tar.gz");
@Aaronontheweb Aaronontheweb changed the title Acquire Codex skill packages from GitHub Add Agent Plugins and Codex package adapters 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 adapter direction is correct. This slice shares Git transport checks and isolates Agent Plugins from Codex compatibility.

One blocking format-selection defect remains in the inline thread.

I reviewed commit 9295022. 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.

bool hasMcpConfig,
string commit)
{
if (HasRecognizedAgentPluginSchema(agentPluginManifest))

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] Reject a present portable manifest before Codex fallback.

This test returns false for malformed JSON or an unsupported schema. Line 63 then selects the Codex compatibility manifest.

The approved issue allows Codex fallback only when the root plugin.json is absent. The design also prohibits a malformed portable manifest from selecting a weaker contract.

Select the Agent Plugins adapter whenever the root manifest exists. Let that adapter reject malformed or unsupported content. Add a mixed-manifest 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.

Fixed at fa456e6. Auto selects the portable root when it exists. Three mixed-manifest tests reject invalid JSON, a missing schema, and an unsupported schema. The Codex manifest no longer hides these errors.

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.

One planning conflict remains. The current OpenSpec delta says auto prefers a recognized root manifest. The issue and PRD require portable selection whenever root plugin.json exists. The code and SPEC-004 now match the issue. Update the OpenSpec delta through /opsx before merge.

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