@bytetrue/byspace 0.16.0 → 0.16.1
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/dist/commands/agent/open.js +3 -3
- package/dist/commands/onboard.js +2 -3
- package/dist/commands/open.d.ts +17 -2
- package/dist/commands/open.js +91 -68
- package/dist/run.js +2 -2
- package/node_modules/@bytetrue/client/package.json +3 -3
- package/node_modules/@bytetrue/highlight/package.json +1 -1
- package/node_modules/@bytetrue/protocol/dist/agent-deep-link.d.ts +0 -2
- package/node_modules/@bytetrue/protocol/dist/agent-deep-link.js +0 -33
- package/node_modules/@bytetrue/protocol/package.json +1 -1
- package/node_modules/@bytetrue/relay/package.json +1 -1
- package/node_modules/@bytetrue/server/dist/server/web-ui/_expo/static/js/web/{index-eade2661e21bbc08a50d56f1c6b0917a.js → index-3e1fce95f28be7888ddabb4aad3c337a.js} +3 -3
- package/node_modules/@bytetrue/server/dist/server/web-ui/_expo/static/js/web/index-3e1fce95f28be7888ddabb4aad3c337a.js.br +0 -0
- package/node_modules/@bytetrue/server/dist/server/web-ui/_expo/static/js/web/index-3e1fce95f28be7888ddabb4aad3c337a.js.gz +0 -0
- package/node_modules/@bytetrue/server/dist/server/web-ui/index.html +1 -1
- package/node_modules/@bytetrue/server/dist/server/web-ui/index.html.br +0 -0
- package/node_modules/@bytetrue/server/dist/server/web-ui/index.html.gz +0 -0
- package/node_modules/@bytetrue/server/package.json +5 -5
- package/package.json +7 -7
- package/node_modules/@bytetrue/server/dist/server/web-ui/_expo/static/js/web/index-eade2661e21bbc08a50d56f1c6b0917a.js.br +0 -0
- package/node_modules/@bytetrue/server/dist/server/web-ui/_expo/static/js/web/index-eade2661e21bbc08a50d56f1c6b0917a.js.gz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { buildDaemonConnectionCommandError, connectToDaemon } from "../../utils/client.js";
|
|
2
|
-
import {
|
|
2
|
+
import { openAgentInWebApp } from "../open.js";
|
|
3
3
|
const openAgentSchema = {
|
|
4
4
|
idField: "agentId",
|
|
5
5
|
columns: [
|
|
@@ -10,7 +10,7 @@ const openAgentSchema = {
|
|
|
10
10
|
};
|
|
11
11
|
export function addOpenOptions(command) {
|
|
12
12
|
return command
|
|
13
|
-
.description("Open an existing agent in BySpace
|
|
13
|
+
.description("Open an existing agent in the BySpace web app")
|
|
14
14
|
.argument("<agent-id>", "Existing agent ID")
|
|
15
15
|
.option("--server <server-id>", "Server ID (defaults to the local daemon)");
|
|
16
16
|
}
|
|
@@ -51,7 +51,7 @@ export async function runOpenCommand(agentIdArg, options, _command) {
|
|
|
51
51
|
throw error;
|
|
52
52
|
}
|
|
53
53
|
const serverId = await resolveServerId(options);
|
|
54
|
-
await
|
|
54
|
+
await openAgentInWebApp({ serverId, agentId }, { host: options.host });
|
|
55
55
|
return {
|
|
56
56
|
type: "single",
|
|
57
57
|
data: { agentId, serverId, status: "opened" },
|
package/dist/commands/onboard.js
CHANGED
|
@@ -106,9 +106,8 @@ function printNextSteps(pairingUrl, byspaceHome, richUi) {
|
|
|
106
106
|
? "1. Open BySpace and scan the QR code above, or paste the pairing link."
|
|
107
107
|
: "1. Open BySpace and connect to your daemon.",
|
|
108
108
|
`2. Web app: ${appBaseUrl}`,
|
|
109
|
-
"3.
|
|
110
|
-
|
|
111
|
-
'5. Example: byspace run --output-schema schema.json "extract fields"',
|
|
109
|
+
"3. Docs: https://github.com/ByteTrue/byspace",
|
|
110
|
+
'4. Example: byspace run --output-schema schema.json "extract fields"',
|
|
112
111
|
];
|
|
113
112
|
const quickReferenceLines = [
|
|
114
113
|
"1. byspace --help",
|
package/dist/commands/open.d.ts
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { type AgentDeepLinkTarget } from "@bytetrue/protocol/agent-deep-link";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The daemon serves its bundled web UI on the same TCP port as `/ws`, so a TCP
|
|
4
|
+
* daemon host doubles as its HTTP origin. Unix sockets, SSH tunnels, and relay
|
|
5
|
+
* offers have no address a browser on this machine can reach.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveWebUiOrigin(rawHost: string): string | null;
|
|
8
|
+
/**
|
|
9
|
+
* Mirrors `buildHostWorkspaceRoute` in `packages/app/src/utils/host-routes.ts`.
|
|
10
|
+
* Workspace IDs are generated as `wks_<hex>` (packages/server/src/server/workspace-registry-model.ts),
|
|
11
|
+
* so percent-encoding always suffices; the app's base64 path segment form only
|
|
12
|
+
* exists for pre-v0.1.95 path-shaped IDs, which this fork does not carry.
|
|
13
|
+
*/
|
|
14
|
+
export declare function buildWorkspaceWebRoute(serverId: string, workspaceId: string): string;
|
|
15
|
+
export declare function openProjectInWebApp(projectPath: string): Promise<void>;
|
|
16
|
+
export declare function openAgentInWebApp(target: AgentDeepLinkTarget, options?: {
|
|
17
|
+
host?: string;
|
|
18
|
+
}): Promise<void>;
|
|
4
19
|
//# sourceMappingURL=open.d.ts.map
|
package/dist/commands/open.js
CHANGED
|
@@ -1,89 +1,112 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { homedir } from "node:os";
|
|
3
|
-
import path from "node:path";
|
|
4
1
|
import { spawnProcess } from "@bytetrue/server";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
2
|
+
import { buildAgentDeepLinkRoute, } from "@bytetrue/protocol/agent-deep-link";
|
|
3
|
+
import { resolveLocalDaemonState, resolveTcpHostFromListen } from "./daemon/local-daemon.js";
|
|
4
|
+
import { buildDaemonConnectionCommandError, connectToDaemon, getDaemonHost, getExplicitDaemonHost, } from "../utils/client.js";
|
|
5
|
+
/**
|
|
6
|
+
* The daemon serves its bundled web UI on the same TCP port as `/ws`, so a TCP
|
|
7
|
+
* daemon host doubles as its HTTP origin. Unix sockets, SSH tunnels, and relay
|
|
8
|
+
* offers have no address a browser on this machine can reach.
|
|
9
|
+
*/
|
|
10
|
+
export function resolveWebUiOrigin(rawHost) {
|
|
11
|
+
const trimmed = rawHost.trim();
|
|
12
|
+
if (!trimmed || trimmed.startsWith("ssh://")) {
|
|
17
13
|
return null;
|
|
18
14
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"/opt/BySpace/BySpace",
|
|
23
|
-
path.join(homedir(), "Applications", "BySpace.AppImage"),
|
|
24
|
-
];
|
|
25
|
-
for (const candidate of candidates) {
|
|
26
|
-
if (existsSync(candidate)) {
|
|
27
|
-
return candidate;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
15
|
+
const endpoint = trimmed.startsWith("tcp://") ? trimmed.slice("tcp://".length) : trimmed;
|
|
16
|
+
const match = /^\[?([^\]/]+?)]?:(\d+)$/.exec(endpoint);
|
|
17
|
+
if (!match) {
|
|
30
18
|
return null;
|
|
31
19
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
20
|
+
const [, rawHostname, port] = match;
|
|
21
|
+
const hostname = rawHostname === "0.0.0.0" ? "127.0.0.1" : rawHostname;
|
|
22
|
+
const hostPart = hostname.includes(":") ? `[${hostname}]` : hostname;
|
|
23
|
+
return `http://${hostPart}:${port}`;
|
|
24
|
+
}
|
|
25
|
+
function resolveLocalWebUiOrigin() {
|
|
26
|
+
const listen = resolveLocalDaemonState().listen;
|
|
27
|
+
const host = resolveTcpHostFromListen(listen) ?? listen;
|
|
28
|
+
return { origin: resolveWebUiOrigin(host), host };
|
|
29
|
+
}
|
|
30
|
+
function resolveWebUiOriginForHost(host) {
|
|
31
|
+
const explicitHost = getExplicitDaemonHost(host);
|
|
32
|
+
if (!explicitHost) {
|
|
33
|
+
return resolveLocalWebUiOrigin();
|
|
39
34
|
}
|
|
40
|
-
return
|
|
35
|
+
return { origin: resolveWebUiOrigin(explicitHost), host: explicitHost };
|
|
41
36
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Mirrors `buildHostWorkspaceRoute` in `packages/app/src/utils/host-routes.ts`.
|
|
39
|
+
* Workspace IDs are generated as `wks_<hex>` (packages/server/src/server/workspace-registry-model.ts),
|
|
40
|
+
* so percent-encoding always suffices; the app's base64 path segment form only
|
|
41
|
+
* exists for pre-v0.1.95 path-shaped IDs, which this fork does not carry.
|
|
42
|
+
*/
|
|
43
|
+
export function buildWorkspaceWebRoute(serverId, workspaceId) {
|
|
44
|
+
return `/h/${encodeURIComponent(serverId)}/workspace/${encodeURIComponent(workspaceId)}`;
|
|
45
|
+
}
|
|
46
|
+
function openInBrowser(url) {
|
|
47
|
+
let command;
|
|
48
|
+
let args;
|
|
49
|
+
if (process.platform === "darwin") {
|
|
50
|
+
command = "open";
|
|
51
|
+
args = [url];
|
|
52
|
+
}
|
|
53
|
+
else if (process.platform === "win32") {
|
|
54
|
+
command = process.env.ComSpec ?? "cmd";
|
|
55
|
+
args = ["/c", "start", "", url];
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
command = "xdg-open";
|
|
59
|
+
args = [url];
|
|
60
|
+
}
|
|
61
|
+
spawnProcess(command, args, { detached: true, stdio: "ignore", shell: false }).unref();
|
|
62
|
+
process.stderr.write(`${url}\n`);
|
|
51
63
|
}
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
env: cleanEnvForDesktopLaunch(),
|
|
57
|
-
}).unref();
|
|
64
|
+
function reportWebUiUnavailable(host) {
|
|
65
|
+
process.stderr.write(`Cannot open the web app for ${host}: the daemon has no HTTP endpoint reachable from here.\n` +
|
|
66
|
+
"Start it with `byspace daemon start` and open the Web UI URL it prints.\n");
|
|
67
|
+
process.exitCode = 1;
|
|
58
68
|
}
|
|
59
|
-
function
|
|
60
|
-
|
|
61
|
-
|
|
69
|
+
export async function openProjectInWebApp(projectPath) {
|
|
70
|
+
const { origin, host } = resolveLocalWebUiOrigin();
|
|
71
|
+
if (!origin) {
|
|
72
|
+
reportWebUiUnavailable(host);
|
|
73
|
+
return;
|
|
62
74
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
75
|
+
let client;
|
|
76
|
+
try {
|
|
77
|
+
client = await connectToDaemon();
|
|
66
78
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
spawnDetached("open", ["-n", "-g", "-a", desktopApp, "--args", ...args]);
|
|
79
|
+
catch (error) {
|
|
80
|
+
const failure = buildDaemonConnectionCommandError({ error });
|
|
81
|
+
process.stderr.write(`${failure.message}\n${failure.details}\n`);
|
|
82
|
+
process.exitCode = 1;
|
|
72
83
|
return;
|
|
73
84
|
}
|
|
74
|
-
spawnDetached(desktopApp, args);
|
|
75
|
-
}
|
|
76
|
-
export async function openDesktopWithProject(projectPath) {
|
|
77
85
|
try {
|
|
78
|
-
|
|
86
|
+
const serverId = client.getLastServerInfoMessage()?.serverId.trim();
|
|
87
|
+
if (!serverId) {
|
|
88
|
+
throw new Error("The daemon did not report a server ID.");
|
|
89
|
+
}
|
|
90
|
+
const result = await client.openProject(projectPath);
|
|
91
|
+
if (result.error || !result.workspace) {
|
|
92
|
+
throw new Error(result.error ?? `The daemon did not open a workspace for ${projectPath}`);
|
|
93
|
+
}
|
|
94
|
+
openInBrowser(`${origin}${buildWorkspaceWebRoute(serverId, result.workspace.id)}`);
|
|
79
95
|
}
|
|
80
96
|
catch (error) {
|
|
81
|
-
|
|
82
|
-
process.stderr.write(`${message}\n`);
|
|
97
|
+
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
83
98
|
process.exitCode = 1;
|
|
84
99
|
}
|
|
100
|
+
finally {
|
|
101
|
+
await client.close().catch(() => { });
|
|
102
|
+
}
|
|
85
103
|
}
|
|
86
|
-
export async function
|
|
87
|
-
|
|
104
|
+
export async function openAgentInWebApp(target, options = {}) {
|
|
105
|
+
const { origin, host } = resolveWebUiOriginForHost(options.host);
|
|
106
|
+
if (!origin) {
|
|
107
|
+
reportWebUiUnavailable(host || getDaemonHost());
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
openInBrowser(`${origin}${buildAgentDeepLinkRoute(target)}`);
|
|
88
111
|
}
|
|
89
112
|
//# sourceMappingURL=open.js.map
|
package/dist/run.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createCli } from "./cli.js";
|
|
2
2
|
import { classifyInvocation } from "./classify.js";
|
|
3
|
-
import {
|
|
3
|
+
import { openProjectInWebApp } from "./commands/open.js";
|
|
4
4
|
export function createCliParseArgv(input) {
|
|
5
5
|
const program = createCli();
|
|
6
6
|
const knownCommands = new Set(program.commands.map((command) => command.name()));
|
|
@@ -30,7 +30,7 @@ export async function runCli(argv, options = {}) {
|
|
|
30
30
|
nodeArgv: options.nodeArgv,
|
|
31
31
|
});
|
|
32
32
|
if (!Array.isArray(parseArgv)) {
|
|
33
|
-
await
|
|
33
|
+
await openProjectInWebApp(parseArgv.resolvedPath);
|
|
34
34
|
return typeof process.exitCode === "number" ? process.exitCode : 0;
|
|
35
35
|
}
|
|
36
36
|
const program = createCli();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytetrue/client",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "BySpace client SDK package",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"test": "vitest run"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@bytetrue/protocol": "0.16.
|
|
43
|
-
"@bytetrue/relay": "0.16.
|
|
42
|
+
"@bytetrue/protocol": "0.16.1",
|
|
43
|
+
"@bytetrue/relay": "0.16.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "^20.9.0",
|
|
@@ -3,6 +3,4 @@ export interface AgentDeepLinkTarget {
|
|
|
3
3
|
agentId: string;
|
|
4
4
|
}
|
|
5
5
|
export declare function buildAgentDeepLinkRoute(target: AgentDeepLinkTarget): `/h/${string}/agent/${string}`;
|
|
6
|
-
export declare function buildAgentDeepLink(target: AgentDeepLinkTarget): string;
|
|
7
|
-
export declare function parseAgentDeepLink(input: string): AgentDeepLinkTarget | null;
|
|
8
6
|
//# sourceMappingURL=agent-deep-link.d.ts.map
|
|
@@ -13,37 +13,4 @@ export function buildAgentDeepLinkRoute(target) {
|
|
|
13
13
|
const { serverId, agentId } = normalizeAgentDeepLinkTarget(target);
|
|
14
14
|
return `/h/${encodeURIComponent(serverId)}/agent/${encodeURIComponent(agentId)}`;
|
|
15
15
|
}
|
|
16
|
-
export function buildAgentDeepLink(target) {
|
|
17
|
-
return `byspace:/${buildAgentDeepLinkRoute(target)}`;
|
|
18
|
-
}
|
|
19
|
-
export function parseAgentDeepLink(input) {
|
|
20
|
-
let url;
|
|
21
|
-
try {
|
|
22
|
-
url = new URL(input);
|
|
23
|
-
}
|
|
24
|
-
catch {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
if (url.protocol !== "byspace:" ||
|
|
28
|
-
url.hostname !== "h" ||
|
|
29
|
-
url.username ||
|
|
30
|
-
url.password ||
|
|
31
|
-
url.port ||
|
|
32
|
-
url.search ||
|
|
33
|
-
url.hash) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
const segments = url.pathname.split("/").filter(Boolean);
|
|
37
|
-
if (segments.length !== 3 || segments[1] !== "agent") {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
try {
|
|
41
|
-
const serverId = normalizeSegment(decodeURIComponent(segments[0] ?? ""));
|
|
42
|
-
const agentId = normalizeSegment(decodeURIComponent(segments[2] ?? ""));
|
|
43
|
-
return serverId && agentId ? { serverId, agentId } : null;
|
|
44
|
-
}
|
|
45
|
-
catch {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
16
|
//# sourceMappingURL=agent-deep-link.js.map
|
|
@@ -1118,7 +1118,7 @@ __d(function(g,r,_i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?
|
|
|
1118
1118
|
__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return N}}),Object.defineProperty(_e,"AppOwnership",{enumerable:!0,get:function(){return l.AppOwnership}}),Object.defineProperty(_e,"ExecutionEnvironment",{enumerable:!0,get:function(){return l.ExecutionEnvironment}}),Object.defineProperty(_e,"UserInterfaceIdiom",{enumerable:!0,get:function(){return l.UserInterfaceIdiom}});var n=e(r(d[0])),t=r(d[1]);r(d[2]);var u=e(r(d[3])),l=r(d[4]),o=e(r(d[5]));o.default||console.warn("No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?");const s=(0,t.requireOptionalNativeModule)('ExpoUpdates');let f=null;if(s){let e;s.manifest?e=s.manifest:s.manifestString&&(e=JSON.parse(s.manifestString)),e&&Object.keys(e).length>0&&(f=e)}let c=null;if(u.default.EXDevLauncher){let e;u.default.EXDevLauncher.manifestString&&(e=JSON.parse(u.default.EXDevLauncher.manifestString)),e&&Object.keys(e).length>0&&(c=e)}let p=null;if(o.default&&o.default.manifest){const e=o.default.manifest;p='string'==typeof e?JSON.parse(e):e}let b=f??c??p;const E=o.default||{},{appOwnership:O}=E,x=(0,n.default)(E,["name","appOwnership"]),v=Object.assign({},x,{appOwnership:O??null});function _(e){return!h(e)}function h(e){return'metadata'in e}function S(e=!1){if(!b){const e=null===b?'null':'undefined';if(x.executionEnvironment,l.ExecutionEnvironment.Bare,x.executionEnvironment===l.ExecutionEnvironment.StoreClient||x.executionEnvironment===l.ExecutionEnvironment.Standalone)throw new t.CodedError('ERR_CONSTANTS_MANIFEST_UNAVAILABLE',`Constants.manifest is ${e}, must be an object.`)}return b}Object.defineProperties(v,{__unsafeNoWarnManifest:{get(){const e=S(!0);return e&&_(e)?e:null},enumerable:!1},__unsafeNoWarnManifest2:{get(){const e=S(!0);return e&&h(e)?e:null},enumerable:!1},manifest:{get(){const e=S();return e&&_(e)?e:null},enumerable:!0},manifest2:{get(){const e=S();return e&&h(e)?e:null},enumerable:!0},expoConfig:{get(){const e=S(!0);return e?s&&s.isEmbeddedLaunch?p:h(e)?e.extra?.expoClient??null:_(e)?e:null:null},enumerable:!0},expoGoConfig:{get(){const e=S(!0);return e?h(e)?e.extra?.expoGo??null:_(e)?e:null:null},enumerable:!0},easConfig:{get(){const e=S(!0);return e?h(e)?e.extra?.eas??null:_(e)?e:null:null},enumerable:!0},__rawManifest_TEST:{get:()=>b,set(e){b=e},enumerable:!1}});var N=v},1021,[35,4,25,1022,1023,1024]);
|
|
1119
1119
|
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u={UIManager:((e=t)&&e.__esModule?e:{default:e}).default}},1022,[159]);
|
|
1120
1120
|
__d(function(g,r,i,a,m,e,d){"use strict";var t,n,o;Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AppOwnership",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ExecutionEnvironment",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"UserInterfaceIdiom",{enumerable:!0,get:function(){return o}}),(function(t){t.Expo="expo"})(t||(t={})),(function(t){t.Bare="bare",t.Standalone="standalone",t.StoreClient="storeClient"})(n||(n={})),(function(t){t.Handset="handset",t.Tablet="tablet",t.Desktop="desktop",t.TV="tv",t.Unsupported="unsupported"})(o||(o={}))},1023,[]);
|
|
1121
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});var n=r(d[0]);const t=(Date.now()+'-'+Math.floor(1e9*Math.random())).toString();function o(){if('undefined'!=typeof navigator&&'string'==typeof navigator.userAgent){const n=navigator.userAgent.toLowerCase();if(n.includes('edge'))return'Edge';if(n.includes('edg'))return'Chromium Edge';if(n.includes('opr')&&'opr'in window&&window.opr)return'Opera';if(n.includes('chrome')&&'chrome'in window&&window.chrome)return'Chrome';if(n.includes('trident'))return'IE';if(n.includes('firefox'))return'Firefox';if(n.includes('safari'))return'Safari'}}var s={get appOwnership(){return null},get executionEnvironment(){return n.ExecutionEnvironment.Bare},get sessionId(){return t},get isHeadless(){return'undefined'==typeof navigator||/\bHeadlessChrome\//.test(navigator.userAgent)},get expoVersion(){return this.manifest.sdkVersion||null},get linkingUri(){return'undefined'!=typeof location?location.origin:''},get expoRuntimeVersion(){return this.expoVersion},get deviceName(){return o()},get systemFonts(){return[]},get statusBarHeight(){return 0},get deviceYearClass(){return null},get manifest(){return"{\"name\":\"BySpace\",\"slug\":\"byspace\",\"version\":\"0.16.
|
|
1121
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});var n=r(d[0]);const t=(Date.now()+'-'+Math.floor(1e9*Math.random())).toString();function o(){if('undefined'!=typeof navigator&&'string'==typeof navigator.userAgent){const n=navigator.userAgent.toLowerCase();if(n.includes('edge'))return'Edge';if(n.includes('edg'))return'Chromium Edge';if(n.includes('opr')&&'opr'in window&&window.opr)return'Opera';if(n.includes('chrome')&&'chrome'in window&&window.chrome)return'Chrome';if(n.includes('trident'))return'IE';if(n.includes('firefox'))return'Firefox';if(n.includes('safari'))return'Safari'}}var s={get appOwnership(){return null},get executionEnvironment(){return n.ExecutionEnvironment.Bare},get sessionId(){return t},get isHeadless(){return'undefined'==typeof navigator||/\bHeadlessChrome\//.test(navigator.userAgent)},get expoVersion(){return this.manifest.sdkVersion||null},get linkingUri(){return'undefined'!=typeof location?location.origin:''},get expoRuntimeVersion(){return this.expoVersion},get deviceName(){return o()},get systemFonts(){return[]},get statusBarHeight(){return 0},get deviceYearClass(){return null},get manifest(){return"{\"name\":\"BySpace\",\"slug\":\"byspace\",\"version\":\"0.16.1\",\"orientation\":\"portrait\",\"icon\":\"./assets/images/icon.png\",\"scheme\":\"byspace\",\"userInterfaceStyle\":\"automatic\",\"newArchEnabled\":true,\"web\":{\"output\":\"single\",\"favicon\":\"./assets/images/favicon.png\",\"shortName\":\"BySpace\",\"orientation\":\"portrait\",\"name\":\"BySpace\"},\"autolinking\":{\"searchPaths\":[\"../../node_modules\",\"./node_modules\"]},\"experiments\":{\"typedRoutes\":true,\"reactCompiler\":true,\"autolinkingModuleResolution\":true},\"extra\":{\"router\":{}},\"sdkVersion\":\"54.0.0\",\"platforms\":[\"ios\",\"android\",\"web\"]}"},get manifest2(){return null},get experienceUrl(){return'undefined'!=typeof location?location.origin:''},get debugMode(){return!1},getWebViewUserAgentAsync:async()=>'undefined'!=typeof navigator?navigator.userAgent:null}},1024,[1023]);
|
|
1122
1122
|
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=r(d[1]),o=(e=n)&&e.__esModule?e:{default:e};async function u(){if(!o.default.unregisterForNotificationsAsync)throw new t.UnavailabilityError('ExpoNotifications','unregisterForNotificationsAsync');return o.default.unregisterForNotificationsAsync()}},1025,[4,1026]);
|
|
1123
1123
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}}),r(d[0]);let t=!1;var n={addListener:()=>(t||(console.warn("[expo-notifications] Listening to push token changes is not yet fully supported on web. Adding a listener will have no effect."),t=!0),{remove:()=>{}}),removeListener:()=>{},removeAllListeners:()=>{},emit:()=>{},listenerCount:()=>0}},1026,[4]);
|
|
1124
1124
|
__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),t.default=e,t})(r(_d[0])),o=e(r(_d[1])),n=r(_d[2]),c=r(_d[3]),s=e(r(_d[4])),d=e(r(_d[5]));const p='https://exp.host/--/api/v2/';async function u(e={}){const s=e.devicePushToken||await(0,d.default)(),u=e.deviceId||await h(),R=e.projectId||o.default.easConfig?.projectId||o.default.expoConfig?.extra?.eas?.projectId;if(!R)throw new n.CodedError('ERR_NOTIFICATIONS_NO_EXPERIENCE_ID',"No \"projectId\" found. If \"projectId\" can't be inferred from the manifest (for instance, in bare workflow), you have to pass it in yourself.");const w=e.applicationId||t.applicationId;if(!w)throw new n.CodedError('ERR_NOTIFICATIONS_NO_APPLICATION_ID',"No \"applicationId\" found. If it can't be inferred from native configuration by expo-application, you have to pass it in yourself.");const O=e.type||y(s),_=e.development||await I(),v=e.baseUrl??p,N=e.url??`${v}push/getExpoPushToken`,x={type:O,deviceId:u.toLowerCase(),development:_,appId:w,deviceToken:E(s),projectId:R},T=await fetch(N,{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify(x)}).catch(e=>{throw new n.CodedError('ERR_NOTIFICATIONS_NETWORK_ERROR',`Error encountered while fetching Expo token: ${e}.`)});if(!T.ok){const e=T.statusText||T.status;let t;try{t=await T.text()}catch{}throw new n.CodedError('ERR_NOTIFICATIONS_SERVER_ERROR',`Error encountered while fetching Expo token, expected an OK response, received: ${e} (body: "${t}").`)}const b=l(await f(T));try{e.url||e.baseUrl?console.debug("[expo-notifications] Since the URL endpoint to register in has been customized in the options, expo-notifications won't try to auto-update the device push token on the server."):await(0,c.setAutoServerRegistrationEnabledAsync)(!0)}catch(e){console.warn('[expo-notifications] Could not enable automatically registering new device tokens with the Expo notification service',e)}return{type:'expo',data:b}}async function f(e){try{return await e.json()}catch{try{throw new n.CodedError('ERR_NOTIFICATIONS_SERVER_ERROR',`Expected a JSON response from server when fetching Expo token, received body: ${JSON.stringify(await e.text())}.`)}catch{throw new n.CodedError('ERR_NOTIFICATIONS_SERVER_ERROR',`Expected a JSON response from server when fetching Expo token, received response: ${JSON.stringify(e)}.`)}}}function l(e){if(!e||'object'!=typeof e||!e.data||'object'!=typeof e.data||!e.data.expoPushToken||'string'!=typeof e.data.expoPushToken)throw new n.CodedError('ERR_NOTIFICATIONS_SERVER_ERROR',`Malformed response from server, expected "{ data: { expoPushToken: string } }", received: ${JSON.stringify(e,null,2)}.`);return e.data.expoPushToken}async function h(){try{if(!s.default.getInstallationIdAsync)throw new n.UnavailabilityError('ExpoServerRegistrationModule','getInstallationIdAsync');return await s.default.getInstallationIdAsync()}catch(e){throw new n.CodedError('ERR_NOTIF_DEVICE_ID',`Could not have fetched installation ID of the application: ${e}.`)}}function E(e){return'string'==typeof e.data?e.data:JSON.stringify(e.data)}async function I(){return!1}function y(e){switch(e.type){case'ios':return'apns';case'android':return'fcm';default:return e.type}}},1027,[1028,1021,4,1031,1035,1020]);
|
|
@@ -15185,7 +15185,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
|
|
|
15185
15185
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"decodeOfferFragmentPayload",{enumerable:!0,get:function(){return n.decodeOfferFragmentPayload}}),Object.defineProperty(e,"buildDaemonWebSocketUrl",{enumerable:!0,get:function(){return t.buildDaemonWebSocketUrl}}),Object.defineProperty(e,"deriveLabelFromEndpoint",{enumerable:!0,get:function(){return t.deriveLabelFromEndpoint}}),Object.defineProperty(e,"extractHostPortFromWebSocketUrl",{enumerable:!0,get:function(){return t.extractHostPortFromWebSocketUrl}}),Object.defineProperty(e,"normalizeHostPort",{enumerable:!0,get:function(){return t.normalizeHostPort}}),Object.defineProperty(e,"parseConnectionUri",{enumerable:!0,get:function(){return t.parseConnectionUri}}),Object.defineProperty(e,"parseHostPort",{enumerable:!0,get:function(){return t.parseHostPort}}),Object.defineProperty(e,"serializeConnectionUri",{enumerable:!0,get:function(){return t.serializeConnectionUri}}),Object.defineProperty(e,"serializeConnectionUriForStorage",{enumerable:!0,get:function(){return t.serializeConnectionUriForStorage}}),Object.defineProperty(e,"shouldUseTlsForDefaultHostedRelay",{enumerable:!0,get:function(){return t.shouldUseTlsForDefaultHostedRelay}}),e.buildRelayWebSocketUrl=function(n){return(0,t.buildRelayWebSocketUrl)(Object.assign({},n,{role:"client"}))};var t=r(d[0]),n=r(d[1])},3540,[3515,3541]);
|
|
15186
15186
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ConnectionOfferV2Schema",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ConnectionOfferSchema",{enumerable:!0,get:function(){return o}}),e.decodeOfferFragmentPayload=l,e.parseConnectionOfferFromUrl=function(n){const t=f(n);if(!t)return null;const c=l(t);return o.parse(c)};var n=r(d[0]);const t=n.z.object({v:n.z.literal(2),serverId:n.z.string().min(1),daemonPublicKeyB64:n.z.string().min(1),relay:n.z.object({endpoint:n.z.string().min(1),useTls:n.z.boolean().optional()}),hostname:n.z.string().min(1).optional()}),o=t;function c(n){const t=n.replace(/-/g,"+").replace(/_/g,"/"),o=t.padEnd(t.length+(4-t.length%4)%4,"="),c=globalThis.atob(o),l=Uint8Array.from(c,n=>n.charCodeAt(0));return new TextDecoder("utf-8",{fatal:!0}).decode(l)}function l(n){const t=c(n);return JSON.parse(t)}const u="#offer=";function f(n){const t=n.trim();if(!t)return null;const o=t.indexOf(u);if(-1===o)return null;const c=t.slice(o+u.length).trim();return c.length>0?c:null}},3541,[1600]);
|
|
15187
15187
|
__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.resolveAppVersion=function(){const e=u(t.default?.version);if(e)return e;const o=u(n.default.expoConfig?.version);if(o)return o;const f=u(n.default.manifest?.version);if(f)return f;return null};var n=e(r(d[0])),t=e(r(d[1]));function u(e){if("string"!=typeof e)return null;const n=e.trim();return 0===n.length?null:n}},3542,[1021,3543]);
|
|
15188
|
-
__d(function(e,t,r,a,o,i,s){o.exports={name:"@bytetrue/app",version:"0.16.
|
|
15188
|
+
__d(function(e,t,r,a,o,i,s){o.exports={name:"@bytetrue/app",version:"0.16.1",private:!0,main:"index.ts",scripts:{start:"npm run start:expo","start:expo":"cross-env APP_VARIANT=development expo start","reset-project":"node ./scripts/reset-project.js","android:clear":"node -e \"require('node:fs').rmSync('android', { recursive: true, force: true })\"",web:"npm --prefix ../.. run build:client && concurrently --kill-others --names protocol,client,expo --prefix-colors yellow,blue,magenta \"npm --prefix ../.. run watch:protocol\" \"npm --prefix ../.. run watch:client\" \"npm run web:expo\"","web:expo":"expo start --web",lint:"expo lint",typecheck:"tsgo --noEmit",test:"vitest run","test:browser":"vitest run --project browser","test:e2e":"playwright test --project=browser","test:e2e:diff-performance":"cross-env BYSPACE_DIFF_PERF_E2E=1 playwright test --project=browser e2e/browser/diff-performance.spec.ts","test:e2e:stream-smoothness":"cross-env BYSPACE_AGENT_STREAM_PERF_E2E=1 playwright test --project=browser e2e/browser/agent-stream-smoothness.spec.ts","test:e2e:real":"cross-env E2E_FORK_BYSPACE_HOME_FROM=../../.dev/byspace-home playwright test --project=real-provider","test:e2e:relay-deployment":"npm --prefix ../.. run build:server && npm --prefix ../.. run build:daemon-web-ui && cross-env E2E_FORK_BYSPACE_HOME_FROM=../../.dev/byspace-home playwright test --project=relay-deployment e2e/browser/relay-deployment-reconnect.real.spec.ts","test:e2e:ui":"playwright test --ui",build:"npm run build:web","build:web":"npm --prefix ../.. run build:app-deps && npm --prefix ../.. run build:config-schema && expo export --platform web","profile:composer-typing":"node ./scripts/profile-composer-typing.mjs","profile:explorer-toggle":"node ./scripts/profile-explorer-toggle.mjs","profile:side-pane":"playwright test --config playwright.profile.config.ts side-pane-performance.spec.ts","profile:workspace-switching":"node ./scripts/profile-workspace-switching.mjs","profile:workspace-tabs":"node ./scripts/profile-workspace-tabs.mjs","deploy:web":"npm run build:web && wrangler pages deploy dist --project-name byspace --branch main","deploy:web:beta":"npm run build:web && wrangler pages deploy dist --project-name byspace-beta --branch main","build:terminal-webview":"node ./scripts/build-terminal-webview-html.mjs","build:mermaid-runtime":"node ./src/components/markdown/fence/mermaid/build-runtime.mjs"},dependencies:{"@bytetrue/client":"*","@bytetrue/highlight":"*","@bytetrue/protocol":"*","@codemirror/commands":"6.10.4","@codemirror/language":"6.12.4","@codemirror/search":"6.7.1","@codemirror/state":"6.7.1","@codemirror/view":"6.43.6","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@floating-ui/react-native":"^0.10.7","@gorhom/bottom-sheet":"^5.2.14","@gorhom/portal":"^1.0.14","@marijn/find-cluster-break":"^1.0.2","@react-native-async-storage/async-storage":"2.2.0","@react-native-masked-view/masked-view":"^0.3.2","@react-native/normalize-colors":"^0.81.5","@react-navigation/native":"^7.1.8","@replit/codemirror-vim":"6.3.0","@shopify/react-native-skia":"2.2.12","@tanstack/react-query":"^5.90.11","@tanstack/react-virtual":"^3.13.21","@xterm/addon-clipboard":"^0.3.0-beta.213","@xterm/addon-fit":"^0.12.0-beta.213","@xterm/addon-image":"^0.10.0-beta.213","@xterm/addon-ligatures":"^0.11.0-beta.213","@xterm/addon-search":"^0.17.0-beta.213","@xterm/addon-unicode11":"^0.10.0-beta.213","@xterm/addon-web-links":"^0.13.0-beta.213","@xterm/addon-webgl":"^0.20.0-beta.212","@xterm/xterm":"^6.1.0-beta.213",buffer:"^6.0.3",expo:"^54.0.18","expo-asset":"~12.0.12","expo-audio":"~1.0.13","expo-build-properties":"^1.0.9","expo-camera":"~17.0.10","expo-clipboard":"~8.0.7","expo-constants":"~18.0.9","expo-crypto":"^15.0.8","expo-dev-client":"^6.0.15","expo-document-picker":"~14.0.8","expo-file-system":"~19.0.17","expo-haptics":"~15.0.7","expo-image":"~3.0.10","expo-image-manipulator":"~14.0.8","expo-image-picker":"^17.0.8","expo-keep-awake":"^15.0.7","expo-linking":"~8.0.8","expo-localization":"~17.0.9","expo-notifications":"^0.32.16","expo-router":"~6.0.13","expo-sharing":"^14.0.8","expo-splash-screen":"~31.0.10","expo-sqlite":"~16.0.10","expo-system-ui":"~6.0.7","fast-deep-equal":"^3.1.3",htmlparser2:"^12.0.0",i18next:"^26.3.0","lucide-react-native":"^0.546.0","markdown-it":"^10.0.0",mermaid:"^11.16.0","mnemonic-id":"^3.2.7",qrcode:"^1.5.4",react:"19.1.0","react-dom":"19.1.0","react-i18next":"^17.0.8","react-native":"0.81.5","react-native-draggable-flatlist":"^4.0.3","react-native-edge-to-edge":"^1.7.0","react-native-gesture-handler":"~2.28.0","react-native-keyboard-controller":"1.21.12","react-native-markdown-display":"^7.0.2","react-native-nitro-modules":"0.35.5","react-native-reanimated":"~4.3.1","react-native-safe-area-context":"~5.6.0","react-native-screens":"~4.16.0","react-native-svg":"^15.14.0","react-native-unistyles":"^3.2.4","react-native-web":"~0.21.0","react-native-webview":"^13.16.0","react-native-worklets":"~0.8.3","tiny-invariant":"^1.3.3",turndown:"^7.2.4","turndown-plugin-gfm":"^1.0.2","use-sync-external-store":"^1.6.0",yaml:"^2.8.4",zod:"^4.4.3",zustand:"^5.0.9"},devDependencies:{"@playwright/test":"^1.56.1","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/jsdom":"^30.0.0","@types/markdown-it":"^14.1.2","@types/node":"~22.19.0","@types/qrcode":"^1.5.6","@types/react":"~19.2.0","@types/react-dom":"~19.2.0","@types/turndown":"^5.0.6","@types/ws":"^8.18.1","@vitest/browser":"^4.1.7","@vitest/browser-playwright":"^4.1.7","@xterm/headless":"^6.1.0-beta.213",dotenv:"^17.2.3","eas-cli":"^16.24.1",esbuild:"0.28.1",eslint:"^9.25.0","eslint-config-expo":"~10.0.0","expo-gradle-jvmargs":"^1.1.2","fake-indexeddb":"^6.2.5",jsdom:"^20.0.3","material-icon-theme":"^5.32.0",playwright:"^1.56.1","serve-sim":"^0.1.40",typescript:"~5.9.2",vitest:"^4.1.6",wrangler:"^4.105.0",ws:"^8.20.0"},reanimated:{staticFeatureFlags:{FORCE_REACT_RENDER_FOR_SETTLED_ANIMATIONS:!1}}}},3543,[]);
|
|
15189
15189
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.assertDirectTcpConnectionAllowed=w,Object.defineProperty(e,"DaemonConnectionTestError",{enumerable:!0,get:function(){return h}}),e.buildClientConfig=y,e.connectAndProbe=C,e.connectToDaemon=async function(t,o,n=l){return C(await y(t,o?.serverId,o,n),E(t,o),n)};var t=r(d[0]),o=r(d[1]),n=r(d[2]),s=r(d[3]),c=r(d[4]);const l={getClientId:n.getOrCreateClientId,resolveAppVersion:s.resolveAppVersion,createClient:o=>new t.DaemonClient(o)};function u(t){if("string"!=typeof t)return null;const o=t.trim();return o.length>0?o:null}function p(t,o){const n=t&&("transport error"===t.toLowerCase()||"transport closed"===t.toLowerCase()),s=o&&("transport error"===o.toLowerCase()||"transport closed"===o.toLowerCase()||"unable to connect"===o.toLowerCase());return n&&o&&!s?o:t||(o||"Unable to connect")}function f(){return o.isWeb&&"undefined"!=typeof window?{isWeb:!0,protocol:window.location.protocol}:{isWeb:!1,protocol:null}}function w(t,o=f()){if("directTcp"!==t.type||!o.isWeb||"https:"!==o.protocol||t.useTls)return;let n;try{n=(0,c.parseHostPort)(t.endpoint).host.toLowerCase()}catch{return}if("localhost"!==n&&!n.endsWith(".localhost")&&"127.0.0.1"!==n&&"::1"!==n)throw new Error("Insecure direct connections are unavailable from hosted HTTPS pages. Enable SSL or the relay.")}function b(t){if(!t.config.password)return!1;const o=[t.reason,t.lastError].filter(Boolean).join("\n").toLowerCase();return o.includes("401")||o.includes("4001")||o.includes("unauthorized")||o.includes("code 1006")}class h extends Error{constructor(t,o){super(t),this.name="DaemonConnectionTestError",this.reason=o.reason,this.lastError=o.lastError}}async function y(t,o,n,s=l){w(t,n?.browserContext);const u=await s.getClientId(),p=Object.assign({clientId:u,clientType:"mobile",appVersion:s.resolveAppVersion()??void 0,suppressSendErrors:!0,reconnect:{enabled:!1}},n?.capabilities?{capabilities:n.capabilities}:{},n?.trace?{trace:n.trace}:{});if("directSocket"===t.type||"directPipe"===t.type)throw new Error("Socket/pipe daemon transports were desktop-only and are retired (issue 025 A3).");if("remoteSsh"===t.type)throw new Error("Remote SSH access is retired (issue 025 A5).");if("directTcp"===t.type)return Object.assign({},p,{url:(0,c.buildDaemonWebSocketUrl)(t.endpoint,{useTls:t.useTls??!1})},t.password?{password:t.password}:{});if(!o)throw new Error("serverId is required to probe a relay connection");return Object.assign({},p,{url:(0,c.buildRelayWebSocketUrl)({endpoint:t.relayEndpoint,useTls:t.useTls??(0,c.shouldUseTlsForDefaultHostedRelay)(t.relayEndpoint),serverId:o}),e2ee:{enabled:!0,daemonPublicKeyB64:t.daemonPublicKeyB64}})}function C(t,o,n=l){const s=n.createClient(t);return new Promise((n,c)=>{const l=setTimeout(()=>{s.close().catch(()=>{}),c(new h("Connection timed out",{reason:"Connection timed out",lastError:s.lastError??null}))},o);s.connect().then(()=>{clearTimeout(l);const t=s.getLastServerInfoMessage();if(!t)return s.close().catch(()=>{}),void c(new h("Missing server info message",{reason:"Missing server info message",lastError:s.lastError??null}));n({client:s,serverId:t.serverId,hostname:t.hostname})}).catch(o=>{clearTimeout(l);const n=u(o instanceof Error?o.message:String(o)),f=u(s.lastError),w=b({config:t,reason:n,lastError:f})?"Incorrect password":p(n,f);s.close().catch(()=>{}),c(new h(w,{reason:n,lastError:f}))})})}function E(t,o){return o?.timeoutMs?o.timeoutMs:"relay"===t.type?1e4:"remoteSsh"===t.type?18e4:6e3}},3544,[3492,1599,3545,3542,3540]);
|
|
15190
15190
|
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.createClientIdResolver=s,_e.getOrCreateClientId=async function(){return f.getOrCreate()};var t,e=r(d[0]),n=(t=e)&&t.__esModule?t:{default:t},o=r(d[1]),u=r(d[2]);const c="@byspace:client-id-v1",l=o.z.string().trim().min(1);function s(t){const e=t.storageKey??c;let n=null,o=null;return{async getOrCreate(){if(n)return n;if(o)return o;o=(async()=>{const o=await(0,u.readValidatedString)(t.storage,e,l);if(o)return n=o,o;const c=`cid_${t.generateUuid()}`;return await t.storage.setItem(e,c),n=c,c})();try{return await o}finally{o=null}}}}const f=s({storage:n.default,generateUuid:function(){const t=globalThis.crypto;return t&&"function"==typeof t.randomUUID?t.randomUUID().replace(/-/g,""):`${Date.now().toString(36)}${Math.random().toString(36).slice(2)}`}})},3545,[1587,1600,1681]);
|
|
15191
15191
|
__d(function(g,r,i,a,m,e,d){"use strict";function n(n){const t=n.probeByConnectionId.get(n.connectionId);return"available"===t?.status?t.latencyMs:null}Object.defineProperty(e,'__esModule',{value:!0}),e.selectBestConnection=function(t){const{candidates:o,probeByConnectionId:c}=t;if(0===o.length)return null;let l=null,u=null;for(const t of o){const o=n({connectionId:t.connectionId,probeByConnectionId:c});null!==o&&((null===u||o<u)&&(l=t.connectionId,u=o))}return l}},3546,[]);
|
|
@@ -15317,7 +15317,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
|
|
|
15317
15317
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.parseActiveWorkspaceSelection=function(t){const s=(0,n.parseHostWorkspaceRouteFromPathname)(t.pathname);if(s)return s;if("/"!==t.pathname&&""!==t.pathname)return null;return p(t.params)},e.navigateToWorkspace=u,e.navigateToLastWorkspace=function(t){const n=t.getLastWorkspaceSelection();if(!n)return!1;return u(n,t),!0};var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]);function c(t){if("string"==typeof t)return t.trim();if(Array.isArray(t)){const n=t[0];return"string"==typeof n?n.trim():""}return""}function p(t){const s=c(t.serverId),o=c(t.workspaceId),p=o?(0,n.decodeWorkspaceIdFromPathSegment)(o):null;return s&&p?{serverId:s,workspaceId:p}:null}function u(c,p){const u=p.getSessionWorkspaces(c.serverId),k=(0,s.resolveWorkspaceMapKeyByIdentity)({workspaces:u,workspaceId:c.workspaceId}),I=Boolean(!("agent"!==c.target?.kind||k&&p.isWorkspaceLayoutHydrated()));if(c.target)I||(0,o.prepareWorkspaceTab)(Object.assign({},c,{target:c.target}),p);else{const n=k?Array.from(p.getSessionAgents(c.serverId)).filter(t=>(0,s.normalizeWorkspaceOpaqueId)(t.workspaceId)===k):[],o=(0,t.pickAttentionAgent)(n);o&&k&&p.openTab({workspaceKey:`${c.serverId}:${k}`,target:{kind:"agent",agentId:o},intent:"reveal"})}const l="agent"===c.target?.kind&&I?(0,n.buildHostWorkspaceOpenRoute)(c.serverId,c.workspaceId,`agent:${c.target.agentId}`):(0,n.buildHostWorkspaceRoute)(c.serverId,c.workspaceId);return p.rememberLastWorkspace({serverId:c.serverId,workspaceId:c.workspaceId}),p.navigateToRoute(l),l}},3662,[3663,3664,3481,3666]);
|
|
15318
15318
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pickAttentionAgent=function(n){let o=null,u=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const c of n){if(!0!==c.requiresAttention)continue;if(c.parentAgentId)continue;const n=t(c.attentionReason);if(null===n)continue;const f=c.attentionTimestamp?.getTime()??Number.POSITIVE_INFINITY;(n<u||n===u&&f<s)&&(o=c.id,u=n,s=f)}return o},e.shouldClearAgentAttention=function(n){const t=n.agentId?.trim();if(!t)return!1;if(!n.isConnected)return!1;if(!n.requiresAttention)return!1;if("permission"===n.attentionReason)return!1;if("focus-entry"===n.trigger&&!0===n.hasDeferredFocusEntryClear)return!1;return!0};const n={permission:0,error:1,finished:2};function t(t){return t?n[t]:null}},3663,[]);
|
|
15319
15319
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.parseWorkspaceOpenIntent=P,e.parseHostWorkspaceOpenIntentFromPathname=function(t){return P(w(t))},e.getHostWorkspaceOpenParamFromPathname=w,e.encodeWorkspaceIdForPathSegment=H,e.decodeWorkspaceIdFromPathSegment=j,e.encodeFilePathForPathSegment=function(t){const n=l(t);if(!n)return"";return h(n)},e.decodeFilePathFromPathSegment=v,e.parseServerIdFromPathname=function(t){const n=u(t).match(/^\/h\/([^/]+)(?:\/|$)/);if(!n)return null;const o=n[1];if(!o)return null;return l(p(o))},e.parseHostAgentRouteFromPathname=function(t){const n=u(t).match(/^\/h\/([^/]+)\/agent\/([^/]+)(?:\/|$)/);if(!n)return null;const[,o,s]=n;if(!o||!s)return null;const c=l(p(o)),f=l(p(s));if(!c||!f)return null;return{serverId:c,agentId:f}},e.parseHostWorkspaceRouteFromPathname=O,e.stripHostWorkspaceRouteEchoSearch=function(t){const n=u(t),o=O(n),f=s(t);if(!o||!f)return t;const h=new URLSearchParams(f);let S=!1;const I=h.get("serverId");I&&l(p(I))===o.serverId&&(h.delete("serverId"),S=!0);const R=h.get("workspaceId");R&&j(R)===o.workspaceId&&(h.delete("workspaceId"),S=!0);"true"===h.get("pop")&&(h.delete("pop"),S=!0);if(!S)return t;const b=h.toString();return`${n}${b?`?${b}`:""}${c(t)}`},e.buildHostWorkspaceRoute=y,e.buildHostWorkspaceOpenRoute=_,e.buildHostAgentDetailRoute=function(t,o,u){const s=l(u);if(s){const n=l(o);return n?_(t,s,`agent:${n}`):"/"}const c=l(t),f=l(o);if(!c||!f)return"/";return(0,n.buildAgentDeepLinkRoute)({serverId:c,agentId:f})},e.buildHostRootRoute=F,e.buildHostOpenProjectRoute=function(t){const n=F(t);if("/"===n)return"/";return`${n}/open-project`},e.buildHostSessionsRoute=function(t){const n=F(t);if("/"===n)return"/";return`${n}/sessions`},e.buildSessionsRoute=function(){return"/sessions"},e.buildSchedulesRoute=function(){return"/schedules"},e.buildOpenProjectRoute=W,e.buildNewWorkspaceRoute=function(t={}){const n=A(t);if(!n)return"/new";return`/new?${n}`},e.resolveKnownHostRoute=function(t){const n=l(t.routeServerId);if(n&&t.hosts.some(t=>t.serverId===n))return{kind:"render"};if(t.hosts.length>0)return{kind:"redirect",href:"/open-project"};return{kind:"redirect",href:"/welcome"}},Object.defineProperty(e,"SETTINGS_SECTION_SLUGS",{enumerable:!0,get:function(){return E}}),e.isSettingsSectionSlug=function(t){return E.includes(t)},Object.defineProperty(e,"HOST_SECTION_SLUGS",{enumerable:!0,get:function(){return U}}),e.isHostSectionSlug=C,e.normalizeHostSectionSlug=function(t){if(C(t))return t;return x[t]??null},e.buildSettingsRoute=function(){return"/settings"},e.buildSettingsSectionRoute=function(t){return`/settings/${t}`},e.buildSettingsAddHostRoute=function(t="1"){return`/settings/general?addHost=${encodeURIComponent(String(t))}`},e.buildSettingsHostRoute=function(t){const n=l(t);if(!n)throw new Error("buildSettingsHostRoute requires a non-empty serverId");return`/settings/hosts/${f(n)}`},e.buildSettingsHostSectionRoute=function(t,n){const o=l(t);if(!o)throw new Error("buildSettingsHostSectionRoute requires a non-empty serverId");return`/settings/hosts/${f(o)}/${n}`},e.buildProjectsSettingsRoute=function(t){const n=l(t);if(!n)throw new Error("buildProjectsSettingsRoute requires a non-empty serverId");return`/settings/hosts/${f(n)}/projects`},e.buildProjectSettingsRoute=function(t,n){if(!t.trim()||!n.trim())throw new Error("buildProjectSettingsRoute requires a serverId and projectId");return`/settings/hosts/${f(t)}/projects/${f(n)}`},e.normalizeProjectSettingsRouteId=function(t){const n=Array.isArray(t)?t[0]:t;return"string"==typeof n?n:""};var t=r(d[0]),n=r(d[1]);const o="b64_";function u(t){const n=[t.indexOf("#"),t.indexOf("?")].filter(t=>t>=0).reduce((t,n)=>Math.min(t,n),t.length);return t.slice(0,n)}function s(t){const n=t.indexOf("?");if(n<0)return"";const o=t.indexOf("#",n);return o>=0?t.slice(n+1,o):t.slice(n+1)}function c(t){const n=t.indexOf("#");return n>=0?t.slice(n):""}function l(t){if("string"!=typeof t)return null;const n=t.trim();return n.length>0?n:null}function f(t){return encodeURIComponent(t)}function p(t){try{return decodeURIComponent(t)}catch{return t}}function h(n){return t.Buffer.from(n,"utf8").toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}function S(n){const o=n.trim();if(0===o.length)return null;if(!/^[A-Za-z0-9_-]+$/.test(o))return null;const u=o.replace(/-/g,"+").replace(/_/g,"/"),s=u.padEnd(u.length+(4-u.length%4)%4,"=");let c;try{c=t.Buffer.from(s,"base64").toString("utf8")}catch{return null}return c}function I(t){const n=t.trim(),o=S(n);return o?h(o)!==n?null:o:null}function R(t){return t.trim()}function b(t){return t.includes("/")||t.includes("\\")||/^[A-Za-z]:[\\/]/.test(t)}function $(t){for(const n of t){const t=n.codePointAt(0);if(null!=t&&(t<32||127===t||65533===t))return!0}return!1}function k(t){return b(t)&&!$(t)}function P(t){const n=l(t);if(!n)return null;const o=n.indexOf(":");if(o<=0||o>=n.length-1)return null;const u=n.slice(0,o),s=l(n.slice(o+1));if(!s)return null;if("agent"===u)return{kind:"agent",agentId:s};if("terminal"===u)return{kind:"terminal",terminalId:s};if("draft"===u)return{kind:"draft",draftId:s};if("file"===u){const t=v(s);return t?{kind:"file",path:t}:null}if("setup"===u){const t=j(s);return t?{kind:"setup",workspaceId:t}:null}return null}function w(t){const n=s(t);if(!n)return null;const o=new URLSearchParams(n).get("open");return P(o)?o:null}function H(t){const n=l(t);if(!n)return"";const u=R(n);return/^[A-Za-z0-9._~-]+$/.test(u)?u:`${o}${h(u)}`}function j(t){const n=l(t);if(!n)return null;const u=l(p(n));if(!u)return null;if(u.startsWith(o)){const t=u.slice(o.length),n=I(t)??S(t);return n?R(n):null}const s=I(u);if(s&&k(s))return R(s);const c=S(u);return c&&k(c)?R(c):R(u)}function v(t){const n=l(t);if(!n)return null;const o=l(p(n));return o?I(o):null}function O(t){const n=u(t).match(/^\/h\/([^/]+)\/workspace\/([^/]+)\/?$/);if(!n)return null;const o=l(p(n[1]));if(!o)return null;const s=j(n[2]);return s?{serverId:o,workspaceId:s}:null}function y(t,n){const o=l(t),u=l(n);if(!o||!u)return"/";const s=H(u);return s?`/h/${f(o)}/workspace/${f(s)}`:"/"}function _(t,n,o){const u=y(t,n),s=l(o);return"/"!==u&&s?`${u}?open=${encodeURIComponent(s)}`:u}function F(t){const n=l(t);return n?`/h/${f(n)}`:"/"}function W(){return"/open-project"}function A(t){const n=new URLSearchParams,o=l(t.serverId);return o&&n.set("serverId",o),t.sourceDirectory&&n.set("dir",t.sourceDirectory),t.displayName&&n.set("name",t.displayName),t.projectId&&n.set("projectId",t.projectId),t.draftId&&n.set("draftId",t.draftId),n.toString()}const E=["general","appearance","layout","editor","shortcuts","integrations","notifications","permissions","diagnostics","about"];const U=["projects","connections","pair-device","agents","metadata","workspaces","providers","usage","terminals","host"],x={orchestration:"agents",daemon:"host",plugins:"host"};function C(t){return U.includes(t)}},3664,[52,3665]);
|
|
15320
|
-
__d(function(g,r,i,a,m,e,d){"use strict";function n(n){return n.trim()}function t(t){const o=n(t.serverId),u=n(t.agentId);if(!o||!u)throw new Error("Agent deep links require a server ID and agent ID.");return{serverId:o,agentId:u}}
|
|
15320
|
+
__d(function(g,r,i,a,m,e,d){"use strict";function n(n){return n.trim()}function t(t){const o=n(t.serverId),u=n(t.agentId);if(!o||!u)throw new Error("Agent deep links require a server ID and agent ID.");return{serverId:o,agentId:u}}Object.defineProperty(e,'__esModule',{value:!0}),e.buildAgentDeepLinkRoute=function(n){const{serverId:o,agentId:u}=t(n);return`/h/${encodeURIComponent(o)}/agent/${encodeURIComponent(u)}`}},3665,[]);
|
|
15321
15321
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.prepareWorkspaceTab=function(t,p){const s=c(t.target),o=(0,n.buildWorkspaceTabPersistenceKey)({serverId:t.serverId,workspaceId:t.workspaceId})??"";p.openTab({workspaceKey:o,target:s,intent:"reveal",pin:!0===t.pin&&"agent"===s.kind,placement:t.placement})};var t=r(d[0]),n=r(d[1]);function c(n){return"draft"!==n.kind||"new"!==n.draftId.trim()?n:{kind:"draft",draftId:(0,t.generateDraftId)()}}},3666,[3601,3548]);
|
|
15322
15322
|
__d(function(g,_r,_i,a,m,_e,d){"use strict";const e=["hidden"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"AMBIENT_PLACEMENT",{enumerable:!0,get:function(){return p.AMBIENT_PLACEMENT}}),Object.defineProperty(_e,"canDismissPaneInLayout",{enumerable:!0,get:function(){return p.canDismissPaneInLayout}}),Object.defineProperty(_e,"collectAllPanes",{enumerable:!0,get:function(){return p.collectAllPanes}}),Object.defineProperty(_e,"collectAllTabs",{enumerable:!0,get:function(){return p.collectAllTabs}}),Object.defineProperty(_e,"createDefaultLayout",{enumerable:!0,get:function(){return p.createDefaultLayout}}),Object.defineProperty(_e,"DEFAULT_PANE_ID",{enumerable:!0,get:function(){return p.DEFAULT_PANE_ID}}),Object.defineProperty(_e,"createWorkspaceLayoutWithExplorerSidebar",{enumerable:!0,get:function(){return p.createWorkspaceLayoutWithExplorerSidebar}}),Object.defineProperty(_e,"FOCUSED_PANE_PLACEMENT",{enumerable:!0,get:function(){return p.FOCUSED_PANE_PLACEMENT}}),Object.defineProperty(_e,"findPaneById",{enumerable:!0,get:function(){return p.findPaneById}}),Object.defineProperty(_e,"findPaneContainingTab",{enumerable:!0,get:function(){return p.findPaneContainingTab}}),Object.defineProperty(_e,"getFocusedBrowserId",{enumerable:!0,get:function(){return p.getFocusedBrowserId}}),Object.defineProperty(_e,"getTreeDepth",{enumerable:!0,get:function(){return p.getTreeDepth}}),Object.defineProperty(_e,"insertSplit",{enumerable:!0,get:function(){return p.insertSplit}}),Object.defineProperty(_e,"normalizeLayout",{enumerable:!0,get:function(){return p.normalizeLayout}}),Object.defineProperty(_e,"removePaneFromTree",{enumerable:!0,get:function(){return p.removePaneFromTree}}),Object.defineProperty(_e,"removeTabFromTree",{enumerable:!0,get:function(){return p.removeTabFromTree}}),Object.defineProperty(_e,"stripEphemeralTabsFromLayout",{enumerable:!0,get:function(){return p.stripEphemeralTabsFromLayout}}),_e.selectExplorerSidebarPaneId=U,_e.selectIsExplorerSidebarVisible=function(e,t){const n=e.layoutByWorkspace[t],r=n?U(e,t):null,o=r&&n?(0,p.findPaneById)(n.root,r):null;return Boolean(o&&!0!==o.hidden)},_e.resolveExplorerSidebarPaneId=C,_e.createWorkspaceLayoutStore=G,Object.defineProperty(_e,"useWorkspaceLayoutStore",{enumerable:!0,get:function(){return J}}),_e.useWorkspaceLayoutStoreHydrated=function(){const e=(0,r.c)(2),[t,n]=(0,s.useState)(Q);let o,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{if(!J.persist.hasHydrated())return J.persist.onFinishHydration(()=>{n(!0)});n(!0)},i=[],e[0]=o,e[1]=i):(o=e[0],i=e[1]);return(0,s.useEffect)(o,i),t};var n=t(_r(d[0])),r=_r(d[1]),o=t(_r(d[2])),s=_r(d[3]),i=_r(d[4]),c=_r(d[5]),l=_r(d[6]),u=_r(d[7]),p=_r(d[8]),y=_r(d[9]),I=_r(d[10]),b=_r(d[11]);function k(e){var t=W(e,"string");return"symbol"==typeof t?t:t+""}function W(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const B=5,P=l.z.strictObject({provider:l.z.string(),cwd:l.z.string(),modeId:l.z.string().nullable(),model:l.z.string().nullable(),thinkingOptionId:l.z.string().nullable(),featureValues:l.z.record(l.z.string(),l.z.union([l.z.boolean(),l.z.string(),l.z.null()]))}),f=l.z.discriminatedUnion("kind",[l.z.strictObject({kind:l.z.literal("new_tab")}),l.z.strictObject({kind:l.z.literal("draft"),draftId:l.z.string(),setup:P.optional()}),l.z.strictObject({kind:l.z.literal("agent"),agentId:l.z.string()}),l.z.strictObject({kind:l.z.literal("provider_subagent"),parentAgentId:l.z.string(),subagentId:l.z.string()}),l.z.strictObject({kind:l.z.literal("terminal"),terminalId:l.z.string()}),l.z.strictObject({kind:l.z.literal("browser"),browserId:l.z.string()}),l.z.strictObject({kind:l.z.literal("changes_tree")}),l.z.strictObject({kind:l.z.literal("files")}),l.z.strictObject({kind:l.z.literal("pull_request")}),l.z.strictObject({kind:l.z.literal("file"),path:l.z.string(),lineStart:l.z.number().int().positive().optional(),lineEnd:l.z.number().int().positive().optional()}),l.z.strictObject({kind:l.z.literal("working_diff"),focusPath:l.z.string().optional(),focusRequestId:l.z.number().optional(),mode:l.z.enum(["uncommitted","base"]).optional(),baseRef:l.z.string().nullable().optional(),ignoreWhitespace:l.z.boolean().optional()}),l.z.strictObject({kind:l.z.literal("setup"),workspaceId:l.z.string()}),l.z.strictObject({kind:l.z.literal("commit_diff"),sha:l.z.string()}),l.z.discriminatedUnion("context",[l.z.strictObject({kind:l.z.literal("plugin"),pluginId:l.z.string(),panelId:l.z.string(),context:l.z.literal("workspace")}),l.z.strictObject({kind:l.z.literal("plugin"),pluginId:l.z.string(),panelId:l.z.string(),context:l.z.literal("agent"),agentId:l.z.string()})])]),z=l.z.strictObject({tabId:l.z.string(),target:f,createdAt:l.z.number(),state:l.z.json().optional()}),O=l.z.lazy(()=>l.z.discriminatedUnion("kind",[l.z.strictObject({kind:l.z.literal("pane"),pane:l.z.strictObject({id:l.z.string(),tabIds:l.z.array(l.z.string()),focusedTabId:l.z.string().nullable(),tabs:l.z.array(z).optional(),hidden:l.z.boolean().optional()})}),l.z.strictObject({kind:l.z.literal("group"),group:l.z.strictObject({id:l.z.string(),direction:l.z.enum(["horizontal","vertical"]),children:l.z.array(O),sizes:l.z.array(l.z.number())})})])),j=l.z.strictObject({root:O,focusedPaneId:l.z.string().nullable(),parentTabIdByTabId:l.z.record(l.z.string(),l.z.string()).optional()}),T=l.z.strictObject({layoutByWorkspace:l.z.record(l.z.string(),j),splitSizesByWorkspace:l.z.record(l.z.string(),l.z.record(l.z.string(),l.z.array(l.z.number()))).optional(),explorerSidebarWidthByWorkspace:l.z.record(l.z.string(),l.z.number()).optional(),explorerSidebarRatioByWorkspace:l.z.record(l.z.string(),l.z.number()).optional(),sidePanelRatioByWorkspace:l.z.record(l.z.string(),l.z.number()).optional(),explorerPaneIdByWorkspace:l.z.record(l.z.string(),l.z.string().nullable()).optional(),explorerSidebarPaneIdByWorkspace:l.z.record(l.z.string(),l.z.string().nullable()).optional(),sidePaneIdByWorkspace:l.z.record(l.z.string(),l.z.string().nullable()).optional(),acknowledgedPullRequestByWorkspace:l.z.record(l.z.string(),l.z.string()).optional()}),S=1440,h=2;function A(e,t,n){return"pane"===e.kind?e.pane.id===t?{kind:"pane",pane:n}:e:{kind:"group",group:Object.assign({},e.group,{children:e.group.children.map(e=>A(e,t,n))})}}function E(t){return(0,n.default)(t,e)}function x(){const e=(0,p.createWorkspaceLayoutWithExplorerSidebar)(),t=(0,p.findPaneById)(e.root,p.EXPLORER_SIDEBAR_PANE_ID);if(!t)throw new Error("Default Explorer pane is missing");return{kind:"pane",pane:t}}function L(e){const t=(0,p.removePaneFromTree)(e.layout.root,e.legacyExplorerPane.id);if(0===e.tabs.length)return{root:(0,p.findPaneById)(t,e.legacyExplorerPane.id)?(0,p.createDefaultLayout)().root:t,sidePaneId:e.rememberedSidePane?.id??null};if(e.rememberedSidePane){const n=(0,p.collectAllTabs)(e.layout.root).filter(t=>e.rememberedSidePane?.tabIds.includes(t.tabId)),r=E(Object.assign({},e.rememberedSidePane,{tabIds:[...e.rememberedSidePane.tabIds,...e.tabs.map(e=>e.tabId)],tabs:[...n,...e.tabs],focusedTabId:e.rememberedSidePane.focusedTabId??e.tabs[0]?.tabId??null}));return{root:A(t,e.rememberedSidePane.id,r),sidePaneId:e.rememberedSidePane.id}}const n=e.ids.createNodeId("pane"),r=E(Object.assign({},e.legacyExplorerPane,{id:n,tabIds:e.tabs.map(e=>e.tabId),tabs:e.tabs,focusedTabId:e.tabs.find(t=>t.tabId===e.legacyExplorerPane.focusedTabId)?.tabId??e.tabs[0]?.tabId??null}));return{root:A(e.layout.root,e.legacyExplorerPane.id,r),sidePaneId:n}}function _(e){const t=(0,p.stripEphemeralTabsFromLayout)(e.layout),n=C(t,e.legacyExplorerPaneId),r=(0,p.findPaneById)(t.root,n);if(!r){const n=M({layout:t,registeredPaneId:null,ids:e.ids});return{layout:n?.layout??t,explorerPaneId:n?.paneId??p.EXPLORER_SIDEBAR_PANE_ID,sidePaneId:e.rememberedSidePaneId??null}}const o=(0,p.collectAllTabs)(t.root).filter(e=>r.tabIds.includes(e.tabId)&&"files"!==e.target.kind&&"changes_tree"!==e.target.kind),s=L({layout:t,legacyExplorerPane:r,rememberedSidePane:(0,p.findPaneById)(t.root,e.rememberedSidePaneId??null),tabs:o,ids:e.ids}),i=x(),c=t.focusedPaneId===r.id?s.sidePaneId??(0,p.collectAllPanes)(s.root)[0]?.id??p.DEFAULT_PANE_ID:t.focusedPaneId;return{layout:(0,p.normalizeLayout)({root:{kind:"group",group:{id:e.ids.createNodeId("group"),direction:"horizontal",children:[s.root,i],sizes:[.78,.22]}},focusedPaneId:c,parentTabIdByTabId:t.parentTabIdByTabId}),explorerPaneId:p.EXPLORER_SIDEBAR_PANE_ID,sidePaneId:s.sidePaneId}}function D(e,t,n){const r=T.safeParse(e);if(!r.success||t>=h)return r.success?r.data:{layoutByWorkspace:{}};const o={},s={},i=Object.assign({},r.data.sidePaneIdByWorkspace);for(const[e,t]of Object.entries(r.data.layoutByWorkspace)){const c=_({layout:t,legacyExplorerPaneId:r.data.explorerPaneIdByWorkspace?.[e],rememberedSidePaneId:r.data.sidePaneIdByWorkspace?.[e],ids:n});o[e]=c.layout,s[e]=c.explorerPaneId,i[e]=c.sidePaneId}return Object.assign({},r.data,{layoutByWorkspace:o,explorerPaneIdByWorkspace:s,sidePaneIdByWorkspace:i})}function R(e){if("string"!=typeof e)return null;const t=e.trim();return t.length>0?t:null}function N(){return`tab_${"function"==typeof globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}`}function v(e,t,n){const r=e[t]??null;if(r?.has(n))return e;const o=new Set(r??[]);return o.add(n),Object.assign({},e,{[t]:o})}function w(e,t,n){const r=e[t]??null;if(!r?.has(n))return e;if(1===r.size){const n=Object.assign({},e);return delete n[t],n}const o=new Set(r);return o.delete(n),Object.assign({},e,{[t]:o})}function F(e,t){return(0,p.normalizeLayout)(e[t]??(0,p.createWorkspaceLayoutWithExplorerSidebar)())}function H(e,t,n){if(!t||e.focusedPaneId!==t)return e;const r=(0,p.collectAllPanes)(e.root),o=r.find(e=>e.id===n&&e.id!==t)??r.find(e=>e.id===p.DEFAULT_PANE_ID&&e.id!==t)??r.find(e=>e.id!==t);return Object.assign({},e,{focusedPaneId:o?.id??null})}function U(e,t){return C(F(e.layoutByWorkspace,t),e.explorerSidebarPaneIdByWorkspace[t])}function C(e,t){const n=(0,p.findPaneById)(e.root,t??null);if(n)return n.id;const r=(0,p.findPaneById)(e.root,p.EXPLORER_SIDEBAR_PANE_ID);return r?.id??null}function M(e){const t=C(e.layout,e.registeredPaneId);if(t)return{layout:H(e.layout,t,e.layout.focusedPaneId),paneId:t};const n=(0,p.findPaneById)(e.layout.root,e.layout.focusedPaneId)?.id??(0,p.collectAllPanes)(e.layout.root)[0]?.id;if(!n)return null;const r=(0,p.splitPaneEmptyInLayout)({layout:e.layout,targetPaneId:n,position:"right",createNodeId:e.ids.createNodeId,maxTreeDepth:B});if(!r)return null;const o=(0,p.setPaneHiddenInLayout)({layout:r.layout,paneId:r.paneId,hidden:!0});return{layout:(0,p.restoreEmptyPanesInLayout)((0,p.stripEphemeralTabsFromLayout)(o??r.layout),r.paneId),paneId:r.paneId}}function K(e,t,n,r){const o=F(e.layoutByWorkspace,t),s=C(o,e.explorerSidebarPaneIdByWorkspace[t]),i=r??p.AMBIENT_PLACEMENT,c=e=>(0,b.panelTargetSupportsHostForWorkspaceKey)(t,n,e.id===s?"explorer":"main"),l="pane"===i.mode||"prefer"===i.mode?i.paneId:o.focusedPaneId,u=(0,p.findPaneById)(o.root,l),y=(0,p.collectAllPanes)(o.root).find(e=>!0!==e.hidden&&c(e));let I=i;return u&&c(u)||!y||(I={mode:"pane"===i.mode?"pane":"prefer",paneId:y.id}),{layout:o,placement:I,explorerSidebarPaneId:s}}function X(e,t){if(!(t in e.focusRestorationByWorkspace))return null;const r=e.focusRestorationByWorkspace;return{focusRestorationByWorkspace:(0,n.default)(r,[t].map(k))}}function q(e,t,n){const r=e.sidePaneIdByWorkspace[t];return{sidePaneIdByWorkspace:r&&!(0,p.findPaneById)(n.root,r)?Object.assign({},e.sidePaneIdByWorkspace,{[t]:null}):e.sidePaneIdByWorkspace}}function V(e){const t=R(e.childTabId),n=R(e.parentTabId);if(!t||!n||t===n)return(0,p.normalizeLayout)(e.layout);const r=new Set((0,p.collectAllTabs)(e.layout.root).map(e=>e.tabId));return r.has(t)&&r.has(n)?(0,p.normalizeLayout)(Object.assign({},e.layout,{parentTabIdByTabId:Object.assign({},e.layout.parentTabIdByTabId,{[t]:n})})):(0,p.normalizeLayout)(e.layout)}function $(e,t,n){const r=(0,p.findPaneById)(t.root,t.focusedPaneId)?.id??(0,p.collectAllPanes)(t.root)[0]?.id;return r?n(e,{targetPaneId:r,position:"right"}):null}function G(e=u.defaultWorkspaceLayoutIds){return(0,i.create)()((0,c.persist)((t,r)=>({layoutByWorkspace:{},splitSizesByWorkspace:{},explorerSidebarWidthByWorkspace:{},pinnedAgentIdsByWorkspace:{},pendingAgentIdsByWorkspace:{},hiddenAgentIdsByWorkspace:{},focusRestorationByWorkspace:{},explorerSidebarPaneIdByWorkspace:{},sidePaneIdByWorkspace:{},openTab:e=>{const n=R(e.workspaceKey),o=(0,y.normalizeWorkspaceTabTarget)(e.target);if(!n||!o)return null;const s=K(r(),n,o,e.placement);let i;if(i="new"===e.intent?(0,p.createTabInLayout)(Object.assign({},s,{target:o,now:Date.now(),createTabId:N,state:e.state})):"background"===e.intent?(0,p.openTabInLayoutBackground)(Object.assign({},s,{target:o,now:Date.now()})):(0,p.revealTargetInLayout)(Object.assign({},s,{target:o,now:Date.now(),createTabId:N})),!i)return null;const c=H(i.layout,s.explorerSidebarPaneId,s.layout.focusedPaneId),l=!0===e.pin&&"agent"===o.kind;return t(t=>Object.assign({},X(t,n),{hiddenAgentIdsByWorkspace:"agent"!==o.kind?t.hiddenAgentIdsByWorkspace:w(t.hiddenAgentIdsByWorkspace,n,o.agentId),pinnedAgentIdsByWorkspace:l?v(t.pinnedAgentIdsByWorkspace,n,o.agentId):t.pinnedAgentIdsByWorkspace,pendingAgentIdsByWorkspace:l?v(t.pendingAgentIdsByWorkspace,n,o.agentId):t.pendingAgentIdsByWorkspace,layoutByWorkspace:Object.assign({},t.layoutByWorkspace,{[n]:e.parentTabId?V({layout:c,childTabId:i.tabId,parentTabId:e.parentTabId}):c})})),i.tabId},showExplorerSidebar:e=>{const n=R(e);if(!n)return null;const o=F(r().layoutByWorkspace,n),s=C(o,r().explorerSidebarPaneIdByWorkspace[n])??$(n,o,r().splitPaneEmpty);return s?(t(e=>{const t=F(e.layoutByWorkspace,n),r=(0,p.setPaneHiddenInLayout)({layout:t,paneId:s,hidden:!1})??t;return{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[n]:H(r,s,t.focusedPaneId)}),explorerSidebarPaneIdByWorkspace:Object.assign({},e.explorerSidebarPaneIdByWorkspace,{[n]:s})}}),s):null},hideExplorerSidebar:e=>{const n=R(e);n&&t(e=>{const t=F(e.layoutByWorkspace,n),r=C(t,e.explorerSidebarPaneIdByWorkspace[n]),o=r?(0,p.setPaneHiddenInLayout)({layout:t,paneId:r,hidden:!0}):null;return o?{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[n]:o})}:e})},ensureSidePane:n=>{const o=R(n);if(!o)return null;const s=r(),i=F(s.layoutByWorkspace,o),c=C(i,s.explorerSidebarPaneIdByWorkspace[o]),l=R(s.sidePaneIdByWorkspace[o]),u=(0,p.findPaneById)(i.root,l);if(u&&u.id!==c)return u.id;const y=(0,p.splitWorkspaceRootRightInLayout)({layout:i,maxTreeDepth:B,createNodeId:e.createNodeId});return y?(t(e=>Object.assign({},X(e,o),{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[o]:y.layout}),sidePaneIdByWorkspace:Object.assign({},e.sidePaneIdByWorkspace,{[o]:y.paneId})})),y.paneId):null},closeTab:(e,n)=>{const r=R(e),o=R(n);r&&o&&t(e=>{const t=F(e.layoutByWorkspace,r),n=C(t,e.explorerSidebarPaneIdByWorkspace[r]),s=(0,p.findPaneContainingTab)(t.root,o),i=(0,p.collectAllTabs)(t.root).find(e=>e.tabId===o);if(1===s?.tabIds.length&&"new_tab"===i?.target.kind){const o=s.id===n?(0,p.setPaneHiddenInLayout)({layout:t,paneId:s.id,hidden:!0}):(0,p.closePaneInLayout)({layout:t,paneId:s.id,explorerSidebarPaneId:n});return o?Object.assign({},X(e,r),q(e,r,o),{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[r]:o})}):e}const c="main"===s?.id||s?.id===n?s.id:null,l=(0,p.closeTabInLayout)({layout:t,tabId:o,preserveEmptyPaneId:c}),u=l&&s?.id===n&&1===s.tabIds.length?(0,p.setPaneHiddenInLayout)({layout:l,paneId:n,hidden:!0})??l:l,y=u?H(u,n,t.focusedPaneId):null;return y?Object.assign({},X(e,r),q(e,r,y),{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[r]:y})}):e})},focusTab:(e,n)=>{const r=R(e),o=R(n);r&&o&&t(e=>{const t=F(e.layoutByWorkspace,r),n=C(t,e.explorerSidebarPaneIdByWorkspace[r]),s=(0,p.findPaneContainingTab)(t.root,o);let i;if(s?.id===n){const e=(0,p.setPaneHiddenInLayout)({layout:t,paneId:n,hidden:!1})??t;i=(0,p.selectTabInPaneInLayout)({layout:e,paneId:n,tabId:o})??e}else i=(0,p.focusTabInLayout)({layout:t,tabId:o});return i?Object.assign({},X(e,r),{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[r]:i})}):e})},selectTabInPane:(e,n,r)=>{const o=R(e),s=R(n),i=R(r);o&&s&&i&&t(e=>{const t=F(e.layoutByWorkspace,o),n=(0,p.selectTabInPaneInLayout)({layout:t,paneId:s,tabId:i});return n?{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[o]:n})}:e})},replaceTab:(e,n,o,s)=>{const i=R(e),c=R(n),l=(0,y.normalizeWorkspaceTabTarget)(o);if(!i||!c||!l)return null;const u=(0,p.replaceTabTargetInLayout)({layout:F(r().layoutByWorkspace,i),tabId:c,target:l,createTabId:N,state:s});return u?(t(e=>Object.assign({},X(e,i),{hiddenAgentIdsByWorkspace:"agent"!==l.kind?e.hiddenAgentIdsByWorkspace:w(e.hiddenAgentIdsByWorkspace,i,l.agentId),layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[i]:u.layout})})),u.tabId):null},setTabState:(e,n,r)=>{const o=R(e),s=R(n);o&&s&&t(e=>{const t=(0,p.setTabStateInLayout)({layout:F(e.layoutByWorkspace,o),tabId:s,state:r});return t?{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[o]:t})}:e})},convertDraftToAgent:(e,n,o)=>{const s=R(e),i=R(n),c=R(o);if(!s||!i||!c)return null;const l=(0,p.convertDraftToAgentInLayout)({layout:F(r().layoutByWorkspace,s),tabId:i,agentId:c});return l?(t(e=>Object.assign({},null!==l.layout.focusedPaneId?X(e,s)??{}:{},{hiddenAgentIdsByWorkspace:w(e.hiddenAgentIdsByWorkspace,s,c),layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[s]:l.layout})})),l.tabId):null},reconcileTabs:(e,n)=>{const r=R(e);r&&t(e=>{const t=F(e.layoutByWorkspace,r),o=C(t,e.explorerSidebarPaneIdByWorkspace[r]),s=H(t,o,t.focusedPaneId),i=H((0,p.reconcileWorkspaceTabs)({layout:s,pinnedAgentIds:e.pinnedAgentIdsByWorkspace[r]??null,pendingAgentIds:e.pendingAgentIdsByWorkspace[r]??null,hiddenAgentIds:e.hiddenAgentIdsByWorkspace[r]??null,explorerSidebarPaneId:o},n).layout,o,s.focusedPaneId);return i===t?e:{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[r]:i})}})},resolvePendingAgent:(e,n)=>{const r=R(e),o=R(n);r&&o&&t(e=>{const t=w(e.pendingAgentIdsByWorkspace,r,o);return t===e.pendingAgentIdsByWorkspace?e:{pendingAgentIdsByWorkspace:t}})},reorderTabs:(e,n)=>{const r=R(e);r&&t(e=>{const t=(0,p.reorderFocusedPaneTabsInLayout)({layout:F(e.layoutByWorkspace,r),tabIds:n});return t?{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[r]:t})}:e})},getWorkspaceTabs:e=>{const t=R(e);return t?(0,p.collectAllTabs)(F(r().layoutByWorkspace,t).root):[]},splitPane:(n,o)=>{const s=R(n),i=R(o.tabId),c=R(o.targetPaneId);if(!s||!i||!c)return null;const l=F(r().layoutByWorkspace,s);if(c===C(l,r().explorerSidebarPaneIdByWorkspace[s]))return null;const u=(0,p.collectAllTabs)(l.root).find(e=>e.tabId===i);if(!u||!(0,b.panelTargetSupportsHostForWorkspaceKey)(s,u.target,"main"))return null;const y=(0,p.splitPaneInLayout)({layout:l,tabId:i,targetPaneId:c,position:o.position,maxTreeDepth:B,createNodeId:e.createNodeId});return y?(t(e=>Object.assign({},X(e,s),{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[s]:y.layout})})),y.paneId):null},splitPaneEmpty:(n,o)=>{const s=R(n),i=R(o.targetPaneId);if(!s||!i)return null;const c=F(r().layoutByWorkspace,s);if(i===C(c,r().explorerSidebarPaneIdByWorkspace[s]))return null;const l=(0,p.splitPaneEmptyInLayout)({layout:c,targetPaneId:i,position:o.position,maxTreeDepth:B,createNodeId:e.createNodeId});return l?(t(e=>Object.assign({},X(e,s),{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[s]:l.layout})})),l.paneId):null},moveTabToPane:(e,n,r)=>{const o=R(e),s=R(n),i=R(r);o&&s&&i&&t(e=>{const t=F(e.layoutByWorkspace,o),n=(0,p.collectAllTabs)(t.root).find(e=>e.tabId===s),r=C(t,e.explorerSidebarPaneIdByWorkspace[o]),c=i===r?"explorer":"main";if(!n||!(0,b.panelTargetSupportsHostForWorkspaceKey)(o,n.target,c))return e;const l=(0,p.moveTabToPaneInLayout)({layout:t,tabId:s,toPaneId:i,explorerSidebarPaneId:r});if(!l)return e;const u=H(i===r?(0,p.restoreEmptyPanesInLayout)(l,r):l,r,t.focusedPaneId),y=e.sidePaneIdByWorkspace[o];return Object.assign({},X(e,o),{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[o]:u}),sidePaneIdByWorkspace:y&&!(0,p.findPaneById)(u.root,y)?Object.assign({},e.sidePaneIdByWorkspace,{[o]:null}):e.sidePaneIdByWorkspace})})},closePane:(e,n)=>{const r=R(e),o=R(n);r&&o&&t(e=>{const t=F(e.layoutByWorkspace,r),n=C(t,e.explorerSidebarPaneIdByWorkspace[r]),s=n===o?(0,p.setPaneHiddenInLayout)({layout:t,paneId:o,hidden:!0}):(0,p.closePaneInLayout)({layout:t,paneId:o,explorerSidebarPaneId:n});return s?Object.assign({},X(e,r),{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[r]:s}),sidePaneIdByWorkspace:e.sidePaneIdByWorkspace[r]===o?Object.assign({},e.sidePaneIdByWorkspace,{[r]:null}):e.sidePaneIdByWorkspace}):e})},focusPane:(e,n)=>{const r=R(e),o=R(n);r&&o&&t(e=>{const t=F(e.layoutByWorkspace,r),n=C(t,e.explorerSidebarPaneIdByWorkspace[r]);if(o===n)return e;const s=(0,p.focusPaneInLayout)({layout:t,paneId:o});return s?Object.assign({},X(e,r),{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[r]:s})}):e})},unfocusPane:n=>{const r=R(n);if(!r)return null;const o=e.createFocusRestorationToken();return t(e=>{const t=F(e.layoutByWorkspace,r),n=e.focusRestorationByWorkspace[r],s=n?.restorePaneId??t.focusedPaneId;return{focusRestorationByWorkspace:Object.assign({},e.focusRestorationByWorkspace,{[r]:{restorePaneId:s,tokens:[...n?.tokens??[],o]}}),layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[r]:null===t.focusedPaneId?t:Object.assign({},t,{focusedPaneId:null})})}}),o},restorePaneFocus:(e,r)=>{const o=R(e),s=R(r);o&&s&&t(e=>{const t=e.focusRestorationByWorkspace[o];if(!t?.tokens.includes(s))return e;const r=t.tokens.filter(e=>e!==s),i=e.focusRestorationByWorkspace,c=(0,n.default)(i,[o].map(k)),l=F(e.layoutByWorkspace,o);if(null!==l.focusedPaneId)return{focusRestorationByWorkspace:c};if(r.length>0)return{focusRestorationByWorkspace:Object.assign({},c,{[o]:{restorePaneId:t.restorePaneId,tokens:r}})};const u=(0,p.findPaneById)(l.root,t.restorePaneId),y=!0===u?.hidden?null:u?.id??null;return y?{focusRestorationByWorkspace:c,layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[o]:Object.assign({},l,{focusedPaneId:y})})}:{focusRestorationByWorkspace:c}})},resizeSplit:(e,n,r)=>{const o=R(e),s=R(n);o&&s&&t(e=>({splitSizesByWorkspace:Object.assign({},e.splitSizesByWorkspace,{[o]:Object.assign({},e.splitSizesByWorkspace[o],{[s]:(0,p.clampNormalizedSizes)(r)})})}))},resizeExplorerSidebar:(e,n)=>{const r=R(e);!r||!Number.isFinite(n)||n<=0||t(e=>({explorerSidebarWidthByWorkspace:Object.assign({},e.explorerSidebarWidthByWorkspace,{[r]:n})}))},reorderTabsInPane:(e,n,r)=>{const o=R(e),s=R(n);o&&s&&t(e=>{const t=(0,p.reorderPaneTabsInLayout)({layout:F(e.layoutByWorkspace,o),paneId:s,tabIds:r});return t?Object.assign({},X(e,o),{layoutByWorkspace:Object.assign({},e.layoutByWorkspace,{[o]:t})}):e})},unpinAgent:(e,n)=>{const r=R(e),o=R(n);r&&o&&t(e=>{const t=e.pinnedAgentIdsByWorkspace[r]??null;if(!t?.has(o))return e;if(1===t.size){const t=Object.assign({},e.pinnedAgentIdsByWorkspace);return delete t[r],{pinnedAgentIdsByWorkspace:t,pendingAgentIdsByWorkspace:w(e.pendingAgentIdsByWorkspace,r,o)}}const n=new Set(t);return n.delete(o),{pinnedAgentIdsByWorkspace:Object.assign({},e.pinnedAgentIdsByWorkspace,{[r]:n}),pendingAgentIdsByWorkspace:w(e.pendingAgentIdsByWorkspace,r,o)}})},hideAgent:(e,n)=>{const r=R(e),o=R(n);r&&o&&t(e=>{const t=v(e.hiddenAgentIdsByWorkspace,r,o);return t===e.hiddenAgentIdsByWorkspace?e:{hiddenAgentIdsByWorkspace:t}})},unhideAgent:(e,n)=>{const r=R(e),o=R(n);r&&o&&t(e=>{const t=w(e.hiddenAgentIdsByWorkspace,r,o);return t===e.hiddenAgentIdsByWorkspace?e:{hiddenAgentIdsByWorkspace:t}})},purgeWorkspace:e=>{const r=R(e);r&&t(e=>{if(!(r in e.layoutByWorkspace||r in e.splitSizesByWorkspace||r in e.explorerSidebarWidthByWorkspace||r in e.pinnedAgentIdsByWorkspace||r in e.pendingAgentIdsByWorkspace||r in e.hiddenAgentIdsByWorkspace||r in e.focusRestorationByWorkspace||r in e.explorerSidebarPaneIdByWorkspace||r in e.sidePaneIdByWorkspace))return e;const t=e.layoutByWorkspace,o=(0,n.default)(t,[r].map(k)),s=e.splitSizesByWorkspace,i=(0,n.default)(s,[r].map(k)),c=e.explorerSidebarWidthByWorkspace,l=(0,n.default)(c,[r].map(k)),u=e.pinnedAgentIdsByWorkspace,p=(0,n.default)(u,[r].map(k)),y=e.pendingAgentIdsByWorkspace,I=(0,n.default)(y,[r].map(k)),b=e.hiddenAgentIdsByWorkspace,W=(0,n.default)(b,[r].map(k)),B=e.focusRestorationByWorkspace,P=(0,n.default)(B,[r].map(k)),f=e.explorerSidebarPaneIdByWorkspace,z=(0,n.default)(f,[r].map(k)),O=e.sidePaneIdByWorkspace;return{layoutByWorkspace:o,splitSizesByWorkspace:i,explorerSidebarWidthByWorkspace:l,pinnedAgentIdsByWorkspace:p,pendingAgentIdsByWorkspace:I,hiddenAgentIdsByWorkspace:W,focusRestorationByWorkspace:P,explorerSidebarPaneIdByWorkspace:z,sidePaneIdByWorkspace:(0,n.default)(O,[r].map(k))}})}}),{name:"workspace-layout-state",version:h,storage:(0,I.createValidatedPersistStorage)(o.default,T),migrate:(t,n)=>D(t,n,e),partialize:e=>{const t={};for(const n in e.layoutByWorkspace)t[n]=(0,p.stripEphemeralTabsFromLayout)((0,p.normalizeLayout)(e.layoutByWorkspace[n]));return{layoutByWorkspace:t,splitSizesByWorkspace:e.splitSizesByWorkspace,explorerSidebarWidthByWorkspace:e.explorerSidebarWidthByWorkspace,explorerPaneIdByWorkspace:e.explorerSidebarPaneIdByWorkspace,sidePaneIdByWorkspace:e.sidePaneIdByWorkspace}},merge:(t,n)=>{const r=T.safeParse(t);if(!r.success)return n;const o={},s=Object.assign({},r.data.explorerSidebarPaneIdByWorkspace??r.data.explorerPaneIdByWorkspace);for(const[t,n]of Object.entries(r.data.layoutByWorkspace)){const r=(0,p.stripEphemeralTabsFromLayout)(n),i=M({layout:r,registeredPaneId:s[t],ids:e});i?(o[t]=(0,p.restoreEmptyPanesInLayout)(i.layout,i.paneId),s[t]=i.paneId):o[t]=(0,p.restoreEmptyPanesInLayout)(r)}return Object.assign({},n,{layoutByWorkspace:o,splitSizesByWorkspace:r.data.splitSizesByWorkspace??{},explorerSidebarWidthByWorkspace:r.data.explorerSidebarWidthByWorkspace??(i=r.data.explorerSidebarRatioByWorkspace??r.data.sidePanelRatioByWorkspace??{},Object.fromEntries(Object.entries(i).map(([e,t])=>[e,t*S]))),explorerSidebarPaneIdByWorkspace:s,sidePaneIdByWorkspace:r.data.sidePaneIdByWorkspace??{}});var i}}))}const J=G();function Q(){return J.persist.hasHydrated()}},3667,[35,364,1587,36,3405,3408,1600,3668,3669,3673,3609,3677]);
|
|
15323
15323
|
__d(function(g,r,i,a,m,e,d){"use strict";function o(){return"function"==typeof globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"defaultWorkspaceLayoutIds",{enumerable:!0,get:function(){return t}});const t={createNodeId:t=>`${t}_${o()}`,createFocusRestorationToken:()=>`workspace-focus-${o()}`}},3668,[]);
|
|
Binary file
|
|
Binary file
|
|
@@ -86,6 +86,6 @@
|
|
|
86
86
|
<body>
|
|
87
87
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
88
88
|
<div id="root"></div>
|
|
89
|
-
<script src="/_expo/static/js/web/index-
|
|
89
|
+
<script src="/_expo/static/js/web/index-3e1fce95f28be7888ddabb4aad3c337a.js" defer></script>
|
|
90
90
|
</body>
|
|
91
91
|
</html>
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytetrue/server",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "BySpace backend server",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/server",
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
"test:e2e:ui": "vitest --ui e2e.test.ts"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@bytetrue/client": "0.16.
|
|
81
|
-
"@bytetrue/highlight": "0.16.
|
|
82
|
-
"@bytetrue/protocol": "0.16.
|
|
83
|
-
"@bytetrue/relay": "0.16.
|
|
80
|
+
"@bytetrue/client": "0.16.1",
|
|
81
|
+
"@bytetrue/highlight": "0.16.1",
|
|
82
|
+
"@bytetrue/protocol": "0.16.1",
|
|
83
|
+
"@bytetrue/relay": "0.16.1"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@playwright/test": "^1.56.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytetrue/byspace",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "BySpace CLI - control your AI coding agents from the command line",
|
|
5
5
|
"bin": {
|
|
6
6
|
"byspace": "bin/byspace"
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"@agentclientprotocol/sdk": "^0.17.1",
|
|
31
31
|
"@anthropic-ai/claude-agent-sdk": "0.3.246",
|
|
32
32
|
"@anthropic-ai/sdk": "^0.104.2",
|
|
33
|
-
"@bytetrue/client": "0.16.
|
|
34
|
-
"@bytetrue/highlight": "0.16.
|
|
35
|
-
"@bytetrue/protocol": "0.16.
|
|
36
|
-
"@bytetrue/relay": "0.16.
|
|
37
|
-
"@bytetrue/server": "0.16.
|
|
33
|
+
"@bytetrue/client": "0.16.1",
|
|
34
|
+
"@bytetrue/highlight": "0.16.1",
|
|
35
|
+
"@bytetrue/protocol": "0.16.1",
|
|
36
|
+
"@bytetrue/relay": "0.16.1",
|
|
37
|
+
"@bytetrue/server": "0.16.1",
|
|
38
38
|
"@clack/prompts": "^1.0.0",
|
|
39
39
|
"@codemirror/language": "6.12.4",
|
|
40
40
|
"@codemirror/legacy-modes": "^6.5.3",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"bugs": {
|
|
104
104
|
"url": "https://github.com/ByteTrue/byspace/issues"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "e5775738d9ea7f2a7cecd6f313fe6a21f68468e7",
|
|
107
107
|
"bundledDependencies": [
|
|
108
108
|
"@bytetrue/highlight",
|
|
109
109
|
"@bytetrue/relay",
|
|
Binary file
|