diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c4227804..e2fff1ad7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- `agent-relay integration subscribe` now sends Relayfile path filters using Relaycast's `path_glob` wire field, preventing scoped subscriptions from silently receiving broader event sets. - Broker bridge now treats a blank/whitespace-only nested `sessionRef` inside `metadata.attestation` as absent; a valid top-level `session_ref` correctly fills the field instead of being silently suppressed. ## [11.5.1] - 2026-08-10 diff --git a/packages/cli/src/cli/commands/integration-subscribe.test.ts b/packages/cli/src/cli/commands/integration-subscribe.test.ts index ffb2a37a1..bf6239f23 100644 --- a/packages/cli/src/cli/commands/integration-subscribe.test.ts +++ b/packages/cli/src/cli/commands/integration-subscribe.test.ts @@ -295,6 +295,25 @@ describe('integration subscribe', () => { ); }); + it('serializes the resolved path filter with the Relaycast wire key', async () => { + const resolved = '/github/repos/AgentWorkforce/relay/**'; + const relayfile = createRelayfileMock([], { + resolveResourcePath: vi.fn(async () => ({ pathGlob: resolved })), + }); + const { program } = harness({ relayfile }); + + await program.parseAsync(ARGS(), { from: 'user' }); + + const [, request] = vi.mocked(fetch).mock.calls[0]!; + const body = JSON.parse(String(request?.body)) as Record; + expect(body).toEqual({ + channel: 'general', + provider: 'slack', + path_glob: resolved, + }); + expect(body).not.toHaveProperty('pathGlob'); + }); + it('fails loudly before provisioning when no workspace key is available', async () => { const home = fs.mkdtempSync(path.join(os.tmpdir(), 'relay-no-workspace-')); vi.stubEnv('AGENT_RELAY_HOME', home); diff --git a/packages/cli/src/cli/commands/integration.ts b/packages/cli/src/cli/commands/integration.ts index d820d8b09..75789226c 100644 --- a/packages/cli/src/cli/commands/integration.ts +++ b/packages/cli/src/cli/commands/integration.ts @@ -464,7 +464,7 @@ async function createRelayfileInboundTarget( body: JSON.stringify({ channel: input.channel, provider: input.provider, - pathGlob: input.pathGlob, + path_glob: input.pathGlob, }), }); let body: unknown;