11import type {
2- PlatformProviderDefinitionV1 ,
3- PlatformProviderServiceApplyV1 ,
4- } from '@cordisx/protocol/platform-provider/v1 '
2+ PlatformProviderDefinitionV2 ,
3+ PlatformProviderServiceApplyV2 ,
4+ } from '@cordisx/protocol/platform-provider/v2 '
55import { CliProxyPlatformProviderAdapter } from './adapter.js'
66import { BROKER_BINDINGS } from './bindings.js'
77
@@ -17,10 +17,10 @@ const OPERATIONS = [
1717 'approvals.decide' ,
1818] as const
1919
20- export const apply : PlatformProviderServiceApplyV1 = async ( ctx , input ) => {
20+ export const apply : PlatformProviderServiceApplyV2 = async ( ctx , input ) => {
2121 for ( const configuration of input . configurations ) {
2222 if ( ! configuration . enabled ) continue
23- const definition : PlatformProviderDefinitionV1 = {
23+ const definition : PlatformProviderDefinitionV2 = {
2424 descriptor : {
2525 $schema :
2626 'https://raw.githubusercontent.com/cordisx/cordisx-protocol/main/schemas/platform-provider-descriptor.v1.schema.json' ,
@@ -31,9 +31,9 @@ export const apply: PlatformProviderServiceApplyV1 = async (ctx, input) => {
3131 implementationStatus : 'experimental' ,
3232 operations : OPERATIONS ,
3333 } ,
34- mapping : { models : [ ] } ,
34+ mapping : configuration . mapping ,
3535 brokerRequest : {
36- bindings : BROKER_BINDINGS as PlatformProviderDefinitionV1 [ 'brokerRequest' ] [ 'bindings' ] ,
36+ bindings : BROKER_BINDINGS as PlatformProviderDefinitionV2 [ 'brokerRequest' ] [ 'bindings' ] ,
3737 } ,
3838 createAdapter : async factory => {
3939 if ( factory . owner . ownerHandle !== input . owner . ownerHandle ) {
0 commit comments