oysterun 1.6.0-beta.21 → 1.6.0-beta.23
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 +2 -7
- package/bin/oysterun.mjs +25 -22
- package/dev/client/connectivity/host-connection-feedback.mjs +3 -1
- package/dev/client/connectivity/logical-host-connection.mjs +4 -0
- package/dev/client/connectivity/managed-host-browser.mjs +36 -6
- package/dev/client/web/index.html +842 -876
- package/dev/client/web-chat/dist/assets/{ReactPrism-C6YiTZTC.js → ReactPrism-CSVi7uVo.js} +1 -1
- package/dev/client/web-chat/dist/assets/{ReactPrism-C6YiTZTC.js.map → ReactPrism-CSVi7uVo.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/SessionsSetupApp-CXbqDUMO.js +6348 -0
- package/dev/client/web-chat/dist/assets/{SessionsSetupApp-CKJOSPFP.js.map → SessionsSetupApp-CXbqDUMO.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/SessionsSetupApp-CkENGhE-.css +1 -0
- package/dev/client/web-chat/dist/assets/{index-CN_FoTB1.js → index-1eoKcCH8.js} +2 -2
- package/dev/client/web-chat/dist/assets/{index-CN_FoTB1.js.map → index-1eoKcCH8.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/{index-Ae5I4LHp.js → index-BqUAQMQT.js} +2 -2
- package/dev/client/web-chat/dist/assets/{index-Ae5I4LHp.js.map → index-BqUAQMQT.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/{index-DCQFwgGf.js → index-Cm_tOW2z.js} +1 -1
- package/dev/client/web-chat/dist/assets/{index-DCQFwgGf.js.map → index-Cm_tOW2z.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/{matrix-entry-abAy3aOo.js → matrix-entry-DllR5zcs.js} +165 -165
- package/dev/client/web-chat/dist/assets/matrix-entry-DllR5zcs.js.map +1 -0
- package/dev/client/web-chat/dist/assets/{pdf-DN7oVvM6.js → pdf-BxFfw3lg.js} +3 -3
- package/dev/client/web-chat/dist/assets/{pdf-DN7oVvM6.js.map → pdf-BxFfw3lg.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/{web-BlYuDlOV.js → web-BXiFv31Q.js} +1 -1
- package/dev/client/web-chat/dist/assets/{web-BlYuDlOV.js.map → web-BXiFv31Q.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/{web-Dabw6cJi.js → web-CnI8aoRK.js} +1 -1
- package/dev/client/web-chat/dist/assets/{web-Dabw6cJi.js.map → web-CnI8aoRK.js.map} +1 -1
- package/dev/client/web-chat/dist/index.html +1 -1
- package/docs/routec/config_hierachy.md +28 -22
- package/docs/routec/dev/host_update_runtime_identity.md +42 -1
- package/docs/routec/dev/npmjs_publish.md +143 -19
- package/docs/routec/form_UI_fields.md +1 -2
- package/docs/routec/host_cloud_app_auth.md +4 -4
- package/docs/routec/host_setup.md +28 -37
- package/docs/routec/oysterun_operation_interface_spec.md +6 -5
- package/docs/routec/skill_installation.md +0 -1
- package/host-service/README.md +18 -25
- package/host-service/adapters/claude-code-adapter.mjs +123 -19
- package/host-service/agent-config-migration.mjs +3 -2
- package/host-service/agent-config.mjs +26 -4
- package/host-service/apns-complete-message-dispatcher.mjs +6 -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 +0 -1
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-session-chat/SKILL.md +11 -10
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-sessions/SKILL.md +24 -10
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-website/SKILL.md +2 -2
- package/host-service/assets/product-skills/oysterun-session-chat/SKILL.md +11 -10
- package/host-service/assets/product-skills/oysterun-sessions/SKILL.md +24 -10
- package/host-service/assets/product-skills/oysterun-website/SKILL.md +2 -2
- package/host-service/atomic-file.mjs +184 -14
- package/host-service/claude-acp-model-discovery.mjs +106 -22
- package/host-service/claude-acp-model-error-classification.mjs +97 -0
- package/host-service/cli/check-storage-migration.mjs +41 -0
- package/host-service/cli/prepare-storage-layout.mjs +41 -0
- package/host-service/cli/product-cli.mjs +136 -46
- package/host-service/cli/recover-installer-lifecycle.mjs +2 -1
- package/host-service/cli/run-host-lifecycle.mjs +26 -2
- package/host-service/cli-profile-storage.mjs +69 -0
- package/host-service/cloud-identity-envelope.mjs +93 -0
- package/host-service/complete-cli-uninstall.mjs +8 -3
- package/host-service/config-storage-shape.mjs +48 -0
- package/host-service/config.mjs +167 -179
- 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/desired-open-session-state.mjs +5 -3
- package/host-service/frp-agent.mjs +14 -10
- package/host-service/host-lifecycle-recovery.mjs +29 -15
- package/host-service/host-login-bootstrap-tokens.mjs +21 -34
- package/host-service/host-restart-login-gate.mjs +4 -7
- package/host-service/host-runtime-diagnostics.mjs +10 -17
- package/host-service/host-telemetry.mjs +4 -5
- package/host-service/initial-preflight-recovery.mjs +2 -1
- package/host-service/installer-recovery-guidance.mjs +4 -3
- package/host-service/installer-reinstall-bindings.mjs +2 -1
- package/host-service/installer-reinstall-target.mjs +2 -1
- package/host-service/large-tool-call-store.mjs +4 -2
- package/host-service/lifecycle-compat-preload.mjs +1 -1
- package/host-service/lifecycle-compatibility.mjs +5 -4
- package/host-service/lifecycle-continuity-assets.mjs +24 -10
- package/host-service/lifecycle-continuity-probe.mjs +9 -3
- package/host-service/lifecycle-continuity-projection.mjs +2 -0
- package/host-service/lifecycle-continuity-runner.mjs +5 -12
- package/host-service/lifecycle-continuity.mjs +99 -46
- package/host-service/lifecycle-diagnostics.mjs +54 -8
- package/host-service/lifecycle-service-render-bundle.mjs +3 -2
- package/host-service/lifecycle-user-path.mjs +4 -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-room-binding.mjs +8 -7
- package/host-service/node-npm-runtime-identity.mjs +2 -1
- package/host-service/onboard.mjs +9 -17
- package/host-service/package.json +1 -1
- package/host-service/product-runtime-host-origin.mjs +10 -13
- package/host-service/provider-model-params.mjs +34 -13
- package/host-service/provider-model-refresh-runner.mjs +16 -3
- package/host-service/registered-update-authority.mjs +0 -13
- package/host-service/replay-claude-acp-raw-events.mjs +6 -3
- package/host-service/restart-restore-state.mjs +4 -7
- 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 +43 -71
- package/host-service/routec-matrix-storage-adapter.mjs +5 -2
- package/host-service/routec-matrix-storage-paths.mjs +16 -2
- package/host-service/routec-matrix-stream-seq-repair.mjs +5 -6
- package/host-service/routec-viewport-geometry-diagnostics.mjs +2 -1
- package/host-service/scheduler-setup-snapshot-contract.mjs +12 -0
- package/host-service/scheduler-store.mjs +2 -1
- package/host-service/server.mjs +276 -243
- package/host-service/service-control-token.mjs +7 -13
- package/host-service/service-definition-migration.mjs +70 -13
- package/host-service/session-assets.mjs +3 -2
- package/host-service/session-collection-service.mjs +13 -0
- package/host-service/session-history.mjs +15 -34
- package/host-service/session-loop-definitions.mjs +4 -21
- package/host-service/session-manager.mjs +156 -57
- package/host-service/session-name-counter-store.mjs +2 -1
- package/host-service/session-notification-settings-store.mjs +3 -2
- package/host-service/session-tags.mjs +11 -34
- package/host-service/session-transcript-target.mjs +4 -7
- package/host-service/setup-input-file.mjs +6 -4
- package/host-service/setup-provider-model-defaults.mjs +6 -1
- package/host-service/setup.mjs +58 -576
- package/host-service/stopped-user-host-package.mjs +2 -1
- package/host-service/storage-continuity.mjs +120 -0
- package/host-service/storage-database.mjs +115 -0
- package/host-service/storage-layout-cli.mjs +15 -0
- package/host-service/storage-layout.mjs +401 -0
- package/host-service/storage-lifecycle.mjs +337 -0
- package/host-service/storage-lock.mjs +178 -0
- package/host-service/storage-migration.mjs +812 -0
- package/host-service/storage-references.mjs +72 -0
- package/host-service/storage-service-binding.mjs +255 -0
- package/host-service/storage-snapshot.mjs +101 -0
- package/host-service/telegram-adapter.mjs +7 -1
- package/host-service/telegram-bridge.mjs +195 -0
- package/host-service/telegram-media.mjs +11 -14
- 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/tool-event-detail-store.mjs +8 -11
- package/host-service/transcript-store.mjs +16 -14
- package/host-service/update-reminder-state.mjs +7 -8
- package/host-service/upload-manager.mjs +3 -2
- package/host-service/voice-input-service.mjs +5 -13
- package/host-service/voice-input-usage-store.mjs +2 -1
- package/package.json +2 -1
- 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 +2 -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 +2 -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 +4 -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 +4 -4
- package/static/site/docs/configure-session-files-and-settings/zh/index.md +3 -3
- package/static/site/docs/generated_manifest.json +82 -82
- 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 +7 -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 +7 -7
- package/static/site/docs/host-authentication-and-connection/zh/index.md +9 -9
- package/static/site/docs/install-and-use-a-skill/en/index.html +0 -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 +0 -1
- package/static/site/docs/install-and-use-a-skill/zh/index.md +0 -4
- 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 +2 -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 +2 -2
- package/static/site/docs/restore-work-after-a-host-restart/zh/index.md +2 -2
- 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 +17 -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 +17 -17
- package/static/site/docs/set-up-and-understand-a-host/zh/index.md +16 -48
- package/static/site/install.sh +83 -21
- package/static/site_source/content/AGENTS.md +5 -12
- 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/downloads/install.sh +83 -21
- package/tool_scripts/install_oysterun_update.mjs +93 -33
- package/tool_scripts/oysterun_continuity_transaction.mjs +97 -93
- package/tool_scripts/oysterun_npm_package_manifest.mjs +16 -1
- package/tool_scripts/oysterun_service_common.sh +72 -15
- package/tool_scripts/oysterun_setup_input.sh +77 -16
- package/tool_scripts/oysterun_update_restart_runner.mjs +3 -5
- package/tool_scripts/p233_legacy_bootstrap.mjs +1 -1
- package/tool_scripts/run_oysterun_host.sh +1 -0
- package/tool_scripts/stack_dashboard_credentials.mjs +28 -12
- package/tool_scripts/start_oysterun.sh +2 -0
- package/tool_scripts/sync_host_stack_config.mjs +23 -13
- package/tool_scripts/test_environment_remote_cloud_deprovision.mjs +13 -10
- package/dev/client/web-chat/dist/assets/SessionsSetupApp-CKJOSPFP.js +0 -6442
- package/dev/client/web-chat/dist/assets/SessionsSetupApp-Dx09Uz-6.css +0 -1
- package/dev/client/web-chat/dist/assets/matrix-entry-abAy3aOo.js.map +0 -1
- package/host-service/agent-store-demo.mjs +0 -369
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-find-context/SKILL.md +0 -114
- 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-find-context/SKILL.md +0 -114
- package/host-service/assets/product-skills/oysterun-find-context/scripts/oysterun_find_context.mjs +0 -49
- package/host-service/legacy-continuity-observation.mjs +0 -33
- 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`
|
|
@@ -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
|
|
@@ -270,11 +267,9 @@ Port notes:
|
|
|
270
267
|
- phone app verification can use any running Host port; point the app at the actual user-approved port for that run
|
|
271
268
|
- backend URL default is `http://localhost:8000`
|
|
272
269
|
- 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
270
|
- fresh Session Setup runtime defaults, including interface style plus Claude/Codex provider defaults, are stored there under `session_defaults`
|
|
275
271
|
- 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
|
|
272
|
+
- 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
273
|
|
|
279
274
|
### Optional: start backend + Host together for repo development
|
|
280
275
|
|
package/bin/oysterun.mjs
CHANGED
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
|
|
3
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,
|
|
@@ -56,10 +59,11 @@ function run(command, args, { setupInput = false } = {}) {
|
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
function runSetup(args = []) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
if (args.includes("--local")) {
|
|
63
|
+
console.error("oysterun: setup --local was removed; `oysterun setup` registers this Host with Oysterun Managed Tunnel.");
|
|
64
|
+
process.exit(2);
|
|
65
|
+
}
|
|
66
|
+
run(process.execPath, [setupScript, "--release-setup", ...args]);
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
function runService(command, args = []) {
|
|
@@ -149,23 +153,25 @@ function inspectConfig() {
|
|
|
149
153
|
return {
|
|
150
154
|
configured: false,
|
|
151
155
|
configPath,
|
|
152
|
-
|
|
156
|
+
// Name the layout-aware file actually checked (config/host.json on v2).
|
|
157
|
+
missing: [relative(getConfigDir(), configPath)],
|
|
153
158
|
raw: {},
|
|
154
159
|
};
|
|
155
160
|
}
|
|
156
161
|
|
|
157
|
-
const raw = readRawConfigSource();
|
|
162
|
+
const raw = { ...readRawConfigSource(), ...readDashboardCredentials() };
|
|
158
163
|
const missing = [];
|
|
159
164
|
const port = Number(raw.port);
|
|
160
165
|
if (!Number.isInteger(port) || port <= 0) missing.push("port");
|
|
161
166
|
if (!isNonEmptyString(raw.dashboard_password_hash)) {
|
|
162
167
|
missing.push("dashboard_password_hash");
|
|
163
168
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
)
|
|
168
|
-
|
|
169
|
+
// A configured Host has its registered identity and formal Tunnel URL.
|
|
170
|
+
const identity = readCloudIdentity();
|
|
171
|
+
if (!isNonEmptyString(raw.managed_endpoint)) missing.push("managed_endpoint");
|
|
172
|
+
if (!isNonEmptyString(identity.device_id || identity.host_id) ||
|
|
173
|
+
!isNonEmptyString(identity.device_token || identity.host_credential)) {
|
|
174
|
+
missing.push("registered Host identity");
|
|
169
175
|
}
|
|
170
176
|
|
|
171
177
|
return {
|
|
@@ -222,8 +228,9 @@ Product modules:
|
|
|
222
228
|
|
|
223
229
|
Chat transcript reads:
|
|
224
230
|
chat recent|messages|messages-around|search [--session-id <exact_id>]
|
|
225
|
-
A verified live
|
|
226
|
-
starting it. History names are unsupported; use an exact retained
|
|
231
|
+
A verified live Session can read any retained stopped Session, of any Agent,
|
|
232
|
+
without starting it. History names are unsupported; use an exact retained
|
|
233
|
+
Session ID (list them with: sessions history [--limit 1..100]).
|
|
227
234
|
chat messages --session-id <history_id> [--limit 20] [--next-batch <opaque>]
|
|
228
235
|
History page limits are 1..100; live messages retain --after-seq.
|
|
229
236
|
History read authority does not authorize send, loop, profile or lifecycle.
|
|
@@ -236,9 +243,8 @@ Session tags:
|
|
|
236
243
|
|
|
237
244
|
First run:
|
|
238
245
|
If Host config is missing or incomplete, 'oysterun' enters setup.
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
Use '--enable-cloud-direct' only for advanced Direct Cloud registration.
|
|
246
|
+
Setup registers this Host with Oysterun Managed Tunnel; its Tunnel URL is the
|
|
247
|
+
Host address used by the web, the App, QR login, the CLI and Agents.
|
|
242
248
|
|
|
243
249
|
Install contract:
|
|
244
250
|
npm install -g oysterun installs files only. It does not run setup or start
|
|
@@ -296,7 +302,7 @@ function runUninstall(args = []) {
|
|
|
296
302
|
}
|
|
297
303
|
|
|
298
304
|
const configPath = getConfigPath();
|
|
299
|
-
const configDir =
|
|
305
|
+
const configDir = getConfigDir();
|
|
300
306
|
const defaultBrowsePath = readConfiguredDefaultBrowsePath();
|
|
301
307
|
const deleteConfig = options.confirm === "DELETE";
|
|
302
308
|
if (deleteConfig) {
|
|
@@ -379,10 +385,7 @@ function runUninstall(args = []) {
|
|
|
379
385
|
|
|
380
386
|
function printConfiguredStatus(status) {
|
|
381
387
|
const config = status.raw;
|
|
382
|
-
const url =
|
|
383
|
-
config.direct_host_url ||
|
|
384
|
-
config.public_base_url ||
|
|
385
|
-
(config.port ? `http://localhost:${config.port}` : "(unknown)");
|
|
388
|
+
const url = config.managed_endpoint || "(not registered)";
|
|
386
389
|
console.log("Oysterun Host is configured.");
|
|
387
390
|
console.log(`Config: ${status.configPath}`);
|
|
388
391
|
console.log(`Web: ${url}/app/sessions`);
|
|
@@ -20,7 +20,9 @@ export function normalizeHostConnectionStatus(status = {}) {
|
|
|
20
20
|
["closed", "disconnected", "recovering", "unavailable"].includes(
|
|
21
21
|
status.connection_state
|
|
22
22
|
);
|
|
23
|
-
|
|
23
|
+
// P296: a page not opened through the Tunnel URL reaches the Host on a
|
|
24
|
+
// local address; this is a status description, not a separate entry.
|
|
25
|
+
let qualifier = "Local address";
|
|
24
26
|
if (originKind === "managed_endpoint") {
|
|
25
27
|
qualifier =
|
|
26
28
|
activePathKind === "webrtc" ? "Managed WebRTC" : "Managed Endpoint";
|
|
@@ -334,6 +334,7 @@ export class OysterunLogicalHostConnection {
|
|
|
334
334
|
syncOwnerId = null,
|
|
335
335
|
timeoutMs = undefined,
|
|
336
336
|
onUploadProgress = null,
|
|
337
|
+
onDispatch = null,
|
|
337
338
|
} = {}
|
|
338
339
|
) {
|
|
339
340
|
if (this.closed) throw new Error("Logical Host connection is closed");
|
|
@@ -349,6 +350,9 @@ export class OysterunLogicalHostConnection {
|
|
|
349
350
|
const isMatrixSync = MATRIX_SYNC_PATH.test(request.path);
|
|
350
351
|
const startedAt = Date.now();
|
|
351
352
|
const releaseTransport = this.acquireTransportLease(transport);
|
|
353
|
+
// P308: report the transport that really carries this request; the caller
|
|
354
|
+
// decodes and meters by it, not by the path it saw before awaiting the body.
|
|
355
|
+
onDispatch?.({ pathKind });
|
|
352
356
|
this.emitDiagnostic({
|
|
353
357
|
event_type: isMatrixSync
|
|
354
358
|
? "matrix_sync_request_started"
|
|
@@ -816,6 +816,17 @@ function responseFromBootstrapLogicalResult(result) {
|
|
|
816
816
|
});
|
|
817
817
|
}
|
|
818
818
|
|
|
819
|
+
// P308: the response envelope belongs to the transport that carried the request.
|
|
820
|
+
function responseFromDispatchedLogicalResult(result, dispatchedPathKind) {
|
|
821
|
+
return dispatchedPathKind === "webrtc"
|
|
822
|
+
? responseFromLogicalResult(result)
|
|
823
|
+
: responseFromBootstrapLogicalResult(result);
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
function transportAccountingKind(pathKind) {
|
|
827
|
+
return pathKind === "webrtc" ? "datachannel" : "bootstrap";
|
|
828
|
+
}
|
|
829
|
+
|
|
819
830
|
function logicalResultBodyByteLength(result) {
|
|
820
831
|
if (result?.response?.body instanceof Uint8Array) {
|
|
821
832
|
return result.response.body.byteLength;
|
|
@@ -2480,7 +2491,7 @@ export class ManagedHostBrowserConnection {
|
|
|
2480
2491
|
}
|
|
2481
2492
|
: {}),
|
|
2482
2493
|
};
|
|
2483
|
-
|
|
2494
|
+
let dispatchedPathKind = "bootstrap";
|
|
2484
2495
|
let result;
|
|
2485
2496
|
try {
|
|
2486
2497
|
result = await this.logicalConnection.request(requestPayload, {
|
|
@@ -2488,6 +2499,14 @@ export class ManagedHostBrowserConnection {
|
|
|
2488
2499
|
syncOwnerId: MATRIX_SYNC_PATH.test(path)
|
|
2489
2500
|
? this.ensureSyncOwner()
|
|
2490
2501
|
: null,
|
|
2502
|
+
onDispatch: ({ pathKind }) => {
|
|
2503
|
+
dispatchedPathKind = pathKind;
|
|
2504
|
+
recordTransportRequest(
|
|
2505
|
+
this.accounting,
|
|
2506
|
+
transportAccountingKind(pathKind),
|
|
2507
|
+
path
|
|
2508
|
+
);
|
|
2509
|
+
},
|
|
2491
2510
|
});
|
|
2492
2511
|
} catch (error) {
|
|
2493
2512
|
if (error?.code === HOST_UNAVAILABLE_RESPONSE_ERROR) {
|
|
@@ -2525,10 +2544,13 @@ export class ManagedHostBrowserConnection {
|
|
|
2525
2544
|
}
|
|
2526
2545
|
throw error;
|
|
2527
2546
|
}
|
|
2528
|
-
const response =
|
|
2547
|
+
const response = responseFromDispatchedLogicalResult(
|
|
2548
|
+
result,
|
|
2549
|
+
dispatchedPathKind
|
|
2550
|
+
);
|
|
2529
2551
|
recordTransportResponseBytes(
|
|
2530
2552
|
this.accounting,
|
|
2531
|
-
|
|
2553
|
+
transportAccountingKind(dispatchedPathKind),
|
|
2532
2554
|
logicalResultBodyByteLength(result),
|
|
2533
2555
|
path
|
|
2534
2556
|
);
|
|
@@ -2550,6 +2572,10 @@ export class ManagedHostBrowserConnection {
|
|
|
2550
2572
|
signal: request.signal,
|
|
2551
2573
|
...(body ? { body } : {}),
|
|
2552
2574
|
};
|
|
2575
|
+
// The body await above can outlast the WebRTC path (page backgrounded, peer
|
|
2576
|
+
// closed); the logical connection then dispatches on bootstrap. Decode and
|
|
2577
|
+
// meter by the transport that actually carried the request (P308).
|
|
2578
|
+
let dispatchedPathKind = "webrtc";
|
|
2553
2579
|
const result = await this.logicalConnection.request(requestPayload, {
|
|
2554
2580
|
requestId: createConnectivityRandomId(),
|
|
2555
2581
|
syncOwnerId: MATRIX_SYNC_PATH.test(path) ? this.ensureSyncOwner() : null,
|
|
@@ -2559,15 +2585,19 @@ export class ManagedHostBrowserConnection {
|
|
|
2559
2585
|
? BULK_REQUEST_TIMEOUT_MS
|
|
2560
2586
|
: undefined,
|
|
2561
2587
|
onUploadProgress: recovery.onUploadProgress || null,
|
|
2588
|
+
onDispatch: ({ pathKind }) => {
|
|
2589
|
+
dispatchedPathKind = pathKind;
|
|
2590
|
+
},
|
|
2562
2591
|
});
|
|
2563
|
-
|
|
2592
|
+
const accountingKind = transportAccountingKind(dispatchedPathKind);
|
|
2593
|
+
recordTransportRequest(this.accounting, accountingKind, path);
|
|
2564
2594
|
recordTransportResponseBytes(
|
|
2565
2595
|
this.accounting,
|
|
2566
|
-
|
|
2596
|
+
accountingKind,
|
|
2567
2597
|
logicalResultBodyByteLength(result),
|
|
2568
2598
|
path
|
|
2569
2599
|
);
|
|
2570
|
-
return
|
|
2600
|
+
return responseFromDispatchedLogicalResult(result, dispatchedPathKind);
|
|
2571
2601
|
}
|
|
2572
2602
|
|
|
2573
2603
|
status() {
|