@factory/droid-sdk 0.10.0 → 0.11.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 +31 -0
- package/dist/api.d.mts +15058 -0
- package/dist/api.d.ts +15058 -0
- package/dist/api.js +253 -0
- package/dist/api.js.map +1 -0
- package/dist/api.mjs +253 -0
- package/dist/api.mjs.map +1 -0
- package/dist/chunk-7ZD7MMNA.mjs +2268 -0
- package/dist/chunk-7ZD7MMNA.mjs.map +1 -0
- package/dist/{chunk-OBPHU4RT.js → chunk-KAAWCHO4.js} +28866 -20935
- package/dist/chunk-KAAWCHO4.js.map +1 -0
- package/dist/{chunk-TWAVPIPS.mjs → chunk-NWFX4MPJ.mjs} +29443 -21512
- package/dist/chunk-NWFX4MPJ.mjs.map +1 -0
- package/dist/chunk-ZQ7TS73S.js +2268 -0
- package/dist/chunk-ZQ7TS73S.js.map +1 -0
- package/dist/{index-DWBA4zgW.d.mts → index-Cf2WtJqJ.d.mts} +62447 -39436
- package/dist/{index-DWBA4zgW.d.ts → index-Cf2WtJqJ.d.ts} +62447 -39436
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -4
- package/dist/node.d.mts +114 -22
- package/dist/node.d.ts +114 -22
- package/dist/node.js +1561 -687
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +1253 -379
- package/dist/node.mjs.map +1 -1
- package/examples/node/custom-model-editing-disposable.sh +1 -1
- package/examples/node/rest-api.ts +55 -0
- package/examples/node/start-workstream.ts +76 -0
- package/package.json +13 -3
- package/dist/chunk-OBPHU4RT.js.map +0 -1
- package/dist/chunk-TWAVPIPS.mjs.map +0 -1
package/dist/node.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5;
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -488,7 +488,43 @@
|
|
|
488
488
|
|
|
489
489
|
|
|
490
490
|
|
|
491
|
-
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
var _chunkKAAWCHO4js = require('./chunk-KAAWCHO4.js');
|
|
527
|
+
require('./chunk-ZQ7TS73S.js');
|
|
492
528
|
|
|
493
529
|
// src/exec-core/client.ts
|
|
494
530
|
var _events = require('events'); var _events2 = _interopRequireDefault(_events);
|
|
@@ -497,7 +533,7 @@ var _zod = require('zod');
|
|
|
497
533
|
|
|
498
534
|
// src/exec-core/constants.ts
|
|
499
535
|
var DEFAULT_REQUEST_TIMEOUT2 = 3e4;
|
|
500
|
-
var SESSION_INIT_TIMEOUT2 =
|
|
536
|
+
var SESSION_INIT_TIMEOUT2 = 12e4;
|
|
501
537
|
var COMPACTION_TIMEOUT2 = 24e4;
|
|
502
538
|
var MCP_AUTH_TIMEOUT2 = 3e5;
|
|
503
539
|
var WINDOWS_JOB_OBJECT_ERROR_MARKER = "AssignProcessToJobObject";
|
|
@@ -631,7 +667,7 @@ function createLogger(observability, fallback) {
|
|
|
631
667
|
const sinkFailureOptions = createSinkFailureOptions(fallback);
|
|
632
668
|
return {
|
|
633
669
|
info(message, metadata) {
|
|
634
|
-
|
|
670
|
+
_chunkKAAWCHO4js.emitDroidLog.call(void 0,
|
|
635
671
|
sinkObservability,
|
|
636
672
|
{
|
|
637
673
|
level: "info",
|
|
@@ -643,7 +679,7 @@ function createLogger(observability, fallback) {
|
|
|
643
679
|
);
|
|
644
680
|
},
|
|
645
681
|
warn(message, metadata) {
|
|
646
|
-
|
|
682
|
+
_chunkKAAWCHO4js.emitDroidLog.call(void 0,
|
|
647
683
|
sinkObservability,
|
|
648
684
|
{
|
|
649
685
|
level: "warn",
|
|
@@ -655,7 +691,7 @@ function createLogger(observability, fallback) {
|
|
|
655
691
|
);
|
|
656
692
|
},
|
|
657
693
|
exception(error, message, metadata) {
|
|
658
|
-
|
|
694
|
+
_chunkKAAWCHO4js.emitDroidLog.call(void 0,
|
|
659
695
|
sinkObservability,
|
|
660
696
|
{
|
|
661
697
|
level: "error",
|
|
@@ -678,7 +714,7 @@ function createMetrics(observability, fallback, failureLogger) {
|
|
|
678
714
|
const sinkFailureOptions = createSinkFailureOptions(failureLogger);
|
|
679
715
|
return {
|
|
680
716
|
addToCounter(metric, value, tags) {
|
|
681
|
-
|
|
717
|
+
_chunkKAAWCHO4js.recordDroidMetric.call(void 0,
|
|
682
718
|
sinkObservability,
|
|
683
719
|
{
|
|
684
720
|
name: metric,
|
|
@@ -691,7 +727,7 @@ function createMetrics(observability, fallback, failureLogger) {
|
|
|
691
727
|
);
|
|
692
728
|
},
|
|
693
729
|
recordDuration(metric, valueMs, tags) {
|
|
694
|
-
|
|
730
|
+
_chunkKAAWCHO4js.recordDroidMetric.call(void 0,
|
|
695
731
|
sinkObservability,
|
|
696
732
|
{
|
|
697
733
|
name: metric,
|
|
@@ -718,7 +754,7 @@ function createTracing(observability, fallback, failureLogger) {
|
|
|
718
754
|
},
|
|
719
755
|
injectContext(meta) {
|
|
720
756
|
const carrier = {};
|
|
721
|
-
if (!
|
|
757
|
+
if (!_chunkKAAWCHO4js.injectDroidTraceContext.call(void 0, sinkObservability, carrier, sinkFailureOptions)) {
|
|
722
758
|
return;
|
|
723
759
|
}
|
|
724
760
|
if (carrier.traceparent !== void 0) {
|
|
@@ -742,16 +778,21 @@ function resolveExecCoreDeps(observability, fallback = defaultExecCoreDeps) {
|
|
|
742
778
|
}
|
|
743
779
|
|
|
744
780
|
// src/exec-core/client.ts
|
|
745
|
-
function
|
|
746
|
-
const
|
|
747
|
-
return
|
|
781
|
+
function isDroidConnectionEnded(error) {
|
|
782
|
+
const failure = error instanceof _chunkKAAWCHO4js.ProtocolError ? error.cause : error;
|
|
783
|
+
return failure instanceof _chunkKAAWCHO4js.DroidConnectionEndedError || failure instanceof _chunkKAAWCHO4js.ProcessExitError;
|
|
748
784
|
}
|
|
749
|
-
var JsonRpcEnvelopePeekSchema =
|
|
750
|
-
type: _zod.z.nativeEnum(
|
|
785
|
+
var JsonRpcEnvelopePeekSchema = _chunkKAAWCHO4js.JsonRpcEnvelopeSchema.partial().extend({
|
|
786
|
+
type: _zod.z.nativeEnum(_chunkKAAWCHO4js.JsonRpcMessageType).optional(),
|
|
751
787
|
method: _zod.z.string().optional(),
|
|
752
788
|
id: _zod.z.string().nullable().optional()
|
|
753
789
|
}).passthrough();
|
|
790
|
+
function getResponseId(response2) {
|
|
791
|
+
const parsed = JsonRpcEnvelopePeekSchema.safeParse(response2);
|
|
792
|
+
return parsed.success ? parsed.data.id : void 0;
|
|
793
|
+
}
|
|
754
794
|
var MCP_OAUTH_OPT_OUT_PROTOCOL_VERSION = "1.78.0";
|
|
795
|
+
var PERMISSION_WITHDRAWN = /* @__PURE__ */ Symbol("permission withdrawn");
|
|
755
796
|
function inspectJsonRpcEnvelope2(message) {
|
|
756
797
|
const result = JsonRpcEnvelopePeekSchema.safeParse(message);
|
|
757
798
|
if (!result.success) {
|
|
@@ -759,8 +800,8 @@ function inspectJsonRpcEnvelope2(message) {
|
|
|
759
800
|
}
|
|
760
801
|
const envelope = result.data;
|
|
761
802
|
return {
|
|
762
|
-
protocolVersionMismatch: envelope.factoryProtocolVersion !== void 0 && envelope.factoryProtocolVersion !==
|
|
763
|
-
localFactoryProtocolVersion:
|
|
803
|
+
protocolVersionMismatch: envelope.factoryProtocolVersion !== void 0 && envelope.factoryProtocolVersion !== _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION ? {
|
|
804
|
+
localFactoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
764
805
|
peerFactoryProtocolVersion: envelope.factoryProtocolVersion,
|
|
765
806
|
messageType: envelope.type,
|
|
766
807
|
method: envelope.method,
|
|
@@ -778,22 +819,37 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
778
819
|
__init4() {this.pickOptionsHandlers = /* @__PURE__ */ new Map()}
|
|
779
820
|
__init5() {this.pendingPermissionRequests = /* @__PURE__ */ new Map()}
|
|
780
821
|
__init6() {this.pendingAskUserRequests = /* @__PURE__ */ new Map()}
|
|
781
|
-
|
|
782
|
-
|
|
822
|
+
/**
|
|
823
|
+
* Queued (non-blocking) AskUser requests that arrived before an AskUser
|
|
824
|
+
* handler was set, as when a reloaded session asks its pending queued sets
|
|
825
|
+
* again during the load. Answering one without a handler would record it
|
|
826
|
+
* as dismissed, and the agent never waits on it, so it waits for the
|
|
827
|
+
* handler instead.
|
|
828
|
+
*/
|
|
829
|
+
__init7() {this.heldQueuedAskUserRequests = []}
|
|
830
|
+
__init8() {this.pendingPickOptionsRequests = /* @__PURE__ */ new Map()}
|
|
831
|
+
__init9() {this.currentSessionId = null}
|
|
783
832
|
|
|
833
|
+
__init10() {this.peerEnforcesQueueOwnership = false}
|
|
784
834
|
/**
|
|
785
835
|
* Sticky error from a transport failure. Once set, all subsequent
|
|
786
836
|
* `sendRequest()` calls throw this error immediately, preventing
|
|
787
837
|
* requests from hanging on a dead transport.
|
|
788
838
|
*/
|
|
789
|
-
|
|
790
|
-
|
|
839
|
+
__init11() {this.transportError = null}
|
|
840
|
+
__init12() {this.completedTurnObserved = false}
|
|
841
|
+
/**
|
|
842
|
+
* Set once the droid sends `droid.disconnect`. It reads no further
|
|
843
|
+
* requests from then on, so it no longer counts as connected even while its
|
|
844
|
+
* transport stays open.
|
|
845
|
+
*/
|
|
846
|
+
__init13() {this.disconnected = false}
|
|
791
847
|
|
|
792
848
|
|
|
793
849
|
|
|
794
850
|
|
|
795
851
|
constructor(options, deps = defaultExecCoreDeps) {
|
|
796
|
-
super();_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);_class.prototype.__init9.call(this);_class.prototype.__init10.call(this);;
|
|
852
|
+
super();_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);_class.prototype.__init9.call(this);_class.prototype.__init10.call(this);_class.prototype.__init11.call(this);_class.prototype.__init12.call(this);_class.prototype.__init13.call(this);;
|
|
797
853
|
const resolved = resolveExecCoreDeps(options.observability, deps);
|
|
798
854
|
this.transport = options.transport;
|
|
799
855
|
this.logger = resolved.logger;
|
|
@@ -815,20 +871,10 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
815
871
|
});
|
|
816
872
|
this.transport.onError((error) => {
|
|
817
873
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
818
|
-
const
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
hasPendingIdlessSessionStart = true;
|
|
823
|
-
} else if (pendingRequest.sessionId !== void 0) {
|
|
824
|
-
pendingSessionIds.add(pendingRequest.sessionId);
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
const pendingSessionId = pendingSessionIds.size === 1 ? pendingSessionIds.values().next().value : void 0;
|
|
828
|
-
const sessionId = hasPendingIdlessSessionStart || pendingSessionIds.size > 1 ? void 0 : _nullishCoalesce(_nullishCoalesce(pendingSessionId, () => ( this.currentSessionId)), () => ( void 0));
|
|
829
|
-
const expectedCleanExit = err instanceof _chunkOBPHU4RTjs.ProcessExitError && err.exitCode === 0 && this.completedTurnObserved;
|
|
830
|
-
if (expectedCleanExit) {
|
|
831
|
-
this.logger.info("[DroidClient] Process exited after completed turn", {
|
|
874
|
+
const sessionId = this.addressedSessionId;
|
|
875
|
+
const expectedExit = err instanceof _chunkKAAWCHO4js.ProcessExitError && (err.isRequestedStop || err.exitCode === 0 && this.completedTurnObserved);
|
|
876
|
+
if (expectedExit) {
|
|
877
|
+
this.logger.info("[DroidClient] Process exited as expected", {
|
|
832
878
|
sessionId,
|
|
833
879
|
exitCode: err.exitCode,
|
|
834
880
|
signal: err.signal
|
|
@@ -854,21 +900,61 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
854
900
|
get sessionId() {
|
|
855
901
|
return this.currentSessionId;
|
|
856
902
|
}
|
|
903
|
+
/**
|
|
904
|
+
* The session that an inbound prompt or transport fault belongs to. A
|
|
905
|
+
* session start or load in flight owns it, because the CLI replays a loaded
|
|
906
|
+
* session's pending prompts before it answers the load; otherwise the
|
|
907
|
+
* current session does. Undefined when that is ambiguous: a start with no
|
|
908
|
+
* session id yet, or several starts and loads in flight.
|
|
909
|
+
*
|
|
910
|
+
* @internal
|
|
911
|
+
*/
|
|
912
|
+
get addressedSessionId() {
|
|
913
|
+
const pendingSessionIds = /* @__PURE__ */ new Set();
|
|
914
|
+
for (const pendingRequest of this.pendingRequests.values()) {
|
|
915
|
+
if (pendingRequest.method === "droid.initialize_session" /* INITIALIZE_SESSION */ && pendingRequest.sessionId === void 0) {
|
|
916
|
+
return void 0;
|
|
917
|
+
}
|
|
918
|
+
if (pendingRequest.sessionId !== void 0) {
|
|
919
|
+
pendingSessionIds.add(pendingRequest.sessionId);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
if (pendingSessionIds.size > 1) {
|
|
923
|
+
return void 0;
|
|
924
|
+
}
|
|
925
|
+
const [pendingSessionId] = pendingSessionIds;
|
|
926
|
+
return _nullishCoalesce(_nullishCoalesce(pendingSessionId, () => ( this.currentSessionId)), () => ( void 0));
|
|
927
|
+
}
|
|
857
928
|
get isConnected() {
|
|
858
|
-
return this.transport.isConnected;
|
|
929
|
+
return !this.disconnected && this.transport.isConnected;
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Whether the worker runs in a child process. A daemon's shutdown cuts such
|
|
933
|
+
* a worker off from its owner before closing it, and from then on it reads
|
|
934
|
+
* no request; a worker hosted in this process still answers.
|
|
935
|
+
*/
|
|
936
|
+
get runsInChildProcess() {
|
|
937
|
+
return (_nullishCoalesce(_optionalChain([this, 'access', _6 => _6.transport, 'access', _7 => _7.getManagedProcess, 'optionalCall', _8 => _8()]), () => ( null))) !== null;
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* Whether the runner refuses a queue change from someone other than the
|
|
941
|
+
* prompt's author. Older runners ignore the author on such a change.
|
|
942
|
+
*/
|
|
943
|
+
get enforcesQueueOwnership() {
|
|
944
|
+
return this.peerEnforcesQueueOwnership;
|
|
859
945
|
}
|
|
860
946
|
requireMcpOAuthOptOutSupport() {
|
|
861
|
-
if (
|
|
947
|
+
if (_chunkKAAWCHO4js.isProtocolVersionAtLeast.call(void 0,
|
|
862
948
|
this.peerProtocolVersion,
|
|
863
949
|
MCP_OAUTH_OPT_OUT_PROTOCOL_VERSION
|
|
864
950
|
)) {
|
|
865
951
|
return;
|
|
866
952
|
}
|
|
867
|
-
throw new (0,
|
|
953
|
+
throw new (0, _chunkKAAWCHO4js.ProtocolError)(
|
|
868
954
|
`MCP OAuth opt-out requires Droid protocol version ${MCP_OAUTH_OPT_OUT_PROTOCOL_VERSION} or newer. The connected Droid reported an older or unknown protocol version and cannot disable OAuth for MCP servers.`,
|
|
869
955
|
{
|
|
870
956
|
value: {
|
|
871
|
-
localFactoryProtocolVersion:
|
|
957
|
+
localFactoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
872
958
|
minimumFactoryProtocolVersion: MCP_OAUTH_OPT_OUT_PROTOCOL_VERSION,
|
|
873
959
|
peerFactoryProtocolVersion: this.peerProtocolVersion
|
|
874
960
|
}
|
|
@@ -876,46 +962,47 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
876
962
|
);
|
|
877
963
|
}
|
|
878
964
|
validateMcpServersProtocolSupport(mcpServers) {
|
|
879
|
-
if (_optionalChain([mcpServers, 'optionalAccess',
|
|
965
|
+
if (_optionalChain([mcpServers, 'optionalAccess', _9 => _9.some, 'call', _10 => _10((server) => "oauth" in server && server.oauth === false)])) {
|
|
880
966
|
this.requireMcpOAuthOptOutSupport();
|
|
881
967
|
}
|
|
882
968
|
}
|
|
883
969
|
async initializeSession(params) {
|
|
884
970
|
const request = {
|
|
885
|
-
factoryApiVersion:
|
|
886
|
-
factoryProtocolVersion:
|
|
971
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
972
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
887
973
|
type: "request",
|
|
888
|
-
jsonrpc:
|
|
974
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
889
975
|
id: _uuid.v4.call(void 0, ),
|
|
890
976
|
method: "droid.initialize_session" /* INITIALIZE_SESSION */,
|
|
891
|
-
params
|
|
977
|
+
params: _chunkKAAWCHO4js.encodeLegacyStartupLoadOptions.call(void 0, params)
|
|
892
978
|
};
|
|
893
979
|
const rawResponse = await this.sendRequest(
|
|
894
980
|
request,
|
|
895
981
|
this.sessionInitTimeout,
|
|
896
982
|
params.sessionId
|
|
897
983
|
);
|
|
898
|
-
const
|
|
899
|
-
this.peerProtocolVersion =
|
|
900
|
-
if (
|
|
901
|
-
throw new (0,
|
|
984
|
+
const response2 = _chunkKAAWCHO4js.InitializeSessionResponseSchema.parse(rawResponse);
|
|
985
|
+
this.peerProtocolVersion = response2.factoryProtocolVersion;
|
|
986
|
+
if (response2.error) {
|
|
987
|
+
throw new (0, _chunkKAAWCHO4js.ProtocolError)("Initialize session request failed", {
|
|
902
988
|
requestId: request.id,
|
|
903
|
-
code:
|
|
904
|
-
message:
|
|
905
|
-
data:
|
|
989
|
+
code: response2.error.code,
|
|
990
|
+
message: response2.error.message,
|
|
991
|
+
data: response2.error.data
|
|
906
992
|
});
|
|
907
993
|
}
|
|
908
994
|
this.validateMcpServersProtocolSupport(params.mcpServers);
|
|
909
|
-
const result =
|
|
995
|
+
const result = _chunkKAAWCHO4js.InitializeSessionResultSchema.parse(response2.result);
|
|
996
|
+
this.peerEnforcesQueueOwnership = result.enforcesQueueOwnership === true;
|
|
910
997
|
this.currentSessionId = result.sessionId;
|
|
911
|
-
return
|
|
998
|
+
return response2;
|
|
912
999
|
}
|
|
913
1000
|
async loadSession(params) {
|
|
914
1001
|
const request = {
|
|
915
|
-
factoryApiVersion:
|
|
916
|
-
factoryProtocolVersion:
|
|
1002
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1003
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
917
1004
|
type: "request",
|
|
918
|
-
jsonrpc:
|
|
1005
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
919
1006
|
id: _uuid.v4.call(void 0, ),
|
|
920
1007
|
method: "droid.load_session" /* LOAD_SESSION */,
|
|
921
1008
|
params
|
|
@@ -925,41 +1012,42 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
925
1012
|
this.sessionInitTimeout,
|
|
926
1013
|
params.sessionId
|
|
927
1014
|
);
|
|
928
|
-
const
|
|
929
|
-
this.peerProtocolVersion =
|
|
930
|
-
if (
|
|
931
|
-
const isSessionNotFound =
|
|
1015
|
+
const response2 = _chunkKAAWCHO4js.LoadSessionResponseSchema.parse(rawResponse);
|
|
1016
|
+
this.peerProtocolVersion = response2.factoryProtocolVersion;
|
|
1017
|
+
if (response2.error) {
|
|
1018
|
+
const isSessionNotFound = response2.error.code === -32004 /* ENTITY_NOT_FOUND */;
|
|
932
1019
|
if (isSessionNotFound) {
|
|
933
|
-
throw new (0,
|
|
1020
|
+
throw new (0, _chunkKAAWCHO4js.SessionNotFoundError)(params.sessionId, {
|
|
934
1021
|
requestId: request.id,
|
|
935
|
-
code:
|
|
936
|
-
message:
|
|
937
|
-
data:
|
|
1022
|
+
code: response2.error.code,
|
|
1023
|
+
message: response2.error.message,
|
|
1024
|
+
data: response2.error.data
|
|
938
1025
|
});
|
|
939
1026
|
}
|
|
940
|
-
throw new (0,
|
|
1027
|
+
throw new (0, _chunkKAAWCHO4js.ProtocolError)("Load session request failed", {
|
|
941
1028
|
requestId: request.id,
|
|
942
|
-
code:
|
|
943
|
-
message:
|
|
944
|
-
data:
|
|
1029
|
+
code: response2.error.code,
|
|
1030
|
+
message: response2.error.message,
|
|
1031
|
+
data: response2.error.data
|
|
945
1032
|
});
|
|
946
1033
|
}
|
|
947
1034
|
this.validateMcpServersProtocolSupport(params.mcpServers);
|
|
1035
|
+
this.peerEnforcesQueueOwnership = _optionalChain([response2, 'access', _11 => _11.result, 'optionalAccess', _12 => _12.enforcesQueueOwnership]) === true;
|
|
948
1036
|
this.currentSessionId = params.sessionId;
|
|
949
|
-
return
|
|
1037
|
+
return response2;
|
|
950
1038
|
}
|
|
951
1039
|
async addUserMessage(params, requestId) {
|
|
952
1040
|
if (!this.currentSessionId) {
|
|
953
|
-
throw new (0,
|
|
1041
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
954
1042
|
"No active session. Call initializeSession or loadSession first."
|
|
955
1043
|
);
|
|
956
1044
|
}
|
|
957
1045
|
this.completedTurnObserved = false;
|
|
958
1046
|
const request = {
|
|
959
|
-
factoryApiVersion:
|
|
960
|
-
factoryProtocolVersion:
|
|
1047
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1048
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
961
1049
|
type: "request",
|
|
962
|
-
jsonrpc:
|
|
1050
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
963
1051
|
id: _nullishCoalesce(requestId, () => ( _uuid.v4.call(void 0, ))),
|
|
964
1052
|
method: "droid.add_user_message" /* ADD_USER_MESSAGE */,
|
|
965
1053
|
params: {
|
|
@@ -968,16 +1056,16 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
968
1056
|
}
|
|
969
1057
|
};
|
|
970
1058
|
const rawResponse = await this.sendRequest(request);
|
|
971
|
-
const
|
|
972
|
-
if (
|
|
973
|
-
throw new (0,
|
|
1059
|
+
const response2 = _chunkKAAWCHO4js.AddUserMessageResponseSchema.parse(rawResponse);
|
|
1060
|
+
if (response2.error) {
|
|
1061
|
+
throw new (0, _chunkKAAWCHO4js.ProtocolError)("Add user message request failed", {
|
|
974
1062
|
requestId: request.id,
|
|
975
|
-
code:
|
|
976
|
-
message:
|
|
977
|
-
data:
|
|
1063
|
+
code: response2.error.code,
|
|
1064
|
+
message: response2.error.message,
|
|
1065
|
+
data: response2.error.data
|
|
978
1066
|
});
|
|
979
1067
|
}
|
|
980
|
-
return
|
|
1068
|
+
return response2;
|
|
981
1069
|
}
|
|
982
1070
|
/**
|
|
983
1071
|
* Persists user-only messages without starting an agent turn.
|
|
@@ -987,158 +1075,158 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
987
1075
|
*/
|
|
988
1076
|
async appendMessages(params, requestId) {
|
|
989
1077
|
if (!this.currentSessionId) {
|
|
990
|
-
throw new (0,
|
|
1078
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
991
1079
|
"No active session. Call initializeSession or loadSession first."
|
|
992
1080
|
);
|
|
993
1081
|
}
|
|
994
1082
|
const request = {
|
|
995
|
-
factoryApiVersion:
|
|
996
|
-
factoryProtocolVersion:
|
|
1083
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1084
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
997
1085
|
type: "request",
|
|
998
|
-
jsonrpc:
|
|
1086
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
999
1087
|
id: _nullishCoalesce(requestId, () => ( _uuid.v4.call(void 0, ))),
|
|
1000
1088
|
method: "droid.append_messages" /* APPEND_MESSAGES */,
|
|
1001
1089
|
params
|
|
1002
1090
|
};
|
|
1003
1091
|
const rawResponse = await this.sendRequest(request);
|
|
1004
|
-
const
|
|
1005
|
-
if (
|
|
1006
|
-
throw new (0,
|
|
1092
|
+
const response2 = _chunkKAAWCHO4js.AppendMessagesResponseSchema.parse(rawResponse);
|
|
1093
|
+
if (response2.error) {
|
|
1094
|
+
throw new (0, _chunkKAAWCHO4js.ProtocolError)("Append messages request failed", {
|
|
1007
1095
|
requestId: request.id,
|
|
1008
|
-
code:
|
|
1009
|
-
message:
|
|
1010
|
-
data:
|
|
1096
|
+
code: response2.error.code,
|
|
1097
|
+
message: response2.error.message,
|
|
1098
|
+
data: response2.error.data
|
|
1011
1099
|
});
|
|
1012
1100
|
}
|
|
1013
|
-
return
|
|
1101
|
+
return response2;
|
|
1014
1102
|
}
|
|
1015
1103
|
async resolveQueuedUserMessage(params) {
|
|
1016
1104
|
if (!this.currentSessionId) {
|
|
1017
|
-
throw new (0,
|
|
1105
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1018
1106
|
"No active session. Call initializeSession or loadSession first."
|
|
1019
1107
|
);
|
|
1020
1108
|
}
|
|
1021
1109
|
const request = {
|
|
1022
|
-
factoryApiVersion:
|
|
1023
|
-
factoryProtocolVersion:
|
|
1110
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1111
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1024
1112
|
type: "request",
|
|
1025
|
-
jsonrpc:
|
|
1113
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1026
1114
|
id: _uuid.v4.call(void 0, ),
|
|
1027
1115
|
method: "droid.resolve_queued_user_message" /* RESOLVE_QUEUED_USER_MESSAGE */,
|
|
1028
1116
|
params
|
|
1029
1117
|
};
|
|
1030
1118
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1031
|
-
const
|
|
1032
|
-
if (
|
|
1033
|
-
throw new (0,
|
|
1119
|
+
const response2 = _chunkKAAWCHO4js.ResolveQueuedUserMessageResponseSchema.parse(rawResponse);
|
|
1120
|
+
if (response2.error) {
|
|
1121
|
+
throw new (0, _chunkKAAWCHO4js.ProtocolError)("Resolve queued user message request failed", {
|
|
1034
1122
|
requestId: request.id,
|
|
1035
|
-
code:
|
|
1036
|
-
message:
|
|
1037
|
-
data:
|
|
1123
|
+
code: response2.error.code,
|
|
1124
|
+
message: response2.error.message,
|
|
1125
|
+
data: response2.error.data
|
|
1038
1126
|
});
|
|
1039
1127
|
}
|
|
1040
|
-
return
|
|
1128
|
+
return response2;
|
|
1041
1129
|
}
|
|
1042
1130
|
async interruptSession(params = {}) {
|
|
1043
1131
|
if (!this.currentSessionId) {
|
|
1044
|
-
throw new (0,
|
|
1132
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1045
1133
|
"No active session. Call initializeSession or loadSession first."
|
|
1046
1134
|
);
|
|
1047
1135
|
}
|
|
1048
1136
|
const request = {
|
|
1049
|
-
factoryApiVersion:
|
|
1050
|
-
factoryProtocolVersion:
|
|
1137
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1138
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1051
1139
|
type: "request",
|
|
1052
|
-
jsonrpc:
|
|
1140
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1053
1141
|
id: _uuid.v4.call(void 0, ),
|
|
1054
1142
|
method: "droid.interrupt_session" /* INTERRUPT_SESSION */,
|
|
1055
1143
|
params
|
|
1056
1144
|
};
|
|
1057
1145
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1058
|
-
const
|
|
1059
|
-
if (
|
|
1060
|
-
throw new (0,
|
|
1146
|
+
const response2 = _chunkKAAWCHO4js.InterruptSessionResponseSchema.parse(rawResponse);
|
|
1147
|
+
if (response2.error) {
|
|
1148
|
+
throw new (0, _chunkKAAWCHO4js.ProtocolError)("Interrupt session request failed", {
|
|
1061
1149
|
requestId: request.id,
|
|
1062
|
-
code:
|
|
1063
|
-
message:
|
|
1064
|
-
data:
|
|
1150
|
+
code: response2.error.code,
|
|
1151
|
+
message: response2.error.message,
|
|
1152
|
+
data: response2.error.data
|
|
1065
1153
|
});
|
|
1066
1154
|
}
|
|
1067
|
-
return
|
|
1155
|
+
return response2;
|
|
1068
1156
|
}
|
|
1069
1157
|
async closeSession(params = {}) {
|
|
1070
1158
|
if (!this.currentSessionId) {
|
|
1071
|
-
throw new (0,
|
|
1159
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1072
1160
|
"No active session. Call initializeSession or loadSession first."
|
|
1073
1161
|
);
|
|
1074
1162
|
}
|
|
1075
1163
|
const request = {
|
|
1076
|
-
factoryApiVersion:
|
|
1077
|
-
factoryProtocolVersion:
|
|
1164
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1165
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1078
1166
|
type: "request",
|
|
1079
|
-
jsonrpc:
|
|
1167
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1080
1168
|
id: _uuid.v4.call(void 0, ),
|
|
1081
1169
|
method: "droid.close_session" /* CLOSE_SESSION */,
|
|
1082
1170
|
params
|
|
1083
1171
|
};
|
|
1084
1172
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1085
|
-
const
|
|
1086
|
-
if (
|
|
1087
|
-
throw new (0,
|
|
1173
|
+
const response2 = _chunkKAAWCHO4js.CloseSessionResponseSchema.parse(rawResponse);
|
|
1174
|
+
if (response2.error) {
|
|
1175
|
+
throw new (0, _chunkKAAWCHO4js.ProtocolError)("Close session request failed", {
|
|
1088
1176
|
requestId: request.id,
|
|
1089
|
-
code:
|
|
1090
|
-
message:
|
|
1091
|
-
data:
|
|
1177
|
+
code: response2.error.code,
|
|
1178
|
+
message: response2.error.message,
|
|
1179
|
+
data: response2.error.data
|
|
1092
1180
|
});
|
|
1093
1181
|
}
|
|
1094
|
-
return
|
|
1182
|
+
return response2;
|
|
1095
1183
|
}
|
|
1096
1184
|
async killWorkerSession(params) {
|
|
1097
1185
|
if (!this.currentSessionId) {
|
|
1098
|
-
throw new (0,
|
|
1186
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1099
1187
|
"No active session. Call initializeSession or loadSession first."
|
|
1100
1188
|
);
|
|
1101
1189
|
}
|
|
1102
1190
|
const request = {
|
|
1103
|
-
factoryApiVersion:
|
|
1104
|
-
factoryProtocolVersion:
|
|
1191
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1192
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1105
1193
|
type: "request",
|
|
1106
|
-
jsonrpc:
|
|
1194
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1107
1195
|
id: _uuid.v4.call(void 0, ),
|
|
1108
1196
|
method: "droid.kill_worker_session" /* KILL_WORKER_SESSION */,
|
|
1109
1197
|
params
|
|
1110
1198
|
};
|
|
1111
1199
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1112
|
-
const
|
|
1113
|
-
if (
|
|
1114
|
-
throw new (0,
|
|
1200
|
+
const response2 = _chunkKAAWCHO4js.KillWorkerSessionResponseSchema.parse(rawResponse);
|
|
1201
|
+
if (response2.error) {
|
|
1202
|
+
throw new (0, _chunkKAAWCHO4js.ProtocolError)("Kill worker session request failed", {
|
|
1115
1203
|
requestId: request.id,
|
|
1116
|
-
code:
|
|
1117
|
-
message:
|
|
1118
|
-
data:
|
|
1204
|
+
code: response2.error.code,
|
|
1205
|
+
message: response2.error.message,
|
|
1206
|
+
data: response2.error.data
|
|
1119
1207
|
});
|
|
1120
1208
|
}
|
|
1121
|
-
return
|
|
1209
|
+
return response2;
|
|
1122
1210
|
}
|
|
1123
1211
|
async updateSessionSettings(params, requestId) {
|
|
1124
1212
|
if (!this.currentSessionId) {
|
|
1125
|
-
throw new (0,
|
|
1213
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1126
1214
|
"No active session. Call initializeSession or loadSession first."
|
|
1127
1215
|
);
|
|
1128
1216
|
}
|
|
1129
1217
|
const request = {
|
|
1130
|
-
factoryApiVersion:
|
|
1131
|
-
factoryProtocolVersion:
|
|
1218
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1219
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1132
1220
|
type: "request",
|
|
1133
|
-
jsonrpc:
|
|
1221
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1134
1222
|
id: _nullishCoalesce(requestId, () => ( _uuid.v4.call(void 0, ))),
|
|
1135
1223
|
method: "droid.update_session_settings" /* UPDATE_SESSION_SETTINGS */,
|
|
1136
|
-
params
|
|
1224
|
+
params: _chunkKAAWCHO4js.sessionTagsUpdateForPeer.call(void 0, params, this.peerProtocolVersion)
|
|
1137
1225
|
};
|
|
1138
1226
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1139
|
-
const responseParsed =
|
|
1227
|
+
const responseParsed = _chunkKAAWCHO4js.UpdateSessionSettingsResponseSchema.safeParse(rawResponse);
|
|
1140
1228
|
if (!responseParsed.success) {
|
|
1141
|
-
throw new (0,
|
|
1229
|
+
throw new (0, _chunkKAAWCHO4js.ProtocolError)(
|
|
1142
1230
|
"Invalid update session settings response format",
|
|
1143
1231
|
{
|
|
1144
1232
|
requestId: request.id,
|
|
@@ -1148,55 +1236,55 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1148
1236
|
}
|
|
1149
1237
|
);
|
|
1150
1238
|
}
|
|
1151
|
-
const
|
|
1152
|
-
if (
|
|
1153
|
-
throw new (0,
|
|
1239
|
+
const response2 = responseParsed.data;
|
|
1240
|
+
if (response2.error) {
|
|
1241
|
+
throw new (0, _chunkKAAWCHO4js.ProtocolError)("Update session settings request failed", {
|
|
1154
1242
|
requestId: request.id,
|
|
1155
|
-
code:
|
|
1156
|
-
message:
|
|
1157
|
-
data:
|
|
1243
|
+
code: response2.error.code,
|
|
1244
|
+
message: response2.error.message,
|
|
1245
|
+
data: response2.error.data
|
|
1158
1246
|
});
|
|
1159
1247
|
}
|
|
1160
|
-
return
|
|
1248
|
+
return response2;
|
|
1161
1249
|
}
|
|
1162
1250
|
async changeWorkingDirectory(params) {
|
|
1163
1251
|
if (!this.currentSessionId) {
|
|
1164
|
-
throw new (0,
|
|
1252
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1165
1253
|
"No active session. Call initializeSession or loadSession first."
|
|
1166
1254
|
);
|
|
1167
1255
|
}
|
|
1168
1256
|
const request = {
|
|
1169
|
-
factoryApiVersion:
|
|
1170
|
-
factoryProtocolVersion:
|
|
1257
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1258
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1171
1259
|
type: "request",
|
|
1172
|
-
jsonrpc:
|
|
1260
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1173
1261
|
id: _uuid.v4.call(void 0, ),
|
|
1174
1262
|
method: "droid.change_working_directory" /* CHANGE_WORKING_DIRECTORY */,
|
|
1175
1263
|
params
|
|
1176
1264
|
};
|
|
1177
1265
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1178
|
-
const
|
|
1179
|
-
if (
|
|
1180
|
-
throw new (0,
|
|
1266
|
+
const response2 = _chunkKAAWCHO4js.ChangeWorkingDirectoryResponseSchema.parse(rawResponse);
|
|
1267
|
+
if (response2.error) {
|
|
1268
|
+
throw new (0, _chunkKAAWCHO4js.ProtocolError)("Change working directory request failed", {
|
|
1181
1269
|
requestId: request.id,
|
|
1182
|
-
code:
|
|
1183
|
-
message:
|
|
1184
|
-
data:
|
|
1270
|
+
code: response2.error.code,
|
|
1271
|
+
message: response2.error.message,
|
|
1272
|
+
data: response2.error.data
|
|
1185
1273
|
});
|
|
1186
1274
|
}
|
|
1187
|
-
return
|
|
1275
|
+
return response2;
|
|
1188
1276
|
}
|
|
1189
1277
|
async toggleMcpServer(params) {
|
|
1190
1278
|
if (!this.currentSessionId) {
|
|
1191
|
-
throw new (0,
|
|
1279
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1192
1280
|
"No active session. Call initializeSession or loadSession first."
|
|
1193
1281
|
);
|
|
1194
1282
|
}
|
|
1195
1283
|
const request = {
|
|
1196
|
-
factoryApiVersion:
|
|
1197
|
-
factoryProtocolVersion:
|
|
1284
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1285
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1198
1286
|
type: "request",
|
|
1199
|
-
jsonrpc:
|
|
1287
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1200
1288
|
id: _uuid.v4.call(void 0, ),
|
|
1201
1289
|
method: "droid.toggle_mcp_server" /* TOGGLE_MCP_SERVER */,
|
|
1202
1290
|
params: {
|
|
@@ -1206,20 +1294,20 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1206
1294
|
}
|
|
1207
1295
|
};
|
|
1208
1296
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1209
|
-
const
|
|
1210
|
-
return
|
|
1297
|
+
const response2 = _chunkKAAWCHO4js.ToggleMcpServerResponseSchema.parse(rawResponse);
|
|
1298
|
+
return response2;
|
|
1211
1299
|
}
|
|
1212
1300
|
async authenticateMcpServer(params) {
|
|
1213
1301
|
if (!this.currentSessionId) {
|
|
1214
|
-
throw new (0,
|
|
1302
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1215
1303
|
"No active session. Call initializeSession or loadSession first."
|
|
1216
1304
|
);
|
|
1217
1305
|
}
|
|
1218
1306
|
const request = {
|
|
1219
|
-
factoryApiVersion:
|
|
1220
|
-
factoryProtocolVersion:
|
|
1307
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1308
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1221
1309
|
type: "request",
|
|
1222
|
-
jsonrpc:
|
|
1310
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1223
1311
|
id: _uuid.v4.call(void 0, ),
|
|
1224
1312
|
method: "droid.authenticate_mcp_server" /* AUTHENTICATE_MCP_SERVER */,
|
|
1225
1313
|
params: {
|
|
@@ -1227,20 +1315,20 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1227
1315
|
}
|
|
1228
1316
|
};
|
|
1229
1317
|
const rawResponse = await this.sendRequest(request, MCP_AUTH_TIMEOUT2);
|
|
1230
|
-
const
|
|
1231
|
-
return
|
|
1318
|
+
const response2 = _chunkKAAWCHO4js.AuthenticateMcpServerResponseSchema.parse(rawResponse);
|
|
1319
|
+
return response2;
|
|
1232
1320
|
}
|
|
1233
1321
|
async cancelMcpAuth(params) {
|
|
1234
1322
|
if (!this.currentSessionId) {
|
|
1235
|
-
throw new (0,
|
|
1323
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1236
1324
|
"No active session. Call initializeSession or loadSession first."
|
|
1237
1325
|
);
|
|
1238
1326
|
}
|
|
1239
1327
|
const request = {
|
|
1240
|
-
factoryApiVersion:
|
|
1241
|
-
factoryProtocolVersion:
|
|
1328
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1329
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1242
1330
|
type: "request",
|
|
1243
|
-
jsonrpc:
|
|
1331
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1244
1332
|
id: _uuid.v4.call(void 0, ),
|
|
1245
1333
|
method: "droid.cancel_mcp_auth" /* CANCEL_MCP_AUTH */,
|
|
1246
1334
|
params: {
|
|
@@ -1248,20 +1336,20 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1248
1336
|
}
|
|
1249
1337
|
};
|
|
1250
1338
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1251
|
-
const
|
|
1252
|
-
return
|
|
1339
|
+
const response2 = _chunkKAAWCHO4js.CancelMcpAuthResponseSchema.parse(rawResponse);
|
|
1340
|
+
return response2;
|
|
1253
1341
|
}
|
|
1254
1342
|
async clearMcpAuth(params) {
|
|
1255
1343
|
if (!this.currentSessionId) {
|
|
1256
|
-
throw new (0,
|
|
1344
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1257
1345
|
"No active session. Call initializeSession or loadSession first."
|
|
1258
1346
|
);
|
|
1259
1347
|
}
|
|
1260
1348
|
const request = {
|
|
1261
|
-
factoryApiVersion:
|
|
1262
|
-
factoryProtocolVersion:
|
|
1349
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1350
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1263
1351
|
type: "request",
|
|
1264
|
-
jsonrpc:
|
|
1352
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1265
1353
|
id: _uuid.v4.call(void 0, ),
|
|
1266
1354
|
method: "droid.clear_mcp_auth" /* CLEAR_MCP_AUTH */,
|
|
1267
1355
|
params: {
|
|
@@ -1269,12 +1357,12 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1269
1357
|
}
|
|
1270
1358
|
};
|
|
1271
1359
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1272
|
-
const
|
|
1273
|
-
return
|
|
1360
|
+
const response2 = _chunkKAAWCHO4js.ClearMcpAuthResponseSchema.parse(rawResponse);
|
|
1361
|
+
return response2;
|
|
1274
1362
|
}
|
|
1275
1363
|
async addMcpServer(params) {
|
|
1276
1364
|
if (!this.currentSessionId) {
|
|
1277
|
-
throw new (0,
|
|
1365
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1278
1366
|
"No active session. Call initializeSession or loadSession first."
|
|
1279
1367
|
);
|
|
1280
1368
|
}
|
|
@@ -1282,129 +1370,129 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1282
1370
|
this.requireMcpOAuthOptOutSupport();
|
|
1283
1371
|
}
|
|
1284
1372
|
const request = {
|
|
1285
|
-
factoryApiVersion:
|
|
1286
|
-
factoryProtocolVersion:
|
|
1373
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1374
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1287
1375
|
type: "request",
|
|
1288
|
-
jsonrpc:
|
|
1376
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1289
1377
|
id: _uuid.v4.call(void 0, ),
|
|
1290
1378
|
method: "droid.add_mcp_server" /* ADD_MCP_SERVER */,
|
|
1291
1379
|
params
|
|
1292
1380
|
};
|
|
1293
1381
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1294
|
-
const
|
|
1295
|
-
return
|
|
1382
|
+
const response2 = _chunkKAAWCHO4js.AddMcpServerResponseSchema.parse(rawResponse);
|
|
1383
|
+
return response2;
|
|
1296
1384
|
}
|
|
1297
1385
|
async removeMcpServer(params) {
|
|
1298
1386
|
if (!this.currentSessionId) {
|
|
1299
|
-
throw new (0,
|
|
1387
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1300
1388
|
"No active session. Call initializeSession or loadSession first."
|
|
1301
1389
|
);
|
|
1302
1390
|
}
|
|
1303
1391
|
const request = {
|
|
1304
|
-
factoryApiVersion:
|
|
1305
|
-
factoryProtocolVersion:
|
|
1392
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1393
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1306
1394
|
type: "request",
|
|
1307
|
-
jsonrpc:
|
|
1395
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1308
1396
|
id: _uuid.v4.call(void 0, ),
|
|
1309
1397
|
method: "droid.remove_mcp_server" /* REMOVE_MCP_SERVER */,
|
|
1310
1398
|
params
|
|
1311
1399
|
};
|
|
1312
1400
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1313
|
-
const
|
|
1314
|
-
return
|
|
1401
|
+
const response2 = _chunkKAAWCHO4js.RemoveMcpServerResponseSchema.parse(rawResponse);
|
|
1402
|
+
return response2;
|
|
1315
1403
|
}
|
|
1316
1404
|
async listModels(params = {}) {
|
|
1317
1405
|
const request = {
|
|
1318
|
-
factoryApiVersion:
|
|
1319
|
-
factoryProtocolVersion:
|
|
1406
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1407
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1320
1408
|
type: "request",
|
|
1321
|
-
jsonrpc:
|
|
1409
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1322
1410
|
id: _uuid.v4.call(void 0, ),
|
|
1323
1411
|
method: "droid.list_models" /* LIST_MODELS */,
|
|
1324
1412
|
params
|
|
1325
1413
|
};
|
|
1326
1414
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1327
|
-
return
|
|
1415
|
+
return _chunkKAAWCHO4js.ListModelsResponseSchema.parse(rawResponse);
|
|
1328
1416
|
}
|
|
1329
1417
|
async listMcpRegistry() {
|
|
1330
1418
|
if (!this.currentSessionId) {
|
|
1331
|
-
throw new (0,
|
|
1419
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1332
1420
|
"No active session. Call initializeSession or loadSession first."
|
|
1333
1421
|
);
|
|
1334
1422
|
}
|
|
1335
1423
|
const request = {
|
|
1336
|
-
factoryApiVersion:
|
|
1337
|
-
factoryProtocolVersion:
|
|
1424
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1425
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1338
1426
|
type: "request",
|
|
1339
|
-
jsonrpc:
|
|
1427
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1340
1428
|
id: _uuid.v4.call(void 0, ),
|
|
1341
1429
|
method: "droid.list_mcp_registry" /* LIST_MCP_REGISTRY */,
|
|
1342
1430
|
params: {}
|
|
1343
1431
|
};
|
|
1344
1432
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1345
|
-
const
|
|
1346
|
-
return
|
|
1433
|
+
const response2 = _chunkKAAWCHO4js.ListMcpRegistryResponseSchema.parse(rawResponse);
|
|
1434
|
+
return response2;
|
|
1347
1435
|
}
|
|
1348
1436
|
async refreshConnectorToolCatalog(params = {}) {
|
|
1349
1437
|
if (!this.currentSessionId) {
|
|
1350
|
-
throw new (0,
|
|
1438
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1351
1439
|
"No active session. Call initializeSession or loadSession first."
|
|
1352
1440
|
);
|
|
1353
1441
|
}
|
|
1354
1442
|
const request = {
|
|
1355
|
-
factoryApiVersion:
|
|
1356
|
-
factoryProtocolVersion:
|
|
1443
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1444
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1357
1445
|
type: "request",
|
|
1358
|
-
jsonrpc:
|
|
1446
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1359
1447
|
id: _uuid.v4.call(void 0, ),
|
|
1360
1448
|
method: "droid.refresh_connector_tool_catalog" /* REFRESH_CONNECTOR_TOOL_CATALOG */,
|
|
1361
1449
|
params
|
|
1362
1450
|
};
|
|
1363
|
-
const
|
|
1364
|
-
return
|
|
1451
|
+
const response2 = await this.sendRequest(request, this.requestTimeout);
|
|
1452
|
+
return _chunkKAAWCHO4js.RefreshConnectorToolCatalogResponseSchema.parse(response2);
|
|
1365
1453
|
}
|
|
1366
1454
|
async listMcpTools() {
|
|
1367
1455
|
if (!this.currentSessionId) {
|
|
1368
|
-
throw new (0,
|
|
1456
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1369
1457
|
"No active session. Call initializeSession or loadSession first."
|
|
1370
1458
|
);
|
|
1371
1459
|
}
|
|
1372
1460
|
const request = {
|
|
1373
|
-
factoryApiVersion:
|
|
1374
|
-
factoryProtocolVersion:
|
|
1461
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1462
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1375
1463
|
type: "request",
|
|
1376
|
-
jsonrpc:
|
|
1464
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1377
1465
|
id: _uuid.v4.call(void 0, ),
|
|
1378
1466
|
method: "droid.list_mcp_tools" /* LIST_MCP_TOOLS */,
|
|
1379
1467
|
params: {}
|
|
1380
1468
|
};
|
|
1381
1469
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1382
|
-
const
|
|
1383
|
-
return
|
|
1470
|
+
const response2 = _chunkKAAWCHO4js.ListMcpToolsResponseSchema.parse(rawResponse);
|
|
1471
|
+
return response2;
|
|
1384
1472
|
}
|
|
1385
1473
|
async listTools(params = {}) {
|
|
1386
1474
|
const schemasRequested = params.includeSchemas === true;
|
|
1387
1475
|
const request = {
|
|
1388
|
-
factoryApiVersion:
|
|
1389
|
-
factoryProtocolVersion:
|
|
1476
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1477
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1390
1478
|
type: "request",
|
|
1391
|
-
jsonrpc:
|
|
1479
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1392
1480
|
id: _uuid.v4.call(void 0, ),
|
|
1393
1481
|
method: "droid.list_tools" /* LIST_TOOLS */,
|
|
1394
1482
|
params
|
|
1395
1483
|
};
|
|
1396
1484
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1397
|
-
const
|
|
1398
|
-
if (!schemasRequested || !("result" in
|
|
1399
|
-
return
|
|
1485
|
+
const response2 = _chunkKAAWCHO4js.ListToolsResponseSchema.parse(rawResponse);
|
|
1486
|
+
if (!schemasRequested || !("result" in response2)) {
|
|
1487
|
+
return response2;
|
|
1400
1488
|
}
|
|
1401
|
-
const strictResult =
|
|
1402
|
-
|
|
1489
|
+
const strictResult = _chunkKAAWCHO4js.ListToolsResultWithSchemasSchema.safeParse(
|
|
1490
|
+
response2.result
|
|
1403
1491
|
);
|
|
1404
1492
|
if (strictResult.success) {
|
|
1405
|
-
return
|
|
1493
|
+
return response2;
|
|
1406
1494
|
}
|
|
1407
|
-
const result =
|
|
1495
|
+
const result = _chunkKAAWCHO4js.ListToolsResultSchema.parse(response2.result);
|
|
1408
1496
|
const missingSchemaIds = [];
|
|
1409
1497
|
for (const tool2 of result.tools) {
|
|
1410
1498
|
if (tool2.schemas === void 0) {
|
|
@@ -1412,7 +1500,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1412
1500
|
}
|
|
1413
1501
|
}
|
|
1414
1502
|
if (missingSchemaIds.length > 0) {
|
|
1415
|
-
throw new (0,
|
|
1503
|
+
throw new (0, _chunkKAAWCHO4js.ProtocolError)(
|
|
1416
1504
|
`The installed Droid version did not return requested schemas for tool IDs: ${missingSchemaIds.join(", ")}. Update Droid and try again.`
|
|
1417
1505
|
);
|
|
1418
1506
|
}
|
|
@@ -1420,204 +1508,222 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1420
1508
|
}
|
|
1421
1509
|
async listMcpServers() {
|
|
1422
1510
|
if (!this.currentSessionId) {
|
|
1423
|
-
throw new (0,
|
|
1511
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1424
1512
|
"No active session. Call initializeSession or loadSession first."
|
|
1425
1513
|
);
|
|
1426
1514
|
}
|
|
1427
1515
|
const request = {
|
|
1428
|
-
factoryApiVersion:
|
|
1429
|
-
factoryProtocolVersion:
|
|
1516
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1517
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1430
1518
|
type: "request",
|
|
1431
|
-
jsonrpc:
|
|
1519
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1432
1520
|
id: _uuid.v4.call(void 0, ),
|
|
1433
1521
|
method: "droid.list_mcp_servers" /* LIST_MCP_SERVERS */,
|
|
1434
1522
|
params: {}
|
|
1435
1523
|
};
|
|
1436
1524
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1437
|
-
const
|
|
1438
|
-
return
|
|
1525
|
+
const response2 = _chunkKAAWCHO4js.ListMcpServersResponseSchema.parse(rawResponse);
|
|
1526
|
+
return response2;
|
|
1439
1527
|
}
|
|
1440
1528
|
async toggleMcpTool(serverName, toolName, enabled) {
|
|
1441
1529
|
if (!this.currentSessionId) {
|
|
1442
|
-
throw new (0,
|
|
1530
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1443
1531
|
"No active session. Call initializeSession or loadSession first."
|
|
1444
1532
|
);
|
|
1445
1533
|
}
|
|
1446
1534
|
const request = {
|
|
1447
|
-
factoryApiVersion:
|
|
1448
|
-
factoryProtocolVersion:
|
|
1535
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1536
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1449
1537
|
type: "request",
|
|
1450
|
-
jsonrpc:
|
|
1538
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1451
1539
|
id: _uuid.v4.call(void 0, ),
|
|
1452
1540
|
method: "droid.toggle_mcp_tool" /* TOGGLE_MCP_TOOL */,
|
|
1453
1541
|
params: { serverName, toolName, enabled }
|
|
1454
1542
|
};
|
|
1455
1543
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1456
|
-
const
|
|
1457
|
-
return
|
|
1544
|
+
const response2 = _chunkKAAWCHO4js.ToggleMcpToolResponseSchema.parse(rawResponse);
|
|
1545
|
+
return response2;
|
|
1458
1546
|
}
|
|
1459
1547
|
async submitMcpAuthCode(params) {
|
|
1460
1548
|
if (!this.currentSessionId) {
|
|
1461
|
-
throw new (0,
|
|
1549
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1462
1550
|
"No active session. Call initializeSession or loadSession first."
|
|
1463
1551
|
);
|
|
1464
1552
|
}
|
|
1465
1553
|
const request = {
|
|
1466
|
-
factoryApiVersion:
|
|
1467
|
-
factoryProtocolVersion:
|
|
1554
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1555
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1468
1556
|
type: "request",
|
|
1469
|
-
jsonrpc:
|
|
1557
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1470
1558
|
id: _uuid.v4.call(void 0, ),
|
|
1471
1559
|
method: "droid.submit_mcp_auth_code" /* SUBMIT_MCP_AUTH_CODE */,
|
|
1472
1560
|
params
|
|
1473
1561
|
};
|
|
1474
1562
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1475
|
-
const
|
|
1476
|
-
return
|
|
1563
|
+
const response2 = _chunkKAAWCHO4js.SubmitMcpAuthCodeResponseSchema.parse(rawResponse);
|
|
1564
|
+
return response2;
|
|
1477
1565
|
}
|
|
1478
1566
|
async submitMcpAuthError(params) {
|
|
1479
1567
|
if (!this.currentSessionId) {
|
|
1480
|
-
throw new (0,
|
|
1568
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1481
1569
|
"No active session. Call initializeSession or loadSession first."
|
|
1482
1570
|
);
|
|
1483
1571
|
}
|
|
1484
1572
|
const request = {
|
|
1485
|
-
factoryApiVersion:
|
|
1486
|
-
factoryProtocolVersion:
|
|
1573
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1574
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1487
1575
|
type: "request",
|
|
1488
|
-
jsonrpc:
|
|
1576
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1489
1577
|
id: _uuid.v4.call(void 0, ),
|
|
1490
1578
|
method: "droid.submit_mcp_auth_error" /* SUBMIT_MCP_AUTH_ERROR */,
|
|
1491
1579
|
params
|
|
1492
1580
|
};
|
|
1493
1581
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1494
|
-
const
|
|
1495
|
-
return
|
|
1582
|
+
const response2 = _chunkKAAWCHO4js.SubmitMcpAuthErrorResponseSchema.parse(rawResponse);
|
|
1583
|
+
return response2;
|
|
1496
1584
|
}
|
|
1497
1585
|
async listSkills(params = {}) {
|
|
1498
1586
|
if (!this.currentSessionId) {
|
|
1499
|
-
throw new (0,
|
|
1587
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1500
1588
|
"No active session. Call initializeSession or loadSession first."
|
|
1501
1589
|
);
|
|
1502
1590
|
}
|
|
1503
1591
|
const request = {
|
|
1504
|
-
factoryApiVersion:
|
|
1505
|
-
factoryProtocolVersion:
|
|
1592
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1593
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1506
1594
|
type: "request",
|
|
1507
|
-
jsonrpc:
|
|
1595
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1508
1596
|
id: _uuid.v4.call(void 0, ),
|
|
1509
1597
|
method: "droid.list_skills" /* LIST_SKILLS */,
|
|
1510
1598
|
params
|
|
1511
1599
|
};
|
|
1512
1600
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1513
|
-
const
|
|
1514
|
-
return
|
|
1601
|
+
const response2 = _chunkKAAWCHO4js.ListSkillsResponseSchema.parse(rawResponse);
|
|
1602
|
+
return response2;
|
|
1515
1603
|
}
|
|
1516
1604
|
async setSkillDisabled(skillName, disabled, settingsLevel) {
|
|
1517
1605
|
if (!this.currentSessionId) {
|
|
1518
|
-
throw new (0,
|
|
1606
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1519
1607
|
"No active session. Call initializeSession or loadSession first."
|
|
1520
1608
|
);
|
|
1521
1609
|
}
|
|
1522
1610
|
const request = {
|
|
1523
|
-
factoryApiVersion:
|
|
1524
|
-
factoryProtocolVersion:
|
|
1611
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1612
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1525
1613
|
type: "request",
|
|
1526
|
-
jsonrpc:
|
|
1614
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1527
1615
|
id: _uuid.v4.call(void 0, ),
|
|
1528
1616
|
method: "droid.set_skill_disabled" /* SET_SKILL_DISABLED */,
|
|
1529
1617
|
params: { skillName, disabled, settingsLevel }
|
|
1530
1618
|
};
|
|
1531
1619
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1532
|
-
return
|
|
1620
|
+
return _chunkKAAWCHO4js.SetSkillDisabledResponseSchema.parse(rawResponse);
|
|
1533
1621
|
}
|
|
1534
1622
|
async listCommands() {
|
|
1535
1623
|
if (!this.currentSessionId) {
|
|
1536
|
-
throw new (0,
|
|
1624
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1537
1625
|
"No active session. Call initializeSession or loadSession first."
|
|
1538
1626
|
);
|
|
1539
1627
|
}
|
|
1540
1628
|
const request = {
|
|
1541
|
-
factoryApiVersion:
|
|
1542
|
-
factoryProtocolVersion:
|
|
1629
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1630
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1543
1631
|
type: "request",
|
|
1544
|
-
jsonrpc:
|
|
1632
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1545
1633
|
id: _uuid.v4.call(void 0, ),
|
|
1546
1634
|
method: "droid.list_commands" /* LIST_COMMANDS */,
|
|
1547
1635
|
params: {}
|
|
1548
1636
|
};
|
|
1549
1637
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1550
|
-
const
|
|
1551
|
-
return
|
|
1638
|
+
const response2 = _chunkKAAWCHO4js.ListCommandsResponseSchema.parse(rawResponse);
|
|
1639
|
+
return response2;
|
|
1552
1640
|
}
|
|
1553
1641
|
async getContextStats() {
|
|
1554
1642
|
if (!this.currentSessionId) {
|
|
1555
|
-
throw new (0,
|
|
1643
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1556
1644
|
"No active session. Call initializeSession or loadSession first."
|
|
1557
1645
|
);
|
|
1558
1646
|
}
|
|
1559
1647
|
const request = {
|
|
1560
|
-
factoryApiVersion:
|
|
1561
|
-
factoryProtocolVersion:
|
|
1648
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1649
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1562
1650
|
type: "request",
|
|
1563
|
-
jsonrpc:
|
|
1651
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1564
1652
|
id: _uuid.v4.call(void 0, ),
|
|
1565
1653
|
method: "droid.get_context_stats" /* GET_CONTEXT_STATS */,
|
|
1566
1654
|
params: {}
|
|
1567
1655
|
};
|
|
1568
1656
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1569
|
-
const
|
|
1570
|
-
return
|
|
1657
|
+
const response2 = _chunkKAAWCHO4js.GetContextStatsResponseSchema.parse(rawResponse);
|
|
1658
|
+
return response2;
|
|
1571
1659
|
}
|
|
1572
1660
|
async getContextBreakdown() {
|
|
1573
1661
|
if (!this.currentSessionId) {
|
|
1574
|
-
throw new (0,
|
|
1662
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1575
1663
|
"No active session. Call initializeSession or loadSession first."
|
|
1576
1664
|
);
|
|
1577
1665
|
}
|
|
1578
1666
|
const request = {
|
|
1579
|
-
factoryApiVersion:
|
|
1580
|
-
factoryProtocolVersion:
|
|
1667
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1668
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1581
1669
|
type: "request",
|
|
1582
|
-
jsonrpc:
|
|
1670
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1583
1671
|
id: _uuid.v4.call(void 0, ),
|
|
1584
1672
|
method: "droid.get_context_breakdown" /* GET_CONTEXT_BREAKDOWN */,
|
|
1585
1673
|
params: {}
|
|
1586
1674
|
};
|
|
1587
1675
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1588
|
-
const
|
|
1589
|
-
return
|
|
1676
|
+
const response2 = _chunkKAAWCHO4js.GetContextBreakdownResponseSchema.parse(rawResponse);
|
|
1677
|
+
return response2;
|
|
1590
1678
|
}
|
|
1591
|
-
async
|
|
1679
|
+
async killBackgroundProcess(processId) {
|
|
1592
1680
|
if (!this.currentSessionId) {
|
|
1593
|
-
throw new (0,
|
|
1681
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1594
1682
|
"No active session. Call initializeSession or loadSession first."
|
|
1595
1683
|
);
|
|
1596
1684
|
}
|
|
1597
1685
|
const request = {
|
|
1598
|
-
factoryApiVersion:
|
|
1599
|
-
factoryProtocolVersion:
|
|
1686
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1687
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1600
1688
|
type: "request",
|
|
1601
|
-
jsonrpc:
|
|
1689
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1690
|
+
id: _uuid.v4.call(void 0, ),
|
|
1691
|
+
method: "droid.kill_background_process" /* KILL_BACKGROUND_PROCESS */,
|
|
1692
|
+
params: { processId }
|
|
1693
|
+
};
|
|
1694
|
+
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1695
|
+
return _chunkKAAWCHO4js.KillBackgroundProcessResponseSchema.parse(rawResponse);
|
|
1696
|
+
}
|
|
1697
|
+
async submitBugReport(userComment, clientLogs, source, tuiLogs) {
|
|
1698
|
+
if (!this.currentSessionId) {
|
|
1699
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1700
|
+
"No active session. Call initializeSession or loadSession first."
|
|
1701
|
+
);
|
|
1702
|
+
}
|
|
1703
|
+
const request = {
|
|
1704
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1705
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1706
|
+
type: "request",
|
|
1707
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1602
1708
|
id: _uuid.v4.call(void 0, ),
|
|
1603
1709
|
method: "droid.submit_bug_report" /* SUBMIT_BUG_REPORT */,
|
|
1604
|
-
params: { userComment, clientLogs, source }
|
|
1710
|
+
params: { userComment, clientLogs, source, tuiLogs }
|
|
1605
1711
|
};
|
|
1606
1712
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1607
|
-
const
|
|
1608
|
-
return
|
|
1713
|
+
const response2 = _chunkKAAWCHO4js.SubmitBugReportResponseSchema.parse(rawResponse);
|
|
1714
|
+
return response2;
|
|
1609
1715
|
}
|
|
1610
1716
|
async getRewindInfo(params, timeout = this.requestTimeout) {
|
|
1611
1717
|
if (!this.currentSessionId) {
|
|
1612
|
-
throw new (0,
|
|
1718
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1613
1719
|
"No active session. Call initializeSession or loadSession first."
|
|
1614
1720
|
);
|
|
1615
1721
|
}
|
|
1616
1722
|
const request = {
|
|
1617
|
-
factoryApiVersion:
|
|
1618
|
-
factoryProtocolVersion:
|
|
1723
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1724
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1619
1725
|
type: "request",
|
|
1620
|
-
jsonrpc:
|
|
1726
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1621
1727
|
id: _uuid.v4.call(void 0, ),
|
|
1622
1728
|
method: "droid.get_rewind_info" /* GET_REWIND_INFO */,
|
|
1623
1729
|
params: {
|
|
@@ -1626,19 +1732,19 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1626
1732
|
}
|
|
1627
1733
|
};
|
|
1628
1734
|
const rawResponse = await this.sendRequest(request, timeout);
|
|
1629
|
-
return
|
|
1735
|
+
return _chunkKAAWCHO4js.GetRewindInfoResponseSchema.parse(rawResponse);
|
|
1630
1736
|
}
|
|
1631
1737
|
async executeRewind(params) {
|
|
1632
1738
|
if (!this.currentSessionId) {
|
|
1633
|
-
throw new (0,
|
|
1739
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1634
1740
|
"No active session. Call initializeSession or loadSession first."
|
|
1635
1741
|
);
|
|
1636
1742
|
}
|
|
1637
1743
|
const request = {
|
|
1638
|
-
factoryApiVersion:
|
|
1639
|
-
factoryProtocolVersion:
|
|
1744
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1745
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1640
1746
|
type: "request",
|
|
1641
|
-
jsonrpc:
|
|
1747
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1642
1748
|
id: _uuid.v4.call(void 0, ),
|
|
1643
1749
|
method: "droid.execute_rewind" /* EXECUTE_REWIND */,
|
|
1644
1750
|
params: {
|
|
@@ -1653,19 +1759,19 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1653
1759
|
request,
|
|
1654
1760
|
this.requestTimeout * 2
|
|
1655
1761
|
);
|
|
1656
|
-
return
|
|
1762
|
+
return _chunkKAAWCHO4js.ExecuteRewindResponseSchema.parse(rawResponse);
|
|
1657
1763
|
}
|
|
1658
1764
|
async compactSession(params) {
|
|
1659
1765
|
if (!this.currentSessionId) {
|
|
1660
|
-
throw new (0,
|
|
1766
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1661
1767
|
"No active session. Call initializeSession or loadSession first."
|
|
1662
1768
|
);
|
|
1663
1769
|
}
|
|
1664
1770
|
const request = {
|
|
1665
|
-
factoryApiVersion:
|
|
1666
|
-
factoryProtocolVersion:
|
|
1771
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1772
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1667
1773
|
type: "request",
|
|
1668
|
-
jsonrpc:
|
|
1774
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1669
1775
|
id: _uuid.v4.call(void 0, ),
|
|
1670
1776
|
method: "droid.compact_session" /* COMPACT_SESSION */,
|
|
1671
1777
|
params: {
|
|
@@ -1674,37 +1780,75 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1674
1780
|
}
|
|
1675
1781
|
};
|
|
1676
1782
|
const rawResponse = await this.sendRequest(request, COMPACTION_TIMEOUT2);
|
|
1677
|
-
return
|
|
1783
|
+
return _chunkKAAWCHO4js.CompactSessionResponseSchema.parse(rawResponse);
|
|
1784
|
+
}
|
|
1785
|
+
/** Summarizes the session the way `/handoff` does, without writing anything. */
|
|
1786
|
+
async getHandoffSummary() {
|
|
1787
|
+
if (!this.currentSessionId) {
|
|
1788
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1789
|
+
"No active session. Call initializeSession or loadSession first."
|
|
1790
|
+
);
|
|
1791
|
+
}
|
|
1792
|
+
const request = {
|
|
1793
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1794
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1795
|
+
type: "request",
|
|
1796
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1797
|
+
id: _uuid.v4.call(void 0, ),
|
|
1798
|
+
method: "droid.get_handoff_summary" /* GET_HANDOFF_SUMMARY */,
|
|
1799
|
+
params: {}
|
|
1800
|
+
};
|
|
1801
|
+
const rawResponse = await this.sendRequest(request, COMPACTION_TIMEOUT2);
|
|
1802
|
+
return _chunkKAAWCHO4js.GetHandoffSummaryResponseSchema.parse(rawResponse);
|
|
1803
|
+
}
|
|
1804
|
+
/** Writes the short summary people joining a shared copy read first. */
|
|
1805
|
+
async summarizeForMembers(params) {
|
|
1806
|
+
if (!this.currentSessionId) {
|
|
1807
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1808
|
+
"No active session. Call initializeSession or loadSession first."
|
|
1809
|
+
);
|
|
1810
|
+
}
|
|
1811
|
+
const request = {
|
|
1812
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1813
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1814
|
+
type: "request",
|
|
1815
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1816
|
+
id: _uuid.v4.call(void 0, ),
|
|
1817
|
+
method: "droid.summarize_for_members" /* SUMMARIZE_FOR_MEMBERS */,
|
|
1818
|
+
params: { handoffSummary: params.handoffSummary }
|
|
1819
|
+
};
|
|
1820
|
+
const rawResponse = await this.sendRequest(request, COMPACTION_TIMEOUT2);
|
|
1821
|
+
return _chunkKAAWCHO4js.SummarizeForMembersResponseSchema.parse(rawResponse);
|
|
1678
1822
|
}
|
|
1679
1823
|
async forkSession(params) {
|
|
1680
1824
|
if (!this.currentSessionId) {
|
|
1681
|
-
throw new (0,
|
|
1825
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1682
1826
|
"No active session. Call initializeSession or loadSession first."
|
|
1683
1827
|
);
|
|
1684
1828
|
}
|
|
1685
1829
|
const request = {
|
|
1686
|
-
factoryApiVersion:
|
|
1687
|
-
factoryProtocolVersion:
|
|
1830
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1831
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1688
1832
|
type: "request",
|
|
1689
|
-
jsonrpc:
|
|
1833
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1690
1834
|
id: _uuid.v4.call(void 0, ),
|
|
1691
1835
|
method: "droid.fork_session" /* FORK_SESSION */,
|
|
1692
1836
|
params: _nullishCoalesce(params, () => ( {}))
|
|
1693
1837
|
};
|
|
1694
1838
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1695
|
-
return
|
|
1839
|
+
return _chunkKAAWCHO4js.ForkSessionResponseSchema.parse(rawResponse);
|
|
1696
1840
|
}
|
|
1697
1841
|
async renameSession(params, requestId) {
|
|
1698
1842
|
if (!this.currentSessionId) {
|
|
1699
|
-
throw new (0,
|
|
1843
|
+
throw new (0, _chunkKAAWCHO4js.SessionError)(
|
|
1700
1844
|
"No active session. Call initializeSession or loadSession first."
|
|
1701
1845
|
);
|
|
1702
1846
|
}
|
|
1703
1847
|
const request = {
|
|
1704
|
-
factoryApiVersion:
|
|
1705
|
-
factoryProtocolVersion:
|
|
1848
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1849
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1706
1850
|
type: "request",
|
|
1707
|
-
jsonrpc:
|
|
1851
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1708
1852
|
id: _nullishCoalesce(requestId, () => ( _uuid.v4.call(void 0, ))),
|
|
1709
1853
|
method: "droid.rename_session" /* RENAME_SESSION */,
|
|
1710
1854
|
params: {
|
|
@@ -1712,22 +1856,22 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1712
1856
|
}
|
|
1713
1857
|
};
|
|
1714
1858
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1715
|
-
return
|
|
1859
|
+
return _chunkKAAWCHO4js.RenameSessionResponseSchema.parse(rawResponse);
|
|
1716
1860
|
}
|
|
1717
1861
|
async warmupCache() {
|
|
1718
|
-
const
|
|
1719
|
-
factoryApiVersion:
|
|
1720
|
-
factoryProtocolVersion:
|
|
1862
|
+
const response2 = {
|
|
1863
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
1864
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
1721
1865
|
type: "response",
|
|
1722
|
-
jsonrpc:
|
|
1866
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
1723
1867
|
id: _uuid.v4.call(void 0, ),
|
|
1724
1868
|
result: {}
|
|
1725
1869
|
};
|
|
1726
|
-
return
|
|
1870
|
+
return _chunkKAAWCHO4js.WarmupCacheResponseSchema.parse(response2);
|
|
1727
1871
|
}
|
|
1728
1872
|
onNotification(callback, filter) {
|
|
1729
1873
|
const handler = (notification) => {
|
|
1730
|
-
if (_optionalChain([filter, 'optionalAccess',
|
|
1874
|
+
if (_optionalChain([filter, 'optionalAccess', _13 => _13.type]) !== void 0 && filter.type !== notification.params.notification.type) {
|
|
1731
1875
|
return;
|
|
1732
1876
|
}
|
|
1733
1877
|
try {
|
|
@@ -1754,14 +1898,27 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1754
1898
|
setPermissionHandler(handler) {
|
|
1755
1899
|
this.permissionHandlers.set(
|
|
1756
1900
|
"default",
|
|
1757
|
-
async (event) => await handler(event)
|
|
1901
|
+
async (event, setResponseMetadata) => await handler(event, setResponseMetadata)
|
|
1758
1902
|
);
|
|
1759
1903
|
}
|
|
1760
1904
|
clearPermissionHandler() {
|
|
1761
1905
|
this.permissionHandlers.delete("default");
|
|
1762
1906
|
}
|
|
1763
1907
|
setAskUserHandler(handler) {
|
|
1764
|
-
this.askUserHandlers.set(
|
|
1908
|
+
this.askUserHandlers.set(
|
|
1909
|
+
"default",
|
|
1910
|
+
async (event, setResponseMetadata) => await handler(event, setResponseMetadata)
|
|
1911
|
+
);
|
|
1912
|
+
const held = this.heldQueuedAskUserRequests;
|
|
1913
|
+
this.heldQueuedAskUserRequests = [];
|
|
1914
|
+
for (const event of held) {
|
|
1915
|
+
void this.answerAskUserRequest(event).catch((error) => {
|
|
1916
|
+
this.reportHandlerFailure(
|
|
1917
|
+
error,
|
|
1918
|
+
"Failed to answer a held queued ask-user request"
|
|
1919
|
+
);
|
|
1920
|
+
});
|
|
1921
|
+
}
|
|
1765
1922
|
}
|
|
1766
1923
|
clearAskUserHandler() {
|
|
1767
1924
|
this.askUserHandlers.delete("default");
|
|
@@ -1769,23 +1926,24 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1769
1926
|
setPickOptionsHandler(handler) {
|
|
1770
1927
|
this.pickOptionsHandlers.set(
|
|
1771
1928
|
"default",
|
|
1772
|
-
async (event) => await handler(event)
|
|
1929
|
+
async (event, setResponseMetadata) => await handler(event, setResponseMetadata)
|
|
1773
1930
|
);
|
|
1774
1931
|
}
|
|
1775
1932
|
clearPickOptionsHandler() {
|
|
1776
1933
|
this.pickOptionsHandlers.delete("default");
|
|
1777
1934
|
}
|
|
1778
1935
|
async close(options) {
|
|
1779
|
-
const closeError = new (0,
|
|
1936
|
+
const closeError = new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)(
|
|
1780
1937
|
"Droid client closed: pending requests cancelled"
|
|
1781
1938
|
);
|
|
1782
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1939
|
+
if (_optionalChain([options, 'optionalAccess', _14 => _14.closeTransportFirst])) {
|
|
1783
1940
|
try {
|
|
1784
1941
|
await this.transport.close();
|
|
1785
1942
|
} finally {
|
|
1786
1943
|
this.rejectAllPending(closeError);
|
|
1787
1944
|
this.permissionHandlers.clear();
|
|
1788
1945
|
this.askUserHandlers.clear();
|
|
1946
|
+
this.heldQueuedAskUserRequests = [];
|
|
1789
1947
|
this.removeAllListeners();
|
|
1790
1948
|
}
|
|
1791
1949
|
return;
|
|
@@ -1793,6 +1951,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1793
1951
|
this.rejectAllPending(closeError);
|
|
1794
1952
|
this.permissionHandlers.clear();
|
|
1795
1953
|
this.askUserHandlers.clear();
|
|
1954
|
+
this.heldQueuedAskUserRequests = [];
|
|
1796
1955
|
this.pickOptionsHandlers.clear();
|
|
1797
1956
|
this.removeAllListeners();
|
|
1798
1957
|
await this.transport.close();
|
|
@@ -1825,26 +1984,41 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1825
1984
|
}
|
|
1826
1985
|
notifyRequestSettled(requestId) {
|
|
1827
1986
|
try {
|
|
1828
|
-
_optionalChain([this, 'access',
|
|
1987
|
+
_optionalChain([this, 'access', _15 => _15.onRequestSettled, 'optionalCall', _16 => _16(requestId)]);
|
|
1829
1988
|
} catch (e4) {
|
|
1830
1989
|
}
|
|
1831
1990
|
}
|
|
1991
|
+
/** `_meta` for an answer this client gives itself: its caller and the current trace context. */
|
|
1992
|
+
responseMetadata() {
|
|
1993
|
+
const meta = {};
|
|
1994
|
+
const requestAttribution = _optionalChain([this, 'access', _17 => _17.getRequestAttribution, 'optionalCall', _18 => _18()]);
|
|
1995
|
+
if (requestAttribution) meta.requestAttribution = requestAttribution;
|
|
1996
|
+
this.tracing.injectContext(meta, this.tracing.getCurrentContext());
|
|
1997
|
+
return meta;
|
|
1998
|
+
}
|
|
1999
|
+
async sendResponse(response2, hostMeta) {
|
|
2000
|
+
const meta = _nullishCoalesce(hostMeta, () => ( this.responseMetadata()));
|
|
2001
|
+
await this.transport.send(
|
|
2002
|
+
Object.keys(meta).length > 0 ? { ...response2, _meta: meta } : response2
|
|
2003
|
+
);
|
|
2004
|
+
}
|
|
1832
2005
|
async sendRequest(request, timeout, sessionId) {
|
|
1833
2006
|
if (this.transportError) {
|
|
1834
2007
|
throw this.transportError;
|
|
1835
2008
|
}
|
|
1836
|
-
const requestAttribution = _optionalChain([this, 'access',
|
|
1837
|
-
const _meta = {
|
|
1838
|
-
|
|
1839
|
-
|
|
2009
|
+
const requestAttribution = _nullishCoalesce(_optionalChain([request, 'access', _19 => _19._meta, 'optionalAccess', _20 => _20.requestAttribution]), () => ( _optionalChain([this, 'access', _21 => _21.getRequestAttribution, 'optionalCall', _22 => _22()])));
|
|
2010
|
+
const _meta = { ...request._meta };
|
|
2011
|
+
delete _meta.requestAttribution;
|
|
2012
|
+
if (requestAttribution) _meta.requestAttribution = requestAttribution;
|
|
1840
2013
|
this.tracing.injectContext(_meta, this.tracing.getCurrentContext());
|
|
1841
|
-
const
|
|
2014
|
+
const { _meta: _originalMeta, ...requestWithoutMeta } = request;
|
|
2015
|
+
const requestWithMeta = Object.keys(_meta).length > 0 ? { ...request, _meta } : requestWithoutMeta;
|
|
1842
2016
|
const responsePromise = new Promise(
|
|
1843
2017
|
(resolve2, reject) => {
|
|
1844
2018
|
const timeoutId = timeout ? setTimeout(() => {
|
|
1845
2019
|
this.settleRequest(request.id);
|
|
1846
2020
|
reject(
|
|
1847
|
-
new (0,
|
|
2021
|
+
new (0, _chunkKAAWCHO4js.TimeoutError)("Send request timed out", {
|
|
1848
2022
|
requestId: request.id,
|
|
1849
2023
|
method: request.method,
|
|
1850
2024
|
timeout
|
|
@@ -1862,12 +2036,16 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1862
2036
|
);
|
|
1863
2037
|
void responsePromise.catch(() => {
|
|
1864
2038
|
});
|
|
2039
|
+
void this.writeRequest(requestWithMeta);
|
|
2040
|
+
return responsePromise;
|
|
2041
|
+
}
|
|
2042
|
+
async writeRequest(request) {
|
|
1865
2043
|
try {
|
|
1866
2044
|
this.logger.info("[DroidClient] [daemon -> droid] sending request", {
|
|
1867
2045
|
requestId: request.id,
|
|
1868
2046
|
method: request.method
|
|
1869
2047
|
});
|
|
1870
|
-
await this.transport.send(
|
|
2048
|
+
await this.transport.send(request);
|
|
1871
2049
|
} catch (error) {
|
|
1872
2050
|
const pending = this.pendingRequests.get(request.id);
|
|
1873
2051
|
if (pending) {
|
|
@@ -1876,14 +2054,13 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1876
2054
|
}
|
|
1877
2055
|
this.settleRequest(request.id);
|
|
1878
2056
|
pending.reject(
|
|
1879
|
-
new (0,
|
|
2057
|
+
new (0, _chunkKAAWCHO4js.ProtocolError)("[daemon -> droid] Failed to send request", {
|
|
1880
2058
|
requestId: request.id,
|
|
1881
2059
|
cause: error
|
|
1882
2060
|
})
|
|
1883
2061
|
);
|
|
1884
2062
|
}
|
|
1885
2063
|
}
|
|
1886
|
-
return responsePromise;
|
|
1887
2064
|
}
|
|
1888
2065
|
async handleMessage(message) {
|
|
1889
2066
|
try {
|
|
@@ -1896,128 +2073,137 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1896
2073
|
this.logger.warn("[DroidClient] Failed to handle message");
|
|
1897
2074
|
}
|
|
1898
2075
|
}
|
|
1899
|
-
handleResponse(
|
|
2076
|
+
handleResponse(response2) {
|
|
1900
2077
|
try {
|
|
1901
|
-
const responseId = getResponseId(
|
|
2078
|
+
const responseId = getResponseId(response2);
|
|
1902
2079
|
if (responseId !== null && responseId !== void 0) {
|
|
1903
2080
|
const pending = this.pendingRequests.get(responseId);
|
|
1904
2081
|
if (pending) {
|
|
1905
2082
|
let validatedResponse;
|
|
1906
2083
|
switch (pending.method) {
|
|
1907
2084
|
case "droid.initialize_session" /* INITIALIZE_SESSION */:
|
|
1908
|
-
validatedResponse =
|
|
2085
|
+
validatedResponse = _chunkKAAWCHO4js.InitializeSessionResponseSchema.parse(response2);
|
|
1909
2086
|
break;
|
|
1910
2087
|
case "droid.load_session" /* LOAD_SESSION */:
|
|
1911
|
-
validatedResponse =
|
|
2088
|
+
validatedResponse = _chunkKAAWCHO4js.LoadSessionResponseSchema.parse(response2);
|
|
1912
2089
|
break;
|
|
1913
2090
|
case "droid.add_user_message" /* ADD_USER_MESSAGE */:
|
|
1914
|
-
validatedResponse =
|
|
2091
|
+
validatedResponse = _chunkKAAWCHO4js.AddUserMessageResponseSchema.parse(response2);
|
|
1915
2092
|
break;
|
|
1916
2093
|
case "droid.append_messages" /* APPEND_MESSAGES */:
|
|
1917
|
-
validatedResponse =
|
|
2094
|
+
validatedResponse = _chunkKAAWCHO4js.AppendMessagesResponseSchema.parse(response2);
|
|
1918
2095
|
break;
|
|
1919
2096
|
case "droid.resolve_queued_user_message" /* RESOLVE_QUEUED_USER_MESSAGE */:
|
|
1920
|
-
validatedResponse =
|
|
2097
|
+
validatedResponse = _chunkKAAWCHO4js.ResolveQueuedUserMessageResponseSchema.parse(response2);
|
|
1921
2098
|
break;
|
|
1922
2099
|
case "droid.interrupt_session" /* INTERRUPT_SESSION */:
|
|
1923
|
-
validatedResponse =
|
|
2100
|
+
validatedResponse = _chunkKAAWCHO4js.InterruptSessionResponseSchema.parse(response2);
|
|
1924
2101
|
break;
|
|
1925
2102
|
case "droid.close_session" /* CLOSE_SESSION */:
|
|
1926
|
-
validatedResponse =
|
|
2103
|
+
validatedResponse = _chunkKAAWCHO4js.CloseSessionResponseSchema.parse(response2);
|
|
1927
2104
|
break;
|
|
1928
2105
|
case "droid.update_session_settings" /* UPDATE_SESSION_SETTINGS */:
|
|
1929
|
-
validatedResponse =
|
|
2106
|
+
validatedResponse = _chunkKAAWCHO4js.UpdateSessionSettingsResponseSchema.parse(response2);
|
|
1930
2107
|
break;
|
|
1931
2108
|
case "droid.change_working_directory" /* CHANGE_WORKING_DIRECTORY */:
|
|
1932
|
-
validatedResponse =
|
|
2109
|
+
validatedResponse = _chunkKAAWCHO4js.ChangeWorkingDirectoryResponseSchema.parse(response2);
|
|
1933
2110
|
break;
|
|
1934
2111
|
case "droid.toggle_mcp_server" /* TOGGLE_MCP_SERVER */:
|
|
1935
|
-
validatedResponse =
|
|
2112
|
+
validatedResponse = _chunkKAAWCHO4js.ToggleMcpServerResponseSchema.parse(response2);
|
|
1936
2113
|
break;
|
|
1937
2114
|
case "droid.authenticate_mcp_server" /* AUTHENTICATE_MCP_SERVER */:
|
|
1938
|
-
validatedResponse =
|
|
2115
|
+
validatedResponse = _chunkKAAWCHO4js.AuthenticateMcpServerResponseSchema.parse(response2);
|
|
1939
2116
|
break;
|
|
1940
2117
|
case "droid.cancel_mcp_auth" /* CANCEL_MCP_AUTH */:
|
|
1941
|
-
validatedResponse =
|
|
2118
|
+
validatedResponse = _chunkKAAWCHO4js.CancelMcpAuthResponseSchema.parse(response2);
|
|
1942
2119
|
break;
|
|
1943
2120
|
case "droid.clear_mcp_auth" /* CLEAR_MCP_AUTH */:
|
|
1944
|
-
validatedResponse =
|
|
2121
|
+
validatedResponse = _chunkKAAWCHO4js.ClearMcpAuthResponseSchema.parse(response2);
|
|
1945
2122
|
break;
|
|
1946
2123
|
case "droid.add_mcp_server" /* ADD_MCP_SERVER */:
|
|
1947
|
-
validatedResponse =
|
|
2124
|
+
validatedResponse = _chunkKAAWCHO4js.AddMcpServerResponseSchema.parse(response2);
|
|
1948
2125
|
break;
|
|
1949
2126
|
case "droid.remove_mcp_server" /* REMOVE_MCP_SERVER */:
|
|
1950
|
-
validatedResponse =
|
|
2127
|
+
validatedResponse = _chunkKAAWCHO4js.RemoveMcpServerResponseSchema.parse(response2);
|
|
1951
2128
|
break;
|
|
1952
2129
|
case "droid.list_models" /* LIST_MODELS */:
|
|
1953
|
-
validatedResponse =
|
|
2130
|
+
validatedResponse = _chunkKAAWCHO4js.ListModelsResponseSchema.parse(response2);
|
|
1954
2131
|
break;
|
|
1955
2132
|
case "droid.list_mcp_registry" /* LIST_MCP_REGISTRY */:
|
|
1956
|
-
validatedResponse =
|
|
2133
|
+
validatedResponse = _chunkKAAWCHO4js.ListMcpRegistryResponseSchema.parse(response2);
|
|
1957
2134
|
break;
|
|
1958
2135
|
case "droid.list_mcp_tools" /* LIST_MCP_TOOLS */:
|
|
1959
|
-
validatedResponse =
|
|
2136
|
+
validatedResponse = _chunkKAAWCHO4js.ListMcpToolsResponseSchema.parse(response2);
|
|
1960
2137
|
break;
|
|
1961
2138
|
case "droid.list_tools" /* LIST_TOOLS */:
|
|
1962
|
-
validatedResponse =
|
|
2139
|
+
validatedResponse = _chunkKAAWCHO4js.ListToolsResponseSchema.parse(response2);
|
|
1963
2140
|
break;
|
|
1964
2141
|
case "droid.refresh_connector_tool_catalog" /* REFRESH_CONNECTOR_TOOL_CATALOG */:
|
|
1965
|
-
validatedResponse =
|
|
2142
|
+
validatedResponse = _chunkKAAWCHO4js.RefreshConnectorToolCatalogResponseSchema.parse(response2);
|
|
1966
2143
|
break;
|
|
1967
2144
|
case "droid.toggle_mcp_tool" /* TOGGLE_MCP_TOOL */:
|
|
1968
|
-
validatedResponse =
|
|
2145
|
+
validatedResponse = _chunkKAAWCHO4js.ToggleMcpToolResponseSchema.parse(response2);
|
|
1969
2146
|
break;
|
|
1970
2147
|
case "droid.submit_mcp_auth_code" /* SUBMIT_MCP_AUTH_CODE */:
|
|
1971
|
-
validatedResponse =
|
|
2148
|
+
validatedResponse = _chunkKAAWCHO4js.SubmitMcpAuthCodeResponseSchema.parse(response2);
|
|
1972
2149
|
break;
|
|
1973
2150
|
case "droid.submit_mcp_auth_error" /* SUBMIT_MCP_AUTH_ERROR */:
|
|
1974
|
-
validatedResponse =
|
|
2151
|
+
validatedResponse = _chunkKAAWCHO4js.SubmitMcpAuthErrorResponseSchema.parse(response2);
|
|
1975
2152
|
break;
|
|
1976
2153
|
case "droid.kill_worker_session" /* KILL_WORKER_SESSION */:
|
|
1977
|
-
validatedResponse =
|
|
2154
|
+
validatedResponse = _chunkKAAWCHO4js.KillWorkerSessionResponseSchema.parse(response2);
|
|
1978
2155
|
break;
|
|
1979
2156
|
case "droid.list_skills" /* LIST_SKILLS */:
|
|
1980
|
-
validatedResponse =
|
|
2157
|
+
validatedResponse = _chunkKAAWCHO4js.ListSkillsResponseSchema.parse(response2);
|
|
1981
2158
|
break;
|
|
1982
2159
|
case "droid.set_skill_disabled" /* SET_SKILL_DISABLED */:
|
|
1983
|
-
validatedResponse =
|
|
2160
|
+
validatedResponse = _chunkKAAWCHO4js.SetSkillDisabledResponseSchema.parse(response2);
|
|
1984
2161
|
break;
|
|
1985
2162
|
case "droid.list_commands" /* LIST_COMMANDS */:
|
|
1986
|
-
validatedResponse =
|
|
2163
|
+
validatedResponse = _chunkKAAWCHO4js.ListCommandsResponseSchema.parse(response2);
|
|
1987
2164
|
break;
|
|
1988
2165
|
case "droid.submit_bug_report" /* SUBMIT_BUG_REPORT */:
|
|
1989
|
-
validatedResponse =
|
|
2166
|
+
validatedResponse = _chunkKAAWCHO4js.SubmitBugReportResponseSchema.parse(response2);
|
|
1990
2167
|
break;
|
|
1991
2168
|
case "droid.list_mcp_servers" /* LIST_MCP_SERVERS */:
|
|
1992
|
-
validatedResponse =
|
|
2169
|
+
validatedResponse = _chunkKAAWCHO4js.ListMcpServersResponseSchema.parse(response2);
|
|
1993
2170
|
break;
|
|
1994
2171
|
case "droid.get_rewind_info" /* GET_REWIND_INFO */:
|
|
1995
|
-
validatedResponse =
|
|
2172
|
+
validatedResponse = _chunkKAAWCHO4js.GetRewindInfoResponseSchema.parse(response2);
|
|
1996
2173
|
break;
|
|
1997
2174
|
case "droid.execute_rewind" /* EXECUTE_REWIND */:
|
|
1998
|
-
validatedResponse =
|
|
2175
|
+
validatedResponse = _chunkKAAWCHO4js.ExecuteRewindResponseSchema.parse(response2);
|
|
1999
2176
|
break;
|
|
2000
2177
|
case "droid.compact_session" /* COMPACT_SESSION */:
|
|
2001
|
-
validatedResponse =
|
|
2178
|
+
validatedResponse = _chunkKAAWCHO4js.CompactSessionResponseSchema.parse(response2);
|
|
2179
|
+
break;
|
|
2180
|
+
case "droid.get_handoff_summary" /* GET_HANDOFF_SUMMARY */:
|
|
2181
|
+
validatedResponse = _chunkKAAWCHO4js.GetHandoffSummaryResponseSchema.parse(response2);
|
|
2182
|
+
break;
|
|
2183
|
+
case "droid.summarize_for_members" /* SUMMARIZE_FOR_MEMBERS */:
|
|
2184
|
+
validatedResponse = _chunkKAAWCHO4js.SummarizeForMembersResponseSchema.parse(response2);
|
|
2002
2185
|
break;
|
|
2003
2186
|
case "droid.fork_session" /* FORK_SESSION */:
|
|
2004
|
-
validatedResponse =
|
|
2187
|
+
validatedResponse = _chunkKAAWCHO4js.ForkSessionResponseSchema.parse(response2);
|
|
2005
2188
|
break;
|
|
2006
2189
|
case "droid.rename_session" /* RENAME_SESSION */:
|
|
2007
|
-
validatedResponse =
|
|
2190
|
+
validatedResponse = _chunkKAAWCHO4js.RenameSessionResponseSchema.parse(response2);
|
|
2008
2191
|
break;
|
|
2009
2192
|
case "droid.get_context_stats" /* GET_CONTEXT_STATS */:
|
|
2010
|
-
validatedResponse =
|
|
2193
|
+
validatedResponse = _chunkKAAWCHO4js.GetContextStatsResponseSchema.parse(response2);
|
|
2011
2194
|
break;
|
|
2012
2195
|
case "droid.get_context_breakdown" /* GET_CONTEXT_BREAKDOWN */:
|
|
2013
|
-
validatedResponse =
|
|
2196
|
+
validatedResponse = _chunkKAAWCHO4js.GetContextBreakdownResponseSchema.parse(response2);
|
|
2014
2197
|
break;
|
|
2015
2198
|
case "droid.warmup_cache" /* WARMUP_CACHE */:
|
|
2016
|
-
validatedResponse =
|
|
2199
|
+
validatedResponse = _chunkKAAWCHO4js.WarmupCacheResponseSchema.parse(response2);
|
|
2200
|
+
break;
|
|
2201
|
+
case "droid.kill_background_process" /* KILL_BACKGROUND_PROCESS */:
|
|
2202
|
+
validatedResponse = _chunkKAAWCHO4js.KillBackgroundProcessResponseSchema.parse(response2);
|
|
2017
2203
|
break;
|
|
2018
2204
|
default: {
|
|
2019
2205
|
const exhaustiveCheck = pending.method;
|
|
2020
|
-
throw new (0,
|
|
2206
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)(
|
|
2021
2207
|
"Unsupported method in response handler",
|
|
2022
2208
|
{
|
|
2023
2209
|
method: exhaustiveCheck
|
|
@@ -2031,7 +2217,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2031
2217
|
this.settleRequest(responseId);
|
|
2032
2218
|
pending.resolve(validatedResponse);
|
|
2033
2219
|
} else {
|
|
2034
|
-
const validatedResponse =
|
|
2220
|
+
const validatedResponse = _chunkKAAWCHO4js.JsonRpcBaseResponseSchema.parse(response2);
|
|
2035
2221
|
this.logger.info(
|
|
2036
2222
|
"[DroidClient] Received response for request not in pending map",
|
|
2037
2223
|
{
|
|
@@ -2041,7 +2227,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2041
2227
|
}
|
|
2042
2228
|
}
|
|
2043
2229
|
} catch (error) {
|
|
2044
|
-
const responseId = getResponseId(
|
|
2230
|
+
const responseId = getResponseId(response2);
|
|
2045
2231
|
const pending = responseId !== null && responseId !== void 0 ? this.pendingRequests.get(responseId) : void 0;
|
|
2046
2232
|
const zodIssues = error instanceof _zod.z.ZodError ? error.issues.map((issue) => ({
|
|
2047
2233
|
path: issue.path,
|
|
@@ -2049,7 +2235,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2049
2235
|
message: issue.message
|
|
2050
2236
|
})) : void 0;
|
|
2051
2237
|
this.logger.exception(error, "Invalid response format", {
|
|
2052
|
-
method: _optionalChain([pending, 'optionalAccess',
|
|
2238
|
+
method: _optionalChain([pending, 'optionalAccess', _23 => _23.method]),
|
|
2053
2239
|
requestId: _nullishCoalesce(responseId, () => ( void 0)),
|
|
2054
2240
|
zodIssues
|
|
2055
2241
|
});
|
|
@@ -2075,10 +2261,10 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2075
2261
|
}
|
|
2076
2262
|
this.settleRequest(responseId);
|
|
2077
2263
|
const syntheticFailure = {
|
|
2078
|
-
jsonrpc:
|
|
2264
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
2079
2265
|
type: "response",
|
|
2080
|
-
factoryApiVersion:
|
|
2081
|
-
factoryProtocolVersion:
|
|
2266
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
2267
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
2082
2268
|
id: responseId,
|
|
2083
2269
|
error: {
|
|
2084
2270
|
code,
|
|
@@ -2091,13 +2277,15 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2091
2277
|
}
|
|
2092
2278
|
async handleEvent(event) {
|
|
2093
2279
|
try {
|
|
2094
|
-
const validatedEvent =
|
|
2280
|
+
const validatedEvent = _chunkKAAWCHO4js.CliRequestOrNotificationSchema.parse(event);
|
|
2095
2281
|
if (validatedEvent.method === "droid.session_notification" /* SESSION_NOTIFICATION */) {
|
|
2096
2282
|
const notification = validatedEvent.params.notification;
|
|
2097
2283
|
if (notification.type === "agent_turn_completed" /* AGENT_TURN_COMPLETED */) {
|
|
2098
2284
|
this.completedTurnObserved = true;
|
|
2099
|
-
} else if (notification.type === "droid_working_state_changed" /* DROID_WORKING_STATE_CHANGED */ && notification.newState
|
|
2285
|
+
} else if (notification.type === "droid_working_state_changed" /* DROID_WORKING_STATE_CHANGED */ && _chunkKAAWCHO4js.DROID_RUNNING_STATES.has(notification.newState)) {
|
|
2100
2286
|
this.completedTurnObserved = false;
|
|
2287
|
+
} else if (notification.type === "permission_resolved" /* PERMISSION_RESOLVED */) {
|
|
2288
|
+
_optionalChain([this, 'access', _24 => _24.pendingPermissionRequests, 'access', _25 => _25.get, 'call', _26 => _26(notification.requestId), 'optionalAccess', _27 => _27.withdraw, 'call', _28 => _28()]);
|
|
2101
2289
|
}
|
|
2102
2290
|
this.emit("session_notification" /* SESSION_NOTIFICATION */, validatedEvent);
|
|
2103
2291
|
} else if (validatedEvent.method === "droid.request_permission" /* REQUEST_PERMISSION */) {
|
|
@@ -2106,6 +2294,8 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2106
2294
|
await this.handleAskUserRequest(validatedEvent);
|
|
2107
2295
|
} else if (validatedEvent.method === "droid.pick_options" /* PICK_OPTIONS */) {
|
|
2108
2296
|
await this.handlePickOptionsRequest(validatedEvent);
|
|
2297
|
+
} else if (validatedEvent.method === "droid.disconnect" /* DISCONNECT */) {
|
|
2298
|
+
this.disconnected = true;
|
|
2109
2299
|
}
|
|
2110
2300
|
} catch (error) {
|
|
2111
2301
|
this.logDroppedEventParseError(error, event);
|
|
@@ -2128,10 +2318,10 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2128
2318
|
const code = error instanceof _zod.z.ZodError ? -32600 /* INVALID_REQUEST */ : -32603 /* INTERNAL_ERROR */;
|
|
2129
2319
|
const message = code === -32600 /* INVALID_REQUEST */ ? "Invalid request format" : "Internal error while handling request";
|
|
2130
2320
|
const errorResponse = {
|
|
2131
|
-
jsonrpc:
|
|
2321
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
2132
2322
|
type: "response",
|
|
2133
|
-
factoryApiVersion:
|
|
2134
|
-
factoryProtocolVersion:
|
|
2323
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
2324
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
2135
2325
|
id,
|
|
2136
2326
|
error: {
|
|
2137
2327
|
code,
|
|
@@ -2140,7 +2330,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2140
2330
|
}
|
|
2141
2331
|
};
|
|
2142
2332
|
try {
|
|
2143
|
-
await this.
|
|
2333
|
+
await this.sendResponse(errorResponse, void 0);
|
|
2144
2334
|
} catch (sendError) {
|
|
2145
2335
|
this.logger.exception(
|
|
2146
2336
|
sendError,
|
|
@@ -2185,6 +2375,13 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2185
2375
|
});
|
|
2186
2376
|
}
|
|
2187
2377
|
}
|
|
2378
|
+
reportHandlerFailure(error, message) {
|
|
2379
|
+
if (error instanceof _chunkKAAWCHO4js.RequestCancelledError || isDroidConnectionEnded(error)) {
|
|
2380
|
+
this.logger.info(message, { cause: error });
|
|
2381
|
+
} else {
|
|
2382
|
+
this.logger.exception(error, message);
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2188
2385
|
async handlePermissionRequest(event) {
|
|
2189
2386
|
if (this.pendingPermissionRequests.has(event.id)) {
|
|
2190
2387
|
this.logger.info(
|
|
@@ -2199,12 +2396,14 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2199
2396
|
requestId: event.id,
|
|
2200
2397
|
count: event.params.toolUses.length
|
|
2201
2398
|
});
|
|
2399
|
+
let hostMeta;
|
|
2400
|
+
const setResponseMetadata = (meta) => {
|
|
2401
|
+
hostMeta = meta;
|
|
2402
|
+
};
|
|
2202
2403
|
this.emit("request_permission" /* REQUEST_PERMISSION */, event);
|
|
2203
|
-
let
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
let clientStartsHandoffSession;
|
|
2207
|
-
let specHandoffId;
|
|
2404
|
+
let result = {
|
|
2405
|
+
selectedOption: "cancel" /* Cancel */
|
|
2406
|
+
};
|
|
2208
2407
|
const handler = this.permissionHandlers.get("default");
|
|
2209
2408
|
if (handler) {
|
|
2210
2409
|
try {
|
|
@@ -2214,50 +2413,57 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2214
2413
|
requestId: event.id
|
|
2215
2414
|
}
|
|
2216
2415
|
);
|
|
2217
|
-
const handlerPromise = new Promise(
|
|
2218
|
-
(
|
|
2219
|
-
|
|
2220
|
-
|
|
2416
|
+
const handlerPromise = new Promise((resolve2, reject) => {
|
|
2417
|
+
this.pendingPermissionRequests.set(event.id, {
|
|
2418
|
+
reject,
|
|
2419
|
+
withdraw: () => {
|
|
2221
2420
|
this.pendingPermissionRequests.delete(event.id);
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2421
|
+
resolve2(PERMISSION_WITHDRAWN);
|
|
2422
|
+
}
|
|
2423
|
+
});
|
|
2424
|
+
handler(event, setResponseMetadata).then(resolve2).catch(reject).finally(() => {
|
|
2425
|
+
this.pendingPermissionRequests.delete(event.id);
|
|
2426
|
+
});
|
|
2427
|
+
});
|
|
2225
2428
|
const handlerResult = await handlerPromise;
|
|
2429
|
+
if (handlerResult === PERMISSION_WITHDRAWN) {
|
|
2430
|
+
this.logger.info("[DroidClient] Permission request withdrawn", {
|
|
2431
|
+
requestId: event.id
|
|
2432
|
+
});
|
|
2433
|
+
return;
|
|
2434
|
+
}
|
|
2226
2435
|
if (typeof handlerResult === "string" && handlerResult === "proceed_edit" /* ProceedEdit */) {
|
|
2227
|
-
throw new (0,
|
|
2436
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)(
|
|
2228
2437
|
"Permission handler returned proceed_edit without editedSpecContent"
|
|
2229
2438
|
);
|
|
2230
2439
|
}
|
|
2231
|
-
const parsedHandlerResult =
|
|
2440
|
+
const parsedHandlerResult = _chunkKAAWCHO4js.RequestPermissionResultSchema.safeParse(
|
|
2232
2441
|
typeof handlerResult === "string" ? { selectedOption: handlerResult } : handlerResult
|
|
2233
2442
|
);
|
|
2234
2443
|
if (parsedHandlerResult.success) {
|
|
2235
|
-
|
|
2236
|
-
comment = parsedHandlerResult.data.comment;
|
|
2237
|
-
editedSpecContent = parsedHandlerResult.data.editedSpecContent;
|
|
2238
|
-
clientStartsHandoffSession = parsedHandlerResult.data.clientStartsHandoffSession;
|
|
2239
|
-
specHandoffId = parsedHandlerResult.data.specHandoffId;
|
|
2444
|
+
result = parsedHandlerResult.data;
|
|
2240
2445
|
} else {
|
|
2241
|
-
throw new (0,
|
|
2446
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)(
|
|
2242
2447
|
"Permission handler returned invalid result",
|
|
2243
2448
|
{
|
|
2244
2449
|
cause: parsedHandlerResult.error
|
|
2245
2450
|
}
|
|
2246
2451
|
);
|
|
2247
2452
|
}
|
|
2248
|
-
if (!
|
|
2249
|
-
|
|
2453
|
+
if (!_chunkKAAWCHO4js.isOfferedPermissionOutcome.call(void 0,
|
|
2454
|
+
event.params.options,
|
|
2455
|
+
result.selectedOption
|
|
2250
2456
|
)) {
|
|
2251
|
-
throw new (0,
|
|
2252
|
-
`Permission handler selected unavailable option: ${selectedOption}`
|
|
2457
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)(
|
|
2458
|
+
`Permission handler selected unavailable option: ${result.selectedOption}`
|
|
2253
2459
|
);
|
|
2254
2460
|
}
|
|
2255
2461
|
this.logger.info("[DroidClient] Permission handler resolved", {
|
|
2256
2462
|
requestId: event.id,
|
|
2257
|
-
result: selectedOption
|
|
2463
|
+
result: result.selectedOption
|
|
2258
2464
|
});
|
|
2259
2465
|
} catch (error) {
|
|
2260
|
-
this.
|
|
2466
|
+
this.reportHandlerFailure(
|
|
2261
2467
|
error,
|
|
2262
2468
|
"Failed to handle permission request (processing)"
|
|
2263
2469
|
);
|
|
@@ -2271,18 +2477,18 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2271
2477
|
this.pendingPermissionRequests.delete(event.id);
|
|
2272
2478
|
const cancelResponse = {
|
|
2273
2479
|
type: "response",
|
|
2274
|
-
jsonrpc:
|
|
2275
|
-
factoryApiVersion:
|
|
2276
|
-
factoryProtocolVersion:
|
|
2480
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
2481
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
2482
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
2277
2483
|
id: event.id,
|
|
2278
2484
|
result: {
|
|
2279
2485
|
selectedOption: "cancel" /* Cancel */
|
|
2280
2486
|
}
|
|
2281
2487
|
};
|
|
2282
2488
|
try {
|
|
2283
|
-
await this.
|
|
2489
|
+
await this.sendResponse(cancelResponse, hostMeta);
|
|
2284
2490
|
} catch (sendError) {
|
|
2285
|
-
this.
|
|
2491
|
+
this.reportHandlerFailure(
|
|
2286
2492
|
sendError,
|
|
2287
2493
|
"Failed to handle permission request (send cancellation)"
|
|
2288
2494
|
);
|
|
@@ -2297,27 +2503,19 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2297
2503
|
return;
|
|
2298
2504
|
}
|
|
2299
2505
|
}
|
|
2300
|
-
const
|
|
2506
|
+
const response2 = {
|
|
2301
2507
|
type: "response",
|
|
2302
|
-
jsonrpc:
|
|
2303
|
-
factoryApiVersion:
|
|
2304
|
-
factoryProtocolVersion:
|
|
2508
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
2509
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
2510
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
2305
2511
|
id: event.id,
|
|
2306
|
-
result
|
|
2307
|
-
selectedOption,
|
|
2308
|
-
...comment !== void 0 && { comment },
|
|
2309
|
-
...editedSpecContent !== void 0 && { editedSpecContent },
|
|
2310
|
-
...clientStartsHandoffSession !== void 0 && {
|
|
2311
|
-
clientStartsHandoffSession
|
|
2312
|
-
},
|
|
2313
|
-
...specHandoffId !== void 0 && { specHandoffId }
|
|
2314
|
-
}
|
|
2512
|
+
result
|
|
2315
2513
|
};
|
|
2316
2514
|
this.logger.info("[DroidClient] Sending permission response back to CLI", {
|
|
2317
2515
|
requestId: event.id,
|
|
2318
|
-
result: String(selectedOption)
|
|
2516
|
+
result: String(result.selectedOption)
|
|
2319
2517
|
});
|
|
2320
|
-
await this.
|
|
2518
|
+
await this.sendResponse(response2, hostMeta);
|
|
2321
2519
|
}
|
|
2322
2520
|
async handleAskUserRequest(event) {
|
|
2323
2521
|
this.logger.info("[DroidClient] Handling ask-user request", {
|
|
@@ -2326,6 +2524,21 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2326
2524
|
count: event.params.questions.length
|
|
2327
2525
|
});
|
|
2328
2526
|
this.emit("ask_user" /* ASK_USER */, event);
|
|
2527
|
+
if (event.params.blocking === false && !this.askUserHandlers.has("default")) {
|
|
2528
|
+
this.heldQueuedAskUserRequests.push(event);
|
|
2529
|
+
this.logger.info(
|
|
2530
|
+
"[DroidClient] Holding queued ask-user request until a handler is set",
|
|
2531
|
+
{ requestId: event.id }
|
|
2532
|
+
);
|
|
2533
|
+
return;
|
|
2534
|
+
}
|
|
2535
|
+
await this.answerAskUserRequest(event);
|
|
2536
|
+
}
|
|
2537
|
+
async answerAskUserRequest(event) {
|
|
2538
|
+
let hostMeta;
|
|
2539
|
+
const setResponseMetadata = (meta) => {
|
|
2540
|
+
hostMeta = meta;
|
|
2541
|
+
};
|
|
2329
2542
|
let result = { cancelled: true, answers: [] };
|
|
2330
2543
|
const handler = this.askUserHandlers.get("default");
|
|
2331
2544
|
if (handler) {
|
|
@@ -2338,15 +2551,15 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2338
2551
|
);
|
|
2339
2552
|
const handlerPromise = new Promise((resolve2, reject) => {
|
|
2340
2553
|
this.pendingAskUserRequests.set(event.id, { reject });
|
|
2341
|
-
handler(event).then(resolve2).catch(reject).finally(() => {
|
|
2554
|
+
handler(event, setResponseMetadata).then(resolve2).catch(reject).finally(() => {
|
|
2342
2555
|
this.pendingAskUserRequests.delete(event.id);
|
|
2343
2556
|
});
|
|
2344
2557
|
});
|
|
2345
|
-
const parsedResult =
|
|
2558
|
+
const parsedResult = _chunkKAAWCHO4js.AskUserResultSchema.safeParse(
|
|
2346
2559
|
await handlerPromise
|
|
2347
2560
|
);
|
|
2348
2561
|
if (!parsedResult.success) {
|
|
2349
|
-
throw new (0,
|
|
2562
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)(
|
|
2350
2563
|
"AskUser handler returned invalid result",
|
|
2351
2564
|
{
|
|
2352
2565
|
cause: parsedResult.error
|
|
@@ -2360,7 +2573,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2360
2573
|
count: result.answers.length
|
|
2361
2574
|
});
|
|
2362
2575
|
} catch (error) {
|
|
2363
|
-
this.
|
|
2576
|
+
this.reportHandlerFailure(error, "Failed to handle ask-user request");
|
|
2364
2577
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
2365
2578
|
this.emit(
|
|
2366
2579
|
"session_notification" /* SESSION_NOTIFICATION */,
|
|
@@ -2369,10 +2582,20 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2369
2582
|
)
|
|
2370
2583
|
);
|
|
2371
2584
|
this.pendingAskUserRequests.delete(event.id);
|
|
2372
|
-
const cancelResponse = {
|
|
2373
|
-
jsonrpc:
|
|
2374
|
-
factoryApiVersion:
|
|
2375
|
-
factoryProtocolVersion:
|
|
2585
|
+
const cancelResponse = event.params.blocking === false ? {
|
|
2586
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
2587
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
2588
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
2589
|
+
type: "response",
|
|
2590
|
+
id: event.id,
|
|
2591
|
+
error: {
|
|
2592
|
+
code: -32603 /* INTERNAL_ERROR */,
|
|
2593
|
+
message: "The queued AskUser request could not be answered"
|
|
2594
|
+
}
|
|
2595
|
+
} : {
|
|
2596
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
2597
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
2598
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
2376
2599
|
type: "response",
|
|
2377
2600
|
id: event.id,
|
|
2378
2601
|
result: {
|
|
@@ -2381,9 +2604,9 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2381
2604
|
}
|
|
2382
2605
|
};
|
|
2383
2606
|
try {
|
|
2384
|
-
await this.
|
|
2607
|
+
await this.sendResponse(cancelResponse, hostMeta);
|
|
2385
2608
|
} catch (sendError) {
|
|
2386
|
-
this.
|
|
2609
|
+
this.reportHandlerFailure(
|
|
2387
2610
|
sendError,
|
|
2388
2611
|
"Failed to send ask-user cancellation"
|
|
2389
2612
|
);
|
|
@@ -2391,11 +2614,11 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2391
2614
|
return;
|
|
2392
2615
|
}
|
|
2393
2616
|
}
|
|
2394
|
-
const
|
|
2617
|
+
const response2 = {
|
|
2395
2618
|
type: "response",
|
|
2396
|
-
jsonrpc:
|
|
2397
|
-
factoryApiVersion:
|
|
2398
|
-
factoryProtocolVersion:
|
|
2619
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
2620
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
2621
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
2399
2622
|
id: event.id,
|
|
2400
2623
|
result
|
|
2401
2624
|
};
|
|
@@ -2403,7 +2626,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2403
2626
|
requestId: event.id,
|
|
2404
2627
|
cancelled: _nullishCoalesce(result.cancelled, () => ( false))
|
|
2405
2628
|
});
|
|
2406
|
-
await this.
|
|
2629
|
+
await this.sendResponse(response2, hostMeta);
|
|
2407
2630
|
}
|
|
2408
2631
|
/**
|
|
2409
2632
|
* Same shape as the ask-user round trip: the handler (a UI) resolves with
|
|
@@ -2418,6 +2641,10 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2418
2641
|
toolCallId: event.params.toolCallId,
|
|
2419
2642
|
count: event.params.rows.length
|
|
2420
2643
|
});
|
|
2644
|
+
let hostMeta;
|
|
2645
|
+
const setResponseMetadata = (meta) => {
|
|
2646
|
+
hostMeta = meta;
|
|
2647
|
+
};
|
|
2421
2648
|
this.emit("pick_options" /* PICK_OPTIONS */, event);
|
|
2422
2649
|
let result = { cancelled: true, selectedIds: [] };
|
|
2423
2650
|
const handler = this.pickOptionsHandlers.get("default");
|
|
@@ -2426,16 +2653,16 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2426
2653
|
const handlerPromise = new Promise(
|
|
2427
2654
|
(resolve2, reject) => {
|
|
2428
2655
|
this.pendingPickOptionsRequests.set(event.id, { reject });
|
|
2429
|
-
handler(event).then(resolve2).catch(reject).finally(() => {
|
|
2656
|
+
handler(event, setResponseMetadata).then(resolve2).catch(reject).finally(() => {
|
|
2430
2657
|
this.pendingPickOptionsRequests.delete(event.id);
|
|
2431
2658
|
});
|
|
2432
2659
|
}
|
|
2433
2660
|
);
|
|
2434
|
-
const parsedResult =
|
|
2661
|
+
const parsedResult = _chunkKAAWCHO4js.PickOptionsResultSchema.safeParse(
|
|
2435
2662
|
await handlerPromise
|
|
2436
2663
|
);
|
|
2437
2664
|
if (!parsedResult.success) {
|
|
2438
|
-
throw new (0,
|
|
2665
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)(
|
|
2439
2666
|
"PickOptions handler returned invalid result",
|
|
2440
2667
|
{ cause: parsedResult.error }
|
|
2441
2668
|
);
|
|
@@ -2443,30 +2670,33 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2443
2670
|
result = parsedResult.data;
|
|
2444
2671
|
} catch (error) {
|
|
2445
2672
|
this.pendingPickOptionsRequests.delete(event.id);
|
|
2446
|
-
if (error instanceof
|
|
2673
|
+
if (error instanceof _chunkKAAWCHO4js.PickOptionsUnavailableError) {
|
|
2447
2674
|
this.logger.info("[DroidClient] Pick-options request unavailable", {
|
|
2448
2675
|
requestId: event.id,
|
|
2449
2676
|
code: error.rpcError.code
|
|
2450
2677
|
});
|
|
2451
2678
|
const failure = {
|
|
2452
|
-
jsonrpc:
|
|
2453
|
-
factoryApiVersion:
|
|
2454
|
-
factoryProtocolVersion:
|
|
2679
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
2680
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
2681
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
2455
2682
|
type: "response",
|
|
2456
2683
|
id: event.id,
|
|
2457
2684
|
error: error.rpcError
|
|
2458
2685
|
};
|
|
2459
2686
|
try {
|
|
2460
|
-
await this.
|
|
2687
|
+
await this.sendResponse(failure, hostMeta);
|
|
2461
2688
|
} catch (sendError) {
|
|
2462
|
-
this.
|
|
2689
|
+
this.reportHandlerFailure(
|
|
2463
2690
|
sendError,
|
|
2464
2691
|
"Failed to send pick-options failure"
|
|
2465
2692
|
);
|
|
2466
2693
|
}
|
|
2467
2694
|
return;
|
|
2468
2695
|
}
|
|
2469
|
-
this.
|
|
2696
|
+
this.reportHandlerFailure(
|
|
2697
|
+
error,
|
|
2698
|
+
"Failed to handle pick-options request"
|
|
2699
|
+
);
|
|
2470
2700
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
2471
2701
|
this.emit(
|
|
2472
2702
|
"session_notification" /* SESSION_NOTIFICATION */,
|
|
@@ -2475,17 +2705,17 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2475
2705
|
)
|
|
2476
2706
|
);
|
|
2477
2707
|
const cancelResponse = {
|
|
2478
|
-
jsonrpc:
|
|
2479
|
-
factoryApiVersion:
|
|
2480
|
-
factoryProtocolVersion:
|
|
2708
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
2709
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
2710
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
2481
2711
|
type: "response",
|
|
2482
2712
|
id: event.id,
|
|
2483
2713
|
result: { cancelled: true, selectedIds: [] }
|
|
2484
2714
|
};
|
|
2485
2715
|
try {
|
|
2486
|
-
await this.
|
|
2716
|
+
await this.sendResponse(cancelResponse, hostMeta);
|
|
2487
2717
|
} catch (sendError) {
|
|
2488
|
-
this.
|
|
2718
|
+
this.reportHandlerFailure(
|
|
2489
2719
|
sendError,
|
|
2490
2720
|
"Failed to send pick-options cancellation"
|
|
2491
2721
|
);
|
|
@@ -2493,29 +2723,30 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2493
2723
|
return;
|
|
2494
2724
|
}
|
|
2495
2725
|
}
|
|
2496
|
-
const
|
|
2726
|
+
const response2 = {
|
|
2497
2727
|
type: "response",
|
|
2498
|
-
jsonrpc:
|
|
2499
|
-
factoryApiVersion:
|
|
2500
|
-
factoryProtocolVersion:
|
|
2728
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
2729
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
2730
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
2501
2731
|
id: event.id,
|
|
2502
2732
|
result
|
|
2503
2733
|
};
|
|
2504
|
-
await this.
|
|
2734
|
+
await this.sendResponse(response2, hostMeta);
|
|
2505
2735
|
}
|
|
2506
2736
|
static getErrorType(error) {
|
|
2507
2737
|
switch (error.constructor) {
|
|
2508
|
-
case
|
|
2738
|
+
case _chunkKAAWCHO4js.ConnectionError:
|
|
2739
|
+
case _chunkKAAWCHO4js.DroidConnectionEndedError:
|
|
2509
2740
|
return "ConnectionError" /* CONNECTION_ERROR */;
|
|
2510
|
-
case
|
|
2741
|
+
case _chunkKAAWCHO4js.ProtocolError:
|
|
2511
2742
|
return "ProtocolError" /* PROTOCOL_ERROR */;
|
|
2512
|
-
case
|
|
2743
|
+
case _chunkKAAWCHO4js.SessionError:
|
|
2513
2744
|
return "SessionError" /* SESSION_ERROR */;
|
|
2514
|
-
case
|
|
2745
|
+
case _chunkKAAWCHO4js.TimeoutError:
|
|
2515
2746
|
return "TimeoutError" /* TIMEOUT_ERROR */;
|
|
2516
|
-
case
|
|
2747
|
+
case _chunkKAAWCHO4js.ProcessExitError:
|
|
2517
2748
|
return "ProcessExitError" /* PROCESS_EXIT_ERROR */;
|
|
2518
|
-
case
|
|
2749
|
+
case _chunkKAAWCHO4js.DroidClientError:
|
|
2519
2750
|
return "DroidClientError" /* DROID_CLIENT_ERROR */;
|
|
2520
2751
|
default:
|
|
2521
2752
|
return "Error" /* ERROR */;
|
|
@@ -2527,7 +2758,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2527
2758
|
message: error.message,
|
|
2528
2759
|
errorType: _DroidClient.getErrorType(error),
|
|
2529
2760
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2530
|
-
...error instanceof
|
|
2761
|
+
...error instanceof _chunkKAAWCHO4js.ProcessExitError && error.exitCode !== void 0 ? { exitCode: error.exitCode } : {},
|
|
2531
2762
|
error: {
|
|
2532
2763
|
name: error.name,
|
|
2533
2764
|
message: error.message
|
|
@@ -2553,10 +2784,10 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2553
2784
|
*/
|
|
2554
2785
|
static createNotificationEvent(notification) {
|
|
2555
2786
|
return {
|
|
2556
|
-
jsonrpc:
|
|
2787
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
2557
2788
|
type: "notification",
|
|
2558
|
-
factoryApiVersion:
|
|
2559
|
-
factoryProtocolVersion:
|
|
2789
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
2790
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
2560
2791
|
method: "droid.session_notification" /* SESSION_NOTIFICATION */,
|
|
2561
2792
|
params: { notification }
|
|
2562
2793
|
};
|
|
@@ -2596,7 +2827,7 @@ function withJsonRpcCodec(transport, deps = defaultExecCoreDeps) {
|
|
|
2596
2827
|
}
|
|
2597
2828
|
function decodeDroidMessage(frame, logger) {
|
|
2598
2829
|
try {
|
|
2599
|
-
return
|
|
2830
|
+
return _chunkKAAWCHO4js.JsonRpcMessageSchema.parse(JSON.parse(frame));
|
|
2600
2831
|
} catch (error) {
|
|
2601
2832
|
logWarn(logger, "[DroidClient] Failed to handle message", {
|
|
2602
2833
|
errorName: error instanceof Error ? error.name : typeof error,
|
|
@@ -2773,7 +3004,7 @@ function logTransportMessage(direction, message, childPid, deps = defaultExecCor
|
|
|
2773
3004
|
}
|
|
2774
3005
|
}
|
|
2775
3006
|
async function __resetTransportLoggerForTests(deps = defaultExecCoreDeps) {
|
|
2776
|
-
const stream = _nullishCoalesce(_optionalChain([state, 'optionalAccess',
|
|
3007
|
+
const stream = _nullishCoalesce(_optionalChain([state, 'optionalAccess', _29 => _29.stream]), () => ( null));
|
|
2777
3008
|
state = null;
|
|
2778
3009
|
enabledCache = null;
|
|
2779
3010
|
if (!stream) return;
|
|
@@ -2805,16 +3036,23 @@ function describeSpawnError(error, context) {
|
|
|
2805
3036
|
return `Failed to start Droid: ${error.message}`;
|
|
2806
3037
|
}
|
|
2807
3038
|
if (error.code === "ENOENT") {
|
|
2808
|
-
if (_optionalChain([context, 'optionalAccess',
|
|
3039
|
+
if (_optionalChain([context, 'optionalAccess', _30 => _30.cwd]) && !fs3.default.existsSync(context.cwd)) {
|
|
2809
3040
|
return `Failed to start Droid: working directory does not exist (${context.cwd})`;
|
|
2810
3041
|
}
|
|
2811
|
-
return `Failed to start Droid: executable not found${_optionalChain([context, 'optionalAccess',
|
|
3042
|
+
return `Failed to start Droid: executable not found${_optionalChain([context, 'optionalAccess', _31 => _31.execPath]) ? ` (${context.execPath})` : ""}`;
|
|
2812
3043
|
}
|
|
2813
3044
|
if (error.code === "EACCES") {
|
|
2814
|
-
return `Failed to start Droid: permission denied${_optionalChain([context, 'optionalAccess',
|
|
3045
|
+
return `Failed to start Droid: permission denied${_optionalChain([context, 'optionalAccess', _32 => _32.execPath]) ? ` (${context.execPath})` : ""}`;
|
|
2815
3046
|
}
|
|
2816
3047
|
return `Failed to start Droid: ${error.code}`;
|
|
2817
3048
|
}
|
|
3049
|
+
function createSpawnError(error, context) {
|
|
3050
|
+
return new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)(describeSpawnError(error, context), {
|
|
3051
|
+
error,
|
|
3052
|
+
cwd: _optionalChain([context, 'optionalAccess', _33 => _33.cwd]),
|
|
3053
|
+
execPath: _optionalChain([context, 'optionalAccess', _34 => _34.execPath])
|
|
3054
|
+
});
|
|
3055
|
+
}
|
|
2818
3056
|
function describeExitError(code, signal) {
|
|
2819
3057
|
if (signal) {
|
|
2820
3058
|
return `Droid process was killed (${signal})`;
|
|
@@ -2825,7 +3063,7 @@ function describeExitError(code, signal) {
|
|
|
2825
3063
|
return "Droid process exited unexpectedly";
|
|
2826
3064
|
}
|
|
2827
3065
|
var ManagedProcessImpl = (_class2 = class {
|
|
2828
|
-
constructor(childProcess, logPrefix, spawnContext, deps, transportLoggerDeps = deps) {;_class2.prototype.
|
|
3066
|
+
constructor(childProcess, logPrefix, spawnContext, deps, transportLoggerDeps = deps) {;_class2.prototype.__init14.call(this);_class2.prototype.__init15.call(this);_class2.prototype.__init16.call(this);_class2.prototype.__init17.call(this);_class2.prototype.__init18.call(this);_class2.prototype.__init19.call(this);_class2.prototype.__init20.call(this);_class2.prototype.__init21.call(this);_class2.prototype.__init22.call(this);
|
|
2829
3067
|
this.logPrefix = logPrefix;
|
|
2830
3068
|
this.spawnContext = spawnContext;
|
|
2831
3069
|
this.transportLoggerDeps = transportLoggerDeps;
|
|
@@ -2837,36 +3075,52 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
2837
3075
|
|
|
2838
3076
|
|
|
2839
3077
|
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
3078
|
+
__init14() {this.messageHandler = null}
|
|
3079
|
+
__init15() {this.errorHandler = null}
|
|
3080
|
+
__init16() {this.stdoutDecoder = new (0, _chunkKAAWCHO4js.LfLineDecoder)()}
|
|
3081
|
+
__init17() {this.stdoutDataHandler = (chunk) => {
|
|
2844
3082
|
const text = typeof chunk === "string" ? chunk : chunk.toString("utf8");
|
|
2845
3083
|
for (const line of this.stdoutDecoder.push(text)) {
|
|
2846
3084
|
this.handleStdoutLine(line);
|
|
2847
3085
|
}
|
|
2848
3086
|
}}
|
|
2849
|
-
|
|
3087
|
+
__init18() {this.isClosing = false}
|
|
2850
3088
|
/** Latch so exit teardown/classification runs exactly once per process. */
|
|
2851
|
-
|
|
2852
|
-
|
|
3089
|
+
__init19() {this.exitFinalized = false}
|
|
3090
|
+
__init20() {this.exitDrainTimer = null}
|
|
2853
3091
|
/**
|
|
2854
3092
|
* Sticky error from a process error or unexpected exit event. Once set,
|
|
2855
3093
|
* all subsequent `send()` calls throw this error immediately instead of
|
|
2856
3094
|
* hanging on a dead transport.
|
|
2857
3095
|
*/
|
|
2858
|
-
|
|
2859
|
-
|
|
3096
|
+
__init21() {this.processError = null}
|
|
3097
|
+
__init22() {this.queuedSendPromise = Promise.resolve()}
|
|
2860
3098
|
|
|
2861
3099
|
get childProcess() {
|
|
2862
3100
|
if (!this._childProcess) {
|
|
2863
|
-
throw new (0,
|
|
3101
|
+
throw new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)("Process not connected");
|
|
2864
3102
|
}
|
|
2865
3103
|
return this._childProcess;
|
|
2866
3104
|
}
|
|
3105
|
+
/** Wait for the runtime's spawn result without replacing the transport's error handler. */
|
|
3106
|
+
waitForSpawn() {
|
|
3107
|
+
const child = this.childProcess;
|
|
3108
|
+
return new Promise((resolve2, reject) => {
|
|
3109
|
+
const onSpawn = () => {
|
|
3110
|
+
child.off("error", onError);
|
|
3111
|
+
resolve2();
|
|
3112
|
+
};
|
|
3113
|
+
const onError = () => {
|
|
3114
|
+
child.off("spawn", onSpawn);
|
|
3115
|
+
reject(this.processError);
|
|
3116
|
+
};
|
|
3117
|
+
child.once("spawn", onSpawn);
|
|
3118
|
+
child.once("error", onError);
|
|
3119
|
+
});
|
|
3120
|
+
}
|
|
2867
3121
|
setupHandlers() {
|
|
2868
3122
|
if (!this.childProcess.stdout) {
|
|
2869
|
-
throw new (0,
|
|
3123
|
+
throw new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)("Failed to get process stdout");
|
|
2870
3124
|
}
|
|
2871
3125
|
this.childProcess.stdout.setEncoding("utf8");
|
|
2872
3126
|
this.childProcess.stdout.on("data", this.stdoutDataHandler);
|
|
@@ -2874,30 +3128,26 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
2874
3128
|
if (this.processError || this.isClosing || this.exitFinalized) {
|
|
2875
3129
|
return;
|
|
2876
3130
|
}
|
|
2877
|
-
this.processError =
|
|
2878
|
-
|
|
2879
|
-
{
|
|
2880
|
-
error,
|
|
2881
|
-
cwd: _optionalChain([this, 'access', _19 => _19.spawnContext, 'optionalAccess', _20 => _20.cwd]),
|
|
2882
|
-
execPath: _optionalChain([this, 'access', _21 => _21.spawnContext, 'optionalAccess', _22 => _22.execPath])
|
|
2883
|
-
}
|
|
2884
|
-
);
|
|
2885
|
-
_optionalChain([this, 'access', _23 => _23.errorHandler, 'optionalCall', _24 => _24(this.processError)]);
|
|
3131
|
+
this.processError = createSpawnError(error, this.spawnContext);
|
|
3132
|
+
_optionalChain([this, 'access', _35 => _35.errorHandler, 'optionalCall', _36 => _36(this.processError)]);
|
|
2886
3133
|
});
|
|
2887
|
-
_optionalChain([this, 'access',
|
|
3134
|
+
_optionalChain([this, 'access', _37 => _37.childProcess, 'access', _38 => _38.stdin, 'optionalAccess', _39 => _39.on, 'call', _40 => _40("error", (error) => {
|
|
2888
3135
|
if (this.processError || this.isClosing || this.exitFinalized) {
|
|
2889
3136
|
return;
|
|
2890
3137
|
}
|
|
2891
|
-
this.processError = new (0,
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
3138
|
+
this.processError = new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)(
|
|
3139
|
+
"Process stdin failed",
|
|
3140
|
+
{
|
|
3141
|
+
error
|
|
3142
|
+
}
|
|
3143
|
+
);
|
|
3144
|
+
_optionalChain([this, 'access', _41 => _41.errorHandler, 'optionalCall', _42 => _42(this.processError)]);
|
|
2895
3145
|
})]);
|
|
2896
3146
|
this.childProcess.on("exit", (code, signal) => {
|
|
2897
3147
|
this.exitDrainTimer = setTimeout(() => {
|
|
2898
3148
|
this.finalizeExit(code, signal);
|
|
2899
3149
|
}, EXIT_STDIO_DRAIN_TIMEOUT_MS);
|
|
2900
|
-
_optionalChain([this, 'access',
|
|
3150
|
+
_optionalChain([this, 'access', _43 => _43.exitDrainTimer, 'access', _44 => _44.unref, 'optionalCall', _45 => _45()]);
|
|
2901
3151
|
});
|
|
2902
3152
|
this.childProcess.on("close", (code, signal) => {
|
|
2903
3153
|
for (const line of this.stdoutDecoder.finish()) {
|
|
@@ -2923,7 +3173,7 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
2923
3173
|
logTransportMessage(
|
|
2924
3174
|
"in" /* In */,
|
|
2925
3175
|
trimmedLine,
|
|
2926
|
-
_optionalChain([this, 'access',
|
|
3176
|
+
_optionalChain([this, 'access', _46 => _46._childProcess, 'optionalAccess', _47 => _47.pid]),
|
|
2927
3177
|
this.transportLoggerDeps
|
|
2928
3178
|
);
|
|
2929
3179
|
this.messageHandler(trimmedLine);
|
|
@@ -2944,11 +3194,11 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
2944
3194
|
clearTimeout(this.exitDrainTimer);
|
|
2945
3195
|
this.exitDrainTimer = null;
|
|
2946
3196
|
}
|
|
2947
|
-
_optionalChain([this, 'access',
|
|
3197
|
+
_optionalChain([this, 'access', _48 => _48._childProcess, 'optionalAccess', _49 => _49.stdout, 'optionalAccess', _50 => _50.off, 'call', _51 => _51("data", this.stdoutDataHandler)]);
|
|
2948
3198
|
this._childProcess = null;
|
|
2949
3199
|
this.stdoutDecoder.reset();
|
|
2950
3200
|
if (!this.isClosing && !this.processError) {
|
|
2951
|
-
this.processError = new (0,
|
|
3201
|
+
this.processError = new (0, _chunkKAAWCHO4js.ProcessExitError)(
|
|
2952
3202
|
describeExitError(code, signal),
|
|
2953
3203
|
{
|
|
2954
3204
|
exitCode: _nullishCoalesce(code, () => ( void 0)),
|
|
@@ -2965,28 +3215,32 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
2965
3215
|
throw this.processError;
|
|
2966
3216
|
}
|
|
2967
3217
|
if (!this._childProcess || !this._childProcess.stdin) {
|
|
2968
|
-
throw new (0,
|
|
3218
|
+
throw new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)("Process not connected");
|
|
2969
3219
|
}
|
|
2970
3220
|
const previousSends = this.queuedSendPromise;
|
|
2971
3221
|
this.queuedSendPromise = (async () => {
|
|
2972
3222
|
await previousSends.catch(() => {
|
|
2973
3223
|
});
|
|
2974
3224
|
if (!this._childProcess || !this._childProcess.stdin || this._childProcess.killed || this.isClosing) {
|
|
2975
|
-
throw new (0,
|
|
3225
|
+
throw new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)(
|
|
3226
|
+
"Process disconnected before write"
|
|
3227
|
+
);
|
|
2976
3228
|
}
|
|
2977
3229
|
await new Promise((resolve2, reject) => {
|
|
2978
3230
|
try {
|
|
2979
3231
|
if (!this._childProcess || !this._childProcess.stdin) {
|
|
2980
|
-
reject(new (0,
|
|
3232
|
+
reject(new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)("Process stdin unavailable"));
|
|
2981
3233
|
return;
|
|
2982
3234
|
}
|
|
2983
3235
|
const stdin = this._childProcess.stdin;
|
|
2984
3236
|
if ("writable" in stdin && !stdin.writable) {
|
|
2985
|
-
reject(
|
|
3237
|
+
reject(
|
|
3238
|
+
new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)("Process stdin is not writable")
|
|
3239
|
+
);
|
|
2986
3240
|
return;
|
|
2987
3241
|
}
|
|
2988
|
-
const childPid = _optionalChain([this, 'access',
|
|
2989
|
-
stdin.write(`${
|
|
3242
|
+
const childPid = _optionalChain([this, 'access', _52 => _52._childProcess, 'optionalAccess', _53 => _53.pid]);
|
|
3243
|
+
stdin.write(`${_chunkKAAWCHO4js.escapeJsonLineSeparators.call(void 0, message)}
|
|
2990
3244
|
`, (error) => {
|
|
2991
3245
|
if (error) {
|
|
2992
3246
|
logTransportMessage(
|
|
@@ -2998,15 +3252,21 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
2998
3252
|
const errorMessage = error.message || String(error);
|
|
2999
3253
|
if (errorMessage.includes("EPIPE") || errorMessage.includes("ECONNRESET")) {
|
|
3000
3254
|
reject(
|
|
3001
|
-
new (0,
|
|
3002
|
-
|
|
3003
|
-
|
|
3255
|
+
new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)(
|
|
3256
|
+
"Process stdin closed during write",
|
|
3257
|
+
{
|
|
3258
|
+
error
|
|
3259
|
+
}
|
|
3260
|
+
)
|
|
3004
3261
|
);
|
|
3005
3262
|
} else {
|
|
3006
3263
|
reject(
|
|
3007
|
-
new (0,
|
|
3008
|
-
|
|
3009
|
-
|
|
3264
|
+
new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)(
|
|
3265
|
+
"Failed to write to process stdin",
|
|
3266
|
+
{
|
|
3267
|
+
error
|
|
3268
|
+
}
|
|
3269
|
+
)
|
|
3010
3270
|
);
|
|
3011
3271
|
}
|
|
3012
3272
|
} else {
|
|
@@ -3028,7 +3288,7 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
3028
3288
|
}
|
|
3029
3289
|
);
|
|
3030
3290
|
reject(
|
|
3031
|
-
new (0,
|
|
3291
|
+
new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)("Error writing to process stdin", {
|
|
3032
3292
|
error: error instanceof Error ? error : new Error(String(error))
|
|
3033
3293
|
})
|
|
3034
3294
|
);
|
|
@@ -3076,7 +3336,7 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
3076
3336
|
}
|
|
3077
3337
|
});
|
|
3078
3338
|
}
|
|
3079
|
-
_optionalChain([processToClose, 'access',
|
|
3339
|
+
_optionalChain([processToClose, 'access', _54 => _54.stdout, 'optionalAccess', _55 => _55.off, 'call', _56 => _56("data", this.stdoutDataHandler)]);
|
|
3080
3340
|
}
|
|
3081
3341
|
this.stdoutDecoder.reset();
|
|
3082
3342
|
this.exitFinalized = true;
|
|
@@ -3149,11 +3409,11 @@ function observeEarlySpawnFailure(childProcess, gracePeriodMs, sleep) {
|
|
|
3149
3409
|
const errorListener = (err) => {
|
|
3150
3410
|
observation.error = err;
|
|
3151
3411
|
};
|
|
3152
|
-
_optionalChain([childProcess, 'access',
|
|
3412
|
+
_optionalChain([childProcess, 'access', _57 => _57.stderr, 'optionalAccess', _58 => _58.on, 'call', _59 => _59("data", stderrListener)]);
|
|
3153
3413
|
childProcess.once("exit", exitListener);
|
|
3154
3414
|
childProcess.once("error", errorListener);
|
|
3155
3415
|
const cleanup = () => {
|
|
3156
|
-
_optionalChain([childProcess, 'access',
|
|
3416
|
+
_optionalChain([childProcess, 'access', _60 => _60.stderr, 'optionalAccess', _61 => _61.off, 'call', _62 => _62("data", stderrListener)]);
|
|
3157
3417
|
childProcess.off("exit", exitListener);
|
|
3158
3418
|
childProcess.off("error", errorListener);
|
|
3159
3419
|
};
|
|
@@ -3185,10 +3445,8 @@ async function spawnWithWindowsJobObjectRetry(spawnFactory, options = {}) {
|
|
|
3185
3445
|
const sleep = _nullishCoalesce(options.sleep, () => ( defaultSleep));
|
|
3186
3446
|
const logPrefix = _nullishCoalesce(options.logPrefix, () => ( "[spawnWithWindowsJobObjectRetry]"));
|
|
3187
3447
|
const logger = _nullishCoalesce(options.logger, () => ( noopLogger));
|
|
3188
|
-
let
|
|
3189
|
-
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
3448
|
+
for (let attempt = 0; ; attempt++) {
|
|
3190
3449
|
const child = spawnFactory();
|
|
3191
|
-
lastChild = child;
|
|
3192
3450
|
const observation = await observeEarlySpawnFailure(
|
|
3193
3451
|
child,
|
|
3194
3452
|
gracePeriodMs,
|
|
@@ -3198,8 +3456,28 @@ async function spawnWithWindowsJobObjectRetry(spawnFactory, options = {}) {
|
|
|
3198
3456
|
return child;
|
|
3199
3457
|
}
|
|
3200
3458
|
const isRetryableJobObjectFailure = observation.stderr.includes(WINDOWS_JOB_OBJECT_ERROR_MARKER) || observation.exited && observation.code !== 0 && !observation.error;
|
|
3201
|
-
|
|
3202
|
-
|
|
3459
|
+
try {
|
|
3460
|
+
await _optionalChain([options, 'access', _63 => _63.disposeEarlyExited, 'optionalCall', _64 => _64(child)]);
|
|
3461
|
+
} catch (disposeErr) {
|
|
3462
|
+
logWarn(logger, "spawnWithWindowsJobObjectRetry: dispose error", {
|
|
3463
|
+
cause: disposeErr instanceof Error ? disposeErr : new Error(String(disposeErr)),
|
|
3464
|
+
name: logPrefix
|
|
3465
|
+
});
|
|
3466
|
+
}
|
|
3467
|
+
if (attempt >= maxRetries || !isRetryableJobObjectFailure) {
|
|
3468
|
+
if (observation.error) {
|
|
3469
|
+
throw createSpawnError(observation.error, options);
|
|
3470
|
+
}
|
|
3471
|
+
throw new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)(
|
|
3472
|
+
"Droid process exited during startup",
|
|
3473
|
+
{
|
|
3474
|
+
cwd: options.cwd,
|
|
3475
|
+
execPath: options.execPath,
|
|
3476
|
+
exitCode: observation.code,
|
|
3477
|
+
signal: observation.signal,
|
|
3478
|
+
stderrTail: observation.stderr.slice(-256)
|
|
3479
|
+
}
|
|
3480
|
+
);
|
|
3203
3481
|
}
|
|
3204
3482
|
logger.warn("spawnWithWindowsJobObjectRetry: retrying on early failure", {
|
|
3205
3483
|
name: logPrefix,
|
|
@@ -3209,21 +3487,8 @@ async function spawnWithWindowsJobObjectRetry(spawnFactory, options = {}) {
|
|
|
3209
3487
|
signal: observation.signal,
|
|
3210
3488
|
stderrTail: observation.stderr.slice(-256)
|
|
3211
3489
|
});
|
|
3212
|
-
try {
|
|
3213
|
-
await _optionalChain([options, 'access', _51 => _51.disposeEarlyExited, 'optionalCall', _52 => _52(child)]);
|
|
3214
|
-
} catch (disposeErr) {
|
|
3215
|
-
logWarn(logger, "spawnWithWindowsJobObjectRetry: dispose error", {
|
|
3216
|
-
cause: disposeErr instanceof Error ? disposeErr : new Error(String(disposeErr)),
|
|
3217
|
-
name: logPrefix
|
|
3218
|
-
});
|
|
3219
|
-
}
|
|
3220
3490
|
await sleep(_nullishCoalesce(_nullishCoalesce(backoff[attempt], () => ( backoff[backoff.length - 1])), () => ( 400)));
|
|
3221
3491
|
}
|
|
3222
|
-
if (lastChild) return lastChild;
|
|
3223
|
-
throw new (0, _chunkOBPHU4RTjs.DroidClientError)(
|
|
3224
|
-
"spawnWithWindowsJobObjectRetry: exhausted retries without child",
|
|
3225
|
-
{}
|
|
3226
|
-
);
|
|
3227
3492
|
}
|
|
3228
3493
|
|
|
3229
3494
|
// src/exec-core/process-manager.ts
|
|
@@ -3311,11 +3576,13 @@ var DroidProcessManager = class {
|
|
|
3311
3576
|
() => this.invokeNodeSpawn(planned),
|
|
3312
3577
|
{
|
|
3313
3578
|
...retryOptions,
|
|
3579
|
+
cwd: planned.expandedCwd,
|
|
3580
|
+
execPath: planned.execPath,
|
|
3314
3581
|
logPrefix: "[DroidProcessManager]",
|
|
3315
3582
|
logger: this.logger,
|
|
3316
3583
|
disposeEarlyExited: (child) => {
|
|
3317
3584
|
try {
|
|
3318
|
-
_optionalChain([child, 'access',
|
|
3585
|
+
_optionalChain([child, 'access', _65 => _65.stdin, 'optionalAccess', _66 => _66.end, 'call', _67 => _67()]);
|
|
3319
3586
|
} catch (stdinErr) {
|
|
3320
3587
|
logWarn(
|
|
3321
3588
|
this.logger,
|
|
@@ -3341,7 +3608,7 @@ var DroidProcessManager = class {
|
|
|
3341
3608
|
);
|
|
3342
3609
|
if (!childProcess.stdout || !childProcess.stdin) {
|
|
3343
3610
|
childProcess.kill();
|
|
3344
|
-
throw new (0,
|
|
3611
|
+
throw new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)("Failed to get process stdio");
|
|
3345
3612
|
}
|
|
3346
3613
|
return new ManagedProcessImpl(
|
|
3347
3614
|
childProcess,
|
|
@@ -3468,7 +3735,7 @@ var DroidProcessManager = class {
|
|
|
3468
3735
|
const childProcess = this.invokeNodeSpawn(planned);
|
|
3469
3736
|
if (!childProcess.stdout || !childProcess.stdin) {
|
|
3470
3737
|
childProcess.kill();
|
|
3471
|
-
throw new (0,
|
|
3738
|
+
throw new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)("Failed to get process stdio");
|
|
3472
3739
|
}
|
|
3473
3740
|
return {
|
|
3474
3741
|
logPrefix: planned.logPrefix,
|
|
@@ -3481,20 +3748,20 @@ var DroidProcessManager = class {
|
|
|
3481
3748
|
|
|
3482
3749
|
// src/exec-core/process-transport.ts
|
|
3483
3750
|
var ProcessTransport = (_class3 = class {
|
|
3484
|
-
|
|
3751
|
+
__init23() {this.managedProcess = null}
|
|
3485
3752
|
|
|
3486
3753
|
|
|
3487
3754
|
// Store handlers that may be registered before connect() is called
|
|
3488
|
-
|
|
3755
|
+
__init24() {this.messageHandler = null}
|
|
3489
3756
|
|
|
3490
|
-
|
|
3757
|
+
__init25() {this.handleMessage = (frame) => {
|
|
3491
3758
|
const message = decodeDroidMessage(frame, this.logger);
|
|
3492
|
-
if (message) _optionalChain([this, 'access',
|
|
3759
|
+
if (message) _optionalChain([this, 'access', _70 => _70.messageHandler, 'optionalCall', _71 => _71(message)]);
|
|
3493
3760
|
}}
|
|
3494
|
-
|
|
3761
|
+
__init26() {this.errorHandler = null}
|
|
3495
3762
|
|
|
3496
3763
|
|
|
3497
|
-
constructor(options = {}, deps = defaultExecCoreDeps) {;_class3.prototype.
|
|
3764
|
+
constructor(options = {}, deps = defaultExecCoreDeps) {;_class3.prototype.__init23.call(this);_class3.prototype.__init24.call(this);_class3.prototype.__init25.call(this);_class3.prototype.__init26.call(this);
|
|
3498
3765
|
this.options = options;
|
|
3499
3766
|
const resolved = resolveExecCoreDeps(options.observability, deps);
|
|
3500
3767
|
this.logger = resolved.logger;
|
|
@@ -3509,7 +3776,7 @@ var ProcessTransport = (_class3 = class {
|
|
|
3509
3776
|
}
|
|
3510
3777
|
async connect() {
|
|
3511
3778
|
if (this.managedProcess && this.managedProcess.isConnected) {
|
|
3512
|
-
throw new (0,
|
|
3779
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)("Transport already connected");
|
|
3513
3780
|
}
|
|
3514
3781
|
const config = {
|
|
3515
3782
|
execPath: this.options.droidExecPath,
|
|
@@ -3531,8 +3798,22 @@ var ProcessTransport = (_class3 = class {
|
|
|
3531
3798
|
let spawnOutcome = "error";
|
|
3532
3799
|
let managedProcess;
|
|
3533
3800
|
try {
|
|
3534
|
-
|
|
3801
|
+
if (process.platform === "win32") {
|
|
3802
|
+
managedProcess = await this.processManager.spawnWithWindowsRetry(config);
|
|
3803
|
+
} else {
|
|
3804
|
+
const spawned = this.processManager.spawn(config);
|
|
3805
|
+
managedProcess = spawned;
|
|
3806
|
+
if (spawned.childProcess.pid === void 0) {
|
|
3807
|
+
await spawned.waitForSpawn();
|
|
3808
|
+
}
|
|
3809
|
+
}
|
|
3535
3810
|
spawnOutcome = "success";
|
|
3811
|
+
} catch (error) {
|
|
3812
|
+
await _optionalChain([managedProcess, 'optionalAccess', _72 => _72.close, 'call', _73 => _73()]);
|
|
3813
|
+
if (error instanceof _chunkKAAWCHO4js.DroidConnectionEndedError) {
|
|
3814
|
+
_optionalChain([this, 'access', _74 => _74.errorHandler, 'optionalCall', _75 => _75(error)]);
|
|
3815
|
+
}
|
|
3816
|
+
throw error;
|
|
3536
3817
|
} finally {
|
|
3537
3818
|
this.metrics.recordDuration(
|
|
3538
3819
|
CLI_JSONRPC_CHILD_SPAWN_LATENCY_METRIC,
|
|
@@ -3541,7 +3822,7 @@ var ProcessTransport = (_class3 = class {
|
|
|
3541
3822
|
);
|
|
3542
3823
|
}
|
|
3543
3824
|
try {
|
|
3544
|
-
_optionalChain([this, 'access',
|
|
3825
|
+
_optionalChain([this, 'access', _76 => _76.options, 'access', _77 => _77.onSpawned, 'optionalCall', _78 => _78(managedProcess.childProcess)]);
|
|
3545
3826
|
} catch (error) {
|
|
3546
3827
|
await managedProcess.close();
|
|
3547
3828
|
throw error;
|
|
@@ -3556,7 +3837,7 @@ var ProcessTransport = (_class3 = class {
|
|
|
3556
3837
|
}
|
|
3557
3838
|
async send(message) {
|
|
3558
3839
|
if (!this.managedProcess) {
|
|
3559
|
-
throw new (0,
|
|
3840
|
+
throw new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)("Transport not connected");
|
|
3560
3841
|
}
|
|
3561
3842
|
return await this.managedProcess.send(JSON.stringify(message));
|
|
3562
3843
|
}
|
|
@@ -3579,18 +3860,192 @@ var ProcessTransport = (_class3 = class {
|
|
|
3579
3860
|
}
|
|
3580
3861
|
}
|
|
3581
3862
|
get isConnected() {
|
|
3582
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
3863
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _79 => _79.managedProcess, 'optionalAccess', _80 => _80.isConnected]), () => ( false));
|
|
3583
3864
|
}
|
|
3584
3865
|
getManagedProcess() {
|
|
3585
3866
|
return this.managedProcess;
|
|
3586
3867
|
}
|
|
3587
3868
|
}, _class3);
|
|
3588
3869
|
|
|
3870
|
+
// src/environment-session.ts
|
|
3871
|
+
|
|
3872
|
+
|
|
3873
|
+
// src/environment-launch/index.ts
|
|
3874
|
+
|
|
3875
|
+
|
|
3876
|
+
// src/environment-launch/errors.ts
|
|
3877
|
+
var EnvironmentLaunchError = class extends Error {
|
|
3878
|
+
|
|
3879
|
+
|
|
3880
|
+
|
|
3881
|
+
constructor(options) {
|
|
3882
|
+
super(
|
|
3883
|
+
options.cause instanceof Error ? options.cause.message : "Environment session startup failed",
|
|
3884
|
+
{ cause: options.cause }
|
|
3885
|
+
);
|
|
3886
|
+
this.name = "EnvironmentLaunchError";
|
|
3887
|
+
this.computerId = options.computerId;
|
|
3888
|
+
this.computerName = options.computerName;
|
|
3889
|
+
this.cleanupError = options.cleanupError;
|
|
3890
|
+
}
|
|
3891
|
+
};
|
|
3892
|
+
|
|
3893
|
+
// src/environment-launch/index.ts
|
|
3894
|
+
async function launchEnvironmentSession(options) {
|
|
3895
|
+
const timeoutMs = _nullishCoalesce(options.timeoutMs, () => ( 18e4));
|
|
3896
|
+
const pollIntervalMs = _nullishCoalesce(options.pollIntervalMs, () => ( 1e3));
|
|
3897
|
+
const controller = new AbortController();
|
|
3898
|
+
const cancel = () => controller.abort(_optionalChain([options, 'access', _81 => _81.signal, 'optionalAccess', _82 => _82.reason]));
|
|
3899
|
+
if (_optionalChain([options, 'access', _83 => _83.signal, 'optionalAccess', _84 => _84.aborted])) cancel();
|
|
3900
|
+
else _optionalChain([options, 'access', _85 => _85.signal, 'optionalAccess', _86 => _86.addEventListener, 'call', _87 => _87("abort", cancel, { once: true })]);
|
|
3901
|
+
const timer = setTimeout(
|
|
3902
|
+
() => controller.abort(new (0, _chunkKAAWCHO4js.EnvironmentComputerTimeoutError)()),
|
|
3903
|
+
timeoutMs
|
|
3904
|
+
);
|
|
3905
|
+
const signal = controller.signal;
|
|
3906
|
+
let createdComputerId;
|
|
3907
|
+
let computerName;
|
|
3908
|
+
function launchError(cause, cleanupError) {
|
|
3909
|
+
return new EnvironmentLaunchError({
|
|
3910
|
+
cause,
|
|
3911
|
+
computerId: createdComputerId,
|
|
3912
|
+
computerName,
|
|
3913
|
+
cleanupError
|
|
3914
|
+
});
|
|
3915
|
+
}
|
|
3916
|
+
try {
|
|
3917
|
+
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0 || !Number.isFinite(pollIntervalMs) || pollIntervalMs <= 0)
|
|
3918
|
+
throw new Error("Invalid environment launch configuration");
|
|
3919
|
+
const selection = await _chunkKAAWCHO4js.runWithAbort.call(void 0,
|
|
3920
|
+
signal,
|
|
3921
|
+
async () => await resolveEnvironment({ ...options, signal })
|
|
3922
|
+
);
|
|
3923
|
+
computerName = `environment-${_uuid.v4.call(void 0, )}`;
|
|
3924
|
+
signal.throwIfAborted();
|
|
3925
|
+
const createPromise = _chunkKAAWCHO4js.createOrRecoverComputer.call(void 0, {
|
|
3926
|
+
name: computerName,
|
|
3927
|
+
environmentId: selection.environment.id,
|
|
3928
|
+
keepWhenIdle: options.keepWhenIdle,
|
|
3929
|
+
request: options.request,
|
|
3930
|
+
serviceAccountId: options.serviceAccountId,
|
|
3931
|
+
signal: AbortSignal.timeout(timeoutMs)
|
|
3932
|
+
});
|
|
3933
|
+
const allocated = await _chunkKAAWCHO4js.runWithAbort.call(void 0, signal, async () => await createPromise).catch(
|
|
3934
|
+
(cause) => {
|
|
3935
|
+
if (signal.aborted && createdComputerId === void 0)
|
|
3936
|
+
void createPromise.then(
|
|
3937
|
+
(computer2) => _chunkKAAWCHO4js.createFactoryApi.call(void 0, options.request).deleteComputer({
|
|
3938
|
+
computerId: computer2.id,
|
|
3939
|
+
signal: AbortSignal.timeout(Math.min(timeoutMs, 5e3))
|
|
3940
|
+
})
|
|
3941
|
+
).catch(() => {
|
|
3942
|
+
});
|
|
3943
|
+
throw cause;
|
|
3944
|
+
}
|
|
3945
|
+
);
|
|
3946
|
+
createdComputerId = allocated.id;
|
|
3947
|
+
await _chunkKAAWCHO4js.runWithAbort.call(void 0, signal, async () => await _optionalChain([options, 'access', _88 => _88.onComputer, 'optionalCall', _89 => _89(allocated)]));
|
|
3948
|
+
const computer = await _chunkKAAWCHO4js.waitForEnvironmentComputer.call(void 0, {
|
|
3949
|
+
computer: allocated,
|
|
3950
|
+
timeoutMs,
|
|
3951
|
+
pollIntervalMs,
|
|
3952
|
+
now: options.now,
|
|
3953
|
+
sleep: options.sleep,
|
|
3954
|
+
signal,
|
|
3955
|
+
isReady: _chunkKAAWCHO4js.isEnvironmentComputerReady,
|
|
3956
|
+
onComputer: options.onComputer,
|
|
3957
|
+
request: options.request,
|
|
3958
|
+
serviceAccountId: options.serviceAccountId
|
|
3959
|
+
});
|
|
3960
|
+
const connection = await _chunkKAAWCHO4js.runWithAbort.call(void 0,
|
|
3961
|
+
signal,
|
|
3962
|
+
async () => await options.connect({ computer, signal })
|
|
3963
|
+
);
|
|
3964
|
+
const session = await _chunkKAAWCHO4js.runWithAbort.call(void 0,
|
|
3965
|
+
signal,
|
|
3966
|
+
async () => await options.startSession({ connection, computer, selection, signal })
|
|
3967
|
+
);
|
|
3968
|
+
return { session, computer, selection };
|
|
3969
|
+
} catch (cause) {
|
|
3970
|
+
if (createdComputerId !== void 0) {
|
|
3971
|
+
const cleanup = new AbortController();
|
|
3972
|
+
const cleanupTimer = setTimeout(
|
|
3973
|
+
() => cleanup.abort(new (0, _chunkKAAWCHO4js.EnvironmentComputerTimeoutError)()),
|
|
3974
|
+
Math.min(timeoutMs, 5e3)
|
|
3975
|
+
);
|
|
3976
|
+
try {
|
|
3977
|
+
const computerId = createdComputerId;
|
|
3978
|
+
await _chunkKAAWCHO4js.runWithAbort.call(void 0,
|
|
3979
|
+
cleanup.signal,
|
|
3980
|
+
async () => await _chunkKAAWCHO4js.createFactoryApi.call(void 0, options.request).deleteComputer({
|
|
3981
|
+
computerId,
|
|
3982
|
+
signal: cleanup.signal
|
|
3983
|
+
})
|
|
3984
|
+
);
|
|
3985
|
+
} catch (failure) {
|
|
3986
|
+
throw launchError(cause, failure);
|
|
3987
|
+
} finally {
|
|
3988
|
+
clearTimeout(cleanupTimer);
|
|
3989
|
+
}
|
|
3990
|
+
}
|
|
3991
|
+
throw launchError(cause);
|
|
3992
|
+
} finally {
|
|
3993
|
+
clearTimeout(timer);
|
|
3994
|
+
_optionalChain([options, 'access', _90 => _90.signal, 'optionalAccess', _91 => _91.removeEventListener, 'call', _92 => _92("abort", cancel)]);
|
|
3995
|
+
}
|
|
3996
|
+
}
|
|
3997
|
+
async function resolveEnvironment(options) {
|
|
3998
|
+
const http2 = _chunkKAAWCHO4js.createFactoryApi.call(void 0, options.request);
|
|
3999
|
+
const selector = options.environment;
|
|
4000
|
+
if ("id" in selector ? !selector.id.trim() : !selector.name.trim())
|
|
4001
|
+
throw new Error("Invalid environment selector");
|
|
4002
|
+
const context = {
|
|
4003
|
+
serviceAccountId: options.serviceAccountId,
|
|
4004
|
+
signal: options.signal
|
|
4005
|
+
};
|
|
4006
|
+
let environment;
|
|
4007
|
+
if ("id" in selector && context.serviceAccountId === void 0) {
|
|
4008
|
+
environment = _chunkKAAWCHO4js.SandboxEnvironmentSchema.parse(
|
|
4009
|
+
await http2.getEnvironment({
|
|
4010
|
+
...context,
|
|
4011
|
+
environmentId: selector.id
|
|
4012
|
+
})
|
|
4013
|
+
);
|
|
4014
|
+
if (environment.id !== selector.id)
|
|
4015
|
+
throw new Error("Environment lookup returned a different ID");
|
|
4016
|
+
} else {
|
|
4017
|
+
const matches = [];
|
|
4018
|
+
_optionalChain([options, 'access', _93 => _93.signal, 'optionalAccess', _94 => _94.throwIfAborted, 'call', _95 => _95()]);
|
|
4019
|
+
const page = await http2.listEnvironments(context);
|
|
4020
|
+
if (!page || typeof page !== "object" || !("environments" in page) || !Array.isArray(page.environments))
|
|
4021
|
+
throw new Error("Invalid environment list response");
|
|
4022
|
+
for (const item of page.environments) {
|
|
4023
|
+
const candidate = _chunkKAAWCHO4js.SandboxEnvironmentSchema.parse(item);
|
|
4024
|
+
if ("id" in selector ? candidate.id === selector.id : candidate.name === selector.name)
|
|
4025
|
+
matches.push(candidate);
|
|
4026
|
+
}
|
|
4027
|
+
if (matches.length !== 1)
|
|
4028
|
+
throw new Error(
|
|
4029
|
+
"id" in selector ? "Environment is not accessible" : "Environment name must match exactly one accessible environment"
|
|
4030
|
+
);
|
|
4031
|
+
environment = matches[0];
|
|
4032
|
+
}
|
|
4033
|
+
if (!environment) throw new Error("Environment is not accessible");
|
|
4034
|
+
if (!_chunkKAAWCHO4js.isSandboxEnvironmentLaunchable.call(void 0, environment)) {
|
|
4035
|
+
throw new Error("Environment is not ready to launch");
|
|
4036
|
+
}
|
|
4037
|
+
return {
|
|
4038
|
+
environment,
|
|
4039
|
+
source: _chunkKAAWCHO4js.getSandboxEnvironmentLaunchSource.call(void 0, environment),
|
|
4040
|
+
repositories: _chunkKAAWCHO4js.getSandboxEnvironmentLaunchRepositories.call(void 0, environment)
|
|
4041
|
+
};
|
|
4042
|
+
}
|
|
4043
|
+
|
|
3589
4044
|
// src/helpers.ts
|
|
3590
4045
|
function resolveApiKey(apiKey) {
|
|
3591
4046
|
const resolved = _nullishCoalesce(apiKey, () => ( process.env.FACTORY_API_KEY));
|
|
3592
4047
|
if (!resolved) {
|
|
3593
|
-
throw new (0,
|
|
4048
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)(
|
|
3594
4049
|
"No Factory API key found. Pass `apiKey` when creating the session, or set the FACTORY_API_KEY environment variable."
|
|
3595
4050
|
);
|
|
3596
4051
|
}
|
|
@@ -3608,7 +4063,10 @@ async function createTransport(options) {
|
|
|
3608
4063
|
...options.env,
|
|
3609
4064
|
FACTORY_API_KEY: resolveApiKey(options.apiKey),
|
|
3610
4065
|
FACTORY_UPSTREAM_CLIENT_TYPE: "sdk" /* SDK */,
|
|
3611
|
-
FACTORY_UPSTREAM_SDK:
|
|
4066
|
+
FACTORY_UPSTREAM_SDK: _chunkKAAWCHO4js.SDK_IDENTITY,
|
|
4067
|
+
// This helper owns the original SDK process, unlike the generic
|
|
4068
|
+
// ProcessTransport also used by daemon workers.
|
|
4069
|
+
FACTORY_EXEC_ORIGINAL_INVOCATION: "1"
|
|
3612
4070
|
},
|
|
3613
4071
|
observability: options.observability
|
|
3614
4072
|
});
|
|
@@ -3616,13 +4074,26 @@ async function createTransport(options) {
|
|
|
3616
4074
|
return processTransport;
|
|
3617
4075
|
}
|
|
3618
4076
|
function setupClientHandlers(client, options) {
|
|
4077
|
+
const sessionId = () => {
|
|
4078
|
+
const addressed = client.addressedSessionId;
|
|
4079
|
+
if (!addressed) {
|
|
4080
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)(
|
|
4081
|
+
"Received a prompt that no single session owns"
|
|
4082
|
+
);
|
|
4083
|
+
}
|
|
4084
|
+
return addressed;
|
|
4085
|
+
};
|
|
3619
4086
|
if (options.permissionHandler) {
|
|
3620
4087
|
const handler = options.permissionHandler;
|
|
3621
|
-
client.setPermissionHandler(
|
|
4088
|
+
client.setPermissionHandler(
|
|
4089
|
+
(event) => handler({ ...event.params, sessionId: sessionId() })
|
|
4090
|
+
);
|
|
3622
4091
|
}
|
|
3623
4092
|
if (options.askUserHandler) {
|
|
3624
4093
|
const handler = options.askUserHandler;
|
|
3625
|
-
client.setAskUserHandler(
|
|
4094
|
+
client.setAskUserHandler(
|
|
4095
|
+
(event) => handler({ ...event.params, sessionId: sessionId() })
|
|
4096
|
+
);
|
|
3626
4097
|
}
|
|
3627
4098
|
}
|
|
3628
4099
|
async function createConfiguredClient(options) {
|
|
@@ -3630,7 +4101,7 @@ async function createConfiguredClient(options) {
|
|
|
3630
4101
|
const client = new DroidClient({
|
|
3631
4102
|
transport,
|
|
3632
4103
|
observability: options.observability,
|
|
3633
|
-
getRequestAttribution: () =>
|
|
4104
|
+
getRequestAttribution: () => _chunkKAAWCHO4js.SDK_REQUEST_ATTRIBUTION
|
|
3634
4105
|
});
|
|
3635
4106
|
setupClientHandlers(client, options);
|
|
3636
4107
|
return { transport, client };
|
|
@@ -3683,7 +4154,7 @@ function buildInitParams(options) {
|
|
|
3683
4154
|
...options.disableBuiltinSkills !== void 0 && {
|
|
3684
4155
|
disableBuiltinSkills: options.disableBuiltinSkills
|
|
3685
4156
|
},
|
|
3686
|
-
tags:
|
|
4157
|
+
tags: _chunkKAAWCHO4js.withSdkTag.call(void 0, options.tags)
|
|
3687
4158
|
};
|
|
3688
4159
|
}
|
|
3689
4160
|
|
|
@@ -3696,7 +4167,7 @@ var _streamableHttpjs = require('@modelcontextprotocol/sdk/server/streamableHttp
|
|
|
3696
4167
|
|
|
3697
4168
|
function tool(name, description, inputSchemaOrHandler, handlerOrOptions, maybeOptions) {
|
|
3698
4169
|
const options = typeof handlerOrOptions === "function" ? maybeOptions : handlerOrOptions;
|
|
3699
|
-
const annotationFields = _optionalChain([options, 'optionalAccess',
|
|
4170
|
+
const annotationFields = _optionalChain([options, 'optionalAccess', _96 => _96.annotations]) && {
|
|
3700
4171
|
annotations: options.annotations
|
|
3701
4172
|
};
|
|
3702
4173
|
if (typeof inputSchemaOrHandler === "function") {
|
|
@@ -3752,7 +4223,7 @@ function writeJsonError(res, statusCode, message, headers = {}) {
|
|
|
3752
4223
|
});
|
|
3753
4224
|
res.end(
|
|
3754
4225
|
JSON.stringify({
|
|
3755
|
-
jsonrpc:
|
|
4226
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION,
|
|
3756
4227
|
error: { code: -32603 /* INTERNAL_ERROR */, message },
|
|
3757
4228
|
id: null
|
|
3758
4229
|
})
|
|
@@ -3774,10 +4245,10 @@ var SdkMcpServer = (_class4 = class {
|
|
|
3774
4245
|
|
|
3775
4246
|
|
|
3776
4247
|
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
constructor(options) {;_class4.prototype.
|
|
4248
|
+
__init27() {this._httpServer = null}
|
|
4249
|
+
__init28() {this._url = null}
|
|
4250
|
+
__init29() {this._token = null}
|
|
4251
|
+
constructor(options) {;_class4.prototype.__init27.call(this);_class4.prototype.__init28.call(this);_class4.prototype.__init29.call(this);
|
|
3781
4252
|
this.name = options.name;
|
|
3782
4253
|
this.version = _nullishCoalesce(options.version, () => ( "1.0.0"));
|
|
3783
4254
|
this.tools = options.tools;
|
|
@@ -3828,7 +4299,7 @@ var SdkMcpServer = (_class4 = class {
|
|
|
3828
4299
|
if (!server) {
|
|
3829
4300
|
return;
|
|
3830
4301
|
}
|
|
3831
|
-
_optionalChain([server, 'access',
|
|
4302
|
+
_optionalChain([server, 'access', _97 => _97.closeAllConnections, 'optionalCall', _98 => _98()]);
|
|
3832
4303
|
server.close();
|
|
3833
4304
|
await _events.once.call(void 0, server, "close");
|
|
3834
4305
|
}
|
|
@@ -3922,16 +4393,333 @@ async function startSdkMcpServers(servers) {
|
|
|
3922
4393
|
};
|
|
3923
4394
|
}
|
|
3924
4395
|
|
|
4396
|
+
// src/session-operations.ts
|
|
4397
|
+
function response(result) {
|
|
4398
|
+
return {
|
|
4399
|
+
type: "response",
|
|
4400
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
4401
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
4402
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
4403
|
+
id: "sdk-adapter",
|
|
4404
|
+
result
|
|
4405
|
+
};
|
|
4406
|
+
}
|
|
4407
|
+
function createDaemonSessionOperations(controller, initialSessionId, handlers) {
|
|
4408
|
+
let sessionId = initialSessionId;
|
|
4409
|
+
const ownedSessionIds = /* @__PURE__ */ new Set([initialSessionId]);
|
|
4410
|
+
const reportError = (error) => controller.emit("error", _chunkKAAWCHO4js.toError.call(void 0, error));
|
|
4411
|
+
const permission = async (request) => {
|
|
4412
|
+
if (request.sessionId !== sessionId && !request.associatedSessionIds.includes(sessionId))
|
|
4413
|
+
return;
|
|
4414
|
+
const selected = await _asyncNullishCoalesce(await _chunkKAAWCHO4js.resolvePermissionHandler.call(void 0,
|
|
4415
|
+
handlers.permissionHandler,
|
|
4416
|
+
request,
|
|
4417
|
+
reportError
|
|
4418
|
+
), async () => ( {
|
|
4419
|
+
selectedOption: "cancel" /* Cancel */
|
|
4420
|
+
}));
|
|
4421
|
+
try {
|
|
4422
|
+
await controller.respondToPermission({
|
|
4423
|
+
permissionId: request.requestId,
|
|
4424
|
+
sessionId,
|
|
4425
|
+
...selected
|
|
4426
|
+
});
|
|
4427
|
+
} catch (error) {
|
|
4428
|
+
reportError(error);
|
|
4429
|
+
}
|
|
4430
|
+
};
|
|
4431
|
+
const askUser = async (request) => {
|
|
4432
|
+
if (request.sessionId !== sessionId) return;
|
|
4433
|
+
const result = await _chunkKAAWCHO4js.resolveAskUserHandler.call(void 0,
|
|
4434
|
+
handlers.askUserHandler,
|
|
4435
|
+
request,
|
|
4436
|
+
reportError
|
|
4437
|
+
);
|
|
4438
|
+
if (!result && request.blocking === false) return;
|
|
4439
|
+
try {
|
|
4440
|
+
await controller.respondToAskUser({
|
|
4441
|
+
requestId: request.requestId,
|
|
4442
|
+
sessionId,
|
|
4443
|
+
result: _nullishCoalesce(result, () => ( { cancelled: true, answers: [] }))
|
|
4444
|
+
});
|
|
4445
|
+
} catch (error) {
|
|
4446
|
+
reportError(error);
|
|
4447
|
+
}
|
|
4448
|
+
};
|
|
4449
|
+
controller.on("permissionRequested" /* PermissionRequested */, permission);
|
|
4450
|
+
controller.on("askUserRequested" /* AskUserRequested */, askUser);
|
|
4451
|
+
const operations = {
|
|
4452
|
+
lifecycle: {
|
|
4453
|
+
shutdown: async () => {
|
|
4454
|
+
try {
|
|
4455
|
+
const results = await Promise.allSettled(
|
|
4456
|
+
[...ownedSessionIds].map((id) => controller.closeSession(id))
|
|
4457
|
+
);
|
|
4458
|
+
const failure = results.find(
|
|
4459
|
+
(result) => result.status === "rejected"
|
|
4460
|
+
);
|
|
4461
|
+
if (_optionalChain([failure, 'optionalAccess', _99 => _99.status]) === "rejected") throw _chunkKAAWCHO4js.toError.call(void 0, failure.reason);
|
|
4462
|
+
} finally {
|
|
4463
|
+
await operations.close();
|
|
4464
|
+
}
|
|
4465
|
+
},
|
|
4466
|
+
abort: (close) => {
|
|
4467
|
+
void close().catch(() => {
|
|
4468
|
+
});
|
|
4469
|
+
}
|
|
4470
|
+
},
|
|
4471
|
+
onNotification(callback, filter) {
|
|
4472
|
+
const listener = (event) => {
|
|
4473
|
+
if (event.sessionId !== sessionId || _optionalChain([filter, 'optionalAccess', _100 => _100.type]) !== void 0 && filter.type !== event.notification.type)
|
|
4474
|
+
return;
|
|
4475
|
+
try {
|
|
4476
|
+
callback({
|
|
4477
|
+
type: "notification",
|
|
4478
|
+
jsonrpc: _chunkKAAWCHO4js.JSONRPC_VERSION2,
|
|
4479
|
+
factoryApiVersion: _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION2,
|
|
4480
|
+
factoryProtocolVersion: _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION,
|
|
4481
|
+
method: "droid.session_notification" /* SESSION_NOTIFICATION */,
|
|
4482
|
+
params: { notification: event.notification }
|
|
4483
|
+
});
|
|
4484
|
+
} catch (e7) {
|
|
4485
|
+
}
|
|
4486
|
+
};
|
|
4487
|
+
controller.on("sessionNotification" /* SessionNotification */, listener);
|
|
4488
|
+
return () => controller.off("sessionNotification" /* SessionNotification */, listener);
|
|
4489
|
+
},
|
|
4490
|
+
onError(callback) {
|
|
4491
|
+
const disconnected = (code, reason) => callback(new (0, _chunkKAAWCHO4js.ConnectionClosedError)(code, reason));
|
|
4492
|
+
const exited = (event) => {
|
|
4493
|
+
if (event.sessionId === sessionId && event.notification.type === "session_process_exited" /* SESSION_PROCESS_EXITED */)
|
|
4494
|
+
callback(
|
|
4495
|
+
new (0, _chunkKAAWCHO4js.DroidConnectionEndedError)("Remote session process exited.")
|
|
4496
|
+
);
|
|
4497
|
+
};
|
|
4498
|
+
controller.on("error", callback);
|
|
4499
|
+
controller.on("disconnected" /* Disconnected */, disconnected);
|
|
4500
|
+
controller.on("sessionNotification" /* SessionNotification */, exited);
|
|
4501
|
+
return () => {
|
|
4502
|
+
controller.off("error", callback);
|
|
4503
|
+
controller.off("disconnected" /* Disconnected */, disconnected);
|
|
4504
|
+
controller.off("sessionNotification" /* SessionNotification */, exited);
|
|
4505
|
+
};
|
|
4506
|
+
},
|
|
4507
|
+
addUserMessage: async (params) => response(await controller.addUserMessage(sessionId, params)),
|
|
4508
|
+
interruptSession: async () => response(await controller.interruptSession(sessionId)),
|
|
4509
|
+
closeSession: async () => {
|
|
4510
|
+
await controller.closeSession(sessionId);
|
|
4511
|
+
return response({});
|
|
4512
|
+
},
|
|
4513
|
+
close: async () => {
|
|
4514
|
+
controller.off("permissionRequested" /* PermissionRequested */, permission);
|
|
4515
|
+
controller.off("askUserRequested" /* AskUserRequested */, askUser);
|
|
4516
|
+
controller.destroy();
|
|
4517
|
+
controller.getSessionStateManager().clear();
|
|
4518
|
+
},
|
|
4519
|
+
loadSession: async (params) => {
|
|
4520
|
+
ownedSessionIds.add(params.sessionId);
|
|
4521
|
+
const result = await controller.loadSession({
|
|
4522
|
+
...params,
|
|
4523
|
+
sessionOriginHint: params.sessionOriginHint,
|
|
4524
|
+
sessionSource: params.sessionSource
|
|
4525
|
+
});
|
|
4526
|
+
sessionId = params.sessionId;
|
|
4527
|
+
return response(result);
|
|
4528
|
+
},
|
|
4529
|
+
updateSessionSettings: async (params) => response(await controller.updateSessionSettings(sessionId, params)),
|
|
4530
|
+
addMcpServer: async (params) => response(await controller.addMcpServer({ ...params, sessionId })),
|
|
4531
|
+
removeMcpServer: async (params) => response(await controller.removeMcpServer({ ...params, sessionId })),
|
|
4532
|
+
toggleMcpServer: async (params) => response(await controller.toggleMcpServer({ ...params, sessionId })),
|
|
4533
|
+
listMcpServers: async () => response(await controller.listMcpServers(sessionId)),
|
|
4534
|
+
listMcpTools: async () => response(await controller.listMcpTools(sessionId)),
|
|
4535
|
+
refreshConnectorToolCatalog: async () => response(await controller.refreshConnectorToolCatalog()),
|
|
4536
|
+
authenticateMcpServer: async (params) => response(
|
|
4537
|
+
await controller.authenticateMcpServer({ ...params, sessionId })
|
|
4538
|
+
),
|
|
4539
|
+
listSkills: async (params) => response(await controller.listSkills(sessionId, params)),
|
|
4540
|
+
setSkillDisabled: async (skillName, disabled, settingsLevel) => response(
|
|
4541
|
+
await controller.setSkillDisabled({
|
|
4542
|
+
sessionId,
|
|
4543
|
+
skillName,
|
|
4544
|
+
disabled,
|
|
4545
|
+
settingsLevel
|
|
4546
|
+
})
|
|
4547
|
+
),
|
|
4548
|
+
getRewindInfo: async (params) => response(await controller.getRewindInfo(sessionId, params.messageId)),
|
|
4549
|
+
executeRewind: async (params) => response(await controller.executeRewind(sessionId, params)),
|
|
4550
|
+
compactSession: async (params) => response(
|
|
4551
|
+
await controller.compactSession(
|
|
4552
|
+
sessionId,
|
|
4553
|
+
params.customInstructions,
|
|
4554
|
+
params.mode
|
|
4555
|
+
)
|
|
4556
|
+
),
|
|
4557
|
+
forkSession: async (params) => response(await controller.forkSession(sessionId, params)),
|
|
4558
|
+
renameSession: async (params) => response(await controller.renameSession(sessionId, params.title)),
|
|
4559
|
+
listTools: async () => {
|
|
4560
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)(
|
|
4561
|
+
"listTools is not supported by remote sessions."
|
|
4562
|
+
);
|
|
4563
|
+
},
|
|
4564
|
+
getContextStats: async () => {
|
|
4565
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)(
|
|
4566
|
+
"getContextStats is not supported by remote sessions."
|
|
4567
|
+
);
|
|
4568
|
+
}
|
|
4569
|
+
};
|
|
4570
|
+
return operations;
|
|
4571
|
+
}
|
|
4572
|
+
|
|
4573
|
+
// src/environment-session.ts
|
|
4574
|
+
async function createEnvironmentSession(options, createHandle) {
|
|
4575
|
+
if (!options.environment)
|
|
4576
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)("An environment is required.");
|
|
4577
|
+
for (const key of [
|
|
4578
|
+
"execPath",
|
|
4579
|
+
"execArgs",
|
|
4580
|
+
"env",
|
|
4581
|
+
"transport",
|
|
4582
|
+
"machineId"
|
|
4583
|
+
]) {
|
|
4584
|
+
if (options[key] !== void 0)
|
|
4585
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)(
|
|
4586
|
+
`Option "${key}" is local-only and cannot be used with an environment.`
|
|
4587
|
+
);
|
|
4588
|
+
}
|
|
4589
|
+
const mcpServers = _optionalChain([options, 'access', _101 => _101.mcpServers, 'optionalAccess', _102 => _102.map, 'call', _103 => _103((server) => {
|
|
4590
|
+
if (server instanceof SdkMcpServer)
|
|
4591
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)(
|
|
4592
|
+
"In-process MCP servers cannot be used with an environment."
|
|
4593
|
+
);
|
|
4594
|
+
return server;
|
|
4595
|
+
})]);
|
|
4596
|
+
const apiKey = resolveApiKey(options.apiKey);
|
|
4597
|
+
const auth = { apiKey, baseUrl: options.baseUrl };
|
|
4598
|
+
const request = _chunkKAAWCHO4js.createApiRequest.call(void 0, auth);
|
|
4599
|
+
const api = _chunkKAAWCHO4js.createFactoryApi.call(void 0, request);
|
|
4600
|
+
const sessionId = _uuid.v4.call(void 0, );
|
|
4601
|
+
let startup;
|
|
4602
|
+
try {
|
|
4603
|
+
const launched = await launchEnvironmentSession({
|
|
4604
|
+
environment: options.environment,
|
|
4605
|
+
signal: options.abortSignal,
|
|
4606
|
+
request,
|
|
4607
|
+
connect: async ({ computer, signal }) => {
|
|
4608
|
+
if (!computer.relayClientUrl)
|
|
4609
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)("Computer has no relay URL.");
|
|
4610
|
+
const connectionConfig = {
|
|
4611
|
+
..._chunkKAAWCHO4js.DEFAULT_CONNECTION_CONFIG,
|
|
4612
|
+
..._chunkKAAWCHO4js.MACHINE_TYPE_CONFIG["computer" /* Computer */]
|
|
4613
|
+
};
|
|
4614
|
+
const connected = new (0, _chunkKAAWCHO4js.DaemonSessionController)({
|
|
4615
|
+
sessionStateManager: new (0, _chunkKAAWCHO4js.MultiSessionStateManager)(),
|
|
4616
|
+
config: {
|
|
4617
|
+
machineId: computer.id,
|
|
4618
|
+
machineType: "computer" /* Computer */,
|
|
4619
|
+
providerType: computer.providerType,
|
|
4620
|
+
isManaged: true,
|
|
4621
|
+
ensureRunning: async () => ({ wasRestarted: false }),
|
|
4622
|
+
trustedIdentity: _chunkKAAWCHO4js.trustedIdentityFromComputerResponse.call(void 0,
|
|
4623
|
+
computer,
|
|
4624
|
+
async () => {
|
|
4625
|
+
const fresh = _chunkKAAWCHO4js.parseResponse.call(void 0,
|
|
4626
|
+
await api.getComputer({
|
|
4627
|
+
computerId: computer.id,
|
|
4628
|
+
signal: AbortSignal.timeout(5e3)
|
|
4629
|
+
}),
|
|
4630
|
+
_chunkKAAWCHO4js.ComputerReadSchema
|
|
4631
|
+
);
|
|
4632
|
+
if (fresh.id !== computer.id)
|
|
4633
|
+
throw new (0, _chunkKAAWCHO4js.DroidClientError)(
|
|
4634
|
+
"Identity refresh returned a different Computer."
|
|
4635
|
+
);
|
|
4636
|
+
return fresh;
|
|
4637
|
+
}
|
|
4638
|
+
),
|
|
4639
|
+
url: computer.relayClientUrl,
|
|
4640
|
+
clientType: "sdk" /* SDK */,
|
|
4641
|
+
sdk: _chunkKAAWCHO4js.SDK_CLIENT_METADATA,
|
|
4642
|
+
getCredential: async () => ({ apiKey }),
|
|
4643
|
+
connectionTimeoutMs: connectionConfig.connectionTimeoutMs,
|
|
4644
|
+
requestTimeout: connectionConfig.requestTimeoutMs,
|
|
4645
|
+
maxPollAttempts: connectionConfig.maxPollAttempts,
|
|
4646
|
+
maxReconnectAttempts: connectionConfig.maxReconnectAttempts,
|
|
4647
|
+
reconnectInterval: connectionConfig.reconnectInitialDelayMs,
|
|
4648
|
+
maxReconnectDelay: connectionConfig.reconnectMaxDelayMs,
|
|
4649
|
+
reconnectBackoffFactor: connectionConfig.reconnectBackoffFactor,
|
|
4650
|
+
supportsTerminalRestoreOnLoad: false
|
|
4651
|
+
}
|
|
4652
|
+
});
|
|
4653
|
+
const operations = createDaemonSessionOperations(
|
|
4654
|
+
connected,
|
|
4655
|
+
sessionId,
|
|
4656
|
+
options
|
|
4657
|
+
);
|
|
4658
|
+
const cancel = () => connected.destroy();
|
|
4659
|
+
signal.addEventListener("abort", cancel, { once: true });
|
|
4660
|
+
startup = {
|
|
4661
|
+
operations,
|
|
4662
|
+
releaseAbort: () => signal.removeEventListener("abort", cancel)
|
|
4663
|
+
};
|
|
4664
|
+
await connected.attemptInitialConnection();
|
|
4665
|
+
signal.throwIfAborted();
|
|
4666
|
+
return { controller: connected, operations };
|
|
4667
|
+
},
|
|
4668
|
+
startSession: async ({ connection, computer, signal }) => {
|
|
4669
|
+
const { controller, operations } = connection;
|
|
4670
|
+
const initParams = buildInitParams({
|
|
4671
|
+
...options,
|
|
4672
|
+
machineId: computer.id,
|
|
4673
|
+
cwd: _nullishCoalesce(_nullishCoalesce(options.cwd, () => ( _optionalChain([computer, 'access', _104 => _104.clonedRepoDirectories, 'optionalAccess', _105 => _105[0]]))), () => ( "~")),
|
|
4674
|
+
mcpServers
|
|
4675
|
+
});
|
|
4676
|
+
controller.getSessionStateManager().markSessionLoading(sessionId, computer.id);
|
|
4677
|
+
const result = await controller.initializeSession({
|
|
4678
|
+
...initParams,
|
|
4679
|
+
sessionId,
|
|
4680
|
+
token: apiKey,
|
|
4681
|
+
sessionSource: initParams.sessionSource,
|
|
4682
|
+
sessionOriginHint: initParams.sessionOriginHint
|
|
4683
|
+
});
|
|
4684
|
+
signal.throwIfAborted();
|
|
4685
|
+
return createHandle({
|
|
4686
|
+
result,
|
|
4687
|
+
operations,
|
|
4688
|
+
computerId: computer.id,
|
|
4689
|
+
cwd: initParams.cwd,
|
|
4690
|
+
mcpServers
|
|
4691
|
+
});
|
|
4692
|
+
}
|
|
4693
|
+
});
|
|
4694
|
+
return launched.session;
|
|
4695
|
+
} catch (error) {
|
|
4696
|
+
await _optionalChain([startup, 'optionalAccess', _106 => _106.operations, 'access', _107 => _107.close, 'call', _108 => _108()]);
|
|
4697
|
+
throw error;
|
|
4698
|
+
} finally {
|
|
4699
|
+
_optionalChain([startup, 'optionalAccess', _109 => _109.releaseAbort, 'call', _110 => _110()]);
|
|
4700
|
+
}
|
|
4701
|
+
}
|
|
4702
|
+
|
|
3925
4703
|
// src/session.ts
|
|
3926
4704
|
var DroidSession = (_class5 = class _DroidSession {
|
|
3927
4705
|
/** @internal */
|
|
3928
|
-
constructor(client, sessionId, metadata, _runtime, cleanupCallbacks = []) {;_class5.prototype.
|
|
4706
|
+
constructor(client, sessionId, metadata, _runtime, cleanupCallbacks = []) {;_class5.prototype.__init30.call(this);_class5.prototype.__init31.call(this);_class5.prototype.__init32.call(this);_class5.prototype.__init33.call(this);_class5.prototype.__init34.call(this);_class5.prototype.__init35.call(this);
|
|
3929
4707
|
this._runtime = _runtime;
|
|
3930
4708
|
this._client = client;
|
|
3931
4709
|
this._sessionId = sessionId;
|
|
3932
4710
|
this._settings = metadata.settings;
|
|
3933
4711
|
this._cwd = metadata.cwd;
|
|
3934
4712
|
this._cleanupCallbacks = cleanupCallbacks;
|
|
4713
|
+
this._lifecycle = _nullishCoalesce(_runtime.lifecycle, () => ( {
|
|
4714
|
+
shutdown: async () => {
|
|
4715
|
+
await client.closeSession({ reason: "other" }).catch(() => {
|
|
4716
|
+
});
|
|
4717
|
+
await client.close();
|
|
4718
|
+
},
|
|
4719
|
+
abort: (close) => {
|
|
4720
|
+
void close();
|
|
4721
|
+
}
|
|
4722
|
+
}));
|
|
3935
4723
|
this._bindMetadataNotifications();
|
|
3936
4724
|
this._bindAbortSignal();
|
|
3937
4725
|
}
|
|
@@ -3940,16 +4728,20 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3940
4728
|
|
|
3941
4729
|
|
|
3942
4730
|
|
|
3943
|
-
__init27() {this._settingsRevision = 0}
|
|
3944
|
-
__init28() {this._status = "active"}
|
|
3945
4731
|
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
__init32() {this.
|
|
4732
|
+
__init30() {this._settingsRevision = 0}
|
|
4733
|
+
__init31() {this._status = "active"}
|
|
4734
|
+
|
|
4735
|
+
__init32() {this._cleanupAbortSignal = null}
|
|
4736
|
+
__init33() {this._cleanupCallbacks = []}
|
|
4737
|
+
__init34() {this._activeBridges = /* @__PURE__ */ new Set()}
|
|
4738
|
+
__init35() {this._notificationCleanups = /* @__PURE__ */ new Set()}
|
|
3950
4739
|
get id() {
|
|
3951
4740
|
return this._sessionId;
|
|
3952
4741
|
}
|
|
4742
|
+
get computerId() {
|
|
4743
|
+
return this._runtime.computerId;
|
|
4744
|
+
}
|
|
3953
4745
|
get settings() {
|
|
3954
4746
|
return this._settings;
|
|
3955
4747
|
}
|
|
@@ -3958,10 +4750,10 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3958
4750
|
}
|
|
3959
4751
|
async *stream(prompt, options) {
|
|
3960
4752
|
this._ensureNotClosed();
|
|
3961
|
-
yield*
|
|
4753
|
+
yield* _chunkKAAWCHO4js.streamFromClient.call(void 0,
|
|
3962
4754
|
{
|
|
3963
4755
|
onNotification: (handler) => this._client.onNotification((notification) => {
|
|
3964
|
-
const inner =
|
|
4756
|
+
const inner = _chunkKAAWCHO4js.extractInnerNotification.call(void 0, notification);
|
|
3965
4757
|
if (inner) handler(inner);
|
|
3966
4758
|
}),
|
|
3967
4759
|
onError: (handler) => this._client.onError(handler),
|
|
@@ -3987,16 +4779,14 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3987
4779
|
}
|
|
3988
4780
|
this._status = "closed";
|
|
3989
4781
|
this._releaseHandleSubscriptions();
|
|
3990
|
-
_optionalChain([this, 'access',
|
|
4782
|
+
_optionalChain([this, 'access', _111 => _111._cleanupAbortSignal, 'optionalCall', _112 => _112()]);
|
|
3991
4783
|
this._cleanupAbortSignal = null;
|
|
3992
4784
|
for (const bridge of this._activeBridges) {
|
|
3993
4785
|
bridge.signalDone();
|
|
3994
4786
|
bridge.release();
|
|
3995
4787
|
}
|
|
3996
4788
|
try {
|
|
3997
|
-
await this.
|
|
3998
|
-
});
|
|
3999
|
-
await this._client.close();
|
|
4789
|
+
await this._lifecycle.shutdown();
|
|
4000
4790
|
} finally {
|
|
4001
4791
|
const cleanups = this._cleanupCallbacks.splice(0);
|
|
4002
4792
|
await Promise.all(cleanups.map((cleanup) => cleanup()));
|
|
@@ -4005,14 +4795,14 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
4005
4795
|
async updateSettings(params) {
|
|
4006
4796
|
this._ensureNotClosed();
|
|
4007
4797
|
const revision = this._settingsRevision;
|
|
4008
|
-
const result =
|
|
4798
|
+
const result = _chunkKAAWCHO4js.unwrapResponseResult.call(void 0,
|
|
4009
4799
|
await this._client.updateSessionSettings(params)
|
|
4010
4800
|
);
|
|
4011
4801
|
if (params.disabledToolIds !== void 0) {
|
|
4012
4802
|
this._runtime.loadParams.disabledToolIds = params.disabledToolIds;
|
|
4013
4803
|
}
|
|
4014
4804
|
if (this._settingsRevision === revision) {
|
|
4015
|
-
this._settings =
|
|
4805
|
+
this._settings = _chunkKAAWCHO4js.mergeSessionSettings.call(void 0, this._settings, params);
|
|
4016
4806
|
}
|
|
4017
4807
|
return result;
|
|
4018
4808
|
}
|
|
@@ -4029,32 +4819,32 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
4029
4819
|
}
|
|
4030
4820
|
async addMcpServer(params) {
|
|
4031
4821
|
this._ensureNotClosed();
|
|
4032
|
-
return
|
|
4822
|
+
return _chunkKAAWCHO4js.unwrapResponseResult.call(void 0, await this._client.addMcpServer(params));
|
|
4033
4823
|
}
|
|
4034
4824
|
async removeMcpServer(params) {
|
|
4035
4825
|
this._ensureNotClosed();
|
|
4036
|
-
return
|
|
4826
|
+
return _chunkKAAWCHO4js.unwrapResponseResult.call(void 0, await this._client.removeMcpServer(params));
|
|
4037
4827
|
}
|
|
4038
4828
|
async toggleMcpServer(params) {
|
|
4039
4829
|
this._ensureNotClosed();
|
|
4040
|
-
return
|
|
4830
|
+
return _chunkKAAWCHO4js.unwrapResponseResult.call(void 0, await this._client.toggleMcpServer(params));
|
|
4041
4831
|
}
|
|
4042
4832
|
async listMcpServers() {
|
|
4043
4833
|
this._ensureNotClosed();
|
|
4044
|
-
return
|
|
4834
|
+
return _chunkKAAWCHO4js.unwrapResponseResult.call(void 0, await this._client.listMcpServers());
|
|
4045
4835
|
}
|
|
4046
4836
|
async listMcpTools() {
|
|
4047
4837
|
this._ensureNotClosed();
|
|
4048
|
-
return
|
|
4838
|
+
return _chunkKAAWCHO4js.unwrapResponseResult.call(void 0, await this._client.listMcpTools()).tools;
|
|
4049
4839
|
}
|
|
4050
4840
|
/** Refresh connector discovery. MCP configuration has its own lifecycle. */
|
|
4051
4841
|
async refreshConnectorToolCatalog() {
|
|
4052
4842
|
this._ensureNotClosed();
|
|
4053
|
-
|
|
4843
|
+
_chunkKAAWCHO4js.unwrapResponseResult.call(void 0, await this._client.refreshConnectorToolCatalog());
|
|
4054
4844
|
}
|
|
4055
4845
|
async listTools(params = {}) {
|
|
4056
4846
|
this._ensureNotClosed();
|
|
4057
|
-
return
|
|
4847
|
+
return _chunkKAAWCHO4js.unwrapResponseResult.call(void 0, await this._client.listTools(params)).tools.map(
|
|
4058
4848
|
({ id: _protocolId, llmId, currentlyAllowed, ...tool2 }) => ({
|
|
4059
4849
|
...tool2,
|
|
4060
4850
|
id: llmId,
|
|
@@ -4064,17 +4854,17 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
4064
4854
|
}
|
|
4065
4855
|
async authenticateMcpServer(params) {
|
|
4066
4856
|
this._ensureNotClosed();
|
|
4067
|
-
return
|
|
4857
|
+
return _chunkKAAWCHO4js.unwrapResponseResult.call(void 0,
|
|
4068
4858
|
await this._client.authenticateMcpServer(params)
|
|
4069
4859
|
);
|
|
4070
4860
|
}
|
|
4071
4861
|
async listSkills(params) {
|
|
4072
4862
|
this._ensureNotClosed();
|
|
4073
|
-
return
|
|
4863
|
+
return _chunkKAAWCHO4js.unwrapResponseResult.call(void 0, await this._client.listSkills(params));
|
|
4074
4864
|
}
|
|
4075
4865
|
async setSkillDisabled(params) {
|
|
4076
4866
|
this._ensureNotClosed();
|
|
4077
|
-
return
|
|
4867
|
+
return _chunkKAAWCHO4js.unwrapResponseResult.call(void 0,
|
|
4078
4868
|
await this._client.setSkillDisabled(
|
|
4079
4869
|
params.skillName,
|
|
4080
4870
|
params.disabled,
|
|
@@ -4084,41 +4874,41 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
4084
4874
|
}
|
|
4085
4875
|
async getRewindInfo(params) {
|
|
4086
4876
|
this._ensureNotClosed();
|
|
4087
|
-
return
|
|
4877
|
+
return _chunkKAAWCHO4js.unwrapResponseResult.call(void 0, await this._client.getRewindInfo(params));
|
|
4088
4878
|
}
|
|
4089
4879
|
async rewind(params) {
|
|
4090
4880
|
const { session, result } = await this._runReplacement(
|
|
4091
|
-
() => this._client.executeRewind(params).then(
|
|
4881
|
+
() => this._client.executeRewind(params).then(_chunkKAAWCHO4js.unwrapResponseResult)
|
|
4092
4882
|
);
|
|
4093
4883
|
const { newSessionId: _newSessionId, ...metadata } = result;
|
|
4094
4884
|
return { session, ...metadata };
|
|
4095
4885
|
}
|
|
4096
4886
|
async compact(params) {
|
|
4097
4887
|
const { session, result } = await this._runReplacement(
|
|
4098
|
-
() => this._client.compactSession(_nullishCoalesce(params, () => ( {}))).then(
|
|
4888
|
+
() => this._client.compactSession(_nullishCoalesce(params, () => ( {}))).then(_chunkKAAWCHO4js.unwrapResponseResult),
|
|
4099
4889
|
{ retainSourceWhenSameId: true }
|
|
4100
4890
|
);
|
|
4101
4891
|
return { session, removedCount: result.removedCount };
|
|
4102
4892
|
}
|
|
4103
4893
|
async handoff(params) {
|
|
4104
4894
|
const { session, result } = await this._runReplacement(
|
|
4105
|
-
() => this._client.compactSession({ ...params, mode: "handoff" }).then(
|
|
4895
|
+
() => this._client.compactSession({ ...params, mode: "handoff" }).then(_chunkKAAWCHO4js.unwrapResponseResult)
|
|
4106
4896
|
);
|
|
4107
4897
|
return { session, removedCount: result.removedCount };
|
|
4108
4898
|
}
|
|
4109
4899
|
async fork(params = {}) {
|
|
4110
4900
|
const { session } = await this._runReplacement(
|
|
4111
|
-
() => this._client.forkSession(params).then(
|
|
4901
|
+
() => this._client.forkSession(params).then(_chunkKAAWCHO4js.unwrapResponseResult)
|
|
4112
4902
|
);
|
|
4113
4903
|
return session;
|
|
4114
4904
|
}
|
|
4115
4905
|
async getContextStats() {
|
|
4116
4906
|
this._ensureNotClosed();
|
|
4117
|
-
return
|
|
4907
|
+
return _chunkKAAWCHO4js.unwrapResponseResult.call(void 0, await this._client.getContextStats());
|
|
4118
4908
|
}
|
|
4119
4909
|
async rename(params) {
|
|
4120
4910
|
this._ensureNotClosed();
|
|
4121
|
-
|
|
4911
|
+
_chunkKAAWCHO4js.unwrapResponseResult.call(void 0, await this._client.renameSession(params));
|
|
4122
4912
|
}
|
|
4123
4913
|
onNotification(callback, filter) {
|
|
4124
4914
|
this._ensureNotClosed();
|
|
@@ -4132,13 +4922,13 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
4132
4922
|
}
|
|
4133
4923
|
_ensureNotClosed() {
|
|
4134
4924
|
if (this._status === "replaced" && this._replacementSessionId) {
|
|
4135
|
-
throw new (0,
|
|
4925
|
+
throw new (0, _chunkKAAWCHO4js.SessionReplacedError)(
|
|
4136
4926
|
this._sessionId,
|
|
4137
4927
|
this._replacementSessionId
|
|
4138
4928
|
);
|
|
4139
4929
|
}
|
|
4140
4930
|
if (this._status !== "active") {
|
|
4141
|
-
throw new (0,
|
|
4931
|
+
throw new (0, _chunkKAAWCHO4js.ConnectionError)(
|
|
4142
4932
|
this._status === "replacing" ? "Session replacement is already in progress." : "Session has been closed. Create a new session to continue."
|
|
4143
4933
|
);
|
|
4144
4934
|
}
|
|
@@ -4146,7 +4936,7 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
4146
4936
|
_beginReplacement() {
|
|
4147
4937
|
this._ensureNotClosed();
|
|
4148
4938
|
if (this._activeBridges.size > 0) {
|
|
4149
|
-
throw new (0,
|
|
4939
|
+
throw new (0, _chunkKAAWCHO4js.ConcurrentStreamError)(this._sessionId);
|
|
4150
4940
|
}
|
|
4151
4941
|
this._status = "replacing";
|
|
4152
4942
|
}
|
|
@@ -4162,16 +4952,16 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
4162
4952
|
throw error;
|
|
4163
4953
|
}
|
|
4164
4954
|
if (this._status !== "replacing") {
|
|
4165
|
-
throw new (0,
|
|
4166
|
-
cause: new (0,
|
|
4955
|
+
throw new (0, _chunkKAAWCHO4js.SessionReplacementError)(this._sessionId, result.newSessionId, {
|
|
4956
|
+
cause: new (0, _chunkKAAWCHO4js.ConnectionError)(
|
|
4167
4957
|
"Session closed while replacement was in progress."
|
|
4168
4958
|
),
|
|
4169
|
-
rollbackError: new (0,
|
|
4959
|
+
rollbackError: new (0, _chunkKAAWCHO4js.ConnectionError)(
|
|
4170
4960
|
"The source session was already closed."
|
|
4171
4961
|
)
|
|
4172
4962
|
});
|
|
4173
4963
|
}
|
|
4174
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4964
|
+
if (_optionalChain([options, 'optionalAccess', _113 => _113.retainSourceWhenSameId]) && result.newSessionId === this._sessionId) {
|
|
4175
4965
|
this._status = "active";
|
|
4176
4966
|
return { session: this, result };
|
|
4177
4967
|
}
|
|
@@ -4182,18 +4972,18 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
4182
4972
|
}
|
|
4183
4973
|
async _loadReplacement(replacementSessionId) {
|
|
4184
4974
|
try {
|
|
4185
|
-
const loadResult =
|
|
4975
|
+
const loadResult = _chunkKAAWCHO4js.unwrapResponseResult.call(void 0,
|
|
4186
4976
|
await this._client.loadSession({
|
|
4187
4977
|
...this._runtime.loadParams,
|
|
4188
4978
|
sessionId: replacementSessionId
|
|
4189
4979
|
})
|
|
4190
4980
|
);
|
|
4191
4981
|
if (this._status !== "replacing") {
|
|
4192
|
-
throw new (0,
|
|
4982
|
+
throw new (0, _chunkKAAWCHO4js.ConnectionError)(
|
|
4193
4983
|
"Session closed while replacement was loading."
|
|
4194
4984
|
);
|
|
4195
4985
|
}
|
|
4196
|
-
_optionalChain([this, 'access',
|
|
4986
|
+
_optionalChain([this, 'access', _114 => _114._cleanupAbortSignal, 'optionalCall', _115 => _115()]);
|
|
4197
4987
|
this._cleanupAbortSignal = null;
|
|
4198
4988
|
this._releaseHandleSubscriptions();
|
|
4199
4989
|
const cleanupCallbacks = this._cleanupCallbacks;
|
|
@@ -4210,12 +5000,12 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
4210
5000
|
return replacement;
|
|
4211
5001
|
} catch (cause) {
|
|
4212
5002
|
if (this._status !== "replacing") {
|
|
4213
|
-
throw new (0,
|
|
5003
|
+
throw new (0, _chunkKAAWCHO4js.SessionReplacementError)(
|
|
4214
5004
|
this._sessionId,
|
|
4215
5005
|
replacementSessionId,
|
|
4216
5006
|
{
|
|
4217
5007
|
cause,
|
|
4218
|
-
rollbackError: new (0,
|
|
5008
|
+
rollbackError: new (0, _chunkKAAWCHO4js.ConnectionError)(
|
|
4219
5009
|
"The source session was closed before rollback."
|
|
4220
5010
|
)
|
|
4221
5011
|
}
|
|
@@ -4223,7 +5013,7 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
4223
5013
|
}
|
|
4224
5014
|
let rollbackResult;
|
|
4225
5015
|
try {
|
|
4226
|
-
rollbackResult =
|
|
5016
|
+
rollbackResult = _chunkKAAWCHO4js.unwrapResponseResult.call(void 0,
|
|
4227
5017
|
await this._client.loadSession({
|
|
4228
5018
|
...this._runtime.loadParams,
|
|
4229
5019
|
sessionId: this._sessionId
|
|
@@ -4231,18 +5021,18 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
4231
5021
|
);
|
|
4232
5022
|
} catch (rollbackError) {
|
|
4233
5023
|
await this._disposeAfterFailedRollback();
|
|
4234
|
-
throw new (0,
|
|
5024
|
+
throw new (0, _chunkKAAWCHO4js.SessionReplacementError)(
|
|
4235
5025
|
this._sessionId,
|
|
4236
5026
|
replacementSessionId,
|
|
4237
5027
|
{ cause, rollbackError }
|
|
4238
5028
|
);
|
|
4239
5029
|
}
|
|
4240
5030
|
if (this._status !== "replacing") {
|
|
4241
|
-
const rollbackError = new (0,
|
|
5031
|
+
const rollbackError = new (0, _chunkKAAWCHO4js.ConnectionError)(
|
|
4242
5032
|
"Session closed while replacement rollback was loading."
|
|
4243
5033
|
);
|
|
4244
5034
|
await this._disposeAfterFailedRollback();
|
|
4245
|
-
throw new (0,
|
|
5035
|
+
throw new (0, _chunkKAAWCHO4js.SessionReplacementError)(
|
|
4246
5036
|
this._sessionId,
|
|
4247
5037
|
replacementSessionId,
|
|
4248
5038
|
{ cause, rollbackError }
|
|
@@ -4251,24 +5041,24 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
4251
5041
|
this._settings = rollbackResult.settings;
|
|
4252
5042
|
this._cwd = rollbackResult.cwd;
|
|
4253
5043
|
this._status = "active";
|
|
4254
|
-
throw new (0,
|
|
5044
|
+
throw new (0, _chunkKAAWCHO4js.SessionReplacementError)(this._sessionId, replacementSessionId, {
|
|
4255
5045
|
cause
|
|
4256
5046
|
});
|
|
4257
5047
|
}
|
|
4258
5048
|
}
|
|
4259
5049
|
_bindAbortSignal() {
|
|
4260
|
-
this._cleanupAbortSignal =
|
|
5050
|
+
this._cleanupAbortSignal = _chunkKAAWCHO4js.wireAbortSignal.call(void 0,
|
|
4261
5051
|
this._runtime.abortSignal,
|
|
4262
|
-
() =>
|
|
5052
|
+
() => this._lifecycle.abort(() => this.close())
|
|
4263
5053
|
);
|
|
4264
5054
|
}
|
|
4265
5055
|
_bindMetadataNotifications() {
|
|
4266
5056
|
const unsubscribe = this._client.onNotification((notification) => {
|
|
4267
|
-
const inner =
|
|
4268
|
-
if (_optionalChain([inner, 'optionalAccess',
|
|
4269
|
-
this._settings =
|
|
5057
|
+
const inner = _chunkKAAWCHO4js.extractInnerNotification.call(void 0, notification);
|
|
5058
|
+
if (_optionalChain([inner, 'optionalAccess', _116 => _116.type]) === "settings_updated" /* SETTINGS_UPDATED */) {
|
|
5059
|
+
this._settings = _chunkKAAWCHO4js.mergeSessionSettings.call(void 0, this._settings, inner.settings);
|
|
4270
5060
|
this._settingsRevision++;
|
|
4271
|
-
} else if (_optionalChain([inner, 'optionalAccess',
|
|
5061
|
+
} else if (_optionalChain([inner, 'optionalAccess', _117 => _117.type]) === "session_working_directory_changed" /* SESSION_WORKING_DIRECTORY_CHANGED */) {
|
|
4272
5062
|
this._cwd = inner.cwd;
|
|
4273
5063
|
}
|
|
4274
5064
|
});
|
|
@@ -4283,7 +5073,7 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
4283
5073
|
}
|
|
4284
5074
|
async _disposeAfterFailedRollback() {
|
|
4285
5075
|
this._status = "closed";
|
|
4286
|
-
_optionalChain([this, 'access',
|
|
5076
|
+
_optionalChain([this, 'access', _118 => _118._cleanupAbortSignal, 'optionalCall', _119 => _119()]);
|
|
4287
5077
|
this._cleanupAbortSignal = null;
|
|
4288
5078
|
this._releaseHandleSubscriptions();
|
|
4289
5079
|
await closeQuietly(this._client);
|
|
@@ -4304,9 +5094,25 @@ function createReplacementLoadParams(options, mcpServers) {
|
|
|
4304
5094
|
};
|
|
4305
5095
|
}
|
|
4306
5096
|
async function createSession(options = {}) {
|
|
5097
|
+
if (options.environment) {
|
|
5098
|
+
return await createEnvironmentSession(
|
|
5099
|
+
options,
|
|
5100
|
+
({ result, operations, computerId, cwd, mcpServers }) => new DroidSession(
|
|
5101
|
+
operations,
|
|
5102
|
+
result.sessionId,
|
|
5103
|
+
{ settings: result.settings, cwd },
|
|
5104
|
+
{
|
|
5105
|
+
computerId,
|
|
5106
|
+
abortSignal: options.abortSignal,
|
|
5107
|
+
loadParams: createReplacementLoadParams(options, mcpServers),
|
|
5108
|
+
lifecycle: operations.lifecycle
|
|
5109
|
+
}
|
|
5110
|
+
)
|
|
5111
|
+
);
|
|
5112
|
+
}
|
|
4307
5113
|
const { client } = await createConfiguredClient(options);
|
|
4308
|
-
let cleanupInitAbortSignal = _optionalChain([options, 'access',
|
|
4309
|
-
} :
|
|
5114
|
+
let cleanupInitAbortSignal = _optionalChain([options, 'access', _120 => _120.abortSignal, 'optionalAccess', _121 => _121.aborted]) ? () => {
|
|
5115
|
+
} : _chunkKAAWCHO4js.wireAbortSignal.call(void 0, options.abortSignal, () => {
|
|
4310
5116
|
void closeQuietly(client);
|
|
4311
5117
|
});
|
|
4312
5118
|
let sdkMcpServers;
|
|
@@ -4316,7 +5122,7 @@ async function createSession(options = {}) {
|
|
|
4316
5122
|
...options,
|
|
4317
5123
|
mcpServers: sdkMcpServers.mcpServers
|
|
4318
5124
|
});
|
|
4319
|
-
const initResult =
|
|
5125
|
+
const initResult = _chunkKAAWCHO4js.unwrapResponseResult.call(void 0,
|
|
4320
5126
|
await client.initializeSession(initParams)
|
|
4321
5127
|
);
|
|
4322
5128
|
const session = new DroidSession(
|
|
@@ -4324,7 +5130,7 @@ async function createSession(options = {}) {
|
|
|
4324
5130
|
initResult.sessionId,
|
|
4325
5131
|
{
|
|
4326
5132
|
settings: initResult.settings,
|
|
4327
|
-
cwd: _nullishCoalesce(_optionalChain([initResult, 'access',
|
|
5133
|
+
cwd: _nullishCoalesce(_optionalChain([initResult, 'access', _122 => _122.worktree, 'optionalAccess', _123 => _123.path]), () => ( initParams.cwd))
|
|
4328
5134
|
},
|
|
4329
5135
|
{
|
|
4330
5136
|
abortSignal: options.abortSignal,
|
|
@@ -4341,15 +5147,15 @@ async function createSession(options = {}) {
|
|
|
4341
5147
|
return session;
|
|
4342
5148
|
} catch (error) {
|
|
4343
5149
|
cleanupInitAbortSignal();
|
|
4344
|
-
await _optionalChain([sdkMcpServers, 'optionalAccess',
|
|
5150
|
+
await _optionalChain([sdkMcpServers, 'optionalAccess', _124 => _124.cleanup, 'call', _125 => _125()]);
|
|
4345
5151
|
await closeQuietly(client);
|
|
4346
5152
|
throw error;
|
|
4347
5153
|
}
|
|
4348
5154
|
}
|
|
4349
5155
|
async function resumeSession(sessionId, options = {}) {
|
|
4350
5156
|
const { client } = await createConfiguredClient(options);
|
|
4351
|
-
let cleanupLoadAbortSignal = _optionalChain([options, 'access',
|
|
4352
|
-
} :
|
|
5157
|
+
let cleanupLoadAbortSignal = _optionalChain([options, 'access', _126 => _126.abortSignal, 'optionalAccess', _127 => _127.aborted]) ? () => {
|
|
5158
|
+
} : _chunkKAAWCHO4js.wireAbortSignal.call(void 0, options.abortSignal, () => {
|
|
4353
5159
|
void closeQuietly(client);
|
|
4354
5160
|
});
|
|
4355
5161
|
let sdkMcpServers;
|
|
@@ -4359,7 +5165,7 @@ async function resumeSession(sessionId, options = {}) {
|
|
|
4359
5165
|
options,
|
|
4360
5166
|
sdkMcpServers.mcpServers
|
|
4361
5167
|
);
|
|
4362
|
-
const loadResult =
|
|
5168
|
+
const loadResult = _chunkKAAWCHO4js.unwrapResponseResult.call(void 0,
|
|
4363
5169
|
await client.loadSession({ sessionId, ...replacementLoadParams })
|
|
4364
5170
|
);
|
|
4365
5171
|
const session = new DroidSession(
|
|
@@ -4378,7 +5184,7 @@ async function resumeSession(sessionId, options = {}) {
|
|
|
4378
5184
|
return session;
|
|
4379
5185
|
} catch (error) {
|
|
4380
5186
|
cleanupLoadAbortSignal();
|
|
4381
|
-
await _optionalChain([sdkMcpServers, 'optionalAccess',
|
|
5187
|
+
await _optionalChain([sdkMcpServers, 'optionalAccess', _128 => _128.cleanup, 'call', _129 => _129()]);
|
|
4382
5188
|
await closeQuietly(client);
|
|
4383
5189
|
throw error;
|
|
4384
5190
|
}
|
|
@@ -4392,13 +5198,15 @@ async function run(prompt, options = {}) {
|
|
|
4392
5198
|
...options,
|
|
4393
5199
|
includePartialMessages: false
|
|
4394
5200
|
})) {
|
|
4395
|
-
if (msg.type ===
|
|
4396
|
-
|
|
5201
|
+
if (msg.type === _chunkKAAWCHO4js.DroidMessageType.Result) {
|
|
5202
|
+
const computerId = session.computerId;
|
|
5203
|
+
return computerId === void 0 ? msg : { ...msg, computerId };
|
|
4397
5204
|
}
|
|
4398
5205
|
}
|
|
4399
5206
|
throw new Error("Stream completed without a result message");
|
|
4400
5207
|
} finally {
|
|
4401
|
-
await session.close()
|
|
5208
|
+
await session.close().catch(() => {
|
|
5209
|
+
});
|
|
4402
5210
|
}
|
|
4403
5211
|
}
|
|
4404
5212
|
|
|
@@ -4418,60 +5226,111 @@ var CR = 13;
|
|
|
4418
5226
|
var SPACE = 32;
|
|
4419
5227
|
var TAB = 9;
|
|
4420
5228
|
var PARSE_OVERSAMPLE = 20;
|
|
4421
|
-
function
|
|
5229
|
+
function readFileOrNull(filePath, read) {
|
|
4422
5230
|
try {
|
|
4423
|
-
|
|
4424
|
-
|
|
5231
|
+
const fd = fs3.openSync(filePath, "r");
|
|
5232
|
+
try {
|
|
5233
|
+
return read(fd);
|
|
5234
|
+
} finally {
|
|
5235
|
+
fs3.closeSync(fd);
|
|
5236
|
+
}
|
|
5237
|
+
} catch (e8) {
|
|
4425
5238
|
return null;
|
|
4426
5239
|
}
|
|
4427
5240
|
}
|
|
4428
5241
|
function parseJsonBuffer(buf) {
|
|
4429
5242
|
try {
|
|
4430
5243
|
return JSON.parse(buf.toString("utf-8"));
|
|
4431
|
-
} catch (
|
|
5244
|
+
} catch (e9) {
|
|
4432
5245
|
return null;
|
|
4433
5246
|
}
|
|
4434
5247
|
}
|
|
4435
|
-
|
|
5248
|
+
var SCAN_CHUNK_BYTES = 64 * 1024;
|
|
5249
|
+
var MAX_SCANNED_FILE_BYTES = 2 ** 31 - 1;
|
|
5250
|
+
function scratchChunk(scratch, size) {
|
|
5251
|
+
const want = Math.min(SCAN_CHUNK_BYTES, size === 0 ? 8192 : size);
|
|
5252
|
+
const current = scratch.chunk;
|
|
5253
|
+
if (current && current.length >= want) return current;
|
|
5254
|
+
const grown = Buffer.allocUnsafe(
|
|
5255
|
+
Math.min(SCAN_CHUNK_BYTES, Math.max(want, 2 * (_nullishCoalesce(_optionalChain([current, 'optionalAccess', _130 => _130.length]), () => ( 0)))))
|
|
5256
|
+
);
|
|
5257
|
+
scratch.chunk = grown;
|
|
5258
|
+
return grown;
|
|
5259
|
+
}
|
|
5260
|
+
function copyFirstLine(parts, chunk, end) {
|
|
5261
|
+
return Buffer.concat([...parts, chunk.subarray(0, end)]);
|
|
5262
|
+
}
|
|
5263
|
+
function scanSessionFile(fd, scratch) {
|
|
5264
|
+
const stats = fs3.fstatSync(fd);
|
|
5265
|
+
const size = stats.isFile() ? stats.size : 0;
|
|
5266
|
+
if (size > MAX_SCANNED_FILE_BYTES) return null;
|
|
5267
|
+
const chunk = scratchChunk(scratch, size);
|
|
4436
5268
|
let nonEmptyLineCount = 0;
|
|
4437
|
-
let
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
5269
|
+
let lineHasContent = false;
|
|
5270
|
+
const firstLineParts = [];
|
|
5271
|
+
let firstLine;
|
|
5272
|
+
let pos = 0;
|
|
5273
|
+
for (; ; ) {
|
|
5274
|
+
const length = size === 0 ? chunk.length : Math.min(chunk.length, size - pos);
|
|
5275
|
+
if (length === 0) break;
|
|
5276
|
+
const bytesRead = fs3.readSync(fd, chunk, 0, length, null);
|
|
5277
|
+
if (bytesRead === 0) break;
|
|
5278
|
+
pos += bytesRead;
|
|
5279
|
+
let i = 0;
|
|
5280
|
+
while (i < bytesRead) {
|
|
5281
|
+
let lf;
|
|
5282
|
+
if (lineHasContent) {
|
|
5283
|
+
lf = chunk.indexOf(LF, i);
|
|
5284
|
+
if (lf === -1 || lf >= bytesRead) break;
|
|
5285
|
+
nonEmptyLineCount++;
|
|
5286
|
+
lineHasContent = false;
|
|
5287
|
+
} else {
|
|
5288
|
+
const ch = chunk[i];
|
|
5289
|
+
if (ch === CR || ch === SPACE || ch === TAB) {
|
|
5290
|
+
i++;
|
|
5291
|
+
continue;
|
|
5292
|
+
}
|
|
5293
|
+
if (ch !== LF) {
|
|
5294
|
+
lineHasContent = true;
|
|
5295
|
+
continue;
|
|
5296
|
+
}
|
|
5297
|
+
lf = i;
|
|
5298
|
+
}
|
|
5299
|
+
firstLine ??= copyFirstLine(firstLineParts, chunk, lf);
|
|
5300
|
+
i = lf + 1;
|
|
5301
|
+
}
|
|
5302
|
+
if (firstLine === void 0) {
|
|
5303
|
+
firstLineParts.push(Buffer.from(chunk.subarray(0, bytesRead)));
|
|
5304
|
+
}
|
|
5305
|
+
}
|
|
5306
|
+
if (lineHasContent) nonEmptyLineCount++;
|
|
5307
|
+
const [onlyPart] = firstLineParts;
|
|
5308
|
+
firstLine ??= onlyPart !== void 0 && firstLineParts.length === 1 ? onlyPart : Buffer.concat(firstLineParts);
|
|
5309
|
+
return { firstLine, nonEmptyLineCount };
|
|
4455
5310
|
}
|
|
4456
5311
|
function loadFavorites(sessionsDir) {
|
|
4457
|
-
const buf =
|
|
5312
|
+
const buf = readFileOrNull(
|
|
5313
|
+
path2.join(sessionsDir, FAVORITES_FILE),
|
|
5314
|
+
(fd) => fs3.readFileSync(fd)
|
|
5315
|
+
);
|
|
4458
5316
|
if (!buf) return /* @__PURE__ */ new Set();
|
|
4459
5317
|
const parsed = parseJsonBuffer(buf);
|
|
4460
5318
|
if (!Array.isArray(parsed)) return /* @__PURE__ */ new Set();
|
|
4461
5319
|
return new Set(parsed.filter((id) => typeof id === "string"));
|
|
4462
5320
|
}
|
|
4463
5321
|
function loadSettingsFile(directory, sessionId) {
|
|
4464
|
-
const buf =
|
|
4465
|
-
path2.join(directory, `${sessionId}${SETTINGS_SUFFIX}`)
|
|
5322
|
+
const buf = readFileOrNull(
|
|
5323
|
+
path2.join(directory, `${sessionId}${SETTINGS_SUFFIX}`),
|
|
5324
|
+
(fd) => fs3.readFileSync(fd)
|
|
4466
5325
|
);
|
|
4467
5326
|
if (!buf) return null;
|
|
4468
5327
|
const parsed = parseJsonBuffer(buf);
|
|
4469
5328
|
if (parsed === null) return null;
|
|
4470
|
-
const result =
|
|
5329
|
+
const result = _chunkKAAWCHO4js.SessionSettingsFileSchema.safeParse(parsed);
|
|
4471
5330
|
return result.success ? result.data : null;
|
|
4472
5331
|
}
|
|
4473
5332
|
function getMissionMetadataFromTags(settings) {
|
|
4474
|
-
if (!_optionalChain([settings, 'optionalAccess',
|
|
5333
|
+
if (!_optionalChain([settings, 'optionalAccess', _131 => _131.tags])) return {};
|
|
4475
5334
|
const missionTag = settings.tags.find(
|
|
4476
5335
|
(tag) => tag.name.startsWith(MISSION_TAG_PREFIX)
|
|
4477
5336
|
);
|
|
@@ -4479,17 +5338,19 @@ function getMissionMetadataFromTags(settings) {
|
|
|
4479
5338
|
(tag) => tag.name === DECOMP_SESSION_TYPE_TAG
|
|
4480
5339
|
);
|
|
4481
5340
|
return {
|
|
4482
|
-
decompMissionId: _optionalChain([missionTag, 'optionalAccess',
|
|
4483
|
-
decompSessionType: _optionalChain([roleTag, 'optionalAccess',
|
|
5341
|
+
decompMissionId: _optionalChain([missionTag, 'optionalAccess', _132 => _132.metadata, 'optionalAccess', _133 => _133[MISSION_ID_METADATA_KEY]]),
|
|
5342
|
+
decompSessionType: _optionalChain([roleTag, 'optionalAccess', _134 => _134.metadata, 'optionalAccess', _135 => _135[DECOMP_SESSION_TYPE_METADATA_KEY]])
|
|
4484
5343
|
};
|
|
4485
5344
|
}
|
|
4486
5345
|
function parseSessionFile(candidate, ctx) {
|
|
4487
|
-
const
|
|
4488
|
-
|
|
4489
|
-
|
|
5346
|
+
const scanned = readFileOrNull(
|
|
5347
|
+
candidate.sessionPath,
|
|
5348
|
+
(fd) => scanSessionFile(fd, ctx.scratch)
|
|
5349
|
+
);
|
|
5350
|
+
if (!scanned) return null;
|
|
4490
5351
|
const firstParsed = parseJsonBuffer(scanned.firstLine);
|
|
4491
5352
|
if (firstParsed === null) return null;
|
|
4492
|
-
const firstResult =
|
|
5353
|
+
const firstResult = _chunkKAAWCHO4js.SessionStartEventSchema.safeParse(firstParsed);
|
|
4493
5354
|
if (!firstResult.success) return null;
|
|
4494
5355
|
const summary = firstResult.data;
|
|
4495
5356
|
if (ctx.requiredCwd !== void 0 && (summary.cwd === void 0 || path2.resolve(summary.cwd) !== ctx.requiredCwd)) {
|
|
@@ -4497,9 +5358,9 @@ function parseSessionFile(candidate, ctx) {
|
|
|
4497
5358
|
}
|
|
4498
5359
|
const settingsName = `${candidate.sessionId}${SETTINGS_SUFFIX}`;
|
|
4499
5360
|
const settings = candidate.siblingNames.has(settingsName) ? loadSettingsFile(candidate.directory, candidate.sessionId) : null;
|
|
4500
|
-
if (_optionalChain([settings, 'optionalAccess',
|
|
5361
|
+
if (_optionalChain([settings, 'optionalAccess', _136 => _136.archivedAt])) return null;
|
|
4501
5362
|
const tagMeta = getMissionMetadataFromTags(settings);
|
|
4502
|
-
const decompSessionType = _nullishCoalesce(summary.decompSessionType, () => (
|
|
5363
|
+
const decompSessionType = _nullishCoalesce(summary.decompSessionType, () => ( _chunkKAAWCHO4js.SessionStartDecompSessionTypeSchema.safeParse(tagMeta.decompSessionType).data));
|
|
4503
5364
|
const messageCount = Math.max(0, scanned.nonEmptyLineCount - 1);
|
|
4504
5365
|
return {
|
|
4505
5366
|
id: candidate.sessionId,
|
|
@@ -4517,7 +5378,7 @@ function parseSessionFile(candidate, ctx) {
|
|
|
4517
5378
|
function readDirEntries(directory) {
|
|
4518
5379
|
try {
|
|
4519
5380
|
return fs3.readdirSync(directory, { withFileTypes: true });
|
|
4520
|
-
} catch (
|
|
5381
|
+
} catch (e10) {
|
|
4521
5382
|
return [];
|
|
4522
5383
|
}
|
|
4523
5384
|
}
|
|
@@ -4531,7 +5392,7 @@ function collectCandidates(directory, entries) {
|
|
|
4531
5392
|
let stats;
|
|
4532
5393
|
try {
|
|
4533
5394
|
stats = fs3.statSync(sessionPath);
|
|
4534
|
-
} catch (
|
|
5395
|
+
} catch (e11) {
|
|
4535
5396
|
continue;
|
|
4536
5397
|
}
|
|
4537
5398
|
candidates.push({
|
|
@@ -4562,7 +5423,7 @@ function sanitizePathToDirectoryName(cwd) {
|
|
|
4562
5423
|
let canonicalPath = absolutePath;
|
|
4563
5424
|
try {
|
|
4564
5425
|
canonicalPath = fs3.realpathSync(absolutePath);
|
|
4565
|
-
} catch (
|
|
5426
|
+
} catch (e12) {
|
|
4566
5427
|
canonicalPath = absolutePath;
|
|
4567
5428
|
}
|
|
4568
5429
|
const normalized = canonicalPath.replace(/[\\/]+$/, "");
|
|
@@ -4603,8 +5464,9 @@ async function listSessions(options = {}) {
|
|
|
4603
5464
|
projectCandidates.sort(byMtimeDesc);
|
|
4604
5465
|
legacyCandidates.sort(byMtimeDesc);
|
|
4605
5466
|
const parseLimit = options.limit !== void 0 && options.limit >= 0 ? options.limit + PARSE_OVERSAMPLE : void 0;
|
|
4606
|
-
const
|
|
4607
|
-
const
|
|
5467
|
+
const scratch = { chunk: void 0 };
|
|
5468
|
+
const ctx = { favorites, scratch };
|
|
5469
|
+
const legacyCtx = requiredCwd !== void 0 ? { favorites, scratch, requiredCwd } : ctx;
|
|
4608
5470
|
const projectSessions = parseUpTo(projectCandidates, ctx, parseLimit);
|
|
4609
5471
|
const legacySessions = parseUpTo(legacyCandidates, legacyCtx, parseLimit);
|
|
4610
5472
|
const byId = /* @__PURE__ */ new Map();
|
|
@@ -4628,10 +5490,10 @@ async function listModels(options = {}) {
|
|
|
4628
5490
|
const { includeDisabled, ...transportOptions } = options;
|
|
4629
5491
|
const { client } = await createConfiguredClient(transportOptions);
|
|
4630
5492
|
try {
|
|
4631
|
-
const
|
|
5493
|
+
const response2 = await client.listModels({
|
|
4632
5494
|
...includeDisabled !== void 0 && { includeDisabled }
|
|
4633
5495
|
});
|
|
4634
|
-
return
|
|
5496
|
+
return _chunkKAAWCHO4js.unwrapResponseResult.call(void 0, response2).models;
|
|
4635
5497
|
} finally {
|
|
4636
5498
|
await closeQuietly(client);
|
|
4637
5499
|
}
|
|
@@ -5123,5 +5985,17 @@ async function listModels(options = {}) {
|
|
|
5123
5985
|
|
|
5124
5986
|
|
|
5125
5987
|
|
|
5126
|
-
exports.AbortError = _chunkOBPHU4RTjs.AbortError; exports.AddMcpServerRequestParamsSchema = _chunkOBPHU4RTjs.AddMcpServerRequestParamsSchema; exports.AddMcpServerRequestSchema = _chunkOBPHU4RTjs.AddMcpServerRequestSchema; exports.AddMcpServerResponseSchema = _chunkOBPHU4RTjs.AddMcpServerResponseSchema; exports.AddMcpServerResultSchema = _chunkOBPHU4RTjs.AddMcpServerResultSchema; exports.AddUserMessageRequestParamsSchema = _chunkOBPHU4RTjs.AddUserMessageRequestParamsSchema; exports.AddUserMessageRequestSchema = _chunkOBPHU4RTjs.AddUserMessageRequestSchema; exports.AddUserMessageResponseSchema = _chunkOBPHU4RTjs.AddUserMessageResponseSchema; exports.AddUserMessageResultSchema = _chunkOBPHU4RTjs.AddUserMessageResultSchema; exports.ApplyPatchToolConfirmationDetailsSchema = _chunkOBPHU4RTjs.ApplyPatchToolConfirmationDetailsSchema; exports.AskUserCollectedAnswerSchema = _chunkOBPHU4RTjs.AskUserCollectedAnswerSchema; exports.AskUserConfirmationDetailsSchema = _chunkOBPHU4RTjs.AskUserConfirmationDetailsSchema; exports.AskUserQuestionSchema = _chunkOBPHU4RTjs.AskUserQuestionSchema; exports.AskUserRequestParamsSchema = _chunkOBPHU4RTjs.AskUserRequestParamsSchema; exports.AskUserRequestSchema = _chunkOBPHU4RTjs.AskUserRequestSchema; exports.AskUserResponseSchema = _chunkOBPHU4RTjs.AskUserResponseSchema; exports.AskUserResultSchema = _chunkOBPHU4RTjs.AskUserResultSchema; exports.AssistantMessageRetractedNotificationSchema = _chunkOBPHU4RTjs.AssistantMessageRetractedNotificationSchema; exports.AssistantTextCompleteNotificationSchema = _chunkOBPHU4RTjs.AssistantTextCompleteNotificationSchema; exports.AssistantTextDeltaNotificationSchema = _chunkOBPHU4RTjs.AssistantTextDeltaNotificationSchema; exports.AuthenticateMcpServerRequestParamsSchema = _chunkOBPHU4RTjs.AuthenticateMcpServerRequestParamsSchema; exports.AuthenticateMcpServerRequestSchema = _chunkOBPHU4RTjs.AuthenticateMcpServerRequestSchema; exports.AuthenticateMcpServerResponseSchema = _chunkOBPHU4RTjs.AuthenticateMcpServerResponseSchema; exports.AuthenticateMcpServerResultSchema = _chunkOBPHU4RTjs.AuthenticateMcpServerResultSchema; exports.AutonomyLevel = _chunkOBPHU4RTjs.AutonomyLevel; exports.AvailableModelConfigSchema = _chunkOBPHU4RTjs.AvailableModelConfigSchema; exports.Base64ImageSourceSchema = _chunkOBPHU4RTjs.Base64ImageSourceSchema; exports.BaseNotificationSchema = _chunkOBPHU4RTjs.BaseNotificationSchema; exports.BaseRequestSchema = _chunkOBPHU4RTjs.BaseRequestSchema; exports.BaseResponseFailureSchema = _chunkOBPHU4RTjs.BaseResponseFailureSchema; exports.BaseResponseSuccessSchema = _chunkOBPHU4RTjs.BaseResponseSuccessSchema; exports.CLI_JSONRPC_CHILD_SPAWN_LATENCY_METRIC = CLI_JSONRPC_CHILD_SPAWN_LATENCY_METRIC; exports.COMPACTION_TIMEOUT = _chunkOBPHU4RTjs.COMPACTION_TIMEOUT; exports.CancelMcpAuthRequestParamsSchema = _chunkOBPHU4RTjs.CancelMcpAuthRequestParamsSchema; exports.CancelMcpAuthRequestSchema = _chunkOBPHU4RTjs.CancelMcpAuthRequestSchema; exports.CancelMcpAuthResponseSchema = _chunkOBPHU4RTjs.CancelMcpAuthResponseSchema; exports.CancelMcpAuthResultSchema = _chunkOBPHU4RTjs.CancelMcpAuthResultSchema; exports.ChangeWorkingDirectoryRequestParamsSchema = _chunkOBPHU4RTjs.ChangeWorkingDirectoryRequestParamsSchema; exports.ChangeWorkingDirectoryRequestSchema = _chunkOBPHU4RTjs.ChangeWorkingDirectoryRequestSchema; exports.ChangeWorkingDirectoryResponseSchema = _chunkOBPHU4RTjs.ChangeWorkingDirectoryResponseSchema; exports.ChangeWorkingDirectoryResultSchema = _chunkOBPHU4RTjs.ChangeWorkingDirectoryResultSchema; exports.ClearMcpAuthRequestParamsSchema = _chunkOBPHU4RTjs.ClearMcpAuthRequestParamsSchema; exports.ClearMcpAuthRequestSchema = _chunkOBPHU4RTjs.ClearMcpAuthRequestSchema; exports.ClearMcpAuthResponseSchema = _chunkOBPHU4RTjs.ClearMcpAuthResponseSchema; exports.ClearMcpAuthResultSchema = _chunkOBPHU4RTjs.ClearMcpAuthResultSchema; exports.CliRequestOrNotificationSchema = _chunkOBPHU4RTjs.CliRequestOrNotificationSchema; exports.ClientDestroyedError = _chunkOBPHU4RTjs.ClientDestroyedError; exports.ClientRequestSchema = _chunkOBPHU4RTjs.ClientRequestSchema; exports.ClientUiSurface = _chunkOBPHU4RTjs.ClientUiSurface; exports.CloseSessionRequestParamsSchema = _chunkOBPHU4RTjs.CloseSessionRequestParamsSchema; exports.CloseSessionRequestSchema = _chunkOBPHU4RTjs.CloseSessionRequestSchema; exports.CloseSessionResponseSchema = _chunkOBPHU4RTjs.CloseSessionResponseSchema; exports.CloseSessionResultSchema = _chunkOBPHU4RTjs.CloseSessionResultSchema; exports.CompactSessionRequestParamsSchema = _chunkOBPHU4RTjs.CompactSessionRequestParamsSchema; exports.CompactSessionRequestSchema = _chunkOBPHU4RTjs.CompactSessionRequestSchema; exports.CompactSessionResponseSchema = _chunkOBPHU4RTjs.CompactSessionResponseSchema; exports.CompactSessionResultSchema = _chunkOBPHU4RTjs.CompactSessionResultSchema; exports.ComputeLimitExceededError = _chunkOBPHU4RTjs.ComputeLimitExceededError; exports.ComputerConnectAttemptTrigger = _chunkOBPHU4RTjs.ComputerConnectAttemptTrigger; exports.ComputerConnectStartType = _chunkOBPHU4RTjs.ComputerConnectStartType; exports.ComputerListResponseSchema = _chunkOBPHU4RTjs.ComputerListResponseSchema; exports.ComputerMetricSchema = _chunkOBPHU4RTjs.ComputerMetricSchema; exports.ComputerMetricsResponseSchema = _chunkOBPHU4RTjs.ComputerMetricsResponseSchema; exports.ComputerSchema = _chunkOBPHU4RTjs.ComputerSchema; exports.ConcurrentStreamError = _chunkOBPHU4RTjs.ConcurrentStreamError; exports.ConnectionClosedError = _chunkOBPHU4RTjs.ConnectionClosedError; exports.ConnectionError = _chunkOBPHU4RTjs.ConnectionError; exports.ConnectionFailureReason = _chunkOBPHU4RTjs.ConnectionFailureReason; exports.ContentBlockSchema = _chunkOBPHU4RTjs.ContentBlockSchema; exports.ContextApiError = _chunkOBPHU4RTjs.ContextApiError; exports.ContextBreakdownCategorySchema = _chunkOBPHU4RTjs.ContextBreakdownCategorySchema; exports.ContextBreakdownResultSchema = _chunkOBPHU4RTjs.GetContextBreakdownResultSchema; exports.ContextStatsAccuracy = _chunkOBPHU4RTjs.ContextStatsAccuracy; exports.ContextStatsSchema = _chunkOBPHU4RTjs.ContextStatsSchema; exports.CreateMessageNotificationSchema = _chunkOBPHU4RTjs.CreateMessageNotificationSchema; exports.CreateToolConfirmationDetailsSchema = _chunkOBPHU4RTjs.CreateToolConfirmationDetailsSchema; exports.DEFAULT_LOCAL_DAEMON_WS_URL = _chunkOBPHU4RTjs.DEFAULT_LOCAL_DAEMON_WS_URL; exports.DEFAULT_REQUEST_TIMEOUT = _chunkOBPHU4RTjs.DEFAULT_REQUEST_TIMEOUT; exports.DaemonAuthenticationMode = _chunkOBPHU4RTjs.DaemonAuthenticationMode; exports.DaemonClient = _chunkOBPHU4RTjs.DaemonClient; exports.DaemonClientMetaError = _chunkOBPHU4RTjs.MetaError; exports.DaemonDroidEvent = _chunkOBPHU4RTjs.DaemonDroidEvent; exports.DaemonRequestPermissionSchema = _chunkOBPHU4RTjs.DaemonRequestPermissionSchema; exports.DaemonSessionController = _chunkOBPHU4RTjs.DaemonSessionController; exports.DecompSessionType = _chunkOBPHU4RTjs.DecompSessionType; exports.DiscoveredIssueSchema = _chunkOBPHU4RTjs.DiscoveredIssueSchema; exports.DismissalRecordSchema = _chunkOBPHU4RTjs.DismissalRecordSchema; exports.DismissalType = _chunkOBPHU4RTjs.DismissalType; exports.DocumentBlockSchema = _chunkOBPHU4RTjs.DocumentBlockSchema; exports.DocumentSourceSchema = _chunkOBPHU4RTjs.DocumentSourceSchema; exports.DroidClient = DroidClient; exports.DroidClientError = _chunkOBPHU4RTjs.DroidClientError; exports.DroidClientEvent = DroidClientEvent; exports.DroidClientMethod = _chunkOBPHU4RTjs.DroidClientMethod; exports.DroidErrorType = _chunkOBPHU4RTjs.DroidErrorType; exports.DroidEvent = _chunkOBPHU4RTjs.DroidEvent; exports.DroidHookEventSchema = _chunkOBPHU4RTjs.DroidHookEventSchema; exports.DroidHookExecutionResultSchema = _chunkOBPHU4RTjs.DroidHookExecutionResultSchema; exports.DroidHookOutputSchema = _chunkOBPHU4RTjs.DroidHookOutputSchema; exports.DroidHookSpecificOutputSchema = _chunkOBPHU4RTjs.DroidHookSpecificOutputSchema; exports.DroidInteractionMode = _chunkOBPHU4RTjs.DroidInteractionMode; exports.DroidMessageType = _chunkOBPHU4RTjs.DroidMessageType; exports.DroidProcessManager = DroidProcessManager; exports.DroidProcessMode = DroidProcessMode; exports.DroidServerMethod = _chunkOBPHU4RTjs.DroidServerMethod; exports.DroidSession = DroidSession; exports.DroidWorkingState = _chunkOBPHU4RTjs.DroidWorkingState; exports.DroidWorkingStateChangedNotificationSchema = _chunkOBPHU4RTjs.DroidWorkingStateChangedNotificationSchema; exports.EditToolConfirmationDetailsSchema = _chunkOBPHU4RTjs.EditToolConfirmationDetailsSchema; exports.EmptyResultSchema = _chunkOBPHU4RTjs.EmptyResultSchema; exports.ErrorDetailSchema = _chunkOBPHU4RTjs.ErrorDetailSchema; exports.ErrorNotificationSchema = _chunkOBPHU4RTjs.ErrorNotificationSchema; exports.ExecToolInfoSchema = _chunkOBPHU4RTjs.ExecToolInfoSchema; exports.ExecToolInfoWithSchemasSchema = _chunkOBPHU4RTjs.ExecToolInfoWithSchemasSchema; exports.ExecuteRewindRequestParamsSchema = _chunkOBPHU4RTjs.ExecuteRewindRequestParamsSchema; exports.ExecuteRewindRequestSchema = _chunkOBPHU4RTjs.ExecuteRewindRequestSchema; exports.ExecuteRewindResponseSchema = _chunkOBPHU4RTjs.ExecuteRewindResponseSchema; exports.ExecuteRewindResultSchema = _chunkOBPHU4RTjs.ExecuteRewindResultSchema; exports.ExecuteToolConfirmationDetailsSchema = _chunkOBPHU4RTjs.ExecuteToolConfirmationDetailsSchema; exports.ExitSpecModeConfirmationDetailsSchema = _chunkOBPHU4RTjs.ExitSpecModeConfirmationDetailsSchema; exports.FACTORY_CLIENT_HEADER = _chunkOBPHU4RTjs.FACTORY_CLIENT_HEADER; exports.FACTORY_CLIENT_VERSION = _chunkOBPHU4RTjs.FACTORY_CLIENT_VERSION; exports.FACTORY_PROTOCOL_VERSION = _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION2; exports.FactoryDaemonTransport = _chunkOBPHU4RTjs.FactoryDaemonTransport; exports.FactoryDroidMessageRole = _chunkOBPHU4RTjs.FactoryDroidMessageRole; exports.FactoryDroidMessageSchema = _chunkOBPHU4RTjs.FactoryDroidMessageSchema; exports.FeatureStatus = _chunkOBPHU4RTjs.FeatureStatus; exports.FeatureSuccessState = _chunkOBPHU4RTjs.FeatureSuccessState; exports.FeatureSuccessStateSchema = _chunkOBPHU4RTjs.FeatureSuccessStateSchema; exports.ForkSessionRequestParamsSchema = _chunkOBPHU4RTjs.ForkSessionRequestParamsSchema; exports.ForkSessionRequestSchema = _chunkOBPHU4RTjs.ForkSessionRequestSchema; exports.ForkSessionResponseSchema = _chunkOBPHU4RTjs.ForkSessionResponseSchema; exports.ForkSessionResultSchema = _chunkOBPHU4RTjs.ForkSessionResultSchema; exports.GetContextStatsRequestParamsSchema = _chunkOBPHU4RTjs.GetContextStatsRequestParamsSchema; exports.GetContextStatsRequestSchema = _chunkOBPHU4RTjs.GetContextStatsRequestSchema; exports.GetContextStatsResponseSchema = _chunkOBPHU4RTjs.GetContextStatsResponseSchema; exports.GetContextStatsResultSchema = _chunkOBPHU4RTjs.ContextStatsSchema; exports.GetRewindInfoRequestParamsSchema = _chunkOBPHU4RTjs.GetRewindInfoRequestParamsSchema; exports.GetRewindInfoRequestSchema = _chunkOBPHU4RTjs.GetRewindInfoRequestSchema; exports.GetRewindInfoResponseSchema = _chunkOBPHU4RTjs.GetRewindInfoResponseSchema; exports.GetRewindInfoResultSchema = _chunkOBPHU4RTjs.GetRewindInfoResultSchema; exports.GitRepoInfoSchema = _chunkOBPHU4RTjs.GitRepoInfoSchema; exports.HandoffItemsDismissedEntrySchema = _chunkOBPHU4RTjs.HandoffItemsDismissedEntrySchema; exports.HandoffSchema = _chunkOBPHU4RTjs.HandoffSchema; exports.HookCommandSchema = _chunkOBPHU4RTjs.HookCommandSchema; exports.HookExecutionCompletedNotificationSchema = _chunkOBPHU4RTjs.HookExecutionCompletedNotificationSchema; exports.HookExecutionStartedNotificationSchema = _chunkOBPHU4RTjs.HookExecutionStartedNotificationSchema; exports.HookResultSchema = _chunkOBPHU4RTjs.HookResultSchema; exports.HttpHeaderSchema = _chunkOBPHU4RTjs.HttpHeaderSchema; exports.HttpMcpConfigSchema = _chunkOBPHU4RTjs.HttpMcpSchema; exports.IPC_DAEMON_URL = _chunkOBPHU4RTjs.IPC_DAEMON_URL; exports.ImageBlockSchema = _chunkOBPHU4RTjs.ImageBlockSchema; exports.InProcessDaemonClientTransport = _chunkOBPHU4RTjs.InProcessDaemonClientTransport; exports.InitializeSessionRequestParamsSchema = _chunkOBPHU4RTjs.InitializeSessionRequestParamsSchema; exports.InitializeSessionRequestSchema = _chunkOBPHU4RTjs.InitializeSessionRequestSchema; exports.InitializeSessionResponseSchema = _chunkOBPHU4RTjs.InitializeSessionResponseSchema; exports.InitializeSessionResultSchema = _chunkOBPHU4RTjs.InitializeSessionResultSchema2; exports.InteractiveCheckSchema = _chunkOBPHU4RTjs.InteractiveCheckSchema; exports.InterruptSessionRequestParamsSchema = _chunkOBPHU4RTjs.InterruptSessionRequestParamsSchema; exports.InterruptSessionRequestSchema = _chunkOBPHU4RTjs.InterruptSessionRequestSchema; exports.InterruptSessionResponseSchema = _chunkOBPHU4RTjs.InterruptSessionResponseSchema; exports.InterruptSessionResultSchema = _chunkOBPHU4RTjs.InterruptSessionResultSchema; exports.InvalidSessionCwdError = _chunkOBPHU4RTjs.InvalidSessionCwdError; exports.IpcDaemonClientTransport = _chunkOBPHU4RTjs.IpcDaemonClientTransport; exports.IssueSeverity = _chunkOBPHU4RTjs.IssueSeverity; exports.JSONRPC_VERSION = _chunkOBPHU4RTjs.JSONRPC_VERSION3; exports.JsonArraySchema = _chunkOBPHU4RTjs.JsonArraySchema; exports.JsonObjectSchema = _chunkOBPHU4RTjs.JsonObjectSchema; exports.JsonRpcEnvelopeSchema = _chunkOBPHU4RTjs.JsonRpcEnvelopeSchema; exports.JsonRpcErrorCode = _chunkOBPHU4RTjs.JsonRpcErrorCode; exports.JsonRpcErrorSchema = _chunkOBPHU4RTjs.JsonRpcErrorSchema; exports.JsonRpcMessageSchema = _chunkOBPHU4RTjs.JsonRpcMessageSchema; exports.JsonRpcMessageType = _chunkOBPHU4RTjs.JsonRpcMessageType; exports.JsonRpcNotificationSchema = _chunkOBPHU4RTjs.JsonRpcNotificationSchema; exports.JsonRpcRequestError = _chunkOBPHU4RTjs.JsonRpcRequestError; exports.JsonRpcRequestSchema = _chunkOBPHU4RTjs.JsonRpcRequestSchema; exports.JsonRpcResponseFailureSchema = _chunkOBPHU4RTjs.JsonRpcResponseFailureSchema; exports.JsonRpcResponseSchema = _chunkOBPHU4RTjs.JsonRpcResponseSchema; exports.JsonRpcResponseSuccessSchema = _chunkOBPHU4RTjs.JsonRpcResponseSuccessSchema; exports.JsonValueSchema = _chunkOBPHU4RTjs.JsonValueSchema; exports.KillWorkerSessionRequestParamsSchema = _chunkOBPHU4RTjs.KillWorkerSessionRequestParamsSchema; exports.KillWorkerSessionRequestSchema = _chunkOBPHU4RTjs.KillWorkerSessionRequestSchema; exports.KillWorkerSessionResponseSchema = _chunkOBPHU4RTjs.KillWorkerSessionResponseSchema; exports.KillWorkerSessionResultSchema = _chunkOBPHU4RTjs.KillWorkerSessionResultSchema; exports.LEGACY_FACTORY_API_VERSION = _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION2; exports.LOCAL_MACHINE_ID = _chunkOBPHU4RTjs.LOCAL_MACHINE_ID; exports.ListMcpRegistryRequestParamsSchema = _chunkOBPHU4RTjs.ListMcpRegistryRequestParamsSchema; exports.ListMcpRegistryRequestSchema = _chunkOBPHU4RTjs.ListMcpRegistryRequestSchema; exports.ListMcpRegistryResponseSchema = _chunkOBPHU4RTjs.ListMcpRegistryResponseSchema; exports.ListMcpRegistryResultSchema = _chunkOBPHU4RTjs.ListMcpRegistryResultSchema; exports.ListMcpServersRequestParamsSchema = _chunkOBPHU4RTjs.ListMcpServersRequestParamsSchema; exports.ListMcpServersRequestSchema = _chunkOBPHU4RTjs.ListMcpServersRequestSchema; exports.ListMcpServersResponseSchema = _chunkOBPHU4RTjs.ListMcpServersResponseSchema; exports.ListMcpServersResultSchema = _chunkOBPHU4RTjs.ListMcpServersResultSchema; exports.ListMcpToolsRequestParamsSchema = _chunkOBPHU4RTjs.ListMcpToolsRequestParamsSchema; exports.ListMcpToolsRequestSchema = _chunkOBPHU4RTjs.ListMcpToolsRequestSchema; exports.ListMcpToolsResponseSchema = _chunkOBPHU4RTjs.ListMcpToolsResponseSchema; exports.ListMcpToolsResultSchema = _chunkOBPHU4RTjs.ListMcpToolsResultSchema; exports.ListModelsOptionsSchema = _chunkOBPHU4RTjs.ListModelsOptionsSchema; exports.ListModelsResultSchema = _chunkOBPHU4RTjs.ListModelsResultSchema; exports.ListSkillsRequestParamsSchema = _chunkOBPHU4RTjs.ListSkillsRequestParamsSchema; exports.ListSkillsRequestSchema = _chunkOBPHU4RTjs.ListSkillsRequestSchema; exports.ListSkillsResponseSchema = _chunkOBPHU4RTjs.ListSkillsResponseSchema; exports.ListSkillsResultSchema = _chunkOBPHU4RTjs.ListSkillsResultSchema; exports.ListToolsRequestParamsSchema = _chunkOBPHU4RTjs.ListToolsRequestParamsSchema; exports.ListToolsRequestSchema = _chunkOBPHU4RTjs.ListToolsRequestSchema; exports.ListToolsResponseSchema = _chunkOBPHU4RTjs.ListToolsResponseSchema; exports.ListToolsResponseWithSchemasSchema = _chunkOBPHU4RTjs.ListToolsResponseWithSchemasSchema; exports.ListToolsResultSchema = _chunkOBPHU4RTjs.ListToolsResultSchema; exports.ListToolsResultWithSchemasSchema = _chunkOBPHU4RTjs.ListToolsResultWithSchemasSchema; exports.LoadSessionRequestParamsSchema = _chunkOBPHU4RTjs.LoadSessionRequestParamsSchema; exports.LoadSessionRequestSchema = _chunkOBPHU4RTjs.LoadSessionRequestSchema; exports.LoadSessionResponseSchema = _chunkOBPHU4RTjs.LoadSessionResponseSchema; exports.LoadSessionResultSchema = _chunkOBPHU4RTjs.LoadSessionResultSchema; exports.MACHINE_TYPE_WEBSOCKET_OVERRIDES = _chunkOBPHU4RTjs.MACHINE_TYPE_WEBSOCKET_OVERRIDES; exports.MANAGED_COMPUTER_MAX_RETRIES = _chunkOBPHU4RTjs.MANAGED_COMPUTER_MAX_RETRIES; exports.MCP_AUTH_TIMEOUT = _chunkOBPHU4RTjs.MCP_AUTH_TIMEOUT; exports.MachineTemplateBuildStatusSchema = _chunkOBPHU4RTjs.MachineTemplateBuildStatusSchema; exports.MachineTemplateListResponseSchema = _chunkOBPHU4RTjs.MachineTemplateListResponseSchema; exports.MachineTemplateSchema = _chunkOBPHU4RTjs.MachineTemplateSchema; exports.MachineType = _chunkOBPHU4RTjs.MachineType; exports.ManagedProcessImpl = ManagedProcessImpl; exports.McpAuthCompletedNotificationSchema = _chunkOBPHU4RTjs.McpAuthCompletedNotificationSchema; exports.McpAuthOutcome = _chunkOBPHU4RTjs.McpAuthOutcome; exports.McpAuthRequiredNotificationSchema = _chunkOBPHU4RTjs.McpAuthRequiredNotificationSchema; exports.McpHttpServerConfigFieldsSchema = _chunkOBPHU4RTjs.McpHttpServerConfigFieldsSchema; exports.McpRegistryServerSchema = _chunkOBPHU4RTjs.McpRegistryServerSchema; exports.McpServerConfigSchema = _chunkOBPHU4RTjs.McpServerConfigSchema; exports.McpServerStatus = _chunkOBPHU4RTjs.McpServerStatus; exports.McpServerStatusInfoSchema = _chunkOBPHU4RTjs.McpServerStatusInfoSchema; exports.McpServerType = _chunkOBPHU4RTjs.McpServerType; exports.McpSseServerConfigFieldsSchema = _chunkOBPHU4RTjs.McpSseServerConfigFieldsSchema; exports.McpStatus = _chunkOBPHU4RTjs.McpStatus; exports.McpStatusChangedNotificationSchema = _chunkOBPHU4RTjs.McpStatusChangedNotificationSchema; exports.McpStatusSummarySchema = _chunkOBPHU4RTjs.McpStatusSummarySchema; exports.McpStdioServerConfigFieldsSchema = _chunkOBPHU4RTjs.McpStdioServerConfigFieldsSchema; exports.McpToolConfirmationDetailsSchema = _chunkOBPHU4RTjs.McpToolConfirmationDetailsSchema; exports.McpToolInfoSchema = _chunkOBPHU4RTjs.McpToolInfoSchema; exports.McpToolInputSchemaSchema = _chunkOBPHU4RTjs.McpToolInputSchemaSchema; exports.MessageVisibility = _chunkOBPHU4RTjs.MessageVisibility; exports.Metric = _chunkOBPHU4RTjs.Metric; exports.MilestoneValidationTriggeredEntrySchema = _chunkOBPHU4RTjs.MilestoneValidationTriggeredEntrySchema; exports.MissionAcceptedEntrySchema = _chunkOBPHU4RTjs.MissionAcceptedEntrySchema; exports.MissionFeatureSchema = _chunkOBPHU4RTjs.MissionFeatureSchema; exports.MissionFeaturesChangedNotificationSchema = _chunkOBPHU4RTjs.MissionFeaturesChangedNotificationSchema; exports.MissionHeartbeatNotificationSchema = _chunkOBPHU4RTjs.MissionHeartbeatNotificationSchema; exports.MissionPausedEntrySchema = _chunkOBPHU4RTjs.MissionPausedEntrySchema; exports.MissionProgressEntryNotificationSchema = _chunkOBPHU4RTjs.MissionProgressEntryNotificationSchema; exports.MissionResumedEntrySchema = _chunkOBPHU4RTjs.MissionResumedEntrySchema; exports.MissionRunStartedEntrySchema = _chunkOBPHU4RTjs.MissionRunStartedEntrySchema; exports.MissionSnapshotSchema = _chunkOBPHU4RTjs.MissionStateSchema; exports.MissionState = _chunkOBPHU4RTjs.MissionState; exports.MissionStateChangedNotificationSchema = _chunkOBPHU4RTjs.MissionStateChangedNotificationSchema; exports.MissionWorkerCompletedNotificationSchema = _chunkOBPHU4RTjs.MissionWorkerCompletedNotificationSchema; exports.MissionWorkerStartedNotificationSchema = _chunkOBPHU4RTjs.MissionWorkerStartedNotificationSchema; exports.ModelInfoSchema = _chunkOBPHU4RTjs.ModelInfoSchema; exports.ModelMetadataSchema = _chunkOBPHU4RTjs.ModelMetadataSchema; exports.ModelProvider = _chunkOBPHU4RTjs.ModelProvider; exports.MultiMissionStateManager = _chunkOBPHU4RTjs.MultiMissionStateManager; exports.MultiSessionStateManager = _chunkOBPHU4RTjs.MultiSessionStateManager; exports.OtelTracing = _chunkOBPHU4RTjs.OtelTracing; exports.OutputFormatSchema = _chunkOBPHU4RTjs.OutputFormatSchema; exports.OutputFormatType = _chunkOBPHU4RTjs.OutputFormatType; exports.PermissionResolvedNotificationSchema = _chunkOBPHU4RTjs.PermissionResolvedNotificationSchema; exports.PickOptionsRequestParamsSchema = _chunkOBPHU4RTjs.PickOptionsRequestParamsSchema; exports.PickOptionsRequestSchema = _chunkOBPHU4RTjs.PickOptionsRequestSchema; exports.PickOptionsResponseSchema = _chunkOBPHU4RTjs.PickOptionsResponseSchema; exports.PickOptionsResultSchema = _chunkOBPHU4RTjs.PickOptionsResultSchema; exports.PickOptionsRowSchema = _chunkOBPHU4RTjs.PickOptionsRowSchema; exports.PickOptionsUnavailableError = _chunkOBPHU4RTjs.PickOptionsUnavailableError; exports.ProcessExitError = _chunkOBPHU4RTjs.ProcessExitError; exports.ProcessTransport = ProcessTransport; exports.ProgressLogEntrySchema = _chunkOBPHU4RTjs.ProgressLogEntrySchema; exports.ProgressLogEntryType = _chunkOBPHU4RTjs.ProgressLogEntryType; exports.ProposeMissionConfirmationDetailsSchema = _chunkOBPHU4RTjs.ProposeMissionConfirmationDetailsSchema; exports.ProtocolError = _chunkOBPHU4RTjs.ProtocolError; exports.QueuedUserMessageDisplayGroup = _chunkOBPHU4RTjs.QueuedUserMessageDisplayGroup; exports.QueuedUserMessageKind = _chunkOBPHU4RTjs.QueuedUserMessageKind; exports.REWIND_TIMEOUT = _chunkOBPHU4RTjs.REWIND_TIMEOUT; exports.ReasoningEffort = _chunkOBPHU4RTjs.ReasoningEffort; exports.RedactedThinkingBlockSchema = _chunkOBPHU4RTjs.RedactedThinkingBlockSchema; exports.RefreshComputerResponseSchema = _chunkOBPHU4RTjs.RefreshComputerResponseSchema; exports.RelayConnectionError = _chunkOBPHU4RTjs.RelayConnectionError; exports.RemoteSessionListResponseSchema = _chunkOBPHU4RTjs.RemoteSessionListResponseSchema; exports.RemoteSessionSchema = _chunkOBPHU4RTjs.RemoteSessionSchema; exports.RemoveMcpServerRequestParamsSchema = _chunkOBPHU4RTjs.RemoveMcpServerRequestParamsSchema; exports.RemoveMcpServerRequestSchema = _chunkOBPHU4RTjs.RemoveMcpServerRequestSchema; exports.RemoveMcpServerResponseSchema = _chunkOBPHU4RTjs.RemoveMcpServerResponseSchema; exports.RemoveMcpServerResultSchema = _chunkOBPHU4RTjs.RemoveMcpServerResultSchema; exports.RenameSessionRequestParamsSchema = _chunkOBPHU4RTjs.RenameSessionRequestParamsSchema; exports.RenameSessionRequestSchema = _chunkOBPHU4RTjs.RenameSessionRequestSchema; exports.RenameSessionResponseSchema = _chunkOBPHU4RTjs.RenameSessionResponseSchema; exports.RenameSessionResultSchema = _chunkOBPHU4RTjs.RenameSessionResultSchema; exports.RequestPermissionRequestParamsSchema = _chunkOBPHU4RTjs.RequestPermissionRequestParamsSchema; exports.RequestPermissionRequestSchema = _chunkOBPHU4RTjs.RequestPermissionRequestSchema; exports.RequestPermissionResponseSchema = _chunkOBPHU4RTjs.RequestPermissionResponseSchema; exports.RequestPermissionResultSchema = _chunkOBPHU4RTjs.RequestPermissionResultSchema; exports.RewindEvictedFileSchema = _chunkOBPHU4RTjs.RewindEvictedFileSchema; exports.RewindFileCreationSchema = _chunkOBPHU4RTjs.RewindFileCreationSchema; exports.RewindFileSnapshotSchema = _chunkOBPHU4RTjs.RewindFileSnapshotSchema; exports.SDK_TAG = _chunkOBPHU4RTjs.SDK_TAG; exports.SDK_VERSION = _chunkOBPHU4RTjs.SDK_VERSION; exports.SESSION_INIT_TIMEOUT = _chunkOBPHU4RTjs.SESSION_INIT_TIMEOUT; exports.SLACK_DELEGATION_MAX_RETRIES = _chunkOBPHU4RTjs.SLACK_DELEGATION_MAX_RETRIES; exports.SdkMcpServer = SdkMcpServer; exports.ServerRequestHandlerType = _chunkOBPHU4RTjs.ServerRequestHandlerType; exports.SessionArtifactAction = _chunkOBPHU4RTjs.SessionArtifactAction; exports.SessionArtifactKind = _chunkOBPHU4RTjs.SessionArtifactKind; exports.SessionArtifactProvider = _chunkOBPHU4RTjs.SessionArtifactProvider; exports.SessionArtifactSchema = _chunkOBPHU4RTjs.SessionArtifactSchema; exports.SessionArtifactSource = _chunkOBPHU4RTjs.SessionArtifactSource; exports.SessionArtifactsSchema = _chunkOBPHU4RTjs.SessionArtifactsSchema; exports.SessionError = _chunkOBPHU4RTjs.SessionError; exports.SessionMetadataSchema = _chunkOBPHU4RTjs.SessionMetadataSchema; exports.SessionNotFoundError = _chunkOBPHU4RTjs.SessionNotFoundError; exports.SessionNotificationParamsSchema = _chunkOBPHU4RTjs.SessionNotificationParamsSchema; exports.SessionNotificationPayloadSchema = _chunkOBPHU4RTjs.SessionNotificationPayloadSchema; exports.SessionNotificationSchema = _chunkOBPHU4RTjs.SessionNotificationSchema; exports.SessionNotificationSchemaList = _chunkOBPHU4RTjs.SessionNotificationSchemaList; exports.SessionNotificationType = _chunkOBPHU4RTjs.SessionNotificationType; exports.SessionPlatform = _chunkOBPHU4RTjs.SessionPlatform; exports.SessionReplacedError = _chunkOBPHU4RTjs.SessionReplacedError; exports.SessionReplacementError = _chunkOBPHU4RTjs.SessionReplacementError; exports.SessionSettingsFileSchema = _chunkOBPHU4RTjs.SessionSettingsFileSchema; exports.SessionSettingsSchema = _chunkOBPHU4RTjs.SessionSettingsSchema; exports.SessionSourceSchema = _chunkOBPHU4RTjs.SessionSourceSchema; exports.SessionStartEventSchema = _chunkOBPHU4RTjs.SessionStartEventSchema; exports.SessionTagSchema = _chunkOBPHU4RTjs.SessionTagSchema; exports.SessionTitleUpdatedNotificationSchema = _chunkOBPHU4RTjs.SessionTitleUpdatedNotificationSchema; exports.SessionTokenUsageChangedNotificationSchema = _chunkOBPHU4RTjs.SessionTokenUsageChangedNotificationSchema; exports.SetSkillDisabledRequestParamsSchema = _chunkOBPHU4RTjs.SetSkillDisabledRequestParamsSchema; exports.SetSkillDisabledRequestSchema = _chunkOBPHU4RTjs.SetSkillDisabledRequestSchema; exports.SetSkillDisabledResponseSchema = _chunkOBPHU4RTjs.SetSkillDisabledResponseSchema; exports.SetSkillDisabledResultSchema = _chunkOBPHU4RTjs.SetSkillDisabledResultSchema; exports.SettingsLevel = _chunkOBPHU4RTjs.SettingsLevel; exports.SettingsUpdatedNotificationSchema = _chunkOBPHU4RTjs.SettingsUpdatedNotificationSchema; exports.SettingsUpdatedPayloadSchema = _chunkOBPHU4RTjs.SettingsUpdatedPayloadSchema; exports.SkillDeviationSchema = _chunkOBPHU4RTjs.SkillDeviationSchema; exports.SkillFeedbackSchema = _chunkOBPHU4RTjs.SkillFeedbackSchema; exports.SkillInfoSchema = _chunkOBPHU4RTjs.SkillInfoSchema; exports.SkillLocation = _chunkOBPHU4RTjs.SkillLocation; exports.SkillResourceSchema = _chunkOBPHU4RTjs.SkillResourceSchema; exports.SpanAttribute = _chunkOBPHU4RTjs.SpanAttribute; exports.SpanEvent = _chunkOBPHU4RTjs.SpanEvent; exports.SpanName = _chunkOBPHU4RTjs.SpanName; exports.SseMcpConfigSchema = _chunkOBPHU4RTjs.SseMcpSchema; exports.StartMissionRunConfirmationDetailsSchema = _chunkOBPHU4RTjs.StartMissionRunConfirmationDetailsSchema; exports.StdioMcpConfigSchema = _chunkOBPHU4RTjs.StdioMcpSchema; exports.StreamStateTracker = _chunkOBPHU4RTjs.StreamStateTracker; exports.StructuredOutputErrorSchema = _chunkOBPHU4RTjs.StructuredOutputErrorSchema; exports.StructuredOutputNotificationSchema = _chunkOBPHU4RTjs.StructuredOutputNotificationSchema; exports.SubmitBugReportRequestParamsSchema = _chunkOBPHU4RTjs.SubmitBugReportRequestParamsSchema; exports.SubmitBugReportRequestSchema = _chunkOBPHU4RTjs.SubmitBugReportRequestSchema; exports.SubmitBugReportResponseSchema = _chunkOBPHU4RTjs.SubmitBugReportResponseSchema; exports.SubmitBugReportResultSchema = _chunkOBPHU4RTjs.SubmitBugReportResultSchema; exports.SubmitMcpAuthCodeRequestParamsSchema = _chunkOBPHU4RTjs.SubmitMcpAuthCodeRequestParamsSchema; exports.SubmitMcpAuthCodeRequestSchema = _chunkOBPHU4RTjs.SubmitMcpAuthCodeRequestSchema; exports.SubmitMcpAuthCodeResponseSchema = _chunkOBPHU4RTjs.SubmitMcpAuthCodeResponseSchema; exports.SubmitMcpAuthCodeResultSchema = _chunkOBPHU4RTjs.SubmitMcpAuthCodeResultSchema; exports.SuccessResultSchema = _chunkOBPHU4RTjs.SuccessResultSchema; exports.TestCaseSchema = _chunkOBPHU4RTjs.TestCaseSchema; exports.TestFileSchema = _chunkOBPHU4RTjs.TestFileSchema; exports.TestsSchema = _chunkOBPHU4RTjs.TestsSchema; exports.TextBlockSchema = _chunkOBPHU4RTjs.TextBlockSchema; exports.ThinkingBlockSchema = _chunkOBPHU4RTjs.ThinkingBlockSchema; exports.ThinkingTextCompleteNotificationSchema = _chunkOBPHU4RTjs.ThinkingTextCompleteNotificationSchema; exports.ThinkingTextDeltaNotificationSchema = _chunkOBPHU4RTjs.ThinkingTextDeltaNotificationSchema; exports.TimeoutError = _chunkOBPHU4RTjs.TimeoutError; exports.ToggleMcpServerRequestParamsSchema = _chunkOBPHU4RTjs.ToggleMcpServerRequestParamsSchema; exports.ToggleMcpServerRequestSchema = _chunkOBPHU4RTjs.ToggleMcpServerRequestSchema; exports.ToggleMcpServerResponseSchema = _chunkOBPHU4RTjs.ToggleMcpServerResponseSchema; exports.ToggleMcpServerResultSchema = _chunkOBPHU4RTjs.ToggleMcpServerResultSchema; exports.ToggleMcpToolRequestParamsSchema = _chunkOBPHU4RTjs.ToggleMcpToolRequestParamsSchema; exports.ToggleMcpToolRequestSchema = _chunkOBPHU4RTjs.ToggleMcpToolRequestSchema; exports.ToggleMcpToolResponseSchema = _chunkOBPHU4RTjs.ToggleMcpToolResponseSchema; exports.ToggleMcpToolResultSchema = _chunkOBPHU4RTjs.ToggleMcpToolResultSchema; exports.TokenUsageSchema = _chunkOBPHU4RTjs.TokenUsageSchema; exports.ToolCallNotificationSchema = _chunkOBPHU4RTjs.ToolCallNotificationSchema; exports.ToolConfirmationDetailsSchema = _chunkOBPHU4RTjs.ToolConfirmationDetailsSchema; exports.ToolConfirmationInfoSchema = _chunkOBPHU4RTjs.ToolConfirmationInfoSchema; exports.ToolConfirmationListItemSchema = _chunkOBPHU4RTjs.ToolConfirmationListItemSchema; exports.ToolConfirmationOutcome = _chunkOBPHU4RTjs.ToolConfirmationOutcome; exports.ToolConfirmationType = _chunkOBPHU4RTjs.ToolConfirmationType; exports.ToolJsonSchemaSchema = _chunkOBPHU4RTjs.ToolJsonSchemaSchema; exports.ToolProgressUpdateNotificationSchema = _chunkOBPHU4RTjs.ToolProgressUpdateNotificationSchema; exports.ToolProgressUpdateSchema = _chunkOBPHU4RTjs.ToolProgressUpdateSchema; exports.ToolResultBlockSchema = _chunkOBPHU4RTjs.ToolResultSchema; exports.ToolResultNotificationSchema = _chunkOBPHU4RTjs.ToolResultNotificationSchema; exports.ToolResultSchemaDescriptorSchema = _chunkOBPHU4RTjs.ToolResultSchemaDescriptorSchema; exports.ToolSchemasSchema = _chunkOBPHU4RTjs.ToolSchemasSchema; exports.ToolSelectionOverridesSchema = _chunkOBPHU4RTjs.ToolSelectionOverridesSchema; exports.ToolSourceSchema = _chunkOBPHU4RTjs.ToolSourceSchema; exports.ToolUseBlockSchema = _chunkOBPHU4RTjs.ToolUseSchema; exports.ToolUseSchema = _chunkOBPHU4RTjs.ToolUseSchema2; exports.TraceContextMetaSchema = _chunkOBPHU4RTjs.TraceContextMetaSchema; exports.TransportDirection = TransportDirection; exports.TunnelConnection = _chunkOBPHU4RTjs.TunnelConnection; exports.UpdateSessionSettingsRequestParamsSchema = _chunkOBPHU4RTjs.UpdateSessionSettingsRequestParamsSchema; exports.UpdateSessionSettingsRequestSchema = _chunkOBPHU4RTjs.UpdateSessionSettingsRequestSchema; exports.UpdateSessionSettingsResponseSchema = _chunkOBPHU4RTjs.UpdateSessionSettingsResponseSchema; exports.UpdateSessionSettingsResultSchema = _chunkOBPHU4RTjs.UpdateSessionSettingsResultSchema; exports.VerificationCommandSchema = _chunkOBPHU4RTjs.VerificationCommandSchema; exports.VerificationSchema = _chunkOBPHU4RTjs.VerificationSchema; exports.WINDOWS_JOB_OBJECT_ERROR_MARKER = WINDOWS_JOB_OBJECT_ERROR_MARKER; exports.WebSocketConnectionError = _chunkOBPHU4RTjs.WebSocketConnectionError; exports.WebSocketDaemonTransport = _chunkOBPHU4RTjs.WebSocketDaemonTransport; exports.WorkerCompletedEntrySchema = _chunkOBPHU4RTjs.WorkerCompletedEntrySchema; exports.WorkerFailedEntrySchema = _chunkOBPHU4RTjs.WorkerFailedEntrySchema; exports.WorkerPausedEntrySchema = _chunkOBPHU4RTjs.WorkerPausedEntrySchema; exports.WorkerSelectedFeatureEntrySchema = _chunkOBPHU4RTjs.WorkerSelectedFeatureEntrySchema; exports.WorkerStartedEntrySchema = _chunkOBPHU4RTjs.WorkerStartedEntrySchema; exports.WorkerStateInfoSchema = _chunkOBPHU4RTjs.WorkerStateInfoSchema; exports.__resetTransportLoggerForTests = __resetTransportLoggerForTests; exports.appendContextSession = _chunkOBPHU4RTjs.appendContextSession; exports.buildUserMessageContentBlocks = _chunkOBPHU4RTjs.buildUserMessageContentBlocks; exports.configureDaemonCoreDeps = _chunkOBPHU4RTjs.configureDaemonCoreDeps; exports.connectAndAuthenticate = _chunkOBPHU4RTjs.connectAndAuthenticate; exports.connectToDaemon = _chunkOBPHU4RTjs.connectToDaemon; exports.connectWithRetry = _chunkOBPHU4RTjs.connectWithRetry; exports.convertNotificationToStreamMessage = _chunkOBPHU4RTjs.convertNotificationToStreamMessage; exports.createComputer = _chunkOBPHU4RTjs.createComputer; exports.createContextDocument = _chunkOBPHU4RTjs.createContextDocument; exports.createContextFile = _chunkOBPHU4RTjs.createContextFile; exports.createContextSpace = _chunkOBPHU4RTjs.createContextSpace; exports.createResponseSchema = _chunkOBPHU4RTjs.createResponseSchema; exports.createSdkMcpServer = createSdkMcpServer; exports.createSession = createSession; exports.createWebSocketDaemonClient = _chunkOBPHU4RTjs.createWebSocketDaemonClient; exports.defaultDaemonCoreDeps = _chunkOBPHU4RTjs.defaultDaemonCoreDeps; exports.deleteComputer = _chunkOBPHU4RTjs.deleteComputer; exports.deleteContextDocument = _chunkOBPHU4RTjs.deleteContextDocument; exports.deleteContextFile = _chunkOBPHU4RTjs.deleteContextFile; exports.filterMessagesForUI = _chunkOBPHU4RTjs.filterMessagesForUI; exports.getComputer = _chunkOBPHU4RTjs.getComputer; exports.getComputerByName = _chunkOBPHU4RTjs.getComputerByName; exports.getComputerMetrics = _chunkOBPHU4RTjs.getComputerMetrics; exports.getContextDocument = _chunkOBPHU4RTjs.getContextDocument; exports.getContextDocumentByPath = _chunkOBPHU4RTjs.getContextDocumentByPath; exports.getContextSession = _chunkOBPHU4RTjs.getContextSession; exports.getContextSpace = _chunkOBPHU4RTjs.getContextSpace; exports.getMachineTemplate = _chunkOBPHU4RTjs.getMachineTemplate; exports.getPermissionToolInputForDisplay = _chunkOBPHU4RTjs.getPermissionToolInputForDisplay; exports.getQueuedUserMessageDisplayGroup = _chunkOBPHU4RTjs.getQueuedUserMessageDisplayGroup; exports.getQueuedUserMessageReviewPriority = _chunkOBPHU4RTjs.getQueuedUserMessageReviewPriority; exports.getSubagentCallingMetadata = _chunkOBPHU4RTjs.getSubagentCallingMetadata; exports.getToolResultBlocks = _chunkOBPHU4RTjs.getToolResultBlocks; exports.getToolResultToolUseId = _chunkOBPHU4RTjs.getToolResultToolUseId; exports.hasDecoupledInteractionSettings = _chunkOBPHU4RTjs.hasDecoupledInteractionSettings; exports.hasSubagentSessionTag = _chunkOBPHU4RTjs.hasSubagentSessionTag; exports.inspectJsonRpcEnvelope = _chunkOBPHU4RTjs.inspectJsonRpcEnvelope; exports.isDaemonQueuedMessageKind = _chunkOBPHU4RTjs.isDaemonQueuedMessageKind; exports.isPendingToolResultMarker = _chunkOBPHU4RTjs.isPendingToolResultMarker; exports.isPersistedHookMessage = _chunkOBPHU4RTjs.isPersistedHookMessage; exports.isReviewableQueuedMessageKind = _chunkOBPHU4RTjs.isReviewableQueuedMessageKind; exports.isTransportLoggingEnabled = isTransportLoggingEnabled; exports.listComputers = _chunkOBPHU4RTjs.listComputers; exports.listContextDocuments = _chunkOBPHU4RTjs.listContextDocuments; exports.listContextSessions = _chunkOBPHU4RTjs.listContextSessions; exports.listContextSpaces = _chunkOBPHU4RTjs.listContextSpaces; exports.listMachineTemplates = _chunkOBPHU4RTjs.listMachineTemplates; exports.listModels = listModels; exports.listRemoteSessions = _chunkOBPHU4RTjs.listRemoteSessions; exports.listSessions = listSessions; exports.logTransportMessage = logTransportMessage; exports.machineTypeToMachineConnectionType = _chunkOBPHU4RTjs.machineTypeToMachineConnectionType; exports.noopLogger = noopLogger; exports.readContextFilePart = _chunkOBPHU4RTjs.readContextFilePart; exports.readContextSessionRecords = _chunkOBPHU4RTjs.readContextSessionRecords; exports.recordComputerConnectSli = _chunkOBPHU4RTjs.recordComputerConnectSli; exports.refreshComputer = _chunkOBPHU4RTjs.refreshComputer; exports.registerContextSession = _chunkOBPHU4RTjs.registerContextSession; exports.resolveExecCoreDeps = resolveExecCoreDeps; exports.restartComputer = _chunkOBPHU4RTjs.restartComputer; exports.resumeSession = resumeSession; exports.retryInstallDeps = _chunkOBPHU4RTjs.retryInstallDeps; exports.retryWithLogger = _chunkOBPHU4RTjs.retryWithLogger; exports.run = run; exports.spawnWithWindowsJobObjectRetry = spawnWithWindowsJobObjectRetry; exports.sumTokenUsage = _chunkOBPHU4RTjs.sumTokenUsage; exports.summarizeSessionToolUsage = _chunkOBPHU4RTjs.summarizeSessionToolUsage; exports.toError = _chunkOBPHU4RTjs.toError; exports.tool = tool; exports.updateComputer = _chunkOBPHU4RTjs.updateComputer; exports.updateContextDocument = _chunkOBPHU4RTjs.updateContextDocument; exports.uploadContextFilePart = _chunkOBPHU4RTjs.uploadContextFilePart; exports.withJsonRpcCodec = withJsonRpcCodec;
|
|
5988
|
+
|
|
5989
|
+
|
|
5990
|
+
|
|
5991
|
+
|
|
5992
|
+
|
|
5993
|
+
|
|
5994
|
+
|
|
5995
|
+
|
|
5996
|
+
|
|
5997
|
+
|
|
5998
|
+
|
|
5999
|
+
|
|
6000
|
+
exports.AbortError = _chunkKAAWCHO4js.AbortError; exports.AddMcpServerRequestParamsSchema = _chunkKAAWCHO4js.AddMcpServerRequestParamsSchema; exports.AddMcpServerRequestSchema = _chunkKAAWCHO4js.AddMcpServerRequestSchema; exports.AddMcpServerResponseSchema = _chunkKAAWCHO4js.AddMcpServerResponseSchema; exports.AddMcpServerResultSchema = _chunkKAAWCHO4js.AddMcpServerResultSchema; exports.AddUserMessageRequestParamsSchema = _chunkKAAWCHO4js.AddUserMessageRequestParamsSchema; exports.AddUserMessageRequestSchema = _chunkKAAWCHO4js.AddUserMessageRequestSchema; exports.AddUserMessageResponseSchema = _chunkKAAWCHO4js.AddUserMessageResponseSchema; exports.AddUserMessageResultSchema = _chunkKAAWCHO4js.AddUserMessageResultSchema; exports.AnswerSessionElicitationResponseSchema = _chunkKAAWCHO4js.AnswerSessionElicitationResponseSchema; exports.ApplyPatchToolConfirmationDetailsSchema = _chunkKAAWCHO4js.ApplyPatchToolConfirmationDetailsSchema; exports.AskUserCollectedAnswerSchema = _chunkKAAWCHO4js.AskUserCollectedAnswerSchema; exports.AskUserConfirmationDetailsSchema = _chunkKAAWCHO4js.AskUserConfirmationDetailsSchema; exports.AskUserQuestionSchema = _chunkKAAWCHO4js.AskUserQuestionSchema; exports.AskUserRequestParamsSchema = _chunkKAAWCHO4js.AskUserRequestParamsSchema; exports.AskUserRequestSchema = _chunkKAAWCHO4js.AskUserRequestSchema; exports.AskUserResponseSchema = _chunkKAAWCHO4js.AskUserResponseSchema; exports.AskUserResultSchema = _chunkKAAWCHO4js.AskUserResultSchema; exports.AssistantMessageRetractedNotificationSchema = _chunkKAAWCHO4js.AssistantMessageRetractedNotificationSchema; exports.AssistantTextCompleteNotificationSchema = _chunkKAAWCHO4js.AssistantTextCompleteNotificationSchema; exports.AssistantTextDeltaNotificationSchema = _chunkKAAWCHO4js.AssistantTextDeltaNotificationSchema; exports.AuthenticateMcpServerRequestParamsSchema = _chunkKAAWCHO4js.AuthenticateMcpServerRequestParamsSchema; exports.AuthenticateMcpServerRequestSchema = _chunkKAAWCHO4js.AuthenticateMcpServerRequestSchema; exports.AuthenticateMcpServerResponseSchema = _chunkKAAWCHO4js.AuthenticateMcpServerResponseSchema; exports.AuthenticateMcpServerResultSchema = _chunkKAAWCHO4js.AuthenticateMcpServerResultSchema; exports.AutonomyLevel = _chunkKAAWCHO4js.AutonomyLevel; exports.AvailableModelConfigSchema = _chunkKAAWCHO4js.AvailableModelConfigSchema; exports.Base64ImageSourceSchema = _chunkKAAWCHO4js.Base64ImageSourceSchema; exports.BaseNotificationSchema = _chunkKAAWCHO4js.BaseNotificationSchema; exports.BaseRequestSchema = _chunkKAAWCHO4js.BaseRequestSchema; exports.BaseResponseFailureSchema = _chunkKAAWCHO4js.BaseResponseFailureSchema; exports.BaseResponseSuccessSchema = _chunkKAAWCHO4js.BaseResponseSuccessSchema; exports.CLI_JSONRPC_CHILD_SPAWN_LATENCY_METRIC = CLI_JSONRPC_CHILD_SPAWN_LATENCY_METRIC; exports.COMPACTION_TIMEOUT = _chunkKAAWCHO4js.COMPACTION_TIMEOUT; exports.CancelMcpAuthRequestParamsSchema = _chunkKAAWCHO4js.CancelMcpAuthRequestParamsSchema; exports.CancelMcpAuthRequestSchema = _chunkKAAWCHO4js.CancelMcpAuthRequestSchema; exports.CancelMcpAuthResponseSchema = _chunkKAAWCHO4js.CancelMcpAuthResponseSchema; exports.CancelMcpAuthResultSchema = _chunkKAAWCHO4js.CancelMcpAuthResultSchema; exports.ChangeWorkingDirectoryRequestParamsSchema = _chunkKAAWCHO4js.ChangeWorkingDirectoryRequestParamsSchema; exports.ChangeWorkingDirectoryRequestSchema = _chunkKAAWCHO4js.ChangeWorkingDirectoryRequestSchema; exports.ChangeWorkingDirectoryResponseSchema = _chunkKAAWCHO4js.ChangeWorkingDirectoryResponseSchema; exports.ChangeWorkingDirectoryResultSchema = _chunkKAAWCHO4js.ChangeWorkingDirectoryResultSchema; exports.ClearMcpAuthRequestParamsSchema = _chunkKAAWCHO4js.ClearMcpAuthRequestParamsSchema; exports.ClearMcpAuthRequestSchema = _chunkKAAWCHO4js.ClearMcpAuthRequestSchema; exports.ClearMcpAuthResponseSchema = _chunkKAAWCHO4js.ClearMcpAuthResponseSchema; exports.ClearMcpAuthResultSchema = _chunkKAAWCHO4js.ClearMcpAuthResultSchema; exports.CliRequestOrNotificationSchema = _chunkKAAWCHO4js.CliRequestOrNotificationSchema; exports.ClientDestroyedError = _chunkKAAWCHO4js.ClientDestroyedError; exports.ClientRequestSchema = _chunkKAAWCHO4js.ClientRequestSchema; exports.ClientUiSurface = _chunkKAAWCHO4js.ClientUiSurface; exports.CloseSessionRequestParamsSchema = _chunkKAAWCHO4js.CloseSessionRequestParamsSchema; exports.CloseSessionRequestSchema = _chunkKAAWCHO4js.CloseSessionRequestSchema; exports.CloseSessionResponseSchema = _chunkKAAWCHO4js.CloseSessionResponseSchema; exports.CloseSessionResultSchema = _chunkKAAWCHO4js.CloseSessionResultSchema; exports.CompactSessionRequestParamsSchema = _chunkKAAWCHO4js.CompactSessionRequestParamsSchema; exports.CompactSessionRequestSchema = _chunkKAAWCHO4js.CompactSessionRequestSchema; exports.CompactSessionResponseSchema = _chunkKAAWCHO4js.CompactSessionResponseSchema; exports.CompactSessionResultSchema = _chunkKAAWCHO4js.CompactSessionResultSchema; exports.ComputeLimitExceededError = _chunkKAAWCHO4js.ComputeLimitExceededError; exports.ComputerConnectAttemptTrigger = _chunkKAAWCHO4js.ComputerConnectAttemptTrigger; exports.ComputerConnectStartType = _chunkKAAWCHO4js.ComputerConnectStartType; exports.ComputerListResponseSchema = _chunkKAAWCHO4js.ComputerListResponseSchema; exports.ComputerMetricSchema = _chunkKAAWCHO4js.ComputerMetricSchema; exports.ComputerMetricsResponseSchema = _chunkKAAWCHO4js.ComputerMetricsResponseSchema; exports.ComputerSchema = _chunkKAAWCHO4js.ComputerSchema; exports.ConcurrentStreamError = _chunkKAAWCHO4js.ConcurrentStreamError; exports.ConnectionClosedError = _chunkKAAWCHO4js.ConnectionClosedError; exports.ConnectionError = _chunkKAAWCHO4js.ConnectionError; exports.ConnectionFailureReason = _chunkKAAWCHO4js.ConnectionFailureReason; exports.ContentBlockSchema = _chunkKAAWCHO4js.ContentBlockSchema; exports.ContextApiError = _chunkKAAWCHO4js.ContextApiError; exports.ContextBreakdownCategorySchema = _chunkKAAWCHO4js.ContextBreakdownCategorySchema; exports.ContextBreakdownResultSchema = _chunkKAAWCHO4js.GetContextBreakdownResultSchema; exports.ContextStatsAccuracy = _chunkKAAWCHO4js.ContextStatsAccuracy; exports.ContextStatsSchema = _chunkKAAWCHO4js.ContextStatsSchema; exports.CreateMessageNotificationSchema = _chunkKAAWCHO4js.CreateMessageNotificationSchema; exports.CreateToolConfirmationDetailsSchema = _chunkKAAWCHO4js.CreateToolConfirmationDetailsSchema; exports.DEFAULT_LOCAL_DAEMON_WS_URL = _chunkKAAWCHO4js.DEFAULT_LOCAL_DAEMON_WS_URL; exports.DEFAULT_REQUEST_TIMEOUT = _chunkKAAWCHO4js.DEFAULT_REQUEST_TIMEOUT; exports.DaemonAuthenticationMode = _chunkKAAWCHO4js.DaemonAuthenticationMode; exports.DaemonClient = _chunkKAAWCHO4js.DaemonClient; exports.DaemonClientMetaError = _chunkKAAWCHO4js.MetaError; exports.DaemonDroidEvent = _chunkKAAWCHO4js.DaemonDroidEvent; exports.DaemonRequestPermissionSchema = _chunkKAAWCHO4js.DaemonRequestPermissionSchema; exports.DaemonSessionController = _chunkKAAWCHO4js.DaemonSessionController; exports.DecompSessionType = _chunkKAAWCHO4js.DecompSessionType; exports.DiscoveredIssueSchema = _chunkKAAWCHO4js.DiscoveredIssueSchema; exports.DismissalRecordSchema = _chunkKAAWCHO4js.DismissalRecordSchema; exports.DismissalType = _chunkKAAWCHO4js.DismissalType; exports.DocumentBlockSchema = _chunkKAAWCHO4js.DocumentBlockSchema; exports.DocumentSourceSchema = _chunkKAAWCHO4js.DocumentSourceSchema; exports.DroidClient = DroidClient; exports.DroidClientError = _chunkKAAWCHO4js.DroidClientError; exports.DroidClientEvent = DroidClientEvent; exports.DroidClientMethod = _chunkKAAWCHO4js.DroidClientMethod; exports.DroidConnectionEndedError = _chunkKAAWCHO4js.DroidConnectionEndedError; exports.DroidErrorType = _chunkKAAWCHO4js.DroidErrorType; exports.DroidEvent = _chunkKAAWCHO4js.DroidEvent; exports.DroidHookEventSchema = _chunkKAAWCHO4js.DroidHookEventSchema; exports.DroidHookExecutionResultSchema = _chunkKAAWCHO4js.DroidHookExecutionResultSchema; exports.DroidHookOutputSchema = _chunkKAAWCHO4js.DroidHookOutputSchema; exports.DroidHookSpecificOutputSchema = _chunkKAAWCHO4js.DroidHookSpecificOutputSchema; exports.DroidInteractionMode = _chunkKAAWCHO4js.DroidInteractionMode; exports.DroidMessageType = _chunkKAAWCHO4js.DroidMessageType; exports.DroidProcessManager = DroidProcessManager; exports.DroidProcessMode = DroidProcessMode; exports.DroidServerMethod = _chunkKAAWCHO4js.DroidServerMethod; exports.DroidSession = DroidSession; exports.DroidWorkingState = _chunkKAAWCHO4js.DroidWorkingState; exports.DroidWorkingStateChangedNotificationSchema = _chunkKAAWCHO4js.DroidWorkingStateChangedNotificationSchema; exports.EditToolConfirmationDetailsSchema = _chunkKAAWCHO4js.EditToolConfirmationDetailsSchema; exports.EmptyResultSchema = _chunkKAAWCHO4js.EmptyResultSchema; exports.EnvironmentListResponseSchema = _chunkKAAWCHO4js.EnvironmentListResponseSchema; exports.EnvironmentSchema = _chunkKAAWCHO4js.EnvironmentSchema; exports.ErrorDetailSchema = _chunkKAAWCHO4js.ErrorDetailSchema; exports.ErrorNotificationSchema = _chunkKAAWCHO4js.ErrorNotificationSchema; exports.ExecToolInfoSchema = _chunkKAAWCHO4js.ExecToolInfoSchema; exports.ExecToolInfoWithSchemasSchema = _chunkKAAWCHO4js.ExecToolInfoWithSchemasSchema; exports.ExecuteRewindRequestParamsSchema = _chunkKAAWCHO4js.ExecuteRewindRequestParamsSchema; exports.ExecuteRewindRequestSchema = _chunkKAAWCHO4js.ExecuteRewindRequestSchema; exports.ExecuteRewindResponseSchema = _chunkKAAWCHO4js.ExecuteRewindResponseSchema; exports.ExecuteRewindResultSchema = _chunkKAAWCHO4js.ExecuteRewindResultSchema; exports.ExecuteToolConfirmationDetailsSchema = _chunkKAAWCHO4js.ExecuteToolConfirmationDetailsSchema; exports.ExitSpecModeConfirmationDetailsSchema = _chunkKAAWCHO4js.ExitSpecModeConfirmationDetailsSchema; exports.FACTORY_CLIENT_HEADER = _chunkKAAWCHO4js.FACTORY_CLIENT_HEADER; exports.FACTORY_CLIENT_VERSION = _chunkKAAWCHO4js.FACTORY_CLIENT_VERSION; exports.FACTORY_PROTOCOL_VERSION = _chunkKAAWCHO4js.FACTORY_PROTOCOL_VERSION; exports.FactoryDaemonTransport = _chunkKAAWCHO4js.FactoryDaemonTransport; exports.FactoryDroidMessageRole = _chunkKAAWCHO4js.FactoryDroidMessageRole; exports.FactoryDroidMessageSchema = _chunkKAAWCHO4js.FactoryDroidMessageSchema; exports.FeatureStatus = _chunkKAAWCHO4js.FeatureStatus; exports.FeatureSuccessState = _chunkKAAWCHO4js.FeatureSuccessState; exports.FeatureSuccessStateSchema = _chunkKAAWCHO4js.FeatureSuccessStateSchema; exports.ForkSessionRequestParamsSchema = _chunkKAAWCHO4js.ForkSessionRequestParamsSchema; exports.ForkSessionRequestSchema = _chunkKAAWCHO4js.ForkSessionRequestSchema; exports.ForkSessionResponseSchema = _chunkKAAWCHO4js.ForkSessionResponseSchema; exports.ForkSessionResultSchema = _chunkKAAWCHO4js.ForkSessionResultSchema; exports.GetContextStatsRequestParamsSchema = _chunkKAAWCHO4js.GetContextStatsRequestParamsSchema; exports.GetContextStatsRequestSchema = _chunkKAAWCHO4js.GetContextStatsRequestSchema; exports.GetContextStatsResponseSchema = _chunkKAAWCHO4js.GetContextStatsResponseSchema; exports.GetContextStatsResultSchema = _chunkKAAWCHO4js.ContextStatsSchema; exports.GetRewindInfoRequestParamsSchema = _chunkKAAWCHO4js.GetRewindInfoRequestParamsSchema; exports.GetRewindInfoRequestSchema = _chunkKAAWCHO4js.GetRewindInfoRequestSchema; exports.GetRewindInfoResponseSchema = _chunkKAAWCHO4js.GetRewindInfoResponseSchema; exports.GetRewindInfoResultSchema = _chunkKAAWCHO4js.GetRewindInfoResultSchema; exports.GitRepoInfoSchema = _chunkKAAWCHO4js.GitRepoInfoSchema; exports.HandoffItemsDismissedEntrySchema = _chunkKAAWCHO4js.HandoffItemsDismissedEntrySchema; exports.HandoffSchema = _chunkKAAWCHO4js.HandoffSchema; exports.HookCommandSchema = _chunkKAAWCHO4js.HookCommandSchema; exports.HookExecutionCompletedNotificationSchema = _chunkKAAWCHO4js.HookExecutionCompletedNotificationSchema; exports.HookExecutionStartedNotificationSchema = _chunkKAAWCHO4js.HookExecutionStartedNotificationSchema; exports.HookResultSchema = _chunkKAAWCHO4js.HookResultSchema; exports.HttpHeaderSchema = _chunkKAAWCHO4js.HttpHeaderSchema; exports.HttpMcpConfigSchema = _chunkKAAWCHO4js.HttpMcpSchema; exports.IPC_DAEMON_URL = _chunkKAAWCHO4js.IPC_DAEMON_URL; exports.ImageBlockSchema = _chunkKAAWCHO4js.ImageBlockSchema; exports.InProcessDaemonClientTransport = _chunkKAAWCHO4js.InProcessDaemonClientTransport; exports.InitializeSessionRequestParamsSchema = _chunkKAAWCHO4js.InitializeSessionRequestParamsSchema; exports.InitializeSessionRequestSchema = _chunkKAAWCHO4js.InitializeSessionRequestSchema; exports.InitializeSessionResponseSchema = _chunkKAAWCHO4js.InitializeSessionResponseSchema; exports.InitializeSessionResultSchema = _chunkKAAWCHO4js.InitializeSessionResultSchema2; exports.InteractiveCheckSchema = _chunkKAAWCHO4js.InteractiveCheckSchema; exports.InterruptSessionRequestParamsSchema = _chunkKAAWCHO4js.InterruptSessionRequestParamsSchema; exports.InterruptSessionRequestSchema = _chunkKAAWCHO4js.InterruptSessionRequestSchema; exports.InterruptSessionResponseSchema = _chunkKAAWCHO4js.InterruptSessionResponseSchema; exports.InterruptSessionResultSchema = _chunkKAAWCHO4js.InterruptSessionResultSchema; exports.InvalidSessionCwdError = _chunkKAAWCHO4js.InvalidSessionCwdError; exports.IpcDaemonClientTransport = _chunkKAAWCHO4js.IpcDaemonClientTransport; exports.IssueSeverity = _chunkKAAWCHO4js.IssueSeverity; exports.JSONRPC_VERSION = _chunkKAAWCHO4js.JSONRPC_VERSION; exports.JsonArraySchema = _chunkKAAWCHO4js.JsonArraySchema; exports.JsonObjectSchema = _chunkKAAWCHO4js.JsonObjectSchema; exports.JsonRpcEnvelopeSchema = _chunkKAAWCHO4js.JsonRpcEnvelopeSchema; exports.JsonRpcErrorCode = _chunkKAAWCHO4js.JsonRpcErrorCode; exports.JsonRpcErrorSchema = _chunkKAAWCHO4js.JsonRpcErrorSchema; exports.JsonRpcMessageSchema = _chunkKAAWCHO4js.JsonRpcMessageSchema; exports.JsonRpcMessageType = _chunkKAAWCHO4js.JsonRpcMessageType; exports.JsonRpcNotificationSchema = _chunkKAAWCHO4js.JsonRpcNotificationSchema; exports.JsonRpcRequestError = _chunkKAAWCHO4js.JsonRpcRequestError; exports.JsonRpcRequestSchema = _chunkKAAWCHO4js.JsonRpcRequestSchema; exports.JsonRpcResponseFailureSchema = _chunkKAAWCHO4js.JsonRpcResponseFailureSchema; exports.JsonRpcResponseSchema = _chunkKAAWCHO4js.JsonRpcResponseSchema; exports.JsonRpcResponseSuccessSchema = _chunkKAAWCHO4js.JsonRpcResponseSuccessSchema; exports.JsonValueSchema = _chunkKAAWCHO4js.JsonValueSchema; exports.KillWorkerSessionRequestParamsSchema = _chunkKAAWCHO4js.KillWorkerSessionRequestParamsSchema; exports.KillWorkerSessionRequestSchema = _chunkKAAWCHO4js.KillWorkerSessionRequestSchema; exports.KillWorkerSessionResponseSchema = _chunkKAAWCHO4js.KillWorkerSessionResponseSchema; exports.KillWorkerSessionResultSchema = _chunkKAAWCHO4js.KillWorkerSessionResultSchema; exports.LEGACY_FACTORY_API_VERSION = _chunkKAAWCHO4js.LEGACY_FACTORY_API_VERSION; exports.LOCAL_MACHINE_ID = _chunkKAAWCHO4js.LOCAL_MACHINE_ID; exports.ListMcpRegistryRequestParamsSchema = _chunkKAAWCHO4js.ListMcpRegistryRequestParamsSchema; exports.ListMcpRegistryRequestSchema = _chunkKAAWCHO4js.ListMcpRegistryRequestSchema; exports.ListMcpRegistryResponseSchema = _chunkKAAWCHO4js.ListMcpRegistryResponseSchema; exports.ListMcpRegistryResultSchema = _chunkKAAWCHO4js.ListMcpRegistryResultSchema; exports.ListMcpServersRequestParamsSchema = _chunkKAAWCHO4js.ListMcpServersRequestParamsSchema; exports.ListMcpServersRequestSchema = _chunkKAAWCHO4js.ListMcpServersRequestSchema; exports.ListMcpServersResponseSchema = _chunkKAAWCHO4js.ListMcpServersResponseSchema; exports.ListMcpServersResultSchema = _chunkKAAWCHO4js.ListMcpServersResultSchema; exports.ListMcpToolsRequestParamsSchema = _chunkKAAWCHO4js.ListMcpToolsRequestParamsSchema; exports.ListMcpToolsRequestSchema = _chunkKAAWCHO4js.ListMcpToolsRequestSchema; exports.ListMcpToolsResponseSchema = _chunkKAAWCHO4js.ListMcpToolsResponseSchema; exports.ListMcpToolsResultSchema = _chunkKAAWCHO4js.ListMcpToolsResultSchema; exports.ListModelsOptionsSchema = _chunkKAAWCHO4js.ListModelsOptionsSchema; exports.ListModelsResultSchema = _chunkKAAWCHO4js.ListModelsResultSchema; exports.ListSessionElicitationsResponseSchema = _chunkKAAWCHO4js.ListSessionElicitationsResponseSchema; exports.ListSkillsRequestParamsSchema = _chunkKAAWCHO4js.ListSkillsRequestParamsSchema; exports.ListSkillsRequestSchema = _chunkKAAWCHO4js.ListSkillsRequestSchema; exports.ListSkillsResponseSchema = _chunkKAAWCHO4js.ListSkillsResponseSchema; exports.ListSkillsResultSchema = _chunkKAAWCHO4js.ListSkillsResultSchema; exports.ListToolsRequestParamsSchema = _chunkKAAWCHO4js.ListToolsRequestParamsSchema; exports.ListToolsRequestSchema = _chunkKAAWCHO4js.ListToolsRequestSchema; exports.ListToolsResponseSchema = _chunkKAAWCHO4js.ListToolsResponseSchema; exports.ListToolsResponseWithSchemasSchema = _chunkKAAWCHO4js.ListToolsResponseWithSchemasSchema; exports.ListToolsResultSchema = _chunkKAAWCHO4js.ListToolsResultSchema; exports.ListToolsResultWithSchemasSchema = _chunkKAAWCHO4js.ListToolsResultWithSchemasSchema; exports.LoadSessionRequestParamsSchema = _chunkKAAWCHO4js.LoadSessionRequestParamsSchema; exports.LoadSessionRequestSchema = _chunkKAAWCHO4js.LoadSessionRequestSchema; exports.LoadSessionResponseSchema = _chunkKAAWCHO4js.LoadSessionResponseSchema; exports.LoadSessionResultSchema = _chunkKAAWCHO4js.LoadSessionResultSchema; exports.MACHINE_TYPE_WEBSOCKET_OVERRIDES = _chunkKAAWCHO4js.MACHINE_TYPE_WEBSOCKET_OVERRIDES; exports.MANAGED_COMPUTER_MAX_RETRIES = _chunkKAAWCHO4js.MANAGED_COMPUTER_MAX_RETRIES; exports.MCP_AUTH_TIMEOUT = _chunkKAAWCHO4js.MCP_AUTH_TIMEOUT; exports.MachineTemplateBuildStatusSchema = _chunkKAAWCHO4js.MachineTemplateBuildStatusSchema; exports.MachineTemplateListResponseSchema = _chunkKAAWCHO4js.MachineTemplateListResponseSchema; exports.MachineTemplateSchema = _chunkKAAWCHO4js.MachineTemplateSchema; exports.MachineType = _chunkKAAWCHO4js.MachineType; exports.ManagedProcessImpl = ManagedProcessImpl; exports.McpAuthCompletedNotificationSchema = _chunkKAAWCHO4js.McpAuthCompletedNotificationSchema; exports.McpAuthOutcome = _chunkKAAWCHO4js.McpAuthOutcome; exports.McpAuthRequiredNotificationSchema = _chunkKAAWCHO4js.McpAuthRequiredNotificationSchema; exports.McpHttpServerConfigFieldsSchema = _chunkKAAWCHO4js.McpHttpServerConfigFieldsSchema; exports.McpRegistryServerSchema = _chunkKAAWCHO4js.McpRegistryServerSchema; exports.McpServerConfigSchema = _chunkKAAWCHO4js.McpServerConfigSchema; exports.McpServerStatus = _chunkKAAWCHO4js.McpServerStatus; exports.McpServerStatusInfoSchema = _chunkKAAWCHO4js.McpServerStatusInfoSchema; exports.McpServerType = _chunkKAAWCHO4js.McpServerType; exports.McpSseServerConfigFieldsSchema = _chunkKAAWCHO4js.McpSseServerConfigFieldsSchema; exports.McpStatus = _chunkKAAWCHO4js.McpStatus; exports.McpStatusChangedNotificationSchema = _chunkKAAWCHO4js.McpStatusChangedNotificationSchema; exports.McpStatusSummarySchema = _chunkKAAWCHO4js.McpStatusSummarySchema; exports.McpStdioServerConfigFieldsSchema = _chunkKAAWCHO4js.McpStdioServerConfigFieldsSchema; exports.McpToolConfirmationDetailsSchema = _chunkKAAWCHO4js.McpToolConfirmationDetailsSchema; exports.McpToolInfoSchema = _chunkKAAWCHO4js.McpToolInfoSchema; exports.McpToolInputSchemaSchema = _chunkKAAWCHO4js.McpToolInputSchemaSchema; exports.MessageVisibility = _chunkKAAWCHO4js.MessageVisibility; exports.Metric = _chunkKAAWCHO4js.Metric; exports.MilestoneValidationTriggeredEntrySchema = _chunkKAAWCHO4js.MilestoneValidationTriggeredEntrySchema; exports.MissionAcceptedEntrySchema = _chunkKAAWCHO4js.MissionAcceptedEntrySchema; exports.MissionFeatureSchema = _chunkKAAWCHO4js.MissionFeatureSchema; exports.MissionFeaturesChangedNotificationSchema = _chunkKAAWCHO4js.MissionFeaturesChangedNotificationSchema; exports.MissionHeartbeatNotificationSchema = _chunkKAAWCHO4js.MissionHeartbeatNotificationSchema; exports.MissionPausedEntrySchema = _chunkKAAWCHO4js.MissionPausedEntrySchema; exports.MissionProgressEntryNotificationSchema = _chunkKAAWCHO4js.MissionProgressEntryNotificationSchema; exports.MissionResumedEntrySchema = _chunkKAAWCHO4js.MissionResumedEntrySchema; exports.MissionRunStartedEntrySchema = _chunkKAAWCHO4js.MissionRunStartedEntrySchema; exports.MissionSnapshotSchema = _chunkKAAWCHO4js.MissionStateSchema; exports.MissionState = _chunkKAAWCHO4js.MissionState; exports.MissionStateChangedNotificationSchema = _chunkKAAWCHO4js.MissionStateChangedNotificationSchema; exports.MissionWorkerCompletedNotificationSchema = _chunkKAAWCHO4js.MissionWorkerCompletedNotificationSchema; exports.MissionWorkerStartedNotificationSchema = _chunkKAAWCHO4js.MissionWorkerStartedNotificationSchema; exports.ModelInfoSchema = _chunkKAAWCHO4js.ModelInfoSchema; exports.ModelMetadataSchema = _chunkKAAWCHO4js.ModelMetadataSchema; exports.ModelProvider = _chunkKAAWCHO4js.ModelProvider; exports.MultiMissionStateManager = _chunkKAAWCHO4js.MultiMissionStateManager; exports.MultiSessionStateManager = _chunkKAAWCHO4js.MultiSessionStateManager; exports.OtelTracing = _chunkKAAWCHO4js.OtelTracing; exports.OutputFormatSchema = _chunkKAAWCHO4js.OutputFormatSchema; exports.OutputFormatType = _chunkKAAWCHO4js.OutputFormatType; exports.PermissionResolvedNotificationSchema = _chunkKAAWCHO4js.PermissionResolvedNotificationSchema; exports.PickOptionsRequestParamsSchema = _chunkKAAWCHO4js.PickOptionsRequestParamsSchema; exports.PickOptionsRequestSchema = _chunkKAAWCHO4js.PickOptionsRequestSchema; exports.PickOptionsResponseSchema = _chunkKAAWCHO4js.PickOptionsResponseSchema; exports.PickOptionsResultSchema = _chunkKAAWCHO4js.PickOptionsResultSchema; exports.PickOptionsRowSchema = _chunkKAAWCHO4js.PickOptionsRowSchema; exports.PickOptionsUnavailableError = _chunkKAAWCHO4js.PickOptionsUnavailableError; exports.ProcessExitError = _chunkKAAWCHO4js.ProcessExitError; exports.ProcessTransport = ProcessTransport; exports.ProgressLogEntrySchema = _chunkKAAWCHO4js.ProgressLogEntrySchema; exports.ProgressLogEntryType = _chunkKAAWCHO4js.ProgressLogEntryType; exports.ProposeMissionConfirmationDetailsSchema = _chunkKAAWCHO4js.ProposeMissionConfirmationDetailsSchema; exports.ProtocolError = _chunkKAAWCHO4js.ProtocolError; exports.QueuedUserMessageDisplayGroup = _chunkKAAWCHO4js.QueuedUserMessageDisplayGroup; exports.QueuedUserMessageKind = _chunkKAAWCHO4js.QueuedUserMessageKind; exports.REWIND_TIMEOUT = _chunkKAAWCHO4js.REWIND_TIMEOUT; exports.ReasoningEffort = _chunkKAAWCHO4js.ReasoningEffort; exports.RedactedThinkingBlockSchema = _chunkKAAWCHO4js.RedactedThinkingBlockSchema; exports.RefreshComputerResponseSchema = _chunkKAAWCHO4js.RefreshComputerResponseSchema; exports.RelayConnectionError = _chunkKAAWCHO4js.RelayConnectionError; exports.RemoteSessionListResponseSchema = _chunkKAAWCHO4js.RemoteSessionListResponseSchema; exports.RemoteSessionSchema = _chunkKAAWCHO4js.RemoteSessionSchema; exports.RemoveMcpServerRequestParamsSchema = _chunkKAAWCHO4js.RemoveMcpServerRequestParamsSchema; exports.RemoveMcpServerRequestSchema = _chunkKAAWCHO4js.RemoveMcpServerRequestSchema; exports.RemoveMcpServerResponseSchema = _chunkKAAWCHO4js.RemoveMcpServerResponseSchema; exports.RemoveMcpServerResultSchema = _chunkKAAWCHO4js.RemoveMcpServerResultSchema; exports.RenameSessionRequestParamsSchema = _chunkKAAWCHO4js.RenameSessionRequestParamsSchema; exports.RenameSessionRequestSchema = _chunkKAAWCHO4js.RenameSessionRequestSchema; exports.RenameSessionResponseSchema = _chunkKAAWCHO4js.RenameSessionResponseSchema; exports.RenameSessionResultSchema = _chunkKAAWCHO4js.RenameSessionResultSchema; exports.RequestCancelledError = _chunkKAAWCHO4js.RequestCancelledError; exports.RequestPermissionRequestParamsSchema = _chunkKAAWCHO4js.RequestPermissionRequestParamsSchema; exports.RequestPermissionRequestSchema = _chunkKAAWCHO4js.RequestPermissionRequestSchema; exports.RequestPermissionResponseSchema = _chunkKAAWCHO4js.RequestPermissionResponseSchema; exports.RequestPermissionResultSchema = _chunkKAAWCHO4js.RequestPermissionResultSchema; exports.RewindEvictedFileSchema = _chunkKAAWCHO4js.RewindEvictedFileSchema; exports.RewindFileCreationSchema = _chunkKAAWCHO4js.RewindFileCreationSchema; exports.RewindFileSnapshotSchema = _chunkKAAWCHO4js.RewindFileSnapshotSchema; exports.SDK_TAG = _chunkKAAWCHO4js.SDK_TAG; exports.SDK_VERSION = _chunkKAAWCHO4js.SDK_VERSION; exports.SESSION_INIT_TIMEOUT = _chunkKAAWCHO4js.SESSION_INIT_TIMEOUT; exports.SLACK_DELEGATION_MAX_RETRIES = _chunkKAAWCHO4js.SLACK_DELEGATION_MAX_RETRIES; exports.SdkMcpServer = SdkMcpServer; exports.ServerRequestHandlerType = _chunkKAAWCHO4js.ServerRequestHandlerType; exports.SessionArtifactAction = _chunkKAAWCHO4js.SessionArtifactAction; exports.SessionArtifactKind = _chunkKAAWCHO4js.SessionArtifactKind; exports.SessionArtifactProvider = _chunkKAAWCHO4js.SessionArtifactProvider; exports.SessionArtifactSchema = _chunkKAAWCHO4js.SessionArtifactSchema; exports.SessionArtifactSource = _chunkKAAWCHO4js.SessionArtifactSource; exports.SessionArtifactsSchema = _chunkKAAWCHO4js.SessionArtifactsSchema; exports.SessionElicitationSchema = _chunkKAAWCHO4js.SessionElicitationSchema; exports.SessionError = _chunkKAAWCHO4js.SessionError; exports.SessionMetadataSchema = _chunkKAAWCHO4js.SessionMetadataSchema; exports.SessionNotFoundError = _chunkKAAWCHO4js.SessionNotFoundError; exports.SessionNotificationParamsSchema = _chunkKAAWCHO4js.SessionNotificationParamsSchema; exports.SessionNotificationPayloadSchema = _chunkKAAWCHO4js.SessionNotificationPayloadSchema; exports.SessionNotificationSchema = _chunkKAAWCHO4js.SessionNotificationSchema; exports.SessionNotificationSchemaList = _chunkKAAWCHO4js.SessionNotificationSchemaList; exports.SessionNotificationType = _chunkKAAWCHO4js.SessionNotificationType; exports.SessionPlatform = _chunkKAAWCHO4js.SessionPlatform; exports.SessionReplacedError = _chunkKAAWCHO4js.SessionReplacedError; exports.SessionReplacementError = _chunkKAAWCHO4js.SessionReplacementError; exports.SessionSettingsFileSchema = _chunkKAAWCHO4js.SessionSettingsFileSchema; exports.SessionSettingsSchema = _chunkKAAWCHO4js.SessionSettingsSchema; exports.SessionSourceSchema = _chunkKAAWCHO4js.SessionSourceSchema; exports.SessionStartEventSchema = _chunkKAAWCHO4js.SessionStartEventSchema; exports.SessionTagSchema = _chunkKAAWCHO4js.SessionTagSchema; exports.SessionTitleUpdatedNotificationSchema = _chunkKAAWCHO4js.SessionTitleUpdatedNotificationSchema; exports.SessionTokenUsageChangedNotificationSchema = _chunkKAAWCHO4js.SessionTokenUsageChangedNotificationSchema; exports.SetSkillDisabledRequestParamsSchema = _chunkKAAWCHO4js.SetSkillDisabledRequestParamsSchema; exports.SetSkillDisabledRequestSchema = _chunkKAAWCHO4js.SetSkillDisabledRequestSchema; exports.SetSkillDisabledResponseSchema = _chunkKAAWCHO4js.SetSkillDisabledResponseSchema; exports.SetSkillDisabledResultSchema = _chunkKAAWCHO4js.SetSkillDisabledResultSchema; exports.SettingsLevel = _chunkKAAWCHO4js.SettingsLevel; exports.SettingsUpdatedNotificationSchema = _chunkKAAWCHO4js.SettingsUpdatedNotificationSchema; exports.SettingsUpdatedPayloadSchema = _chunkKAAWCHO4js.SettingsUpdatedPayloadSchema; exports.SkillDeviationSchema = _chunkKAAWCHO4js.SkillDeviationSchema; exports.SkillFeedbackSchema = _chunkKAAWCHO4js.SkillFeedbackSchema; exports.SkillInfoSchema = _chunkKAAWCHO4js.SkillInfoSchema; exports.SkillLocation = _chunkKAAWCHO4js.SkillLocation; exports.SkillResourceSchema = _chunkKAAWCHO4js.SkillResourceSchema; exports.SpanAttribute = _chunkKAAWCHO4js.SpanAttribute; exports.SpanEvent = _chunkKAAWCHO4js.SpanEvent; exports.SpanName = _chunkKAAWCHO4js.SpanName; exports.SseMcpConfigSchema = _chunkKAAWCHO4js.SseMcpSchema; exports.StartMissionRunConfirmationDetailsSchema = _chunkKAAWCHO4js.StartMissionRunConfirmationDetailsSchema; exports.StdioMcpConfigSchema = _chunkKAAWCHO4js.StdioMcpSchema; exports.StreamStateTracker = _chunkKAAWCHO4js.StreamStateTracker; exports.StructuredOutputErrorSchema = _chunkKAAWCHO4js.StructuredOutputErrorSchema; exports.StructuredOutputNotificationSchema = _chunkKAAWCHO4js.StructuredOutputNotificationSchema; exports.SubmitBugReportRequestParamsSchema = _chunkKAAWCHO4js.SubmitBugReportRequestParamsSchema; exports.SubmitBugReportRequestSchema = _chunkKAAWCHO4js.SubmitBugReportRequestSchema; exports.SubmitBugReportResponseSchema = _chunkKAAWCHO4js.SubmitBugReportResponseSchema; exports.SubmitBugReportResultSchema = _chunkKAAWCHO4js.SubmitBugReportResultSchema; exports.SubmitMcpAuthCodeRequestParamsSchema = _chunkKAAWCHO4js.SubmitMcpAuthCodeRequestParamsSchema; exports.SubmitMcpAuthCodeRequestSchema = _chunkKAAWCHO4js.SubmitMcpAuthCodeRequestSchema; exports.SubmitMcpAuthCodeResponseSchema = _chunkKAAWCHO4js.SubmitMcpAuthCodeResponseSchema; exports.SubmitMcpAuthCodeResultSchema = _chunkKAAWCHO4js.SubmitMcpAuthCodeResultSchema; exports.SuccessResultSchema = _chunkKAAWCHO4js.SuccessResultSchema; exports.TestCaseSchema = _chunkKAAWCHO4js.TestCaseSchema; exports.TestFileSchema = _chunkKAAWCHO4js.TestFileSchema; exports.TestsSchema = _chunkKAAWCHO4js.TestsSchema; exports.TextBlockSchema = _chunkKAAWCHO4js.TextBlockSchema; exports.ThinkingBlockSchema = _chunkKAAWCHO4js.ThinkingBlockSchema; exports.ThinkingTextCompleteNotificationSchema = _chunkKAAWCHO4js.ThinkingTextCompleteNotificationSchema; exports.ThinkingTextDeltaNotificationSchema = _chunkKAAWCHO4js.ThinkingTextDeltaNotificationSchema; exports.TimeoutError = _chunkKAAWCHO4js.TimeoutError; exports.ToggleMcpServerRequestParamsSchema = _chunkKAAWCHO4js.ToggleMcpServerRequestParamsSchema; exports.ToggleMcpServerRequestSchema = _chunkKAAWCHO4js.ToggleMcpServerRequestSchema; exports.ToggleMcpServerResponseSchema = _chunkKAAWCHO4js.ToggleMcpServerResponseSchema; exports.ToggleMcpServerResultSchema = _chunkKAAWCHO4js.ToggleMcpServerResultSchema; exports.ToggleMcpToolRequestParamsSchema = _chunkKAAWCHO4js.ToggleMcpToolRequestParamsSchema; exports.ToggleMcpToolRequestSchema = _chunkKAAWCHO4js.ToggleMcpToolRequestSchema; exports.ToggleMcpToolResponseSchema = _chunkKAAWCHO4js.ToggleMcpToolResponseSchema; exports.ToggleMcpToolResultSchema = _chunkKAAWCHO4js.ToggleMcpToolResultSchema; exports.TokenUsageSchema = _chunkKAAWCHO4js.TokenUsageSchema; exports.ToolCallNotificationSchema = _chunkKAAWCHO4js.ToolCallNotificationSchema; exports.ToolConfirmationDetailsSchema = _chunkKAAWCHO4js.ToolConfirmationDetailsSchema; exports.ToolConfirmationInfoSchema = _chunkKAAWCHO4js.ToolConfirmationInfoSchema; exports.ToolConfirmationListItemSchema = _chunkKAAWCHO4js.ToolConfirmationListItemSchema; exports.ToolConfirmationOutcome = _chunkKAAWCHO4js.ToolConfirmationOutcome; exports.ToolConfirmationType = _chunkKAAWCHO4js.ToolConfirmationType; exports.ToolJsonSchemaSchema = _chunkKAAWCHO4js.ToolJsonSchemaSchema; exports.ToolProgressUpdateNotificationSchema = _chunkKAAWCHO4js.ToolProgressUpdateNotificationSchema; exports.ToolProgressUpdateSchema = _chunkKAAWCHO4js.ToolProgressUpdateSchema; exports.ToolResultBlockSchema = _chunkKAAWCHO4js.ToolResultSchema; exports.ToolResultNotificationSchema = _chunkKAAWCHO4js.ToolResultNotificationSchema; exports.ToolResultSchemaDescriptorSchema = _chunkKAAWCHO4js.ToolResultSchemaDescriptorSchema; exports.ToolSchemasSchema = _chunkKAAWCHO4js.ToolSchemasSchema; exports.ToolSelectionOverridesSchema = _chunkKAAWCHO4js.ToolSelectionOverridesSchema; exports.ToolSourceSchema = _chunkKAAWCHO4js.ToolSourceSchema; exports.ToolUseBlockSchema = _chunkKAAWCHO4js.ToolUseSchema; exports.ToolUseSchema = _chunkKAAWCHO4js.ToolUseSchema2; exports.TraceContextMetaSchema = _chunkKAAWCHO4js.TraceContextMetaSchema; exports.TransportDirection = TransportDirection; exports.TunnelConnection = _chunkKAAWCHO4js.TunnelConnection; exports.UpdateSessionSettingsRequestParamsSchema = _chunkKAAWCHO4js.UpdateSessionSettingsRequestParamsSchema; exports.UpdateSessionSettingsRequestSchema = _chunkKAAWCHO4js.UpdateSessionSettingsRequestSchema; exports.UpdateSessionSettingsResponseSchema = _chunkKAAWCHO4js.UpdateSessionSettingsResponseSchema; exports.UpdateSessionSettingsResultSchema = _chunkKAAWCHO4js.UpdateSessionSettingsResultSchema; exports.VerificationCommandSchema = _chunkKAAWCHO4js.VerificationCommandSchema; exports.VerificationSchema = _chunkKAAWCHO4js.VerificationSchema; exports.WINDOWS_JOB_OBJECT_ERROR_MARKER = WINDOWS_JOB_OBJECT_ERROR_MARKER; exports.WebSocketConnectionError = _chunkKAAWCHO4js.WebSocketConnectionError; exports.WebSocketDaemonTransport = _chunkKAAWCHO4js.WebSocketDaemonTransport; exports.WorkerCompletedEntrySchema = _chunkKAAWCHO4js.WorkerCompletedEntrySchema; exports.WorkerFailedEntrySchema = _chunkKAAWCHO4js.WorkerFailedEntrySchema; exports.WorkerPausedEntrySchema = _chunkKAAWCHO4js.WorkerPausedEntrySchema; exports.WorkerSelectedFeatureEntrySchema = _chunkKAAWCHO4js.WorkerSelectedFeatureEntrySchema; exports.WorkerStartedEntrySchema = _chunkKAAWCHO4js.WorkerStartedEntrySchema; exports.WorkerStateInfoSchema = _chunkKAAWCHO4js.WorkerStateInfoSchema; exports.WorkstreamMachineTargetKind = _chunkKAAWCHO4js.MissionMachineTargetKind; exports.__resetTransportLoggerForTests = __resetTransportLoggerForTests; exports.answerRemoteSessionElicitation = _chunkKAAWCHO4js.answerRemoteSessionElicitation; exports.appendContextSession = _chunkKAAWCHO4js.appendContextSession; exports.buildUserMessageContentBlocks = _chunkKAAWCHO4js.buildUserMessageContentBlocks; exports.configureDaemonCoreDeps = _chunkKAAWCHO4js.configureDaemonCoreDeps; exports.connectAndAuthenticate = _chunkKAAWCHO4js.connectAndAuthenticate; exports.connectToDaemon = _chunkKAAWCHO4js.connectToDaemon; exports.connectWithRetry = _chunkKAAWCHO4js.connectWithRetry; exports.convertNotificationToStreamMessage = _chunkKAAWCHO4js.convertNotificationToStreamMessage; exports.createComputer = _chunkKAAWCHO4js.createComputer; exports.createContextDocument = _chunkKAAWCHO4js.createContextDocument; exports.createContextFile = _chunkKAAWCHO4js.createContextFile; exports.createContextSpace = _chunkKAAWCHO4js.createContextSpace; exports.createResponseSchema = _chunkKAAWCHO4js.createResponseSchema; exports.createSdkMcpServer = createSdkMcpServer; exports.createSession = createSession; exports.createWebSocketDaemonClient = _chunkKAAWCHO4js.createWebSocketDaemonClient; exports.defaultDaemonCoreDeps = _chunkKAAWCHO4js.defaultDaemonCoreDeps; exports.deleteComputer = _chunkKAAWCHO4js.deleteComputer; exports.deleteContextDocument = _chunkKAAWCHO4js.deleteContextDocument; exports.deleteContextFile = _chunkKAAWCHO4js.deleteContextFile; exports.filterMessagesForUI = _chunkKAAWCHO4js.filterMessagesForUI; exports.getComputer = _chunkKAAWCHO4js.getComputer; exports.getComputerByName = _chunkKAAWCHO4js.getComputerByName; exports.getComputerMetrics = _chunkKAAWCHO4js.getComputerMetrics; exports.getContextDocument = _chunkKAAWCHO4js.getContextDocument; exports.getContextDocumentByPath = _chunkKAAWCHO4js.getContextDocumentByPath; exports.getContextSession = _chunkKAAWCHO4js.getContextSession; exports.getContextSpace = _chunkKAAWCHO4js.getContextSpace; exports.getMachineTemplate = _chunkKAAWCHO4js.getMachineTemplate; exports.getPermissionToolInputForDisplay = _chunkKAAWCHO4js.getPermissionToolInputForDisplay; exports.getQueuedUserMessageDisplayGroup = _chunkKAAWCHO4js.getQueuedUserMessageDisplayGroup; exports.getQueuedUserMessageReviewPriority = _chunkKAAWCHO4js.getQueuedUserMessageReviewPriority; exports.getSubagentCallingMetadata = _chunkKAAWCHO4js.getSubagentCallingMetadata; exports.getToolResultBlocks = _chunkKAAWCHO4js.getToolResultBlocks; exports.getToolResultToolUseId = _chunkKAAWCHO4js.getToolResultToolUseId; exports.hasDecoupledInteractionSettings = _chunkKAAWCHO4js.hasDecoupledInteractionSettings; exports.hasSubagentSessionTag = _chunkKAAWCHO4js.hasSubagentSessionTag; exports.inspectJsonRpcEnvelope = _chunkKAAWCHO4js.inspectJsonRpcEnvelope; exports.isDaemonQueuedMessageKind = _chunkKAAWCHO4js.isDaemonQueuedMessageKind; exports.isDroidConnectionEnded = isDroidConnectionEnded; exports.isPendingToolResultMarker = _chunkKAAWCHO4js.isPendingToolResultMarker; exports.isPersistedHookMessage = _chunkKAAWCHO4js.isPersistedHookMessage; exports.isReviewableQueuedMessageKind = _chunkKAAWCHO4js.isReviewableQueuedMessageKind; exports.isTransportLoggingEnabled = isTransportLoggingEnabled; exports.listComputers = _chunkKAAWCHO4js.listComputers; exports.listContextDocuments = _chunkKAAWCHO4js.listContextDocuments; exports.listContextSessions = _chunkKAAWCHO4js.listContextSessions; exports.listContextSpaces = _chunkKAAWCHO4js.listContextSpaces; exports.listEnvironments = _chunkKAAWCHO4js.listEnvironments; exports.listMachineTemplates = _chunkKAAWCHO4js.listMachineTemplates; exports.listModels = listModels; exports.listRemoteSessionElicitations = _chunkKAAWCHO4js.listRemoteSessionElicitations; exports.listRemoteSessions = _chunkKAAWCHO4js.listRemoteSessions; exports.listSessions = listSessions; exports.logTransportMessage = logTransportMessage; exports.machineTypeToMachineConnectionType = _chunkKAAWCHO4js.machineTypeToMachineConnectionType; exports.noopLogger = noopLogger; exports.readContextFilePart = _chunkKAAWCHO4js.readContextFilePart; exports.readContextSessionRecords = _chunkKAAWCHO4js.readContextSessionRecords; exports.recordComputerConnectSli = _chunkKAAWCHO4js.recordComputerConnectSli; exports.refreshComputer = _chunkKAAWCHO4js.refreshComputer; exports.registerContextSession = _chunkKAAWCHO4js.registerContextSession; exports.resolveExecCoreDeps = resolveExecCoreDeps; exports.restartComputer = _chunkKAAWCHO4js.restartComputer; exports.resumeSession = resumeSession; exports.retryInstallDeps = _chunkKAAWCHO4js.retryInstallDeps; exports.retryWithLogger = _chunkKAAWCHO4js.retryWithLogger; exports.run = run; exports.spawnWithWindowsJobObjectRetry = spawnWithWindowsJobObjectRetry; exports.sumTokenUsage = _chunkKAAWCHO4js.sumTokenUsage; exports.summarizeSessionToolUsage = _chunkKAAWCHO4js.summarizeSessionToolUsage; exports.toError = _chunkKAAWCHO4js.toError; exports.tool = tool; exports.updateComputer = _chunkKAAWCHO4js.updateComputer; exports.updateContextDocument = _chunkKAAWCHO4js.updateContextDocument; exports.uploadContextFilePart = _chunkKAAWCHO4js.uploadContextFilePart; exports.withJsonRpcCodec = withJsonRpcCodec;
|
|
5127
6001
|
//# sourceMappingURL=node.js.map
|