@syntrologie/adapt-chatbot 2.8.0-canary.584 → 2.8.0-canary.586
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hostAgentController.d.ts.map +1 -1
- package/dist/runtime.js +172 -9
- package/dist/runtime.js.map +2 -2
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostAgentController.d.ts","sourceRoot":"","sources":["../src/hostAgentController.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,uFAAuF;AACvF,MAAM,WAAW,eAAe;IAC9B,oBAAoB,CAClB,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,EACnC,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,GACjC,MAAM,IAAI,CAAC;IACd;;;;;;OAMG;IACH,cAAc,CAAC,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACjG;;;;OAIG;IACH,qBAAqB,CAAC,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;CAC1D;AAeD,MAAM,WAAW,0BAA0B;IACzC,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;
|
|
1
|
+
{"version":3,"file":"hostAgentController.d.ts","sourceRoot":"","sources":["../src/hostAgentController.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,uFAAuF;AACvF,MAAM,WAAW,eAAe;IAC9B,oBAAoB,CAClB,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,EACnC,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,GACjC,MAAM,IAAI,CAAC;IACd;;;;;;OAMG;IACH,cAAc,CAAC,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACjG;;;;OAIG;IACH,qBAAqB,CAAC,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;CAC1D;AAeD,MAAM,WAAW,0BAA0B;IACzC,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAwJD,UAAU,oBAAoB;IAC5B,cAAc,CAAC,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;CAC7C;AAsJD,oFAAoF;AACpF,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,oBAAoB,EAC7B,MAAM,EAAE,eAAe,EACvB,MAAM,CAAC,EAAE,oBAAoB,EAC7B,OAAO,GAAE,0BAA+B;4BAuZT,OAAO,KAAG,IAAI;gCAgGJ,OAAO,KAAG,OAAO,CAAC,IAAI,CAAC;;;EAoHjE;AA0BD,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CA4D5E;AAED,qFAAqF;AACrF,wBAAgB,YAAY,CAC1B,OAAO,EAAE;IAAE,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CAAE,EACtD,OAAO,EAAE,OAAO,GACf,IAAI,CAEN"}
|
package/dist/runtime.js
CHANGED
|
@@ -3487,6 +3487,16 @@ var heartbeatPrefix = (sessionRef) => `${CARD_HEARTBEAT_PREFIX}${sessionRef}:`;
|
|
|
3487
3487
|
var CARD_HEARTBEAT_INTERVAL_MS = 2e3;
|
|
3488
3488
|
var CARD_SIBLING_WINDOW_MS = 6e3;
|
|
3489
3489
|
var CARD_HEARTBEAT_STALE_MS = 6e4;
|
|
3490
|
+
var CARD_SUPERSEDED = "canvas:superseded";
|
|
3491
|
+
var DOCKED_PREFIX = "syntro:mcp-docked:";
|
|
3492
|
+
var DOCKED_FOR_MS = 24 * 60 * 60 * 1e3;
|
|
3493
|
+
function coarsePointer() {
|
|
3494
|
+
try {
|
|
3495
|
+
return typeof matchMedia === "function" && matchMedia("(pointer: coarse)").matches;
|
|
3496
|
+
} catch {
|
|
3497
|
+
return false;
|
|
3498
|
+
}
|
|
3499
|
+
}
|
|
3490
3500
|
function cardStorage() {
|
|
3491
3501
|
try {
|
|
3492
3502
|
return globalThis.localStorage ?? void 0;
|
|
@@ -3494,6 +3504,29 @@ function cardStorage() {
|
|
|
3494
3504
|
return void 0;
|
|
3495
3505
|
}
|
|
3496
3506
|
}
|
|
3507
|
+
var STAR_TOOL = "star_card_tile";
|
|
3508
|
+
function decodeStars(value) {
|
|
3509
|
+
if (!record(value)) return void 0;
|
|
3510
|
+
const out = {};
|
|
3511
|
+
for (const [instanceId, star] of Object.entries(value)) {
|
|
3512
|
+
if (nonempty(instanceId) && record(star) && typeof star.starred === "boolean" && typeof star.updatedAt === "string")
|
|
3513
|
+
out[instanceId] = {
|
|
3514
|
+
starred: star.starred,
|
|
3515
|
+
updatedAt: star.updatedAt,
|
|
3516
|
+
...typeof star.changedAt === "string" ? { changedAt: star.changedAt } : {}
|
|
3517
|
+
};
|
|
3518
|
+
}
|
|
3519
|
+
return out;
|
|
3520
|
+
}
|
|
3521
|
+
function mergeStars(held, incoming) {
|
|
3522
|
+
const out = { ...held ?? {} };
|
|
3523
|
+
for (const [instanceId, next] of Object.entries(incoming)) {
|
|
3524
|
+
const current = out[instanceId];
|
|
3525
|
+
const keepCurrent = current?.changedAt !== void 0 && (next.changedAt === void 0 || current.changedAt > next.changedAt);
|
|
3526
|
+
if (!keepCurrent) out[instanceId] = next;
|
|
3527
|
+
}
|
|
3528
|
+
return out;
|
|
3529
|
+
}
|
|
3497
3530
|
var interactionOwners = /* @__PURE__ */ new WeakMap();
|
|
3498
3531
|
function hostUiSubscription(value) {
|
|
3499
3532
|
return record(value) && typeof value.subscribeHostUi === "function";
|
|
@@ -3552,7 +3585,14 @@ function decodeAgentTurn(result) {
|
|
|
3552
3585
|
session_expires_at: snapshot.session_expires_at,
|
|
3553
3586
|
mounted_elements: snapshot.mounted_elements
|
|
3554
3587
|
};
|
|
3555
|
-
|
|
3588
|
+
const issuedAt = typeof payload.issuedAt === "number" && Number.isFinite(payload.issuedAt) ? payload.issuedAt : void 0;
|
|
3589
|
+
const stars = decodeStars(payload.stars);
|
|
3590
|
+
return {
|
|
3591
|
+
session,
|
|
3592
|
+
frame,
|
|
3593
|
+
...issuedAt !== void 0 ? { issuedAt } : {},
|
|
3594
|
+
...stars ? { stars } : {}
|
|
3595
|
+
};
|
|
3556
3596
|
}
|
|
3557
3597
|
function activateHostAgentController(runtime2, bridge, hostUi, options = {}) {
|
|
3558
3598
|
let controller = createElementSessionController(runtime2);
|
|
@@ -3568,6 +3608,10 @@ function activateHostAgentController(runtime2, bridge, hostUi, options = {}) {
|
|
|
3568
3608
|
let heartbeatKey;
|
|
3569
3609
|
let heartbeatTimer;
|
|
3570
3610
|
let popOutDecided = false;
|
|
3611
|
+
let born;
|
|
3612
|
+
let answerIssuedAt;
|
|
3613
|
+
let heartbeatSession;
|
|
3614
|
+
let folded = false;
|
|
3571
3615
|
function hostSurface() {
|
|
3572
3616
|
try {
|
|
3573
3617
|
return runtime2.context?.get().surface ?? {};
|
|
@@ -3584,7 +3628,8 @@ function activateHostAgentController(runtime2, bridge, hostUi, options = {}) {
|
|
|
3584
3628
|
return {
|
|
3585
3629
|
id: parsed.id,
|
|
3586
3630
|
ts: parsed.ts,
|
|
3587
|
-
mode: typeof parsed.mode === "string" ? parsed.mode : void 0
|
|
3631
|
+
mode: typeof parsed.mode === "string" ? parsed.mode : void 0,
|
|
3632
|
+
born: typeof parsed.born === "number" ? parsed.born : void 0
|
|
3588
3633
|
};
|
|
3589
3634
|
} catch {
|
|
3590
3635
|
return;
|
|
@@ -3595,10 +3640,21 @@ function activateHostAgentController(runtime2, bridge, hostUi, options = {}) {
|
|
|
3595
3640
|
try {
|
|
3596
3641
|
cardStorage()?.setItem(
|
|
3597
3642
|
heartbeatKey,
|
|
3598
|
-
JSON.stringify({ id: cardId, ts: Date.now(), mode: hostSurface().displayMode })
|
|
3643
|
+
JSON.stringify({ id: cardId, ts: Date.now(), mode: hostSurface().displayMode, born })
|
|
3599
3644
|
);
|
|
3600
3645
|
} catch {
|
|
3601
3646
|
}
|
|
3647
|
+
considerFold();
|
|
3648
|
+
}
|
|
3649
|
+
function considerFold() {
|
|
3650
|
+
if (folded || disposed || !heartbeatSession || born === void 0) return;
|
|
3651
|
+
const surface = hostSurface();
|
|
3652
|
+
if (surface.type !== "mcp-app" || surface.displayMode !== "inline") return;
|
|
3653
|
+
if (!surface.availableDisplayModes || popsOut(surface, heartbeatSession)) return;
|
|
3654
|
+
const mine = born;
|
|
3655
|
+
if (!freshSiblings(heartbeatSession).some((beat) => (beat.born ?? 0) > mine)) return;
|
|
3656
|
+
folded = true;
|
|
3657
|
+
runtime2.events.publish(CARD_SUPERSEDED, { superseded: true });
|
|
3602
3658
|
}
|
|
3603
3659
|
function pruneHeartbeats() {
|
|
3604
3660
|
try {
|
|
@@ -3629,14 +3685,28 @@ function activateHostAgentController(runtime2, bridge, hostUi, options = {}) {
|
|
|
3629
3685
|
writeHeartbeat();
|
|
3630
3686
|
heartbeatTimer = setInterval(writeHeartbeat, CARD_HEARTBEAT_INTERVAL_MS);
|
|
3631
3687
|
};
|
|
3688
|
+
let unsubscribeModeWatch;
|
|
3632
3689
|
function startHeartbeat(sessionRef) {
|
|
3633
3690
|
const key = heartbeatPrefix(sessionRef) + cardId;
|
|
3634
3691
|
if (heartbeatKey === key) return;
|
|
3635
3692
|
if (heartbeatKey) stopHeartbeat();
|
|
3636
3693
|
heartbeatKey = key;
|
|
3694
|
+
heartbeatSession = sessionRef;
|
|
3637
3695
|
pruneHeartbeats();
|
|
3638
3696
|
writeHeartbeat();
|
|
3639
3697
|
heartbeatTimer = setInterval(writeHeartbeat, CARD_HEARTBEAT_INTERVAL_MS);
|
|
3698
|
+
let heartbeatMode = hostSurface().displayMode;
|
|
3699
|
+
try {
|
|
3700
|
+
unsubscribeModeWatch = runtime2.context?.subscribe?.(() => {
|
|
3701
|
+
const mode = hostSurface().displayMode;
|
|
3702
|
+
if (mode === heartbeatMode) return;
|
|
3703
|
+
if (heartbeatMode === "pip" && mode === "inline" && heartbeatSession)
|
|
3704
|
+
rememberDocked(heartbeatSession);
|
|
3705
|
+
heartbeatMode = mode;
|
|
3706
|
+
writeHeartbeat();
|
|
3707
|
+
});
|
|
3708
|
+
} catch {
|
|
3709
|
+
}
|
|
3640
3710
|
if (typeof window !== "undefined") {
|
|
3641
3711
|
window.addEventListener("pagehide", releaseHeartbeat);
|
|
3642
3712
|
window.addEventListener("beforeunload", releaseHeartbeat);
|
|
@@ -3649,6 +3719,8 @@ function activateHostAgentController(runtime2, bridge, hostUi, options = {}) {
|
|
|
3649
3719
|
clearInterval(heartbeatTimer);
|
|
3650
3720
|
heartbeatTimer = void 0;
|
|
3651
3721
|
}
|
|
3722
|
+
unsubscribeModeWatch?.();
|
|
3723
|
+
unsubscribeModeWatch = void 0;
|
|
3652
3724
|
const key = heartbeatKey;
|
|
3653
3725
|
heartbeatKey = void 0;
|
|
3654
3726
|
if (typeof window !== "undefined") {
|
|
@@ -3686,13 +3758,32 @@ function activateHostAgentController(runtime2, bridge, hostUi, options = {}) {
|
|
|
3686
3758
|
if (popOutDecided) return;
|
|
3687
3759
|
popOutDecided = true;
|
|
3688
3760
|
const siblings = freshSiblings(sessionRef);
|
|
3689
|
-
if (siblings.length === 0) return;
|
|
3690
3761
|
if (siblings.some((beat) => beat.mode !== "inline")) return;
|
|
3691
3762
|
const surface = hostSurface();
|
|
3692
3763
|
if (surface.type !== "mcp-app" || surface.displayMode !== "inline") return;
|
|
3693
|
-
if (!surface
|
|
3764
|
+
if (!popsOut(surface, sessionRef)) return;
|
|
3694
3765
|
runtime2.events.publish("canvas:request-display-mode", { mode: "pip" });
|
|
3695
3766
|
}
|
|
3767
|
+
function popsOut(surface, sessionRef) {
|
|
3768
|
+
if (!surface.availableDisplayModes?.includes("pip")) return false;
|
|
3769
|
+
if (coarsePointer()) return false;
|
|
3770
|
+
return !shopperDocked(sessionRef);
|
|
3771
|
+
}
|
|
3772
|
+
function shopperDocked(sessionRef) {
|
|
3773
|
+
try {
|
|
3774
|
+
const raw = cardStorage()?.getItem(DOCKED_PREFIX + sessionRef);
|
|
3775
|
+
const at = raw ? Number(raw) : Number.NaN;
|
|
3776
|
+
return Number.isFinite(at) && Date.now() - at < DOCKED_FOR_MS;
|
|
3777
|
+
} catch {
|
|
3778
|
+
return false;
|
|
3779
|
+
}
|
|
3780
|
+
}
|
|
3781
|
+
function rememberDocked(sessionRef) {
|
|
3782
|
+
try {
|
|
3783
|
+
cardStorage()?.setItem(DOCKED_PREFIX + sessionRef, String(Date.now()));
|
|
3784
|
+
} catch {
|
|
3785
|
+
}
|
|
3786
|
+
}
|
|
3696
3787
|
let interactiveState;
|
|
3697
3788
|
function interactive(value) {
|
|
3698
3789
|
if (disposed || interactiveState === value) return;
|
|
@@ -3729,11 +3820,14 @@ function activateHostAgentController(runtime2, bridge, hostUi, options = {}) {
|
|
|
3729
3820
|
return;
|
|
3730
3821
|
}
|
|
3731
3822
|
return consumeToolResult(result);
|
|
3732
|
-
}).catch(() => {
|
|
3823
|
+
}).catch((error) => {
|
|
3733
3824
|
reportCardStage("read_brand_view_answered", {
|
|
3734
3825
|
why: "reload",
|
|
3735
3826
|
ok: false,
|
|
3736
|
-
withAgentTurn: false
|
|
3827
|
+
withAgentTurn: false,
|
|
3828
|
+
// The host's own words for the refusal: a read that never
|
|
3829
|
+
// reaches the connector leaves no other record of why.
|
|
3830
|
+
reason: readFailureReason(error instanceof Error ? error.message : String(error))
|
|
3737
3831
|
});
|
|
3738
3832
|
if (!disposed && expected === generation)
|
|
3739
3833
|
runtime2.events.publish("host.ui_error", { reason: "refresh_required" });
|
|
@@ -3742,10 +3836,13 @@ function activateHostAgentController(runtime2, bridge, hostUi, options = {}) {
|
|
|
3742
3836
|
});
|
|
3743
3837
|
}
|
|
3744
3838
|
function reportReadAnswer(why, result) {
|
|
3839
|
+
const failed = record(result) && result.isError === true;
|
|
3840
|
+
const text = failed ? firstText(result) : void 0;
|
|
3745
3841
|
reportCardStage("read_brand_view_answered", {
|
|
3746
3842
|
why,
|
|
3747
|
-
ok: !
|
|
3748
|
-
withAgentTurn: decodeAgentTurn(result) !== void 0
|
|
3843
|
+
ok: !failed,
|
|
3844
|
+
withAgentTurn: decodeAgentTurn(result) !== void 0,
|
|
3845
|
+
...text ? { reason: readFailureReason(text) } : {}
|
|
3749
3846
|
});
|
|
3750
3847
|
}
|
|
3751
3848
|
const missingAfterMs = options.missingResultMs ?? MISSING_RESULT_MS;
|
|
@@ -3824,6 +3921,10 @@ function activateHostAgentController(runtime2, bridge, hostUi, options = {}) {
|
|
|
3824
3921
|
result_id: outcome.resultId,
|
|
3825
3922
|
tiles: tiles.length
|
|
3826
3923
|
});
|
|
3924
|
+
if (born === void 0 && tiles.length > 0) {
|
|
3925
|
+
born = answerIssuedAt ?? Date.now();
|
|
3926
|
+
writeHeartbeat();
|
|
3927
|
+
}
|
|
3827
3928
|
interactive(true);
|
|
3828
3929
|
}
|
|
3829
3930
|
});
|
|
@@ -3836,11 +3937,60 @@ function activateHostAgentController(runtime2, bridge, hostUi, options = {}) {
|
|
|
3836
3937
|
reportCardStage("tool_result_rejected", { reason: "decode_failed" });
|
|
3837
3938
|
return;
|
|
3838
3939
|
}
|
|
3940
|
+
answerIssuedAt ?? (answerIssuedAt = turn.issuedAt ?? Date.now());
|
|
3839
3941
|
considerPopOut(turn.session.session_ref);
|
|
3840
3942
|
acceptHostUi2({ kind: "session", session: turn.session });
|
|
3841
3943
|
acceptHostUi2({ kind: "frame", frame: turn.frame });
|
|
3842
3944
|
startHeartbeat(turn.session.session_ref);
|
|
3945
|
+
boundSessionRef = turn.session.session_ref;
|
|
3946
|
+
if (turn.stars) {
|
|
3947
|
+
knownStars = mergeStars(knownStars, turn.stars);
|
|
3948
|
+
publishStars();
|
|
3949
|
+
}
|
|
3950
|
+
}
|
|
3951
|
+
let boundSessionRef;
|
|
3952
|
+
let knownStars;
|
|
3953
|
+
function publishStars() {
|
|
3954
|
+
if (disposed || !knownStars) return;
|
|
3955
|
+
runtime2.events.publish("host.stars", { stars: { ...knownStars } });
|
|
3956
|
+
}
|
|
3957
|
+
async function requestStar(props) {
|
|
3958
|
+
const instanceId = props?.instanceId;
|
|
3959
|
+
const starred = props?.starred;
|
|
3960
|
+
if (!nonempty(instanceId) || typeof starred !== "boolean") return;
|
|
3961
|
+
const failed = () => {
|
|
3962
|
+
if (!disposed) runtime2.events.publish("host.star_failed", { instanceId });
|
|
3963
|
+
};
|
|
3964
|
+
if (!boundSessionRef || typeof bridge.callServerTool !== "function") return failed();
|
|
3965
|
+
let result;
|
|
3966
|
+
try {
|
|
3967
|
+
result = await bridge.callServerTool({
|
|
3968
|
+
name: STAR_TOOL,
|
|
3969
|
+
arguments: { sessionRef: boundSessionRef, instanceId, starred }
|
|
3970
|
+
});
|
|
3971
|
+
} catch {
|
|
3972
|
+
return failed();
|
|
3973
|
+
}
|
|
3974
|
+
const stored = record(result) && !result.isError ? result.structuredContent : void 0;
|
|
3975
|
+
if (!record(stored) || stored.instanceId !== instanceId || typeof stored.starred !== "boolean" || typeof stored.updatedAt !== "string")
|
|
3976
|
+
return failed();
|
|
3977
|
+
knownStars = mergeStars(knownStars, {
|
|
3978
|
+
[instanceId]: {
|
|
3979
|
+
starred: stored.starred,
|
|
3980
|
+
updatedAt: stored.updatedAt,
|
|
3981
|
+
...typeof stored.changedAt === "string" ? { changedAt: stored.changedAt } : {}
|
|
3982
|
+
}
|
|
3983
|
+
});
|
|
3984
|
+
publishStars();
|
|
3843
3985
|
}
|
|
3986
|
+
const stopStarRequests = runtime2.events.subscribe?.(
|
|
3987
|
+
{ names: ["canvas:star-request", "canvas:stars-request"] },
|
|
3988
|
+
(event) => {
|
|
3989
|
+
if (disposed) return;
|
|
3990
|
+
if (event.name === "canvas:stars-request") publishStars();
|
|
3991
|
+
else void requestStar(event.props);
|
|
3992
|
+
}
|
|
3993
|
+
);
|
|
3844
3994
|
const deliver = (result) => {
|
|
3845
3995
|
standDown();
|
|
3846
3996
|
void consumeToolResult(result);
|
|
@@ -3863,6 +4013,7 @@ function activateHostAgentController(runtime2, bridge, hostUi, options = {}) {
|
|
|
3863
4013
|
if (missingTimer !== void 0) clearTimeout(missingTimer);
|
|
3864
4014
|
missingTimer = void 0;
|
|
3865
4015
|
stopActivity?.();
|
|
4016
|
+
stopStarRequests?.();
|
|
3866
4017
|
stopHeartbeat();
|
|
3867
4018
|
stopObserver?.();
|
|
3868
4019
|
stopObserver = void 0;
|
|
@@ -3871,6 +4022,18 @@ function activateHostAgentController(runtime2, bridge, hostUi, options = {}) {
|
|
|
3871
4022
|
}
|
|
3872
4023
|
};
|
|
3873
4024
|
}
|
|
4025
|
+
var READ_REASON_MAX = 120;
|
|
4026
|
+
function readFailureReason(text) {
|
|
4027
|
+
const flat = text.replace(/\s+/g, " ").replace(/[A-Za-z0-9_\-+/=]{24,}/g, "[id]").trim();
|
|
4028
|
+
return flat.length > READ_REASON_MAX ? `${flat.slice(0, READ_REASON_MAX - 1)}~` : flat || "unknown";
|
|
4029
|
+
}
|
|
4030
|
+
function firstText(result) {
|
|
4031
|
+
if (!Array.isArray(result.content)) return void 0;
|
|
4032
|
+
for (const block of result.content) {
|
|
4033
|
+
if (record(block) && block.type === "text" && typeof block.text === "string") return block.text;
|
|
4034
|
+
}
|
|
4035
|
+
return void 0;
|
|
4036
|
+
}
|
|
3874
4037
|
function activateHostAgent(runtime2) {
|
|
3875
4038
|
if (!record(runtime2) || !record(runtime2.context) || typeof runtime2.context.get !== "function")
|
|
3876
4039
|
return;
|