var _=Object.defineProperty;var $=(j)=>j;function b(j,k){this[j]=$.bind(null,k)}var A=(j,k)=>{for(var z in k)_(j,z,{get:k[z],enumerable:!0,configurable:!0,set:b.bind(k,z)})};var C=(j,k)=>()=>(j&&(k=j(j=0)),k);import{defineCommand as H,installOp as J}from"@contractspec/lib.contracts-spec";import{defineSchemaModel as x,ScalarTypeEnum as w}from"@contractspec/lib.schema";var K=["@contractspec"],L=["contracts","mcp","adoption"];function W(j,k){let z=x({name:"AdoptionCatalogSearchInput",fields:{query:{type:w.String_unsecure(),isOptional:!1},family:{type:w.String_unsecure(),isOptional:!0},platform:{type:w.String_unsecure(),isOptional:!0}}}),P=x({name:"AdoptionCatalogSearchOutput",fields:{results:{type:w.JSON(),isOptional:!1}}});J(j,H({meta:{key:"adoption.catalog_search",version:"1.0.0",stability:"beta",owners:K,tags:L,description:"Search the local ContractSpec adoption catalog.",goal:"Find relevant ContractSpec reuse candidates for a query.",context:"Contracts MCP server."},io:{input:z,output:P},policy:{auth:"anonymous"}}),async({family:D,platform:B,query:F})=>({results:await k.searchAdoptionCatalog({family:D,platform:B,query:F})}));let Q=x({name:"AdoptionResolveInput",fields:{family:{type:w.String_unsecure(),isOptional:!1},query:{type:w.String_unsecure(),isOptional:!1},paths:{type:w.JSON(),isOptional:!0},platform:{type:w.String_unsecure(),isOptional:!0},runtime:{type:w.String_unsecure(),isOptional:!0}}}),U=x({name:"AdoptionResolveOutput",fields:{resolution:{type:w.JSON(),isOptional:!1}}});J(j,H({meta:{key:"adoption.resolve",version:"1.0.0",stability:"beta",owners:K,tags:L,description:"Resolve the best adoption candidate for one family.",goal:"Provide one ordered recommendation that matches Connect.",context:"Contracts MCP server."},io:{input:Q,output:U},policy:{auth:"anonymous"}}),async({family:D,paths:B,platform:F,query:Y,runtime:Z})=>({resolution:await k.resolveAdoption({family:D,paths:Array.isArray(B)?B:void 0,platform:F,query:Y,runtime:Z})}));let V=x({name:"AdoptionSyncInput",fields:{}}),X=x({name:"AdoptionSyncOutput",fields:{catalogPath:{type:w.String_unsecure(),isOptional:!1},total:{type:w.Int_unsecure(),isOptional:!1}}});J(j,H({meta:{key:"adoption.sync",version:"1.0.0",stability:"beta",owners:K,tags:L,description:"Mirror the bundled ContractSpec adoption catalog locally.",goal:"Refresh the local adoption catalog used by Connect and MCP.",context:"Contracts MCP server."},io:{input:V,output:X},policy:{auth:"user"}}),async()=>k.syncAdoptionCatalog())}export{W as registerAdoptionOps};
