Skip to content

Add package resolution to the VS Code plugin - #42

Draft
omerzi wants to merge 4 commits into
mainfrom
feature/JFSK-19-vscode-hooks
Draft

Add package resolution to the VS Code plugin#42
omerzi wants to merge 4 commits into
mainfrom
feature/JFSK-19-vscode-hooks

Conversation

@omerzi

@omerzi omerzi commented Jul 27, 2026

Copy link
Copy Markdown
Member

Overview

Adds JFrog package-resolution policy injection to the VS Code Copilot plugin. The plugin is self-contained: it wires the SessionStart hook, vendors the reviewed agent-hook modules, records their immutable source revision, and validates the assembled runtime path.

Details

  • Registers the dedicated VS Code package-resolution SessionStart adapter alongside the existing Agent Guard injector.
  • Vendors the complete modules bundle from jfrog-agent-hooks commit b680ef382997c57e806e59182bab0ebbfdec87dd.
  • Records module provenance in sync-modules-vendor.json.
  • Strengthens CI validation to require and parse the adapter, execute it with a Copilot payload, and verify valid SessionStart context.
  • Bumps both plugin versions to 1.0.10.
  • Documents Node.js and VS Code hook/plugin settings required for installation.

Flow

flowchart LR
    A[VS Code loads JFrog plugin] --> B[hooks/hooks.json]
    B --> C[Agent Guard SessionStart]
    B --> D[Package resolution SessionStart]
    D --> E[Vendored VS Code adapter]
    E --> F[Vendored shared capability]
    F --> G[Artifactory routing context]
Loading

Test plan

  • Run the complete hook validation script.
  • Verify the vendored adapter exists and passes node --check.
  • Execute the package-resolution hook with a Copilot SessionStart payload.
  • Assert non-empty, valid hookSpecificOutput.additionalContext.
  • Verify Agent Guard force-enable and force-disable behavior remains intact.
  • Verify vendored modules exactly match the pinned upstream revision.
  • Complete a manual VS Code smoke test proving public npm is refused when governed.

Dependency

Depends on upstream agent-hooks PR: https://github.jfrog.info/JFROG/jfrog-agent-hooks/pull/48

omerzi added 3 commits July 27, 2026 14:58
- Register the dedicated VS Code SessionStart adapter.
- Validate hook wiring and document the Node 20 requirement.
@omerzi
omerzi requested a review from a team as a code owner July 27, 2026 12:39
@omerzi
omerzi marked this pull request as draft July 27, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant