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,190 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const HOOK_FILES = [
|
|
5
|
+
'relay-hook-lib.js',
|
|
6
|
+
'relay-cursor-stop.js',
|
|
7
|
+
'relay-claude-stop.js',
|
|
8
|
+
'relay-codex-stop.js',
|
|
9
|
+
'relay-copilot-stop.js',
|
|
10
|
+
'relay-antigravity-stop.js',
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
const HOOK_CMD = {
|
|
14
|
+
cursor: 'node ".relay/hooks/relay-cursor-stop.js"',
|
|
15
|
+
claude: 'node ".relay/hooks/relay-claude-stop.js"',
|
|
16
|
+
codex: 'node ".relay/hooks/relay-codex-stop.js"',
|
|
17
|
+
copilot: 'node ".relay/hooks/relay-copilot-stop.js"',
|
|
18
|
+
antigravity: 'node ".relay/hooks/relay-antigravity-stop.js"',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
function ensureDir(dir) {
|
|
22
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function buildRelayCommand(packageRoot) {
|
|
26
|
+
const relayBin = path.join(packageRoot, 'bin', 'relay.js');
|
|
27
|
+
return `node "${relayBin.replace(/\\/g, '/')}"`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function readJson(filePath) {
|
|
31
|
+
try {
|
|
32
|
+
return JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
33
|
+
} catch (_) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function writeJson(filePath, data) {
|
|
39
|
+
ensureDir(path.dirname(filePath));
|
|
40
|
+
fs.writeFileSync(filePath, JSON.stringify(data, null, 2) + '\n', 'utf-8');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function installHookScripts(workspacePath, packageRoot) {
|
|
44
|
+
const hooksDir = path.join(workspacePath, '.relay', 'hooks');
|
|
45
|
+
ensureDir(hooksDir);
|
|
46
|
+
|
|
47
|
+
for (const file of HOOK_FILES) {
|
|
48
|
+
const src = path.join(packageRoot, 'backend', 'hooks', file);
|
|
49
|
+
const dest = path.join(hooksDir, file);
|
|
50
|
+
if (!fs.existsSync(src)) {
|
|
51
|
+
return { installed: false, reason: `missing ${file}` };
|
|
52
|
+
}
|
|
53
|
+
fs.copyFileSync(src, dest);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
for (const legacy of ['relay-refresh.js', 'relay-stop.js', 'relay-agent-ir.js']) {
|
|
57
|
+
const legacyPath = path.join(hooksDir, legacy);
|
|
58
|
+
if (fs.existsSync(legacyPath)) fs.unlinkSync(legacyPath);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return { installed: true, hooksDir };
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function installCursorHooks(workspacePath) {
|
|
65
|
+
const hooksJsonPath = path.join(workspacePath, '.cursor', 'hooks.json');
|
|
66
|
+
const base = readJson(hooksJsonPath) || { version: 1, hooks: {} };
|
|
67
|
+
if (!base.hooks) base.hooks = {};
|
|
68
|
+
if (!Array.isArray(base.hooks.stop)) base.hooks.stop = [];
|
|
69
|
+
|
|
70
|
+
base.hooks.stop = base.hooks.stop.filter(
|
|
71
|
+
entry => !String(entry.command || '').includes('relay-')
|
|
72
|
+
);
|
|
73
|
+
base.hooks.stop.push({
|
|
74
|
+
command: '.relay/hooks/relay-cursor-stop.js',
|
|
75
|
+
loop_limit: 1,
|
|
76
|
+
});
|
|
77
|
+
base.version = base.version || 1;
|
|
78
|
+
|
|
79
|
+
writeJson(hooksJsonPath, base);
|
|
80
|
+
return { hooksJson: hooksJsonPath };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function installClaudeHooks(workspacePath) {
|
|
84
|
+
const settingsPath = path.join(workspacePath, '.claude', 'settings.json');
|
|
85
|
+
const base = readJson(settingsPath) || {};
|
|
86
|
+
if (!base.hooks) base.hooks = {};
|
|
87
|
+
if (!Array.isArray(base.hooks.Stop)) base.hooks.Stop = [];
|
|
88
|
+
|
|
89
|
+
base.hooks.Stop = base.hooks.Stop.filter(entry => {
|
|
90
|
+
const cmds = entry.hooks || [];
|
|
91
|
+
return !cmds.some(h => String(h.command || '').includes('relay-'));
|
|
92
|
+
});
|
|
93
|
+
base.hooks.Stop.push({
|
|
94
|
+
matcher: '*',
|
|
95
|
+
hooks: [{ type: 'command', command: HOOK_CMD.claude }],
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
writeJson(settingsPath, base);
|
|
99
|
+
return { settingsPath };
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function installCodexHooks(workspacePath) {
|
|
103
|
+
const hooksPath = path.join(workspacePath, '.codex', 'hooks.json');
|
|
104
|
+
const base = readJson(hooksPath) || { hooks: {} };
|
|
105
|
+
if (!base.hooks) base.hooks = {};
|
|
106
|
+
|
|
107
|
+
base.hooks.Stop = [
|
|
108
|
+
{
|
|
109
|
+
hooks: [
|
|
110
|
+
{
|
|
111
|
+
type: 'command',
|
|
112
|
+
command: HOOK_CMD.codex,
|
|
113
|
+
timeout: 120,
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
];
|
|
118
|
+
|
|
119
|
+
writeJson(hooksPath, base);
|
|
120
|
+
return { hooksPath };
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function installCopilotHooks(workspacePath) {
|
|
124
|
+
const hooksDir = path.join(workspacePath, '.github', 'hooks');
|
|
125
|
+
ensureDir(hooksDir);
|
|
126
|
+
const hooksPath = path.join(hooksDir, 'relay-os.json');
|
|
127
|
+
|
|
128
|
+
const config = {
|
|
129
|
+
version: 1,
|
|
130
|
+
hooks: {
|
|
131
|
+
agentStop: [
|
|
132
|
+
{
|
|
133
|
+
type: 'command',
|
|
134
|
+
bash: HOOK_CMD.copilot,
|
|
135
|
+
powershell: HOOK_CMD.copilot,
|
|
136
|
+
cwd: '.',
|
|
137
|
+
timeoutSec: 120,
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
writeJson(hooksPath, config);
|
|
144
|
+
return { hooksPath };
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function installAntigravityHooks(workspacePath) {
|
|
148
|
+
const agentsDir = path.join(workspacePath, '.agents');
|
|
149
|
+
ensureDir(agentsDir);
|
|
150
|
+
const hooksPath = path.join(agentsDir, 'hooks.json');
|
|
151
|
+
|
|
152
|
+
const existing = readJson(hooksPath) || {};
|
|
153
|
+
const merged = { ...existing };
|
|
154
|
+
|
|
155
|
+
merged['relay-os'] = {
|
|
156
|
+
Stop: [
|
|
157
|
+
{
|
|
158
|
+
type: 'command',
|
|
159
|
+
command: HOOK_CMD.antigravity,
|
|
160
|
+
timeout: 120,
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
writeJson(hooksPath, merged);
|
|
166
|
+
return { hooksPath };
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function installAgentHooks(workspacePath, packageRoot) {
|
|
170
|
+
const hooks = installHookScripts(workspacePath, packageRoot);
|
|
171
|
+
if (!hooks.installed) return hooks;
|
|
172
|
+
|
|
173
|
+
return {
|
|
174
|
+
installed: true,
|
|
175
|
+
hooksDir: hooks.hooksDir,
|
|
176
|
+
cursor: installCursorHooks(workspacePath),
|
|
177
|
+
claude: installClaudeHooks(workspacePath),
|
|
178
|
+
codex: installCodexHooks(workspacePath),
|
|
179
|
+
copilot: installCopilotHooks(workspacePath),
|
|
180
|
+
antigravity: installAntigravityHooks(workspacePath),
|
|
181
|
+
relayCommand: buildRelayCommand(packageRoot),
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
module.exports = {
|
|
186
|
+
HOOK_FILES,
|
|
187
|
+
HOOK_CMD,
|
|
188
|
+
buildRelayCommand,
|
|
189
|
+
installAgentHooks,
|
|
190
|
+
};
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { scaffoldIrFiles } = require('./relayContext');
|
|
4
|
+
const { installAgentHooks, buildRelayCommand } = require('./relayHooks');
|
|
5
|
+
|
|
6
|
+
const RELAY_VERSION = '0.1.0';
|
|
7
|
+
const MARKER_BEGIN = 'BEGIN:relay-os';
|
|
8
|
+
const MARKER_END = 'END:relay-os';
|
|
9
|
+
|
|
10
|
+
const RELAY_PSEUDO_COMMANDS = `## Relay pseudo-commands (user chat)
|
|
11
|
+
|
|
12
|
+
These are **not** built-in slash commands in Cursor, Claude, Copilot, etc. They are a **project convention** — phrases the user types so agents recognize Relay intent. \`relay init\` patches this block into \`CLAUDE.md\`, \`AGENTS.md\`, \`.github/copilot-instructions.md\`, \`.cursorrules\`, and \`.relay/AGENT_BOOTSTRAP.md\`.
|
|
13
|
+
|
|
14
|
+
When the user sends any of these phrases (with or without a leading \`/\`), treat them as Relay instructions — not casual chat:
|
|
15
|
+
|
|
16
|
+
| User says | You do |
|
|
17
|
+
|-----------|--------|
|
|
18
|
+
| \`/relay update\` or \`relay update\` | \`relay sync .\` → \`relay compile .\` → read \`.relay/compile_brief.md\` → update \`.relay/project.md\`, \`current_task.md\`, \`decisions.md\`, \`failures.md\` → \`relay context .\` → confirm "Relay updated." |
|
|
19
|
+
| \`/relay context\` or \`relay context\` | Read \`.relay/relay_context.md\` (run \`relay context .\` first if stale). Summarize handoff briefly. |
|
|
20
|
+
| \`/relay init\` or \`relay init\` | Run \`npx relay-os init\` in project root if \`.relay/\` missing; else confirm already installed. |
|
|
21
|
+
|
|
22
|
+
Use \`npx relay-os\` if \`relay\` is not on PATH. Do not ask the user to edit agent config files manually.`;
|
|
23
|
+
|
|
24
|
+
const AGENT_IR_INSTRUCTIONS = `Before you finish (every turn with substantive work):
|
|
25
|
+
|
|
26
|
+
1. \`relay sync .\` and \`relay compile .\`
|
|
27
|
+
2. Read \`.relay/compile_brief.md\`
|
|
28
|
+
3. Update \`.relay/project.md\`, \`current_task.md\`, \`decisions.md\`, \`failures.md\`
|
|
29
|
+
4. \`relay context .\`
|
|
30
|
+
|
|
31
|
+
Cursor + Claude + Codex + Copilot + Antigravity: stop hook runs steps 1–2 automatically, then you do 3–4.`;
|
|
32
|
+
|
|
33
|
+
const AGENT_HOOK_BODY = `# Relay (auto-installed)
|
|
34
|
+
|
|
35
|
+
This project uses **Relay** for cross-agent memory. Do not ask the user to configure agent files manually.
|
|
36
|
+
|
|
37
|
+
**Every session — read first:** \`.relay/AGENT_BOOTSTRAP.md\`
|
|
38
|
+
|
|
39
|
+
| Phase | Action |
|
|
40
|
+
|-------|--------|
|
|
41
|
+
| Session start | Read \`.relay/relay_context.md\` (handoff). Never paste raw transcripts. |
|
|
42
|
+
| After agent work | **You** update \`.relay/*.md\` from \`compile_brief.md\` (stop hook triggers this) |
|
|
43
|
+
| Background sync | \`relay watch .\` keeps \`memory.json\` + \`compile_brief.md\` fresh |
|
|
44
|
+
| Not installed? | Run \`npx relay-os init\` in project root |
|
|
45
|
+
|
|
46
|
+
**Stop hooks:** Cursor, Claude Code, Codex, Copilot CLI, Antigravity — installed by \`relay init\`.
|
|
47
|
+
|
|
48
|
+
${RELAY_PSEUDO_COMMANDS}
|
|
49
|
+
|
|
50
|
+
Cursor: \`@relay-sync\` skill at \`.cursor/skills/relay-sync/\`.
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
const CURSOR_RULE = `---
|
|
54
|
+
description: Relay cross-agent memory — read bootstrap every session
|
|
55
|
+
alwaysApply: true
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
At session start in this workspace:
|
|
59
|
+
|
|
60
|
+
1. If \`.relay/AGENT_BOOTSTRAP.md\` is missing, run \`npx relay-os init\` in the project root (do not ask the user to edit CLAUDE.md or copilot-instructions manually).
|
|
61
|
+
2. Read \`.relay/AGENT_BOOTSTRAP.md\` and follow it.
|
|
62
|
+
3. For handoff context, read \`.relay/relay_context.md\` — not \`memory.json\` or agent JSONL files.
|
|
63
|
+
4. **Stop hook:** syncs + writes \`compile_brief.md\`, then **you** update IR markdown and run \`relay context .\` (all agents have hooks via \`relay init\`).
|
|
64
|
+
|
|
65
|
+
5. Keep \`relay watch .\` running for background sync across agents.
|
|
66
|
+
|
|
67
|
+
${RELAY_PSEUDO_COMMANDS}
|
|
68
|
+
|
|
69
|
+
Use the relay-sync skill when the user says relay update, /relay update, relay context, or relay handoff.
|
|
70
|
+
`;
|
|
71
|
+
|
|
72
|
+
function safeRead(filePath) {
|
|
73
|
+
try {
|
|
74
|
+
return fs.readFileSync(filePath, 'utf-8');
|
|
75
|
+
} catch (_) {
|
|
76
|
+
return '';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function ensureDir(dir) {
|
|
81
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function copyDirRecursive(src, dest) {
|
|
85
|
+
ensureDir(dest);
|
|
86
|
+
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
87
|
+
const from = path.join(src, entry.name);
|
|
88
|
+
const to = path.join(dest, entry.name);
|
|
89
|
+
if (entry.isDirectory()) copyDirRecursive(from, to);
|
|
90
|
+
else fs.copyFileSync(from, to);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function upsertHtmlMarkedBlock(content, blockBody) {
|
|
95
|
+
const begin = `<!-- ${MARKER_BEGIN} -->`;
|
|
96
|
+
const end = `<!-- ${MARKER_END} -->`;
|
|
97
|
+
const block = `${begin}\n${blockBody.trim()}\n${end}`;
|
|
98
|
+
|
|
99
|
+
if (content.includes(begin) && content.includes(end)) {
|
|
100
|
+
const re = new RegExp(
|
|
101
|
+
`${begin.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}[\\s\\S]*?${end.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}`
|
|
102
|
+
);
|
|
103
|
+
return content.replace(re, block);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const trimmed = content.trim();
|
|
107
|
+
return trimmed ? `${trimmed}\n\n${block}\n` : `${block}\n`;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function writeUpsertMarkdown(filePath, blockBody) {
|
|
111
|
+
const content = safeRead(filePath);
|
|
112
|
+
fs.writeFileSync(filePath, upsertHtmlMarkedBlock(content, blockBody), 'utf-8');
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function isRelayInstalled(workspacePath) {
|
|
116
|
+
const relayDir = path.join(workspacePath, '.relay');
|
|
117
|
+
return (
|
|
118
|
+
fs.existsSync(path.join(relayDir, 'config.json')) &&
|
|
119
|
+
fs.existsSync(path.join(relayDir, 'install.json'))
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function writeAgentBootstrap(workspacePath) {
|
|
124
|
+
const relayDir = path.join(workspacePath, '.relay');
|
|
125
|
+
|
|
126
|
+
const md = `# Relay Agent Bootstrap
|
|
127
|
+
|
|
128
|
+
> **Agents:** read this file at the start of every session in this workspace.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## 1. Check install
|
|
133
|
+
|
|
134
|
+
| Check | Path |
|
|
135
|
+
|-------|------|
|
|
136
|
+
| Relay initialized | \`.relay/config.json\` |
|
|
137
|
+
| Auto-install manifest | \`.relay/install.json\` |
|
|
138
|
+
|
|
139
|
+
**If either is missing → Relay is not installed. Go to section 2.**
|
|
140
|
+
**If both exist → Relay is installed. Go to section 3.**
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 2. Self-install (run once — fully automatic)
|
|
145
|
+
|
|
146
|
+
Execute in the **project root**:
|
|
147
|
+
|
|
148
|
+
\`\`\`bash
|
|
149
|
+
npx relay-os init
|
|
150
|
+
\`\`\`
|
|
151
|
+
|
|
152
|
+
This automatically:
|
|
153
|
+
|
|
154
|
+
- Creates \`.relay/\` (memory, IR markdown, context)
|
|
155
|
+
- Installs Cursor skill + rule
|
|
156
|
+
- Patches \`CLAUDE.md\`, \`AGENTS.md\`, \`.github/copilot-instructions.md\`, \`.cursorrules\`
|
|
157
|
+
- Writes this bootstrap file and \`RELAY.md\`
|
|
158
|
+
|
|
159
|
+
**Do not** ask the user to manually edit agent instruction files.
|
|
160
|
+
|
|
161
|
+
After \`init\` succeeds, re-read this file and continue at section 3.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## 3. Installed — session start (handoff)
|
|
166
|
+
|
|
167
|
+
1. Read \`.relay/relay_context.md\`.
|
|
168
|
+
2. Do **not** load \`.relay/memory.json\` or agent JSONL unless explicitly asked.
|
|
169
|
+
3. Respect **CURRENT TASKS** and **OPEN DECISIONS**.
|
|
170
|
+
|
|
171
|
+
\`\`\`bash
|
|
172
|
+
npx relay-os context .
|
|
173
|
+
\`\`\`
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 4. Pseudo-commands (user chat)
|
|
178
|
+
|
|
179
|
+
Not native slash commands — a **convention** agents learn from patched instruction files (\`CLAUDE.md\`, \`AGENTS.md\`, \`copilot-instructions.md\`, etc.). When the user types **\`/relay update\`**, **\`relay update\`**, or similar — execute immediately (do not treat as small talk):
|
|
180
|
+
|
|
181
|
+
| User says | Action |
|
|
182
|
+
|-----------|--------|
|
|
183
|
+
| \`/relay update\` | sync → compile → update IR from \`compile_brief.md\` → \`relay context .\` |
|
|
184
|
+
| \`/relay context\` | Read \`.relay/relay_context.md\` (regenerate with \`relay context .\` if needed) |
|
|
185
|
+
| \`/relay init\` | Run \`npx relay-os init\` if Relay not installed |
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## 5. Stop hooks (automatic after each turn)
|
|
190
|
+
|
|
191
|
+
| Agent | Hook location |
|
|
192
|
+
|-------|----------------|
|
|
193
|
+
| Cursor | \`.cursor/hooks.json\` |
|
|
194
|
+
| Claude Code | \`.claude/settings.json\` |
|
|
195
|
+
| Codex | \`.codex/hooks.json\` |
|
|
196
|
+
| Copilot CLI | \`.github/hooks/relay-os.json\` |
|
|
197
|
+
| Antigravity | \`.agents/hooks.json\` |
|
|
198
|
+
|
|
199
|
+
**Background sync:** \`relay watch .\` (all agents, no IR write)
|
|
200
|
+
|
|
201
|
+
Disable hooks: \`.relay/config.json\` → \`"autoAgentUpdate": false\`
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## 6. Switching agents
|
|
206
|
+
|
|
207
|
+
Hand the next agent only \`.relay/relay_context.md\`.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## 7. Optional UI
|
|
212
|
+
|
|
213
|
+
\`\`\`bash
|
|
214
|
+
npx relay-os serve
|
|
215
|
+
\`\`\`
|
|
216
|
+
|
|
217
|
+
Open http://localhost:3001/
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
_Package: relay-os v${RELAY_VERSION}_
|
|
222
|
+
`;
|
|
223
|
+
|
|
224
|
+
const bootstrapPath = path.join(relayDir, 'AGENT_BOOTSTRAP.md');
|
|
225
|
+
fs.writeFileSync(bootstrapPath, md, 'utf-8');
|
|
226
|
+
|
|
227
|
+
fs.writeFileSync(
|
|
228
|
+
path.join(workspacePath, 'RELAY.md'),
|
|
229
|
+
`# Relay
|
|
230
|
+
|
|
231
|
+
Cross-agent project memory for this repo.
|
|
232
|
+
|
|
233
|
+
**Agents: read [\`.relay/AGENT_BOOTSTRAP.md\`](.relay/AGENT_BOOTSTRAP.md) every session.**
|
|
234
|
+
|
|
235
|
+
**User pseudo-commands:** \`/relay update\` · \`/relay context\` · \`/relay init\`
|
|
236
|
+
|
|
237
|
+
\`\`\`bash
|
|
238
|
+
npx relay-os init
|
|
239
|
+
npx relay-os watch .
|
|
240
|
+
npx relay-os refresh .
|
|
241
|
+
\`\`\`
|
|
242
|
+
`,
|
|
243
|
+
'utf-8'
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
return { bootstrapPath };
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function installCursor(workspacePath, packageRoot) {
|
|
250
|
+
const skillSrc = path.join(packageRoot, 'skills', 'relay-sync');
|
|
251
|
+
const skillDest = path.join(workspacePath, '.cursor', 'skills', 'relay-sync');
|
|
252
|
+
if (fs.existsSync(skillSrc)) {
|
|
253
|
+
copyDirRecursive(skillSrc, skillDest);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
ensureDir(path.join(workspacePath, '.cursor', 'rules'));
|
|
257
|
+
fs.writeFileSync(
|
|
258
|
+
path.join(workspacePath, '.cursor', 'rules', 'relay.mdc'),
|
|
259
|
+
CURSOR_RULE,
|
|
260
|
+
'utf-8'
|
|
261
|
+
);
|
|
262
|
+
|
|
263
|
+
return { skill: fs.existsSync(skillDest), rule: true };
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
function installAgentInstructionFiles(workspacePath) {
|
|
267
|
+
const touched = [];
|
|
268
|
+
const targets = [
|
|
269
|
+
path.join(workspacePath, 'CLAUDE.md'),
|
|
270
|
+
path.join(workspacePath, 'AGENTS.md'),
|
|
271
|
+
path.join(workspacePath, '.github', 'copilot-instructions.md'),
|
|
272
|
+
path.join(workspacePath, '.cursorrules'),
|
|
273
|
+
];
|
|
274
|
+
|
|
275
|
+
for (const filePath of targets) {
|
|
276
|
+
if (filePath.includes('.github')) ensureDir(path.dirname(filePath));
|
|
277
|
+
writeUpsertMarkdown(filePath, AGENT_HOOK_BODY);
|
|
278
|
+
touched.push(path.relative(workspacePath, filePath));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
const antigravityPath = path.join(workspacePath, '.relay', 'antigravity-instructions.md');
|
|
282
|
+
fs.writeFileSync(antigravityPath, `${AGENT_HOOK_BODY}\n`, 'utf-8');
|
|
283
|
+
touched.push('.relay/antigravity-instructions.md');
|
|
284
|
+
|
|
285
|
+
return touched;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function writeInstallManifest(workspacePath, details) {
|
|
289
|
+
const manifest = {
|
|
290
|
+
version: RELAY_VERSION,
|
|
291
|
+
installedAt: new Date().toISOString(),
|
|
292
|
+
workspace: workspacePath,
|
|
293
|
+
...details,
|
|
294
|
+
};
|
|
295
|
+
fs.writeFileSync(
|
|
296
|
+
path.join(workspacePath, '.relay', 'install.json'),
|
|
297
|
+
JSON.stringify(manifest, null, 2)
|
|
298
|
+
);
|
|
299
|
+
return manifest;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function installRelayWorkspace(workspacePath, options = {}) {
|
|
303
|
+
const packageRoot = options.packageRoot || path.join(__dirname, '..', '..');
|
|
304
|
+
ensureDir(path.join(workspacePath, '.relay'));
|
|
305
|
+
scaffoldIrFiles(path.join(workspacePath, '.relay'));
|
|
306
|
+
|
|
307
|
+
const cursor = installCursor(workspacePath, packageRoot);
|
|
308
|
+
const hooks = installAgentHooks(workspacePath, packageRoot);
|
|
309
|
+
const instructionFiles = installAgentInstructionFiles(workspacePath);
|
|
310
|
+
writeAgentBootstrap(workspacePath);
|
|
311
|
+
|
|
312
|
+
const manifest = writeInstallManifest(workspacePath, {
|
|
313
|
+
cursor,
|
|
314
|
+
hooks,
|
|
315
|
+
relayCommand: buildRelayCommand(packageRoot),
|
|
316
|
+
instructionFiles,
|
|
317
|
+
bootstrap: '.relay/AGENT_BOOTSTRAP.md',
|
|
318
|
+
rootPointer: 'RELAY.md',
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
return {
|
|
322
|
+
installed: true,
|
|
323
|
+
manifest,
|
|
324
|
+
paths: {
|
|
325
|
+
relayDir: path.join(workspacePath, '.relay'),
|
|
326
|
+
bootstrap: path.join(workspacePath, '.relay', 'AGENT_BOOTSTRAP.md'),
|
|
327
|
+
rootRelay: path.join(workspacePath, 'RELAY.md'),
|
|
328
|
+
},
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
module.exports = {
|
|
333
|
+
RELAY_VERSION,
|
|
334
|
+
isRelayInstalled,
|
|
335
|
+
installRelayWorkspace,
|
|
336
|
+
writeAgentBootstrap,
|
|
337
|
+
installCursor,
|
|
338
|
+
installAgentInstructionFiles,
|
|
339
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { getRelayDir } = require('./relayStore');
|
|
4
|
+
|
|
5
|
+
const META_FILE = 'mission_control.json';
|
|
6
|
+
|
|
7
|
+
function defaultMeta() {
|
|
8
|
+
return {
|
|
9
|
+
version: 1,
|
|
10
|
+
collaborators: [],
|
|
11
|
+
chat: [],
|
|
12
|
+
updatedAt: new Date().toISOString(),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function readMissionMeta(workspacePath) {
|
|
17
|
+
const filePath = path.join(getRelayDir(workspacePath), META_FILE);
|
|
18
|
+
if (!fs.existsSync(filePath)) return defaultMeta();
|
|
19
|
+
try {
|
|
20
|
+
const parsed = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
21
|
+
return {
|
|
22
|
+
...defaultMeta(),
|
|
23
|
+
...parsed,
|
|
24
|
+
collaborators: Array.isArray(parsed.collaborators) ? parsed.collaborators : [],
|
|
25
|
+
chat: Array.isArray(parsed.chat) ? parsed.chat : [],
|
|
26
|
+
};
|
|
27
|
+
} catch (_) {
|
|
28
|
+
return defaultMeta();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function writeMissionMeta(workspacePath, meta) {
|
|
33
|
+
const relayDir = getRelayDir(workspacePath);
|
|
34
|
+
if (!fs.existsSync(relayDir)) fs.mkdirSync(relayDir, { recursive: true });
|
|
35
|
+
|
|
36
|
+
const current = readMissionMeta(workspacePath);
|
|
37
|
+
const payload = {
|
|
38
|
+
version: 1,
|
|
39
|
+
collaborators: Array.isArray(meta.collaborators) ? meta.collaborators : current.collaborators,
|
|
40
|
+
chat: Array.isArray(meta.chat) ? meta.chat : current.chat,
|
|
41
|
+
updatedAt: new Date().toISOString(),
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
fs.writeFileSync(path.join(relayDir, META_FILE), JSON.stringify(payload, null, 2), 'utf-8');
|
|
45
|
+
return payload;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function scaffoldMissionMeta(workspacePath) {
|
|
49
|
+
const relayDir = getRelayDir(workspacePath);
|
|
50
|
+
const filePath = path.join(relayDir, META_FILE);
|
|
51
|
+
if (!fs.existsSync(filePath)) {
|
|
52
|
+
writeMissionMeta(workspacePath, defaultMeta());
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
module.exports = {
|
|
57
|
+
META_FILE,
|
|
58
|
+
readMissionMeta,
|
|
59
|
+
writeMissionMeta,
|
|
60
|
+
scaffoldMissionMeta,
|
|
61
|
+
};
|