Skip to content

agent-permissions: store agent cards in registry service#3631

Merged
mschuwalow merged 13 commits into
mainfrom
agent-permissions-17
Jun 23, 2026
Merged

agent-permissions: store agent cards in registry service#3631
mschuwalow merged 13 commits into
mainfrom
agent-permissions-17

Conversation

@mschuwalow

Copy link
Copy Markdown
Contributor

No description provided.

@netlify

netlify Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploy Preview for golemcloud canceled.

Name Link
🔨 Latest commit 2d07b8c
🔍 Latest deploy log https://app.netlify.com/projects/golemcloud/deploys/6a39bb2f31910d00089a1821

@mschuwalow mschuwalow changed the base branch from main to agent-permissions-16 June 11, 2026 15:11
@mschuwalow mschuwalow changed the title Agent permissions 17 agent-permission: list_visible_environments cleanup Jun 11, 2026
@mschuwalow mschuwalow changed the title agent-permission: list_visible_environments cleanup agent-permissions: store cards in registry service Jun 11, 2026
@github-actions

Copy link
Copy Markdown

📖 Docs preview: https://docs-nvqykk39v-golem-cloud.vercel.app

Built from commit 20c2315357c46ebf849f8dd532e060ed63763863 by docs.yaml.

@mschuwalow mschuwalow changed the title agent-permissions: store cards in registry service agent-permissions: store agent cards in registry service Jun 12, 2026
@mschuwalow mschuwalow marked this pull request as ready for review June 12, 2026 11:32
@mschuwalow mschuwalow force-pushed the agent-permissions-16 branch from a1d7c2d to 3895a60 Compare June 15, 2026 13:34
@mschuwalow mschuwalow force-pushed the agent-permissions-17 branch from 39a170c to b82335b Compare June 15, 2026 13:34
@mschuwalow mschuwalow force-pushed the agent-permissions-16 branch from 3895a60 to dddfc1f Compare June 15, 2026 14:09
@mschuwalow mschuwalow force-pushed the agent-permissions-17 branch from b82335b to 204af2e Compare June 15, 2026 14:09
@mschuwalow mschuwalow force-pushed the agent-permissions-16 branch from dddfc1f to 45bedac Compare June 17, 2026 09:43
@mschuwalow mschuwalow force-pushed the agent-permissions-17 branch from 204af2e to 14b2aff Compare June 17, 2026 09:43
@mschuwalow mschuwalow self-assigned this Jun 17, 2026
@mschuwalow mschuwalow force-pushed the agent-permissions-17 branch from 25646c2 to 41b94c4 Compare June 18, 2026 09:40
Base automatically changed from agent-permissions-16 to main June 18, 2026 14:11
@mschuwalow mschuwalow requested a review from a team June 18, 2026 14:11
@mschuwalow mschuwalow force-pushed the agent-permissions-17 branch from 41b94c4 to dab14e0 Compare June 18, 2026 14:12
@blacksmith-sh

This comment has been minimized.

let component_metadata =
component_metadata.with_agent_initial_permissions(default_initial_permissions(
let component_metadata = component_metadata.with_agent_initial_permissions(
self.create_default_initial_permissions(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What happens with this if the validate step below fails?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Right now this will leak the card (which is not great, but not a correctness problem). I will switch this to be part of the component transaction once we are actually getting the cards from the api instead of using a placeholder

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed here #3649

self.cache_revoked_cards(card_ids);
}

async fn check_cards(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How efficient this batched registry service call is? As we do this on every agent instantiation. Can we cache it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We cannot really cache it as we can otherwise miss invalidations. The correct behaviour relies on us starting the subscription first and then checking all live cards explicitly.
We can potentially improve this by skipping the fetch for a card if another agent already loaded it and we can guarantee that it is still valid. Let me do this in a followup, as the shape of this service changes quite a bit in the following prs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed here #3649

.map(|(k, v)| {
crate::serialization::serialize(&v)
.map(|template| (k.0, template))
.expect("failed to serialize agent initial permission template")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this acceptable here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The component-metadata cards are just placeholders until they are properly passing in through the api and put into the AgentProvisionConfig. So I would like to leave it like this here

@mschuwalow mschuwalow requested a review from vigoo June 22, 2026 14:43
@mschuwalow mschuwalow force-pushed the agent-permissions-17 branch from dab14e0 to d9c2598 Compare June 22, 2026 22:03
@mschuwalow mschuwalow merged commit ce6c494 into main Jun 23, 2026
49 of 50 checks passed
@mschuwalow mschuwalow deleted the agent-permissions-17 branch June 23, 2026 09:31
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants