diff --git a/@platform/codebase/@features/bookings-tryst/ai-core/src/adapter/update-profile/index.spec.ts b/@platform/codebase/@features/bookings-tryst/ai-core/src/adapter/update-profile/index.spec.ts index ace683f..b51aa77 100644 --- a/@platform/codebase/@features/bookings-tryst/ai-core/src/adapter/update-profile/index.spec.ts +++ b/@platform/codebase/@features/bookings-tryst/ai-core/src/adapter/update-profile/index.spec.ts @@ -63,6 +63,7 @@ function makeCtx( return { userId: 'user_1', session, + autoExecuted: false, // update-profile is propose-only; never auto-executed. platformApi: { get: vi.fn(), post: vi.fn(), diff --git a/@platform/codebase/@features/bookings-tryst/ai-core/src/adapter/update-profile/index.ts b/@platform/codebase/@features/bookings-tryst/ai-core/src/adapter/update-profile/index.ts index 8928678..dd83588 100644 --- a/@platform/codebase/@features/bookings-tryst/ai-core/src/adapter/update-profile/index.ts +++ b/@platform/codebase/@features/bookings-tryst/ai-core/src/adapter/update-profile/index.ts @@ -21,6 +21,7 @@ import { type ActionDescriptor, type AdapterContext, type BlocklistEntry, + type PrecheckContext, type SurfaceAdapterAction, gateK3cGovtName, precheckResult, @@ -91,7 +92,7 @@ function forbiddenNames(entries: readonly BlocklistEntry[]): string[] { const action: SurfaceAdapterAction = { action: 'update-profile', schema, - async precheck(input: Input, ctx: AdapterContext) { + async precheck(input: Input, ctx: PrecheckContext) { const phrases = await ctx.blocklist.list('phrase'); const forbidden = forbiddenNames(phrases); const combined = draftStrings(input).join('\n'); @@ -116,7 +117,7 @@ const action: SurfaceAdapterAction = { targetKind: 'surface_profile', stakes: 'medium', confidence: 1, - autoExecuted: false, + autoExecuted: ctx.autoExecuted, outcome: { external_id: externalId }, }); @@ -130,4 +131,6 @@ export const descriptor: ActionDescriptor = { verb: 'update-profile', action: action as SurfaceAdapterAction, autoExecutable: false, + auditTargetKind: 'surface_profile', + auditStakes: 'medium', };