Repository navigation
feat(api): filter runtime workloads by agent, runtime and reachability - #2332
Merged
Merged
Conversation
Contributor
|
The latest Buf updates on your PR. Results from workflow Buf CI / verify-proto (pull_request).
|
akijakya
force-pushed
the
feat/filter-runtime-workloads
branch
from
October 12, 2026 15:59
97dc6bc to
d0eb580
Compare
There was a problem hiding this comment.
🟢 Approval recommended
The API, generated bindings, compatibility wrappers, dependency mapping, and targeted tests are consistent and complete.
0 open findings
What changed in this PR
Adds OASF metadata and filtering support to the runtime workload API while preserving the existing label-only Go client methods.
Changes:
- Adds workload skills/domains and request filters for skills, domains, and locator protocols.
- Adds full-request Go client methods with compatibility wrappers.
- Pins OASF protobuf dependencies and extends client/deep-copy tests.
| File | Description |
|---|---|
proto/buf.yaml |
Adds the pinned OASF dependency. |
proto/buf.lock |
Locks the OASF module revision. |
proto/buf.gen.yaml |
Maps OASF protos to published Go types. |
proto/agntcy/dir/runtime/v1/workload.proto |
Adds workload skills and domains. |
proto/agntcy/dir/runtime/v1/discovery_service.proto |
Adds workload filter fields and semantics. |
client/runtime.go |
Adds full-request list methods. |
client/runtime_test.go |
Tests filter and compatibility forwarding. |
api/runtime/v1/workload.pb.go |
Regenerates the workload Go API. |
api/runtime/v1/workload_test.go |
Tests deep-copy behavior for new fields. |
api/runtime/v1/discovery_service.pb.go |
Regenerates the discovery request Go API. |
Files not reviewed (2)
- api/runtime/v1/discovery_service.pb.go: Generated file
- api/runtime/v1/workload.pb.go: Generated file
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
akijakya
force-pushed
the
feat/filter-runtime-workloads
branch
from
October 13, 2026 08:22
d0eb580 to
c3a0b2d
Compare
akijakya
marked this pull request as draft
October 13, 2026 09:01
akijakya
force-pushed
the
feat/filter-runtime-workloads
branch
from
October 13, 2026 10:41
c3a0b2d to
9d1acd5
Compare
akijakya
force-pushed
the
feat/filter-runtime-workloads
branch
from
October 13, 2026 11:26
9d1acd5 to
5c63814
Compare
akijakya
force-pushed
the
feat/filter-runtime-workloads
branch
2 times, most recently
from
October 13, 2026 11:43
c31580d to
80a15fb
Compare
Turn the planned runtime type and reachability filters of ListWorkloadsRequest into fields, and add agent filters (names, skills, domains, authors, schema versions) and a locator protocol filter. The agent filters are evaluated against what a workload says about the agent it runs: its A2A card, whose OASF discovery and identity extensions carry skills, domains, schema version and author, and otherwise the OASF record it references. Values match as in record search: exactly (case-insensitive) or with * and ? wildcards. Add Workload.AgentInfo and Workload.MatchesFilters, which evaluates every filter of the request (labels included, with the regex semantics dir-runtime uses today), so dir-runtime and dirctl filter the same way without copying values into Workload. Only extensions served by an accepted OASF schema server are read (https://schema.oasf.outshift.com by default). Add ListWorkloadsWithRequest and ListWorkloadsStreamWithRequest to the Go client so callers can send the new filters; the label-only methods now delegate to them. Refs #2307 Signed-off-by: András Jáky <[email protected]>
akijakya
force-pushed
the
feat/filter-runtime-workloads
branch
from
October 13, 2026 11:55
80a15fb to
5f5ed87
Compare
akijakya
marked this pull request as ready for review
October 13, 2026 12:16
…ope reachability AgentInfo now takes each of schema version, skills and domains from the record unless the card's discovery extension provides it, so an extension without domains keeps the record's domains. Reachability only counts isolation groups within the same runtime and discovery instance (org.agntcy/discovery-instance), since group names such as "host", Kubernetes namespaces and Docker networks repeat across hosts and clusters sharing a store. Complete the client method comments. Refs #2307 Signed-off-by: András Jáky <[email protected]>
akijakya
enabled auto-merge
October 13, 2026 13:41
ramizpolic
approved these changes
Oct 13, 2026
akijakya
added a commit
to agntcy/dir-runtime
that referenced
this pull request
Oct 13, 2026
The commit on dir main that contains the workload locators (agntcy/dir#2302) and the workload filters (agntcy/dir#2332). Signed-off-by: András Jáky <[email protected]>
akijakya
added a commit
to agntcy/dir-runtime
that referenced
this pull request
Oct 14, 2026
* chore(deps): bump dir API and client to the locators commit Use github.com/agntcy/dir/api and client at cc5b967 (agntcy/dir#2302), which adds Workload locators. The API now requires Go 1.27.1 and k8s.io/apimachinery v0.37.1, so the Go toolchain (Taskfile, builder images) and k8s.io/api and client-go move along. To be replaced by the released tag before release. Signed-off-by: András Jáky <[email protected]> * feat(discovery): describe workload endpoints as locators Signed-off-by: András Jáky <[email protected]> * chore(chart): regenerate DiscoveredWorkload CRD with locators Signed-off-by: András Jáky <[email protected]> * chore(store): apply Go 1.27 embedded literal modernization Signed-off-by: András Jáky <[email protected]> * docs: document workload locators Signed-off-by: András Jáky <[email protected]> * chore(deps): pin dir API and client to agntcy/dir@9252429b The commit on dir main that contains the workload locators (agntcy/dir#2302) and the workload filters (agntcy/dir#2332). Signed-off-by: András Jáky <[email protected]> * fix(discovery): probe card URLs by the locator's protocol The A2A resolver chose what to probe from the locator URL's scheme, so a locator declared as slim (or grpc) with an http:// URL was probed. It now decides from the declared protocol: tcp tries http and https, http and https use that scheme, and every other protocol is skipped. Also cover inspectToWorkload's host-mode branch, which derives locators from the published port bindings. Signed-off-by: András Jáky <[email protected]> --------- Signed-off-by: András Jáky <[email protected]>
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.


Adds agent and locator filters to
ListWorkloadsRequest, so running workloads can be listed by what the agent in them can do and who stands behind it. The filters are implemented by dir-runtime (agntcy/dir-runtime#106) and exposed bydirctl runtime list(#2310); this PR changes the API and the Go client.Changes
ListWorkloadsRequest:names,skills,domains,authors,schema_versionsandlocator_protocols, next tolabels. The two filters that were only planned (commented out) become fields:runtime_types(e.g.docker,kubernetes,process) andreachable_from_workload_id(workloads sharing an isolation group with the given workload, excluding it; nothing matches if it doesn't exist). A workload matches a filter if it matches at least one of its values; different filters combine with AND, and an unset filter matches every workload. Values match as in record search: exactly (case-insensitive), or with*and?wildcards, e.g.natural_language_processing/*. Locator protocols compare exactly.services.a2a): the card'sname, and the OASFdiscoveryandidentityextensions (skills, domains, schema version, and the DID of the human vouching for the agent). Anything the card doesn't provide comes from the OASF record the workload references (services.oasf). When both are present, the card wins.Workloaditself gets no new fields: the values are read from the card and the record, not copied.Workload.AgentInfo/Workload.MatchesFilters(api/runtime/v1/agent.go): shared helpers, so dir-runtime (filtering) anddirctl(display and re-filtering) read cards and records the same way.MatchesFiltersevaluates every filter of the request, labels included, with the regex semantics dir-runtime uses today; the caller passes the workload named byreachable_from_workload_idinFilterOptions. Only extensions served by an accepted OASF schema server are read (<schema URL>[/<version>]/objects/discovery, defaulthttps://schema.oasf.outshift.com), so a schema server running locally works for testing and an unknown one is ignored.ListWorkloadsWithRequestandListWorkloadsStreamWithRequestsend a full request;ListWorkloads/ListWorkloadsStreamkeep their label-only signature and call them.Testing
task lint(golangci-lint in every module,buf lint, Helm) andbuf breakingagainstmainpass.task test:unitpasses, including tests forAgentInfo(card extensions, record fallback, unaccepted and configured schema servers) andMatchesFilters(every filter, wildcards, case, label regexes, reachability, AND), and client tests checking that every filter is passed through.Notes
discoveryextension object for skills and domains oasf#549 (discovery) and Add anidentityextension object for running agents oasf#551 (identity), which are still under review;AgentInforeads the author from the identity extension'shuman_did.dirctl searchor the catalog UI: listing them reveals where agents run, so they get their own command and access control.Closes #2307