serverless-ircd 0.5.0 → 0.7.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/.github/workflows/ci.yml +40 -3
- package/.github/workflows/deploy-aws.yml +1 -2
- package/.github/workflows/deploy-cf-tcp.yml +1 -5
- package/.github/workflows/deploy-cf.yml +1 -2
- package/.gitmodules +3 -0
- package/CHANGELOG.md +474 -0
- package/README.md +219 -22
- package/apps/aws-stack/README.md +33 -0
- package/apps/aws-stack/package.json +1 -1
- package/apps/aws-stack/src/aws-stack.ts +74 -9
- package/apps/aws-stack/tests/coverage-command.test.ts +155 -0
- package/apps/aws-stack/tests/stack.test.ts +2 -2
- package/apps/aws-stack/tests/synth-no-bundle.test.ts +129 -0
- package/apps/aws-stack/tests/vitest.setup.ts +18 -0
- package/apps/aws-stack/vitest.config.ts +3 -0
- package/apps/cf-tcp-container/package.json +1 -1
- package/apps/cf-tcp-container/src/config-loader.ts +6 -7
- package/apps/cf-tcp-container/src/container-server.ts +3 -0
- package/apps/cf-tcp-container/tests/config-loader.test.ts +10 -3
- package/apps/cf-tcp-container/wrangler.toml +1 -1
- package/apps/cf-worker/package.json +2 -1
- package/apps/cf-worker/src/origin-allowlist.ts +99 -0
- package/apps/cf-worker/src/worker.ts +89 -9
- package/apps/cf-worker/tests/fixtures/web-dist/app/index.html +18 -0
- package/apps/cf-worker/tests/fixtures/web-dist/index.html +18 -0
- package/apps/cf-worker/tests/origin-allowlist.test.ts +101 -0
- package/apps/cf-worker/tests/smoke.test.ts +28 -2
- package/apps/cf-worker/tests/ws-origin.test.ts +89 -0
- package/apps/cf-worker/vitest.config.ts +1 -1
- package/apps/cf-worker/wrangler.test.toml +23 -0
- package/apps/cf-worker/wrangler.toml +59 -3
- package/apps/local-cli/package.json +1 -1
- package/apps/local-cli/src/config-loader.ts +6 -6
- package/apps/local-cli/src/main.ts +20 -0
- package/apps/local-cli/src/server.ts +9 -7
- package/apps/local-cli/tests/e2e.test.ts +112 -28
- package/apps/local-cli/tests/tcp.test.ts +71 -19
- package/apps/local-cli/tests/ws-subprotocol.test.ts +12 -7
- package/apps/web/landing/index.html +217 -0
- package/apps/web/package.json +28 -0
- package/apps/web/scripts/build.mjs +125 -0
- package/apps/web/src/build-env.ts +43 -0
- package/apps/web/src/config-schema.ts +138 -0
- package/apps/web/static/config.json +28 -0
- package/apps/web/static/config.prod.json +28 -0
- package/apps/web/static/config.staging.json +28 -0
- package/apps/web/tests/build-env.test.ts +63 -0
- package/apps/web/tests/build-smoke.test.ts +103 -0
- package/apps/web/tests/config-schema.test.ts +432 -0
- package/apps/web/tests/workspace.test.ts +12 -0
- package/apps/web/tsconfig.json +10 -0
- package/apps/web/upstream/.browserslistrc +3 -0
- package/apps/web/upstream/.editorconfig +9 -0
- package/apps/web/upstream/.eslintignore +3 -0
- package/apps/web/upstream/.eslintrc.js +90 -0
- package/apps/web/upstream/.github/FUNDING.yml +12 -0
- package/apps/web/upstream/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- package/apps/web/upstream/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/apps/web/upstream/.github/workflows/push.yml +26 -0
- package/apps/web/upstream/.github/workflows/release.yml +33 -0
- package/apps/web/upstream/.github/workflows/release_manual.yml +55 -0
- package/apps/web/upstream/.prettierrc.js +9 -0
- package/apps/web/upstream/.stylelintignore +5 -0
- package/apps/web/upstream/.stylelintrc.js +21 -0
- package/apps/web/upstream/LICENSE +201 -0
- package/apps/web/upstream/README.md +76 -0
- package/apps/web/upstream/babel.config.js +25 -0
- package/apps/web/upstream/crowdin.yml +3 -0
- package/apps/web/upstream/index.html +35 -0
- package/apps/web/upstream/jest.config.js +7 -0
- package/apps/web/upstream/jsdoc.json +22 -0
- package/apps/web/upstream/package.json +80 -0
- package/apps/web/upstream/scripts/pre-commit +43 -0
- package/apps/web/upstream/src/components/App.vue +516 -0
- package/apps/web/upstream/src/components/AppSettings.vue +587 -0
- package/apps/web/upstream/src/components/AutoComplete.vue +284 -0
- package/apps/web/upstream/src/components/Avatar.vue +105 -0
- package/apps/web/upstream/src/components/AwayStatusIndicator.vue +77 -0
- package/apps/web/upstream/src/components/BufferKey.vue +121 -0
- package/apps/web/upstream/src/components/BufferSettings.vue +97 -0
- package/apps/web/upstream/src/components/Captcha.vue +85 -0
- package/apps/web/upstream/src/components/ChannelBanlist.vue +96 -0
- package/apps/web/upstream/src/components/ChannelInfo.vue +159 -0
- package/apps/web/upstream/src/components/ChannelInvitelist.vue +276 -0
- package/apps/web/upstream/src/components/ChannelList.vue +345 -0
- package/apps/web/upstream/src/components/Container.vue +401 -0
- package/apps/web/upstream/src/components/ContainerHeader.vue +522 -0
- package/apps/web/upstream/src/components/ControlInput.vue +1016 -0
- package/apps/web/upstream/src/components/LoadingAnimation.vue +104 -0
- package/apps/web/upstream/src/components/MediaViewer.vue +199 -0
- package/apps/web/upstream/src/components/MessageInfo.vue +192 -0
- package/apps/web/upstream/src/components/MessageList.vue +1028 -0
- package/apps/web/upstream/src/components/MessageListAvatar.vue +20 -0
- package/apps/web/upstream/src/components/MessageListMessageCompact.vue +361 -0
- package/apps/web/upstream/src/components/MessageListMessageInline.vue +257 -0
- package/apps/web/upstream/src/components/MessageListMessageModern.vue +430 -0
- package/apps/web/upstream/src/components/NetworkSettings.vue +528 -0
- package/apps/web/upstream/src/components/Nicklist.vue +309 -0
- package/apps/web/upstream/src/components/NicklistUser.vue +181 -0
- package/apps/web/upstream/src/components/NotConnected.vue +271 -0
- package/apps/web/upstream/src/components/SelfUser.vue +283 -0
- package/apps/web/upstream/src/components/ServerSelector.vue +162 -0
- package/apps/web/upstream/src/components/ServerView.vue +126 -0
- package/apps/web/upstream/src/components/SettingsAdvanced.vue +232 -0
- package/apps/web/upstream/src/components/SettingsAliases.vue +121 -0
- package/apps/web/upstream/src/components/Sidebar.vue +429 -0
- package/apps/web/upstream/src/components/SidebarAboutBuffer.vue +288 -0
- package/apps/web/upstream/src/components/SidebarState.vue +145 -0
- package/apps/web/upstream/src/components/StartupError.vue +35 -0
- package/apps/web/upstream/src/components/StateBrowser.vue +420 -0
- package/apps/web/upstream/src/components/StateBrowserBuffer.vue +124 -0
- package/apps/web/upstream/src/components/StateBrowserNetwork.vue +823 -0
- package/apps/web/upstream/src/components/StateBrowserUsermenu.vue +162 -0
- package/apps/web/upstream/src/components/TypingStatusIndicator.vue +34 -0
- package/apps/web/upstream/src/components/TypingUsersList.vue +56 -0
- package/apps/web/upstream/src/components/UrlEmbed.vue +149 -0
- package/apps/web/upstream/src/components/UserBox.vue +728 -0
- package/apps/web/upstream/src/components/inputtools/Emoji.vue +67 -0
- package/apps/web/upstream/src/components/inputtools/TextStyle.vue +142 -0
- package/apps/web/upstream/src/components/startups/CommonLayout.vue +208 -0
- package/apps/web/upstream/src/components/startups/CustomServer.vue +495 -0
- package/apps/web/upstream/src/components/startups/KiwiBnc.vue +361 -0
- package/apps/web/upstream/src/components/startups/Personal.vue +317 -0
- package/apps/web/upstream/src/components/startups/Welcome.vue +544 -0
- package/apps/web/upstream/src/components/startups/ZncLogin.vue +229 -0
- package/apps/web/upstream/src/components/utils/InputConfirm.vue +68 -0
- package/apps/web/upstream/src/components/utils/InputPrompt.vue +118 -0
- package/apps/web/upstream/src/components/utils/InputText.vue +172 -0
- package/apps/web/upstream/src/components/utils/IrcInput.vue +579 -0
- package/apps/web/upstream/src/components/utils/PluginWrapper.vue +26 -0
- package/apps/web/upstream/src/components/utils/TabbedView.vue +149 -0
- package/apps/web/upstream/src/components/utils/TransitionExpand.vue +97 -0
- package/apps/web/upstream/src/helpers/Colours.js +128 -0
- package/apps/web/upstream/src/helpers/IrcdDiffs.js +26 -0
- package/apps/web/upstream/src/helpers/Md5.js +193 -0
- package/apps/web/upstream/src/helpers/Misc.js +401 -0
- package/apps/web/upstream/src/helpers/TextFormatting.js +237 -0
- package/apps/web/upstream/src/libs/AliasRewriter.js +157 -0
- package/apps/web/upstream/src/libs/AudioManager.js +60 -0
- package/apps/web/upstream/src/libs/BouncerMiddleware.js +247 -0
- package/apps/web/upstream/src/libs/BouncerProvider.js +551 -0
- package/apps/web/upstream/src/libs/ChathistoryMiddleware.js +153 -0
- package/apps/web/upstream/src/libs/ConfigLoader.js +94 -0
- package/apps/web/upstream/src/libs/EmojiProvider.js +46 -0
- package/apps/web/upstream/src/libs/GlobalApi.js +346 -0
- package/apps/web/upstream/src/libs/IPC.js +51 -0
- package/apps/web/upstream/src/libs/InputHandler.js +921 -0
- package/apps/web/upstream/src/libs/IrcClient.js +1506 -0
- package/apps/web/upstream/src/libs/Logger.js +71 -0
- package/apps/web/upstream/src/libs/Message.js +169 -0
- package/apps/web/upstream/src/libs/MessageFormatter.js +364 -0
- package/apps/web/upstream/src/libs/MessageParser.js +249 -0
- package/apps/web/upstream/src/libs/Notifications.js +78 -0
- package/apps/web/upstream/src/libs/ServerConnection.js +270 -0
- package/apps/web/upstream/src/libs/ServerSession.js +102 -0
- package/apps/web/upstream/src/libs/SoundBleep.js +20 -0
- package/apps/web/upstream/src/libs/StatePersistence.js +90 -0
- package/apps/web/upstream/src/libs/ThemeManager.js +128 -0
- package/apps/web/upstream/src/libs/TypingMiddleware.js +105 -0
- package/apps/web/upstream/src/libs/WindowTitle.js +63 -0
- package/apps/web/upstream/src/libs/batchedAdd.js +74 -0
- package/apps/web/upstream/src/libs/bufferTools.js +177 -0
- package/apps/web/upstream/src/libs/polyfill/Element.closest.js +18 -0
- package/apps/web/upstream/src/libs/renderers/Html.js +113 -0
- package/apps/web/upstream/src/libs/settingTools.js +31 -0
- package/apps/web/upstream/src/libs/state/BufferState.js +703 -0
- package/apps/web/upstream/src/libs/state/NetworkState.js +158 -0
- package/apps/web/upstream/src/libs/state/UserState.js +89 -0
- package/apps/web/upstream/src/libs/state/common.js +26 -0
- package/apps/web/upstream/src/libs/state.js +961 -0
- package/apps/web/upstream/src/libs/storage/Local.js +51 -0
- package/apps/web/upstream/src/main.js +566 -0
- package/apps/web/upstream/src/res/autocompleteCommands.js +31 -0
- package/apps/web/upstream/src/res/configTemplates.js +373 -0
- package/apps/web/upstream/src/res/globalStyle.css +277 -0
- package/apps/web/upstream/src/res/kiwiLoadingLogo.png +0 -0
- package/apps/web/upstream/src/res/locales/app.af-ZA.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.ar-SA.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.bg-BG.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.bs-BA.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.ca-ES.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.cs-CZ.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.da-DK.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.de-DE.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.dev.po +1246 -0
- package/apps/web/upstream/src/res/locales/app.el-GR.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.en-US.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.es-419.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.es-AR.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.es-EM.po +536 -0
- package/apps/web/upstream/src/res/locales/app.es-ES.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.es-US.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.eu-ES.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.fi-FI.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.fr-FR.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.gl-ES.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.he-IL.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.hi-IN.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.hu-HU.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.id-ID.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.it-IT.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.ja-JP.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.ko-KR.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.nl-NL.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.no-NO.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.pl-PL.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.pt-BR.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.pt-PT.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.ro-RO.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.ru-RU.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.sl-SI.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.sq-AL.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.sr-SP.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.sv-SE.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.tr-TR.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.uk-UA.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.vi-VN.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.zh-CN.po +1145 -0
- package/apps/web/upstream/src/res/locales/app.zh-TW.po +1145 -0
- package/apps/web/upstream/src/res/localesList.json +27 -0
- package/apps/web/upstream/src/res/logo.png +0 -0
- package/apps/web/upstream/src/thirdparty/about.html +43 -0
- package/apps/web/upstream/src/thirdparty/index.js +5 -0
- package/apps/web/upstream/src/thirdparty/kiwiirccom.vue +185 -0
- package/apps/web/upstream/static/config.json +28 -0
- package/apps/web/upstream/static/emoticons/smile.png +0 -0
- package/apps/web/upstream/static/favicon.png +0 -0
- package/apps/web/upstream/static/highlight.mp3 +0 -0
- package/apps/web/upstream/static/highlight.ogg +0 -0
- package/apps/web/upstream/static/locales/.gitignore +2 -0
- package/apps/web/upstream/static/plugins/customise.html.example +10 -0
- package/apps/web/upstream/static/themes/coffee/theme.css +145 -0
- package/apps/web/upstream/static/themes/common/base.css +1064 -0
- package/apps/web/upstream/static/themes/dark/theme.css +196 -0
- package/apps/web/upstream/static/themes/default/theme.css +92 -0
- package/apps/web/upstream/static/themes/elite/theme.css +248 -0
- package/apps/web/upstream/static/themes/grayfox/theme.css +143 -0
- package/apps/web/upstream/static/themes/nightswatch/theme.css +367 -0
- package/apps/web/upstream/static/themes/osprey/theme.css +115 -0
- package/apps/web/upstream/static/themes/radioactive/theme.css +1211 -0
- package/apps/web/upstream/static/themes/sky/theme.css +107 -0
- package/apps/web/upstream/tests/unit/BatchAdd.spec.js +174 -0
- package/apps/web/upstream/tests/unit/MessageParser.spec.js +125 -0
- package/apps/web/upstream/tests/unit/Misc.spec.js +24 -0
- package/apps/web/upstream/tests/unit/NetworkState.spec.js +58 -0
- package/apps/web/upstream/tests/unit/StartupError.spec.js +20 -0
- package/apps/web/upstream/vue.config.js +150 -0
- package/apps/web/upstream/yarn.lock +9767 -0
- package/apps/web/vitest.config.ts +13 -0
- package/biome.json +2 -0
- package/docs/ADR-001-pure-reducers-and-effect-system.md +74 -0
- package/docs/ADR-002-location-of-authority.md +82 -0
- package/docs/ADR-003-durable-object-sharding.md +110 -0
- package/docs/ADR-004-dynamodb-schema.md +96 -0
- package/docs/ADR-005-wss-only-transport-v1.md +83 -0
- package/docs/ADR-006-sasl-mechanism-scope.md +96 -0
- package/docs/ADR-007-deterministic-ports.md +82 -0
- package/docs/ADR-008-monorepo-tooling.md +60 -0
- package/docs/ADR-009-dual-transport-wss-and-irc-tls.md +138 -0
- package/docs/ADR-Index.md +15 -0
- package/docs/AWS-Adapter-Architecture.md +496 -0
- package/docs/AWS-Deployment.md +1275 -0
- package/docs/AWS-TCP-Deployment.md +410 -0
- package/docs/Cloudflare-Deployment-Guide.md +719 -0
- package/docs/Cloudflare-TCP-Deployment.md +510 -0
- package/docs/Home.md +16 -0
- package/docs/Observability.md +87 -0
- package/docs/PlanExtensions.md +812 -0
- package/docs/PlanIRCv3Websocket.md +503 -0
- package/docs/PlanWebClient.md +451 -0
- package/docs/Release-Process.md +443 -0
- package/docs/WebClientGuide.md +535 -0
- package/package.json +2 -2
- package/packages/aws-adapter/package.json +1 -1
- package/packages/aws-adapter/src/handlers/default.ts +3 -0
- package/packages/aws-adapter/src/handlers/nlb-stream.ts +9 -0
- package/packages/aws-adapter/src/serialize.ts +29 -1
- package/packages/aws-adapter/tests/account-store-dynamo.test.ts +49 -8
- package/packages/aws-adapter/tests/account-store.test.ts +4 -7
- package/packages/aws-adapter/tests/aws-harness.ts +5 -2
- package/packages/aws-adapter/tests/aws-integration.test.ts +8 -4
- package/packages/aws-adapter/tests/aws-runtime.test.ts +79 -0
- package/packages/aws-adapter/tests/config-loader.test.ts +11 -2
- package/packages/aws-adapter/tests/connect.test.ts +9 -9
- package/packages/aws-adapter/tests/disconnect-fanout.test.ts +3 -4
- package/packages/aws-adapter/tests/global-setup.ts +55 -30
- package/packages/aws-adapter/tests/gone-exception.test.ts +4 -9
- package/packages/aws-adapter/tests/handlers.test.ts +90 -4
- package/packages/aws-adapter/tests/message-store.test.ts +6 -5
- package/packages/aws-adapter/tests/nlb-stream.test.ts +60 -8
- package/packages/cf-adapter/package.json +2 -1
- package/packages/cf-adapter/src/connection-do.ts +3 -0
- package/packages/cf-adapter/src/serialize.ts +25 -4
- package/packages/cf-adapter/tests/cf-harness.ts +12 -1
- package/packages/cf-adapter/tests/cf-runtime.test.ts +269 -0
- package/packages/cf-adapter/tests/channel-do.test.ts +117 -0
- package/packages/cf-adapter/tests/config-loader.test.ts +49 -0
- package/packages/cf-adapter/tests/connection-do-pure.test.ts +91 -0
- package/packages/cf-adapter/tests/d1-account-store.test.ts +48 -0
- package/packages/cf-adapter/tests/registry-do.test.ts +104 -0
- package/packages/cf-adapter/tests/serialize.test.ts +308 -0
- package/packages/cf-adapter/vitest.config.ts +1 -1
- package/packages/in-memory-runtime/package.json +1 -1
- package/packages/irc-core/package.json +1 -1
- package/packages/irc-core/reports/mutation/mutation.html +342 -0
- package/packages/irc-core/src/caps/capabilities.ts +37 -3
- package/packages/irc-core/src/caps/index.ts +1 -0
- package/packages/irc-core/src/caps/sts.ts +84 -0
- package/packages/irc-core/src/commands/account-notify.ts +53 -0
- package/packages/irc-core/src/commands/away.ts +9 -3
- package/packages/irc-core/src/commands/cap.ts +23 -5
- package/packages/irc-core/src/commands/chathistory.ts +40 -11
- package/packages/irc-core/src/commands/index.ts +34 -0
- package/packages/irc-core/src/commands/isupport.ts +53 -0
- package/packages/irc-core/src/commands/mode.ts +8 -1
- package/packages/irc-core/src/commands/monitor.ts +327 -0
- package/packages/irc-core/src/commands/multiline.ts +256 -0
- package/packages/irc-core/src/commands/pre-away.ts +112 -0
- package/packages/irc-core/src/commands/privmsg.ts +19 -12
- package/packages/irc-core/src/commands/read-marker.ts +108 -0
- package/packages/irc-core/src/commands/registration.ts +8 -0
- package/packages/irc-core/src/commands/sasl.ts +24 -1
- package/packages/irc-core/src/commands/tagmsg.ts +71 -1
- package/packages/irc-core/src/commands/whois.ts +5 -0
- package/packages/irc-core/src/config.ts +65 -10
- package/packages/irc-core/src/effects.ts +14 -0
- package/packages/irc-core/src/ports.ts +389 -0
- package/packages/irc-core/src/protocol/index.ts +14 -0
- package/packages/irc-core/src/protocol/labeled-response.ts +133 -0
- package/packages/irc-core/src/protocol/numerics.ts +15 -0
- package/packages/irc-core/src/protocol/outbound.ts +16 -1
- package/packages/irc-core/src/protocol/standard-replies.ts +277 -0
- package/packages/irc-core/src/state/connection.ts +32 -1
- package/packages/irc-core/src/types.ts +112 -0
- package/packages/irc-core/stryker.commands.conf.json +1 -2
- package/packages/irc-core/tests/away-store.test.ts +73 -0
- package/packages/irc-core/tests/batch.test.ts +15 -0
- package/packages/irc-core/tests/caps/capabilities.test.ts +119 -2
- package/packages/irc-core/tests/caps/sts.test.ts +123 -0
- package/packages/irc-core/tests/commands/account-notify.test.ts +171 -0
- package/packages/irc-core/tests/commands/away.test.ts +85 -2
- package/packages/irc-core/tests/commands/cap.test.ts +165 -0
- package/packages/irc-core/tests/commands/chathistory.test.ts +148 -1
- package/packages/irc-core/tests/commands/echo-message.test.ts +9 -3
- package/packages/irc-core/tests/commands/isupport.test.ts +80 -0
- package/packages/irc-core/tests/commands/mode.test.ts +72 -0
- package/packages/irc-core/tests/commands/monitor.test.ts +411 -0
- package/packages/irc-core/tests/commands/multiline.test.ts +428 -0
- package/packages/irc-core/tests/commands/pre-away.test.ts +241 -0
- package/packages/irc-core/tests/commands/privmsg.test.ts +154 -3
- package/packages/irc-core/tests/commands/read-marker.test.ts +211 -0
- package/packages/irc-core/tests/commands/registration.test.ts +64 -0
- package/packages/irc-core/tests/commands/sasl.test.ts +116 -2
- package/packages/irc-core/tests/commands/tagmsg.test.ts +357 -0
- package/packages/irc-core/tests/commands/whois.test.ts +34 -0
- package/packages/irc-core/tests/config.test.ts +103 -13
- package/packages/irc-core/tests/labeled-response.test.ts +181 -0
- package/packages/irc-core/tests/message-tags.test.ts +114 -0
- package/packages/irc-core/tests/monitor-store.test.ts +200 -0
- package/packages/irc-core/tests/numerics.test.ts +13 -0
- package/packages/irc-core/tests/parser.test.ts +109 -0
- package/packages/irc-core/tests/read-marker-store.test.ts +108 -0
- package/packages/irc-core/tests/standard-replies.test.ts +412 -0
- package/packages/irc-core/tests/types.test.ts +27 -0
- package/packages/irc-server/package.json +1 -1
- package/packages/irc-server/src/actor.ts +450 -3
- package/packages/irc-server/src/dispatch.ts +108 -16
- package/packages/irc-server/tests/actor.test.ts +1432 -39
- package/packages/irc-server/tests/dispatch.test.ts +263 -2
- package/packages/irc-test-support/package.json +1 -1
- package/packages/irc-test-support/src/index.ts +6 -0
- package/packages/irc-test-support/src/scenarios.ts +24 -2
- package/packages/irc-test-support/src/test-config.ts +54 -0
- package/packages/irc-test-support/tests/test-config.test.ts +51 -0
- package/tools/ci-hardening/package.json +1 -1
- package/tools/ci-hardening/tests/ddb-local.test.ts +82 -0
- package/tools/load-test/package.json +33 -0
- package/tools/load-test/src/client.ts +351 -0
- package/tools/load-test/src/config.ts +313 -0
- package/tools/load-test/src/harness.ts +116 -0
- package/tools/load-test/src/main.ts +120 -0
- package/tools/load-test/src/metrics.ts +168 -0
- package/tools/load-test/src/report.ts +106 -0
- package/tools/load-test/tests/client.test.ts +212 -0
- package/tools/load-test/tests/config.test.ts +152 -0
- package/tools/load-test/tests/framing.test.ts +37 -0
- package/tools/load-test/tests/harness.test.ts +165 -0
- package/tools/load-test/tests/metrics.test.ts +174 -0
- package/tools/load-test/tests/report.test.ts +161 -0
- package/tools/load-test/tests/smoke.test.ts +67 -0
- package/tools/load-test/tsconfig.build.json +12 -0
- package/tools/load-test/tsconfig.test.json +10 -0
- package/tools/load-test/vitest.config.ts +29 -0
- package/tools/tcp-ws-forwarder/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# ADR-008: Monorepo and tooling stack
|
|
2
|
+
|
|
3
|
+
**Date:** 2025-01-10 (Phase 0)
|
|
4
|
+
**Status:** Accepted
|
|
5
|
+
**Supersedes:** —
|
|
6
|
+
**Superseded by:** —
|
|
7
|
+
|
|
8
|
+
## Context
|
|
9
|
+
|
|
10
|
+
ServerlessIRCd is a multi-package TypeScript project: a platform-agnostic
|
|
11
|
+
core (`irc-core`), an orchestration layer (`irc-server`), a reference runtime
|
|
12
|
+
(`in-memory-runtime`), two cloud adapters (`cf-adapter`, `aws-adapter`), and
|
|
13
|
+
several apps (`local-cli`, `cf-worker`, `aws-stack`). The toolchain must
|
|
14
|
+
support cross-package type checking, incremental builds, a unified test
|
|
15
|
+
runner, and CI that enforces coverage gates per package.
|
|
16
|
+
|
|
17
|
+
## Decision
|
|
18
|
+
|
|
19
|
+
| Concern | Choice | Rationale |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| Package manager | **pnpm** (workspaces) | Fast, disk-efficient, first-class monorepo support |
|
|
22
|
+
| Build orchestration | **turbo** (caching) | Incremental builds, remote cache, task dependency graph |
|
|
23
|
+
| TypeScript | Project references + `tsconfig.base.json` | Strict mode, `exactOptionalPropertyTypes`, `noUncheckedIndexedAccess` |
|
|
24
|
+
| Test runner | **vitest** | ESM-native, fast, integrates with Workers (`vitest-pool-workers`), built-in coverage |
|
|
25
|
+
| Coverage | v8 provider, gate ≥90% (100% on `irc-core`) | Enforced in CI (`.github/workflows/ci.yml`) |
|
|
26
|
+
| Lint/format | **Biome** | Single tool (replaces ESLint + Prettier), fast, zero config drift |
|
|
27
|
+
| CF bundler | **wrangler** (esbuild internally) | Native Workers toolchain |
|
|
28
|
+
| AWS bundler | **esbuild** (Lambda bundles) + **CDK v2** (infra) | Tree-shaking, fast cold starts |
|
|
29
|
+
| Runtime target | Node 20 (Lambda) + latest Workers runtime; ES2022+ | Aligns with platform-supported runtimes |
|
|
30
|
+
|
|
31
|
+
## Consequences
|
|
32
|
+
|
|
33
|
+
**Positive:**
|
|
34
|
+
- pnpm workspaces + turbo give fast local dev: only changed packages rebuild;
|
|
35
|
+
tests run incrementally.
|
|
36
|
+
- vitest's ESM-native design avoids the CJS/ESM interop pain that plagues
|
|
37
|
+
Jest-based monorepos. The same test files run under `vitest-pool-workers`
|
|
38
|
+
(real `workerd`) for CF adapter tests.
|
|
39
|
+
- Biome eliminates the ESLint/Prettier config drift problem — one tool, one
|
|
40
|
+
config, one command (`biome check`).
|
|
41
|
+
- TypeScript project references enforce package boundaries at compile time:
|
|
42
|
+
`irc-core` cannot accidentally import from `cf-adapter`.
|
|
43
|
+
|
|
44
|
+
**Negative:**
|
|
45
|
+
- pnpm's strict node-linker can surprise contributors used to npm/yarn's
|
|
46
|
+
hoisting. `node_modules` is per-package; global scripts need
|
|
47
|
+
`pnpm --filter`.
|
|
48
|
+
- turbo's caching requires consistent environment hashing; a CI cache miss
|
|
49
|
+
(e.g. different Node minor version) degrades to a full rebuild silently.
|
|
50
|
+
- Biome is newer than ESLint and lacks some ecosystem plugins. Custom rules
|
|
51
|
+
(e.g. "no ticket IDs in source files") are enforced via convention
|
|
52
|
+
(`AGENTS.md`) rather than a Biome plugin.
|
|
53
|
+
|
|
54
|
+
## References
|
|
55
|
+
|
|
56
|
+
- PLAN §9 — "Monorepo: pnpm + TypeScript project references; turbo for
|
|
57
|
+
caching"
|
|
58
|
+
- `pnpm-workspace.yaml`, `turbo.json`, `tsconfig.base.json`, `biome.json`
|
|
59
|
+
- `.github/workflows/ci.yml` — coverage gates and CI pipeline
|
|
60
|
+
- `AGENTS.md` — code style conventions
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# ADR-009: Dual transport — wss (default) + irc+tls on :6697
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-07-26 (Phase 7)
|
|
4
|
+
**Status:** Accepted
|
|
5
|
+
**Supersedes:** ADR-005 (wss-only transport in v1)
|
|
6
|
+
**Superseded by:** —
|
|
7
|
+
|
|
8
|
+
## Context
|
|
9
|
+
|
|
10
|
+
ADR-005 chose **wss-only** for v1. That decision rested on four points, all
|
|
11
|
+
still accurate as facts about the serverless substrates:
|
|
12
|
+
|
|
13
|
+
1. Both target platforms (CF Workers, AWS API Gateway WebSocket) support wss
|
|
14
|
+
natively with zero additional infrastructure; neither can accept raw TCP
|
|
15
|
+
from its request-response compute (Workers is request-response; API Gateway
|
|
16
|
+
is WebSocket-only).
|
|
17
|
+
2. wss is TLS-terminated at the edge (CF) or at API Gateway (AWS), so the
|
|
18
|
+
Lambda/Worker never sees plaintext credentials.
|
|
19
|
+
3. One IRC message per WebSocket text frame eliminates the need for a
|
|
20
|
+
stateful byte-stream line buffer in the core (the parser already tolerates
|
|
21
|
+
`\r\n`-joined frames for robustness).
|
|
22
|
+
4. The serverless cost/ops story stays clean: no long-running origin, no TCP
|
|
23
|
+
keepalive management, one codebase + two adapters.
|
|
24
|
+
|
|
25
|
+
What changed the decision is **demand, not capability**:
|
|
26
|
+
|
|
27
|
+
- **RFC 1459/2812 compliance.** The target modern clients (WeeChat, HexChat,
|
|
28
|
+
IRCCcd, TheLounge) mostly support wss, but there is a long tail of older
|
|
29
|
+
clients, bots, bridges, and monitoring tools that only speak `irc+tls`
|
|
30
|
+
(raw TCP + TLS on :6697). Supporting them was a non-goal for the initial v1
|
|
31
|
+
cut; the gap now matters for the compatibility-sweep deliverable.
|
|
32
|
+
- **SASL EXTERNAL (mTLS).** `AUTHENTICATE EXTERNAL` needs the client
|
|
33
|
+
certificate to reach the application layer (ADR-006). With wss and
|
|
34
|
+
edge-terminated TLS, the cert is consumed at the edge and the app only gets
|
|
35
|
+
a verified subject via platform config (CF API Shield mTLS, API Gateway
|
|
36
|
+
custom-domain mTLS — both TICKET-054). A real `irc+tls` path gives a more
|
|
37
|
+
conventional mTLS surface that matches client expectations.
|
|
38
|
+
- **Marginal cost is small.** The core is transport-agnostic by design: pure
|
|
39
|
+
reducers + a `ConnectionActor` that already accepts `\r\n`-joined frames.
|
|
40
|
+
Adding a second transport is a **second per-platform entry-point adapter**,
|
|
41
|
+
not a re-architecture. The generalized TCP byte-stream transport seam is
|
|
42
|
+
TICKET-053; the per-platform adapters are TICKET-055 (CF) and TICKET-056
|
|
43
|
+
(AWS).
|
|
44
|
+
|
|
45
|
+
## Decision
|
|
46
|
+
|
|
47
|
+
v1.x adopts a **dual-transport** model:
|
|
48
|
+
|
|
49
|
+
- **wss stays the serverless default.** `wss://server.tld/` with one IRC
|
|
50
|
+
message per WebSocket text frame remains the primary path. It needs zero
|
|
51
|
+
extra infrastructure on either platform and keeps the clean serverless
|
|
52
|
+
story for the common case.
|
|
53
|
+
- **`irc+tls` on :6697 is added** as a second, per-platform adapter for
|
|
54
|
+
RFC-compliant clients. TLS is mandatory; **plaintext TCP on :6667 stays
|
|
55
|
+
unsupported.** The entry point differs per platform because neither
|
|
56
|
+
serverless compute can accept raw TCP directly:
|
|
57
|
+
|
|
58
|
+
| Platform | Edge (TLS termination) | Origin / compute |
|
|
59
|
+
|----------|-------------------------------------|-----------------------------------------------|
|
|
60
|
+
| CF | Cloudflare Spectrum (Enterprise) | Cloudflare Container running TCP byte-stream |
|
|
61
|
+
| | | `ConnectionActor` over a persistent runtime |
|
|
62
|
+
| AWS | Network Load Balancer (`tls` listener) | Lambda **streaming** function (target); |
|
|
63
|
+
| | | connection ID derived from NLB flow metadata |
|
|
64
|
+
|
|
65
|
+
Spectrum terminates TLS at the edge and forwards plaintext TCP to the
|
|
66
|
+
container origin; NLB terminates TLS and invokes a Lambda streaming
|
|
67
|
+
function as target. Both reuse `AwsRuntime`/the CF runtime storage layer
|
|
68
|
+
for connection/channel/nick state.
|
|
69
|
+
|
|
70
|
+
The **pure reducer core and `ConnectionActor` are shared** across both
|
|
71
|
+
transports and both platforms. Only two things differ on the new path:
|
|
72
|
+
|
|
73
|
+
1. The **transport seam** (TICKET-053): `ConnectionActor` accepts either a
|
|
74
|
+
`WsTextFrameTransport` (one message per frame — current behavior) or a
|
|
75
|
+
`TcpByteStreamTransport` (stateful `\r\n` framing across chunks with
|
|
76
|
+
partial-line buffering). Parser → reducer → dispatch is unchanged.
|
|
77
|
+
2. The **entry-point adapter** (TICKET-055 / TICKET-056): Spectrum+Container
|
|
78
|
+
on CF, NLB+Lambda streaming on AWS.
|
|
79
|
+
|
|
80
|
+
mTLS (TICKET-054) is done at the edge on the wss path (CF API Shield mTLS /
|
|
81
|
+
API Gateway custom-domain mTLS) and via the TLS handshake on the TCP path
|
|
82
|
+
(Spectrum cert verification / NLB ACM cert + optional client-cert
|
|
83
|
+
verification).
|
|
84
|
+
|
|
85
|
+
## Consequences
|
|
86
|
+
|
|
87
|
+
**Positive:**
|
|
88
|
+
- RFC 1459/2812-compliant clients, bots, and bridges connect natively without
|
|
89
|
+
a `tcp-ws-forwarder` bridge. This unblocks the compatibility-sweep
|
|
90
|
+
deliverable for the long tail of TCP-only clients.
|
|
91
|
+
- A conventional mTLS surface opens for SASL `EXTERNAL` (TICKET-054): the
|
|
92
|
+
client cert reaches the application via the TLS handshake on the TCP path,
|
|
93
|
+
matching standard IRC client expectations, in addition to the edge-mTLS
|
|
94
|
+
path on wss.
|
|
95
|
+
- Core reuse: the pure reducers, `IrcRuntime` port, and `ConnectionActor`
|
|
96
|
+
are shared verbatim. The transport seam (TICKET-053) is the only new
|
|
97
|
+
abstraction in the core; everything else is per-platform glue.
|
|
98
|
+
- The wss default is untouched — deployments that do not need raw TCP pay no
|
|
99
|
+
infra cost and keep the clean serverless story.
|
|
100
|
+
|
|
101
|
+
**Negative:**
|
|
102
|
+
- **CF breaks the pure-serverless story on the TCP path.** Spectrum is an
|
|
103
|
+
Enterprise-tier feature, and the origin is a stateful Cloudflare Container
|
|
104
|
+
(or external compute), not a Worker. Connection state must survive origin
|
|
105
|
+
reconnects via the runtime's persistence layer — a new operational surface
|
|
106
|
+
that the wss path (Durable Objects) does not have.
|
|
107
|
+
- **AWS NLB + Lambda streaming has hard limits:** Lambda streaming invoke
|
|
108
|
+
idle timeout and maximum connection/duration caps. Long-idle IRC clients
|
|
109
|
+
can be dropped; reconnect/PING behavior must tolerate this (same class of
|
|
110
|
+
risk as the APIGW 2h WS cap, PLAN §10).
|
|
111
|
+
- **Extra per-platform adapter surface.** Two entry-point adapters
|
|
112
|
+
(TICKET-055, TICKET-056) and a new transport contract dimension
|
|
113
|
+
(TICKET-057) are added to the test matrix. Cross-adapter drift is now a
|
|
114
|
+
transport × runtime matrix, mitigated by the parametrized contract suite.
|
|
115
|
+
- **Double deploy/ops paths per platform.** Each platform now ships a wss
|
|
116
|
+
stack and a TCP+TLS stack with different infra (DO vs Container; APIGW vs
|
|
117
|
+
NLB). Deploy docs, cost monitoring, and incident runbooks must cover both
|
|
118
|
+
(TICKET-058).
|
|
119
|
+
|
|
120
|
+
## References
|
|
121
|
+
|
|
122
|
+
- ADR-005 — wss-only transport in v1 (**superseded** by this ADR)
|
|
123
|
+
- ADR-006 — SASL mechanism scope (PLAIN only; EXTERNAL deferred to Phase 7;
|
|
124
|
+
this ADR unblocks the mTLS path for EXTERNAL)
|
|
125
|
+
- PLAN §3 — Protocol scope (connection framing)
|
|
126
|
+
- PLAN §9 — Key technical decisions (framing)
|
|
127
|
+
- TICKET-052 — this ADR; revises the transport decision
|
|
128
|
+
- TICKET-053 — generalize `ConnectionActor` transport seam (TCP byte-stream
|
|
129
|
+
framing)
|
|
130
|
+
- TICKET-054 — mTLS support (edge config + `AccountStore` plumbing; enables
|
|
131
|
+
functional SASL EXTERNAL)
|
|
132
|
+
- TICKET-055 — CF TCP+TLS adapter via Cloudflare Spectrum + Container origin
|
|
133
|
+
- TICKET-056 — AWS TCP+TLS adapter via Network Load Balancer (TLS) + Lambda
|
|
134
|
+
streaming
|
|
135
|
+
- TICKET-057 — extend integration contract suite over transport
|
|
136
|
+
(wss × TCP+TLS)
|
|
137
|
+
- TICKET-058 — docs: `Cloudflare-TCP-Deployment.md` and `AWS-TCP-Deployment.md`
|
|
138
|
+
(TCP+TLS variants)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# ADR Index
|
|
2
|
+
|
|
3
|
+
This is an index of all Architecture Decision Records (ADRs), in chronological order.
|
|
4
|
+
|
|
5
|
+
| ADR | Title |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| [ADR-001](ADR-001-pure-reducers-and-effect-system) | Pure reducers and the effect system |
|
|
8
|
+
| [ADR-002](ADR-002-location-of-authority) | Location-of-authority state split |
|
|
9
|
+
| [ADR-003](ADR-003-durable-object-sharding) | Cloudflare Durable Object sharding strategy |
|
|
10
|
+
| [ADR-004](ADR-004-dynamodb-schema) | AWS DynamoDB schema |
|
|
11
|
+
| [ADR-005](ADR-005-wss-only-transport-v1) | wss-only transport in v1 (no raw TCP) |
|
|
12
|
+
| [ADR-006](ADR-006-sasl-mechanism-scope) | SASL mechanism scope (PLAIN always; EXTERNAL mTLS-conditional) |
|
|
13
|
+
| [ADR-007](ADR-007-deterministic-ports) | Deterministic ports for time and ID generation |
|
|
14
|
+
| [ADR-008](ADR-008-monorepo-tooling) | Monorepo and tooling stack |
|
|
15
|
+
| [ADR-009](ADR-009-dual-transport-wss-and-irc-tls) | Dual transport — wss (default) + irc+tls on :6697 |
|