Skip to content

Conversation

@kevinbackhouse
Copy link
Collaborator

importlib.resources uses Python's import system to find a "resource" file. For example it converts a name like "personalities.examples" into the path "/home/kev/work/seclab-taskflow-agent/personalities/examples". I think it makes sense to use this for loading yaml files, because it will let us leverage Python's package system for bundling and sharing taskflows.

The main implementation change is in available_tools.py and I deleted yaml_parser.py because it is no longer needed.

Copilot AI review requested due to automatic review settings October 24, 2025 22:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors tool resolution to use Python's importlib.resources module instead of filesystem-based path lookups. The main changes convert tool references from path-based keys like GitHubSecurityLab/seclab-taskflow-agent/personalities/assistant to module-style names like personalities.assistant, allowing the project to leverage Python's import system for resource management.

  • Replaced custom YAML parsing logic with importlib.resources for resolving tools
  • Removed the filekey field from all YAML files
  • Updated all tool references to use dot notation (e.g., personalities.assistant instead of path-based keys)

Reviewed Changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
yaml_parser.py Deleted entire file as it's replaced by importlib.resources
available_tools.py Implemented new tool resolution using importlib.resources with lazy loading
main.py Updated to use new AvailableTools API and removed YamlParser initialization
mcp_utils.py Updated mcp_client_params to use AvailableTools methods
toolboxes/*.yaml Removed filekey field from all toolbox configurations
taskflows/**/*.yaml Removed filekey and updated tool references to dot notation
personalities/**/*.yaml Removed filekey field from all personality configurations
prompts/examples/*.yaml Removed filekey field
configs/model_config.yaml Removed filekey field
taskflows/GRAMMAR.md Updated documentation with new tool reference format
README.md Updated documentation removing filekey references and updating examples
.github/workflows/smoketest.yaml Updated test commands to use new dot notation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kevinbackhouse
Copy link
Collaborator Author

smoke test

@github-actions
Copy link

⚠️ Cannot proceed with deployment

  • reviewDecision: REVIEW_REQUIRED

All deployments from forks must have the required reviews before they can proceed. Please ensure this PR has been reviewed and approved before trying again.

@m-y-mo
Copy link
Contributor

m-y-mo commented Oct 27, 2025

@kevinbackhouse Can you delete the test_yaml_parser.py so the CI test can pass? Also please update the branch to this: #38 which fixed the smoke test. Thanks.

kevinbackhouse and others added 4 commits October 27, 2025 12:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@m-y-mo
Copy link
Contributor

m-y-mo commented Oct 27, 2025

smoke test

@github-actions
Copy link

Deployment Triggered 🚀

m-y-mo, started a branch deployment to production (branch: 09e05de6b4e9761227419acf05ecff48c648bd76)

You can watch the progress here 🔗

Details
{
  "type": "branch",
  "environment": {
    "name": "production",
    "url": null
  },
  "deployment": {
    "timestamp": "2025-10-27T13:56:39.092Z",
    "logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/18843485658"
  },
  "git": {
    "branch": "09e05de6b4e9761227419acf05ecff48c648bd76",
    "commit": "09e05de6b4e9761227419acf05ecff48c648bd76",
    "verified": true,
    "committer": "kevinbackhouse",
    "html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/commit/09e05de6b4e9761227419acf05ecff48c648bd76"
  },
  "context": {
    "actor": "m-y-mo",
    "noop": false,
    "fork": true,
    "comment": {
      "created_at": "2025-10-27T13:56:13Z",
      "updated_at": "2025-10-27T13:56:13Z",
      "body": "smoke test",
      "html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/pull/37#issuecomment-3451421238"
    }
  },
  "parameters": {
    "raw": null,
    "parsed": null
  }
}

@github-actions
Copy link

Deployment Results ✅

m-y-mo successfully deployed branch 09e05de6b4e9761227419acf05ecff48c648bd76 to production

Details
{
  "status": "success",
  "environment": {
    "name": "production",
    "url": null
  },
  "deployment": {
    "id": 3211438443,
    "timestamp": "2025-10-27T14:03:46.392Z",
    "logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/18843485658",
    "duration": 427
  },
  "git": {
    "branch": "09e05de6b4e9761227419acf05ecff48c648bd76",
    "commit": "09e05de6b4e9761227419acf05ecff48c648bd76",
    "verified": true
  },
  "context": {
    "actor": "m-y-mo",
    "noop": false,
    "fork": true
  },
  "reviews": {
    "count": 1,
    "decision": "APPROVED"
  },
  "parameters": {
    "raw": null,
    "parsed": null
  }
}

@kevinbackhouse kevinbackhouse merged commit a200e43 into GitHubSecurityLab:main Oct 27, 2025
5 checks passed
@kevinbackhouse kevinbackhouse deleted the importlib branch October 27, 2025 14:21
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.

2 participants