synabun 2.4.1 → 2.4.3
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 +50 -0
- package/README.md +1 -1
- package/docs/browser-extension-bridge.md +46 -6
- package/lib/data-home-files.js +4 -2
- package/lib/first-launch-protection.js +8 -2
- package/lib/release-npm-ci.mjs +23 -1
- package/lib/update-snapshot.js +11 -4
- package/mcp-server/dist/http.d.ts.map +1 -1
- package/mcp-server/dist/http.js +25 -2
- package/mcp-server/dist/http.js.map +1 -1
- package/mcp-server/dist/index.d.ts.map +1 -1
- package/mcp-server/dist/index.js +62 -17
- package/mcp-server/dist/index.js.map +1 -1
- package/mcp-server/dist/services/browser-bench.d.ts +22 -22
- package/mcp-server/dist/services/memory-maintenance.d.ts +1 -0
- package/mcp-server/dist/services/memory-maintenance.d.ts.map +1 -1
- package/mcp-server/dist/services/memory-maintenance.js +34 -45
- package/mcp-server/dist/services/memory-maintenance.js.map +1 -1
- package/mcp-server/dist/services/memory-migration-copy.d.ts +144 -0
- package/mcp-server/dist/services/memory-migration-copy.d.ts.map +1 -0
- package/mcp-server/dist/services/memory-migration-copy.js +467 -0
- package/mcp-server/dist/services/memory-migration-copy.js.map +1 -0
- package/mcp-server/dist/services/memory-migration-worker.d.ts +2 -0
- package/mcp-server/dist/services/memory-migration-worker.d.ts.map +1 -0
- package/mcp-server/dist/services/memory-migration-worker.js +60 -0
- package/mcp-server/dist/services/memory-migration-worker.js.map +1 -0
- package/mcp-server/dist/services/memory-retrieval.d.ts +4 -0
- package/mcp-server/dist/services/memory-retrieval.d.ts.map +1 -1
- package/mcp-server/dist/services/memory-retrieval.js +188 -40
- package/mcp-server/dist/services/memory-retrieval.js.map +1 -1
- package/mcp-server/dist/services/memory-schema.d.ts +58 -2
- package/mcp-server/dist/services/memory-schema.d.ts.map +1 -1
- package/mcp-server/dist/services/memory-schema.js +190 -13
- package/mcp-server/dist/services/memory-schema.js.map +1 -1
- package/mcp-server/dist/services/memory-sessions.d.ts +19 -1
- package/mcp-server/dist/services/memory-sessions.d.ts.map +1 -1
- package/mcp-server/dist/services/memory-sessions.js +56 -20
- package/mcp-server/dist/services/memory-sessions.js.map +1 -1
- package/mcp-server/dist/services/memory-verification.d.ts.map +1 -1
- package/mcp-server/dist/services/memory-verification.js +8 -5
- package/mcp-server/dist/services/memory-verification.js.map +1 -1
- package/mcp-server/dist/services/neural-interface.d.ts +5 -0
- package/mcp-server/dist/services/neural-interface.d.ts.map +1 -1
- package/mcp-server/dist/services/neural-interface.js +19 -2
- package/mcp-server/dist/services/neural-interface.js.map +1 -1
- package/mcp-server/dist/services/retrieval-reader-worker.d.ts +2 -0
- package/mcp-server/dist/services/retrieval-reader-worker.d.ts.map +1 -0
- package/mcp-server/dist/services/retrieval-reader-worker.js +76 -0
- package/mcp-server/dist/services/retrieval-reader-worker.js.map +1 -0
- package/mcp-server/dist/services/retrieval-reader.d.ts +38 -0
- package/mcp-server/dist/services/retrieval-reader.d.ts.map +1 -0
- package/mcp-server/dist/services/retrieval-reader.js +145 -0
- package/mcp-server/dist/services/retrieval-reader.js.map +1 -0
- package/mcp-server/dist/services/sqlite-write.d.ts +14 -0
- package/mcp-server/dist/services/sqlite-write.d.ts.map +1 -0
- package/mcp-server/dist/services/sqlite-write.js +94 -0
- package/mcp-server/dist/services/sqlite-write.js.map +1 -0
- package/mcp-server/dist/services/sqlite.d.ts +39 -0
- package/mcp-server/dist/services/sqlite.d.ts.map +1 -1
- package/mcp-server/dist/services/sqlite.js +249 -8
- package/mcp-server/dist/services/sqlite.js.map +1 -1
- package/mcp-server/dist/services/tool-catalog.d.ts +1 -1
- package/mcp-server/dist/services/typesafe-config.d.ts +7 -1
- package/mcp-server/dist/services/typesafe-config.d.ts.map +1 -1
- package/mcp-server/dist/services/typesafe-config.js +32 -10
- package/mcp-server/dist/services/typesafe-config.js.map +1 -1
- package/mcp-server/dist/services/typesafe.d.ts.map +1 -1
- package/mcp-server/dist/services/typesafe.js +9 -7
- package/mcp-server/dist/services/typesafe.js.map +1 -1
- package/mcp-server/dist/services/vector-cache.d.ts +32 -0
- package/mcp-server/dist/services/vector-cache.d.ts.map +1 -1
- package/mcp-server/dist/services/vector-cache.js +161 -8
- package/mcp-server/dist/services/vector-cache.js.map +1 -1
- package/mcp-server/dist/tools/agent-definition.d.ts +2 -2
- package/mcp-server/dist/tools/agents.d.ts +11 -7
- package/mcp-server/dist/tools/agents.d.ts.map +1 -1
- package/mcp-server/dist/tools/agents.js +27 -9
- package/mcp-server/dist/tools/agents.js.map +1 -1
- package/mcp-server/dist/tools/browser-advanced.d.ts +1 -1
- package/mcp-server/dist/tools/browser-advanced.d.ts.map +1 -1
- package/mcp-server/dist/tools/browser-advanced.js +10 -3
- package/mcp-server/dist/tools/browser-advanced.js.map +1 -1
- package/mcp-server/dist/tools/browser-extension-setup.d.ts +5 -0
- package/mcp-server/dist/tools/browser-extension-setup.d.ts.map +1 -0
- package/mcp-server/dist/tools/browser-extension-setup.js +29 -0
- package/mcp-server/dist/tools/browser-extension-setup.js.map +1 -0
- package/mcp-server/dist/tools/browser-interact.d.ts.map +1 -1
- package/mcp-server/dist/tools/browser-interact.js +6 -1
- package/mcp-server/dist/tools/browser-interact.js.map +1 -1
- package/mcp-server/dist/tools/fb-groups.d.ts +2 -2
- package/mcp-server/dist/tools/skill-tools.d.ts +4 -4
- package/mcp-server/dist/tools/tool-groups.d.ts +1 -1
- package/mcp-server/package-lock.json +5 -5
- package/mcp-server/package.json +1 -1
- package/mcp-server/src/http.ts +20 -2
- package/mcp-server/src/index.ts +59 -17
- package/mcp-server/src/services/memory-maintenance.ts +31 -28
- package/mcp-server/src/services/memory-migration-copy.ts +419 -0
- package/mcp-server/src/services/memory-migration-worker.ts +55 -0
- package/mcp-server/src/services/memory-retrieval.ts +173 -32
- package/mcp-server/src/services/memory-schema.ts +194 -12
- package/mcp-server/src/services/memory-sessions.ts +54 -21
- package/mcp-server/src/services/memory-verification.ts +7 -4
- package/mcp-server/src/services/neural-interface.ts +22 -2
- package/mcp-server/src/services/retrieval-reader-worker.ts +67 -0
- package/mcp-server/src/services/retrieval-reader.ts +131 -0
- package/mcp-server/src/services/sqlite-write.ts +60 -0
- package/mcp-server/src/services/sqlite.ts +246 -8
- package/mcp-server/src/services/typesafe-config.ts +25 -6
- package/mcp-server/src/services/typesafe.ts +9 -7
- package/mcp-server/src/services/vector-cache.ts +154 -9
- package/mcp-server/src/tools/agents.ts +26 -9
- package/mcp-server/src/tools/browser-advanced.ts +10 -3
- package/mcp-server/src/tools/browser-extension-setup.ts +36 -0
- package/mcp-server/src/tools/browser-interact.ts +5 -1
- package/neural-interface/i18n/en.json +313 -2
- package/neural-interface/i18n/pt-BR.json +321 -10
- package/neural-interface/lib/agents/split.js +32 -4
- package/neural-interface/lib/assistant-api.js +52 -8
- package/neural-interface/lib/assistant-brains/claude.js +2 -0
- package/neural-interface/lib/assistant-brains/opencode.js +121 -7
- package/neural-interface/lib/assistant-catalog.js +2 -2
- package/neural-interface/lib/assistant-config.js +0 -7
- package/neural-interface/lib/assistant-dispatch.js +281 -95
- package/neural-interface/lib/assistant-envelope.js +40 -0
- package/neural-interface/lib/assistant-persona.js +16 -4
- package/neural-interface/lib/assistant-pricing.js +65 -14
- package/neural-interface/lib/assistant-router.js +131 -47
- package/neural-interface/lib/assistant-run-wait.js +45 -28
- package/neural-interface/lib/assistant-runtime.js +133 -42
- package/neural-interface/lib/backup-contents.js +158 -0
- package/neural-interface/lib/backup-crypto-io.js +330 -0
- package/neural-interface/lib/backup-crypto-worker.js +130 -0
- package/neural-interface/lib/backup-crypto.js +525 -0
- package/neural-interface/lib/backup-download.js +268 -0
- package/neural-interface/lib/backup-encryption.js +318 -0
- package/neural-interface/lib/backup-groups.js +287 -0
- package/neural-interface/lib/backup-restore-session.js +176 -0
- package/neural-interface/lib/backup-restore-stage.js +60 -0
- package/neural-interface/lib/backup-service.js +788 -233
- package/neural-interface/lib/backup-zip-reader.js +30 -18
- package/neural-interface/lib/backup-zip-writer.js +34 -10
- package/neural-interface/lib/browser-extension-adapter.js +89 -15
- package/neural-interface/lib/browser-extension-archive.js +149 -0
- package/neural-interface/lib/browser-extension-bridge.js +24 -10
- package/neural-interface/lib/browser-extension-folder.js +596 -76
- package/neural-interface/lib/browser-extension-package.js +200 -0
- package/neural-interface/lib/browser-extension-pin.js +84 -0
- package/neural-interface/lib/browser-extension-pin.json +33 -0
- package/{browser-extension/protocol.js → neural-interface/lib/browser-extension-protocol.js} +91 -6
- package/neural-interface/lib/browser-extension-setup.js +105 -18
- package/neural-interface/lib/claude-agent-bridge.js +1 -0
- package/neural-interface/lib/claude-session-cleanup.js +5 -1
- package/neural-interface/lib/cli-install.js +23 -3
- package/neural-interface/lib/cli-update-planner.js +171 -9
- package/neural-interface/lib/client-diagnostics.js +42 -0
- package/neural-interface/lib/confined-fs.js +7 -2
- package/neural-interface/lib/coordination/README.md +8 -2
- package/neural-interface/lib/coordination/contract.js +161 -0
- package/neural-interface/lib/coordination/database.js +999 -0
- package/neural-interface/lib/coordination/operations.js +436 -0
- package/neural-interface/lib/coordination/service.js +68 -537
- package/neural-interface/lib/coordination/storage-worker.js +101 -0
- package/neural-interface/lib/coordination/store.js +219 -1111
- package/neural-interface/lib/db.js +70 -32
- package/neural-interface/lib/health-count.js +37 -0
- package/neural-interface/lib/loop-stall.js +139 -0
- package/neural-interface/lib/maritaca/client.js +2 -2
- package/neural-interface/lib/maritaca/models.js +12 -17
- package/neural-interface/lib/maritaca/opencode.js +4 -2
- package/neural-interface/lib/memory-api.js +9 -1
- package/neural-interface/lib/memory-session-capture.js +42 -10
- package/neural-interface/lib/memory-store-gate.js +313 -0
- package/neural-interface/lib/memory-store-migrate.js +65 -0
- package/neural-interface/lib/memory-timers.js +7 -7
- package/neural-interface/lib/native-loop-providers.js +23 -17
- package/neural-interface/lib/native-loop-runtime.js +48 -9
- package/neural-interface/lib/opencode-build-preflight.js +18 -1
- package/neural-interface/lib/opencode-native-boundary.js +69 -8
- package/neural-interface/lib/opencode-provider-view.js +14 -3
- package/neural-interface/lib/opencode-shell-read.js +107 -0
- package/neural-interface/lib/opencode-stop-failures.js +40 -0
- package/neural-interface/lib/opencode-turn-release.js +173 -0
- package/neural-interface/lib/opencode-v2-client.js +4 -1
- package/neural-interface/lib/opencode-v2-ws-requests.js +65 -1
- package/neural-interface/lib/opencode2-client.js +343 -7
- package/neural-interface/lib/opencode2-translate.js +161 -4
- package/neural-interface/lib/recall-impact.js +122 -0
- package/neural-interface/lib/scratch-evidence.js +420 -0
- package/neural-interface/lib/scratch-process-guard.js +139 -0
- package/neural-interface/lib/scratch-references.js +279 -0
- package/neural-interface/lib/scratch-retention-core.js +385 -0
- package/neural-interface/lib/scratch-retention-worker.js +37 -0
- package/neural-interface/lib/scratch-retention.js +151 -0
- package/neural-interface/lib/session-cache-builder.js +31 -43
- package/neural-interface/lib/session-cache-worker.js +157 -0
- package/neural-interface/lib/session-indexer.js +28 -21
- package/neural-interface/lib/session-search-index.js +85 -0
- package/neural-interface/lib/skills/creation.js +1 -1
- package/neural-interface/lib/sqlite-integrity-worker.js +3 -1
- package/neural-interface/lib/style-guide/store.js +43 -3
- package/neural-interface/lib/system-restore.js +50 -0
- package/neural-interface/lib/teams/api.js +15 -6
- package/neural-interface/lib/teams/claims.js +67 -31
- package/neural-interface/lib/teams/index.js +7 -7
- package/neural-interface/lib/teams/integration.js +40 -40
- package/neural-interface/lib/teams/landing.js +6 -6
- package/neural-interface/lib/teams/recovery.js +24 -23
- package/neural-interface/lib/teams/scheduler.js +194 -95
- package/neural-interface/lib/teams/state.js +14 -14
- package/neural-interface/lib/teams/worktrees.js +27 -27
- package/neural-interface/lib/terminal-token-redaction.js +83 -0
- package/neural-interface/lib/whatsapp/bridge.js +54 -7
- package/neural-interface/lib/worker-confinement.js +47 -2
- package/neural-interface/lib/worker-mcp-channel.js +2 -0
- package/neural-interface/lib/worker-resume.js +5 -0
- package/neural-interface/lib/worker-stop.js +86 -0
- package/neural-interface/package-lock.json +5 -5
- package/neural-interface/package.json +1 -1
- package/neural-interface/public/extension-setup.html +5 -2
- package/neural-interface/public/index.html +233 -24
- package/neural-interface/public/onboarding.html +259 -34
- package/neural-interface/public/shared/agents/studio/ax-library.js +0 -6
- package/neural-interface/public/shared/agents/studio/ax-main.js +14 -7
- package/neural-interface/public/shared/agy/agy-options.js +11 -0
- package/neural-interface/public/shared/agy/agy-panel.js +67 -20
- package/neural-interface/public/shared/agy/agy-styles.js +14 -12
- package/neural-interface/public/shared/agy/agy-tabs-logic.js +4 -1
- package/neural-interface/public/shared/api.js +1 -1
- package/neural-interface/public/shared/assistant/asst-api.js +28 -3
- package/neural-interface/public/shared/assistant/asst-brain-picker.js +13 -6
- package/neural-interface/public/shared/assistant/asst-control.js +2 -0
- package/neural-interface/public/shared/assistant/asst-motion-gate.js +78 -4
- package/neural-interface/public/shared/assistant/asst-panel.js +87 -3
- package/neural-interface/public/shared/assistant/asst-rack-styles.js +27 -0
- package/neural-interface/public/shared/assistant/asst-render.js +243 -44
- package/neural-interface/public/shared/assistant/asst-route.js +100 -21
- package/neural-interface/public/shared/assistant/asst-routes-editor.js +1 -1
- package/neural-interface/public/shared/assistant/asst-shell-logic.js +200 -0
- package/neural-interface/public/shared/assistant/asst-shell.js +111 -0
- package/neural-interface/public/shared/assistant/asst-sidepanel.js +4 -2
- package/neural-interface/public/shared/assistant/asst-state.js +11 -0
- package/neural-interface/public/shared/assistant/asst-styles.js +11 -23
- package/neural-interface/public/shared/assistant/route-identity.js +2 -1
- package/neural-interface/public/shared/cdx/cdx-render.js +9 -0
- package/neural-interface/public/shared/cdx/cdx-settings.js +3 -1
- package/neural-interface/public/shared/cdx/cdx-styles.js +6 -0
- package/neural-interface/public/shared/cdx/cdx-tabs.js +54 -9
- package/neural-interface/public/shared/client-diagnostics.js +94 -0
- package/neural-interface/public/shared/cp/cp-markdown.js +7 -2
- package/neural-interface/public/shared/cp/cp-styles.js +1 -1
- package/neural-interface/public/shared/effort-i18n.js +118 -0
- package/neural-interface/public/shared/extension-setup/es-page.js +10 -4
- package/neural-interface/public/shared/extension-setup/es-view.js +25 -10
- package/neural-interface/public/shared/html-shell.js +4 -52
- package/neural-interface/public/shared/loading-diagnostic-entry.js +64 -0
- package/neural-interface/public/shared/memory-store-wait.js +52 -0
- package/neural-interface/public/shared/morelogin-profile-field.js +1 -1
- package/neural-interface/public/shared/mtc/mtc-logic.js +2 -1
- package/neural-interface/public/shared/mtc/mtc-panel.js +25 -3
- package/neural-interface/public/shared/mtc/mtc-styles.js +13 -12
- package/neural-interface/public/shared/ocp-v2/ocp-v2-childpanel.js +7 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-events.js +5 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-location-logic.js +109 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-manager.js +1 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-modelpicker.js +8 -1
- package/neural-interface/public/shared/ocp-v2/ocp-v2-panel.js +152 -8
- package/neural-interface/public/shared/ocp-v2/ocp-v2-rehydrate.js +7 -1
- package/neural-interface/public/shared/ocp-v2/ocp-v2-render.js +53 -4
- package/neural-interface/public/shared/ocp-v2/ocp-v2-send.js +52 -6
- package/neural-interface/public/shared/ocp-v2/ocp-v2-session-actions.js +22 -2
- package/neural-interface/public/shared/ocp-v2/ocp-v2-shell-block.js +165 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-shell-logic.js +346 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-shell.js +108 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-state.js +49 -3
- package/neural-interface/public/shared/ocp-v2/ocp-v2-styles.js +67 -93
- package/neural-interface/public/shared/ocp-v2/ocp-v2-tools-logic.js +20 -5
- package/neural-interface/public/shared/ocp-v2/ocp-v2-tools.js +7 -1
- package/neural-interface/public/shared/ocp-v2/ocp-v2-variantpicker.js +17 -6
- package/neural-interface/public/shared/ocp-v2/ocp-v2-ws.js +7 -2
- package/neural-interface/public/shared/output-format.js +294 -0
- package/neural-interface/public/shared/provider-icons.js +6 -0
- package/neural-interface/public/shared/schedules-view.js +2 -1
- package/neural-interface/public/shared/server-presence.js +77 -0
- package/neural-interface/public/shared/settings/settings-backup-contents.js +241 -0
- package/neural-interface/public/shared/settings/settings-backup-download.js +298 -0
- package/neural-interface/public/shared/settings/settings-backup-encryption-pane.js +335 -0
- package/neural-interface/public/shared/settings/settings-backup-encryption.js +545 -0
- package/neural-interface/public/shared/settings/settings-browser-extension.js +54 -12
- package/neural-interface/public/shared/settings/settings-ia.js +1 -1
- package/neural-interface/public/shared/shell-stop-view.js +83 -0
- package/neural-interface/public/shared/skills/studio/sx-geometry.js +12 -3
- package/neural-interface/public/shared/skills/studio/sx-main.js +14 -7
- package/neural-interface/public/shared/studio-attention.js +6 -0
- package/neural-interface/public/shared/styles.css +341 -437
- package/neural-interface/public/shared/tour/tour-actor.js +14 -3
- package/neural-interface/public/shared/transcript-rows.js +28 -3
- package/neural-interface/public/shared/tray-auto-close.js +49 -6
- package/neural-interface/public/shared/ui-agents.js +1 -2
- package/neural-interface/public/shared/ui-automation-studio.js +168 -108
- package/neural-interface/public/shared/ui-claude-panel.js +62 -65
- package/neural-interface/public/shared/ui-loading.js +124 -17
- package/neural-interface/public/shared/ui-native-loop-router.js +52 -0
- package/neural-interface/public/shared/ui-navbar.js +2 -1
- package/neural-interface/public/shared/ui-output.js +533 -0
- package/neural-interface/public/shared/ui-schedules-studio.js +165 -128
- package/neural-interface/public/shared/ui-scroll-follow.js +101 -6
- package/neural-interface/public/shared/ui-sessions.js +2 -2
- package/neural-interface/public/shared/ui-settings-entry.js +18 -0
- package/neural-interface/public/shared/ui-settings.js +224 -65
- package/neural-interface/public/shared/ui-sidepanel-tray.js +3 -2
- package/neural-interface/public/shared/ui-tooltip.js +16 -0
- package/neural-interface/public/shared/ui-tutorial.js +5 -6
- package/neural-interface/public/shared/ui-worker-end.js +27 -8
- package/neural-interface/public/shared/worker-end.js +9 -4
- package/neural-interface/public/variant/2d/main.js +5 -0
- package/neural-interface/public/variant/3d/app.js +10 -0
- package/neural-interface/public/variant/3d/main.js +5 -1
- package/neural-interface/scripts/scratch-retention.mjs +20 -0
- package/neural-interface/server.js +725 -173
- package/npm-shrinkwrap.json +5 -5
- package/package.json +1 -2
- package/scripts/restore-data-home-from-backup.mjs +175 -8
- package/setup.js +18 -4
- package/browser-extension/content.js +0 -189
- package/browser-extension/engine.js +0 -508
- package/browser-extension/icons/icon-128.png +0 -0
- package/browser-extension/icons/icon-16.png +0 -0
- package/browser-extension/icons/icon-32.png +0 -0
- package/browser-extension/icons/icon-48.png +0 -0
- package/browser-extension/icons/status-off-16.png +0 -0
- package/browser-extension/icons/status-off-32.png +0 -0
- package/browser-extension/icons/status-off-48.png +0 -0
- package/browser-extension/icons/status-on-16.png +0 -0
- package/browser-extension/icons/status-on-32.png +0 -0
- package/browser-extension/icons/status-on-48.png +0 -0
- package/browser-extension/manifest.json +0 -56
- package/browser-extension/popup-strings.js +0 -250
- package/browser-extension/popup-view.js +0 -151
- package/browser-extension/popup.css +0 -166
- package/browser-extension/popup.html +0 -108
- package/browser-extension/popup.js +0 -359
- package/browser-extension/service-worker.js +0 -275
- package/browser-extension/setup-content.js +0 -36
- package/browser-extension/tokens.css +0 -326
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
|
+
# SynaBun v.2.4.3
|
|
2
|
+
|
|
3
|
+
This release fixes OpenCode turns that ended too early and sessions that came back to life after a stop, makes OpenCode updates take effect without a restart, and stops the auto-close toggle from losing your drafts and queued prompts. The browser extension is now downloaded when you connect your browser.
|
|
4
|
+
|
|
5
|
+
## 🛠 Fixed
|
|
6
|
+
|
|
7
|
+
- **OpenCode turns wait for long shell commands.** When a command such as a test run outlived its time limit, the OpenCode side panel and the Assistant went idle while it was still running, and its output was never read. The turn now stays active until the model has answered, and the command's output shows live in the side panel and the Assistant's activity view, also after a reload. Stop ends background commands too, and tells you when one is still running.
|
|
8
|
+
- **Stopped OpenCode sessions stay stopped.** A session stopped in the middle of a turn could start running again, and calling its model, the next time OpenCode was opened in a terminal. SynaBun now ends running turns before it stops OpenCode. Sessions left in that state by an earlier version can still resume once.
|
|
9
|
+
- **OpenCode updates take effect right away.** After an update, SynaBun kept using the old OpenCode version until it was restarted. It now switches to the new one as soon as nothing is running on the old one.
|
|
10
|
+
- **OpenCode updates on Windows.** An OpenCode installed with its own installer can now be updated from the update badge, and a WinGet install no longer shows an update that WinGet does not offer yet.
|
|
11
|
+
- **Auto-close closes finished OpenCode sessions.** With the auto-close toggle on, a finished OpenCode session no longer stays in the tray. Sessions that were never automations are now closed without being deleted, so you can reopen them with their transcript.
|
|
12
|
+
- **Auto-close keeps your unfinished work.** Tabs with an unsent draft or attachments, a temporary chat, or prompts waiting in their queue now stay open until the draft is sent or the queue is done. This covers Claude Code, Codex, Antigravity and Maritaca.
|
|
13
|
+
- **Antigravity sends queued prompts from background tabs.** A queued prompt in an Antigravity tab that was not on screen no longer waits forever: it is sent when the turn ends, as in the other panels.
|
|
14
|
+
|
|
15
|
+
## ⚙️ Changed
|
|
16
|
+
|
|
17
|
+
- **The browser extension is downloaded when you connect.** SynaBun Browser Bridge no longer ships inside the app or the npm package. Pressing Connect your browser downloads it from synabun.ai and installs it only after checking that it is the exact expected version. The extension, its setup and its pairing stay the same.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# SynaBun v.2.4.2
|
|
22
|
+
|
|
23
|
+
This release gives you control over your backups, with optional password protection and a choice of what each one contains. It also makes side panels easier to read and fixes problems with restarts, large memory databases and OpenCode.
|
|
24
|
+
|
|
25
|
+
## ✨ New
|
|
26
|
+
|
|
27
|
+
- **Password protection for backups.** Turn it on in Settings under Memory & backups. Manual, scheduled and pre-update backups are then encrypted, and scheduled backups keep running without asking for the password. It is off by default, and your existing backups still restore as before.
|
|
28
|
+
- **Choose what a backup contains.** Each group of data has its own switch and shows its size, so you can leave out caches and working folders that made backups very large. Logs and browser profiles are no longer included. A running backup can now be cancelled.
|
|
29
|
+
- **Save backups to a folder you choose.** Download full backup now writes directly to that folder and shows its progress, so large backups no longer have to fit in the browser tab first.
|
|
30
|
+
- **Page scripts in your everyday browser.** Browser Bridge 1.4.0 lets agents run page scripts and wait for a page to finish loading. To use it, reload the extension, turn on Allow User Scripts in its details, and reload it once more.
|
|
31
|
+
|
|
32
|
+
## 🛠 Fixed
|
|
33
|
+
|
|
34
|
+
- **Workers survive a restart.** Workers paused for a server restart are no longer recorded as stopped by you, and they resume when the server is back.
|
|
35
|
+
- **Safer database upgrades.** Only one process now makes the safety copy before a memory database upgrade. Large databases no longer fill the disk with duplicate copies or block SynaBun from starting.
|
|
36
|
+
- **No more false "Server offline" screen.** A server that is only busy, for example during a large backup, no longer shows as offline.
|
|
37
|
+
- **OpenCode recovers from a removed folder.** If a session's folder is gone, the panel starts a new session in the right project and puts your prompt back in the box. OpenCode updates now show the update badge too.
|
|
38
|
+
- **Side panels stay at the bottom.** Transcripts keep following new output when the composer resizes, content collapses or the browser zoom changes.
|
|
39
|
+
- **Planned team tasks start reliably.** A task approved with a long slice title no longer fails when its team starts.
|
|
40
|
+
|
|
41
|
+
## ⚙️ Changed
|
|
42
|
+
|
|
43
|
+
- **Side panel output is easier to read.** All six panels now share the same text, table and code styling. Wide tables scroll inside their frame and can be copied or expanded.
|
|
44
|
+
- **Studio windows open at a consistent size.** Skills, Agents, Automation and Schedules all open at the same default size and keep their saved position.
|
|
45
|
+
- **Model choices wait for you.** A route card now stays open until you answer it, instead of expiring after a set time.
|
|
46
|
+
- **Updated model pricing.** Prices were refreshed across all worker providers, so usage costs are more accurate.
|
|
47
|
+
- **More of the interface in Portuguese.** Backup messages, route cards and reasoning effort labels now appear in Brazilian Portuguese.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
1
51
|
# SynaBun v.2.4.1
|
|
2
52
|
|
|
3
53
|
The Assistant can now use a specialist for each type of task. This release also expands file uploads in the Chrome extension and makes desktop startup failures easier to recover from.
|
package/README.md
CHANGED
|
@@ -178,7 +178,7 @@ Everything SynaBun stores is in one folder outside the app: `~/.synabun` on macO
|
|
|
178
178
|
|
|
179
179
|
## Links
|
|
180
180
|
|
|
181
|
-
- [Changelog](./CHANGELOG.md): what is new in 2.4.
|
|
181
|
+
- [Changelog](./CHANGELOG.md): what is new in 2.4.3 and before
|
|
182
182
|
- [Security](./SECURITY.md): security model and how to report a vulnerability
|
|
183
183
|
- [Contributing](./CONTRIBUTING.md): bug reports and feature requests are welcome as [issues](https://github.com/danilokhury/Synabun/issues); pull requests are not accepted
|
|
184
184
|
- [Website](https://synabun.ai), [docs](https://synabun.ai/docs) and [blog](https://synabun.ai/blog)
|
|
@@ -4,12 +4,28 @@ Connect Chrome or Edge to let an agent work in a browser profile where you are a
|
|
|
4
4
|
|
|
5
5
|
## Connect the extension
|
|
6
6
|
|
|
7
|
-
1. On macOS, Windows or Linux, open **Settings → Browser** in SynaBun. Select **Existing browser via extension** and choose **Connect your browser**.
|
|
7
|
+
1. On macOS, Windows or Linux, open **Settings → Browser** in SynaBun. Select **Existing browser via extension** and choose **Connect your browser**. The first time, SynaBun downloads the extension from synabun.ai, which takes a moment and needs an internet connection.
|
|
8
8
|
2. In the browser you want to connect, open the extensions address shown on the setup page. Turn on **Developer mode**, choose **Load unpacked**, and select the folder SynaBun opened. Use this folder again if you reinstall the extension.
|
|
9
9
|
3. Keep the setup page open until it shows **Connected**. For manual pairing, start pairing in Settings and enter the displayed port and code in the extension popup.
|
|
10
10
|
|
|
11
11
|
The extension connects to SynaBun on this computer at `127.0.0.1`. Setup requires neither a NativeMessagingHosts installation nor an allowed_origins manifest. If your organization blocks unpacked extensions, contact your browser administrator.
|
|
12
12
|
|
|
13
|
+
## Where the extension comes from
|
|
14
|
+
|
|
15
|
+
SynaBun Browser Bridge is not part of the SynaBun app or its installers. When you choose **Connect your browser**, SynaBun downloads it from `synabun.ai` over HTTPS and installs it only when the file is exactly the one your SynaBun version expects (its size and SHA-256 are fixed in each SynaBun release). A file that does not match is discarded and nothing is installed.
|
|
16
|
+
|
|
17
|
+
- **The folder.** The verified extension is unpacked into `browser-extension/unpacked` inside SynaBun's data folder. This is the folder you load in the browser. It stays in place across SynaBun updates.
|
|
18
|
+
- **Nothing is downloaded until you ask.** SynaBun starts and works without the extension and without a connection. It downloads the extension only when you start **Connect your browser**.
|
|
19
|
+
- **Updates.** When a new SynaBun version needs a newer extension, SynaBun downloads it in the background after it starts and replaces the folder's files. If that download fails, the folder you have keeps working and Settings offers **Try again**. Afterwards, choose **Reload** on SynaBun Browser Bridge in the browser's extensions page when Settings prompts you.
|
|
20
|
+
- **The folder is checked against the release.** Each SynaBun release lists every file of its extension with its SHA-256. The folder counts as up to date only when it holds exactly those files and nothing else. Only the setup page's port in the manifest may differ. A changed, added or deleted file, or a manifest with other permissions, makes SynaBun replace the folder with the verified extension. It uses the verified copy it keeps in `browser-extension/package.zip`, so no connection is needed, and downloads it again when that copy is missing or does not match. The setup port is rewritten only after the folder has passed that check.
|
|
21
|
+
- **A safe folder, one writer.** SynaBun uses `browser-extension` only when that folder and the data folder are yours, are not links, and cannot be written by other users. Otherwise it changes nothing there and reports `EXTENSION_FOLDER_UNSAFE`. On Linux, a folder its group can write is accepted when that group is your own private group (common with umask 002). It must be your primary group, carry your user name, list no other members, and be no other account's primary group. SynaBun checks this in `/etc/passwd` and `/etc/group`. If those files cannot be read, or your account comes from LDAP or another directory and is not listed there, the folder is refused and the message says why. On macOS a folder its group can write is always refused, because its groups, such as `staff`, are shared. Changes run under an operating-system lock, so two SynaBun servers that share a data folder take turns.
|
|
22
|
+
- **Replacing the folder.** The new folder is written beside the old one and recorded in `browser-extension/transaction.json`. Then the old folder is renamed aside and the new one is moved into its place. This is the same on every system, and SynaBun starts no other program to do it. For the short moment between those two renames, the path the browser loads is empty. If the old folder cannot be moved, for example because the browser holds it open on Windows, the update waits and the old folder stays as it was. Files are never overwritten one by one. If SynaBun is stopped part-way, its next start finishes or reverses the step from that record. An old folder goes back only if the record shows it was the verified extension.
|
|
23
|
+
- **Reload after a repair.** When SynaBun replaces files in the folder that were not the verified extension, even at the same version, your browser keeps running the old files until the extension is reloaded. Settings and the setup page then ask you to choose **Reload** on SynaBun Browser Bridge in `chrome://extensions` (`edge://extensions` in Edge), whether or not the extension is connected. They keep asking across restarts, and if the setup port changes meanwhile, the repair is still what they ask about. Once you have reloaded it, choose **I reloaded the extension** in **Settings → Browser**. Only that click clears the request. The setup page does not clear it, even when it sees the extension, because the old copy has the same version and would answer the page in the same way.
|
|
24
|
+
- **What that confirmation cannot prove.** A changed extension with access to all sites can run scripts on any page in that browser, SynaBun's own Settings included, so no confirmation inside the browser is fully tamper-proof. The confirmation stops an old copy from clearing the warning by itself, simply by still running. If you suspect the extension was changed, remove it from the browser, then choose **Connect your browser** again.
|
|
25
|
+
- **Your pairing is kept.** The extension keeps the same identity in every version, so an update does not ask you to pair again. When only the setup page's port changes, Settings asks you to reload the extension until the setup page sees it running on the new port.
|
|
26
|
+
|
|
27
|
+
If you connected with an earlier SynaBun version, your browser may have loaded the extension from a folder inside SynaBun's own install location (a path that contains `node_modules` or the app's resources). That folder no longer contains the extension, so the browser reports it as missing after the update. Choose **Connect your browser** again and load the folder SynaBun shows. It is the same extension.
|
|
28
|
+
|
|
13
29
|
## Choose what agents can access
|
|
14
30
|
|
|
15
31
|
**Full control** is the default. An agent can open tabs, use your existing tabs and work on signed-in sites or local development servers. Use **Take back** in the popup to regain control of a tab.
|
|
@@ -18,22 +34,46 @@ Choose **Only sites and tabs I share** in **Settings → Browser → Agent acces
|
|
|
18
34
|
|
|
19
35
|
**Disconnect** pauses access across restarts. **Revoke pairing** ends the pairing. After an update, reload SynaBun Browser Bridge from the browser's extensions page when prompted.
|
|
20
36
|
|
|
37
|
+
## Let agents run page scripts
|
|
38
|
+
|
|
39
|
+
`browser_evaluate` runs JavaScript in a tab the agent controls. `browser_wait` can also wait until a page has loaded or its network has gone quiet. Both need SynaBun Browser Bridge 1.4.0 or later and a one-time setup in the browser:
|
|
40
|
+
|
|
41
|
+
1. Open the browser's extensions page (`chrome://extensions`, or `edge://extensions` in Edge) and choose **Reload** on SynaBun Browser Bridge. Version 1.4.0 adds two permissions: `userScripts`, to run a script in a page, and `webRequest`, to see when a tab's requests start and end. The extension never blocks or changes a request and reads no request content.
|
|
42
|
+
2. Choose **Details** on the extension and turn on **Allow User Scripts**. In Chrome or Edge before version 138, turn on **Developer mode** at the top of the extensions page instead.
|
|
43
|
+
3. Choose **Reload** once more.
|
|
44
|
+
|
|
45
|
+
Page scripts stay off until you turn on **Allow User Scripts**. Every other tool works without it, and you can turn it off again at any time. A script runs only in a tab the agent controls, on a page the access mode allows, and never on SynaBun's own pages or the browser's pages. It can read what the page's own JavaScript can read, including form values and the site's storage, so leave the switch off if agents should not have that.
|
|
46
|
+
|
|
47
|
+
Automations that publish on X or pace their social posts are held to the same publish gate and spacing here as in SynaBun's other browsers.
|
|
48
|
+
|
|
21
49
|
## Troubleshooting
|
|
22
50
|
|
|
23
51
|
| Message | What to do |
|
|
24
52
|
| --- | --- |
|
|
25
|
-
| `EXTENSION_NOT_CONNECTED` | Open the paired browser, check that the extension is enabled, and compare the port in its popup with the port in Settings. |
|
|
53
|
+
| `EXTENSION_NOT_CONNECTED` | Open the paired browser, check that the extension is enabled, and compare the port in its popup with the port in Settings. If the extension is missing from the browser after a SynaBun update, see [Where the extension comes from](#where-the-extension-comes-from). |
|
|
54
|
+
| `EXTENSION_DOWNLOAD_OFFLINE` | SynaBun could not reach synabun.ai. Check your internet connection, then choose **Try again**. |
|
|
55
|
+
| `EXTENSION_DOWNLOAD_UNAVAILABLE` | synabun.ai did not have the extension your SynaBun version needs. Try again later, or update SynaBun. |
|
|
56
|
+
| `EXTENSION_VERIFY_FAILED` | The download was not the file your SynaBun version expects, so SynaBun installed nothing. Choose **Try again**. If it keeps happening, update SynaBun. This check cannot be skipped. |
|
|
57
|
+
| `EXTENSION_FOLDER_UNSAFE` | `browser-extension` in SynaBun's data folder, or the data folder itself, is a link, belongs to another user, or can be written by others, so SynaBun changed nothing there. On Linux, a group that is not your own private group counts as others (see [Where the extension comes from](#where-the-extension-comes-from)); the server's log line says which check failed. Fix its owner and permissions, or remove the `browser-extension` folder, then choose **Connect your browser** again. |
|
|
26
58
|
| `PAIRING_EXPIRED` | Start a fresh pairing from Settings. |
|
|
27
59
|
| `SITE_NOT_APPROVED` | In restricted mode, share the site in the popup. |
|
|
28
60
|
| `NAVIGATION_NOT_COMMITTED` | Check which page the tab shows before retrying. |
|
|
29
61
|
| `NO_HISTORY_ENTRY` | The tab has reached the end of its history in that direction. Navigate to the desired page directly. |
|
|
30
62
|
| `RESTRICTED_PAGE` or `SYNABUN_PAGE_BLOCKED` | Choose an ordinary website tab. Browser settings, extension pages and SynaBun's control interface are protected. |
|
|
63
|
+
| `USER_SCRIPTS_DISABLED` | Turn on **Allow User Scripts** in the extension's details, then reload the extension. See [Let agents run page scripts](#let-agents-run-page-scripts). |
|
|
64
|
+
| `USER_SCRIPTS_UNSUPPORTED` | Update Chrome or Edge to version 135 or later. |
|
|
65
|
+
| `EXTENSION_RELOAD_REQUIRED` | The browser still runs an older copy of the extension. Reload SynaBun Browser Bridge from the browser's extensions page. If Settings says the extension folder is still being updated, wait for that to finish first. |
|
|
66
|
+
| `NETWORK_IDLE_UNAVAILABLE` | Reload the extension so its `webRequest` permission takes effect. Until then, wait for an element or for the `load` state. |
|
|
67
|
+
| `PAGE_ERROR` | The script itself failed on the page. Pass one JavaScript expression and wrap statements in a function: `(() => { …; return value; })()`. |
|
|
68
|
+
| `BLANK_PAGE` | Navigate the tab to a website before running a script. |
|
|
31
69
|
|
|
32
70
|
On sites such as Nexus, complete any site challenge yourself. Cloudflare acceptance depends on the site.
|
|
33
71
|
|
|
34
72
|
## Tool support
|
|
35
73
|
|
|
36
|
-
Page interactions operate on the top document. Some controls require manual input. If a tool returns `UNSUPPORTED_IN_EXTENSION_MODE`, consult its row below.
|
|
74
|
+
Page interactions operate on the top document. Upload selectors also search open shadow roots and same-origin frames. Some controls require manual input. If a tool returns `UNSUPPORTED_IN_EXTENSION_MODE`, consult its row below.
|
|
75
|
+
|
|
76
|
+
The site extractors and composer-state tools were built for SynaBun's own browser and stay listed as unsupported. Some of them read the page with a script, so they may answer in extension mode once **Allow User Scripts** is on. They have not been validated there.
|
|
37
77
|
|
|
38
78
|
| Tool | Status | Scope |
|
|
39
79
|
| --- | --- | --- |
|
|
@@ -42,7 +82,7 @@ Page interactions operate on the top document. Some controls require manual inpu
|
|
|
42
82
|
| browser_click | Partial | Works with standard controls in the top document. |
|
|
43
83
|
| browser_console | Unsupported | Unavailable in extension mode. |
|
|
44
84
|
| browser_content | Partial | Works with standard controls in the top document. |
|
|
45
|
-
| browser_evaluate |
|
|
85
|
+
| browser_evaluate | Partial | Runs one JavaScript expression in the controlled tab once **Allow User Scripts** is on. A script can run for up to 30 seconds and return up to 1,000,000 characters of JSON. |
|
|
46
86
|
| browser_extract_fb_groups | Unsupported | Unavailable in extension mode. |
|
|
47
87
|
| browser_extract_fb_posts | Unsupported | Unavailable in extension mode. |
|
|
48
88
|
| browser_extract_ig_feed | Unsupported | Unavailable in extension mode. |
|
|
@@ -79,6 +119,6 @@ Page interactions operate on the top document. Some controls require manual inpu
|
|
|
79
119
|
| browser_session | Supported | Lists, opens or claims tabs according to the current access mode. |
|
|
80
120
|
| browser_snapshot | Partial | Lists semantic elements in the top document. |
|
|
81
121
|
| browser_type | Partial | Works with standard controls in the top document. |
|
|
82
|
-
| browser_upload | Partial |
|
|
83
|
-
| browser_wait | Partial |
|
|
122
|
+
| browser_upload | Partial | Attaches up to four staged files, up to 50 MiB total. The input’s `accept` filter applies to every file. The result lists each selected file’s name, MIME type and byte size. Check the page for upload progress. |
|
|
123
|
+
| browser_wait | Partial | Waits for an element in the top document, a fixed time, or the `load` and `networkidle` page states. `domcontentloaded` is unavailable. |
|
|
84
124
|
| browser_x_compose_state | Unsupported | Unavailable in extension mode. |
|
package/lib/data-home-files.js
CHANGED
|
@@ -4,7 +4,7 @@ import { join, resolve } from 'node:path';
|
|
|
4
4
|
|
|
5
5
|
// Sorted depth-first traversal, with no open directory handles or recursive
|
|
6
6
|
// calls. A caller can stop after the first file. Never descend through a link.
|
|
7
|
-
export function* walkDataHomeTree(root) {
|
|
7
|
+
export function* walkDataHomeTree(root, { descend = null } = {}) {
|
|
8
8
|
const pending = [{ directory: resolve(root), names: [''].values() }];
|
|
9
9
|
while (pending.length) {
|
|
10
10
|
const { directory, names } = pending.at(-1);
|
|
@@ -17,7 +17,9 @@ export function* walkDataHomeTree(root) {
|
|
|
17
17
|
const stat = lstatSync(path, { throwIfNoEntry: false });
|
|
18
18
|
if (!stat) continue;
|
|
19
19
|
yield { path, stat };
|
|
20
|
-
|
|
20
|
+
// `descend(path)` false: a folder whose every file the caller leaves out is not read at all (a backup's walk
|
|
21
|
+
// used to list 108,000 files of working folders only to drop each of them).
|
|
22
|
+
if (stat.isDirectory() && (!descend || path === resolve(root) || descend(path))) {
|
|
21
23
|
try {
|
|
22
24
|
pending.push({ directory: path, names: readdirSync(path).sort().values() });
|
|
23
25
|
} catch (error) {
|
|
@@ -190,7 +190,7 @@ export async function protectFirstLaunchAfterUpdate({
|
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
192
|
// The snapshot exists and is verified. Pruning older ones is housekeeping.
|
|
193
|
-
try { service.applyBackupRetention({ folderPath }); } catch (error) {
|
|
193
|
+
try { await service.applyBackupRetention({ folderPath }); } catch (error) {
|
|
194
194
|
warn(`Could not prune older upgrade snapshots: ${error.message}`);
|
|
195
195
|
}
|
|
196
196
|
}
|
|
@@ -243,6 +243,12 @@ export function describeSnapshotFailure({ error, dataHome, version, previousVers
|
|
|
243
243
|
const goBack = previousVersion
|
|
244
244
|
? `Or go back to the version you had: npm i -g synabun@${previousVersion}`
|
|
245
245
|
: 'Or, if you just updated, go back to the version you had: npm i -g synabun@<that version>';
|
|
246
|
+
// Backup encryption is on and its key file cannot be used: the snapshot is not written in plain instead, and the
|
|
247
|
+
// server (with Settings, where a new password is set) is not there yet. The way on is the one file, by hand.
|
|
248
|
+
const keyFile = error?.code === 'BACKUP_ENC_KEY_UNREADABLE' ? resolve(dataHome, 'data', 'backup-encryption.json') : null;
|
|
249
|
+
const toContinue = keyFile
|
|
250
|
+
? `To continue: backup encryption is on, but its key file cannot be used, and SynaBun does not write this snapshot unencrypted instead. Move that one file somewhere else (${keyFile}), run "synabun" again, then set a new backup password in Settings → Memory & backups → Backups. Until you do, new backups are not encrypted. Backups you already have are not affected: each opens with its own password.`
|
|
251
|
+
: `To continue: free disk space or fix the permissions of the snapshot folder, then run "synabun" again.`;
|
|
246
252
|
return {
|
|
247
253
|
headline: `SynaBun v${version} did not start: the snapshot that protects your data before this version runs on it for the first time could not be created.`,
|
|
248
254
|
lines: [
|
|
@@ -253,7 +259,7 @@ export function describeSnapshotFailure({ error, dataHome, version, previousVers
|
|
|
253
259
|
`The server was not started, so v${version} has not converted or deleted any of your memories or settings.`,
|
|
254
260
|
`Data home: ${dataHome}`,
|
|
255
261
|
`Snapshot folder: ${folder}`,
|
|
256
|
-
|
|
262
|
+
toContinue,
|
|
257
263
|
goBack,
|
|
258
264
|
'Run "synabun doctor" to inspect the data home.',
|
|
259
265
|
],
|
package/lib/release-npm-ci.mjs
CHANGED
|
@@ -61,6 +61,28 @@ export async function registryVersion(version, { fetchImpl = fetch, allowMissing
|
|
|
61
61
|
return pkg.dist.integrity;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
// npm accepts an upload and can answer 404 for that version for a while (2.4.2: about 25 minutes).
|
|
65
|
+
export const REGISTRY_WAIT_MINUTES = 60;
|
|
66
|
+
/** After an accepted upload: ask until the registry serves the version. Only "not there yet" (404) is waited for. */
|
|
67
|
+
export async function awaitRegistryVersion(version, { lookup = registryVersion, timeoutMs = REGISTRY_WAIT_MINUTES * 60000, intervalMs = 30000,
|
|
68
|
+
now = Date.now, sleep = ms => new Promise(resolve => setTimeout(resolve, ms)), log = console.log } = {}) {
|
|
69
|
+
const started = now();
|
|
70
|
+
for (;;) {
|
|
71
|
+
const integrity = await lookup(version, { allowMissing: true }); // Any other answer, or none, ends the wait with its error.
|
|
72
|
+
if (integrity) return integrity;
|
|
73
|
+
const waited = now() - started;
|
|
74
|
+
if (waited >= timeoutMs) throw new Error(`the registry did not serve synabun@${version} within ${Math.round(timeoutMs / 60000)} minutes; look at https://registry.npmjs.org/synabun/${version} later`);
|
|
75
|
+
log(`npm accepted synabun@${version}; the registry does not serve it yet (${Math.floor(waited / 60000)} of ${Math.round(timeoutMs / 60000)} minutes waited)`);
|
|
76
|
+
await sleep(Math.min(intervalMs, timeoutMs - waited));
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/** The receipt of an upload npm accepted. Whatever stops it, the error says the upload happened: it is never done again. */
|
|
80
|
+
export async function receiptAfterUpload({ out, identity, wait = awaitRegistryVersion, receipt = publicationReceipt }) {
|
|
81
|
+
try { return await receipt({ out, identity, registry: version => wait(version) }); } catch (error) {
|
|
82
|
+
throw new Error(`npm ACCEPTED the upload of synabun@${identity.version}: do NOT publish, dispatch or re-run it again (the version is taken). No receipt was written: ${error.message}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
64
86
|
export async function sha512(path) {
|
|
65
87
|
const hash = createHash('sha512');
|
|
66
88
|
for await (const bytes of createReadStream(path)) hash.update(bytes);
|
|
@@ -132,7 +154,7 @@ if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1]
|
|
|
132
154
|
const run = (args, options) => runNpm(args, { ...options, env });
|
|
133
155
|
verifyToolchain(process.version, run(['--version'], { capture: true }));
|
|
134
156
|
await publishNpm({ cwd: process.cwd(), out, run, publishPacked: true, provenance: true });
|
|
135
|
-
await
|
|
157
|
+
await receiptAfterUpload({ out, identity });
|
|
136
158
|
} else throw new Error('Use identity or publish');
|
|
137
159
|
} catch (error) { console.error(error.message); process.exitCode = 1; }
|
|
138
160
|
}
|
package/lib/update-snapshot.js
CHANGED
|
@@ -55,7 +55,14 @@ export const autoBackupConfigPathFor = (dataHome) => resolve(dataHome, 'data', '
|
|
|
55
55
|
|
|
56
56
|
const VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
|
|
57
57
|
const INSTALL_ID = /^[A-Za-z0-9_-]{6,64}$/;
|
|
58
|
-
|
|
58
|
+
// Plain (.zip) or, while the owner has backup encryption on, encrypted (.zip.enc: neural-interface/lib/backup-crypto.js).
|
|
59
|
+
const SNAPSHOT_NAME = /^synabun-pre-update-[\dT:.\-Z]+\.zip(?:\.enc)?$/;
|
|
60
|
+
|
|
61
|
+
/** Removes a snapshot and the record an encrypted one keeps beside it (backup-service.js backupInfoPath). */
|
|
62
|
+
function removeSnapshotFile(path) {
|
|
63
|
+
rmSync(path, { force: true });
|
|
64
|
+
rmSync(`${path}.info.json`, { force: true });
|
|
65
|
+
}
|
|
59
66
|
|
|
60
67
|
/** Default kept pre-update snapshots when nothing configures a count: the one just written only. */
|
|
61
68
|
export const DEFAULT_PRE_UPDATE_KEEP = 1;
|
|
@@ -85,7 +92,7 @@ export function prunePreUpdateSnapshots({
|
|
|
85
92
|
folderPath,
|
|
86
93
|
keep = DEFAULT_PRE_UPDATE_KEEP,
|
|
87
94
|
keepPath = null,
|
|
88
|
-
remove =
|
|
95
|
+
remove = removeSnapshotFile,
|
|
89
96
|
listDir = () => readdirSync(folderPath),
|
|
90
97
|
statFile = statSync,
|
|
91
98
|
log = () => {},
|
|
@@ -223,7 +230,7 @@ export async function runUpdateSnapshot({
|
|
|
223
230
|
let stale = null;
|
|
224
231
|
if (discard && discard !== reuse && removable(discard)) {
|
|
225
232
|
say({ type: 'progress', phase: 'stale', reason: 'the app said it is no longer exact' });
|
|
226
|
-
try {
|
|
233
|
+
try { removeSnapshotFile(discard); } catch { /* left for retention */ }
|
|
227
234
|
}
|
|
228
235
|
if (reuse) {
|
|
229
236
|
// The copy made ahead, compared with the data as it is now.
|
|
@@ -239,7 +246,7 @@ export async function runUpdateSnapshot({
|
|
|
239
246
|
// A snapshot of an earlier moment: its room goes to the new one (it is never a user's file: the name and the
|
|
240
247
|
// folder are SynaBun's own).
|
|
241
248
|
if (removable(reuse)) {
|
|
242
|
-
try {
|
|
249
|
+
try { removeSnapshotFile(reuse); } catch { /* left for retention */ }
|
|
243
250
|
}
|
|
244
251
|
}
|
|
245
252
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;GAcG;AAGH,OAAgB,EAAE,KAAK,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAC;AAU7D,OAAO,EAA0C,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEvH,OAAO,EAAqB,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAwCvF,mGAAmG;AACnG,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC;IACxE;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC;IAC9D;;;;;;;;;;;;;;OAcG;IACH,YAAY,CAAC,EAAE;QAAE,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;QAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,C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E,KAAK,CAAC,GAAG,MAAM,GAAG,IAAI,CAE/E;AAuBD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAKlI;AAED,0HAA0H;AAC1H,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAIvF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAGnE;AAOD,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC;;;;GAIG;AACH,wBAAsB,UAAU,kBAU/B;AAWD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,gBAAqB,GAAG,MAAM,CAgJtE"}
|
package/mcp-server/dist/http.js
CHANGED
|
@@ -18,7 +18,7 @@ import { randomUUID } from 'node:crypto';
|
|
|
18
18
|
import express from 'express';
|
|
19
19
|
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
20
20
|
import { isInitializeRequest } from '@modelcontextprotocol/sdk/types.js';
|
|
21
|
-
import { ensureDatabase } from './services/sqlite.js';
|
|
21
|
+
import { ensureDatabase, memoryStoreStatus } from './services/sqlite.js';
|
|
22
22
|
import { initCategoryCache } from './services/categories.js';
|
|
23
23
|
import { warmupEmbeddings } from './services/local-embeddings.js';
|
|
24
24
|
import { createMcpServer, refreshServerSchemas, onSchemaRefresh, setServerRole, setServerCapabilities, setServerSelection, httpDefaultSelection, getServerToolRuntime, } from './index.js';
|
|
@@ -278,6 +278,15 @@ export async function ensureInit() {
|
|
|
278
278
|
initPromise = null;
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
+
let lastInitFailure = '';
|
|
282
|
+
/** Say once why the store or the categories could not be set up (every request tries again and would say it again). */
|
|
283
|
+
function noteInitFailure(error) {
|
|
284
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
285
|
+
if (message === lastInitFailure)
|
|
286
|
+
return;
|
|
287
|
+
lastInitFailure = message;
|
|
288
|
+
console.error('[SynaBun] MCP endpoint: the memory store is not available:', message);
|
|
289
|
+
}
|
|
281
290
|
/**
|
|
282
291
|
* Create Express routes for the MCP HTTP endpoint.
|
|
283
292
|
* Auth is handled externally (URL-embedded key in server.js).
|
|
@@ -291,7 +300,21 @@ export function createMcpRoutes(options = {}) {
|
|
|
291
300
|
const router = express.Router();
|
|
292
301
|
router.use(express.json());
|
|
293
302
|
router.post('/', async (req, res) => {
|
|
294
|
-
|
|
303
|
+
// A request never waits for a migration of the memory store: `initialize` and the tool list are answered at
|
|
304
|
+
// once, and a memory tool waits for the store itself, then says that it is migrating (index.ts whenStoreReady).
|
|
305
|
+
// A store that cannot be opened (a needed migration without room for its copy) does not take the endpoint down
|
|
306
|
+
// either: the request is served, and a memory tool answers with the reason (sqlite.ts getDb).
|
|
307
|
+
const init = ensureInit();
|
|
308
|
+
if (memoryStoreStatus().state === 'migrating')
|
|
309
|
+
init.catch(() => { });
|
|
310
|
+
else {
|
|
311
|
+
try {
|
|
312
|
+
await init;
|
|
313
|
+
}
|
|
314
|
+
catch (error) {
|
|
315
|
+
noteInitFailure(error);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
295
318
|
try {
|
|
296
319
|
const sid = req.get('mcp-session-id') || undefined;
|
|
297
320
|
// Existing client session — route to its transport.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,OAAsC,MAAM,SAAS,CAAC;AAC7D,O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AAC,CAAC;QAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAsCpE,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EAAE,KAAK,QAAQ,EAAE,KAAK,aAAa,EACzD,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAuE9E,iHAAiH;AACjH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAsCpE,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EAAE,KAAK,QAAQ,EAAE,KAAK,aAAa,EACzD,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAuE9E,iHAAiH;AACjH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C;AAuBD,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,GAAE,WAAiD;;;;;;EAiD1G;AA+BD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,QAK9C;AAKD,MAAM,WAAW,sBAAsB;IACrC,iGAAiG;IACjG,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,+FAA+F;IAC/F,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAAC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/mcp-server/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { buildServerInstructionsText } from './services/server-instructions.js';
|
|
|
4
4
|
import { isBrowserV2Enabled, teamContext } from './services/neural-interface.js';
|
|
5
5
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
6
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
7
|
-
import { ensureDatabase, closeDatabase, reopenDatabase } from './services/sqlite.js';
|
|
7
|
+
import { ensureDatabase, closeDatabase, reopenDatabase, memoryStoreStatus, memoryStoreAvailable, memoryMigratingMessage } from './services/sqlite.js';
|
|
8
8
|
import { rememberDescription, handleRemember, buildRememberSchema } from './tools/remember.js';
|
|
9
9
|
import { recallDescription, handleRecall, buildRecallSchema } from './tools/recall.js';
|
|
10
10
|
import { forgetSchema, forgetDescription, handleForget } from './tools/forget.js';
|
|
@@ -107,6 +107,23 @@ const GROUP_REGISTRARS = Object.freeze({
|
|
|
107
107
|
export function registeredGroupIds() {
|
|
108
108
|
return Object.keys(GROUP_REGISTRARS);
|
|
109
109
|
}
|
|
110
|
+
/** How long a memory tool waits for a migration of the store before it answers that the store is migrating. */
|
|
111
|
+
const MEMORY_TOOL_MIGRATION_WAIT_MS = 20_000;
|
|
112
|
+
/**
|
|
113
|
+
* A memory tool while the store is being copied and migrated in the background (sqlite.ts ensureDatabase): it waits
|
|
114
|
+
* for the migration, and when that takes longer than a client should be kept waiting it answers with the state by
|
|
115
|
+
* name instead of an error from half-way through. The handler itself never runs against a store that is migrating,
|
|
116
|
+
* and never starts the copy on this thread: a store that is still closed because its migration could not be made is
|
|
117
|
+
* tried again on the worker (memoryStoreAvailable), and the handler's own getDb() then says why it cannot be opened.
|
|
118
|
+
*/
|
|
119
|
+
function whenStoreReady(handler) {
|
|
120
|
+
return (async (...args) => {
|
|
121
|
+
if (!(await memoryStoreAvailable(MEMORY_TOOL_MIGRATION_WAIT_MS))) {
|
|
122
|
+
return { content: [{ type: 'text', text: memoryMigratingMessage() }], isError: true };
|
|
123
|
+
}
|
|
124
|
+
return handler(...args);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
110
127
|
// Register ALL tools on a given McpServer instance.
|
|
111
128
|
// All groups are always registered; the runtime enables or disables them.
|
|
112
129
|
export function registerTools(server, runtime = new ToolRuntime(readInitialTools())) {
|
|
@@ -114,16 +131,16 @@ export function registerTools(server, runtime = new ToolRuntime(readInitialTools
|
|
|
114
131
|
// Core memory tools — always registered and always enabled
|
|
115
132
|
// Use build*Schema() instead of module-level constants so HTTP transport
|
|
116
133
|
// sessions always read current display-settings.json when constructed.
|
|
117
|
-
const rememberTool = server.tool('remember', rememberDescription, buildRememberSchema(), handleRemember);
|
|
118
|
-
const recallTool = server.tool('recall', recallDescription, buildRecallSchema(), handleRecall);
|
|
119
|
-
const forgetTool = server.tool('forget', forgetDescription, forgetSchema, handleForget);
|
|
120
|
-
const restoreTool = server.tool('restore', restoreDescription, restoreSchema, handleRestore);
|
|
121
|
-
const reflectTool = server.tool('reflect', reflectDescription, buildReflectSchema(), handleReflect);
|
|
122
|
-
const memoriesTool = server.tool('memories', memoriesDescription, buildMemoriesSchema(), handleMemories);
|
|
134
|
+
const rememberTool = server.tool('remember', rememberDescription, buildRememberSchema(), whenStoreReady(handleRemember));
|
|
135
|
+
const recallTool = server.tool('recall', recallDescription, buildRecallSchema(), whenStoreReady(handleRecall));
|
|
136
|
+
const forgetTool = server.tool('forget', forgetDescription, forgetSchema, whenStoreReady(handleForget));
|
|
137
|
+
const restoreTool = server.tool('restore', restoreDescription, restoreSchema, whenStoreReady(handleRestore));
|
|
138
|
+
const reflectTool = server.tool('reflect', reflectDescription, buildReflectSchema(), whenStoreReady(handleReflect));
|
|
139
|
+
const memoriesTool = server.tool('memories', memoriesDescription, buildMemoriesSchema(), whenStoreReady(handleMemories));
|
|
123
140
|
const ungrouped = [
|
|
124
141
|
rememberTool, recallTool, forgetTool, restoreTool, reflectTool, memoriesTool,
|
|
125
|
-
server.tool('category', categoryDescription, categorySchema, handleCategory),
|
|
126
|
-
server.tool('sync', syncDescription, syncSchema, handleSync),
|
|
142
|
+
server.tool('category', categoryDescription, categorySchema, whenStoreReady(handleCategory)),
|
|
143
|
+
server.tool('sync', syncDescription, syncSchema, whenStoreReady(handleSync)),
|
|
127
144
|
server.tool('loop', loopDescription, loopSchema, handleLoop),
|
|
128
145
|
server.tool('tool_groups', toolGroupsDescription, toolGroupsSchema, (args) => handleToolGroups(runtime, args)),
|
|
129
146
|
server.tool('choice', choiceDescription, choiceSchema, (args) => handleChoice(server, args)),
|
|
@@ -376,15 +393,42 @@ async function main() {
|
|
|
376
393
|
}
|
|
377
394
|
logCodexConfigNoticeOnce();
|
|
378
395
|
}
|
|
379
|
-
|
|
380
|
-
|
|
396
|
+
// Open the store. When this build has a migration for a populated store, its safety copy and the migration run on
|
|
397
|
+
// a worker thread (sqlite.ts ensureDatabase) and are NOT waited for here: on a large database the copy takes longer
|
|
398
|
+
// than MCP clients wait for `initialize`, and a client that gives up stops this process in the middle of it
|
|
399
|
+
// (2026-11-21: 12 of 13 servers, each leaving a partial copy). The transport below connects first; memory tools
|
|
400
|
+
// wait for the store (whenStoreReady) and maintenance starts when it is there.
|
|
401
|
+
const storeReady = ensureDatabase().then(() => {
|
|
381
402
|
startMemoryMaintenance();
|
|
382
|
-
|
|
383
|
-
catch
|
|
403
|
+
return true;
|
|
404
|
+
}).catch((err) => {
|
|
384
405
|
console.error('Warning: Could not initialize SQLite database on startup.', err instanceof Error ? err.message : err);
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
406
|
+
return false;
|
|
407
|
+
});
|
|
408
|
+
const migrating = memoryStoreStatus().state === 'migrating';
|
|
409
|
+
if (!migrating)
|
|
410
|
+
await storeReady;
|
|
411
|
+
// Initialize category cache (loads from SQLite or starts empty). Only a missing cache file is read from SQLite.
|
|
412
|
+
// During a migration that waits for the store too, together with the watcher below: the watcher writes an empty
|
|
413
|
+
// cache file when there is none, and that write goes through to SQLite as "there are no categories", so it must
|
|
414
|
+
// never run before the cache was seeded from the store. The schemas are refreshed once the categories are known.
|
|
415
|
+
const categoriesFromStore = migrating && !existsSync(join(config.dataDir, 'custom-categories.json'));
|
|
416
|
+
if (!categoriesFromStore)
|
|
417
|
+
await initCategoryCache();
|
|
418
|
+
else
|
|
419
|
+
void storeReady.then(async (opened) => {
|
|
420
|
+
if (!opened)
|
|
421
|
+
return;
|
|
422
|
+
try {
|
|
423
|
+
await initCategoryCache();
|
|
424
|
+
startWatchingCategories();
|
|
425
|
+
refreshCategorySchemas();
|
|
426
|
+
await server.server.notification({ method: 'notifications/tools/list_changed' });
|
|
427
|
+
}
|
|
428
|
+
catch (err) {
|
|
429
|
+
console.error('[SynaBun] categories were not loaded after the memory migration:', err instanceof Error ? err.message : err);
|
|
430
|
+
}
|
|
431
|
+
});
|
|
388
432
|
// Set up file watcher for external category changes
|
|
389
433
|
setOnExternalChange(() => {
|
|
390
434
|
console.error('Categories changed externally, refreshing schemas...');
|
|
@@ -396,7 +440,8 @@ async function main() {
|
|
|
396
440
|
console.error('Failed to send tools/list_changed notification:', err);
|
|
397
441
|
});
|
|
398
442
|
});
|
|
399
|
-
|
|
443
|
+
if (!categoriesFromStore)
|
|
444
|
+
startWatchingCategories();
|
|
400
445
|
// Watch .env for SQLITE_DB_PATH changes (e.g. from onboarding or settings)
|
|
401
446
|
const envPath = getEnvPath();
|
|
402
447
|
let envWatcher = null;
|