relay-os 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +389 -0
- package/backend/hooks/relay-antigravity-stop.js +3 -0
- package/backend/hooks/relay-claude-stop.js +3 -0
- package/backend/hooks/relay-codex-stop.js +3 -0
- package/backend/hooks/relay-copilot-stop.js +3 -0
- package/backend/hooks/relay-cursor-stop.js +3 -0
- package/backend/hooks/relay-hook-lib.js +170 -0
- package/backend/lib/relayAuth.js +41 -0
- package/backend/lib/relayCompileIr.js +276 -0
- package/backend/lib/relayContext.js +519 -0
- package/backend/lib/relayDashboard.js +118 -0
- package/backend/lib/relayHooks.js +190 -0
- package/backend/lib/relayInstall.js +339 -0
- package/backend/lib/relayMeta.js +61 -0
- package/backend/lib/relayProjects.js +225 -0
- package/backend/lib/relayServe.js +120 -0
- package/backend/lib/relayStore.js +173 -0
- package/backend/lib/relayUi.js +68 -0
- package/backend/lib/timeline.js +101 -0
- package/backend/lib/vscdb.js +42 -0
- package/backend/lib/vscodeHistory.js +227 -0
- package/backend/lib/vscodeWorkspace.js +77 -0
- package/backend/mcp/server.js +228 -0
- package/backend/node_modules/.bin/mime +16 -0
- package/backend/node_modules/.bin/mime.cmd +17 -0
- package/backend/node_modules/.bin/mime.ps1 +28 -0
- package/backend/node_modules/.package-lock.json +846 -0
- package/backend/node_modules/accepts/HISTORY.md +243 -0
- package/backend/node_modules/accepts/LICENSE +23 -0
- package/backend/node_modules/accepts/README.md +140 -0
- package/backend/node_modules/accepts/index.js +238 -0
- package/backend/node_modules/accepts/package.json +47 -0
- package/backend/node_modules/array-flatten/LICENSE +21 -0
- package/backend/node_modules/array-flatten/README.md +43 -0
- package/backend/node_modules/array-flatten/array-flatten.js +64 -0
- package/backend/node_modules/array-flatten/package.json +39 -0
- package/backend/node_modules/body-parser/HISTORY.md +686 -0
- package/backend/node_modules/body-parser/LICENSE +23 -0
- package/backend/node_modules/body-parser/README.md +476 -0
- package/backend/node_modules/body-parser/index.js +156 -0
- package/backend/node_modules/body-parser/lib/read.js +205 -0
- package/backend/node_modules/body-parser/lib/types/json.js +243 -0
- package/backend/node_modules/body-parser/lib/types/raw.js +101 -0
- package/backend/node_modules/body-parser/lib/types/text.js +121 -0
- package/backend/node_modules/body-parser/lib/types/urlencoded.js +299 -0
- package/backend/node_modules/body-parser/package.json +55 -0
- package/backend/node_modules/bytes/History.md +97 -0
- package/backend/node_modules/bytes/LICENSE +23 -0
- package/backend/node_modules/bytes/Readme.md +152 -0
- package/backend/node_modules/bytes/index.js +170 -0
- package/backend/node_modules/bytes/package.json +42 -0
- package/backend/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/backend/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/backend/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/backend/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/backend/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/backend/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/backend/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/backend/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/backend/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/backend/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/backend/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/backend/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/backend/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/backend/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/backend/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/backend/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/backend/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/backend/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/backend/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/backend/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/backend/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/backend/node_modules/call-bound/.eslintrc +13 -0
- package/backend/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/backend/node_modules/call-bound/.nycrc +9 -0
- package/backend/node_modules/call-bound/CHANGELOG.md +42 -0
- package/backend/node_modules/call-bound/LICENSE +21 -0
- package/backend/node_modules/call-bound/README.md +53 -0
- package/backend/node_modules/call-bound/index.d.ts +94 -0
- package/backend/node_modules/call-bound/index.js +19 -0
- package/backend/node_modules/call-bound/package.json +99 -0
- package/backend/node_modules/call-bound/test/index.js +61 -0
- package/backend/node_modules/call-bound/tsconfig.json +10 -0
- package/backend/node_modules/content-disposition/HISTORY.md +60 -0
- package/backend/node_modules/content-disposition/LICENSE +22 -0
- package/backend/node_modules/content-disposition/README.md +142 -0
- package/backend/node_modules/content-disposition/index.js +458 -0
- package/backend/node_modules/content-disposition/package.json +44 -0
- package/backend/node_modules/content-type/HISTORY.md +29 -0
- package/backend/node_modules/content-type/LICENSE +22 -0
- package/backend/node_modules/content-type/README.md +94 -0
- package/backend/node_modules/content-type/index.js +225 -0
- package/backend/node_modules/content-type/package.json +42 -0
- package/backend/node_modules/cookie/LICENSE +24 -0
- package/backend/node_modules/cookie/README.md +317 -0
- package/backend/node_modules/cookie/SECURITY.md +25 -0
- package/backend/node_modules/cookie/index.js +335 -0
- package/backend/node_modules/cookie/package.json +44 -0
- package/backend/node_modules/cookie-signature/History.md +42 -0
- package/backend/node_modules/cookie-signature/Readme.md +42 -0
- package/backend/node_modules/cookie-signature/index.js +51 -0
- package/backend/node_modules/cookie-signature/package.json +18 -0
- package/backend/node_modules/cors/LICENSE +22 -0
- package/backend/node_modules/cors/README.md +277 -0
- package/backend/node_modules/cors/lib/index.js +238 -0
- package/backend/node_modules/cors/package.json +42 -0
- package/backend/node_modules/debug/.coveralls.yml +1 -0
- package/backend/node_modules/debug/.eslintrc +11 -0
- package/backend/node_modules/debug/.travis.yml +14 -0
- package/backend/node_modules/debug/CHANGELOG.md +362 -0
- package/backend/node_modules/debug/LICENSE +19 -0
- package/backend/node_modules/debug/Makefile +50 -0
- package/backend/node_modules/debug/README.md +312 -0
- package/backend/node_modules/debug/component.json +19 -0
- package/backend/node_modules/debug/karma.conf.js +70 -0
- package/backend/node_modules/debug/node.js +1 -0
- package/backend/node_modules/debug/package.json +49 -0
- package/backend/node_modules/debug/src/browser.js +185 -0
- package/backend/node_modules/debug/src/debug.js +202 -0
- package/backend/node_modules/debug/src/index.js +10 -0
- package/backend/node_modules/debug/src/inspector-log.js +15 -0
- package/backend/node_modules/debug/src/node.js +248 -0
- package/backend/node_modules/depd/History.md +103 -0
- package/backend/node_modules/depd/LICENSE +22 -0
- package/backend/node_modules/depd/Readme.md +280 -0
- package/backend/node_modules/depd/index.js +538 -0
- package/backend/node_modules/depd/lib/browser/index.js +77 -0
- package/backend/node_modules/depd/package.json +45 -0
- package/backend/node_modules/destroy/LICENSE +23 -0
- package/backend/node_modules/destroy/README.md +63 -0
- package/backend/node_modules/destroy/index.js +209 -0
- package/backend/node_modules/destroy/package.json +48 -0
- package/backend/node_modules/dunder-proto/.eslintrc +5 -0
- package/backend/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/backend/node_modules/dunder-proto/.nycrc +13 -0
- package/backend/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/backend/node_modules/dunder-proto/LICENSE +21 -0
- package/backend/node_modules/dunder-proto/README.md +54 -0
- package/backend/node_modules/dunder-proto/get.d.ts +5 -0
- package/backend/node_modules/dunder-proto/get.js +30 -0
- package/backend/node_modules/dunder-proto/package.json +76 -0
- package/backend/node_modules/dunder-proto/set.d.ts +5 -0
- package/backend/node_modules/dunder-proto/set.js +35 -0
- package/backend/node_modules/dunder-proto/test/get.js +34 -0
- package/backend/node_modules/dunder-proto/test/index.js +4 -0
- package/backend/node_modules/dunder-proto/test/set.js +50 -0
- package/backend/node_modules/dunder-proto/tsconfig.json +9 -0
- package/backend/node_modules/ee-first/LICENSE +22 -0
- package/backend/node_modules/ee-first/README.md +80 -0
- package/backend/node_modules/ee-first/index.js +95 -0
- package/backend/node_modules/ee-first/package.json +29 -0
- package/backend/node_modules/encodeurl/LICENSE +22 -0
- package/backend/node_modules/encodeurl/README.md +109 -0
- package/backend/node_modules/encodeurl/index.js +60 -0
- package/backend/node_modules/encodeurl/package.json +40 -0
- package/backend/node_modules/es-define-property/.eslintrc +13 -0
- package/backend/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/backend/node_modules/es-define-property/.nycrc +9 -0
- package/backend/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/backend/node_modules/es-define-property/LICENSE +21 -0
- package/backend/node_modules/es-define-property/README.md +49 -0
- package/backend/node_modules/es-define-property/index.d.ts +3 -0
- package/backend/node_modules/es-define-property/index.js +14 -0
- package/backend/node_modules/es-define-property/package.json +81 -0
- package/backend/node_modules/es-define-property/test/index.js +56 -0
- package/backend/node_modules/es-define-property/tsconfig.json +10 -0
- package/backend/node_modules/es-errors/.eslintrc +5 -0
- package/backend/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/backend/node_modules/es-errors/CHANGELOG.md +40 -0
- package/backend/node_modules/es-errors/LICENSE +21 -0
- package/backend/node_modules/es-errors/README.md +55 -0
- package/backend/node_modules/es-errors/eval.d.ts +3 -0
- package/backend/node_modules/es-errors/eval.js +4 -0
- package/backend/node_modules/es-errors/index.d.ts +3 -0
- package/backend/node_modules/es-errors/index.js +4 -0
- package/backend/node_modules/es-errors/package.json +80 -0
- package/backend/node_modules/es-errors/range.d.ts +3 -0
- package/backend/node_modules/es-errors/range.js +4 -0
- package/backend/node_modules/es-errors/ref.d.ts +3 -0
- package/backend/node_modules/es-errors/ref.js +4 -0
- package/backend/node_modules/es-errors/syntax.d.ts +3 -0
- package/backend/node_modules/es-errors/syntax.js +4 -0
- package/backend/node_modules/es-errors/test/index.js +19 -0
- package/backend/node_modules/es-errors/tsconfig.json +49 -0
- package/backend/node_modules/es-errors/type.d.ts +3 -0
- package/backend/node_modules/es-errors/type.js +4 -0
- package/backend/node_modules/es-errors/uri.d.ts +3 -0
- package/backend/node_modules/es-errors/uri.js +4 -0
- package/backend/node_modules/es-object-atoms/.eslintrc +16 -0
- package/backend/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/backend/node_modules/es-object-atoms/CHANGELOG.md +44 -0
- package/backend/node_modules/es-object-atoms/LICENSE +21 -0
- package/backend/node_modules/es-object-atoms/README.md +63 -0
- package/backend/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/backend/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/backend/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/backend/node_modules/es-object-atoms/ToObject.js +10 -0
- package/backend/node_modules/es-object-atoms/index.d.ts +3 -0
- package/backend/node_modules/es-object-atoms/index.js +4 -0
- package/backend/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/backend/node_modules/es-object-atoms/isObject.js +6 -0
- package/backend/node_modules/es-object-atoms/package.json +79 -0
- package/backend/node_modules/es-object-atoms/test/index.js +38 -0
- package/backend/node_modules/es-object-atoms/tsconfig.json +7 -0
- package/backend/node_modules/escape-html/LICENSE +24 -0
- package/backend/node_modules/escape-html/Readme.md +43 -0
- package/backend/node_modules/escape-html/index.js +78 -0
- package/backend/node_modules/escape-html/package.json +24 -0
- package/backend/node_modules/etag/HISTORY.md +83 -0
- package/backend/node_modules/etag/LICENSE +22 -0
- package/backend/node_modules/etag/README.md +159 -0
- package/backend/node_modules/etag/index.js +131 -0
- package/backend/node_modules/etag/package.json +47 -0
- package/backend/node_modules/express/History.md +3676 -0
- package/backend/node_modules/express/LICENSE +24 -0
- package/backend/node_modules/express/Readme.md +260 -0
- package/backend/node_modules/express/index.js +11 -0
- package/backend/node_modules/express/lib/application.js +661 -0
- package/backend/node_modules/express/lib/express.js +116 -0
- package/backend/node_modules/express/lib/middleware/init.js +43 -0
- package/backend/node_modules/express/lib/middleware/query.js +47 -0
- package/backend/node_modules/express/lib/request.js +525 -0
- package/backend/node_modules/express/lib/response.js +1179 -0
- package/backend/node_modules/express/lib/router/index.js +673 -0
- package/backend/node_modules/express/lib/router/layer.js +181 -0
- package/backend/node_modules/express/lib/router/route.js +230 -0
- package/backend/node_modules/express/lib/utils.js +304 -0
- package/backend/node_modules/express/lib/view.js +182 -0
- package/backend/node_modules/express/package.json +102 -0
- package/backend/node_modules/finalhandler/HISTORY.md +216 -0
- package/backend/node_modules/finalhandler/LICENSE +22 -0
- package/backend/node_modules/finalhandler/README.md +147 -0
- package/backend/node_modules/finalhandler/SECURITY.md +25 -0
- package/backend/node_modules/finalhandler/index.js +341 -0
- package/backend/node_modules/finalhandler/package.json +47 -0
- package/backend/node_modules/forwarded/HISTORY.md +21 -0
- package/backend/node_modules/forwarded/LICENSE +22 -0
- package/backend/node_modules/forwarded/README.md +57 -0
- package/backend/node_modules/forwarded/index.js +90 -0
- package/backend/node_modules/forwarded/package.json +45 -0
- package/backend/node_modules/fresh/HISTORY.md +70 -0
- package/backend/node_modules/fresh/LICENSE +23 -0
- package/backend/node_modules/fresh/README.md +119 -0
- package/backend/node_modules/fresh/index.js +137 -0
- package/backend/node_modules/fresh/package.json +46 -0
- package/backend/node_modules/function-bind/.eslintrc +21 -0
- package/backend/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/backend/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/backend/node_modules/function-bind/.nycrc +13 -0
- package/backend/node_modules/function-bind/CHANGELOG.md +136 -0
- package/backend/node_modules/function-bind/LICENSE +20 -0
- package/backend/node_modules/function-bind/README.md +46 -0
- package/backend/node_modules/function-bind/implementation.js +84 -0
- package/backend/node_modules/function-bind/index.js +5 -0
- package/backend/node_modules/function-bind/package.json +87 -0
- package/backend/node_modules/function-bind/test/.eslintrc +9 -0
- package/backend/node_modules/function-bind/test/index.js +252 -0
- package/backend/node_modules/get-intrinsic/.eslintrc +42 -0
- package/backend/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/backend/node_modules/get-intrinsic/.nycrc +9 -0
- package/backend/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/backend/node_modules/get-intrinsic/LICENSE +21 -0
- package/backend/node_modules/get-intrinsic/README.md +71 -0
- package/backend/node_modules/get-intrinsic/index.js +378 -0
- package/backend/node_modules/get-intrinsic/package.json +97 -0
- package/backend/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/backend/node_modules/get-proto/.eslintrc +10 -0
- package/backend/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/backend/node_modules/get-proto/.nycrc +9 -0
- package/backend/node_modules/get-proto/CHANGELOG.md +21 -0
- package/backend/node_modules/get-proto/LICENSE +21 -0
- package/backend/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/backend/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/backend/node_modules/get-proto/README.md +50 -0
- package/backend/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/backend/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/backend/node_modules/get-proto/index.d.ts +5 -0
- package/backend/node_modules/get-proto/index.js +27 -0
- package/backend/node_modules/get-proto/package.json +81 -0
- package/backend/node_modules/get-proto/test/index.js +68 -0
- package/backend/node_modules/get-proto/tsconfig.json +9 -0
- package/backend/node_modules/gopd/.eslintrc +16 -0
- package/backend/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/backend/node_modules/gopd/CHANGELOG.md +45 -0
- package/backend/node_modules/gopd/LICENSE +21 -0
- package/backend/node_modules/gopd/README.md +40 -0
- package/backend/node_modules/gopd/gOPD.d.ts +1 -0
- package/backend/node_modules/gopd/gOPD.js +4 -0
- package/backend/node_modules/gopd/index.d.ts +5 -0
- package/backend/node_modules/gopd/index.js +15 -0
- package/backend/node_modules/gopd/package.json +77 -0
- package/backend/node_modules/gopd/test/index.js +36 -0
- package/backend/node_modules/gopd/tsconfig.json +9 -0
- package/backend/node_modules/has-symbols/.eslintrc +11 -0
- package/backend/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/backend/node_modules/has-symbols/.nycrc +9 -0
- package/backend/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/backend/node_modules/has-symbols/LICENSE +21 -0
- package/backend/node_modules/has-symbols/README.md +46 -0
- package/backend/node_modules/has-symbols/index.d.ts +3 -0
- package/backend/node_modules/has-symbols/index.js +14 -0
- package/backend/node_modules/has-symbols/package.json +111 -0
- package/backend/node_modules/has-symbols/shams.d.ts +3 -0
- package/backend/node_modules/has-symbols/shams.js +45 -0
- package/backend/node_modules/has-symbols/test/index.js +22 -0
- package/backend/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/backend/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/backend/node_modules/has-symbols/test/tests.js +58 -0
- package/backend/node_modules/has-symbols/tsconfig.json +10 -0
- package/backend/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/backend/node_modules/hasown/.nycrc +13 -0
- package/backend/node_modules/hasown/CHANGELOG.md +58 -0
- package/backend/node_modules/hasown/LICENSE +21 -0
- package/backend/node_modules/hasown/README.md +40 -0
- package/backend/node_modules/hasown/eslint.config.mjs +6 -0
- package/backend/node_modules/hasown/index.d.ts +3 -0
- package/backend/node_modules/hasown/index.js +8 -0
- package/backend/node_modules/hasown/package.json +91 -0
- package/backend/node_modules/hasown/tsconfig.json +6 -0
- package/backend/node_modules/http-errors/HISTORY.md +186 -0
- package/backend/node_modules/http-errors/LICENSE +23 -0
- package/backend/node_modules/http-errors/README.md +169 -0
- package/backend/node_modules/http-errors/index.js +290 -0
- package/backend/node_modules/http-errors/package.json +54 -0
- package/backend/node_modules/iconv-lite/Changelog.md +162 -0
- package/backend/node_modules/iconv-lite/LICENSE +21 -0
- package/backend/node_modules/iconv-lite/README.md +156 -0
- package/backend/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
- package/backend/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- package/backend/node_modules/iconv-lite/encodings/index.js +22 -0
- package/backend/node_modules/iconv-lite/encodings/internal.js +188 -0
- package/backend/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/backend/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/backend/node_modules/iconv-lite/encodings/sbcs-data.js +174 -0
- package/backend/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/backend/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/backend/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/backend/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/backend/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/backend/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/backend/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- package/backend/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/backend/node_modules/iconv-lite/encodings/utf16.js +177 -0
- package/backend/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/backend/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/backend/node_modules/iconv-lite/lib/extend-node.js +217 -0
- package/backend/node_modules/iconv-lite/lib/index.d.ts +24 -0
- package/backend/node_modules/iconv-lite/lib/index.js +153 -0
- package/backend/node_modules/iconv-lite/lib/streams.js +121 -0
- package/backend/node_modules/iconv-lite/package.json +46 -0
- package/backend/node_modules/inherits/LICENSE +16 -0
- package/backend/node_modules/inherits/README.md +42 -0
- package/backend/node_modules/inherits/inherits.js +9 -0
- package/backend/node_modules/inherits/inherits_browser.js +27 -0
- package/backend/node_modules/inherits/package.json +29 -0
- package/backend/node_modules/ipaddr.js/LICENSE +19 -0
- package/backend/node_modules/ipaddr.js/README.md +233 -0
- package/backend/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- package/backend/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
- package/backend/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
- package/backend/node_modules/ipaddr.js/package.json +35 -0
- package/backend/node_modules/math-intrinsics/.eslintrc +16 -0
- package/backend/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/backend/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/backend/node_modules/math-intrinsics/LICENSE +21 -0
- package/backend/node_modules/math-intrinsics/README.md +50 -0
- package/backend/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/backend/node_modules/math-intrinsics/abs.js +4 -0
- package/backend/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/backend/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/backend/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/backend/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/backend/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/backend/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/backend/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/backend/node_modules/math-intrinsics/floor.js +4 -0
- package/backend/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/backend/node_modules/math-intrinsics/isFinite.js +12 -0
- package/backend/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/backend/node_modules/math-intrinsics/isInteger.js +16 -0
- package/backend/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/backend/node_modules/math-intrinsics/isNaN.js +6 -0
- package/backend/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/backend/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/backend/node_modules/math-intrinsics/max.d.ts +1 -0
- package/backend/node_modules/math-intrinsics/max.js +4 -0
- package/backend/node_modules/math-intrinsics/min.d.ts +1 -0
- package/backend/node_modules/math-intrinsics/min.js +4 -0
- package/backend/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/backend/node_modules/math-intrinsics/mod.js +9 -0
- package/backend/node_modules/math-intrinsics/package.json +86 -0
- package/backend/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/backend/node_modules/math-intrinsics/pow.js +4 -0
- package/backend/node_modules/math-intrinsics/round.d.ts +1 -0
- package/backend/node_modules/math-intrinsics/round.js +4 -0
- package/backend/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/backend/node_modules/math-intrinsics/sign.js +11 -0
- package/backend/node_modules/math-intrinsics/test/index.js +192 -0
- package/backend/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/backend/node_modules/media-typer/HISTORY.md +22 -0
- package/backend/node_modules/media-typer/LICENSE +22 -0
- package/backend/node_modules/media-typer/README.md +81 -0
- package/backend/node_modules/media-typer/index.js +270 -0
- package/backend/node_modules/media-typer/package.json +26 -0
- package/backend/node_modules/merge-descriptors/HISTORY.md +21 -0
- package/backend/node_modules/merge-descriptors/LICENSE +23 -0
- package/backend/node_modules/merge-descriptors/README.md +49 -0
- package/backend/node_modules/merge-descriptors/index.js +60 -0
- package/backend/node_modules/merge-descriptors/package.json +39 -0
- package/backend/node_modules/methods/HISTORY.md +29 -0
- package/backend/node_modules/methods/LICENSE +24 -0
- package/backend/node_modules/methods/README.md +51 -0
- package/backend/node_modules/methods/index.js +69 -0
- package/backend/node_modules/methods/package.json +36 -0
- package/backend/node_modules/mime/CHANGELOG.md +164 -0
- package/backend/node_modules/mime/LICENSE +21 -0
- package/backend/node_modules/mime/README.md +90 -0
- package/backend/node_modules/mime/cli.js +8 -0
- package/backend/node_modules/mime/mime.js +108 -0
- package/backend/node_modules/mime/package.json +44 -0
- package/backend/node_modules/mime/src/build.js +53 -0
- package/backend/node_modules/mime/src/test.js +60 -0
- package/backend/node_modules/mime/types.json +1 -0
- package/backend/node_modules/mime-db/HISTORY.md +507 -0
- package/backend/node_modules/mime-db/LICENSE +23 -0
- package/backend/node_modules/mime-db/README.md +100 -0
- package/backend/node_modules/mime-db/db.json +8519 -0
- package/backend/node_modules/mime-db/index.js +12 -0
- package/backend/node_modules/mime-db/package.json +60 -0
- package/backend/node_modules/mime-types/HISTORY.md +397 -0
- package/backend/node_modules/mime-types/LICENSE +23 -0
- package/backend/node_modules/mime-types/README.md +113 -0
- package/backend/node_modules/mime-types/index.js +188 -0
- package/backend/node_modules/mime-types/package.json +44 -0
- package/backend/node_modules/ms/index.js +152 -0
- package/backend/node_modules/ms/license.md +21 -0
- package/backend/node_modules/ms/package.json +37 -0
- package/backend/node_modules/ms/readme.md +51 -0
- package/backend/node_modules/negotiator/HISTORY.md +108 -0
- package/backend/node_modules/negotiator/LICENSE +24 -0
- package/backend/node_modules/negotiator/README.md +203 -0
- package/backend/node_modules/negotiator/index.js +82 -0
- package/backend/node_modules/negotiator/lib/charset.js +169 -0
- package/backend/node_modules/negotiator/lib/encoding.js +184 -0
- package/backend/node_modules/negotiator/lib/language.js +179 -0
- package/backend/node_modules/negotiator/lib/mediaType.js +294 -0
- package/backend/node_modules/negotiator/package.json +42 -0
- package/backend/node_modules/object-assign/index.js +90 -0
- package/backend/node_modules/object-assign/license +21 -0
- package/backend/node_modules/object-assign/package.json +42 -0
- package/backend/node_modules/object-assign/readme.md +61 -0
- package/backend/node_modules/object-inspect/.eslintrc +53 -0
- package/backend/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/backend/node_modules/object-inspect/.nycrc +13 -0
- package/backend/node_modules/object-inspect/CHANGELOG.md +424 -0
- package/backend/node_modules/object-inspect/LICENSE +21 -0
- package/backend/node_modules/object-inspect/example/all.js +23 -0
- package/backend/node_modules/object-inspect/example/circular.js +6 -0
- package/backend/node_modules/object-inspect/example/fn.js +5 -0
- package/backend/node_modules/object-inspect/example/inspect.js +10 -0
- package/backend/node_modules/object-inspect/index.js +544 -0
- package/backend/node_modules/object-inspect/package-support.json +20 -0
- package/backend/node_modules/object-inspect/package.json +105 -0
- package/backend/node_modules/object-inspect/readme.markdown +84 -0
- package/backend/node_modules/object-inspect/test/bigint.js +58 -0
- package/backend/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/backend/node_modules/object-inspect/test/circular.js +16 -0
- package/backend/node_modules/object-inspect/test/deep.js +12 -0
- package/backend/node_modules/object-inspect/test/element.js +53 -0
- package/backend/node_modules/object-inspect/test/err.js +48 -0
- package/backend/node_modules/object-inspect/test/fakes.js +29 -0
- package/backend/node_modules/object-inspect/test/fn.js +76 -0
- package/backend/node_modules/object-inspect/test/global.js +17 -0
- package/backend/node_modules/object-inspect/test/has.js +15 -0
- package/backend/node_modules/object-inspect/test/holes.js +15 -0
- package/backend/node_modules/object-inspect/test/indent-option.js +271 -0
- package/backend/node_modules/object-inspect/test/inspect.js +139 -0
- package/backend/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/backend/node_modules/object-inspect/test/number.js +58 -0
- package/backend/node_modules/object-inspect/test/quoteStyle.js +26 -0
- package/backend/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/backend/node_modules/object-inspect/test/undef.js +12 -0
- package/backend/node_modules/object-inspect/test/values.js +261 -0
- package/backend/node_modules/object-inspect/test-core-js.js +26 -0
- package/backend/node_modules/object-inspect/util.inspect.js +1 -0
- package/backend/node_modules/on-finished/HISTORY.md +98 -0
- package/backend/node_modules/on-finished/LICENSE +23 -0
- package/backend/node_modules/on-finished/README.md +162 -0
- package/backend/node_modules/on-finished/index.js +234 -0
- package/backend/node_modules/on-finished/package.json +39 -0
- package/backend/node_modules/parseurl/HISTORY.md +58 -0
- package/backend/node_modules/parseurl/LICENSE +24 -0
- package/backend/node_modules/parseurl/README.md +133 -0
- package/backend/node_modules/parseurl/index.js +158 -0
- package/backend/node_modules/parseurl/package.json +40 -0
- package/backend/node_modules/path-to-regexp/LICENSE +21 -0
- package/backend/node_modules/path-to-regexp/Readme.md +35 -0
- package/backend/node_modules/path-to-regexp/index.js +158 -0
- package/backend/node_modules/path-to-regexp/package.json +30 -0
- package/backend/node_modules/proxy-addr/HISTORY.md +161 -0
- package/backend/node_modules/proxy-addr/LICENSE +22 -0
- package/backend/node_modules/proxy-addr/README.md +139 -0
- package/backend/node_modules/proxy-addr/index.js +327 -0
- package/backend/node_modules/proxy-addr/package.json +47 -0
- package/backend/node_modules/qs/.editorconfig +46 -0
- package/backend/node_modules/qs/.github/FUNDING.yml +12 -0
- package/backend/node_modules/qs/.github/SECURITY.md +11 -0
- package/backend/node_modules/qs/.github/THREAT_MODEL.md +78 -0
- package/backend/node_modules/qs/.nycrc +13 -0
- package/backend/node_modules/qs/CHANGELOG.md +822 -0
- package/backend/node_modules/qs/LICENSE.md +29 -0
- package/backend/node_modules/qs/README.md +758 -0
- package/backend/node_modules/qs/dist/qs.js +141 -0
- package/backend/node_modules/qs/eslint.config.mjs +57 -0
- package/backend/node_modules/qs/lib/formats.js +23 -0
- package/backend/node_modules/qs/lib/index.js +11 -0
- package/backend/node_modules/qs/lib/parse.js +403 -0
- package/backend/node_modules/qs/lib/stringify.js +363 -0
- package/backend/node_modules/qs/lib/utils.js +342 -0
- package/backend/node_modules/qs/package.json +94 -0
- package/backend/node_modules/qs/test/empty-keys-cases.js +267 -0
- package/backend/node_modules/qs/test/parse.js +1703 -0
- package/backend/node_modules/qs/test/stringify.js +1448 -0
- package/backend/node_modules/qs/test/utils.js +432 -0
- package/backend/node_modules/range-parser/HISTORY.md +56 -0
- package/backend/node_modules/range-parser/LICENSE +23 -0
- package/backend/node_modules/range-parser/README.md +84 -0
- package/backend/node_modules/range-parser/index.js +162 -0
- package/backend/node_modules/range-parser/package.json +44 -0
- package/backend/node_modules/raw-body/LICENSE +22 -0
- package/backend/node_modules/raw-body/README.md +223 -0
- package/backend/node_modules/raw-body/index.d.ts +87 -0
- package/backend/node_modules/raw-body/index.js +336 -0
- package/backend/node_modules/raw-body/package.json +47 -0
- package/backend/node_modules/safe-buffer/LICENSE +21 -0
- package/backend/node_modules/safe-buffer/README.md +584 -0
- package/backend/node_modules/safe-buffer/index.d.ts +187 -0
- package/backend/node_modules/safe-buffer/index.js +65 -0
- package/backend/node_modules/safe-buffer/package.json +51 -0
- package/backend/node_modules/safer-buffer/LICENSE +21 -0
- package/backend/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/backend/node_modules/safer-buffer/Readme.md +156 -0
- package/backend/node_modules/safer-buffer/dangerous.js +58 -0
- package/backend/node_modules/safer-buffer/package.json +34 -0
- package/backend/node_modules/safer-buffer/safer.js +77 -0
- package/backend/node_modules/safer-buffer/tests.js +406 -0
- package/backend/node_modules/send/HISTORY.md +538 -0
- package/backend/node_modules/send/LICENSE +23 -0
- package/backend/node_modules/send/README.md +327 -0
- package/backend/node_modules/send/SECURITY.md +24 -0
- package/backend/node_modules/send/index.js +1142 -0
- package/backend/node_modules/send/node_modules/ms/index.js +162 -0
- package/backend/node_modules/send/node_modules/ms/license.md +21 -0
- package/backend/node_modules/send/node_modules/ms/package.json +38 -0
- package/backend/node_modules/send/node_modules/ms/readme.md +59 -0
- package/backend/node_modules/send/package.json +62 -0
- package/backend/node_modules/serve-static/HISTORY.md +493 -0
- package/backend/node_modules/serve-static/LICENSE +25 -0
- package/backend/node_modules/serve-static/README.md +257 -0
- package/backend/node_modules/serve-static/index.js +209 -0
- package/backend/node_modules/serve-static/package.json +42 -0
- package/backend/node_modules/setprototypeof/LICENSE +13 -0
- package/backend/node_modules/setprototypeof/README.md +31 -0
- package/backend/node_modules/setprototypeof/index.d.ts +2 -0
- package/backend/node_modules/setprototypeof/index.js +17 -0
- package/backend/node_modules/setprototypeof/package.json +38 -0
- package/backend/node_modules/setprototypeof/test/index.js +24 -0
- package/backend/node_modules/side-channel/.editorconfig +9 -0
- package/backend/node_modules/side-channel/.eslintrc +12 -0
- package/backend/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/backend/node_modules/side-channel/.nycrc +13 -0
- package/backend/node_modules/side-channel/CHANGELOG.md +120 -0
- package/backend/node_modules/side-channel/LICENSE +21 -0
- package/backend/node_modules/side-channel/README.md +61 -0
- package/backend/node_modules/side-channel/index.d.ts +14 -0
- package/backend/node_modules/side-channel/index.js +46 -0
- package/backend/node_modules/side-channel/package.json +85 -0
- package/backend/node_modules/side-channel/test/index.js +120 -0
- package/backend/node_modules/side-channel/tsconfig.json +9 -0
- package/backend/node_modules/side-channel-list/.editorconfig +9 -0
- package/backend/node_modules/side-channel-list/.eslintrc +11 -0
- package/backend/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/backend/node_modules/side-channel-list/.nycrc +13 -0
- package/backend/node_modules/side-channel-list/CHANGELOG.md +36 -0
- package/backend/node_modules/side-channel-list/LICENSE +21 -0
- package/backend/node_modules/side-channel-list/README.md +62 -0
- package/backend/node_modules/side-channel-list/index.d.ts +13 -0
- package/backend/node_modules/side-channel-list/index.js +111 -0
- package/backend/node_modules/side-channel-list/list.d.ts +14 -0
- package/backend/node_modules/side-channel-list/package.json +77 -0
- package/backend/node_modules/side-channel-list/test/index.js +154 -0
- package/backend/node_modules/side-channel-list/tsconfig.json +9 -0
- package/backend/node_modules/side-channel-map/.editorconfig +9 -0
- package/backend/node_modules/side-channel-map/.eslintrc +11 -0
- package/backend/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/backend/node_modules/side-channel-map/.nycrc +13 -0
- package/backend/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/backend/node_modules/side-channel-map/LICENSE +21 -0
- package/backend/node_modules/side-channel-map/README.md +62 -0
- package/backend/node_modules/side-channel-map/index.d.ts +15 -0
- package/backend/node_modules/side-channel-map/index.js +68 -0
- package/backend/node_modules/side-channel-map/package.json +80 -0
- package/backend/node_modules/side-channel-map/test/index.js +114 -0
- package/backend/node_modules/side-channel-map/tsconfig.json +9 -0
- package/backend/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/backend/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/backend/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/backend/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/backend/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/backend/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/backend/node_modules/side-channel-weakmap/README.md +62 -0
- package/backend/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/backend/node_modules/side-channel-weakmap/index.js +84 -0
- package/backend/node_modules/side-channel-weakmap/package.json +87 -0
- package/backend/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/backend/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/backend/node_modules/statuses/HISTORY.md +87 -0
- package/backend/node_modules/statuses/LICENSE +23 -0
- package/backend/node_modules/statuses/README.md +139 -0
- package/backend/node_modules/statuses/codes.json +65 -0
- package/backend/node_modules/statuses/index.js +146 -0
- package/backend/node_modules/statuses/package.json +49 -0
- package/backend/node_modules/toidentifier/HISTORY.md +9 -0
- package/backend/node_modules/toidentifier/LICENSE +21 -0
- package/backend/node_modules/toidentifier/README.md +61 -0
- package/backend/node_modules/toidentifier/index.js +32 -0
- package/backend/node_modules/toidentifier/package.json +38 -0
- package/backend/node_modules/type-is/HISTORY.md +259 -0
- package/backend/node_modules/type-is/LICENSE +23 -0
- package/backend/node_modules/type-is/README.md +170 -0
- package/backend/node_modules/type-is/index.js +266 -0
- package/backend/node_modules/type-is/package.json +45 -0
- package/backend/node_modules/unpipe/HISTORY.md +4 -0
- package/backend/node_modules/unpipe/LICENSE +22 -0
- package/backend/node_modules/unpipe/README.md +43 -0
- package/backend/node_modules/unpipe/index.js +69 -0
- package/backend/node_modules/unpipe/package.json +27 -0
- package/backend/node_modules/utils-merge/LICENSE +20 -0
- package/backend/node_modules/utils-merge/README.md +34 -0
- package/backend/node_modules/utils-merge/index.js +23 -0
- package/backend/node_modules/utils-merge/package.json +40 -0
- package/backend/node_modules/vary/HISTORY.md +39 -0
- package/backend/node_modules/vary/LICENSE +22 -0
- package/backend/node_modules/vary/README.md +101 -0
- package/backend/node_modules/vary/index.js +149 -0
- package/backend/node_modules/vary/package.json +43 -0
- package/backend/package-lock.json +854 -0
- package/backend/package.json +14 -0
- package/backend/parsers/antigravity.js +206 -0
- package/backend/parsers/claude.js +92 -0
- package/backend/parsers/codex.js +86 -0
- package/backend/parsers/copilot.js +379 -0
- package/backend/parsers/copilotEditingSessions.js +118 -0
- package/backend/parsers/cursor.js +215 -0
- package/backend/relay.js +835 -0
- package/backend/scripts/relay-context.js +9 -0
- package/backend/server.js +314 -0
- package/bin/relay.js +312 -0
- package/docs/QUICKSTART.md +94 -0
- package/mission-control/AGENTS.md +5 -0
- package/mission-control/CLAUDE.md +1 -0
- package/mission-control/README.md +20 -0
- package/mission-control/eslint.config.mjs +18 -0
- package/mission-control/next.config.ts +7 -0
- package/mission-control/package-lock.json +6695 -0
- package/mission-control/package.json +26 -0
- package/mission-control/page.css +1793 -0
- package/mission-control/page.html +1 -0
- package/mission-control/postcss.config.mjs +7 -0
- package/mission-control/public/file.svg +1 -0
- package/mission-control/public/globe.svg +1 -0
- package/mission-control/public/logos/1f733bb7-c1b3-4292-a7f7-71aafa2addaa.jpeg +0 -0
- package/mission-control/public/logos/Claude.png +0 -0
- package/mission-control/public/logos/Codex.png +0 -0
- package/mission-control/public/logos/Gemini_Generated_Image_7qmndr7qmndr7qmn.png +0 -0
- package/mission-control/public/logos/antigravity.png +0 -0
- package/mission-control/public/logos/cursor.png +0 -0
- package/mission-control/public/logos/github-copilot.png +0 -0
- package/mission-control/public/logos/logo.avif +0 -0
- package/mission-control/public/logos/logo.jpg +0 -0
- package/mission-control/public/logos/logo.png +0 -0
- package/mission-control/public/next.svg +1 -0
- package/mission-control/public/vercel.svg +1 -0
- package/mission-control/public/window.svg +1 -0
- package/mission-control/src/app/api/fs/route.ts +49 -0
- package/mission-control/src/app/globals.css +102 -0
- package/mission-control/src/app/layout.tsx +31 -0
- package/mission-control/src/app/onboarding/page.module.css +133 -0
- package/mission-control/src/app/onboarding/page.tsx +98 -0
- package/mission-control/src/app/page.module.css +51 -0
- package/mission-control/src/app/page.tsx +40 -0
- package/mission-control/src/components/ActivityTimeline.module.css +282 -0
- package/mission-control/src/components/ActivityTimeline.tsx +262 -0
- package/mission-control/src/components/AgentSessionChat.module.css +220 -0
- package/mission-control/src/components/AgentSessionChat.tsx +276 -0
- package/mission-control/src/components/CollaboratorsPanel.module.css +119 -0
- package/mission-control/src/components/CollaboratorsPanel.tsx +123 -0
- package/mission-control/src/components/ContextMemory.module.css +79 -0
- package/mission-control/src/components/ContextMemory.tsx +66 -0
- package/mission-control/src/components/DirectoryPicker.tsx +194 -0
- package/mission-control/src/components/GlobalHeader.module.css +165 -0
- package/mission-control/src/components/GlobalHeader.tsx +82 -0
- package/mission-control/src/components/ProjectDashboard.module.css +268 -0
- package/mission-control/src/components/ProjectDashboard.tsx +174 -0
- package/mission-control/src/components/RelayBrainPanel.module.css +85 -0
- package/mission-control/src/components/RelayBrainPanel.tsx +74 -0
- package/mission-control/src/components/Sidebar.module.css +201 -0
- package/mission-control/src/components/Sidebar.tsx +136 -0
- package/mission-control/src/components/TaskQueue.module.css +92 -0
- package/mission-control/src/components/TaskQueue.tsx +51 -0
- package/mission-control/src/components/WorkspaceRail.module.css +188 -0
- package/mission-control/src/components/WorkspaceRail.tsx +56 -0
- package/mission-control/src/lib/RelayContext.tsx +314 -0
- package/mission-control/src/lib/relay.ts +280 -0
- package/mission-control/src/lib/workspaces.ts +53 -0
- package/mission-control/tsconfig.json +34 -0
- package/package.json +48 -0
- package/scripts/postinstall.js +19 -0
- package/skills/relay-sync/SKILL.md +32 -0
- package/skills/relay-sync/agent-install.md +17 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const { execSync } = require('child_process');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
|
|
4
|
+
function queryVscdb(dbPath, sql) {
|
|
5
|
+
if (!fs.existsSync(dbPath)) return null;
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
const out = execSync(`sqlite3 "${dbPath.replace(/"/g, '""')}" "${sql.replace(/"/g, '""')}"`, {
|
|
9
|
+
encoding: 'utf-8',
|
|
10
|
+
timeout: 5000,
|
|
11
|
+
windowsHide: true,
|
|
12
|
+
});
|
|
13
|
+
return out.trim();
|
|
14
|
+
} catch (_) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function readVscdbJson(dbPath, key) {
|
|
20
|
+
const raw = queryVscdb(dbPath, `SELECT value FROM ItemTable WHERE key='${key.replace(/'/g, "''")}';`);
|
|
21
|
+
if (!raw) return null;
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
return JSON.parse(raw);
|
|
25
|
+
} catch (_) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function vscodeInternalTimeToIso(value) {
|
|
31
|
+
if (value == null) return null;
|
|
32
|
+
const n = Number(value);
|
|
33
|
+
if (!Number.isFinite(n)) return null;
|
|
34
|
+
const date = new Date(n);
|
|
35
|
+
return Number.isNaN(date.getTime()) ? null : date.toISOString();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
module.exports = {
|
|
39
|
+
queryVscdb,
|
|
40
|
+
readVscdbJson,
|
|
41
|
+
vscodeInternalTimeToIso,
|
|
42
|
+
};
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
const { folderUriToPath, normalizeWorkspacePath } = require('./vscodeWorkspace');
|
|
5
|
+
const { normalizeTs } = require('./timeline');
|
|
6
|
+
|
|
7
|
+
const HOME = os.homedir();
|
|
8
|
+
|
|
9
|
+
const HISTORY_ROOTS = [
|
|
10
|
+
{
|
|
11
|
+
root: path.join(HOME, 'AppData', 'Roaming', 'Code', 'User', 'History'),
|
|
12
|
+
source: 'GitHub Copilot',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
root: path.join(HOME, 'AppData', 'Roaming', 'Cursor', 'User', 'History'),
|
|
16
|
+
source: 'Cursor',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
root: path.join(HOME, 'AppData', 'Roaming', 'Antigravity IDE', 'User', 'History'),
|
|
20
|
+
source: 'Antigravity',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
root: path.join(HOME, '.config', 'Code', 'User', 'History'),
|
|
24
|
+
source: 'GitHub Copilot',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
root: path.join(HOME, '.config', 'Cursor', 'User', 'History'),
|
|
28
|
+
source: 'Cursor',
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
function getCodeHistoryRoots() {
|
|
33
|
+
return HISTORY_ROOTS.filter(({ root, source }) =>
|
|
34
|
+
source === 'GitHub Copilot' && fs.existsSync(root)
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function getCursorHistoryRoots() {
|
|
39
|
+
return HISTORY_ROOTS.filter(({ root, source }) =>
|
|
40
|
+
source === 'Cursor' && fs.existsSync(root)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function editPathKey(event) {
|
|
45
|
+
const filePath = normalizeWorkspacePath(event.path || event.file || '');
|
|
46
|
+
const tsBucket = Math.floor((Date.parse(event.ts || '') || 0) / 1000);
|
|
47
|
+
return `${filePath}|${tsBucket}`;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function findClosestHistoryEdit(edit, historyEdits, maxDeltaMs = 120000) {
|
|
51
|
+
const editTs = Date.parse(edit.ts || '') || 0;
|
|
52
|
+
const editPath = normalizeWorkspacePath(edit.path || '');
|
|
53
|
+
|
|
54
|
+
let best = null;
|
|
55
|
+
let bestDelta = Infinity;
|
|
56
|
+
|
|
57
|
+
for (const candidate of historyEdits) {
|
|
58
|
+
const candidatePath = normalizeWorkspacePath(candidate.path || '');
|
|
59
|
+
if (candidatePath !== editPath) continue;
|
|
60
|
+
|
|
61
|
+
const delta = Math.abs((Date.parse(candidate.ts || '') || 0) - editTs);
|
|
62
|
+
if (delta <= maxDeltaMs && delta < bestDelta) {
|
|
63
|
+
best = candidate;
|
|
64
|
+
bestDelta = delta;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return best;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function enrichEditsWithHistory(sessionEdits, historyEdits) {
|
|
72
|
+
return sessionEdits.map(edit => {
|
|
73
|
+
if (edit.diff) return edit;
|
|
74
|
+
|
|
75
|
+
const match = findClosestHistoryEdit(edit, historyEdits);
|
|
76
|
+
if (!match) return edit;
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
...edit,
|
|
80
|
+
diff: match.diff || null,
|
|
81
|
+
summary: match.summary || edit.summary,
|
|
82
|
+
historyId: match.historyId || null,
|
|
83
|
+
editSource: match.editSource || 'localHistory',
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function mergeCodeEditSources(historyEdits, sessionEdits) {
|
|
89
|
+
const merged = [];
|
|
90
|
+
const seen = new Set();
|
|
91
|
+
const historyPaths = new Set(
|
|
92
|
+
historyEdits.map(edit => normalizeWorkspacePath(edit.path || '')).filter(Boolean)
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
for (const edit of historyEdits) {
|
|
96
|
+
const key = editPathKey(edit);
|
|
97
|
+
if (seen.has(key)) continue;
|
|
98
|
+
seen.add(key);
|
|
99
|
+
merged.push({
|
|
100
|
+
...edit,
|
|
101
|
+
editSource: edit.editSource || 'localHistory',
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
for (const edit of sessionEdits) {
|
|
106
|
+
const editPath = normalizeWorkspacePath(edit.path || '');
|
|
107
|
+
if (editPath && historyPaths.has(editPath)) continue;
|
|
108
|
+
|
|
109
|
+
const nearHistory = historyEdits.some(h =>
|
|
110
|
+
normalizeWorkspacePath(h.path || '') === editPath &&
|
|
111
|
+
Math.abs((Date.parse(h.ts || '') || 0) - (Date.parse(edit.ts || '') || 0)) < 60000
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
if (nearHistory && !edit.diff) continue;
|
|
115
|
+
|
|
116
|
+
const key = editPathKey(edit);
|
|
117
|
+
if (seen.has(key)) continue;
|
|
118
|
+
seen.add(key);
|
|
119
|
+
merged.push({
|
|
120
|
+
...edit,
|
|
121
|
+
editSource: edit.editSource || 'chatEditingSession',
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
merged.sort((a, b) => Date.parse(a.ts || '') - Date.parse(b.ts || ''));
|
|
126
|
+
return merged;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function isUnderWorkspace(filePath, workspacePath) {
|
|
130
|
+
if (!filePath || !workspacePath) return false;
|
|
131
|
+
const fileNorm = normalizeWorkspacePath(filePath);
|
|
132
|
+
const wsNorm = normalizeWorkspacePath(workspacePath);
|
|
133
|
+
return fileNorm === wsNorm || fileNorm.startsWith(`${wsNorm}/`);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function readSnapshotContent(historyDir, entryId) {
|
|
137
|
+
const snapshotPath = path.join(historyDir, entryId);
|
|
138
|
+
if (!fs.existsSync(snapshotPath)) return null;
|
|
139
|
+
try {
|
|
140
|
+
return fs.readFileSync(snapshotPath, 'utf-8');
|
|
141
|
+
} catch (_) {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function scanHistoryRoot(historyRoot, workspacePath, source) {
|
|
147
|
+
const events = [];
|
|
148
|
+
if (!fs.existsSync(historyRoot)) return events;
|
|
149
|
+
|
|
150
|
+
for (const entry of fs.readdirSync(historyRoot, { withFileTypes: true })) {
|
|
151
|
+
if (!entry.isDirectory()) continue;
|
|
152
|
+
|
|
153
|
+
const historyDir = path.join(historyRoot, entry.name);
|
|
154
|
+
const entriesPath = path.join(historyDir, 'entries.json');
|
|
155
|
+
if (!fs.existsSync(entriesPath)) continue;
|
|
156
|
+
|
|
157
|
+
let meta;
|
|
158
|
+
try {
|
|
159
|
+
meta = JSON.parse(fs.readFileSync(entriesPath, 'utf-8'));
|
|
160
|
+
} catch (_) {
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const resourcePath = folderUriToPath(meta.resource);
|
|
165
|
+
if (!isUnderWorkspace(resourcePath, workspacePath)) continue;
|
|
166
|
+
|
|
167
|
+
const historyEntries = Array.isArray(meta.entries) ? [...meta.entries] : [];
|
|
168
|
+
historyEntries.sort((a, b) => (a.timestamp || 0) - (b.timestamp || 0));
|
|
169
|
+
|
|
170
|
+
for (let i = 0; i < historyEntries.length; i++) {
|
|
171
|
+
const item = historyEntries[i];
|
|
172
|
+
const ts = normalizeTs(item.timestamp);
|
|
173
|
+
if (!ts) continue;
|
|
174
|
+
|
|
175
|
+
const summary = item.source || 'Local History snapshot';
|
|
176
|
+
const snapshot = readSnapshotContent(historyDir, item.id);
|
|
177
|
+
let diff = null;
|
|
178
|
+
|
|
179
|
+
if (snapshot != null && i > 0) {
|
|
180
|
+
const prev = readSnapshotContent(historyDir, historyEntries[i - 1].id);
|
|
181
|
+
if (prev != null && prev !== snapshot) {
|
|
182
|
+
const { makeUnifiedDiff } = require('./timeline');
|
|
183
|
+
diff = makeUnifiedDiff(prev, snapshot, path.basename(resourcePath || ''));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
events.push({
|
|
188
|
+
ts,
|
|
189
|
+
kind: 'code_edit',
|
|
190
|
+
role: 'assistant',
|
|
191
|
+
source,
|
|
192
|
+
file: path.basename(resourcePath || ''),
|
|
193
|
+
path: resourcePath,
|
|
194
|
+
action: 'localHistory',
|
|
195
|
+
editSource: 'localHistory',
|
|
196
|
+
summary,
|
|
197
|
+
diff,
|
|
198
|
+
historyId: item.id,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return events;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function scanHistoryForWorkspace(workspacePath, options = {}) {
|
|
207
|
+
const roots = options.roots || HISTORY_ROOTS;
|
|
208
|
+
const events = [];
|
|
209
|
+
|
|
210
|
+
for (const { root, source } of roots) {
|
|
211
|
+
events.push(...scanHistoryRoot(root, workspacePath, source));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
events.sort((a, b) => Date.parse(a.ts || '') - Date.parse(b.ts || ''));
|
|
215
|
+
return events;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
module.exports = {
|
|
219
|
+
HISTORY_ROOTS,
|
|
220
|
+
getCodeHistoryRoots,
|
|
221
|
+
getCursorHistoryRoots,
|
|
222
|
+
scanHistoryForWorkspace,
|
|
223
|
+
scanHistoryRoot,
|
|
224
|
+
isUnderWorkspace,
|
|
225
|
+
enrichEditsWithHistory,
|
|
226
|
+
mergeCodeEditSources,
|
|
227
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
|
|
5
|
+
const HOME = os.homedir();
|
|
6
|
+
|
|
7
|
+
const WORKSPACE_STORAGE_ROOTS = [
|
|
8
|
+
path.join(HOME, 'AppData', 'Roaming', 'Code', 'User', 'workspaceStorage'),
|
|
9
|
+
path.join(HOME, 'AppData', 'Roaming', 'Cursor', 'User', 'workspaceStorage'),
|
|
10
|
+
path.join(HOME, 'AppData', 'Roaming', 'Antigravity IDE', 'User', 'workspaceStorage'),
|
|
11
|
+
path.join(HOME, '.config', 'Code', 'User', 'workspaceStorage'),
|
|
12
|
+
path.join(HOME, '.config', 'Cursor', 'User', 'workspaceStorage'),
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
function normalizeWorkspacePath(p) {
|
|
16
|
+
return String(p || '')
|
|
17
|
+
.toLowerCase()
|
|
18
|
+
.replace(/\\/g, '/')
|
|
19
|
+
.replace(/\/$/, '');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function folderUriToPath(folderUri) {
|
|
23
|
+
if (!folderUri || typeof folderUri !== 'string') return null;
|
|
24
|
+
if (!folderUri.startsWith('file:///')) return null;
|
|
25
|
+
try {
|
|
26
|
+
const decoded = decodeURIComponent(folderUri.replace('file:///', ''));
|
|
27
|
+
return decoded.replace(/\//g, path.sep);
|
|
28
|
+
} catch (_) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function discoverWorkspaceStorageDir(workspacePath, roots = WORKSPACE_STORAGE_ROOTS) {
|
|
34
|
+
const target = normalizeWorkspacePath(workspacePath);
|
|
35
|
+
|
|
36
|
+
for (const root of roots) {
|
|
37
|
+
if (!fs.existsSync(root)) continue;
|
|
38
|
+
|
|
39
|
+
for (const entry of fs.readdirSync(root, { withFileTypes: true })) {
|
|
40
|
+
if (!entry.isDirectory()) continue;
|
|
41
|
+
|
|
42
|
+
const workspaceJsonPath = path.join(root, entry.name, 'workspace.json');
|
|
43
|
+
if (!fs.existsSync(workspaceJsonPath)) continue;
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
const { folder } = JSON.parse(fs.readFileSync(workspaceJsonPath, 'utf-8'));
|
|
47
|
+
const folderPath = folderUriToPath(folder);
|
|
48
|
+
if (folderPath && normalizeWorkspacePath(folderPath) === target) {
|
|
49
|
+
return path.join(root, entry.name);
|
|
50
|
+
}
|
|
51
|
+
} catch (_) { }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function getWorkspacePathFromStorageDir(workspaceStorageDir) {
|
|
59
|
+
if (!workspaceStorageDir) return null;
|
|
60
|
+
const workspaceJsonPath = path.join(workspaceStorageDir, 'workspace.json');
|
|
61
|
+
if (!fs.existsSync(workspaceJsonPath)) return null;
|
|
62
|
+
|
|
63
|
+
try {
|
|
64
|
+
const { folder } = JSON.parse(fs.readFileSync(workspaceJsonPath, 'utf-8'));
|
|
65
|
+
return folderUriToPath(folder);
|
|
66
|
+
} catch (_) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
module.exports = {
|
|
72
|
+
normalizeWorkspacePath,
|
|
73
|
+
folderUriToPath,
|
|
74
|
+
discoverWorkspaceStorageDir,
|
|
75
|
+
getWorkspacePathFromStorageDir,
|
|
76
|
+
WORKSPACE_STORAGE_ROOTS,
|
|
77
|
+
};
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Relay MCP server — agents explore .relay via tools (local files or remote API).
|
|
4
|
+
*
|
|
5
|
+
* Local: RELAY_WORKSPACE_PATH=/path/to/project
|
|
6
|
+
* Remote: RELAY_API_URL=https://api.relay.dev RELAY_API_KEY=...
|
|
7
|
+
*/
|
|
8
|
+
const readline = require('readline');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
|
|
11
|
+
const BACKEND = path.join(__dirname, '..');
|
|
12
|
+
const store = require(path.join(BACKEND, 'lib', 'relayStore'));
|
|
13
|
+
const { syncWorkspace, getRelayContext } = require(path.join(BACKEND, 'relay'));
|
|
14
|
+
|
|
15
|
+
const MODE = process.env.RELAY_API_URL ? 'remote' : 'local';
|
|
16
|
+
const WORKSPACE = process.env.RELAY_WORKSPACE_PATH
|
|
17
|
+
? path.resolve(process.env.RELAY_WORKSPACE_PATH)
|
|
18
|
+
: process.cwd();
|
|
19
|
+
const API_URL = (process.env.RELAY_API_URL || '').replace(/\/$/, '');
|
|
20
|
+
const API_KEY = process.env.RELAY_API_KEY || '';
|
|
21
|
+
|
|
22
|
+
const TOOLS = [
|
|
23
|
+
{
|
|
24
|
+
name: 'relay_list_files',
|
|
25
|
+
description: 'List files and folders inside the project .relay directory. Use path="" for root.',
|
|
26
|
+
inputSchema: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
properties: {
|
|
29
|
+
path: { type: 'string', description: 'Relative path within .relay (empty for root)' },
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'relay_read_file',
|
|
35
|
+
description: 'Read any file inside .relay (markdown, json, etc.).',
|
|
36
|
+
inputSchema: {
|
|
37
|
+
type: 'object',
|
|
38
|
+
properties: {
|
|
39
|
+
path: { type: 'string', description: 'Relative file path, e.g. relay_context.md' },
|
|
40
|
+
},
|
|
41
|
+
required: ['path'],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'relay_write_file',
|
|
46
|
+
description: 'Write or update a file inside .relay (IR markdown, etc.).',
|
|
47
|
+
inputSchema: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
properties: {
|
|
50
|
+
path: { type: 'string', description: 'Relative file path' },
|
|
51
|
+
content: { type: 'string', description: 'Full file content' },
|
|
52
|
+
},
|
|
53
|
+
required: ['path', 'content'],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'relay_get_context',
|
|
58
|
+
description: 'Regenerate and return relay_context.md handoff bundle.',
|
|
59
|
+
inputSchema: { type: 'object', properties: {} },
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'relay_sync',
|
|
63
|
+
description: 'Sync agent transcripts into memory.json and refresh compile brief.',
|
|
64
|
+
inputSchema: { type: 'object', properties: {} },
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
async function apiFetch(method, urlPath, body) {
|
|
69
|
+
const headers = { 'Content-Type': 'application/json' };
|
|
70
|
+
if (API_KEY) headers.Authorization = `Bearer ${API_KEY}`;
|
|
71
|
+
|
|
72
|
+
const res = await fetch(`${API_URL}${urlPath}`, {
|
|
73
|
+
method,
|
|
74
|
+
headers,
|
|
75
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
76
|
+
});
|
|
77
|
+
const data = await res.json();
|
|
78
|
+
if (!res.ok) throw new Error(data.error || res.statusText);
|
|
79
|
+
return data;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async function listFiles(subPath) {
|
|
83
|
+
if (MODE === 'remote') {
|
|
84
|
+
const q = new URLSearchParams({
|
|
85
|
+
workspacePath: WORKSPACE,
|
|
86
|
+
path: subPath || '',
|
|
87
|
+
});
|
|
88
|
+
const data = await apiFetch('GET', `/api/relay/files?${q}`);
|
|
89
|
+
return data;
|
|
90
|
+
}
|
|
91
|
+
return store.listRelayFiles(WORKSPACE, subPath || '');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
async function readFile(relPath) {
|
|
95
|
+
if (MODE === 'remote') {
|
|
96
|
+
const q = new URLSearchParams({ workspacePath: WORKSPACE, path: relPath });
|
|
97
|
+
const data = await apiFetch('GET', `/api/relay/file?${q}`);
|
|
98
|
+
return data.file;
|
|
99
|
+
}
|
|
100
|
+
return store.readRelayFile(WORKSPACE, relPath);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
async function writeFile(relPath, content) {
|
|
104
|
+
if (MODE === 'remote') {
|
|
105
|
+
const data = await apiFetch('PUT', '/api/relay/file', {
|
|
106
|
+
workspacePath: WORKSPACE,
|
|
107
|
+
path: relPath,
|
|
108
|
+
content,
|
|
109
|
+
});
|
|
110
|
+
return data.file;
|
|
111
|
+
}
|
|
112
|
+
return store.writeRelayFile(WORKSPACE, relPath, content);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
async function getContext() {
|
|
116
|
+
if (MODE === 'remote') {
|
|
117
|
+
const q = new URLSearchParams({ workspacePath: WORKSPACE });
|
|
118
|
+
const data = await apiFetch('GET', `/api/context?${q}`);
|
|
119
|
+
return { markdown: data.markdown, context: data.context };
|
|
120
|
+
}
|
|
121
|
+
return getRelayContext(WORKSPACE);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
async function syncRelay() {
|
|
125
|
+
if (MODE === 'remote') {
|
|
126
|
+
return apiFetch('POST', '/api/sync', { workspacePath: WORKSPACE });
|
|
127
|
+
}
|
|
128
|
+
const result = syncWorkspace(WORKSPACE);
|
|
129
|
+
getRelayContext(WORKSPACE);
|
|
130
|
+
return result;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
async function callTool(name, args) {
|
|
134
|
+
switch (name) {
|
|
135
|
+
case 'relay_list_files': {
|
|
136
|
+
const listing = await listFiles(args.path || '');
|
|
137
|
+
return {
|
|
138
|
+
content: [{ type: 'text', text: JSON.stringify(listing, null, 2) }],
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
case 'relay_read_file': {
|
|
142
|
+
const file = await readFile(args.path);
|
|
143
|
+
return {
|
|
144
|
+
content: [{ type: 'text', text: file.content }],
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
case 'relay_write_file': {
|
|
148
|
+
const file = await writeFile(args.path, args.content);
|
|
149
|
+
return {
|
|
150
|
+
content: [{ type: 'text', text: `Wrote ${file.path} (${file.size} bytes)` }],
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
case 'relay_get_context': {
|
|
154
|
+
const result = await getContext();
|
|
155
|
+
return {
|
|
156
|
+
content: [{ type: 'text', text: result.markdown || '' }],
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
case 'relay_sync': {
|
|
160
|
+
const result = await syncRelay();
|
|
161
|
+
return {
|
|
162
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
default:
|
|
166
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function send(msg) {
|
|
171
|
+
process.stdout.write(`${JSON.stringify(msg)}\n`);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function handleRequest(req) {
|
|
175
|
+
const { id, method, params } = req;
|
|
176
|
+
|
|
177
|
+
if (method === 'initialize') {
|
|
178
|
+
send({
|
|
179
|
+
jsonrpc: '2.0',
|
|
180
|
+
id,
|
|
181
|
+
result: {
|
|
182
|
+
protocolVersion: '2024-11-05',
|
|
183
|
+
capabilities: { tools: {} },
|
|
184
|
+
serverInfo: { name: 'relay-os', version: '0.1.0' },
|
|
185
|
+
},
|
|
186
|
+
});
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (method === 'notifications/initialized') return;
|
|
191
|
+
|
|
192
|
+
if (method === 'tools/list') {
|
|
193
|
+
send({ jsonrpc: '2.0', id, result: { tools: TOOLS } });
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (method === 'tools/call') {
|
|
198
|
+
callTool(params.name, params.arguments || {})
|
|
199
|
+
.then((result) => send({ jsonrpc: '2.0', id, result }))
|
|
200
|
+
.catch((err) =>
|
|
201
|
+
send({
|
|
202
|
+
jsonrpc: '2.0',
|
|
203
|
+
id,
|
|
204
|
+
result: { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true },
|
|
205
|
+
})
|
|
206
|
+
);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (id !== undefined) {
|
|
211
|
+
send({ jsonrpc: '2.0', id, error: { code: -32601, message: `Method not found: ${method}` } });
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const rl = readline.createInterface({ input: process.stdin, terminal: false });
|
|
216
|
+
rl.on('line', (line) => {
|
|
217
|
+
const trimmed = line.trim();
|
|
218
|
+
if (!trimmed) return;
|
|
219
|
+
try {
|
|
220
|
+
handleRequest(JSON.parse(trimmed));
|
|
221
|
+
} catch (err) {
|
|
222
|
+
send({ jsonrpc: '2.0', id: null, error: { code: -32700, message: err.message } });
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
process.stderr.write(
|
|
227
|
+
`relay-mcp started (${MODE} mode, workspace: ${WORKSPACE})\n`
|
|
228
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -x "$basedir/node" ]; then
|
|
13
|
+
exec "$basedir/node" "$basedir/../mime/cli.js" "$@"
|
|
14
|
+
else
|
|
15
|
+
exec node "$basedir/../mime/cli.js" "$@"
|
|
16
|
+
fi
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@ECHO off
|
|
2
|
+
GOTO start
|
|
3
|
+
:find_dp0
|
|
4
|
+
SET dp0=%~dp0
|
|
5
|
+
EXIT /b
|
|
6
|
+
:start
|
|
7
|
+
SETLOCAL
|
|
8
|
+
CALL :find_dp0
|
|
9
|
+
|
|
10
|
+
IF EXIST "%dp0%\node.exe" (
|
|
11
|
+
SET "_prog=%dp0%\node.exe"
|
|
12
|
+
) ELSE (
|
|
13
|
+
SET "_prog=node"
|
|
14
|
+
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %*
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env pwsh
|
|
2
|
+
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
3
|
+
|
|
4
|
+
$exe=""
|
|
5
|
+
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
6
|
+
# Fix case when both the Windows and Linux builds of Node
|
|
7
|
+
# are installed in the same directory
|
|
8
|
+
$exe=".exe"
|
|
9
|
+
}
|
|
10
|
+
$ret=0
|
|
11
|
+
if (Test-Path "$basedir/node$exe") {
|
|
12
|
+
# Support pipeline input
|
|
13
|
+
if ($MyInvocation.ExpectingInput) {
|
|
14
|
+
$input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args
|
|
15
|
+
} else {
|
|
16
|
+
& "$basedir/node$exe" "$basedir/../mime/cli.js" $args
|
|
17
|
+
}
|
|
18
|
+
$ret=$LASTEXITCODE
|
|
19
|
+
} else {
|
|
20
|
+
# Support pipeline input
|
|
21
|
+
if ($MyInvocation.ExpectingInput) {
|
|
22
|
+
$input | & "node$exe" "$basedir/../mime/cli.js" $args
|
|
23
|
+
} else {
|
|
24
|
+
& "node$exe" "$basedir/../mime/cli.js" $args
|
|
25
|
+
}
|
|
26
|
+
$ret=$LASTEXITCODE
|
|
27
|
+
}
|
|
28
|
+
exit $ret
|