Skip to content

refactor: extract VS Code extension to packages/agent-os-vscode/ (#491)#546

Closed
imran-siddique wants to merge 4 commits intomicrosoft:mainfrom
imran-siddique:refactor/extract-vscode-extension
Closed

refactor: extract VS Code extension to packages/agent-os-vscode/ (#491)#546
imran-siddique wants to merge 4 commits intomicrosoft:mainfrom
imran-siddique:refactor/extract-vscode-extension

Conversation

@imran-siddique
Copy link
Copy Markdown
Member

Moves the VS Code extension from \packages/agent-os/extensions/vscode/\ to \packages/agent-os-vscode/\ as a standalone sibling package.

Why

  • TS security issues were getting filed against the Python agent-os package
  • Python security tools (bandit, ruff) cannot scan TypeScript
  • No independent versioning — VS Code extension releases were coupled to agent-os
  • npm dependencies polluted the agent-os directory

Changes

  • Pure \git mv\ — 32 files renamed, 0 content changes
  • Updated tutorial cross-references
  • Removed VSIX build artifacts

What stays the same

  • All source code is identical (rename only)
  • package.json, tsconfig.json, extension entry point unchanged
  • VS Code extension ID and functionality unaffected

Closes #491

@github-actions github-actions bot added documentation Improvements or additions to documentation size/XS Extra small PR (< 10 lines) labels Mar 28, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 28, 2026

🤖 AI Agent: security-scanner — Security Review of PR #491: Refactor VS Code Extension to Standalone Package

Security Review of PR #491: Refactor VS Code Extension to Standalone Package

This PR primarily involves a reorganization of the repository structure, moving the VS Code extension from packages/agent-os/extensions/vscode/ to packages/agent-os-vscode/ as a standalone package. The changes are limited to file renaming and updates to paths in configuration files. There are no changes to the source code or functionality of the extension.

Security Issues Checklist

1. Prompt Injection Defense Bypass

  • Risk: No new code or changes to existing logic have been introduced in this PR. The PR only involves file renaming and path updates. Therefore, there is no new risk of prompt injection defense bypass.
  • Rating: 🔵 LOW
  • Recommendation: No action needed for this PR. However, ensure that the policyEngine.ts file (which appears to handle policy logic) is thoroughly tested for prompt injection vulnerabilities in the future.

2. Policy Engine Circumvention

  • Risk: The policyEngine.ts file is moved without modification, so there is no new risk of policy circumvention introduced by this PR.
  • Rating: 🔵 LOW
  • Recommendation: No action required for this PR. Ensure that the policy engine is tested in future updates to the codebase.

3. Trust Chain Weaknesses

  • Risk: No changes to trust chain mechanisms (e.g., SPIFFE/SVID validation or certificate pinning) are present in this PR.
  • Rating: 🔵 LOW
  • Recommendation: No action required for this PR.

4. Credential Exposure

  • Risk: No credentials or sensitive information are introduced or exposed in this PR. The changes are limited to file renaming and path updates.
  • Rating: 🔵 LOW
  • Recommendation: No action required for this PR.

5. Sandbox Escape

  • Risk: No changes to sandboxing or process isolation mechanisms are present in this PR.
  • Rating: 🔵 LOW
  • Recommendation: No action required for this PR.

6. Deserialization Attacks

  • Risk: No changes to deserialization logic or data handling are present in this PR.
  • Rating: 🔵 LOW
  • Recommendation: No action required for this PR.

7. Race Conditions

  • Risk: No changes to concurrency or time-of-check-to-time-of-use (TOCTOU) logic are present in this PR.
  • Rating: 🔵 LOW
  • Recommendation: No action required for this PR.

8. Supply Chain

  • Risk: The PR does not introduce new dependencies or modify existing ones. However, the package-lock.json file was moved, and it is important to verify that no malicious dependencies were introduced in the process.
  • Rating: 🔵 LOW
  • Recommendation: Perform a dependency audit to ensure no malicious or vulnerable dependencies exist in the package-lock.json file.

Additional Observations

  1. ClusterFuzzLite Workflow Changes:

    • The PR modifies the cflite.yml workflow to restrict the paths that trigger the workflow. This change limits the scope of fuzzing to Python files and specific directories. While this is not inherently a security issue, it reduces the scope of fuzz testing, which could potentially miss vulnerabilities in the VS Code extension.
    • Risk: 🟡 MEDIUM
    • Recommendation: Ensure that the VS Code extension is covered by a separate fuzzing workflow or extend the existing cflite.yml workflow to include the new packages/agent-os-vscode/ directory.
  2. NuGet Command Change in esrp-publish.yml:

    • The PR replaces the DotNetCoreCLI@2 task with NuGetCommand@2 for pushing to NuGet.org. This change does not appear to introduce any immediate security risks, but it is important to verify that the NuGetCommand@2 task is configured securely (e.g., no credentials are exposed in logs).
    • Risk: 🔵 LOW
    • Recommendation: Ensure that the NuGetCommand@2 task is configured securely and does not expose sensitive information.

Summary of Findings

Issue Risk Recommendation
Prompt injection defense bypass 🔵 LOW No action required for this PR.
Policy engine circumvention 🔵 LOW No action required for this PR.
Trust chain weaknesses 🔵 LOW No action required for this PR.
Credential exposure 🔵 LOW No action required for this PR.
Sandbox escape 🔵 LOW No action required for this PR.
Deserialization attacks 🔵 LOW No action required for this PR.
Race conditions 🔵 LOW No action required for this PR.
Supply chain 🔵 LOW Perform a dependency audit on package-lock.json.
Reduced fuzzing scope 🟡 MEDIUM Ensure the VS Code extension is covered by a fuzzing workflow.
NuGet command change 🔵 LOW Verify secure configuration of the NuGetCommand@2 task in esrp-publish.yml.

Final Assessment

This PR is primarily a refactor with no changes to the source code or functionality of the VS Code extension. The primary concern is the reduced scope of the ClusterFuzzLite workflow, which could result in missed vulnerabilities in the VS Code extension. This should be addressed by ensuring the extension is covered by fuzzing workflows. Additionally, a dependency audit should be performed on the package-lock.json file to ensure no malicious dependencies were introduced during the move.

Overall Risk Rating for this PR: 🟡 MEDIUM

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 28, 2026

🤖 AI Agent: docs-sync-checker — Issues Found

📝 Documentation Sync Report

Issues Found

  • ⚠️ packages/agent-os-vscode/README.md — Ensure the README reflects the new package structure and any changes in usage or installation instructions.
  • ⚠️ CHANGELOG.md — No entry for this structural change. While functionality remains the same, the reorganization of the VS Code extension into a standalone package should be documented.

Suggestions

  • 💡 Update packages/agent-os-vscode/README.md to clarify the new package location and confirm that installation and usage instructions remain accurate.
  • 💡 Add an entry in CHANGELOG.md to document the extraction of the VS Code extension into packages/agent-os-vscode/.

Notes

  • No new public APIs were introduced, so no new docstrings or type hints are required.
  • Example code does not appear to be impacted, as there are no changes to the functionality or API of the VS Code extension.

Please address the identified issues to ensure documentation remains in sync with the repository changes.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🤖 AI Agent: code-reviewer

Review Summary

This pull request refactors the repository by extracting the VS Code extension from packages/agent-os/extensions/vscode/ to a standalone sibling package at packages/agent-os-vscode/. The changes are primarily file renames, with no modifications to the content of the files. The stated goals of this refactor are to address security tooling issues, enable independent versioning, and isolate npm dependencies from the Python-based agent-os package.

Given the nature of this PR, the review focuses on ensuring that the refactor does not introduce regressions or break existing functionality.


Review Feedback

✅ General Observations

  1. File Integrity: The PR appears to be a clean git mv operation, with no changes to the content of the files. This ensures that the functionality of the VS Code extension remains unchanged.
  2. Documentation Updates: The tutorial cross-references have been updated to reflect the new location of the VS Code extension. This is a good practice to maintain consistency.
  3. Build Artifacts: The removal of VSIX build artifacts is appropriate, as these should not be version-controlled.

🔴 CRITICAL

No critical security issues were identified in this PR, as it is a pure refactor with no changes to the codebase.


🟡 WARNING

  1. Potential Breaking Change:
    • While the functionality of the VS Code extension remains unchanged, the extraction of the extension to a standalone package introduces a potential breaking change for any tooling, scripts, or processes that rely on the old file paths. Ensure that all dependent CI/CD pipelines, documentation, and external references are updated to reflect the new structure.

💡 SUGGESTIONS

  1. Testing the Refactor:

    • While the PR description states that this is a pure git mv operation, it is important to verify that the VS Code extension still functions as expected after the move. Ensure that the extension can still be built, packaged, and installed in VS Code without issues. Automated tests for the extension should also be run to confirm no regressions.
  2. Versioning:

    • Since the VS Code extension is now a standalone package, consider adding a versioning strategy for it. This will help manage updates and releases independently of the agent-os package.
  3. README Updates:

    • While the README.md file for the VS Code extension has been moved, it would be helpful to add a note in the root README.md or the agent-os package's README.md to indicate that the VS Code extension has been moved to a standalone package. This will help users locate it more easily.
  4. Cross-Repository References:

    • If there are any external references to the old path (e.g., in issue templates, wiki pages, or other repositories), ensure they are updated to point to the new location.
  5. Dependency Management:

    • Since the VS Code extension is now isolated, ensure that its package.json dependencies are up to date and do not include unnecessary or vulnerable packages. Running a dependency audit (e.g., npm audit) would be a good practice.
  6. Future CI/CD Enhancements:

    • Consider adding a dedicated CI/CD pipeline for the VS Code extension to handle its build, test, and release processes independently. This will help streamline its development lifecycle.

Conclusion

This PR is well-executed and achieves its goal of isolating the VS Code extension as a standalone package. While no critical issues were identified, care should be taken to address potential breaking changes and ensure that the refactor does not disrupt existing workflows or dependencies. Additionally, the suggestions provided above can help improve the maintainability and usability of the repository moving forward.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 28, 2026

🤖 AI Agent: breaking-change-detector — Summary

🔍 API Compatibility Report

Summary

This pull request involves a pure refactor that moves the VS Code extension from one directory to another within the repository. The changes are limited to file renaming and directory restructuring, with no modifications to the actual source code or APIs. There are no breaking changes or alterations to the Python packages published to PyPI.

Findings

Severity Package Change Impact
None No changes to public Python APIs No impact

Migration Guide

No migration steps are necessary, as this refactor does not affect the Python packages or their APIs.


This refactor is safe from an API compatibility perspective. ✅

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🤖 AI Agent: code-reviewer

Review of PR #491: Refactor to Extract VS Code Extension

Summary

This pull request proposes to refactor the repository by moving the VS Code extension from packages/agent-os/extensions/vscode/ to packages/agent-os-vscode/ as a standalone sibling package. The stated goals are to address TypeScript security issues, improve tooling compatibility, and decouple the extension's versioning from the agent-os package.


🔍 Review Checklist

1. Policy Engine Correctness

  • No changes to the policy engine: Since this PR is a pure file move with no content changes, there is no impact on the policy engine's correctness. ✅

2. Trust/Identity: Cryptographic Operations, Credential Handling, SPIFFE/SVID

  • No changes to cryptographic operations or credential handling: The PR does not modify any logic related to cryptography, authentication, or identity. ✅

3. Sandbox Escape Vectors

  • No new sandbox escape vectors introduced: The PR only involves file renaming and restructuring. There are no changes to the code that could introduce sandbox escape vulnerabilities. ✅

4. Thread Safety in Concurrent Agent Execution

  • No impact on thread safety: The PR does not modify any Python code or introduce concurrency-related changes. ✅

5. OWASP Agentic Top 10 Compliance

  • No new risks introduced: The PR does not introduce any new functionality or modify existing code, so there is no impact on OWASP Agentic Top 10 compliance. ✅

6. Type Safety and Pydantic Model Validation

  • No changes to Python code or Pydantic models: This PR does not involve any Python code changes, so there is no impact on type safety or model validation. ✅

7. Backward Compatibility

  • 🟡 WARNING: Potential breaking change for consumers of the VS Code extension
    • While the PR states that the VS Code extension's functionality and ID remain unchanged, the directory structure has been altered. If there are any external scripts, CI/CD pipelines, or documentation that reference the old path (packages/agent-os/extensions/vscode/), they will break.
    • Actionable Recommendation: Ensure that all references to the old path are updated in the repository and any external documentation or scripts. Add a note in the release notes about this structural change.

8. General Observations

  • 💡 SUGGESTION: Update CI/CD pipelines
    • Ensure that the CI/CD pipelines for building and publishing the VS Code extension are updated to reflect the new directory structure (packages/agent-os-vscode/).
    • Verify that the package.json and tsconfig.json files are correctly configured for the new location.
  • 💡 SUGGESTION: Add a README note
    • Consider adding a note in the root README.md or a CHANGELOG.md file to inform contributors about the new location of the VS Code extension.

Final Assessment

  • The PR is a straightforward refactor with no content changes, so it is safe to merge from a technical perspective.
  • However, there is a potential breaking change due to the directory structure change, which could impact external references or scripts. This should be clearly communicated in the release notes and verified in the CI/CD pipeline.

Recommended Actions Before Merging

  1. 🟡 Update references: Verify and update any references to the old path in the repository, CI/CD pipelines, and external documentation.
  2. 💡 Test CI/CD pipelines: Ensure that the VS Code extension can still be built, tested, and published from its new location.
  3. 💡 Add release notes: Document this structural change in the release notes to inform users of the new location.

Let me know if you need further assistance!

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🤖 AI Agent: code-reviewer

Review Summary

This pull request proposes a structural refactor to extract the VS Code extension from the agent-os package into its own standalone package, agent-os-vscode. The changes are limited to file renaming and updating references, with no modifications to the source code. The motivation for this change is to improve security scanning, enable independent versioning, and isolate the VS Code extension's dependencies from the Python-based agent-os package.

Given the nature of this PR, the changes are straightforward and primarily organizational. However, there are some considerations and potential risks to address.


🔴 CRITICAL

No critical issues were found in this pull request. The changes are limited to file renaming and restructuring, with no modifications to the actual source code.


🟡 WARNING

  1. Potential Breaking Change in Build/Release Pipelines

    • If the CI/CD pipeline or release process for the VS Code extension relies on the previous directory structure, this change could break those workflows. Ensure that all relevant build and deployment scripts have been updated to reflect the new directory structure.
    • Action: Verify that the CI/CD pipeline for the VS Code extension has been updated and tested to ensure it works with the new structure.
  2. Backward Compatibility for Documentation Links

    • While the PR mentions that tutorial cross-references have been updated, ensure that all external references (e.g., documentation, blog posts, or other repositories) pointing to the old directory structure are also updated. Broken links could confuse users.
    • Action: Perform a thorough check for external references to the old directory structure and update them accordingly.

💡 SUGGESTIONS

  1. Add a Migration Note

    • Since this change introduces a new package structure, it would be helpful to add a migration note in the repository's main README.md or CHANGELOG.md. This note should explain the rationale for the change and provide guidance for users who may be affected by the new structure.
    • Action: Add a section in the main README.md or CHANGELOG.md explaining the new structure and any steps users need to take to adapt.
  2. Add Tests for the New Package

    • While the PR states that no source code has been modified, it's still a good practice to ensure that the extracted package is tested in isolation. This is especially important for ensuring that the VS Code extension continues to function as expected after the refactor.
    • Action: Add or verify existing tests for the agent-os-vscode package in the CI pipeline.
  3. Verify Dependency Management

    • Since the VS Code extension now resides in its own package, ensure that its package.json file includes all necessary dependencies and that there are no redundant or missing dependencies.
    • Action: Run a dependency audit (e.g., npm audit) on the agent-os-vscode package to ensure there are no vulnerabilities or missing dependencies.
  4. Update Versioning Strategy

    • The PR mentions that the VS Code extension will now have independent versioning. Ensure that the versioning strategy for the new package is documented and communicated to the team.
    • Action: Document the versioning strategy for agent-os-vscode in the repository's contribution guidelines or release documentation.
  5. Verify Publishing Workflow

    • The PUBLISHING.md file has been moved, but ensure that the publishing process for the VS Code extension has been tested and is functional in the new structure.
    • Action: Perform a dry run of the publishing process for the agent-os-vscode package to ensure there are no issues.
  6. Consider Adding a README to the Old Directory

    • To help users who may navigate to the old directory, consider adding a README.md file in the packages/agent-os/extensions/ directory that explains the relocation of the VS Code extension and provides a link to the new location.
    • Action: Add a README.md file in the old directory with a note about the relocation.

Final Recommendation

This is a well-structured and necessary refactor that improves the maintainability and security posture of the repository. However, ensure that all CI/CD pipelines, documentation, and external references are updated to reflect the new structure. Additionally, test the publishing and build workflows for the new agent-os-vscode package to avoid any disruptions.

@imran-siddique imran-siddique force-pushed the refactor/extract-vscode-extension branch from f88b328 to 348eb7c Compare March 28, 2026 16:24
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🤖 AI Agent: code-reviewer

Review Summary

This pull request proposes a straightforward refactor to extract the VS Code extension from the agent-os package into its own standalone package, agent-os-vscode. The changes are primarily file moves, with no modifications to the source code, and updates to documentation and build configurations to reflect the new structure. The stated goals of the refactor are to address security concerns, improve maintainability, and enable independent versioning for the VS Code extension.

The changes appear to be well-scoped and do not introduce any functional changes to the codebase. However, there are a few areas that warrant attention to ensure the refactor is complete and does not inadvertently introduce issues.


🔴 CRITICAL

No critical security issues were identified in this pull request. The changes are limited to file reorganization and do not modify the functionality of the VS Code extension or the Python agent.


🟡 WARNING

  1. Potential Breaking Change in Build/Release Pipelines:
    • The esrp-publish.yml file was modified to replace the DotNetCoreCLI@2 task with NuGetCommand@2. While this change is unrelated to the VS Code extension refactor, it could potentially break the build or release process if not thoroughly tested. Ensure that this change is intentional and has been validated in a staging environment.

💡 SUGGESTIONS

  1. Update Documentation and Release Notes:

    • While the PR mentions that tutorial cross-references were updated, ensure that all documentation (including any external references, wiki pages, or README files) reflects the new package structure. This is particularly important for developers or users who may rely on the VS Code extension.
    • Consider adding a note in the release notes or changelog for the agent-os package to inform users about the extraction of the VS Code extension.
  2. Verify Build and Release Processes:

    • Since the VS Code extension is now a standalone package, ensure that its build and release processes are properly configured and tested. This includes verifying that the vsce tool (or equivalent) is correctly set up to package and publish the extension.
  3. Dependency Management:

    • With the VS Code extension now in its own package, ensure that its package.json file accurately reflects all dependencies and that there are no unused or redundant dependencies. Running a tool like npm audit or yarn audit can help identify any security vulnerabilities in the dependencies.
  4. Backward Compatibility:

    • While the extension's functionality and ID remain unchanged, confirm that users who have already installed the extension will not experience any disruptions (e.g., due to changes in the extension's directory structure or packaging).
  5. Cross-Package Integration Testing:

    • If the VS Code extension interacts with the agent-os package or other parts of the monorepo, ensure that integration tests are in place to validate the interactions after the refactor.
  6. Sandboxing and Security:

    • Since the VS Code extension may execute user-provided code or interact with sensitive resources, ensure that it adheres to best practices for sandboxing and security. While this is not directly related to the refactor, it is a good opportunity to review the extension's security posture.

Conclusion

This PR is a well-executed refactor that improves the maintainability and modularity of the codebase. The changes are limited to file moves and documentation updates, with no modifications to the source code. However, the change to the esrp-publish.yml file should be carefully reviewed and tested to avoid potential disruptions to the build or release process. Additionally, the suggestions provided above should be considered to ensure a smooth transition and maintain the security and functionality of the VS Code extension.

@imran-siddique imran-siddique force-pushed the refactor/extract-vscode-extension branch from bafbbdf to c852f13 Compare March 28, 2026 16:32
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🤖 AI Agent: code-reviewer

Review Summary

This pull request proposes a structural refactor to extract the VS Code extension from packages/agent-os/extensions/vscode/ into its own standalone package at packages/agent-os-vscode/. The changes are primarily file moves (git mv) with no modifications to the source code itself. The stated goals of this refactor are to isolate the VS Code extension for independent versioning, improve security tooling compatibility, and avoid cross-contamination of dependencies.

The changes appear to be straightforward and well-documented, but there are a few areas that require attention to ensure the integrity of the project and its functionality.


🔴 CRITICAL

  1. Build and Release Pipeline Update
    • The esrp-publish.yml pipeline file was modified to change a task from DotNetCoreCLI@2 to NuGetCommand@2. This change is unrelated to the stated purpose of the PR and could have unintended consequences for the build and release process. If this change is intentional, it should be explained in the PR description. Otherwise, it should be reverted.

🟡 WARNING

  1. Backward Compatibility
    • While the PR claims that the VS Code extension's functionality and ID remain unchanged, it's crucial to verify that the extension's behavior and compatibility with existing users are not impacted. Specifically:
      • Ensure that the extension's unique identifier (publisher.name) in package.json remains the same.
      • Verify that the extension's publishing pipeline is updated to reflect the new directory structure.
      • Confirm that any existing references to the extension in documentation, CI/CD pipelines, or other parts of the project are updated to point to the new location.

💡 SUGGESTIONS

  1. Testing the VS Code Extension

    • Even though the PR involves only a file move, it's essential to verify that the VS Code extension still functions as expected. Consider adding a note in the PR description about any manual or automated tests performed to validate the extension's behavior after the move.
  2. Documentation Updates

    • While the PR mentions that tutorial cross-references were updated, it's worth double-checking that all documentation (including README files, contribution guides, and any internal documentation) reflects the new directory structure.
  3. Dependency Management

    • Since the VS Code extension is now a standalone package, ensure that its package.json file includes all necessary dependencies and that there are no unused dependencies. Running a tool like npm prune or depcheck can help identify unnecessary dependencies.
  4. Security Tooling

    • With the VS Code extension now isolated, consider integrating TypeScript-specific security tools (e.g., eslint-plugin-security, tslint-config-security) into the CI/CD pipeline for this package. This would address the original concern about Python security tools being unable to scan TypeScript code.
  5. Versioning Strategy

    • The PR mentions that the refactor allows for independent versioning of the VS Code extension. It would be helpful to document the versioning strategy for this package moving forward. For example, will it follow semantic versioning? Will its versioning be independent of the main agent-os package?
  6. Future Maintenance

    • Consider adding a note in the README.md of the new package to clarify its purpose and relationship with the rest of the repository. This will help future contributors understand its role and how it fits into the overall project.

Final Assessment

The PR appears to be a well-executed structural refactor with minimal risk of introducing functional regressions, assuming the claims about no content changes are accurate. However, the unexplained change to the pipeline (esrp-publish.yml) is concerning and should be addressed before merging. Additionally, some follow-up actions are recommended to ensure the long-term maintainability and security of the newly extracted package.

Suggested Actions Before Merging:

  1. Revert or justify the change to esrp-publish.yml.
  2. Verify that the VS Code extension functions as expected after the move.
  3. Confirm that all references to the VS Code extension in documentation and pipelines are updated.
  4. Ensure that the package.json file for the VS Code extension is clean and complete.

Suggested Follow-Up Actions:

  1. Integrate TypeScript-specific security tools into the CI/CD pipeline for the VS Code extension.
  2. Document the versioning strategy for the standalone VS Code extension.
  3. Add a note in the README.md of the new package to explain its purpose and relationship to the rest of the repository.

@github-actions github-actions bot added ci/cd CI/CD and workflows size/S Small PR (< 50 lines) labels Mar 28, 2026
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🤖 AI Agent: code-reviewer

Review Summary

This pull request proposes a refactor to extract the VS Code extension from the agent-os package into its own standalone package, agent-os-vscode. The changes are primarily file moves and updates to references, with no modifications to the actual source code. The motivation for this change is to improve security scanning, enable independent versioning, and reduce cross-contamination of dependencies between the Python and TypeScript codebases.

The changes appear to be well-scoped and follow a clean separation of concerns. However, there are a few areas that require attention or further clarification.


🔴 CRITICAL

No critical security issues were identified in this pull request. The changes are limited to file reorganization and do not introduce new functionality or modify existing logic.


🟡 WARNING

  1. Potential Breaking Change in CI/CD Workflow
    • The ClusterFuzzLite workflow has been updated to include a paths filter that restricts the workflow to specific directories. However, this filter does not include the new packages/agent-os-vscode/ directory. This omission could result in the VS Code extension being excluded from fuzz testing, which may lead to undetected vulnerabilities in the extension.
    • Action: Add packages/agent-os-vscode/** to the paths filter in the ClusterFuzzLite workflow.

💡 SUGGESTIONS

  1. Documentation Updates

    • While the PR mentions that tutorial cross-references have been updated, it would be helpful to explicitly confirm that all documentation, including any README files, has been reviewed and updated to reflect the new package structure.
    • Action: Double-check all documentation for references to the old directory structure and update them accordingly.
  2. Backward Compatibility

    • Since the VS Code extension is being moved to a new package, ensure that any existing users of the extension are informed about the change. If the extension is published to the VS Code Marketplace, verify that the move does not disrupt existing users or require them to reinstall the extension.
    • Action: Confirm that the extension's publishing process and user experience remain unaffected by this change.
  3. Testing

    • While the PR states that there are no content changes, it is still important to verify that the VS Code extension functions as expected after the move.
    • Action: Ensure that the extension is tested end-to-end in its new location, including building, packaging, and running it in VS Code.
  4. Dependency Management

    • The separation of the VS Code extension into its own package is a good step for isolating dependencies. However, ensure that the package.json file in agent-os-vscode is up-to-date and does not include unnecessary dependencies.
    • Action: Run a dependency audit (e.g., npm audit) on the new package to identify and address any security vulnerabilities in its dependencies.
  5. CI/CD Pipeline Updates

    • The ClusterFuzzLite workflow's fuzz-seconds parameter has been reduced from 300 to 120 seconds. While this change is unrelated to the VS Code extension refactor, it could impact the effectiveness of fuzz testing.
    • Action: Provide a justification for reducing the fuzzing time or consider reverting this change if it is not directly related to the scope of this PR.
  6. Future Consideration: Shared Code

    • If the VS Code extension shares logic or functionality with the agent-os package (e.g., the policyEngine.ts file), consider whether this shared code should be extracted into a common library to avoid duplication and ensure consistency.
    • Action: Evaluate the feasibility of creating a shared library for any common functionality between agent-os and agent-os-vscode.

Final Recommendation

Once the above issues and suggestions are addressed, this pull request should be ready for approval. The refactor is a positive step toward better modularization and security practices, but care should be taken to ensure that the changes do not inadvertently introduce regressions or gaps in testing.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🤖 AI Agent: code-reviewer

Review Summary

This PR focuses on extracting the VS Code extension from the agent-os package into its own standalone package, agent-os-vscode. The changes are primarily file moves (git mv) with no modifications to the source code. The goal is to improve modularity, separate concerns, and avoid cross-language tooling issues. The PR also updates CI/CD workflows and documentation references to reflect the new structure.

The changes are straightforward and do not introduce new functionality or modify existing code. However, there are a few areas worth reviewing for potential issues or improvements.


🔴 CRITICAL

No critical security issues were identified in this PR. The changes are limited to file organization and do not modify the logic or introduce new functionality.


🟡 WARNING

  1. Backward Compatibility Concerns
    While the PR states that the VS Code extension ID and functionality remain unchanged, it's important to ensure that users of the extension will not experience any disruptions. Specifically:

    • Verify that the extension's publisher and name fields in package.json remain unchanged.
    • Confirm that the VS Code marketplace will recognize this as an update to the existing extension and not as a new, separate extension.

    Action: Double-check the package.json and test the extension update process in a staging environment to ensure seamless upgrades for users.


💡 SUGGESTIONS

  1. CI/CD Workflow Updates
    The cflite.yml workflow was updated to include specific paths for Python files and fuzzing-related directories. However, the VS Code extension files are now in a separate package. If there are any existing or planned CI/CD workflows for the VS Code extension (e.g., linting, testing, or publishing), ensure they are updated to reflect the new package structure.

    Action: Add or update workflows for the agent-os-vscode package if necessary.

  2. Documentation Updates
    While the PR mentions that tutorial cross-references were updated, ensure that all documentation (e.g., README.md, contribution guides, etc.) reflects the new structure. This includes:

    • Updating any references to the old path (packages/agent-os/extensions/vscode/).
    • Providing clear instructions for building, testing, and publishing the VS Code extension in its new location.

    Action: Perform a thorough review of all documentation to ensure consistency.

  3. Testing the Refactor
    Although this is a pure file move, it's important to test the functionality of the VS Code extension in its new location. This includes:

    • Running the extension in a development environment to ensure it loads and functions as expected.
    • Verifying that any build or packaging scripts (e.g., vsce) work correctly in the new structure.

    Action: Perform end-to-end testing of the VS Code extension to validate the refactor.

  4. Dependency Management
    Moving the VS Code extension to a standalone package introduces a new node_modules directory for its dependencies. Ensure that:

    • Dependencies are up-to-date and free of known vulnerabilities.
    • The .gitignore file excludes node_modules to avoid accidental commits.

    Action: Run a dependency audit (e.g., npm audit) and address any issues.

  5. Pipeline Changes
    The change from DotNetCoreCLI@2 to NuGetCommand@2 in esrp-publish.yml is unrelated to the main purpose of this PR. While it may be intentional, it introduces a risk of unintended side effects.

    Action: Confirm that this change was intentional and test the pipeline to ensure it behaves as expected.


Final Assessment

This PR is well-scoped and addresses the need for better modularity and separation of concerns. The changes are low-risk, but the following actions should be taken to ensure a smooth transition:

  1. Verify backward compatibility for the VS Code extension.
  2. Update CI/CD workflows and documentation to reflect the new structure.
  3. Perform end-to-end testing of the VS Code extension in its new location.
  4. Audit dependencies for the new package.
  5. Confirm the intent and impact of the pipeline change.

Once these items are addressed, the PR should be ready for approval.

imran-siddique and others added 3 commits March 28, 2026 09:41
- mcp-proxy: shebang must be line 1 (TS18026)
- copilot, mcp-server: typescript ^6.0.2 → ^5.7.0 (eslint <6.0.0)
- NuGet: replace ESRP Sign+Release with NuGetCommand@2 push
  via NuGet.org service connection

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rosoft#491)

Move the VS Code extension from packages/agent-os/extensions/vscode/
to packages/agent-os-vscode/ as a standalone sibling package.

Motivation:
- VS Code TS code was nested inside a Python package (agent-os)
- Security issues in TS code got filed against wrong package
- Python security tools (bandit, ruff) cannot scan TypeScript
- No independent versioning or release cycle
- npm dependencies polluted agent-os directory

Changes:
- git mv packages/agent-os/extensions/vscode -> packages/agent-os-vscode
- Updated cross-references in vscode-extension tutorial
- Removed VSIX build artifacts from tracking

Closes microsoft#491

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Reduce PR fuzz-seconds from 300 (5 min) to 120 (2 min) — sufficient
  for regression detection without wasting CI minutes
- Add path filters: only run fuzzing when Python source, fuzz targets,
  or fuzz config change — skip for docs/config/rename-only PRs
- Batch fuzzing (weekly/push) unchanged at 1800s

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@imran-siddique imran-siddique force-pushed the refactor/extract-vscode-extension branch from 7d00808 to d2d1f5b Compare March 28, 2026 16:41
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🤖 AI Agent: code-reviewer

Review Summary

This pull request refactors the repository by extracting the VS Code extension into its own standalone package, packages/agent-os-vscode/. The changes primarily involve moving files and updating references, with no modifications to the source code itself. This refactor improves the separation of concerns, facilitates independent versioning, and resolves issues related to mixing TypeScript and Python tooling.

The changes appear to be well-scoped and low-risk, as they are limited to file renames and path updates. However, there are a few areas that require attention to ensure the integrity of the refactor and the overall project.


🔴 CRITICAL

  1. ClusterFuzzLite Workflow Path Exclusion
    • The updated cflite.yml workflow excludes the VS Code extension (packages/agent-os-vscode/) from being monitored for changes. This could lead to undetected issues in the extension's codebase, especially if it interacts with the Python agent code.
    • Recommendation: Update the paths section in the workflow to include the new packages/agent-os-vscode/ directory. For example:
      paths:
        - 'packages/*/src/**/*.py'
        - 'packages/agent-os-vscode/**'
        - 'fuzz/**'
        - '.clusterfuzzlite/**'

🟡 WARNING

  1. Potential Breaking Change in CI/CD Pipeline
    • The esrp-publish.yml pipeline was modified to replace the DotNetCoreCLI@2 task with NuGetCommand@2. While this change is unrelated to the VS Code extension refactor, it could potentially break the pipeline if the new task is not configured correctly or if it does not support the same functionality as the previous task.
    • Recommendation: Verify that the NuGetCommand@2 task is a drop-in replacement for DotNetCoreCLI@2 in this context. Test the pipeline thoroughly to ensure it behaves as expected.

💡 SUGGESTIONS

  1. Documentation Updates

    • While the PR mentions that tutorial cross-references were updated, it would be helpful to explicitly confirm that all documentation, including README.md files and any other references to the old path (packages/agent-os/extensions/vscode/), have been updated to reflect the new location. This ensures that users and contributors can easily find the VS Code extension.
  2. Backward Compatibility

    • Since the VS Code extension is now a standalone package, ensure that any existing users of the extension are informed about the change. If there are any automated scripts or processes that rely on the old path, they may break. Consider adding a note in the release notes or documentation to inform users about this change.
  3. Testing

    • While the PR states that there are no content changes, it is still important to verify that the VS Code extension works as expected after the move. Ensure that:
      • The extension can still be built and packaged into a .vsix file.
      • The extension functions correctly when installed in VS Code.
      • Any integration tests for the extension are updated to reflect the new path.
  4. Independent Versioning

    • Since the VS Code extension is now a standalone package, consider setting up independent versioning for it. This will allow you to release updates to the extension without being tied to the versioning of the agent-os package.
  5. Security Review

    • While this PR does not introduce new code, the extracted VS Code extension contains files related to authentication (rbacManager.ts, ssoProvider.ts) and compliance (frameworkLoader.ts). These files should be reviewed for security vulnerabilities, especially if they handle sensitive data or interact with external systems.

Conclusion

This PR is a well-executed refactor that improves the modularity and maintainability of the repository. However, the following actions are recommended before merging:

  • 🔴 Include the new packages/agent-os-vscode/ directory in the cflite.yml workflow paths.
  • 🟡 Verify the pipeline change from DotNetCoreCLI@2 to NuGetCommand@2.
  • 💡 Confirm documentation updates, test the VS Code extension, and consider independent versioning and a security review for the extracted extension.

Let me know if you need further clarification or assistance!

MythologIQ added a commit to MythologIQ/agent-governance-toolkit that referenced this pull request Mar 28, 2026
Move VS Code extension from packages/agent-os/extensions/vscode/ to
packages/agent-os-vscode/ as a standalone sibling package (aligns with
upstream PR microsoft#546). Integrate upstream security fixes: CSP nonces on all
legacy panels, prototype pollution protection in WorkflowDesigner,
ReDoS-safe regex in PolicyEngine, token-in-SecretStorage for SSO.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🤖 AI Agent: code-reviewer

Review Summary

This pull request proposes a straightforward refactor to extract the VS Code extension from the agent-os package into its own standalone package, agent-os-vscode. The changes are primarily file moves (git mv) with no modifications to the content of the files. The PR also includes minor updates to CI/CD workflows and documentation to reflect the new directory structure.

The refactor appears to be well-executed and aligns with the stated goals of improving security scanning, enabling independent versioning, and isolating dependencies. However, there are a few areas that require attention or clarification.


🔴 CRITICAL

No critical security issues were identified in this pull request. However, the following areas should be reviewed in the future to ensure compliance with security best practices:

  1. Dependency Management for the VS Code Extension:

    • Since the VS Code extension is now a standalone package, ensure that its package.json dependencies are regularly audited for vulnerabilities using tools like npm audit or snyk. This is particularly important because TypeScript/JavaScript ecosystems are prone to supply chain attacks.
  2. Policy Engine Integration:

    • The policyEngine.ts file was moved without modification. Ensure that the policy engine's functionality is thoroughly tested in the new package structure to avoid any potential regressions that could lead to security bypasses.

🟡 WARNING

  1. Backward Compatibility:

    • While the PR states that the VS Code extension ID and functionality remain unchanged, it's important to verify that the extraction does not break any existing workflows or integrations. For example:
      • Are there any hardcoded paths or assumptions in the agent-os package that reference the old location of the VS Code extension?
      • Are there any external dependencies or scripts that rely on the previous directory structure?
  2. CI/CD Workflow Changes:

    • The cflite.yml workflow file was updated to exclude the new agent-os-vscode package from fuzzing. While this is likely intentional (since the extension is written in TypeScript), ensure that this exclusion does not inadvertently reduce the test coverage for the overall repository.

💡 SUGGESTIONS

  1. Documentation Updates:

    • While the PR mentions that tutorial cross-references were updated, it would be helpful to confirm that all references to the old VS Code extension path have been updated across the repository, including any external documentation or READMEs.
  2. Testing:

    • Even though the changes are primarily file moves, it's recommended to run end-to-end tests for the VS Code extension to ensure that the refactor did not introduce any issues. This is especially important for verifying that the extension's functionality remains intact after the move.
  3. Versioning:

    • Since the VS Code extension is now a standalone package, consider establishing a clear versioning strategy for it. This will help in managing updates and dependencies independently of the agent-os package.
  4. CI/CD Enhancements:

    • Consider adding a separate CI/CD workflow for the agent-os-vscode package to ensure that its TypeScript code is linted, tested, and built independently of the Python-based agent-os package.
  5. Future Improvements:

    • Explore the possibility of integrating security scanning tools for the TypeScript codebase (e.g., npm audit, snyk, or eslint-plugin-security) into the CI/CD pipeline for the agent-os-vscode package.

Final Assessment

The proposed changes are well-structured and align with the goals of improving modularity, security, and maintainability. However, the following actions are recommended before merging:

  1. Verify that the refactor does not introduce any backward compatibility issues, especially with external dependencies or scripts.
  2. Ensure that the VS Code extension's functionality is thoroughly tested in its new location.
  3. Confirm that all documentation and references to the old path have been updated.

Once these points are addressed, the PR can be safely merged.

auto-merge was automatically disabled March 29, 2026 01:03

Pull request was closed

imran-siddique pushed a commit that referenced this pull request Apr 3, 2026
…ecutive dashboard (#738)

* feat(vscode): add governance visualization infrastructure

Add GovernanceServer with REST API and browser experience, mock backends
for policy/SLO/topology data, export system with HTML report generation,
observability metrics exporter, and service layer for provider factory
and live client integration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(vscode): add React/Tailwind webview panels and sidebar system

Replace 8-view sidebar with unified 3-slot React panel system. Add
GovernanceStore with event bus, priority engine, scanning mode, and
attention toggle. Add SLO Dashboard, Topology Graph, and Governance Hub
detail panels with D3.js force graph and Chart.js sparklines. Bundle
CDN dependencies locally in assets/vendor/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(vscode): add governance language intelligence and status bar

Add diagnostic provider with governance-specific rules, code actions for
quick fixes, integration rule definitions, and completion provider. Add
governance-aware status bar with real-time indicators.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor(vscode): extract extension to packages/agent-os-vscode/

Move VS Code extension from packages/agent-os/extensions/vscode/ to
packages/agent-os-vscode/ as a standalone sibling package (aligns with
upstream PR #546). Integrate upstream security fixes: CSP nonces on all
legacy panels, prototype pollution protection in WorkflowDesigner,
ReDoS-safe regex in PolicyEngine, token-in-SecretStorage for SSO.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs(vscode): add documentation, tests, and security policy

Add HELP.md user guide, SECURITY.md policy, update CHANGELOG.md and
README.md. Add 37 test files covering mock backends, language providers,
webview components, governance store, and sidebar subsystems.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(vscode): harden browser script esc() to escape quotes

Replace DOM-based esc() with string-based replacement that escapes all
five HTML-significant characters (& < > " '), consistent with
ReportGenerator.ts and escapeHtml utility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(vscode): address code review security findings

- WebSocket auth: move session token from URL query string to
  Sec-WebSocket-Protocol subprotocol header. Query strings can leak
  into proxy logs and browser history; subprotocol headers are not
  logged by default. Client sends ['governance-v1', token], server
  validates via handleProtocols callback.

- Rate limiter: add TTL eviction to prevent unbounded Map growth.
  Stale entries are pruned on each checkRateLimit() call.

- Python path: add null byte rejection to prevent POSIX path
  truncation attacks. spawn() already uses array args (no shell),
  so metachar regex is defense-in-depth only.

- CSP style-src: document why 'unsafe-inline' is required (VS Code
  injects theme CSS variables as inline styles at runtime, outside
  extension control). Cannot use style nonces/hashes for
  platform-injected styles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(vscode): residual sweep — stale docs, misleading comments, test gap

- Correct handleProtocols comment: ws library does NOT reject connections
  when false is returned; real auth is in the connection handler
- Update serverHelpers.ts comment: token now via subprotocol, not query
- Update HELP.md: reflect subprotocol auth and TTL eviction
- Add null byte rejection test for isValidPythonPath
- Add CSP security comments to all 4 legacy webview panels

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(vscode): type safety, OTel validation, keyboard navigation

- GovernanceStore: constrain panelType from string to DetailPanelType
  union ('slo'|'topology'|'audit'|'policy'|'hub') for compile-time
  safety on detail subscriptions and fetcher dispatch

- MetricsExporter: validate endpoint URL on construction and
  setEndpoint(). Reject non-URL strings and non-http(s) protocols
  with console.warn. push() silently no-ops when endpoint is empty.
  4 new tests for validation behavior.

- Sidebar keyboard navigation: Arrow Up/Down moves focus between
  panel slots. Slots have tabIndex, role="region", aria-label, and
  focus-visible ring. Keybindings registered in package.json
  (ctrl+shift+down/up when sidebar focused).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(vscode): add detail panels, browser executive dashboard, and security hardening

Add 5 dedicated detail webview panels (Kernel Debugger, Memory Browser,
Safety Stats, Audit Log, Active Policies) so all 8 sidebar panels now
open their own full-panel React views instead of falling back to the
Governance Hub.

Redesign the browser dashboard as an executive governance experience:
- Single-screen grid layout with all panels visible simultaneously
- 6 premium themes (Corporate Slate, Midnight Blue, Onyx, Azure Mist,
  High Contrast Dark, High Contrast Light) persisted via localStorage
- Policy editor with 5 governance templates (Strict Security, SOC 2,
  GDPR, Development, Rate Limiting), validation, test scenarios, and
  file download/import
- Real-time filtering on Audit Log (by severity) and Policies (by action)
- SLO trend arrows showing delta between updates
- Full data broadcast (SLO, topology, audit, policies) over WebSocket

Security hardening:
- Fix CSP mismatch between HTTP header and HTML meta tag (blob: for downloads)
- Escape all data values in browser innerHTML with esc() including numerics
- Sanitize CSS class attribute injection via regex whitelist
- Fix pre-existing XSS in CMVK results panel (escHtml on external API data)

Sidebar fixes:
- Panel settings modal now fully opaque (was 5% transparent)
- Browser launch button added to sidebar header
- PROMOTE_COMMANDS correctly routes all 8 panels

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd CI/CD and workflows documentation Improvements or additions to documentation size/S Small PR (< 50 lines) size/XS Extra small PR (< 10 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: extract VS Code extension to packages/agent-os-vscode/

1 participant