Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changeset/fix-agent-directory-visibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

Fix agent directory visibility - registered agents now appear immediately without approval
9 changes: 9 additions & 0 deletions server/src/db/migrations/017_approve_all_agents.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- Approve all pending agents
-- Now that approval is no longer required, approve any existing pending agents

UPDATE registry_entries
SET approval_status = 'approved',
approved_at = NOW(),
updated_at = NOW()
WHERE entry_type = 'agent'
AND approval_status = 'pending';
11 changes: 3 additions & 8 deletions server/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5959,7 +5959,7 @@ export class HTTPServer {
contact_name,
contact_email,
contact_website,
approval_status: 'pending', // New agents need approval
approval_status: 'approved',
workos_organization_id: targetOrgId,
});

Expand All @@ -5971,7 +5971,7 @@ export class HTTPServer {

res.status(201).json({
agent: entry,
message: 'Agent created successfully. It will be visible in the registry once approved.',
message: 'Agent created successfully.',
});
} catch (error) {
logger.error({ err: error }, 'Create agent error');
Expand Down Expand Up @@ -6070,11 +6070,6 @@ export class HTTPServer {
allowedUpdates.metadata = metadata;
}

// Updates reset approval status to pending (agent needs re-review)
if (Object.keys(allowedUpdates).length > 0) {
allowedUpdates.approval_status = 'pending';
}

const updatedAgent = await registryDb.updateEntry(existingAgent.slug, allowedUpdates);

logger.info({
Expand All @@ -6084,7 +6079,7 @@ export class HTTPServer {

res.json({
agent: updatedAgent,
message: 'Agent updated successfully. Changes will be visible once approved.',
message: 'Agent updated successfully.',
});
} catch (error) {
logger.error({ err: error }, 'Update agent error');
Expand Down