synabun 2.0.0-beta → 2.0.5
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/CHANGELOG.md +65 -0
- package/NOTICE +5 -0
- package/README.md +1 -1
- package/THIRD-PARTY-LICENSES.md +51 -0
- package/benchmarks/fixtures/browser/README.md +1 -1
- package/benchmarks/fixtures/desktop/README.md +1 -1
- package/docs/whatsapp.md +2 -2
- package/hooks/claude-code/pre-compact.mjs +11 -0
- package/hooks/claude-code/prompt-submit.mjs +60 -184
- package/hooks/claude-code/session-start.mjs +73 -16
- package/hooks/claude-code/shared.mjs +20 -0
- package/hooks/claude-code/stop.mjs +5 -5
- package/launcher.mjs +40 -0
- package/lib/claude-hooks.js +61 -8
- package/lib/client-config-repair.js +4 -3
- package/lib/data-home-migration.js +4 -0
- package/lib/desktop-pwa.js +206 -0
- package/lib/external-tools.js +221 -0
- package/lib/first-launch-protection.js +5 -0
- package/lib/packaged-runtime.js +110 -0
- package/lib/start-launcher.js +1396 -0
- package/mcp-server/package-lock.json +2 -2
- package/mcp-server/package.json +1 -3
- package/neural-interface/i18n/en.json +1540 -154
- package/neural-interface/i18n/pt-BR.json +1538 -153
- package/neural-interface/lib/assistant-api.js +62 -6
- package/neural-interface/lib/assistant-brains/claude.js +4 -0
- package/neural-interface/lib/assistant-catalog.js +179 -27
- package/neural-interface/lib/assistant-config.js +31 -2
- package/neural-interface/lib/assistant-dispatch.js +62 -13
- package/neural-interface/lib/assistant-envelope.js +9 -6
- package/neural-interface/lib/assistant-hidden-models.js +393 -66
- package/neural-interface/lib/assistant-memory.js +24 -10
- package/neural-interface/lib/assistant-persona.js +6 -2
- package/neural-interface/lib/assistant-pricing.js +21 -6
- package/neural-interface/lib/assistant-runtime.js +181 -12
- package/neural-interface/lib/assistant-task-prompt.js +13 -3
- package/neural-interface/lib/assistant-test-density.js +142 -0
- package/neural-interface/lib/assistant-user-context-budgets.js +123 -0
- package/neural-interface/lib/assistant-user-context.js +908 -0
- package/neural-interface/lib/assistant-user-knowledge.js +328 -0
- package/neural-interface/lib/assistant-user-learn.js +404 -0
- package/neural-interface/lib/assistant-user-threads.js +226 -0
- package/neural-interface/lib/assistant-user-writer.js +181 -0
- package/neural-interface/lib/augmented-path.js +23 -3
- package/neural-interface/lib/browser-background-tab.js +134 -0
- package/neural-interface/lib/browser-language.js +83 -0
- package/neural-interface/lib/browser-screenshot.js +678 -61
- package/neural-interface/lib/claude-agent-bridge.js +87 -153
- package/neural-interface/lib/claude-executable.js +241 -0
- package/neural-interface/lib/claude-model-catalog.js +82 -93
- package/neural-interface/lib/claude-temporary.js +46 -7
- package/neural-interface/lib/cloudflared/install.js +533 -0
- package/neural-interface/lib/cloudflared/manager.js +545 -0
- package/neural-interface/lib/cloudflared/pins.js +115 -0
- package/neural-interface/lib/cloudflared/pins.json +63 -0
- package/neural-interface/lib/cloudflared/tunnel.js +265 -0
- package/neural-interface/lib/editor-completion-endpoint.js +264 -0
- package/neural-interface/lib/editor-completion-opencode.js +436 -0
- package/neural-interface/lib/editor-completion.js +714 -0
- package/neural-interface/lib/editor-config.js +149 -0
- package/neural-interface/lib/editor-files-api.js +268 -0
- package/neural-interface/lib/editor-git-api.js +134 -0
- package/neural-interface/lib/file-explorer-api.js +1039 -0
- package/neural-interface/lib/file-explorer-system.js +355 -0
- package/neural-interface/lib/file-explorer-trash.ps1 +85 -0
- package/neural-interface/lib/file-explorer-watch.js +239 -0
- package/neural-interface/lib/git-diff-api.js +103 -0
- package/neural-interface/lib/git-read.js +202 -0
- package/neural-interface/lib/greeting/api.js +89 -0
- package/neural-interface/lib/greeting/budgets.js +90 -0
- package/neural-interface/lib/greeting/engine.js +461 -0
- package/neural-interface/lib/greeting/facts.js +320 -0
- package/neural-interface/lib/greeting/sources.js +252 -0
- package/neural-interface/lib/greeting/writer.js +139 -0
- package/neural-interface/lib/http-guards.js +189 -13
- package/neural-interface/lib/machine-names.js +88 -0
- package/neural-interface/lib/memory-api.js +31 -7
- package/neural-interface/lib/native-binary-runtime.js +69 -337
- package/neural-interface/lib/native-loop-providers.js +40 -49
- package/neural-interface/lib/offline-page.js +54 -0
- package/neural-interface/lib/plugin-installer.js +4 -2
- package/neural-interface/lib/project-storage.js +5 -7
- package/neural-interface/lib/request-gate.js +589 -0
- package/neural-interface/lib/session-title-generator.js +5 -0
- package/neural-interface/lib/synabun-update-plan.js +19 -0
- package/neural-interface/lib/ui-blob-api.js +108 -0
- package/neural-interface/lib/ui-blob-store.js +68 -0
- package/neural-interface/package-lock.json +701 -253
- package/neural-interface/package.json +13 -2
- package/neural-interface/public/install-app.html +34 -0
- package/neural-interface/public/manifest.json +2 -0
- package/neural-interface/public/offline.html +402 -66
- package/neural-interface/public/onboarding.html +264 -147
- package/neural-interface/public/shared/agent-runtime-options.js +22 -6
- package/neural-interface/public/shared/assistant/asst-automation.js +286 -0
- package/neural-interface/public/shared/assistant/asst-brain-picker.js +312 -62
- package/neural-interface/public/shared/assistant/asst-composer.js +11 -1
- package/neural-interface/public/shared/assistant/asst-mascot.js +26 -64
- package/neural-interface/public/shared/assistant/asst-menu.js +12 -8
- package/neural-interface/public/shared/assistant/asst-panel.js +150 -28
- package/neural-interface/public/shared/assistant/asst-rack-styles.js +0 -3
- package/neural-interface/public/shared/assistant/asst-render.js +219 -67
- package/neural-interface/public/shared/assistant/asst-route-models.js +108 -0
- package/neural-interface/public/shared/assistant/asst-route.js +23 -329
- package/neural-interface/public/shared/assistant/asst-routes-editor.js +495 -0
- package/neural-interface/public/shared/assistant/asst-sanitize.js +8 -1
- package/neural-interface/public/shared/assistant/asst-sidepanel.js +31 -9
- package/neural-interface/public/shared/assistant/asst-state.js +185 -1
- package/neural-interface/public/shared/assistant/asst-styles.js +162 -6
- package/neural-interface/public/shared/blob-store.js +111 -22
- package/neural-interface/public/shared/cdx/cdx-panel.js +32 -11
- package/neural-interface/public/shared/cdx/cdx-render.js +25 -89
- package/neural-interface/public/shared/cdx/cdx-styles.js +36 -0
- package/neural-interface/public/shared/cdx/cdx-tabs.js +87 -4
- package/neural-interface/public/shared/command-runner-model.js +30 -0
- package/neural-interface/public/shared/constants.js +6 -1
- package/neural-interface/public/shared/cp/cp-rehydrate.js +2 -1
- package/neural-interface/public/shared/cp/cp-styles.js +15 -0
- package/neural-interface/public/shared/editor/editor-ai-logic.js +409 -0
- package/neural-interface/public/shared/editor/editor-ai.js +619 -0
- package/neural-interface/public/shared/editor/editor-commands.js +212 -0
- package/neural-interface/public/shared/editor/editor-compare.js +103 -0
- package/neural-interface/public/shared/editor/editor-completion-list.js +172 -0
- package/neural-interface/public/shared/editor/editor-doc.js +257 -0
- package/neural-interface/public/shared/editor/editor-git-logic.js +131 -0
- package/neural-interface/public/shared/editor/editor-git.js +95 -0
- package/neural-interface/public/shared/editor/editor-languages.js +156 -0
- package/neural-interface/public/shared/editor/editor-lint.js +229 -0
- package/neural-interface/public/shared/editor/editor-loader.js +51 -0
- package/neural-interface/public/shared/editor/editor-markdown.js +90 -0
- package/neural-interface/public/shared/editor/editor-menu.js +233 -0
- package/neural-interface/public/shared/editor/editor-minimap.js +371 -0
- package/neural-interface/public/shared/editor/editor-palette-logic.js +192 -0
- package/neural-interface/public/shared/editor/editor-palette.js +125 -0
- package/neural-interface/public/shared/editor/editor-panel-logic.js +288 -0
- package/neural-interface/public/shared/editor/editor-panel.js +2099 -0
- package/neural-interface/public/shared/editor/editor-prefs.js +224 -0
- package/neural-interface/public/shared/editor/editor-safety.js +500 -0
- package/neural-interface/public/shared/editor/editor-search.js +352 -0
- package/neural-interface/public/shared/editor/editor-statusbar.js +144 -0
- package/neural-interface/public/shared/editor/editor-tabs-logic.js +331 -0
- package/neural-interface/public/shared/editor/editor-tabs.js +233 -0
- package/neural-interface/public/shared/editor/editor-theme.js +244 -0
- package/neural-interface/public/shared/editor/editor-view.js +332 -0
- package/neural-interface/public/shared/explorer/fx-api.js +216 -0
- package/neural-interface/public/shared/explorer/fx-links.js +204 -0
- package/neural-interface/public/shared/explorer/fx-logic.js +537 -0
- package/neural-interface/public/shared/explorer/fx-main.js +865 -0
- package/neural-interface/public/shared/explorer/fx-names.js +87 -0
- package/neural-interface/public/shared/explorer/fx-ops.js +370 -0
- package/neural-interface/public/shared/explorer/fx-popups.js +490 -0
- package/neural-interface/public/shared/explorer/fx-tree.js +790 -0
- package/neural-interface/public/shared/file-links.js +339 -0
- package/neural-interface/public/shared/greeting/greeting-card.js +178 -0
- package/neural-interface/public/shared/greeting/greeting-view.js +148 -0
- package/neural-interface/public/shared/html-shell.js +169 -170
- package/neural-interface/public/shared/ocp-v2/ocp-v2-childpanel.js +4 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-greeting.js +47 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-panel.js +99 -17
- package/neural-interface/public/shared/ocp-v2/ocp-v2-render.js +7 -1
- package/neural-interface/public/shared/ocp-v2/ocp-v2-send.js +5 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-styles.js +40 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-ws.js +3 -2
- package/neural-interface/public/shared/pwa-install-page.js +62 -0
- package/neural-interface/public/shared/pwa-install.css +12 -0
- package/neural-interface/public/shared/pwa-install.js +127 -0
- package/neural-interface/public/shared/settings/settings-code-editor-pane.js +412 -0
- package/neural-interface/public/shared/settings/settings-code-editor.js +328 -0
- package/neural-interface/public/shared/settings/settings-greeting.js +133 -0
- package/neural-interface/public/shared/settings/settings-ia.js +18 -4
- package/neural-interface/public/shared/settings/settings-rules.js +160 -0
- package/neural-interface/public/shared/settings/settings-user-context.js +154 -0
- package/neural-interface/public/shared/start-bridge.js +802 -0
- package/neural-interface/public/shared/styleguide/sg-colors.js +5 -2
- package/neural-interface/public/shared/styleguide/sg-import-export.js +4 -3
- package/neural-interface/public/shared/styleguide/sg-kit.js +4 -1
- package/neural-interface/public/shared/styleguide/sg-panel.js +9 -1
- package/neural-interface/public/shared/styleguide/sg-typography.js +1 -0
- package/neural-interface/public/shared/styles.css +2219 -1117
- package/neural-interface/public/shared/synabun-mascot.js +20 -56
- package/neural-interface/public/shared/term-ready.js +307 -0
- package/neural-interface/public/shared/tunnel-view.js +167 -0
- package/neural-interface/public/shared/ui-claude-panel.js +160 -19
- package/neural-interface/public/shared/ui-command-runner.js +251 -468
- package/neural-interface/public/shared/ui-detail.js +15 -0
- package/neural-interface/public/shared/ui-explorer.js +22 -0
- package/neural-interface/public/shared/ui-file-explorer.js +481 -2496
- package/neural-interface/public/shared/ui-file-links.js +103 -0
- package/neural-interface/public/shared/ui-help.js +26 -0
- package/neural-interface/public/shared/ui-invite.js +126 -116
- package/neural-interface/public/shared/ui-judgments.js +1 -1
- package/neural-interface/public/shared/ui-keybinds.js +4 -0
- package/neural-interface/public/shared/ui-loading.js +367 -12
- package/neural-interface/public/shared/ui-menubar.js +21 -55
- package/neural-interface/public/shared/ui-native-loop-router-state.js +11 -0
- package/neural-interface/public/shared/ui-native-loop-router.js +15 -2
- package/neural-interface/public/shared/ui-navbar.js +45 -21
- package/neural-interface/public/shared/ui-settings.js +491 -547
- package/neural-interface/public/shared/ui-sidepanel-runtime.js +2 -1
- package/neural-interface/public/shared/ui-sync.js +16 -0
- package/neural-interface/public/shared/ui-terminal.js +153 -149
- package/neural-interface/public/shared/ui-tunnel.js +130 -0
- package/neural-interface/public/shared/ui-tutorial-steps.js +6 -2
- package/neural-interface/public/shared/ui-whiteboard.js +12 -0
- package/neural-interface/public/shared/ui-worker-end.js +245 -0
- package/neural-interface/public/shared/ui-workspaces.js +41 -27
- package/neural-interface/public/shared/worker-end.js +251 -0
- package/neural-interface/public/sw.js +3 -1
- package/neural-interface/public/variant/2d/main.js +2 -1
- package/neural-interface/public/variant/3d/main.js +2 -1
- package/neural-interface/public/vendor/codemirror/chunks/apl-CSDKT72Z.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/asciiarmor-JYYPU5BM.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/asn1-NRWCZDA6.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/asterisk-5OU6D4ZQ.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/brainfuck-ID4N4SYC.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/chunk-4RZWGCS2.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/chunk-ACTJM3JR.js +11 -0
- package/neural-interface/public/vendor/codemirror/chunks/chunk-S6BMAXLK.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/chunk-TO2RDOHQ.js +3 -0
- package/neural-interface/public/vendor/codemirror/chunks/chunk-US2GMZZQ.js +13 -0
- package/neural-interface/public/vendor/codemirror/chunks/chunk-WYYO5ZAJ.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/chunk-XALZTDJC.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/chunk-YRNUTRDV.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/chunk-Z3QOKH62.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/clike-OWQBSOGL.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/clojure-KV75UQWC.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/cmake-GTEP5Y3C.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/cobol-WCZ7QEGJ.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/coffeescript-TGLBOT6B.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/commonlisp-WVVI432V.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/crystal-S6R6HLKQ.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/css-PDA2RINP.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/cypher-HL5QPL4C.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/d-HHJH2HAJ.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/diff-MN3A35BY.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-25SQLBVS.js +3 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-27ZGGJJS.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-4E52OJIF.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-6FT73XDC.js +2 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-BE6YGRMW.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-CJSGKW2O.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-CRPH2WLI.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-CTG7JEQN.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-I3FEVELX.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-IM5BBSWZ.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-KERUKTIF.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-LXTMWZAM.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-MABASSET.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-MJVBUZLL.js +3 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-MNB3WZVU.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-QYWXOE3U.js +7 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-TEBOFWLZ.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-UNXFROM3.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-XL2SLQO6.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-XO42Y3AP.js +6 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-Y2WWDWJK.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-YFEZKWMU.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dist-ZY7SWQO6.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dockerfile-3Y4R4NCH.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dtd-5343GJ4P.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/dylan-FI2CXSW2.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/ebnf-GNQ77YWA.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/ecl-MRPUAE2L.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/eiffel-DZROES27.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/elm-4KICRFKQ.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/erlang-3IHYC263.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/factor-C6D3E5UK.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/fcl-VYTWUJMI.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/forth-ZBO2EH5M.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/fortran-5NDCRWIK.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/gas-SKRMOXFP.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/gherkin-L45YXZLW.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/groovy-GLPTLN44.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/haskell-E7NF7P4Y.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/haxe-K2NVDOB6.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/http-Q6DRQIJB.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/idl-MZYNJVLN.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/javascript-6YRYK2HR.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/julia-HXEL2T5G.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/livescript-MV7CI2JZ.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/lua-E36NHOOD.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/mathematica-3XOZZCMC.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/mbox-ODYGFKS7.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/mirc-WB43AWF5.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/mllike-ZT6ET7ZH.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/modelica-LLMZPFGA.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/mscgen-2OPNNYFH.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/mumps-6P3HWJH6.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/nginx-TCGKQTRW.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/nsis-ATIGIXTJ.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/ntriples-5PLBI5OV.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/octave-QF2S3NL6.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/oz-JFIVFFH2.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/pascal-JG6SW76V.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/perl-4B3IWVVO.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/pig-ABEBH4MI.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/powershell-H32XE7TL.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/properties-NN644MMA.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/protobuf-YKWQK2J3.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/pug-RIYXEKFW.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/puppet-JZQ5WPEV.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/python-EBCGGHAC.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/q-5UMH2YQY.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/r-7XMGG453.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/rpm-IEV7TSLR.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/ruby-T4SPFPNM.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/sas-GEDX67ET.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/scheme-FTLOWKPC.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/shell-HUFRKFSJ.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/sieve-P5QUDVYO.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/smalltalk-2SORJNQI.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/solr-M22TGAR5.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/sparql-4M3KL752.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/spreadsheet-3K23LA4N.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/sql-VHRFMUBI.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/stex-QZDAQUY2.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/stylus-7ZDKAKBD.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/swift-WCLCLGMR.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/tcl-JLMU6WOK.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/textile-4CHDKZ4T.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/tiddlywiki-DKMCZZQ4.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/tiki-F4JIG36Q.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/toml-BHMHTIM2.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/troff-YQ2KV5NT.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/ttcn-ZHRCVFJY.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/ttcn-cfg-KJOVTY4X.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/turtle-535P5N6I.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/vb-76UMQHOT.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/vbscript-CGNDTK6Z.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/velocity-VSJDO5T5.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/verilog-4T6ETXIP.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/vhdl-T7FNAXUN.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/webidl-P6MJSJ6J.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/xquery-UOVILRGN.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/yacas-CV2APROL.js +1 -0
- package/neural-interface/public/vendor/codemirror/chunks/z80-3KFNVM4M.js +1 -0
- package/neural-interface/public/vendor/codemirror/codemirror-6.43.14-75f05e67.min.js +2 -0
- package/neural-interface/public/vendor/codemirror/manifest.json +60 -0
- package/neural-interface/scripts/build-vendor.mjs +78 -2
- package/neural-interface/scripts/rebuild-pty.js +15 -12
- package/neural-interface/scripts/vendor-codemirror-entry.js +121 -0
- package/neural-interface/server.js +1092 -1212
- package/neural-interface/templates/rulesets/README.md +1 -1
- package/package.json +13 -7
- package/postinstall.js +11 -81
- package/setup.js +111 -6
- package/benchmarks/browser-live-results.json +0 -79
- package/benchmarks/browser-v2-results.json +0 -258
- package/docs/browser-v2.md +0 -109
- package/docs/hook-integrity.md +0 -89
- package/docs/judgments.md +0 -182
- package/docs/style-guide.md +0 -246
- package/neural-interface/lib/codex-capabilities.d.ts +0 -41
- package/neural-interface/public/category-logos/claude.svg +0 -1
- package/neural-interface/public/category-logos/gemini-color.svg +0 -1
- package/neural-interface/public/category-logos/openai.svg +0 -1
- package/neural-interface/public/category-logos/synabun.png +0 -0
- package/neural-interface/public/claude.svg +0 -1
- package/neural-interface/public/gallery.svg +0 -6
- package/neural-interface/public/leonardoai.svg +0 -1
- package/neural-interface/public/mcp.svg +0 -4
- package/neural-interface/public/opencode-logo-dark-square.svg +0 -1
- package/neural-interface/public/pin-svgrepo-com.svg +0 -25
- package/neural-interface/public/sessionicon.svg +0 -8
- package/neural-interface/public/toolbar-album.svg +0 -8
- package/neural-interface/public/toolbar-question.svg +0 -6
- package/neural-interface/public/toolbar-sessions.svg +0 -6
- package/neural-interface/scripts/codex-protocol-fixture.mjs +0 -83
- package/scripts/audit-claude-hook-usage.mjs +0 -12
- package/scripts/audit-memory-duplicates.mjs +0 -44
- package/scripts/measure-claude-hook-overhead.mjs +0 -77
- package/scripts/recover-user-config.mjs +0 -254
- package/skills/synabun/synabunicon.png +0 -0
|
@@ -5,5 +5,5 @@ One source, rendered per host by `neural-interface/lib/rulesets/render.js`.
|
|
|
5
5
|
- `core.md` is the text every host gets. A line ending in `<!-- except: codex -->` is dropped for the hosts it names; the line `<!-- host -->` is where the host's own file goes.
|
|
6
6
|
- `claude.md`, `codex.md`, `opencode.md`, `gemini.md`, `cursor.md` hold at most two bullets each.
|
|
7
7
|
- `coexistence.md` is a snippet people copy by hand. It is never installed.
|
|
8
|
-
- `manifest.json` carries the version and one hash per host. A text change
|
|
8
|
+
- `manifest.json` carries the version and one hash per host. A text change needs a new version and new hashes; the render test (not published with this repository) fails without them and prints the hashes to paste.
|
|
9
9
|
- `legacy-hashes.json` lists every ruleset SynaBun ever served, so the installer can recognise a copy someone pasted. `node scripts/gen-ruleset-legacy-hashes.mjs` adds to it and never drops an entry.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "synabun",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "Local-first persistent vector memory, MCP tooling, and multi-agent workflows for AI assistants",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "The SynaBun Authors",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"postinstall.js",
|
|
20
20
|
"preuninstall.js",
|
|
21
21
|
"updater.mjs",
|
|
22
|
+
"launcher.mjs",
|
|
22
23
|
"updater.cmd",
|
|
23
24
|
"updater.sh",
|
|
24
25
|
"NOTICE",
|
|
@@ -56,6 +57,10 @@
|
|
|
56
57
|
"hooks/claude-code/task-gate.mjs",
|
|
57
58
|
"skills/",
|
|
58
59
|
"lib/paths.js",
|
|
60
|
+
"lib/start-launcher.js",
|
|
61
|
+
"lib/packaged-runtime.js",
|
|
62
|
+
"lib/desktop-pwa.js",
|
|
63
|
+
"lib/external-tools.js",
|
|
59
64
|
"lib/paths.d.ts",
|
|
60
65
|
"lib/data-home-migration.js",
|
|
61
66
|
"lib/first-launch-protection.js",
|
|
@@ -72,8 +77,6 @@
|
|
|
72
77
|
"docs/judgments.md",
|
|
73
78
|
"docs/style-guide.md",
|
|
74
79
|
"docs/whatsapp.md",
|
|
75
|
-
"benchmarks/browser-v2-results.json",
|
|
76
|
-
"benchmarks/browser-live-results.json",
|
|
77
80
|
"benchmarks/fixtures/browser/",
|
|
78
81
|
"benchmarks/fixtures/desktop/",
|
|
79
82
|
"README.md",
|
|
@@ -83,13 +86,16 @@
|
|
|
83
86
|
"start": "node --disable-warning=ExperimentalWarning setup.js",
|
|
84
87
|
"server": "node --disable-warning=ExperimentalWarning neural-interface/server.js",
|
|
85
88
|
"mcp:build": "npm --prefix mcp-server run build",
|
|
86
|
-
"test": "npm run test:mcp && npm run test:neural",
|
|
87
|
-
"test:mcp": "npm --prefix mcp-server test",
|
|
88
|
-
"test:neural": "npm --prefix neural-interface test",
|
|
89
89
|
"pack:check": "npm pack --dry-run --json --ignore-scripts",
|
|
90
|
+
"build:targets": "node packaging/build.mjs targets",
|
|
91
|
+
"build:mac:arm": "node packaging/build.mjs build --target macos-arm64",
|
|
92
|
+
"build:mac:intel": "node packaging/build.mjs build --target macos-x64",
|
|
93
|
+
"build:linux:x64": "node packaging/build.mjs build --target linux-x64",
|
|
94
|
+
"build:windows:x64": "node packaging/build.mjs build --target windows-x64",
|
|
95
|
+
"build:windows:x86": "node packaging/build.mjs build --target windows-x86",
|
|
90
96
|
"postinstall": "node postinstall.js",
|
|
91
97
|
"preuninstall": "node preuninstall.js",
|
|
92
|
-
"prepublishOnly": "npm --prefix mcp-server ci --ignore-scripts && npm --prefix neural-interface ci --ignore-scripts && npm run mcp:build &&
|
|
98
|
+
"prepublishOnly": "npm --prefix mcp-server ci --ignore-scripts && npm --prefix neural-interface ci --ignore-scripts && npm run mcp:build && node -e \"const fs = require('node:fs'); for (const path of ['mcp-server/dist/index.js', 'NOTICE', 'THIRD-PARTY-LICENSES.md']) fs.accessSync(path)\" && npm run pack:check"
|
|
93
99
|
},
|
|
94
100
|
"keywords": [
|
|
95
101
|
"ai-agents",
|
package/postinstall.js
CHANGED
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { execSync } from 'node:child_process';
|
|
12
|
-
import { existsSync,
|
|
12
|
+
import { existsSync, chmodSync } from 'node:fs';
|
|
13
13
|
import { resolve, dirname } from 'node:path';
|
|
14
14
|
import { fileURLToPath } from 'node:url';
|
|
15
|
-
import {
|
|
15
|
+
import { platform } from 'node:os';
|
|
16
|
+
import { registerStartLauncher } from './lib/start-launcher.js';
|
|
16
17
|
|
|
17
18
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
18
19
|
|
|
@@ -114,87 +115,16 @@ function buildMcpServer() {
|
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
// ── Protocol handler registration ──
|
|
118
|
+
//
|
|
119
|
+
// The synabun:// handler behind the offline page's Start Server button. The
|
|
120
|
+
// same registration runs on every start (setup.js), so this only makes the
|
|
121
|
+
// button work before the first one.
|
|
117
122
|
|
|
118
123
|
function registerProtocolHandler() {
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
if (plat === 'win32') {
|
|
124
|
-
// Windows — HKCU registry (no admin required)
|
|
125
|
-
try {
|
|
126
|
-
const cmd = `"${nodeBin}" "${setupJs}" "%1"`;
|
|
127
|
-
execSync(`reg add "HKCU\\Software\\Classes\\synabun" /ve /d "URL:SynaBun Protocol" /f`, { stdio: 'pipe' });
|
|
128
|
-
execSync(`reg add "HKCU\\Software\\Classes\\synabun" /v "URL Protocol" /d "" /f`, { stdio: 'pipe' });
|
|
129
|
-
execSync(`reg add "HKCU\\Software\\Classes\\synabun\\shell\\open\\command" /ve /d "${cmd}" /f`, { stdio: 'pipe' });
|
|
130
|
-
ok('Registered synabun:// protocol handler');
|
|
131
|
-
} catch {
|
|
132
|
-
warn('Could not register synabun:// protocol handler');
|
|
133
|
-
}
|
|
134
|
-
} else if (plat === 'darwin') {
|
|
135
|
-
// macOS — minimal .app bundle in ~/.synabun/
|
|
136
|
-
try {
|
|
137
|
-
const appDir = resolve(homedir(), '.synabun', 'SynaBun.app', 'Contents');
|
|
138
|
-
const macosDir = resolve(appDir, 'MacOS');
|
|
139
|
-
mkdirSync(macosDir, { recursive: true });
|
|
140
|
-
|
|
141
|
-
writeFileSync(resolve(appDir, 'Info.plist'), [
|
|
142
|
-
'<?xml version="1.0" encoding="UTF-8"?>',
|
|
143
|
-
'<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">',
|
|
144
|
-
'<plist version="1.0">',
|
|
145
|
-
'<dict>',
|
|
146
|
-
' <key>CFBundleIdentifier</key><string>ai.synabun.launcher</string>',
|
|
147
|
-
' <key>CFBundleName</key><string>SynaBun</string>',
|
|
148
|
-
' <key>CFBundleExecutable</key><string>synabun-launcher</string>',
|
|
149
|
-
' <key>CFBundleVersion</key><string>1.0</string>',
|
|
150
|
-
' <key>CFBundleURLTypes</key>',
|
|
151
|
-
' <array><dict>',
|
|
152
|
-
' <key>CFBundleURLName</key><string>SynaBun Protocol</string>',
|
|
153
|
-
' <key>CFBundleURLSchemes</key><array><string>synabun</string></array>',
|
|
154
|
-
' </dict></array>',
|
|
155
|
-
'</dict>',
|
|
156
|
-
'</plist>',
|
|
157
|
-
].join('\n'));
|
|
158
|
-
|
|
159
|
-
const launcherPath = resolve(macosDir, 'synabun-launcher');
|
|
160
|
-
writeFileSync(launcherPath, `#!/bin/sh\nexec "${nodeBin}" "${setupJs}" "$@"\n`);
|
|
161
|
-
chmodSync(launcherPath, 0o755);
|
|
162
|
-
|
|
163
|
-
// Register with LaunchServices
|
|
164
|
-
try {
|
|
165
|
-
execSync(`/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -R "${resolve(homedir(), '.synabun', 'SynaBun.app')}"`, { stdio: 'pipe' });
|
|
166
|
-
} catch {
|
|
167
|
-
try { execSync(`open "${resolve(homedir(), '.synabun', 'SynaBun.app')}"`, { stdio: 'pipe' }); } catch {}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
ok('Registered synabun:// protocol handler');
|
|
171
|
-
} catch {
|
|
172
|
-
warn('Could not register synabun:// protocol handler');
|
|
173
|
-
}
|
|
174
|
-
} else {
|
|
175
|
-
// Linux — .desktop file
|
|
176
|
-
try {
|
|
177
|
-
const appsDir = resolve(homedir(), '.local', 'share', 'applications');
|
|
178
|
-
mkdirSync(appsDir, { recursive: true });
|
|
179
|
-
|
|
180
|
-
writeFileSync(resolve(appsDir, 'synabun.desktop'), [
|
|
181
|
-
'[Desktop Entry]',
|
|
182
|
-
'Type=Application',
|
|
183
|
-
'Name=SynaBun',
|
|
184
|
-
`Exec="${nodeBin}" "${setupJs}" %u`,
|
|
185
|
-
'MimeType=x-scheme-handler/synabun;',
|
|
186
|
-
'NoDisplay=true',
|
|
187
|
-
'Terminal=true',
|
|
188
|
-
'',
|
|
189
|
-
].join('\n'));
|
|
190
|
-
|
|
191
|
-
try { execSync('xdg-mime default synabun.desktop x-scheme-handler/synabun', { stdio: 'pipe' }); } catch {}
|
|
192
|
-
|
|
193
|
-
ok('Registered synabun:// protocol handler');
|
|
194
|
-
} catch {
|
|
195
|
-
warn('Could not register synabun:// protocol handler');
|
|
196
|
-
}
|
|
197
|
-
}
|
|
124
|
+
const result = registerStartLauncher({ packageRoot: __dirname });
|
|
125
|
+
if (result.state === 'skipped') return;
|
|
126
|
+
if (result.ok) ok('Registered synabun:// protocol handler');
|
|
127
|
+
else warn(`Could not register synabun:// protocol handler (${result.errors[0]})`);
|
|
198
128
|
}
|
|
199
129
|
|
|
200
130
|
// ── Updater shim executable bit ──
|
package/setup.js
CHANGED
|
@@ -44,6 +44,10 @@ import {
|
|
|
44
44
|
protectFirstLaunchAfterUpdate,
|
|
45
45
|
recordLauncherFailure,
|
|
46
46
|
} from './lib/first-launch-protection.js';
|
|
47
|
+
import {
|
|
48
|
+
RESTART_REPORT_ENV, noteSupervisorFailure, openRestartReport, openSupervisorRecord, registerStartLauncher, resolvePort,
|
|
49
|
+
} from './lib/start-launcher.js';
|
|
50
|
+
import { packagedRuntime } from './lib/packaged-runtime.js';
|
|
47
51
|
|
|
48
52
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
49
53
|
|
|
@@ -76,6 +80,25 @@ const DATA_HOME = REQUESTED_DATA_HOME_DIAGNOSTICS.dataHomeInsidePackage
|
|
|
76
80
|
process.env.SYNABUN_DATA_HOME = DATA_HOME;
|
|
77
81
|
process.env.MEMORY_DATA_DIR = resolve(DATA_HOME, 'mcp-data');
|
|
78
82
|
|
|
83
|
+
// What this start is doing, written where the Start Server launcher reads it
|
|
84
|
+
// (DATA_HOME/data/supervisor.json): the offline page that asked for the start
|
|
85
|
+
// has no server to ask, and shows these phases instead of a guess. Each phase
|
|
86
|
+
// is noted when it begins. Opened in main(), once the data home is settled.
|
|
87
|
+
let supervisor = null;
|
|
88
|
+
// A restart reports the same phases on the start beacon while the server is
|
|
89
|
+
// away (lib/start-launcher.js openRestartReport): the page that asked for it
|
|
90
|
+
// is waiting, with no server to ask. Open only while a restart lasts.
|
|
91
|
+
let restartReport = null;
|
|
92
|
+
// Set by a server that had no supervisor, on the one it starts to take its
|
|
93
|
+
// place after a restart. This process only: nothing it starts inherits it.
|
|
94
|
+
const STARTED_FOR_RESTART = !!process.env[RESTART_REPORT_ENV];
|
|
95
|
+
delete process.env[RESTART_REPORT_ENV];
|
|
96
|
+
const startPhase = (name, detail) => {
|
|
97
|
+
try { supervisor?.phase(name, detail); } catch {}
|
|
98
|
+
try { restartReport?.phase(); } catch {}
|
|
99
|
+
};
|
|
100
|
+
const startFailed = (code, message, extra = {}) => { try { supervisor?.fail({ code, message, ...extra }); } catch {} };
|
|
101
|
+
|
|
79
102
|
// ── Migration: move legacy in-repository state to the platform data home ──
|
|
80
103
|
|
|
81
104
|
function looksLikeSynabunCheckout(root) {
|
|
@@ -235,6 +258,16 @@ function handleDoctorCommand() {
|
|
|
235
258
|
console.log('');
|
|
236
259
|
}
|
|
237
260
|
|
|
261
|
+
// The offline page's Start Server button hands the OS a synabun:// link. Keep
|
|
262
|
+
// the handler pointing at this install: a GitHub checkout never ran the npm
|
|
263
|
+
// postinstall, and node or the package may have moved since it did.
|
|
264
|
+
function ensureStartLauncher() {
|
|
265
|
+
const result = registerStartLauncher({ packageRoot: PACKAGE_ROOT });
|
|
266
|
+
if (result.state === 'skipped') return;
|
|
267
|
+
if (!result.ok) warn(`Could not register the Start Server launcher: ${result.errors[0]}`);
|
|
268
|
+
else if (result.changed) ok('Start Server launcher registered (synabun://)');
|
|
269
|
+
}
|
|
270
|
+
|
|
238
271
|
function repairClientConfigs() {
|
|
239
272
|
try {
|
|
240
273
|
const result = auditAndRepairClientConfigs({ dataHome: DATA_HOME, packageRoot: PACKAGE_ROOT, apply: true });
|
|
@@ -279,6 +312,7 @@ function installDeps(name, dir, { includeDev = false } = {}) {
|
|
|
279
312
|
}
|
|
280
313
|
|
|
281
314
|
info(`Installing ${name} dependencies...`);
|
|
315
|
+
startPhase('dependencies', { name });
|
|
282
316
|
try {
|
|
283
317
|
const omitFlag = includeDev ? '' : ' --omit=dev';
|
|
284
318
|
execSync(`npm install${omitFlag} --ignore-scripts`, {
|
|
@@ -290,6 +324,7 @@ function installDeps(name, dir, { includeDev = false } = {}) {
|
|
|
290
324
|
} catch (err) {
|
|
291
325
|
fail(`Failed to install ${name} dependencies`);
|
|
292
326
|
console.error(err.stderr?.toString() || err.message);
|
|
327
|
+
startFailed('DEPENDENCIES_FAILED', `npm could not install the ${name} dependencies`);
|
|
293
328
|
process.exit(1);
|
|
294
329
|
}
|
|
295
330
|
}
|
|
@@ -309,6 +344,7 @@ function installPlaywrightChromium() {
|
|
|
309
344
|
} catch { /* not installed */ }
|
|
310
345
|
|
|
311
346
|
info('Installing Playwright Chromium (for browser automation)...');
|
|
347
|
+
startPhase('browser');
|
|
312
348
|
try {
|
|
313
349
|
execSync('npx playwright install chromium', {
|
|
314
350
|
cwd: niDir,
|
|
@@ -335,10 +371,12 @@ function buildMcpServer() {
|
|
|
335
371
|
}
|
|
336
372
|
|
|
337
373
|
info('Building MCP server from source...');
|
|
374
|
+
startPhase('build');
|
|
338
375
|
try {
|
|
339
376
|
execSync('npx tsc', {
|
|
340
377
|
cwd: resolve(PACKAGE_ROOT, 'mcp-server'),
|
|
341
378
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
379
|
+
windowsHide: !!packagedRuntime(),
|
|
342
380
|
timeout: 120_000,
|
|
343
381
|
});
|
|
344
382
|
ok('MCP server built');
|
|
@@ -445,14 +483,25 @@ function startServer() {
|
|
|
445
483
|
let firstLaunch = true;
|
|
446
484
|
let currentChild = null;
|
|
447
485
|
let shuttingDown = false;
|
|
486
|
+
// The port the server last said it listens on: where a restart's report is read.
|
|
487
|
+
let listenPort = null;
|
|
448
488
|
const restartLog = [];
|
|
449
489
|
const CRASH_WINDOW_MS = 60_000;
|
|
450
490
|
const CRASH_LIMIT = 5;
|
|
451
491
|
|
|
492
|
+
// A restart that ends without a server keeps saying why until the page that
|
|
493
|
+
// waits for it has read it (a moment; 20 s at the most when nobody reads).
|
|
494
|
+
const exitAfterReport = (code, error) => {
|
|
495
|
+
const report = restartReport;
|
|
496
|
+
if (!report?.open) { process.exit(code); return; }
|
|
497
|
+
report.failed(error).finally(() => process.exit(code));
|
|
498
|
+
};
|
|
499
|
+
|
|
452
500
|
function spawnOnce() {
|
|
453
|
-
const child = spawn(
|
|
501
|
+
const child = spawn(process.execPath, ['--disable-warning=ExperimentalWarning', '--max-old-space-size=6144', serverPath], {
|
|
454
502
|
cwd: niDir,
|
|
455
503
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
504
|
+
windowsHide: !!packagedRuntime(),
|
|
456
505
|
env: {
|
|
457
506
|
...process.env,
|
|
458
507
|
SYNABUN_DATA_HOME: DATA_HOME,
|
|
@@ -461,17 +510,32 @@ function startServer() {
|
|
|
461
510
|
},
|
|
462
511
|
});
|
|
463
512
|
currentChild = child;
|
|
513
|
+
startPhase('server', { pid: child.pid });
|
|
514
|
+
child.on('error', (error) => {
|
|
515
|
+
fail(`Could not start the server: ${error.message}`);
|
|
516
|
+
startFailed('SERVER_SPAWN_FAILED', `the server could not be started: ${error.message}`);
|
|
517
|
+
exitAfterReport(1, { code: 'SERVER_SPAWN_FAILED', message: `the server could not be started: ${error.message}` });
|
|
518
|
+
});
|
|
464
519
|
|
|
465
520
|
let opened = !firstLaunch;
|
|
521
|
+
let announced = false;
|
|
466
522
|
child.stdout.on('data', (data) => {
|
|
467
523
|
const s = data.toString();
|
|
468
524
|
process.stdout.write(s);
|
|
469
525
|
try { outLog?.write(s); } catch {}
|
|
526
|
+
// The server prints its address from its listen callback: it is up.
|
|
527
|
+
if (!announced && s.includes('Server:')) {
|
|
528
|
+
announced = true;
|
|
529
|
+
const port = Number(s.match(/Server:\s+http:\/\/localhost:(\d+)/)?.[1]) || undefined;
|
|
530
|
+
if (port) listenPort = port;
|
|
531
|
+
startPhase('listening', { port });
|
|
532
|
+
}
|
|
470
533
|
if (!opened && s.includes('Server:')) {
|
|
471
534
|
opened = true;
|
|
472
535
|
const port = s.match(/Server:\s+http:\/\/localhost:(\d+)/)?.[1] || '3344';
|
|
473
536
|
const url = `http://localhost:${port}${setupComplete ? '/' : '/onboarding.html'}`;
|
|
474
|
-
|
|
537
|
+
// The Start Server button already has a tab waiting for the server.
|
|
538
|
+
if (process.env.SYNABUN_OPEN_BROWSER !== '0') setTimeout(() => openBrowser(url), 1500);
|
|
475
539
|
}
|
|
476
540
|
});
|
|
477
541
|
child.stderr.on('data', (data) => {
|
|
@@ -499,9 +563,16 @@ function startServer() {
|
|
|
499
563
|
const now = Date.now();
|
|
500
564
|
restartLog.push(now);
|
|
501
565
|
while (restartLog.length && now - restartLog[0] > CRASH_WINDOW_MS) restartLog.shift();
|
|
566
|
+
// The page that asked for this has no server to ask now: from here
|
|
567
|
+
// until the new one is listening, this supervisor says what happens.
|
|
568
|
+
try { restartReport?.close(); } catch {}
|
|
569
|
+
restartReport = openRestartReport({ port: listenPort || resolvePort({ dataHome: DATA_HOME }), dataHome: DATA_HOME, exited: true });
|
|
502
570
|
if (restartLog.length > CRASH_LIMIT) {
|
|
571
|
+
const message = `the server restarted ${restartLog.length} times in ${Math.round(CRASH_WINDOW_MS / 1000)} s`;
|
|
503
572
|
fail(`Server restarted ${restartLog.length} times in ${Math.round(CRASH_WINDOW_MS / 1000)}s — aborting supervisor.`);
|
|
504
|
-
|
|
573
|
+
startFailed('RESTART_LOOP', message);
|
|
574
|
+
exitAfterReport(1, { code: 'RESTART_LOOP', message });
|
|
575
|
+
return;
|
|
505
576
|
}
|
|
506
577
|
firstLaunch = false;
|
|
507
578
|
setTimeout(spawnOnce, 250);
|
|
@@ -510,7 +581,9 @@ function startServer() {
|
|
|
510
581
|
|
|
511
582
|
if (code !== 0 && code !== null) {
|
|
512
583
|
fail(`Server exited with code ${code}`);
|
|
513
|
-
|
|
584
|
+
startFailed('SERVER_EXITED', `the server exited with code ${code}`, { exitCode: code });
|
|
585
|
+
exitAfterReport(code, { code: 'SERVER_EXITED', message: `the server exited with code ${code}`, exitCode: code });
|
|
586
|
+
return;
|
|
514
587
|
}
|
|
515
588
|
process.exit(0);
|
|
516
589
|
});
|
|
@@ -740,32 +813,60 @@ async function main() {
|
|
|
740
813
|
// Inspect and migrate before creating empty destination directories. A
|
|
741
814
|
// divergent pair stops normal launch without overwriting either root.
|
|
742
815
|
const preflight = preflightDataHome();
|
|
743
|
-
if (preflight.status === 'conflict')
|
|
816
|
+
if (preflight.status === 'conflict') {
|
|
817
|
+
noteSupervisorFailure(DATA_HOME, {
|
|
818
|
+
code: 'DATA_HOME_CONFLICT',
|
|
819
|
+
message: 'SynaBun found different user state in two locations and stopped before changing either. Run "synabun doctor".',
|
|
820
|
+
exitCode: 2,
|
|
821
|
+
});
|
|
822
|
+
process.exit(2);
|
|
823
|
+
}
|
|
744
824
|
|
|
745
825
|
// Ensure data directories
|
|
746
826
|
ensureDataDirs(DATA_HOME);
|
|
747
827
|
|
|
828
|
+
// From here until this process exits a start is under way: the Start Server
|
|
829
|
+
// launcher reads this record so a second click never starts a second one,
|
|
830
|
+
// and passes what it says on to the page that is waiting.
|
|
831
|
+
supervisor = openSupervisorRecord(DATA_HOME);
|
|
832
|
+
process.on('exit', supervisor.release);
|
|
833
|
+
// Taking the place of a server that restarted without a supervisor: the
|
|
834
|
+
// pages that asked are waiting, so this start says what it is doing.
|
|
835
|
+
if (STARTED_FOR_RESTART) {
|
|
836
|
+
restartReport = openRestartReport({ port: resolvePort({ dataHome: DATA_HOME }), dataHome: DATA_HOME });
|
|
837
|
+
}
|
|
838
|
+
|
|
748
839
|
// Prerequisites
|
|
749
840
|
checkNodeVersion();
|
|
750
841
|
console.log('');
|
|
751
842
|
|
|
752
843
|
// Dependencies (installed in global package location)
|
|
844
|
+
// A slow step names itself when it begins (startPhase inside each); between
|
|
845
|
+
// them the record goes back to 'checking', so it never names a finished one.
|
|
753
846
|
installDeps('Neural Interface', resolve(PACKAGE_ROOT, 'neural-interface'));
|
|
754
847
|
installDeps('MCP Server', resolve(PACKAGE_ROOT, 'mcp-server'), { includeDev: needsBuild() });
|
|
848
|
+
startPhase('checking');
|
|
755
849
|
console.log('');
|
|
756
850
|
|
|
757
851
|
// Playwright browser
|
|
758
852
|
installPlaywrightChromium();
|
|
853
|
+
startPhase('checking');
|
|
759
854
|
console.log('');
|
|
760
855
|
|
|
761
856
|
// Build
|
|
762
857
|
buildMcpServer();
|
|
858
|
+
startPhase('checking');
|
|
763
859
|
console.log('');
|
|
764
860
|
|
|
765
861
|
// A new version never runs on user state that has no verified snapshot. When
|
|
766
862
|
// the snapshot cannot be created the launch stops here, before the server
|
|
767
863
|
// (and any data migration) starts. There is no flag to launch anyway.
|
|
768
|
-
const protection = await protectFirstLaunchAfterUpdate({
|
|
864
|
+
const protection = await protectFirstLaunchAfterUpdate({
|
|
865
|
+
dataHome: DATA_HOME,
|
|
866
|
+
version,
|
|
867
|
+
log: { info, ok, warn },
|
|
868
|
+
onProgress: (detail) => startPhase('snapshot', { version, ...detail }),
|
|
869
|
+
});
|
|
769
870
|
if (protection.status === 'failed') {
|
|
770
871
|
const failure = describeSnapshotFailure({ ...protection, dataHome: DATA_HOME, version });
|
|
771
872
|
// Server logging has not begun, and a detached launch (the updater's
|
|
@@ -776,13 +877,16 @@ async function main() {
|
|
|
776
877
|
for (const line of failure.lines) info(line);
|
|
777
878
|
if (logPath) info(`This message is also in: ${logPath}`);
|
|
778
879
|
console.log('');
|
|
880
|
+
startFailed('SNAPSHOT_FAILED', failure.headline, { exitCode: SNAPSHOT_FAILED_EXIT_CODE });
|
|
779
881
|
process.exit(SNAPSHOT_FAILED_EXIT_CODE);
|
|
780
882
|
}
|
|
883
|
+
startPhase('checking');
|
|
781
884
|
console.log('');
|
|
782
885
|
|
|
783
886
|
// Existing registrations can carry checkout-local DOTENV_PATH and data-home
|
|
784
887
|
// overrides. Rewrite only their SynaBun entry after the new MCP build exists.
|
|
785
888
|
repairClientConfigs();
|
|
889
|
+
ensureStartLauncher();
|
|
786
890
|
console.log('');
|
|
787
891
|
|
|
788
892
|
// State
|
|
@@ -800,5 +904,6 @@ async function main() {
|
|
|
800
904
|
main().catch(error => {
|
|
801
905
|
fail(error.message);
|
|
802
906
|
recordLauncherFailure({ dataHome: DATA_HOME, exitCode: 1, headline: `SynaBun did not start: ${error.message}` });
|
|
907
|
+
startFailed('SETUP_FAILED', error.message);
|
|
803
908
|
process.exit(1);
|
|
804
909
|
});
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"generatedAt": "2026-09-08T03:59:21.092Z",
|
|
3
|
-
"transport": "configured SynaBun browser HTTP engine",
|
|
4
|
-
"scope": "Updated snapshot/content/extraction algorithms over SynaBun engine adapter; read-only live pages. New route wiring covered separately by local Express tests.",
|
|
5
|
-
"results": [
|
|
6
|
-
{
|
|
7
|
-
"group": "general",
|
|
8
|
-
"url": "https://example.com/",
|
|
9
|
-
"status": "passed",
|
|
10
|
-
"finalUrl": "https://example.com/",
|
|
11
|
-
"title": "Example Domain",
|
|
12
|
-
"snapshotChars": 298,
|
|
13
|
-
"captures": 1,
|
|
14
|
-
"scopedHtmlChars": 220,
|
|
15
|
-
"extractedLinks": 1,
|
|
16
|
-
"durationMs": 8361
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"group": "general",
|
|
20
|
-
"url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
|
|
21
|
-
"status": "passed",
|
|
22
|
-
"finalUrl": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
|
|
23
|
-
"title": "Array - JavaScript | MDN",
|
|
24
|
-
"snapshotChars": 5965,
|
|
25
|
-
"captures": 2,
|
|
26
|
-
"scopedHtmlChars": 91581,
|
|
27
|
-
"extractedLinks": 10,
|
|
28
|
-
"durationMs": 8384
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"group": "general",
|
|
32
|
-
"url": "https://en.wikipedia.org/wiki/Web_browser",
|
|
33
|
-
"status": "passed",
|
|
34
|
-
"finalUrl": "https://en.wikipedia.org/wiki/Web_browser",
|
|
35
|
-
"title": "Web browser - Wikipedia",
|
|
36
|
-
"snapshotChars": 5982,
|
|
37
|
-
"captures": 2,
|
|
38
|
-
"scopedHtmlChars": 403828,
|
|
39
|
-
"extractedLinks": 10,
|
|
40
|
-
"durationMs": 3207
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"group": "social",
|
|
44
|
-
"url": "https://bsky.app/",
|
|
45
|
-
"status": "passed",
|
|
46
|
-
"finalUrl": "https://bsky.app/",
|
|
47
|
-
"title": "Discover — Bluesky",
|
|
48
|
-
"snapshotChars": 1823,
|
|
49
|
-
"captures": 1,
|
|
50
|
-
"scopedHtmlChars": 87619,
|
|
51
|
-
"extractedLinks": 10,
|
|
52
|
-
"durationMs": 2596
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"group": "social",
|
|
56
|
-
"url": "https://www.youtube.com/",
|
|
57
|
-
"status": "passed",
|
|
58
|
-
"finalUrl": "https://www.youtube.com/",
|
|
59
|
-
"title": "YouTube",
|
|
60
|
-
"snapshotChars": 5999,
|
|
61
|
-
"captures": 2,
|
|
62
|
-
"scopedHtmlChars": 576986,
|
|
63
|
-
"extractedLinks": 10,
|
|
64
|
-
"durationMs": 4583
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"group": "social",
|
|
68
|
-
"url": "https://x.com/explore",
|
|
69
|
-
"status": "passed",
|
|
70
|
-
"finalUrl": "https://x.com/explore",
|
|
71
|
-
"title": "Explorar / X",
|
|
72
|
-
"snapshotChars": 318,
|
|
73
|
-
"captures": 1,
|
|
74
|
-
"scopedHtmlChars": 4936,
|
|
75
|
-
"extractedLinks": 1,
|
|
76
|
-
"durationMs": 1802
|
|
77
|
-
}
|
|
78
|
-
]
|
|
79
|
-
}
|