From f852c8f0aa77a59e783d6f7129fff926f963aaa4 Mon Sep 17 00:00:00 2001 From: "Timothy J. Aveni" Date: Thu, 3 Sep 2026 15:46:52 -0700 Subject: [PATCH] Host workspace repositories on Central Gitea --- .yarn/install-state.gz | Bin 0 -> 21804 bytes .yarn/plugins/yarn-plugin-nixify.cjs | 1 + .yarnrc.yml | 24 + README.md | 68 +- flake.nix | 56 +- grammar/QuixosCapability.g4 | 403 ++ grammar/QuixosLock.g4 | 55 + package-lock.json | 142 - package.json | 23 +- proto/camino/api.proto | 203 +- proto/camino/options.proto | 94 - proto/camino/schema.proto | 227 +- proto/quixos/orch.proto | 86 +- proto/quixos/package.proto | 70 +- proto/quixos/refs.proto | 29 +- proto/quixos/runtime.proto | 23 +- src/capability-language/cli.ts | 95 + .../generated/QuixosCapability.interp | 253 + .../generated/QuixosCapability.tokens | 183 + .../generated/QuixosCapabilityLexer.interp | 304 + .../generated/QuixosCapabilityLexer.tokens | 183 + .../generated/QuixosCapabilityLexer.ts | 523 ++ .../generated/QuixosCapabilityParser.ts | 5178 +++++++++++++++++ .../generated/QuixosCapabilityVisitor.ts | 380 ++ src/capability-language/index.ts | 1 + src/capability-language/parser.ts | 1488 +++++ src/capability-model/index.ts | 2 + src/capability-model/types.ts | 373 ++ src/capability-model/validation.ts | 1785 ++++++ src/descriptor.ts | 108 +- src/gen/camino/api_pb.ts | 611 +- src/gen/camino/options_pb.ts | 374 -- src/gen/camino/schema_pb.ts | 988 +--- src/gen/quixos/orch_pb.ts | 241 +- src/gen/quixos/package_pb.ts | 316 +- src/gen/quixos/refs_pb.ts | 127 +- src/gen/quixos/runtime_pb.ts | 47 +- src/resource-lock/cli.ts | 20 + src/resource-lock/generated/QuixosLock.interp | 52 + src/resource-lock/generated/QuixosLock.tokens | 28 + .../generated/QuixosLockLexer.interp | 70 + .../generated/QuixosLockLexer.tokens | 28 + .../generated/QuixosLockLexer.ts | 155 + .../generated/QuixosLockParser.ts | 535 ++ .../generated/QuixosLockVisitor.ts | 65 + src/resource-lock/index.ts | 2 + src/resource-lock/parser.ts | 227 + src/resource-lock/types.ts | 38 + test/capability-language.test.ts | 148 + test/capability-model.test.ts | 234 + test/fixtures/capability-model.ts | 78 + test/fixtures/todo.capabilities.qx | 90 + test/resource-lock.test.ts | 93 + tsconfig.build.json | 3 +- tsconfig.json | 2 +- tsconfig.test.json | 12 + yarn-project.nix | 188 + yarn.lock | 520 ++ 58 files changed, 14864 insertions(+), 2788 deletions(-) create mode 100644 .yarn/install-state.gz create mode 100644 .yarn/plugins/yarn-plugin-nixify.cjs create mode 100644 .yarnrc.yml create mode 100644 grammar/QuixosCapability.g4 create mode 100644 grammar/QuixosLock.g4 delete mode 100644 package-lock.json delete mode 100644 proto/camino/options.proto create mode 100644 src/capability-language/cli.ts create mode 100644 src/capability-language/generated/QuixosCapability.interp create mode 100644 src/capability-language/generated/QuixosCapability.tokens create mode 100644 src/capability-language/generated/QuixosCapabilityLexer.interp create mode 100644 src/capability-language/generated/QuixosCapabilityLexer.tokens create mode 100644 src/capability-language/generated/QuixosCapabilityLexer.ts create mode 100644 src/capability-language/generated/QuixosCapabilityParser.ts create mode 100644 src/capability-language/generated/QuixosCapabilityVisitor.ts create mode 100644 src/capability-language/index.ts create mode 100644 src/capability-language/parser.ts create mode 100644 src/capability-model/index.ts create mode 100644 src/capability-model/types.ts create mode 100644 src/capability-model/validation.ts delete mode 100644 src/gen/camino/options_pb.ts create mode 100644 src/resource-lock/cli.ts create mode 100644 src/resource-lock/generated/QuixosLock.interp create mode 100644 src/resource-lock/generated/QuixosLock.tokens create mode 100644 src/resource-lock/generated/QuixosLockLexer.interp create mode 100644 src/resource-lock/generated/QuixosLockLexer.tokens create mode 100644 src/resource-lock/generated/QuixosLockLexer.ts create mode 100644 src/resource-lock/generated/QuixosLockParser.ts create mode 100644 src/resource-lock/generated/QuixosLockVisitor.ts create mode 100644 src/resource-lock/index.ts create mode 100644 src/resource-lock/parser.ts create mode 100644 src/resource-lock/types.ts create mode 100644 test/capability-language.test.ts create mode 100644 test/capability-model.test.ts create mode 100644 test/fixtures/capability-model.ts create mode 100644 test/fixtures/todo.capabilities.qx create mode 100644 test/resource-lock.test.ts create mode 100644 tsconfig.test.json create mode 100644 yarn-project.nix create mode 100644 yarn.lock diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz new file mode 100644 index 0000000000000000000000000000000000000000..b31198ac042e50b9c0e8123f7b7c6425b4db4475 GIT binary patch literal 21804 zcmZTvRa6~Kx5Qn8ySoQ>hv4oG!QI^nZV4LP?ci<)cPB`24(@Pphnw$zz4I_@de!QO zo~qe1v#Xjc4gunS2lNH-IjK}HYnxkZ3E*EQyxG(&3pI|FfLB;~>b})<)+f%ozF||n**^HY17PjFW~h%`@7{7(6CXHu>J$c6&+TNDsSfvF;!M0zDC-dp-f3)3$T^>pwPY;H(s*lfWyj-6rAA@$! z<8-X77ngO@(&8BU3`q?$> zt%eVr(pct1w3%ty_gnWo3;SyN1_sUvOD+9fZK{9VTH59pqPI%gt(Yb||4fcCz!={M znG*H9G^byfCG^P(m@LNz_<3EX{k^gx{&}@N(Ml8Olgqqib=GQ{j3KIMlJRKZ(BiOg zXdJldw<$Bbd~+A6mDX_IhwM6X;MZ6dKRi>SZFpUiz~RR|?v>A+k3Vo|SDBuBU)T9@ zKAmODv@ol#bU9davQcHv*XFqVaBzn2&It!RwT)yy{jRdXOfhVx(-ipfQ__f~ydsr}_iyk+so(R{M{yh5w(#pqd%NFTP0;7A zK~kQf@r>-%+r!c-9@*`(EZ$Y#`_yaio09Q!LY(*g`Ydo#(D`#ohn1CVRu-L1>BILS z;c@$#PShvOd-L^=ET-|}!t{QMERhbt=@8q0qCz~2rN-7^!;P^6TokjKiaW^zB|s2& zg-Eg7_$PfX)f6)^7g{_jnKO9R2!NG~>dMlj=!oeLBEt2<61VEGhPypOTYafr z-DI^#jJ`wU#%3@plzq#zi*U5RsSP<9e`!=zdACYAK#Ci9?I>eyc!t>~^(04hJq>KU z9kJX=N>;p?(d_y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(arTQB|T4e+Ky<8PkXP8jV)-#1jo|U(*uD%yH%O-nQ^klQ8#|+3h}ZZ_oYB*E2bH z8G?EKm)<(te`@3TzxLLv%|1N;*WbEh;Nkhd@z(QG4)3+IpT-`)`^PWt&p-B^*}r@B z{"use strict";var n={d:(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};n.r(r),n.d(r,{default:()=>E});const a=e("@yarnpkg/core"),o=e("clipanion");class i extends o.Command{constructor(...e){super(...e),this.locator=o.Option.String({required:!1})}async execute(){const e=await a.Configuration.find(this.context.cwd,this.context.plugins),{project:t}=await a.Project.find(e,this.context.cwd),n=await a.Cache.find(e),r=e.makeFetcher();return(await a.StreamReport.start({configuration:e,stdout:this.context.stdout},(async e=>{if(this.locator){const{locatorHash:o}=a.structUtils.parseLocator(this.locator,!0),i=t.originalPackages.get(o);if(!i)return void e.reportError(0,`Invalid locator: ${this.locator}`);await r.fetch(i,{checksums:t.storedChecksums,project:t,cache:n,fetcher:r,report:e})}else await e.startTimerPromise("Resolution step",(async()=>{await t.resolveEverything({report:e,lockfileOnly:!0})})),await e.startTimerPromise("Fetch step",(async()=>{await t.fetchEverything({cache:n,report:e,fetcher:r})}))}))).exitCode()}}i.paths=[["nixify","fetch"]];const s=e("@yarnpkg/fslib"),c=e("crypto");class l extends o.Command{constructor(...e){super(...e),this.locator=o.Option.String(),this.source=o.Option.String(),this.installLocation=o.Option.String()}async execute(){const e=await a.Configuration.find(this.context.cwd,this.context.plugins),{project:t}=await a.Project.find(e,this.context.cwd);return await t.restoreInstallState({restoreResolutions:!1}),(await a.StreamReport.start({configuration:e,stdout:this.context.stdout},(async n=>{await t.resolveEverything({report:n,lockfileOnly:!0});const r=a.structUtils.parseLocator(this.locator,!0),o=t.storedPackages.get(r.locatorHash);if(!o)return void n.reportError(0,`Invalid locator: ${this.locator}`);const i=s.ppath.join(t.cwd,this.installLocation);await s.xfs.mkdirpPromise(s.ppath.dirname(i)),await a.execUtils.execvp("cp",["-R",this.source,i],{cwd:t.cwd,strict:!0}),await a.execUtils.execvp("chmod",["-R","u+w",i],{cwd:t.cwd,strict:!0});const l=(0,c.createHash)("sha512");l.update(process.versions.node),e.triggerHook((e=>e.globalHashGeneration),t,(e=>{l.update("\0"),l.update(e)}));const d=l.digest("hex"),p=new Map,h=e=>{let n=p.get(e.locatorHash);if(void 0!==n)return n;const r=t.storedPackages.get(e.locatorHash);if(void 0===r)throw new Error("Assertion failed: The package should have been registered");const o=(0,c.createHash)("sha512");o.update(e.locatorHash),p.set(e.locatorHash,"");for(const e of r.dependencies.values()){const n=t.storedResolutions.get(e.descriptorHash);if(void 0===n)throw new Error(`Assertion failed: The resolution (${a.structUtils.prettyDescriptor(t.configuration,e)}) should have been registered`);const r=t.storedPackages.get(n);if(void 0===r)throw new Error("Assertion failed: The package should have been registered");o.update(h(r))}return n=o.digest("hex"),p.set(e.locatorHash,n),n},u=(0,c.createHash)("sha512").update(d).update(h(o)).update(i).digest("hex");t.storedBuildState.set(o.locatorHash,u),await t.persistInstallStateFile()}))).exitCode()}}l.paths=[["nixify","inject-build"]];const d=e("@yarnpkg/plugin-pnp"),p=JSON.stringify,h=(e,t,n=!1)=>t.split("\n").map((t=>t||n?e+t:t)).join("\n"),u=(e,t)=>{let n=e;for(const[e,r]of Object.entries(t))if("string"==typeof r&&(n=n.replace(new RegExp(`@@${e}@@`,"g"),r)),"boolean"==typeof r)for(;;){const t=n.split("\n"),a=t.indexOf(`#@@ IF ${e}`),o=t.indexOf(`#@@ ENDIF ${e}`);if(-1===a||o{if(!n)return;const o=s.npath.toPortablePath(this.binDir);for(const[r,a]of n.manifest.bin){const n=s.ppath.join(o,r),i=s.ppath.join(t.cwd,s.npath.toPortablePath(a));await this.writeWrapper(n,i,{configuration:e,project:t})}if(e.get("installNixBinariesForDependencies")){await t.resolveEverything({report:r,lockfileOnly:!0});const n=await a.scriptUtils.getPackageAccessibleBinaries(t.topLevelWorkspace.anchoredLocator,{project:t});for(const[r,[a,i]]of n.entries()){const n=s.ppath.join(o,r);await this.writeWrapper(n,s.npath.toPortablePath(i),{configuration:e,project:t})}}}))).exitCode()}async writeWrapper(e,t,{configuration:n,project:r}){let a;switch(n.get("nodeLinker")){case"pnp":{const e=(0,d.getPnpPath)(r),n=[];await s.xfs.existsPromise(e.cjs)&&n.push(`--require "${s.npath.fromPortablePath(e.cjs)}"`),await s.xfs.existsPromise(e.esmLoader)&&n.push(`--experimental-loader "${(0,f.pathToFileURL)(s.npath.fromPortablePath(e.esmLoader)).href}"`),a=u("#!/bin/sh\nexport NODE_OPTIONS='@@NODE_OPTIONS@@'\nexec '@@NODE_PATH@@' '@@BINARY_PATH@@' \"$@\"\n",{NODE_PATH:process.execPath,NODE_OPTIONS:n.join(" "),BINARY_PATH:t});break}case"node-modules":a=u("#!/bin/sh\nexec '@@NODE_PATH@@' '@@BINARY_PATH@@' \"$@\"\n",{NODE_PATH:process.execPath,BINARY_PATH:t});break;default:throw Error("Assertion failed: Invalid nodeLinker")}await s.xfs.writeFilePromise(e,a),await s.xfs.chmodPromise(e,493)}}g.paths=[["nixify","install-bin"]];const m=e("os"),y=e("@yarnpkg/plugin-patch"),b=(e,t)=>(0,c.createHash)(e).update(t).digest(),x=(e,t,{storePath:n="/nix/store",recursive:r=!1}={})=>{const[a,o]=t.split("-"),i=Buffer.from(o,"base64").toString("hex"),c=b("sha256",`fixed:out:${r?"r:":""}${a}:${i}:`).toString("hex"),l=(e=>{let t="",n=[...e].reverse().map((e=>e.toString(2).padStart(8,"0"))).join("");for(;n;)t+="0123456789abcdfghijklmnpqrsvwxyz"[parseInt(n.slice(0,5),2)],n=n.slice(5);return t})(((e,t)=>{const n=Buffer.alloc(20);for(let t=0;te.replace(/^\.+/,"").replace(/[^a-zA-Z0-9+._?=-]+/g,"-").slice(0,207)||"unknown",w=(e,t="sha512")=>t+"-"+Buffer.from(e,"hex").toString("base64"),k=e=>Buffer.from(e.split("-")[1],"base64").toString("hex"),I=2**32-1,P=(e,...t)=>{let n=0;const r=t.map((e=>{const t=Buffer.from(e);if(t.byteLength>I)throw Error(`NAR string too long: ${t.byteLength}`);return n+=8+8*Math.ceil(t.byteLength/8),t})),a=Buffer.alloc(n);let o=0;for(const e of r)a.writeUInt32LE(e.byteLength,o),e.copy(a,o+8),o+=8+8*Math.ceil(e.byteLength/8);e.write(a)},$=async(e,t,n)=>{if(t>I)throw Error(`NAR string too long: ${t}`);const r=Buffer.alloc(8);r.writeUInt32LE(t),e.write(r);for await(const t of n)e.write(t);const a=8-t%8;8!==a&&e.write(Buffer.alloc(a))},N=a.YarnVersion?.startsWith("3.")||!1,E={commands:[i,l,g],hooks:{afterAllInstalled:async(e,t)=>{!1!==t.persistProject&&e.configuration.get("enableNixify")&&await(async(e,t)=>{const{configuration:n,cwd:r}=e,{cache:o,report:i}=t,l=await s.xfs.realpathPromise(s.npath.toPortablePath((0,m.tmpdir)()));if(e.cwd.startsWith(l))return void i.reportInfo(0,`Skipping Nixify, because ${e.cwd} appears to be a temporary directory`);const d=n.get("nixExprPath"),f=n.get("yarnPath");let g;if(null===f){let e=(await s.xfs.readFilePromise(process.argv[1])).toString();if(e.startsWith("#!/nix/store/")){const t=e.substring(e.indexOf("\n")+1);e=`#!/usr/bin/env node\n${t}`}const t=a.hashUtils.makeHash(Buffer.from(e));g=["fetchurl {",` url = "https://repo.yarnpkg.com/${a.YarnVersion}/packages/yarnpkg-cli/bin/yarn.js";`,` hash = "${w(t)}";`,"}"].join("\n ")}else f.startsWith(r)?g="./"+s.ppath.relative(s.ppath.dirname(d),f):(g=p(f),i.reportWarning(0,`The Yarn path ${f} is outside the project - it may not be reachable by the Nix build`));const b=n.get("cacheFolder");let I;if(b.startsWith(r))I=p(s.ppath.relative(r,b));else{if(N||!n.get("enableGlobalCache"))throw Error(`The cache folder ${b} is outside the project, this is currently not supported`);I='".yarn/cache"'}const E=new Set;for(const e of n.sources.values())for(const t of e.split(", "))t.startsWith("<")||E.add(t);for(const e of E)s.ppath.resolve(r,e).startsWith(r)||i.reportWarning(0,`The config file ${e} is outside the project - it may not be reachable by the Nix build`);const D="./"+s.ppath.relative(s.ppath.dirname(d),s.ppath.resolve(r,"yarn.lock")),S=new Map,_=new Set(await s.xfs.readdirPromise(o.cwd)),L={unstablePackages:e.conditionalLocators};for(const t of e.storedPackages.values()){const{locatorHash:n}=t,r=e.storedChecksums.get(n),a=N?o.getLocatorPath(t,r||null,L):o.getLocatorPath(t,r||null);if(!a)continue;if(!_.has(s.ppath.basename(a)))continue;const i=r?o.getChecksumFilename(t,r):o.getVersionFilename(t);S.set(i,{pkg:t,checksum:r,cachePath:a})}const O=new Map,A=n.get("individualNixPackaging");let j="",T="";if(A){for(const[e,{pkg:t,checksum:n,cachePath:r}]of S.entries()){const o=a.structUtils.stringifyLocator(t),i=n?n.split("/").pop():await a.hashUtils.checksumFile(r);O.set(o,{cachePath:r,filename:e,hash:w(i)})}j="cacheEntries = {\n";for(const e of[...O.keys()].sort()){const t=O.get(e);j+=`${p(e)} = { ${[`filename = ${p(t.filename)};`,`hash = "${t.hash}";`].join(" ")} };\n`}j+="};"}else{const e=(0,c.createHash)("sha512");P(e,"nix-archive-1","(","type","directory");for(const t of[...S.keys()].sort()){const{cachePath:n}=S.get(t),{size:r}=await s.xfs.statPromise(n);P(e,"entry","(","name",t,"node","(","type","regular","contents"),await $(e,r,s.xfs.createReadStream(n)),P(e,")",")")}P(e,")"),e.end();for await(const t of e)T=w(t)}const C=n.get("isolatedNixBuilds");let R=new Set,F=[],B=[];const H=n.get("nodeLinker"),U=n.get("pnpUnpluggedFolder"),M=(t,n=new Set)=>{const r=a.structUtils.stringifyLocator(t);if(O.has(r)&&n.add(r),a.structUtils.isVirtualLocator(t)){const r=e.storedPackages.get(a.structUtils.devirtualizeLocator(t).locatorHash);if(!r)throw Error("Assertion failed: The locator should have been registered");M(r,n)}if(t.reference.startsWith("patch:")){const r=e.storedPackages.get(y.patchUtils.parseLocator(t).sourceLocator.locatorHash);if(!r)throw Error("Assertion failed: The locator should have been registered");M(r,n)}for(const r of t.dependencies.values()){const t=e.storedResolutions.get(r.descriptorHash);if(!t)throw Error("Assertion failed: The descriptor should have been registered");const a=e.storedPackages.get(t);if(!a)throw Error("Assertion failed: The locator should have been registered");M(a,n)}return n};for(const t of e.storedBuildState.keys()){const n=e.storedPackages.get(t);if(!n)throw Error("Assertion failed: The locator should have been registered");if(!C.includes(n.name))continue;let r;if("pnp"!==H)throw Error(`The nodeLinker ${H} is not supported for isolated Nix builds`);r=s.ppath.relative(e.cwd,s.ppath.join(U,a.structUtils.slugifyLocator(n),a.structUtils.getIdentVendorPath(n)));let o=n;if(a.structUtils.isVirtualLocator(o)){const{locatorHash:t}=a.structUtils.devirtualizeLocator(o),n=e.storedPackages.get(t);if(!n)throw Error("Assertion failed: The locator should have been registered");o=n}const i=a.structUtils.stringifyLocator(o),c=a.structUtils.stringifyLocator(n),l=`isolated.${p(i)}`;if(!R.has(o)){R.add(o);const e=[`pname = ${p(n.name)};`,`version = ${p(n.version)};`,`reference = ${p(o.reference)};`];if(A){const t=[...M(n)].sort().map((e=>`${p(e)}\n`)).join("");t&&e.push(`locators = [\n${t}];`)}const t=`override${V=n.name,V.split(/[^a-zA-Z0-9]+/g).filter((e=>e)).map((e=>{return(t=e).slice(0,1).toUpperCase()+t.slice(1);var t})).join("")}Attrs`;B.push(`${l} = optionalOverride (args.${t} or null) (mkIsolatedBuild { ${e.join(" ")} });`)}0===F.length&&F.push("# Copy in isolated builds."),F.push(`echo 'injecting build for ${n.name}'`,"yarn nixify inject-build \\",` ${p(c)} \\`,` \${${l}} \\`,` ${p(r)}`)}var V;if(F.length>0&&F.push("echo 'running yarn install'"),null==t.mode||0===C.length){const t=e.topLevelWorkspace.manifest.name,o=t?a.structUtils.stringifyIdent(t):"workspace",c=u("# This file is generated by running \"yarn install\" inside your project.\n# Manual changes might be lost - proceed with caution!\n\n{ lib, stdenv, nodejs, git, cacert, fetchurl, writeShellScript, writeShellScriptBin }:\n{ src, overrideAttrs ? null, ... } @ args:\n\nlet\n\n yarnBin = @@YARN_BIN@@;\n\n cacheFolder = @@CACHE_FOLDER@@;\n lockfile = @@LOCKFILE@@;\n\n # Call overrideAttrs on a derivation if a function is provided.\n optionalOverride = fn: drv:\n if fn == null then drv else drv.overrideAttrs fn;\n\n # Simple stub that provides the global yarn command.\n yarn = writeShellScriptBin \"yarn\" ''\n exec '${nodejs}/bin/node' '${yarnBin}' \"$@\"\n '';\n\n # Common attributes between Yarn derivations.\n drvCommon = {\n # Make sure the build uses the right Node.js version everywhere.\n buildInputs = [ nodejs yarn ];\n # All dependencies should already be cached.\n yarn_enable_network = \"0\";\n # Tell node-gyp to use the provided Node.js headers for native code builds.\n npm_config_nodedir = nodejs;\n };\n\n # Comman variables that we set in a Nix build, but not in a Nix shell.\n buildVars = ''\n # Make Yarn produce friendlier logging for automated builds.\n export CI=1\n # Tell node-pre-gyp to never fetch binaries / always build from source.\n export npm_config_build_from_source=true\n '';\n\n#@@ IF COMBINED_DRV\n cacheDrv = stdenv.mkDerivation {\n name = \"yarn-cache\";\n buildInputs = [ yarn git cacert ];\n buildCommand = ''\n cp --reflink=auto --recursive '${src}' ./src\n cd ./src/\n ${buildVars}\n HOME=\"$TMP\" yarn_enable_global_cache=false yarn_cache_folder=\"$out\" \\\n yarn nixify fetch\n rm $out/.gitignore\n '';\n outputHashMode = \"recursive\";\n outputHash = \"@@COMBINED_HASH@@\";\n };\n#@@ ENDIF COMBINED_DRV\n#@@ IF INDIVIDUAL_DRVS\n # Create derivations for fetching dependencies.\n cacheDrvs = let\n in lib.mapAttrs (locator: { filename, hash }: stdenv.mkDerivation {\n name = lib.strings.sanitizeDerivationName locator;\n buildInputs = [ yarn git cacert ];\n buildCommand = ''\n cd '${src}'\n ${buildVars}\n HOME=\"$TMP\" yarn_enable_global_cache=false yarn_cache_folder=\"$TMP\" \\\n yarn nixify fetch ${lib.escapeShellArg locator}\n # Because we change the cache dir, Yarn may generate a different name.\n mv \"$TMP/$(sed 's/-[^-]*\\.[^-]*$//' <<< \"$outputFilename\")\"-* $out\n '';\n outputFilename = filename;\n outputHash = hash;\n }) cacheEntries;\n\n # Create a shell snippet to copy dependencies from a list of derivations.\n mkCacheBuilderForDrvs = drvs:\n writeShellScript \"collect-yarn-cache\" (lib.concatMapStrings (drv: ''\n cp --reflink=auto ${drv} '${drv.outputFilename}'\n '') drvs);\n#@@ ENDIF INDIVIDUAL_DRVS\n\n#@@ IF NEED_ISOLATED_BUILD_SUPPRORT\n#@@ IF INDIVIDUAL_DRVS\n # Create a shell snippet to copy dependencies from a list of locators.\n mkCacheBuilderForLocators = let\n pickCacheDrvs = map (locator: cacheDrvs.${locator});\n in locators:\n mkCacheBuilderForDrvs (pickCacheDrvs locators);\n#@@ ENDIF INDIVIDUAL_DRVS\n\n # Create a derivation that builds a module in isolation.\n mkIsolatedBuild = { pname, version, reference, locators ? [] }: stdenv.mkDerivation (drvCommon // {\n inherit pname version;\n dontUnpack = true;\n\n configurePhase = ''\n ${buildVars}\n unset yarn_enable_nixify # plugin is not present\n '';\n\n buildPhase = ''\n mkdir -p .yarn/cache\n#@@ IF COMBINED_DRV\n cp --reflink=auto --recursive ${cacheDrv}/* .yarn/cache/\n#@@ ENDIF COMBINED_DRV\n#@@ IF INDIVIDUAL_DRVS\n pushd .yarn/cache > /dev/null\n source ${mkCacheBuilderForLocators locators}\n popd > /dev/null\n#@@ ENDIF INDIVIDUAL_DRVS\n\n echo '{ \"dependencies\": { \"${pname}\": \"${reference}\" } }' > package.json\n install -m 0600 ${lockfile} ./yarn.lock\n export yarn_global_folder=\"$TMP\"\n export yarn_enable_global_cache=false\n export yarn_enable_immutable_installs=false\n yarn\n '';\n\n installPhase = ''\n unplugged=( .yarn/unplugged/${pname}-*/node_modules/* )\n if [[ ! -e \"''${unplugged[@]}\" ]]; then\n echo >&2 \"Could not find the unplugged path for ${pname}\"\n exit 1\n fi\n\n mv \"$unplugged\" $out\n '';\n });\n#@@ ENDIF NEED_ISOLATED_BUILD_SUPPRORT\n\n # Main project derivation.\n project = stdenv.mkDerivation (drvCommon // {\n inherit src;\n name = @@PROJECT_NAME@@;\n\n configurePhase = ''\n ${buildVars}\n\n # Copy over the Yarn cache.\n rm -fr '${cacheFolder}'\n mkdir -p '${cacheFolder}'\n#@@ IF COMBINED_DRV\n cp --reflink=auto --recursive ${cacheDrv}/* '${cacheFolder}/'\n#@@ ENDIF COMBINED_DRV\n#@@ IF INDIVIDUAL_DRVS\n pushd '${cacheFolder}' > /dev/null\n source ${mkCacheBuilderForDrvs (lib.attrValues cacheDrvs)}\n popd > /dev/null\n#@@ ENDIF INDIVIDUAL_DRVS\n\n # Yarn may need a writable home directory.\n export yarn_global_folder=\"$TMP\"\n\n # Ensure global cache is disabled. Cache must be part of our output.\n touch .yarnrc.yml\n sed -i -e '/^enableGlobalCache/d' .yarnrc.yml\n echo 'enableGlobalCache: false' >> .yarnrc.yml\n\n # Some node-gyp calls may call out to npm, which could fail due to an\n # read-only home dir.\n export HOME=\"$TMP\"\n\n # running preConfigure after the cache is populated allows for\n # preConfigure to contain substituteInPlace for dependencies as well as the\n # main project. This is necessary for native bindings that maybe have\n # hardcoded values.\n runHook preConfigure\n\n@@ISOLATED_INTEGRATION@@\n\n # Run normal Yarn install to complete dependency installation.\n yarn install --immutable --immutable-cache\n\n runHook postConfigure\n '';\n\n buildPhase = ''\n runHook preBuild\n runHook postBuild\n '';\n\n installPhase = ''\n runHook preInstall\n\n # Move the package contents to the output directory.\n if grep -q '\"workspaces\"' package.json; then\n # We can't use `yarn pack` in a workspace setup, because it only\n # packages the outer workspace.\n mkdir -p \"$out/libexec\"\n mv $PWD \"$out/libexec/$name\"\n else\n # - If the package.json has a `files` field, only files matching those patterns are copied\n # - Otherwise all files are copied.\n yarn pack --out package.tgz\n mkdir -p \"$out/libexec/$name\"\n tar xzf package.tgz --directory \"$out/libexec/$name\" --strip-components=1\n\n cp --reflink=auto .yarnrc* \"$out/libexec/$name\"\n cp --reflink=auto ${lockfile} \"$out/libexec/$name/yarn.lock\"\n cp --reflink=auto --recursive .yarn \"$out/libexec/$name\"\n\n # Copy the Yarn linker output into the package.\n#@@ IF USES_PNP_LINKER\n cp --reflink=auto .pnp.* \"$out/libexec/$name\"\n#@@ ENDIF USES_PNP_LINKER\n#@@ IF USES_NM_LINKER\n cp --reflink=auto --recursive node_modules \"$out/libexec/$name\"\n#@@ ENDIF USES_NM_LINKER\n fi\n\n cd \"$out/libexec/$name\"\n\n # Invoke a plugin internal command to setup binaries.\n mkdir -p \"$out/bin\"\n yarn nixify install-bin $out/bin\n\n#@@ IF USES_NM_LINKER\n # A package with node_modules doesn't need the cache\n yarn cache clean\n#@@ ENDIF USES_NM_LINKER\n\n runHook postInstall\n '';\n\n passthru = {\n inherit nodejs;\n yarn-freestanding = yarn;\n yarn = writeShellScriptBin \"yarn\" ''\n exec '${yarn}/bin/yarn' --cwd '${overriddenProject}/libexec/${overriddenProject.name}' \"$@\"\n '';\n };\n });\n\n overriddenProject = optionalOverride overrideAttrs project;\n\n@@CACHE_ENTRIES@@\n@@ISOLATED@@\nin overriddenProject\n",{PROJECT_NAME:p(o),YARN_BIN:g,LOCKFILE:D,INDIVIDUAL_DRVS:A,COMBINED_DRV:!A,COMBINED_HASH:T,CACHE_FOLDER:I,CACHE_ENTRIES:j,ISOLATED:B.join("\n"),ISOLATED_INTEGRATION:h(" ",F.join("\n")),NEED_ISOLATED_BUILD_SUPPRORT:F.length>0,USES_PNP_LINKER:"pnp"===n.get("nodeLinker"),USES_NM_LINKER:"node-modules"===n.get("nodeLinker")}).replace(/\n\n\n+/g,"\n\n");if(await s.xfs.mkdirpPromise(s.ppath.dirname(d)),await s.xfs.writeFilePromise(d,c),n.get("generateDefaultNix")){const e=s.ppath.join(r,"default.nix"),t=s.ppath.join(r,"flake.nix");s.xfs.existsSync(e)||s.xfs.existsSync(t)||(await s.xfs.writeFilePromise(e,"# This is a minimal `default.nix` by yarn-plugin-nixify. You can customize it\n# as needed, it will not be overwritten by the plugin.\n\n{ pkgs ? import { } }:\n\npkgs.callPackage ./yarn-project.nix { } { src = ./.; }\n"),i.reportInfo(0,"A minimal default.nix was created. You may want to customize it."))}}n.get("enableNixPreload")&&s.xfs.existsSync(s.npath.toPortablePath("/nix/store"))&&await s.xfs.mktempPromise((async t=>{const n=["--add-fixed","sha512"],r=[];if(A)for(const[e,{cachePath:n,hash:a}]of O.entries()){const o=v(e),i=x(o,a);if(!s.xfs.existsSync(i)){const e=s.ppath.join(t,k(a).slice(0,7));await s.xfs.mkdirPromise(e);const i=s.ppath.join(e,o);await s.xfs.copyFilePromise(n,i),r.push(i)}}else{n.unshift("--recursive");const e=x("yarn-cache",T,{recursive:!0});if(!s.xfs.existsSync(e)){const e=s.ppath.join(t,"yarn-cache");await s.xfs.mkdirPromise(e);for(const[t,{cachePath:n}]of S.entries()){const r=s.ppath.join(e,t);await s.xfs.copyFilePromise(n,r)}r.push(e)}}try{const t=r.length;for(;0!==r.length;){const t=r.splice(0,100);await a.execUtils.execvp("nix-store",[...n,...t],{cwd:e.cwd,strict:!0})}0!==t&&i.reportInfo(0,A?`Preloaded ${t} packages into the Nix store`:"Preloaded cache into the Nix store")}catch(e){if("ENOENT"!==e.code)throw e}}))})(e,t)}},configuration:{enableNixify:{description:"If false, disables the Nixify plugin hook that generates Nix expressions",type:a.SettingsType.BOOLEAN,default:!0},nixExprPath:{description:"Path of the file where the project Nix expression will be written to",type:a.SettingsType.ABSOLUTE_PATH,default:"./yarn-project.nix"},generateDefaultNix:{description:"If true, a default.nix will be generated if it does not exist",type:a.SettingsType.BOOLEAN,default:!0},enableNixPreload:{description:"If true, cached packages will be preloaded into the Nix store",type:a.SettingsType.BOOLEAN,default:!0},individualNixPackaging:{description:"If true, generate one Nix derivation per package. If false, use a single derivation for the entire cache folder.",type:a.SettingsType.BOOLEAN,default:!1},isolatedNixBuilds:{description:"Dependencies with a build step that can be built in an isolated derivation",type:a.SettingsType.STRING,default:[],isArray:!0},installNixBinariesForDependencies:{description:"If true, the Nix output 'bin' directory will also contain executables for binaries defined by dependencies",type:a.SettingsType.BOOLEAN,default:!1}}};t=r})(),t}}; \ No newline at end of file diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 0000000..de9b346 --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1,24 @@ +enableScripts: true + +generateDefaultNix: false + +individualNixPackaging: true + +nodeLinker: node-modules + +supportedArchitectures: + os: + - current + - linux + cpu: + - current + - x64 + - arm64 + libc: + - current + - glibc + +plugins: + - checksum: 271de9a785321a37c564b8e2a6b5cd689850b20572d5fee8ec0a6b8e7a5d4cfb59e533524af2b4a537e00da12828abd062eaec6978556e3dd9149a020db2591b + path: .yarn/plugins/yarn-plugin-nixify.cjs + spec: "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/yarn-plugin-nixify-patched/raw/commit/4528fdd20b30d869262443b3f044549810e75fb8/dist/yarn-plugin-nixify.js" diff --git a/README.md b/README.md index 85e0c6a..a4e31ad 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,64 @@ -# Quixos Protocol +# Quixos protocol and capability compiler -Shared protobuf definitions for Camino, quixos-orch, package descriptors, and -future package runtime RPC. +This package owns the shared protobuf APIs for Camino, `quixos-orch`, package +runtimes, package descriptors, and generic runtime values. It also owns the v1 +capability authoring language and semantic compiler. -This package owns the canonical proto source. Current services still generate -local TypeScript bindings from these protos; the generated bindings here are -available for later consolidation. +## Capability language + +The grammar is `grammar/QuixosCapability.g4`. The parser lowers source into the +parser-independent records in `src/capability-model`; validation then produces +an immutable checked workspace JSON document. Runtime semantics do not depend +on parse-tree shapes or declaration order. + +```sh +nix develop +quixos-capability-compile ../quixos-instance/workspaces/todo.capabilities.qx +``` + +The compiler validates exact identities, interface operation coverage, +attachment ownership, native state/edge providers, package receiver and +dependency-port requirements, constructors, and the exact runtime closure. +Generics, interface composition, declarative forwarding, automatic +relationship materialization, and first-class bundles are intentionally absent +from v1. + +## Repository locks + +Every workspace, interface, and package repository carries a `quixos.lock`. +It pins the exact Quixos toolchain revision plus exact Git sources for imported +interfaces and packages. The v1 Git source is deliberately only a repository +URL and full commit ID; the publisher-owned reachability tag and Nix fetch +details are derived from those values. + +```sh +quixos-lock-check quixos.lock +qx resource publish +``` + +The second command runs from a jj checkout. It validates the lock, snapshots +the current working-copy commit, and pushes the immutable tag +`refs/tags/quixos-reachability/` without advancing an authoring +bookmark. + +## Package descriptors + +Executable package metadata remains protobuf text format: + +```sh +quixos-descriptor-check path/to/descriptor.quixos-package.txtpb +``` + +Descriptors identify exact package revisions and exported runtime symbols. +The checked workspace binds interface operations to those exports and supplies +their exact dependency ports. + +## Tests + +```sh +nix shell nixpkgs#protobuf -c npm test +``` + +The suite covers parsing/diagnostics, source-order independence, ordinary call +operations, semantic validation, exact closure/tree-shaking, private and shared +attachments, package port injection, and constructors. diff --git a/flake.nix b/flake.nix index 95cf96e..906e752 100644 --- a/flake.nix +++ b/flake.nix @@ -10,26 +10,40 @@ flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; - quixos-protocol = pkgs.stdenvNoCC.mkDerivation { - pname = "quixos-protocol"; - version = "0.1.0"; - src = ./.; - npmDeps = pkgs.importNpmLock { npmRoot = ./.; }; - npmConfigHook = pkgs.importNpmLock.npmConfigHook; - nativeBuildInputs = [ - pkgs.importNpmLock.npmConfigHook - pkgs.nodejs_24 + nodejs = pkgs.nodejs_24; + quixos-protocol = (pkgs.callPackage ./yarn-project.nix { inherit nodejs; }) { + src = pkgs.lib.cleanSource ./.; + overrideAttrs = old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ + pkgs.esbuild pkgs.protobuf ]; buildPhase = '' runHook preBuild export QUIXOS_PROTO_PATH="${pkgs.protobuf}/include:$PWD/proto''${QUIXOS_PROTO_PATH:+:$QUIXOS_PROTO_PATH}" - npm run build + patchShebangs node_modules/.bin node_modules/@bufbuild/protoc-gen-es/bin + yarn build + esbuild dist/src/descriptor-check.js \ + --bundle --platform=node --target=node24 --format=esm \ + --outfile=quixos-descriptor-check.mjs + esbuild dist/src/capability-language/cli.js \ + --bundle --platform=node --target=node24 --format=esm \ + --outfile=quixos-capability-compile.mjs + esbuild dist/src/resource-lock/cli.js \ + --bundle --platform=node --target=node24 --format=esm \ + --outfile=quixos-lock-check.mjs runHook postBuild ''; + doCheck = true; + checkPhase = '' + runHook preCheck + yarn test + runHook postCheck + ''; installPhase = '' runHook preInstall mkdir -p "$out" + cp --reflink=auto --recursive grammar "$out/grammar" cp --reflink=auto --recursive proto "$out/proto" cp --reflink=auto --recursive dist "$out/dist" cp package.json "$out/package.json" @@ -38,19 +52,35 @@ #!/bin/sh export PATH="${pkgs.protobuf}/bin:\$PATH" export QUIXOS_PROTO_PATH="${pkgs.protobuf}/include:$out/proto\''${QUIXOS_PROTO_PATH:+:$QUIXOS_PROTO_PATH}" -exec ${pkgs.nodejs_24}/bin/node "$out/dist/src/descriptor-check.js" "\$@" +exec ${pkgs.nodejs_24}/bin/node "$out/libexec/quixos-protocol/quixos-descriptor-check.mjs" "\$@" EOF chmod +x "$out/bin/quixos-descriptor-check" + cat > "$out/bin/quixos-capability-compile" < "$out/bin/quixos-lock-check" <'; +COLON: ':'; +SEMI: ';'; +COMMA: ','; +DOT: '.'; +LBRACE: '{'; +RBRACE: '}'; +LBRACK: '['; +RBRACK: ']'; +LPAREN: '('; +RPAREN: ')'; +LT: '<'; +GT: '>'; + +INTEGER: '-'? [0-9]+; +JSON_NUMBER: '-'? ('0' | [1-9] [0-9]*) ('.' [0-9]+)? ([eE] [+-]? [0-9]+)?; +IDENTIFIER: [A-Za-z_] [A-Za-z0-9_]*; +STRING_LITERAL: '"' (ESC | ~["\\\r\n])* '"'; +fragment ESC: '\\' (["\\/bfnrt] | 'u' HEX HEX HEX HEX); +fragment HEX: [0-9a-fA-F]; + +LINE_COMMENT: '//' ~[\r\n]* -> skip; +BLOCK_COMMENT: '/*' .*? '*/' -> skip; +WS: [ \t\r\n]+ -> skip; diff --git a/grammar/QuixosLock.g4 b/grammar/QuixosLock.g4 new file mode 100644 index 0000000..6d0c536 --- /dev/null +++ b/grammar/QuixosLock.g4 @@ -0,0 +1,55 @@ +grammar QuixosLock; + +document + : QUIXOS_LOCK VERSION INTEGER LBRACE quixosEntry resourceEntry* RBRACE EOF + ; + +quixosEntry + : QUIXOS SOURCE sourceBlock + ; + +resourceEntry + : resourceKind identifier SOURCE sourceBlock + ; + +resourceKind + : INTERFACE + | PACKAGE + ; + +sourceBlock + : LBRACE + REPOSITORY stringLiteral SEMI + COMMIT stringLiteral SEMI + RBRACE + ; + +identifier + : IDENTIFIER + ; + +stringLiteral + : STRING_LITERAL + ; + +QUIXOS_LOCK: 'quixos-lock'; +VERSION: 'version'; +QUIXOS: 'quixos'; +SOURCE: 'source'; +INTERFACE: 'interface'; +PACKAGE: 'package'; +REPOSITORY: 'repository'; +COMMIT: 'commit'; + +LBRACE: '{'; +RBRACE: '}'; +SEMI: ';'; +INTEGER: [0-9]+; +IDENTIFIER: [A-Za-z_] [A-Za-z0-9_]*; +STRING_LITERAL: '"' (ESC | ~["\\\r\n])* '"'; +fragment ESC: '\\' (["\\/bfnrt] | 'u' HEX HEX HEX HEX); +fragment HEX: [0-9a-fA-F]; + +LINE_COMMENT: '//' ~[\r\n]* -> skip; +BLOCK_COMMENT: '/*' .*? '*/' -> skip; +WS: [ \t\r\n]+ -> skip; diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 1ab2df3..0000000 --- a/package-lock.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "name": "@quixos/quixos-protocol", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@quixos/quixos-protocol", - "version": "0.1.0", - "dependencies": { - "@bufbuild/protobuf": "^2.12.1", - "@bufbuild/protoc-gen-es": "^2.12.1" - }, - "bin": { - "quixos-descriptor-check": "dist/src/descriptor-check.js" - }, - "devDependencies": { - "@types/node": "^24", - "typescript": "^5.9.3" - } - }, - "node_modules/@bufbuild/protobuf": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.12.1.tgz", - "integrity": "sha512-BvAMfS6LrgZiryOAZ4pBYucu4wG/Ei/9o9DZ9akbREnMLbPJiom2i8b9C8IsKErQoiKqVhrerzt3kOT/RrzLHg==", - "license": "(Apache-2.0 AND BSD-3-Clause)" - }, - "node_modules/@bufbuild/protoc-gen-es": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/@bufbuild/protoc-gen-es/-/protoc-gen-es-2.12.1.tgz", - "integrity": "sha512-SWa7XvRYRouMo+vBQmpNFZ+ZEqQ8AC0LpL4QWAo1gvstLhFh/Y7Nf/a+MK7ZxDq5LZSThwfk974L1sFxO3OaGw==", - "license": "Apache-2.0", - "dependencies": { - "@bufbuild/protobuf": "2.12.1", - "@bufbuild/protoplugin": "2.12.1" - }, - "bin": { - "protoc-gen-es": "bin/protoc-gen-es" - }, - "engines": { - "node": ">=20" - }, - "peerDependencies": { - "@bufbuild/protobuf": "2.12.1" - }, - "peerDependenciesMeta": { - "@bufbuild/protobuf": { - "optional": true - } - } - }, - "node_modules/@bufbuild/protoplugin": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-2.12.1.tgz", - "integrity": "sha512-PY58KxQVAD1BnnKtStOctsMoegEVGfBnY5AOqVQOIu711nA13oYtTqJM8df5lUQg2J1DR3XxUXptE+fWX5oLdA==", - "license": "Apache-2.0", - "dependencies": { - "@bufbuild/protobuf": "2.12.1", - "@typescript/vfs": "^1.6.2", - "typescript": "5.4.5" - } - }, - "node_modules/@bufbuild/protoplugin/node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/@types/node": { - "version": "24.13.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.3.tgz", - "integrity": "sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~7.18.0" - } - }, - "node_modules/@typescript/vfs": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.4.tgz", - "integrity": "sha512-PJFXFS4ZJKiJ9Qiuix6Dz/OwEIqHD7Dme1UwZhTK11vR+5dqW2ACbdndWQexBzCx+CPuMe5WBYQWCsFyGlQLlQ==", - "license": "MIT", - "dependencies": { - "debug": "^4.4.3" - }, - "peerDependencies": { - "typescript": "*" - } - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", - "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", - "dev": true, - "license": "MIT" - } - } -} diff --git a/package.json b/package.json index 6f88ba8..ca06213 100644 --- a/package.json +++ b/package.json @@ -2,24 +2,35 @@ "name": "@quixos/quixos-protocol", "version": "0.1.0", "private": true, + "packageManager": "yarn@4.18.0", "type": "module", "bin": { - "quixos-descriptor-check": "dist/src/descriptor-check.js" + "quixos-capability-compile": "dist/src/capability-language/cli.js", + "quixos-descriptor-check": "dist/src/descriptor-check.js", + "quixos-lock-check": "dist/src/resource-lock/cli.js" }, "exports": { + "./capability-model": "./dist/src/capability-model/index.js", + "./capability-language": "./dist/src/capability-language/index.js", + "./resource-lock": "./dist/src/resource-lock/index.js", "./gen/*": "./dist/src/gen/*" }, "scripts": { - "build": "npm run generate && tsc -p tsconfig.build.json", - "generate": "rm -rf src/gen && mkdir -p src/gen && protoc --plugin=protoc-gen-es=./node_modules/.bin/protoc-gen-es --es_out=src/gen --es_opt=target=ts,import_extension=js --proto_path=proto --proto_path=$QUIXOS_PROTO_PATH proto/quixos/refs.proto proto/quixos/package.proto proto/quixos/orch.proto proto/quixos/runtime.proto proto/camino/schema.proto proto/camino/api.proto proto/camino/options.proto", - "typecheck": "npm run generate && tsc --noEmit" + "build": "yarn generate && tsc -p tsconfig.build.json", + "generate": "yarn generate:proto && yarn generate:parser", + "generate:proto": "rm -rf src/gen && mkdir -p src/gen && protoc --experimental_allow_proto3_optional --plugin=protoc-gen-es=./node_modules/.bin/protoc-gen-es --es_out=src/gen --es_opt=target=ts,import_extension=js --proto_path=proto --proto_path=$QUIXOS_PROTO_PATH proto/quixos/refs.proto proto/quixos/package.proto proto/quixos/orch.proto proto/quixos/runtime.proto proto/camino/schema.proto proto/camino/api.proto", + "generate:parser": "rm -rf src/capability-language/generated src/resource-lock/generated && mkdir -p src/capability-language/generated src/resource-lock/generated && antlr-ng -D language=TypeScript --generate-visitor --generate-listener false --output-directory src/capability-language/generated grammar/QuixosCapability.g4 && antlr-ng -D language=TypeScript --generate-visitor --generate-listener false --output-directory src/resource-lock/generated grammar/QuixosLock.g4", + "test": "yarn generate && tsc -p tsconfig.test.json && node --test dist/test/*.test.js", + "typecheck": "yarn generate && tsc --noEmit" }, "dependencies": { "@bufbuild/protobuf": "^2.12.1", - "@bufbuild/protoc-gen-es": "^2.12.1" + "@bufbuild/protoc-gen-es": "^2.12.1", + "antlr4ng": "^3.0.16" }, "devDependencies": { "@types/node": "^24", - "typescript": "^5.9.3" + "antlr-ng": "^1.0.10", + "typescript": "^7.0.2" } } diff --git a/proto/camino/api.proto b/proto/camino/api.proto index 159f208..c4678c0 100644 --- a/proto/camino/api.proto +++ b/proto/camino/api.proto @@ -3,75 +3,41 @@ syntax = "proto3"; package camino; import "camino/schema.proto"; -import "quixos/refs.proto"; service CaminoService { - rpc RegisterSchema(RegisterSchemaRequest) returns (RegisterSchemaResponse); - rpc ListClasses(ListClassesRequest) returns (ListClassesResponse); + rpc InstallPersistencePlan(InstallPersistencePlanRequest) returns (InstallPersistencePlanResponse); + rpc GetPersistencePlan(GetPersistencePlanRequest) returns (GetPersistencePlanResponse); rpc CreateObject(CreateObjectRequest) returns (CreateObjectResponse); rpc GetObject(GetObjectRequest) returns (GetObjectResponse); rpc ListObjects(ListObjectsRequest) returns (ListObjectsResponse); - rpc SetField(SetFieldRequest) returns (SetFieldResponse); - rpc AddEdge(AddEdgeRequest) returns (AddEdgeResponse); - rpc ListEdges(ListEdgesRequest) returns (ListEdgesResponse); + rpc ReadState(ReadStateRequest) returns (ReadStateResponse); + rpc WriteState(WriteStateRequest) returns (WriteStateResponse); + rpc ConnectEdge(ConnectEdgeRequest) returns (ConnectEdgeResponse); rpc ResolveEdge(ResolveEdgeRequest) returns (ResolveEdgeResponse); - rpc RemoveEdge(RemoveEdgeRequest) returns (RemoveEdgeResponse); + rpc DisconnectEdge(DisconnectEdgeRequest) returns (DisconnectEdgeResponse); rpc ListOps(ListOpsRequest) returns (ListOpsResponse); rpc WatchObject(WatchObjectRequest) returns (stream WatchObjectEvent); } -message RegisterSchemaRequest { - string source_file = 1; -} - -message RegisterSchemaResponse { - repeated string class_ids = 1; - repeated ClassSchema classes = 2; -} - -message ListClassesRequest {} - -message RegisteredClass { - string id = 1; - ClassSchema schema = 2; -} - -message ListClassesResponse { - repeated RegisteredClass classes = 1; -} - message NullValue {} - -message ObjectValue { - map fields = 1; -} - -message ListValue { - repeated Value values = 1; -} - -message RefValue { - string object_id = 1; -} - +message ObjectValue { map fields = 1; } +message ListValue { repeated Value values = 1; } +message RefValue { string object_id = 1; } message CrdtValue { string type = 1; string encoding = 2; bytes payload = 3; } -message FieldValueSource { +message StateValueSource { string object_id = 1; - string field_name = 2; - string field_type = 3; - string field_storage = 4; - string conflict_strategy = 5; - uint64 revision = 6; + string slot_id = 2; + string value_type_json = 3; + string storage_policy_json = 4; + uint64 revision = 5; } -message ValueSource { - FieldValueSource field = 1; -} +message ValueSource { StateValueSource state = 1; } message Value { oneof kind { @@ -89,96 +55,62 @@ message Value { ValueSource source = 11; } +message InstallPersistencePlanRequest { PersistencePlan plan = 1; } +message InstallPersistencePlanResponse { PersistencePlan plan = 1; } +message GetPersistencePlanRequest {} +message GetPersistencePlanResponse { PersistencePlan plan = 1; } + message CreateObjectRequest { - string class_id = 1; - map fields = 2; + string atom_id = 1; + map initial_state = 2; } +message CreateObjectResponse { CaminoObject object = 1; } +message GetObjectRequest { string object_id = 1; } +message GetObjectResponse { CaminoObject object = 1; } +message ListObjectsRequest { string atom_id = 1; } +message ListObjectsResponse { repeated CaminoObject objects = 1; } -message CreateObjectResponse { - CaminoObject object = 1; -} - -message GetObjectRequest { +message ReadStateRequest { string object_id = 1; + string slot_id = 2; } - -message GetObjectResponse { - CaminoObject object = 1; -} - -message ListObjectsRequest { - string class_id = 1; -} - -message ListObjectsResponse { - repeated CaminoObject objects = 1; -} - -message SetFieldRequest { +message ReadStateResponse { Value value = 1; } +message WriteStateRequest { string object_id = 1; - string field_name = 2; + string slot_id = 2; Value value = 3; string client_mutation_id = 4; } - -message SetFieldResponse { - CaminoObject object = 1; +message WriteStateResponse { + Value value = 1; + CaminoObject object = 2; } -message AddEdgeRequest { - string from_object_id = 1; - string source_field = 2; - string to_object_id = 3; - map fields = 4; - optional int32 source_ordinal = 5; +message ConnectEdgeRequest { + string edge_type_id = 1; + string projection_id = 2; + string object_id = 3; + string target_object_id = 4; + optional int32 ordinal = 5; optional int32 target_ordinal = 6; } - -message AddEdgeResponse { - CaminoEdge edge = 1; -} - -message ListEdgesRequest { - string object_id = 1; -} - -message ListEdgesResponse { - repeated CaminoEdge edges = 1; -} - +message ConnectEdgeResponse { CaminoEdge edge = 1; } message ResolveEdgeRequest { string object_id = 1; - string projection = 2; -} - -message ResolveEdgeResponse { - repeated CaminoEdge edges = 1; - CaminoObject materialized_object = 2; - bool created = 3; -} - -message RemoveEdgeRequest { - string edge_id = 1; -} - -message RemoveEdgeResponse { - string edge_id = 1; -} - -message ListOpsRequest { - string object_id = 1; -} - -message ListOpsResponse { - repeated CaminoOp ops = 1; + string edge_type_id = 2; + string projection_id = 3; } +message ResolveEdgeResponse { repeated CaminoEdge edges = 1; } +message DisconnectEdgeRequest { string edge_id = 1; } +message DisconnectEdgeResponse { string edge_id = 1; } +message ListOpsRequest { string object_id = 1; } +message ListOpsResponse { repeated CaminoOp ops = 1; } message WatchObjectRequest { string object_id = 1; string after_op_id = 2; bool include_snapshot = 3; } - message WatchObjectEvent { string object_id = 1; CaminoObject snapshot = 2; @@ -187,34 +119,24 @@ message WatchObjectEvent { message CaminoObject { string id = 1; - string class_id = 2; - uint32 schema_version = 3; + string atom_id = 2; + string workspace_revision_id = 3; string created_at = 4; string updated_at = 5; - map fields = 6; - map field_revisions = 7; - map field_conflicts = 8; + map state = 6; + map state_revisions = 7; } message CaminoEdge { string id = 1; string edge_type_id = 2; - string from_object_id = 3; - string to_object_id = 4; - // Legacy canonical source-side projection fields. Prefer endpoint fields. - string source_field = 5; - string cardinality = 6; - string inverse = 7; - map fields = 8; - optional int32 from_ordinal = 9; - string created_at = 10; - string updated_at = 11; - string from_projection = 12; - string to_projection = 13; - string from_cardinality = 14; - string to_cardinality = 15; - optional int32 to_ordinal = 16; - string directionality = 17; + string first_object_id = 3; + string second_object_id = 4; + string first_projection_id = 5; + string second_projection_id = 6; + optional int32 first_ordinal = 7; + optional int32 second_ordinal = 8; + string created_at = 9; } message CaminoOp { @@ -223,7 +145,6 @@ message CaminoOp { string op_kind = 3; Value payload = 4; string actor = 5; - quixos.FunctionRef function_ref = 6; - string created_at = 7; - string client_mutation_id = 8; + string created_at = 6; + string client_mutation_id = 7; } diff --git a/proto/camino/options.proto b/proto/camino/options.proto deleted file mode 100644 index 475fa41..0000000 --- a/proto/camino/options.proto +++ /dev/null @@ -1,94 +0,0 @@ -syntax = "proto3"; - -package camino; - -import "google/protobuf/descriptor.proto"; -import "camino/schema.proto"; -import "quixos/refs.proto"; - -extend google.protobuf.FileOptions { - string schema_namespace = 51000; - string schema_version = 51001; -} - -extend google.protobuf.MessageOptions { - ClassOptions class = 51010; - repeated MethodOptions method = 51011; - repeated MigrationOptions migration = 51012; - InterfaceOptions interface = 51013; - repeated ImplementsOptions implements = 51014; - ConstructorOptions constructor = 51015; -} - -extend google.protobuf.FieldOptions { - ConflictStrategy conflict = 51020; - EdgeOptions edge = 51021; - FieldStorage field_storage = 51022; - FieldOps field_ops = 51023; - InterfaceFieldContract interface_field = 51024; - bool display_label = 51025; -} - -extend google.protobuf.MethodOptions { - quixos.FunctionRef impl = 51030; -} - -message ClassOptions { - uint32 version = 1; - SymbolRef id = 2; -} - -message InterfaceOptions { - uint32 version = 1; - SymbolRef id = 2; - repeated string type_parameter = 3; -} - -message ImplementsOptions { - SymbolRef interface = 1; - repeated TypeBinding type_binding = 2; -} - -message ConstructorOptions { - quixos.FunctionRef function = 1; -} - -message EdgeOptions { - SymbolRef id = 1; - // Shorthand for other_endpoint.class. - SymbolRef target = 2; - // Shorthand for this_endpoint.cardinality. - Cardinality cardinality = 3; - // Shorthand for other_endpoint.projection. - string inverse = 4; - EdgeEndpointOptions this_endpoint = 5; - EdgeEndpointOptions other_endpoint = 6; - repeated SymbolRef tag = 7; - repeated SymbolRef implements = 8; - bool undirected = 9; -} - -message EdgeEndpointOptions { - SymbolRef class = 1; - SymbolRef interface = 2; - string projection = 3; - Cardinality cardinality = 4; - bool indexed = 5; - EdgeMaterializationOptions materialize = 6; -} - -message EdgeMaterializationOptions { - SymbolRef class = 1; - string connect_projection = 2; -} - -message MethodOptions { - string name = 1; - quixos.FunctionRef function = 2; -} - -message MigrationOptions { - uint32 from_version = 1; - uint32 to_version = 2; - quixos.FunctionRef function = 3; -} diff --git a/proto/camino/schema.proto b/proto/camino/schema.proto index e1831ee..14c3295 100644 --- a/proto/camino/schema.proto +++ b/proto/camino/schema.proto @@ -2,215 +2,62 @@ syntax = "proto3"; package camino; -import "quixos/refs.proto"; - -message SymbolRef { - string namespace = 1; - string name = 2; - string version = 3; - string hash = 4; -} - -enum ConflictStrategy { - CONFLICT_STRATEGY_UNSPECIFIED = 0; - REPLACE = 1; - PRESERVE_CONFLICTS = 2; - CRDT = 3; -} - enum Cardinality { CARDINALITY_UNSPECIFIED = 0; OPTIONAL_ONE = 1; EXACTLY_ONE = 2; MANY = 3; MANY_UNIQUE = 4; - MANY_ORDERED = 5; - MANY_UNIQUE_ORDERED = 6; } -enum DocRefStrength { - DOC_REF_STRENGTH_UNSPECIFIED = 0; - SOFT_REF = 1; - PROJECTED_EDGE = 2; +message AtomDefinition { + string atom_id = 1; + string display_name = 2; } -enum FieldStorageKind { - FIELD_STORAGE_KIND_UNSPECIFIED = 0; - STORED = 1; - DERIVED = 2; - LAZY = 3; - EXTERNAL = 4; - STATIC_FINAL = 5; +message AtomConformance { + string atom_id = 1; + string interface_revision_id = 2; } -message Ref { - string object_id = 1; +message StateAttachment { + string slot_id = 1; + string attached_atom_id = 2; + string display_name = 3; + string value_type_json = 4; + string storage_policy_json = 5; + string default_value_json = 6; } -message CustomField {} - -message WatchStartResult { - string watch_id = 1; +message EndpointConstraint { + oneof kind { + string atom_id = 1; + string interface_revision_id = 2; + } } -message WatchStopRequest { - string watch_id = 1; -} - -message WatchStopResult {} - -message CrdtText { - bytes payload = 1; -} - -message CrdtRichText { - bytes payload = 1; -} - -message CrdtJson { - bytes payload = 1; -} - -message ClassSchema { - SymbolRef id = 1; - uint32 version = 2; - repeated FieldSchema fields = 3; - repeated EdgeSchema edges = 4; - repeated MethodSchema methods = 5; - repeated MigrationSpec migrations = 6; - string source_file = 7; - string proto_message = 8; - repeated OperationServiceSchema operation_services = 9; - repeated InterfaceImplementationSchema implements = 10; - ConstructorSpec constructor = 11; -} - -message FieldSchema { - string name = 1; - uint32 tag = 2; - TypeRef type = 3; - ConflictStrategy conflict = 4; - bool repeated = 5; - bool optional = 6; - FieldStorage storage = 7; - FieldOps ops = 8; - InterfaceFieldContract interface_contract = 9; - bool is_display_label = 10; -} - -message FieldStorage { - FieldStorageKind kind = 1; - quixos.FunctionRef resolver = 2; - bool cache = 3; -} - -message TypeRef { - string proto_type = 1; - SymbolRef symbol = 2; -} - -message TypeBinding { - string name = 1; - TypeRef type = 2; -} - -message InterfaceFieldContract { - bool required = 1; - bool readable = 2; - bool writable = 3; - bool watchable = 4; - string type_param = 5; - TypeRef type = 6; - string ref_target_type_param = 7; - Cardinality edge_cardinality = 8; -} - -message InterfaceImplementationSchema { - SymbolRef interface = 1; - repeated TypeBinding type_bindings = 2; -} - -message InterfaceSchema { - SymbolRef id = 1; - uint32 version = 2; - repeated FieldSchema fields = 3; - string source_file = 4; - string proto_message = 5; - repeated string type_parameters = 6; -} - -enum FieldImplementation { - FIELD_IMPLEMENTATION_UNSPECIFIED = 0; - SERVICE = 1; -} - -message FieldOps { - FieldImplementation implementation = 1; - string service = 2; -} - -message EdgeSchema { - SymbolRef id = 1; - // Legacy/source-side projection fields. Prefer from_endpoint/to_endpoint. - string source_field = 2; - SymbolRef from_class = 3; - SymbolRef to_class = 4; - Cardinality cardinality = 5; - string inverse = 6; - repeated FieldSchema fields = 7; - EdgeEndpointSchema from_endpoint = 8; - EdgeEndpointSchema to_endpoint = 9; - SymbolRef declaring_class = 10; - repeated SymbolRef tags = 11; - repeated SymbolRef implements = 12; - bool undirected = 13; -} - -message EdgeEndpointSchema { - SymbolRef class = 1; - SymbolRef interface = 2; - string projection = 3; +message EdgeEndpoint { + string projection_id = 1; + string display_name = 2; + EndpointConstraint constraint = 3; Cardinality cardinality = 4; - bool indexed = 5; - EdgeMaterialization materialize = 6; + bool ordered = 5; } -message EdgeMaterialization { - SymbolRef class = 1; - string connect_projection = 2; +message EdgeAttachment { + string edge_type_id = 1; + string display_name = 2; + EdgeEndpoint first = 3; + EdgeEndpoint second = 4; } -message MethodSchema { - string name = 1; - quixos.FunctionRef function = 2; -} - -message MigrationSpec { - uint32 from_version = 1; - uint32 to_version = 2; - quixos.FunctionRef function = 3; -} - -message ConstructorSpec { - quixos.FunctionRef function = 1; -} - -message OperationSchema { - string name = 1; - TypeRef input_type = 2; - TypeRef output_type = 3; - quixos.FunctionRef function = 4; -} - -message OperationServiceSchema { - string name = 1; - string full_name = 2; - repeated OperationSchema operations = 3; -} - -message DocRefDeclaration { - string local_name = 1; - SymbolRef type = 2; - SymbolRef target_class = 3; - DocRefStrength strength = 4; +// Camino consumes this persistence-only projection of a checked workspace. +// Interfaces, operation bindings, packages, and constructors stay in orch. +message PersistencePlan { + string workspace_id = 1; + string workspace_revision_id = 2; + repeated AtomDefinition atoms = 3; + repeated AtomConformance conformances = 4; + repeated StateAttachment states = 5; + repeated EdgeAttachment edges = 6; } diff --git a/proto/quixos/orch.proto b/proto/quixos/orch.proto index 4a4f32d..6fbbce4 100644 --- a/proto/quixos/orch.proto +++ b/proto/quixos/orch.proto @@ -8,21 +8,28 @@ import "quixos/refs.proto"; import "quixos/runtime.proto"; service OrchestratorRuntime { - rpc InvokeFunction(InvokeFunctionRequest) returns (InvokeFunctionResponse); - rpc WatchFunction(WatchFunctionRequest) returns (stream WatchFunctionEvent); + rpc InvokeCapability(InvokeCapabilityRequest) returns (InvokeCapabilityResponse); + rpc WatchCapability(WatchCapabilityRequest) returns (stream WatchCapabilityEvent); + rpc ConstructObject(ConstructObjectRequest) returns (ConstructObjectResponse); + rpc GetWorkspace(GetWorkspaceRequest) returns (GetWorkspaceResponse); rpc ListPackageDescriptors(ListPackageDescriptorsRequest) returns (ListPackageDescriptorsResponse); rpc ListPackageRuntimes(ListPackageRuntimesRequest) returns (ListPackageRuntimesResponse); rpc ListActivations(ListActivationsRequest) returns (ListActivationsResponse); rpc CloseActivation(CloseActivationRequest) returns (CloseActivationResponse); } -message InvokeFunctionRequest { - quixos.FunctionRef function = 1; +message ConstructObjectRequest { + string atom_id = 1; + map input = 2; +} +message ConstructObjectResponse { camino.CaminoObject object = 1; } + +message InvokeCapabilityRequest { + quixos.CapabilityRef capability = 1; string object_id = 2; map input = 3; } - -message InvokeFunctionResponse { +message InvokeCapabilityResponse { string invocation_id = 1; Activation activation = 2; bool ok = 3; @@ -30,13 +37,12 @@ message InvokeFunctionResponse { string error = 5; } -message WatchFunctionRequest { - quixos.FunctionRef function = 1; +message WatchCapabilityRequest { + quixos.CapabilityRef capability = 1; string object_id = 2; map input = 3; } - -message WatchFunctionEvent { +message WatchCapabilityEvent { string invocation_id = 1; Activation activation = 2; string watch_id = 3; @@ -46,36 +52,24 @@ message WatchFunctionEvent { bool initial = 7; } +message GetWorkspaceRequest {} +message GetWorkspaceResponse { + string workspace_id = 1; + string workspace_revision_id = 2; + string source_root_commit = 3; +} message ListActivationsRequest {} - message ListPackageDescriptorsRequest {} - -message ListPackageDescriptorsResponse { - repeated quixos.PackageDescriptor descriptors = 1; -} - +message ListPackageDescriptorsResponse { repeated quixos.PackageDescriptor descriptors = 1; } message ListPackageRuntimesRequest {} - -message ListPackageRuntimesResponse { - repeated PackageRuntimeStatus runtimes = 1; -} - -message ListActivationsResponse { - repeated Activation activations = 1; -} - -message CloseActivationRequest { - string activation_id = 1; - string reason = 2; -} - -message CloseActivationResponse { - Activation activation = 1; -} +message ListPackageRuntimesResponse { repeated PackageRuntimeStatus runtimes = 1; } +message ListActivationsResponse { repeated Activation activations = 1; } +message CloseActivationRequest { string activation_id = 1; string reason = 2; } +message CloseActivationResponse { Activation activation = 1; } message Activation { string activation_id = 1; - quixos.FunctionRef function = 2; + quixos.PackageExportRef export = 2; string object_id = 3; string state = 4; uint32 demand = 5; @@ -88,17 +82,15 @@ message Activation { message PackageRuntimeStatus { string runtime_key = 1; - string package_namespace = 2; - string package_name = 3; - uint32 descriptor_version = 4; - string source_repo = 5; - string server_installable = 6; - string source_path = 7; - string server_path = 8; - uint32 pid = 9; - string state = 10; - string started_at = 11; - string last_handshake_at = 12; - string runtime_protocol_version = 13; - uint32 advertised_function_count = 14; + string package_revision_id = 2; + string source_repository = 3; + string source_commit = 4; + string build_target = 5; + string server_path = 6; + uint32 pid = 7; + string state = 8; + string started_at = 9; + string last_handshake_at = 10; + string runtime_protocol_version = 11; + uint32 advertised_export_count = 12; } diff --git a/proto/quixos/package.proto b/proto/quixos/package.proto index 1580132..c8c7f7d 100644 --- a/proto/quixos/package.proto +++ b/proto/quixos/package.proto @@ -2,70 +2,14 @@ syntax = "proto3"; package quixos; -import "camino/schema.proto"; -import "quixos/refs.proto"; - -message PackageRef { - string package_namespace = 1; - string package_name = 2; - uint32 descriptor_version = 3; - string version_ref = 4; -} - message PackageDescriptor { - string package_namespace = 1; - string package_name = 2; - uint32 descriptor_version = 3; - uint32 interface_compatible_back_to = 4; - uint32 runner_compatible_back_to = 5; - string source_repo = 6; - string source_ref = 7; - string resolved_source_ref = 8; - string server_installable = 9; - string runtime_protocol_version = 10; - repeated ClassExport class_exports = 11; - repeated FunctionExport function_exports = 12; - repeated ComponentExport component_exports = 13; - repeated SidecarExport sidecar_exports = 14; - repeated PackageDependency dependencies = 15; + string package_id = 1; + string package_revision_id = 2; + string runtime_protocol_version = 3; + repeated RuntimeExport exports = 4; } -enum FunctionCapabilityKind { - FUNCTION_CAPABILITY_KIND_UNSPECIFIED = 0; - METHOD = 1; - FIELD_RESOLVER = 2; - MIGRATION = 3; - CONSTRUCTOR = 4; -} - -message ClassExport { - camino.SymbolRef class_id = 1; - string source_file = 2; -} - -message FunctionExport { - FunctionRef function = 1; - string input_type = 2; - string output_type = 3; - uint32 interface_version = 4; - uint32 interface_compatible_back_to = 5; - FunctionCapabilityKind capability_kind = 6; -} - -message ComponentExport { - string symbol = 1; - string props_type = 2; - repeated camino.SymbolRef supported_classes = 3; -} - -message SidecarExport { - string symbol = 1; - string side_effect_mode = 2; -} - -message PackageDependency { - PackageRef package = 1; - uint32 interface_compatible_back_to = 2; - bool refactor_required = 3; - string compatibility_note = 4; +message RuntimeExport { + string export_id = 1; + string runtime_symbol = 2; } diff --git a/proto/quixos/refs.proto b/proto/quixos/refs.proto index 357a44f..08a9da6 100644 --- a/proto/quixos/refs.proto +++ b/proto/quixos/refs.proto @@ -2,10 +2,27 @@ syntax = "proto3"; package quixos; -message FunctionRef { - string package_namespace = 1; - string package_name = 2; - string symbol = 3; - string version_ref = 4; - string operation = 5; +message CapabilityRef { + string interface_revision_id = 1; + string operation_id = 2; +} + +message PackageExportRef { + string package_revision_id = 1; + string export_id = 2; +} + +message InjectedDependency { + string port_id = 1; + oneof binding { + string state_slot_id = 2; + EdgeDependency edge = 3; + string receiver_interface_revision_id = 4; + string constructor_atom_id = 5; + } +} + +message EdgeDependency { + string edge_type_id = 1; + string projection_id = 2; } diff --git a/proto/quixos/runtime.proto b/proto/quixos/runtime.proto index cb86b70..e6ed171 100644 --- a/proto/quixos/runtime.proto +++ b/proto/quixos/runtime.proto @@ -11,24 +11,20 @@ service PackageRuntime { rpc Watch(WatchRequest) returns (stream WatchEvent); } -message HandshakeRequest { - string orch_protocol_version = 1; -} - +message HandshakeRequest { string orch_protocol_version = 1; } message HandshakeResponse { - string package_namespace = 1; - string package_name = 2; - string runtime_protocol_version = 3; - repeated quixos.FunctionRef functions = 4; + string package_revision_id = 1; + string runtime_protocol_version = 2; + repeated string export_ids = 3; } message InvokeRequest { string invocation_id = 1; - quixos.FunctionRef function = 2; + quixos.PackageExportRef export = 2; string object_id = 3; map input = 4; + repeated quixos.InjectedDependency dependencies = 5; } - message InvokeResponse { bool ok = 1; camino.Value result = 2; @@ -37,16 +33,17 @@ message InvokeResponse { message WatchRequest { string invocation_id = 1; - quixos.FunctionRef function = 2; + quixos.PackageExportRef export = 2; string object_id = 3; map input = 4; + repeated quixos.InjectedDependency dependencies = 5; } message DerivedDependency { string kind = 1; string object_id = 2; - string field_name = 3; - string source_field = 4; + string attachment_id = 3; + string projection_id = 4; } message WatchEvent { diff --git a/src/capability-language/cli.ts b/src/capability-language/cli.ts new file mode 100644 index 0000000..a4c2a06 --- /dev/null +++ b/src/capability-language/cli.ts @@ -0,0 +1,95 @@ +#!/usr/bin/env node + +import { readFile } from "node:fs/promises"; +import process from "node:process"; +import { compileCapabilitySource } from "./parser.js"; +import { capabilityId } from "../capability-model/types.js"; +import { compileWorkspaceRevision } from "../capability-model/validation.js"; + +const usage = `usage: quixos-capability-compile [--check] + [--workspace-id ID] [--workspace-revision-id ID] + [--source-root-commit GIT_REV] + +Parses, lowers, and validates a Quixos capability workspace. By default the +checked semantic workspace revision is written as JSON. --check emits no JSON. +The identity overrides instantiate a checked built-in/template assembly for one +real workspace; both must be supplied together.`; + +const parseArgs = (args: string[]) => { + let checkOnly = false; + let workspaceId: string | undefined; + let workspaceRevisionId: string | undefined; + let sourceRootCommit: string | undefined; + const positional: string[] = []; + for (let index = 0; index < args.length; index += 1) { + const argument = args[index]!; + if (argument === "--check") checkOnly = true; + else if (argument === "--workspace-id") workspaceId = args[++index]; + else if (argument === "--workspace-revision-id") workspaceRevisionId = args[++index]; + else if (argument === "--source-root-commit") sourceRootCommit = args[++index]; + else if (argument === "-") positional.push(argument); + else if (argument.startsWith("-")) throw new Error(usage); + else positional.push(argument); + } + if (positional.length !== 1 || Boolean(workspaceId) !== Boolean(workspaceRevisionId)) { + throw new Error(usage); + } + return { checkOnly, workspaceId, workspaceRevisionId, sourceRootCommit, fileName: positional[0]! }; +}; + +const main = async () => { + const args = process.argv.slice(2); + if (args.includes("--help") || args.includes("-h")) { + process.stdout.write(`${usage}\n`); + return; + } + const { + checkOnly, + workspaceId, + workspaceRevisionId, + sourceRootCommit, + fileName, + } = parseArgs(args); + const source = + fileName === "-" + ? await new Promise((resolve, reject) => { + const chunks: Buffer[] = []; + process.stdin.on("data", (chunk: Buffer) => chunks.push(chunk)); + process.stdin.on("end", () => resolve(Buffer.concat(chunks).toString("utf8"))); + process.stdin.on("error", reject); + }) + : await readFile(fileName, "utf8"); + const result = compileCapabilitySource(source, fileName); + if (!result.ok) { + for (const diagnostic of result.diagnostics) { + const location = diagnostic.line + ? `${diagnostic.fileName}:${diagnostic.line}:${diagnostic.column + 1}` + : `${diagnostic.fileName}${diagnostic.path ? `:${diagnostic.path}` : ""}`; + process.stderr.write( + `${location}: ${diagnostic.phase} ${diagnostic.code}: ${diagnostic.message}\n`, + ); + } + process.exitCode = 1; + return; + } + const workspace = workspaceId && workspaceRevisionId + ? { + ...result.workspace, + workspaceId: capabilityId.workspace(workspaceId), + id: capabilityId.workspaceRevision(workspaceRevisionId), + ...(sourceRootCommit ? { sourceRootCommit } : {}), + } + : { ...result.workspace, ...(sourceRootCommit ? { sourceRootCommit } : {}) }; + const instantiated = compileWorkspaceRevision(workspace); + if (!instantiated.ok) { + throw new Error(instantiated.issues.map((issue) => `${issue.path}: ${issue.message}`).join("\n")); + } + if (!checkOnly) { + process.stdout.write(`${JSON.stringify(workspace, null, 2)}\n`); + } +}; + +main().catch((error: unknown) => { + process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`); + process.exitCode = 1; +}); diff --git a/src/capability-language/generated/QuixosCapability.interp b/src/capability-language/generated/QuixosCapability.interp new file mode 100644 index 0000000..8a25b05 --- /dev/null +++ b/src/capability-language/generated/QuixosCapability.interp @@ -0,0 +1,253 @@ +token literal names: +null +'workspace' +'atom' +'interface' +'interfaces' +'package' +'value' +'relation' +'operation' +'function' +'constructor' +'constructs' +'conform' +'as' +'bind' +'to' +'private' +'shared' +'state' +'edge' +'projection' +'with' +'on' +'policy' +'default' +'source' +'repository' +'commit' +'revision' +'id' +'doc' +'mode' +'emits' +'receiver' +'requires' +'any' +'get' +'set' +'watch' +'start' +'stop' +'read' +'write' +'resolve' +'connect' +'disconnect' +'call' +'watch-start' +'watch-stop' +'subscribe' +'unsubscribe' +'optimistic-register' +'crdt' +'optional-one' +'exactly-one' +'many-unique' +'many' +'ordered' +'unit' +'watch-handle' +'message' +'atom-ref' +'interface-ref' +'optional' +'list' +'bool' +'bytes' +'double' +'int32' +'int64' +'string' +'uint32' +'uint64' +'true' +'false' +'null' +'->' +':' +';' +',' +'.' +'{' +'}' +'[' +']' +'(' +')' +'<' +'>' +null +null +null +null +null +null +null + +token symbolic names: +null +WORKSPACE +ATOM +INTERFACE +INTERFACES +PACKAGE +VALUE +RELATION +OPERATION +FUNCTION +CONSTRUCTOR +CONSTRUCTS +CONFORM +AS +BIND +TO +PRIVATE +SHARED +STATE +EDGE +PROJECTION +WITH +ON +POLICY +DEFAULT +SOURCE +REPOSITORY +COMMIT +REVISION +ID +DOC +MODE +EMITS +RECEIVER +REQUIRES +ANY +GET +SET +WATCH +START +STOP +READ +WRITE +RESOLVE +CONNECT +DISCONNECT +CALL +WATCH_START +WATCH_STOP +SUBSCRIBE +UNSUBSCRIBE +OPTIMISTIC_REGISTER +CRDT +OPTIONAL_ONE +EXACTLY_ONE +MANY_UNIQUE +MANY +ORDERED +UNIT +WATCH_HANDLE +MESSAGE +ATOM_REF +INTERFACE_REF +OPTIONAL +LIST +BOOL +BYTES +DOUBLE +INT32 +INT64 +STRING +UINT32 +UINT64 +TRUE +FALSE +NULL +ARROW +COLON +SEMI +COMMA +DOT +LBRACE +RBRACE +LBRACK +RBRACK +LPAREN +RPAREN +LT +GT +INTEGER +JSON_NUMBER +IDENTIFIER +STRING_LITERAL +LINE_COMMENT +BLOCK_COMMENT +WS + +rule names: +document +workspaceDecl +workspaceItem +atomDecl +interfaceDecl +sourceBlock +interfaceMember +operationMember +valueMember +valueMemberOperation +relationshipMember +relationshipOperation +targetConstraint +packageDecl +packageExport +packageOperationExport +packageFunctionExport +packageConstructorExport +eventClause +operationMode +receiverRequirement +identifierList +dependencyBlock +dependencyPort +primitiveList +primitive +sharedAttachmentDecl +attachmentDecl +stateDecl +storagePolicy +edgeDecl +edgeEndpoint +conformanceDecl +conformanceItem +operationBindingDecl +memberOperationRef +operationName +operationProvider +statePrimitive +edgePrimitive +dependencyBindingBlock +dependencyBinding +constructorBindingDecl +valueType +scalarType +cardinality +jsonLiteral +jsonObject +jsonMember +jsonArray +identifier +stringLiteral + + +atn: +[4, 1, 95, 668, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2,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9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 223, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 233, 8, 10, 1, 10, 1, 10, 5, 10, 237, 8, 10, 10, 10, 12, 10, 240, 9, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 268, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 274, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 5, 13, 285, 8, 13, 10, 13, 12, 13, 288, 9, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 3, 14, 295, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 308, 8, 15, 1, 15, 1, 15, 1, 15, 3, 15, 313, 8, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 326, 8, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 339, 8, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 354, 8, 20, 1, 20, 3, 20, 357, 8, 20, 1, 21, 1, 21, 1, 21, 5, 21, 362, 8, 21, 10, 21, 12, 21, 365, 9, 21, 1, 22, 1, 22, 1, 22, 5, 22, 370, 8, 22, 10, 22, 12, 22, 373, 9, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 412, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 418, 8, 24, 10, 24, 12, 24, 421, 9, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 3, 27, 432, 8, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 446, 8, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 456, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 474, 8, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 484, 8, 32, 10, 32, 12, 32, 487, 9, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 3, 33, 494, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 517, 8, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 536, 8, 37, 3, 37, 538, 8, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 5, 40, 547, 8, 40, 10, 40, 12, 40, 550, 9, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 580, 8, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 589, 8, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 618, 8, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 632, 8, 46, 1, 47, 1, 47, 1, 47, 1, 47, 5, 47, 638, 8, 47, 10, 47, 12, 47, 641, 9, 47, 3, 47, 643, 8, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 5, 49, 655, 8, 49, 10, 49, 12, 49, 658, 9, 49, 3, 49, 660, 8, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 0, 0, 52, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 0, 7, 1, 0, 46, 50, 2, 0, 41, 45, 47, 48, 2, 0, 41, 42, 47, 48, 2, 0, 43, 45, 47, 48, 1, 0, 65, 72, 1, 0, 53, 56, 2, 0, 25, 25, 91, 91, 692, 0, 104, 1, 0, 0, 0, 2, 107, 1, 0, 0, 0, 4, 130, 1, 0, 0, 0, 6, 132, 1, 0, 0, 0, 8, 142, 1, 0, 0, 0, 10, 158, 1, 0, 0, 0, 12, 171, 1, 0, 0, 0, 14, 173, 1, 0, 0, 0, 16, 188, 1, 0, 0, 0, 18, 222, 1, 0, 0, 0, 20, 224, 1, 0, 0, 0, 22, 267, 1, 0, 0, 0, 24, 273, 1, 0, 0, 0, 26, 275, 1, 0, 0, 0, 28, 294, 1, 0, 0, 0, 30, 296, 1, 0, 0, 0, 32, 316, 1, 0, 0, 0, 34, 329, 1, 0, 0, 0, 36, 342, 1, 0, 0, 0, 38, 345, 1, 0, 0, 0, 40, 356, 1, 0, 0, 0, 42, 358, 1, 0, 0, 0, 44, 366, 1, 0, 0, 0, 46, 411, 1, 0, 0, 0, 48, 413, 1, 0, 0, 0, 50, 424, 1, 0, 0, 0, 52, 426, 1, 0, 0, 0, 54, 431, 1, 0, 0, 0, 56, 433, 1, 0, 0, 0, 58, 455, 1, 0, 0, 0, 60, 457, 1, 0, 0, 0, 62, 466, 1, 0, 0, 0, 64, 477, 1, 0, 0, 0, 66, 493, 1, 0, 0, 0, 68, 495, 1, 0, 0, 0, 70, 501, 1, 0, 0, 0, 72, 516, 1, 0, 0, 0, 74, 537, 1, 0, 0, 0, 76, 539, 1, 0, 0, 0, 78, 541, 1, 0, 0, 0, 80, 543, 1, 0, 0, 0, 82, 579, 1, 0, 0, 0, 84, 581, 1, 0, 0, 0, 86, 617, 1, 0, 0, 0, 88, 619, 1, 0, 0, 0, 90, 621, 1, 0, 0, 0, 92, 631, 1, 0, 0, 0, 94, 633, 1, 0, 0, 0, 96, 646, 1, 0, 0, 0, 98, 650, 1, 0, 0, 0, 100, 663, 1, 0, 0, 0, 102, 665, 1, 0, 0, 0, 104, 105, 3, 2, 1, 0, 105, 106, 5, 0, 0, 1, 106, 1, 1, 0, 0, 0, 107, 108, 5, 1, 0, 0, 108, 109, 3, 100, 50, 0, 109, 110, 5, 29, 0, 0, 110, 111, 3, 102, 51, 0, 111, 112, 5, 28, 0, 0, 112, 113, 3, 102, 51, 0, 113, 114, 5, 27, 0, 0, 114, 115, 3, 102, 51, 0, 115, 119, 5, 81, 0, 0, 116, 118, 3, 4, 2, 0, 117, 116, 1, 0, 0, 0, 118, 121, 1, 0, 0, 0, 119, 117, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 122, 1, 0, 0, 0, 121, 119, 1, 0, 0, 0, 122, 123, 5, 82, 0, 0, 123, 3, 1, 0, 0, 0, 124, 131, 3, 6, 3, 0, 125, 131, 3, 8, 4, 0, 126, 131, 3, 26, 13, 0, 127, 131, 3, 52, 26, 0, 128, 131, 3, 64, 32, 0, 129, 131, 3, 84, 42, 0, 130, 124, 1, 0, 0, 0, 130, 125, 1, 0, 0, 0, 130, 126, 1, 0, 0, 0, 130, 127, 1, 0, 0, 0, 130, 128, 1, 0, 0, 0, 130, 129, 1, 0, 0, 0, 131, 5, 1, 0, 0, 0, 132, 133, 5, 2, 0, 0, 133, 134, 3, 100, 50, 0, 134, 135, 5, 29, 0, 0, 135, 138, 3, 102, 51, 0, 136, 137, 5, 30, 0, 0, 137, 139, 3, 102, 51, 0, 138, 136, 1, 0, 0, 0, 138, 139, 1, 0, 0, 0, 139, 140, 1, 0, 0, 0, 140, 141, 5, 78, 0, 0, 141, 7, 1, 0, 0, 0, 142, 143, 5, 3, 0, 0, 143, 144, 3, 100, 50, 0, 144, 145, 5, 29, 0, 0, 145, 146, 3, 102, 51, 0, 146, 147, 5, 28, 0, 0, 147, 148, 3, 102, 51, 0, 148, 149, 3, 10, 5, 0, 149, 153, 5, 81, 0, 0, 150, 152, 3, 12, 6, 0, 151, 150, 1, 0, 0, 0, 152, 155, 1, 0, 0, 0, 153, 151, 1, 0, 0, 0, 153, 154, 1, 0, 0, 0, 154, 156, 1, 0, 0, 0, 155, 153, 1, 0, 0, 0, 156, 157, 5, 82, 0, 0, 157, 9, 1, 0, 0, 0, 158, 159, 5, 25, 0, 0, 159, 160, 5, 81, 0, 0, 160, 161, 5, 26, 0, 0, 161, 162, 3, 102, 51, 0, 162, 163, 5, 78, 0, 0, 163, 164, 5, 27, 0, 0, 164, 165, 3, 102, 51, 0, 165, 166, 5, 78, 0, 0, 166, 167, 5, 82, 0, 0, 167, 11, 1, 0, 0, 0, 168, 172, 3, 16, 8, 0, 169, 172, 3, 20, 10, 0, 170, 172, 3, 14, 7, 0, 171, 168, 1, 0, 0, 0, 171, 169, 1, 0, 0, 0, 171, 170, 1, 0, 0, 0, 172, 13, 1, 0, 0, 0, 173, 174, 5, 8, 0, 0, 174, 175, 3, 100, 50, 0, 175, 176, 5, 29, 0, 0, 176, 177, 3, 102, 51, 0, 177, 178, 5, 77, 0, 0, 178, 179, 3, 86, 43, 0, 179, 180, 5, 76, 0, 0, 180, 181, 3, 86, 43, 0, 181, 182, 5, 81, 0, 0, 182, 183, 5, 46, 0, 0, 183, 184, 5, 29, 0, 0, 184, 185, 3, 102, 51, 0, 185, 186, 5, 78, 0, 0, 186, 187, 5, 82, 0, 0, 187, 15, 1, 0, 0, 0, 188, 189, 5, 6, 0, 0, 189, 190, 3, 100, 50, 0, 190, 191, 5, 29, 0, 0, 191, 192, 3, 102, 51, 0, 192, 193, 5, 77, 0, 0, 193, 194, 3, 86, 43, 0, 194, 198, 5, 81, 0, 0, 195, 197, 3, 18, 9, 0, 196, 195, 1, 0, 0, 0, 197, 200, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 198, 199, 1, 0, 0, 0, 199, 201, 1, 0, 0, 0, 200, 198, 1, 0, 0, 0, 201, 202, 5, 82, 0, 0, 202, 17, 1, 0, 0, 0, 203, 204, 5, 36, 0, 0, 204, 205, 5, 29, 0, 0, 205, 206, 3, 102, 51, 0, 206, 207, 5, 78, 0, 0, 207, 223, 1, 0, 0, 0, 208, 209, 5, 37, 0, 0, 209, 210, 5, 29, 0, 0, 210, 211, 3, 102, 51, 0, 211, 212, 5, 78, 0, 0, 212, 223, 1, 0, 0, 0, 213, 214, 5, 38, 0, 0, 214, 215, 5, 39, 0, 0, 215, 216, 5, 29, 0, 0, 216, 217, 3, 102, 51, 0, 217, 218, 5, 40, 0, 0, 218, 219, 5, 29, 0, 0, 219, 220, 3, 102, 51, 0, 220, 221, 5, 78, 0, 0, 221, 223, 1, 0, 0, 0, 222, 203, 1, 0, 0, 0, 222, 208, 1, 0, 0, 0, 222, 213, 1, 0, 0, 0, 223, 19, 1, 0, 0, 0, 224, 225, 5, 7, 0, 0, 225, 226, 3, 100, 50, 0, 226, 227, 5, 29, 0, 0, 227, 228, 3, 102, 51, 0, 228, 229, 5, 77, 0, 0, 229, 230, 3, 90, 45, 0, 230, 232, 3, 24, 12, 0, 231, 233, 5, 57, 0, 0, 232, 231, 1, 0, 0, 0, 232, 233, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, 238, 5, 81, 0, 0, 235, 237, 3, 22, 11, 0, 236, 235, 1, 0, 0, 0, 237, 240, 1, 0, 0, 0, 238, 236, 1, 0, 0, 0, 238, 239, 1, 0, 0, 0, 239, 241, 1, 0, 0, 0, 240, 238, 1, 0, 0, 0, 241, 242, 5, 82, 0, 0, 242, 21, 1, 0, 0, 0, 243, 244, 5, 43, 0, 0, 244, 245, 5, 29, 0, 0, 245, 246, 3, 102, 51, 0, 246, 247, 5, 78, 0, 0, 247, 268, 1, 0, 0, 0, 248, 249, 5, 44, 0, 0, 249, 250, 5, 29, 0, 0, 250, 251, 3, 102, 51, 0, 251, 252, 5, 78, 0, 0, 252, 268, 1, 0, 0, 0, 253, 254, 5, 45, 0, 0, 254, 255, 5, 29, 0, 0, 255, 256, 3, 102, 51, 0, 256, 257, 5, 78, 0, 0, 257, 268, 1, 0, 0, 0, 258, 259, 5, 38, 0, 0, 259, 260, 5, 39, 0, 0, 260, 261, 5, 29, 0, 0, 261, 262, 3, 102, 51, 0, 262, 263, 5, 40, 0, 0, 263, 264, 5, 29, 0, 0, 264, 265, 3, 102, 51, 0, 265, 266, 5, 78, 0, 0, 266, 268, 1, 0, 0, 0, 267, 243, 1, 0, 0, 0, 267, 248, 1, 0, 0, 0, 267, 253, 1, 0, 0, 0, 267, 258, 1, 0, 0, 0, 268, 23, 1, 0, 0, 0, 269, 270, 5, 2, 0, 0, 270, 274, 3, 100, 50, 0, 271, 272, 5, 3, 0, 0, 272, 274, 3, 100, 50, 0, 273, 269, 1, 0, 0, 0, 273, 271, 1, 0, 0, 0, 274, 25, 1, 0, 0, 0, 275, 276, 5, 5, 0, 0, 276, 277, 3, 100, 50, 0, 277, 278, 5, 29, 0, 0, 278, 279, 3, 102, 51, 0, 279, 280, 5, 28, 0, 0, 280, 281, 3, 102, 51, 0, 281, 282, 3, 10, 5, 0, 282, 286, 5, 81, 0, 0, 283, 285, 3, 28, 14, 0, 284, 283, 1, 0, 0, 0, 285, 288, 1, 0, 0, 0, 286, 284, 1, 0, 0, 0, 286, 287, 1, 0, 0, 0, 287, 289, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, 289, 290, 5, 82, 0, 0, 290, 27, 1, 0, 0, 0, 291, 295, 3, 30, 15, 0, 292, 295, 3, 32, 16, 0, 293, 295, 3, 34, 17, 0, 294, 291, 1, 0, 0, 0, 294, 292, 1, 0, 0, 0, 294, 293, 1, 0, 0, 0, 295, 29, 1, 0, 0, 0, 296, 297, 5, 8, 0, 0, 297, 298, 3, 100, 50, 0, 298, 299, 5, 29, 0, 0, 299, 300, 3, 102, 51, 0, 300, 301, 5, 77, 0, 0, 301, 302, 3, 86, 43, 0, 302, 303, 5, 76, 0, 0, 303, 304, 3, 86, 43, 0, 304, 305, 5, 31, 0, 0, 305, 307, 3, 38, 19, 0, 306, 308, 3, 36, 18, 0, 307, 306, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 308, 309, 1, 0, 0, 0, 309, 310, 5, 33, 0, 0, 310, 312, 3, 40, 20, 0, 311, 313, 3, 44, 22, 0, 312, 311, 1, 0, 0, 0, 312, 313, 1, 0, 0, 0, 313, 314, 1, 0, 0, 0, 314, 315, 5, 78, 0, 0, 315, 31, 1, 0, 0, 0, 316, 317, 5, 9, 0, 0, 317, 318, 3, 100, 50, 0, 318, 319, 5, 29, 0, 0, 319, 320, 3, 102, 51, 0, 320, 321, 5, 77, 0, 0, 321, 322, 3, 86, 43, 0, 322, 323, 5, 76, 0, 0, 323, 325, 3, 86, 43, 0, 324, 326, 3, 44, 22, 0, 325, 324, 1, 0, 0, 0, 325, 326, 1, 0, 0, 0, 326, 327, 1, 0, 0, 0, 327, 328, 5, 78, 0, 0, 328, 33, 1, 0, 0, 0, 329, 330, 5, 10, 0, 0, 330, 331, 3, 100, 50, 0, 331, 332, 5, 29, 0, 0, 332, 333, 3, 102, 51, 0, 333, 334, 5, 11, 0, 0, 334, 335, 3, 100, 50, 0, 335, 336, 5, 77, 0, 0, 336, 338, 3, 86, 43, 0, 337, 339, 3, 44, 22, 0, 338, 337, 1, 0, 0, 0, 338, 339, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 341, 5, 78, 0, 0, 341, 35, 1, 0, 0, 0, 342, 343, 5, 32, 0, 0, 343, 344, 3, 86, 43, 0, 344, 37, 1, 0, 0, 0, 345, 346, 7, 0, 0, 0, 346, 39, 1, 0, 0, 0, 347, 357, 5, 35, 0, 0, 348, 349, 5, 2, 0, 0, 349, 357, 3, 100, 50, 0, 350, 351, 5, 4, 0, 0, 351, 353, 5, 83, 0, 0, 352, 354, 3, 42, 21, 0, 353, 352, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 355, 357, 5, 84, 0, 0, 356, 347, 1, 0, 0, 0, 356, 348, 1, 0, 0, 0, 356, 350, 1, 0, 0, 0, 357, 41, 1, 0, 0, 0, 358, 363, 3, 100, 50, 0, 359, 360, 5, 79, 0, 0, 360, 362, 3, 100, 50, 0, 361, 359, 1, 0, 0, 0, 362, 365, 1, 0, 0, 0, 363, 361, 1, 0, 0, 0, 363, 364, 1, 0, 0, 0, 364, 43, 1, 0, 0, 0, 365, 363, 1, 0, 0, 0, 366, 367, 5, 34, 0, 0, 367, 371, 5, 81, 0, 0, 368, 370, 3, 46, 23, 0, 369, 368, 1, 0, 0, 0, 370, 373, 1, 0, 0, 0, 371, 369, 1, 0, 0, 0, 371, 372, 1, 0, 0, 0, 372, 374, 1, 0, 0, 0, 373, 371, 1, 0, 0, 0, 374, 375, 5, 82, 0, 0, 375, 45, 1, 0, 0, 0, 376, 377, 5, 18, 0, 0, 377, 378, 3, 100, 50, 0, 378, 379, 5, 29, 0, 0, 379, 380, 3, 102, 51, 0, 380, 381, 5, 77, 0, 0, 381, 382, 3, 86, 43, 0, 382, 383, 3, 48, 24, 0, 383, 384, 5, 78, 0, 0, 384, 412, 1, 0, 0, 0, 385, 386, 5, 19, 0, 0, 386, 387, 3, 100, 50, 0, 387, 388, 5, 29, 0, 0, 388, 389, 3, 102, 51, 0, 389, 390, 5, 77, 0, 0, 390, 391, 3, 90, 45, 0, 391, 392, 3, 24, 12, 0, 392, 393, 3, 48, 24, 0, 393, 394, 5, 78, 0, 0, 394, 412, 1, 0, 0, 0, 395, 396, 5, 3, 0, 0, 396, 397, 3, 100, 50, 0, 397, 398, 5, 29, 0, 0, 398, 399, 3, 102, 51, 0, 399, 400, 5, 77, 0, 0, 400, 401, 3, 100, 50, 0, 401, 402, 5, 78, 0, 0, 402, 412, 1, 0, 0, 0, 403, 404, 5, 10, 0, 0, 404, 405, 3, 100, 50, 0, 405, 406, 5, 29, 0, 0, 406, 407, 3, 102, 51, 0, 407, 408, 5, 77, 0, 0, 408, 409, 3, 100, 50, 0, 409, 410, 5, 78, 0, 0, 410, 412, 1, 0, 0, 0, 411, 376, 1, 0, 0, 0, 411, 385, 1, 0, 0, 0, 411, 395, 1, 0, 0, 0, 411, 403, 1, 0, 0, 0, 412, 47, 1, 0, 0, 0, 413, 414, 5, 83, 0, 0, 414, 419, 3, 50, 25, 0, 415, 416, 5, 79, 0, 0, 416, 418, 3, 50, 25, 0, 417, 415, 1, 0, 0, 0, 418, 421, 1, 0, 0, 0, 419, 417, 1, 0, 0, 0, 419, 420, 1, 0, 0, 0, 420, 422, 1, 0, 0, 0, 421, 419, 1, 0, 0, 0, 422, 423, 5, 84, 0, 0, 423, 49, 1, 0, 0, 0, 424, 425, 7, 1, 0, 0, 425, 51, 1, 0, 0, 0, 426, 427, 5, 17, 0, 0, 427, 428, 3, 54, 27, 0, 428, 53, 1, 0, 0, 0, 429, 432, 3, 56, 28, 0, 430, 432, 3, 60, 30, 0, 431, 429, 1, 0, 0, 0, 431, 430, 1, 0, 0, 0, 432, 55, 1, 0, 0, 0, 433, 434, 5, 18, 0, 0, 434, 435, 3, 100, 50, 0, 435, 436, 5, 29, 0, 0, 436, 437, 3, 102, 51, 0, 437, 438, 5, 22, 0, 0, 438, 439, 3, 100, 50, 0, 439, 440, 5, 77, 0, 0, 440, 441, 3, 86, 43, 0, 441, 442, 5, 23, 0, 0, 442, 445, 3, 58, 29, 0, 443, 444, 5, 24, 0, 0, 444, 446, 3, 92, 46, 0, 445, 443, 1, 0, 0, 0, 445, 446, 1, 0, 0, 0, 446, 447, 1, 0, 0, 0, 447, 448, 5, 78, 0, 0, 448, 57, 1, 0, 0, 0, 449, 456, 5, 51, 0, 0, 450, 451, 5, 52, 0, 0, 451, 452, 5, 85, 0, 0, 452, 453, 3, 86, 43, 0, 453, 454, 5, 86, 0, 0, 454, 456, 1, 0, 0, 0, 455, 449, 1, 0, 0, 0, 455, 450, 1, 0, 0, 0, 456, 59, 1, 0, 0, 0, 457, 458, 5, 19, 0, 0, 458, 459, 3, 100, 50, 0, 459, 460, 5, 29, 0, 0, 460, 461, 3, 102, 51, 0, 461, 462, 5, 81, 0, 0, 462, 463, 3, 62, 31, 0, 463, 464, 3, 62, 31, 0, 464, 465, 5, 82, 0, 0, 465, 61, 1, 0, 0, 0, 466, 467, 3, 24, 12, 0, 467, 468, 5, 20, 0, 0, 468, 469, 3, 100, 50, 0, 469, 470, 5, 29, 0, 0, 470, 471, 3, 102, 51, 0, 471, 473, 3, 90, 45, 0, 472, 474, 5, 57, 0, 0, 473, 472, 1, 0, 0, 0, 473, 474, 1, 0, 0, 0, 474, 475, 1, 0, 0, 0, 475, 476, 5, 78, 0, 0, 476, 63, 1, 0, 0, 0, 477, 478, 5, 12, 0, 0, 478, 479, 3, 100, 50, 0, 479, 480, 5, 13, 0, 0, 480, 481, 3, 100, 50, 0, 481, 485, 5, 81, 0, 0, 482, 484, 3, 66, 33, 0, 483, 482, 1, 0, 0, 0, 484, 487, 1, 0, 0, 0, 485, 483, 1, 0, 0, 0, 485, 486, 1, 0, 0, 0, 486, 488, 1, 0, 0, 0, 487, 485, 1, 0, 0, 0, 488, 489, 5, 82, 0, 0, 489, 65, 1, 0, 0, 0, 490, 491, 5, 16, 0, 0, 491, 494, 3, 54, 27, 0, 492, 494, 3, 68, 34, 0, 493, 490, 1, 0, 0, 0, 493, 492, 1, 0, 0, 0, 494, 67, 1, 0, 0, 0, 495, 496, 5, 14, 0, 0, 496, 497, 3, 70, 35, 0, 497, 498, 5, 15, 0, 0, 498, 499, 3, 74, 37, 0, 499, 500, 5, 78, 0, 0, 500, 69, 1, 0, 0, 0, 501, 502, 3, 100, 50, 0, 502, 503, 5, 80, 0, 0, 503, 504, 3, 72, 36, 0, 504, 71, 1, 0, 0, 0, 505, 517, 3, 100, 50, 0, 506, 517, 5, 46, 0, 0, 507, 517, 5, 36, 0, 0, 508, 517, 5, 37, 0, 0, 509, 517, 5, 43, 0, 0, 510, 517, 5, 44, 0, 0, 511, 517, 5, 45, 0, 0, 512, 517, 5, 47, 0, 0, 513, 517, 5, 48, 0, 0, 514, 517, 5, 49, 0, 0, 515, 517, 5, 50, 0, 0, 516, 505, 1, 0, 0, 0, 516, 506, 1, 0, 0, 0, 516, 507, 1, 0, 0, 0, 516, 508, 1, 0, 0, 0, 516, 509, 1, 0, 0, 0, 516, 510, 1, 0, 0, 0, 516, 511, 1, 0, 0, 0, 516, 512, 1, 0, 0, 0, 516, 513, 1, 0, 0, 0, 516, 514, 1, 0, 0, 0, 516, 515, 1, 0, 0, 0, 517, 73, 1, 0, 0, 0, 518, 519, 5, 18, 0, 0, 519, 520, 3, 100, 50, 0, 520, 521, 5, 80, 0, 0, 521, 522, 3, 76, 38, 0, 522, 538, 1, 0, 0, 0, 523, 524, 5, 19, 0, 0, 524, 525, 3, 100, 50, 0, 525, 526, 5, 80, 0, 0, 526, 527, 3, 100, 50, 0, 527, 528, 5, 80, 0, 0, 528, 529, 3, 78, 39, 0, 529, 538, 1, 0, 0, 0, 530, 531, 5, 5, 0, 0, 531, 532, 3, 100, 50, 0, 532, 533, 5, 80, 0, 0, 533, 535, 3, 100, 50, 0, 534, 536, 3, 80, 40, 0, 535, 534, 1, 0, 0, 0, 535, 536, 1, 0, 0, 0, 536, 538, 1, 0, 0, 0, 537, 518, 1, 0, 0, 0, 537, 523, 1, 0, 0, 0, 537, 530, 1, 0, 0, 0, 538, 75, 1, 0, 0, 0, 539, 540, 7, 2, 0, 0, 540, 77, 1, 0, 0, 0, 541, 542, 7, 3, 0, 0, 542, 79, 1, 0, 0, 0, 543, 544, 5, 21, 0, 0, 544, 548, 5, 81, 0, 0, 545, 547, 3, 82, 41, 0, 546, 545, 1, 0, 0, 0, 547, 550, 1, 0, 0, 0, 548, 546, 1, 0, 0, 0, 548, 549, 1, 0, 0, 0, 549, 551, 1, 0, 0, 0, 550, 548, 1, 0, 0, 0, 551, 552, 5, 82, 0, 0, 552, 81, 1, 0, 0, 0, 553, 554, 3, 100, 50, 0, 554, 555, 5, 15, 0, 0, 555, 556, 5, 18, 0, 0, 556, 557, 3, 100, 50, 0, 557, 558, 5, 78, 0, 0, 558, 580, 1, 0, 0, 0, 559, 560, 3, 100, 50, 0, 560, 561, 5, 15, 0, 0, 561, 562, 5, 19, 0, 0, 562, 563, 3, 100, 50, 0, 563, 564, 5, 80, 0, 0, 564, 565, 3, 100, 50, 0, 565, 566, 5, 78, 0, 0, 566, 580, 1, 0, 0, 0, 567, 568, 3, 100, 50, 0, 568, 569, 5, 15, 0, 0, 569, 570, 5, 3, 0, 0, 570, 571, 3, 100, 50, 0, 571, 572, 5, 78, 0, 0, 572, 580, 1, 0, 0, 0, 573, 574, 3, 100, 50, 0, 574, 575, 5, 15, 0, 0, 575, 576, 5, 10, 0, 0, 576, 577, 3, 100, 50, 0, 577, 578, 5, 78, 0, 0, 578, 580, 1, 0, 0, 0, 579, 553, 1, 0, 0, 0, 579, 559, 1, 0, 0, 0, 579, 567, 1, 0, 0, 0, 579, 573, 1, 0, 0, 0, 580, 83, 1, 0, 0, 0, 581, 582, 5, 10, 0, 0, 582, 583, 3, 100, 50, 0, 583, 584, 5, 15, 0, 0, 584, 585, 3, 100, 50, 0, 585, 586, 5, 80, 0, 0, 586, 588, 3, 100, 50, 0, 587, 589, 3, 80, 40, 0, 588, 587, 1, 0, 0, 0, 588, 589, 1, 0, 0, 0, 589, 590, 1, 0, 0, 0, 590, 591, 5, 78, 0, 0, 591, 85, 1, 0, 0, 0, 592, 618, 3, 88, 44, 0, 593, 618, 5, 58, 0, 0, 594, 618, 5, 59, 0, 0, 595, 596, 5, 60, 0, 0, 596, 618, 3, 102, 51, 0, 597, 598, 5, 61, 0, 0, 598, 599, 5, 87, 0, 0, 599, 600, 3, 100, 50, 0, 600, 601, 5, 88, 0, 0, 601, 618, 1, 0, 0, 0, 602, 603, 5, 62, 0, 0, 603, 604, 5, 87, 0, 0, 604, 605, 3, 100, 50, 0, 605, 606, 5, 88, 0, 0, 606, 618, 1, 0, 0, 0, 607, 608, 5, 63, 0, 0, 608, 609, 5, 87, 0, 0, 609, 610, 3, 86, 43, 0, 610, 611, 5, 88, 0, 0, 611, 618, 1, 0, 0, 0, 612, 613, 5, 64, 0, 0, 613, 614, 5, 87, 0, 0, 614, 615, 3, 86, 43, 0, 615, 616, 5, 88, 0, 0, 616, 618, 1, 0, 0, 0, 617, 592, 1, 0, 0, 0, 617, 593, 1, 0, 0, 0, 617, 594, 1, 0, 0, 0, 617, 595, 1, 0, 0, 0, 617, 597, 1, 0, 0, 0, 617, 602, 1, 0, 0, 0, 617, 607, 1, 0, 0, 0, 617, 612, 1, 0, 0, 0, 618, 87, 1, 0, 0, 0, 619, 620, 7, 4, 0, 0, 620, 89, 1, 0, 0, 0, 621, 622, 7, 5, 0, 0, 622, 91, 1, 0, 0, 0, 623, 632, 3, 102, 51, 0, 624, 632, 5, 89, 0, 0, 625, 632, 5, 90, 0, 0, 626, 632, 5, 73, 0, 0, 627, 632, 5, 74, 0, 0, 628, 632, 5, 75, 0, 0, 629, 632, 3, 94, 47, 0, 630, 632, 3, 98, 49, 0, 631, 623, 1, 0, 0, 0, 631, 624, 1, 0, 0, 0, 631, 625, 1, 0, 0, 0, 631, 626, 1, 0, 0, 0, 631, 627, 1, 0, 0, 0, 631, 628, 1, 0, 0, 0, 631, 629, 1, 0, 0, 0, 631, 630, 1, 0, 0, 0, 632, 93, 1, 0, 0, 0, 633, 642, 5, 81, 0, 0, 634, 639, 3, 96, 48, 0, 635, 636, 5, 79, 0, 0, 636, 638, 3, 96, 48, 0, 637, 635, 1, 0, 0, 0, 638, 641, 1, 0, 0, 0, 639, 637, 1, 0, 0, 0, 639, 640, 1, 0, 0, 0, 640, 643, 1, 0, 0, 0, 641, 639, 1, 0, 0, 0, 642, 634, 1, 0, 0, 0, 642, 643, 1, 0, 0, 0, 643, 644, 1, 0, 0, 0, 644, 645, 5, 82, 0, 0, 645, 95, 1, 0, 0, 0, 646, 647, 3, 102, 51, 0, 647, 648, 5, 77, 0, 0, 648, 649, 3, 92, 46, 0, 649, 97, 1, 0, 0, 0, 650, 659, 5, 83, 0, 0, 651, 656, 3, 92, 46, 0, 652, 653, 5, 79, 0, 0, 653, 655, 3, 92, 46, 0, 654, 652, 1, 0, 0, 0, 655, 658, 1, 0, 0, 0, 656, 654, 1, 0, 0, 0, 656, 657, 1, 0, 0, 0, 657, 660, 1, 0, 0, 0, 658, 656, 1, 0, 0, 0, 659, 651, 1, 0, 0, 0, 659, 660, 1, 0, 0, 0, 660, 661, 1, 0, 0, 0, 661, 662, 5, 84, 0, 0, 662, 99, 1, 0, 0, 0, 663, 664, 7, 6, 0, 0, 664, 101, 1, 0, 0, 0, 665, 666, 5, 92, 0, 0, 666, 103, 1, 0, 0, 0, 41, 119, 130, 138, 153, 171, 198, 222, 232, 238, 267, 273, 286, 294, 307, 312, 325, 338, 353, 356, 363, 371, 411, 419, 431, 445, 455, 473, 485, 493, 516, 535, 537, 548, 579, 588, 617, 631, 639, 642, 656, 659] \ No newline at end of file diff --git a/src/capability-language/generated/QuixosCapability.tokens b/src/capability-language/generated/QuixosCapability.tokens new file mode 100644 index 0000000..ff0a567 --- /dev/null +++ b/src/capability-language/generated/QuixosCapability.tokens @@ -0,0 +1,183 @@ +WORKSPACE=1 +ATOM=2 +INTERFACE=3 +INTERFACES=4 +PACKAGE=5 +VALUE=6 +RELATION=7 +OPERATION=8 +FUNCTION=9 +CONSTRUCTOR=10 +CONSTRUCTS=11 +CONFORM=12 +AS=13 +BIND=14 +TO=15 +PRIVATE=16 +SHARED=17 +STATE=18 +EDGE=19 +PROJECTION=20 +WITH=21 +ON=22 +POLICY=23 +DEFAULT=24 +SOURCE=25 +REPOSITORY=26 +COMMIT=27 +REVISION=28 +ID=29 +DOC=30 +MODE=31 +EMITS=32 +RECEIVER=33 +REQUIRES=34 +ANY=35 +GET=36 +SET=37 +WATCH=38 +START=39 +STOP=40 +READ=41 +WRITE=42 +RESOLVE=43 +CONNECT=44 +DISCONNECT=45 +CALL=46 +WATCH_START=47 +WATCH_STOP=48 +SUBSCRIBE=49 +UNSUBSCRIBE=50 +OPTIMISTIC_REGISTER=51 +CRDT=52 +OPTIONAL_ONE=53 +EXACTLY_ONE=54 +MANY_UNIQUE=55 +MANY=56 +ORDERED=57 +UNIT=58 +WATCH_HANDLE=59 +MESSAGE=60 +ATOM_REF=61 +INTERFACE_REF=62 +OPTIONAL=63 +LIST=64 +BOOL=65 +BYTES=66 +DOUBLE=67 +INT32=68 +INT64=69 +STRING=70 +UINT32=71 +UINT64=72 +TRUE=73 +FALSE=74 +NULL=75 +ARROW=76 +COLON=77 +SEMI=78 +COMMA=79 +DOT=80 +LBRACE=81 +RBRACE=82 +LBRACK=83 +RBRACK=84 +LPAREN=85 +RPAREN=86 +LT=87 +GT=88 +INTEGER=89 +JSON_NUMBER=90 +IDENTIFIER=91 +STRING_LITERAL=92 +LINE_COMMENT=93 +BLOCK_COMMENT=94 +WS=95 +'workspace'=1 +'atom'=2 +'interface'=3 +'interfaces'=4 +'package'=5 +'value'=6 +'relation'=7 +'operation'=8 +'function'=9 +'constructor'=10 +'constructs'=11 +'conform'=12 +'as'=13 +'bind'=14 +'to'=15 +'private'=16 +'shared'=17 +'state'=18 +'edge'=19 +'projection'=20 +'with'=21 +'on'=22 +'policy'=23 +'default'=24 +'source'=25 +'repository'=26 +'commit'=27 +'revision'=28 +'id'=29 +'doc'=30 +'mode'=31 +'emits'=32 +'receiver'=33 +'requires'=34 +'any'=35 +'get'=36 +'set'=37 +'watch'=38 +'start'=39 +'stop'=40 +'read'=41 +'write'=42 +'resolve'=43 +'connect'=44 +'disconnect'=45 +'call'=46 +'watch-start'=47 +'watch-stop'=48 +'subscribe'=49 +'unsubscribe'=50 +'optimistic-register'=51 +'crdt'=52 +'optional-one'=53 +'exactly-one'=54 +'many-unique'=55 +'many'=56 +'ordered'=57 +'unit'=58 +'watch-handle'=59 +'message'=60 +'atom-ref'=61 +'interface-ref'=62 +'optional'=63 +'list'=64 +'bool'=65 +'bytes'=66 +'double'=67 +'int32'=68 +'int64'=69 +'string'=70 +'uint32'=71 +'uint64'=72 +'true'=73 +'false'=74 +'null'=75 +'->'=76 +':'=77 +';'=78 +','=79 +'.'=80 +'{'=81 +'}'=82 +'['=83 +']'=84 +'('=85 +')'=86 +'<'=87 +'>'=88 diff --git a/src/capability-language/generated/QuixosCapabilityLexer.interp b/src/capability-language/generated/QuixosCapabilityLexer.interp new file mode 100644 index 0000000..793fa25 --- /dev/null +++ b/src/capability-language/generated/QuixosCapabilityLexer.interp @@ -0,0 +1,304 @@ +token literal names: +null +'workspace' +'atom' +'interface' +'interfaces' +'package' +'value' +'relation' +'operation' +'function' +'constructor' +'constructs' +'conform' +'as' +'bind' +'to' +'private' +'shared' +'state' +'edge' +'projection' +'with' +'on' +'policy' +'default' +'source' +'repository' +'commit' +'revision' +'id' +'doc' +'mode' +'emits' +'receiver' +'requires' +'any' +'get' +'set' +'watch' +'start' +'stop' +'read' +'write' +'resolve' +'connect' +'disconnect' +'call' +'watch-start' +'watch-stop' +'subscribe' +'unsubscribe' +'optimistic-register' +'crdt' +'optional-one' +'exactly-one' +'many-unique' +'many' +'ordered' +'unit' +'watch-handle' +'message' +'atom-ref' +'interface-ref' +'optional' +'list' +'bool' +'bytes' +'double' +'int32' +'int64' +'string' +'uint32' +'uint64' +'true' +'false' +'null' +'->' +':' +';' +',' +'.' +'{' +'}' +'[' +']' +'(' +')' +'<' +'>' +null +null +null +null +null +null +null + +token symbolic names: +null +WORKSPACE +ATOM +INTERFACE +INTERFACES +PACKAGE +VALUE +RELATION +OPERATION +FUNCTION +CONSTRUCTOR +CONSTRUCTS +CONFORM +AS +BIND +TO +PRIVATE +SHARED +STATE +EDGE +PROJECTION +WITH +ON +POLICY +DEFAULT +SOURCE +REPOSITORY +COMMIT +REVISION +ID +DOC +MODE +EMITS +RECEIVER +REQUIRES +ANY +GET +SET +WATCH +START +STOP +READ +WRITE +RESOLVE +CONNECT +DISCONNECT +CALL +WATCH_START +WATCH_STOP +SUBSCRIBE +UNSUBSCRIBE +OPTIMISTIC_REGISTER +CRDT +OPTIONAL_ONE +EXACTLY_ONE +MANY_UNIQUE +MANY +ORDERED +UNIT +WATCH_HANDLE +MESSAGE +ATOM_REF +INTERFACE_REF +OPTIONAL +LIST +BOOL +BYTES +DOUBLE +INT32 +INT64 +STRING +UINT32 +UINT64 +TRUE +FALSE +NULL +ARROW +COLON +SEMI +COMMA +DOT +LBRACE +RBRACE +LBRACK +RBRACK +LPAREN +RPAREN +LT +GT +INTEGER +JSON_NUMBER +IDENTIFIER +STRING_LITERAL +LINE_COMMENT +BLOCK_COMMENT +WS + +rule names: +WORKSPACE +ATOM +INTERFACE +INTERFACES +PACKAGE +VALUE +RELATION +OPERATION +FUNCTION +CONSTRUCTOR +CONSTRUCTS +CONFORM +AS +BIND +TO +PRIVATE +SHARED +STATE +EDGE +PROJECTION +WITH +ON +POLICY +DEFAULT +SOURCE +REPOSITORY +COMMIT +REVISION +ID +DOC +MODE +EMITS +RECEIVER +REQUIRES +ANY +GET +SET +WATCH +START +STOP +READ +WRITE +RESOLVE +CONNECT +DISCONNECT +CALL +WATCH_START +WATCH_STOP +SUBSCRIBE +UNSUBSCRIBE +OPTIMISTIC_REGISTER +CRDT +OPTIONAL_ONE +EXACTLY_ONE +MANY_UNIQUE +MANY +ORDERED +UNIT +WATCH_HANDLE +MESSAGE +ATOM_REF +INTERFACE_REF +OPTIONAL +LIST +BOOL +BYTES +DOUBLE +INT32 +INT64 +STRING +UINT32 +UINT64 +TRUE +FALSE +NULL +ARROW +COLON +SEMI +COMMA +DOT +LBRACE +RBRACE +LBRACK +RBRACK +LPAREN +RPAREN +LT +GT +INTEGER +JSON_NUMBER +IDENTIFIER +STRING_LITERAL +ESC +HEX +LINE_COMMENT +BLOCK_COMMENT +WS + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[4, 0, 95, 895, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96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 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 77, 1, 77, 1, 78, 1, 78, 1, 79, 1, 79, 1, 80, 1, 80, 1, 81, 1, 81, 1, 82, 1, 82, 1, 83, 1, 83, 1, 84, 1, 84, 1, 85, 1, 85, 1, 86, 1, 86, 1, 87, 1, 87, 1, 88, 3, 88, 796, 8, 88, 1, 88, 4, 88, 799, 8, 88, 11, 88, 12, 88, 800, 1, 89, 3, 89, 804, 8, 89, 1, 89, 1, 89, 1, 89, 5, 89, 809, 8, 89, 10, 89, 12, 89, 812, 9, 89, 3, 89, 814, 8, 89, 1, 89, 1, 89, 4, 89, 818, 8, 89, 11, 89, 12, 89, 819, 3, 89, 822, 8, 89, 1, 89, 1, 89, 3, 89, 826, 8, 89, 1, 89, 4, 89, 829, 8, 89, 11, 89, 12, 89, 830, 3, 89, 833, 8, 89, 1, 90, 1, 90, 5, 90, 837, 8, 90, 10, 90, 12, 90, 840, 9, 90, 1, 91, 1, 91, 1, 91, 5, 91, 845, 8, 91, 10, 91, 12, 91, 848, 9, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 3, 92, 860, 8, 92, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 5, 94, 868, 8, 94, 10, 94, 12, 94, 871, 9, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 5, 95, 879, 8, 95, 10, 95, 12, 95, 882, 9, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 4, 96, 890, 8, 96, 11, 96, 12, 96, 891, 1, 96, 1, 96, 1, 880, 0, 97, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 169, 85, 171, 86, 173, 87, 175, 88, 177, 89, 179, 90, 181, 91, 183, 92, 185, 0, 187, 0, 189, 93, 191, 94, 193, 95, 1, 0, 11, 1, 0, 48, 57, 1, 0, 49, 57, 2, 0, 69, 69, 101, 101, 2, 0, 43, 43, 45, 45, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 8, 0, 34, 34, 47, 47, 92, 92, 98, 98, 102, 102, 110, 110, 114, 114, 116, 116, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 10, 10, 13, 13, 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, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 1, 195, 1, 0, 0, 0, 3, 205, 1, 0, 0, 0, 5, 210, 1, 0, 0, 0, 7, 220, 1, 0, 0, 0, 9, 231, 1, 0, 0, 0, 11, 239, 1, 0, 0, 0, 13, 245, 1, 0, 0, 0, 15, 254, 1, 0, 0, 0, 17, 264, 1, 0, 0, 0, 19, 273, 1, 0, 0, 0, 21, 285, 1, 0, 0, 0, 23, 296, 1, 0, 0, 0, 25, 304, 1, 0, 0, 0, 27, 307, 1, 0, 0, 0, 29, 312, 1, 0, 0, 0, 31, 315, 1, 0, 0, 0, 33, 323, 1, 0, 0, 0, 35, 330, 1, 0, 0, 0, 37, 336, 1, 0, 0, 0, 39, 341, 1, 0, 0, 0, 41, 352, 1, 0, 0, 0, 43, 357, 1, 0, 0, 0, 45, 360, 1, 0, 0, 0, 47, 367, 1, 0, 0, 0, 49, 375, 1, 0, 0, 0, 51, 382, 1, 0, 0, 0, 53, 393, 1, 0, 0, 0, 55, 400, 1, 0, 0, 0, 57, 409, 1, 0, 0, 0, 59, 412, 1, 0, 0, 0, 61, 416, 1, 0, 0, 0, 63, 421, 1, 0, 0, 0, 65, 427, 1, 0, 0, 0, 67, 436, 1, 0, 0, 0, 69, 445, 1, 0, 0, 0, 71, 449, 1, 0, 0, 0, 73, 453, 1, 0, 0, 0, 75, 457, 1, 0, 0, 0, 77, 463, 1, 0, 0, 0, 79, 469, 1, 0, 0, 0, 81, 474, 1, 0, 0, 0, 83, 479, 1, 0, 0, 0, 85, 485, 1, 0, 0, 0, 87, 493, 1, 0, 0, 0, 89, 501, 1, 0, 0, 0, 91, 512, 1, 0, 0, 0, 93, 517, 1, 0, 0, 0, 95, 529, 1, 0, 0, 0, 97, 540, 1, 0, 0, 0, 99, 550, 1, 0, 0, 0, 101, 562, 1, 0, 0, 0, 103, 582, 1, 0, 0, 0, 105, 587, 1, 0, 0, 0, 107, 600, 1, 0, 0, 0, 109, 612, 1, 0, 0, 0, 111, 624, 1, 0, 0, 0, 113, 629, 1, 0, 0, 0, 115, 637, 1, 0, 0, 0, 117, 642, 1, 0, 0, 0, 119, 655, 1, 0, 0, 0, 121, 663, 1, 0, 0, 0, 123, 672, 1, 0, 0, 0, 125, 686, 1, 0, 0, 0, 127, 695, 1, 0, 0, 0, 129, 700, 1, 0, 0, 0, 131, 705, 1, 0, 0, 0, 133, 711, 1, 0, 0, 0, 135, 718, 1, 0, 0, 0, 137, 724, 1, 0, 0, 0, 139, 730, 1, 0, 0, 0, 141, 737, 1, 0, 0, 0, 143, 744, 1, 0, 0, 0, 145, 751, 1, 0, 0, 0, 147, 756, 1, 0, 0, 0, 149, 762, 1, 0, 0, 0, 151, 767, 1, 0, 0, 0, 153, 770, 1, 0, 0, 0, 155, 772, 1, 0, 0, 0, 157, 774, 1, 0, 0, 0, 159, 776, 1, 0, 0, 0, 161, 778, 1, 0, 0, 0, 163, 780, 1, 0, 0, 0, 165, 782, 1, 0, 0, 0, 167, 784, 1, 0, 0, 0, 169, 786, 1, 0, 0, 0, 171, 788, 1, 0, 0, 0, 173, 790, 1, 0, 0, 0, 175, 792, 1, 0, 0, 0, 177, 795, 1, 0, 0, 0, 179, 803, 1, 0, 0, 0, 181, 834, 1, 0, 0, 0, 183, 841, 1, 0, 0, 0, 185, 851, 1, 0, 0, 0, 187, 861, 1, 0, 0, 0, 189, 863, 1, 0, 0, 0, 191, 874, 1, 0, 0, 0, 193, 889, 1, 0, 0, 0, 195, 196, 5, 119, 0, 0, 196, 197, 5, 111, 0, 0, 197, 198, 5, 114, 0, 0, 198, 199, 5, 107, 0, 0, 199, 200, 5, 115, 0, 0, 200, 201, 5, 112, 0, 0, 201, 202, 5, 97, 0, 0, 202, 203, 5, 99, 0, 0, 203, 204, 5, 101, 0, 0, 204, 2, 1, 0, 0, 0, 205, 206, 5, 97, 0, 0, 206, 207, 5, 116, 0, 0, 207, 208, 5, 111, 0, 0, 208, 209, 5, 109, 0, 0, 209, 4, 1, 0, 0, 0, 210, 211, 5, 105, 0, 0, 211, 212, 5, 110, 0, 0, 212, 213, 5, 116, 0, 0, 213, 214, 5, 101, 0, 0, 214, 215, 5, 114, 0, 0, 215, 216, 5, 102, 0, 0, 216, 217, 5, 97, 0, 0, 217, 218, 5, 99, 0, 0, 218, 219, 5, 101, 0, 0, 219, 6, 1, 0, 0, 0, 220, 221, 5, 105, 0, 0, 221, 222, 5, 110, 0, 0, 222, 223, 5, 116, 0, 0, 223, 224, 5, 101, 0, 0, 224, 225, 5, 114, 0, 0, 225, 226, 5, 102, 0, 0, 226, 227, 5, 97, 0, 0, 227, 228, 5, 99, 0, 0, 228, 229, 5, 101, 0, 0, 229, 230, 5, 115, 0, 0, 230, 8, 1, 0, 0, 0, 231, 232, 5, 112, 0, 0, 232, 233, 5, 97, 0, 0, 233, 234, 5, 99, 0, 0, 234, 235, 5, 107, 0, 0, 235, 236, 5, 97, 0, 0, 236, 237, 5, 103, 0, 0, 237, 238, 5, 101, 0, 0, 238, 10, 1, 0, 0, 0, 239, 240, 5, 118, 0, 0, 240, 241, 5, 97, 0, 0, 241, 242, 5, 108, 0, 0, 242, 243, 5, 117, 0, 0, 243, 244, 5, 101, 0, 0, 244, 12, 1, 0, 0, 0, 245, 246, 5, 114, 0, 0, 246, 247, 5, 101, 0, 0, 247, 248, 5, 108, 0, 0, 248, 249, 5, 97, 0, 0, 249, 250, 5, 116, 0, 0, 250, 251, 5, 105, 0, 0, 251, 252, 5, 111, 0, 0, 252, 253, 5, 110, 0, 0, 253, 14, 1, 0, 0, 0, 254, 255, 5, 111, 0, 0, 255, 256, 5, 112, 0, 0, 256, 257, 5, 101, 0, 0, 257, 258, 5, 114, 0, 0, 258, 259, 5, 97, 0, 0, 259, 260, 5, 116, 0, 0, 260, 261, 5, 105, 0, 0, 261, 262, 5, 111, 0, 0, 262, 263, 5, 110, 0, 0, 263, 16, 1, 0, 0, 0, 264, 265, 5, 102, 0, 0, 265, 266, 5, 117, 0, 0, 266, 267, 5, 110, 0, 0, 267, 268, 5, 99, 0, 0, 268, 269, 5, 116, 0, 0, 269, 270, 5, 105, 0, 0, 270, 271, 5, 111, 0, 0, 271, 272, 5, 110, 0, 0, 272, 18, 1, 0, 0, 0, 273, 274, 5, 99, 0, 0, 274, 275, 5, 111, 0, 0, 275, 276, 5, 110, 0, 0, 276, 277, 5, 115, 0, 0, 277, 278, 5, 116, 0, 0, 278, 279, 5, 114, 0, 0, 279, 280, 5, 117, 0, 0, 280, 281, 5, 99, 0, 0, 281, 282, 5, 116, 0, 0, 282, 283, 5, 111, 0, 0, 283, 284, 5, 114, 0, 0, 284, 20, 1, 0, 0, 0, 285, 286, 5, 99, 0, 0, 286, 287, 5, 111, 0, 0, 287, 288, 5, 110, 0, 0, 288, 289, 5, 115, 0, 0, 289, 290, 5, 116, 0, 0, 290, 291, 5, 114, 0, 0, 291, 292, 5, 117, 0, 0, 292, 293, 5, 99, 0, 0, 293, 294, 5, 116, 0, 0, 294, 295, 5, 115, 0, 0, 295, 22, 1, 0, 0, 0, 296, 297, 5, 99, 0, 0, 297, 298, 5, 111, 0, 0, 298, 299, 5, 110, 0, 0, 299, 300, 5, 102, 0, 0, 300, 301, 5, 111, 0, 0, 301, 302, 5, 114, 0, 0, 302, 303, 5, 109, 0, 0, 303, 24, 1, 0, 0, 0, 304, 305, 5, 97, 0, 0, 305, 306, 5, 115, 0, 0, 306, 26, 1, 0, 0, 0, 307, 308, 5, 98, 0, 0, 308, 309, 5, 105, 0, 0, 309, 310, 5, 110, 0, 0, 310, 311, 5, 100, 0, 0, 311, 28, 1, 0, 0, 0, 312, 313, 5, 116, 0, 0, 313, 314, 5, 111, 0, 0, 314, 30, 1, 0, 0, 0, 315, 316, 5, 112, 0, 0, 316, 317, 5, 114, 0, 0, 317, 318, 5, 105, 0, 0, 318, 319, 5, 118, 0, 0, 319, 320, 5, 97, 0, 0, 320, 321, 5, 116, 0, 0, 321, 322, 5, 101, 0, 0, 322, 32, 1, 0, 0, 0, 323, 324, 5, 115, 0, 0, 324, 325, 5, 104, 0, 0, 325, 326, 5, 97, 0, 0, 326, 327, 5, 114, 0, 0, 327, 328, 5, 101, 0, 0, 328, 329, 5, 100, 0, 0, 329, 34, 1, 0, 0, 0, 330, 331, 5, 115, 0, 0, 331, 332, 5, 116, 0, 0, 332, 333, 5, 97, 0, 0, 333, 334, 5, 116, 0, 0, 334, 335, 5, 101, 0, 0, 335, 36, 1, 0, 0, 0, 336, 337, 5, 101, 0, 0, 337, 338, 5, 100, 0, 0, 338, 339, 5, 103, 0, 0, 339, 340, 5, 101, 0, 0, 340, 38, 1, 0, 0, 0, 341, 342, 5, 112, 0, 0, 342, 343, 5, 114, 0, 0, 343, 344, 5, 111, 0, 0, 344, 345, 5, 106, 0, 0, 345, 346, 5, 101, 0, 0, 346, 347, 5, 99, 0, 0, 347, 348, 5, 116, 0, 0, 348, 349, 5, 105, 0, 0, 349, 350, 5, 111, 0, 0, 350, 351, 5, 110, 0, 0, 351, 40, 1, 0, 0, 0, 352, 353, 5, 119, 0, 0, 353, 354, 5, 105, 0, 0, 354, 355, 5, 116, 0, 0, 355, 356, 5, 104, 0, 0, 356, 42, 1, 0, 0, 0, 357, 358, 5, 111, 0, 0, 358, 359, 5, 110, 0, 0, 359, 44, 1, 0, 0, 0, 360, 361, 5, 112, 0, 0, 361, 362, 5, 111, 0, 0, 362, 363, 5, 108, 0, 0, 363, 364, 5, 105, 0, 0, 364, 365, 5, 99, 0, 0, 365, 366, 5, 121, 0, 0, 366, 46, 1, 0, 0, 0, 367, 368, 5, 100, 0, 0, 368, 369, 5, 101, 0, 0, 369, 370, 5, 102, 0, 0, 370, 371, 5, 97, 0, 0, 371, 372, 5, 117, 0, 0, 372, 373, 5, 108, 0, 0, 373, 374, 5, 116, 0, 0, 374, 48, 1, 0, 0, 0, 375, 376, 5, 115, 0, 0, 376, 377, 5, 111, 0, 0, 377, 378, 5, 117, 0, 0, 378, 379, 5, 114, 0, 0, 379, 380, 5, 99, 0, 0, 380, 381, 5, 101, 0, 0, 381, 50, 1, 0, 0, 0, 382, 383, 5, 114, 0, 0, 383, 384, 5, 101, 0, 0, 384, 385, 5, 112, 0, 0, 385, 386, 5, 111, 0, 0, 386, 387, 5, 115, 0, 0, 387, 388, 5, 105, 0, 0, 388, 389, 5, 116, 0, 0, 389, 390, 5, 111, 0, 0, 390, 391, 5, 114, 0, 0, 391, 392, 5, 121, 0, 0, 392, 52, 1, 0, 0, 0, 393, 394, 5, 99, 0, 0, 394, 395, 5, 111, 0, 0, 395, 396, 5, 109, 0, 0, 396, 397, 5, 109, 0, 0, 397, 398, 5, 105, 0, 0, 398, 399, 5, 116, 0, 0, 399, 54, 1, 0, 0, 0, 400, 401, 5, 114, 0, 0, 401, 402, 5, 101, 0, 0, 402, 403, 5, 118, 0, 0, 403, 404, 5, 105, 0, 0, 404, 405, 5, 115, 0, 0, 405, 406, 5, 105, 0, 0, 406, 407, 5, 111, 0, 0, 407, 408, 5, 110, 0, 0, 408, 56, 1, 0, 0, 0, 409, 410, 5, 105, 0, 0, 410, 411, 5, 100, 0, 0, 411, 58, 1, 0, 0, 0, 412, 413, 5, 100, 0, 0, 413, 414, 5, 111, 0, 0, 414, 415, 5, 99, 0, 0, 415, 60, 1, 0, 0, 0, 416, 417, 5, 109, 0, 0, 417, 418, 5, 111, 0, 0, 418, 419, 5, 100, 0, 0, 419, 420, 5, 101, 0, 0, 420, 62, 1, 0, 0, 0, 421, 422, 5, 101, 0, 0, 422, 423, 5, 109, 0, 0, 423, 424, 5, 105, 0, 0, 424, 425, 5, 116, 0, 0, 425, 426, 5, 115, 0, 0, 426, 64, 1, 0, 0, 0, 427, 428, 5, 114, 0, 0, 428, 429, 5, 101, 0, 0, 429, 430, 5, 99, 0, 0, 430, 431, 5, 101, 0, 0, 431, 432, 5, 105, 0, 0, 432, 433, 5, 118, 0, 0, 433, 434, 5, 101, 0, 0, 434, 435, 5, 114, 0, 0, 435, 66, 1, 0, 0, 0, 436, 437, 5, 114, 0, 0, 437, 438, 5, 101, 0, 0, 438, 439, 5, 113, 0, 0, 439, 440, 5, 117, 0, 0, 440, 441, 5, 105, 0, 0, 441, 442, 5, 114, 0, 0, 442, 443, 5, 101, 0, 0, 443, 444, 5, 115, 0, 0, 444, 68, 1, 0, 0, 0, 445, 446, 5, 97, 0, 0, 446, 447, 5, 110, 0, 0, 447, 448, 5, 121, 0, 0, 448, 70, 1, 0, 0, 0, 449, 450, 5, 103, 0, 0, 450, 451, 5, 101, 0, 0, 451, 452, 5, 116, 0, 0, 452, 72, 1, 0, 0, 0, 453, 454, 5, 115, 0, 0, 454, 455, 5, 101, 0, 0, 455, 456, 5, 116, 0, 0, 456, 74, 1, 0, 0, 0, 457, 458, 5, 119, 0, 0, 458, 459, 5, 97, 0, 0, 459, 460, 5, 116, 0, 0, 460, 461, 5, 99, 0, 0, 461, 462, 5, 104, 0, 0, 462, 76, 1, 0, 0, 0, 463, 464, 5, 115, 0, 0, 464, 465, 5, 116, 0, 0, 465, 466, 5, 97, 0, 0, 466, 467, 5, 114, 0, 0, 467, 468, 5, 116, 0, 0, 468, 78, 1, 0, 0, 0, 469, 470, 5, 115, 0, 0, 470, 471, 5, 116, 0, 0, 471, 472, 5, 111, 0, 0, 472, 473, 5, 112, 0, 0, 473, 80, 1, 0, 0, 0, 474, 475, 5, 114, 0, 0, 475, 476, 5, 101, 0, 0, 476, 477, 5, 97, 0, 0, 477, 478, 5, 100, 0, 0, 478, 82, 1, 0, 0, 0, 479, 480, 5, 119, 0, 0, 480, 481, 5, 114, 0, 0, 481, 482, 5, 105, 0, 0, 482, 483, 5, 116, 0, 0, 483, 484, 5, 101, 0, 0, 484, 84, 1, 0, 0, 0, 485, 486, 5, 114, 0, 0, 486, 487, 5, 101, 0, 0, 487, 488, 5, 115, 0, 0, 488, 489, 5, 111, 0, 0, 489, 490, 5, 108, 0, 0, 490, 491, 5, 118, 0, 0, 491, 492, 5, 101, 0, 0, 492, 86, 1, 0, 0, 0, 493, 494, 5, 99, 0, 0, 494, 495, 5, 111, 0, 0, 495, 496, 5, 110, 0, 0, 496, 497, 5, 110, 0, 0, 497, 498, 5, 101, 0, 0, 498, 499, 5, 99, 0, 0, 499, 500, 5, 116, 0, 0, 500, 88, 1, 0, 0, 0, 501, 502, 5, 100, 0, 0, 502, 503, 5, 105, 0, 0, 503, 504, 5, 115, 0, 0, 504, 505, 5, 99, 0, 0, 505, 506, 5, 111, 0, 0, 506, 507, 5, 110, 0, 0, 507, 508, 5, 110, 0, 0, 508, 509, 5, 101, 0, 0, 509, 510, 5, 99, 0, 0, 510, 511, 5, 116, 0, 0, 511, 90, 1, 0, 0, 0, 512, 513, 5, 99, 0, 0, 513, 514, 5, 97, 0, 0, 514, 515, 5, 108, 0, 0, 515, 516, 5, 108, 0, 0, 516, 92, 1, 0, 0, 0, 517, 518, 5, 119, 0, 0, 518, 519, 5, 97, 0, 0, 519, 520, 5, 116, 0, 0, 520, 521, 5, 99, 0, 0, 521, 522, 5, 104, 0, 0, 522, 523, 5, 45, 0, 0, 523, 524, 5, 115, 0, 0, 524, 525, 5, 116, 0, 0, 525, 526, 5, 97, 0, 0, 526, 527, 5, 114, 0, 0, 527, 528, 5, 116, 0, 0, 528, 94, 1, 0, 0, 0, 529, 530, 5, 119, 0, 0, 530, 531, 5, 97, 0, 0, 531, 532, 5, 116, 0, 0, 532, 533, 5, 99, 0, 0, 533, 534, 5, 104, 0, 0, 534, 535, 5, 45, 0, 0, 535, 536, 5, 115, 0, 0, 536, 537, 5, 116, 0, 0, 537, 538, 5, 111, 0, 0, 538, 539, 5, 112, 0, 0, 539, 96, 1, 0, 0, 0, 540, 541, 5, 115, 0, 0, 541, 542, 5, 117, 0, 0, 542, 543, 5, 98, 0, 0, 543, 544, 5, 115, 0, 0, 544, 545, 5, 99, 0, 0, 545, 546, 5, 114, 0, 0, 546, 547, 5, 105, 0, 0, 547, 548, 5, 98, 0, 0, 548, 549, 5, 101, 0, 0, 549, 98, 1, 0, 0, 0, 550, 551, 5, 117, 0, 0, 551, 552, 5, 110, 0, 0, 552, 553, 5, 115, 0, 0, 553, 554, 5, 117, 0, 0, 554, 555, 5, 98, 0, 0, 555, 556, 5, 115, 0, 0, 556, 557, 5, 99, 0, 0, 557, 558, 5, 114, 0, 0, 558, 559, 5, 105, 0, 0, 559, 560, 5, 98, 0, 0, 560, 561, 5, 101, 0, 0, 561, 100, 1, 0, 0, 0, 562, 563, 5, 111, 0, 0, 563, 564, 5, 112, 0, 0, 564, 565, 5, 116, 0, 0, 565, 566, 5, 105, 0, 0, 566, 567, 5, 109, 0, 0, 567, 568, 5, 105, 0, 0, 568, 569, 5, 115, 0, 0, 569, 570, 5, 116, 0, 0, 570, 571, 5, 105, 0, 0, 571, 572, 5, 99, 0, 0, 572, 573, 5, 45, 0, 0, 573, 574, 5, 114, 0, 0, 574, 575, 5, 101, 0, 0, 575, 576, 5, 103, 0, 0, 576, 577, 5, 105, 0, 0, 577, 578, 5, 115, 0, 0, 578, 579, 5, 116, 0, 0, 579, 580, 5, 101, 0, 0, 580, 581, 5, 114, 0, 0, 581, 102, 1, 0, 0, 0, 582, 583, 5, 99, 0, 0, 583, 584, 5, 114, 0, 0, 584, 585, 5, 100, 0, 0, 585, 586, 5, 116, 0, 0, 586, 104, 1, 0, 0, 0, 587, 588, 5, 111, 0, 0, 588, 589, 5, 112, 0, 0, 589, 590, 5, 116, 0, 0, 590, 591, 5, 105, 0, 0, 591, 592, 5, 111, 0, 0, 592, 593, 5, 110, 0, 0, 593, 594, 5, 97, 0, 0, 594, 595, 5, 108, 0, 0, 595, 596, 5, 45, 0, 0, 596, 597, 5, 111, 0, 0, 597, 598, 5, 110, 0, 0, 598, 599, 5, 101, 0, 0, 599, 106, 1, 0, 0, 0, 600, 601, 5, 101, 0, 0, 601, 602, 5, 120, 0, 0, 602, 603, 5, 97, 0, 0, 603, 604, 5, 99, 0, 0, 604, 605, 5, 116, 0, 0, 605, 606, 5, 108, 0, 0, 606, 607, 5, 121, 0, 0, 607, 608, 5, 45, 0, 0, 608, 609, 5, 111, 0, 0, 609, 610, 5, 110, 0, 0, 610, 611, 5, 101, 0, 0, 611, 108, 1, 0, 0, 0, 612, 613, 5, 109, 0, 0, 613, 614, 5, 97, 0, 0, 614, 615, 5, 110, 0, 0, 615, 616, 5, 121, 0, 0, 616, 617, 5, 45, 0, 0, 617, 618, 5, 117, 0, 0, 618, 619, 5, 110, 0, 0, 619, 620, 5, 105, 0, 0, 620, 621, 5, 113, 0, 0, 621, 622, 5, 117, 0, 0, 622, 623, 5, 101, 0, 0, 623, 110, 1, 0, 0, 0, 624, 625, 5, 109, 0, 0, 625, 626, 5, 97, 0, 0, 626, 627, 5, 110, 0, 0, 627, 628, 5, 121, 0, 0, 628, 112, 1, 0, 0, 0, 629, 630, 5, 111, 0, 0, 630, 631, 5, 114, 0, 0, 631, 632, 5, 100, 0, 0, 632, 633, 5, 101, 0, 0, 633, 634, 5, 114, 0, 0, 634, 635, 5, 101, 0, 0, 635, 636, 5, 100, 0, 0, 636, 114, 1, 0, 0, 0, 637, 638, 5, 117, 0, 0, 638, 639, 5, 110, 0, 0, 639, 640, 5, 105, 0, 0, 640, 641, 5, 116, 0, 0, 641, 116, 1, 0, 0, 0, 642, 643, 5, 119, 0, 0, 643, 644, 5, 97, 0, 0, 644, 645, 5, 116, 0, 0, 645, 646, 5, 99, 0, 0, 646, 647, 5, 104, 0, 0, 647, 648, 5, 45, 0, 0, 648, 649, 5, 104, 0, 0, 649, 650, 5, 97, 0, 0, 650, 651, 5, 110, 0, 0, 651, 652, 5, 100, 0, 0, 652, 653, 5, 108, 0, 0, 653, 654, 5, 101, 0, 0, 654, 118, 1, 0, 0, 0, 655, 656, 5, 109, 0, 0, 656, 657, 5, 101, 0, 0, 657, 658, 5, 115, 0, 0, 658, 659, 5, 115, 0, 0, 659, 660, 5, 97, 0, 0, 660, 661, 5, 103, 0, 0, 661, 662, 5, 101, 0, 0, 662, 120, 1, 0, 0, 0, 663, 664, 5, 97, 0, 0, 664, 665, 5, 116, 0, 0, 665, 666, 5, 111, 0, 0, 666, 667, 5, 109, 0, 0, 667, 668, 5, 45, 0, 0, 668, 669, 5, 114, 0, 0, 669, 670, 5, 101, 0, 0, 670, 671, 5, 102, 0, 0, 671, 122, 1, 0, 0, 0, 672, 673, 5, 105, 0, 0, 673, 674, 5, 110, 0, 0, 674, 675, 5, 116, 0, 0, 675, 676, 5, 101, 0, 0, 676, 677, 5, 114, 0, 0, 677, 678, 5, 102, 0, 0, 678, 679, 5, 97, 0, 0, 679, 680, 5, 99, 0, 0, 680, 681, 5, 101, 0, 0, 681, 682, 5, 45, 0, 0, 682, 683, 5, 114, 0, 0, 683, 684, 5, 101, 0, 0, 684, 685, 5, 102, 0, 0, 685, 124, 1, 0, 0, 0, 686, 687, 5, 111, 0, 0, 687, 688, 5, 112, 0, 0, 688, 689, 5, 116, 0, 0, 689, 690, 5, 105, 0, 0, 690, 691, 5, 111, 0, 0, 691, 692, 5, 110, 0, 0, 692, 693, 5, 97, 0, 0, 693, 694, 5, 108, 0, 0, 694, 126, 1, 0, 0, 0, 695, 696, 5, 108, 0, 0, 696, 697, 5, 105, 0, 0, 697, 698, 5, 115, 0, 0, 698, 699, 5, 116, 0, 0, 699, 128, 1, 0, 0, 0, 700, 701, 5, 98, 0, 0, 701, 702, 5, 111, 0, 0, 702, 703, 5, 111, 0, 0, 703, 704, 5, 108, 0, 0, 704, 130, 1, 0, 0, 0, 705, 706, 5, 98, 0, 0, 706, 707, 5, 121, 0, 0, 707, 708, 5, 116, 0, 0, 708, 709, 5, 101, 0, 0, 709, 710, 5, 115, 0, 0, 710, 132, 1, 0, 0, 0, 711, 712, 5, 100, 0, 0, 712, 713, 5, 111, 0, 0, 713, 714, 5, 117, 0, 0, 714, 715, 5, 98, 0, 0, 715, 716, 5, 108, 0, 0, 716, 717, 5, 101, 0, 0, 717, 134, 1, 0, 0, 0, 718, 719, 5, 105, 0, 0, 719, 720, 5, 110, 0, 0, 720, 721, 5, 116, 0, 0, 721, 722, 5, 51, 0, 0, 722, 723, 5, 50, 0, 0, 723, 136, 1, 0, 0, 0, 724, 725, 5, 105, 0, 0, 725, 726, 5, 110, 0, 0, 726, 727, 5, 116, 0, 0, 727, 728, 5, 54, 0, 0, 728, 729, 5, 52, 0, 0, 729, 138, 1, 0, 0, 0, 730, 731, 5, 115, 0, 0, 731, 732, 5, 116, 0, 0, 732, 733, 5, 114, 0, 0, 733, 734, 5, 105, 0, 0, 734, 735, 5, 110, 0, 0, 735, 736, 5, 103, 0, 0, 736, 140, 1, 0, 0, 0, 737, 738, 5, 117, 0, 0, 738, 739, 5, 105, 0, 0, 739, 740, 5, 110, 0, 0, 740, 741, 5, 116, 0, 0, 741, 742, 5, 51, 0, 0, 742, 743, 5, 50, 0, 0, 743, 142, 1, 0, 0, 0, 744, 745, 5, 117, 0, 0, 745, 746, 5, 105, 0, 0, 746, 747, 5, 110, 0, 0, 747, 748, 5, 116, 0, 0, 748, 749, 5, 54, 0, 0, 749, 750, 5, 52, 0, 0, 750, 144, 1, 0, 0, 0, 751, 752, 5, 116, 0, 0, 752, 753, 5, 114, 0, 0, 753, 754, 5, 117, 0, 0, 754, 755, 5, 101, 0, 0, 755, 146, 1, 0, 0, 0, 756, 757, 5, 102, 0, 0, 757, 758, 5, 97, 0, 0, 758, 759, 5, 108, 0, 0, 759, 760, 5, 115, 0, 0, 760, 761, 5, 101, 0, 0, 761, 148, 1, 0, 0, 0, 762, 763, 5, 110, 0, 0, 763, 764, 5, 117, 0, 0, 764, 765, 5, 108, 0, 0, 765, 766, 5, 108, 0, 0, 766, 150, 1, 0, 0, 0, 767, 768, 5, 45, 0, 0, 768, 769, 5, 62, 0, 0, 769, 152, 1, 0, 0, 0, 770, 771, 5, 58, 0, 0, 771, 154, 1, 0, 0, 0, 772, 773, 5, 59, 0, 0, 773, 156, 1, 0, 0, 0, 774, 775, 5, 44, 0, 0, 775, 158, 1, 0, 0, 0, 776, 777, 5, 46, 0, 0, 777, 160, 1, 0, 0, 0, 778, 779, 5, 123, 0, 0, 779, 162, 1, 0, 0, 0, 780, 781, 5, 125, 0, 0, 781, 164, 1, 0, 0, 0, 782, 783, 5, 91, 0, 0, 783, 166, 1, 0, 0, 0, 784, 785, 5, 93, 0, 0, 785, 168, 1, 0, 0, 0, 786, 787, 5, 40, 0, 0, 787, 170, 1, 0, 0, 0, 788, 789, 5, 41, 0, 0, 789, 172, 1, 0, 0, 0, 790, 791, 5, 60, 0, 0, 791, 174, 1, 0, 0, 0, 792, 793, 5, 62, 0, 0, 793, 176, 1, 0, 0, 0, 794, 796, 5, 45, 0, 0, 795, 794, 1, 0, 0, 0, 795, 796, 1, 0, 0, 0, 796, 798, 1, 0, 0, 0, 797, 799, 7, 0, 0, 0, 798, 797, 1, 0, 0, 0, 799, 800, 1, 0, 0, 0, 800, 798, 1, 0, 0, 0, 800, 801, 1, 0, 0, 0, 801, 178, 1, 0, 0, 0, 802, 804, 5, 45, 0, 0, 803, 802, 1, 0, 0, 0, 803, 804, 1, 0, 0, 0, 804, 813, 1, 0, 0, 0, 805, 814, 5, 48, 0, 0, 806, 810, 7, 1, 0, 0, 807, 809, 7, 0, 0, 0, 808, 807, 1, 0, 0, 0, 809, 812, 1, 0, 0, 0, 810, 808, 1, 0, 0, 0, 810, 811, 1, 0, 0, 0, 811, 814, 1, 0, 0, 0, 812, 810, 1, 0, 0, 0, 813, 805, 1, 0, 0, 0, 813, 806, 1, 0, 0, 0, 814, 821, 1, 0, 0, 0, 815, 817, 5, 46, 0, 0, 816, 818, 7, 0, 0, 0, 817, 816, 1, 0, 0, 0, 818, 819, 1, 0, 0, 0, 819, 817, 1, 0, 0, 0, 819, 820, 1, 0, 0, 0, 820, 822, 1, 0, 0, 0, 821, 815, 1, 0, 0, 0, 821, 822, 1, 0, 0, 0, 822, 832, 1, 0, 0, 0, 823, 825, 7, 2, 0, 0, 824, 826, 7, 3, 0, 0, 825, 824, 1, 0, 0, 0, 825, 826, 1, 0, 0, 0, 826, 828, 1, 0, 0, 0, 827, 829, 7, 0, 0, 0, 828, 827, 1, 0, 0, 0, 829, 830, 1, 0, 0, 0, 830, 828, 1, 0, 0, 0, 830, 831, 1, 0, 0, 0, 831, 833, 1, 0, 0, 0, 832, 823, 1, 0, 0, 0, 832, 833, 1, 0, 0, 0, 833, 180, 1, 0, 0, 0, 834, 838, 7, 4, 0, 0, 835, 837, 7, 5, 0, 0, 836, 835, 1, 0, 0, 0, 837, 840, 1, 0, 0, 0, 838, 836, 1, 0, 0, 0, 838, 839, 1, 0, 0, 0, 839, 182, 1, 0, 0, 0, 840, 838, 1, 0, 0, 0, 841, 846, 5, 34, 0, 0, 842, 845, 3, 185, 92, 0, 843, 845, 8, 6, 0, 0, 844, 842, 1, 0, 0, 0, 844, 843, 1, 0, 0, 0, 845, 848, 1, 0, 0, 0, 846, 844, 1, 0, 0, 0, 846, 847, 1, 0, 0, 0, 847, 849, 1, 0, 0, 0, 848, 846, 1, 0, 0, 0, 849, 850, 5, 34, 0, 0, 850, 184, 1, 0, 0, 0, 851, 859, 5, 92, 0, 0, 852, 860, 7, 7, 0, 0, 853, 854, 5, 117, 0, 0, 854, 855, 3, 187, 93, 0, 855, 856, 3, 187, 93, 0, 856, 857, 3, 187, 93, 0, 857, 858, 3, 187, 93, 0, 858, 860, 1, 0, 0, 0, 859, 852, 1, 0, 0, 0, 859, 853, 1, 0, 0, 0, 860, 186, 1, 0, 0, 0, 861, 862, 7, 8, 0, 0, 862, 188, 1, 0, 0, 0, 863, 864, 5, 47, 0, 0, 864, 865, 5, 47, 0, 0, 865, 869, 1, 0, 0, 0, 866, 868, 8, 9, 0, 0, 867, 866, 1, 0, 0, 0, 868, 871, 1, 0, 0, 0, 869, 867, 1, 0, 0, 0, 869, 870, 1, 0, 0, 0, 870, 872, 1, 0, 0, 0, 871, 869, 1, 0, 0, 0, 872, 873, 6, 94, 0, 0, 873, 190, 1, 0, 0, 0, 874, 875, 5, 47, 0, 0, 875, 876, 5, 42, 0, 0, 876, 880, 1, 0, 0, 0, 877, 879, 9, 0, 0, 0, 878, 877, 1, 0, 0, 0, 879, 882, 1, 0, 0, 0, 880, 881, 1, 0, 0, 0, 880, 878, 1, 0, 0, 0, 881, 883, 1, 0, 0, 0, 882, 880, 1, 0, 0, 0, 883, 884, 5, 42, 0, 0, 884, 885, 5, 47, 0, 0, 885, 886, 1, 0, 0, 0, 886, 887, 6, 95, 0, 0, 887, 192, 1, 0, 0, 0, 888, 890, 7, 10, 0, 0, 889, 888, 1, 0, 0, 0, 890, 891, 1, 0, 0, 0, 891, 889, 1, 0, 0, 0, 891, 892, 1, 0, 0, 0, 892, 893, 1, 0, 0, 0, 893, 894, 6, 96, 0, 0, 894, 194, 1, 0, 0, 0, 18, 0, 795, 800, 803, 810, 813, 819, 821, 825, 830, 832, 838, 844, 846, 859, 869, 880, 891, 1, 6, 0, 0] \ No newline at end of file diff --git a/src/capability-language/generated/QuixosCapabilityLexer.tokens b/src/capability-language/generated/QuixosCapabilityLexer.tokens new file mode 100644 index 0000000..ff0a567 --- /dev/null +++ b/src/capability-language/generated/QuixosCapabilityLexer.tokens @@ -0,0 +1,183 @@ +WORKSPACE=1 +ATOM=2 +INTERFACE=3 +INTERFACES=4 +PACKAGE=5 +VALUE=6 +RELATION=7 +OPERATION=8 +FUNCTION=9 +CONSTRUCTOR=10 +CONSTRUCTS=11 +CONFORM=12 +AS=13 +BIND=14 +TO=15 +PRIVATE=16 +SHARED=17 +STATE=18 +EDGE=19 +PROJECTION=20 +WITH=21 +ON=22 +POLICY=23 +DEFAULT=24 +SOURCE=25 +REPOSITORY=26 +COMMIT=27 +REVISION=28 +ID=29 +DOC=30 +MODE=31 +EMITS=32 +RECEIVER=33 +REQUIRES=34 +ANY=35 +GET=36 +SET=37 +WATCH=38 +START=39 +STOP=40 +READ=41 +WRITE=42 +RESOLVE=43 +CONNECT=44 +DISCONNECT=45 +CALL=46 +WATCH_START=47 +WATCH_STOP=48 +SUBSCRIBE=49 +UNSUBSCRIBE=50 +OPTIMISTIC_REGISTER=51 +CRDT=52 +OPTIONAL_ONE=53 +EXACTLY_ONE=54 +MANY_UNIQUE=55 +MANY=56 +ORDERED=57 +UNIT=58 +WATCH_HANDLE=59 +MESSAGE=60 +ATOM_REF=61 +INTERFACE_REF=62 +OPTIONAL=63 +LIST=64 +BOOL=65 +BYTES=66 +DOUBLE=67 +INT32=68 +INT64=69 +STRING=70 +UINT32=71 +UINT64=72 +TRUE=73 +FALSE=74 +NULL=75 +ARROW=76 +COLON=77 +SEMI=78 +COMMA=79 +DOT=80 +LBRACE=81 +RBRACE=82 +LBRACK=83 +RBRACK=84 +LPAREN=85 +RPAREN=86 +LT=87 +GT=88 +INTEGER=89 +JSON_NUMBER=90 +IDENTIFIER=91 +STRING_LITERAL=92 +LINE_COMMENT=93 +BLOCK_COMMENT=94 +WS=95 +'workspace'=1 +'atom'=2 +'interface'=3 +'interfaces'=4 +'package'=5 +'value'=6 +'relation'=7 +'operation'=8 +'function'=9 +'constructor'=10 +'constructs'=11 +'conform'=12 +'as'=13 +'bind'=14 +'to'=15 +'private'=16 +'shared'=17 +'state'=18 +'edge'=19 +'projection'=20 +'with'=21 +'on'=22 +'policy'=23 +'default'=24 +'source'=25 +'repository'=26 +'commit'=27 +'revision'=28 +'id'=29 +'doc'=30 +'mode'=31 +'emits'=32 +'receiver'=33 +'requires'=34 +'any'=35 +'get'=36 +'set'=37 +'watch'=38 +'start'=39 +'stop'=40 +'read'=41 +'write'=42 +'resolve'=43 +'connect'=44 +'disconnect'=45 +'call'=46 +'watch-start'=47 +'watch-stop'=48 +'subscribe'=49 +'unsubscribe'=50 +'optimistic-register'=51 +'crdt'=52 +'optional-one'=53 +'exactly-one'=54 +'many-unique'=55 +'many'=56 +'ordered'=57 +'unit'=58 +'watch-handle'=59 +'message'=60 +'atom-ref'=61 +'interface-ref'=62 +'optional'=63 +'list'=64 +'bool'=65 +'bytes'=66 +'double'=67 +'int32'=68 +'int64'=69 +'string'=70 +'uint32'=71 +'uint64'=72 +'true'=73 +'false'=74 +'null'=75 +'->'=76 +':'=77 +';'=78 +','=79 +'.'=80 +'{'=81 +'}'=82 +'['=83 +']'=84 +'('=85 +')'=86 +'<'=87 +'>'=88 diff --git a/src/capability-language/generated/QuixosCapabilityLexer.ts b/src/capability-language/generated/QuixosCapabilityLexer.ts new file mode 100644 index 0000000..b212566 --- /dev/null +++ b/src/capability-language/generated/QuixosCapabilityLexer.ts @@ -0,0 +1,523 @@ + +import * as antlr from "antlr4ng"; +import { Token } from "antlr4ng"; + + +export class QuixosCapabilityLexer extends antlr.Lexer { + public static readonly WORKSPACE = 1; + public static readonly ATOM = 2; + public static readonly INTERFACE = 3; + public static readonly INTERFACES = 4; + public static readonly PACKAGE = 5; + public static readonly VALUE = 6; + public static readonly RELATION = 7; + public static readonly OPERATION = 8; + public static readonly FUNCTION = 9; + public static readonly CONSTRUCTOR = 10; + public static readonly CONSTRUCTS = 11; + public static readonly CONFORM = 12; + public static readonly AS = 13; + public static readonly BIND = 14; + public static readonly TO = 15; + public static readonly PRIVATE = 16; + public static readonly SHARED = 17; + public static readonly STATE = 18; + public static readonly EDGE = 19; + public static readonly PROJECTION = 20; + public static readonly WITH = 21; + public static readonly ON = 22; + public static readonly POLICY = 23; + public static readonly DEFAULT = 24; + public static readonly SOURCE = 25; + public static readonly REPOSITORY = 26; + public static readonly COMMIT = 27; + public static readonly REVISION = 28; + public static readonly ID = 29; + public static readonly DOC = 30; + public static readonly MODE = 31; + public static readonly EMITS = 32; + public static readonly RECEIVER = 33; + public static readonly REQUIRES = 34; + public static readonly ANY = 35; + public static readonly GET = 36; + public static readonly SET = 37; + public static readonly WATCH = 38; + public static readonly START = 39; + public static readonly STOP = 40; + public static readonly READ = 41; + public static readonly WRITE = 42; + public static readonly RESOLVE = 43; + public static readonly CONNECT = 44; + public static readonly DISCONNECT = 45; + public static readonly CALL = 46; + public static readonly WATCH_START = 47; + public static readonly WATCH_STOP = 48; + public static readonly SUBSCRIBE = 49; + public static readonly UNSUBSCRIBE = 50; + public static readonly OPTIMISTIC_REGISTER = 51; + public static readonly CRDT = 52; + public static readonly OPTIONAL_ONE = 53; + public static readonly EXACTLY_ONE = 54; + public static readonly MANY_UNIQUE = 55; + public static readonly MANY = 56; + public static readonly ORDERED = 57; + public static readonly UNIT = 58; + public static readonly WATCH_HANDLE = 59; + public static readonly MESSAGE = 60; + public static readonly ATOM_REF = 61; + public static readonly INTERFACE_REF = 62; + public static readonly OPTIONAL = 63; + public static readonly LIST = 64; + public static readonly BOOL = 65; + public static readonly BYTES = 66; + public static readonly DOUBLE = 67; + public static readonly INT32 = 68; + public static readonly INT64 = 69; + public static readonly STRING = 70; + public static readonly UINT32 = 71; + public static readonly UINT64 = 72; + public static readonly TRUE = 73; + public static readonly FALSE = 74; + public static readonly NULL = 75; + public static readonly ARROW = 76; + public static readonly COLON = 77; + public static readonly SEMI = 78; + public static readonly COMMA = 79; + public static readonly DOT = 80; + public static readonly LBRACE = 81; + public static readonly RBRACE = 82; + public static readonly LBRACK = 83; + public static readonly RBRACK = 84; + public static readonly LPAREN = 85; + public static readonly RPAREN = 86; + public static readonly LT = 87; + public static readonly GT = 88; + public static readonly INTEGER = 89; + public static readonly JSON_NUMBER = 90; + public static readonly IDENTIFIER = 91; + public static readonly STRING_LITERAL = 92; + public static readonly LINE_COMMENT = 93; + public static readonly BLOCK_COMMENT = 94; + public static readonly WS = 95; + + public static readonly channelNames = [ + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + ]; + + public static readonly literalNames = [ + null, "'workspace'", "'atom'", "'interface'", "'interfaces'", "'package'", + "'value'", "'relation'", "'operation'", "'function'", "'constructor'", + "'constructs'", "'conform'", "'as'", "'bind'", "'to'", "'private'", + "'shared'", "'state'", "'edge'", "'projection'", "'with'", "'on'", + "'policy'", "'default'", "'source'", "'repository'", "'commit'", + "'revision'", "'id'", "'doc'", "'mode'", "'emits'", "'receiver'", + "'requires'", "'any'", "'get'", "'set'", "'watch'", "'start'", "'stop'", + "'read'", "'write'", "'resolve'", "'connect'", "'disconnect'", "'call'", + "'watch-start'", "'watch-stop'", "'subscribe'", "'unsubscribe'", + "'optimistic-register'", "'crdt'", "'optional-one'", "'exactly-one'", + "'many-unique'", "'many'", "'ordered'", "'unit'", "'watch-handle'", + "'message'", "'atom-ref'", "'interface-ref'", "'optional'", "'list'", + "'bool'", "'bytes'", "'double'", "'int32'", "'int64'", "'string'", + "'uint32'", "'uint64'", "'true'", "'false'", "'null'", "'->'", "':'", + "';'", "','", "'.'", "'{'", "'}'", "'['", "']'", "'('", "')'", "'<'", + "'>'" + ]; + + public static readonly symbolicNames = [ + null, "WORKSPACE", "ATOM", "INTERFACE", "INTERFACES", "PACKAGE", + "VALUE", "RELATION", "OPERATION", "FUNCTION", "CONSTRUCTOR", "CONSTRUCTS", + "CONFORM", "AS", "BIND", "TO", "PRIVATE", "SHARED", "STATE", "EDGE", + "PROJECTION", "WITH", "ON", "POLICY", "DEFAULT", "SOURCE", "REPOSITORY", + "COMMIT", "REVISION", "ID", "DOC", "MODE", "EMITS", "RECEIVER", + "REQUIRES", "ANY", "GET", "SET", "WATCH", "START", "STOP", "READ", + "WRITE", "RESOLVE", "CONNECT", "DISCONNECT", "CALL", "WATCH_START", + "WATCH_STOP", "SUBSCRIBE", "UNSUBSCRIBE", "OPTIMISTIC_REGISTER", + "CRDT", "OPTIONAL_ONE", "EXACTLY_ONE", "MANY_UNIQUE", "MANY", "ORDERED", + "UNIT", "WATCH_HANDLE", "MESSAGE", "ATOM_REF", "INTERFACE_REF", + "OPTIONAL", "LIST", "BOOL", "BYTES", "DOUBLE", "INT32", "INT64", + "STRING", "UINT32", "UINT64", "TRUE", "FALSE", "NULL", "ARROW", + "COLON", "SEMI", "COMMA", "DOT", "LBRACE", "RBRACE", "LBRACK", "RBRACK", + "LPAREN", "RPAREN", "LT", "GT", "INTEGER", "JSON_NUMBER", "IDENTIFIER", + "STRING_LITERAL", "LINE_COMMENT", "BLOCK_COMMENT", "WS" + ]; + + public static readonly modeNames = [ + "DEFAULT_MODE", + ]; + + public static readonly ruleNames = [ + "WORKSPACE", "ATOM", "INTERFACE", "INTERFACES", "PACKAGE", "VALUE", + "RELATION", "OPERATION", "FUNCTION", "CONSTRUCTOR", "CONSTRUCTS", + "CONFORM", "AS", "BIND", "TO", "PRIVATE", "SHARED", "STATE", "EDGE", + "PROJECTION", "WITH", "ON", "POLICY", "DEFAULT", "SOURCE", "REPOSITORY", + "COMMIT", "REVISION", "ID", "DOC", "MODE", "EMITS", "RECEIVER", + "REQUIRES", "ANY", "GET", "SET", "WATCH", "START", "STOP", "READ", + "WRITE", "RESOLVE", "CONNECT", "DISCONNECT", "CALL", "WATCH_START", + "WATCH_STOP", "SUBSCRIBE", "UNSUBSCRIBE", "OPTIMISTIC_REGISTER", + "CRDT", "OPTIONAL_ONE", "EXACTLY_ONE", "MANY_UNIQUE", "MANY", "ORDERED", + "UNIT", "WATCH_HANDLE", "MESSAGE", "ATOM_REF", "INTERFACE_REF", + "OPTIONAL", "LIST", "BOOL", "BYTES", "DOUBLE", "INT32", "INT64", + "STRING", "UINT32", "UINT64", "TRUE", "FALSE", "NULL", "ARROW", + "COLON", "SEMI", "COMMA", "DOT", "LBRACE", "RBRACE", "LBRACK", "RBRACK", + "LPAREN", "RPAREN", "LT", "GT", "INTEGER", "JSON_NUMBER", "IDENTIFIER", + "STRING_LITERAL", "ESC", "HEX", "LINE_COMMENT", "BLOCK_COMMENT", + "WS", + ]; + + + public constructor(input: antlr.CharStream) { + super(input); + this.interpreter = new antlr.LexerATNSimulator(this, QuixosCapabilityLexer._ATN, QuixosCapabilityLexer.decisionsToDFA, new antlr.PredictionContextCache()); + } + + public get grammarFileName(): string { return "QuixosCapability.g4"; } + + public get literalNames(): (string | null)[] { return QuixosCapabilityLexer.literalNames; } + public get symbolicNames(): (string | null)[] { return QuixosCapabilityLexer.symbolicNames; } + public get ruleNames(): string[] { return QuixosCapabilityLexer.ruleNames; } + + public get serializedATN(): number[] { return QuixosCapabilityLexer._serializedATN; } + + public get channelNames(): string[] { return QuixosCapabilityLexer.channelNames; } + + public get modeNames(): string[] { return QuixosCapabilityLexer.modeNames; } + + public static readonly _serializedATN: number[] = [ + 4,0,95,895,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5, + 2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2, + 13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7, + 19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2, + 26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7, + 32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2, + 39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7, + 45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2, + 52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,2,58,7, + 58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2, + 65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70,2,71,7, + 71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77,2, + 78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7, + 84,2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2, + 91,7,91,2,92,7,92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,1,0,1, + 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1, + 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1, + 3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1, + 5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1, + 7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1, + 9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10, + 1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11, + 1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,15,1,15, + 1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,1,16, + 1,17,1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,19,1,19, + 1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20, + 1,20,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,23,1,23, + 1,23,1,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,1,24, + 1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,26,1,26, + 1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27, + 1,27,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,30, + 1,31,1,31,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,32,1,32,1,32,1,32, + 1,32,1,32,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,34,1,34, + 1,34,1,34,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,37,1,37,1,37, + 1,37,1,37,1,37,1,38,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39, + 1,39,1,40,1,40,1,40,1,40,1,40,1,41,1,41,1,41,1,41,1,41,1,41,1,42, + 1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,43,1,43, + 1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44, + 1,45,1,45,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46, + 1,46,1,46,1,46,1,46,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47, + 1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,48,1,48,1,48,1,48,1,48,1,49, + 1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,50,1,50, + 1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50, + 1,50,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,52,1,52,1,52, + 1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,53,1,53,1,53, + 1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1,54,1,54, + 1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,55,1,55,1,55,1,55,1,55, + 1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1,57,1,57, + 1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58, + 1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,60,1,60,1,60,1,60,1,60, + 1,60,1,60,1,60,1,60,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61, + 1,61,1,61,1,61,1,61,1,61,1,62,1,62,1,62,1,62,1,62,1,62,1,62,1,62, + 1,62,1,63,1,63,1,63,1,63,1,63,1,64,1,64,1,64,1,64,1,64,1,65,1,65, + 1,65,1,65,1,65,1,65,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,67,1,67, + 1,67,1,67,1,67,1,67,1,68,1,68,1,68,1,68,1,68,1,68,1,69,1,69,1,69, + 1,69,1,69,1,69,1,69,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,71,1,71, + 1,71,1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,72,1,73,1,73,1,73, + 1,73,1,73,1,73,1,74,1,74,1,74,1,74,1,74,1,75,1,75,1,75,1,76,1,76, + 1,77,1,77,1,78,1,78,1,79,1,79,1,80,1,80,1,81,1,81,1,82,1,82,1,83, + 1,83,1,84,1,84,1,85,1,85,1,86,1,86,1,87,1,87,1,88,3,88,796,8,88, + 1,88,4,88,799,8,88,11,88,12,88,800,1,89,3,89,804,8,89,1,89,1,89, + 1,89,5,89,809,8,89,10,89,12,89,812,9,89,3,89,814,8,89,1,89,1,89, + 4,89,818,8,89,11,89,12,89,819,3,89,822,8,89,1,89,1,89,3,89,826,8, + 89,1,89,4,89,829,8,89,11,89,12,89,830,3,89,833,8,89,1,90,1,90,5, + 90,837,8,90,10,90,12,90,840,9,90,1,91,1,91,1,91,5,91,845,8,91,10, + 91,12,91,848,9,91,1,91,1,91,1,92,1,92,1,92,1,92,1,92,1,92,1,92,1, + 92,3,92,860,8,92,1,93,1,93,1,94,1,94,1,94,1,94,5,94,868,8,94,10, + 94,12,94,871,9,94,1,94,1,94,1,95,1,95,1,95,1,95,5,95,879,8,95,10, + 95,12,95,882,9,95,1,95,1,95,1,95,1,95,1,95,1,96,4,96,890,8,96,11, + 96,12,96,891,1,96,1,96,1,880,0,97,1,1,3,2,5,3,7,4,9,5,11,6,13,7, + 15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18, + 37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29, + 59,30,61,31,63,32,65,33,67,34,69,35,71,36,73,37,75,38,77,39,79,40, + 81,41,83,42,85,43,87,44,89,45,91,46,93,47,95,48,97,49,99,50,101, + 51,103,52,105,53,107,54,109,55,111,56,113,57,115,58,117,59,119,60, + 121,61,123,62,125,63,127,64,129,65,131,66,133,67,135,68,137,69,139, + 70,141,71,143,72,145,73,147,74,149,75,151,76,153,77,155,78,157,79, + 159,80,161,81,163,82,165,83,167,84,169,85,171,86,173,87,175,88,177, + 89,179,90,181,91,183,92,185,0,187,0,189,93,191,94,193,95,1,0,11, + 1,0,48,57,1,0,49,57,2,0,69,69,101,101,2,0,43,43,45,45,3,0,65,90, + 95,95,97,122,4,0,48,57,65,90,95,95,97,122,4,0,10,10,13,13,34,34, + 92,92,8,0,34,34,47,47,92,92,98,98,102,102,110,110,114,114,116,116, + 3,0,48,57,65,70,97,102,2,0,10,10,13,13,3,0,9,10,13,13,32,32,909, + 0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11, + 1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21, + 1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31, + 1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41, + 1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51, + 1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61, + 1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71, + 1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81, + 1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91, + 1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101, + 1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0, + 0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1, + 0,0,0,0,121,1,0,0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0, + 129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0,0,135,1,0,0,0,0,137,1,0, + 0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1,0,0,0,0,145,1,0,0,0,0,147, + 1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153,1,0,0,0,0,155,1,0,0,0, + 0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0,0,0,0,163,1,0,0,0,0,165,1, + 0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171,1,0,0,0,0,173,1,0,0,0,0, + 175,1,0,0,0,0,177,1,0,0,0,0,179,1,0,0,0,0,181,1,0,0,0,0,183,1,0, + 0,0,0,189,1,0,0,0,0,191,1,0,0,0,0,193,1,0,0,0,1,195,1,0,0,0,3,205, + 1,0,0,0,5,210,1,0,0,0,7,220,1,0,0,0,9,231,1,0,0,0,11,239,1,0,0,0, + 13,245,1,0,0,0,15,254,1,0,0,0,17,264,1,0,0,0,19,273,1,0,0,0,21,285, + 1,0,0,0,23,296,1,0,0,0,25,304,1,0,0,0,27,307,1,0,0,0,29,312,1,0, + 0,0,31,315,1,0,0,0,33,323,1,0,0,0,35,330,1,0,0,0,37,336,1,0,0,0, + 39,341,1,0,0,0,41,352,1,0,0,0,43,357,1,0,0,0,45,360,1,0,0,0,47,367, + 1,0,0,0,49,375,1,0,0,0,51,382,1,0,0,0,53,393,1,0,0,0,55,400,1,0, + 0,0,57,409,1,0,0,0,59,412,1,0,0,0,61,416,1,0,0,0,63,421,1,0,0,0, + 65,427,1,0,0,0,67,436,1,0,0,0,69,445,1,0,0,0,71,449,1,0,0,0,73,453, + 1,0,0,0,75,457,1,0,0,0,77,463,1,0,0,0,79,469,1,0,0,0,81,474,1,0, + 0,0,83,479,1,0,0,0,85,485,1,0,0,0,87,493,1,0,0,0,89,501,1,0,0,0, + 91,512,1,0,0,0,93,517,1,0,0,0,95,529,1,0,0,0,97,540,1,0,0,0,99,550, + 1,0,0,0,101,562,1,0,0,0,103,582,1,0,0,0,105,587,1,0,0,0,107,600, + 1,0,0,0,109,612,1,0,0,0,111,624,1,0,0,0,113,629,1,0,0,0,115,637, + 1,0,0,0,117,642,1,0,0,0,119,655,1,0,0,0,121,663,1,0,0,0,123,672, + 1,0,0,0,125,686,1,0,0,0,127,695,1,0,0,0,129,700,1,0,0,0,131,705, + 1,0,0,0,133,711,1,0,0,0,135,718,1,0,0,0,137,724,1,0,0,0,139,730, + 1,0,0,0,141,737,1,0,0,0,143,744,1,0,0,0,145,751,1,0,0,0,147,756, + 1,0,0,0,149,762,1,0,0,0,151,767,1,0,0,0,153,770,1,0,0,0,155,772, + 1,0,0,0,157,774,1,0,0,0,159,776,1,0,0,0,161,778,1,0,0,0,163,780, + 1,0,0,0,165,782,1,0,0,0,167,784,1,0,0,0,169,786,1,0,0,0,171,788, + 1,0,0,0,173,790,1,0,0,0,175,792,1,0,0,0,177,795,1,0,0,0,179,803, + 1,0,0,0,181,834,1,0,0,0,183,841,1,0,0,0,185,851,1,0,0,0,187,861, + 1,0,0,0,189,863,1,0,0,0,191,874,1,0,0,0,193,889,1,0,0,0,195,196, + 5,119,0,0,196,197,5,111,0,0,197,198,5,114,0,0,198,199,5,107,0,0, + 199,200,5,115,0,0,200,201,5,112,0,0,201,202,5,97,0,0,202,203,5,99, + 0,0,203,204,5,101,0,0,204,2,1,0,0,0,205,206,5,97,0,0,206,207,5,116, + 0,0,207,208,5,111,0,0,208,209,5,109,0,0,209,4,1,0,0,0,210,211,5, + 105,0,0,211,212,5,110,0,0,212,213,5,116,0,0,213,214,5,101,0,0,214, + 215,5,114,0,0,215,216,5,102,0,0,216,217,5,97,0,0,217,218,5,99,0, + 0,218,219,5,101,0,0,219,6,1,0,0,0,220,221,5,105,0,0,221,222,5,110, + 0,0,222,223,5,116,0,0,223,224,5,101,0,0,224,225,5,114,0,0,225,226, + 5,102,0,0,226,227,5,97,0,0,227,228,5,99,0,0,228,229,5,101,0,0,229, + 230,5,115,0,0,230,8,1,0,0,0,231,232,5,112,0,0,232,233,5,97,0,0,233, + 234,5,99,0,0,234,235,5,107,0,0,235,236,5,97,0,0,236,237,5,103,0, + 0,237,238,5,101,0,0,238,10,1,0,0,0,239,240,5,118,0,0,240,241,5,97, + 0,0,241,242,5,108,0,0,242,243,5,117,0,0,243,244,5,101,0,0,244,12, + 1,0,0,0,245,246,5,114,0,0,246,247,5,101,0,0,247,248,5,108,0,0,248, + 249,5,97,0,0,249,250,5,116,0,0,250,251,5,105,0,0,251,252,5,111,0, + 0,252,253,5,110,0,0,253,14,1,0,0,0,254,255,5,111,0,0,255,256,5,112, + 0,0,256,257,5,101,0,0,257,258,5,114,0,0,258,259,5,97,0,0,259,260, + 5,116,0,0,260,261,5,105,0,0,261,262,5,111,0,0,262,263,5,110,0,0, + 263,16,1,0,0,0,264,265,5,102,0,0,265,266,5,117,0,0,266,267,5,110, + 0,0,267,268,5,99,0,0,268,269,5,116,0,0,269,270,5,105,0,0,270,271, + 5,111,0,0,271,272,5,110,0,0,272,18,1,0,0,0,273,274,5,99,0,0,274, + 275,5,111,0,0,275,276,5,110,0,0,276,277,5,115,0,0,277,278,5,116, + 0,0,278,279,5,114,0,0,279,280,5,117,0,0,280,281,5,99,0,0,281,282, + 5,116,0,0,282,283,5,111,0,0,283,284,5,114,0,0,284,20,1,0,0,0,285, + 286,5,99,0,0,286,287,5,111,0,0,287,288,5,110,0,0,288,289,5,115,0, + 0,289,290,5,116,0,0,290,291,5,114,0,0,291,292,5,117,0,0,292,293, + 5,99,0,0,293,294,5,116,0,0,294,295,5,115,0,0,295,22,1,0,0,0,296, + 297,5,99,0,0,297,298,5,111,0,0,298,299,5,110,0,0,299,300,5,102,0, + 0,300,301,5,111,0,0,301,302,5,114,0,0,302,303,5,109,0,0,303,24,1, + 0,0,0,304,305,5,97,0,0,305,306,5,115,0,0,306,26,1,0,0,0,307,308, + 5,98,0,0,308,309,5,105,0,0,309,310,5,110,0,0,310,311,5,100,0,0,311, + 28,1,0,0,0,312,313,5,116,0,0,313,314,5,111,0,0,314,30,1,0,0,0,315, + 316,5,112,0,0,316,317,5,114,0,0,317,318,5,105,0,0,318,319,5,118, + 0,0,319,320,5,97,0,0,320,321,5,116,0,0,321,322,5,101,0,0,322,32, + 1,0,0,0,323,324,5,115,0,0,324,325,5,104,0,0,325,326,5,97,0,0,326, + 327,5,114,0,0,327,328,5,101,0,0,328,329,5,100,0,0,329,34,1,0,0,0, + 330,331,5,115,0,0,331,332,5,116,0,0,332,333,5,97,0,0,333,334,5,116, + 0,0,334,335,5,101,0,0,335,36,1,0,0,0,336,337,5,101,0,0,337,338,5, + 100,0,0,338,339,5,103,0,0,339,340,5,101,0,0,340,38,1,0,0,0,341,342, + 5,112,0,0,342,343,5,114,0,0,343,344,5,111,0,0,344,345,5,106,0,0, + 345,346,5,101,0,0,346,347,5,99,0,0,347,348,5,116,0,0,348,349,5,105, + 0,0,349,350,5,111,0,0,350,351,5,110,0,0,351,40,1,0,0,0,352,353,5, + 119,0,0,353,354,5,105,0,0,354,355,5,116,0,0,355,356,5,104,0,0,356, + 42,1,0,0,0,357,358,5,111,0,0,358,359,5,110,0,0,359,44,1,0,0,0,360, + 361,5,112,0,0,361,362,5,111,0,0,362,363,5,108,0,0,363,364,5,105, + 0,0,364,365,5,99,0,0,365,366,5,121,0,0,366,46,1,0,0,0,367,368,5, + 100,0,0,368,369,5,101,0,0,369,370,5,102,0,0,370,371,5,97,0,0,371, + 372,5,117,0,0,372,373,5,108,0,0,373,374,5,116,0,0,374,48,1,0,0,0, + 375,376,5,115,0,0,376,377,5,111,0,0,377,378,5,117,0,0,378,379,5, + 114,0,0,379,380,5,99,0,0,380,381,5,101,0,0,381,50,1,0,0,0,382,383, + 5,114,0,0,383,384,5,101,0,0,384,385,5,112,0,0,385,386,5,111,0,0, + 386,387,5,115,0,0,387,388,5,105,0,0,388,389,5,116,0,0,389,390,5, + 111,0,0,390,391,5,114,0,0,391,392,5,121,0,0,392,52,1,0,0,0,393,394, + 5,99,0,0,394,395,5,111,0,0,395,396,5,109,0,0,396,397,5,109,0,0,397, + 398,5,105,0,0,398,399,5,116,0,0,399,54,1,0,0,0,400,401,5,114,0,0, + 401,402,5,101,0,0,402,403,5,118,0,0,403,404,5,105,0,0,404,405,5, + 115,0,0,405,406,5,105,0,0,406,407,5,111,0,0,407,408,5,110,0,0,408, + 56,1,0,0,0,409,410,5,105,0,0,410,411,5,100,0,0,411,58,1,0,0,0,412, + 413,5,100,0,0,413,414,5,111,0,0,414,415,5,99,0,0,415,60,1,0,0,0, + 416,417,5,109,0,0,417,418,5,111,0,0,418,419,5,100,0,0,419,420,5, + 101,0,0,420,62,1,0,0,0,421,422,5,101,0,0,422,423,5,109,0,0,423,424, + 5,105,0,0,424,425,5,116,0,0,425,426,5,115,0,0,426,64,1,0,0,0,427, + 428,5,114,0,0,428,429,5,101,0,0,429,430,5,99,0,0,430,431,5,101,0, + 0,431,432,5,105,0,0,432,433,5,118,0,0,433,434,5,101,0,0,434,435, + 5,114,0,0,435,66,1,0,0,0,436,437,5,114,0,0,437,438,5,101,0,0,438, + 439,5,113,0,0,439,440,5,117,0,0,440,441,5,105,0,0,441,442,5,114, + 0,0,442,443,5,101,0,0,443,444,5,115,0,0,444,68,1,0,0,0,445,446,5, + 97,0,0,446,447,5,110,0,0,447,448,5,121,0,0,448,70,1,0,0,0,449,450, + 5,103,0,0,450,451,5,101,0,0,451,452,5,116,0,0,452,72,1,0,0,0,453, + 454,5,115,0,0,454,455,5,101,0,0,455,456,5,116,0,0,456,74,1,0,0,0, + 457,458,5,119,0,0,458,459,5,97,0,0,459,460,5,116,0,0,460,461,5,99, + 0,0,461,462,5,104,0,0,462,76,1,0,0,0,463,464,5,115,0,0,464,465,5, + 116,0,0,465,466,5,97,0,0,466,467,5,114,0,0,467,468,5,116,0,0,468, + 78,1,0,0,0,469,470,5,115,0,0,470,471,5,116,0,0,471,472,5,111,0,0, + 472,473,5,112,0,0,473,80,1,0,0,0,474,475,5,114,0,0,475,476,5,101, + 0,0,476,477,5,97,0,0,477,478,5,100,0,0,478,82,1,0,0,0,479,480,5, + 119,0,0,480,481,5,114,0,0,481,482,5,105,0,0,482,483,5,116,0,0,483, + 484,5,101,0,0,484,84,1,0,0,0,485,486,5,114,0,0,486,487,5,101,0,0, + 487,488,5,115,0,0,488,489,5,111,0,0,489,490,5,108,0,0,490,491,5, + 118,0,0,491,492,5,101,0,0,492,86,1,0,0,0,493,494,5,99,0,0,494,495, + 5,111,0,0,495,496,5,110,0,0,496,497,5,110,0,0,497,498,5,101,0,0, + 498,499,5,99,0,0,499,500,5,116,0,0,500,88,1,0,0,0,501,502,5,100, + 0,0,502,503,5,105,0,0,503,504,5,115,0,0,504,505,5,99,0,0,505,506, + 5,111,0,0,506,507,5,110,0,0,507,508,5,110,0,0,508,509,5,101,0,0, + 509,510,5,99,0,0,510,511,5,116,0,0,511,90,1,0,0,0,512,513,5,99,0, + 0,513,514,5,97,0,0,514,515,5,108,0,0,515,516,5,108,0,0,516,92,1, + 0,0,0,517,518,5,119,0,0,518,519,5,97,0,0,519,520,5,116,0,0,520,521, + 5,99,0,0,521,522,5,104,0,0,522,523,5,45,0,0,523,524,5,115,0,0,524, + 525,5,116,0,0,525,526,5,97,0,0,526,527,5,114,0,0,527,528,5,116,0, + 0,528,94,1,0,0,0,529,530,5,119,0,0,530,531,5,97,0,0,531,532,5,116, + 0,0,532,533,5,99,0,0,533,534,5,104,0,0,534,535,5,45,0,0,535,536, + 5,115,0,0,536,537,5,116,0,0,537,538,5,111,0,0,538,539,5,112,0,0, + 539,96,1,0,0,0,540,541,5,115,0,0,541,542,5,117,0,0,542,543,5,98, + 0,0,543,544,5,115,0,0,544,545,5,99,0,0,545,546,5,114,0,0,546,547, + 5,105,0,0,547,548,5,98,0,0,548,549,5,101,0,0,549,98,1,0,0,0,550, + 551,5,117,0,0,551,552,5,110,0,0,552,553,5,115,0,0,553,554,5,117, + 0,0,554,555,5,98,0,0,555,556,5,115,0,0,556,557,5,99,0,0,557,558, + 5,114,0,0,558,559,5,105,0,0,559,560,5,98,0,0,560,561,5,101,0,0,561, + 100,1,0,0,0,562,563,5,111,0,0,563,564,5,112,0,0,564,565,5,116,0, + 0,565,566,5,105,0,0,566,567,5,109,0,0,567,568,5,105,0,0,568,569, + 5,115,0,0,569,570,5,116,0,0,570,571,5,105,0,0,571,572,5,99,0,0,572, + 573,5,45,0,0,573,574,5,114,0,0,574,575,5,101,0,0,575,576,5,103,0, + 0,576,577,5,105,0,0,577,578,5,115,0,0,578,579,5,116,0,0,579,580, + 5,101,0,0,580,581,5,114,0,0,581,102,1,0,0,0,582,583,5,99,0,0,583, + 584,5,114,0,0,584,585,5,100,0,0,585,586,5,116,0,0,586,104,1,0,0, + 0,587,588,5,111,0,0,588,589,5,112,0,0,589,590,5,116,0,0,590,591, + 5,105,0,0,591,592,5,111,0,0,592,593,5,110,0,0,593,594,5,97,0,0,594, + 595,5,108,0,0,595,596,5,45,0,0,596,597,5,111,0,0,597,598,5,110,0, + 0,598,599,5,101,0,0,599,106,1,0,0,0,600,601,5,101,0,0,601,602,5, + 120,0,0,602,603,5,97,0,0,603,604,5,99,0,0,604,605,5,116,0,0,605, + 606,5,108,0,0,606,607,5,121,0,0,607,608,5,45,0,0,608,609,5,111,0, + 0,609,610,5,110,0,0,610,611,5,101,0,0,611,108,1,0,0,0,612,613,5, + 109,0,0,613,614,5,97,0,0,614,615,5,110,0,0,615,616,5,121,0,0,616, + 617,5,45,0,0,617,618,5,117,0,0,618,619,5,110,0,0,619,620,5,105,0, + 0,620,621,5,113,0,0,621,622,5,117,0,0,622,623,5,101,0,0,623,110, + 1,0,0,0,624,625,5,109,0,0,625,626,5,97,0,0,626,627,5,110,0,0,627, + 628,5,121,0,0,628,112,1,0,0,0,629,630,5,111,0,0,630,631,5,114,0, + 0,631,632,5,100,0,0,632,633,5,101,0,0,633,634,5,114,0,0,634,635, + 5,101,0,0,635,636,5,100,0,0,636,114,1,0,0,0,637,638,5,117,0,0,638, + 639,5,110,0,0,639,640,5,105,0,0,640,641,5,116,0,0,641,116,1,0,0, + 0,642,643,5,119,0,0,643,644,5,97,0,0,644,645,5,116,0,0,645,646,5, + 99,0,0,646,647,5,104,0,0,647,648,5,45,0,0,648,649,5,104,0,0,649, + 650,5,97,0,0,650,651,5,110,0,0,651,652,5,100,0,0,652,653,5,108,0, + 0,653,654,5,101,0,0,654,118,1,0,0,0,655,656,5,109,0,0,656,657,5, + 101,0,0,657,658,5,115,0,0,658,659,5,115,0,0,659,660,5,97,0,0,660, + 661,5,103,0,0,661,662,5,101,0,0,662,120,1,0,0,0,663,664,5,97,0,0, + 664,665,5,116,0,0,665,666,5,111,0,0,666,667,5,109,0,0,667,668,5, + 45,0,0,668,669,5,114,0,0,669,670,5,101,0,0,670,671,5,102,0,0,671, + 122,1,0,0,0,672,673,5,105,0,0,673,674,5,110,0,0,674,675,5,116,0, + 0,675,676,5,101,0,0,676,677,5,114,0,0,677,678,5,102,0,0,678,679, + 5,97,0,0,679,680,5,99,0,0,680,681,5,101,0,0,681,682,5,45,0,0,682, + 683,5,114,0,0,683,684,5,101,0,0,684,685,5,102,0,0,685,124,1,0,0, + 0,686,687,5,111,0,0,687,688,5,112,0,0,688,689,5,116,0,0,689,690, + 5,105,0,0,690,691,5,111,0,0,691,692,5,110,0,0,692,693,5,97,0,0,693, + 694,5,108,0,0,694,126,1,0,0,0,695,696,5,108,0,0,696,697,5,105,0, + 0,697,698,5,115,0,0,698,699,5,116,0,0,699,128,1,0,0,0,700,701,5, + 98,0,0,701,702,5,111,0,0,702,703,5,111,0,0,703,704,5,108,0,0,704, + 130,1,0,0,0,705,706,5,98,0,0,706,707,5,121,0,0,707,708,5,116,0,0, + 708,709,5,101,0,0,709,710,5,115,0,0,710,132,1,0,0,0,711,712,5,100, + 0,0,712,713,5,111,0,0,713,714,5,117,0,0,714,715,5,98,0,0,715,716, + 5,108,0,0,716,717,5,101,0,0,717,134,1,0,0,0,718,719,5,105,0,0,719, + 720,5,110,0,0,720,721,5,116,0,0,721,722,5,51,0,0,722,723,5,50,0, + 0,723,136,1,0,0,0,724,725,5,105,0,0,725,726,5,110,0,0,726,727,5, + 116,0,0,727,728,5,54,0,0,728,729,5,52,0,0,729,138,1,0,0,0,730,731, + 5,115,0,0,731,732,5,116,0,0,732,733,5,114,0,0,733,734,5,105,0,0, + 734,735,5,110,0,0,735,736,5,103,0,0,736,140,1,0,0,0,737,738,5,117, + 0,0,738,739,5,105,0,0,739,740,5,110,0,0,740,741,5,116,0,0,741,742, + 5,51,0,0,742,743,5,50,0,0,743,142,1,0,0,0,744,745,5,117,0,0,745, + 746,5,105,0,0,746,747,5,110,0,0,747,748,5,116,0,0,748,749,5,54,0, + 0,749,750,5,52,0,0,750,144,1,0,0,0,751,752,5,116,0,0,752,753,5,114, + 0,0,753,754,5,117,0,0,754,755,5,101,0,0,755,146,1,0,0,0,756,757, + 5,102,0,0,757,758,5,97,0,0,758,759,5,108,0,0,759,760,5,115,0,0,760, + 761,5,101,0,0,761,148,1,0,0,0,762,763,5,110,0,0,763,764,5,117,0, + 0,764,765,5,108,0,0,765,766,5,108,0,0,766,150,1,0,0,0,767,768,5, + 45,0,0,768,769,5,62,0,0,769,152,1,0,0,0,770,771,5,58,0,0,771,154, + 1,0,0,0,772,773,5,59,0,0,773,156,1,0,0,0,774,775,5,44,0,0,775,158, + 1,0,0,0,776,777,5,46,0,0,777,160,1,0,0,0,778,779,5,123,0,0,779,162, + 1,0,0,0,780,781,5,125,0,0,781,164,1,0,0,0,782,783,5,91,0,0,783,166, + 1,0,0,0,784,785,5,93,0,0,785,168,1,0,0,0,786,787,5,40,0,0,787,170, + 1,0,0,0,788,789,5,41,0,0,789,172,1,0,0,0,790,791,5,60,0,0,791,174, + 1,0,0,0,792,793,5,62,0,0,793,176,1,0,0,0,794,796,5,45,0,0,795,794, + 1,0,0,0,795,796,1,0,0,0,796,798,1,0,0,0,797,799,7,0,0,0,798,797, + 1,0,0,0,799,800,1,0,0,0,800,798,1,0,0,0,800,801,1,0,0,0,801,178, + 1,0,0,0,802,804,5,45,0,0,803,802,1,0,0,0,803,804,1,0,0,0,804,813, + 1,0,0,0,805,814,5,48,0,0,806,810,7,1,0,0,807,809,7,0,0,0,808,807, + 1,0,0,0,809,812,1,0,0,0,810,808,1,0,0,0,810,811,1,0,0,0,811,814, + 1,0,0,0,812,810,1,0,0,0,813,805,1,0,0,0,813,806,1,0,0,0,814,821, + 1,0,0,0,815,817,5,46,0,0,816,818,7,0,0,0,817,816,1,0,0,0,818,819, + 1,0,0,0,819,817,1,0,0,0,819,820,1,0,0,0,820,822,1,0,0,0,821,815, + 1,0,0,0,821,822,1,0,0,0,822,832,1,0,0,0,823,825,7,2,0,0,824,826, + 7,3,0,0,825,824,1,0,0,0,825,826,1,0,0,0,826,828,1,0,0,0,827,829, + 7,0,0,0,828,827,1,0,0,0,829,830,1,0,0,0,830,828,1,0,0,0,830,831, + 1,0,0,0,831,833,1,0,0,0,832,823,1,0,0,0,832,833,1,0,0,0,833,180, + 1,0,0,0,834,838,7,4,0,0,835,837,7,5,0,0,836,835,1,0,0,0,837,840, + 1,0,0,0,838,836,1,0,0,0,838,839,1,0,0,0,839,182,1,0,0,0,840,838, + 1,0,0,0,841,846,5,34,0,0,842,845,3,185,92,0,843,845,8,6,0,0,844, + 842,1,0,0,0,844,843,1,0,0,0,845,848,1,0,0,0,846,844,1,0,0,0,846, + 847,1,0,0,0,847,849,1,0,0,0,848,846,1,0,0,0,849,850,5,34,0,0,850, + 184,1,0,0,0,851,859,5,92,0,0,852,860,7,7,0,0,853,854,5,117,0,0,854, + 855,3,187,93,0,855,856,3,187,93,0,856,857,3,187,93,0,857,858,3,187, + 93,0,858,860,1,0,0,0,859,852,1,0,0,0,859,853,1,0,0,0,860,186,1,0, + 0,0,861,862,7,8,0,0,862,188,1,0,0,0,863,864,5,47,0,0,864,865,5,47, + 0,0,865,869,1,0,0,0,866,868,8,9,0,0,867,866,1,0,0,0,868,871,1,0, + 0,0,869,867,1,0,0,0,869,870,1,0,0,0,870,872,1,0,0,0,871,869,1,0, + 0,0,872,873,6,94,0,0,873,190,1,0,0,0,874,875,5,47,0,0,875,876,5, + 42,0,0,876,880,1,0,0,0,877,879,9,0,0,0,878,877,1,0,0,0,879,882,1, + 0,0,0,880,881,1,0,0,0,880,878,1,0,0,0,881,883,1,0,0,0,882,880,1, + 0,0,0,883,884,5,42,0,0,884,885,5,47,0,0,885,886,1,0,0,0,886,887, + 6,95,0,0,887,192,1,0,0,0,888,890,7,10,0,0,889,888,1,0,0,0,890,891, + 1,0,0,0,891,889,1,0,0,0,891,892,1,0,0,0,892,893,1,0,0,0,893,894, + 6,96,0,0,894,194,1,0,0,0,18,0,795,800,803,810,813,819,821,825,830, + 832,838,844,846,859,869,880,891,1,6,0,0 + ]; + + private static __ATN: antlr.ATN; + public static get _ATN(): antlr.ATN { + if (!QuixosCapabilityLexer.__ATN) { + QuixosCapabilityLexer.__ATN = new antlr.ATNDeserializer().deserialize(QuixosCapabilityLexer._serializedATN); + } + + return QuixosCapabilityLexer.__ATN; + } + + + private static readonly vocabulary = new antlr.Vocabulary(QuixosCapabilityLexer.literalNames, QuixosCapabilityLexer.symbolicNames, []); + + public override get vocabulary(): antlr.Vocabulary { + return QuixosCapabilityLexer.vocabulary; + } + + private static readonly decisionsToDFA = QuixosCapabilityLexer._ATN.decisionToState.map( (ds: antlr.DecisionState, index: number) => new antlr.DFA(ds, index) ); +} \ No newline at end of file diff --git a/src/capability-language/generated/QuixosCapabilityParser.ts b/src/capability-language/generated/QuixosCapabilityParser.ts new file mode 100644 index 0000000..7e5b13d --- /dev/null +++ b/src/capability-language/generated/QuixosCapabilityParser.ts @@ -0,0 +1,5178 @@ + +import * as antlr from "antlr4ng"; +import { Token } from "antlr4ng"; + +import { QuixosCapabilityVisitor } from "./QuixosCapabilityVisitor.js"; + +// for running tests with parameters, TODO: discuss strategy for typed parameters in CI +// eslint-disable-next-line no-unused-vars +type int = number; + + +export class QuixosCapabilityParser extends antlr.Parser { + public static readonly WORKSPACE = 1; + public static readonly ATOM = 2; + public static readonly INTERFACE = 3; + public static readonly INTERFACES = 4; + public static readonly PACKAGE = 5; + public static readonly VALUE = 6; + public static readonly RELATION = 7; + public static readonly OPERATION = 8; + public static readonly FUNCTION = 9; + public static readonly CONSTRUCTOR = 10; + public static readonly CONSTRUCTS = 11; + public static readonly CONFORM = 12; + public static readonly AS = 13; + public static readonly BIND = 14; + public static readonly TO = 15; + public static readonly PRIVATE = 16; + public static readonly SHARED = 17; + public static readonly STATE = 18; + public static readonly EDGE = 19; + public static readonly PROJECTION = 20; + public static readonly WITH = 21; + public static readonly ON = 22; + public static readonly POLICY = 23; + public static readonly DEFAULT = 24; + public static readonly SOURCE = 25; + public static readonly REPOSITORY = 26; + public static readonly COMMIT = 27; + public static readonly REVISION = 28; + public static readonly ID = 29; + public static readonly DOC = 30; + public static readonly MODE = 31; + public static readonly EMITS = 32; + public static readonly RECEIVER = 33; + public static readonly REQUIRES = 34; + public static readonly ANY = 35; + public static readonly GET = 36; + public static readonly SET = 37; + public static readonly WATCH = 38; + public static readonly START = 39; + public static readonly STOP = 40; + public static readonly READ = 41; + public static readonly WRITE = 42; + public static readonly RESOLVE = 43; + public static readonly CONNECT = 44; + public static readonly DISCONNECT = 45; + public static readonly CALL = 46; + public static readonly WATCH_START = 47; + public static readonly WATCH_STOP = 48; + public static readonly SUBSCRIBE = 49; + public static readonly UNSUBSCRIBE = 50; + public static readonly OPTIMISTIC_REGISTER = 51; + public static readonly CRDT = 52; + public static readonly OPTIONAL_ONE = 53; + public static readonly EXACTLY_ONE = 54; + public static readonly MANY_UNIQUE = 55; + public static readonly MANY = 56; + public static readonly ORDERED = 57; + public static readonly UNIT = 58; + public static readonly WATCH_HANDLE = 59; + public static readonly MESSAGE = 60; + public static readonly ATOM_REF = 61; + public static readonly INTERFACE_REF = 62; + public static readonly OPTIONAL = 63; + public static readonly LIST = 64; + public static readonly BOOL = 65; + public static readonly BYTES = 66; + public static readonly DOUBLE = 67; + public static readonly INT32 = 68; + public static readonly INT64 = 69; + public static readonly STRING = 70; + public static readonly UINT32 = 71; + public static readonly UINT64 = 72; + public static readonly TRUE = 73; + public static readonly FALSE = 74; + public static readonly NULL = 75; + public static readonly ARROW = 76; + public static readonly COLON = 77; + public static readonly SEMI = 78; + public static readonly COMMA = 79; + public static readonly DOT = 80; + public static readonly LBRACE = 81; + public static readonly RBRACE = 82; + public static readonly LBRACK = 83; + public static readonly RBRACK = 84; + public static readonly LPAREN = 85; + public static readonly RPAREN = 86; + public static readonly LT = 87; + public static readonly GT = 88; + public static readonly INTEGER = 89; + public static readonly JSON_NUMBER = 90; + public static readonly IDENTIFIER = 91; + public static readonly STRING_LITERAL = 92; + public static readonly LINE_COMMENT = 93; + public static readonly BLOCK_COMMENT = 94; + public static readonly WS = 95; + public static readonly RULE_document = 0; + public static readonly RULE_workspaceDecl = 1; + public static readonly RULE_workspaceItem = 2; + public static readonly RULE_atomDecl = 3; + public static readonly RULE_interfaceDecl = 4; + public static readonly RULE_sourceBlock = 5; + public static readonly RULE_interfaceMember = 6; + public static readonly RULE_operationMember = 7; + public static readonly RULE_valueMember = 8; + public static readonly RULE_valueMemberOperation = 9; + public static readonly RULE_relationshipMember = 10; + public static readonly RULE_relationshipOperation = 11; + public static readonly RULE_targetConstraint = 12; + public static readonly RULE_packageDecl = 13; + public static readonly RULE_packageExport = 14; + public static readonly RULE_packageOperationExport = 15; + public static readonly RULE_packageFunctionExport = 16; + public static readonly RULE_packageConstructorExport = 17; + public static readonly RULE_eventClause = 18; + public static readonly RULE_operationMode = 19; + public static readonly RULE_receiverRequirement = 20; + public static readonly RULE_identifierList = 21; + public static readonly RULE_dependencyBlock = 22; + public static readonly RULE_dependencyPort = 23; + public static readonly RULE_primitiveList = 24; + public static readonly RULE_primitive = 25; + public static readonly RULE_sharedAttachmentDecl = 26; + public static readonly RULE_attachmentDecl = 27; + public static readonly RULE_stateDecl = 28; + public static readonly RULE_storagePolicy = 29; + public static readonly RULE_edgeDecl = 30; + public static readonly RULE_edgeEndpoint = 31; + public static readonly RULE_conformanceDecl = 32; + public static readonly RULE_conformanceItem = 33; + public static readonly RULE_operationBindingDecl = 34; + public static readonly RULE_memberOperationRef = 35; + public static readonly RULE_operationName = 36; + public static readonly RULE_operationProvider = 37; + public static readonly RULE_statePrimitive = 38; + public static readonly RULE_edgePrimitive = 39; + public static readonly RULE_dependencyBindingBlock = 40; + public static readonly RULE_dependencyBinding = 41; + public static readonly RULE_constructorBindingDecl = 42; + public static readonly RULE_valueType = 43; + public static readonly RULE_scalarType = 44; + public static readonly RULE_cardinality = 45; + public static readonly RULE_jsonLiteral = 46; + public static readonly RULE_jsonObject = 47; + public static readonly RULE_jsonMember = 48; + public static readonly RULE_jsonArray = 49; + public static readonly RULE_identifier = 50; + public static readonly RULE_stringLiteral = 51; + + public static readonly literalNames = [ + null, "'workspace'", "'atom'", "'interface'", "'interfaces'", "'package'", + "'value'", "'relation'", "'operation'", "'function'", "'constructor'", + "'constructs'", "'conform'", "'as'", "'bind'", "'to'", "'private'", + "'shared'", "'state'", "'edge'", "'projection'", "'with'", "'on'", + "'policy'", "'default'", "'source'", "'repository'", "'commit'", + "'revision'", "'id'", "'doc'", "'mode'", "'emits'", "'receiver'", + "'requires'", "'any'", "'get'", "'set'", "'watch'", "'start'", "'stop'", + "'read'", "'write'", "'resolve'", "'connect'", "'disconnect'", "'call'", + "'watch-start'", "'watch-stop'", "'subscribe'", "'unsubscribe'", + "'optimistic-register'", "'crdt'", "'optional-one'", "'exactly-one'", + "'many-unique'", "'many'", "'ordered'", "'unit'", "'watch-handle'", + "'message'", "'atom-ref'", "'interface-ref'", "'optional'", "'list'", + "'bool'", "'bytes'", "'double'", "'int32'", "'int64'", "'string'", + "'uint32'", "'uint64'", "'true'", "'false'", "'null'", "'->'", "':'", + "';'", "','", "'.'", "'{'", "'}'", "'['", "']'", "'('", "')'", "'<'", + "'>'" + ]; + + public static readonly symbolicNames = [ + null, "WORKSPACE", "ATOM", "INTERFACE", "INTERFACES", "PACKAGE", + "VALUE", "RELATION", "OPERATION", "FUNCTION", "CONSTRUCTOR", "CONSTRUCTS", + "CONFORM", "AS", "BIND", "TO", "PRIVATE", "SHARED", "STATE", "EDGE", + "PROJECTION", "WITH", "ON", "POLICY", "DEFAULT", "SOURCE", "REPOSITORY", + "COMMIT", "REVISION", "ID", "DOC", "MODE", "EMITS", "RECEIVER", + "REQUIRES", "ANY", "GET", "SET", "WATCH", "START", "STOP", "READ", + "WRITE", "RESOLVE", "CONNECT", "DISCONNECT", "CALL", "WATCH_START", + "WATCH_STOP", "SUBSCRIBE", "UNSUBSCRIBE", "OPTIMISTIC_REGISTER", + "CRDT", "OPTIONAL_ONE", "EXACTLY_ONE", "MANY_UNIQUE", "MANY", "ORDERED", + "UNIT", "WATCH_HANDLE", "MESSAGE", "ATOM_REF", "INTERFACE_REF", + "OPTIONAL", "LIST", "BOOL", "BYTES", "DOUBLE", "INT32", "INT64", + "STRING", "UINT32", "UINT64", "TRUE", "FALSE", "NULL", "ARROW", + "COLON", "SEMI", "COMMA", "DOT", "LBRACE", "RBRACE", "LBRACK", "RBRACK", + "LPAREN", "RPAREN", "LT", "GT", "INTEGER", "JSON_NUMBER", "IDENTIFIER", + "STRING_LITERAL", "LINE_COMMENT", "BLOCK_COMMENT", "WS" + ]; + public static readonly ruleNames = [ + "document", "workspaceDecl", "workspaceItem", "atomDecl", "interfaceDecl", + "sourceBlock", "interfaceMember", "operationMember", "valueMember", + "valueMemberOperation", "relationshipMember", "relationshipOperation", + "targetConstraint", "packageDecl", "packageExport", "packageOperationExport", + "packageFunctionExport", "packageConstructorExport", "eventClause", + "operationMode", "receiverRequirement", "identifierList", "dependencyBlock", + "dependencyPort", "primitiveList", "primitive", "sharedAttachmentDecl", + "attachmentDecl", "stateDecl", "storagePolicy", "edgeDecl", "edgeEndpoint", + "conformanceDecl", "conformanceItem", "operationBindingDecl", "memberOperationRef", + "operationName", "operationProvider", "statePrimitive", "edgePrimitive", + "dependencyBindingBlock", "dependencyBinding", "constructorBindingDecl", + "valueType", "scalarType", "cardinality", "jsonLiteral", "jsonObject", + "jsonMember", "jsonArray", "identifier", "stringLiteral", + ]; + + public get grammarFileName(): string { return "QuixosCapability.g4"; } + public get literalNames(): (string | null)[] { return QuixosCapabilityParser.literalNames; } + public get symbolicNames(): (string | null)[] { return QuixosCapabilityParser.symbolicNames; } + public get ruleNames(): string[] { return QuixosCapabilityParser.ruleNames; } + public get serializedATN(): number[] { return QuixosCapabilityParser._serializedATN; } + + protected createFailedPredicateException(predicate?: string, message?: string): antlr.FailedPredicateException { + return new antlr.FailedPredicateException(this, predicate, message); + } + + public constructor(input: antlr.TokenStream) { + super(input); + this.interpreter = new antlr.ParserATNSimulator(this, QuixosCapabilityParser._ATN, QuixosCapabilityParser.decisionsToDFA, new antlr.PredictionContextCache()); + } + public document(): DocumentContext { + let localContext = new DocumentContext(this.context, this.state); + this.enterRule(localContext, 0, QuixosCapabilityParser.RULE_document); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 104; + this.workspaceDecl(); + this.state = 105; + this.match(QuixosCapabilityParser.EOF); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public workspaceDecl(): WorkspaceDeclContext { + let localContext = new WorkspaceDeclContext(this.context, this.state); + this.enterRule(localContext, 2, QuixosCapabilityParser.RULE_workspaceDecl); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 107; + this.match(QuixosCapabilityParser.WORKSPACE); + this.state = 108; + this.identifier(); + this.state = 109; + this.match(QuixosCapabilityParser.ID); + this.state = 110; + this.stringLiteral(); + this.state = 111; + this.match(QuixosCapabilityParser.REVISION); + this.state = 112; + this.stringLiteral(); + this.state = 113; + this.match(QuixosCapabilityParser.COMMIT); + this.state = 114; + this.stringLiteral(); + this.state = 115; + this.match(QuixosCapabilityParser.LBRACE); + this.state = 119; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 136236) !== 0)) { + { + { + this.state = 116; + this.workspaceItem(); + } + } + this.state = 121; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + } + this.state = 122; + this.match(QuixosCapabilityParser.RBRACE); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public workspaceItem(): WorkspaceItemContext { + let localContext = new WorkspaceItemContext(this.context, this.state); + this.enterRule(localContext, 4, QuixosCapabilityParser.RULE_workspaceItem); + try { + this.state = 130; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.ATOM: + this.enterOuterAlt(localContext, 1); + { + this.state = 124; + this.atomDecl(); + } + break; + case QuixosCapabilityParser.INTERFACE: + this.enterOuterAlt(localContext, 2); + { + this.state = 125; + this.interfaceDecl(); + } + break; + case QuixosCapabilityParser.PACKAGE: + this.enterOuterAlt(localContext, 3); + { + this.state = 126; + this.packageDecl(); + } + break; + case QuixosCapabilityParser.SHARED: + this.enterOuterAlt(localContext, 4); + { + this.state = 127; + this.sharedAttachmentDecl(); + } + break; + case QuixosCapabilityParser.CONFORM: + this.enterOuterAlt(localContext, 5); + { + this.state = 128; + this.conformanceDecl(); + } + break; + case QuixosCapabilityParser.CONSTRUCTOR: + this.enterOuterAlt(localContext, 6); + { + this.state = 129; + this.constructorBindingDecl(); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public atomDecl(): AtomDeclContext { + let localContext = new AtomDeclContext(this.context, this.state); + this.enterRule(localContext, 6, QuixosCapabilityParser.RULE_atomDecl); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 132; + this.match(QuixosCapabilityParser.ATOM); + this.state = 133; + this.identifier(); + this.state = 134; + this.match(QuixosCapabilityParser.ID); + this.state = 135; + this.stringLiteral(); + this.state = 138; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (_la === 30) { + { + this.state = 136; + this.match(QuixosCapabilityParser.DOC); + this.state = 137; + this.stringLiteral(); + } + } + + this.state = 140; + this.match(QuixosCapabilityParser.SEMI); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public interfaceDecl(): InterfaceDeclContext { + let localContext = new InterfaceDeclContext(this.context, this.state); + this.enterRule(localContext, 8, QuixosCapabilityParser.RULE_interfaceDecl); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 142; + this.match(QuixosCapabilityParser.INTERFACE); + this.state = 143; + this.identifier(); + this.state = 144; + this.match(QuixosCapabilityParser.ID); + this.state = 145; + this.stringLiteral(); + this.state = 146; + this.match(QuixosCapabilityParser.REVISION); + this.state = 147; + this.stringLiteral(); + this.state = 148; + this.sourceBlock(); + this.state = 149; + this.match(QuixosCapabilityParser.LBRACE); + this.state = 153; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 448) !== 0)) { + { + { + this.state = 150; + this.interfaceMember(); + } + } + this.state = 155; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + } + this.state = 156; + this.match(QuixosCapabilityParser.RBRACE); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public sourceBlock(): SourceBlockContext { + let localContext = new SourceBlockContext(this.context, this.state); + this.enterRule(localContext, 10, QuixosCapabilityParser.RULE_sourceBlock); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 158; + this.match(QuixosCapabilityParser.SOURCE); + this.state = 159; + this.match(QuixosCapabilityParser.LBRACE); + this.state = 160; + this.match(QuixosCapabilityParser.REPOSITORY); + this.state = 161; + this.stringLiteral(); + this.state = 162; + this.match(QuixosCapabilityParser.SEMI); + this.state = 163; + this.match(QuixosCapabilityParser.COMMIT); + this.state = 164; + this.stringLiteral(); + this.state = 165; + this.match(QuixosCapabilityParser.SEMI); + this.state = 166; + this.match(QuixosCapabilityParser.RBRACE); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public interfaceMember(): InterfaceMemberContext { + let localContext = new InterfaceMemberContext(this.context, this.state); + this.enterRule(localContext, 12, QuixosCapabilityParser.RULE_interfaceMember); + try { + this.state = 171; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.VALUE: + this.enterOuterAlt(localContext, 1); + { + this.state = 168; + this.valueMember(); + } + break; + case QuixosCapabilityParser.RELATION: + this.enterOuterAlt(localContext, 2); + { + this.state = 169; + this.relationshipMember(); + } + break; + case QuixosCapabilityParser.OPERATION: + this.enterOuterAlt(localContext, 3); + { + this.state = 170; + this.operationMember(); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public operationMember(): OperationMemberContext { + let localContext = new OperationMemberContext(this.context, this.state); + this.enterRule(localContext, 14, QuixosCapabilityParser.RULE_operationMember); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 173; + this.match(QuixosCapabilityParser.OPERATION); + this.state = 174; + this.identifier(); + this.state = 175; + this.match(QuixosCapabilityParser.ID); + this.state = 176; + this.stringLiteral(); + this.state = 177; + this.match(QuixosCapabilityParser.COLON); + this.state = 178; + this.valueType(); + this.state = 179; + this.match(QuixosCapabilityParser.ARROW); + this.state = 180; + this.valueType(); + this.state = 181; + this.match(QuixosCapabilityParser.LBRACE); + this.state = 182; + this.match(QuixosCapabilityParser.CALL); + this.state = 183; + this.match(QuixosCapabilityParser.ID); + this.state = 184; + this.stringLiteral(); + this.state = 185; + this.match(QuixosCapabilityParser.SEMI); + this.state = 186; + this.match(QuixosCapabilityParser.RBRACE); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public valueMember(): ValueMemberContext { + let localContext = new ValueMemberContext(this.context, this.state); + this.enterRule(localContext, 16, QuixosCapabilityParser.RULE_valueMember); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 188; + this.match(QuixosCapabilityParser.VALUE); + this.state = 189; + this.identifier(); + this.state = 190; + this.match(QuixosCapabilityParser.ID); + this.state = 191; + this.stringLiteral(); + this.state = 192; + this.match(QuixosCapabilityParser.COLON); + this.state = 193; + this.valueType(); + this.state = 194; + this.match(QuixosCapabilityParser.LBRACE); + this.state = 198; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + while (((((_la - 36)) & ~0x1F) === 0 && ((1 << (_la - 36)) & 7) !== 0)) { + { + { + this.state = 195; + this.valueMemberOperation(); + } + } + this.state = 200; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + } + this.state = 201; + this.match(QuixosCapabilityParser.RBRACE); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public valueMemberOperation(): ValueMemberOperationContext { + let localContext = new ValueMemberOperationContext(this.context, this.state); + this.enterRule(localContext, 18, QuixosCapabilityParser.RULE_valueMemberOperation); + try { + this.state = 222; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.GET: + this.enterOuterAlt(localContext, 1); + { + this.state = 203; + this.match(QuixosCapabilityParser.GET); + this.state = 204; + this.match(QuixosCapabilityParser.ID); + this.state = 205; + this.stringLiteral(); + this.state = 206; + this.match(QuixosCapabilityParser.SEMI); + } + break; + case QuixosCapabilityParser.SET: + this.enterOuterAlt(localContext, 2); + { + this.state = 208; + this.match(QuixosCapabilityParser.SET); + this.state = 209; + this.match(QuixosCapabilityParser.ID); + this.state = 210; + this.stringLiteral(); + this.state = 211; + this.match(QuixosCapabilityParser.SEMI); + } + break; + case QuixosCapabilityParser.WATCH: + this.enterOuterAlt(localContext, 3); + { + this.state = 213; + this.match(QuixosCapabilityParser.WATCH); + this.state = 214; + this.match(QuixosCapabilityParser.START); + this.state = 215; + this.match(QuixosCapabilityParser.ID); + this.state = 216; + this.stringLiteral(); + this.state = 217; + this.match(QuixosCapabilityParser.STOP); + this.state = 218; + this.match(QuixosCapabilityParser.ID); + this.state = 219; + this.stringLiteral(); + this.state = 220; + this.match(QuixosCapabilityParser.SEMI); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public relationshipMember(): RelationshipMemberContext { + let localContext = new RelationshipMemberContext(this.context, this.state); + this.enterRule(localContext, 20, QuixosCapabilityParser.RULE_relationshipMember); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 224; + this.match(QuixosCapabilityParser.RELATION); + this.state = 225; + this.identifier(); + this.state = 226; + this.match(QuixosCapabilityParser.ID); + this.state = 227; + this.stringLiteral(); + this.state = 228; + this.match(QuixosCapabilityParser.COLON); + this.state = 229; + this.cardinality(); + this.state = 230; + this.targetConstraint(); + this.state = 232; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (_la === 57) { + { + this.state = 231; + this.match(QuixosCapabilityParser.ORDERED); + } + } + + this.state = 234; + this.match(QuixosCapabilityParser.LBRACE); + this.state = 238; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + while (((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & 225) !== 0)) { + { + { + this.state = 235; + this.relationshipOperation(); + } + } + this.state = 240; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + } + this.state = 241; + this.match(QuixosCapabilityParser.RBRACE); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public relationshipOperation(): RelationshipOperationContext { + let localContext = new RelationshipOperationContext(this.context, this.state); + this.enterRule(localContext, 22, QuixosCapabilityParser.RULE_relationshipOperation); + try { + this.state = 267; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.RESOLVE: + this.enterOuterAlt(localContext, 1); + { + this.state = 243; + this.match(QuixosCapabilityParser.RESOLVE); + this.state = 244; + this.match(QuixosCapabilityParser.ID); + this.state = 245; + this.stringLiteral(); + this.state = 246; + this.match(QuixosCapabilityParser.SEMI); + } + break; + case QuixosCapabilityParser.CONNECT: + this.enterOuterAlt(localContext, 2); + { + this.state = 248; + this.match(QuixosCapabilityParser.CONNECT); + this.state = 249; + this.match(QuixosCapabilityParser.ID); + this.state = 250; + this.stringLiteral(); + this.state = 251; + this.match(QuixosCapabilityParser.SEMI); + } + break; + case QuixosCapabilityParser.DISCONNECT: + this.enterOuterAlt(localContext, 3); + { + this.state = 253; + this.match(QuixosCapabilityParser.DISCONNECT); + this.state = 254; + this.match(QuixosCapabilityParser.ID); + this.state = 255; + this.stringLiteral(); + this.state = 256; + this.match(QuixosCapabilityParser.SEMI); + } + break; + case QuixosCapabilityParser.WATCH: + this.enterOuterAlt(localContext, 4); + { + this.state = 258; + this.match(QuixosCapabilityParser.WATCH); + this.state = 259; + this.match(QuixosCapabilityParser.START); + this.state = 260; + this.match(QuixosCapabilityParser.ID); + this.state = 261; + this.stringLiteral(); + this.state = 262; + this.match(QuixosCapabilityParser.STOP); + this.state = 263; + this.match(QuixosCapabilityParser.ID); + this.state = 264; + this.stringLiteral(); + this.state = 265; + this.match(QuixosCapabilityParser.SEMI); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public targetConstraint(): TargetConstraintContext { + let localContext = new TargetConstraintContext(this.context, this.state); + this.enterRule(localContext, 24, QuixosCapabilityParser.RULE_targetConstraint); + try { + this.state = 273; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.ATOM: + this.enterOuterAlt(localContext, 1); + { + this.state = 269; + this.match(QuixosCapabilityParser.ATOM); + this.state = 270; + this.identifier(); + } + break; + case QuixosCapabilityParser.INTERFACE: + this.enterOuterAlt(localContext, 2); + { + this.state = 271; + this.match(QuixosCapabilityParser.INTERFACE); + this.state = 272; + this.identifier(); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public packageDecl(): PackageDeclContext { + let localContext = new PackageDeclContext(this.context, this.state); + this.enterRule(localContext, 26, QuixosCapabilityParser.RULE_packageDecl); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 275; + this.match(QuixosCapabilityParser.PACKAGE); + this.state = 276; + this.identifier(); + this.state = 277; + this.match(QuixosCapabilityParser.ID); + this.state = 278; + this.stringLiteral(); + this.state = 279; + this.match(QuixosCapabilityParser.REVISION); + this.state = 280; + this.stringLiteral(); + this.state = 281; + this.sourceBlock(); + this.state = 282; + this.match(QuixosCapabilityParser.LBRACE); + this.state = 286; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 1792) !== 0)) { + { + { + this.state = 283; + this.packageExport(); + } + } + this.state = 288; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + } + this.state = 289; + this.match(QuixosCapabilityParser.RBRACE); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public packageExport(): PackageExportContext { + let localContext = new PackageExportContext(this.context, this.state); + this.enterRule(localContext, 28, QuixosCapabilityParser.RULE_packageExport); + try { + this.state = 294; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.OPERATION: + this.enterOuterAlt(localContext, 1); + { + this.state = 291; + this.packageOperationExport(); + } + break; + case QuixosCapabilityParser.FUNCTION: + this.enterOuterAlt(localContext, 2); + { + this.state = 292; + this.packageFunctionExport(); + } + break; + case QuixosCapabilityParser.CONSTRUCTOR: + this.enterOuterAlt(localContext, 3); + { + this.state = 293; + this.packageConstructorExport(); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public packageOperationExport(): PackageOperationExportContext { + let localContext = new PackageOperationExportContext(this.context, this.state); + this.enterRule(localContext, 30, QuixosCapabilityParser.RULE_packageOperationExport); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 296; + this.match(QuixosCapabilityParser.OPERATION); + this.state = 297; + this.identifier(); + this.state = 298; + this.match(QuixosCapabilityParser.ID); + this.state = 299; + this.stringLiteral(); + this.state = 300; + this.match(QuixosCapabilityParser.COLON); + this.state = 301; + this.valueType(); + this.state = 302; + this.match(QuixosCapabilityParser.ARROW); + this.state = 303; + this.valueType(); + this.state = 304; + this.match(QuixosCapabilityParser.MODE); + this.state = 305; + this.operationMode(); + this.state = 307; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (_la === 32) { + { + this.state = 306; + this.eventClause(); + } + } + + this.state = 309; + this.match(QuixosCapabilityParser.RECEIVER); + this.state = 310; + this.receiverRequirement(); + this.state = 312; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (_la === 34) { + { + this.state = 311; + this.dependencyBlock(); + } + } + + this.state = 314; + this.match(QuixosCapabilityParser.SEMI); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public packageFunctionExport(): PackageFunctionExportContext { + let localContext = new PackageFunctionExportContext(this.context, this.state); + this.enterRule(localContext, 32, QuixosCapabilityParser.RULE_packageFunctionExport); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 316; + this.match(QuixosCapabilityParser.FUNCTION); + this.state = 317; + this.identifier(); + this.state = 318; + this.match(QuixosCapabilityParser.ID); + this.state = 319; + this.stringLiteral(); + this.state = 320; + this.match(QuixosCapabilityParser.COLON); + this.state = 321; + this.valueType(); + this.state = 322; + this.match(QuixosCapabilityParser.ARROW); + this.state = 323; + this.valueType(); + this.state = 325; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (_la === 34) { + { + this.state = 324; + this.dependencyBlock(); + } + } + + this.state = 327; + this.match(QuixosCapabilityParser.SEMI); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public packageConstructorExport(): PackageConstructorExportContext { + let localContext = new PackageConstructorExportContext(this.context, this.state); + this.enterRule(localContext, 34, QuixosCapabilityParser.RULE_packageConstructorExport); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 329; + this.match(QuixosCapabilityParser.CONSTRUCTOR); + this.state = 330; + this.identifier(); + this.state = 331; + this.match(QuixosCapabilityParser.ID); + this.state = 332; + this.stringLiteral(); + this.state = 333; + this.match(QuixosCapabilityParser.CONSTRUCTS); + this.state = 334; + this.identifier(); + this.state = 335; + this.match(QuixosCapabilityParser.COLON); + this.state = 336; + this.valueType(); + this.state = 338; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (_la === 34) { + { + this.state = 337; + this.dependencyBlock(); + } + } + + this.state = 340; + this.match(QuixosCapabilityParser.SEMI); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public eventClause(): EventClauseContext { + let localContext = new EventClauseContext(this.context, this.state); + this.enterRule(localContext, 36, QuixosCapabilityParser.RULE_eventClause); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 342; + this.match(QuixosCapabilityParser.EMITS); + this.state = 343; + this.valueType(); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public operationMode(): OperationModeContext { + let localContext = new OperationModeContext(this.context, this.state); + this.enterRule(localContext, 38, QuixosCapabilityParser.RULE_operationMode); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 345; + _la = this.tokenStream.LA(1); + if(!(((((_la - 46)) & ~0x1F) === 0 && ((1 << (_la - 46)) & 31) !== 0))) { + this.errorHandler.recoverInline(this); + } + else { + this.errorHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public receiverRequirement(): ReceiverRequirementContext { + let localContext = new ReceiverRequirementContext(this.context, this.state); + this.enterRule(localContext, 40, QuixosCapabilityParser.RULE_receiverRequirement); + let _la: number; + try { + this.state = 356; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.ANY: + this.enterOuterAlt(localContext, 1); + { + this.state = 347; + this.match(QuixosCapabilityParser.ANY); + } + break; + case QuixosCapabilityParser.ATOM: + this.enterOuterAlt(localContext, 2); + { + this.state = 348; + this.match(QuixosCapabilityParser.ATOM); + this.state = 349; + this.identifier(); + } + break; + case QuixosCapabilityParser.INTERFACES: + this.enterOuterAlt(localContext, 3); + { + this.state = 350; + this.match(QuixosCapabilityParser.INTERFACES); + this.state = 351; + this.match(QuixosCapabilityParser.LBRACK); + this.state = 353; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (_la === 25 || _la === 91) { + { + this.state = 352; + this.identifierList(); + } + } + + this.state = 355; + this.match(QuixosCapabilityParser.RBRACK); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public identifierList(): IdentifierListContext { + let localContext = new IdentifierListContext(this.context, this.state); + this.enterRule(localContext, 42, QuixosCapabilityParser.RULE_identifierList); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 358; + this.identifier(); + this.state = 363; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + while (_la === 79) { + { + { + this.state = 359; + this.match(QuixosCapabilityParser.COMMA); + this.state = 360; + this.identifier(); + } + } + this.state = 365; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + } + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public dependencyBlock(): DependencyBlockContext { + let localContext = new DependencyBlockContext(this.context, this.state); + this.enterRule(localContext, 44, QuixosCapabilityParser.RULE_dependencyBlock); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 366; + this.match(QuixosCapabilityParser.REQUIRES); + this.state = 367; + this.match(QuixosCapabilityParser.LBRACE); + this.state = 371; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 787464) !== 0)) { + { + { + this.state = 368; + this.dependencyPort(); + } + } + this.state = 373; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + } + this.state = 374; + this.match(QuixosCapabilityParser.RBRACE); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public dependencyPort(): DependencyPortContext { + let localContext = new DependencyPortContext(this.context, this.state); + this.enterRule(localContext, 46, QuixosCapabilityParser.RULE_dependencyPort); + try { + this.state = 411; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.STATE: + this.enterOuterAlt(localContext, 1); + { + this.state = 376; + this.match(QuixosCapabilityParser.STATE); + this.state = 377; + this.identifier(); + this.state = 378; + this.match(QuixosCapabilityParser.ID); + this.state = 379; + this.stringLiteral(); + this.state = 380; + this.match(QuixosCapabilityParser.COLON); + this.state = 381; + this.valueType(); + this.state = 382; + this.primitiveList(); + this.state = 383; + this.match(QuixosCapabilityParser.SEMI); + } + break; + case QuixosCapabilityParser.EDGE: + this.enterOuterAlt(localContext, 2); + { + this.state = 385; + this.match(QuixosCapabilityParser.EDGE); + this.state = 386; + this.identifier(); + this.state = 387; + this.match(QuixosCapabilityParser.ID); + this.state = 388; + this.stringLiteral(); + this.state = 389; + this.match(QuixosCapabilityParser.COLON); + this.state = 390; + this.cardinality(); + this.state = 391; + this.targetConstraint(); + this.state = 392; + this.primitiveList(); + this.state = 393; + this.match(QuixosCapabilityParser.SEMI); + } + break; + case QuixosCapabilityParser.INTERFACE: + this.enterOuterAlt(localContext, 3); + { + this.state = 395; + this.match(QuixosCapabilityParser.INTERFACE); + this.state = 396; + this.identifier(); + this.state = 397; + this.match(QuixosCapabilityParser.ID); + this.state = 398; + this.stringLiteral(); + this.state = 399; + this.match(QuixosCapabilityParser.COLON); + this.state = 400; + this.identifier(); + this.state = 401; + this.match(QuixosCapabilityParser.SEMI); + } + break; + case QuixosCapabilityParser.CONSTRUCTOR: + this.enterOuterAlt(localContext, 4); + { + this.state = 403; + this.match(QuixosCapabilityParser.CONSTRUCTOR); + this.state = 404; + this.identifier(); + this.state = 405; + this.match(QuixosCapabilityParser.ID); + this.state = 406; + this.stringLiteral(); + this.state = 407; + this.match(QuixosCapabilityParser.COLON); + this.state = 408; + this.identifier(); + this.state = 409; + this.match(QuixosCapabilityParser.SEMI); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public primitiveList(): PrimitiveListContext { + let localContext = new PrimitiveListContext(this.context, this.state); + this.enterRule(localContext, 48, QuixosCapabilityParser.RULE_primitiveList); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 413; + this.match(QuixosCapabilityParser.LBRACK); + this.state = 414; + this.primitive(); + this.state = 419; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + while (_la === 79) { + { + { + this.state = 415; + this.match(QuixosCapabilityParser.COMMA); + this.state = 416; + this.primitive(); + } + } + this.state = 421; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + } + this.state = 422; + this.match(QuixosCapabilityParser.RBRACK); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public primitive(): PrimitiveContext { + let localContext = new PrimitiveContext(this.context, this.state); + this.enterRule(localContext, 50, QuixosCapabilityParser.RULE_primitive); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 424; + _la = this.tokenStream.LA(1); + if(!(((((_la - 41)) & ~0x1F) === 0 && ((1 << (_la - 41)) & 223) !== 0))) { + this.errorHandler.recoverInline(this); + } + else { + this.errorHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public sharedAttachmentDecl(): SharedAttachmentDeclContext { + let localContext = new SharedAttachmentDeclContext(this.context, this.state); + this.enterRule(localContext, 52, QuixosCapabilityParser.RULE_sharedAttachmentDecl); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 426; + this.match(QuixosCapabilityParser.SHARED); + this.state = 427; + this.attachmentDecl(); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public attachmentDecl(): AttachmentDeclContext { + let localContext = new AttachmentDeclContext(this.context, this.state); + this.enterRule(localContext, 54, QuixosCapabilityParser.RULE_attachmentDecl); + try { + this.state = 431; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.STATE: + this.enterOuterAlt(localContext, 1); + { + this.state = 429; + this.stateDecl(); + } + break; + case QuixosCapabilityParser.EDGE: + this.enterOuterAlt(localContext, 2); + { + this.state = 430; + this.edgeDecl(); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public stateDecl(): StateDeclContext { + let localContext = new StateDeclContext(this.context, this.state); + this.enterRule(localContext, 56, QuixosCapabilityParser.RULE_stateDecl); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 433; + this.match(QuixosCapabilityParser.STATE); + this.state = 434; + this.identifier(); + this.state = 435; + this.match(QuixosCapabilityParser.ID); + this.state = 436; + this.stringLiteral(); + this.state = 437; + this.match(QuixosCapabilityParser.ON); + this.state = 438; + this.identifier(); + this.state = 439; + this.match(QuixosCapabilityParser.COLON); + this.state = 440; + this.valueType(); + this.state = 441; + this.match(QuixosCapabilityParser.POLICY); + this.state = 442; + this.storagePolicy(); + this.state = 445; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (_la === 24) { + { + this.state = 443; + this.match(QuixosCapabilityParser.DEFAULT); + this.state = 444; + this.jsonLiteral(); + } + } + + this.state = 447; + this.match(QuixosCapabilityParser.SEMI); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public storagePolicy(): StoragePolicyContext { + let localContext = new StoragePolicyContext(this.context, this.state); + this.enterRule(localContext, 58, QuixosCapabilityParser.RULE_storagePolicy); + try { + this.state = 455; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.OPTIMISTIC_REGISTER: + this.enterOuterAlt(localContext, 1); + { + this.state = 449; + this.match(QuixosCapabilityParser.OPTIMISTIC_REGISTER); + } + break; + case QuixosCapabilityParser.CRDT: + this.enterOuterAlt(localContext, 2); + { + this.state = 450; + this.match(QuixosCapabilityParser.CRDT); + this.state = 451; + this.match(QuixosCapabilityParser.LPAREN); + this.state = 452; + this.valueType(); + this.state = 453; + this.match(QuixosCapabilityParser.RPAREN); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public edgeDecl(): EdgeDeclContext { + let localContext = new EdgeDeclContext(this.context, this.state); + this.enterRule(localContext, 60, QuixosCapabilityParser.RULE_edgeDecl); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 457; + this.match(QuixosCapabilityParser.EDGE); + this.state = 458; + this.identifier(); + this.state = 459; + this.match(QuixosCapabilityParser.ID); + this.state = 460; + this.stringLiteral(); + this.state = 461; + this.match(QuixosCapabilityParser.LBRACE); + this.state = 462; + this.edgeEndpoint(); + this.state = 463; + this.edgeEndpoint(); + this.state = 464; + this.match(QuixosCapabilityParser.RBRACE); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public edgeEndpoint(): EdgeEndpointContext { + let localContext = new EdgeEndpointContext(this.context, this.state); + this.enterRule(localContext, 62, QuixosCapabilityParser.RULE_edgeEndpoint); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 466; + this.targetConstraint(); + this.state = 467; + this.match(QuixosCapabilityParser.PROJECTION); + this.state = 468; + this.identifier(); + this.state = 469; + this.match(QuixosCapabilityParser.ID); + this.state = 470; + this.stringLiteral(); + this.state = 471; + this.cardinality(); + this.state = 473; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (_la === 57) { + { + this.state = 472; + this.match(QuixosCapabilityParser.ORDERED); + } + } + + this.state = 475; + this.match(QuixosCapabilityParser.SEMI); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public conformanceDecl(): ConformanceDeclContext { + let localContext = new ConformanceDeclContext(this.context, this.state); + this.enterRule(localContext, 64, QuixosCapabilityParser.RULE_conformanceDecl); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 477; + this.match(QuixosCapabilityParser.CONFORM); + this.state = 478; + this.identifier(); + this.state = 479; + this.match(QuixosCapabilityParser.AS); + this.state = 480; + this.identifier(); + this.state = 481; + this.match(QuixosCapabilityParser.LBRACE); + this.state = 485; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + while (_la === 14 || _la === 16) { + { + { + this.state = 482; + this.conformanceItem(); + } + } + this.state = 487; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + } + this.state = 488; + this.match(QuixosCapabilityParser.RBRACE); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public conformanceItem(): ConformanceItemContext { + let localContext = new ConformanceItemContext(this.context, this.state); + this.enterRule(localContext, 66, QuixosCapabilityParser.RULE_conformanceItem); + try { + this.state = 493; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.PRIVATE: + this.enterOuterAlt(localContext, 1); + { + this.state = 490; + this.match(QuixosCapabilityParser.PRIVATE); + this.state = 491; + this.attachmentDecl(); + } + break; + case QuixosCapabilityParser.BIND: + this.enterOuterAlt(localContext, 2); + { + this.state = 492; + this.operationBindingDecl(); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public operationBindingDecl(): OperationBindingDeclContext { + let localContext = new OperationBindingDeclContext(this.context, this.state); + this.enterRule(localContext, 68, QuixosCapabilityParser.RULE_operationBindingDecl); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 495; + this.match(QuixosCapabilityParser.BIND); + this.state = 496; + this.memberOperationRef(); + this.state = 497; + this.match(QuixosCapabilityParser.TO); + this.state = 498; + this.operationProvider(); + this.state = 499; + this.match(QuixosCapabilityParser.SEMI); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public memberOperationRef(): MemberOperationRefContext { + let localContext = new MemberOperationRefContext(this.context, this.state); + this.enterRule(localContext, 70, QuixosCapabilityParser.RULE_memberOperationRef); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 501; + this.identifier(); + this.state = 502; + this.match(QuixosCapabilityParser.DOT); + this.state = 503; + this.operationName(); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public operationName(): OperationNameContext { + let localContext = new OperationNameContext(this.context, this.state); + this.enterRule(localContext, 72, QuixosCapabilityParser.RULE_operationName); + try { + this.state = 516; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.SOURCE: + case QuixosCapabilityParser.IDENTIFIER: + this.enterOuterAlt(localContext, 1); + { + this.state = 505; + this.identifier(); + } + break; + case QuixosCapabilityParser.CALL: + this.enterOuterAlt(localContext, 2); + { + this.state = 506; + this.match(QuixosCapabilityParser.CALL); + } + break; + case QuixosCapabilityParser.GET: + this.enterOuterAlt(localContext, 3); + { + this.state = 507; + this.match(QuixosCapabilityParser.GET); + } + break; + case QuixosCapabilityParser.SET: + this.enterOuterAlt(localContext, 4); + { + this.state = 508; + this.match(QuixosCapabilityParser.SET); + } + break; + case QuixosCapabilityParser.RESOLVE: + this.enterOuterAlt(localContext, 5); + { + this.state = 509; + this.match(QuixosCapabilityParser.RESOLVE); + } + break; + case QuixosCapabilityParser.CONNECT: + this.enterOuterAlt(localContext, 6); + { + this.state = 510; + this.match(QuixosCapabilityParser.CONNECT); + } + break; + case QuixosCapabilityParser.DISCONNECT: + this.enterOuterAlt(localContext, 7); + { + this.state = 511; + this.match(QuixosCapabilityParser.DISCONNECT); + } + break; + case QuixosCapabilityParser.WATCH_START: + this.enterOuterAlt(localContext, 8); + { + this.state = 512; + this.match(QuixosCapabilityParser.WATCH_START); + } + break; + case QuixosCapabilityParser.WATCH_STOP: + this.enterOuterAlt(localContext, 9); + { + this.state = 513; + this.match(QuixosCapabilityParser.WATCH_STOP); + } + break; + case QuixosCapabilityParser.SUBSCRIBE: + this.enterOuterAlt(localContext, 10); + { + this.state = 514; + this.match(QuixosCapabilityParser.SUBSCRIBE); + } + break; + case QuixosCapabilityParser.UNSUBSCRIBE: + this.enterOuterAlt(localContext, 11); + { + this.state = 515; + this.match(QuixosCapabilityParser.UNSUBSCRIBE); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public operationProvider(): OperationProviderContext { + let localContext = new OperationProviderContext(this.context, this.state); + this.enterRule(localContext, 74, QuixosCapabilityParser.RULE_operationProvider); + let _la: number; + try { + this.state = 537; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.STATE: + this.enterOuterAlt(localContext, 1); + { + this.state = 518; + this.match(QuixosCapabilityParser.STATE); + this.state = 519; + this.identifier(); + this.state = 520; + this.match(QuixosCapabilityParser.DOT); + this.state = 521; + this.statePrimitive(); + } + break; + case QuixosCapabilityParser.EDGE: + this.enterOuterAlt(localContext, 2); + { + this.state = 523; + this.match(QuixosCapabilityParser.EDGE); + this.state = 524; + this.identifier(); + this.state = 525; + this.match(QuixosCapabilityParser.DOT); + this.state = 526; + this.identifier(); + this.state = 527; + this.match(QuixosCapabilityParser.DOT); + this.state = 528; + this.edgePrimitive(); + } + break; + case QuixosCapabilityParser.PACKAGE: + this.enterOuterAlt(localContext, 3); + { + this.state = 530; + this.match(QuixosCapabilityParser.PACKAGE); + this.state = 531; + this.identifier(); + this.state = 532; + this.match(QuixosCapabilityParser.DOT); + this.state = 533; + this.identifier(); + this.state = 535; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (_la === 21) { + { + this.state = 534; + this.dependencyBindingBlock(); + } + } + + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public statePrimitive(): StatePrimitiveContext { + let localContext = new StatePrimitiveContext(this.context, this.state); + this.enterRule(localContext, 76, QuixosCapabilityParser.RULE_statePrimitive); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 539; + _la = this.tokenStream.LA(1); + if(!(((((_la - 41)) & ~0x1F) === 0 && ((1 << (_la - 41)) & 195) !== 0))) { + this.errorHandler.recoverInline(this); + } + else { + this.errorHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public edgePrimitive(): EdgePrimitiveContext { + let localContext = new EdgePrimitiveContext(this.context, this.state); + this.enterRule(localContext, 78, QuixosCapabilityParser.RULE_edgePrimitive); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 541; + _la = this.tokenStream.LA(1); + if(!(((((_la - 43)) & ~0x1F) === 0 && ((1 << (_la - 43)) & 55) !== 0))) { + this.errorHandler.recoverInline(this); + } + else { + this.errorHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public dependencyBindingBlock(): DependencyBindingBlockContext { + let localContext = new DependencyBindingBlockContext(this.context, this.state); + this.enterRule(localContext, 80, QuixosCapabilityParser.RULE_dependencyBindingBlock); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 543; + this.match(QuixosCapabilityParser.WITH); + this.state = 544; + this.match(QuixosCapabilityParser.LBRACE); + this.state = 548; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + while (_la === 25 || _la === 91) { + { + { + this.state = 545; + this.dependencyBinding(); + } + } + this.state = 550; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + } + this.state = 551; + this.match(QuixosCapabilityParser.RBRACE); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public dependencyBinding(): DependencyBindingContext { + let localContext = new DependencyBindingContext(this.context, this.state); + this.enterRule(localContext, 82, QuixosCapabilityParser.RULE_dependencyBinding); + try { + this.state = 579; + this.errorHandler.sync(this); + switch (this.interpreter.adaptivePredict(this.tokenStream, 33, this.context) ) { + case 1: + this.enterOuterAlt(localContext, 1); + { + this.state = 553; + this.identifier(); + this.state = 554; + this.match(QuixosCapabilityParser.TO); + this.state = 555; + this.match(QuixosCapabilityParser.STATE); + this.state = 556; + this.identifier(); + this.state = 557; + this.match(QuixosCapabilityParser.SEMI); + } + break; + case 2: + this.enterOuterAlt(localContext, 2); + { + this.state = 559; + this.identifier(); + this.state = 560; + this.match(QuixosCapabilityParser.TO); + this.state = 561; + this.match(QuixosCapabilityParser.EDGE); + this.state = 562; + this.identifier(); + this.state = 563; + this.match(QuixosCapabilityParser.DOT); + this.state = 564; + this.identifier(); + this.state = 565; + this.match(QuixosCapabilityParser.SEMI); + } + break; + case 3: + this.enterOuterAlt(localContext, 3); + { + this.state = 567; + this.identifier(); + this.state = 568; + this.match(QuixosCapabilityParser.TO); + this.state = 569; + this.match(QuixosCapabilityParser.INTERFACE); + this.state = 570; + this.identifier(); + this.state = 571; + this.match(QuixosCapabilityParser.SEMI); + } + break; + case 4: + this.enterOuterAlt(localContext, 4); + { + this.state = 573; + this.identifier(); + this.state = 574; + this.match(QuixosCapabilityParser.TO); + this.state = 575; + this.match(QuixosCapabilityParser.CONSTRUCTOR); + this.state = 576; + this.identifier(); + this.state = 577; + this.match(QuixosCapabilityParser.SEMI); + } + break; + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public constructorBindingDecl(): ConstructorBindingDeclContext { + let localContext = new ConstructorBindingDeclContext(this.context, this.state); + this.enterRule(localContext, 84, QuixosCapabilityParser.RULE_constructorBindingDecl); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 581; + this.match(QuixosCapabilityParser.CONSTRUCTOR); + this.state = 582; + this.identifier(); + this.state = 583; + this.match(QuixosCapabilityParser.TO); + this.state = 584; + this.identifier(); + this.state = 585; + this.match(QuixosCapabilityParser.DOT); + this.state = 586; + this.identifier(); + this.state = 588; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (_la === 21) { + { + this.state = 587; + this.dependencyBindingBlock(); + } + } + + this.state = 590; + this.match(QuixosCapabilityParser.SEMI); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public valueType(): ValueTypeContext { + let localContext = new ValueTypeContext(this.context, this.state); + this.enterRule(localContext, 86, QuixosCapabilityParser.RULE_valueType); + try { + this.state = 617; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.BOOL: + case QuixosCapabilityParser.BYTES: + case QuixosCapabilityParser.DOUBLE: + case QuixosCapabilityParser.INT32: + case QuixosCapabilityParser.INT64: + case QuixosCapabilityParser.STRING: + case QuixosCapabilityParser.UINT32: + case QuixosCapabilityParser.UINT64: + this.enterOuterAlt(localContext, 1); + { + this.state = 592; + this.scalarType(); + } + break; + case QuixosCapabilityParser.UNIT: + this.enterOuterAlt(localContext, 2); + { + this.state = 593; + this.match(QuixosCapabilityParser.UNIT); + } + break; + case QuixosCapabilityParser.WATCH_HANDLE: + this.enterOuterAlt(localContext, 3); + { + this.state = 594; + this.match(QuixosCapabilityParser.WATCH_HANDLE); + } + break; + case QuixosCapabilityParser.MESSAGE: + this.enterOuterAlt(localContext, 4); + { + this.state = 595; + this.match(QuixosCapabilityParser.MESSAGE); + this.state = 596; + this.stringLiteral(); + } + break; + case QuixosCapabilityParser.ATOM_REF: + this.enterOuterAlt(localContext, 5); + { + this.state = 597; + this.match(QuixosCapabilityParser.ATOM_REF); + this.state = 598; + this.match(QuixosCapabilityParser.LT); + this.state = 599; + this.identifier(); + this.state = 600; + this.match(QuixosCapabilityParser.GT); + } + break; + case QuixosCapabilityParser.INTERFACE_REF: + this.enterOuterAlt(localContext, 6); + { + this.state = 602; + this.match(QuixosCapabilityParser.INTERFACE_REF); + this.state = 603; + this.match(QuixosCapabilityParser.LT); + this.state = 604; + this.identifier(); + this.state = 605; + this.match(QuixosCapabilityParser.GT); + } + break; + case QuixosCapabilityParser.OPTIONAL: + this.enterOuterAlt(localContext, 7); + { + this.state = 607; + this.match(QuixosCapabilityParser.OPTIONAL); + this.state = 608; + this.match(QuixosCapabilityParser.LT); + this.state = 609; + this.valueType(); + this.state = 610; + this.match(QuixosCapabilityParser.GT); + } + break; + case QuixosCapabilityParser.LIST: + this.enterOuterAlt(localContext, 8); + { + this.state = 612; + this.match(QuixosCapabilityParser.LIST); + this.state = 613; + this.match(QuixosCapabilityParser.LT); + this.state = 614; + this.valueType(); + this.state = 615; + this.match(QuixosCapabilityParser.GT); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public scalarType(): ScalarTypeContext { + let localContext = new ScalarTypeContext(this.context, this.state); + this.enterRule(localContext, 88, QuixosCapabilityParser.RULE_scalarType); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 619; + _la = this.tokenStream.LA(1); + if(!(((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & 255) !== 0))) { + this.errorHandler.recoverInline(this); + } + else { + this.errorHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public cardinality(): CardinalityContext { + let localContext = new CardinalityContext(this.context, this.state); + this.enterRule(localContext, 90, QuixosCapabilityParser.RULE_cardinality); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 621; + _la = this.tokenStream.LA(1); + if(!(((((_la - 53)) & ~0x1F) === 0 && ((1 << (_la - 53)) & 15) !== 0))) { + this.errorHandler.recoverInline(this); + } + else { + this.errorHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public jsonLiteral(): JsonLiteralContext { + let localContext = new JsonLiteralContext(this.context, this.state); + this.enterRule(localContext, 92, QuixosCapabilityParser.RULE_jsonLiteral); + try { + this.state = 631; + this.errorHandler.sync(this); + switch (this.tokenStream.LA(1)) { + case QuixosCapabilityParser.STRING_LITERAL: + this.enterOuterAlt(localContext, 1); + { + this.state = 623; + this.stringLiteral(); + } + break; + case QuixosCapabilityParser.INTEGER: + this.enterOuterAlt(localContext, 2); + { + this.state = 624; + this.match(QuixosCapabilityParser.INTEGER); + } + break; + case QuixosCapabilityParser.JSON_NUMBER: + this.enterOuterAlt(localContext, 3); + { + this.state = 625; + this.match(QuixosCapabilityParser.JSON_NUMBER); + } + break; + case QuixosCapabilityParser.TRUE: + this.enterOuterAlt(localContext, 4); + { + this.state = 626; + this.match(QuixosCapabilityParser.TRUE); + } + break; + case QuixosCapabilityParser.FALSE: + this.enterOuterAlt(localContext, 5); + { + this.state = 627; + this.match(QuixosCapabilityParser.FALSE); + } + break; + case QuixosCapabilityParser.NULL: + this.enterOuterAlt(localContext, 6); + { + this.state = 628; + this.match(QuixosCapabilityParser.NULL); + } + break; + case QuixosCapabilityParser.LBRACE: + this.enterOuterAlt(localContext, 7); + { + this.state = 629; + this.jsonObject(); + } + break; + case QuixosCapabilityParser.LBRACK: + this.enterOuterAlt(localContext, 8); + { + this.state = 630; + this.jsonArray(); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public jsonObject(): JsonObjectContext { + let localContext = new JsonObjectContext(this.context, this.state); + this.enterRule(localContext, 94, QuixosCapabilityParser.RULE_jsonObject); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 633; + this.match(QuixosCapabilityParser.LBRACE); + this.state = 642; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (_la === 92) { + { + this.state = 634; + this.jsonMember(); + this.state = 639; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + while (_la === 79) { + { + { + this.state = 635; + this.match(QuixosCapabilityParser.COMMA); + this.state = 636; + this.jsonMember(); + } + } + this.state = 641; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + } + } + } + + this.state = 644; + this.match(QuixosCapabilityParser.RBRACE); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public jsonMember(): JsonMemberContext { + let localContext = new JsonMemberContext(this.context, this.state); + this.enterRule(localContext, 96, QuixosCapabilityParser.RULE_jsonMember); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 646; + this.stringLiteral(); + this.state = 647; + this.match(QuixosCapabilityParser.COLON); + this.state = 648; + this.jsonLiteral(); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public jsonArray(): JsonArrayContext { + let localContext = new JsonArrayContext(this.context, this.state); + this.enterRule(localContext, 98, QuixosCapabilityParser.RULE_jsonArray); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 650; + this.match(QuixosCapabilityParser.LBRACK); + this.state = 659; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (((((_la - 73)) & ~0x1F) === 0 && ((1 << (_la - 73)) & 722183) !== 0)) { + { + this.state = 651; + this.jsonLiteral(); + this.state = 656; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + while (_la === 79) { + { + { + this.state = 652; + this.match(QuixosCapabilityParser.COMMA); + this.state = 653; + this.jsonLiteral(); + } + } + this.state = 658; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + } + } + } + + this.state = 661; + this.match(QuixosCapabilityParser.RBRACK); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public identifier(): IdentifierContext { + let localContext = new IdentifierContext(this.context, this.state); + this.enterRule(localContext, 100, QuixosCapabilityParser.RULE_identifier); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 663; + _la = this.tokenStream.LA(1); + if(!(_la === 25 || _la === 91)) { + this.errorHandler.recoverInline(this); + } + else { + this.errorHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public stringLiteral(): StringLiteralContext { + let localContext = new StringLiteralContext(this.context, this.state); + this.enterRule(localContext, 102, QuixosCapabilityParser.RULE_stringLiteral); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 665; + this.match(QuixosCapabilityParser.STRING_LITERAL); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + + public static readonly _serializedATN: number[] = [ + 4,1,95,668,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13, + 2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20, + 7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26, + 2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33, + 7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39, + 2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46, + 7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,1,0,1,0,1, + 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,118,8,1,10,1,12,1, + 121,9,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,3,2,131,8,2,1,3,1,3,1,3, + 1,3,1,3,1,3,3,3,139,8,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4, + 1,4,5,4,152,8,4,10,4,12,4,155,9,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1, + 5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,3,6,172,8,6,1,7,1,7,1,7,1,7,1,7,1, + 7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1, + 8,1,8,5,8,197,8,8,10,8,12,8,200,9,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9, + 1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,3,9,223, + 8,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,3,10,233,8,10,1,10,1, + 10,5,10,237,8,10,10,10,12,10,240,9,10,1,10,1,10,1,11,1,11,1,11,1, + 11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1, + 11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,3,11,268,8,11,1,12,1,12,1, + 12,1,12,3,12,274,8,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1, + 13,5,13,285,8,13,10,13,12,13,288,9,13,1,13,1,13,1,14,1,14,1,14,3, + 14,295,8,14,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1, + 15,3,15,308,8,15,1,15,1,15,1,15,3,15,313,8,15,1,15,1,15,1,16,1,16, + 1,16,1,16,1,16,1,16,1,16,1,16,1,16,3,16,326,8,16,1,16,1,16,1,17, + 1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,3,17,339,8,17,1,17,1,17, + 1,18,1,18,1,18,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,20,3,20,354, + 8,20,1,20,3,20,357,8,20,1,21,1,21,1,21,5,21,362,8,21,10,21,12,21, + 365,9,21,1,22,1,22,1,22,5,22,370,8,22,10,22,12,22,373,9,22,1,22, + 1,22,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23, + 1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23, + 1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,3,23,412,8,23, + 1,24,1,24,1,24,1,24,5,24,418,8,24,10,24,12,24,421,9,24,1,24,1,24, + 1,25,1,25,1,26,1,26,1,26,1,27,1,27,3,27,432,8,27,1,28,1,28,1,28, + 1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,3,28,446,8,28,1,28, + 1,28,1,29,1,29,1,29,1,29,1,29,1,29,3,29,456,8,29,1,30,1,30,1,30, + 1,30,1,30,1,30,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,31,1,31,1,31, + 3,31,474,8,31,1,31,1,31,1,32,1,32,1,32,1,32,1,32,1,32,5,32,484,8, + 32,10,32,12,32,487,9,32,1,32,1,32,1,33,1,33,1,33,3,33,494,8,33,1, + 34,1,34,1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1, + 36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,3,36,517,8,36,1,37,1,37,1, + 37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1, + 37,1,37,3,37,536,8,37,3,37,538,8,37,1,38,1,38,1,39,1,39,1,40,1,40, + 1,40,5,40,547,8,40,10,40,12,40,550,9,40,1,40,1,40,1,41,1,41,1,41, + 1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41, + 1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,3,41,580,8,41, + 1,42,1,42,1,42,1,42,1,42,1,42,1,42,3,42,589,8,42,1,42,1,42,1,43, + 1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43, + 1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,3,43,618, + 8,43,1,44,1,44,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46, + 3,46,632,8,46,1,47,1,47,1,47,1,47,5,47,638,8,47,10,47,12,47,641, + 9,47,3,47,643,8,47,1,47,1,47,1,48,1,48,1,48,1,48,1,49,1,49,1,49, + 1,49,5,49,655,8,49,10,49,12,49,658,9,49,3,49,660,8,49,1,49,1,49, + 1,50,1,50,1,51,1,51,1,51,0,0,52,0,2,4,6,8,10,12,14,16,18,20,22,24, + 26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68, + 70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,0,7,1,0,46, + 50,2,0,41,45,47,48,2,0,41,42,47,48,2,0,43,45,47,48,1,0,65,72,1,0, + 53,56,2,0,25,25,91,91,692,0,104,1,0,0,0,2,107,1,0,0,0,4,130,1,0, + 0,0,6,132,1,0,0,0,8,142,1,0,0,0,10,158,1,0,0,0,12,171,1,0,0,0,14, + 173,1,0,0,0,16,188,1,0,0,0,18,222,1,0,0,0,20,224,1,0,0,0,22,267, + 1,0,0,0,24,273,1,0,0,0,26,275,1,0,0,0,28,294,1,0,0,0,30,296,1,0, + 0,0,32,316,1,0,0,0,34,329,1,0,0,0,36,342,1,0,0,0,38,345,1,0,0,0, + 40,356,1,0,0,0,42,358,1,0,0,0,44,366,1,0,0,0,46,411,1,0,0,0,48,413, + 1,0,0,0,50,424,1,0,0,0,52,426,1,0,0,0,54,431,1,0,0,0,56,433,1,0, + 0,0,58,455,1,0,0,0,60,457,1,0,0,0,62,466,1,0,0,0,64,477,1,0,0,0, + 66,493,1,0,0,0,68,495,1,0,0,0,70,501,1,0,0,0,72,516,1,0,0,0,74,537, + 1,0,0,0,76,539,1,0,0,0,78,541,1,0,0,0,80,543,1,0,0,0,82,579,1,0, + 0,0,84,581,1,0,0,0,86,617,1,0,0,0,88,619,1,0,0,0,90,621,1,0,0,0, + 92,631,1,0,0,0,94,633,1,0,0,0,96,646,1,0,0,0,98,650,1,0,0,0,100, + 663,1,0,0,0,102,665,1,0,0,0,104,105,3,2,1,0,105,106,5,0,0,1,106, + 1,1,0,0,0,107,108,5,1,0,0,108,109,3,100,50,0,109,110,5,29,0,0,110, + 111,3,102,51,0,111,112,5,28,0,0,112,113,3,102,51,0,113,114,5,27, + 0,0,114,115,3,102,51,0,115,119,5,81,0,0,116,118,3,4,2,0,117,116, + 1,0,0,0,118,121,1,0,0,0,119,117,1,0,0,0,119,120,1,0,0,0,120,122, + 1,0,0,0,121,119,1,0,0,0,122,123,5,82,0,0,123,3,1,0,0,0,124,131,3, + 6,3,0,125,131,3,8,4,0,126,131,3,26,13,0,127,131,3,52,26,0,128,131, + 3,64,32,0,129,131,3,84,42,0,130,124,1,0,0,0,130,125,1,0,0,0,130, + 126,1,0,0,0,130,127,1,0,0,0,130,128,1,0,0,0,130,129,1,0,0,0,131, + 5,1,0,0,0,132,133,5,2,0,0,133,134,3,100,50,0,134,135,5,29,0,0,135, + 138,3,102,51,0,136,137,5,30,0,0,137,139,3,102,51,0,138,136,1,0,0, + 0,138,139,1,0,0,0,139,140,1,0,0,0,140,141,5,78,0,0,141,7,1,0,0,0, + 142,143,5,3,0,0,143,144,3,100,50,0,144,145,5,29,0,0,145,146,3,102, + 51,0,146,147,5,28,0,0,147,148,3,102,51,0,148,149,3,10,5,0,149,153, + 5,81,0,0,150,152,3,12,6,0,151,150,1,0,0,0,152,155,1,0,0,0,153,151, + 1,0,0,0,153,154,1,0,0,0,154,156,1,0,0,0,155,153,1,0,0,0,156,157, + 5,82,0,0,157,9,1,0,0,0,158,159,5,25,0,0,159,160,5,81,0,0,160,161, + 5,26,0,0,161,162,3,102,51,0,162,163,5,78,0,0,163,164,5,27,0,0,164, + 165,3,102,51,0,165,166,5,78,0,0,166,167,5,82,0,0,167,11,1,0,0,0, + 168,172,3,16,8,0,169,172,3,20,10,0,170,172,3,14,7,0,171,168,1,0, + 0,0,171,169,1,0,0,0,171,170,1,0,0,0,172,13,1,0,0,0,173,174,5,8,0, + 0,174,175,3,100,50,0,175,176,5,29,0,0,176,177,3,102,51,0,177,178, + 5,77,0,0,178,179,3,86,43,0,179,180,5,76,0,0,180,181,3,86,43,0,181, + 182,5,81,0,0,182,183,5,46,0,0,183,184,5,29,0,0,184,185,3,102,51, + 0,185,186,5,78,0,0,186,187,5,82,0,0,187,15,1,0,0,0,188,189,5,6,0, + 0,189,190,3,100,50,0,190,191,5,29,0,0,191,192,3,102,51,0,192,193, + 5,77,0,0,193,194,3,86,43,0,194,198,5,81,0,0,195,197,3,18,9,0,196, + 195,1,0,0,0,197,200,1,0,0,0,198,196,1,0,0,0,198,199,1,0,0,0,199, + 201,1,0,0,0,200,198,1,0,0,0,201,202,5,82,0,0,202,17,1,0,0,0,203, + 204,5,36,0,0,204,205,5,29,0,0,205,206,3,102,51,0,206,207,5,78,0, + 0,207,223,1,0,0,0,208,209,5,37,0,0,209,210,5,29,0,0,210,211,3,102, + 51,0,211,212,5,78,0,0,212,223,1,0,0,0,213,214,5,38,0,0,214,215,5, + 39,0,0,215,216,5,29,0,0,216,217,3,102,51,0,217,218,5,40,0,0,218, + 219,5,29,0,0,219,220,3,102,51,0,220,221,5,78,0,0,221,223,1,0,0,0, + 222,203,1,0,0,0,222,208,1,0,0,0,222,213,1,0,0,0,223,19,1,0,0,0,224, + 225,5,7,0,0,225,226,3,100,50,0,226,227,5,29,0,0,227,228,3,102,51, + 0,228,229,5,77,0,0,229,230,3,90,45,0,230,232,3,24,12,0,231,233,5, + 57,0,0,232,231,1,0,0,0,232,233,1,0,0,0,233,234,1,0,0,0,234,238,5, + 81,0,0,235,237,3,22,11,0,236,235,1,0,0,0,237,240,1,0,0,0,238,236, + 1,0,0,0,238,239,1,0,0,0,239,241,1,0,0,0,240,238,1,0,0,0,241,242, + 5,82,0,0,242,21,1,0,0,0,243,244,5,43,0,0,244,245,5,29,0,0,245,246, + 3,102,51,0,246,247,5,78,0,0,247,268,1,0,0,0,248,249,5,44,0,0,249, + 250,5,29,0,0,250,251,3,102,51,0,251,252,5,78,0,0,252,268,1,0,0,0, + 253,254,5,45,0,0,254,255,5,29,0,0,255,256,3,102,51,0,256,257,5,78, + 0,0,257,268,1,0,0,0,258,259,5,38,0,0,259,260,5,39,0,0,260,261,5, + 29,0,0,261,262,3,102,51,0,262,263,5,40,0,0,263,264,5,29,0,0,264, + 265,3,102,51,0,265,266,5,78,0,0,266,268,1,0,0,0,267,243,1,0,0,0, + 267,248,1,0,0,0,267,253,1,0,0,0,267,258,1,0,0,0,268,23,1,0,0,0,269, + 270,5,2,0,0,270,274,3,100,50,0,271,272,5,3,0,0,272,274,3,100,50, + 0,273,269,1,0,0,0,273,271,1,0,0,0,274,25,1,0,0,0,275,276,5,5,0,0, + 276,277,3,100,50,0,277,278,5,29,0,0,278,279,3,102,51,0,279,280,5, + 28,0,0,280,281,3,102,51,0,281,282,3,10,5,0,282,286,5,81,0,0,283, + 285,3,28,14,0,284,283,1,0,0,0,285,288,1,0,0,0,286,284,1,0,0,0,286, + 287,1,0,0,0,287,289,1,0,0,0,288,286,1,0,0,0,289,290,5,82,0,0,290, + 27,1,0,0,0,291,295,3,30,15,0,292,295,3,32,16,0,293,295,3,34,17,0, + 294,291,1,0,0,0,294,292,1,0,0,0,294,293,1,0,0,0,295,29,1,0,0,0,296, + 297,5,8,0,0,297,298,3,100,50,0,298,299,5,29,0,0,299,300,3,102,51, + 0,300,301,5,77,0,0,301,302,3,86,43,0,302,303,5,76,0,0,303,304,3, + 86,43,0,304,305,5,31,0,0,305,307,3,38,19,0,306,308,3,36,18,0,307, + 306,1,0,0,0,307,308,1,0,0,0,308,309,1,0,0,0,309,310,5,33,0,0,310, + 312,3,40,20,0,311,313,3,44,22,0,312,311,1,0,0,0,312,313,1,0,0,0, + 313,314,1,0,0,0,314,315,5,78,0,0,315,31,1,0,0,0,316,317,5,9,0,0, + 317,318,3,100,50,0,318,319,5,29,0,0,319,320,3,102,51,0,320,321,5, + 77,0,0,321,322,3,86,43,0,322,323,5,76,0,0,323,325,3,86,43,0,324, + 326,3,44,22,0,325,324,1,0,0,0,325,326,1,0,0,0,326,327,1,0,0,0,327, + 328,5,78,0,0,328,33,1,0,0,0,329,330,5,10,0,0,330,331,3,100,50,0, + 331,332,5,29,0,0,332,333,3,102,51,0,333,334,5,11,0,0,334,335,3,100, + 50,0,335,336,5,77,0,0,336,338,3,86,43,0,337,339,3,44,22,0,338,337, + 1,0,0,0,338,339,1,0,0,0,339,340,1,0,0,0,340,341,5,78,0,0,341,35, + 1,0,0,0,342,343,5,32,0,0,343,344,3,86,43,0,344,37,1,0,0,0,345,346, + 7,0,0,0,346,39,1,0,0,0,347,357,5,35,0,0,348,349,5,2,0,0,349,357, + 3,100,50,0,350,351,5,4,0,0,351,353,5,83,0,0,352,354,3,42,21,0,353, + 352,1,0,0,0,353,354,1,0,0,0,354,355,1,0,0,0,355,357,5,84,0,0,356, + 347,1,0,0,0,356,348,1,0,0,0,356,350,1,0,0,0,357,41,1,0,0,0,358,363, + 3,100,50,0,359,360,5,79,0,0,360,362,3,100,50,0,361,359,1,0,0,0,362, + 365,1,0,0,0,363,361,1,0,0,0,363,364,1,0,0,0,364,43,1,0,0,0,365,363, + 1,0,0,0,366,367,5,34,0,0,367,371,5,81,0,0,368,370,3,46,23,0,369, + 368,1,0,0,0,370,373,1,0,0,0,371,369,1,0,0,0,371,372,1,0,0,0,372, + 374,1,0,0,0,373,371,1,0,0,0,374,375,5,82,0,0,375,45,1,0,0,0,376, + 377,5,18,0,0,377,378,3,100,50,0,378,379,5,29,0,0,379,380,3,102,51, + 0,380,381,5,77,0,0,381,382,3,86,43,0,382,383,3,48,24,0,383,384,5, + 78,0,0,384,412,1,0,0,0,385,386,5,19,0,0,386,387,3,100,50,0,387,388, + 5,29,0,0,388,389,3,102,51,0,389,390,5,77,0,0,390,391,3,90,45,0,391, + 392,3,24,12,0,392,393,3,48,24,0,393,394,5,78,0,0,394,412,1,0,0,0, + 395,396,5,3,0,0,396,397,3,100,50,0,397,398,5,29,0,0,398,399,3,102, + 51,0,399,400,5,77,0,0,400,401,3,100,50,0,401,402,5,78,0,0,402,412, + 1,0,0,0,403,404,5,10,0,0,404,405,3,100,50,0,405,406,5,29,0,0,406, + 407,3,102,51,0,407,408,5,77,0,0,408,409,3,100,50,0,409,410,5,78, + 0,0,410,412,1,0,0,0,411,376,1,0,0,0,411,385,1,0,0,0,411,395,1,0, + 0,0,411,403,1,0,0,0,412,47,1,0,0,0,413,414,5,83,0,0,414,419,3,50, + 25,0,415,416,5,79,0,0,416,418,3,50,25,0,417,415,1,0,0,0,418,421, + 1,0,0,0,419,417,1,0,0,0,419,420,1,0,0,0,420,422,1,0,0,0,421,419, + 1,0,0,0,422,423,5,84,0,0,423,49,1,0,0,0,424,425,7,1,0,0,425,51,1, + 0,0,0,426,427,5,17,0,0,427,428,3,54,27,0,428,53,1,0,0,0,429,432, + 3,56,28,0,430,432,3,60,30,0,431,429,1,0,0,0,431,430,1,0,0,0,432, + 55,1,0,0,0,433,434,5,18,0,0,434,435,3,100,50,0,435,436,5,29,0,0, + 436,437,3,102,51,0,437,438,5,22,0,0,438,439,3,100,50,0,439,440,5, + 77,0,0,440,441,3,86,43,0,441,442,5,23,0,0,442,445,3,58,29,0,443, + 444,5,24,0,0,444,446,3,92,46,0,445,443,1,0,0,0,445,446,1,0,0,0,446, + 447,1,0,0,0,447,448,5,78,0,0,448,57,1,0,0,0,449,456,5,51,0,0,450, + 451,5,52,0,0,451,452,5,85,0,0,452,453,3,86,43,0,453,454,5,86,0,0, + 454,456,1,0,0,0,455,449,1,0,0,0,455,450,1,0,0,0,456,59,1,0,0,0,457, + 458,5,19,0,0,458,459,3,100,50,0,459,460,5,29,0,0,460,461,3,102,51, + 0,461,462,5,81,0,0,462,463,3,62,31,0,463,464,3,62,31,0,464,465,5, + 82,0,0,465,61,1,0,0,0,466,467,3,24,12,0,467,468,5,20,0,0,468,469, + 3,100,50,0,469,470,5,29,0,0,470,471,3,102,51,0,471,473,3,90,45,0, + 472,474,5,57,0,0,473,472,1,0,0,0,473,474,1,0,0,0,474,475,1,0,0,0, + 475,476,5,78,0,0,476,63,1,0,0,0,477,478,5,12,0,0,478,479,3,100,50, + 0,479,480,5,13,0,0,480,481,3,100,50,0,481,485,5,81,0,0,482,484,3, + 66,33,0,483,482,1,0,0,0,484,487,1,0,0,0,485,483,1,0,0,0,485,486, + 1,0,0,0,486,488,1,0,0,0,487,485,1,0,0,0,488,489,5,82,0,0,489,65, + 1,0,0,0,490,491,5,16,0,0,491,494,3,54,27,0,492,494,3,68,34,0,493, + 490,1,0,0,0,493,492,1,0,0,0,494,67,1,0,0,0,495,496,5,14,0,0,496, + 497,3,70,35,0,497,498,5,15,0,0,498,499,3,74,37,0,499,500,5,78,0, + 0,500,69,1,0,0,0,501,502,3,100,50,0,502,503,5,80,0,0,503,504,3,72, + 36,0,504,71,1,0,0,0,505,517,3,100,50,0,506,517,5,46,0,0,507,517, + 5,36,0,0,508,517,5,37,0,0,509,517,5,43,0,0,510,517,5,44,0,0,511, + 517,5,45,0,0,512,517,5,47,0,0,513,517,5,48,0,0,514,517,5,49,0,0, + 515,517,5,50,0,0,516,505,1,0,0,0,516,506,1,0,0,0,516,507,1,0,0,0, + 516,508,1,0,0,0,516,509,1,0,0,0,516,510,1,0,0,0,516,511,1,0,0,0, + 516,512,1,0,0,0,516,513,1,0,0,0,516,514,1,0,0,0,516,515,1,0,0,0, + 517,73,1,0,0,0,518,519,5,18,0,0,519,520,3,100,50,0,520,521,5,80, + 0,0,521,522,3,76,38,0,522,538,1,0,0,0,523,524,5,19,0,0,524,525,3, + 100,50,0,525,526,5,80,0,0,526,527,3,100,50,0,527,528,5,80,0,0,528, + 529,3,78,39,0,529,538,1,0,0,0,530,531,5,5,0,0,531,532,3,100,50,0, + 532,533,5,80,0,0,533,535,3,100,50,0,534,536,3,80,40,0,535,534,1, + 0,0,0,535,536,1,0,0,0,536,538,1,0,0,0,537,518,1,0,0,0,537,523,1, + 0,0,0,537,530,1,0,0,0,538,75,1,0,0,0,539,540,7,2,0,0,540,77,1,0, + 0,0,541,542,7,3,0,0,542,79,1,0,0,0,543,544,5,21,0,0,544,548,5,81, + 0,0,545,547,3,82,41,0,546,545,1,0,0,0,547,550,1,0,0,0,548,546,1, + 0,0,0,548,549,1,0,0,0,549,551,1,0,0,0,550,548,1,0,0,0,551,552,5, + 82,0,0,552,81,1,0,0,0,553,554,3,100,50,0,554,555,5,15,0,0,555,556, + 5,18,0,0,556,557,3,100,50,0,557,558,5,78,0,0,558,580,1,0,0,0,559, + 560,3,100,50,0,560,561,5,15,0,0,561,562,5,19,0,0,562,563,3,100,50, + 0,563,564,5,80,0,0,564,565,3,100,50,0,565,566,5,78,0,0,566,580,1, + 0,0,0,567,568,3,100,50,0,568,569,5,15,0,0,569,570,5,3,0,0,570,571, + 3,100,50,0,571,572,5,78,0,0,572,580,1,0,0,0,573,574,3,100,50,0,574, + 575,5,15,0,0,575,576,5,10,0,0,576,577,3,100,50,0,577,578,5,78,0, + 0,578,580,1,0,0,0,579,553,1,0,0,0,579,559,1,0,0,0,579,567,1,0,0, + 0,579,573,1,0,0,0,580,83,1,0,0,0,581,582,5,10,0,0,582,583,3,100, + 50,0,583,584,5,15,0,0,584,585,3,100,50,0,585,586,5,80,0,0,586,588, + 3,100,50,0,587,589,3,80,40,0,588,587,1,0,0,0,588,589,1,0,0,0,589, + 590,1,0,0,0,590,591,5,78,0,0,591,85,1,0,0,0,592,618,3,88,44,0,593, + 618,5,58,0,0,594,618,5,59,0,0,595,596,5,60,0,0,596,618,3,102,51, + 0,597,598,5,61,0,0,598,599,5,87,0,0,599,600,3,100,50,0,600,601,5, + 88,0,0,601,618,1,0,0,0,602,603,5,62,0,0,603,604,5,87,0,0,604,605, + 3,100,50,0,605,606,5,88,0,0,606,618,1,0,0,0,607,608,5,63,0,0,608, + 609,5,87,0,0,609,610,3,86,43,0,610,611,5,88,0,0,611,618,1,0,0,0, + 612,613,5,64,0,0,613,614,5,87,0,0,614,615,3,86,43,0,615,616,5,88, + 0,0,616,618,1,0,0,0,617,592,1,0,0,0,617,593,1,0,0,0,617,594,1,0, + 0,0,617,595,1,0,0,0,617,597,1,0,0,0,617,602,1,0,0,0,617,607,1,0, + 0,0,617,612,1,0,0,0,618,87,1,0,0,0,619,620,7,4,0,0,620,89,1,0,0, + 0,621,622,7,5,0,0,622,91,1,0,0,0,623,632,3,102,51,0,624,632,5,89, + 0,0,625,632,5,90,0,0,626,632,5,73,0,0,627,632,5,74,0,0,628,632,5, + 75,0,0,629,632,3,94,47,0,630,632,3,98,49,0,631,623,1,0,0,0,631,624, + 1,0,0,0,631,625,1,0,0,0,631,626,1,0,0,0,631,627,1,0,0,0,631,628, + 1,0,0,0,631,629,1,0,0,0,631,630,1,0,0,0,632,93,1,0,0,0,633,642,5, + 81,0,0,634,639,3,96,48,0,635,636,5,79,0,0,636,638,3,96,48,0,637, + 635,1,0,0,0,638,641,1,0,0,0,639,637,1,0,0,0,639,640,1,0,0,0,640, + 643,1,0,0,0,641,639,1,0,0,0,642,634,1,0,0,0,642,643,1,0,0,0,643, + 644,1,0,0,0,644,645,5,82,0,0,645,95,1,0,0,0,646,647,3,102,51,0,647, + 648,5,77,0,0,648,649,3,92,46,0,649,97,1,0,0,0,650,659,5,83,0,0,651, + 656,3,92,46,0,652,653,5,79,0,0,653,655,3,92,46,0,654,652,1,0,0,0, + 655,658,1,0,0,0,656,654,1,0,0,0,656,657,1,0,0,0,657,660,1,0,0,0, + 658,656,1,0,0,0,659,651,1,0,0,0,659,660,1,0,0,0,660,661,1,0,0,0, + 661,662,5,84,0,0,662,99,1,0,0,0,663,664,7,6,0,0,664,101,1,0,0,0, + 665,666,5,92,0,0,666,103,1,0,0,0,41,119,130,138,153,171,198,222, + 232,238,267,273,286,294,307,312,325,338,353,356,363,371,411,419, + 431,445,455,473,485,493,516,535,537,548,579,588,617,631,639,642, + 656,659 + ]; + + private static __ATN: antlr.ATN; + public static get _ATN(): antlr.ATN { + if (!QuixosCapabilityParser.__ATN) { + QuixosCapabilityParser.__ATN = new antlr.ATNDeserializer().deserialize(QuixosCapabilityParser._serializedATN); + } + + return QuixosCapabilityParser.__ATN; + } + + + private static readonly vocabulary = new antlr.Vocabulary(QuixosCapabilityParser.literalNames, QuixosCapabilityParser.symbolicNames, []); + + public override get vocabulary(): antlr.Vocabulary { + return QuixosCapabilityParser.vocabulary; + } + + private static readonly decisionsToDFA = QuixosCapabilityParser._ATN.decisionToState.map( (ds: antlr.DecisionState, index: number) => new antlr.DFA(ds, index) ); +} + +export class DocumentContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public workspaceDecl(): WorkspaceDeclContext { + return this.getRuleContext(0, WorkspaceDeclContext)!; + } + public EOF(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.EOF, 0)!; + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_document; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitDocument) { + return visitor.visitDocument(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class WorkspaceDeclContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public WORKSPACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.WORKSPACE, 0)!; + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public ID(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ID, 0)!; + } + public stringLiteral(): StringLiteralContext[]; + public stringLiteral(i: number): StringLiteralContext | null; + public stringLiteral(i?: number): StringLiteralContext[] | StringLiteralContext | null { + if (i === undefined) { + return this.getRuleContexts(StringLiteralContext); + } + + return this.getRuleContext(i, StringLiteralContext); + } + public REVISION(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.REVISION, 0)!; + } + public COMMIT(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.COMMIT, 0)!; + } + public LBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.LBRACE, 0)!; + } + public RBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RBRACE, 0)!; + } + public workspaceItem(): WorkspaceItemContext[]; + public workspaceItem(i: number): WorkspaceItemContext | null; + public workspaceItem(i?: number): WorkspaceItemContext[] | WorkspaceItemContext | null { + if (i === undefined) { + return this.getRuleContexts(WorkspaceItemContext); + } + + return this.getRuleContext(i, WorkspaceItemContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_workspaceDecl; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitWorkspaceDecl) { + return visitor.visitWorkspaceDecl(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class WorkspaceItemContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public atomDecl(): AtomDeclContext | null { + return this.getRuleContext(0, AtomDeclContext); + } + public interfaceDecl(): InterfaceDeclContext | null { + return this.getRuleContext(0, InterfaceDeclContext); + } + public packageDecl(): PackageDeclContext | null { + return this.getRuleContext(0, PackageDeclContext); + } + public sharedAttachmentDecl(): SharedAttachmentDeclContext | null { + return this.getRuleContext(0, SharedAttachmentDeclContext); + } + public conformanceDecl(): ConformanceDeclContext | null { + return this.getRuleContext(0, ConformanceDeclContext); + } + public constructorBindingDecl(): ConstructorBindingDeclContext | null { + return this.getRuleContext(0, ConstructorBindingDeclContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_workspaceItem; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitWorkspaceItem) { + return visitor.visitWorkspaceItem(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class AtomDeclContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public ATOM(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ATOM, 0)!; + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public ID(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ID, 0)!; + } + public stringLiteral(): StringLiteralContext[]; + public stringLiteral(i: number): StringLiteralContext | null; + public stringLiteral(i?: number): StringLiteralContext[] | StringLiteralContext | null { + if (i === undefined) { + return this.getRuleContexts(StringLiteralContext); + } + + return this.getRuleContext(i, StringLiteralContext); + } + public SEMI(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SEMI, 0)!; + } + public DOC(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.DOC, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_atomDecl; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitAtomDecl) { + return visitor.visitAtomDecl(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class InterfaceDeclContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public INTERFACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.INTERFACE, 0)!; + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public ID(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ID, 0)!; + } + public stringLiteral(): StringLiteralContext[]; + public stringLiteral(i: number): StringLiteralContext | null; + public stringLiteral(i?: number): StringLiteralContext[] | StringLiteralContext | null { + if (i === undefined) { + return this.getRuleContexts(StringLiteralContext); + } + + return this.getRuleContext(i, StringLiteralContext); + } + public REVISION(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.REVISION, 0)!; + } + public sourceBlock(): SourceBlockContext { + return this.getRuleContext(0, SourceBlockContext)!; + } + public LBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.LBRACE, 0)!; + } + public RBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RBRACE, 0)!; + } + public interfaceMember(): InterfaceMemberContext[]; + public interfaceMember(i: number): InterfaceMemberContext | null; + public interfaceMember(i?: number): InterfaceMemberContext[] | InterfaceMemberContext | null { + if (i === undefined) { + return this.getRuleContexts(InterfaceMemberContext); + } + + return this.getRuleContext(i, InterfaceMemberContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_interfaceDecl; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitInterfaceDecl) { + return visitor.visitInterfaceDecl(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class SourceBlockContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public SOURCE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SOURCE, 0)!; + } + public LBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.LBRACE, 0)!; + } + public REPOSITORY(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.REPOSITORY, 0)!; + } + public stringLiteral(): StringLiteralContext[]; + public stringLiteral(i: number): StringLiteralContext | null; + public stringLiteral(i?: number): StringLiteralContext[] | StringLiteralContext | null { + if (i === undefined) { + return this.getRuleContexts(StringLiteralContext); + } + + return this.getRuleContext(i, StringLiteralContext); + } + public SEMI(): antlr.TerminalNode[]; + public SEMI(i: number): antlr.TerminalNode | null; + public SEMI(i?: number): antlr.TerminalNode | null | antlr.TerminalNode[] { + if (i === undefined) { + return this.getTokens(QuixosCapabilityParser.SEMI); + } else { + return this.getToken(QuixosCapabilityParser.SEMI, i); + } + } + public COMMIT(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.COMMIT, 0)!; + } + public RBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RBRACE, 0)!; + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_sourceBlock; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitSourceBlock) { + return visitor.visitSourceBlock(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class InterfaceMemberContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public valueMember(): ValueMemberContext | null { + return this.getRuleContext(0, ValueMemberContext); + } + public relationshipMember(): RelationshipMemberContext | null { + return this.getRuleContext(0, RelationshipMemberContext); + } + public operationMember(): OperationMemberContext | null { + return this.getRuleContext(0, OperationMemberContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_interfaceMember; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitInterfaceMember) { + return visitor.visitInterfaceMember(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class OperationMemberContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public OPERATION(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.OPERATION, 0)!; + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public ID(): antlr.TerminalNode[]; + public ID(i: number): antlr.TerminalNode | null; + public ID(i?: number): antlr.TerminalNode | null | antlr.TerminalNode[] { + if (i === undefined) { + return this.getTokens(QuixosCapabilityParser.ID); + } else { + return this.getToken(QuixosCapabilityParser.ID, i); + } + } + public stringLiteral(): StringLiteralContext[]; + public stringLiteral(i: number): StringLiteralContext | null; + public stringLiteral(i?: number): StringLiteralContext[] | StringLiteralContext | null { + if (i === undefined) { + return this.getRuleContexts(StringLiteralContext); + } + + return this.getRuleContext(i, StringLiteralContext); + } + public COLON(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.COLON, 0)!; + } + public valueType(): ValueTypeContext[]; + public valueType(i: number): ValueTypeContext | null; + public valueType(i?: number): ValueTypeContext[] | ValueTypeContext | null { + if (i === undefined) { + return this.getRuleContexts(ValueTypeContext); + } + + return this.getRuleContext(i, ValueTypeContext); + } + public ARROW(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ARROW, 0)!; + } + public LBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.LBRACE, 0)!; + } + public CALL(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.CALL, 0)!; + } + public SEMI(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SEMI, 0)!; + } + public RBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RBRACE, 0)!; + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_operationMember; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitOperationMember) { + return visitor.visitOperationMember(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ValueMemberContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public VALUE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.VALUE, 0)!; + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public ID(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ID, 0)!; + } + public stringLiteral(): StringLiteralContext { + return this.getRuleContext(0, StringLiteralContext)!; + } + public COLON(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.COLON, 0)!; + } + public valueType(): ValueTypeContext { + return this.getRuleContext(0, ValueTypeContext)!; + } + public LBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.LBRACE, 0)!; + } + public RBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RBRACE, 0)!; + } + public valueMemberOperation(): ValueMemberOperationContext[]; + public valueMemberOperation(i: number): ValueMemberOperationContext | null; + public valueMemberOperation(i?: number): ValueMemberOperationContext[] | ValueMemberOperationContext | null { + if (i === undefined) { + return this.getRuleContexts(ValueMemberOperationContext); + } + + return this.getRuleContext(i, ValueMemberOperationContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_valueMember; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitValueMember) { + return visitor.visitValueMember(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ValueMemberOperationContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public GET(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.GET, 0); + } + public ID(): antlr.TerminalNode[]; + public ID(i: number): antlr.TerminalNode | null; + public ID(i?: number): antlr.TerminalNode | null | antlr.TerminalNode[] { + if (i === undefined) { + return this.getTokens(QuixosCapabilityParser.ID); + } else { + return this.getToken(QuixosCapabilityParser.ID, i); + } + } + public stringLiteral(): StringLiteralContext[]; + public stringLiteral(i: number): StringLiteralContext | null; + public stringLiteral(i?: number): StringLiteralContext[] | StringLiteralContext | null { + if (i === undefined) { + return this.getRuleContexts(StringLiteralContext); + } + + return this.getRuleContext(i, StringLiteralContext); + } + public SEMI(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SEMI, 0)!; + } + public SET(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.SET, 0); + } + public WATCH(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WATCH, 0); + } + public START(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.START, 0); + } + public STOP(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.STOP, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_valueMemberOperation; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitValueMemberOperation) { + return visitor.visitValueMemberOperation(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class RelationshipMemberContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public RELATION(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RELATION, 0)!; + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public ID(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ID, 0)!; + } + public stringLiteral(): StringLiteralContext { + return this.getRuleContext(0, StringLiteralContext)!; + } + public COLON(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.COLON, 0)!; + } + public cardinality(): CardinalityContext { + return this.getRuleContext(0, CardinalityContext)!; + } + public targetConstraint(): TargetConstraintContext { + return this.getRuleContext(0, TargetConstraintContext)!; + } + public LBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.LBRACE, 0)!; + } + public RBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RBRACE, 0)!; + } + public ORDERED(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.ORDERED, 0); + } + public relationshipOperation(): RelationshipOperationContext[]; + public relationshipOperation(i: number): RelationshipOperationContext | null; + public relationshipOperation(i?: number): RelationshipOperationContext[] | RelationshipOperationContext | null { + if (i === undefined) { + return this.getRuleContexts(RelationshipOperationContext); + } + + return this.getRuleContext(i, RelationshipOperationContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_relationshipMember; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitRelationshipMember) { + return visitor.visitRelationshipMember(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class RelationshipOperationContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public RESOLVE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.RESOLVE, 0); + } + public ID(): antlr.TerminalNode[]; + public ID(i: number): antlr.TerminalNode | null; + public ID(i?: number): antlr.TerminalNode | null | antlr.TerminalNode[] { + if (i === undefined) { + return this.getTokens(QuixosCapabilityParser.ID); + } else { + return this.getToken(QuixosCapabilityParser.ID, i); + } + } + public stringLiteral(): StringLiteralContext[]; + public stringLiteral(i: number): StringLiteralContext | null; + public stringLiteral(i?: number): StringLiteralContext[] | StringLiteralContext | null { + if (i === undefined) { + return this.getRuleContexts(StringLiteralContext); + } + + return this.getRuleContext(i, StringLiteralContext); + } + public SEMI(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SEMI, 0)!; + } + public CONNECT(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.CONNECT, 0); + } + public DISCONNECT(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.DISCONNECT, 0); + } + public WATCH(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WATCH, 0); + } + public START(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.START, 0); + } + public STOP(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.STOP, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_relationshipOperation; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitRelationshipOperation) { + return visitor.visitRelationshipOperation(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TargetConstraintContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public ATOM(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.ATOM, 0); + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public INTERFACE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.INTERFACE, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_targetConstraint; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitTargetConstraint) { + return visitor.visitTargetConstraint(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PackageDeclContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public PACKAGE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.PACKAGE, 0)!; + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public ID(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ID, 0)!; + } + public stringLiteral(): StringLiteralContext[]; + public stringLiteral(i: number): StringLiteralContext | null; + public stringLiteral(i?: number): StringLiteralContext[] | StringLiteralContext | null { + if (i === undefined) { + return this.getRuleContexts(StringLiteralContext); + } + + return this.getRuleContext(i, StringLiteralContext); + } + public REVISION(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.REVISION, 0)!; + } + public sourceBlock(): SourceBlockContext { + return this.getRuleContext(0, SourceBlockContext)!; + } + public LBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.LBRACE, 0)!; + } + public RBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RBRACE, 0)!; + } + public packageExport(): PackageExportContext[]; + public packageExport(i: number): PackageExportContext | null; + public packageExport(i?: number): PackageExportContext[] | PackageExportContext | null { + if (i === undefined) { + return this.getRuleContexts(PackageExportContext); + } + + return this.getRuleContext(i, PackageExportContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_packageDecl; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitPackageDecl) { + return visitor.visitPackageDecl(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PackageExportContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public packageOperationExport(): PackageOperationExportContext | null { + return this.getRuleContext(0, PackageOperationExportContext); + } + public packageFunctionExport(): PackageFunctionExportContext | null { + return this.getRuleContext(0, PackageFunctionExportContext); + } + public packageConstructorExport(): PackageConstructorExportContext | null { + return this.getRuleContext(0, PackageConstructorExportContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_packageExport; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitPackageExport) { + return visitor.visitPackageExport(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PackageOperationExportContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public OPERATION(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.OPERATION, 0)!; + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public ID(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ID, 0)!; + } + public stringLiteral(): StringLiteralContext { + return this.getRuleContext(0, StringLiteralContext)!; + } + public COLON(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.COLON, 0)!; + } + public valueType(): ValueTypeContext[]; + public valueType(i: number): ValueTypeContext | null; + public valueType(i?: number): ValueTypeContext[] | ValueTypeContext | null { + if (i === undefined) { + return this.getRuleContexts(ValueTypeContext); + } + + return this.getRuleContext(i, ValueTypeContext); + } + public ARROW(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ARROW, 0)!; + } + public MODE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.MODE, 0)!; + } + public operationMode(): OperationModeContext { + return this.getRuleContext(0, OperationModeContext)!; + } + public RECEIVER(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RECEIVER, 0)!; + } + public receiverRequirement(): ReceiverRequirementContext { + return this.getRuleContext(0, ReceiverRequirementContext)!; + } + public SEMI(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SEMI, 0)!; + } + public eventClause(): EventClauseContext | null { + return this.getRuleContext(0, EventClauseContext); + } + public dependencyBlock(): DependencyBlockContext | null { + return this.getRuleContext(0, DependencyBlockContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_packageOperationExport; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitPackageOperationExport) { + return visitor.visitPackageOperationExport(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PackageFunctionExportContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public FUNCTION(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.FUNCTION, 0)!; + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public ID(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ID, 0)!; + } + public stringLiteral(): StringLiteralContext { + return this.getRuleContext(0, StringLiteralContext)!; + } + public COLON(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.COLON, 0)!; + } + public valueType(): ValueTypeContext[]; + public valueType(i: number): ValueTypeContext | null; + public valueType(i?: number): ValueTypeContext[] | ValueTypeContext | null { + if (i === undefined) { + return this.getRuleContexts(ValueTypeContext); + } + + return this.getRuleContext(i, ValueTypeContext); + } + public ARROW(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ARROW, 0)!; + } + public SEMI(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SEMI, 0)!; + } + public dependencyBlock(): DependencyBlockContext | null { + return this.getRuleContext(0, DependencyBlockContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_packageFunctionExport; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitPackageFunctionExport) { + return visitor.visitPackageFunctionExport(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PackageConstructorExportContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public CONSTRUCTOR(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.CONSTRUCTOR, 0)!; + } + public identifier(): IdentifierContext[]; + public identifier(i: number): IdentifierContext | null; + public identifier(i?: number): IdentifierContext[] | IdentifierContext | null { + if (i === undefined) { + return this.getRuleContexts(IdentifierContext); + } + + return this.getRuleContext(i, IdentifierContext); + } + public ID(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ID, 0)!; + } + public stringLiteral(): StringLiteralContext { + return this.getRuleContext(0, StringLiteralContext)!; + } + public CONSTRUCTS(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.CONSTRUCTS, 0)!; + } + public COLON(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.COLON, 0)!; + } + public valueType(): ValueTypeContext { + return this.getRuleContext(0, ValueTypeContext)!; + } + public SEMI(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SEMI, 0)!; + } + public dependencyBlock(): DependencyBlockContext | null { + return this.getRuleContext(0, DependencyBlockContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_packageConstructorExport; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitPackageConstructorExport) { + return visitor.visitPackageConstructorExport(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class EventClauseContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public EMITS(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.EMITS, 0)!; + } + public valueType(): ValueTypeContext { + return this.getRuleContext(0, ValueTypeContext)!; + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_eventClause; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitEventClause) { + return visitor.visitEventClause(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class OperationModeContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public CALL(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.CALL, 0); + } + public WATCH_START(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WATCH_START, 0); + } + public WATCH_STOP(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WATCH_STOP, 0); + } + public SUBSCRIBE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.SUBSCRIBE, 0); + } + public UNSUBSCRIBE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.UNSUBSCRIBE, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_operationMode; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitOperationMode) { + return visitor.visitOperationMode(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ReceiverRequirementContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public ANY(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.ANY, 0); + } + public ATOM(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.ATOM, 0); + } + public identifier(): IdentifierContext | null { + return this.getRuleContext(0, IdentifierContext); + } + public INTERFACES(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.INTERFACES, 0); + } + public LBRACK(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.LBRACK, 0); + } + public RBRACK(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.RBRACK, 0); + } + public identifierList(): IdentifierListContext | null { + return this.getRuleContext(0, IdentifierListContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_receiverRequirement; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitReceiverRequirement) { + return visitor.visitReceiverRequirement(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class IdentifierListContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public identifier(): IdentifierContext[]; + public identifier(i: number): IdentifierContext | null; + public identifier(i?: number): IdentifierContext[] | IdentifierContext | null { + if (i === undefined) { + return this.getRuleContexts(IdentifierContext); + } + + return this.getRuleContext(i, IdentifierContext); + } + public COMMA(): antlr.TerminalNode[]; + public COMMA(i: number): antlr.TerminalNode | null; + public COMMA(i?: number): antlr.TerminalNode | null | antlr.TerminalNode[] { + if (i === undefined) { + return this.getTokens(QuixosCapabilityParser.COMMA); + } else { + return this.getToken(QuixosCapabilityParser.COMMA, i); + } + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_identifierList; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitIdentifierList) { + return visitor.visitIdentifierList(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class DependencyBlockContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public REQUIRES(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.REQUIRES, 0)!; + } + public LBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.LBRACE, 0)!; + } + public RBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RBRACE, 0)!; + } + public dependencyPort(): DependencyPortContext[]; + public dependencyPort(i: number): DependencyPortContext | null; + public dependencyPort(i?: number): DependencyPortContext[] | DependencyPortContext | null { + if (i === undefined) { + return this.getRuleContexts(DependencyPortContext); + } + + return this.getRuleContext(i, DependencyPortContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_dependencyBlock; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitDependencyBlock) { + return visitor.visitDependencyBlock(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class DependencyPortContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public STATE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.STATE, 0); + } + public identifier(): IdentifierContext[]; + public identifier(i: number): IdentifierContext | null; + public identifier(i?: number): IdentifierContext[] | IdentifierContext | null { + if (i === undefined) { + return this.getRuleContexts(IdentifierContext); + } + + return this.getRuleContext(i, IdentifierContext); + } + public ID(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ID, 0)!; + } + public stringLiteral(): StringLiteralContext { + return this.getRuleContext(0, StringLiteralContext)!; + } + public COLON(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.COLON, 0)!; + } + public valueType(): ValueTypeContext | null { + return this.getRuleContext(0, ValueTypeContext); + } + public primitiveList(): PrimitiveListContext | null { + return this.getRuleContext(0, PrimitiveListContext); + } + public SEMI(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SEMI, 0)!; + } + public EDGE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.EDGE, 0); + } + public cardinality(): CardinalityContext | null { + return this.getRuleContext(0, CardinalityContext); + } + public targetConstraint(): TargetConstraintContext | null { + return this.getRuleContext(0, TargetConstraintContext); + } + public INTERFACE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.INTERFACE, 0); + } + public CONSTRUCTOR(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.CONSTRUCTOR, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_dependencyPort; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitDependencyPort) { + return visitor.visitDependencyPort(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PrimitiveListContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public LBRACK(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.LBRACK, 0)!; + } + public primitive(): PrimitiveContext[]; + public primitive(i: number): PrimitiveContext | null; + public primitive(i?: number): PrimitiveContext[] | PrimitiveContext | null { + if (i === undefined) { + return this.getRuleContexts(PrimitiveContext); + } + + return this.getRuleContext(i, PrimitiveContext); + } + public RBRACK(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RBRACK, 0)!; + } + public COMMA(): antlr.TerminalNode[]; + public COMMA(i: number): antlr.TerminalNode | null; + public COMMA(i?: number): antlr.TerminalNode | null | antlr.TerminalNode[] { + if (i === undefined) { + return this.getTokens(QuixosCapabilityParser.COMMA); + } else { + return this.getToken(QuixosCapabilityParser.COMMA, i); + } + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_primitiveList; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitPrimitiveList) { + return visitor.visitPrimitiveList(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PrimitiveContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public READ(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.READ, 0); + } + public WRITE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WRITE, 0); + } + public RESOLVE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.RESOLVE, 0); + } + public CONNECT(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.CONNECT, 0); + } + public DISCONNECT(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.DISCONNECT, 0); + } + public WATCH_START(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WATCH_START, 0); + } + public WATCH_STOP(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WATCH_STOP, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_primitive; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitPrimitive) { + return visitor.visitPrimitive(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class SharedAttachmentDeclContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public SHARED(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SHARED, 0)!; + } + public attachmentDecl(): AttachmentDeclContext { + return this.getRuleContext(0, AttachmentDeclContext)!; + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_sharedAttachmentDecl; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitSharedAttachmentDecl) { + return visitor.visitSharedAttachmentDecl(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class AttachmentDeclContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public stateDecl(): StateDeclContext | null { + return this.getRuleContext(0, StateDeclContext); + } + public edgeDecl(): EdgeDeclContext | null { + return this.getRuleContext(0, EdgeDeclContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_attachmentDecl; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitAttachmentDecl) { + return visitor.visitAttachmentDecl(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class StateDeclContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public STATE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.STATE, 0)!; + } + public identifier(): IdentifierContext[]; + public identifier(i: number): IdentifierContext | null; + public identifier(i?: number): IdentifierContext[] | IdentifierContext | null { + if (i === undefined) { + return this.getRuleContexts(IdentifierContext); + } + + return this.getRuleContext(i, IdentifierContext); + } + public ID(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ID, 0)!; + } + public stringLiteral(): StringLiteralContext { + return this.getRuleContext(0, StringLiteralContext)!; + } + public ON(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ON, 0)!; + } + public COLON(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.COLON, 0)!; + } + public valueType(): ValueTypeContext { + return this.getRuleContext(0, ValueTypeContext)!; + } + public POLICY(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.POLICY, 0)!; + } + public storagePolicy(): StoragePolicyContext { + return this.getRuleContext(0, StoragePolicyContext)!; + } + public SEMI(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SEMI, 0)!; + } + public DEFAULT(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.DEFAULT, 0); + } + public jsonLiteral(): JsonLiteralContext | null { + return this.getRuleContext(0, JsonLiteralContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_stateDecl; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitStateDecl) { + return visitor.visitStateDecl(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class StoragePolicyContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public OPTIMISTIC_REGISTER(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.OPTIMISTIC_REGISTER, 0); + } + public CRDT(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.CRDT, 0); + } + public LPAREN(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.LPAREN, 0); + } + public valueType(): ValueTypeContext | null { + return this.getRuleContext(0, ValueTypeContext); + } + public RPAREN(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.RPAREN, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_storagePolicy; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitStoragePolicy) { + return visitor.visitStoragePolicy(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class EdgeDeclContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public EDGE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.EDGE, 0)!; + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public ID(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ID, 0)!; + } + public stringLiteral(): StringLiteralContext { + return this.getRuleContext(0, StringLiteralContext)!; + } + public LBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.LBRACE, 0)!; + } + public edgeEndpoint(): EdgeEndpointContext[]; + public edgeEndpoint(i: number): EdgeEndpointContext | null; + public edgeEndpoint(i?: number): EdgeEndpointContext[] | EdgeEndpointContext | null { + if (i === undefined) { + return this.getRuleContexts(EdgeEndpointContext); + } + + return this.getRuleContext(i, EdgeEndpointContext); + } + public RBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RBRACE, 0)!; + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_edgeDecl; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitEdgeDecl) { + return visitor.visitEdgeDecl(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class EdgeEndpointContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public targetConstraint(): TargetConstraintContext { + return this.getRuleContext(0, TargetConstraintContext)!; + } + public PROJECTION(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.PROJECTION, 0)!; + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public ID(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.ID, 0)!; + } + public stringLiteral(): StringLiteralContext { + return this.getRuleContext(0, StringLiteralContext)!; + } + public cardinality(): CardinalityContext { + return this.getRuleContext(0, CardinalityContext)!; + } + public SEMI(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SEMI, 0)!; + } + public ORDERED(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.ORDERED, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_edgeEndpoint; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitEdgeEndpoint) { + return visitor.visitEdgeEndpoint(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ConformanceDeclContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public CONFORM(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.CONFORM, 0)!; + } + public identifier(): IdentifierContext[]; + public identifier(i: number): IdentifierContext | null; + public identifier(i?: number): IdentifierContext[] | IdentifierContext | null { + if (i === undefined) { + return this.getRuleContexts(IdentifierContext); + } + + return this.getRuleContext(i, IdentifierContext); + } + public AS(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.AS, 0)!; + } + public LBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.LBRACE, 0)!; + } + public RBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RBRACE, 0)!; + } + public conformanceItem(): ConformanceItemContext[]; + public conformanceItem(i: number): ConformanceItemContext | null; + public conformanceItem(i?: number): ConformanceItemContext[] | ConformanceItemContext | null { + if (i === undefined) { + return this.getRuleContexts(ConformanceItemContext); + } + + return this.getRuleContext(i, ConformanceItemContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_conformanceDecl; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitConformanceDecl) { + return visitor.visitConformanceDecl(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ConformanceItemContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public PRIVATE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.PRIVATE, 0); + } + public attachmentDecl(): AttachmentDeclContext | null { + return this.getRuleContext(0, AttachmentDeclContext); + } + public operationBindingDecl(): OperationBindingDeclContext | null { + return this.getRuleContext(0, OperationBindingDeclContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_conformanceItem; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitConformanceItem) { + return visitor.visitConformanceItem(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class OperationBindingDeclContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public BIND(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.BIND, 0)!; + } + public memberOperationRef(): MemberOperationRefContext { + return this.getRuleContext(0, MemberOperationRefContext)!; + } + public TO(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.TO, 0)!; + } + public operationProvider(): OperationProviderContext { + return this.getRuleContext(0, OperationProviderContext)!; + } + public SEMI(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SEMI, 0)!; + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_operationBindingDecl; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitOperationBindingDecl) { + return visitor.visitOperationBindingDecl(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class MemberOperationRefContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public DOT(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.DOT, 0)!; + } + public operationName(): OperationNameContext { + return this.getRuleContext(0, OperationNameContext)!; + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_memberOperationRef; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitMemberOperationRef) { + return visitor.visitMemberOperationRef(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class OperationNameContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public identifier(): IdentifierContext | null { + return this.getRuleContext(0, IdentifierContext); + } + public CALL(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.CALL, 0); + } + public GET(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.GET, 0); + } + public SET(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.SET, 0); + } + public RESOLVE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.RESOLVE, 0); + } + public CONNECT(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.CONNECT, 0); + } + public DISCONNECT(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.DISCONNECT, 0); + } + public WATCH_START(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WATCH_START, 0); + } + public WATCH_STOP(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WATCH_STOP, 0); + } + public SUBSCRIBE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.SUBSCRIBE, 0); + } + public UNSUBSCRIBE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.UNSUBSCRIBE, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_operationName; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitOperationName) { + return visitor.visitOperationName(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class OperationProviderContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public STATE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.STATE, 0); + } + public identifier(): IdentifierContext[]; + public identifier(i: number): IdentifierContext | null; + public identifier(i?: number): IdentifierContext[] | IdentifierContext | null { + if (i === undefined) { + return this.getRuleContexts(IdentifierContext); + } + + return this.getRuleContext(i, IdentifierContext); + } + public DOT(): antlr.TerminalNode[]; + public DOT(i: number): antlr.TerminalNode | null; + public DOT(i?: number): antlr.TerminalNode | null | antlr.TerminalNode[] { + if (i === undefined) { + return this.getTokens(QuixosCapabilityParser.DOT); + } else { + return this.getToken(QuixosCapabilityParser.DOT, i); + } + } + public statePrimitive(): StatePrimitiveContext | null { + return this.getRuleContext(0, StatePrimitiveContext); + } + public EDGE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.EDGE, 0); + } + public edgePrimitive(): EdgePrimitiveContext | null { + return this.getRuleContext(0, EdgePrimitiveContext); + } + public PACKAGE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.PACKAGE, 0); + } + public dependencyBindingBlock(): DependencyBindingBlockContext | null { + return this.getRuleContext(0, DependencyBindingBlockContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_operationProvider; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitOperationProvider) { + return visitor.visitOperationProvider(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class StatePrimitiveContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public READ(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.READ, 0); + } + public WRITE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WRITE, 0); + } + public WATCH_START(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WATCH_START, 0); + } + public WATCH_STOP(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WATCH_STOP, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_statePrimitive; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitStatePrimitive) { + return visitor.visitStatePrimitive(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class EdgePrimitiveContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public RESOLVE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.RESOLVE, 0); + } + public CONNECT(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.CONNECT, 0); + } + public DISCONNECT(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.DISCONNECT, 0); + } + public WATCH_START(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WATCH_START, 0); + } + public WATCH_STOP(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WATCH_STOP, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_edgePrimitive; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitEdgePrimitive) { + return visitor.visitEdgePrimitive(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class DependencyBindingBlockContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public WITH(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.WITH, 0)!; + } + public LBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.LBRACE, 0)!; + } + public RBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RBRACE, 0)!; + } + public dependencyBinding(): DependencyBindingContext[]; + public dependencyBinding(i: number): DependencyBindingContext | null; + public dependencyBinding(i?: number): DependencyBindingContext[] | DependencyBindingContext | null { + if (i === undefined) { + return this.getRuleContexts(DependencyBindingContext); + } + + return this.getRuleContext(i, DependencyBindingContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_dependencyBindingBlock; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitDependencyBindingBlock) { + return visitor.visitDependencyBindingBlock(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class DependencyBindingContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public identifier(): IdentifierContext[]; + public identifier(i: number): IdentifierContext | null; + public identifier(i?: number): IdentifierContext[] | IdentifierContext | null { + if (i === undefined) { + return this.getRuleContexts(IdentifierContext); + } + + return this.getRuleContext(i, IdentifierContext); + } + public TO(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.TO, 0)!; + } + public STATE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.STATE, 0); + } + public SEMI(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SEMI, 0)!; + } + public EDGE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.EDGE, 0); + } + public DOT(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.DOT, 0); + } + public INTERFACE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.INTERFACE, 0); + } + public CONSTRUCTOR(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.CONSTRUCTOR, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_dependencyBinding; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitDependencyBinding) { + return visitor.visitDependencyBinding(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ConstructorBindingDeclContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public CONSTRUCTOR(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.CONSTRUCTOR, 0)!; + } + public identifier(): IdentifierContext[]; + public identifier(i: number): IdentifierContext | null; + public identifier(i?: number): IdentifierContext[] | IdentifierContext | null { + if (i === undefined) { + return this.getRuleContexts(IdentifierContext); + } + + return this.getRuleContext(i, IdentifierContext); + } + public TO(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.TO, 0)!; + } + public DOT(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.DOT, 0)!; + } + public SEMI(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.SEMI, 0)!; + } + public dependencyBindingBlock(): DependencyBindingBlockContext | null { + return this.getRuleContext(0, DependencyBindingBlockContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_constructorBindingDecl; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitConstructorBindingDecl) { + return visitor.visitConstructorBindingDecl(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ValueTypeContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public scalarType(): ScalarTypeContext | null { + return this.getRuleContext(0, ScalarTypeContext); + } + public UNIT(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.UNIT, 0); + } + public WATCH_HANDLE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.WATCH_HANDLE, 0); + } + public MESSAGE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.MESSAGE, 0); + } + public stringLiteral(): StringLiteralContext | null { + return this.getRuleContext(0, StringLiteralContext); + } + public ATOM_REF(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.ATOM_REF, 0); + } + public LT(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.LT, 0); + } + public identifier(): IdentifierContext | null { + return this.getRuleContext(0, IdentifierContext); + } + public GT(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.GT, 0); + } + public INTERFACE_REF(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.INTERFACE_REF, 0); + } + public OPTIONAL(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.OPTIONAL, 0); + } + public valueType(): ValueTypeContext | null { + return this.getRuleContext(0, ValueTypeContext); + } + public LIST(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.LIST, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_valueType; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitValueType) { + return visitor.visitValueType(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ScalarTypeContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public BOOL(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.BOOL, 0); + } + public BYTES(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.BYTES, 0); + } + public DOUBLE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.DOUBLE, 0); + } + public INT32(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.INT32, 0); + } + public INT64(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.INT64, 0); + } + public STRING(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.STRING, 0); + } + public UINT32(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.UINT32, 0); + } + public UINT64(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.UINT64, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_scalarType; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitScalarType) { + return visitor.visitScalarType(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class CardinalityContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public OPTIONAL_ONE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.OPTIONAL_ONE, 0); + } + public EXACTLY_ONE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.EXACTLY_ONE, 0); + } + public MANY(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.MANY, 0); + } + public MANY_UNIQUE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.MANY_UNIQUE, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_cardinality; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitCardinality) { + return visitor.visitCardinality(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class JsonLiteralContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public stringLiteral(): StringLiteralContext | null { + return this.getRuleContext(0, StringLiteralContext); + } + public INTEGER(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.INTEGER, 0); + } + public JSON_NUMBER(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.JSON_NUMBER, 0); + } + public TRUE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.TRUE, 0); + } + public FALSE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.FALSE, 0); + } + public NULL(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.NULL, 0); + } + public jsonObject(): JsonObjectContext | null { + return this.getRuleContext(0, JsonObjectContext); + } + public jsonArray(): JsonArrayContext | null { + return this.getRuleContext(0, JsonArrayContext); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_jsonLiteral; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitJsonLiteral) { + return visitor.visitJsonLiteral(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class JsonObjectContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public LBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.LBRACE, 0)!; + } + public RBRACE(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RBRACE, 0)!; + } + public jsonMember(): JsonMemberContext[]; + public jsonMember(i: number): JsonMemberContext | null; + public jsonMember(i?: number): JsonMemberContext[] | JsonMemberContext | null { + if (i === undefined) { + return this.getRuleContexts(JsonMemberContext); + } + + return this.getRuleContext(i, JsonMemberContext); + } + public COMMA(): antlr.TerminalNode[]; + public COMMA(i: number): antlr.TerminalNode | null; + public COMMA(i?: number): antlr.TerminalNode | null | antlr.TerminalNode[] { + if (i === undefined) { + return this.getTokens(QuixosCapabilityParser.COMMA); + } else { + return this.getToken(QuixosCapabilityParser.COMMA, i); + } + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_jsonObject; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitJsonObject) { + return visitor.visitJsonObject(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class JsonMemberContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public stringLiteral(): StringLiteralContext { + return this.getRuleContext(0, StringLiteralContext)!; + } + public COLON(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.COLON, 0)!; + } + public jsonLiteral(): JsonLiteralContext { + return this.getRuleContext(0, JsonLiteralContext)!; + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_jsonMember; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitJsonMember) { + return visitor.visitJsonMember(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class JsonArrayContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public LBRACK(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.LBRACK, 0)!; + } + public RBRACK(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.RBRACK, 0)!; + } + public jsonLiteral(): JsonLiteralContext[]; + public jsonLiteral(i: number): JsonLiteralContext | null; + public jsonLiteral(i?: number): JsonLiteralContext[] | JsonLiteralContext | null { + if (i === undefined) { + return this.getRuleContexts(JsonLiteralContext); + } + + return this.getRuleContext(i, JsonLiteralContext); + } + public COMMA(): antlr.TerminalNode[]; + public COMMA(i: number): antlr.TerminalNode | null; + public COMMA(i?: number): antlr.TerminalNode | null | antlr.TerminalNode[] { + if (i === undefined) { + return this.getTokens(QuixosCapabilityParser.COMMA); + } else { + return this.getToken(QuixosCapabilityParser.COMMA, i); + } + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_jsonArray; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitJsonArray) { + return visitor.visitJsonArray(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class IdentifierContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public IDENTIFIER(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.IDENTIFIER, 0); + } + public SOURCE(): antlr.TerminalNode | null { + return this.getToken(QuixosCapabilityParser.SOURCE, 0); + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_identifier; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitIdentifier) { + return visitor.visitIdentifier(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class StringLiteralContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public STRING_LITERAL(): antlr.TerminalNode { + return this.getToken(QuixosCapabilityParser.STRING_LITERAL, 0)!; + } + public override get ruleIndex(): number { + return QuixosCapabilityParser.RULE_stringLiteral; + } + public override accept(visitor: QuixosCapabilityVisitor): Result | null { + if (visitor.visitStringLiteral) { + return visitor.visitStringLiteral(this); + } else { + return visitor.visitChildren(this); + } + } +} diff --git a/src/capability-language/generated/QuixosCapabilityVisitor.ts b/src/capability-language/generated/QuixosCapabilityVisitor.ts new file mode 100644 index 0000000..35f8891 --- /dev/null +++ b/src/capability-language/generated/QuixosCapabilityVisitor.ts @@ -0,0 +1,380 @@ + +import { AbstractParseTreeVisitor } from "antlr4ng"; + + +import { DocumentContext } from "./QuixosCapabilityParser.js"; +import { WorkspaceDeclContext } from "./QuixosCapabilityParser.js"; +import { WorkspaceItemContext } from "./QuixosCapabilityParser.js"; +import { AtomDeclContext } from "./QuixosCapabilityParser.js"; +import { InterfaceDeclContext } from "./QuixosCapabilityParser.js"; +import { SourceBlockContext } from "./QuixosCapabilityParser.js"; +import { InterfaceMemberContext } from "./QuixosCapabilityParser.js"; +import { OperationMemberContext } from "./QuixosCapabilityParser.js"; +import { ValueMemberContext } from "./QuixosCapabilityParser.js"; +import { ValueMemberOperationContext } from "./QuixosCapabilityParser.js"; +import { RelationshipMemberContext } from "./QuixosCapabilityParser.js"; +import { RelationshipOperationContext } from "./QuixosCapabilityParser.js"; +import { TargetConstraintContext } from "./QuixosCapabilityParser.js"; +import { PackageDeclContext } from "./QuixosCapabilityParser.js"; +import { PackageExportContext } from "./QuixosCapabilityParser.js"; +import { PackageOperationExportContext } from "./QuixosCapabilityParser.js"; +import { PackageFunctionExportContext } from "./QuixosCapabilityParser.js"; +import { PackageConstructorExportContext } from "./QuixosCapabilityParser.js"; +import { EventClauseContext } from "./QuixosCapabilityParser.js"; +import { OperationModeContext } from "./QuixosCapabilityParser.js"; +import { ReceiverRequirementContext } from "./QuixosCapabilityParser.js"; +import { IdentifierListContext } from "./QuixosCapabilityParser.js"; +import { DependencyBlockContext } from "./QuixosCapabilityParser.js"; +import { DependencyPortContext } from "./QuixosCapabilityParser.js"; +import { PrimitiveListContext } from "./QuixosCapabilityParser.js"; +import { PrimitiveContext } from "./QuixosCapabilityParser.js"; +import { SharedAttachmentDeclContext } from "./QuixosCapabilityParser.js"; +import { AttachmentDeclContext } from "./QuixosCapabilityParser.js"; +import { StateDeclContext } from "./QuixosCapabilityParser.js"; +import { StoragePolicyContext } from "./QuixosCapabilityParser.js"; +import { EdgeDeclContext } from "./QuixosCapabilityParser.js"; +import { EdgeEndpointContext } from "./QuixosCapabilityParser.js"; +import { ConformanceDeclContext } from "./QuixosCapabilityParser.js"; +import { ConformanceItemContext } from "./QuixosCapabilityParser.js"; +import { OperationBindingDeclContext } from "./QuixosCapabilityParser.js"; +import { MemberOperationRefContext } from "./QuixosCapabilityParser.js"; +import { OperationNameContext } from "./QuixosCapabilityParser.js"; +import { OperationProviderContext } from "./QuixosCapabilityParser.js"; +import { StatePrimitiveContext } from "./QuixosCapabilityParser.js"; +import { EdgePrimitiveContext } from "./QuixosCapabilityParser.js"; +import { DependencyBindingBlockContext } from "./QuixosCapabilityParser.js"; +import { DependencyBindingContext } from "./QuixosCapabilityParser.js"; +import { ConstructorBindingDeclContext } from "./QuixosCapabilityParser.js"; +import { ValueTypeContext } from "./QuixosCapabilityParser.js"; +import { ScalarTypeContext } from "./QuixosCapabilityParser.js"; +import { CardinalityContext } from "./QuixosCapabilityParser.js"; +import { JsonLiteralContext } from "./QuixosCapabilityParser.js"; +import { JsonObjectContext } from "./QuixosCapabilityParser.js"; +import { JsonMemberContext } from "./QuixosCapabilityParser.js"; +import { JsonArrayContext } from "./QuixosCapabilityParser.js"; +import { IdentifierContext } from "./QuixosCapabilityParser.js"; +import { StringLiteralContext } from "./QuixosCapabilityParser.js"; + + +/** + * This interface defines a complete generic visitor for a parse tree produced + * by `QuixosCapabilityParser`. + * + * @param The return type of the visit operation. Use `void` for + * operations with no return type. + */ +export class QuixosCapabilityVisitor extends AbstractParseTreeVisitor { + /** + * Visit a parse tree produced by `QuixosCapabilityParser.document`. + * @param ctx the parse tree + * @return the visitor result + */ + visitDocument?: (ctx: DocumentContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.workspaceDecl`. + * @param ctx the parse tree + * @return the visitor result + */ + visitWorkspaceDecl?: (ctx: WorkspaceDeclContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.workspaceItem`. + * @param ctx the parse tree + * @return the visitor result + */ + visitWorkspaceItem?: (ctx: WorkspaceItemContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.atomDecl`. + * @param ctx the parse tree + * @return the visitor result + */ + visitAtomDecl?: (ctx: AtomDeclContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.interfaceDecl`. + * @param ctx the parse tree + * @return the visitor result + */ + visitInterfaceDecl?: (ctx: InterfaceDeclContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.sourceBlock`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSourceBlock?: (ctx: SourceBlockContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.interfaceMember`. + * @param ctx the parse tree + * @return the visitor result + */ + visitInterfaceMember?: (ctx: InterfaceMemberContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.operationMember`. + * @param ctx the parse tree + * @return the visitor result + */ + visitOperationMember?: (ctx: OperationMemberContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.valueMember`. + * @param ctx the parse tree + * @return the visitor result + */ + visitValueMember?: (ctx: ValueMemberContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.valueMemberOperation`. + * @param ctx the parse tree + * @return the visitor result + */ + visitValueMemberOperation?: (ctx: ValueMemberOperationContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.relationshipMember`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRelationshipMember?: (ctx: RelationshipMemberContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.relationshipOperation`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRelationshipOperation?: (ctx: RelationshipOperationContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.targetConstraint`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTargetConstraint?: (ctx: TargetConstraintContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.packageDecl`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPackageDecl?: (ctx: PackageDeclContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.packageExport`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPackageExport?: (ctx: PackageExportContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.packageOperationExport`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPackageOperationExport?: (ctx: PackageOperationExportContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.packageFunctionExport`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPackageFunctionExport?: (ctx: PackageFunctionExportContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.packageConstructorExport`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPackageConstructorExport?: (ctx: PackageConstructorExportContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.eventClause`. + * @param ctx the parse tree + * @return the visitor result + */ + visitEventClause?: (ctx: EventClauseContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.operationMode`. + * @param ctx the parse tree + * @return the visitor result + */ + visitOperationMode?: (ctx: OperationModeContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.receiverRequirement`. + * @param ctx the parse tree + * @return the visitor result + */ + visitReceiverRequirement?: (ctx: ReceiverRequirementContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.identifierList`. + * @param ctx the parse tree + * @return the visitor result + */ + visitIdentifierList?: (ctx: IdentifierListContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.dependencyBlock`. + * @param ctx the parse tree + * @return the visitor result + */ + visitDependencyBlock?: (ctx: DependencyBlockContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.dependencyPort`. + * @param ctx the parse tree + * @return the visitor result + */ + visitDependencyPort?: (ctx: DependencyPortContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.primitiveList`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPrimitiveList?: (ctx: PrimitiveListContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.primitive`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPrimitive?: (ctx: PrimitiveContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.sharedAttachmentDecl`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSharedAttachmentDecl?: (ctx: SharedAttachmentDeclContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.attachmentDecl`. + * @param ctx the parse tree + * @return the visitor result + */ + visitAttachmentDecl?: (ctx: AttachmentDeclContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.stateDecl`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStateDecl?: (ctx: StateDeclContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.storagePolicy`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStoragePolicy?: (ctx: StoragePolicyContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.edgeDecl`. + * @param ctx the parse tree + * @return the visitor result + */ + visitEdgeDecl?: (ctx: EdgeDeclContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.edgeEndpoint`. + * @param ctx the parse tree + * @return the visitor result + */ + visitEdgeEndpoint?: (ctx: EdgeEndpointContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.conformanceDecl`. + * @param ctx the parse tree + * @return the visitor result + */ + visitConformanceDecl?: (ctx: ConformanceDeclContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.conformanceItem`. + * @param ctx the parse tree + * @return the visitor result + */ + visitConformanceItem?: (ctx: ConformanceItemContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.operationBindingDecl`. + * @param ctx the parse tree + * @return the visitor result + */ + visitOperationBindingDecl?: (ctx: OperationBindingDeclContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.memberOperationRef`. + * @param ctx the parse tree + * @return the visitor result + */ + visitMemberOperationRef?: (ctx: MemberOperationRefContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.operationName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitOperationName?: (ctx: OperationNameContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.operationProvider`. + * @param ctx the parse tree + * @return the visitor result + */ + visitOperationProvider?: (ctx: OperationProviderContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.statePrimitive`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStatePrimitive?: (ctx: StatePrimitiveContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.edgePrimitive`. + * @param ctx the parse tree + * @return the visitor result + */ + visitEdgePrimitive?: (ctx: EdgePrimitiveContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.dependencyBindingBlock`. + * @param ctx the parse tree + * @return the visitor result + */ + visitDependencyBindingBlock?: (ctx: DependencyBindingBlockContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.dependencyBinding`. + * @param ctx the parse tree + * @return the visitor result + */ + visitDependencyBinding?: (ctx: DependencyBindingContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.constructorBindingDecl`. + * @param ctx the parse tree + * @return the visitor result + */ + visitConstructorBindingDecl?: (ctx: ConstructorBindingDeclContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.valueType`. + * @param ctx the parse tree + * @return the visitor result + */ + visitValueType?: (ctx: ValueTypeContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.scalarType`. + * @param ctx the parse tree + * @return the visitor result + */ + visitScalarType?: (ctx: ScalarTypeContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.cardinality`. + * @param ctx the parse tree + * @return the visitor result + */ + visitCardinality?: (ctx: CardinalityContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.jsonLiteral`. + * @param ctx the parse tree + * @return the visitor result + */ + visitJsonLiteral?: (ctx: JsonLiteralContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.jsonObject`. + * @param ctx the parse tree + * @return the visitor result + */ + visitJsonObject?: (ctx: JsonObjectContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.jsonMember`. + * @param ctx the parse tree + * @return the visitor result + */ + visitJsonMember?: (ctx: JsonMemberContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.jsonArray`. + * @param ctx the parse tree + * @return the visitor result + */ + visitJsonArray?: (ctx: JsonArrayContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.identifier`. + * @param ctx the parse tree + * @return the visitor result + */ + visitIdentifier?: (ctx: IdentifierContext) => Result; + /** + * Visit a parse tree produced by `QuixosCapabilityParser.stringLiteral`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStringLiteral?: (ctx: StringLiteralContext) => Result; +} + diff --git a/src/capability-language/index.ts b/src/capability-language/index.ts new file mode 100644 index 0000000..32f5645 --- /dev/null +++ b/src/capability-language/index.ts @@ -0,0 +1 @@ +export * from "./parser.js"; diff --git a/src/capability-language/parser.ts b/src/capability-language/parser.ts new file mode 100644 index 0000000..0786029 --- /dev/null +++ b/src/capability-language/parser.ts @@ -0,0 +1,1488 @@ +import { + BaseErrorListener, + CharStream, + CommonTokenStream, + type ATNSimulator, + type ParserRuleContext, + type RecognitionException, + type Recognizer, + type Token, +} from "antlr4ng"; +import { + capabilityId, + cardinalityValueType, + compileWorkspaceRevision, + valueType, + type AtomId, + type BoundDependency, + type CompiledWorkspaceRevision, + type DependencyPort, + type EdgeCardinality, + type EdgeDefinition, + type EdgeEndpoint, + type EdgeEndpointConstraint, + type EdgePrimitive, + type InterfaceMember, + type InterfaceOperation, + type InterfaceOperationMode, + type InterfaceRevision, + type PackageExport, + type PackageReceiverRequirement, + type PackageRevision, + type PersistentAttachment, + type SourceRevision, + type StatePrimitive, + type StateSlotDefinition, + type ValueType, + type WorkspaceRevision, +} from "../capability-model/index.js"; +import { QuixosCapabilityLexer } from "./generated/QuixosCapabilityLexer.js"; +import { QuixosCapabilityParser, + type AttachmentDeclContext, + type ConformanceDeclContext, + type DependencyBindingBlockContext, + type DependencyPortContext, + type EdgeDeclContext, + type EdgeEndpointContext, + type InterfaceDeclContext, + type PackageConstructorExportContext, + type PackageDeclContext, + type PackageFunctionExportContext, + type PackageOperationExportContext, + type OperationMemberContext, + type SourceBlockContext, + type StateDeclContext, + type TargetConstraintContext, + type ValueMemberContext, + type ValueTypeContext, + type RelationshipMemberContext, + type WorkspaceDeclContext, +} from "./generated/QuixosCapabilityParser.js"; + +export type CapabilitySourceDiagnosticPhase = + | "syntax" + | "lowering" + | "validation"; + +export interface CapabilitySourceDiagnostic { + phase: CapabilitySourceDiagnosticPhase; + code: string; + message: string; + fileName: string; + line: number; + column: number; + path?: string; +} + +export type CapabilitySourceCompileResult = + | { + ok: true; + workspace: WorkspaceRevision; + plan: CompiledWorkspaceRevision; + diagnostics: []; + } + | { + ok: false; + diagnostics: CapabilitySourceDiagnostic[]; + }; + +interface InterfaceSymbol { + revisionId: InterfaceRevision["revisionId"]; + members: Map< + string, + { + operations: Map; + } + >; +} + +interface PackageExportSymbol { + exportId: PackageExport["id"]; + ports: Map; +} + +interface PackageSymbol { + revisionId: PackageRevision["revisionId"]; + exports: Map; +} + +interface AttachmentSymbol { + attachment: PersistentAttachment; + projections: Map; +} + +interface LoweringState { + fileName: string; + diagnostics: CapabilitySourceDiagnostic[]; + atoms: Map; + interfaces: Map; + packages: Map; + attachments: Map; +} + +class SyntaxErrorListener extends BaseErrorListener { + constructor( + private readonly fileName: string, + private readonly diagnostics: CapabilitySourceDiagnostic[], + ) { + super(); + } + + override syntaxError( + _recognizer: Recognizer, + _offendingSymbol: S | null, + line: number, + column: number, + message: string, + _error: RecognitionException | null, + ) { + this.diagnostics.push({ + phase: "syntax", + code: "syntax-error", + message, + fileName: this.fileName, + line, + column, + }); + } +} + +const contextPosition = (context: ParserRuleContext) => ({ + line: context.start?.line ?? 0, + column: context.start?.column ?? 0, +}); + +const loweringIssue = ( + state: LoweringState, + context: ParserRuleContext, + code: string, + message: string, +) => { + state.diagnostics.push({ + phase: "lowering", + code, + message, + fileName: state.fileName, + ...contextPosition(context), + }); +}; + +const text = (context: { getText(): string } | null): string => { + if (!context) { + throw new Error("ANTLR returned a missing context after a successful parse"); + } + return context.getText(); +}; + +const identifier = text; +const stringValue = (context: { getText(): string } | null) => + JSON.parse(text(context)) as string; + +const declareSymbol = ( + state: LoweringState, + table: Map, + name: string, + value: Value, + context: ParserRuleContext, + kind: string, +) => { + if (table.has(name)) { + loweringIssue( + state, + context, + "duplicate-symbol", + `Duplicate ${kind} authoring name ${name}`, + ); + return; + } + table.set(name, value); +}; + +const requireSymbol = ( + state: LoweringState, + table: ReadonlyMap, + name: string, + context: ParserRuleContext, + kind: string, +): Value | undefined => { + const value = table.get(name); + if (value === undefined) { + loweringIssue( + state, + context, + "unknown-symbol", + `Unknown ${kind} ${name}`, + ); + } + return value; +}; + +const lowerSource = (context: SourceBlockContext): SourceRevision => ({ + repository: stringValue(context.stringLiteral(0)), + commit: stringValue(context.stringLiteral(1)), +}); + +const lowerCardinality = ( + context: { getText(): string } | null, +): EdgeCardinality => text(context) as EdgeCardinality; + +const lowerConstraint = ( + state: LoweringState, + context: TargetConstraintContext | null, +): EdgeEndpointConstraint | undefined => { + if (!context) { + throw new Error("Missing target constraint after a successful parse"); + } + const name = identifier(context.identifier()); + if (context.ATOM()) { + const atomId = requireSymbol(state, state.atoms, name, context, "atom"); + return atomId ? { kind: "atom", atomId } : undefined; + } + const symbol = requireSymbol( + state, + state.interfaces, + name, + context, + "interface", + ); + return symbol + ? { kind: "interface", interfaceRevisionId: symbol.revisionId } + : undefined; +}; + +const lowerValueType = ( + state: LoweringState, + context: ValueTypeContext | null, +): ValueType => { + if (!context) { + throw new Error("Missing value type after a successful parse"); + } + const scalar = context.scalarType(); + if (scalar) { + return { kind: "scalar", name: text(scalar) as never }; + } + if (context.UNIT()) { + return valueType.unit; + } + if (context.WATCH_HANDLE()) { + return valueType.watchHandle; + } + if (context.MESSAGE()) { + return valueType.message(stringValue(context.stringLiteral())); + } + if (context.ATOM_REF()) { + const name = identifier(context.identifier()); + const atomId = requireSymbol(state, state.atoms, name, context, "atom"); + return valueType.atomRef(atomId ?? capabilityId.atom(`unresolved:${name}`)); + } + if (context.INTERFACE_REF()) { + const name = identifier(context.identifier()); + const symbol = requireSymbol( + state, + state.interfaces, + name, + context, + "interface", + ); + return valueType.interfaceRef( + symbol?.revisionId ?? capabilityId.interfaceRevision(`unresolved:${name}`), + ); + } + if (context.OPTIONAL()) { + return valueType.optional(lowerValueType(state, context.valueType())); + } + if (context.LIST()) { + return valueType.list(lowerValueType(state, context.valueType())); + } + loweringIssue(state, context, "invalid-type", "Unrecognized value type"); + return valueType.unit; +}; + +const valueOperation = ( + displayName: string, + id: InterfaceOperation["id"], + value: ValueType, +): InterfaceOperation => { + switch (displayName) { + case "get": + return { + id, + displayName, + inputType: valueType.unit, + outputType: value, + mode: "call", + }; + case "set": + return { + id, + displayName, + inputType: value, + outputType: valueType.unit, + mode: "call", + }; + case "watch-start": + return { + id, + displayName, + inputType: valueType.unit, + outputType: valueType.watchHandle, + eventType: value, + mode: "watch-start", + }; + case "watch-stop": + return { + id, + displayName, + inputType: valueType.watchHandle, + outputType: valueType.unit, + mode: "watch-stop", + }; + default: + throw new Error(`Unknown value operation ${displayName}`); + } +}; + +const relationshipOperation = ( + displayName: string, + id: InterfaceOperation["id"], + target: EdgeEndpointConstraint, + cardinality: EdgeCardinality, +): InterfaceOperation => { + const targetType = + target.kind === "atom" + ? valueType.atomRef(target.atomId) + : valueType.interfaceRef(target.interfaceRevisionId); + const resolvedType = cardinalityValueType(target, cardinality); + switch (displayName) { + case "resolve": + return { + id, + displayName, + inputType: valueType.unit, + outputType: resolvedType, + mode: "call", + }; + case "connect": + case "disconnect": + return { + id, + displayName, + inputType: targetType, + outputType: valueType.unit, + mode: "call", + }; + case "watch-start": + return { + id, + displayName, + inputType: valueType.unit, + outputType: valueType.watchHandle, + eventType: resolvedType, + mode: "watch-start", + }; + case "watch-stop": + return { + id, + displayName, + inputType: valueType.watchHandle, + outputType: valueType.unit, + mode: "watch-stop", + }; + default: + throw new Error(`Unknown relationship operation ${displayName}`); + } +}; + +const lowerValueMember = ( + state: LoweringState, + context: ValueMemberContext, +): InterfaceMember => { + const memberName = identifier(context.identifier()); + const memberValueType = lowerValueType(state, context.valueType()); + const operations: InterfaceOperation[] = []; + for (const operation of context.valueMemberOperation()) { + if (operation.GET()) { + operations.push( + valueOperation( + "get", + capabilityId.operation(stringValue(operation.stringLiteral(0))), + memberValueType, + ), + ); + } else if (operation.SET()) { + operations.push( + valueOperation( + "set", + capabilityId.operation(stringValue(operation.stringLiteral(0))), + memberValueType, + ), + ); + } else { + operations.push( + valueOperation( + "watch-start", + capabilityId.operation(stringValue(operation.stringLiteral(0))), + memberValueType, + ), + valueOperation( + "watch-stop", + capabilityId.operation(stringValue(operation.stringLiteral(1))), + memberValueType, + ), + ); + } + } + return { + kind: "value", + id: capabilityId.member(stringValue(context.stringLiteral())), + displayName: memberName, + valueType: memberValueType, + operations, + }; +}; + +const lowerRelationshipMember = ( + state: LoweringState, + context: RelationshipMemberContext, +): InterfaceMember | undefined => { + const target = lowerConstraint(state, context.targetConstraint()); + if (!target) { + return undefined; + } + const cardinality = lowerCardinality(context.cardinality()); + const operations: InterfaceOperation[] = []; + for (const operation of context.relationshipOperation()) { + if (operation.RESOLVE()) { + operations.push( + relationshipOperation( + "resolve", + capabilityId.operation(stringValue(operation.stringLiteral(0))), + target, + cardinality, + ), + ); + } else if (operation.CONNECT()) { + operations.push( + relationshipOperation( + "connect", + capabilityId.operation(stringValue(operation.stringLiteral(0))), + target, + cardinality, + ), + ); + } else if (operation.DISCONNECT()) { + operations.push( + relationshipOperation( + "disconnect", + capabilityId.operation(stringValue(operation.stringLiteral(0))), + target, + cardinality, + ), + ); + } else { + operations.push( + relationshipOperation( + "watch-start", + capabilityId.operation(stringValue(operation.stringLiteral(0))), + target, + cardinality, + ), + relationshipOperation( + "watch-stop", + capabilityId.operation(stringValue(operation.stringLiteral(1))), + target, + cardinality, + ), + ); + } + } + return { + kind: "relationship", + id: capabilityId.member(stringValue(context.stringLiteral())), + displayName: identifier(context.identifier()), + target, + cardinality, + ordered: Boolean(context.ORDERED()), + operations, + }; +}; + +const lowerOperationMember = ( + state: LoweringState, + context: OperationMemberContext, +): InterfaceMember => { + const inputType = lowerValueType(state, context.valueType(0)); + const outputType = lowerValueType(state, context.valueType(1)); + return { + kind: "operation", + id: capabilityId.member(stringValue(context.stringLiteral(0))), + displayName: identifier(context.identifier()), + inputType, + outputType, + operations: [{ + id: capabilityId.operation(stringValue(context.stringLiteral(1))), + displayName: "call", + inputType, + outputType, + mode: "call", + }], + }; +}; + +const lowerInterface = ( + state: LoweringState, + context: InterfaceDeclContext, +): InterfaceRevision => { + const alias = identifier(context.identifier()); + const members = context.interfaceMember().flatMap((entry) => { + const value = entry.valueMember(); + if (value) { + return [lowerValueMember(state, value)]; + } + const operation = entry.operationMember(); + if (operation) { + return [lowerOperationMember(state, operation)]; + } + const relationship = lowerRelationshipMember( + state, + entry.relationshipMember()!, + ); + return relationship ? [relationship] : []; + }); + const symbol = state.interfaces.get(alias)!; + for (const member of members) { + declareSymbol( + state, + symbol.members, + member.displayName, + { + operations: new Map( + member.operations.map((operation) => [operation.displayName, operation.id]), + ), + }, + context, + "interface member", + ); + } + return { + interfaceId: capabilityId.interface(stringValue(context.stringLiteral(0))), + revisionId: symbol.revisionId, + displayName: alias, + source: lowerSource(context.sourceBlock()), + members, + }; +}; + +const lowerDependencyPort = ( + state: LoweringState, + context: DependencyPortContext, +): DependencyPort | undefined => { + const name = identifier(context.identifier(0)); + const id = capabilityId.dependencyPort(stringValue(context.stringLiteral())); + if (context.STATE()) { + const primitives = context + .primitiveList()! + .primitive() + .map((entry) => text(entry)); + const invalid = primitives.filter( + (entry) => !["read", "write", "watch-start", "watch-stop"].includes(entry), + ); + if (invalid.length > 0) { + loweringIssue( + state, + context, + "invalid-port-primitive", + `State port cannot request ${invalid.join(", ")}`, + ); + } + return { + id, + displayName: name, + requirement: { + kind: "state", + valueType: lowerValueType(state, context.valueType()), + primitives: primitives.filter((entry) => !invalid.includes(entry)) as StatePrimitive[], + }, + }; + } + if (context.EDGE()) { + const target = lowerConstraint(state, context.targetConstraint()); + if (!target) { + return undefined; + } + const primitives = context + .primitiveList()! + .primitive() + .map((entry) => text(entry)); + const invalid = primitives.filter( + (entry) => + !["resolve", "connect", "disconnect", "watch-start", "watch-stop"].includes( + entry, + ), + ); + if (invalid.length > 0) { + loweringIssue( + state, + context, + "invalid-port-primitive", + `Edge port cannot request ${invalid.join(", ")}`, + ); + } + return { + id, + displayName: name, + requirement: { + kind: "edge", + target, + cardinality: lowerCardinality(context.cardinality()), + primitives: primitives.filter((entry) => !invalid.includes(entry)) as EdgePrimitive[], + }, + }; + } + const targetName = identifier(context.identifier(1)); + if (context.INTERFACE()) { + const target = requireSymbol( + state, + state.interfaces, + targetName, + context, + "interface", + ); + return target + ? { + id, + displayName: name, + requirement: { + kind: "receiver-interface", + interfaceRevisionId: target.revisionId, + }, + } + : undefined; + } + const atomId = requireSymbol(state, state.atoms, targetName, context, "atom"); + return atomId + ? { + id, + displayName: name, + requirement: { kind: "constructor", atomId }, + } + : undefined; +}; + +const lowerDependencyPorts = ( + state: LoweringState, + context: { dependencyBlock(): ReturnType }, +) => { + const block = context.dependencyBlock(); + if (!block) { + return []; + } + return block + .dependencyPort() + .flatMap((entry) => { + const port = lowerDependencyPort(state, entry); + return port ? [port] : []; + }); +}; + +const lowerReceiver = ( + state: LoweringState, + context: PackageOperationExportContext["receiverRequirement"] extends () => infer Result + ? Result + : never, +): PackageReceiverRequirement => { + if (context.ANY()) { + return { kind: "any-object" }; + } + if (context.ATOM()) { + const name = identifier(context.identifier()); + return { + kind: "exact-atom", + atomId: + requireSymbol(state, state.atoms, name, context, "atom") ?? + capabilityId.atom(`unresolved:${name}`), + }; + } + const list = context.identifierList(); + return { + kind: "all-interfaces", + interfaceRevisionIds: (list?.identifier() ?? []).map((entry) => { + const name = identifier(entry); + return ( + requireSymbol(state, state.interfaces, name, entry, "interface")?.revisionId ?? + capabilityId.interfaceRevision(`unresolved:${name}`) + ); + }), + }; +}; + +const registerPackageExport = ( + state: LoweringState, + packageAlias: string, + exportAlias: string, + entry: PackageExport, + context: ParserRuleContext, +) => { + const packageSymbol = state.packages.get(packageAlias)!; + const portSymbols = new Map(); + for (const port of entry.dependencyPorts) { + declareSymbol( + state, + portSymbols, + port.displayName, + port.id, + context, + "dependency port", + ); + } + declareSymbol( + state, + packageSymbol.exports, + exportAlias, + { exportId: entry.id, ports: portSymbols }, + context, + "package export", + ); +}; + +const lowerPackageOperation = ( + state: LoweringState, + packageAlias: string, + context: PackageOperationExportContext, +): PackageExport => { + const alias = identifier(context.identifier()); + const ports = lowerDependencyPorts(state, context); + const event = context.eventClause(); + const entry: PackageExport = { + kind: "operation", + id: capabilityId.packageExport(stringValue(context.stringLiteral())), + displayName: alias, + inputType: lowerValueType(state, context.valueType(0)), + outputType: lowerValueType(state, context.valueType(1)), + mode: text(context.operationMode()) as InterfaceOperationMode, + eventType: event ? lowerValueType(state, event.valueType()) : undefined, + receiverRequirement: lowerReceiver(state, context.receiverRequirement()), + dependencyPorts: ports, + }; + registerPackageExport(state, packageAlias, alias, entry, context); + return entry; +}; + +const lowerPackageFunction = ( + state: LoweringState, + packageAlias: string, + context: PackageFunctionExportContext, +): PackageExport => { + const alias = identifier(context.identifier()); + const entry: PackageExport = { + kind: "function", + id: capabilityId.packageExport(stringValue(context.stringLiteral())), + displayName: alias, + inputType: lowerValueType(state, context.valueType(0)), + outputType: lowerValueType(state, context.valueType(1)), + dependencyPorts: lowerDependencyPorts(state, context), + }; + registerPackageExport(state, packageAlias, alias, entry, context); + return entry; +}; + +const lowerPackageConstructor = ( + state: LoweringState, + packageAlias: string, + context: PackageConstructorExportContext, +): PackageExport => { + const alias = identifier(context.identifier(0)); + const atomName = identifier(context.identifier(1)); + const atomId = + requireSymbol(state, state.atoms, atomName, context, "atom") ?? + capabilityId.atom(`unresolved:${atomName}`); + const entry: PackageExport = { + kind: "constructor", + id: capabilityId.packageExport(stringValue(context.stringLiteral())), + displayName: alias, + inputType: lowerValueType(state, context.valueType()), + outputType: valueType.atomRef(atomId), + constructsAtom: atomId, + dependencyPorts: lowerDependencyPorts(state, context), + }; + registerPackageExport(state, packageAlias, alias, entry, context); + return entry; +}; + +const lowerPackage = ( + state: LoweringState, + context: PackageDeclContext, +): PackageRevision => { + const alias = identifier(context.identifier()); + const exports = context.packageExport().map((exportContext) => { + const operation = exportContext.packageOperationExport(); + if (operation) { + return lowerPackageOperation(state, alias, operation); + } + const fn = exportContext.packageFunctionExport(); + if (fn) { + return lowerPackageFunction(state, alias, fn); + } + return lowerPackageConstructor( + state, + alias, + exportContext.packageConstructorExport()!, + ); + }); + return { + packageId: capabilityId.package(stringValue(context.stringLiteral(0))), + revisionId: state.packages.get(alias)!.revisionId, + displayName: alias, + source: lowerSource(context.sourceBlock()), + exports, + }; +}; + +const lowerState = ( + state: LoweringState, + context: StateDeclContext, +): StateSlotDefinition => { + const atomName = identifier(context.identifier(1)); + const atomId = + requireSymbol(state, state.atoms, atomName, context, "atom") ?? + capabilityId.atom(`unresolved:${atomName}`); + const policy = context.storagePolicy(); + const defaultContext = context.jsonLiteral(); + let defaultValue: unknown; + if (defaultContext) { + defaultValue = JSON.parse(text(defaultContext)) as unknown; + } + return { + kind: "state", + id: capabilityId.slot(stringValue(context.stringLiteral())), + attachedTo: atomId, + displayName: identifier(context.identifier(0)), + valueType: lowerValueType(state, context.valueType()), + storagePolicy: policy.OPTIMISTIC_REGISTER() + ? { kind: "optimistic-register" } + : { + kind: "crdt-document", + updateType: lowerValueType(state, policy.valueType()), + }, + defaultValue, + }; +}; + +const lowerEdgeEndpoint = ( + state: LoweringState, + context: EdgeEndpointContext, +): EdgeEndpoint | undefined => { + const constraint = lowerConstraint(state, context.targetConstraint()); + return constraint + ? { + projectionId: capabilityId.edgeProjection( + stringValue(context.stringLiteral()), + ), + displayName: identifier(context.identifier()), + constraint, + cardinality: lowerCardinality(context.cardinality()), + ordered: Boolean(context.ORDERED()), + } + : undefined; +}; + +const lowerEdge = ( + state: LoweringState, + context: EdgeDeclContext, +): EdgeDefinition | undefined => { + const endpoints = context + .edgeEndpoint() + .flatMap((entry) => { + const endpoint = lowerEdgeEndpoint(state, entry); + return endpoint ? [endpoint] : []; + }); + if (endpoints.length !== 2) { + return undefined; + } + return { + kind: "edge", + id: capabilityId.edgeType(stringValue(context.stringLiteral())), + displayName: identifier(context.identifier()), + endpoints: [endpoints[0]!, endpoints[1]!], + }; +}; + +const lowerAttachment = ( + state: LoweringState, + context: AttachmentDeclContext, +): PersistentAttachment | undefined => { + const stateContext = context.stateDecl(); + return stateContext + ? lowerState(state, stateContext) + : lowerEdge(state, context.edgeDecl()!); +}; + +const registerAttachment = ( + state: LoweringState, + context: AttachmentDeclContext, + attachment: PersistentAttachment, +) => { + const stateContext = context.stateDecl(); + const name = identifier( + stateContext ? stateContext.identifier(0) : context.edgeDecl()!.identifier(), + ); + const projections = new Map(); + if (attachment.kind === "edge") { + for (const endpoint of attachment.endpoints) { + declareSymbol( + state, + projections, + endpoint.displayName, + endpoint.projectionId, + context, + "edge projection", + ); + } + } + declareSymbol( + state, + state.attachments, + name, + { attachment, projections }, + context, + "attachment", + ); +}; + +const findOperationId = ( + state: LoweringState, + interfaceAlias: string, + memberName: string, + operationName: string, + context: ParserRuleContext, +) => { + const interfaceSymbol = requireSymbol( + state, + state.interfaces, + interfaceAlias, + context, + "interface", + ); + const member = interfaceSymbol + ? requireSymbol( + state, + interfaceSymbol.members, + memberName, + context, + `member on ${interfaceAlias}`, + ) + : undefined; + return member + ? requireSymbol( + state, + member.operations, + operationName, + context, + `operation on ${interfaceAlias}.${memberName}`, + ) + : undefined; +}; + +const lowerBoundDependencies = ( + state: LoweringState, + context: DependencyBindingBlockContext | undefined, + exportSymbol: PackageExportSymbol, +): BoundDependency[] => { + if (!context) { + return []; + } + return context.dependencyBinding().flatMap((entry) => { + const portName = identifier(entry.identifier(0)); + const portId = requireSymbol( + state, + exportSymbol.ports, + portName, + entry, + "dependency port", + ); + if (!portId) { + return []; + } + if (entry.STATE()) { + const attachmentName = identifier(entry.identifier(1)); + const attachment = requireSymbol( + state, + state.attachments, + attachmentName, + entry, + "attachment", + ); + if (!attachment || attachment.attachment.kind !== "state") { + if (attachment) { + loweringIssue( + state, + entry, + "wrong-attachment-kind", + `${attachmentName} is an edge, not state`, + ); + } + return []; + } + return [{ portId, binding: { kind: "state", slotId: attachment.attachment.id } }]; + } + if (entry.EDGE()) { + const attachmentName = identifier(entry.identifier(1)); + const projectionName = identifier(entry.identifier(2)); + const attachment = requireSymbol( + state, + state.attachments, + attachmentName, + entry, + "attachment", + ); + if (!attachment || attachment.attachment.kind !== "edge") { + if (attachment) { + loweringIssue( + state, + entry, + "wrong-attachment-kind", + `${attachmentName} is state, not an edge`, + ); + } + return []; + } + const projectionId = requireSymbol( + state, + attachment.projections, + projectionName, + entry, + `projection on ${attachmentName}`, + ); + return projectionId + ? [ + { + portId, + binding: { + kind: "edge", + edgeTypeId: attachment.attachment.id, + projectionId, + }, + }, + ] + : []; + } + if (entry.INTERFACE()) { + const interfaceName = identifier(entry.identifier(1)); + const interfaceSymbol = requireSymbol( + state, + state.interfaces, + interfaceName, + entry, + "interface", + ); + return interfaceSymbol + ? [ + { + portId, + binding: { + kind: "receiver-interface", + interfaceRevisionId: interfaceSymbol.revisionId, + }, + }, + ] + : []; + } + const atomName = identifier(entry.identifier(1)); + const atomId = requireSymbol(state, state.atoms, atomName, entry, "atom"); + return atomId + ? [{ portId, binding: { kind: "constructor", atomId } }] + : []; + }); +}; + +const lowerConformance = ( + state: LoweringState, + context: ConformanceDeclContext, + privateAttachments: PersistentAttachment[], +): WorkspaceRevision["conformances"][number] | undefined => { + const atomName = identifier(context.identifier(0)); + const interfaceName = identifier(context.identifier(1)); + const atomId = requireSymbol(state, state.atoms, atomName, context, "atom"); + const interfaceSymbol = requireSymbol( + state, + state.interfaces, + interfaceName, + context, + "interface", + ); + if (!atomId || !interfaceSymbol) { + return undefined; + } + const operationBindings = context.conformanceItem().flatMap< + WorkspaceRevision["conformances"][number]["operationBindings"][number] + >((item) => { + const bindingContext = item.operationBindingDecl(); + if (!bindingContext) { + return []; + } + const memberName = identifier( + bindingContext.memberOperationRef().identifier(), + ); + const operationName = text( + bindingContext.memberOperationRef()?.operationName() ?? null, + ); + const operationId = findOperationId( + state, + interfaceName, + memberName, + operationName, + bindingContext, + ); + if (!operationId) { + return []; + } + const provider = bindingContext.operationProvider(); + if (provider.STATE()) { + const attachmentName = identifier(provider.identifier(0)); + const attachment = requireSymbol( + state, + state.attachments, + attachmentName, + provider, + "attachment", + ); + if (!attachment || attachment.attachment.kind !== "state") { + if (attachment) { + loweringIssue( + state, + provider, + "wrong-attachment-kind", + `${attachmentName} is not state`, + ); + } + return []; + } + return [ + { + operationId, + binding: { + kind: "state" as const, + slotId: attachment.attachment.id, + primitive: text(provider.statePrimitive()) as StatePrimitive, + }, + }, + ]; + } + if (provider.EDGE()) { + const edgeName = identifier(provider.identifier(0)); + const projectionName = identifier(provider.identifier(1)); + const attachment = requireSymbol( + state, + state.attachments, + edgeName, + provider, + "attachment", + ); + if (!attachment || attachment.attachment.kind !== "edge") { + if (attachment) { + loweringIssue( + state, + provider, + "wrong-attachment-kind", + `${edgeName} is not an edge`, + ); + } + return []; + } + const projectionId = requireSymbol( + state, + attachment.projections, + projectionName, + provider, + `projection on ${edgeName}`, + ); + return projectionId + ? [ + { + operationId, + binding: { + kind: "edge" as const, + edgeTypeId: attachment.attachment.id, + projectionId, + primitive: text(provider.edgePrimitive()) as EdgePrimitive, + }, + }, + ] + : []; + } + const packageName = identifier(provider.identifier(0)); + const exportName = identifier(provider.identifier(1)); + const packageSymbol = requireSymbol( + state, + state.packages, + packageName, + provider, + "package", + ); + const exportSymbol = packageSymbol + ? requireSymbol( + state, + packageSymbol.exports, + exportName, + provider, + `export on ${packageName}`, + ) + : undefined; + return packageSymbol && exportSymbol + ? [ + { + operationId, + binding: { + kind: "package" as const, + packageRevisionId: packageSymbol.revisionId, + exportId: exportSymbol.exportId, + dependencies: lowerBoundDependencies( + state, + provider.dependencyBindingBlock() ?? undefined, + exportSymbol, + ), + }, + }, + ] + : []; + }); + return { + atomId, + interfaceRevisionId: interfaceSymbol.revisionId, + privateAttachments, + operationBindings, + }; +}; + +const lowerWorkspace = ( + state: LoweringState, + context: WorkspaceDeclContext, +): WorkspaceRevision => { + const items = context.workspaceItem(); + + for (const item of items) { + const atom = item.atomDecl(); + if (atom) { + declareSymbol( + state, + state.atoms, + identifier(atom.identifier()), + capabilityId.atom(stringValue(atom.stringLiteral(0))), + atom, + "atom", + ); + continue; + } + const interfaceContext = item.interfaceDecl(); + if (interfaceContext) { + declareSymbol( + state, + state.interfaces, + identifier(interfaceContext.identifier()), + { + revisionId: capabilityId.interfaceRevision( + stringValue(interfaceContext.stringLiteral(1)), + ), + members: new Map(), + }, + interfaceContext, + "interface", + ); + continue; + } + const packageContext = item.packageDecl(); + if (packageContext) { + declareSymbol( + state, + state.packages, + identifier(packageContext.identifier()), + { + revisionId: capabilityId.packageRevision( + stringValue(packageContext.stringLiteral(1)), + ), + exports: new Map(), + }, + packageContext, + "package", + ); + } + } + + const atoms = items.flatMap((item) => { + const atom = item.atomDecl(); + if (!atom) { + return []; + } + const atomId = state.atoms.get(identifier(atom.identifier())); + return atomId + ? [ + { + id: atomId, + displayName: identifier(atom.identifier()), + documentation: atom.DOC() + ? stringValue(atom.stringLiteral(1)) + : undefined, + }, + ] + : []; + }); + + const interfaceImports = items.flatMap((item) => { + const interfaceContext = item.interfaceDecl(); + return interfaceContext ? [lowerInterface(state, interfaceContext)] : []; + }); + + const packageImports = items.flatMap((item) => { + const packageContext = item.packageDecl(); + return packageContext ? [lowerPackage(state, packageContext)] : []; + }); + + const sharedAttachments: PersistentAttachment[] = []; + const privateAttachments = new Map< + ConformanceDeclContext, + PersistentAttachment[] + >(); + for (const item of items) { + const shared = item.sharedAttachmentDecl(); + if (shared) { + const declaration = shared.attachmentDecl(); + const attachment = lowerAttachment(state, declaration); + if (attachment) { + sharedAttachments.push(attachment); + registerAttachment(state, declaration, attachment); + } + } + const conformance = item.conformanceDecl(); + if (conformance) { + const attachments = conformance.conformanceItem().flatMap((entry) => { + const declaration = entry.attachmentDecl(); + if (!declaration) { + return []; + } + const attachment = lowerAttachment(state, declaration); + if (!attachment) { + return []; + } + registerAttachment(state, declaration, attachment); + return [attachment]; + }); + privateAttachments.set(conformance, attachments); + } + } + + const conformances = items.flatMap((item) => { + const context = item.conformanceDecl(); + if (!context) { + return []; + } + const conformance = lowerConformance( + state, + context, + privateAttachments.get(context) ?? [], + ); + return conformance ? [conformance] : []; + }); + + const constructors = items.flatMap((item) => { + const constructor = item.constructorBindingDecl(); + if (!constructor) { + return []; + } + const atomName = identifier(constructor.identifier(0)); + const packageName = identifier(constructor.identifier(1)); + const exportName = identifier(constructor.identifier(2)); + const atomId = requireSymbol(state, state.atoms, atomName, constructor, "atom"); + const packageSymbol = requireSymbol( + state, + state.packages, + packageName, + constructor, + "package", + ); + const exportSymbol = packageSymbol + ? requireSymbol( + state, + packageSymbol.exports, + exportName, + constructor, + `export on ${packageName}`, + ) + : undefined; + return atomId && packageSymbol && exportSymbol + ? [ + { + atomId, + packageRevisionId: packageSymbol.revisionId, + exportId: exportSymbol.exportId, + dependencies: lowerBoundDependencies( + state, + constructor.dependencyBindingBlock() ?? undefined, + exportSymbol, + ), + }, + ] + : []; + }); + + return { + id: capabilityId.workspaceRevision(stringValue(context.stringLiteral(1))), + workspaceId: capabilityId.workspace(stringValue(context.stringLiteral(0))), + parentRevisionIds: [], + sourceRootCommit: stringValue(context.stringLiteral(2)), + atoms, + sharedAttachments, + interfaceImports, + packageImports, + conformances, + constructors, + }; +}; + +export const compileCapabilitySource = ( + source: string, + fileName = "", +): CapabilitySourceCompileResult => { + const diagnostics: CapabilitySourceDiagnostic[] = []; + const listener = new SyntaxErrorListener(fileName, diagnostics); + const lexer = new QuixosCapabilityLexer(CharStream.fromString(source)); + lexer.removeErrorListeners(); + lexer.addErrorListener(listener); + const parser = new QuixosCapabilityParser( + new CommonTokenStream(lexer), + ); + parser.removeErrorListeners(); + parser.addErrorListener(listener); + const tree = parser.document(); + if (diagnostics.length > 0) { + return { ok: false, diagnostics }; + } + + const state: LoweringState = { + fileName, + diagnostics, + atoms: new Map(), + interfaces: new Map(), + packages: new Map(), + attachments: new Map(), + }; + const workspace = lowerWorkspace(state, tree.workspaceDecl()); + if (diagnostics.length > 0) { + return { ok: false, diagnostics }; + } + const compiled = compileWorkspaceRevision(workspace); + if (!compiled.ok) { + return { + ok: false, + diagnostics: compiled.issues.map((entry) => ({ + phase: "validation", + code: entry.code, + message: entry.message, + fileName, + line: 0, + column: 0, + path: entry.path, + })), + }; + } + return { ok: true, workspace, plan: compiled.plan, diagnostics: [] }; +}; diff --git a/src/capability-model/index.ts b/src/capability-model/index.ts new file mode 100644 index 0000000..85fef54 --- /dev/null +++ b/src/capability-model/index.ts @@ -0,0 +1,2 @@ +export * from "./types.js"; +export * from "./validation.js"; diff --git a/src/capability-model/types.ts b/src/capability-model/types.ts new file mode 100644 index 0000000..dd4c920 --- /dev/null +++ b/src/capability-model/types.ts @@ -0,0 +1,373 @@ +declare const opaqueIdBrand: unique symbol; + +type OpaqueId = string & { + readonly [opaqueIdBrand]: Kind; +}; + +export type WorkspaceId = OpaqueId<"WorkspaceId">; +export type WorkspaceRevisionId = OpaqueId<"WorkspaceRevisionId">; +export type AtomId = OpaqueId<"AtomId">; +export type InterfaceId = OpaqueId<"InterfaceId">; +export type InterfaceRevisionId = OpaqueId<"InterfaceRevisionId">; +export type MemberId = OpaqueId<"MemberId">; +export type OperationId = OpaqueId<"OperationId">; +export type SlotId = OpaqueId<"SlotId">; +export type EdgeTypeId = OpaqueId<"EdgeTypeId">; +export type EdgeProjectionId = OpaqueId<"EdgeProjectionId">; +export type PackageId = OpaqueId<"PackageId">; +export type PackageRevisionId = OpaqueId<"PackageRevisionId">; +export type PackageExportId = OpaqueId<"PackageExportId">; +export type DependencyPortId = OpaqueId<"DependencyPortId">; +export type ObjectId = OpaqueId<"ObjectId">; + +const opaque = (value: string) => value as OpaqueId; + +/** + * Textual IDs remain opaque to the semantic model. Authoring tools may mint + * UUID-backed values later without changing the checked IR. + */ +export const capabilityId = { + workspace: (value: string) => opaque<"WorkspaceId">(value), + workspaceRevision: (value: string) => + opaque<"WorkspaceRevisionId">(value), + atom: (value: string) => opaque<"AtomId">(value), + interface: (value: string) => opaque<"InterfaceId">(value), + interfaceRevision: (value: string) => + opaque<"InterfaceRevisionId">(value), + member: (value: string) => opaque<"MemberId">(value), + operation: (value: string) => opaque<"OperationId">(value), + slot: (value: string) => opaque<"SlotId">(value), + edgeType: (value: string) => opaque<"EdgeTypeId">(value), + edgeProjection: (value: string) => opaque<"EdgeProjectionId">(value), + package: (value: string) => opaque<"PackageId">(value), + packageRevision: (value: string) => opaque<"PackageRevisionId">(value), + packageExport: (value: string) => opaque<"PackageExportId">(value), + dependencyPort: (value: string) => opaque<"DependencyPortId">(value), + object: (value: string) => opaque<"ObjectId">(value), +} as const; + +export interface SourceRevision { + repository: string; + commit: string; +} + +export type ScalarValueTypeName = + | "bool" + | "bytes" + | "double" + | "int32" + | "int64" + | "string" + | "uint32" + | "uint64"; + +export type ObjectExpectation = + | { kind: "atom"; atomId: AtomId } + | { + kind: "interface"; + interfaceRevisionId: InterfaceRevisionId; + }; + +export type ValueType = + | { kind: "builtin"; name: "unit" | "watch-handle" } + | { kind: "scalar"; name: ScalarValueTypeName } + | { kind: "message"; descriptorId: string } + | { kind: "object-ref"; expectation: ObjectExpectation } + | { kind: "optional"; value: ValueType } + | { kind: "list"; value: ValueType }; + +export const valueType = { + unit: { kind: "builtin", name: "unit" } as const, + watchHandle: { kind: "builtin", name: "watch-handle" } as const, + bool: { kind: "scalar", name: "bool" } as const, + bytes: { kind: "scalar", name: "bytes" } as const, + double: { kind: "scalar", name: "double" } as const, + int32: { kind: "scalar", name: "int32" } as const, + int64: { kind: "scalar", name: "int64" } as const, + string: { kind: "scalar", name: "string" } as const, + uint32: { kind: "scalar", name: "uint32" } as const, + uint64: { kind: "scalar", name: "uint64" } as const, + message: (descriptorId: string): ValueType => ({ + kind: "message", + descriptorId, + }), + atomRef: (atomId: AtomId): ValueType => ({ + kind: "object-ref", + expectation: { kind: "atom", atomId }, + }), + interfaceRef: (interfaceRevisionId: InterfaceRevisionId): ValueType => ({ + kind: "object-ref", + expectation: { kind: "interface", interfaceRevisionId }, + }), + optional: (value: ValueType): ValueType => ({ kind: "optional", value }), + list: (value: ValueType): ValueType => ({ kind: "list", value }), +} as const; + +export interface AtomDefinition { + id: AtomId; + displayName: string; + documentation?: string; +} + +export type InterfaceOperationMode = + | "call" + | "watch-start" + | "watch-stop" + | "subscribe" + | "unsubscribe"; + +export interface InterfaceOperation { + id: OperationId; + displayName: string; + inputType: ValueType; + outputType: ValueType; + mode: InterfaceOperationMode; + /** Required for watch-start/subscribe and absent for other modes. */ + eventType?: ValueType; +} + +interface InterfaceMemberBase { + id: MemberId; + displayName: string; + operations: InterfaceOperation[]; +} + +export interface ValueInterfaceMember extends InterfaceMemberBase { + kind: "value"; + valueType: ValueType; +} + +export type EdgeCardinality = + | "optional-one" + | "exactly-one" + | "many" + | "many-unique"; + +export type EdgeEndpointConstraint = + | { kind: "atom"; atomId: AtomId } + | { + kind: "interface"; + interfaceRevisionId: InterfaceRevisionId; + }; + +export interface RelationshipInterfaceMember extends InterfaceMemberBase { + kind: "relationship"; + target: EdgeEndpointConstraint; + cardinality: EdgeCardinality; + ordered: boolean; +} + +/** A named callable capability that is not value or relationship sugar. */ +export interface OperationInterfaceMember extends InterfaceMemberBase { + kind: "operation"; + inputType: ValueType; + outputType: ValueType; +} + +export type InterfaceMember = + | ValueInterfaceMember + | RelationshipInterfaceMember + | OperationInterfaceMember; + +export interface InterfaceRevision { + interfaceId: InterfaceId; + revisionId: InterfaceRevisionId; + displayName: string; + source: SourceRevision; + members: InterfaceMember[]; +} + +export type StoragePolicy = + | { kind: "optimistic-register" } + | { kind: "crdt-document"; updateType: ValueType }; + +export interface StateSlotDefinition { + kind: "state"; + id: SlotId; + attachedTo: AtomId; + displayName: string; + valueType: ValueType; + storagePolicy: StoragePolicy; + defaultValue?: unknown; +} + +export interface EdgeEndpoint { + projectionId: EdgeProjectionId; + displayName: string; + constraint: EdgeEndpointConstraint; + cardinality: EdgeCardinality; + ordered: boolean; +} + +export interface EdgeDefinition { + kind: "edge"; + id: EdgeTypeId; + displayName: string; + endpoints: [EdgeEndpoint, EdgeEndpoint]; +} + +export type PersistentAttachment = StateSlotDefinition | EdgeDefinition; + +export type StatePrimitive = + | "read" + | "write" + | "watch-start" + | "watch-stop"; + +export type EdgePrimitive = + | "resolve" + | "connect" + | "disconnect" + | "watch-start" + | "watch-stop"; + +export type PackageReceiverRequirement = + | { kind: "any-object" } + | { kind: "exact-atom"; atomId: AtomId } + | { + kind: "all-interfaces"; + interfaceRevisionIds: InterfaceRevisionId[]; + }; + +export type DependencyPortRequirement = + | { + kind: "state"; + valueType: ValueType; + primitives: StatePrimitive[]; + } + | { + kind: "edge"; + target: EdgeEndpointConstraint; + cardinality: EdgeCardinality; + primitives: EdgePrimitive[]; + } + | { + kind: "receiver-interface"; + interfaceRevisionId: InterfaceRevisionId; + } + | { kind: "constructor"; atomId: AtomId }; + +export interface DependencyPort { + id: DependencyPortId; + displayName: string; + requirement: DependencyPortRequirement; +} + +interface PackageExportBase { + id: PackageExportId; + displayName: string; + inputType: ValueType; + outputType: ValueType; + dependencyPorts: DependencyPort[]; +} + +export interface PackageOperationExport extends PackageExportBase { + kind: "operation"; + mode: InterfaceOperationMode; + eventType?: ValueType; + receiverRequirement: PackageReceiverRequirement; +} + +export interface PackageFunctionExport extends PackageExportBase { + kind: "function"; +} + +export interface PackageConstructorExport extends PackageExportBase { + kind: "constructor"; + constructsAtom: AtomId; +} + +export type PackageExport = + | PackageOperationExport + | PackageFunctionExport + | PackageConstructorExport; + +export interface PackageRevision { + packageId: PackageId; + revisionId: PackageRevisionId; + displayName: string; + source: SourceRevision; + exports: PackageExport[]; +} + +export type DependencyBinding = + | { kind: "state"; slotId: SlotId } + | { + kind: "edge"; + edgeTypeId: EdgeTypeId; + projectionId: EdgeProjectionId; + } + | { + kind: "receiver-interface"; + interfaceRevisionId: InterfaceRevisionId; + } + | { kind: "constructor"; atomId: AtomId }; + +export interface BoundDependency { + portId: DependencyPortId; + binding: DependencyBinding; +} + +export type Binding = + | { + kind: "state"; + slotId: SlotId; + primitive: StatePrimitive; + } + | { + kind: "edge"; + edgeTypeId: EdgeTypeId; + projectionId: EdgeProjectionId; + primitive: EdgePrimitive; + } + | { + kind: "package"; + packageRevisionId: PackageRevisionId; + exportId: PackageExportId; + dependencies: BoundDependency[]; + }; + +export interface OperationBinding { + operationId: OperationId; + binding: Binding; +} + +export interface Conformance { + atomId: AtomId; + interfaceRevisionId: InterfaceRevisionId; + privateAttachments: PersistentAttachment[]; + operationBindings: OperationBinding[]; +} + +export interface AtomConstructorBinding { + atomId: AtomId; + packageRevisionId: PackageRevisionId; + exportId: PackageExportId; + dependencies: BoundDependency[]; +} + +export interface WorkspaceRevision { + id: WorkspaceRevisionId; + workspaceId: WorkspaceId; + parentRevisionIds: WorkspaceRevisionId[]; + sourceRootCommit: string; + atoms: AtomDefinition[]; + sharedAttachments: PersistentAttachment[]; + interfaceImports: InterfaceRevision[]; + packageImports: PackageRevision[]; + conformances: Conformance[]; + constructors: AtomConstructorBinding[]; +} + +export type AttachmentOwner = + | { kind: "workspace" } + | { + kind: "conformance"; + atomId: AtomId; + interfaceRevisionId: InterfaceRevisionId; + }; + +export interface OwnedAttachment { + attachment: PersistentAttachment; + owner: AttachmentOwner; +} diff --git a/src/capability-model/validation.ts b/src/capability-model/validation.ts new file mode 100644 index 0000000..dac1d42 --- /dev/null +++ b/src/capability-model/validation.ts @@ -0,0 +1,1785 @@ +import type { + AtomConstructorBinding, + AtomId, + AttachmentOwner, + Binding, + BoundDependency, + Conformance, + DependencyBinding, + DependencyPort, + EdgeCardinality, + EdgeDefinition, + EdgeEndpoint, + EdgeEndpointConstraint, + EdgePrimitive, + EdgeProjectionId, + EdgeTypeId, + InterfaceMember, + InterfaceOperation, + InterfaceOperationMode, + InterfaceRevision, + InterfaceRevisionId, + OperationId, + OwnedAttachment, + PackageExport, + PackageOperationExport, + PackageRevision, + PackageRevisionId, + PersistentAttachment, + SlotId, + SourceRevision, + StatePrimitive, + StateSlotDefinition, + ValueType, + WorkspaceRevision, +} from "./types.js"; +import { valueType } from "./types.js"; + +export type CapabilityValidationIssueCode = + | "required-value" + | "invalid-source" + | "invalid-value-type" + | "invalid-operation" + | "duplicate-atom" + | "duplicate-attachment" + | "duplicate-projection" + | "duplicate-interface-revision" + | "duplicate-interface-member" + | "duplicate-interface-operation" + | "duplicate-package-revision" + | "duplicate-package-export" + | "duplicate-dependency-port" + | "duplicate-conformance" + | "duplicate-operation-binding" + | "duplicate-constructor" + | "unresolved-reference" + | "invalid-attachment" + | "invalid-state-binding" + | "invalid-edge-binding" + | "invalid-package-binding" + | "invalid-dependency-binding" + | "private-attachment-access" + | "incompatible-package-receiver" + | "unsatisfied-receiver-interface" + | "cyclic-conformance-requirement" + | "missing-operation-binding" + | "unknown-operation-binding" + | "invalid-constructor"; + +export interface CapabilityValidationIssue { + code: CapabilityValidationIssueCode; + path: string; + message: string; +} + +interface InterfaceOperationEntry { + operation: InterfaceOperation; + member: InterfaceMember; +} + +interface InterfaceIndexEntry { + revision: InterfaceRevision; + operations: Map; +} + +interface PackageIndexEntry { + revision: PackageRevision; + exports: Map; +} + +interface AttachmentIndexEntry extends OwnedAttachment { + path: string; +} + +interface ValidationIndexes { + atoms: Map; + interfaces: Map; + packages: Map; + conformances: Map; + conformancePaths: Map; + attachments: Map; + projections: Map< + string, + { edge: EdgeDefinition; endpoint: EdgeEndpoint; endpointIndex: 0 | 1 } + >; + constructors: Map; +} + +const hasText = (value: string) => value.trim().length > 0; + +const conformanceKey = ( + atomId: AtomId, + interfaceRevisionId: InterfaceRevisionId, +): string => `${atomId}\u0000${interfaceRevisionId}`; + +const attachmentKey = (attachment: PersistentAttachment): string => + `${attachment.kind}\u0000${attachment.id}`; + +const issue = ( + issues: CapabilityValidationIssue[], + code: CapabilityValidationIssueCode, + path: string, + message: string, +) => issues.push({ code, path, message }); + +const requireText = ( + issues: CapabilityValidationIssue[], + value: string, + path: string, + label: string, +) => { + if (!hasText(value)) { + issue(issues, "required-value", path, `${label} is required`); + } +}; + +const typeLabel = (type: ValueType): string => { + switch (type.kind) { + case "builtin": + case "scalar": + return type.name; + case "message": + return `message:${type.descriptorId}`; + case "object-ref": + return type.expectation.kind === "atom" + ? `object:atom:${type.expectation.atomId}` + : `object:interface:${type.expectation.interfaceRevisionId}`; + case "optional": + return `optional<${typeLabel(type.value)}>`; + case "list": + return `list<${typeLabel(type.value)}>`; + } +}; + +export const valueTypesEqual = (left: ValueType, right: ValueType): boolean => { + if (left.kind !== right.kind) { + return false; + } + switch (left.kind) { + case "builtin": + case "scalar": + return left.name === (right as typeof left).name; + case "message": + return left.descriptorId === (right as typeof left).descriptorId; + case "object-ref": { + const other = (right as typeof left).expectation; + if (left.expectation.kind !== other.kind) { + return false; + } + return left.expectation.kind === "atom" + ? left.expectation.atomId === + (other as typeof left.expectation).atomId + : left.expectation.interfaceRevisionId === + (other as typeof left.expectation).interfaceRevisionId; + } + case "optional": + case "list": + return valueTypesEqual(left.value, (right as typeof left).value); + } +}; + +const constraintsEqual = ( + left: EdgeEndpointConstraint, + right: EdgeEndpointConstraint, +) => + left.kind === right.kind && + (left.kind === "atom" + ? left.atomId === (right as typeof left).atomId + : left.interfaceRevisionId === (right as typeof left).interfaceRevisionId); + +const sourceRequiredFields: Array<[keyof SourceRevision, string]> = [ + ["repository", "repository"], + ["commit", "commit"], +]; + +const validateSource = ( + issues: CapabilityValidationIssue[], + source: SourceRevision, + path: string, +) => { + for (const [key, label] of sourceRequiredFields) { + if (!hasText(source[key])) { + issue( + issues, + "invalid-source", + `${path}.${key}`, + `Source ${label} is required`, + ); + } + } +}; + +const validateValueType = ( + issues: CapabilityValidationIssue[], + type: ValueType, + path: string, + indexes: Pick, +) => { + switch (type.kind) { + case "builtin": + case "scalar": + return; + case "message": + requireText( + issues, + type.descriptorId, + `${path}.descriptorId`, + "Message descriptor identity", + ); + return; + case "optional": + case "list": + validateValueType(issues, type.value, `${path}.value`, indexes); + return; + case "object-ref": + if (type.expectation.kind === "atom") { + if (!indexes.atoms.has(type.expectation.atomId)) { + issue( + issues, + "unresolved-reference", + `${path}.expectation.atomId`, + `Unknown atom ${type.expectation.atomId}`, + ); + } + } else if ( + !indexes.interfaces.has(type.expectation.interfaceRevisionId) + ) { + issue( + issues, + "unresolved-reference", + `${path}.expectation.interfaceRevisionId`, + `Unknown interface revision ${type.expectation.interfaceRevisionId}`, + ); + } + } +}; + +const validateConstraint = ( + issues: CapabilityValidationIssue[], + constraint: EdgeEndpointConstraint, + path: string, + indexes: Pick, +) => { + if (constraint.kind === "atom") { + if (!indexes.atoms.has(constraint.atomId)) { + issue( + issues, + "unresolved-reference", + `${path}.atomId`, + `Unknown atom ${constraint.atomId}`, + ); + } + } else if (!indexes.interfaces.has(constraint.interfaceRevisionId)) { + issue( + issues, + "unresolved-reference", + `${path}.interfaceRevisionId`, + `Unknown interface revision ${constraint.interfaceRevisionId}`, + ); + } +}; + +const emitsEvents = (mode: InterfaceOperationMode) => + mode === "watch-start" || mode === "subscribe"; + +const validateOperationEventShape = ( + issues: CapabilityValidationIssue[], + operation: Pick, + path: string, +) => { + if (emitsEvents(operation.mode) && operation.eventType === undefined) { + issue( + issues, + "invalid-operation", + `${path}.eventType`, + `${operation.mode} operations require an event type`, + ); + } + if (!emitsEvents(operation.mode) && operation.eventType !== undefined) { + issue( + issues, + "invalid-operation", + `${path}.eventType`, + `${operation.mode} operations must not declare an event type`, + ); + } +}; + +interface OperationSignature { + mode: InterfaceOperationMode; + inputType: ValueType; + outputType: ValueType; + eventType?: ValueType; +} + +const signaturesMatch = ( + operation: OperationSignature, + implementation: OperationSignature, +) => + operation.mode === implementation.mode && + valueTypesEqual(operation.inputType, implementation.inputType) && + valueTypesEqual(operation.outputType, implementation.outputType) && + (operation.eventType === undefined + ? implementation.eventType === undefined + : implementation.eventType !== undefined && + valueTypesEqual(operation.eventType, implementation.eventType)); + +const describeSignature = (signature: OperationSignature) => { + const event = signature.eventType + ? ` emits ${typeLabel(signature.eventType)}` + : ""; + return `${signature.mode} ${typeLabel(signature.inputType)} -> ${typeLabel(signature.outputType)}${event}`; +}; + +export const statePrimitiveSignature = ( + slot: StateSlotDefinition, + primitive: StatePrimitive, +): OperationSignature => { + const writeType = + slot.storagePolicy.kind === "crdt-document" + ? slot.storagePolicy.updateType + : slot.valueType; + switch (primitive) { + case "read": + return { + mode: "call", + inputType: valueType.unit, + outputType: slot.valueType, + }; + case "write": + return { + mode: "call", + inputType: writeType, + outputType: valueType.unit, + }; + case "watch-start": + return { + mode: "watch-start", + inputType: valueType.unit, + outputType: valueType.watchHandle, + eventType: slot.valueType, + }; + case "watch-stop": + return { + mode: "watch-stop", + inputType: valueType.watchHandle, + outputType: valueType.unit, + }; + } +}; + +const constraintValueType = (constraint: EdgeEndpointConstraint): ValueType => + constraint.kind === "atom" + ? valueType.atomRef(constraint.atomId) + : valueType.interfaceRef(constraint.interfaceRevisionId); + +export const cardinalityValueType = ( + constraint: EdgeEndpointConstraint, + cardinality: EdgeCardinality, +): ValueType => { + const target = constraintValueType(constraint); + switch (cardinality) { + case "exactly-one": + return target; + case "optional-one": + return valueType.optional(target); + case "many": + case "many-unique": + return valueType.list(target); + } +}; + +const edgeProjection = ( + edge: EdgeDefinition, + projectionId: EdgeProjectionId, +) => { + const index = edge.endpoints.findIndex( + (endpoint) => endpoint.projectionId === projectionId, + ); + if (index !== 0 && index !== 1) { + return undefined; + } + const endpointIndex = index as 0 | 1; + return { + endpoint: edge.endpoints[endpointIndex], + target: edge.endpoints[endpointIndex === 0 ? 1 : 0], + endpointIndex, + }; +}; + +export const edgePrimitiveSignature = ( + edge: EdgeDefinition, + projectionId: EdgeProjectionId, + primitive: EdgePrimitive, +): OperationSignature | undefined => { + const projection = edgeProjection(edge, projectionId); + if (!projection) { + return undefined; + } + const targetType = constraintValueType(projection.target.constraint); + const resolvedType = cardinalityValueType( + projection.target.constraint, + projection.endpoint.cardinality, + ); + switch (primitive) { + case "resolve": + return { + mode: "call", + inputType: valueType.unit, + outputType: resolvedType, + }; + case "connect": + case "disconnect": + return { + mode: "call", + inputType: targetType, + outputType: valueType.unit, + }; + case "watch-start": + return { + mode: "watch-start", + inputType: valueType.unit, + outputType: valueType.watchHandle, + eventType: resolvedType, + }; + case "watch-stop": + return { + mode: "watch-stop", + inputType: valueType.watchHandle, + outputType: valueType.unit, + }; + } +}; + +const atomSatisfiesConstraint = ( + atomId: AtomId, + constraint: EdgeEndpointConstraint, + conformances: ReadonlyMap, +) => + constraint.kind === "atom" + ? constraint.atomId === atomId + : conformances.has(conformanceKey(atomId, constraint.interfaceRevisionId)); + +const canAccessAttachment = ( + owner: AttachmentOwner, + conformance: Pick | undefined, +) => + owner.kind === "workspace" || ( + conformance !== undefined && + owner.atomId === conformance.atomId && + owner.interfaceRevisionId === conformance.interfaceRevisionId + ); + +const collectIdentityIndexes = ( + workspace: WorkspaceRevision, + issues: CapabilityValidationIssue[], +): ValidationIndexes => { + const atoms = new Map(); + for (const [index, atom] of workspace.atoms.entries()) { + const path = `atoms[${index}]`; + requireText(issues, atom.id, `${path}.id`, "Atom ID"); + requireText(issues, atom.displayName, `${path}.displayName`, "Atom name"); + if (atoms.has(atom.id)) { + issue(issues, "duplicate-atom", `${path}.id`, `Duplicate atom ${atom.id}`); + } else { + atoms.set(atom.id, atom); + } + } + + const interfaces = new Map(); + for (const [interfaceIndex, revision] of workspace.interfaceImports.entries()) { + const path = `interfaceImports[${interfaceIndex}]`; + requireText(issues, revision.interfaceId, `${path}.interfaceId`, "Interface ID"); + requireText( + issues, + revision.revisionId, + `${path}.revisionId`, + "Interface revision ID", + ); + requireText(issues, revision.displayName, `${path}.displayName`, "Interface name"); + validateSource(issues, revision.source, `${path}.source`); + const memberIds = new Set(); + const operations = new Map(); + for (const [memberIndex, member] of revision.members.entries()) { + const memberPath = `${path}.members[${memberIndex}]`; + requireText(issues, member.id, `${memberPath}.id`, "Member ID"); + requireText(issues, member.displayName, `${memberPath}.displayName`, "Member name"); + if (memberIds.has(member.id)) { + issue( + issues, + "duplicate-interface-member", + `${memberPath}.id`, + `Duplicate member ${member.id}`, + ); + } + memberIds.add(member.id); + for (const [operationIndex, operation] of member.operations.entries()) { + const operationPath = `${memberPath}.operations[${operationIndex}]`; + requireText(issues, operation.id, `${operationPath}.id`, "Operation ID"); + requireText( + issues, + operation.displayName, + `${operationPath}.displayName`, + "Operation name", + ); + validateOperationEventShape(issues, operation, operationPath); + if (operations.has(operation.id)) { + issue( + issues, + "duplicate-interface-operation", + `${operationPath}.id`, + `Duplicate operation ${operation.id}`, + ); + } else { + operations.set(operation.id, { operation, member }); + } + } + } + if (interfaces.has(revision.revisionId)) { + issue( + issues, + "duplicate-interface-revision", + `${path}.revisionId`, + `Duplicate interface revision ${revision.revisionId}`, + ); + } else { + interfaces.set(revision.revisionId, { revision, operations }); + } + } + + const packages = new Map(); + for (const [packageIndex, revision] of workspace.packageImports.entries()) { + const path = `packageImports[${packageIndex}]`; + requireText(issues, revision.packageId, `${path}.packageId`, "Package ID"); + requireText( + issues, + revision.revisionId, + `${path}.revisionId`, + "Package revision ID", + ); + requireText(issues, revision.displayName, `${path}.displayName`, "Package name"); + validateSource(issues, revision.source, `${path}.source`); + const exports = new Map(); + for (const [exportIndex, entry] of revision.exports.entries()) { + const exportPath = `${path}.exports[${exportIndex}]`; + requireText(issues, entry.id, `${exportPath}.id`, "Package export ID"); + requireText(issues, entry.displayName, `${exportPath}.displayName`, "Package export name"); + if (exports.has(entry.id)) { + issue( + issues, + "duplicate-package-export", + `${exportPath}.id`, + `Duplicate package export ${entry.id}`, + ); + } else { + exports.set(entry.id, entry); + } + const portIds = new Set(); + for (const [portIndex, port] of entry.dependencyPorts.entries()) { + const portPath = `${exportPath}.dependencyPorts[${portIndex}]`; + requireText(issues, port.id, `${portPath}.id`, "Dependency port ID"); + requireText(issues, port.displayName, `${portPath}.displayName`, "Dependency port name"); + if (portIds.has(port.id)) { + issue( + issues, + "duplicate-dependency-port", + `${portPath}.id`, + `Duplicate dependency port ${port.id}`, + ); + } + portIds.add(port.id); + } + } + if (packages.has(revision.revisionId)) { + issue( + issues, + "duplicate-package-revision", + `${path}.revisionId`, + `Duplicate package revision ${revision.revisionId}`, + ); + } else { + packages.set(revision.revisionId, { revision, exports }); + } + } + + const conformances = new Map(); + const conformancePaths = new Map(); + for (const [index, conformance] of workspace.conformances.entries()) { + const path = `conformances[${index}]`; + const key = conformanceKey(conformance.atomId, conformance.interfaceRevisionId); + if (conformances.has(key)) { + issue( + issues, + "duplicate-conformance", + path, + `Duplicate conformance for ${conformance.atomId} as ${conformance.interfaceRevisionId}`, + ); + } else { + conformances.set(key, conformance); + conformancePaths.set(key, path); + } + } + + const constructors = new Map(); + for (const [index, constructor] of workspace.constructors.entries()) { + const path = `constructors[${index}]`; + if (constructors.has(constructor.atomId)) { + issue( + issues, + "duplicate-constructor", + path, + `Atom ${constructor.atomId} has more than one constructor`, + ); + } else { + constructors.set(constructor.atomId, constructor); + } + } + + const attachments = new Map(); + const projections = new Map< + string, + { edge: EdgeDefinition; endpoint: EdgeEndpoint; endpointIndex: 0 | 1 } + >(); + const addAttachment = ( + attachment: PersistentAttachment, + owner: AttachmentOwner, + path: string, + ) => { + const key = attachmentKey(attachment); + if (attachments.has(key)) { + issue( + issues, + "duplicate-attachment", + `${path}.id`, + `Duplicate ${attachment.kind} attachment ${attachment.id}`, + ); + } else { + attachments.set(key, { attachment, owner, path }); + } + if (attachment.kind === "edge") { + for (const [endpointIndex, endpoint] of attachment.endpoints.entries()) { + const endpointPath = `${path}.endpoints[${endpointIndex}]`; + if (projections.has(endpoint.projectionId)) { + issue( + issues, + "duplicate-projection", + `${endpointPath}.projectionId`, + `Duplicate edge projection ${endpoint.projectionId}`, + ); + } else { + projections.set(endpoint.projectionId, { + edge: attachment, + endpoint, + endpointIndex: endpointIndex as 0 | 1, + }); + } + } + } + }; + for (const [index, attachment] of workspace.sharedAttachments.entries()) { + addAttachment(attachment, { kind: "workspace" }, `sharedAttachments[${index}]`); + } + for (const [conformanceIndex, conformance] of workspace.conformances.entries()) { + for (const [attachmentIndex, attachment] of conformance.privateAttachments.entries()) { + addAttachment( + attachment, + { + kind: "conformance", + atomId: conformance.atomId, + interfaceRevisionId: conformance.interfaceRevisionId, + }, + `conformances[${conformanceIndex}].privateAttachments[${attachmentIndex}]`, + ); + } + } + + return { + atoms, + interfaces, + packages, + conformances, + conformancePaths, + attachments, + projections, + constructors, + }; +}; + +const validateInterfaces = ( + workspace: WorkspaceRevision, + issues: CapabilityValidationIssue[], + indexes: ValidationIndexes, +) => { + for (const [interfaceIndex, revision] of workspace.interfaceImports.entries()) { + const path = `interfaceImports[${interfaceIndex}]`; + for (const [memberIndex, member] of revision.members.entries()) { + const memberPath = `${path}.members[${memberIndex}]`; + if (member.kind === "value") { + validateValueType(issues, member.valueType, `${memberPath}.valueType`, indexes); + } else if (member.kind === "relationship") { + validateConstraint(issues, member.target, `${memberPath}.target`, indexes); + } else { + validateValueType(issues, member.inputType, `${memberPath}.inputType`, indexes); + validateValueType(issues, member.outputType, `${memberPath}.outputType`, indexes); + } + for (const [operationIndex, operation] of member.operations.entries()) { + const operationPath = `${memberPath}.operations[${operationIndex}]`; + validateValueType(issues, operation.inputType, `${operationPath}.inputType`, indexes); + validateValueType(issues, operation.outputType, `${operationPath}.outputType`, indexes); + if (operation.eventType) { + validateValueType(issues, operation.eventType, `${operationPath}.eventType`, indexes); + } + } + } + } +}; + +const validateAttachments = ( + issues: CapabilityValidationIssue[], + indexes: ValidationIndexes, +) => { + for (const { attachment, owner, path } of indexes.attachments.values()) { + requireText(issues, attachment.id, `${path}.id`, `${attachment.kind} attachment ID`); + requireText(issues, attachment.displayName, `${path}.displayName`, `${attachment.kind} name`); + if (attachment.kind === "state") { + if (!indexes.atoms.has(attachment.attachedTo)) { + issue( + issues, + "unresolved-reference", + `${path}.attachedTo`, + `Unknown atom ${attachment.attachedTo}`, + ); + } + validateValueType(issues, attachment.valueType, `${path}.valueType`, indexes); + if (attachment.storagePolicy.kind === "crdt-document") { + validateValueType( + issues, + attachment.storagePolicy.updateType, + `${path}.storagePolicy.updateType`, + indexes, + ); + } + if (owner.kind === "conformance") { + if (attachment.attachedTo !== owner.atomId) { + issue( + issues, + "invalid-attachment", + `${path}.attachedTo`, + `Private state must attach to its conformance atom ${owner.atomId}`, + ); + } + } + continue; + } + + if (attachment.endpoints.length !== 2) { + issue( + issues, + "invalid-attachment", + `${path}.endpoints`, + `Edge ${attachment.id} must have exactly two endpoints`, + ); + } + for (const [endpointIndex, endpoint] of attachment.endpoints.entries()) { + const endpointPath = `${path}.endpoints[${endpointIndex}]`; + requireText(issues, endpoint.projectionId, `${endpointPath}.projectionId`, "Projection ID"); + requireText(issues, endpoint.displayName, `${endpointPath}.displayName`, "Projection name"); + validateConstraint(issues, endpoint.constraint, `${endpointPath}.constraint`, indexes); + } + if (owner.kind === "conformance") { + if ( + !attachment.endpoints.some((endpoint) => + atomSatisfiesConstraint(owner.atomId, endpoint.constraint, indexes.conformances), + ) + ) { + issue( + issues, + "invalid-attachment", + `${path}.endpoints`, + `Private edge has no endpoint compatible with conformance atom ${owner.atomId}`, + ); + } + } + } +}; + +const uniquePrimitiveList = ( + issues: CapabilityValidationIssue[], + primitives: readonly string[], + path: string, +) => { + if (primitives.length === 0) { + issue(issues, "invalid-dependency-binding", path, "Dependency port requires at least one primitive"); + } + const seen = new Set(); + for (const primitive of primitives) { + if (seen.has(primitive)) { + issue( + issues, + "invalid-dependency-binding", + path, + `Dependency primitive ${primitive} is listed more than once`, + ); + } + seen.add(primitive); + } +}; + +const validatePackages = ( + workspace: WorkspaceRevision, + issues: CapabilityValidationIssue[], + indexes: ValidationIndexes, +) => { + for (const [packageIndex, revision] of workspace.packageImports.entries()) { + const path = `packageImports[${packageIndex}]`; + for (const [exportIndex, entry] of revision.exports.entries()) { + const exportPath = `${path}.exports[${exportIndex}]`; + validateValueType(issues, entry.inputType, `${exportPath}.inputType`, indexes); + validateValueType(issues, entry.outputType, `${exportPath}.outputType`, indexes); + if (entry.kind === "operation") { + validateOperationEventShape(issues, entry, exportPath); + if (entry.eventType) { + validateValueType(issues, entry.eventType, `${exportPath}.eventType`, indexes); + } + if (entry.receiverRequirement.kind === "exact-atom") { + if (!indexes.atoms.has(entry.receiverRequirement.atomId)) { + issue( + issues, + "unresolved-reference", + `${exportPath}.receiverRequirement.atomId`, + `Unknown atom ${entry.receiverRequirement.atomId}`, + ); + } + } else if (entry.receiverRequirement.kind === "all-interfaces") { + const seen = new Set(); + for (const [requirementIndex, interfaceRevisionId] of + entry.receiverRequirement.interfaceRevisionIds.entries()) { + const requirementPath = `${exportPath}.receiverRequirement.interfaceRevisionIds[${requirementIndex}]`; + if (!indexes.interfaces.has(interfaceRevisionId)) { + issue( + issues, + "unresolved-reference", + requirementPath, + `Unknown interface revision ${interfaceRevisionId}`, + ); + } + if (seen.has(interfaceRevisionId)) { + issue( + issues, + "invalid-operation", + requirementPath, + `Receiver interface ${interfaceRevisionId} is duplicated`, + ); + } + seen.add(interfaceRevisionId); + } + } + } else if (entry.kind === "constructor") { + if (!indexes.atoms.has(entry.constructsAtom)) { + issue( + issues, + "unresolved-reference", + `${exportPath}.constructsAtom`, + `Unknown atom ${entry.constructsAtom}`, + ); + } + const expected = valueType.atomRef(entry.constructsAtom); + if (!valueTypesEqual(entry.outputType, expected)) { + issue( + issues, + "invalid-constructor", + `${exportPath}.outputType`, + `Constructor must return ${typeLabel(expected)}, not ${typeLabel(entry.outputType)}`, + ); + } + } + + for (const [portIndex, port] of entry.dependencyPorts.entries()) { + const portPath = `${exportPath}.dependencyPorts[${portIndex}]`; + switch (port.requirement.kind) { + case "state": + validateValueType(issues, port.requirement.valueType, `${portPath}.requirement.valueType`, indexes); + uniquePrimitiveList(issues, port.requirement.primitives, `${portPath}.requirement.primitives`); + break; + case "edge": + validateConstraint(issues, port.requirement.target, `${portPath}.requirement.target`, indexes); + uniquePrimitiveList(issues, port.requirement.primitives, `${portPath}.requirement.primitives`); + break; + case "receiver-interface": + if (!indexes.interfaces.has(port.requirement.interfaceRevisionId)) { + issue( + issues, + "unresolved-reference", + `${portPath}.requirement.interfaceRevisionId`, + `Unknown interface revision ${port.requirement.interfaceRevisionId}`, + ); + } + break; + case "constructor": + if (!indexes.atoms.has(port.requirement.atomId)) { + issue( + issues, + "unresolved-reference", + `${portPath}.requirement.atomId`, + `Unknown atom ${port.requirement.atomId}`, + ); + } + } + } + } + } +}; + +const findAttachment = ( + indexes: ValidationIndexes, + kind: Kind, + id: Kind extends "state" ? SlotId : EdgeTypeId, +): AttachmentIndexEntry | undefined => indexes.attachments.get(`${kind}\u0000${id}`); + +const validateAttachmentAccess = ( + issues: CapabilityValidationIssue[], + entry: AttachmentIndexEntry, + conformance: Pick | undefined, + path: string, +) => { + if (!canAccessAttachment(entry.owner, conformance)) { + issue( + issues, + "private-attachment-access", + path, + `Attachment ${entry.attachment.id} is private to conformance ${ + entry.owner.kind === "conformance" + ? `${entry.owner.atomId} as ${entry.owner.interfaceRevisionId}` + : "" + }`, + ); + return false; + } + return true; +}; + +const validateBoundDependencies = ( + issues: CapabilityValidationIssue[], + params: { + dependencies: BoundDependency[]; + dependencyPorts: DependencyPort[]; + atomId: AtomId; + conformance?: Pick; + path: string; + indexes: ValidationIndexes; + requirementGraph: Map>; + graphSourceKey?: string; + }, +) => { + const ports = new Map(params.dependencyPorts.map((port) => [port.id, port])); + const bindings = new Map(); + for (const [index, dependency] of params.dependencies.entries()) { + const path = `${params.path}.dependencies[${index}]`; + if (bindings.has(dependency.portId)) { + issue( + issues, + "invalid-dependency-binding", + `${path}.portId`, + `Dependency port ${dependency.portId} is bound more than once`, + ); + continue; + } + bindings.set(dependency.portId, dependency); + const port = ports.get(dependency.portId); + if (!port) { + issue( + issues, + "invalid-dependency-binding", + `${path}.portId`, + `Unknown dependency port ${dependency.portId}`, + ); + continue; + } + const requirement = port.requirement; + const binding = dependency.binding; + if (requirement.kind !== binding.kind) { + issue( + issues, + "invalid-dependency-binding", + `${path}.binding`, + `Port ${port.id} requires ${requirement.kind}, not ${binding.kind}`, + ); + continue; + } + switch (requirement.kind) { + case "state": { + const stateBinding = binding as Extract; + const attachment = findAttachment(params.indexes, "state", stateBinding.slotId); + if (!attachment || attachment.attachment.kind !== "state") { + issue( + issues, + "invalid-dependency-binding", + `${path}.binding.slotId`, + `Unknown state attachment ${stateBinding.slotId}`, + ); + break; + } + validateAttachmentAccess(issues, attachment, params.conformance, `${path}.binding.slotId`); + if (attachment.attachment.attachedTo !== params.atomId) { + issue( + issues, + "invalid-dependency-binding", + `${path}.binding.slotId`, + `State ${stateBinding.slotId} is not attached to receiver atom ${params.atomId}`, + ); + } + if (!valueTypesEqual(requirement.valueType, attachment.attachment.valueType)) { + issue( + issues, + "invalid-dependency-binding", + `${path}.binding.slotId`, + `State port expects ${typeLabel(requirement.valueType)}, not ${typeLabel(attachment.attachment.valueType)}`, + ); + } + break; + } + case "edge": { + const edgeBinding = binding as Extract; + const attachment = findAttachment(params.indexes, "edge", edgeBinding.edgeTypeId); + if (!attachment || attachment.attachment.kind !== "edge") { + issue( + issues, + "invalid-dependency-binding", + `${path}.binding.edgeTypeId`, + `Unknown edge attachment ${edgeBinding.edgeTypeId}`, + ); + break; + } + validateAttachmentAccess(issues, attachment, params.conformance, `${path}.binding.edgeTypeId`); + const projection = edgeProjection(attachment.attachment, edgeBinding.projectionId); + if (!projection) { + issue( + issues, + "invalid-dependency-binding", + `${path}.binding.projectionId`, + `Projection ${edgeBinding.projectionId} is not on edge ${edgeBinding.edgeTypeId}`, + ); + break; + } + if (!atomSatisfiesConstraint(params.atomId, projection.endpoint.constraint, params.indexes.conformances)) { + issue( + issues, + "invalid-dependency-binding", + `${path}.binding.projectionId`, + `Projection ${edgeBinding.projectionId} cannot originate at receiver atom ${params.atomId}`, + ); + } + if ( + !constraintsEqual(requirement.target, projection.target.constraint) || + requirement.cardinality !== projection.endpoint.cardinality + ) { + issue( + issues, + "invalid-dependency-binding", + `${path}.binding`, + `Edge port target or cardinality does not match projection ${edgeBinding.projectionId}`, + ); + } + break; + } + case "receiver-interface": { + const interfaceBinding = binding as Extract< + DependencyBinding, + { kind: "receiver-interface" } + >; + if (interfaceBinding.interfaceRevisionId !== requirement.interfaceRevisionId) { + issue( + issues, + "invalid-dependency-binding", + `${path}.binding.interfaceRevisionId`, + `Interface port requires ${requirement.interfaceRevisionId}`, + ); + break; + } + const targetKey = conformanceKey(params.atomId, requirement.interfaceRevisionId); + if (!params.indexes.conformances.has(targetKey)) { + issue( + issues, + "unsatisfied-receiver-interface", + `${path}.binding.interfaceRevisionId`, + `Receiver atom ${params.atomId} does not conform to ${requirement.interfaceRevisionId}`, + ); + } else if (params.graphSourceKey) { + params.requirementGraph.get(params.graphSourceKey)?.add(targetKey); + } + break; + } + case "constructor": { + const constructorBinding = binding as Extract; + if (constructorBinding.atomId !== requirement.atomId) { + issue( + issues, + "invalid-dependency-binding", + `${path}.binding.atomId`, + `Constructor port requires atom ${requirement.atomId}`, + ); + } + if (!params.indexes.constructors.has(requirement.atomId)) { + issue( + issues, + "invalid-dependency-binding", + `${path}.binding.atomId`, + `Atom ${requirement.atomId} has no constructor binding`, + ); + } + break; + } + } + } + for (const port of params.dependencyPorts) { + if (!bindings.has(port.id)) { + issue( + issues, + "invalid-dependency-binding", + `${params.path}.dependencies`, + `Missing binding for dependency port ${port.id}`, + ); + } + } +}; + +const validatePackageReceiver = ( + issues: CapabilityValidationIssue[], + params: { + entry: PackageOperationExport; + atomId: AtomId; + path: string; + indexes: ValidationIndexes; + requirementGraph: Map>; + graphSourceKey: string; + }, +) => { + const receiver = params.entry.receiverRequirement; + if (receiver.kind === "exact-atom" && receiver.atomId !== params.atomId) { + issue( + issues, + "incompatible-package-receiver", + params.path, + `Package export requires atom ${receiver.atomId}, not ${params.atomId}`, + ); + } + if (receiver.kind === "all-interfaces") { + for (const requiredInterface of receiver.interfaceRevisionIds) { + const targetKey = conformanceKey(params.atomId, requiredInterface); + if (!params.indexes.conformances.has(targetKey)) { + issue( + issues, + "unsatisfied-receiver-interface", + params.path, + `Atom ${params.atomId} does not conform to ${requiredInterface}`, + ); + } else { + params.requirementGraph.get(params.graphSourceKey)?.add(targetKey); + } + } + } +}; + +const validateConformances = ( + workspace: WorkspaceRevision, + issues: CapabilityValidationIssue[], + indexes: ValidationIndexes, +) => { + const requirementGraph = new Map>(); + for (const key of indexes.conformances.keys()) { + requirementGraph.set(key, new Set()); + } + + for (const [index, conformance] of workspace.conformances.entries()) { + const path = `conformances[${index}]`; + const key = conformanceKey(conformance.atomId, conformance.interfaceRevisionId); + if (!indexes.atoms.has(conformance.atomId)) { + issue( + issues, + "unresolved-reference", + `${path}.atomId`, + `Unknown atom ${conformance.atomId}`, + ); + } + const interfaceEntry = indexes.interfaces.get(conformance.interfaceRevisionId); + if (!interfaceEntry) { + issue( + issues, + "unresolved-reference", + `${path}.interfaceRevisionId`, + `Unknown interface revision ${conformance.interfaceRevisionId}`, + ); + continue; + } + + const bindings = new Map(); + for (const [bindingIndex, entry] of conformance.operationBindings.entries()) { + const bindingPath = `${path}.operationBindings[${bindingIndex}]`; + if (bindings.has(entry.operationId)) { + issue( + issues, + "duplicate-operation-binding", + `${bindingPath}.operationId`, + `Operation ${entry.operationId} is bound more than once`, + ); + continue; + } + bindings.set(entry.operationId, entry.binding); + const operationEntry = interfaceEntry.operations.get(entry.operationId); + if (!operationEntry) { + issue( + issues, + "unknown-operation-binding", + `${bindingPath}.operationId`, + `Operation ${entry.operationId} does not belong to interface ${conformance.interfaceRevisionId}`, + ); + continue; + } + const operation = operationEntry.operation; + const binding = entry.binding; + if (binding.kind === "state") { + const attachment = findAttachment(indexes, "state", binding.slotId); + if (!attachment || attachment.attachment.kind !== "state") { + issue( + issues, + "invalid-state-binding", + `${bindingPath}.binding.slotId`, + `Unknown state attachment ${binding.slotId}`, + ); + continue; + } + validateAttachmentAccess(issues, attachment, conformance, `${bindingPath}.binding.slotId`); + if (attachment.attachment.attachedTo !== conformance.atomId) { + issue( + issues, + "invalid-state-binding", + `${bindingPath}.binding.slotId`, + `State ${binding.slotId} is not attached to atom ${conformance.atomId}`, + ); + } + if (operationEntry.member.kind !== "value") { + issue( + issues, + "invalid-state-binding", + `${bindingPath}.binding`, + "State primitives may only implement value members", + ); + } + const expected = statePrimitiveSignature(attachment.attachment, binding.primitive); + if (!signaturesMatch(operation, expected)) { + issue( + issues, + "invalid-state-binding", + `${bindingPath}.binding`, + `State primitive provides ${describeSignature(expected)}, but operation requires ${describeSignature(operation)}`, + ); + } + continue; + } + + if (binding.kind === "edge") { + const attachment = findAttachment(indexes, "edge", binding.edgeTypeId); + if (!attachment || attachment.attachment.kind !== "edge") { + issue( + issues, + "invalid-edge-binding", + `${bindingPath}.binding.edgeTypeId`, + `Unknown edge attachment ${binding.edgeTypeId}`, + ); + continue; + } + validateAttachmentAccess(issues, attachment, conformance, `${bindingPath}.binding.edgeTypeId`); + const projection = edgeProjection(attachment.attachment, binding.projectionId); + const expected = edgePrimitiveSignature( + attachment.attachment, + binding.projectionId, + binding.primitive, + ); + if (!projection || !expected) { + issue( + issues, + "invalid-edge-binding", + `${bindingPath}.binding.projectionId`, + `Projection ${binding.projectionId} is not on edge ${binding.edgeTypeId}`, + ); + continue; + } + if (!atomSatisfiesConstraint(conformance.atomId, projection.endpoint.constraint, indexes.conformances)) { + issue( + issues, + "invalid-edge-binding", + `${bindingPath}.binding.projectionId`, + `Projection ${binding.projectionId} cannot originate at atom ${conformance.atomId}`, + ); + } + if (operationEntry.member.kind !== "relationship") { + issue( + issues, + "invalid-edge-binding", + `${bindingPath}.binding`, + "Edge primitives may only implement relationship members", + ); + } else if ( + !constraintsEqual(operationEntry.member.target, projection.target.constraint) || + operationEntry.member.cardinality !== projection.endpoint.cardinality + ) { + issue( + issues, + "invalid-edge-binding", + `${bindingPath}.binding`, + "Edge projection target or cardinality does not match relationship member", + ); + } + if (!signaturesMatch(operation, expected)) { + issue( + issues, + "invalid-edge-binding", + `${bindingPath}.binding`, + `Edge primitive provides ${describeSignature(expected)}, but operation requires ${describeSignature(operation)}`, + ); + } + continue; + } + + const packageEntry = indexes.packages.get(binding.packageRevisionId); + const packageExport = packageEntry?.exports.get(binding.exportId); + if (!packageEntry) { + issue( + issues, + "invalid-package-binding", + `${bindingPath}.binding.packageRevisionId`, + `Unknown package revision ${binding.packageRevisionId}`, + ); + continue; + } + if (!packageExport) { + issue( + issues, + "invalid-package-binding", + `${bindingPath}.binding.exportId`, + `Unknown export ${binding.exportId} in package ${binding.packageRevisionId}`, + ); + continue; + } + if (packageExport.kind !== "operation") { + issue( + issues, + "invalid-package-binding", + `${bindingPath}.binding.exportId`, + `Package export ${binding.exportId} is ${packageExport.kind}, not an operation`, + ); + continue; + } + if (!signaturesMatch(operation, packageExport)) { + issue( + issues, + "invalid-package-binding", + `${bindingPath}.binding.exportId`, + `Package export provides ${describeSignature(packageExport)}, but operation requires ${describeSignature(operation)}`, + ); + } + validatePackageReceiver(issues, { + entry: packageExport, + atomId: conformance.atomId, + path: `${bindingPath}.binding.exportId`, + indexes, + requirementGraph, + graphSourceKey: key, + }); + validateBoundDependencies(issues, { + dependencies: binding.dependencies, + dependencyPorts: packageExport.dependencyPorts, + atomId: conformance.atomId, + conformance, + path: `${bindingPath}.binding`, + indexes, + requirementGraph, + graphSourceKey: key, + }); + } + + for (const operation of interfaceEntry.operations.values()) { + if (!bindings.has(operation.operation.id)) { + issue( + issues, + "missing-operation-binding", + `${path}.operationBindings`, + `Missing binding for operation ${operation.operation.id}`, + ); + } + } + } + + const visitState = new Map(); + const visit = (key: string, stack: string[]) => { + const state = visitState.get(key); + if (state === "visited") { + return; + } + if (state === "visiting") { + const cycleStart = stack.indexOf(key); + const cycle = [...stack.slice(Math.max(0, cycleStart)), key]; + issue( + issues, + "cyclic-conformance-requirement", + indexes.conformancePaths.get(key) ?? "conformances", + `Cyclic conformance requirement: ${cycle.join(" -> ")}`, + ); + return; + } + visitState.set(key, "visiting"); + for (const dependency of requirementGraph.get(key) ?? []) { + visit(dependency, [...stack, key]); + } + visitState.set(key, "visited"); + }; + for (const key of requirementGraph.keys()) { + visit(key, []); + } +}; + +const validateConstructors = ( + workspace: WorkspaceRevision, + issues: CapabilityValidationIssue[], + indexes: ValidationIndexes, +) => { + const noGraph = new Map>(); + for (const [index, constructor] of workspace.constructors.entries()) { + const path = `constructors[${index}]`; + if (!indexes.atoms.has(constructor.atomId)) { + issue(issues, "invalid-constructor", `${path}.atomId`, `Unknown atom ${constructor.atomId}`); + } + const packageEntry = indexes.packages.get(constructor.packageRevisionId); + const packageExport = packageEntry?.exports.get(constructor.exportId); + if (!packageEntry) { + issue( + issues, + "invalid-constructor", + `${path}.packageRevisionId`, + `Unknown package revision ${constructor.packageRevisionId}`, + ); + continue; + } + if (!packageExport) { + issue( + issues, + "invalid-constructor", + `${path}.exportId`, + `Unknown export ${constructor.exportId}`, + ); + continue; + } + if (packageExport.kind !== "constructor") { + issue( + issues, + "invalid-constructor", + `${path}.exportId`, + `Export ${constructor.exportId} is ${packageExport.kind}, not a constructor`, + ); + continue; + } + if (packageExport.constructsAtom !== constructor.atomId) { + issue( + issues, + "invalid-constructor", + `${path}.exportId`, + `Export constructs ${packageExport.constructsAtom}, not ${constructor.atomId}`, + ); + } + validateBoundDependencies(issues, { + dependencies: constructor.dependencies, + dependencyPorts: packageExport.dependencyPorts, + atomId: constructor.atomId, + path, + indexes, + requirementGraph: noGraph, + }); + } +}; + +export const validateWorkspaceRevision = ( + workspace: WorkspaceRevision, +): CapabilityValidationIssue[] => { + const issues: CapabilityValidationIssue[] = []; + requireText(issues, workspace.id, "id", "Workspace revision ID"); + requireText(issues, workspace.workspaceId, "workspaceId", "Workspace ID"); + requireText(issues, workspace.sourceRootCommit, "sourceRootCommit", "Source root commit"); + const indexes = collectIdentityIndexes(workspace, issues); + validateInterfaces(workspace, issues, indexes); + validateAttachments(issues, indexes); + validatePackages(workspace, issues, indexes); + validateConformances(workspace, issues, indexes); + validateConstructors(workspace, issues, indexes); + return issues; +}; + +export interface CompiledConformance { + source: Conformance; + operationBindings: ReadonlyMap; +} + +export interface CompiledWorkspaceRevision { + source: WorkspaceRevision; + atoms: ReadonlyMap; + interfaces: ReadonlyMap; + packages: ReadonlyMap; + attachments: ReadonlyMap; + conformances: ReadonlyMap; + constructors: ReadonlyMap; +} + +export type CompileWorkspaceRevisionResult = + | { ok: true; plan: CompiledWorkspaceRevision } + | { ok: false; issues: CapabilityValidationIssue[] }; + +export const compileWorkspaceRevision = ( + workspace: WorkspaceRevision, +): CompileWorkspaceRevisionResult => { + const snapshot = structuredClone(workspace) as WorkspaceRevision; + const issues = validateWorkspaceRevision(snapshot); + if (issues.length > 0) { + return { ok: false, issues }; + } + + const attachments = new Map(); + for (const attachment of snapshot.sharedAttachments) { + attachments.set(attachmentKey(attachment), { + attachment, + owner: { kind: "workspace" }, + }); + } + const conformances = new Map(); + for (const conformance of snapshot.conformances) { + for (const attachment of conformance.privateAttachments) { + attachments.set(attachmentKey(attachment), { + attachment, + owner: { + kind: "conformance", + atomId: conformance.atomId, + interfaceRevisionId: conformance.interfaceRevisionId, + }, + }); + } + conformances.set( + conformanceKey(conformance.atomId, conformance.interfaceRevisionId), + { + source: conformance, + operationBindings: new Map( + conformance.operationBindings.map((entry) => [entry.operationId, entry.binding]), + ), + }, + ); + } + return { + ok: true, + plan: { + source: snapshot, + atoms: new Map(snapshot.atoms.map((atom) => [atom.id, atom])), + interfaces: new Map( + snapshot.interfaceImports.map((revision) => [revision.revisionId, revision]), + ), + packages: new Map( + snapshot.packageImports.map((revision) => [revision.revisionId, revision]), + ), + attachments, + conformances, + constructors: new Map(snapshot.constructors.map((entry) => [entry.atomId, entry])), + }, + }; +}; + +export const resolveConformance = ( + plan: CompiledWorkspaceRevision, + atomId: AtomId, + interfaceRevisionId: InterfaceRevisionId, +): CompiledConformance | undefined => + plan.conformances.get(conformanceKey(atomId, interfaceRevisionId)); + +export const resolveOperationBinding = ( + plan: CompiledWorkspaceRevision, + atomId: AtomId, + interfaceRevisionId: InterfaceRevisionId, + operationId: OperationId, +): Binding | undefined => + resolveConformance(plan, atomId, interfaceRevisionId)?.operationBindings.get( + operationId, + ); + +export type ResolvedOperationPlan = + | { + kind: "state"; + binding: Extract; + attachment: OwnedAttachment & { attachment: StateSlotDefinition }; + } + | { + kind: "edge"; + binding: Extract; + attachment: OwnedAttachment & { attachment: EdgeDefinition }; + } + | { + kind: "package"; + binding: Extract; + packageRevision: PackageRevision; + packageExport: PackageOperationExport; + dependencies: Array<{ + port: DependencyPort; + binding: DependencyBinding; + }>; + }; + +export const resolveOperationPlan = ( + plan: CompiledWorkspaceRevision, + atomId: AtomId, + interfaceRevisionId: InterfaceRevisionId, + operationId: OperationId, +): ResolvedOperationPlan | undefined => { + const binding = resolveOperationBinding(plan, atomId, interfaceRevisionId, operationId); + if (!binding) { + return undefined; + } + if (binding.kind === "state") { + const owned = plan.attachments.get(`state\u0000${binding.slotId}`); + if (!owned || owned.attachment.kind !== "state") { + return undefined; + } + return { + kind: "state", + binding, + attachment: owned as OwnedAttachment & { + attachment: StateSlotDefinition; + }, + }; + } + if (binding.kind === "edge") { + const owned = plan.attachments.get(`edge\u0000${binding.edgeTypeId}`); + if (!owned || owned.attachment.kind !== "edge") { + return undefined; + } + return { + kind: "edge", + binding, + attachment: owned as OwnedAttachment & { attachment: EdgeDefinition }, + }; + } + const packageRevision = plan.packages.get(binding.packageRevisionId); + const packageExport = packageRevision?.exports.find( + (entry): entry is PackageOperationExport => + entry.id === binding.exportId && entry.kind === "operation", + ); + if (!packageRevision || !packageExport) { + return undefined; + } + const bound = new Map(binding.dependencies.map((entry) => [entry.portId, entry.binding])); + return { + kind: "package", + binding, + packageRevision, + packageExport, + dependencies: packageExport.dependencyPorts.map((port) => ({ + port, + binding: bound.get(port.id)!, + })), + }; +}; + +export interface CapabilityClosure { + conformances: Array<{ + atomId: AtomId; + interfaceRevisionId: InterfaceRevisionId; + }>; + packageRevisionIds: PackageRevisionId[]; + attachmentIds: Array; + constructorAtomIds: AtomId[]; +} + +export const computeCapabilityClosure = ( + plan: CompiledWorkspaceRevision, + roots: Array<{ atomId: AtomId; interfaceRevisionId: InterfaceRevisionId }>, +): CapabilityClosure => { + const conformances = new Map(); + const packages = new Set(); + const attachments = new Set(); + const constructors = new Set(); + const queued = [...roots]; + const visited = new Set(); + + const includeDependencies = ( + atomId: AtomId, + dependencies: readonly BoundDependency[], + ) => { + for (const dependency of dependencies) { + switch (dependency.binding.kind) { + case "state": + attachments.add(dependency.binding.slotId); + break; + case "edge": + attachments.add(dependency.binding.edgeTypeId); + break; + case "receiver-interface": + queued.push({ + atomId, + interfaceRevisionId: dependency.binding.interfaceRevisionId, + }); + break; + case "constructor": { + constructors.add(dependency.binding.atomId); + const constructor = plan.constructors.get(dependency.binding.atomId); + if (constructor) { + packages.add(constructor.packageRevisionId); + includeDependencies(dependency.binding.atomId, constructor.dependencies); + } + } + } + } + }; + + while (queued.length > 0) { + const root = queued.shift()!; + const key = conformanceKey(root.atomId, root.interfaceRevisionId); + if (visited.has(key)) { + continue; + } + visited.add(key); + const conformance = plan.conformances.get(key); + if (!conformance) { + continue; + } + conformances.set(key, { + atomId: conformance.source.atomId, + interfaceRevisionId: conformance.source.interfaceRevisionId, + }); + for (const binding of conformance.operationBindings.values()) { + if (binding.kind === "state") { + attachments.add(binding.slotId); + } else if (binding.kind === "edge") { + attachments.add(binding.edgeTypeId); + } else { + packages.add(binding.packageRevisionId); + includeDependencies(root.atomId, binding.dependencies); + const packageRevision = plan.packages.get(binding.packageRevisionId); + const operation = packageRevision?.exports.find( + (entry): entry is PackageOperationExport => + entry.id === binding.exportId && entry.kind === "operation", + ); + if (operation?.receiverRequirement.kind === "all-interfaces") { + for (const interfaceRevisionId of operation.receiverRequirement + .interfaceRevisionIds) { + queued.push({ atomId: root.atomId, interfaceRevisionId }); + } + } + } + } + } + + return { + conformances: [...conformances.entries()] + .sort(([left], [right]) => left.localeCompare(right)) + .map(([, conformance]) => conformance), + packageRevisionIds: [...packages].sort(), + attachmentIds: [...attachments].sort(), + constructorAtomIds: [...constructors].sort(), + }; +}; diff --git a/src/descriptor.ts b/src/descriptor.ts index 43e092c..f4709fd 100644 --- a/src/descriptor.ts +++ b/src/descriptor.ts @@ -3,23 +3,7 @@ import fs from "node:fs"; import path from "node:path"; import { fromBinary, toJsonString } from "@bufbuild/protobuf"; import type { PackageDescriptor } from "./gen/quixos/package_pb.js"; -import { - FunctionCapabilityKind, - PackageDescriptorSchema, -} from "./gen/quixos/package_pb.js"; - -const functionKey = (value: { - packageNamespace: string; - packageName: string; - symbol: string; - versionRef: string; -}) => - [ - value.packageNamespace, - value.packageName, - value.symbol, - value.versionRef, - ].join(":"); +import { PackageDescriptorSchema } from "./gen/quixos/package_pb.js"; const protoPaths = () => { const candidates = [ @@ -76,87 +60,25 @@ export const validatePackageDescriptor = ( descriptor: PackageDescriptor, ): string[] => { const errors: string[] = []; - if (!descriptor.packageNamespace) { - errors.push("packageNamespace is required"); + if (!descriptor.packageId) { + errors.push("packageId is required"); } - if (!descriptor.packageName) { - errors.push("packageName is required"); + if (!descriptor.packageRevisionId) { + errors.push("packageRevisionId is required"); } - if (descriptor.descriptorVersion === 0) { - errors.push("descriptorVersion must be greater than zero"); + if (!descriptor.runtimeProtocolVersion) { + errors.push("runtimeProtocolVersion is required"); } - if ( - descriptor.interfaceCompatibleBackTo !== 0 && - descriptor.interfaceCompatibleBackTo > descriptor.descriptorVersion - ) { - errors.push("interfaceCompatibleBackTo must not exceed descriptorVersion"); - } - if ( - descriptor.runnerCompatibleBackTo !== 0 && - descriptor.runnerCompatibleBackTo > descriptor.descriptorVersion - ) { - errors.push("runnerCompatibleBackTo must not exceed descriptorVersion"); - } - - const seenFunctions = new Set(); - for (const [index, entry] of descriptor.functionExports.entries()) { - const fn = entry.function; - if (!fn) { - errors.push(`functionExports[${index}].function is required`); - continue; + const seenExports = new Set(); + for (const [index, entry] of descriptor.exports.entries()) { + if (!entry.exportId) errors.push(`exports[${index}].exportId is required`); + if (!entry.runtimeSymbol) { + errors.push(`exports[${index}].runtimeSymbol is required`); } - if (!fn.packageNamespace) { - fn.packageNamespace = descriptor.packageNamespace; - } - if (!fn.packageName) { - fn.packageName = descriptor.packageName; - } - if ( - fn.packageNamespace !== descriptor.packageNamespace || - fn.packageName !== descriptor.packageName - ) { - errors.push( - `functionExports[${index}] must export from this package (${descriptor.packageNamespace}/${descriptor.packageName})`, - ); - } - if (!fn.symbol) { - errors.push(`functionExports[${index}].function.symbol is required`); - } - if (entry.interfaceVersion === 0) { - errors.push(`functionExports[${index}].interfaceVersion is required`); - } - if (entry.capabilityKind === FunctionCapabilityKind.FUNCTION_CAPABILITY_KIND_UNSPECIFIED) { - errors.push(`functionExports[${index}].capabilityKind is required`); - } - if ( - entry.interfaceCompatibleBackTo !== 0 && - entry.interfaceCompatibleBackTo > entry.interfaceVersion - ) { - errors.push( - `functionExports[${index}].interfaceCompatibleBackTo must not exceed interfaceVersion`, - ); - } - const key = functionKey(fn); - if (seenFunctions.has(key)) { - errors.push(`duplicate function export: ${key}`); - } - seenFunctions.add(key); - } - - for (const [index, entry] of descriptor.dependencies.entries()) { - if (!entry.package) { - errors.push(`dependencies[${index}].package is required`); - continue; - } - if (!entry.package.packageNamespace) { - errors.push(`dependencies[${index}].package.packageNamespace is required`); - } - if (!entry.package.packageName) { - errors.push(`dependencies[${index}].package.packageName is required`); - } - if (entry.package.descriptorVersion === 0) { - errors.push(`dependencies[${index}].package.descriptorVersion is required`); + if (seenExports.has(entry.exportId)) { + errors.push(`duplicate export: ${entry.exportId}`); } + seenExports.add(entry.exportId); } return errors; diff --git a/src/gen/camino/api_pb.ts b/src/gen/camino/api_pb.ts index b578aa6..e54baa7 100644 --- a/src/gen/camino/api_pb.ts +++ b/src/gen/camino/api_pb.ts @@ -1,111 +1,18 @@ -// @generated by protoc-gen-es v2.12.1 with parameter "target=ts,import_extension=js" +// @generated by protoc-gen-es v2.14.1 with parameter "target=ts,import_extension=js" // @generated from file camino/api.proto (package camino, syntax proto3) /* eslint-disable */ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import type { ClassSchema } from "./schema_pb.js"; +import type { PersistencePlan } from "./schema_pb.js"; import { file_camino_schema } from "./schema_pb.js"; -import type { FunctionRef } from "../quixos/refs_pb.js"; -import { file_quixos_refs } from "../quixos/refs_pb.js"; import type { Message } from "@bufbuild/protobuf"; /** * Describes the file camino/api.proto. */ export const file_camino_api: GenFile = /*@__PURE__*/ - fileDesc("ChBjYW1pbm8vYXBpLnByb3RvEgZjYW1pbm8iLAoVUmVnaXN0ZXJTY2hlbWFSZXF1ZXN0EhMKC3NvdXJjZV9maWxlGAEgASgJIlEKFlJlZ2lzdGVyU2NoZW1hUmVzcG9uc2USEQoJY2xhc3NfaWRzGAEgAygJEiQKB2NsYXNzZXMYAiADKAsyEy5jYW1pbm8uQ2xhc3NTY2hlbWEiFAoSTGlzdENsYXNzZXNSZXF1ZXN0IkIKD1JlZ2lzdGVyZWRDbGFzcxIKCgJpZBgBIAEoCRIjCgZzY2hlbWEYAiABKAsyEy5jYW1pbm8uQ2xhc3NTY2hlbWEiPwoTTGlzdENsYXNzZXNSZXNwb25zZRIoCgdjbGFzc2VzGAEgAygLMhcuY2FtaW5vLlJlZ2lzdGVyZWRDbGFzcyILCglOdWxsVmFsdWUifAoLT2JqZWN0VmFsdWUSLwoGZmllbGRzGAEgAygLMh8uY2FtaW5vLk9iamVjdFZhbHVlLkZpZWxkc0VudHJ5GjwKC0ZpZWxkc0VudHJ5EgsKA2tleRgBIAEoCRIcCgV2YWx1ZRgCIAEoCzINLmNhbWluby5WYWx1ZToCOAEiKgoJTGlzdFZhbHVlEh0KBnZhbH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nZXNSZXNwb25zZRJGCgtSZXNvbHZlRWRnZRIaLmNhbWluby5SZXNvbHZlRWRnZVJlcXVlc3QaGy5jYW1pbm8uUmVzb2x2ZUVkZ2VSZXNwb25zZRJDCgpSZW1vdmVFZGdlEhkuY2FtaW5vLlJlbW92ZUVkZ2VSZXF1ZXN0GhouY2FtaW5vLlJlbW92ZUVkZ2VSZXNwb25zZRI6CgdMaXN0T3BzEhYuY2FtaW5vLkxpc3RPcHNSZXF1ZXN0GhcuY2FtaW5vLkxpc3RPcHNSZXNwb25zZRJFCgtXYXRjaE9iamVjdBIaLmNhbWluby5XYXRjaE9iamVjdFJlcXVlc3QaGC5jYW1pbm8uV2F0Y2hPYmplY3RFdmVudDABYgZwcm90bzM", [file_camino_schema, file_quixos_refs]); - -/** - * @generated from message camino.RegisterSchemaRequest - */ -export type RegisterSchemaRequest = Message<"camino.RegisterSchemaRequest"> & { - /** - * @generated from field: string source_file = 1; - */ - sourceFile: string; -}; - -/** - * Describes the message camino.RegisterSchemaRequest. - * Use `create(RegisterSchemaRequestSchema)` to create a new message. - */ -export const RegisterSchemaRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 0); - -/** - * @generated from message camino.RegisterSchemaResponse - */ -export type RegisterSchemaResponse = Message<"camino.RegisterSchemaResponse"> & { - /** - * @generated from field: repeated string class_ids = 1; - */ - classIds: string[]; - - /** - * @generated from field: repeated camino.ClassSchema classes = 2; - */ - classes: ClassSchema[]; -}; - -/** - * Describes the message camino.RegisterSchemaResponse. - * Use `create(RegisterSchemaResponseSchema)` to create a new message. - */ -export const RegisterSchemaResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 1); - -/** - * @generated from message camino.ListClassesRequest - */ -export type ListClassesRequest = Message<"camino.ListClassesRequest"> & { -}; - -/** - * Describes the message camino.ListClassesRequest. - * Use `create(ListClassesRequestSchema)` to create a new message. - */ -export const ListClassesRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 2); - -/** - * @generated from message camino.RegisteredClass - */ -export type RegisteredClass = Message<"camino.RegisteredClass"> & { - /** - * @generated from field: string id = 1; - */ - id: string; - - /** - * @generated from field: camino.ClassSchema schema = 2; - */ - schema?: ClassSchema | undefined; -}; - -/** - * Describes the message camino.RegisteredClass. - * Use `create(RegisteredClassSchema)` to create a new message. - */ -export const RegisteredClassSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 3); - -/** - * @generated from message camino.ListClassesResponse - */ -export type ListClassesResponse = Message<"camino.ListClassesResponse"> & { - /** - * @generated from field: repeated camino.RegisteredClass classes = 1; - */ - classes: RegisteredClass[]; -}; - -/** - * Describes the message camino.ListClassesResponse. - * Use `create(ListClassesResponseSchema)` to create a new message. - */ -export const ListClassesResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 4); + fileDesc("ChBjYW1pbm8vYXBpLnByb3RvEgZjYW1pbm8iCwoJTnVsbFZhbHVlInwKC09iamVjdFZhbHVlEi8KBmZpZWxkcxgBIAMoCzIfLmNhbWluby5PYmplY3RWYWx1ZS5GaWVsZHNFbnRyeRo8CgtGaWVsZHNFbnRyeRILCgNrZXkYASABKAkSHAoFdmFsdWUYAiABKAsyDS5jYW1pbm8uVmFsdWU6AjgBIioKCUxpc3RWYWx1ZRIdCgZ2YWx1ZXMYASADKAsyDS5jYW1pbm8uVmFsdWUiHQoIUmVmVmFsdWUSEQoJb2JqZWN0X2lkGAEgASgJIjwKCUNyZHRWYWx1ZRIMCgR0eXBlGAEgASgJEhAKCGVuY29kaW5nGAIgASgJEg8KB3BheWxvYWQYAyABKAwifgoQU3RhdGVWYWx1ZVNvdXJjZRIRCglvYmplY3RfaWQYASABKAkSDwoHc2xvdF9pZBgCIAEoCRIXCg92YWx1ZV90eXBlX2pzb24YAyABKAkSGwoTc3RvcmFnZV9wb2xpY3lfanNvbhgEIAEoCRIQCghyZXZpc2lvbhgFIAEoBCI2CgtWYWx1ZVNvdXJjZRInCgVzdGF0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2JqZWN0UmVxdWVzdBocLmNhbWluby5DcmVhdGVPYmplY3RSZXNwb25zZRJACglHZXRPYmplY3QSGC5jYW1pbm8uR2V0T2JqZWN0UmVxdWVzdBoZLmNhbWluby5HZXRPYmplY3RSZXNwb25zZRJGCgtMaXN0T2JqZWN0cxIaLmNhbWluby5MaXN0T2JqZWN0c1JlcXVlc3QaGy5jYW1pbm8uTGlzdE9iamVjdHNSZXNwb25zZRJACglSZWFkU3RhdGUSGC5jYW1pbm8uUmVhZFN0YXRlUmVxdWVzdBoZLmNhbWluby5SZWFkU3RhdGVSZXNwb25zZRJDCgpXcml0ZVN0YXRlEhkuY2FtaW5vLldyaXRlU3RhdGVSZXF1ZXN0GhouY2FtaW5vLldyaXRlU3RhdGVSZXNwb25zZRJGCgtDb25uZWN0RWRnZRIaLmNhbWluby5Db25uZWN0RWRnZVJlcXVlc3QaGy5jYW1pbm8uQ29ubmVjdEVkZ2VSZXNwb25zZRJGCgtSZXNvbHZlRWRnZRIaLmNhbWluby5SZXNvbHZlRWRnZVJlcXVlc3QaGy5jYW1pbm8uUmVzb2x2ZUVkZ2VSZXNwb25zZRJPCg5EaXNjb25uZWN0RWRnZRIdLmNhbWluby5EaXNjb25uZWN0RWRnZVJlcXVlc3QaHi5jYW1pbm8uRGlzY29ubmVjdEVkZ2VSZXNwb25zZRI6CgdMaXN0T3BzEhYuY2FtaW5vLkxpc3RPcHNSZXF1ZXN0GhcuY2FtaW5vLkxpc3RPcHNSZXNwb25zZRJFCgtXYXRjaE9iamVjdBIaLmNhbWluby5XYXRjaE9iamVjdFJlcXVlc3QaGC5jYW1pbm8uV2F0Y2hPYmplY3RFdmVudDABYgZwcm90bzM", [file_camino_schema]); /** * @generated from message camino.NullValue @@ -118,7 +25,7 @@ export type NullValue = Message<"camino.NullValue"> & { * Use `create(NullValueSchema)` to create a new message. */ export const NullValueSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 5); + messageDesc(file_camino_api, 0); /** * @generated from message camino.ObjectValue @@ -135,7 +42,7 @@ export type ObjectValue = Message<"camino.ObjectValue"> & { * Use `create(ObjectValueSchema)` to create a new message. */ export const ObjectValueSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 6); + messageDesc(file_camino_api, 1); /** * @generated from message camino.ListValue @@ -152,7 +59,7 @@ export type ListValue = Message<"camino.ListValue"> & { * Use `create(ListValueSchema)` to create a new message. */ export const ListValueSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 7); + messageDesc(file_camino_api, 2); /** * @generated from message camino.RefValue @@ -169,7 +76,7 @@ export type RefValue = Message<"camino.RefValue"> & { * Use `create(RefValueSchema)` to create a new message. */ export const RefValueSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 8); + messageDesc(file_camino_api, 3); /** * @generated from message camino.CrdtValue @@ -196,58 +103,53 @@ export type CrdtValue = Message<"camino.CrdtValue"> & { * Use `create(CrdtValueSchema)` to create a new message. */ export const CrdtValueSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 9); + messageDesc(file_camino_api, 4); /** - * @generated from message camino.FieldValueSource + * @generated from message camino.StateValueSource */ -export type FieldValueSource = Message<"camino.FieldValueSource"> & { +export type StateValueSource = Message<"camino.StateValueSource"> & { /** * @generated from field: string object_id = 1; */ objectId: string; /** - * @generated from field: string field_name = 2; + * @generated from field: string slot_id = 2; */ - fieldName: string; + slotId: string; /** - * @generated from field: string field_type = 3; + * @generated from field: string value_type_json = 3; */ - fieldType: string; + valueTypeJson: string; /** - * @generated from field: string field_storage = 4; + * @generated from field: string storage_policy_json = 4; */ - fieldStorage: string; + storagePolicyJson: string; /** - * @generated from field: string conflict_strategy = 5; - */ - conflictStrategy: string; - - /** - * @generated from field: uint64 revision = 6; + * @generated from field: uint64 revision = 5; */ revision: bigint; }; /** - * Describes the message camino.FieldValueSource. - * Use `create(FieldValueSourceSchema)` to create a new message. + * Describes the message camino.StateValueSource. + * Use `create(StateValueSourceSchema)` to create a new message. */ -export const FieldValueSourceSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 10); +export const StateValueSourceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 5); /** * @generated from message camino.ValueSource */ export type ValueSource = Message<"camino.ValueSource"> & { /** - * @generated from field: camino.FieldValueSource field = 1; + * @generated from field: camino.StateValueSource state = 1; */ - field?: FieldValueSource | undefined; + state?: StateValueSource | undefined; }; /** @@ -255,7 +157,7 @@ export type ValueSource = Message<"camino.ValueSource"> & { * Use `create(ValueSourceSchema)` to create a new message. */ export const ValueSourceSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 11); + messageDesc(file_camino_api, 6); /** * @generated from message camino.Value @@ -337,21 +239,85 @@ export type Value = Message<"camino.Value"> & { * Use `create(ValueSchema)` to create a new message. */ export const ValueSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 12); + messageDesc(file_camino_api, 7); + +/** + * @generated from message camino.InstallPersistencePlanRequest + */ +export type InstallPersistencePlanRequest = Message<"camino.InstallPersistencePlanRequest"> & { + /** + * @generated from field: camino.PersistencePlan plan = 1; + */ + plan?: PersistencePlan | undefined; +}; + +/** + * Describes the message camino.InstallPersistencePlanRequest. + * Use `create(InstallPersistencePlanRequestSchema)` to create a new message. + */ +export const InstallPersistencePlanRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 8); + +/** + * @generated from message camino.InstallPersistencePlanResponse + */ +export type InstallPersistencePlanResponse = Message<"camino.InstallPersistencePlanResponse"> & { + /** + * @generated from field: camino.PersistencePlan plan = 1; + */ + plan?: PersistencePlan | undefined; +}; + +/** + * Describes the message camino.InstallPersistencePlanResponse. + * Use `create(InstallPersistencePlanResponseSchema)` to create a new message. + */ +export const InstallPersistencePlanResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 9); + +/** + * @generated from message camino.GetPersistencePlanRequest + */ +export type GetPersistencePlanRequest = Message<"camino.GetPersistencePlanRequest"> & { +}; + +/** + * Describes the message camino.GetPersistencePlanRequest. + * Use `create(GetPersistencePlanRequestSchema)` to create a new message. + */ +export const GetPersistencePlanRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 10); + +/** + * @generated from message camino.GetPersistencePlanResponse + */ +export type GetPersistencePlanResponse = Message<"camino.GetPersistencePlanResponse"> & { + /** + * @generated from field: camino.PersistencePlan plan = 1; + */ + plan?: PersistencePlan | undefined; +}; + +/** + * Describes the message camino.GetPersistencePlanResponse. + * Use `create(GetPersistencePlanResponseSchema)` to create a new message. + */ +export const GetPersistencePlanResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 11); /** * @generated from message camino.CreateObjectRequest */ export type CreateObjectRequest = Message<"camino.CreateObjectRequest"> & { /** - * @generated from field: string class_id = 1; + * @generated from field: string atom_id = 1; */ - classId: string; + atomId: string; /** - * @generated from field: map fields = 2; + * @generated from field: map initial_state = 2; */ - fields: { [key: string]: Value }; + initialState: { [key: string]: Value }; }; /** @@ -359,7 +325,7 @@ export type CreateObjectRequest = Message<"camino.CreateObjectRequest"> & { * Use `create(CreateObjectRequestSchema)` to create a new message. */ export const CreateObjectRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 13); + messageDesc(file_camino_api, 12); /** * @generated from message camino.CreateObjectResponse @@ -376,7 +342,7 @@ export type CreateObjectResponse = Message<"camino.CreateObjectResponse"> & { * Use `create(CreateObjectResponseSchema)` to create a new message. */ export const CreateObjectResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 14); + messageDesc(file_camino_api, 13); /** * @generated from message camino.GetObjectRequest @@ -393,7 +359,7 @@ export type GetObjectRequest = Message<"camino.GetObjectRequest"> & { * Use `create(GetObjectRequestSchema)` to create a new message. */ export const GetObjectRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 15); + messageDesc(file_camino_api, 14); /** * @generated from message camino.GetObjectResponse @@ -410,16 +376,16 @@ export type GetObjectResponse = Message<"camino.GetObjectResponse"> & { * Use `create(GetObjectResponseSchema)` to create a new message. */ export const GetObjectResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 16); + messageDesc(file_camino_api, 15); /** * @generated from message camino.ListObjectsRequest */ export type ListObjectsRequest = Message<"camino.ListObjectsRequest"> & { /** - * @generated from field: string class_id = 1; + * @generated from field: string atom_id = 1; */ - classId: string; + atomId: string; }; /** @@ -427,7 +393,7 @@ export type ListObjectsRequest = Message<"camino.ListObjectsRequest"> & { * Use `create(ListObjectsRequestSchema)` to create a new message. */ export const ListObjectsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 17); + messageDesc(file_camino_api, 16); /** * @generated from message camino.ListObjectsResponse @@ -444,21 +410,60 @@ export type ListObjectsResponse = Message<"camino.ListObjectsResponse"> & { * Use `create(ListObjectsResponseSchema)` to create a new message. */ export const ListObjectsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 18); + messageDesc(file_camino_api, 17); /** - * @generated from message camino.SetFieldRequest + * @generated from message camino.ReadStateRequest */ -export type SetFieldRequest = Message<"camino.SetFieldRequest"> & { +export type ReadStateRequest = Message<"camino.ReadStateRequest"> & { /** * @generated from field: string object_id = 1; */ objectId: string; /** - * @generated from field: string field_name = 2; + * @generated from field: string slot_id = 2; */ - fieldName: string; + slotId: string; +}; + +/** + * Describes the message camino.ReadStateRequest. + * Use `create(ReadStateRequestSchema)` to create a new message. + */ +export const ReadStateRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 18); + +/** + * @generated from message camino.ReadStateResponse + */ +export type ReadStateResponse = Message<"camino.ReadStateResponse"> & { + /** + * @generated from field: camino.Value value = 1; + */ + value?: Value | undefined; +}; + +/** + * Describes the message camino.ReadStateResponse. + * Use `create(ReadStateResponseSchema)` to create a new message. + */ +export const ReadStateResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 19); + +/** + * @generated from message camino.WriteStateRequest + */ +export type WriteStateRequest = Message<"camino.WriteStateRequest"> & { + /** + * @generated from field: string object_id = 1; + */ + objectId: string; + + /** + * @generated from field: string slot_id = 2; + */ + slotId: string; /** * @generated from field: camino.Value value = 3; @@ -472,57 +477,62 @@ export type SetFieldRequest = Message<"camino.SetFieldRequest"> & { }; /** - * Describes the message camino.SetFieldRequest. - * Use `create(SetFieldRequestSchema)` to create a new message. + * Describes the message camino.WriteStateRequest. + * Use `create(WriteStateRequestSchema)` to create a new message. */ -export const SetFieldRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 19); +export const WriteStateRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 20); /** - * @generated from message camino.SetFieldResponse + * @generated from message camino.WriteStateResponse */ -export type SetFieldResponse = Message<"camino.SetFieldResponse"> & { +export type WriteStateResponse = Message<"camino.WriteStateResponse"> & { /** - * @generated from field: camino.CaminoObject object = 1; + * @generated from field: camino.Value value = 1; + */ + value?: Value | undefined; + + /** + * @generated from field: camino.CaminoObject object = 2; */ object?: CaminoObject | undefined; }; /** - * Describes the message camino.SetFieldResponse. - * Use `create(SetFieldResponseSchema)` to create a new message. + * Describes the message camino.WriteStateResponse. + * Use `create(WriteStateResponseSchema)` to create a new message. */ -export const SetFieldResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 20); +export const WriteStateResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 21); /** - * @generated from message camino.AddEdgeRequest + * @generated from message camino.ConnectEdgeRequest */ -export type AddEdgeRequest = Message<"camino.AddEdgeRequest"> & { +export type ConnectEdgeRequest = Message<"camino.ConnectEdgeRequest"> & { /** - * @generated from field: string from_object_id = 1; + * @generated from field: string edge_type_id = 1; */ - fromObjectId: string; + edgeTypeId: string; /** - * @generated from field: string source_field = 2; + * @generated from field: string projection_id = 2; */ - sourceField: string; + projectionId: string; /** - * @generated from field: string to_object_id = 3; + * @generated from field: string object_id = 3; */ - toObjectId: string; + objectId: string; /** - * @generated from field: map fields = 4; + * @generated from field: string target_object_id = 4; */ - fields: { [key: string]: Value }; + targetObjectId: string; /** - * @generated from field: optional int32 source_ordinal = 5; + * @generated from field: optional int32 ordinal = 5; */ - sourceOrdinal?: number | undefined; + ordinal?: number | undefined; /** * @generated from field: optional int32 target_ordinal = 6; @@ -531,16 +541,16 @@ export type AddEdgeRequest = Message<"camino.AddEdgeRequest"> & { }; /** - * Describes the message camino.AddEdgeRequest. - * Use `create(AddEdgeRequestSchema)` to create a new message. + * Describes the message camino.ConnectEdgeRequest. + * Use `create(ConnectEdgeRequestSchema)` to create a new message. */ -export const AddEdgeRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 21); +export const ConnectEdgeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 22); /** - * @generated from message camino.AddEdgeResponse + * @generated from message camino.ConnectEdgeResponse */ -export type AddEdgeResponse = Message<"camino.AddEdgeResponse"> & { +export type ConnectEdgeResponse = Message<"camino.ConnectEdgeResponse"> & { /** * @generated from field: camino.CaminoEdge edge = 1; */ @@ -548,46 +558,12 @@ export type AddEdgeResponse = Message<"camino.AddEdgeResponse"> & { }; /** - * Describes the message camino.AddEdgeResponse. - * Use `create(AddEdgeResponseSchema)` to create a new message. + * Describes the message camino.ConnectEdgeResponse. + * Use `create(ConnectEdgeResponseSchema)` to create a new message. */ -export const AddEdgeResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 22); - -/** - * @generated from message camino.ListEdgesRequest - */ -export type ListEdgesRequest = Message<"camino.ListEdgesRequest"> & { - /** - * @generated from field: string object_id = 1; - */ - objectId: string; -}; - -/** - * Describes the message camino.ListEdgesRequest. - * Use `create(ListEdgesRequestSchema)` to create a new message. - */ -export const ListEdgesRequestSchema: GenMessage = /*@__PURE__*/ +export const ConnectEdgeResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_camino_api, 23); -/** - * @generated from message camino.ListEdgesResponse - */ -export type ListEdgesResponse = Message<"camino.ListEdgesResponse"> & { - /** - * @generated from field: repeated camino.CaminoEdge edges = 1; - */ - edges: CaminoEdge[]; -}; - -/** - * Describes the message camino.ListEdgesResponse. - * Use `create(ListEdgesResponseSchema)` to create a new message. - */ -export const ListEdgesResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 24); - /** * @generated from message camino.ResolveEdgeRequest */ @@ -598,9 +574,14 @@ export type ResolveEdgeRequest = Message<"camino.ResolveEdgeRequest"> & { objectId: string; /** - * @generated from field: string projection = 2; + * @generated from field: string edge_type_id = 2; */ - projection: string; + edgeTypeId: string; + + /** + * @generated from field: string projection_id = 3; + */ + projectionId: string; }; /** @@ -608,7 +589,7 @@ export type ResolveEdgeRequest = Message<"camino.ResolveEdgeRequest"> & { * Use `create(ResolveEdgeRequestSchema)` to create a new message. */ export const ResolveEdgeRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 25); + messageDesc(file_camino_api, 24); /** * @generated from message camino.ResolveEdgeResponse @@ -618,16 +599,6 @@ export type ResolveEdgeResponse = Message<"camino.ResolveEdgeResponse"> & { * @generated from field: repeated camino.CaminoEdge edges = 1; */ edges: CaminoEdge[]; - - /** - * @generated from field: camino.CaminoObject materialized_object = 2; - */ - materializedObject?: CaminoObject | undefined; - - /** - * @generated from field: bool created = 3; - */ - created: boolean; }; /** @@ -635,12 +606,29 @@ export type ResolveEdgeResponse = Message<"camino.ResolveEdgeResponse"> & { * Use `create(ResolveEdgeResponseSchema)` to create a new message. */ export const ResolveEdgeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 25); + +/** + * @generated from message camino.DisconnectEdgeRequest + */ +export type DisconnectEdgeRequest = Message<"camino.DisconnectEdgeRequest"> & { + /** + * @generated from field: string edge_id = 1; + */ + edgeId: string; +}; + +/** + * Describes the message camino.DisconnectEdgeRequest. + * Use `create(DisconnectEdgeRequestSchema)` to create a new message. + */ +export const DisconnectEdgeRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_camino_api, 26); /** - * @generated from message camino.RemoveEdgeRequest + * @generated from message camino.DisconnectEdgeResponse */ -export type RemoveEdgeRequest = Message<"camino.RemoveEdgeRequest"> & { +export type DisconnectEdgeResponse = Message<"camino.DisconnectEdgeResponse"> & { /** * @generated from field: string edge_id = 1; */ @@ -648,29 +636,12 @@ export type RemoveEdgeRequest = Message<"camino.RemoveEdgeRequest"> & { }; /** - * Describes the message camino.RemoveEdgeRequest. - * Use `create(RemoveEdgeRequestSchema)` to create a new message. + * Describes the message camino.DisconnectEdgeResponse. + * Use `create(DisconnectEdgeResponseSchema)` to create a new message. */ -export const RemoveEdgeRequestSchema: GenMessage = /*@__PURE__*/ +export const DisconnectEdgeResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_camino_api, 27); -/** - * @generated from message camino.RemoveEdgeResponse - */ -export type RemoveEdgeResponse = Message<"camino.RemoveEdgeResponse"> & { - /** - * @generated from field: string edge_id = 1; - */ - edgeId: string; -}; - -/** - * Describes the message camino.RemoveEdgeResponse. - * Use `create(RemoveEdgeResponseSchema)` to create a new message. - */ -export const RemoveEdgeResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 28); - /** * @generated from message camino.ListOpsRequest */ @@ -686,7 +657,7 @@ export type ListOpsRequest = Message<"camino.ListOpsRequest"> & { * Use `create(ListOpsRequestSchema)` to create a new message. */ export const ListOpsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 29); + messageDesc(file_camino_api, 28); /** * @generated from message camino.ListOpsResponse @@ -703,7 +674,7 @@ export type ListOpsResponse = Message<"camino.ListOpsResponse"> & { * Use `create(ListOpsResponseSchema)` to create a new message. */ export const ListOpsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 30); + messageDesc(file_camino_api, 29); /** * @generated from message camino.WatchObjectRequest @@ -730,7 +701,7 @@ export type WatchObjectRequest = Message<"camino.WatchObjectRequest"> & { * Use `create(WatchObjectRequestSchema)` to create a new message. */ export const WatchObjectRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 31); + messageDesc(file_camino_api, 30); /** * @generated from message camino.WatchObjectEvent @@ -757,7 +728,7 @@ export type WatchObjectEvent = Message<"camino.WatchObjectEvent"> & { * Use `create(WatchObjectEventSchema)` to create a new message. */ export const WatchObjectEventSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 32); + messageDesc(file_camino_api, 31); /** * @generated from message camino.CaminoObject @@ -769,14 +740,14 @@ export type CaminoObject = Message<"camino.CaminoObject"> & { id: string; /** - * @generated from field: string class_id = 2; + * @generated from field: string atom_id = 2; */ - classId: string; + atomId: string; /** - * @generated from field: uint32 schema_version = 3; + * @generated from field: string workspace_revision_id = 3; */ - schemaVersion: number; + workspaceRevisionId: string; /** * @generated from field: string created_at = 4; @@ -789,19 +760,14 @@ export type CaminoObject = Message<"camino.CaminoObject"> & { updatedAt: string; /** - * @generated from field: map fields = 6; + * @generated from field: map state = 6; */ - fields: { [key: string]: Value }; + state: { [key: string]: Value }; /** - * @generated from field: map field_revisions = 7; + * @generated from field: map state_revisions = 7; */ - fieldRevisions: { [key: string]: bigint }; - - /** - * @generated from field: map field_conflicts = 8; - */ - fieldConflicts: { [key: string]: string }; + stateRevisions: { [key: string]: bigint }; }; /** @@ -809,7 +775,7 @@ export type CaminoObject = Message<"camino.CaminoObject"> & { * Use `create(CaminoObjectSchema)` to create a new message. */ export const CaminoObjectSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 33); + messageDesc(file_camino_api, 32); /** * @generated from message camino.CaminoEdge @@ -826,81 +792,39 @@ export type CaminoEdge = Message<"camino.CaminoEdge"> & { edgeTypeId: string; /** - * @generated from field: string from_object_id = 3; + * @generated from field: string first_object_id = 3; */ - fromObjectId: string; + firstObjectId: string; /** - * @generated from field: string to_object_id = 4; + * @generated from field: string second_object_id = 4; */ - toObjectId: string; + secondObjectId: string; /** - * Legacy canonical source-side projection fields. Prefer endpoint fields. - * - * @generated from field: string source_field = 5; + * @generated from field: string first_projection_id = 5; */ - sourceField: string; + firstProjectionId: string; /** - * @generated from field: string cardinality = 6; + * @generated from field: string second_projection_id = 6; */ - cardinality: string; + secondProjectionId: string; /** - * @generated from field: string inverse = 7; + * @generated from field: optional int32 first_ordinal = 7; */ - inverse: string; + firstOrdinal?: number | undefined; /** - * @generated from field: map fields = 8; + * @generated from field: optional int32 second_ordinal = 8; */ - fields: { [key: string]: Value }; + secondOrdinal?: number | undefined; /** - * @generated from field: optional int32 from_ordinal = 9; - */ - fromOrdinal?: number | undefined; - - /** - * @generated from field: string created_at = 10; + * @generated from field: string created_at = 9; */ createdAt: string; - - /** - * @generated from field: string updated_at = 11; - */ - updatedAt: string; - - /** - * @generated from field: string from_projection = 12; - */ - fromProjection: string; - - /** - * @generated from field: string to_projection = 13; - */ - toProjection: string; - - /** - * @generated from field: string from_cardinality = 14; - */ - fromCardinality: string; - - /** - * @generated from field: string to_cardinality = 15; - */ - toCardinality: string; - - /** - * @generated from field: optional int32 to_ordinal = 16; - */ - toOrdinal?: number | undefined; - - /** - * @generated from field: string directionality = 17; - */ - directionality: string; }; /** @@ -908,7 +832,7 @@ export type CaminoEdge = Message<"camino.CaminoEdge"> & { * Use `create(CaminoEdgeSchema)` to create a new message. */ export const CaminoEdgeSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 34); + messageDesc(file_camino_api, 33); /** * @generated from message camino.CaminoOp @@ -940,17 +864,12 @@ export type CaminoOp = Message<"camino.CaminoOp"> & { actor: string; /** - * @generated from field: quixos.FunctionRef function_ref = 6; - */ - functionRef?: FunctionRef | undefined; - - /** - * @generated from field: string created_at = 7; + * @generated from field: string created_at = 6; */ createdAt: string; /** - * @generated from field: string client_mutation_id = 8; + * @generated from field: string client_mutation_id = 7; */ clientMutationId: string; }; @@ -960,27 +879,27 @@ export type CaminoOp = Message<"camino.CaminoOp"> & { * Use `create(CaminoOpSchema)` to create a new message. */ export const CaminoOpSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 35); + messageDesc(file_camino_api, 34); /** * @generated from service camino.CaminoService */ export const CaminoService: GenService<{ /** - * @generated from rpc camino.CaminoService.RegisterSchema + * @generated from rpc camino.CaminoService.InstallPersistencePlan */ - registerSchema: { + installPersistencePlan: { methodKind: "unary"; - input: typeof RegisterSchemaRequestSchema; - output: typeof RegisterSchemaResponseSchema; + input: typeof InstallPersistencePlanRequestSchema; + output: typeof InstallPersistencePlanResponseSchema; }, /** - * @generated from rpc camino.CaminoService.ListClasses + * @generated from rpc camino.CaminoService.GetPersistencePlan */ - listClasses: { + getPersistencePlan: { methodKind: "unary"; - input: typeof ListClassesRequestSchema; - output: typeof ListClassesResponseSchema; + input: typeof GetPersistencePlanRequestSchema; + output: typeof GetPersistencePlanResponseSchema; }, /** * @generated from rpc camino.CaminoService.CreateObject @@ -1007,28 +926,28 @@ export const CaminoService: GenService<{ output: typeof ListObjectsResponseSchema; }, /** - * @generated from rpc camino.CaminoService.SetField + * @generated from rpc camino.CaminoService.ReadState */ - setField: { + readState: { methodKind: "unary"; - input: typeof SetFieldRequestSchema; - output: typeof SetFieldResponseSchema; + input: typeof ReadStateRequestSchema; + output: typeof ReadStateResponseSchema; }, /** - * @generated from rpc camino.CaminoService.AddEdge + * @generated from rpc camino.CaminoService.WriteState */ - addEdge: { + writeState: { methodKind: "unary"; - input: typeof AddEdgeRequestSchema; - output: typeof AddEdgeResponseSchema; + input: typeof WriteStateRequestSchema; + output: typeof WriteStateResponseSchema; }, /** - * @generated from rpc camino.CaminoService.ListEdges + * @generated from rpc camino.CaminoService.ConnectEdge */ - listEdges: { + connectEdge: { methodKind: "unary"; - input: typeof ListEdgesRequestSchema; - output: typeof ListEdgesResponseSchema; + input: typeof ConnectEdgeRequestSchema; + output: typeof ConnectEdgeResponseSchema; }, /** * @generated from rpc camino.CaminoService.ResolveEdge @@ -1039,12 +958,12 @@ export const CaminoService: GenService<{ output: typeof ResolveEdgeResponseSchema; }, /** - * @generated from rpc camino.CaminoService.RemoveEdge + * @generated from rpc camino.CaminoService.DisconnectEdge */ - removeEdge: { + disconnectEdge: { methodKind: "unary"; - input: typeof RemoveEdgeRequestSchema; - output: typeof RemoveEdgeResponseSchema; + input: typeof DisconnectEdgeRequestSchema; + output: typeof DisconnectEdgeResponseSchema; }, /** * @generated from rpc camino.CaminoService.ListOps diff --git a/src/gen/camino/options_pb.ts b/src/gen/camino/options_pb.ts deleted file mode 100644 index c26cb2c..0000000 --- a/src/gen/camino/options_pb.ts +++ /dev/null @@ -1,374 +0,0 @@ -// @generated by protoc-gen-es v2.12.1 with parameter "target=ts,import_extension=js" -// @generated from file camino/options.proto (package camino, syntax proto3) -/* eslint-disable */ - -import type { GenExtension, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; -import { extDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"; -import type { FieldOptions, FileOptions, MessageOptions, MethodOptions as MethodOptions$1 } from "@bufbuild/protobuf/wkt"; -import { file_google_protobuf_descriptor } from "@bufbuild/protobuf/wkt"; -import type { Cardinality, ConflictStrategy, FieldOps, FieldStorage, InterfaceFieldContract, SymbolRef, TypeBinding } from "./schema_pb.js"; -import { file_camino_schema } from "./schema_pb.js"; -import type { FunctionRef } from "../quixos/refs_pb.js"; -import { file_quixos_refs } from "../quixos/refs_pb.js"; -import type { Message } from "@bufbuild/protobuf"; - -/** - * Describes the file camino/options.proto. - */ -export const file_camino_options: GenFile = /*@__PURE__*/ - fileDesc("ChRjYW1pbm8vb3B0aW9ucy5wcm90bxIGY2FtaW5vIj4KDENsYXNzT3B0aW9ucxIPCgd2ZXJzaW9uGAEgASgNEh0KAmlkGAIgASgLMhEuY2FtaW5vLlN5bWJvbFJlZiJaChBJbnRlcmZhY2VPcHRpb25zEg8KB3ZlcnNpb24YASABKA0SHQoCaWQYAiABKAsyES5jYW1pbm8uU3ltYm9sUmVmEhYKDnR5cGVfcGFyYW1ldGVyGA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h8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGMeOAyABKAsyGi5jYW1pbm8uQ29uc3RydWN0b3JPcHRpb25zUgtjb25zdHJ1Y3RvcjpVCghjb25mbGljdBIdLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMYzI4DIAEoDjIYLmNhbWluby5Db25mbGljdFN0cmF0ZWd5Ughjb25mbGljdDpICgRlZGdlEh0uZ29vZ2xlLnByb3RvYnVmLkZpZWxkT3B0aW9ucxjNjgMgASgLMhMuY2FtaW5vLkVkZ2VPcHRpb25zUgRlZGdlOloKDWZpZWxkX3N0b3JhZ2USHS5nb29nbGUucHJvdG9idWYuRmllbGRPcHRpb25zGM6OAyABKAsyFC5jYW1pbm8uRmllbGRTdG9yYWdlUgxmaWVsZFN0b3JhZ2U6TgoJZmllbGRfb3BzEh0uZ29vZ2xlLnByb3RvYnVmLkZpZWxkT3B0aW9ucxjPjgMgASgLMhAuY2FtaW5vLkZpZWxkT3BzUghmaWVsZE9wczpoCg9pbnRlcmZhY2VfZmllbGQSHS5nb29nbGUucHJvdG9idWYuRmllbGRPcHRpb25zGNCOAyABKAsyHi5jYW1pbm8uSW50ZXJmYWNlRmllbGRDb250cmFjdFIOaW50ZXJmYWNlRmllbGQ6RAoNZGlzcGxheV9sYWJlbBIdLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMY0Y4DIAEoCFIMZGlzcGxheUxhYmVsOkkKBGltcGwSHi5nb29nbGUucHJvdG9idWYuTWV0aG9kT3B0aW9ucxjWjgMgASgLMhMucXVpeG9zLkZ1bmN0aW9uUmVmUgRpbXBsYgZwcm90bzM", [file_google_protobuf_descriptor, file_camino_schema, file_quixos_refs]); - -/** - * @generated from message camino.ClassOptions - */ -export type ClassOptions = Message<"camino.ClassOptions"> & { - /** - * @generated from field: uint32 version = 1; - */ - version: number; - - /** - * @generated from field: camino.SymbolRef id = 2; - */ - id?: SymbolRef | undefined; -}; - -/** - * Describes the message camino.ClassOptions. - * Use `create(ClassOptionsSchema)` to create a new message. - */ -export const ClassOptionsSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_options, 0); - -/** - * @generated from message camino.InterfaceOptions - */ -export type InterfaceOptions = Message<"camino.InterfaceOptions"> & { - /** - * @generated from field: uint32 version = 1; - */ - version: number; - - /** - * @generated from field: camino.SymbolRef id = 2; - */ - id?: SymbolRef | undefined; - - /** - * @generated from field: repeated string type_parameter = 3; - */ - typeParameter: string[]; -}; - -/** - * Describes the message camino.InterfaceOptions. - * Use `create(InterfaceOptionsSchema)` to create a new message. - */ -export const InterfaceOptionsSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_options, 1); - -/** - * @generated from message camino.ImplementsOptions - */ -export type ImplementsOptions = Message<"camino.ImplementsOptions"> & { - /** - * @generated from field: camino.SymbolRef interface = 1; - */ - interface?: SymbolRef | undefined; - - /** - * @generated from field: repeated camino.TypeBinding type_binding = 2; - */ - typeBinding: TypeBinding[]; -}; - -/** - * Describes the message camino.ImplementsOptions. - * Use `create(ImplementsOptionsSchema)` to create a new message. - */ -export const ImplementsOptionsSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_options, 2); - -/** - * @generated from message camino.ConstructorOptions - */ -export type ConstructorOptions = Message<"camino.ConstructorOptions"> & { - /** - * @generated from field: quixos.FunctionRef function = 1; - */ - function?: FunctionRef | undefined; -}; - -/** - * Describes the message camino.ConstructorOptions. - * Use `create(ConstructorOptionsSchema)` to create a new message. - */ -export const ConstructorOptionsSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_options, 3); - -/** - * @generated from message camino.EdgeOptions - */ -export type EdgeOptions = Message<"camino.EdgeOptions"> & { - /** - * @generated from field: camino.SymbolRef id = 1; - */ - id?: SymbolRef | undefined; - - /** - * Shorthand for other_endpoint.class. - * - * @generated from field: camino.SymbolRef target = 2; - */ - target?: SymbolRef | undefined; - - /** - * Shorthand for this_endpoint.cardinality. - * - * @generated from field: camino.Cardinality cardinality = 3; - */ - cardinality: Cardinality; - - /** - * Shorthand for other_endpoint.projection. - * - * @generated from field: string inverse = 4; - */ - inverse: string; - - /** - * @generated from field: camino.EdgeEndpointOptions this_endpoint = 5; - */ - thisEndpoint?: EdgeEndpointOptions | undefined; - - /** - * @generated from field: camino.EdgeEndpointOptions other_endpoint = 6; - */ - otherEndpoint?: EdgeEndpointOptions | undefined; - - /** - * @generated from field: repeated camino.SymbolRef tag = 7; - */ - tag: SymbolRef[]; - - /** - * @generated from field: repeated camino.SymbolRef implements = 8; - */ - implements: SymbolRef[]; - - /** - * @generated from field: bool undirected = 9; - */ - undirected: boolean; -}; - -/** - * Describes the message camino.EdgeOptions. - * Use `create(EdgeOptionsSchema)` to create a new message. - */ -export const EdgeOptionsSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_options, 4); - -/** - * @generated from message camino.EdgeEndpointOptions - */ -export type EdgeEndpointOptions = Message<"camino.EdgeEndpointOptions"> & { - /** - * @generated from field: camino.SymbolRef class = 1; - */ - class?: SymbolRef | undefined; - - /** - * @generated from field: camino.SymbolRef interface = 2; - */ - interface?: SymbolRef | undefined; - - /** - * @generated from field: string projection = 3; - */ - projection: string; - - /** - * @generated from field: camino.Cardinality cardinality = 4; - */ - cardinality: Cardinality; - - /** - * @generated from field: bool indexed = 5; - */ - indexed: boolean; - - /** - * @generated from field: camino.EdgeMaterializationOptions materialize = 6; - */ - materialize?: EdgeMaterializationOptions | undefined; -}; - -/** - * Describes the message camino.EdgeEndpointOptions. - * Use `create(EdgeEndpointOptionsSchema)` to create a new message. - */ -export const EdgeEndpointOptionsSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_options, 5); - -/** - * @generated from message camino.EdgeMaterializationOptions - */ -export type EdgeMaterializationOptions = Message<"camino.EdgeMaterializationOptions"> & { - /** - * @generated from field: camino.SymbolRef class = 1; - */ - class?: SymbolRef | undefined; - - /** - * @generated from field: string connect_projection = 2; - */ - connectProjection: string; -}; - -/** - * Describes the message camino.EdgeMaterializationOptions. - * Use `create(EdgeMaterializationOptionsSchema)` to create a new message. - */ -export const EdgeMaterializationOptionsSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_options, 6); - -/** - * @generated from message camino.MethodOptions - */ -export type MethodOptions = Message<"camino.MethodOptions"> & { - /** - * @generated from field: string name = 1; - */ - name: string; - - /** - * @generated from field: quixos.FunctionRef function = 2; - */ - function?: FunctionRef | undefined; -}; - -/** - * Describes the message camino.MethodOptions. - * Use `create(MethodOptionsSchema)` to create a new message. - */ -export const MethodOptionsSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_options, 7); - -/** - * @generated from message camino.MigrationOptions - */ -export type MigrationOptions = Message<"camino.MigrationOptions"> & { - /** - * @generated from field: uint32 from_version = 1; - */ - fromVersion: number; - - /** - * @generated from field: uint32 to_version = 2; - */ - toVersion: number; - - /** - * @generated from field: quixos.FunctionRef function = 3; - */ - function?: FunctionRef | undefined; -}; - -/** - * Describes the message camino.MigrationOptions. - * Use `create(MigrationOptionsSchema)` to create a new message. - */ -export const MigrationOptionsSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_options, 8); - -/** - * @generated from extension: string schema_namespace = 51000; - */ -export const schema_namespace: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 0); - -/** - * @generated from extension: string schema_version = 51001; - */ -export const schema_version: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 1); - -/** - * @generated from extension: camino.ClassOptions class = 51010; - */ -export const class$: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 2); - -/** - * @generated from extension: repeated camino.MethodOptions method = 51011; - */ -export const method: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 3); - -/** - * @generated from extension: repeated camino.MigrationOptions migration = 51012; - */ -export const migration: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 4); - -/** - * @generated from extension: camino.InterfaceOptions interface = 51013; - */ -export const interface$: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 5); - -/** - * @generated from extension: repeated camino.ImplementsOptions implements = 51014; - */ -export const implements$: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 6); - -/** - * @generated from extension: camino.ConstructorOptions constructor = 51015; - */ -export const constructor: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 7); - -/** - * @generated from extension: camino.ConflictStrategy conflict = 51020; - */ -export const conflict: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 8); - -/** - * @generated from extension: camino.EdgeOptions edge = 51021; - */ -export const edge: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 9); - -/** - * @generated from extension: camino.FieldStorage field_storage = 51022; - */ -export const field_storage: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 10); - -/** - * @generated from extension: camino.FieldOps field_ops = 51023; - */ -export const field_ops: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 11); - -/** - * @generated from extension: camino.InterfaceFieldContract interface_field = 51024; - */ -export const interface_field: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 12); - -/** - * @generated from extension: bool display_label = 51025; - */ -export const display_label: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 13); - -/** - * @generated from extension: quixos.FunctionRef impl = 51030; - */ -export const impl: GenExtension = /*@__PURE__*/ - extDesc(file_camino_options, 14); - diff --git a/src/gen/camino/schema_pb.ts b/src/gen/camino/schema_pb.ts index f34388a..20466d3 100644 --- a/src/gen/camino/schema_pb.ts +++ b/src/gen/camino/schema_pb.ts @@ -1,614 +1,150 @@ -// @generated by protoc-gen-es v2.12.1 with parameter "target=ts,import_extension=js" +// @generated by protoc-gen-es v2.14.1 with parameter "target=ts,import_extension=js" // @generated from file camino/schema.proto (package camino, syntax proto3) /* eslint-disable */ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"; -import type { FunctionRef } from "../quixos/refs_pb.js"; -import { file_quixos_refs } from "../quixos/refs_pb.js"; import type { Message } from "@bufbuild/protobuf"; /** * Describes the file camino/schema.proto. */ export const file_camino_schema: GenFile = /*@__PURE__*/ - fileDesc("ChNjYW1pbm8vc2NoZW1hLnByb3RvEgZjYW1pbm8iSwoJU3ltYm9sUmVmEhEKCW5hbWVzcGFjZRgBIAEoCRIMCgRuYW1lGAIgASgJEg8KB3ZlcnNpb24YAyABKAkSDAoEaGFzaBgEIAEoCSIYCgNSZWYSEQoJb2JqZWN0X2lkGAEgASgJIg0KC0N1c3RvbUZpZWxkIiQKEFdhdGNoU3RhcnRSZXN1bHQSEAoId2F0Y2hfaWQYASABKAkiJAoQV2F0Y2hTdG9wUmVxdWVzdBIQCgh3YXRjaF9pZBgBIAEoCSIRCg9XYXRjaFN0b3BSZXN1bHQiGwoIQ3JkdFRleHQSDwoHcGF5bG9hZBgBIAEoDCIfCgxDcmR0UmljaFRleHQSDwoHcGF5bG9hZBgBIAEoDCIbCghDcmR0SnNvbhIPCgdwYXlsb2FkGAEgASgMIqgDCgtDbGFzc1NjaGVtYRIdCgJpZBgBIAEoCzIRLmNhbWluby5TeW1ib2xSZWYSDwoHdmVyc2lvbhgCIAEoDRIjCgZmaWVsZHMYAyADKAsyEy5jYW1pbm8uRmllbGRTY2hlbWESIQoFZWRnZXMYBCADKAsyEi5jYW1pbm8uRWRnZVNjaGVtYRIlCgdtZXRob2RzGAUgAygLMhQuY2FtaW5vLk1ldGhvZFNjaGVtYRIpCgptaWdyYXRpb25zGAYgAygLMhUuY2FtaW5vLk1pZ3JhdGlvblNwZWMSEwoLc291cmNlX2ZpbGUYByABKAkSFQoNcHJvdG9fbWVzc2FnZRgIIAEoCRI6ChJvcGVyYXRpb25fc2VydmljZXMYCSADKAsyHi5jYW1pbm8uT3BlcmF0aW9uU2VydmljZVNjaGVtYRI5CgppbXBsZW1lbnRzGAogAygLMiUuY2FtaW5vLkludGVyZmFjZUltcGxlbWVudGF0aW9uU2NoZW1hEiwKC2NvbnN0cnVjdG9yGAsgASgLMhcuY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W1pbm8uU3RhdGVBdHRhY2htZW50EiUKBWVkZ2VzGAYgAygLMhYuY2FtaW5vLkVkZ2VBdHRhY2htZW50KmgKC0NhcmRpbmFsaXR5EhsKF0NBUkRJTkFMSVRZX1VOU1BFQ0lGSUVEEAASEAoMT1BUSU9OQUxfT05FEAESDwoLRVhBQ1RMWV9PTkUQAhIICgRNQU5ZEAMSDwoLTUFOWV9VTklRVUUQBGIGcHJvdG8z"); /** - * @generated from message camino.SymbolRef + * @generated from message camino.AtomDefinition */ -export type SymbolRef = Message<"camino.SymbolRef"> & { +export type AtomDefinition = Message<"camino.AtomDefinition"> & { /** - * @generated from field: string namespace = 1; + * @generated from field: string atom_id = 1; */ - namespace: string; + atomId: string; /** - * @generated from field: string name = 2; + * @generated from field: string display_name = 2; */ - name: string; - - /** - * @generated from field: string version = 3; - */ - version: string; - - /** - * @generated from field: string hash = 4; - */ - hash: string; + displayName: string; }; /** - * Describes the message camino.SymbolRef. - * Use `create(SymbolRefSchema)` to create a new message. + * Describes the message camino.AtomDefinition. + * Use `create(AtomDefinitionSchema)` to create a new message. */ -export const SymbolRefSchema: GenMessage = /*@__PURE__*/ +export const AtomDefinitionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_camino_schema, 0); /** - * @generated from message camino.Ref + * @generated from message camino.AtomConformance */ -export type Ref = Message<"camino.Ref"> & { +export type AtomConformance = Message<"camino.AtomConformance"> & { /** - * @generated from field: string object_id = 1; + * @generated from field: string atom_id = 1; */ - objectId: string; + atomId: string; + + /** + * @generated from field: string interface_revision_id = 2; + */ + interfaceRevisionId: string; }; /** - * Describes the message camino.Ref. - * Use `create(RefSchema)` to create a new message. + * Describes the message camino.AtomConformance. + * Use `create(AtomConformanceSchema)` to create a new message. */ -export const RefSchema: GenMessage = /*@__PURE__*/ +export const AtomConformanceSchema: GenMessage = /*@__PURE__*/ messageDesc(file_camino_schema, 1); /** - * @generated from message camino.CustomField + * @generated from message camino.StateAttachment */ -export type CustomField = Message<"camino.CustomField"> & { +export type StateAttachment = Message<"camino.StateAttachment"> & { + /** + * @generated from field: string slot_id = 1; + */ + slotId: string; + + /** + * @generated from field: string attached_atom_id = 2; + */ + attachedAtomId: string; + + /** + * @generated from field: string display_name = 3; + */ + displayName: string; + + /** + * @generated from field: string value_type_json = 4; + */ + valueTypeJson: string; + + /** + * @generated from field: string storage_policy_json = 5; + */ + storagePolicyJson: string; + + /** + * @generated from field: string default_value_json = 6; + */ + defaultValueJson: string; }; /** - * Describes the message camino.CustomField. - * Use `create(CustomFieldSchema)` to create a new message. + * Describes the message camino.StateAttachment. + * Use `create(StateAttachmentSchema)` to create a new message. */ -export const CustomFieldSchema: GenMessage = /*@__PURE__*/ +export const StateAttachmentSchema: GenMessage = /*@__PURE__*/ messageDesc(file_camino_schema, 2); /** - * @generated from message camino.WatchStartResult + * @generated from message camino.EndpointConstraint */ -export type WatchStartResult = Message<"camino.WatchStartResult"> & { +export type EndpointConstraint = Message<"camino.EndpointConstraint"> & { /** - * @generated from field: string watch_id = 1; + * @generated from oneof camino.EndpointConstraint.kind */ - watchId: string; + kind: { + /** + * @generated from field: string atom_id = 1; + */ + value: string; + case: "atomId"; + } | { + /** + * @generated from field: string interface_revision_id = 2; + */ + value: string; + case: "interfaceRevisionId"; + } | { case: undefined; value?: undefined }; }; /** - * Describes the message camino.WatchStartResult. - * Use `create(WatchStartResultSchema)` to create a new message. + * Describes the message camino.EndpointConstraint. + * Use `create(EndpointConstraintSchema)` to create a new message. */ -export const WatchStartResultSchema: GenMessage = /*@__PURE__*/ +export const EndpointConstraintSchema: GenMessage = /*@__PURE__*/ messageDesc(file_camino_schema, 3); /** - * @generated from message camino.WatchStopRequest + * @generated from message camino.EdgeEndpoint */ -export type WatchStopRequest = Message<"camino.WatchStopRequest"> & { +export type EdgeEndpoint = Message<"camino.EdgeEndpoint"> & { /** - * @generated from field: string watch_id = 1; + * @generated from field: string projection_id = 1; */ - watchId: string; -}; - -/** - * Describes the message camino.WatchStopRequest. - * Use `create(WatchStopRequestSchema)` to create a new message. - */ -export const WatchStopRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 4); - -/** - * @generated from message camino.WatchStopResult - */ -export type WatchStopResult = Message<"camino.WatchStopResult"> & { -}; - -/** - * Describes the message camino.WatchStopResult. - * Use `create(WatchStopResultSchema)` to create a new message. - */ -export const WatchStopResultSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 5); - -/** - * @generated from message camino.CrdtText - */ -export type CrdtText = Message<"camino.CrdtText"> & { - /** - * @generated from field: bytes payload = 1; - */ - payload: Uint8Array; -}; - -/** - * Describes the message camino.CrdtText. - * Use `create(CrdtTextSchema)` to create a new message. - */ -export const CrdtTextSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 6); - -/** - * @generated from message camino.CrdtRichText - */ -export type CrdtRichText = Message<"camino.CrdtRichText"> & { - /** - * @generated from field: bytes payload = 1; - */ - payload: Uint8Array; -}; - -/** - * Describes the message camino.CrdtRichText. - * Use `create(CrdtRichTextSchema)` to create a new message. - */ -export const CrdtRichTextSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 7); - -/** - * @generated from message camino.CrdtJson - */ -export type CrdtJson = Message<"camino.CrdtJson"> & { - /** - * @generated from field: bytes payload = 1; - */ - payload: Uint8Array; -}; - -/** - * Describes the message camino.CrdtJson. - * Use `create(CrdtJsonSchema)` to create a new message. - */ -export const CrdtJsonSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 8); - -/** - * @generated from message camino.ClassSchema - */ -export type ClassSchema = Message<"camino.ClassSchema"> & { - /** - * @generated from field: camino.SymbolRef id = 1; - */ - id?: SymbolRef | undefined; - - /** - * @generated from field: uint32 version = 2; - */ - version: number; - - /** - * @generated from field: repeated camino.FieldSchema fields = 3; - */ - fields: FieldSchema[]; - - /** - * @generated from field: repeated camino.EdgeSchema edges = 4; - */ - edges: EdgeSchema[]; - - /** - * @generated from field: repeated camino.MethodSchema methods = 5; - */ - methods: MethodSchema[]; - - /** - * @generated from field: repeated camino.MigrationSpec migrations = 6; - */ - migrations: MigrationSpec[]; - - /** - * @generated from field: string source_file = 7; - */ - sourceFile: string; - - /** - * @generated from field: string proto_message = 8; - */ - protoMessage: string; - - /** - * @generated from field: repeated camino.OperationServiceSchema operation_services = 9; - */ - operationServices: OperationServiceSchema[]; - - /** - * @generated from field: repeated camino.InterfaceImplementationSchema implements = 10; - */ - implements: InterfaceImplementationSchema[]; - - /** - * @generated from field: camino.ConstructorSpec constructor = 11; - */ - constructor$?: ConstructorSpec | undefined; -}; - -/** - * Describes the message camino.ClassSchema. - * Use `create(ClassSchemaSchema)` to create a new message. - */ -export const ClassSchemaSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 9); - -/** - * @generated from message camino.FieldSchema - */ -export type FieldSchema = Message<"camino.FieldSchema"> & { - /** - * @generated from field: string name = 1; - */ - name: string; - - /** - * @generated from field: uint32 tag = 2; - */ - tag: number; - - /** - * @generated from field: camino.TypeRef type = 3; - */ - type?: TypeRef | undefined; - - /** - * @generated from field: camino.ConflictStrategy conflict = 4; - */ - conflict: ConflictStrategy; - - /** - * @generated from field: bool repeated = 5; - */ - repeated: boolean; - - /** - * @generated from field: bool optional = 6; - */ - optional: boolean; - - /** - * @generated from field: camino.FieldStorage storage = 7; - */ - storage?: FieldStorage | undefined; - - /** - * @generated from field: camino.FieldOps ops = 8; - */ - ops?: FieldOps | undefined; - - /** - * @generated from field: camino.InterfaceFieldContract interface_contract = 9; - */ - interfaceContract?: InterfaceFieldContract | undefined; - - /** - * @generated from field: bool is_display_label = 10; - */ - isDisplayLabel: boolean; -}; - -/** - * Describes the message camino.FieldSchema. - * Use `create(FieldSchemaSchema)` to create a new message. - */ -export const FieldSchemaSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 10); - -/** - * @generated from message camino.FieldStorage - */ -export type FieldStorage = Message<"camino.FieldStorage"> & { - /** - * @generated from field: camino.FieldStorageKind kind = 1; - */ - kind: FieldStorageKind; - - /** - * @generated from field: quixos.FunctionRef resolver = 2; - */ - resolver?: FunctionRef | undefined; - - /** - * @generated from field: bool cache = 3; - */ - cache: boolean; -}; - -/** - * Describes the message camino.FieldStorage. - * Use `create(FieldStorageSchema)` to create a new message. - */ -export const FieldStorageSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 11); - -/** - * @generated from message camino.TypeRef - */ -export type TypeRef = Message<"camino.TypeRef"> & { - /** - * @generated from field: string proto_type = 1; - */ - protoType: string; - - /** - * @generated from field: camino.SymbolRef symbol = 2; - */ - symbol?: SymbolRef | undefined; -}; - -/** - * Describes the message camino.TypeRef. - * Use `create(TypeRefSchema)` to create a new message. - */ -export const TypeRefSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 12); - -/** - * @generated from message camino.TypeBinding - */ -export type TypeBinding = Message<"camino.TypeBinding"> & { - /** - * @generated from field: string name = 1; - */ - name: string; - - /** - * @generated from field: camino.TypeRef type = 2; - */ - type?: TypeRef | undefined; -}; - -/** - * Describes the message camino.TypeBinding. - * Use `create(TypeBindingSchema)` to create a new message. - */ -export const TypeBindingSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 13); - -/** - * @generated from message camino.InterfaceFieldContract - */ -export type InterfaceFieldContract = Message<"camino.InterfaceFieldContract"> & { - /** - * @generated from field: bool required = 1; - */ - required: boolean; - - /** - * @generated from field: bool readable = 2; - */ - readable: boolean; - - /** - * @generated from field: bool writable = 3; - */ - writable: boolean; - - /** - * @generated from field: bool watchable = 4; - */ - watchable: boolean; - - /** - * @generated from field: string type_param = 5; - */ - typeParam: string; - - /** - * @generated from field: camino.TypeRef type = 6; - */ - type?: TypeRef | undefined; - - /** - * @generated from field: string ref_target_type_param = 7; - */ - refTargetTypeParam: string; - - /** - * @generated from field: camino.Cardinality edge_cardinality = 8; - */ - edgeCardinality: Cardinality; -}; - -/** - * Describes the message camino.InterfaceFieldContract. - * Use `create(InterfaceFieldContractSchema)` to create a new message. - */ -export const InterfaceFieldContractSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 14); - -/** - * @generated from message camino.InterfaceImplementationSchema - */ -export type InterfaceImplementationSchema = Message<"camino.InterfaceImplementationSchema"> & { - /** - * @generated from field: camino.SymbolRef interface = 1; - */ - interface?: SymbolRef | undefined; - - /** - * @generated from field: repeated camino.TypeBinding type_bindings = 2; - */ - typeBindings: TypeBinding[]; -}; - -/** - * Describes the message camino.InterfaceImplementationSchema. - * Use `create(InterfaceImplementationSchemaSchema)` to create a new message. - */ -export const InterfaceImplementationSchemaSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 15); - -/** - * @generated from message camino.InterfaceSchema - */ -export type InterfaceSchema = Message<"camino.InterfaceSchema"> & { - /** - * @generated from field: camino.SymbolRef id = 1; - */ - id?: SymbolRef | undefined; - - /** - * @generated from field: uint32 version = 2; - */ - version: number; - - /** - * @generated from field: repeated camino.FieldSchema fields = 3; - */ - fields: FieldSchema[]; - - /** - * @generated from field: string source_file = 4; - */ - sourceFile: string; - - /** - * @generated from field: string proto_message = 5; - */ - protoMessage: string; - - /** - * @generated from field: repeated string type_parameters = 6; - */ - typeParameters: string[]; -}; - -/** - * Describes the message camino.InterfaceSchema. - * Use `create(InterfaceSchemaSchema)` to create a new message. - */ -export const InterfaceSchemaSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 16); - -/** - * @generated from message camino.FieldOps - */ -export type FieldOps = Message<"camino.FieldOps"> & { - /** - * @generated from field: camino.FieldImplementation implementation = 1; - */ - implementation: FieldImplementation; - - /** - * @generated from field: string service = 2; - */ - service: string; -}; - -/** - * Describes the message camino.FieldOps. - * Use `create(FieldOpsSchema)` to create a new message. - */ -export const FieldOpsSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 17); - -/** - * @generated from message camino.EdgeSchema - */ -export type EdgeSchema = Message<"camino.EdgeSchema"> & { - /** - * @generated from field: camino.SymbolRef id = 1; - */ - id?: SymbolRef | undefined; - - /** - * Legacy/source-side projection fields. Prefer from_endpoint/to_endpoint. - * - * @generated from field: string source_field = 2; - */ - sourceField: string; - - /** - * @generated from field: camino.SymbolRef from_class = 3; - */ - fromClass?: SymbolRef | undefined; - - /** - * @generated from field: camino.SymbolRef to_class = 4; - */ - toClass?: SymbolRef | undefined; - - /** - * @generated from field: camino.Cardinality cardinality = 5; - */ - cardinality: Cardinality; - - /** - * @generated from field: string inverse = 6; - */ - inverse: string; - - /** - * @generated from field: repeated camino.FieldSchema fields = 7; - */ - fields: FieldSchema[]; - - /** - * @generated from field: camino.EdgeEndpointSchema from_endpoint = 8; - */ - fromEndpoint?: EdgeEndpointSchema | undefined; - - /** - * @generated from field: camino.EdgeEndpointSchema to_endpoint = 9; - */ - toEndpoint?: EdgeEndpointSchema | undefined; - - /** - * @generated from field: camino.SymbolRef declaring_class = 10; - */ - declaringClass?: SymbolRef | undefined; - - /** - * @generated from field: repeated camino.SymbolRef tags = 11; - */ - tags: SymbolRef[]; - - /** - * @generated from field: repeated camino.SymbolRef implements = 12; - */ - implements: SymbolRef[]; - - /** - * @generated from field: bool undirected = 13; - */ - undirected: boolean; -}; - -/** - * Describes the message camino.EdgeSchema. - * Use `create(EdgeSchemaSchema)` to create a new message. - */ -export const EdgeSchemaSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 18); - -/** - * @generated from message camino.EdgeEndpointSchema - */ -export type EdgeEndpointSchema = Message<"camino.EdgeEndpointSchema"> & { - /** - * @generated from field: camino.SymbolRef class = 1; - */ - class?: SymbolRef | undefined; + projectionId: string; /** - * @generated from field: camino.SymbolRef interface = 2; + * @generated from field: string display_name = 2; */ - interface?: SymbolRef | undefined; + displayName: string; /** - * @generated from field: string projection = 3; + * @generated from field: camino.EndpointConstraint constraint = 3; */ - projection: string; + constraint?: EndpointConstraint | undefined; /** * @generated from field: camino.Cardinality cardinality = 4; @@ -616,232 +152,94 @@ export type EdgeEndpointSchema = Message<"camino.EdgeEndpointSchema"> & { cardinality: Cardinality; /** - * @generated from field: bool indexed = 5; + * @generated from field: bool ordered = 5; */ - indexed: boolean; - - /** - * @generated from field: camino.EdgeMaterialization materialize = 6; - */ - materialize?: EdgeMaterialization | undefined; + ordered: boolean; }; /** - * Describes the message camino.EdgeEndpointSchema. - * Use `create(EdgeEndpointSchemaSchema)` to create a new message. + * Describes the message camino.EdgeEndpoint. + * Use `create(EdgeEndpointSchema)` to create a new message. */ -export const EdgeEndpointSchemaSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 19); +export const EdgeEndpointSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 4); /** - * @generated from message camino.EdgeMaterialization + * @generated from message camino.EdgeAttachment */ -export type EdgeMaterialization = Message<"camino.EdgeMaterialization"> & { +export type EdgeAttachment = Message<"camino.EdgeAttachment"> & { /** - * @generated from field: camino.SymbolRef class = 1; + * @generated from field: string edge_type_id = 1; */ - class?: SymbolRef | undefined; + edgeTypeId: string; /** - * @generated from field: string connect_projection = 2; + * @generated from field: string display_name = 2; */ - connectProjection: string; + displayName: string; + + /** + * @generated from field: camino.EdgeEndpoint first = 3; + */ + first?: EdgeEndpoint | undefined; + + /** + * @generated from field: camino.EdgeEndpoint second = 4; + */ + second?: EdgeEndpoint | undefined; }; /** - * Describes the message camino.EdgeMaterialization. - * Use `create(EdgeMaterializationSchema)` to create a new message. + * Describes the message camino.EdgeAttachment. + * Use `create(EdgeAttachmentSchema)` to create a new message. */ -export const EdgeMaterializationSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 20); +export const EdgeAttachmentSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 5); /** - * @generated from message camino.MethodSchema + * Camino consumes this persistence-only projection of a checked workspace. + * Interfaces, operation bindings, packages, and constructors stay in orch. + * + * @generated from message camino.PersistencePlan */ -export type MethodSchema = Message<"camino.MethodSchema"> & { +export type PersistencePlan = Message<"camino.PersistencePlan"> & { /** - * @generated from field: string name = 1; + * @generated from field: string workspace_id = 1; */ - name: string; + workspaceId: string; /** - * @generated from field: quixos.FunctionRef function = 2; + * @generated from field: string workspace_revision_id = 2; */ - function?: FunctionRef | undefined; + workspaceRevisionId: string; + + /** + * @generated from field: repeated camino.AtomDefinition atoms = 3; + */ + atoms: AtomDefinition[]; + + /** + * @generated from field: repeated camino.AtomConformance conformances = 4; + */ + conformances: AtomConformance[]; + + /** + * @generated from field: repeated camino.StateAttachment states = 5; + */ + states: StateAttachment[]; + + /** + * @generated from field: repeated camino.EdgeAttachment edges = 6; + */ + edges: EdgeAttachment[]; }; /** - * Describes the message camino.MethodSchema. - * Use `create(MethodSchemaSchema)` to create a new message. + * Describes the message camino.PersistencePlan. + * Use `create(PersistencePlanSchema)` to create a new message. */ -export const MethodSchemaSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 21); - -/** - * @generated from message camino.MigrationSpec - */ -export type MigrationSpec = Message<"camino.MigrationSpec"> & { - /** - * @generated from field: uint32 from_version = 1; - */ - fromVersion: number; - - /** - * @generated from field: uint32 to_version = 2; - */ - toVersion: number; - - /** - * @generated from field: quixos.FunctionRef function = 3; - */ - function?: FunctionRef | undefined; -}; - -/** - * Describes the message camino.MigrationSpec. - * Use `create(MigrationSpecSchema)` to create a new message. - */ -export const MigrationSpecSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 22); - -/** - * @generated from message camino.ConstructorSpec - */ -export type ConstructorSpec = Message<"camino.ConstructorSpec"> & { - /** - * @generated from field: quixos.FunctionRef function = 1; - */ - function?: FunctionRef | undefined; -}; - -/** - * Describes the message camino.ConstructorSpec. - * Use `create(ConstructorSpecSchema)` to create a new message. - */ -export const ConstructorSpecSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 23); - -/** - * @generated from message camino.OperationSchema - */ -export type OperationSchema = Message<"camino.OperationSchema"> & { - /** - * @generated from field: string name = 1; - */ - name: string; - - /** - * @generated from field: camino.TypeRef input_type = 2; - */ - inputType?: TypeRef | undefined; - - /** - * @generated from field: camino.TypeRef output_type = 3; - */ - outputType?: TypeRef | undefined; - - /** - * @generated from field: quixos.FunctionRef function = 4; - */ - function?: FunctionRef | undefined; -}; - -/** - * Describes the message camino.OperationSchema. - * Use `create(OperationSchemaSchema)` to create a new message. - */ -export const OperationSchemaSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 24); - -/** - * @generated from message camino.OperationServiceSchema - */ -export type OperationServiceSchema = Message<"camino.OperationServiceSchema"> & { - /** - * @generated from field: string name = 1; - */ - name: string; - - /** - * @generated from field: string full_name = 2; - */ - fullName: string; - - /** - * @generated from field: repeated camino.OperationSchema operations = 3; - */ - operations: OperationSchema[]; -}; - -/** - * Describes the message camino.OperationServiceSchema. - * Use `create(OperationServiceSchemaSchema)` to create a new message. - */ -export const OperationServiceSchemaSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 25); - -/** - * @generated from message camino.DocRefDeclaration - */ -export type DocRefDeclaration = Message<"camino.DocRefDeclaration"> & { - /** - * @generated from field: string local_name = 1; - */ - localName: string; - - /** - * @generated from field: camino.SymbolRef type = 2; - */ - type?: SymbolRef | undefined; - - /** - * @generated from field: camino.SymbolRef target_class = 3; - */ - targetClass?: SymbolRef | undefined; - - /** - * @generated from field: camino.DocRefStrength strength = 4; - */ - strength: DocRefStrength; -}; - -/** - * Describes the message camino.DocRefDeclaration. - * Use `create(DocRefDeclarationSchema)` to create a new message. - */ -export const DocRefDeclarationSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 26); - -/** - * @generated from enum camino.ConflictStrategy - */ -export enum ConflictStrategy { - /** - * @generated from enum value: CONFLICT_STRATEGY_UNSPECIFIED = 0; - */ - CONFLICT_STRATEGY_UNSPECIFIED = 0, - - /** - * @generated from enum value: REPLACE = 1; - */ - REPLACE = 1, - - /** - * @generated from enum value: PRESERVE_CONFLICTS = 2; - */ - PRESERVE_CONFLICTS = 2, - - /** - * @generated from enum value: CRDT = 3; - */ - CRDT = 3, -} - -/** - * Describes the enum camino.ConflictStrategy. - */ -export const ConflictStrategySchema: GenEnum = /*@__PURE__*/ - enumDesc(file_camino_schema, 0); +export const PersistencePlanSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 6); /** * @generated from enum camino.Cardinality @@ -871,109 +269,11 @@ export enum Cardinality { * @generated from enum value: MANY_UNIQUE = 4; */ MANY_UNIQUE = 4, - - /** - * @generated from enum value: MANY_ORDERED = 5; - */ - MANY_ORDERED = 5, - - /** - * @generated from enum value: MANY_UNIQUE_ORDERED = 6; - */ - MANY_UNIQUE_ORDERED = 6, } /** * Describes the enum camino.Cardinality. */ export const CardinalitySchema: GenEnum = /*@__PURE__*/ - enumDesc(file_camino_schema, 1); - -/** - * @generated from enum camino.DocRefStrength - */ -export enum DocRefStrength { - /** - * @generated from enum value: DOC_REF_STRENGTH_UNSPECIFIED = 0; - */ - DOC_REF_STRENGTH_UNSPECIFIED = 0, - - /** - * @generated from enum value: SOFT_REF = 1; - */ - SOFT_REF = 1, - - /** - * @generated from enum value: PROJECTED_EDGE = 2; - */ - PROJECTED_EDGE = 2, -} - -/** - * Describes the enum camino.DocRefStrength. - */ -export const DocRefStrengthSchema: GenEnum = /*@__PURE__*/ - enumDesc(file_camino_schema, 2); - -/** - * @generated from enum camino.FieldStorageKind - */ -export enum FieldStorageKind { - /** - * @generated from enum value: FIELD_STORAGE_KIND_UNSPECIFIED = 0; - */ - FIELD_STORAGE_KIND_UNSPECIFIED = 0, - - /** - * @generated from enum value: STORED = 1; - */ - STORED = 1, - - /** - * @generated from enum value: DERIVED = 2; - */ - DERIVED = 2, - - /** - * @generated from enum value: LAZY = 3; - */ - LAZY = 3, - - /** - * @generated from enum value: EXTERNAL = 4; - */ - EXTERNAL = 4, - - /** - * @generated from enum value: STATIC_FINAL = 5; - */ - STATIC_FINAL = 5, -} - -/** - * Describes the enum camino.FieldStorageKind. - */ -export const FieldStorageKindSchema: GenEnum = /*@__PURE__*/ - enumDesc(file_camino_schema, 3); - -/** - * @generated from enum camino.FieldImplementation - */ -export enum FieldImplementation { - /** - * @generated from enum value: FIELD_IMPLEMENTATION_UNSPECIFIED = 0; - */ - FIELD_IMPLEMENTATION_UNSPECIFIED = 0, - - /** - * @generated from enum value: SERVICE = 1; - */ - SERVICE = 1, -} - -/** - * Describes the enum camino.FieldImplementation. - */ -export const FieldImplementationSchema: GenEnum = /*@__PURE__*/ - enumDesc(file_camino_schema, 4); + enumDesc(file_camino_schema, 0); diff --git a/src/gen/quixos/orch_pb.ts b/src/gen/quixos/orch_pb.ts index b9dbc80..bd60b17 100644 --- a/src/gen/quixos/orch_pb.ts +++ b/src/gen/quixos/orch_pb.ts @@ -1,14 +1,14 @@ -// @generated by protoc-gen-es v2.12.1 with parameter "target=ts,import_extension=js" +// @generated by protoc-gen-es v2.14.1 with parameter "target=ts,import_extension=js" // @generated from file quixos/orch.proto (package quixos.orch, syntax proto3) /* eslint-disable */ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import type { Value } from "../camino/api_pb.js"; +import type { CaminoObject, Value } from "../camino/api_pb.js"; import { file_camino_api } from "../camino/api_pb.js"; import type { PackageDescriptor } from "./package_pb.js"; import { file_quixos_package } from "./package_pb.js"; -import type { FunctionRef } from "./refs_pb.js"; +import type { CapabilityRef, PackageExportRef } from "./refs_pb.js"; import { file_quixos_refs } from "./refs_pb.js"; import type { DerivedDependency } from "./runtime_pb.js"; import { file_quixos_runtime } from "./runtime_pb.js"; @@ -18,16 +18,55 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file quixos/orch.proto. */ export const file_quixos_orch: GenFile = /*@__PURE__*/ - fileDesc("ChFxdWl4b3Mvb3JjaC5wcm90bxILcXVpeG9zLm9yY2gizAEKFUludm9rZUZ1bmN0aW9uUmVxdWVzdBIlCghmdW5jdGlvbhg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0eVJlc3BvbnNlElsKD1dhdGNoQ2FwYWJpbGl0eRIjLnF1aXhvcy5vcmNoLldhdGNoQ2FwYWJpbGl0eVJlcXVlc3QaIS5xdWl4b3Mub3JjaC5XYXRjaENhcGFiaWxpdHlFdmVudDABElwKD0NvbnN0cnVjdE9iamVjdBIjLnF1aXhvcy5vcmNoLkNvbnN0cnVjdE9iamVjdFJlcXVlc3QaJC5xdWl4b3Mub3JjaC5Db25zdHJ1Y3RPYmplY3RSZXNwb25zZRJTCgxHZXRXb3Jrc3BhY2USIC5xdWl4b3Mub3JjaC5HZXRXb3Jrc3BhY2VSZXF1ZXN0GiEucXVpeG9zLm9yY2guR2V0V29ya3NwYWNlUmVzcG9uc2UScQoWTGlzdFBhY2thZ2VEZXNjcmlwdG9ycxIqLnF1aXhvcy5vcmNoLkxpc3RQYWNrYWdlRGVzY3JpcHRvcnNSZXF1ZXN0GisucXVpeG9zLm9yY2guTGlzdFBhY2thZ2VEZXNjcmlwdG9yc1Jlc3BvbnNlEmgKE0xpc3RQYWNrYWdlUnVudGltZXMSJy5xdWl4b3Mub3JjaC5MaXN0UGFja2FnZVJ1bnRpbWVzUmVxdWVzdBooLnF1aXhvcy5vcmNoLkxpc3RQYWNrYWdlUnVudGltZXNSZXNwb25zZRJcCg9MaXN0QWN0aXZhdGlvbnMSIy5xdWl4b3Mub3JjaC5MaXN0QWN0aXZhdGlvbnNSZXF1ZXN0GiQucXVpeG9zLm9yY2guTGlzdEFjdGl2YXRpb25zUmVzcG9uc2USXAoPQ2xvc2VBY3RpdmF0aW9uEiMucXVpeG9zLm9yY2guQ2xvc2VBY3RpdmF0aW9uUmVxdWVzdBokLnF1aXhvcy5vcmNoLkNsb3NlQWN0aXZhdGlvblJlc3BvbnNlYgZwcm90bzM", [file_camino_api, file_quixos_package, file_quixos_refs, file_quixos_runtime]); /** - * @generated from message quixos.orch.InvokeFunctionRequest + * @generated from message quixos.orch.ConstructObjectRequest */ -export type InvokeFunctionRequest = Message<"quixos.orch.InvokeFunctionRequest"> & { +export type ConstructObjectRequest = Message<"quixos.orch.ConstructObjectRequest"> & { /** - * @generated from field: quixos.FunctionRef function = 1; + * @generated from field: string atom_id = 1; */ - function?: FunctionRef | undefined; + atomId: string; + + /** + * @generated from field: map input = 2; + */ + input: { [key: string]: Value }; +}; + +/** + * Describes the message quixos.orch.ConstructObjectRequest. + * Use `create(ConstructObjectRequestSchema)` to create a new message. + */ +export const ConstructObjectRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 0); + +/** + * @generated from message quixos.orch.ConstructObjectResponse + */ +export type ConstructObjectResponse = Message<"quixos.orch.ConstructObjectResponse"> & { + /** + * @generated from field: camino.CaminoObject object = 1; + */ + object?: CaminoObject | undefined; +}; + +/** + * Describes the message quixos.orch.ConstructObjectResponse. + * Use `create(ConstructObjectResponseSchema)` to create a new message. + */ +export const ConstructObjectResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 1); + +/** + * @generated from message quixos.orch.InvokeCapabilityRequest + */ +export type InvokeCapabilityRequest = Message<"quixos.orch.InvokeCapabilityRequest"> & { + /** + * @generated from field: quixos.CapabilityRef capability = 1; + */ + capability?: CapabilityRef | undefined; /** * @generated from field: string object_id = 2; @@ -41,16 +80,16 @@ export type InvokeFunctionRequest = Message<"quixos.orch.InvokeFunctionRequest"> }; /** - * Describes the message quixos.orch.InvokeFunctionRequest. - * Use `create(InvokeFunctionRequestSchema)` to create a new message. + * Describes the message quixos.orch.InvokeCapabilityRequest. + * Use `create(InvokeCapabilityRequestSchema)` to create a new message. */ -export const InvokeFunctionRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 0); +export const InvokeCapabilityRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 2); /** - * @generated from message quixos.orch.InvokeFunctionResponse + * @generated from message quixos.orch.InvokeCapabilityResponse */ -export type InvokeFunctionResponse = Message<"quixos.orch.InvokeFunctionResponse"> & { +export type InvokeCapabilityResponse = Message<"quixos.orch.InvokeCapabilityResponse"> & { /** * @generated from field: string invocation_id = 1; */ @@ -78,20 +117,20 @@ export type InvokeFunctionResponse = Message<"quixos.orch.InvokeFunctionResponse }; /** - * Describes the message quixos.orch.InvokeFunctionResponse. - * Use `create(InvokeFunctionResponseSchema)` to create a new message. + * Describes the message quixos.orch.InvokeCapabilityResponse. + * Use `create(InvokeCapabilityResponseSchema)` to create a new message. */ -export const InvokeFunctionResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 1); +export const InvokeCapabilityResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 3); /** - * @generated from message quixos.orch.WatchFunctionRequest + * @generated from message quixos.orch.WatchCapabilityRequest */ -export type WatchFunctionRequest = Message<"quixos.orch.WatchFunctionRequest"> & { +export type WatchCapabilityRequest = Message<"quixos.orch.WatchCapabilityRequest"> & { /** - * @generated from field: quixos.FunctionRef function = 1; + * @generated from field: quixos.CapabilityRef capability = 1; */ - function?: FunctionRef | undefined; + capability?: CapabilityRef | undefined; /** * @generated from field: string object_id = 2; @@ -105,16 +144,16 @@ export type WatchFunctionRequest = Message<"quixos.orch.WatchFunctionRequest"> & }; /** - * Describes the message quixos.orch.WatchFunctionRequest. - * Use `create(WatchFunctionRequestSchema)` to create a new message. + * Describes the message quixos.orch.WatchCapabilityRequest. + * Use `create(WatchCapabilityRequestSchema)` to create a new message. */ -export const WatchFunctionRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 2); +export const WatchCapabilityRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 4); /** - * @generated from message quixos.orch.WatchFunctionEvent + * @generated from message quixos.orch.WatchCapabilityEvent */ -export type WatchFunctionEvent = Message<"quixos.orch.WatchFunctionEvent"> & { +export type WatchCapabilityEvent = Message<"quixos.orch.WatchCapabilityEvent"> & { /** * @generated from field: string invocation_id = 1; */ @@ -152,11 +191,51 @@ export type WatchFunctionEvent = Message<"quixos.orch.WatchFunctionEvent"> & { }; /** - * Describes the message quixos.orch.WatchFunctionEvent. - * Use `create(WatchFunctionEventSchema)` to create a new message. + * Describes the message quixos.orch.WatchCapabilityEvent. + * Use `create(WatchCapabilityEventSchema)` to create a new message. */ -export const WatchFunctionEventSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 3); +export const WatchCapabilityEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 5); + +/** + * @generated from message quixos.orch.GetWorkspaceRequest + */ +export type GetWorkspaceRequest = Message<"quixos.orch.GetWorkspaceRequest"> & { +}; + +/** + * Describes the message quixos.orch.GetWorkspaceRequest. + * Use `create(GetWorkspaceRequestSchema)` to create a new message. + */ +export const GetWorkspaceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 6); + +/** + * @generated from message quixos.orch.GetWorkspaceResponse + */ +export type GetWorkspaceResponse = Message<"quixos.orch.GetWorkspaceResponse"> & { + /** + * @generated from field: string workspace_id = 1; + */ + workspaceId: string; + + /** + * @generated from field: string workspace_revision_id = 2; + */ + workspaceRevisionId: string; + + /** + * @generated from field: string source_root_commit = 3; + */ + sourceRootCommit: string; +}; + +/** + * Describes the message quixos.orch.GetWorkspaceResponse. + * Use `create(GetWorkspaceResponseSchema)` to create a new message. + */ +export const GetWorkspaceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 7); /** * @generated from message quixos.orch.ListActivationsRequest @@ -169,7 +248,7 @@ export type ListActivationsRequest = Message<"quixos.orch.ListActivationsRequest * Use `create(ListActivationsRequestSchema)` to create a new message. */ export const ListActivationsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 4); + messageDesc(file_quixos_orch, 8); /** * @generated from message quixos.orch.ListPackageDescriptorsRequest @@ -182,7 +261,7 @@ export type ListPackageDescriptorsRequest = Message<"quixos.orch.ListPackageDesc * Use `create(ListPackageDescriptorsRequestSchema)` to create a new message. */ export const ListPackageDescriptorsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 5); + messageDesc(file_quixos_orch, 9); /** * @generated from message quixos.orch.ListPackageDescriptorsResponse @@ -199,7 +278,7 @@ export type ListPackageDescriptorsResponse = Message<"quixos.orch.ListPackageDes * Use `create(ListPackageDescriptorsResponseSchema)` to create a new message. */ export const ListPackageDescriptorsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 6); + messageDesc(file_quixos_orch, 10); /** * @generated from message quixos.orch.ListPackageRuntimesRequest @@ -212,7 +291,7 @@ export type ListPackageRuntimesRequest = Message<"quixos.orch.ListPackageRuntime * Use `create(ListPackageRuntimesRequestSchema)` to create a new message. */ export const ListPackageRuntimesRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 7); + messageDesc(file_quixos_orch, 11); /** * @generated from message quixos.orch.ListPackageRuntimesResponse @@ -229,7 +308,7 @@ export type ListPackageRuntimesResponse = Message<"quixos.orch.ListPackageRuntim * Use `create(ListPackageRuntimesResponseSchema)` to create a new message. */ export const ListPackageRuntimesResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 8); + messageDesc(file_quixos_orch, 12); /** * @generated from message quixos.orch.ListActivationsResponse @@ -246,7 +325,7 @@ export type ListActivationsResponse = Message<"quixos.orch.ListActivationsRespon * Use `create(ListActivationsResponseSchema)` to create a new message. */ export const ListActivationsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 9); + messageDesc(file_quixos_orch, 13); /** * @generated from message quixos.orch.CloseActivationRequest @@ -268,7 +347,7 @@ export type CloseActivationRequest = Message<"quixos.orch.CloseActivationRequest * Use `create(CloseActivationRequestSchema)` to create a new message. */ export const CloseActivationRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 10); + messageDesc(file_quixos_orch, 14); /** * @generated from message quixos.orch.CloseActivationResponse @@ -285,7 +364,7 @@ export type CloseActivationResponse = Message<"quixos.orch.CloseActivationRespon * Use `create(CloseActivationResponseSchema)` to create a new message. */ export const CloseActivationResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 11); + messageDesc(file_quixos_orch, 15); /** * @generated from message quixos.orch.Activation @@ -297,9 +376,9 @@ export type Activation = Message<"quixos.orch.Activation"> & { activationId: string; /** - * @generated from field: quixos.FunctionRef function = 2; + * @generated from field: quixos.PackageExportRef export = 2; */ - function?: FunctionRef | undefined; + export?: PackageExportRef | undefined; /** * @generated from field: string object_id = 3; @@ -347,7 +426,7 @@ export type Activation = Message<"quixos.orch.Activation"> & { * Use `create(ActivationSchema)` to create a new message. */ export const ActivationSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 12); + messageDesc(file_quixos_orch, 16); /** * @generated from message quixos.orch.PackageRuntimeStatus @@ -359,69 +438,59 @@ export type PackageRuntimeStatus = Message<"quixos.orch.PackageRuntimeStatus"> & runtimeKey: string; /** - * @generated from field: string package_namespace = 2; + * @generated from field: string package_revision_id = 2; */ - packageNamespace: string; + packageRevisionId: string; /** - * @generated from field: string package_name = 3; + * @generated from field: string source_repository = 3; */ - packageName: string; + sourceRepository: string; /** - * @generated from field: uint32 descriptor_version = 4; + * @generated from field: string source_commit = 4; */ - descriptorVersion: number; + sourceCommit: string; /** - * @generated from field: string source_repo = 5; + * @generated from field: string build_target = 5; */ - sourceRepo: string; + buildTarget: string; /** - * @generated from field: string server_installable = 6; - */ - serverInstallable: string; - - /** - * @generated from field: string source_path = 7; - */ - sourcePath: string; - - /** - * @generated from field: string server_path = 8; + * @generated from field: string server_path = 6; */ serverPath: string; /** - * @generated from field: uint32 pid = 9; + * @generated from field: uint32 pid = 7; */ pid: number; /** - * @generated from field: string state = 10; + * @generated from field: string state = 8; */ state: string; /** - * @generated from field: string started_at = 11; + * @generated from field: string started_at = 9; */ startedAt: string; /** - * @generated from field: string last_handshake_at = 12; + * @generated from field: string last_handshake_at = 10; */ lastHandshakeAt: string; /** - * @generated from field: string runtime_protocol_version = 13; + * @generated from field: string runtime_protocol_version = 11; */ runtimeProtocolVersion: string; /** - * @generated from field: uint32 advertised_function_count = 14; + * @generated from field: uint32 advertised_export_count = 12; */ - advertisedFunctionCount: number; + advertisedExportCount: number; }; /** @@ -429,27 +498,43 @@ export type PackageRuntimeStatus = Message<"quixos.orch.PackageRuntimeStatus"> & * Use `create(PackageRuntimeStatusSchema)` to create a new message. */ export const PackageRuntimeStatusSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 13); + messageDesc(file_quixos_orch, 17); /** * @generated from service quixos.orch.OrchestratorRuntime */ export const OrchestratorRuntime: GenService<{ /** - * @generated from rpc quixos.orch.OrchestratorRuntime.InvokeFunction + * @generated from rpc quixos.orch.OrchestratorRuntime.InvokeCapability */ - invokeFunction: { + invokeCapability: { methodKind: "unary"; - input: typeof InvokeFunctionRequestSchema; - output: typeof InvokeFunctionResponseSchema; + input: typeof InvokeCapabilityRequestSchema; + output: typeof InvokeCapabilityResponseSchema; }, /** - * @generated from rpc quixos.orch.OrchestratorRuntime.WatchFunction + * @generated from rpc quixos.orch.OrchestratorRuntime.WatchCapability */ - watchFunction: { + watchCapability: { methodKind: "server_streaming"; - input: typeof WatchFunctionRequestSchema; - output: typeof WatchFunctionEventSchema; + input: typeof WatchCapabilityRequestSchema; + output: typeof WatchCapabilityEventSchema; + }, + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.ConstructObject + */ + constructObject: { + methodKind: "unary"; + input: typeof ConstructObjectRequestSchema; + output: typeof ConstructObjectResponseSchema; + }, + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.GetWorkspace + */ + getWorkspace: { + methodKind: "unary"; + input: typeof GetWorkspaceRequestSchema; + output: typeof GetWorkspaceResponseSchema; }, /** * @generated from rpc quixos.orch.OrchestratorRuntime.ListPackageDescriptors diff --git a/src/gen/quixos/package_pb.ts b/src/gen/quixos/package_pb.ts index 08a348e..7c96df3 100644 --- a/src/gen/quixos/package_pb.ts +++ b/src/gen/quixos/package_pb.ts @@ -1,131 +1,40 @@ -// @generated by protoc-gen-es v2.12.1 with parameter "target=ts,import_extension=js" +// @generated by protoc-gen-es v2.14.1 with parameter "target=ts,import_extension=js" // @generated from file quixos/package.proto (package quixos, syntax proto3) /* eslint-disable */ -import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; -import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"; -import type { SymbolRef } from "../camino/schema_pb.js"; -import { file_camino_schema } from "../camino/schema_pb.js"; -import type { FunctionRef } from "./refs_pb.js"; -import { file_quixos_refs } from "./refs_pb.js"; +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"; import type { Message } from "@bufbuild/protobuf"; /** * Describes the file quixos/package.proto. */ export const file_quixos_package: GenFile = /*@__PURE__*/ - fileDesc("ChRxdWl4b3MvcGFja2FnZS5wcm90bxIGcXVpeG9zIm4KClBhY2thZ2VSZWYSGQoRcGFja2FnZV9uYW1lc3BhY2UYASABKAkSFAoMcGFja2FnZV9uYW1lGAIgASgJEhoKEmRlc2NyaXB0b3JfdmVyc2lvbhgDIAEoDRITCgt2ZXJzaW9uX3JlZhgEIAEoCSKgBAoRUGFja2FnZURlc2NyaXB0b3ISGQoRcGFja2FnZV9uYW1lc3BhY2UYASABKAkSFAoMcGFja2FnZV9uYW1lGAIgASgJEhoKEmRlc2NyaXB0b3JfdmVyc2lvbhgDIAEoDRIkChxpbnRlcmZhY2VfY29tcGF0aWJsZV9iYWNrX3RvGAQgASgNEiEKGXJ1bm5lcl9jb21wYXRpYmxlX2JhY2tfdG8YBSABKA0SEwoLc291cmNlX3JlcG8YBiABKAkSEgoKc291cmNlX3JlZhgHIAEoCRIbChNyZXNvbHZlZF9zb3VyY2VfcmVmGAggASgJEhoKEnNlcnZlcl9pbnN0YWxsYWJsZRgJIAEoCRIgChhydW50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GVfYmFja190bxgCIAEoDRIZChFyZWZhY3Rvcl9yZXF1aXJlZBgDIAEoCBIaChJjb21wYXRpYmlsaXR5X25vdGUYBCABKAkqggEKFkZ1bmN0aW9uQ2FwYWJpbGl0eUtpbmQSKAokRlVOQ1RJT05fQ0FQQUJJTElUWV9LSU5EX1VOU1BFQ0lGSUVEEAASCgoGTUVUSE9EEAESEgoORklFTERfUkVTT0xWRVIQAhINCglNSUdSQVRJT04QAxIPCgtDT05TVFJVQ1RPUhAEYgZwcm90bzM", [file_camino_schema, file_quixos_refs]); - -/** - * @generated from message quixos.PackageRef - */ -export type PackageRef = Message<"quixos.PackageRef"> & { - /** - * @generated from field: string package_namespace = 1; - */ - packageNamespace: string; - - /** - * @generated from field: string package_name = 2; - */ - packageName: string; - - /** - * @generated from field: uint32 descriptor_version = 3; - */ - descriptorVersion: number; - - /** - * @generated from field: string version_ref = 4; - */ - versionRef: string; -}; - -/** - * Describes the message quixos.PackageRef. - * Use `create(PackageRefSchema)` to create a new message. - */ -export const PackageRefSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_package, 0); + fileDesc("ChRxdWl4b3MvcGFja2FnZS5wcm90bxIGcXVpeG9zIo4BChFQYWNrYWdlRGVzY3JpcHRvchISCgpwYWNrYWdlX2lkGAEgASgJEhsKE3BhY2thZ2VfcmV2aXNpb25faWQYAiABKAkSIAoYcnVudGltZV9wcm90b2NvbF92ZXJzaW9uGAMgASgJEiYKB2V4cG9ydHMYBCADKAsyFS5xdWl4b3MuUnVudGltZUV4cG9ydCI6Cg1SdW50aW1lRXhwb3J0EhEKCWV4cG9ydF9pZBgBIAEoCRIWCg5ydW50aW1lX3N5bWJvbBgCIAEoCWIGcHJvdG8z"); /** * @generated from message quixos.PackageDescriptor */ export type PackageDescriptor = Message<"quixos.PackageDescriptor"> & { /** - * @generated from field: string package_namespace = 1; + * @generated from field: string package_id = 1; */ - packageNamespace: string; + packageId: string; /** - * @generated from field: string package_name = 2; + * @generated from field: string package_revision_id = 2; */ - packageName: string; + packageRevisionId: string; /** - * @generated from field: uint32 descriptor_version = 3; - */ - descriptorVersion: number; - - /** - * @generated from field: uint32 interface_compatible_back_to = 4; - */ - interfaceCompatibleBackTo: number; - - /** - * @generated from field: uint32 runner_compatible_back_to = 5; - */ - runnerCompatibleBackTo: number; - - /** - * @generated from field: string source_repo = 6; - */ - sourceRepo: string; - - /** - * @generated from field: string source_ref = 7; - */ - sourceRef: string; - - /** - * @generated from field: string resolved_source_ref = 8; - */ - resolvedSourceRef: string; - - /** - * @generated from field: string server_installable = 9; - */ - serverInstallable: string; - - /** - * @generated from field: string runtime_protocol_version = 10; + * @generated from field: string runtime_protocol_version = 3; */ runtimeProtocolVersion: string; /** - * @generated from field: repeated quixos.ClassExport class_exports = 11; + * @generated from field: repeated quixos.RuntimeExport exports = 4; */ - classExports: ClassExport[]; - - /** - * @generated from field: repeated quixos.FunctionExport function_exports = 12; - */ - functionExports: FunctionExport[]; - - /** - * @generated from field: repeated quixos.ComponentExport component_exports = 13; - */ - componentExports: ComponentExport[]; - - /** - * @generated from field: repeated quixos.SidecarExport sidecar_exports = 14; - */ - sidecarExports: SidecarExport[]; - - /** - * @generated from field: repeated quixos.PackageDependency dependencies = 15; - */ - dependencies: PackageDependency[]; + exports: RuntimeExport[]; }; /** @@ -133,186 +42,27 @@ export type PackageDescriptor = Message<"quixos.PackageDescriptor"> & { * Use `create(PackageDescriptorSchema)` to create a new message. */ export const PackageDescriptorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_package, 0); + +/** + * @generated from message quixos.RuntimeExport + */ +export type RuntimeExport = Message<"quixos.RuntimeExport"> & { + /** + * @generated from field: string export_id = 1; + */ + exportId: string; + + /** + * @generated from field: string runtime_symbol = 2; + */ + runtimeSymbol: string; +}; + +/** + * Describes the message quixos.RuntimeExport. + * Use `create(RuntimeExportSchema)` to create a new message. + */ +export const RuntimeExportSchema: GenMessage = /*@__PURE__*/ messageDesc(file_quixos_package, 1); -/** - * @generated from message quixos.ClassExport - */ -export type ClassExport = Message<"quixos.ClassExport"> & { - /** - * @generated from field: camino.SymbolRef class_id = 1; - */ - classId?: SymbolRef | undefined; - - /** - * @generated from field: string source_file = 2; - */ - sourceFile: string; -}; - -/** - * Describes the message quixos.ClassExport. - * Use `create(ClassExportSchema)` to create a new message. - */ -export const ClassExportSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_package, 2); - -/** - * @generated from message quixos.FunctionExport - */ -export type FunctionExport = Message<"quixos.FunctionExport"> & { - /** - * @generated from field: quixos.FunctionRef function = 1; - */ - function?: FunctionRef | undefined; - - /** - * @generated from field: string input_type = 2; - */ - inputType: string; - - /** - * @generated from field: string output_type = 3; - */ - outputType: string; - - /** - * @generated from field: uint32 interface_version = 4; - */ - interfaceVersion: number; - - /** - * @generated from field: uint32 interface_compatible_back_to = 5; - */ - interfaceCompatibleBackTo: number; - - /** - * @generated from field: quixos.FunctionCapabilityKind capability_kind = 6; - */ - capabilityKind: FunctionCapabilityKind; -}; - -/** - * Describes the message quixos.FunctionExport. - * Use `create(FunctionExportSchema)` to create a new message. - */ -export const FunctionExportSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_package, 3); - -/** - * @generated from message quixos.ComponentExport - */ -export type ComponentExport = Message<"quixos.ComponentExport"> & { - /** - * @generated from field: string symbol = 1; - */ - symbol: string; - - /** - * @generated from field: string props_type = 2; - */ - propsType: string; - - /** - * @generated from field: repeated camino.SymbolRef supported_classes = 3; - */ - supportedClasses: SymbolRef[]; -}; - -/** - * Describes the message quixos.ComponentExport. - * Use `create(ComponentExportSchema)` to create a new message. - */ -export const ComponentExportSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_package, 4); - -/** - * @generated from message quixos.SidecarExport - */ -export type SidecarExport = Message<"quixos.SidecarExport"> & { - /** - * @generated from field: string symbol = 1; - */ - symbol: string; - - /** - * @generated from field: string side_effect_mode = 2; - */ - sideEffectMode: string; -}; - -/** - * Describes the message quixos.SidecarExport. - * Use `create(SidecarExportSchema)` to create a new message. - */ -export const SidecarExportSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_package, 5); - -/** - * @generated from message quixos.PackageDependency - */ -export type PackageDependency = Message<"quixos.PackageDependency"> & { - /** - * @generated from field: quixos.PackageRef package = 1; - */ - package?: PackageRef | undefined; - - /** - * @generated from field: uint32 interface_compatible_back_to = 2; - */ - interfaceCompatibleBackTo: number; - - /** - * @generated from field: bool refactor_required = 3; - */ - refactorRequired: boolean; - - /** - * @generated from field: string compatibility_note = 4; - */ - compatibilityNote: string; -}; - -/** - * Describes the message quixos.PackageDependency. - * Use `create(PackageDependencySchema)` to create a new message. - */ -export const PackageDependencySchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_package, 6); - -/** - * @generated from enum quixos.FunctionCapabilityKind - */ -export enum FunctionCapabilityKind { - /** - * @generated from enum value: FUNCTION_CAPABILITY_KIND_UNSPECIFIED = 0; - */ - FUNCTION_CAPABILITY_KIND_UNSPECIFIED = 0, - - /** - * @generated from enum value: METHOD = 1; - */ - METHOD = 1, - - /** - * @generated from enum value: FIELD_RESOLVER = 2; - */ - FIELD_RESOLVER = 2, - - /** - * @generated from enum value: MIGRATION = 3; - */ - MIGRATION = 3, - - /** - * @generated from enum value: CONSTRUCTOR = 4; - */ - CONSTRUCTOR = 4, -} - -/** - * Describes the enum quixos.FunctionCapabilityKind. - */ -export const FunctionCapabilityKindSchema: GenEnum = /*@__PURE__*/ - enumDesc(file_quixos_package, 0); - diff --git a/src/gen/quixos/refs_pb.ts b/src/gen/quixos/refs_pb.ts index f320aa2..6e1e8a6 100644 --- a/src/gen/quixos/refs_pb.ts +++ b/src/gen/quixos/refs_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v2.12.1 with parameter "target=ts,import_extension=js" +// @generated by protoc-gen-es v2.14.1 with parameter "target=ts,import_extension=js" // @generated from file quixos/refs.proto (package quixos, syntax proto3) /* eslint-disable */ @@ -10,42 +10,117 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file quixos/refs.proto. */ export const file_quixos_refs: GenFile = /*@__PURE__*/ - fileDesc("ChFxdWl4b3MvcmVmcy5wcm90bxIGcXVpeG9zInYKC0Z1bmN0aW9uUmVmEhkKEXBhY2thZ2VfbmFtZXNwYWNlGAEgASgJEhQKDHBhY2thZ2VfbmFtZRgCIAEoCRIOCgZzeW1ib2wYAyABKAkSEwoLdmVyc2lvbl9yZWYYBCABKAkSEQoJb3BlcmF0aW9uGAUgASgJYgZwcm90bzM"); + fileDesc("ChFxdWl4b3MvcmVmcy5wcm90bxIGcXVpeG9zIkQKDUNhcGFiaWxpdHlSZWYSHQoVaW50ZXJmYWNlX3JldmlzaW9uX2lkGAEgASgJEhQKDG9wZXJhdGlvbl9pZBgCIAEoCSJCChBQYWNrYWdlRXhwb3J0UmVmEhsKE3BhY2thZ2VfcmV2aXNpb25faWQYASABKAkSEQoJZXhwb3J0X2lkGAIgASgJIroBChJJbmplY3RlZERlcGVuZGVuY3kSDwoHcG9ydF9pZBgBIAEoCRIXCg1zdGF0ZV9zbG90X2lkGAIgASgJSAASJgoEZWRnZRgDIAEoCzIWLnF1aXhvcy5FZGdlRGVwZW5kZW5jeUgAEigKHnJlY2VpdmVyX2ludGVyZmFjZV9yZXZpc2lvbl9pZBgEIAEoCUgAEh0KE2NvbnN0cnVjdG9yX2F0b21faWQYBSABKAlIAEIJCgdiaW5kaW5nIj0KDkVkZ2VEZXBlbmRlbmN5EhQKDGVkZ2VfdHlwZV9pZBgBIAEoCRIVCg1wcm9qZWN0aW9uX2lkGAIgASgJYgZwcm90bzM"); /** - * @generated from message quixos.FunctionRef + * @generated from message quixos.CapabilityRef */ -export type FunctionRef = Message<"quixos.FunctionRef"> & { +export type CapabilityRef = Message<"quixos.CapabilityRef"> & { /** - * @generated from field: string package_namespace = 1; + * @generated from field: string interface_revision_id = 1; */ - packageNamespace: string; + interfaceRevisionId: string; /** - * @generated from field: string package_name = 2; + * @generated from field: string operation_id = 2; */ - packageName: string; - - /** - * @generated from field: string symbol = 3; - */ - symbol: string; - - /** - * @generated from field: string version_ref = 4; - */ - versionRef: string; - - /** - * @generated from field: string operation = 5; - */ - operation: string; + operationId: string; }; /** - * Describes the message quixos.FunctionRef. - * Use `create(FunctionRefSchema)` to create a new message. + * Describes the message quixos.CapabilityRef. + * Use `create(CapabilityRefSchema)` to create a new message. */ -export const FunctionRefSchema: GenMessage = /*@__PURE__*/ +export const CapabilityRefSchema: GenMessage = /*@__PURE__*/ messageDesc(file_quixos_refs, 0); +/** + * @generated from message quixos.PackageExportRef + */ +export type PackageExportRef = Message<"quixos.PackageExportRef"> & { + /** + * @generated from field: string package_revision_id = 1; + */ + packageRevisionId: string; + + /** + * @generated from field: string export_id = 2; + */ + exportId: string; +}; + +/** + * Describes the message quixos.PackageExportRef. + * Use `create(PackageExportRefSchema)` to create a new message. + */ +export const PackageExportRefSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_refs, 1); + +/** + * @generated from message quixos.InjectedDependency + */ +export type InjectedDependency = Message<"quixos.InjectedDependency"> & { + /** + * @generated from field: string port_id = 1; + */ + portId: string; + + /** + * @generated from oneof quixos.InjectedDependency.binding + */ + binding: { + /** + * @generated from field: string state_slot_id = 2; + */ + value: string; + case: "stateSlotId"; + } | { + /** + * @generated from field: quixos.EdgeDependency edge = 3; + */ + value: EdgeDependency; + case: "edge"; + } | { + /** + * @generated from field: string receiver_interface_revision_id = 4; + */ + value: string; + case: "receiverInterfaceRevisionId"; + } | { + /** + * @generated from field: string constructor_atom_id = 5; + */ + value: string; + case: "constructorAtomId"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message quixos.InjectedDependency. + * Use `create(InjectedDependencySchema)` to create a new message. + */ +export const InjectedDependencySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_refs, 2); + +/** + * @generated from message quixos.EdgeDependency + */ +export type EdgeDependency = Message<"quixos.EdgeDependency"> & { + /** + * @generated from field: string edge_type_id = 1; + */ + edgeTypeId: string; + + /** + * @generated from field: string projection_id = 2; + */ + projectionId: string; +}; + +/** + * Describes the message quixos.EdgeDependency. + * Use `create(EdgeDependencySchema)` to create a new message. + */ +export const EdgeDependencySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_refs, 3); + diff --git a/src/gen/quixos/runtime_pb.ts b/src/gen/quixos/runtime_pb.ts index 6574d7d..82c9b05 100644 --- a/src/gen/quixos/runtime_pb.ts +++ b/src/gen/quixos/runtime_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v2.12.1 with parameter "target=ts,import_extension=js" +// @generated by protoc-gen-es v2.14.1 with parameter "target=ts,import_extension=js" // @generated from file quixos/runtime.proto (package quixos.runtime, syntax proto3) /* eslint-disable */ @@ -6,7 +6,7 @@ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegen import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; import type { Value } from "../camino/api_pb.js"; import { file_camino_api } from "../camino/api_pb.js"; -import type { FunctionRef } from "./refs_pb.js"; +import type { InjectedDependency, PackageExportRef } from "./refs_pb.js"; import { file_quixos_refs } from "./refs_pb.js"; import type { Message } from "@bufbuild/protobuf"; @@ -14,7 +14,7 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file quixos/runtime.proto. */ export const file_quixos_runtime: GenFile = /*@__PURE__*/ - fileDesc("ChRxdWl4b3MvcnVudGltZS5wcm90bxIOcXVpeG9zLnJ1bnRpbWUiMQoQSGFuZHNoYWtlUmVxdWVzdBIdChVvcmNoX3Byb3RvY29sX3ZlcnNpb24YASABKAkijgEKEUhhbmRzaGFrZVJlc3BvbnNlEhkKEXBhY2thZ2VfbmFtZXNwYWNlGAEgASgJEhQKDHBhY2thZ2VfbmFtZRgCIAEoCRIgChhydW50aW1lX3Byb3RvY29sX3ZlcnNpb24YAyABKAkSJgoJZnVuY3Rpb25zGAQgAygLMhMucXVpeG9zLkZ1bmN0aW9uUmVmItYBC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V4cG9ydBgCIAEoCzIYLnF1aXhvcy5QYWNrYWdlRXhwb3J0UmVmEhEKCW9iamVjdF9pZBgDIAEoCRI2CgVpbnB1dBgEIAMoCzInLnF1aXhvcy5ydW50aW1lLldhdGNoUmVxdWVzdC5JbnB1dEVudHJ5EjAKDGRlcGVuZGVuY2llcxgFIAMoCzIaLnF1aXhvcy5JbmplY3RlZERlcGVuZGVuY3kaOwoKSW5wdXRFbnRyeRILCgNrZXkYASABKAkSHAoFdmFsdWUYAiABKAsyDS5jYW1pbm8uVmFsdWU6AjgBImIKEURlcml2ZWREZXBlbmRlbmN5EgwKBGtpbmQYASABKAkSEQoJb2JqZWN0X2lkGAIgASgJEhUKDWF0dGFjaG1lbnRfaWQYAyABKAkSFQoNcHJvamVjdGlvbl9pZBgEIAEoCSKVAQoKV2F0Y2hFdmVudBIQCgh3YXRjaF9pZBgBIAEoCRIcCgV2YWx1ZRgCIAEoCzINLmNhbWluby5WYWx1ZRI3CgxkZXBlbmRlbmNpZXMYAyADKAsyIS5xdWl4b3MucnVudGltZS5EZXJpdmVkRGVwZW5kZW5jeRINCgVlcnJvchgEIAEoCRIPCgdpbml0aWFsGAUgASgIMvABCg5QYWNrYWdlUnVudGltZRJQCglIYW5kc2hha2USIC5xdWl4b3MucnVudGltZS5IYW5kc2hha2VSZXF1ZXN0GiEucXVpeG9zLnJ1bnRpbWUuSGFuZHNoYWtlUmVzcG9uc2USRwoGSW52b2tlEh0ucXVpeG9zLnJ1bnRpbWUuSW52b2tlUmVxdWVzdBoeLnF1aXhvcy5ydW50aW1lLkludm9rZVJlc3BvbnNlEkMKBVdhdGNoEhwucXVpeG9zLnJ1bnRpbWUuV2F0Y2hSZXF1ZXN0GhoucXVpeG9zLnJ1bnRpbWUuV2F0Y2hFdmVudDABYgZwcm90bzM", [file_camino_api, file_quixos_refs]); /** * @generated from message quixos.runtime.HandshakeRequest @@ -38,24 +38,19 @@ export const HandshakeRequestSchema: GenMessage = /*@__PURE__* */ export type HandshakeResponse = Message<"quixos.runtime.HandshakeResponse"> & { /** - * @generated from field: string package_namespace = 1; + * @generated from field: string package_revision_id = 1; */ - packageNamespace: string; + packageRevisionId: string; /** - * @generated from field: string package_name = 2; - */ - packageName: string; - - /** - * @generated from field: string runtime_protocol_version = 3; + * @generated from field: string runtime_protocol_version = 2; */ runtimeProtocolVersion: string; /** - * @generated from field: repeated quixos.FunctionRef functions = 4; + * @generated from field: repeated string export_ids = 3; */ - functions: FunctionRef[]; + exportIds: string[]; }; /** @@ -75,9 +70,9 @@ export type InvokeRequest = Message<"quixos.runtime.InvokeRequest"> & { invocationId: string; /** - * @generated from field: quixos.FunctionRef function = 2; + * @generated from field: quixos.PackageExportRef export = 2; */ - function?: FunctionRef | undefined; + export?: PackageExportRef | undefined; /** * @generated from field: string object_id = 3; @@ -88,6 +83,11 @@ export type InvokeRequest = Message<"quixos.runtime.InvokeRequest"> & { * @generated from field: map input = 4; */ input: { [key: string]: Value }; + + /** + * @generated from field: repeated quixos.InjectedDependency dependencies = 5; + */ + dependencies: InjectedDependency[]; }; /** @@ -134,9 +134,9 @@ export type WatchRequest = Message<"quixos.runtime.WatchRequest"> & { invocationId: string; /** - * @generated from field: quixos.FunctionRef function = 2; + * @generated from field: quixos.PackageExportRef export = 2; */ - function?: FunctionRef | undefined; + export?: PackageExportRef | undefined; /** * @generated from field: string object_id = 3; @@ -147,6 +147,11 @@ export type WatchRequest = Message<"quixos.runtime.WatchRequest"> & { * @generated from field: map input = 4; */ input: { [key: string]: Value }; + + /** + * @generated from field: repeated quixos.InjectedDependency dependencies = 5; + */ + dependencies: InjectedDependency[]; }; /** @@ -171,14 +176,14 @@ export type DerivedDependency = Message<"quixos.runtime.DerivedDependency"> & { objectId: string; /** - * @generated from field: string field_name = 3; + * @generated from field: string attachment_id = 3; */ - fieldName: string; + attachmentId: string; /** - * @generated from field: string source_field = 4; + * @generated from field: string projection_id = 4; */ - sourceField: string; + projectionId: string; }; /** diff --git a/src/resource-lock/cli.ts b/src/resource-lock/cli.ts new file mode 100644 index 0000000..3c816d4 --- /dev/null +++ b/src/resource-lock/cli.ts @@ -0,0 +1,20 @@ +#!/usr/bin/env node +import { readFile } from "node:fs/promises"; +import { parseQuixosLock } from "./parser.js"; + +const fileName = process.argv[2]; +if (!fileName || process.argv.length !== 3) { + console.error("Usage: quixos-lock-check "); + process.exit(2); +} + +const result = parseQuixosLock(await readFile(fileName, "utf8"), fileName); +if (!result.ok) { + for (const diagnostic of result.diagnostics) { + console.error( + `${diagnostic.fileName}:${diagnostic.line}:${diagnostic.column + 1}: ${diagnostic.phase}/${diagnostic.code}: ${diagnostic.message}`, + ); + } + process.exit(1); +} +console.log(JSON.stringify(result.lock, null, 2)); diff --git a/src/resource-lock/generated/QuixosLock.interp b/src/resource-lock/generated/QuixosLock.interp new file mode 100644 index 0000000..0c14731 --- /dev/null +++ b/src/resource-lock/generated/QuixosLock.interp @@ -0,0 +1,52 @@ +token literal names: +null +'quixos-lock' +'version' +'quixos' +'source' +'interface' +'package' +'repository' +'commit' +'{' +'}' +';' +null +null +null +null +null +null + +token symbolic names: +null +QUIXOS_LOCK +VERSION +QUIXOS +SOURCE +INTERFACE +PACKAGE +REPOSITORY +COMMIT +LBRACE +RBRACE +SEMI +INTEGER +IDENTIFIER +STRING_LITERAL +LINE_COMMENT +BLOCK_COMMENT +WS + +rule names: +document +quixosEntry +resourceEntry +resourceKind +sourceBlock +identifier +stringLiteral + + +atn: +[4, 1, 17, 53, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 21, 8, 0, 10, 0, 12, 0, 24, 9, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 0, 0, 7, 0, 2, 4, 6, 8, 10, 12, 0, 1, 1, 0, 5, 6, 46, 0, 14, 1, 0, 0, 0, 2, 28, 1, 0, 0, 0, 4, 32, 1, 0, 0, 0, 6, 37, 1, 0, 0, 0, 8, 39, 1, 0, 0, 0, 10, 48, 1, 0, 0, 0, 12, 50, 1, 0, 0, 0, 14, 15, 5, 1, 0, 0, 15, 16, 5, 2, 0, 0, 16, 17, 5, 12, 0, 0, 17, 18, 5, 9, 0, 0, 18, 22, 3, 2, 1, 0, 19, 21, 3, 4, 2, 0, 20, 19, 1, 0, 0, 0, 21, 24, 1, 0, 0, 0, 22, 20, 1, 0, 0, 0, 22, 23, 1, 0, 0, 0, 23, 25, 1, 0, 0, 0, 24, 22, 1, 0, 0, 0, 25, 26, 5, 10, 0, 0, 26, 27, 5, 0, 0, 1, 27, 1, 1, 0, 0, 0, 28, 29, 5, 3, 0, 0, 29, 30, 5, 4, 0, 0, 30, 31, 3, 8, 4, 0, 31, 3, 1, 0, 0, 0, 32, 33, 3, 6, 3, 0, 33, 34, 3, 10, 5, 0, 34, 35, 5, 4, 0, 0, 35, 36, 3, 8, 4, 0, 36, 5, 1, 0, 0, 0, 37, 38, 7, 0, 0, 0, 38, 7, 1, 0, 0, 0, 39, 40, 5, 9, 0, 0, 40, 41, 5, 7, 0, 0, 41, 42, 3, 12, 6, 0, 42, 43, 5, 11, 0, 0, 43, 44, 5, 8, 0, 0, 44, 45, 3, 12, 6, 0, 45, 46, 5, 11, 0, 0, 46, 47, 5, 10, 0, 0, 47, 9, 1, 0, 0, 0, 48, 49, 5, 13, 0, 0, 49, 11, 1, 0, 0, 0, 50, 51, 5, 14, 0, 0, 51, 13, 1, 0, 0, 0, 1, 22] \ No newline at end of file diff --git a/src/resource-lock/generated/QuixosLock.tokens b/src/resource-lock/generated/QuixosLock.tokens new file mode 100644 index 0000000..cdb2ae8 --- /dev/null +++ b/src/resource-lock/generated/QuixosLock.tokens @@ -0,0 +1,28 @@ +QUIXOS_LOCK=1 +VERSION=2 +QUIXOS=3 +SOURCE=4 +INTERFACE=5 +PACKAGE=6 +REPOSITORY=7 +COMMIT=8 +LBRACE=9 +RBRACE=10 +SEMI=11 +INTEGER=12 +IDENTIFIER=13 +STRING_LITERAL=14 +LINE_COMMENT=15 +BLOCK_COMMENT=16 +WS=17 +'quixos-lock'=1 +'version'=2 +'quixos'=3 +'source'=4 +'interface'=5 +'package'=6 +'repository'=7 +'commit'=8 +'{'=9 +'}'=10 +';'=11 diff --git a/src/resource-lock/generated/QuixosLockLexer.interp b/src/resource-lock/generated/QuixosLockLexer.interp new file mode 100644 index 0000000..2616f7f --- /dev/null +++ b/src/resource-lock/generated/QuixosLockLexer.interp @@ -0,0 +1,70 @@ +token literal names: +null +'quixos-lock' +'version' +'quixos' +'source' +'interface' +'package' +'repository' +'commit' +'{' +'}' +';' +null +null +null +null +null +null + +token symbolic names: +null +QUIXOS_LOCK +VERSION +QUIXOS +SOURCE +INTERFACE +PACKAGE +REPOSITORY +COMMIT +LBRACE +RBRACE +SEMI +INTEGER +IDENTIFIER +STRING_LITERAL +LINE_COMMENT +BLOCK_COMMENT +WS + +rule names: +QUIXOS_LOCK +VERSION +QUIXOS +SOURCE +INTERFACE +PACKAGE +REPOSITORY +COMMIT +LBRACE +RBRACE +SEMI +INTEGER +IDENTIFIER +STRING_LITERAL +ESC +HEX +LINE_COMMENT +BLOCK_COMMENT +WS + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[4, 0, 17, 181, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 4, 11, 117, 8, 11, 11, 11, 12, 11, 118, 1, 12, 1, 12, 5, 12, 123, 8, 12, 10, 12, 12, 12, 126, 9, 12, 1, 13, 1, 13, 1, 13, 5, 13, 131, 8, 13, 10, 13, 12, 13, 134, 9, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 146, 8, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 5, 16, 154, 8, 16, 10, 16, 12, 16, 157, 9, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 5, 17, 165, 8, 17, 10, 17, 12, 17, 168, 9, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 4, 18, 176, 8, 18, 11, 18, 12, 18, 177, 1, 18, 1, 18, 1, 166, 0, 19, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 0, 31, 0, 33, 15, 35, 16, 37, 17, 1, 0, 8, 1, 0, 48, 57, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 8, 0, 34, 34, 47, 47, 92, 92, 98, 98, 102, 102, 110, 110, 114, 114, 116, 116, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, 32, 186, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 1, 39, 1, 0, 0, 0, 3, 51, 1, 0, 0, 0, 5, 59, 1, 0, 0, 0, 7, 66, 1, 0, 0, 0, 9, 73, 1, 0, 0, 0, 11, 83, 1, 0, 0, 0, 13, 91, 1, 0, 0, 0, 15, 102, 1, 0, 0, 0, 17, 109, 1, 0, 0, 0, 19, 111, 1, 0, 0, 0, 21, 113, 1, 0, 0, 0, 23, 116, 1, 0, 0, 0, 25, 120, 1, 0, 0, 0, 27, 127, 1, 0, 0, 0, 29, 137, 1, 0, 0, 0, 31, 147, 1, 0, 0, 0, 33, 149, 1, 0, 0, 0, 35, 160, 1, 0, 0, 0, 37, 175, 1, 0, 0, 0, 39, 40, 5, 113, 0, 0, 40, 41, 5, 117, 0, 0, 41, 42, 5, 105, 0, 0, 42, 43, 5, 120, 0, 0, 43, 44, 5, 111, 0, 0, 44, 45, 5, 115, 0, 0, 45, 46, 5, 45, 0, 0, 46, 47, 5, 108, 0, 0, 47, 48, 5, 111, 0, 0, 48, 49, 5, 99, 0, 0, 49, 50, 5, 107, 0, 0, 50, 2, 1, 0, 0, 0, 51, 52, 5, 118, 0, 0, 52, 53, 5, 101, 0, 0, 53, 54, 5, 114, 0, 0, 54, 55, 5, 115, 0, 0, 55, 56, 5, 105, 0, 0, 56, 57, 5, 111, 0, 0, 57, 58, 5, 110, 0, 0, 58, 4, 1, 0, 0, 0, 59, 60, 5, 113, 0, 0, 60, 61, 5, 117, 0, 0, 61, 62, 5, 105, 0, 0, 62, 63, 5, 120, 0, 0, 63, 64, 5, 111, 0, 0, 64, 65, 5, 115, 0, 0, 65, 6, 1, 0, 0, 0, 66, 67, 5, 115, 0, 0, 67, 68, 5, 111, 0, 0, 68, 69, 5, 117, 0, 0, 69, 70, 5, 114, 0, 0, 70, 71, 5, 99, 0, 0, 71, 72, 5, 101, 0, 0, 72, 8, 1, 0, 0, 0, 73, 74, 5, 105, 0, 0, 74, 75, 5, 110, 0, 0, 75, 76, 5, 116, 0, 0, 76, 77, 5, 101, 0, 0, 77, 78, 5, 114, 0, 0, 78, 79, 5, 102, 0, 0, 79, 80, 5, 97, 0, 0, 80, 81, 5, 99, 0, 0, 81, 82, 5, 101, 0, 0, 82, 10, 1, 0, 0, 0, 83, 84, 5, 112, 0, 0, 84, 85, 5, 97, 0, 0, 85, 86, 5, 99, 0, 0, 86, 87, 5, 107, 0, 0, 87, 88, 5, 97, 0, 0, 88, 89, 5, 103, 0, 0, 89, 90, 5, 101, 0, 0, 90, 12, 1, 0, 0, 0, 91, 92, 5, 114, 0, 0, 92, 93, 5, 101, 0, 0, 93, 94, 5, 112, 0, 0, 94, 95, 5, 111, 0, 0, 95, 96, 5, 115, 0, 0, 96, 97, 5, 105, 0, 0, 97, 98, 5, 116, 0, 0, 98, 99, 5, 111, 0, 0, 99, 100, 5, 114, 0, 0, 100, 101, 5, 121, 0, 0, 101, 14, 1, 0, 0, 0, 102, 103, 5, 99, 0, 0, 103, 104, 5, 111, 0, 0, 104, 105, 5, 109, 0, 0, 105, 106, 5, 109, 0, 0, 106, 107, 5, 105, 0, 0, 107, 108, 5, 116, 0, 0, 108, 16, 1, 0, 0, 0, 109, 110, 5, 123, 0, 0, 110, 18, 1, 0, 0, 0, 111, 112, 5, 125, 0, 0, 112, 20, 1, 0, 0, 0, 113, 114, 5, 59, 0, 0, 114, 22, 1, 0, 0, 0, 115, 117, 7, 0, 0, 0, 116, 115, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 116, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 24, 1, 0, 0, 0, 120, 124, 7, 1, 0, 0, 121, 123, 7, 2, 0, 0, 122, 121, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 26, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 127, 132, 5, 34, 0, 0, 128, 131, 3, 29, 14, 0, 129, 131, 8, 3, 0, 0, 130, 128, 1, 0, 0, 0, 130, 129, 1, 0, 0, 0, 131, 134, 1, 0, 0, 0, 132, 130, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133, 135, 1, 0, 0, 0, 134, 132, 1, 0, 0, 0, 135, 136, 5, 34, 0, 0, 136, 28, 1, 0, 0, 0, 137, 145, 5, 92, 0, 0, 138, 146, 7, 4, 0, 0, 139, 140, 5, 117, 0, 0, 140, 141, 3, 31, 15, 0, 141, 142, 3, 31, 15, 0, 142, 143, 3, 31, 15, 0, 143, 144, 3, 31, 15, 0, 144, 146, 1, 0, 0, 0, 145, 138, 1, 0, 0, 0, 145, 139, 1, 0, 0, 0, 146, 30, 1, 0, 0, 0, 147, 148, 7, 5, 0, 0, 148, 32, 1, 0, 0, 0, 149, 150, 5, 47, 0, 0, 150, 151, 5, 47, 0, 0, 151, 155, 1, 0, 0, 0, 152, 154, 8, 6, 0, 0, 153, 152, 1, 0, 0, 0, 154, 157, 1, 0, 0, 0, 155, 153, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 158, 1, 0, 0, 0, 157, 155, 1, 0, 0, 0, 158, 159, 6, 16, 0, 0, 159, 34, 1, 0, 0, 0, 160, 161, 5, 47, 0, 0, 161, 162, 5, 42, 0, 0, 162, 166, 1, 0, 0, 0, 163, 165, 9, 0, 0, 0, 164, 163, 1, 0, 0, 0, 165, 168, 1, 0, 0, 0, 166, 167, 1, 0, 0, 0, 166, 164, 1, 0, 0, 0, 167, 169, 1, 0, 0, 0, 168, 166, 1, 0, 0, 0, 169, 170, 5, 42, 0, 0, 170, 171, 5, 47, 0, 0, 171, 172, 1, 0, 0, 0, 172, 173, 6, 17, 0, 0, 173, 36, 1, 0, 0, 0, 174, 176, 7, 7, 0, 0, 175, 174, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 175, 1, 0, 0, 0, 177, 178, 1, 0, 0, 0, 178, 179, 1, 0, 0, 0, 179, 180, 6, 18, 0, 0, 180, 38, 1, 0, 0, 0, 9, 0, 118, 124, 130, 132, 145, 155, 166, 177, 1, 6, 0, 0] \ No newline at end of file diff --git a/src/resource-lock/generated/QuixosLockLexer.tokens b/src/resource-lock/generated/QuixosLockLexer.tokens new file mode 100644 index 0000000..cdb2ae8 --- /dev/null +++ b/src/resource-lock/generated/QuixosLockLexer.tokens @@ -0,0 +1,28 @@ +QUIXOS_LOCK=1 +VERSION=2 +QUIXOS=3 +SOURCE=4 +INTERFACE=5 +PACKAGE=6 +REPOSITORY=7 +COMMIT=8 +LBRACE=9 +RBRACE=10 +SEMI=11 +INTEGER=12 +IDENTIFIER=13 +STRING_LITERAL=14 +LINE_COMMENT=15 +BLOCK_COMMENT=16 +WS=17 +'quixos-lock'=1 +'version'=2 +'quixos'=3 +'source'=4 +'interface'=5 +'package'=6 +'repository'=7 +'commit'=8 +'{'=9 +'}'=10 +';'=11 diff --git a/src/resource-lock/generated/QuixosLockLexer.ts b/src/resource-lock/generated/QuixosLockLexer.ts new file mode 100644 index 0000000..6d007bf --- /dev/null +++ b/src/resource-lock/generated/QuixosLockLexer.ts @@ -0,0 +1,155 @@ + +import * as antlr from "antlr4ng"; +import { Token } from "antlr4ng"; + + +export class QuixosLockLexer extends antlr.Lexer { + public static readonly QUIXOS_LOCK = 1; + public static readonly VERSION = 2; + public static readonly QUIXOS = 3; + public static readonly SOURCE = 4; + public static readonly INTERFACE = 5; + public static readonly PACKAGE = 6; + public static readonly REPOSITORY = 7; + public static readonly COMMIT = 8; + public static readonly LBRACE = 9; + public static readonly RBRACE = 10; + public static readonly SEMI = 11; + public static readonly INTEGER = 12; + public static readonly IDENTIFIER = 13; + public static readonly STRING_LITERAL = 14; + public static readonly LINE_COMMENT = 15; + public static readonly BLOCK_COMMENT = 16; + public static readonly WS = 17; + + public static readonly channelNames = [ + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + ]; + + public static readonly literalNames = [ + null, "'quixos-lock'", "'version'", "'quixos'", "'source'", "'interface'", + "'package'", "'repository'", "'commit'", "'{'", "'}'", "';'" + ]; + + public static readonly symbolicNames = [ + null, "QUIXOS_LOCK", "VERSION", "QUIXOS", "SOURCE", "INTERFACE", + "PACKAGE", "REPOSITORY", "COMMIT", "LBRACE", "RBRACE", "SEMI", "INTEGER", + "IDENTIFIER", "STRING_LITERAL", "LINE_COMMENT", "BLOCK_COMMENT", + "WS" + ]; + + public static readonly modeNames = [ + "DEFAULT_MODE", + ]; + + public static readonly ruleNames = [ + "QUIXOS_LOCK", "VERSION", "QUIXOS", "SOURCE", "INTERFACE", "PACKAGE", + "REPOSITORY", "COMMIT", "LBRACE", "RBRACE", "SEMI", "INTEGER", "IDENTIFIER", + "STRING_LITERAL", "ESC", "HEX", "LINE_COMMENT", "BLOCK_COMMENT", + "WS", + ]; + + + public constructor(input: antlr.CharStream) { + super(input); + this.interpreter = new antlr.LexerATNSimulator(this, QuixosLockLexer._ATN, QuixosLockLexer.decisionsToDFA, new antlr.PredictionContextCache()); + } + + public get grammarFileName(): string { return "QuixosLock.g4"; } + + public get literalNames(): (string | null)[] { return QuixosLockLexer.literalNames; } + public get symbolicNames(): (string | null)[] { return QuixosLockLexer.symbolicNames; } + public get ruleNames(): string[] { return QuixosLockLexer.ruleNames; } + + public get serializedATN(): number[] { return QuixosLockLexer._serializedATN; } + + public get channelNames(): string[] { return QuixosLockLexer.channelNames; } + + public get modeNames(): string[] { return QuixosLockLexer.modeNames; } + + public static readonly _serializedATN: number[] = [ + 4,0,17,181,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5, + 2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2, + 13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,1,0,1, + 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1, + 3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1, + 5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1, + 7,1,7,1,7,1,7,1,7,1,8,1,8,1,9,1,9,1,10,1,10,1,11,4,11,117,8,11,11, + 11,12,11,118,1,12,1,12,5,12,123,8,12,10,12,12,12,126,9,12,1,13,1, + 13,1,13,5,13,131,8,13,10,13,12,13,134,9,13,1,13,1,13,1,14,1,14,1, + 14,1,14,1,14,1,14,1,14,1,14,3,14,146,8,14,1,15,1,15,1,16,1,16,1, + 16,1,16,5,16,154,8,16,10,16,12,16,157,9,16,1,16,1,16,1,17,1,17,1, + 17,1,17,5,17,165,8,17,10,17,12,17,168,9,17,1,17,1,17,1,17,1,17,1, + 17,1,18,4,18,176,8,18,11,18,12,18,177,1,18,1,18,1,166,0,19,1,1,3, + 2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14, + 29,0,31,0,33,15,35,16,37,17,1,0,8,1,0,48,57,3,0,65,90,95,95,97,122, + 4,0,48,57,65,90,95,95,97,122,4,0,10,10,13,13,34,34,92,92,8,0,34, + 34,47,47,92,92,98,98,102,102,110,110,114,114,116,116,3,0,48,57,65, + 70,97,102,2,0,10,10,13,13,3,0,9,10,13,13,32,32,186,0,1,1,0,0,0,0, + 3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13, + 1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23, + 1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37, + 1,0,0,0,1,39,1,0,0,0,3,51,1,0,0,0,5,59,1,0,0,0,7,66,1,0,0,0,9,73, + 1,0,0,0,11,83,1,0,0,0,13,91,1,0,0,0,15,102,1,0,0,0,17,109,1,0,0, + 0,19,111,1,0,0,0,21,113,1,0,0,0,23,116,1,0,0,0,25,120,1,0,0,0,27, + 127,1,0,0,0,29,137,1,0,0,0,31,147,1,0,0,0,33,149,1,0,0,0,35,160, + 1,0,0,0,37,175,1,0,0,0,39,40,5,113,0,0,40,41,5,117,0,0,41,42,5,105, + 0,0,42,43,5,120,0,0,43,44,5,111,0,0,44,45,5,115,0,0,45,46,5,45,0, + 0,46,47,5,108,0,0,47,48,5,111,0,0,48,49,5,99,0,0,49,50,5,107,0,0, + 50,2,1,0,0,0,51,52,5,118,0,0,52,53,5,101,0,0,53,54,5,114,0,0,54, + 55,5,115,0,0,55,56,5,105,0,0,56,57,5,111,0,0,57,58,5,110,0,0,58, + 4,1,0,0,0,59,60,5,113,0,0,60,61,5,117,0,0,61,62,5,105,0,0,62,63, + 5,120,0,0,63,64,5,111,0,0,64,65,5,115,0,0,65,6,1,0,0,0,66,67,5,115, + 0,0,67,68,5,111,0,0,68,69,5,117,0,0,69,70,5,114,0,0,70,71,5,99,0, + 0,71,72,5,101,0,0,72,8,1,0,0,0,73,74,5,105,0,0,74,75,5,110,0,0,75, + 76,5,116,0,0,76,77,5,101,0,0,77,78,5,114,0,0,78,79,5,102,0,0,79, + 80,5,97,0,0,80,81,5,99,0,0,81,82,5,101,0,0,82,10,1,0,0,0,83,84,5, + 112,0,0,84,85,5,97,0,0,85,86,5,99,0,0,86,87,5,107,0,0,87,88,5,97, + 0,0,88,89,5,103,0,0,89,90,5,101,0,0,90,12,1,0,0,0,91,92,5,114,0, + 0,92,93,5,101,0,0,93,94,5,112,0,0,94,95,5,111,0,0,95,96,5,115,0, + 0,96,97,5,105,0,0,97,98,5,116,0,0,98,99,5,111,0,0,99,100,5,114,0, + 0,100,101,5,121,0,0,101,14,1,0,0,0,102,103,5,99,0,0,103,104,5,111, + 0,0,104,105,5,109,0,0,105,106,5,109,0,0,106,107,5,105,0,0,107,108, + 5,116,0,0,108,16,1,0,0,0,109,110,5,123,0,0,110,18,1,0,0,0,111,112, + 5,125,0,0,112,20,1,0,0,0,113,114,5,59,0,0,114,22,1,0,0,0,115,117, + 7,0,0,0,116,115,1,0,0,0,117,118,1,0,0,0,118,116,1,0,0,0,118,119, + 1,0,0,0,119,24,1,0,0,0,120,124,7,1,0,0,121,123,7,2,0,0,122,121,1, + 0,0,0,123,126,1,0,0,0,124,122,1,0,0,0,124,125,1,0,0,0,125,26,1,0, + 0,0,126,124,1,0,0,0,127,132,5,34,0,0,128,131,3,29,14,0,129,131,8, + 3,0,0,130,128,1,0,0,0,130,129,1,0,0,0,131,134,1,0,0,0,132,130,1, + 0,0,0,132,133,1,0,0,0,133,135,1,0,0,0,134,132,1,0,0,0,135,136,5, + 34,0,0,136,28,1,0,0,0,137,145,5,92,0,0,138,146,7,4,0,0,139,140,5, + 117,0,0,140,141,3,31,15,0,141,142,3,31,15,0,142,143,3,31,15,0,143, + 144,3,31,15,0,144,146,1,0,0,0,145,138,1,0,0,0,145,139,1,0,0,0,146, + 30,1,0,0,0,147,148,7,5,0,0,148,32,1,0,0,0,149,150,5,47,0,0,150,151, + 5,47,0,0,151,155,1,0,0,0,152,154,8,6,0,0,153,152,1,0,0,0,154,157, + 1,0,0,0,155,153,1,0,0,0,155,156,1,0,0,0,156,158,1,0,0,0,157,155, + 1,0,0,0,158,159,6,16,0,0,159,34,1,0,0,0,160,161,5,47,0,0,161,162, + 5,42,0,0,162,166,1,0,0,0,163,165,9,0,0,0,164,163,1,0,0,0,165,168, + 1,0,0,0,166,167,1,0,0,0,166,164,1,0,0,0,167,169,1,0,0,0,168,166, + 1,0,0,0,169,170,5,42,0,0,170,171,5,47,0,0,171,172,1,0,0,0,172,173, + 6,17,0,0,173,36,1,0,0,0,174,176,7,7,0,0,175,174,1,0,0,0,176,177, + 1,0,0,0,177,175,1,0,0,0,177,178,1,0,0,0,178,179,1,0,0,0,179,180, + 6,18,0,0,180,38,1,0,0,0,9,0,118,124,130,132,145,155,166,177,1,6, + 0,0 + ]; + + private static __ATN: antlr.ATN; + public static get _ATN(): antlr.ATN { + if (!QuixosLockLexer.__ATN) { + QuixosLockLexer.__ATN = new antlr.ATNDeserializer().deserialize(QuixosLockLexer._serializedATN); + } + + return QuixosLockLexer.__ATN; + } + + + private static readonly vocabulary = new antlr.Vocabulary(QuixosLockLexer.literalNames, QuixosLockLexer.symbolicNames, []); + + public override get vocabulary(): antlr.Vocabulary { + return QuixosLockLexer.vocabulary; + } + + private static readonly decisionsToDFA = QuixosLockLexer._ATN.decisionToState.map( (ds: antlr.DecisionState, index: number) => new antlr.DFA(ds, index) ); +} \ No newline at end of file diff --git a/src/resource-lock/generated/QuixosLockParser.ts b/src/resource-lock/generated/QuixosLockParser.ts new file mode 100644 index 0000000..ada6180 --- /dev/null +++ b/src/resource-lock/generated/QuixosLockParser.ts @@ -0,0 +1,535 @@ + +import * as antlr from "antlr4ng"; +import { Token } from "antlr4ng"; + +import { QuixosLockVisitor } from "./QuixosLockVisitor.js"; + +// for running tests with parameters, TODO: discuss strategy for typed parameters in CI +// eslint-disable-next-line no-unused-vars +type int = number; + + +export class QuixosLockParser extends antlr.Parser { + public static readonly QUIXOS_LOCK = 1; + public static readonly VERSION = 2; + public static readonly QUIXOS = 3; + public static readonly SOURCE = 4; + public static readonly INTERFACE = 5; + public static readonly PACKAGE = 6; + public static readonly REPOSITORY = 7; + public static readonly COMMIT = 8; + public static readonly LBRACE = 9; + public static readonly RBRACE = 10; + public static readonly SEMI = 11; + public static readonly INTEGER = 12; + public static readonly IDENTIFIER = 13; + public static readonly STRING_LITERAL = 14; + public static readonly LINE_COMMENT = 15; + public static readonly BLOCK_COMMENT = 16; + public static readonly WS = 17; + public static readonly RULE_document = 0; + public static readonly RULE_quixosEntry = 1; + public static readonly RULE_resourceEntry = 2; + public static readonly RULE_resourceKind = 3; + public static readonly RULE_sourceBlock = 4; + public static readonly RULE_identifier = 5; + public static readonly RULE_stringLiteral = 6; + + public static readonly literalNames = [ + null, "'quixos-lock'", "'version'", "'quixos'", "'source'", "'interface'", + "'package'", "'repository'", "'commit'", "'{'", "'}'", "';'" + ]; + + public static readonly symbolicNames = [ + null, "QUIXOS_LOCK", "VERSION", "QUIXOS", "SOURCE", "INTERFACE", + "PACKAGE", "REPOSITORY", "COMMIT", "LBRACE", "RBRACE", "SEMI", "INTEGER", + "IDENTIFIER", "STRING_LITERAL", "LINE_COMMENT", "BLOCK_COMMENT", + "WS" + ]; + public static readonly ruleNames = [ + "document", "quixosEntry", "resourceEntry", "resourceKind", "sourceBlock", + "identifier", "stringLiteral", + ]; + + public get grammarFileName(): string { return "QuixosLock.g4"; } + public get literalNames(): (string | null)[] { return QuixosLockParser.literalNames; } + public get symbolicNames(): (string | null)[] { return QuixosLockParser.symbolicNames; } + public get ruleNames(): string[] { return QuixosLockParser.ruleNames; } + public get serializedATN(): number[] { return QuixosLockParser._serializedATN; } + + protected createFailedPredicateException(predicate?: string, message?: string): antlr.FailedPredicateException { + return new antlr.FailedPredicateException(this, predicate, message); + } + + public constructor(input: antlr.TokenStream) { + super(input); + this.interpreter = new antlr.ParserATNSimulator(this, QuixosLockParser._ATN, QuixosLockParser.decisionsToDFA, new antlr.PredictionContextCache()); + } + public document(): DocumentContext { + let localContext = new DocumentContext(this.context, this.state); + this.enterRule(localContext, 0, QuixosLockParser.RULE_document); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 14; + this.match(QuixosLockParser.QUIXOS_LOCK); + this.state = 15; + this.match(QuixosLockParser.VERSION); + this.state = 16; + this.match(QuixosLockParser.INTEGER); + this.state = 17; + this.match(QuixosLockParser.LBRACE); + this.state = 18; + this.quixosEntry(); + this.state = 22; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + while (_la === 5 || _la === 6) { + { + { + this.state = 19; + this.resourceEntry(); + } + } + this.state = 24; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + } + this.state = 25; + this.match(QuixosLockParser.RBRACE); + this.state = 26; + this.match(QuixosLockParser.EOF); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public quixosEntry(): QuixosEntryContext { + let localContext = new QuixosEntryContext(this.context, this.state); + this.enterRule(localContext, 2, QuixosLockParser.RULE_quixosEntry); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 28; + this.match(QuixosLockParser.QUIXOS); + this.state = 29; + this.match(QuixosLockParser.SOURCE); + this.state = 30; + this.sourceBlock(); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public resourceEntry(): ResourceEntryContext { + let localContext = new ResourceEntryContext(this.context, this.state); + this.enterRule(localContext, 4, QuixosLockParser.RULE_resourceEntry); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 32; + this.resourceKind(); + this.state = 33; + this.identifier(); + this.state = 34; + this.match(QuixosLockParser.SOURCE); + this.state = 35; + this.sourceBlock(); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public resourceKind(): ResourceKindContext { + let localContext = new ResourceKindContext(this.context, this.state); + this.enterRule(localContext, 6, QuixosLockParser.RULE_resourceKind); + let _la: number; + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 37; + _la = this.tokenStream.LA(1); + if(!(_la === 5 || _la === 6)) { + this.errorHandler.recoverInline(this); + } + else { + this.errorHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public sourceBlock(): SourceBlockContext { + let localContext = new SourceBlockContext(this.context, this.state); + this.enterRule(localContext, 8, QuixosLockParser.RULE_sourceBlock); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 39; + this.match(QuixosLockParser.LBRACE); + this.state = 40; + this.match(QuixosLockParser.REPOSITORY); + this.state = 41; + this.stringLiteral(); + this.state = 42; + this.match(QuixosLockParser.SEMI); + this.state = 43; + this.match(QuixosLockParser.COMMIT); + this.state = 44; + this.stringLiteral(); + this.state = 45; + this.match(QuixosLockParser.SEMI); + this.state = 46; + this.match(QuixosLockParser.RBRACE); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public identifier(): IdentifierContext { + let localContext = new IdentifierContext(this.context, this.state); + this.enterRule(localContext, 10, QuixosLockParser.RULE_identifier); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 48; + this.match(QuixosLockParser.IDENTIFIER); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public stringLiteral(): StringLiteralContext { + let localContext = new StringLiteralContext(this.context, this.state); + this.enterRule(localContext, 12, QuixosLockParser.RULE_stringLiteral); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 50; + this.match(QuixosLockParser.STRING_LITERAL); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + + public static readonly _serializedATN: number[] = [ + 4,1,17,53,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 6,1,0,1,0,1,0,1,0,1,0,1,0,5,0,21,8,0,10,0,12,0,24,9,0,1,0,1,0,1, + 0,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,4,1,4,1,4,1,4,1, + 4,1,4,1,4,1,4,1,4,1,5,1,5,1,6,1,6,1,6,0,0,7,0,2,4,6,8,10,12,0,1, + 1,0,5,6,46,0,14,1,0,0,0,2,28,1,0,0,0,4,32,1,0,0,0,6,37,1,0,0,0,8, + 39,1,0,0,0,10,48,1,0,0,0,12,50,1,0,0,0,14,15,5,1,0,0,15,16,5,2,0, + 0,16,17,5,12,0,0,17,18,5,9,0,0,18,22,3,2,1,0,19,21,3,4,2,0,20,19, + 1,0,0,0,21,24,1,0,0,0,22,20,1,0,0,0,22,23,1,0,0,0,23,25,1,0,0,0, + 24,22,1,0,0,0,25,26,5,10,0,0,26,27,5,0,0,1,27,1,1,0,0,0,28,29,5, + 3,0,0,29,30,5,4,0,0,30,31,3,8,4,0,31,3,1,0,0,0,32,33,3,6,3,0,33, + 34,3,10,5,0,34,35,5,4,0,0,35,36,3,8,4,0,36,5,1,0,0,0,37,38,7,0,0, + 0,38,7,1,0,0,0,39,40,5,9,0,0,40,41,5,7,0,0,41,42,3,12,6,0,42,43, + 5,11,0,0,43,44,5,8,0,0,44,45,3,12,6,0,45,46,5,11,0,0,46,47,5,10, + 0,0,47,9,1,0,0,0,48,49,5,13,0,0,49,11,1,0,0,0,50,51,5,14,0,0,51, + 13,1,0,0,0,1,22 + ]; + + private static __ATN: antlr.ATN; + public static get _ATN(): antlr.ATN { + if (!QuixosLockParser.__ATN) { + QuixosLockParser.__ATN = new antlr.ATNDeserializer().deserialize(QuixosLockParser._serializedATN); + } + + return QuixosLockParser.__ATN; + } + + + private static readonly vocabulary = new antlr.Vocabulary(QuixosLockParser.literalNames, QuixosLockParser.symbolicNames, []); + + public override get vocabulary(): antlr.Vocabulary { + return QuixosLockParser.vocabulary; + } + + private static readonly decisionsToDFA = QuixosLockParser._ATN.decisionToState.map( (ds: antlr.DecisionState, index: number) => new antlr.DFA(ds, index) ); +} + +export class DocumentContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public QUIXOS_LOCK(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.QUIXOS_LOCK, 0)!; + } + public VERSION(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.VERSION, 0)!; + } + public INTEGER(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.INTEGER, 0)!; + } + public LBRACE(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.LBRACE, 0)!; + } + public quixosEntry(): QuixosEntryContext { + return this.getRuleContext(0, QuixosEntryContext)!; + } + public RBRACE(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.RBRACE, 0)!; + } + public EOF(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.EOF, 0)!; + } + public resourceEntry(): ResourceEntryContext[]; + public resourceEntry(i: number): ResourceEntryContext | null; + public resourceEntry(i?: number): ResourceEntryContext[] | ResourceEntryContext | null { + if (i === undefined) { + return this.getRuleContexts(ResourceEntryContext); + } + + return this.getRuleContext(i, ResourceEntryContext); + } + public override get ruleIndex(): number { + return QuixosLockParser.RULE_document; + } + public override accept(visitor: QuixosLockVisitor): Result | null { + if (visitor.visitDocument) { + return visitor.visitDocument(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class QuixosEntryContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public QUIXOS(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.QUIXOS, 0)!; + } + public SOURCE(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.SOURCE, 0)!; + } + public sourceBlock(): SourceBlockContext { + return this.getRuleContext(0, SourceBlockContext)!; + } + public override get ruleIndex(): number { + return QuixosLockParser.RULE_quixosEntry; + } + public override accept(visitor: QuixosLockVisitor): Result | null { + if (visitor.visitQuixosEntry) { + return visitor.visitQuixosEntry(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ResourceEntryContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public resourceKind(): ResourceKindContext { + return this.getRuleContext(0, ResourceKindContext)!; + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public SOURCE(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.SOURCE, 0)!; + } + public sourceBlock(): SourceBlockContext { + return this.getRuleContext(0, SourceBlockContext)!; + } + public override get ruleIndex(): number { + return QuixosLockParser.RULE_resourceEntry; + } + public override accept(visitor: QuixosLockVisitor): Result | null { + if (visitor.visitResourceEntry) { + return visitor.visitResourceEntry(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ResourceKindContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public INTERFACE(): antlr.TerminalNode | null { + return this.getToken(QuixosLockParser.INTERFACE, 0); + } + public PACKAGE(): antlr.TerminalNode | null { + return this.getToken(QuixosLockParser.PACKAGE, 0); + } + public override get ruleIndex(): number { + return QuixosLockParser.RULE_resourceKind; + } + public override accept(visitor: QuixosLockVisitor): Result | null { + if (visitor.visitResourceKind) { + return visitor.visitResourceKind(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class SourceBlockContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public LBRACE(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.LBRACE, 0)!; + } + public REPOSITORY(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.REPOSITORY, 0)!; + } + public stringLiteral(): StringLiteralContext[]; + public stringLiteral(i: number): StringLiteralContext | null; + public stringLiteral(i?: number): StringLiteralContext[] | StringLiteralContext | null { + if (i === undefined) { + return this.getRuleContexts(StringLiteralContext); + } + + return this.getRuleContext(i, StringLiteralContext); + } + public SEMI(): antlr.TerminalNode[]; + public SEMI(i: number): antlr.TerminalNode | null; + public SEMI(i?: number): antlr.TerminalNode | null | antlr.TerminalNode[] { + if (i === undefined) { + return this.getTokens(QuixosLockParser.SEMI); + } else { + return this.getToken(QuixosLockParser.SEMI, i); + } + } + public COMMIT(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.COMMIT, 0)!; + } + public RBRACE(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.RBRACE, 0)!; + } + public override get ruleIndex(): number { + return QuixosLockParser.RULE_sourceBlock; + } + public override accept(visitor: QuixosLockVisitor): Result | null { + if (visitor.visitSourceBlock) { + return visitor.visitSourceBlock(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class IdentifierContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public IDENTIFIER(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.IDENTIFIER, 0)!; + } + public override get ruleIndex(): number { + return QuixosLockParser.RULE_identifier; + } + public override accept(visitor: QuixosLockVisitor): Result | null { + if (visitor.visitIdentifier) { + return visitor.visitIdentifier(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class StringLiteralContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public STRING_LITERAL(): antlr.TerminalNode { + return this.getToken(QuixosLockParser.STRING_LITERAL, 0)!; + } + public override get ruleIndex(): number { + return QuixosLockParser.RULE_stringLiteral; + } + public override accept(visitor: QuixosLockVisitor): Result | null { + if (visitor.visitStringLiteral) { + return visitor.visitStringLiteral(this); + } else { + return visitor.visitChildren(this); + } + } +} diff --git a/src/resource-lock/generated/QuixosLockVisitor.ts b/src/resource-lock/generated/QuixosLockVisitor.ts new file mode 100644 index 0000000..e36baed --- /dev/null +++ b/src/resource-lock/generated/QuixosLockVisitor.ts @@ -0,0 +1,65 @@ + +import { AbstractParseTreeVisitor } from "antlr4ng"; + + +import { DocumentContext } from "./QuixosLockParser.js"; +import { QuixosEntryContext } from "./QuixosLockParser.js"; +import { ResourceEntryContext } from "./QuixosLockParser.js"; +import { ResourceKindContext } from "./QuixosLockParser.js"; +import { SourceBlockContext } from "./QuixosLockParser.js"; +import { IdentifierContext } from "./QuixosLockParser.js"; +import { StringLiteralContext } from "./QuixosLockParser.js"; + + +/** + * This interface defines a complete generic visitor for a parse tree produced + * by `QuixosLockParser`. + * + * @param The return type of the visit operation. Use `void` for + * operations with no return type. + */ +export class QuixosLockVisitor extends AbstractParseTreeVisitor { + /** + * Visit a parse tree produced by `QuixosLockParser.document`. + * @param ctx the parse tree + * @return the visitor result + */ + visitDocument?: (ctx: DocumentContext) => Result; + /** + * Visit a parse tree produced by `QuixosLockParser.quixosEntry`. + * @param ctx the parse tree + * @return the visitor result + */ + visitQuixosEntry?: (ctx: QuixosEntryContext) => Result; + /** + * Visit a parse tree produced by `QuixosLockParser.resourceEntry`. + * @param ctx the parse tree + * @return the visitor result + */ + visitResourceEntry?: (ctx: ResourceEntryContext) => Result; + /** + * Visit a parse tree produced by `QuixosLockParser.resourceKind`. + * @param ctx the parse tree + * @return the visitor result + */ + visitResourceKind?: (ctx: ResourceKindContext) => Result; + /** + * Visit a parse tree produced by `QuixosLockParser.sourceBlock`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSourceBlock?: (ctx: SourceBlockContext) => Result; + /** + * Visit a parse tree produced by `QuixosLockParser.identifier`. + * @param ctx the parse tree + * @return the visitor result + */ + visitIdentifier?: (ctx: IdentifierContext) => Result; + /** + * Visit a parse tree produced by `QuixosLockParser.stringLiteral`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStringLiteral?: (ctx: StringLiteralContext) => Result; +} + diff --git a/src/resource-lock/index.ts b/src/resource-lock/index.ts new file mode 100644 index 0000000..fe0c3c6 --- /dev/null +++ b/src/resource-lock/index.ts @@ -0,0 +1,2 @@ +export * from "./parser.js"; +export * from "./types.js"; diff --git a/src/resource-lock/parser.ts b/src/resource-lock/parser.ts new file mode 100644 index 0000000..2439c94 --- /dev/null +++ b/src/resource-lock/parser.ts @@ -0,0 +1,227 @@ +import { + BaseErrorListener, + CharStream, + CommonTokenStream, + type ATNSimulator, + type RecognitionException, + type Recognizer, + type Token, +} from "antlr4ng"; +import { QuixosLockLexer } from "./generated/QuixosLockLexer.js"; +import { + QuixosLockParser, + type SourceBlockContext, +} from "./generated/QuixosLockParser.js"; +import type { + GitSource, + LockedResource, + QuixosRepositoryLock, +} from "./types.js"; + +export type QuixosLockDiagnostic = { + phase: "syntax" | "validation"; + code: string; + message: string; + fileName: string; + line: number; + column: number; + path?: string; +}; + +export type QuixosLockParseResult = + | { ok: true; lock: QuixosRepositoryLock; diagnostics: [] } + | { ok: false; diagnostics: QuixosLockDiagnostic[] }; + +class SyntaxErrorListener extends BaseErrorListener { + constructor( + private readonly fileName: string, + private readonly diagnostics: QuixosLockDiagnostic[], + ) { + super(); + } + + override syntaxError( + _recognizer: Recognizer, + _offendingSymbol: S | null, + line: number, + column: number, + message: string, + _error: RecognitionException | null, + ): void { + this.diagnostics.push({ + phase: "syntax", + code: "syntax-error", + message, + fileName: this.fileName, + line, + column, + }); + } +} + +const stringValue = (context: { getText(): string }): string => + JSON.parse(context.getText()) as string; + +const lowerSource = (context: SourceBlockContext): GitSource => ({ + resolver: "git", + repository: stringValue(context.stringLiteral(0)!), + commit: stringValue(context.stringLiteral(1)!).toLowerCase(), +}); + +const issue = ( + diagnostics: QuixosLockDiagnostic[], + fileName: string, + code: string, + message: string, + path?: string, +) => diagnostics.push({ + phase: "validation", + code, + message, + fileName, + line: 1, + column: 0, + path, +}); + +const validateSource = ( + source: GitSource, + path: string, + fileName: string, + diagnostics: QuixosLockDiagnostic[], +) => { + if (!/^([0-9a-f]{40}|[0-9a-f]{64})$/.test(source.commit)) { + issue( + diagnostics, + fileName, + "invalid-git-commit", + `${path}.commit must be a full 40- or 64-character Git object ID`, + `${path}.commit`, + ); + } + let repository: URL; + try { + repository = new URL(source.repository); + } catch { + issue( + diagnostics, + fileName, + "invalid-git-repository", + `${path}.repository must be an absolute Git URL`, + `${path}.repository`, + ); + return; + } + if (!["https:", "ssh:"].includes(repository.protocol)) { + issue( + diagnostics, + fileName, + "unsupported-git-transport", + `${path}.repository must use https:// or ssh://`, + `${path}.repository`, + ); + } + if (repository.search || repository.hash) { + issue( + diagnostics, + fileName, + "decorated-git-repository", + `${path}.repository must be a base repository URL without a query or fragment`, + `${path}.repository`, + ); + } + if (repository.password || (repository.protocol === "https:" && repository.username)) { + issue( + diagnostics, + fileName, + "embedded-git-credential", + `${path}.repository must not embed credentials`, + `${path}.repository`, + ); + } +}; + +export const parseQuixosLock = ( + source: string, + fileName = "", +): QuixosLockParseResult => { + const diagnostics: QuixosLockDiagnostic[] = []; + const listener = new SyntaxErrorListener(fileName, diagnostics); + const lexer = new QuixosLockLexer(CharStream.fromString(source)); + lexer.removeErrorListeners(); + lexer.addErrorListener(listener); + const parser = new QuixosLockParser(new CommonTokenStream(lexer)); + parser.removeErrorListeners(); + parser.addErrorListener(listener); + const tree = parser.document(); + if (diagnostics.length > 0) return { ok: false, diagnostics }; + + const formatVersion = Number.parseInt(tree.INTEGER().getText(), 10); + if (formatVersion !== 1) { + issue( + diagnostics, + fileName, + "unsupported-lock-version", + `Unsupported Quixos lock format version ${formatVersion}`, + "formatVersion", + ); + } + + const quixos = lowerSource(tree.quixosEntry().sourceBlock()); + validateSource(quixos, "quixos", fileName, diagnostics); + + const resources: LockedResource[] = []; + const bindings = new Set(); + for (const [index, context] of tree.resourceEntry().entries()) { + const kind = context.resourceKind().INTERFACE() ? "interface" : "package"; + const binding = context.identifier().getText(); + const key = `${kind}\0${binding}`; + if (bindings.has(key)) { + issue( + diagnostics, + fileName, + "duplicate-resource-binding", + `Duplicate ${kind} binding ${binding}`, + `resources[${index}].binding`, + ); + } + bindings.add(key); + const resource = { kind, binding, source: lowerSource(context.sourceBlock()) } as LockedResource; + validateSource(resource.source, `resources[${index}].source`, fileName, diagnostics); + resources.push(resource); + } + + return diagnostics.length > 0 + ? { ok: false, diagnostics } + : { + ok: true, + lock: { formatVersion: 1, quixos, resources }, + diagnostics: [], + }; +}; + +const quoted = (value: string) => JSON.stringify(value); + +const sourceLines = (source: GitSource, indentation: string): string[] => [ + `${indentation}repository ${quoted(source.repository)};`, + `${indentation}commit ${quoted(source.commit.toLowerCase())};`, +]; + +export const formatQuixosLock = (lock: QuixosRepositoryLock): string => { + const lines = [ + "quixos-lock version 1 {", + " quixos source {", + ...sourceLines(lock.quixos, " "), + " }", + ]; + for (const resource of lock.resources) { + lines.push( + "", + ` ${resource.kind} ${resource.binding} source {`, + ...sourceLines(resource.source, " "), + " }", + ); + } + lines.push("}", ""); + return lines.join("\n"); +}; diff --git a/src/resource-lock/types.ts b/src/resource-lock/types.ts new file mode 100644 index 0000000..062833b --- /dev/null +++ b/src/resource-lock/types.ts @@ -0,0 +1,38 @@ +export type GitSource = { + resolver: "git"; + repository: string; + commit: string; +}; + +export type LockedResourceKind = "interface" | "package"; + +export type LockedResource = { + kind: LockedResourceKind; + binding: string; + source: GitSource; +}; + +export type QuixosRepositoryLock = { + formatVersion: 1; + quixos: GitSource; + resources: LockedResource[]; +}; + +export type NixGitInput = { + type: "git"; + url: string; + ref: string; + rev: string; +}; + +export const RETENTION_TAG_PREFIX = "refs/tags/quixos-reachability/"; + +export const retentionTagForCommit = (commit: string): string => + `${RETENTION_TAG_PREFIX}${commit.toLowerCase()}`; + +export const nixGitInput = (source: GitSource): NixGitInput => ({ + type: "git", + url: source.repository, + ref: retentionTagForCommit(source.commit), + rev: source.commit.toLowerCase(), +}); diff --git a/test/capability-language.test.ts b/test/capability-language.test.ts new file mode 100644 index 0000000..a9b8cbf --- /dev/null +++ b/test/capability-language.test.ts @@ -0,0 +1,148 @@ +import assert from "node:assert/strict"; +import { test } from "node:test"; +import { compileCapabilitySource } from "../src/capability-language/index.js"; +import { + capabilityFixturePath, + capabilityFixtureSource, + fixtureId, +} from "./fixtures/capability-model.js"; + +test("ANTLR parses and validates a complete capability workspace", () => { + const result = compileCapabilitySource( + capabilityFixtureSource, + capabilityFixturePath, + ); + assert.equal(result.ok, true); + if (!result.ok) return; + assert.equal(result.workspace.workspaceId, fixtureId.workspace); + assert.equal(result.workspace.id, fixtureId.workspaceRevision); + assert.equal(result.workspace.interfaceImports.length, 3); + assert.equal(result.workspace.conformances.length, 4); + assert.equal("id" in result.workspace.conformances[0]!, false); +}); + +test("conformances do not accept authored IDs", () => { + const result = compileCapabilitySource( + capabilityFixtureSource.replace( + "conform Project as Named {", + 'conform Project as Named id "conformance:project:named" {', + ), + "conformance-id.qx", + ); + assert.equal(result.ok, false); + if (result.ok) return; + assert.ok(result.diagnostics.some((entry) => entry.phase === "syntax")); +}); + +test("the v1 language has no implicit relationship materialization rule", () => { + const result = compileCapabilitySource( + capabilityFixtureSource.replace( + /\n}\s*$/, + '\n materialize ProjectOwner.owner if absent with Person;\n}\n', + ), + "materialize.qx", + ); + assert.equal(result.ok, false); + if (result.ok) return; + assert.ok(result.diagnostics.some((entry) => entry.phase === "syntax")); +}); + +test("forward declarations make source order irrelevant", () => { + const source = capabilityFixtureSource + .replace(/ atom Project[^\n]*\n/, "") + .replace(/ atom Person[^\n]*\n/, "") + .replace( + /\n}\s*$/, + '\n atom Project id "atom:project";\n atom Person id "atom:person";\n}\n', + ); + assert.equal(compileCapabilitySource(source, "reordered.qx").ok, true); +}); + +test("interfaces can declare ordinary call operations", () => { + const source = capabilityFixtureSource.replace( + " value summary id \"member:summary:summary\" : string {\n get id \"operation:summary:summary:get\";\n }", + " operation summarize id \"member:summary:summarize\" : string -> string {\n call id \"operation:summary:summarize\";\n }", + ).replace( + "bind summary.get to package TodoRuntime.summaryGet", + "bind summarize.call to package TodoRuntime.summaryGet", + ).replace( + "operation summaryGet id \"export:todo-runtime:summary-get\" : unit -> string", + "operation summaryGet id \"export:todo-runtime:summary-get\" : string -> string", + ); + const result = compileCapabilitySource(source, "operation-member.qx"); + assert.equal(result.ok, true); + if (!result.ok) return; + const member = result.workspace.interfaceImports + .find((entry) => entry.displayName === "Summary")?.members[0]; + assert.equal(member?.kind, "operation"); +}); + +test("state defaults accept recursive JSON values", () => { + const source = capabilityFixtureSource.replace( + ' policy optimistic-register default "Untitled project";', + ` policy optimistic-register default "Untitled project"; + shared state ProjectMetadata id "slot:project:metadata" on Project : message "example.Metadata" + policy optimistic-register default {"labels":["compiler","runtime"],"score":1.5,"enabled":true,"extra":null};`, + ); + const result = compileCapabilitySource(source, "json-default.qx"); + assert.equal(result.ok, true); + if (!result.ok) return; + const metadata = result.workspace.sharedAttachments.find( + (entry) => entry.id === "slot:project:metadata", + ); + assert.equal(metadata?.kind, "state"); + if (metadata?.kind !== "state") return; + assert.deepEqual(metadata.defaultValue, { + labels: ["compiler", "runtime"], + score: 1.5, + enabled: true, + extra: null, + }); +}); + +test("syntax errors retain source locations", () => { + const result = compileCapabilitySource( + capabilityFixtureSource.replace("atom Project", "atom Project ???"), + "broken.qx", + ); + assert.equal(result.ok, false); + if (result.ok) return; + assert.ok(result.diagnostics.some((entry) => + entry.phase === "syntax" && entry.fileName === "broken.qx" && entry.line > 0 + )); +}); + +test("unknown authoring names are lowering errors", () => { + const result = compileCapabilitySource( + capabilityFixtureSource.replace( + "to state ProjectTitle.read", + "to state NotAState.read", + ), + "unknown-name.qx", + ); + assert.equal(result.ok, false); + if (result.ok) return; + assert.ok(result.diagnostics.some((entry) => + entry.phase === "lowering" && + entry.code === "unknown-symbol" && + entry.message.includes("NotAState") + )); +}); + +test("well-formed but invalid programs report semantic paths", () => { + const result = compileCapabilitySource( + capabilityFixtureSource.replace( + "bind name.get to state ProjectTitle.read", + "bind name.get to state ProjectTitle.write", + ), + "invalid-binding.qx", + ); + assert.equal(result.ok, false); + if (result.ok) return; + const diagnostic = result.diagnostics.find( + (entry) => entry.code === "invalid-state-binding", + ); + assert.ok(diagnostic); + assert.equal(diagnostic.phase, "validation"); + assert.ok(diagnostic.path?.includes("operationBindings")); +}); diff --git a/test/capability-model.test.ts b/test/capability-model.test.ts new file mode 100644 index 0000000..73f82cc --- /dev/null +++ b/test/capability-model.test.ts @@ -0,0 +1,234 @@ +import assert from "node:assert/strict"; +import { test } from "node:test"; +import { + compileWorkspaceRevision, + computeCapabilityClosure, + resolveOperationPlan, + validateWorkspaceRevision, + valueType, + type CapabilityValidationIssueCode, + type WorkspaceRevision, +} from "../src/capability-model/index.js"; +import { + fixtureId, + makeValidCapabilityWorkspace, +} from "./fixtures/capability-model.js"; + +const expectIssue = ( + workspace: WorkspaceRevision, + code: CapabilityValidationIssueCode, +) => { + const issues = validateWorkspaceRevision(workspace); + assert.ok( + issues.some((entry) => entry.code === code), + `Expected ${code}, got:\n${issues + .map((entry) => `${entry.code} ${entry.path}: ${entry.message}`) + .join("\n")}`, + ); + assert.equal(compileWorkspaceRevision(workspace).ok, false); +}; + +const conformance = ( + workspace: WorkspaceRevision, + identity: Pick<(typeof workspace.conformances)[number], "atomId" | "interfaceRevisionId">, +) => { + const result = workspace.conformances.find((entry) => + entry.atomId === identity.atomId && + entry.interfaceRevisionId === identity.interfaceRevisionId + ); + assert.ok( + result, + `Missing fixture conformance ${identity.atomId} as ${identity.interfaceRevisionId}`, + ); + return result; +}; + +test("the representative v1 workspace compiles to native and package plans", () => { + const workspace = makeValidCapabilityWorkspace(); + assert.deepEqual(validateWorkspaceRevision(workspace), []); + const compiled = compileWorkspaceRevision(workspace); + assert.equal(compiled.ok, true); + if (!compiled.ok) return; + + const title = resolveOperationPlan( + compiled.plan, + fixtureId.project, + fixtureId.namedV1, + fixtureId.namedGet, + ); + assert.equal(title?.kind, "state"); + if (title?.kind === "state") { + assert.equal(title.binding.slotId, fixtureId.projectTitle); + assert.equal(title.binding.primitive, "read"); + assert.deepEqual(title.attachment.owner, { kind: "workspace" }); + } + + const owner = resolveOperationPlan( + compiled.plan, + fixtureId.project, + fixtureId.ownedV1, + fixtureId.ownerResolve, + ); + assert.equal(owner?.kind, "edge"); + if (owner?.kind === "edge") { + assert.equal(owner.binding.edgeTypeId, fixtureId.projectOwner); + assert.deepEqual(owner.attachment.owner, { + kind: "conformance", + ...fixtureId.projectOwnedConformance, + }); + } + + const summary = resolveOperationPlan( + compiled.plan, + fixtureId.project, + fixtureId.summaryV1, + fixtureId.summaryGet, + ); + assert.equal(summary?.kind, "package"); + if (summary?.kind === "package") { + assert.equal(summary.packageRevision.revisionId, fixtureId.todoRuntimeV1); + assert.equal(summary.packageExport.id, fixtureId.summaryGetExport); + assert.deepEqual( + summary.dependencies.map((entry) => [entry.port.id, entry.binding.kind]), + [ + [fixtureId.titlePort, "state"], + [fixtureId.namedPort, "receiver-interface"], + [fixtureId.personPort, "constructor"], + ], + ); + } +}); + +test("the closure is an exact tree-shaking boundary", () => { + const result = compileWorkspaceRevision(makeValidCapabilityWorkspace()); + assert.equal(result.ok, true); + if (!result.ok) return; + const closure = computeCapabilityClosure(result.plan, [ + { atomId: fixtureId.project, interfaceRevisionId: fixtureId.summaryV1 }, + ]); + assert.deepEqual(closure.conformances, [ + fixtureId.projectNamedConformance, + fixtureId.projectSummaryConformance, + ]); + assert.deepEqual(closure.packageRevisionIds, [fixtureId.todoRuntimeV1]); + assert.deepEqual(closure.attachmentIds, [fixtureId.projectTitle]); + assert.deepEqual(closure.constructorAtomIds, [fixtureId.person]); +}); + +test("compiled plans are snapshots, not mutable authoring state", () => { + const workspace = makeValidCapabilityWorkspace(); + const result = compileWorkspaceRevision(workspace); + assert.equal(result.ok, true); + if (!result.ok) return; + conformance(workspace, fixtureId.projectNamedConformance) + .operationBindings[0]!.binding = { + kind: "state", + slotId: fixtureId.personName, + primitive: "read", + }; + const resolved = resolveOperationPlan( + result.plan, + fixtureId.project, + fixtureId.namedV1, + fixtureId.namedGet, + ); + assert.equal(resolved?.kind, "state"); + if (resolved?.kind === "state") { + assert.equal(resolved.binding.slotId, fixtureId.projectTitle); + } +}); + +test("a conformance binds every operation exactly once", () => { + const missing = makeValidCapabilityWorkspace(); + conformance(missing, fixtureId.projectNamedConformance).operationBindings.pop(); + expectIssue(missing, "missing-operation-binding"); + + const duplicate = makeValidCapabilityWorkspace(); + const bindings = conformance( + duplicate, + fixtureId.projectNamedConformance, + ).operationBindings; + bindings.push(structuredClone(bindings[0]!)); + expectIssue(duplicate, "duplicate-operation-binding"); +}); + +test("private attachments are visible only to their owning conformance", () => { + const workspace = makeValidCapabilityWorkspace(); + const binding = conformance( + workspace, + fixtureId.projectNamedConformance, + ).operationBindings[0]!.binding; + assert.equal(binding.kind, "state"); + if (binding.kind !== "state") return; + binding.slotId = fixtureId.personName; + expectIssue(workspace, "private-attachment-access"); +}); + +test("native state and edge providers must match operation shape", () => { + const stateWorkspace = makeValidCapabilityWorkspace(); + const state = conformance( + stateWorkspace, + fixtureId.projectNamedConformance, + ).operationBindings[0]!.binding; + assert.equal(state.kind, "state"); + if (state.kind === "state") state.primitive = "write"; + expectIssue(stateWorkspace, "invalid-state-binding"); + + const edgeWorkspace = makeValidCapabilityWorkspace(); + const edge = conformance( + edgeWorkspace, + fixtureId.projectOwnedConformance, + ).operationBindings[0]!.binding; + assert.equal(edge.kind, "edge"); + if (edge.kind === "edge") edge.primitive = "connect"; + expectIssue(edgeWorkspace, "invalid-edge-binding"); +}); + +test("package dependencies are complete, exact, and explicitly injected", () => { + const missing = makeValidCapabilityWorkspace(); + const packageBinding = conformance( + missing, + fixtureId.projectSummaryConformance, + ).operationBindings[0]!.binding; + assert.equal(packageBinding.kind, "package"); + if (packageBinding.kind === "package") packageBinding.dependencies.pop(); + expectIssue(missing, "invalid-dependency-binding"); + + const wrongType = makeValidCapabilityWorkspace(); + const summaryExport = wrongType.packageImports[0]!.exports.find( + (entry) => entry.id === fixtureId.summaryGetExport, + ); + assert.ok(summaryExport); + summaryExport.dependencyPorts[0]!.requirement = { + kind: "state", + valueType: valueType.int32, + primitives: ["read"], + }; + expectIssue(wrongType, "invalid-dependency-binding"); +}); + +test("package receiver requirements cannot depend on themselves", () => { + const workspace = makeValidCapabilityWorkspace(); + const summaryExport = workspace.packageImports[0]!.exports.find( + (entry) => entry.id === fixtureId.summaryGetExport, + ); + assert.ok(summaryExport && summaryExport.kind === "operation"); + summaryExport.receiverRequirement = { + kind: "all-interfaces", + interfaceRevisionIds: [fixtureId.summaryV1], + }; + summaryExport.dependencyPorts = []; + const packageBinding = conformance( + workspace, + fixtureId.projectSummaryConformance, + ).operationBindings[0]!.binding; + assert.equal(packageBinding.kind, "package"); + if (packageBinding.kind === "package") packageBinding.dependencies = []; + expectIssue(workspace, "cyclic-conformance-requirement"); +}); + +test("constructors are statically checked", () => { + const badConstructor = makeValidCapabilityWorkspace(); + badConstructor.constructors[0]!.exportId = fixtureId.summaryGetExport; + expectIssue(badConstructor, "invalid-constructor"); +}); diff --git a/test/fixtures/capability-model.ts b/test/fixtures/capability-model.ts new file mode 100644 index 0000000..e5dc30a --- /dev/null +++ b/test/fixtures/capability-model.ts @@ -0,0 +1,78 @@ +import { readFileSync } from "node:fs"; +import { resolve } from "node:path"; +import { + capabilityId, + type WorkspaceRevision, +} from "../../src/capability-model/index.js"; +import { compileCapabilitySource } from "../../src/capability-language/index.js"; + +export const fixtureId = { + workspace: capabilityId.workspace("workspace:todo"), + workspaceRevision: capabilityId.workspaceRevision("workspace:todo@1"), + project: capabilityId.atom("atom:project"), + person: capabilityId.atom("atom:person"), + namedV1: capabilityId.interfaceRevision("interface:named@1"), + ownedV1: capabilityId.interfaceRevision("interface:owned@1"), + summaryV1: capabilityId.interfaceRevision("interface:summary@1"), + namedGet: capabilityId.operation("operation:named:name:get"), + namedSet: capabilityId.operation("operation:named:name:set"), + ownerResolve: capabilityId.operation("operation:owned:owner:resolve"), + summaryGet: capabilityId.operation("operation:summary:summary:get"), + projectTitle: capabilityId.slot("slot:project:title"), + personName: capabilityId.slot("slot:person:name"), + projectOwner: capabilityId.edgeType("edge:project:owner"), + projectOwnerProjection: capabilityId.edgeProjection( + "projection:project-owner:owner", + ), + projectNamedConformance: { + atomId: capabilityId.atom("atom:project"), + interfaceRevisionId: capabilityId.interfaceRevision("interface:named@1"), + }, + personNamedConformance: { + atomId: capabilityId.atom("atom:person"), + interfaceRevisionId: capabilityId.interfaceRevision("interface:named@1"), + }, + projectOwnedConformance: { + atomId: capabilityId.atom("atom:project"), + interfaceRevisionId: capabilityId.interfaceRevision("interface:owned@1"), + }, + projectSummaryConformance: { + atomId: capabilityId.atom("atom:project"), + interfaceRevisionId: capabilityId.interfaceRevision("interface:summary@1"), + }, + todoRuntimeV1: capabilityId.packageRevision("package:todo-runtime@1"), + summaryGetExport: capabilityId.packageExport( + "export:todo-runtime:summary-get", + ), + createPersonExport: capabilityId.packageExport( + "export:todo-runtime:create-person", + ), + titlePort: capabilityId.dependencyPort("port:summary:title"), + namedPort: capabilityId.dependencyPort("port:summary:named"), + personPort: capabilityId.dependencyPort("port:summary:person"), +} as const; + +export const capabilityFixturePath = resolve( + process.cwd(), + "test/fixtures/todo.capabilities.qx", +); + +export const capabilityFixtureSource = readFileSync( + capabilityFixturePath, + "utf8", +); + +export const makeValidCapabilityWorkspace = (): WorkspaceRevision => { + const result = compileCapabilitySource( + capabilityFixtureSource, + capabilityFixturePath, + ); + if (!result.ok) { + throw new Error( + result.diagnostics + .map((entry) => `${entry.phase}/${entry.code}: ${entry.message}`) + .join("\n"), + ); + } + return structuredClone(result.workspace); +}; diff --git a/test/fixtures/todo.capabilities.qx b/test/fixtures/todo.capabilities.qx new file mode 100644 index 0000000..e9a1405 --- /dev/null +++ b/test/fixtures/todo.capabilities.qx @@ -0,0 +1,90 @@ +workspace Todo id "workspace:todo" revision "workspace:todo@1" commit "1111111111111111111111111111111111111111" { + atom Project id "atom:project" doc "A project containing work."; + atom Person id "atom:person"; + + interface Named id "interface:named" revision "interface:named@1" source { + repository "https://repos.quixos.org/interfaces/named.git"; + commit "2222222222222222222222222222222222222222"; + } { + value name id "member:named:name" : string { + get id "operation:named:name:get"; + set id "operation:named:name:set"; + watch start id "operation:named:name:watch-start" stop id "operation:named:name:watch-stop"; + } + } + + interface Owned id "interface:owned" revision "interface:owned@1" source { + repository "https://repos.quixos.org/interfaces/owned.git"; + commit "3333333333333333333333333333333333333333"; + } { + relation owner id "member:owned:owner" : exactly-one interface Named { + resolve id "operation:owned:owner:resolve"; + connect id "operation:owned:owner:connect"; + disconnect id "operation:owned:owner:disconnect"; + watch start id "operation:owned:owner:watch-start" stop id "operation:owned:owner:watch-stop"; + } + } + + interface Summary id "interface:summary" revision "interface:summary@1" source { + repository "https://repos.quixos.org/interfaces/summary.git"; + commit "4444444444444444444444444444444444444444"; + } { + value summary id "member:summary:summary" : string { + get id "operation:summary:summary:get"; + } + } + + package TodoRuntime id "package:todo-runtime" revision "package:todo-runtime@1" source { + repository "https://repos.quixos.org/packages/todo-runtime.git"; + commit "5555555555555555555555555555555555555555"; + } { + operation summaryGet id "export:todo-runtime:summary-get" : unit -> string + mode call receiver interfaces [Named] requires { + state title id "port:summary:title" : string [read]; + interface named id "port:summary:named" : Named; + constructor person id "port:summary:person" : Person; + }; + constructor createPerson id "export:todo-runtime:create-person" constructs Person : unit; + } + + shared state ProjectTitle id "slot:project:title" on Project : string + policy optimistic-register default "Untitled project"; + + conform Project as Named { + bind name.get to state ProjectTitle.read; + bind name.set to state ProjectTitle.write; + bind name.watch-start to state ProjectTitle.watch-start; + bind name.watch-stop to state ProjectTitle.watch-stop; + } + + conform Person as Named { + private state PersonName id "slot:person:name" on Person : string + policy optimistic-register default "Anonymous"; + bind name.get to state PersonName.read; + bind name.set to state PersonName.write; + bind name.watch-start to state PersonName.watch-start; + bind name.watch-stop to state PersonName.watch-stop; + } + + conform Project as Owned { + private edge ProjectOwner id "edge:project:owner" { + atom Project projection owner id "projection:project-owner:owner" exactly-one; + interface Named projection ownedProjects id "projection:project-owner:owned-projects" many; + } + bind owner.resolve to edge ProjectOwner.owner.resolve; + bind owner.connect to edge ProjectOwner.owner.connect; + bind owner.disconnect to edge ProjectOwner.owner.disconnect; + bind owner.watch-start to edge ProjectOwner.owner.watch-start; + bind owner.watch-stop to edge ProjectOwner.owner.watch-stop; + } + + conform Project as Summary { + bind summary.get to package TodoRuntime.summaryGet with { + title to state ProjectTitle; + named to interface Named; + person to constructor Person; + }; + } + + constructor Person to TodoRuntime.createPerson; +} diff --git a/test/resource-lock.test.ts b/test/resource-lock.test.ts new file mode 100644 index 0000000..153c202 --- /dev/null +++ b/test/resource-lock.test.ts @@ -0,0 +1,93 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { + formatQuixosLock, + nixGitInput, + parseQuixosLock, + retentionTagForCommit, +} from "../src/resource-lock/index.js"; + +const quixosCommit = "1".repeat(40); +const namedCommit = "2".repeat(40); +const packageCommit = "3".repeat(64); +const fixture = `quixos-lock version 1 { + quixos source { + repository "https://gitea.example/quixos/quixos.git"; + commit "${quixosCommit}"; + } + + interface Named source { + repository "https://repos.example/alice/interface-named.git"; + commit "${namedCommit}"; + } + + package TodoRuntime source { + repository "ssh://git@repos.example/alice/package-todo-runtime.git"; + commit "${packageCommit}"; + } +} +`; + +test("parses and canonically formats a Git-only repository lock", () => { + const parsed = parseQuixosLock(fixture, "quixos.lock"); + assert.equal(parsed.ok, true); + if (!parsed.ok) return; + assert.equal(parsed.lock.formatVersion, 1); + assert.equal(parsed.lock.quixos.commit, quixosCommit); + assert.deepEqual( + parsed.lock.resources.map(({ kind, binding }) => ({ kind, binding })), + [ + { kind: "interface", binding: "Named" }, + { kind: "package", binding: "TodoRuntime" }, + ], + ); + assert.deepEqual(parseQuixosLock(formatQuixosLock(parsed.lock)), { + ok: true, + lock: parsed.lock, + diagnostics: [], + }); +}); + +test("derives immutable retention and Nix inputs without storing extra identity", () => { + const source = { + resolver: "git" as const, + repository: "https://repos.example/alice/interface-named.git", + commit: namedCommit, + }; + const ref = `refs/tags/quixos-reachability/${namedCommit}`; + assert.equal(retentionTagForCommit(namedCommit.toUpperCase()), ref); + assert.deepEqual(nixGitInput(source), { + type: "git", + url: source.repository, + ref, + rev: namedCommit, + }); +}); + +test("rejects mutable revisions, embedded credentials, and duplicate bindings", () => { + const parsed = parseQuixosLock(`quixos-lock version 1 { + quixos source { + repository "https://user:secret@example/quixos.git"; + commit "main"; + } + interface Named source { + repository "file:///tmp/named"; + commit "${namedCommit}"; + } + interface Named source { + repository "https://repos.example/named.git"; + commit "${namedCommit}"; + } + }`); + assert.equal(parsed.ok, false); + if (parsed.ok) return; + assert.deepEqual( + new Set(parsed.diagnostics.map((entry) => entry.code)), + new Set([ + "invalid-git-commit", + "embedded-git-credential", + "unsupported-git-transport", + "duplicate-resource-binding", + ]), + ); +}); diff --git a/tsconfig.build.json b/tsconfig.build.json index f2c6ef4..42f4803 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -7,5 +7,6 @@ "outDir": "dist", "rootDir": ".", "sourceMap": true - } + }, + "include": ["src/**/*.ts"] } diff --git a/tsconfig.json b/tsconfig.json index 9b8167f..d59a155 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,6 +14,6 @@ "verbatimModuleSyntax": true, "types": ["node"] }, - "include": ["src/**/*.ts"], + "include": ["src/**/*.ts", "test/**/*.ts"], "exclude": ["node_modules", "dist"] } diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 0000000..61a1fc1 --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "allowImportingTsExtensions": false, + "declaration": false, + "noEmit": false, + "outDir": "dist", + "rootDir": ".", + "sourceMap": true + }, + "include": ["src/**/*.ts", "test/**/*.ts"] +} diff --git a/yarn-project.nix b/yarn-project.nix new file mode 100644 index 0000000..32b128f --- /dev/null +++ b/yarn-project.nix @@ -0,0 +1,188 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +{ lib, stdenv, nodejs, git, cacert, fetchurl, writeShellScript, writeShellScriptBin }: +{ src, overrideAttrs ? null, ... } @ args: + +let + + yarnBin = fetchurl { + url = "https://repo.yarnpkg.com/4.18.0/packages/yarnpkg-cli/bin/yarn.js"; + hash = "sha512-/Lhxb+fNDuzhQf/Bi5IZOp35IEwbqDGJwoiDUiP8C75kr0c7qw1emSen2utcryuwfrJ4fMkzjKBA6hJfKh8vfg=="; + }; + + cacheFolder = ".yarn/cache"; + lockfile = ./yarn.lock; + + # Call overrideAttrs on a derivation if a function is provided. + optionalOverride = fn: drv: + if fn == null then drv else drv.overrideAttrs fn; + + # Simple stub that provides the global yarn command. + yarn = writeShellScriptBin "yarn" '' + exec '${nodejs}/bin/node' '${yarnBin}' "$@" + ''; + + # Common attributes between Yarn derivations. + drvCommon = { + # Make sure the build uses the right Node.js version everywhere. + buildInputs = [ nodejs yarn ]; + # All dependencies should already be cached. + yarn_enable_network = "0"; + # Tell node-gyp to use the provided Node.js headers for native code builds. + npm_config_nodedir = nodejs; + }; + + # Comman variables that we set in a Nix build, but not in a Nix shell. + buildVars = '' + # Make Yarn produce friendlier logging for automated builds. + export CI=1 + # Tell node-pre-gyp to never fetch binaries / always build from source. + export npm_config_build_from_source=true + ''; + + # Create derivations for fetching dependencies. + cacheDrvs = let + in lib.mapAttrs (locator: { filename, hash }: stdenv.mkDerivation { + name = lib.strings.sanitizeDerivationName locator; + buildInputs = [ yarn git cacert ]; + buildCommand = '' + cd '${src}' + ${buildVars} + HOME="$TMP" yarn_enable_global_cache=false yarn_cache_folder="$TMP" \ + yarn nixify fetch ${lib.escapeShellArg locator} + # Because we change the cache dir, Yarn may generate a different name. + mv "$TMP/$(sed 's/-[^-]*\.[^-]*$//' <<< "$outputFilename")"-* $out + ''; + outputFilename = filename; + outputHash = hash; + }) cacheEntries; + + # Create a shell snippet to copy dependencies from a list of derivations. + mkCacheBuilderForDrvs = drvs: + writeShellScript "collect-yarn-cache" (lib.concatMapStrings (drv: '' + cp --reflink=auto ${drv} '${drv.outputFilename}' + '') drvs); + + # Main project derivation. + project = stdenv.mkDerivation (drvCommon // { + inherit src; + name = "@quixos/quixos-protocol"; + + configurePhase = '' + ${buildVars} + + # Copy over the Yarn cache. + rm -fr '${cacheFolder}' + mkdir -p '${cacheFolder}' + pushd '${cacheFolder}' > /dev/null + source ${mkCacheBuilderForDrvs (lib.attrValues cacheDrvs)} + popd > /dev/null + + # Yarn may need a writable home directory. + export yarn_global_folder="$TMP" + + # Ensure global cache is disabled. Cache must be part of our output. + touch .yarnrc.yml + sed -i -e '/^enableGlobalCache/d' .yarnrc.yml + echo 'enableGlobalCache: false' >> .yarnrc.yml + + # Some node-gyp calls may call out to npm, which could fail due to an + # read-only home dir. + export HOME="$TMP" + + # running preConfigure after the cache is populated allows for + # preConfigure to contain substituteInPlace for dependencies as well as the + # main project. This is necessary for native bindings that maybe have + # hardcoded values. + runHook preConfigure + + # Run normal Yarn install to complete dependency installation. + yarn install --immutable --immutable-cache + + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + # Move the package contents to the output directory. + if grep -q '"workspaces"' package.json; then + # We can't use `yarn pack` in a workspace setup, because it only + # packages the outer workspace. + mkdir -p "$out/libexec" + mv $PWD "$out/libexec/$name" + else + # - If the package.json has a `files` field, only files matching those patterns are copied + # - Otherwise all files are copied. + yarn pack --out package.tgz + mkdir -p "$out/libexec/$name" + tar xzf package.tgz --directory "$out/libexec/$name" --strip-components=1 + + cp --reflink=auto .yarnrc* "$out/libexec/$name" + cp --reflink=auto ${lockfile} "$out/libexec/$name/yarn.lock" + cp --reflink=auto --recursive .yarn "$out/libexec/$name" + + # Copy the Yarn linker output into the package. + cp --reflink=auto --recursive node_modules "$out/libexec/$name" + fi + + cd "$out/libexec/$name" + + # Invoke a plugin internal command to setup binaries. + mkdir -p "$out/bin" + yarn nixify install-bin $out/bin + + # A package with node_modules doesn't need the cache + yarn cache clean + + runHook postInstall + ''; + + passthru = { + inherit nodejs; + yarn-freestanding = yarn; + yarn = writeShellScriptBin "yarn" '' + exec '${yarn}/bin/yarn' --cwd '${overriddenProject}/libexec/${overriddenProject.name}' "$@" + ''; + }; + }); + + overriddenProject = optionalOverride overrideAttrs project; + +cacheEntries = { +"@bufbuild/protobuf@npm:2.14.1" = { filename = "@bufbuild-protobuf-npm-2.14.1-78e9ea56a2-3f913aca03.zip"; hash = "sha512-P5E6ygPfhBnEsh2ADqVNf2yDalND5l1vaGJ57DVmxJB3KZOO8vlKXifZLo0/StzW4CcRi6Kbp2TSHhxjfN3HAg=="; }; +"@bufbuild/protoc-gen-es@npm:2.14.1" = { filename = "@bufbuild-protoc-gen-es-npm-2.14.1-230b1181a2-79f9fad1d5.zip"; hash = "sha512-efn60dVmXaptZUmyh4oPY/6/rbGHuFNAg/vrI4Ydwizz6mmmYKEvD45Ps8AtJO6ALxcYRBVt5C+0sXEuOgZ1aQ=="; }; +"@bufbuild/protoplugin@npm:2.14.1" = { filename = "@bufbuild-protoplugin-npm-2.14.1-ca1a20a987-6a727aa5a8.zip"; hash = "sha512-anJ6pahI4FA13tkPUOE65Sx3NXutalhHalbU/3ANyBPKxmTgzDC1IBNU5cFY6//rANyDUxbWaqLDhKLp2qXf4w=="; }; +"@types/node@npm:24.13.3" = { filename = "@types-node-npm-24.13.3-b512a0bbeb-a5bc08f49b.zip"; hash = "sha512-pbwI9JuVgdzcqQ4CzXcZejx5mECAdmSULlzVFhpVPU0q6AZPfjKUQQ10jX0Ji1wYSL5/pQwG8pxBk6sWvk5Z6w=="; }; +"@typescript/typescript-linux-arm64@npm:7.0.2" = { filename = "@typescript-typescript-linux-arm64-npm-7.0.2-9cacfc53a0-10c0.zip"; hash = "sha512-s4c7nGT/lQIw6x0IfrL0b3ECy/D0g7UoDLdiIWJoM6EGXk5N/dmXdxUdA8Cr3hV/3nO2BYKTQ6Ai8/zGhiSQ3A=="; }; +"@typescript/typescript-linux-x64@npm:7.0.2" = { filename = "@typescript-typescript-linux-x64-npm-7.0.2-8dd7ff8d24-10c0.zip"; hash = "sha512-k9EUK5CZ3OOPnyslp8SAAonHJpnpPmlaulppI/NmFyCzNs3UN/TLPUkyQia3KIxgbyTzKoXI5L5fl8Uj9bJ7Cg=="; }; +"@typescript/vfs@npm:1.6.4" = { filename = "@typescript-vfs-npm-1.6.4-78935c9d3e-acb9de42f2.zip"; hash = "sha512-rLneQvI/2j9149eQC6EG7zI6L0588OSpTbtFfibTU8pjuzUZPtGjL8hzPzrlkJlhKykLBr1iIWlIYb65v7YvYg=="; }; +"antlr-ng@npm:1.0.10" = { filename = "antlr-ng-npm-1.0.10-840fe729e4-0893eda0fd.zip"; hash = "sha512-CJPtoP3M4dMpwYykUaxo7zdA+pOnISq5cq66bDNyLJvnL1dqN5cakOTnJSu6241VnAiH8yWPr+pZtJlsb+9P6g=="; }; +"antlr4ng@npm:3.0.15" = { filename = "antlr4ng-npm-3.0.15-58a4d495ba-75421480b9.zip"; hash = "sha512-dUIUgLmWAcCuF0HkFHuF4k6egiNuw1TFH75QsthdcTeJRAW0dIk5xH5yCAC9GcChkAa49o+14Bg2xxf6vaaLXA=="; }; +"antlr4ng@npm:3.0.16" = { filename = "antlr4ng-npm-3.0.16-c4e3e7474c-01b51d1d73.zip"; hash = "sha512-AbUdHXPKEvIt/Pcjuj12n0ewLDJhi8cp470iczT6FUoKQLFrDj0fJF+ldWv067uU3rKWoj1z8FLckL5qLEd9EQ=="; }; +"base64-js@npm:1.5.1" = { filename = "base64-js-npm-1.5.1-b2f7275641-f23823513b.zip"; hash = "sha512-8jgjUTtjFzoAEDD65PLavig7manTJK3jrT0UjiGBNGdvHuhWjId8157BxTFY3PLSulJ6l8YGYYkoupndkwECvw=="; }; +"commander@npm:13.1.0" = { filename = "commander-npm-13.1.0-bdbbfaaf9d-7b8c5544bb.zip"; hash = "sha512-e4xVRLunBPvoS3yrLgQ9+FhtXBFKTFtgf4OuUGBwiUDtC1vVg4z4zidTnN4mXBy9Wc48jGsBftPuyJQ+OkFRZA=="; }; +"debug@npm:4.4.3" = { filename = "debug-npm-4.4.3-0105c6123a-d79136ec6c.zip"; hash = "sha512-15E27GyD7L79D2pVk9pqnJHsTX3cS1TIg9bnHsmsy19noaXpbQCjKBlrW1yG02XpjYo6cIVqrxa057GYXmf1pg=="; }; +"fast-printf@npm:1.6.10" = { filename = "fast-printf-npm-1.6.10-c05cca9b81-630cccbef8.zip"; hash = "sha512-YwzMvvg0mm7q2plYyTkenRS1vZUn3SjZ5+nylbAGxkDdyo/CRwz/VepcbJLKUwSIu62/fCT0hSrYw02RVdqddQ=="; }; +"he@npm:1.2.0" = { filename = "he-npm-1.2.0-3b73a2ff07-a27d478bef.zip"; hash = "sha512-on1Hi+/jyBkvAGzdBjmmZ5iXnfpuISXGrFgqGaXr/sYq2D6DguYDYXDYc/RuRTan55W/i5W/fCR/TMCCXMyMFw=="; }; +"luxon@npm:3.5.0" = { filename = "luxon-npm-3.5.0-92bb977f7f-335789bba9.zip"; hash = "sha512-M1eJu6lQd9uDHvmYlO2t6yMCOz6yE3obVqzQ0pAIK2kc95MUPWnjC8Bp7JXwtJ82QZ9I6VHGgBTxn/4SBF40lA=="; }; +"ms@npm:2.1.3" = { filename = "ms-npm-2.1.3-81ff3cfac1-d924b57e73.zip"; hash = "sha512-2SS1fnMSs7Y60h/Fs9wK9eeNYaH8fPtUV+2vJjJr9ivlMHzIf/toYu8cKzOwIzzbXU8BxMlYzA1mCUi2Wih6SA=="; }; +"pako@npm:0.2.9" = { filename = "pako-npm-0.2.9-c88ac0d326-79c1806ebc.zip"; hash = "sha512-ecGAbrzzJbYK5Znk1yJ8LjRte4Kdwg9c8kzvB8k0B53DphxbPIJ4ovehkMSmE+ND6hHlMC2+JS79EXEt9LawQQ=="; }; +"stringtemplate4ts@npm:1.0.9" = { filename = "stringtemplate4ts-npm-1.0.9-df48ae4223-c5f46367d0.zip"; hash = "sha512-xfRjZ9A3XBp8ryC4YZCEL0rv+1Q9dosicN/TxeQsTc9JkBwCp7BowI6MREDAKiApCFlOvO2+0PXolHA9I/VMAg=="; }; +"tiny-inflate@npm:1.0.3" = { filename = "tiny-inflate-npm-1.0.3-a7419a5c65-fab6875372.zip"; hash = "sha512-+raHU3JU9uxEyaLogASP5w2jVCq6KPc82j50yVyr80KjOTcvKmwDLjIjJPAazMA8omwEuiutmz64zz7pm7p/mw=="; }; +"typescript@npm:5.4.5" = { filename = "typescript-npm-5.4.5-8568a42232-2954022ada.zip"; hash = "sha512-KVQCKto0D9PWqeK45TT2XVfJLV85iaJjdUp4q6VJ9+ZSmswZIZE1YKS4FsRtzn30pNKfnxGj3A1CE7t20EMlHg=="; }; +"typescript@npm:7.0.2" = { filename = "typescript-npm-7.0.2-0bde2bcec5-3dcee51ec8.zip"; hash = "sha512-Pc7lHsjDMkkjJbzb999ItmZodR8SfmIq59QbbHFusZGEQkpF4U93UPUPNAIyOItp5ih4WRVfBqXOLfdvEssxzw=="; }; +"typescript@patch:typescript@npm%3A5.4.5#optional!builtin::version=5.4.5&hash=5adc0c" = { filename = "typescript-patch-6e159bfddb-db2ad2a16c.zip"; hash = "sha512-2yrSoWyoKfUEJ+6x2hVeekXlmO7HsIbYtOi6ROWiNfdY5gbWgcZpkiMNP8O4mVhl5f0LIqLJVIbQsyAPgwcuyQ=="; }; +"typescript@patch:typescript@npm%3A7.0.2#optional!builtin::version=7.0.2&hash=3bafbf" = { filename = "typescript-patch-4859cbaf66-6b3cdc369c.zip"; hash = "sha512-azzcNpzYKdRuAHNOpkIz7oRBnCglrY/kCJFa3ed6vO1LeiQB9+7VF9VKek9dHBhpdTy5kBjfHCFZx2HZ8zSDpg=="; }; +"undici-types@npm:7.18.2" = { filename = "undici-types-npm-7.18.2-3e6d69d829-85a7918911.zip"; hash = "sha512-haeRiRE6I4lZ16ZHNo5PfFVZw6QE69uPxEiBRc6UJvzYIlKoRKMCeY38Djfm+xeP9IHtA7xMr2NMV1fZ70NSHQ=="; }; +"unicode-properties@npm:1.4.1" = { filename = "unicode-properties-npm-1.4.1-122054452f-1d140b7945.zip"; hash = "sha512-HRQLeUVmT7DvU96VUXCCHgd7lJ7vN3xuSQWQLwfjOQOScb+ioAXk9MYHSwgNNCC0hsUtyQXhH5JJSaBNH7R//Q=="; }; +"unicode-trie@npm:2.0.0" = { filename = "unicode-trie-npm-2.0.0-54e0a4dd52-2422368645.zip"; hash = "sha512-JCI2hkUknzFWQKHJ6VBgRqp3OPycXVnhXCB83W7GYQHDWwufddw6wo/nvhmq8e/ImLvqB0+h6OKV73Nq63kEuw=="; }; +}; + +in overriddenProject diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..5fba4f4 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,520 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 10 + cacheKey: 10c0 + +"@bufbuild/protobuf@npm:2.14.1, @bufbuild/protobuf@npm:^2.12.1": + version: 2.14.1 + resolution: "@bufbuild/protobuf@npm:2.14.1" + checksum: 10c0/3f913aca03df8419c4b21d800ea54d7f6c836a5343e65d6f686279ec3566c4907729938ef2f94a5e27d92e8d3f4adcd6e027118ba29ba764d21e1c637cddc702 + languageName: node + linkType: hard + +"@bufbuild/protoc-gen-es@npm:^2.12.1": + version: 2.14.1 + resolution: "@bufbuild/protoc-gen-es@npm:2.14.1" + dependencies: + "@bufbuild/protobuf": "npm:2.14.1" + "@bufbuild/protoplugin": "npm:2.14.1" + peerDependencies: + "@bufbuild/protobuf": 2.14.1 + peerDependenciesMeta: + "@bufbuild/protobuf": + optional: true + bin: + protoc-gen-es: bin/protoc-gen-es + checksum: 10c0/79f9fad1d5665daa6d6549b2878a0f63febfadb187b8534083fbeb23861dc22cf3ea69a660a12f0f8e4fb3c02d24ee802f171844156de42fb4b1712e3a067569 + languageName: node + linkType: hard + +"@bufbuild/protoplugin@npm:2.14.1": + version: 2.14.1 + resolution: "@bufbuild/protoplugin@npm:2.14.1" + dependencies: + "@bufbuild/protobuf": "npm:2.14.1" + "@typescript/vfs": "npm:^1.6.2" + typescript: "npm:5.4.5" + checksum: 10c0/6a727aa5a848e05035ded90f50e13ae52c77357bad6a58476a56d4ff700dc813cac664e0cc30b5201354e5c158ebffeb00dc835316d66aa2c384a2e9daa5dfe3 + languageName: node + linkType: hard + +"@quixos/quixos-protocol@workspace:.": + version: 0.0.0-use.local + resolution: "@quixos/quixos-protocol@workspace:." + dependencies: + "@bufbuild/protobuf": "npm:^2.12.1" + "@bufbuild/protoc-gen-es": "npm:^2.12.1" + "@types/node": "npm:^24" + antlr-ng: "npm:^1.0.10" + antlr4ng: "npm:^3.0.16" + typescript: "npm:^7.0.2" + bin: + quixos-capability-compile: dist/src/capability-language/cli.js + quixos-descriptor-check: dist/src/descriptor-check.js + quixos-lock-check: dist/src/resource-lock/cli.js + languageName: unknown + linkType: soft + +"@types/node@npm:^24": + version: 24.13.3 + resolution: "@types/node@npm:24.13.3" + dependencies: + undici-types: "npm:~7.18.0" + checksum: 10c0/a5bc08f49b9581dcdca90e02cd77197a3c799840807664942e5cd5161a553d4d2ae8064f7e3294410d748d7d098b5c1848be7fa50c06f29c4193ab16be4e59eb + languageName: node + linkType: hard + +"@typescript/typescript-aix-ppc64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-aix-ppc64@npm:7.0.2" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + +"@typescript/typescript-darwin-arm64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-darwin-arm64@npm:7.0.2" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/typescript-darwin-x64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-darwin-x64@npm:7.0.2" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@typescript/typescript-freebsd-arm64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-freebsd-arm64@npm:7.0.2" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/typescript-freebsd-x64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-freebsd-x64@npm:7.0.2" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@typescript/typescript-linux-arm64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-arm64@npm:7.0.2" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/typescript-linux-arm@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-arm@npm:7.0.2" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@typescript/typescript-linux-loong64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-loong64@npm:7.0.2" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@typescript/typescript-linux-mips64el@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-mips64el@npm:7.0.2" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@typescript/typescript-linux-ppc64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-ppc64@npm:7.0.2" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@typescript/typescript-linux-riscv64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-riscv64@npm:7.0.2" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@typescript/typescript-linux-s390x@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-s390x@npm:7.0.2" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@typescript/typescript-linux-x64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-x64@npm:7.0.2" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@typescript/typescript-netbsd-arm64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-netbsd-arm64@npm:7.0.2" + conditions: os=netbsd & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/typescript-netbsd-x64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-netbsd-x64@npm:7.0.2" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@typescript/typescript-openbsd-arm64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-openbsd-arm64@npm:7.0.2" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/typescript-openbsd-x64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-openbsd-x64@npm:7.0.2" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@typescript/typescript-sunos-x64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-sunos-x64@npm:7.0.2" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@typescript/typescript-win32-arm64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-win32-arm64@npm:7.0.2" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/typescript-win32-x64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-win32-x64@npm:7.0.2" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@typescript/vfs@npm:^1.6.2": + version: 1.6.4 + resolution: "@typescript/vfs@npm:1.6.4" + dependencies: + debug: "npm:^4.4.3" + peerDependencies: + typescript: "*" + checksum: 10c0/acb9de42f23fda3f75e3d7900ba106ef323a2f4e7cf0e4a94dbb457e26d353ca63bb35193ed1a32fc8733f3ae59099612b290b06bd6221694861beb9bfb62f62 + languageName: node + linkType: hard + +"antlr-ng@npm:^1.0.10": + version: 1.0.10 + resolution: "antlr-ng@npm:1.0.10" + dependencies: + antlr4ng: "npm:3.0.16" + commander: "npm:13.1.0" + stringtemplate4ts: "npm:1.0.9" + unicode-properties: "npm:1.4.1" + bin: + antlr-ng: dist/cli/runner.js + grun: dist/cli/TestRig.js + interpreter: dist/cli/Interpreter.js + testrig: dist/cli/TestRig.js + checksum: 10c0/0893eda0fdcce1d329c18ca451ac68ef3740fa93a7212ab972aeba6c33722c9be72f576a37971a90e4e7252bbadb8d559c0887f3258fafea59b4996c6fef4fea + languageName: node + linkType: hard + +"antlr4ng@npm:3.0.15": + version: 3.0.15 + resolution: "antlr4ng@npm:3.0.15" + checksum: 10c0/75421480b99601c0ae1741e4147b85e24e9e82236ec354c51fbe50b2d85d7137894405b4748939c47e720800bd19c0a19006b8f68fb5e01836c717fabda68b5c + languageName: node + linkType: hard + +"antlr4ng@npm:3.0.16, antlr4ng@npm:^3.0.16": + version: 3.0.16 + resolution: "antlr4ng@npm:3.0.16" + checksum: 10c0/01b51d1d73ca12f22dfcf723ba3d769f47b02c32618bc729e3bd227334fa154a0a40b16b0e3d1f245fa5756bf4ebbb94deb296a23d73f052dc90be6a2c477d11 + languageName: node + linkType: hard + +"base64-js@npm:^1.3.0": + version: 1.5.1 + resolution: "base64-js@npm:1.5.1" + checksum: 10c0/f23823513b63173a001030fae4f2dabe283b99a9d324ade3ad3d148e218134676f1ee8568c877cd79ec1c53158dcf2d2ba527a97c606618928ba99dd930102bf + languageName: node + linkType: hard + +"commander@npm:13.1.0": + version: 13.1.0 + resolution: "commander@npm:13.1.0" + checksum: 10c0/7b8c5544bba704fbe84b7cab2e043df8586d5c114a4c5b607f83ae5060708940ed0b5bd5838cf8ce27539cde265c1cbd59ce3c8c6b017ed3eec8943e3a415164 + languageName: node + linkType: hard + +"debug@npm:^4.4.3": + version: 4.4.3 + resolution: "debug@npm:4.4.3" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10c0/d79136ec6c83ecbefd0f6a5593da6a9c91ec4d7ddc4b54c883d6e71ec9accb5f67a1a5e96d00a328196b5b5c86d365e98d8a3a70856aaf16b4e7b1985e67f5a6 + languageName: node + linkType: hard + +"fast-printf@npm:1.6.10": + version: 1.6.10 + resolution: "fast-printf@npm:1.6.10" + checksum: 10c0/630cccbef8349a6eeada9958c9391e9d14b5bd9527dd28d9e7e9f295b006c640ddca8fc2470cff55ea5c6c92ca530488bbadbf7c24f4852ad8c34d9155da9d75 + languageName: node + linkType: hard + +"he@npm:1.2.0": + version: 1.2.0 + resolution: "he@npm:1.2.0" + bin: + he: bin/he + checksum: 10c0/a27d478befe3c8192f006cdd0639a66798979dfa6e2125c6ac582a19a5ebfec62ad83e8382e6036170d873f46e4536a7e795bf8b95bf7c247f4cc0825ccc8c17 + languageName: node + linkType: hard + +"luxon@npm:3.5.0": + version: 3.5.0 + resolution: "luxon@npm:3.5.0" + checksum: 10c0/335789bba95077db831ef99894edadeb23023b3eb2137a1b56acd0d290082b691cf793143d69e30bc069ec95f0b49f36419f48e951c68014f19ffe12045e3494 + languageName: node + linkType: hard + +"ms@npm:^2.1.3": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 + languageName: node + linkType: hard + +"pako@npm:^0.2.5": + version: 0.2.9 + resolution: "pako@npm:0.2.9" + checksum: 10c0/79c1806ebcf325b60ae599e4d7227c2e346d7b829dc20f5cf24cef07c934079dc3a61c5b3c8278a2f7a190c4a613e343ea11e5302dbe252efd11712df4b6b041 + languageName: node + linkType: hard + +"stringtemplate4ts@npm:1.0.9": + version: 1.0.9 + resolution: "stringtemplate4ts@npm:1.0.9" + dependencies: + antlr4ng: "npm:3.0.15" + fast-printf: "npm:1.6.10" + he: "npm:1.2.0" + luxon: "npm:3.5.0" + checksum: 10c0/c5f46367d0375c1a7caf20b86190842f4aeffb543d768b2270dfd3c5e42c4dcf49901c02a7b068c08e8c4440c02a202908594ebcedbed0f5e894703d23f54c02 + languageName: node + linkType: hard + +"tiny-inflate@npm:^1.0.0": + version: 1.0.3 + resolution: "tiny-inflate@npm:1.0.3" + checksum: 10c0/fab687537254f6ec44c9a2e880048fe70da3542aba28f73cda3e74c95cabf342a339372f2a6c032e322324f01accc03ca26c04ba2bad9b3eb8cf3ee99bba7f9b + languageName: node + linkType: hard + +"typescript@npm:5.4.5": + version: 5.4.5 + resolution: "typescript@npm:5.4.5" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/2954022ada340fd3d6a9e2b8e534f65d57c92d5f3989a263754a78aba549f7e6529acc1921913560a4b816c46dce7df4a4d29f9f11a3dc0d4213bb76d043251e + languageName: node + linkType: hard + +"typescript@npm:^7.0.2": + version: 7.0.2 + resolution: "typescript@npm:7.0.2" + dependencies: + "@typescript/typescript-aix-ppc64": "npm:7.0.2" + "@typescript/typescript-darwin-arm64": "npm:7.0.2" + "@typescript/typescript-darwin-x64": "npm:7.0.2" + "@typescript/typescript-freebsd-arm64": "npm:7.0.2" + "@typescript/typescript-freebsd-x64": "npm:7.0.2" + "@typescript/typescript-linux-arm": "npm:7.0.2" + "@typescript/typescript-linux-arm64": "npm:7.0.2" + "@typescript/typescript-linux-loong64": "npm:7.0.2" + "@typescript/typescript-linux-mips64el": "npm:7.0.2" + "@typescript/typescript-linux-ppc64": "npm:7.0.2" + "@typescript/typescript-linux-riscv64": "npm:7.0.2" + "@typescript/typescript-linux-s390x": "npm:7.0.2" + "@typescript/typescript-linux-x64": "npm:7.0.2" + "@typescript/typescript-netbsd-arm64": "npm:7.0.2" + "@typescript/typescript-netbsd-x64": "npm:7.0.2" + "@typescript/typescript-openbsd-arm64": "npm:7.0.2" + "@typescript/typescript-openbsd-x64": "npm:7.0.2" + "@typescript/typescript-sunos-x64": "npm:7.0.2" + "@typescript/typescript-win32-arm64": "npm:7.0.2" + "@typescript/typescript-win32-x64": "npm:7.0.2" + dependenciesMeta: + "@typescript/typescript-aix-ppc64": + optional: true + "@typescript/typescript-darwin-arm64": + optional: true + "@typescript/typescript-darwin-x64": + optional: true + "@typescript/typescript-freebsd-arm64": + optional: true + "@typescript/typescript-freebsd-x64": + optional: true + "@typescript/typescript-linux-arm": + optional: true + "@typescript/typescript-linux-arm64": + optional: true + "@typescript/typescript-linux-loong64": + optional: true + "@typescript/typescript-linux-mips64el": + optional: true + "@typescript/typescript-linux-ppc64": + optional: true + "@typescript/typescript-linux-riscv64": + optional: true + "@typescript/typescript-linux-s390x": + optional: true + "@typescript/typescript-linux-x64": + optional: true + "@typescript/typescript-netbsd-arm64": + optional: true + "@typescript/typescript-netbsd-x64": + optional: true + "@typescript/typescript-openbsd-arm64": + optional: true + "@typescript/typescript-openbsd-x64": + optional: true + "@typescript/typescript-sunos-x64": + optional: true + "@typescript/typescript-win32-arm64": + optional: true + "@typescript/typescript-win32-x64": + optional: true + bin: + tsc: bin/tsc + checksum: 10c0/3dcee51ec8c332492325bcdbf7df48b66668751f127e622ae7d41b6c716eb19184424a45e14f7750f50f340232388b69e6287859155f06a5ce2df76f12cb31cf + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A5.4.5#optional!builtin": + version: 5.4.5 + resolution: "typescript@patch:typescript@npm%3A5.4.5#optional!builtin::version=5.4.5&hash=5adc0c" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/db2ad2a16ca829f50427eeb1da155e7a45e598eec7b086d8b4e8ba44e5a235f758e606d681c66992230d3fc3b8995865e5fd0b22a2c95486d0b3200f83072ec9 + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A^7.0.2#optional!builtin": + version: 7.0.2 + resolution: "typescript@patch:typescript@npm%3A7.0.2#optional!builtin::version=7.0.2&hash=3bafbf" + dependencies: + "@typescript/typescript-aix-ppc64": "npm:7.0.2" + "@typescript/typescript-darwin-arm64": "npm:7.0.2" + "@typescript/typescript-darwin-x64": "npm:7.0.2" + "@typescript/typescript-freebsd-arm64": "npm:7.0.2" + "@typescript/typescript-freebsd-x64": "npm:7.0.2" + "@typescript/typescript-linux-arm": "npm:7.0.2" + "@typescript/typescript-linux-arm64": "npm:7.0.2" + "@typescript/typescript-linux-loong64": "npm:7.0.2" + "@typescript/typescript-linux-mips64el": "npm:7.0.2" + "@typescript/typescript-linux-ppc64": "npm:7.0.2" + "@typescript/typescript-linux-riscv64": "npm:7.0.2" + "@typescript/typescript-linux-s390x": "npm:7.0.2" + "@typescript/typescript-linux-x64": "npm:7.0.2" + "@typescript/typescript-netbsd-arm64": "npm:7.0.2" + "@typescript/typescript-netbsd-x64": "npm:7.0.2" + "@typescript/typescript-openbsd-arm64": "npm:7.0.2" + "@typescript/typescript-openbsd-x64": "npm:7.0.2" + "@typescript/typescript-sunos-x64": "npm:7.0.2" + "@typescript/typescript-win32-arm64": "npm:7.0.2" + "@typescript/typescript-win32-x64": "npm:7.0.2" + dependenciesMeta: + "@typescript/typescript-aix-ppc64": + optional: true + "@typescript/typescript-darwin-arm64": + optional: true + "@typescript/typescript-darwin-x64": + optional: true + "@typescript/typescript-freebsd-arm64": + optional: true + "@typescript/typescript-freebsd-x64": + optional: true + "@typescript/typescript-linux-arm": + optional: true + "@typescript/typescript-linux-arm64": + optional: true + "@typescript/typescript-linux-loong64": + optional: true + "@typescript/typescript-linux-mips64el": + optional: true + "@typescript/typescript-linux-ppc64": + optional: true + "@typescript/typescript-linux-riscv64": + optional: true + "@typescript/typescript-linux-s390x": + optional: true + "@typescript/typescript-linux-x64": + optional: true + "@typescript/typescript-netbsd-arm64": + optional: true + "@typescript/typescript-netbsd-x64": + optional: true + "@typescript/typescript-openbsd-arm64": + optional: true + "@typescript/typescript-openbsd-x64": + optional: true + "@typescript/typescript-sunos-x64": + optional: true + "@typescript/typescript-win32-arm64": + optional: true + "@typescript/typescript-win32-x64": + optional: true + bin: + tsc: bin/tsc + checksum: 10c0/6b3cdc369cd829d46e00734ea64233ee84419c2825ad8fe408915adde77abced4b7a2401f7eed517d54a7a4f5d1c1869753cb99018df1c2159c761d9f33483a6 + languageName: node + linkType: hard + +"undici-types@npm:~7.18.0": + version: 7.18.2 + resolution: "undici-types@npm:7.18.2" + checksum: 10c0/85a79189113a238959d7a647368e4f7c5559c3a404ebdb8fc4488145ce9426fcd82252a844a302798dfc0e37e6fb178ff481ed03bc4caf634c5757d9ef43521d + languageName: node + linkType: hard + +"unicode-properties@npm:1.4.1": + version: 1.4.1 + resolution: "unicode-properties@npm:1.4.1" + dependencies: + base64-js: "npm:^1.3.0" + unicode-trie: "npm:^2.0.0" + checksum: 10c0/1d140b7945664fb0ef53de955170821e077b949eef377c6e4905902f07e339039271bfa2a005e4f4c6074b080d3420b486c52dc905e11f924949a04d1fb47ffd + languageName: node + linkType: hard + +"unicode-trie@npm:^2.0.0": + version: 2.0.0 + resolution: "unicode-trie@npm:2.0.0" + dependencies: + pako: "npm:^0.2.5" + tiny-inflate: "npm:^1.0.0" + checksum: 10c0/2422368645249f315640a1c9e9506046aa7738fc9c5d59e15c207cdd6ec66101c35b0b9f75dc3ac28fe7be19aaf1efc898bbea074fa1e8e295ef736aeb7904bb + languageName: node + linkType: hard