shortcutxl 0.3.76 → 0.3.78
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/BINARY-INVENTORY.json +813 -813
- package/CHANGELOG.md +14 -0
- package/dist/ai/models.d.ts +10 -6
- package/dist/ai/models.generated.d.ts +72 -0
- package/dist/ai/models.generated.js +33 -0
- package/dist/ai/models.js +36 -13
- package/dist/ai/providers/anthropic.d.ts +4 -2
- package/dist/ai/providers/anthropic.js +59 -29
- package/dist/ai/providers/azure-openai-responses.d.ts +2 -1
- package/dist/ai/providers/azure-openai-responses.js +4 -20
- package/dist/ai/providers/google-vertex.d.ts +8 -2
- package/dist/ai/providers/google-vertex.js +66 -54
- package/dist/ai/providers/google.js +15 -48
- package/dist/ai/providers/openai-completions.d.ts +4 -1
- package/dist/ai/providers/openai-completions.js +26 -10
- package/dist/ai/providers/openai-reasoning.d.ts +5 -0
- package/dist/ai/providers/openai-reasoning.js +13 -0
- package/dist/ai/providers/openai-responses-shared.js +1 -1
- package/dist/ai/providers/openai-responses.d.ts +6 -2
- package/dist/ai/providers/openai-responses.js +28 -23
- package/dist/ai/providers/simple-options.d.ts +2 -3
- package/dist/ai/providers/simple-options.js +4 -6
- package/dist/ai/types.d.ts +19 -2
- package/dist/app/agent-session-runtime-adapter.js +7 -6
- package/dist/app/agent-session.d.ts +0 -15
- package/dist/app/agent-session.js +0 -37
- package/dist/app/approvals/approval-errors.d.ts +15 -0
- package/dist/app/approvals/approval-errors.js +14 -0
- package/dist/app/approvals/runtime-approval-gates.d.ts +1 -2
- package/dist/app/approvals/tool-approval.d.ts +1 -0
- package/dist/app/approvals/tool-approval.js +11 -23
- package/dist/app/approvals/types.d.ts +0 -14
- package/dist/app/approvals/types.js +0 -2
- package/dist/app/background/tool-summaries.js +0 -2
- package/dist/app/extensions/slash-commands.js +1 -3
- package/dist/app/local/tools/execute-code/executor.d.ts +1 -1
- package/dist/app/local/tools/execute-code/executor.js +20 -10
- package/dist/app/local/tools/execute-code/tool.js +21 -2
- package/dist/app/modes/action/agent.js +4 -5
- package/dist/app/modes/ask/agent.js +4 -6
- package/dist/app/modes/index.js +20 -10
- package/dist/app/modes/installation/agent.js +4 -5
- package/dist/app/modes/manage/agent.js +3 -4
- package/dist/app/modes/manage/prompt.js +1 -2
- package/dist/app/modes/metadata.d.ts +31 -0
- package/dist/app/modes/metadata.js +35 -0
- package/dist/app/modes/plan/agent.js +5 -8
- package/dist/app/modes/plan/prompt.js +3 -3
- package/dist/app/permissions/runtime-approval-flow.d.ts +1 -5
- package/dist/app/permissions/runtime-approval-flow.js +0 -28
- package/dist/app/permissions/tool-gates.d.ts +2 -3
- package/dist/app/permissions/tool-gates.js +3 -81
- package/dist/app/prompts/com-api.js +1 -1
- package/dist/app/prompts/shared-guidelines.js +7 -3
- package/dist/app/providers/google-vertex-gateway.js +4 -51
- package/dist/app/providers/model-registry.d.ts +1 -0
- package/dist/app/providers/model-registry.js +39 -0
- package/dist/app/providers/model-resolver.js +10 -7
- package/dist/app/providers/register-shortcut-provider.js +6 -6
- package/dist/app/providers/shortcut-api-v2-transport.js +4 -0
- package/dist/app/providers/shortcut-llm-proxy-client.d.ts +2 -2
- package/dist/app/providers/shortcut-llm-proxy-client.js +1 -0
- package/dist/app/resources/package-manager.js +2 -123
- package/dist/app/resources/resource-patterns.d.ts +9 -0
- package/dist/app/resources/resource-patterns.js +120 -0
- package/dist/app/session/forked-agent.d.ts +2 -2
- package/dist/app/session/model-manager.js +3 -2
- package/dist/app/session/session-lifecycle.js +3 -2
- package/dist/app/session/session-models.d.ts +2 -0
- package/dist/app/session/session-models.js +14 -6
- package/dist/app/settings-manager.d.ts +3 -3
- package/dist/app/shared/tools/execute-code/mog.d.ts +3 -1
- package/dist/app/shared/tools/execute-code/mog.js +18 -2
- package/dist/app/tools/bash.js +3 -3
- package/dist/app/tools/execute-code/index.d.ts +1 -0
- package/dist/app/tools/execute-code/index.js +3 -1
- package/dist/app/tools/find-ignore-files.d.ts +3 -0
- package/dist/app/tools/find-ignore-files.js +33 -0
- package/dist/app/tools/find.js +2 -21
- package/dist/app/tools/llm-analysis.js +0 -2
- package/dist/app/tools/refresh-context.d.ts +1 -1
- package/dist/app/tools/session-settings/update-session-settings.js +2 -2
- package/dist/app/tools/switch-mode.js +2 -2
- package/dist/app/tools/take-screenshot.js +0 -2
- package/dist/app/tools/task/runner.js +1 -2
- package/dist/app/tools/task/task.d.ts +1 -3
- package/dist/app/tools/task/task.js +20 -40
- package/dist/app/tools/web-search.js +12 -2
- package/dist/autocomplete/core.d.ts +33 -0
- package/dist/autocomplete/core.js +113 -0
- package/dist/{tui → autocomplete}/fuzzy.d.ts +0 -1
- package/dist/{tui → autocomplete}/fuzzy.js +0 -1
- package/dist/{tui/autocomplete.d.ts → autocomplete/index.d.ts} +0 -1
- package/dist/{tui/autocomplete.js → autocomplete/index.js} +62 -158
- package/dist/cli/args.js +1 -1
- package/dist/cli/list-models.js +1 -1
- package/dist/cli.js +26227 -30480
- package/dist/constants.d.ts +0 -2
- package/dist/constants.js +0 -3
- package/dist/contracts/agent-session-store.d.ts +1 -1
- package/dist/contracts/agent-settings.d.ts +1 -0
- package/dist/contracts/agent-settings.js +2 -1
- package/dist/contracts/model-call.d.ts +1 -2
- package/dist/contracts/model-call.js +1 -2
- package/dist/contracts/model-stream.d.ts +1 -0
- package/dist/contracts/model-stream.js +1 -0
- package/dist/contracts/wire.d.ts +10 -7
- package/dist/contracts/wire.js +8 -0
- package/dist/core/agent-engine.js +1 -1
- package/dist/core/core-types.d.ts +1 -21
- package/dist/core/defaults.d.ts +1 -1
- package/dist/core/defaults.js +9 -1
- package/dist/core/prompts/agent-guidelines.d.ts +4 -5
- package/dist/core/prompts/agent-guidelines.js +28 -42
- package/dist/core/session-schema.d.ts +1 -1
- package/dist/embedded-agent/ai-invoke.d.ts +1 -2
- package/dist/embedded-agent/ai-invoke.js +2 -70
- package/dist/embedded-agent/anthropic-messages-transport.d.ts +4 -20
- package/dist/embedded-agent/anthropic-messages-transport.js +23 -786
- package/dist/embedded-agent/bootstrap.js +2 -2
- package/dist/embedded-agent/compose.js +8 -7
- package/dist/embedded-agent/gateway-base-url.d.ts +3 -0
- package/dist/embedded-agent/gateway-base-url.js +35 -0
- package/dist/embedded-agent/google-vertex-transport.d.ts +2 -11
- package/dist/embedded-agent/google-vertex-transport.js +20 -117
- package/dist/embedded-agent/host-runtime-options.d.ts +0 -8
- package/dist/embedded-agent/host-runtime-options.js +10 -2
- package/dist/embedded-agent/host-tools/invoke-llm/contract.d.ts +2 -2
- package/dist/embedded-agent/host-tools/invoke-llm/contract.js +4 -2
- package/dist/embedded-agent/host-tools/sandbox-llm/contract.d.ts +8 -3
- package/dist/embedded-agent/host-tools/sandbox-llm/contract.js +12 -8
- package/dist/embedded-agent/host-tools/sandbox-llm/index.d.ts +1 -1
- package/dist/embedded-agent/host-tools/sandbox-llm/index.js +1 -1
- package/dist/embedded-agent/host-tools/shared/index.d.ts +1 -1
- package/dist/embedded-agent/host-tools/shared/index.js +1 -1
- package/dist/embedded-agent/host-tools/shared/llm-stream-error.d.ts +7 -0
- package/dist/embedded-agent/host-tools/shared/llm-stream-error.js +10 -0
- package/dist/embedded-agent/host-tools/take-screenshot/contract.d.ts +0 -2
- package/dist/embedded-agent/host-tools/take-screenshot/contract.js +1 -3
- package/dist/embedded-agent/host-tools/take-screenshot/index.d.ts +1 -1
- package/dist/embedded-agent/host-tools/take-screenshot/index.js +1 -1
- package/dist/embedded-agent/host-tools/task/agents/clone.js +1 -2
- package/dist/embedded-agent/host-tools/task/contract.js +1 -1
- package/dist/embedded-agent/index.d.ts +3 -4
- package/dist/embedded-agent/index.js +2 -3
- package/dist/embedded-agent/model-selection.d.ts +0 -6
- package/dist/embedded-agent/model-selection.js +15 -8
- package/dist/embedded-agent/openai-completions-transport.d.ts +2 -11
- package/dist/embedded-agent/openai-completions-transport.js +20 -120
- package/dist/embedded-agent/openai-responses-transport.d.ts +2 -11
- package/dist/embedded-agent/openai-responses-transport.js +15 -170
- package/dist/embedded-agent/prompt/build.js +1 -2
- package/dist/embedded-agent/prompt/sections.d.ts +1 -1
- package/dist/embedded-agent/prompt/sections.js +2 -0
- package/dist/embedded-agent/provider-native-request.d.ts +29 -0
- package/dist/embedded-agent/provider-native-request.js +65 -0
- package/dist/embedded-agent/run-stats.d.ts +1 -1
- package/dist/embedded-agent/stream.d.ts +10 -96
- package/dist/embedded-agent/stream.js +31 -556
- package/dist/embedded-agent/suggestions.d.ts +1 -1
- package/dist/embedded-agent/suggestions.js +1 -1
- package/dist/embedded-agent/worker-bridge/host-client.d.ts +7 -0
- package/dist/embedded-agent/worker-bridge/host-client.js +15 -0
- package/dist/embedded-agent/worker-bridge/worker-port.js +17 -1
- package/dist/main.js +18 -14
- package/dist/rpc/index.d.ts +1 -1
- package/dist/rpc/rpc-approval-gates.js +1 -2
- package/dist/rpc/rpc-host.d.ts +4 -0
- package/dist/rpc/rpc-host.js +13 -24
- package/dist/rpc/rpc-types.d.ts +6 -17
- package/dist/shared/platform/open.d.ts +4 -1
- package/dist/shared/platform/open.js +14 -2
- package/dist/shell/approvals/runtime-approval-gates.js +1 -3
- package/dist/shell/components/selectors/model-selector.js +2 -1
- package/dist/shell/components/selectors/session-selector-search.js +1 -1
- package/dist/shell/components/selectors/thinking-selector.js +7 -6
- package/dist/shell/index.d.ts +0 -1
- package/dist/shell/index.js +0 -1
- package/dist/shell/interactive/interactive-mode-options.d.ts +10 -0
- package/dist/shell/interactive/interactive-mode.d.ts +6 -12
- package/dist/shell/interactive/interactive-mode.js +39 -158
- package/dist/shell/interactive/slash-commands.d.ts +0 -34
- package/dist/shell/interactive/slash-commands.js +0 -2
- package/dist/shell/links/local-file-link-input.d.ts +15 -0
- package/dist/shell/links/local-file-link-input.js +38 -0
- package/dist/shell/links/local-file-link.d.ts +7 -0
- package/dist/shell/links/local-file-link.js +35 -0
- package/dist/shell/links/local-file-opener.d.ts +16 -0
- package/dist/shell/links/local-file-opener.js +90 -0
- package/dist/shell/session-client.d.ts +0 -1
- package/dist/shell/session-client.js +0 -6
- package/dist/shell/status/update-check-scheduler.d.ts +30 -0
- package/dist/shell/status/update-check-scheduler.js +71 -0
- package/dist/shell/status/update-reminder-controller.d.ts +22 -0
- package/dist/shell/status/update-reminder-controller.js +40 -0
- package/dist/shell/status/update-reminder.d.ts +6 -0
- package/dist/shell/status/update-reminder.js +4 -0
- package/dist/shell/theme/dark.json +1 -2
- package/dist/shell/theme/light.json +1 -2
- package/dist/shell/theme/runtime.d.ts +2 -3
- package/dist/shell/theme/runtime.js +2 -6
- package/dist/shell/theme/theme-schema.json +1 -6
- package/dist/shortcut-model-catalog.d.ts +7 -2
- package/dist/shortcut-model-catalog.js +134 -10
- package/dist/startup/update-manager.d.ts +6 -6
- package/dist/startup/update-manager.js +23 -38
- package/dist/startup/update-prompt.d.ts +1 -0
- package/dist/startup/update-prompt.js +2 -2
- package/dist/tui/components/editor.d.ts +1 -1
- package/dist/tui/components/editor.js +1 -1
- package/dist/tui/components/markdown.js +15 -6
- package/dist/tui/components/settings-list.js +1 -1
- package/dist/tui/editor-component.d.ts +1 -1
- package/dist/tui/index.d.ts +7 -8
- package/dist/tui/index.js +7 -6
- package/dist/tui/tui.d.ts +2 -0
- package/dist/tui/tui.js +16 -1
- package/dist/tui/utils.d.ts +7 -0
- package/dist/tui/utils.js +58 -8
- package/native-app/main/index.js +3200 -48
- package/native-app/main/{photon_rs-SoVDgheu.js → photon_rs-XkYyYTVA.js} +2 -2
- package/native-app/package.json +1 -1
- package/native-app/preload/index.cjs +2 -0
- package/native-app/renderer/assets/{index-CFc-oZuS.js → index-B4jz6epR.js} +825 -155
- package/native-app/renderer/assets/{index-OhGE0UY4.css → index-C__g36ft.css} +412 -162
- package/native-app/renderer/assets/shortcutagent-DxFsGSkw.png +0 -0
- package/native-app/renderer/index.html +2 -2
- package/package.json +17 -3
- package/skills/add-custom-model/SKILL.md +52 -0
- package/user-docs/dist/index.html +1 -1
- package/user-docs/dist/shortcutxl-docs.pdf +0 -0
- package/xll/ShortcutXL.xll +0 -0
- package/xll/modules/shortcut_xl/_managed.py +26 -7
- package/xll/modules/shortcut_xl/_tracking.py +141 -251
- package/xll/modules/shortcut_xl/api/__init__.py +60 -0
- package/xll/modules/shortcut_xl/api/workbook.py +9 -1
- package/xll/modules/shortcut_xl/api/worksheet.py +4 -1
- package/xll/python/Lib/site-packages/httpx-0.28.1.dist-info/RECORD +1 -1
- package/xll/python/Lib/site-packages/idna-3.18.dist-info/RECORD +1 -1
- package/xll/python/Lib/site-packages/pip/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/build_env/__init__.py +25 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/base.py +103 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/installer.py +333 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/noop.py +42 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/venv.py +145 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/virtual.py +139 -0
- package/xll/python/Lib/site-packages/pip/_internal/cache.py +4 -1
- package/xll/python/Lib/site-packages/pip/_internal/cli/autocompletion.py +4 -1
- package/xll/python/Lib/site-packages/pip/_internal/cli/base_command.py +11 -14
- package/xll/python/Lib/site-packages/pip/_internal/cli/cmdoptions.py +133 -22
- package/xll/python/Lib/site-packages/pip/_internal/cli/index_command.py +11 -6
- package/xll/python/Lib/site-packages/pip/_internal/cli/main.py +2 -1
- package/xll/python/Lib/site-packages/pip/_internal/cli/main_parser.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/cli/parser.py +10 -2
- package/xll/python/Lib/site-packages/pip/_internal/cli/progress_bars.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/cli/req_command.py +57 -25
- package/xll/python/Lib/site-packages/pip/_internal/cli/status_codes.py +1 -0
- package/xll/python/Lib/site-packages/pip/_internal/commands/cache.py +7 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/configuration.py +2 -1
- package/xll/python/Lib/site-packages/pip/_internal/commands/debug.py +4 -5
- package/xll/python/Lib/site-packages/pip/_internal/commands/download.py +4 -0
- package/xll/python/Lib/site-packages/pip/_internal/commands/freeze.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/commands/index.py +10 -3
- package/xll/python/Lib/site-packages/pip/_internal/commands/inspect.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/commands/install.py +6 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/list.py +11 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/lock.py +4 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/show.py +14 -8
- package/xll/python/Lib/site-packages/pip/_internal/commands/wheel.py +7 -1
- package/xll/python/Lib/site-packages/pip/_internal/configuration.py +2 -3
- package/xll/python/Lib/site-packages/pip/_internal/distributions/base.py +5 -3
- package/xll/python/Lib/site-packages/pip/_internal/distributions/installed.py +3 -2
- package/xll/python/Lib/site-packages/pip/_internal/distributions/sdist.py +45 -20
- package/xll/python/Lib/site-packages/pip/_internal/distributions/wheel.py +3 -2
- package/xll/python/Lib/site-packages/pip/_internal/exceptions.py +174 -0
- package/xll/python/Lib/site-packages/pip/_internal/index/collector.py +70 -48
- package/xll/python/Lib/site-packages/pip/_internal/index/package_finder.py +46 -7
- package/xll/python/Lib/site-packages/pip/_internal/index/sources.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/locations/_sysconfig.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/locations/base.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/metadata/base.py +10 -5
- package/xll/python/Lib/site-packages/pip/_internal/metadata/importlib/_dists.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/metadata/importlib/_envs.py +8 -3
- package/xll/python/Lib/site-packages/pip/_internal/models/candidate.py +5 -1
- package/xll/python/Lib/site-packages/pip/_internal/models/link.py +53 -13
- package/xll/python/Lib/site-packages/pip/_internal/network/auth.py +38 -21
- package/xll/python/Lib/site-packages/pip/_internal/network/cache.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/network/download.py +58 -11
- package/xll/python/Lib/site-packages/pip/_internal/network/session.py +35 -40
- package/xll/python/Lib/site-packages/pip/_internal/network/utils.py +109 -1
- package/xll/python/Lib/site-packages/pip/_internal/operations/check.py +2 -3
- package/xll/python/Lib/site-packages/pip/_internal/operations/install/wheel.py +23 -18
- package/xll/python/Lib/site-packages/pip/_internal/operations/prepare.py +152 -7
- package/xll/python/Lib/site-packages/pip/_internal/req/__init__.py +2 -0
- package/xll/python/Lib/site-packages/pip/_internal/req/constructors.py +54 -69
- package/xll/python/Lib/site-packages/pip/_internal/req/req_file.py +6 -6
- package/xll/python/Lib/site-packages/pip/_internal/req/req_install.py +25 -21
- package/xll/python/Lib/site-packages/pip/_internal/req/req_uninstall.py +13 -8
- package/xll/python/Lib/site-packages/pip/_internal/resolution/base.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +0 -1
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +39 -52
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +3 -3
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +3 -0
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +9 -0
- package/xll/python/Lib/site-packages/pip/_internal/utils/compat.py +15 -9
- package/xll/python/Lib/site-packages/pip/_internal/utils/deprecation.py +6 -1
- package/xll/python/Lib/site-packages/pip/_internal/utils/filesystem.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/logging.py +11 -3
- package/xll/python/Lib/site-packages/pip/_internal/utils/misc.py +48 -4
- package/xll/python/Lib/site-packages/pip/_internal/utils/pylock.py +18 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/retry.py +2 -1
- package/xll/python/Lib/site-packages/pip/_internal/utils/subprocess.py +4 -3
- package/xll/python/Lib/site-packages/pip/_internal/utils/temp_dir.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/unpacking.py +30 -4
- package/xll/python/Lib/site-packages/pip/_internal/utils/urls.py +5 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/virtualenv.py +2 -36
- package/xll/python/Lib/site-packages/pip/_internal/vcs/git.py +8 -5
- package/xll/python/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/wheel_builder.py +5 -1
- package/xll/python/Lib/site-packages/pip/_vendor/bom.cdx.json +231 -0
- package/xll/python/Lib/site-packages/pip/_vendor/certifi/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/certifi/cacert.pem +0 -631
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/compat.py +34 -64
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/resources.py +28 -14
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/scripts.py +7 -3
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/util.py +48 -11
- package/xll/python/Lib/site-packages/pip/_vendor/idna/LICENSE.md +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/idna/__main__.py +6 -0
- package/xll/python/Lib/site-packages/pip/_vendor/idna/cli.py +128 -0
- package/xll/python/Lib/site-packages/pip/_vendor/idna/codec.py +50 -13
- package/xll/python/Lib/site-packages/pip/_vendor/idna/compat.py +26 -0
- package/xll/python/Lib/site-packages/pip/_vendor/idna/core.py +352 -141
- package/xll/python/Lib/site-packages/pip/_vendor/idna/idnadata.py +571 -2983
- package/xll/python/Lib/site-packages/pip/_vendor/idna/intranges.py +5 -7
- package/xll/python/Lib/site-packages/pip/_vendor/idna/package_data.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/idna/uts46data.py +16887 -8832
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/__init__.py +352 -66
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/__main__.py +11 -0
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/_xdg.py +171 -0
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/android.py +92 -41
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/api.py +213 -49
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/macos.py +128 -51
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/unix.py +176 -127
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/version.py +8 -18
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/windows.py +185 -68
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/__init__.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/__main__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/console.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/filter.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py +10 -8
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/formatter.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexer.py +7 -5
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py +9 -8
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/python.py +35 -32
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/modeline.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/plugin.py +3 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/regexopt.py +13 -2
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/scanner.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/sphinxext.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/style.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/token.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/unistring.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/util.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/__init__.py +52 -16
- package/xll/python/Lib/site-packages/pip/_vendor/requests/__version__.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/_types.py +183 -0
- package/xll/python/Lib/site-packages/pip/_vendor/requests/adapters.py +101 -50
- package/xll/python/Lib/site-packages/pip/_vendor/requests/api.py +31 -8
- package/xll/python/Lib/site-packages/pip/_vendor/requests/auth.py +80 -40
- package/xll/python/Lib/site-packages/pip/_vendor/requests/compat.py +9 -3
- package/xll/python/Lib/site-packages/pip/_vendor/requests/cookies.py +143 -79
- package/xll/python/Lib/site-packages/pip/_vendor/requests/exceptions.py +15 -5
- package/xll/python/Lib/site-packages/pip/_vendor/requests/help.py +13 -10
- package/xll/python/Lib/site-packages/pip/_vendor/requests/hooks.py +23 -9
- package/xll/python/Lib/site-packages/pip/_vendor/requests/models.py +265 -126
- package/xll/python/Lib/site-packages/pip/_vendor/requests/py.typed +0 -0
- package/xll/python/Lib/site-packages/pip/_vendor/requests/sessions.py +164 -78
- package/xll/python/Lib/site-packages/pip/_vendor/requests/status_codes.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/structures.py +51 -20
- package/xll/python/Lib/site-packages/pip/_vendor/requests/utils.py +161 -89
- package/xll/python/Lib/site-packages/pip/_vendor/tomli/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/tomli/_parser.py +9 -4
- package/xll/python/Lib/site-packages/pip/_vendor/tomli/_re.py +13 -9
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_base_connection.py +3 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_collections.py +0 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_version.py +8 -18
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/connection.py +4 -4
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +23 -10
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/response.py +5 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +7 -8
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/fields.py +14 -14
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +8 -6
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/response.py +35 -22
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +8 -0
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +11 -61
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +5 -11
- package/xll/python/Lib/site-packages/pip/_vendor/vendor.txt +8 -8
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/METADATA +3 -2
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/RECORD +208 -188
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/AUTHORS.txt +20 -0
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/idna/LICENSE.md +1 -1
- package/xll/python/Lib/site-packages/pywin32-311.dist-info/RECORD +2 -2
- package/xll/python/Scripts/httpx.exe +0 -0
- package/xll/python/Scripts/idna.exe +0 -0
- package/xll/python/Scripts/pip.exe +0 -0
- package/xll/python/Scripts/pip3.13.exe +0 -0
- package/xll/python/Scripts/pip3.exe +0 -0
- package/xll/python/Scripts/pywin32_postinstall.exe +0 -0
- package/xll/python/Scripts/pywin32_testall.exe +0 -0
- package/dist/app/collab/awareness.d.ts +0 -32
- package/dist/app/collab/awareness.js +0 -52
- package/dist/app/collab/collab-client.d.ts +0 -37
- package/dist/app/collab/collab-client.js +0 -208
- package/dist/app/collab/collab-manager.d.ts +0 -91
- package/dist/app/collab/collab-manager.js +0 -218
- package/dist/app/collab/collab-sync.d.ts +0 -62
- package/dist/app/collab/collab-sync.js +0 -215
- package/dist/app/collab/index.d.ts +0 -9
- package/dist/app/collab/index.js +0 -6
- package/dist/app/collab/super-fight.d.ts +0 -90
- package/dist/app/collab/super-fight.js +0 -310
- package/dist/app/collab/sync-bridge.d.ts +0 -35
- package/dist/app/collab/sync-bridge.js +0 -109
- package/dist/app/collab/types.d.ts +0 -75
- package/dist/app/collab/types.js +0 -5
- package/dist/embedded-agent/ai-content.d.ts +0 -52
- package/dist/embedded-agent/ai-content.js +0 -101
- package/dist/embedded-agent/host-tools/shared/llm-stream.d.ts +0 -31
- package/dist/embedded-agent/host-tools/shared/llm-stream.js +0 -136
- package/dist/embedded-agent/model-call-orchestrator.d.ts +0 -22
- package/dist/embedded-agent/model-call-orchestrator.js +0 -22
- package/dist/embedded-agent/stream-errors.d.ts +0 -10
- package/dist/embedded-agent/stream-errors.js +0 -73
- package/dist/embedded-agent/stream-message-state.d.ts +0 -14
- package/dist/embedded-agent/stream-message-state.js +0 -271
- package/dist/embedded-agent/stream-sse.d.ts +0 -78
- package/dist/embedded-agent/stream-sse.js +0 -73
- package/dist/shell/approvals/task-spawn-approval.d.ts +0 -20
- package/dist/shell/approvals/task-spawn-approval.js +0 -93
- package/dist/shell/interactive/collab-command.d.ts +0 -9
- package/dist/shell/interactive/collab-command.js +0 -115
- package/dist/shell/interactive/super-fight-ui.d.ts +0 -80
- package/dist/shell/interactive/super-fight-ui.js +0 -484
- package/dist/shell/status/collab-status.d.ts +0 -18
- package/dist/shell/status/collab-status.js +0 -46
- package/xll/python/Lib/site-packages/pip/_internal/build_env.py +0 -606
- /package/dist/{tui → autocomplete}/skill-autocomplete.js +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/INSTALLER +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/REQUESTED +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/WHEEL +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/entry_points.txt +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/LICENSE.txt +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/certifi/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/distlib/LICENSE.txt +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/distro/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/msgpack/COPYING +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.APACHE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.BSD +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pkg_resources/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/platformdirs/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pygments/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pyproject_hooks/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/requests/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/resolvelib/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/rich/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/tomli/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/tomli_w/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/truststore/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/urllib3/LICENSE.txt +0 -0
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CollabManager — orchestrates the full collaboration lifecycle.
|
|
3
|
-
*
|
|
4
|
-
* Pure app-layer class with no shell/TUI dependencies. Manages:
|
|
5
|
-
* - CollabClient connection and room lifecycle
|
|
6
|
-
* - CollabSync (CRDT workbook sync)
|
|
7
|
-
* - CollabAwareness (peer sheet info broadcasting)
|
|
8
|
-
* - Display name resolution
|
|
9
|
-
*
|
|
10
|
-
* Used by the interactive shell (/collab command), RPC mode, and tests.
|
|
11
|
-
*/
|
|
12
|
-
import { CollabAwareness } from './awareness.js';
|
|
13
|
-
import { CollabClient } from './collab-client.js';
|
|
14
|
-
import { CollabSync } from './collab-sync.js';
|
|
15
|
-
// ── File-based display name provider ───────────────────────────────────
|
|
16
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
17
|
-
import { join } from 'node:path';
|
|
18
|
-
const ADJECTIVES = [
|
|
19
|
-
'brave',
|
|
20
|
-
'calm',
|
|
21
|
-
'eager',
|
|
22
|
-
'fast',
|
|
23
|
-
'happy',
|
|
24
|
-
'keen',
|
|
25
|
-
'quick',
|
|
26
|
-
'sharp',
|
|
27
|
-
'bold',
|
|
28
|
-
'cool',
|
|
29
|
-
'fierce',
|
|
30
|
-
'witty',
|
|
31
|
-
'swift',
|
|
32
|
-
'wise',
|
|
33
|
-
'bright',
|
|
34
|
-
'chill'
|
|
35
|
-
];
|
|
36
|
-
const ANIMALS = [
|
|
37
|
-
'otter',
|
|
38
|
-
'fox',
|
|
39
|
-
'hawk',
|
|
40
|
-
'wolf',
|
|
41
|
-
'bear',
|
|
42
|
-
'lynx',
|
|
43
|
-
'crow',
|
|
44
|
-
'hare',
|
|
45
|
-
'puma',
|
|
46
|
-
'owl',
|
|
47
|
-
'stag',
|
|
48
|
-
'wren',
|
|
49
|
-
'seal',
|
|
50
|
-
'vole',
|
|
51
|
-
'dove',
|
|
52
|
-
'elk'
|
|
53
|
-
];
|
|
54
|
-
function randomName() {
|
|
55
|
-
const adj = ADJECTIVES[Math.floor(Math.random() * ADJECTIVES.length)];
|
|
56
|
-
const animal = ANIMALS[Math.floor(Math.random() * ANIMALS.length)];
|
|
57
|
-
const num = Math.floor(Math.random() * 100);
|
|
58
|
-
return `${adj}-${animal}-${num}`;
|
|
59
|
-
}
|
|
60
|
-
/** Persists display name to `<agentDir>/collab.json`. */
|
|
61
|
-
export class FileDisplayNameProvider {
|
|
62
|
-
agentDir;
|
|
63
|
-
constructor(agentDir) {
|
|
64
|
-
this.agentDir = agentDir;
|
|
65
|
-
}
|
|
66
|
-
getOrCreate() {
|
|
67
|
-
const config = this.load();
|
|
68
|
-
if (config.displayName)
|
|
69
|
-
return { name: config.displayName, isNew: false };
|
|
70
|
-
const name = randomName();
|
|
71
|
-
this.save({ ...config, displayName: name });
|
|
72
|
-
return { name, isNew: true };
|
|
73
|
-
}
|
|
74
|
-
set(name) {
|
|
75
|
-
this.save({ ...this.load(), displayName: name });
|
|
76
|
-
}
|
|
77
|
-
get() {
|
|
78
|
-
return this.load().displayName;
|
|
79
|
-
}
|
|
80
|
-
configPath() {
|
|
81
|
-
return join(this.agentDir, 'collab.json');
|
|
82
|
-
}
|
|
83
|
-
load() {
|
|
84
|
-
const path = this.configPath();
|
|
85
|
-
if (!existsSync(path))
|
|
86
|
-
return {};
|
|
87
|
-
try {
|
|
88
|
-
return JSON.parse(readFileSync(path, 'utf-8'));
|
|
89
|
-
}
|
|
90
|
-
catch {
|
|
91
|
-
return {};
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
save(config) {
|
|
95
|
-
mkdirSync(this.agentDir, { recursive: true });
|
|
96
|
-
writeFileSync(this.configPath(), JSON.stringify(config, null, 2) + '\n');
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
/** Simple in-memory provider for tests. */
|
|
100
|
-
export class StaticDisplayNameProvider {
|
|
101
|
-
name;
|
|
102
|
-
constructor(name) {
|
|
103
|
-
this.name = name;
|
|
104
|
-
}
|
|
105
|
-
getOrCreate() {
|
|
106
|
-
return { name: this.name, isNew: false };
|
|
107
|
-
}
|
|
108
|
-
set(name) {
|
|
109
|
-
this.name = name;
|
|
110
|
-
}
|
|
111
|
-
get() {
|
|
112
|
-
return this.name;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
// ── CollabManager ──────────────────────────────────────────────────────
|
|
116
|
-
export class CollabManager {
|
|
117
|
-
serverUrl;
|
|
118
|
-
pool;
|
|
119
|
-
displayNameProvider;
|
|
120
|
-
_client;
|
|
121
|
-
_sync = null;
|
|
122
|
-
_awareness = null;
|
|
123
|
-
constructor(serverUrl, pool, displayNameProvider) {
|
|
124
|
-
this.serverUrl = serverUrl;
|
|
125
|
-
this.pool = pool;
|
|
126
|
-
this.displayNameProvider = displayNameProvider;
|
|
127
|
-
this._client = new CollabClient(serverUrl);
|
|
128
|
-
}
|
|
129
|
-
/** The underlying CollabClient (for event wiring by modes). */
|
|
130
|
-
get client() {
|
|
131
|
-
return this._client;
|
|
132
|
-
}
|
|
133
|
-
get sync() {
|
|
134
|
-
return this._sync;
|
|
135
|
-
}
|
|
136
|
-
get awareness() {
|
|
137
|
-
return this._awareness;
|
|
138
|
-
}
|
|
139
|
-
// ── Room lifecycle ───────────────────────────────────────────────────
|
|
140
|
-
/** Create a new room and auto-join it. Returns the join result. */
|
|
141
|
-
async createRoom(displayName) {
|
|
142
|
-
const name = displayName ?? this.displayNameProvider.getOrCreate().name;
|
|
143
|
-
const roomId = await this._client.createRoom();
|
|
144
|
-
const result = await this._client.joinRoom(roomId, name);
|
|
145
|
-
this.attachSync();
|
|
146
|
-
this.attachAwareness();
|
|
147
|
-
return result;
|
|
148
|
-
}
|
|
149
|
-
/** Join an existing room by ID. Returns the join result. */
|
|
150
|
-
async joinRoom(roomId, displayName) {
|
|
151
|
-
const name = displayName ?? this.displayNameProvider.getOrCreate().name;
|
|
152
|
-
const result = await this._client.joinRoom(roomId, name);
|
|
153
|
-
this.attachSync();
|
|
154
|
-
this.attachAwareness();
|
|
155
|
-
return result;
|
|
156
|
-
}
|
|
157
|
-
/** Leave the current room and clean up sync/awareness. */
|
|
158
|
-
leave() {
|
|
159
|
-
this.detachSync();
|
|
160
|
-
this.detachAwareness();
|
|
161
|
-
this._client.leave();
|
|
162
|
-
}
|
|
163
|
-
/** Current collab status. */
|
|
164
|
-
getStatus() {
|
|
165
|
-
const { roomId, peerId, peers, connected } = this._client.state;
|
|
166
|
-
return {
|
|
167
|
-
connected,
|
|
168
|
-
roomId,
|
|
169
|
-
peerId,
|
|
170
|
-
peers: [...peers.values()]
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
/** Whether we're currently in a room. */
|
|
174
|
-
get inRoom() {
|
|
175
|
-
return this._client.state.roomId !== null;
|
|
176
|
-
}
|
|
177
|
-
// ── Display name ─────────────────────────────────────────────────────
|
|
178
|
-
getDisplayName() {
|
|
179
|
-
return this.displayNameProvider.getOrCreate();
|
|
180
|
-
}
|
|
181
|
-
setDisplayName(name) {
|
|
182
|
-
this.displayNameProvider.set(name);
|
|
183
|
-
}
|
|
184
|
-
currentDisplayName() {
|
|
185
|
-
return this.displayNameProvider.get();
|
|
186
|
-
}
|
|
187
|
-
// ── Cleanup ──────────────────────────────────────────────────────────
|
|
188
|
-
destroy() {
|
|
189
|
-
this.detachSync();
|
|
190
|
-
this.detachAwareness();
|
|
191
|
-
this._client.destroy();
|
|
192
|
-
}
|
|
193
|
-
// ── Private ──────────────────────────────────────────────────────────
|
|
194
|
-
attachSync() {
|
|
195
|
-
this._sync = new CollabSync(this._client, this.pool);
|
|
196
|
-
void this._sync.startSyncing();
|
|
197
|
-
}
|
|
198
|
-
detachSync() {
|
|
199
|
-
if (this._sync) {
|
|
200
|
-
this._sync.destroy();
|
|
201
|
-
this._sync = null;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
attachAwareness() {
|
|
205
|
-
const activeWb = this.pool.activeWorkbookName;
|
|
206
|
-
if (!activeWb)
|
|
207
|
-
return;
|
|
208
|
-
const wb = this.pool.getWorkbook(activeWb);
|
|
209
|
-
this._awareness = new CollabAwareness(wb, this._client);
|
|
210
|
-
}
|
|
211
|
-
detachAwareness() {
|
|
212
|
-
if (this._awareness) {
|
|
213
|
-
this._awareness.destroy();
|
|
214
|
-
this._awareness = null;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
//# sourceMappingURL=collab-manager.js.map
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CollabSync — orchestrates multi-doc CRDT sync between local workbooks
|
|
3
|
-
* and a remote collaboration server.
|
|
4
|
-
*
|
|
5
|
-
* Each workbook in the SheetEnginePool gets a SyncBridge. Local mutations
|
|
6
|
-
* are debounced and pushed as Yrs diffs. Incoming binary frames from the
|
|
7
|
-
* server are routed to the correct bridge by doc ID.
|
|
8
|
-
*
|
|
9
|
-
* Engine creation uses `createHeadlessEngine({ yrsState })` which calls
|
|
10
|
-
* `compute_init_from_yrs_state` in Rust — this preserves exact Yrs item
|
|
11
|
-
* identities so that subsequent `syncApply` diffs merge correctly.
|
|
12
|
-
* (See mog/plans/active/colab/round-7/root-cause.md for why the JSON
|
|
13
|
-
* snapshot path is broken.)
|
|
14
|
-
*/
|
|
15
|
-
import { type SheetEnginePool } from '@shortcut/mog-sandbox-runtime';
|
|
16
|
-
import type { CollabClient } from './collab-client.js';
|
|
17
|
-
export declare class CollabSync {
|
|
18
|
-
private client;
|
|
19
|
-
private pool;
|
|
20
|
-
private bridges;
|
|
21
|
-
private debounceTimers;
|
|
22
|
-
private unsubscribers;
|
|
23
|
-
private workbookEventUnsubs;
|
|
24
|
-
private destroyed;
|
|
25
|
-
/** Frames that arrived while handleInitialState was in progress. */
|
|
26
|
-
private pendingUpdates;
|
|
27
|
-
/** Docs currently being initialized (guards against concurrent handleInitialState). */
|
|
28
|
-
private initializing;
|
|
29
|
-
constructor(client: CollabClient, pool: SheetEnginePool);
|
|
30
|
-
/**
|
|
31
|
-
* Start syncing all current workbooks in the pool.
|
|
32
|
-
* Called after creating/joining a room.
|
|
33
|
-
*/
|
|
34
|
-
startSyncing(): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Handle initial state for a doc received from server (late joiner).
|
|
37
|
-
* Creates a new engine from raw Yrs state bytes, registers it in the pool,
|
|
38
|
-
* and starts syncing.
|
|
39
|
-
*/
|
|
40
|
-
handleInitialState(docId: string, state: Uint8Array): Promise<void>;
|
|
41
|
-
/**
|
|
42
|
-
* Handle incoming binary from server — apply remote update to the correct bridge.
|
|
43
|
-
*/
|
|
44
|
-
handleRemoteUpdate(docId: string, data: Uint8Array): Promise<void>;
|
|
45
|
-
destroy(): void;
|
|
46
|
-
/**
|
|
47
|
-
* Share a local workbook with the room — create a bridge, send full state,
|
|
48
|
-
* subscribe to mutation events.
|
|
49
|
-
*/
|
|
50
|
-
private shareWorkbook;
|
|
51
|
-
/**
|
|
52
|
-
* Subscribe to workbook mutation events for outbound sync.
|
|
53
|
-
* Synchronous — uses activeSheet property to avoid async gaps where
|
|
54
|
-
* cell changes could be missed.
|
|
55
|
-
*/
|
|
56
|
-
private subscribeToWorkbookEvents;
|
|
57
|
-
/**
|
|
58
|
-
* Push local Yrs changes to the server for a specific doc.
|
|
59
|
-
*/
|
|
60
|
-
private pushLocalChanges;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=collab-sync.d.ts.map
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CollabSync — orchestrates multi-doc CRDT sync between local workbooks
|
|
3
|
-
* and a remote collaboration server.
|
|
4
|
-
*
|
|
5
|
-
* Each workbook in the SheetEnginePool gets a SyncBridge. Local mutations
|
|
6
|
-
* are debounced and pushed as Yrs diffs. Incoming binary frames from the
|
|
7
|
-
* server are routed to the correct bridge by doc ID.
|
|
8
|
-
*
|
|
9
|
-
* Engine creation uses `createHeadlessEngine({ yrsState })` which calls
|
|
10
|
-
* `compute_init_from_yrs_state` in Rust — this preserves exact Yrs item
|
|
11
|
-
* identities so that subsequent `syncApply` diffs merge correctly.
|
|
12
|
-
* (See mog/plans/active/colab/round-7/root-cause.md for why the JSON
|
|
13
|
-
* snapshot path is broken.)
|
|
14
|
-
*/
|
|
15
|
-
import { createHeadlessEngine } from '@shortcut/mog-sandbox-runtime';
|
|
16
|
-
import { SyncBridge } from './sync-bridge.js';
|
|
17
|
-
// ── CollabSync ──────────────────────────────────────────────────────────
|
|
18
|
-
export class CollabSync {
|
|
19
|
-
client;
|
|
20
|
-
pool;
|
|
21
|
-
bridges = new Map();
|
|
22
|
-
debounceTimers = new Map();
|
|
23
|
-
unsubscribers = [];
|
|
24
|
-
workbookEventUnsubs = new Map();
|
|
25
|
-
destroyed = false;
|
|
26
|
-
/** Frames that arrived while handleInitialState was in progress. */
|
|
27
|
-
pendingUpdates = new Map();
|
|
28
|
-
/** Docs currently being initialized (guards against concurrent handleInitialState). */
|
|
29
|
-
initializing = new Set();
|
|
30
|
-
constructor(client, pool) {
|
|
31
|
-
this.client = client;
|
|
32
|
-
this.pool = pool;
|
|
33
|
-
// Wire incoming binary frames from server
|
|
34
|
-
client.on('onSyncData', (docId, data) => {
|
|
35
|
-
this.handleRemoteUpdate(docId, data);
|
|
36
|
-
});
|
|
37
|
-
// React to new workbooks added to the pool while in a room
|
|
38
|
-
const unsub = pool.onWorkbookAdded((name, wb) => {
|
|
39
|
-
if (this.destroyed)
|
|
40
|
-
return;
|
|
41
|
-
// Only sync workbooks we don't already have a bridge for
|
|
42
|
-
if (!this.bridges.has(name)) {
|
|
43
|
-
void this.shareWorkbook(name, wb);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
this.unsubscribers.push(unsub);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Start syncing all current workbooks in the pool.
|
|
50
|
-
* Called after creating/joining a room.
|
|
51
|
-
*/
|
|
52
|
-
async startSyncing() {
|
|
53
|
-
const names = this.pool.listWorkbooks();
|
|
54
|
-
for (const name of names) {
|
|
55
|
-
const wb = this.pool.getWorkbook(name);
|
|
56
|
-
await this.shareWorkbook(name, wb);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Handle initial state for a doc received from server (late joiner).
|
|
61
|
-
* Creates a new engine from raw Yrs state bytes, registers it in the pool,
|
|
62
|
-
* and starts syncing.
|
|
63
|
-
*/
|
|
64
|
-
async handleInitialState(docId, state) {
|
|
65
|
-
if (this.bridges.has(docId))
|
|
66
|
-
return;
|
|
67
|
-
if (this.initializing.has(docId))
|
|
68
|
-
return; // already creating — caller will buffer
|
|
69
|
-
this.initializing.add(docId);
|
|
70
|
-
try {
|
|
71
|
-
// Create engine from raw Yrs bytes — preserves exact Yrs item identities
|
|
72
|
-
// so that subsequent syncApply diffs merge correctly.
|
|
73
|
-
const addon = SyncBridge.getNativeAddon();
|
|
74
|
-
const engine = await createHeadlessEngine({
|
|
75
|
-
computeAddon: addon,
|
|
76
|
-
yrsState: state
|
|
77
|
-
});
|
|
78
|
-
const wb = engine.workbook;
|
|
79
|
-
const bridge = new SyncBridge(wb);
|
|
80
|
-
this.bridges.set(docId, bridge);
|
|
81
|
-
this.pool.registerWorkbook(docId, wb);
|
|
82
|
-
this.subscribeToWorkbookEvents(docId, wb);
|
|
83
|
-
// Drain any frames that arrived while we were creating the engine
|
|
84
|
-
const buffered = this.pendingUpdates.get(docId);
|
|
85
|
-
if (buffered) {
|
|
86
|
-
this.pendingUpdates.delete(docId);
|
|
87
|
-
for (const update of buffered) {
|
|
88
|
-
try {
|
|
89
|
-
await bridge.applyUpdate(update);
|
|
90
|
-
}
|
|
91
|
-
catch {
|
|
92
|
-
/* best effort */
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
catch (err) {
|
|
98
|
-
console.error(`[CollabSync] Failed to create workbook from Yrs state for "${docId}":`, err);
|
|
99
|
-
}
|
|
100
|
-
finally {
|
|
101
|
-
this.initializing.delete(docId);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Handle incoming binary from server — apply remote update to the correct bridge.
|
|
106
|
-
*/
|
|
107
|
-
async handleRemoteUpdate(docId, data) {
|
|
108
|
-
if (this.initializing.has(docId)) {
|
|
109
|
-
// Engine is being created — buffer this frame for later
|
|
110
|
-
let buf = this.pendingUpdates.get(docId);
|
|
111
|
-
if (!buf) {
|
|
112
|
-
buf = [];
|
|
113
|
-
this.pendingUpdates.set(docId, buf);
|
|
114
|
-
}
|
|
115
|
-
buf.push(data);
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
if (!this.bridges.has(docId)) {
|
|
119
|
-
await this.handleInitialState(docId, data);
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
// Incremental update — syncApply merges the Yrs diff into the engine
|
|
123
|
-
try {
|
|
124
|
-
const bridge = this.bridges.get(docId);
|
|
125
|
-
if (!bridge)
|
|
126
|
-
return;
|
|
127
|
-
await bridge.applyUpdate(data);
|
|
128
|
-
}
|
|
129
|
-
catch (err) {
|
|
130
|
-
console.error(`[CollabSync] Failed to apply remote update for "${docId}":`, err);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
destroy() {
|
|
134
|
-
this.destroyed = true;
|
|
135
|
-
for (const unsub of this.unsubscribers)
|
|
136
|
-
unsub();
|
|
137
|
-
this.unsubscribers = [];
|
|
138
|
-
for (const [, unsubs] of this.workbookEventUnsubs) {
|
|
139
|
-
for (const unsub of unsubs)
|
|
140
|
-
unsub();
|
|
141
|
-
}
|
|
142
|
-
this.workbookEventUnsubs.clear();
|
|
143
|
-
for (const [, timer] of this.debounceTimers)
|
|
144
|
-
clearTimeout(timer);
|
|
145
|
-
this.debounceTimers.clear();
|
|
146
|
-
this.bridges.clear();
|
|
147
|
-
this.pendingUpdates.clear();
|
|
148
|
-
this.initializing.clear();
|
|
149
|
-
}
|
|
150
|
-
// ── Private ────────────────────────────────────────────────────────────
|
|
151
|
-
/**
|
|
152
|
-
* Share a local workbook with the room — create a bridge, send full state,
|
|
153
|
-
* subscribe to mutation events.
|
|
154
|
-
*/
|
|
155
|
-
async shareWorkbook(name, wb) {
|
|
156
|
-
try {
|
|
157
|
-
const bridge = new SyncBridge(wb);
|
|
158
|
-
this.bridges.set(name, bridge);
|
|
159
|
-
// Subscribe to events FIRST (synchronously) so no cell changes are
|
|
160
|
-
// missed between sending the initial state and subscribing.
|
|
161
|
-
this.subscribeToWorkbookEvents(name, wb);
|
|
162
|
-
// Then send full Yrs state to server
|
|
163
|
-
const fullState = await bridge.getFullState();
|
|
164
|
-
this.client.sendSyncData(name, fullState);
|
|
165
|
-
}
|
|
166
|
-
catch (err) {
|
|
167
|
-
console.error(`[CollabSync] Failed to share workbook "${name}":`, err);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Subscribe to workbook mutation events for outbound sync.
|
|
172
|
-
* Synchronous — uses activeSheet property to avoid async gaps where
|
|
173
|
-
* cell changes could be missed.
|
|
174
|
-
*/
|
|
175
|
-
subscribeToWorkbookEvents(docId, wb) {
|
|
176
|
-
const unsubs = [];
|
|
177
|
-
const pushDebounced = () => {
|
|
178
|
-
if (this.destroyed)
|
|
179
|
-
return;
|
|
180
|
-
const existing = this.debounceTimers.get(docId);
|
|
181
|
-
if (existing)
|
|
182
|
-
clearTimeout(existing);
|
|
183
|
-
this.debounceTimers.set(docId, setTimeout(() => {
|
|
184
|
-
void this.pushLocalChanges(docId);
|
|
185
|
-
}, 50));
|
|
186
|
-
};
|
|
187
|
-
// Subscribe to active sheet events (synchronous — no missed events)
|
|
188
|
-
const activeSheet = wb.activeSheet;
|
|
189
|
-
if (activeSheet) {
|
|
190
|
-
unsubs.push(activeSheet.on('cellChanged', pushDebounced));
|
|
191
|
-
unsubs.push(activeSheet.on('structureChanged', pushDebounced));
|
|
192
|
-
}
|
|
193
|
-
// Workbook-level events (also synchronous)
|
|
194
|
-
unsubs.push(wb.on('sheetAdded', pushDebounced));
|
|
195
|
-
unsubs.push(wb.on('sheetRemoved', pushDebounced));
|
|
196
|
-
unsubs.push(wb.on('sheetRenamed', pushDebounced));
|
|
197
|
-
this.workbookEventUnsubs.set(docId, unsubs);
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Push local Yrs changes to the server for a specific doc.
|
|
201
|
-
*/
|
|
202
|
-
async pushLocalChanges(docId) {
|
|
203
|
-
const bridge = this.bridges.get(docId);
|
|
204
|
-
if (!bridge || this.destroyed)
|
|
205
|
-
return;
|
|
206
|
-
try {
|
|
207
|
-
const state = await bridge.getFullState();
|
|
208
|
-
this.client.sendSyncData(docId, state);
|
|
209
|
-
}
|
|
210
|
-
catch (err) {
|
|
211
|
-
console.error(`[CollabSync] Failed to push changes for "${docId}":`, err);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
//# sourceMappingURL=collab-sync.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { CollabAwareness } from './awareness.js';
|
|
2
|
-
export { CollabClient } from './collab-client.js';
|
|
3
|
-
export type { JoinResult } from './collab-client.js';
|
|
4
|
-
export { CollabManager, FileDisplayNameProvider, StaticDisplayNameProvider } from './collab-manager.js';
|
|
5
|
-
export type { CollabStatus, DisplayNameProvider } from './collab-manager.js';
|
|
6
|
-
export { CollabSync } from './collab-sync.js';
|
|
7
|
-
export { SyncBridge } from './sync-bridge.js';
|
|
8
|
-
export type { CollabCallbacks, CollabState, PeerInfo, ServerMessage, SheetInfo } from './types.js';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/app/collab/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { CollabAwareness } from './awareness.js';
|
|
2
|
-
export { CollabClient } from './collab-client.js';
|
|
3
|
-
export { CollabManager, FileDisplayNameProvider, StaticDisplayNameProvider } from './collab-manager.js';
|
|
4
|
-
export { CollabSync } from './collab-sync.js';
|
|
5
|
-
export { SyncBridge } from './sync-bridge.js';
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Super Fight — Multiplayer ASCII fighting game engine.
|
|
3
|
-
*
|
|
4
|
-
* Headless game logic: state, physics, hit detection, sprite rendering,
|
|
5
|
-
* frame composition, and network message encoding. Zero TUI dependencies.
|
|
6
|
-
*/
|
|
7
|
-
export declare const VIEWPORT_W = 80;
|
|
8
|
-
export declare const VIEWPORT_H = 40;
|
|
9
|
-
export declare const GROUND_Y = 34;
|
|
10
|
-
export declare const GRAVITY = 0.8;
|
|
11
|
-
export declare const JUMP_VY = -8;
|
|
12
|
-
export declare const MOVE_SPEED = 2;
|
|
13
|
-
export declare const PUNCH_RANGE = 2;
|
|
14
|
-
export declare const KICK_RANGE = 3;
|
|
15
|
-
export declare const DAMAGE = 10;
|
|
16
|
-
export declare const MAX_HEALTH = 100;
|
|
17
|
-
export declare const RESPAWN_TIME = 3000;
|
|
18
|
-
export declare const TICK_MS = 66;
|
|
19
|
-
export declare const SPRITE_W = 5;
|
|
20
|
-
export declare const SPRITE_H = 5;
|
|
21
|
-
export declare const GAME_MSG_PREFIX = "\u0001GAME:";
|
|
22
|
-
/** 8 bright ANSI colors for up to 8 players (wraps if more) */
|
|
23
|
-
export declare const PLAYER_COLORS: readonly ["\u001B[91m", "\u001B[92m", "\u001B[93m", "\u001B[94m", "\u001B[95m", "\u001B[96m", "\u001B[97m", "\u001B[33m"];
|
|
24
|
-
export declare const RESET = "\u001B[0m";
|
|
25
|
-
export type GameAction = 'idle' | 'walk-left' | 'walk-right' | 'jump' | 'crouch' | 'punch' | 'kick' | 'hit' | 'dead';
|
|
26
|
-
export type Facing = 'left' | 'right';
|
|
27
|
-
export interface PlayerState {
|
|
28
|
-
x: number;
|
|
29
|
-
y: number;
|
|
30
|
-
vy: number;
|
|
31
|
-
action: GameAction;
|
|
32
|
-
facing: Facing;
|
|
33
|
-
health: number;
|
|
34
|
-
kills: number;
|
|
35
|
-
respawnTimer: number;
|
|
36
|
-
color: string;
|
|
37
|
-
displayName: string;
|
|
38
|
-
/** Tick counter for action animation (punch/kick last a few ticks) */
|
|
39
|
-
actionTimer: number;
|
|
40
|
-
}
|
|
41
|
-
export type GameState = Map<string, PlayerState>;
|
|
42
|
-
export type GameMessage = {
|
|
43
|
-
type: 'start';
|
|
44
|
-
} | {
|
|
45
|
-
type: 'state';
|
|
46
|
-
peerId: string;
|
|
47
|
-
x: number;
|
|
48
|
-
y: number;
|
|
49
|
-
vy: number;
|
|
50
|
-
action: GameAction;
|
|
51
|
-
facing: Facing;
|
|
52
|
-
health: number;
|
|
53
|
-
kills: number;
|
|
54
|
-
} | {
|
|
55
|
-
type: 'hit';
|
|
56
|
-
targetId: string;
|
|
57
|
-
damage: number;
|
|
58
|
-
} | {
|
|
59
|
-
type: 'quit';
|
|
60
|
-
};
|
|
61
|
-
export declare function encodeGameMsg(msg: GameMessage): string;
|
|
62
|
-
export declare function decodeGameMsg(text: string): GameMessage | null;
|
|
63
|
-
export declare function createPlayer(displayName: string, colorIndex: number, x?: number): PlayerState;
|
|
64
|
-
/**
|
|
65
|
-
* Returns a 5-line array of the ASCII fighter sprite for the given pose.
|
|
66
|
-
* All sprites are exactly SPRITE_W (5) chars wide.
|
|
67
|
-
* `facing` flips the sprite horizontally.
|
|
68
|
-
*/
|
|
69
|
-
export declare function renderSprite(action: GameAction, facing: Facing): string[];
|
|
70
|
-
/**
|
|
71
|
-
* Renders a complete game frame as an array of VIEWPORT_H strings,
|
|
72
|
-
* each exactly VIEWPORT_W chars. No ANSI colors — caller wraps with color.
|
|
73
|
-
* Returns { lines, colors } where colors[row][col] is the ANSI color code.
|
|
74
|
-
*/
|
|
75
|
-
export declare function renderFrame(state: GameState, viewportW?: number, viewportH?: number): string[];
|
|
76
|
-
/**
|
|
77
|
-
* Update a single player's physics for one tick.
|
|
78
|
-
* `dt` is the number of ticks elapsed (usually 1).
|
|
79
|
-
*/
|
|
80
|
-
export declare function tickPlayer(player: PlayerState, dt?: number): void;
|
|
81
|
-
/**
|
|
82
|
-
* Check whether `attacker` is currently hitting `target`.
|
|
83
|
-
* Returns true if the attacker is punching/kicking and the target is in range.
|
|
84
|
-
*/
|
|
85
|
-
export declare function checkHit(attacker: PlayerState, target: PlayerState): boolean;
|
|
86
|
-
/**
|
|
87
|
-
* Apply damage to a target. Returns true if the hit killed them.
|
|
88
|
-
*/
|
|
89
|
-
export declare function applyDamage(target: PlayerState, amount: number): boolean;
|
|
90
|
-
//# sourceMappingURL=super-fight.d.ts.map
|