Add Copilot package-resolution hook to the VS Code plugin - #42
Conversation
551ca00 to
ee6b7c1
Compare
sverdlov93
left a comment
There was a problem hiding this comment.
🤖 Review comment by Cursor AI
Deep review of this draft assembly PR (depends on jfrog-agent-hooks#48). CI validate job is green. ${CLAUDE_PLUGIN_ROOT} wiring is correct for a Claude-format plugin.
Findings (inline below)
- 🟠 Validation only proves pending/
NOT READY, never routing - 🟠 CI does not verify vendor pin integrity
- 🟠 Pin is an unmerged agent-hooks commit (
0a6e194on open #48) - 🟡 Pin file without sibling
sync-modules.mjsregenerator - 🟡 Workflow path filter omits the pin file
- 🟡 README prerequisites incomplete vs upstream smoke (
chat.plugins.enabled) - 🟡 PR description stale (still cites pin
b680ef…/ version1.0.10; tree is0a6e194/1.0.11)
🔵 Vendored cursor-/claude-session-start.mjs are unused at runtime — intentional wholesale modules/ sync, same as sibling plugins.
Merge order: land agent-hooks#48 → re-pin to merged SHA/tag → strengthen validation → un-draft. Do not merge this while the pin is off master.
Known carry-over (same as Claude/Cursor, not unique here): timeout: 7 + cold sequential verify → BUG-02 fail-open class.
|
🤖 Review comment by Cursor AI @omerzi — naming decision requested on the upstream PR (same topic): please choose keep vscode host / copilot harness dual naming vs copilot-only surface naming. Full write-up: https://github.jfrog.info/JFROG/jfrog-agent-hooks/pull/48 (latest comment to @OmerZ). Short version: Claude-in-VS Code is still |
|
🤖 Review comment by Cursor AI @omerzi — added the Claude/Cursor comparison on upstream: https://github.jfrog.info/JFROG/jfrog-agent-hooks/pull/48#issuecomment-829544 (and the follow-up just posted) Claude/Cursor keep agent ≈ adapter file ≈ harness id. This PR alone splits |
- Register the dedicated VS Code SessionStart adapter. - Validate hook wiring and document the Node 20 requirement.
Keep VS Code SessionStart validation scoped to package resolution after Agent Guard moved to skill-based delivery, and refresh vendored modules from the rebased upstream branch.
Refresh the vendored package hook so VS Code uses the same positive Copilot discriminator as the upstream implementation.
Re-pin plugin/modules to agent-hooks 847774b and bump the plugin version so the package-resolution hook ships with the latest upstream fixes.
Picks up the upstream fix for harness detection, which previously handed any SessionStart payload it did not recognize to Claude. A VS Code payload whose source was not exactly "new" was labelled foreign and the adapter dropped the routing policy without injecting it.
Validation only ever exercised the unconfigured advisory, so a break in the routing branch — the one carrying the Artifactory URLs this plugin exists to inject — would have passed CI. Adds a configured fixture with a stand-in jf, and stops the checks inheriting a kill switch or redirected JFrog home from whoever runs them. Restores .github/scripts/sync-modules.mjs from the sibling plugins so the vendor pin has a regenerator beside it instead of being documentation, and aligns the pin file with their repo spelling and dest_prefix.
4c0933b to
95dc527
Compare
Mirrors the upstream jfrog-agent-hooks rename so the harness id (copilot), log context ([copilot]), and adapter filename match — the same convention already used for claude-session-start.mjs and cursor-session-start.mjs. Bumps the plugin to 1.0.13 and re-pins the vendor source to the upstream commit that ships the rename.
|
Went with option 2 on the naming thread — the vendored adapter is now |
sankerr
left a comment
There was a problem hiding this comment.
🤖 Review comment by Cursor AI
Senior review of #42 (head b3fc5e8) for teammate handoff, including sync-job + docs parity vs cursor/claude.
Prior round
Routing validation, path filter, README prerequisites, sync-modules.mjs, and re-pin to merged master SHA are addressed. Still open: pin↔tree integrity in CI; timeout: 7 cold-start (BUG-02) as shared carry-over.
Sync Plugins (jfrog-agent-hooks)
vscode-plugin is in .github/plugins.json / sync-plugins.yml. This PR supplies the downstream assembly the job needs. Do not run Sync Plugins from tag jfrog-agent-hooks/v0.9.0 after merge — that tag lacks copilot-session-start.mjs and would wipe the adapter. Cut a hooks release that includes 17df9b6, then re-pin to the tag.
Docs parity
No docs/ user/admin guides, no preview notice + guide links (cursor/claude both have them). README still links to missing CONTRIBUTING/SECURITY/LICENSE (pre-existing).
Findings (inline)
- 🟠 Missing APR user/admin docs vs sibling plugins
- 🟠 Pin is post-
v0.9.0; sync of that tag would remove the Copilot adapter - 🟡 PR description stale (Agent Guard flow, old pin/version, overstated test plan)
- 🟡 Test plan claims pin integrity; CI does not verify it
Give the Copilot hook enough bounded time for a cold repository verification and assert the hook budget in the plugin validator.
Re-vendor the merged package-resolution capability, add integrity validation, and document the Copilot setup and governance flow.
|
Updated in commit e66cb32: re-vendored the merged agent-hooks hardening revision, added vendored-module integrity validation and workflow self-triggering, added user/admin APR guides, and refreshed the PR description. Local checks pass: module integrity and full hook validator. The only remaining thread is the release-tag pin; the current pin is the merged upstream SHA 4ed33ee until the next agent-hooks release tag is cut. |
Use the released upstream module tag and refresh integrity metadata for the final plugin synchronization.
|
Released upstream tag is now applied: . Re-vendored modules, regenerated integrity metadata, validated the plugin, pushed commit e8449d1, and resolved the final release-pin thread. CI is running on the new head. |
|
Correction: released upstream tag jfrog-agent-hooks/v0.9.0 is now applied. Re-vendored modules, regenerated integrity metadata, validated the plugin, pushed commit e8449d1, and resolved the final release-pin thread. CI is running on the new head. |
Exercise repository verification and the per-session resolution invariant in plugin validation, and run the pinned upstream package-resolution suite in CI.
Remove the cross-host upstream clone from public plugin CI; upstream module behavior remains covered by the agent-hooks repository checks.
|
CI root cause was the new upstream-test step: jfrog-agent-hooks is hosted on the internal github.jfrog.info host, so public GitHub Actions cannot clone it with the public repository token. Removed that cross-host step in eca3db4. The downstream validator retains verifyRepos=true, local Artifactory verification, and the one-request-per-session assertion; upstream behavior remains tested in the agent-hooks repository CI. |
Exercise eager setup eligibility, setup receipts, and package-manager conflict detection directly against the modules shipped in the VS Code plugin.
Overview
Adds the Copilot SessionStart package-resolution hook to the VS Code plugin and vendors the hardened shared capability from
jfrog-agent-hooks.Details
copilot-session-start.mjswith a 15-second host timeout.jfrog-agent-hooks/v0.9.0.Flow
Validation
node scripts/validate-package-resolution-hook.mjsnode .github/scripts/check-vendored-modules.mjsjfadvisory and configured routing fixturesjfrog-agent-hooks/v0.9.0Dependency
The shared hardening is released in agent-hooks PR #84 as
jfrog-agent-hooks/v0.9.0.