Skip to content

Commit d6ceca3

Browse files
bokelleyclaude
andauthored
chore: bump @adcp/client to 4.23.0 (#2006)
* chore: bump @adcp/client to 4.23.0 Picks up storyboard-driven comply() routing from adcp-client#445. 25/25 testable storyboards pass locally against training agent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: remove deprecated PLATFORM_STORYBOARDS and storyboard routing from addie @adcp/client 4.23.0 now handles storyboard-driven comply() routing. Addie no longer needs its own PLATFORM_STORYBOARDS mapping or storyboard-to-scenario resolution. Removed: - PLATFORM_STORYBOARDS constant and getPlatformStoryboards() - resolveStoryboardScenarios() — client handles this internally - storyboards option from ComplyOptions — callers pass platform_type - Storyboard routing block in evaluate_agent_quality - Storyboard routing block in compliance heartbeat - PLATFORM_STORYBOARDS tests Kept: - filterToKnownScenarios() — still used by storyboard run/compare endpoints - comply() wrapper — still needed for track-based reporting and observations - All types, TRACK_SCENARIOS, PLATFORM_PROFILES — backward compat Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: restore platform_type in heartbeat for coherence reporting The heartbeat still needs to look up platform_type from registry metadata and pass it to comply() so platform coherence analysis is included in heartbeat results. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1849c18 commit d6ceca3

7 files changed

Lines changed: 15 additions & 118 deletions

File tree

.changeset/violet-signs-repair.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"check:images": "bash scripts/check-image-quality.sh"
4949
},
5050
"dependencies": {
51-
"@adcp/client": "^4.22.1",
51+
"@adcp/client": "^4.23.0",
5252
"@anthropic-ai/sdk": "^0.82.0",
5353
"@asteasolutions/zod-to-openapi": "^8.5.0",
5454
"@google/generative-ai": "^0.24.1",

server/src/addie/jobs/compliance-heartbeat.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Updates compliance status and triggers notifications on status transitions.
66
*/
77

8-
import { comply, getPlatformStoryboards, type ComplyOptions, type PlatformType } from '../services/compliance-testing.js';
8+
import { comply, type ComplyOptions, type PlatformType } from '../services/compliance-testing.js';
99
import { ComplianceDatabase, type TrackSummaryEntry, type OverallRunStatus, type LifecycleStage } from '../../db/compliance-db.js';
1010
import { query } from '../../db/client.js';
1111
import { notifyComplianceChange } from '../../notifications/compliance.js';
@@ -56,19 +56,17 @@ export async function runComplianceHeartbeatJob(options: HeartbeatOptions = {}):
5656
// These are credentials the owner saved when connecting through Addie.
5757
const auth = await complianceDb.resolveOwnerAuth(agent.agent_url);
5858

59-
// Use storyboard-based routing when the agent has a registered platform type
59+
// Pass platform_type for coherence reporting
6060
const metadata = await complianceDb.getRegistryMetadata(agent.agent_url);
61-
const storyboards = metadata?.platform_type
62-
? getPlatformStoryboards(metadata.platform_type as PlatformType)
63-
: undefined;
61+
const platformType = metadata?.platform_type as PlatformType | undefined;
6462

6563
const complyOptions: ComplyOptions = {
6664
test_session_id: `heartbeat-${Date.now()}`,
6765
dry_run: true,
6866
timeout_ms: 60_000,
6967
auth,
70-
...(storyboards && { storyboards }),
7168
userAgent: AAO_UA_COMPLIANCE,
69+
...(platformType && { platform_type: platformType }),
7270
};
7371

7472
const complianceResult = await comply(agent.agent_url, complyOptions);

server/src/addie/mcp/member-tools.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
SAMPLE_BRIEFS,
2626
getAllPlatformTypes,
2727
getPlatformProfile,
28-
getPlatformStoryboards,
2928
type ComplyOptions,
3029
type ComplianceTrack,
3130
type PlatformType,
@@ -2991,14 +2990,6 @@ export function createMemberToolHandlers(
29912990
}
29922991
complyOptions.platform_type = effectivePlatformType;
29932992

2994-
// When no explicit tracks are provided, use storyboard-based routing
2995-
if (!tracks) {
2996-
const recommendedStoryboards = getPlatformStoryboards(effectivePlatformType);
2997-
if (recommendedStoryboards) {
2998-
complyOptions.storyboards = recommendedStoryboards;
2999-
}
3000-
}
3001-
30022993
try {
30032994
const result = await comply(resolved.resolvedUrl, complyOptions);
30042995

server/src/addie/services/compliance-testing.ts

Lines changed: 3 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@ export type PlatformType =
4141

4242
export interface ComplyOptions extends TestOptions {
4343
tracks?: ComplianceTrack[];
44-
/** Run the scenarios defined by these storyboard IDs. Takes priority over tracks. */
45-
storyboards?: string[];
4644
platform_type?: PlatformType;
4745
timeout_ms?: number;
48-
/** Limit to specific scenarios directly. Bypasses both storyboard and track selection. */
46+
/** Limit to specific scenarios (e.g. from a storyboard). Bypasses track-based selection. */
4947
scenarios?: TestScenario[];
5048
}
5149

@@ -269,36 +267,6 @@ const PLATFORM_PROFILES: Record<PlatformType, PlatformProfile> = {
269267
},
270268
};
271269

272-
/**
273-
* Maps each platform type to the storyboards that define its expected behavior.
274-
*
275-
* @deprecated This mapping will move to @adcp/client once adcp-client#445
276-
* ships storyboard-based comply(). At that point, callers should pass
277-
* platform_type to comply() and let the client resolve storyboards internally.
278-
* The canonical mapping will live next to comply() in the client package.
279-
*/
280-
export const PLATFORM_STORYBOARDS: Record<PlatformType, string[]> = {
281-
display_ad_server: ['capability_discovery', 'schema_validation', 'behavioral_analysis', 'media_buy_seller', 'media_buy_state_machine', 'error_compliance'],
282-
video_ad_server: ['capability_discovery', 'schema_validation', 'behavioral_analysis', 'media_buy_seller', 'media_buy_state_machine', 'error_compliance'],
283-
social_platform: ['capability_discovery', 'schema_validation', 'behavioral_analysis', 'social_platform', 'media_buy_state_machine', 'error_compliance'],
284-
pmax_platform: ['capability_discovery', 'schema_validation', 'behavioral_analysis', 'media_buy_seller', 'media_buy_state_machine', 'creative_lifecycle', 'error_compliance'],
285-
dsp: ['capability_discovery', 'schema_validation', 'behavioral_analysis', 'media_buy_seller', 'media_buy_state_machine', 'error_compliance'],
286-
retail_media: ['capability_discovery', 'schema_validation', 'behavioral_analysis', 'media_buy_seller', 'media_buy_catalog_creative', 'media_buy_state_machine', 'error_compliance'],
287-
search_platform: ['capability_discovery', 'schema_validation', 'behavioral_analysis', 'media_buy_seller', 'media_buy_state_machine', 'error_compliance'],
288-
audio_platform: ['capability_discovery', 'schema_validation', 'behavioral_analysis', 'media_buy_seller', 'media_buy_state_machine', 'error_compliance'],
289-
creative_transformer: ['capability_discovery', 'creative_template'],
290-
creative_library: ['capability_discovery', 'creative_lifecycle'],
291-
creative_ad_server: ['capability_discovery', 'creative_ad_server'],
292-
si_platform: ['capability_discovery', 'si_session'],
293-
ai_ad_network: ['capability_discovery', 'schema_validation', 'behavioral_analysis', 'media_buy_seller', 'media_buy_state_machine', 'creative_lifecycle', 'error_compliance'],
294-
ai_platform: ['capability_discovery', 'schema_validation', 'behavioral_analysis', 'creative_template', 'error_compliance'],
295-
generative_dsp: ['capability_discovery', 'schema_validation', 'behavioral_analysis', 'media_buy_seller', 'media_buy_state_machine', 'creative_lifecycle', 'error_compliance'],
296-
};
297-
298-
export function getPlatformStoryboards(platformType: PlatformType): string[] | undefined {
299-
return PLATFORM_STORYBOARDS[platformType];
300-
}
301-
302270
export function getBriefsByVertical(vertical: string): SampleBrief[] {
303271
const normalized = vertical.trim().toLowerCase();
304272
return SAMPLE_BRIEFS.filter((brief) => brief.vertical === normalized);
@@ -478,36 +446,9 @@ function tracksForScenarios(scenarios: TestScenario[]): ComplianceTrack[] {
478446
return tracks;
479447
}
480448

481-
/**
482-
* Resolve storyboard IDs to a merged, deduped list of known scenarios.
483-
* Uses dynamic import to avoid circular dependency with storyboards.ts.
484-
*/
485-
async function resolveStoryboardScenarios(storyboardIds: string[]): Promise<TestScenario[]> {
486-
const { getStoryboard, extractScenariosFromStoryboard } = await import('../../services/storyboards.js');
487-
const allScenarios = new Set<string>();
488-
for (const id of storyboardIds) {
489-
const sb = getStoryboard(id);
490-
if (sb) {
491-
for (const s of extractScenariosFromStoryboard(sb)) {
492-
allScenarios.add(s);
493-
}
494-
}
495-
}
496-
return filterToKnownScenarios([...allScenarios]);
497-
}
498-
499449
export async function comply(agentUrl: string, options: ComplyOptions = {}): Promise<ComplyResult> {
500-
// Priority: scenarios > storyboards > tracks > default (all tracks)
501-
let scenarioList: TestScenario[];
502-
if (options.scenarios?.length) {
503-
scenarioList = options.scenarios;
504-
} else if (options.storyboards?.length) {
505-
scenarioList = await resolveStoryboardScenarios(options.storyboards);
506-
} else {
507-
scenarioList = buildScenarioList(options.tracks);
508-
}
509-
510-
const requestedTracks = (options.scenarios?.length || options.storyboards?.length)
450+
const scenarioList = options.scenarios ?? buildScenarioList(options.tracks);
451+
const requestedTracks = options.scenarios?.length
511452
? tracksForScenarios(scenarioList)
512453
: options.tracks?.length
513454
? options.tracks
Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { describe, it, expect } from 'vitest';
2-
import { TRACK_SCENARIOS, buildScenarioList, PLATFORM_STORYBOARDS } from '../../src/addie/services/compliance-testing.js';
3-
import { getStoryboard } from '../../src/services/storyboards.js';
2+
import { TRACK_SCENARIOS, buildScenarioList } from '../../src/addie/services/compliance-testing.js';
43

54
describe('TRACK_SCENARIOS', () => {
65
it('maps reporting track to deterministic_delivery', () => {
@@ -32,37 +31,3 @@ describe('buildScenarioList', () => {
3231
}
3332
});
3433
});
35-
36-
describe('PLATFORM_STORYBOARDS', () => {
37-
it('every platform type maps to at least one storyboard', () => {
38-
for (const [, storyboards] of Object.entries(PLATFORM_STORYBOARDS)) {
39-
expect(storyboards.length).toBeGreaterThan(0);
40-
}
41-
});
42-
43-
it('every mapped storyboard ID is a valid storyboard', () => {
44-
const allIds = new Set<string>();
45-
for (const storyboards of Object.values(PLATFORM_STORYBOARDS)) {
46-
for (const id of storyboards) {
47-
allIds.add(id);
48-
}
49-
}
50-
for (const id of allIds) {
51-
expect(getStoryboard(id)).toBeDefined();
52-
}
53-
});
54-
55-
it('si_platform maps to si_session', () => {
56-
expect(PLATFORM_STORYBOARDS.si_platform).toContain('si_session');
57-
});
58-
59-
it('social_platform maps to social_platform storyboard', () => {
60-
expect(PLATFORM_STORYBOARDS.social_platform).toContain('social_platform');
61-
});
62-
63-
it('every platform type includes capability_discovery', () => {
64-
for (const [, storyboards] of Object.entries(PLATFORM_STORYBOARDS)) {
65-
expect(storyboards).toContain('capability_discovery');
66-
}
67-
});
68-
});

0 commit comments

Comments
 (0)