@oxvm/cli 0.0.0-stage → 0.0.29

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.
Files changed (67) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +18 -0
  3. package/README.md +27 -2
  4. package/THIRD_PARTY_NOTICES.txt +52056 -0
  5. package/dist/arguments.d.ts +162 -0
  6. package/dist/arguments.js +1 -0
  7. package/dist/bin.d.ts +2 -0
  8. package/dist/bin.js +2 -0
  9. package/dist/contracts.d.ts +98 -0
  10. package/dist/contracts.js +0 -0
  11. package/dist/environment.d.ts +4 -0
  12. package/dist/environment.js +1 -0
  13. package/dist/failure.d.ts +5 -0
  14. package/dist/failure.js +1 -0
  15. package/dist/index.d.ts +2 -0
  16. package/dist/index.js +1 -0
  17. package/dist/project-files.d.ts +2 -0
  18. package/dist/project-files.js +1 -0
  19. package/dist/project-lock.d.ts +13 -0
  20. package/dist/project-lock.js +4 -0
  21. package/dist/report.d.ts +3 -0
  22. package/dist/report.js +1 -0
  23. package/dist/run.d.ts +17 -0
  24. package/dist/run.js +36 -0
  25. package/dist/snapshot-commands.d.ts +7 -0
  26. package/dist/snapshot-commands.js +3 -0
  27. package/dist/snapshot-errors.d.ts +4 -0
  28. package/dist/snapshot-errors.js +2 -0
  29. package/dist/snapshot-help.d.ts +3 -0
  30. package/dist/snapshot-help.js +14 -0
  31. package/dist/snapshot-templates.d.ts +16 -0
  32. package/dist/snapshot-templates.js +58 -0
  33. package/dist/start-application.d.ts +2 -0
  34. package/dist/start-application.js +3 -0
  35. package/dist/starter-inputs.d.ts +13 -0
  36. package/dist/starter-inputs.js +1 -0
  37. package/dist/starter-release.d.ts +29 -0
  38. package/dist/starter-release.js +1 -0
  39. package/dist/starter-template.d.ts +9 -0
  40. package/dist/starter-template.js +2 -0
  41. package/dist/starter.generated.d.ts +1 -0
  42. package/dist/starter.generated.js +1 -0
  43. package/dist/starter.json +1 -0
  44. package/dist/template-files.d.ts +2 -0
  45. package/dist/template-files.js +1 -0
  46. package/dist/templates.d.ts +27 -0
  47. package/dist/templates.js +115 -0
  48. package/dist/validation.d.ts +5 -0
  49. package/dist/validation.js +1 -0
  50. package/dist/wasm-commands.d.ts +7 -0
  51. package/dist/wasm-commands.js +1 -0
  52. package/dist/wasm-errors.d.ts +2 -0
  53. package/dist/wasm-errors.js +1 -0
  54. package/dist/wasm-help.d.ts +3 -0
  55. package/dist/wasm-help.js +37 -0
  56. package/dist/wasm-release.d.ts +15 -0
  57. package/dist/wasm-release.js +8 -0
  58. package/dist/wasm-template-files.d.ts +50 -0
  59. package/dist/wasm-template-files.js +350 -0
  60. package/dist/wasm-template-network.d.ts +15 -0
  61. package/dist/wasm-template-network.js +91 -0
  62. package/dist/wasm-templates.d.ts +16 -0
  63. package/dist/wasm-templates.js +91 -0
  64. package/dist/wasm-text.d.ts +23 -0
  65. package/dist/wasm-text.js +40 -0
  66. package/package.json +56 -3
  67. package/sbom.cdx.json +8537 -0
@@ -0,0 +1,3 @@
1
+ var m=Object.defineProperty;var i=(s,n)=>m(s,"name",{value:n,configurable:!0});import{spawn as h}from"node:child_process";import{VMError as a}from"@oxvm/sdk";async function T(s,n,t){async function c(f){if(t.signal.aborted)throw new a("ABORTED","Starter startup canceled");await new Promise((w,d)=>{const r=h(n,[...f],{cwd:s,env:{...t.environment},detached:process.platform!=="win32",stdio:["inherit","pipe","pipe"]});let o;const p=i(e=>{if(r.pid!==void 0)try{process.platform==="win32"?r.kill(e):process.kill(-r.pid,e)}catch{}},"kill"),l=i(()=>{p("SIGTERM"),o=setTimeout(()=>{p("SIGKILL")},3e3),o.unref()},"abort");t.signal.addEventListener("abort",l,{once:!0}),t.signal.aborted&&l(),r.stdout.on("data",e=>{t.stdout(e.toString("utf8"))}),r.stderr.on("data",e=>{t.stderr(e.toString("utf8"))}),r.once("error",()=>{u(),d(new a("INVALID_ARGUMENT",`Install ${n} and try the starter command again`))}),r.once("close",e=>{u(),t.signal.aborted?d(new a("ABORTED","Starter stopped")):e!==0?d(new a("INVALID_ARGUMENT",`${n} failed. The generated project remains at ${s}`)):w()});function u(){t.signal.removeEventListener("abort",l),o!==void 0&&clearTimeout(o)}i(u,"cleanup")})}i(c,"run"),t.stdout(`Installing starter dependencies with ${n}\u2026
2
+ `),await c(n==="npm"?["install","--ignore-scripts","--no-audit","--no-fund"]:["install","--ignore-scripts"]),t.stdout(`Starting your local OXVM demo\u2026
3
+ `),await c(["run","dev","--","--host","127.0.0.1"])}i(T,"startApplication");export{T as startApplication};
@@ -0,0 +1,13 @@
1
+ /** Private distribution supplies this profile beside the launcher, never in application source. */
2
+ export declare function readStarterInputs(directory: string, version: string): Promise<{
3
+ archives: {
4
+ sdk: string;
5
+ cli: string;
6
+ };
7
+ engineComplianceDir?: string;
8
+ image: {
9
+ bundle: string;
10
+ trust: string;
11
+ };
12
+ engineDir: string;
13
+ } | undefined>;
@@ -0,0 +1 @@
1
+ var u=Object.defineProperty;var c=(n,r)=>u(n,"name",{value:r,configurable:!0});import{readFile as h}from"node:fs/promises";import{dirname as g,join as v,resolve as O}from"node:path";import{VMError as d}from"@oxvm/sdk";import{fields as l,object as m,text as D}from"./validation.js";async function V(n,r){const f=v(n,".oxidevm/starter.json"),s=await h(f).catch(i=>{if(!(typeof i=="object"&&i!==null&&"code"in i&&i.code==="ENOENT"))throw i});if(s===void 0)return;if(s.length>16*1024)throw new d("PROTOCOL_ERROR","Starter profile exceeds its limit");const p=JSON.parse(s.toString("utf8")),e=m(p,"starter profile");if(l(e,["schemaVersion","sdkVersion","image","engineDir","archives"],["engineComplianceDir"]),e.schemaVersion!==1)throw new d("PROTOCOL_ERROR","Unsupported starter profile");if(e.sdkVersion!==r)throw new d("INVALID_ARGUMENT","The private starter profile must match this exact SDK and CLI version");const o=m(e.image,"starter image");l(o,["bundle","trust"]);const a=m(e.archives,"starter archives");l(a,["sdk","cli"]);const t=c(i=>O(g(f),D(i)),"local");return{image:{bundle:t(o.bundle),trust:t(o.trust)},engineDir:t(e.engineDir),...e.engineComplianceDir===void 0?{}:{engineComplianceDir:t(e.engineComplianceDir)},archives:{sdk:t(a.sdk),cli:t(a.cli)}}}c(V,"readStarterInputs");export{V as readStarterInputs};
@@ -0,0 +1,29 @@
1
+ export declare function decodeStarterRelease(value: unknown, sdkVersion: string, expectedEngine: string): {
2
+ schemaVersion: 2;
3
+ sdkVersion: string;
4
+ engineRelease: import("@oxvm/sdk").SHA256;
5
+ engineCompliance: import("@oxvm/sdk/image-builder").EngineCompliancePin;
6
+ image: import("@oxvm/sdk").ImageRef<"userspace">;
7
+ archive: {
8
+ url: string;
9
+ bytes: number;
10
+ sha256: import("@oxvm/sdk").SHA256;
11
+ };
12
+ materialsUrl: string;
13
+ materialsSHA256: import("@oxvm/sdk").SHA256;
14
+ };
15
+ /** No mutable catalog or private credentials take part in the public quickstart. */
16
+ export declare function pinnedStarterRelease(): {
17
+ schemaVersion: 2;
18
+ sdkVersion: string;
19
+ engineRelease: import("@oxvm/sdk").SHA256;
20
+ engineCompliance: import("@oxvm/sdk/image-builder").EngineCompliancePin;
21
+ image: import("@oxvm/sdk").ImageRef<"userspace">;
22
+ archive: {
23
+ url: string;
24
+ bytes: number;
25
+ sha256: import("@oxvm/sdk").SHA256;
26
+ };
27
+ materialsUrl: string;
28
+ materialsSHA256: import("@oxvm/sdk").SHA256;
29
+ } | undefined;
@@ -0,0 +1 @@
1
+ var C=Object.defineProperty;var o=(t,e)=>C(t,"name",{value:e,configurable:!0});import{defineImage as b,VMError as s}from"@oxvm/sdk";import{decodeEngineCompliancePin as U,decodeImageDigest as m,getSDKRelease as S}from"@oxvm/sdk/image-builder";import{starterRelease as g}from"./starter.generated.js";import{fields as l,number as L,object as c,text as d}from"./validation.js";function w(t){const e=new URL(d(t));if(e.origin!=="https://cdn.oxvm.dev"&&e.origin!=="https://cdn.oxidevm.dev"||e.username!==""||e.password!==""||!e.pathname.startsWith("/images/")||e.search!==""||e.hash!=="")throw new s("PROTOCOL_ERROR","starter assets must use their pinned public CDN location");return e.href}o(w,"publicURL");function P(t,e,E){const r=c(t,"starter release");if(l(r,["schemaVersion","sdkVersion","engineRelease","engineCompliance","image","archive","materialsSHA256","materialsUrl"]),r.schemaVersion!==2||r.sdkVersion!==e)throw new s("PROTOCOL_ERROR","starter version differs from the installed SDK and CLI version");const h=m(r.engineRelease,"starter engine");if(`sha256:${h}`!==E)throw new s("PROTOCOL_ERROR","starter engine differs from the installed SDK");const a=c(r.image,"starter image");if(l(a,["mode","manifestUrl","manifestSHA256","trust"]),a.mode!=="userspace")throw new s("PROTOCOL_ERROR","public starter requires Userspace");const i=c(a.trust,"starter author trust");if(l(i,["algorithm","keyId","publicKey"]),i.algorithm!=="Ed25519")throw new s("PROTOCOL_ERROR","starter author trust requires Ed25519");const R=b({mode:"userspace",manifestUrl:w(a.manifestUrl),manifestSHA256:m(a.manifestSHA256,"starter image"),trust:{algorithm:"Ed25519",keyId:d(i.keyId),publicKey:d(i.publicKey)}}),[,v,f,p]=new URL(R.manifestUrl).pathname.split("/"),u=new URL(d(r.materialsUrl));if(v!=="images"||f===void 0||p===void 0||u.pathname!==`/spacia-ai/oxvm-sdk-public/releases/download/image-${f}-v${p}/OPEN-SOURCE-NOTICE.md`||!/^https:\/\/github\.com\/spacia-ai\/oxvm-sdk-public\/releases\/download\/image-[A-Za-z0-9][A-Za-z0-9._-]*-v[0-9]+\.[0-9]+\.[0-9]+\/OPEN-SOURCE-NOTICE\.md$/u.test(u.href))throw new s("PROTOCOL_ERROR","starter materials require their pinned GitHub release");const n=c(r.archive,"starter archive");l(n,["url","bytes","sha256"]);const O=L(n.bytes,1);if(O>512*1024**2)throw new s("PROTOCOL_ERROR","starter archive exceeds its size limit");return{schemaVersion:2,sdkVersion:e,engineRelease:h,engineCompliance:U(r.engineCompliance,h),image:R,archive:{url:w(n.url),bytes:O,sha256:m(n.sha256,"starter archive")},materialsUrl:u.href,materialsSHA256:m(r.materialsSHA256,"starter license materials")}}o(P,"decodeStarterRelease");function A(){if(g===null)return;const t=S();return P(g,t.sdkVersion,t.engineRelease)}o(A,"pinnedStarterRelease");export{P as decodeStarterRelease,A as pinnedStarterRelease};
@@ -0,0 +1,9 @@
1
+ export declare function archiveDependencies(archives: {
2
+ readonly sdk: string;
3
+ readonly cli: string;
4
+ } | undefined): Promise<{
5
+ readonly sdk: string;
6
+ readonly cli: string;
7
+ } | undefined>;
8
+ /** The build stages the canonical example once; scaffolding never maintains a second copy. */
9
+ export declare function writeStarter(directory: string): Promise<void>;
@@ -0,0 +1,2 @@
1
+ var p=Object.defineProperty;var o=(t,i)=>p(t,"name",{value:i,configurable:!0});import{lstat as u,mkdir as w,readFile as g,writeFile as O}from"node:fs/promises";import{dirname as R,join as f,resolve as l}from"node:path";import{VMError as n}from"@oxvm/sdk";import{object as h}from"./validation.js";import{file as m}from"./template-files.js";async function b(t){if(t!==void 0){for(const i of[t.sdk,t.cli]){const e=await u(i).catch(()=>{});if(e?.isFile()!==!0||!i.endsWith(".tgz")||e.size>256*1024**2)throw new n("INVALID_ARGUMENT","Package archives must be regular .tgz files of at most 256 MiB")}return{sdk:`file:${l(t.sdk)}`,cli:`file:${l(t.cli)}`}}}o(b,"archiveDependencies");async function E(t){const i=h(JSON.parse(await g(new URL("../dist/starter.json",import.meta.url),"utf8")),"starter template");if(Object.keys(i).length>64)throw new n("PROTOCOL_ERROR","Starter template exceeds its file limit");for(const[e,s]of Object.entries(i)){const c=/^[a-zA-Z0-9][a-zA-Z0-9/._-]*$/u.test(e),d=/^\.(?:agents|claude)\/skills\/[a-z0-9]+(?:-[a-z0-9]+)*\/(?:SKILL\.md|agents\/openai\.yaml)$/u.test(e);if(!(c||d)||e.split("/").some(a=>a===".."||a==="."||a===""))throw new n("PROTOCOL_ERROR","Starter template contains an escaping path");if(typeof s!="string"||s.length>1024**2)throw new n("PROTOCOL_ERROR","Starter template file exceeds its limit");const r=s;await w(R(f(t,e)),{recursive:!0}),e.endsWith(".woff2")||e.endsWith(".png")?await O(f(t,e),Buffer.from(r,"base64"),{flag:"wx"}):await m(t,e,r)}await m(t,"tsconfig.node.json",`${JSON.stringify({extends:"./tsconfig.json",compilerOptions:{lib:["ES2024"],types:["node"]},include:["vite.config.ts","dev/**/*.ts","oxvm.config.ts"]},null,2)}
2
+ `)}o(E,"writeStarter");export{b as archiveDependencies,E as writeStarter};
@@ -0,0 +1 @@
1
+ export declare const starterRelease: unknown;
@@ -0,0 +1 @@
1
+ const e={schemaVersion:2,sdkVersion:"0.0.29",engineRelease:"3ac1f1185bca6837d187e96aad810bcc9555401fb4eec76aceacd2956cee563d",engineCompliance:{url:"https://cdn.oxvm.dev/engine/3ac1f1185bca6837d187e96aad810bcc9555401fb4eec76aceacd2956cee563d/compliance/b52713e53ff19a364d459cdf987f587b233e94e2fc2dfe4d27b6242359ce6db6/compliance.json",bytes:746,sha256:"b52713e53ff19a364d459cdf987f587b233e94e2fc2dfe4d27b6242359ce6db6"},image:{mode:"userspace",manifestUrl:"https://cdn.oxvm.dev/images/oxidevm-starter-pandas/0.0.3/da71749f0624f5444be55994fb92256535004f7983c46b38a2891178bb31e657/manifest.json",manifestSHA256:"da71749f0624f5444be55994fb92256535004f7983c46b38a2891178bb31e657",trust:{algorithm:"Ed25519",keyId:"ed25519-d753cdd5739b36c670441766e2c08ea8",publicKey:"MCowBQYDK2VwAyEAynhb7WG89CT3+mWXxbt8zgaDJJmArtm1F9KTf3bzKTU="}},archive:{url:"https://cdn.oxvm.dev/images/oxidevm-starter-pandas/0.0.3/da71749f0624f5444be55994fb92256535004f7983c46b38a2891178bb31e657/bundle.tgz",bytes:338969488,sha256:"ad060aaa834912f8d004905db2cf8b65b60e531fcc3cbb729294c579f57a9267"},materialsSHA256:"90fa99dc8b0bfac3528d69dbfd313835b8059380cb4a7e4788695f3eddf13c86",materialsUrl:"https://github.com/spacia-ai/oxvm-sdk-public/releases/download/image-oxidevm-starter-pandas-v0.0.3/OPEN-SOURCE-NOTICE.md"};export{e as starterRelease};