ds-harness-remote 0.4.27 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/acp/adapter.d.ts +19 -0
- package/dist/acp/adapter.d.ts.map +1 -0
- package/dist/acp/adapter.js +14 -0
- package/dist/acp/adapter.js.map +1 -0
- package/dist/acp/adapters/antigravity/executor.d.ts +20 -0
- package/dist/acp/adapters/antigravity/executor.d.ts.map +1 -0
- package/dist/acp/adapters/antigravity/executor.js +99 -0
- package/dist/acp/adapters/antigravity/executor.js.map +1 -0
- package/dist/acp/adapters/antigravity/image-store.d.ts +9 -0
- package/dist/acp/adapters/antigravity/image-store.d.ts.map +1 -0
- package/dist/acp/adapters/antigravity/image-store.js +116 -0
- package/dist/acp/adapters/antigravity/image-store.js.map +1 -0
- package/dist/acp/adapters/antigravity/index.d.ts +5 -0
- package/dist/acp/adapters/antigravity/index.d.ts.map +1 -0
- package/dist/acp/adapters/antigravity/index.js +5 -0
- package/dist/acp/adapters/antigravity/index.js.map +1 -0
- package/dist/acp/adapters/antigravity/models.d.ts +35 -0
- package/dist/acp/adapters/antigravity/models.d.ts.map +1 -0
- package/dist/acp/adapters/antigravity/models.js +59 -0
- package/dist/acp/adapters/antigravity/models.js.map +1 -0
- package/dist/acp/adapters/antigravity/service.d.ts +35 -0
- package/dist/acp/adapters/antigravity/service.d.ts.map +1 -0
- package/dist/acp/adapters/antigravity/service.js +67 -0
- package/dist/acp/adapters/antigravity/service.js.map +1 -0
- package/dist/acp/adapters/antigravity/transcript-loader.d.ts +21 -0
- package/dist/acp/adapters/antigravity/transcript-loader.d.ts.map +1 -0
- package/dist/acp/adapters/antigravity/transcript-loader.js +356 -0
- package/dist/acp/adapters/antigravity/transcript-loader.js.map +1 -0
- package/dist/acp/adapters/antigravity/transcript-watcher.d.ts +28 -0
- package/dist/acp/adapters/antigravity/transcript-watcher.d.ts.map +1 -0
- package/dist/acp/adapters/antigravity/transcript-watcher.js +157 -0
- package/dist/acp/adapters/antigravity/transcript-watcher.js.map +1 -0
- package/dist/acp/adapters/antigravity/types.d.ts +56 -0
- package/dist/acp/adapters/antigravity/types.d.ts.map +1 -0
- package/dist/acp/adapters/antigravity/types.js +2 -0
- package/dist/acp/adapters/antigravity/types.js.map +1 -0
- package/dist/acp/adapters/antigravity-process.d.ts +69 -0
- package/dist/acp/adapters/antigravity-process.d.ts.map +1 -0
- package/dist/acp/adapters/antigravity-process.js +566 -0
- package/dist/acp/adapters/antigravity-process.js.map +1 -0
- package/dist/acp/adapters/antigravity.d.ts +8 -0
- package/dist/acp/adapters/antigravity.d.ts.map +1 -0
- package/dist/acp/adapters/antigravity.js +9 -0
- package/dist/acp/adapters/antigravity.js.map +1 -0
- package/dist/acp/adapters/cursor-process.d.ts +75 -0
- package/dist/acp/adapters/cursor-process.d.ts.map +1 -0
- package/dist/acp/adapters/cursor-process.js +273 -0
- package/dist/acp/adapters/cursor-process.js.map +1 -0
- package/dist/acp/adapters/cursor.d.ts +8 -0
- package/dist/acp/adapters/cursor.d.ts.map +1 -0
- package/dist/acp/adapters/cursor.js +8 -0
- package/dist/acp/adapters/cursor.js.map +1 -0
- package/dist/acp/gateway.d.ts +108 -0
- package/dist/acp/gateway.d.ts.map +1 -0
- package/dist/acp/gateway.js +1040 -0
- package/dist/acp/gateway.js.map +1 -0
- package/dist/acp/image-content.d.ts +19 -0
- package/dist/acp/image-content.d.ts.map +1 -0
- package/dist/acp/image-content.js +76 -0
- package/dist/acp/image-content.js.map +1 -0
- package/dist/acp/method-policy.d.ts +239 -0
- package/dist/acp/method-policy.d.ts.map +1 -0
- package/dist/acp/method-policy.js +102 -0
- package/dist/acp/method-policy.js.map +1 -0
- package/dist/acp/peer-bridge.d.ts +59 -0
- package/dist/acp/peer-bridge.d.ts.map +1 -0
- package/dist/acp/peer-bridge.js +367 -0
- package/dist/acp/peer-bridge.js.map +1 -0
- package/dist/acp/virtual-harness.d.ts +181 -0
- package/dist/acp/virtual-harness.d.ts.map +1 -0
- package/dist/acp/virtual-harness.js +1556 -0
- package/dist/acp/virtual-harness.js.map +1 -0
- package/dist/acp/workspace-tools.d.ts +13 -0
- package/dist/acp/workspace-tools.d.ts.map +1 -0
- package/dist/acp/workspace-tools.js +46 -0
- package/dist/acp/workspace-tools.js.map +1 -0
- package/dist/acp.d.ts.map +1 -1
- package/dist/acp.js +1 -0
- package/dist/acp.js.map +1 -1
- package/dist/api-proxy-switch.d.ts +2 -0
- package/dist/api-proxy-switch.d.ts.map +1 -1
- package/dist/api-proxy-switch.js +9 -0
- package/dist/api-proxy-switch.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +4 -3
- package/dist/cli.js.map +1 -1
- package/dist/client-runtime.d.ts +14 -1
- package/dist/client-runtime.d.ts.map +1 -1
- package/dist/client-runtime.js +160 -8
- package/dist/client-runtime.js.map +1 -1
- package/dist/client.github.js +312 -142
- package/dist/client.js +312 -142
- package/dist/client.js.map +1 -1
- package/dist/codex/domain.d.ts +4 -1
- package/dist/codex/domain.d.ts.map +1 -1
- package/dist/codex/domain.js +32 -4
- package/dist/codex/domain.js.map +1 -1
- package/dist/codex/virtual-harness.d.ts.map +1 -1
- package/dist/codex/virtual-harness.js +3 -0
- package/dist/codex/virtual-harness.js.map +1 -1
- package/dist/codex-workspace-bridge.d.ts +7 -105
- package/dist/codex-workspace-bridge.d.ts.map +1 -1
- package/dist/codex-workspace-bridge.js +10 -498
- package/dist/codex-workspace-bridge.js.map +1 -1
- package/dist/config.d.ts +22 -10
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +45 -4
- package/dist/config.js.map +1 -1
- package/dist/connection-controller.d.ts.map +1 -1
- package/dist/connection-controller.js +7 -4
- package/dist/connection-controller.js.map +1 -1
- package/dist/control-runtime.d.ts +1 -0
- package/dist/control-runtime.d.ts.map +1 -1
- package/dist/control-runtime.js +49 -9
- package/dist/control-runtime.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13173 -8303
- package/dist/index.js.map +4 -4
- package/dist/remote-typert-gateway.d.ts.map +1 -1
- package/dist/remote-typert-gateway.js +7 -4
- package/dist/remote-typert-gateway.js.map +1 -1
- package/dist/rpc-router.d.ts +6 -5
- package/dist/rpc-router.d.ts.map +1 -1
- package/dist/rpc-router.js +49 -18
- package/dist/rpc-router.js.map +1 -1
- package/dist/server-connection.js +7 -0
- package/dist/server-connection.js.map +1 -1
- package/dist/service.d.ts +26 -0
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +97 -9
- package/dist/service.js.map +1 -1
- package/dist/session-format-compat.d.ts +1 -0
- package/dist/session-format-compat.d.ts.map +1 -1
- package/dist/session-format-compat.js +14 -0
- package/dist/session-format-compat.js.map +1 -1
- package/dist/tui-command.js +2 -0
- package/dist/tui-command.js.map +1 -1
- package/dist/typert-gateway-switch.d.ts +2 -0
- package/dist/typert-gateway-switch.d.ts.map +1 -1
- package/dist/typert-gateway-switch.js +16 -0
- package/dist/typert-gateway-switch.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/workspace-bridge.d.ts +117 -0
- package/dist/workspace-bridge.d.ts.map +1 -0
- package/dist/workspace-bridge.js +512 -0
- package/dist/workspace-bridge.js.map +1 -0
- package/dsh-plugin.json +1 -1
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
mod
|
|
24
24
|
));
|
|
25
25
|
|
|
26
|
-
//
|
|
26
|
+
// node_modules/qrcode/lib/can-promise.js
|
|
27
27
|
var require_can_promise = __commonJS({
|
|
28
|
-
"
|
|
28
|
+
"node_modules/qrcode/lib/can-promise.js"(exports, module) {
|
|
29
29
|
module.exports = function() {
|
|
30
30
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
//
|
|
35
|
+
// node_modules/qrcode/lib/core/utils.js
|
|
36
36
|
var require_utils = __commonJS({
|
|
37
|
-
"
|
|
37
|
+
"node_modules/qrcode/lib/core/utils.js"(exports) {
|
|
38
38
|
var toSJISFunction, CODEWORDS_COUNT = [
|
|
39
39
|
0,
|
|
40
40
|
// Not used
|
|
@@ -107,9 +107,9 @@
|
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
|
|
110
|
-
//
|
|
110
|
+
// node_modules/qrcode/lib/core/error-correction-level.js
|
|
111
111
|
var require_error_correction_level = __commonJS({
|
|
112
|
-
"
|
|
112
|
+
"node_modules/qrcode/lib/core/error-correction-level.js"(exports) {
|
|
113
113
|
exports.L = { bit: 1 };
|
|
114
114
|
exports.M = { bit: 0 };
|
|
115
115
|
exports.Q = { bit: 3 };
|
|
@@ -149,9 +149,9 @@
|
|
|
149
149
|
}
|
|
150
150
|
});
|
|
151
151
|
|
|
152
|
-
//
|
|
152
|
+
// node_modules/qrcode/lib/core/bit-buffer.js
|
|
153
153
|
var require_bit_buffer = __commonJS({
|
|
154
|
-
"
|
|
154
|
+
"node_modules/qrcode/lib/core/bit-buffer.js"(exports, module) {
|
|
155
155
|
function BitBuffer() {
|
|
156
156
|
this.buffer = [], this.length = 0;
|
|
157
157
|
}
|
|
@@ -176,9 +176,9 @@
|
|
|
176
176
|
}
|
|
177
177
|
});
|
|
178
178
|
|
|
179
|
-
//
|
|
179
|
+
// node_modules/qrcode/lib/core/bit-matrix.js
|
|
180
180
|
var require_bit_matrix = __commonJS({
|
|
181
|
-
"
|
|
181
|
+
"node_modules/qrcode/lib/core/bit-matrix.js"(exports, module) {
|
|
182
182
|
function BitMatrix(size) {
|
|
183
183
|
if (!size || size < 1)
|
|
184
184
|
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
@@ -201,9 +201,9 @@
|
|
|
201
201
|
}
|
|
202
202
|
});
|
|
203
203
|
|
|
204
|
-
//
|
|
204
|
+
// node_modules/qrcode/lib/core/alignment-pattern.js
|
|
205
205
|
var require_alignment_pattern = __commonJS({
|
|
206
|
-
"
|
|
206
|
+
"node_modules/qrcode/lib/core/alignment-pattern.js"(exports) {
|
|
207
207
|
var getSymbolSize = require_utils().getSymbolSize;
|
|
208
208
|
exports.getRowColCoords = function(version) {
|
|
209
209
|
if (version === 1) return [];
|
|
@@ -224,9 +224,9 @@
|
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
|
|
227
|
-
//
|
|
227
|
+
// node_modules/qrcode/lib/core/finder-pattern.js
|
|
228
228
|
var require_finder_pattern = __commonJS({
|
|
229
|
-
"
|
|
229
|
+
"node_modules/qrcode/lib/core/finder-pattern.js"(exports) {
|
|
230
230
|
var getSymbolSize = require_utils().getSymbolSize, FINDER_PATTERN_SIZE = 7;
|
|
231
231
|
exports.getPositions = function(version) {
|
|
232
232
|
let size = getSymbolSize(version);
|
|
@@ -242,9 +242,9 @@
|
|
|
242
242
|
}
|
|
243
243
|
});
|
|
244
244
|
|
|
245
|
-
//
|
|
245
|
+
// node_modules/qrcode/lib/core/mask-pattern.js
|
|
246
246
|
var require_mask_pattern = __commonJS({
|
|
247
|
-
"
|
|
247
|
+
"node_modules/qrcode/lib/core/mask-pattern.js"(exports) {
|
|
248
248
|
exports.Patterns = {
|
|
249
249
|
PATTERN000: 0,
|
|
250
250
|
PATTERN001: 1,
|
|
@@ -342,9 +342,9 @@
|
|
|
342
342
|
}
|
|
343
343
|
});
|
|
344
344
|
|
|
345
|
-
//
|
|
345
|
+
// node_modules/qrcode/lib/core/error-correction-code.js
|
|
346
346
|
var require_error_correction_code = __commonJS({
|
|
347
|
-
"
|
|
347
|
+
"node_modules/qrcode/lib/core/error-correction-code.js"(exports) {
|
|
348
348
|
var ECLevel = require_error_correction_level(), EC_BLOCKS_TABLE = [
|
|
349
349
|
// L M Q H
|
|
350
350
|
1,
|
|
@@ -701,9 +701,9 @@
|
|
|
701
701
|
}
|
|
702
702
|
});
|
|
703
703
|
|
|
704
|
-
//
|
|
704
|
+
// node_modules/qrcode/lib/core/galois-field.js
|
|
705
705
|
var require_galois_field = __commonJS({
|
|
706
|
-
"
|
|
706
|
+
"node_modules/qrcode/lib/core/galois-field.js"(exports) {
|
|
707
707
|
var EXP_TABLE = new Uint8Array(512), LOG_TABLE = new Uint8Array(256);
|
|
708
708
|
(function() {
|
|
709
709
|
let x = 1;
|
|
@@ -725,9 +725,9 @@
|
|
|
725
725
|
}
|
|
726
726
|
});
|
|
727
727
|
|
|
728
|
-
//
|
|
728
|
+
// node_modules/qrcode/lib/core/polynomial.js
|
|
729
729
|
var require_polynomial = __commonJS({
|
|
730
|
-
"
|
|
730
|
+
"node_modules/qrcode/lib/core/polynomial.js"(exports) {
|
|
731
731
|
var GF = require_galois_field();
|
|
732
732
|
exports.mul = function(p1, p2) {
|
|
733
733
|
let coeff = new Uint8Array(p1.length + p2.length - 1);
|
|
@@ -757,9 +757,9 @@
|
|
|
757
757
|
}
|
|
758
758
|
});
|
|
759
759
|
|
|
760
|
-
//
|
|
760
|
+
// node_modules/qrcode/lib/core/reed-solomon-encoder.js
|
|
761
761
|
var require_reed_solomon_encoder = __commonJS({
|
|
762
|
-
"
|
|
762
|
+
"node_modules/qrcode/lib/core/reed-solomon-encoder.js"(exports, module) {
|
|
763
763
|
var Polynomial = require_polynomial();
|
|
764
764
|
function ReedSolomonEncoder(degree) {
|
|
765
765
|
this.genPoly = void 0, this.degree = degree, this.degree && this.initialize(this.degree);
|
|
@@ -783,18 +783,18 @@
|
|
|
783
783
|
}
|
|
784
784
|
});
|
|
785
785
|
|
|
786
|
-
//
|
|
786
|
+
// node_modules/qrcode/lib/core/version-check.js
|
|
787
787
|
var require_version_check = __commonJS({
|
|
788
|
-
"
|
|
788
|
+
"node_modules/qrcode/lib/core/version-check.js"(exports) {
|
|
789
789
|
exports.isValid = function(version) {
|
|
790
790
|
return !isNaN(version) && version >= 1 && version <= 40;
|
|
791
791
|
};
|
|
792
792
|
}
|
|
793
793
|
});
|
|
794
794
|
|
|
795
|
-
//
|
|
795
|
+
// node_modules/qrcode/lib/core/regex.js
|
|
796
796
|
var require_regex = __commonJS({
|
|
797
|
-
"
|
|
797
|
+
"node_modules/qrcode/lib/core/regex.js"(exports) {
|
|
798
798
|
var numeric = "[0-9]+", alphanumeric = "[A-Z $%*+\\-./:]+", kanji = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
799
799
|
kanji = kanji.replace(/u/g, "\\u");
|
|
800
800
|
var byte = "(?:(?![A-Z0-9 $%*+\\-./:]|" + kanji + `)(?:.|[\r
|
|
@@ -817,9 +817,9 @@
|
|
|
817
817
|
}
|
|
818
818
|
});
|
|
819
819
|
|
|
820
|
-
//
|
|
820
|
+
// node_modules/qrcode/lib/core/mode.js
|
|
821
821
|
var require_mode = __commonJS({
|
|
822
|
-
"
|
|
822
|
+
"node_modules/qrcode/lib/core/mode.js"(exports) {
|
|
823
823
|
var VersionCheck = require_version_check(), Regex = require_regex();
|
|
824
824
|
exports.NUMERIC = {
|
|
825
825
|
id: "Numeric",
|
|
@@ -888,9 +888,9 @@
|
|
|
888
888
|
}
|
|
889
889
|
});
|
|
890
890
|
|
|
891
|
-
//
|
|
891
|
+
// node_modules/qrcode/lib/core/version.js
|
|
892
892
|
var require_version = __commonJS({
|
|
893
|
-
"
|
|
893
|
+
"node_modules/qrcode/lib/core/version.js"(exports) {
|
|
894
894
|
var Utils = require_utils(), ECCode = require_error_correction_code(), ECLevel = require_error_correction_level(), Mode = require_mode(), VersionCheck = require_version_check(), G18 = 7973, G18_BCH = Utils.getBCHDigit(G18);
|
|
895
895
|
function getBestVersionForDataLength(mode, length, errorCorrectionLevel) {
|
|
896
896
|
for (let currentVersion = 1; currentVersion <= 40; currentVersion++)
|
|
@@ -957,9 +957,9 @@
|
|
|
957
957
|
}
|
|
958
958
|
});
|
|
959
959
|
|
|
960
|
-
//
|
|
960
|
+
// node_modules/qrcode/lib/core/format-info.js
|
|
961
961
|
var require_format_info = __commonJS({
|
|
962
|
-
"
|
|
962
|
+
"node_modules/qrcode/lib/core/format-info.js"(exports) {
|
|
963
963
|
var Utils = require_utils(), G15 = 1335, G15_MASK = 21522, G15_BCH = Utils.getBCHDigit(G15);
|
|
964
964
|
exports.getEncodedBits = function(errorCorrectionLevel, mask) {
|
|
965
965
|
let data = errorCorrectionLevel.bit << 3 | mask, d = data << 10;
|
|
@@ -970,9 +970,9 @@
|
|
|
970
970
|
}
|
|
971
971
|
});
|
|
972
972
|
|
|
973
|
-
//
|
|
973
|
+
// node_modules/qrcode/lib/core/numeric-data.js
|
|
974
974
|
var require_numeric_data = __commonJS({
|
|
975
|
-
"
|
|
975
|
+
"node_modules/qrcode/lib/core/numeric-data.js"(exports, module) {
|
|
976
976
|
var Mode = require_mode();
|
|
977
977
|
function NumericData(data) {
|
|
978
978
|
this.mode = Mode.NUMERIC, this.data = data.toString();
|
|
@@ -997,9 +997,9 @@
|
|
|
997
997
|
}
|
|
998
998
|
});
|
|
999
999
|
|
|
1000
|
-
//
|
|
1000
|
+
// node_modules/qrcode/lib/core/alphanumeric-data.js
|
|
1001
1001
|
var require_alphanumeric_data = __commonJS({
|
|
1002
|
-
"
|
|
1002
|
+
"node_modules/qrcode/lib/core/alphanumeric-data.js"(exports, module) {
|
|
1003
1003
|
var Mode = require_mode(), ALPHA_NUM_CHARS = [
|
|
1004
1004
|
"0",
|
|
1005
1005
|
"1",
|
|
@@ -1071,9 +1071,9 @@
|
|
|
1071
1071
|
}
|
|
1072
1072
|
});
|
|
1073
1073
|
|
|
1074
|
-
//
|
|
1074
|
+
// node_modules/qrcode/lib/core/byte-data.js
|
|
1075
1075
|
var require_byte_data = __commonJS({
|
|
1076
|
-
"
|
|
1076
|
+
"node_modules/qrcode/lib/core/byte-data.js"(exports, module) {
|
|
1077
1077
|
var Mode = require_mode();
|
|
1078
1078
|
function ByteData(data) {
|
|
1079
1079
|
this.mode = Mode.BYTE, typeof data == "string" ? this.data = new TextEncoder().encode(data) : this.data = new Uint8Array(data);
|
|
@@ -1095,9 +1095,9 @@
|
|
|
1095
1095
|
}
|
|
1096
1096
|
});
|
|
1097
1097
|
|
|
1098
|
-
//
|
|
1098
|
+
// node_modules/qrcode/lib/core/kanji-data.js
|
|
1099
1099
|
var require_kanji_data = __commonJS({
|
|
1100
|
-
"
|
|
1100
|
+
"node_modules/qrcode/lib/core/kanji-data.js"(exports, module) {
|
|
1101
1101
|
var Mode = require_mode(), Utils = require_utils();
|
|
1102
1102
|
function KanjiData(data) {
|
|
1103
1103
|
this.mode = Mode.KANJI, this.data = data;
|
|
@@ -1131,9 +1131,9 @@ Make sure your charset is UTF-8`
|
|
|
1131
1131
|
}
|
|
1132
1132
|
});
|
|
1133
1133
|
|
|
1134
|
-
//
|
|
1134
|
+
// node_modules/dijkstrajs/dijkstra.js
|
|
1135
1135
|
var require_dijkstra = __commonJS({
|
|
1136
|
-
"
|
|
1136
|
+
"node_modules/dijkstrajs/dijkstra.js"(exports, module) {
|
|
1137
1137
|
"use strict";
|
|
1138
1138
|
var dijkstra = {
|
|
1139
1139
|
single_source_shortest_paths: function(graph, s, d) {
|
|
@@ -1201,9 +1201,9 @@ Make sure your charset is UTF-8`
|
|
|
1201
1201
|
}
|
|
1202
1202
|
});
|
|
1203
1203
|
|
|
1204
|
-
//
|
|
1204
|
+
// node_modules/qrcode/lib/core/segments.js
|
|
1205
1205
|
var require_segments = __commonJS({
|
|
1206
|
-
"
|
|
1206
|
+
"node_modules/qrcode/lib/core/segments.js"(exports) {
|
|
1207
1207
|
var Mode = require_mode(), NumericData = require_numeric_data(), AlphanumericData = require_alphanumeric_data(), ByteData = require_byte_data(), KanjiData = require_kanji_data(), Regex = require_regex(), Utils = require_utils(), dijkstra = require_dijkstra();
|
|
1208
1208
|
function getStringByteLength(str) {
|
|
1209
1209
|
return unescape(encodeURIComponent(str)).length;
|
|
@@ -1334,9 +1334,9 @@ Make sure your charset is UTF-8`
|
|
|
1334
1334
|
}
|
|
1335
1335
|
});
|
|
1336
1336
|
|
|
1337
|
-
//
|
|
1337
|
+
// node_modules/qrcode/lib/core/qrcode.js
|
|
1338
1338
|
var require_qrcode = __commonJS({
|
|
1339
|
-
"
|
|
1339
|
+
"node_modules/qrcode/lib/core/qrcode.js"(exports) {
|
|
1340
1340
|
var Utils = require_utils(), ECLevel = require_error_correction_level(), BitBuffer = require_bit_buffer(), BitMatrix = require_bit_matrix(), AlignmentPattern = require_alignment_pattern(), FinderPattern = require_finder_pattern(), MaskPattern = require_mask_pattern(), ECCode = require_error_correction_code(), ReedSolomonEncoder = require_reed_solomon_encoder(), Version = require_version(), FormatInfo = require_format_info(), Mode = require_mode(), Segments = require_segments();
|
|
1341
1341
|
function setupFinderPattern(matrix, version) {
|
|
1342
1342
|
let size = matrix.size, pos = FinderPattern.getPositions(version);
|
|
@@ -1464,9 +1464,9 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
1464
1464
|
}
|
|
1465
1465
|
});
|
|
1466
1466
|
|
|
1467
|
-
//
|
|
1467
|
+
// node_modules/qrcode/lib/renderer/utils.js
|
|
1468
1468
|
var require_utils2 = __commonJS({
|
|
1469
|
-
"
|
|
1469
|
+
"node_modules/qrcode/lib/renderer/utils.js"(exports) {
|
|
1470
1470
|
function hex2rgba(hex) {
|
|
1471
1471
|
if (typeof hex == "number" && (hex = hex.toString()), typeof hex != "string")
|
|
1472
1472
|
throw new Error("Color should be defined as hex string");
|
|
@@ -1522,9 +1522,9 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
1522
1522
|
}
|
|
1523
1523
|
});
|
|
1524
1524
|
|
|
1525
|
-
//
|
|
1525
|
+
// node_modules/qrcode/lib/renderer/canvas.js
|
|
1526
1526
|
var require_canvas = __commonJS({
|
|
1527
|
-
"
|
|
1527
|
+
"node_modules/qrcode/lib/renderer/canvas.js"(exports) {
|
|
1528
1528
|
var Utils = require_utils2();
|
|
1529
1529
|
function clearCanvas(ctx, canvas, size) {
|
|
1530
1530
|
ctx.clearRect(0, 0, canvas.width, canvas.height), canvas.style || (canvas.style = {}), canvas.height = size, canvas.width = size, canvas.style.height = size + "px", canvas.style.width = size + "px";
|
|
@@ -1551,9 +1551,9 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
1551
1551
|
}
|
|
1552
1552
|
});
|
|
1553
1553
|
|
|
1554
|
-
//
|
|
1554
|
+
// node_modules/qrcode/lib/renderer/svg-tag.js
|
|
1555
1555
|
var require_svg_tag = __commonJS({
|
|
1556
|
-
"
|
|
1556
|
+
"node_modules/qrcode/lib/renderer/svg-tag.js"(exports) {
|
|
1557
1557
|
var Utils = require_utils2();
|
|
1558
1558
|
function getColorAttrib(color, attrib) {
|
|
1559
1559
|
let alpha = color.a / 255, str = attrib + '="' + color.hex + '"';
|
|
@@ -1579,9 +1579,9 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
1579
1579
|
}
|
|
1580
1580
|
});
|
|
1581
1581
|
|
|
1582
|
-
//
|
|
1582
|
+
// node_modules/qrcode/lib/browser.js
|
|
1583
1583
|
var require_browser = __commonJS({
|
|
1584
|
-
"
|
|
1584
|
+
"node_modules/qrcode/lib/browser.js"(exports) {
|
|
1585
1585
|
var canPromise = require_can_promise(), QRCode2 = require_qrcode(), CanvasRenderer = require_canvas(), SvgRenderer = require_svg_tag();
|
|
1586
1586
|
function renderCanvas(renderFunc, canvas, text, opts, cb) {
|
|
1587
1587
|
let args = [].slice.call(arguments, 1), argsNum = args.length, isLastArgCb = typeof args[argsNum - 1] == "function";
|
|
@@ -1758,7 +1758,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
1758
1758
|
try {
|
|
1759
1759
|
let value = JSON.parse(raw);
|
|
1760
1760
|
if (typeof value.targetDeviceId != "string" || typeof value.workspaceId != "string") throw new Error("invalid");
|
|
1761
|
-
if (value.backend !== void 0 && value.backend !== "harness" && value.backend !== "codex") throw new Error("invalid");
|
|
1761
|
+
if (value.backend !== void 0 && value.backend !== "harness" && value.backend !== "codex" && value.backend !== "cursor" && value.backend !== "antigravity") throw new Error("invalid");
|
|
1762
1762
|
if (value.sessionId !== void 0 && typeof value.sessionId != "string") throw new Error("invalid");
|
|
1763
1763
|
return value;
|
|
1764
1764
|
} catch {
|
|
@@ -1810,8 +1810,11 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
1810
1810
|
serverUrlHint: "HTTPS origin used for account authorization and encrypted relay.",
|
|
1811
1811
|
serverSaved: "Server address saved. Restart DSH to apply it.",
|
|
1812
1812
|
codexRemote: "Codex Remote",
|
|
1813
|
-
codexRemoteHint: "
|
|
1813
|
+
codexRemoteHint: "Connect to CodeX projects on this Host.",
|
|
1814
1814
|
codexSaved: "Codex Remote setting saved. Restart DSH to apply it.",
|
|
1815
|
+
cursorRemote: "Cursor ACP adapter (experimental)",
|
|
1816
|
+
cursorRemoteHint: "Enable the Cursor `agent acp` backend for the Agent ACP gateway. Requires local `agent login`. Restart DSH after changing this setting.",
|
|
1817
|
+
cursorSaved: "Cursor ACP adapter setting saved. Restart DSH to apply it.",
|
|
1815
1818
|
authorizeFromRemote: "Sign in from the Remote entry in the sidebar, then return here to manage this device.",
|
|
1816
1819
|
authorizationMethod: "Authorization method",
|
|
1817
1820
|
accountPassword: "Account password",
|
|
@@ -1918,11 +1921,17 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
1918
1921
|
exitRemote: "Exit",
|
|
1919
1922
|
addRemoteWorkspace: "Add remote workspace",
|
|
1920
1923
|
addCodexWorkspace: "Add CodeX workspace",
|
|
1924
|
+
addCursorWorkspace: "Add Cursor workspace",
|
|
1925
|
+
addAntigravityWorkspace: "Add Antigravity workspace",
|
|
1921
1926
|
noCodexWorkspaces: "No CodeX workspaces yet.",
|
|
1927
|
+
noCursorWorkspaces: "No Cursor workspaces yet. Add a project directory to start.",
|
|
1928
|
+
noAntigravityWorkspaces: "No Antigravity workspaces yet. Add a project directory to start.",
|
|
1922
1929
|
cancelAddWorkspace: "Cancel",
|
|
1923
1930
|
confirmAddWorkspace: "Add and open",
|
|
1924
1931
|
showAllWorkspaces: "Show all DSH workspaces",
|
|
1925
1932
|
showAllCodexWorkspaces: "Show all CodeX workspaces",
|
|
1933
|
+
showAllCursorWorkspaces: "Show all Cursor workspaces",
|
|
1934
|
+
showAllAntigravityWorkspaces: "Show all Antigravity workspaces",
|
|
1926
1935
|
remoteModeLabel: "Remote mode \xB7 {name}",
|
|
1927
1936
|
remoteNetworkP2p: "P2P",
|
|
1928
1937
|
remoteNetworkTurn: "TURN",
|
|
@@ -1981,11 +1990,13 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
1981
1990
|
allowControlCurrentDevice: "Allow control of this device",
|
|
1982
1991
|
allowControlDevice: "Allow control of device",
|
|
1983
1992
|
connectedClientCount: "{count} connected",
|
|
1984
|
-
checkAcp: "Check
|
|
1993
|
+
checkAcp: "Check backend",
|
|
1985
1994
|
checkingAcp: "Checking ACP\u2026",
|
|
1986
1995
|
acpAvailable: "ACP available",
|
|
1987
1996
|
acpUnavailable: "ACP unavailable",
|
|
1988
|
-
|
|
1997
|
+
agentBackends: "More Coding Agents",
|
|
1998
|
+
acpDocumentation: "Read the documentation.",
|
|
1999
|
+
acpHint: "Connect through ACP. ",
|
|
1989
2000
|
acpCheckPassed: "Check passed",
|
|
1990
2001
|
acpCheckFailed: "Check failed",
|
|
1991
2002
|
addAcp: "Add ACP",
|
|
@@ -2008,6 +2019,8 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2008
2019
|
qrLoginExpired: "This QR code expired. Refresh it to continue.",
|
|
2009
2020
|
refreshQrCode: "Refresh QR code",
|
|
2010
2021
|
codexVirtualWorkspace: "CodeX virtual workspace",
|
|
2022
|
+
cursorVirtualWorkspace: "Cursor virtual workspace",
|
|
2023
|
+
antigravityVirtualWorkspace: "Antigravity virtual workspace",
|
|
2011
2024
|
codexVirtualSessions: "Sessions"
|
|
2012
2025
|
}, zh = {
|
|
2013
2026
|
terminalRemote: "\u8FDC\u7A0B\u7EC8\u7AEF",
|
|
@@ -2050,8 +2063,11 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2050
2063
|
serverUrlHint: "\u7528\u4E8E\u8D26\u53F7\u6388\u6743\u548C\u52A0\u5BC6\u4E2D\u7EE7\u7684 HTTPS \u5730\u5740\u3002",
|
|
2051
2064
|
serverSaved: "Server \u5730\u5740\u5DF2\u4FDD\u5B58\uFF0C\u91CD\u542F DSH \u540E\u751F\u6548\u3002",
|
|
2052
2065
|
codexRemote: "Codex Remote",
|
|
2053
|
-
codexRemoteHint: "\
|
|
2066
|
+
codexRemoteHint: "\u8FDE\u63A5\u8FD9\u53F0 Host \u4E0A\u7684 CodeX \u9879\u76EE\u3002",
|
|
2054
2067
|
codexSaved: "Codex Remote \u8BBE\u7F6E\u5DF2\u4FDD\u5B58\uFF0C\u91CD\u542F DSH \u540E\u751F\u6548\u3002",
|
|
2068
|
+
cursorRemote: "Cursor ACP adapter\uFF08\u5B9E\u9A8C\u6027\uFF09",
|
|
2069
|
+
cursorRemoteHint: "\u4E3A Agent ACP gateway \u542F\u7528 Cursor `agent acp` backend\u3002\u9700\u672C\u673A\u5B8C\u6210 `agent login`\u3002\u4FEE\u6539\u540E\u9700\u91CD\u542F DSH \u751F\u6548\u3002",
|
|
2070
|
+
cursorSaved: "Cursor ACP adapter \u8BBE\u7F6E\u5DF2\u4FDD\u5B58\uFF0C\u91CD\u542F DSH \u540E\u751F\u6548\u3002",
|
|
2055
2071
|
authorizeFromRemote: "\u8BF7\u4ECE\u4FA7\u680F Remote \u5165\u53E3\u767B\u5F55\uFF0C\u767B\u5F55\u540E\u53EF\u5728\u8FD9\u91CC\u7BA1\u7406\u5F53\u524D\u8BBE\u5907\u3002",
|
|
2056
2072
|
authorizationMethod: "\u6388\u6743\u65B9\u5F0F",
|
|
2057
2073
|
accountPassword: "\u8D26\u53F7\u5BC6\u7801",
|
|
@@ -2158,11 +2174,17 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2158
2174
|
exitRemote: "\u9000\u51FA",
|
|
2159
2175
|
addRemoteWorkspace: "\u6DFB\u52A0\u8FDC\u7A0B\u5DE5\u4F5C\u533A",
|
|
2160
2176
|
addCodexWorkspace: "\u6DFB\u52A0 CodeX \u5DE5\u4F5C\u533A",
|
|
2177
|
+
addCursorWorkspace: "\u6DFB\u52A0 Cursor \u5DE5\u4F5C\u533A",
|
|
2178
|
+
addAntigravityWorkspace: "\u6DFB\u52A0 Antigravity \u5DE5\u4F5C\u533A",
|
|
2161
2179
|
noCodexWorkspaces: "\u8FD8\u6CA1\u6709 CodeX \u5DE5\u4F5C\u533A\u3002",
|
|
2180
|
+
noCursorWorkspaces: "\u8FD8\u6CA1\u6709 Cursor \u5DE5\u4F5C\u533A\u3002\u6DFB\u52A0\u9879\u76EE\u76EE\u5F55\u5373\u53EF\u5F00\u59CB\u3002",
|
|
2181
|
+
noAntigravityWorkspaces: "\u8FD8\u6CA1\u6709 Antigravity \u5DE5\u4F5C\u533A\u3002\u6DFB\u52A0\u9879\u76EE\u76EE\u5F55\u5373\u53EF\u5F00\u59CB\u3002",
|
|
2162
2182
|
cancelAddWorkspace: "\u53D6\u6D88",
|
|
2163
2183
|
confirmAddWorkspace: "\u786E\u8BA4\u5E76\u6253\u5F00",
|
|
2164
2184
|
showAllWorkspaces: "\u663E\u793A\u5168\u90E8 DSH \u5DE5\u4F5C\u533A",
|
|
2165
2185
|
showAllCodexWorkspaces: "\u663E\u793A\u5168\u90E8 CodeX \u5DE5\u4F5C\u533A",
|
|
2186
|
+
showAllCursorWorkspaces: "\u663E\u793A\u5168\u90E8 Cursor \u5DE5\u4F5C\u533A",
|
|
2187
|
+
showAllAntigravityWorkspaces: "\u663E\u793A\u5168\u90E8 Antigravity \u5DE5\u4F5C\u533A",
|
|
2166
2188
|
remoteModeLabel: "\u8FDC\u7A0B\u6A21\u5F0F \xB7 {name}",
|
|
2167
2189
|
remoteNetworkP2p: "P2P",
|
|
2168
2190
|
remoteNetworkTurn: "TURN",
|
|
@@ -2221,11 +2243,13 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2221
2243
|
allowControlCurrentDevice: "\u5141\u8BB8\u63A7\u5236\u5F53\u524D\u8BBE\u5907",
|
|
2222
2244
|
allowControlDevice: "\u5141\u8BB8\u63A7\u5236\u8BBE\u5907",
|
|
2223
2245
|
connectedClientCount: "{count} \u53F0\u5DF2\u8FDE\u63A5",
|
|
2224
|
-
checkAcp: "\u68C0\u6D4B
|
|
2246
|
+
checkAcp: "\u68C0\u6D4B\u540E\u7AEF",
|
|
2225
2247
|
checkingAcp: "\u6B63\u5728\u68C0\u6D4B ACP\u2026",
|
|
2226
2248
|
acpAvailable: "ACP \u53EF\u7528",
|
|
2227
2249
|
acpUnavailable: "ACP \u4E0D\u53EF\u7528",
|
|
2228
|
-
|
|
2250
|
+
agentBackends: "\u66F4\u591A Coding Agent",
|
|
2251
|
+
acpDocumentation: "\u8BE6\u7EC6\u8BF7\u67E5\u9605\u3002",
|
|
2252
|
+
acpHint: "\u901A\u8FC7 ACP \u7EDF\u4E00\u63A5\u5165\uFF0C",
|
|
2229
2253
|
acpCheckPassed: "\u68C0\u6D4B\u901A\u8FC7",
|
|
2230
2254
|
acpCheckFailed: "\u68C0\u6D4B\u5931\u8D25",
|
|
2231
2255
|
addAcp: "\u6DFB\u52A0 ACP",
|
|
@@ -2248,6 +2272,8 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2248
2272
|
qrLoginExpired: "\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002",
|
|
2249
2273
|
refreshQrCode: "\u5237\u65B0\u4E8C\u7EF4\u7801",
|
|
2250
2274
|
codexVirtualWorkspace: "CodeX \u5DE5\u4F5C\u533A",
|
|
2275
|
+
cursorVirtualWorkspace: "Cursor \u5DE5\u4F5C\u533A",
|
|
2276
|
+
antigravityVirtualWorkspace: "Antigravity \u5DE5\u4F5C\u533A",
|
|
2251
2277
|
codexVirtualSessions: "Sessions"
|
|
2252
2278
|
}, defaultPreferredTransports = ["lan", "p2p", "turn", "relay"], controlRouteBackoffStepsMs = [1e3, 2e3, 5e3, 1e4, 3e4], ControlRouteUnavailableError = class extends Error {
|
|
2253
2279
|
constructor(message) {
|
|
@@ -2261,7 +2287,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2261
2287
|
controlUnavailable: !0,
|
|
2262
2288
|
connected: !1,
|
|
2263
2289
|
transport: "Disconnected",
|
|
2264
|
-
remoteFeatures: { commandList: !1, fileViewer: !1, terminal: !1, codex: !1 },
|
|
2290
|
+
remoteFeatures: { commandList: !1, fileViewer: !1, terminal: !1, codex: !1, cursor: !1, antigravity: !1 },
|
|
2265
2291
|
hostAuthorizationAvailable: !1
|
|
2266
2292
|
};
|
|
2267
2293
|
}
|
|
@@ -2442,8 +2468,8 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2442
2468
|
}
|
|
2443
2469
|
}
|
|
2444
2470
|
function RemotePluginOptions(props) {
|
|
2445
|
-
let { t } = props, [open, setOpen] = React.useState(props.view === "page"), [serverUrl, setServerUrl] = React.useState(""), [
|
|
2446
|
-
setSettingsView(view), setServerUrl(view.config.serverUrl ?? "https://dsh.r2049.cn"),
|
|
2471
|
+
let { t } = props, [open, setOpen] = React.useState(props.view === "page"), [serverUrl, setServerUrl] = React.useState(""), [portsBusy, setPortsBusy] = React.useState(!1), [previewPorts, setPreviewPorts] = React.useState(""), role = "host", [registrationCode, setRegistrationCode] = React.useState(""), [associations, setAssociations] = React.useState({}), [loaded, setLoaded] = React.useState(!1), [writable, setWritable] = React.useState(!1), [busy, setBusy] = React.useState(!1), [terminalEnabled, setTerminalEnabled] = React.useState(!1), [terminalBusy, setTerminalBusy] = React.useState(!1), [acpBackends, setAcpBackends] = React.useState([]), [acpAvailability, setAcpAvailability] = React.useState({}), [acpChecking, setAcpChecking] = React.useState({}), [acpCheckResults, setAcpCheckResults] = React.useState({}), [addingAcp, setAddingAcp] = React.useState(!1), [acpName, setAcpName] = React.useState(""), [acpCommand, setAcpCommand] = React.useState(""), [acpArguments, setAcpArguments] = React.useState("acp"), [reconnectBusy, setReconnectBusy] = React.useState(!1), [hostStatus, setHostStatus] = React.useState(void 0), [hostName, setHostName] = React.useState(""), [hostDeviceId, setHostDeviceId] = React.useState(""), [notice, setNotice] = React.useState(void 0), [error, setError] = React.useState(void 0), [settingsView, setSettingsView] = React.useState(void 0), persistedServerUrl = settingsView?.config.serverUrl ?? "https://dsh.r2049.cn", association = associations.client ?? associations.host, serverDirty = settingsView !== void 0 && serverUrl !== persistedServerUrl, draftDirty = serverDirty, applyView = (view) => {
|
|
2472
|
+
setSettingsView(view), setServerUrl(view.config.serverUrl ?? "https://dsh.r2049.cn"), setTerminalEnabled(view.config.terminal?.enabled ?? !0), setPreviewPorts((view.config.loopback?.ports ?? []).join(", ")), setAcpBackends((view.config.acp?.backends ?? []).map((item) => ({ id: item.id, enabled: item.enabled !== !1 }))), setAcpAvailability(view.acpAvailability ?? {}), setAssociations(view.associations ?? (view.association === void 0 ? {} : { host: view.association })), setWritable(view.writable), setLoaded(!0);
|
|
2447
2473
|
}, load = async () => {
|
|
2448
2474
|
let [view, status] = await Promise.all([
|
|
2449
2475
|
props.control("settings.get"),
|
|
@@ -2504,17 +2530,6 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2504
2530
|
} finally {
|
|
2505
2531
|
setBusy(!1);
|
|
2506
2532
|
}
|
|
2507
|
-
}, setCodexRemote = async (enabled) => {
|
|
2508
|
-
let previous = codexEnabled;
|
|
2509
|
-
setCodexEnabled(enabled), setCodexBusy(!0), setError(void 0), setNotice(void 0);
|
|
2510
|
-
try {
|
|
2511
|
-
let view = await props.control("settings.codex.set", { enabled });
|
|
2512
|
-
applyView(view), setNotice({ key: "codexSaved" });
|
|
2513
|
-
} catch (reason) {
|
|
2514
|
-
setCodexEnabled(previous), setError(messageOf(reason));
|
|
2515
|
-
} finally {
|
|
2516
|
-
setCodexBusy(!1);
|
|
2517
|
-
}
|
|
2518
2533
|
}, setTerminalRemote = async (enabled) => {
|
|
2519
2534
|
let previous = terminalEnabled, portsDraft = previewPorts;
|
|
2520
2535
|
setTerminalEnabled(enabled), setTerminalBusy(!0), setError(void 0), setNotice(void 0);
|
|
@@ -2537,20 +2552,18 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2537
2552
|
setPortsBusy(!1);
|
|
2538
2553
|
}
|
|
2539
2554
|
}, checkAcp = async (backend) => {
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2555
|
+
if (!acpChecking[backend]) {
|
|
2556
|
+
setAcpChecking((current) => ({ ...current, [backend]: !0 })), setAcpCheckResults((current) => ({ ...current, [backend]: void 0 })), setError(void 0);
|
|
2557
|
+
try {
|
|
2558
|
+
let view = await props.control("settings.get");
|
|
2559
|
+
applyView(view);
|
|
2560
|
+
let available = view.acpAvailability?.[backend] === !0;
|
|
2561
|
+
!available && view.writable && view.config.acp?.backends?.some((item) => item.id === backend && item.enabled !== !1) && applyView(await props.control("settings.acp.set", { backend, enabled: !1 })), setAcpCheckResults((current) => ({ ...current, [backend]: available })), setNotice({ key: available ? "acpAvailable" : "acpUnavailable" }), window.setTimeout(() => setAcpCheckResults((current) => ({ ...current, [backend]: void 0 })), 5e3);
|
|
2562
|
+
} catch (reason) {
|
|
2563
|
+
setError(messageOf(reason));
|
|
2564
|
+
} finally {
|
|
2565
|
+
setAcpChecking((current) => ({ ...current, [backend]: !1 }));
|
|
2548
2566
|
}
|
|
2549
|
-
setAcpCheckResults((current) => ({ ...current, [backend]: available })), setNotice({ key: available ? "acpAvailable" : "acpUnavailable" }), window.setTimeout(() => setAcpCheckResults((current) => ({ ...current, [backend]: void 0 })), 5e3);
|
|
2550
|
-
} catch (reason) {
|
|
2551
|
-
setError(messageOf(reason));
|
|
2552
|
-
} finally {
|
|
2553
|
-
setAcpChecking((current) => ({ ...current, [backend]: !1 }));
|
|
2554
2567
|
}
|
|
2555
2568
|
}, addAcp = async () => {
|
|
2556
2569
|
setBusy(!0), setError(void 0);
|
|
@@ -2622,23 +2635,6 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2622
2635
|
),
|
|
2623
2636
|
React.createElement("small", null, t("previewPortsHint"))
|
|
2624
2637
|
)
|
|
2625
|
-
), codexSetting = React.createElement(
|
|
2626
|
-
"div",
|
|
2627
|
-
{ className: "dshRemoteAuthorizationSetting" },
|
|
2628
|
-
React.createElement(
|
|
2629
|
-
"div",
|
|
2630
|
-
null,
|
|
2631
|
-
React.createElement("strong", null, t("codexRemote")),
|
|
2632
|
-
React.createElement("p", null, t("codexRemoteHint"))
|
|
2633
|
-
),
|
|
2634
|
-
React.createElement("input", {
|
|
2635
|
-
type: "checkbox",
|
|
2636
|
-
role: "switch",
|
|
2637
|
-
disabled: busy || codexBusy || !writable,
|
|
2638
|
-
"aria-label": t("codexRemote"),
|
|
2639
|
-
checked: codexEnabled,
|
|
2640
|
-
onChange: (event) => void setCodexRemote(event.target.checked)
|
|
2641
|
-
})
|
|
2642
2638
|
), acpSetting = React.createElement(
|
|
2643
2639
|
"details",
|
|
2644
2640
|
{ className: "dshRemoteAuthorizationSetting dshRemoteAcpSetting" },
|
|
@@ -2648,8 +2644,13 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2648
2644
|
React.createElement(
|
|
2649
2645
|
"div",
|
|
2650
2646
|
{ className: "dshRemoteAcpSummaryText" },
|
|
2651
|
-
React.createElement("strong", null, "
|
|
2652
|
-
React.createElement("p", null, t("acpHint")
|
|
2647
|
+
React.createElement("strong", null, t("agentBackends")),
|
|
2648
|
+
React.createElement("p", null, t("acpHint"), React.createElement("a", {
|
|
2649
|
+
href: "https://github.com/liguobao/ds-harness-remote/blob/feat/cursor-remote/docs/acp-remote.md",
|
|
2650
|
+
target: "_blank",
|
|
2651
|
+
rel: "noopener noreferrer",
|
|
2652
|
+
onClick: (event) => event.stopPropagation()
|
|
2653
|
+
}, t("acpDocumentation")))
|
|
2653
2654
|
)
|
|
2654
2655
|
),
|
|
2655
2656
|
React.createElement(
|
|
@@ -2658,7 +2659,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2658
2659
|
acpBackends.map((item) => React.createElement(
|
|
2659
2660
|
"div",
|
|
2660
2661
|
{ key: item.id, className: "dshRemoteAuthorizationSetting" },
|
|
2661
|
-
React.createElement("
|
|
2662
|
+
React.createElement("div", null, React.createElement("strong", null, item.id === "codex" ? "CodeX" : item.id === "cursor" ? "Cursor" : item.id === "antigravity" ? "AGY" : item.id), null),
|
|
2662
2663
|
React.createElement(
|
|
2663
2664
|
"span",
|
|
2664
2665
|
{ className: "dshRemoteAcpCheckCell" },
|
|
@@ -2670,14 +2671,15 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2670
2671
|
acpChecking[item.id] ? t("checkingAcp") : acpCheckResults[item.id] === void 0 ? t("checkAcp") : t(acpCheckResults[item.id] ? "acpCheckPassed" : "acpCheckFailed")
|
|
2671
2672
|
)
|
|
2672
2673
|
),
|
|
2673
|
-
["codex", "cursor", "
|
|
2674
|
+
["codex", "cursor", "antigravity"].includes(item.id) ? null : React.createElement("a", { href: `#remove-acp-${item.id}`, className: "dshRemoteAcpRemoveLink", onClick: (event) => {
|
|
2674
2675
|
event.preventDefault(), removeAcp(item.id);
|
|
2675
2676
|
} }, t("removeAcp")),
|
|
2676
2677
|
React.createElement("input", {
|
|
2677
2678
|
type: "checkbox",
|
|
2678
2679
|
role: "switch",
|
|
2679
|
-
checked: item.enabled && acpAvailability[item.id] === !0,
|
|
2680
|
-
|
|
2680
|
+
checked: settingsView?.config.acp?.enabled === !0 && item.enabled && acpAvailability[item.id] === !0,
|
|
2681
|
+
"aria-label": item.id,
|
|
2682
|
+
disabled: busy || !writable || acpChecking[item.id] === !0 || acpAvailability[item.id] !== !0,
|
|
2681
2683
|
onChange: (event) => void props.control("settings.acp.set", { backend: item.id, enabled: event.target.checked }).then((view) => {
|
|
2682
2684
|
applyView(view), setAcpBackends((view.config.acp?.backends ?? []).map((v) => ({ id: v.id, enabled: v.enabled !== !1 })));
|
|
2683
2685
|
}).catch((reason) => setError(messageOf(reason)))
|
|
@@ -2773,7 +2775,6 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2773
2775
|
React.createElement("p", null, t("serverUrlHint"))
|
|
2774
2776
|
),
|
|
2775
2777
|
developmentSetting,
|
|
2776
|
-
codexSetting,
|
|
2777
2778
|
acpSetting,
|
|
2778
2779
|
React.createElement(
|
|
2779
2780
|
"div",
|
|
@@ -2877,7 +2878,6 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2877
2878
|
React.createElement("p", null, t("serverUrlHint"))
|
|
2878
2879
|
),
|
|
2879
2880
|
developmentSetting,
|
|
2880
|
-
codexSetting,
|
|
2881
2881
|
acpSetting,
|
|
2882
2882
|
React.createElement("p", { className: "dshRemoteSettingsState" }, t("authorizeFromRemote")),
|
|
2883
2883
|
writable ? null : React.createElement("p", { className: "dshRemoteError" }, t("readOnly")),
|
|
@@ -2896,7 +2896,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2896
2896
|
);
|
|
2897
2897
|
}
|
|
2898
2898
|
function RemoteWorkspaceAction(props) {
|
|
2899
|
-
let { t } = props, [open, setOpen] = React.useState(!1), [status, setStatus] = React.useState(void 0), [devices, setDevices] = React.useState([]), [selectedHost, setSelectedHost] = React.useState(void 0), [connectingHost, setConnectingHost] = React.useState(void 0), [workspaces, setWorkspaces] = React.useState([]), [codexWorkspaces, setCodexWorkspaces] = React.useState([]), [workspaceBackend, setWorkspaceBackend] = React.useState("harness"), [codexWorkspaceId, setCodexWorkspaceId] = React.useState(void 0), [directory, setDirectory] = React.useState(void 0), [path, setPath] = React.useState(""), [addingWorkspace, setAddingWorkspace] = React.useState(!1), [showAllWorkspaces, setShowAllWorkspaces] = React.useState(!1), [showAllCodexWorkspaces, setShowAllCodexWorkspaces] = React.useState(!1), [devicesOpen, setDevicesOpen] = React.useState(!1), workspaceListId = "dsh-remote-workspace-list", codexWorkspaceHeadingId = "dsh-remote-codex-workspace-heading", codexWorkspaceListId = "dsh-remote-codex-workspace-list", [busy, setBusy] = React.useState(!1), [needsAuthorization, setNeedsAuthorization] = React.useState(!1), [email, setEmail] = React.useState(""), [password, setPassword] = React.useState(""), [loginServerUrl, setLoginServerUrl] = React.useState("https://dsh.r2049.cn"), [loginMethod, setLoginMethod] = React.useState(props.preferredQrProvider), [loginMethodManuallySelected, setLoginMethodManuallySelected] = React.useState(!1), [qrSession, setQrSession] = React.useState(void 0), [qrImage, setQrImage] = React.useState(void 0), [qrExpired, setQrExpired] = React.useState(!1), [progress, setProgress] = React.useState(void 0), progressRun = React.useRef(0), qrFlowRun = React.useRef(0), [notice, setNotice] = React.useState(void 0), [error, setError] = React.useState(void 0);
|
|
2899
|
+
let { t } = props, [open, setOpen] = React.useState(!1), [status, setStatus] = React.useState(void 0), [devices, setDevices] = React.useState([]), [selectedHost, setSelectedHost] = React.useState(void 0), [connectingHost, setConnectingHost] = React.useState(void 0), [workspaces, setWorkspaces] = React.useState([]), [codexWorkspaces, setCodexWorkspaces] = React.useState([]), [cursorWorkspaces, setCursorWorkspaces] = React.useState([]), [antigravityWorkspaces, setAntigravityWorkspaces] = React.useState([]), [workspaceBackend, setWorkspaceBackend] = React.useState("harness"), [codexWorkspaceId, setCodexWorkspaceId] = React.useState(void 0), [cursorWorkspaceId, setCursorWorkspaceId] = React.useState(void 0), [antigravityWorkspaceId, setAntigravityWorkspaceId] = React.useState(void 0), [directory, setDirectory] = React.useState(void 0), [path, setPath] = React.useState(""), [addingWorkspace, setAddingWorkspace] = React.useState(!1), [showAllWorkspaces, setShowAllWorkspaces] = React.useState(!1), [showAllCodexWorkspaces, setShowAllCodexWorkspaces] = React.useState(!1), [devicesOpen, setDevicesOpen] = React.useState(!1), [showAllCursorWorkspaces, setShowAllCursorWorkspaces] = React.useState(!1), [showAllAntigravityWorkspaces, setShowAllAntigravityWorkspaces] = React.useState(!1), workspaceListId = "dsh-remote-workspace-list", codexWorkspaceHeadingId = "dsh-remote-codex-workspace-heading", codexWorkspaceListId = "dsh-remote-codex-workspace-list", cursorWorkspaceHeadingId = "dsh-remote-cursor-workspace-heading", cursorWorkspaceListId = "dsh-remote-cursor-workspace-list", antigravityWorkspaceHeadingId = "dsh-remote-antigravity-workspace-heading", antigravityWorkspaceListId = "dsh-remote-antigravity-workspace-list", [busy, setBusy] = React.useState(!1), [needsAuthorization, setNeedsAuthorization] = React.useState(!1), [email, setEmail] = React.useState(""), [password, setPassword] = React.useState(""), [loginServerUrl, setLoginServerUrl] = React.useState("https://dsh.r2049.cn"), [loginMethod, setLoginMethod] = React.useState(props.preferredQrProvider), [loginMethodManuallySelected, setLoginMethodManuallySelected] = React.useState(!1), [qrSession, setQrSession] = React.useState(void 0), [qrImage, setQrImage] = React.useState(void 0), [qrExpired, setQrExpired] = React.useState(!1), [progress, setProgress] = React.useState(void 0), progressRun = React.useRef(0), qrFlowRun = React.useRef(0), [notice, setNotice] = React.useState(void 0), [error, setError] = React.useState(void 0);
|
|
2900
2900
|
React.useEffect(() => {
|
|
2901
2901
|
open || setDevicesOpen(!1);
|
|
2902
2902
|
}, [open]), React.useEffect(() => {
|
|
@@ -2994,7 +2994,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
2994
2994
|
disabled: busy,
|
|
2995
2995
|
onClick: () => selectLoginMethod(provider)
|
|
2996
2996
|
}, t(provider === "github" ? "githubLogin" : "zhihuLogin")), selectHost = async (host) => {
|
|
2997
|
-
setBusy(!0), setError(void 0), setConnectingHost(host), setCodexWorkspaces([]), setShowAllWorkspaces(!1), setShowAllCodexWorkspaces(!1);
|
|
2997
|
+
setBusy(!0), setError(void 0), setConnectingHost(host), setCodexWorkspaces([]), setCursorWorkspaces([]), setAntigravityWorkspaces([]), setShowAllWorkspaces(!1), setShowAllCodexWorkspaces(!1), setShowAllCursorWorkspaces(!1), setShowAllAntigravityWorkspaces(!1);
|
|
2998
2998
|
try {
|
|
2999
2999
|
let result = await runConnectHostProgress(
|
|
3000
3000
|
status?.preferredTransports,
|
|
@@ -3008,13 +3008,23 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3008
3008
|
targetDeviceId: host.deviceId
|
|
3009
3009
|
}), nextCodexWorkspaces = await props.control("codex.workspaces.list", {
|
|
3010
3010
|
targetDeviceId: host.deviceId
|
|
3011
|
+
}).catch(() => []), nextCursorWorkspaces = await props.control("cursor.workspaces.list", {
|
|
3012
|
+
targetDeviceId: host.deviceId
|
|
3013
|
+
}).catch(() => []), nextAntigravityWorkspaces = await props.control("antigravity.workspaces.list", {
|
|
3014
|
+
targetDeviceId: host.deviceId
|
|
3011
3015
|
}).catch(() => []), nextStatus = await props.control("status").catch(() => {
|
|
3012
3016
|
});
|
|
3013
|
-
return nextStatus !== void 0 && setStatus(nextStatus), {
|
|
3017
|
+
return nextStatus !== void 0 && setStatus(nextStatus), {
|
|
3018
|
+
workspaces: nextWorkspaces,
|
|
3019
|
+
codexWorkspaces: nextCodexWorkspaces,
|
|
3020
|
+
cursorWorkspaces: nextCursorWorkspaces,
|
|
3021
|
+
antigravityWorkspaces: nextAntigravityWorkspaces,
|
|
3022
|
+
status: nextStatus
|
|
3023
|
+
};
|
|
3014
3024
|
},
|
|
3015
3025
|
(result2) => connectedProgress(result2.status)
|
|
3016
3026
|
);
|
|
3017
|
-
setWorkspaces(result.workspaces), setCodexWorkspaces(result.codexWorkspaces), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setSelectedHost(host), setPath(""), setAddingWorkspace(!1), setDirectory(void 0);
|
|
3027
|
+
setWorkspaces(result.workspaces), setCodexWorkspaces(result.codexWorkspaces), setCursorWorkspaces(result.cursorWorkspaces), setAntigravityWorkspaces(result.antigravityWorkspaces), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setCursorWorkspaceId(void 0), setAntigravityWorkspaceId(void 0), setSelectedHost(host), setPath(""), setAddingWorkspace(!1), setDirectory(void 0);
|
|
3018
3028
|
} catch (reason) {
|
|
3019
3029
|
setError(messageOf(reason));
|
|
3020
3030
|
} finally {
|
|
@@ -3028,7 +3038,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3028
3038
|
targetDeviceId: selectedHost.deviceId,
|
|
3029
3039
|
...nextPath === void 0 ? {} : { path: nextPath }
|
|
3030
3040
|
});
|
|
3031
|
-
setDirectory(listing), setCodexWorkspaceId(void 0), setPath(listing.path);
|
|
3041
|
+
setDirectory(listing), setCodexWorkspaceId(void 0), setCursorWorkspaceId(void 0), setAntigravityWorkspaceId(void 0), setPath(listing.path);
|
|
3032
3042
|
} catch (reason) {
|
|
3033
3043
|
setError(messageOf(reason));
|
|
3034
3044
|
} finally {
|
|
@@ -3036,25 +3046,29 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3036
3046
|
}
|
|
3037
3047
|
}
|
|
3038
3048
|
}, startAddingWorkspace = (backend) => {
|
|
3039
|
-
setAddingWorkspace(!0), setWorkspaceBackend(backend), setCodexWorkspaceId(void 0), setShowAllWorkspaces(!1), setShowAllCodexWorkspaces(!1), setDirectory(void 0), setPath(""), browseDirectory();
|
|
3049
|
+
setAddingWorkspace(!0), setWorkspaceBackend(backend), setCodexWorkspaceId(void 0), setCursorWorkspaceId(void 0), setAntigravityWorkspaceId(void 0), setShowAllWorkspaces(!1), setShowAllCodexWorkspaces(!1), setShowAllCursorWorkspaces(!1), setShowAllAntigravityWorkspaces(!1), setDirectory(void 0), setPath(""), browseDirectory();
|
|
3040
3050
|
}, cancelAddingWorkspace = () => {
|
|
3041
|
-
setAddingWorkspace(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setDirectory(void 0), setPath("");
|
|
3051
|
+
setAddingWorkspace(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setCursorWorkspaceId(void 0), setAntigravityWorkspaceId(void 0), setDirectory(void 0), setPath("");
|
|
3042
3052
|
}, refreshRemote = async () => {
|
|
3043
3053
|
setBusy(!0), setNotice(void 0), setError(void 0);
|
|
3044
3054
|
try {
|
|
3045
3055
|
let nextStatus = await props.control("status");
|
|
3046
3056
|
if (setStatus(nextStatus), !nextStatus.available) {
|
|
3047
|
-
setDevices([]), setNeedsAuthorization(!1), setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setShowAllWorkspaces(!1), setShowAllCodexWorkspaces(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setPath(""), setAddingWorkspace(!1), setDirectory(void 0);
|
|
3057
|
+
setDevices([]), setNeedsAuthorization(!1), setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setCursorWorkspaces([]), setAntigravityWorkspaces([]), setShowAllWorkspaces(!1), setShowAllCodexWorkspaces(!1), setShowAllCursorWorkspaces(!1), setShowAllAntigravityWorkspaces(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setCursorWorkspaceId(void 0), setAntigravityWorkspaceId(void 0), setPath(""), setAddingWorkspace(!1), setDirectory(void 0);
|
|
3048
3058
|
return;
|
|
3049
3059
|
}
|
|
3050
3060
|
try {
|
|
3051
3061
|
let nextDevices = await props.control("devices");
|
|
3052
3062
|
if (setDevices(nextDevices), setNeedsAuthorization(!1), selectedHost !== void 0) {
|
|
3053
3063
|
let nextSelectedHost = nextDevices.find((device) => device.deviceId === selectedHost.deviceId);
|
|
3054
|
-
nextSelectedHost === void 0 ? (setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setShowAllWorkspaces(!1), setShowAllCodexWorkspaces(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setPath(""), setAddingWorkspace(!1), setDirectory(void 0)) : setSelectedHost(nextSelectedHost)
|
|
3064
|
+
nextSelectedHost === void 0 ? (setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setCursorWorkspaces([]), setAntigravityWorkspaces([]), setShowAllWorkspaces(!1), setShowAllCodexWorkspaces(!1), setShowAllCursorWorkspaces(!1), setShowAllAntigravityWorkspaces(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setCursorWorkspaceId(void 0), setAntigravityWorkspaceId(void 0), setPath(""), setAddingWorkspace(!1), setDirectory(void 0)) : (setSelectedHost(nextSelectedHost), props.control("workspaces.list", { targetDeviceId: nextSelectedHost.deviceId }).then((w) => setWorkspaces(w)).catch(() => {
|
|
3065
|
+
}), props.control("codex.workspaces.list", { targetDeviceId: nextSelectedHost.deviceId }).then((w) => setCodexWorkspaces(w)).catch(() => {
|
|
3066
|
+
}), props.control("cursor.workspaces.list", { targetDeviceId: nextSelectedHost.deviceId }).then((w) => setCursorWorkspaces(w)).catch(() => {
|
|
3067
|
+
}), props.control("antigravity.workspaces.list", { targetDeviceId: nextSelectedHost.deviceId }).then((w) => setAntigravityWorkspaces(w)).catch(() => {
|
|
3068
|
+
}));
|
|
3055
3069
|
}
|
|
3056
3070
|
} catch {
|
|
3057
|
-
setDevices([]), setNeedsAuthorization(!0), setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setShowAllWorkspaces(!1), setShowAllCodexWorkspaces(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setPath(""), setAddingWorkspace(!1), setDirectory(void 0);
|
|
3071
|
+
setDevices([]), setNeedsAuthorization(!0), setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setCursorWorkspaces([]), setAntigravityWorkspaces([]), setShowAllWorkspaces(!1), setShowAllCodexWorkspaces(!1), setShowAllCursorWorkspaces(!1), setShowAllAntigravityWorkspaces(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setCursorWorkspaceId(void 0), setAntigravityWorkspaceId(void 0), setPath(""), setAddingWorkspace(!1), setDirectory(void 0);
|
|
3058
3072
|
}
|
|
3059
3073
|
} catch (reason) {
|
|
3060
3074
|
setError(messageOf(reason));
|
|
@@ -3062,14 +3076,14 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3062
3076
|
setBusy(!1);
|
|
3063
3077
|
}
|
|
3064
3078
|
}, show = async () => {
|
|
3065
|
-
setShowAllWorkspaces(!1), setShowAllCodexWorkspaces(!1), setOpen(!0), await refreshRemote();
|
|
3079
|
+
setShowAllWorkspaces(!1), setShowAllCodexWorkspaces(!1), setShowAllCursorWorkspaces(!1), setShowAllAntigravityWorkspaces(!1), setOpen(!0), await refreshRemote();
|
|
3066
3080
|
};
|
|
3067
3081
|
React.useEffect(() => {
|
|
3068
3082
|
if (!(!open || selectedHost !== void 0))
|
|
3069
3083
|
return props.statusFeed.subscribe(setStatus);
|
|
3070
3084
|
}, [open, selectedHost]);
|
|
3071
3085
|
let chooseAnotherHost = () => {
|
|
3072
|
-
setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setShowAllWorkspaces(!1), setShowAllCodexWorkspaces(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setDirectory(void 0), setPath(""), setAddingWorkspace(!1), setError(void 0);
|
|
3086
|
+
setSelectedHost(void 0), setWorkspaces([]), setCodexWorkspaces([]), setCursorWorkspaces([]), setAntigravityWorkspaces([]), setShowAllWorkspaces(!1), setShowAllCodexWorkspaces(!1), setShowAllCursorWorkspaces(!1), setShowAllAntigravityWorkspaces(!1), setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setCursorWorkspaceId(void 0), setAntigravityWorkspaceId(void 0), setDirectory(void 0), setPath(""), setAddingWorkspace(!1), setError(void 0);
|
|
3073
3087
|
}, signInClient = async () => {
|
|
3074
3088
|
if (!(email.trim() === "" || password === "" || loginServerUrl.trim() === "")) {
|
|
3075
3089
|
setBusy(!0), setError(void 0);
|
|
@@ -3112,8 +3126,8 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3112
3126
|
setBusy(!1);
|
|
3113
3127
|
}
|
|
3114
3128
|
}, openWorkspace = async (selection) => {
|
|
3115
|
-
let targetBackend = selection?.backend ?? workspaceBackend, targetPath = (selection?.path ?? path).trim(), targetCodexWorkspaceId = selection?.backend === "codex" ? selection.workspaceId : selection === void 0 ? codexWorkspaceId : void 0, createWorkspace = selection === void 0 && addingWorkspace;
|
|
3116
|
-
if (!(selectedHost === void 0 || targetPath === "" || !createWorkspace && targetBackend === "codex" && targetCodexWorkspaceId === void 0)) {
|
|
3129
|
+
let targetBackend = selection?.backend ?? workspaceBackend, targetPath = (selection?.path ?? path).trim(), targetCodexWorkspaceId = selection?.backend === "codex" ? selection.workspaceId : selection === void 0 ? codexWorkspaceId : void 0, targetCursorWorkspaceId = selection?.backend === "cursor" ? selection.workspaceId : selection === void 0 ? cursorWorkspaceId : void 0, targetAntigravityWorkspaceId = selection?.backend === "antigravity" ? selection.workspaceId : selection === void 0 ? antigravityWorkspaceId : void 0, createWorkspace = selection === void 0 && addingWorkspace;
|
|
3130
|
+
if (!(selectedHost === void 0 || targetPath === "" || !createWorkspace && targetBackend === "codex" && targetCodexWorkspaceId === void 0 || !createWorkspace && targetBackend === "cursor" && targetCursorWorkspaceId === void 0 && targetPath === "" || !createWorkspace && targetBackend === "antigravity" && targetAntigravityWorkspaceId === void 0 && targetPath === "")) {
|
|
3117
3131
|
setBusy(!0), setError(void 0);
|
|
3118
3132
|
try {
|
|
3119
3133
|
let nextStatus = await (targetBackend === "codex" ? createWorkspace ? props.control("codex.workspace.create", {
|
|
@@ -3122,6 +3136,18 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3122
3136
|
}) : props.control("codex.workspace.open", {
|
|
3123
3137
|
targetDeviceId: selectedHost.deviceId,
|
|
3124
3138
|
workspaceId: targetCodexWorkspaceId
|
|
3139
|
+
}) : targetBackend === "cursor" ? createWorkspace || targetCursorWorkspaceId === void 0 ? props.control("cursor.workspace.create", {
|
|
3140
|
+
targetDeviceId: selectedHost.deviceId,
|
|
3141
|
+
path: targetPath
|
|
3142
|
+
}) : props.control("cursor.workspace.open", {
|
|
3143
|
+
targetDeviceId: selectedHost.deviceId,
|
|
3144
|
+
workspaceId: targetCursorWorkspaceId
|
|
3145
|
+
}) : targetBackend === "antigravity" ? createWorkspace || targetAntigravityWorkspaceId === void 0 ? props.control("antigravity.workspace.create", {
|
|
3146
|
+
targetDeviceId: selectedHost.deviceId,
|
|
3147
|
+
path: targetPath
|
|
3148
|
+
}) : props.control("antigravity.workspace.open", {
|
|
3149
|
+
targetDeviceId: selectedHost.deviceId,
|
|
3150
|
+
workspaceId: targetAntigravityWorkspaceId
|
|
3125
3151
|
}) : props.control("workspace.open", {
|
|
3126
3152
|
targetDeviceId: selectedHost.deviceId,
|
|
3127
3153
|
path: targetPath
|
|
@@ -3131,7 +3157,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3131
3157
|
setError(messageOf(reason)), setBusy(!1);
|
|
3132
3158
|
}
|
|
3133
3159
|
}
|
|
3134
|
-
}, remoteLabel = status?.mode === "remote" ? t("activeRemote", { name: status.target?.name ?? t("host") }) : t("remoteEntry"), visibleWorkspaces = showAllWorkspaces ? workspaces : workspaces.slice(0, 3), visibleCodexWorkspaces = showAllCodexWorkspaces ? codexWorkspaces : codexWorkspaces.slice(0, 3), codexAvailable = status?.remoteFeatures?.codex === !0, selectedHostDetails = selectedHost === void 0 ? void 0 : [
|
|
3160
|
+
}, remoteLabel = status?.mode === "remote" ? t("activeRemote", { name: status.target?.name ?? t("host") }) : t("remoteEntry"), visibleWorkspaces = showAllWorkspaces ? workspaces : workspaces.slice(0, 3), visibleCodexWorkspaces = showAllCodexWorkspaces ? codexWorkspaces : codexWorkspaces.slice(0, 3), visibleCursorWorkspaces = showAllCursorWorkspaces ? cursorWorkspaces : cursorWorkspaces.slice(0, 3), visibleAntigravityWorkspaces = showAllAntigravityWorkspaces ? antigravityWorkspaces : antigravityWorkspaces.slice(0, 3), codexAvailable = status?.remoteFeatures?.codex === !0, cursorAvailable = status?.remoteFeatures?.cursor === !0, antigravityAvailable = status?.remoteFeatures?.antigravity === !0, selectedHostDetails = selectedHost === void 0 ? void 0 : [
|
|
3135
3161
|
formatPlatform(selectedHost.platform),
|
|
3136
3162
|
selectedHost.harnessVersion === void 0 ? void 0 : t("harnessVersion", { version: selectedHost.harnessVersion }),
|
|
3137
3163
|
selectedHost.clientVersion === void 0 ? void 0 : t("pluginVersion", { version: selectedHost.clientVersion })
|
|
@@ -3467,7 +3493,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3467
3493
|
React.createElement(
|
|
3468
3494
|
"div",
|
|
3469
3495
|
{ className: "dshRemoteSectionHeading dshRemoteWorkspaceHeading" },
|
|
3470
|
-
React.createElement("strong", null, t(addingWorkspace ? workspaceBackend === "codex" ? "addCodexWorkspace" : "addRemoteWorkspace" : "existingWorkspaces")),
|
|
3496
|
+
React.createElement("strong", null, t(addingWorkspace ? workspaceBackend === "codex" ? "addCodexWorkspace" : workspaceBackend === "cursor" ? "addCursorWorkspace" : workspaceBackend === "antigravity" ? "addAntigravityWorkspace" : "addRemoteWorkspace" : "existingWorkspaces")),
|
|
3471
3497
|
addingWorkspace ? React.createElement("button", {
|
|
3472
3498
|
type: "button",
|
|
3473
3499
|
className: "dshRemoteCancelWorkspace",
|
|
@@ -3529,7 +3555,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3529
3555
|
className: workspaceBackend === "harness" && path === workspace.path ? "isSelected" : "",
|
|
3530
3556
|
"aria-pressed": workspaceBackend === "harness" && path === workspace.path,
|
|
3531
3557
|
onClick: () => {
|
|
3532
|
-
setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setPath(workspace.path);
|
|
3558
|
+
setWorkspaceBackend("harness"), setCodexWorkspaceId(void 0), setCursorWorkspaceId(void 0), setPath(workspace.path);
|
|
3533
3559
|
},
|
|
3534
3560
|
onDoubleClick: () => void openWorkspace({ backend: "harness", path: workspace.path })
|
|
3535
3561
|
},
|
|
@@ -3547,7 +3573,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3547
3573
|
}, React.createElement("span", { "aria-hidden": !0 }, "\u2026"))
|
|
3548
3574
|
)
|
|
3549
3575
|
),
|
|
3550
|
-
|
|
3576
|
+
codexAvailable ? React.createElement(
|
|
3551
3577
|
"section",
|
|
3552
3578
|
{ className: "dshRemoteCodexWorkspaceGroup" },
|
|
3553
3579
|
React.createElement(
|
|
@@ -3588,7 +3614,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3588
3614
|
className: workspaceBackend === "codex" && codexWorkspaceId === workspace.workspaceId ? "isSelected" : "",
|
|
3589
3615
|
"aria-pressed": workspaceBackend === "codex" && codexWorkspaceId === workspace.workspaceId,
|
|
3590
3616
|
onClick: () => {
|
|
3591
|
-
setWorkspaceBackend("codex"), setCodexWorkspaceId(workspace.workspaceId), setPath(workspace.path);
|
|
3617
|
+
setWorkspaceBackend("codex"), setCodexWorkspaceId(workspace.workspaceId), setCursorWorkspaceId(void 0), setPath(workspace.path);
|
|
3592
3618
|
},
|
|
3593
3619
|
onDoubleClick: () => void openWorkspace({
|
|
3594
3620
|
backend: "codex",
|
|
@@ -3608,7 +3634,131 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3608
3634
|
"aria-label": t("showAllCodexWorkspaces"),
|
|
3609
3635
|
onClick: () => setShowAllCodexWorkspaces(!0)
|
|
3610
3636
|
}, React.createElement("span", { "aria-hidden": !0 }, "\u2026"))
|
|
3611
|
-
)
|
|
3637
|
+
) : null,
|
|
3638
|
+
cursorAvailable ? React.createElement(
|
|
3639
|
+
"section",
|
|
3640
|
+
{ className: "dshRemoteCodexWorkspaceGroup" },
|
|
3641
|
+
React.createElement(
|
|
3642
|
+
"div",
|
|
3643
|
+
{
|
|
3644
|
+
id: cursorWorkspaceHeadingId,
|
|
3645
|
+
className: "dshRemoteWorkspaceSourceHeading"
|
|
3646
|
+
},
|
|
3647
|
+
React.createElement(
|
|
3648
|
+
"span",
|
|
3649
|
+
{ className: "dshRemoteWorkspaceSourceText" },
|
|
3650
|
+
React.createElement("strong", null, t("cursorVirtualWorkspace"))
|
|
3651
|
+
),
|
|
3652
|
+
cursorAvailable ? React.createElement("button", {
|
|
3653
|
+
type: "button",
|
|
3654
|
+
className: "dshRemoteAddWorkspace",
|
|
3655
|
+
disabled: busy,
|
|
3656
|
+
title: t("addCursorWorkspace"),
|
|
3657
|
+
"aria-label": t("addCursorWorkspace"),
|
|
3658
|
+
onClick: () => startAddingWorkspace("cursor")
|
|
3659
|
+
}, React.createElement("svg", {
|
|
3660
|
+
className: "dshRemoteAddWorkspaceIcon",
|
|
3661
|
+
viewBox: "0 0 16 16",
|
|
3662
|
+
"aria-hidden": !0,
|
|
3663
|
+
focusable: !1
|
|
3664
|
+
}, React.createElement("path", { d: "M8 3v10M3 8h10", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }))) : null
|
|
3665
|
+
),
|
|
3666
|
+
React.createElement("div", {
|
|
3667
|
+
id: cursorWorkspaceListId,
|
|
3668
|
+
className: "dshRemoteDirectoryList dshRemoteCodexWorkspaceList",
|
|
3669
|
+
"aria-labelledby": cursorWorkspaceHeadingId
|
|
3670
|
+
}, visibleCursorWorkspaces.length === 0 ? React.createElement("p", null, t("noCursorWorkspaces")) : visibleCursorWorkspaces.map((workspace) => React.createElement(
|
|
3671
|
+
"button",
|
|
3672
|
+
{
|
|
3673
|
+
type: "button",
|
|
3674
|
+
key: workspace.workspaceId,
|
|
3675
|
+
disabled: busy,
|
|
3676
|
+
className: workspaceBackend === "cursor" && cursorWorkspaceId === workspace.workspaceId ? "isSelected" : "",
|
|
3677
|
+
"aria-pressed": workspaceBackend === "cursor" && cursorWorkspaceId === workspace.workspaceId,
|
|
3678
|
+
onClick: () => {
|
|
3679
|
+
setWorkspaceBackend("cursor"), setCursorWorkspaceId(workspace.workspaceId), setCodexWorkspaceId(void 0), setAntigravityWorkspaceId(void 0), setPath(workspace.path);
|
|
3680
|
+
},
|
|
3681
|
+
onDoubleClick: () => void openWorkspace({
|
|
3682
|
+
backend: "cursor",
|
|
3683
|
+
path: workspace.path,
|
|
3684
|
+
workspaceId: workspace.workspaceId
|
|
3685
|
+
})
|
|
3686
|
+
},
|
|
3687
|
+
React.createElement("img", { className: "dshRemoteWorkspaceIcon", src: deepSeekWorkspaceIcon, alt: "", "aria-hidden": !0 }),
|
|
3688
|
+
React.createElement("span", null, workspace.title),
|
|
3689
|
+
React.createElement("small", null, `${workspace.path} \xB7 ${workspace.sessionCount}`)
|
|
3690
|
+
))),
|
|
3691
|
+
cursorWorkspaces.length <= 3 || showAllCursorWorkspaces ? null : React.createElement("button", {
|
|
3692
|
+
type: "button",
|
|
3693
|
+
className: "dshRemoteWorkspaceMore",
|
|
3694
|
+
disabled: busy,
|
|
3695
|
+
"aria-controls": cursorWorkspaceListId,
|
|
3696
|
+
"aria-label": t("showAllCursorWorkspaces"),
|
|
3697
|
+
onClick: () => setShowAllCursorWorkspaces(!0)
|
|
3698
|
+
}, React.createElement("span", { "aria-hidden": !0 }, "\u2026"))
|
|
3699
|
+
) : null,
|
|
3700
|
+
antigravityAvailable ? React.createElement(
|
|
3701
|
+
"section",
|
|
3702
|
+
{ className: "dshRemoteCodexWorkspaceGroup" },
|
|
3703
|
+
React.createElement(
|
|
3704
|
+
"div",
|
|
3705
|
+
{
|
|
3706
|
+
id: antigravityWorkspaceHeadingId,
|
|
3707
|
+
className: "dshRemoteWorkspaceSourceHeading"
|
|
3708
|
+
},
|
|
3709
|
+
React.createElement(
|
|
3710
|
+
"span",
|
|
3711
|
+
{ className: "dshRemoteWorkspaceSourceText" },
|
|
3712
|
+
React.createElement("strong", null, t("antigravityVirtualWorkspace"))
|
|
3713
|
+
),
|
|
3714
|
+
antigravityAvailable ? React.createElement("button", {
|
|
3715
|
+
type: "button",
|
|
3716
|
+
className: "dshRemoteAddWorkspace",
|
|
3717
|
+
disabled: busy,
|
|
3718
|
+
title: t("addAntigravityWorkspace"),
|
|
3719
|
+
"aria-label": t("addAntigravityWorkspace"),
|
|
3720
|
+
onClick: () => startAddingWorkspace("antigravity")
|
|
3721
|
+
}, React.createElement("svg", {
|
|
3722
|
+
className: "dshRemoteAddWorkspaceIcon",
|
|
3723
|
+
viewBox: "0 0 16 16",
|
|
3724
|
+
"aria-hidden": !0,
|
|
3725
|
+
focusable: !1
|
|
3726
|
+
}, React.createElement("path", { d: "M8 3v10M3 8h10", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }))) : null
|
|
3727
|
+
),
|
|
3728
|
+
React.createElement("div", {
|
|
3729
|
+
id: antigravityWorkspaceListId,
|
|
3730
|
+
className: "dshRemoteDirectoryList dshRemoteCodexWorkspaceList",
|
|
3731
|
+
"aria-labelledby": antigravityWorkspaceHeadingId
|
|
3732
|
+
}, visibleAntigravityWorkspaces.length === 0 ? React.createElement("p", null, t("noAntigravityWorkspaces")) : visibleAntigravityWorkspaces.map((workspace) => React.createElement(
|
|
3733
|
+
"button",
|
|
3734
|
+
{
|
|
3735
|
+
type: "button",
|
|
3736
|
+
key: workspace.workspaceId,
|
|
3737
|
+
disabled: busy,
|
|
3738
|
+
className: workspaceBackend === "antigravity" && antigravityWorkspaceId === workspace.workspaceId ? "isSelected" : "",
|
|
3739
|
+
"aria-pressed": workspaceBackend === "antigravity" && antigravityWorkspaceId === workspace.workspaceId,
|
|
3740
|
+
onClick: () => {
|
|
3741
|
+
setWorkspaceBackend("antigravity"), setAntigravityWorkspaceId(workspace.workspaceId), setCodexWorkspaceId(void 0), setCursorWorkspaceId(void 0), setPath(workspace.path);
|
|
3742
|
+
},
|
|
3743
|
+
onDoubleClick: () => void openWorkspace({
|
|
3744
|
+
backend: "antigravity",
|
|
3745
|
+
path: workspace.path,
|
|
3746
|
+
workspaceId: workspace.workspaceId
|
|
3747
|
+
})
|
|
3748
|
+
},
|
|
3749
|
+
React.createElement("img", { className: "dshRemoteWorkspaceIcon", src: deepSeekWorkspaceIcon, alt: "", "aria-hidden": !0 }),
|
|
3750
|
+
React.createElement("span", null, workspace.title),
|
|
3751
|
+
React.createElement("small", null, `${workspace.path} \xB7 ${workspace.sessionCount}`)
|
|
3752
|
+
))),
|
|
3753
|
+
antigravityWorkspaces.length <= 3 || showAllAntigravityWorkspaces ? null : React.createElement("button", {
|
|
3754
|
+
type: "button",
|
|
3755
|
+
className: "dshRemoteWorkspaceMore",
|
|
3756
|
+
disabled: busy,
|
|
3757
|
+
"aria-controls": antigravityWorkspaceListId,
|
|
3758
|
+
"aria-label": t("showAllAntigravityWorkspaces"),
|
|
3759
|
+
onClick: () => setShowAllAntigravityWorkspaces(!0)
|
|
3760
|
+
}, React.createElement("span", { "aria-hidden": !0 }, "\u2026"))
|
|
3761
|
+
) : null
|
|
3612
3762
|
),
|
|
3613
3763
|
React.createElement(
|
|
3614
3764
|
"footer",
|
|
@@ -3616,7 +3766,7 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3616
3766
|
React.createElement("div", null, React.createElement("span", null, t("currentDirectory")), React.createElement("strong", null, path || "\u2014")),
|
|
3617
3767
|
React.createElement("button", {
|
|
3618
3768
|
type: "button",
|
|
3619
|
-
disabled: busy || path.trim() === "" || !addingWorkspace && workspaceBackend === "codex" && codexWorkspaceId === void 0,
|
|
3769
|
+
disabled: busy || path.trim() === "" || !addingWorkspace && workspaceBackend === "codex" && codexWorkspaceId === void 0 || !addingWorkspace && workspaceBackend === "cursor" && cursorWorkspaceId === void 0 && path === "" || !addingWorkspace && workspaceBackend === "antigravity" && antigravityWorkspaceId === void 0 && path === "",
|
|
3620
3770
|
onClick: () => void openWorkspace()
|
|
3621
3771
|
}, t(busy ? "openingWorkspace" : addingWorkspace ? "confirmAddWorkspace" : "openWorkspace"))
|
|
3622
3772
|
)
|
|
@@ -3789,7 +3939,15 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
3789
3939
|
}, [status?.mode]), React.useEffect(() => (document.documentElement.classList.toggle(
|
|
3790
3940
|
"dshRemoteCodexTargetActive",
|
|
3791
3941
|
status?.mode === "remote" && status.backend === "codex"
|
|
3792
|
-
),
|
|
3942
|
+
), document.documentElement.classList.toggle(
|
|
3943
|
+
"dshRemoteCursorTargetActive",
|
|
3944
|
+
status?.mode === "remote" && status.backend === "cursor"
|
|
3945
|
+
), document.documentElement.classList.toggle(
|
|
3946
|
+
"dshRemoteAntigravityTargetActive",
|
|
3947
|
+
status?.mode === "remote" && status.backend === "antigravity"
|
|
3948
|
+
), () => {
|
|
3949
|
+
document.documentElement.classList.remove("dshRemoteCodexTargetActive"), document.documentElement.classList.remove("dshRemoteCursorTargetActive"), document.documentElement.classList.remove("dshRemoteAntigravityTargetActive");
|
|
3950
|
+
}), [status?.mode, status?.backend]), React.useEffect(() => {
|
|
3793
3951
|
if (!routeOpen) return;
|
|
3794
3952
|
let closeOnEscape = (event) => {
|
|
3795
3953
|
event.key === "Escape" && setRouteOpen(!1);
|
|
@@ -4058,11 +4216,23 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
4058
4216
|
if (disposed || opening || selection === void 0) return;
|
|
4059
4217
|
let pending = selection, workspaceSnapshot = ctx.workspaces.list.getSnapshot();
|
|
4060
4218
|
if (!workspacesReady(workspaceSnapshot) || !workspaceSnapshot.items.some((workspace) => workspace.workspaceId === pending.workspaceId)) return;
|
|
4061
|
-
let sessionSnapshot = ctx.sessions.list.getSnapshot();
|
|
4062
|
-
if (
|
|
4063
|
-
opening = !0, unsubscribeWorkspaces?.(), unsubscribeSessions?.(), unsubscribeWorkspaces = void 0, unsubscribeSessions = void 0
|
|
4064
|
-
|
|
4065
|
-
|
|
4219
|
+
let sessionSnapshot = ctx.sessions.list.getSnapshot(), isVirtualBackend = pending.backend === "codex" || pending.backend === "cursor" || pending.backend === "antigravity";
|
|
4220
|
+
if (isVirtualBackend && pending.sessionId !== void 0 && sessionSnapshot.phase !== "ready") return;
|
|
4221
|
+
opening = !0, unsubscribeWorkspaces?.(), unsubscribeSessions?.(), unsubscribeWorkspaces = void 0, unsubscribeSessions = void 0;
|
|
4222
|
+
let navigation = ctx.get("uiWorkspace"), connectWorkspace = (workspaceId) => navigation !== void 0 ? navigation.connectWorkspace(workspaceId) : ctx.workspaces.connectWorkspace(workspaceId);
|
|
4223
|
+
(isVirtualBackend && pending.sessionId !== void 0 && sessionSnapshot.ids.includes(pending.sessionId) ? Promise.resolve(pending.sessionId) : connectWorkspace(pending.workspaceId)).then(async (sessionId) => {
|
|
4224
|
+
if (!disposed) {
|
|
4225
|
+
if (navigation !== void 0)
|
|
4226
|
+
navigation.openSession(sessionId);
|
|
4227
|
+
else if (typeof ctx.workspaces.openSession == "function")
|
|
4228
|
+
ctx.workspaces.openSession(sessionId);
|
|
4229
|
+
else if (typeof ctx.sessions.open == "function")
|
|
4230
|
+
ctx.sessions.open(sessionId);
|
|
4231
|
+
else
|
|
4232
|
+
throw new Error("No supported Session open API is available.");
|
|
4233
|
+
window.sessionStorage.removeItem(pendingWorkspaceSelectionKey), await control("workspace.selection.consume", pending).catch(() => {
|
|
4234
|
+
});
|
|
4235
|
+
}
|
|
4066
4236
|
}).catch((reason) => {
|
|
4067
4237
|
disposed || console.warn("remote workspace selection failed:", reason);
|
|
4068
4238
|
});
|