@adcp/sdk 13.0.0-rc.8 → 13.0.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/adapters/roster-account-store.d.mts +9 -8
- package/dist/lib/adapters/roster-account-store.d.ts +9 -8
- package/dist/lib/adapters/roster-account-store.d.ts.map +1 -1
- package/dist/lib/adapters/roster-account-store.js +2 -1
- package/dist/lib/adapters/roster-account-store.js.map +1 -1
- package/dist/lib/adapters/roster-account-store.mjs +2 -1
- package/dist/lib/adapters/roster-account-store.mjs.map +1 -1
- package/dist/lib/net/address-guards.d.ts.map +1 -1
- package/dist/lib/net/address-guards.js +6 -0
- package/dist/lib/net/address-guards.js.map +1 -1
- package/dist/lib/net/address-guards.mjs +6 -0
- package/dist/lib/net/address-guards.mjs.map +1 -1
- package/dist/lib/net/ssrf-fetch.d.ts.map +1 -1
- package/dist/lib/net/ssrf-fetch.js +66 -53
- package/dist/lib/net/ssrf-fetch.js.map +1 -1
- package/dist/lib/net/ssrf-fetch.mjs +66 -53
- package/dist/lib/net/ssrf-fetch.mjs.map +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/account-mode.d.mts +2 -1
- package/dist/lib/server/account-mode.d.ts +2 -1
- package/dist/lib/server/account-mode.d.ts.map +1 -1
- package/dist/lib/server/account-mode.js +1 -0
- package/dist/lib/server/account-mode.js.map +1 -1
- package/dist/lib/server/account-mode.mjs +1 -0
- package/dist/lib/server/account-mode.mjs.map +1 -1
- package/dist/lib/server/create-adcp-server.d.mts +10 -6
- package/dist/lib/server/create-adcp-server.d.ts +10 -6
- package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
- package/dist/lib/server/create-adcp-server.js +2 -1
- package/dist/lib/server/create-adcp-server.js.map +1 -1
- package/dist/lib/server/create-adcp-server.mjs +2 -1
- package/dist/lib/server/create-adcp-server.mjs.map +1 -1
- package/dist/lib/server/decisioning/account.d.mts +16 -11
- package/dist/lib/server/decisioning/account.d.ts +16 -11
- package/dist/lib/server/decisioning/account.d.ts.map +1 -1
- package/dist/lib/server/decisioning/account.js.map +1 -1
- package/dist/lib/server/decisioning/account.mjs.map +1 -1
- package/dist/lib/server/decisioning/pagination.d.mts +2 -0
- package/dist/lib/server/decisioning/pagination.d.ts +2 -0
- package/dist/lib/server/decisioning/pagination.d.ts.map +1 -1
- package/dist/lib/server/decisioning/pagination.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.mts +20 -14
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +20 -14
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +32 -6
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +32 -6
- package/dist/lib/server/decisioning/runtime/from-platform.mjs.map +1 -1
- package/dist/lib/server/decisioning/specialisms/sales.d.mts +16 -4
- package/dist/lib/server/decisioning/specialisms/sales.d.ts +16 -4
- package/dist/lib/server/decisioning/specialisms/sales.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/sales.js.map +1 -1
- package/dist/lib/server/index.d.ts.map +1 -1
- package/dist/lib/server/index.js.map +1 -1
- package/dist/lib/server/index.mjs.map +1 -1
- package/dist/lib/server/legacy/v5/index.d.mts +2 -1
- package/dist/lib/server/legacy/v5/index.d.ts +2 -1
- package/dist/lib/server/legacy/v5/index.d.ts.map +1 -1
- package/dist/lib/server/legacy/v5/index.js.map +1 -1
- package/dist/lib/server/legacy/v5/index.mjs.map +1 -1
- package/dist/lib/testing/compliance/comply.d.mts +2 -0
- package/dist/lib/testing/compliance/comply.d.ts +2 -0
- package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
- package/dist/lib/testing/compliance/comply.js +45 -14
- package/dist/lib/testing/compliance/comply.js.map +1 -1
- package/dist/lib/testing/compliance/comply.mjs +45 -14
- package/dist/lib/testing/compliance/comply.mjs.map +1 -1
- package/dist/lib/testing/compliance/index.d.mts +1 -1
- package/dist/lib/testing/compliance/index.d.ts +1 -1
- package/dist/lib/testing/compliance/index.d.ts.map +1 -1
- package/dist/lib/testing/compliance/index.js.map +1 -1
- package/dist/lib/testing/compliance/index.mjs.map +1 -1
- package/dist/lib/testing/compliance/storyboard-tracks.d.ts.map +1 -1
- package/dist/lib/testing/compliance/storyboard-tracks.js +9 -1
- package/dist/lib/testing/compliance/storyboard-tracks.js.map +1 -1
- package/dist/lib/testing/compliance/storyboard-tracks.mjs +9 -1
- package/dist/lib/testing/compliance/storyboard-tracks.mjs.map +1 -1
- package/dist/lib/testing/compliance/types.d.mts +26 -25
- package/dist/lib/testing/compliance/types.d.ts +26 -25
- package/dist/lib/testing/compliance/types.d.ts.map +1 -1
- package/dist/lib/testing/compliance/types.js.map +1 -1
- package/dist/lib/testing/index.d.mts +2 -2
- package/dist/lib/testing/index.d.ts +2 -2
- package/dist/lib/testing/index.d.ts.map +1 -1
- package/dist/lib/testing/index.js +16 -0
- package/dist/lib/testing/index.js.map +1 -1
- package/dist/lib/testing/index.mjs +16 -0
- package/dist/lib/testing/index.mjs.map +1 -1
- package/dist/lib/testing/scenarios/media-buy.d.ts.map +1 -1
- package/dist/lib/testing/scenarios/media-buy.js +20 -12
- package/dist/lib/testing/scenarios/media-buy.js.map +1 -1
- package/dist/lib/testing/scenarios/media-buy.mjs +20 -12
- package/dist/lib/testing/scenarios/media-buy.mjs.map +1 -1
- package/dist/lib/testing/storyboard/creative-assets.d.mts +23 -0
- package/dist/lib/testing/storyboard/creative-assets.d.ts +23 -0
- package/dist/lib/testing/storyboard/creative-assets.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/creative-assets.js +322 -45
- package/dist/lib/testing/storyboard/creative-assets.js.map +1 -1
- package/dist/lib/testing/storyboard/creative-assets.mjs +321 -45
- package/dist/lib/testing/storyboard/creative-assets.mjs.map +1 -1
- package/dist/lib/testing/storyboard/index.d.mts +4 -1
- package/dist/lib/testing/storyboard/index.d.ts +4 -1
- package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/index.js +20 -0
- package/dist/lib/testing/storyboard/index.js.map +1 -1
- package/dist/lib/testing/storyboard/index.mjs +19 -0
- package/dist/lib/testing/storyboard/index.mjs.map +1 -1
- package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.d.mts +21 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.d.ts +22 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.js +668 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.js.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.mjs +638 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.mjs.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/index.d.mts +5 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/index.d.ts +6 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/index.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/index.js +44 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/index.js.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/index.mjs +20 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/index.mjs.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/types.d.mts +38 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/types.d.ts +39 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/types.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/types.js +17 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/types.js.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/types.mjs +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/types.mjs.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.d.mts +32 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.d.ts +33 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.js +105 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.js.map +1 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.mjs +80 -0
- package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.mjs.map +1 -0
- package/dist/lib/testing/storyboard/probes.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/probes.js +2 -1
- package/dist/lib/testing/storyboard/probes.js.map +1 -1
- package/dist/lib/testing/storyboard/probes.mjs +2 -1
- package/dist/lib/testing/storyboard/probes.mjs.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +382 -69
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.mjs +387 -70
- package/dist/lib/testing/storyboard/runner.mjs.map +1 -1
- package/dist/lib/testing/storyboard/seeding.js +3 -1
- package/dist/lib/testing/storyboard/seeding.js.map +1 -1
- package/dist/lib/testing/storyboard/seeding.mjs +3 -1
- package/dist/lib/testing/storyboard/seeding.mjs.map +1 -1
- package/dist/lib/testing/storyboard/task-map.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/task-map.js +16 -2
- package/dist/lib/testing/storyboard/task-map.js.map +1 -1
- package/dist/lib/testing/storyboard/task-map.mjs +16 -2
- package/dist/lib/testing/storyboard/task-map.mjs.map +1 -1
- package/dist/lib/testing/storyboard/trusted-match-context-replay.d.mts +11 -0
- package/dist/lib/testing/storyboard/trusted-match-context-replay.d.ts +12 -0
- package/dist/lib/testing/storyboard/trusted-match-context-replay.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/trusted-match-context-replay.js +340 -0
- package/dist/lib/testing/storyboard/trusted-match-context-replay.js.map +1 -0
- package/dist/lib/testing/storyboard/trusted-match-context-replay.mjs +316 -0
- package/dist/lib/testing/storyboard/trusted-match-context-replay.mjs.map +1 -0
- package/dist/lib/testing/storyboard/types.d.mts +84 -15
- package/dist/lib/testing/storyboard/types.d.ts +84 -15
- package/dist/lib/testing/storyboard/types.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/types.js +2 -0
- package/dist/lib/testing/storyboard/types.js.map +1 -1
- package/dist/lib/testing/storyboard/types.mjs +2 -0
- package/dist/lib/testing/storyboard/types.mjs.map +1 -1
- package/dist/lib/testing/storyboard/validations.d.mts +3 -0
- package/dist/lib/testing/storyboard/validations.d.ts +3 -0
- package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/validations.js +64 -24
- package/dist/lib/testing/storyboard/validations.js.map +1 -1
- package/dist/lib/testing/storyboard/validations.mjs +64 -24
- package/dist/lib/testing/storyboard/validations.mjs.map +1 -1
- package/dist/lib/types/server-payload-aliases.d.mts +8 -2
- package/dist/lib/types/server-payload-aliases.d.ts +8 -2
- package/dist/lib/types/server-payload-aliases.d.ts.map +1 -1
- package/dist/lib/types/server-payload-aliases.js.map +1 -1
- package/dist/lib/upstream-recorder/recorder.d.mts +7 -18
- package/dist/lib/upstream-recorder/recorder.d.ts +7 -18
- package/dist/lib/upstream-recorder/recorder.d.ts.map +1 -1
- package/dist/lib/upstream-recorder/recorder.js +17 -10
- package/dist/lib/upstream-recorder/recorder.js.map +1 -1
- package/dist/lib/upstream-recorder/recorder.mjs +12 -5
- package/dist/lib/upstream-recorder/recorder.mjs.map +1 -1
- package/dist/lib/utils/redact-secrets.d.ts.map +1 -1
- package/dist/lib/utils/redact-secrets.js +7 -1
- package/dist/lib/utils/redact-secrets.js.map +1 -1
- package/dist/lib/utils/redact-secrets.mjs +7 -1
- package/dist/lib/utils/redact-secrets.mjs.map +1 -1
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.js.map +1 -1
- package/dist/lib/version.mjs +3 -3
- package/dist/lib/version.mjs.map +1 -1
- package/docs/guides/BUILD-AN-AGENT.md +4 -2
- package/docs/llms.txt +1 -1
- package/package.json +2 -2
|
@@ -47,6 +47,7 @@ __export(testing_exports, {
|
|
|
47
47
|
applyStoryboardVersionOptions: () => import_storyboard.applyStoryboardVersionOptions,
|
|
48
48
|
bridgeFromSessionStore: () => import_test_controller_bridge.bridgeFromSessionStore,
|
|
49
49
|
bridgeFromTestControllerStore: () => import_test_controller_bridge.bridgeFromTestControllerStore,
|
|
50
|
+
buildComplianceSummary: () => import_compliance.buildComplianceSummary,
|
|
50
51
|
buildFixtureResolutionSpecs: () => import_storyboard.buildFixtureResolutionSpecs,
|
|
51
52
|
clearAssertionRegistry: () => import_storyboard.clearAssertionRegistry,
|
|
52
53
|
clearSandboxCache: () => import_storyboard.clearSandboxCache,
|
|
@@ -58,6 +59,7 @@ __export(testing_exports, {
|
|
|
58
59
|
creativeAgent: () => import_test_helpers.creativeAgent,
|
|
59
60
|
enforceMapCap: () => import_test_controller.enforceMapCap,
|
|
60
61
|
executeStoryboardTask: () => import_storyboard.executeStoryboardTask,
|
|
62
|
+
expandCreativeAssetDirectives: () => import_storyboard.expandCreativeAssetDirectives,
|
|
61
63
|
expectControllerError: () => import_controller_assertions.expectControllerError,
|
|
62
64
|
expectControllerSuccess: () => import_controller_assertions.expectControllerSuccess,
|
|
63
65
|
extractContext: () => import_storyboard.extractContext,
|
|
@@ -68,6 +70,7 @@ __export(testing_exports, {
|
|
|
68
70
|
filterValidSeededMediaBuys: () => import_test_controller_bridge.filterValidSeededMediaBuys,
|
|
69
71
|
filterValidSeededProducts: () => import_test_controller_bridge.filterValidSeededProducts,
|
|
70
72
|
findBundleById: () => import_storyboard.findBundleById,
|
|
73
|
+
findUnresolvedCreativeAssetDirectives: () => import_storyboard.findUnresolvedCreativeAssetDirectives,
|
|
71
74
|
formatComplianceResults: () => import_compliance.formatComplianceResults,
|
|
72
75
|
formatComplianceResultsJSON: () => import_compliance.formatComplianceResultsJSON,
|
|
73
76
|
formatSuiteResults: () => import_agent_tester.formatSuiteResults,
|
|
@@ -86,6 +89,8 @@ __export(testing_exports, {
|
|
|
86
89
|
getSandboxBrand: () => import_storyboard.getSandboxBrand,
|
|
87
90
|
getSandboxBrands: () => import_storyboard.getSandboxBrands,
|
|
88
91
|
getSandboxEntities: () => import_storyboard.getSandboxEntities,
|
|
92
|
+
gradeOAuthMetadataGraph: () => import_storyboard.gradeOAuthMetadataGraph,
|
|
93
|
+
gradeOAuthMetadataGraphVector: () => import_storyboard.gradeOAuthMetadataGraphVector,
|
|
89
94
|
hasBrandRightsTools: () => import_agent_tester.hasBrandRightsTools,
|
|
90
95
|
hasGovernanceTools: () => import_agent_tester.hasGovernanceTools,
|
|
91
96
|
hasSITools: () => import_agent_tester.hasSITools,
|
|
@@ -100,6 +105,7 @@ __export(testing_exports, {
|
|
|
100
105
|
listDefaultAssertions: () => import_storyboard.listDefaultAssertions,
|
|
101
106
|
loadBundleStoryboards: () => import_storyboard.loadBundleStoryboards,
|
|
102
107
|
loadComplianceIndex: () => import_storyboard.loadComplianceIndex,
|
|
108
|
+
loadOAuthMetadataGraphVectors: () => import_storyboard.loadOAuthMetadataGraphVectors,
|
|
103
109
|
loadStoryboardFile: () => import_storyboard.loadStoryboardFile,
|
|
104
110
|
matchesFixtureRequirements: () => import_storyboard.matchesFixtureRequirements,
|
|
105
111
|
mergeSeed: () => import_seed_merge.mergeSeed,
|
|
@@ -114,9 +120,11 @@ __export(testing_exports, {
|
|
|
114
120
|
mergeSeededMediaBuysIntoResponse: () => import_test_controller_bridge.mergeSeededMediaBuysIntoResponse,
|
|
115
121
|
mergeSeededProductsIntoResponse: () => import_test_controller_bridge.mergeSeededProductsIntoResponse,
|
|
116
122
|
normalizeFixtureMatchExpression: () => import_storyboard.normalizeFixtureMatchExpression,
|
|
123
|
+
normalizeOAuthResourceForComparison: () => import_storyboard.normalizeOAuthResourceForComparison,
|
|
117
124
|
overlayById: () => import_seed_merge.overlayById,
|
|
118
125
|
parseStoryboard: () => import_storyboard.parseStoryboard,
|
|
119
126
|
pickSeededAccountFinancialsForRequest: () => import_test_controller_bridge.pickSeededAccountFinancialsForRequest,
|
|
127
|
+
redactOAuthUrlForOutput: () => import_storyboard.redactOAuthUrlForOutput,
|
|
120
128
|
registerAssertion: () => import_storyboard.registerAssertion,
|
|
121
129
|
registerExternalSchemaRoot: () => import_validation.registerExternalSchemaRoot,
|
|
122
130
|
registerTestController: () => import_test_controller.registerTestController,
|
|
@@ -224,6 +232,7 @@ var import_storyboard = require('./storyboard/index.js');
|
|
|
224
232
|
applyStoryboardVersionOptions,
|
|
225
233
|
bridgeFromSessionStore,
|
|
226
234
|
bridgeFromTestControllerStore,
|
|
235
|
+
buildComplianceSummary,
|
|
227
236
|
buildFixtureResolutionSpecs,
|
|
228
237
|
clearAssertionRegistry,
|
|
229
238
|
clearSandboxCache,
|
|
@@ -235,6 +244,7 @@ var import_storyboard = require('./storyboard/index.js');
|
|
|
235
244
|
creativeAgent,
|
|
236
245
|
enforceMapCap,
|
|
237
246
|
executeStoryboardTask,
|
|
247
|
+
expandCreativeAssetDirectives,
|
|
238
248
|
expectControllerError,
|
|
239
249
|
expectControllerSuccess,
|
|
240
250
|
extractContext,
|
|
@@ -245,6 +255,7 @@ var import_storyboard = require('./storyboard/index.js');
|
|
|
245
255
|
filterValidSeededMediaBuys,
|
|
246
256
|
filterValidSeededProducts,
|
|
247
257
|
findBundleById,
|
|
258
|
+
findUnresolvedCreativeAssetDirectives,
|
|
248
259
|
formatComplianceResults,
|
|
249
260
|
formatComplianceResultsJSON,
|
|
250
261
|
formatSuiteResults,
|
|
@@ -263,6 +274,8 @@ var import_storyboard = require('./storyboard/index.js');
|
|
|
263
274
|
getSandboxBrand,
|
|
264
275
|
getSandboxBrands,
|
|
265
276
|
getSandboxEntities,
|
|
277
|
+
gradeOAuthMetadataGraph,
|
|
278
|
+
gradeOAuthMetadataGraphVector,
|
|
266
279
|
hasBrandRightsTools,
|
|
267
280
|
hasGovernanceTools,
|
|
268
281
|
hasSITools,
|
|
@@ -277,6 +290,7 @@ var import_storyboard = require('./storyboard/index.js');
|
|
|
277
290
|
listDefaultAssertions,
|
|
278
291
|
loadBundleStoryboards,
|
|
279
292
|
loadComplianceIndex,
|
|
293
|
+
loadOAuthMetadataGraphVectors,
|
|
280
294
|
loadStoryboardFile,
|
|
281
295
|
matchesFixtureRequirements,
|
|
282
296
|
mergeSeed,
|
|
@@ -291,9 +305,11 @@ var import_storyboard = require('./storyboard/index.js');
|
|
|
291
305
|
mergeSeededMediaBuysIntoResponse,
|
|
292
306
|
mergeSeededProductsIntoResponse,
|
|
293
307
|
normalizeFixtureMatchExpression,
|
|
308
|
+
normalizeOAuthResourceForComparison,
|
|
294
309
|
overlayById,
|
|
295
310
|
parseStoryboard,
|
|
296
311
|
pickSeededAccountFinancialsForRequest,
|
|
312
|
+
redactOAuthUrlForOutput,
|
|
297
313
|
registerAssertion,
|
|
298
314
|
registerExternalSchemaRoot,
|
|
299
315
|
registerTestController,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/testing/index.ts"],"sourcesContent":["// Test helpers for AdCP client library\n// Provides pre-configured test agents for examples and quick testing\n\nexport {\n // Test agents (with auth)\n testAgent,\n testAgentA2A,\n testAgentClient,\n createTestAgent,\n TEST_AGENT_TOKEN,\n TEST_AGENT_MCP_CONFIG,\n TEST_AGENT_A2A_CONFIG,\n // Test agents (without auth - for demonstrating auth requirements)\n testAgentNoAuth,\n testAgentNoAuthA2A,\n TEST_AGENT_NO_AUTH_MCP_CONFIG,\n TEST_AGENT_NO_AUTH_A2A_CONFIG,\n // Creative agents (MCP only - A2A not yet supported)\n creativeAgent,\n} from './test-helpers';\n\n// E2E Agent Testing Framework\nexport {\n testAgent as runAgentTests,\n formatTestResults,\n formatTestResultsJSON,\n formatTestResultsSummary,\n setAgentTesterLogger,\n getLogger,\n createTestClient,\n runStep,\n // Individual scenarios\n testHealthCheck,\n testDiscovery,\n testCreateMediaBuy,\n testFullSalesFlow,\n testReportingFlow,\n testCreativeSync,\n testCreativeInline,\n testCreativeFlow,\n testSignalsFlow,\n testErrorHandling,\n testValidation,\n testPricingEdgeCases,\n testTemporalValidation,\n testBehaviorAnalysis,\n testResponseConsistency,\n // v3 scenarios\n testGovernancePropertyLists,\n testGovernanceContentStandards,\n testPropertyListFilters,\n testSISessionLifecycle,\n testSIAvailability,\n testSIHandoff,\n testCapabilityDiscovery,\n testSyncAudiences,\n resolveAccountForMediaBuy,\n resolveAccountForAudiences,\n testSchemaCompliance,\n // State machine compliance\n testMediaBuyLifecycle,\n testTerminalStateEnforcement,\n testPackageLifecycle,\n // Deterministic state machine testing\n testCreativeStateMachine,\n testMediaBuyStateMachine,\n testAccountStateMachine,\n testSessionStateMachine,\n testDeliverySimulation,\n testBudgetSimulation,\n testControllerValidation,\n // Brand rights\n testBrandRightsFlow,\n hasBrandRightsTools,\n // v3 helpers\n hasGovernanceTools,\n hasSITools,\n likelySupportsV3,\n // Suite orchestrator\n testAllScenarios,\n getApplicableScenarios,\n SCENARIO_REQUIREMENTS,\n DEFAULT_SCENARIOS,\n formatSuiteResults,\n formatSuiteResultsJSON,\n // Types\n type TestScenario,\n type TestOptions,\n type OrchestratorOptions,\n type TestResult,\n type SuiteResult,\n type TestStepResult,\n type AgentProfile,\n type TaskResult,\n type TestClient,\n type Logger,\n} from './agent-tester';\n\n// Compliance assessment\nexport {\n comply,\n formatComplianceResults,\n formatComplianceResultsJSON,\n // Brief library\n SAMPLE_BRIEFS,\n getBriefById,\n getBriefsByVertical,\n // Types\n type ComplyOptions,\n type ComplianceTrack,\n type TrackResult,\n type TrackStatus,\n type ComplianceResult,\n type ComplianceSummary,\n type AdvisoryObservation,\n type ObservationSource,\n type SampleBrief,\n} from './compliance';\n\n// Test stubs for compliance testing\nexport { GovernanceAgentStub } from './stubs';\nexport type { StubCallRecord } from './stubs';\n\n// Controller response assertion helpers\nexport { expectControllerError, expectControllerSuccess } from './controller-assertions';\nexport type { ControllerErrorWithDetail } from './controller-assertions';\n\n// Seller-side comply_test_controller scaffold\nexport { createComplyController } from './comply-controller';\nexport type {\n ComplyController,\n ComplyControllerConfig,\n ComplyControllerContext,\n ComplyControllerToolDefinition,\n DirectiveAdapter,\n ForceAccountStatusParams,\n ForceAdapter,\n ForceAudienceStatusParams,\n ForceCatalogItemStatusParams,\n ForceCreateMediaBuyArmParams,\n ForceGetProductsArmParams,\n ForceGetSignalsArmParams,\n ForceCreativeStatusParams,\n ForceMediaBuyStatusParams,\n ForceSessionStatusParams,\n ForceTaskCompletionParams,\n SeedAccountParams,\n SeedAdapter,\n SeedBuyerAgentParams,\n SeedCreativeFormatParams,\n SeedCreativeParams,\n SeedMediaBuyParams,\n SeedPlanParams,\n SeedPricingOptionParams,\n SeedProductParams,\n SimulateAdapter,\n SimulateBudgetSpendParams,\n SimulateDeliveryParams,\n} from './comply-controller';\n// Re-export the full `comply_test_controller` integration surface so sellers\n// wiring their own `TestControllerStore` against typed domain state\n// (MediaBuyState, CreativeState, PlanState, …) can import everything they need\n// from a single path. See `examples/seller-test-controller.ts` for the\n// end-to-end pattern.\nexport {\n TestControllerError,\n CONTROLLER_SCENARIOS,\n DISCOVERY_ARM_SCENARIOS,\n SEED_SCENARIOS,\n SESSION_ENTRY_CAP,\n createSeedFixtureCache,\n enforceMapCap,\n registerTestController,\n} from '../server/test-controller';\nexport type {\n ControllerScenario,\n SeedFixtureCache,\n SeedScenario,\n TestControllerStore,\n TestControllerStoreFactory,\n TestControllerStoreOrFactory,\n} from '../server/test-controller';\n// Status enums every controller implementer mutates. Re-exported here so a\n// seller wiring `forceMediaBuyStatus` / `forceCreativeStatus` doesn't have to\n// reach into `@adcp/sdk` root just for the literal unions.\nexport type { AccountStatus, CreativeStatus, MediaBuyStatus } from '../types/core.generated';\n\n// Seed fixture merge helpers (permissive defaults + storyboard overlay).\nexport {\n mergeSeed,\n overlayById,\n mergeSeedProduct,\n mergeSeedPricingOption,\n mergeSeedCreative,\n mergeSeedPlan,\n mergeSeedMediaBuy,\n} from './seed-merge';\n\n// Test-controller bridge: seeded augmentation of read-side responses on sandbox\n// requests. Per-tool callbacks (`getSeededProducts`, `getSeededCreatives`,\n// `getSeededMediaBuys`, `getSeededAccounts`, `getSeededAccountFinancials`,\n// `getSeededCreativeFormats`) opt in by presence — see TestControllerBridge.\nexport {\n isSandboxRequest,\n mergeSeededProductsIntoResponse,\n filterValidSeededProducts,\n filterValidSeededCreatives,\n filterValidSeededMediaBuys,\n filterValidSeededAccounts,\n filterValidSeededAccountFinancials,\n filterValidSeededCreativeFormats,\n mergeSeededCreativesIntoResponse,\n mergeSeededMediaBuysIntoResponse,\n mergeSeededAccountsIntoResponse,\n mergeSeededCreativeFormatsIntoResponse,\n pickSeededAccountFinancialsForRequest,\n replaceAccountFinancialsIfSeeded,\n bridgeFromTestControllerStore,\n bridgeFromSessionStore,\n} from '../server/test-controller-bridge';\nexport type {\n TestControllerBridge,\n TestControllerBridgeContext,\n BridgeFromSessionStoreOptions,\n SeededCreative,\n SeededMediaBuy,\n SeededAccountFinancials,\n} from '../server/test-controller-bridge';\n\n// One-call harness for server-side agents — composes serve() +\n// seedComplianceFixtures + createWebhookReceiver + runStoryboard.\nexport { runAgainstLocalAgent } from './local-agent-runner';\nexport type { LocalAgentRunResult, PerStoryboardOverride, RunAgainstLocalAgentOptions } from './local-agent-runner';\n\n// External schema bundles for hosted compliance/certification runs.\nexport { registerExternalSchemaRoot, unregisterExternalSchemaRoot, withExternalSchemaRoot } from '../validation';\n\n// Storyboard-driven testing\nexport {\n // Runner\n runStoryboard,\n runStoryboardStep,\n applyAdcpVersionRunOptions,\n applyStoryboardVersionOptions,\n getFirstStepPreview,\n // Parser (single-file load for spec evolution)\n parseStoryboard,\n loadStoryboardFile,\n applyFixtureBindingsToRequest,\n buildFixtureResolutionSpecs,\n FixtureBindingRegistry,\n matchesFixtureRequirements,\n normalizeFixtureMatchExpression,\n validateFixtureResolutionDeclarations,\n // Compliance cache: capability-driven resolution\n getComplianceCacheDir,\n loadComplianceIndex,\n listBundles,\n loadBundleStoryboards,\n listAllComplianceStoryboards,\n getComplianceStoryboardById,\n findBundleById,\n resolveBundleOrStoryboard,\n resolveStoryboardsForCapabilities,\n isComplianceVersionSupported,\n CapabilityResolutionError,\n // Task mapping\n TASK_TO_METHOD,\n executeStoryboardTask,\n // Context\n extractContext,\n injectContext,\n // Validations\n runValidations,\n resolvePath,\n // Rate-limit trip/replay observer\n RateLimitTripObserver,\n RATE_LIMIT_TRIP_CONTRACT,\n RATE_LIMIT_TRIP_DEFAULT_REPLAY_MAX_WAIT_SECONDS,\n RATE_LIMIT_TRIP_MAX_ATTEMPTS_MAX,\n RATE_LIMIT_TRIP_MAX_ATTEMPTS_MIN,\n validateRateLimitTripSpec,\n // Sandbox entities\n getSandboxEntities,\n getSandboxBrands,\n getSandboxBrand,\n isSandboxDomain,\n clearSandboxCache,\n // Assertion registry (adcontextprotocol/adcp#2639) — authors of invariant\n // modules import these from `@adcp/sdk/testing` to register cross-step\n // checks the runner will resolve from `storyboard.invariants: [...]`.\n registerAssertion,\n getAssertion,\n listAssertions,\n listDefaultAssertions,\n clearAssertionRegistry,\n resolveAssertions,\n type AssertionSpec,\n type AssertionContext,\n type AssertionResult,\n type RegisterAssertionOptions,\n // Types\n type Storyboard,\n type StoryboardFixtureResolution,\n type FixtureResolutionStrategy,\n type FixtureMatchOperator,\n type FixtureMatchClause,\n type FixtureResolutionDeclaration,\n type ProductFixtureResolutionDeclaration,\n type PricingOptionFixtureResolutionDeclaration,\n type FixtureResolutionStatus,\n type FixtureResolutionRecord,\n type FixtureResolutionAttempt,\n type FixtureResolutionEvidence,\n type FixtureResolutionCoverageGap,\n type StoryboardInvariants,\n type StoryboardInvariantsObject,\n type StepInvariantsObject,\n type StoryboardPhase,\n type StoryboardStep,\n type RateLimitTripSpec,\n type StoryboardValidation,\n type RateLimitTripClient,\n type RateLimitTripFailureCode,\n type RateLimitTripObservation,\n type RateLimitTripObserverOptions,\n type RateLimitTripResponseSnapshot,\n type RateLimitTripStructuredResult,\n type RateLimitTripTaskOptions,\n type StoryboardContext,\n type StoryboardRunOptions,\n type ValidationResult,\n type StoryboardStepPreview,\n type StoryboardStepResult,\n type StoryboardStepHint,\n type StoryboardStepHintBase,\n type ContextValueRejectedHint,\n type ShapeDriftHint,\n type MissingRequiredFieldHint,\n type FormatMismatchHint,\n type MonotonicViolationHint,\n type ContextProvenanceEntry,\n type StoryboardPhaseResult,\n type StoryboardResult,\n type RunnerNotice,\n type NoticeCode,\n type NoticeSeverity,\n type AgentCapabilities,\n type BundleKind,\n type BundleRef,\n type CapabilityResolutionCode,\n type ComplianceIndex,\n type ComplianceIndexProtocol,\n type ComplianceIndexSpecialism,\n type ResolveOptions,\n type ResolvedBundle,\n type ResolvedStoryboards,\n type SandboxBrand,\n type SandboxAgent,\n type SandboxEntities,\n type BrandJson,\n type AdagentsJson,\n BrandJsonSchema,\n AdagentsJsonSchema,\n} from './storyboard';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAgBO;AAGP,0BA0EO;AAGP,wBAkBO;AAGP,mBAAoC;AAIpC,mCAA+D;AAI/D,+BAAuC;AAoCvC,6BASO;AAeP,wBAQO;AAMP,oCAiBO;AAYP,gCAAqC;AAIrC,wBAAiG;AAGjG,wBA8HO;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/testing/index.ts"],"sourcesContent":["// Test helpers for AdCP client library\n// Provides pre-configured test agents for examples and quick testing\n\nexport {\n // Test agents (with auth)\n testAgent,\n testAgentA2A,\n testAgentClient,\n createTestAgent,\n TEST_AGENT_TOKEN,\n TEST_AGENT_MCP_CONFIG,\n TEST_AGENT_A2A_CONFIG,\n // Test agents (without auth - for demonstrating auth requirements)\n testAgentNoAuth,\n testAgentNoAuthA2A,\n TEST_AGENT_NO_AUTH_MCP_CONFIG,\n TEST_AGENT_NO_AUTH_A2A_CONFIG,\n // Creative agents (MCP only - A2A not yet supported)\n creativeAgent,\n} from './test-helpers';\n\n// E2E Agent Testing Framework\nexport {\n testAgent as runAgentTests,\n formatTestResults,\n formatTestResultsJSON,\n formatTestResultsSummary,\n setAgentTesterLogger,\n getLogger,\n createTestClient,\n runStep,\n // Individual scenarios\n testHealthCheck,\n testDiscovery,\n testCreateMediaBuy,\n testFullSalesFlow,\n testReportingFlow,\n testCreativeSync,\n testCreativeInline,\n testCreativeFlow,\n testSignalsFlow,\n testErrorHandling,\n testValidation,\n testPricingEdgeCases,\n testTemporalValidation,\n testBehaviorAnalysis,\n testResponseConsistency,\n // v3 scenarios\n testGovernancePropertyLists,\n testGovernanceContentStandards,\n testPropertyListFilters,\n testSISessionLifecycle,\n testSIAvailability,\n testSIHandoff,\n testCapabilityDiscovery,\n testSyncAudiences,\n resolveAccountForMediaBuy,\n resolveAccountForAudiences,\n testSchemaCompliance,\n // State machine compliance\n testMediaBuyLifecycle,\n testTerminalStateEnforcement,\n testPackageLifecycle,\n // Deterministic state machine testing\n testCreativeStateMachine,\n testMediaBuyStateMachine,\n testAccountStateMachine,\n testSessionStateMachine,\n testDeliverySimulation,\n testBudgetSimulation,\n testControllerValidation,\n // Brand rights\n testBrandRightsFlow,\n hasBrandRightsTools,\n // v3 helpers\n hasGovernanceTools,\n hasSITools,\n likelySupportsV3,\n // Suite orchestrator\n testAllScenarios,\n getApplicableScenarios,\n SCENARIO_REQUIREMENTS,\n DEFAULT_SCENARIOS,\n formatSuiteResults,\n formatSuiteResultsJSON,\n // Types\n type TestScenario,\n type TestOptions,\n type OrchestratorOptions,\n type TestResult,\n type SuiteResult,\n type TestStepResult,\n type AgentProfile,\n type TaskResult,\n type TestClient,\n type Logger,\n} from './agent-tester';\n\n// Compliance assessment\nexport {\n comply,\n formatComplianceResults,\n formatComplianceResultsJSON,\n buildComplianceSummary,\n // Brief library\n SAMPLE_BRIEFS,\n getBriefById,\n getBriefsByVertical,\n // Types\n type ComplyOptions,\n type ComplianceTrack,\n type TrackResult,\n type TestedTrackEntry,\n type TrackStatus,\n type ComplianceResult,\n type ComplianceSummary,\n type ComplianceSummaryArtifact,\n type BuildSummaryOptions,\n type AdvisoryObservation,\n type ObservationSource,\n type SampleBrief,\n} from './compliance';\n\n// Test stubs for compliance testing\nexport { GovernanceAgentStub } from './stubs';\nexport type { StubCallRecord } from './stubs';\n\n// Controller response assertion helpers\nexport { expectControllerError, expectControllerSuccess } from './controller-assertions';\nexport type { ControllerErrorWithDetail } from './controller-assertions';\n\n// Seller-side comply_test_controller scaffold\nexport { createComplyController } from './comply-controller';\nexport type {\n ComplyController,\n ComplyControllerConfig,\n ComplyControllerContext,\n ComplyControllerToolDefinition,\n DirectiveAdapter,\n ForceAccountStatusParams,\n ForceAdapter,\n ForceAudienceStatusParams,\n ForceCatalogItemStatusParams,\n ForceCreateMediaBuyArmParams,\n ForceGetProductsArmParams,\n ForceGetSignalsArmParams,\n ForceCreativeStatusParams,\n ForceMediaBuyStatusParams,\n ForceSessionStatusParams,\n ForceTaskCompletionParams,\n SeedAccountParams,\n SeedAdapter,\n SeedBuyerAgentParams,\n SeedCreativeFormatParams,\n SeedCreativeParams,\n SeedMediaBuyParams,\n SeedPlanParams,\n SeedPricingOptionParams,\n SeedProductParams,\n SimulateAdapter,\n SimulateBudgetSpendParams,\n SimulateDeliveryParams,\n} from './comply-controller';\n// Re-export the full `comply_test_controller` integration surface so sellers\n// wiring their own `TestControllerStore` against typed domain state\n// (MediaBuyState, CreativeState, PlanState, …) can import everything they need\n// from a single path. See `examples/seller-test-controller.ts` for the\n// end-to-end pattern.\nexport {\n TestControllerError,\n CONTROLLER_SCENARIOS,\n DISCOVERY_ARM_SCENARIOS,\n SEED_SCENARIOS,\n SESSION_ENTRY_CAP,\n createSeedFixtureCache,\n enforceMapCap,\n registerTestController,\n} from '../server/test-controller';\nexport type {\n ControllerScenario,\n SeedFixtureCache,\n SeedScenario,\n TestControllerStore,\n TestControllerStoreFactory,\n TestControllerStoreOrFactory,\n} from '../server/test-controller';\n// Status enums every controller implementer mutates. Re-exported here so a\n// seller wiring `forceMediaBuyStatus` / `forceCreativeStatus` doesn't have to\n// reach into `@adcp/sdk` root just for the literal unions.\nexport type { AccountStatus, CreativeStatus, MediaBuyStatus } from '../types/core.generated';\n\n// Seed fixture merge helpers (permissive defaults + storyboard overlay).\nexport {\n mergeSeed,\n overlayById,\n mergeSeedProduct,\n mergeSeedPricingOption,\n mergeSeedCreative,\n mergeSeedPlan,\n mergeSeedMediaBuy,\n} from './seed-merge';\n\n// Test-controller bridge: seeded augmentation of read-side responses on sandbox\n// requests. Per-tool callbacks (`getSeededProducts`, `getSeededCreatives`,\n// `getSeededMediaBuys`, `getSeededAccounts`, `getSeededAccountFinancials`,\n// `getSeededCreativeFormats`) opt in by presence — see TestControllerBridge.\nexport {\n isSandboxRequest,\n mergeSeededProductsIntoResponse,\n filterValidSeededProducts,\n filterValidSeededCreatives,\n filterValidSeededMediaBuys,\n filterValidSeededAccounts,\n filterValidSeededAccountFinancials,\n filterValidSeededCreativeFormats,\n mergeSeededCreativesIntoResponse,\n mergeSeededMediaBuysIntoResponse,\n mergeSeededAccountsIntoResponse,\n mergeSeededCreativeFormatsIntoResponse,\n pickSeededAccountFinancialsForRequest,\n replaceAccountFinancialsIfSeeded,\n bridgeFromTestControllerStore,\n bridgeFromSessionStore,\n} from '../server/test-controller-bridge';\nexport type {\n TestControllerBridge,\n TestControllerBridgeContext,\n BridgeFromSessionStoreOptions,\n SeededCreative,\n SeededMediaBuy,\n SeededAccountFinancials,\n} from '../server/test-controller-bridge';\n\n// One-call harness for server-side agents — composes serve() +\n// seedComplianceFixtures + createWebhookReceiver + runStoryboard.\nexport { runAgainstLocalAgent } from './local-agent-runner';\nexport type { LocalAgentRunResult, PerStoryboardOverride, RunAgainstLocalAgentOptions } from './local-agent-runner';\n\n// External schema bundles for hosted compliance/certification runs.\nexport { registerExternalSchemaRoot, unregisterExternalSchemaRoot, withExternalSchemaRoot } from '../validation';\n\n// Storyboard-driven testing\nexport {\n // Runner\n runStoryboard,\n runStoryboardStep,\n applyAdcpVersionRunOptions,\n applyStoryboardVersionOptions,\n getFirstStepPreview,\n // Parser (single-file load for spec evolution)\n parseStoryboard,\n loadStoryboardFile,\n applyFixtureBindingsToRequest,\n buildFixtureResolutionSpecs,\n FixtureBindingRegistry,\n matchesFixtureRequirements,\n normalizeFixtureMatchExpression,\n validateFixtureResolutionDeclarations,\n // Compliance cache: capability-driven resolution\n getComplianceCacheDir,\n loadComplianceIndex,\n listBundles,\n loadBundleStoryboards,\n listAllComplianceStoryboards,\n getComplianceStoryboardById,\n findBundleById,\n resolveBundleOrStoryboard,\n resolveStoryboardsForCapabilities,\n isComplianceVersionSupported,\n CapabilityResolutionError,\n // Task mapping\n TASK_TO_METHOD,\n executeStoryboardTask,\n // Storyboard-only creative asset directives\n expandCreativeAssetDirectives,\n findUnresolvedCreativeAssetDirectives,\n // Context\n extractContext,\n injectContext,\n // Validations\n runValidations,\n resolvePath,\n // Rate-limit trip/replay observer\n RateLimitTripObserver,\n RATE_LIMIT_TRIP_CONTRACT,\n RATE_LIMIT_TRIP_DEFAULT_REPLAY_MAX_WAIT_SECONDS,\n RATE_LIMIT_TRIP_MAX_ATTEMPTS_MAX,\n RATE_LIMIT_TRIP_MAX_ATTEMPTS_MIN,\n validateRateLimitTripSpec,\n // Sandbox entities\n getSandboxEntities,\n getSandboxBrands,\n getSandboxBrand,\n isSandboxDomain,\n clearSandboxCache,\n // Assertion registry (adcontextprotocol/adcp#2639) — authors of invariant\n // modules import these from `@adcp/sdk/testing` to register cross-step\n // checks the runner will resolve from `storyboard.invariants: [...]`.\n registerAssertion,\n getAssertion,\n listAssertions,\n listDefaultAssertions,\n clearAssertionRegistry,\n resolveAssertions,\n type AssertionSpec,\n type AssertionContext,\n type AssertionResult,\n type RegisterAssertionOptions,\n // Types\n type Storyboard,\n type StoryboardFixtureResolution,\n type FixtureResolutionStrategy,\n type FixtureMatchOperator,\n type FixtureMatchClause,\n type FixtureResolutionDeclaration,\n type ProductFixtureResolutionDeclaration,\n type PricingOptionFixtureResolutionDeclaration,\n type FixtureResolutionStatus,\n type FixtureResolutionRecord,\n type FixtureResolutionAttempt,\n type FixtureResolutionEvidence,\n type FixtureResolutionCoverageGap,\n type StoryboardInvariants,\n type StoryboardInvariantsObject,\n type StepInvariantsObject,\n type StoryboardPhase,\n type StoryboardStep,\n type RateLimitTripSpec,\n type StoryboardValidation,\n type RateLimitTripClient,\n type RateLimitTripFailureCode,\n type RateLimitTripObservation,\n type RateLimitTripObserverOptions,\n type RateLimitTripResponseSnapshot,\n type RateLimitTripStructuredResult,\n type RateLimitTripTaskOptions,\n type StoryboardContext,\n type StoryboardRunOptions,\n type TrustedMatchContextProviderEndpoint,\n type TrustedMatchContextRegistrationContext,\n type TrustedMatchContextRouterRunnerOptions,\n type ValidationResult,\n type StoryboardStepPreview,\n type StoryboardStepResult,\n type StoryboardStepHint,\n type StoryboardStepHintBase,\n type ContextValueRejectedHint,\n type ShapeDriftHint,\n type MissingRequiredFieldHint,\n type FormatMismatchHint,\n type MonotonicViolationHint,\n type ContextProvenanceEntry,\n type StoryboardPhaseResult,\n type StoryboardResult,\n type RunnerNotice,\n type NoticeCode,\n type NoticeSeverity,\n type AgentCapabilities,\n type BundleKind,\n type BundleRef,\n type CapabilityResolutionCode,\n type ComplianceIndex,\n type ComplianceIndexProtocol,\n type ComplianceIndexSpecialism,\n type ResolveOptions,\n type ResolvedBundle,\n type ResolvedStoryboards,\n type SandboxBrand,\n type SandboxAgent,\n type SandboxEntities,\n type BrandJson,\n type AdagentsJson,\n gradeOAuthMetadataGraph,\n gradeOAuthMetadataGraphVector,\n loadOAuthMetadataGraphVectors,\n normalizeOAuthResourceForComparison,\n redactOAuthUrlForOutput,\n type GradeOAuthMetadataGraphOptions,\n type OAuthMetadataGraphErrorCode,\n type OAuthMetadataGraphFinding,\n type OAuthMetadataGraphGrade,\n type OAuthMetadataGraphObservation,\n type OAuthMetadataGraphVector,\n type OAuthMetadataGraphVectorCorpus,\n BrandJsonSchema,\n AdagentsJsonSchema,\n} from './storyboard';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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
|
75
75
|
formatComplianceResultsJSON,
|
|
76
|
+
buildComplianceSummary,
|
|
76
77
|
SAMPLE_BRIEFS,
|
|
77
78
|
getBriefById,
|
|
78
79
|
getBriefsByVertical
|
|
@@ -146,6 +147,8 @@ import {
|
|
|
146
147
|
CapabilityResolutionError,
|
|
147
148
|
TASK_TO_METHOD,
|
|
148
149
|
executeStoryboardTask,
|
|
150
|
+
expandCreativeAssetDirectives,
|
|
151
|
+
findUnresolvedCreativeAssetDirectives,
|
|
149
152
|
extractContext,
|
|
150
153
|
injectContext,
|
|
151
154
|
runValidations,
|
|
@@ -167,6 +170,11 @@ import {
|
|
|
167
170
|
listDefaultAssertions,
|
|
168
171
|
clearAssertionRegistry,
|
|
169
172
|
resolveAssertions,
|
|
173
|
+
gradeOAuthMetadataGraph,
|
|
174
|
+
gradeOAuthMetadataGraphVector,
|
|
175
|
+
loadOAuthMetadataGraphVectors,
|
|
176
|
+
normalizeOAuthResourceForComparison,
|
|
177
|
+
redactOAuthUrlForOutput,
|
|
170
178
|
BrandJsonSchema,
|
|
171
179
|
AdagentsJsonSchema
|
|
172
180
|
} from "./storyboard/index.mjs";
|
|
@@ -200,6 +208,7 @@ export {
|
|
|
200
208
|
applyStoryboardVersionOptions,
|
|
201
209
|
bridgeFromSessionStore,
|
|
202
210
|
bridgeFromTestControllerStore,
|
|
211
|
+
buildComplianceSummary,
|
|
203
212
|
buildFixtureResolutionSpecs,
|
|
204
213
|
clearAssertionRegistry,
|
|
205
214
|
clearSandboxCache,
|
|
@@ -211,6 +220,7 @@ export {
|
|
|
211
220
|
creativeAgent,
|
|
212
221
|
enforceMapCap,
|
|
213
222
|
executeStoryboardTask,
|
|
223
|
+
expandCreativeAssetDirectives,
|
|
214
224
|
expectControllerError,
|
|
215
225
|
expectControllerSuccess,
|
|
216
226
|
extractContext,
|
|
@@ -221,6 +231,7 @@ export {
|
|
|
221
231
|
filterValidSeededMediaBuys,
|
|
222
232
|
filterValidSeededProducts,
|
|
223
233
|
findBundleById,
|
|
234
|
+
findUnresolvedCreativeAssetDirectives,
|
|
224
235
|
formatComplianceResults,
|
|
225
236
|
formatComplianceResultsJSON,
|
|
226
237
|
formatSuiteResults,
|
|
@@ -239,6 +250,8 @@ export {
|
|
|
239
250
|
getSandboxBrand,
|
|
240
251
|
getSandboxBrands,
|
|
241
252
|
getSandboxEntities,
|
|
253
|
+
gradeOAuthMetadataGraph,
|
|
254
|
+
gradeOAuthMetadataGraphVector,
|
|
242
255
|
hasBrandRightsTools,
|
|
243
256
|
hasGovernanceTools,
|
|
244
257
|
hasSITools,
|
|
@@ -253,6 +266,7 @@ export {
|
|
|
253
266
|
listDefaultAssertions,
|
|
254
267
|
loadBundleStoryboards,
|
|
255
268
|
loadComplianceIndex,
|
|
269
|
+
loadOAuthMetadataGraphVectors,
|
|
256
270
|
loadStoryboardFile,
|
|
257
271
|
matchesFixtureRequirements,
|
|
258
272
|
mergeSeed,
|
|
@@ -267,9 +281,11 @@ export {
|
|
|
267
281
|
mergeSeededMediaBuysIntoResponse,
|
|
268
282
|
mergeSeededProductsIntoResponse,
|
|
269
283
|
normalizeFixtureMatchExpression,
|
|
284
|
+
normalizeOAuthResourceForComparison,
|
|
270
285
|
overlayById,
|
|
271
286
|
parseStoryboard,
|
|
272
287
|
pickSeededAccountFinancialsForRequest,
|
|
288
|
+
redactOAuthUrlForOutput,
|
|
273
289
|
registerAssertion,
|
|
274
290
|
registerExternalSchemaRoot,
|
|
275
291
|
registerTestController,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/testing/index.ts"],"sourcesContent":["// Test helpers for AdCP client library\n// Provides pre-configured test agents for examples and quick testing\n\nexport {\n // Test agents (with auth)\n testAgent,\n testAgentA2A,\n testAgentClient,\n createTestAgent,\n TEST_AGENT_TOKEN,\n TEST_AGENT_MCP_CONFIG,\n TEST_AGENT_A2A_CONFIG,\n // Test agents (without auth - for demonstrating auth requirements)\n testAgentNoAuth,\n testAgentNoAuthA2A,\n TEST_AGENT_NO_AUTH_MCP_CONFIG,\n TEST_AGENT_NO_AUTH_A2A_CONFIG,\n // Creative agents (MCP only - A2A not yet supported)\n creativeAgent,\n} from './test-helpers';\n\n// E2E Agent Testing Framework\nexport {\n testAgent as runAgentTests,\n formatTestResults,\n formatTestResultsJSON,\n formatTestResultsSummary,\n setAgentTesterLogger,\n getLogger,\n createTestClient,\n runStep,\n // Individual scenarios\n testHealthCheck,\n testDiscovery,\n testCreateMediaBuy,\n testFullSalesFlow,\n testReportingFlow,\n testCreativeSync,\n testCreativeInline,\n testCreativeFlow,\n testSignalsFlow,\n testErrorHandling,\n testValidation,\n testPricingEdgeCases,\n testTemporalValidation,\n testBehaviorAnalysis,\n testResponseConsistency,\n // v3 scenarios\n testGovernancePropertyLists,\n testGovernanceContentStandards,\n testPropertyListFilters,\n testSISessionLifecycle,\n testSIAvailability,\n testSIHandoff,\n testCapabilityDiscovery,\n testSyncAudiences,\n resolveAccountForMediaBuy,\n resolveAccountForAudiences,\n testSchemaCompliance,\n // State machine compliance\n testMediaBuyLifecycle,\n testTerminalStateEnforcement,\n testPackageLifecycle,\n // Deterministic state machine testing\n testCreativeStateMachine,\n testMediaBuyStateMachine,\n testAccountStateMachine,\n testSessionStateMachine,\n testDeliverySimulation,\n testBudgetSimulation,\n testControllerValidation,\n // Brand rights\n testBrandRightsFlow,\n hasBrandRightsTools,\n // v3 helpers\n hasGovernanceTools,\n hasSITools,\n likelySupportsV3,\n // Suite orchestrator\n testAllScenarios,\n getApplicableScenarios,\n SCENARIO_REQUIREMENTS,\n DEFAULT_SCENARIOS,\n formatSuiteResults,\n formatSuiteResultsJSON,\n // Types\n type TestScenario,\n type TestOptions,\n type OrchestratorOptions,\n type TestResult,\n type SuiteResult,\n type TestStepResult,\n type AgentProfile,\n type TaskResult,\n type TestClient,\n type Logger,\n} from './agent-tester';\n\n// Compliance assessment\nexport {\n comply,\n formatComplianceResults,\n formatComplianceResultsJSON,\n // Brief library\n SAMPLE_BRIEFS,\n getBriefById,\n getBriefsByVertical,\n // Types\n type ComplyOptions,\n type ComplianceTrack,\n type TrackResult,\n type TrackStatus,\n type ComplianceResult,\n type ComplianceSummary,\n type AdvisoryObservation,\n type ObservationSource,\n type SampleBrief,\n} from './compliance';\n\n// Test stubs for compliance testing\nexport { GovernanceAgentStub } from './stubs';\nexport type { StubCallRecord } from './stubs';\n\n// Controller response assertion helpers\nexport { expectControllerError, expectControllerSuccess } from './controller-assertions';\nexport type { ControllerErrorWithDetail } from './controller-assertions';\n\n// Seller-side comply_test_controller scaffold\nexport { createComplyController } from './comply-controller';\nexport type {\n ComplyController,\n ComplyControllerConfig,\n ComplyControllerContext,\n ComplyControllerToolDefinition,\n DirectiveAdapter,\n ForceAccountStatusParams,\n ForceAdapter,\n ForceAudienceStatusParams,\n ForceCatalogItemStatusParams,\n ForceCreateMediaBuyArmParams,\n ForceGetProductsArmParams,\n ForceGetSignalsArmParams,\n ForceCreativeStatusParams,\n ForceMediaBuyStatusParams,\n ForceSessionStatusParams,\n ForceTaskCompletionParams,\n SeedAccountParams,\n SeedAdapter,\n SeedBuyerAgentParams,\n SeedCreativeFormatParams,\n SeedCreativeParams,\n SeedMediaBuyParams,\n SeedPlanParams,\n SeedPricingOptionParams,\n SeedProductParams,\n SimulateAdapter,\n SimulateBudgetSpendParams,\n SimulateDeliveryParams,\n} from './comply-controller';\n// Re-export the full `comply_test_controller` integration surface so sellers\n// wiring their own `TestControllerStore` against typed domain state\n// (MediaBuyState, CreativeState, PlanState, …) can import everything they need\n// from a single path. See `examples/seller-test-controller.ts` for the\n// end-to-end pattern.\nexport {\n TestControllerError,\n CONTROLLER_SCENARIOS,\n DISCOVERY_ARM_SCENARIOS,\n SEED_SCENARIOS,\n SESSION_ENTRY_CAP,\n createSeedFixtureCache,\n enforceMapCap,\n registerTestController,\n} from '../server/test-controller';\nexport type {\n ControllerScenario,\n SeedFixtureCache,\n SeedScenario,\n TestControllerStore,\n TestControllerStoreFactory,\n TestControllerStoreOrFactory,\n} from '../server/test-controller';\n// Status enums every controller implementer mutates. Re-exported here so a\n// seller wiring `forceMediaBuyStatus` / `forceCreativeStatus` doesn't have to\n// reach into `@adcp/sdk` root just for the literal unions.\nexport type { AccountStatus, CreativeStatus, MediaBuyStatus } from '../types/core.generated';\n\n// Seed fixture merge helpers (permissive defaults + storyboard overlay).\nexport {\n mergeSeed,\n overlayById,\n mergeSeedProduct,\n mergeSeedPricingOption,\n mergeSeedCreative,\n mergeSeedPlan,\n mergeSeedMediaBuy,\n} from './seed-merge';\n\n// Test-controller bridge: seeded augmentation of read-side responses on sandbox\n// requests. Per-tool callbacks (`getSeededProducts`, `getSeededCreatives`,\n// `getSeededMediaBuys`, `getSeededAccounts`, `getSeededAccountFinancials`,\n// `getSeededCreativeFormats`) opt in by presence — see TestControllerBridge.\nexport {\n isSandboxRequest,\n mergeSeededProductsIntoResponse,\n filterValidSeededProducts,\n filterValidSeededCreatives,\n filterValidSeededMediaBuys,\n filterValidSeededAccounts,\n filterValidSeededAccountFinancials,\n filterValidSeededCreativeFormats,\n mergeSeededCreativesIntoResponse,\n mergeSeededMediaBuysIntoResponse,\n mergeSeededAccountsIntoResponse,\n mergeSeededCreativeFormatsIntoResponse,\n pickSeededAccountFinancialsForRequest,\n replaceAccountFinancialsIfSeeded,\n bridgeFromTestControllerStore,\n bridgeFromSessionStore,\n} from '../server/test-controller-bridge';\nexport type {\n TestControllerBridge,\n TestControllerBridgeContext,\n BridgeFromSessionStoreOptions,\n SeededCreative,\n SeededMediaBuy,\n SeededAccountFinancials,\n} from '../server/test-controller-bridge';\n\n// One-call harness for server-side agents — composes serve() +\n// seedComplianceFixtures + createWebhookReceiver + runStoryboard.\nexport { runAgainstLocalAgent } from './local-agent-runner';\nexport type { LocalAgentRunResult, PerStoryboardOverride, RunAgainstLocalAgentOptions } from './local-agent-runner';\n\n// External schema bundles for hosted compliance/certification runs.\nexport { registerExternalSchemaRoot, unregisterExternalSchemaRoot, withExternalSchemaRoot } from '../validation';\n\n// Storyboard-driven testing\nexport {\n // Runner\n runStoryboard,\n runStoryboardStep,\n applyAdcpVersionRunOptions,\n applyStoryboardVersionOptions,\n getFirstStepPreview,\n // Parser (single-file load for spec evolution)\n parseStoryboard,\n loadStoryboardFile,\n applyFixtureBindingsToRequest,\n buildFixtureResolutionSpecs,\n FixtureBindingRegistry,\n matchesFixtureRequirements,\n normalizeFixtureMatchExpression,\n validateFixtureResolutionDeclarations,\n // Compliance cache: capability-driven resolution\n getComplianceCacheDir,\n loadComplianceIndex,\n listBundles,\n loadBundleStoryboards,\n listAllComplianceStoryboards,\n getComplianceStoryboardById,\n findBundleById,\n resolveBundleOrStoryboard,\n resolveStoryboardsForCapabilities,\n isComplianceVersionSupported,\n CapabilityResolutionError,\n // Task mapping\n TASK_TO_METHOD,\n executeStoryboardTask,\n // Context\n extractContext,\n injectContext,\n // Validations\n runValidations,\n resolvePath,\n // Rate-limit trip/replay observer\n RateLimitTripObserver,\n RATE_LIMIT_TRIP_CONTRACT,\n RATE_LIMIT_TRIP_DEFAULT_REPLAY_MAX_WAIT_SECONDS,\n RATE_LIMIT_TRIP_MAX_ATTEMPTS_MAX,\n RATE_LIMIT_TRIP_MAX_ATTEMPTS_MIN,\n validateRateLimitTripSpec,\n // Sandbox entities\n getSandboxEntities,\n getSandboxBrands,\n getSandboxBrand,\n isSandboxDomain,\n clearSandboxCache,\n // Assertion registry (adcontextprotocol/adcp#2639) — authors of invariant\n // modules import these from `@adcp/sdk/testing` to register cross-step\n // checks the runner will resolve from `storyboard.invariants: [...]`.\n registerAssertion,\n getAssertion,\n listAssertions,\n listDefaultAssertions,\n clearAssertionRegistry,\n resolveAssertions,\n type AssertionSpec,\n type AssertionContext,\n type AssertionResult,\n type RegisterAssertionOptions,\n // Types\n type Storyboard,\n type StoryboardFixtureResolution,\n type FixtureResolutionStrategy,\n type FixtureMatchOperator,\n type FixtureMatchClause,\n type FixtureResolutionDeclaration,\n type ProductFixtureResolutionDeclaration,\n type PricingOptionFixtureResolutionDeclaration,\n type FixtureResolutionStatus,\n type FixtureResolutionRecord,\n type FixtureResolutionAttempt,\n type FixtureResolutionEvidence,\n type FixtureResolutionCoverageGap,\n type StoryboardInvariants,\n type StoryboardInvariantsObject,\n type StepInvariantsObject,\n type StoryboardPhase,\n type StoryboardStep,\n type RateLimitTripSpec,\n type StoryboardValidation,\n type RateLimitTripClient,\n type RateLimitTripFailureCode,\n type RateLimitTripObservation,\n type RateLimitTripObserverOptions,\n type RateLimitTripResponseSnapshot,\n type RateLimitTripStructuredResult,\n type RateLimitTripTaskOptions,\n type StoryboardContext,\n type StoryboardRunOptions,\n type ValidationResult,\n type StoryboardStepPreview,\n type StoryboardStepResult,\n type StoryboardStepHint,\n type StoryboardStepHintBase,\n type ContextValueRejectedHint,\n type ShapeDriftHint,\n type MissingRequiredFieldHint,\n type FormatMismatchHint,\n type MonotonicViolationHint,\n type ContextProvenanceEntry,\n type StoryboardPhaseResult,\n type StoryboardResult,\n type RunnerNotice,\n type NoticeCode,\n type NoticeSeverity,\n type AgentCapabilities,\n type BundleKind,\n type BundleRef,\n type CapabilityResolutionCode,\n type ComplianceIndex,\n type ComplianceIndexProtocol,\n type ComplianceIndexSpecialism,\n type ResolveOptions,\n type ResolvedBundle,\n type ResolvedStoryboards,\n type SandboxBrand,\n type SandboxAgent,\n type SandboxEntities,\n type BrandJson,\n type AdagentsJson,\n BrandJsonSchema,\n AdagentsJsonSchema,\n} from './storyboard';\n"],"mappings":"AAGA;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,OACK;AAGP;AAAA,EACe,aAAbA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAA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EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAkEA;AAAA,EACA;AAAA,OACK;","names":["testAgent"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/testing/index.ts"],"sourcesContent":["// Test helpers for AdCP client library\n// Provides pre-configured test agents for examples and quick testing\n\nexport {\n // Test agents (with auth)\n testAgent,\n testAgentA2A,\n testAgentClient,\n createTestAgent,\n TEST_AGENT_TOKEN,\n TEST_AGENT_MCP_CONFIG,\n TEST_AGENT_A2A_CONFIG,\n // Test agents (without auth - for demonstrating auth requirements)\n testAgentNoAuth,\n testAgentNoAuthA2A,\n TEST_AGENT_NO_AUTH_MCP_CONFIG,\n TEST_AGENT_NO_AUTH_A2A_CONFIG,\n // Creative agents (MCP only - A2A not yet supported)\n creativeAgent,\n} from './test-helpers';\n\n// E2E Agent Testing Framework\nexport {\n testAgent as runAgentTests,\n formatTestResults,\n formatTestResultsJSON,\n formatTestResultsSummary,\n setAgentTesterLogger,\n getLogger,\n createTestClient,\n runStep,\n // Individual scenarios\n testHealthCheck,\n testDiscovery,\n testCreateMediaBuy,\n testFullSalesFlow,\n testReportingFlow,\n testCreativeSync,\n testCreativeInline,\n testCreativeFlow,\n testSignalsFlow,\n testErrorHandling,\n testValidation,\n testPricingEdgeCases,\n testTemporalValidation,\n testBehaviorAnalysis,\n testResponseConsistency,\n // v3 scenarios\n testGovernancePropertyLists,\n testGovernanceContentStandards,\n testPropertyListFilters,\n testSISessionLifecycle,\n testSIAvailability,\n testSIHandoff,\n testCapabilityDiscovery,\n testSyncAudiences,\n resolveAccountForMediaBuy,\n resolveAccountForAudiences,\n testSchemaCompliance,\n // State machine compliance\n testMediaBuyLifecycle,\n testTerminalStateEnforcement,\n testPackageLifecycle,\n // Deterministic state machine testing\n testCreativeStateMachine,\n testMediaBuyStateMachine,\n testAccountStateMachine,\n testSessionStateMachine,\n testDeliverySimulation,\n testBudgetSimulation,\n testControllerValidation,\n // Brand rights\n testBrandRightsFlow,\n hasBrandRightsTools,\n // v3 helpers\n hasGovernanceTools,\n hasSITools,\n likelySupportsV3,\n // Suite orchestrator\n testAllScenarios,\n getApplicableScenarios,\n SCENARIO_REQUIREMENTS,\n DEFAULT_SCENARIOS,\n formatSuiteResults,\n formatSuiteResultsJSON,\n // Types\n type TestScenario,\n type TestOptions,\n type OrchestratorOptions,\n type TestResult,\n type SuiteResult,\n type TestStepResult,\n type AgentProfile,\n type TaskResult,\n type TestClient,\n type Logger,\n} from './agent-tester';\n\n// Compliance assessment\nexport {\n comply,\n formatComplianceResults,\n formatComplianceResultsJSON,\n buildComplianceSummary,\n // Brief library\n SAMPLE_BRIEFS,\n getBriefById,\n getBriefsByVertical,\n // Types\n type ComplyOptions,\n type ComplianceTrack,\n type TrackResult,\n type TestedTrackEntry,\n type TrackStatus,\n type ComplianceResult,\n type ComplianceSummary,\n type ComplianceSummaryArtifact,\n type BuildSummaryOptions,\n type AdvisoryObservation,\n type ObservationSource,\n type SampleBrief,\n} from './compliance';\n\n// Test stubs for compliance testing\nexport { GovernanceAgentStub } from './stubs';\nexport type { StubCallRecord } from './stubs';\n\n// Controller response assertion helpers\nexport { expectControllerError, expectControllerSuccess } from './controller-assertions';\nexport type { ControllerErrorWithDetail } from './controller-assertions';\n\n// Seller-side comply_test_controller scaffold\nexport { createComplyController } from './comply-controller';\nexport type {\n ComplyController,\n ComplyControllerConfig,\n ComplyControllerContext,\n ComplyControllerToolDefinition,\n DirectiveAdapter,\n ForceAccountStatusParams,\n ForceAdapter,\n ForceAudienceStatusParams,\n ForceCatalogItemStatusParams,\n ForceCreateMediaBuyArmParams,\n ForceGetProductsArmParams,\n ForceGetSignalsArmParams,\n ForceCreativeStatusParams,\n ForceMediaBuyStatusParams,\n ForceSessionStatusParams,\n ForceTaskCompletionParams,\n SeedAccountParams,\n SeedAdapter,\n SeedBuyerAgentParams,\n SeedCreativeFormatParams,\n SeedCreativeParams,\n SeedMediaBuyParams,\n SeedPlanParams,\n SeedPricingOptionParams,\n SeedProductParams,\n SimulateAdapter,\n SimulateBudgetSpendParams,\n SimulateDeliveryParams,\n} from './comply-controller';\n// Re-export the full `comply_test_controller` integration surface so sellers\n// wiring their own `TestControllerStore` against typed domain state\n// (MediaBuyState, CreativeState, PlanState, …) can import everything they need\n// from a single path. See `examples/seller-test-controller.ts` for the\n// end-to-end pattern.\nexport {\n TestControllerError,\n CONTROLLER_SCENARIOS,\n DISCOVERY_ARM_SCENARIOS,\n SEED_SCENARIOS,\n SESSION_ENTRY_CAP,\n createSeedFixtureCache,\n enforceMapCap,\n registerTestController,\n} from '../server/test-controller';\nexport type {\n ControllerScenario,\n SeedFixtureCache,\n SeedScenario,\n TestControllerStore,\n TestControllerStoreFactory,\n TestControllerStoreOrFactory,\n} from '../server/test-controller';\n// Status enums every controller implementer mutates. Re-exported here so a\n// seller wiring `forceMediaBuyStatus` / `forceCreativeStatus` doesn't have to\n// reach into `@adcp/sdk` root just for the literal unions.\nexport type { AccountStatus, CreativeStatus, MediaBuyStatus } from '../types/core.generated';\n\n// Seed fixture merge helpers (permissive defaults + storyboard overlay).\nexport {\n mergeSeed,\n overlayById,\n mergeSeedProduct,\n mergeSeedPricingOption,\n mergeSeedCreative,\n mergeSeedPlan,\n mergeSeedMediaBuy,\n} from './seed-merge';\n\n// Test-controller bridge: seeded augmentation of read-side responses on sandbox\n// requests. Per-tool callbacks (`getSeededProducts`, `getSeededCreatives`,\n// `getSeededMediaBuys`, `getSeededAccounts`, `getSeededAccountFinancials`,\n// `getSeededCreativeFormats`) opt in by presence — see TestControllerBridge.\nexport {\n isSandboxRequest,\n mergeSeededProductsIntoResponse,\n filterValidSeededProducts,\n filterValidSeededCreatives,\n filterValidSeededMediaBuys,\n filterValidSeededAccounts,\n filterValidSeededAccountFinancials,\n filterValidSeededCreativeFormats,\n mergeSeededCreativesIntoResponse,\n mergeSeededMediaBuysIntoResponse,\n mergeSeededAccountsIntoResponse,\n mergeSeededCreativeFormatsIntoResponse,\n pickSeededAccountFinancialsForRequest,\n replaceAccountFinancialsIfSeeded,\n bridgeFromTestControllerStore,\n bridgeFromSessionStore,\n} from '../server/test-controller-bridge';\nexport type {\n TestControllerBridge,\n TestControllerBridgeContext,\n BridgeFromSessionStoreOptions,\n SeededCreative,\n SeededMediaBuy,\n SeededAccountFinancials,\n} from '../server/test-controller-bridge';\n\n// One-call harness for server-side agents — composes serve() +\n// seedComplianceFixtures + createWebhookReceiver + runStoryboard.\nexport { runAgainstLocalAgent } from './local-agent-runner';\nexport type { LocalAgentRunResult, PerStoryboardOverride, RunAgainstLocalAgentOptions } from './local-agent-runner';\n\n// External schema bundles for hosted compliance/certification runs.\nexport { registerExternalSchemaRoot, unregisterExternalSchemaRoot, withExternalSchemaRoot } from '../validation';\n\n// Storyboard-driven testing\nexport {\n // Runner\n runStoryboard,\n runStoryboardStep,\n applyAdcpVersionRunOptions,\n applyStoryboardVersionOptions,\n getFirstStepPreview,\n // Parser (single-file load for spec evolution)\n parseStoryboard,\n loadStoryboardFile,\n applyFixtureBindingsToRequest,\n buildFixtureResolutionSpecs,\n FixtureBindingRegistry,\n matchesFixtureRequirements,\n normalizeFixtureMatchExpression,\n validateFixtureResolutionDeclarations,\n // Compliance cache: capability-driven resolution\n getComplianceCacheDir,\n loadComplianceIndex,\n listBundles,\n loadBundleStoryboards,\n listAllComplianceStoryboards,\n getComplianceStoryboardById,\n findBundleById,\n resolveBundleOrStoryboard,\n resolveStoryboardsForCapabilities,\n isComplianceVersionSupported,\n CapabilityResolutionError,\n // Task mapping\n TASK_TO_METHOD,\n executeStoryboardTask,\n // Storyboard-only creative asset directives\n expandCreativeAssetDirectives,\n findUnresolvedCreativeAssetDirectives,\n // Context\n extractContext,\n injectContext,\n // Validations\n runValidations,\n resolvePath,\n // Rate-limit trip/replay observer\n RateLimitTripObserver,\n RATE_LIMIT_TRIP_CONTRACT,\n RATE_LIMIT_TRIP_DEFAULT_REPLAY_MAX_WAIT_SECONDS,\n RATE_LIMIT_TRIP_MAX_ATTEMPTS_MAX,\n RATE_LIMIT_TRIP_MAX_ATTEMPTS_MIN,\n validateRateLimitTripSpec,\n // Sandbox entities\n getSandboxEntities,\n getSandboxBrands,\n getSandboxBrand,\n isSandboxDomain,\n clearSandboxCache,\n // Assertion registry (adcontextprotocol/adcp#2639) — authors of invariant\n // modules import these from `@adcp/sdk/testing` to register cross-step\n // checks the runner will resolve from `storyboard.invariants: [...]`.\n registerAssertion,\n getAssertion,\n listAssertions,\n listDefaultAssertions,\n clearAssertionRegistry,\n resolveAssertions,\n type AssertionSpec,\n type AssertionContext,\n type AssertionResult,\n type RegisterAssertionOptions,\n // Types\n type Storyboard,\n type StoryboardFixtureResolution,\n type FixtureResolutionStrategy,\n type FixtureMatchOperator,\n type FixtureMatchClause,\n type FixtureResolutionDeclaration,\n type ProductFixtureResolutionDeclaration,\n type PricingOptionFixtureResolutionDeclaration,\n type FixtureResolutionStatus,\n type FixtureResolutionRecord,\n type FixtureResolutionAttempt,\n type FixtureResolutionEvidence,\n type FixtureResolutionCoverageGap,\n type StoryboardInvariants,\n type StoryboardInvariantsObject,\n type StepInvariantsObject,\n type StoryboardPhase,\n type StoryboardStep,\n type RateLimitTripSpec,\n type StoryboardValidation,\n type RateLimitTripClient,\n type RateLimitTripFailureCode,\n type RateLimitTripObservation,\n type RateLimitTripObserverOptions,\n type RateLimitTripResponseSnapshot,\n type RateLimitTripStructuredResult,\n type RateLimitTripTaskOptions,\n type StoryboardContext,\n type StoryboardRunOptions,\n type TrustedMatchContextProviderEndpoint,\n type TrustedMatchContextRegistrationContext,\n type TrustedMatchContextRouterRunnerOptions,\n type ValidationResult,\n type StoryboardStepPreview,\n type StoryboardStepResult,\n type StoryboardStepHint,\n type StoryboardStepHintBase,\n type ContextValueRejectedHint,\n type ShapeDriftHint,\n type MissingRequiredFieldHint,\n type FormatMismatchHint,\n type MonotonicViolationHint,\n type ContextProvenanceEntry,\n type StoryboardPhaseResult,\n type StoryboardResult,\n type RunnerNotice,\n type NoticeCode,\n type NoticeSeverity,\n type AgentCapabilities,\n type BundleKind,\n type BundleRef,\n type CapabilityResolutionCode,\n type ComplianceIndex,\n type ComplianceIndexProtocol,\n type ComplianceIndexSpecialism,\n type ResolveOptions,\n type ResolvedBundle,\n type ResolvedStoryboards,\n type SandboxBrand,\n type SandboxAgent,\n type SandboxEntities,\n type BrandJson,\n type AdagentsJson,\n gradeOAuthMetadataGraph,\n gradeOAuthMetadataGraphVector,\n loadOAuthMetadataGraphVectors,\n normalizeOAuthResourceForComparison,\n redactOAuthUrlForOutput,\n type GradeOAuthMetadataGraphOptions,\n type OAuthMetadataGraphErrorCode,\n type OAuthMetadataGraphFinding,\n type OAuthMetadataGraphGrade,\n type OAuthMetadataGraphObservation,\n type OAuthMetadataGraphVector,\n type OAuthMetadataGraphVectorCorpus,\n BrandJsonSchema,\n AdagentsJsonSchema,\n} from './storyboard';\n"],"mappings":"AAGA;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,OACK;AAGP;AAAA,EACe,aAAbA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;A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A,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAqEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAQA;AAAA,EACA;AAAA,OACK;","names":["testAgent"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-buy.d.ts","sourceRoot":"","sources":["../../../../src/lib/testing/scenarios/media-buy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"media-buy.d.ts","sourceRoot":"","sources":["../../../../src/lib/testing/scenarios/media-buy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EACV,gBAAgB,EAKjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAA+C,MAAM,4BAA4B,CAAC;AACtH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAatF;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,GAAG,IAAI,CAiBvF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,aAAa,GAAG,IAAI,CAStG;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,aAA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AAM,EAChB,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,YAAY,CAAA;CAAE,CAAC,CAmT9D;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAChD,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,YAAY,CAAA;CAAE,CAAC,CAsM9D;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,YAAY,CAAA;CAAE,CAAC,CA6I9D"}
|
|
@@ -35,9 +35,11 @@ __export(media_buy_exports, {
|
|
|
35
35
|
testTerminalStateEnforcement: () => testTerminalStateEnforcement
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(media_buy_exports);
|
|
38
|
+
var import_crypto = require("crypto");
|
|
38
39
|
var import_client = require('../client.js');
|
|
39
40
|
var import_discovery = require('./discovery.js');
|
|
40
41
|
var import_media_buy_status = require('../../utils/media-buy-status.js');
|
|
42
|
+
var import_idempotency = require('../../utils/idempotency.js');
|
|
41
43
|
function selectProduct(products, options) {
|
|
42
44
|
let candidates = products;
|
|
43
45
|
if (options.channels?.length) {
|
|
@@ -97,6 +99,16 @@ function buildCreateMediaBuyRequest(product, pricingOption, options, extras = {}
|
|
|
97
99
|
function getDefaultFormatId() {
|
|
98
100
|
return { agent_url: "https://creative.adcontextprotocol.org", id: "display_300x250" };
|
|
99
101
|
}
|
|
102
|
+
function resolveSellerFormatId(value, agentUrl) {
|
|
103
|
+
const candidate = isRecord(value) && value.format_id !== void 0 ? value.format_id : value;
|
|
104
|
+
if (typeof candidate === "string") {
|
|
105
|
+
return { agent_url: agentUrl, id: candidate };
|
|
106
|
+
}
|
|
107
|
+
if (isRecord(candidate) && typeof candidate.id === "string") {
|
|
108
|
+
return { agent_url: agentUrl, ...candidate, id: candidate.id };
|
|
109
|
+
}
|
|
110
|
+
return void 0;
|
|
111
|
+
}
|
|
100
112
|
function formatIdToString(formatId) {
|
|
101
113
|
return formatId.id;
|
|
102
114
|
}
|
|
@@ -126,6 +138,7 @@ function buildStaticInlineCreative(formatId) {
|
|
|
126
138
|
format_id: formatId,
|
|
127
139
|
assets: {
|
|
128
140
|
primary: {
|
|
141
|
+
asset_type: "image",
|
|
129
142
|
url: "https://via.placeholder.com/300x250?text=Inline+Creative",
|
|
130
143
|
width: 300,
|
|
131
144
|
height: 250,
|
|
@@ -596,10 +609,7 @@ async function testCreativeSync(agentUrl, options) {
|
|
|
596
609
|
});
|
|
597
610
|
return { steps, profile };
|
|
598
611
|
}
|
|
599
|
-
let formatId =
|
|
600
|
-
agent_url: "https://creative.adcontextprotocol.org",
|
|
601
|
-
id: "display_300x250"
|
|
602
|
-
};
|
|
612
|
+
let formatId = getDefaultFormatId();
|
|
603
613
|
if (profile.tools.includes("list_creative_formats")) {
|
|
604
614
|
const { result: formatsResult } = await (0, import_client.runStep)(
|
|
605
615
|
"Get formats for creative",
|
|
@@ -612,21 +622,18 @@ async function testCreativeSync(agentUrl, options) {
|
|
|
612
622
|
const formats = data.formats;
|
|
613
623
|
const firstFormat = formatIds?.[0] || formats?.[0];
|
|
614
624
|
if (firstFormat) {
|
|
615
|
-
|
|
616
|
-
formatId = { id: firstFormat };
|
|
617
|
-
} else {
|
|
618
|
-
const formatObj = firstFormat;
|
|
619
|
-
formatId = formatObj.format_id || formatObj;
|
|
620
|
-
}
|
|
625
|
+
formatId = resolveSellerFormatId(firstFormat, agentUrl) ?? formatId;
|
|
621
626
|
}
|
|
622
627
|
}
|
|
623
628
|
}
|
|
629
|
+
const syncKey = (0, import_idempotency.generateIdempotencyKey)();
|
|
624
630
|
const testCreative = {
|
|
625
|
-
creative_id: `test-creative-${
|
|
631
|
+
creative_id: `test-creative-${(0, import_crypto.randomUUID)()}`,
|
|
626
632
|
name: "E2E Test Creative",
|
|
627
633
|
format_id: formatId,
|
|
628
634
|
assets: {
|
|
629
635
|
primary: {
|
|
636
|
+
asset_type: "image",
|
|
630
637
|
url: "https://via.placeholder.com/300x250",
|
|
631
638
|
width: 300,
|
|
632
639
|
height: 250,
|
|
@@ -639,7 +646,8 @@ async function testCreativeSync(agentUrl, options) {
|
|
|
639
646
|
"sync_creatives",
|
|
640
647
|
async () => client.syncCreatives({
|
|
641
648
|
account: accountRef,
|
|
642
|
-
creatives: [testCreative]
|
|
649
|
+
creatives: [testCreative],
|
|
650
|
+
idempotency_key: syncKey
|
|
643
651
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- intentional: test request bypasses strict typing
|
|
644
652
|
})
|
|
645
653
|
);
|