Repository navigation
feat(task): work out what a stored task requires by the rule bundle register uses - #389
Merged
Merged
Conversation
…egister uses task_requires(steps, declared) gives the plugin packages behind a task's own step types and the types of the envs and artifacts its steps read from the store, with those they hold. A package the previous version required keeps its range; one used anew is at least the installed version; one no longer used is dropped unless a reference can't be read here, when every declared one is kept. A service that saves tasks without a bundle, such as the hub, calls it on every save. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s they hold An agent can hold an image artifact of a plugin's type, so task_requires now reads agent references too and walks what the agent holds, as it does for envs. An agent it can't read keeps every declared package, as any unreadable reference does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
@greptileai review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
task_requires(steps, declared=())inagent_env.bundle.requires: what a stored task requires, by the rulebundle registerrecords on the tasks it writes, for a service that saves tasks without a bundle (the hub).register.declared(what the previous version required) names keeps the range written there; one used anew is at least the installed version; one no longer used is dropped.declarednames is kept, since there's no telling whether that reference needs it.Nothing calls it in core. The hub's sdk calls it from
put_task, so every task the hub writes, edits or imports records what it needs, instead of a hub edit dropping whatregisterrecorded.Why here
The detection (
Providers,detected) already lives inbundle/requires.py; a stored-task entry point beside it keeps the hub from reading bundle internals or re-implementing the rule.Tests
tst/unit/bundle/requires_test.py::TestStoredTasks, against fake plugin packages:requiresregistering it recorded (own step type; a referenced artifact type read from the store; core only gives none);>=the installed version, an unused one is dropped;make lint,make unit-test.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issue was found.Summary
Adds
task_requires(steps, declared)to record the plugin packages a stored task needs.Reviews (2) · Last reviewed commit: "fix(task): read the agents a stored task..." · Reviewed by Greptile