oysterun 1.6.0-beta.3 → 1.6.0-beta.30
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/README.md +18 -33
- package/bin/oysterun.mjs +156 -53
- package/dev/client/connectivity/completed-message-neighbor-click.mjs +78 -0
- package/dev/client/connectivity/completed-message-neighbor-contract.mjs +205 -0
- package/dev/client/connectivity/completed-message-visibility.d.mts +4 -4
- package/dev/client/connectivity/completed-message-visibility.mjs +14 -11
- package/dev/client/connectivity/desktop-chat-sidebar-preference.mjs +57 -0
- package/dev/client/connectivity/host-connection-feedback.mjs +15 -2
- package/dev/client/connectivity/logical-host-connection.mjs +4 -0
- package/dev/client/connectivity/managed-host-browser.d.mts +3 -0
- package/dev/client/connectivity/managed-host-browser.mjs +126 -27
- package/dev/client/connectivity/managed-host-reopen.d.mts +6 -0
- package/dev/client/connectivity/managed-host-reopen.mjs +25 -0
- package/dev/client/connectivity/matrix-sync-loop-probe.d.mts +19 -0
- package/dev/client/connectivity/matrix-sync-loop-probe.mjs +231 -0
- package/dev/client/connectivity/session-navigation-intent.mjs +189 -0
- package/dev/client/connectivity/session-transition-state.mjs +18 -6
- package/dev/client/connectivity/test-completed-message-neighbor-click.mjs +180 -0
- package/dev/client/web/index.html +7765 -2136
- package/dev/client/web-chat/dist/assets/{ReactPrism-Chsj3p9L.js → ReactPrism-CO4xV6l8.js} +1 -1
- package/dev/client/web-chat/dist/assets/{ReactPrism-Chsj3p9L.js.map → ReactPrism-CO4xV6l8.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/SessionsSetupApp-DDYg7Dal.js +6308 -0
- package/dev/client/web-chat/dist/assets/SessionsSetupApp-DDYg7Dal.js.map +1 -0
- package/dev/client/web-chat/dist/assets/SessionsSetupApp-ovvzywbc.css +1 -0
- package/dev/client/web-chat/dist/assets/index-BQkeZ7W7.js +2 -0
- package/dev/client/web-chat/dist/assets/index-BQkeZ7W7.js.map +1 -0
- package/dev/client/web-chat/dist/assets/index-D25Gaecs.js +9 -0
- package/dev/client/web-chat/dist/assets/index-D25Gaecs.js.map +1 -0
- package/dev/client/web-chat/dist/assets/{index-CcOapdfg.js → index-D2KjgMpD.js} +2 -2
- package/dev/client/web-chat/dist/assets/{index-CcOapdfg.js.map → index-D2KjgMpD.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/matrix-entry-B4wx48bc.css +10 -0
- package/dev/client/web-chat/dist/assets/matrix-entry-CqyPPDxc.js +596 -0
- package/dev/client/web-chat/dist/assets/matrix-entry-CqyPPDxc.js.map +1 -0
- package/dev/client/web-chat/dist/assets/{pdf-Cd7sy_OV.js → pdf-CCaMtRCr.js} +5 -5
- package/dev/client/web-chat/dist/assets/pdf-CCaMtRCr.js.map +1 -0
- package/dev/client/web-chat/dist/assets/provider-avatars/chatgpt-appicon-8a072cc2fbab.png +0 -0
- package/dev/client/web-chat/dist/assets/provider-avatars/grok-appicon-7e118198f5a9.png +0 -0
- package/dev/client/web-chat/dist/assets/session-notice-DlyODy1z.css +1 -0
- package/dev/client/web-chat/dist/assets/web-Cmxm9lj7.js +1 -0
- package/dev/client/web-chat/dist/assets/{web-BMz0dXMZ.js.map → web-Cmxm9lj7.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/web-PuV1Famk.js +1 -0
- package/dev/client/web-chat/dist/assets/{web-Cl9sGVvB.js.map → web-PuV1Famk.js.map} +1 -1
- package/dev/client/web-chat/dist/index.html +1 -2
- package/docs/routec/config_hierachy.md +28 -22
- package/docs/routec/dev/host_posthog.md +0 -1
- package/docs/routec/dev/host_update_runtime_identity.md +42 -1
- package/docs/routec/dev/npm_native_dependency_install.md +6 -2
- package/docs/routec/dev/p262_setup_input_file.md +117 -0
- package/docs/routec/dev/provider_prompt_file_slash_shortcuts.md +4 -0
- package/docs/routec/dev/provider_startup_diagnostics.md +38 -2
- package/docs/routec/form_UI_fields.md +1 -2
- package/docs/routec/host2_turn_started_idempotency_diagnostics.md +8 -7
- package/docs/routec/host_cloud_app_auth.md +4 -4
- package/docs/routec/host_setup.md +78 -47
- package/docs/routec/oysterun_operation_interface_spec.md +91 -11
- package/docs/routec/provider_contract.md +53 -8
- package/docs/routec/skill_installation.md +2 -2
- package/host-service/README.md +57 -54
- package/host-service/adapters/claude-code-adapter.mjs +1215 -65
- package/host-service/adapters/codex-app-server-adapter.mjs +495 -80
- package/host-service/adapters/debug-fixture-provider-adapter.mjs +100 -1
- package/host-service/adapters/grok-acp-adapter.mjs +178 -86
- package/host-service/adapters/provider-stdout-lines.mjs +38 -0
- package/host-service/agent-config-migration.mjs +3 -2
- package/host-service/agent-config.mjs +44 -35
- package/host-service/agent-folder-availability.mjs +41 -0
- package/host-service/apns-complete-message-dispatcher.mjs +7 -7
- package/host-service/apns-config.mjs +2 -1
- package/host-service/apns-device-store.mjs +7 -3
- package/host-service/assets/product-skills/Oysterun/SKILL.md +67 -26
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-mail/SKILL.md +34 -81
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-mail/scripts/oysterun_mail.mjs +10 -22
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-notifications/SKILL.md +22 -38
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-notifications/scripts/oysterun_notifications.mjs +10 -22
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-scheduler/SKILL.md +55 -139
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-scheduler/scripts/oysterun_scheduler.mjs +10 -22
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-session-chat/SKILL.md +100 -194
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-session-chat/scripts/oysterun_session_chat.mjs +10 -22
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-sessions/SKILL.md +119 -164
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-sessions/references/session-activity.md +25 -0
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-sessions/scripts/oysterun_sessions.mjs +10 -22
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-telegram/SKILL.md +59 -110
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-telegram/scripts/oysterun_telegram.mjs +10 -22
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-website/SKILL.md +115 -253
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-website/scripts/oysterun_website.mjs +10 -22
- package/host-service/assets/product-skills/oysterun-mail/SKILL.md +34 -81
- package/host-service/assets/product-skills/oysterun-mail/scripts/oysterun_mail.mjs +10 -22
- package/host-service/assets/product-skills/oysterun-notifications/SKILL.md +22 -38
- package/host-service/assets/product-skills/oysterun-notifications/scripts/oysterun_notifications.mjs +10 -22
- package/host-service/assets/product-skills/oysterun-scheduler/SKILL.md +55 -139
- package/host-service/assets/product-skills/oysterun-scheduler/scripts/oysterun_scheduler.mjs +10 -22
- package/host-service/assets/product-skills/oysterun-session-chat/SKILL.md +100 -194
- package/host-service/assets/product-skills/oysterun-session-chat/scripts/oysterun_session_chat.mjs +10 -22
- package/host-service/assets/product-skills/oysterun-sessions/SKILL.md +119 -164
- package/host-service/assets/product-skills/oysterun-sessions/references/session-activity.md +25 -0
- package/host-service/assets/product-skills/oysterun-sessions/scripts/oysterun_sessions.mjs +10 -22
- package/host-service/assets/product-skills/oysterun-telegram/SKILL.md +59 -110
- package/host-service/assets/product-skills/oysterun-telegram/scripts/oysterun_telegram.mjs +10 -22
- package/host-service/assets/product-skills/oysterun-website/SKILL.md +115 -253
- package/host-service/assets/product-skills/oysterun-website/scripts/oysterun_website.mjs +10 -22
- package/host-service/atomic-file.mjs +185 -14
- package/host-service/browser-root-project-index.mjs +21 -0
- package/host-service/callback-durable-store.mjs +390 -47
- package/host-service/callback-foundation.mjs +21 -1
- package/host-service/callback-host-integration.mjs +427 -30
- package/host-service/callback-provider-replay.mjs +100 -0
- package/host-service/claude-acp-model-discovery.mjs +130 -41
- package/host-service/claude-acp-model-error-classification.mjs +97 -0
- package/host-service/claude-handoff-completion.mjs +13 -0
- package/host-service/cli/assert-installer-reinstall-target.mjs +9 -0
- package/host-service/cli/check-storage-migration.mjs +41 -0
- package/host-service/cli/installer-recovery-guidance.mjs +20 -0
- package/host-service/cli/prepare-restart-restore.mjs +2 -0
- package/host-service/cli/prepare-storage-layout.mjs +41 -0
- package/host-service/cli/product-cli.mjs +340 -100
- package/host-service/cli/reconcile-initial-preflight.mjs +19 -0
- package/host-service/cli/recover-installer-lifecycle.mjs +25 -0
- package/host-service/cli/run-host-lifecycle.mjs +28 -2
- package/host-service/cli/run-staged-lifecycle-recovery.mjs +161 -0
- package/host-service/cli-profile-storage.mjs +69 -0
- package/host-service/cli.mjs +3 -3
- package/host-service/cloud-identity-envelope.mjs +93 -0
- package/host-service/cloud-self-retirement.mjs +159 -0
- package/host-service/codex-model-discovery.mjs +23 -18
- package/host-service/complete-cli-uninstall.mjs +198 -0
- package/host-service/complete-message-notification-predicate.mjs +8 -6
- package/host-service/complete-message-notification-title.mjs +4 -0
- package/host-service/completed-session-unread.mjs +425 -42
- package/host-service/completed-turn-navigation.mjs +444 -144
- package/host-service/completed-turn-notification-observer.mjs +129 -0
- package/host-service/completed-turn-service.mjs +445 -0
- package/host-service/config-storage-shape.mjs +20 -0
- package/host-service/config.mjs +336 -324
- package/host-service/connectivity/managed-tunnel-runtime-status.mjs +5 -5
- package/host-service/connectivity/transport-usage-circuit-store.mjs +2 -6
- package/host-service/connectivity/webrtc-signaling-service.mjs +28 -3
- package/host-service/debug-options-registry.mjs +35 -0
- package/host-service/debug-options.mjs +44 -0
- package/host-service/desired-open-restore-wait.mjs +69 -0
- package/host-service/desired-open-session-state.mjs +353 -0
- package/host-service/fixtures/p204-grok-acp-1.0.25-fixture.mjs +4 -0
- package/host-service/fixtures/p218-completed-turn-notification.json +11 -0
- package/host-service/frp-agent.mjs +253 -81
- package/host-service/grok-acp-model-discovery.mjs +31 -33
- package/host-service/host-lifecycle-recovery.mjs +59 -8
- package/host-service/host-login-bootstrap-tokens.mjs +21 -34
- package/host-service/host-port-resolution.mjs +98 -0
- package/host-service/host-restart-login-gate.mjs +4 -7
- package/host-service/host-runtime-diagnostics.mjs +28 -18
- package/host-service/host-telemetry.mjs +71 -6
- package/host-service/initial-preflight-recovery.mjs +72 -0
- package/host-service/installer-recovery-guidance.mjs +86 -0
- package/host-service/installer-reinstall-bindings.mjs +50 -0
- package/host-service/installer-reinstall-target.mjs +50 -0
- package/host-service/large-tool-call-store.mjs +4 -2
- package/host-service/lifecycle-compat-cli.mjs +13 -0
- package/host-service/lifecycle-compat-preload.mjs +89 -0
- package/host-service/lifecycle-compatibility.mjs +165 -0
- package/host-service/lifecycle-continuity-assets.mjs +236 -0
- package/host-service/lifecycle-continuity-probe.mjs +103 -0
- package/host-service/lifecycle-continuity-projection.mjs +31 -0
- package/host-service/lifecycle-continuity-runner.mjs +185 -0
- package/host-service/lifecycle-continuity.mjs +546 -0
- package/host-service/lifecycle-diagnostics.mjs +54 -8
- package/host-service/lifecycle-service-render-bundle.mjs +121 -0
- package/host-service/lifecycle-user-path.mjs +38 -0
- package/host-service/link-annotations.mjs +10 -0
- package/host-service/log-retention.mjs +199 -0
- package/host-service/mail-notification-dispatcher.mjs +6 -7
- package/host-service/mail-store.mjs +2 -1
- package/host-service/managed-identity-lifecycle.mjs +3 -31
- package/host-service/matrix-credential-issuer.mjs +32 -1
- package/host-service/matrix-event-correlator.mjs +166 -27
- package/host-service/matrix-event-writer.mjs +11 -0
- package/host-service/matrix-facade.mjs +119 -35
- package/host-service/matrix-read-authority.mjs +6 -137
- package/host-service/matrix-room-binding.mjs +76 -11
- package/host-service/matrix-transcript-read-adapter.mjs +24 -3
- package/host-service/model-discovery-guardian.mjs +40 -0
- package/host-service/model-discovery-process.mjs +141 -0
- package/host-service/node-npm-runtime-identity.mjs +2 -1
- package/host-service/onboard-lifecycle-status.mjs +28 -0
- package/host-service/onboard.mjs +445 -0
- package/host-service/package.json +4 -3
- package/host-service/plan-limit-readers.mjs +115 -0
- package/host-service/plan-limit-service.mjs +105 -0
- package/host-service/portable-scheduler-definitions.mjs +42 -6
- package/host-service/product-runtime-host-origin.mjs +10 -13
- package/host-service/provider-model-params.mjs +51 -91
- package/host-service/provider-model-refresh-runner.mjs +170 -178
- package/host-service/provider-model-refresh-schedule.mjs +11 -0
- package/host-service/provider-registry.mjs +27 -26
- package/host-service/provider-retry-state.mjs +43 -0
- package/host-service/provider-skill-roots.mjs +23 -0
- package/host-service/provider-startup-preflight.mjs +50 -4
- package/host-service/registered-update-authority.mjs +0 -13
- package/host-service/replay-claude-acp-raw-events.mjs +12 -5
- package/host-service/restart-restore-state.mjs +29 -7
- package/host-service/restore-log.mjs +107 -0
- package/host-service/retained-host-state-holder.mjs +57 -0
- package/host-service/routec-artifacts.mjs +6 -4
- package/host-service/routec-matrix-media-store.mjs +8 -12
- package/host-service/routec-matrix-sqlite-store.mjs +209 -81
- package/host-service/routec-matrix-storage-adapter.mjs +247 -282
- package/host-service/routec-matrix-storage-paths.mjs +26 -0
- package/host-service/routec-matrix-stream-seq-repair.mjs +5 -6
- package/host-service/routec-request-delay-window.mjs +55 -0
- package/host-service/routec-viewport-geometry-diagnostics.mjs +2 -1
- package/host-service/scheduler-acp-provider-runner.mjs +4 -1
- package/host-service/scheduler-direct-provider-runner.mjs +95 -9
- package/host-service/scheduler-run-timeout-policy.mjs +85 -0
- package/host-service/scheduler-service.mjs +135 -24
- package/host-service/scheduler-setup-snapshot-contract.mjs +12 -0
- package/host-service/scheduler-store.mjs +11 -3
- package/host-service/scheduler-time-window.mjs +47 -0
- package/host-service/server.mjs +2962 -1482
- package/host-service/service-control-token.mjs +7 -13
- package/host-service/service-definition-migration.mjs +78 -14
- package/host-service/session-assets.mjs +3 -2
- package/host-service/session-collection-service.mjs +335 -0
- package/host-service/session-history.mjs +88 -20
- package/host-service/session-list-preview-service.mjs +87 -12
- package/host-service/session-list-projection-service.mjs +182 -0
- package/host-service/session-loop-definitions.mjs +694 -84
- package/host-service/session-manager.mjs +919 -125
- package/host-service/session-name-counter-store.mjs +5 -18
- package/host-service/session-name.mjs +0 -22
- package/host-service/session-notification-settings-store.mjs +3 -2
- package/host-service/session-switcher-projection.mjs +11 -3
- package/host-service/session-tags.mjs +428 -0
- package/host-service/session-transcript-target.mjs +100 -0
- package/host-service/setup-cli-args.mjs +162 -0
- package/host-service/setup-input-file.mjs +93 -0
- package/host-service/setup-provider-model-defaults.mjs +59 -0
- package/host-service/setup.mjs +159 -711
- package/host-service/stopped-user-host-package.mjs +61 -0
- package/host-service/storage-continuity.mjs +120 -0
- package/host-service/storage-database.mjs +146 -0
- package/host-service/storage-layout-cli.mjs +15 -0
- package/host-service/storage-layout.mjs +402 -0
- package/host-service/storage-lifecycle.mjs +337 -0
- package/host-service/storage-lock.mjs +178 -0
- package/host-service/storage-migration.mjs +978 -0
- package/host-service/storage-references.mjs +72 -0
- package/host-service/storage-service-binding.mjs +255 -0
- package/host-service/storage-snapshot.mjs +140 -0
- package/host-service/telegram-adapter.mjs +7 -1
- package/host-service/telegram-bridge.mjs +626 -130
- package/host-service/telegram-media.mjs +11 -14
- package/host-service/test-fixtures/p236-navigation-original.mjs +500 -0
- package/host-service/test-fixtures/p316/rca-run1-chunks.json +71 -0
- package/host-service/test-fixtures/p316/rca-run2-chunks.json +213 -0
- package/host-service/test-fixtures/p329/claude-bridge-0.44.0-bash-read-edit.json +575 -0
- package/host-service/test-fixtures/p329/claude-bridge-0.93.0-bash-read-edit.json +688 -0
- package/host-service/test-fixtures/p329/grok-1.0.50-bash-read-edit.json +618 -0
- package/host-service/test-fixtures/p348/A2J_093.json +1119 -0
- package/host-service/test-fixtures/p348/A2m_093.json +709 -0
- package/host-service/test-fixtures/p348/AM_093.json +946 -0
- package/host-service/test-fixtures/p348/AS_093.json +727 -0
- package/host-service/test-fixtures/p348/R1_desync093.json +4948 -0
- package/host-service/test-fixtures/p348/R2_owner_during093.json +731 -0
- package/host-service/test-fixtures/p348/SC2_093.json +1813 -0
- package/host-service/test-fixtures/p348/SK_093.json +656 -0
- package/host-service/test-fixtures/p348/SL2_093.json +334 -0
- package/host-service/test-fixtures/p348/fake-claude-agent-acp.cjs +244 -0
- package/host-service/tool-event-detail-store.mjs +8 -11
- package/host-service/transcript-store.mjs +16 -14
- package/host-service/update-operation-currency.mjs +49 -0
- package/host-service/update-reminder-state.mjs +72 -11
- package/host-service/upload-manager.mjs +3 -2
- package/host-service/usage-normalization.mjs +53 -0
- package/host-service/usage-statistics.mjs +102 -0
- package/host-service/usage-store.mjs +205 -0
- package/host-service/voice-input-receipt-store.mjs +60 -0
- package/host-service/voice-input-service.mjs +5 -13
- package/host-service/voice-input-usage-store.mjs +2 -1
- package/package.json +4 -3
- package/static/oysterun-social-preview.png +0 -0
- package/static/site/assets/oysterun-social-preview.png +0 -0
- package/static/site/blog/en/index.html +17 -0
- package/static/site/blog/generated_manifest.json +9 -9
- package/static/site/blog/index.html +18 -0
- package/static/site/blog/voice-input-model-experiment/en/index.html +17 -0
- package/static/site/blog/voice-input-model-experiment/zh/index.html +17 -0
- package/static/site/blog/zh/index.html +17 -0
- package/static/site/docs/choose-and-recover-a-provider/assets/publication/provider-refresh-ready.png +0 -0
- package/static/site/docs/choose-and-recover-a-provider/assets/publication-screenshots.json +22 -12
- package/static/site/docs/choose-and-recover-a-provider/en/index.html +19 -2
- package/static/site/docs/choose-and-recover-a-provider/en/index.md +2 -2
- package/static/site/docs/choose-and-recover-a-provider/zh/index.html +19 -2
- package/static/site/docs/choose-and-recover-a-provider/zh/index.md +2 -2
- package/static/site/docs/configure-session-files-and-settings/assets/publication/folder-picker-focused.png +0 -0
- package/static/site/docs/configure-session-files-and-settings/assets/publication/session-profile-root.png +0 -0
- package/static/site/docs/configure-session-files-and-settings/assets/publication/session-setup-confirmed.png +0 -0
- package/static/site/docs/configure-session-files-and-settings/assets/publication-screenshots.json +18 -18
- package/static/site/docs/configure-session-files-and-settings/en/index.html +21 -4
- package/static/site/docs/configure-session-files-and-settings/en/index.md +3 -3
- package/static/site/docs/configure-session-files-and-settings/zh/index.html +21 -4
- package/static/site/docs/configure-session-files-and-settings/zh/index.md +3 -3
- package/static/site/docs/en/index.html +17 -0
- package/static/site/docs/generated_manifest.json +119 -119
- package/static/site/docs/host-authentication-and-connection/assets/publication/sessions-connected-managed.png +0 -0
- package/static/site/docs/host-authentication-and-connection/assets/publication-screenshots.json +13 -13
- package/static/site/docs/host-authentication-and-connection/en/index.html +24 -7
- package/static/site/docs/host-authentication-and-connection/en/index.md +9 -9
- package/static/site/docs/host-authentication-and-connection/zh/index.html +24 -7
- package/static/site/docs/host-authentication-and-connection/zh/index.md +9 -9
- package/static/site/docs/index.html +18 -0
- package/static/site/docs/install-and-use-a-skill/en/index.html +17 -1
- package/static/site/docs/install-and-use-a-skill/en/index.md +0 -4
- package/static/site/docs/install-and-use-a-skill/zh/index.html +17 -1
- package/static/site/docs/install-and-use-a-skill/zh/index.md +0 -4
- package/static/site/docs/read-large-tool-results/en/index.html +17 -0
- package/static/site/docs/read-large-tool-results/zh/index.html +17 -0
- package/static/site/docs/recover-from-a-host-runtime-error/en/index.html +17 -0
- package/static/site/docs/recover-from-a-host-runtime-error/zh/index.html +17 -0
- package/static/site/docs/restore-work-after-a-host-restart/assets/publication/restart-control.png +0 -0
- package/static/site/docs/restore-work-after-a-host-restart/assets/publication-screenshots.json +7 -7
- package/static/site/docs/restore-work-after-a-host-restart/en/index.html +19 -2
- package/static/site/docs/restore-work-after-a-host-restart/en/index.md +2 -2
- package/static/site/docs/restore-work-after-a-host-restart/zh/index.html +19 -2
- package/static/site/docs/restore-work-after-a-host-restart/zh/index.md +2 -2
- package/static/site/docs/send-images-and-media/en/index.html +17 -0
- package/static/site/docs/send-images-and-media/zh/index.html +17 -0
- package/static/site/docs/set-up-and-understand-a-host/assets/publication/host-identity-browse-root.png +0 -0
- package/static/site/docs/set-up-and-understand-a-host/assets/publication/host-setup-managed-ready.png +0 -0
- package/static/site/docs/set-up-and-understand-a-host/assets/publication/host-setup-seven-steps.png +0 -0
- package/static/site/docs/set-up-and-understand-a-host/assets/publication/session-profile-identity.png +0 -0
- package/static/site/docs/set-up-and-understand-a-host/assets/publication/session-setup-identity.png +0 -0
- package/static/site/docs/set-up-and-understand-a-host/assets/publication/website-link.png +0 -0
- package/static/site/docs/set-up-and-understand-a-host/assets/publication-screenshots.json +63 -51
- package/static/site/docs/set-up-and-understand-a-host/en/index.html +34 -17
- package/static/site/docs/set-up-and-understand-a-host/en/index.md +16 -48
- package/static/site/docs/set-up-and-understand-a-host/zh/index.html +34 -17
- package/static/site/docs/set-up-and-understand-a-host/zh/index.md +16 -48
- package/static/site/docs/understand-agent-activity/en/index.html +19 -2
- package/static/site/docs/understand-agent-activity/en/index.md +2 -2
- package/static/site/docs/understand-agent-activity/zh/index.html +19 -2
- package/static/site/docs/understand-agent-activity/zh/index.md +2 -2
- package/static/site/docs/use-the-oysterun-cli-safely/en/index.html +18 -1
- package/static/site/docs/use-the-oysterun-cli-safely/en/index.md +0 -4
- package/static/site/docs/use-the-oysterun-cli-safely/zh/index.html +18 -1
- package/static/site/docs/use-the-oysterun-cli-safely/zh/index.md +0 -4
- package/static/site/docs/zh/index.html +17 -0
- package/static/site/en/index.html +18 -1
- package/static/site/en/index.md +1 -1
- package/static/site/faq/en/index.html +17 -0
- package/static/site/faq/index.html +18 -0
- package/static/site/faq/zh/index.html +17 -0
- package/static/site/getting-started/en/index.html +23 -1
- package/static/site/getting-started/en/index.md +7 -1
- package/static/site/getting-started/index.html +18 -0
- package/static/site/getting-started/zh/index.html +23 -1
- package/static/site/getting-started/zh/index.md +7 -1
- package/static/site/index.html +18 -0
- package/static/site/install.sh +738 -127
- package/static/site/overview/en/index.html +18 -1
- package/static/site/overview/en/index.md +2 -2
- package/static/site/overview/index.html +18 -0
- package/static/site/overview/zh/index.html +18 -1
- package/static/site/overview/zh/index.md +2 -2
- package/static/site/privacy/en/index.html +17 -0
- package/static/site/privacy/index.html +18 -0
- package/static/site/privacy/zh/index.html +17 -0
- package/static/site/zh/index.html +18 -1
- package/static/site/zh/index.md +1 -1
- package/static/site_source/content/AGENTS.md +8 -15
- package/static/site_source/content/tutorials/published/choose-and-recover-a-provider/assets/publication/provider-refresh-ready.png +0 -0
- package/static/site_source/content/tutorials/published/choose-and-recover-a-provider/assets/publication-screenshots.json +22 -12
- package/static/site_source/content/tutorials/published/choose-and-recover-a-provider/en/article.html +2 -2
- package/static/site_source/content/tutorials/published/choose-and-recover-a-provider/zh/article.html +2 -2
- package/static/site_source/content/tutorials/published/configure-session-files-and-settings/assets/publication/folder-picker-focused.png +0 -0
- package/static/site_source/content/tutorials/published/configure-session-files-and-settings/assets/publication/session-profile-root.png +0 -0
- package/static/site_source/content/tutorials/published/configure-session-files-and-settings/assets/publication/session-setup-confirmed.png +0 -0
- package/static/site_source/content/tutorials/published/configure-session-files-and-settings/assets/publication-screenshots.json +18 -18
- package/static/site_source/content/tutorials/published/configure-session-files-and-settings/en/article.html +3 -3
- package/static/site_source/content/tutorials/published/configure-session-files-and-settings/zh/article.html +3 -3
- package/static/site_source/content/tutorials/published/host-authentication-and-connection/assets/publication/sessions-connected-managed.png +0 -0
- package/static/site_source/content/tutorials/published/host-authentication-and-connection/assets/publication-screenshots.json +13 -13
- package/static/site_source/content/tutorials/published/host-authentication-and-connection/en/article.html +6 -6
- package/static/site_source/content/tutorials/published/host-authentication-and-connection/zh/article.html +6 -6
- package/static/site_source/content/tutorials/published/install-and-use-a-skill/en/article.html +0 -1
- package/static/site_source/content/tutorials/published/install-and-use-a-skill/zh/article.html +0 -1
- package/static/site_source/content/tutorials/published/restore-work-after-a-host-restart/assets/publication/restart-control.png +0 -0
- package/static/site_source/content/tutorials/published/restore-work-after-a-host-restart/assets/publication-screenshots.json +7 -7
- package/static/site_source/content/tutorials/published/restore-work-after-a-host-restart/en/article.html +2 -2
- package/static/site_source/content/tutorials/published/restore-work-after-a-host-restart/zh/article.html +2 -2
- package/static/site_source/content/tutorials/published/set-up-and-understand-a-host/assets/publication/host-identity-browse-root.png +0 -0
- package/static/site_source/content/tutorials/published/set-up-and-understand-a-host/assets/publication/host-setup-managed-ready.png +0 -0
- package/static/site_source/content/tutorials/published/set-up-and-understand-a-host/assets/publication/host-setup-seven-steps.png +0 -0
- package/static/site_source/content/tutorials/published/set-up-and-understand-a-host/assets/publication/session-profile-identity.png +0 -0
- package/static/site_source/content/tutorials/published/set-up-and-understand-a-host/assets/publication/session-setup-identity.png +0 -0
- package/static/site_source/content/tutorials/published/set-up-and-understand-a-host/assets/publication/website-link.png +0 -0
- package/static/site_source/content/tutorials/published/set-up-and-understand-a-host/assets/publication-screenshots.json +63 -51
- package/static/site_source/content/tutorials/published/set-up-and-understand-a-host/en/article.html +16 -16
- package/static/site_source/content/tutorials/published/set-up-and-understand-a-host/zh/article.html +16 -16
- package/static/site_source/content/tutorials/published/understand-agent-activity/en/article.html +2 -2
- package/static/site_source/content/tutorials/published/understand-agent-activity/zh/article.html +2 -2
- package/static/site_source/content/tutorials/published/use-the-oysterun-cli-safely/en/article.html +1 -1
- package/static/site_source/content/tutorials/published/use-the-oysterun-cli-safely/zh/article.html +1 -1
- package/static/site_source/downloads/install.sh +738 -127
- package/static/site_source/manifests/host_install.json +2 -10
- package/static/site_source/pages/getting-started/en.html +6 -1
- package/static/site_source/pages/getting-started/zh.html +6 -1
- package/static/site_source/pages/home/en.html +1 -1
- package/static/site_source/pages/home/zh.html +1 -1
- package/static/site_source/pages/home_main.html +3 -2
- package/static/site_source/pages/overview/en.html +1 -1
- package/static/site_source/pages/overview/zh.html +1 -1
- package/tool_scripts/install_oysterun_launch_agents.sh +2 -2
- package/tool_scripts/install_oysterun_update.mjs +169 -44
- package/tool_scripts/oysterun_continuity_transaction.mjs +442 -0
- package/tool_scripts/oysterun_npm_package_manifest.mjs +48 -2
- package/tool_scripts/oysterun_release_service.sh +6 -1
- package/tool_scripts/oysterun_service_common.sh +134 -97
- package/tool_scripts/oysterun_setup_input.sh +158 -0
- package/tool_scripts/oysterun_update_restart_runner.mjs +22 -8
- package/tool_scripts/p233_legacy_bootstrap.mjs +254 -0
- package/tool_scripts/resolve_user_host_port.mjs +15 -0
- package/tool_scripts/restart_oysterun.sh +8 -2
- package/tool_scripts/run_oysterun_host.sh +1 -0
- package/tool_scripts/stack_dashboard_credentials.mjs +29 -27
- package/tool_scripts/start_oysterun.sh +2 -0
- package/tool_scripts/status_oysterun_launch_agents.sh +15 -3
- package/tool_scripts/sync_host_stack_config.mjs +27 -14
- package/tool_scripts/test_environment_remote_cloud_deprovision.mjs +439 -0
- package/tool_scripts/uninstall_oysterun_launch_agents.sh +5 -7
- package/dev/client/web-chat/dist/assets/claude-CPMyJvIE.png +0 -0
- package/dev/client/web-chat/dist/assets/codex-BLUvfd-t.png +0 -0
- package/dev/client/web-chat/dist/assets/index-Bs8tQ8Ue.js +0 -129
- package/dev/client/web-chat/dist/assets/index-Bs8tQ8Ue.js.map +0 -1
- package/dev/client/web-chat/dist/assets/index-DqrkWi1U.js +0 -2
- package/dev/client/web-chat/dist/assets/index-DqrkWi1U.js.map +0 -1
- package/dev/client/web-chat/dist/assets/index-NYnaSGBb.css +0 -1
- package/dev/client/web-chat/dist/assets/pdf-Cd7sy_OV.js.map +0 -1
- package/dev/client/web-chat/dist/assets/web-BMz0dXMZ.js +0 -1
- package/dev/client/web-chat/dist/assets/web-Cl9sGVvB.js +0 -1
- package/docs/routec/dev/cloud_deplyments.md +0 -909
- package/docs/routec/dev/npmjs_publish.md +0 -639
- package/host-service/agent-store-demo.mjs +0 -369
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-find-context/SKILL.md +0 -97
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-find-context/scripts/oysterun_find_context.mjs +0 -49
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-mail/scripts/send_mail.mjs +0 -364
- package/host-service/assets/product-skills/oysterun-find-context/SKILL.md +0 -97
- package/host-service/assets/product-skills/oysterun-find-context/scripts/oysterun_find_context.mjs +0 -49
- package/host-service/assets/product-skills/oysterun-mail/scripts/send_mail.mjs +0 -364
- package/static/site/docs/host-authentication-and-connection/assets/publication/sessions-connected-direct-host.png +0 -0
- package/static/site_source/content/tutorials/published/host-authentication-and-connection/assets/publication/sessions-connected-direct-host.png +0 -0
package/README.md
CHANGED
|
@@ -130,7 +130,6 @@ Oysterun through its supported CLI rather than direct Host API calls:
|
|
|
130
130
|
|
|
131
131
|
- `skills/oysterun-sessions`
|
|
132
132
|
- `skills/oysterun-session-chat`
|
|
133
|
-
- `skills/oysterun-find-context`
|
|
134
133
|
- `skills/oysterun-scheduler`
|
|
135
134
|
- `skills/oysterun-notifications`
|
|
136
135
|
- `skills/oysterun-mail`
|
|
@@ -177,7 +176,7 @@ Oysterun/
|
|
|
177
176
|
dev/client/ Host-served web client source
|
|
178
177
|
docs/ Product, design, auth, mock, and TODO docs
|
|
179
178
|
local notes Gitignored working notes, reports, and ad hoc verification files
|
|
180
|
-
temp/ Local export output from tool_scripts/export_key_files.sh
|
|
179
|
+
temp/ Local export output from OysterunTeam/tool_scripts/export_key_files.sh
|
|
181
180
|
test-results/ Playwright output
|
|
182
181
|
tool_scripts/ One-off local utilities
|
|
183
182
|
investigation-repos/ Reference repos used for research only
|
|
@@ -186,7 +185,7 @@ Oysterun/
|
|
|
186
185
|
Folders you can usually ignore when reading product code:
|
|
187
186
|
|
|
188
187
|
- gitignored operational notes: plans, reports, and ad hoc verification files
|
|
189
|
-
- `temp/`: export bundles created by `tool_scripts/export_key_files.sh`
|
|
188
|
+
- `temp/`: export bundles created by `OysterunTeam/tool_scripts/export_key_files.sh`
|
|
190
189
|
- `test-results/`: Playwright run output such as `.last-run.json`, traces, screenshots, and other browser-test artifacts
|
|
191
190
|
- `investigation-repos/`: external reference code, not the Oysterun runtime itself
|
|
192
191
|
|
|
@@ -248,9 +247,7 @@ npm start
|
|
|
248
247
|
Useful commands:
|
|
249
248
|
|
|
250
249
|
```bash
|
|
251
|
-
npm run setup # first-run Managed Tunnel Host setup
|
|
252
|
-
node host-service/setup.mjs # source-local Direct Host setup
|
|
253
|
-
node bin/oysterun.mjs setup --local # explicit local-only Direct setup
|
|
250
|
+
npm run setup # first-run Managed Tunnel Host setup (the only setup path)
|
|
254
251
|
npm start # plain start, no watch mode
|
|
255
252
|
npm run dev # watch mode for Host JS files
|
|
256
253
|
npm run cli # local CLI client
|
|
@@ -265,16 +262,13 @@ Default local URLs when you run `npm start` or `npm run dev` directly with the c
|
|
|
265
262
|
Port notes:
|
|
266
263
|
|
|
267
264
|
- production default is `8802` in `~/.oysterun/config.json`
|
|
268
|
-
-
|
|
269
|
-
- disposable test slots use `3022`, `3302`, `4022`, and `4402`
|
|
265
|
+
- task and development Hosts use a custom stack with an explicit `--port`
|
|
270
266
|
- phone app verification can use any running Host port; point the app at the actual user-approved port for that run
|
|
271
267
|
- backend URL default is `http://localhost:8000`
|
|
272
268
|
- Host config is stored in `~/.oysterun/config.json`
|
|
273
|
-
- direct mode can also store an optional `public_base_url` there for manual client connection
|
|
274
269
|
- fresh Session Setup runtime defaults, including interface style plus Claude/Codex provider defaults, are stored there under `session_defaults`
|
|
275
270
|
- Host Preferences shows the active config path, so `OYSTERUN_CONFIG_DIR` overrides are visible in the UI
|
|
276
|
-
-
|
|
277
|
-
- source-local setup and `oysterun setup --local` retain explicit Direct mode
|
|
271
|
+
- every setup registers the Host with Oysterun Managed Tunnel; the registered Tunnel URL is the Host's formal address for the web, the App, login QR codes, the CLI and Agents (P296). The local listener and loopback health URLs remain internal addresses.
|
|
278
272
|
|
|
279
273
|
### Optional: start backend + Host together for repo development
|
|
280
274
|
|
|
@@ -282,8 +276,7 @@ For local repo development, you can launch the backend and Host together with th
|
|
|
282
276
|
|
|
283
277
|
```bash
|
|
284
278
|
cd <repo-root>
|
|
285
|
-
./tool_scripts/dev_up.sh
|
|
286
|
-
./tool_scripts/dev_up.sh --stack staging
|
|
279
|
+
./tool_scripts/dev_up.sh --stack <name> --port <host_port> --backend_port <backend_port>
|
|
287
280
|
```
|
|
288
281
|
|
|
289
282
|
What it does:
|
|
@@ -291,7 +284,7 @@ What it does:
|
|
|
291
284
|
- rebuilds `dev/client/web/index.html`
|
|
292
285
|
- starts the selected development backend in reload mode
|
|
293
286
|
- starts the selected Host in watch mode
|
|
294
|
-
-
|
|
287
|
+
- requires a named custom stack (there is no default)
|
|
295
288
|
- syncs the stack-owned Host port before start
|
|
296
289
|
- stops both when you press `Ctrl-C`
|
|
297
290
|
|
|
@@ -327,9 +320,9 @@ Convenience wrappers are also available at:
|
|
|
327
320
|
Stack-specific usage:
|
|
328
321
|
|
|
329
322
|
```bash
|
|
330
|
-
~/Projects/start_oysterun.sh --stack
|
|
331
|
-
~/Projects/restart_oysterun.sh --stack
|
|
332
|
-
~/Projects/stop_oysterun.sh --stack
|
|
323
|
+
~/Projects/start_oysterun.sh --stack <name> --port <port>
|
|
324
|
+
~/Projects/restart_oysterun.sh --stack <name>
|
|
325
|
+
~/Projects/stop_oysterun.sh --stack <name>
|
|
333
326
|
```
|
|
334
327
|
|
|
335
328
|
What they do:
|
|
@@ -340,7 +333,7 @@ What they do:
|
|
|
340
333
|
- do not initialize backend runtime state
|
|
341
334
|
- use `production` by default
|
|
342
335
|
- keep production Host config under `~/.oysterun/config.json`
|
|
343
|
-
- keep
|
|
336
|
+
- keep custom stack Host config under `~/.oysterun-stacks/<stack>/host/config.json`
|
|
344
337
|
- write PID files under `~/.oysterun/run/` or `~/.oysterun-stacks/<stack>/run/`
|
|
345
338
|
- write logs under `~/.oysterun/logs/` or `~/.oysterun-stacks/<stack>/logs/`
|
|
346
339
|
|
|
@@ -348,15 +341,11 @@ Important:
|
|
|
348
341
|
|
|
349
342
|
- this is more convenient than `tmux` for manual start/stop/restart
|
|
350
343
|
- these scripts use temporary `launchctl submit` jobs unless you explicitly install the persistent LaunchAgents
|
|
351
|
-
- for persistent login-time auto-start and crash auto-restart on `8802
|
|
344
|
+
- for persistent login-time auto-start and crash auto-restart on `8802`, use `./tool_scripts/install_oysterun_launch_agents.sh` (add `--stack <name>` for a custom stack)
|
|
352
345
|
- these scripts use stable non-watch commands; use `./tool_scripts/dev_up.sh` when you want backend + Host live auto-reload during active repo development
|
|
353
346
|
- `./tool_scripts/dev_up.sh` is the only startup path that initializes backend runtime state
|
|
354
|
-
- the
|
|
355
|
-
- `
|
|
356
|
-
- `staging` uses Host `9902`
|
|
357
|
-
- `test1..test4` use Host `3022`, `3302`, `4022`, and `4402`
|
|
358
|
-
- `./tool_scripts/dev_up.sh` is for staging-oriented repo development and uses backend `9000`
|
|
359
|
-
- set `OYSTERUN_STAGING_LAN_HOST=<your_lan_ip>` if the staging stack should advertise a different LAN IP than `192.168.0.188`
|
|
347
|
+
- `production` is the only preset stack and uses Host `8802`; every other stack is a custom stack with its own `--port`
|
|
348
|
+
- `./tool_scripts/dev_up.sh` needs `--backend_port` for its development backend
|
|
360
349
|
|
|
361
350
|
### 3. Use the web client
|
|
362
351
|
|
|
@@ -366,11 +355,7 @@ For the default production Host, open:
|
|
|
366
355
|
http://localhost:8802/app
|
|
367
356
|
```
|
|
368
357
|
|
|
369
|
-
For
|
|
370
|
-
|
|
371
|
-
```text
|
|
372
|
-
http://localhost:9902/app
|
|
373
|
-
```
|
|
358
|
+
For a custom stack, open `http://localhost:<port>/app`.
|
|
374
359
|
|
|
375
360
|
The web client is served by the Host service. There is no separate frontend dev server to start.
|
|
376
361
|
|
|
@@ -456,10 +441,10 @@ cd <repo-root>
|
|
|
456
441
|
./tool_scripts/restart_oysterun.sh
|
|
457
442
|
```
|
|
458
443
|
|
|
459
|
-
For
|
|
444
|
+
For a custom stack:
|
|
460
445
|
|
|
461
446
|
```bash
|
|
462
|
-
~/Projects/restart_oysterun.sh --stack
|
|
447
|
+
~/Projects/restart_oysterun.sh --stack <name>
|
|
463
448
|
```
|
|
464
449
|
|
|
465
450
|
### Frontend restart
|
|
@@ -605,7 +590,7 @@ Browser and ad hoc verification artifacts in this repo have usually been kept as
|
|
|
605
590
|
|
|
606
591
|
`temp/` is mainly used by:
|
|
607
592
|
|
|
608
|
-
- `tool_scripts/export_key_files.sh`
|
|
593
|
+
- `OysterunTeam/tool_scripts/export_key_files.sh`
|
|
609
594
|
|
|
610
595
|
That script creates export folders and zip files like:
|
|
611
596
|
|
package/bin/oysterun.mjs
CHANGED
|
@@ -1,21 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { existsSync, readFileSync
|
|
3
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
|
-
import { dirname, join, resolve } from "node:path";
|
|
5
|
+
import { dirname, join, relative, resolve } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import {
|
|
8
8
|
getConfigPath,
|
|
9
|
+
getConfigDir,
|
|
9
10
|
readRawConfigSource,
|
|
11
|
+
readDashboardCredentials,
|
|
12
|
+
readCloudIdentity,
|
|
10
13
|
} from "../host-service/config.mjs";
|
|
11
14
|
import {
|
|
12
15
|
PRODUCT_CLI_MODULES,
|
|
13
16
|
runProductCli,
|
|
14
17
|
} from "../host-service/cli/product-cli.mjs";
|
|
15
18
|
|
|
19
|
+
import { preflightCompleteUninstall, executeCompleteUninstall } from "../host-service/complete-cli-uninstall.mjs";
|
|
20
|
+
import * as hostConfig from "../host-service/config.mjs";
|
|
21
|
+
import { describeCloudRetirement, retireHostCloudRegistration } from "../host-service/cloud-self-retirement.mjs";
|
|
22
|
+
import {
|
|
23
|
+
ONBOARD_USAGE,
|
|
24
|
+
SETUP_USAGE,
|
|
25
|
+
SHOW_QR_USAGE,
|
|
26
|
+
parseOnboardArgs,
|
|
27
|
+
parseSetupArgs,
|
|
28
|
+
} from "../host-service/setup-cli-args.mjs";
|
|
29
|
+
|
|
16
30
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
17
31
|
const repoRoot = resolve(__dirname, "..");
|
|
18
32
|
const setupScript = join(repoRoot, "host-service", "setup.mjs");
|
|
33
|
+
const onboardScript = join(repoRoot, "host-service", "onboard.mjs");
|
|
19
34
|
const releaseServiceScript = join(
|
|
20
35
|
repoRoot,
|
|
21
36
|
"tool_scripts",
|
|
@@ -39,24 +54,41 @@ const serviceCommands = new Map([
|
|
|
39
54
|
["service:uninstall", "uninstall"],
|
|
40
55
|
]);
|
|
41
56
|
|
|
42
|
-
function run(command, args) {
|
|
57
|
+
function run(command, args, { setupInput = false } = {}) {
|
|
43
58
|
const result = spawnSync(command, args, {
|
|
44
59
|
cwd: repoRoot,
|
|
45
60
|
env: process.env,
|
|
46
|
-
stdio: "inherit",
|
|
61
|
+
stdio: setupInput && process.env.OYSTERUN_SETUP_INPUT_FD !== undefined ? ["inherit", "inherit", "inherit", 3, 4] : "inherit",
|
|
47
62
|
});
|
|
48
63
|
if (result.error) {
|
|
49
64
|
console.error(`oysterun: failed to run ${command}: ${result.error.message}`);
|
|
50
|
-
process.
|
|
65
|
+
process.exitCode = 1;
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
process.exitCode = result.status ?? 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// P337: `--help`/`-h` prints usage here and starts no process. Invalid
|
|
72
|
+
// arguments still go to the child, which rejects them before any effect.
|
|
73
|
+
function isHelpRequest(parse, args) {
|
|
74
|
+
try {
|
|
75
|
+
return parse(args).help === true;
|
|
76
|
+
} catch {
|
|
77
|
+
return false;
|
|
51
78
|
}
|
|
52
|
-
process.exit(result.status ?? 0);
|
|
53
79
|
}
|
|
54
80
|
|
|
55
81
|
function runSetup(args = []) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
82
|
+
if (isHelpRequest(parseSetupArgs, args)) {
|
|
83
|
+
process.stdout.write(SETUP_USAGE);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (args.includes("--local")) {
|
|
87
|
+
console.error("oysterun: setup --local was removed; `oysterun setup` registers this Host with Oysterun Managed Tunnel.");
|
|
88
|
+
process.exitCode = 2;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
run(process.execPath, [setupScript, "--release-setup", ...args]);
|
|
60
92
|
}
|
|
61
93
|
|
|
62
94
|
function runService(command, args = []) {
|
|
@@ -72,9 +104,10 @@ function runService(command, args = []) {
|
|
|
72
104
|
console.error(
|
|
73
105
|
`oysterun: failed to run ${releaseServiceScript}: ${result.error.message}`
|
|
74
106
|
);
|
|
75
|
-
process.
|
|
107
|
+
process.exitCode = 1;
|
|
108
|
+
return;
|
|
76
109
|
}
|
|
77
|
-
process.
|
|
110
|
+
process.exitCode = result.status ?? 0;
|
|
78
111
|
}
|
|
79
112
|
|
|
80
113
|
function parseUninstallArgs(args = []) {
|
|
@@ -96,17 +129,20 @@ function parseUninstallArgs(args = []) {
|
|
|
96
129
|
options.keepConfig = true;
|
|
97
130
|
} else if (arg === "--confirm") {
|
|
98
131
|
const value = args[index + 1];
|
|
99
|
-
if (!value) {
|
|
132
|
+
if (!value || value.startsWith("--")) {
|
|
100
133
|
throw new Error("--confirm requires a value");
|
|
101
134
|
}
|
|
135
|
+
if (value !== "DELETE") throw new Error("config deletion requires --confirm DELETE exactly");
|
|
102
136
|
options.confirm = value;
|
|
103
137
|
index += 1;
|
|
104
138
|
} else if (arg.startsWith("--confirm=")) {
|
|
105
|
-
|
|
139
|
+
const value = arg.slice("--confirm=".length);
|
|
140
|
+
if (value !== "DELETE") throw new Error("config deletion requires --confirm DELETE exactly");
|
|
141
|
+
options.confirm = value;
|
|
106
142
|
} else if (arg === "--stack") {
|
|
107
143
|
const value = args[index + 1];
|
|
108
144
|
if (!value) {
|
|
109
|
-
throw new Error("--stack requires production
|
|
145
|
+
throw new Error("--stack requires production or all");
|
|
110
146
|
}
|
|
111
147
|
options.stack = value;
|
|
112
148
|
index += 1;
|
|
@@ -119,9 +155,9 @@ function parseUninstallArgs(args = []) {
|
|
|
119
155
|
|
|
120
156
|
if (
|
|
121
157
|
options.stack !== null &&
|
|
122
|
-
!["production", "
|
|
158
|
+
!["production", "all"].includes(options.stack)
|
|
123
159
|
) {
|
|
124
|
-
throw new Error("--stack must be production
|
|
160
|
+
throw new Error("--stack must be production or all");
|
|
125
161
|
}
|
|
126
162
|
if (options.confirm !== null && options.confirm !== "DELETE") {
|
|
127
163
|
throw new Error("config deletion requires --confirm DELETE exactly");
|
|
@@ -143,23 +179,25 @@ function inspectConfig() {
|
|
|
143
179
|
return {
|
|
144
180
|
configured: false,
|
|
145
181
|
configPath,
|
|
146
|
-
|
|
182
|
+
// Name the layout-aware file actually checked (config/host.json on v2).
|
|
183
|
+
missing: [relative(getConfigDir(), configPath)],
|
|
147
184
|
raw: {},
|
|
148
185
|
};
|
|
149
186
|
}
|
|
150
187
|
|
|
151
|
-
const raw = readRawConfigSource();
|
|
188
|
+
const raw = { ...readRawConfigSource(), ...readDashboardCredentials() };
|
|
152
189
|
const missing = [];
|
|
153
190
|
const port = Number(raw.port);
|
|
154
191
|
if (!Number.isInteger(port) || port <= 0) missing.push("port");
|
|
155
192
|
if (!isNonEmptyString(raw.dashboard_password_hash)) {
|
|
156
193
|
missing.push("dashboard_password_hash");
|
|
157
194
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
)
|
|
162
|
-
|
|
195
|
+
// A configured Host has its registered identity and formal Tunnel URL.
|
|
196
|
+
const identity = readCloudIdentity();
|
|
197
|
+
if (!isNonEmptyString(raw.managed_endpoint)) missing.push("managed_endpoint");
|
|
198
|
+
if (!isNonEmptyString(identity.device_id || identity.host_id) ||
|
|
199
|
+
!isNonEmptyString(identity.device_token || identity.host_credential)) {
|
|
200
|
+
missing.push("registered Host identity");
|
|
163
201
|
}
|
|
164
202
|
|
|
165
203
|
return {
|
|
@@ -195,6 +233,7 @@ Usage:
|
|
|
195
233
|
oysterun
|
|
196
234
|
oysterun --version
|
|
197
235
|
oysterun setup [options]
|
|
236
|
+
oysterun onboard [--package-changed] [--channel latest|beta]
|
|
198
237
|
oysterun show-qr
|
|
199
238
|
oysterun uninstall [--confirm DELETE] [--keep-config] [--dry-run]
|
|
200
239
|
oysterun service:start
|
|
@@ -207,17 +246,31 @@ Usage:
|
|
|
207
246
|
oysterun service:lifecycle-status
|
|
208
247
|
oysterun service:status
|
|
209
248
|
oysterun service:logs [--follow]
|
|
210
|
-
oysterun service:uninstall [--stack production|
|
|
249
|
+
oysterun service:uninstall [--stack production|all]
|
|
211
250
|
oysterun <module> <action> [options]
|
|
212
251
|
|
|
213
252
|
Product modules:
|
|
214
253
|
auth, sessions, chat, scheduler, mail, notifications, website, telegram
|
|
215
254
|
|
|
255
|
+
Chat transcript reads:
|
|
256
|
+
chat recent|messages|messages-around|search [--session-id <exact_id>]
|
|
257
|
+
A verified live Session can read any retained stopped Session, of any Agent,
|
|
258
|
+
without starting it. History names are unsupported; use an exact retained
|
|
259
|
+
Session ID (list them with: sessions history [--limit 1..100]).
|
|
260
|
+
chat messages --session-id <history_id> [--limit 20] [--next-batch <opaque>]
|
|
261
|
+
History page limits are 1..100; live messages retain --after-seq.
|
|
262
|
+
History read authority does not authorize send, loop, profile or lifecycle.
|
|
263
|
+
|
|
264
|
+
Session tags:
|
|
265
|
+
sessions start|resume [--tags 'first,second' | --clear-tags]
|
|
266
|
+
sessions profile update [--tags 'first,second' | --clear-tags]
|
|
267
|
+
--clear-tags creates or saves an untagged Session; empty --tags is invalid.
|
|
268
|
+
Omitted start tags inside a Session copy the authenticated parent's name.
|
|
269
|
+
|
|
216
270
|
First run:
|
|
217
271
|
If Host config is missing or incomplete, 'oysterun' enters setup.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
Use '--enable-cloud-direct' only for advanced Direct Cloud registration.
|
|
272
|
+
Setup registers this Host with Oysterun Managed Tunnel; its Tunnel URL is the
|
|
273
|
+
Host address used by the web, the App, QR login, the CLI and Agents.
|
|
221
274
|
|
|
222
275
|
Install contract:
|
|
223
276
|
npm install -g oysterun installs files only. It does not run setup or start
|
|
@@ -230,14 +283,22 @@ function printUninstallHelp() {
|
|
|
230
283
|
|
|
231
284
|
Usage:
|
|
232
285
|
oysterun uninstall [--confirm DELETE] [--keep-config] [--dry-run]
|
|
233
|
-
oysterun uninstall --stack production|
|
|
286
|
+
oysterun uninstall --stack production|all [options]
|
|
234
287
|
|
|
235
288
|
Behavior:
|
|
236
289
|
- Stops/removes managed Oysterun service state where available.
|
|
237
290
|
- Preserves the config directory unless --confirm DELETE is supplied exactly.
|
|
238
291
|
- Does not delete the Default Browse Root or agent folders.
|
|
239
|
-
-
|
|
240
|
-
|
|
292
|
+
- Exact --confirm DELETE first retires this Host's Oysterun Cloud registration
|
|
293
|
+
(Host and Managed URL) with the Host's own credential; if Cloud cannot be
|
|
294
|
+
reached or rejects it, the uninstall continues and reports why.
|
|
295
|
+
- Exact --confirm DELETE also removes the same global CLI package that launched
|
|
296
|
+
this command using its matching Node/npm and explicit prefix.
|
|
297
|
+
- Without DELETE (including --keep-config), preserves config and CLI package.
|
|
298
|
+
- --keep-config and --confirm DELETE cannot be combined.
|
|
299
|
+
- --dry-run prints the selected services/config and exact CLI/npm/prefix plan.
|
|
300
|
+
- --stack all removes the production service, but only the selected
|
|
301
|
+
config directory and the launching CLI package.
|
|
241
302
|
`);
|
|
242
303
|
}
|
|
243
304
|
|
|
@@ -254,14 +315,15 @@ function readConfiguredDefaultBrowsePath() {
|
|
|
254
315
|
}
|
|
255
316
|
}
|
|
256
317
|
|
|
257
|
-
function runUninstall(args = []) {
|
|
318
|
+
async function runUninstall(args = []) {
|
|
258
319
|
let options;
|
|
259
320
|
try {
|
|
260
321
|
options = parseUninstallArgs(args);
|
|
261
322
|
} catch (error) {
|
|
262
323
|
console.error(`oysterun uninstall: ${error.message}`);
|
|
263
324
|
console.error("Run 'oysterun uninstall --help' for usage.");
|
|
264
|
-
process.
|
|
325
|
+
process.exitCode = 2;
|
|
326
|
+
return;
|
|
265
327
|
}
|
|
266
328
|
|
|
267
329
|
if (options.help) {
|
|
@@ -270,9 +332,44 @@ function runUninstall(args = []) {
|
|
|
270
332
|
}
|
|
271
333
|
|
|
272
334
|
const configPath = getConfigPath();
|
|
273
|
-
const configDir =
|
|
335
|
+
const configDir = getConfigDir();
|
|
274
336
|
const defaultBrowsePath = readConfiguredDefaultBrowsePath();
|
|
275
337
|
const deleteConfig = options.confirm === "DELETE";
|
|
338
|
+
if (deleteConfig) {
|
|
339
|
+
try {
|
|
340
|
+
const plan = preflightCompleteUninstall({
|
|
341
|
+
cliPath: fileURLToPath(import.meta.url), configDir,
|
|
342
|
+
stack: options.stack || process.env.OYSTERUN_RELEASE_STACK || "production",
|
|
343
|
+
});
|
|
344
|
+
console.log("Oysterun complete uninstall plan:");
|
|
345
|
+
console.log(` Services: ${plan.services.map(t => `${t.name} (${t.label}, port ${t.port || "unconfigured"})`).join(", ")}`);
|
|
346
|
+
console.log(` Config directory: delete ${plan.config}`);
|
|
347
|
+
console.log(` CLI package: remove ${plan.root}`);
|
|
348
|
+
console.log(` npm: ${plan.identity.node_path} ${plan.identity.npm_cli_path} uninstall ${plan.npmArgs.join(" ")} oysterun`);
|
|
349
|
+
console.log(` Prefix: ${plan.prefix}; OS user: ${plan.user.name} (uid ${plan.user.uid})`);
|
|
350
|
+
const cloud = describeCloudRetirement({ hostConfig });
|
|
351
|
+
console.log(
|
|
352
|
+
cloud.status === "will_retire"
|
|
353
|
+
? ` Cloud registration: retire Host ${cloud.host_id}${cloud.managed_endpoint ? ` (Managed URL ${cloud.managed_endpoint})` : ""} with this Host's credential, before the service stops`
|
|
354
|
+
: cloud.status === "already_retired"
|
|
355
|
+
? " Cloud registration: already retired"
|
|
356
|
+
: " Cloud registration: none (this Host is not registered)"
|
|
357
|
+
);
|
|
358
|
+
console.log(" Default Browse Root and agent folders are never deleted by this command.");
|
|
359
|
+
if (options.dryRun) {
|
|
360
|
+
console.log("Dry run complete: no Cloud, service, config or CLI changes were made.");
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
process.exitCode = (await executeCompleteUninstall(plan, {
|
|
364
|
+
retireCloud: () => retireHostCloudRegistration({ hostConfig }),
|
|
365
|
+
})).exitCode;
|
|
366
|
+
} catch (error) {
|
|
367
|
+
console.error(`oysterun uninstall preflight: ${error.message}`);
|
|
368
|
+
console.error("No service, config or CLI changes were made.");
|
|
369
|
+
process.exitCode = 1;
|
|
370
|
+
}
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
276
373
|
const serviceArgs = ["uninstall"];
|
|
277
374
|
if (options.stack) {
|
|
278
375
|
serviceArgs.push("--stack", options.stack);
|
|
@@ -290,7 +387,7 @@ function runUninstall(args = []) {
|
|
|
290
387
|
defaultBrowsePath ? ` ${defaultBrowsePath}` : ""
|
|
291
388
|
}`
|
|
292
389
|
);
|
|
293
|
-
console.log(
|
|
390
|
+
console.log(` Global CLI package: preserve ${repoRoot} (npm/prefix removal not requested)`);
|
|
294
391
|
console.log("");
|
|
295
392
|
|
|
296
393
|
if (!deleteConfig) {
|
|
@@ -301,9 +398,7 @@ function runUninstall(args = []) {
|
|
|
301
398
|
console.log(
|
|
302
399
|
"Default Browse Root and agent folders are never deleted by this command; remove them manually only if intended."
|
|
303
400
|
);
|
|
304
|
-
console.log(
|
|
305
|
-
"To remove the global CLI after cleanup, run: npm uninstall -g oysterun"
|
|
306
|
-
);
|
|
401
|
+
console.log("To remove service, config and this installed CLI together, run: oysterun uninstall --confirm DELETE");
|
|
307
402
|
|
|
308
403
|
if (options.dryRun) {
|
|
309
404
|
console.log("Dry run complete: no service or config changes were made.");
|
|
@@ -319,26 +414,20 @@ function runUninstall(args = []) {
|
|
|
319
414
|
console.error(
|
|
320
415
|
`oysterun uninstall: failed to run service cleanup: ${result.error.message}`
|
|
321
416
|
);
|
|
322
|
-
process.
|
|
417
|
+
process.exitCode = 1;
|
|
418
|
+
return;
|
|
323
419
|
}
|
|
324
420
|
if ((result.status ?? 0) !== 0) {
|
|
325
|
-
process.
|
|
421
|
+
process.exitCode = result.status ?? 1;
|
|
422
|
+
return;
|
|
326
423
|
}
|
|
327
424
|
|
|
328
|
-
|
|
329
|
-
rmSync(configDir, { recursive: true, force: true });
|
|
330
|
-
console.log(`Deleted config directory: ${configDir}`);
|
|
331
|
-
} else {
|
|
332
|
-
console.log(`Preserved config directory: ${configDir}`);
|
|
333
|
-
}
|
|
425
|
+
console.log(`Preserved config directory: ${configDir}`);
|
|
334
426
|
}
|
|
335
427
|
|
|
336
428
|
function printConfiguredStatus(status) {
|
|
337
429
|
const config = status.raw;
|
|
338
|
-
const url =
|
|
339
|
-
config.direct_host_url ||
|
|
340
|
-
config.public_base_url ||
|
|
341
|
-
(config.port ? `http://localhost:${config.port}` : "(unknown)");
|
|
430
|
+
const url = config.managed_endpoint || "(not registered)";
|
|
342
431
|
console.log("Oysterun Host is configured.");
|
|
343
432
|
console.log(`Config: ${status.configPath}`);
|
|
344
433
|
console.log(`Web: ${url}/app/sessions`);
|
|
@@ -375,6 +464,7 @@ switch (command) {
|
|
|
375
464
|
console.log(`Missing: ${status.missing.join(", ")}`);
|
|
376
465
|
console.log("");
|
|
377
466
|
runSetup([]);
|
|
467
|
+
break;
|
|
378
468
|
}
|
|
379
469
|
printConfiguredStatus(status);
|
|
380
470
|
}
|
|
@@ -382,11 +472,22 @@ switch (command) {
|
|
|
382
472
|
case "setup":
|
|
383
473
|
runSetup(rest);
|
|
384
474
|
break;
|
|
475
|
+
case "onboard":
|
|
476
|
+
if (isHelpRequest(parseOnboardArgs, rest)) {
|
|
477
|
+
process.stdout.write(ONBOARD_USAGE);
|
|
478
|
+
break;
|
|
479
|
+
}
|
|
480
|
+
run(process.execPath, [onboardScript, ...rest], { setupInput: true });
|
|
481
|
+
break;
|
|
385
482
|
case "show-qr":
|
|
483
|
+
if (isHelpRequest(parseSetupArgs, rest)) {
|
|
484
|
+
process.stdout.write(SHOW_QR_USAGE);
|
|
485
|
+
break;
|
|
486
|
+
}
|
|
386
487
|
run(process.execPath, [setupScript, "--show-qr", ...rest]);
|
|
387
488
|
break;
|
|
388
489
|
case "uninstall":
|
|
389
|
-
runUninstall(rest);
|
|
490
|
+
await runUninstall(rest);
|
|
390
491
|
break;
|
|
391
492
|
case "help":
|
|
392
493
|
case "--help":
|
|
@@ -410,9 +511,11 @@ switch (command) {
|
|
|
410
511
|
stdout: process.stdout,
|
|
411
512
|
stderr: process.stderr,
|
|
412
513
|
});
|
|
413
|
-
|
|
514
|
+
// Pipe writes can still be pending here. Let Node drain stdout/stderr.
|
|
515
|
+
process.exitCode = exitCode;
|
|
516
|
+
break;
|
|
414
517
|
}
|
|
415
518
|
console.error(`oysterun: unknown command: ${command}`);
|
|
416
519
|
console.error("Run 'oysterun --help' for usage.");
|
|
417
|
-
process.
|
|
520
|
+
process.exitCode = 2;
|
|
418
521
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Owns the lifetime of one completed-message navigation request at a time.
|
|
5
|
+
* Timeline movement is deliberately absent from this API: only click() reads.
|
|
6
|
+
*
|
|
7
|
+
* @template TResponse
|
|
8
|
+
* @param {{ readNeighbors: (request: { roomId: string, anchorEventId?: string, anchorPosition?: "latest" }) => Promise<TResponse>, selectTarget: (response: TResponse, direction: "previous" | "next") => string | undefined }} options
|
|
9
|
+
*/
|
|
10
|
+
export function createCompletedMessageNeighborClickCoordinator(options) {
|
|
11
|
+
/** @type {string | null} */
|
|
12
|
+
let scope = null;
|
|
13
|
+
let generation = 0;
|
|
14
|
+
/** @type {{ generation: number, scope: string } | null} */
|
|
15
|
+
let active = null;
|
|
16
|
+
let disposed = false;
|
|
17
|
+
|
|
18
|
+
/** @param {string} nextScope */
|
|
19
|
+
function setScope(nextScope) {
|
|
20
|
+
if (scope === nextScope) return;
|
|
21
|
+
scope = nextScope;
|
|
22
|
+
generation += 1;
|
|
23
|
+
active = null;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
setScope,
|
|
28
|
+
dispose() {
|
|
29
|
+
disposed = true;
|
|
30
|
+
generation += 1;
|
|
31
|
+
active = null;
|
|
32
|
+
},
|
|
33
|
+
isLoading() {
|
|
34
|
+
return active !== null;
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* @param {{ scope: string, roomId: string, direction: "previous" | "next", anchorEventId?: string, anchorPosition?: "latest" }} request
|
|
38
|
+
*/
|
|
39
|
+
async click(request) {
|
|
40
|
+
if (disposed || request.scope !== scope) return { status: "stale" };
|
|
41
|
+
if (active !== null) return { status: "busy" };
|
|
42
|
+
|
|
43
|
+
const transaction = { generation, scope: request.scope };
|
|
44
|
+
active = transaction;
|
|
45
|
+
try {
|
|
46
|
+
const response = await options.readNeighbors({
|
|
47
|
+
roomId: request.roomId,
|
|
48
|
+
anchorEventId: request.anchorEventId,
|
|
49
|
+
anchorPosition: request.anchorPosition,
|
|
50
|
+
});
|
|
51
|
+
if (
|
|
52
|
+
disposed ||
|
|
53
|
+
active !== transaction ||
|
|
54
|
+
generation !== transaction.generation ||
|
|
55
|
+
scope !== transaction.scope
|
|
56
|
+
) {
|
|
57
|
+
return { status: "stale" };
|
|
58
|
+
}
|
|
59
|
+
const targetEventId = options.selectTarget(response, request.direction);
|
|
60
|
+
return targetEventId
|
|
61
|
+
? { status: "target", response, targetEventId }
|
|
62
|
+
: { status: "no_target", response };
|
|
63
|
+
} catch (error) {
|
|
64
|
+
if (
|
|
65
|
+
disposed ||
|
|
66
|
+
active !== transaction ||
|
|
67
|
+
generation !== transaction.generation ||
|
|
68
|
+
scope !== transaction.scope
|
|
69
|
+
) {
|
|
70
|
+
return { status: "stale" };
|
|
71
|
+
}
|
|
72
|
+
return { status: "error", error };
|
|
73
|
+
} finally {
|
|
74
|
+
if (active === transaction) active = null;
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
}
|