:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
revert(mcp): drop CSP _meta from UI app entries in resources/list (#98925)
Jake Ruth5a2a07fd6b19
diff --git a/services/mcp/src/hono/resource-catalog.ts b/services/mcp/src/hono/resource-catalog.tsindex fd3bfb4c5f19..aa297f3d6f02 100644--- a/services/mcp/src/hono/resource-catalog.ts+++ b/services/mcp/src/hono/resource-catalog.ts@@ -185,7 +185,6 @@ export class ResourceCatalog {uri: app.uri,mimeType: RESOURCE_MIME_TYPE,description: app.description,- _meta: meta,})this.uiAppReadEntries.set(app.uri, {uri: app.uri,diff --git a/services/mcp/tests/hono/resource-catalog.test.ts b/services/mcp/tests/hono/resource-catalog.test.tsindex e738d5d8a9d7..4b6beac41b67 100644--- a/services/mcp/tests/hono/resource-catalog.test.ts+++ b/services/mcp/tests/hono/resource-catalog.test.ts@@ -143,22 +143,6 @@ describe('ResourceCatalog', () => {expect(mockManifestEntriesSet).toHaveBeenCalledWith(2)})- it('lists UI app resources with the same CSP _meta the read entry carries', async () => {- vi.mocked(fetchAndExtractEntries).mockResolvedValue([])- vi.mocked(getPromptsFromManifest).mockResolvedValue([])-- const catalog = new ResourceCatalog(mockEnv, redis)- await catalog.warmup()-- const uri = 'ui://posthog/query-results.html'- const listed = catalog.getResourcesList().resources.find((r) => r.uri === uri)- const read = await catalog.readResource({ uri })-- const readMeta = read.contents[0]?._meta as { 'openai/widgetCSP': { resource_domains: string[] } }- expect(listed?._meta).toEqual(readMeta)- expect(readMeta['openai/widgetCSP'].resource_domains).toEqual(['https://apps.test'])- })-it('pre-merges resource list so getResourcesList returns a stable array', async () => {vi.mocked(fetchAndExtractEntries).mockResolvedValue([makeEntry('a')])vi.mocked(getPromptsFromManifest).mockResolvedValue([])