superbased 2.0.9 → 3.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +15 -26
- package/README.md +198 -290
- package/bin/superbased.js +7 -0
- package/package.json +42 -140
- package/SUPERBASED_SKILL.md +0 -1660
- package/dist/electron/ai/ai-client.d.ts +0 -45
- package/dist/electron/ai/ai-client.d.ts.map +0 -1
- package/dist/electron/ai/ai-client.js +0 -205
- package/dist/electron/ai/ai-client.js.map +0 -1
- package/dist/electron/ai/context-builder.d.ts +0 -8
- package/dist/electron/ai/context-builder.d.ts.map +0 -1
- package/dist/electron/ai/context-builder.js +0 -28
- package/dist/electron/ai/context-builder.js.map +0 -1
- package/dist/electron/ai/instruction-parser.d.ts +0 -11
- package/dist/electron/ai/instruction-parser.d.ts.map +0 -1
- package/dist/electron/ai/instruction-parser.js +0 -47
- package/dist/electron/ai/instruction-parser.js.map +0 -1
- package/dist/electron/ai/orchestrator.d.ts +0 -17
- package/dist/electron/ai/orchestrator.d.ts.map +0 -1
- package/dist/electron/ai/orchestrator.js +0 -53
- package/dist/electron/ai/orchestrator.js.map +0 -1
- package/dist/electron/ai/providers/anthropic.d.ts +0 -6
- package/dist/electron/ai/providers/anthropic.d.ts.map +0 -1
- package/dist/electron/ai/providers/anthropic.js +0 -67
- package/dist/electron/ai/providers/anthropic.js.map +0 -1
- package/dist/electron/ai/providers/azure-openai.d.ts +0 -12
- package/dist/electron/ai/providers/azure-openai.d.ts.map +0 -1
- package/dist/electron/ai/providers/azure-openai.js +0 -87
- package/dist/electron/ai/providers/azure-openai.js.map +0 -1
- package/dist/electron/ai/providers/gemini.d.ts +0 -6
- package/dist/electron/ai/providers/gemini.d.ts.map +0 -1
- package/dist/electron/ai/providers/gemini.js +0 -49
- package/dist/electron/ai/providers/gemini.js.map +0 -1
- package/dist/electron/ai/providers/openai.d.ts +0 -6
- package/dist/electron/ai/providers/openai.d.ts.map +0 -1
- package/dist/electron/ai/providers/openai.js +0 -68
- package/dist/electron/ai/providers/openai.js.map +0 -1
- package/dist/electron/core/auth-store.d.ts +0 -15
- package/dist/electron/core/auth-store.d.ts.map +0 -1
- package/dist/electron/core/auth-store.js +0 -86
- package/dist/electron/core/auth-store.js.map +0 -1
- package/dist/electron/core/config.d.ts +0 -6
- package/dist/electron/core/config.d.ts.map +0 -1
- package/dist/electron/core/config.js +0 -81
- package/dist/electron/core/config.js.map +0 -1
- package/dist/electron/core/file-logger.d.ts +0 -17
- package/dist/electron/core/file-logger.d.ts.map +0 -1
- package/dist/electron/core/file-logger.js +0 -74
- package/dist/electron/core/file-logger.js.map +0 -1
- package/dist/electron/core/input-injection/index.d.ts +0 -6
- package/dist/electron/core/input-injection/index.d.ts.map +0 -1
- package/dist/electron/core/input-injection/index.js +0 -31
- package/dist/electron/core/input-injection/index.js.map +0 -1
- package/dist/electron/core/input-injection/macos.d.ts +0 -3
- package/dist/electron/core/input-injection/macos.d.ts.map +0 -1
- package/dist/electron/core/input-injection/macos.js +0 -14
- package/dist/electron/core/input-injection/macos.js.map +0 -1
- package/dist/electron/core/input-injection/windows.d.ts +0 -3
- package/dist/electron/core/input-injection/windows.d.ts.map +0 -1
- package/dist/electron/core/input-injection/windows.js +0 -119
- package/dist/electron/core/input-injection/windows.js.map +0 -1
- package/dist/electron/core/json-store.d.ts +0 -26
- package/dist/electron/core/json-store.d.ts.map +0 -1
- package/dist/electron/core/json-store.js +0 -132
- package/dist/electron/core/json-store.js.map +0 -1
- package/dist/electron/core/paths.d.ts +0 -17
- package/dist/electron/core/paths.d.ts.map +0 -1
- package/dist/electron/core/paths.js +0 -117
- package/dist/electron/core/paths.js.map +0 -1
- package/dist/electron/core/platform.d.ts +0 -24
- package/dist/electron/core/platform.d.ts.map +0 -1
- package/dist/electron/core/platform.js +0 -18
- package/dist/electron/core/platform.js.map +0 -1
- package/dist/electron/core/process-coord.d.ts +0 -19
- package/dist/electron/core/process-coord.d.ts.map +0 -1
- package/dist/electron/core/process-coord.js +0 -124
- package/dist/electron/core/process-coord.js.map +0 -1
- package/dist/electron/core/serialize-schema.d.ts +0 -35
- package/dist/electron/core/serialize-schema.d.ts.map +0 -1
- package/dist/electron/core/serialize-schema.js +0 -89
- package/dist/electron/core/serialize-schema.js.map +0 -1
- package/dist/electron/core/settings-schema.d.ts +0 -81
- package/dist/electron/core/settings-schema.d.ts.map +0 -1
- package/dist/electron/core/settings-schema.js +0 -1370
- package/dist/electron/core/settings-schema.js.map +0 -1
- package/dist/electron/db/database.d.ts +0 -154
- package/dist/electron/db/database.d.ts.map +0 -1
- package/dist/electron/db/database.js +0 -637
- package/dist/electron/db/database.js.map +0 -1
- package/dist/electron/db/models.d.ts +0 -26
- package/dist/electron/db/models.d.ts.map +0 -1
- package/dist/electron/db/models.js +0 -4
- package/dist/electron/db/models.js.map +0 -1
- package/dist/electron/logger.d.ts +0 -9
- package/dist/electron/logger.d.ts.map +0 -1
- package/dist/electron/logger.js +0 -32
- package/dist/electron/logger.js.map +0 -1
- package/dist/electron/main.js +0 -3652
- package/dist/electron/modules/accessibility/macos-provider.d.ts +0 -8
- package/dist/electron/modules/accessibility/macos-provider.d.ts.map +0 -1
- package/dist/electron/modules/accessibility/macos-provider.js +0 -94
- package/dist/electron/modules/accessibility/macos-provider.js.map +0 -1
- package/dist/electron/modules/accessibility/provider.d.ts +0 -12
- package/dist/electron/modules/accessibility/provider.d.ts.map +0 -1
- package/dist/electron/modules/accessibility/provider.js +0 -52
- package/dist/electron/modules/accessibility/provider.js.map +0 -1
- package/dist/electron/modules/accessibility/types.d.ts +0 -63
- package/dist/electron/modules/accessibility/types.d.ts.map +0 -1
- package/dist/electron/modules/accessibility/types.js +0 -6
- package/dist/electron/modules/accessibility/types.js.map +0 -1
- package/dist/electron/modules/accessibility/windows-provider.d.ts +0 -8
- package/dist/electron/modules/accessibility/windows-provider.d.ts.map +0 -1
- package/dist/electron/modules/accessibility/windows-provider.js +0 -85
- package/dist/electron/modules/accessibility/windows-provider.js.map +0 -1
- package/dist/electron/modules/active-window.d.ts +0 -6
- package/dist/electron/modules/active-window.d.ts.map +0 -1
- package/dist/electron/modules/active-window.js +0 -76
- package/dist/electron/modules/active-window.js.map +0 -1
- package/dist/electron/modules/api-server.d.ts +0 -11
- package/dist/electron/modules/api-server.d.ts.map +0 -1
- package/dist/electron/modules/api-server.js +0 -2759
- package/dist/electron/modules/api-server.js.map +0 -1
- package/dist/electron/modules/auth.d.ts +0 -42
- package/dist/electron/modules/auth.d.ts.map +0 -1
- package/dist/electron/modules/auth.js +0 -193
- package/dist/electron/modules/auth.js.map +0 -1
- package/dist/electron/modules/azure-speech-realtime.d.ts +0 -48
- package/dist/electron/modules/azure-speech-realtime.d.ts.map +0 -1
- package/dist/electron/modules/azure-speech-realtime.js +0 -543
- package/dist/electron/modules/azure-speech-realtime.js.map +0 -1
- package/dist/electron/modules/capture-modes.d.ts +0 -19
- package/dist/electron/modules/capture-modes.d.ts.map +0 -1
- package/dist/electron/modules/capture-modes.js +0 -100
- package/dist/electron/modules/capture-modes.js.map +0 -1
- package/dist/electron/modules/capture.d.ts +0 -24
- package/dist/electron/modules/capture.d.ts.map +0 -1
- package/dist/electron/modules/capture.js +0 -191
- package/dist/electron/modules/capture.js.map +0 -1
- package/dist/electron/modules/clipboard.d.ts +0 -6
- package/dist/electron/modules/clipboard.d.ts.map +0 -1
- package/dist/electron/modules/clipboard.js +0 -26
- package/dist/electron/modules/clipboard.js.map +0 -1
- package/dist/electron/modules/color-picker.d.ts +0 -4
- package/dist/electron/modules/color-picker.d.ts.map +0 -1
- package/dist/electron/modules/color-picker.js +0 -233
- package/dist/electron/modules/color-picker.js.map +0 -1
- package/dist/electron/modules/compose-screenshots.d.ts +0 -8
- package/dist/electron/modules/compose-screenshots.d.ts.map +0 -1
- package/dist/electron/modules/compose-screenshots.js +0 -86
- package/dist/electron/modules/compose-screenshots.js.map +0 -1
- package/dist/electron/modules/context-menu-detect.d.ts +0 -47
- package/dist/electron/modules/context-menu-detect.d.ts.map +0 -1
- package/dist/electron/modules/context-menu-detect.js +0 -272
- package/dist/electron/modules/context-menu-detect.js.map +0 -1
- package/dist/electron/modules/dictation.d.ts +0 -27
- package/dist/electron/modules/dictation.d.ts.map +0 -1
- package/dist/electron/modules/dictation.js +0 -1231
- package/dist/electron/modules/dictation.js.map +0 -1
- package/dist/electron/modules/error-reporter.d.ts +0 -7
- package/dist/electron/modules/error-reporter.d.ts.map +0 -1
- package/dist/electron/modules/error-reporter.js +0 -65
- package/dist/electron/modules/error-reporter.js.map +0 -1
- package/dist/electron/modules/gif-util.d.ts +0 -9
- package/dist/electron/modules/gif-util.d.ts.map +0 -1
- package/dist/electron/modules/gif-util.js +0 -63
- package/dist/electron/modules/gif-util.js.map +0 -1
- package/dist/electron/modules/gui-automation-errors.d.ts +0 -11
- package/dist/electron/modules/gui-automation-errors.d.ts.map +0 -1
- package/dist/electron/modules/gui-automation-errors.js +0 -79
- package/dist/electron/modules/gui-automation-errors.js.map +0 -1
- package/dist/electron/modules/gui-automation-telemetry.d.ts +0 -38
- package/dist/electron/modules/gui-automation-telemetry.d.ts.map +0 -1
- package/dist/electron/modules/gui-automation-telemetry.js +0 -200
- package/dist/electron/modules/gui-automation-telemetry.js.map +0 -1
- package/dist/electron/modules/gui-automation.d.ts +0 -1143
- package/dist/electron/modules/gui-automation.d.ts.map +0 -1
- package/dist/electron/modules/gui-automation.js +0 -8769
- package/dist/electron/modules/gui-automation.js.map +0 -1
- package/dist/electron/modules/hotkeys.d.ts +0 -5
- package/dist/electron/modules/hotkeys.d.ts.map +0 -1
- package/dist/electron/modules/hotkeys.js +0 -64
- package/dist/electron/modules/hotkeys.js.map +0 -1
- package/dist/electron/modules/human-input/index.d.ts +0 -35
- package/dist/electron/modules/human-input/index.d.ts.map +0 -1
- package/dist/electron/modules/human-input/index.js +0 -163
- package/dist/electron/modules/human-input/index.js.map +0 -1
- package/dist/electron/modules/human-input/keyboard/timing.d.ts +0 -38
- package/dist/electron/modules/human-input/keyboard/timing.d.ts.map +0 -1
- package/dist/electron/modules/human-input/keyboard/timing.js +0 -57
- package/dist/electron/modules/human-input/keyboard/timing.js.map +0 -1
- package/dist/electron/modules/human-input/mouse/path.d.ts +0 -24
- package/dist/electron/modules/human-input/mouse/path.d.ts.map +0 -1
- package/dist/electron/modules/human-input/mouse/path.js +0 -80
- package/dist/electron/modules/human-input/mouse/path.js.map +0 -1
- package/dist/electron/modules/human-input/mouse/velocity.d.ts +0 -48
- package/dist/electron/modules/human-input/mouse/velocity.d.ts.map +0 -1
- package/dist/electron/modules/human-input/mouse/velocity.js +0 -93
- package/dist/electron/modules/human-input/mouse/velocity.js.map +0 -1
- package/dist/electron/modules/human-input/profiles.d.ts +0 -90
- package/dist/electron/modules/human-input/profiles.d.ts.map +0 -1
- package/dist/electron/modules/human-input/profiles.js +0 -124
- package/dist/electron/modules/human-input/profiles.js.map +0 -1
- package/dist/electron/modules/human-input/rng.d.ts +0 -16
- package/dist/electron/modules/human-input/rng.d.ts.map +0 -1
- package/dist/electron/modules/human-input/rng.js +0 -101
- package/dist/electron/modules/human-input/rng.js.map +0 -1
- package/dist/electron/modules/human-input/salt.d.ts +0 -15
- package/dist/electron/modules/human-input/salt.d.ts.map +0 -1
- package/dist/electron/modules/human-input/salt.js +0 -48
- package/dist/electron/modules/human-input/salt.js.map +0 -1
- package/dist/electron/modules/image-utils.d.ts +0 -20
- package/dist/electron/modules/image-utils.d.ts.map +0 -1
- package/dist/electron/modules/image-utils.js +0 -80
- package/dist/electron/modules/image-utils.js.map +0 -1
- package/dist/electron/modules/keystroke.d.ts +0 -7
- package/dist/electron/modules/keystroke.d.ts.map +0 -1
- package/dist/electron/modules/keystroke.js +0 -53
- package/dist/electron/modules/keystroke.js.map +0 -1
- package/dist/electron/modules/license.d.ts +0 -25
- package/dist/electron/modules/license.d.ts.map +0 -1
- package/dist/electron/modules/license.js +0 -175
- package/dist/electron/modules/license.js.map +0 -1
- package/dist/electron/modules/mcp-config.d.ts +0 -16
- package/dist/electron/modules/mcp-config.d.ts.map +0 -1
- package/dist/electron/modules/mcp-config.js +0 -146
- package/dist/electron/modules/mcp-config.js.map +0 -1
- package/dist/electron/modules/ocr.d.ts +0 -3
- package/dist/electron/modules/ocr.d.ts.map +0 -1
- package/dist/electron/modules/ocr.js +0 -188
- package/dist/electron/modules/ocr.js.map +0 -1
- package/dist/electron/modules/ollama/capability.d.ts +0 -32
- package/dist/electron/modules/ollama/capability.d.ts.map +0 -1
- package/dist/electron/modules/ollama/capability.js +0 -117
- package/dist/electron/modules/ollama/capability.js.map +0 -1
- package/dist/electron/modules/ollama/client.d.ts +0 -14
- package/dist/electron/modules/ollama/client.d.ts.map +0 -1
- package/dist/electron/modules/ollama/client.js +0 -134
- package/dist/electron/modules/ollama/client.js.map +0 -1
- package/dist/electron/modules/ollama/detector.d.ts +0 -29
- package/dist/electron/modules/ollama/detector.d.ts.map +0 -1
- package/dist/electron/modules/ollama/detector.js +0 -177
- package/dist/electron/modules/ollama/detector.js.map +0 -1
- package/dist/electron/modules/ollama/dispatcher.d.ts +0 -36
- package/dist/electron/modules/ollama/dispatcher.d.ts.map +0 -1
- package/dist/electron/modules/ollama/dispatcher.js +0 -97
- package/dist/electron/modules/ollama/dispatcher.js.map +0 -1
- package/dist/electron/modules/ollama/router.d.ts +0 -51
- package/dist/electron/modules/ollama/router.d.ts.map +0 -1
- package/dist/electron/modules/ollama/router.js +0 -201
- package/dist/electron/modules/ollama/router.js.map +0 -1
- package/dist/electron/modules/pin-window.d.ts +0 -3
- package/dist/electron/modules/pin-window.d.ts.map +0 -1
- package/dist/electron/modules/pin-window.js +0 -64
- package/dist/electron/modules/pin-window.js.map +0 -1
- package/dist/electron/modules/platform/dpi.d.ts +0 -2
- package/dist/electron/modules/platform/dpi.d.ts.map +0 -1
- package/dist/electron/modules/platform/dpi.js +0 -48
- package/dist/electron/modules/platform/dpi.js.map +0 -1
- package/dist/electron/modules/platform/errors.d.ts +0 -13
- package/dist/electron/modules/platform/errors.d.ts.map +0 -1
- package/dist/electron/modules/platform/errors.js +0 -36
- package/dist/electron/modules/platform/errors.js.map +0 -1
- package/dist/electron/modules/platform/index.d.ts +0 -24
- package/dist/electron/modules/platform/index.d.ts.map +0 -1
- package/dist/electron/modules/platform/index.js +0 -133
- package/dist/electron/modules/platform/index.js.map +0 -1
- package/dist/electron/modules/platform/interfaces.d.ts +0 -140
- package/dist/electron/modules/platform/interfaces.d.ts.map +0 -1
- package/dist/electron/modules/platform/interfaces.js +0 -14
- package/dist/electron/modules/platform/interfaces.js.map +0 -1
- package/dist/electron/modules/platform/macos/ax.d.ts +0 -15
- package/dist/electron/modules/platform/macos/ax.d.ts.map +0 -1
- package/dist/electron/modules/platform/macos/ax.js +0 -222
- package/dist/electron/modules/platform/macos/ax.js.map +0 -1
- package/dist/electron/modules/platform/macos/capture.d.ts +0 -14
- package/dist/electron/modules/platform/macos/capture.d.ts.map +0 -1
- package/dist/electron/modules/platform/macos/capture.js +0 -106
- package/dist/electron/modules/platform/macos/capture.js.map +0 -1
- package/dist/electron/modules/platform/macos/input.d.ts +0 -16
- package/dist/electron/modules/platform/macos/input.d.ts.map +0 -1
- package/dist/electron/modules/platform/macos/input.js +0 -342
- package/dist/electron/modules/platform/macos/input.js.map +0 -1
- package/dist/electron/modules/platform/macos/launch.d.ts +0 -10
- package/dist/electron/modules/platform/macos/launch.d.ts.map +0 -1
- package/dist/electron/modules/platform/macos/launch.js +0 -114
- package/dist/electron/modules/platform/macos/launch.js.map +0 -1
- package/dist/electron/modules/platform/macos/session.d.ts +0 -8
- package/dist/electron/modules/platform/macos/session.d.ts.map +0 -1
- package/dist/electron/modules/platform/macos/session.js +0 -17
- package/dist/electron/modules/platform/macos/session.js.map +0 -1
- package/dist/electron/modules/platform/macos/window.d.ts +0 -31
- package/dist/electron/modules/platform/macos/window.d.ts.map +0 -1
- package/dist/electron/modules/platform/macos/window.js +0 -271
- package/dist/electron/modules/platform/macos/window.js.map +0 -1
- package/dist/electron/modules/platform/shared.d.ts +0 -10
- package/dist/electron/modules/platform/shared.d.ts.map +0 -1
- package/dist/electron/modules/platform/shared.js +0 -201
- package/dist/electron/modules/platform/shared.js.map +0 -1
- package/dist/electron/modules/platform/types.d.ts +0 -182
- package/dist/electron/modules/platform/types.d.ts.map +0 -1
- package/dist/electron/modules/platform/types.js +0 -24
- package/dist/electron/modules/platform/types.js.map +0 -1
- package/dist/electron/modules/platform/windows/ax.d.ts +0 -15
- package/dist/electron/modules/platform/windows/ax.d.ts.map +0 -1
- package/dist/electron/modules/platform/windows/ax.js +0 -277
- package/dist/electron/modules/platform/windows/ax.js.map +0 -1
- package/dist/electron/modules/platform/windows/capture.d.ts +0 -14
- package/dist/electron/modules/platform/windows/capture.d.ts.map +0 -1
- package/dist/electron/modules/platform/windows/capture.js +0 -115
- package/dist/electron/modules/platform/windows/capture.js.map +0 -1
- package/dist/electron/modules/platform/windows/input.d.ts +0 -17
- package/dist/electron/modules/platform/windows/input.d.ts.map +0 -1
- package/dist/electron/modules/platform/windows/input.js +0 -422
- package/dist/electron/modules/platform/windows/input.js.map +0 -1
- package/dist/electron/modules/platform/windows/launch.d.ts +0 -10
- package/dist/electron/modules/platform/windows/launch.d.ts.map +0 -1
- package/dist/electron/modules/platform/windows/launch.js +0 -185
- package/dist/electron/modules/platform/windows/launch.js.map +0 -1
- package/dist/electron/modules/platform/windows/session.d.ts +0 -8
- package/dist/electron/modules/platform/windows/session.d.ts.map +0 -1
- package/dist/electron/modules/platform/windows/session.js +0 -87
- package/dist/electron/modules/platform/windows/session.js.map +0 -1
- package/dist/electron/modules/platform/windows/tray.d.ts +0 -13
- package/dist/electron/modules/platform/windows/tray.d.ts.map +0 -1
- package/dist/electron/modules/platform/windows/tray.js +0 -390
- package/dist/electron/modules/platform/windows/tray.js.map +0 -1
- package/dist/electron/modules/platform/windows/window.d.ts +0 -30
- package/dist/electron/modules/platform/windows/window.d.ts.map +0 -1
- package/dist/electron/modules/platform/windows/window.js +0 -444
- package/dist/electron/modules/platform/windows/window.js.map +0 -1
- package/dist/electron/modules/recording/ai-analysis.d.ts +0 -8
- package/dist/electron/modules/recording/ai-analysis.d.ts.map +0 -1
- package/dist/electron/modules/recording/ai-analysis.js +0 -88
- package/dist/electron/modules/recording/ai-analysis.js.map +0 -1
- package/dist/electron/modules/recording/capture-queue.d.ts +0 -48
- package/dist/electron/modules/recording/capture-queue.d.ts.map +0 -1
- package/dist/electron/modules/recording/capture-queue.js +0 -409
- package/dist/electron/modules/recording/capture-queue.js.map +0 -1
- package/dist/electron/modules/recording/cli.d.ts +0 -13
- package/dist/electron/modules/recording/cli.d.ts.map +0 -1
- package/dist/electron/modules/recording/cli.js +0 -135
- package/dist/electron/modules/recording/cli.js.map +0 -1
- package/dist/electron/modules/recording/http-api.d.ts +0 -3
- package/dist/electron/modules/recording/http-api.d.ts.map +0 -1
- package/dist/electron/modules/recording/http-api.js +0 -236
- package/dist/electron/modules/recording/http-api.js.map +0 -1
- package/dist/electron/modules/recording/index.d.ts +0 -15
- package/dist/electron/modules/recording/index.d.ts.map +0 -1
- package/dist/electron/modules/recording/index.js +0 -154
- package/dist/electron/modules/recording/index.js.map +0 -1
- package/dist/electron/modules/recording/input-hook-provider.d.ts +0 -15
- package/dist/electron/modules/recording/input-hook-provider.d.ts.map +0 -1
- package/dist/electron/modules/recording/input-hook-provider.js +0 -5
- package/dist/electron/modules/recording/input-hook-provider.js.map +0 -1
- package/dist/electron/modules/recording/mcp-tool.d.ts +0 -13
- package/dist/electron/modules/recording/mcp-tool.d.ts.map +0 -1
- package/dist/electron/modules/recording/mcp-tool.js +0 -81
- package/dist/electron/modules/recording/mcp-tool.js.map +0 -1
- package/dist/electron/modules/recording/monitor-analyzer.d.ts +0 -40
- package/dist/electron/modules/recording/monitor-analyzer.d.ts.map +0 -1
- package/dist/electron/modules/recording/monitor-analyzer.js +0 -220
- package/dist/electron/modules/recording/monitor-analyzer.js.map +0 -1
- package/dist/electron/modules/recording/providers/change-detect-provider.d.ts +0 -28
- package/dist/electron/modules/recording/providers/change-detect-provider.d.ts.map +0 -1
- package/dist/electron/modules/recording/providers/change-detect-provider.js +0 -181
- package/dist/electron/modules/recording/providers/change-detect-provider.js.map +0 -1
- package/dist/electron/modules/recording/providers/change-detect-shared-wrapper.d.ts +0 -15
- package/dist/electron/modules/recording/providers/change-detect-shared-wrapper.d.ts.map +0 -1
- package/dist/electron/modules/recording/providers/change-detect-shared-wrapper.js +0 -62
- package/dist/electron/modules/recording/providers/change-detect-shared-wrapper.js.map +0 -1
- package/dist/electron/modules/recording/providers/periodic-provider.d.ts +0 -15
- package/dist/electron/modules/recording/providers/periodic-provider.d.ts.map +0 -1
- package/dist/electron/modules/recording/providers/periodic-provider.js +0 -55
- package/dist/electron/modules/recording/providers/periodic-provider.js.map +0 -1
- package/dist/electron/modules/recording/providers/provider-factory.d.ts +0 -15
- package/dist/electron/modules/recording/providers/provider-factory.d.ts.map +0 -1
- package/dist/electron/modules/recording/providers/provider-factory.js +0 -97
- package/dist/electron/modules/recording/providers/provider-factory.js.map +0 -1
- package/dist/electron/modules/recording/providers/uiohook-provider.d.ts +0 -19
- package/dist/electron/modules/recording/providers/uiohook-provider.d.ts.map +0 -1
- package/dist/electron/modules/recording/providers/uiohook-provider.js +0 -267
- package/dist/electron/modules/recording/providers/uiohook-provider.js.map +0 -1
- package/dist/electron/modules/recording/recording-session.d.ts +0 -29
- package/dist/electron/modules/recording/recording-session.d.ts.map +0 -1
- package/dist/electron/modules/recording/recording-session.js +0 -389
- package/dist/electron/modules/recording/recording-session.js.map +0 -1
- package/dist/electron/modules/recording/session-alignment.d.ts +0 -32
- package/dist/electron/modules/recording/session-alignment.d.ts.map +0 -1
- package/dist/electron/modules/recording/session-alignment.js +0 -103
- package/dist/electron/modules/recording/session-alignment.js.map +0 -1
- package/dist/electron/modules/recording/session-export.d.ts +0 -2
- package/dist/electron/modules/recording/session-export.d.ts.map +0 -1
- package/dist/electron/modules/recording/session-export.js +0 -287
- package/dist/electron/modules/recording/session-export.js.map +0 -1
- package/dist/electron/modules/recording/trigger-engine.d.ts +0 -62
- package/dist/electron/modules/recording/trigger-engine.d.ts.map +0 -1
- package/dist/electron/modules/recording/trigger-engine.js +0 -553
- package/dist/electron/modules/recording/trigger-engine.js.map +0 -1
- package/dist/electron/modules/recording/visual-diff.d.ts +0 -17
- package/dist/electron/modules/recording/visual-diff.d.ts.map +0 -1
- package/dist/electron/modules/recording/visual-diff.js +0 -109
- package/dist/electron/modules/recording/visual-diff.js.map +0 -1
- package/dist/electron/modules/redact.d.ts +0 -34
- package/dist/electron/modules/redact.d.ts.map +0 -1
- package/dist/electron/modules/redact.js +0 -583
- package/dist/electron/modules/redact.js.map +0 -1
- package/dist/electron/modules/scroll-calibration.d.ts +0 -152
- package/dist/electron/modules/scroll-calibration.d.ts.map +0 -1
- package/dist/electron/modules/scroll-calibration.js +0 -271
- package/dist/electron/modules/scroll-calibration.js.map +0 -1
- package/dist/electron/modules/scroll-capture.d.ts +0 -21
- package/dist/electron/modules/scroll-capture.d.ts.map +0 -1
- package/dist/electron/modules/scroll-capture.js +0 -134
- package/dist/electron/modules/scroll-capture.js.map +0 -1
- package/dist/electron/modules/sequence-locate.d.ts +0 -126
- package/dist/electron/modules/sequence-locate.d.ts.map +0 -1
- package/dist/electron/modules/sequence-locate.js +0 -356
- package/dist/electron/modules/sequence-locate.js.map +0 -1
- package/dist/electron/modules/store.d.ts +0 -18
- package/dist/electron/modules/store.d.ts.map +0 -1
- package/dist/electron/modules/store.js +0 -126
- package/dist/electron/modules/store.js.map +0 -1
- package/dist/electron/modules/stt/capability-probe.d.ts +0 -67
- package/dist/electron/modules/stt/capability-probe.d.ts.map +0 -1
- package/dist/electron/modules/stt/capability-probe.js +0 -331
- package/dist/electron/modules/stt/capability-probe.js.map +0 -1
- package/dist/electron/modules/stt/macos-engine.d.ts +0 -20
- package/dist/electron/modules/stt/macos-engine.d.ts.map +0 -1
- package/dist/electron/modules/stt/macos-engine.js +0 -259
- package/dist/electron/modules/stt/macos-engine.js.map +0 -1
- package/dist/electron/modules/stt/model-manager.d.ts +0 -87
- package/dist/electron/modules/stt/model-manager.d.ts.map +0 -1
- package/dist/electron/modules/stt/model-manager.js +0 -321
- package/dist/electron/modules/stt/model-manager.js.map +0 -1
- package/dist/electron/modules/stt/router.d.ts +0 -35
- package/dist/electron/modules/stt/router.d.ts.map +0 -1
- package/dist/electron/modules/stt/router.js +0 -263
- package/dist/electron/modules/stt/router.js.map +0 -1
- package/dist/electron/modules/stt/sherpa-engine.d.ts +0 -43
- package/dist/electron/modules/stt/sherpa-engine.d.ts.map +0 -1
- package/dist/electron/modules/stt/sherpa-engine.js +0 -521
- package/dist/electron/modules/stt/sherpa-engine.js.map +0 -1
- package/dist/electron/modules/stt/types.d.ts +0 -72
- package/dist/electron/modules/stt/types.d.ts.map +0 -1
- package/dist/electron/modules/stt/types.js +0 -16
- package/dist/electron/modules/stt/types.js.map +0 -1
- package/dist/electron/modules/stt/winrt-engine.d.ts +0 -20
- package/dist/electron/modules/stt/winrt-engine.d.ts.map +0 -1
- package/dist/electron/modules/stt/winrt-engine.js +0 -238
- package/dist/electron/modules/stt/winrt-engine.js.map +0 -1
- package/dist/electron/modules/tce/content-analyzer.d.ts +0 -20
- package/dist/electron/modules/tce/content-analyzer.d.ts.map +0 -1
- package/dist/electron/modules/tce/content-analyzer.js +0 -123
- package/dist/electron/modules/tce/content-analyzer.js.map +0 -1
- package/dist/electron/modules/tce/index.d.ts +0 -54
- package/dist/electron/modules/tce/index.d.ts.map +0 -1
- package/dist/electron/modules/tce/index.js +0 -174
- package/dist/electron/modules/tce/index.js.map +0 -1
- package/dist/electron/modules/tce/layout-engine.d.ts +0 -68
- package/dist/electron/modules/tce/layout-engine.d.ts.map +0 -1
- package/dist/electron/modules/tce/layout-engine.js +0 -313
- package/dist/electron/modules/tce/layout-engine.js.map +0 -1
- package/dist/electron/modules/tce/renderer.d.ts +0 -16
- package/dist/electron/modules/tce/renderer.d.ts.map +0 -1
- package/dist/electron/modules/tce/renderer.js +0 -196
- package/dist/electron/modules/tce/renderer.js.map +0 -1
- package/dist/electron/modules/tce/themes.d.ts +0 -14
- package/dist/electron/modules/tce/themes.d.ts.map +0 -1
- package/dist/electron/modules/tce/themes.js +0 -68
- package/dist/electron/modules/tce/themes.js.map +0 -1
- package/dist/electron/modules/tce/token-estimator.d.ts +0 -30
- package/dist/electron/modules/tce/token-estimator.d.ts.map +0 -1
- package/dist/electron/modules/tce/token-estimator.js +0 -59
- package/dist/electron/modules/tce/token-estimator.js.map +0 -1
- package/dist/electron/modules/telemetry.d.ts +0 -44
- package/dist/electron/modules/telemetry.d.ts.map +0 -1
- package/dist/electron/modules/telemetry.js +0 -316
- package/dist/electron/modules/telemetry.js.map +0 -1
- package/dist/electron/modules/template-match.d.ts +0 -62
- package/dist/electron/modules/template-match.d.ts.map +0 -1
- package/dist/electron/modules/template-match.js +0 -205
- package/dist/electron/modules/template-match.js.map +0 -1
- package/dist/electron/modules/tray.d.ts +0 -24
- package/dist/electron/modules/tray.d.ts.map +0 -1
- package/dist/electron/modules/tray.js +0 -349
- package/dist/electron/modules/tray.js.map +0 -1
- package/dist/electron/modules/uiohook-manager.d.ts +0 -19
- package/dist/electron/modules/uiohook-manager.d.ts.map +0 -1
- package/dist/electron/modules/uiohook-manager.js +0 -101
- package/dist/electron/modules/uiohook-manager.js.map +0 -1
- package/dist/electron/modules/undo-stack.d.ts +0 -22
- package/dist/electron/modules/undo-stack.d.ts.map +0 -1
- package/dist/electron/modules/undo-stack.js +0 -41
- package/dist/electron/modules/undo-stack.js.map +0 -1
- package/dist/electron/modules/updater.d.ts +0 -14
- package/dist/electron/modules/updater.d.ts.map +0 -1
- package/dist/electron/modules/updater.js +0 -102
- package/dist/electron/modules/updater.js.map +0 -1
- package/dist/electron/modules/usage-link.d.ts +0 -7
- package/dist/electron/modules/usage-link.d.ts.map +0 -1
- package/dist/electron/modules/usage-link.js +0 -63
- package/dist/electron/modules/usage-link.js.map +0 -1
- package/dist/electron/modules/version-check.d.ts +0 -3
- package/dist/electron/modules/version-check.d.ts.map +0 -1
- package/dist/electron/modules/version-check.js +0 -76
- package/dist/electron/modules/version-check.js.map +0 -1
- package/dist/electron/modules/watchers/active-window-watcher.d.ts +0 -5
- package/dist/electron/modules/watchers/active-window-watcher.d.ts.map +0 -1
- package/dist/electron/modules/watchers/active-window-watcher.js +0 -152
- package/dist/electron/modules/watchers/active-window-watcher.js.map +0 -1
- package/dist/electron/modules/watchers/clipboard-watcher.d.ts +0 -5
- package/dist/electron/modules/watchers/clipboard-watcher.d.ts.map +0 -1
- package/dist/electron/modules/watchers/clipboard-watcher.js +0 -90
- package/dist/electron/modules/watchers/clipboard-watcher.js.map +0 -1
- package/dist/electron/modules/watchers/file-watcher.d.ts +0 -5
- package/dist/electron/modules/watchers/file-watcher.d.ts.map +0 -1
- package/dist/electron/modules/watchers/file-watcher.js +0 -91
- package/dist/electron/modules/watchers/file-watcher.js.map +0 -1
- package/dist/electron/modules/watchers/registry.d.ts +0 -34
- package/dist/electron/modules/watchers/registry.d.ts.map +0 -1
- package/dist/electron/modules/watchers/registry.js +0 -108
- package/dist/electron/modules/watchers/registry.js.map +0 -1
- package/dist/electron/modules/watchers/screen-region-service.d.ts +0 -18
- package/dist/electron/modules/watchers/screen-region-service.d.ts.map +0 -1
- package/dist/electron/modules/watchers/screen-region-service.js +0 -126
- package/dist/electron/modules/watchers/screen-region-service.js.map +0 -1
- package/dist/electron/modules/watchers/screen-region-watcher.d.ts +0 -6
- package/dist/electron/modules/watchers/screen-region-watcher.d.ts.map +0 -1
- package/dist/electron/modules/watchers/screen-region-watcher.js +0 -70
- package/dist/electron/modules/watchers/screen-region-watcher.js.map +0 -1
- package/dist/electron/modules/window-activate.d.ts +0 -103
- package/dist/electron/modules/window-activate.d.ts.map +0 -1
- package/dist/electron/modules/window-activate.js +0 -630
- package/dist/electron/modules/window-activate.js.map +0 -1
- package/dist/electron/modules/window-input.d.ts +0 -43
- package/dist/electron/modules/window-input.d.ts.map +0 -1
- package/dist/electron/modules/window-input.js +0 -623
- package/dist/electron/modules/window-input.js.map +0 -1
- package/dist/electron/modules/window-picker.d.ts +0 -6
- package/dist/electron/modules/window-picker.d.ts.map +0 -1
- package/dist/electron/modules/window-picker.js +0 -192
- package/dist/electron/modules/window-picker.js.map +0 -1
- package/dist/electron/modules/window-resolver.d.ts +0 -35
- package/dist/electron/modules/window-resolver.d.ts.map +0 -1
- package/dist/electron/modules/window-resolver.js +0 -210
- package/dist/electron/modules/window-resolver.js.map +0 -1
- package/dist/headless/electron/ai/ai-client.js +0 -204
- package/dist/headless/electron/ai/context-builder.js +0 -27
- package/dist/headless/electron/ai/instruction-parser.js +0 -46
- package/dist/headless/electron/core/auth-store.js +0 -85
- package/dist/headless/electron/core/config.js +0 -80
- package/dist/headless/electron/core/file-logger.js +0 -73
- package/dist/headless/electron/core/input-injection/index.js +0 -30
- package/dist/headless/electron/core/input-injection/macos.js +0 -13
- package/dist/headless/electron/core/input-injection/windows.js +0 -118
- package/dist/headless/electron/core/json-store.js +0 -131
- package/dist/headless/electron/core/paths.js +0 -116
- package/dist/headless/electron/core/platform.js +0 -17
- package/dist/headless/electron/core/process-coord.js +0 -123
- package/dist/headless/electron/core/serialize-schema.js +0 -88
- package/dist/headless/electron/core/settings-schema.js +0 -1369
- package/dist/headless/electron/db/database.js +0 -636
- package/dist/headless/electron/db/models.js +0 -3
- package/dist/headless/electron/logger.js +0 -31
- package/dist/headless/electron/modules/accessibility/macos-provider.js +0 -93
- package/dist/headless/electron/modules/accessibility/provider.js +0 -51
- package/dist/headless/electron/modules/accessibility/types.js +0 -5
- package/dist/headless/electron/modules/accessibility/windows-provider.js +0 -84
- package/dist/headless/electron/modules/active-window.js +0 -75
- package/dist/headless/electron/modules/api-server.js +0 -2758
- package/dist/headless/electron/modules/auth.js +0 -192
- package/dist/headless/electron/modules/azure-speech-realtime.js +0 -542
- package/dist/headless/electron/modules/capture.js +0 -190
- package/dist/headless/electron/modules/clipboard.js +0 -25
- package/dist/headless/electron/modules/context-menu-detect.js +0 -271
- package/dist/headless/electron/modules/dictation.js +0 -1230
- package/dist/headless/electron/modules/gui-automation-errors.js +0 -78
- package/dist/headless/electron/modules/gui-automation-telemetry.js +0 -199
- package/dist/headless/electron/modules/gui-automation.js +0 -8768
- package/dist/headless/electron/modules/human-input/keyboard/timing.js +0 -56
- package/dist/headless/electron/modules/human-input/mouse/path.js +0 -79
- package/dist/headless/electron/modules/human-input/mouse/velocity.js +0 -92
- package/dist/headless/electron/modules/human-input/profiles.js +0 -123
- package/dist/headless/electron/modules/human-input/rng.js +0 -100
- package/dist/headless/electron/modules/human-input/salt.js +0 -47
- package/dist/headless/electron/modules/image-utils.js +0 -79
- package/dist/headless/electron/modules/keystroke.js +0 -52
- package/dist/headless/electron/modules/license.js +0 -174
- package/dist/headless/electron/modules/mcp-config.js +0 -145
- package/dist/headless/electron/modules/ocr.js +0 -187
- package/dist/headless/electron/modules/ollama/capability.js +0 -116
- package/dist/headless/electron/modules/ollama/client.js +0 -133
- package/dist/headless/electron/modules/ollama/detector.js +0 -176
- package/dist/headless/electron/modules/ollama/dispatcher.js +0 -96
- package/dist/headless/electron/modules/ollama/router.js +0 -200
- package/dist/headless/electron/modules/platform/dpi.js +0 -47
- package/dist/headless/electron/modules/platform/errors.js +0 -35
- package/dist/headless/electron/modules/platform/index.js +0 -132
- package/dist/headless/electron/modules/platform/interfaces.js +0 -13
- package/dist/headless/electron/modules/platform/macos/ax.js +0 -221
- package/dist/headless/electron/modules/platform/macos/capture.js +0 -105
- package/dist/headless/electron/modules/platform/macos/input.js +0 -341
- package/dist/headless/electron/modules/platform/macos/launch.js +0 -113
- package/dist/headless/electron/modules/platform/macos/session.js +0 -16
- package/dist/headless/electron/modules/platform/macos/window.js +0 -270
- package/dist/headless/electron/modules/platform/shared.js +0 -200
- package/dist/headless/electron/modules/platform/types.js +0 -23
- package/dist/headless/electron/modules/platform/windows/ax.js +0 -276
- package/dist/headless/electron/modules/platform/windows/capture.js +0 -114
- package/dist/headless/electron/modules/platform/windows/input.js +0 -421
- package/dist/headless/electron/modules/platform/windows/launch.js +0 -184
- package/dist/headless/electron/modules/platform/windows/session.js +0 -86
- package/dist/headless/electron/modules/platform/windows/tray.js +0 -389
- package/dist/headless/electron/modules/platform/windows/window.js +0 -443
- package/dist/headless/electron/modules/recording/ai-analysis.js +0 -87
- package/dist/headless/electron/modules/recording/capture-queue.js +0 -408
- package/dist/headless/electron/modules/recording/cli.js +0 -134
- package/dist/headless/electron/modules/recording/http-api.js +0 -235
- package/dist/headless/electron/modules/recording/index.js +0 -153
- package/dist/headless/electron/modules/recording/input-hook-provider.js +0 -4
- package/dist/headless/electron/modules/recording/mcp-tool.js +0 -80
- package/dist/headless/electron/modules/recording/monitor-analyzer.js +0 -219
- package/dist/headless/electron/modules/recording/providers/change-detect-provider.js +0 -180
- package/dist/headless/electron/modules/recording/providers/change-detect-shared-wrapper.js +0 -61
- package/dist/headless/electron/modules/recording/providers/periodic-provider.js +0 -54
- package/dist/headless/electron/modules/recording/providers/provider-factory.js +0 -96
- package/dist/headless/electron/modules/recording/providers/uiohook-provider.js +0 -266
- package/dist/headless/electron/modules/recording/recording-session.js +0 -388
- package/dist/headless/electron/modules/recording/session-alignment.js +0 -102
- package/dist/headless/electron/modules/recording/session-export.js +0 -286
- package/dist/headless/electron/modules/recording/trigger-engine.js +0 -552
- package/dist/headless/electron/modules/recording/visual-diff.js +0 -108
- package/dist/headless/electron/modules/redact.js +0 -582
- package/dist/headless/electron/modules/scroll-calibration.js +0 -270
- package/dist/headless/electron/modules/sequence-locate.js +0 -355
- package/dist/headless/electron/modules/store.js +0 -125
- package/dist/headless/electron/modules/stt/capability-probe.js +0 -330
- package/dist/headless/electron/modules/stt/macos-engine.js +0 -258
- package/dist/headless/electron/modules/stt/model-manager.js +0 -320
- package/dist/headless/electron/modules/stt/router.js +0 -262
- package/dist/headless/electron/modules/stt/sherpa-engine.js +0 -520
- package/dist/headless/electron/modules/stt/types.js +0 -15
- package/dist/headless/electron/modules/stt/winrt-engine.js +0 -237
- package/dist/headless/electron/modules/tce/content-analyzer.js +0 -122
- package/dist/headless/electron/modules/tce/index.js +0 -173
- package/dist/headless/electron/modules/tce/layout-engine.js +0 -312
- package/dist/headless/electron/modules/tce/renderer.js +0 -195
- package/dist/headless/electron/modules/tce/themes.js +0 -67
- package/dist/headless/electron/modules/tce/token-estimator.js +0 -58
- package/dist/headless/electron/modules/telemetry.js +0 -315
- package/dist/headless/electron/modules/template-match.js +0 -204
- package/dist/headless/electron/modules/uiohook-manager.js +0 -100
- package/dist/headless/electron/modules/undo-stack.js +0 -40
- package/dist/headless/electron/modules/watchers/active-window-watcher.js +0 -151
- package/dist/headless/electron/modules/watchers/clipboard-watcher.js +0 -89
- package/dist/headless/electron/modules/watchers/file-watcher.js +0 -90
- package/dist/headless/electron/modules/watchers/registry.js +0 -107
- package/dist/headless/electron/modules/watchers/screen-region-service.js +0 -125
- package/dist/headless/electron/modules/watchers/screen-region-watcher.js +0 -69
- package/dist/headless/electron/modules/window-activate.js +0 -629
- package/dist/headless/electron/modules/window-input.js +0 -622
- package/dist/headless/electron/modules/window-resolver.js +0 -209
- package/dist/headless/headless/capture-hotkey.js +0 -155
- package/dist/headless/headless/cli-auth.js +0 -158
- package/dist/headless/headless/cli.js +0 -278
- package/dist/headless/headless/config-cmd.js +0 -306
- package/dist/headless/headless/dictation-hotkey.js +0 -525
- package/dist/headless/headless/dictation-overlay.js +0 -218
- package/dist/headless/headless/doctor.js +0 -599
- package/dist/headless/headless/mic-capture.js +0 -406
- package/dist/headless/headless/ollama-cmd.js +0 -211
- package/dist/headless/headless/platform-headless.js +0 -233
- package/dist/headless/headless/server.js +0 -195
- package/dist/headless/headless/stt-cmd.js +0 -213
- package/dist/headless/headless/tui/index.mjs +0 -7
- package/dist/headless/headless/tui/plain-dump.js +0 -41
- package/dist/headless/headless/tui/settings-app.mjs +0 -744
- package/dist/headless/headless/tui/setup-wizard.mjs +0 -257
- package/dist/headless/headless/tui-bridge.js +0 -80
- package/dist/headless/headless/win32-text-injector.js +0 -359
- package/dist/headless/mic-capture.d.ts +0 -49
- package/dist/headless/mic-capture.d.ts.map +0 -1
- package/dist/headless/mic-capture.js +0 -407
- package/dist/headless/mic-capture.js.map +0 -1
- package/dist/headless/shared/constants.js +0 -65
- package/dist/headless/shared/design-tokens.js +0 -189
- package/dist/headless/shared/recording-types.js +0 -93
- package/dist/headless/shared/types.js +0 -3
- package/dist/shared/constants.d.ts +0 -100
- package/dist/shared/constants.d.ts.map +0 -1
- package/dist/shared/constants.js +0 -66
- package/dist/shared/constants.js.map +0 -1
- package/dist/shared/design-tokens.d.ts +0 -112
- package/dist/shared/design-tokens.d.ts.map +0 -1
- package/dist/shared/design-tokens.js +0 -190
- package/dist/shared/design-tokens.js.map +0 -1
- package/dist/shared/recording-types.d.ts +0 -186
- package/dist/shared/recording-types.d.ts.map +0 -1
- package/dist/shared/recording-types.js +0 -94
- package/dist/shared/recording-types.js.map +0 -1
- package/dist/shared/types.d.ts +0 -143
- package/dist/shared/types.d.ts.map +0 -1
- package/dist/shared/types.js +0 -4
- package/dist/shared/types.js.map +0 -1
- package/mcp-server/dist/api-client.js +0 -521
- package/mcp-server/dist/index.js +0 -2550
- package/mcp-server/dist/project-sense.js +0 -161
- package/mcp-server/dist/tool-categories.js +0 -161
- package/mcp-server/package.json +0 -22
|
@@ -1,1369 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Settings schema — single source of truth for defaults, validation, and TUI/CLI rendering.
|
|
3
|
-
//
|
|
4
|
-
// Consumed by:
|
|
5
|
-
// - electron/core/json-store.ts (headless defaults)
|
|
6
|
-
// - electron/modules/store.ts (desktop electron-store defaults)
|
|
7
|
-
// - headless/config-cmd.ts (`superbased config` CLI)
|
|
8
|
-
// - headless/tui/* (`superbased settings` TUI — Phase 1.5b commit 2)
|
|
9
|
-
//
|
|
10
|
-
// Design rules (do not violate):
|
|
11
|
-
// 1. Known user values are preserved across schema changes — the schema supplies
|
|
12
|
-
// defaults for *missing* keys, it never overwrites existing values.
|
|
13
|
-
// 2. Unknown keys (not declared in the schema) are round-trip-preserved by the
|
|
14
|
-
// stores. The schema is additive metadata, not a closed enumeration.
|
|
15
|
-
// 3. Adding a field here must be strictly additive. Renaming or deleting a field
|
|
16
|
-
// requires a migration entry in the consuming store.
|
|
17
|
-
// 4. Platform defaults resolve at read-time via `platformDefaults`, so the JSON
|
|
18
|
-
// on disk stays portable across machines.
|
|
19
|
-
// 5. `exposed: false` fields are internal state (auth token, cached license,
|
|
20
|
-
// backfill counters) — persisted but not surfaced in the TUI or `config list`.
|
|
21
|
-
// 6. `exposed: 'ui-only'` fields (Phase 7.1) are persisted and surfaced in the
|
|
22
|
-
// desktop renderer only — skipped by TUI/CLI/MCP. Reserved for state with
|
|
23
|
-
// no meaning outside an Electron render process (window positions, tray
|
|
24
|
-
// badge counts, etc.). `exposed: 'all'` (or `true`, or `undefined`) is
|
|
25
|
-
// visible everywhere. `exposed: false` stays hidden from every consumer.
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.SECTIONS = void 0;
|
|
28
|
-
exports.getSchemaDefaults = getSchemaDefaults;
|
|
29
|
-
exports.getFieldByPath = getFieldByPath;
|
|
30
|
-
exports.getAllFields = getAllFields;
|
|
31
|
-
exports.isFieldVisibleTo = isFieldVisibleTo;
|
|
32
|
-
exports.getExposedFields = getExposedFields;
|
|
33
|
-
exports.validateValue = validateValue;
|
|
34
|
-
exports.getByPath = getByPath;
|
|
35
|
-
exports.setByPath = setByPath;
|
|
36
|
-
exports.deleteByPath = deleteByPath;
|
|
37
|
-
exports.deepMerge = deepMerge;
|
|
38
|
-
// ────────────────────────────────────────────────────────────────────────────
|
|
39
|
-
// Schema (declaration order drives TUI section list)
|
|
40
|
-
// ────────────────────────────────────────────────────────────────────────────
|
|
41
|
-
const DICTATION_MODIFIERS_DEFAULT = {
|
|
42
|
-
darwin: ['meta', 'alt'],
|
|
43
|
-
default: ['ctrl', 'alt'],
|
|
44
|
-
};
|
|
45
|
-
exports.SECTIONS = [
|
|
46
|
-
{
|
|
47
|
-
id: 'general',
|
|
48
|
-
label: 'General',
|
|
49
|
-
description: 'Appearance, shortcuts, and startup behaviour.',
|
|
50
|
-
fields: [
|
|
51
|
-
{
|
|
52
|
-
path: 'theme',
|
|
53
|
-
label: 'Theme',
|
|
54
|
-
description: 'Desktop UI colour scheme. Does not affect headless mode.',
|
|
55
|
-
type: 'select',
|
|
56
|
-
default: 'light',
|
|
57
|
-
choices: [
|
|
58
|
-
{ value: 'light', label: 'Light' },
|
|
59
|
-
{ value: 'dark', label: 'Dark' },
|
|
60
|
-
],
|
|
61
|
-
requiresRestart: true,
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
path: 'activationShortcut',
|
|
65
|
-
label: 'Capture shortcut',
|
|
66
|
-
description: 'Global hotkey to start a region capture.',
|
|
67
|
-
type: 'shortcut',
|
|
68
|
-
default: 'CommandOrControl+Shift+S',
|
|
69
|
-
requiresRestart: true,
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
path: 'multiSelectShortcut',
|
|
73
|
-
label: 'Multi-region capture shortcut',
|
|
74
|
-
description: 'Global hotkey for multi-region capture mode.',
|
|
75
|
-
type: 'shortcut',
|
|
76
|
-
default: 'CommandOrControl+Shift+D',
|
|
77
|
-
requiresRestart: true,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
path: 'screenshotFolder',
|
|
81
|
-
label: 'Screenshot folder',
|
|
82
|
-
description: 'Custom path for captured screenshots. Empty = data dir default.',
|
|
83
|
-
type: 'path',
|
|
84
|
-
default: '',
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
path: 'startOnBoot',
|
|
88
|
-
label: 'Launch on system startup',
|
|
89
|
-
description: 'Start SuperBased automatically when you log in.',
|
|
90
|
-
type: 'toggle',
|
|
91
|
-
default: false,
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
path: 'autoCleanupDays',
|
|
95
|
-
label: 'Auto-delete captures after (days)',
|
|
96
|
-
description: 'Automatically remove gallery captures older than this many days. 0 = never.',
|
|
97
|
-
type: 'number',
|
|
98
|
-
default: 0,
|
|
99
|
-
min: 0,
|
|
100
|
-
max: 3650,
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
path: 'onboardingComplete',
|
|
104
|
-
label: 'Onboarding complete',
|
|
105
|
-
description: 'Internal flag — tracks first-run wizard completion.',
|
|
106
|
-
type: 'toggle',
|
|
107
|
-
default: false,
|
|
108
|
-
exposed: false,
|
|
109
|
-
},
|
|
110
|
-
],
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
id: 'capture',
|
|
114
|
-
label: 'Capture & Overlay',
|
|
115
|
-
description: 'Behaviour of the capture overlay and magnifier.',
|
|
116
|
-
fields: [
|
|
117
|
-
{
|
|
118
|
-
path: 'showCrosshairs',
|
|
119
|
-
label: 'Show crosshairs',
|
|
120
|
-
description: 'Display crosshair guides during region selection.',
|
|
121
|
-
type: 'toggle',
|
|
122
|
-
default: true,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
path: 'showMagnifier',
|
|
126
|
-
label: 'Show magnifier',
|
|
127
|
-
description: 'Show pixel-level magnifier at the cursor during selection.',
|
|
128
|
-
type: 'toggle',
|
|
129
|
-
default: true,
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
path: 'autoCloseOverlay',
|
|
133
|
-
label: 'Auto-close overlay',
|
|
134
|
-
description: 'Close the capture overlay automatically after inactivity.',
|
|
135
|
-
type: 'toggle',
|
|
136
|
-
default: false,
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
path: 'autoCloseDelay',
|
|
140
|
-
label: 'Auto-close delay (ms)',
|
|
141
|
-
description: 'Delay before auto-closing the overlay.',
|
|
142
|
-
type: 'number',
|
|
143
|
-
default: 3000,
|
|
144
|
-
min: 500,
|
|
145
|
-
max: 60000,
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
path: 'lowQualityImages',
|
|
149
|
-
label: 'Low-quality images',
|
|
150
|
-
description: 'Send lower-resolution images to AI (saves tokens, reduces fidelity).',
|
|
151
|
-
type: 'toggle',
|
|
152
|
-
default: false,
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
path: 'autoCopy',
|
|
156
|
-
label: 'Auto-copy to clipboard',
|
|
157
|
-
description: 'Copy the captured image to the system clipboard immediately after capture.',
|
|
158
|
-
type: 'toggle',
|
|
159
|
-
default: false,
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
path: 'openEditorAfterCapture',
|
|
163
|
-
label: 'Open editor after capture',
|
|
164
|
-
description: 'After a single-region or scroll capture, open the screenshot editor so you can annotate immediately. Esc or right-click dismisses to the thumbnail gallery. Does not apply to multi-region, voice, or inline-edit captures.',
|
|
165
|
-
type: 'toggle',
|
|
166
|
-
default: true,
|
|
167
|
-
},
|
|
168
|
-
],
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
id: 'scroll-capture',
|
|
172
|
-
label: 'Scroll Capture',
|
|
173
|
-
description: 'Multi-frame scrolling capture settings.',
|
|
174
|
-
fields: [
|
|
175
|
-
{
|
|
176
|
-
path: 'scrollCapture.shortcut',
|
|
177
|
-
label: 'Shortcut',
|
|
178
|
-
description: 'Global hotkey to start a scroll capture.',
|
|
179
|
-
type: 'shortcut',
|
|
180
|
-
default: 'CommandOrControl+Shift+A',
|
|
181
|
-
requiresRestart: true,
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
path: 'scrollCapture.maxScreenshots',
|
|
185
|
-
label: 'Max screenshots',
|
|
186
|
-
description: 'Hard cap on frames per scroll capture.',
|
|
187
|
-
type: 'number',
|
|
188
|
-
default: 10,
|
|
189
|
-
min: 1,
|
|
190
|
-
max: 50,
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
path: 'scrollCapture.overlapPercent',
|
|
194
|
-
label: 'Overlap (%)',
|
|
195
|
-
description: 'Overlap between consecutive frames.',
|
|
196
|
-
type: 'number',
|
|
197
|
-
default: 15,
|
|
198
|
-
min: 0,
|
|
199
|
-
max: 50,
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
path: 'scrollCapture.scrollDelayMs',
|
|
203
|
-
label: 'Scroll delay (ms)',
|
|
204
|
-
description: 'Delay between scroll steps.',
|
|
205
|
-
type: 'number',
|
|
206
|
-
default: 600,
|
|
207
|
-
min: 100,
|
|
208
|
-
max: 5000,
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
path: 'scrollCapture.pixelsPerScroll',
|
|
212
|
-
label: 'Pixels per scroll (0 = auto)',
|
|
213
|
-
description: 'Manual scroll distance. 0 uses viewport-based auto.',
|
|
214
|
-
type: 'number',
|
|
215
|
-
default: 0,
|
|
216
|
-
min: 0,
|
|
217
|
-
max: 5000,
|
|
218
|
-
},
|
|
219
|
-
],
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
id: 'ai',
|
|
223
|
-
label: 'AI',
|
|
224
|
-
description: 'System prompt sent with every AI call.',
|
|
225
|
-
fields: [
|
|
226
|
-
{
|
|
227
|
-
path: 'systemPrompt',
|
|
228
|
-
label: 'System prompt',
|
|
229
|
-
description: 'Prepended to every `superbased_ai` call. Leave empty for default.',
|
|
230
|
-
type: 'text',
|
|
231
|
-
default: '',
|
|
232
|
-
},
|
|
233
|
-
],
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
id: 'dictation',
|
|
237
|
-
label: 'Dictation',
|
|
238
|
-
description: 'Push-to-talk voice dictation. Engine routing through native / sherpa / cloud.',
|
|
239
|
-
fields: [
|
|
240
|
-
{
|
|
241
|
-
path: 'dictationEnabled',
|
|
242
|
-
label: 'Enabled',
|
|
243
|
-
description: 'Master toggle for push-to-talk dictation.',
|
|
244
|
-
type: 'toggle',
|
|
245
|
-
default: true,
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
path: 'dictationSettings.engine',
|
|
249
|
-
label: 'STT engine',
|
|
250
|
-
description: 'Which speech-to-text engine to use. "auto" picks cloud when signed in, falls back to native (macOS Speech / Windows WinRT) or sherpa-onnx (cross-platform offline) when signed out. "cloud" requires sign-in. "native" / "sherpa" run entirely on-device.',
|
|
251
|
-
type: 'select',
|
|
252
|
-
default: 'auto',
|
|
253
|
-
choices: [
|
|
254
|
-
{ value: 'auto', label: 'Auto (cloud → native → sherpa)' },
|
|
255
|
-
{ value: 'cloud', label: 'Cloud (Whisper) — requires sign-in' },
|
|
256
|
-
{ value: 'native', label: 'Native (macOS Speech / Windows WinRT)' },
|
|
257
|
-
{ value: 'sherpa', label: 'Sherpa-onnx (offline)' },
|
|
258
|
-
],
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
path: 'dictationSettings.shortcutModifiers',
|
|
262
|
-
label: 'Push-to-talk modifiers',
|
|
263
|
-
description: 'Modifier keys held to start dictation (released to submit).',
|
|
264
|
-
type: 'multiselect',
|
|
265
|
-
platformDefaults: DICTATION_MODIFIERS_DEFAULT,
|
|
266
|
-
choices: [
|
|
267
|
-
{ value: 'ctrl', label: 'Ctrl' },
|
|
268
|
-
{ value: 'alt', label: 'Alt' },
|
|
269
|
-
{ value: 'shift', label: 'Shift' },
|
|
270
|
-
{ value: 'meta', label: 'Cmd/Win' },
|
|
271
|
-
],
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
path: 'dictationSettings.aiCleanup',
|
|
275
|
-
label: 'AI cleanup',
|
|
276
|
-
description: 'Run AI post-processing on transcribed text (requires sign-in).',
|
|
277
|
-
type: 'toggle',
|
|
278
|
-
default: false,
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
path: 'dictationSettings.soundFeedback',
|
|
282
|
-
label: 'Sound feedback',
|
|
283
|
-
description: 'Play a start/stop chime when dictation begins/ends.',
|
|
284
|
-
type: 'toggle',
|
|
285
|
-
default: true,
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
path: 'dictationSettings.maxDurationSeconds',
|
|
289
|
-
label: 'Max duration (s)',
|
|
290
|
-
description: 'Cut off recording after this many seconds.',
|
|
291
|
-
type: 'number',
|
|
292
|
-
default: 120,
|
|
293
|
-
min: 10,
|
|
294
|
-
max: 600,
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
path: 'dictationSettings.excludedApps',
|
|
298
|
-
label: 'Excluded apps',
|
|
299
|
-
description: 'Dictation is disabled when these apps are focused (substring match).',
|
|
300
|
-
type: 'list',
|
|
301
|
-
default: [],
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
path: 'dictationSettings.language',
|
|
305
|
-
label: 'Language',
|
|
306
|
-
description: 'BCP-47 language tag, or empty to auto-detect.',
|
|
307
|
-
type: 'text',
|
|
308
|
-
default: '',
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
path: 'dictationSettings.pasteMethod',
|
|
312
|
-
label: 'Paste method',
|
|
313
|
-
description: 'How transcribed text is inserted into the focused field.',
|
|
314
|
-
type: 'select',
|
|
315
|
-
default: 'clipboard',
|
|
316
|
-
choices: [
|
|
317
|
-
{ value: 'clipboard', label: 'Clipboard (Ctrl+V)' },
|
|
318
|
-
{ value: 'shift-insert', label: 'Shift+Insert' },
|
|
319
|
-
{ value: 'type-chars', label: 'Type characters' },
|
|
320
|
-
],
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
path: 'dictationSettings.endSilenceMs',
|
|
324
|
-
label: 'End silence (ms)',
|
|
325
|
-
description: 'Trailing silence before finalising the utterance.',
|
|
326
|
-
type: 'number',
|
|
327
|
-
default: 5000,
|
|
328
|
-
min: 500,
|
|
329
|
-
max: 30000,
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
path: 'dictationSettings.initialSilenceMs',
|
|
333
|
-
label: 'Initial silence (ms)',
|
|
334
|
-
description: 'Silence window before the first word must appear.',
|
|
335
|
-
type: 'number',
|
|
336
|
-
default: 500,
|
|
337
|
-
min: 100,
|
|
338
|
-
max: 10000,
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
path: 'dictationSettings.segmentationSilenceMs',
|
|
342
|
-
label: 'Segmentation silence (ms)',
|
|
343
|
-
description: 'Silence window that splits utterances into segments.',
|
|
344
|
-
type: 'number',
|
|
345
|
-
default: 5000,
|
|
346
|
-
min: 500,
|
|
347
|
-
max: 30000,
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
path: 'noteEmbedInImage',
|
|
351
|
-
label: 'Embed voice note as image banner',
|
|
352
|
-
description: 'When a capture has an attached voice note, render the note as a dark banner at the bottom of the copied image. Off = notes are pasted separately via Ctrl+Shift+N.',
|
|
353
|
-
type: 'toggle',
|
|
354
|
-
default: true,
|
|
355
|
-
},
|
|
356
|
-
],
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
id: 'compression',
|
|
360
|
-
label: 'Token Compression',
|
|
361
|
-
description: 'Convert text to optimized screenshot images for LLM token savings. Shortcut: Ctrl+Shift+E reads clipboard selection and opens the compressed overlay.',
|
|
362
|
-
fields: [
|
|
363
|
-
{
|
|
364
|
-
path: 'tceAutoCopy',
|
|
365
|
-
label: 'Auto-copy selection on shortcut',
|
|
366
|
-
description: 'Ctrl+Shift+E auto-copies the current text selection before compressing. Off = requires a manual Ctrl+C first.',
|
|
367
|
-
type: 'toggle',
|
|
368
|
-
default: true,
|
|
369
|
-
},
|
|
370
|
-
{
|
|
371
|
-
path: 'tceAutoConvertThreshold',
|
|
372
|
-
label: 'Auto-convert threshold (tokens)',
|
|
373
|
-
description: 'Suggest compression when pasted or selected text exceeds this many tokens.',
|
|
374
|
-
type: 'number',
|
|
375
|
-
default: 500,
|
|
376
|
-
min: 100,
|
|
377
|
-
max: 50000,
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
path: 'tcePreset',
|
|
381
|
-
label: 'Default resolution preset',
|
|
382
|
-
description: 'Rendered image size. Smaller presets cost fewer tokens but fit less text.',
|
|
383
|
-
type: 'select',
|
|
384
|
-
default: 'compact',
|
|
385
|
-
choices: [
|
|
386
|
-
{ value: 'micro', label: 'Micro (200x200, ~54 tok)' },
|
|
387
|
-
{ value: 'tiny', label: 'Tiny (320x240, ~103 tok)' },
|
|
388
|
-
{ value: 'small', label: 'Small (480x360, ~231 tok)' },
|
|
389
|
-
{ value: 'compact', label: 'Compact (640x480, ~410 tok)' },
|
|
390
|
-
{ value: 'standard', label: 'Standard (800x600, ~640 tok)' },
|
|
391
|
-
{ value: 'tall', label: 'Tall (800x900, ~960 tok)' },
|
|
392
|
-
{ value: 'wide', label: 'Wide (1200x800, ~1280 tok)' },
|
|
393
|
-
{ value: 'full', label: 'Full (1092x1092, ~1590 tok)' },
|
|
394
|
-
{ value: 'auto', label: 'Auto (smallest fit)' },
|
|
395
|
-
],
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
path: 'tceColumnMode',
|
|
399
|
-
label: 'Column layout',
|
|
400
|
-
description: 'Number of columns in the rendered text image. Auto picks based on line length.',
|
|
401
|
-
type: 'select',
|
|
402
|
-
default: 'auto',
|
|
403
|
-
choices: [
|
|
404
|
-
{ value: 'auto', label: 'Auto' },
|
|
405
|
-
{ value: '1', label: '1 column' },
|
|
406
|
-
{ value: '2', label: '2 columns' },
|
|
407
|
-
{ value: '3', label: '3 columns' },
|
|
408
|
-
],
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
path: 'tceLineWrapping',
|
|
412
|
-
label: 'Line wrapping',
|
|
413
|
-
description: 'Wrap long lines to fill columns, or truncate with an ellipsis.',
|
|
414
|
-
type: 'select',
|
|
415
|
-
default: 'wrap',
|
|
416
|
-
choices: [
|
|
417
|
-
{ value: 'wrap', label: 'Soft wrap (preserves all content)' },
|
|
418
|
-
{ value: 'truncate', label: 'Truncate with ellipsis' },
|
|
419
|
-
],
|
|
420
|
-
},
|
|
421
|
-
{
|
|
422
|
-
path: 'tceTheme',
|
|
423
|
-
label: 'Theme',
|
|
424
|
-
description: 'Visual theme for the rendered text image.',
|
|
425
|
-
type: 'select',
|
|
426
|
-
default: 'dark',
|
|
427
|
-
choices: [
|
|
428
|
-
{ value: 'dark', label: 'Dark' },
|
|
429
|
-
{ value: 'light', label: 'Light' },
|
|
430
|
-
{ value: 'terminal', label: 'Terminal green' },
|
|
431
|
-
{ value: 'high-contrast', label: 'High contrast' },
|
|
432
|
-
{ value: 'paper', label: 'Paper' },
|
|
433
|
-
],
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
path: 'tceFontSize',
|
|
437
|
-
label: 'Font size (px)',
|
|
438
|
-
description: 'Font size in the rendered text image. Smaller = more content fits per page.',
|
|
439
|
-
type: 'number',
|
|
440
|
-
default: 6,
|
|
441
|
-
min: 2,
|
|
442
|
-
max: 20,
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
path: 'tceOverlapLines',
|
|
446
|
-
label: 'Page overlap (lines)',
|
|
447
|
-
description: 'Number of lines repeated at each page boundary so context carries across pages.',
|
|
448
|
-
type: 'number',
|
|
449
|
-
default: 3,
|
|
450
|
-
min: 0,
|
|
451
|
-
max: 10,
|
|
452
|
-
},
|
|
453
|
-
{
|
|
454
|
-
path: 'tceModel',
|
|
455
|
-
label: 'Model for pricing',
|
|
456
|
-
description: 'Model identifier used to calculate estimated token savings. Changing this updates the input-price default.',
|
|
457
|
-
type: 'select',
|
|
458
|
-
default: 'claude-opus-4.6',
|
|
459
|
-
choices: [
|
|
460
|
-
{ value: 'claude-opus-4.6', label: 'Claude Opus 4.6 ($5.00/1M)' },
|
|
461
|
-
{ value: 'claude-sonnet-4.6', label: 'Claude Sonnet 4.6 ($3.00/1M)' },
|
|
462
|
-
{ value: 'claude-haiku-4.5', label: 'Claude Haiku 4.5 ($1.00/1M)' },
|
|
463
|
-
{ value: 'claude-opus-4.5', label: 'Claude Opus 4.5 ($5.00/1M)' },
|
|
464
|
-
{ value: 'claude-sonnet-4.5', label: 'Claude Sonnet 4.5 ($3.00/1M)' },
|
|
465
|
-
{ value: 'claude-sonnet-4', label: 'Claude Sonnet 4 ($3.00/1M)' },
|
|
466
|
-
{ value: 'claude-opus-4.1', label: 'Claude Opus 4.1 ($15.00/1M)' },
|
|
467
|
-
{ value: 'gpt-5.4', label: 'GPT-5.4 ($2.50/1M)' },
|
|
468
|
-
{ value: 'gpt-5.4-pro', label: 'GPT-5.4 Pro ($30.00/1M)' },
|
|
469
|
-
{ value: 'gpt-5.4-mini', label: 'GPT-5.4 Mini ($0.75/1M)' },
|
|
470
|
-
{ value: 'gpt-5.4-nano', label: 'GPT-5.4 Nano ($0.20/1M)' },
|
|
471
|
-
{ value: 'gpt-5.2', label: 'GPT-5.2 ($1.75/1M)' },
|
|
472
|
-
{ value: 'gpt-5.2-pro', label: 'GPT-5.2 Pro ($21.00/1M)' },
|
|
473
|
-
{ value: 'gpt-5', label: 'GPT-5 ($1.25/1M)' },
|
|
474
|
-
{ value: 'gpt-5-mini', label: 'GPT-5 Mini ($0.25/1M)' },
|
|
475
|
-
{ value: 'gpt-5-nano', label: 'GPT-5 Nano ($0.05/1M)' },
|
|
476
|
-
{ value: 'o3', label: 'OpenAI o3 ($2.00/1M)' },
|
|
477
|
-
{ value: 'gemini-3.1-pro', label: 'Gemini 3.1 Pro ($2.00/1M)' },
|
|
478
|
-
{ value: 'gemini-3-flash', label: 'Gemini 3 Flash ($0.50/1M)' },
|
|
479
|
-
{ value: 'gemini-2.5-pro', label: 'Gemini 2.5 Pro ($1.25/1M)' },
|
|
480
|
-
{ value: 'gemini-2.5-flash', label: 'Gemini 2.5 Flash ($0.15/1M)' },
|
|
481
|
-
{ value: 'gemini-2.5-flash-lite', label: 'Gemini 2.5 Flash Lite ($0.10/1M)' },
|
|
482
|
-
{ value: 'custom', label: 'Custom ($3.00/1M default)' },
|
|
483
|
-
],
|
|
484
|
-
},
|
|
485
|
-
{
|
|
486
|
-
path: 'tceInputPrice',
|
|
487
|
-
label: 'Input price ($ per 1M tokens)',
|
|
488
|
-
description: 'Price per million input tokens. Auto-updated when `tceModel` changes; override for custom pricing.',
|
|
489
|
-
type: 'number',
|
|
490
|
-
default: 5.0,
|
|
491
|
-
min: 0,
|
|
492
|
-
max: 1000,
|
|
493
|
-
},
|
|
494
|
-
],
|
|
495
|
-
},
|
|
496
|
-
{
|
|
497
|
-
id: 'recording',
|
|
498
|
-
label: 'Recording',
|
|
499
|
-
description: 'Session recording, visual regression, and monitor modes.',
|
|
500
|
-
fields: [
|
|
501
|
-
{
|
|
502
|
-
path: 'recordingFeatureEnabled',
|
|
503
|
-
label: 'Feature enabled',
|
|
504
|
-
description: 'Master toggle for recording features.',
|
|
505
|
-
type: 'toggle',
|
|
506
|
-
default: true,
|
|
507
|
-
},
|
|
508
|
-
{
|
|
509
|
-
path: 'recordingSettings.defaultProfile',
|
|
510
|
-
label: 'Default profile',
|
|
511
|
-
description: 'Profile used when starting a recording without an explicit profile.',
|
|
512
|
-
type: 'select',
|
|
513
|
-
default: 'automated_test',
|
|
514
|
-
choices: [
|
|
515
|
-
{ value: 'automated_test', label: 'Automated test' },
|
|
516
|
-
{ value: 'smart', label: 'Smart (change-detect)' },
|
|
517
|
-
{ value: 'monitor', label: 'Monitor (smart + AI)' },
|
|
518
|
-
{ value: 'periodic', label: 'Periodic (timer)' },
|
|
519
|
-
{ value: 'interaction', label: 'Interaction (input hooks)' },
|
|
520
|
-
],
|
|
521
|
-
},
|
|
522
|
-
{
|
|
523
|
-
path: 'recordingSettings.shortcuts.toggleRecord',
|
|
524
|
-
label: 'Toggle record shortcut',
|
|
525
|
-
description: 'Start or stop the current recording.',
|
|
526
|
-
type: 'shortcut',
|
|
527
|
-
default: 'CommandOrControl+Shift+R',
|
|
528
|
-
requiresRestart: true,
|
|
529
|
-
},
|
|
530
|
-
{
|
|
531
|
-
path: 'recordingSettings.shortcuts.pauseResume',
|
|
532
|
-
label: 'Pause/resume shortcut',
|
|
533
|
-
description: 'Pause or resume the current recording.',
|
|
534
|
-
type: 'shortcut',
|
|
535
|
-
default: 'CommandOrControl+Shift+P',
|
|
536
|
-
requiresRestart: true,
|
|
537
|
-
},
|
|
538
|
-
{
|
|
539
|
-
path: 'recordingSettings.shortcuts.manualCapture',
|
|
540
|
-
label: 'Manual capture shortcut',
|
|
541
|
-
description: 'Force a frame capture during recording.',
|
|
542
|
-
type: 'shortcut',
|
|
543
|
-
default: 'CommandOrControl+Shift+M',
|
|
544
|
-
requiresRestart: true,
|
|
545
|
-
},
|
|
546
|
-
{
|
|
547
|
-
path: 'recordingSettings.captureFormat',
|
|
548
|
-
label: 'Capture format',
|
|
549
|
-
description: 'Image format for recorded frames.',
|
|
550
|
-
type: 'select',
|
|
551
|
-
default: 'webp',
|
|
552
|
-
choices: [
|
|
553
|
-
{ value: 'webp', label: 'WebP (recommended)' },
|
|
554
|
-
{ value: 'png', label: 'PNG (lossless)' },
|
|
555
|
-
{ value: 'jpg', label: 'JPEG (smallest)' },
|
|
556
|
-
],
|
|
557
|
-
},
|
|
558
|
-
{
|
|
559
|
-
path: 'recordingSettings.captureQuality',
|
|
560
|
-
label: 'Capture quality',
|
|
561
|
-
description: 'Quality for WebP/JPEG frames (1–100).',
|
|
562
|
-
type: 'number',
|
|
563
|
-
default: 90,
|
|
564
|
-
min: 1,
|
|
565
|
-
max: 100,
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
path: 'recordingSettings.minCaptureInterval',
|
|
569
|
-
label: 'Min capture interval (ms)',
|
|
570
|
-
description: 'Minimum delay between frames.',
|
|
571
|
-
type: 'number',
|
|
572
|
-
default: 500,
|
|
573
|
-
min: 100,
|
|
574
|
-
max: 60000,
|
|
575
|
-
},
|
|
576
|
-
{
|
|
577
|
-
path: 'recordingSettings.visualChangeThreshold',
|
|
578
|
-
label: 'Visual change threshold',
|
|
579
|
-
description: 'Minimum pixel-diff ratio before a new frame is saved.',
|
|
580
|
-
type: 'number',
|
|
581
|
-
default: 1,
|
|
582
|
-
min: 0,
|
|
583
|
-
max: 100,
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
path: 'recordingSettings.maxCapturesPerSecond',
|
|
587
|
-
label: 'Max captures per second',
|
|
588
|
-
description: 'Rate limit for frame capture.',
|
|
589
|
-
type: 'number',
|
|
590
|
-
default: 3,
|
|
591
|
-
min: 1,
|
|
592
|
-
max: 30,
|
|
593
|
-
},
|
|
594
|
-
{
|
|
595
|
-
path: 'recordingSettings.maskTypedText',
|
|
596
|
-
label: 'Mask typed text',
|
|
597
|
-
description: 'Redact typed characters in interaction-mode recordings.',
|
|
598
|
-
type: 'toggle',
|
|
599
|
-
default: true,
|
|
600
|
-
},
|
|
601
|
-
{
|
|
602
|
-
path: 'recordingSettings.excludedApps',
|
|
603
|
-
label: 'Excluded apps',
|
|
604
|
-
description: 'Recording is paused when these apps are focused.',
|
|
605
|
-
type: 'list',
|
|
606
|
-
default: [],
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
path: 'recordingSettings.maxFramesPerSession',
|
|
610
|
-
label: 'Max frames / session',
|
|
611
|
-
description: 'Hard cap on frames in a single session.',
|
|
612
|
-
type: 'number',
|
|
613
|
-
default: 500,
|
|
614
|
-
min: 10,
|
|
615
|
-
max: 50000,
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
path: 'recordingSettings.maxDurationSeconds',
|
|
619
|
-
label: 'Max duration (s)',
|
|
620
|
-
description: 'Hard cap on session duration.',
|
|
621
|
-
type: 'number',
|
|
622
|
-
default: 3600,
|
|
623
|
-
min: 30,
|
|
624
|
-
max: 86400,
|
|
625
|
-
},
|
|
626
|
-
{
|
|
627
|
-
path: 'recordingSettings.maxStorageMB',
|
|
628
|
-
label: 'Max storage (MB)',
|
|
629
|
-
description: 'Storage budget for recording sessions.',
|
|
630
|
-
type: 'number',
|
|
631
|
-
default: 500,
|
|
632
|
-
min: 10,
|
|
633
|
-
max: 102400,
|
|
634
|
-
},
|
|
635
|
-
{
|
|
636
|
-
path: 'recordingSettings.showInGallery',
|
|
637
|
-
label: 'Show in gallery',
|
|
638
|
-
description: 'Surface recording frames in the capture gallery.',
|
|
639
|
-
type: 'toggle',
|
|
640
|
-
default: true,
|
|
641
|
-
},
|
|
642
|
-
{
|
|
643
|
-
path: 'recordingSettings.apiPort',
|
|
644
|
-
label: 'API port',
|
|
645
|
-
description: 'Port for the local HTTP API server.',
|
|
646
|
-
type: 'number',
|
|
647
|
-
default: 47592,
|
|
648
|
-
min: 1024,
|
|
649
|
-
max: 65535,
|
|
650
|
-
requiresRestart: true,
|
|
651
|
-
},
|
|
652
|
-
{
|
|
653
|
-
path: 'recordingSettings.sessionFolder',
|
|
654
|
-
label: 'Session folder',
|
|
655
|
-
description: 'Custom path for recording sessions. Empty = data dir default.',
|
|
656
|
-
type: 'path',
|
|
657
|
-
default: '',
|
|
658
|
-
},
|
|
659
|
-
],
|
|
660
|
-
},
|
|
661
|
-
{
|
|
662
|
-
id: 'gui-automation',
|
|
663
|
-
label: 'GUI Automation',
|
|
664
|
-
description: 'Agent mouse/keyboard control. OFF by default — enable with care.',
|
|
665
|
-
fields: [
|
|
666
|
-
{
|
|
667
|
-
path: 'guiAutomation.enabled',
|
|
668
|
-
label: 'Master toggle',
|
|
669
|
-
description: 'Enables all GUI automation tools. Disabled by default for safety.',
|
|
670
|
-
type: 'consent',
|
|
671
|
-
default: false,
|
|
672
|
-
warning: true,
|
|
673
|
-
},
|
|
674
|
-
{
|
|
675
|
-
path: 'guiAutomation.actions.click',
|
|
676
|
-
label: 'Allow click',
|
|
677
|
-
description: 'Permit `superbased_click` when master toggle is on.',
|
|
678
|
-
type: 'toggle',
|
|
679
|
-
default: true,
|
|
680
|
-
warning: true,
|
|
681
|
-
},
|
|
682
|
-
{
|
|
683
|
-
path: 'guiAutomation.actions.type',
|
|
684
|
-
label: 'Allow type',
|
|
685
|
-
description: 'Permit `superbased_type` when master toggle is on.',
|
|
686
|
-
type: 'toggle',
|
|
687
|
-
default: true,
|
|
688
|
-
warning: true,
|
|
689
|
-
},
|
|
690
|
-
{
|
|
691
|
-
path: 'guiAutomation.actions.hotkey',
|
|
692
|
-
label: 'Allow hotkey',
|
|
693
|
-
description: 'Permit `superbased_hotkey` when master toggle is on.',
|
|
694
|
-
type: 'toggle',
|
|
695
|
-
default: true,
|
|
696
|
-
warning: true,
|
|
697
|
-
},
|
|
698
|
-
{
|
|
699
|
-
path: 'guiAutomation.actions.scroll',
|
|
700
|
-
label: 'Allow scroll',
|
|
701
|
-
description: 'Permit `superbased_scroll` when master toggle is on.',
|
|
702
|
-
type: 'toggle',
|
|
703
|
-
default: true,
|
|
704
|
-
warning: true,
|
|
705
|
-
},
|
|
706
|
-
{
|
|
707
|
-
path: 'guiAutomation.actions.drag',
|
|
708
|
-
label: 'Allow drag',
|
|
709
|
-
description: 'Permit drag actions (superbased_drag, 1.3).',
|
|
710
|
-
type: 'toggle',
|
|
711
|
-
default: false,
|
|
712
|
-
warning: true,
|
|
713
|
-
},
|
|
714
|
-
{
|
|
715
|
-
path: 'guiAutomation.actions.resize',
|
|
716
|
-
label: 'Allow window resize',
|
|
717
|
-
description: 'Permit `superbased_resize_window` (presets for phone/tablet/desktop, plus custom width/height).',
|
|
718
|
-
type: 'toggle',
|
|
719
|
-
default: true,
|
|
720
|
-
warning: true,
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
path: 'guiAutomation.actions.contextMenu',
|
|
724
|
-
label: 'Allow context menu selection',
|
|
725
|
-
description: 'Permit `superbased_context_menu_select` (right-click + menu-item click).',
|
|
726
|
-
type: 'toggle',
|
|
727
|
-
default: true,
|
|
728
|
-
warning: true,
|
|
729
|
-
},
|
|
730
|
-
{
|
|
731
|
-
path: 'guiAutomation.actions.hover',
|
|
732
|
-
label: 'Allow hover',
|
|
733
|
-
description: 'Permit `superbased_hover` (mouse move + dwell — reveals tooltips / hover-only UI).',
|
|
734
|
-
type: 'toggle',
|
|
735
|
-
default: true,
|
|
736
|
-
warning: true,
|
|
737
|
-
},
|
|
738
|
-
{
|
|
739
|
-
path: 'guiAutomation.actions.pixelColor',
|
|
740
|
-
label: 'Allow pixel color read',
|
|
741
|
-
description: 'Permit `superbased_pixel_color` (screen-pixel RGBA read; no input).',
|
|
742
|
-
type: 'toggle',
|
|
743
|
-
default: true,
|
|
744
|
-
warning: true,
|
|
745
|
-
},
|
|
746
|
-
{
|
|
747
|
-
path: 'guiAutomation.actions.windowManage',
|
|
748
|
-
label: 'Allow window state management',
|
|
749
|
-
description: 'Permit `superbased_window_state` (minimize / maximize / restore / always-on-top / move-to-display). Does NOT cover close — close is guarded separately by `guiAutomation.actions.destructive`.',
|
|
750
|
-
type: 'toggle',
|
|
751
|
-
default: true,
|
|
752
|
-
warning: true,
|
|
753
|
-
},
|
|
754
|
-
{
|
|
755
|
-
path: 'guiAutomation.actions.axInvoke',
|
|
756
|
-
label: 'Allow AX pattern invocation',
|
|
757
|
-
description: 'Permit `superbased_ax_invoke` (semantic UIA pattern invoke — Invoke / Toggle / Select / SetValue / Expand / Collapse). Calls into the control\'s author-defined action directly, no synthesized click.',
|
|
758
|
-
type: 'toggle',
|
|
759
|
-
default: true,
|
|
760
|
-
warning: true,
|
|
761
|
-
},
|
|
762
|
-
{
|
|
763
|
-
path: 'guiAutomation.actions.formFill',
|
|
764
|
-
label: 'Allow form-fill macro',
|
|
765
|
-
description: 'Permit `superbased_form_fill` (multi-field macro: AX-resolve + ValuePattern or click+type + Tab + optional Submit, one approval). Audit trails every field with a shared sessionId.',
|
|
766
|
-
type: 'toggle',
|
|
767
|
-
default: true,
|
|
768
|
-
warning: true,
|
|
769
|
-
},
|
|
770
|
-
{
|
|
771
|
-
path: 'guiAutomation.actions.dialogHandle',
|
|
772
|
-
label: 'Allow dialog handling',
|
|
773
|
-
description: 'Permit `superbased_dialog_handle` (confirm / dismiss / fill_path against modal dialogs). Auto-detects via foreground window.',
|
|
774
|
-
type: 'toggle',
|
|
775
|
-
default: true,
|
|
776
|
-
warning: true,
|
|
777
|
-
},
|
|
778
|
-
{
|
|
779
|
-
path: 'guiAutomation.actions.findInPage',
|
|
780
|
-
label: 'Allow find-in-page',
|
|
781
|
-
description: 'Permit `superbased_find_in_page` (Ctrl+F → type → Enter / Shift+Enter in the target browser). Best-effort; silently no-ops on non-browser targets.',
|
|
782
|
-
type: 'toggle',
|
|
783
|
-
default: true,
|
|
784
|
-
warning: true,
|
|
785
|
-
},
|
|
786
|
-
{
|
|
787
|
-
path: 'guiAutomation.actions.tabManagement',
|
|
788
|
-
label: 'Allow tab management',
|
|
789
|
-
description: 'Permit `superbased_tab_management` (browser hotkey wrappers — new / close / next / prev / switch_to via Ctrl+T/W/Tab/Shift+Tab/1..9).',
|
|
790
|
-
type: 'toggle',
|
|
791
|
-
default: true,
|
|
792
|
-
warning: true,
|
|
793
|
-
},
|
|
794
|
-
{
|
|
795
|
-
path: 'guiAutomation.actions.trayClick',
|
|
796
|
-
label: 'Allow tray icon click',
|
|
797
|
-
description: 'Permit `superbased_tray_click` (click a Windows system-tray icon by tooltip match). Windows-only in S8; macOS lands Phase 7 if requested.',
|
|
798
|
-
type: 'toggle',
|
|
799
|
-
default: true,
|
|
800
|
-
warning: true,
|
|
801
|
-
},
|
|
802
|
-
{
|
|
803
|
-
path: 'guiAutomation.actions.virtualDesktop',
|
|
804
|
-
label: 'Allow virtual desktop switch',
|
|
805
|
-
description: 'Permit `superbased_virtual_desktop` (Win+Ctrl+Left/Right on Windows, Ctrl+Left/Right on macOS Spaces). Navigation-only — fully reversible by re-switching.',
|
|
806
|
-
type: 'toggle',
|
|
807
|
-
default: true,
|
|
808
|
-
warning: true,
|
|
809
|
-
},
|
|
810
|
-
{
|
|
811
|
-
path: 'guiAutomation.actions.safe',
|
|
812
|
-
label: 'Group: allow safe actions',
|
|
813
|
-
description: '§6.5 group toggle — enables hover, pixelColor, findImage via or-gate with their flat keys. Default ON; disable to block all read-only capture/hover/match actions with one switch.',
|
|
814
|
-
type: 'toggle',
|
|
815
|
-
default: true,
|
|
816
|
-
warning: true,
|
|
817
|
-
},
|
|
818
|
-
{
|
|
819
|
-
path: 'guiAutomation.actions.write',
|
|
820
|
-
label: 'Group: allow write actions',
|
|
821
|
-
description: '§6.5 group toggle — enables click, type, hotkey, scroll, contextMenu, resize, windowManage, axInvoke, formFill, dialogHandle, findInPage, tabManagement via or-gate with their flat keys. Default ON; disable to block all synthesized-input state changes with one switch.',
|
|
822
|
-
type: 'toggle',
|
|
823
|
-
default: true,
|
|
824
|
-
warning: true,
|
|
825
|
-
},
|
|
826
|
-
{
|
|
827
|
-
path: 'guiAutomation.actions.destructive',
|
|
828
|
-
label: 'Group: allow destructive actions',
|
|
829
|
-
description: '§6.5 group toggle — enables drag, window_state=close, launch via or-gate with their flat keys. Default OFF; opting in allows all three irreversible / process-spawning actions simultaneously. This key also serves as the legacy close-only gate (widened semantic from v1.9.0).',
|
|
830
|
-
type: 'toggle',
|
|
831
|
-
default: false,
|
|
832
|
-
warning: true,
|
|
833
|
-
},
|
|
834
|
-
{
|
|
835
|
-
path: 'guiAutomation.actions.launch',
|
|
836
|
-
label: 'Allow app launch',
|
|
837
|
-
description: 'Permit `superbased_launch_app` (Start-Process via ShellExecute). ALSO gated by `guiAutomation.launchAllowlist` — empty allowlist denies every launch even when this toggle is on.',
|
|
838
|
-
type: 'toggle',
|
|
839
|
-
default: false,
|
|
840
|
-
warning: true,
|
|
841
|
-
},
|
|
842
|
-
{
|
|
843
|
-
path: 'guiAutomation.launchAllowlist',
|
|
844
|
-
label: 'Launch allowlist',
|
|
845
|
-
description: 'Entries permitted by `superbased_launch_app`. Empty = deny-all. Forms: plain substring (case-insensitive against resolved path / name / url), or `"sha256:<hex>"` binary-hash pin (path mode only — recommended for password managers, keychain tools, etc.).',
|
|
846
|
-
type: 'list',
|
|
847
|
-
default: [],
|
|
848
|
-
},
|
|
849
|
-
{
|
|
850
|
-
path: 'guiAutomation.confirmationMode',
|
|
851
|
-
label: 'Confirmation mode',
|
|
852
|
-
description: 'When the desktop app surfaces a confirmation prompt per action.',
|
|
853
|
-
type: 'select',
|
|
854
|
-
default: 'session',
|
|
855
|
-
choices: [
|
|
856
|
-
{ value: 'each', label: 'Each action' },
|
|
857
|
-
{ value: 'session', label: 'Once per session' },
|
|
858
|
-
{ value: 'never', label: 'Never (not recommended)' },
|
|
859
|
-
],
|
|
860
|
-
warning: true,
|
|
861
|
-
},
|
|
862
|
-
{
|
|
863
|
-
path: 'guiAutomation.requireConfirmFlag',
|
|
864
|
-
label: 'Require `confirm: true` flag',
|
|
865
|
-
description: 'API-level gate — calls without `confirm: true` are refused.',
|
|
866
|
-
type: 'toggle',
|
|
867
|
-
default: true,
|
|
868
|
-
warning: true,
|
|
869
|
-
},
|
|
870
|
-
{
|
|
871
|
-
path: 'guiAutomation.auditLogEnabled',
|
|
872
|
-
label: 'Audit log',
|
|
873
|
-
description: 'Append every attempted action to ~/.superbased/audit.log (NDJSON).',
|
|
874
|
-
type: 'toggle',
|
|
875
|
-
default: true,
|
|
876
|
-
},
|
|
877
|
-
{
|
|
878
|
-
path: 'guiAutomation.telemetryOptIn',
|
|
879
|
-
label: 'Telemetry counters',
|
|
880
|
-
description: '§6.11 — derive in-process counters (approvals per intent, sequence completion by step-count bucket, activation-failure rate per target class, target-hostile rate per process, dryRun-to-execute rate) from the audit stream. Surfaced in /api/health.telemetry. Privacy-by-default OFF; purely local — no data leaves your machine. Enables no new data collection, just computation on what audit log already records.',
|
|
881
|
-
type: 'toggle',
|
|
882
|
-
default: false,
|
|
883
|
-
},
|
|
884
|
-
{
|
|
885
|
-
path: 'guiAutomation.protectedApps',
|
|
886
|
-
label: 'Protected apps',
|
|
887
|
-
description: 'GUI automation refuses when these apps are focused (substring match).',
|
|
888
|
-
type: 'list',
|
|
889
|
-
default: [
|
|
890
|
-
'1Password',
|
|
891
|
-
'Bitwarden',
|
|
892
|
-
'LastPass',
|
|
893
|
-
'KeePass',
|
|
894
|
-
'KeePassXC',
|
|
895
|
-
'banking',
|
|
896
|
-
'online banking',
|
|
897
|
-
],
|
|
898
|
-
},
|
|
899
|
-
{
|
|
900
|
-
path: 'humanInputDefault',
|
|
901
|
-
label: 'Human-input profile',
|
|
902
|
-
description: 'Humanizes mouse paths and keystroke timing for click/type/drag — Bezier curves, gamma-distributed key delays. Helps with input-trajectory bot detection (Cloudflare Turnstile, reCAPTCHA, etc.). "off" = fully linear / fastest. "light" = mild curves and per-key timing variance, ~1.3-2× slower than raw input. "human" = realistic curves with occasional overshoot, ~3-5× slower. "paranoid" = max curves + typo-correction, ~5-10× slower. Pair with a stealth-patched browser for sensitive flows; this only addresses active input, not passive fingerprinting.',
|
|
903
|
-
type: 'select',
|
|
904
|
-
default: 'light',
|
|
905
|
-
choices: [
|
|
906
|
-
{ value: 'off', label: 'Off (linear, fastest)' },
|
|
907
|
-
{ value: 'light', label: 'Light (recommended default)' },
|
|
908
|
-
{ value: 'human', label: 'Human' },
|
|
909
|
-
{ value: 'paranoid', label: 'Paranoid (slow)' },
|
|
910
|
-
],
|
|
911
|
-
},
|
|
912
|
-
{
|
|
913
|
-
path: 'humanInputIdleDrift',
|
|
914
|
-
label: 'Idle cursor drift',
|
|
915
|
-
description: 'When enabled, the cursor drifts 1-3px every 200-500ms when no humanized input is in flight — defeats classifiers that fingerprint perfectly-still cursors between actions. Off by default because it interferes with manual mouse use; only turn on for fully unattended automation. The drift skips automatically while you move the mouse manually.',
|
|
916
|
-
type: 'toggle',
|
|
917
|
-
default: false,
|
|
918
|
-
},
|
|
919
|
-
],
|
|
920
|
-
},
|
|
921
|
-
{
|
|
922
|
-
id: 'watchers',
|
|
923
|
-
label: 'Watchers',
|
|
924
|
-
description: 'Ambient event streams surfaced as subscribable MCP resources.',
|
|
925
|
-
fields: [
|
|
926
|
-
{
|
|
927
|
-
path: 'watchers.enabled',
|
|
928
|
-
label: 'Master toggle',
|
|
929
|
-
description: 'Allow MCP clients to subscribe to watcher resources. Watchers are pull-initiated — nothing runs until a client subscribes.',
|
|
930
|
-
type: 'toggle',
|
|
931
|
-
default: true,
|
|
932
|
-
},
|
|
933
|
-
{
|
|
934
|
-
path: 'watchers.clipboard.enabled',
|
|
935
|
-
label: 'Clipboard watcher',
|
|
936
|
-
description: 'Emit events on clipboard text changes. Text-only for v1.',
|
|
937
|
-
type: 'toggle',
|
|
938
|
-
default: true,
|
|
939
|
-
},
|
|
940
|
-
{
|
|
941
|
-
path: 'watchers.clipboard.pollMs',
|
|
942
|
-
label: 'Clipboard poll interval (ms)',
|
|
943
|
-
description: 'How often to check for clipboard changes. Clamped to 50–5000 ms.',
|
|
944
|
-
type: 'number',
|
|
945
|
-
default: 200,
|
|
946
|
-
min: 50,
|
|
947
|
-
max: 5000,
|
|
948
|
-
},
|
|
949
|
-
{
|
|
950
|
-
path: 'watchers.activeWindow.enabled',
|
|
951
|
-
label: 'Active-window watcher',
|
|
952
|
-
description: 'Emit events when the foreground window or app changes. Polls `active-win`; falls back to nut-js in headless.',
|
|
953
|
-
type: 'toggle',
|
|
954
|
-
default: true,
|
|
955
|
-
},
|
|
956
|
-
{
|
|
957
|
-
path: 'watchers.activeWindow.pollMs',
|
|
958
|
-
label: 'Active-window poll interval (ms)',
|
|
959
|
-
description: 'How often to check for foreground-window changes. Clamped to 100–10000 ms.',
|
|
960
|
-
type: 'number',
|
|
961
|
-
default: 1000,
|
|
962
|
-
min: 100,
|
|
963
|
-
max: 10000,
|
|
964
|
-
},
|
|
965
|
-
{
|
|
966
|
-
path: 'watchers.file.enabled',
|
|
967
|
-
label: 'File watcher',
|
|
968
|
-
description: 'Emit add/change/unlink events for subscribed file paths via chokidar.',
|
|
969
|
-
type: 'toggle',
|
|
970
|
-
default: true,
|
|
971
|
-
},
|
|
972
|
-
{
|
|
973
|
-
path: 'watchers.file.awaitWriteFinishMs',
|
|
974
|
-
label: 'File write-stability threshold (ms)',
|
|
975
|
-
description: 'How long a file must stay unchanged before chokidar emits a write event. Clamped to 100–5000 ms.',
|
|
976
|
-
type: 'number',
|
|
977
|
-
default: 300,
|
|
978
|
-
min: 100,
|
|
979
|
-
max: 5000,
|
|
980
|
-
},
|
|
981
|
-
{
|
|
982
|
-
path: 'watchers.screenRegion.enabled',
|
|
983
|
-
label: 'Screen-region watcher',
|
|
984
|
-
description: 'Emit events when fullscreen visual content changes. Shares the provider with `recording mode=monitor`, so there is no double-polling.',
|
|
985
|
-
type: 'toggle',
|
|
986
|
-
default: true,
|
|
987
|
-
},
|
|
988
|
-
{
|
|
989
|
-
path: 'watchers.screenRegion.minIntervalMs',
|
|
990
|
-
label: 'Screen-region min interval (ms)',
|
|
991
|
-
description: 'Minimum interval between visual-change checks. Clamped to 100–30000 ms. Ignored if a recording session has already started the provider with a different interval (first-wins).',
|
|
992
|
-
type: 'number',
|
|
993
|
-
default: 500,
|
|
994
|
-
min: 100,
|
|
995
|
-
max: 30000,
|
|
996
|
-
},
|
|
997
|
-
],
|
|
998
|
-
},
|
|
999
|
-
{
|
|
1000
|
-
id: 'progressive-disclosure',
|
|
1001
|
-
label: 'Progressive disclosure',
|
|
1002
|
-
description: 'Opt-in mode that advertises only a core set of MCP tools by default, reducing tools/list token cost. Hidden tools stay callable — agents discover them via `superbased_tools(category)`. Requires MCP server restart after flipping.',
|
|
1003
|
-
fields: [
|
|
1004
|
-
{
|
|
1005
|
-
path: 'progressiveDisclosure.enabled',
|
|
1006
|
-
label: 'Advertise minimal tool set',
|
|
1007
|
-
description: 'When on, `tools/list` returns only the 11 core tools. Remaining tools stay callable via `superbased_tools(category)`. Default on — reduces tools/list token cost.',
|
|
1008
|
-
type: 'toggle',
|
|
1009
|
-
default: true,
|
|
1010
|
-
requiresRestart: true,
|
|
1011
|
-
},
|
|
1012
|
-
],
|
|
1013
|
-
},
|
|
1014
|
-
{
|
|
1015
|
-
id: 'ollama',
|
|
1016
|
-
label: 'Ollama',
|
|
1017
|
-
description: 'Route AI calls to a local Ollama daemon instead of the cloud backend. Routing bypasses cloud content moderation and token budget.',
|
|
1018
|
-
fields: [
|
|
1019
|
-
{
|
|
1020
|
-
path: 'ollama.detection.enabled',
|
|
1021
|
-
label: 'Detect Ollama on host',
|
|
1022
|
-
description: 'Probe the configured host at startup and on status endpoint. Turn off to suppress detection telemetry.',
|
|
1023
|
-
type: 'toggle',
|
|
1024
|
-
default: true,
|
|
1025
|
-
},
|
|
1026
|
-
{
|
|
1027
|
-
path: 'ollama.host',
|
|
1028
|
-
label: 'Ollama host',
|
|
1029
|
-
description: 'URL of the Ollama daemon. Supports remote hosts on LAN.',
|
|
1030
|
-
type: 'text',
|
|
1031
|
-
default: 'http://localhost:11434',
|
|
1032
|
-
},
|
|
1033
|
-
{
|
|
1034
|
-
path: 'ollama.routing.enabled',
|
|
1035
|
-
label: 'Use Ollama for AI tasks',
|
|
1036
|
-
description: 'Master toggle. When off, all AI calls route to the cloud. When on, per-task toggles below take effect.',
|
|
1037
|
-
type: 'toggle',
|
|
1038
|
-
default: false,
|
|
1039
|
-
},
|
|
1040
|
-
{
|
|
1041
|
-
path: 'ollama.routing.chat',
|
|
1042
|
-
label: 'Route chat (text)',
|
|
1043
|
-
description: 'Text-only AI calls via Ollama when the master toggle is on.',
|
|
1044
|
-
type: 'toggle',
|
|
1045
|
-
default: true,
|
|
1046
|
-
},
|
|
1047
|
-
{
|
|
1048
|
-
path: 'ollama.routing.vision',
|
|
1049
|
-
label: 'Route vision',
|
|
1050
|
-
description: 'Image-bearing AI calls via Ollama. Requires a vision-capable model.',
|
|
1051
|
-
type: 'toggle',
|
|
1052
|
-
default: true,
|
|
1053
|
-
},
|
|
1054
|
-
{
|
|
1055
|
-
path: 'ollama.routing.dictationCleanup',
|
|
1056
|
-
label: 'Route dictation cleanup',
|
|
1057
|
-
description: 'Post-transcription cleanup (filler removal, dedup) via Ollama. Raw transcription engine is unaffected.',
|
|
1058
|
-
type: 'toggle',
|
|
1059
|
-
default: true,
|
|
1060
|
-
},
|
|
1061
|
-
{
|
|
1062
|
-
path: 'ollama.model.chat',
|
|
1063
|
-
label: 'Chat model',
|
|
1064
|
-
description: 'e.g. llama3.1:8b, qwen2.5:7b. Empty = chat routing disabled.',
|
|
1065
|
-
type: 'text',
|
|
1066
|
-
default: '',
|
|
1067
|
-
},
|
|
1068
|
-
{
|
|
1069
|
-
path: 'ollama.model.vision',
|
|
1070
|
-
label: 'Vision model',
|
|
1071
|
-
description: 'e.g. llama3.2-vision:11b, llava:13b. Must be vision-capable.',
|
|
1072
|
-
type: 'text',
|
|
1073
|
-
default: '',
|
|
1074
|
-
},
|
|
1075
|
-
{
|
|
1076
|
-
path: 'ollama.model.dictationCleanup',
|
|
1077
|
-
label: 'Dictation cleanup model',
|
|
1078
|
-
description: 'Any text-capable model. Empty = cleanup routing disabled.',
|
|
1079
|
-
type: 'text',
|
|
1080
|
-
default: '',
|
|
1081
|
-
},
|
|
1082
|
-
],
|
|
1083
|
-
},
|
|
1084
|
-
{
|
|
1085
|
-
id: 'stt',
|
|
1086
|
-
label: 'Speech-to-text',
|
|
1087
|
-
description: 'Local speech-to-text engines. Phase 4a ships sherpa-onnx cross-platform; native macOS and Windows engines land in later sub-phases.',
|
|
1088
|
-
fields: [
|
|
1089
|
-
{
|
|
1090
|
-
path: 'stt.sherpa.enabled',
|
|
1091
|
-
label: 'Sherpa engine enabled',
|
|
1092
|
-
description: 'Allow routing dictation/transcription through sherpa-onnx. Disabled = engine is skipped by `auto` routing and rejected if requested explicitly.',
|
|
1093
|
-
type: 'toggle',
|
|
1094
|
-
default: true,
|
|
1095
|
-
},
|
|
1096
|
-
{
|
|
1097
|
-
path: 'stt.sherpa.modelId',
|
|
1098
|
-
label: 'Sherpa model',
|
|
1099
|
-
description: 'Which bundled model to use. More models installable via `superbased stt download` (Phase 4e adds a TUI manager).',
|
|
1100
|
-
type: 'select',
|
|
1101
|
-
default: 'zipformer-en-20M',
|
|
1102
|
-
choices: [
|
|
1103
|
-
{ value: 'zipformer-en-20M', label: 'Streaming Zipformer (English, 20M, ~60 MB)' },
|
|
1104
|
-
],
|
|
1105
|
-
},
|
|
1106
|
-
{
|
|
1107
|
-
path: 'stt.sherpa.autoDownloadOnFirstUse',
|
|
1108
|
-
label: 'Auto-download on first use',
|
|
1109
|
-
description: 'Permit the engine to download the configured model the first time it is needed. Safety-sensitive: disabling mid-session is symmetric (typed-consent required to flip in either direction).',
|
|
1110
|
-
type: 'consent',
|
|
1111
|
-
default: false,
|
|
1112
|
-
warning: true,
|
|
1113
|
-
},
|
|
1114
|
-
],
|
|
1115
|
-
},
|
|
1116
|
-
{
|
|
1117
|
-
id: 'privacy',
|
|
1118
|
-
label: 'Privacy',
|
|
1119
|
-
description: 'Redaction, analytics, and heartbeat.',
|
|
1120
|
-
fields: [
|
|
1121
|
-
{
|
|
1122
|
-
path: 'autoRedactSecrets',
|
|
1123
|
-
label: 'Auto-redact secrets',
|
|
1124
|
-
description: 'Blur detected API keys and tokens in captured images.',
|
|
1125
|
-
type: 'toggle',
|
|
1126
|
-
default: false,
|
|
1127
|
-
},
|
|
1128
|
-
{
|
|
1129
|
-
path: 'autoRedactPII',
|
|
1130
|
-
label: 'Auto-redact PII',
|
|
1131
|
-
description: 'Blur detected emails, phone numbers, and similar PII.',
|
|
1132
|
-
type: 'toggle',
|
|
1133
|
-
default: false,
|
|
1134
|
-
},
|
|
1135
|
-
{
|
|
1136
|
-
path: 'analyticsOptOut',
|
|
1137
|
-
label: 'Opt out of analytics',
|
|
1138
|
-
description: 'Disable anonymous usage telemetry.',
|
|
1139
|
-
type: 'toggle',
|
|
1140
|
-
default: false,
|
|
1141
|
-
},
|
|
1142
|
-
{
|
|
1143
|
-
path: 'anonymousHeartbeatOptOut',
|
|
1144
|
-
label: 'Opt out of anonymous heartbeat',
|
|
1145
|
-
description: 'Disable the anonymous install-heartbeat ping.',
|
|
1146
|
-
type: 'toggle',
|
|
1147
|
-
default: false,
|
|
1148
|
-
},
|
|
1149
|
-
],
|
|
1150
|
-
},
|
|
1151
|
-
{
|
|
1152
|
-
id: 'internal',
|
|
1153
|
-
label: 'Internal',
|
|
1154
|
-
description: 'Persisted state not shown in the TUI.',
|
|
1155
|
-
fields: [
|
|
1156
|
-
{ path: 'authToken', label: 'Auth token', description: 'Internal.', type: 'internal', exposed: false },
|
|
1157
|
-
{ path: 'lastValidatedAt', label: 'Last validation', description: 'Internal.', type: 'internal', exposed: false },
|
|
1158
|
-
{ path: 'cachedLicense', label: 'Cached license', description: 'Internal.', type: 'internal', exposed: false },
|
|
1159
|
-
{ path: 'anonHeartbeatAt', label: 'Last heartbeat', description: 'Internal.', type: 'internal', exposed: false },
|
|
1160
|
-
{ path: 'analyticsBackfillVersion', label: 'Analytics backfill version', description: 'Internal.', type: 'internal', exposed: false },
|
|
1161
|
-
],
|
|
1162
|
-
},
|
|
1163
|
-
];
|
|
1164
|
-
// ────────────────────────────────────────────────────────────────────────────
|
|
1165
|
-
// Default resolution
|
|
1166
|
-
// ────────────────────────────────────────────────────────────────────────────
|
|
1167
|
-
function resolvePlatformDefault(pd) {
|
|
1168
|
-
const plat = process.platform;
|
|
1169
|
-
if (plat === 'darwin' && pd.darwin !== undefined)
|
|
1170
|
-
return pd.darwin;
|
|
1171
|
-
if (plat === 'win32' && pd.win32 !== undefined)
|
|
1172
|
-
return pd.win32;
|
|
1173
|
-
if (plat === 'linux' && pd.linux !== undefined)
|
|
1174
|
-
return pd.linux;
|
|
1175
|
-
return pd.default;
|
|
1176
|
-
}
|
|
1177
|
-
/** Resolve every non-internal field's default into a nested defaults object. */
|
|
1178
|
-
function getSchemaDefaults() {
|
|
1179
|
-
const out = {};
|
|
1180
|
-
for (const section of exports.SECTIONS) {
|
|
1181
|
-
for (const field of section.fields) {
|
|
1182
|
-
if (field.type === 'internal')
|
|
1183
|
-
continue; // internal keys have no default value
|
|
1184
|
-
const value = field.platformDefaults
|
|
1185
|
-
? resolvePlatformDefault(field.platformDefaults)
|
|
1186
|
-
: field.default;
|
|
1187
|
-
if (value === undefined)
|
|
1188
|
-
continue;
|
|
1189
|
-
setByPath(out, field.path, deepClone(value));
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
return out;
|
|
1193
|
-
}
|
|
1194
|
-
// ────────────────────────────────────────────────────────────────────────────
|
|
1195
|
-
// Field lookup + validation
|
|
1196
|
-
// ────────────────────────────────────────────────────────────────────────────
|
|
1197
|
-
const FIELD_BY_PATH = new Map();
|
|
1198
|
-
for (const section of exports.SECTIONS) {
|
|
1199
|
-
for (const field of section.fields) {
|
|
1200
|
-
FIELD_BY_PATH.set(field.path, field);
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
function getFieldByPath(path) {
|
|
1204
|
-
return FIELD_BY_PATH.get(path);
|
|
1205
|
-
}
|
|
1206
|
-
/** Flat list of all fields, preserving section/declaration order. */
|
|
1207
|
-
function getAllFields() {
|
|
1208
|
-
const out = [];
|
|
1209
|
-
for (const section of exports.SECTIONS)
|
|
1210
|
-
out.push(...section.fields);
|
|
1211
|
-
return out;
|
|
1212
|
-
}
|
|
1213
|
-
/**
|
|
1214
|
-
* Per-field visibility check for a given consumer. Canonical rule for the tri-state
|
|
1215
|
-
* `exposed` field: `internal` + `exposed: false` are hidden everywhere;
|
|
1216
|
-
* `exposed: 'ui-only'` surfaces only to `'ui'`; everything else surfaces to all.
|
|
1217
|
-
*/
|
|
1218
|
-
function isFieldVisibleTo(field, consumer) {
|
|
1219
|
-
if (field.type === 'internal')
|
|
1220
|
-
return false;
|
|
1221
|
-
if (field.exposed === false)
|
|
1222
|
-
return false;
|
|
1223
|
-
if (field.exposed === 'ui-only')
|
|
1224
|
-
return consumer === 'ui';
|
|
1225
|
-
return true; // undefined | true | 'all' — visible to every consumer
|
|
1226
|
-
}
|
|
1227
|
-
/**
|
|
1228
|
-
* Fields surfaced to a given consumer. Default (`'tui'`) preserves the historical
|
|
1229
|
-
* TUI/CLI filter. Pass `'ui'` to include `ui-only` fields for the desktop renderer.
|
|
1230
|
-
*/
|
|
1231
|
-
function getExposedFields(consumer = 'tui') {
|
|
1232
|
-
return getAllFields().filter((f) => isFieldVisibleTo(f, consumer));
|
|
1233
|
-
}
|
|
1234
|
-
/** Validate a candidate value against the field metadata. Coerces strings where safe. */
|
|
1235
|
-
function validateValue(field, value) {
|
|
1236
|
-
switch (field.type) {
|
|
1237
|
-
case 'toggle':
|
|
1238
|
-
if (typeof value === 'boolean')
|
|
1239
|
-
return { ok: true, value };
|
|
1240
|
-
if (value === 'true' || value === '1' || value === 'on')
|
|
1241
|
-
return { ok: true, value: true };
|
|
1242
|
-
if (value === 'false' || value === '0' || value === 'off')
|
|
1243
|
-
return { ok: true, value: false };
|
|
1244
|
-
return { ok: false, error: `expected boolean, got ${typeof value}` };
|
|
1245
|
-
case 'number': {
|
|
1246
|
-
const n = typeof value === 'number' ? value : Number(value);
|
|
1247
|
-
if (!Number.isFinite(n))
|
|
1248
|
-
return { ok: false, error: `expected number, got ${JSON.stringify(value)}` };
|
|
1249
|
-
if (field.min !== undefined && n < field.min)
|
|
1250
|
-
return { ok: false, error: `minimum is ${field.min}` };
|
|
1251
|
-
if (field.max !== undefined && n > field.max)
|
|
1252
|
-
return { ok: false, error: `maximum is ${field.max}` };
|
|
1253
|
-
return { ok: true, value: n };
|
|
1254
|
-
}
|
|
1255
|
-
case 'text':
|
|
1256
|
-
case 'shortcut':
|
|
1257
|
-
case 'path':
|
|
1258
|
-
if (typeof value !== 'string')
|
|
1259
|
-
return { ok: false, error: `expected string, got ${typeof value}` };
|
|
1260
|
-
return { ok: true, value };
|
|
1261
|
-
case 'select': {
|
|
1262
|
-
if (typeof value !== 'string')
|
|
1263
|
-
return { ok: false, error: `expected string, got ${typeof value}` };
|
|
1264
|
-
const allowed = (field.choices || []).map((c) => c.value);
|
|
1265
|
-
if (!allowed.includes(value))
|
|
1266
|
-
return { ok: false, error: `not in choices (${allowed.join('|')})` };
|
|
1267
|
-
return { ok: true, value };
|
|
1268
|
-
}
|
|
1269
|
-
case 'multiselect':
|
|
1270
|
-
case 'list': {
|
|
1271
|
-
// Accept either an array, or a comma-separated string (CLI convenience).
|
|
1272
|
-
let arr;
|
|
1273
|
-
if (Array.isArray(value))
|
|
1274
|
-
arr = value;
|
|
1275
|
-
else if (typeof value === 'string')
|
|
1276
|
-
arr = value.split(',').map((s) => s.trim()).filter(Boolean);
|
|
1277
|
-
else
|
|
1278
|
-
return { ok: false, error: `expected array or comma-separated string` };
|
|
1279
|
-
if (!arr.every((v) => typeof v === 'string')) {
|
|
1280
|
-
return { ok: false, error: `expected array of strings` };
|
|
1281
|
-
}
|
|
1282
|
-
if (field.type === 'multiselect') {
|
|
1283
|
-
const allowed = new Set((field.choices || []).map((c) => c.value));
|
|
1284
|
-
for (const v of arr) {
|
|
1285
|
-
if (!allowed.has(v))
|
|
1286
|
-
return { ok: false, error: `'${v}' not in choices (${[...allowed].join('|')})` };
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
return { ok: true, value: arr };
|
|
1290
|
-
}
|
|
1291
|
-
case 'consent':
|
|
1292
|
-
// consent fields persist a boolean; enabling goes through the TUI consent screen
|
|
1293
|
-
if (typeof value === 'boolean')
|
|
1294
|
-
return { ok: true, value };
|
|
1295
|
-
return { ok: false, error: `consent fields accept boolean only` };
|
|
1296
|
-
case 'internal':
|
|
1297
|
-
// Internal fields accept anything — they're persisted state, not user-facing.
|
|
1298
|
-
return { ok: true, value };
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
// ────────────────────────────────────────────────────────────────────────────
|
|
1302
|
-
// Nested-path helpers (used by stores + CLI)
|
|
1303
|
-
// ────────────────────────────────────────────────────────────────────────────
|
|
1304
|
-
/** Read a dotted path from a nested object. Returns undefined if any segment is missing. */
|
|
1305
|
-
function getByPath(obj, path) {
|
|
1306
|
-
const parts = path.split('.');
|
|
1307
|
-
let cursor = obj;
|
|
1308
|
-
for (const part of parts) {
|
|
1309
|
-
if (cursor === null || cursor === undefined)
|
|
1310
|
-
return undefined;
|
|
1311
|
-
if (typeof cursor !== 'object')
|
|
1312
|
-
return undefined;
|
|
1313
|
-
cursor = cursor[part];
|
|
1314
|
-
}
|
|
1315
|
-
return cursor;
|
|
1316
|
-
}
|
|
1317
|
-
/** Write a dotted path into a nested object, creating intermediate objects as needed. */
|
|
1318
|
-
function setByPath(obj, path, value) {
|
|
1319
|
-
const parts = path.split('.');
|
|
1320
|
-
let cursor = obj;
|
|
1321
|
-
for (let i = 0; i < parts.length - 1; i++) {
|
|
1322
|
-
const part = parts[i];
|
|
1323
|
-
const next = cursor[part];
|
|
1324
|
-
if (next === null || next === undefined || typeof next !== 'object' || Array.isArray(next)) {
|
|
1325
|
-
cursor[part] = {};
|
|
1326
|
-
}
|
|
1327
|
-
cursor = cursor[part];
|
|
1328
|
-
}
|
|
1329
|
-
cursor[parts[parts.length - 1]] = value;
|
|
1330
|
-
}
|
|
1331
|
-
/** Remove a dotted path from a nested object. No-op if the path is missing. */
|
|
1332
|
-
function deleteByPath(obj, path) {
|
|
1333
|
-
const parts = path.split('.');
|
|
1334
|
-
let cursor = obj;
|
|
1335
|
-
for (let i = 0; i < parts.length - 1; i++) {
|
|
1336
|
-
const next = cursor[parts[i]];
|
|
1337
|
-
if (next === null || next === undefined || typeof next !== 'object')
|
|
1338
|
-
return;
|
|
1339
|
-
cursor = next;
|
|
1340
|
-
}
|
|
1341
|
-
delete cursor[parts[parts.length - 1]];
|
|
1342
|
-
}
|
|
1343
|
-
/** Deep-merge source INTO target — source values win; arrays replaced wholesale. */
|
|
1344
|
-
function deepMerge(target, source) {
|
|
1345
|
-
const out = { ...target };
|
|
1346
|
-
for (const key of Object.keys(source)) {
|
|
1347
|
-
const sv = source[key];
|
|
1348
|
-
const tv = out[key];
|
|
1349
|
-
if (sv !== null && typeof sv === 'object' && !Array.isArray(sv) &&
|
|
1350
|
-
tv !== null && typeof tv === 'object' && !Array.isArray(tv)) {
|
|
1351
|
-
out[key] = deepMerge(tv, sv);
|
|
1352
|
-
}
|
|
1353
|
-
else {
|
|
1354
|
-
out[key] = sv;
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
return out;
|
|
1358
|
-
}
|
|
1359
|
-
function deepClone(v) {
|
|
1360
|
-
if (v === null || typeof v !== 'object')
|
|
1361
|
-
return v;
|
|
1362
|
-
if (Array.isArray(v))
|
|
1363
|
-
return v.map(deepClone);
|
|
1364
|
-
const out = {};
|
|
1365
|
-
for (const k of Object.keys(v)) {
|
|
1366
|
-
out[k] = deepClone(v[k]);
|
|
1367
|
-
}
|
|
1368
|
-
return out;
|
|
1369
|
-
}
|