var{defineProperty:r,getOwnPropertyNames:u,getOwnPropertyDescriptor:p}=Object,c=Object.prototype.hasOwnProperty;function f(i){return this[i]}var d=(i)=>{var e=(o??=new WeakMap).get(i),s;if(e)return e;if(e=r({},"__esModule",{value:!0}),i&&typeof i==="object"||typeof i==="function"){for(var t of u(i))if(!c.call(e,t))r(e,t,{get:f.bind(i,t),enumerable:!(s=p(i,t))||s.enumerable})}return o.set(i,e),e},o;var g=(i)=>i;function I(i,e){this[i]=g.bind(null,e)}var A=(i,e)=>{for(var s in e)r(i,s,{get:e[s],enumerable:!0,configurable:!0,set:I.bind(e,s)})};var S=(i,e)=>()=>(i&&(e=i(i=0)),e);function N(i){let e=[],s=a(i.skill)?i.skill:null,t=a(i.publisher)?i.publisher:null,n=a(i.artifact)?i.artifact:null;if(i.schemaVersion!=="1.0.0")e.push({code:"SCHEMA_VERSION_INVALID",message:`Unsupported skill manifest schema version ${i.schemaVersion}.`});if(!s||typeof s.key!=="string"||typeof s.version!=="string"||typeof s.entryPoint!=="string")e.push({code:"MANIFEST_INVALID",message:"Skill manifest is missing required skill metadata."});if(!t||typeof t.id!=="string"||typeof t.provenance!=="string")e.push({code:"MANIFEST_INVALID",message:"Skill manifest is missing required publisher metadata."});if(!n||typeof n.digest!=="string")e.push({code:"MANIFEST_INVALID",message:"Skill manifest is missing an artifact digest."});for(let l of Array.isArray(n?.files)?n.files:[])if(!l.path||!l.digest||l.size<0)e.push({code:"MANIFEST_INVALID",message:"Skill manifest contains an invalid artifact file entry."});if(i.signature?.issuedAt&&Number.isNaN(Date.parse(i.signature.issuedAt)))e.push({code:"MANIFEST_INVALID",message:"Skill manifest signature issuedAt is not a valid ISO timestamp."});if(i.signature?.expiresAt&&Number.isNaN(Date.parse(i.signature.expiresAt)))e.push({code:"MANIFEST_INVALID",message:"Skill manifest signature expiresAt is not a valid ISO timestamp."});return e}function a(i){return typeof i==="object"&&i!==null}export{N as validateControlPlaneSkillManifest};
