@factory/droid-sdk 0.9.1 → 0.10.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 +22 -0
- package/dist/{chunk-YSKO6SPT.js → chunk-OBPHU4RT.js} +13559 -6545
- package/dist/chunk-OBPHU4RT.js.map +1 -0
- package/dist/{chunk-TWSTJMV7.mjs → chunk-TWAVPIPS.mjs} +11941 -4927
- package/dist/chunk-TWAVPIPS.mjs.map +1 -0
- package/dist/{index-C06W9tbN.d.mts → index-DWBA4zgW.d.mts} +142111 -115283
- package/dist/{index-C06W9tbN.d.ts → index-DWBA4zgW.d.ts} +142111 -115283
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +72 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +77 -7
- package/dist/node.d.mts +114 -26
- package/dist/node.d.ts +114 -26
- package/dist/node.js +973 -590
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +558 -175
- package/dist/node.mjs.map +1 -1
- package/examples/browser/daemon-lifecycle.ts +4 -6
- package/examples/node/custom-model-editing-disposable.sh +88 -0
- package/examples/node/custom-model-editing-disposable.ts +171 -0
- package/examples/node/custom-model-editing.ts +55 -0
- package/examples/node/hook-execution.ts +3 -2
- package/examples/node/sdk-mcp-tool.ts +5 -3
- package/examples/node/tool-controls.ts +7 -5
- package/package.json +2 -1
- package/dist/chunk-TWSTJMV7.mjs.map +0 -1
- package/dist/chunk-YSKO6SPT.js.map +0 -1
package/dist/node.js
CHANGED
|
@@ -445,7 +445,50 @@
|
|
|
445
445
|
|
|
446
446
|
|
|
447
447
|
|
|
448
|
-
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
var _chunkOBPHU4RTjs = require('./chunk-OBPHU4RT.js');
|
|
449
492
|
|
|
450
493
|
// src/exec-core/client.ts
|
|
451
494
|
var _events = require('events'); var _events2 = _interopRequireDefault(_events);
|
|
@@ -517,6 +560,9 @@ var defaultExecCoreDeps = {
|
|
|
517
560
|
},
|
|
518
561
|
sanitizeSpawnEnv(env) {
|
|
519
562
|
return env;
|
|
563
|
+
},
|
|
564
|
+
buildRuntimeSettingsAuthorityEnv() {
|
|
565
|
+
return {};
|
|
520
566
|
}
|
|
521
567
|
}
|
|
522
568
|
};
|
|
@@ -526,6 +572,7 @@ var DroidClientEvent = /* @__PURE__ */ ((DroidClientEvent2) => {
|
|
|
526
572
|
DroidClientEvent2["SESSION_NOTIFICATION"] = "session_notification";
|
|
527
573
|
DroidClientEvent2["REQUEST_PERMISSION"] = "request_permission";
|
|
528
574
|
DroidClientEvent2["ASK_USER"] = "ask_user";
|
|
575
|
+
DroidClientEvent2["PICK_OPTIONS"] = "pick_options";
|
|
529
576
|
DroidClientEvent2["ERROR"] = "error";
|
|
530
577
|
return DroidClientEvent2;
|
|
531
578
|
})(DroidClientEvent || {});
|
|
@@ -541,90 +588,6 @@ var TransportDirection = /* @__PURE__ */ ((TransportDirection2) => {
|
|
|
541
588
|
return TransportDirection2;
|
|
542
589
|
})(TransportDirection || {});
|
|
543
590
|
|
|
544
|
-
// ../droid-sdk-core/src/observability.ts
|
|
545
|
-
function sanitizeAttributes(attributes) {
|
|
546
|
-
if (attributes === void 0) {
|
|
547
|
-
return void 0;
|
|
548
|
-
}
|
|
549
|
-
const sanitized = {};
|
|
550
|
-
for (const [key, value] of Object.entries(attributes)) {
|
|
551
|
-
if (value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
552
|
-
sanitized[key] = value;
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
return Object.keys(sanitized).length > 0 ? sanitized : void 0;
|
|
556
|
-
}
|
|
557
|
-
function serializeError(error) {
|
|
558
|
-
if (error instanceof Error) {
|
|
559
|
-
const code = "code" in error && typeof error.code === "string" ? error.code : void 0;
|
|
560
|
-
return {
|
|
561
|
-
name: error.name || void 0,
|
|
562
|
-
message: error.message,
|
|
563
|
-
...code !== void 0 && { code }
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
return { message: String(error) };
|
|
567
|
-
}
|
|
568
|
-
function handleSinkFailure(error, options) {
|
|
569
|
-
try {
|
|
570
|
-
_optionalChain([options, 'optionalAccess', _3 => _3.onError, 'optionalCall', _4 => _4(error)]);
|
|
571
|
-
} catch (e2) {
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
function emitDroidLog(observability, event, options) {
|
|
575
|
-
const sink = _optionalChain([observability, 'optionalAccess', _5 => _5.logger]);
|
|
576
|
-
if (!sink) {
|
|
577
|
-
return false;
|
|
578
|
-
}
|
|
579
|
-
try {
|
|
580
|
-
sink.log({
|
|
581
|
-
level: event.level,
|
|
582
|
-
name: event.name,
|
|
583
|
-
message: event.message,
|
|
584
|
-
attributes: sanitizeAttributes(event.attributes),
|
|
585
|
-
...event.error !== void 0 && {
|
|
586
|
-
error: serializeError(event.error)
|
|
587
|
-
}
|
|
588
|
-
});
|
|
589
|
-
return true;
|
|
590
|
-
} catch (error) {
|
|
591
|
-
handleSinkFailure(error, options);
|
|
592
|
-
return false;
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
function recordDroidMetric(observability, event, options) {
|
|
596
|
-
const sink = _optionalChain([observability, 'optionalAccess', _6 => _6.metrics]);
|
|
597
|
-
if (!sink) {
|
|
598
|
-
return false;
|
|
599
|
-
}
|
|
600
|
-
try {
|
|
601
|
-
sink.record({
|
|
602
|
-
name: event.name,
|
|
603
|
-
kind: event.kind,
|
|
604
|
-
value: event.value,
|
|
605
|
-
unit: event.unit,
|
|
606
|
-
attributes: sanitizeAttributes(event.attributes)
|
|
607
|
-
});
|
|
608
|
-
return true;
|
|
609
|
-
} catch (error) {
|
|
610
|
-
handleSinkFailure(error, options);
|
|
611
|
-
return false;
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
function injectDroidTraceContext(observability, carrier, options) {
|
|
615
|
-
const sink = _optionalChain([observability, 'optionalAccess', _7 => _7.tracing]);
|
|
616
|
-
if (!sink) {
|
|
617
|
-
return false;
|
|
618
|
-
}
|
|
619
|
-
try {
|
|
620
|
-
sink.inject(carrier);
|
|
621
|
-
return true;
|
|
622
|
-
} catch (error) {
|
|
623
|
-
handleSinkFailure(error, options);
|
|
624
|
-
return false;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
|
|
628
591
|
// src/exec-core/deps.ts
|
|
629
592
|
function logWarn(logger, message, metadata) {
|
|
630
593
|
logger.warn(message, metadata);
|
|
@@ -660,7 +623,7 @@ function redactContentForCustomerSink(metadata) {
|
|
|
660
623
|
return _nullishCoalesce(redacted, () => ( metadata));
|
|
661
624
|
}
|
|
662
625
|
function createLogger(observability, fallback) {
|
|
663
|
-
const sink = _optionalChain([observability, 'optionalAccess',
|
|
626
|
+
const sink = _optionalChain([observability, 'optionalAccess', _3 => _3.logger]);
|
|
664
627
|
if (!sink) {
|
|
665
628
|
return fallback;
|
|
666
629
|
}
|
|
@@ -668,7 +631,7 @@ function createLogger(observability, fallback) {
|
|
|
668
631
|
const sinkFailureOptions = createSinkFailureOptions(fallback);
|
|
669
632
|
return {
|
|
670
633
|
info(message, metadata) {
|
|
671
|
-
emitDroidLog(
|
|
634
|
+
_chunkOBPHU4RTjs.emitDroidLog.call(void 0,
|
|
672
635
|
sinkObservability,
|
|
673
636
|
{
|
|
674
637
|
level: "info",
|
|
@@ -680,7 +643,7 @@ function createLogger(observability, fallback) {
|
|
|
680
643
|
);
|
|
681
644
|
},
|
|
682
645
|
warn(message, metadata) {
|
|
683
|
-
emitDroidLog(
|
|
646
|
+
_chunkOBPHU4RTjs.emitDroidLog.call(void 0,
|
|
684
647
|
sinkObservability,
|
|
685
648
|
{
|
|
686
649
|
level: "warn",
|
|
@@ -692,7 +655,7 @@ function createLogger(observability, fallback) {
|
|
|
692
655
|
);
|
|
693
656
|
},
|
|
694
657
|
exception(error, message, metadata) {
|
|
695
|
-
emitDroidLog(
|
|
658
|
+
_chunkOBPHU4RTjs.emitDroidLog.call(void 0,
|
|
696
659
|
sinkObservability,
|
|
697
660
|
{
|
|
698
661
|
level: "error",
|
|
@@ -707,7 +670,7 @@ function createLogger(observability, fallback) {
|
|
|
707
670
|
};
|
|
708
671
|
}
|
|
709
672
|
function createMetrics(observability, fallback, failureLogger) {
|
|
710
|
-
const sink = _optionalChain([observability, 'optionalAccess',
|
|
673
|
+
const sink = _optionalChain([observability, 'optionalAccess', _4 => _4.metrics]);
|
|
711
674
|
if (!sink) {
|
|
712
675
|
return fallback;
|
|
713
676
|
}
|
|
@@ -715,7 +678,7 @@ function createMetrics(observability, fallback, failureLogger) {
|
|
|
715
678
|
const sinkFailureOptions = createSinkFailureOptions(failureLogger);
|
|
716
679
|
return {
|
|
717
680
|
addToCounter(metric, value, tags) {
|
|
718
|
-
recordDroidMetric(
|
|
681
|
+
_chunkOBPHU4RTjs.recordDroidMetric.call(void 0,
|
|
719
682
|
sinkObservability,
|
|
720
683
|
{
|
|
721
684
|
name: metric,
|
|
@@ -728,7 +691,7 @@ function createMetrics(observability, fallback, failureLogger) {
|
|
|
728
691
|
);
|
|
729
692
|
},
|
|
730
693
|
recordDuration(metric, valueMs, tags) {
|
|
731
|
-
recordDroidMetric(
|
|
694
|
+
_chunkOBPHU4RTjs.recordDroidMetric.call(void 0,
|
|
732
695
|
sinkObservability,
|
|
733
696
|
{
|
|
734
697
|
name: metric,
|
|
@@ -743,7 +706,7 @@ function createMetrics(observability, fallback, failureLogger) {
|
|
|
743
706
|
};
|
|
744
707
|
}
|
|
745
708
|
function createTracing(observability, fallback, failureLogger) {
|
|
746
|
-
const sink = _optionalChain([observability, 'optionalAccess',
|
|
709
|
+
const sink = _optionalChain([observability, 'optionalAccess', _5 => _5.tracing]);
|
|
747
710
|
if (!sink) {
|
|
748
711
|
return fallback;
|
|
749
712
|
}
|
|
@@ -755,7 +718,7 @@ function createTracing(observability, fallback, failureLogger) {
|
|
|
755
718
|
},
|
|
756
719
|
injectContext(meta) {
|
|
757
720
|
const carrier = {};
|
|
758
|
-
if (!injectDroidTraceContext(sinkObservability, carrier, sinkFailureOptions)) {
|
|
721
|
+
if (!_chunkOBPHU4RTjs.injectDroidTraceContext.call(void 0, sinkObservability, carrier, sinkFailureOptions)) {
|
|
759
722
|
return;
|
|
760
723
|
}
|
|
761
724
|
if (carrier.traceparent !== void 0) {
|
|
@@ -780,14 +743,15 @@ function resolveExecCoreDeps(observability, fallback = defaultExecCoreDeps) {
|
|
|
780
743
|
|
|
781
744
|
// src/exec-core/client.ts
|
|
782
745
|
function getResponseId(response) {
|
|
783
|
-
const parsed =
|
|
746
|
+
const parsed = _chunkOBPHU4RTjs.JsonRpcBaseResponseSchema.safeParse(response);
|
|
784
747
|
return parsed.success ? parsed.data.id : void 0;
|
|
785
748
|
}
|
|
786
|
-
var JsonRpcEnvelopePeekSchema =
|
|
787
|
-
type: _zod.z.nativeEnum(
|
|
749
|
+
var JsonRpcEnvelopePeekSchema = _chunkOBPHU4RTjs.JsonRpcEnvelopeSchema.partial().extend({
|
|
750
|
+
type: _zod.z.nativeEnum(_chunkOBPHU4RTjs.JsonRpcMessageType).optional(),
|
|
788
751
|
method: _zod.z.string().optional(),
|
|
789
752
|
id: _zod.z.string().nullable().optional()
|
|
790
753
|
}).passthrough();
|
|
754
|
+
var MCP_OAUTH_OPT_OUT_PROTOCOL_VERSION = "1.78.0";
|
|
791
755
|
function inspectJsonRpcEnvelope2(message) {
|
|
792
756
|
const result = JsonRpcEnvelopePeekSchema.safeParse(message);
|
|
793
757
|
if (!result.success) {
|
|
@@ -795,8 +759,8 @@ function inspectJsonRpcEnvelope2(message) {
|
|
|
795
759
|
}
|
|
796
760
|
const envelope = result.data;
|
|
797
761
|
return {
|
|
798
|
-
protocolVersionMismatch: envelope.factoryProtocolVersion !== void 0 && envelope.factoryProtocolVersion !==
|
|
799
|
-
localFactoryProtocolVersion:
|
|
762
|
+
protocolVersionMismatch: envelope.factoryProtocolVersion !== void 0 && envelope.factoryProtocolVersion !== _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION ? {
|
|
763
|
+
localFactoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
800
764
|
peerFactoryProtocolVersion: envelope.factoryProtocolVersion,
|
|
801
765
|
messageType: envelope.type,
|
|
802
766
|
method: envelope.method,
|
|
@@ -811,25 +775,27 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
811
775
|
__init() {this.pendingRequests = /* @__PURE__ */ new Map()}
|
|
812
776
|
__init2() {this.permissionHandlers = /* @__PURE__ */ new Map()}
|
|
813
777
|
__init3() {this.askUserHandlers = /* @__PURE__ */ new Map()}
|
|
814
|
-
__init4() {this.
|
|
815
|
-
__init5() {this.
|
|
816
|
-
__init6() {this.
|
|
778
|
+
__init4() {this.pickOptionsHandlers = /* @__PURE__ */ new Map()}
|
|
779
|
+
__init5() {this.pendingPermissionRequests = /* @__PURE__ */ new Map()}
|
|
780
|
+
__init6() {this.pendingAskUserRequests = /* @__PURE__ */ new Map()}
|
|
781
|
+
__init7() {this.pendingPickOptionsRequests = /* @__PURE__ */ new Map()}
|
|
782
|
+
__init8() {this.currentSessionId = null}
|
|
817
783
|
|
|
818
784
|
/**
|
|
819
785
|
* Sticky error from a transport failure. Once set, all subsequent
|
|
820
786
|
* `sendRequest()` calls throw this error immediately, preventing
|
|
821
787
|
* requests from hanging on a dead transport.
|
|
822
788
|
*/
|
|
823
|
-
|
|
824
|
-
|
|
789
|
+
__init9() {this.transportError = null}
|
|
790
|
+
__init10() {this.completedTurnObserved = false}
|
|
825
791
|
|
|
826
792
|
|
|
827
793
|
|
|
828
794
|
|
|
829
795
|
constructor(options, deps = defaultExecCoreDeps) {
|
|
830
|
-
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);;
|
|
831
|
-
this.transport = options.transport;
|
|
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);;
|
|
832
797
|
const resolved = resolveExecCoreDeps(options.observability, deps);
|
|
798
|
+
this.transport = options.transport;
|
|
833
799
|
this.logger = resolved.logger;
|
|
834
800
|
this.tracing = resolved.tracing;
|
|
835
801
|
this.requestTimeout = _nullishCoalesce(options.requestTimeout, () => ( DEFAULT_REQUEST_TIMEOUT2));
|
|
@@ -849,13 +815,28 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
849
815
|
});
|
|
850
816
|
this.transport.onError((error) => {
|
|
851
817
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
852
|
-
const
|
|
818
|
+
const pendingSessionIds = /* @__PURE__ */ new Set();
|
|
819
|
+
let hasPendingIdlessSessionStart = false;
|
|
820
|
+
for (const pendingRequest of this.pendingRequests.values()) {
|
|
821
|
+
if (pendingRequest.method === "droid.initialize_session" /* INITIALIZE_SESSION */ && pendingRequest.sessionId === void 0) {
|
|
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;
|
|
853
830
|
if (expectedCleanExit) {
|
|
854
831
|
this.logger.info("[DroidClient] Process exited after completed turn", {
|
|
855
|
-
|
|
832
|
+
sessionId,
|
|
833
|
+
exitCode: err.exitCode,
|
|
834
|
+
signal: err.signal
|
|
856
835
|
});
|
|
857
836
|
} else {
|
|
858
|
-
this.logger.exception(err, "Transport error"
|
|
837
|
+
this.logger.exception(err, "Transport error", {
|
|
838
|
+
sessionId
|
|
839
|
+
});
|
|
859
840
|
}
|
|
860
841
|
this.transportError = err;
|
|
861
842
|
this.rejectAllPending(err);
|
|
@@ -877,42 +858,47 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
877
858
|
return this.transport.isConnected;
|
|
878
859
|
}
|
|
879
860
|
requireMcpOAuthOptOutSupport() {
|
|
880
|
-
if (
|
|
861
|
+
if (_chunkOBPHU4RTjs.isProtocolVersionAtLeast.call(void 0,
|
|
862
|
+
this.peerProtocolVersion,
|
|
863
|
+
MCP_OAUTH_OPT_OUT_PROTOCOL_VERSION
|
|
864
|
+
)) {
|
|
881
865
|
return;
|
|
882
866
|
}
|
|
883
|
-
throw new (0,
|
|
884
|
-
|
|
867
|
+
throw new (0, _chunkOBPHU4RTjs.ProtocolError)(
|
|
868
|
+
`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.`,
|
|
885
869
|
{
|
|
886
870
|
value: {
|
|
887
|
-
localFactoryProtocolVersion:
|
|
871
|
+
localFactoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
872
|
+
minimumFactoryProtocolVersion: MCP_OAUTH_OPT_OUT_PROTOCOL_VERSION,
|
|
888
873
|
peerFactoryProtocolVersion: this.peerProtocolVersion
|
|
889
874
|
}
|
|
890
875
|
}
|
|
891
876
|
);
|
|
892
877
|
}
|
|
893
878
|
validateMcpServersProtocolSupport(mcpServers) {
|
|
894
|
-
if (_optionalChain([mcpServers, 'optionalAccess',
|
|
879
|
+
if (_optionalChain([mcpServers, 'optionalAccess', _6 => _6.some, 'call', _7 => _7((server) => "oauth" in server && server.oauth === false)])) {
|
|
895
880
|
this.requireMcpOAuthOptOutSupport();
|
|
896
881
|
}
|
|
897
882
|
}
|
|
898
883
|
async initializeSession(params) {
|
|
899
884
|
const request = {
|
|
900
|
-
factoryApiVersion:
|
|
901
|
-
factoryProtocolVersion:
|
|
885
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
886
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
902
887
|
type: "request",
|
|
903
|
-
jsonrpc:
|
|
888
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
904
889
|
id: _uuid.v4.call(void 0, ),
|
|
905
890
|
method: "droid.initialize_session" /* INITIALIZE_SESSION */,
|
|
906
891
|
params
|
|
907
892
|
};
|
|
908
893
|
const rawResponse = await this.sendRequest(
|
|
909
894
|
request,
|
|
910
|
-
this.sessionInitTimeout
|
|
895
|
+
this.sessionInitTimeout,
|
|
896
|
+
params.sessionId
|
|
911
897
|
);
|
|
912
|
-
const response =
|
|
898
|
+
const response = _chunkOBPHU4RTjs.InitializeSessionResponseSchema.parse(rawResponse);
|
|
913
899
|
this.peerProtocolVersion = response.factoryProtocolVersion;
|
|
914
900
|
if (response.error) {
|
|
915
|
-
throw new (0,
|
|
901
|
+
throw new (0, _chunkOBPHU4RTjs.ProtocolError)("Initialize session request failed", {
|
|
916
902
|
requestId: request.id,
|
|
917
903
|
code: response.error.code,
|
|
918
904
|
message: response.error.message,
|
|
@@ -920,37 +906,38 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
920
906
|
});
|
|
921
907
|
}
|
|
922
908
|
this.validateMcpServersProtocolSupport(params.mcpServers);
|
|
923
|
-
const result =
|
|
909
|
+
const result = _chunkOBPHU4RTjs.InitializeSessionResultSchema.parse(response.result);
|
|
924
910
|
this.currentSessionId = result.sessionId;
|
|
925
911
|
return response;
|
|
926
912
|
}
|
|
927
913
|
async loadSession(params) {
|
|
928
914
|
const request = {
|
|
929
|
-
factoryApiVersion:
|
|
930
|
-
factoryProtocolVersion:
|
|
915
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
916
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
931
917
|
type: "request",
|
|
932
|
-
jsonrpc:
|
|
918
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
933
919
|
id: _uuid.v4.call(void 0, ),
|
|
934
920
|
method: "droid.load_session" /* LOAD_SESSION */,
|
|
935
921
|
params
|
|
936
922
|
};
|
|
937
923
|
const rawResponse = await this.sendRequest(
|
|
938
924
|
request,
|
|
939
|
-
this.sessionInitTimeout
|
|
925
|
+
this.sessionInitTimeout,
|
|
926
|
+
params.sessionId
|
|
940
927
|
);
|
|
941
|
-
const response =
|
|
928
|
+
const response = _chunkOBPHU4RTjs.LoadSessionResponseSchema.parse(rawResponse);
|
|
942
929
|
this.peerProtocolVersion = response.factoryProtocolVersion;
|
|
943
930
|
if (response.error) {
|
|
944
931
|
const isSessionNotFound = response.error.code === -32004 /* ENTITY_NOT_FOUND */;
|
|
945
932
|
if (isSessionNotFound) {
|
|
946
|
-
throw new (0,
|
|
933
|
+
throw new (0, _chunkOBPHU4RTjs.SessionNotFoundError)(params.sessionId, {
|
|
947
934
|
requestId: request.id,
|
|
948
935
|
code: response.error.code,
|
|
949
936
|
message: response.error.message,
|
|
950
937
|
data: response.error.data
|
|
951
938
|
});
|
|
952
939
|
}
|
|
953
|
-
throw new (0,
|
|
940
|
+
throw new (0, _chunkOBPHU4RTjs.ProtocolError)("Load session request failed", {
|
|
954
941
|
requestId: request.id,
|
|
955
942
|
code: response.error.code,
|
|
956
943
|
message: response.error.message,
|
|
@@ -963,16 +950,16 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
963
950
|
}
|
|
964
951
|
async addUserMessage(params, requestId) {
|
|
965
952
|
if (!this.currentSessionId) {
|
|
966
|
-
throw new (0,
|
|
953
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
967
954
|
"No active session. Call initializeSession or loadSession first."
|
|
968
955
|
);
|
|
969
956
|
}
|
|
970
957
|
this.completedTurnObserved = false;
|
|
971
958
|
const request = {
|
|
972
|
-
factoryApiVersion:
|
|
973
|
-
factoryProtocolVersion:
|
|
959
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
960
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
974
961
|
type: "request",
|
|
975
|
-
jsonrpc:
|
|
962
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
976
963
|
id: _nullishCoalesce(requestId, () => ( _uuid.v4.call(void 0, ))),
|
|
977
964
|
method: "droid.add_user_message" /* ADD_USER_MESSAGE */,
|
|
978
965
|
params: {
|
|
@@ -981,9 +968,9 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
981
968
|
}
|
|
982
969
|
};
|
|
983
970
|
const rawResponse = await this.sendRequest(request);
|
|
984
|
-
const response =
|
|
971
|
+
const response = _chunkOBPHU4RTjs.AddUserMessageResponseSchema.parse(rawResponse);
|
|
985
972
|
if (response.error) {
|
|
986
|
-
throw new (0,
|
|
973
|
+
throw new (0, _chunkOBPHU4RTjs.ProtocolError)("Add user message request failed", {
|
|
987
974
|
requestId: request.id,
|
|
988
975
|
code: response.error.code,
|
|
989
976
|
message: response.error.message,
|
|
@@ -1000,23 +987,23 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1000
987
|
*/
|
|
1001
988
|
async appendMessages(params, requestId) {
|
|
1002
989
|
if (!this.currentSessionId) {
|
|
1003
|
-
throw new (0,
|
|
990
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1004
991
|
"No active session. Call initializeSession or loadSession first."
|
|
1005
992
|
);
|
|
1006
993
|
}
|
|
1007
994
|
const request = {
|
|
1008
|
-
factoryApiVersion:
|
|
1009
|
-
factoryProtocolVersion:
|
|
995
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
996
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1010
997
|
type: "request",
|
|
1011
|
-
jsonrpc:
|
|
998
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1012
999
|
id: _nullishCoalesce(requestId, () => ( _uuid.v4.call(void 0, ))),
|
|
1013
1000
|
method: "droid.append_messages" /* APPEND_MESSAGES */,
|
|
1014
1001
|
params
|
|
1015
1002
|
};
|
|
1016
1003
|
const rawResponse = await this.sendRequest(request);
|
|
1017
|
-
const response =
|
|
1004
|
+
const response = _chunkOBPHU4RTjs.AppendMessagesResponseSchema.parse(rawResponse);
|
|
1018
1005
|
if (response.error) {
|
|
1019
|
-
throw new (0,
|
|
1006
|
+
throw new (0, _chunkOBPHU4RTjs.ProtocolError)("Append messages request failed", {
|
|
1020
1007
|
requestId: request.id,
|
|
1021
1008
|
code: response.error.code,
|
|
1022
1009
|
message: response.error.message,
|
|
@@ -1027,23 +1014,23 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1027
1014
|
}
|
|
1028
1015
|
async resolveQueuedUserMessage(params) {
|
|
1029
1016
|
if (!this.currentSessionId) {
|
|
1030
|
-
throw new (0,
|
|
1017
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1031
1018
|
"No active session. Call initializeSession or loadSession first."
|
|
1032
1019
|
);
|
|
1033
1020
|
}
|
|
1034
1021
|
const request = {
|
|
1035
|
-
factoryApiVersion:
|
|
1036
|
-
factoryProtocolVersion:
|
|
1022
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1023
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1037
1024
|
type: "request",
|
|
1038
|
-
jsonrpc:
|
|
1025
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1039
1026
|
id: _uuid.v4.call(void 0, ),
|
|
1040
1027
|
method: "droid.resolve_queued_user_message" /* RESOLVE_QUEUED_USER_MESSAGE */,
|
|
1041
1028
|
params
|
|
1042
1029
|
};
|
|
1043
1030
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1044
|
-
const response =
|
|
1031
|
+
const response = _chunkOBPHU4RTjs.ResolveQueuedUserMessageResponseSchema.parse(rawResponse);
|
|
1045
1032
|
if (response.error) {
|
|
1046
|
-
throw new (0,
|
|
1033
|
+
throw new (0, _chunkOBPHU4RTjs.ProtocolError)("Resolve queued user message request failed", {
|
|
1047
1034
|
requestId: request.id,
|
|
1048
1035
|
code: response.error.code,
|
|
1049
1036
|
message: response.error.message,
|
|
@@ -1054,23 +1041,23 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1054
1041
|
}
|
|
1055
1042
|
async interruptSession(params = {}) {
|
|
1056
1043
|
if (!this.currentSessionId) {
|
|
1057
|
-
throw new (0,
|
|
1044
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1058
1045
|
"No active session. Call initializeSession or loadSession first."
|
|
1059
1046
|
);
|
|
1060
1047
|
}
|
|
1061
1048
|
const request = {
|
|
1062
|
-
factoryApiVersion:
|
|
1063
|
-
factoryProtocolVersion:
|
|
1049
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1050
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1064
1051
|
type: "request",
|
|
1065
|
-
jsonrpc:
|
|
1052
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1066
1053
|
id: _uuid.v4.call(void 0, ),
|
|
1067
1054
|
method: "droid.interrupt_session" /* INTERRUPT_SESSION */,
|
|
1068
1055
|
params
|
|
1069
1056
|
};
|
|
1070
1057
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1071
|
-
const response =
|
|
1058
|
+
const response = _chunkOBPHU4RTjs.InterruptSessionResponseSchema.parse(rawResponse);
|
|
1072
1059
|
if (response.error) {
|
|
1073
|
-
throw new (0,
|
|
1060
|
+
throw new (0, _chunkOBPHU4RTjs.ProtocolError)("Interrupt session request failed", {
|
|
1074
1061
|
requestId: request.id,
|
|
1075
1062
|
code: response.error.code,
|
|
1076
1063
|
message: response.error.message,
|
|
@@ -1081,23 +1068,23 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1081
1068
|
}
|
|
1082
1069
|
async closeSession(params = {}) {
|
|
1083
1070
|
if (!this.currentSessionId) {
|
|
1084
|
-
throw new (0,
|
|
1071
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1085
1072
|
"No active session. Call initializeSession or loadSession first."
|
|
1086
1073
|
);
|
|
1087
1074
|
}
|
|
1088
1075
|
const request = {
|
|
1089
|
-
factoryApiVersion:
|
|
1090
|
-
factoryProtocolVersion:
|
|
1076
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1077
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1091
1078
|
type: "request",
|
|
1092
|
-
jsonrpc:
|
|
1079
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1093
1080
|
id: _uuid.v4.call(void 0, ),
|
|
1094
1081
|
method: "droid.close_session" /* CLOSE_SESSION */,
|
|
1095
1082
|
params
|
|
1096
1083
|
};
|
|
1097
1084
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1098
|
-
const response =
|
|
1085
|
+
const response = _chunkOBPHU4RTjs.CloseSessionResponseSchema.parse(rawResponse);
|
|
1099
1086
|
if (response.error) {
|
|
1100
|
-
throw new (0,
|
|
1087
|
+
throw new (0, _chunkOBPHU4RTjs.ProtocolError)("Close session request failed", {
|
|
1101
1088
|
requestId: request.id,
|
|
1102
1089
|
code: response.error.code,
|
|
1103
1090
|
message: response.error.message,
|
|
@@ -1108,23 +1095,23 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1108
1095
|
}
|
|
1109
1096
|
async killWorkerSession(params) {
|
|
1110
1097
|
if (!this.currentSessionId) {
|
|
1111
|
-
throw new (0,
|
|
1098
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1112
1099
|
"No active session. Call initializeSession or loadSession first."
|
|
1113
1100
|
);
|
|
1114
1101
|
}
|
|
1115
1102
|
const request = {
|
|
1116
|
-
factoryApiVersion:
|
|
1117
|
-
factoryProtocolVersion:
|
|
1103
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1104
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1118
1105
|
type: "request",
|
|
1119
|
-
jsonrpc:
|
|
1106
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1120
1107
|
id: _uuid.v4.call(void 0, ),
|
|
1121
1108
|
method: "droid.kill_worker_session" /* KILL_WORKER_SESSION */,
|
|
1122
1109
|
params
|
|
1123
1110
|
};
|
|
1124
1111
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1125
|
-
const response =
|
|
1112
|
+
const response = _chunkOBPHU4RTjs.KillWorkerSessionResponseSchema.parse(rawResponse);
|
|
1126
1113
|
if (response.error) {
|
|
1127
|
-
throw new (0,
|
|
1114
|
+
throw new (0, _chunkOBPHU4RTjs.ProtocolError)("Kill worker session request failed", {
|
|
1128
1115
|
requestId: request.id,
|
|
1129
1116
|
code: response.error.code,
|
|
1130
1117
|
message: response.error.message,
|
|
@@ -1135,23 +1122,23 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1135
1122
|
}
|
|
1136
1123
|
async updateSessionSettings(params, requestId) {
|
|
1137
1124
|
if (!this.currentSessionId) {
|
|
1138
|
-
throw new (0,
|
|
1125
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1139
1126
|
"No active session. Call initializeSession or loadSession first."
|
|
1140
1127
|
);
|
|
1141
1128
|
}
|
|
1142
1129
|
const request = {
|
|
1143
|
-
factoryApiVersion:
|
|
1144
|
-
factoryProtocolVersion:
|
|
1130
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1131
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1145
1132
|
type: "request",
|
|
1146
|
-
jsonrpc:
|
|
1133
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1147
1134
|
id: _nullishCoalesce(requestId, () => ( _uuid.v4.call(void 0, ))),
|
|
1148
1135
|
method: "droid.update_session_settings" /* UPDATE_SESSION_SETTINGS */,
|
|
1149
1136
|
params
|
|
1150
1137
|
};
|
|
1151
1138
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1152
|
-
const responseParsed =
|
|
1139
|
+
const responseParsed = _chunkOBPHU4RTjs.UpdateSessionSettingsResponseSchema.safeParse(rawResponse);
|
|
1153
1140
|
if (!responseParsed.success) {
|
|
1154
|
-
throw new (0,
|
|
1141
|
+
throw new (0, _chunkOBPHU4RTjs.ProtocolError)(
|
|
1155
1142
|
"Invalid update session settings response format",
|
|
1156
1143
|
{
|
|
1157
1144
|
requestId: request.id,
|
|
@@ -1163,7 +1150,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1163
1150
|
}
|
|
1164
1151
|
const response = responseParsed.data;
|
|
1165
1152
|
if (response.error) {
|
|
1166
|
-
throw new (0,
|
|
1153
|
+
throw new (0, _chunkOBPHU4RTjs.ProtocolError)("Update session settings request failed", {
|
|
1167
1154
|
requestId: request.id,
|
|
1168
1155
|
code: response.error.code,
|
|
1169
1156
|
message: response.error.message,
|
|
@@ -1174,23 +1161,23 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1174
1161
|
}
|
|
1175
1162
|
async changeWorkingDirectory(params) {
|
|
1176
1163
|
if (!this.currentSessionId) {
|
|
1177
|
-
throw new (0,
|
|
1164
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1178
1165
|
"No active session. Call initializeSession or loadSession first."
|
|
1179
1166
|
);
|
|
1180
1167
|
}
|
|
1181
1168
|
const request = {
|
|
1182
|
-
factoryApiVersion:
|
|
1183
|
-
factoryProtocolVersion:
|
|
1169
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1170
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1184
1171
|
type: "request",
|
|
1185
|
-
jsonrpc:
|
|
1172
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1186
1173
|
id: _uuid.v4.call(void 0, ),
|
|
1187
1174
|
method: "droid.change_working_directory" /* CHANGE_WORKING_DIRECTORY */,
|
|
1188
1175
|
params
|
|
1189
1176
|
};
|
|
1190
1177
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1191
|
-
const response =
|
|
1178
|
+
const response = _chunkOBPHU4RTjs.ChangeWorkingDirectoryResponseSchema.parse(rawResponse);
|
|
1192
1179
|
if (response.error) {
|
|
1193
|
-
throw new (0,
|
|
1180
|
+
throw new (0, _chunkOBPHU4RTjs.ProtocolError)("Change working directory request failed", {
|
|
1194
1181
|
requestId: request.id,
|
|
1195
1182
|
code: response.error.code,
|
|
1196
1183
|
message: response.error.message,
|
|
@@ -1201,15 +1188,15 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1201
1188
|
}
|
|
1202
1189
|
async toggleMcpServer(params) {
|
|
1203
1190
|
if (!this.currentSessionId) {
|
|
1204
|
-
throw new (0,
|
|
1191
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1205
1192
|
"No active session. Call initializeSession or loadSession first."
|
|
1206
1193
|
);
|
|
1207
1194
|
}
|
|
1208
1195
|
const request = {
|
|
1209
|
-
factoryApiVersion:
|
|
1210
|
-
factoryProtocolVersion:
|
|
1196
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1197
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1211
1198
|
type: "request",
|
|
1212
|
-
jsonrpc:
|
|
1199
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1213
1200
|
id: _uuid.v4.call(void 0, ),
|
|
1214
1201
|
method: "droid.toggle_mcp_server" /* TOGGLE_MCP_SERVER */,
|
|
1215
1202
|
params: {
|
|
@@ -1219,20 +1206,20 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1219
1206
|
}
|
|
1220
1207
|
};
|
|
1221
1208
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1222
|
-
const response =
|
|
1209
|
+
const response = _chunkOBPHU4RTjs.ToggleMcpServerResponseSchema.parse(rawResponse);
|
|
1223
1210
|
return response;
|
|
1224
1211
|
}
|
|
1225
1212
|
async authenticateMcpServer(params) {
|
|
1226
1213
|
if (!this.currentSessionId) {
|
|
1227
|
-
throw new (0,
|
|
1214
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1228
1215
|
"No active session. Call initializeSession or loadSession first."
|
|
1229
1216
|
);
|
|
1230
1217
|
}
|
|
1231
1218
|
const request = {
|
|
1232
|
-
factoryApiVersion:
|
|
1233
|
-
factoryProtocolVersion:
|
|
1219
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1220
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1234
1221
|
type: "request",
|
|
1235
|
-
jsonrpc:
|
|
1222
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1236
1223
|
id: _uuid.v4.call(void 0, ),
|
|
1237
1224
|
method: "droid.authenticate_mcp_server" /* AUTHENTICATE_MCP_SERVER */,
|
|
1238
1225
|
params: {
|
|
@@ -1240,20 +1227,20 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1240
1227
|
}
|
|
1241
1228
|
};
|
|
1242
1229
|
const rawResponse = await this.sendRequest(request, MCP_AUTH_TIMEOUT2);
|
|
1243
|
-
const response =
|
|
1230
|
+
const response = _chunkOBPHU4RTjs.AuthenticateMcpServerResponseSchema.parse(rawResponse);
|
|
1244
1231
|
return response;
|
|
1245
1232
|
}
|
|
1246
1233
|
async cancelMcpAuth(params) {
|
|
1247
1234
|
if (!this.currentSessionId) {
|
|
1248
|
-
throw new (0,
|
|
1235
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1249
1236
|
"No active session. Call initializeSession or loadSession first."
|
|
1250
1237
|
);
|
|
1251
1238
|
}
|
|
1252
1239
|
const request = {
|
|
1253
|
-
factoryApiVersion:
|
|
1254
|
-
factoryProtocolVersion:
|
|
1240
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1241
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1255
1242
|
type: "request",
|
|
1256
|
-
jsonrpc:
|
|
1243
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1257
1244
|
id: _uuid.v4.call(void 0, ),
|
|
1258
1245
|
method: "droid.cancel_mcp_auth" /* CANCEL_MCP_AUTH */,
|
|
1259
1246
|
params: {
|
|
@@ -1261,20 +1248,20 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1261
1248
|
}
|
|
1262
1249
|
};
|
|
1263
1250
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1264
|
-
const response =
|
|
1251
|
+
const response = _chunkOBPHU4RTjs.CancelMcpAuthResponseSchema.parse(rawResponse);
|
|
1265
1252
|
return response;
|
|
1266
1253
|
}
|
|
1267
1254
|
async clearMcpAuth(params) {
|
|
1268
1255
|
if (!this.currentSessionId) {
|
|
1269
|
-
throw new (0,
|
|
1256
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1270
1257
|
"No active session. Call initializeSession or loadSession first."
|
|
1271
1258
|
);
|
|
1272
1259
|
}
|
|
1273
1260
|
const request = {
|
|
1274
|
-
factoryApiVersion:
|
|
1275
|
-
factoryProtocolVersion:
|
|
1261
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1262
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1276
1263
|
type: "request",
|
|
1277
|
-
jsonrpc:
|
|
1264
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1278
1265
|
id: _uuid.v4.call(void 0, ),
|
|
1279
1266
|
method: "droid.clear_mcp_auth" /* CLEAR_MCP_AUTH */,
|
|
1280
1267
|
params: {
|
|
@@ -1282,12 +1269,12 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1282
1269
|
}
|
|
1283
1270
|
};
|
|
1284
1271
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1285
|
-
const response =
|
|
1272
|
+
const response = _chunkOBPHU4RTjs.ClearMcpAuthResponseSchema.parse(rawResponse);
|
|
1286
1273
|
return response;
|
|
1287
1274
|
}
|
|
1288
1275
|
async addMcpServer(params) {
|
|
1289
1276
|
if (!this.currentSessionId) {
|
|
1290
|
-
throw new (0,
|
|
1277
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1291
1278
|
"No active session. Call initializeSession or loadSession first."
|
|
1292
1279
|
);
|
|
1293
1280
|
}
|
|
@@ -1295,302 +1282,342 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1295
1282
|
this.requireMcpOAuthOptOutSupport();
|
|
1296
1283
|
}
|
|
1297
1284
|
const request = {
|
|
1298
|
-
factoryApiVersion:
|
|
1299
|
-
factoryProtocolVersion:
|
|
1285
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1286
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1300
1287
|
type: "request",
|
|
1301
|
-
jsonrpc:
|
|
1288
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1302
1289
|
id: _uuid.v4.call(void 0, ),
|
|
1303
1290
|
method: "droid.add_mcp_server" /* ADD_MCP_SERVER */,
|
|
1304
1291
|
params
|
|
1305
1292
|
};
|
|
1306
1293
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1307
|
-
const response =
|
|
1294
|
+
const response = _chunkOBPHU4RTjs.AddMcpServerResponseSchema.parse(rawResponse);
|
|
1308
1295
|
return response;
|
|
1309
1296
|
}
|
|
1310
1297
|
async removeMcpServer(params) {
|
|
1311
1298
|
if (!this.currentSessionId) {
|
|
1312
|
-
throw new (0,
|
|
1299
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1313
1300
|
"No active session. Call initializeSession or loadSession first."
|
|
1314
1301
|
);
|
|
1315
1302
|
}
|
|
1316
1303
|
const request = {
|
|
1317
|
-
factoryApiVersion:
|
|
1318
|
-
factoryProtocolVersion:
|
|
1304
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1305
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1319
1306
|
type: "request",
|
|
1320
|
-
jsonrpc:
|
|
1307
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1321
1308
|
id: _uuid.v4.call(void 0, ),
|
|
1322
1309
|
method: "droid.remove_mcp_server" /* REMOVE_MCP_SERVER */,
|
|
1323
1310
|
params
|
|
1324
1311
|
};
|
|
1325
1312
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1326
|
-
const response =
|
|
1313
|
+
const response = _chunkOBPHU4RTjs.RemoveMcpServerResponseSchema.parse(rawResponse);
|
|
1327
1314
|
return response;
|
|
1328
1315
|
}
|
|
1329
1316
|
async listModels(params = {}) {
|
|
1330
1317
|
const request = {
|
|
1331
|
-
factoryApiVersion:
|
|
1332
|
-
factoryProtocolVersion:
|
|
1318
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1319
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1333
1320
|
type: "request",
|
|
1334
|
-
jsonrpc:
|
|
1321
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1335
1322
|
id: _uuid.v4.call(void 0, ),
|
|
1336
1323
|
method: "droid.list_models" /* LIST_MODELS */,
|
|
1337
1324
|
params
|
|
1338
1325
|
};
|
|
1339
1326
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1340
|
-
return
|
|
1327
|
+
return _chunkOBPHU4RTjs.ListModelsResponseSchema.parse(rawResponse);
|
|
1341
1328
|
}
|
|
1342
1329
|
async listMcpRegistry() {
|
|
1343
1330
|
if (!this.currentSessionId) {
|
|
1344
|
-
throw new (0,
|
|
1331
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1345
1332
|
"No active session. Call initializeSession or loadSession first."
|
|
1346
1333
|
);
|
|
1347
1334
|
}
|
|
1348
1335
|
const request = {
|
|
1349
|
-
factoryApiVersion:
|
|
1350
|
-
factoryProtocolVersion:
|
|
1336
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1337
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1351
1338
|
type: "request",
|
|
1352
|
-
jsonrpc:
|
|
1339
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1353
1340
|
id: _uuid.v4.call(void 0, ),
|
|
1354
1341
|
method: "droid.list_mcp_registry" /* LIST_MCP_REGISTRY */,
|
|
1355
1342
|
params: {}
|
|
1356
1343
|
};
|
|
1357
1344
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1358
|
-
const response =
|
|
1345
|
+
const response = _chunkOBPHU4RTjs.ListMcpRegistryResponseSchema.parse(rawResponse);
|
|
1359
1346
|
return response;
|
|
1360
1347
|
}
|
|
1348
|
+
async refreshConnectorToolCatalog(params = {}) {
|
|
1349
|
+
if (!this.currentSessionId) {
|
|
1350
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1351
|
+
"No active session. Call initializeSession or loadSession first."
|
|
1352
|
+
);
|
|
1353
|
+
}
|
|
1354
|
+
const request = {
|
|
1355
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1356
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1357
|
+
type: "request",
|
|
1358
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1359
|
+
id: _uuid.v4.call(void 0, ),
|
|
1360
|
+
method: "droid.refresh_connector_tool_catalog" /* REFRESH_CONNECTOR_TOOL_CATALOG */,
|
|
1361
|
+
params
|
|
1362
|
+
};
|
|
1363
|
+
const response = await this.sendRequest(request, this.requestTimeout);
|
|
1364
|
+
return _chunkOBPHU4RTjs.RefreshConnectorToolCatalogResponseSchema.parse(response);
|
|
1365
|
+
}
|
|
1361
1366
|
async listMcpTools() {
|
|
1362
1367
|
if (!this.currentSessionId) {
|
|
1363
|
-
throw new (0,
|
|
1368
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1364
1369
|
"No active session. Call initializeSession or loadSession first."
|
|
1365
1370
|
);
|
|
1366
1371
|
}
|
|
1367
1372
|
const request = {
|
|
1368
|
-
factoryApiVersion:
|
|
1369
|
-
factoryProtocolVersion:
|
|
1373
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1374
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1370
1375
|
type: "request",
|
|
1371
|
-
jsonrpc:
|
|
1376
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1372
1377
|
id: _uuid.v4.call(void 0, ),
|
|
1373
1378
|
method: "droid.list_mcp_tools" /* LIST_MCP_TOOLS */,
|
|
1374
1379
|
params: {}
|
|
1375
1380
|
};
|
|
1376
1381
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1377
|
-
const response =
|
|
1382
|
+
const response = _chunkOBPHU4RTjs.ListMcpToolsResponseSchema.parse(rawResponse);
|
|
1378
1383
|
return response;
|
|
1379
1384
|
}
|
|
1380
1385
|
async listTools(params = {}) {
|
|
1386
|
+
const schemasRequested = params.includeSchemas === true;
|
|
1381
1387
|
const request = {
|
|
1382
|
-
factoryApiVersion:
|
|
1383
|
-
factoryProtocolVersion:
|
|
1388
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1389
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1384
1390
|
type: "request",
|
|
1385
|
-
jsonrpc:
|
|
1391
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1386
1392
|
id: _uuid.v4.call(void 0, ),
|
|
1387
1393
|
method: "droid.list_tools" /* LIST_TOOLS */,
|
|
1388
1394
|
params
|
|
1389
1395
|
};
|
|
1390
1396
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1391
|
-
const response =
|
|
1392
|
-
|
|
1397
|
+
const response = _chunkOBPHU4RTjs.ListToolsResponseSchema.parse(rawResponse);
|
|
1398
|
+
if (!schemasRequested || !("result" in response)) {
|
|
1399
|
+
return response;
|
|
1400
|
+
}
|
|
1401
|
+
const strictResult = _chunkOBPHU4RTjs.ListToolsResultWithSchemasSchema.safeParse(
|
|
1402
|
+
response.result
|
|
1403
|
+
);
|
|
1404
|
+
if (strictResult.success) {
|
|
1405
|
+
return response;
|
|
1406
|
+
}
|
|
1407
|
+
const result = _chunkOBPHU4RTjs.ListToolsResultSchema.parse(response.result);
|
|
1408
|
+
const missingSchemaIds = [];
|
|
1409
|
+
for (const tool2 of result.tools) {
|
|
1410
|
+
if (tool2.schemas === void 0) {
|
|
1411
|
+
missingSchemaIds.push(tool2.llmId);
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
if (missingSchemaIds.length > 0) {
|
|
1415
|
+
throw new (0, _chunkOBPHU4RTjs.ProtocolError)(
|
|
1416
|
+
`The installed Droid version did not return requested schemas for tool IDs: ${missingSchemaIds.join(", ")}. Update Droid and try again.`
|
|
1417
|
+
);
|
|
1418
|
+
}
|
|
1419
|
+
throw strictResult.error;
|
|
1393
1420
|
}
|
|
1394
1421
|
async listMcpServers() {
|
|
1395
1422
|
if (!this.currentSessionId) {
|
|
1396
|
-
throw new (0,
|
|
1423
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1397
1424
|
"No active session. Call initializeSession or loadSession first."
|
|
1398
1425
|
);
|
|
1399
1426
|
}
|
|
1400
1427
|
const request = {
|
|
1401
|
-
factoryApiVersion:
|
|
1402
|
-
factoryProtocolVersion:
|
|
1428
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1429
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1403
1430
|
type: "request",
|
|
1404
|
-
jsonrpc:
|
|
1431
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1405
1432
|
id: _uuid.v4.call(void 0, ),
|
|
1406
1433
|
method: "droid.list_mcp_servers" /* LIST_MCP_SERVERS */,
|
|
1407
1434
|
params: {}
|
|
1408
1435
|
};
|
|
1409
1436
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1410
|
-
const response =
|
|
1437
|
+
const response = _chunkOBPHU4RTjs.ListMcpServersResponseSchema.parse(rawResponse);
|
|
1411
1438
|
return response;
|
|
1412
1439
|
}
|
|
1413
1440
|
async toggleMcpTool(serverName, toolName, enabled) {
|
|
1414
1441
|
if (!this.currentSessionId) {
|
|
1415
|
-
throw new (0,
|
|
1442
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1416
1443
|
"No active session. Call initializeSession or loadSession first."
|
|
1417
1444
|
);
|
|
1418
1445
|
}
|
|
1419
1446
|
const request = {
|
|
1420
|
-
factoryApiVersion:
|
|
1421
|
-
factoryProtocolVersion:
|
|
1447
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1448
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1422
1449
|
type: "request",
|
|
1423
|
-
jsonrpc:
|
|
1450
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1424
1451
|
id: _uuid.v4.call(void 0, ),
|
|
1425
1452
|
method: "droid.toggle_mcp_tool" /* TOGGLE_MCP_TOOL */,
|
|
1426
1453
|
params: { serverName, toolName, enabled }
|
|
1427
1454
|
};
|
|
1428
1455
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1429
|
-
const response =
|
|
1456
|
+
const response = _chunkOBPHU4RTjs.ToggleMcpToolResponseSchema.parse(rawResponse);
|
|
1430
1457
|
return response;
|
|
1431
1458
|
}
|
|
1432
1459
|
async submitMcpAuthCode(params) {
|
|
1433
1460
|
if (!this.currentSessionId) {
|
|
1434
|
-
throw new (0,
|
|
1461
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1435
1462
|
"No active session. Call initializeSession or loadSession first."
|
|
1436
1463
|
);
|
|
1437
1464
|
}
|
|
1438
1465
|
const request = {
|
|
1439
|
-
factoryApiVersion:
|
|
1440
|
-
factoryProtocolVersion:
|
|
1466
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1467
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1441
1468
|
type: "request",
|
|
1442
|
-
jsonrpc:
|
|
1469
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1443
1470
|
id: _uuid.v4.call(void 0, ),
|
|
1444
1471
|
method: "droid.submit_mcp_auth_code" /* SUBMIT_MCP_AUTH_CODE */,
|
|
1445
1472
|
params
|
|
1446
1473
|
};
|
|
1447
1474
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1448
|
-
const response =
|
|
1475
|
+
const response = _chunkOBPHU4RTjs.SubmitMcpAuthCodeResponseSchema.parse(rawResponse);
|
|
1449
1476
|
return response;
|
|
1450
1477
|
}
|
|
1451
1478
|
async submitMcpAuthError(params) {
|
|
1452
1479
|
if (!this.currentSessionId) {
|
|
1453
|
-
throw new (0,
|
|
1480
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1454
1481
|
"No active session. Call initializeSession or loadSession first."
|
|
1455
1482
|
);
|
|
1456
1483
|
}
|
|
1457
1484
|
const request = {
|
|
1458
|
-
factoryApiVersion:
|
|
1459
|
-
factoryProtocolVersion:
|
|
1485
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1486
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1460
1487
|
type: "request",
|
|
1461
|
-
jsonrpc:
|
|
1488
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1462
1489
|
id: _uuid.v4.call(void 0, ),
|
|
1463
1490
|
method: "droid.submit_mcp_auth_error" /* SUBMIT_MCP_AUTH_ERROR */,
|
|
1464
1491
|
params
|
|
1465
1492
|
};
|
|
1466
1493
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1467
|
-
const response =
|
|
1494
|
+
const response = _chunkOBPHU4RTjs.SubmitMcpAuthErrorResponseSchema.parse(rawResponse);
|
|
1468
1495
|
return response;
|
|
1469
1496
|
}
|
|
1470
|
-
async listSkills() {
|
|
1497
|
+
async listSkills(params = {}) {
|
|
1471
1498
|
if (!this.currentSessionId) {
|
|
1472
|
-
throw new (0,
|
|
1499
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1473
1500
|
"No active session. Call initializeSession or loadSession first."
|
|
1474
1501
|
);
|
|
1475
1502
|
}
|
|
1476
1503
|
const request = {
|
|
1477
|
-
factoryApiVersion:
|
|
1478
|
-
factoryProtocolVersion:
|
|
1504
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1505
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1479
1506
|
type: "request",
|
|
1480
|
-
jsonrpc:
|
|
1507
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1481
1508
|
id: _uuid.v4.call(void 0, ),
|
|
1482
1509
|
method: "droid.list_skills" /* LIST_SKILLS */,
|
|
1483
|
-
params
|
|
1510
|
+
params
|
|
1484
1511
|
};
|
|
1485
1512
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1486
|
-
const response =
|
|
1513
|
+
const response = _chunkOBPHU4RTjs.ListSkillsResponseSchema.parse(rawResponse);
|
|
1487
1514
|
return response;
|
|
1488
1515
|
}
|
|
1489
1516
|
async setSkillDisabled(skillName, disabled, settingsLevel) {
|
|
1490
1517
|
if (!this.currentSessionId) {
|
|
1491
|
-
throw new (0,
|
|
1518
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1492
1519
|
"No active session. Call initializeSession or loadSession first."
|
|
1493
1520
|
);
|
|
1494
1521
|
}
|
|
1495
1522
|
const request = {
|
|
1496
|
-
factoryApiVersion:
|
|
1497
|
-
factoryProtocolVersion:
|
|
1523
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1524
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1498
1525
|
type: "request",
|
|
1499
|
-
jsonrpc:
|
|
1526
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1500
1527
|
id: _uuid.v4.call(void 0, ),
|
|
1501
1528
|
method: "droid.set_skill_disabled" /* SET_SKILL_DISABLED */,
|
|
1502
1529
|
params: { skillName, disabled, settingsLevel }
|
|
1503
1530
|
};
|
|
1504
1531
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1505
|
-
return
|
|
1532
|
+
return _chunkOBPHU4RTjs.SetSkillDisabledResponseSchema.parse(rawResponse);
|
|
1506
1533
|
}
|
|
1507
1534
|
async listCommands() {
|
|
1508
1535
|
if (!this.currentSessionId) {
|
|
1509
|
-
throw new (0,
|
|
1536
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1510
1537
|
"No active session. Call initializeSession or loadSession first."
|
|
1511
1538
|
);
|
|
1512
1539
|
}
|
|
1513
1540
|
const request = {
|
|
1514
|
-
factoryApiVersion:
|
|
1515
|
-
factoryProtocolVersion:
|
|
1541
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1542
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1516
1543
|
type: "request",
|
|
1517
|
-
jsonrpc:
|
|
1544
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1518
1545
|
id: _uuid.v4.call(void 0, ),
|
|
1519
1546
|
method: "droid.list_commands" /* LIST_COMMANDS */,
|
|
1520
1547
|
params: {}
|
|
1521
1548
|
};
|
|
1522
1549
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1523
|
-
const response =
|
|
1550
|
+
const response = _chunkOBPHU4RTjs.ListCommandsResponseSchema.parse(rawResponse);
|
|
1524
1551
|
return response;
|
|
1525
1552
|
}
|
|
1526
1553
|
async getContextStats() {
|
|
1527
1554
|
if (!this.currentSessionId) {
|
|
1528
|
-
throw new (0,
|
|
1555
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1529
1556
|
"No active session. Call initializeSession or loadSession first."
|
|
1530
1557
|
);
|
|
1531
1558
|
}
|
|
1532
1559
|
const request = {
|
|
1533
|
-
factoryApiVersion:
|
|
1534
|
-
factoryProtocolVersion:
|
|
1560
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1561
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1535
1562
|
type: "request",
|
|
1536
|
-
jsonrpc:
|
|
1563
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1537
1564
|
id: _uuid.v4.call(void 0, ),
|
|
1538
1565
|
method: "droid.get_context_stats" /* GET_CONTEXT_STATS */,
|
|
1539
1566
|
params: {}
|
|
1540
1567
|
};
|
|
1541
1568
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1542
|
-
const response =
|
|
1569
|
+
const response = _chunkOBPHU4RTjs.GetContextStatsResponseSchema.parse(rawResponse);
|
|
1543
1570
|
return response;
|
|
1544
1571
|
}
|
|
1545
1572
|
async getContextBreakdown() {
|
|
1546
1573
|
if (!this.currentSessionId) {
|
|
1547
|
-
throw new (0,
|
|
1574
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1548
1575
|
"No active session. Call initializeSession or loadSession first."
|
|
1549
1576
|
);
|
|
1550
1577
|
}
|
|
1551
1578
|
const request = {
|
|
1552
|
-
factoryApiVersion:
|
|
1553
|
-
factoryProtocolVersion:
|
|
1579
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1580
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1554
1581
|
type: "request",
|
|
1555
|
-
jsonrpc:
|
|
1582
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1556
1583
|
id: _uuid.v4.call(void 0, ),
|
|
1557
1584
|
method: "droid.get_context_breakdown" /* GET_CONTEXT_BREAKDOWN */,
|
|
1558
1585
|
params: {}
|
|
1559
1586
|
};
|
|
1560
1587
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1561
|
-
const response =
|
|
1588
|
+
const response = _chunkOBPHU4RTjs.GetContextBreakdownResponseSchema.parse(rawResponse);
|
|
1562
1589
|
return response;
|
|
1563
1590
|
}
|
|
1564
1591
|
async submitBugReport(userComment, clientLogs, source) {
|
|
1565
1592
|
if (!this.currentSessionId) {
|
|
1566
|
-
throw new (0,
|
|
1593
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1567
1594
|
"No active session. Call initializeSession or loadSession first."
|
|
1568
1595
|
);
|
|
1569
1596
|
}
|
|
1570
1597
|
const request = {
|
|
1571
|
-
factoryApiVersion:
|
|
1572
|
-
factoryProtocolVersion:
|
|
1598
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1599
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1573
1600
|
type: "request",
|
|
1574
|
-
jsonrpc:
|
|
1601
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1575
1602
|
id: _uuid.v4.call(void 0, ),
|
|
1576
1603
|
method: "droid.submit_bug_report" /* SUBMIT_BUG_REPORT */,
|
|
1577
1604
|
params: { userComment, clientLogs, source }
|
|
1578
1605
|
};
|
|
1579
1606
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1580
|
-
const response =
|
|
1607
|
+
const response = _chunkOBPHU4RTjs.SubmitBugReportResponseSchema.parse(rawResponse);
|
|
1581
1608
|
return response;
|
|
1582
1609
|
}
|
|
1583
1610
|
async getRewindInfo(params, timeout = this.requestTimeout) {
|
|
1584
1611
|
if (!this.currentSessionId) {
|
|
1585
|
-
throw new (0,
|
|
1612
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1586
1613
|
"No active session. Call initializeSession or loadSession first."
|
|
1587
1614
|
);
|
|
1588
1615
|
}
|
|
1589
1616
|
const request = {
|
|
1590
|
-
factoryApiVersion:
|
|
1591
|
-
factoryProtocolVersion:
|
|
1617
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1618
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1592
1619
|
type: "request",
|
|
1593
|
-
jsonrpc:
|
|
1620
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1594
1621
|
id: _uuid.v4.call(void 0, ),
|
|
1595
1622
|
method: "droid.get_rewind_info" /* GET_REWIND_INFO */,
|
|
1596
1623
|
params: {
|
|
@@ -1599,19 +1626,19 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1599
1626
|
}
|
|
1600
1627
|
};
|
|
1601
1628
|
const rawResponse = await this.sendRequest(request, timeout);
|
|
1602
|
-
return
|
|
1629
|
+
return _chunkOBPHU4RTjs.GetRewindInfoResponseSchema.parse(rawResponse);
|
|
1603
1630
|
}
|
|
1604
1631
|
async executeRewind(params) {
|
|
1605
1632
|
if (!this.currentSessionId) {
|
|
1606
|
-
throw new (0,
|
|
1633
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1607
1634
|
"No active session. Call initializeSession or loadSession first."
|
|
1608
1635
|
);
|
|
1609
1636
|
}
|
|
1610
1637
|
const request = {
|
|
1611
|
-
factoryApiVersion:
|
|
1612
|
-
factoryProtocolVersion:
|
|
1638
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1639
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1613
1640
|
type: "request",
|
|
1614
|
-
jsonrpc:
|
|
1641
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1615
1642
|
id: _uuid.v4.call(void 0, ),
|
|
1616
1643
|
method: "droid.execute_rewind" /* EXECUTE_REWIND */,
|
|
1617
1644
|
params: {
|
|
@@ -1626,57 +1653,58 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1626
1653
|
request,
|
|
1627
1654
|
this.requestTimeout * 2
|
|
1628
1655
|
);
|
|
1629
|
-
return
|
|
1656
|
+
return _chunkOBPHU4RTjs.ExecuteRewindResponseSchema.parse(rawResponse);
|
|
1630
1657
|
}
|
|
1631
1658
|
async compactSession(params) {
|
|
1632
1659
|
if (!this.currentSessionId) {
|
|
1633
|
-
throw new (0,
|
|
1660
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1634
1661
|
"No active session. Call initializeSession or loadSession first."
|
|
1635
1662
|
);
|
|
1636
1663
|
}
|
|
1637
1664
|
const request = {
|
|
1638
|
-
factoryApiVersion:
|
|
1639
|
-
factoryProtocolVersion:
|
|
1665
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1666
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1640
1667
|
type: "request",
|
|
1641
|
-
jsonrpc:
|
|
1668
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1642
1669
|
id: _uuid.v4.call(void 0, ),
|
|
1643
1670
|
method: "droid.compact_session" /* COMPACT_SESSION */,
|
|
1644
1671
|
params: {
|
|
1645
|
-
customInstructions: params.customInstructions
|
|
1672
|
+
customInstructions: params.customInstructions,
|
|
1673
|
+
mode: params.mode
|
|
1646
1674
|
}
|
|
1647
1675
|
};
|
|
1648
1676
|
const rawResponse = await this.sendRequest(request, COMPACTION_TIMEOUT2);
|
|
1649
|
-
return
|
|
1677
|
+
return _chunkOBPHU4RTjs.CompactSessionResponseSchema.parse(rawResponse);
|
|
1650
1678
|
}
|
|
1651
1679
|
async forkSession(params) {
|
|
1652
1680
|
if (!this.currentSessionId) {
|
|
1653
|
-
throw new (0,
|
|
1681
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1654
1682
|
"No active session. Call initializeSession or loadSession first."
|
|
1655
1683
|
);
|
|
1656
1684
|
}
|
|
1657
1685
|
const request = {
|
|
1658
|
-
factoryApiVersion:
|
|
1659
|
-
factoryProtocolVersion:
|
|
1686
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1687
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1660
1688
|
type: "request",
|
|
1661
|
-
jsonrpc:
|
|
1689
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1662
1690
|
id: _uuid.v4.call(void 0, ),
|
|
1663
1691
|
method: "droid.fork_session" /* FORK_SESSION */,
|
|
1664
1692
|
params: _nullishCoalesce(params, () => ( {}))
|
|
1665
1693
|
};
|
|
1666
1694
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1667
|
-
return
|
|
1695
|
+
return _chunkOBPHU4RTjs.ForkSessionResponseSchema.parse(rawResponse);
|
|
1668
1696
|
}
|
|
1669
1697
|
async renameSession(params, requestId) {
|
|
1670
1698
|
if (!this.currentSessionId) {
|
|
1671
|
-
throw new (0,
|
|
1699
|
+
throw new (0, _chunkOBPHU4RTjs.SessionError)(
|
|
1672
1700
|
"No active session. Call initializeSession or loadSession first."
|
|
1673
1701
|
);
|
|
1674
1702
|
}
|
|
1675
1703
|
const request = {
|
|
1676
|
-
factoryApiVersion:
|
|
1677
|
-
factoryProtocolVersion:
|
|
1704
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1705
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1678
1706
|
type: "request",
|
|
1679
|
-
jsonrpc:
|
|
1707
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1680
1708
|
id: _nullishCoalesce(requestId, () => ( _uuid.v4.call(void 0, ))),
|
|
1681
1709
|
method: "droid.rename_session" /* RENAME_SESSION */,
|
|
1682
1710
|
params: {
|
|
@@ -1684,27 +1712,27 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1684
1712
|
}
|
|
1685
1713
|
};
|
|
1686
1714
|
const rawResponse = await this.sendRequest(request, this.requestTimeout);
|
|
1687
|
-
return
|
|
1715
|
+
return _chunkOBPHU4RTjs.RenameSessionResponseSchema.parse(rawResponse);
|
|
1688
1716
|
}
|
|
1689
1717
|
async warmupCache() {
|
|
1690
1718
|
const response = {
|
|
1691
|
-
factoryApiVersion:
|
|
1692
|
-
factoryProtocolVersion:
|
|
1719
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
1720
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
1693
1721
|
type: "response",
|
|
1694
|
-
jsonrpc:
|
|
1722
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
1695
1723
|
id: _uuid.v4.call(void 0, ),
|
|
1696
1724
|
result: {}
|
|
1697
1725
|
};
|
|
1698
|
-
return
|
|
1726
|
+
return _chunkOBPHU4RTjs.WarmupCacheResponseSchema.parse(response);
|
|
1699
1727
|
}
|
|
1700
1728
|
onNotification(callback, filter) {
|
|
1701
1729
|
const handler = (notification) => {
|
|
1702
|
-
if (_optionalChain([filter, 'optionalAccess',
|
|
1730
|
+
if (_optionalChain([filter, 'optionalAccess', _8 => _8.type]) !== void 0 && filter.type !== notification.params.notification.type) {
|
|
1703
1731
|
return;
|
|
1704
1732
|
}
|
|
1705
1733
|
try {
|
|
1706
1734
|
callback(notification);
|
|
1707
|
-
} catch (
|
|
1735
|
+
} catch (e2) {
|
|
1708
1736
|
}
|
|
1709
1737
|
};
|
|
1710
1738
|
this.on("session_notification" /* SESSION_NOTIFICATION */, handler);
|
|
@@ -1714,7 +1742,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1714
1742
|
const handler = (error) => {
|
|
1715
1743
|
try {
|
|
1716
1744
|
callback(error);
|
|
1717
|
-
} catch (
|
|
1745
|
+
} catch (e3) {
|
|
1718
1746
|
}
|
|
1719
1747
|
};
|
|
1720
1748
|
this.on("error" /* ERROR */, handler);
|
|
@@ -1738,13 +1766,34 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1738
1766
|
clearAskUserHandler() {
|
|
1739
1767
|
this.askUserHandlers.delete("default");
|
|
1740
1768
|
}
|
|
1741
|
-
|
|
1742
|
-
|
|
1769
|
+
setPickOptionsHandler(handler) {
|
|
1770
|
+
this.pickOptionsHandlers.set(
|
|
1771
|
+
"default",
|
|
1772
|
+
async (event) => await handler(event)
|
|
1773
|
+
);
|
|
1774
|
+
}
|
|
1775
|
+
clearPickOptionsHandler() {
|
|
1776
|
+
this.pickOptionsHandlers.delete("default");
|
|
1777
|
+
}
|
|
1778
|
+
async close(options) {
|
|
1779
|
+
const closeError = new (0, _chunkOBPHU4RTjs.ConnectionError)(
|
|
1743
1780
|
"Droid client closed: pending requests cancelled"
|
|
1744
1781
|
);
|
|
1782
|
+
if (_optionalChain([options, 'optionalAccess', _9 => _9.closeTransportFirst])) {
|
|
1783
|
+
try {
|
|
1784
|
+
await this.transport.close();
|
|
1785
|
+
} finally {
|
|
1786
|
+
this.rejectAllPending(closeError);
|
|
1787
|
+
this.permissionHandlers.clear();
|
|
1788
|
+
this.askUserHandlers.clear();
|
|
1789
|
+
this.removeAllListeners();
|
|
1790
|
+
}
|
|
1791
|
+
return;
|
|
1792
|
+
}
|
|
1745
1793
|
this.rejectAllPending(closeError);
|
|
1746
1794
|
this.permissionHandlers.clear();
|
|
1747
1795
|
this.askUserHandlers.clear();
|
|
1796
|
+
this.pickOptionsHandlers.clear();
|
|
1748
1797
|
this.removeAllListeners();
|
|
1749
1798
|
await this.transport.close();
|
|
1750
1799
|
}
|
|
@@ -1765,6 +1814,10 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1765
1814
|
reject(error);
|
|
1766
1815
|
});
|
|
1767
1816
|
this.pendingAskUserRequests.clear();
|
|
1817
|
+
this.pendingPickOptionsRequests.forEach(({ reject }) => {
|
|
1818
|
+
reject(error);
|
|
1819
|
+
});
|
|
1820
|
+
this.pendingPickOptionsRequests.clear();
|
|
1768
1821
|
}
|
|
1769
1822
|
settleRequest(requestId) {
|
|
1770
1823
|
this.pendingRequests.delete(requestId);
|
|
@@ -1772,15 +1825,15 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1772
1825
|
}
|
|
1773
1826
|
notifyRequestSettled(requestId) {
|
|
1774
1827
|
try {
|
|
1775
|
-
_optionalChain([this, 'access',
|
|
1776
|
-
} catch (
|
|
1828
|
+
_optionalChain([this, 'access', _10 => _10.onRequestSettled, 'optionalCall', _11 => _11(requestId)]);
|
|
1829
|
+
} catch (e4) {
|
|
1777
1830
|
}
|
|
1778
1831
|
}
|
|
1779
|
-
async sendRequest(request, timeout) {
|
|
1832
|
+
async sendRequest(request, timeout, sessionId) {
|
|
1780
1833
|
if (this.transportError) {
|
|
1781
1834
|
throw this.transportError;
|
|
1782
1835
|
}
|
|
1783
|
-
const requestAttribution = _optionalChain([this, 'access',
|
|
1836
|
+
const requestAttribution = _optionalChain([this, 'access', _12 => _12.getRequestAttribution, 'optionalCall', _13 => _13()]);
|
|
1784
1837
|
const _meta = {
|
|
1785
1838
|
...requestAttribution && { requestAttribution }
|
|
1786
1839
|
};
|
|
@@ -1791,7 +1844,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1791
1844
|
const timeoutId = timeout ? setTimeout(() => {
|
|
1792
1845
|
this.settleRequest(request.id);
|
|
1793
1846
|
reject(
|
|
1794
|
-
new (0,
|
|
1847
|
+
new (0, _chunkOBPHU4RTjs.TimeoutError)("Send request timed out", {
|
|
1795
1848
|
requestId: request.id,
|
|
1796
1849
|
method: request.method,
|
|
1797
1850
|
timeout
|
|
@@ -1802,16 +1855,19 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1802
1855
|
method: request.method,
|
|
1803
1856
|
resolve: resolve2,
|
|
1804
1857
|
reject,
|
|
1805
|
-
timeoutId
|
|
1858
|
+
timeoutId,
|
|
1859
|
+
sessionId
|
|
1806
1860
|
});
|
|
1807
1861
|
}
|
|
1808
1862
|
);
|
|
1863
|
+
void responsePromise.catch(() => {
|
|
1864
|
+
});
|
|
1809
1865
|
try {
|
|
1810
1866
|
this.logger.info("[DroidClient] [daemon -> droid] sending request", {
|
|
1811
1867
|
requestId: request.id,
|
|
1812
1868
|
method: request.method
|
|
1813
1869
|
});
|
|
1814
|
-
await this.transport.send(
|
|
1870
|
+
await this.transport.send(requestWithMeta);
|
|
1815
1871
|
} catch (error) {
|
|
1816
1872
|
const pending = this.pendingRequests.get(request.id);
|
|
1817
1873
|
if (pending) {
|
|
@@ -1820,7 +1876,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1820
1876
|
}
|
|
1821
1877
|
this.settleRequest(request.id);
|
|
1822
1878
|
pending.reject(
|
|
1823
|
-
new (0,
|
|
1879
|
+
new (0, _chunkOBPHU4RTjs.ProtocolError)("[daemon -> droid] Failed to send request", {
|
|
1824
1880
|
requestId: request.id,
|
|
1825
1881
|
cause: error
|
|
1826
1882
|
})
|
|
@@ -1831,20 +1887,13 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1831
1887
|
}
|
|
1832
1888
|
async handleMessage(message) {
|
|
1833
1889
|
try {
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
this.handleResponse(parsed);
|
|
1837
|
-
} else if ("method" in parsed) {
|
|
1838
|
-
await this.handleEvent(parsed);
|
|
1890
|
+
if (message.type === "response") {
|
|
1891
|
+
this.handleResponse(message);
|
|
1839
1892
|
} else {
|
|
1840
|
-
|
|
1841
|
-
message
|
|
1842
|
-
});
|
|
1893
|
+
await this.handleEvent(message);
|
|
1843
1894
|
}
|
|
1844
|
-
} catch (
|
|
1845
|
-
this.logger.warn("[DroidClient] Failed to handle message"
|
|
1846
|
-
messageByteLength: new TextEncoder().encode(message).byteLength
|
|
1847
|
-
});
|
|
1895
|
+
} catch (e5) {
|
|
1896
|
+
this.logger.warn("[DroidClient] Failed to handle message");
|
|
1848
1897
|
}
|
|
1849
1898
|
}
|
|
1850
1899
|
handleResponse(response) {
|
|
@@ -1856,116 +1905,119 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1856
1905
|
let validatedResponse;
|
|
1857
1906
|
switch (pending.method) {
|
|
1858
1907
|
case "droid.initialize_session" /* INITIALIZE_SESSION */:
|
|
1859
|
-
validatedResponse =
|
|
1908
|
+
validatedResponse = _chunkOBPHU4RTjs.InitializeSessionResponseSchema.parse(response);
|
|
1860
1909
|
break;
|
|
1861
1910
|
case "droid.load_session" /* LOAD_SESSION */:
|
|
1862
|
-
validatedResponse =
|
|
1911
|
+
validatedResponse = _chunkOBPHU4RTjs.LoadSessionResponseSchema.parse(response);
|
|
1863
1912
|
break;
|
|
1864
1913
|
case "droid.add_user_message" /* ADD_USER_MESSAGE */:
|
|
1865
|
-
validatedResponse =
|
|
1914
|
+
validatedResponse = _chunkOBPHU4RTjs.AddUserMessageResponseSchema.parse(response);
|
|
1866
1915
|
break;
|
|
1867
1916
|
case "droid.append_messages" /* APPEND_MESSAGES */:
|
|
1868
|
-
validatedResponse =
|
|
1917
|
+
validatedResponse = _chunkOBPHU4RTjs.AppendMessagesResponseSchema.parse(response);
|
|
1869
1918
|
break;
|
|
1870
1919
|
case "droid.resolve_queued_user_message" /* RESOLVE_QUEUED_USER_MESSAGE */:
|
|
1871
|
-
validatedResponse =
|
|
1920
|
+
validatedResponse = _chunkOBPHU4RTjs.ResolveQueuedUserMessageResponseSchema.parse(response);
|
|
1872
1921
|
break;
|
|
1873
1922
|
case "droid.interrupt_session" /* INTERRUPT_SESSION */:
|
|
1874
|
-
validatedResponse =
|
|
1923
|
+
validatedResponse = _chunkOBPHU4RTjs.InterruptSessionResponseSchema.parse(response);
|
|
1875
1924
|
break;
|
|
1876
1925
|
case "droid.close_session" /* CLOSE_SESSION */:
|
|
1877
|
-
validatedResponse =
|
|
1926
|
+
validatedResponse = _chunkOBPHU4RTjs.CloseSessionResponseSchema.parse(response);
|
|
1878
1927
|
break;
|
|
1879
1928
|
case "droid.update_session_settings" /* UPDATE_SESSION_SETTINGS */:
|
|
1880
|
-
validatedResponse =
|
|
1929
|
+
validatedResponse = _chunkOBPHU4RTjs.UpdateSessionSettingsResponseSchema.parse(response);
|
|
1881
1930
|
break;
|
|
1882
1931
|
case "droid.change_working_directory" /* CHANGE_WORKING_DIRECTORY */:
|
|
1883
|
-
validatedResponse =
|
|
1932
|
+
validatedResponse = _chunkOBPHU4RTjs.ChangeWorkingDirectoryResponseSchema.parse(response);
|
|
1884
1933
|
break;
|
|
1885
1934
|
case "droid.toggle_mcp_server" /* TOGGLE_MCP_SERVER */:
|
|
1886
|
-
validatedResponse =
|
|
1935
|
+
validatedResponse = _chunkOBPHU4RTjs.ToggleMcpServerResponseSchema.parse(response);
|
|
1887
1936
|
break;
|
|
1888
1937
|
case "droid.authenticate_mcp_server" /* AUTHENTICATE_MCP_SERVER */:
|
|
1889
|
-
validatedResponse =
|
|
1938
|
+
validatedResponse = _chunkOBPHU4RTjs.AuthenticateMcpServerResponseSchema.parse(response);
|
|
1890
1939
|
break;
|
|
1891
1940
|
case "droid.cancel_mcp_auth" /* CANCEL_MCP_AUTH */:
|
|
1892
|
-
validatedResponse =
|
|
1941
|
+
validatedResponse = _chunkOBPHU4RTjs.CancelMcpAuthResponseSchema.parse(response);
|
|
1893
1942
|
break;
|
|
1894
1943
|
case "droid.clear_mcp_auth" /* CLEAR_MCP_AUTH */:
|
|
1895
|
-
validatedResponse =
|
|
1944
|
+
validatedResponse = _chunkOBPHU4RTjs.ClearMcpAuthResponseSchema.parse(response);
|
|
1896
1945
|
break;
|
|
1897
1946
|
case "droid.add_mcp_server" /* ADD_MCP_SERVER */:
|
|
1898
|
-
validatedResponse =
|
|
1947
|
+
validatedResponse = _chunkOBPHU4RTjs.AddMcpServerResponseSchema.parse(response);
|
|
1899
1948
|
break;
|
|
1900
1949
|
case "droid.remove_mcp_server" /* REMOVE_MCP_SERVER */:
|
|
1901
|
-
validatedResponse =
|
|
1950
|
+
validatedResponse = _chunkOBPHU4RTjs.RemoveMcpServerResponseSchema.parse(response);
|
|
1902
1951
|
break;
|
|
1903
1952
|
case "droid.list_models" /* LIST_MODELS */:
|
|
1904
|
-
validatedResponse =
|
|
1953
|
+
validatedResponse = _chunkOBPHU4RTjs.ListModelsResponseSchema.parse(response);
|
|
1905
1954
|
break;
|
|
1906
1955
|
case "droid.list_mcp_registry" /* LIST_MCP_REGISTRY */:
|
|
1907
|
-
validatedResponse =
|
|
1956
|
+
validatedResponse = _chunkOBPHU4RTjs.ListMcpRegistryResponseSchema.parse(response);
|
|
1908
1957
|
break;
|
|
1909
1958
|
case "droid.list_mcp_tools" /* LIST_MCP_TOOLS */:
|
|
1910
|
-
validatedResponse =
|
|
1959
|
+
validatedResponse = _chunkOBPHU4RTjs.ListMcpToolsResponseSchema.parse(response);
|
|
1911
1960
|
break;
|
|
1912
1961
|
case "droid.list_tools" /* LIST_TOOLS */:
|
|
1913
|
-
validatedResponse =
|
|
1962
|
+
validatedResponse = _chunkOBPHU4RTjs.ListToolsResponseSchema.parse(response);
|
|
1963
|
+
break;
|
|
1964
|
+
case "droid.refresh_connector_tool_catalog" /* REFRESH_CONNECTOR_TOOL_CATALOG */:
|
|
1965
|
+
validatedResponse = _chunkOBPHU4RTjs.RefreshConnectorToolCatalogResponseSchema.parse(response);
|
|
1914
1966
|
break;
|
|
1915
1967
|
case "droid.toggle_mcp_tool" /* TOGGLE_MCP_TOOL */:
|
|
1916
|
-
validatedResponse =
|
|
1968
|
+
validatedResponse = _chunkOBPHU4RTjs.ToggleMcpToolResponseSchema.parse(response);
|
|
1917
1969
|
break;
|
|
1918
1970
|
case "droid.submit_mcp_auth_code" /* SUBMIT_MCP_AUTH_CODE */:
|
|
1919
|
-
validatedResponse =
|
|
1971
|
+
validatedResponse = _chunkOBPHU4RTjs.SubmitMcpAuthCodeResponseSchema.parse(response);
|
|
1920
1972
|
break;
|
|
1921
1973
|
case "droid.submit_mcp_auth_error" /* SUBMIT_MCP_AUTH_ERROR */:
|
|
1922
|
-
validatedResponse =
|
|
1974
|
+
validatedResponse = _chunkOBPHU4RTjs.SubmitMcpAuthErrorResponseSchema.parse(response);
|
|
1923
1975
|
break;
|
|
1924
1976
|
case "droid.kill_worker_session" /* KILL_WORKER_SESSION */:
|
|
1925
|
-
validatedResponse =
|
|
1977
|
+
validatedResponse = _chunkOBPHU4RTjs.KillWorkerSessionResponseSchema.parse(response);
|
|
1926
1978
|
break;
|
|
1927
1979
|
case "droid.list_skills" /* LIST_SKILLS */:
|
|
1928
|
-
validatedResponse =
|
|
1980
|
+
validatedResponse = _chunkOBPHU4RTjs.ListSkillsResponseSchema.parse(response);
|
|
1929
1981
|
break;
|
|
1930
1982
|
case "droid.set_skill_disabled" /* SET_SKILL_DISABLED */:
|
|
1931
|
-
validatedResponse =
|
|
1983
|
+
validatedResponse = _chunkOBPHU4RTjs.SetSkillDisabledResponseSchema.parse(response);
|
|
1932
1984
|
break;
|
|
1933
1985
|
case "droid.list_commands" /* LIST_COMMANDS */:
|
|
1934
|
-
validatedResponse =
|
|
1986
|
+
validatedResponse = _chunkOBPHU4RTjs.ListCommandsResponseSchema.parse(response);
|
|
1935
1987
|
break;
|
|
1936
1988
|
case "droid.submit_bug_report" /* SUBMIT_BUG_REPORT */:
|
|
1937
|
-
validatedResponse =
|
|
1989
|
+
validatedResponse = _chunkOBPHU4RTjs.SubmitBugReportResponseSchema.parse(response);
|
|
1938
1990
|
break;
|
|
1939
1991
|
case "droid.list_mcp_servers" /* LIST_MCP_SERVERS */:
|
|
1940
|
-
validatedResponse =
|
|
1992
|
+
validatedResponse = _chunkOBPHU4RTjs.ListMcpServersResponseSchema.parse(response);
|
|
1941
1993
|
break;
|
|
1942
1994
|
case "droid.get_rewind_info" /* GET_REWIND_INFO */:
|
|
1943
|
-
validatedResponse =
|
|
1995
|
+
validatedResponse = _chunkOBPHU4RTjs.GetRewindInfoResponseSchema.parse(response);
|
|
1944
1996
|
break;
|
|
1945
1997
|
case "droid.execute_rewind" /* EXECUTE_REWIND */:
|
|
1946
|
-
validatedResponse =
|
|
1998
|
+
validatedResponse = _chunkOBPHU4RTjs.ExecuteRewindResponseSchema.parse(response);
|
|
1947
1999
|
break;
|
|
1948
2000
|
case "droid.compact_session" /* COMPACT_SESSION */:
|
|
1949
|
-
validatedResponse =
|
|
2001
|
+
validatedResponse = _chunkOBPHU4RTjs.CompactSessionResponseSchema.parse(response);
|
|
1950
2002
|
break;
|
|
1951
2003
|
case "droid.fork_session" /* FORK_SESSION */:
|
|
1952
|
-
validatedResponse =
|
|
2004
|
+
validatedResponse = _chunkOBPHU4RTjs.ForkSessionResponseSchema.parse(response);
|
|
1953
2005
|
break;
|
|
1954
2006
|
case "droid.rename_session" /* RENAME_SESSION */:
|
|
1955
|
-
validatedResponse =
|
|
2007
|
+
validatedResponse = _chunkOBPHU4RTjs.RenameSessionResponseSchema.parse(response);
|
|
1956
2008
|
break;
|
|
1957
2009
|
case "droid.get_context_stats" /* GET_CONTEXT_STATS */:
|
|
1958
|
-
validatedResponse =
|
|
2010
|
+
validatedResponse = _chunkOBPHU4RTjs.GetContextStatsResponseSchema.parse(response);
|
|
1959
2011
|
break;
|
|
1960
2012
|
case "droid.get_context_breakdown" /* GET_CONTEXT_BREAKDOWN */:
|
|
1961
|
-
validatedResponse =
|
|
2013
|
+
validatedResponse = _chunkOBPHU4RTjs.GetContextBreakdownResponseSchema.parse(response);
|
|
1962
2014
|
break;
|
|
1963
2015
|
case "droid.warmup_cache" /* WARMUP_CACHE */:
|
|
1964
|
-
validatedResponse =
|
|
2016
|
+
validatedResponse = _chunkOBPHU4RTjs.WarmupCacheResponseSchema.parse(response);
|
|
1965
2017
|
break;
|
|
1966
2018
|
default: {
|
|
1967
2019
|
const exhaustiveCheck = pending.method;
|
|
1968
|
-
throw new (0,
|
|
2020
|
+
throw new (0, _chunkOBPHU4RTjs.DroidClientError)(
|
|
1969
2021
|
"Unsupported method in response handler",
|
|
1970
2022
|
{
|
|
1971
2023
|
method: exhaustiveCheck
|
|
@@ -1979,7 +2031,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1979
2031
|
this.settleRequest(responseId);
|
|
1980
2032
|
pending.resolve(validatedResponse);
|
|
1981
2033
|
} else {
|
|
1982
|
-
const validatedResponse =
|
|
2034
|
+
const validatedResponse = _chunkOBPHU4RTjs.JsonRpcBaseResponseSchema.parse(response);
|
|
1983
2035
|
this.logger.info(
|
|
1984
2036
|
"[DroidClient] Received response for request not in pending map",
|
|
1985
2037
|
{
|
|
@@ -1997,7 +2049,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
1997
2049
|
message: issue.message
|
|
1998
2050
|
})) : void 0;
|
|
1999
2051
|
this.logger.exception(error, "Invalid response format", {
|
|
2000
|
-
method: _optionalChain([pending, 'optionalAccess',
|
|
2052
|
+
method: _optionalChain([pending, 'optionalAccess', _14 => _14.method]),
|
|
2001
2053
|
requestId: _nullishCoalesce(responseId, () => ( void 0)),
|
|
2002
2054
|
zodIssues
|
|
2003
2055
|
});
|
|
@@ -2023,10 +2075,10 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2023
2075
|
}
|
|
2024
2076
|
this.settleRequest(responseId);
|
|
2025
2077
|
const syntheticFailure = {
|
|
2026
|
-
jsonrpc:
|
|
2078
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
2027
2079
|
type: "response",
|
|
2028
|
-
factoryApiVersion:
|
|
2029
|
-
factoryProtocolVersion:
|
|
2080
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
2081
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
2030
2082
|
id: responseId,
|
|
2031
2083
|
error: {
|
|
2032
2084
|
code,
|
|
@@ -2039,7 +2091,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2039
2091
|
}
|
|
2040
2092
|
async handleEvent(event) {
|
|
2041
2093
|
try {
|
|
2042
|
-
const validatedEvent =
|
|
2094
|
+
const validatedEvent = _chunkOBPHU4RTjs.CliRequestOrNotificationSchema.parse(event);
|
|
2043
2095
|
if (validatedEvent.method === "droid.session_notification" /* SESSION_NOTIFICATION */) {
|
|
2044
2096
|
const notification = validatedEvent.params.notification;
|
|
2045
2097
|
if (notification.type === "agent_turn_completed" /* AGENT_TURN_COMPLETED */) {
|
|
@@ -2052,6 +2104,8 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2052
2104
|
await this.handlePermissionRequest(validatedEvent);
|
|
2053
2105
|
} else if (validatedEvent.method === "droid.ask_user" /* ASK_USER */) {
|
|
2054
2106
|
await this.handleAskUserRequest(validatedEvent);
|
|
2107
|
+
} else if (validatedEvent.method === "droid.pick_options" /* PICK_OPTIONS */) {
|
|
2108
|
+
await this.handlePickOptionsRequest(validatedEvent);
|
|
2055
2109
|
}
|
|
2056
2110
|
} catch (error) {
|
|
2057
2111
|
this.logDroppedEventParseError(error, event);
|
|
@@ -2074,10 +2128,10 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2074
2128
|
const code = error instanceof _zod.z.ZodError ? -32600 /* INVALID_REQUEST */ : -32603 /* INTERNAL_ERROR */;
|
|
2075
2129
|
const message = code === -32600 /* INVALID_REQUEST */ ? "Invalid request format" : "Internal error while handling request";
|
|
2076
2130
|
const errorResponse = {
|
|
2077
|
-
jsonrpc:
|
|
2131
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
2078
2132
|
type: "response",
|
|
2079
|
-
factoryApiVersion:
|
|
2080
|
-
factoryProtocolVersion:
|
|
2133
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
2134
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
2081
2135
|
id,
|
|
2082
2136
|
error: {
|
|
2083
2137
|
code,
|
|
@@ -2086,7 +2140,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2086
2140
|
}
|
|
2087
2141
|
};
|
|
2088
2142
|
try {
|
|
2089
|
-
await this.transport.send(
|
|
2143
|
+
await this.transport.send(errorResponse);
|
|
2090
2144
|
} catch (sendError) {
|
|
2091
2145
|
this.logger.exception(
|
|
2092
2146
|
sendError,
|
|
@@ -2149,6 +2203,8 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2149
2203
|
let selectedOption = "cancel" /* Cancel */;
|
|
2150
2204
|
let comment;
|
|
2151
2205
|
let editedSpecContent;
|
|
2206
|
+
let clientStartsHandoffSession;
|
|
2207
|
+
let specHandoffId;
|
|
2152
2208
|
const handler = this.permissionHandlers.get("default");
|
|
2153
2209
|
if (handler) {
|
|
2154
2210
|
try {
|
|
@@ -2168,19 +2224,21 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2168
2224
|
);
|
|
2169
2225
|
const handlerResult = await handlerPromise;
|
|
2170
2226
|
if (typeof handlerResult === "string" && handlerResult === "proceed_edit" /* ProceedEdit */) {
|
|
2171
|
-
throw new (0,
|
|
2227
|
+
throw new (0, _chunkOBPHU4RTjs.DroidClientError)(
|
|
2172
2228
|
"Permission handler returned proceed_edit without editedSpecContent"
|
|
2173
2229
|
);
|
|
2174
2230
|
}
|
|
2175
|
-
const parsedHandlerResult =
|
|
2231
|
+
const parsedHandlerResult = _chunkOBPHU4RTjs.RequestPermissionResultSchema.safeParse(
|
|
2176
2232
|
typeof handlerResult === "string" ? { selectedOption: handlerResult } : handlerResult
|
|
2177
2233
|
);
|
|
2178
2234
|
if (parsedHandlerResult.success) {
|
|
2179
2235
|
selectedOption = parsedHandlerResult.data.selectedOption;
|
|
2180
2236
|
comment = parsedHandlerResult.data.comment;
|
|
2181
2237
|
editedSpecContent = parsedHandlerResult.data.editedSpecContent;
|
|
2238
|
+
clientStartsHandoffSession = parsedHandlerResult.data.clientStartsHandoffSession;
|
|
2239
|
+
specHandoffId = parsedHandlerResult.data.specHandoffId;
|
|
2182
2240
|
} else {
|
|
2183
|
-
throw new (0,
|
|
2241
|
+
throw new (0, _chunkOBPHU4RTjs.DroidClientError)(
|
|
2184
2242
|
"Permission handler returned invalid result",
|
|
2185
2243
|
{
|
|
2186
2244
|
cause: parsedHandlerResult.error
|
|
@@ -2190,7 +2248,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2190
2248
|
if (!event.params.options.some(
|
|
2191
2249
|
(option) => option.value === selectedOption
|
|
2192
2250
|
)) {
|
|
2193
|
-
throw new (0,
|
|
2251
|
+
throw new (0, _chunkOBPHU4RTjs.DroidClientError)(
|
|
2194
2252
|
`Permission handler selected unavailable option: ${selectedOption}`
|
|
2195
2253
|
);
|
|
2196
2254
|
}
|
|
@@ -2213,16 +2271,16 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2213
2271
|
this.pendingPermissionRequests.delete(event.id);
|
|
2214
2272
|
const cancelResponse = {
|
|
2215
2273
|
type: "response",
|
|
2216
|
-
jsonrpc:
|
|
2217
|
-
factoryApiVersion:
|
|
2218
|
-
factoryProtocolVersion:
|
|
2274
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
2275
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
2276
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
2219
2277
|
id: event.id,
|
|
2220
2278
|
result: {
|
|
2221
2279
|
selectedOption: "cancel" /* Cancel */
|
|
2222
2280
|
}
|
|
2223
2281
|
};
|
|
2224
2282
|
try {
|
|
2225
|
-
await this.transport.send(
|
|
2283
|
+
await this.transport.send(cancelResponse);
|
|
2226
2284
|
} catch (sendError) {
|
|
2227
2285
|
this.logger.exception(
|
|
2228
2286
|
sendError,
|
|
@@ -2241,21 +2299,25 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2241
2299
|
}
|
|
2242
2300
|
const response = {
|
|
2243
2301
|
type: "response",
|
|
2244
|
-
jsonrpc:
|
|
2245
|
-
factoryApiVersion:
|
|
2246
|
-
factoryProtocolVersion:
|
|
2302
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
2303
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
2304
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
2247
2305
|
id: event.id,
|
|
2248
2306
|
result: {
|
|
2249
2307
|
selectedOption,
|
|
2250
2308
|
...comment !== void 0 && { comment },
|
|
2251
|
-
...editedSpecContent !== void 0 && { editedSpecContent }
|
|
2309
|
+
...editedSpecContent !== void 0 && { editedSpecContent },
|
|
2310
|
+
...clientStartsHandoffSession !== void 0 && {
|
|
2311
|
+
clientStartsHandoffSession
|
|
2312
|
+
},
|
|
2313
|
+
...specHandoffId !== void 0 && { specHandoffId }
|
|
2252
2314
|
}
|
|
2253
2315
|
};
|
|
2254
2316
|
this.logger.info("[DroidClient] Sending permission response back to CLI", {
|
|
2255
2317
|
requestId: event.id,
|
|
2256
2318
|
result: String(selectedOption)
|
|
2257
2319
|
});
|
|
2258
|
-
await this.transport.send(
|
|
2320
|
+
await this.transport.send(response);
|
|
2259
2321
|
}
|
|
2260
2322
|
async handleAskUserRequest(event) {
|
|
2261
2323
|
this.logger.info("[DroidClient] Handling ask-user request", {
|
|
@@ -2280,11 +2342,11 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2280
2342
|
this.pendingAskUserRequests.delete(event.id);
|
|
2281
2343
|
});
|
|
2282
2344
|
});
|
|
2283
|
-
const parsedResult =
|
|
2345
|
+
const parsedResult = _chunkOBPHU4RTjs.AskUserResultSchema.safeParse(
|
|
2284
2346
|
await handlerPromise
|
|
2285
2347
|
);
|
|
2286
2348
|
if (!parsedResult.success) {
|
|
2287
|
-
throw new (0,
|
|
2349
|
+
throw new (0, _chunkOBPHU4RTjs.DroidClientError)(
|
|
2288
2350
|
"AskUser handler returned invalid result",
|
|
2289
2351
|
{
|
|
2290
2352
|
cause: parsedResult.error
|
|
@@ -2308,9 +2370,9 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2308
2370
|
);
|
|
2309
2371
|
this.pendingAskUserRequests.delete(event.id);
|
|
2310
2372
|
const cancelResponse = {
|
|
2311
|
-
jsonrpc:
|
|
2312
|
-
factoryApiVersion:
|
|
2313
|
-
factoryProtocolVersion:
|
|
2373
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
2374
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
2375
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
2314
2376
|
type: "response",
|
|
2315
2377
|
id: event.id,
|
|
2316
2378
|
result: {
|
|
@@ -2319,7 +2381,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2319
2381
|
}
|
|
2320
2382
|
};
|
|
2321
2383
|
try {
|
|
2322
|
-
await this.transport.send(
|
|
2384
|
+
await this.transport.send(cancelResponse);
|
|
2323
2385
|
} catch (sendError) {
|
|
2324
2386
|
this.logger.exception(
|
|
2325
2387
|
sendError,
|
|
@@ -2331,9 +2393,9 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2331
2393
|
}
|
|
2332
2394
|
const response = {
|
|
2333
2395
|
type: "response",
|
|
2334
|
-
jsonrpc:
|
|
2335
|
-
factoryApiVersion:
|
|
2336
|
-
factoryProtocolVersion:
|
|
2396
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
2397
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
2398
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
2337
2399
|
id: event.id,
|
|
2338
2400
|
result
|
|
2339
2401
|
};
|
|
@@ -2341,21 +2403,119 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2341
2403
|
requestId: event.id,
|
|
2342
2404
|
cancelled: _nullishCoalesce(result.cancelled, () => ( false))
|
|
2343
2405
|
});
|
|
2344
|
-
await this.transport.send(
|
|
2406
|
+
await this.transport.send(response);
|
|
2407
|
+
}
|
|
2408
|
+
/**
|
|
2409
|
+
* Same shape as the ask-user round trip: the handler (a UI) resolves with
|
|
2410
|
+
* the user's selection, and any failure or missing handler answers the CLI
|
|
2411
|
+
* with a cancellation so its tool call never hangs. A handler that rejects
|
|
2412
|
+
* with {@link PickOptionsUnavailableError} is relayed as that JSON-RPC
|
|
2413
|
+
* error instead, which the CLI does not read as the user's cancel.
|
|
2414
|
+
*/
|
|
2415
|
+
async handlePickOptionsRequest(event) {
|
|
2416
|
+
this.logger.info("[DroidClient] Handling pick-options request", {
|
|
2417
|
+
requestId: event.id,
|
|
2418
|
+
toolCallId: event.params.toolCallId,
|
|
2419
|
+
count: event.params.rows.length
|
|
2420
|
+
});
|
|
2421
|
+
this.emit("pick_options" /* PICK_OPTIONS */, event);
|
|
2422
|
+
let result = { cancelled: true, selectedIds: [] };
|
|
2423
|
+
const handler = this.pickOptionsHandlers.get("default");
|
|
2424
|
+
if (handler) {
|
|
2425
|
+
try {
|
|
2426
|
+
const handlerPromise = new Promise(
|
|
2427
|
+
(resolve2, reject) => {
|
|
2428
|
+
this.pendingPickOptionsRequests.set(event.id, { reject });
|
|
2429
|
+
handler(event).then(resolve2).catch(reject).finally(() => {
|
|
2430
|
+
this.pendingPickOptionsRequests.delete(event.id);
|
|
2431
|
+
});
|
|
2432
|
+
}
|
|
2433
|
+
);
|
|
2434
|
+
const parsedResult = _chunkOBPHU4RTjs.PickOptionsResultSchema.safeParse(
|
|
2435
|
+
await handlerPromise
|
|
2436
|
+
);
|
|
2437
|
+
if (!parsedResult.success) {
|
|
2438
|
+
throw new (0, _chunkOBPHU4RTjs.DroidClientError)(
|
|
2439
|
+
"PickOptions handler returned invalid result",
|
|
2440
|
+
{ cause: parsedResult.error }
|
|
2441
|
+
);
|
|
2442
|
+
}
|
|
2443
|
+
result = parsedResult.data;
|
|
2444
|
+
} catch (error) {
|
|
2445
|
+
this.pendingPickOptionsRequests.delete(event.id);
|
|
2446
|
+
if (error instanceof _chunkOBPHU4RTjs.PickOptionsUnavailableError) {
|
|
2447
|
+
this.logger.info("[DroidClient] Pick-options request unavailable", {
|
|
2448
|
+
requestId: event.id,
|
|
2449
|
+
code: error.rpcError.code
|
|
2450
|
+
});
|
|
2451
|
+
const failure = {
|
|
2452
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
2453
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
2454
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
2455
|
+
type: "response",
|
|
2456
|
+
id: event.id,
|
|
2457
|
+
error: error.rpcError
|
|
2458
|
+
};
|
|
2459
|
+
try {
|
|
2460
|
+
await this.transport.send(failure);
|
|
2461
|
+
} catch (sendError) {
|
|
2462
|
+
this.logger.exception(
|
|
2463
|
+
sendError,
|
|
2464
|
+
"Failed to send pick-options failure"
|
|
2465
|
+
);
|
|
2466
|
+
}
|
|
2467
|
+
return;
|
|
2468
|
+
}
|
|
2469
|
+
this.logger.exception(error, "Failed to handle pick-options request");
|
|
2470
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
2471
|
+
this.emit(
|
|
2472
|
+
"session_notification" /* SESSION_NOTIFICATION */,
|
|
2473
|
+
_DroidClient.createNotificationEvent(
|
|
2474
|
+
_DroidClient.createErrorNotification(err)
|
|
2475
|
+
)
|
|
2476
|
+
);
|
|
2477
|
+
const cancelResponse = {
|
|
2478
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
2479
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
2480
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
2481
|
+
type: "response",
|
|
2482
|
+
id: event.id,
|
|
2483
|
+
result: { cancelled: true, selectedIds: [] }
|
|
2484
|
+
};
|
|
2485
|
+
try {
|
|
2486
|
+
await this.transport.send(cancelResponse);
|
|
2487
|
+
} catch (sendError) {
|
|
2488
|
+
this.logger.exception(
|
|
2489
|
+
sendError,
|
|
2490
|
+
"Failed to send pick-options cancellation"
|
|
2491
|
+
);
|
|
2492
|
+
}
|
|
2493
|
+
return;
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
const response = {
|
|
2497
|
+
type: "response",
|
|
2498
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
2499
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
2500
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
2501
|
+
id: event.id,
|
|
2502
|
+
result
|
|
2503
|
+
};
|
|
2504
|
+
await this.transport.send(response);
|
|
2345
2505
|
}
|
|
2346
2506
|
static getErrorType(error) {
|
|
2347
2507
|
switch (error.constructor) {
|
|
2348
|
-
case
|
|
2508
|
+
case _chunkOBPHU4RTjs.ConnectionError:
|
|
2349
2509
|
return "ConnectionError" /* CONNECTION_ERROR */;
|
|
2350
|
-
case
|
|
2510
|
+
case _chunkOBPHU4RTjs.ProtocolError:
|
|
2351
2511
|
return "ProtocolError" /* PROTOCOL_ERROR */;
|
|
2352
|
-
case
|
|
2512
|
+
case _chunkOBPHU4RTjs.SessionError:
|
|
2353
2513
|
return "SessionError" /* SESSION_ERROR */;
|
|
2354
|
-
case
|
|
2514
|
+
case _chunkOBPHU4RTjs.TimeoutError:
|
|
2355
2515
|
return "TimeoutError" /* TIMEOUT_ERROR */;
|
|
2356
|
-
case
|
|
2516
|
+
case _chunkOBPHU4RTjs.ProcessExitError:
|
|
2357
2517
|
return "ProcessExitError" /* PROCESS_EXIT_ERROR */;
|
|
2358
|
-
case
|
|
2518
|
+
case _chunkOBPHU4RTjs.DroidClientError:
|
|
2359
2519
|
return "DroidClientError" /* DROID_CLIENT_ERROR */;
|
|
2360
2520
|
default:
|
|
2361
2521
|
return "Error" /* ERROR */;
|
|
@@ -2367,7 +2527,7 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2367
2527
|
message: error.message,
|
|
2368
2528
|
errorType: _DroidClient.getErrorType(error),
|
|
2369
2529
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2370
|
-
...error instanceof
|
|
2530
|
+
...error instanceof _chunkOBPHU4RTjs.ProcessExitError && error.exitCode !== void 0 ? { exitCode: error.exitCode } : {},
|
|
2371
2531
|
error: {
|
|
2372
2532
|
name: error.name,
|
|
2373
2533
|
message: error.message
|
|
@@ -2393,20 +2553,62 @@ var DroidClient = (_class = class _DroidClient extends _events2.default {
|
|
|
2393
2553
|
*/
|
|
2394
2554
|
static createNotificationEvent(notification) {
|
|
2395
2555
|
return {
|
|
2396
|
-
jsonrpc:
|
|
2556
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION2,
|
|
2397
2557
|
type: "notification",
|
|
2398
|
-
factoryApiVersion:
|
|
2399
|
-
factoryProtocolVersion:
|
|
2558
|
+
factoryApiVersion: _chunkOBPHU4RTjs.LEGACY_FACTORY_API_VERSION,
|
|
2559
|
+
factoryProtocolVersion: _chunkOBPHU4RTjs.FACTORY_PROTOCOL_VERSION,
|
|
2400
2560
|
method: "droid.session_notification" /* SESSION_NOTIFICATION */,
|
|
2401
2561
|
params: { notification }
|
|
2402
2562
|
};
|
|
2403
2563
|
}
|
|
2404
2564
|
}, _class);
|
|
2405
2565
|
|
|
2566
|
+
// src/exec-core/message-transport.ts
|
|
2567
|
+
var JsonRpcCodecTransport = class {
|
|
2568
|
+
|
|
2569
|
+
|
|
2570
|
+
constructor(transport, logger) {
|
|
2571
|
+
this.transport = transport;
|
|
2572
|
+
this.logger = logger;
|
|
2573
|
+
}
|
|
2574
|
+
send(message) {
|
|
2575
|
+
return this.transport.send(JSON.stringify(message));
|
|
2576
|
+
}
|
|
2577
|
+
onMessage(handler) {
|
|
2578
|
+
this.transport.onMessage((frame) => {
|
|
2579
|
+
const message = decodeDroidMessage(frame, this.logger);
|
|
2580
|
+
if (message) handler(message);
|
|
2581
|
+
});
|
|
2582
|
+
}
|
|
2583
|
+
onError(handler) {
|
|
2584
|
+
this.transport.onError(handler);
|
|
2585
|
+
}
|
|
2586
|
+
close() {
|
|
2587
|
+
return this.transport.close();
|
|
2588
|
+
}
|
|
2589
|
+
get isConnected() {
|
|
2590
|
+
return this.transport.isConnected;
|
|
2591
|
+
}
|
|
2592
|
+
};
|
|
2593
|
+
function withJsonRpcCodec(transport, deps = defaultExecCoreDeps) {
|
|
2594
|
+
const { logger } = resolveExecCoreDeps(void 0, deps);
|
|
2595
|
+
return new JsonRpcCodecTransport(transport, logger);
|
|
2596
|
+
}
|
|
2597
|
+
function decodeDroidMessage(frame, logger) {
|
|
2598
|
+
try {
|
|
2599
|
+
return _chunkOBPHU4RTjs.JsonRpcMessageSchema.parse(JSON.parse(frame));
|
|
2600
|
+
} catch (error) {
|
|
2601
|
+
logWarn(logger, "[DroidClient] Failed to handle message", {
|
|
2602
|
+
errorName: error instanceof Error ? error.name : typeof error,
|
|
2603
|
+
messageByteLength: new TextEncoder().encode(frame).byteLength
|
|
2604
|
+
});
|
|
2605
|
+
return void 0;
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
|
|
2406
2609
|
// src/exec-core/managed-process.ts
|
|
2407
2610
|
var _child_process = require('child_process');
|
|
2408
2611
|
var _fs = require('fs'); var fs3 = _interopRequireWildcard(_fs);
|
|
2409
|
-
var _readline = require('readline'); var readline = _interopRequireWildcard(_readline);
|
|
2410
2612
|
|
|
2411
2613
|
// src/exec-core/runtime-utils.ts
|
|
2412
2614
|
var _os = require('os'); var os = _interopRequireWildcard(_os);
|
|
@@ -2571,7 +2773,7 @@ function logTransportMessage(direction, message, childPid, deps = defaultExecCor
|
|
|
2571
2773
|
}
|
|
2572
2774
|
}
|
|
2573
2775
|
async function __resetTransportLoggerForTests(deps = defaultExecCoreDeps) {
|
|
2574
|
-
const stream = _nullishCoalesce(_optionalChain([state, 'optionalAccess',
|
|
2776
|
+
const stream = _nullishCoalesce(_optionalChain([state, 'optionalAccess', _15 => _15.stream]), () => ( null));
|
|
2575
2777
|
state = null;
|
|
2576
2778
|
enabledCache = null;
|
|
2577
2779
|
if (!stream) return;
|
|
@@ -2603,13 +2805,13 @@ function describeSpawnError(error, context) {
|
|
|
2603
2805
|
return `Failed to start Droid: ${error.message}`;
|
|
2604
2806
|
}
|
|
2605
2807
|
if (error.code === "ENOENT") {
|
|
2606
|
-
if (_optionalChain([context, 'optionalAccess',
|
|
2808
|
+
if (_optionalChain([context, 'optionalAccess', _16 => _16.cwd]) && !fs3.default.existsSync(context.cwd)) {
|
|
2607
2809
|
return `Failed to start Droid: working directory does not exist (${context.cwd})`;
|
|
2608
2810
|
}
|
|
2609
|
-
return `Failed to start Droid: executable not found${_optionalChain([context, 'optionalAccess',
|
|
2811
|
+
return `Failed to start Droid: executable not found${_optionalChain([context, 'optionalAccess', _17 => _17.execPath]) ? ` (${context.execPath})` : ""}`;
|
|
2610
2812
|
}
|
|
2611
2813
|
if (error.code === "EACCES") {
|
|
2612
|
-
return `Failed to start Droid: permission denied${_optionalChain([context, 'optionalAccess',
|
|
2814
|
+
return `Failed to start Droid: permission denied${_optionalChain([context, 'optionalAccess', _18 => _18.execPath]) ? ` (${context.execPath})` : ""}`;
|
|
2613
2815
|
}
|
|
2614
2816
|
return `Failed to start Droid: ${error.code}`;
|
|
2615
2817
|
}
|
|
@@ -2623,7 +2825,7 @@ function describeExitError(code, signal) {
|
|
|
2623
2825
|
return "Droid process exited unexpectedly";
|
|
2624
2826
|
}
|
|
2625
2827
|
var ManagedProcessImpl = (_class2 = class {
|
|
2626
|
-
constructor(childProcess, logPrefix, spawnContext, deps, transportLoggerDeps = deps) {;_class2.prototype.
|
|
2828
|
+
constructor(childProcess, logPrefix, spawnContext, deps, transportLoggerDeps = deps) {;_class2.prototype.__init11.call(this);_class2.prototype.__init12.call(this);_class2.prototype.__init13.call(this);_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);
|
|
2627
2829
|
this.logPrefix = logPrefix;
|
|
2628
2830
|
this.spawnContext = spawnContext;
|
|
2629
2831
|
this.transportLoggerDeps = transportLoggerDeps;
|
|
@@ -2635,75 +2837,72 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
2635
2837
|
|
|
2636
2838
|
|
|
2637
2839
|
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2840
|
+
__init11() {this.messageHandler = null}
|
|
2841
|
+
__init12() {this.errorHandler = null}
|
|
2842
|
+
__init13() {this.stdoutDecoder = new (0, _chunkOBPHU4RTjs.LfLineDecoder)()}
|
|
2843
|
+
__init14() {this.stdoutDataHandler = (chunk) => {
|
|
2844
|
+
const text = typeof chunk === "string" ? chunk : chunk.toString("utf8");
|
|
2845
|
+
for (const line of this.stdoutDecoder.push(text)) {
|
|
2846
|
+
this.handleStdoutLine(line);
|
|
2847
|
+
}
|
|
2848
|
+
}}
|
|
2849
|
+
__init15() {this.isClosing = false}
|
|
2642
2850
|
/** Latch so exit teardown/classification runs exactly once per process. */
|
|
2643
|
-
|
|
2644
|
-
|
|
2851
|
+
__init16() {this.exitFinalized = false}
|
|
2852
|
+
__init17() {this.exitDrainTimer = null}
|
|
2645
2853
|
/**
|
|
2646
2854
|
* Sticky error from a process error or unexpected exit event. Once set,
|
|
2647
2855
|
* all subsequent `send()` calls throw this error immediately instead of
|
|
2648
2856
|
* hanging on a dead transport.
|
|
2649
2857
|
*/
|
|
2650
|
-
|
|
2651
|
-
|
|
2858
|
+
__init18() {this.processError = null}
|
|
2859
|
+
__init19() {this.queuedSendPromise = Promise.resolve()}
|
|
2652
2860
|
|
|
2653
2861
|
get childProcess() {
|
|
2654
2862
|
if (!this._childProcess) {
|
|
2655
|
-
throw new (0,
|
|
2863
|
+
throw new (0, _chunkOBPHU4RTjs.ConnectionError)("Process not connected");
|
|
2656
2864
|
}
|
|
2657
2865
|
return this._childProcess;
|
|
2658
2866
|
}
|
|
2659
2867
|
setupHandlers() {
|
|
2660
2868
|
if (!this.childProcess.stdout) {
|
|
2661
|
-
throw new (0,
|
|
2869
|
+
throw new (0, _chunkOBPHU4RTjs.ConnectionError)("Failed to get process stdout");
|
|
2662
2870
|
}
|
|
2663
|
-
this.
|
|
2664
|
-
|
|
2665
|
-
crlfDelay: Infinity
|
|
2666
|
-
});
|
|
2667
|
-
this.readlineInterface.on("line", (line) => {
|
|
2668
|
-
const trimmedLine = line.trim();
|
|
2669
|
-
if (this.messageHandler && trimmedLine) {
|
|
2670
|
-
if (trimmedLine.startsWith("{") || trimmedLine.startsWith("[")) {
|
|
2671
|
-
logTransportMessage(
|
|
2672
|
-
"in" /* In */,
|
|
2673
|
-
trimmedLine,
|
|
2674
|
-
_optionalChain([this, 'access', _23 => _23._childProcess, 'optionalAccess', _24 => _24.pid]),
|
|
2675
|
-
this.transportLoggerDeps
|
|
2676
|
-
);
|
|
2677
|
-
this.messageHandler(trimmedLine);
|
|
2678
|
-
} else {
|
|
2679
|
-
const truncated = trimmedLine.length > MAX_NON_JSON_LOG_LENGTH ? trimmedLine.substring(0, MAX_NON_JSON_LOG_LENGTH) : trimmedLine;
|
|
2680
|
-
this.logger.warn("[droid process] non-JSON output", {
|
|
2681
|
-
state: this.logPrefix,
|
|
2682
|
-
output: truncated
|
|
2683
|
-
});
|
|
2684
|
-
}
|
|
2685
|
-
}
|
|
2686
|
-
});
|
|
2871
|
+
this.childProcess.stdout.setEncoding("utf8");
|
|
2872
|
+
this.childProcess.stdout.on("data", this.stdoutDataHandler);
|
|
2687
2873
|
this.childProcess.on("error", (error) => {
|
|
2688
|
-
this.processError
|
|
2874
|
+
if (this.processError || this.isClosing || this.exitFinalized) {
|
|
2875
|
+
return;
|
|
2876
|
+
}
|
|
2877
|
+
this.processError = new (0, _chunkOBPHU4RTjs.ConnectionError)(
|
|
2689
2878
|
describeSpawnError(error, this.spawnContext),
|
|
2690
2879
|
{
|
|
2691
2880
|
error,
|
|
2692
|
-
cwd: _optionalChain([this, 'access',
|
|
2693
|
-
execPath: _optionalChain([this, 'access',
|
|
2881
|
+
cwd: _optionalChain([this, 'access', _19 => _19.spawnContext, 'optionalAccess', _20 => _20.cwd]),
|
|
2882
|
+
execPath: _optionalChain([this, 'access', _21 => _21.spawnContext, 'optionalAccess', _22 => _22.execPath])
|
|
2694
2883
|
}
|
|
2695
2884
|
);
|
|
2696
|
-
|
|
2697
|
-
this.errorHandler(this.processError);
|
|
2698
|
-
}
|
|
2885
|
+
_optionalChain([this, 'access', _23 => _23.errorHandler, 'optionalCall', _24 => _24(this.processError)]);
|
|
2699
2886
|
});
|
|
2887
|
+
_optionalChain([this, 'access', _25 => _25.childProcess, 'access', _26 => _26.stdin, 'optionalAccess', _27 => _27.on, 'call', _28 => _28("error", (error) => {
|
|
2888
|
+
if (this.processError || this.isClosing || this.exitFinalized) {
|
|
2889
|
+
return;
|
|
2890
|
+
}
|
|
2891
|
+
this.processError = new (0, _chunkOBPHU4RTjs.ConnectionError)("Process stdin failed", {
|
|
2892
|
+
error
|
|
2893
|
+
});
|
|
2894
|
+
_optionalChain([this, 'access', _29 => _29.errorHandler, 'optionalCall', _30 => _30(this.processError)]);
|
|
2895
|
+
})]);
|
|
2700
2896
|
this.childProcess.on("exit", (code, signal) => {
|
|
2701
2897
|
this.exitDrainTimer = setTimeout(() => {
|
|
2702
2898
|
this.finalizeExit(code, signal);
|
|
2703
2899
|
}, EXIT_STDIO_DRAIN_TIMEOUT_MS);
|
|
2704
|
-
_optionalChain([this, 'access',
|
|
2900
|
+
_optionalChain([this, 'access', _31 => _31.exitDrainTimer, 'access', _32 => _32.unref, 'optionalCall', _33 => _33()]);
|
|
2705
2901
|
});
|
|
2706
2902
|
this.childProcess.on("close", (code, signal) => {
|
|
2903
|
+
for (const line of this.stdoutDecoder.finish()) {
|
|
2904
|
+
this.handleStdoutLine(line);
|
|
2905
|
+
}
|
|
2707
2906
|
this.finalizeExit(code, signal);
|
|
2708
2907
|
});
|
|
2709
2908
|
if (this.childProcess.stderr) {
|
|
@@ -2715,6 +2914,27 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
2715
2914
|
});
|
|
2716
2915
|
}
|
|
2717
2916
|
}
|
|
2917
|
+
handleStdoutLine(line) {
|
|
2918
|
+
const trimmedLine = line.trim();
|
|
2919
|
+
if (!this.messageHandler || !trimmedLine) {
|
|
2920
|
+
return;
|
|
2921
|
+
}
|
|
2922
|
+
if (trimmedLine.startsWith("{") || trimmedLine.startsWith("[")) {
|
|
2923
|
+
logTransportMessage(
|
|
2924
|
+
"in" /* In */,
|
|
2925
|
+
trimmedLine,
|
|
2926
|
+
_optionalChain([this, 'access', _34 => _34._childProcess, 'optionalAccess', _35 => _35.pid]),
|
|
2927
|
+
this.transportLoggerDeps
|
|
2928
|
+
);
|
|
2929
|
+
this.messageHandler(trimmedLine);
|
|
2930
|
+
return;
|
|
2931
|
+
}
|
|
2932
|
+
const truncated = trimmedLine.length > MAX_NON_JSON_LOG_LENGTH ? trimmedLine.substring(0, MAX_NON_JSON_LOG_LENGTH) : trimmedLine;
|
|
2933
|
+
this.logger.warn("[droid process] non-JSON output", {
|
|
2934
|
+
state: this.logPrefix,
|
|
2935
|
+
output: truncated
|
|
2936
|
+
});
|
|
2937
|
+
}
|
|
2718
2938
|
finalizeExit(code, signal) {
|
|
2719
2939
|
if (this.exitFinalized) {
|
|
2720
2940
|
return;
|
|
@@ -2724,13 +2944,11 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
2724
2944
|
clearTimeout(this.exitDrainTimer);
|
|
2725
2945
|
this.exitDrainTimer = null;
|
|
2726
2946
|
}
|
|
2947
|
+
_optionalChain([this, 'access', _36 => _36._childProcess, 'optionalAccess', _37 => _37.stdout, 'optionalAccess', _38 => _38.off, 'call', _39 => _39("data", this.stdoutDataHandler)]);
|
|
2727
2948
|
this._childProcess = null;
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
this.
|
|
2731
|
-
}
|
|
2732
|
-
if (!this.isClosing) {
|
|
2733
|
-
this.processError = new (0, _chunkYSKO6SPTjs.ProcessExitError)(
|
|
2949
|
+
this.stdoutDecoder.reset();
|
|
2950
|
+
if (!this.isClosing && !this.processError) {
|
|
2951
|
+
this.processError = new (0, _chunkOBPHU4RTjs.ProcessExitError)(
|
|
2734
2952
|
describeExitError(code, signal),
|
|
2735
2953
|
{
|
|
2736
2954
|
exitCode: _nullishCoalesce(code, () => ( void 0)),
|
|
@@ -2747,28 +2965,28 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
2747
2965
|
throw this.processError;
|
|
2748
2966
|
}
|
|
2749
2967
|
if (!this._childProcess || !this._childProcess.stdin) {
|
|
2750
|
-
throw new (0,
|
|
2968
|
+
throw new (0, _chunkOBPHU4RTjs.ConnectionError)("Process not connected");
|
|
2751
2969
|
}
|
|
2752
2970
|
const previousSends = this.queuedSendPromise;
|
|
2753
2971
|
this.queuedSendPromise = (async () => {
|
|
2754
2972
|
await previousSends.catch(() => {
|
|
2755
2973
|
});
|
|
2756
2974
|
if (!this._childProcess || !this._childProcess.stdin || this._childProcess.killed || this.isClosing) {
|
|
2757
|
-
throw new (0,
|
|
2975
|
+
throw new (0, _chunkOBPHU4RTjs.ConnectionError)("Process disconnected before write");
|
|
2758
2976
|
}
|
|
2759
2977
|
await new Promise((resolve2, reject) => {
|
|
2760
2978
|
try {
|
|
2761
2979
|
if (!this._childProcess || !this._childProcess.stdin) {
|
|
2762
|
-
reject(new (0,
|
|
2980
|
+
reject(new (0, _chunkOBPHU4RTjs.ConnectionError)("Process stdin unavailable"));
|
|
2763
2981
|
return;
|
|
2764
2982
|
}
|
|
2765
2983
|
const stdin = this._childProcess.stdin;
|
|
2766
2984
|
if ("writable" in stdin && !stdin.writable) {
|
|
2767
|
-
reject(new (0,
|
|
2985
|
+
reject(new (0, _chunkOBPHU4RTjs.ConnectionError)("Process stdin is not writable"));
|
|
2768
2986
|
return;
|
|
2769
2987
|
}
|
|
2770
|
-
const childPid = _optionalChain([this, 'access',
|
|
2771
|
-
stdin.write(`${message}
|
|
2988
|
+
const childPid = _optionalChain([this, 'access', _40 => _40._childProcess, 'optionalAccess', _41 => _41.pid]);
|
|
2989
|
+
stdin.write(`${_chunkOBPHU4RTjs.escapeJsonLineSeparators.call(void 0, message)}
|
|
2772
2990
|
`, (error) => {
|
|
2773
2991
|
if (error) {
|
|
2774
2992
|
logTransportMessage(
|
|
@@ -2780,13 +2998,13 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
2780
2998
|
const errorMessage = error.message || String(error);
|
|
2781
2999
|
if (errorMessage.includes("EPIPE") || errorMessage.includes("ECONNRESET")) {
|
|
2782
3000
|
reject(
|
|
2783
|
-
new (0,
|
|
3001
|
+
new (0, _chunkOBPHU4RTjs.ConnectionError)("Process stdin closed during write", {
|
|
2784
3002
|
error
|
|
2785
3003
|
})
|
|
2786
3004
|
);
|
|
2787
3005
|
} else {
|
|
2788
3006
|
reject(
|
|
2789
|
-
new (0,
|
|
3007
|
+
new (0, _chunkOBPHU4RTjs.ConnectionError)("Failed to write to process stdin", {
|
|
2790
3008
|
error
|
|
2791
3009
|
})
|
|
2792
3010
|
);
|
|
@@ -2810,7 +3028,7 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
2810
3028
|
}
|
|
2811
3029
|
);
|
|
2812
3030
|
reject(
|
|
2813
|
-
new (0,
|
|
3031
|
+
new (0, _chunkOBPHU4RTjs.ConnectionError)("Error writing to process stdin", {
|
|
2814
3032
|
error: error instanceof Error ? error : new Error(String(error))
|
|
2815
3033
|
})
|
|
2816
3034
|
);
|
|
@@ -2858,11 +3076,9 @@ var ManagedProcessImpl = (_class2 = class {
|
|
|
2858
3076
|
}
|
|
2859
3077
|
});
|
|
2860
3078
|
}
|
|
3079
|
+
_optionalChain([processToClose, 'access', _42 => _42.stdout, 'optionalAccess', _43 => _43.off, 'call', _44 => _44("data", this.stdoutDataHandler)]);
|
|
2861
3080
|
}
|
|
2862
|
-
|
|
2863
|
-
this.readlineInterface.close();
|
|
2864
|
-
this.readlineInterface = null;
|
|
2865
|
-
}
|
|
3081
|
+
this.stdoutDecoder.reset();
|
|
2866
3082
|
this.exitFinalized = true;
|
|
2867
3083
|
if (this.exitDrainTimer) {
|
|
2868
3084
|
clearTimeout(this.exitDrainTimer);
|
|
@@ -2933,11 +3149,11 @@ function observeEarlySpawnFailure(childProcess, gracePeriodMs, sleep) {
|
|
|
2933
3149
|
const errorListener = (err) => {
|
|
2934
3150
|
observation.error = err;
|
|
2935
3151
|
};
|
|
2936
|
-
_optionalChain([childProcess, 'access',
|
|
3152
|
+
_optionalChain([childProcess, 'access', _45 => _45.stderr, 'optionalAccess', _46 => _46.on, 'call', _47 => _47("data", stderrListener)]);
|
|
2937
3153
|
childProcess.once("exit", exitListener);
|
|
2938
3154
|
childProcess.once("error", errorListener);
|
|
2939
3155
|
const cleanup = () => {
|
|
2940
|
-
_optionalChain([childProcess, 'access',
|
|
3156
|
+
_optionalChain([childProcess, 'access', _48 => _48.stderr, 'optionalAccess', _49 => _49.off, 'call', _50 => _50("data", stderrListener)]);
|
|
2941
3157
|
childProcess.off("exit", exitListener);
|
|
2942
3158
|
childProcess.off("error", errorListener);
|
|
2943
3159
|
};
|
|
@@ -2994,7 +3210,7 @@ async function spawnWithWindowsJobObjectRetry(spawnFactory, options = {}) {
|
|
|
2994
3210
|
stderrTail: observation.stderr.slice(-256)
|
|
2995
3211
|
});
|
|
2996
3212
|
try {
|
|
2997
|
-
await _optionalChain([options, 'access',
|
|
3213
|
+
await _optionalChain([options, 'access', _51 => _51.disposeEarlyExited, 'optionalCall', _52 => _52(child)]);
|
|
2998
3214
|
} catch (disposeErr) {
|
|
2999
3215
|
logWarn(logger, "spawnWithWindowsJobObjectRetry: dispose error", {
|
|
3000
3216
|
cause: disposeErr instanceof Error ? disposeErr : new Error(String(disposeErr)),
|
|
@@ -3004,13 +3220,21 @@ async function spawnWithWindowsJobObjectRetry(spawnFactory, options = {}) {
|
|
|
3004
3220
|
await sleep(_nullishCoalesce(_nullishCoalesce(backoff[attempt], () => ( backoff[backoff.length - 1])), () => ( 400)));
|
|
3005
3221
|
}
|
|
3006
3222
|
if (lastChild) return lastChild;
|
|
3007
|
-
throw new (0,
|
|
3223
|
+
throw new (0, _chunkOBPHU4RTjs.DroidClientError)(
|
|
3008
3224
|
"spawnWithWindowsJobObjectRetry: exhausted retries without child",
|
|
3009
3225
|
{}
|
|
3010
3226
|
);
|
|
3011
3227
|
}
|
|
3012
3228
|
|
|
3013
3229
|
// src/exec-core/process-manager.ts
|
|
3230
|
+
var NATIVE_PROCESS_LIFECYCLE_MESSAGE = "[droid process] native lifecycle";
|
|
3231
|
+
var MAX_SPAWN_ERROR_CODE_LENGTH = 64;
|
|
3232
|
+
function getSpawnErrorCode(error) {
|
|
3233
|
+
if (typeof error !== "object" || error === null || !("code" in error) || typeof error.code !== "string" && typeof error.code !== "number") {
|
|
3234
|
+
return void 0;
|
|
3235
|
+
}
|
|
3236
|
+
return String(error.code).slice(0, MAX_SPAWN_ERROR_CODE_LENGTH);
|
|
3237
|
+
}
|
|
3014
3238
|
function buildArgs(config) {
|
|
3015
3239
|
const args = [];
|
|
3016
3240
|
if (config.mode === "acp" /* Acp */) {
|
|
@@ -3029,6 +3253,13 @@ function buildArgs(config) {
|
|
|
3029
3253
|
}
|
|
3030
3254
|
return args;
|
|
3031
3255
|
}
|
|
3256
|
+
function ensureIpcStdio(stdio) {
|
|
3257
|
+
if (Array.isArray(stdio)) {
|
|
3258
|
+
return stdio.includes("ipc") ? stdio : [...stdio, "ipc"];
|
|
3259
|
+
}
|
|
3260
|
+
const standardChannel = _nullishCoalesce(stdio, () => ( "pipe"));
|
|
3261
|
+
return [standardChannel, standardChannel, standardChannel, "ipc"];
|
|
3262
|
+
}
|
|
3032
3263
|
var DroidProcessManager = class {
|
|
3033
3264
|
|
|
3034
3265
|
|
|
@@ -3084,7 +3315,7 @@ var DroidProcessManager = class {
|
|
|
3084
3315
|
logger: this.logger,
|
|
3085
3316
|
disposeEarlyExited: (child) => {
|
|
3086
3317
|
try {
|
|
3087
|
-
_optionalChain([child, 'access',
|
|
3318
|
+
_optionalChain([child, 'access', _53 => _53.stdin, 'optionalAccess', _54 => _54.end, 'call', _55 => _55()]);
|
|
3088
3319
|
} catch (stdinErr) {
|
|
3089
3320
|
logWarn(
|
|
3090
3321
|
this.logger,
|
|
@@ -3109,7 +3340,8 @@ var DroidProcessManager = class {
|
|
|
3109
3340
|
}
|
|
3110
3341
|
);
|
|
3111
3342
|
if (!childProcess.stdout || !childProcess.stdin) {
|
|
3112
|
-
|
|
3343
|
+
childProcess.kill();
|
|
3344
|
+
throw new (0, _chunkOBPHU4RTjs.ConnectionError)("Failed to get process stdio");
|
|
3113
3345
|
}
|
|
3114
3346
|
return new ManagedProcessImpl(
|
|
3115
3347
|
childProcess,
|
|
@@ -3155,21 +3387,88 @@ var DroidProcessManager = class {
|
|
|
3155
3387
|
};
|
|
3156
3388
|
}
|
|
3157
3389
|
invokeNodeSpawn(planned) {
|
|
3390
|
+
const stdio = planned.enableIpc ? ensureIpcStdio(planned.stdio) : _nullishCoalesce(planned.stdio, () => ( ["pipe", "pipe", "pipe"]));
|
|
3158
3391
|
const options = {
|
|
3159
3392
|
cwd: planned.expandedCwd,
|
|
3160
3393
|
env: planned.env,
|
|
3161
|
-
stdio
|
|
3394
|
+
stdio
|
|
3162
3395
|
};
|
|
3163
3396
|
if (planned.enableIpc) {
|
|
3164
3397
|
options.serialization = "json";
|
|
3165
3398
|
}
|
|
3166
|
-
|
|
3399
|
+
const spawnedAt = Date.now();
|
|
3400
|
+
let childProcess;
|
|
3401
|
+
try {
|
|
3402
|
+
childProcess = _child_process.spawn.call(void 0, planned.execPath, planned.args, options);
|
|
3403
|
+
} catch (error) {
|
|
3404
|
+
const failedAt = Date.now();
|
|
3405
|
+
this.logNativeProcessLifecycle({
|
|
3406
|
+
state: "spawn_error",
|
|
3407
|
+
pid: null,
|
|
3408
|
+
createdAt: spawnedAt,
|
|
3409
|
+
eventDate: new Date(failedAt).toISOString(),
|
|
3410
|
+
durationMs: failedAt - spawnedAt,
|
|
3411
|
+
errnoCode: getSpawnErrorCode(error)
|
|
3412
|
+
});
|
|
3413
|
+
throw error;
|
|
3414
|
+
}
|
|
3415
|
+
const pid = childProcess.pid;
|
|
3416
|
+
if (pid === void 0) {
|
|
3417
|
+
childProcess.once("error", (error) => {
|
|
3418
|
+
const failedAt = Date.now();
|
|
3419
|
+
this.logNativeProcessLifecycle({
|
|
3420
|
+
state: "spawn_error",
|
|
3421
|
+
pid: null,
|
|
3422
|
+
createdAt: spawnedAt,
|
|
3423
|
+
eventDate: new Date(failedAt).toISOString(),
|
|
3424
|
+
durationMs: failedAt - spawnedAt,
|
|
3425
|
+
errnoCode: getSpawnErrorCode(error)
|
|
3426
|
+
});
|
|
3427
|
+
});
|
|
3428
|
+
} else {
|
|
3429
|
+
childProcess.once("exit", (exitCode, signal) => {
|
|
3430
|
+
const exitedAt = Date.now();
|
|
3431
|
+
this.logNativeProcessLifecycle({
|
|
3432
|
+
state: "exited",
|
|
3433
|
+
pid,
|
|
3434
|
+
createdAt: spawnedAt,
|
|
3435
|
+
eventDate: new Date(exitedAt).toISOString(),
|
|
3436
|
+
durationMs: exitedAt - spawnedAt,
|
|
3437
|
+
exitCode,
|
|
3438
|
+
signal
|
|
3439
|
+
});
|
|
3440
|
+
});
|
|
3441
|
+
this.logNativeProcessLifecycle({
|
|
3442
|
+
state: "spawned",
|
|
3443
|
+
pid,
|
|
3444
|
+
createdAt: spawnedAt,
|
|
3445
|
+
eventDate: new Date(spawnedAt).toISOString()
|
|
3446
|
+
});
|
|
3447
|
+
}
|
|
3448
|
+
return childProcess;
|
|
3449
|
+
}
|
|
3450
|
+
/**
|
|
3451
|
+
* Emits the content-free native process record consumed by lifecycle
|
|
3452
|
+
* measurement harnesses. `createdAt` is the wall-clock lower bound captured
|
|
3453
|
+
* immediately before spawn; `eventDate` is the wall-clock observation time.
|
|
3454
|
+
*/
|
|
3455
|
+
logNativeProcessLifecycle(record) {
|
|
3456
|
+
try {
|
|
3457
|
+
this.logger.info(NATIVE_PROCESS_LIFECYCLE_MESSAGE, record);
|
|
3458
|
+
} catch (loggingError) {
|
|
3459
|
+
void loggingError;
|
|
3460
|
+
logWarn(
|
|
3461
|
+
defaultExecCoreDeps.logger,
|
|
3462
|
+
"[droid process] native lifecycle logger failed"
|
|
3463
|
+
);
|
|
3464
|
+
}
|
|
3167
3465
|
}
|
|
3168
3466
|
spawnChildProcess(config) {
|
|
3169
3467
|
const planned = this.prepareSpawn(config);
|
|
3170
3468
|
const childProcess = this.invokeNodeSpawn(planned);
|
|
3171
3469
|
if (!childProcess.stdout || !childProcess.stdin) {
|
|
3172
|
-
|
|
3470
|
+
childProcess.kill();
|
|
3471
|
+
throw new (0, _chunkOBPHU4RTjs.ConnectionError)("Failed to get process stdio");
|
|
3173
3472
|
}
|
|
3174
3473
|
return {
|
|
3175
3474
|
logPrefix: planned.logPrefix,
|
|
@@ -3182,17 +3481,25 @@ var DroidProcessManager = class {
|
|
|
3182
3481
|
|
|
3183
3482
|
// src/exec-core/process-transport.ts
|
|
3184
3483
|
var ProcessTransport = (_class3 = class {
|
|
3185
|
-
|
|
3484
|
+
__init20() {this.managedProcess = null}
|
|
3186
3485
|
|
|
3187
3486
|
|
|
3188
3487
|
// Store handlers that may be registered before connect() is called
|
|
3189
|
-
|
|
3190
|
-
|
|
3488
|
+
__init21() {this.messageHandler = null}
|
|
3489
|
+
|
|
3490
|
+
__init22() {this.handleMessage = (frame) => {
|
|
3491
|
+
const message = decodeDroidMessage(frame, this.logger);
|
|
3492
|
+
if (message) _optionalChain([this, 'access', _58 => _58.messageHandler, 'optionalCall', _59 => _59(message)]);
|
|
3493
|
+
}}
|
|
3494
|
+
__init23() {this.errorHandler = null}
|
|
3191
3495
|
|
|
3192
|
-
|
|
3496
|
+
|
|
3497
|
+
constructor(options = {}, deps = defaultExecCoreDeps) {;_class3.prototype.__init20.call(this);_class3.prototype.__init21.call(this);_class3.prototype.__init22.call(this);_class3.prototype.__init23.call(this);
|
|
3193
3498
|
this.options = options;
|
|
3194
3499
|
const resolved = resolveExecCoreDeps(options.observability, deps);
|
|
3500
|
+
this.logger = resolved.logger;
|
|
3195
3501
|
this.metrics = resolved.metrics;
|
|
3502
|
+
this.environmentResolver = resolved.environmentResolver;
|
|
3196
3503
|
this.processManager = new DroidProcessManager(
|
|
3197
3504
|
{
|
|
3198
3505
|
observability: options.observability
|
|
@@ -3202,7 +3509,7 @@ var ProcessTransport = (_class3 = class {
|
|
|
3202
3509
|
}
|
|
3203
3510
|
async connect() {
|
|
3204
3511
|
if (this.managedProcess && this.managedProcess.isConnected) {
|
|
3205
|
-
throw new (0,
|
|
3512
|
+
throw new (0, _chunkOBPHU4RTjs.ConnectionError)("Transport already connected");
|
|
3206
3513
|
}
|
|
3207
3514
|
const config = {
|
|
3208
3515
|
execPath: this.options.droidExecPath,
|
|
@@ -3210,13 +3517,21 @@ var ProcessTransport = (_class3 = class {
|
|
|
3210
3517
|
mode: "stream-jsonrpc" /* StreamJsonRpc */,
|
|
3211
3518
|
cwd: this.options.cwd,
|
|
3212
3519
|
env: this.options.env,
|
|
3520
|
+
trustedEnv: {
|
|
3521
|
+
...this.options.runtimeSettingsAuthority ? this.environmentResolver.buildRuntimeSettingsAuthorityEnv(
|
|
3522
|
+
this.options.runtimeSettingsAuthority
|
|
3523
|
+
) : {},
|
|
3524
|
+
...this.options.trustedEnv
|
|
3525
|
+
},
|
|
3213
3526
|
extraArgs: this.options.droidExecExtraArgs,
|
|
3214
|
-
enableIpc: this.options.enableIpc
|
|
3527
|
+
enableIpc: this.options.enableIpc,
|
|
3528
|
+
stdio: this.options.stdio
|
|
3215
3529
|
};
|
|
3216
3530
|
const spawnStart = performance.now();
|
|
3217
3531
|
let spawnOutcome = "error";
|
|
3532
|
+
let managedProcess;
|
|
3218
3533
|
try {
|
|
3219
|
-
|
|
3534
|
+
managedProcess = process.platform === "win32" ? await this.processManager.spawnWithWindowsRetry(config) : this.processManager.spawn(config);
|
|
3220
3535
|
spawnOutcome = "success";
|
|
3221
3536
|
} finally {
|
|
3222
3537
|
this.metrics.recordDuration(
|
|
@@ -3225,8 +3540,15 @@ var ProcessTransport = (_class3 = class {
|
|
|
3225
3540
|
{ outcome: spawnOutcome, source: "process_transport" }
|
|
3226
3541
|
);
|
|
3227
3542
|
}
|
|
3543
|
+
try {
|
|
3544
|
+
_optionalChain([this, 'access', _60 => _60.options, 'access', _61 => _61.onSpawned, 'optionalCall', _62 => _62(managedProcess.childProcess)]);
|
|
3545
|
+
} catch (error) {
|
|
3546
|
+
await managedProcess.close();
|
|
3547
|
+
throw error;
|
|
3548
|
+
}
|
|
3549
|
+
this.managedProcess = managedProcess;
|
|
3228
3550
|
if (this.messageHandler) {
|
|
3229
|
-
this.managedProcess.onMessage(this.
|
|
3551
|
+
this.managedProcess.onMessage(this.handleMessage);
|
|
3230
3552
|
}
|
|
3231
3553
|
if (this.errorHandler) {
|
|
3232
3554
|
this.managedProcess.onError(this.errorHandler);
|
|
@@ -3234,14 +3556,14 @@ var ProcessTransport = (_class3 = class {
|
|
|
3234
3556
|
}
|
|
3235
3557
|
async send(message) {
|
|
3236
3558
|
if (!this.managedProcess) {
|
|
3237
|
-
throw new (0,
|
|
3559
|
+
throw new (0, _chunkOBPHU4RTjs.ConnectionError)("Transport not connected");
|
|
3238
3560
|
}
|
|
3239
|
-
return this.managedProcess.send(message);
|
|
3561
|
+
return await this.managedProcess.send(JSON.stringify(message));
|
|
3240
3562
|
}
|
|
3241
3563
|
onMessage(handler) {
|
|
3242
3564
|
this.messageHandler = handler;
|
|
3243
3565
|
if (this.managedProcess) {
|
|
3244
|
-
this.managedProcess.onMessage(
|
|
3566
|
+
this.managedProcess.onMessage(this.handleMessage);
|
|
3245
3567
|
}
|
|
3246
3568
|
}
|
|
3247
3569
|
onError(handler) {
|
|
@@ -3257,7 +3579,7 @@ var ProcessTransport = (_class3 = class {
|
|
|
3257
3579
|
}
|
|
3258
3580
|
}
|
|
3259
3581
|
get isConnected() {
|
|
3260
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
3582
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _63 => _63.managedProcess, 'optionalAccess', _64 => _64.isConnected]), () => ( false));
|
|
3261
3583
|
}
|
|
3262
3584
|
getManagedProcess() {
|
|
3263
3585
|
return this.managedProcess;
|
|
@@ -3268,7 +3590,7 @@ var ProcessTransport = (_class3 = class {
|
|
|
3268
3590
|
function resolveApiKey(apiKey) {
|
|
3269
3591
|
const resolved = _nullishCoalesce(apiKey, () => ( process.env.FACTORY_API_KEY));
|
|
3270
3592
|
if (!resolved) {
|
|
3271
|
-
throw new (0,
|
|
3593
|
+
throw new (0, _chunkOBPHU4RTjs.DroidClientError)(
|
|
3272
3594
|
"No Factory API key found. Pass `apiKey` when creating the session, or set the FACTORY_API_KEY environment variable."
|
|
3273
3595
|
);
|
|
3274
3596
|
}
|
|
@@ -3286,7 +3608,7 @@ async function createTransport(options) {
|
|
|
3286
3608
|
...options.env,
|
|
3287
3609
|
FACTORY_API_KEY: resolveApiKey(options.apiKey),
|
|
3288
3610
|
FACTORY_UPSTREAM_CLIENT_TYPE: "sdk" /* SDK */,
|
|
3289
|
-
FACTORY_UPSTREAM_SDK:
|
|
3611
|
+
FACTORY_UPSTREAM_SDK: _chunkOBPHU4RTjs.SDK_IDENTITY
|
|
3290
3612
|
},
|
|
3291
3613
|
observability: options.observability
|
|
3292
3614
|
});
|
|
@@ -3308,7 +3630,7 @@ async function createConfiguredClient(options) {
|
|
|
3308
3630
|
const client = new DroidClient({
|
|
3309
3631
|
transport,
|
|
3310
3632
|
observability: options.observability,
|
|
3311
|
-
getRequestAttribution: () =>
|
|
3633
|
+
getRequestAttribution: () => _chunkOBPHU4RTjs.SDK_REQUEST_ATTRIBUTION
|
|
3312
3634
|
});
|
|
3313
3635
|
setupClientHandlers(client, options);
|
|
3314
3636
|
return { transport, client };
|
|
@@ -3319,7 +3641,7 @@ async function closeQuietly(resource) {
|
|
|
3319
3641
|
}
|
|
3320
3642
|
try {
|
|
3321
3643
|
await resource.close();
|
|
3322
|
-
} catch (
|
|
3644
|
+
} catch (e6) {
|
|
3323
3645
|
}
|
|
3324
3646
|
}
|
|
3325
3647
|
function buildInitParams(options) {
|
|
@@ -3361,7 +3683,7 @@ function buildInitParams(options) {
|
|
|
3361
3683
|
...options.disableBuiltinSkills !== void 0 && {
|
|
3362
3684
|
disableBuiltinSkills: options.disableBuiltinSkills
|
|
3363
3685
|
},
|
|
3364
|
-
tags:
|
|
3686
|
+
tags: _chunkOBPHU4RTjs.withSdkTag.call(void 0, options.tags)
|
|
3365
3687
|
};
|
|
3366
3688
|
}
|
|
3367
3689
|
|
|
@@ -3372,15 +3694,21 @@ var _http = require('http'); var _http2 = _interopRequireDefault(_http);
|
|
|
3372
3694
|
var _mcpjs = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
3373
3695
|
var _streamableHttpjs = require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
3374
3696
|
|
|
3375
|
-
function tool(name, description, inputSchemaOrHandler,
|
|
3697
|
+
function tool(name, description, inputSchemaOrHandler, handlerOrOptions, maybeOptions) {
|
|
3698
|
+
const options = typeof handlerOrOptions === "function" ? maybeOptions : handlerOrOptions;
|
|
3699
|
+
const annotationFields = _optionalChain([options, 'optionalAccess', _65 => _65.annotations]) && {
|
|
3700
|
+
annotations: options.annotations
|
|
3701
|
+
};
|
|
3376
3702
|
if (typeof inputSchemaOrHandler === "function") {
|
|
3377
3703
|
const actualHandler = inputSchemaOrHandler;
|
|
3378
3704
|
return {
|
|
3379
3705
|
name,
|
|
3380
3706
|
description,
|
|
3381
|
-
handler: (input) => actualHandler(input)
|
|
3707
|
+
handler: (input) => actualHandler(input),
|
|
3708
|
+
...annotationFields
|
|
3382
3709
|
};
|
|
3383
3710
|
}
|
|
3711
|
+
const handler = typeof handlerOrOptions === "function" ? handlerOrOptions : void 0;
|
|
3384
3712
|
if (!handler) {
|
|
3385
3713
|
throw new Error(`Missing handler for SDK MCP tool "${name}"`);
|
|
3386
3714
|
}
|
|
@@ -3389,7 +3717,8 @@ function tool(name, description, inputSchemaOrHandler, handler) {
|
|
|
3389
3717
|
name,
|
|
3390
3718
|
description,
|
|
3391
3719
|
inputSchema: inputSchemaOrHandler,
|
|
3392
|
-
handler: (input) => handler(inputObjectSchema.parse(input))
|
|
3720
|
+
handler: (input) => handler(inputObjectSchema.parse(input)),
|
|
3721
|
+
...annotationFields
|
|
3393
3722
|
};
|
|
3394
3723
|
}
|
|
3395
3724
|
function isSdkMcpServer(server) {
|
|
@@ -3423,7 +3752,7 @@ function writeJsonError(res, statusCode, message, headers = {}) {
|
|
|
3423
3752
|
});
|
|
3424
3753
|
res.end(
|
|
3425
3754
|
JSON.stringify({
|
|
3426
|
-
jsonrpc:
|
|
3755
|
+
jsonrpc: _chunkOBPHU4RTjs.JSONRPC_VERSION,
|
|
3427
3756
|
error: { code: -32603 /* INTERNAL_ERROR */, message },
|
|
3428
3757
|
id: null
|
|
3429
3758
|
})
|
|
@@ -3445,10 +3774,10 @@ var SdkMcpServer = (_class4 = class {
|
|
|
3445
3774
|
|
|
3446
3775
|
|
|
3447
3776
|
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
constructor(options) {;_class4.prototype.
|
|
3777
|
+
__init24() {this._httpServer = null}
|
|
3778
|
+
__init25() {this._url = null}
|
|
3779
|
+
__init26() {this._token = null}
|
|
3780
|
+
constructor(options) {;_class4.prototype.__init24.call(this);_class4.prototype.__init25.call(this);_class4.prototype.__init26.call(this);
|
|
3452
3781
|
this.name = options.name;
|
|
3453
3782
|
this.version = _nullishCoalesce(options.version, () => ( "1.0.0"));
|
|
3454
3783
|
this.tools = options.tools;
|
|
@@ -3499,7 +3828,7 @@ var SdkMcpServer = (_class4 = class {
|
|
|
3499
3828
|
if (!server) {
|
|
3500
3829
|
return;
|
|
3501
3830
|
}
|
|
3502
|
-
_optionalChain([server, 'access',
|
|
3831
|
+
_optionalChain([server, 'access', _66 => _66.closeAllConnections, 'optionalCall', _67 => _67()]);
|
|
3503
3832
|
server.close();
|
|
3504
3833
|
await _events.once.call(void 0, server, "close");
|
|
3505
3834
|
}
|
|
@@ -3515,7 +3844,8 @@ var SdkMcpServer = (_class4 = class {
|
|
|
3515
3844
|
description: sdkTool.description,
|
|
3516
3845
|
...sdkTool.inputSchema && {
|
|
3517
3846
|
inputSchema: sdkTool.inputSchema
|
|
3518
|
-
}
|
|
3847
|
+
},
|
|
3848
|
+
...sdkTool.annotations && { annotations: sdkTool.annotations }
|
|
3519
3849
|
},
|
|
3520
3850
|
async (input) => toCallToolResult(await sdkTool.handler(input))
|
|
3521
3851
|
);
|
|
@@ -3595,7 +3925,7 @@ async function startSdkMcpServers(servers) {
|
|
|
3595
3925
|
// src/session.ts
|
|
3596
3926
|
var DroidSession = (_class5 = class _DroidSession {
|
|
3597
3927
|
/** @internal */
|
|
3598
|
-
constructor(client, sessionId, metadata, _runtime, cleanupCallbacks = []) {;_class5.prototype.
|
|
3928
|
+
constructor(client, sessionId, metadata, _runtime, cleanupCallbacks = []) {;_class5.prototype.__init27.call(this);_class5.prototype.__init28.call(this);_class5.prototype.__init29.call(this);_class5.prototype.__init30.call(this);_class5.prototype.__init31.call(this);_class5.prototype.__init32.call(this);
|
|
3599
3929
|
this._runtime = _runtime;
|
|
3600
3930
|
this._client = client;
|
|
3601
3931
|
this._sessionId = sessionId;
|
|
@@ -3610,13 +3940,13 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3610
3940
|
|
|
3611
3941
|
|
|
3612
3942
|
|
|
3613
|
-
|
|
3614
|
-
|
|
3943
|
+
__init27() {this._settingsRevision = 0}
|
|
3944
|
+
__init28() {this._status = "active"}
|
|
3615
3945
|
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3946
|
+
__init29() {this._cleanupAbortSignal = null}
|
|
3947
|
+
__init30() {this._cleanupCallbacks = []}
|
|
3948
|
+
__init31() {this._activeBridges = /* @__PURE__ */ new Set()}
|
|
3949
|
+
__init32() {this._notificationCleanups = /* @__PURE__ */ new Set()}
|
|
3620
3950
|
get id() {
|
|
3621
3951
|
return this._sessionId;
|
|
3622
3952
|
}
|
|
@@ -3628,10 +3958,10 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3628
3958
|
}
|
|
3629
3959
|
async *stream(prompt, options) {
|
|
3630
3960
|
this._ensureNotClosed();
|
|
3631
|
-
yield*
|
|
3961
|
+
yield* _chunkOBPHU4RTjs.streamFromClient.call(void 0,
|
|
3632
3962
|
{
|
|
3633
3963
|
onNotification: (handler) => this._client.onNotification((notification) => {
|
|
3634
|
-
const inner =
|
|
3964
|
+
const inner = _chunkOBPHU4RTjs.extractInnerNotification.call(void 0, notification);
|
|
3635
3965
|
if (inner) handler(inner);
|
|
3636
3966
|
}),
|
|
3637
3967
|
onError: (handler) => this._client.onError(handler),
|
|
@@ -3657,7 +3987,7 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3657
3987
|
}
|
|
3658
3988
|
this._status = "closed";
|
|
3659
3989
|
this._releaseHandleSubscriptions();
|
|
3660
|
-
_optionalChain([this, 'access',
|
|
3990
|
+
_optionalChain([this, 'access', _68 => _68._cleanupAbortSignal, 'optionalCall', _69 => _69()]);
|
|
3661
3991
|
this._cleanupAbortSignal = null;
|
|
3662
3992
|
for (const bridge of this._activeBridges) {
|
|
3663
3993
|
bridge.signalDone();
|
|
@@ -3675,14 +4005,14 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3675
4005
|
async updateSettings(params) {
|
|
3676
4006
|
this._ensureNotClosed();
|
|
3677
4007
|
const revision = this._settingsRevision;
|
|
3678
|
-
const result =
|
|
4008
|
+
const result = _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0,
|
|
3679
4009
|
await this._client.updateSessionSettings(params)
|
|
3680
4010
|
);
|
|
3681
4011
|
if (params.disabledToolIds !== void 0) {
|
|
3682
4012
|
this._runtime.loadParams.disabledToolIds = params.disabledToolIds;
|
|
3683
4013
|
}
|
|
3684
4014
|
if (this._settingsRevision === revision) {
|
|
3685
|
-
this._settings =
|
|
4015
|
+
this._settings = _chunkOBPHU4RTjs.mergeSessionSettings.call(void 0, this._settings, params);
|
|
3686
4016
|
}
|
|
3687
4017
|
return result;
|
|
3688
4018
|
}
|
|
@@ -3699,27 +4029,32 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3699
4029
|
}
|
|
3700
4030
|
async addMcpServer(params) {
|
|
3701
4031
|
this._ensureNotClosed();
|
|
3702
|
-
return
|
|
4032
|
+
return _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0, await this._client.addMcpServer(params));
|
|
3703
4033
|
}
|
|
3704
4034
|
async removeMcpServer(params) {
|
|
3705
4035
|
this._ensureNotClosed();
|
|
3706
|
-
return
|
|
4036
|
+
return _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0, await this._client.removeMcpServer(params));
|
|
3707
4037
|
}
|
|
3708
4038
|
async toggleMcpServer(params) {
|
|
3709
4039
|
this._ensureNotClosed();
|
|
3710
|
-
return
|
|
4040
|
+
return _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0, await this._client.toggleMcpServer(params));
|
|
3711
4041
|
}
|
|
3712
4042
|
async listMcpServers() {
|
|
3713
4043
|
this._ensureNotClosed();
|
|
3714
|
-
return
|
|
4044
|
+
return _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0, await this._client.listMcpServers());
|
|
3715
4045
|
}
|
|
3716
4046
|
async listMcpTools() {
|
|
3717
4047
|
this._ensureNotClosed();
|
|
3718
|
-
return
|
|
4048
|
+
return _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0, await this._client.listMcpTools()).tools;
|
|
4049
|
+
}
|
|
4050
|
+
/** Refresh connector discovery. MCP configuration has its own lifecycle. */
|
|
4051
|
+
async refreshConnectorToolCatalog() {
|
|
4052
|
+
this._ensureNotClosed();
|
|
4053
|
+
_chunkOBPHU4RTjs.unwrapResponseResult.call(void 0, await this._client.refreshConnectorToolCatalog());
|
|
3719
4054
|
}
|
|
3720
4055
|
async listTools(params = {}) {
|
|
3721
4056
|
this._ensureNotClosed();
|
|
3722
|
-
return
|
|
4057
|
+
return _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0, await this._client.listTools(params)).tools.map(
|
|
3723
4058
|
({ id: _protocolId, llmId, currentlyAllowed, ...tool2 }) => ({
|
|
3724
4059
|
...tool2,
|
|
3725
4060
|
id: llmId,
|
|
@@ -3729,17 +4064,17 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3729
4064
|
}
|
|
3730
4065
|
async authenticateMcpServer(params) {
|
|
3731
4066
|
this._ensureNotClosed();
|
|
3732
|
-
return
|
|
4067
|
+
return _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0,
|
|
3733
4068
|
await this._client.authenticateMcpServer(params)
|
|
3734
4069
|
);
|
|
3735
4070
|
}
|
|
3736
|
-
async listSkills() {
|
|
4071
|
+
async listSkills(params) {
|
|
3737
4072
|
this._ensureNotClosed();
|
|
3738
|
-
return
|
|
4073
|
+
return _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0, await this._client.listSkills(params));
|
|
3739
4074
|
}
|
|
3740
4075
|
async setSkillDisabled(params) {
|
|
3741
4076
|
this._ensureNotClosed();
|
|
3742
|
-
return
|
|
4077
|
+
return _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0,
|
|
3743
4078
|
await this._client.setSkillDisabled(
|
|
3744
4079
|
params.skillName,
|
|
3745
4080
|
params.disabled,
|
|
@@ -3749,34 +4084,41 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3749
4084
|
}
|
|
3750
4085
|
async getRewindInfo(params) {
|
|
3751
4086
|
this._ensureNotClosed();
|
|
3752
|
-
return
|
|
4087
|
+
return _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0, await this._client.getRewindInfo(params));
|
|
3753
4088
|
}
|
|
3754
4089
|
async rewind(params) {
|
|
3755
4090
|
const { session, result } = await this._runReplacement(
|
|
3756
|
-
() => this._client.executeRewind(params).then(
|
|
4091
|
+
() => this._client.executeRewind(params).then(_chunkOBPHU4RTjs.unwrapResponseResult)
|
|
3757
4092
|
);
|
|
3758
4093
|
const { newSessionId: _newSessionId, ...metadata } = result;
|
|
3759
4094
|
return { session, ...metadata };
|
|
3760
4095
|
}
|
|
3761
4096
|
async compact(params) {
|
|
3762
4097
|
const { session, result } = await this._runReplacement(
|
|
3763
|
-
() => this._client.compactSession(_nullishCoalesce(params, () => ( {}))).then(
|
|
4098
|
+
() => this._client.compactSession(_nullishCoalesce(params, () => ( {}))).then(_chunkOBPHU4RTjs.unwrapResponseResult),
|
|
4099
|
+
{ retainSourceWhenSameId: true }
|
|
4100
|
+
);
|
|
4101
|
+
return { session, removedCount: result.removedCount };
|
|
4102
|
+
}
|
|
4103
|
+
async handoff(params) {
|
|
4104
|
+
const { session, result } = await this._runReplacement(
|
|
4105
|
+
() => this._client.compactSession({ ...params, mode: "handoff" }).then(_chunkOBPHU4RTjs.unwrapResponseResult)
|
|
3764
4106
|
);
|
|
3765
4107
|
return { session, removedCount: result.removedCount };
|
|
3766
4108
|
}
|
|
3767
4109
|
async fork(params = {}) {
|
|
3768
4110
|
const { session } = await this._runReplacement(
|
|
3769
|
-
() => this._client.forkSession(params).then(
|
|
4111
|
+
() => this._client.forkSession(params).then(_chunkOBPHU4RTjs.unwrapResponseResult)
|
|
3770
4112
|
);
|
|
3771
4113
|
return session;
|
|
3772
4114
|
}
|
|
3773
4115
|
async getContextStats() {
|
|
3774
4116
|
this._ensureNotClosed();
|
|
3775
|
-
return
|
|
4117
|
+
return _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0, await this._client.getContextStats());
|
|
3776
4118
|
}
|
|
3777
4119
|
async rename(params) {
|
|
3778
4120
|
this._ensureNotClosed();
|
|
3779
|
-
|
|
4121
|
+
_chunkOBPHU4RTjs.unwrapResponseResult.call(void 0, await this._client.renameSession(params));
|
|
3780
4122
|
}
|
|
3781
4123
|
onNotification(callback, filter) {
|
|
3782
4124
|
this._ensureNotClosed();
|
|
@@ -3790,13 +4132,13 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3790
4132
|
}
|
|
3791
4133
|
_ensureNotClosed() {
|
|
3792
4134
|
if (this._status === "replaced" && this._replacementSessionId) {
|
|
3793
|
-
throw new (0,
|
|
4135
|
+
throw new (0, _chunkOBPHU4RTjs.SessionReplacedError)(
|
|
3794
4136
|
this._sessionId,
|
|
3795
4137
|
this._replacementSessionId
|
|
3796
4138
|
);
|
|
3797
4139
|
}
|
|
3798
4140
|
if (this._status !== "active") {
|
|
3799
|
-
throw new (0,
|
|
4141
|
+
throw new (0, _chunkOBPHU4RTjs.ConnectionError)(
|
|
3800
4142
|
this._status === "replacing" ? "Session replacement is already in progress." : "Session has been closed. Create a new session to continue."
|
|
3801
4143
|
);
|
|
3802
4144
|
}
|
|
@@ -3804,11 +4146,11 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3804
4146
|
_beginReplacement() {
|
|
3805
4147
|
this._ensureNotClosed();
|
|
3806
4148
|
if (this._activeBridges.size > 0) {
|
|
3807
|
-
throw new (0,
|
|
4149
|
+
throw new (0, _chunkOBPHU4RTjs.ConcurrentStreamError)(this._sessionId);
|
|
3808
4150
|
}
|
|
3809
4151
|
this._status = "replacing";
|
|
3810
4152
|
}
|
|
3811
|
-
async _runReplacement(operation) {
|
|
4153
|
+
async _runReplacement(operation, options) {
|
|
3812
4154
|
this._beginReplacement();
|
|
3813
4155
|
let result;
|
|
3814
4156
|
try {
|
|
@@ -3820,15 +4162,19 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3820
4162
|
throw error;
|
|
3821
4163
|
}
|
|
3822
4164
|
if (this._status !== "replacing") {
|
|
3823
|
-
throw new (0,
|
|
3824
|
-
cause: new (0,
|
|
4165
|
+
throw new (0, _chunkOBPHU4RTjs.SessionReplacementError)(this._sessionId, result.newSessionId, {
|
|
4166
|
+
cause: new (0, _chunkOBPHU4RTjs.ConnectionError)(
|
|
3825
4167
|
"Session closed while replacement was in progress."
|
|
3826
4168
|
),
|
|
3827
|
-
rollbackError: new (0,
|
|
4169
|
+
rollbackError: new (0, _chunkOBPHU4RTjs.ConnectionError)(
|
|
3828
4170
|
"The source session was already closed."
|
|
3829
4171
|
)
|
|
3830
4172
|
});
|
|
3831
4173
|
}
|
|
4174
|
+
if (_optionalChain([options, 'optionalAccess', _70 => _70.retainSourceWhenSameId]) && result.newSessionId === this._sessionId) {
|
|
4175
|
+
this._status = "active";
|
|
4176
|
+
return { session: this, result };
|
|
4177
|
+
}
|
|
3832
4178
|
return {
|
|
3833
4179
|
session: await this._loadReplacement(result.newSessionId),
|
|
3834
4180
|
result
|
|
@@ -3836,18 +4182,18 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3836
4182
|
}
|
|
3837
4183
|
async _loadReplacement(replacementSessionId) {
|
|
3838
4184
|
try {
|
|
3839
|
-
const loadResult =
|
|
4185
|
+
const loadResult = _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0,
|
|
3840
4186
|
await this._client.loadSession({
|
|
3841
4187
|
...this._runtime.loadParams,
|
|
3842
4188
|
sessionId: replacementSessionId
|
|
3843
4189
|
})
|
|
3844
4190
|
);
|
|
3845
4191
|
if (this._status !== "replacing") {
|
|
3846
|
-
throw new (0,
|
|
4192
|
+
throw new (0, _chunkOBPHU4RTjs.ConnectionError)(
|
|
3847
4193
|
"Session closed while replacement was loading."
|
|
3848
4194
|
);
|
|
3849
4195
|
}
|
|
3850
|
-
_optionalChain([this, 'access',
|
|
4196
|
+
_optionalChain([this, 'access', _71 => _71._cleanupAbortSignal, 'optionalCall', _72 => _72()]);
|
|
3851
4197
|
this._cleanupAbortSignal = null;
|
|
3852
4198
|
this._releaseHandleSubscriptions();
|
|
3853
4199
|
const cleanupCallbacks = this._cleanupCallbacks;
|
|
@@ -3864,12 +4210,12 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3864
4210
|
return replacement;
|
|
3865
4211
|
} catch (cause) {
|
|
3866
4212
|
if (this._status !== "replacing") {
|
|
3867
|
-
throw new (0,
|
|
4213
|
+
throw new (0, _chunkOBPHU4RTjs.SessionReplacementError)(
|
|
3868
4214
|
this._sessionId,
|
|
3869
4215
|
replacementSessionId,
|
|
3870
4216
|
{
|
|
3871
4217
|
cause,
|
|
3872
|
-
rollbackError: new (0,
|
|
4218
|
+
rollbackError: new (0, _chunkOBPHU4RTjs.ConnectionError)(
|
|
3873
4219
|
"The source session was closed before rollback."
|
|
3874
4220
|
)
|
|
3875
4221
|
}
|
|
@@ -3877,7 +4223,7 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3877
4223
|
}
|
|
3878
4224
|
let rollbackResult;
|
|
3879
4225
|
try {
|
|
3880
|
-
rollbackResult =
|
|
4226
|
+
rollbackResult = _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0,
|
|
3881
4227
|
await this._client.loadSession({
|
|
3882
4228
|
...this._runtime.loadParams,
|
|
3883
4229
|
sessionId: this._sessionId
|
|
@@ -3885,18 +4231,18 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3885
4231
|
);
|
|
3886
4232
|
} catch (rollbackError) {
|
|
3887
4233
|
await this._disposeAfterFailedRollback();
|
|
3888
|
-
throw new (0,
|
|
4234
|
+
throw new (0, _chunkOBPHU4RTjs.SessionReplacementError)(
|
|
3889
4235
|
this._sessionId,
|
|
3890
4236
|
replacementSessionId,
|
|
3891
4237
|
{ cause, rollbackError }
|
|
3892
4238
|
);
|
|
3893
4239
|
}
|
|
3894
4240
|
if (this._status !== "replacing") {
|
|
3895
|
-
const rollbackError = new (0,
|
|
4241
|
+
const rollbackError = new (0, _chunkOBPHU4RTjs.ConnectionError)(
|
|
3896
4242
|
"Session closed while replacement rollback was loading."
|
|
3897
4243
|
);
|
|
3898
4244
|
await this._disposeAfterFailedRollback();
|
|
3899
|
-
throw new (0,
|
|
4245
|
+
throw new (0, _chunkOBPHU4RTjs.SessionReplacementError)(
|
|
3900
4246
|
this._sessionId,
|
|
3901
4247
|
replacementSessionId,
|
|
3902
4248
|
{ cause, rollbackError }
|
|
@@ -3905,24 +4251,24 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3905
4251
|
this._settings = rollbackResult.settings;
|
|
3906
4252
|
this._cwd = rollbackResult.cwd;
|
|
3907
4253
|
this._status = "active";
|
|
3908
|
-
throw new (0,
|
|
4254
|
+
throw new (0, _chunkOBPHU4RTjs.SessionReplacementError)(this._sessionId, replacementSessionId, {
|
|
3909
4255
|
cause
|
|
3910
4256
|
});
|
|
3911
4257
|
}
|
|
3912
4258
|
}
|
|
3913
4259
|
_bindAbortSignal() {
|
|
3914
|
-
this._cleanupAbortSignal =
|
|
4260
|
+
this._cleanupAbortSignal = _chunkOBPHU4RTjs.wireAbortSignal.call(void 0,
|
|
3915
4261
|
this._runtime.abortSignal,
|
|
3916
4262
|
() => void this.close()
|
|
3917
4263
|
);
|
|
3918
4264
|
}
|
|
3919
4265
|
_bindMetadataNotifications() {
|
|
3920
4266
|
const unsubscribe = this._client.onNotification((notification) => {
|
|
3921
|
-
const inner =
|
|
3922
|
-
if (_optionalChain([inner, 'optionalAccess',
|
|
3923
|
-
this._settings =
|
|
4267
|
+
const inner = _chunkOBPHU4RTjs.extractInnerNotification.call(void 0, notification);
|
|
4268
|
+
if (_optionalChain([inner, 'optionalAccess', _73 => _73.type]) === "settings_updated" /* SETTINGS_UPDATED */) {
|
|
4269
|
+
this._settings = _chunkOBPHU4RTjs.mergeSessionSettings.call(void 0, this._settings, inner.settings);
|
|
3924
4270
|
this._settingsRevision++;
|
|
3925
|
-
} else if (_optionalChain([inner, 'optionalAccess',
|
|
4271
|
+
} else if (_optionalChain([inner, 'optionalAccess', _74 => _74.type]) === "session_working_directory_changed" /* SESSION_WORKING_DIRECTORY_CHANGED */) {
|
|
3926
4272
|
this._cwd = inner.cwd;
|
|
3927
4273
|
}
|
|
3928
4274
|
});
|
|
@@ -3937,7 +4283,7 @@ var DroidSession = (_class5 = class _DroidSession {
|
|
|
3937
4283
|
}
|
|
3938
4284
|
async _disposeAfterFailedRollback() {
|
|
3939
4285
|
this._status = "closed";
|
|
3940
|
-
_optionalChain([this, 'access',
|
|
4286
|
+
_optionalChain([this, 'access', _75 => _75._cleanupAbortSignal, 'optionalCall', _76 => _76()]);
|
|
3941
4287
|
this._cleanupAbortSignal = null;
|
|
3942
4288
|
this._releaseHandleSubscriptions();
|
|
3943
4289
|
await closeQuietly(this._client);
|
|
@@ -3959,8 +4305,8 @@ function createReplacementLoadParams(options, mcpServers) {
|
|
|
3959
4305
|
}
|
|
3960
4306
|
async function createSession(options = {}) {
|
|
3961
4307
|
const { client } = await createConfiguredClient(options);
|
|
3962
|
-
let cleanupInitAbortSignal = _optionalChain([options, 'access',
|
|
3963
|
-
} :
|
|
4308
|
+
let cleanupInitAbortSignal = _optionalChain([options, 'access', _77 => _77.abortSignal, 'optionalAccess', _78 => _78.aborted]) ? () => {
|
|
4309
|
+
} : _chunkOBPHU4RTjs.wireAbortSignal.call(void 0, options.abortSignal, () => {
|
|
3964
4310
|
void closeQuietly(client);
|
|
3965
4311
|
});
|
|
3966
4312
|
let sdkMcpServers;
|
|
@@ -3970,7 +4316,7 @@ async function createSession(options = {}) {
|
|
|
3970
4316
|
...options,
|
|
3971
4317
|
mcpServers: sdkMcpServers.mcpServers
|
|
3972
4318
|
});
|
|
3973
|
-
const initResult =
|
|
4319
|
+
const initResult = _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0,
|
|
3974
4320
|
await client.initializeSession(initParams)
|
|
3975
4321
|
);
|
|
3976
4322
|
const session = new DroidSession(
|
|
@@ -3978,7 +4324,7 @@ async function createSession(options = {}) {
|
|
|
3978
4324
|
initResult.sessionId,
|
|
3979
4325
|
{
|
|
3980
4326
|
settings: initResult.settings,
|
|
3981
|
-
cwd: _nullishCoalesce(_optionalChain([initResult, 'access',
|
|
4327
|
+
cwd: _nullishCoalesce(_optionalChain([initResult, 'access', _79 => _79.worktree, 'optionalAccess', _80 => _80.path]), () => ( initParams.cwd))
|
|
3982
4328
|
},
|
|
3983
4329
|
{
|
|
3984
4330
|
abortSignal: options.abortSignal,
|
|
@@ -3995,15 +4341,15 @@ async function createSession(options = {}) {
|
|
|
3995
4341
|
return session;
|
|
3996
4342
|
} catch (error) {
|
|
3997
4343
|
cleanupInitAbortSignal();
|
|
3998
|
-
await _optionalChain([sdkMcpServers, 'optionalAccess',
|
|
4344
|
+
await _optionalChain([sdkMcpServers, 'optionalAccess', _81 => _81.cleanup, 'call', _82 => _82()]);
|
|
3999
4345
|
await closeQuietly(client);
|
|
4000
4346
|
throw error;
|
|
4001
4347
|
}
|
|
4002
4348
|
}
|
|
4003
4349
|
async function resumeSession(sessionId, options = {}) {
|
|
4004
4350
|
const { client } = await createConfiguredClient(options);
|
|
4005
|
-
let cleanupLoadAbortSignal = _optionalChain([options, 'access',
|
|
4006
|
-
} :
|
|
4351
|
+
let cleanupLoadAbortSignal = _optionalChain([options, 'access', _83 => _83.abortSignal, 'optionalAccess', _84 => _84.aborted]) ? () => {
|
|
4352
|
+
} : _chunkOBPHU4RTjs.wireAbortSignal.call(void 0, options.abortSignal, () => {
|
|
4007
4353
|
void closeQuietly(client);
|
|
4008
4354
|
});
|
|
4009
4355
|
let sdkMcpServers;
|
|
@@ -4013,7 +4359,7 @@ async function resumeSession(sessionId, options = {}) {
|
|
|
4013
4359
|
options,
|
|
4014
4360
|
sdkMcpServers.mcpServers
|
|
4015
4361
|
);
|
|
4016
|
-
const loadResult =
|
|
4362
|
+
const loadResult = _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0,
|
|
4017
4363
|
await client.loadSession({ sessionId, ...replacementLoadParams })
|
|
4018
4364
|
);
|
|
4019
4365
|
const session = new DroidSession(
|
|
@@ -4032,7 +4378,7 @@ async function resumeSession(sessionId, options = {}) {
|
|
|
4032
4378
|
return session;
|
|
4033
4379
|
} catch (error) {
|
|
4034
4380
|
cleanupLoadAbortSignal();
|
|
4035
|
-
await _optionalChain([sdkMcpServers, 'optionalAccess',
|
|
4381
|
+
await _optionalChain([sdkMcpServers, 'optionalAccess', _85 => _85.cleanup, 'call', _86 => _86()]);
|
|
4036
4382
|
await closeQuietly(client);
|
|
4037
4383
|
throw error;
|
|
4038
4384
|
}
|
|
@@ -4046,7 +4392,7 @@ async function run(prompt, options = {}) {
|
|
|
4046
4392
|
...options,
|
|
4047
4393
|
includePartialMessages: false
|
|
4048
4394
|
})) {
|
|
4049
|
-
if (msg.type ===
|
|
4395
|
+
if (msg.type === _chunkOBPHU4RTjs.DroidMessageType.Result) {
|
|
4050
4396
|
return msg;
|
|
4051
4397
|
}
|
|
4052
4398
|
}
|
|
@@ -4075,14 +4421,14 @@ var PARSE_OVERSAMPLE = 20;
|
|
|
4075
4421
|
function readFileBuffer(filePath) {
|
|
4076
4422
|
try {
|
|
4077
4423
|
return fs3.readFileSync(filePath);
|
|
4078
|
-
} catch (
|
|
4424
|
+
} catch (e7) {
|
|
4079
4425
|
return null;
|
|
4080
4426
|
}
|
|
4081
4427
|
}
|
|
4082
4428
|
function parseJsonBuffer(buf) {
|
|
4083
4429
|
try {
|
|
4084
4430
|
return JSON.parse(buf.toString("utf-8"));
|
|
4085
|
-
} catch (
|
|
4431
|
+
} catch (e8) {
|
|
4086
4432
|
return null;
|
|
4087
4433
|
}
|
|
4088
4434
|
}
|
|
@@ -4121,11 +4467,11 @@ function loadSettingsFile(directory, sessionId) {
|
|
|
4121
4467
|
if (!buf) return null;
|
|
4122
4468
|
const parsed = parseJsonBuffer(buf);
|
|
4123
4469
|
if (parsed === null) return null;
|
|
4124
|
-
const result =
|
|
4470
|
+
const result = _chunkOBPHU4RTjs.SessionSettingsFileSchema.safeParse(parsed);
|
|
4125
4471
|
return result.success ? result.data : null;
|
|
4126
4472
|
}
|
|
4127
4473
|
function getMissionMetadataFromTags(settings) {
|
|
4128
|
-
if (!_optionalChain([settings, 'optionalAccess',
|
|
4474
|
+
if (!_optionalChain([settings, 'optionalAccess', _87 => _87.tags])) return {};
|
|
4129
4475
|
const missionTag = settings.tags.find(
|
|
4130
4476
|
(tag) => tag.name.startsWith(MISSION_TAG_PREFIX)
|
|
4131
4477
|
);
|
|
@@ -4133,8 +4479,8 @@ function getMissionMetadataFromTags(settings) {
|
|
|
4133
4479
|
(tag) => tag.name === DECOMP_SESSION_TYPE_TAG
|
|
4134
4480
|
);
|
|
4135
4481
|
return {
|
|
4136
|
-
decompMissionId: _optionalChain([missionTag, 'optionalAccess',
|
|
4137
|
-
decompSessionType: _optionalChain([roleTag, 'optionalAccess',
|
|
4482
|
+
decompMissionId: _optionalChain([missionTag, 'optionalAccess', _88 => _88.metadata, 'optionalAccess', _89 => _89[MISSION_ID_METADATA_KEY]]),
|
|
4483
|
+
decompSessionType: _optionalChain([roleTag, 'optionalAccess', _90 => _90.metadata, 'optionalAccess', _91 => _91[DECOMP_SESSION_TYPE_METADATA_KEY]])
|
|
4138
4484
|
};
|
|
4139
4485
|
}
|
|
4140
4486
|
function parseSessionFile(candidate, ctx) {
|
|
@@ -4143,7 +4489,7 @@ function parseSessionFile(candidate, ctx) {
|
|
|
4143
4489
|
const scanned = scanBufferForLines(buf);
|
|
4144
4490
|
const firstParsed = parseJsonBuffer(scanned.firstLine);
|
|
4145
4491
|
if (firstParsed === null) return null;
|
|
4146
|
-
const firstResult =
|
|
4492
|
+
const firstResult = _chunkOBPHU4RTjs.SessionStartEventSchema.safeParse(firstParsed);
|
|
4147
4493
|
if (!firstResult.success) return null;
|
|
4148
4494
|
const summary = firstResult.data;
|
|
4149
4495
|
if (ctx.requiredCwd !== void 0 && (summary.cwd === void 0 || path2.resolve(summary.cwd) !== ctx.requiredCwd)) {
|
|
@@ -4151,9 +4497,9 @@ function parseSessionFile(candidate, ctx) {
|
|
|
4151
4497
|
}
|
|
4152
4498
|
const settingsName = `${candidate.sessionId}${SETTINGS_SUFFIX}`;
|
|
4153
4499
|
const settings = candidate.siblingNames.has(settingsName) ? loadSettingsFile(candidate.directory, candidate.sessionId) : null;
|
|
4154
|
-
if (_optionalChain([settings, 'optionalAccess',
|
|
4500
|
+
if (_optionalChain([settings, 'optionalAccess', _92 => _92.archivedAt])) return null;
|
|
4155
4501
|
const tagMeta = getMissionMetadataFromTags(settings);
|
|
4156
|
-
const decompSessionType = _nullishCoalesce(summary.decompSessionType, () => (
|
|
4502
|
+
const decompSessionType = _nullishCoalesce(summary.decompSessionType, () => ( _chunkOBPHU4RTjs.SessionStartDecompSessionTypeSchema.safeParse(tagMeta.decompSessionType).data));
|
|
4157
4503
|
const messageCount = Math.max(0, scanned.nonEmptyLineCount - 1);
|
|
4158
4504
|
return {
|
|
4159
4505
|
id: candidate.sessionId,
|
|
@@ -4171,7 +4517,7 @@ function parseSessionFile(candidate, ctx) {
|
|
|
4171
4517
|
function readDirEntries(directory) {
|
|
4172
4518
|
try {
|
|
4173
4519
|
return fs3.readdirSync(directory, { withFileTypes: true });
|
|
4174
|
-
} catch (
|
|
4520
|
+
} catch (e9) {
|
|
4175
4521
|
return [];
|
|
4176
4522
|
}
|
|
4177
4523
|
}
|
|
@@ -4185,7 +4531,7 @@ function collectCandidates(directory, entries) {
|
|
|
4185
4531
|
let stats;
|
|
4186
4532
|
try {
|
|
4187
4533
|
stats = fs3.statSync(sessionPath);
|
|
4188
|
-
} catch (
|
|
4534
|
+
} catch (e10) {
|
|
4189
4535
|
continue;
|
|
4190
4536
|
}
|
|
4191
4537
|
candidates.push({
|
|
@@ -4216,7 +4562,7 @@ function sanitizePathToDirectoryName(cwd) {
|
|
|
4216
4562
|
let canonicalPath = absolutePath;
|
|
4217
4563
|
try {
|
|
4218
4564
|
canonicalPath = fs3.realpathSync(absolutePath);
|
|
4219
|
-
} catch (
|
|
4565
|
+
} catch (e11) {
|
|
4220
4566
|
canonicalPath = absolutePath;
|
|
4221
4567
|
}
|
|
4222
4568
|
const normalized = canonicalPath.replace(/[\\/]+$/, "");
|
|
@@ -4285,7 +4631,7 @@ async function listModels(options = {}) {
|
|
|
4285
4631
|
const response = await client.listModels({
|
|
4286
4632
|
...includeDisabled !== void 0 && { includeDisabled }
|
|
4287
4633
|
});
|
|
4288
|
-
return
|
|
4634
|
+
return _chunkOBPHU4RTjs.unwrapResponseResult.call(void 0, response).models;
|
|
4289
4635
|
} finally {
|
|
4290
4636
|
await closeQuietly(client);
|
|
4291
4637
|
}
|
|
@@ -4740,5 +5086,42 @@ async function listModels(options = {}) {
|
|
|
4740
5086
|
|
|
4741
5087
|
|
|
4742
5088
|
|
|
4743
|
-
exports.AbortError = _chunkYSKO6SPTjs.AbortError; exports.AddMcpServerRequestParamsSchema = _chunkYSKO6SPTjs.AddMcpServerRequestParamsSchema; exports.AddMcpServerRequestSchema = _chunkYSKO6SPTjs.AddMcpServerRequestSchema; exports.AddMcpServerResponseSchema = _chunkYSKO6SPTjs.AddMcpServerResponseSchema; exports.AddMcpServerResultSchema = _chunkYSKO6SPTjs.AddMcpServerResultSchema; exports.AddUserMessageRequestParamsSchema = _chunkYSKO6SPTjs.AddUserMessageRequestParamsSchema; exports.AddUserMessageRequestSchema = _chunkYSKO6SPTjs.AddUserMessageRequestSchema; exports.AddUserMessageResponseSchema = _chunkYSKO6SPTjs.AddUserMessageResponseSchema; exports.AddUserMessageResultSchema = _chunkYSKO6SPTjs.AddUserMessageResultSchema; exports.ApplyPatchToolConfirmationDetailsSchema = _chunkYSKO6SPTjs.ApplyPatchToolConfirmationDetailsSchema; exports.AskUserCollectedAnswerSchema = _chunkYSKO6SPTjs.AskUserCollectedAnswerSchema; exports.AskUserConfirmationDetailsSchema = _chunkYSKO6SPTjs.AskUserConfirmationDetailsSchema; exports.AskUserQuestionSchema = _chunkYSKO6SPTjs.AskUserQuestionSchema; exports.AskUserRequestParamsSchema = _chunkYSKO6SPTjs.AskUserRequestParamsSchema; exports.AskUserRequestSchema = _chunkYSKO6SPTjs.AskUserRequestSchema; exports.AskUserResponseSchema = _chunkYSKO6SPTjs.AskUserResponseSchema; exports.AskUserResultSchema = _chunkYSKO6SPTjs.AskUserResultSchema; exports.AssistantMessageRetractedNotificationSchema = _chunkYSKO6SPTjs.AssistantMessageRetractedNotificationSchema; exports.AssistantTextCompleteNotificationSchema = _chunkYSKO6SPTjs.AssistantTextCompleteNotificationSchema; exports.AssistantTextDeltaNotificationSchema = _chunkYSKO6SPTjs.AssistantTextDeltaNotificationSchema; exports.AuthenticateMcpServerRequestParamsSchema = _chunkYSKO6SPTjs.AuthenticateMcpServerRequestParamsSchema; exports.AuthenticateMcpServerRequestSchema = _chunkYSKO6SPTjs.AuthenticateMcpServerRequestSchema; exports.AuthenticateMcpServerResponseSchema = _chunkYSKO6SPTjs.AuthenticateMcpServerResponseSchema; exports.AuthenticateMcpServerResultSchema = _chunkYSKO6SPTjs.AuthenticateMcpServerResultSchema; exports.AutonomyLevel = _chunkYSKO6SPTjs.AutonomyLevel; exports.AvailableModelConfigSchema = _chunkYSKO6SPTjs.AvailableModelConfigSchema; exports.Base64ImageSourceSchema = _chunkYSKO6SPTjs.Base64ImageSourceSchema; exports.BaseNotificationSchema = _chunkYSKO6SPTjs.BaseNotificationSchema; exports.BaseRequestSchema = _chunkYSKO6SPTjs.BaseRequestSchema; exports.BaseResponseFailureSchema = _chunkYSKO6SPTjs.BaseResponseFailureSchema; exports.BaseResponseSuccessSchema = _chunkYSKO6SPTjs.BaseResponseSuccessSchema; exports.CLI_JSONRPC_CHILD_SPAWN_LATENCY_METRIC = CLI_JSONRPC_CHILD_SPAWN_LATENCY_METRIC; exports.COMPACTION_TIMEOUT = _chunkYSKO6SPTjs.COMPACTION_TIMEOUT; exports.CancelMcpAuthRequestParamsSchema = _chunkYSKO6SPTjs.CancelMcpAuthRequestParamsSchema; exports.CancelMcpAuthRequestSchema = _chunkYSKO6SPTjs.CancelMcpAuthRequestSchema; exports.CancelMcpAuthResponseSchema = _chunkYSKO6SPTjs.CancelMcpAuthResponseSchema; exports.CancelMcpAuthResultSchema = _chunkYSKO6SPTjs.CancelMcpAuthResultSchema; exports.ChangeWorkingDirectoryRequestParamsSchema = _chunkYSKO6SPTjs.ChangeWorkingDirectoryRequestParamsSchema; exports.ChangeWorkingDirectoryRequestSchema = _chunkYSKO6SPTjs.ChangeWorkingDirectoryRequestSchema; exports.ChangeWorkingDirectoryResponseSchema = _chunkYSKO6SPTjs.ChangeWorkingDirectoryResponseSchema; exports.ChangeWorkingDirectoryResultSchema = _chunkYSKO6SPTjs.ChangeWorkingDirectoryResultSchema; exports.ClearMcpAuthRequestParamsSchema = _chunkYSKO6SPTjs.ClearMcpAuthRequestParamsSchema; exports.ClearMcpAuthRequestSchema = _chunkYSKO6SPTjs.ClearMcpAuthRequestSchema; exports.ClearMcpAuthResponseSchema = _chunkYSKO6SPTjs.ClearMcpAuthResponseSchema; exports.ClearMcpAuthResultSchema = _chunkYSKO6SPTjs.ClearMcpAuthResultSchema; exports.CliRequestOrNotificationSchema = _chunkYSKO6SPTjs.CliRequestOrNotificationSchema; exports.ClientDestroyedError = _chunkYSKO6SPTjs.ClientDestroyedError; exports.ClientRequestSchema = _chunkYSKO6SPTjs.ClientRequestSchema; exports.ClientUiSurface = _chunkYSKO6SPTjs.ClientUiSurface; exports.CloseSessionRequestParamsSchema = _chunkYSKO6SPTjs.CloseSessionRequestParamsSchema; exports.CloseSessionRequestSchema = _chunkYSKO6SPTjs.CloseSessionRequestSchema; exports.CloseSessionResponseSchema = _chunkYSKO6SPTjs.CloseSessionResponseSchema; exports.CloseSessionResultSchema = _chunkYSKO6SPTjs.CloseSessionResultSchema; exports.CompactSessionRequestParamsSchema = _chunkYSKO6SPTjs.CompactSessionRequestParamsSchema; exports.CompactSessionRequestSchema = _chunkYSKO6SPTjs.CompactSessionRequestSchema; exports.CompactSessionResponseSchema = _chunkYSKO6SPTjs.CompactSessionResponseSchema; exports.CompactSessionResultSchema = _chunkYSKO6SPTjs.CompactSessionResultSchema; exports.ComputeLimitExceededError = _chunkYSKO6SPTjs.ComputeLimitExceededError; exports.ComputerConnectAttemptTrigger = _chunkYSKO6SPTjs.ComputerConnectAttemptTrigger; exports.ComputerConnectStartType = _chunkYSKO6SPTjs.ComputerConnectStartType; exports.ComputerListResponseSchema = _chunkYSKO6SPTjs.ComputerListResponseSchema; exports.ComputerMetricSchema = _chunkYSKO6SPTjs.ComputerMetricSchema; exports.ComputerMetricsResponseSchema = _chunkYSKO6SPTjs.ComputerMetricsResponseSchema; exports.ComputerSchema = _chunkYSKO6SPTjs.ComputerSchema; exports.ConcurrentStreamError = _chunkYSKO6SPTjs.ConcurrentStreamError; exports.ConnectionClosedError = _chunkYSKO6SPTjs.ConnectionClosedError; exports.ConnectionError = _chunkYSKO6SPTjs.ConnectionError; exports.ConnectionFailureReason = _chunkYSKO6SPTjs.ConnectionFailureReason; exports.ContentBlockSchema = _chunkYSKO6SPTjs.ContentBlockSchema; exports.ContextBreakdownCategorySchema = _chunkYSKO6SPTjs.ContextBreakdownCategorySchema; exports.ContextBreakdownResultSchema = _chunkYSKO6SPTjs.GetContextBreakdownResultSchema; exports.ContextStatsAccuracy = _chunkYSKO6SPTjs.ContextStatsAccuracy; exports.ContextStatsSchema = _chunkYSKO6SPTjs.ContextStatsSchema; exports.CreateMessageNotificationSchema = _chunkYSKO6SPTjs.CreateMessageNotificationSchema; exports.CreateToolConfirmationDetailsSchema = _chunkYSKO6SPTjs.CreateToolConfirmationDetailsSchema; exports.DEFAULT_LOCAL_DAEMON_WS_URL = _chunkYSKO6SPTjs.DEFAULT_LOCAL_DAEMON_WS_URL; exports.DEFAULT_REQUEST_TIMEOUT = _chunkYSKO6SPTjs.DEFAULT_REQUEST_TIMEOUT; exports.DaemonAuthenticationMode = _chunkYSKO6SPTjs.DaemonAuthenticationMode; exports.DaemonClient = _chunkYSKO6SPTjs.DaemonClient; exports.DaemonClientMetaError = _chunkYSKO6SPTjs.MetaError; exports.DaemonDroidEvent = _chunkYSKO6SPTjs.DaemonDroidEvent; exports.DaemonRequestPermissionSchema = _chunkYSKO6SPTjs.DaemonRequestPermissionSchema; exports.DaemonSessionController = _chunkYSKO6SPTjs.DaemonSessionController; exports.DecompSessionType = _chunkYSKO6SPTjs.DecompSessionType; exports.DiscoveredIssueSchema = _chunkYSKO6SPTjs.DiscoveredIssueSchema; exports.DismissalRecordSchema = _chunkYSKO6SPTjs.DismissalRecordSchema; exports.DismissalType = _chunkYSKO6SPTjs.DismissalType; exports.DocumentBlockSchema = _chunkYSKO6SPTjs.DocumentBlockSchema; exports.DocumentSourceSchema = _chunkYSKO6SPTjs.DocumentSourceSchema; exports.DroidClient = DroidClient; exports.DroidClientError = _chunkYSKO6SPTjs.DroidClientError; exports.DroidClientEvent = DroidClientEvent; exports.DroidClientMethod = _chunkYSKO6SPTjs.DroidClientMethod; exports.DroidErrorType = _chunkYSKO6SPTjs.DroidErrorType; exports.DroidEvent = _chunkYSKO6SPTjs.DroidEvent; exports.DroidHookEventSchema = _chunkYSKO6SPTjs.DroidHookEventSchema; exports.DroidHookExecutionResultSchema = _chunkYSKO6SPTjs.DroidHookExecutionResultSchema; exports.DroidHookOutputSchema = _chunkYSKO6SPTjs.DroidHookOutputSchema; exports.DroidHookSpecificOutputSchema = _chunkYSKO6SPTjs.DroidHookSpecificOutputSchema; exports.DroidInteractionMode = _chunkYSKO6SPTjs.DroidInteractionMode; exports.DroidMessageType = _chunkYSKO6SPTjs.DroidMessageType; exports.DroidProcessManager = DroidProcessManager; exports.DroidProcessMode = DroidProcessMode; exports.DroidServerMethod = _chunkYSKO6SPTjs.DroidServerMethod; exports.DroidSession = DroidSession; exports.DroidWorkingState = _chunkYSKO6SPTjs.DroidWorkingState; exports.DroidWorkingStateChangedNotificationSchema = _chunkYSKO6SPTjs.DroidWorkingStateChangedNotificationSchema; exports.EditToolConfirmationDetailsSchema = _chunkYSKO6SPTjs.EditToolConfirmationDetailsSchema; exports.EmptyResultSchema = _chunkYSKO6SPTjs.EmptyResultSchema; exports.ErrorDetailSchema = _chunkYSKO6SPTjs.ErrorDetailSchema; exports.ErrorNotificationSchema = _chunkYSKO6SPTjs.ErrorNotificationSchema; exports.ExecToolInfoSchema = _chunkYSKO6SPTjs.ExecToolInfoSchema; exports.ExecuteRewindRequestParamsSchema = _chunkYSKO6SPTjs.ExecuteRewindRequestParamsSchema; exports.ExecuteRewindRequestSchema = _chunkYSKO6SPTjs.ExecuteRewindRequestSchema; exports.ExecuteRewindResponseSchema = _chunkYSKO6SPTjs.ExecuteRewindResponseSchema; exports.ExecuteRewindResultSchema = _chunkYSKO6SPTjs.ExecuteRewindResultSchema; exports.ExecuteToolConfirmationDetailsSchema = _chunkYSKO6SPTjs.ExecuteToolConfirmationDetailsSchema; exports.ExitSpecModeConfirmationDetailsSchema = _chunkYSKO6SPTjs.ExitSpecModeConfirmationDetailsSchema; exports.FACTORY_CLIENT_HEADER = _chunkYSKO6SPTjs.FACTORY_CLIENT_HEADER; exports.FACTORY_CLIENT_VERSION = _chunkYSKO6SPTjs.FACTORY_CLIENT_VERSION; exports.FACTORY_PROTOCOL_VERSION = _chunkYSKO6SPTjs.FACTORY_PROTOCOL_VERSION2; exports.FactoryDaemonTransport = _chunkYSKO6SPTjs.FactoryDaemonTransport; exports.FactoryDroidMessageRole = _chunkYSKO6SPTjs.FactoryDroidMessageRole; exports.FactoryDroidMessageSchema = _chunkYSKO6SPTjs.FactoryDroidMessageSchema; exports.FeatureStatus = _chunkYSKO6SPTjs.FeatureStatus; exports.FeatureSuccessState = _chunkYSKO6SPTjs.FeatureSuccessState; exports.FeatureSuccessStateSchema = _chunkYSKO6SPTjs.FeatureSuccessStateSchema; exports.ForkSessionRequestParamsSchema = _chunkYSKO6SPTjs.ForkSessionRequestParamsSchema; exports.ForkSessionRequestSchema = _chunkYSKO6SPTjs.ForkSessionRequestSchema; exports.ForkSessionResponseSchema = _chunkYSKO6SPTjs.ForkSessionResponseSchema; exports.ForkSessionResultSchema = _chunkYSKO6SPTjs.ForkSessionResultSchema; exports.GetContextStatsRequestParamsSchema = _chunkYSKO6SPTjs.GetContextStatsRequestParamsSchema; exports.GetContextStatsRequestSchema = _chunkYSKO6SPTjs.GetContextStatsRequestSchema; exports.GetContextStatsResponseSchema = _chunkYSKO6SPTjs.GetContextStatsResponseSchema; exports.GetContextStatsResultSchema = _chunkYSKO6SPTjs.ContextStatsSchema; exports.GetRewindInfoRequestParamsSchema = _chunkYSKO6SPTjs.GetRewindInfoRequestParamsSchema; exports.GetRewindInfoRequestSchema = _chunkYSKO6SPTjs.GetRewindInfoRequestSchema; exports.GetRewindInfoResponseSchema = _chunkYSKO6SPTjs.GetRewindInfoResponseSchema; exports.GetRewindInfoResultSchema = _chunkYSKO6SPTjs.GetRewindInfoResultSchema; exports.GitRepoInfoSchema = _chunkYSKO6SPTjs.GitRepoInfoSchema; exports.HandoffItemsDismissedEntrySchema = _chunkYSKO6SPTjs.HandoffItemsDismissedEntrySchema; exports.HandoffSchema = _chunkYSKO6SPTjs.HandoffSchema; exports.HookCommandSchema = _chunkYSKO6SPTjs.HookCommandSchema; exports.HookExecutionCompletedNotificationSchema = _chunkYSKO6SPTjs.HookExecutionCompletedNotificationSchema; exports.HookExecutionStartedNotificationSchema = _chunkYSKO6SPTjs.HookExecutionStartedNotificationSchema; exports.HookResultSchema = _chunkYSKO6SPTjs.HookResultSchema; exports.HttpHeaderSchema = _chunkYSKO6SPTjs.HttpHeaderSchema; exports.HttpMcpConfigSchema = _chunkYSKO6SPTjs.HttpMcpSchema; exports.IPC_DAEMON_URL = _chunkYSKO6SPTjs.IPC_DAEMON_URL; exports.ImageBlockSchema = _chunkYSKO6SPTjs.ImageBlockSchema; exports.InProcessDaemonClientTransport = _chunkYSKO6SPTjs.InProcessDaemonClientTransport; exports.InitializeSessionRequestParamsSchema = _chunkYSKO6SPTjs.InitializeSessionRequestParamsSchema; exports.InitializeSessionRequestSchema = _chunkYSKO6SPTjs.InitializeSessionRequestSchema; exports.InitializeSessionResponseSchema = _chunkYSKO6SPTjs.InitializeSessionResponseSchema; exports.InitializeSessionResultSchema = _chunkYSKO6SPTjs.InitializeSessionResultSchema2; exports.InteractiveCheckSchema = _chunkYSKO6SPTjs.InteractiveCheckSchema; exports.InterruptSessionRequestParamsSchema = _chunkYSKO6SPTjs.InterruptSessionRequestParamsSchema; exports.InterruptSessionRequestSchema = _chunkYSKO6SPTjs.InterruptSessionRequestSchema; exports.InterruptSessionResponseSchema = _chunkYSKO6SPTjs.InterruptSessionResponseSchema; exports.InterruptSessionResultSchema = _chunkYSKO6SPTjs.InterruptSessionResultSchema; exports.InvalidSessionCwdError = _chunkYSKO6SPTjs.InvalidSessionCwdError; exports.IpcDaemonClientTransport = _chunkYSKO6SPTjs.IpcDaemonClientTransport; exports.IssueSeverity = _chunkYSKO6SPTjs.IssueSeverity; exports.JSONRPC_VERSION = _chunkYSKO6SPTjs.JSONRPC_VERSION3; exports.JsonArraySchema = _chunkYSKO6SPTjs.JsonArraySchema; exports.JsonObjectSchema = _chunkYSKO6SPTjs.JsonObjectSchema; exports.JsonRpcEnvelopeSchema = _chunkYSKO6SPTjs.JsonRpcEnvelopeSchema; exports.JsonRpcErrorCode = _chunkYSKO6SPTjs.JsonRpcErrorCode; exports.JsonRpcErrorSchema = _chunkYSKO6SPTjs.JsonRpcErrorSchema; exports.JsonRpcMessageSchema = _chunkYSKO6SPTjs.JsonRpcMessageSchema; exports.JsonRpcMessageType = _chunkYSKO6SPTjs.JsonRpcMessageType; exports.JsonRpcNotificationSchema = _chunkYSKO6SPTjs.JsonRpcNotificationSchema; exports.JsonRpcRequestError = _chunkYSKO6SPTjs.JsonRpcRequestError; exports.JsonRpcRequestSchema = _chunkYSKO6SPTjs.JsonRpcRequestSchema; exports.JsonRpcResponseFailureSchema = _chunkYSKO6SPTjs.JsonRpcResponseFailureSchema; exports.JsonRpcResponseSchema = _chunkYSKO6SPTjs.JsonRpcResponseSchema; exports.JsonRpcResponseSuccessSchema = _chunkYSKO6SPTjs.JsonRpcResponseSuccessSchema; exports.JsonValueSchema = _chunkYSKO6SPTjs.JsonValueSchema; exports.KillWorkerSessionRequestParamsSchema = _chunkYSKO6SPTjs.KillWorkerSessionRequestParamsSchema; exports.KillWorkerSessionRequestSchema = _chunkYSKO6SPTjs.KillWorkerSessionRequestSchema; exports.KillWorkerSessionResponseSchema = _chunkYSKO6SPTjs.KillWorkerSessionResponseSchema; exports.KillWorkerSessionResultSchema = _chunkYSKO6SPTjs.KillWorkerSessionResultSchema; exports.LEGACY_FACTORY_API_VERSION = _chunkYSKO6SPTjs.LEGACY_FACTORY_API_VERSION2; exports.LOCAL_MACHINE_ID = _chunkYSKO6SPTjs.LOCAL_MACHINE_ID; exports.ListMcpRegistryRequestParamsSchema = _chunkYSKO6SPTjs.ListMcpRegistryRequestParamsSchema; exports.ListMcpRegistryRequestSchema = _chunkYSKO6SPTjs.ListMcpRegistryRequestSchema; exports.ListMcpRegistryResponseSchema = _chunkYSKO6SPTjs.ListMcpRegistryResponseSchema; exports.ListMcpRegistryResultSchema = _chunkYSKO6SPTjs.ListMcpRegistryResultSchema; exports.ListMcpServersRequestParamsSchema = _chunkYSKO6SPTjs.ListMcpServersRequestParamsSchema; exports.ListMcpServersRequestSchema = _chunkYSKO6SPTjs.ListMcpServersRequestSchema; exports.ListMcpServersResponseSchema = _chunkYSKO6SPTjs.ListMcpServersResponseSchema; exports.ListMcpServersResultSchema = _chunkYSKO6SPTjs.ListMcpServersResultSchema; exports.ListMcpToolsRequestParamsSchema = _chunkYSKO6SPTjs.ListMcpToolsRequestParamsSchema; exports.ListMcpToolsRequestSchema = _chunkYSKO6SPTjs.ListMcpToolsRequestSchema; exports.ListMcpToolsResponseSchema = _chunkYSKO6SPTjs.ListMcpToolsResponseSchema; exports.ListMcpToolsResultSchema = _chunkYSKO6SPTjs.ListMcpToolsResultSchema; exports.ListModelsOptionsSchema = _chunkYSKO6SPTjs.ListModelsOptionsSchema; exports.ListModelsResultSchema = _chunkYSKO6SPTjs.ListModelsResultSchema; exports.ListSkillsRequestParamsSchema = _chunkYSKO6SPTjs.ListSkillsRequestParamsSchema; exports.ListSkillsRequestSchema = _chunkYSKO6SPTjs.ListSkillsRequestSchema; exports.ListSkillsResponseSchema = _chunkYSKO6SPTjs.ListSkillsResponseSchema; exports.ListSkillsResultSchema = _chunkYSKO6SPTjs.ListSkillsResultSchema; exports.ListToolsRequestParamsSchema = _chunkYSKO6SPTjs.ListToolsRequestParamsSchema; exports.ListToolsRequestSchema = _chunkYSKO6SPTjs.ListToolsRequestSchema; exports.ListToolsResponseSchema = _chunkYSKO6SPTjs.ListToolsResponseSchema; exports.ListToolsResultSchema = _chunkYSKO6SPTjs.ListToolsResultSchema; exports.LoadSessionRequestParamsSchema = _chunkYSKO6SPTjs.LoadSessionRequestParamsSchema; exports.LoadSessionRequestSchema = _chunkYSKO6SPTjs.LoadSessionRequestSchema; exports.LoadSessionResponseSchema = _chunkYSKO6SPTjs.LoadSessionResponseSchema; exports.LoadSessionResultSchema = _chunkYSKO6SPTjs.LoadSessionResultSchema; exports.MACHINE_TYPE_WEBSOCKET_OVERRIDES = _chunkYSKO6SPTjs.MACHINE_TYPE_WEBSOCKET_OVERRIDES; exports.MANAGED_COMPUTER_MAX_RETRIES = _chunkYSKO6SPTjs.MANAGED_COMPUTER_MAX_RETRIES; exports.MCP_AUTH_TIMEOUT = _chunkYSKO6SPTjs.MCP_AUTH_TIMEOUT; exports.MachineTemplateBuildStatusSchema = _chunkYSKO6SPTjs.MachineTemplateBuildStatusSchema; exports.MachineTemplateListResponseSchema = _chunkYSKO6SPTjs.MachineTemplateListResponseSchema; exports.MachineTemplateSchema = _chunkYSKO6SPTjs.MachineTemplateSchema; exports.MachineType = _chunkYSKO6SPTjs.MachineType; exports.ManagedProcessImpl = ManagedProcessImpl; exports.McpAuthCompletedNotificationSchema = _chunkYSKO6SPTjs.McpAuthCompletedNotificationSchema; exports.McpAuthOutcome = _chunkYSKO6SPTjs.McpAuthOutcome; exports.McpAuthRequiredNotificationSchema = _chunkYSKO6SPTjs.McpAuthRequiredNotificationSchema; exports.McpHttpServerConfigFieldsSchema = _chunkYSKO6SPTjs.McpHttpServerConfigFieldsSchema; exports.McpRegistryServerSchema = _chunkYSKO6SPTjs.McpRegistryServerSchema; exports.McpServerConfigSchema = _chunkYSKO6SPTjs.McpServerConfigSchema; exports.McpServerStatus = _chunkYSKO6SPTjs.McpServerStatus; exports.McpServerStatusInfoSchema = _chunkYSKO6SPTjs.McpServerStatusInfoSchema; exports.McpServerType = _chunkYSKO6SPTjs.McpServerType; exports.McpSseServerConfigFieldsSchema = _chunkYSKO6SPTjs.McpSseServerConfigFieldsSchema; exports.McpStatus = _chunkYSKO6SPTjs.McpStatus; exports.McpStatusChangedNotificationSchema = _chunkYSKO6SPTjs.McpStatusChangedNotificationSchema; exports.McpStatusSummarySchema = _chunkYSKO6SPTjs.McpStatusSummarySchema; exports.McpStdioServerConfigFieldsSchema = _chunkYSKO6SPTjs.McpStdioServerConfigFieldsSchema; exports.McpToolConfirmationDetailsSchema = _chunkYSKO6SPTjs.McpToolConfirmationDetailsSchema; exports.McpToolInfoSchema = _chunkYSKO6SPTjs.McpToolInfoSchema; exports.McpToolInputSchemaSchema = _chunkYSKO6SPTjs.McpToolInputSchemaSchema; exports.MessageVisibility = _chunkYSKO6SPTjs.MessageVisibility; exports.Metric = _chunkYSKO6SPTjs.Metric; exports.MilestoneValidationTriggeredEntrySchema = _chunkYSKO6SPTjs.MilestoneValidationTriggeredEntrySchema; exports.MissionAcceptedEntrySchema = _chunkYSKO6SPTjs.MissionAcceptedEntrySchema; exports.MissionFeatureSchema = _chunkYSKO6SPTjs.MissionFeatureSchema; exports.MissionFeaturesChangedNotificationSchema = _chunkYSKO6SPTjs.MissionFeaturesChangedNotificationSchema; exports.MissionHeartbeatNotificationSchema = _chunkYSKO6SPTjs.MissionHeartbeatNotificationSchema; exports.MissionPausedEntrySchema = _chunkYSKO6SPTjs.MissionPausedEntrySchema; exports.MissionProgressEntryNotificationSchema = _chunkYSKO6SPTjs.MissionProgressEntryNotificationSchema; exports.MissionResumedEntrySchema = _chunkYSKO6SPTjs.MissionResumedEntrySchema; exports.MissionRunStartedEntrySchema = _chunkYSKO6SPTjs.MissionRunStartedEntrySchema; exports.MissionSnapshotSchema = _chunkYSKO6SPTjs.MissionStateSchema; exports.MissionState = _chunkYSKO6SPTjs.MissionState; exports.MissionStateChangedNotificationSchema = _chunkYSKO6SPTjs.MissionStateChangedNotificationSchema; exports.MissionWorkerCompletedNotificationSchema = _chunkYSKO6SPTjs.MissionWorkerCompletedNotificationSchema; exports.MissionWorkerStartedNotificationSchema = _chunkYSKO6SPTjs.MissionWorkerStartedNotificationSchema; exports.ModelInfoSchema = _chunkYSKO6SPTjs.ModelInfoSchema; exports.ModelMetadataSchema = _chunkYSKO6SPTjs.ModelMetadataSchema; exports.ModelProvider = _chunkYSKO6SPTjs.ModelProvider; exports.MultiMissionStateManager = _chunkYSKO6SPTjs.MultiMissionStateManager; exports.MultiSessionStateManager = _chunkYSKO6SPTjs.MultiSessionStateManager; exports.OtelTracing = _chunkYSKO6SPTjs.OtelTracing; exports.OutputFormatSchema = _chunkYSKO6SPTjs.OutputFormatSchema; exports.OutputFormatType = _chunkYSKO6SPTjs.OutputFormatType; exports.PermissionResolvedNotificationSchema = _chunkYSKO6SPTjs.PermissionResolvedNotificationSchema; exports.ProcessExitError = _chunkYSKO6SPTjs.ProcessExitError; exports.ProcessTransport = ProcessTransport; exports.ProgressLogEntrySchema = _chunkYSKO6SPTjs.ProgressLogEntrySchema; exports.ProgressLogEntryType = _chunkYSKO6SPTjs.ProgressLogEntryType; exports.ProposeMissionConfirmationDetailsSchema = _chunkYSKO6SPTjs.ProposeMissionConfirmationDetailsSchema; exports.ProtocolError = _chunkYSKO6SPTjs.ProtocolError; exports.QueuedUserMessageDisplayGroup = _chunkYSKO6SPTjs.QueuedUserMessageDisplayGroup; exports.QueuedUserMessageKind = _chunkYSKO6SPTjs.QueuedUserMessageKind; exports.REWIND_TIMEOUT = _chunkYSKO6SPTjs.REWIND_TIMEOUT; exports.ReasoningEffort = _chunkYSKO6SPTjs.ReasoningEffort; exports.RedactedThinkingBlockSchema = _chunkYSKO6SPTjs.RedactedThinkingBlockSchema; exports.RefreshComputerResponseSchema = _chunkYSKO6SPTjs.RefreshComputerResponseSchema; exports.RelayConnectionError = _chunkYSKO6SPTjs.RelayConnectionError; exports.RemoteSessionListResponseSchema = _chunkYSKO6SPTjs.RemoteSessionListResponseSchema; exports.RemoteSessionSchema = _chunkYSKO6SPTjs.RemoteSessionSchema; exports.RemoveMcpServerRequestParamsSchema = _chunkYSKO6SPTjs.RemoveMcpServerRequestParamsSchema; exports.RemoveMcpServerRequestSchema = _chunkYSKO6SPTjs.RemoveMcpServerRequestSchema; exports.RemoveMcpServerResponseSchema = _chunkYSKO6SPTjs.RemoveMcpServerResponseSchema; exports.RemoveMcpServerResultSchema = _chunkYSKO6SPTjs.RemoveMcpServerResultSchema; exports.RenameSessionRequestParamsSchema = _chunkYSKO6SPTjs.RenameSessionRequestParamsSchema; exports.RenameSessionRequestSchema = _chunkYSKO6SPTjs.RenameSessionRequestSchema; exports.RenameSessionResponseSchema = _chunkYSKO6SPTjs.RenameSessionResponseSchema; exports.RenameSessionResultSchema = _chunkYSKO6SPTjs.RenameSessionResultSchema; exports.RequestPermissionRequestParamsSchema = _chunkYSKO6SPTjs.RequestPermissionRequestParamsSchema; exports.RequestPermissionRequestSchema = _chunkYSKO6SPTjs.RequestPermissionRequestSchema; exports.RequestPermissionResponseSchema = _chunkYSKO6SPTjs.RequestPermissionResponseSchema; exports.RequestPermissionResultSchema = _chunkYSKO6SPTjs.RequestPermissionResultSchema; exports.RewindEvictedFileSchema = _chunkYSKO6SPTjs.RewindEvictedFileSchema; exports.RewindFileCreationSchema = _chunkYSKO6SPTjs.RewindFileCreationSchema; exports.RewindFileSnapshotSchema = _chunkYSKO6SPTjs.RewindFileSnapshotSchema; exports.SDK_TAG = _chunkYSKO6SPTjs.SDK_TAG; exports.SDK_VERSION = _chunkYSKO6SPTjs.SDK_VERSION; exports.SESSION_INIT_TIMEOUT = _chunkYSKO6SPTjs.SESSION_INIT_TIMEOUT; exports.SLACK_DELEGATION_MAX_RETRIES = _chunkYSKO6SPTjs.SLACK_DELEGATION_MAX_RETRIES; exports.SdkMcpServer = SdkMcpServer; exports.ServerRequestHandlerType = _chunkYSKO6SPTjs.ServerRequestHandlerType; exports.SessionError = _chunkYSKO6SPTjs.SessionError; exports.SessionMetadataSchema = _chunkYSKO6SPTjs.SessionMetadataSchema; exports.SessionNotFoundError = _chunkYSKO6SPTjs.SessionNotFoundError; exports.SessionNotificationParamsSchema = _chunkYSKO6SPTjs.SessionNotificationParamsSchema; exports.SessionNotificationPayloadSchema = _chunkYSKO6SPTjs.SessionNotificationPayloadSchema; exports.SessionNotificationSchema = _chunkYSKO6SPTjs.SessionNotificationSchema; exports.SessionNotificationSchemaList = _chunkYSKO6SPTjs.SessionNotificationSchemaList; exports.SessionNotificationType = _chunkYSKO6SPTjs.SessionNotificationType; exports.SessionPlatform = _chunkYSKO6SPTjs.SessionPlatform; exports.SessionReplacedError = _chunkYSKO6SPTjs.SessionReplacedError; exports.SessionReplacementError = _chunkYSKO6SPTjs.SessionReplacementError; exports.SessionSettingsFileSchema = _chunkYSKO6SPTjs.SessionSettingsFileSchema; exports.SessionSettingsSchema = _chunkYSKO6SPTjs.SessionSettingsSchema; exports.SessionSourceSchema = _chunkYSKO6SPTjs.SessionSourceSchema; exports.SessionStartEventSchema = _chunkYSKO6SPTjs.SessionStartEventSchema; exports.SessionTagSchema = _chunkYSKO6SPTjs.SessionTagSchema; exports.SessionTitleUpdatedNotificationSchema = _chunkYSKO6SPTjs.SessionTitleUpdatedNotificationSchema; exports.SessionTokenUsageChangedNotificationSchema = _chunkYSKO6SPTjs.SessionTokenUsageChangedNotificationSchema; exports.SetSkillDisabledRequestParamsSchema = _chunkYSKO6SPTjs.SetSkillDisabledRequestParamsSchema; exports.SetSkillDisabledRequestSchema = _chunkYSKO6SPTjs.SetSkillDisabledRequestSchema; exports.SetSkillDisabledResponseSchema = _chunkYSKO6SPTjs.SetSkillDisabledResponseSchema; exports.SetSkillDisabledResultSchema = _chunkYSKO6SPTjs.SetSkillDisabledResultSchema; exports.SettingsLevel = _chunkYSKO6SPTjs.SettingsLevel; exports.SettingsUpdatedNotificationSchema = _chunkYSKO6SPTjs.SettingsUpdatedNotificationSchema; exports.SettingsUpdatedPayloadSchema = _chunkYSKO6SPTjs.SettingsUpdatedPayloadSchema; exports.SkillDeviationSchema = _chunkYSKO6SPTjs.SkillDeviationSchema; exports.SkillFeedbackSchema = _chunkYSKO6SPTjs.SkillFeedbackSchema; exports.SkillInfoSchema = _chunkYSKO6SPTjs.SkillInfoSchema; exports.SkillLocation = _chunkYSKO6SPTjs.SkillLocation; exports.SkillResourceSchema = _chunkYSKO6SPTjs.SkillResourceSchema; exports.SpanAttribute = _chunkYSKO6SPTjs.SpanAttribute; exports.SpanEvent = _chunkYSKO6SPTjs.SpanEvent; exports.SpanName = _chunkYSKO6SPTjs.SpanName; exports.SseMcpConfigSchema = _chunkYSKO6SPTjs.SseMcpSchema; exports.StartMissionRunConfirmationDetailsSchema = _chunkYSKO6SPTjs.StartMissionRunConfirmationDetailsSchema; exports.StdioMcpConfigSchema = _chunkYSKO6SPTjs.StdioMcpSchema; exports.StreamStateTracker = _chunkYSKO6SPTjs.StreamStateTracker; exports.StructuredOutputErrorSchema = _chunkYSKO6SPTjs.StructuredOutputErrorSchema; exports.StructuredOutputNotificationSchema = _chunkYSKO6SPTjs.StructuredOutputNotificationSchema; exports.SubmitBugReportRequestParamsSchema = _chunkYSKO6SPTjs.SubmitBugReportRequestParamsSchema; exports.SubmitBugReportRequestSchema = _chunkYSKO6SPTjs.SubmitBugReportRequestSchema; exports.SubmitBugReportResponseSchema = _chunkYSKO6SPTjs.SubmitBugReportResponseSchema; exports.SubmitBugReportResultSchema = _chunkYSKO6SPTjs.SubmitBugReportResultSchema; exports.SubmitMcpAuthCodeRequestParamsSchema = _chunkYSKO6SPTjs.SubmitMcpAuthCodeRequestParamsSchema; exports.SubmitMcpAuthCodeRequestSchema = _chunkYSKO6SPTjs.SubmitMcpAuthCodeRequestSchema; exports.SubmitMcpAuthCodeResponseSchema = _chunkYSKO6SPTjs.SubmitMcpAuthCodeResponseSchema; exports.SubmitMcpAuthCodeResultSchema = _chunkYSKO6SPTjs.SubmitMcpAuthCodeResultSchema; exports.SuccessResultSchema = _chunkYSKO6SPTjs.SuccessResultSchema; exports.TestCaseSchema = _chunkYSKO6SPTjs.TestCaseSchema; exports.TestFileSchema = _chunkYSKO6SPTjs.TestFileSchema; exports.TestsSchema = _chunkYSKO6SPTjs.TestsSchema; exports.TextBlockSchema = _chunkYSKO6SPTjs.TextBlockSchema; exports.ThinkingBlockSchema = _chunkYSKO6SPTjs.ThinkingBlockSchema; exports.ThinkingTextCompleteNotificationSchema = _chunkYSKO6SPTjs.ThinkingTextCompleteNotificationSchema; exports.ThinkingTextDeltaNotificationSchema = _chunkYSKO6SPTjs.ThinkingTextDeltaNotificationSchema; exports.TimeoutError = _chunkYSKO6SPTjs.TimeoutError; exports.ToggleMcpServerRequestParamsSchema = _chunkYSKO6SPTjs.ToggleMcpServerRequestParamsSchema; exports.ToggleMcpServerRequestSchema = _chunkYSKO6SPTjs.ToggleMcpServerRequestSchema; exports.ToggleMcpServerResponseSchema = _chunkYSKO6SPTjs.ToggleMcpServerResponseSchema; exports.ToggleMcpServerResultSchema = _chunkYSKO6SPTjs.ToggleMcpServerResultSchema; exports.ToggleMcpToolRequestParamsSchema = _chunkYSKO6SPTjs.ToggleMcpToolRequestParamsSchema; exports.ToggleMcpToolRequestSchema = _chunkYSKO6SPTjs.ToggleMcpToolRequestSchema; exports.ToggleMcpToolResponseSchema = _chunkYSKO6SPTjs.ToggleMcpToolResponseSchema; exports.ToggleMcpToolResultSchema = _chunkYSKO6SPTjs.ToggleMcpToolResultSchema; exports.TokenUsageSchema = _chunkYSKO6SPTjs.TokenUsageSchema; exports.ToolCallNotificationSchema = _chunkYSKO6SPTjs.ToolCallNotificationSchema; exports.ToolConfirmationDetailsSchema = _chunkYSKO6SPTjs.ToolConfirmationDetailsSchema; exports.ToolConfirmationInfoSchema = _chunkYSKO6SPTjs.ToolConfirmationInfoSchema; exports.ToolConfirmationListItemSchema = _chunkYSKO6SPTjs.ToolConfirmationListItemSchema; exports.ToolConfirmationOutcome = _chunkYSKO6SPTjs.ToolConfirmationOutcome; exports.ToolConfirmationType = _chunkYSKO6SPTjs.ToolConfirmationType; exports.ToolProgressUpdateNotificationSchema = _chunkYSKO6SPTjs.ToolProgressUpdateNotificationSchema; exports.ToolProgressUpdateSchema = _chunkYSKO6SPTjs.ToolProgressUpdateSchema; exports.ToolResultBlockSchema = _chunkYSKO6SPTjs.ToolResultSchema; exports.ToolResultNotificationSchema = _chunkYSKO6SPTjs.ToolResultNotificationSchema; exports.ToolSelectionOverridesSchema = _chunkYSKO6SPTjs.ToolSelectionOverridesSchema; exports.ToolUseBlockSchema = _chunkYSKO6SPTjs.ToolUseSchema; exports.ToolUseSchema = _chunkYSKO6SPTjs.ToolUseSchema2; exports.TraceContextMetaSchema = _chunkYSKO6SPTjs.TraceContextMetaSchema; exports.TransportDirection = TransportDirection; exports.TunnelConnection = _chunkYSKO6SPTjs.TunnelConnection; exports.UpdateSessionSettingsRequestParamsSchema = _chunkYSKO6SPTjs.UpdateSessionSettingsRequestParamsSchema; exports.UpdateSessionSettingsRequestSchema = _chunkYSKO6SPTjs.UpdateSessionSettingsRequestSchema; exports.UpdateSessionSettingsResponseSchema = _chunkYSKO6SPTjs.UpdateSessionSettingsResponseSchema; exports.UpdateSessionSettingsResultSchema = _chunkYSKO6SPTjs.UpdateSessionSettingsResultSchema; exports.VerificationCommandSchema = _chunkYSKO6SPTjs.VerificationCommandSchema; exports.VerificationSchema = _chunkYSKO6SPTjs.VerificationSchema; exports.WINDOWS_JOB_OBJECT_ERROR_MARKER = WINDOWS_JOB_OBJECT_ERROR_MARKER; exports.WebSocketConnectionError = _chunkYSKO6SPTjs.WebSocketConnectionError; exports.WebSocketDaemonTransport = _chunkYSKO6SPTjs.WebSocketDaemonTransport; exports.WorkerCompletedEntrySchema = _chunkYSKO6SPTjs.WorkerCompletedEntrySchema; exports.WorkerFailedEntrySchema = _chunkYSKO6SPTjs.WorkerFailedEntrySchema; exports.WorkerPausedEntrySchema = _chunkYSKO6SPTjs.WorkerPausedEntrySchema; exports.WorkerSelectedFeatureEntrySchema = _chunkYSKO6SPTjs.WorkerSelectedFeatureEntrySchema; exports.WorkerStartedEntrySchema = _chunkYSKO6SPTjs.WorkerStartedEntrySchema; exports.WorkerStateInfoSchema = _chunkYSKO6SPTjs.WorkerStateInfoSchema; exports.__resetTransportLoggerForTests = __resetTransportLoggerForTests; exports.buildUserMessageContentBlocks = _chunkYSKO6SPTjs.buildUserMessageContentBlocks; exports.configureDaemonCoreDeps = _chunkYSKO6SPTjs.configureDaemonCoreDeps; exports.connectAndAuthenticate = _chunkYSKO6SPTjs.connectAndAuthenticate; exports.connectToDaemon = _chunkYSKO6SPTjs.connectToDaemon; exports.connectWithRetry = _chunkYSKO6SPTjs.connectWithRetry; exports.convertNotificationToStreamMessage = _chunkYSKO6SPTjs.convertNotificationToStreamMessage; exports.createComputer = _chunkYSKO6SPTjs.createComputer; exports.createResponseSchema = _chunkYSKO6SPTjs.createResponseSchema; exports.createSdkMcpServer = createSdkMcpServer; exports.createSession = createSession; exports.createWebSocketDaemonClient = _chunkYSKO6SPTjs.createWebSocketDaemonClient; exports.defaultDaemonCoreDeps = _chunkYSKO6SPTjs.defaultDaemonCoreDeps; exports.deleteComputer = _chunkYSKO6SPTjs.deleteComputer; exports.filterMessagesForUI = _chunkYSKO6SPTjs.filterMessagesForUI; exports.getComputer = _chunkYSKO6SPTjs.getComputer; exports.getComputerByName = _chunkYSKO6SPTjs.getComputerByName; exports.getComputerMetrics = _chunkYSKO6SPTjs.getComputerMetrics; exports.getMachineTemplate = _chunkYSKO6SPTjs.getMachineTemplate; exports.getPermissionToolInputForDisplay = _chunkYSKO6SPTjs.getPermissionToolInputForDisplay; exports.getQueuedUserMessageDisplayGroup = _chunkYSKO6SPTjs.getQueuedUserMessageDisplayGroup; exports.getQueuedUserMessageReviewPriority = _chunkYSKO6SPTjs.getQueuedUserMessageReviewPriority; exports.getSubagentCallingMetadata = _chunkYSKO6SPTjs.getSubagentCallingMetadata; exports.getToolResultBlocks = _chunkYSKO6SPTjs.getToolResultBlocks; exports.getToolResultToolUseId = _chunkYSKO6SPTjs.getToolResultToolUseId; exports.hasDecoupledInteractionSettings = _chunkYSKO6SPTjs.hasDecoupledInteractionSettings; exports.hasSubagentSessionTag = _chunkYSKO6SPTjs.hasSubagentSessionTag; exports.inspectJsonRpcEnvelope = _chunkYSKO6SPTjs.inspectJsonRpcEnvelope; exports.isDaemonQueuedMessageKind = _chunkYSKO6SPTjs.isDaemonQueuedMessageKind; exports.isPendingToolResultMarker = _chunkYSKO6SPTjs.isPendingToolResultMarker; exports.isPersistedHookMessage = _chunkYSKO6SPTjs.isPersistedHookMessage; exports.isReviewableQueuedMessageKind = _chunkYSKO6SPTjs.isReviewableQueuedMessageKind; exports.isTransportLoggingEnabled = isTransportLoggingEnabled; exports.listComputers = _chunkYSKO6SPTjs.listComputers; exports.listMachineTemplates = _chunkYSKO6SPTjs.listMachineTemplates; exports.listModels = listModels; exports.listRemoteSessions = _chunkYSKO6SPTjs.listRemoteSessions; exports.listSessions = listSessions; exports.logTransportMessage = logTransportMessage; exports.machineTypeToMachineConnectionType = _chunkYSKO6SPTjs.machineTypeToMachineConnectionType; exports.noopLogger = noopLogger; exports.orderMessagesByParentChain = _chunkYSKO6SPTjs.orderMessagesByParentChain; exports.recordComputerConnectSli = _chunkYSKO6SPTjs.recordComputerConnectSli; exports.refreshComputer = _chunkYSKO6SPTjs.refreshComputer; exports.repairParentChainCorruption = _chunkYSKO6SPTjs.repairParentChainCorruption; exports.resolveExecCoreDeps = resolveExecCoreDeps; exports.restartComputer = _chunkYSKO6SPTjs.restartComputer; exports.resumeSession = resumeSession; exports.retryInstallDeps = _chunkYSKO6SPTjs.retryInstallDeps; exports.retryWithLogger = _chunkYSKO6SPTjs.retryWithLogger; exports.run = run; exports.spawnWithWindowsJobObjectRetry = spawnWithWindowsJobObjectRetry; exports.sumTokenUsage = _chunkYSKO6SPTjs.sumTokenUsage; exports.summarizeSessionToolUsage = _chunkYSKO6SPTjs.summarizeSessionToolUsage; exports.toError = _chunkYSKO6SPTjs.toError; exports.tool = tool; exports.updateComputer = _chunkYSKO6SPTjs.updateComputer;
|
|
5089
|
+
|
|
5090
|
+
|
|
5091
|
+
|
|
5092
|
+
|
|
5093
|
+
|
|
5094
|
+
|
|
5095
|
+
|
|
5096
|
+
|
|
5097
|
+
|
|
5098
|
+
|
|
5099
|
+
|
|
5100
|
+
|
|
5101
|
+
|
|
5102
|
+
|
|
5103
|
+
|
|
5104
|
+
|
|
5105
|
+
|
|
5106
|
+
|
|
5107
|
+
|
|
5108
|
+
|
|
5109
|
+
|
|
5110
|
+
|
|
5111
|
+
|
|
5112
|
+
|
|
5113
|
+
|
|
5114
|
+
|
|
5115
|
+
|
|
5116
|
+
|
|
5117
|
+
|
|
5118
|
+
|
|
5119
|
+
|
|
5120
|
+
|
|
5121
|
+
|
|
5122
|
+
|
|
5123
|
+
|
|
5124
|
+
|
|
5125
|
+
|
|
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;
|
|
4744
5127
|
//# sourceMappingURL=node.js.map
|