oysterun 1.6.0-beta.40 → 1.6.0-beta.42
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/bin/oysterun.mjs +4 -2
- package/dev/client/connectivity/managed-host-browser.mjs +34 -29
- package/dev/client/connectivity/managed-host-unavailable-response.mjs +18 -0
- package/dev/client/connectivity/phone-chat-swipe.mjs +8 -2
- package/dev/client/web-chat/dist/assets/{ReactPrism-CYKwEJE8.js → ReactPrism-CkUF82bC.js} +1 -1
- package/dev/client/web-chat/dist/assets/{ReactPrism-CYKwEJE8.js.map → ReactPrism-CkUF82bC.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/{TerminalSurface-CIjZjY-A.js → TerminalSurface-B1yxPi0X.js} +15 -15
- package/dev/client/web-chat/dist/assets/{TerminalSurface-CIjZjY-A.js.map → TerminalSurface-B1yxPi0X.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/antigravity-icon__full-color-TC2DVLcA.svg +76 -0
- package/dev/client/web-chat/dist/assets/{index-Cc-Hn07b.js → index-B2QoWl-j.js} +1 -1
- package/dev/client/web-chat/dist/assets/{index-Cc-Hn07b.js.map → index-B2QoWl-j.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/{index-BrluDlTu.js → index-C_iRMZ6i.js} +1 -1
- package/dev/client/web-chat/dist/assets/{index-BrluDlTu.js.map → index-C_iRMZ6i.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/{index-CNKWj_sK.js → index-CoQHzJHo.js} +2 -2
- package/dev/client/web-chat/dist/assets/{index-CNKWj_sK.js.map → index-CoQHzJHo.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/{index-DWUEXNIL.js → index-DbYFv6WF.js} +2 -2
- package/dev/client/web-chat/dist/assets/{index-DWUEXNIL.js.map → index-DbYFv6WF.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/matrix-entry-DX3177Um.css +10 -0
- package/dev/client/web-chat/dist/assets/{matrix-entry-DC97uQE8.js → matrix-entry-DzVcdlBO.js} +332 -349
- package/dev/client/web-chat/dist/assets/matrix-entry-DzVcdlBO.js.map +1 -0
- package/dev/client/web-chat/dist/assets/{pdf-BoBERmJm.js → pdf-56RCXNq0.js} +3 -3
- package/dev/client/web-chat/dist/assets/pdf-56RCXNq0.js.map +1 -0
- package/dev/client/web-chat/dist/assets/provider-avatars/opencode-avatar-dark-1024-6335c8a63b58.png +0 -0
- package/dev/client/web-chat/dist/assets/{web-DbOcnO_Q.js → web--zAXESj4.js} +1 -1
- package/dev/client/web-chat/dist/assets/{web-DbOcnO_Q.js.map → web--zAXESj4.js.map} +1 -1
- package/dev/client/web-chat/dist/assets/{web-BQmBj0Lf.js → web-DmbFMnrE.js} +1 -1
- package/dev/client/web-chat/dist/assets/{web-BQmBj0Lf.js.map → web-DmbFMnrE.js.map} +1 -1
- package/dev/client/web-chat/dist/index.html +48 -1
- package/docs/routec/dev/codex_thread_ownership_and_outbox_recovery.md +9 -1
- package/docs/routec/host_owner_message_navigation.md +1 -1
- package/docs/routec/provider_contract.md +49 -2
- package/host-service/adapters/agy-acp-adapter.mjs +26 -0
- package/host-service/adapters/claude-code-adapter.mjs +57 -0
- package/host-service/adapters/codex-app-server-adapter.mjs +59 -6
- package/host-service/adapters/debug-fixture-provider-adapter.mjs +17 -0
- package/host-service/adapters/grok-acp-adapter.mjs +18 -0
- package/host-service/adapters/opencode-acp-adapter.mjs +1397 -0
- package/host-service/agent-config.mjs +31 -1
- package/host-service/agy-acp-model-discovery.mjs +14 -0
- package/host-service/agy-version.mjs +52 -0
- package/host-service/assets/product-skills/Oysterun/modules/oysterun-sessions/SKILL.md +7 -0
- package/host-service/assets/product-skills/oysterun-sessions/SKILL.md +7 -0
- package/host-service/callback-host-integration.mjs +20 -1
- package/host-service/cli/product-cli.mjs +44 -3
- package/host-service/cli/remove-host-terminals.mjs +25 -0
- package/host-service/codex-app-server-command.mjs +13 -0
- package/host-service/codex-model-discovery.mjs +2 -5
- package/host-service/complete-cli-uninstall.mjs +60 -4
- package/host-service/config.mjs +86 -7
- package/host-service/connectivity/tunnel-traffic.mjs +96 -0
- package/host-service/connectivity/webrtc-signaling-service.mjs +56 -6
- package/host-service/cross-session-search.mjs +1 -1
- package/host-service/desired-open-session-state.mjs +7 -0
- package/host-service/fixtures/p486-fake-opencode.mjs +343 -0
- package/host-service/folder-browser.mjs +1 -3
- package/host-service/frp-agent.mjs +212 -18
- package/host-service/host-chat-time.mjs +19 -0
- package/host-service/host-terminal-cleanup.mjs +45 -0
- package/host-service/lifecycle-continuity-runner.mjs +2 -2
- package/host-service/lifecycle-continuity.mjs +1 -1
- package/host-service/lifecycle-result.mjs +29 -3
- package/host-service/mail-session-attribution.mjs +22 -0
- package/host-service/matrix-credential-issuer.mjs +48 -0
- package/host-service/matrix-event-correlator.mjs +27 -0
- package/host-service/matrix-event-writer.mjs +3 -0
- package/host-service/matrix-facade.mjs +7 -2
- package/host-service/matrix-room-binding.mjs +1 -0
- package/host-service/message-search-index.mjs +5 -1
- package/host-service/oom-kill-evidence.mjs +65 -0
- package/host-service/opencode-acp-model-discovery.mjs +236 -0
- package/host-service/opencode-auth.mjs +41 -0
- package/host-service/opencode-usage-export.mjs +216 -0
- package/host-service/opencode-version.mjs +62 -0
- package/host-service/package.json +1 -1
- package/host-service/plan-limit-readers.mjs +5 -2
- package/host-service/plan-limit-service.mjs +2 -2
- package/host-service/portable-scheduler-definitions.mjs +2 -1
- package/host-service/provider-auth-required.mjs +8 -0
- package/host-service/provider-auth.mjs +24 -0
- package/host-service/provider-command-detection.mjs +196 -61
- package/host-service/provider-model-params.mjs +10 -6
- package/host-service/provider-model-refresh-runner.mjs +79 -1
- package/host-service/provider-registry.mjs +54 -2
- package/host-service/provider-skill-roots.mjs +3 -0
- package/host-service/provider-startup-preflight.mjs +2 -1
- package/host-service/restart-reattach-candidates.mjs +60 -0
- package/host-service/scheduler-acp-provider-runner.mjs +7 -1
- package/host-service/scheduler-direct-provider-runner.mjs +37 -2
- package/host-service/scheduler-rule-model.mjs +18 -0
- package/host-service/scheduler-service.mjs +29 -27
- package/host-service/scheduler-setup-snapshot-contract.mjs +9 -3
- package/host-service/server.mjs +689 -119
- package/host-service/session-collection-service.mjs +8 -0
- package/host-service/session-history.mjs +45 -1
- package/host-service/session-lifecycle-snapshot.mjs +2 -2
- package/host-service/session-loop-definitions.mjs +110 -38
- package/host-service/session-manager.mjs +372 -55
- package/host-service/session-model-switch.mjs +263 -0
- package/host-service/session-switcher-projection.mjs +4 -0
- package/host-service/setup.mjs +5 -1
- package/host-service/terminal-session-manager.mjs +1 -1
- package/host-service/usage-statistics.mjs +1 -1
- package/package.json +1 -1
- package/tool_scripts/oysterun_npm_package_manifest.mjs +2 -0
- package/tool_scripts/oysterun_service_common.sh +12 -0
- package/tool_scripts/uninstall_oysterun_launch_agents.sh +9 -0
- package/dev/client/web-chat/dist/assets/matrix-entry-6Fxm8R3m.css +0 -10
- package/dev/client/web-chat/dist/assets/matrix-entry-DC97uQE8.js.map +0 -1
- package/dev/client/web-chat/dist/assets/pdf-BoBERmJm.js.map +0 -1
- package/host-service/session-profile-provider-config.mjs +0 -17
package/bin/oysterun.mjs
CHANGED
|
@@ -348,6 +348,8 @@ async function runUninstall(args = []) {
|
|
|
348
348
|
console.log(` CLI package: remove ${plan.root}`);
|
|
349
349
|
console.log(` npm: ${plan.identity.node_path} ${plan.identity.npm_cli_path} uninstall ${plan.npmArgs.join(" ")} oysterun`);
|
|
350
350
|
console.log(` Prefix: ${plan.prefix}; OS user: ${plan.user.name} (uid ${plan.user.uid})`);
|
|
351
|
+
console.log(` Launchers: ${plan.launchers.length ? plan.launchers.map(l => l.removable ? `remove ${l.path}` : `${l.path} needs: sudo rm ${l.path}`).join("; ") : "none found"}`);
|
|
352
|
+
console.log(` Kept: ${plan.kept.join("; ")}`);
|
|
351
353
|
const cloud = describeCloudRetirement({ hostConfig });
|
|
352
354
|
console.log(
|
|
353
355
|
cloud.status === "will_retire"
|
|
@@ -414,7 +416,7 @@ async function runUninstall(args = []) {
|
|
|
414
416
|
|
|
415
417
|
const result = spawnSync(releaseServiceScript, serviceArgs, {
|
|
416
418
|
cwd: repoRoot,
|
|
417
|
-
env: process.env,
|
|
419
|
+
env: { ...process.env, OYSTERUN_BOOTSTRAP_NODE_BIN: process.execPath },
|
|
418
420
|
stdio: "inherit",
|
|
419
421
|
});
|
|
420
422
|
if (result.error) {
|
|
@@ -449,7 +451,7 @@ function printConfiguredStatus(status) {
|
|
|
449
451
|
console.log("Service status:");
|
|
450
452
|
const result = spawnSync(releaseServiceScript, ["status"], {
|
|
451
453
|
cwd: repoRoot,
|
|
452
|
-
env: process.env,
|
|
454
|
+
env: { ...process.env, OYSTERUN_BOOTSTRAP_NODE_BIN: process.execPath },
|
|
453
455
|
stdio: "inherit",
|
|
454
456
|
});
|
|
455
457
|
if (result.error) {
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
import { createConnectivityRandomId } from "./random-id.mjs";
|
|
7
7
|
import { OysterunWebRtcLogicalTransport } from "./webrtc-logical-transport.mjs";
|
|
8
8
|
import { boundedDiagnosticErrorMessage } from "./diagnostic-error-message.mjs";
|
|
9
|
+
import { isManagedHostUnavailableResponse } from "./managed-host-unavailable-response.mjs";
|
|
9
10
|
|
|
10
11
|
const DASHBOARD_TOKEN_KEY = "oysterun_token";
|
|
11
12
|
const FAILED_DIAGNOSTIC_BUFFER_KEY = "oysterun_failed_browser_diagnostics_v1";
|
|
@@ -44,9 +45,6 @@ const PRESENCE_HEALTH_RECOVERY_MAX_TOTAL_MS = 10_000;
|
|
|
44
45
|
const MANAGED_URL_PROBE_INTERVAL_MS = 3_000;
|
|
45
46
|
const BACKGROUND_PROMOTION_ATTEMPT_LIMIT = 4;
|
|
46
47
|
const BACKGROUND_PROMOTION_WINDOW_MS = 30 * 60 * 1000;
|
|
47
|
-
const HOST_UNAVAILABLE_BODY_MAX_BYTES = 16 * 1024;
|
|
48
|
-
const HOST_UNAVAILABLE_MARKER =
|
|
49
|
-
'<meta name="oysterun-route-state" content="host-unavailable">';
|
|
50
48
|
const HOST_UNAVAILABLE_RESPONSE_ERROR =
|
|
51
49
|
"managed_host_route_unavailable_response";
|
|
52
50
|
const BULK_REQUEST_TIMEOUT_MS = 120_000;
|
|
@@ -59,7 +57,30 @@ const MANAGED_WEBRTC_SELECTED_PATHS = new Set([
|
|
|
59
57
|
"turn_tcp_tls",
|
|
60
58
|
"ipv6",
|
|
61
59
|
]);
|
|
62
|
-
|
|
60
|
+
// P484: a Host is reached by its permanent h-<token> name or by its custom name; both live on the Managed domain,
|
|
61
|
+
// which the Host writes into the page (host-managed-domain-json: prod tunnel.oysterun.com, a rehearsal stack its
|
|
62
|
+
// own). Relay's own bootstrap and turn names are not Hosts. The route token comes from the Host, never from a name.
|
|
63
|
+
const DEFAULT_MANAGED_DOMAIN = "tunnel.oysterun.com";
|
|
64
|
+
const RELAY_SERVICE_LABELS = new Set(["bootstrap", "turn"]);
|
|
65
|
+
const ROUTE_TOKEN = /^[a-z2-7]{16,32}$/;
|
|
66
|
+
function hostManagedDomain() {
|
|
67
|
+
try {
|
|
68
|
+
const element = globalThis.document?.getElementById?.("host-managed-domain-json");
|
|
69
|
+
const domain = element ? JSON.parse(element.textContent || "null") : null;
|
|
70
|
+
if (typeof domain === "string" && /^[a-z0-9-]+(?:\.[a-z0-9-]+)+$/.test(domain.toLowerCase())) {
|
|
71
|
+
return domain.toLowerCase();
|
|
72
|
+
}
|
|
73
|
+
} catch {
|
|
74
|
+
// A page without the Host's value keeps the production domain.
|
|
75
|
+
}
|
|
76
|
+
return DEFAULT_MANAGED_DOMAIN;
|
|
77
|
+
}
|
|
78
|
+
function isManagedHostHostname(hostname, domain = hostManagedDomain()) {
|
|
79
|
+
const name = String(hostname || "").toLowerCase();
|
|
80
|
+
if (!name.endsWith(`.${domain}`)) return false;
|
|
81
|
+
const label = name.slice(0, -domain.length - 1);
|
|
82
|
+
return /^[a-z0-9-]+$/.test(label) && !RELAY_SERVICE_LABELS.has(label);
|
|
83
|
+
}
|
|
63
84
|
const SESSION_SNAPSHOT_PATH = /^\/session\/snapshot(?:\?|$)/;
|
|
64
85
|
const TRANSPORT_PATH_KINDS = Object.freeze([
|
|
65
86
|
"bootstrap",
|
|
@@ -295,7 +316,7 @@ export function classifyManagedHostBrowserOrigin(value = window.location.href) {
|
|
|
295
316
|
const url = new URL(value, window.location.href);
|
|
296
317
|
if (
|
|
297
318
|
url.protocol === "https:" &&
|
|
298
|
-
|
|
319
|
+
isManagedHostHostname(url.hostname)
|
|
299
320
|
) {
|
|
300
321
|
return {
|
|
301
322
|
kind: "managed_endpoint",
|
|
@@ -541,29 +562,13 @@ async function waitWithAbort(promise, signal) {
|
|
|
541
562
|
}
|
|
542
563
|
}
|
|
543
564
|
|
|
544
|
-
async function isRelayHostUnavailableResponse(response) {
|
|
545
|
-
if (!(response instanceof Response) || response.status !== 404) return false;
|
|
546
|
-
const contentType = String(response.headers.get("content-type") || "");
|
|
547
|
-
if (contentType && !contentType.toLowerCase().includes("text/html")) {
|
|
548
|
-
return false;
|
|
549
|
-
}
|
|
550
|
-
const contentLength = Number(response.headers.get("content-length"));
|
|
551
|
-
if (
|
|
552
|
-
Number.isFinite(contentLength) &&
|
|
553
|
-
contentLength > HOST_UNAVAILABLE_BODY_MAX_BYTES
|
|
554
|
-
) {
|
|
555
|
-
return false;
|
|
556
|
-
}
|
|
557
|
-
const body = await response.clone().text();
|
|
558
|
-
return (
|
|
559
|
-
new TextEncoder().encode(body).byteLength <=
|
|
560
|
-
HOST_UNAVAILABLE_BODY_MAX_BYTES && body.includes(HOST_UNAVAILABLE_MARKER)
|
|
561
|
-
);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
565
|
function normalizePresenceConfiguration(configuration, origin) {
|
|
565
|
-
|
|
566
|
-
|
|
566
|
+
if (!isManagedHostHostname(new URL(origin).hostname)) return null;
|
|
567
|
+
const routeToken =
|
|
568
|
+
typeof configuration.route_names?.route_token === "string"
|
|
569
|
+
? configuration.route_names.route_token.trim().toLowerCase()
|
|
570
|
+
: "";
|
|
571
|
+
if (!ROUTE_TOKEN.test(routeToken)) return null;
|
|
567
572
|
const hostId =
|
|
568
573
|
typeof configuration.host_id === "string"
|
|
569
574
|
? configuration.host_id.trim()
|
|
@@ -595,7 +600,7 @@ function normalizePresenceConfiguration(configuration, origin) {
|
|
|
595
600
|
host_id: hostId,
|
|
596
601
|
cloud_api_url: cloudApiUrl.toString().replace(/\/$/, ""),
|
|
597
602
|
cloud_api_stage: cloudStage,
|
|
598
|
-
route_token:
|
|
603
|
+
route_token: routeToken,
|
|
599
604
|
};
|
|
600
605
|
}
|
|
601
606
|
|
|
@@ -1477,7 +1482,7 @@ export class ManagedHostBrowserConnection {
|
|
|
1477
1482
|
fetchImpl,
|
|
1478
1483
|
diagnostic: (event) => this.emitDiagnostic(event),
|
|
1479
1484
|
responseGuard: async (response) => {
|
|
1480
|
-
if (await
|
|
1485
|
+
if (await isManagedHostUnavailableResponse(response)) {
|
|
1481
1486
|
throw managedHostRouteUnavailableResponseError();
|
|
1482
1487
|
}
|
|
1483
1488
|
},
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const HOST_UNAVAILABLE_BODY_MAX_BYTES = 16 * 1024;
|
|
2
|
+
const HOST_UNAVAILABLE_MARKER =
|
|
3
|
+
'<meta name="oysterun-route-state" content="host-unavailable">';
|
|
4
|
+
|
|
5
|
+
export async function isManagedHostUnavailableResponse(response) {
|
|
6
|
+
if (!(response instanceof Response) || response.status !== 404) return false;
|
|
7
|
+
const contentType = String(response.headers.get('content-type') || '');
|
|
8
|
+
if (contentType && !contentType.toLowerCase().includes('text/html')) return false;
|
|
9
|
+
const contentLength = Number(response.headers.get('content-length'));
|
|
10
|
+
if (Number.isFinite(contentLength) && contentLength > HOST_UNAVAILABLE_BODY_MAX_BYTES) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
const body = await response.clone().text();
|
|
14
|
+
return (
|
|
15
|
+
new TextEncoder().encode(body).byteLength <= HOST_UNAVAILABLE_BODY_MAX_BYTES &&
|
|
16
|
+
body.includes(HOST_UNAVAILABLE_MARKER)
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -2,14 +2,20 @@ export const PHONE_CHAT_SWIPE_DISTANCE = 80;
|
|
|
2
2
|
export const PHONE_CHAT_SWIPE_HORIZONTAL_DOMINANCE = 1.5;
|
|
3
3
|
export const PHONE_BROWSER_EDGE_PX = 24;
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// P421 (Owner 2026-11-11, scope item 8): in the Route C shell a right swipe
|
|
6
|
+
// with the drawer open, or at desktop width, no longer goes back to the former
|
|
7
|
+
// Sessions page; it does nothing (`back: false`). Cinny's own pages keep back.
|
|
8
|
+
export function phoneChatSwipeAction({ deltaX, deltaY, sidebarOpen, wide, back = true }) {
|
|
6
9
|
if (
|
|
7
10
|
Math.abs(deltaX) <= PHONE_CHAT_SWIPE_DISTANCE ||
|
|
8
11
|
Math.abs(deltaX) <= Math.abs(deltaY) * PHONE_CHAT_SWIPE_HORIZONTAL_DOMINANCE
|
|
9
12
|
) {
|
|
10
13
|
return "none";
|
|
11
14
|
}
|
|
12
|
-
if (deltaX > 0)
|
|
15
|
+
if (deltaX > 0) {
|
|
16
|
+
if (!sidebarOpen && !wide) return "open";
|
|
17
|
+
return back ? "back" : "none";
|
|
18
|
+
}
|
|
13
19
|
return sidebarOpen && !wide ? "close" : "none";
|
|
14
20
|
}
|
|
15
21
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as ee,k as Y,r as K,j as Z}from"./matrix-entry-
|
|
1
|
+
import{h as ee,k as Y,r as K,j as Z}from"./matrix-entry-DzVcdlBO.js";import"./index-B2QoWl-j.js";var X={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
2
2
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
3
3
|
*
|
|
4
4
|
* @license MIT <https://opensource.org/licenses/MIT>
|