alink-cli 0.6.1 → 0.7.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 +14 -48
- package/bin/agentlink.js +159 -454
- package/dist/NodeSqliteClient-BUlNQAY0.mjs +191 -0
- package/dist/NodeSqliteClient-BUlNQAY0.mjs.map +1 -0
- package/dist/bin.mjs +68667 -0
- package/dist/bin.mjs.map +1 -0
- package/dist/daemon.js +438 -441
- package/dist/qr.js +22 -22
- package/package.json +34 -25
package/dist/daemon.js
CHANGED
|
@@ -36,9 +36,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
36
|
mod
|
|
37
37
|
));
|
|
38
38
|
|
|
39
|
-
// node_modules/ws/lib/constants.js
|
|
39
|
+
// ../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/constants.js
|
|
40
40
|
var require_constants = __commonJS({
|
|
41
|
-
"node_modules/ws/lib/constants.js"(exports, module) {
|
|
41
|
+
"../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/constants.js"(exports, module) {
|
|
42
42
|
"use strict";
|
|
43
43
|
var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
|
|
44
44
|
var hasBlob = typeof Blob !== "undefined";
|
|
@@ -59,9 +59,9 @@ var require_constants = __commonJS({
|
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
-
// node_modules/ws/lib/buffer-util.js
|
|
62
|
+
// ../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/buffer-util.js
|
|
63
63
|
var require_buffer_util = __commonJS({
|
|
64
|
-
"node_modules/ws/lib/buffer-util.js"(exports, module) {
|
|
64
|
+
"../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/buffer-util.js"(exports, module) {
|
|
65
65
|
"use strict";
|
|
66
66
|
var { EMPTY_BUFFER } = require_constants();
|
|
67
67
|
var FastBuffer = Buffer[Symbol.species];
|
|
@@ -134,9 +134,9 @@ var require_buffer_util = __commonJS({
|
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
|
|
137
|
-
// node_modules/ws/lib/limiter.js
|
|
137
|
+
// ../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/limiter.js
|
|
138
138
|
var require_limiter = __commonJS({
|
|
139
|
-
"node_modules/ws/lib/limiter.js"(exports, module) {
|
|
139
|
+
"../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/limiter.js"(exports, module) {
|
|
140
140
|
"use strict";
|
|
141
141
|
var kDone = Symbol("kDone");
|
|
142
142
|
var kRun = Symbol("kRun");
|
|
@@ -184,9 +184,9 @@ var require_limiter = __commonJS({
|
|
|
184
184
|
}
|
|
185
185
|
});
|
|
186
186
|
|
|
187
|
-
// node_modules/ws/lib/permessage-deflate.js
|
|
187
|
+
// ../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/permessage-deflate.js
|
|
188
188
|
var require_permessage_deflate = __commonJS({
|
|
189
|
-
"node_modules/ws/lib/permessage-deflate.js"(exports, module) {
|
|
189
|
+
"../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
|
|
190
190
|
"use strict";
|
|
191
191
|
var zlib = __require("zlib");
|
|
192
192
|
var bufferUtil = require_buffer_util();
|
|
@@ -567,9 +567,9 @@ var require_permessage_deflate = __commonJS({
|
|
|
567
567
|
}
|
|
568
568
|
});
|
|
569
569
|
|
|
570
|
-
// node_modules/ws/lib/validation.js
|
|
570
|
+
// ../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/validation.js
|
|
571
571
|
var require_validation = __commonJS({
|
|
572
|
-
"node_modules/ws/lib/validation.js"(exports, module) {
|
|
572
|
+
"../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/validation.js"(exports, module) {
|
|
573
573
|
"use strict";
|
|
574
574
|
var { isUtf8 } = __require("buffer");
|
|
575
575
|
var { hasBlob } = require_constants();
|
|
@@ -768,9 +768,9 @@ var require_validation = __commonJS({
|
|
|
768
768
|
}
|
|
769
769
|
});
|
|
770
770
|
|
|
771
|
-
// node_modules/ws/lib/receiver.js
|
|
771
|
+
// ../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/receiver.js
|
|
772
772
|
var require_receiver = __commonJS({
|
|
773
|
-
"node_modules/ws/lib/receiver.js"(exports, module) {
|
|
773
|
+
"../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/receiver.js"(exports, module) {
|
|
774
774
|
"use strict";
|
|
775
775
|
var { Writable: Writable2 } = __require("stream");
|
|
776
776
|
var PerMessageDeflate2 = require_permessage_deflate();
|
|
@@ -1391,9 +1391,9 @@ var require_receiver = __commonJS({
|
|
|
1391
1391
|
}
|
|
1392
1392
|
});
|
|
1393
1393
|
|
|
1394
|
-
// node_modules/ws/lib/sender.js
|
|
1394
|
+
// ../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/sender.js
|
|
1395
1395
|
var require_sender = __commonJS({
|
|
1396
|
-
"node_modules/ws/lib/sender.js"(exports, module) {
|
|
1396
|
+
"../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/sender.js"(exports, module) {
|
|
1397
1397
|
"use strict";
|
|
1398
1398
|
var { Duplex } = __require("stream");
|
|
1399
1399
|
var { randomFillSync } = __require("crypto");
|
|
@@ -1884,9 +1884,9 @@ var require_sender = __commonJS({
|
|
|
1884
1884
|
}
|
|
1885
1885
|
});
|
|
1886
1886
|
|
|
1887
|
-
// node_modules/ws/lib/event-target.js
|
|
1887
|
+
// ../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/event-target.js
|
|
1888
1888
|
var require_event_target = __commonJS({
|
|
1889
|
-
"node_modules/ws/lib/event-target.js"(exports, module) {
|
|
1889
|
+
"../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/event-target.js"(exports, module) {
|
|
1890
1890
|
"use strict";
|
|
1891
1891
|
var { kForOnEventAttribute, kListener } = require_constants();
|
|
1892
1892
|
var kCode = Symbol("kCode");
|
|
@@ -2113,9 +2113,9 @@ var require_event_target = __commonJS({
|
|
|
2113
2113
|
}
|
|
2114
2114
|
});
|
|
2115
2115
|
|
|
2116
|
-
// node_modules/ws/lib/extension.js
|
|
2116
|
+
// ../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/extension.js
|
|
2117
2117
|
var require_extension = __commonJS({
|
|
2118
|
-
"node_modules/ws/lib/extension.js"(exports, module) {
|
|
2118
|
+
"../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/extension.js"(exports, module) {
|
|
2119
2119
|
"use strict";
|
|
2120
2120
|
var { tokenChars } = require_validation();
|
|
2121
2121
|
function push(dest, name, elem) {
|
|
@@ -2266,9 +2266,9 @@ var require_extension = __commonJS({
|
|
|
2266
2266
|
}
|
|
2267
2267
|
});
|
|
2268
2268
|
|
|
2269
|
-
// node_modules/ws/lib/websocket.js
|
|
2269
|
+
// ../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/websocket.js
|
|
2270
2270
|
var require_websocket = __commonJS({
|
|
2271
|
-
"node_modules/ws/lib/websocket.js"(exports, module) {
|
|
2271
|
+
"../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/websocket.js"(exports, module) {
|
|
2272
2272
|
"use strict";
|
|
2273
2273
|
var EventEmitter = __require("events");
|
|
2274
2274
|
var https = __require("https");
|
|
@@ -3162,9 +3162,9 @@ var require_websocket = __commonJS({
|
|
|
3162
3162
|
}
|
|
3163
3163
|
});
|
|
3164
3164
|
|
|
3165
|
-
// node_modules/ws/lib/stream.js
|
|
3165
|
+
// ../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/stream.js
|
|
3166
3166
|
var require_stream = __commonJS({
|
|
3167
|
-
"node_modules/ws/lib/stream.js"(exports, module) {
|
|
3167
|
+
"../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/stream.js"(exports, module) {
|
|
3168
3168
|
"use strict";
|
|
3169
3169
|
var WebSocket2 = require_websocket();
|
|
3170
3170
|
var { Duplex } = __require("stream");
|
|
@@ -3260,9 +3260,9 @@ var require_stream = __commonJS({
|
|
|
3260
3260
|
}
|
|
3261
3261
|
});
|
|
3262
3262
|
|
|
3263
|
-
// node_modules/ws/lib/subprotocol.js
|
|
3263
|
+
// ../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/subprotocol.js
|
|
3264
3264
|
var require_subprotocol = __commonJS({
|
|
3265
|
-
"node_modules/ws/lib/subprotocol.js"(exports, module) {
|
|
3265
|
+
"../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/subprotocol.js"(exports, module) {
|
|
3266
3266
|
"use strict";
|
|
3267
3267
|
var { tokenChars } = require_validation();
|
|
3268
3268
|
function parse3(header) {
|
|
@@ -3305,9 +3305,9 @@ var require_subprotocol = __commonJS({
|
|
|
3305
3305
|
}
|
|
3306
3306
|
});
|
|
3307
3307
|
|
|
3308
|
-
// node_modules/ws/lib/websocket-server.js
|
|
3308
|
+
// ../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/websocket-server.js
|
|
3309
3309
|
var require_websocket_server = __commonJS({
|
|
3310
|
-
"node_modules/ws/lib/websocket-server.js"(exports, module) {
|
|
3310
|
+
"../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/lib/websocket-server.js"(exports, module) {
|
|
3311
3311
|
"use strict";
|
|
3312
3312
|
var EventEmitter = __require("events");
|
|
3313
3313
|
var http = __require("http");
|
|
@@ -3706,9 +3706,9 @@ var require_websocket_server = __commonJS({
|
|
|
3706
3706
|
}
|
|
3707
3707
|
});
|
|
3708
3708
|
|
|
3709
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRMode.js
|
|
3709
|
+
// ../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRMode.js
|
|
3710
3710
|
var require_QRMode = __commonJS({
|
|
3711
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRMode.js"(exports, module) {
|
|
3711
|
+
"../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRMode.js"(exports, module) {
|
|
3712
3712
|
module.exports = {
|
|
3713
3713
|
MODE_NUMBER: 1 << 0,
|
|
3714
3714
|
MODE_ALPHA_NUM: 1 << 1,
|
|
@@ -3718,9 +3718,9 @@ var require_QRMode = __commonJS({
|
|
|
3718
3718
|
}
|
|
3719
3719
|
});
|
|
3720
3720
|
|
|
3721
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js
|
|
3721
|
+
// ../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js
|
|
3722
3722
|
var require_QR8bitByte = __commonJS({
|
|
3723
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js"(exports, module) {
|
|
3723
|
+
"../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js"(exports, module) {
|
|
3724
3724
|
var QRMode = require_QRMode();
|
|
3725
3725
|
function QR8bitByte(data) {
|
|
3726
3726
|
this.mode = QRMode.MODE_8BIT_BYTE;
|
|
@@ -3740,9 +3740,9 @@ var require_QR8bitByte = __commonJS({
|
|
|
3740
3740
|
}
|
|
3741
3741
|
});
|
|
3742
3742
|
|
|
3743
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRMath.js
|
|
3743
|
+
// ../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRMath.js
|
|
3744
3744
|
var require_QRMath = __commonJS({
|
|
3745
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRMath.js"(exports, module) {
|
|
3745
|
+
"../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRMath.js"(exports, module) {
|
|
3746
3746
|
var QRMath = {
|
|
3747
3747
|
glog: function(n) {
|
|
3748
3748
|
if (n < 1) {
|
|
@@ -3778,9 +3778,9 @@ var require_QRMath = __commonJS({
|
|
|
3778
3778
|
}
|
|
3779
3779
|
});
|
|
3780
3780
|
|
|
3781
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js
|
|
3781
|
+
// ../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js
|
|
3782
3782
|
var require_QRPolynomial = __commonJS({
|
|
3783
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js"(exports, module) {
|
|
3783
|
+
"../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js"(exports, module) {
|
|
3784
3784
|
var QRMath = require_QRMath();
|
|
3785
3785
|
function QRPolynomial(num, shift) {
|
|
3786
3786
|
if (num.length === void 0) {
|
|
@@ -3830,9 +3830,9 @@ var require_QRPolynomial = __commonJS({
|
|
|
3830
3830
|
}
|
|
3831
3831
|
});
|
|
3832
3832
|
|
|
3833
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js
|
|
3833
|
+
// ../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js
|
|
3834
3834
|
var require_QRMaskPattern = __commonJS({
|
|
3835
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js"(exports, module) {
|
|
3835
|
+
"../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js"(exports, module) {
|
|
3836
3836
|
module.exports = {
|
|
3837
3837
|
PATTERN000: 0,
|
|
3838
3838
|
PATTERN001: 1,
|
|
@@ -3846,9 +3846,9 @@ var require_QRMaskPattern = __commonJS({
|
|
|
3846
3846
|
}
|
|
3847
3847
|
});
|
|
3848
3848
|
|
|
3849
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js
|
|
3849
|
+
// ../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js
|
|
3850
3850
|
var require_QRUtil = __commonJS({
|
|
3851
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js"(exports, module) {
|
|
3851
|
+
"../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js"(exports, module) {
|
|
3852
3852
|
var QRMode = require_QRMode();
|
|
3853
3853
|
var QRPolynomial = require_QRPolynomial();
|
|
3854
3854
|
var QRMath = require_QRMath();
|
|
@@ -4070,9 +4070,9 @@ var require_QRUtil = __commonJS({
|
|
|
4070
4070
|
}
|
|
4071
4071
|
});
|
|
4072
4072
|
|
|
4073
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js
|
|
4073
|
+
// ../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js
|
|
4074
4074
|
var require_QRErrorCorrectLevel = __commonJS({
|
|
4075
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js"(exports, module) {
|
|
4075
|
+
"../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js"(exports, module) {
|
|
4076
4076
|
module.exports = {
|
|
4077
4077
|
L: 1,
|
|
4078
4078
|
M: 0,
|
|
@@ -4082,9 +4082,9 @@ var require_QRErrorCorrectLevel = __commonJS({
|
|
|
4082
4082
|
}
|
|
4083
4083
|
});
|
|
4084
4084
|
|
|
4085
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js
|
|
4085
|
+
// ../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js
|
|
4086
4086
|
var require_QRRSBlock = __commonJS({
|
|
4087
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js"(exports, module) {
|
|
4087
|
+
"../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js"(exports, module) {
|
|
4088
4088
|
var QRErrorCorrectLevel = require_QRErrorCorrectLevel();
|
|
4089
4089
|
function QRRSBlock(totalCount, dataCount) {
|
|
4090
4090
|
this.totalCount = totalCount;
|
|
@@ -4331,9 +4331,9 @@ var require_QRRSBlock = __commonJS({
|
|
|
4331
4331
|
}
|
|
4332
4332
|
});
|
|
4333
4333
|
|
|
4334
|
-
// node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js
|
|
4334
|
+
// ../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js
|
|
4335
4335
|
var require_QRBitBuffer = __commonJS({
|
|
4336
|
-
"node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js"(exports, module) {
|
|
4336
|
+
"../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js"(exports, module) {
|
|
4337
4337
|
function QRBitBuffer() {
|
|
4338
4338
|
this.buffer = [];
|
|
4339
4339
|
this.length = 0;
|
|
@@ -4366,9 +4366,9 @@ var require_QRBitBuffer = __commonJS({
|
|
|
4366
4366
|
}
|
|
4367
4367
|
});
|
|
4368
4368
|
|
|
4369
|
-
// node_modules/qrcode-terminal/vendor/QRCode/index.js
|
|
4369
|
+
// ../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/index.js
|
|
4370
4370
|
var require_QRCode = __commonJS({
|
|
4371
|
-
"node_modules/qrcode-terminal/vendor/QRCode/index.js"(exports, module) {
|
|
4371
|
+
"../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/vendor/QRCode/index.js"(exports, module) {
|
|
4372
4372
|
var QR8bitByte = require_QR8bitByte();
|
|
4373
4373
|
var QRUtil = require_QRUtil();
|
|
4374
4374
|
var QRPolynomial = require_QRPolynomial();
|
|
@@ -4686,9 +4686,9 @@ var require_QRCode = __commonJS({
|
|
|
4686
4686
|
}
|
|
4687
4687
|
});
|
|
4688
4688
|
|
|
4689
|
-
// node_modules/qrcode-terminal/lib/main.js
|
|
4689
|
+
// ../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/lib/main.js
|
|
4690
4690
|
var require_main = __commonJS({
|
|
4691
|
-
"node_modules/qrcode-terminal/lib/main.js"(exports, module) {
|
|
4691
|
+
"../../node_modules/.pnpm/qrcode-terminal@0.12.0/node_modules/qrcode-terminal/lib/main.js"(exports, module) {
|
|
4692
4692
|
var QRCode = require_QRCode();
|
|
4693
4693
|
var QRErrorCorrectLevel = require_QRErrorCorrectLevel();
|
|
4694
4694
|
var black = "\x1B[40m \x1B[0m";
|
|
@@ -4783,7 +4783,7 @@ import { homedir as homedir6, hostname as hostname3 } from "node:os";
|
|
|
4783
4783
|
import { join as join6, resolve } from "node:path";
|
|
4784
4784
|
import { parseArgs as nodeParseArgs } from "node:util";
|
|
4785
4785
|
|
|
4786
|
-
// node_modules/ws/wrapper.mjs
|
|
4786
|
+
// ../../node_modules/.pnpm/ws@8.21.2_bufferutil@4.1.0_utf-8-validate@6.0.6/node_modules/ws/wrapper.mjs
|
|
4787
4787
|
var import_stream = __toESM(require_stream(), 1);
|
|
4788
4788
|
var import_extension = __toESM(require_extension(), 1);
|
|
4789
4789
|
var import_permessage_deflate = __toESM(require_permessage_deflate(), 1);
|
|
@@ -4899,6 +4899,7 @@ var claude = {
|
|
|
4899
4899
|
// configured with (settings.json / ~/.claude.json), merged ahead of these.
|
|
4900
4900
|
models: ["opus", "sonnet", "haiku"],
|
|
4901
4901
|
probeModels: async () => probeClaudeModels(),
|
|
4902
|
+
command: "claude",
|
|
4902
4903
|
acp: { bin: "claude-code-acp", args: [] }
|
|
4903
4904
|
};
|
|
4904
4905
|
|
|
@@ -4928,6 +4929,7 @@ var codex = {
|
|
|
4928
4929
|
// (incl. custom/proxy models), merged ahead of these aliases.
|
|
4929
4930
|
models: ["gpt-5-codex", "gpt-5", "o3"],
|
|
4930
4931
|
probeModels: async () => probeCodexModels(),
|
|
4932
|
+
command: "codex",
|
|
4931
4933
|
acp: { bin: "codex-acp", args: [] }
|
|
4932
4934
|
};
|
|
4933
4935
|
|
|
@@ -4962,7 +4964,8 @@ var REGISTRY = [claude, codex, gemini, qwen, kimi];
|
|
|
4962
4964
|
function detectAgents() {
|
|
4963
4965
|
return REGISTRY.flatMap((def) => {
|
|
4964
4966
|
const bin = resolveBin(def.acp.bin);
|
|
4965
|
-
|
|
4967
|
+
const command = def.command ? resolveBin(def.command) : bin;
|
|
4968
|
+
return bin && command ? [{ ...def, bin }] : [];
|
|
4966
4969
|
});
|
|
4967
4970
|
}
|
|
4968
4971
|
function getAgent(id) {
|
|
@@ -4973,7 +4976,7 @@ function getAgent(id) {
|
|
|
4973
4976
|
import { spawn as spawn2 } from "node:child_process";
|
|
4974
4977
|
import { Readable, Writable } from "node:stream";
|
|
4975
4978
|
|
|
4976
|
-
// node_modules/@agentclientprotocol/sdk/dist/schema/index.js
|
|
4979
|
+
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@1.3.0_zod@4.4.3/node_modules/@agentclientprotocol/sdk/dist/schema/index.js
|
|
4977
4980
|
var AGENT_METHODS = {
|
|
4978
4981
|
initialize: "initialize",
|
|
4979
4982
|
authenticate: "authenticate",
|
|
@@ -5025,7 +5028,7 @@ var PROTOCOL_METHODS = {
|
|
|
5025
5028
|
};
|
|
5026
5029
|
var PROTOCOL_VERSION = 1;
|
|
5027
5030
|
|
|
5028
|
-
// node_modules/zod/v4/classic/external.js
|
|
5031
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
5029
5032
|
var external_exports = {};
|
|
5030
5033
|
__export(external_exports, {
|
|
5031
5034
|
$brand: () => $brand,
|
|
@@ -5268,7 +5271,7 @@ __export(external_exports, {
|
|
|
5268
5271
|
xor: () => xor
|
|
5269
5272
|
});
|
|
5270
5273
|
|
|
5271
|
-
// node_modules/zod/v4/core/index.js
|
|
5274
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/index.js
|
|
5272
5275
|
var core_exports2 = {};
|
|
5273
5276
|
__export(core_exports2, {
|
|
5274
5277
|
$ZodAny: () => $ZodAny,
|
|
@@ -5547,7 +5550,7 @@ __export(core_exports2, {
|
|
|
5547
5550
|
version: () => version
|
|
5548
5551
|
});
|
|
5549
5552
|
|
|
5550
|
-
// node_modules/zod/v4/core/core.js
|
|
5553
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
|
|
5551
5554
|
var _a;
|
|
5552
5555
|
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
5553
5556
|
status: "aborted"
|
|
@@ -5624,7 +5627,7 @@ function config(newConfig) {
|
|
|
5624
5627
|
return globalConfig;
|
|
5625
5628
|
}
|
|
5626
5629
|
|
|
5627
|
-
// node_modules/zod/v4/core/util.js
|
|
5630
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
|
|
5628
5631
|
var util_exports = {};
|
|
5629
5632
|
__export(util_exports, {
|
|
5630
5633
|
BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
|
|
@@ -6320,7 +6323,7 @@ var Class = class {
|
|
|
6320
6323
|
}
|
|
6321
6324
|
};
|
|
6322
6325
|
|
|
6323
|
-
// node_modules/zod/v4/core/errors.js
|
|
6326
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
|
|
6324
6327
|
var initializer = (inst, def) => {
|
|
6325
6328
|
inst.name = "$ZodError";
|
|
6326
6329
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -6459,7 +6462,7 @@ function prettifyError(error51) {
|
|
|
6459
6462
|
return lines.join("\n");
|
|
6460
6463
|
}
|
|
6461
6464
|
|
|
6462
|
-
// node_modules/zod/v4/core/parse.js
|
|
6465
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
|
|
6463
6466
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
6464
6467
|
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
6465
6468
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
@@ -6547,7 +6550,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
6547
6550
|
};
|
|
6548
6551
|
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
6549
6552
|
|
|
6550
|
-
// node_modules/zod/v4/core/regexes.js
|
|
6553
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/regexes.js
|
|
6551
6554
|
var regexes_exports = {};
|
|
6552
6555
|
__export(regexes_exports, {
|
|
6553
6556
|
base64: () => base64,
|
|
@@ -6706,7 +6709,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
|
6706
6709
|
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
6707
6710
|
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
6708
6711
|
|
|
6709
|
-
// node_modules/zod/v4/core/checks.js
|
|
6712
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.js
|
|
6710
6713
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
6711
6714
|
var _a3;
|
|
6712
6715
|
inst._zod ?? (inst._zod = {});
|
|
@@ -7254,7 +7257,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
7254
7257
|
};
|
|
7255
7258
|
});
|
|
7256
7259
|
|
|
7257
|
-
// node_modules/zod/v4/core/doc.js
|
|
7260
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/doc.js
|
|
7258
7261
|
var Doc = class {
|
|
7259
7262
|
constructor(args = []) {
|
|
7260
7263
|
this.content = [];
|
|
@@ -7290,14 +7293,14 @@ var Doc = class {
|
|
|
7290
7293
|
}
|
|
7291
7294
|
};
|
|
7292
7295
|
|
|
7293
|
-
// node_modules/zod/v4/core/versions.js
|
|
7296
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.js
|
|
7294
7297
|
var version = {
|
|
7295
7298
|
major: 4,
|
|
7296
7299
|
minor: 4,
|
|
7297
7300
|
patch: 3
|
|
7298
7301
|
};
|
|
7299
7302
|
|
|
7300
|
-
// node_modules/zod/v4/core/schemas.js
|
|
7303
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.js
|
|
7301
7304
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
7302
7305
|
var _a3;
|
|
7303
7306
|
inst ?? (inst = {});
|
|
@@ -9390,7 +9393,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
9390
9393
|
}
|
|
9391
9394
|
}
|
|
9392
9395
|
|
|
9393
|
-
// node_modules/zod/v4/locales/index.js
|
|
9396
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/index.js
|
|
9394
9397
|
var locales_exports = {};
|
|
9395
9398
|
__export(locales_exports, {
|
|
9396
9399
|
ar: () => ar_default,
|
|
@@ -9447,7 +9450,7 @@ __export(locales_exports, {
|
|
|
9447
9450
|
zhTW: () => zh_TW_default
|
|
9448
9451
|
});
|
|
9449
9452
|
|
|
9450
|
-
// node_modules/zod/v4/locales/ar.js
|
|
9453
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ar.js
|
|
9451
9454
|
var error = () => {
|
|
9452
9455
|
const Sizable = {
|
|
9453
9456
|
string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
|
|
@@ -9554,7 +9557,7 @@ function ar_default() {
|
|
|
9554
9557
|
};
|
|
9555
9558
|
}
|
|
9556
9559
|
|
|
9557
|
-
// node_modules/zod/v4/locales/az.js
|
|
9560
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/az.js
|
|
9558
9561
|
var error2 = () => {
|
|
9559
9562
|
const Sizable = {
|
|
9560
9563
|
string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
|
|
@@ -9660,7 +9663,7 @@ function az_default() {
|
|
|
9660
9663
|
};
|
|
9661
9664
|
}
|
|
9662
9665
|
|
|
9663
|
-
// node_modules/zod/v4/locales/be.js
|
|
9666
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/be.js
|
|
9664
9667
|
function getBelarusianPlural(count, one, few, many) {
|
|
9665
9668
|
const absCount = Math.abs(count);
|
|
9666
9669
|
const lastDigit = absCount % 10;
|
|
@@ -9817,7 +9820,7 @@ function be_default() {
|
|
|
9817
9820
|
};
|
|
9818
9821
|
}
|
|
9819
9822
|
|
|
9820
|
-
// node_modules/zod/v4/locales/bg.js
|
|
9823
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/bg.js
|
|
9821
9824
|
var error4 = () => {
|
|
9822
9825
|
const Sizable = {
|
|
9823
9826
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
|
|
@@ -9938,7 +9941,7 @@ function bg_default() {
|
|
|
9938
9941
|
};
|
|
9939
9942
|
}
|
|
9940
9943
|
|
|
9941
|
-
// node_modules/zod/v4/locales/ca.js
|
|
9944
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ca.js
|
|
9942
9945
|
var error5 = () => {
|
|
9943
9946
|
const Sizable = {
|
|
9944
9947
|
string: { unit: "car\xE0cters", verb: "contenir" },
|
|
@@ -10047,7 +10050,7 @@ function ca_default() {
|
|
|
10047
10050
|
};
|
|
10048
10051
|
}
|
|
10049
10052
|
|
|
10050
|
-
// node_modules/zod/v4/locales/cs.js
|
|
10053
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/cs.js
|
|
10051
10054
|
var error6 = () => {
|
|
10052
10055
|
const Sizable = {
|
|
10053
10056
|
string: { unit: "znak\u016F", verb: "m\xEDt" },
|
|
@@ -10159,7 +10162,7 @@ function cs_default() {
|
|
|
10159
10162
|
};
|
|
10160
10163
|
}
|
|
10161
10164
|
|
|
10162
|
-
// node_modules/zod/v4/locales/da.js
|
|
10165
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/da.js
|
|
10163
10166
|
var error7 = () => {
|
|
10164
10167
|
const Sizable = {
|
|
10165
10168
|
string: { unit: "tegn", verb: "havde" },
|
|
@@ -10275,7 +10278,7 @@ function da_default() {
|
|
|
10275
10278
|
};
|
|
10276
10279
|
}
|
|
10277
10280
|
|
|
10278
|
-
// node_modules/zod/v4/locales/de.js
|
|
10281
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/de.js
|
|
10279
10282
|
var error8 = () => {
|
|
10280
10283
|
const Sizable = {
|
|
10281
10284
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
@@ -10384,7 +10387,7 @@ function de_default() {
|
|
|
10384
10387
|
};
|
|
10385
10388
|
}
|
|
10386
10389
|
|
|
10387
|
-
// node_modules/zod/v4/locales/el.js
|
|
10390
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/el.js
|
|
10388
10391
|
var error9 = () => {
|
|
10389
10392
|
const Sizable = {
|
|
10390
10393
|
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
@@ -10494,7 +10497,7 @@ function el_default() {
|
|
|
10494
10497
|
};
|
|
10495
10498
|
}
|
|
10496
10499
|
|
|
10497
|
-
// node_modules/zod/v4/locales/en.js
|
|
10500
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/en.js
|
|
10498
10501
|
var error10 = () => {
|
|
10499
10502
|
const Sizable = {
|
|
10500
10503
|
string: { unit: "characters", verb: "to have" },
|
|
@@ -10607,7 +10610,7 @@ function en_default() {
|
|
|
10607
10610
|
};
|
|
10608
10611
|
}
|
|
10609
10612
|
|
|
10610
|
-
// node_modules/zod/v4/locales/eo.js
|
|
10613
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/eo.js
|
|
10611
10614
|
var error11 = () => {
|
|
10612
10615
|
const Sizable = {
|
|
10613
10616
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
@@ -10717,7 +10720,7 @@ function eo_default() {
|
|
|
10717
10720
|
};
|
|
10718
10721
|
}
|
|
10719
10722
|
|
|
10720
|
-
// node_modules/zod/v4/locales/es.js
|
|
10723
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/es.js
|
|
10721
10724
|
var error12 = () => {
|
|
10722
10725
|
const Sizable = {
|
|
10723
10726
|
string: { unit: "caracteres", verb: "tener" },
|
|
@@ -10850,7 +10853,7 @@ function es_default() {
|
|
|
10850
10853
|
};
|
|
10851
10854
|
}
|
|
10852
10855
|
|
|
10853
|
-
// node_modules/zod/v4/locales/fa.js
|
|
10856
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fa.js
|
|
10854
10857
|
var error13 = () => {
|
|
10855
10858
|
const Sizable = {
|
|
10856
10859
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -10965,7 +10968,7 @@ function fa_default() {
|
|
|
10965
10968
|
};
|
|
10966
10969
|
}
|
|
10967
10970
|
|
|
10968
|
-
// node_modules/zod/v4/locales/fi.js
|
|
10971
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fi.js
|
|
10969
10972
|
var error14 = () => {
|
|
10970
10973
|
const Sizable = {
|
|
10971
10974
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
@@ -11078,7 +11081,7 @@ function fi_default() {
|
|
|
11078
11081
|
};
|
|
11079
11082
|
}
|
|
11080
11083
|
|
|
11081
|
-
// node_modules/zod/v4/locales/fr.js
|
|
11084
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr.js
|
|
11082
11085
|
var error15 = () => {
|
|
11083
11086
|
const Sizable = {
|
|
11084
11087
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
@@ -11204,7 +11207,7 @@ function fr_default() {
|
|
|
11204
11207
|
};
|
|
11205
11208
|
}
|
|
11206
11209
|
|
|
11207
|
-
// node_modules/zod/v4/locales/fr-CA.js
|
|
11210
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr-CA.js
|
|
11208
11211
|
var error16 = () => {
|
|
11209
11212
|
const Sizable = {
|
|
11210
11213
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
@@ -11312,7 +11315,7 @@ function fr_CA_default() {
|
|
|
11312
11315
|
};
|
|
11313
11316
|
}
|
|
11314
11317
|
|
|
11315
|
-
// node_modules/zod/v4/locales/he.js
|
|
11318
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/he.js
|
|
11316
11319
|
var error17 = () => {
|
|
11317
11320
|
const TypeNames = {
|
|
11318
11321
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
@@ -11507,7 +11510,7 @@ function he_default() {
|
|
|
11507
11510
|
};
|
|
11508
11511
|
}
|
|
11509
11512
|
|
|
11510
|
-
// node_modules/zod/v4/locales/hr.js
|
|
11513
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hr.js
|
|
11511
11514
|
var error18 = () => {
|
|
11512
11515
|
const Sizable = {
|
|
11513
11516
|
string: { unit: "znakova", verb: "imati" },
|
|
@@ -11630,7 +11633,7 @@ function hr_default() {
|
|
|
11630
11633
|
};
|
|
11631
11634
|
}
|
|
11632
11635
|
|
|
11633
|
-
// node_modules/zod/v4/locales/hu.js
|
|
11636
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hu.js
|
|
11634
11637
|
var error19 = () => {
|
|
11635
11638
|
const Sizable = {
|
|
11636
11639
|
string: { unit: "karakter", verb: "legyen" },
|
|
@@ -11739,7 +11742,7 @@ function hu_default() {
|
|
|
11739
11742
|
};
|
|
11740
11743
|
}
|
|
11741
11744
|
|
|
11742
|
-
// node_modules/zod/v4/locales/hy.js
|
|
11745
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hy.js
|
|
11743
11746
|
function getArmenianPlural(count, one, many) {
|
|
11744
11747
|
return Math.abs(count) === 1 ? one : many;
|
|
11745
11748
|
}
|
|
@@ -11887,7 +11890,7 @@ function hy_default() {
|
|
|
11887
11890
|
};
|
|
11888
11891
|
}
|
|
11889
11892
|
|
|
11890
|
-
// node_modules/zod/v4/locales/id.js
|
|
11893
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/id.js
|
|
11891
11894
|
var error21 = () => {
|
|
11892
11895
|
const Sizable = {
|
|
11893
11896
|
string: { unit: "karakter", verb: "memiliki" },
|
|
@@ -11994,7 +11997,7 @@ function id_default() {
|
|
|
11994
11997
|
};
|
|
11995
11998
|
}
|
|
11996
11999
|
|
|
11997
|
-
// node_modules/zod/v4/locales/is.js
|
|
12000
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/is.js
|
|
11998
12001
|
var error22 = () => {
|
|
11999
12002
|
const Sizable = {
|
|
12000
12003
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
@@ -12104,7 +12107,7 @@ function is_default() {
|
|
|
12104
12107
|
};
|
|
12105
12108
|
}
|
|
12106
12109
|
|
|
12107
|
-
// node_modules/zod/v4/locales/it.js
|
|
12110
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/it.js
|
|
12108
12111
|
var error23 = () => {
|
|
12109
12112
|
const Sizable = {
|
|
12110
12113
|
string: { unit: "caratteri", verb: "avere" },
|
|
@@ -12213,7 +12216,7 @@ function it_default() {
|
|
|
12213
12216
|
};
|
|
12214
12217
|
}
|
|
12215
12218
|
|
|
12216
|
-
// node_modules/zod/v4/locales/ja.js
|
|
12219
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ja.js
|
|
12217
12220
|
var error24 = () => {
|
|
12218
12221
|
const Sizable = {
|
|
12219
12222
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
@@ -12321,7 +12324,7 @@ function ja_default() {
|
|
|
12321
12324
|
};
|
|
12322
12325
|
}
|
|
12323
12326
|
|
|
12324
|
-
// node_modules/zod/v4/locales/ka.js
|
|
12327
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ka.js
|
|
12325
12328
|
var error25 = () => {
|
|
12326
12329
|
const Sizable = {
|
|
12327
12330
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -12434,7 +12437,7 @@ function ka_default() {
|
|
|
12434
12437
|
};
|
|
12435
12438
|
}
|
|
12436
12439
|
|
|
12437
|
-
// node_modules/zod/v4/locales/km.js
|
|
12440
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/km.js
|
|
12438
12441
|
var error26 = () => {
|
|
12439
12442
|
const Sizable = {
|
|
12440
12443
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -12545,12 +12548,12 @@ function km_default() {
|
|
|
12545
12548
|
};
|
|
12546
12549
|
}
|
|
12547
12550
|
|
|
12548
|
-
// node_modules/zod/v4/locales/kh.js
|
|
12551
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/kh.js
|
|
12549
12552
|
function kh_default() {
|
|
12550
12553
|
return km_default();
|
|
12551
12554
|
}
|
|
12552
12555
|
|
|
12553
|
-
// node_modules/zod/v4/locales/ko.js
|
|
12556
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ko.js
|
|
12554
12557
|
var error27 = () => {
|
|
12555
12558
|
const Sizable = {
|
|
12556
12559
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
@@ -12662,7 +12665,7 @@ function ko_default() {
|
|
|
12662
12665
|
};
|
|
12663
12666
|
}
|
|
12664
12667
|
|
|
12665
|
-
// node_modules/zod/v4/locales/lt.js
|
|
12668
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/lt.js
|
|
12666
12669
|
var capitalizeFirstCharacter = (text) => {
|
|
12667
12670
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
12668
12671
|
};
|
|
@@ -12866,7 +12869,7 @@ function lt_default() {
|
|
|
12866
12869
|
};
|
|
12867
12870
|
}
|
|
12868
12871
|
|
|
12869
|
-
// node_modules/zod/v4/locales/mk.js
|
|
12872
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/mk.js
|
|
12870
12873
|
var error29 = () => {
|
|
12871
12874
|
const Sizable = {
|
|
12872
12875
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -12976,7 +12979,7 @@ function mk_default() {
|
|
|
12976
12979
|
};
|
|
12977
12980
|
}
|
|
12978
12981
|
|
|
12979
|
-
// node_modules/zod/v4/locales/ms.js
|
|
12982
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ms.js
|
|
12980
12983
|
var error30 = () => {
|
|
12981
12984
|
const Sizable = {
|
|
12982
12985
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
@@ -13084,7 +13087,7 @@ function ms_default() {
|
|
|
13084
13087
|
};
|
|
13085
13088
|
}
|
|
13086
13089
|
|
|
13087
|
-
// node_modules/zod/v4/locales/nl.js
|
|
13090
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/nl.js
|
|
13088
13091
|
var error31 = () => {
|
|
13089
13092
|
const Sizable = {
|
|
13090
13093
|
string: { unit: "tekens", verb: "heeft" },
|
|
@@ -13195,7 +13198,7 @@ function nl_default() {
|
|
|
13195
13198
|
};
|
|
13196
13199
|
}
|
|
13197
13200
|
|
|
13198
|
-
// node_modules/zod/v4/locales/no.js
|
|
13201
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/no.js
|
|
13199
13202
|
var error32 = () => {
|
|
13200
13203
|
const Sizable = {
|
|
13201
13204
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
@@ -13304,7 +13307,7 @@ function no_default() {
|
|
|
13304
13307
|
};
|
|
13305
13308
|
}
|
|
13306
13309
|
|
|
13307
|
-
// node_modules/zod/v4/locales/ota.js
|
|
13310
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ota.js
|
|
13308
13311
|
var error33 = () => {
|
|
13309
13312
|
const Sizable = {
|
|
13310
13313
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
@@ -13414,7 +13417,7 @@ function ota_default() {
|
|
|
13414
13417
|
};
|
|
13415
13418
|
}
|
|
13416
13419
|
|
|
13417
|
-
// node_modules/zod/v4/locales/ps.js
|
|
13420
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ps.js
|
|
13418
13421
|
var error34 = () => {
|
|
13419
13422
|
const Sizable = {
|
|
13420
13423
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -13529,7 +13532,7 @@ function ps_default() {
|
|
|
13529
13532
|
};
|
|
13530
13533
|
}
|
|
13531
13534
|
|
|
13532
|
-
// node_modules/zod/v4/locales/pl.js
|
|
13535
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pl.js
|
|
13533
13536
|
var error35 = () => {
|
|
13534
13537
|
const Sizable = {
|
|
13535
13538
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
@@ -13639,7 +13642,7 @@ function pl_default() {
|
|
|
13639
13642
|
};
|
|
13640
13643
|
}
|
|
13641
13644
|
|
|
13642
|
-
// node_modules/zod/v4/locales/pt.js
|
|
13645
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pt.js
|
|
13643
13646
|
var error36 = () => {
|
|
13644
13647
|
const Sizable = {
|
|
13645
13648
|
string: { unit: "caracteres", verb: "ter" },
|
|
@@ -13748,7 +13751,7 @@ function pt_default() {
|
|
|
13748
13751
|
};
|
|
13749
13752
|
}
|
|
13750
13753
|
|
|
13751
|
-
// node_modules/zod/v4/locales/ro.js
|
|
13754
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ro.js
|
|
13752
13755
|
var error37 = () => {
|
|
13753
13756
|
const Sizable = {
|
|
13754
13757
|
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
@@ -13868,7 +13871,7 @@ function ro_default() {
|
|
|
13868
13871
|
};
|
|
13869
13872
|
}
|
|
13870
13873
|
|
|
13871
|
-
// node_modules/zod/v4/locales/ru.js
|
|
13874
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ru.js
|
|
13872
13875
|
function getRussianPlural(count, one, few, many) {
|
|
13873
13876
|
const absCount = Math.abs(count);
|
|
13874
13877
|
const lastDigit = absCount % 10;
|
|
@@ -14025,7 +14028,7 @@ function ru_default() {
|
|
|
14025
14028
|
};
|
|
14026
14029
|
}
|
|
14027
14030
|
|
|
14028
|
-
// node_modules/zod/v4/locales/sl.js
|
|
14031
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sl.js
|
|
14029
14032
|
var error39 = () => {
|
|
14030
14033
|
const Sizable = {
|
|
14031
14034
|
string: { unit: "znakov", verb: "imeti" },
|
|
@@ -14135,7 +14138,7 @@ function sl_default() {
|
|
|
14135
14138
|
};
|
|
14136
14139
|
}
|
|
14137
14140
|
|
|
14138
|
-
// node_modules/zod/v4/locales/sv.js
|
|
14141
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sv.js
|
|
14139
14142
|
var error40 = () => {
|
|
14140
14143
|
const Sizable = {
|
|
14141
14144
|
string: { unit: "tecken", verb: "att ha" },
|
|
@@ -14246,7 +14249,7 @@ function sv_default() {
|
|
|
14246
14249
|
};
|
|
14247
14250
|
}
|
|
14248
14251
|
|
|
14249
|
-
// node_modules/zod/v4/locales/ta.js
|
|
14252
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ta.js
|
|
14250
14253
|
var error41 = () => {
|
|
14251
14254
|
const Sizable = {
|
|
14252
14255
|
string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
@@ -14357,7 +14360,7 @@ function ta_default() {
|
|
|
14357
14360
|
};
|
|
14358
14361
|
}
|
|
14359
14362
|
|
|
14360
|
-
// node_modules/zod/v4/locales/th.js
|
|
14363
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/th.js
|
|
14361
14364
|
var error42 = () => {
|
|
14362
14365
|
const Sizable = {
|
|
14363
14366
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -14468,7 +14471,7 @@ function th_default() {
|
|
|
14468
14471
|
};
|
|
14469
14472
|
}
|
|
14470
14473
|
|
|
14471
|
-
// node_modules/zod/v4/locales/tr.js
|
|
14474
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/tr.js
|
|
14472
14475
|
var error43 = () => {
|
|
14473
14476
|
const Sizable = {
|
|
14474
14477
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
@@ -14574,7 +14577,7 @@ function tr_default() {
|
|
|
14574
14577
|
};
|
|
14575
14578
|
}
|
|
14576
14579
|
|
|
14577
|
-
// node_modules/zod/v4/locales/uk.js
|
|
14580
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uk.js
|
|
14578
14581
|
var error44 = () => {
|
|
14579
14582
|
const Sizable = {
|
|
14580
14583
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -14683,12 +14686,12 @@ function uk_default() {
|
|
|
14683
14686
|
};
|
|
14684
14687
|
}
|
|
14685
14688
|
|
|
14686
|
-
// node_modules/zod/v4/locales/ua.js
|
|
14689
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ua.js
|
|
14687
14690
|
function ua_default() {
|
|
14688
14691
|
return uk_default();
|
|
14689
14692
|
}
|
|
14690
14693
|
|
|
14691
|
-
// node_modules/zod/v4/locales/ur.js
|
|
14694
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ur.js
|
|
14692
14695
|
var error45 = () => {
|
|
14693
14696
|
const Sizable = {
|
|
14694
14697
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -14799,7 +14802,7 @@ function ur_default() {
|
|
|
14799
14802
|
};
|
|
14800
14803
|
}
|
|
14801
14804
|
|
|
14802
|
-
// node_modules/zod/v4/locales/uz.js
|
|
14805
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uz.js
|
|
14803
14806
|
var error46 = () => {
|
|
14804
14807
|
const Sizable = {
|
|
14805
14808
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
@@ -14910,7 +14913,7 @@ function uz_default() {
|
|
|
14910
14913
|
};
|
|
14911
14914
|
}
|
|
14912
14915
|
|
|
14913
|
-
// node_modules/zod/v4/locales/vi.js
|
|
14916
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/vi.js
|
|
14914
14917
|
var error47 = () => {
|
|
14915
14918
|
const Sizable = {
|
|
14916
14919
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
@@ -15019,7 +15022,7 @@ function vi_default() {
|
|
|
15019
15022
|
};
|
|
15020
15023
|
}
|
|
15021
15024
|
|
|
15022
|
-
// node_modules/zod/v4/locales/zh-CN.js
|
|
15025
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-CN.js
|
|
15023
15026
|
var error48 = () => {
|
|
15024
15027
|
const Sizable = {
|
|
15025
15028
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
@@ -15129,7 +15132,7 @@ function zh_CN_default() {
|
|
|
15129
15132
|
};
|
|
15130
15133
|
}
|
|
15131
15134
|
|
|
15132
|
-
// node_modules/zod/v4/locales/zh-TW.js
|
|
15135
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-TW.js
|
|
15133
15136
|
var error49 = () => {
|
|
15134
15137
|
const Sizable = {
|
|
15135
15138
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
@@ -15237,7 +15240,7 @@ function zh_TW_default() {
|
|
|
15237
15240
|
};
|
|
15238
15241
|
}
|
|
15239
15242
|
|
|
15240
|
-
// node_modules/zod/v4/locales/yo.js
|
|
15243
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/yo.js
|
|
15241
15244
|
var error50 = () => {
|
|
15242
15245
|
const Sizable = {
|
|
15243
15246
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
@@ -15345,7 +15348,7 @@ function yo_default() {
|
|
|
15345
15348
|
};
|
|
15346
15349
|
}
|
|
15347
15350
|
|
|
15348
|
-
// node_modules/zod/v4/core/registries.js
|
|
15351
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
|
|
15349
15352
|
var _a2;
|
|
15350
15353
|
var $output = Symbol("ZodOutput");
|
|
15351
15354
|
var $input = Symbol("ZodInput");
|
|
@@ -15395,7 +15398,7 @@ function registry() {
|
|
|
15395
15398
|
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
15396
15399
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
15397
15400
|
|
|
15398
|
-
// node_modules/zod/v4/core/api.js
|
|
15401
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
|
|
15399
15402
|
// @__NO_SIDE_EFFECTS__
|
|
15400
15403
|
function _string(Class2, params) {
|
|
15401
15404
|
return new Class2({
|
|
@@ -16434,7 +16437,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
16434
16437
|
return inst;
|
|
16435
16438
|
}
|
|
16436
16439
|
|
|
16437
|
-
// node_modules/zod/v4/core/to-json-schema.js
|
|
16440
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
|
|
16438
16441
|
function initializeContext(params) {
|
|
16439
16442
|
let target = params?.target ?? "draft-2020-12";
|
|
16440
16443
|
if (target === "draft-4")
|
|
@@ -16793,7 +16796,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
|
|
|
16793
16796
|
return finalize(ctx, schema);
|
|
16794
16797
|
};
|
|
16795
16798
|
|
|
16796
|
-
// node_modules/zod/v4/core/json-schema-processors.js
|
|
16799
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.js
|
|
16797
16800
|
var formatMap = {
|
|
16798
16801
|
guid: "uuid",
|
|
16799
16802
|
url: "uri",
|
|
@@ -17337,7 +17340,7 @@ function toJSONSchema(input, params) {
|
|
|
17337
17340
|
return finalize(ctx, input);
|
|
17338
17341
|
}
|
|
17339
17342
|
|
|
17340
|
-
// node_modules/zod/v4/core/json-schema-generator.js
|
|
17343
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-generator.js
|
|
17341
17344
|
var JSONSchemaGenerator = class {
|
|
17342
17345
|
/** @deprecated Access via ctx instead */
|
|
17343
17346
|
get metadataRegistry() {
|
|
@@ -17412,10 +17415,10 @@ var JSONSchemaGenerator = class {
|
|
|
17412
17415
|
}
|
|
17413
17416
|
};
|
|
17414
17417
|
|
|
17415
|
-
// node_modules/zod/v4/core/json-schema.js
|
|
17418
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema.js
|
|
17416
17419
|
var json_schema_exports = {};
|
|
17417
17420
|
|
|
17418
|
-
// node_modules/zod/v4/classic/schemas.js
|
|
17421
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
|
|
17419
17422
|
var schemas_exports2 = {};
|
|
17420
17423
|
__export(schemas_exports2, {
|
|
17421
17424
|
ZodAny: () => ZodAny,
|
|
@@ -17586,7 +17589,7 @@ __export(schemas_exports2, {
|
|
|
17586
17589
|
xor: () => xor
|
|
17587
17590
|
});
|
|
17588
17591
|
|
|
17589
|
-
// node_modules/zod/v4/classic/checks.js
|
|
17592
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/checks.js
|
|
17590
17593
|
var checks_exports2 = {};
|
|
17591
17594
|
__export(checks_exports2, {
|
|
17592
17595
|
endsWith: () => _endsWith,
|
|
@@ -17620,7 +17623,7 @@ __export(checks_exports2, {
|
|
|
17620
17623
|
uppercase: () => _uppercase
|
|
17621
17624
|
});
|
|
17622
17625
|
|
|
17623
|
-
// node_modules/zod/v4/classic/iso.js
|
|
17626
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/iso.js
|
|
17624
17627
|
var iso_exports = {};
|
|
17625
17628
|
__export(iso_exports, {
|
|
17626
17629
|
ZodISODate: () => ZodISODate,
|
|
@@ -17661,7 +17664,7 @@ function duration2(params) {
|
|
|
17661
17664
|
return _isoDuration(ZodISODuration, params);
|
|
17662
17665
|
}
|
|
17663
17666
|
|
|
17664
|
-
// node_modules/zod/v4/classic/errors.js
|
|
17667
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.js
|
|
17665
17668
|
var initializer2 = (inst, issues) => {
|
|
17666
17669
|
$ZodError.init(inst, issues);
|
|
17667
17670
|
inst.name = "ZodError";
|
|
@@ -17701,7 +17704,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
|
17701
17704
|
Parent: Error
|
|
17702
17705
|
});
|
|
17703
17706
|
|
|
17704
|
-
// node_modules/zod/v4/classic/parse.js
|
|
17707
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.js
|
|
17705
17708
|
var parse2 = /* @__PURE__ */ _parse(ZodRealError);
|
|
17706
17709
|
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
17707
17710
|
var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -17715,7 +17718,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
17715
17718
|
var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
17716
17719
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
17717
17720
|
|
|
17718
|
-
// node_modules/zod/v4/classic/schemas.js
|
|
17721
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
|
|
17719
17722
|
var _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
17720
17723
|
function _installLazyMethods(inst, group, methods2) {
|
|
17721
17724
|
const proto = Object.getPrototypeOf(inst);
|
|
@@ -19005,7 +19008,7 @@ function preprocess(fn, schema) {
|
|
|
19005
19008
|
});
|
|
19006
19009
|
}
|
|
19007
19010
|
|
|
19008
|
-
// node_modules/zod/v4/classic/compat.js
|
|
19011
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/compat.js
|
|
19009
19012
|
var ZodIssueCode = {
|
|
19010
19013
|
invalid_type: "invalid_type",
|
|
19011
19014
|
too_big: "too_big",
|
|
@@ -19031,7 +19034,7 @@ var ZodFirstPartyTypeKind;
|
|
|
19031
19034
|
/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
|
|
19032
19035
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
19033
19036
|
|
|
19034
|
-
// node_modules/zod/v4/classic/from-json-schema.js
|
|
19037
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/from-json-schema.js
|
|
19035
19038
|
var z = {
|
|
19036
19039
|
...schemas_exports2,
|
|
19037
19040
|
...checks_exports2,
|
|
@@ -19511,7 +19514,7 @@ function fromJSONSchema(schema, params) {
|
|
|
19511
19514
|
return convertSchema(normalized, ctx);
|
|
19512
19515
|
}
|
|
19513
19516
|
|
|
19514
|
-
// node_modules/zod/v4/classic/coerce.js
|
|
19517
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/coerce.js
|
|
19515
19518
|
var coerce_exports = {};
|
|
19516
19519
|
__export(coerce_exports, {
|
|
19517
19520
|
bigint: () => bigint3,
|
|
@@ -19536,10 +19539,10 @@ function date4(params) {
|
|
|
19536
19539
|
return _coercedDate(ZodDate, params);
|
|
19537
19540
|
}
|
|
19538
19541
|
|
|
19539
|
-
// node_modules/zod/v4/classic/external.js
|
|
19542
|
+
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
19540
19543
|
config(en_default());
|
|
19541
19544
|
|
|
19542
|
-
// node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.js
|
|
19545
|
+
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@1.3.0_zod@4.4.3/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.js
|
|
19543
19546
|
var skippedItem = Symbol("skippedItem");
|
|
19544
19547
|
function defaultOnError(schema, fallback) {
|
|
19545
19548
|
return schema.catch(fallback);
|
|
@@ -19602,7 +19605,7 @@ function vecSkipError(itemSchema) {
|
|
|
19602
19605
|
return external_exports.array(itemSchema.catch(skippedItem)).transform((items) => items.filter((item) => item !== skippedItem));
|
|
19603
19606
|
}
|
|
19604
19607
|
|
|
19605
|
-
// node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js
|
|
19608
|
+
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@1.3.0_zod@4.4.3/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js
|
|
19606
19609
|
var zRequestId = union([number2(), string2()]).nullable();
|
|
19607
19610
|
var zSessionId = string2();
|
|
19608
19611
|
var zWriteTextFileRequest = object({
|
|
@@ -21200,7 +21203,7 @@ var zCancelRequestNotification = object({
|
|
|
21200
21203
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
21201
21204
|
});
|
|
21202
21205
|
|
|
21203
|
-
// node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js
|
|
21206
|
+
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@1.3.0_zod@4.4.3/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js
|
|
21204
21207
|
var CANCEL_REQUEST_METHOD = "$/cancel_request";
|
|
21205
21208
|
function isRequestMessage(value) {
|
|
21206
21209
|
return isJsonRpcEnvelope(value) && "id" in value && typeof value["method"] === "string" && isJsonRpcId(value["id"]);
|
|
@@ -22120,7 +22123,7 @@ var RequestError = class _RequestError extends Error {
|
|
|
22120
22123
|
}
|
|
22121
22124
|
};
|
|
22122
22125
|
|
|
22123
|
-
// node_modules/@agentclientprotocol/sdk/dist/line-buffer.js
|
|
22126
|
+
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@1.3.0_zod@4.4.3/node_modules/@agentclientprotocol/sdk/dist/line-buffer.js
|
|
22124
22127
|
var newline = 10;
|
|
22125
22128
|
var LineBuffer = class {
|
|
22126
22129
|
/** Bytes of the current (incomplete) line, carried across chunks. */
|
|
@@ -22173,7 +22176,7 @@ var LineBuffer = class {
|
|
|
22173
22176
|
}
|
|
22174
22177
|
};
|
|
22175
22178
|
|
|
22176
|
-
// node_modules/@agentclientprotocol/sdk/dist/stream.js
|
|
22179
|
+
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@1.3.0_zod@4.4.3/node_modules/@agentclientprotocol/sdk/dist/stream.js
|
|
22177
22180
|
function ndJsonStream(output, input) {
|
|
22178
22181
|
const textEncoder = new TextEncoder();
|
|
22179
22182
|
const textDecoder = new TextDecoder();
|
|
@@ -22261,7 +22264,7 @@ function ndJsonStream(output, input) {
|
|
|
22261
22264
|
return { readable, writable };
|
|
22262
22265
|
}
|
|
22263
22266
|
|
|
22264
|
-
// node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js
|
|
22267
|
+
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@1.3.0_zod@4.4.3/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js
|
|
22265
22268
|
var zGuardCreateElicitationRequestForm = zElicitationFormMode.and(object({ mode: literal("form") })).and(object({ message: string2() }));
|
|
22266
22269
|
var zGuardCreateElicitationRequestUrl = zElicitationUrlMode.and(object({ mode: literal("url") })).and(object({ message: string2() }));
|
|
22267
22270
|
var zGuardCreateElicitationRequestCustom = union([zElicitationSessionScope, zElicitationRequestScope]).and(object({ message: string2() }));
|
|
@@ -22279,7 +22282,7 @@ var zGuardCreateElicitationResponseCancel = object({
|
|
|
22279
22282
|
action: literal("cancel")
|
|
22280
22283
|
});
|
|
22281
22284
|
|
|
22282
|
-
// node_modules/@agentclientprotocol/sdk/dist/acp.js
|
|
22285
|
+
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@1.3.0_zod@4.4.3/node_modules/@agentclientprotocol/sdk/dist/acp.js
|
|
22283
22286
|
function ndJsonStream2(output, input) {
|
|
22284
22287
|
return ndJsonStream(output, input);
|
|
22285
22288
|
}
|
|
@@ -23489,76 +23492,9 @@ var RUNS_DIR = join4(STATE_DIR, "runs");
|
|
|
23489
23492
|
var CONVS_FILE = join4(STATE_DIR, "conversations.json");
|
|
23490
23493
|
var ENCKEYS_FILE = join4(STATE_DIR, "enckeys.json");
|
|
23491
23494
|
var MAX_RUN_BYTES = 512 * 1024;
|
|
23492
|
-
var MAX_RUNS_PER_CONVERSATION = 100;
|
|
23493
|
-
function isValidConversationId(id) {
|
|
23494
|
-
return typeof id === "string" && /^[A-Za-z0-9_-]{1,64}$/.test(id);
|
|
23495
|
-
}
|
|
23496
23495
|
function ensureDirs() {
|
|
23497
23496
|
mkdirSync(RUNS_DIR, { recursive: true });
|
|
23498
23497
|
}
|
|
23499
|
-
function loadConversations() {
|
|
23500
|
-
try {
|
|
23501
|
-
const parsed = JSON.parse(readFileSync3(CONVS_FILE, "utf-8"));
|
|
23502
|
-
return Array.isArray(parsed) ? parsed.filter((c) => isValidConversationId(c?.id)) : [];
|
|
23503
|
-
} catch {
|
|
23504
|
-
return [];
|
|
23505
|
-
}
|
|
23506
|
-
}
|
|
23507
|
-
function saveConversations(convs) {
|
|
23508
|
-
ensureDirs();
|
|
23509
|
-
const tmp = CONVS_FILE + ".tmp";
|
|
23510
|
-
writeFileSync(tmp, JSON.stringify(convs, null, 1));
|
|
23511
|
-
renameSync(tmp, CONVS_FILE);
|
|
23512
|
-
}
|
|
23513
|
-
function listConversations() {
|
|
23514
|
-
return loadConversations().sort((a, b) => b.lastActiveAt - a.lastActiveAt);
|
|
23515
|
-
}
|
|
23516
|
-
function putConversation(patch) {
|
|
23517
|
-
if (!isValidConversationId(patch?.id)) return { error: "conversation.id is missing or malformed" };
|
|
23518
|
-
const strOrUndef = (v) => typeof v === "string" ? v : void 0;
|
|
23519
|
-
const numOrUndef = (v) => typeof v === "number" && Number.isFinite(v) ? v : void 0;
|
|
23520
|
-
const convs = loadConversations();
|
|
23521
|
-
const existing = convs.find((c) => c.id === patch.id);
|
|
23522
|
-
const merged = {
|
|
23523
|
-
id: patch.id,
|
|
23524
|
-
agent: strOrUndef(patch.agent) ?? existing?.agent ?? "",
|
|
23525
|
-
dir: strOrUndef(patch.dir) ?? existing?.dir ?? "",
|
|
23526
|
-
title: strOrUndef(patch.title) ?? existing?.title ?? "",
|
|
23527
|
-
createdAt: numOrUndef(patch.createdAt) ?? existing?.createdAt ?? 0,
|
|
23528
|
-
lastActiveAt: numOrUndef(patch.lastActiveAt) ?? existing?.lastActiveAt ?? 0
|
|
23529
|
-
};
|
|
23530
|
-
const model = patch.model === "" ? void 0 : strOrUndef(patch.model) ?? existing?.model;
|
|
23531
|
-
if (model !== void 0) merged.model = model;
|
|
23532
|
-
const sessionId = patch.sessionId === "" ? void 0 : strOrUndef(patch.sessionId) ?? existing?.sessionId;
|
|
23533
|
-
if (sessionId !== void 0) merged.sessionId = sessionId;
|
|
23534
|
-
const archived = typeof patch.archived === "boolean" ? patch.archived : existing?.archived;
|
|
23535
|
-
if (archived === true) merged.archived = true;
|
|
23536
|
-
const takeover = typeof patch.takeover === "boolean" ? patch.takeover : existing?.takeover;
|
|
23537
|
-
if (takeover === true) merged.takeover = true;
|
|
23538
|
-
if (!merged.agent || !merged.dir || !merged.title || !merged.createdAt || !merged.lastActiveAt) {
|
|
23539
|
-
return { error: "creating a conversation requires agent, dir, title, createdAt and lastActiveAt" };
|
|
23540
|
-
}
|
|
23541
|
-
const next = existing ? convs.map((c) => c.id === merged.id ? merged : c) : [...convs, merged];
|
|
23542
|
-
saveConversations(next);
|
|
23543
|
-
return { conversation: merged };
|
|
23544
|
-
}
|
|
23545
|
-
function deleteConversation(id) {
|
|
23546
|
-
if (!isValidConversationId(id)) return;
|
|
23547
|
-
saveConversations(loadConversations().filter((c) => c.id !== id));
|
|
23548
|
-
rmSync(join4(RUNS_DIR, id), { recursive: true, force: true });
|
|
23549
|
-
}
|
|
23550
|
-
function clearConversations() {
|
|
23551
|
-
rmSync(CONVS_FILE, { force: true });
|
|
23552
|
-
rmSync(RUNS_DIR, { recursive: true, force: true });
|
|
23553
|
-
}
|
|
23554
|
-
function touchConversation(id, patch) {
|
|
23555
|
-
const convs = loadConversations();
|
|
23556
|
-
const conv = convs.find((c) => c.id === id);
|
|
23557
|
-
if (!conv) return;
|
|
23558
|
-
if (patch.lastActiveAt) conv.lastActiveAt = patch.lastActiveAt;
|
|
23559
|
-
if (patch.sessionId) conv.sessionId = patch.sessionId;
|
|
23560
|
-
saveConversations(convs);
|
|
23561
|
-
}
|
|
23562
23498
|
function saveEnckey(machineId, enckey) {
|
|
23563
23499
|
try {
|
|
23564
23500
|
ensureDirs();
|
|
@@ -23578,112 +23514,18 @@ function saveEnckey(machineId, enckey) {
|
|
|
23578
23514
|
return false;
|
|
23579
23515
|
}
|
|
23580
23516
|
}
|
|
23581
|
-
var openRuns = /* @__PURE__ */ new Set();
|
|
23582
|
-
function recordRun(conversationId, meta3) {
|
|
23583
|
-
if (!isValidConversationId(conversationId)) return null;
|
|
23584
|
-
const dir = join4(RUNS_DIR, conversationId);
|
|
23585
|
-
const startedAt = Date.now();
|
|
23586
|
-
const file2 = join4(dir, `${startedAt}-${meta3.runId}.jsonl`);
|
|
23587
|
-
try {
|
|
23588
|
-
mkdirSync(dir, { recursive: true });
|
|
23589
|
-
const files = readdirSync2(dir).filter((f) => f.endsWith(".jsonl")).sort();
|
|
23590
|
-
for (const old of files.slice(0, Math.max(0, files.length - (MAX_RUNS_PER_CONVERSATION - 1)))) {
|
|
23591
|
-
rmSync(join4(dir, old), { force: true });
|
|
23592
|
-
}
|
|
23593
|
-
appendFileSync(file2, JSON.stringify({ kind: "meta", startedAt, ...meta3 }) + "\n");
|
|
23594
|
-
} catch {
|
|
23595
|
-
return null;
|
|
23596
|
-
}
|
|
23597
|
-
openRuns.add(meta3.runId);
|
|
23598
|
-
touchConversation(conversationId, { lastActiveAt: startedAt });
|
|
23599
|
-
let bytes = 0;
|
|
23600
|
-
let truncated = false;
|
|
23601
|
-
const append = (line) => {
|
|
23602
|
-
try {
|
|
23603
|
-
appendFileSync(file2, JSON.stringify(line) + "\n");
|
|
23604
|
-
} catch {
|
|
23605
|
-
}
|
|
23606
|
-
};
|
|
23607
|
-
return {
|
|
23608
|
-
event(e, stored) {
|
|
23609
|
-
if (e.type === "session") touchConversation(conversationId, { sessionId: e.id });
|
|
23610
|
-
if (truncated) return;
|
|
23611
|
-
const line = JSON.stringify({ kind: "event", event: stored ?? e }) + "\n";
|
|
23612
|
-
bytes += line.length;
|
|
23613
|
-
if (bytes > MAX_RUN_BYTES) {
|
|
23614
|
-
truncated = true;
|
|
23615
|
-
append({ kind: "truncated" });
|
|
23616
|
-
return;
|
|
23617
|
-
}
|
|
23618
|
-
try {
|
|
23619
|
-
appendFileSync(file2, line);
|
|
23620
|
-
} catch {
|
|
23621
|
-
}
|
|
23622
|
-
},
|
|
23623
|
-
done(code, error51) {
|
|
23624
|
-
openRuns.delete(meta3.runId);
|
|
23625
|
-
append({ kind: "done", code, ...error51 !== void 0 ? { error: error51 } : {} });
|
|
23626
|
-
touchConversation(conversationId, { lastActiveAt: Date.now() });
|
|
23627
|
-
}
|
|
23628
|
-
};
|
|
23629
|
-
}
|
|
23630
|
-
function history(conversationId) {
|
|
23631
|
-
if (!isValidConversationId(conversationId)) return [];
|
|
23632
|
-
const dir = join4(RUNS_DIR, conversationId);
|
|
23633
|
-
if (!existsSync2(dir)) return [];
|
|
23634
|
-
const runs = [];
|
|
23635
|
-
for (const name of readdirSync2(dir).filter((f) => f.endsWith(".jsonl")).sort()) {
|
|
23636
|
-
let run = null;
|
|
23637
|
-
let text;
|
|
23638
|
-
try {
|
|
23639
|
-
text = readFileSync3(join4(dir, name), "utf-8");
|
|
23640
|
-
} catch {
|
|
23641
|
-
continue;
|
|
23642
|
-
}
|
|
23643
|
-
for (const raw of text.split("\n")) {
|
|
23644
|
-
if (!raw.trim()) continue;
|
|
23645
|
-
let line;
|
|
23646
|
-
try {
|
|
23647
|
-
line = JSON.parse(raw);
|
|
23648
|
-
} catch {
|
|
23649
|
-
continue;
|
|
23650
|
-
}
|
|
23651
|
-
if (line.kind === "meta") {
|
|
23652
|
-
run = {
|
|
23653
|
-
runId: line.runId,
|
|
23654
|
-
agent: line.agent,
|
|
23655
|
-
prompt: line.prompt,
|
|
23656
|
-
...line.cwd !== void 0 ? { cwd: line.cwd } : {},
|
|
23657
|
-
...line.model !== void 0 ? { model: line.model } : {},
|
|
23658
|
-
startedAt: line.startedAt,
|
|
23659
|
-
status: "disconnected",
|
|
23660
|
-
// upgraded below by done / openRuns
|
|
23661
|
-
truncated: false,
|
|
23662
|
-
events: []
|
|
23663
|
-
};
|
|
23664
|
-
} else if (run && line.kind === "event") {
|
|
23665
|
-
if ("type" in line.event && line.event.type === "session") run.sessionId = line.event.id;
|
|
23666
|
-
run.events.push(line.event);
|
|
23667
|
-
} else if (run && line.kind === "truncated") {
|
|
23668
|
-
run.truncated = true;
|
|
23669
|
-
} else if (run && line.kind === "done") {
|
|
23670
|
-
run.status = "done";
|
|
23671
|
-
run.code = line.code;
|
|
23672
|
-
if (line.error !== void 0) run.error = line.error;
|
|
23673
|
-
}
|
|
23674
|
-
}
|
|
23675
|
-
if (!run) continue;
|
|
23676
|
-
if (run.status !== "done" && openRuns.has(run.runId)) run.status = "running";
|
|
23677
|
-
if (run.status === "disconnected") run.error = "daemon disconnected";
|
|
23678
|
-
runs.push(run);
|
|
23679
|
-
}
|
|
23680
|
-
return runs;
|
|
23681
|
-
}
|
|
23682
23517
|
|
|
23683
23518
|
// src/sessions.ts
|
|
23684
|
-
import {
|
|
23519
|
+
import {
|
|
23520
|
+
closeSync,
|
|
23521
|
+
openSync,
|
|
23522
|
+
readFileSync as readFileSync4,
|
|
23523
|
+
readSync,
|
|
23524
|
+
readdirSync as readdirSync3,
|
|
23525
|
+
statSync
|
|
23526
|
+
} from "node:fs";
|
|
23685
23527
|
import { homedir as homedir5 } from "node:os";
|
|
23686
|
-
import { join as join5 } from "node:path";
|
|
23528
|
+
import { basename, join as join5 } from "node:path";
|
|
23687
23529
|
|
|
23688
23530
|
// ../core/src/session-archive.ts
|
|
23689
23531
|
function resultText(content) {
|
|
@@ -23814,6 +23656,7 @@ function claudeArchiveMeta(headText, tailText) {
|
|
|
23814
23656
|
let cwd;
|
|
23815
23657
|
let promptTitle = "";
|
|
23816
23658
|
let aiTitle = "";
|
|
23659
|
+
let customTitle = "";
|
|
23817
23660
|
for (const raw of headText.split("\n")) {
|
|
23818
23661
|
if (!raw.trim()) continue;
|
|
23819
23662
|
let obj;
|
|
@@ -23824,27 +23667,38 @@ function claudeArchiveMeta(headText, tailText) {
|
|
|
23824
23667
|
}
|
|
23825
23668
|
if (typeof obj.sessionId === "string" && !sessionId) sessionId = obj.sessionId;
|
|
23826
23669
|
if (typeof obj.cwd === "string" && !cwd) cwd = obj.cwd;
|
|
23827
|
-
|
|
23828
|
-
|
|
23670
|
+
const generated = obj.type === "ai-title" ? obj.aiTitle ?? obj.title : void 0;
|
|
23671
|
+
if (typeof generated === "string" && generated.trim()) {
|
|
23672
|
+
aiTitle = firstLine(generated);
|
|
23673
|
+
}
|
|
23674
|
+
const custom2 = obj.type === "custom-title" ? obj.customTitle ?? obj.title : void 0;
|
|
23675
|
+
if (typeof custom2 === "string" && custom2.trim()) {
|
|
23676
|
+
customTitle = firstLine(custom2);
|
|
23829
23677
|
}
|
|
23830
23678
|
if (!promptTitle && obj.type === "user" && obj.message && typeof obj.message === "object") {
|
|
23831
23679
|
const msg = obj.message;
|
|
23832
23680
|
if (isHumanPrompt(msg)) promptTitle = firstLine(userText(msg));
|
|
23833
23681
|
}
|
|
23834
|
-
if (sessionId && cwd &&
|
|
23682
|
+
if (sessionId && cwd && customTitle) break;
|
|
23835
23683
|
}
|
|
23836
23684
|
let lastLine = "";
|
|
23837
23685
|
let tailAiTitle = "";
|
|
23686
|
+
let tailCustomTitle = "";
|
|
23838
23687
|
const tailLines = tailText.split("\n").filter((l) => l.trim());
|
|
23839
|
-
for (let i = tailLines.length - 1; i >= 0 && (!lastLine || !tailAiTitle); i--) {
|
|
23688
|
+
for (let i = tailLines.length - 1; i >= 0 && (!lastLine || !tailAiTitle || !tailCustomTitle); i--) {
|
|
23840
23689
|
let obj;
|
|
23841
23690
|
try {
|
|
23842
23691
|
obj = JSON.parse(tailLines[i]);
|
|
23843
23692
|
} catch {
|
|
23844
23693
|
continue;
|
|
23845
23694
|
}
|
|
23846
|
-
|
|
23847
|
-
|
|
23695
|
+
const generated = obj.type === "ai-title" ? obj.aiTitle ?? obj.title : void 0;
|
|
23696
|
+
if (!tailAiTitle && typeof generated === "string" && generated.trim()) {
|
|
23697
|
+
tailAiTitle = firstLine(generated);
|
|
23698
|
+
}
|
|
23699
|
+
const custom2 = obj.type === "custom-title" ? obj.customTitle ?? obj.title : void 0;
|
|
23700
|
+
if (!tailCustomTitle && typeof custom2 === "string" && custom2.trim()) {
|
|
23701
|
+
tailCustomTitle = firstLine(custom2);
|
|
23848
23702
|
}
|
|
23849
23703
|
if ((obj.type === "assistant" || obj.type === "user") && obj.message && typeof obj.message === "object") {
|
|
23850
23704
|
const msg = obj.message;
|
|
@@ -23852,7 +23706,12 @@ function claudeArchiveMeta(headText, tailText) {
|
|
|
23852
23706
|
if (!lastLine && text.trim()) lastLine = firstLine(text);
|
|
23853
23707
|
}
|
|
23854
23708
|
}
|
|
23855
|
-
return {
|
|
23709
|
+
return {
|
|
23710
|
+
...sessionId ? { sessionId } : {},
|
|
23711
|
+
...cwd ? { cwd } : {},
|
|
23712
|
+
title: tailCustomTitle || customTitle || tailAiTitle || aiTitle || promptTitle,
|
|
23713
|
+
lastLine
|
|
23714
|
+
};
|
|
23856
23715
|
}
|
|
23857
23716
|
function assistantText(message) {
|
|
23858
23717
|
const content = message.content;
|
|
@@ -23870,122 +23729,261 @@ function firstLine(s) {
|
|
|
23870
23729
|
const line = s.split("\n").find((l) => l.trim()) ?? "";
|
|
23871
23730
|
return line.trim();
|
|
23872
23731
|
}
|
|
23873
|
-
|
|
23874
|
-
|
|
23875
|
-
function claudeProjectsDir() {
|
|
23876
|
-
const base = process.env.AGENTLINK_CLAUDE_HOME || join5(homedir5(), ".claude");
|
|
23877
|
-
return join5(base, "projects");
|
|
23878
|
-
}
|
|
23879
|
-
var META_SLICE_BYTES = 64 * 1024;
|
|
23880
|
-
var MAX_SESSIONS = 40;
|
|
23881
|
-
var MAX_HISTORY_TURNS = 40;
|
|
23882
|
-
var SESSION_ID_RE = /^[A-Za-z0-9_-]{1,128}$/;
|
|
23883
|
-
function readHeadTail(path, size) {
|
|
23884
|
-
if (size <= META_SLICE_BYTES * 2) {
|
|
23885
|
-
const whole = readFileSync4(path, "utf-8");
|
|
23886
|
-
return { head: whole, tail: whole };
|
|
23887
|
-
}
|
|
23888
|
-
const fd = openSync(path, "r");
|
|
23889
|
-
try {
|
|
23890
|
-
const headBuf = Buffer.alloc(META_SLICE_BYTES);
|
|
23891
|
-
readSync(fd, headBuf, 0, META_SLICE_BYTES, 0);
|
|
23892
|
-
const tailBuf = Buffer.alloc(META_SLICE_BYTES);
|
|
23893
|
-
readSync(fd, tailBuf, 0, META_SLICE_BYTES, size - META_SLICE_BYTES);
|
|
23894
|
-
const tail = tailBuf.toString("utf-8");
|
|
23895
|
-
return { head: headBuf.toString("utf-8"), tail: tail.slice(tail.indexOf("\n") + 1) };
|
|
23896
|
-
} finally {
|
|
23897
|
-
closeSync(fd);
|
|
23898
|
-
}
|
|
23732
|
+
function codexPayload(obj) {
|
|
23733
|
+
return obj.payload && typeof obj.payload === "object" ? obj.payload : null;
|
|
23899
23734
|
}
|
|
23900
|
-
function
|
|
23901
|
-
|
|
23902
|
-
|
|
23903
|
-
|
|
23904
|
-
|
|
23905
|
-
|
|
23906
|
-
|
|
23907
|
-
|
|
23908
|
-
|
|
23909
|
-
|
|
23910
|
-
|
|
23735
|
+
function codexMessage(payload) {
|
|
23736
|
+
return typeof payload.message === "string" ? payload.message : "";
|
|
23737
|
+
}
|
|
23738
|
+
function parseCodexArchive(text, opts) {
|
|
23739
|
+
const maxTurns = opts?.maxTurns ?? Infinity;
|
|
23740
|
+
const turns = [];
|
|
23741
|
+
let current = null;
|
|
23742
|
+
let sessionId;
|
|
23743
|
+
let cwd;
|
|
23744
|
+
let omitted = 0;
|
|
23745
|
+
const openTurn = (prompt, startedAt) => {
|
|
23746
|
+
current = { prompt, events: [], ...startedAt !== void 0 ? { startedAt } : {} };
|
|
23747
|
+
turns.push(current);
|
|
23748
|
+
};
|
|
23749
|
+
for (const raw of text.split("\n")) {
|
|
23750
|
+
if (!raw.trim()) continue;
|
|
23751
|
+
let obj;
|
|
23911
23752
|
try {
|
|
23912
|
-
|
|
23753
|
+
obj = JSON.parse(raw);
|
|
23913
23754
|
} catch {
|
|
23755
|
+
omitted++;
|
|
23914
23756
|
continue;
|
|
23915
23757
|
}
|
|
23916
|
-
|
|
23917
|
-
|
|
23918
|
-
|
|
23919
|
-
|
|
23920
|
-
|
|
23921
|
-
|
|
23922
|
-
|
|
23758
|
+
const payload = codexPayload(obj);
|
|
23759
|
+
if (!payload) continue;
|
|
23760
|
+
if (obj.type === "session_meta") {
|
|
23761
|
+
if (!sessionId && typeof payload.id === "string") sessionId = payload.id;
|
|
23762
|
+
if (!cwd && typeof payload.cwd === "string") cwd = payload.cwd;
|
|
23763
|
+
continue;
|
|
23764
|
+
}
|
|
23765
|
+
if (obj.type === "event_msg" && payload.type === "user_message") {
|
|
23766
|
+
const prompt = codexMessage(payload);
|
|
23767
|
+
if (prompt.trim()) openTurn(prompt, tsOf(obj));
|
|
23768
|
+
continue;
|
|
23769
|
+
}
|
|
23770
|
+
if (obj.type === "event_msg" && payload.type === "agent_message") {
|
|
23771
|
+
const message = codexMessage(payload);
|
|
23772
|
+
if (message) {
|
|
23773
|
+
if (!current) openTurn("", tsOf(obj));
|
|
23774
|
+
current.events.push({ type: "text", text: message });
|
|
23923
23775
|
}
|
|
23776
|
+
continue;
|
|
23777
|
+
}
|
|
23778
|
+
if (obj.type !== "response_item") continue;
|
|
23779
|
+
const itemType = payload.type;
|
|
23780
|
+
if (itemType === "custom_tool_call" || itemType === "function_call") {
|
|
23781
|
+
if (!current) openTurn("", tsOf(obj));
|
|
23782
|
+
let input = payload.input ?? null;
|
|
23783
|
+
if (typeof input === "string") {
|
|
23784
|
+
try {
|
|
23785
|
+
input = JSON.parse(input);
|
|
23786
|
+
} catch {
|
|
23787
|
+
}
|
|
23788
|
+
}
|
|
23789
|
+
current.events.push({
|
|
23790
|
+
type: "tool_use",
|
|
23791
|
+
id: String(payload.call_id ?? payload.id ?? ""),
|
|
23792
|
+
name: String(payload.name ?? "tool"),
|
|
23793
|
+
input
|
|
23794
|
+
});
|
|
23795
|
+
} else if (itemType === "custom_tool_call_output" || itemType === "function_call_output") {
|
|
23796
|
+
if (!current) openTurn("", tsOf(obj));
|
|
23797
|
+
current.events.push({
|
|
23798
|
+
type: "tool_result",
|
|
23799
|
+
toolUseId: String(payload.call_id ?? ""),
|
|
23800
|
+
content: resultText(payload.output),
|
|
23801
|
+
isError: false
|
|
23802
|
+
});
|
|
23924
23803
|
}
|
|
23925
23804
|
}
|
|
23926
|
-
|
|
23927
|
-
|
|
23928
|
-
|
|
23929
|
-
|
|
23805
|
+
const truncatedEarlier = turns.length > maxTurns;
|
|
23806
|
+
return {
|
|
23807
|
+
sessionId,
|
|
23808
|
+
cwd,
|
|
23809
|
+
turns: truncatedEarlier ? turns.slice(turns.length - maxTurns) : turns,
|
|
23810
|
+
omitted,
|
|
23811
|
+
truncatedEarlier
|
|
23812
|
+
};
|
|
23813
|
+
}
|
|
23814
|
+
function codexArchiveMeta(headText, tailText) {
|
|
23815
|
+
let sessionId;
|
|
23816
|
+
let cwd;
|
|
23817
|
+
let title = "";
|
|
23818
|
+
for (const raw of headText.split("\n")) {
|
|
23819
|
+
if (!raw.trim()) continue;
|
|
23820
|
+
try {
|
|
23821
|
+
const obj = JSON.parse(raw);
|
|
23822
|
+
const payload = codexPayload(obj);
|
|
23823
|
+
if (!payload) continue;
|
|
23824
|
+
if (obj.type === "session_meta") {
|
|
23825
|
+
if (!sessionId && typeof payload.id === "string") sessionId = payload.id;
|
|
23826
|
+
if (!cwd && typeof payload.cwd === "string") cwd = payload.cwd;
|
|
23827
|
+
} else if (!title && obj.type === "event_msg" && payload.type === "user_message") {
|
|
23828
|
+
title = firstLine(codexMessage(payload));
|
|
23829
|
+
}
|
|
23830
|
+
} catch {
|
|
23831
|
+
}
|
|
23832
|
+
}
|
|
23833
|
+
let lastLine = "";
|
|
23834
|
+
const lines = tailText.split("\n").filter((line) => line.trim());
|
|
23835
|
+
for (let i = lines.length - 1; i >= 0 && !lastLine; i--) {
|
|
23930
23836
|
try {
|
|
23931
|
-
const
|
|
23932
|
-
|
|
23837
|
+
const obj = JSON.parse(lines[i]);
|
|
23838
|
+
const payload = codexPayload(obj);
|
|
23839
|
+
if (payload && obj.type === "event_msg" && (payload.type === "agent_message" || payload.type === "user_message")) {
|
|
23840
|
+
lastLine = firstLine(codexMessage(payload));
|
|
23841
|
+
}
|
|
23842
|
+
} catch {
|
|
23843
|
+
}
|
|
23844
|
+
}
|
|
23845
|
+
return {
|
|
23846
|
+
...sessionId ? { sessionId } : {},
|
|
23847
|
+
...cwd ? { cwd } : {},
|
|
23848
|
+
title,
|
|
23849
|
+
lastLine
|
|
23850
|
+
};
|
|
23851
|
+
}
|
|
23852
|
+
|
|
23853
|
+
// src/sessions.ts
|
|
23854
|
+
var LIST_LIMIT = 100;
|
|
23855
|
+
var CANDIDATE_LIMIT = 300;
|
|
23856
|
+
var SLICE_BYTES = 64 * 1024;
|
|
23857
|
+
var CODEX_HEAD_BYTES = 256 * 1024;
|
|
23858
|
+
var HISTORY_TURNS = 100;
|
|
23859
|
+
function archiveRoot(agent) {
|
|
23860
|
+
if (agent === "claude") {
|
|
23861
|
+
return join5(process.env.AGENTLINK_CLAUDE_HOME || join5(homedir5(), ".claude"), "projects");
|
|
23862
|
+
}
|
|
23863
|
+
return join5(
|
|
23864
|
+
process.env.AGENTLINK_CODEX_HOME || process.env.CODEX_HOME || join5(homedir5(), ".codex"),
|
|
23865
|
+
"sessions"
|
|
23866
|
+
);
|
|
23867
|
+
}
|
|
23868
|
+
function validSessionId(id) {
|
|
23869
|
+
return /^[A-Za-z0-9._-]{1,128}$/.test(id);
|
|
23870
|
+
}
|
|
23871
|
+
function archiveFiles(root, maxDepth) {
|
|
23872
|
+
const files = [];
|
|
23873
|
+
const stack = [{ dir: root, depth: 0 }];
|
|
23874
|
+
while (stack.length > 0) {
|
|
23875
|
+
const next = stack.pop();
|
|
23876
|
+
let entries;
|
|
23877
|
+
try {
|
|
23878
|
+
entries = readdirSync3(next.dir, { withFileTypes: true });
|
|
23933
23879
|
} catch {
|
|
23934
23880
|
continue;
|
|
23935
23881
|
}
|
|
23936
|
-
|
|
23937
|
-
|
|
23938
|
-
|
|
23939
|
-
|
|
23940
|
-
|
|
23941
|
-
|
|
23942
|
-
|
|
23943
|
-
|
|
23882
|
+
for (const entry of entries) {
|
|
23883
|
+
const path = join5(next.dir, entry.name);
|
|
23884
|
+
if (entry.isDirectory() && next.depth < maxDepth) {
|
|
23885
|
+
stack.push({ dir: path, depth: next.depth + 1 });
|
|
23886
|
+
} else if (entry.isFile() && entry.name.endsWith(".jsonl")) {
|
|
23887
|
+
try {
|
|
23888
|
+
files.push({ path, mtime: statSync(path).mtimeMs });
|
|
23889
|
+
} catch {
|
|
23890
|
+
}
|
|
23891
|
+
}
|
|
23892
|
+
}
|
|
23944
23893
|
}
|
|
23945
|
-
return
|
|
23894
|
+
return files.sort((a, b) => b.mtime - a.mtime).slice(0, CANDIDATE_LIMIT);
|
|
23946
23895
|
}
|
|
23947
|
-
function
|
|
23948
|
-
const
|
|
23949
|
-
const
|
|
23950
|
-
let projectDirs;
|
|
23896
|
+
function readHeadTail(path, headBytes = SLICE_BYTES) {
|
|
23897
|
+
const size = statSync(path).size;
|
|
23898
|
+
const fd = openSync(path, "r");
|
|
23951
23899
|
try {
|
|
23952
|
-
|
|
23953
|
-
|
|
23954
|
-
|
|
23900
|
+
const headSize = Math.min(size, headBytes);
|
|
23901
|
+
const tailSize = Math.min(size, SLICE_BYTES);
|
|
23902
|
+
const head = Buffer.alloc(headSize);
|
|
23903
|
+
const tail = Buffer.alloc(tailSize);
|
|
23904
|
+
readSync(fd, head, 0, headSize, 0);
|
|
23905
|
+
readSync(fd, tail, 0, tailSize, Math.max(0, size - tailSize));
|
|
23906
|
+
return {
|
|
23907
|
+
head: head.toString("utf8"),
|
|
23908
|
+
tail: tail.toString("utf8")
|
|
23909
|
+
};
|
|
23910
|
+
} finally {
|
|
23911
|
+
closeSync(fd);
|
|
23955
23912
|
}
|
|
23956
|
-
|
|
23957
|
-
|
|
23913
|
+
}
|
|
23914
|
+
function scanAgent(agent) {
|
|
23915
|
+
const root = archiveRoot(agent);
|
|
23916
|
+
const depth = agent === "claude" ? 2 : 4;
|
|
23917
|
+
const sessions = [];
|
|
23918
|
+
for (const file2 of archiveFiles(root, depth)) {
|
|
23958
23919
|
try {
|
|
23959
|
-
|
|
23920
|
+
const { head, tail } = readHeadTail(
|
|
23921
|
+
file2.path,
|
|
23922
|
+
agent === "codex" ? CODEX_HEAD_BYTES : SLICE_BYTES
|
|
23923
|
+
);
|
|
23924
|
+
const meta3 = agent === "claude" ? claudeArchiveMeta(head, tail) : codexArchiveMeta(head, tail);
|
|
23925
|
+
const filenameId = basename(file2.path, ".jsonl");
|
|
23926
|
+
const sessionId = meta3.sessionId || (agent === "codex" ? filenameId.match(/([A-Za-z0-9]+(?:-[A-Za-z0-9]+){4})$/)?.[1] : filenameId);
|
|
23927
|
+
if (!sessionId || !validSessionId(sessionId)) continue;
|
|
23928
|
+
sessions.push({
|
|
23929
|
+
agent,
|
|
23930
|
+
sessionId,
|
|
23931
|
+
...meta3.cwd ? { cwd: meta3.cwd } : {},
|
|
23932
|
+
title: meta3.title || "(\u65E0\u6807\u9898\u4F1A\u8BDD)",
|
|
23933
|
+
lastLine: meta3.lastLine,
|
|
23934
|
+
mtime: file2.mtime
|
|
23935
|
+
});
|
|
23960
23936
|
} catch {
|
|
23961
23937
|
}
|
|
23962
23938
|
}
|
|
23963
|
-
return
|
|
23939
|
+
return sessions;
|
|
23964
23940
|
}
|
|
23965
|
-
function
|
|
23966
|
-
|
|
23967
|
-
|
|
23968
|
-
|
|
23969
|
-
|
|
23970
|
-
|
|
23971
|
-
|
|
23972
|
-
|
|
23973
|
-
|
|
23974
|
-
|
|
23975
|
-
|
|
23976
|
-
const
|
|
23977
|
-
|
|
23978
|
-
|
|
23979
|
-
|
|
23941
|
+
function scanClaudeSessions() {
|
|
23942
|
+
return scanAgent("claude").slice(0, LIST_LIMIT);
|
|
23943
|
+
}
|
|
23944
|
+
function scanCodexSessions() {
|
|
23945
|
+
return scanAgent("codex").slice(0, LIST_LIMIT);
|
|
23946
|
+
}
|
|
23947
|
+
function scanNativeSessions() {
|
|
23948
|
+
return [...scanClaudeSessions(), ...scanCodexSessions()].sort((a, b) => b.mtime - a.mtime).slice(0, LIST_LIMIT);
|
|
23949
|
+
}
|
|
23950
|
+
function archivePath(agent, sessionId) {
|
|
23951
|
+
if (!validSessionId(sessionId)) return null;
|
|
23952
|
+
const suffix = agent === "claude" ? `${sessionId}.jsonl` : `-${sessionId}.jsonl`;
|
|
23953
|
+
return archiveFiles(archiveRoot(agent), agent === "claude" ? 2 : 4).find((file2) => file2.path.endsWith(suffix))?.path ?? null;
|
|
23954
|
+
}
|
|
23955
|
+
function runsFromParsed(agent, sessionId, parsed) {
|
|
23956
|
+
return parsed.turns.map((turn, index) => ({
|
|
23957
|
+
runId: `native-${agent}-${sessionId}-${index}`,
|
|
23958
|
+
agent,
|
|
23980
23959
|
prompt: turn.prompt,
|
|
23981
23960
|
...parsed.cwd ? { cwd: parsed.cwd } : {},
|
|
23982
23961
|
sessionId,
|
|
23983
23962
|
startedAt: turn.startedAt ?? 0,
|
|
23984
23963
|
status: "done",
|
|
23964
|
+
code: 0,
|
|
23985
23965
|
truncated: false,
|
|
23986
23966
|
events: turn.events
|
|
23987
23967
|
}));
|
|
23988
|
-
|
|
23968
|
+
}
|
|
23969
|
+
function nativeSessionHistory(agent, sessionId) {
|
|
23970
|
+
if (agent !== "claude" && agent !== "codex") {
|
|
23971
|
+
return { error: `session takeover does not support "${agent}"` };
|
|
23972
|
+
}
|
|
23973
|
+
const path = archivePath(agent, sessionId);
|
|
23974
|
+
if (!path) return { error: `${agent} session "${sessionId}" was not found` };
|
|
23975
|
+
try {
|
|
23976
|
+
const text = readFileSync4(path, "utf8");
|
|
23977
|
+
const parsed = agent === "claude" ? parseClaudeArchive(text, { maxTurns: HISTORY_TURNS }) : parseCodexArchive(text, { maxTurns: HISTORY_TURNS });
|
|
23978
|
+
return {
|
|
23979
|
+
runs: runsFromParsed(agent, sessionId, parsed),
|
|
23980
|
+
truncatedEarlier: parsed.truncatedEarlier
|
|
23981
|
+
};
|
|
23982
|
+
} catch (err) {
|
|
23983
|
+
return {
|
|
23984
|
+
error: `cannot read ${agent} session "${sessionId}": ${err instanceof Error ? err.message : String(err)}`
|
|
23985
|
+
};
|
|
23986
|
+
}
|
|
23989
23987
|
}
|
|
23990
23988
|
|
|
23991
23989
|
// src/tunnel.ts
|
|
@@ -24365,26 +24363,43 @@ async function probeVersion(bin) {
|
|
|
24365
24363
|
return first || void 0;
|
|
24366
24364
|
}
|
|
24367
24365
|
async function probeAgents() {
|
|
24368
|
-
|
|
24366
|
+
const agents2 = await Promise.all(
|
|
24369
24367
|
REGISTRY.map(async (def) => {
|
|
24370
|
-
const
|
|
24371
|
-
if (!
|
|
24368
|
+
const adapter = getAgent(def.id);
|
|
24369
|
+
if (!adapter) return { id: def.id, label: def.label, detected: false, models: def.models };
|
|
24372
24370
|
const [version2, probed] = await Promise.all([
|
|
24373
|
-
probeVersion(bin),
|
|
24374
|
-
def.probeModels ? def.probeModels(bin) : Promise.resolve([])
|
|
24371
|
+
probeVersion(resolveBin(def.command ?? def.acp.bin) ?? adapter.bin),
|
|
24372
|
+
def.probeModels ? def.probeModels(adapter.bin) : Promise.resolve([])
|
|
24375
24373
|
]);
|
|
24376
24374
|
const models = [.../* @__PURE__ */ new Set([...probed, ...def.models])];
|
|
24377
24375
|
return {
|
|
24378
24376
|
id: def.id,
|
|
24379
24377
|
label: def.label,
|
|
24380
24378
|
detected: true,
|
|
24381
|
-
bin,
|
|
24379
|
+
bin: adapter.bin,
|
|
24382
24380
|
models,
|
|
24383
24381
|
...version2 ? { version: version2 } : {},
|
|
24384
24382
|
...APPROVAL ? { approval: true } : {}
|
|
24385
24383
|
};
|
|
24386
24384
|
})
|
|
24387
24385
|
);
|
|
24386
|
+
let joycodeBin = resolveBin("joycode");
|
|
24387
|
+
if (!joycodeBin) {
|
|
24388
|
+
try {
|
|
24389
|
+
joycodeBin = realpathSync("/Applications/JoyCode.app/Contents/Resources/app/bin/joycode");
|
|
24390
|
+
} catch {
|
|
24391
|
+
}
|
|
24392
|
+
}
|
|
24393
|
+
if (joycodeBin) {
|
|
24394
|
+
agents2.push({
|
|
24395
|
+
id: "joycode",
|
|
24396
|
+
label: "JoyCode\uFF08\u5DF2\u5B89\u88C5\uFF0C\u6682\u65E0\u63A5\u7BA1\u63A5\u53E3\uFF09",
|
|
24397
|
+
detected: false,
|
|
24398
|
+
bin: joycodeBin,
|
|
24399
|
+
models: []
|
|
24400
|
+
});
|
|
24401
|
+
}
|
|
24402
|
+
return agents2;
|
|
24388
24403
|
}
|
|
24389
24404
|
var running = /* @__PURE__ */ new Map();
|
|
24390
24405
|
var approvalRuns = /* @__PURE__ */ new Map();
|
|
@@ -24415,7 +24430,7 @@ function handleRun(ws, { requestId, agent: agentId, prompt: rawPrompt, sessionId
|
|
|
24415
24430
|
};
|
|
24416
24431
|
const adapter = getAgent(agentId);
|
|
24417
24432
|
if (!adapter) return fail(`agent "${agentId}" not found`);
|
|
24418
|
-
const { plain: prompt
|
|
24433
|
+
const { plain: prompt } = decodePrompt(rawPrompt);
|
|
24419
24434
|
if (typeof prompt !== "string") {
|
|
24420
24435
|
return fail(ENCKEY ? `malformed run message: prompt could not be decrypted (wrong key?)` : `malformed run message: prompt is not a string`);
|
|
24421
24436
|
}
|
|
@@ -24425,13 +24440,6 @@ function handleRun(ws, { requestId, agent: agentId, prompt: rawPrompt, sessionId
|
|
|
24425
24440
|
if (!real) return fail(`cwd rejected: ${error51}`);
|
|
24426
24441
|
runCwd = real;
|
|
24427
24442
|
}
|
|
24428
|
-
const recorder = recordRun(conversationId, {
|
|
24429
|
-
runId: requestId,
|
|
24430
|
-
agent: agentId,
|
|
24431
|
-
prompt: storedPrompt,
|
|
24432
|
-
...cwd !== void 0 ? { cwd } : {},
|
|
24433
|
-
...typeof model === "string" && model ? { model } : {}
|
|
24434
|
-
});
|
|
24435
24443
|
runAcpPath(ws, {
|
|
24436
24444
|
requestId,
|
|
24437
24445
|
adapter,
|
|
@@ -24440,8 +24448,7 @@ function handleRun(ws, { requestId, agent: agentId, prompt: rawPrompt, sessionId
|
|
|
24440
24448
|
runCwd,
|
|
24441
24449
|
model: typeof model === "string" && model ? model : void 0,
|
|
24442
24450
|
conversationId,
|
|
24443
|
-
notifyDetail
|
|
24444
|
-
recorder
|
|
24451
|
+
notifyDetail
|
|
24445
24452
|
});
|
|
24446
24453
|
}
|
|
24447
24454
|
var NOTIFY_TITLE_MAX = 200;
|
|
@@ -24455,7 +24462,7 @@ function approvalNotify(tool, input) {
|
|
|
24455
24462
|
return { title: `\u5BA1\u6279\uFF1A${tool}`.slice(0, NOTIFY_TITLE_MAX), summary: firstLine2.slice(0, NOTIFY_SUMMARY_MAX) };
|
|
24456
24463
|
}
|
|
24457
24464
|
function runAcpPath(ws, opts) {
|
|
24458
|
-
const { requestId, adapter
|
|
24465
|
+
const { requestId, adapter } = opts;
|
|
24459
24466
|
console.log(`[daemon] requestId=${requestId} starting ${adapter.id} via ACP (approval=${APPROVAL}, cwd=${opts.runCwd})`);
|
|
24460
24467
|
let lastText;
|
|
24461
24468
|
const emitEvent = (evt) => {
|
|
@@ -24463,10 +24470,8 @@ function runAcpPath(ws, opts) {
|
|
|
24463
24470
|
if (ENCKEY) {
|
|
24464
24471
|
const capped = truncateEventContent(evt);
|
|
24465
24472
|
const envelope = encryptEvent(ENCKEY, capped);
|
|
24466
|
-
recorder?.event(capped, envelope);
|
|
24467
24473
|
send(ws, { type: "event", requestId, event: envelope });
|
|
24468
24474
|
} else {
|
|
24469
|
-
recorder?.event(evt);
|
|
24470
24475
|
send(ws, { type: "event", requestId, event: evt });
|
|
24471
24476
|
}
|
|
24472
24477
|
};
|
|
@@ -24487,10 +24492,8 @@ function runAcpPath(ws, opts) {
|
|
|
24487
24492
|
if (ENCKEY) {
|
|
24488
24493
|
const capped = truncateEventContent(evt);
|
|
24489
24494
|
wireEvent = encryptEvent(ENCKEY, capped);
|
|
24490
|
-
if (!renotify) recorder?.event(capped, wireEvent);
|
|
24491
24495
|
} else {
|
|
24492
24496
|
wireEvent = evt;
|
|
24493
|
-
if (!renotify) recorder?.event(evt);
|
|
24494
24497
|
}
|
|
24495
24498
|
send(ws, {
|
|
24496
24499
|
type: "permission_request",
|
|
@@ -24518,9 +24521,6 @@ function runAcpPath(ws, opts) {
|
|
|
24518
24521
|
acpArgs: adapter.acp.args,
|
|
24519
24522
|
env: spawnEnv(),
|
|
24520
24523
|
onEvent: emitEvent,
|
|
24521
|
-
onTitle: (title) => {
|
|
24522
|
-
if (opts.conversationId) putConversation({ id: opts.conversationId, title });
|
|
24523
|
-
},
|
|
24524
24524
|
requestPermission,
|
|
24525
24525
|
signal: controller.signal,
|
|
24526
24526
|
onSpawn: (child) => void running.set(requestId, child)
|
|
@@ -24542,7 +24542,6 @@ function runAcpPath(ws, opts) {
|
|
|
24542
24542
|
if (error51) done.error = error51;
|
|
24543
24543
|
if (opts.notifyDetail === true) done.notify = { title: adapter.id, summary: notifySummary(lastText) };
|
|
24544
24544
|
console.log(`[daemon] requestId=${requestId} closed code=${code}${error51 ? ` error=${error51}` : ""} (ACP)`);
|
|
24545
|
-
recorder?.done(code, error51);
|
|
24546
24545
|
send(ws, done);
|
|
24547
24546
|
});
|
|
24548
24547
|
}
|
|
@@ -24628,30 +24627,28 @@ function handleListdir(ws, { requestId, path }) {
|
|
|
24628
24627
|
}
|
|
24629
24628
|
}
|
|
24630
24629
|
function handleConvList(ws, requestId) {
|
|
24631
|
-
send(ws, { type: "conv_list_result", requestId, conversations:
|
|
24630
|
+
send(ws, { type: "conv_list_result", requestId, conversations: [] });
|
|
24632
24631
|
}
|
|
24633
|
-
function handleConvPut(ws, requestId,
|
|
24634
|
-
|
|
24635
|
-
|
|
24636
|
-
|
|
24637
|
-
|
|
24638
|
-
|
|
24632
|
+
function handleConvPut(ws, requestId, _conversation) {
|
|
24633
|
+
send(ws, {
|
|
24634
|
+
type: "conv_put_result",
|
|
24635
|
+
requestId,
|
|
24636
|
+
error: "AgentLink conversation storage is disabled; use native sessions"
|
|
24637
|
+
});
|
|
24639
24638
|
}
|
|
24640
|
-
function handleConvDelete(ws, requestId,
|
|
24641
|
-
if (typeof id === "string") deleteConversation(id);
|
|
24639
|
+
function handleConvDelete(ws, requestId, _id) {
|
|
24642
24640
|
send(ws, { type: "conv_delete_result", requestId });
|
|
24643
24641
|
}
|
|
24644
24642
|
function handleConvClear(ws, requestId) {
|
|
24645
|
-
clearConversations();
|
|
24646
24643
|
send(ws, { type: "conv_clear_result", requestId });
|
|
24647
24644
|
}
|
|
24648
|
-
function handleHistory(ws, requestId,
|
|
24649
|
-
send(ws, { type: "history_result", requestId, runs:
|
|
24645
|
+
function handleHistory(ws, requestId, _conversationId) {
|
|
24646
|
+
send(ws, { type: "history_result", requestId, runs: [] });
|
|
24650
24647
|
}
|
|
24651
24648
|
function handleScanSessions(ws, requestId) {
|
|
24652
24649
|
let sessions;
|
|
24653
24650
|
try {
|
|
24654
|
-
const list =
|
|
24651
|
+
const list = scanNativeSessions();
|
|
24655
24652
|
sessions = ENCKEY ? encryptEvent(ENCKEY, list) : list;
|
|
24656
24653
|
} catch (err) {
|
|
24657
24654
|
return send(ws, { type: "scan_sessions_result", requestId, sessions: ENCKEY ? void 0 : [], error: err instanceof Error ? err.message : String(err) });
|
|
@@ -24662,7 +24659,7 @@ function handleSessionHistory(ws, requestId, agent, sessionId) {
|
|
|
24662
24659
|
if (typeof agent !== "string" || typeof sessionId !== "string") {
|
|
24663
24660
|
return send(ws, { type: "session_history_result", requestId, runs: [], error: "malformed session_history: agent and sessionId are required" });
|
|
24664
24661
|
}
|
|
24665
|
-
const result =
|
|
24662
|
+
const result = nativeSessionHistory(agent, sessionId);
|
|
24666
24663
|
if ("error" in result) {
|
|
24667
24664
|
return send(ws, { type: "session_history_result", requestId, runs: [], error: result.error });
|
|
24668
24665
|
}
|