-
Notifications
You must be signed in to change notification settings - Fork 7
Add support for namespace alias #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 implements namespace aliasing functionality to simplify references to taskflows, toolboxes, and personalities. Instead of using full paths like GitHubSecurityLab/seclab-taskflow-agent/toolboxes/memcache, users can define shorter aliases (e.g., seclab-ta) either inline in YAML files or via a centralized namespace configuration file.
Key Changes:
- Added support for
namespace_aliasesfield in YAML files andnamespace_configfile reference - Implemented alias resolution mechanism through
copy_with_alias()andcanonicalize_toolboxes()functions - Updated toolbox and resource references to use the shortened alias format
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| taskflows/examples/example.yaml | Demonstrates namespace_config usage and applies alias to toolbox reference |
| taskflows/examples/echo.yaml | Shows inline namespace_aliases definition and applies alias to agent reference |
| personalities/examples/echo.yaml | Demonstrates inline namespace_aliases in personality files with alias applied to toolbox |
| main.py | Integrates namespace alias resolution into taskflow processing and agent deployment |
| configs/namespace_config.yaml | New centralized namespace configuration file defining the GitHubSecurityLab→seclab-ta alias |
| available_tools.py | Implements core aliasing logic with copy_with_alias() and canonicalize_toolboxes() functions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
available_tools.py
Outdated
| for tb in toolboxes: | ||
| found_alias = False | ||
| for k,v in alias_dict.items(): | ||
| if tb.startswith(v) and tb[len(v)] == '/': |
Copilot
AI
Oct 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code will raise an IndexError if the toolbox name equals the alias value exactly (without a trailing path). Add a length check: if tb.startswith(v) and len(tb) > len(v) and tb[len(v)] == '/':
available_tools.py
Outdated
| alias_keys = alias_dict.keys() | ||
| for k,v in original_dict.items(): | ||
| for ak in alias_keys: | ||
| if k.startswith(ak) and k[len(ak)] == '/': |
Copilot
AI
Oct 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will raise an IndexError if a key equals the alias exactly. Add a length check: if k.startswith(ak) and len(k) > len(ak) and k[len(ak)] == '/':
| if k.startswith(ak) and k[len(ak)] == '/': | |
| if k.startswith(ak) and len(k) > len(ak) and k[len(ak)] == '/': |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| alias_keys = alias_dict.keys() | ||
| for k,v in original_dict.items(): | ||
| for ak in alias_keys: | ||
| if k.startswith(ak) and len(k) > len(ak) and k[len(ak)] == '/': | ||
| new_key = alias_dict[ak] + k[len(ak):] | ||
| new_dict[new_key] = v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The loop over alias_keys looks inefficient. I think something like this would be better:
| alias_keys = alias_dict.keys() | |
| for k,v in original_dict.items(): | |
| for ak in alias_keys: | |
| if k.startswith(ak) and len(k) > len(ak) and k[len(ak)] == '/': | |
| new_key = alias_dict[ak] + k[len(ak):] | |
| new_dict[new_key] = v | |
| for k,v in original_dict.items(): | |
| ak = k.split('/')[0] | |
| av = alias_dict[ak] | |
| if alias_value: | |
| new_key = av + k[len(ak):] | |
| new_dict[new_key] = v |
| return toolboxes | ||
| for tb in toolboxes: | ||
| found_alias = False | ||
| for k,v in alias_dict.items(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above about looping over all the aliases.
|
smoke test |
|
|
smoke test |
|
smoke test |
|
|
smoke test |
Deployment Triggered 🚀JarLob, started a branch deployment to production (branch: You can watch the progress here 🔗 Details{
"type": "branch",
"environment": {
"name": "production",
"url": null
},
"deployment": {
"timestamp": "2025-10-24T11:29:18.224Z",
"logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/18778406045"
},
"git": {
"branch": "namespace_aliases",
"commit": "e1079c5669222579c0cdfa448f3af0a0482fa7dc",
"verified": false,
"committer": "m-y-mo",
"html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/commit/e1079c5669222579c0cdfa448f3af0a0482fa7dc"
},
"context": {
"actor": "JarLob",
"noop": false,
"fork": false,
"comment": {
"created_at": "2025-10-24T11:28:56Z",
"updated_at": "2025-10-24T11:28:56Z",
"body": "smoke test",
"html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/pull/33#issuecomment-3442642757"
}
},
"parameters": {
"raw": null,
"parsed": null
}
} |
Deployment Results ❌JarLob had a failure when deploying branch Details{
"status": "failure",
"environment": {
"name": "production",
"url": null
},
"deployment": {
"id": 3199897421,
"timestamp": "2025-10-24T11:31:50.401Z",
"logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/18778406045",
"duration": 152
},
"git": {
"branch": "namespace_aliases",
"commit": "e1079c5669222579c0cdfa448f3af0a0482fa7dc",
"verified": false
},
"context": {
"actor": "JarLob",
"noop": false,
"fork": false
},
"reviews": {
"count": 1,
"decision": "APPROVED"
},
"parameters": {
"raw": null,
"parsed": null
}
} |
|
smoke test |
Deployment Triggered 🚀JarLob, started a branch deployment to production (branch: You can watch the progress here 🔗 Details{
"type": "branch",
"environment": {
"name": "production",
"url": null
},
"deployment": {
"timestamp": "2025-10-24T11:40:16.089Z",
"logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/18778649917"
},
"git": {
"branch": "namespace_aliases",
"commit": "e1079c5669222579c0cdfa448f3af0a0482fa7dc",
"verified": false,
"committer": "m-y-mo",
"html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/commit/e1079c5669222579c0cdfa448f3af0a0482fa7dc"
},
"context": {
"actor": "JarLob",
"noop": false,
"fork": false,
"comment": {
"created_at": "2025-10-24T11:39:57Z",
"updated_at": "2025-10-24T11:39:57Z",
"body": "smoke test",
"html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/pull/33#issuecomment-3442689529"
}
},
"parameters": {
"raw": null,
"parsed": null
}
} |
Deployment Results ❌JarLob had a failure when deploying branch Details{
"status": "failure",
"environment": {
"name": "production",
"url": null
},
"deployment": {
"id": 3199946258,
"timestamp": "2025-10-24T11:42:50.556Z",
"logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/18778649917",
"duration": 154
},
"git": {
"branch": "namespace_aliases",
"commit": "e1079c5669222579c0cdfa448f3af0a0482fa7dc",
"verified": false
},
"context": {
"actor": "JarLob",
"noop": false,
"fork": false
},
"reviews": {
"count": 1,
"decision": "APPROVED"
},
"parameters": {
"raw": null,
"parsed": null
}
} |
|
smoke test |
Deployment Triggered 🚀JarLob, started a branch deployment to production (branch: You can watch the progress here 🔗 Details{
"type": "branch",
"environment": {
"name": "production",
"url": null
},
"deployment": {
"timestamp": "2025-10-24T12:04:46.154Z",
"logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/18779171202"
},
"git": {
"branch": "namespace_aliases",
"commit": "e1079c5669222579c0cdfa448f3af0a0482fa7dc",
"verified": false,
"committer": "m-y-mo",
"html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/commit/e1079c5669222579c0cdfa448f3af0a0482fa7dc"
},
"context": {
"actor": "JarLob",
"noop": false,
"fork": false,
"comment": {
"created_at": "2025-10-24T12:04:22Z",
"updated_at": "2025-10-24T12:04:22Z",
"body": "smoke test",
"html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/pull/33#issuecomment-3442783467"
}
},
"parameters": {
"raw": null,
"parsed": null
}
} |
Deployment Results ❌JarLob had a failure when deploying branch Details{
"status": "failure",
"environment": {
"name": "production",
"url": null
},
"deployment": {
"id": 3200056043,
"timestamp": "2025-10-24T12:08:21.610Z",
"logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/18779171202",
"duration": 215
},
"git": {
"branch": "namespace_aliases",
"commit": "e1079c5669222579c0cdfa448f3af0a0482fa7dc",
"verified": false
},
"context": {
"actor": "JarLob",
"noop": false,
"fork": false
},
"reviews": {
"count": 1,
"decision": "APPROVED"
},
"parameters": {
"raw": null,
"parsed": null
}
} |
|
smoke test |
Deployment Triggered 🚀JarLob, started a branch deployment to production (branch: You can watch the progress here 🔗 Details{
"type": "branch",
"environment": {
"name": "production",
"url": null
},
"deployment": {
"timestamp": "2025-10-24T12:09:11.298Z",
"logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/18779274902"
},
"git": {
"branch": "namespace_aliases",
"commit": "e1079c5669222579c0cdfa448f3af0a0482fa7dc",
"verified": false,
"committer": "m-y-mo",
"html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/commit/e1079c5669222579c0cdfa448f3af0a0482fa7dc"
},
"context": {
"actor": "JarLob",
"noop": false,
"fork": false,
"comment": {
"created_at": "2025-10-24T12:08:42Z",
"updated_at": "2025-10-24T12:08:42Z",
"body": "smoke test",
"html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/pull/33#issuecomment-3442799074"
}
},
"parameters": {
"raw": null,
"parsed": null
}
} |
Deployment Results ❌JarLob had a failure when deploying branch Details{
"status": "failure",
"environment": {
"name": "production",
"url": null
},
"deployment": {
"id": 3200078812,
"timestamp": "2025-10-24T12:11:31.384Z",
"logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/18779274902",
"duration": 140
},
"git": {
"branch": "namespace_aliases",
"commit": "e1079c5669222579c0cdfa448f3af0a0482fa7dc",
"verified": false
},
"context": {
"actor": "JarLob",
"noop": false,
"fork": false
},
"reviews": {
"count": 1,
"decision": "APPROVED"
},
"parameters": {
"raw": null,
"parsed": null
}
} |
|
smoke test |
Deployment Triggered 🚀m-y-mo, started a branch deployment to production (branch: You can watch the progress here 🔗 Details{
"type": "branch",
"environment": {
"name": "production",
"url": null
},
"deployment": {
"timestamp": "2025-10-24T16:12:58.440Z",
"logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/18785529467"
},
"git": {
"branch": "namespace_aliases",
"commit": "883f42ab763658c8195985c50595b59e3207e57d",
"verified": true,
"committer": "web-flow",
"html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/commit/883f42ab763658c8195985c50595b59e3207e57d"
},
"context": {
"actor": "m-y-mo",
"noop": false,
"fork": false,
"comment": {
"created_at": "2025-10-24T16:12:34Z",
"updated_at": "2025-10-24T16:12:34Z",
"body": "smoke test",
"html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/pull/33#issuecomment-3443928690"
}
},
"parameters": {
"raw": null,
"parsed": null
}
} |
Deployment Results ❌m-y-mo had a failure when deploying branch Details{
"status": "failure",
"environment": {
"name": "production",
"url": null
},
"deployment": {
"id": 3201372159,
"timestamp": "2025-10-24T16:15:12.499Z",
"logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/18785529467",
"duration": 134
},
"git": {
"branch": "namespace_aliases",
"commit": "883f42ab763658c8195985c50595b59e3207e57d",
"verified": true
},
"context": {
"actor": "m-y-mo",
"noop": false,
"fork": false
},
"reviews": {
"count": 1,
"decision": "APPROVED"
},
"parameters": {
"raw": null,
"parsed": null
}
} |
|
smoke test |
Deployment Triggered 🚀m-y-mo, started a branch deployment to production (branch: You can watch the progress here 🔗 Details{
"type": "branch",
"environment": {
"name": "production",
"url": null
},
"deployment": {
"timestamp": "2025-10-27T10:28:01.993Z",
"logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/18837764207"
},
"git": {
"branch": "namespace_aliases",
"commit": "883f42ab763658c8195985c50595b59e3207e57d",
"verified": true,
"committer": "web-flow",
"html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/commit/883f42ab763658c8195985c50595b59e3207e57d"
},
"context": {
"actor": "m-y-mo",
"noop": false,
"fork": false,
"comment": {
"created_at": "2025-10-27T10:27:44Z",
"updated_at": "2025-10-27T10:27:44Z",
"body": "smoke test",
"html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/pull/33#issuecomment-3450559961"
}
},
"parameters": {
"raw": null,
"parsed": null
}
} |
Deployment Results ✅m-y-mo successfully deployed branch Details{
"status": "success",
"environment": {
"name": "production",
"url": null
},
"deployment": {
"id": 3210322075,
"timestamp": "2025-10-27T10:33:02.262Z",
"logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/18837764207",
"duration": 300
},
"git": {
"branch": "namespace_aliases",
"commit": "883f42ab763658c8195985c50595b59e3207e57d",
"verified": true
},
"context": {
"actor": "m-y-mo",
"noop": false,
"fork": false
},
"reviews": {
"count": 1,
"decision": "APPROVED"
},
"parameters": {
"raw": null,
"parsed": null
}
} |
|
close in favour of this: #37 |
This allows toolboxes, taskflows etc. to be referenced using a simplied and shortened id specified either in a config file or in the yaml file itself. A bit like
using namespaceinc++orimport packages as pinpython.