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,519 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { normalizeTs } = require('./timeline');
|
|
4
|
+
|
|
5
|
+
const IR_FILES = {
|
|
6
|
+
project: 'project.md',
|
|
7
|
+
architecture: 'architecture.md',
|
|
8
|
+
decisions: 'decisions.md',
|
|
9
|
+
currentTask: 'current_task.md',
|
|
10
|
+
failures: 'failures.md',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const IR_TEMPLATES = {
|
|
14
|
+
'project.md': `# Project Summary
|
|
15
|
+
|
|
16
|
+
<!-- Maintained by relay compile (coding agent + relay-sync skill). -->
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
|
|
20
|
+
## Tech stack
|
|
21
|
+
|
|
22
|
+
## Goals
|
|
23
|
+
|
|
24
|
+
`,
|
|
25
|
+
'current_task.md': `# Current Tasks
|
|
26
|
+
|
|
27
|
+
<!-- Maintained by relay compile. -->
|
|
28
|
+
|
|
29
|
+
## In progress
|
|
30
|
+
- [ ]
|
|
31
|
+
|
|
32
|
+
## Next
|
|
33
|
+
- [ ]
|
|
34
|
+
|
|
35
|
+
`,
|
|
36
|
+
'decisions.md': `# Decisions
|
|
37
|
+
|
|
38
|
+
## Open
|
|
39
|
+
- [ ]
|
|
40
|
+
|
|
41
|
+
## Resolved
|
|
42
|
+
|
|
43
|
+
`,
|
|
44
|
+
'architecture.md': `# Architecture
|
|
45
|
+
|
|
46
|
+
## Layout
|
|
47
|
+
-
|
|
48
|
+
|
|
49
|
+
## Boundaries
|
|
50
|
+
-
|
|
51
|
+
|
|
52
|
+
`,
|
|
53
|
+
'failures.md': `# Failures & Anti-patterns
|
|
54
|
+
|
|
55
|
+
<!-- What failed or what NOT to repeat -->
|
|
56
|
+
|
|
57
|
+
`,
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const DEFAULT_LIMITS = {
|
|
61
|
+
maxUserMessages: 6,
|
|
62
|
+
maxAssistantMessages: 4,
|
|
63
|
+
maxCodeEdits: 5,
|
|
64
|
+
maxArtifacts: 3,
|
|
65
|
+
maxTaskLines: 12,
|
|
66
|
+
maxDecisionLines: 10,
|
|
67
|
+
maxContentChars: 320,
|
|
68
|
+
maxSummaryChars: 2000,
|
|
69
|
+
maxProjectChars: 1200,
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
function safeRead(filePath) {
|
|
73
|
+
try {
|
|
74
|
+
return fs.readFileSync(filePath, 'utf-8');
|
|
75
|
+
} catch (_) {
|
|
76
|
+
return '';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function truncate(text, max) {
|
|
81
|
+
const s = String(text || '').trim();
|
|
82
|
+
if (s.length <= max) return s;
|
|
83
|
+
return `${s.slice(0, max - 1)}…`;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function scaffoldIrFiles(relayDir) {
|
|
87
|
+
if (!fs.existsSync(relayDir)) fs.mkdirSync(relayDir, { recursive: true });
|
|
88
|
+
for (const [file, template] of Object.entries(IR_TEMPLATES)) {
|
|
89
|
+
const filePath = path.join(relayDir, file);
|
|
90
|
+
if (!fs.existsSync(filePath)) {
|
|
91
|
+
fs.writeFileSync(filePath, template, 'utf-8');
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function loadMemory(workspacePath) {
|
|
97
|
+
const memoryPath = path.join(workspacePath, '.relay', 'memory.json');
|
|
98
|
+
if (!fs.existsSync(memoryPath)) return null;
|
|
99
|
+
try {
|
|
100
|
+
return JSON.parse(fs.readFileSync(memoryPath, 'utf-8'));
|
|
101
|
+
} catch (_) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function loadConfig(workspacePath) {
|
|
107
|
+
const configPath = path.join(workspacePath, '.relay', 'config.json');
|
|
108
|
+
if (!fs.existsSync(configPath)) return null;
|
|
109
|
+
try {
|
|
110
|
+
return JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
111
|
+
} catch (_) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function readIrSection(relayDir, fileName, maxChars) {
|
|
117
|
+
const content = safeRead(path.join(relayDir, fileName));
|
|
118
|
+
if (!content.trim()) return null;
|
|
119
|
+
return truncate(content.replace(/^#.*\n+/m, '').trim(), maxChars);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function extractOpenDecisions(decisionsMd, maxLines) {
|
|
123
|
+
if (!decisionsMd) return [];
|
|
124
|
+
|
|
125
|
+
const lines = decisionsMd.split('\n');
|
|
126
|
+
const open = [];
|
|
127
|
+
let inOpen = false;
|
|
128
|
+
|
|
129
|
+
for (const line of lines) {
|
|
130
|
+
if (/^##\s*open/i.test(line)) {
|
|
131
|
+
inOpen = true;
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if (/^##\s/.test(line) && inOpen) break;
|
|
135
|
+
|
|
136
|
+
if (inOpen && line.trim()) {
|
|
137
|
+
if (/^- \[[ xX]\]/.test(line) || /^- /.test(line)) {
|
|
138
|
+
open.push(line.trim());
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (!open.length) {
|
|
144
|
+
for (const line of lines) {
|
|
145
|
+
if (/^- \[[ ]\]/.test(line)) open.push(line.trim());
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return open.slice(0, maxLines);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function extractTaskLines(currentTaskMd, maxLines) {
|
|
153
|
+
if (!currentTaskMd) return [];
|
|
154
|
+
return currentTaskMd
|
|
155
|
+
.split('\n')
|
|
156
|
+
.map(l => l.trim())
|
|
157
|
+
.filter(l => l.startsWith('- [') || l.startsWith('- '))
|
|
158
|
+
.slice(0, maxLines);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function getConnectedAgents(config) {
|
|
162
|
+
if (!config?.agents) return [];
|
|
163
|
+
return Object.entries(config.agents)
|
|
164
|
+
.filter(([, data]) => data?.status === 'connected')
|
|
165
|
+
.map(([name, data]) => ({
|
|
166
|
+
name,
|
|
167
|
+
connectedAt: data.connectedAt || null,
|
|
168
|
+
eventCount: data.eventCount || 0,
|
|
169
|
+
transcriptPath: data.transcriptPath || null,
|
|
170
|
+
}));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function getTimeline(memory) {
|
|
174
|
+
if (Array.isArray(memory?.timeline) && memory.timeline.length) {
|
|
175
|
+
return memory.timeline;
|
|
176
|
+
}
|
|
177
|
+
const merged = [];
|
|
178
|
+
for (const [agent, data] of Object.entries(memory?.agents || {})) {
|
|
179
|
+
for (const event of data?.events || []) {
|
|
180
|
+
merged.push({ ...event, source: event.source || agent });
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
merged.sort((a, b) => Date.parse(a.ts || '') - Date.parse(b.ts || ''));
|
|
184
|
+
return merged;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function findLastCheckpoint(timeline) {
|
|
188
|
+
for (let i = timeline.length - 1; i >= 0; i--) {
|
|
189
|
+
const e = timeline[i];
|
|
190
|
+
if (e.kind === 'checkpoint') return e;
|
|
191
|
+
}
|
|
192
|
+
for (let i = timeline.length - 1; i >= 0; i--) {
|
|
193
|
+
const e = timeline[i];
|
|
194
|
+
if (e.kind === 'code_edit') return e;
|
|
195
|
+
}
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function selectRelevantEvents(timeline, limits) {
|
|
200
|
+
const messages = timeline.filter(e => (e.kind || 'message') === 'message');
|
|
201
|
+
const edits = timeline.filter(e => e.kind === 'code_edit');
|
|
202
|
+
const artifacts = timeline.filter(e => e.kind === 'artifact');
|
|
203
|
+
|
|
204
|
+
const userMsgs = messages.filter(e => e.role === 'user').slice(-limits.maxUserMessages);
|
|
205
|
+
const assistantMsgs = messages.filter(e => e.role === 'assistant').slice(-limits.maxAssistantMessages);
|
|
206
|
+
const recentEdits = edits.slice(-limits.maxCodeEdits);
|
|
207
|
+
const recentArtifacts = artifacts.slice(-limits.maxArtifacts);
|
|
208
|
+
|
|
209
|
+
const picked = [...userMsgs, ...assistantMsgs, ...recentEdits, ...recentArtifacts];
|
|
210
|
+
picked.sort((a, b) => Date.parse(a.ts || '') - Date.parse(b.ts || ''));
|
|
211
|
+
|
|
212
|
+
return picked.map(event => formatEventForContext(event, limits.maxContentChars));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
function formatEventForContext(event, maxChars) {
|
|
216
|
+
const kind = event.kind || 'message';
|
|
217
|
+
const base = {
|
|
218
|
+
ts: normalizeTs(event.ts) || event.ts || null,
|
|
219
|
+
source: event.source || null,
|
|
220
|
+
kind,
|
|
221
|
+
role: event.role || null,
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
if (kind === 'code_edit' || kind === 'artifact') {
|
|
225
|
+
return {
|
|
226
|
+
...base,
|
|
227
|
+
file: event.file || null,
|
|
228
|
+
path: event.path || null,
|
|
229
|
+
summary: truncate(event.summary || event.content || 'File edited', maxChars),
|
|
230
|
+
hasDiff: Boolean(event.diff),
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
return {
|
|
235
|
+
...base,
|
|
236
|
+
content: truncate(event.content || '', maxChars),
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function formatCheckpoint(checkpoint) {
|
|
241
|
+
if (!checkpoint) {
|
|
242
|
+
return { status: 'none', message: 'No checkpoint or code edit recorded yet.' };
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return {
|
|
246
|
+
ts: normalizeTs(checkpoint.ts) || checkpoint.ts,
|
|
247
|
+
source: checkpoint.source,
|
|
248
|
+
kind: checkpoint.kind,
|
|
249
|
+
file: checkpoint.file || checkpoint.path || null,
|
|
250
|
+
summary: checkpoint.summary || checkpoint.content || null,
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function buildProjectSummary(relayDir, memory, config, limits) {
|
|
255
|
+
const fromIr = readIrSection(relayDir, IR_FILES.project, limits.maxProjectChars);
|
|
256
|
+
if (fromIr && !fromIr.includes('Describe what this project')) {
|
|
257
|
+
return fromIr;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
const workspace = memory?.workspace || config?.workspace || 'unknown';
|
|
261
|
+
const agents = getConnectedAgents(config);
|
|
262
|
+
const timeline = getTimeline(memory);
|
|
263
|
+
const lastSync = memory?.lastSync || 'never';
|
|
264
|
+
|
|
265
|
+
return [
|
|
266
|
+
`Workspace: ${workspace}`,
|
|
267
|
+
`Connected agents: ${agents.length ? agents.map(a => a.name).join(', ') : 'none'}`,
|
|
268
|
+
`Timeline events: ${timeline.length}`,
|
|
269
|
+
`Last sync: ${lastSync}`,
|
|
270
|
+
'',
|
|
271
|
+
'Tip: run `relay compile` (relay-sync skill) to populate this from the synced timeline.',
|
|
272
|
+
].join('\n');
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const COMPILE_LIMITS = {
|
|
276
|
+
maxTimelineEvents: 60,
|
|
277
|
+
maxEventChars: 600,
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
function formatTimelineEventForCompile(event, maxChars) {
|
|
281
|
+
const kind = event.kind || 'message';
|
|
282
|
+
const header = `[${event.ts || '?'}] ${event.source || '?'} | ${kind}${event.role ? ` | ${event.role}` : ''}`;
|
|
283
|
+
if (kind === 'code_edit' || kind === 'artifact') {
|
|
284
|
+
const body = [event.file || event.path, event.summary || event.content].filter(Boolean).join(' — ');
|
|
285
|
+
return `${header}\n${truncate(body, maxChars)}`;
|
|
286
|
+
}
|
|
287
|
+
return `${header}\n${truncate(event.content || '', maxChars)}`;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
function buildCompileBrief(workspacePath, options = {}) {
|
|
291
|
+
const limits = { ...COMPILE_LIMITS, ...(options.limits || {}) };
|
|
292
|
+
const relayDir = path.join(workspacePath, '.relay');
|
|
293
|
+
scaffoldIrFiles(relayDir);
|
|
294
|
+
|
|
295
|
+
const memory = loadMemory(workspacePath);
|
|
296
|
+
const config = loadConfig(workspacePath);
|
|
297
|
+
const timeline = memory ? getTimeline(memory) : [];
|
|
298
|
+
const recentTimeline = timeline.slice(-limits.maxTimelineEvents);
|
|
299
|
+
|
|
300
|
+
const irSnapshot = {};
|
|
301
|
+
for (const file of Object.values(IR_FILES)) {
|
|
302
|
+
irSnapshot[file] = safeRead(path.join(relayDir, file));
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
return {
|
|
306
|
+
version: 1,
|
|
307
|
+
generatedAt: new Date().toISOString(),
|
|
308
|
+
workspace: memory?.workspace || config?.workspace || workspacePath,
|
|
309
|
+
lastSync: memory?.lastSync || null,
|
|
310
|
+
timelineEventCount: timeline.length,
|
|
311
|
+
timelineSampleCount: recentTimeline.length,
|
|
312
|
+
connectedAgents: getConnectedAgents(config),
|
|
313
|
+
irSnapshot,
|
|
314
|
+
timelineSample: recentTimeline.map(e =>
|
|
315
|
+
formatTimelineEventForCompile(e, limits.maxEventChars)
|
|
316
|
+
),
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
function renderCompileBriefMarkdown(brief) {
|
|
321
|
+
const lines = [
|
|
322
|
+
'# RELAY COMPILE BRIEF',
|
|
323
|
+
'',
|
|
324
|
+
`> Generated ${brief.generatedAt} | workspace \`${brief.workspace}\` | ${brief.timelineSampleCount} of ${brief.timelineEventCount} timeline events`,
|
|
325
|
+
'',
|
|
326
|
+
'**Purpose:** Input for the **relay-sync skill** (coding agent). Use this to update IR markdown — not for handoff to a fresh agent (use `relay_context.md` for that).',
|
|
327
|
+
'',
|
|
328
|
+
'---',
|
|
329
|
+
'',
|
|
330
|
+
'## Agent instructions',
|
|
331
|
+
'',
|
|
332
|
+
'1. Read the **Timeline sample** below (from `.relay/memory.json` — not raw agent JSONL).',
|
|
333
|
+
'2. Merge into the **Current IR files** — preserve resolved decisions and checked tasks unless obsolete.',
|
|
334
|
+
'3. Write updated files under `.relay/`:',
|
|
335
|
+
' - `project.md` — stable overview, stack, goals',
|
|
336
|
+
' - `current_task.md` — `- [ ]` / `- [x]` under In progress / Next',
|
|
337
|
+
' - `decisions.md` — open under `## Open`, resolved under `## Resolved`',
|
|
338
|
+
' - optionally `architecture.md`, `failures.md` if the timeline supports it',
|
|
339
|
+
'4. Run: `npx relay-os context .` to refresh `relay_context.md` for the next agent.',
|
|
340
|
+
'',
|
|
341
|
+
'Do **not** paste this entire brief into chat when handings off — only the resulting IR + `relay_context.md`.',
|
|
342
|
+
'',
|
|
343
|
+
'---',
|
|
344
|
+
'',
|
|
345
|
+
'## Connected agents',
|
|
346
|
+
'',
|
|
347
|
+
brief.connectedAgents.length
|
|
348
|
+
? brief.connectedAgents.map(a => `- ${a.name} (${a.eventCount} events)`).join('\n')
|
|
349
|
+
: '_None — run relay sync after connecting agents._',
|
|
350
|
+
'',
|
|
351
|
+
'---',
|
|
352
|
+
'',
|
|
353
|
+
'## Current IR files',
|
|
354
|
+
'',
|
|
355
|
+
];
|
|
356
|
+
|
|
357
|
+
for (const [file, content] of Object.entries(brief.irSnapshot)) {
|
|
358
|
+
lines.push(`### ${file}`, '', '```markdown', content.trim() || '(empty)', '```', '');
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
lines.push('---', '', '## Timeline sample', '');
|
|
362
|
+
|
|
363
|
+
if (!brief.timelineSample.length) {
|
|
364
|
+
lines.push('_Empty — run `npx relay-os sync .` first._');
|
|
365
|
+
} else {
|
|
366
|
+
for (const block of brief.timelineSample) {
|
|
367
|
+
lines.push('```text', block, '```', '');
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
return lines.join('\n');
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
function writeCompileBrief(workspacePath, options = {}) {
|
|
375
|
+
const relayDir = path.join(workspacePath, '.relay');
|
|
376
|
+
const brief = buildCompileBrief(workspacePath, options);
|
|
377
|
+
const markdown = renderCompileBriefMarkdown(brief);
|
|
378
|
+
const jsonPath = path.join(relayDir, 'compile_brief.json');
|
|
379
|
+
const mdPath = path.join(relayDir, 'compile_brief.md');
|
|
380
|
+
|
|
381
|
+
fs.writeFileSync(jsonPath, JSON.stringify(brief, null, 2));
|
|
382
|
+
fs.writeFileSync(mdPath, markdown, 'utf-8');
|
|
383
|
+
|
|
384
|
+
return { brief, markdown, paths: { json: jsonPath, markdown: mdPath } };
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
function compileRelayContext(workspacePath, options = {}) {
|
|
388
|
+
const limits = { ...DEFAULT_LIMITS, ...(options.limits || {}) };
|
|
389
|
+
const relayDir = path.join(workspacePath, '.relay');
|
|
390
|
+
|
|
391
|
+
scaffoldIrFiles(relayDir);
|
|
392
|
+
|
|
393
|
+
const memory = loadMemory(workspacePath);
|
|
394
|
+
const config = loadConfig(workspacePath);
|
|
395
|
+
const timeline = memory ? getTimeline(memory) : [];
|
|
396
|
+
|
|
397
|
+
const projectSummary = buildProjectSummary(relayDir, memory, config, limits);
|
|
398
|
+
const currentTaskMd = safeRead(path.join(relayDir, IR_FILES.currentTask));
|
|
399
|
+
const decisionsMd = safeRead(path.join(relayDir, IR_FILES.decisions));
|
|
400
|
+
|
|
401
|
+
const context = {
|
|
402
|
+
version: 1,
|
|
403
|
+
generatedAt: new Date().toISOString(),
|
|
404
|
+
workspace: memory?.workspace || config?.workspace || workspacePath,
|
|
405
|
+
lastSync: memory?.lastSync || null,
|
|
406
|
+
sections: {
|
|
407
|
+
PROJECT_SUMMARY: projectSummary,
|
|
408
|
+
CURRENT_TASKS: extractTaskLines(currentTaskMd, limits.maxTaskLines),
|
|
409
|
+
OPEN_DECISIONS: extractOpenDecisions(decisionsMd, limits.maxDecisionLines),
|
|
410
|
+
CONNECTED_AGENTS: getConnectedAgents(config),
|
|
411
|
+
LAST_CHECKPOINT: formatCheckpoint(findLastCheckpoint(timeline)),
|
|
412
|
+
RELEVANT_EVENTS: selectRelevantEvents(timeline, limits),
|
|
413
|
+
},
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
const markdown = renderRelayContextMarkdown(context);
|
|
417
|
+
return { context, markdown };
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
function renderRelayContextMarkdown(ctx) {
|
|
421
|
+
const s = ctx.sections;
|
|
422
|
+
const lines = [
|
|
423
|
+
'# RELAY_CONTEXT',
|
|
424
|
+
'',
|
|
425
|
+
`> Auto-generated ${ctx.generatedAt} | workspace \`${ctx.workspace}\` | last sync ${ctx.lastSync || 'never'}`,
|
|
426
|
+
'',
|
|
427
|
+
'**Do not paste raw transcripts.** This file is the handoff bundle for new agent sessions.',
|
|
428
|
+
'',
|
|
429
|
+
'---',
|
|
430
|
+
'',
|
|
431
|
+
'## PROJECT SUMMARY',
|
|
432
|
+
'',
|
|
433
|
+
s.PROJECT_SUMMARY,
|
|
434
|
+
'',
|
|
435
|
+
'## CURRENT TASKS',
|
|
436
|
+
'',
|
|
437
|
+
s.CURRENT_TASKS.length
|
|
438
|
+
? s.CURRENT_TASKS.map(t => `- ${t.replace(/^- /, '')}`).join('\n')
|
|
439
|
+
: '_No tasks yet — run `relay compile` (relay-sync skill) to populate from timeline._',
|
|
440
|
+
'',
|
|
441
|
+
'## OPEN DECISIONS',
|
|
442
|
+
'',
|
|
443
|
+
s.OPEN_DECISIONS.length
|
|
444
|
+
? s.OPEN_DECISIONS.join('\n')
|
|
445
|
+
: '_No open decisions — run `relay compile` to extract from timeline._',
|
|
446
|
+
'',
|
|
447
|
+
'## CONNECTED AGENTS',
|
|
448
|
+
'',
|
|
449
|
+
s.CONNECTED_AGENTS.length
|
|
450
|
+
? s.CONNECTED_AGENTS.map(a =>
|
|
451
|
+
`- **${a.name}** | ${a.eventCount} events | connected ${a.connectedAt || '?'}`
|
|
452
|
+
).join('\n')
|
|
453
|
+
: '_No agents connected — register workspace in Relay UI and connect agents._',
|
|
454
|
+
'',
|
|
455
|
+
'## LAST CHECKPOINT',
|
|
456
|
+
'',
|
|
457
|
+
];
|
|
458
|
+
|
|
459
|
+
if (s.LAST_CHECKPOINT.status === 'none') {
|
|
460
|
+
lines.push(s.LAST_CHECKPOINT.message);
|
|
461
|
+
} else {
|
|
462
|
+
lines.push(
|
|
463
|
+
`- **${s.LAST_CHECKPOINT.kind}** via ${s.LAST_CHECKPOINT.source} at ${s.LAST_CHECKPOINT.ts}`,
|
|
464
|
+
s.LAST_CHECKPOINT.file ? `- File: \`${s.LAST_CHECKPOINT.file}\`` : '',
|
|
465
|
+
s.LAST_CHECKPOINT.summary ? `- ${truncate(s.LAST_CHECKPOINT.summary, 240)}` : '',
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
lines.push('', '## RELEVANT EVENTS', '');
|
|
470
|
+
|
|
471
|
+
if (!s.RELEVANT_EVENTS.length) {
|
|
472
|
+
lines.push('_No events yet — sync agents to populate timeline._');
|
|
473
|
+
} else {
|
|
474
|
+
for (const e of s.RELEVANT_EVENTS) {
|
|
475
|
+
const label = e.kind === 'code_edit'
|
|
476
|
+
? `[edit] ${e.source} edited ${e.file || 'file'}`
|
|
477
|
+
: e.kind === 'artifact'
|
|
478
|
+
? `[artifact] ${e.source} ${e.file || ''}`
|
|
479
|
+
: `[${e.source}] ${e.role}`;
|
|
480
|
+
lines.push(`### ${label} | ${e.ts || '?'}`);
|
|
481
|
+
lines.push('');
|
|
482
|
+
lines.push(e.content || e.summary || '');
|
|
483
|
+
lines.push('');
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
lines.push(
|
|
488
|
+
'---',
|
|
489
|
+
'',
|
|
490
|
+
'_Source: `.relay/memory.json` + IR markdown. Regenerate: `npx relay-os context .` after `relay compile`._',
|
|
491
|
+
);
|
|
492
|
+
|
|
493
|
+
return lines.filter(Boolean).join('\n');
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
function writeRelayContext(workspacePath, options = {}) {
|
|
497
|
+
const relayDir = path.join(workspacePath, '.relay');
|
|
498
|
+
const { context, markdown } = compileRelayContext(workspacePath, options);
|
|
499
|
+
|
|
500
|
+
fs.writeFileSync(path.join(relayDir, 'relay_context.json'), JSON.stringify(context, null, 2));
|
|
501
|
+
fs.writeFileSync(path.join(relayDir, 'relay_context.md'), markdown, 'utf-8');
|
|
502
|
+
|
|
503
|
+
return { context, markdown, paths: {
|
|
504
|
+
json: path.join(relayDir, 'relay_context.json'),
|
|
505
|
+
markdown: path.join(relayDir, 'relay_context.md'),
|
|
506
|
+
}};
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
module.exports = {
|
|
510
|
+
IR_FILES,
|
|
511
|
+
IR_TEMPLATES,
|
|
512
|
+
scaffoldIrFiles,
|
|
513
|
+
compileRelayContext,
|
|
514
|
+
writeRelayContext,
|
|
515
|
+
renderRelayContextMarkdown,
|
|
516
|
+
buildCompileBrief,
|
|
517
|
+
writeCompileBrief,
|
|
518
|
+
renderCompileBriefMarkdown,
|
|
519
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
const { getMemory } = require('../relay');
|
|
2
|
+
const { readIrFiles, buildRelayTree } = require('./relayStore');
|
|
3
|
+
|
|
4
|
+
function countByKind(events) {
|
|
5
|
+
const counts = { message: 0, code_edit: 0, artifact: 0, other: 0 };
|
|
6
|
+
for (const e of events) {
|
|
7
|
+
const k = e.kind || 'message';
|
|
8
|
+
if (counts[k] !== undefined) counts[k] += 1;
|
|
9
|
+
else counts.other += 1;
|
|
10
|
+
}
|
|
11
|
+
return counts;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function countBySource(events) {
|
|
15
|
+
const counts = {};
|
|
16
|
+
for (const e of events) {
|
|
17
|
+
const src = e.source || 'Unknown';
|
|
18
|
+
counts[src] = (counts[src] || 0) + 1;
|
|
19
|
+
}
|
|
20
|
+
return counts;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function groupEventsByDay(events) {
|
|
24
|
+
const groups = new Map();
|
|
25
|
+
for (const e of events) {
|
|
26
|
+
const day = e.ts ? e.ts.slice(0, 10) : 'unknown';
|
|
27
|
+
if (!groups.has(day)) groups.set(day, []);
|
|
28
|
+
groups.get(day).push(e);
|
|
29
|
+
}
|
|
30
|
+
return [...groups.entries()]
|
|
31
|
+
.sort((a, b) => b[0].localeCompare(a[0]))
|
|
32
|
+
.map(([day, items]) => ({ day, count: items.length, events: items }));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function paginateEvents(events, { limit = 40, offset = 0, kind, source, role } = {}) {
|
|
36
|
+
let filtered = events;
|
|
37
|
+
if (kind === 'code_edit') {
|
|
38
|
+
filtered = filtered.filter((e) => e.kind === 'code_edit' || e.kind === 'artifact');
|
|
39
|
+
} else if (kind && kind !== 'all') {
|
|
40
|
+
filtered = filtered.filter((e) => e.kind === kind);
|
|
41
|
+
}
|
|
42
|
+
if (source && source !== 'all') {
|
|
43
|
+
filtered = filtered.filter((e) => e.source === source);
|
|
44
|
+
}
|
|
45
|
+
if (role === 'user' || role === 'assistant') {
|
|
46
|
+
filtered = filtered.filter((e) => e.role === role);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const total = filtered.length;
|
|
50
|
+
const slice = filtered.slice(Math.max(0, offset), Math.max(0, offset) + limit);
|
|
51
|
+
return { total, offset, limit, events: slice };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function buildAgentSummary(memory) {
|
|
55
|
+
const agents = memory.agents || {};
|
|
56
|
+
return Object.entries(agents).map(([name, data]) => ({
|
|
57
|
+
name,
|
|
58
|
+
status: data.status || 'idle',
|
|
59
|
+
eventCount: data.eventCount || (data.events || []).length,
|
|
60
|
+
transcriptPath: data.transcriptPath || null,
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function buildDashboard(workspacePath, options = {}) {
|
|
65
|
+
const memory = getMemory(workspacePath);
|
|
66
|
+
const timeline = Array.isArray(memory.timeline) ? memory.timeline : [];
|
|
67
|
+
const sorted = [...timeline].sort((a, b) => new Date(a.ts || 0) - new Date(b.ts || 0));
|
|
68
|
+
|
|
69
|
+
const ir = readIrFiles(workspacePath);
|
|
70
|
+
const tree = buildRelayTree(workspacePath);
|
|
71
|
+
|
|
72
|
+
const recentEdits = sorted
|
|
73
|
+
.filter((e) => e.kind === 'code_edit' || e.kind === 'artifact')
|
|
74
|
+
.slice(-20)
|
|
75
|
+
.reverse();
|
|
76
|
+
|
|
77
|
+
const activityPage = paginateEvents(sorted, {
|
|
78
|
+
limit: options.limit || 40,
|
|
79
|
+
offset: options.offset || 0,
|
|
80
|
+
kind: options.kind,
|
|
81
|
+
source: options.source,
|
|
82
|
+
role: options.role,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
workspace: memory.workspace || workspacePath,
|
|
87
|
+
lastSync: memory.lastSync || null,
|
|
88
|
+
stats: {
|
|
89
|
+
totalEvents: sorted.length,
|
|
90
|
+
byKind: countByKind(sorted),
|
|
91
|
+
bySource: countBySource(sorted),
|
|
92
|
+
connectedAgents: buildAgentSummary(memory).filter((a) => a.status === 'connected').length,
|
|
93
|
+
},
|
|
94
|
+
agents: buildAgentSummary(memory),
|
|
95
|
+
handoff: {
|
|
96
|
+
markdown: ir['relay_context.md'] || '',
|
|
97
|
+
updatedAt: memory.lastSync,
|
|
98
|
+
},
|
|
99
|
+
ir: {
|
|
100
|
+
project: ir['project.md'] || '',
|
|
101
|
+
currentTask: ir['current_task.md'] || '',
|
|
102
|
+
decisions: ir['decisions.md'] || '',
|
|
103
|
+
failures: ir['failures.md'] || '',
|
|
104
|
+
architecture: ir['architecture.md'] || '',
|
|
105
|
+
compileBrief: ir['compile_brief.md'] || '',
|
|
106
|
+
},
|
|
107
|
+
recentEdits,
|
|
108
|
+
activity: activityPage,
|
|
109
|
+
days: groupEventsByDay(sorted).slice(0, 14),
|
|
110
|
+
fileTree: tree,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
module.exports = {
|
|
115
|
+
buildDashboard,
|
|
116
|
+
paginateEvents,
|
|
117
|
+
groupEventsByDay,
|
|
118
|
+
};
|